add test overlay for fullscreen st7789v

This commit is contained in:
lady ada 2020-07-28 11:00:21 -04:00
parent e2fe053c31
commit 57cf3adc62
2 changed files with 80 additions and 2 deletions

View file

@ -251,8 +251,8 @@ function update_configtxt() {
fi
if [ "${pitfttype}" == "st7789_240x320" ]; then
dtc -@ -I dts -O dtb -o /boot/overlays/drm-minipitft20.dtbo overlays/minipitft20-overlay.dts
overlay="dtoverlay=drm-minipitft20,rotation=${pitftrot}"
dtc -@ -I dts -O dtb -o /boot/overlays/drm-st7789v_240x320.dtbo overlays/st7789v_240x320-overlay.dts
overlay="dtoverlay=drm-st7789v_240x320,rotation=${pitftrot}"
fi
if [ "${pitfttype}" == "st7789_240x240" ]; then

View file

@ -0,0 +1,78 @@
/*
* Device Tree overlay for Adafruit ST7789V 240x320 Display
*
*/
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
fragment@0 {
target = <&spi0>;
__overlay__ {
status = "okay";
spidev@0{
status = "disabled";
};
};
};
fragment@1 {
target = <&gpio>;
__overlay__ {
pitft_pins: pitft_pins {
brcm,pins = <25>; /* dc pin */
brcm,function = <1>; /* out */
brcm,pull = <0>; /* no pull */
};
};
};
fragment@2 {
target = <&spi0>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;
pitft: pitft@0{
compatible = "multi-inno,mi0283qt";
reg = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pitft_pins>;
spi-max-frequency = <32000000>;
rotation = <0>;
width = <240>;
height = <320>;
col_offset = <0>;
row_offset = <0>;
dc-gpios = <&gpio 25 0>;
backlight = <&backlight>;
};
};
};
fragment@3 {
target-path = "/soc";
__overlay__ {
backlight: backlight {
compatible = "gpio-backlight";
gpios = <&gpio 22 0>;
};
};
};
__overrides__ {
speed = <&pitft>,"spi-max-frequency:0";
rotation = <&pitft>,"rotation:0";
width = <&pitft>,"width:0";
height = <&pitft>,"height:0";
col_offset = <&pitft>,"col_offset:0";
row_offset = <&pitft>,"row_offset:0";
};
};