xref: /freebsd/sys/contrib/device-tree/src/arm/nxp/imx/imx6ul-var-som.dtsi (revision 8ccc0d235c226d84112561d453c49904398d085c)
1*8ccc0d23SEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0+
2*8ccc0d23SEmmanuel Vadot/*
3*8ccc0d23SEmmanuel Vadot * Support for Variscite VAR-SOM-MX6UL Module
4*8ccc0d23SEmmanuel Vadot *
5*8ccc0d23SEmmanuel Vadot * Copyright 2019 Variscite Ltd.
6*8ccc0d23SEmmanuel Vadot * Copyright 2025 Bootlin
7*8ccc0d23SEmmanuel Vadot */
8*8ccc0d23SEmmanuel Vadot
9*8ccc0d23SEmmanuel Vadot/dts-v1/;
10*8ccc0d23SEmmanuel Vadot
11*8ccc0d23SEmmanuel Vadot#include "imx6ul.dtsi"
12*8ccc0d23SEmmanuel Vadot#include <dt-bindings/clock/imx6ul-clock.h>
13*8ccc0d23SEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
14*8ccc0d23SEmmanuel Vadot
15*8ccc0d23SEmmanuel Vadot/ {
16*8ccc0d23SEmmanuel Vadot	model = "Variscite VAR-SOM-MX6UL module";
17*8ccc0d23SEmmanuel Vadot	compatible = "variscite,var-som-imx6ul", "fsl,imx6ul";
18*8ccc0d23SEmmanuel Vadot
19*8ccc0d23SEmmanuel Vadot	memory@80000000 {
20*8ccc0d23SEmmanuel Vadot		device_type = "memory";
21*8ccc0d23SEmmanuel Vadot		reg = <0x80000000 0x20000000>;
22*8ccc0d23SEmmanuel Vadot	};
23*8ccc0d23SEmmanuel Vadot
24*8ccc0d23SEmmanuel Vadot	reg_gpio_dvfs: reg-gpio-dvfs {
25*8ccc0d23SEmmanuel Vadot		compatible = "regulator-gpio";
26*8ccc0d23SEmmanuel Vadot		regulator-min-microvolt = <1300000>;
27*8ccc0d23SEmmanuel Vadot		regulator-max-microvolt = <1400000>;
28*8ccc0d23SEmmanuel Vadot		regulator-name = "gpio_dvfs";
29*8ccc0d23SEmmanuel Vadot		regulator-type = "voltage";
30*8ccc0d23SEmmanuel Vadot		gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
31*8ccc0d23SEmmanuel Vadot		states = <1300000 0x1
32*8ccc0d23SEmmanuel Vadot			  1400000 0x0>;
33*8ccc0d23SEmmanuel Vadot	};
34*8ccc0d23SEmmanuel Vadot
35*8ccc0d23SEmmanuel Vadot	rmii_ref_clk: rmii-ref-clk {
36*8ccc0d23SEmmanuel Vadot		compatible = "fixed-clock";
37*8ccc0d23SEmmanuel Vadot		#clock-cells = <0>;
38*8ccc0d23SEmmanuel Vadot		clock-frequency = <25000000>;
39*8ccc0d23SEmmanuel Vadot		clock-output-names = "rmii-ref";
40*8ccc0d23SEmmanuel Vadot	};
41*8ccc0d23SEmmanuel Vadot};
42*8ccc0d23SEmmanuel Vadot
43*8ccc0d23SEmmanuel Vadot&clks {
44*8ccc0d23SEmmanuel Vadot	assigned-clocks = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
45*8ccc0d23SEmmanuel Vadot	assigned-clock-rates = <786432000>;
46*8ccc0d23SEmmanuel Vadot};
47*8ccc0d23SEmmanuel Vadot
48*8ccc0d23SEmmanuel Vadot&cpu0 {
49*8ccc0d23SEmmanuel Vadot	dc-supply = <&reg_gpio_dvfs>;
50*8ccc0d23SEmmanuel Vadot};
51*8ccc0d23SEmmanuel Vadot
52*8ccc0d23SEmmanuel Vadot&fec1 {
53*8ccc0d23SEmmanuel Vadot	pinctrl-names = "default";
54*8ccc0d23SEmmanuel Vadot	pinctrl-0 = <&pinctrl_enet1>, <&pinctrl_enet1_gpio>, <&pinctrl_enet1_mdio>;
55*8ccc0d23SEmmanuel Vadot	phy-mode = "rmii";
56*8ccc0d23SEmmanuel Vadot	phy-handle = <&ethphy0>;
57*8ccc0d23SEmmanuel Vadot	status = "okay";
58*8ccc0d23SEmmanuel Vadot
59*8ccc0d23SEmmanuel Vadot	mdio {
60*8ccc0d23SEmmanuel Vadot		#address-cells = <1>;
61*8ccc0d23SEmmanuel Vadot		#size-cells = <0>;
62*8ccc0d23SEmmanuel Vadot
63*8ccc0d23SEmmanuel Vadot		ethphy0: ethernet-phy@1 {
64*8ccc0d23SEmmanuel Vadot			compatible = "ethernet-phy-ieee802.3-c22";
65*8ccc0d23SEmmanuel Vadot			reg = <1>;
66*8ccc0d23SEmmanuel Vadot			clocks = <&rmii_ref_clk>;
67*8ccc0d23SEmmanuel Vadot			clock-names = "rmii-ref";
68*8ccc0d23SEmmanuel Vadot			reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
69*8ccc0d23SEmmanuel Vadot			reset-assert-us = <100000>;
70*8ccc0d23SEmmanuel Vadot			micrel,led-mode = <1>;
71*8ccc0d23SEmmanuel Vadot			micrel,rmii-reference-clock-select-25-mhz = <1>;
72*8ccc0d23SEmmanuel Vadot		};
73*8ccc0d23SEmmanuel Vadot	};
74*8ccc0d23SEmmanuel Vadot};
75*8ccc0d23SEmmanuel Vadot
76*8ccc0d23SEmmanuel Vadot&iomuxc {
77*8ccc0d23SEmmanuel Vadot	pinctrl-names = "default";
78*8ccc0d23SEmmanuel Vadot	pinctrl-0 = <&pinctrl_hog>;
79*8ccc0d23SEmmanuel Vadot
80*8ccc0d23SEmmanuel Vadot	pinctrl_enet1: enet1grp {
81*8ccc0d23SEmmanuel Vadot		fsl,pins = <
82*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_ENET1_RX_EN__ENET1_RX_EN	0x1b0b0
83*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_ENET1_RX_ER__ENET1_RX_ER	0x1b0b0
84*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_ENET1_RX_DATA0__ENET1_RDATA00	0x1b0b0
85*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_ENET1_RX_DATA1__ENET1_RDATA01	0x1b0b0
86*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_ENET1_TX_EN__ENET1_TX_EN	0x1b0b0
87*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_ENET1_TX_DATA0__ENET1_TDATA00	0x1b0b0
88*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_ENET1_TX_DATA1__ENET1_TDATA01	0x1b0b0
89*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_ENET1_TX_CLK__ENET1_REF_CLK1	0x4001b031
90*8ccc0d23SEmmanuel Vadot		>;
91*8ccc0d23SEmmanuel Vadot	};
92*8ccc0d23SEmmanuel Vadot
93*8ccc0d23SEmmanuel Vadot	pinctrl_enet1_gpio: enet1-gpiogrp {
94*8ccc0d23SEmmanuel Vadot		fsl,pins = <
95*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_SNVS_TAMPER0__GPIO5_IO00	0x1b0b0 /* fec1 reset */
96*8ccc0d23SEmmanuel Vadot		>;
97*8ccc0d23SEmmanuel Vadot	};
98*8ccc0d23SEmmanuel Vadot
99*8ccc0d23SEmmanuel Vadot	pinctrl_enet1_mdio: enet1-mdiogrp {
100*8ccc0d23SEmmanuel Vadot		fsl,pins = <
101*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_GPIO1_IO06__ENET1_MDIO	0x1b0b0
102*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_GPIO1_IO07__ENET1_MDC		0x1b0b0
103*8ccc0d23SEmmanuel Vadot		>;
104*8ccc0d23SEmmanuel Vadot	};
105*8ccc0d23SEmmanuel Vadot
106*8ccc0d23SEmmanuel Vadot	pinctrl_hog: hoggrp {
107*8ccc0d23SEmmanuel Vadot		fsl,pins = <
108*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_SNVS_TAMPER4__GPIO5_IO04	0x1b0b0	/* BT Enable */
109*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_SNVS_TAMPER6__GPIO5_IO06	0x03029	/* WLAN Enable */
110*8ccc0d23SEmmanuel Vadot		>;
111*8ccc0d23SEmmanuel Vadot	};
112*8ccc0d23SEmmanuel Vadot
113*8ccc0d23SEmmanuel Vadot	pinctrl_sai2: sai2grp {
114*8ccc0d23SEmmanuel Vadot		fsl,pins = <
115*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_JTAG_TDI__SAI2_TX_BCLK	0x17088
116*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_JTAG_TDO__SAI2_TX_SYNC	0x17088
117*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_JTAG_TRST_B__SAI2_TX_DATA	0x11088
118*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_JTAG_TCK__SAI2_RX_DATA	0x11088
119*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_JTAG_TMS__SAI2_MCLK		0x17088
120*8ccc0d23SEmmanuel Vadot		>;
121*8ccc0d23SEmmanuel Vadot	};
122*8ccc0d23SEmmanuel Vadot
123*8ccc0d23SEmmanuel Vadot	pinctrl_tsc: tscgrp {
124*8ccc0d23SEmmanuel Vadot		fsl,pins = <
125*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_GPIO1_IO01__GPIO1_IO01	0xb0
126*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_GPIO1_IO02__GPIO1_IO02	0xb0
127*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_GPIO1_IO03__GPIO1_IO03	0xb0
128*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_GPIO1_IO04__GPIO1_IO04	0xb0
129*8ccc0d23SEmmanuel Vadot		>;
130*8ccc0d23SEmmanuel Vadot	};
131*8ccc0d23SEmmanuel Vadot
132*8ccc0d23SEmmanuel Vadot	pinctrl_uart2: uart2grp {
133*8ccc0d23SEmmanuel Vadot		fsl,pins = <
134*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_UART2_TX_DATA__UART2_DCE_TX	0x1b0b1
135*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_UART2_RX_DATA__UART2_DCE_RX	0x1b0b1
136*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_UART2_CTS_B__UART2_DCE_CTS	0x1b0b1
137*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_UART2_RTS_B__UART2_DCE_RTS	0x1b0b1
138*8ccc0d23SEmmanuel Vadot		>;
139*8ccc0d23SEmmanuel Vadot	};
140*8ccc0d23SEmmanuel Vadot
141*8ccc0d23SEmmanuel Vadot	pinctrl_usdhc2: usdhc2grp {
142*8ccc0d23SEmmanuel Vadot		fsl,pins = <
143*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_RE_B__USDHC2_CLK		0x10069
144*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_WE_B__USDHC2_CMD		0x17059
145*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA00__USDHC2_DATA0	0x17059
146*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA01__USDHC2_DATA1	0x17059
147*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA02__USDHC2_DATA2	0x17059
148*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA03__USDHC2_DATA3	0x17059
149*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA04__USDHC2_DATA4	0x17059
150*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA05__USDHC2_DATA5	0x17059
151*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA06__USDHC2_DATA6	0x17059
152*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA07__USDHC2_DATA7	0x17059
153*8ccc0d23SEmmanuel Vadot		>;
154*8ccc0d23SEmmanuel Vadot	};
155*8ccc0d23SEmmanuel Vadot
156*8ccc0d23SEmmanuel Vadot	pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
157*8ccc0d23SEmmanuel Vadot		fsl,pins = <
158*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_RE_B__USDHC2_CLK		0x100b9
159*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_WE_B__USDHC2_CMD		0x170b9
160*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA00__USDHC2_DATA0	0x170b9
161*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA01__USDHC2_DATA1	0x170b9
162*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA02__USDHC2_DATA2	0x170b9
163*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA03__USDHC2_DATA3	0x170b9
164*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA04__USDHC2_DATA4	0x170b9
165*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA05__USDHC2_DATA5	0x170b9
166*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA06__USDHC2_DATA6	0x170b9
167*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA07__USDHC2_DATA7	0x170b9
168*8ccc0d23SEmmanuel Vadot		>;
169*8ccc0d23SEmmanuel Vadot	};
170*8ccc0d23SEmmanuel Vadot
171*8ccc0d23SEmmanuel Vadot	pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
172*8ccc0d23SEmmanuel Vadot		fsl,pins = <
173*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_RE_B__USDHC2_CLK		0x100f9
174*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_WE_B__USDHC2_CMD		0x170f9
175*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA00__USDHC2_DATA0	0x170f9
176*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA01__USDHC2_DATA1	0x170f9
177*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA02__USDHC2_DATA2	0x170f9
178*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA03__USDHC2_DATA3	0x170f9
179*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA04__USDHC2_DATA4	0x170f9
180*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA05__USDHC2_DATA5	0x170f9
181*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA06__USDHC2_DATA6	0x170f9
182*8ccc0d23SEmmanuel Vadot			MX6UL_PAD_NAND_DATA07__USDHC2_DATA7	0x170f9
183*8ccc0d23SEmmanuel Vadot		>;
184*8ccc0d23SEmmanuel Vadot	};
185*8ccc0d23SEmmanuel Vadot};
186*8ccc0d23SEmmanuel Vadot
187*8ccc0d23SEmmanuel Vadot&pxp {
188*8ccc0d23SEmmanuel Vadot	status = "okay";
189*8ccc0d23SEmmanuel Vadot};
190*8ccc0d23SEmmanuel Vadot
191*8ccc0d23SEmmanuel Vadot&sai2 {
192*8ccc0d23SEmmanuel Vadot	pinctrl-names = "default";
193*8ccc0d23SEmmanuel Vadot	pinctrl-0 = <&pinctrl_sai2>;
194*8ccc0d23SEmmanuel Vadot	assigned-clocks = <&clks IMX6UL_CLK_SAI2_SEL>,
195*8ccc0d23SEmmanuel Vadot			  <&clks IMX6UL_CLK_SAI2>;
196*8ccc0d23SEmmanuel Vadot	assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
197*8ccc0d23SEmmanuel Vadot	assigned-clock-rates = <0>, <12288000>;
198*8ccc0d23SEmmanuel Vadot	fsl,sai-mclk-direction-output;
199*8ccc0d23SEmmanuel Vadot	status = "okay";
200*8ccc0d23SEmmanuel Vadot};
201*8ccc0d23SEmmanuel Vadot
202*8ccc0d23SEmmanuel Vadot&snvs_poweroff {
203*8ccc0d23SEmmanuel Vadot	status = "okay";
204*8ccc0d23SEmmanuel Vadot};
205*8ccc0d23SEmmanuel Vadot
206*8ccc0d23SEmmanuel Vadot&tsc {
207*8ccc0d23SEmmanuel Vadot	pinctrl-names = "default";
208*8ccc0d23SEmmanuel Vadot	pinctrl-0 = <&pinctrl_tsc>;
209*8ccc0d23SEmmanuel Vadot	xnur-gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
210*8ccc0d23SEmmanuel Vadot	measure-delay-time = <0xffff>;
211*8ccc0d23SEmmanuel Vadot	pre-charge-time = <0xfff>;
212*8ccc0d23SEmmanuel Vadot	status = "okay";
213*8ccc0d23SEmmanuel Vadot};
214*8ccc0d23SEmmanuel Vadot
215*8ccc0d23SEmmanuel Vadot&uart2 {
216*8ccc0d23SEmmanuel Vadot	pinctrl-names = "default";
217*8ccc0d23SEmmanuel Vadot	pinctrl-0 = <&pinctrl_uart2>;
218*8ccc0d23SEmmanuel Vadot	uart-has-rtscts;
219*8ccc0d23SEmmanuel Vadot	status = "okay";
220*8ccc0d23SEmmanuel Vadot};
221*8ccc0d23SEmmanuel Vadot
222*8ccc0d23SEmmanuel Vadot&usdhc2 {
223*8ccc0d23SEmmanuel Vadot	pinctrl-names = "default", "state_100mhz", "state_200mhz";
224*8ccc0d23SEmmanuel Vadot	pinctrl-0 = <&pinctrl_usdhc2>;
225*8ccc0d23SEmmanuel Vadot	pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
226*8ccc0d23SEmmanuel Vadot	pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
227*8ccc0d23SEmmanuel Vadot	bus-width = <8>;
228*8ccc0d23SEmmanuel Vadot	no-1-8-v;
229*8ccc0d23SEmmanuel Vadot	non-removable;
230*8ccc0d23SEmmanuel Vadot	keep-power-in-suspend;
231*8ccc0d23SEmmanuel Vadot	wakeup-source;
232*8ccc0d23SEmmanuel Vadot	status = "okay";
233*8ccc0d23SEmmanuel Vadot};
234