ARM64: dts: rockchip: add rk3368 sound node
authorXu Jianqun <jay.xu@rock-chips.com>
Wed, 3 Feb 2016 03:06:57 +0000 (11:06 +0800)
committerGerrit Code Review <gerrit@rock-chips.com>
Wed, 3 Feb 2016 08:46:24 +0000 (16:46 +0800)
Add sound node, use simple card driver for rt5640 codec on rockchip
rk3368 sheep board.

Change-Id: I1e7f0f7ca974d7232a2660219bd3ddfb408aaec3
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
arch/arm64/boot/dts/rockchip/rk3368-tb-sheep.dts
arch/arm64/boot/dts/rockchip/rk3368-tb.dtsi

index 2e27c9c92098fd91bd28370c4651432c981962cc..ffd3a1e81f0c9629ea0ac45534fbb2347abd7fbb 100644 (file)
        compatible = "rockchip,sheep", "rockchip,rk3368";
 };
 
+&rt5640 {
+       status = "okay";
+};
+
 &gt9xx {
        status = "okay";
 };
index 0010dc0fcb714de065224343407ac927afd872a4..43f3360f414abeb97b248966061342b2e48f555e 100644 (file)
                };
        };
 
+       sound {
+               compatible = "simple-audio-card";
+               simple-audio-card,format = "i2s";
+               simple-audio-card,name = "rockchip,rt5640-codec";
+               simple-audio-card,mclk-fs = <256>;
+               simple-audio-card,widgets =
+                       "Microphone", "Mic Jack",
+                       "Headphone", "Headphone Jack";
+               simple-audio-card,routing =
+                       "DMIC1", "Mic Jack",
+                       "DMIC2", "Mic Jack",
+                       "Mic Jack", "MICBIAS1",
+                       "IN2P", "Mic Jack",
+                       "Headphone Jack", "HPOL",
+                       "Headphone Jack", "HPOR";
+               simple-audio-card,cpu {
+                       sound-dai = <&i2s_8ch>;
+               };
+               simple-audio-card,codec {
+                       sound-dai = <&rt5640>;
+               };
+       };
+
        backlight: backlight {
                compatible = "pwm-backlight";
                pwms = <&pwm0 0 25000 PWM_POLARITY_INVERTED>;
 
 };
 
+&i2c1 {
+       status = "okay";
+
+       rt5640: rt5640@1c {
+               #sound-dai-cells = <0>;
+               compatible = "realtek,rt5640";
+               reg = <0x1c>;
+               status = "disabled";
+       };
+};
+
 &i2c2 {
        status = "okay";
 
        };
 };
 
+&i2s_8ch {
+       status = "okay";
+       rockchip,i2s-broken-burst-len;
+       rockchip,playback-channels = <8>;
+       rockchip,capture-channels = <2>;
+       #sound-dai-cells = <0>;
+};
+
 &pwm0 {
        status = "okay";
 };