Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | /* |
| 3 | * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd |
| 4 | * Copyright (c) 2019 Vamrs Limited |
| 5 | * Copyright (c) 2019 Amarula Solutions(India) |
| 6 | */ |
| 7 | |
| 8 | #include <dt-bindings/gpio/gpio.h> |
| 9 | #include <dt-bindings/pinctrl/rockchip.h> |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 10 | |
| 11 | / { |
| 12 | compatible = "vamrs,rk3288-vmarc-som", "rockchip,rk3288"; |
| 13 | |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 14 | vccio_flash: vccio-flash-regulator { |
| 15 | compatible = "regulator-fixed"; |
| 16 | regulator-name = "vccio_flash"; |
| 17 | regulator-min-microvolt = <1800000>; |
| 18 | regulator-max-microvolt = <1800000>; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 19 | vin-supply = <&vcc_io>; |
| 20 | }; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 21 | }; |
| 22 | |
| 23 | &emmc { |
| 24 | bus-width = <8>; |
| 25 | cap-mmc-highspeed; |
| 26 | disable-wp; |
| 27 | non-removable; |
| 28 | pinctrl-names = "default"; |
| 29 | pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>; |
Jagan Teki | d523b3d | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 30 | vmmc-supply = <&vcc_io>; |
| 31 | vqmmc-supply = <&vccio_flash>; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 32 | status = "okay"; |
| 33 | }; |
| 34 | |
| 35 | &gmac { |
| 36 | assigned-clocks = <&cru SCLK_MAC>; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 37 | phy-supply = <&vcc_io>; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 38 | snps,reset-gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 39 | }; |
| 40 | |
Jagan Teki | a901d3d | 2020-07-21 20:54:39 +0530 | [diff] [blame] | 41 | &hdmi { |
| 42 | ddc-i2c-bus = <&i2c5>; |
| 43 | pinctrl-names = "default"; |
| 44 | pinctrl-0 = <&hdmi_cec_c0>; |
| 45 | }; |
| 46 | |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 47 | &i2c0 { |
| 48 | clock-frequency = <400000>; |
| 49 | status = "okay"; |
| 50 | |
| 51 | rk808: pmic@1b { |
| 52 | compatible = "rockchip,rk808"; |
| 53 | reg = <0x1b>; |
| 54 | interrupt-parent = <&gpio0>; |
| 55 | interrupts = <RK_PA4 IRQ_TYPE_LEVEL_LOW>; |
| 56 | pinctrl-names = "default"; |
| 57 | pinctrl-0 = <&pmic_int &global_pwroff>; |
| 58 | rockchip,system-power-controller; |
| 59 | wakeup-source; |
| 60 | #clock-cells = <1>; |
| 61 | clock-output-names = "rk808-clkout1", "rk808-clkout2"; |
| 62 | |
Jagan Teki | d523b3d | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 63 | vcc1-supply = <&vcc5v0_sys>; |
| 64 | vcc2-supply = <&vcc5v0_sys>; |
| 65 | vcc3-supply = <&vcc5v0_sys>; |
| 66 | vcc4-supply = <&vcc5v0_sys>; |
| 67 | vcc6-supply = <&vcc5v0_sys>; |
| 68 | vcc7-supply = <&vcc5v0_sys>; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 69 | vcc8-supply = <&vcc_io>; |
| 70 | vcc9-supply = <&vcc_io>; |
Jagan Teki | d523b3d | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 71 | vcc10-supply = <&vcc5v0_sys>; |
| 72 | vcc11-supply = <&vcc5v0_sys>; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 73 | vcc12-supply = <&vcc_io>; |
| 74 | vddio-supply = <&vcc_io>; |
| 75 | |
| 76 | regulators { |
| 77 | vdd_cpu: DCDC_REG1 { |
Jagan Teki | d523b3d | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 78 | regulator-name = "vdd_arm"; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 79 | regulator-always-on; |
| 80 | regulator-boot-on; |
| 81 | regulator-min-microvolt = <750000>; |
| 82 | regulator-max-microvolt = <1400000>; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 83 | regulator-state-mem { |
| 84 | regulator-off-in-suspend; |
| 85 | }; |
| 86 | }; |
| 87 | |
| 88 | vdd_gpu: DCDC_REG2 { |
Jagan Teki | d523b3d | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 89 | regulator-name = "vdd_gpu"; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 90 | regulator-always-on; |
| 91 | regulator-boot-on; |
| 92 | regulator-min-microvolt = <850000>; |
| 93 | regulator-max-microvolt = <1250000>; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 94 | regulator-ramp-delay = <6000>; |
| 95 | regulator-state-mem { |
| 96 | regulator-off-in-suspend; |
| 97 | }; |
| 98 | }; |
| 99 | |
| 100 | vcc_ddr: DCDC_REG3 { |
Jagan Teki | d523b3d | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 101 | regulator-name = "vcc_ddr"; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 102 | regulator-always-on; |
| 103 | regulator-boot-on; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 104 | regulator-state-mem { |
| 105 | regulator-on-in-suspend; |
| 106 | }; |
| 107 | }; |
| 108 | |
| 109 | vcc_io: DCDC_REG4 { |
Jagan Teki | d523b3d | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 110 | regulator-name = "vcc_io"; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 111 | regulator-always-on; |
| 112 | regulator-boot-on; |
| 113 | regulator-min-microvolt = <3300000>; |
| 114 | regulator-max-microvolt = <3300000>; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 115 | regulator-state-mem { |
| 116 | regulator-on-in-suspend; |
| 117 | regulator-suspend-microvolt = <3300000>; |
| 118 | }; |
| 119 | }; |
| 120 | |
| 121 | vcc_tp: LDO_REG1 { |
Jagan Teki | d523b3d | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 122 | regulator-name = "vcc_tp"; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 123 | regulator-always-on; |
| 124 | regulator-boot-on; |
| 125 | regulator-min-microvolt = <3300000>; |
| 126 | regulator-max-microvolt = <3300000>; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 127 | regulator-state-mem { |
| 128 | regulator-off-in-suspend; |
| 129 | }; |
| 130 | }; |
| 131 | |
| 132 | vcca_codec: LDO_REG2 { |
Jagan Teki | d523b3d | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 133 | regulator-name = "vcca_codec"; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 134 | regulator-always-on; |
| 135 | regulator-boot-on; |
| 136 | regulator-min-microvolt = <3300000>; |
| 137 | regulator-max-microvolt = <3300000>; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 138 | regulator-state-mem { |
| 139 | regulator-on-in-suspend; |
| 140 | regulator-suspend-microvolt = <3300000>; |
| 141 | }; |
| 142 | }; |
| 143 | |
| 144 | vdd_10: LDO_REG3 { |
Jagan Teki | d523b3d | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 145 | regulator-name = "vdd_10"; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 146 | regulator-always-on; |
| 147 | regulator-boot-on; |
| 148 | regulator-min-microvolt = <1000000>; |
| 149 | regulator-max-microvolt = <1000000>; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 150 | regulator-state-mem { |
| 151 | regulator-on-in-suspend; |
| 152 | regulator-suspend-microvolt = <1000000>; |
| 153 | }; |
| 154 | }; |
| 155 | |
| 156 | vcc_wl: LDO_REG4 { |
Jagan Teki | d523b3d | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 157 | regulator-name = "vcc_wl"; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 158 | regulator-always-on; |
| 159 | regulator-boot-on; |
| 160 | regulator-min-microvolt = <1800000>; |
| 161 | regulator-max-microvolt = <1800000>; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 162 | regulator-state-mem { |
| 163 | regulator-on-in-suspend; |
| 164 | }; |
| 165 | }; |
| 166 | |
| 167 | vccio_sd: LDO_REG5 { |
Jagan Teki | d523b3d | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 168 | regulator-name = "vccio_sd"; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 169 | regulator-always-on; |
| 170 | regulator-boot-on; |
| 171 | regulator-min-microvolt = <1800000>; |
| 172 | regulator-max-microvolt = <3300000>; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 173 | regulator-state-mem { |
| 174 | regulator-on-in-suspend; |
| 175 | regulator-suspend-microvolt = <3300000>; |
| 176 | }; |
| 177 | }; |
| 178 | |
| 179 | vdd10_lcd: LDO_REG6 { |
Jagan Teki | d523b3d | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 180 | regulator-name = "vdd10_lcd"; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 181 | regulator-always-on; |
| 182 | regulator-boot-on; |
| 183 | regulator-min-microvolt = <1000000>; |
| 184 | regulator-max-microvolt = <1000000>; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 185 | regulator-state-mem { |
| 186 | regulator-off-in-suspend; |
| 187 | }; |
| 188 | }; |
| 189 | |
| 190 | vcc_18: LDO_REG7 { |
Jagan Teki | d523b3d | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 191 | regulator-name = "vcc_18"; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 192 | regulator-always-on; |
| 193 | regulator-boot-on; |
| 194 | regulator-min-microvolt = <1800000>; |
| 195 | regulator-max-microvolt = <1800000>; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 196 | regulator-state-mem { |
| 197 | regulator-on-in-suspend; |
| 198 | regulator-suspend-microvolt = <1800000>; |
| 199 | }; |
| 200 | }; |
| 201 | |
| 202 | vcc18_lcd: LDO_REG8 { |
Jagan Teki | d523b3d | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 203 | regulator-name = "vcc18_lcd"; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 204 | regulator-always-on; |
| 205 | regulator-boot-on; |
| 206 | regulator-min-microvolt = <1800000>; |
| 207 | regulator-max-microvolt = <1800000>; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 208 | regulator-state-mem { |
| 209 | regulator-off-in-suspend; |
| 210 | }; |
| 211 | }; |
| 212 | |
| 213 | vcc_sd: SWITCH_REG1 { |
Jagan Teki | d523b3d | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 214 | regulator-name = "vcc_sd"; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 215 | regulator-always-on; |
| 216 | regulator-boot-on; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 217 | regulator-state-mem { |
| 218 | regulator-off-in-suspend; |
| 219 | }; |
| 220 | }; |
| 221 | |
| 222 | vcc_lcd: SWITCH_REG2 { |
Jagan Teki | d523b3d | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 223 | regulator-name = "vcc_lcd"; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 224 | regulator-always-on; |
| 225 | regulator-boot-on; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 226 | regulator-state-mem { |
| 227 | regulator-off-in-suspend; |
| 228 | }; |
| 229 | }; |
| 230 | }; |
| 231 | }; |
| 232 | }; |
| 233 | |
Jonas Karlman | babf4e7 | 2024-05-01 16:22:25 +0000 | [diff] [blame] | 234 | &i2c1 { |
| 235 | clock-frequency = <400000>; |
| 236 | status = "okay"; |
| 237 | |
| 238 | hym8563: rtc@51 { |
| 239 | compatible = "haoyu,hym8563"; |
| 240 | reg = <0x51>; |
| 241 | interrupt-parent = <&gpio5>; |
| 242 | interrupts = <RK_PC3 IRQ_TYPE_LEVEL_LOW>; |
| 243 | #clock-cells = <0>; |
| 244 | clock-output-names = "hym8563"; |
| 245 | pinctrl-names = "default"; |
| 246 | pinctrl-0 = <&hym8563_int>; |
| 247 | }; |
| 248 | }; |
| 249 | |
Jagan Teki | a901d3d | 2020-07-21 20:54:39 +0530 | [diff] [blame] | 250 | &i2c5 { |
| 251 | status = "okay"; |
| 252 | }; |
| 253 | |
Jonas Karlman | babf4e7 | 2024-05-01 16:22:25 +0000 | [diff] [blame] | 254 | &io_domains { |
| 255 | bb-supply = <&vcc_io>; |
| 256 | flash0-supply = <&vccio_flash>; |
| 257 | gpio1830-supply = <&vcc_18>; |
| 258 | gpio30-supply = <&vcc_io>; |
| 259 | sdcard-supply = <&vccio_sd>; |
| 260 | wifi-supply = <&vcc_wl>; |
| 261 | status = "okay"; |
| 262 | }; |
| 263 | |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 264 | &pinctrl { |
Jonas Karlman | babf4e7 | 2024-05-01 16:22:25 +0000 | [diff] [blame] | 265 | hym8563 { |
| 266 | hym8563_int: hym8563-int { |
| 267 | rockchip,pins = <5 RK_PC3 RK_FUNC_GPIO &pcfg_pull_up>; |
| 268 | }; |
| 269 | }; |
| 270 | |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 271 | pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma { |
| 272 | drive-strength = <8>; |
| 273 | }; |
| 274 | |
| 275 | pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma { |
| 276 | bias-pull-up; |
| 277 | drive-strength = <8>; |
| 278 | }; |
| 279 | |
| 280 | pmic { |
| 281 | pmic_int: pmic-int { |
| 282 | rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>; |
| 283 | }; |
| 284 | }; |
| 285 | |
Jonas Karlman | babf4e7 | 2024-05-01 16:22:25 +0000 | [diff] [blame] | 286 | sdio-pwrseq { |
| 287 | wifi_enable_h: wifi-enable-h { |
| 288 | rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>; |
| 289 | }; |
| 290 | }; |
| 291 | |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 292 | sdmmc { |
| 293 | sdmmc_bus4: sdmmc-bus4 { |
| 294 | rockchip,pins = |
| 295 | <6 RK_PC0 1 &pcfg_pull_up_drv_8ma>, |
| 296 | <6 RK_PC1 1 &pcfg_pull_up_drv_8ma>, |
| 297 | <6 RK_PC2 1 &pcfg_pull_up_drv_8ma>, |
| 298 | <6 RK_PC3 1 &pcfg_pull_up_drv_8ma>; |
| 299 | }; |
| 300 | |
| 301 | sdmmc_clk: sdmmc-clk { |
Jagan Teki | d523b3d | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 302 | rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_drv_8ma>; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 303 | }; |
| 304 | |
| 305 | sdmmc_cmd: sdmmc-cmd { |
Jagan Teki | d523b3d | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 306 | rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_8ma>; |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 307 | }; |
| 308 | }; |
Jagan Teki | 513673d | 2020-07-21 20:54:38 +0530 | [diff] [blame] | 309 | |
| 310 | vbus_host { |
| 311 | usb1_en_oc: usb1-en-oc { |
| 312 | rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>; |
| 313 | }; |
| 314 | }; |
| 315 | |
| 316 | vbus_typec { |
| 317 | usb0_en_oc: usb0-en-oc { |
| 318 | rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>; |
| 319 | }; |
| 320 | }; |
| 321 | }; |
| 322 | |
Jonas Karlman | babf4e7 | 2024-05-01 16:22:25 +0000 | [diff] [blame] | 323 | &sdio_pwrseq { |
| 324 | /* |
| 325 | * On the module itself this is one of these (depending |
| 326 | * on the actual card populated): |
| 327 | * - SDIO_RESET_L_WL_REG_ON |
| 328 | * - PDN (power down when low) |
| 329 | */ |
| 330 | reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>; /* WIFI_REG_ON */ |
| 331 | }; |
| 332 | |
Jagan Teki | 513673d | 2020-07-21 20:54:38 +0530 | [diff] [blame] | 333 | &usbphy { |
| 334 | status = "okay"; |
| 335 | }; |
| 336 | |
| 337 | &usb_host0_ehci { |
| 338 | status = "okay"; |
| 339 | }; |
| 340 | |
| 341 | &usb_host0_ohci { |
| 342 | status = "okay"; |
| 343 | }; |
| 344 | |
| 345 | &usb_host1 { |
| 346 | status = "okay"; |
| 347 | }; |
| 348 | |
| 349 | &usb_otg { |
| 350 | status = "okay"; |
| 351 | }; |
| 352 | |
| 353 | &vbus_host { |
| 354 | enable-active-high; |
| 355 | gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>; /* USB1_EN_OC# */ |
| 356 | }; |
| 357 | |
| 358 | &vbus_typec { |
| 359 | enable-active-high; |
| 360 | gpio = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; /* USB0_EN_OC# */ |
Jagan Teki | e201380 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 361 | }; |