Skip to content

Instantly share code, notes, and snippets.

@foone
Last active October 12, 2021 09:11
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save foone/77600b321ad3bc55e5fe90465ac6e47e to your computer and use it in GitHub Desktop.
Save foone/77600b321ad3bc55e5fe90465ac6e47e to your computer and use it in GitHub Desktop.
device tree overlay for dual ili9341 displays. Should work now
/*
* Device Tree overlay for 2x ili9341 2.2"
*
*/
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
fragment@0 {
target = <&spi0>;
__overlay__ {
status = "okay";
spidev@0{
status = "disabled";
};
spidev@1{
status = "disabled";
};
};
};
fragment@1 {
target = <&spi0>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;
rpidisplay@0{
compatible = "ilitek,ili9341";
reg = <0>;
spi-max-frequency = <32000000>;
rotate = <270>;
bgr;
buswidth = <8>;
reset-gpios = <&gpio 23 0>;
dc-gpios = <&gpio 24 0>;
led-gpios = <&gpio 18 1>;
debug = <0>;
};
rpidisplay@1{
compatible = "ilitek,ili9341";
reg = <1>;
spi-max-frequency = <32000000>;
rotate = <270>;
bgr;
buswidth = <8>;
reset-gpios = <&gpio 16 0>;
dc-gpios = <&gpio 21 0>;
debug = <0>;
};
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment