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