ARM64: dts: rockchip: add rk3368 sound node
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / boot / dts / rockchip / rk3368-tb.dtsi
index 08f676a8b101a4ab8a665340a50c7c207fed214d..43f3360f414abeb97b248966061342b2e48f555e 100644 (file)
                #address-cells = <1>;
                #size-cells = <0>;
 
+               cma-heap {
+                       reg = <0x00000000 0x02000000>;
+               };
+
                system-heap {
-                       rockchip,ion_heap = <0>;
+               };
+       };
+
+       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>;
                };
        };
 
        status = "okay";
 };
 
+&sdmmc {
+       clock-frequency = <37500000>;
+       clock-freq-min-max = <400000 37500000>;
+       supports-sd;
+       cap-mmc-highspeed;
+       cap-sd-highspeed;
+       card-detect-delay = <200>;
+       disable-wp;
+       num-slots = <1>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
+       status = "disabled";
+};
+
 &i2c0 {
        status = "okay";
 
                vcc6-supply = <&vcc_sys>;
                vcc7-supply = <&vcc_sys>;
                vcc8-supply = <&vcc_sys>;
-               vcc9-supply = <&vcc33_io>;
+               vcc9-supply = <&vcc_io>;
 
                regulators {
                        vdd_logic: DCDC_REG1 {
                                regulator-max-microvolt = <1450000>;
                                regulator-ramp-delay = <6001>;
                                regulator-state-mem {
-                                       regulator-off-in-suspend;
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1000000>;
                                };
                        };
 
                                regulator-max-microvolt = <1250000>;
                                regulator-ramp-delay = <6001>;
                                regulator-state-mem {
-                               regulator-on-in-suspend;
+                                       regulator-on-in-suspend;
                                        regulator-suspend-microvolt = <1000000>;
                                };
                        };
                                };
                        };
 
-                       vcc33_io: DCDC_REG4 {
+                       vcc_io: DCDC_REG4 {
                                regulator-always-on;
                                regulator-boot-on;
                                regulator-min-microvolt = <3300000>;
                                regulator-max-microvolt = <3300000>;
-                               regulator-name = "vcc33_io";
+                               regulator-name = "vcc_io";
                                regulator-state-mem {
-                               regulator-on-in-suspend;
+                                       regulator-on-in-suspend;
                                        regulator-suspend-microvolt = <3300000>;
                                };
                        };
 
-                       vccio_pmu: LDO_REG1 {
+                       vcca_codec: LDO_REG1 {
                                regulator-always-on;
                                regulator-boot-on;
                                regulator-min-microvolt = <3300000>;
                                regulator-max-microvolt = <3300000>;
-                               regulator-name = "vccio_pmu";
+                               regulator-name = "vcca_codec";
                                regulator-state-mem {
                                        regulator-on-in-suspend;
                                        regulator-suspend-microvolt = <3300000>;
                        vcc_tp: LDO_REG2 {
                                regulator-always-on;
                                regulator-boot-on;
-                               regulator-min-microvolt = <3300000>;
-                               regulator-max-microvolt = <3300000>;
+                               regulator-min-microvolt = <3000000>;
+                               regulator-max-microvolt = <3000000>;
                                regulator-name = "vcc_tp";
-                                       regulator-state-mem {
+                               regulator-state-mem {
                                        regulator-off-in-suspend;
                                };
                        };
                                };
                        };
 
-                       vccio_sd: LDO_REG5 {
+                       vccio_pmu: LDO_REG5 {
                                regulator-always-on;
                                regulator-boot-on;
                                regulator-min-microvolt = <1800000>;
-                               regulator-max-microvolt = <3300000>;
-                               regulator-name = "vccio_sd";
+                               regulator-max-microvolt = <1800000>;
+                               regulator-name = "vccio_pmu";
                                regulator-state-mem {
                                        regulator-on-in-suspend;
-                                       regulator-suspend-microvolt = <3300000>;
+                                       regulator-suspend-microvolt = <1800000>;
                                };
                        };
 
                                };
                        };
 
-                       vcca_codec: LDO_REG8 {
+                       vccio_wl: LDO_REG8 {
                                regulator-always-on;
                                regulator-boot-on;
-                               regulator-min-microvolt = <3300000>;
+                               regulator-min-microvolt = <1800000>;
                                regulator-max-microvolt = <3300000>;
-                               regulator-name = "vcca_codec";
+                               regulator-name = "vccio_wl";
                                regulator-state-mem {
                                        regulator-on-in-suspend;
                                        regulator-suspend-microvolt = <3300000>;
                                };
                        };
 
-                       vcc_wl: LDO_REG9 {
+                       vccio_sd: LDO_REG9 {
                                regulator-always-on;
                                regulator-boot-on;
-                               regulator-min-microvolt = <3300000>;
+                               regulator-min-microvolt = <1800000>;
                                regulator-max-microvolt = <3300000>;
-                               regulator-name = "vcc_wl";
+                               regulator-name = "vccio_sd";
                                regulator-state-mem {
                                        regulator-on-in-suspend;
                                        regulator-suspend-microvolt = <3300000>;
                                };
                        };
 
-                       vcc_lcd: SWITCH_REG {
+                       vcc_sd: SWITCH_REG {
                                regulator-always-on;
                                regulator-boot-on;
-                               regulator-name = "vcc_lcd";
+                               regulator-name = "vcc_sd";
                                regulator-state-mem {
                                        regulator-on-in-suspend;
                                };
 
 };
 
+&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";
 };