ARM: dts: exynos: add panel and backlight to p4note
authorMartin Jücker <martin.juecker@gmail.com>
Mon, 16 May 2022 19:37:09 +0000 (21:37 +0200)
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 6 Jun 2022 08:27:16 +0000 (10:27 +0200)
Add configuration for the LTL101AL01 panel and a pwm backlight to drive
the display in the p4note devices.

Signed-off-by: Martin Jücker <martin.juecker@gmail.com>
Link: https://lore.kernel.org/r/20220516193709.10037-3-martin.juecker@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
arch/arm/boot/dts/exynos4412-p4note.dtsi

index 97f131b..1fd051b 100644 (file)
                regulator-always-on;
        };
 
+       panel_vdd: voltage-regulator-4 {
+               compatible = "regulator-fixed";
+               regulator-name = "LCD_ENABLE";
+               pinctrl-names = "default";
+               pinctrl-0 = <&lcd_enable>;
+               gpios = <&gpc0 1 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+               regulator-boot-on;
+       };
+
        wlan_pwrseq: sdhci3-pwrseq {
                compatible = "mmc-pwrseq-simple";
                reset-gpios = <&gpm3 5 GPIO_ACTIVE_LOW>;
                        monitored-battery = <&battery_cell>;
                };
        };
+
+       panel {
+               compatible = "samsung,ltl101al01";
+               pinctrl-0 = <&lvds_nshdn>;
+               pinctrl-names = "default";
+               power-supply = <&panel_vdd>;
+               enable-gpios = <&gpm0 5 GPIO_ACTIVE_HIGH>;
+               backlight = <&backlight>;
+
+               port {
+                       lcd_ep: endpoint {
+                               remote-endpoint = <&fimd_ep>;
+                       };
+               };
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pinctrl-0 = <&led_bl_reset>;
+               pinctrl-names = "default";
+               enable-gpios = <&gpm0 1 GPIO_ACTIVE_HIGH>;
+               pwms = <&pwm 1 78770 0>;
+               brightness-levels = <0 48 128 255>;
+               num-interpolated-steps = <8>;
+               default-brightness-level = <12>;
+       };
 };
 
 &adc {
 };
 
 &fimd {
-       pinctrl-0 = <&lcd_clk &lcd_data24 &pwm1_out>;
+       pinctrl-0 = <&lcd_clk &lcd_data24>;
        pinctrl-names = "default";
+       #address-cells = <1>;
+       #size-cells = <0>;
        status = "okay";
 
-       display-timings {
-               timing0 {
-                       clock-frequency = <66666666>;
-                       hactive = <1280>;
-                       vactive = <800>;
-                       hfront-porch = <18>;
-                       hback-porch = <36>;
-                       hsync-len = <16>;
-                       vback-porch = <16>;
-                       vfront-porch = <4>;
-                       vsync-len = <3>;
-                       hsync-active = <1>;
+       samsung,invert-vclk;
+
+       port@3 {
+               reg = <3>;
+
+               fimd_ep: endpoint {
+                       remote-endpoint = <&lcd_ep>;
                };
        };
 };
                samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
        };
 
+       lcd_enable: lcd-enable-pins {
+               samsung,pins = "gpc0-1";
+               samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+       };
+
        sleep0: sleep-state {
                PIN_SLP(gpa0-0, INPUT, NONE);
                PIN_SLP(gpa0-1, OUT0, NONE);
                /* 0 = CP, 1 = AP (serial output) */
        };
 
+       led_bl_reset: led-bl-reset-pins {
+               samsung,pins = "gpm0-1";
+               samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+       };
+
        tsp_rst: tsp-rst-pins {
                samsung,pins = "gpm0-4";
                samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
                samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
        };
 
+       lvds_nshdn: lvds-nshdn-pins {
+               samsung,pins = "gpm0-5";
+               samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+       };
+
        tsp_irq: tsp-irq-pins {
                samsung,pins = "gpm2-3";
                samsung,pin-function = <EXYNOS_PIN_FUNC_F>;
        assigned-clock-parents = <&clock CLK_XUSBXTI>;
 };
 
+&pwm {
+       pinctrl-0 = <&pwm1_out>;
+       pinctrl-names = "default";
+       samsung,pwm-outputs = <1>;
+       status = "okay";
+};
+
 &rtc {
        clocks = <&clock CLK_RTC>, <&max77686 MAX77686_CLK_AP>;
        clock-names = "rtc", "rtc_src";