Files
twx-linux/arch/arm64/boot/dts/ti/k3-am623-pfc-750-8xxx-common.dtsi
T
Heinrich Toews 29dfa20e98 arm64: dts: ti: Move default UART4 RTS GPIO to common board DTSI
When an interaction overlay is loaded after a base overlay, its
inclusion of k3-am623-pfc-rs485.dtsi overrides the baseboard-specific
UART4 rts-gpios config back to GPIO0_38. Moving the default rts-gpios to
the base common DTSI prevents this override, letting the active baseboard
overlay (like p0004224 which uses GPIO0_37) cleanly configure its
specific RTS routing.

Signed-off-by: Heinrich Toews <ht@twx-software.de>
2026-06-18 12:33:10 +02:00

397 lines
9.7 KiB
Devicetree

// SPDX-License-Identifier: GPL-2.0
/*
* Common dtsi for AM62x based WAGO devices
*
* Copyright (C) 2021-2022 Texas Instruments Incorporated - https://www.ti.com/
*
* Copyright (C) 2025 WAGO GmbH & Co. KG <http://global.wago.com>
*/
#include <dt-bindings/leds/common.h>
#include <dt-bindings/gpio/gpio.h>
#include "k3-am625.dtsi"
/ {
aliases {
serial2 = &main_uart0;
serial1 = &main_uart2;
serial4 = &main_uart4;
mmc0 = &sdhci1;
mmc1 = &sdhci0;
ethernet0 = &cpsw_port1;
ethernet1 = &cpsw_port2;
usb0 = &usb0;
watchdog0 = &main_rti0;
watchdog1 = &watchdog_ext;
watchdog2 = &main_rti1;
};
opp-table {
opp-200000000 {
opp-microvolt = <850000>;
};
opp-400000000 {
opp-microvolt = <850000>;
};
opp-600000000 {
opp-microvolt = <850000>;
};
opp-800000000 {
opp-microvolt = <850000>;
};
opp-1000000000 {
opp-microvolt = <850000>;
};
opp-1250000000 {
opp-microvolt = <850000>;
};
opp-1400000000 {
opp-hz = /bits/ 64 <1400000000>;
opp-microvolt = <850000>;
opp-supported-hw = <0x01 0x0004>;
clock-latency-ns = <6000000>;
};
};
chosen {
stdout-path = "serial2:115200n8";
};
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
ramoops@9ca00000 {
compatible = "ramoops";
reg = <0x00 0x9ca00000 0x00 0x00100000>;
no-map;
record-size = <0x8000>;
console-size = <0x8000>;
ftrace-size = <0x00>;
pmsg-size = <0x8000>;
};
secure_tfa_ddr: tfa@9e780000 {
reg = <0x00 0x9e780000 0x00 0x80000>;
alignment = <0x1000>;
no-map;
};
secure_ddr: optee@9e800000 {
reg = <0x00 0x9e800000 0x00 0x01800000>; /* for OP-TEE */
alignment = <0x1000>;
no-map;
};
/* Gap between m4f-memory and r5f-dma-memory: must be reserved
* to prevent Linux from allocating pages that are adjacent to
* ioremap_wc-mapped M4 regions (ARM64 cache aliasing). */
m4f_gap_memory: m4f-gap@9da00000 {
reg = <0x00 0x9da00000 0x00 0x100000>;
no-map;
};
wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9db00000 {
compatible = "shared-dma-pool";
reg = <0x00 0x9db00000 0x00 0xc00000>;
no-map;
};
/* Gap between r5f-dma-memory and tfa */
r5f_gap_memory: r5f-gap@9e700000 {
reg = <0x00 0x9e700000 0x00 0x80000>;
no-map;
};
/*
* U-Boot IPC side-door shared memory.
* Written by U-Boot (A53) to send LED commands to the M4.
* Must not be touched by the Linux kernel.
* See UBOOT_IPC_SHMEM_PHYS in wago_m4_led_protocol.h.
*/
uboot_ipc_shm: uboot-ipc-shm@9cbff000 {
reg = <0x00 0x9cbff000 0x00 0x1000>;
no-map;
};
mcu_m4fss_dma_memory_region: m4f-dma-memory@9cb00000 {
compatible = "shared-dma-pool";
reg = <0x00 0x9cb00000 0x00 0x100000>;
no-map;
};
mcu_m4fss_memory_region: m4f-memory@9cc00000 {
compatible = "shared-dma-pool";
reg = <0x00 0x9cc00000 0x00 0xe00000>;
no-map;
};
};
vmain_pd: regulator-0 {
/* TPS6522005 Dual PMIC */
compatible = "regulator-fixed";
regulator-name = "vmain_pd";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-always-on;
regulator-boot-on;
};
vcc_5v0: regulator-1 {
compatible = "regulator-fixed";
regulator-name = "vcc_5v0";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&vmain_pd>;
regulator-always-on;
regulator-boot-on;
};
vcc_3v3_sys: regulator-2 {
compatible = "regulator-fixed";
regulator-name = "vcc_3v3_sys";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
vin-supply = <&vmain_pd>;
regulator-always-on;
regulator-boot-on;
};
watchdog_ext: watchdog {
compatible = "linux,wdt-gpio";
pinctrl-names = "default";
pinctrl-0 = <&wdg_ext_pins_default>;
hw_algo = "toggle";
hw_margin_ms = <1120>; /* STWD100xY: min. 1120, typ. 1600 */
en-gpios = <&main_gpio0 42 GPIO_ACTIVE_LOW>;
gpios = <&main_gpio1 30 GPIO_ACTIVE_LOW>;
};
wsysinit: wsysinit_init {
compatible = "wago,sysinit";
tty,rs232-485 = "ttyS0";
};
};
&main_pmx0 {
main_uart0_pins_default: main-uart0-default-pins {
pinctrl-single,pins = <
AM62X_IOPAD(0x1c8, PIN_INPUT, 0) /* (D14) UART0_RXD */
AM62X_IOPAD(0x1cc, PIN_OUTPUT, 0) /* (E14) UART0_TXD */
>;
};
main_uart2_pins_default: main-uart2-default-pins {
pinctrl-single,pins = <
AM62X_IOPAD(0x01d0, PIN_INPUT, 3) /* (A15) UART0_CTSn.UART2_RXD */
AM62X_IOPAD(0x01d4, PIN_OUTPUT, 3) /* (B15) UART0_RTSn.UART2_TXD */
>;
};
main_uart4_pins_default: main-uart4-default-pins {
pinctrl-single,pins = <
AM62X_IOPAD(0x0b0, PIN_INPUT, 3) /* (K22) UART4_RXD */
AM62X_IOPAD(0x0b4, PIN_OUTPUT, 3) /* (K24) UART4_TXD */
AM62X_IOPAD(0x09c, PIN_OUTPUT_PULLDOWN, 7) /* (V25) GPIO0_38 (RS-DE) */
>;
};
main_i2c0_pins_default: main-i2c0-default-pins {
pinctrl-single,pins = <
AM62X_IOPAD(0x1e0, PIN_INPUT_PULLUP, 0) /* (B16) I2C0_SCL */
AM62X_IOPAD(0x1e4, PIN_INPUT_PULLUP, 0) /* (A16) I2C0_SDA */
>;
};
main_i2c1_pins_default: main-i2c1-default-pins {
pinctrl-single,pins = <
AM62X_IOPAD(0x1e8, PIN_INPUT_PULLUP, 0) /* (B17) I2C1_SCL */
AM62X_IOPAD(0x1ec, PIN_INPUT_PULLUP, 0) /* (A17) I2C1_SDA */
>;
};
main_mmc0_pins_default: main-mmc0-default-pins {
pinctrl-single,pins = <
AM62X_IOPAD(0x220, PIN_INPUT, 0) /* (Y3) MMC0_CMD */
AM62X_IOPAD(0x218, PIN_OUTPUT, 0) /* (AB1) MMC0_CLK */
AM62X_IOPAD(0x214, PIN_INPUT, 0) /* (AA2) MMC0_DAT0 */
AM62X_IOPAD(0x210, PIN_INPUT, 0) /* (AA1) MMC0_DAT1 */
AM62X_IOPAD(0x20c, PIN_INPUT, 0) /* (AA3) MMC0_DAT2 */
AM62X_IOPAD(0x208, PIN_INPUT, 0) /* (Y4) MMC0_DAT3 */
AM62X_IOPAD(0x204, PIN_INPUT, 0) /* (AB2) MMC0_DAT4 */
AM62X_IOPAD(0x200, PIN_INPUT, 0) /* (AC1) MMC0_DAT5 */
AM62X_IOPAD(0x1fc, PIN_INPUT, 0) /* (AD2) MMC0_DAT6 */
AM62X_IOPAD(0x1f8, PIN_INPUT, 0) /* (AC2) MMC0_DAT7 */
>;
};
main_mmc1_pins_default: main-mmc1-default-pins {
pinctrl-single,pins = <
AM62X_IOPAD(0x23c, PIN_INPUT, 0) /* (A21) MMC1_CMD */
AM62X_IOPAD(0x234, PIN_OUTPUT, 0) /* (B22) MMC1_CLK */
AM62X_IOPAD(0x230, PIN_INPUT, 0) /* (A22) MMC1_DAT0 */
AM62X_IOPAD(0x22c, PIN_INPUT, 0) /* (B21) MMC1_DAT1 */
AM62X_IOPAD(0x228, PIN_INPUT, 0) /* (C21) MMC1_DAT2 */
AM62X_IOPAD(0x224, PIN_INPUT, 0) /* (D22) MMC1_DAT3 */
AM62X_IOPAD(0x240, PIN_INPUT_PULLUP, 0) /* (D17) MMC1_SDCD */
AM62X_IOPAD(0x244, PIN_INPUT_PULLUP, 0) /* (C17) MMC1_SDWP */
>;
};
main_spi0_pins_default: main-spi0-default-pins {
pinctrl-single,pins = <
AM62X_IOPAD(0x01bc, PIN_OUTPUT, 0) /* (A14) SPI0_CLK */
AM62X_IOPAD(0x01c0, PIN_INPUT, 0) /* (B13) SPI0_D0 */
AM62X_IOPAD(0x01c4, PIN_OUTPUT, 0) /* (B14) SPI0_D1 */
AM62X_IOPAD(0x01b4, PIN_OUTPUT, 0) /* (A13) SPI0_CS0 */
>;
};
wdg_ext_pins_default: wdg-ext-default-pins {
pinctrl-single,pins = <
AM62X_IOPAD(0x00ac, PIN_OUTPUT_PULLUP | INPUT_EN, 7) /* (L21) GPMC0_CSn1.GPIO0_42 */
AM62X_IOPAD(0x01f0, PIN_OUTPUT, 7) /* (A18) EXT_REFCLK1.GPIO1_30 */
>;
};
pmic_irq_pins_default: pmic-irq-default-pins {
pinctrl-single,pins = <
AM62X_IOPAD(0x0114, PIN_INPUT, 7) /* (B24) MMC2_DAT0.GPIO0_68 */
>;
};
};
&main_uart0 { /* DGB UART */
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_uart0_pins_default>;
};
&main_uart2 { /* KBUS Firmware download */
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_uart2_pins_default>;
};
&main_uart4 { /* RS485 */
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_uart4_pins_default>;
rts-gpios = <&main_gpio0 38 GPIO_ACTIVE_HIGH>;
};
&main_i2c0 { /* type label */
pinctrl-names = "default";
pinctrl-0 = <&main_i2c0_pins_default>;
clock-frequency = <400000>;
eeprom_type_label: at24c512@54 {
compatible = "atmel,24c512";
reg = <0x54>;
pagesize = <128>;
};
};
&main_spi0 {
pinctrl-names = "default";
pinctrl-0 = <&main_spi0_pins_default>;
dmas = <&main_pktdma 0xc300 0>, <&main_pktdma 0x4300 0>;
dma-names = "tx0", "rx0";
/*
* When this option is set, the McSPI EOW Interrupt will be used
* to signal when a DMA Transfer is done. This is needed for this
* platform to prevent unpredictable delays resulting from TX/RX
* completions within the UDMA driver.
*/
use-eow-interrupt;
};
&main_i2c1 {
pinctrl-names = "default";
pinctrl-0 = <&main_i2c1_pins_default>;
clock-frequency = <400000>;
rtc@52 {
compatible = "microcrystal,rv3028";
reg = <0x52>;
// The backup goldcap is supplied with a higher voltage (+5V)
// then the RTC (+3,3) itself. It requires a special setup
// to avoid hardware failure.
use-goldcap-with-higher-voltage;
};
};
&sdhci0 { /* eMMC */
pinctrl-names = "default";
pinctrl-0 = <&main_mmc0_pins_default>;
ti,driver-strength-ohm = <33>;
disable-wp;
};
&sdhci1 { /* SD */
pinctrl-names = "default";
pinctrl-0 = <&main_mmc1_pins_default>;
ti,driver-strength-ohm = <33>;
disable-wp;
};
&mailbox0_cluster0 {
mbox_m4_0: mbox-m4-0 {
ti,mbox-rx = <0 0 0>;
ti,mbox-tx = <1 0 0>;
};
};
/*
* This system watchdog is reserved for internal use and is not user-configurable.
* It must not be modified or deleted to ensure consistent behavior!
*/
&main_rti1 { // watchdog@e010000
timeout-sec = <120>;
};
/*
* AM6232 does not have main_rti2, main_rti3, and main_rti15
* https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1218039/am623-stuck-in-sd-card-after-boot-up
*/
&main_rti2 { // watchdog@e020000
status = "disabled";
};
&main_rti3 { // watchdog@e030000
status = "disabled";
};
&main_rti15 { // watchdog@e0f0000
status = "disabled";
};
&usbss0 {
status = "okay";
ti,vbus-divider;
};
&usb0 {
status = "okay";
dr_mode = "peripheral";
};
&mcu_m4fss {
mboxes = <&mailbox0_cluster0 &mbox_m4_0>;
memory-region = <&mcu_m4fss_dma_memory_region>,
<&mcu_m4fss_memory_region>;
ti,no-auto-boot;
status = "okay";
};