Skip to contentSkip to conversation

Add DSI panel driver for Raydium RM67191

PATCH Superseded Robert Chiras 3 participants 7 messages Jun 26, 2019

Subsystems (5)

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore

Robert Chiras

author maintainer
#0 lore raw

v5 cover Add DSI panel driver for Raydium RM67191

This patch-set contains the DRM panel driver and dt-bindings documentation for the DSI driven panel: Raydium RM67191.

v5:
- Removed unnecessary debug messages (fabio)
- Handled error case for gpio pin (fabio)

v4:
- Changed default_timing structure type from 'struct display_timing' to 'struct drm_display_mode' (fabio)
- Replaced devm_gpiod_get with devm_gpiod_get_optional (fabio)
- Added power regulators (fabio)
- Removed pm_ops (fabio)

v3:
- Added myself to MAINTAINERS for this driver (sam)
- Removed display-timings property (fabio)
- Fixed dt description (sam)
- Re-arranged calls inside get_modes function (sam)
- Changed ifdefs with _maybe_unused for suspend/resume functions (sam)
- Collected Reviewed-by from Sam

v2:
- Fixed 'reset-gpio' to 'reset-gpios' property naming (fabio)
- Changed the state of the reset gpio to active low and fixed how it is handled in driver (fabio)
- Fixed copyright statement (daniel)
- Reordered includes (sam)
- Added defines for panel specific color formats (fabio)
- Removed unnecessary tests in enable and unprepare (sam)
- Removed the unnecessary backlight write in enable (sam)

Robert Chiras (2):
dt-bindings: display: panel: Add support for Raydium RM67191 panel drm/panel: Add support for Raydium RM67191 panel driver

 .../bindings/display/panel/raydium,rm67191.txt     |  41 ++
 MAINTAINERS                                        |   6 +
 drivers/gpu/drm/panel/Kconfig                      |   9 +
 drivers/gpu/drm/panel/Makefile                     |   1 +
 drivers/gpu/drm/panel/panel-raydium-rm67191.c      | 670 +++++++++++++++++++++
 5 files changed, 727 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/raydium,rm67191.txt
 create mode 100644 drivers/gpu/drm/panel/panel-raydium-rm67191.c
Signature · 1 line
2.7.4
author maintainer
#1 lore raw

PATCH v5 1/2 dt-bindings: display: panel: Add support for Raydium RM67191 panel

Add dt-bindings documentation for Raydium RM67191 DSI panel.

---
 .../bindings/display/panel/raydium,rm67191.txt     | 41 ++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/raydium,rm67191.txt
Documentation/devicetree/bindings/display/panel/raydium,rm67191.txt new file +41 -0
new file mode 100644
index 0000000..1042469
@@ -0,0 +1,41 @@
+Raydium RM67171 OLED LCD panel with MIPI-DSI protocol
+
+Required properties:
+- compatible: 		"raydium,rm67191"
+- reg:			virtual channel for MIPI-DSI protocol
+			must be <0>
+- dsi-lanes:		number of DSI lanes to be used
+			must be <3> or <4>
+- port: 		input port node with endpoint definition as
+			defined in Documentation/devicetree/bindings/graph.txt;
+			the input port should be connected to a MIPI-DSI device
+			driver
+
+Optional properties:
+- reset-gpios:		a GPIO spec for the RST_B GPIO pin
+- v3p3-supply:		phandle to 3.3V regulator that powers the VDD_3V3 pin
+- v1p8-supply:		phandle to 1.8V regulator that powers the VDD_1V8 pin
+- width-mm:		see panel-common.txt
+- height-mm:		see panel-common.txt
+- video-mode:		0 - burst-mode
+			1 - non-burst with sync event
+			2 - non-burst with sync pulse
+
+Example:
+
+	panel@0 {
+		compatible = "raydium,rm67191";
+		reg = <0>;
+		pinctrl-0 = <&pinctrl_mipi_dsi_0_1_en>;
+		pinctrl-names = "default";
+		reset-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
+		dsi-lanes = <4>;
+		width-mm = <68>;
+		height-mm = <121>;
+
+		port {
+			panel_in: endpoint {
+				remote-endpoint = <&mipi_out>;
+			};
+		};
+	};
Signature · 1 line
2.7.4
author maintainer
#3 lore raw

PATCH v5 2/2 drm/panel: Add support for Raydium RM67191 panel driver

In reply to Robert Chiras

This patch adds Raydium RM67191 TFT LCD panel driver (MIPI-DSI protocol).

---
 MAINTAINERS                                   |   6 +
 drivers/gpu/drm/panel/Kconfig                 |   9 +
 drivers/gpu/drm/panel/Makefile                |   1 +
 drivers/gpu/drm/panel/panel-raydium-rm67191.c | 670 ++++++++++++++++++++++++++
 4 files changed, 686 insertions(+)
 create mode 100644 drivers/gpu/drm/panel/panel-raydium-rm67191.c
MAINTAINERS +6 -0
index 7a2f487..cd93030e 100644
@@ -5089,6 +5089,12 @@ S:	Maintained
 F:	drivers/gpu/drm/qxl/
 F:	include/uapi/drm/qxl_drm.h
 
+DRM DRIVER FOR RAYDIUM RM67191 PANELS
+M:	Robert Chiras <[email protected]>
+S:	Maintained
+F:	drivers/gpu/drm/panel/panel-raydium-rm67191.c
+F:	Documentation/devicetree/bindings/display/panel/raydium,rm67191.txt
+
 DRM DRIVER FOR RAGE 128 VIDEO CARDS
 S:	Orphan / Obsolete
 F:	drivers/gpu/drm/r128/
drivers/gpu/drm/panel/Kconfig +9 -0
index d9d931a..8be1ac1 100644
@@ -159,6 +159,15 @@ config DRM_PANEL_RASPBERRYPI_TOUCHSCREEN
 	  Pi 7" Touchscreen.  To compile this driver as a module,
 	  choose M here.
 
+config DRM_PANEL_RAYDIUM_RM67191
+	tristate "Raydium RM67191 FHD 1080x1920 DSI video mode panel"
+	depends on OF
+	depends on DRM_MIPI_DSI
+	depends on BACKLIGHT_CLASS_DEVICE
+	help
+	  Say Y here if you want to enable support for Raydium RM67191 FHD
+	  (1080x1920) DSI panel.
+
 config DRM_PANEL_RAYDIUM_RM68200
 	tristate "Raydium RM68200 720x1280 DSI video mode panel"
 	depends on OF
drivers/gpu/drm/panel/Makefile +1 -0
index fb0cb3a..1fc0f68 100644
@@ -14,6 +14,7 @@ obj-$(CONFIG_DRM_PANEL_ORISETECH_OTM8009A) += panel-orisetech-otm8009a.o
 obj-$(CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS) += panel-osd-osd101t2587-53ts.o
 obj-$(CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00) += panel-panasonic-vvx10f034n00.o
 obj-$(CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN) += panel-raspberrypi-touchscreen.o
+obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM67191) += panel-raydium-rm67191.o
 obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM68200) += panel-raydium-rm68200.o
 obj-$(CONFIG_DRM_PANEL_ROCKTECH_JH057N00900) += panel-rocktech-jh057n00900.o
 obj-$(CONFIG_DRM_PANEL_RONBO_RB070D30) += panel-ronbo-rb070d30.o
drivers/gpu/drm/panel/panel-raydium-rm67191.c new file +670 -0

670 lines not on this page · raw message

Signature · 1 line
2.7.4
#5 lore raw

Re: [PATCH v5 2/2] drm/panel: Add support for Raydium RM67191 panel driver

In reply to Robert Chiras

Hi Robert.

Quoted 2 lines · Robert Chiras

This patch adds Raydium RM67191 TFT LCD panel driver (MIPI-DSI protocol).

I was about to apply these - but I get following warnings during build:
CC drivers/gpu/drm/panel/panel-raydium-rm67191.o
/home/sam/drm/linux.git/drivers/gpu/drm/panel/panel-raydium-rm67191.c: In function ‘rad_bl_get_brightness’:
/home/sam/drm/linux.git/drivers/gpu/drm/panel/panel-raydium-rm67191.c:470:17: warning: unused variable ‘dev’ [-Wunused-variable]

  struct device *dev = &dsi->dev;
                 ^~~
/home/sam/drm/linux.git/drivers/gpu/drm/panel/panel-raydium-rm67191.c: In function ‘rad_bl_update_status’:
/home/sam/drm/linux.git/drivers/gpu/drm/panel/panel-raydium-rm67191.c:492:17: warning: unused variable ‘dev’ [-Wunused-variable]
  struct device *dev = &dsi->dev;
                 ^~~

Please fix and update your scripts to catch this in the future.

Sam

author maintainer
#6 lore raw

Re: [EXT] Re: [PATCH v5 2/2] drm/panel: Add support for Raydium RM67191 panel driver

Hi Sam,

Quoted 22 lines · Sam Ravnborg

Hi Robert.

Quoted 3 lines · Robert Chiras

This patch adds Raydium RM67191 TFT LCD panel driver (MIPI-DSI protocol).

I was about to apply these - but I get following warnings during build:
  CC      drivers/gpu/drm/panel/panel-raydium-rm67191.o /home/sam/drm/linux.git/drivers/gpu/drm/panel/panel-raydium- rm67191.c: In function ‘rad_bl_get_brightness’:
/home/sam/drm/linux.git/drivers/gpu/drm/panel/panel-raydium- rm67191.c:470:17: warning: unused variable ‘dev’ [-Wunused-variable] struct device *dev = &dsi->dev;
                 ^~~ /home/sam/drm/linux.git/drivers/gpu/drm/panel/panel-raydium- rm67191.c: In function ‘rad_bl_update_status’:
/home/sam/drm/linux.git/drivers/gpu/drm/panel/panel-raydium- rm67191.c:492:17: warning: unused variable ‘dev’ [-Wunused-variable] struct device *dev = &dsi->dev;
                 ^~~

Quoted 1 line

Please fix and update your scripts to catch this in the future.

Oh, I am sorry about that, seems that I missed that :( Fixed and submitted.

Quoted 2 lines

        Sam

Thanks,
Robert