Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
0002 /*
0003  * Copyright (C) 2019-2020 Marek Vasut <marex@denx.de>
0004  */
0005 
0006 #include <dt-bindings/input/input.h>
0007 #include <dt-bindings/pwm/pwm.h>
0008 
0009 / {
0010         aliases {
0011                 serial0 = &uart4;
0012                 serial1 = &usart3;
0013                 serial2 = &uart8;
0014         };
0015 
0016         chosen {
0017                 stdout-path = "serial0:115200n8";
0018         };
0019 
0020         clk_ext_audio_codec: clock-codec {
0021                 compatible = "fixed-clock";
0022                 #clock-cells = <0>;
0023                 clock-frequency = <24000000>;
0024         };
0025 
0026         display_bl: display-bl {
0027                 compatible = "pwm-backlight";
0028                 pwms = <&pwm2 3 500000 PWM_POLARITY_INVERTED>;
0029                 brightness-levels = <0 16 22 30 40 55 75 102 138 188 255>;
0030                 default-brightness-level = <8>;
0031                 enable-gpios = <&gpioi 0 GPIO_ACTIVE_HIGH>;
0032                 power-supply = <&reg_panel_bl>;
0033                 status = "okay";
0034         };
0035 
0036         gpio-keys-polled {
0037                 compatible = "gpio-keys-polled";
0038                 poll-interval = <20>;
0039 
0040                 /*
0041                  * The EXTi IRQ line 3 is shared with ethernet,
0042                  * so mark this as polled GPIO key.
0043                  */
0044                 button-0 {
0045                         label = "TA1-GPIO-A";
0046                         linux,code = <KEY_A>;
0047                         gpios = <&gpiof 3 GPIO_ACTIVE_LOW>;
0048                 };
0049 
0050                 /*
0051                  * The EXTi IRQ line 6 is shared with touchscreen,
0052                  * so mark this as polled GPIO key.
0053                  */
0054                 button-1 {
0055                         label = "TA2-GPIO-B";
0056                         linux,code = <KEY_B>;
0057                         gpios = <&gpiod 6 GPIO_ACTIVE_LOW>;
0058                 };
0059 
0060                 /*
0061                  * The EXTi IRQ line 0 is shared with PMIC,
0062                  * so mark this as polled GPIO key.
0063                  */
0064                 button-2 {
0065                         label = "TA3-GPIO-C";
0066                         linux,code = <KEY_C>;
0067                         gpios = <&gpiog 0 GPIO_ACTIVE_LOW>;
0068                 };
0069         };
0070 
0071         gpio-keys {
0072                 compatible = "gpio-keys";
0073 
0074                 button-3 {
0075                         label = "TA4-GPIO-D";
0076                         linux,code = <KEY_D>;
0077                         gpios = <&gpiod 12 GPIO_ACTIVE_LOW>;
0078                         wakeup-source;
0079                 };
0080         };
0081 
0082         led {
0083                 compatible = "gpio-leds";
0084 
0085                 led-0 {
0086                         label = "green:led5";
0087                         gpios = <&gpioc 6 GPIO_ACTIVE_HIGH>;
0088                         default-state = "off";
0089                         status = "disabled";
0090                 };
0091 
0092                 led-1 {
0093                         label = "green:led6";
0094                         gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
0095                         default-state = "off";
0096                 };
0097 
0098                 led-2 {
0099                         label = "green:led7";
0100                         gpios = <&gpioi 2 GPIO_ACTIVE_HIGH>;
0101                         default-state = "off";
0102                 };
0103 
0104                 led-3 {
0105                         label = "green:led8";
0106                         gpios = <&gpioi 3 GPIO_ACTIVE_HIGH>;
0107                         default-state = "off";
0108                 };
0109         };
0110 
0111         panel {
0112                 compatible = "edt,etm0700g0edh6";
0113                 backlight = <&display_bl>;
0114                 power-supply = <&reg_panel_bl>;
0115 
0116                 port {
0117                         lcd_panel_in: endpoint {
0118                                 remote-endpoint = <&lcd_display_out>;
0119                         };
0120                 };
0121         };
0122 
0123         reg_panel_bl: regulator-panel-bl {
0124                 compatible = "regulator-fixed";
0125                 regulator-name = "panel_backlight";
0126                 regulator-min-microvolt = <3300000>;
0127                 regulator-max-microvolt = <3300000>;
0128                 vin-supply = <&reg_panel_supply>;
0129         };
0130 
0131         reg_panel_supply: regulator-panel-supply {
0132                 compatible = "regulator-fixed";
0133                 regulator-name = "panel_supply";
0134                 regulator-min-microvolt = <24000000>;
0135                 regulator-max-microvolt = <24000000>;
0136         };
0137 
0138         sound {
0139                 compatible = "audio-graph-card";
0140                 routing =
0141                         "MIC_IN", "Capture",
0142                         "Capture", "Mic Bias",
0143                         "Playback", "HP_OUT";
0144                 dais = <&sai2a_port &sai2b_port>;
0145                 status = "okay";
0146         };
0147 };
0148 
0149 &cec {
0150         pinctrl-names = "default";
0151         pinctrl-0 = <&cec_pins_a>;
0152         status = "okay";
0153 };
0154 
0155 &i2c2 { /* Header X22 */
0156         pinctrl-names = "default";
0157         pinctrl-0 = <&i2c2_pins_a>;
0158         i2c-scl-rising-time-ns = <185>;
0159         i2c-scl-falling-time-ns = <20>;
0160         status = "okay";
0161         /* spare dmas for other usage */
0162         /delete-property/dmas;
0163         /delete-property/dma-names;
0164         status = "okay";
0165 };
0166 
0167 &i2c5 { /* Header X21 */
0168         pinctrl-names = "default";
0169         pinctrl-0 = <&i2c5_pins_a>;
0170         i2c-scl-rising-time-ns = <185>;
0171         i2c-scl-falling-time-ns = <20>;
0172         status = "okay";
0173         /* spare dmas for other usage */
0174         /delete-property/dmas;
0175         /delete-property/dma-names;
0176 
0177         sgtl5000: codec@a {
0178                 compatible = "fsl,sgtl5000";
0179                 reg = <0x0a>;
0180                 #sound-dai-cells = <0>;
0181                 clocks = <&clk_ext_audio_codec>;
0182                 VDDA-supply = <&v3v3>;
0183                 VDDIO-supply = <&vdd>;
0184 
0185                 sgtl5000_port: port {
0186                         #address-cells = <1>;
0187                         #size-cells = <0>;
0188 
0189                         sgtl5000_tx_endpoint: endpoint@0 {
0190                                 reg = <0>;
0191                                 remote-endpoint = <&sai2a_endpoint>;
0192                                 frame-master = <&sgtl5000_tx_endpoint>;
0193                                 bitclock-master = <&sgtl5000_tx_endpoint>;
0194                         };
0195 
0196                         sgtl5000_rx_endpoint: endpoint@1 {
0197                                 reg = <1>;
0198                                 remote-endpoint = <&sai2b_endpoint>;
0199                                 frame-master = <&sgtl5000_rx_endpoint>;
0200                                 bitclock-master = <&sgtl5000_rx_endpoint>;
0201                         };
0202                 };
0203 
0204         };
0205 
0206         touchscreen@38 {
0207                 compatible = "edt,edt-ft5406";
0208                 reg = <0x38>;
0209                 interrupt-parent = <&gpioc>;
0210                 interrupts = <6 IRQ_TYPE_EDGE_FALLING>; /* GPIO E */
0211         };
0212 };
0213 
0214 &ltdc {
0215         pinctrl-names = "default", "sleep";
0216         pinctrl-0 = <&ltdc_pins_b>;
0217         pinctrl-1 = <&ltdc_sleep_pins_b>;
0218         status = "okay";
0219 
0220         port {
0221                 lcd_display_out: endpoint {
0222                         remote-endpoint = <&lcd_panel_in>;
0223                 };
0224         };
0225 };
0226 
0227 &sai2 {
0228         clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
0229         clock-names = "pclk", "x8k", "x11k";
0230         pinctrl-names = "default", "sleep";
0231         pinctrl-0 = <&sai2a_pins_b &sai2b_pins_b>;
0232         pinctrl-1 = <&sai2a_sleep_pins_b &sai2b_sleep_pins_b>;
0233         status = "okay";
0234 
0235         sai2a: audio-controller@4400b004 {
0236                 #clock-cells = <0>;
0237                 dma-names = "tx";
0238                 clocks = <&rcc SAI2_K>;
0239                 clock-names = "sai_ck";
0240                 status = "okay";
0241 
0242                 sai2a_port: port {
0243                         sai2a_endpoint: endpoint {
0244                                 remote-endpoint = <&sgtl5000_tx_endpoint>;
0245                                 format = "i2s";
0246                                 mclk-fs = <512>;
0247                                 dai-tdm-slot-num = <2>;
0248                                 dai-tdm-slot-width = <16>;
0249                         };
0250                 };
0251         };
0252 
0253         sai2b: audio-controller@4400b024 {
0254                 dma-names = "rx";
0255                 st,sync = <&sai2a 2>;
0256                 clocks = <&rcc SAI2_K>, <&sai2a>;
0257                 clock-names = "sai_ck", "MCLK";
0258                 status = "okay";
0259 
0260                 sai2b_port: port {
0261                         sai2b_endpoint: endpoint {
0262                                 remote-endpoint = <&sgtl5000_rx_endpoint>;
0263                                 format = "i2s";
0264                                 mclk-fs = <512>;
0265                                 dai-tdm-slot-num = <2>;
0266                                 dai-tdm-slot-width = <16>;
0267                         };
0268                 };
0269         };
0270 };
0271 
0272 &timers2 {
0273         /* spare dmas for other usage (un-delete to enable pwm capture) */
0274         /delete-property/dmas;
0275         /delete-property/dma-names;
0276         status = "okay";
0277         pwm2: pwm {
0278                 pinctrl-0 = <&pwm2_pins_a>;
0279                 pinctrl-names = "default";
0280                 status = "okay";
0281         };
0282         timer@1 {
0283                 status = "okay";
0284         };
0285 };
0286 
0287 &usart3 {
0288         pinctrl-names = "default";
0289         pinctrl-0 = <&usart3_pins_a>;
0290         /delete-property/dmas;
0291         /delete-property/dma-names;
0292         status = "okay";
0293 };
0294 
0295 &uart8 {
0296         pinctrl-names = "default";
0297         pinctrl-0 = <&uart8_pins_a &uart8_rtscts_pins_a>;
0298         uart-has-rtscts;
0299         /delete-property/dmas;
0300         /delete-property/dma-names;
0301         status = "okay";
0302 };
0303 
0304 &usbh_ehci {
0305         phys = <&usbphyc_port0>;
0306         status = "okay";
0307 };
0308 
0309 &usbotg_hs {
0310         dr_mode = "otg";
0311         pinctrl-0 = <&usbotg_hs_pins_a>;
0312         pinctrl-names = "default";
0313         phy-names = "usb2-phy";
0314         phys = <&usbphyc_port1 0>;
0315         vbus-supply = <&vbus_otg>;
0316         status = "okay";
0317 };
0318 
0319 &usbphyc {
0320         status = "okay";
0321 };
0322 
0323 &usbphyc_port0 {
0324         phy-supply = <&vdd_usb>;
0325 };
0326 
0327 &usbphyc_port1 {
0328         phy-supply = <&vdd_usb>;
0329 };