Error compiling dts (Device Tree source) file for dtb

52 views Asked by At

I've been trying to create a DTS file to utilize the GPIO pins, but I'm having trouble compiling the file. I'm doing this on an orange.pi board, whose model is OrangePi-PC. The code I used was the following:

/dts-v1/;
/plugin/;

/ {
    compatible = "allwinner,sun8i-h3";

    fragment {
        target = <&pio>;
        overlay {
            gpio_keys_user: gpio_keys_user {
                compatible = "gpio-keys";
                pinctrl-names = "default";
                pinctrl-0 = <&gpio_button_0>;

                play_pause {
                    label = "Play/Pause";
                    linux,code = <164>;/*KEY_PLAYPAUSE*/
                    gpios = <&pio 0 7 0>; /* PA7 */
                };

                next {
                    label = "Next";
                    linux,code = <163>;/*KEY_NEXTSONG*/
                    gpios = <&pio 0 8 0>; /* PA8 */
                };

                previous {
                    label = "Previous";
                    linux,code = <165>;/*KEY_PREVIOUSSONG*/
                    gpios = <&pio 0 9 0>; /* PA9 */
                };
            };
        };
    };
};

When trying to compile the file through code:

dtc -I dts -O dtb -o gpio-keys.dtbo gpio-keys.dts

I got the following error:

gpio-keys.dtbo: Warning (gpios_property): Property 'gpios', cell 2 is not a phandle reference in /fragment/_overlay_/gpio_keys_user/play_pause
gpio-keys.dtbo: Warning (gpios_property): Could not get phandle node for /fragment/_overlay_/gpio_keys_user/play_pause:gpios(cell 2)
gpio-keys.dtbo: Warning (gpios_property): Property 'gpios', cell 2 is not a phandle reference in /fragment/_overlay_/gpio_keys_user/next
gpio-keys.dtbo: Warning (gpios_property): Could not get phandle node for /fragment/_overlay_/gpio_keys_user/next:gpios(cell 2)
gpio-keys.dtbo: Warning (gpios_property): Property 'gpios', cell 2 is not a phandle reference in /fragment/_overlay_/gpio_keys_user/previous
gpio-keys.dtbo: Warning (gpios_property): Could not get phandle node for /fragment/_overlay_/gpio_keys_user/previous:gpios(cell 2)

If anyone can help me I will be grateful.

0

There are 0 answers