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