Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
0002 /*
0003  * Copyright (C) 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 
0021 &adc {
0022         status = "disabled";
0023 };
0024 
0025 &dac {
0026         status = "disabled";
0027 };
0028 
0029 &gpiob {
0030         /*
0031          * NOTE: On DRC02, the RS485_RX_En is controlled by a separate
0032          * GPIO line, however the STM32 UART driver assumes RX happens
0033          * during TX anyway and that it only controls drive enable DE
0034          * line. Hence, the RX is always enabled here.
0035          */
0036         rs485-rx-en-hog {
0037                 gpio-hog;
0038                 gpios = <8 0>;
0039                 output-low;
0040                 line-name = "rs485-rx-en";
0041         };
0042 };
0043 
0044 &gpiod {
0045         gpio-line-names = "", "", "", "",
0046                           "", "", "DHCOM-B", "",
0047                           "", "", "", "DRC02-Out1",
0048                           "DRC02-Out2", "", "", "";
0049 };
0050 
0051 &gpioi {
0052         gpio-line-names = "DRC02-In1", "DHCOM-O", "DHCOM-H", "DHCOM-I",
0053                           "DHCOM-R", "DHCOM-M", "", "",
0054                           "DRC02-In2", "", "", "",
0055                           "", "", "", "";
0056 
0057         /*
0058          * NOTE: The USB Hub on the DRC02 needs a reset signal to be
0059          * pulled high in order to be detected by the USB Controller.
0060          * This signal should be handled by USB power sequencing in
0061          * order to reset the Hub when USB bus is powered down, but
0062          * so far there is no such functionality.
0063          */
0064         usb-hub-hog {
0065                 gpio-hog;
0066                 gpios = <2 0>;
0067                 output-high;
0068                 line-name = "usb-hub-reset";
0069         };
0070 };
0071 
0072 &i2c2 {
0073         pinctrl-names = "default";
0074         pinctrl-0 = <&i2c2_pins_a>;
0075         i2c-scl-rising-time-ns = <185>;
0076         i2c-scl-falling-time-ns = <20>;
0077         status = "okay";
0078         /* spare dmas for other usage */
0079         /delete-property/dmas;
0080         /delete-property/dma-names;
0081         status = "okay";
0082 
0083         eeprom@50 {
0084                 compatible = "atmel,24c04";
0085                 reg = <0x50>;
0086                 pagesize = <16>;
0087         };
0088 };
0089 
0090 &i2c4 {
0091         touchscreen@49 {
0092                 status = "disabled";
0093         };
0094 };
0095 
0096 &i2c5 { /* TP7/TP8 */
0097         pinctrl-names = "default";
0098         pinctrl-0 = <&i2c5_pins_a>;
0099         i2c-scl-rising-time-ns = <185>;
0100         i2c-scl-falling-time-ns = <20>;
0101         status = "okay";
0102         /* spare dmas for other usage */
0103         /delete-property/dmas;
0104         /delete-property/dma-names;
0105 };
0106 
0107 &sdmmc3 {
0108         /*
0109          * On DRC02, the SoM does not have SDIO WiFi. The pins
0110          * are used for on-board microSD slot instead.
0111          */
0112         /delete-property/broken-cd;
0113         cd-gpios = <&gpioi 10 GPIO_ACTIVE_HIGH>;
0114         disable-wp;
0115 };
0116 
0117 &spi1 {
0118         pinctrl-names = "default";
0119         pinctrl-0 = <&spi1_pins_a>;
0120         cs-gpios = <&gpioz 3 0>;
0121         /* Use PIO for the display */
0122         /delete-property/dmas;
0123         /delete-property/dma-names;
0124         status = "disabled";    /* Enable once there is display driver */
0125         /*
0126          * Note: PF3/GPIO_A , PD6/GPIO_B , PG0/GPIO_C , PC6/GPIO_E are
0127          * also connected to the display board connector.
0128          */
0129 };
0130 
0131 &usart3 {
0132         pinctrl-names = "default";
0133         pinctrl-0 = <&usart3_pins_a>;
0134         /delete-property/dmas;
0135         /delete-property/dma-names;
0136         status = "okay";
0137 };
0138 
0139 /*
0140  * Note: PI3 is UART1_RTS and PI5 is UART1_CTS on DRC02 (uart4 of STM32MP1),
0141  *       however the STM32MP1 pinmux cannot map them to UART4 .
0142  */
0143 
0144 &uart8 {        /* RS485 */
0145         linux,rs485-enabled-at-boot-time;
0146         pinctrl-names = "default";
0147         pinctrl-0 = <&uart8_pins_a>;
0148         rts-gpios = <&gpioe 6 GPIO_ACTIVE_HIGH>;
0149         /delete-property/dmas;
0150         /delete-property/dma-names;
0151         status = "okay";
0152 };
0153 
0154 &usbh_ehci {
0155         phys = <&usbphyc_port0>;
0156         status = "okay";
0157 };
0158 
0159 &usbphyc {
0160         status = "okay";
0161 };
0162 
0163 &usbphyc_port0 {
0164         phy-supply = <&vdd_usb>;
0165 };
0166 
0167 &usbphyc_port1 {
0168         phy-supply = <&vdd_usb>;
0169 };