radxa-pkg / radxa-overlays

Additional device tree overlays to support different hardwares on Radxa products
GNU General Public License v2.0
43 stars 29 forks source link

Getting a "rockchip-pinctrl pinctrl: invalid function gpio in map table" message on bootup #88

Closed Gerriko closed 1 year ago

Gerriko commented 1 year ago

I am using a rk3566 chip. I was using the "rk3568-spi3-m1-cs0-enc28j60.dts" overlay file as my reference but I am using GPIO4_A3 as my interrupt pin.

I have used the following for pinctrl:

    fragment@2 {
        target = <&pinctrl>;

        __overlay__ {
            enc28j60 {
                eth0_pins: eth0-pins {
                    rockchip,pins = <4 3 0 &pcfg_pull_none>;
                };
            };

        };
    };

Can any explain what is wrong with rockchip,pins = <4 3 0 &pcfg_pull_none>;

Gerriko commented 1 year ago

I tried an override command as follows:

    __overrides__ {
        int_pin = <&eth0>, "interrupts:0", <&eth0_pins>, "rockchip,pins:0";
        speed = <&eth0>, "spi-max-frequency:0";
    };

And then I got this message in the debug output on bootup:

image

So why is fe6b0000.serial holding onto gpio4-3?

EDIT

Here is the device tree list for serial - so this is enabled by default (wasn't aware of that) - which serial is this? what's it used for or can I disable?

/proc/device-tree/serial@fdd50000/status: disabled
/proc/device-tree/serial@fe650000/status: okay
/proc/device-tree/serial@fe660000/status: okay
/proc/device-tree/serial@fe670000/status: disabled
/proc/device-tree/serial@fe680000/status: disabled
/proc/device-tree/serial@fe690000/status: disabled
/proc/device-tree/serial@fe6a0000/status: disabled
/proc/device-tree/serial@fe6b0000/status: okay
/proc/device-tree/serial@fe6c0000/status: disabled
RadxaYuntian commented 1 year ago

Coding problem should go to our forum. The issues here should be if one of our supplied overlays doesn't work.

Regarding your problem though, here is how you tackle it:

  1. Find the offending serial's phandle: UART7

  2. Realize none of our products enable UART7 by default, so this is either a custom system, a custom hardware, or both.

Well there is nothing I can help because I don't know why you use UART7 on your product /shrug You should check your own design then.