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
2 changes: 2 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -5964,6 +5964,8 @@ 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
6_25_inch_a_4lane 6.25" 720x1560 4lane
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,12 @@
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_ts,st7123",
<&touch>, "reg:0=0x55";
6_25_inch_a_4lane = <&dsi_panel>, "compatible=waveshare,6.25-dsi-touch-a,4lane",
<&touch>, "compatible=sitronix_ts,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/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
182 changes: 182 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,139 @@ static const struct panel_init_cmd ws_panel_7_c_init[] = {
{},
};

static const struct panel_init_cmd ws_panel_6_25_a_4lane_init[] = {

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.

Commit text

The panel uses a 720x1560 resolution at 93MHz pixel clock with
MIPI DSI RGB888 format.

It's only 93MHz in 4 lane mode.

_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(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_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 +2068,34 @@ 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_4lane_mode = {
.clock = 93000,
.hdisplay = 720,
.hsync_start = 720 + 40,
.hsync_end = 720 + 40 + 20,
.htotal = 720 + 40 + 20 + 40,
.vdisplay = 1560,
.vsync_start = 1560 + 320,
.vsync_end = 1560 + 320 + 2,
.vtotal = 1560 + 320 + 2 + 16,
.width_mm = 62,
.height_mm = 110,
};

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?


static const struct drm_display_mode ws_panel_5_5_a_mode = {
.clock = 65000,
.hdisplay = 720,
Expand Down Expand Up @@ -2243,6 +2404,24 @@ 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_4lane_desc = {
.init = ws_panel_6_25_a_4lane_init,
.mode = &ws_panel_6_25_a_4lane_mode,
.mode_flags = MIPI_DSI_MODE_VIDEO_HSE | MIPI_DSI_MODE_VIDEO |
MIPI_DSI_MODE_LPM | MIPI_DSI_CLOCK_NON_CONTINUOUS,
.lanes = 4,
.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 +2480,9 @@ 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,4lane",

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.

AIUI Additional commas are not allowed in compatible strings.

&ws_panel_6_25_inch_a_4lane_desc },
{ .compatible = "waveshare,6.25-dsi-touch-a", &ws_panel_6_25_inch_a_desc },

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.

If the 4 lane version is waveshare,6.25-dsi-touch-a,4lane, why is this one not waveshare,6.25-dsi-touch-a,2lane? Some consistency would be nice.

{ .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 sitronix-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) += sitronix_st7123/
obj-$(CONFIG_TOUCHSCREEN_ST1232) += st1232.o
obj-$(CONFIG_TOUCHSCREEN_STMFTS) += stmfts.o
obj-$(CONFIG_TOUCHSCREEN_STMPE) += stmpe-ts.o
Expand Down
2 changes: 2 additions & 0 deletions drivers/input/touchscreen/sitronix_st7123/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sitronix-st7123-objs = sitronix_ts.o sitronix_ts_i2c.o sitronix_ts_utility.o sitronix_ts_mt.o sitronix_ts_upgrade.o
obj-m += sitronix-st7123.o
49 changes: 49 additions & 0 deletions drivers/input/touchscreen/sitronix_st7123/sitronix_st7123.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/* SPDX-License-Identifier: GPL-2.0 */

#define ST_CHIPID 0x83

/* common */
#define ST_DISPLAY_DUMP_OFF 0x1D7FE
#define ST_DISPLAY_SIZE 0x800

/* flash */
#define ST_FLASH_PAGE_SIZE 4096
#define ST_FLASH_SIZE 0x20000
#define ST_ICP_DISPLAY_FLASH_OFF 0x1D7FE

/* ICP */
#define ST_ADDR_MODE_I2C_ADDR 0x28

/* HDL */
#define ST_RAM_MODE_RETRY_MAX 3
#define ST_FW_LEN 0x010000
#define ST_HDL_PRAM_ADDR 0x7F0000
#define ST_FW_LEN_PART2 0x002000
#define ST_HDL_PRAM_ADDR_PART2 0x400000
#define ST_HDL_URAM_ADDR 0x000000
#define ST_HDL_DISPLAY_RAM_ADDR 0x030000

/* IC register */
#define ST_MISC_INFO_PROX_FLAG 0x20
#define ST_MISC_INFO_COORD_CHKSUM_FLAG 0x10

enum sitronix_mode_switch {
ST_MODE_SWU = 1,
ST_MODE_GLOVE = 2,
ST_MODE_CHARGE = 3,
ST_MODE_JITTERSUPPRESS = 4,
ST_MODE_PALM = 5,
ST_MODE_HEADPHONE = 6,
ST_MODE_GRIP = 7,
ST_MODE_SIZE = 8,
ST_MODE_RESTORE_START = 2,
ST_MODE_SWITCH_OFF = 0,
ST_MODE_SWITCH_ON = 0x80
};

enum st_mode_grip_rotate_value {
ST_MODE_GRIP_ROTATE_0 = 0,
ST_MODE_GRIP_ROTATE_90 = 1,
ST_MODE_GRIP_ROTATE_180 = 2,
ST_MODE_GRIP_ROTATE_270 = 3,
};
Loading
Loading