0007-ASoC-dt-bindings-sun4i-a10-codec-Add-binding-for-All.patch 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. From 3341f884d75929a009801d4299d219e64c64a33c Mon Sep 17 00:00:00 2001
  2. From: Maksim Kiselev <[email protected]>
  3. Date: Sat, 5 Aug 2023 21:05:01 +0300
  4. Subject: [PATCH 07/14] ASoC: dt-bindings: sun4i-a10-codec: Add binding for
  5. Allwinner D1 SoC
  6. The Allwinner D1 SoC has a internal audio codec that similar to previous
  7. ones, but it contains a three ADC channels instead of two, and also has
  8. a separate clocks for ADC and DAC modules.
  9. Signed-off-by: Maksim Kiselev <[email protected]>
  10. Reviewed-by: Rob Herring <[email protected]>
  11. ---
  12. .../sound/allwinner,sun4i-a10-codec.yaml | 64 ++++++++++++++++---
  13. 1 file changed, 56 insertions(+), 8 deletions(-)
  14. --- a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-codec.yaml
  15. +++ b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-codec.yaml
  16. @@ -22,6 +22,7 @@ properties:
  17. - allwinner,sun8i-a23-codec
  18. - allwinner,sun8i-h3-codec
  19. - allwinner,sun8i-v3s-codec
  20. + - allwinner,sun20i-d1-codec
  21. reg:
  22. maxItems: 1
  23. @@ -29,15 +30,9 @@ properties:
  24. interrupts:
  25. maxItems: 1
  26. - clocks:
  27. - items:
  28. - - description: Bus Clock
  29. - - description: Module Clock
  30. + clocks: true
  31. - clock-names:
  32. - items:
  33. - - const: apb
  34. - - const: codec
  35. + clock-names: true
  36. dmas:
  37. items:
  38. @@ -106,11 +101,42 @@ allOf:
  39. - if:
  40. properties:
  41. compatible:
  42. + const: allwinner,sun20i-d1-codec
  43. + then:
  44. + properties:
  45. + clocks:
  46. + items:
  47. + - description: Bus Clock
  48. + - description: ADC Module Clock
  49. + - description: DAC Module Clock
  50. +
  51. + clock-names:
  52. + items:
  53. + - const: apb
  54. + - const: adc
  55. + - const: dac
  56. +
  57. + else:
  58. + properties:
  59. + clocks:
  60. + items:
  61. + - description: Bus Clock
  62. + - description: Module Clock
  63. +
  64. + clock-names:
  65. + items:
  66. + - const: apb
  67. + - const: codec
  68. +
  69. + - if:
  70. + properties:
  71. + compatible:
  72. enum:
  73. - allwinner,sun6i-a31-codec
  74. - allwinner,sun8i-a23-codec
  75. - allwinner,sun8i-h3-codec
  76. - allwinner,sun8i-v3s-codec
  77. + - allwinner,sun20i-d1-codec
  78. then:
  79. if:
  80. @@ -225,6 +251,28 @@ allOf:
  81. - Headphone
  82. - Headset Mic
  83. - Line In
  84. + - Line Out
  85. + - Mic
  86. + - Speaker
  87. +
  88. + - if:
  89. + properties:
  90. + compatible:
  91. + enum:
  92. + - allwinner,sun20i-d1-codec
  93. +
  94. + then:
  95. + properties:
  96. + allwinner,audio-routing:
  97. + items:
  98. + enum:
  99. + - HP
  100. + - LINEIN
  101. + - MIC3
  102. + - MBIAS
  103. + - Headphone
  104. + - Headset Mic
  105. + - Line In
  106. - Line Out
  107. - Mic
  108. - Speaker