mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Priit Laes <plaes@plaes.org>
To: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	dri-devel@lists.freedesktop.org, Jonathan Liu <net147@gmail.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	Chen-Yu Tsai <wens@csie.org>, Mark Rutland <mark.rutland@arm.com>,
	Rob Herring <robh+dt@kernel.org>, David Airlie <airlied@linux.ie>,
	Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Quentin Schulz <quentin.schulz@free-electrons.com>,
	linux-sunxi@googlegroups.com, Priit Laes <plaes@plaes.org>
Subject: [PATCH 8/8] ARM: dts: sun4i: gemei-g9: Add LVDS display support
Date: Sat, 11 Feb 2017 19:44:05 +0200	[thread overview]
Message-ID: <20170211174405.28395-9-plaes@plaes.org> (raw)
In-Reply-To: <20170211174405.28395-1-plaes@plaes.org>

Signed-off-by: Priit Laes <plaes@plaes.org>
---
 arch/arm/boot/dts/sun4i-a10-gemei-g9.dts | 95 +++++++++++++++++++++++++++++---
 1 file changed, 86 insertions(+), 9 deletions(-)

diff --git a/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts b/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts
index 9616cde..c19f906 100644
--- a/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts
+++ b/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 Priit Laes
+ * Copyright 2015-2017 Priit Laes
  *
  * Priit Laes <plaes@plaes.org>
  *
@@ -48,28 +48,69 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pwm/pwm.h>
 
 / {
 	model = "Gemei G9 Tablet";
 	compatible = "gemei,g9", "allwinner,sun4i-a10";
 
+	/*
+	 * TODO:
+	 *   2x cameras via CSI
+	 *   AXP battery management
+	 *   NAND
+	 *   OTG
+	 *   Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48
+	 *   HDMI output
+	 */
+
 	aliases {
 		serial0 = &uart0;
 	};
 
+	backlight: backlight {
+		compatible = "pwm-backlight";
+		pinctrl-names = "default";
+		pinctrl-0 = <&lcd_backlight_pin>;
+		/* TODO: Figure out proper parameters */
+		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
+		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
+		default-brightness-level = <8>;
+	};
+
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
+
+	panel: panel {
+		compatible = "lg,lp097x02-slq2";
+		pinctrl-names = "default";
+		pinctrl-0 = <&lcd_enable_pin &lcd_lvds0_pins>;
+		enable-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			panel_input: endpoint {
+				remote-endpoint = <&tcon0_out_panel>;
+			};
+		};
+	};
+
+	display-engine {
+		compatible = "allwinner,sun5i-a13-display-engine";
+		allwinner,pipelines = <&fe0>;
+	};
+};
+
+&be0 {
+	status = "okay";
 };
 
-/*
- * TODO:
- *   2x cameras via CSI
- *   AXP battery management
- *   NAND
- *   OTG
- *   Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48
- */
 &codec {
 	/* PH15 controls power to external amplifier (ft2012q) */
 	pinctrl-names = "default";
@@ -90,6 +131,10 @@
 	status = "okay";
 };
 
+&fe0 {
+	status = "okay";
+};
+
 &i2c0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c0_pins_a>;
@@ -159,6 +204,27 @@
 		pins = "PH15";
 		function = "gpio_out";
 	};
+
+	lcd_backlight_pin: lcd_backlight_pin@0 {
+		pins = "PH7";
+		function = "gpio_out";
+	};
+
+	lcd_enable_pin: lcd_enable_pin@0 {
+		pins = "PH8";
+		function = "gpio_out";
+	};
+
+	lcd_lvds0_pins: lcd_lvds0_pins@0 {
+		pins =  "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9";
+		function = "lvds0";
+	};
+};
+
+&pwm {
+        pinctrl-names = "default";
+        pinctrl-0 = <&pwm0_pins_a>;
+        status = "okay";
 };
 
 &reg_dcdc2 {
@@ -194,6 +260,17 @@
 	status = "okay";
 };
 
+&tcon0 {
+	mode = "lvds";
+	status = "okay";
+};
+
+&tcon0_out {
+	tcon0_out_panel: endpoint@1 {
+		reg = <0>;
+		remote-endpoint = <&panel_input>;
+	};
+};
 
 &uart0  {
 	pinctrl-names = "default";
-- 
2.9.3

      parent reply	other threads:[~2017-02-11 17:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-11 17:43 [PATCH 0/8] drm/sun4i: Add basic LVDS support for A10 Priit Laes
2017-02-11 17:43 ` [PATCH 1/8] ARM: sunxi_defconfig: Enable simple panel Priit Laes
2017-02-13  4:06   ` [linux-sunxi] " Chen-Yu Tsai
2017-02-11 17:43 ` [PATCH 2/8] ARM: sun4i: Add display blocks for the sun4i dtsi Priit Laes
2017-02-13  9:16   ` Maxime Ripard
2017-02-13  9:20     ` Chen-Yu Tsai
2017-02-13 16:46       ` [linux-sunxi] " Priit Laes
2017-02-14  8:24         ` Maxime Ripard
2017-02-11 17:44 ` [PATCH 3/8] drm/panel: simple: Add support for LG LP097x02-slq2 panel Priit Laes
2017-02-11 17:44 ` [PATCH 4/8] drm/sun4i: Add optional 'mode' property to TCON Priit Laes
2017-02-13  8:14   ` Maxime Ripard
2017-02-11 17:44 ` [PATCH 5/8] drm/sun4i: Add encoder type argument to sun4i_tcon0_mode_set Priit Laes
2017-02-13  8:32   ` Maxime Ripard
2017-02-11 17:44 ` [PATCH 6/8] drm/sun4i: Add initial LVDS stub Priit Laes
2017-02-11 17:44 ` [PATCH 7/8] drm/sun4i: Add various bits and pieces to enable LVDS support on sun4i Priit Laes
2017-02-13  8:08   ` Maxime Ripard
2017-02-11 17:44 ` Priit Laes [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170211174405.28395-9-plaes@plaes.org \
    --to=plaes@plaes.org \
    --cc=airlied@linux.ie \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=net147@gmail.com \
    --cc=quentin.schulz@free-electrons.com \
    --cc=robh+dt@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®