Skip to contentSkip to conversation

ARM: dts: sun8i: r40: Add I2S nodes

PATCH Applied Jernej Skrabec 3 participants 7 messages Sep 12, 2021 – Sep 13, 2021

Subsystems (3)
lore
Share & tools
lore

Jernej Skrabec

author maintainer
#0 lore raw

cover ARM: dts: sun8i: r40: Add I2S nodes

Allwinner R40 has 3 I2S controllers, compatible to those in H3.

Patch 1 adds R40/H3 compatible pair to DT bindings. Patch 2 adds I2S nodes to R40 DT.

Please take a look.

Best regards,
Jernej

Jernej Skrabec (2):
dt-bindings: sound: sun4i-i2s: add Allwinner R40 I2S compatible
ARM: dts: sun8i: r40: Add I2S nodes

 .../sound/allwinner,sun4i-a10-i2s.yaml        |  3 ++
 arch/arm/boot/dts/sun8i-r40.dtsi              | 39 +++++++++++++++++++
 2 files changed, 42 insertions(+)
Signature · 1 line
2.33.0
author maintainer
#1 lore raw

PATCH 1/2 dt-bindings: sound: sun4i-i2s: add Allwinner R40 I2S compatible

Allwinner R40 has 3 I2S controllers, compatible to those, found in H3.

Add R40/H3 compatible pair to DT bindings.

---
 .../devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml     | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml +3 -0
index 39b66e9ce3e3..7d48ea094c66 100644
@@ -20,6 +20,9 @@ properties:
       - const: allwinner,sun6i-a31-i2s
       - const: allwinner,sun8i-a83t-i2s
       - const: allwinner,sun8i-h3-i2s
+      - items:
+          - const: allwinner,sun8i-r40-i2s
+          - const: allwinner,sun8i-h3-i2s
       - items:
           - const: allwinner,sun8i-v3-i2s
           - const: allwinner,sun8i-h3-i2s
Signature · 1 line
2.33.0
maintainer
#2 lore raw

Re: [PATCH 1/2] dt-bindings: sound: sun4i-i2s: add Allwinner R40 I2S compatible

Quoted 3 lines · Jernej Skrabec

Allwinner R40 has 3 I2S controllers, compatible to those, found in H3.

Add R40/H3 compatible pair to DT bindings.

Please submit patches using subject lines reflecting the style for the subsystem, this makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing. There's no need to resubmit to fix this alone.

author maintainer
#3 lore raw

Re: Re: [PATCH 1/2] dt-bindings: sound: sun4i-i2s: add Allwinner R40 I2S compatible

Hi!

Dne ponedeljek, 13. september 2021 ob 13:11:17 CEST je Mark Brown napisal(a):

Quoted 10 lines · Jernej Skrabec
Quoted 3 lines

Allwinner R40 has 3 I2S controllers, compatible to those, found in H3.

Add R40/H3 compatible pair to DT bindings.

Please submit patches using subject lines reflecting the style for the subsystem, this makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing. There's no need to resubmit to fix this alone.

I did exactly that. But history is not uniform:

$ git log Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml
ce09d1a6800d dt-bindings: sound: sun4i-i2s: add Allwinner V3 I2S compatible
0bc1bf241de5 ASoC: sun4i-i2s: Document H3 with missing RX channel possibility
e84f44ba4604 ASoC: sun4i-i2s: Add H6 compatible
5c7404bb30bc dt-bindings: Change maintainer address
eb5b12843b06 dt-bindings: sound: sun4i-i2s: Document that the RX channel can 
be missing
0a0ca8e94ca3 dt-bindings: sound: Convert Allwinner I2S binding to YAML

Most subjects contain "dt-bindings: sound: " at the beginning. I selected variant from latest commit (ce09d1a6800d).

Best regards,
Jernej

maintainer
#4 lore raw

Re: Re: [PATCH 1/2] dt-bindings: sound: sun4i-i2s: add Allwinner R40 I2S compatible

Quoted 10 lines · Jernej Škrabec

Dne ponedeljek, 13. september 2021 ob 13:11:17 CEST je Mark Brown napisal(a):

Quoted 7 lines · Jernej Skrabec

Please submit patches using subject lines reflecting the style for the subsystem, this makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing. There's no need to resubmit to fix this alone.

I did exactly that. But history is not uniform:

...

Quoted 2 lines

Most subjects contain "dt-bindings: sound: " at the beginning. I selected variant from latest commit (ce09d1a6800d).

If you look at more than just this one file the numbers look rather different there, I see I will have to start being super strict with the sunxi stuff here :( . Other people messing up is not a good reason to follow them, nor is the occasional thing that's part of a larger series being let slide without a maintainer fixup.

Nothing in this patch series had anything about ASoC in it meaning I very nearly deleted this unread.

author maintainer
#5 lore raw

PATCH 2/2 ARM: dts: sun8i: r40: Add I2S nodes

In reply to Jernej Skrabec

Allwinner R40 has 3 I2S controllers, compatible to those in H3. First two are routed to pins, while third is used internally for HDMI audio.

Add nodes for all 3 I2S controllers.

---
 arch/arm/boot/dts/sun8i-r40.dtsi | 39 ++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
arch/arm/boot/dts/sun8i-r40.dtsi +39 -0
index 291f4784e86c..1d87fc0c24ee 100644
@@ -736,6 +736,45 @@ ir1: ir@1c21c00 {
 			status = "disabled";
 		};
 
+		i2s0: i2s@1c22000 {
+			#sound-dai-cells = <0>;
+			compatible = "allwinner,sun8i-r40-i2s",
+				     "allwinner,sun8i-h3-i2s";
+			reg = <0x01c22000 0x400>;
+			interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_I2S0>, <&ccu CLK_I2S0>;
+			clock-names = "apb", "mod";
+			resets = <&ccu RST_BUS_I2S0>;
+			dmas = <&dma 3>, <&dma 3>;
+			dma-names = "rx", "tx";
+		};
+
+		i2s1: i2s@1c22400 {
+			#sound-dai-cells = <0>;
+			compatible = "allwinner,sun8i-r40-i2s",
+				     "allwinner,sun8i-h3-i2s";
+			reg = <0x01c22400 0x400>;
+			interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_I2S1>, <&ccu CLK_I2S1>;
+			clock-names = "apb", "mod";
+			resets = <&ccu RST_BUS_I2S1>;
+			dmas = <&dma 4>, <&dma 4>;
+			dma-names = "rx", "tx";
+		};
+
+		i2s2: i2s@1c22800 {
+			#sound-dai-cells = <0>;
+			compatible = "allwinner,sun8i-r40-i2s",
+				     "allwinner,sun8i-h3-i2s";
+			reg = <0x01c22800 0x400>;
+			interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_I2S2>, <&ccu CLK_I2S2>;
+			clock-names = "apb", "mod";
+			resets = <&ccu RST_BUS_I2S2>;
+			dmas = <&dma 6>, <&dma 6>;
+			dma-names = "rx", "tx";
+		};
+
 		ths: thermal-sensor@1c24c00 {
 			compatible = "allwinner,sun8i-r40-ths";
 			reg = <0x01c24c00 0x100>;
Signature · 1 line
2.33.0
#6 lore raw
In reply to Jernej Skrabec
Quoted 9 lines · Jernej Skrabec

Allwinner R40 has 3 I2S controllers, compatible to those in H3.

Patch 1 adds R40/H3 compatible pair to DT bindings. Patch 2 adds I2S nodes to R40 DT.

Please take a look.

Best regards,
Jernej

Applied, thanks
Maxime