Enable GPIO Pin on Colibri T30 device tree (Mainline kernel 6.6)

Hello,

I’m currently trying to implement the most recent LTS-Kernel int out BSP for the Colibri T30. I’m struggling with the GPIOs currently, to do the correct configuration in the device tree (I think). For now I’m focused on SODIMM 30 (gpiochip 0, offset 6, Tegra Pin A.06), which should act as a GPIO output (Turns an LED on/off).

(We need to setup more GPIO Pins, but before I contiue, I want to make sure I can get this one configured & working properly)

When using the “gpioset 0 6=1/0” command, nothing happens, the output isn’t changed.

From our DT:

pinmux@70000868 {
			pinctrl-names = "default";
			pinctrl-0 = <&state_default>;

			state_default: pinmux {
				/* Colibri Pin 30 LED */
				sdmmc3-clk-pa6 {
					nvidia,pins = "sdmmc3_clk_pa6";
					nvidia,function = "sdmmc3"; //What function to use here for GPIO output functionallity?
					nvidia,pull = <TEGRA_PIN_PULL_UP>;
					nvidia,tristate = <TEGRA_PIN_DISABLE>;
					nvidia,enable-input = <TEGRA_PIN_DISABLE>;
				};
			};
	};

I’m not sure if that configuration is correct to make that pin work as GPIO though, and I can hardly find references for possible functions. Closest I found (aside from Cilobro T30 datasheet) was probably this:

DTs to look at for further reference:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm/boot/dts/nvidia/tegra30.dtsi?h=linux-6.6.y
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm/boot/dts/nvidia/tegra30-colibri.dtsi?h=linux-6.6.y
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm/boot/dts/nvidia/tegra30-colibri-eval-v3.dts?h=linux-6.6.y

When I use the GPIO hogging mechanism, I can set permanent on/off states, but we need to be able to change this during runtime, which is not possible in this case, but this makes it clear that the hardware itself is working.

test1 {// this works but only static output    
    gpio-hog;
    gpios = <TEGRA_GPIO(A, 6) GPIO_ACTIVE_HIGH>;
    output-high;
    line-name = "SODIMM_30_LED";
};

What am I doing wrong here? Any ideas what I need to change?
If further Information is needed, let me know.

I’m aware that this configuration might not be officially supported, but we need a solution regardless.

Softwareinfo:


gpiochip0 - 256 lines:
        line   0:      unnamed       unused   input  active-high
        line   1: "SODIMM_121"       unused   input  active-high
        line   2: "SODIMM_186"       unused   input  active-high
        line   3: "SODIMM_184"       unused   input  active-high
        line   4: "SODIMM_146_1" unused input active-high
        line   5: "SODIMM_144_1" unused input active-high
        line   6:  "SODIMM_30"       unused  output  active-high
        line   7:  "SODIMM_67"       unused   input  active-high
        line   8:  "SODIMM_36"       unused   input  active-high
        line   9:  "SODIMM_32"       unused   input  active-high
        line  10: "SODIMM_154"       unused   input  active-high
        line  11:  "SODIMM_56"       unused   input  active-high
        line  12:  "SODIMM_59"       unused   input  active-high
        line  13:  "SODIMM_28"       unused   input  active-high
        line  14:  "SODIMM_55"       unused   input  active-high
        line  15:  "SODIMM_63"       unused   input  active-high
        line  16: "SODIMM_119"       unused   input  active-high
        line  17:  "SODIMM_81"       unused   input  active-high
        line  18:  "SODIMM_21"       unused   input  active-high
        line  19:  "SODIMM_19"       unused   input  active-high
        line  20: "SODIMM_196"       unused   input  active-high
        line  21: "SODIMM_194"       unused   input  active-high
        line  22:      unnamed       unused   input  active-high
        line  23:  "SODIMM_43"       unused   input  active-high
        line  24:      unnamed       unused   input  active-high
        line  25:      unnamed       unused   input  active-high
        line  26:      unnamed       unused   input  active-high
        line  27: "SODIMM_86_2" unused input active-high
        line  28: "SODIMM_92_2" unused input active-high
        line  29:      unnamed       unused   input  active-high
        line  30:      unnamed       unused   input  active-high
        line  31:      unnamed       unused   input  active-high
        line  32:  "SODIMM_76"       unused   input  active-high
        line  33:  "SODIMM_70"       unused   input  active-high
        line  34:  "SODIMM_60"       unused   input  active-high
        line  35:  "SODIMM_58"       unused   input  active-high
        line  36:  "SODIMM_78"       unused   input  active-high
        line  37:  "SODIMM_72"       unused   input  active-high
        line  38:  "SODIMM_80"       unused   input  active-high
        line  39:  "SODIMM_46"       unused   input  active-high
        line  40:  "SODIMM_62"       unused   input  active-high
        line  41:  "SODIMM_48"       unused   input  active-high
        line  42:  "SODIMM_74"       unused   input  active-high
        line  43:  "SODIMM_50"       unused   input  active-high
        line  44:  "SODIMM_52"       unused   input  active-high
        line  45:  "SODIMM_54"       unused   input  active-high
        line  46:  "SODIMM_66"       unused   input  active-high
        line  47:  "SODIMM_64"       unused   input  active-high
        line  48: "SODIMM_149"       unused   input  active-high
        line  49: "SODIMM_151"       unused   input  active-high
        line  50: "SODIMM_153"       unused   input  active-high
        line  51: "SODIMM_155"       unused   input  active-high
        line  52: "SODIMM_157"       unused   input  active-high
        line  53: "SODIMM_159"       unused   input  active-high
        line  54: "SODIMM_161"       unused   input  active-high
        line  55: "SODIMM_163"       unused   input  active-high
        line  56: "SODIMM_165"       unused   input  active-high
        line  57: "SODIMM_167"       unused   input  active-high
        line  58: "SODIMM_169"       unused   input  active-high
        line  59: "SODIMM_171"       unused   input  active-high
        line  60: "SODIMM_173"       unused   input  active-high
        line  61: "SODIMM_175"       unused   input  active-high
        line  62: "SODIMM_177"       unused   input  active-high
        line  63: "SODIMM_179"       unused   input  active-high
        line  64:  "SODIMM_89"       unused   input  active-high
        line  65:  "SODIMM_91"       unused   input  active-high
        line  66:      unnamed       unused   input  active-high
        line  67: "SODIMM_130"       unused   input  active-high
        line  68:  "SODIMM_87"       unused   input  active-high
        line  69: "SODIMM_95_2" unused input active-high
        line  70: "SODIMM_132"       unused   input  active-high
        line  71: "SODIMM_95_1" unused input active-high
        line  72: "SODIMM_126"       unused   input  active-high
        line  73: "SODIMM_44_1" unused input active-high
        line  74: "SODIMM_128"       unused   input  active-high
        line  75:  "SODIMM_68"       unused   input  active-high
        line  76:  "SODIMM_82"       unused   input  active-high
        line  77: "SODIMM_113"       unused   input  active-high
        line  78: "SODIMM_111"       unused   input  active-high
        line  79:  "SODIMM_38"       unused   input  active-high
        line  80: "SODIMM_150"       unused   input  active-high
        line  81: "SODIMM_152"       unused   input  active-high
        line  82: "SODIMM_105"       unused  output  active-high
        line  83: "SODIMM_107"       unused   input  active-high
        line  84: "SODIMM_106"       unused   input  active-high
        line  85: "SODIMM_137"       unused   input  active-high
        line  86: "SODIMM_135"       unused   input  active-high
        line  87:  "SODIMM_34"       unused   input  active-high
        line  88:      unnamed       unused   input  active-high
        line  89:      unnamed       unused   input  active-high
        line  90:      unnamed       unused   input  active-high
        line  91:      unnamed       unused   input  active-high
        line  92:      unnamed       unused   input  active-high
        line  93:      unnamed       unused   input  active-high
        line  94:      unnamed       unused   input  active-high
        line  95:      unnamed       unused   input  active-high
        line  96:  "SODIMM_57"       unused   input  active-high
        line  97:  "SODIMM_61"       unused   input  active-high
        line  98: "SODIMM_136_2" unused input active-high
        line  99: "SODIMM_138_2" unused input active-high
        line 100: "SODIMM_140_2" unused input active-high
        line 101: "SODIMM_142_2" unused input active-high
        line 102: "SODIMM_144_2" unused input active-high
        line 103: "SODIMM_146_2" unused input active-high
        line 104: "SODIMM_174"       unused   input  active-high
        line 105: "SODIMM_176"       unused   input  active-high
        line 106: "SODIMM_178"       unused   input  active-high
        line 107: "SODIMM_180"       unused   input  active-high
        line 108: "SODIMM_160"       unused   input  active-high
        line 109: "SODIMM_158"       unused   input  active-high
        line 110: "SODIMM_162"       unused   input  active-high
        line 111:      unnamed       unused   input  active-high
        line 112:  "SODIMM_23"       unused   input  active-high
        line 113:  "SODIMM_35"       unused   input  active-high
        line 114:  "SODIMM_33"       unused   input  active-high
        line 115:  "SODIMM_25"       unused   input  active-high
        line 116:  "SODIMM_27"       unused   input  active-high
        line 117:  "SODIMM_37"       unused   input  active-high
        line 118:  "SODIMM_31"       unused   input  active-high
        line 119:  "SODIMM_29"       unused   input  active-high
        line 120:      unnamed       unused   input  active-high
        line 121:      unnamed       unused   input  active-high
        line 122:      unnamed       unused   input  active-high
        line 123:      unnamed       unused   input  active-high
        line 124: "SODIMM_120"       unused   input  active-high
        line 125: "SODIMM_122"       unused   input  active-high
        line 126: "SODIMM_124"       unused   input  active-high
        line 127: "SODIMM_188"       unused   input  active-high
        line 128:      unnamed       unused   input  active-high
        line 129:      unnamed       unused   input  active-high
        line 130:      unnamed       unused   input  active-high
        line 131:      unnamed       unused   input  active-high
        line 132:      unnamed       unused   input  active-high
        line 133:      unnamed       unused   input  active-high
        line 134:      unnamed       unused   input  active-high
        line 135:      unnamed       unused   input  active-high
        line 136:      unnamed       unused   input  active-high
        line 137:      unnamed       unused   input  active-high
        line 138:      unnamed       unused   input  active-high
        line 139:      unnamed       unused   input  active-high
        line 140:      unnamed       unused   input  active-high
        line 141:      unnamed       unused   input  active-high
        line 142:      unnamed       unused   input  active-high
        line 143:      unnamed       unused   input  active-high
        line 144:  "SODIMM_73"       unused   input  active-high
        line 145:      unnamed       unused   input  active-high
        line 146: "SODIMM_47_2" unused input active-high
        line 147: "SODIMM_190_2" unused input active-high
        line 148: "SODIMM_192_2" unused input active-high
        line 149: "SODIMM_49_2" unused input active-high
        line 150: "SODIMM_51_2" unused input active-high
        line 151: "SODIMM_53_2" unused input active-high
        line 152:      unnamed       unused   input  active-high
        line 153:      unnamed       unused   input  active-high
        line 154:      unnamed       unused   input  active-high
        line 155:      unnamed       unused   input  active-high
        line 156:      unnamed       unused   input  active-high
        line 157: "SODIMM_133"       unused   input  active-high
        line 158: "SODIMM_127"       unused   input  active-high
        line 159:      unnamed       unused   input  active-high
        line 160: "SODIMM_123"       unused   input  active-high
        line 161: "SODIMM_125"       unused   input  active-high
        line 162: "SODIMM_110"       unused   input  active-high
        line 163: "SODIMM_112"       unused   input  active-high
        line 164: "SODIMM_114"       unused   input  active-high
        line 165: "SODIMM_116"       unused   input  active-high
        line 166: "SODIMM_118"       unused   input  active-high
        line 167:      unnamed       unused   input  active-high
        line 168:      unnamed        "irq"   input   active-low [used]
        line 169:  "SODIMM_45"       unused   input  active-high
        line 170:  "SODIMM_71"       unused   input  active-high
        line 171:  "SODIMM_85"       unused   input  active-high
        line 172:      unnamed       unused   input  active-high
        line 173:      unnamed       unused   input  active-high
        line 174:      unnamed       unused   input  active-high
        line 175:      unnamed       unused   input  active-high
        line 176:  "SODIMM_93"       unused   input  active-high
        line 177: "SODIMM_44_2" unused input active-high
        line 178: "SODIMM_129"       unused   input  active-high
        line 179: "SODIMM_131"       unused   input  active-high
        line 180:      unnamed       unused   input  active-high
        line 181:  "SODIMM_75"       unused   input  active-high
        line 182: "SODIMM_115"       unused   input  active-high
        line 183: "SODIMM_117"       unused   input  active-high
        line 184: "SODIMM_142_1" unused input active-high
        line 185: "SODIMM_140_1" unused input active-high
        line 186: "SODIMM_138_1" unused input active-high
        line 187: "SODIMM_136_1" unused input active-high
        line 188: "SODIMM_134"       unused   input  active-high
        line 189: "SODIMM_100"       unused   input  active-high
        line 190: "SODIMM_102"       unused   input  active-high
        line 191: "SODIMM_104"       unused   input  active-high
        line 192: "SODIMM_92_1" unused input active-high
        line 193:  "SODIMM_90"       unused   input  active-high
        line 194:  "SODIMM_88"       unused   input  active-high
        line 195: "SODIMM_86_1" unused input active-high
        line 196:  "SODIMM_97"       unused   input  active-high
        line 197:  "SODIMM_79"       unused   input  active-high
        line 198: "SODIMM_103"       unused   input  active-high
        line 199: "SODIMM_101"       unused   input  active-high
        line 200:  "SODIMM_96"       unused   input  active-high
        line 201:  "SODIMM_98"       unused   input  active-high
        line 202: "SODIMM_156"       unused   input  active-high
        line 203:  "SODIMM_99"       unused   input  active-high
        line 204: "SODIMM_164"       unused   input  active-high
        line 205:      unnamed       unused   input  active-high
        line 206:      unnamed       unused   input  active-high
        line 207:      unnamed       unused   input  active-high
        line 208:      unnamed       unused   input  active-high
        line 209:      unnamed       unused   input  active-high
        line 210:      unnamed       unused   input  active-high
        line 211:      unnamed       unused   input  active-high
        line 212:      unnamed       unused   input  active-high
        line 213:      unnamed       unused   input  active-high
        line 214:      unnamed       unused   input  active-high
        line 215:      unnamed       unused   input  active-high
        line 216: "SODIMM_192_1" unused input active-high
        line 217: "SODIMM_49_1" unused input active-high
        line 218: "SODIMM_51_1" unused input active-high
        line 219: "SODIMM_53_1" unused input active-high
        line 220: "SODIMM_166"       unused   input  active-high
        line 221: "SODIMM_168"       unused   input  active-high
        line 222: "SODIMM_170"       unused   input  active-high
        line 223: "SODIMM_172"       unused   input  active-high
        line 224: "SODIMM_47_1" unused input active-high
        line 225: "SODIMM_190_1" unused input active-high
        line 226:      unnamed       unused   input  active-high
        line 227:      unnamed       unused   input  active-high
        line 228:      unnamed       unused   input  active-high
        line 229:      unnamed       unused   input  active-high
        line 230:  "SODIMM_24"       unused   input  active-high
        line 231:  "SODIMM_94"       unused   input  active-high
        line 232:      unnamed "LAN_RESET#"  output  active-high [used]
        line 233:      unnamed       unused   input  active-high
        line 234:      unnamed "regulator-lan-v-bus" output active-high [used]
        line 235:      unnamed       unused   input  active-high
        line 236:      unnamed       unused   input  active-high
        line 237:  "SODIMM_69"       unused   input  active-high
        line 238:  "SODIMM_65"       unused   input  active-high
        line 239:  "SODIMM_22"       unused   input  active-high
        line 240:      unnamed       unused   input  active-high
        line 241:      unnamed       unused   input  active-high
        line 242:      unnamed       unused   input  active-high
        line 243:      unnamed       unused   input  active-high
        line 244:      unnamed       unused   input  active-high
        line 245:      unnamed       unused   input  active-high
        line 246:      unnamed       unused   input  active-high
        line 247:      unnamed       unused   input  active-high
        line 248:      unnamed       unused   input  active-high
        line 249:      unnamed       unused   input  active-high
        line 250:      unnamed       unused   input  active-high
        line 251:      unnamed       unused   input  active-high
        line 252:      unnamed       unused   input  active-high
        line 253:      unnamed       unused   input  active-high
        line 254:      unnamed       unused   input  active-high
        line 255:      unnamed       unused   input  active-high
gpiochip1 - 9 lines:
        line   0:      unnamed       unused   input  active-high
        line   1:      unnamed       unused   input  active-high
        line   2:      unnamed       unused   input  active-high
        line   3:      unnamed       unused   input  active-high
        line   4:      unnamed       unused   input  active-high
        line   5:      unnamed       unused   input  active-high
        line   6:      unnamed "regulator-1v8-avdd-hdmi-pll" output active-high [used]
        line   7:      unnamed       unused   input  active-high
        line   8:      unnamed       unused   input  active-high

Our current custom devicetree (beware this is WIP code!):

// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include <dt-bindings/input/input.h>
#include "tegra30-colibri.dtsi"
#include "tegra30-cpu-opp.dtsi"

/ {
	aliases {
		rtc0 = "/i2c@7000c000/rtc@68";
		rtc1 = "/i2c@7000d000/pmic@2d";
		rtc2 = "/rtc@7000e000";
		serial0 = &uarta;
		serial1 = &uartb;
		serial2 = &uartd;
		serial3 = &uartc;
	};

	chosen {
		stdout-path = "serial0:115200n8";
	};

	cpus {
		#address-cells = <1>;
		#size-cells = <0>;

		cpu0: cpu@0 {
			device_type = "cpu";
			compatible = "arm,cortex-a9";
			reg = <0>;
            clocks = <&tegra_car TEGRA30_CLK_PLL_X>,
				 	 <&tegra_car TEGRA30_CLK_PLL_P>,
		    		 <&tegra_car TEGRA30_CLK_CCLK_G>;
			clock-names = "pll_x", "backup", "cpu";
			operating-points-v2 = <&cpu0_opp_table>;
			#cooling-cells = <2>;
		};

		cpu1: cpu@1 {
			device_type = "cpu";
			compatible = "arm,cortex-a9";
			reg = <1>;
            clocks = <&tegra_car TEGRA30_CLK_PLL_X>,
				 	 <&tegra_car TEGRA30_CLK_PLL_P>,
		    		 <&tegra_car TEGRA30_CLK_CCLK_G>;
			clock-names = "pll_x", "backup", "cpu";
			operating-points-v2 = <&cpu0_opp_table>;
			#cooling-cells = <2>;
		};

		cpu2: cpu@2 {
			device_type = "cpu";
			compatible = "arm,cortex-a9";
			reg = <2>;
            clocks = <&tegra_car TEGRA30_CLK_PLL_X>,
				 	 <&tegra_car TEGRA30_CLK_PLL_P>,
		    		 <&tegra_car TEGRA30_CLK_CCLK_G>;
			clock-names = "pll_x", "backup", "cpu";
			operating-points-v2 = <&cpu0_opp_table>;
			#cooling-cells = <2>;
		};

		cpu3: cpu@3 {
			device_type = "cpu";
			compatible = "arm,cortex-a9";
			reg = <3>;
            clocks = <&tegra_car TEGRA30_CLK_PLL_X>,
				 	 <&tegra_car TEGRA30_CLK_PLL_P>,
		    		 <&tegra_car TEGRA30_CLK_CCLK_G>;
			clock-names = "pll_x", "backup", "cpu";
			operating-points-v2 = <&cpu0_opp_table>;
			#cooling-cells = <2>;
		};
	};

	thermal-zones {
		tsensor0-thermal {
			trips {
				level1_trip: dvfs-alert {
					/* throttle at 70C until temperature drops to 69.8C */
					temperature = <70000>;
					hysteresis = <200>;
					type = "passive";
				};

				level2_trip: cpu-div2-throttle {
					/* hardware CPU x2 freq throttle at 75C */
					temperature = <75000>;
					hysteresis = <200>;
					type = "hot";
				};

				level3_trip: soc-critical {
					/* hardware shut down at 80C */
					temperature = <80000>;
					hysteresis = <2000>;
					type = "critical";
				};
			};

			cooling-maps {
				map0 {
					trip = <&level1_trip>;
					cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
							 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
							 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
							 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
							 <&actmon THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
				};
			};
		};
	};

	/* Colibri UART-A */
	serial@70006000 {
		/delete-property/ dmas;
		/delete-property/ dma-names;
		status = "okay";
	};

	/* Colibri UART-B */
	serial@70006300 {
		status = "okay";
	};

	/* UART-D (UART-C/UART3 on NVidia) (Debug) */
	serial@70006200 {
		compatible = "nvidia,tegra30-hsuart";
		/delete-property/ reg-shift;
		status = "okay";
	};


	/* GEN2_I2C: unused */

	/* CAM_I2C (I2C3): unused */

	/* EHCI instance 0: USB1_DP/N -> USBC_P/N */
	usb@7d000000 {
		status = "okay";
		dr_mode = "host";
	};

	usb-phy@7d000000 {
		status = "okay";
	};

	/* EHCI instance 2: USB3_DP/N -> USBH_P/N */
	usb@7d008000 {
		status = "okay";
	};

	usb-phy@7d008000 {
		status = "okay";
	};

	clk16m: clock-osc3 {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <16000000>;
	};


	reg_3v3: regulator-3v3 {
		compatible = "regulator-fixed";
		regulator-name = "3.3V_SW";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
	};

	reg_5v0: regulator-5v0 {
		compatible = "regulator-fixed";
		regulator-name = "5V_SW";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
	};

	gpio: gpio@6000d000 {

		gpio-line-names =
			"",           "SODIMM_121", "SODIMM_186", "SODIMM_184", /* GPIO-A.00 - GPIO-A.03 */
            "SODIMM_146_1", "SODIMM_144_1", "SODIMM_30", "SODIMM_67",  /* GPIO-A.04 - GPIO-A.07 */
			"SODIMM_36",  "SODIMM_32",  "SODIMM_154", "SODIMM_56",  /* GPIO-B.00 - GPIO-B.03 */
            "SODIMM_59",  "SODIMM_28",  "SODIMM_55",  "SODIMM_63",  /* GPIO-B.04 - GPIO-B.07 */
			"SODIMM_119", "SODIMM_81",  "SODIMM_21",  "SODIMM_19",  /* GPIO-C.00 - GPIO-C.03 */
            "SODIMM_196", "SODIMM_194", "",           "SODIMM_43",  /* GPIO-C.04 - GPIO-C.07 */
			"",           "",           "",           "SODIMM_86_2", /* GPIO-D.00 - GPIO-D.03 */
			"SODIMM_92_2", "",          "",           "",           /* GPIO-D.04 - GPIO-D.07 */
			"SODIMM_76",  "SODIMM_70",  "SODIMM_60",  "SODIMM_58",  /* GPIO-E.00 - GPIO-E.03 */
            "SODIMM_78",  "SODIMM_72",  "SODIMM_80",  "SODIMM_46",  /* GPIO-E.04 - GPIO-E.07 */
			"SODIMM_62",  "SODIMM_48",  "SODIMM_74",  "SODIMM_50",  /* GPIO-F.00 - GPIO-F.03 */
            "SODIMM_52",  "SODIMM_54",  "SODIMM_66",  "SODIMM_64",  /* GPIO-F.04 - GPIO-F.07 */
			"SODIMM_149", "SODIMM_151", "SODIMM_153", "SODIMM_155", /* GPIO-G.00 - GPIO-G.03 */
            "SODIMM_157", "SODIMM_159", "SODIMM_161", "SODIMM_163", /* GPIO-G.04 - GPIO-G.07 */
			"SODIMM_165", "SODIMM_167", "SODIMM_169", "SODIMM_171", /* GPIO-H.00 - GPIO-H.03 */
            "SODIMM_173", "SODIMM_175", "SODIMM_177", "SODIMM_179", /* GPIO-H.04 - GPIO-H.07 */
			"SODIMM_89",  "SODIMM_91",  "",           "SODIMM_130", /* GPIO-I.00 - GPIO-I.03 */
            "SODIMM_87",  "SODIMM_95_2",  "SODIMM_132", "SODIMM_95_1",           /* GPIO-I.04 - GPIO-I.07 */
			"SODIMM_126", "SODIMM_44_1", "SODIMM_128", "SODIMM_68", /* GPIO-J.00 - GPIO-J.03 */
            "SODIMM_82", "SODIMM_113", "SODIMM_111", "SODIMM_38", /* GPIO-J.04 - GPIO-J.07 */
			"SODIMM_150", "SODIMM_152", "SODIMM_105", "SODIMM_107", /* GPIO-K.00 - GPIO-K.03 */
            "SODIMM_106", "SODIMM_137", "SODIMM_135", "SODIMM_34", /* GPIO-K.04 - GPIO-K.07 */
			"",           "",           "",           "",           /* GPIO-L.00 - GPIO-L.03 */
            "",           "",           "",           "",           /* GPIO-L.04 - GPIO-L.07 */
			"SODIMM_57", "SODIMM_61",   "SODIMM_136_2", "SODIMM_138_2",           /* GPIO-M.00 - GPIO-M.03 */
            "SODIMM_140_2", "SODIMM_142_2", "SODIMM_144_2", "SODIMM_146_2",           /* GPIO-M.04 - GPIO-M.07 */
			"SODIMM_174", "SODIMM_176", "SODIMM_178", "SODIMM_180", /* GPIO-N.00 - GPIO-N.03 */
            "SODIMM_160", "SODIMM_158", "SODIMM_162", "",           /* GPIO-N.04 - GPIO-N.07 */
			"SODIMM_23", "SODIMM_35", "SODIMM_33", "SODIMM_25", /* GPIO-O.00 - GPIO-O.03 */
            "SODIMM_27", "SODIMM_37", "SODIMM_31", "SODIMM_29", /* GPIO-O.04 - GPIO-O.07 */
			"",           "",           "",           "",           /* GPIO-P.00 - GPIO-P.03 */
            "SODIMM_120", "SODIMM_122", "SODIMM_124", "SODIMM_188", /* GPIO-P.04 - GPIO-P.07 */
			"",           "",           "",           "",           /* GPIO-Q.00 - GPIO-Q.03 */
            "",           "",           "",           "",           /* GPIO-Q.04 - GPIO-Q.07 */
			"",           "",           "",           "",           /* GPIO-R.00 - GPIO-R.03 */
            "",           "",           "",           "",           /* GPIO-R.04 - GPIO-R.07 */
			"SODIMM_73",  "",           "SODIMM_47_2", "SODIMM_190_2",           /* GPIO-S.00 - GPIO-S.03 */
            "SODIMM_192_2", "SODIMM_49_2", "SODIMM_51_2", "SODIMM_53_2", /* GPIO-S.04 - GPIO-S.07 */
			"",           "",           "",           "",           /* GPIO-T.00 - GPIO-T.03 */
            "",           "SODIMM_133", "SODIMM_127", "",           /* GPIO-T.04 - GPIO-T.07 */
			"SODIMM_123", "SODIMM_125", "SODIMM_110", "SODIMM_112", /* GPIO-U.00 - GPIO-U.03 */
            "SODIMM_114", "SODIMM_116", "SODIMM_118", "",           /* GPIO-U.04 - GPIO-U.07 */
			"",           "SODIMM_45",  "SODIMM_71", "SODIMM_85", /* GPIO-V.00 - GPIO-V.03 */
            "",           "",           "",           "",           /* GPIO-V.04 - GPIO-V.07 */
			"SODIMM_93",  "SODIMM_44_2",           "SODIMM_129", "SODIMM_131", /* GPIO-W.00 - GPIO-W.03 */
            "",           "SODIMM_75",  "SODIMM_115", "SODIMM_117", /* GPIO-W.04 - GPIO-W.07 */
			"SODIMM_142_1", "SODIMM_140_1", "SODIMM_138_1", "SODIMM_136_1", /* GPIO-X.00 - GPIO-X.03 */
            "SODIMM_134", "SODIMM_100", "SODIMM_102", "SODIMM_104", /* GPIO-X.04 - GPIO-X.07 */
			"SODIMM_92_1", "SODIMM_90",  "SODIMM_88",  "SODIMM_86_1",  /* GPIO-Y.00 - GPIO-Y.03 */
            "SODIMM_97",  "SODIMM_79",  "SODIMM_103", "SODIMM_101", /* GPIO-Y.04 - GPIO-Y.07 */
			"SODIMM_96",  "SODIMM_98",  "SODIMM_156", "SODIMM_99",  /* GPIO-Z.00 - GPIO-Z.03 */
            "SODIMM_164", "",           "",           "",           /* GPIO-Z.04 - GPIO-Z.07 */
			"",           "",           "",           "",           /* GPIO-AA.00 - GPIO-AA.03 */
            "",           "",           "",           "",           /* GPIO-AA.04 - GPIO-AA.07 */
			"SODIMM_192_1", "SODIMM_49_1", "SODIMM_51_1", "SODIMM_53_1", /* GPIO-BB.00 - GPIO-BB.03 */
            "SODIMM_166", "SODIMM_168", "SODIMM_170", "SODIMM_172", /* GPIO-BB.04 - GPIO-BB.07 */
			"SODIMM_47_1", "SODIMM_190_1", "",        "",           /* GPIO-CC.00 - GPIO-CC.03 */
            "",           "",           "SODIMM_24",  "SODIMM_94",  /* GPIO-CC.04 - GPIO-CC.07 */
			"",           "",           "",           "",           /* GPIO-DD.00 - GPIO-DD.03 */
            "",           "SODIMM_69",  "SODIMM_65",  "SODIMM_22",  /* GPIO-DD.04 - GPIO-DD.07 */
			"",           "",           "",           "",           /* GPIO-EE.00 - GPIO-EE.03 */
            "",           "",           "",           "",           /* GPIO-EE.04 - GPIO-EE.07 */
			"",           "",           "",           "",           /* GPIO-FF.00 - GPIO-FF.03 */
            "",           "",           "",           "";           /* GPIO-FF.04 - GPIO-FF.07 */

		/*nox-test1 {// this works but only static output
					gpio-hog;
					gpios = <TEGRA_GPIO(A, 6) GPIO_ACTIVE_HIGH>;
					output-high;
					line-name = "SODIMM_30_LED";
		};*/
	};

	pinmux@70000868 {
			pinctrl-names = "default";
			pinctrl-0 = <&state_default>;

			state_default: pinmux {
				
				/* Colibri UART-D (Not default) */
				uart3-rxd-pw7 {
					nvidia,pins = "uart3_rxd_pw7",
								  "uart3_txd_pw6";
					nvidia,function = "uartc";
					nvidia,pull = <TEGRA_PIN_PULL_NONE>;
					nvidia,tristate = <TEGRA_PIN_DISABLE>;
				};

				/* Colibri Pin 30 LED */
				sdmmc3-clk-pa6 {
					nvidia,pins = "sdmmc3_clk_pa6";
					nvidia,function = "sdmmc3";
					nvidia,pull = <TEGRA_PIN_PULL_UP>;
					nvidia,tristate = <TEGRA_PIN_DISABLE>;
					nvidia,enable-input = <TEGRA_PIN_DISABLE>;
				};

			};
	};
};

Thanks and Regards,

Simon

Hi @SimonG !

As you might already know, Toradex does not support newer kernels for our Tegra modules (Colibri and Apalis) since they are EOL as well as the old BSP 2.8, which is also EOL.

Having said that, we do not have experience with EOL modules on newer kernels.

But quickly checking the Technical Reference Manual of NVIDIA Tegra 3, seems like the pinmuxing information you need is available in a Excel spreadsheet document called Tegra 3 PinMux (DA-05692). I could not find it online, but you should be able to contact NVIDIA to help you with it.

As you already said, setting the pins to GPIO seems not to be crystal clear by only looking into the device trees for Tegra-based modules present in the kernel.

You could check the datasheet of Colibri T30 for pins that are GPIO by default and also check how they are configured in the device tree. This way, I hope it will be clearer for you what/how pins are configured as GPIO.

I found this interesting (and archived) project which might hopefully help you: GitHub - NVIDIA/tegra-pinmux-scripts: Scripts to auto-generate pin mux drivers and board configuration tables for Tegra SoCs and boards.

Best regards,