1/* 2 * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd 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 45#include "rk322x.dtsi" 46#include "rk3229-cpu-opp.dtsi" 47#include "rk322x-android.dtsi" 48 49/ { 50 model = "RK3229 GOOGLE VOICE ASSISTANT SDK Board"; 51 compatible = "rockchip,rk3229-gva-sdk", "rockchip,rk3229"; 52 53 sdio_pwrseq: sdio-pwrseq { 54 compatible = "mmc-pwrseq-simple"; 55 clocks = <&rk805 1>; 56 clock-names = "ext_clock"; 57 pinctrl-names = "default"; 58 pinctrl-0 = <&wifi_enable_h>; 59 60 /* 61 * On the module itself this is one of these (depending 62 * on the actual card populated): 63 * - SDIO_RESET_L_WL_REG_ON 64 * - PDN (power down when low) 65 */ 66 reset-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>; /* GPIO3_B7 */ 67 }; 68 69 wireless-bluetooth { 70 compatible = "bluetooth-platdata"; 71 clocks = <&rk805 1>; 72 clock-names = "ext_clock"; 73 uart_rts_gpios = <&gpio3 6 GPIO_ACTIVE_LOW>; 74 pinctrl-names = "default", "rts_gpio"; 75 pinctrl-0 = <&uart11_rts>; 76 pinctrl-1 = <&uart11_rts_gpio>; 77 BT,reset_gpio = <&gpio2 29 GPIO_ACTIVE_HIGH>; 78 BT,wake_gpio = <&gpio3 27 GPIO_ACTIVE_HIGH>; 79 BT,wake_host_irq = <&gpio3 26 GPIO_ACTIVE_HIGH>; 80 status = "okay"; 81 }; 82 83 wireless-wlan { 84 compatible = "wlan-platdata"; 85 rockchip,grf = <&grf>; 86 wifi_chip_type = "ap6255"; 87 WIFI,host_wake_irq = <&gpio0 28 GPIO_ACTIVE_HIGH>; 88 status = "okay"; 89 }; 90 91 gpio_keys { 92 compatible = "gpio-keys"; 93 #address-cells = <1>; 94 #size-cells = <0>; 95 autorepeat; 96 97 pinctrl-names = "default"; 98 pinctrl-0 = <&pwr_key &bt_key &mute_key>; 99 100 power_key { 101 label = "GPIO Key Power"; 102 gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>; 103 linux,code = <116>; 104 debounce-interval = <100>; 105 wakeup-source; 106 }; 107 108 bt_key { 109 label = "Blutooth Key"; 110 gpios = <&gpio3 31 GPIO_ACTIVE_HIGH>; 111 linux,code = <237>; 112 debounce-interval = <100>; 113 }; 114 115 mute_key { 116 label = "Mute Key"; 117 gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>; 118 linux,code = <113>; 119 debounce-interval = <100>; 120 }; 121 }; 122 123 gva_codec: gva-codec { 124 compatible = "rockchip,gva-codec"; 125 #sound-dai-cells = <0>; 126 status = "okay"; 127 }; 128 129 gva-sound { 130 compatible = "simple-audio-card"; 131 simple-audio-card,format = "i2s"; 132 simple-audio-card,name = "rockchip,rk3229-dummy"; 133 simple-audio-card,mclk-fs = <256>; 134 simple-audio-card,cpu { 135 sound-dai = <&i2s1>; 136 }; 137 simple-audio-card,codec { 138 sound-dai = <&gva_codec>; 139 }; 140 }; 141 142 vcc_otg_vbus: otg-vbus-regulator { 143 compatible = "regulator-fixed"; 144 gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; 145 pinctrl-names = "default"; 146 pinctrl-0 = <&otg_vbus_drv>; 147 regulator-name = "vcc_otg_vbus"; 148 regulator-min-microvolt = <5000000>; 149 regulator-max-microvolt = <5000000>; 150 enable-active-high; 151 }; 152 153 xin32k: xin32k { 154 compatible = "fixed-clock"; 155 clock-frequency = <32768>; 156 clock-output-names = "xin32k"; 157 #clock-cells = <0>; 158 }; 159}; 160 161&firmware_android { 162 compatible = "android,firmware"; 163 fstab { 164 compatible = "android,fstab"; 165 system { 166 compatible = "android,system"; 167 dev = "/dev/block/by-name/system"; 168 type = "ext4"; 169 mnt_flags = "ro,barrier=1,inode_readahead_blks=8"; 170 fsmgr_flags = "wait,verify"; 171 }; 172 vendor { 173 compatible = "android,vendor"; 174 dev = "/dev/block/by-name/vendor"; 175 type = "ext4"; 176 mnt_flags = "ro,barrier=1,inode_readahead_blks=8"; 177 fsmgr_flags = "wait,verify"; 178 }; 179 }; 180}; 181 182&gpu { 183 status = "okay"; 184 mali-supply = <&vdd_logic>; 185}; 186 187&nandc { 188 status = "disabled"; 189}; 190 191&emmc { 192 max-frequency = <125000000>; 193 cap-mmc-highspeed; 194 mmc-ddr-1_8v; 195 non-removable; 196 no-sdio; 197 no-sd; 198 status = "okay"; 199}; 200 201&i2c0 { 202 status = "okay"; 203 204 rk805: rk805@18 { 205 compatible = "rockchip,rk805"; 206 status = "okay"; 207 reg = <0x18>; 208 interrupt-parent = <&gpio1>; 209 interrupts = <12 IRQ_TYPE_LEVEL_LOW>; 210 spinctrl-names = "default"; 211 pinctrl-0 = <&pmic_int_l>; 212 rockchip,system-power-controller; 213 wakeup-source; 214 gpio-controller; 215 #gpio-cells = <2>; 216 #clock-cells = <1>; 217 clock-output-names = "rk805-clkout1", "rk805-clkout2"; 218 219 rtc { 220 status = "okay"; 221 }; 222 223 pwrkey { 224 status = "okay"; 225 }; 226 227 gpio { 228 status = "okay"; 229 }; 230 231 regulators { 232 vdd_arm: DCDC_REG1 { 233 regulator-name = "vdd_arm"; 234 regulator-min-microvolt = <712500>; 235 regulator-max-microvolt = <1450000>; 236 regulator-initial-mode = <0x1>; 237 regulator-ramp-delay = <12500>; 238 regulator-boot-on; 239 regulator-always-on; 240 regulator-state-mem { 241 regulator-mode = <0x2>; 242 regulator-on-in-suspend; 243 regulator-suspend-microvolt = <950000>; 244 }; 245 }; 246 247 vdd_logic: DCDC_REG2 { 248 regulator-name = "vdd_logic"; 249 regulator-min-microvolt = <712500>; 250 regulator-max-microvolt = <1450000>; 251 regulator-initial-mode = <0x1>; 252 regulator-ramp-delay = <12500>; 253 regulator-boot-on; 254 regulator-always-on; 255 regulator-state-mem { 256 regulator-mode = <0x2>; 257 regulator-on-in-suspend; 258 regulator-suspend-microvolt = <1000000>; 259 }; 260 }; 261 262 vcc_ddr: DCDC_REG3 { 263 regulator-name = "vcc_ddr"; 264 regulator-boot-on; 265 regulator-always-on; 266 regulator-state-mem { 267 regulator-mode = <0x2>; 268 regulator-on-in-suspend; 269 }; 270 }; 271 272 vcc_io: DCDC_REG4 { 273 regulator-name = "vcc_io"; 274 regulator-min-microvolt = <3300000>; 275 regulator-max-microvolt = <3300000>; 276 regulator-initial-mode = <0x1>; 277 regulator-boot-on; 278 regulator-always-on; 279 regulator-state-mem { 280 regulator-mode = <0x2>; 281 regulator-on-in-suspend; 282 regulator-suspend-microvolt = <3300000>; 283 }; 284 }; 285 286 vcc_18: LDO_REG1 { 287 regulator-name = "vcc_18"; 288 regulator-min-microvolt = <1800000>; 289 regulator-max-microvolt = <1800000>; 290 regulator-boot-on; 291 regulator-always-on; 292 regulator-state-mem { 293 regulator-on-in-suspend; 294 regulator-suspend-microvolt = <1800000>; 295 }; 296 }; 297 298 vcc_18emmc: LDO_REG2 { 299 regulator-name = "vcc_18emmc"; 300 regulator-min-microvolt = <1800000>; 301 regulator-max-microvolt = <1800000>; 302 regulator-boot-on; 303 regulator-always-on; 304 regulator-state-mem { 305 regulator-on-in-suspend; 306 regulator-suspend-microvolt = <1800000>; 307 }; 308 }; 309 310 vdd_10: LDO_REG3 { 311 regulator-name = "vdd_10"; 312 regulator-min-microvolt = <1000000>; 313 regulator-max-microvolt = <1000000>; 314 regulator-boot-on; 315 regulator-always-on; 316 regulator-state-mem { 317 regulator-on-in-suspend; 318 regulator-suspend-microvolt = <1000000>; 319 }; 320 }; 321 }; 322 }; 323}; 324 325&i2c1 { 326 status = "okay"; 327 ts@8 { 328 compatible = "cypress,cy8c4024"; 329 reg = <0x8>; 330 interrupt-parent = <&gpio1>; 331 interrupts = <RK_PA1 IRQ_TYPE_LEVEL_LOW>; 332 status = "okay"; 333 }; 334}; 335 336&i2c2 { 337 status = "okay"; 338 339 cw2015@62 { 340 status = "okay"; 341 compatible = "cw201x"; 342 reg = <0x62>; 343 bat_config_info = <0x15 0x42 0x60 0x59 0x52 0x58 0x4D 0x48 0x48 0x44 0x44 0x46 0x49 0x48 0x32 344 0x24 0x20 0x17 0x13 0x0F 0x19 0x3E 0x51 0x45 0x08 0x76 0x0B 0x85 0x0E 0x1C 0x2E 0x3E 0x4D 0x52 0x52 345 0x57 0x3D 0x1B 0x6A 0x2D 0x25 0x43 0x52 0x87 0x8F 0x91 0x94 0x52 0x82 0x8C 0x92 0x96 0xFF 0x7B 0xBB 346 0xCB 0x2F 0x7D 0x72 0xA5 0xB5 0xC1 0x46 0xAE>; 347 monitor_sec = <5>; 348 virtual_power = <0>; 349 divider_res1 = <200>; 350 divider_res2 = <200>; 351 }; 352}; 353 354&i2s1 { 355 status = "okay"; 356 rockchip,i2s-broken-burst-len; 357 rockchip,playback-channels = <8>; 358 rockchip,capture-channels = <8>; 359 rockchip,bclk-fs = <64>; 360 #sound-dai-cells = <0>; 361}; 362 363&cpu0 { 364 cpu-supply = <&vdd_arm>; 365}; 366 367&io_domains { 368 status = "okay"; 369 370 vccio1-supply = <&vcc_io>; 371 vccio2-supply = <&vcc_18>; 372 vccio4-supply = <&vcc_io>; 373}; 374 375&pinctrl { 376 keys { 377 pwr_key: pwr-key { 378 rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>; 379 }; 380 381 bt_key: bt-key { 382 rockchip,pins = <3 RK_PD7 RK_FUNC_GPIO &pcfg_pull_down>; 383 }; 384 385 mute_key: mute-key { 386 rockchip,pins = <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_down>; 387 }; 388 }; 389 390 pmic { 391 pmic_int_l: pmic-int-l { 392 rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>; /* gpio1_b4 */ 393 }; 394 }; 395 396 sdio-pwrseq { 397 wifi_enable_h: wifi-enable-h { 398 rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; 399 }; 400 }; 401 402 usb { 403 otg_vbus_drv: otg-vbus-drv { 404 rockchip,pins = <3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; 405 }; 406 }; 407}; 408 409&sdio { 410 max-frequency = <150000000>; 411 mmc-pwrseq = <&sdio_pwrseq>; 412 num-slots = <1>; 413 sd-uhs-sdr104; 414 status = "okay"; 415}; 416 417&rockchip_suspend { 418 rockchip,sleep-mode-config = < 419 (0 420 |RKPM_CTR_GTCLKS 421 |RKPM_CTR_IDLESRAM_MD 422 |RKPM_CTR_PMIC 423 ) 424 >; 425}; 426 427&u2phy0_otg { 428 vbus-supply = <&vcc_otg_vbus>; 429}; 430