Describe the hardware behind the EVK's eDP connector: the panel on the
transmitter's AUX bus and the display graph from the DVO through the
transmitter to it, the panel's 3.3 V supply and the backlight's 12 V
supply, the backlight driven from PWM1, and the pin configurations for
the PWM, the hot plug detect line, the two regulator enables and the
backlight enable.

Each of the three enable lines gets a pin group that drives it low, so
neither supply nor the backlight turns on before its consumer claims
the GPIO.

All of it is disabled, because the board drives the DSI panel by
default and the two share the display pipeline.

Signed-off-by: David Lechner <[email protected]>
---
 arch/arm/dts/mt8371-genio-common.dtsi | 134 ++++++++++++++++++++++++++++++++++
 1 file changed, 134 insertions(+)

diff --git a/arch/arm/dts/mt8371-genio-common.dtsi 
b/arch/arm/dts/mt8371-genio-common.dtsi
index 95391a0585c..f6c0754d0ad 100644
--- a/arch/arm/dts/mt8371-genio-common.dtsi
+++ b/arch/arm/dts/mt8371-genio-common.dtsi
@@ -63,6 +63,44 @@
                default-brightness-level = <576>;
        };
 
+       backlight_lcd1: backlight-lcd1 {
+               compatible = "pwm-backlight";
+               pwms = <&disp_pwm1 0 500000>;
+               brightness-levels = <0 1023>;
+               num-interpolated-steps = <1023>;
+               default-brightness-level = <576>;
+               power-supply = <&reg_edp_backlight_12v>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&edp_backlight_en_pins>;
+               enable-gpios = <&pio 108 GPIO_ACTIVE_HIGH>;
+               post-pwm-on-delay-ms = <1>;
+               status = "disabled";
+       };
+
+       reg_edp_panel_3v3: regulator-edp-panel-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "edp-panel-3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&edp_panel_3v3_en_pins>;
+               gpio = <&pio 109 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+               status = "disabled";
+       };
+
+       reg_edp_backlight_12v: regulator-edp-backlight-12v {
+               compatible = "regulator-fixed";
+               regulator-name = "edp-backlight-12v";
+               regulator-min-microvolt = <12000000>;
+               regulator-max-microvolt = <12000000>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&edp_backlight_12v_en_pins>;
+               gpio = <&pio 110 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+               status = "disabled";
+       };
+
        reg_dsi0_vdd: regulator-dsi0-vdd {
                compatible = "regulator-fixed";
                regulator-name = "dsi0-vdd";
@@ -150,6 +188,21 @@
        status = "okay";
 };
 
+&disp_dvo0 {
+       ports {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               port@1 {
+                       reg = <1>;
+
+                       dvo0_out: endpoint {
+                               remote-endpoint = <&edp_in>;
+                       };
+               };
+       };
+};
+
 &disp_ovl0_4l {
        status = "okay";
 };
@@ -160,6 +213,11 @@
        status = "okay";
 };
 
+&disp_pwm1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&disp_pwm1_pins>;
+};
+
 &disp_rdma0 {
        status = "okay";
 };
@@ -200,6 +258,47 @@
        };
 };
 
+&edp_tx {
+       pinctrl-names = "default";
+       pinctrl-0 = <&edp_hpd_pins>;
+
+       aux-bus {
+               panel {
+                       compatible = "edp-panel";
+                       power-supply = <&reg_edp_panel_3v3>;
+                       backlight = <&backlight_lcd1>;
+
+                       port {
+                               edp_panel_in: endpoint {
+                                       remote-endpoint = <&edp_out>;
+                               };
+                       };
+               };
+       };
+
+       ports {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               port@0 {
+                       reg = <0>;
+
+                       edp_in: endpoint {
+                               remote-endpoint = <&dvo0_out>;
+                       };
+               };
+
+               port@1 {
+                       reg = <1>;
+
+                       edp_out: endpoint {
+                               remote-endpoint = <&edp_panel_in>;
+                               data-lanes = <0 1 2 3>;
+                       };
+               };
+       };
+};
+
 &mipi_tx_config0 {
        status = "okay";
 };
@@ -269,6 +368,13 @@
                };
        };
 
+       disp_pwm1_pins: disp-pwm1-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO30__FUNC_DISP_PWM1>;
+                       output-high;
+               };
+       };
+
        dsi0_iovcc_pins: dsi0-iovcc-pins {
                pins {
                        pinmux = <PINMUX_GPIO58__FUNC_GPIO58>;
@@ -290,6 +396,34 @@
                };
        };
 
+       edp_backlight_12v_en_pins: edp-backlight-12v-en-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO110__FUNC_GPIO110>;
+                       output-low;
+               };
+       };
+
+       edp_backlight_en_pins: edp-backlight-en-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO108__FUNC_GPIO108>;
+                       output-low;
+               };
+       };
+
+       edp_hpd_pins: edp-hpd-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO28__FUNC_EDP_TX_HPD>;
+                       bias-pull-up;
+               };
+       };
+
+       edp_panel_3v3_en_pins: edp-panel-3v3-en-pins {
+               pins {
+                       pinmux = <PINMUX_GPIO109__FUNC_GPIO109>;
+                       output-low;
+               };
+       };
+
        panel0_pins: panel0-pins {
                pins {
                        pinmux = <PINMUX_GPIO13__FUNC_GPIO13>,

-- 
2.53.0

Reply via email to