Device Tree Error With GPIO T6 and T5 on AGX Orin Devkit

I’m currently trying to port camera drivers which were originally for Jetson 4.6 on AGX Xavier to Jetson 5.0 on Jetson Orin. I’m getting this error: FATAL ERROR: Unable to parse input tree

Relevant definitions:

#define CAM1_RST_L	TEGRA234_MAIN_GPIO(T, 6)
#define CAM1_PWDN	TEGRA234_MAIN_GPIO(T, 5)

Portion where error is received:

i2c@2 {
				reg = <2>;
				i2c-mux,deselect-on-exit;
				#address-cells = <1>;
				#size-cells = <0>;
				dser_e: max9296@48 {
					compatible = "nvidia,max9296";
					reg = <0x48>;
					csi-mode = "2x4";
					max-src = <2>;
					reset-gpios = <&tegra_main_gpio CAM1_RST_L GPIO_ACTIVE_HIGH>;
				};
				ser_e: max9295@62 {
					compatible = "nvidia,max9295";
					reg = <0x62>;
				};

				ar0820_e@10 {
					/* Define any required hw resources needed by driver */
					/* ie. clocks, io pins, power sources */
					def-addr = <0x10>;
					clocks = <&bpmp_clks TEGRA234_CLK_EXTPERIPH1>,
							 <&bpmp_clks TEGRA234_CLK_EXTPERIPH1>;
					clock-names = "extperiph1", "pllp_grtba";
					mclk = "extperiph1";
					reset-gpios = <&tegra_main_gpio CAM1_RST_L GPIO_ACTIVE_HIGH>;
					nvidia,gmsl-ser-device = <&ser_e>;
					nvidia,gmsl-dser-device = <&dser_e>;
				};
			};

The error points to the line reset-gpios = <&tegra_main_gpio CAM1_RST_L GPIO_ACTIVE_HIGH>;reset-gpios = <&tegra_main_gpio CAM1_RST_L GPIO_ACTIVE_HIGH>;

(I think) I’ve narrowed the problem down to T5 and T6 being the wrong pins for CAM1, but I can’t find any documentation about what the correct pins would be. How do I solve this error?

hello nickcarpenedo,

please try use below GPIOs according to Orin’s reference driver,
for example,
#define CAM1_RST_L TEGRA234_MAIN_GPIO(AC, 1)
#define CAM1_PWDN TEGRA234_MAIN_GPIO(AC, 0)