LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v2 1/3] dt-bindings: display: Document FriendlyELEC HD702E LCD panel
@ 2019-05-07 13:07 Jagan Teki
  2019-05-07 13:07 ` [PATCH v2 2/3] drm/panel: simple: Add FriendlyELEC HD702E 800x1280 " Jagan Teki
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jagan Teki @ 2019-05-07 13:07 UTC (permalink / raw)
  To: Heiko Stuebner, Rob Herring, Mark Rutland
  Cc: linux-arm-kernel, linux-rockchip, devicetree, linux-kernel,
	linux-amarula, Jagan Teki, Thierry Reding, Sam Ravnborg,
	David Airlie, Daniel Vetter, dri-devel

HD702E lcd is FriendlyELEC developed eDP LCD panel with 800x1280
resolution. It has built in Goodix, GT9271 captive touchscreen
with backlight adjustable via PWM.

Add dt-bindings documentation for it.
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v2:
- separate binding patch from driver
- Add simple-panel compatible as fallback
- Add text info about simple-panel bindings

 .../display/panel/friendlyarm,hd702e.txt      | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/friendlyarm,hd702e.txt

diff --git a/Documentation/devicetree/bindings/display/panel/friendlyarm,hd702e.txt b/Documentation/devicetree/bindings/display/panel/friendlyarm,hd702e.txt
new file mode 100644
index 000000000000..6c9156fc3478
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/friendlyarm,hd702e.txt
@@ -0,0 +1,32 @@
+FriendlyELEC HD702E 800x1280 LCD panel
+
+HD702E lcd is FriendlyELEC developed eDP LCD panel with 800x1280
+resolution. It has built in Goodix, GT9271 captive touchscreen
+with backlight adjustable via PWM.
+
+Required properties:
+- compatible: should be "friendlyarm,hd702e"
+- power-supply: regulator to provide the supply voltage
+
+Optional properties:
+- backlight: phandle of the backlight device attached to the panel
+
+Optional nodes:
+- Video port for LCD panel input.
+
+This binding is compatible with the simple-panel binding, which is specified
+in simple-panel.txt in this directory.
+
+Example:
+
+	panel {
+		compatible ="friendlyarm,hd702e", "simple-panel";
+		backlight = <&backlight>;
+		power-supply = <&vcc3v3_sys>;
+
+		port {
+			panel_in_edp: endpoint {
+				remote-endpoint = <&edp_out_panel>;
+			};
+		};
+	};
-- 
2.18.0.321.gffc6fa0e3


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 2/3] drm/panel: simple: Add FriendlyELEC HD702E 800x1280 LCD panel
  2019-05-07 13:07 [PATCH v2 1/3] dt-bindings: display: Document FriendlyELEC HD702E LCD panel Jagan Teki
@ 2019-05-07 13:07 ` Jagan Teki
  2019-05-07 18:03   ` Sam Ravnborg
  2019-05-07 13:07 ` [DO NOT MERGE] [PATCH v2 3/3] arm64: rockchip: rk3399: nanopc-t4: Enable FriendlyELEC HD702E eDP panel Jagan Teki
  2019-05-07 18:03 ` [PATCH v2 1/3] dt-bindings: display: Document FriendlyELEC HD702E LCD panel Sam Ravnborg
  2 siblings, 1 reply; 5+ messages in thread
From: Jagan Teki @ 2019-05-07 13:07 UTC (permalink / raw)
  To: Heiko Stuebner, Rob Herring, Mark Rutland
  Cc: linux-arm-kernel, linux-rockchip, devicetree, linux-kernel,
	linux-amarula, Jagan Teki, Thierry Reding, Sam Ravnborg,
	David Airlie, Daniel Vetter, dri-devel

HD702E lcd is FriendlyELEC developed eDP LCD panel with 800x1280
resolution. It has built in Goodix, GT9271 captive touchscreen
with backlight adjustable via PWM.

Add support for it.

Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v2:
- separate it from binding patch
- sort the match id and compatible 

 drivers/gpu/drm/panel/panel-simple.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 9e8218f6a3f2..93274e270663 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -1184,6 +1184,29 @@ static const struct panel_desc foxlink_fl500wvr00_a0t = {
 	.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
 };
 
+static const struct drm_display_mode friendlyarm_hd702e_mode = {
+	.clock		= 67185,
+	.hdisplay	= 800,
+	.hsync_start	= 800 + 20,
+	.hsync_end	= 800 + 20 + 24,
+	.htotal		= 800 + 20 + 24 + 20,
+	.vdisplay	= 1280,
+	.vsync_start	= 1280 + 4,
+	.vsync_end	= 1280 + 4 + 8,
+	.vtotal		= 1280 + 4 + 8 + 4,
+	.vrefresh	= 60,
+	.flags		= DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
+};
+
+static const struct panel_desc friendlyarm_hd702e = {
+	.modes = &friendlyarm_hd702e_mode,
+	.num_modes = 1,
+	.size = {
+		.width	= 94,
+		.height	= 151,
+	},
+};
+
 static const struct drm_display_mode giantplus_gpg482739qs5_mode = {
 	.clock = 9000,
 	.hdisplay = 480,
@@ -2637,6 +2660,9 @@ static const struct of_device_id platform_of_match[] = {
 	}, {
 		.compatible = "foxlink,fl500wvr00-a0t",
 		.data = &foxlink_fl500wvr00_a0t,
+	}, {
+		.compatible = "friendlyarm,hd702e",
+		.data = &friendlyarm_hd702e,
 	}, {
 		.compatible = "giantplus,gpg482739qs5",
 		.data = &giantplus_gpg482739qs5
-- 
2.18.0.321.gffc6fa0e3


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [DO NOT MERGE] [PATCH v2 3/3] arm64: rockchip: rk3399: nanopc-t4: Enable FriendlyELEC HD702E eDP panel
  2019-05-07 13:07 [PATCH v2 1/3] dt-bindings: display: Document FriendlyELEC HD702E LCD panel Jagan Teki
  2019-05-07 13:07 ` [PATCH v2 2/3] drm/panel: simple: Add FriendlyELEC HD702E 800x1280 " Jagan Teki
@ 2019-05-07 13:07 ` Jagan Teki
  2019-05-07 18:03 ` [PATCH v2 1/3] dt-bindings: display: Document FriendlyELEC HD702E LCD panel Sam Ravnborg
  2 siblings, 0 replies; 5+ messages in thread
From: Jagan Teki @ 2019-05-07 13:07 UTC (permalink / raw)
  To: Heiko Stuebner, Rob Herring, Mark Rutland
  Cc: linux-arm-kernel, linux-rockchip, devicetree, linux-kernel,
	linux-amarula, Jagan Teki, Thierry Reding, Sam Ravnborg,
	David Airlie, Daniel Vetter, dri-devel

FriendlyELEC HD702E is one of optional LCD panel for
NanoPC T4 eDP interface.

It features 800x1280 resolutions, with built in GT9271 captive
touchscreen and adjustable backlight via PWM.

eDP panel connections are:
- VCC3V3_SYS: 3.3V panel power supply
- GPIO4_C2: PWM0_BL pin
- GPIO4_D5_LCD_BL_EN: Backlight enable pin
- VCC12V0_SYS: 12V backlight power supply
- Touchscreen connected via I2C4
- GPIO1_C4_TP_INT: touchscreen interrupt pin
- GPIO1_B5_TP_RST: touchscreen reset pin

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v2:
- use force-hpd and delete-property for edp
- use generic backlight brightness
- add simple-panel fallback compatible

 .../boot/dts/rockchip/rk3399-nanopc-t4.dts    | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts b/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts
index 931c3dbf1b7d..4cacd09658dc 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts
@@ -46,6 +46,14 @@
 		};
 	};
 
+	backlight: backlight {
+		compatible = "pwm-backlight";
+		enable-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>;	/* GPIO4_D5_LCD_BL_EN */
+		pwms = <&pwm0 0 25000 0>;
+		power-supply = <&vcc12v0_sys>;
+		status = "okay";
+	};
+
 	ir-receiver {
 		compatible = "gpio-ir-receiver";
 		gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
@@ -64,6 +72,18 @@
 		fan-supply = <&vcc12v0_sys>;
 		pwms = <&pwm1 0 50000 0>;
 	};
+
+	panel {
+		compatible ="friendlyarm,hd702e", "simple-panel";
+		backlight = <&backlight>;
+		power-supply = <&vcc3v3_sys>;
+
+		port {
+			panel_in_edp: endpoint {
+				remote-endpoint = <&edp_out_panel>;
+			};
+		};
+	};
 };
 
 &cpu_thermal {
@@ -94,6 +114,25 @@
 	};
 };
 
+&edp {
+	status = "okay";
+	force-hpd;
+	/delete-property/ pinctrl-0;
+
+	ports {
+		edp_out: port@1 {
+			reg = <1>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			edp_out_panel: endpoint@0 {
+				reg = <0>;
+				remote-endpoint = <&panel_in_edp>;
+			};
+		};
+	};
+};
+
 &gpu_thermal {
 	trips {
 		gpu_warm: gpu_warm {
@@ -130,6 +169,17 @@
 	};
 };
 
+&i2c4 {
+	touchscreen@5d {
+		compatible = "goodix,gt911";
+		reg = <0x5d>;
+		interrupt-parent = <&gpio1>;
+		interrupts = <RK_PC4 IRQ_TYPE_EDGE_FALLING>;
+		irq-gpio = <&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>;	/* GPIO1_C4_TP_INT */
+		reset-gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>;	/* GPIO1_B5_TP_RST */
+	};
+};
+
 &sdhci {
 	mmc-hs400-1_8v;
 	mmc-hs400-enhanced-strobe;
-- 
2.18.0.321.gffc6fa0e3


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: display: Document FriendlyELEC HD702E LCD panel
  2019-05-07 13:07 [PATCH v2 1/3] dt-bindings: display: Document FriendlyELEC HD702E LCD panel Jagan Teki
  2019-05-07 13:07 ` [PATCH v2 2/3] drm/panel: simple: Add FriendlyELEC HD702E 800x1280 " Jagan Teki
  2019-05-07 13:07 ` [DO NOT MERGE] [PATCH v2 3/3] arm64: rockchip: rk3399: nanopc-t4: Enable FriendlyELEC HD702E eDP panel Jagan Teki
@ 2019-05-07 18:03 ` Sam Ravnborg
  2 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2019-05-07 18:03 UTC (permalink / raw)
  To: Jagan Teki
  Cc: Heiko Stuebner, Rob Herring, Mark Rutland, linux-arm-kernel,
	linux-rockchip, devicetree, linux-kernel, linux-amarula,
	Thierry Reding, David Airlie, Daniel Vetter, dri-devel

On Tue, May 07, 2019 at 06:37:06PM +0530, Jagan Teki wrote:
> HD702E lcd is FriendlyELEC developed eDP LCD panel with 800x1280
> resolution. It has built in Goodix, GT9271 captive touchscreen
> with backlight adjustable via PWM.
> 
> Add dt-bindings documentation for it.
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: dri-devel@lists.freedesktop.org
> Reviewed-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Patch applied to drm-misc-next

	Sam

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 2/3] drm/panel: simple: Add FriendlyELEC HD702E 800x1280 LCD panel
  2019-05-07 13:07 ` [PATCH v2 2/3] drm/panel: simple: Add FriendlyELEC HD702E 800x1280 " Jagan Teki
@ 2019-05-07 18:03   ` Sam Ravnborg
  0 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2019-05-07 18:03 UTC (permalink / raw)
  To: Jagan Teki
  Cc: Heiko Stuebner, Rob Herring, Mark Rutland, linux-arm-kernel,
	linux-rockchip, devicetree, linux-kernel, linux-amarula,
	Thierry Reding, David Airlie, Daniel Vetter, dri-devel

On Tue, May 07, 2019 at 06:37:07PM +0530, Jagan Teki wrote:
> HD702E lcd is FriendlyELEC developed eDP LCD panel with 800x1280
> resolution. It has built in Goodix, GT9271 captive touchscreen
> with backlight adjustable via PWM.
> 
> Add support for it.
> 
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: dri-devel@lists.freedesktop.org
> Reviewed-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Patch applied to drm-misc-next

	Sam

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-05-07 18:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-07 13:07 [PATCH v2 1/3] dt-bindings: display: Document FriendlyELEC HD702E LCD panel Jagan Teki
2019-05-07 13:07 ` [PATCH v2 2/3] drm/panel: simple: Add FriendlyELEC HD702E 800x1280 " Jagan Teki
2019-05-07 18:03   ` Sam Ravnborg
2019-05-07 13:07 ` [DO NOT MERGE] [PATCH v2 3/3] arm64: rockchip: rk3399: nanopc-t4: Enable FriendlyELEC HD702E eDP panel Jagan Teki
2019-05-07 18:03 ` [PATCH v2 1/3] dt-bindings: display: Document FriendlyELEC HD702E LCD panel Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).