blob: a83a90497857662d7d0fc51e9d530949ffc51f79 [file] [log] [blame]
Tom Rini6bb92fc2024-05-20 09:54:58 -06001// SPDX-License-Identifier: GPL-2.0-only OR MIT
Tom Rini53633a82024-02-29 12:33:36 -05002/*
Tom Rini6bb92fc2024-05-20 09:54:58 -06003 * Copyright (C) 2022-2024 PHYTEC Messtechnik GmbH
Tom Rini53633a82024-02-29 12:33:36 -05004 * Author: Wadim Egorov <w.egorov@phytec.de>
5 *
6 * Product homepage:
7 * https://www.phytec.com/product/phyboard-am62x
8 */
9
10#include <dt-bindings/gpio/gpio.h>
11#include <dt-bindings/input/input.h>
12#include <dt-bindings/leds/common.h>
13#include <dt-bindings/net/ti-dp83867.h>
14#include "k3-am625.dtsi"
15#include "k3-am62-phycore-som.dtsi"
16
17/ {
18 compatible = "phytec,am625-phyboard-lyra-rdk",
19 "phytec,am62-phycore-som", "ti,am625";
20 model = "PHYTEC phyBOARD-Lyra AM625";
21
22 aliases {
23 serial2 = &main_uart0;
24 serial3 = &main_uart1;
25 mmc1 = &sdhci1;
26 usb0 = &usb0;
27 usb1 = &usb1;
28 ethernet1 = &cpsw_port2;
29 };
30
31 can_tc1: can-phy0 {
32 compatible = "ti,tcan1042";
33 #phy-cells = <0>;
34 max-bitrate = <5000000>;
35 standby-gpios = <&gpio_exp 1 GPIO_ACTIVE_HIGH>;
36 };
37
Tom Rini93743d22024-04-01 09:08:13 -040038 hdmi0: connector-hdmi {
39 compatible = "hdmi-connector";
40 label = "hdmi";
41 type = "a";
42
43 port {
44 hdmi_connector_in: endpoint {
45 remote-endpoint = <&sii9022_out>;
46 };
47 };
48 };
49
Tom Rini53633a82024-02-29 12:33:36 -050050 keys {
51 compatible = "gpio-keys";
52 autorepeat;
53 pinctrl-names = "default";
54 pinctrl-0 = <&gpio_keys_pins_default>;
55
56 key-home {
57 label = "home";
58 linux,code = <KEY_HOME>;
59 gpios = <&main_gpio1 23 GPIO_ACTIVE_HIGH>;
60 };
61
62 key-menu {
63 label = "menu";
64 linux,code = <KEY_MENU>;
65 gpios = <&gpio_exp 4 GPIO_ACTIVE_HIGH>;
66 };
67 };
68
69 leds {
70 compatible = "gpio-leds";
71 pinctrl-names = "default";
72 pinctrl-0 = <&leds_pins_default>, <&user_leds_pins_default>;
73
74 led-1 {
75 gpios = <&main_gpio0 32 GPIO_ACTIVE_HIGH>;
76 linux,default-trigger = "mmc0";
77 };
78
79 led-2 {
80 gpios = <&gpio_exp 2 GPIO_ACTIVE_HIGH>;
81 linux,default-trigger = "mmc1";
82 };
83 };
84
85 vcc_3v3_mmc: regulator-vcc-3v3-mmc {
86 compatible = "regulator-fixed";
87 regulator-name = "VCC_3V3_MMC";
88 regulator-min-microvolt = <3300000>;
89 regulator-max-microvolt = <3300000>;
90 regulator-always-on;
91 regulator-boot-on;
92 };
93};
94
95&main_pmx0 {
96 gpio_keys_pins_default: gpio-keys-default-pins {
97 pinctrl-single,pins = <
98 AM62X_IOPAD(0x1d4, PIN_INPUT, 7) /* (B15) UART0_RTSn.GPIO1_23 */
99 >;
100 };
101
102 gpio_exp_int_pins_default: gpio-exp-int-default-pins {
103 pinctrl-single,pins = <
104 AM62X_IOPAD(0x244, PIN_INPUT, 7) /* (C17) MMC1_SDWP.GPIO1_49 */
105 >;
106 };
107
Tom Rini93743d22024-04-01 09:08:13 -0400108 hdmi_int_pins_default: hdmi-int-default-pins {
109 pinctrl-single,pins = <
110 AM62X_IOPAD(0x040, PIN_INPUT, 7) /* (N23) GPMC0_AD1.GPIO0_16 */
111 >;
112 };
113
114 main_dss0_pins_default: main-dss0-default-pins {
115 pinctrl-single,pins = <
116 AM62X_IOPAD(0x0b8, PIN_OUTPUT, 0) /* (U22) VOUT0_DATA0 */
117 AM62X_IOPAD(0x0bc, PIN_OUTPUT, 0) /* (V24) VOUT0_DATA1 */
118 AM62X_IOPAD(0x0e0, PIN_OUTPUT, 0) /* (V20) VOUT0_DATA10 */
119 AM62X_IOPAD(0x0e4, PIN_OUTPUT, 0) /* (AA23) VOUT0_DATA11 */
120 AM62X_IOPAD(0x0e8, PIN_OUTPUT, 0) /* (AB25) VOUT0_DATA12 */
121 AM62X_IOPAD(0x0ec, PIN_OUTPUT, 0) /* (AA24) VOUT0_DATA13 */
122 AM62X_IOPAD(0x0f0, PIN_OUTPUT, 0) /* (Y22) VOUT0_DATA14 */
123 AM62X_IOPAD(0x0f4, PIN_OUTPUT, 0) /* (AA21) VOUT0_DATA15 */
124 AM62X_IOPAD(0x0c0, PIN_OUTPUT, 0) /* (W25) VOUT0_DATA2 */
125 AM62X_IOPAD(0x0c4, PIN_OUTPUT, 0) /* (W24) VOUT0_DATA3 */
126 AM62X_IOPAD(0x0c8, PIN_OUTPUT, 0) /* (Y25) VOUT0_DATA4 */
127 AM62X_IOPAD(0x0cc, PIN_OUTPUT, 0) /* (Y24) VOUT0_DATA5 */
128 AM62X_IOPAD(0x0d0, PIN_OUTPUT, 0) /* (Y23) VOUT0_DATA6 */
129 AM62X_IOPAD(0x0d4, PIN_OUTPUT, 0) /* (AA25) VOUT0_DATA7 */
130 AM62X_IOPAD(0x0d8, PIN_OUTPUT, 0) /* (V21) VOUT0_DATA8 */
131 AM62X_IOPAD(0x0dc, PIN_OUTPUT, 0) /* (W21) VOUT0_DATA9 */
132 AM62X_IOPAD(0x0fc, PIN_OUTPUT, 0) /* (Y20) VOUT0_DE */
133 AM62X_IOPAD(0x0f8, PIN_OUTPUT, 0) /* (AB24) VOUT0_HSYNC */
134 AM62X_IOPAD(0x104, PIN_OUTPUT, 0) /* (AC24) VOUT0_PCLK */
135 AM62X_IOPAD(0x100, PIN_OUTPUT, 0) /* (AC25) VOUT0_VSYNC */
136 >;
137 };
138
Tom Rini53633a82024-02-29 12:33:36 -0500139 main_i2c1_pins_default: main-i2c1-default-pins {
140 pinctrl-single,pins = <
141 AM62X_IOPAD(0x1e8, PIN_INPUT_PULLUP, 0) /* (B17) I2C1_SCL */
142 AM62X_IOPAD(0x1ec, PIN_INPUT_PULLUP, 0) /* (A17) I2C1_SDA */
143 >;
144 };
145
146 main_mcan0_pins_default: main-mcan0-default-pins {
147 pinctrl-single,pins = <
148 AM62X_IOPAD(0x1dc, PIN_INPUT, 0) /* (E15) MCAN0_RX */
149 AM62X_IOPAD(0x1d8, PIN_OUTPUT, 0) /* (C15) MCAN0_TX */
150 >;
151 };
152
153 main_mmc1_pins_default: main-mmc1-default-pins {
154 pinctrl-single,pins = <
155 AM62X_IOPAD(0x23c, PIN_INPUT_PULLUP, 0) /* (A21) MMC1_CMD */
156 AM62X_IOPAD(0x234, PIN_INPUT_PULLDOWN, 0) /* (B22) MMC1_CLK */
157 AM62X_IOPAD(0x230, PIN_INPUT_PULLUP, 0) /* (A22) MMC1_DAT0 */
158 AM62X_IOPAD(0x22c, PIN_INPUT_PULLUP, 0) /* (B21) MMC1_DAT1 */
159 AM62X_IOPAD(0x228, PIN_INPUT_PULLUP, 0) /* (C21) MMC1_DAT2 */
160 AM62X_IOPAD(0x224, PIN_INPUT_PULLUP, 0) /* (D22) MMC1_DAT3 */
161 AM62X_IOPAD(0x240, PIN_INPUT_PULLUP, 0) /* (D17) MMC1_SDCD */
162 >;
163 };
164
165 main_rgmii2_pins_default: main-rgmii2-default-pins {
166 pinctrl-single,pins = <
167 AM62X_IOPAD(0x184, PIN_INPUT, 0) /* (AE23) RGMII2_RD0 */
168 AM62X_IOPAD(0x188, PIN_INPUT, 0) /* (AB20) RGMII2_RD1 */
169 AM62X_IOPAD(0x18c, PIN_INPUT, 0) /* (AC21) RGMII2_RD2 */
170 AM62X_IOPAD(0x190, PIN_INPUT, 0) /* (AE22) RGMII2_RD3 */
171 AM62X_IOPAD(0x180, PIN_INPUT, 0) /* (AD23) RGMII2_RXC */
172 AM62X_IOPAD(0x17c, PIN_INPUT, 0) /* (AD22) RGMII2_RX_CTL */
173 AM62X_IOPAD(0x16c, PIN_OUTPUT, 0) /* (Y18) RGMII2_TD0 */
174 AM62X_IOPAD(0x170, PIN_OUTPUT, 0) /* (AA18) RGMII2_TD1 */
175 AM62X_IOPAD(0x174, PIN_OUTPUT, 0) /* (AD21) RGMII2_TD2 */
176 AM62X_IOPAD(0x178, PIN_OUTPUT, 0) /* (AC20) RGMII2_TD3 */
177 AM62X_IOPAD(0x168, PIN_OUTPUT, 0) /* (AE21) RGMII2_TXC */
178 AM62X_IOPAD(0x164, PIN_OUTPUT, 0) /* (AA19) RGMII2_TX_CTL */
179 >;
180 };
181
182 main_uart0_pins_default: main-uart0-default-pins {
183 pinctrl-single,pins = <
184 AM62X_IOPAD(0x1c8, PIN_INPUT, 0) /* (D14) UART0_RXD */
185 AM62X_IOPAD(0x1cc, PIN_OUTPUT, 0) /* (E14) UART0_TXD */
186 >;
187 };
188
189 main_uart1_pins_default: main-uart1-default-pins {
190 pinctrl-single,pins = <
191 AM62X_IOPAD(0x194, PIN_INPUT, 2) /* (B19) MCASP0_AXR3.UART1_CTSn */
192 AM62X_IOPAD(0x198, PIN_OUTPUT, 2) /* (A19) MCASP0_AXR2.UART1_RTSn */
193 AM62X_IOPAD(0x1ac, PIN_INPUT, 2) /* (E19) MCASP0_AFSR.UART1_RXD */
194 AM62X_IOPAD(0x1b0, PIN_OUTPUT, 2) /* (A20) MCASP0_ACLKR.UART1_TXD */
195 >;
196 };
197
198 main_usb1_pins_default: main-usb1-default-pins {
199 pinctrl-single,pins = <
200 AM62X_IOPAD(0x258, PIN_OUTPUT, 0) /* (F18) USB1_DRVVBUS */
201 >;
202 };
203
204 user_leds_pins_default: user-leds-default-pins {
205 pinctrl-single,pins = <
206 AM62X_IOPAD(0x084, PIN_OUTPUT, 7) /* (L23) GPMC0_ADVn_ALE.GPIO0_32 */
207 >;
208 };
209};
210
211&cpsw3g {
212 pinctrl-names = "default";
213 pinctrl-0 = <&main_rgmii1_pins_default>, <&main_rgmii2_pins_default>;
214};
215
216&cpsw_port2 {
217 phy-mode = "rgmii-rxid";
218 phy-handle = <&cpsw3g_phy3>;
219};
220
221&cpsw3g_mdio {
222 cpsw3g_phy3: ethernet-phy@3 {
223 compatible = "ethernet-phy-id2000.a231", "ethernet-phy-ieee802.3-c22";
224 reg = <3>;
Tom Rini6bb92fc2024-05-20 09:54:58 -0600225 ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>;
Tom Rini53633a82024-02-29 12:33:36 -0500226 ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
227 ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
228 };
229};
230
Tom Rini93743d22024-04-01 09:08:13 -0400231&dss {
232 pinctrl-names = "default";
233 pinctrl-0 = <&main_dss0_pins_default>;
234 status = "okay";
235};
236
237&dss_ports {
238 #address-cells = <1>;
239 #size-cells = <0>;
240
241 /* VP2: DPI/HDMI Output */
242 port@1 {
243 reg = <1>;
244
245 dpi1_out: endpoint {
246 remote-endpoint = <&sii9022_in>;
247 };
248 };
249};
250
Tom Rini53633a82024-02-29 12:33:36 -0500251&main_i2c1 {
252 pinctrl-names = "default";
253 pinctrl-0 = <&main_i2c1_pins_default>;
Tom Rini93743d22024-04-01 09:08:13 -0400254 clock-frequency = <100000>;
Tom Rini53633a82024-02-29 12:33:36 -0500255 status = "okay";
256
257 gpio_exp: gpio-expander@21 {
258 pinctrl-names = "default";
259 pinctrl-0 = <&gpio_exp_int_pins_default>;
260 compatible = "nxp,pcf8574";
261 reg = <0x21>;
262 interrupt-parent = <&main_gpio1>;
263 interrupts = <49 0>;
264 #gpio-cells = <2>;
265 gpio-controller;
266 interrupt-controller;
267 #interrupt-cells = <2>;
Tom Rini93743d22024-04-01 09:08:13 -0400268 gpio-line-names = "", "GPIO1_CAN0_nEN",
Tom Rini53633a82024-02-29 12:33:36 -0500269 "GPIO2_LED2", "GPIO3_LVDS_GPIO",
270 "GPIO4_BUT2", "GPIO5_LVDS_BKLT_EN",
271 "GPIO6_ETH1_USER_RESET", "GPIO7_AUDIO_USER_RESET";
272 };
273
Tom Rini93743d22024-04-01 09:08:13 -0400274 sii9022: bridge-hdmi@39 {
275 compatible = "sil,sii9022";
276 reg = <0x39>;
277
278 interrupt-parent = <&main_gpio0>;
279 interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
280 pinctrl-names = "default";
281 pinctrl-0 = <&hdmi_int_pins_default>;
282
283 ports {
284 #address-cells = <1>;
285 #size-cells = <0>;
286
287 port@0 {
288 reg = <0>;
289
290 sii9022_in: endpoint {
291 remote-endpoint = <&dpi1_out>;
292 };
293 };
294
295 port@1 {
296 reg = <1>;
297
298 sii9022_out: endpoint {
299 remote-endpoint = <&hdmi_connector_in>;
300 };
301 };
302 };
303 };
304
Tom Rini53633a82024-02-29 12:33:36 -0500305 eeprom@51 {
306 compatible = "atmel,24c02";
307 pagesize = <16>;
308 reg = <0x51>;
309 };
310};
311
312&main_mcan0 {
313 pinctrl-names = "default";
314 pinctrl-0 = <&main_mcan0_pins_default>;
315 phys = <&can_tc1>;
316 status = "okay";
317};
318
319&main_uart0 {
320 pinctrl-names = "default";
321 pinctrl-0 = <&main_uart0_pins_default>;
322 status = "okay";
323};
324
325&main_uart1 {
326 pinctrl-names = "default";
327 pinctrl-0 = <&main_uart1_pins_default>;
328 /* Main UART1 may be used by TIFS firmware */
329 status = "okay";
330};
331
332&sdhci1 {
333 vmmc-supply = <&vcc_3v3_mmc>;
334 vqmmc-supply = <&vddshv5_sdio>;
335 pinctrl-names = "default";
336 pinctrl-0 = <&main_mmc1_pins_default>;
Tom Rini53633a82024-02-29 12:33:36 -0500337 disable-wp;
338 no-1-8-v;
339 status = "okay";
340};
341
342&usbss0 {
343 ti,vbus-divider;
344 status = "okay";
345};
346
347&usbss1 {
348 ti,vbus-divider;
349 status = "okay";
350};
351
352&usb0 {
353 dr_mode = "peripheral";
354};
355
356&usb1 {
357 dr_mode = "host";
358 pinctrl-names = "default";
359 pinctrl-0 = <&main_usb1_pins_default>;
360};