]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ARM: dts: sun8i: a711: Enable the LCD
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Mon, 24 Jul 2017 16:54:20 +0000 (18:54 +0200)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Fri, 5 Jan 2018 08:54:34 +0000 (09:54 +0100)
The A711 has 1024x600 LVDS panel, with a PWM-based backlight. Add it to our
DT.

Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts

index 98715538932f10bd048b355b4f7bb5bfc183a7cd..d86876ed244fbdb163d3131a53d8fb8731599eb9 100644 (file)
@@ -45,6 +45,7 @@
 #include "sun8i-a83t.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pwm/pwm.h>
 
 / {
        model = "TBS A711 Tablet";
                stdout-path = "serial0:115200n8";
        };
 
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+               enable-gpios = <&pio 3 29 GPIO_ACTIVE_HIGH>;
+
+               brightness-levels = <0 1 2 4 8 16 32 64 128 255>;
+               default-brightness-level = <9>;
+       };
+
+       panel {
+               compatible = "tbs,a711-panel", "panel-lvds";
+               backlight = <&backlight>;
+               power-supply = <&reg_sw>;
+
+               width-mm = <153>;
+               height-mm = <90>;
+               data-mapping = "vesa-24";
+
+               panel-timing {
+                       /* 1024x600 @60Hz */
+                       clock-frequency = <52000000>;
+                       hactive = <1024>;
+                       vactive = <600>;
+                       hsync-len = <20>;
+                       hfront-porch = <180>;
+                       hback-porch = <160>;
+                       vfront-porch = <12>;
+                       vback-porch = <23>;
+                       vsync-len = <5>;
+               };
+
+               port {
+                       panel_input: endpoint {
+                               remote-endpoint = <&tcon0_out_lcd>;
+                       };
+               };
+       };
+
        reg_vbat: reg-vbat {
                compatible = "regulator-fixed";
                regulator-name = "vbat";
        };
 };
 
+&de {
+       status = "okay";
+};
+
 /*
  * An USB-2 hub is connected here, which also means we don't need to
  * enable the OHCI controller.
        status = "okay";
 };
 
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm_pin>;
+       status = "okay";
+};
+
 &r_rsb {
        status = "okay";
 
        regulator-name = "vcc-lcd";
 };
 
+&tcon0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&lcd_lvds_pins>;
+};
+
+&tcon0_out {
+       tcon0_out_lcd: endpoint@0 {
+               reg = <0>;
+               remote-endpoint = <&panel_input>;
+       };
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pb_pins>;