L4T 36.4.0 USB "VDD_5V0_SYS: Underflow of regulator enable count"

I have a dual-port USB PD controller on a custom carrier board running Jetpack 6.1 / L4T 36.4.0. My SoM is an Orin NX 16GB.

An excerpt of my DTS is provided below, but the summary is that I have used vbus-supply = <&vdd_5v0_sys>; in all the padctl@3520000/ports/usb2-* nodes.

Click to expand
#include "tegra234-p3768-0000+p3767-0000.dts"
#include "nv-platform/tegra234-p3768-0000+p3767-xxxx-nv-common.dtsi"

#include <dt-bindings/gpio/tegra234-gpio.h>
#include <dt-bindings/usb/pd.h>

/ {
    compatible = "nvidia,p3768-0000+p3767-0000", "nvidia,p3767-0000", "nvidia,tegra234";

    aliases {
        /delete-property/ fusb_p0;
        /delete-property/ typec_p0;
    };

    bus@0 {
        /* SoM I2C0 */
        i2c@c240000 {
            /* Delete Nano devkit's USB-C PD controller node. */
            /delete-node/ fusb301@25;
        };

        /* SoM I2C1, Linux i2c-7 */
        i2c@c250000 {
            status = "okay";

            typec@21 {
                status = "okay";
                compatible = "ti,tps6598x";
                reg = <0x21>;
                interrupt-parent = <&gpio_aon>;
                interrupts = <TEGRA234_AON_GPIO(CC, 3) IRQ_TYPE_LEVEL_LOW>;
                interrupt-names = "irq";

                connector {
                    compatible = "usb-c-connector";
                    label = "USB-C";

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

                        port@0 {
                            reg = <0>;
                            usb_conn0_hs_ep: endpoint {
                                remote-endpoint = <&usb_conn0_hs>;
                            };
                        };
                        port@1 {
                            reg = <1>;
                            usb_conn0_ss_ep: endpoint {
                                remote-endpoint = <&usb_conn0_ss>;
                            };
                        };
                    };
                };
            };

            typec@25 {
                status = "okay";
                compatible = "ti,tps6598x";
                reg = <0x25>;
                interrupt-parent = <&gpio_aon>;
                interrupts = <TEGRA234_AON_GPIO(CC, 3) IRQ_TYPE_LEVEL_LOW>;
                interrupt-names = "irq";

                connector {
                    compatible = "usb-c-connector";
                    label = "USB-C";

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

                        port@0 {
                            reg = <0>;
                            usb_conn1_hs_ep: endpoint {
                              remote-endpoint = <&usb_conn1_hs>;
                            };
                        };
                        port@1 {
                            reg = <1>;
                            usb_conn1_ss_ep: endpoint {
                              remote-endpoint = <&usb_conn1_ss>;
                            };
                        };
                    };
                };
            };
        };

        xusb_padctl: padctl@3520000 {
            status = "okay";

            ports {
                /* Port 2: Recovery */
                usb2-0 {
                    status = "okay";
                    mode = "otg";
                    usb-role-switch;
                    role-switch-default-mode = "device";

                    vbus-supply = <&vdd_5v0_sys>;

                    // Remove Nano devkit port node
                    /delete-node/ port;
                    port {
                        usb_conn1_hs: endpoint {
                            remote-endpoint = <&usb_conn1_hs_ep>;
                        };
                    };
                };

                usb2-1 {
                    status = "okay";
                    mode = "host";
                    vbus-supply = <&vdd_5v0_sys>;
                    port {
                        usb_conn0_hs: endpoint {
                            remote-endpoint = <&usb_conn0_hs_ep>;
                        };
                    };
                };

                /* M.2 Key-E */
                usb2-2 {
                    status = "okay";
                    mode = "host";
                    vbus-supply = <&vdd_5v0_sys>;
                };

                usb3-0 {
                    status = "okay";
                    nvidia,usb2-companion = <1>;
                    port {
                        usb_conn0_ss: endpoint {
                            remote-endpoint = <&usb_conn0_ss_ep>;
                        };
                    };
                };

                usb3-1 {
                    status = "okay";
                    nvidia,usb2-companion = <0>;
                    port {
                        usb_conn1_ss: endpoint {
                            remote-endpoint = <&usb_conn1_ss_ep>;
                        };
                    };
                };
            }; /* ports */
        }; /* padctrl */
    }; /* bus@0 */
};

Every time I run modprobe -r tps6598x, I see:

[ 2616.629431] VDD_5V0_SYS: Underflow of regulator enable count

I found someone here in the forums reported a similar issue with Jetpack 6.0. However I only see this error message printed once, not repeated like they did. I will try the patch mentioned here and see if that helps: AGX Orin custom carrier board otg issue - #25 by WayneWWW

Thanks!

It seems like the patch has been applied to the L4T 36.4.0 kernel source already, so nothing for me to try.

(git tag: jetson_36.4)
https://nv-tegra.nvidia.com/r/gitweb?p=3rdparty/canonical/linux-jammy.git;a=blob;f=drivers/usb/host/xhci-tegra.c;h=2a45d263c11e3de0eec8f14ac003014d4a2ec1ad;hb=dac1b0b4ecfc5b1aae9617011565f6c6c4a72171#l1371

(The commit that implemented the linked fix was b502fdee5a7fe919155dba661a48457981a91a3a nv-tegra.nvidia Code Review - 3rdparty/canonical/linux-jammy.git/commit)

Is there any problem to the USB function itself?

No, I do not think there is an observable problem. This 5V regulator is a fixed regulator that can’t be turned off, but if it wasn’t, this seems like it would be a problem.

Could it be because both tegra_xusb_remove() and tegra_xusb_shutdown() are calling regulator_bulk_disable()?

Is this still an issue to support? Any result can be shared?

we just double checked this internally, this shall not affect the functionality.

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