Skip to content
Open
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
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -23707,6 +23707,12 @@ S: Maintained
W: http://www.winischhofer.at/linuxsisusbvga.shtml
F: drivers/usb/misc/sisusbvga/

SITRONIX ST7123 TOUCHSCREEN DRIVER
M: Waveshare Team <support@waveshare.com>
L: linux-input@vger.kernel.org
S: Maintained
F: drivers/input/touchscreen/st7123.c

SL28 CPLD MFD DRIVER
M: Michael Walle <mwalle@kernel.org>
S: Maintained
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -5964,6 +5964,7 @@ Params: 3_4_inch_c 3.4" 800x800 2lane
4_0_inch_c 4.0" 720x720 2lane
5_0_inch_a 5.0" 720x1280 2lane
5_5_inch_a 5.5" 720x1280 2lane
6_25_inch_a 6.25" 720x1560 2lane
7_0_inch_a 7.0" A 720x1280 2lane
7_0_inch_b 7.0" B 720x1280 2lane
7_0_inch_c 7.0" C 1024x600 2lane
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
enable-gpio = <&display_mcu 2 GPIO_ACTIVE_HIGH>;
};

touch: goodix@5d {
touch: touch@5d {
compatible = "goodix,gt9271";
reg = <0x5d>;
reset-gpio = <&display_mcu 9 GPIO_ACTIVE_HIGH>;
Expand Down Expand Up @@ -82,6 +82,9 @@
4_0_inch_c = <&dsi_panel>, "compatible=waveshare,4.0-dsi-touch-c";
5_0_inch_a = <&dsi_panel>, "compatible=waveshare,5.0-dsi-touch-a";
5_5_inch_a = <&dsi_panel>, "compatible=waveshare,5.5-dsi-touch-a";
6_25_inch_a = <&dsi_panel>, "compatible=waveshare,6.25-dsi-touch-a",
<&touch>, "compatible=sitronix,st7123",
<&touch>, "reg:0=0x55";
7_0_inch_a = <&dsi_panel>, "compatible=waveshare,7.0-dsi-touch-a";
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";
Expand Down
1 change: 1 addition & 0 deletions arch/arm/configs/bcm2709_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@ CONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m
CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
CONFIG_TOUCHSCREEN_TSC2007=m
CONFIG_TOUCHSCREEN_TSC2007_IIO=y
CONFIG_TOUCHSCREEN_ST7123=m
CONFIG_TOUCHSCREEN_STMPE=m
CONFIG_TOUCHSCREEN_IQS5XX=m
CONFIG_INPUT_MISC=y
Expand Down
1 change: 1 addition & 0 deletions arch/arm/configs/bcmrpi_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ CONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m
CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
CONFIG_TOUCHSCREEN_TSC2007=m
CONFIG_TOUCHSCREEN_TSC2007_IIO=y
CONFIG_TOUCHSCREEN_ST7123=m
CONFIG_TOUCHSCREEN_STMPE=m
CONFIG_TOUCHSCREEN_IQS5XX=m
CONFIG_INPUT_MISC=y
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/configs/bcm2711_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@ CONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m
CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
CONFIG_TOUCHSCREEN_TSC2007=m
CONFIG_TOUCHSCREEN_TSC2007_IIO=y
CONFIG_TOUCHSCREEN_ST7123=m

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move the config changes into a separate commit once you've responded to other feedback (i.e. you don't need to do it yet).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And include the 32-bit defconfigs, unless there is a reason they won't be compatible.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I’ll split the defconfig updates into a separate commit and add CONFIG_TOUCHSCREEN_ST7123=m to the 32-bit Raspberry Pi defconfigs as well.
Our hardware testing so far has been on the 64-bit kernel. The driver only depends on I2C and is built as a module,so I don’t see an obvious 32-bit-specific compatibility issue.

CONFIG_TOUCHSCREEN_STMPE=m
CONFIG_TOUCHSCREEN_IQS5XX=m
CONFIG_INPUT_MISC=y
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/configs/bcm2711_rt_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,7 @@ CONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m
CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
CONFIG_TOUCHSCREEN_TSC2007=m
CONFIG_TOUCHSCREEN_TSC2007_IIO=y
CONFIG_TOUCHSCREEN_ST7123=m
CONFIG_TOUCHSCREEN_STMPE=m
CONFIG_TOUCHSCREEN_IQS5XX=m
CONFIG_INPUT_MISC=y
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/configs/bcm2712_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,7 @@ CONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m
CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
CONFIG_TOUCHSCREEN_TSC2007=m
CONFIG_TOUCHSCREEN_TSC2007_IIO=y
CONFIG_TOUCHSCREEN_ST7123=m
CONFIG_TOUCHSCREEN_STMPE=m
CONFIG_TOUCHSCREEN_IQS5XX=m
CONFIG_INPUT_MISC=y
Expand Down
92 changes: 92 additions & 0 deletions drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,73 @@ static const struct panel_init_cmd ws_panel_7_c_init[] = {
{},
};

static const struct panel_init_cmd ws_panel_6_25_a_init[] = {
_INIT_DCS_CMD(0x60, 0x71, 0x23, 0xa2),
_INIT_DCS_CMD(0x60, 0x71, 0x23, 0xa3),
_INIT_DCS_CMD(0x60, 0x71, 0x23, 0xa4),
_INIT_DCS_CMD(0xB0, 0x22, 0x61, 0x11, 0x6B, 0x25, 0x39, 0x39),
_INIT_DCS_CMD(0xB7, 0x00, 0x00, 0x64, 0x64),
_INIT_DCS_CMD(0xBF, 0x95, 0x95),
_INIT_DCS_CMD(0xA4, 0x31),
_INIT_DCS_CMD(0xC8, 0x00, 0x00, 0x10, 0x1F, 0x3A, 0x00, 0x66, 0x03,
0xA8, 0x04, 0x11, 0x02, 0x06, 0x73, 0x01, 0x21, 0xC1,
0x02, 0x01, 0x02, 0x22, 0x3E, 0x00, 0x84, 0x09, 0x32,
0xE9, 0x0B, 0x3B, 0x0D, 0xF3, 0x7E, 0x0D, 0xB2, 0xE6,
0x03, 0xFC),
_INIT_DCS_CMD(0xC9, 0x00, 0x00, 0x10, 0x1F, 0x3A, 0x00, 0x66, 0x03,
0xA8, 0x04, 0x11, 0x02, 0x06, 0x73, 0x01, 0x21, 0xC1,
0x02, 0x01, 0x02, 0x22, 0x3E, 0x00, 0x84, 0x09, 0x32,
0xE9, 0x0B, 0x3B, 0x0D, 0xF3, 0x7E, 0x0D, 0xB2, 0xE6,
0x03, 0xFC),
_INIT_DCS_CMD(0xD7, 0x10, 0x12, 0x49, 0x3B, 0x0C, 0x0C),
_INIT_DCS_CMD(0x90, 0x71, 0x23, 0x5A, 0x20, 0x24, 0x09, 0x09),
_INIT_DCS_CMD(0xA3, 0x80, 0x01, 0x88, 0x30, 0x05, 0x00, 0x00, 0x00,
0x00, 0x00, 0x46, 0x00, 0x00, 0x1E, 0x5C, 0x1E, 0x80,
0x00, 0x4F, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46,
0x00, 0x00, 0x1E, 0x5C, 0x1E, 0x80, 0x00, 0x6F, 0x58,
0x00, 0x00, 0x00, 0xFF),
_INIT_DCS_CMD(0xA6, 0x50, 0x00, 0x24, 0x55, 0x3A, 0x00, 0x00, 0x01,
0x54, 0x54, 0x91, 0xFF, 0x00, 0x24, 0x55, 0x3B, 0x00,
0x00, 0x00, 0x54, 0x54, 0x91, 0xFF, 0x00, 0x24, 0x11,
0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0x91, 0xFF, 0x00,
0xAC, 0x11, 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0xFF,
0xFF, 0x00, 0x08, 0x80, 0x08, 0x80, 0x06, 0x00, 0x00,
0x00, 0x00),
_INIT_DCS_CMD(0xA7, 0x1D, 0x1D, 0x80, 0x64, 0x40, 0x07, 0x16, 0x41,
0x02, 0x48, 0x07, 0x54, 0x54, 0x91, 0xFF, 0x08, 0x80,
0x64, 0x40, 0x25, 0x34, 0x43, 0x04, 0x06, 0x05, 0x54,
0x54, 0x91, 0xFF, 0x08, 0x80, 0x64, 0x40, 0x00, 0x00,
0x40, 0x00, 0x00, 0x00, 0x54, 0x54, 0x91, 0xFF, 0x08,
0x80, 0x64, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,
0x54, 0x54, 0x84, 0xFF, 0x08, 0x80, 0x44),
_INIT_DCS_CMD(0xAC, 0x1C, 0x02, 0x09, 0x0B, 0x12, 0x10, 0x18, 0x19,
0x1C, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x08, 0x0A,
0x13, 0x11, 0x18, 0x19, 0x1C, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
_INIT_DCS_CMD(0xAD, 0xF0, 0x00, 0x46, 0x00, 0x05, 0x50, 0x50, 0xFF,
0xFF, 0xF0, 0x40, 0x06, 0x01, 0x07, 0x42, 0x42, 0xFF,
0xFF, 0x01, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF),
_INIT_DCS_CMD(0xAE, 0xFF, 0x03, 0x00, 0xFF, 0x03, 0x00, 0x01),
_INIT_DCS_CMD(0xB2, 0x15, 0x19, 0x05, 0x23, 0x49, 0xAF, 0x03, 0x2E,
0x5C, 0xD2, 0xFF, 0x10, 0x20, 0xFD, 0x20, 0xC0, 0x00),
_INIT_DCS_CMD(0xE8, 0x20, 0x6F, 0x04, 0x7C, 0x7C, 0x3E, 0x04, 0xDC,
0xDC, 0x3E, 0x06, 0xFA, 0x26, 0x3E),
_INIT_DCS_CMD(0x75, 0x03, 0x04),
_INIT_DCS_CMD(0xE7, 0x3B, 0x00, 0x00, 0x7C, 0xA1, 0x8C, 0x20, 0x1A,
0xF0, 0xB1, 0x50, 0x00, 0x50, 0xB1, 0x50, 0xB1, 0x50,
0xD8, 0x00, 0x55, 0x00, 0xB1, 0x00, 0x45, 0xC9, 0x6A,
0xFF, 0x5A, 0xD8, 0x18, 0x88, 0x15, 0xB1, 0x01, 0x01,
0x77),
_INIT_DCS_CMD(0xEA, 0x13, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x2C),
_INIT_DCS_CMD(0x60, 0x71, 0x23, 0x00),
_INIT_DCS_CMD(0x11),
_INIT_DELAY_CMD(120),
_INIT_DCS_CMD(0x29),
_INIT_DELAY_CMD(50),
{},
};

static const struct panel_init_cmd ws_panel_5_5_a_init[] = {
_INIT_DCS_CMD(0xB9, 0xFF, 0x83, 0x94),
_INIT_DCS_CMD(0xBA, 0x61, 0x03, 0x68, 0x6B, 0xB2, 0xC0),
Expand Down Expand Up @@ -1935,6 +2002,20 @@ static const struct drm_display_mode ws_panel_7_c_mode = {
.height_mm = 85,
};

static const struct drm_display_mode ws_panel_6_25_a_mode = {
.clock = 83000,
.hdisplay = 720,
.hsync_start = 720 + 20,
.hsync_end = 720 + 20 + 20,
.htotal = 720 + 20 + 20 + 20,
.vdisplay = 1560,
.vsync_start = 1560 + 200,
.vsync_end = 1560 + 200 + 8,
.vtotal = 1560 + 200 + 8 + 10,
.width_mm = 62,
.height_mm = 110,
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it works over 2 lanes at 60Hz, what is the gain in having the 4 lane mode?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the 4 lane mode has been dropped, I assume it was viewed as not necessary.


static const struct drm_display_mode ws_panel_5_5_a_mode = {
.clock = 65000,
.hdisplay = 720,
Expand Down Expand Up @@ -2243,6 +2324,15 @@ static const struct ws_panel_desc ws_panel_7_inch_c_desc = {
.format = MIPI_DSI_FMT_RGB888,
};

static const struct ws_panel_desc ws_panel_6_25_inch_a_desc = {
.init = ws_panel_6_25_a_init,
.mode = &ws_panel_6_25_a_mode,
.mode_flags = MIPI_DSI_MODE_VIDEO_HSE | MIPI_DSI_MODE_VIDEO |
MIPI_DSI_MODE_LPM | MIPI_DSI_CLOCK_NON_CONTINUOUS,
.lanes = 2,
.format = MIPI_DSI_FMT_RGB888,
};

static const struct ws_panel_desc ws_panel_5_5_inch_a_desc = {
.init = ws_panel_5_5_a_init,
.mode = &ws_panel_5_5_a_mode,
Expand Down Expand Up @@ -2301,6 +2391,8 @@ static const struct of_device_id ws_panel_of_match[] = {
{ .compatible = "waveshare,7.0-dsi-touch-a", &ws_panel_7_inch_a_desc },
{ .compatible = "waveshare,7.0-dsi-touch-b", &ws_panel_7_inch_a_desc },
{ .compatible = "waveshare,7.0-dsi-touch-c", &ws_panel_7_inch_c_desc },
{ .compatible = "waveshare,6.25-dsi-touch-a",
&ws_panel_6_25_inch_a_desc },
{ .compatible = "waveshare,5.5-dsi-touch-a",
&ws_panel_5_5_inch_a_desc },
{ .compatible = "waveshare,5.0-dsi-touch-a", &ws_panel_5_inch_a_desc },
Expand Down
12 changes: 12 additions & 0 deletions drivers/input/touchscreen/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1251,6 +1251,18 @@ config TOUCHSCREEN_SIS_I2C
To compile this driver as a module, choose M here: the
module will be called sis_i2c.

config TOUCHSCREEN_ST7123
tristate "Sitronix ST7123 touchscreen controllers"
depends on I2C
help
Say Y here if you want to support the Sitronix ST7123
touchscreen controller.

If unsure, say N.

To compile this driver as a module, choose M here: the
module will be called st7123.

config TOUCHSCREEN_ST1232
tristate "Sitronix ST1232 or ST1633 touchscreen controllers"
depends on I2C
Expand Down
1 change: 1 addition & 0 deletions drivers/input/touchscreen/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ obj-$(CONFIG_TOUCHSCREEN_RM_TS) += raydium_i2c_ts.o
obj-$(CONFIG_TOUCHSCREEN_S6SY761) += s6sy761.o
obj-$(CONFIG_TOUCHSCREEN_SILEAD) += silead.o
obj-$(CONFIG_TOUCHSCREEN_SIS_I2C) += sis_i2c.o
obj-$(CONFIG_TOUCHSCREEN_ST7123) += st7123.o
obj-$(CONFIG_TOUCHSCREEN_ST1232) += st1232.o
obj-$(CONFIG_TOUCHSCREEN_STMFTS) += stmfts.o
obj-$(CONFIG_TOUCHSCREEN_STMPE) += stmpe-ts.o
Expand Down
Loading
Loading