drm/panel: support Waveshare DSI TOUCH kits
Subsystems (5)
v4 cover drm/panel: support Waveshare DSI TOUCH kits
The Waveshare DSI TOUCH family of DSI panel kits feature different DSI video-mode panels, bundled with the separate controlling circuit, produing necessary voltages from the 3.3V and 5V supplies. Extend panel drivers to support those Waveshare panels and also add GPIO driver for the onboard control circuitry.
---
Changes in v4:
- Dropped patches applied to drm-misc-next
- Link to v3: https://patch.msgid.link/[email protected]
Changes in v3:
- Fix another typo in the focaltech,ota7290b schema, sorted out voltage
supplies in the schema and in the driver
- Dropped Ricardo's T-B from bindings patch (Krzysztof)
- In the Waveshare GPIO driver bumped max register to REG_VERSION (Jie
Gan)
- Add a lanes vs config check in the JD9365 driver (Jie Gan)
- Link to v2: https://patch.msgid.link/[email protected]
Changes in v2:
- Fixed errors in focaltech,ota7290b and waveshare,dsi-touch-gpio schemas
- Split the JD9365 patch, making the changes more obvious (and
describing panel classes)
- Cleaned up GPIO driver: moved NUM_GPIOS from the enum, switched to
guard(), added regmap error handling, droppedwaveshare_gpio_i2c_read() (Bartosz)
- Link to v1: https://patch.msgid.link/[email protected]
---
Dmitry Baryshkov (4):
dt-bindings: display/panel: ilitek,ili9881c: describe Waveshare panel drm/panel: ilitek-ili9881c: support Waveshare 7.0" DSI panel
dt-bindings: gpio: describe Waveshare GPIO controller
gpio: add GPIO controller found on Waveshare DSI TOUCH panels
.../bindings/display/panel/ilitek,ili9881c.yaml | 2 + .../bindings/gpio/waveshare,dsi-touch-gpio.yaml | 100 ++++++++ drivers/gpio/Kconfig | 10 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-waveshare-dsi.c | 208 +++++++++++++++++ drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 251 ++++++++++++++++++++- 6 files changed, 570 insertions(+), 2 deletions(-)
---
base-commit: 17394e05b295e4936e0ed50d2f02ed7f08fd4f7d
change-id: 20260401-waveshare-dsi-touch-e1717a1ffc40
Best regards,
Signature · 2 lines
With best wishes Dmitry
PATCH v4 1/4 dt-bindings: display/panel: ilitek,ili9881c: describe Waveshare panel
Describe Waveshare 7" DSI panel which uses ILI9881 as a panel controller. This panel requires two voltags supplies, so add separate iovcc supply.
--- Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml +2 -0
@@ -24,6 +24,7 @@ properties: - raspberrypi,dsi-7inch - startek,kd050hdfia020 - tdo,tl050hdv35 + - waveshare,7.0-dsi-touch-a - wanchanglong,w552946aaa - wanchanglong,w552946aba - const: ilitek,ili9881c
@@ -34,6 +35,7 @@ properties: backlight: true port: true power-supply: true + iovcc-supply: true reset-gpios: true rotation: true
Signature · 1 line
2.47.3
PATCH v4 2/4 drm/panel: ilitek-ili9881c: support Waveshare 7.0" DSI panel
In reply to Dmitry BaryshkovEnable support for Waveshare 7.0" DSI TOUCH-A panel. It requires additional voltage regulator, iovcc.
--- drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 251 +++++++++++++++++++++++++- 1 file changed, 249 insertions(+), 2 deletions(-)
drivers/gpu/drm/panel/panel-ilitek-ili9881c.c +249 -2
@@ -52,6 +52,7 @@ struct ili9881c {const struct ili9881c_desc *desc;struct regulator *power; +struct regulator *iovcc;struct gpio_desc *reset;enum drm_panel_orientation orientation;
@@ -1997,6 +1998,205 @@ static const struct ili9881c_instr bsd1218_a101kl68_init[] = { ILI9881C_COMMAND_INSTR(0xd3, 0x3f), }; +static const struct ili9881c_instr waveshare_7inch_a_init[] = { +ILI9881C_SWITCH_PAGE_INSTR (3 ), +ILI9881C_COMMAND_INSTR (0x01 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x02 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x03 ,0x73 ), +ILI9881C_COMMAND_INSTR (0x04 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x05 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x06 ,0x0a ), +ILI9881C_COMMAND_INSTR (0x07 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x08 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x09 ,0x61 ), +ILI9881C_COMMAND_INSTR (0x0a ,0x00 ), +ILI9881C_COMMAND_INSTR (0x0b ,0x00 ), +ILI9881C_COMMAND_INSTR (0x0c ,0x01 ), +ILI9881C_COMMAND_INSTR (0x0d ,0x00 ), +ILI9881C_COMMAND_INSTR (0x0e ,0x00 ), +ILI9881C_COMMAND_INSTR (0x0f ,0x61 ), +ILI9881C_COMMAND_INSTR (0x10 ,0x61 ), +ILI9881C_COMMAND_INSTR (0x11 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x12 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x13 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x14 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x15 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x16 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x17 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x18 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x19 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x1a ,0x00 ), +ILI9881C_COMMAND_INSTR (0x1b ,0x00 ), +ILI9881C_COMMAND_INSTR (0x1c ,0x00 ), +ILI9881C_COMMAND_INSTR (0x1d ,0x00 ), +ILI9881C_COMMAND_INSTR (0x1e ,0x40 ), +ILI9881C_COMMAND_INSTR (0x1f ,0x80 ), +ILI9881C_COMMAND_INSTR (0x20 ,0x06 ), +ILI9881C_COMMAND_INSTR (0x21 ,0x01 ), +ILI9881C_COMMAND_INSTR (0x22 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x23 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x24 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x25 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x26 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x27 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x28 ,0x33 ), +ILI9881C_COMMAND_INSTR (0x29 ,0x03 ), +ILI9881C_COMMAND_INSTR (0x2a ,0x00 ), +ILI9881C_COMMAND_INSTR (0x2b ,0x00 ), +ILI9881C_COMMAND_INSTR (0x2c ,0x00 ), +ILI9881C_COMMAND_INSTR (0x2d ,0x00 ), +ILI9881C_COMMAND_INSTR (0x2e ,0x00 ), +ILI9881C_COMMAND_INSTR (0x2f ,0x00 ), +ILI9881C_COMMAND_INSTR (0x30 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x31 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x32 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x33 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x34 ,0x04 ), +ILI9881C_COMMAND_INSTR (0x35 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x36 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x37 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x38 ,0x3c ), +ILI9881C_COMMAND_INSTR (0x39 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x3a ,0x00 ), +ILI9881C_COMMAND_INSTR (0x3b ,0x00 ), +ILI9881C_COMMAND_INSTR (0x3c ,0x00 ), +ILI9881C_COMMAND_INSTR (0x3d ,0x00 ), +ILI9881C_COMMAND_INSTR (0x3e ,0x00 ), +ILI9881C_COMMAND_INSTR (0x3f ,0x00 ), +ILI9881C_COMMAND_INSTR (0x40 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x41 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x42 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x43 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x44 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x50 ,0x10 ), +ILI9881C_COMMAND_INSTR (0x51 ,0x32 ), +ILI9881C_COMMAND_INSTR (0x52 ,0x54 ), +ILI9881C_COMMAND_INSTR (0x53 ,0x76 ), +ILI9881C_COMMAND_INSTR (0x54 ,0x98 ), +ILI9881C_COMMAND_INSTR (0x55 ,0xba ), +ILI9881C_COMMAND_INSTR (0x56 ,0x10 ), +ILI9881C_COMMAND_INSTR (0x57 ,0x32 ), +ILI9881C_COMMAND_INSTR (0x58 ,0x54 ), +ILI9881C_COMMAND_INSTR (0x59 ,0x76 ), +ILI9881C_COMMAND_INSTR (0x5a ,0x98 ), +ILI9881C_COMMAND_INSTR (0x5b ,0xba ), +ILI9881C_COMMAND_INSTR (0x5c ,0xdc ), +ILI9881C_COMMAND_INSTR (0x5d ,0xfe ), +ILI9881C_COMMAND_INSTR (0x5e ,0x00 ), +ILI9881C_COMMAND_INSTR (0x5f ,0x0e ), +ILI9881C_COMMAND_INSTR (0x60 ,0x0f ), +ILI9881C_COMMAND_INSTR (0x61 ,0x0c ), +ILI9881C_COMMAND_INSTR (0x62 ,0x0d ), +ILI9881C_COMMAND_INSTR (0x63 ,0x06 ), +ILI9881C_COMMAND_INSTR (0x64 ,0x07 ), +ILI9881C_COMMAND_INSTR (0x65 ,0x02 ), +ILI9881C_COMMAND_INSTR (0x66 ,0x02 ), +ILI9881C_COMMAND_INSTR (0x67 ,0x02 ), +ILI9881C_COMMAND_INSTR (0x68 ,0x02 ), +ILI9881C_COMMAND_INSTR (0x69 ,0x01 ), +ILI9881C_COMMAND_INSTR (0x6a ,0x00 ), +ILI9881C_COMMAND_INSTR (0x6b ,0x02 ), +ILI9881C_COMMAND_INSTR (0x6c ,0x15 ), +ILI9881C_COMMAND_INSTR (0x6d ,0x14 ), +ILI9881C_COMMAND_INSTR (0x6e ,0x02 ), +ILI9881C_COMMAND_INSTR (0x6f ,0x02 ), +ILI9881C_COMMAND_INSTR (0x70 ,0x02 ), +ILI9881C_COMMAND_INSTR (0x71 ,0x02 ), +ILI9881C_COMMAND_INSTR (0x72 ,0x02 ), +ILI9881C_COMMAND_INSTR (0x73 ,0x02 ), +ILI9881C_COMMAND_INSTR (0x74 ,0x02 ), +ILI9881C_COMMAND_INSTR (0x75 ,0x0e ), +ILI9881C_COMMAND_INSTR (0x76 ,0x0f ), +ILI9881C_COMMAND_INSTR (0x77 ,0x0c ), +ILI9881C_COMMAND_INSTR (0x78 ,0x0d ), +ILI9881C_COMMAND_INSTR (0x79 ,0x06 ), +ILI9881C_COMMAND_INSTR (0x7a ,0x07 ), +ILI9881C_COMMAND_INSTR (0x7b ,0x02 ), +ILI9881C_COMMAND_INSTR (0x7c ,0x02 ), +ILI9881C_COMMAND_INSTR (0x7d ,0x02 ), +ILI9881C_COMMAND_INSTR (0x7e ,0x02 ), +ILI9881C_COMMAND_INSTR (0x7f ,0x01 ), +ILI9881C_COMMAND_INSTR (0x80 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x81 ,0x02 ), +ILI9881C_COMMAND_INSTR (0x82 ,0x14 ), +ILI9881C_COMMAND_INSTR (0x83 ,0x15 ), +ILI9881C_COMMAND_INSTR (0x84 ,0x02 ), +ILI9881C_COMMAND_INSTR (0x85 ,0x02 ), +ILI9881C_COMMAND_INSTR (0x86 ,0x02 ), +ILI9881C_COMMAND_INSTR (0x87 ,0x02 ), +ILI9881C_COMMAND_INSTR (0x88 ,0x02 ), +ILI9881C_COMMAND_INSTR (0x89 ,0x02 ), +ILI9881C_COMMAND_INSTR (0x8a ,0x02 ), + +ILI9881C_SWITCH_PAGE_INSTR (4 ), +ILI9881C_COMMAND_INSTR (0x38 ,0x01 ), +ILI9881C_COMMAND_INSTR (0x39 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x6c ,0x15 ), +ILI9881C_COMMAND_INSTR (0x6e ,0x2a ), +ILI9881C_COMMAND_INSTR (0x6f ,0x33 ), +ILI9881C_COMMAND_INSTR (0x3a ,0x94 ), +ILI9881C_COMMAND_INSTR (0x8d ,0x14 ), +ILI9881C_COMMAND_INSTR (0x87 ,0xba ), +ILI9881C_COMMAND_INSTR (0x26 ,0x76 ), +ILI9881C_COMMAND_INSTR (0xb2 ,0xd1 ), +ILI9881C_COMMAND_INSTR (0xb5 ,0x06 ), +ILI9881C_COMMAND_INSTR (0x3b ,0x98 ), + +ILI9881C_SWITCH_PAGE_INSTR (1 ), +ILI9881C_COMMAND_INSTR (0x22 ,0x0a ), +ILI9881C_COMMAND_INSTR (0x31 ,0x00 ), +ILI9881C_COMMAND_INSTR (0x53 ,0x71 ), +ILI9881C_COMMAND_INSTR (0x55 ,0x8f ), +ILI9881C_COMMAND_INSTR (0x40 ,0x33 ), +ILI9881C_COMMAND_INSTR (0x50 ,0x96 ), +ILI9881C_COMMAND_INSTR (0x51 ,0x96 ), +ILI9881C_COMMAND_INSTR (0x60 ,0x23 ), +ILI9881C_COMMAND_INSTR (0xa0 ,0x08 ), +ILI9881C_COMMAND_INSTR (0xa1 ,0x1d ), +ILI9881C_COMMAND_INSTR (0xa2 ,0x2a ), +ILI9881C_COMMAND_INSTR (0xa3 ,0x10 ), +ILI9881C_COMMAND_INSTR (0xa4 ,0x15 ), +ILI9881C_COMMAND_INSTR (0xa5 ,0x28 ), +ILI9881C_COMMAND_INSTR (0xa6 ,0x1c ), +ILI9881C_COMMAND_INSTR (0xa7 ,0x1d ), +ILI9881C_COMMAND_INSTR (0xa8 ,0x7e ), +ILI9881C_COMMAND_INSTR (0xa9 ,0x1d ), +ILI9881C_COMMAND_INSTR (0xaa ,0x29 ), +ILI9881C_COMMAND_INSTR (0xab ,0x6b ), +ILI9881C_COMMAND_INSTR (0xac ,0x1a ), +ILI9881C_COMMAND_INSTR (0xad ,0x18 ), +ILI9881C_COMMAND_INSTR (0xae ,0x4b ), +ILI9881C_COMMAND_INSTR (0xaf ,0x20 ), +ILI9881C_COMMAND_INSTR (0xb0 ,0x27 ), +ILI9881C_COMMAND_INSTR (0xb1 ,0x50 ), +ILI9881C_COMMAND_INSTR (0xb2 ,0x64 ), +ILI9881C_COMMAND_INSTR (0xb3 ,0x39 ), +ILI9881C_COMMAND_INSTR (0xc0 ,0x08 ), +ILI9881C_COMMAND_INSTR (0xc1 ,0x1d ), +ILI9881C_COMMAND_INSTR (0xc2 ,0x2a ), +ILI9881C_COMMAND_INSTR (0xc3 ,0x10 ), +ILI9881C_COMMAND_INSTR (0xc4 ,0x15 ), +ILI9881C_COMMAND_INSTR (0xc5 ,0x28 ), +ILI9881C_COMMAND_INSTR (0xc6 ,0x1c ), +ILI9881C_COMMAND_INSTR (0xc7 ,0x1d ), +ILI9881C_COMMAND_INSTR (0xc8 ,0x7e ), +ILI9881C_COMMAND_INSTR (0xc9 ,0x1d ), +ILI9881C_COMMAND_INSTR (0xca ,0x29 ), +ILI9881C_COMMAND_INSTR (0xcb ,0x6b ), +ILI9881C_COMMAND_INSTR (0xcc ,0x1a ), +ILI9881C_COMMAND_INSTR (0xcd ,0x18 ), +ILI9881C_COMMAND_INSTR (0xce ,0x4b ), +ILI9881C_COMMAND_INSTR (0xcf ,0x20 ), +ILI9881C_COMMAND_INSTR (0xd0 ,0x27 ), +ILI9881C_COMMAND_INSTR (0xd1 ,0x50 ), +ILI9881C_COMMAND_INSTR (0xd2 ,0x64 ), +ILI9881C_COMMAND_INSTR (0xd3 ,0x39 ), + +ILI9881C_SWITCH_PAGE_INSTR (0 ), +ILI9881C_COMMAND_INSTR (0x3a ,0x77 ), +ILI9881C_COMMAND_INSTR (0x36 ,0x00 ), +}; +static inline struct ili9881c *panel_to_ili9881c (struct drm_panel *panel) { return container_of(panel, struct ili9881c, panel);
@@ -2035,9 +2235,19 @@ static int ili9881c_prepare(struct drm_panel *panel)int ret;/* Power the panel */ +if (ctx->iovcc) { + ret =regulator_enable (ctx->iovcc); +if (ret) +return ret; + } + +msleep (5 ); ret =regulator_enable (ctx->power); -if (ret) -return ret; +if (ret) { + mctx.accum_err = ret; + goto disable_iovcc; + } +msleep (5 );/* And reset it */
@@ -2074,6 +2284,9 @@ static int ili9881c_prepare(struct drm_panel *panel) disable_power:regulator_disable (ctx->power); +disable_iovcc: +if (ctx->iovcc) +regulator_disable (ctx->iovcc);return mctx.accum_err; }
@@ -2085,6 +2298,8 @@ static int ili9881c_unprepare(struct drm_panel *panel)mipi_dsi_dcs_set_display_off_multi (&mctx);mipi_dsi_dcs_enter_sleep_mode_multi (&mctx);regulator_disable (ctx->power); +if (ctx->iovcc) +regulator_disable (ctx->iovcc);gpiod_set_value_cansleep (ctx->reset,1 );return 0 ;
@@ -2260,6 +2475,23 @@ static const struct drm_display_mode bsd1218_a101kl68_default_mode = { .height_mm = 170, }; +static const struct drm_display_mode waveshare_7inch_a_mode = { + .clock =83333 , + + .hdisplay =720 , + .hsync_start =720 +120 , + .hsync_end =720 +120 +100 , + .htotal =720 +120 +100 +100 , + + .vdisplay =1280 , + .vsync_start =1280 +10 , + .vsync_end =1280 +10 +10 , + .vtotal =1280 +10 +10 +10 , + + .width_mm =85 , + .height_mm =154 , +}; +static int ili9881c_get_modes (struct drm_panel *panel,struct drm_connector *connector) {
@@ -2329,6 +2561,11 @@ static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi)return dev_err_probe (&dsi->dev,PTR_ERR (ctx->power),"Couldn't get our power regulator\n" ); + ctx->iovcc =devm_regulator_get_optional (&dsi->dev,"iovcc" ); +if (IS_ERR (ctx->iovcc)) +return dev_err_probe (&dsi->dev,PTR_ERR (ctx->iovcc), +"Couldn't get our iovcc regulator\n" ); + ctx->reset =devm_gpiod_get_optional (&dsi->dev,"reset" ,GPIOD_OUT_LOW );if (IS_ERR (ctx->reset)) return dev_err_probe(&dsi->dev, PTR_ERR(ctx->reset),
@@ -2454,6 +2691,15 @@ static const struct ili9881c_desc bsd1218_a101kl68_desc = { .lanes = 4, }; +static const struct ili9881c_desc waveshare_7inch_a_desc = { + .init = waveshare_7inch_a_init, + .init_length =ARRAY_SIZE (waveshare_7inch_a_init), + .mode = &waveshare_7inch_a_mode, + .mode_flags =MIPI_DSI_MODE_VIDEO |MIPI_DSI_MODE_VIDEO_HSE | +MIPI_DSI_MODE_LPM |MIPI_DSI_CLOCK_NON_CONTINUOUS , + .lanes =2 , +}; +static const struct of_device_id ili9881c_of_match[] = { { .compatible ="bananapi,lhr050h41" , .data = &lhr050h41_desc }, { .compatible ="bestar,bsd1218-a101kl68" , .data = &bsd1218_a101kl68_desc },
@@ -2462,6 +2708,7 @@ static const struct of_device_id ili9881c_of_match[] = { { .compatible = "tdo,tl050hdv35", .data = &tl050hdv35_desc }, { .compatible = "wanchanglong,w552946aaa", .data = &w552946aaa_desc }, { .compatible = "wanchanglong,w552946aba", .data = &w552946aba_desc }, + { .compatible = "waveshare,7.0-dsi-touch-a", .data = &waveshare_7inch_a_desc }, { .compatible = "ampire,am8001280g", .data = &am8001280g_desc }, { .compatible = "raspberrypi,dsi-5inch", &rpi_5inch_desc }, { .compatible = "raspberrypi,dsi-7inch", &rpi_7inch_desc },
Signature · 1 line
2.47.3
PATCH v4 3/4 dt-bindings: gpio: describe Waveshare GPIO controller
In reply to Dmitry BaryshkovThe Waveshare DSI TOUCH family of panels has separate on-board GPIO controller, which controls power supplies to the panel and the touch screen and provides reset pins for both the panel and the touchscreen. Also it provides a simple PWM controller for panel backlight.
Add bindings for these GPIO controllers. As overall integration might be not very obvious (and it differs significantly from the bindings used by the original drivers), provide complete example with the on-board regulators and the DSI panel.
--- .../bindings/gpio/waveshare,dsi-touch-gpio.yaml | 100 +++++++++++++++++++++ 1 file changed, 100 insertions(+)
Documentation/devicetree/bindings/gpio/waveshare,dsi-touch-gpio.yaml new file +100 -0
@@ -0,0 +1,100 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/waveshare,dsi-touch-gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Waveshare GPIO controller on DSI TOUCH panels + +maintainers: + - Dmitry Baryshkov <[email protected]> + +description: + Waveshare DSI TOUCH panel kits contain separate GPIO controller for toggling + power supplies and panel / touchscreen resets. + +properties: + compatible: + const: waveshare,dsi-touch-gpio + + reg: + maxItems: 1 + + gpio-controller: true + + '#gpio-cells': + const: 2 + +required: + - compatible + - reg + - gpio-controller + - "#gpio-cells" + +additionalProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + wsgpio: gpio@45 { + compatible = "waveshare,dsi-touch-gpio"; + reg = <0x45>; + gpio-controller; + #gpio-cells = <2>; + }; + }; + + panel_avdd: regulator-panel-avdd { + compatible = "regulator-fixed"; + regulator-name = "panel-avdd"; + gpios = <&wsgpio 0 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + panel_iovcc: regulator-panel-iovcc { + compatible = "regulator-fixed"; + regulator-name = "panel-iovcc"; + gpios = <&wsgpio 4 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + panel_vcc: regulator-panel-vcc { + compatible = "regulator-fixed"; + regulator-name = "panel-vcc"; + gpios = <&wsgpio 8 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-always-on; + }; + + dsi { + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + reg = <0>; + compatible = "waveshare,8.0-dsi-touch-a", "jadard,jd9365da-h3"; + reset-gpios = <&wsgpio 1 GPIO_ACTIVE_LOW>; + vdd-supply = <&panel_avdd>; + vccio-supply = <&panel_iovcc>; + backlight = <&wsgpio>; + + port { + panel_in: endpoint { + remote-endpoint = <&dsi_out>; + }; + }; + }; + + port { + dsi_out: endpoint { + data-lanes = <0 1 2 3>; + remote-endpoint = <&panel_in>; + }; + }; + }; +...
Signature · 1 line
2.47.3
PATCH v4 4/4 gpio: add GPIO controller found on Waveshare DSI TOUCH panels
In reply to Dmitry BaryshkovThe Waveshare DSI TOUCH family of panels has separate on-board GPIO controller, which controls power supplies to the panel and the touch screen and provides reset pins for both the panel and the touchscreen. Also it provides a simple PWM controller for panel backlight. Add support for this GPIO controller.
--- drivers/gpio/Kconfig | 10 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-waveshare-dsi.c | 208 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 219 insertions(+)
drivers/gpio/Kconfig +10 -0
@@ -804,6 +804,16 @@ config GPIO_VISCONTI help Say yes here to support GPIO on Tohisba Visconti. +config GPIO_WAVESHARE_DSI_TOUCH + tristate "Waveshare GPIO controller for DSI panels" + depends on BACKLIGHT_CLASS_DEVICE + depends on I2C + select REGMAP_I2C + help + Enable support for the GPIO and PWM controller found on Waveshare DSI + TOUCH panel kits. It provides GPIOs (used for regulator control and + resets) and backlight support. + config GPIO_WCD934X tristate "Qualcomm Technologies Inc WCD9340/WCD9341 GPIO controller driver" depends on MFD_WCD934X && OF_GPIO
drivers/gpio/Makefile +1 -0
@@ -206,6 +206,7 @@ obj-$(CONFIG_GPIO_VIRTUSER) += gpio-virtuser.o obj-$(CONFIG_GPIO_VIRTIO) += gpio-virtio.o obj-$(CONFIG_GPIO_VISCONTI) += gpio-visconti.o obj-$(CONFIG_GPIO_VX855) += gpio-vx855.o +obj-$(CONFIG_GPIO_WAVESHARE_DSI_TOUCH) += gpio-waveshare-dsi.o obj-$(CONFIG_GPIO_WCD934X) += gpio-wcd934x.o obj-$(CONFIG_GPIO_WHISKEY_COVE) += gpio-wcove.o obj-$(CONFIG_GPIO_WINBOND) += gpio-winbond.o
drivers/gpio/gpio-waveshare-dsi.c new file +208 -0
208 lines not on this page · raw message
Signature · 1 line
2.47.3
Rob Herring (Arm)
maintainerRe: [PATCH v4 3/4] dt-bindings: gpio: describe Waveshare GPIO controller
In reply to Dmitry BaryshkovQuoted 10 lines · Dmitry Baryshkov
The Waveshare DSI TOUCH family of panels has separate on-board GPIO controller, which controls power supplies to the panel and the touch screen and provides reset pins for both the panel and the touchscreen. Also it provides a simple PWM controller for panel backlight.
Add bindings for these GPIO controllers. As overall integration might be not very obvious (and it differs significantly from the bindings used by the original drivers), provide complete example with the on-board regulators and the DSI panel.
Quoted 6 lines
Acked-by Conor Dooley <[email protected]>Signed-off-by Dmitry Baryshkov <[email protected]>--- .../bindings/gpio/waveshare,dsi-touch-gpio.yaml | 100 +++++++++++++++++++++ 1 file changed, 100 insertions(+)
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/gpio/waveshare,dsi-touch-gpio.example.dtb: panel@0 (waveshare,8.0-dsi-touch-a): compatible:0: 'waveshare,8.0-dsi-touch-a' is not one of ['anbernic,rg-ds-display-bottom', 'anbernic,rg-ds-display-top', 'chongzhou,cz101b4001', 'kingdisplay,kd101ne3-40ti', 'melfas,lmfbx101117480', 'radxa,display-10hd-ad001', 'radxa,display-8hd-ad002', 'taiguanck,xti05101-01a']
from schema $id: http://devicetree.org/schemas/display/panel/jadard,jd9365da-h3.yamlDocumentation/devicetree/bindings/gpio/waveshare,dsi-touch-gpio.example.dtb: /example-0/dsi/panel@0: failed to match any schema with compatible: ['waveshare,8.0-dsi-touch-a', 'jadard,jd9365da-h3']
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/[email protected]
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
Re: [PATCH v4 3/4] dt-bindings: gpio: describe Waveshare GPIO controller
Quoted 19 lines · Rob Herring (Arm)
Quoted 10 lines · Dmitry Baryshkov
The Waveshare DSI TOUCH family of panels has separate on-board GPIO controller, which controls power supplies to the panel and the touch screen and provides reset pins for both the panel and the touchscreen. Also it provides a simple PWM controller for panel backlight.
Add bindings for these GPIO controllers. As overall integration might be not very obvious (and it differs significantly from the bindings used by the original drivers), provide complete example with the on-board regulators and the DSI panel.
Quoted 6 lines
Acked-by Conor Dooley <[email protected]>Signed-off-by Dmitry Baryshkov <[email protected]>--- .../bindings/gpio/waveshare,dsi-touch-gpio.yaml | 100 +++++++++++++++++++++ 1 file changed, 100 insertions(+)
Quoted 9 lines
My bot found errors running 'make
dt_binding_check' on your patch:yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/gpio/waveshare,dsi-touch-gpio.example.dtb: panel@0 (waveshare,8.0-dsi-touch-a): compatible:0: 'waveshare,8.0-dsi-touch-a' is not one of ['anbernic,rg-ds-display-bottom', 'anbernic,rg-ds-display-top', 'chongzhou,cz101b4001', 'kingdisplay,kd101ne3-40ti', 'melfas,lmfbx101117480', 'radxa,display-10hd-ad001', 'radxa,display-8hd-ad002', 'taiguanck,xti05101-01a']
from schema $id: http://devicetree.org/schemas/display/panel/jadard,jd9365da-h3.yamlDocumentation/devicetree/bindings/gpio/waveshare,dsi-touch-gpio.example.dtb: /example-0/dsi/panel@0: failed to match any schema with compatible: ['waveshare,8.0-dsi-touch-a', 'jadard,jd9365da-h3']
Sorry, yes. This patch is now a part of drm-misc-next, but is not in -next, until 7.1-rc1.
Quoted 17 lines
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/[email protected]
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
If you already ran 'make
dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note that
DT_SCHEMA_FILEScan be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
Signature · 2 lines
With best wishes Dmitry
Dmitry Baryshkov
AppliedRe: (subset) [PATCH v4 0/4] drm/panel: support Waveshare DSI TOUCH kits
In reply to Dmitry BaryshkovQuoted 8 lines · Dmitry Baryshkov
The Waveshare DSI TOUCH family of DSI panel kits feature different DSI video-mode panels, bundled with the separate controlling circuit, produing necessary voltages from the 3.3V and 5V supplies. Extend panel drivers to support those Waveshare panels and also add GPIO driver for the onboard control circuitry.
[...]
Applied to drm-misc-next, thanks!
[1/4] dt-bindings: display/panel: ilitek,ili9881c: describe Waveshare panel
commit: 7ae674a399b6d83ab9b463adb61cc0b64e298eaf
[2/4] drm/panel: ilitek-ili9881c: support Waveshare 7.0" DSI panel
commit: 4c95b2b7d49edc5846730970cef322a6d8d967baBest regards,
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH v4 2/4] drm/panel: ilitek-ili9881c: support Waveshare 7.0" DSI panel
In reply to Dmitry BaryshkovQuoted 4 lines · Dmitry Baryshkov
Enable support for Waveshare 7.0" DSI TOUCH-A panel. It requires additional voltage regulator, iovcc.
Signed-off-by Dmitry Baryshkov <[email protected]>
Yours,
Linus Walleij