Skip to content

Commit 206110c

Browse files
SFxingyuwubroonie
authored andcommitted
ASoC: dt-bindings: snps,designware-i2s: Add StarFive JH7110 SoC support
Add the StarFive JH7110 (TX0/TX1/RX channel) SoC support in the bindings of Designware I2S controller. The I2S controller needs two reset items to work properly on the JH7110 SoC. And TX0 channel as master mode needs 5 clock items and TX1/RX channels as slave mode need 9 clock items on the JH7110 SoC. The RX channel needs System Register Controller property to enable it and other platforms do not need it. Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230821144151.207339-2-xingyu.wu@starfivetech.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 220adc0 commit 206110c

File tree

1 file changed

+105
-3
lines changed

1 file changed

+105
-3
lines changed

Documentation/devicetree/bindings/sound/snps,designware-i2s.yaml

Lines changed: 105 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ properties:
1717
- const: snps,designware-i2s
1818
- enum:
1919
- snps,designware-i2s
20+
- starfive,jh7110-i2stx0
21+
- starfive,jh7110-i2stx1
22+
- starfive,jh7110-i2srx
2023

2124
reg:
2225
maxItems: 1
@@ -29,15 +32,36 @@ properties:
2932
maxItems: 1
3033

3134
clocks:
32-
description: Sampling rate reference clock
33-
maxItems: 1
35+
items:
36+
- description: Sampling rate reference clock
37+
- description: APB clock
38+
- description: Audio master clock
39+
- description: Inner audio master clock source
40+
- description: External audio master clock source
41+
- description: Bit clock
42+
- description: Left/right channel clock
43+
- description: External bit clock
44+
- description: External left/right channel clock
45+
minItems: 1
3446

3547
clock-names:
36-
const: i2sclk
48+
items:
49+
- const: i2sclk
50+
- const: apb
51+
- const: mclk
52+
- const: mclk_inner
53+
- const: mclk_ext
54+
- const: bclk
55+
- const: lrck
56+
- const: bclk_ext
57+
- const: lrck_ext
58+
minItems: 1
3759

3860
resets:
3961
items:
4062
- description: Optional controller resets
63+
- description: controller reset of Sampling rate
64+
minItems: 1
4165

4266
dmas:
4367
items:
@@ -51,6 +75,17 @@ properties:
5175
- const: rx
5276
minItems: 1
5377

78+
starfive,syscon:
79+
$ref: /schemas/types.yaml#/definitions/phandle-array
80+
items:
81+
- items:
82+
- description: phandle to System Register Controller sys_syscon node.
83+
- description: I2S-rx enabled control offset of SYS_SYSCONSAIF__SYSCFG register.
84+
- description: I2S-rx enabled control mask
85+
description:
86+
The phandle to System Register Controller syscon node and the I2S-rx(ADC)
87+
enabled control offset and mask of SYS_SYSCONSAIF__SYSCFG register.
88+
5489
allOf:
5590
- $ref: dai-common.yaml#
5691
- if:
@@ -66,6 +101,73 @@ allOf:
66101
properties:
67102
"#sound-dai-cells":
68103
const: 0
104+
- if:
105+
properties:
106+
compatible:
107+
contains:
108+
const: snps,designware-i2s
109+
then:
110+
properties:
111+
clocks:
112+
maxItems: 1
113+
clock-names:
114+
maxItems: 1
115+
resets:
116+
maxItems: 1
117+
else:
118+
properties:
119+
resets:
120+
minItems: 2
121+
maxItems: 2
122+
- if:
123+
properties:
124+
compatible:
125+
contains:
126+
const: starfive,jh7110-i2stx0
127+
then:
128+
properties:
129+
clocks:
130+
minItems: 5
131+
maxItems: 5
132+
clock-names:
133+
minItems: 5
134+
maxItems: 5
135+
required:
136+
- resets
137+
- if:
138+
properties:
139+
compatible:
140+
contains:
141+
const: starfive,jh7110-i2stx1
142+
then:
143+
properties:
144+
clocks:
145+
minItems: 9
146+
maxItems: 9
147+
clock-names:
148+
minItems: 9
149+
maxItems: 9
150+
required:
151+
- resets
152+
- if:
153+
properties:
154+
compatible:
155+
contains:
156+
const: starfive,jh7110-i2srx
157+
then:
158+
properties:
159+
clocks:
160+
minItems: 9
161+
maxItems: 9
162+
clock-names:
163+
minItems: 9
164+
maxItems: 9
165+
required:
166+
- resets
167+
- starfive,syscon
168+
else:
169+
properties:
170+
starfive,syscon: false
69171

70172
required:
71173
- compatible

0 commit comments

Comments
 (0)