Skip to content

Instantly share code, notes, and snippets.

@leon-anavi
Last active January 18, 2021 22:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leon-anavi/7be2365d160e2b4640504fb60c4217d5 to your computer and use it in GitHub Desktop.
Save leon-anavi/7be2365d160e2b4640504fb60c4217d5 to your computer and use it in GitHub Desktop.
dtbo examples
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709", "brcm,bcm2710";
fragment@0 {
target-path = "/";
__overlay__ {
keypad: anavi-buttons {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
autorepeat;
button@13 {
label = "A";
linux,code = <30>;
gpios = <&gpio 13 1>;
};
button@19 {
label = "B";
linux,code = <48>;
gpios = <&gpio 19 1>;
};
button@26 {
label = "C";
linux,code = <46>;
gpios = <&gpio 26 1>;
};
};
};
};
};
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709", "brcm,bcm2710";
fragment@0 {
target-path = "/";
__overlay__ {
keypad: anavi-smiley {
compatible = "gpio-keys";
autorepeat;
button-26 {
label = "A";
linux,code = <30>;
gpios = <&gpio 26 1>;
};
};
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment