linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: imx6sx-sdb: Add DRM panel, power-enable and backlight support
@ 2017-11-30 13:02 Marco Franchi
  2017-12-01 20:27 ` Fabio Estevam
  0 siblings, 1 reply; 2+ messages in thread
From: Marco Franchi @ 2017-11-30 13:02 UTC (permalink / raw)
  To: shawnguo
  Cc: robh+dt, linux-arm-kernel, linux-kernel, devicetree, festevam,
	marcofrk, Marco Franchi

It is preferred to use the panel compatible string rather than passing 
the LCD timming in the device tree.

So pass the "sii,43wvf1g" compatible string, a new driver for the Seiko 
Panel, which describes the parallel LCD.

This new driver needs two power supply, so pass 'dvdd-supply' and 
'avdd-supply', which makes the kernel to turn on the LCD on is own.

Also, pass the 'backlight' property as described in 
Documentation/devicetree/bindings/display/panel/simple-panel.txt

Signed-off-by: Marco Franchi <marco.franchi@nxp.com>
---
 arch/arm/boot/dts/imx6sx-sdb.dtsi | 49 ++++++++++++++++++++-------------------
 1 file changed, 25 insertions(+), 24 deletions(-)

diff --git a/arch/arm/boot/dts/imx6sx-sdb.dtsi b/arch/arm/boot/dts/imx6sx-sdb.dtsi
index da81552..3a597a4 100644
--- a/arch/arm/boot/dts/imx6sx-sdb.dtsi
+++ b/arch/arm/boot/dts/imx6sx-sdb.dtsi
@@ -24,7 +24,7 @@
 		reg = <0x80000000 0x40000000>;
 	};
 
-	backlight {
+	backlight_display: backlight-display {
 		compatible = "pwm-backlight";
 		pwms = <&pwm3 0 5000000>;
 		brightness-levels = <0 4 8 16 32 64 128 255>;
@@ -129,6 +129,14 @@
 			regulator-max-microvolt = <3300000>;
 			gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
 		};
+
+		reg_lcd_5v: regulator@7 {
+			compatible = "regulator-fixed";
+			reg = <7>;
+			regulator-name = "lcd-5v0";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+		};
 	};
 
 	sound {
@@ -146,6 +154,19 @@
 		mux-int-port = <2>;
 		mux-ext-port = <6>;
 	};
+
+	panel {
+		compatible = "sii,43wvf1g";
+		backlight = <&backlight_display>;
+		dvdd-supply = <&reg_lcd_3v3>;
+		avdd-supply = <&reg_lcd_5v>;
+
+		port {
+			panel_in: endpoint {
+				remote-endpoint = <&display_out>;
+			};
+		};
+	};
 };
 
 &audmux {
@@ -215,31 +236,11 @@
 &lcdif1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_lcd>;
-	lcd-supply = <&reg_lcd_3v3>;
-	display = <&display0>;
 	status = "okay";
 
-	display0: display0 {
-		bits-per-pixel = <16>;
-		bus-width = <24>;
-
-		display-timings {
-			native-mode = <&timing0>;
-			timing0: timing0 {
-				clock-frequency = <33500000>;
-				hactive = <800>;
-				vactive = <480>;
-				hback-porch = <89>;
-				hfront-porch = <164>;
-				vback-porch = <23>;
-				vfront-porch = <10>;
-				hsync-len = <10>;
-				vsync-len = <10>;
-				hsync-active = <0>;
-				vsync-active = <0>;
-				de-active = <1>;
-				pixelclk-active = <0>;
-			};
+	port {
+		display_out: endpoint {
+			remote-endpoint = <&panel_in>;
 		};
 	};
 };
-- 
2.7.4

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

* Re: [PATCH] ARM: dts: imx6sx-sdb: Add DRM panel, power-enable and backlight support
  2017-11-30 13:02 [PATCH] ARM: dts: imx6sx-sdb: Add DRM panel, power-enable and backlight support Marco Franchi
@ 2017-12-01 20:27 ` Fabio Estevam
  0 siblings, 0 replies; 2+ messages in thread
From: Fabio Estevam @ 2017-12-01 20:27 UTC (permalink / raw)
  To: Marco Franchi
  Cc: Shawn Guo, robh+dt, linux-arm-kernel, linux-kernel, devicetree,
	Marco Antonio Franchi

The Subject could be improved to something like: Convert from fbdev to
drm bindings

On Thu, Nov 30, 2017 at 11:02 AM, Marco Franchi <marco.franchi@nxp.com> wrote:
> It is preferred to use the panel compatible string rather than passing
> the LCD timming in the device tree.

Typo: timing

>
> So pass the "sii,43wvf1g" compatible string, a new driver for the Seiko
> Panel, which describes the parallel LCD.

Please remove the "a new driver for the Seiko Panel".

>
> This new driver needs two power supply, so pass 'dvdd-supply' and
> 'avdd-supply', which makes the kernel to turn on the LCD on is own.

I would remove this too.

>
> Also, pass the 'backlight' property as described in
> Documentation/devicetree/bindings/display/panel/simple-panel.txt
>
> Signed-off-by: Marco Franchi <marco.franchi@nxp.com>
> ---
>  arch/arm/boot/dts/imx6sx-sdb.dtsi | 49 ++++++++++++++++++++-------------------
>  1 file changed, 25 insertions(+), 24 deletions(-)
>
> diff --git a/arch/arm/boot/dts/imx6sx-sdb.dtsi b/arch/arm/boot/dts/imx6sx-sdb.dtsi
> index da81552..3a597a4 100644
> --- a/arch/arm/boot/dts/imx6sx-sdb.dtsi
> +++ b/arch/arm/boot/dts/imx6sx-sdb.dtsi
> @@ -24,7 +24,7 @@
>                 reg = <0x80000000 0x40000000>;
>         };
>
> -       backlight {
> +       backlight_display: backlight-display {
>                 compatible = "pwm-backlight";
>                 pwms = <&pwm3 0 5000000>;
>                 brightness-levels = <0 4 8 16 32 64 128 255>;
> @@ -129,6 +129,14 @@
>                         regulator-max-microvolt = <3300000>;
>                         gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
>                 };
> +
> +               reg_lcd_5v: regulator@7 {
> +                       compatible = "regulator-fixed";
> +                       reg = <7>;
> +                       regulator-name = "lcd-5v0";
> +                       regulator-min-microvolt = <5000000>;
> +                       regulator-max-microvolt = <5000000>;
> +               };

I have sent a patch that removes the regulators from simple-panel.

Please use linux-next when you send a v2.

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

end of thread, other threads:[~2017-12-01 20:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-30 13:02 [PATCH] ARM: dts: imx6sx-sdb: Add DRM panel, power-enable and backlight support Marco Franchi
2017-12-01 20:27 ` Fabio Estevam

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).