gpio-button icon indicating copy to clipboard operation
gpio-button copied to clipboard

Additional warnings on dts compile, gpios in cell 1

Open dkebler opened this issue 5 years ago • 3 comments

First off I am not running raspbian rather ubuntu 18.04 for rpi

when I try to make the dtb (using the example) I get these additional warnings. Got any idea what the issue is?

gpio-keys-4.dtb: Warning (gpios_property): Property 'gpios', cell 1 is not a phandle reference in /fragment@1/__overlay__/button4/button@4
gpio-keys-4.dtb: Warning (gpios_property): Could not get phandle node for /fragment@1/__overlay__/button4/button@4:gpios(cell 1)
fragment@1 {
target-path = "/soc";
    __overlay__ {
        button4: button4 {
            compatible = "gpio-keys";
            #address-cells = <1>;
            #size-cells = <0>;
            pinctrl-names = "default";
            pinctrl-0 = <&button4_pin>;
            status = "okay";

            button@4 {
                label = "button gpio4";
                linux,code = <4>;
                gpios = <&gpio 4 0>;
            };
        };
    };
};

BTW compiling a dtb for on/off is fine, so just something about this fragement@1 that is specific to gpio-keys

dkebler avatar Mar 13 '19 18:03 dkebler

Sorry, I'm not familiar with the usage of the device tree and device tree overlays on Ubuntu. Maybe someone at the Raspberry Pi Device Tree Forum can help.

fivdi avatar Mar 13 '19 20:03 fivdi

if gpio-keys is module implemented in the kernel and is by default in raspbian release maybe this is the issue. The kernel here (4.15) doesn't know about the gpio-keys cause the distro never added it to the kernel a built in or module?

dkebler avatar Mar 14 '19 01:03 dkebler

if gpio-keys is module implemented in the kernel and is by default in raspbian release maybe this is the issue.

I don't think so. If the following line:

                gpios = <&gpio 4 0>;

is changed to:

                abcde = <&gpio 4 0>;

the same warning will probably be displayed.

The kernel here (4.15) doesn't know about the gpio-keys cause the distro never added it to the kernel a built in or module?

If the driver isn't available it's not going to work. Try the following commands to see if they give any information about the gpio_keys driver.

lsmod | grep gpio_keys
find /lib/modules/$(uname -r)/kernel/drivers/ | grep gpio_keys

Note that it's only a warning that is being displayed. Did you check to see if it works anyway?

fivdi avatar Mar 15 '19 16:03 fivdi