| 1 |
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 |
/* |
| 3 |
* Copyright (c) 2018 Theobroma Systems Design und Consulting GmbH |
| 4 |
*/ |
| 5 |
|
| 6 |
/dts-v1/; |
| 7 |
#include "rk3368.dtsi" |
| 8 |
|
| 9 |
/ { |
| 10 |
aliases { |
| 11 |
ethernet0 = &gmac; |
| 12 |
mmc0 = &emmc; |
| 13 |
}; |
| 14 |
|
| 15 |
chosen { |
| 16 |
stdout-path = "serial0:115200n8"; |
| 17 |
}; |
| 18 |
|
| 19 |
ext_gmac: gmac-clk { |
| 20 |
compatible = "fixed-clock"; |
| 21 |
clock-frequency = <125000000>; |
| 22 |
clock-output-names = "ext_gmac"; |
| 23 |
#clock-cells = <0>; |
| 24 |
}; |
| 25 |
|
| 26 |
i2cmux1 { |
| 27 |
compatible = "i2c-mux-gpio"; |
| 28 |
#address-cells = <1>; |
| 29 |
#size-cells = <0>; |
| 30 |
i2c-parent = <&i2c1>; |
| 31 |
mux-gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_HIGH>; |
| 32 |
|
| 33 |
/* Q7_GP0_I2C */ |
| 34 |
i2c_gp0: i2c@0 { |
| 35 |
reg = <0>; |
| 36 |
#address-cells = <1>; |
| 37 |
#size-cells = <0>; |
| 38 |
}; |
| 39 |
|
| 40 |
/* Q7_SMB */ |
| 41 |
i2c_smb: i2c@1 { |
| 42 |
reg = <1>; |
| 43 |
#address-cells = <1>; |
| 44 |
#size-cells = <0>; |
| 45 |
}; |
| 46 |
}; |
| 47 |
|
| 48 |
i2cmux2 { |
| 49 |
compatible = "i2c-mux-gpio"; |
| 50 |
#address-cells = <1>; |
| 51 |
#size-cells = <0>; |
| 52 |
i2c-parent = <&i2c2>; |
| 53 |
mux-gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>; |
| 54 |
|
| 55 |
/* Q7_LVDS_BLC_I2C */ |
| 56 |
i2c_lvds_blc: i2c@0 { |
| 57 |
reg = <0>; |
| 58 |
#address-cells = <1>; |
| 59 |
#size-cells = <0>; |
| 60 |
|
| 61 |
fan: fan@18 { |
| 62 |
compatible = "ti,amc6821"; |
| 63 |
reg = <0x18>; |
| 64 |
}; |
| 65 |
|
| 66 |
rtc_twi: rtc@6f { |
| 67 |
compatible = "isil,isl1208"; |
| 68 |
reg = <0x6f>; |
| 69 |
}; |
| 70 |
}; |
| 71 |
|
| 72 |
/* Q7_GP2_I2C = LVDS_DID_CLK/DAT */ |
| 73 |
i2c_gp2: i2c@1 { |
| 74 |
reg = <1>; |
| 75 |
#address-cells = <1>; |
| 76 |
#size-cells = <0>; |
| 77 |
}; |
| 78 |
}; |
| 79 |
|
| 80 |
leds { |
| 81 |
compatible = "gpio-leds"; |
| 82 |
pinctrl-names = "default"; |
| 83 |
pinctrl-0 = <&module_led_pins>; |
| 84 |
|
| 85 |
module_led1: led-1 { |
| 86 |
label = "module_led1"; |
| 87 |
gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_HIGH>; |
| 88 |
linux,default-trigger = "heartbeat"; |
| 89 |
panic-indicator; |
| 90 |
}; |
| 91 |
|
| 92 |
module_led2: led-2 { |
| 93 |
label = "module_led2"; |
| 94 |
gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>; |
| 95 |
default-state = "off"; |
| 96 |
}; |
| 97 |
}; |
| 98 |
|
| 99 |
vcc_sys: regulator-vcc-sys { |
| 100 |
compatible = "regulator-fixed"; |
| 101 |
regulator-name = "vcc_sys"; |
| 102 |
regulator-min-microvolt = <5000000>; |
| 103 |
regulator-max-microvolt = <5000000>; |
| 104 |
regulator-always-on; |
| 105 |
regulator-boot-on; |
| 106 |
}; |
| 107 |
}; |
| 108 |
|
| 109 |
&cpu_l0 { |
| 110 |
cpu-supply = <&vdd_cpu>; |
| 111 |
}; |
| 112 |
|
| 113 |
&cpu_l1 { |
| 114 |
cpu-supply = <&vdd_cpu>; |
| 115 |
}; |
| 116 |
|
| 117 |
&cpu_l2 { |
| 118 |
cpu-supply = <&vdd_cpu>; |
| 119 |
}; |
| 120 |
|
| 121 |
&cpu_l3 { |
| 122 |
cpu-supply = <&vdd_cpu>; |
| 123 |
}; |
| 124 |
|
| 125 |
&cpu_b0 { |
| 126 |
cpu-supply = <&vdd_cpu>; |
| 127 |
}; |
| 128 |
|
| 129 |
&cpu_b1 { |
| 130 |
cpu-supply = <&vdd_cpu>; |
| 131 |
}; |
| 132 |
|
| 133 |
&cpu_b2 { |
| 134 |
cpu-supply = <&vdd_cpu>; |
| 135 |
}; |
| 136 |
|
| 137 |
&cpu_b3 { |
| 138 |
cpu-supply = <&vdd_cpu>; |
| 139 |
}; |
| 140 |
|
| 141 |
&emmc { |
| 142 |
bus-width = <8>; |
| 143 |
clock-frequency = <150000000>; |
| 144 |
mmc-hs200-1_8v; |
| 145 |
non-removable; |
| 146 |
vmmc-supply = <&vcc33_io>; |
| 147 |
vqmmc-supply = <&vcc_18>; |
| 148 |
pinctrl-names = "default"; |
| 149 |
pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>; |
| 150 |
status = "okay"; |
| 151 |
}; |
| 152 |
|
| 153 |
&gmac { |
| 154 |
assigned-clocks = <&cru SCLK_MAC>; |
| 155 |
assigned-clock-parents = <&ext_gmac>; |
| 156 |
clock_in_out = "input"; |
| 157 |
phy-handle = <&vsc8531_2>; |
| 158 |
phy-supply = <&vcc33_io>; |
| 159 |
phy-mode = "rgmii"; |
| 160 |
pinctrl-names = "default"; |
| 161 |
pinctrl-0 = <&rgmii_pins>; |
| 162 |
tx_delay = <0x10>; |
| 163 |
rx_delay = <0x10>; |
| 164 |
status = "okay"; |
| 165 |
}; |
| 166 |
|
| 167 |
&hdmi { |
| 168 |
avdd-0v9-supply = <&vdd10_video>; |
| 169 |
avdd-1v8-supply = <&vcc18_video>; |
| 170 |
}; |
| 171 |
|
| 172 |
&i2c0 { |
| 173 |
status = "okay"; |
| 174 |
|
| 175 |
rk808: pmic@1b { |
| 176 |
compatible = "rockchip,rk808"; |
| 177 |
reg = <0x1b>; |
| 178 |
interrupt-parent = <&gpio0>; |
| 179 |
interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>; |
| 180 |
clock-output-names = "xin32k", "rk808-clkout2"; |
| 181 |
#clock-cells = <1>; |
| 182 |
pinctrl-names = "default"; |
| 183 |
pinctrl-0 = <&pmic_int_l>, <&pmic_sleep>; |
| 184 |
system-power-controller; |
| 185 |
vcc1-supply = <&vcc_sys>; |
| 186 |
vcc2-supply = <&vcc_sys>; |
| 187 |
vcc3-supply = <&vcc_sys>; |
| 188 |
vcc4-supply = <&vcc_sys>; |
| 189 |
vcc6-supply = <&vcc_sys>; |
| 190 |
vcc7-supply = <&vcc_sys>; |
| 191 |
vcc8-supply = <&vcc_sys>; |
| 192 |
vcc9-supply = <&vcc_sys>; |
| 193 |
vcc10-supply = <&vcc_sys>; |
| 194 |
vcc11-supply = <&vcc_sys>; |
| 195 |
vcc12-supply = <&vcc_sys>; |
| 196 |
|
| 197 |
regulators { |
| 198 |
vdd_cpu: DCDC_REG1 { |
| 199 |
regulator-name = "vdd_cpu"; |
| 200 |
regulator-min-microvolt = <700000>; |
| 201 |
regulator-max-microvolt = <1500000>; |
| 202 |
regulator-always-on; |
| 203 |
regulator-boot-on; |
| 204 |
}; |
| 205 |
|
| 206 |
vdd_log: DCDC_REG2 { |
| 207 |
regulator-name = "vdd_log"; |
| 208 |
regulator-min-microvolt = <700000>; |
| 209 |
regulator-max-microvolt = <1500000>; |
| 210 |
regulator-always-on; |
| 211 |
regulator-boot-on; |
| 212 |
}; |
| 213 |
|
| 214 |
vcc_ddr: DCDC_REG3 { |
| 215 |
regulator-name = "vcc_ddr"; |
| 216 |
regulator-always-on; |
| 217 |
regulator-boot-on; |
| 218 |
}; |
| 219 |
|
| 220 |
vcc33_io: DCDC_REG4 { |
| 221 |
regulator-name = "vcc33_io"; |
| 222 |
regulator-min-microvolt = <3300000>; |
| 223 |
regulator-max-microvolt = <3300000>; |
| 224 |
regulator-always-on; |
| 225 |
regulator-boot-on; |
| 226 |
}; |
| 227 |
|
| 228 |
vcc33_video: LDO_REG2 { |
| 229 |
regulator-name = "vcc33_video"; |
| 230 |
regulator-min-microvolt = <3300000>; |
| 231 |
regulator-max-microvolt = <3300000>; |
| 232 |
regulator-always-on; |
| 233 |
regulator-boot-on; |
| 234 |
}; |
| 235 |
|
| 236 |
vdd10_pll: LDO_REG3 { |
| 237 |
regulator-name = "vdd10_pll"; |
| 238 |
regulator-min-microvolt = <1000000>; |
| 239 |
regulator-max-microvolt = <1000000>; |
| 240 |
regulator-always-on; |
| 241 |
regulator-boot-on; |
| 242 |
}; |
| 243 |
|
| 244 |
vdd10_video: LDO_REG6 { |
| 245 |
regulator-name = "vdd10_video"; |
| 246 |
regulator-min-microvolt = <1000000>; |
| 247 |
regulator-max-microvolt = <1000000>; |
| 248 |
regulator-always-on; |
| 249 |
regulator-boot-on; |
| 250 |
}; |
| 251 |
|
| 252 |
vcc_18: LDO_REG7 { |
| 253 |
regulator-always-on; |
| 254 |
regulator-boot-on; |
| 255 |
regulator-min-microvolt = <1800000>; |
| 256 |
regulator-max-microvolt = <1800000>; |
| 257 |
regulator-name = "vcc_18"; |
| 258 |
}; |
| 259 |
|
| 260 |
vcc18_video: LDO_REG8 { |
| 261 |
regulator-name = "vcc18_video"; |
| 262 |
regulator-min-microvolt = <1800000>; |
| 263 |
regulator-max-microvolt = <1800000>; |
| 264 |
regulator-always-on; |
| 265 |
regulator-boot-on; |
| 266 |
}; |
| 267 |
}; |
| 268 |
}; |
| 269 |
}; |
| 270 |
|
| 271 |
&i2c1 { |
| 272 |
status = "okay"; |
| 273 |
}; |
| 274 |
|
| 275 |
&i2c2 { |
| 276 |
status = "okay"; |
| 277 |
}; |
| 278 |
|
| 279 |
/* The RK3368-uQ7 "Lion" has most IO voltages hardwired to 3.3V. */ |
| 280 |
&io_domains { |
| 281 |
audio-supply = <&vcc33_io>; |
| 282 |
dvp-supply = <&vcc33_io>; |
| 283 |
flash0-supply = <&vcc_18>; |
| 284 |
gpio30-supply = <&vcc33_io>; |
| 285 |
gpio1830-supply = <&vcc33_io>; |
| 286 |
sdcard-supply = <&vcc33_io>; |
| 287 |
wifi-supply = <&vcc33_io>; |
| 288 |
status = "okay"; |
| 289 |
}; |
| 290 |
|
| 291 |
&mdio { |
| 292 |
vsc8531_2: ethernet-phy@0 { |
| 293 |
compatible = "ethernet-phy-ieee802.3-c22"; |
| 294 |
reg = <0x0>; |
| 295 |
pinctrl-names = "default"; |
| 296 |
pinctrl-0 = <&phy_rst>; |
| 297 |
reset-assert-us = <10000>; |
| 298 |
reset-deassert-us = <50000>; |
| 299 |
reset-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>; |
| 300 |
}; |
| 301 |
}; |
| 302 |
|
| 303 |
&pinctrl { |
| 304 |
ethernet { |
| 305 |
phy_rst: phy-rst { |
| 306 |
rockchip,pins = <3 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; |
| 307 |
}; |
| 308 |
}; |
| 309 |
|
| 310 |
leds { |
| 311 |
module_led_pins: module-led-pins { |
| 312 |
rockchip,pins = |
| 313 |
<2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>, |
| 314 |
<3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; |
| 315 |
}; |
| 316 |
}; |
| 317 |
pmic { |
| 318 |
pmic_int_l: pmic-int-l { |
| 319 |
rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>; |
| 320 |
}; |
| 321 |
|
| 322 |
pmic_sleep: pmic-sleep { |
| 323 |
rockchip,pins = <0 RK_PA0 2 &pcfg_pull_none>; |
| 324 |
}; |
| 325 |
}; |
| 326 |
}; |
| 327 |
|
| 328 |
&pmu_io_domains { |
| 329 |
pmu-supply = <&vcc33_io>; |
| 330 |
vop-supply = <&vcc33_io>; |
| 331 |
status = "okay"; |
| 332 |
}; |
| 333 |
|
| 334 |
&spi1 { |
| 335 |
status = "okay"; |
| 336 |
|
| 337 |
norflash: flash@0 { |
| 338 |
compatible = "jedec,spi-nor"; |
| 339 |
reg = <0>; |
| 340 |
spi-max-frequency = <50000000>; |
| 341 |
}; |
| 342 |
}; |
| 343 |
|
| 344 |
&uart1 { |
| 345 |
status = "okay"; |
| 346 |
}; |
| 347 |
|
| 348 |
&uart3 { |
| 349 |
status = "okay"; |
| 350 |
}; |
| 351 |
|
| 352 |
&usb_host0_ehci { |
| 353 |
status = "okay"; |
| 354 |
}; |
| 355 |
|
| 356 |
&wdt { |
| 357 |
status = "okay"; |
| 358 |
}; |