Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 83 additions & 16 deletions arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
status = "okay";
port {
dsi_out: endpoint {
remote-endpoint = <&panel_in>;
remote-endpoint = <&bridge_in>;
};
};
};
Expand All @@ -26,6 +26,16 @@
fragment@1 {
target-path = "/";
__overlay__ {
panel: ws_dsi_panel@1 {
reg = <1>;
compatible = "waveshare,10.1inch-c-panel";

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

Expand All @@ -36,12 +46,39 @@
#size-cells = <0>;
status = "okay";

panel: panel_disp1@45 {
bridge: bridge@45 {
reg = <0x45>;
compatible = "waveshare,10.1inch-panel";
compatible = "waveshare,dsi2lvds";

ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;
bridge_in: endpoint {
remote-endpoint = <&dsi_out>;
data-lanes = <1 2>;
};
};

port@1 {
reg = <1>;
bridge_out: endpoint {
remote-endpoint = <&panel_in>;
};
};
};
};

/* Panels that need the downstream Waveshare panel driver */
legacy_panel: panel_disp1@45 {
reg = <0x45>;
compatible = "waveshare,10.1inch-e-2lane-panel";
status = "disabled";

port {
panel_in: endpoint {
legacy_in: endpoint {
remote-endpoint = <&dsi_out>;
};
};
Expand Down Expand Up @@ -81,75 +118,105 @@
};
};

fragment@6 {
target = <&bridge_in>;
__dormant__ {
data-lanes = <1 2 3 4>;
};
};

__overrides__ {
2_8_inch = <&panel>, "compatible=waveshare,2.8inch-panel",
<&bridge>, "compatible=waveshare,dsi2dpi",
<&touch>, "touchscreen-size-x:0=480",
<&touch>, "touchscreen-size-y:0=640",
<&touch>, "touchscreen-inverted-y?",
<&touch>, "touchscreen-swapped-x-y?";
3_4_inch = <&panel>, "compatible=waveshare,3.4inch-panel",
3_4_inch = <&panel>, "compatible=waveshare,3.4inch-c-panel",
<&touch>, "touchscreen-size-x:0=800",
<&touch>, "touchscreen-size-y:0=800";
4_0_inch = <&panel>, "compatible=waveshare,4.0inch-panel",
<&bridge>, "compatible=waveshare,dsi2dpi",
<&touch>, "touchscreen-size-x:0=800",
<&touch>, "touchscreen-size-y:0=480",
<&touch>, "touchscreen-inverted-x?",
<&touch>, "touchscreen-swapped-x-y?";
7_0_inchC = <&panel>, "compatible=waveshare,7.0inch-c-panel",
<&bridge>, "compatible=waveshare,dsi2dpi",
<&touch>, "touchscreen-size-x:0=800",
<&touch>, "touchscreen-size-y:0=480";
7_9_inch = <&panel>, "compatible=waveshare,7.9inch-panel",
<&touch>, "touchscreen-size-x:0=4096",
<&touch>, "touchscreen-size-y:0=4096",
<&touch>, "touchscreen-inverted-x?",
<&touch>, "touchscreen-swapped-x-y?";
8_0_inch = <&panel>, "compatible=waveshare,8.0inch-panel",
8_0_inch = <&panel>, "compatible=waveshare,8.0inch-c-panel",
<&touch>, "touchscreen-size-x:0=800",
<&touch>, "touchscreen-size-y:0=1280",
<&touch>, "touchscreen-inverted-x?",
<&touch>, "touchscreen-swapped-x-y?";
10_1_inch = <&panel>, "compatible=waveshare,10.1inch-panel",
10_1_inch = <&panel>, "compatible=waveshare,10.1inch-c-panel",
<&touch>, "touchscreen-size-x:0=800",
<&touch>, "touchscreen-size-y:0=1280",
<&touch>, "touchscreen-inverted-x?",
<&touch>, "touchscreen-swapped-x-y?";
11_9_inch = <&panel>, "compatible=waveshare,11.9inch-panel",
<&touch>, "touchscreen-inverted-x?",
<&touch>, "touchscreen-swapped-x-y?";
4_0_inchC = <&panel>, "compatible=waveshare,4inch-panel",
4_0_inchC = <&panel>, "compatible=waveshare,4.0inch-c-panel",
<&touch>, "touchscreen-size-x:0=720",
<&touch>, "touchscreen-size-y:0=720";
5_0_inch = <&panel>, "compatible=waveshare,5.0inch-panel",
5_0_inch = <&panel>, "compatible=waveshare,5.0inch-d-panel",
<&touch>, "touchscreen-inverted-x?",
<&touch>, "touchscreen-inverted-y?";
6_25_inch = <&panel>, "compatible=waveshare,6.25inch-panel",
<&touch>, "touchscreen-inverted-x?",
<&touch>, "touchscreen-inverted-y?";
6_25_inchB = <&panel>, "compatible=waveshare,6.25inch-b-panel",
6_25_inchB = <&legacy_panel>, "compatible=waveshare,6.25inch-b-panel",
<&legacy_panel>, "status=okay",
<&bridge>, "status=disabled",
<&panel>, "status=disabled",
<&dsi_out>, "remote-endpoint:0=", <&legacy_in>,
<&touch>, "touchscreen-inverted-x?",
<&touch>, "touchscreen-inverted-y?";
8_8_inch = <&panel>, "compatible=waveshare,8.8inch-panel";
13_3_inch_4lane = <&panel>, "compatible=waveshare,13.3inch-4lane-panel",
13_3_inch_4lane = <&panel>, "compatible=waveshare,13.3inch-panel",
<&bridge>, "compatible=waveshare,dsi2dpi",
<0>, "+6",
<&touch2>, "status=okay";
13_3_inch_2lane = <&panel>, "compatible=waveshare,13.3inch-2lane-panel",
13_3_inch_2lane = <&legacy_panel>, "compatible=waveshare,13.3inch-2lane-panel",
<&legacy_panel>, "status=okay",
<&bridge>, "status=disabled",
<&panel>, "status=disabled",
<&dsi_out>, "remote-endpoint:0=", <&legacy_in>,
<&touch2>, "status=okay";
7_0_inchH = <&panel>, "compatible=waveshare,7.0inch-h-panel",
<&touch>, "touchscreen-swapped-x-y?",
<&touch>, "touchscreen-inverted-x?";
10_1_inchE_4lane = <&panel>, "compatible=waveshare,10.1inch-e-4lane-panel",
10_1_inchE_4lane = <&legacy_panel>, "compatible=waveshare,10.1inch-e-4lane-panel",
<&legacy_panel>, "status=okay",
<&bridge>, "status=disabled",
<&panel>, "status=disabled",
<&dsi_out>, "remote-endpoint:0=", <&legacy_in>,
<&touch>, "touchscreen-swapped-x-y?",
<&touch>, "touchscreen-inverted-x?";
10_1_inchE_2lane = <&panel>, "compatible=waveshare,10.1inch-e-2lane-panel",
10_1_inchE_2lane = <&legacy_panel>, "compatible=waveshare,10.1inch-e-2lane-panel",
<&legacy_panel>, "status=okay",
<&bridge>, "status=disabled",
<&panel>, "status=disabled",
<&dsi_out>, "remote-endpoint:0=", <&legacy_in>,
<&touch>, "touchscreen-swapped-x-y?",
<&touch>, "touchscreen-inverted-x?";
i2c1 = <&i2c_frag>, "target:0=",<&i2c1>,
<0>, "-3-4+5";
disable_touch = <&touch>, "status=disabled";
rotation = <&panel>, "rotation:0";
rotation = <&panel>, "rotation:0",
<&legacy_panel>, "rotation:0";
invx = <&touch>,"touchscreen-inverted-x?";
invy = <&touch>,"touchscreen-inverted-y?";
swapxy = <&touch>,"touchscreen-swapped-x-y?";
dsi0 = <&dsi_frag>, "target:0=",<&dsi0>,
<&i2c_frag>, "target:0=",<&i2c_csi_dsi0>;
<&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
<&panel>, "reg:0=0";
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
status = "okay";

display_mcu: display_mcu@45 {
compatible = "waveshare,touchscreen-panel-regulator";
compatible = "waveshare,dsi-touch-gpio";
reg = <0x45>;
gpio-controller;
#gpio-cells = <2>;
enable-gpio = <&display_mcu 2 GPIO_ACTIVE_HIGH>;
};

touch: touch@5d {
Expand All @@ -43,15 +42,27 @@
port {
dsi_out: endpoint {
remote-endpoint = <&panel_in>;
data-lanes = <1 2>;
};
};

/*
* The supplies and GPIOs cover the names used by all the
* panel drivers: each driver only looks up its own.
*/
dsi_panel: dsi_panel@0 {
reg = <0>;
compatible = "waveshare,10.1-dsi-touch-a";
reset-gpio = <&display_mcu 1 GPIO_ACTIVE_HIGH>;
iovcc-gpio = <&display_mcu 4 GPIO_ACTIVE_HIGH>;
avdd-gpio = <&display_mcu 0 GPIO_ACTIVE_HIGH>;
reset-gpios = <&display_mcu 1 GPIO_ACTIVE_LOW>;
enable-gpios = <&display_mcu 1 GPIO_ACTIVE_HIGH>;
iovcc-supply = <&ws_iovcc>;
vccio-supply = <&ws_iovcc>;
pp1800-supply = <&ws_iovcc>;
avdd-supply = <&ws_avdd>;
avee-supply = <&ws_avdd>;
vdd-supply = <&ws_avdd>;
vcc-supply = <&ws_avdd>;
power-supply = <&ws_avdd>;
backlight = <&display_mcu>;

port {
Expand All @@ -77,6 +88,45 @@
};
};

fragment@4 {
target-path = "/";
__overlay__ {
ws_vcc: ws_panel_vcc@1 {
reg = <1>;
compatible = "regulator-fixed";
regulator-name = "ws_panel_vcc_1";
gpio = <&display_mcu 8 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-always-on;
};

ws_iovcc: ws_panel_iovcc@1 {
reg = <1>;
compatible = "regulator-fixed";
regulator-name = "ws_panel_iovcc_1";
gpio = <&display_mcu 4 GPIO_ACTIVE_HIGH>;
startup-delay-us = <20000>;
enable-active-high;
};

ws_avdd: ws_panel_avdd@1 {
reg = <1>;
compatible = "regulator-fixed";
regulator-name = "ws_panel_avdd_1";
gpio = <&display_mcu 0 GPIO_ACTIVE_HIGH>;
startup-delay-us = <20000>;
enable-active-high;
};
};
};

fragment@5 {
target = <&dsi_out>;
__dormant__ {
data-lanes = <1 2 3 4>;
};
};

__overrides__ {
3_4_inch_c = <&dsi_panel>, "compatible=waveshare,3.4-dsi-touch-c";
4_0_inch_a = <&dsi_panel>, "compatible=waveshare,4.0-dsi-touch-a";
Expand All @@ -93,28 +143,40 @@
7_0_inch_b = <&dsi_panel>, "compatible=waveshare,7.0-dsi-touch-b";
7_0_inch_c = <&dsi_panel>, "compatible=waveshare,7.0-dsi-touch-c";
8_0_inch_a = <&dsi_panel>, "compatible=waveshare,8.0-dsi-touch-a";
8_0_inch_a_4lane = <&dsi_panel>, "compatible=waveshare,8.0-dsi-touch-a-4lane";
8_0_inch_a_4lane = <&dsi_panel>, "compatible=waveshare,8.0-dsi-touch-a",
<0>, "+5";
8_8_inch_a = <&dsi_panel>, "compatible=waveshare,8.8-dsi-touch-a",
<&display_mcu>, "pre-power-on?";
<&dsi_panel>, "vcc-supply:0=", <&ws_iovcc>,
<&dsi_panel>, "vdd-supply:0=", <&ws_vcc>;
9_0_inch_b = <&dsi_panel>, "compatible=waveshare,9.0-dsi-touch-b",
<&touch>, "touchscreen-inverted-x";
9_0_inch_b_4lane = <&dsi_panel>, "compatible=waveshare,9.0-dsi-touch-b-4lane",
<&touch>, "touchscreen-inverted-x";
9_0_inch_b_4lane = <&dsi_panel>, "compatible=waveshare,9.0-dsi-touch-b",
<&touch>, "touchscreen-inverted-x",
<0>, "+5";
10_1_inch_a = <&dsi_panel>, "compatible=waveshare,10.1-dsi-touch-a";
10_1_inch_a_4lane = <&dsi_panel>, "compatible=waveshare,10.1-dsi-touch-a-4lane";
10_1_inch_a_4lane = <&dsi_panel>, "compatible=waveshare,10.1-dsi-touch-a",
<0>, "+5";
10_1_inch_b = <&dsi_panel>, "compatible=waveshare,10.1-dsi-touch-b",
<&touch>, "touchscreen-inverted-y";
10_1_inch_b_4lane = <&dsi_panel>, "compatible=waveshare,10.1-dsi-touch-b-4lane",
<&touch>, "touchscreen-inverted-y";
10_1_inch_b_4lane = <&dsi_panel>, "compatible=waveshare,10.1-dsi-touch-b",
<&touch>, "touchscreen-inverted-y",
<0>, "+5";
10_1_inch_e_4lane = <&dsi_panel>, "compatible=waveshare,10.1-dsi-touch-e-4lane";
12_3_inch_a_4lane = <&dsi_panel>, "compatible=waveshare,12.3-dsi-touch-a-4lane",
12_3_inch_a_4lane = <&dsi_panel>, "compatible=waveshare,12.3-dsi-touch-a",
<&touch>, "touchscreen-swapped-x-y",
<&touch>, "touchscreen-inverted-y";
<&touch>, "touchscreen-inverted-y",
<0>, "+5";
disable_touch = <&touch>, "status=disabled";
invx = <&touch>,"touchscreen-inverted-x?";
invy = <&touch>,"touchscreen-inverted-y?";
swapxy = <&touch>,"touchscreen-swapped-x-y?";
dsi0 = <&dsi_frag>, "target:0=",<&dsi0>,
<&i2c_frag>, "target:0=",<&i2c_csi_dsi0>;
<&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
<&ws_vcc>, "reg:0=0",
<&ws_vcc>, "regulator-name=ws_panel_vcc_0",
<&ws_iovcc>, "reg:0=0",
<&ws_iovcc>, "regulator-name=ws_panel_iovcc_0",
<&ws_avdd>, "reg:0=0",
<&ws_avdd>, "regulator-name=ws_panel_avdd_0";
};
};
7 changes: 6 additions & 1 deletion arch/arm/configs/bcm2709_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,7 @@ CONFIG_PINCTRL_MCP23S08=m
CONFIG_GPIO_SYSFS=y
CONFIG_GPIO_CDEV_V1=y
CONFIG_GPIO_BCM_VIRT=y
CONFIG_GPIO_WAVESHARE_DSI_TOUCH=m
CONFIG_GPIO_FXL6408=m
CONFIG_GPIO_MAX7300=m
CONFIG_GPIO_PCA953X=m
Expand Down Expand Up @@ -765,7 +766,6 @@ CONFIG_REGULATOR_ARIZONA_LDO1=m
CONFIG_REGULATOR_ARIZONA_MICSUPP=m
CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY=m
CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_V2=m
CONFIG_REGULATOR_WAVESHARE_TOUCHSCREEN=m
CONFIG_RC_CORE=y
CONFIG_BPF_LIRC_MODE2=y
CONFIG_LIRC=y
Expand Down Expand Up @@ -975,9 +975,14 @@ CONFIG_DRM_DISPLAY_CONNECTOR=m
CONFIG_DRM_LONTIUM_LT8912B=m
CONFIG_DRM_SIMPLE_BRIDGE=m
CONFIG_DRM_TOSHIBA_TC358762=m
CONFIG_DRM_WAVESHARE_BRIDGE=m
CONFIG_DRM_GUD=m
CONFIG_DRM_PANEL_FOCALTECH_OTA7290B=m
CONFIG_DRM_PANEL_HIMAX_HX83102=m
CONFIG_DRM_PANEL_HIMAX_HX8394=m
CONFIG_DRM_PANEL_ILITEK_ILI9806E_SPI=m
CONFIG_DRM_PANEL_ILITEK_ILI9881C=m
CONFIG_DRM_PANEL_JADARD_JD9365DA_H3=m
CONFIG_DRM_PANEL_JDI_LT070ME05000=m
CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=m
CONFIG_DRM_PANEL_SITRONIX_ST7701=m
Expand Down
7 changes: 6 additions & 1 deletion arch/arm/configs/bcmrpi_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,7 @@ CONFIG_PPS_CLIENT_GPIO=m
CONFIG_PINCTRL_MCP23S08=m
CONFIG_GPIO_SYSFS=y
CONFIG_GPIO_CDEV_V1=y
CONFIG_GPIO_WAVESHARE_DSI_TOUCH=m
CONFIG_GPIO_FXL6408=m
CONFIG_GPIO_MAX7300=m
CONFIG_GPIO_PCA953X=m
Expand Down Expand Up @@ -758,7 +759,6 @@ CONFIG_REGULATOR_ARIZONA_LDO1=m
CONFIG_REGULATOR_ARIZONA_MICSUPP=m
CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY=m
CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_V2=m
CONFIG_REGULATOR_WAVESHARE_TOUCHSCREEN=m
CONFIG_RC_CORE=y
CONFIG_BPF_LIRC_MODE2=y
CONFIG_LIRC=y
Expand Down Expand Up @@ -968,9 +968,14 @@ CONFIG_DRM_DISPLAY_CONNECTOR=m
CONFIG_DRM_LONTIUM_LT8912B=m
CONFIG_DRM_SIMPLE_BRIDGE=m
CONFIG_DRM_TOSHIBA_TC358762=m
CONFIG_DRM_WAVESHARE_BRIDGE=m
CONFIG_DRM_GUD=m
CONFIG_DRM_PANEL_FOCALTECH_OTA7290B=m
CONFIG_DRM_PANEL_HIMAX_HX83102=m
CONFIG_DRM_PANEL_HIMAX_HX8394=m
CONFIG_DRM_PANEL_ILITEK_ILI9806E_SPI=m
CONFIG_DRM_PANEL_ILITEK_ILI9881C=m
CONFIG_DRM_PANEL_JADARD_JD9365DA_H3=m
CONFIG_DRM_PANEL_JDI_LT070ME05000=m
CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=m
CONFIG_DRM_PANEL_SITRONIX_ST7701=m
Expand Down
Loading
Loading