blob: b46ef985bb4449aaea2a63aa835cf81d7965e5f5 [file] [log] [blame]
Neil Armstrong5b3da7f2018-06-05 10:10:44 +02001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
Beniamino Galvanibfcef282016-05-08 08:30:16 +02002/*
3 * Copyright (c) 2016 Andreas Färber
4 * Copyright (c) 2016 BayLibre, Inc.
5 * Author: Kevin Hilman <khilman@kernel.org>
Beniamino Galvanibfcef282016-05-08 08:30:16 +02006 */
7
8/dts-v1/;
9
10#include "meson-gxbb.dtsi"
Beniamino Galvanidd838402016-08-16 11:49:48 +020011#include <dt-bindings/gpio/gpio.h>
Beniamino Galvanibfcef282016-05-08 08:30:16 +020012
13/ {
14 compatible = "hardkernel,odroid-c2", "amlogic,meson-gxbb";
15 model = "Hardkernel ODROID-C2";
Neil Armstrong7d750c32018-04-11 17:40:40 +020016
Beniamino Galvanibfcef282016-05-08 08:30:16 +020017 aliases {
18 serial0 = &uart_AO;
Neil Armstrong5b3da7f2018-06-05 10:10:44 +020019 ethernet0 = &ethmac;
Beniamino Galvanibfcef282016-05-08 08:30:16 +020020 };
21
22 chosen {
23 stdout-path = "serial0:115200n8";
24 };
25
26 memory@0 {
27 device_type = "memory";
28 reg = <0x0 0x0 0x0 0x80000000>;
29 };
Beniamino Galvanidd838402016-08-16 11:49:48 +020030
Heiner Kallweita3b02a12017-04-12 20:28:36 +020031 usb_otg_pwr: regulator-usb-pwrs {
32 compatible = "regulator-fixed";
33
34 regulator-name = "USB_OTG_PWR";
35
36 regulator-min-microvolt = <5000000>;
37 regulator-max-microvolt = <5000000>;
38
Jerome Brunetdd5f2352020-03-05 12:12:38 +010039 /*
40 * signal name from schematics: PWREN
41 */
Heiner Kallweita3b02a12017-04-12 20:28:36 +020042 gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
43 enable-active-high;
Jerome Brunetdd5f2352020-03-05 12:12:38 +010044 /*
45 * signal name from schematics: USB_POWER
46 */
47 vin-supply = <&p5v0>;
Heiner Kallweita3b02a12017-04-12 20:28:36 +020048 };
49
Beniamino Galvanidd838402016-08-16 11:49:48 +020050 leds {
51 compatible = "gpio-leds";
52 blue {
53 label = "c2:blue:alive";
54 gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>;
55 linux,default-trigger = "heartbeat";
56 default-state = "off";
57 };
58 };
Heiner Kallweita3b02a12017-04-12 20:28:36 +020059
Jerome Brunetdd5f2352020-03-05 12:12:38 +010060 p5v0: regulator-p5v0 {
61 compatible = "regulator-fixed";
62
63 regulator-name = "P5V0";
64 regulator-min-microvolt = <5000000>;
65 regulator-max-microvolt = <5000000>;
66 regulator-always-on;
67 };
68
69 hdmi_p5v0: regulator-hdmi_p5v0 {
70 compatible = "regulator-fixed";
71 regulator-name = "HDMI_P5V0";
72 regulator-min-microvolt = <5000000>;
73 regulator-max-microvolt = <5000000>;
74 /* AP2331SA-7 */
75 vin-supply = <&p5v0>;
76 };
77
Heiner Kallweita3b02a12017-04-12 20:28:36 +020078 tflash_vdd: regulator-tflash_vdd {
Heiner Kallweita3b02a12017-04-12 20:28:36 +020079 compatible = "regulator-fixed";
80
81 regulator-name = "TFLASH_VDD";
82 regulator-min-microvolt = <3300000>;
83 regulator-max-microvolt = <3300000>;
84
Jerome Brunetdd5f2352020-03-05 12:12:38 +010085 /*
86 * signal name from schematics: TFLASH_VDD_EN
87 */
Beniamino Galvani4a63a752017-07-10 00:30:03 +020088 gpio = <&gpio GPIOY_12 GPIO_ACTIVE_HIGH>;
Heiner Kallweita3b02a12017-04-12 20:28:36 +020089 enable-active-high;
Jerome Brunetdd5f2352020-03-05 12:12:38 +010090 /* U16 RT9179GB */
91 vin-supply = <&vddio_ao3v3>;
Heiner Kallweita3b02a12017-04-12 20:28:36 +020092 };
93
94 tf_io: gpio-regulator-tf_io {
95 compatible = "regulator-gpio";
96
97 regulator-name = "TF_IO";
98 regulator-min-microvolt = <1800000>;
99 regulator-max-microvolt = <3300000>;
100
101 /*
102 * signal name from schematics: TF_3V3N_1V8_EN
103 */
104 gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
105 gpios-states = <0>;
106
Jerome Brunetdd5f2352020-03-05 12:12:38 +0100107 states = <3300000 0>,
108 <1800000 1>;
109 /* U12/U13 RT9179GB */
110 vin-supply = <&vddio_ao3v3>;
Heiner Kallweita3b02a12017-04-12 20:28:36 +0200111 };
112
113 vcc1v8: regulator-vcc1v8 {
114 compatible = "regulator-fixed";
115 regulator-name = "VCC1V8";
116 regulator-min-microvolt = <1800000>;
117 regulator-max-microvolt = <1800000>;
Jerome Brunetdd5f2352020-03-05 12:12:38 +0100118 regulator-always-on;
119 /* U18 RT9179GB */
120 vin-supply = <&vddio_ao3v3>;
Heiner Kallweita3b02a12017-04-12 20:28:36 +0200121 };
122
123 vcc3v3: regulator-vcc3v3 {
124 compatible = "regulator-fixed";
125 regulator-name = "VCC3V3";
126 regulator-min-microvolt = <3300000>;
127 regulator-max-microvolt = <3300000>;
128 };
129
Jerome Brunetdd5f2352020-03-05 12:12:38 +0100130 vddio_ao1v8: regulator-vddio-ao1v8 {
131 compatible = "regulator-fixed";
132 regulator-name = "VDDIO_AO1V8";
133 regulator-min-microvolt = <1800000>;
134 regulator-max-microvolt = <1800000>;
135 regulator-always-on;
136 /* U17 RT9179GB */
137 vin-supply = <&p5v0>;
138 };
139
140 vddio_ao3v3: regulator-vddio-ao3v3 {
141 compatible = "regulator-fixed";
142 regulator-name = "VDDIO_AO3V3";
143 regulator-min-microvolt = <3300000>;
144 regulator-max-microvolt = <3300000>;
145 regulator-always-on;
146 /* U11 MP2161GJ-C499 */
147 vin-supply = <&p5v0>;
148 };
149
150 ddr3_1v5: regulator-ddr3_1v5 {
151 compatible = "regulator-fixed";
152 regulator-name = "DDR3_1V5";
153 regulator-min-microvolt = <1500000>;
154 regulator-max-microvolt = <1500000>;
155 regulator-always-on;
156 /* U15 MP2161GJ-C499 */
157 vin-supply = <&p5v0>;
158 };
159
Heiner Kallweita3b02a12017-04-12 20:28:36 +0200160 emmc_pwrseq: emmc-pwrseq {
161 compatible = "mmc-pwrseq-emmc";
162 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
163 };
Neil Armstrong7d750c32018-04-11 17:40:40 +0200164
165 hdmi-connector {
166 compatible = "hdmi-connector";
167 type = "a";
168
169 port {
170 hdmi_connector_in: endpoint {
171 remote-endpoint = <&hdmi_tx_tmds_out>;
172 };
173 };
174 };
175};
176
177&cec_AO {
178 status = "okay";
179 pinctrl-0 = <&ao_cec_pins>;
180 pinctrl-names = "default";
181 hdmi-phandle = <&hdmi_tx>;
Heiner Kallweita3b02a12017-04-12 20:28:36 +0200182};
183
Beniamino Galvanidd838402016-08-16 11:49:48 +0200184&ethmac {
185 status = "okay";
Heiner Kallweita3b02a12017-04-12 20:28:36 +0200186 pinctrl-0 = <&eth_rgmii_pins>;
Beniamino Galvanidd838402016-08-16 11:49:48 +0200187 pinctrl-names = "default";
Heiner Kallweita3b02a12017-04-12 20:28:36 +0200188 phy-handle = <&eth_phy0>;
Beniamino Galvani4a63a752017-07-10 00:30:03 +0200189 phy-mode = "rgmii";
190
Beniamino Galvani4a63a752017-07-10 00:30:03 +0200191 amlogic,tx-delay-ns = <2>;
Heiner Kallweita3b02a12017-04-12 20:28:36 +0200192
193 mdio {
194 compatible = "snps,dwmac-mdio";
195 #address-cells = <1>;
196 #size-cells = <0>;
197
198 eth_phy0: ethernet-phy@0 {
Neil Armstrong7d750c32018-04-11 17:40:40 +0200199 /* Realtek RTL8211F (0x001cc916) */
Heiner Kallweita3b02a12017-04-12 20:28:36 +0200200 reg = <0>;
Jerome Brunetdd5f2352020-03-05 12:12:38 +0100201
202 reset-assert-us = <10000>;
203 reset-deassert-us = <30000>;
204 reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
205
Neil Armstrong7d750c32018-04-11 17:40:40 +0200206 interrupt-parent = <&gpio_intc>;
207 /* MAC_INTR on GPIOZ_15 */
208 interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
Heiner Kallweita3b02a12017-04-12 20:28:36 +0200209 };
210 };
211};
212
Neil Armstrong48622152017-10-12 15:50:30 +0200213&gpio_ao {
214 /*
215 * WARNING: The USB Hub on the Odroid-C2 needs a reset signal
216 * to be turned high in order to be detected by the USB Controller
217 * This signal should be handled by a USB specific power sequence
218 * in order to reset the Hub when USB bus is powered down.
219 */
220 usb-hub {
221 gpio-hog;
222 gpios = <GPIOAO_4 GPIO_ACTIVE_HIGH>;
223 output-high;
224 line-name = "usb-hub-reset";
225 };
226};
227
Neil Armstrong7d750c32018-04-11 17:40:40 +0200228&hdmi_tx {
229 status = "okay";
230 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
231 pinctrl-names = "default";
Jerome Brunetdd5f2352020-03-05 12:12:38 +0100232 hdmi-supply = <&hdmi_p5v0>;
Neil Armstrong7d750c32018-04-11 17:40:40 +0200233};
234
235&hdmi_tx_tmds_port {
236 hdmi_tx_tmds_out: endpoint {
237 remote-endpoint = <&hdmi_connector_in>;
238 };
239};
240
Neil Armstrong48622152017-10-12 15:50:30 +0200241&i2c_A {
242 status = "okay";
243 pinctrl-0 = <&i2c_a_pins>;
244 pinctrl-names = "default";
245};
246
247&ir {
248 status = "okay";
249 pinctrl-0 = <&remote_input_ao_pins>;
250 pinctrl-names = "default";
Neil Armstrong3a7d6a92020-04-20 15:44:41 +0200251 linux,rc-map-name = "rc-odroid";
Neil Armstrong48622152017-10-12 15:50:30 +0200252};
253
Jerome Brunetdd5f2352020-03-05 12:12:38 +0100254&gpio_ao {
Beniamino Galvani4a63a752017-07-10 00:30:03 +0200255 gpio-line-names = "UART TX", "UART RX", "VCCK En", "TF 3V3/1V8 En",
256 "USB HUB nRESET", "USB OTG Power En",
257 "J7 Header Pin2", "IR In", "J7 Header Pin4",
258 "J7 Header Pin6", "J7 Header Pin5", "J7 Header Pin7",
Neil Armstrong7d750c32018-04-11 17:40:40 +0200259 "HDMI CEC", "SYS LED",
260 /* GPIO_TEST_N */
261 "";
Beniamino Galvani4a63a752017-07-10 00:30:03 +0200262};
263
Jerome Brunetdd5f2352020-03-05 12:12:38 +0100264&gpio {
Beniamino Galvani4a63a752017-07-10 00:30:03 +0200265 gpio-line-names = /* Bank GPIOZ */
266 "Eth MDIO", "Eth MDC", "Eth RGMII RX Clk",
267 "Eth RX DV", "Eth RX D0", "Eth RX D1", "Eth RX D2",
268 "Eth RX D3", "Eth RGMII TX Clk", "Eth TX En",
269 "Eth TX D0", "Eth TX D1", "Eth TX D2", "Eth TX D3",
270 "Eth PHY nRESET", "Eth PHY Intc",
271 /* Bank GPIOH */
272 "HDMI HPD", "HDMI DDC SDA", "HDMI DDC SCL", "",
273 /* Bank BOOT */
274 "eMMC D0", "eMMC D1", "eMMC D2", "eMMC D3", "eMMC D4",
275 "eMMC D5", "eMMC D6", "eMMC D7", "eMMC Clk",
276 "eMMC Reset", "eMMC CMD",
277 "", "", "", "", "", "", "",
278 /* Bank CARD */
279 "SDCard D1", "SDCard D0", "SDCard CLK", "SDCard CMD",
280 "SDCard D3", "SDCard D2", "SDCard Det",
281 /* Bank GPIODV */
282 "", "", "", "", "", "", "", "", "", "", "", "", "",
283 "", "", "", "", "", "", "", "", "", "", "",
284 "I2C A SDA", "I2C A SCK", "I2C B SDA", "I2C B SCK",
285 "PWM D", "PWM B",
286 /* Bank GPIOY */
287 "Revision Bit0", "Revision Bit1", "",
288 "J2 Header Pin35", "", "", "", "J2 Header Pin36",
289 "J2 Header Pin31", "", "", "", "TF VDD En",
290 "J2 Header Pin32", "J2 Header Pin26", "", "",
291 /* Bank GPIOX */
292 "J2 Header Pin29", "J2 Header Pin24",
293 "J2 Header Pin23", "J2 Header Pin22",
294 "J2 Header Pin21", "J2 Header Pin18",
295 "J2 Header Pin33", "J2 Header Pin19",
296 "J2 Header Pin16", "J2 Header Pin15",
297 "J2 Header Pin12", "J2 Header Pin13",
298 "J2 Header Pin8", "J2 Header Pin10",
299 "", "", "", "", "",
Neil Armstrong7d750c32018-04-11 17:40:40 +0200300 "J2 Header Pin11", "", "J2 Header Pin7", "",
Beniamino Galvani4a63a752017-07-10 00:30:03 +0200301 /* Bank GPIOCLK */
Neil Armstrong7d750c32018-04-11 17:40:40 +0200302 "", "", "", "";
Beniamino Galvani4a63a752017-07-10 00:30:03 +0200303};
304
Beniamino Galvani4a63a752017-07-10 00:30:03 +0200305&saradc {
306 status = "okay";
307 vref-supply = <&vcc1v8>;
308};
309
Neil Armstrong48622152017-10-12 15:50:30 +0200310&scpi_clocks {
311 status = "disabled";
312};
313
Heiner Kallweita3b02a12017-04-12 20:28:36 +0200314/* SD */
315&sd_emmc_b {
316 status = "okay";
317 pinctrl-0 = <&sdcard_pins>;
Neil Armstrong7d750c32018-04-11 17:40:40 +0200318 pinctrl-1 = <&sdcard_clk_gate_pins>;
319 pinctrl-names = "default", "clk-gate";
Heiner Kallweita3b02a12017-04-12 20:28:36 +0200320
321 bus-width = <4>;
322 cap-sd-highspeed;
Jerome Brunetdd5f2352020-03-05 12:12:38 +0100323 sd-uhs-sdr12;
324 sd-uhs-sdr25;
325 sd-uhs-sdr50;
326 sd-uhs-ddr50;
Heiner Kallweita3b02a12017-04-12 20:28:36 +0200327 max-frequency = <100000000>;
328 disable-wp;
329
Jerome Brunetdd5f2352020-03-05 12:12:38 +0100330 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
Heiner Kallweita3b02a12017-04-12 20:28:36 +0200331
332 vmmc-supply = <&tflash_vdd>;
333 vqmmc-supply = <&tf_io>;
334};
335
336/* eMMC */
337&sd_emmc_c {
338 status = "okay";
Neil Armstrong7d750c32018-04-11 17:40:40 +0200339 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
340 pinctrl-1 = <&emmc_clk_gate_pins>;
341 pinctrl-names = "default", "clk-gate";
Heiner Kallweita3b02a12017-04-12 20:28:36 +0200342
343 bus-width = <8>;
Jerome Brunetdd5f2352020-03-05 12:12:38 +0100344 max-frequency = <200000000>;
Heiner Kallweita3b02a12017-04-12 20:28:36 +0200345 non-removable;
346 disable-wp;
347 cap-mmc-highspeed;
348 mmc-ddr-1_8v;
349 mmc-hs200-1_8v;
350
351 mmc-pwrseq = <&emmc_pwrseq>;
352 vmmc-supply = <&vcc3v3>;
353 vqmmc-supply = <&vcc1v8>;
Beniamino Galvanibfcef282016-05-08 08:30:16 +0200354};
Neil Armstrong48622152017-10-12 15:50:30 +0200355
356&uart_AO {
357 status = "okay";
358 pinctrl-0 = <&uart_ao_a_pins>;
359 pinctrl-names = "default";
360};
361
362&usb0_phy {
Jerome Brunetdd5f2352020-03-05 12:12:38 +0100363 status = "disabled";
Neil Armstrong48622152017-10-12 15:50:30 +0200364 phy-supply = <&usb_otg_pwr>;
365};
366
367&usb1_phy {
368 status = "okay";
Neil Armstrong7d750c32018-04-11 17:40:40 +0200369 phy-supply = <&usb_otg_pwr>;
Neil Armstrong48622152017-10-12 15:50:30 +0200370};
371
372&usb0 {
Jerome Brunetdd5f2352020-03-05 12:12:38 +0100373 status = "disabled";
Neil Armstrong48622152017-10-12 15:50:30 +0200374};
375
376&usb1 {
377 status = "okay";
378};