Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: stm32: Add DHSOM based DRC02 board

Add DT for DH DRC02 unit, which is a universal controller device.
The system has two ethernet ports, two CANs, RS485 and RS232, USB,
capacitive buttons and an OLED display.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: linux-stm32@st-md-mailman.stormreply.com
To: linux-arm-kernel@lists.infradead.org
Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>

authored by

Marek Vasut and committed by
Alexandre Torgue
fde180f0 b0a07f60

+195 -2
+1
arch/arm/boot/dts/Makefile
··· 1047 1047 stm32746g-eval.dtb \ 1048 1048 stm32h743i-eval.dtb \ 1049 1049 stm32h743i-disco.dtb \ 1050 + stm32mp153c-dhcom-drc02.dtb \ 1050 1051 stm32mp157a-avenger96.dtb \ 1051 1052 stm32mp157a-dhcor-avenger96.dtb \ 1052 1053 stm32mp157a-dk1.dtb \
+35
arch/arm/boot/dts/stm32mp153c-dhcom-drc02.dts
··· 1 + // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause 2 + /* 3 + * Copyright (C) 2020 Marek Vasut <marex@denx.de> 4 + * 5 + * DHCOM STM32MP1 variant: 6 + * DHCM-STM32MP153C-C065-R102-F0819-SPI-E2-CAN2-RTC-I-01D2 7 + * DHCOM PCB number: 587-200 or newer 8 + * DRC02 PCB number: 568-100 or newer 9 + */ 10 + /dts-v1/; 11 + 12 + #include "stm32mp153.dtsi" 13 + #include "stm32mp15xc.dtsi" 14 + #include "stm32mp15xx-dhcom-som.dtsi" 15 + #include "stm32mp15xx-dhcom-drc02.dtsi" 16 + 17 + / { 18 + model = "DH electronics STM32MP153C DHCOM DRC02"; 19 + compatible = "dh,stm32mp153c-dhcom-drc02", "dh,stm32mp153c-dhcom-som", 20 + "st,stm32mp153"; 21 + }; 22 + 23 + &m_can1 { 24 + pinctrl-names = "default", "sleep"; 25 + pinctrl-0 = <&m_can1_pins_a>; 26 + pinctrl-1 = <&m_can1_sleep_pins_a>; 27 + status = "okay"; 28 + }; 29 + 30 + &m_can2 { 31 + pinctrl-names = "default", "sleep"; 32 + pinctrl-0 = <&m_can2_pins_a>; 33 + pinctrl-1 = <&m_can2_sleep_pins_a>; 34 + status = "okay"; 35 + };
+2 -2
arch/arm/boot/dts/stm32mp157c-dhcom-pdk2.dts
··· 4 4 * 5 5 * DHCOM STM32MP1 variant: 6 6 * DHCM-STM32MP157C-C065-R102-F0819-SPI-E2-CAN2-SDR104-RTC-WBT-T-DSI-I-01D2 7 - * DHCOR PCB number: 587-200 or newer 7 + * DHCOM PCB number: 587-200 or newer 8 8 * PDK2 PCB number: 516-400 or newer 9 9 */ 10 10 /dts-v1/; ··· 15 15 #include "stm32mp15xx-dhcom-pdk2.dtsi" 16 16 17 17 / { 18 - model = "DH Electronics STM32MP157C DHCOM Premium Developer Kit (2)"; 18 + model = "DH electronics STM32MP157C DHCOM Premium Developer Kit (2)"; 19 19 compatible = "dh,stm32mp157c-dhcom-pdk2", "dh,stm32mp157c-dhcom-som", 20 20 "st,stm32mp157"; 21 21 };
+157
arch/arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi
··· 1 + // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause 2 + /* 3 + * Copyright (C) 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 + 21 + &adc { 22 + status = "disabled"; 23 + }; 24 + 25 + &dac { 26 + status = "disabled"; 27 + }; 28 + 29 + &gpiob { 30 + /* 31 + * NOTE: On DRC02, the RS485_RX_En is controlled by a separate 32 + * GPIO line, however the STM32 UART driver assumes RX happens 33 + * during TX anyway and that it only controls drive enable DE 34 + * line. Hence, the RX is always enabled here. 35 + */ 36 + rs485-rx-en { 37 + gpio-hog; 38 + gpios = <8 GPIO_ACTIVE_HIGH>; 39 + output-low; 40 + line-name = "rs485-rx-en"; 41 + }; 42 + }; 43 + 44 + &gpiod { 45 + gpio-line-names = "", "", "", "", 46 + "", "", "", "", 47 + "", "", "", "Out1", 48 + "Out2", "", "", ""; 49 + }; 50 + 51 + &gpioi { 52 + gpio-line-names = "In1", "", "", "", 53 + "", "", "", "", 54 + "In2", "", "", "", 55 + "", "", "", ""; 56 + 57 + /* 58 + * NOTE: The USB Hub on the DRC02 needs a reset signal to be 59 + * pulled high in order to be detected by the USB Controller. 60 + * This signal should be handled by USB power sequencing in 61 + * order to reset the Hub when USB bus is powered down, but 62 + * so far there is no such functionality. 63 + */ 64 + usb-hub { 65 + gpio-hog; 66 + gpios = <2 GPIO_ACTIVE_HIGH>; 67 + output-high; 68 + line-name = "usb-hub-reset"; 69 + }; 70 + }; 71 + 72 + &i2c2 { 73 + pinctrl-names = "default"; 74 + pinctrl-0 = <&i2c2_pins_a>; 75 + i2c-scl-rising-time-ns = <185>; 76 + i2c-scl-falling-time-ns = <20>; 77 + status = "okay"; 78 + /* spare dmas for other usage */ 79 + /delete-property/dmas; 80 + /delete-property/dma-names; 81 + status = "okay"; 82 + 83 + eeprom@50 { 84 + compatible = "atmel,24c04"; 85 + reg = <0x50>; 86 + pagesize = <16>; 87 + }; 88 + }; 89 + 90 + &i2c5 { /* TP7/TP8 */ 91 + pinctrl-names = "default"; 92 + pinctrl-0 = <&i2c5_pins_a>; 93 + i2c-scl-rising-time-ns = <185>; 94 + i2c-scl-falling-time-ns = <20>; 95 + status = "okay"; 96 + /* spare dmas for other usage */ 97 + /delete-property/dmas; 98 + /delete-property/dma-names; 99 + }; 100 + 101 + &sdmmc3 { 102 + /* 103 + * On DRC02, the SoM does not have SDIO WiFi. The pins 104 + * are used for on-board microSD slot instead. 105 + */ 106 + /delete-property/broken-cd; 107 + cd-gpios = <&gpioi 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 108 + disable-wp; 109 + }; 110 + 111 + &spi1 { 112 + pinctrl-names = "default"; 113 + pinctrl-0 = <&spi1_pins_a>; 114 + cs-gpios = <&gpioz 3 0>; 115 + /* Use PIO for the display */ 116 + /delete-property/dmas; 117 + /delete-property/dma-names; 118 + status = "disabled"; /* Enable once there is display driver */ 119 + /* 120 + * Note: PF3/GPIO_A , PD6/GPIO_B , PG0/GPIO_C , PC6/GPIO_E are 121 + * also connected to the display board connector. 122 + */ 123 + }; 124 + 125 + &usart3 { 126 + pinctrl-names = "default"; 127 + pinctrl-0 = <&usart3_pins_a>; 128 + status = "okay"; 129 + }; 130 + 131 + /* 132 + * Note: PI3 is UART1_RTS and PI5 is UART1_CTS on DRC02 (uart4 of STM32MP1), 133 + * however the STM32MP1 pinmux cannot map them to UART4 . 134 + */ 135 + 136 + &uart8 { /* RS485 */ 137 + linux,rs485-enabled-at-boot-time; 138 + pinctrl-names = "default"; 139 + pinctrl-0 = <&uart8_pins_a>; 140 + rts-gpios = <&gpioe 6 GPIO_ACTIVE_HIGH>; 141 + status = "okay"; 142 + }; 143 + 144 + &usbh_ehci { 145 + phys = <&usbphyc_port0>; 146 + status = "okay"; 147 + }; 148 + 149 + &usbphyc { 150 + status = "okay"; 151 + }; 152 + 153 + &usbphyc_port0 { 154 + phy-supply = <&vdd_usb>; 155 + vdda1v1-supply = <&reg11>; 156 + vdda1v8-supply = <&reg18>; 157 + };