| 1 |
// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause |
| 2 |
/* |
| 3 |
* Copyright (C) 2019-2020 Marek Vasut <[email protected]> |
| 4 |
*/ |
| 5 |
|
| 6 |
#include <dt-bindings/input/input.h> |
| 7 |
#include <dt-bindings/pwm/pwm.h> |
| 8 |
|
| 9 |
/ { |
| 10 |
clk_ext_audio_codec: clock-codec { |
| 11 |
compatible = "fixed-clock"; |
| 12 |
#clock-cells = <0>; |
| 13 |
clock-frequency = <24000000>; |
| 14 |
}; |
| 15 |
|
| 16 |
display_bl: display-bl { |
| 17 |
compatible = "pwm-backlight"; |
| 18 |
pwms = <&pwm2 3 500000 PWM_POLARITY_INVERTED>; |
| 19 |
brightness-levels = <0 16 22 30 40 55 75 102 138 188 255>; |
| 20 |
default-brightness-level = <8>; |
| 21 |
enable-gpios = <&gpioi 0 GPIO_ACTIVE_HIGH>; |
| 22 |
power-supply = <®_panel_bl>; |
| 23 |
}; |
| 24 |
|
| 25 |
gpio-keys-polled { |
| 26 |
compatible = "gpio-keys-polled"; |
| 27 |
poll-interval = <20>; |
| 28 |
|
| 29 |
/* |
| 30 |
* The EXTi IRQ line 3 is shared with ethernet, |
| 31 |
* so mark this as polled GPIO key. |
| 32 |
*/ |
| 33 |
button-0 { |
| 34 |
label = "TA1-GPIO-A"; |
| 35 |
linux,code = <KEY_A>; |
| 36 |
gpios = <&gpiof 3 GPIO_ACTIVE_LOW>; |
| 37 |
}; |
| 38 |
|
| 39 |
/* |
| 40 |
* The EXTi IRQ line 6 is shared with touchscreen, |
| 41 |
* so mark this as polled GPIO key. |
| 42 |
*/ |
| 43 |
button-1 { |
| 44 |
label = "TA2-GPIO-B"; |
| 45 |
linux,code = <KEY_B>; |
| 46 |
gpios = <&gpiod 6 GPIO_ACTIVE_LOW>; |
| 47 |
}; |
| 48 |
|
| 49 |
/* |
| 50 |
* The EXTi IRQ line 0 is shared with PMIC, |
| 51 |
* so mark this as polled GPIO key. |
| 52 |
*/ |
| 53 |
button-2 { |
| 54 |
label = "TA3-GPIO-C"; |
| 55 |
linux,code = <KEY_C>; |
| 56 |
gpios = <&gpiog 0 GPIO_ACTIVE_LOW>; |
| 57 |
}; |
| 58 |
}; |
| 59 |
|
| 60 |
gpio-keys { |
| 61 |
compatible = "gpio-keys"; |
| 62 |
|
| 63 |
button-3 { |
| 64 |
label = "TA4-GPIO-D"; |
| 65 |
linux,code = <KEY_D>; |
| 66 |
gpios = <&gpiod 12 GPIO_ACTIVE_LOW>; |
| 67 |
wakeup-source; |
| 68 |
}; |
| 69 |
}; |
| 70 |
|
| 71 |
led { |
| 72 |
compatible = "gpio-leds"; |
| 73 |
|
| 74 |
led-0 { |
| 75 |
label = "green:led5"; |
| 76 |
gpios = <&gpioc 6 GPIO_ACTIVE_HIGH>; |
| 77 |
default-state = "off"; |
| 78 |
status = "disabled"; |
| 79 |
}; |
| 80 |
|
| 81 |
led-1 { |
| 82 |
label = "green:led6"; |
| 83 |
gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>; |
| 84 |
default-state = "off"; |
| 85 |
}; |
| 86 |
|
| 87 |
led-2 { |
| 88 |
label = "green:led7"; |
| 89 |
gpios = <&gpioi 2 GPIO_ACTIVE_HIGH>; |
| 90 |
default-state = "off"; |
| 91 |
}; |
| 92 |
|
| 93 |
led-3 { |
| 94 |
label = "green:led8"; |
| 95 |
gpios = <&gpioi 3 GPIO_ACTIVE_HIGH>; |
| 96 |
default-state = "off"; |
| 97 |
}; |
| 98 |
}; |
| 99 |
|
| 100 |
panel { |
| 101 |
compatible = "edt,etm0700g0edh6"; |
| 102 |
backlight = <&display_bl>; |
| 103 |
power-supply = <®_panel_bl>; |
| 104 |
|
| 105 |
port { |
| 106 |
lcd_panel_in: endpoint { |
| 107 |
remote-endpoint = <&lcd_display_out>; |
| 108 |
}; |
| 109 |
}; |
| 110 |
}; |
| 111 |
|
| 112 |
reg_panel_bl: regulator-panel-bl { |
| 113 |
compatible = "regulator-fixed"; |
| 114 |
regulator-name = "panel_backlight"; |
| 115 |
regulator-min-microvolt = <3300000>; |
| 116 |
regulator-max-microvolt = <3300000>; |
| 117 |
vin-supply = <®_panel_supply>; |
| 118 |
}; |
| 119 |
|
| 120 |
reg_panel_supply: regulator-panel-supply { |
| 121 |
compatible = "regulator-fixed"; |
| 122 |
regulator-name = "panel_supply"; |
| 123 |
regulator-min-microvolt = <24000000>; |
| 124 |
regulator-max-microvolt = <24000000>; |
| 125 |
}; |
| 126 |
|
| 127 |
sound { |
| 128 |
compatible = "audio-graph-card"; |
| 129 |
widgets = "Headphone", "Headphone Jack", |
| 130 |
"Line", "Line In Jack", |
| 131 |
"Microphone", "Microphone Jack"; |
| 132 |
routing = "Headphone Jack", "HP_OUT", |
| 133 |
"LINE_IN", "Line In Jack", |
| 134 |
"MIC_IN", "Microphone Jack", |
| 135 |
"Microphone Jack", "Mic Bias"; |
| 136 |
dais = <&sai2a_port &sai2b_port>; |
| 137 |
}; |
| 138 |
}; |
| 139 |
|
| 140 |
&cec { |
| 141 |
pinctrl-names = "default"; |
| 142 |
pinctrl-0 = <&cec_pins_a>; |
| 143 |
status = "okay"; |
| 144 |
}; |
| 145 |
|
| 146 |
&i2c2 { /* Header X22 */ |
| 147 |
pinctrl-names = "default"; |
| 148 |
pinctrl-0 = <&i2c2_pins_a>; |
| 149 |
i2c-scl-rising-time-ns = <185>; |
| 150 |
i2c-scl-falling-time-ns = <20>; |
| 151 |
/* spare dmas for other usage */ |
| 152 |
/delete-property/dmas; |
| 153 |
/delete-property/dma-names; |
| 154 |
status = "okay"; |
| 155 |
}; |
| 156 |
|
| 157 |
&i2c5 { /* Header X21 */ |
| 158 |
pinctrl-names = "default"; |
| 159 |
pinctrl-0 = <&i2c5_pins_a>; |
| 160 |
i2c-scl-rising-time-ns = <185>; |
| 161 |
i2c-scl-falling-time-ns = <20>; |
| 162 |
status = "okay"; |
| 163 |
/* spare dmas for other usage */ |
| 164 |
/delete-property/dmas; |
| 165 |
/delete-property/dma-names; |
| 166 |
|
| 167 |
sgtl5000: codec@a { |
| 168 |
compatible = "fsl,sgtl5000"; |
| 169 |
reg = <0x0a>; |
| 170 |
#sound-dai-cells = <0>; |
| 171 |
clocks = <&clk_ext_audio_codec>; |
| 172 |
VDDA-supply = <&v3v3>; |
| 173 |
VDDIO-supply = <&vdd>; |
| 174 |
|
| 175 |
sgtl5000_port: port { |
| 176 |
#address-cells = <1>; |
| 177 |
#size-cells = <0>; |
| 178 |
|
| 179 |
sgtl5000_tx_endpoint: endpoint@0 { |
| 180 |
reg = <0>; |
| 181 |
remote-endpoint = <&sai2a_endpoint>; |
| 182 |
}; |
| 183 |
|
| 184 |
sgtl5000_rx_endpoint: endpoint@1 { |
| 185 |
reg = <1>; |
| 186 |
remote-endpoint = <&sai2b_endpoint>; |
| 187 |
}; |
| 188 |
}; |
| 189 |
|
| 190 |
}; |
| 191 |
|
| 192 |
touchscreen@38 { |
| 193 |
compatible = "edt,edt-ft5406"; |
| 194 |
reg = <0x38>; |
| 195 |
interrupt-parent = <&gpioc>; |
| 196 |
interrupts = <6 IRQ_TYPE_EDGE_FALLING>; /* GPIO E */ |
| 197 |
}; |
| 198 |
}; |
| 199 |
|
| 200 |
<dc { |
| 201 |
pinctrl-names = "default", "sleep"; |
| 202 |
pinctrl-0 = <<dc_pins_b>; |
| 203 |
pinctrl-1 = <<dc_sleep_pins_b>; |
| 204 |
status = "okay"; |
| 205 |
|
| 206 |
port { |
| 207 |
lcd_display_out: endpoint { |
| 208 |
remote-endpoint = <&lcd_panel_in>; |
| 209 |
}; |
| 210 |
}; |
| 211 |
}; |
| 212 |
|
| 213 |
&sai2 { |
| 214 |
clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>; |
| 215 |
clock-names = "pclk", "x8k", "x11k"; |
| 216 |
pinctrl-names = "default", "sleep"; |
| 217 |
pinctrl-0 = <&sai2a_pins_b &sai2b_pins_b>; |
| 218 |
pinctrl-1 = <&sai2a_sleep_pins_b &sai2b_sleep_pins_b>; |
| 219 |
status = "okay"; |
| 220 |
|
| 221 |
sai2a: audio-controller@4400b004 { |
| 222 |
#clock-cells = <0>; |
| 223 |
dma-names = "tx"; |
| 224 |
clocks = <&rcc SAI2_K>; |
| 225 |
clock-names = "sai_ck"; |
| 226 |
status = "okay"; |
| 227 |
|
| 228 |
sai2a_port: port { |
| 229 |
sai2a_endpoint: endpoint { |
| 230 |
remote-endpoint = <&sgtl5000_tx_endpoint>; |
| 231 |
bitclock-master; |
| 232 |
dai-format = "i2s"; |
| 233 |
dai-tdm-slot-num = <2>; |
| 234 |
dai-tdm-slot-width = <16>; |
| 235 |
frame-master; |
| 236 |
mclk-fs = <256>; |
| 237 |
}; |
| 238 |
}; |
| 239 |
}; |
| 240 |
|
| 241 |
sai2b: audio-controller@4400b024 { |
| 242 |
dma-names = "rx"; |
| 243 |
st,sync = <&sai2a 2>; |
| 244 |
clocks = <&rcc SAI2_K>, <&sai2a>; |
| 245 |
clock-names = "sai_ck", "MCLK"; |
| 246 |
status = "okay"; |
| 247 |
|
| 248 |
sai2b_port: port { |
| 249 |
sai2b_endpoint: endpoint { |
| 250 |
remote-endpoint = <&sgtl5000_rx_endpoint>; |
| 251 |
bitclock-master; |
| 252 |
dai-format = "i2s"; |
| 253 |
dai-tdm-slot-num = <2>; |
| 254 |
dai-tdm-slot-width = <16>; |
| 255 |
frame-master; |
| 256 |
mclk-fs = <256>; |
| 257 |
}; |
| 258 |
}; |
| 259 |
}; |
| 260 |
}; |
| 261 |
|
| 262 |
&timers2 { |
| 263 |
/* spare dmas for other usage (un-delete to enable pwm capture) */ |
| 264 |
/delete-property/dmas; |
| 265 |
/delete-property/dma-names; |
| 266 |
status = "okay"; |
| 267 |
pwm2: pwm { |
| 268 |
pinctrl-0 = <&pwm2_pins_a>; |
| 269 |
pinctrl-names = "default"; |
| 270 |
status = "okay"; |
| 271 |
}; |
| 272 |
timer@1 { |
| 273 |
status = "okay"; |
| 274 |
}; |
| 275 |
}; |
| 276 |
|
| 277 |
&usart3 { |
| 278 |
pinctrl-names = "default"; |
| 279 |
pinctrl-0 = <&usart3_pins_a>; |
| 280 |
/delete-property/dmas; |
| 281 |
/delete-property/dma-names; |
| 282 |
status = "okay"; |
| 283 |
}; |
| 284 |
|
| 285 |
&uart8 { |
| 286 |
pinctrl-names = "default"; |
| 287 |
pinctrl-0 = <&uart8_pins_a &uart8_rtscts_pins_a>; |
| 288 |
uart-has-rtscts; |
| 289 |
/delete-property/dmas; |
| 290 |
/delete-property/dma-names; |
| 291 |
status = "okay"; |
| 292 |
}; |
| 293 |
|
| 294 |
&usbh_ehci { |
| 295 |
status = "okay"; |
| 296 |
}; |
| 297 |
|
| 298 |
&usbotg_hs { |
| 299 |
dr_mode = "otg"; |
| 300 |
pinctrl-0 = <&usbotg_hs_pins_a>; |
| 301 |
pinctrl-names = "default"; |
| 302 |
phy-names = "usb2-phy"; |
| 303 |
phys = <&usbphyc_port1 0>; |
| 304 |
vbus-supply = <&vbus_otg>; |
| 305 |
status = "okay"; |
| 306 |
}; |
| 307 |
|
| 308 |
&usbphyc { |
| 309 |
status = "okay"; |
| 310 |
}; |
| 311 |
|
| 312 |
&usbphyc_port0 { |
| 313 |
phy-supply = <&vdd_usb>; |
| 314 |
}; |
| 315 |
|
| 316 |
&usbphyc_port1 { |
| 317 |
phy-supply = <&vdd_usb>; |
| 318 |
}; |