| 1 |
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 |
|
| 3 |
/dts-v1/; |
| 4 |
|
| 5 |
#include "rk3036.dtsi" |
| 6 |
|
| 7 |
/ { |
| 8 |
model = "Rockchip RK3036 KylinBoard"; |
| 9 |
compatible = "rockchip,rk3036-kylin", "rockchip,rk3036"; |
| 10 |
|
| 11 |
aliases { |
| 12 |
mmc0 = &emmc; |
| 13 |
mmc1 = &sdmmc; |
| 14 |
mmc2 = &sdio; |
| 15 |
}; |
| 16 |
|
| 17 |
chosen { |
| 18 |
stdout-path = "serial2:115200n8"; |
| 19 |
}; |
| 20 |
|
| 21 |
memory@60000000 { |
| 22 |
device_type = "memory"; |
| 23 |
reg = <0x60000000 0x20000000>; |
| 24 |
}; |
| 25 |
|
| 26 |
hdmi_con: hdmi-con { |
| 27 |
compatible = "hdmi-connector"; |
| 28 |
type = "a"; |
| 29 |
|
| 30 |
port { |
| 31 |
hdmi_con_in: endpoint { |
| 32 |
remote-endpoint = <&hdmi_out_con>; |
| 33 |
}; |
| 34 |
}; |
| 35 |
}; |
| 36 |
|
| 37 |
leds: gpio-leds { |
| 38 |
compatible = "gpio-leds"; |
| 39 |
|
| 40 |
work_led: led-0 { |
| 41 |
gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>; |
| 42 |
label = "kylin:red:led"; |
| 43 |
pinctrl-names = "default"; |
| 44 |
pinctrl-0 = <&led_ctl>; |
| 45 |
}; |
| 46 |
}; |
| 47 |
|
| 48 |
sdio_pwrseq: sdio-pwrseq { |
| 49 |
compatible = "mmc-pwrseq-simple"; |
| 50 |
pinctrl-names = "default"; |
| 51 |
pinctrl-0 = <&bt_wake_h>; |
| 52 |
|
| 53 |
/* |
| 54 |
* On the module itself this is one of these (depending |
| 55 |
* on the actual card populated): |
| 56 |
* - SDIO_RESET_L_WL_REG_ON |
| 57 |
* - SDIO_RESET_L_WL_RST |
| 58 |
* - SDIO_RESET_L_BT_EN |
| 59 |
*/ |
| 60 |
reset-gpios = <&gpio0 RK_PD2 GPIO_ACTIVE_LOW>, /* WL_REG_ON */ |
| 61 |
<&gpio0 RK_PD3 GPIO_ACTIVE_LOW>, /* WL_RST */ |
| 62 |
<&gpio2 RK_PB1 GPIO_ACTIVE_LOW>; /* BT_EN */ |
| 63 |
}; |
| 64 |
|
| 65 |
sound { |
| 66 |
compatible = "simple-audio-card"; |
| 67 |
simple-audio-card,format = "i2s"; |
| 68 |
simple-audio-card,name = "rockchip,rt5616-codec"; |
| 69 |
simple-audio-card,mclk-fs = <512>; |
| 70 |
simple-audio-card,widgets = |
| 71 |
"Microphone", "Microphone Jack", |
| 72 |
"Headphone", "Headphone Jack"; |
| 73 |
simple-audio-card,routing = |
| 74 |
"MIC1", "Microphone Jack", |
| 75 |
"MIC2", "Microphone Jack", |
| 76 |
"Microphone Jack", "micbias1", |
| 77 |
"Headphone Jack", "HPOL", |
| 78 |
"Headphone Jack", "HPOR"; |
| 79 |
|
| 80 |
simple-audio-card,cpu { |
| 81 |
sound-dai = <&i2s>; |
| 82 |
}; |
| 83 |
|
| 84 |
simple-audio-card,codec { |
| 85 |
sound-dai = <&rt5616>; |
| 86 |
}; |
| 87 |
}; |
| 88 |
|
| 89 |
vcc_sys: regulator-vsys { |
| 90 |
compatible = "regulator-fixed"; |
| 91 |
regulator-name = "vcc_sys"; |
| 92 |
regulator-min-microvolt = <5000000>; |
| 93 |
regulator-max-microvolt = <5000000>; |
| 94 |
regulator-always-on; |
| 95 |
regulator-boot-on; |
| 96 |
}; |
| 97 |
}; |
| 98 |
|
| 99 |
&acodec { |
| 100 |
status = "okay"; |
| 101 |
}; |
| 102 |
|
| 103 |
&emac { |
| 104 |
phy = <&phy0>; |
| 105 |
phy-reset-duration = <10>; /* millisecond */ |
| 106 |
phy-reset-gpios = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>; /* PHY_RST */ |
| 107 |
pinctrl-names = "default"; |
| 108 |
pinctrl-0 = <&emac_xfer>, <&emac_mdio>; |
| 109 |
status = "okay"; |
| 110 |
|
| 111 |
mdio { |
| 112 |
#address-cells = <1>; |
| 113 |
#size-cells = <0>; |
| 114 |
|
| 115 |
phy0: ethernet-phy@0 { |
| 116 |
reg = <0>; |
| 117 |
}; |
| 118 |
}; |
| 119 |
}; |
| 120 |
|
| 121 |
&emmc { |
| 122 |
status = "okay"; |
| 123 |
}; |
| 124 |
|
| 125 |
&gpu { |
| 126 |
mali-supply = <&vdd_gpu>; |
| 127 |
status = "okay"; |
| 128 |
}; |
| 129 |
|
| 130 |
&hdmi { |
| 131 |
status = "okay"; |
| 132 |
}; |
| 133 |
|
| 134 |
&hdmi_out { |
| 135 |
hdmi_out_con: endpoint { |
| 136 |
remote-endpoint = <&hdmi_con_in>; |
| 137 |
}; |
| 138 |
}; |
| 139 |
|
| 140 |
&i2c1 { |
| 141 |
clock-frequency = <400000>; |
| 142 |
|
| 143 |
status = "okay"; |
| 144 |
|
| 145 |
rk808: pmic@1b { |
| 146 |
compatible = "rockchip,rk808"; |
| 147 |
reg = <0x1b>; |
| 148 |
interrupt-parent = <&gpio2>; |
| 149 |
interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>; |
| 150 |
pinctrl-names = "default"; |
| 151 |
pinctrl-0 = <&pmic_int &global_pwroff>; |
| 152 |
rockchip,system-power-controller; |
| 153 |
wakeup-source; |
| 154 |
#clock-cells = <1>; |
| 155 |
clock-output-names = "xin32k", "rk808-clkout2"; |
| 156 |
|
| 157 |
vcc1-supply = <&vcc_sys>; |
| 158 |
vcc2-supply = <&vcc_sys>; |
| 159 |
vcc3-supply = <&vcc_sys>; |
| 160 |
vcc4-supply = <&vcc_sys>; |
| 161 |
vcc6-supply = <&vcc_sys>; |
| 162 |
vcc7-supply = <&vcc_sys>; |
| 163 |
vcc8-supply = <&vcc_18>; |
| 164 |
vcc9-supply = <&vcc_io>; |
| 165 |
vcc10-supply = <&vcc_io>; |
| 166 |
vcc11-supply = <&vcc_sys>; |
| 167 |
vcc12-supply = <&vcc_io>; |
| 168 |
vddio-supply = <&vccio_pmu>; |
| 169 |
|
| 170 |
regulators { |
| 171 |
vdd_cpu: DCDC_REG1 { |
| 172 |
regulator-always-on; |
| 173 |
regulator-boot-on; |
| 174 |
regulator-min-microvolt = <750000>; |
| 175 |
regulator-max-microvolt = <1350000>; |
| 176 |
regulator-name = "vdd_arm"; |
| 177 |
regulator-state-mem { |
| 178 |
regulator-off-in-suspend; |
| 179 |
}; |
| 180 |
}; |
| 181 |
|
| 182 |
vdd_gpu: DCDC_REG2 { |
| 183 |
regulator-always-on; |
| 184 |
regulator-boot-on; |
| 185 |
regulator-min-microvolt = <850000>; |
| 186 |
regulator-max-microvolt = <1250000>; |
| 187 |
regulator-name = "vdd_gpu"; |
| 188 |
regulator-state-mem { |
| 189 |
regulator-on-in-suspend; |
| 190 |
regulator-suspend-microvolt = <1000000>; |
| 191 |
}; |
| 192 |
}; |
| 193 |
|
| 194 |
vcc_ddr: DCDC_REG3 { |
| 195 |
regulator-always-on; |
| 196 |
regulator-boot-on; |
| 197 |
regulator-name = "vcc_ddr"; |
| 198 |
regulator-state-mem { |
| 199 |
regulator-on-in-suspend; |
| 200 |
}; |
| 201 |
}; |
| 202 |
|
| 203 |
vcc_io: DCDC_REG4 { |
| 204 |
regulator-always-on; |
| 205 |
regulator-boot-on; |
| 206 |
regulator-min-microvolt = <3300000>; |
| 207 |
regulator-max-microvolt = <3300000>; |
| 208 |
regulator-name = "vcc_io"; |
| 209 |
regulator-state-mem { |
| 210 |
regulator-on-in-suspend; |
| 211 |
regulator-suspend-microvolt = <3300000>; |
| 212 |
}; |
| 213 |
}; |
| 214 |
|
| 215 |
vccio_pmu: LDO_REG1 { |
| 216 |
regulator-always-on; |
| 217 |
regulator-boot-on; |
| 218 |
regulator-min-microvolt = <3300000>; |
| 219 |
regulator-max-microvolt = <3300000>; |
| 220 |
regulator-name = "vccio_pmu"; |
| 221 |
regulator-state-mem { |
| 222 |
regulator-on-in-suspend; |
| 223 |
regulator-suspend-microvolt = <3300000>; |
| 224 |
}; |
| 225 |
}; |
| 226 |
|
| 227 |
vcc_tp: LDO_REG2 { |
| 228 |
regulator-always-on; |
| 229 |
regulator-boot-on; |
| 230 |
regulator-min-microvolt = <3300000>; |
| 231 |
regulator-max-microvolt = <3300000>; |
| 232 |
regulator-name = "vcc_tp"; |
| 233 |
regulator-state-mem { |
| 234 |
regulator-off-in-suspend; |
| 235 |
}; |
| 236 |
}; |
| 237 |
|
| 238 |
vdd_10: LDO_REG3 { |
| 239 |
regulator-always-on; |
| 240 |
regulator-boot-on; |
| 241 |
regulator-min-microvolt = <1000000>; |
| 242 |
regulator-max-microvolt = <1000000>; |
| 243 |
regulator-name = "vdd_10"; |
| 244 |
regulator-state-mem { |
| 245 |
regulator-on-in-suspend; |
| 246 |
regulator-suspend-microvolt = <1000000>; |
| 247 |
}; |
| 248 |
}; |
| 249 |
|
| 250 |
vcc18_lcd: LDO_REG4 { |
| 251 |
regulator-always-on; |
| 252 |
regulator-boot-on; |
| 253 |
regulator-min-microvolt = <1800000>; |
| 254 |
regulator-max-microvolt = <1800000>; |
| 255 |
regulator-name = "vcc18_lcd"; |
| 256 |
regulator-state-mem { |
| 257 |
regulator-on-in-suspend; |
| 258 |
regulator-suspend-microvolt = <1800000>; |
| 259 |
}; |
| 260 |
}; |
| 261 |
|
| 262 |
vccio_sd: LDO_REG5 { |
| 263 |
regulator-always-on; |
| 264 |
regulator-boot-on; |
| 265 |
regulator-min-microvolt = <1800000>; |
| 266 |
regulator-max-microvolt = <3300000>; |
| 267 |
regulator-name = "vccio_sd"; |
| 268 |
regulator-state-mem { |
| 269 |
regulator-on-in-suspend; |
| 270 |
regulator-suspend-microvolt = <3300000>; |
| 271 |
}; |
| 272 |
}; |
| 273 |
|
| 274 |
vout5: LDO_REG6 { |
| 275 |
regulator-always-on; |
| 276 |
regulator-boot-on; |
| 277 |
regulator-min-microvolt = <1800000>; |
| 278 |
regulator-max-microvolt = <2500000>; |
| 279 |
regulator-name = "vout5"; |
| 280 |
regulator-state-mem { |
| 281 |
regulator-on-in-suspend; |
| 282 |
regulator-suspend-microvolt = <1800000>; |
| 283 |
}; |
| 284 |
}; |
| 285 |
|
| 286 |
vcc_18: LDO_REG7 { |
| 287 |
regulator-always-on; |
| 288 |
regulator-boot-on; |
| 289 |
regulator-min-microvolt = <1800000>; |
| 290 |
regulator-max-microvolt = <1800000>; |
| 291 |
regulator-name = "vcc_18"; |
| 292 |
regulator-state-mem { |
| 293 |
regulator-on-in-suspend; |
| 294 |
regulator-suspend-microvolt = <1800000>; |
| 295 |
}; |
| 296 |
}; |
| 297 |
|
| 298 |
vcca_codec: LDO_REG8 { |
| 299 |
regulator-always-on; |
| 300 |
regulator-boot-on; |
| 301 |
regulator-min-microvolt = <1800000>; |
| 302 |
regulator-max-microvolt = <1800000>; |
| 303 |
regulator-name = "vcca_codec"; |
| 304 |
regulator-state-mem { |
| 305 |
regulator-on-in-suspend; |
| 306 |
regulator-suspend-microvolt = <1800000>; |
| 307 |
}; |
| 308 |
}; |
| 309 |
|
| 310 |
vcc_wl: SWITCH_REG1 { |
| 311 |
regulator-always-on; |
| 312 |
regulator-boot-on; |
| 313 |
regulator-name = "vcc_wl"; |
| 314 |
regulator-state-mem { |
| 315 |
regulator-on-in-suspend; |
| 316 |
}; |
| 317 |
}; |
| 318 |
|
| 319 |
vcc_lcd: SWITCH_REG2 { |
| 320 |
regulator-always-on; |
| 321 |
regulator-boot-on; |
| 322 |
regulator-name = "vcc_lcd"; |
| 323 |
regulator-state-mem { |
| 324 |
regulator-on-in-suspend; |
| 325 |
}; |
| 326 |
}; |
| 327 |
}; |
| 328 |
}; |
| 329 |
}; |
| 330 |
|
| 331 |
&i2c2 { |
| 332 |
status = "okay"; |
| 333 |
|
| 334 |
rt5616: audio-codec@1b { |
| 335 |
compatible = "realtek,rt5616"; |
| 336 |
reg = <0x1b>; |
| 337 |
clocks = <&cru SCLK_I2S_OUT>; |
| 338 |
clock-names = "mclk"; |
| 339 |
#sound-dai-cells = <0>; |
| 340 |
}; |
| 341 |
}; |
| 342 |
|
| 343 |
&i2s { |
| 344 |
status = "okay"; |
| 345 |
}; |
| 346 |
|
| 347 |
&sdio { |
| 348 |
status = "okay"; |
| 349 |
|
| 350 |
bus-width = <4>; |
| 351 |
cap-sd-highspeed; |
| 352 |
cap-sdio-irq; |
| 353 |
rockchip,default-sample-phase = <90>; |
| 354 |
keep-power-in-suspend; |
| 355 |
mmc-pwrseq = <&sdio_pwrseq>; |
| 356 |
non-removable; |
| 357 |
pinctrl-names = "default"; |
| 358 |
pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4>; |
| 359 |
sd-uhs-sdr12; |
| 360 |
sd-uhs-sdr25; |
| 361 |
sd-uhs-sdr50; |
| 362 |
sd-uhs-sdr104; |
| 363 |
}; |
| 364 |
|
| 365 |
&sdmmc { |
| 366 |
bus-width = <4>; |
| 367 |
cap-mmc-highspeed; |
| 368 |
cap-sd-highspeed; |
| 369 |
card-detect-delay = <200>; |
| 370 |
disable-wp; |
| 371 |
pinctrl-names = "default"; |
| 372 |
pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>; |
| 373 |
}; |
| 374 |
|
| 375 |
&uart0 { |
| 376 |
status = "okay"; |
| 377 |
}; |
| 378 |
|
| 379 |
&uart2 { |
| 380 |
status = "okay"; |
| 381 |
}; |
| 382 |
|
| 383 |
&usb_host { |
| 384 |
status = "okay"; |
| 385 |
}; |
| 386 |
|
| 387 |
&usb_otg { |
| 388 |
status = "okay"; |
| 389 |
}; |
| 390 |
|
| 391 |
&usb2phy { |
| 392 |
status = "okay"; |
| 393 |
}; |
| 394 |
|
| 395 |
&usb2phy_host { |
| 396 |
status = "okay"; |
| 397 |
}; |
| 398 |
|
| 399 |
&usb2phy_otg { |
| 400 |
status = "okay"; |
| 401 |
}; |
| 402 |
|
| 403 |
&vop { |
| 404 |
status = "okay"; |
| 405 |
}; |
| 406 |
|
| 407 |
&vop_mmu { |
| 408 |
status = "okay"; |
| 409 |
}; |
| 410 |
|
| 411 |
&pinctrl { |
| 412 |
leds { |
| 413 |
led_ctl: led-ctl { |
| 414 |
rockchip,pins = <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>; |
| 415 |
}; |
| 416 |
}; |
| 417 |
|
| 418 |
pmic { |
| 419 |
pmic_int: pmic-int { |
| 420 |
rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_default>; |
| 421 |
}; |
| 422 |
}; |
| 423 |
|
| 424 |
sdio { |
| 425 |
bt_wake_h: bt-wake-h { |
| 426 |
rockchip,pins = <2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_default>; |
| 427 |
}; |
| 428 |
}; |
| 429 |
|
| 430 |
sdmmc { |
| 431 |
sdmmc_pwr: sdmmc-pwr { |
| 432 |
rockchip,pins = <2 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>; |
| 433 |
}; |
| 434 |
}; |
| 435 |
|
| 436 |
suspend { |
| 437 |
global_pwroff: global-pwroff { |
| 438 |
rockchip,pins = <2 RK_PA7 1 &pcfg_pull_none>; |
| 439 |
}; |
| 440 |
}; |
| 441 |
}; |