From: wens@csie.org (Chen-Yu Tsai)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/6] [DO NOT MERGE] ARM: dts: sun7i: bananapi-m1-plus: Enable Bananapi 7" 800x480 RGB LCD panel
Date: Thu, 19 Apr 2018 17:32:25 +0800 [thread overview]
Message-ID: <20180419093225.614-7-wens@csie.org> (raw)
In-Reply-To: <20180419093225.614-1-wens@csie.org>
The BPI-M1+ has an FPC connector for connecting an RGB (parallel) or
LVDS LCD panel. One of the compatible panels is a 7" 800x480 RGB panel
from Bananapi. The backlight can be controlled by driving a PWM signal
from the SoC at different duty cycles. The LCD enable pin does not seem
to do anything, but it is nevertheless included for completeness. There
is also a FT5306 capacitive touchscreen controller.
This should not be confused with the other 7" LCD that is LVDS based
and has a resolution of 1024x600.
This patch enables all of the above for the BPI-M1+.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
.../boot/dts/sun7i-a20-bananapi-m1-plus.dts | 61 +++++++++++++++++++
1 file changed, 61 insertions(+)
diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
index 763cb03033c4..58a923bfa6ef 100644
--- a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
@@ -47,6 +47,7 @@
#include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/pwm/pwm.h>
/ {
model = "Banana Pi BPI-M1-Plus";
@@ -71,6 +72,34 @@
};
};
+ lcd_backlight: lcd-backlight {
+ compatible = "pwm-backlight";
+ pwms = <&pwm 0 20000 PWM_POLARITY_INVERTED>; /* 50 kHz */
+ enable-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
+ brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
+ default-brightness-level = <8>;
+ };
+
+ lcd_panel: lcd-panel {
+ compatible = "bananapi,s070wv20-ct16", "simple-panel";
+ /* This doesn't do anything for this particular panel */
+ enable-gpios = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port at 0 {
+ reg = <0>;
+ backlight = <&lcd_backlight>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ lcd_panel_input: endpoint at 0 {
+ reg = <0>;
+ remote-endpoint = <&tcon0_out_lcd>;
+ };
+ };
+ };
+
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
@@ -173,6 +202,20 @@
status = "okay";
};
+&i2c3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c3_pins_a>;
+ status = "okay";
+
+ touchscreen at 38 {
+ compatible = "edt,edt-ft5306", "edt,edt-ft5x06";
+ reg = <0x38>;
+ interrupt-parent = <&pio>;
+ interrupts = <7 7 IRQ_TYPE_EDGE_FALLING>; /* PH7 */
+ reset-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */
+ };
+};
+
&ir0 {
pinctrl-names = "default";
pinctrl-0 = <&ir0_rx_pins_a>;
@@ -249,6 +292,12 @@
};
};
+&pwm {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm0_pins_a>;
+ status = "okay";
+};
+
®_dcdc2 {
regulator-always-on;
regulator-min-microvolt = <1000000>;
@@ -278,6 +327,18 @@
status = "okay";
};
+&tcon0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&lcd0_rgb888_pins>;
+};
+
+&tcon0_out {
+ tcon0_out_lcd: endpoint at 0 {
+ reg = <0>;
+ remote-endpoint = <&lcd_panel_input>;
+ };
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_a>;
--
2.17.0
next prev parent reply other threads:[~2018-04-19 9:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-19 9:32 [PATCH 0/6] drm/sun4i: Support color dithering for LCD panels Chen-Yu Tsai
2018-04-19 9:32 ` [PATCH 1/6] drm/sun4i: tcon: Pass drm_encoder * into sun4i_tcon0_mode_set_cpu Chen-Yu Tsai
2018-04-19 9:32 ` [PATCH 2/6] drm/sun4i: tcon: Rename Dithering related register macros Chen-Yu Tsai
2018-04-19 9:32 ` [PATCH 3/6] drm/sun4i: tcon: Add dithering support for RGB565/RGB666 LCD panels Chen-Yu Tsai
2018-04-19 13:31 ` Maxime Ripard
2018-04-19 9:32 ` [PATCH 4/6] drm/panel: simple: Add support for Banana Pi 7" S070WV20-CT16 panel Chen-Yu Tsai
2018-04-19 12:31 ` Giulio Benetti
2018-04-19 12:45 ` Chen-Yu Tsai
2018-04-19 13:15 ` Giulio Benetti
2018-04-24 16:42 ` Rob Herring
2018-05-14 18:03 ` Jagan Teki
2018-05-16 6:42 ` Chen-Yu Tsai
2018-05-16 7:20 ` Jagan Teki
2018-05-16 7:56 ` Chen-Yu Tsai
2018-04-19 9:32 ` [PATCH 5/6] ARM: dts: sun7i: add pinmux setting for RGB888 output for LCD0 Chen-Yu Tsai
2018-04-19 9:32 ` Chen-Yu Tsai [this message]
2018-09-05 13:24 ` [PATCH 0/6] drm/sun4i: Support color dithering for LCD panels Jagan Teki
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=20180419093225.614-7-wens@csie.org \
--to=wens@csie.org \
--cc=linux-arm-kernel@lists.infradead.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