xref: /linux/arch/arm64/boot/dts/ti/k3-am64-phycore-som.dtsi (revision 527a0f2bdcfe77fce22f006b97e42e4da3137c86)
1// SPDX-License-Identifier: GPL-2.0-only OR MIT
2/*
3 * Copyright (C) 2021-2024 PHYTEC America, LLC - https://www.phytec.com
4 * Author: Matt McKee <mmckee@phytec.com>
5 *
6 * Copyright (C) 2022-2024 PHYTEC Messtechnik GmbH
7 * Author: Wadim Egorov <w.egorov@phytec.de>
8 *
9 * Product homepage:
10 * https://www.phytec.com/product/phycore-am64x
11 */
12
13#include <dt-bindings/gpio/gpio.h>
14#include <dt-bindings/leds/common.h>
15#include <dt-bindings/net/ti-dp83867.h>
16
17/ {
18	model = "PHYTEC phyCORE-AM64x";
19	compatible = "phytec,am64-phycore-som", "ti,am642";
20
21	aliases {
22		ethernet0 = &cpsw_port1;
23		mmc0 = &sdhci0;
24		rtc0 = &i2c_som_rtc;
25	};
26
27	memory@80000000 {
28		device_type = "memory";
29		reg = <0x00000000 0x80000000 0x00000000 0x80000000>;
30	};
31
32	reserved_memory: reserved-memory {
33		#address-cells = <2>;
34		#size-cells = <2>;
35		ranges;
36
37		secure_ddr: optee@9e800000 {
38			reg = <0x00 0x9e800000 0x00 0x01800000>; /* for OP-TEE */
39			alignment = <0x1000>;
40			no-map;
41		};
42
43		main_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 {
44			compatible = "shared-dma-pool";
45			reg = <0x00 0xa0000000 0x00 0x100000>;
46			no-map;
47		};
48
49		main_r5fss0_core0_memory_region: r5f-memory@a0100000 {
50			compatible = "shared-dma-pool";
51			reg = <0x00 0xa0100000 0x00 0xf00000>;
52			no-map;
53		};
54
55		main_r5fss0_core1_dma_memory_region: r5f-dma-memory@a1000000 {
56			compatible = "shared-dma-pool";
57			reg = <0x00 0xa1000000 0x00 0x100000>;
58			no-map;
59		};
60
61		main_r5fss0_core1_memory_region: r5f-memory@a1100000 {
62			compatible = "shared-dma-pool";
63			reg = <0x00 0xa1100000 0x00 0xf00000>;
64			no-map;
65		};
66
67		main_r5fss1_core0_dma_memory_region: r5f-dma-memory@a2000000 {
68			compatible = "shared-dma-pool";
69			reg = <0x00 0xa2000000 0x00 0x100000>;
70			no-map;
71		};
72
73		main_r5fss1_core0_memory_region: r5f-memory@a2100000 {
74			compatible = "shared-dma-pool";
75			reg = <0x00 0xa2100000 0x00 0xf00000>;
76			no-map;
77		};
78
79		main_r5fss1_core1_dma_memory_region: r5f-dma-memory@a3000000 {
80			compatible = "shared-dma-pool";
81			reg = <0x00 0xa3000000 0x00 0x100000>;
82			no-map;
83		};
84
85		main_r5fss1_core1_memory_region: r5f-memory@a3100000 {
86			compatible = "shared-dma-pool";
87			reg = <0x00 0xa3100000 0x00 0xf00000>;
88			no-map;
89		};
90	};
91
92	leds {
93		compatible = "gpio-leds";
94		pinctrl-names = "default";
95		pinctrl-0 = <&leds_pins_default>;
96
97		led-0 {
98			color = <LED_COLOR_ID_GREEN>;
99			gpios = <&main_gpio0 12 GPIO_ACTIVE_HIGH>;
100			linux,default-trigger = "heartbeat";
101			function = LED_FUNCTION_HEARTBEAT;
102		};
103	};
104
105	vcc_5v0_som: regulator-vcc-5v0-som {
106		/* VIN / VCC_5V0_SOM */
107		compatible = "regulator-fixed";
108		regulator-name = "VCC_5V0_SOM";
109		regulator-min-microvolt = <5000000>;
110		regulator-max-microvolt = <5000000>;
111		regulator-always-on;
112		regulator-boot-on;
113	};
114};
115
116&main_pmx0 {
117	cpsw_mdio_pins_default: cpsw-mdio-default-pins {
118		pinctrl-single,pins = <
119			AM64X_IOPAD(0x01f8, PIN_INPUT, 4)	/* (P5) PRG0_PRU1_GPO18.MDIO0_MDIO */
120			AM64X_IOPAD(0x01fc, PIN_OUTPUT, 4)	/* (R2) PRG0_PRU1_GPO19.MDIO0_MDC */
121			AM64X_IOPAD(0x0100, PIN_OUTPUT, 7)	/* (V7) PRG1_PRU0_GPO18.GPIO0_63 */
122		>;
123	};
124
125	cpsw_rgmii1_pins_default: cpsw-rgmii1-default-pins {
126		pinctrl-single,pins = <
127			AM64X_IOPAD(0x0184, PIN_INPUT, 4)	/* (W6) PRG0_PRU0_GPO9.RGMII1_RX_CTL */
128			AM64X_IOPAD(0x0188, PIN_INPUT, 4)	/* (AA5) PRG0_PRU0_GPO10.RGMII1_RXC */
129			AM64X_IOPAD(0x00dc, PIN_OUTPUT, 4)	/* (U15) PRG1_PRU0_GPO9.RGMII1_TX_CTL */
130			AM64X_IOPAD(0x00e0, PIN_OUTPUT, 4)	/* (U14) PRG1_PRU0_GPO10.RGMII1_TXC */
131			AM64X_IOPAD(0x01cc, PIN_INPUT, 4)	/* (W5) PRG0_PRU1_GPO7.RGMII1_RD0 */
132			AM64X_IOPAD(0x0124, PIN_OUTPUT, 4)	/* (V15) PRG1_PRU1_GPO7.RGMII1_TD0 */
133			AM64X_IOPAD(0x01d4, PIN_INPUT, 4)	/* (Y5) PRG0_PRU1_GPO9.RGMII1_RD1 */
134			AM64X_IOPAD(0x012c, PIN_OUTPUT, 4)	/* (V14) PRG1_PRU1_GPO9.RGMII1_TD1 */
135			AM64X_IOPAD(0x01d8, PIN_INPUT, 4)	/* (V6) PRG0_PRU1_GPO10.RGMII1_RD2 */
136			AM64X_IOPAD(0x0130, PIN_OUTPUT, 4)	/* (W14) PRG1_PRU1_GPO10.RGMII1_TD2 */
137			AM64X_IOPAD(0x01f4, PIN_INPUT, 4)	/* (V5) PRG0_PRU1_GPO17.RGMII1_RD3 */
138			AM64X_IOPAD(0x014c, PIN_OUTPUT, 4)	/* (AA14) PRG1_PRU1_GPO17.RGMII1_TD3 */
139			AM64X_IOPAD(0x0154, PIN_INPUT, 7)	/* (V12) PRG1_PRU1_GPO19.GPIO0_84 */
140		>;
141	};
142
143	eeprom_wp_pins_default: eeprom-wp-default-pins {
144		pinctrl-single,pins = <
145			AM64X_IOPAD(0x0208, PIN_OUTPUT, 7)	/* (D12) SPI0_CS0.GPIO1_42 */
146		>;
147	};
148
149	leds_pins_default: leds-default-pins {
150		pinctrl-single,pins = <
151			AM64X_IOPAD(0x0030, PIN_OUTPUT, 7)	/* (L18) OSPI0_CSn1.GPIO0_12 */
152		>;
153	};
154
155	main_i2c0_pins_default: main-i2c0-default-pins {
156		pinctrl-single,pins = <
157			AM64X_IOPAD(0x0260, PIN_INPUT, 0)	/* (A18) I2C0_SCL */
158			AM64X_IOPAD(0x0264, PIN_INPUT, 0)	/* (B18) I2C0_SDA */
159		>;
160	};
161
162	ospi0_pins_default: ospi0-default-pins {
163		pinctrl-single,pins = <
164			AM64X_IOPAD(0x0000, PIN_OUTPUT, 0)	/* (N20) OSPI0_CLK */
165			AM64X_IOPAD(0x0008, PIN_INPUT, 0)	/* (N19) OSPI0_DQS */
166			AM64X_IOPAD(0x000c, PIN_INPUT, 0)	/* (M19) OSPI0_D0 */
167			AM64X_IOPAD(0x0010, PIN_INPUT, 0)	/* (M18) OSPI0_D1 */
168			AM64X_IOPAD(0x0014, PIN_INPUT, 0)	/* (M20) OSPI0_D2 */
169			AM64X_IOPAD(0x0018, PIN_INPUT, 0)	/* (M21) OSPI0_D3 */
170			AM64X_IOPAD(0x001c, PIN_INPUT, 0)	/* (P21) OSPI0_D4 */
171			AM64X_IOPAD(0x0020, PIN_INPUT, 0)	/* (P20) OSPI0_D5 */
172			AM64X_IOPAD(0x0024, PIN_INPUT, 0)	/* (N18) OSPI0_D6 */
173			AM64X_IOPAD(0x0028, PIN_INPUT, 0)	/* (M17) OSPI0_D7 */
174			AM64X_IOPAD(0x002c, PIN_OUTPUT, 0)	/* (L19) OSPI0_CSn0 */
175		>;
176	};
177
178	rtc_pins_default: rtc-defaults-pins {
179		pinctrl-single,pins = <
180			AM64X_IOPAD(0x0278, PIN_INPUT, 7)	/* (C19) EXTINTn.GPIO1_70 */
181		>;
182	};
183};
184
185&cpsw3g {
186	pinctrl-names = "default";
187	pinctrl-0 = <&cpsw_rgmii1_pins_default>;
188};
189
190&cpsw3g_mdio {
191	status = "okay";
192	pinctrl-names = "default";
193	pinctrl-0 = <&cpsw_mdio_pins_default>;
194
195	cpsw3g_phy1: ethernet-phy@1 {
196		compatible = "ethernet-phy-id2000.a231", "ethernet-phy-ieee802.3-c22";
197		reg = <1>;
198		interrupt-parent = <&main_gpio0>;
199		interrupts = <84 IRQ_TYPE_EDGE_FALLING>;
200		ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
201		ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
202		reset-gpios = <&main_gpio0 63 GPIO_ACTIVE_LOW>;
203		reset-assert-us = <1000>;
204		reset-deassert-us = <1000>;
205	};
206};
207
208&cpsw_port1 {
209	phy-mode = "rgmii-rxid";
210	phy-handle = <&cpsw3g_phy1>;
211};
212
213&cpsw_port2 {
214	status = "disabled";
215};
216
217&mailbox0_cluster2 {
218	status = "okay";
219
220	mbox_main_r5fss0_core0: mbox-main-r5fss0-core0 {
221		ti,mbox-rx = <0 0 2>;
222		ti,mbox-tx = <1 0 2>;
223	};
224
225	mbox_main_r5fss0_core1: mbox-main-r5fss0-core1 {
226		ti,mbox-rx = <2 0 2>;
227		ti,mbox-tx = <3 0 2>;
228	};
229};
230
231&mailbox0_cluster4 {
232	status = "okay";
233
234	mbox_main_r5fss1_core0: mbox-main-r5fss1-core0 {
235		ti,mbox-rx = <0 0 2>;
236		ti,mbox-tx = <1 0 2>;
237	};
238
239	mbox_main_r5fss1_core1: mbox-main-r5fss1-core1 {
240		ti,mbox-rx = <2 0 2>;
241		ti,mbox-tx = <3 0 2>;
242	};
243};
244
245&main_i2c0 {
246	status = "okay";
247	pinctrl-names = "default";
248	pinctrl-0 = <&main_i2c0_pins_default>;
249	clock-frequency = <400000>;
250
251	eeprom@50 {
252		compatible = "atmel,24c32";
253		pinctrl-names = "default";
254		pinctrl-0 = <&eeprom_wp_pins_default>;
255		pagesize = <32>;
256		reg = <0x50>;
257	};
258
259	i2c_som_rtc: rtc@52 {
260		compatible = "microcrystal,rv3028";
261		reg = <0x52>;
262		pinctrl-names = "default";
263		pinctrl-0 = <&rtc_pins_default>;
264		interrupt-parent = <&main_gpio1>;
265		interrupts = <70 IRQ_TYPE_EDGE_FALLING>;
266		wakeup-source;
267	};
268
269	pmic@61 {
270		compatible = "ti,lp8733";
271		reg = <0x61>;
272
273		buck0-in-supply = <&vcc_5v0_som>;
274		buck1-in-supply = <&vcc_5v0_som>;
275		ldo0-in-supply = <&vdd_3v3>;
276		ldo1-in-supply = <&vdd_3v3>;
277
278		regulators {
279			vdd_core: buck0 {
280				regulator-name = "VDD_CORE";
281				regulator-min-microvolt = <750000>;
282				regulator-max-microvolt = <750000>;
283				regulator-always-on;
284				regulator-boot-on;
285			};
286
287			vdd_3v3: buck1 {
288				regulator-name = "VDD_3V3";
289				regulator-min-microvolt = <3300000>;
290				regulator-max-microvolt = <3300000>;
291				regulator-always-on;
292				regulator-boot-on;
293			};
294
295			vdd_1v8_ldo0: ldo0 {
296				regulator-name = "VDD_1V8_LDO0";
297				regulator-min-microvolt = <1800000>;
298				regulator-max-microvolt = <1800000>;
299				regulator-always-on;
300				regulator-boot-on;
301			};
302
303			vdda_1v8: ldo1 {
304				regulator-name = "VDDA_1V8";
305				regulator-min-microvolt = <1800000>;
306				regulator-max-microvolt = <1800000>;
307				regulator-always-on;
308				regulator-boot-on;
309			};
310		};
311	};
312};
313
314&main_r5fss0_core0 {
315	mboxes = <&mailbox0_cluster2 &mbox_main_r5fss0_core0>;
316	memory-region = <&main_r5fss0_core0_dma_memory_region>,
317			<&main_r5fss0_core0_memory_region>;
318};
319
320&main_r5fss0_core1 {
321	mboxes = <&mailbox0_cluster2 &mbox_main_r5fss0_core1>;
322	memory-region = <&main_r5fss0_core1_dma_memory_region>,
323			<&main_r5fss0_core1_memory_region>;
324};
325
326&main_r5fss1_core0 {
327	mboxes = <&mailbox0_cluster4 &mbox_main_r5fss1_core0>;
328	memory-region = <&main_r5fss1_core0_dma_memory_region>,
329			<&main_r5fss1_core0_memory_region>;
330};
331
332&main_r5fss1_core1 {
333	mboxes = <&mailbox0_cluster4 &mbox_main_r5fss1_core1>;
334	memory-region = <&main_r5fss1_core1_dma_memory_region>,
335			<&main_r5fss1_core1_memory_region>;
336};
337
338&ospi0 {
339	status = "okay";
340	pinctrl-names = "default";
341	pinctrl-0 = <&ospi0_pins_default>;
342
343	serial_flash: flash@0 {
344		compatible = "jedec,spi-nor";
345		reg = <0x0>;
346		spi-tx-bus-width = <8>;
347		spi-rx-bus-width = <8>;
348		spi-max-frequency = <25000000>;
349		cdns,tshsl-ns = <60>;
350		cdns,tsd2d-ns = <60>;
351		cdns,tchsh-ns = <60>;
352		cdns,tslch-ns = <60>;
353		cdns,read-delay = <0>;
354	};
355};
356
357&sdhci0 {
358	status = "okay";
359	bus-width = <8>;
360	non-removable;
361	ti,driver-strength-ohm = <50>;
362	disable-wp;
363	keep-power-in-suspend;
364};
365
366&tscadc0 {
367	status = "okay";
368	adc {
369		ti,adc-channels = <0 1 2 3 4 5 6 7>;
370	};
371};
372