sun4i-codec.txt 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. * Allwinner A10 Codec
  2. Required properties:
  3. - compatible: must be one of the following compatibles:
  4. - "allwinner,sun4i-a10-codec"
  5. - "allwinner,sun6i-a31-codec"
  6. - "allwinner,sun7i-a20-codec"
  7. - "allwinner,sun8i-a23-codec"
  8. - "allwinner,sun8i-h3-codec"
  9. - "allwinner,sun8i-v3s-codec"
  10. - reg: must contain the registers location and length
  11. - interrupts: must contain the codec interrupt
  12. - dmas: DMA channels for tx and rx dma. See the DMA client binding,
  13. Documentation/devicetree/bindings/dma/dma.txt
  14. - dma-names: should include "tx" and "rx".
  15. - clocks: a list of phandle + clock-specifer pairs, one for each entry
  16. in clock-names.
  17. - clock-names: should contain the following:
  18. - "apb": the parent APB clock for this controller
  19. - "codec": the parent module clock
  20. Optional properties:
  21. - allwinner,pa-gpios: gpio to enable external amplifier
  22. Required properties for the following compatibles:
  23. - "allwinner,sun6i-a31-codec"
  24. - "allwinner,sun8i-a23-codec"
  25. - "allwinner,sun8i-h3-codec"
  26. - "allwinner,sun8i-v3s-codec"
  27. - resets: phandle to the reset control for this device
  28. - allwinner,audio-routing: A list of the connections between audio components.
  29. Each entry is a pair of strings, the first being the
  30. connection's sink, the second being the connection's
  31. source. Valid names include:
  32. Audio pins on the SoC:
  33. "HP"
  34. "HPCOM"
  35. "LINEIN" (not on sun8i-v3s)
  36. "LINEOUT" (not on sun8i-a23 or sun8i-v3s)
  37. "MIC1"
  38. "MIC2" (not on sun8i-v3s)
  39. "MIC3" (sun6i-a31 only)
  40. Microphone biases from the SoC:
  41. "HBIAS"
  42. "MBIAS" (not on sun8i-v3s)
  43. Board connectors:
  44. "Headphone"
  45. "Headset Mic"
  46. "Line In"
  47. "Line Out"
  48. "Mic"
  49. "Speaker"
  50. Required properties for the following compatibles:
  51. - "allwinner,sun8i-a23-codec"
  52. - "allwinner,sun8i-h3-codec"
  53. - "allwinner,sun8i-v3s-codec"
  54. - allwinner,codec-analog-controls: A phandle to the codec analog controls
  55. block in the PRCM.
  56. Example:
  57. codec: codec@1c22c00 {
  58. #sound-dai-cells = <0>;
  59. compatible = "allwinner,sun7i-a20-codec";
  60. reg = <0x01c22c00 0x40>;
  61. interrupts = <0 30 4>;
  62. clocks = <&apb0_gates 0>, <&codec_clk>;
  63. clock-names = "apb", "codec";
  64. dmas = <&dma 0 19>, <&dma 0 19>;
  65. dma-names = "rx", "tx";
  66. };
  67. codec: codec@1c22c00 {
  68. #sound-dai-cells = <0>;
  69. compatible = "allwinner,sun6i-a31-codec";
  70. reg = <0x01c22c00 0x98>;
  71. interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
  72. clocks = <&ccu CLK_APB1_CODEC>, <&ccu CLK_CODEC>;
  73. clock-names = "apb", "codec";
  74. resets = <&ccu RST_APB1_CODEC>;
  75. dmas = <&dma 15>, <&dma 15>;
  76. dma-names = "rx", "tx";
  77. allwinner,audio-routing =
  78. "Headphone", "HP",
  79. "Speaker", "LINEOUT",
  80. "LINEIN", "Line In",
  81. "MIC1", "MBIAS",
  82. "MIC1", "Mic",
  83. "MIC2", "HBIAS",
  84. "MIC2", "Headset Mic";
  85. };