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