xref: /freebsd-src/sys/contrib/device-tree/src/arm/ti/omap/am335x-chiliboard.dts (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0-only
2*f126890aSEmmanuel Vadot/*
3*f126890aSEmmanuel Vadot * Copyright (C) 2015 Jablotron s.r.o. -- https://www.jablotron.com/
4*f126890aSEmmanuel Vadot * Author: Rostislav Lisovy <lisovy@jablotron.cz>
5*f126890aSEmmanuel Vadot */
6*f126890aSEmmanuel Vadot/dts-v1/;
7*f126890aSEmmanuel Vadot#include "am335x-chilisom.dtsi"
8*f126890aSEmmanuel Vadot
9*f126890aSEmmanuel Vadot/ {
10*f126890aSEmmanuel Vadot	model = "AM335x Chiliboard";
11*f126890aSEmmanuel Vadot	compatible = "grinn,am335x-chiliboard", "grinn,am335x-chilisom",
12*f126890aSEmmanuel Vadot		     "ti,am33xx";
13*f126890aSEmmanuel Vadot
14*f126890aSEmmanuel Vadot	chosen {
15*f126890aSEmmanuel Vadot		stdout-path = &uart0;
16*f126890aSEmmanuel Vadot	};
17*f126890aSEmmanuel Vadot
18*f126890aSEmmanuel Vadot	leds {
19*f126890aSEmmanuel Vadot		compatible = "gpio-leds";
20*f126890aSEmmanuel Vadot		pinctrl-names = "default";
21*f126890aSEmmanuel Vadot		pinctrl-0 = <&led_gpio_pins>;
22*f126890aSEmmanuel Vadot
23*f126890aSEmmanuel Vadot		led0 {
24*f126890aSEmmanuel Vadot			label = "led0";
25*f126890aSEmmanuel Vadot			gpios = <&gpio3 7 GPIO_ACTIVE_LOW>;
26*f126890aSEmmanuel Vadot			default-state = "keep";
27*f126890aSEmmanuel Vadot			linux,default-trigger = "heartbeat";
28*f126890aSEmmanuel Vadot		};
29*f126890aSEmmanuel Vadot
30*f126890aSEmmanuel Vadot		led1 {
31*f126890aSEmmanuel Vadot			label = "led1";
32*f126890aSEmmanuel Vadot			gpios = <&gpio3 8 GPIO_ACTIVE_LOW>;
33*f126890aSEmmanuel Vadot			default-state = "keep";
34*f126890aSEmmanuel Vadot		};
35*f126890aSEmmanuel Vadot	};
36*f126890aSEmmanuel Vadot};
37*f126890aSEmmanuel Vadot
38*f126890aSEmmanuel Vadot&am33xx_pinmux {
39*f126890aSEmmanuel Vadot	uart0_pins: uart0-pins {
40*f126890aSEmmanuel Vadot		pinctrl-single,pins = <
41*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_UART0_RXD, PIN_INPUT_PULLUP, MUX_MODE0)
42*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_UART0_TXD, PIN_OUTPUT_PULLDOWN, MUX_MODE0)
43*f126890aSEmmanuel Vadot		>;
44*f126890aSEmmanuel Vadot	};
45*f126890aSEmmanuel Vadot
46*f126890aSEmmanuel Vadot	cpsw_default: cpsw-default-pins {
47*f126890aSEmmanuel Vadot		pinctrl-single,pins = <
48*f126890aSEmmanuel Vadot			/* Slave 1 */
49*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MII1_CRS, PIN_INPUT_PULLDOWN, MUX_MODE1)
50*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MII1_RX_ER, PIN_INPUT_PULLUP, MUX_MODE1)
51*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MII1_TX_EN, PIN_OUTPUT_PULLDOWN, MUX_MODE1)
52*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MII1_TXD1, PIN_OUTPUT_PULLDOWN, MUX_MODE1)
53*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MII1_TXD0, PIN_OUTPUT_PULLDOWN, MUX_MODE1)
54*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MII1_RXD1, PIN_INPUT_PULLUP, MUX_MODE1)
55*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MII1_RXD0, PIN_INPUT_PULLUP, MUX_MODE1)
56*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_RMII1_REF_CLK, PIN_INPUT_PULLDOWN, MUX_MODE0)
57*f126890aSEmmanuel Vadot		>;
58*f126890aSEmmanuel Vadot	};
59*f126890aSEmmanuel Vadot
60*f126890aSEmmanuel Vadot	cpsw_sleep: cpsw-sleep-pins {
61*f126890aSEmmanuel Vadot		pinctrl-single,pins = <
62*f126890aSEmmanuel Vadot			/* Slave 1 reset value */
63*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MII1_CRS, PIN_INPUT_PULLDOWN, MUX_MODE7)
64*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MII1_RX_ER, PIN_INPUT_PULLDOWN, MUX_MODE7)
65*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MII1_TX_EN, PIN_INPUT_PULLDOWN, MUX_MODE7)
66*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MII1_RX_DV, PIN_INPUT_PULLDOWN, MUX_MODE7)
67*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MII1_TXD1, PIN_INPUT_PULLDOWN, MUX_MODE7)
68*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MII1_TXD0, PIN_INPUT_PULLDOWN, MUX_MODE7)
69*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MII1_RXD1, PIN_INPUT_PULLDOWN, MUX_MODE7)
70*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MII1_RXD0, PIN_INPUT_PULLDOWN, MUX_MODE7)
71*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_RMII1_REF_CLK, PIN_INPUT_PULLDOWN, MUX_MODE7)
72*f126890aSEmmanuel Vadot		>;
73*f126890aSEmmanuel Vadot	};
74*f126890aSEmmanuel Vadot
75*f126890aSEmmanuel Vadot	davinci_mdio_default: davinci-mdio-default-pins {
76*f126890aSEmmanuel Vadot		pinctrl-single,pins = <
77*f126890aSEmmanuel Vadot			/* mdio_data.mdio_data */
78*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLUP | SLEWCTRL_FAST, MUX_MODE0)
79*f126890aSEmmanuel Vadot			/* mdio_clk.mdio_clk */
80*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MDC, PIN_OUTPUT_PULLUP, MUX_MODE0)
81*f126890aSEmmanuel Vadot		>;
82*f126890aSEmmanuel Vadot	};
83*f126890aSEmmanuel Vadot
84*f126890aSEmmanuel Vadot	davinci_mdio_sleep: davinci-mdio-sleep-pins {
85*f126890aSEmmanuel Vadot		pinctrl-single,pins = <
86*f126890aSEmmanuel Vadot			/* MDIO reset value */
87*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLDOWN, MUX_MODE7)
88*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MDC, PIN_INPUT_PULLDOWN, MUX_MODE7)
89*f126890aSEmmanuel Vadot		>;
90*f126890aSEmmanuel Vadot	};
91*f126890aSEmmanuel Vadot
92*f126890aSEmmanuel Vadot	usb1_drvvbus: usb1-drvvbus-pins {
93*f126890aSEmmanuel Vadot		pinctrl-single,pins = <
94*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_USB1_DRVVBUS, PIN_OUTPUT_PULLDOWN, MUX_MODE0)
95*f126890aSEmmanuel Vadot		>;
96*f126890aSEmmanuel Vadot	};
97*f126890aSEmmanuel Vadot
98*f126890aSEmmanuel Vadot	sd_pins: sd-card-pins {
99*f126890aSEmmanuel Vadot		pinctrl-single,pins = <
100*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MMC0_DAT3, PIN_INPUT, MUX_MODE0)
101*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MMC0_DAT2, PIN_INPUT, MUX_MODE0)
102*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MMC0_DAT1, PIN_INPUT, MUX_MODE0)
103*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MMC0_DAT0, PIN_INPUT, MUX_MODE0)
104*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MMC0_CLK, PIN_INPUT, MUX_MODE0)
105*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_MMC0_CMD, PIN_INPUT, MUX_MODE0)
106*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_SPI0_CS1, PIN_INPUT, MUX_MODE7) /* spi0_cs1.gpio0_6 */
107*f126890aSEmmanuel Vadot		>;
108*f126890aSEmmanuel Vadot	};
109*f126890aSEmmanuel Vadot
110*f126890aSEmmanuel Vadot	led_gpio_pins: led-gpio-pins {
111*f126890aSEmmanuel Vadot		pinctrl-single,pins = <
112*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_EMU0, PIN_OUTPUT, MUX_MODE7) /* emu0.gpio3_7 */
113*f126890aSEmmanuel Vadot			AM33XX_PADCONF(AM335X_PIN_EMU1, PIN_OUTPUT, MUX_MODE7) /* emu1.gpio3_8 */
114*f126890aSEmmanuel Vadot		>;
115*f126890aSEmmanuel Vadot	};
116*f126890aSEmmanuel Vadot};
117*f126890aSEmmanuel Vadot
118*f126890aSEmmanuel Vadot&uart0 {
119*f126890aSEmmanuel Vadot	pinctrl-names = "default";
120*f126890aSEmmanuel Vadot	pinctrl-0 = <&uart0_pins>;
121*f126890aSEmmanuel Vadot
122*f126890aSEmmanuel Vadot	status = "okay";
123*f126890aSEmmanuel Vadot};
124*f126890aSEmmanuel Vadot
125*f126890aSEmmanuel Vadot&ldo4_reg {
126*f126890aSEmmanuel Vadot	regulator-min-microvolt = <3300000>;
127*f126890aSEmmanuel Vadot	regulator-max-microvolt = <3300000>;
128*f126890aSEmmanuel Vadot};
129*f126890aSEmmanuel Vadot
130*f126890aSEmmanuel Vadot/* Ethernet */
131*f126890aSEmmanuel Vadot&mac_sw {
132*f126890aSEmmanuel Vadot	pinctrl-names = "default", "sleep";
133*f126890aSEmmanuel Vadot	pinctrl-0 = <&cpsw_default>;
134*f126890aSEmmanuel Vadot	pinctrl-1 = <&cpsw_sleep>;
135*f126890aSEmmanuel Vadot	status = "okay";
136*f126890aSEmmanuel Vadot};
137*f126890aSEmmanuel Vadot
138*f126890aSEmmanuel Vadot&davinci_mdio_sw {
139*f126890aSEmmanuel Vadot	pinctrl-names = "default", "sleep";
140*f126890aSEmmanuel Vadot	pinctrl-0 = <&davinci_mdio_default>;
141*f126890aSEmmanuel Vadot	pinctrl-1 = <&davinci_mdio_sleep>;
142*f126890aSEmmanuel Vadot
143*f126890aSEmmanuel Vadot	ethphy0: ethernet-phy@0 {
144*f126890aSEmmanuel Vadot		reg = <0>;
145*f126890aSEmmanuel Vadot	};
146*f126890aSEmmanuel Vadot};
147*f126890aSEmmanuel Vadot
148*f126890aSEmmanuel Vadot&cpsw_port1 {
149*f126890aSEmmanuel Vadot	phy-handle = <&ethphy0>;
150*f126890aSEmmanuel Vadot	phy-mode = "rmii";
151*f126890aSEmmanuel Vadot	ti,dual-emac-pvid = <1>;
152*f126890aSEmmanuel Vadot};
153*f126890aSEmmanuel Vadot
154*f126890aSEmmanuel Vadot&cpsw_port2 {
155*f126890aSEmmanuel Vadot	status = "disabled";
156*f126890aSEmmanuel Vadot};
157*f126890aSEmmanuel Vadot
158*f126890aSEmmanuel Vadot/* USB */
159*f126890aSEmmanuel Vadot&usb1 {
160*f126890aSEmmanuel Vadot	pinctrl-names = "default";
161*f126890aSEmmanuel Vadot	pinctrl-0 = <&usb1_drvvbus>;
162*f126890aSEmmanuel Vadot	dr_mode = "host";
163*f126890aSEmmanuel Vadot};
164*f126890aSEmmanuel Vadot
165*f126890aSEmmanuel Vadot/* microSD */
166*f126890aSEmmanuel Vadot&mmc1 {
167*f126890aSEmmanuel Vadot	pinctrl-names = "default";
168*f126890aSEmmanuel Vadot	pinctrl-0 = <&sd_pins>;
169*f126890aSEmmanuel Vadot	vmmc-supply = <&ldo4_reg>;
170*f126890aSEmmanuel Vadot	bus-width = <0x4>;
171*f126890aSEmmanuel Vadot	cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
172*f126890aSEmmanuel Vadot	status = "okay";
173*f126890aSEmmanuel Vadot};
174*f126890aSEmmanuel Vadot
175*f126890aSEmmanuel Vadot&tps {
176*f126890aSEmmanuel Vadot	interrupt-parent = <&intc>;
177*f126890aSEmmanuel Vadot	interrupts = <7>; /* NNMI */
178*f126890aSEmmanuel Vadot
179*f126890aSEmmanuel Vadot	charger {
180*f126890aSEmmanuel Vadot		status = "okay";
181*f126890aSEmmanuel Vadot	};
182*f126890aSEmmanuel Vadot
183*f126890aSEmmanuel Vadot	pwrbutton {
184*f126890aSEmmanuel Vadot		status = "okay";
185*f126890aSEmmanuel Vadot	};
186*f126890aSEmmanuel Vadot};
187