1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) << 2 /* 1 /* 3 * Copyright (c) 2015 Heiko Stuebner <heiko@snt 2 * Copyright (c) 2015 Heiko Stuebner <heiko@sntech.de> >> 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. 4 */ 41 */ 5 42 6 /dts-v1/; 43 /dts-v1/; 7 #include "rk3368.dtsi" 44 #include "rk3368.dtsi" 8 #include <dt-bindings/input/input.h> 45 #include <dt-bindings/input/input.h> 9 46 10 / { 47 / { 11 model = "Rockchip R88"; 48 model = "Rockchip R88"; 12 compatible = "rockchip,r88", "rockchip 49 compatible = "rockchip,r88", "rockchip,rk3368"; 13 50 14 aliases { << 15 ethernet0 = &gmac; << 16 mmc0 = &sdio0; << 17 mmc1 = &emmc; << 18 }; << 19 << 20 chosen { 51 chosen { 21 stdout-path = "serial2:115200n 52 stdout-path = "serial2:115200n8"; 22 }; 53 }; 23 54 24 memory@0 { !! 55 memory { 25 device_type = "memory"; 56 device_type = "memory"; 26 reg = <0x0 0x0 0x0 0x40000000> 57 reg = <0x0 0x0 0x0 0x40000000>; 27 }; 58 }; 28 59 29 emmc_pwrseq: emmc-pwrseq { 60 emmc_pwrseq: emmc-pwrseq { 30 compatible = "mmc-pwrseq-emmc" 61 compatible = "mmc-pwrseq-emmc"; 31 pinctrl-0 = <&emmc_reset>; 62 pinctrl-0 = <&emmc_reset>; 32 pinctrl-names = "default"; 63 pinctrl-names = "default"; 33 reset-gpios = <&gpio2 RK_PA3 G 64 reset-gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>; 34 }; 65 }; 35 66 36 keys: gpio-keys { 67 keys: gpio-keys { 37 compatible = "gpio-keys"; 68 compatible = "gpio-keys"; 38 pinctrl-names = "default"; 69 pinctrl-names = "default"; 39 pinctrl-0 = <&pwr_key>; 70 pinctrl-0 = <&pwr_key>; 40 71 41 key-power { !! 72 power { 42 wakeup-source; 73 wakeup-source; 43 gpios = <&gpio0 RK_PA2 74 gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; 44 label = "GPIO Power"; 75 label = "GPIO Power"; 45 linux,code = <KEY_POWE 76 linux,code = <KEY_POWER>; 46 }; 77 }; 47 }; 78 }; 48 79 49 leds: gpio-leds { 80 leds: gpio-leds { 50 compatible = "gpio-leds"; 81 compatible = "gpio-leds"; 51 82 52 work_led: led-0 { !! 83 work { 53 gpios = <&gpio3 RK_PD5 84 gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; 54 label = "r88:green:led 85 label = "r88:green:led"; 55 pinctrl-names = "defau 86 pinctrl-names = "default"; 56 pinctrl-0 = <&led_ctl> 87 pinctrl-0 = <&led_ctl>; 57 }; 88 }; 58 }; 89 }; 59 90 60 ir: ir-receiver { 91 ir: ir-receiver { 61 compatible = "gpio-ir-receiver 92 compatible = "gpio-ir-receiver"; 62 gpios = <&gpio3 RK_PD6 GPIO_AC 93 gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_LOW>; 63 pinctrl-names = "default"; 94 pinctrl-names = "default"; 64 pinctrl-0 = <&ir_int>; 95 pinctrl-0 = <&ir_int>; 65 }; 96 }; 66 97 67 sdio_pwrseq: sdio-pwrseq { 98 sdio_pwrseq: sdio-pwrseq { 68 compatible = "mmc-pwrseq-simpl 99 compatible = "mmc-pwrseq-simple"; 69 clocks = <&hym8563>; 100 clocks = <&hym8563>; 70 clock-names = "ext_clock"; 101 clock-names = "ext_clock"; 71 pinctrl-names = "default"; 102 pinctrl-names = "default"; 72 pinctrl-0 = <&bt_rst>, <&wifi_ 103 pinctrl-0 = <&bt_rst>, <&wifi_reg_on>; 73 104 74 reset-gpios = 105 reset-gpios = 75 /* BT_RST_N */ 106 /* BT_RST_N */ 76 <&gpio3 RK_PA5 GPIO_AC 107 <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>, 77 108 78 /* WL_REG_ON */ 109 /* WL_REG_ON */ 79 <&gpio3 RK_PA4 GPIO_AC 110 <&gpio3 RK_PA4 GPIO_ACTIVE_LOW>; 80 }; 111 }; 81 112 82 vcc_18: vcc18-regulator { 113 vcc_18: vcc18-regulator { 83 compatible = "regulator-fixed" 114 compatible = "regulator-fixed"; 84 regulator-name = "vcc_18"; 115 regulator-name = "vcc_18"; 85 regulator-min-microvolt = <180 116 regulator-min-microvolt = <1800000>; 86 regulator-max-microvolt = <180 117 regulator-max-microvolt = <1800000>; 87 regulator-always-on; 118 regulator-always-on; 88 regulator-boot-on; 119 regulator-boot-on; 89 vin-supply = <&vcc_sys>; 120 vin-supply = <&vcc_sys>; 90 }; 121 }; 91 122 92 /* supplies both host and otg */ 123 /* supplies both host and otg */ 93 vcc_host: vcc-host-regulator { 124 vcc_host: vcc-host-regulator { 94 compatible = "regulator-fixed" 125 compatible = "regulator-fixed"; 95 enable-active-high; 126 enable-active-high; 96 gpio = <&gpio0 RK_PA4 GPIO_ACT 127 gpio = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>; 97 pinctrl-names = "default"; 128 pinctrl-names = "default"; 98 pinctrl-0 = <&host_vbus_drv>; 129 pinctrl-0 = <&host_vbus_drv>; 99 regulator-name = "vcc_host"; 130 regulator-name = "vcc_host"; 100 regulator-always-on; 131 regulator-always-on; 101 regulator-boot-on; 132 regulator-boot-on; 102 vin-supply = <&vcc_sys>; 133 vin-supply = <&vcc_sys>; 103 }; 134 }; 104 135 105 vcc_io: vcc-io-regulator { 136 vcc_io: vcc-io-regulator { 106 compatible = "regulator-fixed" 137 compatible = "regulator-fixed"; 107 regulator-name = "vcc_io"; 138 regulator-name = "vcc_io"; 108 regulator-min-microvolt = <330 139 regulator-min-microvolt = <3300000>; 109 regulator-max-microvolt = <330 140 regulator-max-microvolt = <3300000>; 110 regulator-always-on; 141 regulator-always-on; 111 regulator-boot-on; 142 regulator-boot-on; 112 vin-supply = <&vcc_sys>; 143 vin-supply = <&vcc_sys>; 113 }; 144 }; 114 145 115 vcc_lan: vcc-lan-regulator { 146 vcc_lan: vcc-lan-regulator { 116 compatible = "regulator-fixed" 147 compatible = "regulator-fixed"; 117 regulator-name = "vcc_lan"; 148 regulator-name = "vcc_lan"; 118 regulator-min-microvolt = <330 149 regulator-min-microvolt = <3300000>; 119 regulator-max-microvolt = <330 150 regulator-max-microvolt = <3300000>; 120 regulator-always-on; 151 regulator-always-on; 121 regulator-boot-on; 152 regulator-boot-on; 122 vin-supply = <&vcc_io>; 153 vin-supply = <&vcc_io>; 123 }; 154 }; 124 155 125 vcc_sys: vcc-sys-regulator { 156 vcc_sys: vcc-sys-regulator { 126 compatible = "regulator-fixed" 157 compatible = "regulator-fixed"; 127 regulator-name = "vcc_sys"; 158 regulator-name = "vcc_sys"; 128 regulator-min-microvolt = <500 159 regulator-min-microvolt = <5000000>; 129 regulator-max-microvolt = <500 160 regulator-max-microvolt = <5000000>; 130 regulator-always-on; 161 regulator-always-on; 131 regulator-boot-on; 162 regulator-boot-on; 132 }; 163 }; 133 164 134 vccio_wl: vccio-wl-regulator { 165 vccio_wl: vccio-wl-regulator { 135 compatible = "regulator-fixed" 166 compatible = "regulator-fixed"; 136 regulator-name = "vccio_wl"; 167 regulator-name = "vccio_wl"; 137 regulator-min-microvolt = <330 168 regulator-min-microvolt = <3300000>; 138 regulator-max-microvolt = <330 169 regulator-max-microvolt = <3300000>; 139 regulator-always-on; 170 regulator-always-on; 140 regulator-boot-on; 171 regulator-boot-on; 141 vin-supply = <&vcc_io>; 172 vin-supply = <&vcc_io>; 142 }; 173 }; 143 174 144 vdd_10: vdd-10-regulator { 175 vdd_10: vdd-10-regulator { 145 compatible = "regulator-fixed" 176 compatible = "regulator-fixed"; 146 regulator-name = "vdd_10"; 177 regulator-name = "vdd_10"; 147 regulator-min-microvolt = <100 178 regulator-min-microvolt = <1000000>; 148 regulator-max-microvolt = <100 179 regulator-max-microvolt = <1000000>; 149 regulator-always-on; 180 regulator-always-on; 150 regulator-boot-on; 181 regulator-boot-on; 151 vin-supply = <&vcc_sys>; 182 vin-supply = <&vcc_sys>; 152 }; 183 }; 153 }; 184 }; 154 185 155 &emmc { 186 &emmc { 156 bus-width = <8>; 187 bus-width = <8>; 157 cap-mmc-highspeed; 188 cap-mmc-highspeed; >> 189 disable-wp; 158 mmc-pwrseq = <&emmc_pwrseq>; 190 mmc-pwrseq = <&emmc_pwrseq>; 159 non-removable; 191 non-removable; 160 pinctrl-names = "default"; 192 pinctrl-names = "default"; 161 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc 193 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>; 162 status = "okay"; 194 status = "okay"; 163 }; 195 }; 164 196 165 &gmac { 197 &gmac { 166 phy-supply = <&vcc_lan>; 198 phy-supply = <&vcc_lan>; 167 phy-mode = "rmii"; 199 phy-mode = "rmii"; 168 clock_in_out = "output"; 200 clock_in_out = "output"; 169 snps,reset-gpio = <&gpio3 RK_PB4 GPIO_ 201 snps,reset-gpio = <&gpio3 RK_PB4 GPIO_ACTIVE_HIGH>; 170 snps,reset-active-low; 202 snps,reset-active-low; 171 snps,reset-delays-us = <0 10000 100000 203 snps,reset-delays-us = <0 10000 1000000>; 172 pinctrl-names = "default"; 204 pinctrl-names = "default"; 173 pinctrl-0 = <&rmii_pins>; 205 pinctrl-0 = <&rmii_pins>; 174 tx_delay = <0x30>; 206 tx_delay = <0x30>; 175 rx_delay = <0x10>; 207 rx_delay = <0x10>; 176 status = "okay"; !! 208 status = "ok"; 177 }; 209 }; 178 210 179 &i2c0 { 211 &i2c0 { 180 status = "okay"; 212 status = "okay"; 181 213 182 vdd_cpu: syr827@40 { 214 vdd_cpu: syr827@40 { 183 compatible = "silergy,syr827"; 215 compatible = "silergy,syr827"; 184 reg = <0x40>; 216 reg = <0x40>; 185 fcs,suspend-voltage-selector = 217 fcs,suspend-voltage-selector = <1>; 186 regulator-name = "vdd_cpu"; 218 regulator-name = "vdd_cpu"; 187 regulator-enable-ramp-delay = 219 regulator-enable-ramp-delay = <300>; 188 regulator-min-microvolt = <712 220 regulator-min-microvolt = <712500>; 189 regulator-max-microvolt = <150 221 regulator-max-microvolt = <1500000>; 190 regulator-ramp-delay = <8000>; 222 regulator-ramp-delay = <8000>; 191 regulator-always-on; 223 regulator-always-on; 192 regulator-boot-on; 224 regulator-boot-on; 193 vin-supply = <&vcc_sys>; 225 vin-supply = <&vcc_sys>; 194 }; 226 }; 195 227 196 hym8563: rtc@51 { !! 228 hym8563: hym8563@51 { 197 compatible = "haoyu,hym8563"; 229 compatible = "haoyu,hym8563"; 198 reg = <0x51>; 230 reg = <0x51>; 199 #clock-cells = <0>; 231 #clock-cells = <0>; >> 232 clock-frequency = <32768>; 200 clock-output-names = "xin32k"; 233 clock-output-names = "xin32k"; 201 /* rtc_int is not connected */ 234 /* rtc_int is not connected */ 202 }; 235 }; 203 }; 236 }; 204 237 205 &io_domains { 238 &io_domains { 206 status = "okay"; !! 239 status = "ok"; 207 240 208 audio-supply = <&vcc_io>; 241 audio-supply = <&vcc_io>; 209 gpio30-supply = <&vcc_io>; 242 gpio30-supply = <&vcc_io>; 210 gpio1830-supply = <&vcc_io>; 243 gpio1830-supply = <&vcc_io>; 211 wifi-supply = <&vccio_wl>; 244 wifi-supply = <&vccio_wl>; 212 }; 245 }; 213 246 214 &sdio0 { 247 &sdio0 { 215 assigned-clocks = <&cru SCLK_SDIO0>; 248 assigned-clocks = <&cru SCLK_SDIO0>; 216 assigned-clock-parents = <&cru PLL_CPL 249 assigned-clock-parents = <&cru PLL_CPLL>; 217 bus-width = <4>; 250 bus-width = <4>; 218 cap-sd-highspeed; 251 cap-sd-highspeed; 219 cap-sdio-irq; 252 cap-sdio-irq; 220 keep-power-in-suspend; 253 keep-power-in-suspend; 221 mmc-pwrseq = <&sdio_pwrseq>; 254 mmc-pwrseq = <&sdio_pwrseq>; 222 non-removable; 255 non-removable; 223 pinctrl-names = "default"; 256 pinctrl-names = "default"; 224 pinctrl-0 = <&sdio0_clk &sdio0_cmd &sd 257 pinctrl-0 = <&sdio0_clk &sdio0_cmd &sdio0_bus4>; 225 vmmc-supply = <&vcc_io>; 258 vmmc-supply = <&vcc_io>; 226 vqmmc-supply = <&vccio_wl>; 259 vqmmc-supply = <&vccio_wl>; 227 status = "okay"; 260 status = "okay"; 228 }; 261 }; 229 262 230 &pinctrl { 263 &pinctrl { 231 pcfg_pull_none_drv_8ma: pcfg-pull-none 264 pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma { 232 bias-disable; 265 bias-disable; 233 drive-strength = <8>; 266 drive-strength = <8>; 234 }; 267 }; 235 268 236 pcfg_pull_up_drv_8ma: pcfg-pull-up-drv 269 pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma { 237 bias-pull-up; 270 bias-pull-up; 238 drive-strength = <8>; 271 drive-strength = <8>; 239 }; 272 }; 240 273 241 emmc { 274 emmc { 242 emmc_bus8: emmc-bus8 { 275 emmc_bus8: emmc-bus8 { 243 rockchip,pins = <1 RK_ !! 276 rockchip,pins = <1 18 RK_FUNC_2 &pcfg_pull_up_drv_8ma>, 244 <1 RK_ !! 277 <1 19 RK_FUNC_2 &pcfg_pull_up_drv_8ma>, 245 <1 RK_ !! 278 <1 20 RK_FUNC_2 &pcfg_pull_up_drv_8ma>, 246 <1 RK_ !! 279 <1 21 RK_FUNC_2 &pcfg_pull_up_drv_8ma>, 247 <1 RK_ !! 280 <1 22 RK_FUNC_2 &pcfg_pull_up_drv_8ma>, 248 <1 RK_ !! 281 <1 23 RK_FUNC_2 &pcfg_pull_up_drv_8ma>, 249 <1 RK_ !! 282 <1 24 RK_FUNC_2 &pcfg_pull_up_drv_8ma>, 250 <1 RK_ !! 283 <1 25 RK_FUNC_2 &pcfg_pull_up_drv_8ma>; 251 }; 284 }; 252 285 253 emmc-clk { 286 emmc-clk { 254 rockchip,pins = <2 RK_ !! 287 rockchip,pins = <2 4 RK_FUNC_2 &pcfg_pull_none_drv_8ma>; 255 }; 288 }; 256 289 257 emmc-cmd { 290 emmc-cmd { 258 rockchip,pins = <1 RK_ !! 291 rockchip,pins = <1 26 RK_FUNC_2 &pcfg_pull_up_drv_8ma>; 259 }; 292 }; 260 293 261 emmc_reset: emmc-reset { 294 emmc_reset: emmc-reset { 262 rockchip,pins = <2 RK_ !! 295 rockchip,pins = <2 3 RK_FUNC_GPIO &pcfg_pull_none>; 263 }; 296 }; 264 }; 297 }; 265 298 266 ir { 299 ir { 267 ir_int: ir-int { 300 ir_int: ir-int { 268 rockchip,pins = <3 RK_ !! 301 rockchip,pins = <3 30 RK_FUNC_GPIO &pcfg_pull_up>; 269 }; 302 }; 270 }; 303 }; 271 304 272 keys { 305 keys { 273 pwr_key: pwr-key { 306 pwr_key: pwr-key { 274 rockchip,pins = <0 RK_ !! 307 rockchip,pins = <0 2 RK_FUNC_GPIO &pcfg_pull_up>; 275 }; 308 }; 276 }; 309 }; 277 310 278 leds { 311 leds { 279 stby_pwren: stby-pwren { 312 stby_pwren: stby-pwren { 280 rockchip,pins = <0 RK_ !! 313 rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>; 281 }; 314 }; 282 315 283 led_ctl: led-ctl { 316 led_ctl: led-ctl { 284 rockchip,pins = <3 RK_ !! 317 rockchip,pins = <3 29 RK_FUNC_GPIO &pcfg_pull_none>; 285 }; 318 }; 286 }; 319 }; 287 320 288 sdio { 321 sdio { 289 wifi_reg_on: wifi-reg-on { 322 wifi_reg_on: wifi-reg-on { 290 rockchip,pins = <3 RK_ !! 323 rockchip,pins = <3 4 RK_FUNC_GPIO &pcfg_pull_none>; 291 }; 324 }; 292 325 293 bt_rst: bt-rst { 326 bt_rst: bt-rst { 294 rockchip,pins = <3 RK_ !! 327 rockchip,pins = <3 5 RK_FUNC_GPIO &pcfg_pull_none>; 295 }; 328 }; 296 }; 329 }; 297 330 298 usb { 331 usb { 299 host_vbus_drv: host-vbus-drv { 332 host_vbus_drv: host-vbus-drv { 300 rockchip,pins = <0 RK_ !! 333 rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_none>; 301 }; 334 }; 302 }; 335 }; 303 }; 336 }; 304 337 305 &pmu_io_domains { 338 &pmu_io_domains { 306 status = "okay"; 339 status = "okay"; 307 340 308 pmu-supply = <&vcc_io>; 341 pmu-supply = <&vcc_io>; 309 vop-supply = <&vcc_io>; 342 vop-supply = <&vcc_io>; 310 }; 343 }; 311 344 312 &saradc { 345 &saradc { 313 vref-supply = <&vcc_18>; 346 vref-supply = <&vcc_18>; 314 status = "okay"; 347 status = "okay"; 315 }; 348 }; 316 349 317 &tsadc { 350 &tsadc { 318 rockchip,hw-tshut-mode = <0>; /* tshut 351 rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */ 319 rockchip,hw-tshut-polarity = <0>; /* t 352 rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */ 320 status = "okay"; 353 status = "okay"; 321 }; 354 }; 322 355 323 &uart2 { 356 &uart2 { 324 status = "okay"; 357 status = "okay"; 325 }; 358 }; 326 359 327 &usb_host0_ehci { 360 &usb_host0_ehci { 328 status = "okay"; 361 status = "okay"; 329 }; 362 }; 330 363 331 &usb_otg { 364 &usb_otg { 332 dr_mode = "host"; 365 dr_mode = "host"; 333 status = "okay"; 366 status = "okay"; 334 }; 367 }; 335 368 336 &wdt { 369 &wdt { 337 status = "okay"; 370 status = "okay"; 338 }; 371 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.