| 1 |
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 |
/* |
| 3 |
* Copyright (c) 2020 Dongjin Kim <[email protected]> |
| 4 |
*/ |
| 5 |
|
| 6 |
#include "meson-sm1.dtsi" |
| 7 |
#include <dt-bindings/gpio/meson-g12a-gpio.h> |
| 8 |
#include <dt-bindings/leds/common.h> |
| 9 |
#include <dt-bindings/sound/meson-g12a-tohdmitx.h> |
| 10 |
|
| 11 |
/ { |
| 12 |
aliases { |
| 13 |
serial0 = &uart_AO; |
| 14 |
ethernet0 = ðmac; |
| 15 |
}; |
| 16 |
|
| 17 |
chosen { |
| 18 |
stdout-path = "serial0:115200n8"; |
| 19 |
}; |
| 20 |
|
| 21 |
memory@0 { |
| 22 |
device_type = "memory"; |
| 23 |
reg = <0x0 0x0 0x0 0x40000000>; |
| 24 |
}; |
| 25 |
|
| 26 |
emmc_pwrseq: emmc-pwrseq { |
| 27 |
compatible = "mmc-pwrseq-emmc"; |
| 28 |
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>; |
| 29 |
}; |
| 30 |
|
| 31 |
tflash_vdd: regulator-tflash-vdd { |
| 32 |
compatible = "regulator-fixed"; |
| 33 |
|
| 34 |
regulator-name = "TFLASH_VDD"; |
| 35 |
regulator-min-microvolt = <3300000>; |
| 36 |
regulator-max-microvolt = <3300000>; |
| 37 |
|
| 38 |
gpio = <&gpio_ao GPIOAO_3 GPIO_OPEN_DRAIN>; |
| 39 |
enable-active-high; |
| 40 |
regulator-boot-on; |
| 41 |
regulator-always-on; |
| 42 |
}; |
| 43 |
|
| 44 |
tf_io: gpio-regulator-tf-io { |
| 45 |
compatible = "regulator-gpio"; |
| 46 |
|
| 47 |
regulator-name = "TF_IO"; |
| 48 |
regulator-min-microvolt = <1800000>; |
| 49 |
regulator-max-microvolt = <3300000>; |
| 50 |
vin-supply = <&vcc_5v>; |
| 51 |
|
| 52 |
enable-gpios = <&gpio_ao GPIOE_2 GPIO_OPEN_DRAIN>; |
| 53 |
enable-active-high; |
| 54 |
regulator-boot-on; |
| 55 |
regulator-always-on; |
| 56 |
|
| 57 |
gpios = <&gpio_ao GPIOAO_6 GPIO_OPEN_SOURCE>; |
| 58 |
gpios-states = <0>; |
| 59 |
|
| 60 |
states = <3300000 0>, |
| 61 |
<1800000 1>; |
| 62 |
}; |
| 63 |
|
| 64 |
flash_1v8: regulator-flash-1v8 { |
| 65 |
compatible = "regulator-fixed"; |
| 66 |
regulator-name = "FLASH_1V8"; |
| 67 |
regulator-min-microvolt = <1800000>; |
| 68 |
regulator-max-microvolt = <1800000>; |
| 69 |
vin-supply = <&vcc_3v3>; |
| 70 |
regulator-always-on; |
| 71 |
}; |
| 72 |
|
| 73 |
main_12v: regulator-main-12v { |
| 74 |
compatible = "regulator-fixed"; |
| 75 |
regulator-name = "12V"; |
| 76 |
regulator-min-microvolt = <12000000>; |
| 77 |
regulator-max-microvolt = <12000000>; |
| 78 |
regulator-always-on; |
| 79 |
}; |
| 80 |
|
| 81 |
vcc_5v: regulator-vcc-5v { |
| 82 |
compatible = "regulator-fixed"; |
| 83 |
regulator-name = "5V"; |
| 84 |
regulator-min-microvolt = <5000000>; |
| 85 |
regulator-max-microvolt = <5000000>; |
| 86 |
regulator-boot-on; |
| 87 |
regulator-always-on; |
| 88 |
vin-supply = <&main_12v>; |
| 89 |
gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>; |
| 90 |
enable-active-high; |
| 91 |
}; |
| 92 |
|
| 93 |
vcc_1v8: regulator-vcc-1v8 { |
| 94 |
compatible = "regulator-fixed"; |
| 95 |
regulator-name = "VCC_1V8"; |
| 96 |
regulator-min-microvolt = <1800000>; |
| 97 |
regulator-max-microvolt = <1800000>; |
| 98 |
vin-supply = <&vcc_3v3>; |
| 99 |
regulator-always-on; |
| 100 |
}; |
| 101 |
|
| 102 |
vcc_3v3: regulator-vcc-3v3 { |
| 103 |
compatible = "regulator-fixed"; |
| 104 |
regulator-name = "VCC_3V3"; |
| 105 |
regulator-min-microvolt = <3300000>; |
| 106 |
regulator-max-microvolt = <3300000>; |
| 107 |
vin-supply = <&vddao_3v3>; |
| 108 |
regulator-always-on; |
| 109 |
/* FIXME: actually controlled by VDDCPU_B_EN */ |
| 110 |
}; |
| 111 |
|
| 112 |
vddcpu: regulator-vddcpu { |
| 113 |
/* |
| 114 |
* MP8756GD Regulator. |
| 115 |
*/ |
| 116 |
compatible = "pwm-regulator"; |
| 117 |
|
| 118 |
regulator-name = "VDDCPU"; |
| 119 |
regulator-min-microvolt = <721000>; |
| 120 |
regulator-max-microvolt = <1022000>; |
| 121 |
|
| 122 |
pwm-supply = <&main_12v>; |
| 123 |
|
| 124 |
pwms = <&pwm_AO_cd 1 1250 0>; |
| 125 |
pwm-dutycycle-range = <100 0>; |
| 126 |
|
| 127 |
regulator-boot-on; |
| 128 |
regulator-always-on; |
| 129 |
}; |
| 130 |
|
| 131 |
usb_pwr_en: regulator-usb-pwr-en { |
| 132 |
compatible = "regulator-fixed"; |
| 133 |
regulator-name = "USB_PWR_EN"; |
| 134 |
regulator-min-microvolt = <5000000>; |
| 135 |
regulator-max-microvolt = <5000000>; |
| 136 |
vin-supply = <&vcc_5v>; |
| 137 |
|
| 138 |
/* Connected to the microUSB port power enable */ |
| 139 |
gpio = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>; |
| 140 |
enable-active-high; |
| 141 |
}; |
| 142 |
|
| 143 |
vddao_1v8: regulator-vddao-1v8 { |
| 144 |
compatible = "regulator-fixed"; |
| 145 |
regulator-name = "VDDAO_1V8"; |
| 146 |
regulator-min-microvolt = <1800000>; |
| 147 |
regulator-max-microvolt = <1800000>; |
| 148 |
vin-supply = <&vddao_3v3>; |
| 149 |
regulator-always-on; |
| 150 |
}; |
| 151 |
|
| 152 |
vddao_3v3: regulator-vddao-3v3 { |
| 153 |
compatible = "regulator-fixed"; |
| 154 |
regulator-name = "VDDAO_3V3"; |
| 155 |
regulator-min-microvolt = <3300000>; |
| 156 |
regulator-max-microvolt = <3300000>; |
| 157 |
vin-supply = <&main_12v>; |
| 158 |
regulator-always-on; |
| 159 |
}; |
| 160 |
|
| 161 |
hdmi-connector { |
| 162 |
compatible = "hdmi-connector"; |
| 163 |
type = "a"; |
| 164 |
|
| 165 |
port { |
| 166 |
hdmi_connector_in: endpoint { |
| 167 |
remote-endpoint = <&hdmi_tx_tmds_out>; |
| 168 |
}; |
| 169 |
}; |
| 170 |
}; |
| 171 |
|
| 172 |
sound { |
| 173 |
compatible = "amlogic,axg-sound-card"; |
| 174 |
audio-aux-devs = <&tdmout_b>; |
| 175 |
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", |
| 176 |
"TDMOUT_B IN 1", "FRDDR_B OUT 1", |
| 177 |
"TDMOUT_B IN 2", "FRDDR_C OUT 1", |
| 178 |
"TDM_B Playback", "TDMOUT_B OUT"; |
| 179 |
|
| 180 |
clocks = <&clkc CLKID_MPLL2>, |
| 181 |
<&clkc CLKID_MPLL0>, |
| 182 |
<&clkc CLKID_MPLL1>; |
| 183 |
|
| 184 |
assigned-clocks = <&clkc CLKID_MPLL2>, |
| 185 |
<&clkc CLKID_MPLL0>, |
| 186 |
<&clkc CLKID_MPLL1>; |
| 187 |
assigned-clock-rates = <294912000>, |
| 188 |
<270950400>, |
| 189 |
<393216000>; |
| 190 |
|
| 191 |
dai-link-0 { |
| 192 |
sound-dai = <&frddr_a>; |
| 193 |
}; |
| 194 |
|
| 195 |
dai-link-1 { |
| 196 |
sound-dai = <&frddr_b>; |
| 197 |
}; |
| 198 |
|
| 199 |
dai-link-2 { |
| 200 |
sound-dai = <&frddr_c>; |
| 201 |
}; |
| 202 |
|
| 203 |
/* 8ch hdmi interface */ |
| 204 |
dai-link-3 { |
| 205 |
sound-dai = <&tdmif_b>; |
| 206 |
dai-format = "i2s"; |
| 207 |
dai-tdm-slot-tx-mask-0 = <1 1>; |
| 208 |
dai-tdm-slot-tx-mask-1 = <1 1>; |
| 209 |
dai-tdm-slot-tx-mask-2 = <1 1>; |
| 210 |
dai-tdm-slot-tx-mask-3 = <1 1>; |
| 211 |
mclk-fs = <256>; |
| 212 |
|
| 213 |
codec { |
| 214 |
sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; |
| 215 |
}; |
| 216 |
}; |
| 217 |
|
| 218 |
/* hdmi glue */ |
| 219 |
dai-link-4 { |
| 220 |
sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; |
| 221 |
|
| 222 |
codec { |
| 223 |
sound-dai = <&hdmi_tx>; |
| 224 |
}; |
| 225 |
}; |
| 226 |
}; |
| 227 |
}; |
| 228 |
|
| 229 |
&arb { |
| 230 |
status = "okay"; |
| 231 |
}; |
| 232 |
|
| 233 |
&cec_AO { |
| 234 |
pinctrl-0 = <&cec_ao_a_h_pins>; |
| 235 |
pinctrl-names = "default"; |
| 236 |
status = "disabled"; |
| 237 |
hdmi-phandle = <&hdmi_tx>; |
| 238 |
}; |
| 239 |
|
| 240 |
&cecb_AO { |
| 241 |
pinctrl-0 = <&cec_ao_b_h_pins>; |
| 242 |
pinctrl-names = "default"; |
| 243 |
status = "okay"; |
| 244 |
hdmi-phandle = <&hdmi_tx>; |
| 245 |
}; |
| 246 |
|
| 247 |
&clkc_audio { |
| 248 |
status = "okay"; |
| 249 |
}; |
| 250 |
|
| 251 |
&cpu0 { |
| 252 |
cpu-supply = <&vddcpu>; |
| 253 |
}; |
| 254 |
|
| 255 |
&cpu1 { |
| 256 |
cpu-supply = <&vddcpu>; |
| 257 |
}; |
| 258 |
|
| 259 |
&cpu2 { |
| 260 |
cpu-supply = <&vddcpu>; |
| 261 |
}; |
| 262 |
|
| 263 |
&cpu3 { |
| 264 |
cpu-supply = <&vddcpu>; |
| 265 |
}; |
| 266 |
|
| 267 |
&ext_mdio { |
| 268 |
external_phy: ethernet-phy@0 { |
| 269 |
/* Realtek RTL8211F (0x001cc916) */ |
| 270 |
reg = <0>; |
| 271 |
max-speed = <1000>; |
| 272 |
|
| 273 |
reset-assert-us = <10000>; |
| 274 |
reset-deassert-us = <80000>; |
| 275 |
reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; |
| 276 |
|
| 277 |
interrupt-parent = <&gpio_intc>; |
| 278 |
/* MAC_INTR on GPIOZ_14 */ |
| 279 |
interrupts = <IRQID_GPIOZ_14 IRQ_TYPE_LEVEL_LOW>; |
| 280 |
}; |
| 281 |
}; |
| 282 |
|
| 283 |
ðmac { |
| 284 |
pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; |
| 285 |
pinctrl-names = "default"; |
| 286 |
status = "okay"; |
| 287 |
phy-mode = "rgmii"; |
| 288 |
phy-handle = <&external_phy>; |
| 289 |
amlogic,tx-delay-ns = <2>; |
| 290 |
}; |
| 291 |
|
| 292 |
&frddr_a { |
| 293 |
status = "okay"; |
| 294 |
}; |
| 295 |
|
| 296 |
&frddr_b { |
| 297 |
status = "okay"; |
| 298 |
}; |
| 299 |
|
| 300 |
&frddr_c { |
| 301 |
status = "okay"; |
| 302 |
}; |
| 303 |
|
| 304 |
&gpio { |
| 305 |
gpio-line-names = |
| 306 |
/* GPIOZ */ |
| 307 |
"", "", "", "", "", "", "", "", |
| 308 |
"", "", "", "", "", "", "", "", |
| 309 |
/* GPIOH */ |
| 310 |
"", "", "", "", "", |
| 311 |
"PIN_36", /* GPIOH_5 */ |
| 312 |
"PIN_26", /* GPIOH_6 */ |
| 313 |
"PIN_32", /* GPIOH_7 */ |
| 314 |
"", |
| 315 |
/* BOOT */ |
| 316 |
"", "", "", "", "", "", "", "", |
| 317 |
"", "", "", "", "", "", "", "", |
| 318 |
/* GPIOC */ |
| 319 |
"", "", "", "", "", "", "", "", |
| 320 |
/* GPIOA */ |
| 321 |
"", "", "", "", "", "", "", "", |
| 322 |
"", "", "", "", "", "", |
| 323 |
"PIN_27", /* GPIOA_14 */ |
| 324 |
"PIN_28", /* GPIOA_15 */ |
| 325 |
/* GPIOX */ |
| 326 |
"PIN_16", /* GPIOX_0 */ |
| 327 |
"PIN_18", /* GPIOX_1 */ |
| 328 |
"PIN_22", /* GPIOX_2 */ |
| 329 |
"PIN_11", /* GPIOX_3 */ |
| 330 |
"PIN_13", /* GPIOX_4 */ |
| 331 |
"PIN_7", /* GPIOX_5 */ |
| 332 |
"PIN_33", /* GPIOX_6 */ |
| 333 |
"PIN_15", /* GPIOX_7 */ |
| 334 |
"PIN_19", /* GPIOX_8 */ |
| 335 |
"PIN_21", /* GPIOX_9 */ |
| 336 |
"PIN_24", /* GPIOX_10 */ |
| 337 |
"PIN_23", /* GPIOX_11 */ |
| 338 |
"PIN_8", /* GPIOX_12 */ |
| 339 |
"PIN_10", /* GPIOX_13 */ |
| 340 |
"PIN_29", /* GPIOX_14 */ |
| 341 |
"PIN_31", /* GPIOX_15 */ |
| 342 |
"PIN_12", /* GPIOX_16 */ |
| 343 |
"PIN_3", /* GPIOX_17 */ |
| 344 |
"PIN_5", /* GPIOX_18 */ |
| 345 |
"PIN_35"; /* GPIOX_19 */ |
| 346 |
}; |
| 347 |
|
| 348 |
&gpio_ao { |
| 349 |
gpio-line-names = |
| 350 |
/* GPIOAO */ |
| 351 |
"", "", "", "", |
| 352 |
"PIN_47", /* GPIOAO_4 */ |
| 353 |
"", "", |
| 354 |
"PIN_45", /* GPIOAO_7 */ |
| 355 |
"PIN_46", /* GPIOAO_8 */ |
| 356 |
"PIN_44", /* GPIOAO_9 */ |
| 357 |
"PIN_42", /* GPIOAO_10 */ |
| 358 |
"", |
| 359 |
/* GPIOE */ |
| 360 |
"", "", ""; |
| 361 |
}; |
| 362 |
|
| 363 |
&hdmi_tx { |
| 364 |
status = "okay"; |
| 365 |
pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>; |
| 366 |
pinctrl-names = "default"; |
| 367 |
hdmi-supply = <&vcc_5v>; |
| 368 |
}; |
| 369 |
|
| 370 |
&hdmi_tx_tmds_port { |
| 371 |
hdmi_tx_tmds_out: endpoint { |
| 372 |
remote-endpoint = <&hdmi_connector_in>; |
| 373 |
}; |
| 374 |
}; |
| 375 |
|
| 376 |
&ir { |
| 377 |
status = "okay"; |
| 378 |
pinctrl-0 = <&remote_input_ao_pins>; |
| 379 |
pinctrl-names = "default"; |
| 380 |
}; |
| 381 |
|
| 382 |
&pwm_AO_cd { |
| 383 |
pinctrl-0 = <&pwm_ao_d_e_pins>; |
| 384 |
pinctrl-names = "default"; |
| 385 |
status = "okay"; |
| 386 |
}; |
| 387 |
|
| 388 |
&saradc { |
| 389 |
status = "okay"; |
| 390 |
}; |
| 391 |
|
| 392 |
/* SD card */ |
| 393 |
&sd_emmc_b { |
| 394 |
status = "okay"; |
| 395 |
pinctrl-0 = <&sdcard_c_pins>; |
| 396 |
pinctrl-1 = <&sdcard_clk_gate_c_pins>; |
| 397 |
pinctrl-names = "default", "clk-gate"; |
| 398 |
|
| 399 |
bus-width = <4>; |
| 400 |
cap-sd-highspeed; |
| 401 |
max-frequency = <200000000>; |
| 402 |
sd-uhs-sdr12; |
| 403 |
sd-uhs-sdr25; |
| 404 |
sd-uhs-sdr50; |
| 405 |
sd-uhs-sdr104; |
| 406 |
disable-wp; |
| 407 |
|
| 408 |
cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>; |
| 409 |
vmmc-supply = <&tflash_vdd>; |
| 410 |
vqmmc-supply = <&tf_io>; |
| 411 |
}; |
| 412 |
|
| 413 |
/* eMMC */ |
| 414 |
&sd_emmc_c { |
| 415 |
status = "okay"; |
| 416 |
pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>; |
| 417 |
pinctrl-1 = <&emmc_clk_gate_pins>; |
| 418 |
pinctrl-names = "default", "clk-gate"; |
| 419 |
|
| 420 |
bus-width = <8>; |
| 421 |
cap-mmc-highspeed; |
| 422 |
mmc-ddr-1_8v; |
| 423 |
mmc-hs200-1_8v; |
| 424 |
max-frequency = <200000000>; |
| 425 |
disable-wp; |
| 426 |
|
| 427 |
mmc-pwrseq = <&emmc_pwrseq>; |
| 428 |
vmmc-supply = <&vcc_3v3>; |
| 429 |
vqmmc-supply = <&flash_1v8>; |
| 430 |
}; |
| 431 |
|
| 432 |
&tdmif_b { |
| 433 |
status = "okay"; |
| 434 |
}; |
| 435 |
|
| 436 |
&tdmout_b { |
| 437 |
status = "okay"; |
| 438 |
}; |
| 439 |
|
| 440 |
&tohdmitx { |
| 441 |
status = "okay"; |
| 442 |
}; |
| 443 |
|
| 444 |
&uart_AO { |
| 445 |
status = "okay"; |
| 446 |
pinctrl-0 = <&uart_ao_a_pins>; |
| 447 |
pinctrl-names = "default"; |
| 448 |
}; |
| 449 |
|
| 450 |
&usb { |
| 451 |
status = "okay"; |
| 452 |
vbus-supply = <&usb_pwr_en>; |
| 453 |
}; |
| 454 |
|
| 455 |
&usb2_phy0 { |
| 456 |
phy-supply = <&vcc_5v>; |
| 457 |
}; |
| 458 |
|