| 1 |
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 |
/* |
| 3 |
* Copyright (c) 2016 Andreas Färber |
| 4 |
* Copyright (c) 2016 BayLibre, Inc. |
| 5 |
* Author: Kevin Hilman <[email protected]> |
| 6 |
*/ |
| 7 |
|
| 8 |
/dts-v1/; |
| 9 |
|
| 10 |
#include "meson-gxbb.dtsi" |
| 11 |
#include <dt-bindings/gpio/gpio.h> |
| 12 |
#include <dt-bindings/sound/meson-aiu.h> |
| 13 |
|
| 14 |
/ { |
| 15 |
compatible = "hardkernel,odroid-c2", "amlogic,meson-gxbb"; |
| 16 |
model = "Hardkernel ODROID-C2"; |
| 17 |
|
| 18 |
aliases { |
| 19 |
serial0 = &uart_AO; |
| 20 |
ethernet0 = ðmac; |
| 21 |
}; |
| 22 |
|
| 23 |
chosen { |
| 24 |
stdout-path = "serial0:115200n8"; |
| 25 |
}; |
| 26 |
|
| 27 |
memory@0 { |
| 28 |
device_type = "memory"; |
| 29 |
reg = <0x0 0x0 0x0 0x80000000>; |
| 30 |
}; |
| 31 |
|
| 32 |
usb_otg_pwr: regulator-usb-pwrs { |
| 33 |
compatible = "regulator-fixed"; |
| 34 |
|
| 35 |
regulator-name = "USB_OTG_PWR"; |
| 36 |
|
| 37 |
regulator-min-microvolt = <5000000>; |
| 38 |
regulator-max-microvolt = <5000000>; |
| 39 |
|
| 40 |
/* |
| 41 |
* signal name from schematics: PWREN |
| 42 |
*/ |
| 43 |
gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>; |
| 44 |
enable-active-high; |
| 45 |
/* |
| 46 |
* signal name from schematics: USB_POWER |
| 47 |
*/ |
| 48 |
vin-supply = <&p5v0>; |
| 49 |
}; |
| 50 |
|
| 51 |
leds { |
| 52 |
compatible = "gpio-leds"; |
| 53 |
led-blue { |
| 54 |
label = "c2:blue:alive"; |
| 55 |
gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>; |
| 56 |
linux,default-trigger = "heartbeat"; |
| 57 |
default-state = "off"; |
| 58 |
}; |
| 59 |
}; |
| 60 |
|
| 61 |
p5v0: regulator-p5v0 { |
| 62 |
compatible = "regulator-fixed"; |
| 63 |
|
| 64 |
regulator-name = "P5V0"; |
| 65 |
regulator-min-microvolt = <5000000>; |
| 66 |
regulator-max-microvolt = <5000000>; |
| 67 |
regulator-always-on; |
| 68 |
}; |
| 69 |
|
| 70 |
hdmi_p5v0: regulator-hdmi-p5v0 { |
| 71 |
compatible = "regulator-fixed"; |
| 72 |
regulator-name = "HDMI_P5V0"; |
| 73 |
regulator-min-microvolt = <5000000>; |
| 74 |
regulator-max-microvolt = <5000000>; |
| 75 |
/* AP2331SA-7 */ |
| 76 |
vin-supply = <&p5v0>; |
| 77 |
}; |
| 78 |
|
| 79 |
tflash_vdd: regulator-tflash-vdd { |
| 80 |
compatible = "regulator-fixed"; |
| 81 |
|
| 82 |
regulator-name = "TFLASH_VDD"; |
| 83 |
regulator-min-microvolt = <3300000>; |
| 84 |
regulator-max-microvolt = <3300000>; |
| 85 |
|
| 86 |
/* |
| 87 |
* signal name from schematics: TFLASH_VDD_EN |
| 88 |
*/ |
| 89 |
gpio = <&gpio GPIOY_12 GPIO_ACTIVE_HIGH>; |
| 90 |
enable-active-high; |
| 91 |
/* U16 RT9179GB */ |
| 92 |
vin-supply = <&vddio_ao3v3>; |
| 93 |
}; |
| 94 |
|
| 95 |
tf_io: gpio-regulator-tf-io { |
| 96 |
compatible = "regulator-gpio"; |
| 97 |
|
| 98 |
regulator-name = "TF_IO"; |
| 99 |
regulator-min-microvolt = <1800000>; |
| 100 |
regulator-max-microvolt = <3300000>; |
| 101 |
|
| 102 |
/* |
| 103 |
* signal name from schematics: TF_3V3N_1V8_EN |
| 104 |
*/ |
| 105 |
gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; |
| 106 |
gpios-states = <0>; |
| 107 |
|
| 108 |
states = <3300000 0>, |
| 109 |
<1800000 1>; |
| 110 |
/* U12/U13 RT9179GB */ |
| 111 |
vin-supply = <&vddio_ao3v3>; |
| 112 |
}; |
| 113 |
|
| 114 |
vcc1v8: regulator-vcc1v8 { |
| 115 |
compatible = "regulator-fixed"; |
| 116 |
regulator-name = "VCC1V8"; |
| 117 |
regulator-min-microvolt = <1800000>; |
| 118 |
regulator-max-microvolt = <1800000>; |
| 119 |
regulator-always-on; |
| 120 |
/* U18 RT9179GB */ |
| 121 |
vin-supply = <&vddio_ao3v3>; |
| 122 |
}; |
| 123 |
|
| 124 |
vcc3v3: regulator-vcc3v3 { |
| 125 |
compatible = "regulator-fixed"; |
| 126 |
regulator-name = "VCC3V3"; |
| 127 |
regulator-min-microvolt = <3300000>; |
| 128 |
regulator-max-microvolt = <3300000>; |
| 129 |
}; |
| 130 |
|
| 131 |
vddio_ao1v8: regulator-vddio-ao1v8 { |
| 132 |
compatible = "regulator-fixed"; |
| 133 |
regulator-name = "VDDIO_AO1V8"; |
| 134 |
regulator-min-microvolt = <1800000>; |
| 135 |
regulator-max-microvolt = <1800000>; |
| 136 |
regulator-always-on; |
| 137 |
/* U17 RT9179GB */ |
| 138 |
vin-supply = <&p5v0>; |
| 139 |
}; |
| 140 |
|
| 141 |
vddio_ao3v3: regulator-vddio-ao3v3 { |
| 142 |
compatible = "regulator-fixed"; |
| 143 |
regulator-name = "VDDIO_AO3V3"; |
| 144 |
regulator-min-microvolt = <3300000>; |
| 145 |
regulator-max-microvolt = <3300000>; |
| 146 |
regulator-always-on; |
| 147 |
/* U11 MP2161GJ-C499 */ |
| 148 |
vin-supply = <&p5v0>; |
| 149 |
}; |
| 150 |
|
| 151 |
ddr3_1v5: regulator-ddr3-1v5 { |
| 152 |
compatible = "regulator-fixed"; |
| 153 |
regulator-name = "DDR3_1V5"; |
| 154 |
regulator-min-microvolt = <1500000>; |
| 155 |
regulator-max-microvolt = <1500000>; |
| 156 |
regulator-always-on; |
| 157 |
/* U15 MP2161GJ-C499 */ |
| 158 |
vin-supply = <&p5v0>; |
| 159 |
}; |
| 160 |
|
| 161 |
emmc_pwrseq: emmc-pwrseq { |
| 162 |
compatible = "mmc-pwrseq-emmc"; |
| 163 |
reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; |
| 164 |
}; |
| 165 |
|
| 166 |
hdmi-connector { |
| 167 |
compatible = "hdmi-connector"; |
| 168 |
type = "a"; |
| 169 |
|
| 170 |
port { |
| 171 |
hdmi_connector_in: endpoint { |
| 172 |
remote-endpoint = <&hdmi_tx_tmds_out>; |
| 173 |
}; |
| 174 |
}; |
| 175 |
}; |
| 176 |
|
| 177 |
sound { |
| 178 |
compatible = "amlogic,gx-sound-card"; |
| 179 |
model = "ODROID-C2"; |
| 180 |
clocks = <&clkc CLKID_MPLL0>, |
| 181 |
<&clkc CLKID_MPLL1>, |
| 182 |
<&clkc CLKID_MPLL2>; |
| 183 |
|
| 184 |
assigned-clocks = <&clkc CLKID_MPLL0>, |
| 185 |
<&clkc CLKID_MPLL1>, |
| 186 |
<&clkc CLKID_MPLL2>; |
| 187 |
assigned-clock-rates = <294912000>, |
| 188 |
<270950400>, |
| 189 |
<393216000>; |
| 190 |
|
| 191 |
dai-link-0 { |
| 192 |
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; |
| 193 |
}; |
| 194 |
|
| 195 |
dai-link-1 { |
| 196 |
sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; |
| 197 |
dai-format = "i2s"; |
| 198 |
mclk-fs = <256>; |
| 199 |
|
| 200 |
codec-0 { |
| 201 |
sound-dai = <&aiu AIU_HDMI CTRL_I2S>; |
| 202 |
}; |
| 203 |
}; |
| 204 |
|
| 205 |
dai-link-2 { |
| 206 |
sound-dai = <&aiu AIU_HDMI CTRL_OUT>; |
| 207 |
|
| 208 |
codec-0 { |
| 209 |
sound-dai = <&hdmi_tx>; |
| 210 |
}; |
| 211 |
}; |
| 212 |
}; |
| 213 |
}; |
| 214 |
|
| 215 |
&aiu { |
| 216 |
status = "okay"; |
| 217 |
}; |
| 218 |
|
| 219 |
&cec_AO { |
| 220 |
status = "okay"; |
| 221 |
pinctrl-0 = <&ao_cec_pins>; |
| 222 |
pinctrl-names = "default"; |
| 223 |
hdmi-phandle = <&hdmi_tx>; |
| 224 |
}; |
| 225 |
|
| 226 |
ðmac { |
| 227 |
status = "okay"; |
| 228 |
pinctrl-0 = <ð_rgmii_pins>; |
| 229 |
pinctrl-names = "default"; |
| 230 |
phy-handle = <ð_phy0>; |
| 231 |
phy-mode = "rgmii"; |
| 232 |
|
| 233 |
amlogic,tx-delay-ns = <2>; |
| 234 |
|
| 235 |
mdio { |
| 236 |
compatible = "snps,dwmac-mdio"; |
| 237 |
#address-cells = <1>; |
| 238 |
#size-cells = <0>; |
| 239 |
|
| 240 |
eth_phy0: ethernet-phy@0 { |
| 241 |
/* Realtek RTL8211F (0x001cc916) */ |
| 242 |
reg = <0>; |
| 243 |
|
| 244 |
reset-assert-us = <10000>; |
| 245 |
reset-deassert-us = <80000>; |
| 246 |
reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>; |
| 247 |
|
| 248 |
interrupt-parent = <&gpio_intc>; |
| 249 |
/* MAC_INTR on GPIOZ_15 */ |
| 250 |
interrupts = <29 IRQ_TYPE_LEVEL_LOW>; |
| 251 |
}; |
| 252 |
}; |
| 253 |
}; |
| 254 |
|
| 255 |
&hdmi_tx { |
| 256 |
status = "okay"; |
| 257 |
pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; |
| 258 |
pinctrl-names = "default"; |
| 259 |
hdmi-supply = <&hdmi_p5v0>; |
| 260 |
}; |
| 261 |
|
| 262 |
&hdmi_tx_tmds_port { |
| 263 |
hdmi_tx_tmds_out: endpoint { |
| 264 |
remote-endpoint = <&hdmi_connector_in>; |
| 265 |
}; |
| 266 |
}; |
| 267 |
|
| 268 |
&i2c_A { |
| 269 |
status = "okay"; |
| 270 |
pinctrl-0 = <&i2c_a_pins>; |
| 271 |
pinctrl-names = "default"; |
| 272 |
}; |
| 273 |
|
| 274 |
&ir { |
| 275 |
status = "okay"; |
| 276 |
pinctrl-0 = <&remote_input_ao_pins>; |
| 277 |
pinctrl-names = "default"; |
| 278 |
linux,rc-map-name = "rc-odroid"; |
| 279 |
}; |
| 280 |
|
| 281 |
&gpio_ao { |
| 282 |
gpio-line-names = "UART TX", "UART RX", "VCCK En", "TF 3V3/1V8 En", |
| 283 |
"USB HUB nRESET", "USB OTG Power En", |
| 284 |
"J7 Header Pin2", "IR In", "J7 Header Pin4", |
| 285 |
"J7 Header Pin6", "J7 Header Pin5", "J7 Header Pin7", |
| 286 |
"HDMI CEC", "SYS LED", |
| 287 |
/* GPIO_TEST_N */ |
| 288 |
""; |
| 289 |
}; |
| 290 |
|
| 291 |
&gpio { |
| 292 |
gpio-line-names = /* Bank GPIOZ */ |
| 293 |
"Eth MDIO", "Eth MDC", "Eth RGMII RX Clk", |
| 294 |
"Eth RX DV", "Eth RX D0", "Eth RX D1", "Eth RX D2", |
| 295 |
"Eth RX D3", "Eth RGMII TX Clk", "Eth TX En", |
| 296 |
"Eth TX D0", "Eth TX D1", "Eth TX D2", "Eth TX D3", |
| 297 |
"Eth PHY nRESET", "Eth PHY Intc", |
| 298 |
/* Bank GPIOH */ |
| 299 |
"HDMI HPD", "HDMI DDC SDA", "HDMI DDC SCL", "", |
| 300 |
/* Bank BOOT */ |
| 301 |
"eMMC D0", "eMMC D1", "eMMC D2", "eMMC D3", "eMMC D4", |
| 302 |
"eMMC D5", "eMMC D6", "eMMC D7", "eMMC Clk", |
| 303 |
"eMMC Reset", "eMMC CMD", |
| 304 |
"", "", "", "", "", "", "", |
| 305 |
/* Bank CARD */ |
| 306 |
"SDCard D1", "SDCard D0", "SDCard CLK", "SDCard CMD", |
| 307 |
"SDCard D3", "SDCard D2", "SDCard Det", |
| 308 |
/* Bank GPIODV */ |
| 309 |
"", "", "", "", "", "", "", "", "", "", "", "", "", |
| 310 |
"", "", "", "", "", "", "", "", "", "", "", |
| 311 |
"I2C A SDA", "I2C A SCK", "I2C B SDA", "I2C B SCK", |
| 312 |
"PWM D", "PWM B", |
| 313 |
/* Bank GPIOY */ |
| 314 |
"Revision Bit0", "Revision Bit1", "", |
| 315 |
"J2 Header Pin35", "", "", "", "J2 Header Pin36", |
| 316 |
"J2 Header Pin31", "", "", "", "TF VDD En", |
| 317 |
"J2 Header Pin32", "J2 Header Pin26", "", "", |
| 318 |
/* Bank GPIOX */ |
| 319 |
"J2 Header Pin29", "J2 Header Pin24", |
| 320 |
"J2 Header Pin23", "J2 Header Pin22", |
| 321 |
"J2 Header Pin21", "J2 Header Pin18", |
| 322 |
"J2 Header Pin33", "J2 Header Pin19", |
| 323 |
"J2 Header Pin16", "J2 Header Pin15", |
| 324 |
"J2 Header Pin12", "J2 Header Pin13", |
| 325 |
"J2 Header Pin8", "J2 Header Pin10", |
| 326 |
"", "", "", "", "", |
| 327 |
"J2 Header Pin11", "", "J2 Header Pin7", "", |
| 328 |
/* Bank GPIOCLK */ |
| 329 |
"", "", "", ""; |
| 330 |
}; |
| 331 |
|
| 332 |
&saradc { |
| 333 |
status = "okay"; |
| 334 |
vref-supply = <&vcc1v8>; |
| 335 |
}; |
| 336 |
|
| 337 |
&scpi_clocks { |
| 338 |
status = "disabled"; |
| 339 |
}; |
| 340 |
|
| 341 |
/* SD */ |
| 342 |
&sd_emmc_b { |
| 343 |
status = "okay"; |
| 344 |
pinctrl-0 = <&sdcard_pins>; |
| 345 |
pinctrl-1 = <&sdcard_clk_gate_pins>; |
| 346 |
pinctrl-names = "default", "clk-gate"; |
| 347 |
|
| 348 |
bus-width = <4>; |
| 349 |
cap-sd-highspeed; |
| 350 |
max-frequency = <100000000>; |
| 351 |
disable-wp; |
| 352 |
|
| 353 |
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>; |
| 354 |
|
| 355 |
vmmc-supply = <&tflash_vdd>; |
| 356 |
vqmmc-supply = <&tf_io>; |
| 357 |
}; |
| 358 |
|
| 359 |
/* eMMC */ |
| 360 |
&sd_emmc_c { |
| 361 |
status = "okay"; |
| 362 |
pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>; |
| 363 |
pinctrl-1 = <&emmc_clk_gate_pins>; |
| 364 |
pinctrl-names = "default", "clk-gate"; |
| 365 |
|
| 366 |
bus-width = <8>; |
| 367 |
max-frequency = <200000000>; |
| 368 |
non-removable; |
| 369 |
disable-wp; |
| 370 |
cap-mmc-highspeed; |
| 371 |
mmc-ddr-1_8v; |
| 372 |
mmc-hs200-1_8v; |
| 373 |
|
| 374 |
mmc-pwrseq = <&emmc_pwrseq>; |
| 375 |
vmmc-supply = <&vcc3v3>; |
| 376 |
vqmmc-supply = <&vcc1v8>; |
| 377 |
}; |
| 378 |
|
| 379 |
&uart_AO { |
| 380 |
status = "okay"; |
| 381 |
pinctrl-0 = <&uart_ao_a_pins>; |
| 382 |
pinctrl-names = "default"; |
| 383 |
}; |
| 384 |
|
| 385 |
&usb0_phy { |
| 386 |
status = "disabled"; |
| 387 |
phy-supply = <&usb_otg_pwr>; |
| 388 |
}; |
| 389 |
|
| 390 |
&usb1_phy { |
| 391 |
status = "okay"; |
| 392 |
phy-supply = <&usb_otg_pwr>; |
| 393 |
}; |
| 394 |
|
| 395 |
&usb0 { |
| 396 |
status = "disabled"; |
| 397 |
}; |
| 398 |
|
| 399 |
&usb1 { |
| 400 |
dr_mode = "host"; |
| 401 |
#address-cells = <1>; |
| 402 |
#size-cells = <0>; |
| 403 |
status = "okay"; |
| 404 |
|
| 405 |
hub@1 { |
| 406 |
/* Genesys Logic GL852G USB 2.0 hub */ |
| 407 |
compatible = "usb5e3,610"; |
| 408 |
reg = <1>; |
| 409 |
vdd-supply = <&p5v0>; |
| 410 |
reset-gpios = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>; |
| 411 |
}; |
| 412 |
}; |