* [PATCH v2 0/3] Panel HIMAX support for Microchip's AC40T08A MIPI display
@ 2024-07-01 8:58 Manikandan Muralidharan
2024-07-01 8:58 ` [PATCH v2 1/3] dt-bindings: display: himax-hx8394: Add Microchip AC40T08A MIPI Display panel Manikandan Muralidharan
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Manikandan Muralidharan @ 2024-07-01 8:58 UTC (permalink / raw)
To: megi, javierm, neil.armstrong, quic_jesszhan, sam, airlied,
daniel, maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt,
conor+dt, dri-devel, devicetree, linux-kernel
Cc: manikandan.m
This patch series adds panel himax display controller support for the
Microchip's AC40T08A MIPI display.
yaml file is validated using the following commands
make dt_binding_check DT_SCHEMA_FILES=<converted_yaml_file>
make CHECK_DTBS=y DT_SCHEMA_FILES=<converted_yaml_file>
Changelogs are available in respective patches.
Manikandan Muralidharan (3):
dt-bindings: display: himax-hx8394: Add Microchip AC40T08A MIPI
Display panel
drm/panel: himax-hx8394: switch to devm_gpiod_get_optional() for
reset_gpio
drm/panel: himax-hx8394: Add Support for Microchip AC40T08A MIPI
Display Panel
.../bindings/display/panel/himax,hx8394.yaml | 17 +-
drivers/gpu/drm/panel/panel-himax-hx8394.c | 153 +++++++++++++++++-
2 files changed, 165 insertions(+), 5 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 1/3] dt-bindings: display: himax-hx8394: Add Microchip AC40T08A MIPI Display panel
2024-07-01 8:58 [PATCH v2 0/3] Panel HIMAX support for Microchip's AC40T08A MIPI display Manikandan Muralidharan
@ 2024-07-01 8:58 ` Manikandan Muralidharan
2024-07-01 10:03 ` Conor Dooley
2024-07-01 8:58 ` [PATCH v2 2/3] drm/panel: himax-hx8394: switch to devm_gpiod_get_optional() for reset_gpio Manikandan Muralidharan
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Manikandan Muralidharan @ 2024-07-01 8:58 UTC (permalink / raw)
To: megi, javierm, neil.armstrong, quic_jesszhan, sam, airlied,
daniel, maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt,
conor+dt, dri-devel, devicetree, linux-kernel
Cc: manikandan.m
Add compatible string for the Microchip's AC40T08A MIPI Display
panel.This panel uses a Himax HX8394 display controller.
The reset line is not populated and leads to driver probe issues,
thus add conditional block to narrow reset-gpio property per variant.
Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
---
changes in v2:
- re-order compatible string alphabetically.
- Add conditional block to narrow reset-gpio property from required
list based on compatible string check
---
.../bindings/display/panel/himax,hx8394.yaml | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml b/Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml
index 644387e4fb6f..75ccabff308b 100644
--- a/Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml
+++ b/Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml
@@ -15,14 +15,12 @@ description:
such as the HannStar HSD060BHW4 720x1440 TFT LCD panel connected with
a MIPI-DSI video interface.
-allOf:
- - $ref: panel-common.yaml#
-
properties:
compatible:
items:
- enum:
- hannstar,hsd060bhw4
+ - microchip,ac40t08a-mipi-panel
- powkiddy,x55-panel
- const: himax,hx8394
@@ -46,7 +44,6 @@ properties:
required:
- compatible
- reg
- - reset-gpios
- backlight
- port
- vcc-supply
@@ -54,6 +51,18 @@ required:
additionalProperties: false
+allOf:
+ - $ref: panel-common.yaml#
+ - if:
+ not:
+ properties:
+ compatible:
+ enum:
+ - microchip,ac40t08a-mipi-panel
+ then:
+ required:
+ - reset-gpios
+
examples:
- |
#include <dt-bindings/gpio/gpio.h>
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 2/3] drm/panel: himax-hx8394: switch to devm_gpiod_get_optional() for reset_gpio
2024-07-01 8:58 [PATCH v2 0/3] Panel HIMAX support for Microchip's AC40T08A MIPI display Manikandan Muralidharan
2024-07-01 8:58 ` [PATCH v2 1/3] dt-bindings: display: himax-hx8394: Add Microchip AC40T08A MIPI Display panel Manikandan Muralidharan
@ 2024-07-01 8:58 ` Manikandan Muralidharan
2024-07-08 12:39 ` neil.armstrong
2024-07-01 8:58 ` [PATCH v2 3/3] drm/panel: himax-hx8394: Add Support for Microchip AC40T08A MIPI Display Panel Manikandan Muralidharan
2024-07-09 12:49 ` [PATCH v2 0/3] Panel HIMAX support for Microchip's AC40T08A MIPI display Neil Armstrong
3 siblings, 1 reply; 10+ messages in thread
From: Manikandan Muralidharan @ 2024-07-01 8:58 UTC (permalink / raw)
To: megi, javierm, neil.armstrong, quic_jesszhan, sam, airlied,
daniel, maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt,
conor+dt, dri-devel, devicetree, linux-kernel
Cc: manikandan.m
Switch the driver to use devm_gpiod_get_optional() on reset_gpio to avoid
driver probe issues when reset line is not specified.
Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
---
drivers/gpu/drm/panel/panel-himax-hx8394.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panel/panel-himax-hx8394.c b/drivers/gpu/drm/panel/panel-himax-hx8394.c
index ff0dc08b9829..d0e44f1f85d9 100644
--- a/drivers/gpu/drm/panel/panel-himax-hx8394.c
+++ b/drivers/gpu/drm/panel/panel-himax-hx8394.c
@@ -487,7 +487,7 @@ static int hx8394_probe(struct mipi_dsi_device *dsi)
if (!ctx)
return -ENOMEM;
- ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
+ ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
if (IS_ERR(ctx->reset_gpio))
return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
"Failed to get reset gpio\n");
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 3/3] drm/panel: himax-hx8394: Add Support for Microchip AC40T08A MIPI Display Panel
2024-07-01 8:58 [PATCH v2 0/3] Panel HIMAX support for Microchip's AC40T08A MIPI display Manikandan Muralidharan
2024-07-01 8:58 ` [PATCH v2 1/3] dt-bindings: display: himax-hx8394: Add Microchip AC40T08A MIPI Display panel Manikandan Muralidharan
2024-07-01 8:58 ` [PATCH v2 2/3] drm/panel: himax-hx8394: switch to devm_gpiod_get_optional() for reset_gpio Manikandan Muralidharan
@ 2024-07-01 8:58 ` Manikandan Muralidharan
2024-07-08 12:39 ` neil.armstrong
2024-07-09 12:49 ` [PATCH v2 0/3] Panel HIMAX support for Microchip's AC40T08A MIPI display Neil Armstrong
3 siblings, 1 reply; 10+ messages in thread
From: Manikandan Muralidharan @ 2024-07-01 8:58 UTC (permalink / raw)
To: megi, javierm, neil.armstrong, quic_jesszhan, sam, airlied,
daniel, maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt,
conor+dt, dri-devel, devicetree, linux-kernel
Cc: manikandan.m
Add support for the Microchip AC40T08A MIPI Display panel. This panel uses
a Himax HX8394 display controller and requires a vendor provided init
sequence. The display resolution is 720x1280@60Hz with width and height
of 76mm and 132mm respectively.
Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
---
drivers/gpu/drm/panel/panel-himax-hx8394.c | 151 +++++++++++++++++++++
1 file changed, 151 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-himax-hx8394.c b/drivers/gpu/drm/panel/panel-himax-hx8394.c
index d0e44f1f85d9..bf6bac5d5c12 100644
--- a/drivers/gpu/drm/panel/panel-himax-hx8394.c
+++ b/drivers/gpu/drm/panel/panel-himax-hx8394.c
@@ -339,6 +339,156 @@ static const struct hx8394_panel_desc powkiddy_x55_desc = {
.init_sequence = powkiddy_x55_init_sequence,
};
+static int mchp_ac40t08a_init_sequence(struct hx8394 *ctx)
+{
+ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
+
+ /* DCS commands do not seem to be sent correclty without this delay */
+ msleep(20);
+
+ /* 5.19.8 SETEXTC: Set extension command (B9h) */
+ mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETEXTC,
+ 0xff, 0x83, 0x94);
+
+ /* 5.19.9 SETMIPI: Set MIPI control (BAh) */
+ mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETMIPI,
+ 0x63, 0x03, 0x68, 0x6b, 0xb2, 0xc0);
+
+ /* 5.19.2 SETPOWER: Set power (B1h) */
+ mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETPOWER,
+ 0x48, 0x12, 0x72, 0x09, 0x32, 0x54,
+ 0x71, 0x71, 0x57, 0x47);
+
+ /* 5.19.3 SETDISP: Set display related register (B2h) */
+ mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETDISP,
+ 0x00, 0x80, 0x64, 0x0c, 0x0d, 0x2f);
+
+ /* 5.19.4 SETCYC: Set display waveform cycles (B4h) */
+ mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETCYC,
+ 0x73, 0x74, 0x73, 0x74, 0x73, 0x74,
+ 0x01, 0x0c, 0x86, 0x75, 0x00, 0x3f,
+ 0x73, 0x74, 0x73, 0x74, 0x73, 0x74,
+ 0x01, 0x0c, 0x86);
+
+ /* 5.19.5 SETVCOM: Set VCOM voltage (B6h) */
+ mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETVCOM,
+ 0x6e, 0x6e);
+
+ /* 5.19.19 SETGIP0: Set GIP Option0 (D3h) */
+ mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETGIP0,
+ 0x00, 0x00, 0x07, 0x07, 0x40, 0x07,
+ 0x0c, 0x00, 0x08, 0x10, 0x08, 0x00,
+ 0x08, 0x54, 0x15, 0x0a, 0x05, 0x0a,
+ 0x02, 0x15, 0x06, 0x05, 0x06, 0x47,
+ 0x44, 0x0a, 0x0a, 0x4b, 0x10, 0x07,
+ 0x07, 0x0c, 0x40);
+
+ /* 5.19.20 Set GIP Option1 (D5h) */
+ mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETGIP1,
+ 0x1c, 0x1c, 0x1d, 0x1d, 0x00, 0x01,
+ 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x24, 0x25,
+ 0x18, 0x18, 0x26, 0x27, 0x18, 0x18,
+ 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+ 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+ 0x18, 0x18, 0x20, 0x21, 0x18, 0x18,
+ 0x18, 0x18);
+
+ /* 5.19.21 Set GIP Option2 (D6h) */
+ mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETGIP2,
+ 0x1c, 0x1c, 0x1d, 0x1d, 0x07, 0x06,
+ 0x05, 0x04, 0x03, 0x02, 0x01, 0x00,
+ 0x0b, 0x0a, 0x09, 0x08, 0x21, 0x20,
+ 0x18, 0x18, 0x27, 0x26, 0x18, 0x18,
+ 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+ 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+ 0x18, 0x18, 0x25, 0x24, 0x18, 0x18,
+ 0x18, 0x18);
+
+ /* 5.19.25 SETGAMMA: Set gamma curve related setting (E0h) */
+ mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETGAMMA,
+ 0x00, 0x0a, 0x15, 0x1b, 0x1e, 0x21,
+ 0x24, 0x22, 0x47, 0x56, 0x65, 0x66,
+ 0x6e, 0x82, 0x88, 0x8b, 0x9a, 0x9d,
+ 0x98, 0xa8, 0xb9, 0x5d, 0x5c, 0x61,
+ 0x66, 0x6a, 0x6f, 0x7f, 0x7f, 0x00,
+ 0x0a, 0x15, 0x1b, 0x1e, 0x21, 0x24,
+ 0x22, 0x47, 0x56, 0x65, 0x65, 0x6e,
+ 0x81, 0x87, 0x8b, 0x98, 0x9d, 0x99,
+ 0xa8, 0xba, 0x5d, 0x5d, 0x62, 0x67,
+ 0x6b, 0x72, 0x7f, 0x7f);
+
+ /* Unknown command, not listed in the HX8394-F datasheet (C0H) */
+ mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_UNKNOWN1,
+ 0x1f, 0x73);
+
+ /* Set CABC control (C9h)*/
+ mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETCABC,
+ 0x76, 0x00, 0x30);
+
+ /* 5.19.17 SETPANEL (CCh) */
+ mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETPANEL,
+ 0x0b);
+
+ /* Unknown command, not listed in the HX8394-F datasheet (D4h) */
+ mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_UNKNOWN3,
+ 0x02);
+
+ /* 5.19.11 Set register bank (BDh) */
+ mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETREGBANK,
+ 0x02);
+
+ /* 5.19.11 Set register bank (D8h) */
+ mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_UNKNOWN4,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff);
+
+ /* 5.19.11 Set register bank (BDh) */
+ mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETREGBANK,
+ 0x00);
+
+ /* 5.19.11 Set register bank (BDh) */
+ mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETREGBANK,
+ 0x01);
+
+ /* 5.19.2 SETPOWER: Set power (B1h) */
+ mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETPOWER,
+ 0x00);
+
+ /* 5.19.11 Set register bank (BDh) */
+ mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETREGBANK,
+ 0x00);
+
+ /* Unknown command, not listed in the HX8394-F datasheet (C6h) */
+ mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_UNKNOWN2,
+ 0xed);
+
+ return 0;
+}
+
+static const struct drm_display_mode mchp_ac40t08a_mode = {
+ .hdisplay = 720,
+ .hsync_start = 720 + 12,
+ .hsync_end = 720 + 12 + 24,
+ .htotal = 720 + 12 + 12 + 24,
+ .vdisplay = 1280,
+ .vsync_start = 1280 + 13,
+ .vsync_end = 1280 + 14,
+ .vtotal = 1280 + 14 + 13,
+ .clock = 60226,
+ .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
+ .width_mm = 76,
+ .height_mm = 132,
+};
+
+static const struct hx8394_panel_desc mchp_ac40t08a_desc = {
+ .mode = &mchp_ac40t08a_mode,
+ .lanes = 4,
+ .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST,
+ .format = MIPI_DSI_FMT_RGB888,
+ .init_sequence = mchp_ac40t08a_init_sequence,
+};
+
static int hx8394_enable(struct drm_panel *panel)
{
struct hx8394 *ctx = panel_to_hx8394(panel);
@@ -556,6 +706,7 @@ static void hx8394_remove(struct mipi_dsi_device *dsi)
static const struct of_device_id hx8394_of_match[] = {
{ .compatible = "hannstar,hsd060bhw4", .data = &hsd060bhw4_desc },
{ .compatible = "powkiddy,x55-panel", .data = &powkiddy_x55_desc },
+ { .compatible = "microchip,ac40t08a-mipi-panel", .data = &mchp_ac40t08a_desc },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, hx8394_of_match);
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: display: himax-hx8394: Add Microchip AC40T08A MIPI Display panel
2024-07-01 8:58 ` [PATCH v2 1/3] dt-bindings: display: himax-hx8394: Add Microchip AC40T08A MIPI Display panel Manikandan Muralidharan
@ 2024-07-01 10:03 ` Conor Dooley
2024-07-02 4:47 ` Manikandan.M
0 siblings, 1 reply; 10+ messages in thread
From: Conor Dooley @ 2024-07-01 10:03 UTC (permalink / raw)
To: Manikandan Muralidharan
Cc: megi, javierm, neil.armstrong, quic_jesszhan, sam, airlied,
daniel, maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt,
conor+dt, dri-devel, devicetree, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2670 bytes --]
On Mon, Jul 01, 2024 at 02:28:35PM +0530, Manikandan Muralidharan wrote:
> Add compatible string for the Microchip's AC40T08A MIPI Display
> panel.This panel uses a Himax HX8394 display controller.
> The reset line is not populated and leads to driver probe issues,
> thus add conditional block to narrow reset-gpio property per variant.
I really should have asked on v1, but I wasn't sure whether or not the
optional nature of the reset-gpios was specific to your new panel so I
held off: Is it ever the case that a reset-gpio can be provided for this
microchip panel, or just not in the configuration you tested? If it is
never possible, then I'd probably do...
>
> Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
> ---
> changes in v2:
> - re-order compatible string alphabetically.
> - Add conditional block to narrow reset-gpio property from required
> list based on compatible string check
> ---
> .../bindings/display/panel/himax,hx8394.yaml | 17 +++++++++++++----
> 1 file changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml b/Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml
> index 644387e4fb6f..75ccabff308b 100644
> --- a/Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml
> @@ -15,14 +15,12 @@ description:
> such as the HannStar HSD060BHW4 720x1440 TFT LCD panel connected with
> a MIPI-DSI video interface.
>
> -allOf:
> - - $ref: panel-common.yaml#
> -
> properties:
> compatible:
> items:
> - enum:
> - hannstar,hsd060bhw4
> + - microchip,ac40t08a-mipi-panel
> - powkiddy,x55-panel
> - const: himax,hx8394
>
> @@ -46,7 +44,6 @@ properties:
> required:
> - compatible
> - reg
> - - reset-gpios
> - backlight
> - port
> - vcc-supply
> @@ -54,6 +51,18 @@ required:
>
> additionalProperties: false
>
> +allOf:
> + - $ref: panel-common.yaml#
> + - if:
> + not:
> + properties:
> + compatible:
> + enum:
> + - microchip,ac40t08a-mipi-panel
> + then:
> + required:
> + - reset-gpios
- if:
properties:
compatible:
const: microchip,ac40t08a-mipi-panel
then:
properties:
reset-gpios: false
else:
required:
- reset-gpios
Otherwise, what you have is fine.
Cheers,
Conor.
> examples:
> - |
> #include <dt-bindings/gpio/gpio.h>
> --
> 2.25.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: display: himax-hx8394: Add Microchip AC40T08A MIPI Display panel
2024-07-01 10:03 ` Conor Dooley
@ 2024-07-02 4:47 ` Manikandan.M
2024-07-02 15:03 ` Conor Dooley
0 siblings, 1 reply; 10+ messages in thread
From: Manikandan.M @ 2024-07-02 4:47 UTC (permalink / raw)
To: conor
Cc: megi, javierm, neil.armstrong, quic_jesszhan, sam, airlied,
daniel, maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt,
conor+dt, dri-devel, devicetree, linux-kernel
Hi Conor,
On 01/07/24 3:33 pm, Conor Dooley wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
>
> ForwardedMessage.eml
>
> Subject:
> Re: [PATCH v2 1/3] dt-bindings: display: himax-hx8394: Add Microchip
> AC40T08A MIPI Display panel
> From:
> Conor Dooley <conor@kernel.org>
> Date:
> 01/07/24, 3:33 pm
>
> To:
> Manikandan Muralidharan <manikandan.m@microchip.com>
> CC:
> megi@xff.cz, javierm@redhat.com, neil.armstrong@linaro.org,
> quic_jesszhan@quicinc.com, sam@ravnborg.org, airlied@gmail.com,
> daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org,
> tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org,
> conor+dt@kernel.org, dri-devel@lists.freedesktop.org,
> devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
>
>
> On Mon, Jul 01, 2024 at 02:28:35PM +0530, Manikandan Muralidharan wrote:
>> Add compatible string for the Microchip's AC40T08A MIPI Display
>> panel.This panel uses a Himax HX8394 display controller.
>> The reset line is not populated and leads to driver probe issues,
>> thus add conditional block to narrow reset-gpio property per variant.
> I really should have asked on v1, but I wasn't sure whether or not the
> optional nature of the reset-gpios was specific to your new panel so I
> held off: Is it ever the case that a reset-gpio can be provided for this
> microchip panel, or just not in the configuration you tested? If it is
> never possible, then I'd probably do...
The reset-gpio line can be provided for the microchip MIPI panel, the
SoC variant in which I tested did not have the reset line configured,
hence had to make it optional here and also in the driver to avoid panel
probe issues.
>
>> Signed-off-by: Manikandan Muralidharan<manikandan.m@microchip.com>
>> ---
>> changes in v2:
>> - re-order compatible string alphabetically.
>> - Add conditional block to narrow reset-gpio property from required
>> list based on compatible string check
>> ---
>> .../bindings/display/panel/himax,hx8394.yaml | 17 +++++++++++++----
>> 1 file changed, 13 insertions(+), 4 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml b/Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml
>> index 644387e4fb6f..75ccabff308b 100644
>> --- a/Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml
>> +++ b/Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml
>> @@ -15,14 +15,12 @@ description:
>> such as the HannStar HSD060BHW4 720x1440 TFT LCD panel connected with
>> a MIPI-DSI video interface.
>>
>> -allOf:
>> - - $ref: panel-common.yaml#
>> -
>> properties:
>> compatible:
>> items:
>> - enum:
>> - hannstar,hsd060bhw4
>> + - microchip,ac40t08a-mipi-panel
>> - powkiddy,x55-panel
>> - const: himax,hx8394
>>
>> @@ -46,7 +44,6 @@ properties:
>> required:
>> - compatible
>> - reg
>> - - reset-gpios
>> - backlight
>> - port
>> - vcc-supply
>> @@ -54,6 +51,18 @@ required:
>>
>> additionalProperties: false
>>
>> +allOf:
>> + - $ref: panel-common.yaml#
>> + - if:
>> + not:
>> + properties:
>> + compatible:
>> + enum:
>> + - microchip,ac40t08a-mipi-panel
>> + then:
>> + required:
>> + - reset-gpios
> - if:
> properties:
> compatible:
> const: microchip,ac40t08a-mipi-panel
> then:
> properties:
> reset-gpios: false
> else:
> required:
> - reset-gpios
>
> Otherwise, what you have is fine.
>
> Cheers,
> Conor.
>
>> examples:
>> - |
>> #include <dt-bindings/gpio/gpio.h>
>> --
>> 2.25.1
>>
--
Thanks and Regards,
Manikandan M.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: display: himax-hx8394: Add Microchip AC40T08A MIPI Display panel
2024-07-02 4:47 ` Manikandan.M
@ 2024-07-02 15:03 ` Conor Dooley
0 siblings, 0 replies; 10+ messages in thread
From: Conor Dooley @ 2024-07-02 15:03 UTC (permalink / raw)
To: Manikandan.M
Cc: megi, javierm, neil.armstrong, quic_jesszhan, sam, airlied,
daniel, maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt,
conor+dt, dri-devel, devicetree, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2059 bytes --]
On Tue, Jul 02, 2024 at 04:47:39AM +0000, Manikandan.M@microchip.com wrote:
> Hi Conor,
>
> On 01/07/24 3:33 pm, Conor Dooley wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> >
> >
> > ForwardedMessage.eml
> >
> > Subject:
> > Re: [PATCH v2 1/3] dt-bindings: display: himax-hx8394: Add Microchip
> > AC40T08A MIPI Display panel
> > From:
> > Conor Dooley <conor@kernel.org>
> > Date:
> > 01/07/24, 3:33 pm
> >
> > To:
> > Manikandan Muralidharan <manikandan.m@microchip.com>
> > CC:
> > megi@xff.cz, javierm@redhat.com, neil.armstrong@linaro.org,
> > quic_jesszhan@quicinc.com, sam@ravnborg.org, airlied@gmail.com,
> > daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org,
> > tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org,
> > conor+dt@kernel.org, dri-devel@lists.freedesktop.org,
> > devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
> >
> >
btw, please fix your mail client :/
> > On Mon, Jul 01, 2024 at 02:28:35PM +0530, Manikandan Muralidharan wrote:
> >> Add compatible string for the Microchip's AC40T08A MIPI Display
> >> panel.This panel uses a Himax HX8394 display controller.
> >> The reset line is not populated and leads to driver probe issues,
> >> thus add conditional block to narrow reset-gpio property per variant.
> > I really should have asked on v1, but I wasn't sure whether or not the
> > optional nature of the reset-gpios was specific to your new panel so I
> > held off: Is it ever the case that a reset-gpio can be provided for this
> > microchip panel, or just not in the configuration you tested? If it is
> > never possible, then I'd probably do...
> The reset-gpio line can be provided for the microchip MIPI panel, the
> SoC variant in which I tested did not have the reset line configured,
> hence had to make it optional here and also in the driver to avoid panel
> probe issues.
Okay, then:
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Thanks,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/3] drm/panel: himax-hx8394: switch to devm_gpiod_get_optional() for reset_gpio
2024-07-01 8:58 ` [PATCH v2 2/3] drm/panel: himax-hx8394: switch to devm_gpiod_get_optional() for reset_gpio Manikandan Muralidharan
@ 2024-07-08 12:39 ` neil.armstrong
0 siblings, 0 replies; 10+ messages in thread
From: neil.armstrong @ 2024-07-08 12:39 UTC (permalink / raw)
To: Manikandan Muralidharan, megi, javierm, quic_jesszhan, sam,
airlied, daniel, maarten.lankhorst, mripard, tzimmermann, robh,
krzk+dt, conor+dt, dri-devel, devicetree, linux-kernel
On 01/07/2024 10:58, Manikandan Muralidharan wrote:
> Switch the driver to use devm_gpiod_get_optional() on reset_gpio to avoid
> driver probe issues when reset line is not specified.
>
> Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
> ---
> drivers/gpu/drm/panel/panel-himax-hx8394.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-himax-hx8394.c b/drivers/gpu/drm/panel/panel-himax-hx8394.c
> index ff0dc08b9829..d0e44f1f85d9 100644
> --- a/drivers/gpu/drm/panel/panel-himax-hx8394.c
> +++ b/drivers/gpu/drm/panel/panel-himax-hx8394.c
> @@ -487,7 +487,7 @@ static int hx8394_probe(struct mipi_dsi_device *dsi)
> if (!ctx)
> return -ENOMEM;
>
> - ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
> + ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
> if (IS_ERR(ctx->reset_gpio))
> return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
> "Failed to get reset gpio\n");
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 3/3] drm/panel: himax-hx8394: Add Support for Microchip AC40T08A MIPI Display Panel
2024-07-01 8:58 ` [PATCH v2 3/3] drm/panel: himax-hx8394: Add Support for Microchip AC40T08A MIPI Display Panel Manikandan Muralidharan
@ 2024-07-08 12:39 ` neil.armstrong
0 siblings, 0 replies; 10+ messages in thread
From: neil.armstrong @ 2024-07-08 12:39 UTC (permalink / raw)
To: Manikandan Muralidharan, megi, javierm, quic_jesszhan, sam,
airlied, daniel, maarten.lankhorst, mripard, tzimmermann, robh,
krzk+dt, conor+dt, dri-devel, devicetree, linux-kernel
On 01/07/2024 10:58, Manikandan Muralidharan wrote:
> Add support for the Microchip AC40T08A MIPI Display panel. This panel uses
> a Himax HX8394 display controller and requires a vendor provided init
> sequence. The display resolution is 720x1280@60Hz with width and height
> of 76mm and 132mm respectively.
>
> Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
> ---
> drivers/gpu/drm/panel/panel-himax-hx8394.c | 151 +++++++++++++++++++++
> 1 file changed, 151 insertions(+)
>
> diff --git a/drivers/gpu/drm/panel/panel-himax-hx8394.c b/drivers/gpu/drm/panel/panel-himax-hx8394.c
> index d0e44f1f85d9..bf6bac5d5c12 100644
> --- a/drivers/gpu/drm/panel/panel-himax-hx8394.c
> +++ b/drivers/gpu/drm/panel/panel-himax-hx8394.c
> @@ -339,6 +339,156 @@ static const struct hx8394_panel_desc powkiddy_x55_desc = {
> .init_sequence = powkiddy_x55_init_sequence,
> };
>
> +static int mchp_ac40t08a_init_sequence(struct hx8394 *ctx)
> +{
> + struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
> +
> + /* DCS commands do not seem to be sent correclty without this delay */
> + msleep(20);
> +
> + /* 5.19.8 SETEXTC: Set extension command (B9h) */
> + mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETEXTC,
> + 0xff, 0x83, 0x94);
> +
> + /* 5.19.9 SETMIPI: Set MIPI control (BAh) */
> + mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETMIPI,
> + 0x63, 0x03, 0x68, 0x6b, 0xb2, 0xc0);
> +
> + /* 5.19.2 SETPOWER: Set power (B1h) */
> + mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETPOWER,
> + 0x48, 0x12, 0x72, 0x09, 0x32, 0x54,
> + 0x71, 0x71, 0x57, 0x47);
> +
> + /* 5.19.3 SETDISP: Set display related register (B2h) */
> + mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETDISP,
> + 0x00, 0x80, 0x64, 0x0c, 0x0d, 0x2f);
> +
> + /* 5.19.4 SETCYC: Set display waveform cycles (B4h) */
> + mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETCYC,
> + 0x73, 0x74, 0x73, 0x74, 0x73, 0x74,
> + 0x01, 0x0c, 0x86, 0x75, 0x00, 0x3f,
> + 0x73, 0x74, 0x73, 0x74, 0x73, 0x74,
> + 0x01, 0x0c, 0x86);
> +
> + /* 5.19.5 SETVCOM: Set VCOM voltage (B6h) */
> + mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETVCOM,
> + 0x6e, 0x6e);
> +
> + /* 5.19.19 SETGIP0: Set GIP Option0 (D3h) */
> + mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETGIP0,
> + 0x00, 0x00, 0x07, 0x07, 0x40, 0x07,
> + 0x0c, 0x00, 0x08, 0x10, 0x08, 0x00,
> + 0x08, 0x54, 0x15, 0x0a, 0x05, 0x0a,
> + 0x02, 0x15, 0x06, 0x05, 0x06, 0x47,
> + 0x44, 0x0a, 0x0a, 0x4b, 0x10, 0x07,
> + 0x07, 0x0c, 0x40);
> +
> + /* 5.19.20 Set GIP Option1 (D5h) */
> + mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETGIP1,
> + 0x1c, 0x1c, 0x1d, 0x1d, 0x00, 0x01,
> + 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
> + 0x08, 0x09, 0x0a, 0x0b, 0x24, 0x25,
> + 0x18, 0x18, 0x26, 0x27, 0x18, 0x18,
> + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
> + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
> + 0x18, 0x18, 0x20, 0x21, 0x18, 0x18,
> + 0x18, 0x18);
> +
> + /* 5.19.21 Set GIP Option2 (D6h) */
> + mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETGIP2,
> + 0x1c, 0x1c, 0x1d, 0x1d, 0x07, 0x06,
> + 0x05, 0x04, 0x03, 0x02, 0x01, 0x00,
> + 0x0b, 0x0a, 0x09, 0x08, 0x21, 0x20,
> + 0x18, 0x18, 0x27, 0x26, 0x18, 0x18,
> + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
> + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
> + 0x18, 0x18, 0x25, 0x24, 0x18, 0x18,
> + 0x18, 0x18);
> +
> + /* 5.19.25 SETGAMMA: Set gamma curve related setting (E0h) */
> + mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETGAMMA,
> + 0x00, 0x0a, 0x15, 0x1b, 0x1e, 0x21,
> + 0x24, 0x22, 0x47, 0x56, 0x65, 0x66,
> + 0x6e, 0x82, 0x88, 0x8b, 0x9a, 0x9d,
> + 0x98, 0xa8, 0xb9, 0x5d, 0x5c, 0x61,
> + 0x66, 0x6a, 0x6f, 0x7f, 0x7f, 0x00,
> + 0x0a, 0x15, 0x1b, 0x1e, 0x21, 0x24,
> + 0x22, 0x47, 0x56, 0x65, 0x65, 0x6e,
> + 0x81, 0x87, 0x8b, 0x98, 0x9d, 0x99,
> + 0xa8, 0xba, 0x5d, 0x5d, 0x62, 0x67,
> + 0x6b, 0x72, 0x7f, 0x7f);
> +
> + /* Unknown command, not listed in the HX8394-F datasheet (C0H) */
> + mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_UNKNOWN1,
> + 0x1f, 0x73);
> +
> + /* Set CABC control (C9h)*/
> + mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETCABC,
> + 0x76, 0x00, 0x30);
> +
> + /* 5.19.17 SETPANEL (CCh) */
> + mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETPANEL,
> + 0x0b);
> +
> + /* Unknown command, not listed in the HX8394-F datasheet (D4h) */
> + mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_UNKNOWN3,
> + 0x02);
> +
> + /* 5.19.11 Set register bank (BDh) */
> + mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETREGBANK,
> + 0x02);
> +
> + /* 5.19.11 Set register bank (D8h) */
> + mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_UNKNOWN4,
> + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
> + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff);
> +
> + /* 5.19.11 Set register bank (BDh) */
> + mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETREGBANK,
> + 0x00);
> +
> + /* 5.19.11 Set register bank (BDh) */
> + mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETREGBANK,
> + 0x01);
> +
> + /* 5.19.2 SETPOWER: Set power (B1h) */
> + mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETPOWER,
> + 0x00);
> +
> + /* 5.19.11 Set register bank (BDh) */
> + mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_SETREGBANK,
> + 0x00);
> +
> + /* Unknown command, not listed in the HX8394-F datasheet (C6h) */
> + mipi_dsi_dcs_write_seq(dsi, HX8394_CMD_UNKNOWN2,
> + 0xed);
> +
> + return 0;
> +}
> +
> +static const struct drm_display_mode mchp_ac40t08a_mode = {
> + .hdisplay = 720,
> + .hsync_start = 720 + 12,
> + .hsync_end = 720 + 12 + 24,
> + .htotal = 720 + 12 + 12 + 24,
> + .vdisplay = 1280,
> + .vsync_start = 1280 + 13,
> + .vsync_end = 1280 + 14,
> + .vtotal = 1280 + 14 + 13,
> + .clock = 60226,
> + .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
> + .width_mm = 76,
> + .height_mm = 132,
> +};
> +
> +static const struct hx8394_panel_desc mchp_ac40t08a_desc = {
> + .mode = &mchp_ac40t08a_mode,
> + .lanes = 4,
> + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST,
> + .format = MIPI_DSI_FMT_RGB888,
> + .init_sequence = mchp_ac40t08a_init_sequence,
> +};
> +
> static int hx8394_enable(struct drm_panel *panel)
> {
> struct hx8394 *ctx = panel_to_hx8394(panel);
> @@ -556,6 +706,7 @@ static void hx8394_remove(struct mipi_dsi_device *dsi)
> static const struct of_device_id hx8394_of_match[] = {
> { .compatible = "hannstar,hsd060bhw4", .data = &hsd060bhw4_desc },
> { .compatible = "powkiddy,x55-panel", .data = &powkiddy_x55_desc },
> + { .compatible = "microchip,ac40t08a-mipi-panel", .data = &mchp_ac40t08a_desc },
> { /* sentinel */ }
> };
> MODULE_DEVICE_TABLE(of, hx8394_of_match);
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 0/3] Panel HIMAX support for Microchip's AC40T08A MIPI display
2024-07-01 8:58 [PATCH v2 0/3] Panel HIMAX support for Microchip's AC40T08A MIPI display Manikandan Muralidharan
` (2 preceding siblings ...)
2024-07-01 8:58 ` [PATCH v2 3/3] drm/panel: himax-hx8394: Add Support for Microchip AC40T08A MIPI Display Panel Manikandan Muralidharan
@ 2024-07-09 12:49 ` Neil Armstrong
3 siblings, 0 replies; 10+ messages in thread
From: Neil Armstrong @ 2024-07-09 12:49 UTC (permalink / raw)
To: megi, javierm, quic_jesszhan, sam, airlied, daniel,
maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
dri-devel, devicetree, linux-kernel, Manikandan Muralidharan
Hi,
On Mon, 01 Jul 2024 14:28:34 +0530, Manikandan Muralidharan wrote:
> This patch series adds panel himax display controller support for the
> Microchip's AC40T08A MIPI display.
>
> yaml file is validated using the following commands
>
> make dt_binding_check DT_SCHEMA_FILES=<converted_yaml_file>
> make CHECK_DTBS=y DT_SCHEMA_FILES=<converted_yaml_file>
>
> [...]
Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-next)
[1/3] dt-bindings: display: himax-hx8394: Add Microchip AC40T08A MIPI Display panel
https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/223c12dd492d67d90d3712ef3d9e042116a47522
[2/3] drm/panel: himax-hx8394: switch to devm_gpiod_get_optional() for reset_gpio
https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/1dcfca093be9e013a53e3c9b74b3f60ea9c5160e
[3/3] drm/panel: himax-hx8394: Add Support for Microchip AC40T08A MIPI Display Panel
https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/014e597d35816b56c7aac1348b77c73657c4066e
--
Neil
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-07-09 12:49 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-01 8:58 [PATCH v2 0/3] Panel HIMAX support for Microchip's AC40T08A MIPI display Manikandan Muralidharan
2024-07-01 8:58 ` [PATCH v2 1/3] dt-bindings: display: himax-hx8394: Add Microchip AC40T08A MIPI Display panel Manikandan Muralidharan
2024-07-01 10:03 ` Conor Dooley
2024-07-02 4:47 ` Manikandan.M
2024-07-02 15:03 ` Conor Dooley
2024-07-01 8:58 ` [PATCH v2 2/3] drm/panel: himax-hx8394: switch to devm_gpiod_get_optional() for reset_gpio Manikandan Muralidharan
2024-07-08 12:39 ` neil.armstrong
2024-07-01 8:58 ` [PATCH v2 3/3] drm/panel: himax-hx8394: Add Support for Microchip AC40T08A MIPI Display Panel Manikandan Muralidharan
2024-07-08 12:39 ` neil.armstrong
2024-07-09 12:49 ` [PATCH v2 0/3] Panel HIMAX support for Microchip's AC40T08A MIPI display Neil Armstrong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox