Skip to contentSkip to conversation

dt-bindings: panel: Add Feiyang FY07024DI26A30-D MIPI-DSI LCD panel

PATCH Superseded Jagan Teki 2 participants 7 messages Jan 25, 2019 – Jan 30, 2019

Subsystems (5)

v5 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

Jagan Teki

author maintainer
#0 lore raw

PATCH v5 1/2 dt-bindings: panel: Add Feiyang FY07024DI26A30-D MIPI-DSI LCD panel

Feiyang FY07024DI26A30-D is 1024x600, 4-lane MIPI-DSI LCD panel.

Add dt-bingings for it.

---
Changes for v5, v4, v3:
- none
Changes for v2:
- new patch, derived from another dsi series

 .../display/panel/feiyang,fy07024di26a30d.txt | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/feiyang,fy07024di26a30d.txt
Documentation/devicetree/bindings/display/panel/feiyang,fy07024di26a30d.txt new file +20 -0
new file mode 100644
index 000000000000..82caa7b65ae8
@@ -0,0 +1,20 @@
+Feiyang FY07024DI26A30-D 7" MIPI-DSI LCD Panel
+
+Required properties:
+- compatible: must be "feiyang,fy07024di26a30d"
+- reg: DSI virtual channel used by that screen
+- avdd-supply: analog regulator dc1 switch
+- dvdd-supply: 3v3 digital regulator
+- reset-gpios: a GPIO phandle for the reset pin
+
+Optional properties:
+- backlight: phandle for the backlight control.
+
+panel@0 {
+	compatible = "feiyang,fy07024di26a30d";
+	reg = <0>;
+	avdd-supply = <&reg_dc1sw>;
+	dvdd-supply = <&reg_dldo2>;
+	reset-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* LCD-RST: PD24 */
+	backlight = <&backlight>;
+};
Signature · 1 line
2.18.0.321.gffc6fa0e3
author maintainer
#1 lore raw

PATCH v5 2/2 drm/panel: Add Feiyang FY07024DI26A30-D MIPI-DSI LCD panel

Feiyang FY07024DI26A30-D is 1024x600, 4-lane MIPI-DSI LCD panel.

Add panel driver for it.

---
Changes for v5:
- drop drmP.h header
- order include files
- add empty line after kzalloc()
- drop gpio set for reset
- drop backlight put_device from probe()
- drop backlight put_device from remove()
- collect Tested-by from Bhushan Shah
Changes for v4:
- rebase on master
- adjust the hporch values to satisfy the refresh Changes for v3:
- use simple structure for command init
- update proper comments on power, reset delay sequnce
- fix to use set_display_off in disable function
- move mode type to structure
- drop refres rate value, let drm compute Changes for v2:
- new patch, derived from another dsi series

 MAINTAINERS                                   |   6 +
 drivers/gpu/drm/panel/Kconfig                 |   9 +
 drivers/gpu/drm/panel/Makefile                |   1 +
 .../drm/panel/panel-feiyang-fy07024di26a30d.c | 269 ++++++++++++++++++
 4 files changed, 285 insertions(+)
 create mode 100644 drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c
MAINTAINERS +6 -0
index e3f785bad68b..5c8591eb5840 100644
@@ -4831,6 +4831,12 @@ T:	git git://anongit.freedesktop.org/drm/drm-misc
 S:	Maintained
 F:	drivers/gpu/drm/tve200/
 
+DRM DRIVER FOR FEIYANG FY07024DI26A30-D MIPI-DSI LCD PANELS
+M:	Jagan Teki <[email protected]>
+S:	Maintained
+F:	drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c
+F:	Documentation/devicetree/bindings/display/panel/feiyang,fy07024di26a30d.txt
+
 DRM DRIVER FOR ILITEK ILI9225 PANELS
 M:	David Lechner <[email protected]>
 S:	Maintained
drivers/gpu/drm/panel/Kconfig +9 -0
index 151ddf720b83..5304db7b7b55 100644
@@ -47,6 +47,15 @@ config DRM_PANEL_SIMPLE
 	  that it can be automatically turned off when the panel goes into a
 	  low power state.
 
+config DRM_PANEL_FEIYANG_FY07024DI26A30D
+	tristate "Feiyang FY07024DI26A30-D MIPI-DSI LCD panel"
+	depends on OF
+	depends on DRM_MIPI_DSI
+	depends on BACKLIGHT_CLASS_DEVICE
+	help
+	  Say Y if you want to enable support for panels based on the
+	  Feiyang FY07024DI26A30-D MIPI-DSI interface.
+
 config DRM_PANEL_ILITEK_IL9322
 	tristate "Ilitek ILI9322 320x240 QVGA panels"
 	depends on OF && SPI
drivers/gpu/drm/panel/Makefile +1 -0
index 54db0921f329..c88dacf9d439 100644
@@ -3,6 +3,7 @@ obj-$(CONFIG_DRM_PANEL_ARM_VERSATILE) += panel-arm-versatile.o
 obj-$(CONFIG_DRM_PANEL_BANANAPI_S070WV20_ICN6211) += panel-bananapi-s070wv20-icn6211.o
 obj-$(CONFIG_DRM_PANEL_LVDS) += panel-lvds.o
 obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o
+obj-$(CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D) += panel-feiyang-fy07024di26a30d.o
 obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += panel-ilitek-ili9322.o
 obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9881C) += panel-ilitek-ili9881c.o
 obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) += panel-innolux-p079zca.o
drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c new file +269 -0

269 lines not on this page · raw message

Signature · 1 line
2.18.0.321.gffc6fa0e3
Reviewed-by on v5 2/2
#2 lore raw

Re: [PATCH v5 2/2] drm/panel: Add Feiyang FY07024DI26A30-D MIPI-DSI LCD panel

Hi Jagan.

Looks good, only very few nits left.

Quoted 6 lines · Jagan Teki

Feiyang FY07024DI26A30-D is 1024x600, 4-lane MIPI-DSI LCD panel.

Add panel driver for it.

If you consider my inputs (I know you will) then you can add my:

drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c line 75

Quoted 7 lines
drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c new file +7 -0
+	msleep(20);
+
+	gpiod_set_value(ctx->reset, 0);
+	/* T5 + T6 (avdd rise + video & logic signal rise)
+	 * T5 >= 10ms, 0 < T6 <= 10ms
+	 */
+	msleep(20);

Please use kernel coding style comment, and maybe an empty line between gpiod...() and the comment:

	gpiod_set_value(ctx->reset, 0);
	/*
	 * T5 + T6 (avdd rise + video & logic signal rise)
	 * T5 >= 10ms, 0 < T6 <= 10ms
	 */
	msleep(20);

drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c line 173

Quoted 12 lines
drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c new file +12 -0
+static int feiyang_get_modes(struct drm_panel *panel)
+{
+	struct drm_connector *connector = panel->connector;
+	struct feiyang *ctx = panel_to_feiyang(panel);
+	struct drm_display_mode *mode;
+
+	mode = drm_mode_duplicate(panel->drm, &feiyang_default_mode);
+	if (!mode) {
+		DRM_DEV_ERROR(&ctx->dsi->dev, "failed to add mode %ux%ux@%u\n",
+			      feiyang_default_mode.hdisplay,
+			      feiyang_default_mode.vdisplay,
+			      feiyang_default_mode.vrefresh);

Please consider to use DRM_MODE_FMT and DRM_MODE_ARG for printing.

drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c line 253

Quoted 3 lines
drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c new file +3 -0
+static const struct of_device_id feiyang_of_match[] = {
+	{ .compatible = "feiyang,fy07024di26a30d", },
+	{ }

Maybe use { /* sentinel */ },
?

author maintainer
#3 lore raw

Re: [PATCH v5 2/2] drm/panel: Add Feiyang FY07024DI26A30-D MIPI-DSI LCD panel

Quoted 36 lines · Sam Ravnborg

Hi Jagan.

Looks good, only very few nits left.

Quoted 6 lines · Jagan Teki

Feiyang FY07024DI26A30-D is 1024x600, 4-lane MIPI-DSI LCD panel.

Add panel driver for it.

If you consider my inputs (I know you will) then you can add my:

drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c line 75

Quoted 7 lines
drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c new file +7 -0
+     msleep(20);
+
+     gpiod_set_value(ctx->reset, 0);
+     /* T5 + T6 (avdd rise + video & logic signal rise)
+      * T5 >= 10ms, 0 < T6 <= 10ms
+      */
+     msleep(20);

Please use kernel coding style comment, and maybe an empty line between gpiod...() and the comment:

        gpiod_set_value(ctx->reset, 0);
        /*
         * T5 + T6 (avdd rise + video & logic signal rise)
         * T5 >= 10ms, 0 < T6 <= 10ms
         */
        msleep(20);
Quoted 13 lines

drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c line 173

Quoted 12 lines
drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c new file +12 -0
+static int feiyang_get_modes(struct drm_panel *panel)
+{
+     struct drm_connector *connector = panel->connector;
+     struct feiyang *ctx = panel_to_feiyang(panel);
+     struct drm_display_mode *mode;
+
+     mode = drm_mode_duplicate(panel->drm, &feiyang_default_mode);
+     if (!mode) {
+             DRM_DEV_ERROR(&ctx->dsi->dev, "failed to add mode %ux%ux@%u\n",
+                           feiyang_default_mode.hdisplay,
+                           feiyang_default_mode.vdisplay,
+                           feiyang_default_mode.vrefresh);

Please consider to use DRM_MODE_FMT and DRM_MODE_ARG for printing.

I see DRM_MODE_ARG as mode argument, that print all mode timings but here we need only 3 timings out of it. do we really need? if yes please suggest an example.

author maintainer
#4 lore raw

Re: [PATCH v5 2/2] drm/panel: Add Feiyang FY07024DI26A30-D MIPI-DSI LCD panel

Hi Sam,

Quoted 52 lines · Jagan Teki
Quoted 36 lines · Sam Ravnborg

Hi Jagan.

Looks good, only very few nits left.

Quoted 6 lines · Jagan Teki

Feiyang FY07024DI26A30-D is 1024x600, 4-lane MIPI-DSI LCD panel.

Add panel driver for it.

If you consider my inputs (I know you will) then you can add my:

drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c line 75

Quoted 7 lines
drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c new file +7 -0
+     msleep(20);
+
+     gpiod_set_value(ctx->reset, 0);
+     /* T5 + T6 (avdd rise + video & logic signal rise)
+      * T5 >= 10ms, 0 < T6 <= 10ms
+      */
+     msleep(20);

Please use kernel coding style comment, and maybe an empty line between gpiod...() and the comment:

        gpiod_set_value(ctx->reset, 0);
        /*
         * T5 + T6 (avdd rise + video & logic signal rise)
         * T5 >= 10ms, 0 < T6 <= 10ms
         */
        msleep(20);
Quoted 13 lines

drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c line 173

Quoted 12 lines
drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c new file +12 -0
+static int feiyang_get_modes(struct drm_panel *panel)
+{
+     struct drm_connector *connector = panel->connector;
+     struct feiyang *ctx = panel_to_feiyang(panel);
+     struct drm_display_mode *mode;
+
+     mode = drm_mode_duplicate(panel->drm, &feiyang_default_mode);
+     if (!mode) {
+             DRM_DEV_ERROR(&ctx->dsi->dev, "failed to add mode %ux%ux@%u\n",
+                           feiyang_default_mode.hdisplay,
+                           feiyang_default_mode.vdisplay,
+                           feiyang_default_mode.vrefresh);

Please consider to use DRM_MODE_FMT and DRM_MODE_ARG for printing.

Quoted 3 lines

I see DRM_MODE_ARG as mode argument, that print all mode timings but here we need only 3 timings out of it. do we really need? if yes please suggest an example.

fyi: sent v6 for this except this change. Let me know if you have any comments on this.

#5 lore raw

Re: [PATCH v5 2/2] drm/panel: Add Feiyang FY07024DI26A30-D MIPI-DSI LCD panel

Hi Jagan.

Quoted 7 lines
Quoted 4 lines

I see DRM_MODE_ARG as mode argument, that print all mode timings but here we need only 3 timings out of it. do we really need? if yes please suggest an example.

fyi: sent v6 for this except this change. Let me know if you have any comments on this.

Drivers looks fine, the above was just a quick suggestion to use some exising plumbing.

You have done a nice job following up on all the feedback.

Sam

author maintainer
#6 lore raw

Re: [PATCH v5 2/2] drm/panel: Add Feiyang FY07024DI26A30-D MIPI-DSI LCD panel

Quoted 8 lines · Sam Ravnborg

Hi Jagan.

Quoted 5 lines
Quoted 4 lines

I see DRM_MODE_ARG as mode argument, that print all mode timings but here we need only 3 timings out of it. do we really need? if yes please suggest an example.

Quoted 7 lines
Quoted 2 lines

fyi: sent v6 for this except this change. Let me know if you have any comments on this.

Drivers looks fine, the above was just a quick suggestion to use some exising plumbing.

You have done a nice job following up on all the feedback.

Thanks, hope v6 will be apply soon.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel