Link panel and display controller.
Enable panel, backlight and display controller.

Signed-off-by: Raphael Gallais-Pou <raphael.gallais-...@foss.st.com>

---
Changes in v2:
  - Fixed dtbs_check warnings :
arch/arm/boot/dts/st/stm32mp135f-dk.dtb: panel-backlight: 
'default-brightness-level' does not match any of the regexes: 'pinctrl-[0-9]+'
  from schema $id: 
http://devicetree.org/schemas/leds/backlight/gpio-backlight.yaml#
arch/arm/boot/dts/st/stm32mp135f-dk.dtb: panel-rgb: data-mapping:0: 'bgr666' is 
not one of ['jeida-18', 'jeida-24', 'vesa-24']
  from schema $id: 
http://devicetree.org/schemas/display/panel/panel-simple.yaml#
arch/arm/boot/dts/st/stm32mp135f-dk.dtb: panel-rgb: compatible: 
['rocktech,rk043fn48h', 'panel-dpi'] is too long
  from schema $id: 
http://devicetree.org/schemas/display/panel/panel-simple.yaml#
arch/arm/boot/dts/st/stm32mp135f-dk.dtb: panel-rgb: data-mapping: False schema 
does not allow ['bgr666']
  from schema $id: 
http://devicetree.org/schemas/display/panel/panel-simple.yaml#
---
 arch/arm/boot/dts/st/stm32mp135f-dk.dts | 53 +++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/arch/arm/boot/dts/st/stm32mp135f-dk.dts 
b/arch/arm/boot/dts/st/stm32mp135f-dk.dts
index eea740d097c7..c918f332cbfd 100644
--- a/arch/arm/boot/dts/st/stm32mp135f-dk.dts
+++ b/arch/arm/boot/dts/st/stm32mp135f-dk.dts
@@ -66,6 +66,46 @@ led-blue {
                        default-state = "off";
                };
        };
+
+       panel_backlight: panel-backlight {
+               compatible = "gpio-backlight";
+               gpios = <&gpioe 12 GPIO_ACTIVE_HIGH>;
+               default-on;
+               status = "okay";
+       };
+
+       panel_rgb: panel-rgb {
+               compatible = "rocktech,rk043fn48h";
+               enable-gpios = <&gpioi 7 GPIO_ACTIVE_HIGH>;
+               backlight = <&panel_backlight>;
+               power-supply = <&scmi_v3v3_sw>;
+               status = "okay";
+
+               width-mm = <105>;
+               height-mm = <67>;
+
+               panel-timing {
+                       clock-frequency = <10000000>;
+                       hactive = <480>;
+                       hback-porch = <43>;
+                       hfront-porch = <10>;
+                       hsync-len = <1>;
+                       hsync-active = <0>;
+                       vactive = <272>;
+                       vback-porch = <26>;
+                       vfront-porch = <4>;
+                       vsync-len = <10>;
+                       vsync-active = <0>;
+                       de-active = <1>;
+                       pixelclk-active = <1>;
+               };
+
+               port {
+                       panel_in_rgb: endpoint {
+                               remote-endpoint = <&ltdc_out_rgb>;
+                       };
+               };
+       };
 };
 
 &adc_1 {
@@ -160,6 +200,19 @@ &iwdg2 {
        status = "okay";
 };
 
+&ltdc {
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&ltdc_pins_a>;
+       pinctrl-1 = <&ltdc_sleep_pins_a>;
+       status = "okay";
+
+       port {
+               ltdc_out_rgb: endpoint {
+                       remote-endpoint = <&panel_in_rgb>;
+               };
+       };
+};
+
 &rtc {
        status = "okay";
 };

-- 
2.25.1

Reply via email to