arm64: dts: rockchip: enable pcie_phy for Sapphire board
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / boot / dts / rockchip / rk3399-sapphire.dtsi
index 720db270c62bc24b2768d452a7908af5954e0437..a3961115606a36e450e9584426e4c19257450bc8 100644 (file)
 
 #include "dt-bindings/pwm/pwm.h"
 #include "rk3399.dtsi"
+#include "rk3399-opp.dtsi"
 
 / {
        compatible = "rockchip,rk3399-sapphire", "rockchip,rk3399";
 
-       vcc5v0_sys: vcc5v0-sys {
-               compatible = "regulator-fixed";
-               regulator-name = "vcc5v0_sys";
-               regulator-always-on;
-               regulator-boot-on;
-               regulator-min-microvolt = <5000000>;
-               regulator-max-microvolt = <5000000>;
-       };
-
-       vcc3v3_sys: vcc3v3-sys {
-               compatible = "regulator-fixed";
-               regulator-name = "vcc3v3_sys";
-               regulator-always-on;
-               regulator-boot-on;
-               regulator-min-microvolt = <3300000>;
-               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";
-       };
-
-       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;
-
-               /* for rockchip boot on */
-               rockchip,pwm_id= <2>;
-               rockchip,pwm_voltage = <1000000>;
+       backlight: backlight {
+               status = "disabled";
+               compatible = "pwm-backlight";
+               pwms = <&pwm0 0 25000 0>;
+               brightness-levels = <
+                         0   1   2   3   4   5   6   7
+                         8   9  10  11  12  13  14  15
+                        16  17  18  19  20  21  22  23
+                        24  25  26  27  28  29  30  31
+                        32  33  34  35  36  37  38  39
+                        40  41  42  43  44  45  46  47
+                        48  49  50  51  52  53  54  55
+                        56  57  58  59  60  61  62  63
+                        64  65  66  67  68  69  70  71
+                        72  73  74  75  76  77  78  79
+                        80  81  82  83  84  85  86  87
+                        88  89  90  91  92  93  94  95
+                        96  97  98  99 100 101 102 103
+                       104 105 106 107 108 109 110 111
+                       112 113 114 115 116 117 118 119
+                       120 121 122 123 124 125 126 127
+                       128 129 130 131 132 133 134 135
+                       136 137 138 139 140 141 142 143
+                       144 145 146 147 148 149 150 151
+                       152 153 154 155 156 157 158 159
+                       160 161 162 163 164 165 166 167
+                       168 169 170 171 172 173 174 175
+                       176 177 178 179 180 181 182 183
+                       184 185 186 187 188 189 190 191
+                       192 193 194 195 196 197 198 199
+                       200 201 202 203 204 205 206 207
+                       208 209 210 211 212 213 214 215
+                       216 217 218 219 220 221 222 223
+                       224 225 226 227 228 229 230 231
+                       232 233 234 235 236 237 238 239
+                       240 241 242 243 244 245 246 247
+                       248 249 250 251 252 253 254 255>;
+               default-brightness-level = <200>;
        };
 
        clkin_gmac: external-gmac-clock {
                #clock-cells = <0>;
        };
 
-       vcc_phy: vcc-phy-regulator {
-               compatible = "regulator-fixed";
-               regulator-name = "vcc_phy";
-               regulator-always-on;
-               regulator-boot-on;
-       };
-
-       io-domains {
-               compatible = "rockchip,rk3399-io-voltage-domain";
-               rockchip,grf = <&grf>;
-
-               bt656-supply = <&vcc_3v0>; /* bt656_gpio2ab_ms */
-               audio-supply = <&vcca1v8_codec>; /* audio_gpio3d4a_ms */
-               sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */
-               gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */
-       };
-
-       pmu-io-domains {
-               compatible = "rockchip,rk3399-pmu-io-voltage-domain";
-               rockchip,grf = <&pmugrf>;
-               pmu1830-supply = <&vcc_3v0>;
+       dw_hdmi_audio: dw-hdmi-audio {
+               status = "disabled";
+               compatible = "rockchip,dw-hdmi-audio";
+               #sound-dai-cells = <0>;
        };
 
        hdmi_sound: hdmi-sound {
-               status = "okay";
+               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>;
+                       sound-dai = <&hdmi>;
                };
        };
 
-       dw_hdmi_audio: dw-hdmi-audio {
-               status = "okay";
-               compatible = "rockchip,dw-hdmi-audio";
-               #sound-dai-cells = <0>;
-       };
-
        sdio_pwrseq: sdio-pwrseq {
                compatible = "mmc-pwrseq-simple";
                clocks = <&rk808 1>;
                 */
                reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; /* GPIO0_B2 */
        };
+
+       vcc3v3_sys: vcc3v3-sys {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc3v3_sys";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <3300000>;
+               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";
+               regulator-always-on;
+       };
+
+       vcc5v0_sys: vcc5v0-sys {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc5v0_sys";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+       };
+
+       vcc_phy: vcc-phy-regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc_phy";
+               regulator-always-on;
+               regulator-boot-on;
+       };
+
+       vdd_log: vdd-log {
+               compatible = "pwm-regulator";
+               pwms = <&pwm2 0 25000 1>;
+               regulator-name = "vdd_log";
+               regulator-min-microvolt = <800000>;
+               regulator-max-microvolt = <1400000>;
+               regulator-always-on;
+               regulator-boot-on;
+
+               /* for rockchip boot on */
+               rockchip,pwm_id= <2>;
+               rockchip,pwm_voltage = <1000000>;
+       };
 };
 
 &cpu_l0 {
        cpu-supply = <&vdd_cpu_b>;
 };
 
-&gpu {
-       status = "okay";
-       mali-supply = <&vdd_gpu>;
-};
-
-&sdmmc {
-       clock-frequency = <150000000>;
-       clock-freq-min-max = <100000 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";
-};
-
-&sdio0 {
-       clock-frequency = <50000000>;
-       clock-freq-min-max = <200000 50000000>;
-       supports-sdio;
-       bus-width = <4>;
-       disable-wp;
-       cap-sd-highspeed;
-       cap-sdio-irq;
-       keep-power-in-suspend;
-       mmc-pwrseq = <&sdio_pwrseq>;
-       non-removable;
-       num-slots = <1>;
-       pinctrl-names = "default";
-       pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
-       sd-uhs-sdr104;
-       status = "okay";
-};
-
 &emmc_phy {
-       freq-sel = <200000000>;
-       dr-sel = <50>;
-       opdelay = <4>;
        status = "okay";
 };
 
-&sdhci {
-       bus-width = <8>;
-       mmc-hs400-1_8v;
-       supports-emmc;
-       non-removable;
-       keep-power-in-suspend;
-       mmc-hs400-enhanced-strobe;
+&gmac {
+       phy-supply = <&vcc_phy>;
+       phy-mode = "rgmii";
+       clock_in_out = "input";
+       snps,reset-gpio = <&gpio3 15 GPIO_ACTIVE_LOW>;
+       snps,reset-active-low;
+       snps,reset-delays-us = <0 10000 50000>;
+       assigned-clocks = <&cru SCLK_RMII_SRC>;
+       assigned-clock-parents = <&clkin_gmac>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&rgmii_pins>;
+       tx_delay = <0x28>;
+       rx_delay = <0x11>;
        status = "okay";
 };
 
-&i2s0 {
-       status = "okay";
-       rockchip,i2s-broken-burst-len;
-       rockchip,playback-channels = <8>;
-       rockchip,capture-channels = <8>;
-       #sound-dai-cells = <0>;
-};
-
-&i2s2 {
-       #sound-dai-cells = <0>;
+&gpu {
        status = "okay";
+       mali-supply = <&vdd_gpu>;
 };
 
 &i2c0 {
                                regulator-boot-on;
                                regulator-min-microvolt = <750000>;
                                regulator-max-microvolt = <1350000>;
+                               regulator-ramp-delay = <6001>;
                                regulator-name = "vdd_center";
                                regulator-state-mem {
                                        regulator-off-in-suspend;
                                regulator-boot-on;
                                regulator-min-microvolt = <750000>;
                                regulator-max-microvolt = <1350000>;
+                               regulator-ramp-delay = <6001>;
                                regulator-name = "vdd_cpu_l";
                                regulator-state-mem {
                                        regulator-off-in-suspend;
        };
 };
 
+&i2c4 {
+       status = "okay";
+       i2c-scl-rising-time-ns = <475>;
+       i2c-scl-falling-time-ns = <26>;
+
+       fusb0: fusb30x@22 {
+               compatible = "fairchild,fusb302";
+               reg = <0x22>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&fusb0_int>;
+               int-n-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
+               vbus-5v-gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
+               status = "okay";
+       };
+};
+
+&i2s0 {
+       status = "okay";
+       rockchip,i2s-broken-burst-len;
+       rockchip,playback-channels = <8>;
+       rockchip,capture-channels = <8>;
+       #sound-dai-cells = <0>;
+};
+
+&i2s2 {
+       #sound-dai-cells = <0>;
+       status = "okay";
+};
+
+&io_domains {
+       status = "okay";
+
+       bt656-supply = <&vcc_3v0>;              /* bt656_gpio2ab_ms */
+       audio-supply = <&vcca1v8_codec>;        /* audio_gpio3d4a_ms */
+       sdmmc-supply = <&vcc_sd>;               /* sdmmc_gpio4b_ms */
+       gpio1830-supply = <&vcc_3v0>;           /* gpio1833_gpio4cd_ms */
+};
+
+&pcie_phy {
+       status = "okay";
+};
+
 &pcie0 {
        assigned-clocks = <&cru SCLK_PCIEPHY_REF>;
        assigned-clock-parents = <&cru SCLK_PCIEPHY_REF100M>;
        status = "okay";
 };
 
+&pmu_io_domains {
+       status = "okay";
+       pmu1830-supply = <&vcc_3v0>;
+};
+
+&pwm0 {
+       status = "okay";
+};
+
+&pwm2 {
+       status = "okay";
+};
+
+&sdhci {
+       bus-width = <8>;
+       mmc-hs400-1_8v;
+       supports-emmc;
+       non-removable;
+       keep-power-in-suspend;
+       mmc-hs400-enhanced-strobe;
+       status = "okay";
+};
+
+&sdio0 {
+       clock-frequency = <50000000>;
+       clock-freq-min-max = <200000 50000000>;
+       supports-sdio;
+       bus-width = <4>;
+       disable-wp;
+       cap-sd-highspeed;
+       cap-sdio-irq;
+       keep-power-in-suspend;
+       mmc-pwrseq = <&sdio_pwrseq>;
+       non-removable;
+       num-slots = <1>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
+       sd-uhs-sdr104;
+       status = "okay";
+};
+
+&sdmmc {
+       clock-frequency = <150000000>;
+       clock-freq-min-max = <100000 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";
+};
+
+&saradc {
+       status = "okay";
+};
+
+&tcphy0 {
+       extcon = <&fusb0>;
+       status = "okay";
+};
+
+&tcphy1 {
+       status = "okay";
+};
+
 &tsadc {
        /* tshut mode 0:CRU 1:GPIO */
        rockchip,hw-tshut-mode = <1>;
 
 &u2phy0 {
        status = "okay";
+       extcon = <&fusb0>;
 
        u2phy0_otg: otg-port {
                status = "okay";
        };
 };
 
-&usb_host0_ehci {
-       status = "okay";
-};
-
-&usb_host0_ohci {
-       status = "okay";
-};
-
-&usb_host1_ehci {
-       status = "okay";
-};
-
-&usb_host1_ohci {
+&uart2 {
        status = "okay";
 };
 
 &usbdrd3_0 {
        status = "okay";
+       extcon = <&fusb0>;
 };
 
-&usbdrd_dwc3_0 {
+&usbdrd3_1 {
        status = "okay";
 };
 
-&usbdrd3_1 {
+&usbdrd_dwc3_0 {
        status = "okay";
 };
 
        dr_mode = "host";
 };
 
-&uart2 {
-       status = "okay";
-};
-
-&pwm0 {
+&usb_host0_ehci {
        status = "okay";
 };
 
-&pwm2 {
+&usb_host0_ohci {
        status = "okay";
 };
 
-&saradc {
+&usb_host1_ehci {
        status = "okay";
 };
 
-&gmac {
-       phy-supply = <&vcc_phy>;
-       phy-mode = "rgmii";
-       clock_in_out = "input";
-       snps,reset-gpio = <&gpio3 15 GPIO_ACTIVE_LOW>;
-       snps,reset-active-low;
-       snps,reset-delays-us = <0 10000 50000>;
-       assigned-clocks = <&cru SCLK_RMII_SRC>;
-       assigned-clock-parents = <&clkin_gmac>;
-       pinctrl-names = "default";
-       pinctrl-0 = <&rgmii_pins>;
-       tx_delay = <0x28>;
-       rx_delay = <0x11>;
+&usb_host1_ohci {
        status = "okay";
 };
 
-&cluster0_opp {
-       opp@408000000 {
-               opp-hz = /bits/ 64 <408000000>;
-               opp-microvolt = <800000>;
-               clock-latency-ns = <40000>;
-       };
-       opp@600000000 {
-               opp-hz = /bits/ 64 <600000000>;
-               opp-microvolt = <800000>;
-       };
-       opp@816000000 {
-               opp-hz = /bits/ 64 <816000000>;
-               opp-microvolt = <800000>;
-       };
-       opp@1008000000 {
-               opp-hz = /bits/ 64 <1008000000>;
-               opp-microvolt = <875000>;
-       };
-       opp@1200000000 {
-               opp-hz = /bits/ 64 <1200000000>;
-               opp-microvolt = <925000>;
-       };
-       opp@1416000000 {
-               opp-hz = /bits/ 64 <1416000000>;
-               opp-microvolt = <1050000>;
-       };
-       opp@1512000000 {
-               opp-hz = /bits/ 64 <1512000000>;
-               opp-microvolt = <1075000>;
-       };
-};
-
-&cluster1_opp {
-       opp@408000000 {
-               opp-hz = /bits/ 64 <408000000>;
-               opp-microvolt = <800000>;
-               clock-latency-ns = <40000>;
-       };
-       opp@600000000 {
-               opp-hz = /bits/ 64 <600000000>;
-               opp-microvolt = <800000>;
-       };
-       opp@816000000 {
-               opp-hz = /bits/ 64 <816000000>;
-               opp-microvolt = <825000>;
-       };
-       opp@1008000000 {
-               opp-hz = /bits/ 64 <1008000000>;
-               opp-microvolt = <875000>;
-       };
-       opp@1200000000 {
-               opp-hz = /bits/ 64 <1200000000>;
-               opp-microvolt = <950000>;
-       };
-       opp@1416000000 {
-               opp-hz = /bits/ 64 <1416000000>;
-               opp-microvolt = <1025000>;
-       };
-       opp@1608000000 {
-               opp-hz = /bits/ 64 <1608000000>;
-               opp-microvolt = <1100000>;
-       };
-       opp@1800000000 {
-               opp-hz = /bits/ 64 <1800000000>;
-               opp-microvolt = <1175000>;
-       };
-       opp@1992000000 {
-               opp-hz = /bits/ 64 <1992000000>;
-               opp-microvolt = <1250000>;
-       };
-};
-
-&CPU_COST_A72 {
-       busy-cost-data = <
-               210   129       /*  408MHz */
-               308   184       /*  600MHz */
-               419   246       /*  816MHz */
-               518   335       /* 1008MHz */
-               617   428       /* 1200MHz */
-               728   573       /* 1416MHz */
-               827   724       /* 1608MHz */
-               925   900       /* 1800MHz */
-               1024  1108      /* 1992MHz */
-       >;
-       idle-cost-data = <
-             15
-             15
-              0
-       >;
-};
-
-&CPU_COST_A53 {
-       busy-cost-data = <
-               108    46       /*  408M */
-               159    67       /*  600M */
-               216    90       /*  816M */
-               267    120      /* 1008M */
-               318    153      /* 1200M */
-               375    198      /* 1416M */
-               401    222      /* 1512M */
-       >;
-       idle-cost-data = <
-             6
-             6
-             0
-       >;
-};
-
-&CLUSTER_COST_A72 {
-       busy-cost-data = <
-               210   129       /*  408MHz */
-               308   184       /*  600MHz */
-               419   246       /*  816MHz */
-               518   335       /* 1008MHz */
-               617   428       /* 1200MHz */
-               728   573       /* 1416MHz */
-               827   724       /* 1608MHz */
-               925   900       /* 1800MHz */
-               1024  1108      /* 1992MHz */
-       >;
-       idle-cost-data = <
-                65
-                65
-                65
-       >;
-};
-
-&CLUSTER_COST_A53 {
-       busy-cost-data = <
-               108    46       /*  408M */
-               159    67       /*  600M */
-               216    90       /*  816M */
-               267    120      /* 1008M */
-               318    153      /* 1200M */
-               375    198      /* 1416M */
-               401    222      /* 1512M */
-       >;
-       idle-cost-data = <
-               56
-               56
-               56
-       >;
-};
-
-&gpu_opp_table {
-       opp@200000000 {
-               opp-hz = /bits/ 64 <200000000>;
-               opp-microvolt = <800000>;
-       };
-       opp@300000000 {
-               opp-hz = /bits/ 64 <300000000>;
-               opp-microvolt = <800000>;
-       };
-       opp@400000000 {
-               opp-hz = /bits/ 64 <400000000>;
-               opp-microvolt = <800000>;
-       };
-       opp@500000000 {
-               opp-hz = /bits/ 64 <500000000>;
-               opp-microvolt = <900000>;
-       };
-       opp@600000000 {
-               opp-hz = /bits/ 64 <600000000>;
-               opp-microvolt = <900000>;
-       };
-       opp@800000000 {
-               opp-hz = /bits/ 64 <800000000>;
-               opp-microvolt = <1000000>;
-       };
-};
-
 &pinctrl {
        pmic {
                pmic_int_l: pmic-int-l {
                                <4 25 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
+
+       fusb30x {
+               fusb0_int: fusb0-int {
+                       rockchip,pins = <1 2 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+       };
 };