Hi,
I wan’t to add some UARTs and GPIO’s via my device tree overlay for our project and i got as far that i can now see the GPIO’s using gpiofind and i can also see them using “/sys/kernel/debug/gpio”.
However when i try to set on of the new GPIO’s the output pin wont budge.
it remains at the ±0,8V level.
Module is the Verdin AM62 512MB non wifi/bt.
The io’s i want to add are the following:
SO_DIMM pins
32
36
59
57
199
201
203
205
207
215
217
219
30
34
141
143
According to the pinout designer these pins are all ‘Possible’ but not standard so i recon i needed to add these via a device tree overlay.
I based my device tree on the the following:
image base: torizon-core-docker-verdin-am62-Tezi_6.7.0+build.18.tar
DTS file: k3-am62-verdin-nonwifi-mallow.dts
And my custom overlay file contains the following (based is off of the SPI dev overlay file):
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
- Copyright 2023 Toradex
*/
// Verdin AM62 spidev
/dts-v1/;
/plugin/;
#include <…/arch/arm64/boot/dts/ti/k3-pinctrl.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = “toradex,verdin-am62”;
};
/* Verdin SPI_1 / / removed onboard TPM module from ‘k3-am62-verdin-mallow.dtsi’ */
&main_spi1 {
#address-cells = <1>;
#size-cells = <0>;
status = “okay”;
};
/* Verdin I2C_1 / / removed onboard EEPROM and temp. sensor module from ‘k3-am62-verdin-mallow.dtsi’ */
&main_i2c1 {
status = “okay”;
};
/* UART 1,2,3,4 are enabled from ‘k3-am62-verdin-mallow.dtsi’ / / define and enable UART 8 /
/ Verdin SD_1 / / Disabled from ‘k3-am62-verdin-mallow.dtsi’, need these pins for UART 8 and UART 5 */
&sdhci1 {
status = “disabled”;
};
/* Verdin UART_8 /
&main_pmx0 {
pinctrl_uart8: main-uart3-pins-default {
pinctrl-single,pins = <
AM62X_IOPAD(0x0244, PIN_INPUT_PULLUP, 3) / (C17) MMC1_SDWP.UART3_CTSn / / SODIMM 17 / / Physical Address F4244h /
AM62X_IOPAD(0x0240, PIN_OUTPUT, 3) / (D17) MMC1_SDCD.UART3_RTSn / / SODIMM 84 / / Physical Address F4240h /
AM62X_IOPAD(0x0234, PIN_INPUT_PULLUP, 3) / (B22) MMC1_CLK.UART3_RXD / / SODIMM 78 / / Physical Address F4234h /
AM62X_IOPAD(0x023C, PIN_OUTPUT, 3) / (A21) MMC1_CMD.UART3_TXD / / SODIMM 74 / / Physical Address F423Ch */
>;
};
};
&main_uart3 {
pinctrl-names = “default”;
pinctrl-0 = <&pinctrl_uart8>;
status = “okay”;
};
/* Verdin UART_5 /
&main_pmx0 {
pinctrl_uart5: main-uart5-pins-default {
pinctrl-single,pins = <
AM62X_IOPAD(0x0074, PIN_INPUT_PULLUP, 2) / (U25) GPMC0_AD14.UART5_RXD / / SODIMM 76 / / Physical Address F4074h /
AM62X_IOPAD(0x0078, PIN_OUTPUT, 2) / (U24) GPMC0_AD15.UART5_TXD / / SODIMM 21 / / Physical Address F4078h */
>;
};
};
&main_uart5 {
pinctrl-names = “default”;
pinctrl-0 = <&pinctrl_uart5>;
status = “okay”;
};
/* Add alias for serial port */
&{/} {
aliases {
/delete-property/ sdhci1;
serial5 = “/bus@f0000/serial@2830000”;
serial6 = “/bus@f0000/serial@2850000”;
};
};
/* Remaining GPIO’s /
&main_gpio0 {
gpio-line-names =
“SODIMM_52”, / 0 /
“”,
“”,
“SODIMM_56”,
“SODIMM_58”,
“SODIMM_60”,
“SODIMM_62”,
“”,
“”,
“”,
“”, / 10 /
“SODIMM_54”,
“SODIMM_64”,
“”,
“”,
“SODIMM_174”,
“SODIMM_172”,
“SODIMM_59”,
“SODIMM_57”,
“”,
“”, / 20 /
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“SODIMM_76”,
“SODIMM_21”, / 30 /
“SODIMM_256”,
“SODIMM_252”,
“”,
“SODIMM_46”,
“SODIMM_42”,
“SODIMM_218”,
“”,
“SODIMM_189”,
“”,
“SODIMM_216”, / 40 /
“SODIMM_220”,
“SODIMM_222”,
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”, / 50 /
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”, / 60 /
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”, / 70 /
“SODIMM_157”,
“SODIMM_187”,
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”, / 80 /
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“SODIMM_219”, / 90 */
“SODIMM_217”;
};
&main_gpio1 {
gpio-line-names =
“SODIMM_215”, /* 0 /
“SODIMM_199”,
“”,
“SODIMM_201”,
“SODIMM_203”,
“SODIMM_205”,
“SODIMM_207”,
“”,
“”,
“SODIMM_36”,
“SODIMM_34”, / 10 /
“SODIMM_30”,
“SODIMM_32”,
“”,
“”,
“SODIMM_15”,
“SODIMM_16”,
“SODIMM_19”,
“SODIMM_66”,
“SODIMM_161”,
“”, / 20 /
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”, / 30 /
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”, / 40 /
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“SODIMM_17”,
“SODIMM_155”, / 50 /
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”, / 60 /
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”, / 70 /
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”, / 80 */
“”,
“”,
“”,
“”,
“”,
“”,
“”;
};
&mcu_gpio0 {
gpio-line-names =
“SODIMM_244”,
“SODIMM_206”,
“SODIMM_208”,
“”,
“”,
“”,
“”,
“”,
“”,
“”,
“”, /* 10 */
“SODIMM_143”,
“SODIMM_141”,
“”,
“”,
“”,
“”,
“SODIMM_59”,
“SODIMM_57”,
“”,
“”,
“”,
“”,
“”;
};
&main_pmx0 {
/* UART 2, disable RTS and CTS, enabled via ‘K3-am62-verdin.dtsi’ /
pinctrl_wkup_uart0: wkup-uart0-pins-default {
pinctrl-single,pins = <
AM62X_MCU_IOPAD(0x0024, PIN_INPUT_PULLUP, 0) / (B4) WKUP_UART0_RXD / / SODIMM 137 /
AM62X_MCU_IOPAD(0x0028, PIN_OUTPUT, 0) / (C5) WKUP_UART0_TXD / / SODIMM 139 */
>;
};
pinctrl_gateway_board_inputs: gateway-input-pins-default {
pinctrl-single,pins = <
AM62X_IOPAD(0x00C, PIN_INPUT, 7) /* (E25) OSPI0_D0.GPIO0_3 */ /* SODIMM 56 */ /* g_gpio_expansion_1_io_a */ /* Physical Address F400Ch */
AM62X_IOPAD(0x0010, PIN_INPUT, 7) /* (G24) OSPI0_D1.GPIO0_4 */ /* SODIMM 58 */ /* g_gpio_expansion_1_io_reset */ /* Physical Address F4010h */
AM62X_IOPAD(0x0014, PIN_INPUT, 7) /* (F25) OSPI0_D2.GPIO0_5 */ /* SODIMM 60 */ /* g_gpio_expansion_2_io_a */ /* Physical Address F4014h */
AM62X_IOPAD(0x0018, PIN_INPUT, 7) /* (F24) OSPI0_D3.GPIO0_6 */ /* SODIMM 62 */ /* g_gpio_expansion_2_io_b */ /* Physical Address F4018h */
AM62X_IOPAD(0x0030, PIN_INPUT, 7) /* (G21) OSPI0_CSn1.GPIO0_12 */ /* SODIMM 64 */ /* g_gpio_expansion_2_io_reset */ /* Physical Address F4030h */
AM62X_IOPAD(0x01C0, PIN_INPUT, 7) /* (B13) SPI0_D0.GPIO1_18 */ /* SODIMM 66 */ /* g_gpio_expansion_2_io_interrupt */ /* Physical Address F41C0h */
AM62X_IOPAD(0x01A8, PIN_INPUT, 7) /* (D20) MCASP0_AFSX.GPIO1_12 */ /* SODIMM 32 */ /* g_gpio_junction_box_1_fault_efuse */ /* Physical Address F41A8h */
AM62X_IOPAD(0x019C, PIN_INPUT, 7) /* (B18) MCASP0_AXR1.GPIO1_9 */ /* SODIMM 36 */ /* g_gpio_junction_box_2_fault_efuse */ /* Physical Address F419Ch */
AM62X_IOPAD(0x0124, PIN_INPUT, 7) /* (A23) MMC2_SDCD.GPIO0_71 */ /* SODIMM 157 */ /* g_gpio_usb_fault_efuse */ /* Physical Address F4124h */
/* MCU domain pins */
AM62X_MCU_IOPAD(0x0044, PIN_INPUT, 7) /* (A8) MCU_I2C0_SCL.MCU_GPIO0_17 */ /* SODIMM 59 */ /* g_gpio_expansion_1_io_interrupt */ /* Physical Address 4084044h */
AM62X_MCU_IOPAD(0x0048, PIN_INPUT, 7) /* (D10) MCU_I2C0_SDA.MCU_GPIO0_18 */ /* SODIMM 57 */ /* g_gpio_expansion_1_io_b */ /* Physical Address 4084048h */
>;
};
pinctrl_gateway_board_outputs: gateway-output-pins-default {
pinctrl-single,pins = <
AM62X_IOPAD(0x017C, PIN_OUTPUT, 7) /* (AD22) RGMII2_RX_CTL.GPIO1_1 */ /* SODIMM 199 */ /* g_gpio_expansion_1_uart_ri */ /* Physical Address F417Ch */
AM62X_IOPAD(0x0184, PIN_OUTPUT, 7) /* (AE23) RGMII2_RD0.GPIO1_3 */ /* SODIMM 201 */ /* g_gpio_expansion_1_uart_dtr */ /* Physical Address F4184h */
AM62X_IOPAD(0x0188, PIN_OUTPUT, 7) /* (AB20) RGMII2_RD1.GPIO1_4 */ /* SODIMM 203 */ /* g_gpio_expansion_1_uart_dcd */ /* Physical Address F4188h */
AM62X_IOPAD(0x018C, PIN_OUTPUT, 7) /* (AC21) RGMII2_RD2.GPIO1_5 */ /* SODIMM 205 */ /* g_gpio_expansion_1_uart_dsr */ /* Physical Address F418Ch */
AM62X_IOPAD(0x0190, PIN_OUTPUT, 7) /* (AE22) RGMII2_RD3.GPIO1_6 */ /* SODIMM 207 */ /* g_gpio_expansion_1_uart_ck */ /* Physical Address F4190h */
AM62X_IOPAD(0x009C, PIN_OUTPUT, 7) /* (V25) GPMC0_WAIT1.GPIO0_38 */ /* SODIMM 189 */ /* g_gpio_expansion_2_spi_cs */ /* Physical Address F409Ch */
AM62X_IOPAD(0x0178, PIN_OUTPUT, 7) /* (AC20) RGMII2_TD3.GPIO1_0 */ /* SODIMM 215 */ /* g_gpio_expansion_2_uart_ri */ /* Physical Address F4178h */
AM62X_IOPAD(0x00A4, PIN_OUTPUT, 7) /* (M22) GPMC0_DIR.GPIO0_40 */ /* SODIMM 216 */ /* g_gpio_expansion_2_uart_dtr */ /* Physical Address F40A4h */
AM62X_IOPAD(0x0174, PIN_OUTPUT, 7) /* (AD21) RGMII2_TD2.GPIO0_91 */ /* SODIMM 217 */ /* g_gpio_expansion_2_uart_dcd */ /* Physical Address F4174h */
AM62X_IOPAD(0x0094, PIN_OUTPUT, 7) /* (N20) GPMC0_BE1n.GPIO0_36 */ /* SODIMM 218 */ /* g_gpio_expansion_2_uart_dsr */ /* Physical Address F4094h */
AM62X_IOPAD(0x0170, PIN_OUTPUT, 7) /* (AA18) RGMII2_TD1.GPIO0_90 */ /* SODIMM 219 */ /* g_gpio_expansion_2_uart_ck */ /* Physical Address F4170h */
AM62X_IOPAD(0x01A4, PIN_OUTPUT, 7) /* (B20) MCASP0_ACLKX.GPIO1_11 */ /* SODIMM 30 */ /* g_gpio_junction_box_1_enable_efuse */ /* Physical Address F41A4h */
AM62X_IOPAD(0x01A0, PIN_OUTPUT, 7) /* (E18) MCASP0_AXR0.GPIO1_10 */ /* SODIMM 34 */ /* g_gpio_junction_box_2_enable_efuse */ /* Physical Address F41A0h */
AM62X_IOPAD(0x0254, PIN_OUTPUT, 7) /* (C20) USB0_DRVVBUS.GPIO1_50 */ /* SODIMM 155 */ /* g_gpio_usb_enable_efuse */ /* Physical Address F4254h */
AM62X_IOPAD(0x00A8, PIN_OUTPUT, 7) /* (M21) GPMC0_CSn0.GPIO0_41 */ /* SODIMM 220 */ /* g_gpio_usb_reset */ /* Physical Address F40A8h */
AM62X_IOPAD(0x0128, PIN_OUTPUT, 7) /* (B23) MMC2_SDWP.GPIO0_72 */ /* SODIMM 187 */ /* g_gpio_reset_rtc_wk */ /* Physical Address F4128h */
AM62X_IOPAD(0x00AC, PIN_OUTPUT, 7) /* (L21) GPMC0_CSn1.GPIO0_42 */ /* SODIMM 222 */ /* g_gpio_3V3_buck_converter_enable */ /* Physical Address F40ACh */
/* MCU domain pins */
AM62X_MCU_IOPAD(0x030, PIN_OUTPUT, 7) /* (A4) WKUP_UART0_RTSn.MCU_GPIO0_12 */ /* SODIMM 141 */ /* g_gpio_junction_box_1_transceiver_enable */ /* Physical Address 4084030h */
AM62X_MCU_IOPAD(0x02C, PIN_OUTPUT, 7) /* (C6) WKUP_UART0_CTSn.MCU_GPIO0_11 */ /* SODIMM 143 */ /* g_gpio_junction_box_2_transceiver_enable */ /* Physical Address 408402Ch */
AM62X_MCU_IOPAD(0x0000, PIN_OUTPUT, 7) /* (E8) MCU_SPI0_CS0.MCU_GPIO0_0 */ /* SODIMM 244 */ /* g_gpio_reset_rtc_sp */ /* Physical Address 4084000h */
AM62X_MCU_IOPAD(0x0004, PIN_OUTPUT, 7) /* (B8) MCU_SPI0_CS1.MCU_GPIO0_1 */ /* SODIMM 206 */ /* g_gpio_select_adc_mux_1 */ /* Physical Address 4084004h */
AM62X_MCU_IOPAD(0x0008, PIN_OUTPUT, 7) /* (A7) MCU_SPI0_CLK.MCU_GPIO0_2 */ /* SODIMM 208 */ /* g_gpio_select_adc_mux_2 */ /* Physical Address 4084008h */
>;
};
};
Any help is appreciated.
Kind regards,
Richard