Skip to contentSkip to conversation

arm64: dts: hi3660-hikey960: Add i2s & sound device

PATCH In review Pengcheng Li 2 participants 2 messages Feb 28, 2019 – Mar 1, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/3 arm64: dts: hi3660-hikey960: Add i2s & sound device

From: Youlin Wang <[email protected]>

---
 arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 29 +++++++++++++++++++++++
 1 file changed, 29 insertions(+)
arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts +29 -0
index 186251f..457cebc 100644
@@ -27,6 +27,35 @@
 		/* rewrite this at bootloader */
 		reg = <0x0 0x0 0x0 0x0>;
 	};
+
+	i2s2: hi3660_i2s {
+		compatible = "hisilicon,hi3660-i2s-1.0";
+		reg = <0x0 0xe804f800 0x0 0x400>,
+			<0x0 0xe804e000 0x0 0x400>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&i2s2_pmx_func &i2s2_cfg_func>;
+		dmas = <&asp_dmac 18 &asp_dmac 19>;
+		dma-names = "rx", "tx";
+		#sound-dai-cells = <0>;
+	};
+
+	sound {
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "hikey-hdmi";
+		simple-audio-card,format = "i2s";
+
+		simple-audio-card,bitclock-master = <&sound_master>;
+		simple-audio-card,frame-master = <&sound_master>;
+
+		sound_master: simple-audio-card,cpu {
+			sound-dai = <&i2s2>;
+		};
+
+		simple-audio-card,codec {
+			sound-dai = <&adv7533>;
+		};
+	};
+
 };
 
 &uart5 {
Signature · 1 line
2.8.0
#1 lore raw
Quoted 28 lines · Pengcheng Li
arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts +20 -0
index 186251f..457cebc 100644
@@ -27,6 +27,35 @@
                /* rewrite this at bootloader */
                reg = <0x0 0x0 0x0 0x0>;
        };
+
+       i2s2: hi3660_i2s {
+               compatible = "hisilicon,hi3660-i2s-1.0";
+               reg = <0x0 0xe804f800 0x0 0x400>,
+                       <0x0 0xe804e000 0x0 0x400>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2s2_pmx_func &i2s2_cfg_func>;
+               dmas = <&asp_dmac 18 &asp_dmac 19>;
+               dma-names = "rx", "tx";
+               #sound-dai-cells = <0>;
+       };
+
+       sound {
+               compatible = "simple-audio-card";
+               simple-audio-card,name = "hikey-hdmi";
+               simple-audio-card,format = "i2s";
+
+               simple-audio-card,bitclock-master = <&sound_master>;
+               simple-audio-card,frame-master = <&sound_master>;
+

arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts line 59

Quoted 10 lines
arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts +9 -0
+               sound_master: simple-audio-card,cpu {
+                       sound-dai = <&i2s2>;
+               };
+
+               simple-audio-card,codec {
+                       sound-dai = <&adv7533>;
+               };
+       };
+
 };

Hey Pengcheng,
Thanks for sending this out! I've noticed one small issue with
this dts patch compared to the previous iterations.

When building I hit the following errors:
arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts:292.27-294.5:
Warning (sound_dai_property): /sound/simple-audio-card,codec: Missing property '#sound-dai-cells' in node /soc/i2c@ffd72000/adv7533@39 or bad phandle (referred from sound-dai[0])

Which seems to us missing the sound-dai-cells addition to the adv7511 node we had the first chunk of the patch here:
https://git.linaro.org/people/john.stultz/android-dev.git/commit/?h=dev/hikey960-mainline-WIP&id=4279d58b622acd686b4d17fbf378ace1c467763e

thanks
-john