Use what name to set a gpio's pinmux prop "nvidia,pin-group"

  1. I want add a touch to the orin nx-8G device with i2c.

  2. because need to config a interrupt gpio, the driver need to config 4 pinmux state.
    I found other pinmux config in file:
    ./nvidia/platform/t23x/concord/kernel-dts/tegra234-p3737-0000-p3701-0000-hdr40.dts
    like this:
    hdr40-pin7 {
    nvidia,pins = “soc_gpio33_pq6”;
    nvidia,function = “extperiph4”;
    nvidia,pin-group = “extperiph4_clk”;
    nvidia,tristate = <TEGRA_PIN_DISABLE>;
    nvidia,enable-input = <TEGRA_PIN_DISABLE>;
    };

  3. because there is no “nvidia,pin-group” prop in file “bootloader/t186ref/BCT/tegra234-mb1-bct-pinmux-p3767-dp-a03.dtsi”
    **so, use the gpio as a interrupt pin , what name to set it? **
    when default gpio stat is lowlevel, can i config like below??
    ts_int_default {
    nvidia,pins = “soc_gpio19_pg6”;
    nvidia,function = “gp”;
    nvidia,pin-group = “gp”;
    nvidia,tristate = <TEGRA_PIN_DISABLE>;
    nvidia,enable-input = <TEGRA_PIN_ENABLE>;
    nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
    };

Hi lishu2002,

Are you using the devkit or custom board for Orin NX-8G?
What’s your Jetpack version in use?

Could you just using the pinmux spreadsheet to configure the pinmux?

May I also know what’s your use case?

pinmux spreadsheet only can config a gpio to fix stat.

  1. we use a custom board designed with devkit, for there is no fpga in devkit .

  2. Jetpack versin is 5.1.2, code downloaded a week before.

  3. we need use a touch pannel with i2c.

  4. the touch pannel provide a driver, which need to config a gpio to 4 stat, they give a sample with qcom platform
    &msmgpio {
    /* add pingrp for touchscreen */
    ts_int_default: ts_int_defalut {
    mux {
    pins = “gpio65”;
    function = “gpio”;
    };
    config {
    pins = “gpio65”;
    drive-strength = <16>;
    /bias-pull-up;/
    input-enable;
    bias-disable;
    };
    };

    ts_int_output_high: ts_int_output_high {
    mux {
    pins = “gpio65”;
    function = “gpio”;
    };
    config {
    pins = “gpio65”;
    output-high;
    };
    };

    ts_int_output_low: ts_int_output_low {
    mux {
    pins = “gpio65”;
    function = “gpio”;
    };
    config {
    pins = “gpio65”;
    output-low;
    };
    };

    ts_int_input: ts_int_input {
    mux {
    pins = “gpio65”;
    function = “gpio”;
    };
    config {
    pins = “gpio65”;
    input-enable;
    bias-disable;
    };
    };
    };

  5. so i made a modify for orin like this, please help to check, thanks:
    pinmux@2430000 {
    status = “okay”;
    ts_int_default: ts_int_default {
    nvidia,pins = “soc_gpio19_pg6”;
    nvidia,function = “gp”;
    nvidia,pin-group = “gp”;
    nvidia,tristate = <TEGRA_PIN_ENABLE>;
    nvidia,enable-input = <TEGRA_PIN_ENABLE>;
    nvidia,pull = <TEGRA_PIN_PULL_NONE>;
    };
    ts_int_output_high: ts_int_output_high {
    nvidia,pins = “soc_gpio19_pg6”;
    nvidia,function = “gp”;
    nvidia,pin-group = “gp”;
    nvidia,tristate = <TEGRA_PIN_ENABLE>;
    nvidia,enable-input = <TEGRA_PIN_DISABLE>;
    nvidia,pull = <TEGRA_PIN_PULL_UP>;
    };
    ts_int_output_low: ts_int_output_low {
    nvidia,pins = “soc_gpio19_pg6”;
    nvidia,function = “gp”;
    nvidia,pin-group = “gp”;
    nvidia,tristate = <TEGRA_PIN_ENABLE>;
    nvidia,enable-input = <TEGRA_PIN_DISABLE>;
    nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
    };
    ts_int_input: ts_int_input {
    nvidia,pins = “soc_gpio19_pg6”;
    nvidia,function = “gp”;
    nvidia,pin-group = “gp”;
    nvidia,tristate = <TEGRA_PIN_ENABLE>;
    nvidia,enable-input = <TEGRA_PIN_ENABLE>;
    nvidia,pull = <TEGRA_PIN_PULL_NONE>;
    };
    };

Is this custom carrier board designed from you?
Could your custom carrier board boot up successfully now?

Is that the original BSP package or the custom BSP package?

Which I2C interface would you like to use?
PG.06 and PQ.06 seems not the pin for I2C.
Or you just want to use them as interrupt? If so, you could configure them just as input.

What do you mean about “4 pinmux state”?

  1. all hardware is design from devkit expect fpga, can bootup normal

  2. we use the original BSP package, only modify several gpio pin state.

  3. just use PG.06 as the touch screen’s interrupt pin.

  4. the driver use interrupt pin first as a ouput pin before screen work to set i2c address.
    PG.06’s 4 state, you can found what i set in former reply:

    input_default/int_output_low/int_ouput_high/int_input:
    state:1 default as a output pin to ouput low level.
    state:2 output high level to set screen’s i2c address.
    state:3 after set i2c address, set PG.06 as a input pin as a default state
    state:4 same as state 3, when touch screen work, used as a input pin

  5. I want to know whether i can set the pin-group & pin-label as any string ?
    dev node in dtsi:
    i2c@3160000 {
    touch@5d {

    pinctrl-names=“default”, “output-low”,“output-high”, “input”;
    pinctrl-0 = <&ts_int_default>
    pinctrl-1 = <&ts_int_output_low>;
    pinctrl-2 = <&ts_int_output_high>;
    pinctrl-3 = <&ts_int_input>;

    }
    }

when added that config in dtsi, use function: pinctrl_lookup_state
will ouptut log:
there is not valid maps for state default
there is not valid maps for state output-low
there is not valid maps for state output-high
there is not valid maps for state input

could you please help to tell me hwo to config a multi states pinmux with a gpio in kernel dtsi file?

It seems you need to configure the pin to the state1 in pinmux and your driver would configure them to other states.

Normally, we would just configure pinctrl-names as “default”.
The pin state is not controlled by this name.
It could be controlled through sysfs manually, or be requested and controlled by your driver.

I haven’t heard about the “multi” state for the pin.
For the pinmux, you could also using devmem tool to write its register in runtime.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.