* [PATCH 0/4] Add support for Saef SFTO340XC panel.
@ 2025-04-08 15:26 Kory Maincent
2025-04-08 15:27 ` [PATCH 1/4] dt-bindings: display: panel: ili9881c: Add dsi-lanes property Kory Maincent
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Kory Maincent @ 2025-04-08 15:26 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Thomas Petazzoni, dri-devel, linux-kernel, devicetree,
Kory Maincent
Add support for Saef Technology Limited SFTO340XC LCD panel.
Add alongside the number of lanes configuration in the ili9881c driver
as the board on my desc use the panel with only two lanes.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
Kory Maincent (4):
dt-bindings: display: panel: ili9881c: Add dsi-lanes property
drm/panel: ilitek-ili9881c: Add support for two-lane configuration
dt-bindings: ili9881c: Add Saef SFTO340XC support
drm: panel: Add Saef SFTO340XC LCD panel
.../bindings/display/panel/ilitek,ili9881c.yaml | 6 +
drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 267 ++++++++++++++++++++-
2 files changed, 271 insertions(+), 2 deletions(-)
---
base-commit: 0af2f6be1b4281385b618cb86ad946eded089ac8
change-id: 20250129-feature_sfto340xc-d2b25a5b5748
Best regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/4] dt-bindings: display: panel: ili9881c: Add dsi-lanes property
2025-04-08 15:26 [PATCH 0/4] Add support for Saef SFTO340XC panel Kory Maincent
@ 2025-04-08 15:27 ` Kory Maincent
2025-04-08 15:44 ` Maxime Ripard
2025-04-08 15:27 ` [PATCH 2/4] drm/panel: ilitek-ili9881c: Add support for two-lane configuration Kory Maincent
` (2 subsequent siblings)
3 siblings, 1 reply; 12+ messages in thread
From: Kory Maincent @ 2025-04-08 15:27 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Thomas Petazzoni, dri-devel, linux-kernel, devicetree,
Kory Maincent
Add the dsi-lanes property to specify the number of DSI lanes used by the
panel. This allows configuring the panel for either two, three or four
lanes.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml b/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
index baf5dfe5f5ebdd92f460a78d0e56e1b45e7dd323..e36550616f6aac86c79832a48132ce8c11ebcf7a 100644
--- a/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
+++ b/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
@@ -27,6 +27,11 @@ properties:
reg:
maxItems: 1
+ dsi-lanes:
+ description: Number of DSI lanes to be used must be <2>, <3> or <4>
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [2, 3, 4]
+
backlight: true
power-supply: true
reset-gpios: true
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/4] drm/panel: ilitek-ili9881c: Add support for two-lane configuration
2025-04-08 15:26 [PATCH 0/4] Add support for Saef SFTO340XC panel Kory Maincent
2025-04-08 15:27 ` [PATCH 1/4] dt-bindings: display: panel: ili9881c: Add dsi-lanes property Kory Maincent
@ 2025-04-08 15:27 ` Kory Maincent
2025-04-10 9:34 ` Dmitry Baryshkov
2025-04-08 15:27 ` [PATCH 3/4] dt-bindings: ili9881c: Add Saef SFTO340XC support Kory Maincent
2025-04-08 15:27 ` [PATCH 4/4] drm: panel: Add Saef SFTO340XC LCD panel Kory Maincent
3 siblings, 1 reply; 12+ messages in thread
From: Kory Maincent @ 2025-04-08 15:27 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Thomas Petazzoni, dri-devel, linux-kernel, devicetree,
Kory Maincent
Enable support for two-lane configuration which is done by setting the
LANSEL_SW_EN and LANSEL_SW bits in the Pad Control register.
Use the dsi-lanes device tree parameter to configure the number of lanes.
The default configuration remains set to four lanes.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 35 +++++++++++++++++++++++++--
1 file changed, 33 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
index 28cd7560e5db1d5734b10babdb4e4e553c6e07d0..5c429715159755df2461063dad0971642e2b9041 100644
--- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
+++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
@@ -1263,6 +1263,21 @@ static int ili9881c_send_cmd_data(struct ili9881c *ctx, u8 cmd, u8 data)
return 0;
}
+static int ili9881c_set_lanes_cfg(struct ili9881c *ctx)
+{
+ int ret;
+
+ if (ctx->dsi->lanes != 2)
+ /* Nothing to do */
+ return 0;
+
+ ret = ili9881c_switch_page(ctx, 1);
+ if (ret)
+ return ret;
+
+ return ili9881c_send_cmd_data(ctx, 0xB7, 0x3);
+}
+
static int ili9881c_prepare(struct drm_panel *panel)
{
struct ili9881c *ctx = panel_to_ili9881c(panel);
@@ -1295,6 +1310,10 @@ static int ili9881c_prepare(struct drm_panel *panel)
return ret;
}
+ ret = ili9881c_set_lanes_cfg(ctx);
+ if (ret)
+ return ret;
+
ret = ili9881c_switch_page(ctx, 0);
if (ret)
return ret;
@@ -1504,7 +1523,7 @@ static const struct drm_panel_funcs ili9881c_funcs = {
static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi)
{
struct ili9881c *ctx;
- int ret;
+ int ret, lanes;
ctx = devm_kzalloc(&dsi->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx)
@@ -1545,11 +1564,23 @@ static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi)
if (ret)
return ret;
+ ret = of_property_read_u32(dsi->dev.of_node, "dsi-lanes", &lanes);
+ if (ret == -EINVAL) {
+ lanes = 4;
+ } else if (ret) {
+ dev_err(&dsi->dev, "Failed to get dsi-lanes property (%d)\n",
+ ret);
+ return ret;
+ } else if (lanes < 2 || 4 < lanes) {
+ dev_err(&dsi->dev, "Wrong number of dsi-lanes (%d)\n", lanes);
+ return -EINVAL;
+ }
+
drm_panel_add(&ctx->panel);
dsi->mode_flags = ctx->desc->mode_flags;
dsi->format = MIPI_DSI_FMT_RGB888;
- dsi->lanes = 4;
+ dsi->lanes = lanes;
return mipi_dsi_attach(dsi);
}
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/4] dt-bindings: ili9881c: Add Saef SFTO340XC support
2025-04-08 15:26 [PATCH 0/4] Add support for Saef SFTO340XC panel Kory Maincent
2025-04-08 15:27 ` [PATCH 1/4] dt-bindings: display: panel: ili9881c: Add dsi-lanes property Kory Maincent
2025-04-08 15:27 ` [PATCH 2/4] drm/panel: ilitek-ili9881c: Add support for two-lane configuration Kory Maincent
@ 2025-04-08 15:27 ` Kory Maincent
2025-04-08 16:07 ` Conor Dooley
2025-04-08 15:27 ` [PATCH 4/4] drm: panel: Add Saef SFTO340XC LCD panel Kory Maincent
3 siblings, 1 reply; 12+ messages in thread
From: Kory Maincent @ 2025-04-08 15:27 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Thomas Petazzoni, dri-devel, linux-kernel, devicetree,
Kory Maincent
Document the compatible value for Saef SFTO340XC panels.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml b/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
index e36550616f6aac86c79832a48132ce8c11ebcf7a..7e47564cf1f18a9ea9e64deded7a7edbff133406 100644
--- a/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
+++ b/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
@@ -19,6 +19,7 @@ properties:
- ampire,am8001280g
- bananapi,lhr050h41
- feixin,k101-im2byl02
+ - saef,sfto340xc
- startek,kd050hdfia020
- tdo,tl050hdv35
- wanchanglong,w552946aba
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/4] drm: panel: Add Saef SFTO340XC LCD panel
2025-04-08 15:26 [PATCH 0/4] Add support for Saef SFTO340XC panel Kory Maincent
` (2 preceding siblings ...)
2025-04-08 15:27 ` [PATCH 3/4] dt-bindings: ili9881c: Add Saef SFTO340XC support Kory Maincent
@ 2025-04-08 15:27 ` Kory Maincent
3 siblings, 0 replies; 12+ messages in thread
From: Kory Maincent @ 2025-04-08 15:27 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Thomas Petazzoni, dri-devel, linux-kernel, devicetree,
Kory Maincent
Add support for Saef Technology Limited SFTO340XC LCD panel.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 232 ++++++++++++++++++++++++++
1 file changed, 232 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
index 5c429715159755df2461063dad0971642e2b9041..8ea837ff3f7ad1f4b8ba5f2e9f50472a16afcbae 100644
--- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
+++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
@@ -43,6 +43,7 @@ struct ili9881c_desc {
const struct drm_display_mode *mode;
const unsigned long mode_flags;
u8 default_address_mode;
+ const unsigned int msleep_delay;
};
struct ili9881c {
@@ -457,6 +458,207 @@ static const struct ili9881c_instr k101_im2byl02_init[] = {
ILI9881C_COMMAND_INSTR(0xD3, 0x3F), /* VN0 */
};
+static const struct ili9881c_instr sfto340xc_init[] = {
+ ILI9881C_SWITCH_PAGE_INSTR(3),
+ ILI9881C_COMMAND_INSTR(0x01, 0x00),
+ ILI9881C_COMMAND_INSTR(0x02, 0x01),
+ ILI9881C_COMMAND_INSTR(0x03, 0x73),
+ ILI9881C_COMMAND_INSTR(0x04, 0x03),
+ ILI9881C_COMMAND_INSTR(0x05, 0x00),
+ ILI9881C_COMMAND_INSTR(0x06, 0x0A),
+ ILI9881C_COMMAND_INSTR(0x07, 0x05),
+ ILI9881C_COMMAND_INSTR(0x08, 0x00),
+ ILI9881C_COMMAND_INSTR(0x09, 0x40),
+ ILI9881C_COMMAND_INSTR(0x0a, 0x00),
+ ILI9881C_COMMAND_INSTR(0x0B, 0x00),
+ ILI9881C_COMMAND_INSTR(0x0C, 0x00),
+ ILI9881C_COMMAND_INSTR(0x0D, 0x40),
+ ILI9881C_COMMAND_INSTR(0x0E, 0x00),
+ ILI9881C_COMMAND_INSTR(0x0f, 0x3c),
+ ILI9881C_COMMAND_INSTR(0x10, 0x3c),
+ 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, 0xC0),
+ 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, 0xB3),
+ 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, 0x23),
+ ILI9881C_COMMAND_INSTR(0x35, 0x00),
+ ILI9881C_COMMAND_INSTR(0x36, 0x00),
+ ILI9881C_COMMAND_INSTR(0x37, 0x08),
+ 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, 0x01),
+ ILI9881C_COMMAND_INSTR(0x51, 0x23),
+ ILI9881C_COMMAND_INSTR(0x52, 0x44),
+ ILI9881C_COMMAND_INSTR(0x53, 0x67),
+ ILI9881C_COMMAND_INSTR(0x54, 0x89),
+ ILI9881C_COMMAND_INSTR(0x55, 0xAB),
+ ILI9881C_COMMAND_INSTR(0x56, 0x01),
+ ILI9881C_COMMAND_INSTR(0x57, 0x23),
+ ILI9881C_COMMAND_INSTR(0x58, 0x45),
+ ILI9881C_COMMAND_INSTR(0x59, 0x67),
+ ILI9881C_COMMAND_INSTR(0x5A, 0x89),
+ ILI9881C_COMMAND_INSTR(0x5B, 0xAB),
+ ILI9881C_COMMAND_INSTR(0x5C, 0xCD),
+ ILI9881C_COMMAND_INSTR(0x5D, 0xEF),
+ ILI9881C_COMMAND_INSTR(0x5E, 0x01),
+ ILI9881C_COMMAND_INSTR(0x5F, 0x00),
+ ILI9881C_COMMAND_INSTR(0x60, 0x00),
+ ILI9881C_COMMAND_INSTR(0x61, 0x01),
+ ILI9881C_COMMAND_INSTR(0x62, 0x01),
+ ILI9881C_COMMAND_INSTR(0x63, 0x08),
+ ILI9881C_COMMAND_INSTR(0x64, 0x0E),
+ ILI9881C_COMMAND_INSTR(0x65, 0x0E),
+ ILI9881C_COMMAND_INSTR(0x66, 0x0F),
+ ILI9881C_COMMAND_INSTR(0x67, 0x0F),
+ ILI9881C_COMMAND_INSTR(0x68, 0x0C),
+ ILI9881C_COMMAND_INSTR(0x69, 0x0C),
+ ILI9881C_COMMAND_INSTR(0x6A, 0x0D),
+ ILI9881C_COMMAND_INSTR(0x6B, 0x0D),
+ ILI9881C_COMMAND_INSTR(0x6C, 0x02),
+ ILI9881C_COMMAND_INSTR(0x6D, 0x02),
+ ILI9881C_COMMAND_INSTR(0x6E, 0x14),
+ ILI9881C_COMMAND_INSTR(0x6F, 0x14),
+ ILI9881C_COMMAND_INSTR(0x70, 0x15),
+ ILI9881C_COMMAND_INSTR(0x71, 0x15),
+ ILI9881C_COMMAND_INSTR(0x72, 0x06),
+ ILI9881C_COMMAND_INSTR(0x73, 0x07),
+ ILI9881C_COMMAND_INSTR(0x74, 0x02),
+ ILI9881C_COMMAND_INSTR(0x75, 0x00),
+ ILI9881C_COMMAND_INSTR(0x76, 0x00),
+ ILI9881C_COMMAND_INSTR(0x77, 0x01),
+ ILI9881C_COMMAND_INSTR(0x78, 0x01),
+ ILI9881C_COMMAND_INSTR(0x79, 0x08),
+ ILI9881C_COMMAND_INSTR(0x7A, 0x0D),
+ ILI9881C_COMMAND_INSTR(0x7B, 0x0D),
+ ILI9881C_COMMAND_INSTR(0x7C, 0x0C),
+ ILI9881C_COMMAND_INSTR(0x7D, 0x0C),
+ ILI9881C_COMMAND_INSTR(0x7E, 0x0F),
+ ILI9881C_COMMAND_INSTR(0x7F, 0x0F),
+ ILI9881C_COMMAND_INSTR(0x80, 0x0E),
+ ILI9881C_COMMAND_INSTR(0x81, 0x0E),
+ ILI9881C_COMMAND_INSTR(0x82, 0x02),
+ ILI9881C_COMMAND_INSTR(0x83, 0x02),
+ ILI9881C_COMMAND_INSTR(0x84, 0x14),
+ ILI9881C_COMMAND_INSTR(0x85, 0x14),
+ ILI9881C_COMMAND_INSTR(0x86, 0x15),
+ ILI9881C_COMMAND_INSTR(0x87, 0x15),
+ ILI9881C_COMMAND_INSTR(0x88, 0x07),
+ ILI9881C_COMMAND_INSTR(0x89, 0x06),
+ ILI9881C_COMMAND_INSTR(0x8A, 0x02),
+ ILI9881C_SWITCH_PAGE_INSTR(4),
+ ILI9881C_COMMAND_INSTR(0x6C, 0x15),
+ ILI9881C_COMMAND_INSTR(0x6E, 0x1a),
+ ILI9881C_COMMAND_INSTR(0x6F, 0x35),
+ ILI9881C_COMMAND_INSTR(0x8D, 0x1f),
+ ILI9881C_COMMAND_INSTR(0x87, 0xBA),
+ ILI9881C_COMMAND_INSTR(0x26, 0x76),
+ ILI9881C_COMMAND_INSTR(0xB2, 0xD1),
+ ILI9881C_COMMAND_INSTR(0x3B, 0x98),
+ ILI9881C_COMMAND_INSTR(0x3A, 0x24),
+ ILI9881C_COMMAND_INSTR(0x35, 0x1F),
+ ILI9881C_COMMAND_INSTR(0xB5, 0x27),
+ ILI9881C_COMMAND_INSTR(0x31, 0x75),
+ ILI9881C_COMMAND_INSTR(0x30, 0x03),
+ ILI9881C_COMMAND_INSTR(0x33, 0x14),
+ ILI9881C_COMMAND_INSTR(0x38, 0x01),
+ ILI9881C_COMMAND_INSTR(0x39, 0x00),
+ ILI9881C_SWITCH_PAGE_INSTR(1),
+ ILI9881C_COMMAND_INSTR(0x22, 0x0a),
+ ILI9881C_COMMAND_INSTR(0x2E, 0x50),
+ ILI9881C_COMMAND_INSTR(0x2F, 0x00),
+ ILI9881C_COMMAND_INSTR(0x31, 0x00),
+ ILI9881C_COMMAND_INSTR(0x53, 0x4a),
+ ILI9881C_COMMAND_INSTR(0x55, 0x65),
+ ILI9881C_COMMAND_INSTR(0x50, 0xbf),
+ ILI9881C_COMMAND_INSTR(0x51, 0xbf),
+ ILI9881C_COMMAND_INSTR(0x60, 0x14),
+ ILI9881C_COMMAND_INSTR(0x61, 0x00),
+ ILI9881C_COMMAND_INSTR(0x62, 0x20),
+ ILI9881C_COMMAND_INSTR(0x63, 0x10),
+ ILI9881C_COMMAND_INSTR(0xA0, 0x04),
+ ILI9881C_COMMAND_INSTR(0xA1, 0x39),
+ ILI9881C_COMMAND_INSTR(0xA2, 0x48),
+ ILI9881C_COMMAND_INSTR(0xA3, 0x13),
+ ILI9881C_COMMAND_INSTR(0xA4, 0x17),
+ ILI9881C_COMMAND_INSTR(0xA5, 0x29),
+ ILI9881C_COMMAND_INSTR(0xA6, 0x1c),
+ ILI9881C_COMMAND_INSTR(0xA7, 0x1d),
+ ILI9881C_COMMAND_INSTR(0xA8, 0xbb),
+ ILI9881C_COMMAND_INSTR(0xA9, 0x16),
+ ILI9881C_COMMAND_INSTR(0xAA, 0x24),
+ ILI9881C_COMMAND_INSTR(0xAB, 0x9e),
+ ILI9881C_COMMAND_INSTR(0xAC, 0x16),
+ ILI9881C_COMMAND_INSTR(0xAD, 0x14),
+ ILI9881C_COMMAND_INSTR(0xAE, 0x48),
+ ILI9881C_COMMAND_INSTR(0xAF, 0x1c),
+ ILI9881C_COMMAND_INSTR(0xB0, 0x22),
+ ILI9881C_COMMAND_INSTR(0xB1, 0x51),
+ ILI9881C_COMMAND_INSTR(0xB2, 0x60),
+ ILI9881C_COMMAND_INSTR(0xB3, 0x32),
+ ILI9881C_COMMAND_INSTR(0xC0, 0x04),
+ ILI9881C_COMMAND_INSTR(0xC1, 0x39),
+ ILI9881C_COMMAND_INSTR(0xC2, 0x48),
+ ILI9881C_COMMAND_INSTR(0xC3, 0x13),
+ ILI9881C_COMMAND_INSTR(0xC4, 0x17),
+ ILI9881C_COMMAND_INSTR(0xC5, 0x29),
+ ILI9881C_COMMAND_INSTR(0xC6, 0x1c),
+ ILI9881C_COMMAND_INSTR(0xC7, 0x1d),
+ ILI9881C_COMMAND_INSTR(0xC8, 0xbb),
+ ILI9881C_COMMAND_INSTR(0xC9, 0x16),
+ ILI9881C_COMMAND_INSTR(0xCA, 0x24),
+ ILI9881C_COMMAND_INSTR(0xCB, 0x9e),
+ ILI9881C_COMMAND_INSTR(0xCC, 0x16),
+ ILI9881C_COMMAND_INSTR(0xCD, 0x14),
+ ILI9881C_COMMAND_INSTR(0xCE, 0x48),
+ ILI9881C_COMMAND_INSTR(0xCF, 0x1c),
+ ILI9881C_COMMAND_INSTR(0xD0, 0x22),
+ ILI9881C_COMMAND_INSTR(0xD1, 0x51),
+ ILI9881C_COMMAND_INSTR(0xD2, 0x60),
+ ILI9881C_COMMAND_INSTR(0xD3, 0x32),
+};
+
static const struct ili9881c_instr kd050hdfia020_init[] = {
ILI9881C_SWITCH_PAGE_INSTR(3),
ILI9881C_COMMAND_INSTR(0x01, 0x00),
@@ -1334,6 +1536,9 @@ static int ili9881c_prepare(struct drm_panel *panel)
if (ret)
return ret;
+ if (ctx->desc->msleep_delay)
+ msleep(ctx->desc->msleep_delay);
+
return 0;
}
@@ -1400,6 +1605,23 @@ static const struct drm_display_mode k101_im2byl02_default_mode = {
.height_mm = 217,
};
+static const struct drm_display_mode sfto340xc_default_mode = {
+ .clock = 34000,
+
+ .hdisplay = 800,
+ .hsync_start = 800 + 10,
+ .hsync_end = 800 + 10 + 5,
+ .htotal = 800 + 10 + 5 + 10,
+
+ .vdisplay = 800,
+ .vsync_start = 800 + 10,
+ .vsync_end = 800 + 10 + 5,
+ .vtotal = 800 + 10 + 5 + 10,
+
+ .width_mm = 87,
+ .height_mm = 87,
+};
+
static const struct drm_display_mode kd050hdfia020_default_mode = {
.clock = 62000,
@@ -1607,6 +1829,15 @@ static const struct ili9881c_desc k101_im2byl02_desc = {
.mode_flags = MIPI_DSI_MODE_VIDEO_SYNC_PULSE,
};
+static const struct ili9881c_desc sfto340xc_desc = {
+ .init = sfto340xc_init,
+ .init_length = ARRAY_SIZE(sfto340xc_init),
+ .mode = &sfto340xc_default_mode,
+ .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
+ MIPI_DSI_MODE_LPM | MIPI_DSI_CLOCK_NON_CONTINUOUS,
+ .msleep_delay = 100,
+};
+
static const struct ili9881c_desc kd050hdfia020_desc = {
.init = kd050hdfia020_init,
.init_length = ARRAY_SIZE(kd050hdfia020_init),
@@ -1643,6 +1874,7 @@ static const struct ili9881c_desc am8001280g_desc = {
static const struct of_device_id ili9881c_of_match[] = {
{ .compatible = "bananapi,lhr050h41", .data = &lhr050h41_desc },
{ .compatible = "feixin,k101-im2byl02", .data = &k101_im2byl02_desc },
+ { .compatible = "saef,sfto340xc", .data = &sfto340xc_desc },
{ .compatible = "startek,kd050hdfia020", .data = &kd050hdfia020_desc },
{ .compatible = "tdo,tl050hdv35", .data = &tl050hdv35_desc },
{ .compatible = "wanchanglong,w552946aba", .data = &w552946aba_desc },
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 1/4] dt-bindings: display: panel: ili9881c: Add dsi-lanes property
2025-04-08 15:27 ` [PATCH 1/4] dt-bindings: display: panel: ili9881c: Add dsi-lanes property Kory Maincent
@ 2025-04-08 15:44 ` Maxime Ripard
2025-04-09 9:28 ` Kory Maincent
0 siblings, 1 reply; 12+ messages in thread
From: Maxime Ripard @ 2025-04-08 15:44 UTC (permalink / raw)
To: Kory Maincent
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thomas Petazzoni, dri-devel,
linux-kernel, devicetree
[-- Attachment #1: Type: text/plain, Size: 1145 bytes --]
hi,
On Tue, Apr 08, 2025 at 05:27:00PM +0200, Kory Maincent wrote:
> Add the dsi-lanes property to specify the number of DSI lanes used by the
> panel. This allows configuring the panel for either two, three or four
> lanes.
>
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> ---
> Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml b/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
> index baf5dfe5f5ebdd92f460a78d0e56e1b45e7dd323..e36550616f6aac86c79832a48132ce8c11ebcf7a 100644
> --- a/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
> @@ -27,6 +27,11 @@ properties:
> reg:
> maxItems: 1
>
> + dsi-lanes:
> + description: Number of DSI lanes to be used must be <2>, <3> or <4>
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [2, 3, 4]
> +
We have the data-lanes property for that already
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/4] dt-bindings: ili9881c: Add Saef SFTO340XC support
2025-04-08 15:27 ` [PATCH 3/4] dt-bindings: ili9881c: Add Saef SFTO340XC support Kory Maincent
@ 2025-04-08 16:07 ` Conor Dooley
0 siblings, 0 replies; 12+ messages in thread
From: Conor Dooley @ 2025-04-08 16:07 UTC (permalink / raw)
To: Kory Maincent
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thomas Petazzoni, dri-devel,
linux-kernel, devicetree
[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]
On Tue, Apr 08, 2025 at 05:27:02PM +0200, Kory Maincent wrote:
> Document the compatible value for Saef SFTO340XC panels.
>
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
> ---
> Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml b/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
> index e36550616f6aac86c79832a48132ce8c11ebcf7a..7e47564cf1f18a9ea9e64deded7a7edbff133406 100644
> --- a/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
> @@ -19,6 +19,7 @@ properties:
> - ampire,am8001280g
> - bananapi,lhr050h41
> - feixin,k101-im2byl02
> + - saef,sfto340xc
> - startek,kd050hdfia020
> - tdo,tl050hdv35
> - wanchanglong,w552946aba
>
> --
> 2.34.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/4] dt-bindings: display: panel: ili9881c: Add dsi-lanes property
2025-04-08 15:44 ` Maxime Ripard
@ 2025-04-09 9:28 ` Kory Maincent
2025-04-10 9:33 ` Dmitry Baryshkov
0 siblings, 1 reply; 12+ messages in thread
From: Kory Maincent @ 2025-04-09 9:28 UTC (permalink / raw)
To: Maxime Ripard
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thomas Petazzoni, dri-devel,
linux-kernel, devicetree
On Tue, 8 Apr 2025 17:44:32 +0200
Maxime Ripard <mripard@kernel.org> wrote:
> hi,
>
> On Tue, Apr 08, 2025 at 05:27:00PM +0200, Kory Maincent wrote:
> > Add the dsi-lanes property to specify the number of DSI lanes used by the
> > panel. This allows configuring the panel for either two, three or four
> > lanes.
> >
> > Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> > ---
> > Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml | 5
> > +++++ 1 file changed, 5 insertions(+)
> >
> > diff --git
> > a/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
> > b/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
> > index
> > baf5dfe5f5ebdd92f460a78d0e56e1b45e7dd323..e36550616f6aac86c79832a48132ce8c11ebcf7a
> > 100644 ---
> > a/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml +++
> > b/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml @@
> > -27,6 +27,11 @@ properties: reg: maxItems: 1
> > + dsi-lanes:
> > + description: Number of DSI lanes to be used must be <2>, <3> or <4>
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + enum: [2, 3, 4]
> > +
>
> We have the data-lanes property for that already
Indeed but there is no such usage in panel bindings, only in bridge bindings.
You are saying that I should add something like that:
port:
$ref: /schemas/graph.yaml#/properties/port
properties:
endpoint:
$ref: /schemas/media/video-interfaces.yaml#
unevaluatedProperties: false
data-lanes:
minItems: 2
maxItems: 4
And use drm_of_get_data_lanes_count in the drivers.
If we do so, maybe this binding should land in panel-common.yaml instead?
Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/4] dt-bindings: display: panel: ili9881c: Add dsi-lanes property
2025-04-09 9:28 ` Kory Maincent
@ 2025-04-10 9:33 ` Dmitry Baryshkov
2025-04-10 9:47 ` Dmitry Baryshkov
0 siblings, 1 reply; 12+ messages in thread
From: Dmitry Baryshkov @ 2025-04-10 9:33 UTC (permalink / raw)
To: Kory Maincent
Cc: Maxime Ripard, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thomas Petazzoni, dri-devel,
linux-kernel, devicetree
On Wed, Apr 09, 2025 at 11:28:46AM +0200, Kory Maincent wrote:
> On Tue, 8 Apr 2025 17:44:32 +0200
> Maxime Ripard <mripard@kernel.org> wrote:
>
> > hi,
> >
> > On Tue, Apr 08, 2025 at 05:27:00PM +0200, Kory Maincent wrote:
> > > Add the dsi-lanes property to specify the number of DSI lanes used by the
> > > panel. This allows configuring the panel for either two, three or four
> > > lanes.
> > >
> > > Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> > > ---
> > > Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml | 5
> > > +++++ 1 file changed, 5 insertions(+)
> > >
> > > diff --git
> > > a/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
> > > b/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
> > > index
> > > baf5dfe5f5ebdd92f460a78d0e56e1b45e7dd323..e36550616f6aac86c79832a48132ce8c11ebcf7a
> > > 100644 ---
> > > a/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml +++
> > > b/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml @@
> > > -27,6 +27,11 @@ properties: reg: maxItems: 1
> > > + dsi-lanes:
> > > + description: Number of DSI lanes to be used must be <2>, <3> or <4>
> > > + $ref: /schemas/types.yaml#/definitions/uint32
> > > + enum: [2, 3, 4]
> > > +
> >
> > We have the data-lanes property for that already
>
> Indeed but there is no such usage in panel bindings, only in bridge bindings.
It is expected that the DSI host sets mipi_dsi_device::lanes correctly.
If it is not the case, please fix the DSI host driver. The panel driver
can then use this data field in the probe function.
>
> You are saying that I should add something like that:
> port:
> $ref: /schemas/graph.yaml#/properties/port
>
> properties:
> endpoint:
> $ref: /schemas/media/video-interfaces.yaml#
> unevaluatedProperties: false
>
> data-lanes:
> minItems: 2
> maxItems: 4
>
> And use drm_of_get_data_lanes_count in the drivers.
>
> If we do so, maybe this binding should land in panel-common.yaml instead?
>
> Regards,
> --
> Köry Maincent, Bootlin
> Embedded Linux and kernel engineering
> https://bootlin.com
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/4] drm/panel: ilitek-ili9881c: Add support for two-lane configuration
2025-04-08 15:27 ` [PATCH 2/4] drm/panel: ilitek-ili9881c: Add support for two-lane configuration Kory Maincent
@ 2025-04-10 9:34 ` Dmitry Baryshkov
2025-04-10 9:47 ` Dmitry Baryshkov
0 siblings, 1 reply; 12+ messages in thread
From: Dmitry Baryshkov @ 2025-04-10 9:34 UTC (permalink / raw)
To: Kory Maincent
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thomas Petazzoni, dri-devel,
linux-kernel, devicetree
On Tue, Apr 08, 2025 at 05:27:01PM +0200, Kory Maincent wrote:
> Enable support for two-lane configuration which is done by setting the
> LANSEL_SW_EN and LANSEL_SW bits in the Pad Control register.
>
> Use the dsi-lanes device tree parameter to configure the number of lanes.
> The default configuration remains set to four lanes.
>
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> ---
> drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 35 +++++++++++++++++++++++++--
> 1 file changed, 33 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
> index 28cd7560e5db1d5734b10babdb4e4e553c6e07d0..5c429715159755df2461063dad0971642e2b9041 100644
> --- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
> +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
> @@ -1263,6 +1263,21 @@ static int ili9881c_send_cmd_data(struct ili9881c *ctx, u8 cmd, u8 data)
> return 0;
> }
>
> +static int ili9881c_set_lanes_cfg(struct ili9881c *ctx)
> +{
> + int ret;
> +
> + if (ctx->dsi->lanes != 2)
> + /* Nothing to do */
> + return 0;
> +
> + ret = ili9881c_switch_page(ctx, 1);
> + if (ret)
> + return ret;
> +
> + return ili9881c_send_cmd_data(ctx, 0xB7, 0x3);
> +}
> +
> static int ili9881c_prepare(struct drm_panel *panel)
> {
> struct ili9881c *ctx = panel_to_ili9881c(panel);
> @@ -1295,6 +1310,10 @@ static int ili9881c_prepare(struct drm_panel *panel)
> return ret;
> }
>
> + ret = ili9881c_set_lanes_cfg(ctx);
> + if (ret)
> + return ret;
> +
> ret = ili9881c_switch_page(ctx, 0);
> if (ret)
> return ret;
> @@ -1504,7 +1523,7 @@ static const struct drm_panel_funcs ili9881c_funcs = {
> static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi)
> {
> struct ili9881c *ctx;
> - int ret;
> + int ret, lanes;
>
> ctx = devm_kzalloc(&dsi->dev, sizeof(*ctx), GFP_KERNEL);
> if (!ctx)
> @@ -1545,11 +1564,23 @@ static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi)
> if (ret)
> return ret;
>
> + ret = of_property_read_u32(dsi->dev.of_node, "dsi-lanes", &lanes);
Use dsi->lanes instead.
> + if (ret == -EINVAL) {
> + lanes = 4;
> + } else if (ret) {
> + dev_err(&dsi->dev, "Failed to get dsi-lanes property (%d)\n",
> + ret);
> + return ret;
> + } else if (lanes < 2 || 4 < lanes) {
> + dev_err(&dsi->dev, "Wrong number of dsi-lanes (%d)\n", lanes);
> + return -EINVAL;
> + }
> +
> drm_panel_add(&ctx->panel);
>
> dsi->mode_flags = ctx->desc->mode_flags;
> dsi->format = MIPI_DSI_FMT_RGB888;
> - dsi->lanes = 4;
> + dsi->lanes = lanes;
>
> return mipi_dsi_attach(dsi);
> }
>
> --
> 2.34.1
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/4] dt-bindings: display: panel: ili9881c: Add dsi-lanes property
2025-04-10 9:33 ` Dmitry Baryshkov
@ 2025-04-10 9:47 ` Dmitry Baryshkov
0 siblings, 0 replies; 12+ messages in thread
From: Dmitry Baryshkov @ 2025-04-10 9:47 UTC (permalink / raw)
To: Kory Maincent
Cc: Maxime Ripard, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thomas Petazzoni, dri-devel,
linux-kernel, devicetree
On Thu, Apr 10, 2025 at 12:33:35PM +0300, Dmitry Baryshkov wrote:
> On Wed, Apr 09, 2025 at 11:28:46AM +0200, Kory Maincent wrote:
> > On Tue, 8 Apr 2025 17:44:32 +0200
> > Maxime Ripard <mripard@kernel.org> wrote:
> >
> > > hi,
> > >
> > > On Tue, Apr 08, 2025 at 05:27:00PM +0200, Kory Maincent wrote:
> > > > Add the dsi-lanes property to specify the number of DSI lanes used by the
> > > > panel. This allows configuring the panel for either two, three or four
> > > > lanes.
> > > >
> > > > Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> > > > ---
> > > > Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml | 5
> > > > +++++ 1 file changed, 5 insertions(+)
> > > >
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
> > > > b/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
> > > > index
> > > > baf5dfe5f5ebdd92f460a78d0e56e1b45e7dd323..e36550616f6aac86c79832a48132ce8c11ebcf7a
> > > > 100644 ---
> > > > a/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml +++
> > > > b/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml @@
> > > > -27,6 +27,11 @@ properties: reg: maxItems: 1
> > > > + dsi-lanes:
> > > > + description: Number of DSI lanes to be used must be <2>, <3> or <4>
> > > > + $ref: /schemas/types.yaml#/definitions/uint32
> > > > + enum: [2, 3, 4]
> > > > +
> > >
> > > We have the data-lanes property for that already
> >
> > Indeed but there is no such usage in panel bindings, only in bridge bindings.
>
> It is expected that the DSI host sets mipi_dsi_device::lanes correctly.
> If it is not the case, please fix the DSI host driver. The panel driver
> can then use this data field in the probe function.
And I should have refreshed my memory before writing the comment... It
is checked by DSI host rather than being set by it.
>
> >
> > You are saying that I should add something like that:
> > port:
> > $ref: /schemas/graph.yaml#/properties/port
> >
> > properties:
> > endpoint:
> > $ref: /schemas/media/video-interfaces.yaml#
> > unevaluatedProperties: false
> >
> > data-lanes:
> > minItems: 2
> > maxItems: 4
> >
> > And use drm_of_get_data_lanes_count in the drivers.
Yes.
> >
> > If we do so, maybe this binding should land in panel-common.yaml instead?
I'd say, no, because some panels might support single-lane config. You
will end up tuning the property in your bindings too.
> >
> > Regards,
> > --
> > Köry Maincent, Bootlin
> > Embedded Linux and kernel engineering
> > https://bootlin.com
>
> --
> With best wishes
> Dmitry
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/4] drm/panel: ilitek-ili9881c: Add support for two-lane configuration
2025-04-10 9:34 ` Dmitry Baryshkov
@ 2025-04-10 9:47 ` Dmitry Baryshkov
0 siblings, 0 replies; 12+ messages in thread
From: Dmitry Baryshkov @ 2025-04-10 9:47 UTC (permalink / raw)
To: Kory Maincent
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thomas Petazzoni, dri-devel,
linux-kernel, devicetree
On Thu, Apr 10, 2025 at 12:34:15PM +0300, Dmitry Baryshkov wrote:
> On Tue, Apr 08, 2025 at 05:27:01PM +0200, Kory Maincent wrote:
> > Enable support for two-lane configuration which is done by setting the
> > LANSEL_SW_EN and LANSEL_SW bits in the Pad Control register.
> >
> > Use the dsi-lanes device tree parameter to configure the number of lanes.
> > The default configuration remains set to four lanes.
> >
> > Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> > ---
> > drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 35 +++++++++++++++++++++++++--
> > 1 file changed, 33 insertions(+), 2 deletions(-)
> >
> > @@ -1504,7 +1523,7 @@ static const struct drm_panel_funcs ili9881c_funcs = {
> > static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi)
> > {
> > struct ili9881c *ctx;
> > - int ret;
> > + int ret, lanes;
> >
> > ctx = devm_kzalloc(&dsi->dev, sizeof(*ctx), GFP_KERNEL);
> > if (!ctx)
> > @@ -1545,11 +1564,23 @@ static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi)
> > if (ret)
> > return ret;
> >
> > + ret = of_property_read_u32(dsi->dev.of_node, "dsi-lanes", &lanes);
>
> Use dsi->lanes instead.
Please ignore this comment :-)
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2025-04-10 9:47 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-08 15:26 [PATCH 0/4] Add support for Saef SFTO340XC panel Kory Maincent
2025-04-08 15:27 ` [PATCH 1/4] dt-bindings: display: panel: ili9881c: Add dsi-lanes property Kory Maincent
2025-04-08 15:44 ` Maxime Ripard
2025-04-09 9:28 ` Kory Maincent
2025-04-10 9:33 ` Dmitry Baryshkov
2025-04-10 9:47 ` Dmitry Baryshkov
2025-04-08 15:27 ` [PATCH 2/4] drm/panel: ilitek-ili9881c: Add support for two-lane configuration Kory Maincent
2025-04-10 9:34 ` Dmitry Baryshkov
2025-04-10 9:47 ` Dmitry Baryshkov
2025-04-08 15:27 ` [PATCH 3/4] dt-bindings: ili9881c: Add Saef SFTO340XC support Kory Maincent
2025-04-08 16:07 ` Conor Dooley
2025-04-08 15:27 ` [PATCH 4/4] drm: panel: Add Saef SFTO340XC LCD panel Kory Maincent
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox