ARM64: dts: rk3399-evb: add gsl3673 node for rk3399-evb
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / boot / dts / rockchip / rk3399-evb.dtsi
index d0549f7d10c9f66973462ad86c5acc6bf5ad257d..6c3cae823d34d98f1d5006bf8eea82b1393ef0ae 100644 (file)
 #include "rk3399.dtsi"
 
 / {
-       compatible = "rockchip,evb", "rockchip,rk3399";
-
-       vdd_log: vdd-log {
-               compatible = "pwm-regulator";
-               pwms = <&pwm2 0 25000 0>;
-               regulator-name = "vdd_log";
-               regulator-min-microvolt = <800000>;
-               regulator-max-microvolt = <1400000>;
-               regulator-always-on;
-               regulator-boot-on;
-               status = "okay";
-       };
-
-       vdd_center: vdd-center {
-               compatible = "pwm-regulator";
-               pwms = <&pwm3 0 25000 0>;
-               regulator-name = "vdd_center";
-               regulator-min-microvolt = <800000>;
-               regulator-max-microvolt = <1400000>;
-               regulator-always-on;
-               regulator-boot-on;
-               status = "okay";
-       };
+       compatible = "rockchip,rk3399-evb", "rockchip,rk3399";
 
        vcc3v3_sys: vcc3v3-sys {
                compatible = "regulator-fixed";
                regulator-max-microvolt = <3300000>;
        };
 
+       vcc5v0_host: vcc5v0-host-regulator {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&host_vbus_drv>;
+               regulator-name = "vcc5v0_host";
+       };
+
        backlight: backlight {
                compatible = "pwm-backlight";
                pwms = <&pwm0 0 25000 0>;
                        240 241 242 243 244 245 246 247
                        248 249 250 251 252 253 254 255>;
                default-brightness-level = <200>;
-               enable-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
        };
 
        clkin_gmac: external-gmac-clock {
                };
        };
 
-       spdif-sound {
+       hdmi_sound: hdmi-sound {
+               status = "disabled";
+               compatible = "simple-audio-card";
+               simple-audio-card,format = "i2s";
+               simple-audio-card,mclk-fs = <256>;
+               simple-audio-card,name = "rockchip,hdmi";
+               simple-audio-card,cpu {
+                       sound-dai = <&i2s2>;
+               };
+               simple-audio-card,codec {
+                       sound-dai = <&dw_hdmi_audio>;
+               };
+       };
+
+       dw_hdmi_audio: dw-hdmi-audio {
+               status = "disabled";
+               compatible = "rockchip,dw-hdmi-audio";
+               #sound-dai-cells = <0>;
+       };
+
+       spdif_sound: spdif-sound {
+               status = "disabled";
                compatible = "simple-audio-card";
-               simple-audio-card,name = "rockchip,spdif";
+               simple-audio-card,name = "ROCKCHIP,SPDIF";
                simple-audio-card,cpu {
                        sound-dai = <&spdif>;
                };
        };
 
        spdif_out: spdif-out {
+               status = "disabled";
                compatible = "linux,spdif-dit";
                #sound-dai-cells = <0>;
        };
                WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>; /* GPIO0_a3 */
                status = "okay";
        };
-};
 
-&pinctrl {
-       sdio-pwrseq {
-               wifi_enable_h: wifi-enable-h {
-                       rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_none>;
-               };
+       wireless-bluetooth {
+               compatible = "bluetooth-platdata";
+               //wifi-bt-power-toggle;
+               uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; /* GPIO2_C3 */
+               pinctrl-names = "default", "rts_gpio";
+               pinctrl-0 = <&uart0_rts>;
+               pinctrl-1 = <&uart0_gpios>;
+               //BT,power_gpio  = <&gpio3 19 GPIO_ACTIVE_HIGH>; /* GPIOx_xx */
+               BT,reset_gpio    = <&gpio0 9 GPIO_ACTIVE_HIGH>; /* GPIO0_B1 */
+               BT,wake_gpio     = <&gpio2 26 GPIO_ACTIVE_HIGH>; /* GPIO2_D2 */
+               BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>; /* GPIO0_A4 */
+               status = "okay";
        };
 
-       pmic {
-               pmic_int_l: pmic-int-l {
-                       rockchip,pins =
-                               <1 21 RK_FUNC_GPIO &pcfg_pull_up>;
-               };
-
-               pmic_dvs2: pmic-dvs2 {
-                       rockchip,pins =
-                               <1 18 RK_FUNC_GPIO &pcfg_pull_down>;
-               };
+       test-power {
+               status = "okay";
        };
 };
 
+&cpu_l0 {
+       cpu-supply = <&vdd_cpu_l>;
+};
+
+&cpu_l1 {
+       cpu-supply = <&vdd_cpu_l>;
+};
+
+&cpu_l2 {
+       cpu-supply = <&vdd_cpu_l>;
+};
+
+&cpu_l3 {
+       cpu-supply = <&vdd_cpu_l>;
+};
+
+&cpu_b0 {
+       cpu-supply = <&vdd_cpu_b>;
+};
+
+&cpu_b1 {
+       cpu-supply = <&vdd_cpu_b>;
+};
+
+&gpu {
+       status = "okay";
+       mali-supply = <&vdd_gpu>;
+};
+
 &sdmmc {
-       clock-frequency = <37500000>;
-       clock-freq-min-max = <400000 37500000>;
+       clock-frequency = <150000000>;
+       clock-freq-min-max = <400000 150000000>;
        supports-sd;
        bus-width = <4>;
        cap-mmc-highspeed;
        cap-sd-highspeed;
        disable-wp;
        num-slots = <1>;
+       sd-uhs-sdr104;
+       vqmmc-supply = <&vcc_sd>;
        pinctrl-names = "default";
        pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
        status = "okay";
        mmc-hs400-1_8v;
        supports-emmc;
        non-removable;
+       keep-power-in-suspend;
        mmc-hs400-enhanced-strobe;
        status = "okay";
 };
        #sound-dai-cells = <0>;
 };
 
+&i2s2 {
+       #sound-dai-cells = <0>;
+};
+
 &spdif {
-       status = "okay";
        #sound-dai-cells = <0>;
 };
 
        status = "okay";
        i2c-scl-rising-time-ns = <450>;
        i2c-scl-falling-time-ns = <15>;
+};
 
-       mp8865: mp8865@68 {
-               compatible = "mps,mp8865";
-               reg = <0x68>;
-               status = "okay";
-               regulators {
-                       vdd_gpu: mp8865_dcdc1 {
-                               regulator-name = "vdd_gpu";
-                               regulator-min-microvolt = <712500>;
-                               regulator-max-microvolt = <1500000>;
-                               regulator-always-on;
-                               regulator-boot-on;
-                       };
-               };
-       };
+&i2c1 {
+       status = "okay";
+       i2c-scl-rising-time-ns = <300>;
+       i2c-scl-falling-time-ns = <15>;
 
-       rk808: pmic@1b {
-               compatible = "rockchip,rk808";
-               reg = <0x1b>;
-               interrupt-parent = <&gpio1>;
-               interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pmic_int_l &pmic_dvs2>;
-               rockchip,system-power-controller;
-               wakeup-source;
-               #clock-cells = <1>;
-               clock-output-names = "xin32k", "rk808-clkout2";
-
-               vcc1-supply = <&vcc3v3_sys>;
-               vcc2-supply = <&vcc3v3_sys>;
-               vcc3-supply = <&vcc3v3_sys>;
-               vcc4-supply = <&vcc3v3_sys>;
-               vcc6-supply = <&vcc3v3_sys>;
-               vcc7-supply = <&vcc3v3_sys>;
-               vcc8-supply = <&vcc3v3_sys>;
-               vcc9-supply = <&vcc3v3_sys>;
-               vcc10-supply = <&vcc3v3_sys>;
-               vcc11-supply = <&vcc3v3_sys>;
-               vcc12-supply = <&vcc3v3_sys>;
-               vddio-supply = <&vcc1v8_pmu>;
-
-               regulators {
-                       vdd_cpu_b: DCDC_REG1 {
-                               regulator-always-on;
-                               regulator-boot-on;
-                               regulator-min-microvolt = <750000>;
-                               regulator-max-microvolt = <1350000>;
-                               regulator-name = "vdd_cpu_b";
-                               regulator-state-mem {
-                                       regulator-off-in-suspend;
-                               };
-                       };
-
-                       vdd_cpu_l: DCDC_REG2 {
-                               regulator-always-on;
-                               regulator-boot-on;
-                               regulator-min-microvolt = <750000>;
-                               regulator-max-microvolt = <1350000>;
-                               regulator-name = "vdd_cpu_l";
-                               regulator-state-mem {
-                                       regulator-off-in-suspend;
-                               };
-                       };
-
-                       vcc_ddr: DCDC_REG3 {
-                               regulator-always-on;
-                               regulator-boot-on;
-                               regulator-name = "vcc_ddr";
-                               regulator-state-mem {
-                                       regulator-on-in-suspend;
-                               };
-                       };
-
-                       vcc_1v8: DCDC_REG4 {
-                               regulator-always-on;
-                               regulator-boot-on;
-                               regulator-min-microvolt = <1800000>;
-                               regulator-max-microvolt = <1800000>;
-                               regulator-name = "vcc_1v8";
-                               regulator-state-mem {
-                                       regulator-on-in-suspend;
-                                       regulator-suspend-microvolt = <1800000>;
-                               };
-                       };
-
-                       vcc1v8_dvp: LDO_REG1 {
-                               regulator-always-on;
-                               regulator-boot-on;
-                               regulator-min-microvolt = <1800000>;
-                               regulator-max-microvolt = <1800000>;
-                               regulator-name = "vcc1v8_dvp";
-                               regulator-state-mem {
-                                       regulator-on-in-suspend;
-                                       regulator-suspend-microvolt = <1800000>;
-                               };
-                       };
-
-                       vcc3v0_tp: LDO_REG2 {
-                               regulator-always-on;
-                               regulator-boot-on;
-                               regulator-min-microvolt = <3000000>;
-                               regulator-max-microvolt = <3000000>;
-                               regulator-name = "vcc3v0_tp";
-                               regulator-state-mem {
-                                       regulator-off-in-suspend;
-                               };
-                       };
-
-                       vcc1v8_pmu: LDO_REG3 {
-                               regulator-always-on;
-                               regulator-boot-on;
-                               regulator-min-microvolt = <1800000>;
-                               regulator-max-microvolt = <1800000>;
-                               regulator-name = "vcc1v8_pmu";
-                               regulator-state-mem {
-                                       regulator-on-in-suspend;
-                                       regulator-suspend-microvolt = <1800000>;
-                               };
-                       };
-
-                       vcc_sd: LDO_REG4 {
-                               regulator-always-on;
-                               regulator-boot-on;
-                               regulator-min-microvolt = <1800000>;
-                               regulator-max-microvolt = <3300000>;
-                               regulator-name = "vcc_sd";
-                               regulator-state-mem {
-                                       regulator-on-in-suspend;
-                                       regulator-suspend-microvolt = <3300000>;
-                               };
-                       };
-
-                       vcca3v0_codec: LDO_REG5 {
-                               regulator-always-on;
-                               regulator-boot-on;
-                               regulator-min-microvolt = <3000000>;
-                               regulator-max-microvolt = <3000000>;
-                               regulator-name = "vcca3v0_codec";
-                               regulator-state-mem {
-                                       regulator-on-in-suspend;
-                                       regulator-suspend-microvolt = <3000000>;
-                               };
-                       };
-
-                       vcc_1v5: LDO_REG6 {
-                               regulator-always-on;
-                               regulator-boot-on;
-                               regulator-min-microvolt = <1500000>;
-                               regulator-max-microvolt = <1500000>;
-                               regulator-name = "vcc_1v5";
-                               regulator-state-mem {
-                                       regulator-on-in-suspend;
-                                       regulator-suspend-microvolt = <1500000>;
-                               };
-                       };
-
-                       vcca1v8_codec: LDO_REG7 {
-                               regulator-always-on;
-                               regulator-boot-on;
-                               regulator-min-microvolt = <1800000>;
-                               regulator-max-microvolt = <1800000>;
-                               regulator-name = "vcca1v8_codec";
-                               regulator-state-mem {
-                                       regulator-on-in-suspend;
-                                       regulator-suspend-microvolt = <1800000>;
-                               };
-                       };
-
-                       vcc_3v0: LDO_REG8 {
-                               regulator-always-on;
-                               regulator-boot-on;
-                               regulator-min-microvolt = <3000000>;
-                               regulator-max-microvolt = <3000000>;
-                               regulator-name = "vcc_3v0";
-                               regulator-state-mem {
-                                       regulator-on-in-suspend;
-                                       regulator-suspend-microvolt = <3000000>;
-                               };
-                       };
-
-                       vcc3v3_s3: SWITCH_REG1 {
-                               regulator-always-on;
-                               regulator-boot-on;
-                               regulator-name = "vcc3v3_s3";
-                               regulator-state-mem {
-                                       regulator-on-in-suspend;
-                               };
-                       };
-
-                       vcc3v3_s0: SWITCH_REG2 {
-                               regulator-always-on;
-                               regulator-boot-on;
-                               regulator-name = "vcc3v3_s0";
-                               regulator-state-mem {
-                                       regulator-on-in-suspend;
-                               };
-                       };
-               };
+       es8316: es8316@10 {
+               #sound-dai-cells = <0>;
+               compatible = "everest,es8316";
+               reg = <0x10>;
+               clocks = <&cru SCLK_I2S_8CH_OUT>;
+               clock-names = "mclk";
+               spk-con-gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
+               hp-det-gpio = <&gpio4 28 GPIO_ACTIVE_LOW>;
        };
 };
 
                tp-size = <911>;
                tp-supply = <&vcc3v0_tp>;
        };
+
+       gsl3673: gsl3673@40 {
+               compatible = "GSL,GSL3673";
+               reg = <0x40>;
+               screen_max_x = <1536>;
+               screen_max_y = <2048>;
+               irq_gpio_number = <&gpio1 20 IRQ_TYPE_LEVEL_LOW>;
+               rst_gpio_number = <&gpio4 22 GPIO_ACTIVE_HIGH>;
+       };
 };
 
-&i2c1 {
+&pcie0 {
+       assigned-clocks = <&cru SCLK_PCIEPHY_REF>;
+       assigned-clock-parents = <&cru SCLK_PCIEPHY_REF100M>;
+       assigned-clock-rates = <100000000>;
+       ep-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
+       num-lanes = <4>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pcie_clkreqn>;
        status = "okay";
-       i2c-scl-rising-time-ns = <300>;
-       i2c-scl-falling-time-ns = <15>;
-
-       es8316: es8316@10 {
-               #sound-dai-cells = <0>;
-               compatible = "everest,es8316";
-               reg = <0x10>;
-               clocks = <&cru SCLK_I2S_8CH_OUT>;
-               clock-names = "mclk";
-               spk-con-gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
-               hp-det-gpio = <&gpio4 28 GPIO_ACTIVE_LOW>;
-       };
 };
 
-&pwm2 {
+&tcphy0 {
+       extcon = <&fusb0>;
        status = "okay";
 };
 
-&pwm3 {
+&tcphy1 {
+       extcon = <&fusb1>;
        status = "okay";
 };
 
        status = "okay";
 };
 
-&uart2 {
+&u2phy0 {
+       status = "okay";
+       extcon = <&fusb0>;
+
+       u2phy0_otg: otg-port {
+               status = "okay";
+       };
+
+       u2phy0_host: host-port {
+               phy-supply = <&vcc5v0_host>;
+               status = "okay";
+       };
+};
+
+&u2phy1 {
+       status = "okay";
+       extcon = <&fusb1>;
+
+       u2phy1_otg: otg-port {
+               status = "okay";
+       };
+
+       u2phy1_host: host-port {
+               phy-supply = <&vcc5v0_host>;
+               status = "okay";
+       };
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_xfer &uart0_cts>;
        status = "okay";
 };
 
-&usb2phy {
-       vbus_drv-gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>;
+&uart2 {
+       status = "okay";
 };
 
-&usb_host0_echi {
+&usb_host0_ehci {
        status = "okay";
 };
 
        status = "okay";
 };
 
-&usb_host1_echi {
+&usb_host1_ehci {
        status = "okay";
 };
 
 };
 
 &usbdrd3_0 {
+       extcon = <&fusb0>;
        status = "okay";
 };
 
 };
 
 &usbdrd3_1 {
+       extcon = <&fusb1>;
        status = "okay";
 };
 
        status = "okay";
 };
 
-&cpu_l0 {
-       cpu-supply = <&vdd_cpu_l>;
-};
-
-&cpu_l1 {
-       cpu-supply = <&vdd_cpu_l>;
-};
-
-&cpu_l2 {
-       cpu-supply = <&vdd_cpu_l>;
-};
-
-&cpu_l3 {
-       cpu-supply = <&vdd_cpu_l>;
-};
-
-&cpu_b0 {
-       cpu-supply = <&vdd_cpu_b>;
-};
-
-&cpu_b1 {
-       cpu-supply = <&vdd_cpu_b>;
-};
-
 &gmac {
        phy-supply = <&vcc_phy>;
        phy-mode = "rgmii";
        status = "okay";
 };
 
-&gpu {
-       mali-supply = <&vdd_gpu>;
+&saradc {
        status = "okay";
 };
+
+&pinctrl {
+       sdio-pwrseq {
+               wifi_enable_h: wifi-enable-h {
+                       rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
+       wireless-bluetooth {
+               uart0_gpios: uart0-gpios {
+                       rockchip,pins = <2 19 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
+       pmic {
+               pmic_int_l: pmic-int-l {
+                       rockchip,pins =
+                               <1 21 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+
+               pmic_dvs2: pmic-dvs2 {
+                       rockchip,pins =
+                               <1 18 RK_FUNC_GPIO &pcfg_pull_down>;
+               };
+       };
+
+       usb2 {
+               host_vbus_drv: host-vbus-drv {
+                       rockchip,pins =
+                               <4 25 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
+       fusb30x {
+               fusb0_int: fusb0-int {
+                       rockchip,pins = <1 2 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+
+               fusb1_int: fusb1-int {
+                       rockchip,pins = <1 24 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+       };
+};