Jetson Nano OKdo C100 cannot find pin number for node /fragment@0/__overlay__/header-40pin-pinmux/pe6

Hello,

I have a Jetson Nano OKdo C100. I didn’t know the internal pull-up resistors could be disabled.
Now I’d like to disable the pull-ups on all gpios (not SFIO like I2C), and even activate them as pull-downs.

I have tried creating the overlay dts file, trying on the board’s pin 33, which I found through python with Jetson.GPIO that it was gpio38, and TEGRA_SOC’s GPIO_PE6. And I added the custom.dtbo in extconfig as well.

Here’s what I tried to build and apply for testing:

/dts-v1/;
/plugin/;

/ {
    overlay-name = "test";
    compatible = "nvidia,p3449-0000-b00+p3448-0002-b00", "nvidia,jetson-nano", "nvidia,tegra210";
    jetson-header-name = "Jetson 40pin Header";

    fragment@0 {
        target = <&pinmux>;
        __overlay__ {
            header-40pin-pinmux {
                pe6 {
                    nvidia,pins = "pe6";
                    nvidia,function = "rsvd0";
                    nvidia,pull = <0x1>; 
                    nvidia,tristate = <0x0>;
                    nvidia,enable-input = <0x1>;
                };
            };
        };
    };
};

If I remove nvidia,function, I’m able to build the dtbo and apply, but of course, the overlay isn’t effective and my board’s pin 33 is still pulled up.

If I leave the function property, I can build the dtbo, but jetson-io.py returns the error that it cannot find the pin number for the node /fragment@0/_overlay_/header-40pin-pinmux/pe6.

And in the currently effective dtb file, I can find pe6 in unused-lowpower.

What am I doing wrong, please?

Thank you in advance,

Tom

Hello again,

I just did some digging, I figured the right name to use was hdr40-pin33.
A new error emerged: Cannot configure pin33!.

I looked at where the error was being thrown in /opt/nvidia/jetson-io/Jetson/header.py.
It turns out the self.pins object has all pins from the 40-pin header, but the GPIOs and SFIOs.

Basically it only has all the power pins (3.3V, 5V, GND) of the 40 pin header. Does anybody know why? I’m 99% sure it isn’t normal, but is it normal?

That’s 3rd party carrier board, you need to consult with them for their support.

Hi @kayccc

Thank you for your answer.
I am again trying to figure this out for myself.

I see /opt/nvidia/jetson-io/Headers.hdr40.py hard-codes the static pins:

# Copyright (c) 2019-2021, NVIDIA CORPORATION. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.

from Jetson import header_def


HDR = header_def.HeaderDef( \
            #name
            'Jetson 40pin Header',
            #prefix
            'hdr40',
            #pin_count
            40,
            #static_pins
            {
                #idx    :       label
                 1      :       '3.3V',
                 2      :       '5V',
                 4      :       '5V',
                 6      :       'GND',
                 9      :       'GND',
                14      :       'GND',
                17      :       '3.3V',
                20      :       'GND',
                25      :       'GND',
                30      :       'GND',
                34      :       'GND',
                39      :       'GND',
            },
            #default
            True
        )

Do you have the official file I can use please?

Does this file originally only have the power pins or should it contain all pins of the 40-pin header, please?

Thank you in advance.

Best regards,
Tom

Update: I believe this /opt/nvidia/jetson-io/Headers/hdr40.py is correct.

What I don’t understand is this function I found in /opt/nvidia/jetson-io/Jetson/board.py:

def _board_find_overlays(dtbos, hdr_names, hdtbos, hw_addons):
    for dtbo in dtbos:
        # HW addon overlays
        header = dtc.get_prop_value(dtbo, '/', 'jetson-header-name', 0)
        if header in hdr_names:
            if header not in hw_addons.keys():
                hw_addons[header] = {}

            overlay = dtc.get_prop_value(dtbo, '/', 'overlay-name', 0)
            if overlay is None:
                error = "overlay-name not specified in %s!\n" % dtbo
                raise RuntimeError(error)
            if overlay in hw_addons[header].keys():
                error = "Multiple DT overlays for '%s' found!\n" % overlay
                error = error + "Please remove duplicate(s)"
                error = error + "\n%s\n%s" % \
                                (dtbo, hw_addons[header][overlay])
                raise RuntimeError(error)

            hw_addons[header][overlay] = dtbo
            if header not in hdtbos.keys():
                hdtbos[header] = None

            continue

        # Header overlays
        header = dtc.get_prop_value(dtbo, '/', 'overlay-name', 0)
        if header in hdtbos.keys() and hdtbos[header]:
            error = "Multiple DT overlays for '%s' found!\n" % header
            error = error + "Please remove duplicate(s)"
            error = error + "\n%s\n%s" % (dtbo, hdtbos[header])
            raise RuntimeError(error)

        if header:
            hdtbos[header] = dtbo
            if header not in hw_addons.keys():
                hw_addons[header] = {}

As a result, I don’t get the overlays I added.

htbos shows:
{‘Jetson Nano CSI Connector’: None, ‘Jetson 40pin Header’: None}

If I comment out “continue”, I get:
{‘Jetson Nano CSI Connector’: None, ‘Camera IMX219 Dual’: ‘/boot/tegra210-p3448-all-p3449-0000-camera-imx477-dual.dtbo’, …, …, …, ‘test’: ‘/boot/test.dtbo’}

Which is strange because the keys are overlay-name and jetson-header-name confused.

Do you know if this function is correct?

Thank you,
Tom