xref: /freebsd/sys/contrib/device-tree/src/arm/st/stm32mp153c-lxa-tac-gen3.dts (revision 2846c90520eb4cc74e24d586a0ea0f4a0006bc73)
1*2846c905SEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause)
2*2846c905SEmmanuel Vadot/*
3*2846c905SEmmanuel Vadot * Copyright (C) 2020 STMicroelectronics - All Rights Reserved
4*2846c905SEmmanuel Vadot * Copyright (C) 2021 Rouven Czerwinski, Pengutronix
5*2846c905SEmmanuel Vadot * Copyright (C) 2023, 2024 Leonard Göhrs, Pengutronix
6*2846c905SEmmanuel Vadot */
7*2846c905SEmmanuel Vadot
8*2846c905SEmmanuel Vadot/dts-v1/;
9*2846c905SEmmanuel Vadot
10*2846c905SEmmanuel Vadot#include "stm32mp153.dtsi"
11*2846c905SEmmanuel Vadot#include "stm32mp15xc-lxa-tac.dtsi"
12*2846c905SEmmanuel Vadot
13*2846c905SEmmanuel Vadot/ {
14*2846c905SEmmanuel Vadot	model = "Linux Automation Test Automation Controller (TAC) Gen 3";
15*2846c905SEmmanuel Vadot	compatible = "lxa,stm32mp153c-tac-gen3", "oct,stm32mp153x-osd32", "st,stm32mp153";
16*2846c905SEmmanuel Vadot
17*2846c905SEmmanuel Vadot	backlight: backlight {
18*2846c905SEmmanuel Vadot		compatible = "pwm-backlight";
19*2846c905SEmmanuel Vadot		power-supply = <&v3v3>;
20*2846c905SEmmanuel Vadot
21*2846c905SEmmanuel Vadot		brightness-levels = <0 31 63 95 127 159 191 223 255>;
22*2846c905SEmmanuel Vadot		default-brightness-level = <7>;
23*2846c905SEmmanuel Vadot		pwms = <&led_pwm 3 1000000 0>;
24*2846c905SEmmanuel Vadot	};
25*2846c905SEmmanuel Vadot
26*2846c905SEmmanuel Vadot	reg_iobus_12v: regulator-iobus-12v {
27*2846c905SEmmanuel Vadot		compatible = "regulator-fixed";
28*2846c905SEmmanuel Vadot		vin-supply = <&reg_12v>;
29*2846c905SEmmanuel Vadot		gpio = <&gpioh 13 GPIO_ACTIVE_LOW>;
30*2846c905SEmmanuel Vadot		regulator-max-microvolt = <12000000>;
31*2846c905SEmmanuel Vadot		regulator-min-microvolt = <12000000>;
32*2846c905SEmmanuel Vadot		regulator-name = "12V_IOBUS";
33*2846c905SEmmanuel Vadot	};
34*2846c905SEmmanuel Vadot
35*2846c905SEmmanuel Vadot	led-controller-1 {
36*2846c905SEmmanuel Vadot		compatible = "pwm-leds-multicolor";
37*2846c905SEmmanuel Vadot
38*2846c905SEmmanuel Vadot		multi-led {
39*2846c905SEmmanuel Vadot			color = <LED_COLOR_ID_RGB>;
40*2846c905SEmmanuel Vadot			function = LED_FUNCTION_STATUS;
41*2846c905SEmmanuel Vadot			max-brightness = <65535>;
42*2846c905SEmmanuel Vadot
43*2846c905SEmmanuel Vadot			led-red {
44*2846c905SEmmanuel Vadot				active-low;
45*2846c905SEmmanuel Vadot				color = <LED_COLOR_ID_RED>;
46*2846c905SEmmanuel Vadot				pwms = <&led_pwm 0 1000000 0>;
47*2846c905SEmmanuel Vadot			};
48*2846c905SEmmanuel Vadot
49*2846c905SEmmanuel Vadot			led-green {
50*2846c905SEmmanuel Vadot				active-low;
51*2846c905SEmmanuel Vadot				color = <LED_COLOR_ID_GREEN>;
52*2846c905SEmmanuel Vadot				pwms = <&led_pwm 2 1000000 0>;
53*2846c905SEmmanuel Vadot			};
54*2846c905SEmmanuel Vadot
55*2846c905SEmmanuel Vadot			led-blue {
56*2846c905SEmmanuel Vadot				active-low;
57*2846c905SEmmanuel Vadot				color = <LED_COLOR_ID_BLUE>;
58*2846c905SEmmanuel Vadot				pwms = <&led_pwm 1 1000000 0>;
59*2846c905SEmmanuel Vadot			};
60*2846c905SEmmanuel Vadot		};
61*2846c905SEmmanuel Vadot	};
62*2846c905SEmmanuel Vadot
63*2846c905SEmmanuel Vadot	led-controller-2 {
64*2846c905SEmmanuel Vadot		compatible = "gpio-leds";
65*2846c905SEmmanuel Vadot
66*2846c905SEmmanuel Vadot		led-5 {
67*2846c905SEmmanuel Vadot			label = "tac:green:iobus";
68*2846c905SEmmanuel Vadot			gpios = <&gpiog 1 GPIO_ACTIVE_HIGH>;
69*2846c905SEmmanuel Vadot		};
70*2846c905SEmmanuel Vadot
71*2846c905SEmmanuel Vadot		led-6 {
72*2846c905SEmmanuel Vadot			label = "tac:green:can";
73*2846c905SEmmanuel Vadot			gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>;
74*2846c905SEmmanuel Vadot		};
75*2846c905SEmmanuel Vadot
76*2846c905SEmmanuel Vadot		led-7 {
77*2846c905SEmmanuel Vadot			label = "tac:green:out0";
78*2846c905SEmmanuel Vadot			gpios = <&gpiob 8 GPIO_ACTIVE_HIGH>;
79*2846c905SEmmanuel Vadot		};
80*2846c905SEmmanuel Vadot
81*2846c905SEmmanuel Vadot		led-8 {
82*2846c905SEmmanuel Vadot			label = "tac:green:out1";
83*2846c905SEmmanuel Vadot			gpios = <&gpiog 3 GPIO_ACTIVE_HIGH>;
84*2846c905SEmmanuel Vadot		};
85*2846c905SEmmanuel Vadot
86*2846c905SEmmanuel Vadot		led-9 {
87*2846c905SEmmanuel Vadot			label = "tac:green:uarttx";
88*2846c905SEmmanuel Vadot			gpios = <&gpiod 3 GPIO_ACTIVE_HIGH>;
89*2846c905SEmmanuel Vadot		};
90*2846c905SEmmanuel Vadot
91*2846c905SEmmanuel Vadot		led-10 {
92*2846c905SEmmanuel Vadot			label = "tac:green:uartrx";
93*2846c905SEmmanuel Vadot			gpios = <&gpiof 6 GPIO_ACTIVE_HIGH>;
94*2846c905SEmmanuel Vadot		};
95*2846c905SEmmanuel Vadot
96*2846c905SEmmanuel Vadot		led-11 {
97*2846c905SEmmanuel Vadot			label = "tac:green:usbh1";
98*2846c905SEmmanuel Vadot			gpios = <&gpioc 8 GPIO_ACTIVE_HIGH>;
99*2846c905SEmmanuel Vadot		};
100*2846c905SEmmanuel Vadot
101*2846c905SEmmanuel Vadot		led-12 {
102*2846c905SEmmanuel Vadot			label = "tac:green:usbh2";
103*2846c905SEmmanuel Vadot			gpios = <&gpiod 6 GPIO_ACTIVE_HIGH>;
104*2846c905SEmmanuel Vadot		};
105*2846c905SEmmanuel Vadot
106*2846c905SEmmanuel Vadot		led-13 {
107*2846c905SEmmanuel Vadot			label = "tac:green:usbh3";
108*2846c905SEmmanuel Vadot			gpios = <&gpiob 9 GPIO_ACTIVE_HIGH>;
109*2846c905SEmmanuel Vadot		};
110*2846c905SEmmanuel Vadot
111*2846c905SEmmanuel Vadot		led-14 {
112*2846c905SEmmanuel Vadot			label = "tac:green:usbg";
113*2846c905SEmmanuel Vadot			gpios = <&gpiod 14 GPIO_ACTIVE_HIGH>;
114*2846c905SEmmanuel Vadot			linux,default-trigger = "usb-gadget";
115*2846c905SEmmanuel Vadot		};
116*2846c905SEmmanuel Vadot
117*2846c905SEmmanuel Vadot		led-15 {
118*2846c905SEmmanuel Vadot			label = "tac:green:dutpwr";
119*2846c905SEmmanuel Vadot			gpios = <&gpioa 15 GPIO_ACTIVE_HIGH>;
120*2846c905SEmmanuel Vadot		};
121*2846c905SEmmanuel Vadot	};
122*2846c905SEmmanuel Vadot};
123*2846c905SEmmanuel Vadot
124*2846c905SEmmanuel Vadot&adc {
125*2846c905SEmmanuel Vadot	pinctrl-names = "default";
126*2846c905SEmmanuel Vadot	pinctrl-0 = <&board_adc1_ain_pins>;
127*2846c905SEmmanuel Vadot	vdd-supply = <&vdd>;
128*2846c905SEmmanuel Vadot	vdda-supply = <&vdda>;
129*2846c905SEmmanuel Vadot	vref-supply = <&vrefbuf>;
130*2846c905SEmmanuel Vadot	status = "okay";
131*2846c905SEmmanuel Vadot
132*2846c905SEmmanuel Vadot	adc1: adc@0 {
133*2846c905SEmmanuel Vadot		st,adc-channels = <2 5 9 10 13 14 15 18>;
134*2846c905SEmmanuel Vadot		st,min-sample-time-nsecs = <5000>;
135*2846c905SEmmanuel Vadot		#address-cells = <1>;
136*2846c905SEmmanuel Vadot		#size-cells = <0>;
137*2846c905SEmmanuel Vadot		status = "okay";
138*2846c905SEmmanuel Vadot
139*2846c905SEmmanuel Vadot		channel@2 {
140*2846c905SEmmanuel Vadot			reg = <2>;
141*2846c905SEmmanuel Vadot			label = "OUT_0_FB";
142*2846c905SEmmanuel Vadot		};
143*2846c905SEmmanuel Vadot
144*2846c905SEmmanuel Vadot		channel@5 {
145*2846c905SEmmanuel Vadot			reg = <5>;
146*2846c905SEmmanuel Vadot			label = "IOBUS_CURR_FB";
147*2846c905SEmmanuel Vadot		};
148*2846c905SEmmanuel Vadot
149*2846c905SEmmanuel Vadot		channel@9 {
150*2846c905SEmmanuel Vadot			reg = <9>;
151*2846c905SEmmanuel Vadot			label = "IOBUS_VOLT_FB";
152*2846c905SEmmanuel Vadot		};
153*2846c905SEmmanuel Vadot
154*2846c905SEmmanuel Vadot		channel@10 {
155*2846c905SEmmanuel Vadot			reg = <10>;
156*2846c905SEmmanuel Vadot			label = "OUT_1_FB";
157*2846c905SEmmanuel Vadot		};
158*2846c905SEmmanuel Vadot
159*2846c905SEmmanuel Vadot		channel@13 {
160*2846c905SEmmanuel Vadot			reg = <13>;
161*2846c905SEmmanuel Vadot			label = "HOST_CURR_FB";
162*2846c905SEmmanuel Vadot		};
163*2846c905SEmmanuel Vadot
164*2846c905SEmmanuel Vadot		channel@14 {
165*2846c905SEmmanuel Vadot			reg = <14>;
166*2846c905SEmmanuel Vadot			label = "HOST_3_CURR_FB";
167*2846c905SEmmanuel Vadot		};
168*2846c905SEmmanuel Vadot
169*2846c905SEmmanuel Vadot		channel@15 {
170*2846c905SEmmanuel Vadot			reg = <15>;
171*2846c905SEmmanuel Vadot			label = "HOST_1_CURR_FB";
172*2846c905SEmmanuel Vadot		};
173*2846c905SEmmanuel Vadot
174*2846c905SEmmanuel Vadot		channel@18 {
175*2846c905SEmmanuel Vadot			reg = <18>;
176*2846c905SEmmanuel Vadot			label = "HOST_2_CURR_FB";
177*2846c905SEmmanuel Vadot		};
178*2846c905SEmmanuel Vadot	};
179*2846c905SEmmanuel Vadot
180*2846c905SEmmanuel Vadot	adc2: adc@100 {
181*2846c905SEmmanuel Vadot		st,adc-channels = <12>;
182*2846c905SEmmanuel Vadot		st,min-sample-time-nsecs = <500000>;
183*2846c905SEmmanuel Vadot		#address-cells = <1>;
184*2846c905SEmmanuel Vadot		#size-cells = <0>;
185*2846c905SEmmanuel Vadot		status = "okay";
186*2846c905SEmmanuel Vadot
187*2846c905SEmmanuel Vadot		channel@12 {
188*2846c905SEmmanuel Vadot			reg = <12>;
189*2846c905SEmmanuel Vadot			label = "TEMP_INTERNAL";
190*2846c905SEmmanuel Vadot		};
191*2846c905SEmmanuel Vadot	};
192*2846c905SEmmanuel Vadot};
193*2846c905SEmmanuel Vadot
194*2846c905SEmmanuel Vadot&gpioa {
195*2846c905SEmmanuel Vadot	gpio-line-names = "", "", "", "", "",              /*  0 */
196*2846c905SEmmanuel Vadot	"ETH_GPIO1", "ETH_INT", "", "", "",                /*  5 */
197*2846c905SEmmanuel Vadot	"", "", "", "BOOTROM_LED", "ETH_LAB_LEDRP",        /* 10 */
198*2846c905SEmmanuel Vadot	"";                                                /* 15 */
199*2846c905SEmmanuel Vadot};
200*2846c905SEmmanuel Vadot
201*2846c905SEmmanuel Vadot&gpioc {
202*2846c905SEmmanuel Vadot	gpio-line-names = "", "DUT_PWR_DISCH", "", "", "", /*  0 */
203*2846c905SEmmanuel Vadot	"", "", "", "", "",                                /*  5 */
204*2846c905SEmmanuel Vadot	"", "";                                            /* 10 */
205*2846c905SEmmanuel Vadot};
206*2846c905SEmmanuel Vadot
207*2846c905SEmmanuel Vadot&gpioe {
208*2846c905SEmmanuel Vadot	gpio-line-names = "TP35", "", "", "", "CAN_1_120R", /*  0 */
209*2846c905SEmmanuel Vadot	"", "", "USER_BTN2", "DUT_PWR_EN", "UART_TX_EN",    /*  5 */
210*2846c905SEmmanuel Vadot	"UART_RX_EN", "TP24", "", "TP25", "TP26",           /* 10 */
211*2846c905SEmmanuel Vadot	"TP27";                                             /* 15 */
212*2846c905SEmmanuel Vadot};
213*2846c905SEmmanuel Vadot
214*2846c905SEmmanuel Vadot&gpiog {
215*2846c905SEmmanuel Vadot	gpio-line-names = "ETH_RESET", "", "", "", "",               /*  0 */
216*2846c905SEmmanuel Vadot	"IOBUS_FLT_FB", "", "USER_LED2", "ETH1_PPS_A", "CAN_0_120R", /*  5 */
217*2846c905SEmmanuel Vadot	"POWER_ADC_RESET", "", "", "", "",                           /* 10 */
218*2846c905SEmmanuel Vadot	"";                                                          /* 15 */
219*2846c905SEmmanuel Vadot};
220*2846c905SEmmanuel Vadot
221*2846c905SEmmanuel Vadot&m_can2 {
222*2846c905SEmmanuel Vadot	termination-gpios = <&gpioe 4 GPIO_ACTIVE_HIGH>;
223*2846c905SEmmanuel Vadot	termination-ohms = <120>;
224*2846c905SEmmanuel Vadot};
225*2846c905SEmmanuel Vadot
226*2846c905SEmmanuel Vadot&pinctrl {
227*2846c905SEmmanuel Vadot	board_adc1_ain_pins: board-adc1-ain-0 {
228*2846c905SEmmanuel Vadot		pins {
229*2846c905SEmmanuel Vadot			pinmux = <STM32_PINMUX('F', 11, ANALOG)>, /* ADC1_INP2 */
230*2846c905SEmmanuel Vadot				 <STM32_PINMUX('B', 1, ANALOG)>, /* ADC1_INP5 */
231*2846c905SEmmanuel Vadot				 <STM32_PINMUX('B', 0, ANALOG)>, /* ADC1_INP9 */
232*2846c905SEmmanuel Vadot				 <STM32_PINMUX('C', 0, ANALOG)>, /* ADC1_INP10 */
233*2846c905SEmmanuel Vadot				 <STM32_PINMUX('C', 3, ANALOG)>, /* ADC1_INP13 */
234*2846c905SEmmanuel Vadot				 <STM32_PINMUX('A', 2, ANALOG)>, /* ADC1_INP14 */
235*2846c905SEmmanuel Vadot				 <STM32_PINMUX('A', 3, ANALOG)>, /* ADC1_INP15 */
236*2846c905SEmmanuel Vadot				 <STM32_PINMUX('A', 4, ANALOG)>; /* ADC1_INP18 */
237*2846c905SEmmanuel Vadot		};
238*2846c905SEmmanuel Vadot	};
239*2846c905SEmmanuel Vadot};
240*2846c905SEmmanuel Vadot
241*2846c905SEmmanuel Vadot&spi2 {
242*2846c905SEmmanuel Vadot	adc@0 {
243*2846c905SEmmanuel Vadot		compatible = "ti,lmp92064";
244*2846c905SEmmanuel Vadot		reg = <0>;
245*2846c905SEmmanuel Vadot
246*2846c905SEmmanuel Vadot		reset-gpios = <&gpiog 10 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
247*2846c905SEmmanuel Vadot		shunt-resistor-micro-ohms = <15000>;
248*2846c905SEmmanuel Vadot		spi-max-frequency = <5000000>;
249*2846c905SEmmanuel Vadot		vdd-supply = <&reg_pb_3v3>;
250*2846c905SEmmanuel Vadot		vdig-supply = <&reg_pb_3v3>;
251*2846c905SEmmanuel Vadot	};
252*2846c905SEmmanuel Vadot};
253*2846c905SEmmanuel Vadot
254*2846c905SEmmanuel Vadot&timers8 {
255*2846c905SEmmanuel Vadot	/* spare dmas for other usage */
256*2846c905SEmmanuel Vadot	/delete-property/dmas;
257*2846c905SEmmanuel Vadot	/delete-property/dma-names;
258*2846c905SEmmanuel Vadot
259*2846c905SEmmanuel Vadot	status = "okay";
260*2846c905SEmmanuel Vadot
261*2846c905SEmmanuel Vadot	led_pwm: pwm {
262*2846c905SEmmanuel Vadot		pinctrl-names = "default", "sleep";
263*2846c905SEmmanuel Vadot		pinctrl-0 = <&pwm8_pins_b>;
264*2846c905SEmmanuel Vadot		pinctrl-1 = <&pwm8_sleep_pins_b>;
265*2846c905SEmmanuel Vadot		status = "okay";
266*2846c905SEmmanuel Vadot	};
267*2846c905SEmmanuel Vadot};
268