| 1 |
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 |
/* |
| 3 |
* Copyright (c) 2023 Neil Armstrong <[email protected]> |
| 4 |
*/ |
| 5 |
|
| 6 |
#include "meson-g12b-a311d.dtsi" |
| 7 |
#include <dt-bindings/gpio/meson-g12a-gpio.h> |
| 8 |
|
| 9 |
/ { |
| 10 |
aliases { |
| 11 |
serial0 = &uart_AO; |
| 12 |
rtc1 = &vrtc; |
| 13 |
}; |
| 14 |
|
| 15 |
chosen { |
| 16 |
stdout-path = "serial0:115200n8"; |
| 17 |
}; |
| 18 |
|
| 19 |
emmc_pwrseq: emmc-pwrseq { |
| 20 |
compatible = "mmc-pwrseq-emmc"; |
| 21 |
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>; |
| 22 |
}; |
| 23 |
|
| 24 |
memory@0 { |
| 25 |
device_type = "memory"; |
| 26 |
reg = <0x0 0x0 0x0 0x40000000>; |
| 27 |
}; |
| 28 |
|
| 29 |
sdio_pwrseq: sdio-pwrseq { |
| 30 |
compatible = "mmc-pwrseq-simple"; |
| 31 |
reset-gpios = <&gpio GPIOAO_6 GPIO_ACTIVE_LOW>; |
| 32 |
clocks = <&wifi32k>; |
| 33 |
clock-names = "ext_clock"; |
| 34 |
}; |
| 35 |
|
| 36 |
emmc_1v8: regulator-emmc-1v8 { |
| 37 |
compatible = "regulator-fixed"; |
| 38 |
regulator-name = "EMMC_1V8"; |
| 39 |
regulator-min-microvolt = <1800000>; |
| 40 |
regulator-max-microvolt = <1800000>; |
| 41 |
vin-supply = <&vddao_3v3>; |
| 42 |
regulator-always-on; |
| 43 |
}; |
| 44 |
|
| 45 |
dc_in: regulator-dc-in { |
| 46 |
compatible = "regulator-fixed"; |
| 47 |
regulator-name = "DC_IN"; |
| 48 |
regulator-min-microvolt = <5000000>; |
| 49 |
regulator-max-microvolt = <5000000>; |
| 50 |
regulator-always-on; |
| 51 |
}; |
| 52 |
|
| 53 |
vddio_c: regulator-vddio-c { |
| 54 |
compatible = "regulator-gpio"; |
| 55 |
regulator-name = "VDDIO_C"; |
| 56 |
regulator-min-microvolt = <1800000>; |
| 57 |
regulator-max-microvolt = <3300000>; |
| 58 |
|
| 59 |
enable-gpios = <&gpio_ao GPIOAO_3 GPIO_OPEN_DRAIN>; |
| 60 |
enable-active-high; |
| 61 |
regulator-always-on; |
| 62 |
|
| 63 |
gpios = <&gpio_ao GPIOAO_9 GPIO_OPEN_DRAIN>; |
| 64 |
gpios-states = <1>; |
| 65 |
|
| 66 |
states = <1800000 0>, |
| 67 |
<3300000 1>; |
| 68 |
}; |
| 69 |
|
| 70 |
vddao_1v8: regulator-vddao-1v8 { |
| 71 |
compatible = "regulator-fixed"; |
| 72 |
regulator-name = "VDDAO_1V8"; |
| 73 |
regulator-min-microvolt = <1800000>; |
| 74 |
regulator-max-microvolt = <1800000>; |
| 75 |
vin-supply = <&vddao_3v3>; |
| 76 |
regulator-always-on; |
| 77 |
}; |
| 78 |
|
| 79 |
vddao_3v3: regulator-vddao-3v3 { |
| 80 |
compatible = "regulator-fixed"; |
| 81 |
regulator-name = "VDDAO_3V3"; |
| 82 |
regulator-min-microvolt = <3300000>; |
| 83 |
regulator-max-microvolt = <3300000>; |
| 84 |
vin-supply = <&dc_in>; |
| 85 |
regulator-always-on; |
| 86 |
}; |
| 87 |
|
| 88 |
vddcpu_a: regulator-vddcpu-a { |
| 89 |
/* |
| 90 |
* MP8756GD DC/DC Regulator. |
| 91 |
*/ |
| 92 |
compatible = "pwm-regulator"; |
| 93 |
|
| 94 |
regulator-name = "VDDCPU_A"; |
| 95 |
regulator-min-microvolt = <680000>; |
| 96 |
regulator-max-microvolt = <1040000>; |
| 97 |
|
| 98 |
pwm-supply = <&dc_in>; |
| 99 |
|
| 100 |
pwms = <&pwm_ab 0 1250 0>; |
| 101 |
pwm-dutycycle-range = <100 0>; |
| 102 |
|
| 103 |
regulator-boot-on; |
| 104 |
regulator-always-on; |
| 105 |
}; |
| 106 |
|
| 107 |
vddcpu_b: regulator-vddcpu-b { |
| 108 |
/* |
| 109 |
* SY8120B1ABC DC/DC Regulator. |
| 110 |
*/ |
| 111 |
compatible = "pwm-regulator"; |
| 112 |
|
| 113 |
regulator-name = "VDDCPU_B"; |
| 114 |
regulator-min-microvolt = <680000>; |
| 115 |
regulator-max-microvolt = <1040000>; |
| 116 |
|
| 117 |
pwm-supply = <&dc_in>; |
| 118 |
|
| 119 |
pwms = <&pwm_AO_cd 1 1250 0>; |
| 120 |
pwm-dutycycle-range = <100 0>; |
| 121 |
|
| 122 |
regulator-boot-on; |
| 123 |
regulator-always-on; |
| 124 |
}; |
| 125 |
|
| 126 |
wifi32k: wifi32k { |
| 127 |
compatible = "pwm-clock"; |
| 128 |
#clock-cells = <0>; |
| 129 |
clock-frequency = <32768>; |
| 130 |
pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ |
| 131 |
}; |
| 132 |
}; |
| 133 |
|
| 134 |
&arb { |
| 135 |
status = "okay"; |
| 136 |
}; |
| 137 |
|
| 138 |
&clkc_audio { |
| 139 |
status = "okay"; |
| 140 |
}; |
| 141 |
|
| 142 |
&cec_AO { |
| 143 |
pinctrl-0 = <&cec_ao_a_h_pins>; |
| 144 |
pinctrl-names = "default"; |
| 145 |
hdmi-phandle = <&hdmi_tx>; |
| 146 |
}; |
| 147 |
|
| 148 |
&cecb_AO { |
| 149 |
pinctrl-0 = <&cec_ao_b_h_pins>; |
| 150 |
pinctrl-names = "default"; |
| 151 |
hdmi-phandle = <&hdmi_tx>; |
| 152 |
}; |
| 153 |
|
| 154 |
&cpu0 { |
| 155 |
cpu-supply = <&vddcpu_b>; |
| 156 |
}; |
| 157 |
|
| 158 |
&cpu1 { |
| 159 |
cpu-supply = <&vddcpu_b>; |
| 160 |
}; |
| 161 |
|
| 162 |
&cpu100 { |
| 163 |
cpu-supply = <&vddcpu_a>; |
| 164 |
}; |
| 165 |
|
| 166 |
&cpu101 { |
| 167 |
cpu-supply = <&vddcpu_a>; |
| 168 |
}; |
| 169 |
|
| 170 |
&cpu102 { |
| 171 |
cpu-supply = <&vddcpu_a>; |
| 172 |
}; |
| 173 |
|
| 174 |
&cpu103 { |
| 175 |
cpu-supply = <&vddcpu_a>; |
| 176 |
}; |
| 177 |
|
| 178 |
&ext_mdio { |
| 179 |
external_phy: ethernet-phy@0 { |
| 180 |
/* Realtek RTL8211F (0x001cc916) */ |
| 181 |
reg = <0>; |
| 182 |
max-speed = <1000>; |
| 183 |
|
| 184 |
interrupt-parent = <&gpio_intc>; |
| 185 |
/* MAC_INTR on GPIOZ_14 */ |
| 186 |
interrupts = <IRQID_GPIOZ_14 IRQ_TYPE_LEVEL_LOW>; |
| 187 |
}; |
| 188 |
}; |
| 189 |
|
| 190 |
/* Ethernet to be enabled in baseboard DT */ |
| 191 |
ðmac { |
| 192 |
pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; |
| 193 |
pinctrl-names = "default"; |
| 194 |
phy-mode = "rgmii-txid"; |
| 195 |
phy-handle = <&external_phy>; |
| 196 |
}; |
| 197 |
|
| 198 |
&frddr_a { |
| 199 |
status = "okay"; |
| 200 |
}; |
| 201 |
|
| 202 |
&frddr_b { |
| 203 |
status = "okay"; |
| 204 |
}; |
| 205 |
|
| 206 |
&frddr_c { |
| 207 |
status = "okay"; |
| 208 |
}; |
| 209 |
|
| 210 |
/* HDMI to be enabled in baseboard DT */ |
| 211 |
&hdmi_tx { |
| 212 |
pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>; |
| 213 |
pinctrl-names = "default"; |
| 214 |
hdmi-supply = <&dc_in>; |
| 215 |
}; |
| 216 |
|
| 217 |
/* "Camera" I2C bus */ |
| 218 |
&i2c1 { |
| 219 |
pinctrl-0 = <&i2c1_sda_h6_pins>, <&i2c1_sck_h7_pins>; |
| 220 |
pinctrl-names = "default"; |
| 221 |
}; |
| 222 |
|
| 223 |
/* Main I2C bus */ |
| 224 |
&i2c2 { |
| 225 |
pinctrl-0 = <&i2c2_sda_x_pins>, <&i2c2_sck_x_pins>; |
| 226 |
pinctrl-names = "default"; |
| 227 |
}; |
| 228 |
|
| 229 |
/* "ID" I2C bus */ |
| 230 |
&i2c3 { |
| 231 |
pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>; |
| 232 |
pinctrl-names = "default"; |
| 233 |
}; |
| 234 |
|
| 235 |
&pcie { |
| 236 |
reset-gpios = <&gpio GPIOA_8 GPIO_ACTIVE_LOW>; |
| 237 |
}; |
| 238 |
|
| 239 |
&pwm_ab { |
| 240 |
pinctrl-0 = <&pwm_a_e_pins>; |
| 241 |
pinctrl-names = "default"; |
| 242 |
|
| 243 |
status = "okay"; |
| 244 |
}; |
| 245 |
|
| 246 |
&pwm_ef { |
| 247 |
pinctrl-0 = <&pwm_e_pins>; |
| 248 |
pinctrl-names = "default"; |
| 249 |
|
| 250 |
status = "okay"; |
| 251 |
}; |
| 252 |
|
| 253 |
&pwm_AO_cd { |
| 254 |
pinctrl-0 = <&pwm_ao_d_e_pins>; |
| 255 |
pinctrl-names = "default"; |
| 256 |
|
| 257 |
status = "okay"; |
| 258 |
}; |
| 259 |
|
| 260 |
&saradc { |
| 261 |
vref-supply = <&vddao_1v8>; |
| 262 |
|
| 263 |
status = "okay"; |
| 264 |
}; |
| 265 |
|
| 266 |
/* on-module SDIO WiFi */ |
| 267 |
&sd_emmc_a { |
| 268 |
pinctrl-0 = <&sdio_pins>; |
| 269 |
pinctrl-1 = <&sdio_clk_gate_pins>; |
| 270 |
pinctrl-names = "default", "clk-gate"; |
| 271 |
#address-cells = <1>; |
| 272 |
#size-cells = <0>; |
| 273 |
|
| 274 |
bus-width = <4>; |
| 275 |
sd-uhs-sdr104; |
| 276 |
max-frequency = <50000000>; |
| 277 |
|
| 278 |
non-removable; |
| 279 |
disable-wp; |
| 280 |
|
| 281 |
/* WiFi firmware requires power in suspend */ |
| 282 |
keep-power-in-suspend; |
| 283 |
|
| 284 |
mmc-pwrseq = <&sdio_pwrseq>; |
| 285 |
|
| 286 |
vmmc-supply = <&vddao_3v3>; |
| 287 |
vqmmc-supply = <&vddao_3v3>; |
| 288 |
|
| 289 |
status = "okay"; |
| 290 |
|
| 291 |
rtl8822cs: wifi@1 { |
| 292 |
reg = <1>; |
| 293 |
}; |
| 294 |
}; |
| 295 |
|
| 296 |
/* SD card to be enabled in baseboard DT */ |
| 297 |
&sd_emmc_b { |
| 298 |
pinctrl-0 = <&sdcard_c_pins>; |
| 299 |
pinctrl-1 = <&sdcard_clk_gate_c_pins>; |
| 300 |
pinctrl-names = "default", "clk-gate"; |
| 301 |
|
| 302 |
bus-width = <4>; |
| 303 |
cap-sd-highspeed; |
| 304 |
max-frequency = <50000000>; |
| 305 |
disable-wp; |
| 306 |
|
| 307 |
cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>; |
| 308 |
vmmc-supply = <&vddao_3v3>; |
| 309 |
vqmmc-supply = <&vddio_c>; |
| 310 |
}; |
| 311 |
|
| 312 |
/* on-module eMMC */ |
| 313 |
&sd_emmc_c { |
| 314 |
pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>; |
| 315 |
pinctrl-1 = <&emmc_clk_gate_pins>; |
| 316 |
pinctrl-names = "default", "clk-gate"; |
| 317 |
|
| 318 |
bus-width = <8>; |
| 319 |
cap-mmc-highspeed; |
| 320 |
mmc-ddr-1_8v; |
| 321 |
mmc-hs200-1_8v; |
| 322 |
max-frequency = <200000000>; |
| 323 |
disable-wp; |
| 324 |
|
| 325 |
mmc-pwrseq = <&emmc_pwrseq>; |
| 326 |
vmmc-supply = <&vddao_3v3>; |
| 327 |
vqmmc-supply = <&vddao_1v8>; |
| 328 |
|
| 329 |
status = "okay"; |
| 330 |
}; |
| 331 |
|
| 332 |
&tdmif_b { |
| 333 |
status = "okay"; |
| 334 |
}; |
| 335 |
|
| 336 |
&tdmout_b { |
| 337 |
status = "okay"; |
| 338 |
}; |
| 339 |
|
| 340 |
/* on-module UART BT */ |
| 341 |
&uart_A { |
| 342 |
pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; |
| 343 |
pinctrl-names = "default"; |
| 344 |
uart-has-rtscts; |
| 345 |
|
| 346 |
status = "okay"; |
| 347 |
|
| 348 |
bluetooth { |
| 349 |
compatible = "realtek,rtl8822cs-bt"; |
| 350 |
enable-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; |
| 351 |
host-wake-gpios = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>; |
| 352 |
device-wake-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_HIGH>; |
| 353 |
}; |
| 354 |
}; |
| 355 |
|
| 356 |
&uart_AO { |
| 357 |
pinctrl-0 = <&uart_ao_a_pins>; |
| 358 |
pinctrl-names = "default"; |
| 359 |
|
| 360 |
status = "okay"; |
| 361 |
}; |
| 362 |
|
| 363 |
&usb { |
| 364 |
phys = <&usb2_phy0>, <&usb2_phy1>; |
| 365 |
phy-names = "usb2-phy0", "usb2-phy1"; |
| 366 |
}; |