Skip to content

Commit

Permalink
dtoverlays: Add overlays for 5" and 7" ILI9881 panels
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Stevenson <[email protected]>
  • Loading branch information
6by9 committed Feb 8, 2024
1 parent 7d89804 commit c7b26b4
Show file tree
Hide file tree
Showing 4 changed files with 272 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
vc4-kms-dpi-panel.dtbo \
vc4-kms-dsi-7inch.dtbo \
vc4-kms-dsi-generic.dtbo \
vc4-kms-dsi-ili9881-5inch.dtbo \
vc4-kms-dsi-ili9881-7inch.dtbo \
vc4-kms-dsi-lt070me05000.dtbo \
vc4-kms-dsi-lt070me05000-v2.dtbo \
vc4-kms-dsi-waveshare-panel.dtbo \
Expand Down
28 changes: 28 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -5019,6 +5019,34 @@ Info: This overlay is now deprecated - see vc4-kms-dpi-panel,kippah-7inch
Load: <Deprecated>


Name: vc4-kms-dsi-ili9881-5inch
Info: Enable the Raspberry Pi 5" ILI9881 based touchscreen panel.
Requires vc4-kms-v3d to be loaded.
Load: dtoverlay=vc4-kms-dsi-ili9881-5inch,<param>
Params: sizex Touchscreen size x (default 720)
sizey Touchscreen size y (default 1280)
invx Touchscreen inverted x axis
invy Touchscreen inverted y axis
swapxy Touchscreen swapped x y axis
disable_touch Disables the touch screen overlay driver
dsi0 Use DSI0 and i2c_csi_dsi0 (rather than
the default DSI1 and i2c_csi_dsi).


Name: vc4-kms-dsi-ili9881-7inch
Info: Enable the Raspberry Pi 7" ILI9881 based touchscreen panel.
Requires vc4-kms-v3d to be loaded.
Load: dtoverlay=vc4-kms-dsi-ili9881-7inch,<param>
Params: sizex Touchscreen size x (default 720)
sizey Touchscreen size y (default 1280)
invx Touchscreen inverted x axis
invy Touchscreen inverted y axis
swapxy Touchscreen swapped x y axis
disable_touch Disables the touch screen overlay driver
dsi0 Use DSI0 and i2c_csi_dsi0 (rather than
the default DSI1 and i2c_csi_dsi).


Name: vc4-kms-v3d
Info: Enable Eric Anholt's DRM VC4 HDMI/HVS/V3D driver.
Load: dtoverlay=vc4-kms-v3d,<param>
Expand Down
121 changes: 121 additions & 0 deletions arch/arm/boot/dts/overlays/vc4-kms-dsi-ili9881-5inch-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
/*
* vc4-kms-dsi-ili9881-5inch-overlay.dts
*/

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>

/ {
compatible = "brcm,bcm2835";

i2c_frag: fragment@0 {
target = <&i2c_csi_dsi>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";

display_mcu: display_mcu@45
{
compatible = "raspberrypi,v2-touchscreen-panel-regulator";
reg = <0x45>;
gpio-controller;
#gpio-cells = <2>;
};

gt911: gt911@5d {
compatible = "goodix,gt911";
reg = <0x5d>;
AVDD28-supply = <&touch_reg>;
touchscreen-size-x = <720>;
touchscreen-size-y = <1280>;
touchscreen-x-mm = <62>;
touchscreen-y-mm = <110>;
};
};
};

dsi_frag: fragment@1 {
target = <&dsi1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";

port {
dsi_out: endpoint {
remote-endpoint = <&panel_in>;
};
};

dsi_panel: dsi_panel@0 {
reg = <0>;
compatible = "raspberrypi,dsi-5inch";
reset-gpio = <&display_mcu 0 GPIO_ACTIVE_LOW>;
backlight = <&display_mcu>;

port {
panel_in: endpoint {
remote-endpoint = <&dsi_out>;
};
};
};
};
};

fragment@2 {
target = <&i2c0if>;
__overlay__ {
status = "okay";
};
};

fragment@3 {
target = <&i2c0mux>;
__overlay__ {
status = "okay";
};
};

fragment@4 {
target-path = "/";
__overlay__ {
touch_reg: touch_reg@1 {
reg = <1>;
compatible = "regulator-fixed";
regulator-name = "touch_reg_1";
gpio = <&display_mcu 1 GPIO_ACTIVE_HIGH>;
startup-delay-us = <50000>;
enable-active-high;
};
};
};

fragment@10 {
target = <&gt911>;
__dormant__ {
touchscreen-inverted-x;
};
};

fragment@11 {
target = <&gt911>;
__dormant__ {
touchscreen-inverted-y;
};
};

__overrides__ {
dsi0 = <&dsi_frag>, "target:0=",<&dsi0>,
<&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
<&touch_reg>, "reg:0=0",
<&touch_reg>, "regulator-name=touch_reg_0";
sizex = <&gt911>,"touchscreen-size-x:0";
sizey = <&gt911>,"touchscreen-size-y:0";
invx = <0>, "+10";
invy = <0>, "+11";
swapxy = <&gt911>,"touchscreen-swapped-x-y?";
};
};
121 changes: 121 additions & 0 deletions arch/arm/boot/dts/overlays/vc4-kms-dsi-ili9881-7inch-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
/*
* vc4-kms-dsi-ili9881-5inch-overlay.dts
*/

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>

/ {
compatible = "brcm,bcm2835";

i2c_frag: fragment@0 {
target = <&i2c_csi_dsi>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";

display_mcu: display_mcu@45
{
compatible = "raspberrypi,v2-touchscreen-panel-regulator";
reg = <0x45>;
gpio-controller;
#gpio-cells = <2>;
};

gt911: gt911@5d {
compatible = "goodix,gt911";
reg = <0x5d>;
AVDD28-supply = <&touch_reg>;
touchscreen-size-x = <720>;
touchscreen-size-y = <1280>;
touchscreen-x-mm = <90>;
touchscreen-y-mm = <151>;
};
};
};

dsi_frag: fragment@1 {
target = <&dsi1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";

port {
dsi_out: endpoint {
remote-endpoint = <&panel_in>;
};
};

dsi_panel: dsi_panel@0 {
reg = <0>;
compatible = "raspberrypi,dsi-7inch";
reset-gpio = <&display_mcu 0 GPIO_ACTIVE_LOW>;
backlight = <&display_mcu>;

port {
panel_in: endpoint {
remote-endpoint = <&dsi_out>;
};
};
};
};
};

fragment@2 {
target = <&i2c0if>;
__overlay__ {
status = "okay";
};
};

fragment@3 {
target = <&i2c0mux>;
__overlay__ {
status = "okay";
};
};

fragment@4 {
target-path = "/";
__overlay__ {
touch_reg: touch_reg@1 {
reg = <1>;
compatible = "regulator-fixed";
regulator-name = "touch_reg_1";
gpio = <&display_mcu 1 GPIO_ACTIVE_HIGH>;
startup-delay-us = <50000>;
enable-active-high;
};
};
};

fragment@10 {
target = <&gt911>;
__dormant__ {
touchscreen-inverted-x;
};
};

fragment@11 {
target = <&gt911>;
__dormant__ {
touchscreen-inverted-y;
};
};

__overrides__ {
dsi0 = <&dsi_frag>, "target:0=",<&dsi0>,
<&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
<&touch_reg>, "reg:0=0",
<&touch_reg>, "regulator-name=touch_reg_0";
sizex = <&gt911>,"touchscreen-size-x:0";
sizey = <&gt911>,"touchscreen-size-y:0";
invx = <0>, "+10";
invy = <0>, "+11";
swapxy = <&gt911>,"touchscreen-swapped-x-y?";
};
};

0 comments on commit c7b26b4

Please sign in to comment.