ARM64: dts: rockchip: add io-domain node for rk3366
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / boot / dts / rockchip / rk3366-tb.dts
index c70263c2a455b75154043e4ef7d1cc6c7c5a6f24..309cb1b9af4cc1903cd9e30657d26c5968551044 100644 (file)
                        rockchip,adc_value = <450>;
                };
        };
+
+       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 =
+                       "Mic Jack", "MICBIAS1",
+                       "IN1P", "Mic Jack",
+                       "Headphone Jack", "HPOL",
+                       "Headphone Jack", "HPOR";
+               simple-audio-card,cpu {
+                       sound-dai = <&i2s_8ch>;
+               };
+               simple-audio-card,codec {
+                       sound-dai = <&rt5640>;
+               };
+       };
+
+       vcc_sys: vcc-sys {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc_sys";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <3800000>;
+               regulator-max-microvolt = <3800000>;
+       };
+
+       ext_gmac: external-gmac-clock {
+               compatible = "fixed-clock";
+               clock-frequency = <125000000>;
+               clock-output-names = "ext_gmac";
+               #clock-cells = <0>;
+       };
+
+       vcc_phy: vcc-phy-regulator {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio0 24 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&eth_phy_pwr>;
+               regulator-name = "vcc_phy";
+               regulator-always-on;
+               regulator-boot-on;
+       };
+
+       io-domains {
+               compatible = "rockchip,rk3366-io-voltage-domain";
+               rockchip,grf = <&grf>;
+
+               lcdc-supply = <&vcc_io>;
+               dvpts-supply = <&vcc_18>;
+               wifibt-supply = <&vccio_wl>;
+               audio-supply = <&vcc_io>;
+               sdcard-supply = <&vccio_sd>;
+               tphdsor-supply = <&vcc_io>;
+       };
 };
 
 &emmc {
 
 &i2c0 {
        status = "okay";
+
+       syr827: syr827@40 {
+               regulator-name = "vdd_arm";
+               compatible = "silergy,syr827";
+               status = "okay";
+               reg = <0x40>;
+               regulator-compatible = "fan53555-reg";
+               regulator-min-microvolt = <712500>;
+               regulator-max-microvolt = <1500000>;
+               fcs,suspend-voltage-selector = <1>;
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-initial-state = <3>;
+               regulator-state-mem {
+                       regulator-on-in-suspend;
+                       regulator-suspend-microvolt = <900000>;
+               };
+       };
+
+       rk818: pmic@1c {
+               compatible = "rockchip,rk818";
+               status = "okay";
+               reg = <0x1c>;
+               clock-output-names = "xin32k", "wifibt_32kin";
+               interrupt-parent = <&gpio0>;
+               interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pmic_int_l>;
+               rockchip,system-power-controller;
+               wakeup-source;
+               #clock-cells = <1>;
+
+               vcc1-supply = <&vcc_sys>;
+               vcc2-supply = <&vcc_sys>;
+               vcc3-supply = <&vcc_sys>;
+               vcc4-supply = <&vcc_sys>;
+               vcc6-supply = <&vcc_sys>;
+               vcc7-supply = <&vcc_sys>;
+               vcc8-supply = <&vcc_sys>;
+               vcc9-supply = <&vcc_io>;
+
+               regulators {
+                       vdd_logic: DCDC_REG1 {
+                               regulator-name = "vdd_logic";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <750000>;
+                               regulator-max-microvolt = <1450000>;
+                               regulator-ramp-delay = <6001>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1000000>;
+                               };
+                       };
+
+                       vdd_gpu: DCDC_REG2 {
+                               regulator-name = "vdd_gpu";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <1250000>;
+                               regulator-ramp-delay = <6001>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1000000>;
+                               };
+                       };
+
+                       vcc_ddr: DCDC_REG3 {
+                               regulator-name = "vcc_ddr";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                               };
+                       };
+
+                       vcc_io: DCDC_REG4 {
+                               regulator-name = "vcc_io";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <3300000>;
+                               };
+                       };
+
+                       vcca_codec: LDO_REG1 {
+                               regulator-name = "vcca_codec";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <3300000>;
+                               };
+                       };
+
+                       vcc_tp: LDO_REG2 {
+                               regulator-name = "vcc_tp";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <3000000>;
+                               regulator-max-microvolt = <3000000>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <3000000>;
+                               };
+                       };
+
+                       vdd_10: LDO_REG3 {
+                               regulator-name = "vdd_10";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1000000>;
+                               };
+                       };
+
+                       vcc18_lcd: LDO_REG4 {
+                               regulator-name = "vcc18_lcd";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1800000>;
+                               };
+                       };
+
+                       vccio_pmu: LDO_REG5 {
+                               regulator-name = "vccio_pmu";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1800000>;
+                               };
+                       };
+
+                       vdd10_lcd: LDO_REG6 {
+                               regulator-name = "vdd10_lcd";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1000000>;
+                               };
+                       };
+
+                       vcc_18: LDO_REG7 {
+                               regulator-name = "vcc_18";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1800000>;
+                               };
+                       };
+
+                       vccio_wl: LDO_REG8 {
+                               regulator-name = "vccio_wl";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <3300000>;
+                               };
+                       };
+
+                       vccio_sd: LDO_REG9 {
+                               regulator-name = "vccio_sd";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <3300000>;
+                               };
+                       };
+
+                       vcc_sd: SWITCH_REG {
+                               regulator-name = "vcc_sd";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                               };
+                       };
+               };
+       };
+};
+
+&i2c1 {
+       status = "okay";
+
+       rt5640: rt5640@1c {
+               #sound-dai-cells = <0>;
+               compatible = "realtek,rt5640";
+               reg = <0x1c>;
+               clocks = <&cru SCLK_I2S_8CH_OUT>;
+               clock-names = "mclk";
+               realtek,in1-differential;
+       };
+};
+
+&i2s_8ch {
+       status = "okay";
+       rockchip,i2s-broken-burst-len;
+       rockchip,playback-channels = <8>;
+       rockchip,capture-channels = <2>;
+       #sound-dai-cells = <0>;
 };
 
 &pwm0 {
        status = "okay";
 };
 
+&fb {
+       status = "okay";
+       rockchip,disp-mode = <DUAL>;
+       rockchip,uboot-logo-on = <0>;
+};
+
+&rk_screen {
+       status = "okay";
+       #include <dt-bindings/display/screen-timing/lcd-b101ew05.dtsi>
+};
+
+&lvds {
+       pinctrl-names = "lcdc", "sleep";
+       pinctrl-0 = <&lcdc_lcdc>;
+       pinctrl-1 = <&lcdc_gpio>;
+       status = "disabled";
+};
+
+&vop_lite {
+       status = "okay";
+       rockchip,prop = <EXTEND>;
+       rockchip,mirror = <NO_MIRROR>;
+       rockchip,cabc_mode = <0>;
+       rockchip,fb-win-map = <FB_DEFAULT_ORDER>;
+};
+
+&vopl_mmu {
+       status = "okay";
+};
+
+&vop_big {
+       status = "okay";
+       rockchip,prop = <PRMRY>;
+       backlight = <&backlight>;
+       rockchip,mirror = <NO_MIRROR>;
+       rockchip,cabc_mode = <0>;
+       rockchip,fb-win-map = <FB_DEFAULT_ORDER>;
+       power_ctr: power_ctr {
+               rockchip,debug = <0>;
+               lcd_en: lcd-en {
+                       rockchip,power_type = <GPIO>;
+                       gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; /* GPIO_B4 = 12 */
+                       rockchip,delay = <10>;
+               };
+
+               lcd_cs: lcd-cs {
+                       rockchip,power_type = <GPIO>;
+                       gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>; /* GPIO_D0 = 24 */
+                       rockchip,delay = <10>;
+               };
+
+               /* lcd_rst: lcd-rst {
+                *      rockchip,power_type = <GPIO>;
+                *      gpios = <&gpio3 GPIO_D6 GPIO_ACTIVE_HIGH>;
+                *      rockchip,delay = <5>;
+                * };
+                */
+       };
+};
+
+&vopb_mmu {
+       status = "okay";
+};
+
+&pinctrl {
+        pmic {
+                pmic_int_l: pmic-int-l {
+                        rockchip,pins = <0 2 RK_FUNC_GPIO &pcfg_pull_up>;
+                };
+        };
+};
+
+&gmac {
+       phy_regulator = "vcc_phy";
+       phy-mode = "rgmii";
+       clock_in_out = "input";
+       snps,reset-gpio = <&gpio2 15 0>;
+       snps,reset-active-low;
+       snps,reset-delays-us = <0 10000 1000000>;
+       assigned-clocks = <&cru SCLK_MAC>;
+       assigned-clock-parents = <&ext_gmac>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&rgmii_pins>;
+       tx_delay = <0x30>;
+       rx_delay = <0x10>;
+       status = "okay";
+};