Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
Kever Yang | e94ffee | 2017-02-23 15:37:50 +0800 | [diff] [blame] | 2 | /* |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 3 | * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd |
Kever Yang | e94ffee | 2017-02-23 15:37:50 +0800 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | /dts-v1/; |
| 7 | #include "rk3328.dtsi" |
| 8 | |
| 9 | / { |
| 10 | model = "Rockchip RK3328 EVB"; |
| 11 | compatible = "rockchip,rk3328-evb", "rockchip,rk3328"; |
| 12 | |
| 13 | chosen { |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 14 | stdout-path = "serial2:1500000n8"; |
Kever Yang | e94ffee | 2017-02-23 15:37:50 +0800 | [diff] [blame] | 15 | }; |
Meng Dongyang | 296bd19 | 2017-06-28 19:22:41 +0800 | [diff] [blame] | 16 | |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 17 | dc_12v: dc-12v { |
Kever Yang | df81332 | 2017-06-08 15:32:06 +0800 | [diff] [blame] | 18 | compatible = "regulator-fixed"; |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 19 | regulator-name = "dc_12v"; |
Kever Yang | df81332 | 2017-06-08 15:32:06 +0800 | [diff] [blame] | 20 | regulator-always-on; |
| 21 | regulator-boot-on; |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 22 | regulator-min-microvolt = <12000000>; |
| 23 | regulator-max-microvolt = <12000000>; |
Kever Yang | df81332 | 2017-06-08 15:32:06 +0800 | [diff] [blame] | 24 | }; |
| 25 | |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 26 | sdio_pwrseq: sdio-pwrseq { |
| 27 | compatible = "mmc-pwrseq-simple"; |
| 28 | pinctrl-names = "default"; |
| 29 | pinctrl-0 = <&wifi_enable_h>; |
| 30 | |
| 31 | /* |
| 32 | * On the module itself this is one of these (depending |
| 33 | * on the actual card populated): |
| 34 | * - SDIO_RESET_L_WL_REG_ON |
| 35 | * - PDN (power down when low) |
| 36 | */ |
| 37 | reset-gpios = <&gpio1 18 GPIO_ACTIVE_LOW>; |
| 38 | }; |
| 39 | |
| 40 | vcc_sd: sdmmc-regulator { |
Meng Dongyang | 863456a | 2017-06-28 19:22:45 +0800 | [diff] [blame] | 41 | compatible = "regulator-fixed"; |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 42 | gpio = <&gpio0 30 GPIO_ACTIVE_LOW>; |
| 43 | pinctrl-names = "default"; |
| 44 | pinctrl-0 = <&sdmmc0m1_gpio>; |
| 45 | regulator-name = "vcc_sd"; |
| 46 | regulator-min-microvolt = <3300000>; |
| 47 | regulator-max-microvolt = <3300000>; |
| 48 | vin-supply = <&vcc_io>; |
| 49 | }; |
| 50 | |
| 51 | vcc_sys: vcc-sys { |
| 52 | compatible = "regulator-fixed"; |
| 53 | regulator-name = "vcc_sys"; |
| 54 | regulator-always-on; |
| 55 | regulator-boot-on; |
Meng Dongyang | 863456a | 2017-06-28 19:22:45 +0800 | [diff] [blame] | 56 | regulator-min-microvolt = <5000000>; |
| 57 | regulator-max-microvolt = <5000000>; |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 58 | vin-supply = <&dc_12v>; |
Meng Dongyang | 863456a | 2017-06-28 19:22:45 +0800 | [diff] [blame] | 59 | }; |
| 60 | |
David Wu | c132f38 | 2018-01-13 14:04:11 +0800 | [diff] [blame] | 61 | vcc_phy: vcc-phy-regulator { |
| 62 | compatible = "regulator-fixed"; |
| 63 | regulator-name = "vcc_phy"; |
| 64 | regulator-always-on; |
| 65 | regulator-boot-on; |
| 66 | }; |
Kever Yang | e94ffee | 2017-02-23 15:37:50 +0800 | [diff] [blame] | 67 | }; |
| 68 | |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 69 | &cpu0 { |
| 70 | cpu-supply = <&vdd_arm>; |
Kever Yang | e94ffee | 2017-02-23 15:37:50 +0800 | [diff] [blame] | 71 | }; |
| 72 | |
| 73 | &emmc { |
| 74 | bus-width = <8>; |
| 75 | cap-mmc-highspeed; |
Kever Yang | e94ffee | 2017-02-23 15:37:50 +0800 | [diff] [blame] | 76 | non-removable; |
Kever Yang | e94ffee | 2017-02-23 15:37:50 +0800 | [diff] [blame] | 77 | pinctrl-names = "default"; |
| 78 | pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>; |
| 79 | status = "okay"; |
| 80 | }; |
Meng Dongyang | ef82a0d | 2017-05-17 18:21:46 +0800 | [diff] [blame] | 81 | |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 82 | &gmac2phy { |
| 83 | phy-supply = <&vcc_phy>; |
| 84 | clock_in_out = "output"; |
| 85 | assigned-clocks = <&cru SCLK_MAC2PHY_SRC>; |
| 86 | assigned-clock-rate = <50000000>; |
| 87 | assigned-clocks = <&cru SCLK_MAC2PHY>; |
| 88 | assigned-clock-parents = <&cru SCLK_MAC2PHY_SRC>; |
Meng Dongyang | ef82a0d | 2017-05-17 18:21:46 +0800 | [diff] [blame] | 89 | |
Meng Dongyang | 863456a | 2017-06-28 19:22:45 +0800 | [diff] [blame] | 90 | }; |
| 91 | |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 92 | &i2c1 { |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 93 | status = "okay"; |
| 94 | |
| 95 | rk805: pmic@18 { |
| 96 | compatible = "rockchip,rk805"; |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 97 | reg = <0x18>; |
| 98 | interrupt-parent = <&gpio2>; |
| 99 | interrupts = <6 IRQ_TYPE_LEVEL_LOW>; |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 100 | #clock-cells = <1>; |
| 101 | clock-output-names = "xin32k", "rk805-clkout2"; |
| 102 | gpio-controller; |
| 103 | #gpio-cells = <2>; |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 104 | pinctrl-names = "default"; |
| 105 | pinctrl-0 = <&pmic_int_l>; |
| 106 | rockchip,system-power-controller; |
| 107 | wakeup-source; |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 108 | |
| 109 | vcc1-supply = <&vcc_sys>; |
| 110 | vcc2-supply = <&vcc_sys>; |
| 111 | vcc3-supply = <&vcc_sys>; |
| 112 | vcc4-supply = <&vcc_sys>; |
| 113 | vcc5-supply = <&vcc_io>; |
| 114 | vcc6-supply = <&vcc_io>; |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 115 | |
| 116 | regulators { |
| 117 | vdd_logic: DCDC_REG1 { |
| 118 | regulator-name = "vdd_logic"; |
| 119 | regulator-min-microvolt = <712500>; |
| 120 | regulator-max-microvolt = <1450000>; |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 121 | regulator-always-on; |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 122 | regulator-boot-on; |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 123 | regulator-state-mem { |
| 124 | regulator-on-in-suspend; |
| 125 | regulator-suspend-microvolt = <1000000>; |
| 126 | }; |
| 127 | }; |
| 128 | |
| 129 | vdd_arm: DCDC_REG2 { |
| 130 | regulator-name = "vdd_arm"; |
| 131 | regulator-min-microvolt = <712500>; |
| 132 | regulator-max-microvolt = <1450000>; |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 133 | regulator-always-on; |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 134 | regulator-boot-on; |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 135 | regulator-state-mem { |
| 136 | regulator-on-in-suspend; |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 137 | regulator-suspend-microvolt = <950000>; |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 138 | }; |
| 139 | }; |
| 140 | |
| 141 | vcc_ddr: DCDC_REG3 { |
| 142 | regulator-name = "vcc_ddr"; |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 143 | regulator-always-on; |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 144 | regulator-boot-on; |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 145 | regulator-state-mem { |
| 146 | regulator-on-in-suspend; |
| 147 | }; |
| 148 | }; |
| 149 | |
| 150 | vcc_io: DCDC_REG4 { |
| 151 | regulator-name = "vcc_io"; |
| 152 | regulator-min-microvolt = <3300000>; |
| 153 | regulator-max-microvolt = <3300000>; |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 154 | regulator-always-on; |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 155 | regulator-boot-on; |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 156 | regulator-state-mem { |
| 157 | regulator-on-in-suspend; |
| 158 | regulator-suspend-microvolt = <3300000>; |
| 159 | }; |
| 160 | }; |
| 161 | |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 162 | vcc_18: LDO_REG1 { |
| 163 | regulator-name = "vcc_18"; |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 164 | regulator-min-microvolt = <1800000>; |
| 165 | regulator-max-microvolt = <1800000>; |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 166 | regulator-always-on; |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 167 | regulator-boot-on; |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 168 | regulator-state-mem { |
| 169 | regulator-on-in-suspend; |
| 170 | regulator-suspend-microvolt = <1800000>; |
| 171 | }; |
| 172 | }; |
| 173 | |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 174 | vcc18_emmc: LDO_REG2 { |
| 175 | regulator-name = "vcc18_emmc"; |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 176 | regulator-min-microvolt = <1800000>; |
| 177 | regulator-max-microvolt = <1800000>; |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 178 | regulator-always-on; |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 179 | regulator-boot-on; |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 180 | regulator-state-mem { |
| 181 | regulator-on-in-suspend; |
| 182 | regulator-suspend-microvolt = <1800000>; |
| 183 | }; |
| 184 | }; |
| 185 | |
| 186 | vdd_10: LDO_REG3 { |
| 187 | regulator-name = "vdd_10"; |
| 188 | regulator-min-microvolt = <1000000>; |
| 189 | regulator-max-microvolt = <1000000>; |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 190 | regulator-always-on; |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 191 | regulator-boot-on; |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 192 | regulator-state-mem { |
| 193 | regulator-on-in-suspend; |
| 194 | regulator-suspend-microvolt = <1000000>; |
| 195 | }; |
| 196 | }; |
| 197 | }; |
| 198 | }; |
| 199 | }; |
| 200 | |
| 201 | &pinctrl { |
| 202 | pmic { |
| 203 | pmic_int_l: pmic-int-l { |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 204 | rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; |
| 205 | }; |
| 206 | }; |
| 207 | |
| 208 | sdio-pwrseq { |
| 209 | wifi_enable_h: wifi-enable-h { |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 210 | rockchip,pins = |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 211 | <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>; |
Elaine Zhang | f9674f5 | 2017-09-27 15:23:38 +0800 | [diff] [blame] | 212 | }; |
| 213 | }; |
| 214 | }; |
| 215 | |
Chen-Yu Tsai | 50cbff7 | 2020-04-27 14:52:52 +0800 | [diff] [blame] | 216 | &sdio { |
| 217 | bus-width = <4>; |
| 218 | cap-sd-highspeed; |
| 219 | cap-sdio-irq; |
| 220 | keep-power-in-suspend; |
| 221 | max-frequency = <150000000>; |
| 222 | mmc-pwrseq = <&sdio_pwrseq>; |
| 223 | non-removable; |
| 224 | pinctrl-names = "default"; |
| 225 | pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>; |
| 226 | status = "okay"; |
| 227 | }; |
| 228 | |
| 229 | &sdmmc { |
| 230 | bus-width = <4>; |
| 231 | cap-mmc-highspeed; |
| 232 | cap-sd-highspeed; |
| 233 | disable-wp; |
| 234 | max-frequency = <150000000>; |
| 235 | pinctrl-names = "default"; |
| 236 | pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>; |
| 237 | vmmc-supply = <&vcc_sd>; |
| 238 | status = "okay"; |
| 239 | }; |
| 240 | |
| 241 | &tsadc { |
| 242 | status = "okay"; |
| 243 | }; |
| 244 | |
| 245 | &uart2 { |
| 246 | status = "okay"; |
| 247 | }; |
| 248 | |
| 249 | &u2phy { |
| 250 | status = "okay"; |
| 251 | }; |
| 252 | |
| 253 | &u2phy_host { |
| 254 | status = "okay"; |
| 255 | }; |
| 256 | |
| 257 | &u2phy_otg { |
| 258 | status = "okay"; |
| 259 | }; |
| 260 | |
| 261 | &usb20_otg { |
| 262 | status = "okay"; |
| 263 | }; |
| 264 | |
| 265 | &usb_host0_ehci { |
| 266 | status = "okay"; |
| 267 | }; |
| 268 | |
| 269 | &usb_host0_ohci { |
| 270 | status = "okay"; |
| 271 | }; |