[VA][TX1][Customized Carrier board] How to set GPIO148 pulled up by default.

Precondition:
customized carriy board
customized kernel and u-boot

Operational:
NULL

Problem:
The CAM_RST_PS4(gpio148) can’t be pulled up by default.

TegraX1_va\u-boot\board\nvidia\p2371-2180\pinmux-config-p2371-2180.h

static const struct tegra_gpio_config p2371_2180_gpio_inits[] = {
... ...
	<b>GPIO_INIT(S4,   OUT0),</b>
... ...
static const struct pmux_pingrp_config p2371_2180_pingrps[] = {
... ...
PINCFG(CAM_RST_PS4,          DEFAULT,  <b>UP</b>,     NORMAL,   OUTPUT,  DISABLE, DEFAULT),
... ...

TegraX1_va\kernel\arch\arm64\boot\dts\tegra210-platforms\tegra210-jetson-cv-pinmux-p2597-2180-a00.dtsi

#include <dt-bindings/pinctrl/pinctrl-tegra.h>
/ {
	pinmux: pinmux@700008d4 {
... ...
			cam_rst_ps4 {
				nvidia,pins = "cam_rst_ps4";
				nvidia,function = "rsvd1";
				nvidia,pull = <<b>TEGRA_PIN_PULL_UP</b>>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
			};

TegraX1_va\kernel\arch\arm64\boot\dts\tegra210-platforms\tegra210-p4573-2180-gpio.dtsi

#include <dt-bindings/gpio/tegra-gpio.h>

/ {
	gpio: gpio@6000d000 {
		gpio-init-names = "default";
		gpio-init-0 = <&gpio_default>;
... ...
		gpio_default: default {
                       [b]gpio-output-high = <
				TEGRA_GPIO(S, 4)
				>;[/b]
		};

Hi zuoqiang
Did you probe to verify the pin can’t pull up?
The tegra210-p4573-2180-gpio.dtsi not include by tegra210-jetson-cv-base-p2597-2180-a00.dts

Hi ShaneCCC:

I had verify it.The gpio 148 wasn’t pulled up.

Which file defined the gpio default state ,on tx1?

thanks.

Did you probe by scope to verify it?
You can put this piece of code to any file that could be included.

gpio: gpio@6000d000 {
		gpio_control {
                       gpio-output-high = <
				TEGRA_GPIO(S, 4)
				>;
		};

Hi ShaneCCC:

I don’t understand “probe by scope to verify it?”.
Do you mean wheather do I measure by multimeter? if it is, yes.

I will re-config lots of gpios. Could we make a gpio file to do this?

Thanks.

Hi zuoqiang
Yes, you can your own a gpio file and include it. And you can use DTC to re-compile the DTB to dts to check all of your require.

Hi ShaneCCC:

It is working.I add the gpio including in the file:
tegra210-jetson-cv-base-p2597-2180-a00.dts

/dts-v1/;
/memreserve/ 0x80000000 0x00020000;
... ...
#include "tegra210-plugin-manager/tegra210-jetson-cv-plugin-manager.dtsi"
#include "tegra210-platforms/tegra210-p2597-2180-gpio.dtsi"
... ...

TegraX1_va\kernel\arch\arm64\boot\dts\tegra210-platforms\tegra210-2597-2180-gpio.dtsi

#include <dt-bindings/gpio/tegra-gpio.h>

    / {
    	gpio: gpio@6000d000 {
    		gpio-init-names = "default";
    		gpio-init-0 = <&gpio_default>;
    ... ...
    		gpio_default: default {
                           gpio-output-high = <
    				TEGRA_GPIO(S, 4)
    				>;
    		};