Jagan Teki | 9e7b9d4 | 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 | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 10 | |
| 11 | / { |
| 12 | compatible = "vamrs,rk3288-vmarc-som", "rockchip,rk3288"; |
| 13 | |
Jagan Teki | 9e7b9d4 | 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 | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 19 | vin-supply = <&vcc_io>; |
| 20 | }; |
Jagan Teki | 9e7b9d4 | 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 | 2710779 | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 30 | vmmc-supply = <&vcc_io>; |
| 31 | vqmmc-supply = <&vccio_flash>; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 32 | status = "okay"; |
| 33 | }; |
| 34 | |
| 35 | &gmac { |
| 36 | assigned-clocks = <&cru SCLK_MAC>; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 37 | phy-supply = <&vcc_io>; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 38 | snps,reset-gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 39 | }; |
| 40 | |
| 41 | &i2c0 { |
| 42 | clock-frequency = <400000>; |
| 43 | status = "okay"; |
| 44 | |
| 45 | rk808: pmic@1b { |
| 46 | compatible = "rockchip,rk808"; |
| 47 | reg = <0x1b>; |
| 48 | interrupt-parent = <&gpio0>; |
| 49 | interrupts = <RK_PA4 IRQ_TYPE_LEVEL_LOW>; |
| 50 | pinctrl-names = "default"; |
| 51 | pinctrl-0 = <&pmic_int &global_pwroff>; |
| 52 | rockchip,system-power-controller; |
| 53 | wakeup-source; |
| 54 | #clock-cells = <1>; |
| 55 | clock-output-names = "rk808-clkout1", "rk808-clkout2"; |
| 56 | |
Jagan Teki | 2710779 | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 57 | vcc1-supply = <&vcc5v0_sys>; |
| 58 | vcc2-supply = <&vcc5v0_sys>; |
| 59 | vcc3-supply = <&vcc5v0_sys>; |
| 60 | vcc4-supply = <&vcc5v0_sys>; |
| 61 | vcc6-supply = <&vcc5v0_sys>; |
| 62 | vcc7-supply = <&vcc5v0_sys>; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 63 | vcc8-supply = <&vcc_io>; |
| 64 | vcc9-supply = <&vcc_io>; |
Jagan Teki | 2710779 | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 65 | vcc10-supply = <&vcc5v0_sys>; |
| 66 | vcc11-supply = <&vcc5v0_sys>; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 67 | vcc12-supply = <&vcc_io>; |
| 68 | vddio-supply = <&vcc_io>; |
| 69 | |
| 70 | regulators { |
| 71 | vdd_cpu: DCDC_REG1 { |
Jagan Teki | 2710779 | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 72 | regulator-name = "vdd_arm"; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 73 | regulator-always-on; |
| 74 | regulator-boot-on; |
| 75 | regulator-min-microvolt = <750000>; |
| 76 | regulator-max-microvolt = <1400000>; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 77 | regulator-state-mem { |
| 78 | regulator-off-in-suspend; |
| 79 | }; |
| 80 | }; |
| 81 | |
| 82 | vdd_gpu: DCDC_REG2 { |
Jagan Teki | 2710779 | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 83 | regulator-name = "vdd_gpu"; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 84 | regulator-always-on; |
| 85 | regulator-boot-on; |
| 86 | regulator-min-microvolt = <850000>; |
| 87 | regulator-max-microvolt = <1250000>; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 88 | regulator-ramp-delay = <6000>; |
| 89 | regulator-state-mem { |
| 90 | regulator-off-in-suspend; |
| 91 | }; |
| 92 | }; |
| 93 | |
| 94 | vcc_ddr: DCDC_REG3 { |
Jagan Teki | 2710779 | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 95 | regulator-name = "vcc_ddr"; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 96 | regulator-always-on; |
| 97 | regulator-boot-on; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 98 | regulator-state-mem { |
| 99 | regulator-on-in-suspend; |
| 100 | }; |
| 101 | }; |
| 102 | |
| 103 | vcc_io: DCDC_REG4 { |
Jagan Teki | 2710779 | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 104 | regulator-name = "vcc_io"; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 105 | regulator-always-on; |
| 106 | regulator-boot-on; |
| 107 | regulator-min-microvolt = <3300000>; |
| 108 | regulator-max-microvolt = <3300000>; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 109 | regulator-state-mem { |
| 110 | regulator-on-in-suspend; |
| 111 | regulator-suspend-microvolt = <3300000>; |
| 112 | }; |
| 113 | }; |
| 114 | |
| 115 | vcc_tp: LDO_REG1 { |
Jagan Teki | 2710779 | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 116 | regulator-name = "vcc_tp"; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 117 | regulator-always-on; |
| 118 | regulator-boot-on; |
| 119 | regulator-min-microvolt = <3300000>; |
| 120 | regulator-max-microvolt = <3300000>; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 121 | regulator-state-mem { |
| 122 | regulator-off-in-suspend; |
| 123 | }; |
| 124 | }; |
| 125 | |
| 126 | vcca_codec: LDO_REG2 { |
Jagan Teki | 2710779 | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 127 | regulator-name = "vcca_codec"; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 128 | regulator-always-on; |
| 129 | regulator-boot-on; |
| 130 | regulator-min-microvolt = <3300000>; |
| 131 | regulator-max-microvolt = <3300000>; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 132 | regulator-state-mem { |
| 133 | regulator-on-in-suspend; |
| 134 | regulator-suspend-microvolt = <3300000>; |
| 135 | }; |
| 136 | }; |
| 137 | |
| 138 | vdd_10: LDO_REG3 { |
Jagan Teki | 2710779 | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 139 | regulator-name = "vdd_10"; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 140 | regulator-always-on; |
| 141 | regulator-boot-on; |
| 142 | regulator-min-microvolt = <1000000>; |
| 143 | regulator-max-microvolt = <1000000>; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 144 | regulator-state-mem { |
| 145 | regulator-on-in-suspend; |
| 146 | regulator-suspend-microvolt = <1000000>; |
| 147 | }; |
| 148 | }; |
| 149 | |
| 150 | vcc_wl: LDO_REG4 { |
Jagan Teki | 2710779 | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 151 | regulator-name = "vcc_wl"; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 152 | regulator-always-on; |
| 153 | regulator-boot-on; |
| 154 | regulator-min-microvolt = <1800000>; |
| 155 | regulator-max-microvolt = <1800000>; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 156 | regulator-state-mem { |
| 157 | regulator-on-in-suspend; |
| 158 | }; |
| 159 | }; |
| 160 | |
| 161 | vccio_sd: LDO_REG5 { |
Jagan Teki | 2710779 | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 162 | regulator-name = "vccio_sd"; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 163 | regulator-always-on; |
| 164 | regulator-boot-on; |
| 165 | regulator-min-microvolt = <1800000>; |
| 166 | regulator-max-microvolt = <3300000>; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 167 | regulator-state-mem { |
| 168 | regulator-on-in-suspend; |
| 169 | regulator-suspend-microvolt = <3300000>; |
| 170 | }; |
| 171 | }; |
| 172 | |
| 173 | vdd10_lcd: LDO_REG6 { |
Jagan Teki | 2710779 | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 174 | regulator-name = "vdd10_lcd"; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 175 | regulator-always-on; |
| 176 | regulator-boot-on; |
| 177 | regulator-min-microvolt = <1000000>; |
| 178 | regulator-max-microvolt = <1000000>; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 179 | regulator-state-mem { |
| 180 | regulator-off-in-suspend; |
| 181 | }; |
| 182 | }; |
| 183 | |
| 184 | vcc_18: LDO_REG7 { |
Jagan Teki | 2710779 | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 185 | regulator-name = "vcc_18"; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 186 | regulator-always-on; |
| 187 | regulator-boot-on; |
| 188 | regulator-min-microvolt = <1800000>; |
| 189 | regulator-max-microvolt = <1800000>; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 190 | regulator-state-mem { |
| 191 | regulator-on-in-suspend; |
| 192 | regulator-suspend-microvolt = <1800000>; |
| 193 | }; |
| 194 | }; |
| 195 | |
| 196 | vcc18_lcd: LDO_REG8 { |
Jagan Teki | 2710779 | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 197 | regulator-name = "vcc18_lcd"; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 198 | regulator-always-on; |
| 199 | regulator-boot-on; |
| 200 | regulator-min-microvolt = <1800000>; |
| 201 | regulator-max-microvolt = <1800000>; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 202 | regulator-state-mem { |
| 203 | regulator-off-in-suspend; |
| 204 | }; |
| 205 | }; |
| 206 | |
| 207 | vcc_sd: SWITCH_REG1 { |
Jagan Teki | 2710779 | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 208 | regulator-name = "vcc_sd"; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 209 | regulator-always-on; |
| 210 | regulator-boot-on; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 211 | regulator-state-mem { |
| 212 | regulator-off-in-suspend; |
| 213 | }; |
| 214 | }; |
| 215 | |
| 216 | vcc_lcd: SWITCH_REG2 { |
Jagan Teki | 2710779 | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 217 | regulator-name = "vcc_lcd"; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 218 | regulator-always-on; |
| 219 | regulator-boot-on; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 220 | regulator-state-mem { |
| 221 | regulator-off-in-suspend; |
| 222 | }; |
| 223 | }; |
| 224 | }; |
| 225 | }; |
| 226 | }; |
| 227 | |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 228 | &pinctrl { |
| 229 | pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma { |
| 230 | drive-strength = <8>; |
| 231 | }; |
| 232 | |
| 233 | pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma { |
| 234 | bias-pull-up; |
| 235 | drive-strength = <8>; |
| 236 | }; |
| 237 | |
| 238 | pmic { |
| 239 | pmic_int: pmic-int { |
| 240 | rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>; |
| 241 | }; |
| 242 | }; |
| 243 | |
| 244 | sdmmc { |
| 245 | sdmmc_bus4: sdmmc-bus4 { |
| 246 | rockchip,pins = |
| 247 | <6 RK_PC0 1 &pcfg_pull_up_drv_8ma>, |
| 248 | <6 RK_PC1 1 &pcfg_pull_up_drv_8ma>, |
| 249 | <6 RK_PC2 1 &pcfg_pull_up_drv_8ma>, |
| 250 | <6 RK_PC3 1 &pcfg_pull_up_drv_8ma>; |
| 251 | }; |
| 252 | |
| 253 | sdmmc_clk: sdmmc-clk { |
Jagan Teki | 2710779 | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 254 | rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_drv_8ma>; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 255 | }; |
| 256 | |
| 257 | sdmmc_cmd: sdmmc-cmd { |
Jagan Teki | 2710779 | 2020-07-21 20:54:35 +0530 | [diff] [blame] | 258 | rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_8ma>; |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 259 | }; |
| 260 | }; |
Jagan Teki | 8702729 | 2020-07-21 20:54:38 +0530 | [diff] [blame^] | 261 | |
| 262 | vbus_host { |
| 263 | usb1_en_oc: usb1-en-oc { |
| 264 | rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>; |
| 265 | }; |
| 266 | }; |
| 267 | |
| 268 | vbus_typec { |
| 269 | usb0_en_oc: usb0-en-oc { |
| 270 | rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>; |
| 271 | }; |
| 272 | }; |
| 273 | }; |
| 274 | |
| 275 | &usbphy { |
| 276 | status = "okay"; |
| 277 | }; |
| 278 | |
| 279 | &usb_host0_ehci { |
| 280 | status = "okay"; |
| 281 | }; |
| 282 | |
| 283 | &usb_host0_ohci { |
| 284 | status = "okay"; |
| 285 | }; |
| 286 | |
| 287 | &usb_host1 { |
| 288 | status = "okay"; |
| 289 | }; |
| 290 | |
| 291 | &usb_otg { |
| 292 | status = "okay"; |
| 293 | }; |
| 294 | |
| 295 | &vbus_host { |
| 296 | enable-active-high; |
| 297 | gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>; /* USB1_EN_OC# */ |
| 298 | }; |
| 299 | |
| 300 | &vbus_typec { |
| 301 | enable-active-high; |
| 302 | gpio = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; /* USB0_EN_OC# */ |
Jagan Teki | 9e7b9d4 | 2020-06-18 21:42:19 +0530 | [diff] [blame] | 303 | }; |