Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 Jagan Teki <jagan@amarulasolutions.com> |
| 3 | * |
| 4 | * This file is dual-licensed: you can use it either under the terms |
| 5 | * of the GPL or the X11 license, at your option. Note that this dual |
| 6 | * licensing only applies to this file, and not this project as a |
| 7 | * whole. |
| 8 | * |
| 9 | * a) This file is free software; you can redistribute it and/or |
| 10 | * modify it under the terms of the GNU General Public License as |
| 11 | * published by the Free Software Foundation; either version 2 of the |
| 12 | * License, or (at your option) any later version. |
| 13 | * |
| 14 | * This file is distributed in the hope that it will be useful, |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | * GNU General Public License for more details. |
| 18 | * |
| 19 | * Or, alternatively, |
| 20 | * |
| 21 | * b) Permission is hereby granted, free of charge, to any person |
| 22 | * obtaining a copy of this software and associated documentation |
| 23 | * files (the "Software"), to deal in the Software without |
| 24 | * restriction, including without limitation the rights to use, |
| 25 | * copy, modify, merge, publish, distribute, sublicense, and/or |
| 26 | * sell copies of the Software, and to permit persons to whom the |
| 27 | * Software is furnished to do so, subject to the following |
| 28 | * conditions: |
| 29 | * |
| 30 | * The above copyright notice and this permission notice shall be |
| 31 | * included in all copies or substantial portions of the Software. |
| 32 | * |
| 33 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 34 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
| 35 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 36 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
| 37 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
| 38 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 39 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 40 | * OTHER DEALINGS IN THE SOFTWARE. |
| 41 | */ |
| 42 | |
| 43 | /dts-v1/; |
| 44 | #include "rk3288.dtsi" |
| 45 | |
| 46 | / { |
| 47 | model = "Amarula Vyasa-RK3288"; |
| 48 | compatible = "amarula,vyasa-rk3288", "rockchip,rk3288"; |
| 49 | |
| 50 | chosen { |
| 51 | stdout-path = &uart2; |
| 52 | }; |
| 53 | |
| 54 | memory { |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 55 | reg = <0x0 0x0 0x0 0x80000000>; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 56 | device_type = "memory"; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 57 | }; |
| 58 | |
| 59 | vcc_sd: sdmmc-regulator { |
| 60 | compatible = "regulator-fixed"; |
| 61 | gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>; |
| 62 | pinctrl-names = "default"; |
| 63 | pinctrl-0 = <&sdmmc_pwr>; |
| 64 | regulator-name = "vcc_sd"; |
| 65 | regulator-min-microvolt = <3300000>; |
| 66 | regulator-max-microvolt = <3300000>; |
| 67 | startup-delay-us = <100000>; |
| 68 | vin-supply = <&vcc_io>; |
| 69 | }; |
| 70 | |
| 71 | vcc_sys: vsys-regulator { |
| 72 | compatible = "regulator-fixed"; |
| 73 | regulator-name = "vcc_sys"; |
| 74 | regulator-min-microvolt = <5000000>; |
| 75 | regulator-max-microvolt = <5000000>; |
| 76 | regulator-always-on; |
| 77 | regulator-boot-on; |
| 78 | }; |
| 79 | }; |
| 80 | |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 81 | &cpu0 { |
| 82 | cpu0-supply = <&vdd_cpu>; |
| 83 | }; |
| 84 | |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 85 | &gpu { |
| 86 | mali-supply = <&vdd_gpu>; |
| 87 | status = "okay"; |
| 88 | }; |
| 89 | |
| 90 | &hdmi { |
| 91 | ddc-i2c-bus = <&i2c2>; |
| 92 | status = "okay"; |
| 93 | }; |
| 94 | |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 95 | &i2c0 { |
| 96 | clock-frequency = <400000>; |
| 97 | status = "okay"; |
| 98 | |
| 99 | rk808: pmic@1b { |
| 100 | compatible = "rockchip,rk808"; |
| 101 | reg = <0x1b>; |
| 102 | interrupt-parent = <&gpio0>; |
| 103 | interrupts = <RK_PA4 IRQ_TYPE_LEVEL_LOW>; |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 104 | #clock-cells = <1>; |
| 105 | clock-output-names = "xin32k", "rk808-clkout2"; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 106 | pinctrl-names = "default"; |
| 107 | pinctrl-0 = <&pmic_int &global_pwroff>; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 108 | rockchip,system-power-controller; |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 109 | wakeup-source; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 110 | |
| 111 | vcc1-supply = <&vcc_sys>; |
| 112 | vcc2-supply = <&vcc_sys>; |
| 113 | vcc3-supply = <&vcc_sys>; |
| 114 | vcc4-supply = <&vcc_sys>; |
| 115 | vcc6-supply = <&vcc_sys>; |
| 116 | vcc7-supply = <&vcc_sys>; |
| 117 | vcc8-supply = <&vcc_io>; |
| 118 | vcc9-supply = <&vcc_sys>; |
| 119 | vcc10-supply = <&vcc_sys>; |
| 120 | vcc11-supply = <&vcc_sys>; |
| 121 | vcc12-supply = <&vcc_io>; |
| 122 | |
| 123 | regulators { |
| 124 | vdd_cpu: vdd_log: DCDC_REG1 { |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 125 | regulator-name = "vdd_log"; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 126 | regulator-min-microvolt = <750000>; |
| 127 | regulator-max-microvolt = <1350000>; |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 128 | regulator-always-on; |
| 129 | regulator-boot-on; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 130 | regulator-state-mem { |
| 131 | regulator-off-in-suspend; |
| 132 | }; |
| 133 | }; |
| 134 | |
| 135 | vdd_gpu: DCDC_REG2 { |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 136 | regulator-name = "vdd_gpu"; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 137 | regulator-min-microvolt = <850000>; |
| 138 | regulator-max-microvolt = <1250000>; |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 139 | regulator-always-on; |
| 140 | regulator-boot-on; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 141 | regulator-state-mem { |
| 142 | regulator-on-in-suspend; |
| 143 | regulator-suspend-microvolt = <1000000>; |
| 144 | }; |
| 145 | }; |
| 146 | |
| 147 | vcc_ddr: DCDC_REG3 { |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 148 | regulator-name = "vcc_ddr"; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 149 | regulator-always-on; |
| 150 | regulator-boot-on; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 151 | regulator-state-mem { |
| 152 | regulator-on-in-suspend; |
| 153 | }; |
| 154 | }; |
| 155 | |
| 156 | vcc_io: DCDC_REG4 { |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 157 | regulator-name = "vcc_io"; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 158 | regulator-min-microvolt = <3300000>; |
| 159 | regulator-max-microvolt = <3300000>; |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 160 | regulator-always-on; |
| 161 | regulator-boot-on; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 162 | regulator-state-mem { |
| 163 | regulator-on-in-suspend; |
| 164 | regulator-suspend-microvolt = <3300000>; |
| 165 | }; |
| 166 | }; |
| 167 | |
| 168 | vcca_tp: LDO_REG1 { |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 169 | regulator-name = "vcc_tp"; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 170 | regulator-min-microvolt = <3300000>; |
| 171 | regulator-max-microvolt = <3300000>; |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 172 | regulator-always-on; |
| 173 | regulator-boot-on; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 174 | regulator-state-mem { |
| 175 | regulator-on-in-suspend; |
| 176 | regulator-suspend-microvolt = <3300000>; |
| 177 | }; |
| 178 | }; |
| 179 | |
| 180 | vcc_codec: LDO_REG2 { |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 181 | regulator-name = "vcc_codec"; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 182 | regulator-min-microvolt = <3300000>; |
| 183 | regulator-max-microvolt = <3300000>; |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 184 | regulator-always-on; |
| 185 | regulator-boot-on; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 186 | regulator-state-mem { |
| 187 | regulator-off-in-suspend; |
| 188 | }; |
| 189 | }; |
| 190 | |
| 191 | vdd_10: LDO_REG3 { |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 192 | regulator-name = "vdd_10"; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 193 | regulator-min-microvolt = <1000000>; |
| 194 | regulator-max-microvolt = <1000000>; |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 195 | regulator-always-on; |
| 196 | regulator-boot-on; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 197 | regulator-state-mem { |
| 198 | regulator-on-in-suspend; |
| 199 | regulator-suspend-microvolt = <1000000>; |
| 200 | }; |
| 201 | }; |
| 202 | |
| 203 | vcc_gps: LDO_REG4 { |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 204 | regulator-name = "vcc_gps"; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 205 | regulator-min-microvolt = <1800000>; |
| 206 | regulator-max-microvolt = <1800000>; |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 207 | regulator-always-on; |
| 208 | regulator-boot-on; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 209 | regulator-state-mem { |
| 210 | regulator-on-in-suspend; |
| 211 | regulator-suspend-microvolt = <1800000>; |
| 212 | }; |
| 213 | }; |
| 214 | |
| 215 | vccio_sd: LDO_REG5 { |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 216 | regulator-name = "vccio_sd"; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 217 | regulator-min-microvolt = <1800000>; |
| 218 | regulator-max-microvolt = <3300000>; |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 219 | regulator-always-on; |
| 220 | regulator-boot-on; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 221 | regulator-state-mem { |
| 222 | regulator-on-in-suspend; |
| 223 | regulator-suspend-microvolt = <3300000>; |
| 224 | }; |
| 225 | }; |
| 226 | |
| 227 | vcc10_lcd: LDO_REG6 { |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 228 | regulator-name = "vcc10_lcd"; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 229 | regulator-min-microvolt = <1000000>; |
| 230 | regulator-max-microvolt = <1000000>; |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 231 | regulator-always-on; |
| 232 | regulator-boot-on; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 233 | regulator-state-mem { |
| 234 | regulator-on-in-suspend; |
| 235 | regulator-suspend-microvolt = <1800000>; |
| 236 | }; |
| 237 | }; |
| 238 | |
| 239 | vcc_18: LDO_REG7 { |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 240 | regulator-name = "vcc_18"; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 241 | regulator-min-microvolt = <1800000>; |
| 242 | regulator-max-microvolt = <1800000>; |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 243 | regulator-always-on; |
| 244 | regulator-boot-on; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 245 | regulator-state-mem { |
| 246 | regulator-on-in-suspend; |
| 247 | regulator-suspend-microvolt = <1800000>; |
| 248 | }; |
| 249 | }; |
| 250 | |
| 251 | vcc18_lcd: LDO_REG8 { |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 252 | regulator-name = "vcc18_lcd"; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 253 | regulator-min-microvolt = <1800000>; |
| 254 | regulator-max-microvolt = <1800000>; |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 255 | regulator-always-on; |
| 256 | regulator-boot-on; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 257 | regulator-state-mem { |
| 258 | regulator-on-in-suspend; |
| 259 | regulator-suspend-microvolt = <1800000>; |
| 260 | }; |
| 261 | }; |
| 262 | |
| 263 | vcc33_sd: SWITCH_REG1 { |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 264 | regulator-name = "vcc33_sd"; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 265 | regulator-min-microvolt = <3300000>; |
| 266 | regulator-max-microvolt = <3300000>; |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 267 | regulator-always-on; |
| 268 | regulator-boot-on; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 269 | regulator-state-mem { |
| 270 | regulator-on-in-suspend; |
| 271 | }; |
| 272 | }; |
| 273 | |
| 274 | vcc_lan: SWITCH_REG2 { |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 275 | regulator-name = "vcc_lan"; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 276 | regulator-min-microvolt = <3300000>; |
| 277 | regulator-max-microvolt = <3300000>; |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 278 | regulator-always-on; |
| 279 | regulator-boot-on; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 280 | regulator-state-mem { |
| 281 | regulator-on-in-suspend; |
| 282 | }; |
| 283 | }; |
| 284 | }; |
| 285 | }; |
| 286 | }; |
| 287 | |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 288 | &i2c2 { |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 289 | status = "okay"; |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 290 | }; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 291 | |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 292 | &sdmmc { |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 293 | bus-width = <4>; |
| 294 | cap-mmc-highspeed; |
| 295 | cap-sd-highspeed; |
| 296 | card-detect-delay = <200>; |
| 297 | disable-wp; |
| 298 | pinctrl-names = "default"; |
| 299 | pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>; |
| 300 | vmmc-supply = <&vcc_sd>; |
| 301 | vqmmc-supply = <&vccio_sd>; |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 302 | status = "okay"; |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 303 | }; |
| 304 | |
| 305 | &uart2 { |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 306 | status = "okay"; |
| 307 | }; |
| 308 | |
| 309 | &vopb { |
| 310 | status = "okay"; |
| 311 | }; |
| 312 | |
| 313 | &vopb_mmu { |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 314 | status = "okay"; |
| 315 | }; |
| 316 | |
Jagan Teki | f233c43 | 2018-02-14 21:26:14 +0530 | [diff] [blame^] | 317 | &vopl { |
| 318 | status = "okay"; |
| 319 | }; |
| 320 | |
| 321 | &vopl_mmu { |
| 322 | status = "okay"; |
| 323 | }; |
| 324 | |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 325 | &wdt { |
| 326 | status = "okay"; |
| 327 | }; |
| 328 | |
| 329 | &pinctrl { |
Jagan Teki | 59ea618 | 2017-09-12 17:15:47 +0530 | [diff] [blame] | 330 | pmic { |
| 331 | pmic_int: pmic-int { |
| 332 | rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>; |
| 333 | }; |
| 334 | }; |
| 335 | |
| 336 | sdmmc { |
| 337 | sdmmc_pwr: sdmmc-pwr { |
| 338 | rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>; |
| 339 | }; |
| 340 | }; |
| 341 | }; |