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