diff mbox series

arm64: dts: renesas: ulcb-kf: add KF HDMI output

Message ID 20211225115308.2152364-1-nikita.yoush@cogentembedded.com (mailing list archive)
State Accepted
Delegated to: Geert Uytterhoeven
Headers show
Series arm64: dts: renesas: ulcb-kf: add KF HDMI output | expand

Commit Message

Nikita Yushchenko Dec. 25, 2021, 11:53 a.m. UTC
This patch adds nodes needed to enable DRM video output over HDMI
connector located on KF board.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
---
 arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 93 ++++++++++++++++++++++++
 1 file changed, 93 insertions(+)

Comments

Geert Uytterhoeven Jan. 21, 2022, 10:07 a.m. UTC | #1
Hi Nikita,

On Sat, Dec 25, 2021 at 12:54 PM Nikita Yushchenko
<nikita.yoush@cogentembedded.com> wrote:
> This patch adds nodes needed to enable DRM video output over HDMI
> connector located on KF board.
>
> Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>

Thanks for your patch!

> --- a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
> +++ b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
> @@ -51,6 +51,31 @@ wlan_en: regulator-wlan_en {
>                 startup-delay-us = <70000>;
>                 enable-active-high;
>         };
> +
> +       hdmi_1v8: regulator-hdmi-1v8 {
> +               compatible = "regulator-fixed";
> +               regulator-name = "hdmi-1v8";
> +               regulator-min-microvolt = <1800000>;
> +               regulator-max-microvolt = <1800000>;
> +       };
> +
> +       hdmi_3v3: regulator-hdmi-3v3 {
> +               compatible = "regulator-fixed";
> +               regulator-name = "hdmi-3v3";
> +               regulator-min-microvolt = <3300000>;
> +               regulator-max-microvolt = <3300000>;
> +       };
> +
> +       hdmi1-out {

Sort order.

> +               compatible = "hdmi-connector";
> +               type = "a";
> +
> +               port {
> +                       hdmi1_con: endpoint {
> +                               remote-endpoint = <&adv7513_out>;
> +                       };
> +               };
> +       };
>  };
>
>  &can0 {

> @@ -236,6 +313,10 @@ gpio_exp_77: gpio@77 {
>         };
>  };
>
> +&du_out_rgb {

Sort order.

> +       remote-endpoint = <&adv7513_in>;
> +};
> +
>  &ohci0 {
>         dr_mode = "otg";
>         status = "okay";
> @@ -289,6 +370,18 @@ usb0_pins: usb0 {
>                 groups = "usb0";
>                 function = "usb0";
>         };
> +
> +       hdmi1_pins: hdmi1 {
> +               du {

More sort order.

> +                       groups = "du_rgb888", "du_sync", "du_clk_out_0", "du_disp";
> +                       function = "du";
> +               };
> +
> +               adv7513-interrupt {
> +                       pins = "GP_2_14";
> +                       bias-pull-up;
> +               };
> +       };
>  };

The rest looks good to me.
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v5.18 with the sort order fixed.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Nikita Yushchenko Jan. 21, 2022, 10:18 a.m. UTC | #2
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> i.e. will queue in renesas-devel for v5.18 with the sort order fixed.

Thank you.

I have a question regarding defining regulators.

In case when drivers expect regulators to be define, but physically chips are just wired to VCC (or to 
some non-programmable power logic), what is the policy regarding regulator-fixed objects?

Shall we define per-consumer regulator-fixed objects?
Or have a single regulator-fixed for each voltage?
Or not define regulators at all and let the code to create dummy regulators?
Or something else?

Nikita
Geert Uytterhoeven Jan. 21, 2022, 12:07 p.m. UTC | #3
Hi Nikita,

CC Mark.

On Fri, Jan 21, 2022 at 11:18 AM Nikita Yushchenko
<nikita.yoush@cogentembedded.com> wrote:
> > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > i.e. will queue in renesas-devel for v5.18 with the sort order fixed.
>
> Thank you.
>
> I have a question regarding defining regulators.
>
> In case when drivers expect regulators to be define, but physically chips are just wired to VCC (or to
> some non-programmable power logic), what is the policy regarding regulator-fixed objects?
>
> Shall we define per-consumer regulator-fixed objects?
> Or have a single regulator-fixed for each voltage?
> Or not define regulators at all and let the code to create dummy regulators?
> Or something else?

That's a good question.  I don't know if there is a policy. Mark?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
index 61bd4df09df0..a66301a4081d 100644
--- a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
+++ b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
@@ -51,6 +51,31 @@  wlan_en: regulator-wlan_en {
 		startup-delay-us = <70000>;
 		enable-active-high;
 	};
+
+	hdmi_1v8: regulator-hdmi-1v8 {
+		compatible = "regulator-fixed";
+		regulator-name = "hdmi-1v8";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+	};
+
+	hdmi_3v3: regulator-hdmi-3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "hdmi-3v3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+	};
+
+	hdmi1-out {
+		compatible = "hdmi-connector";
+		type = "a";
+
+		port {
+			hdmi1_con: endpoint {
+				remote-endpoint = <&adv7513_out>;
+			};
+		};
+	};
 };
 
 &can0 {
@@ -91,6 +116,58 @@  i2cswitch2: i2c-switch@71 {
 		reg = <0x71>;
 		reset-gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
 
+		/* HDMIoSDA, HDMIoSCL */
+		i2c@4 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <4>;
+
+			hdmi@3d {
+				compatible = "adi,adv7513";
+				reg = <0x3d>;
+
+				pinctrl-0 = <&hdmi1_pins>;
+				pinctrl-names = "default";
+
+				interrupt-parent = <&gpio2>;
+				interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
+
+				clocks = <&cs2000>;
+				clock-names = "cec";
+
+				pd-gpios = <&gpio_exp_75 5 GPIO_ACTIVE_LOW>;
+
+				avdd-supply = <&hdmi_1v8>;
+				dvdd-supply = <&hdmi_1v8>;
+				pvdd-supply = <&hdmi_1v8>;
+				dvdd-3v-supply = <&hdmi_3v3>;
+				bgvdd-supply = <&hdmi_1v8>;
+
+				adi,input-depth = <8>;
+				adi,input-colorspace = "rgb";
+				adi,input-clock = "1x";
+
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+						adv7513_in: endpoint {
+							remote-endpoint = <&du_out_rgb>;
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+						adv7513_out: endpoint {
+							remote-endpoint = <&hdmi1_con>;
+						};
+					};
+				};
+			};
+		};
+
 		/* Audio_SDA, Audio_SCL */
 		i2c@7 {
 			#address-cells = <1>;
@@ -236,6 +313,10 @@  gpio_exp_77: gpio@77 {
 	};
 };
 
+&du_out_rgb {
+	remote-endpoint = <&adv7513_in>;
+};
+
 &ohci0 {
 	dr_mode = "otg";
 	status = "okay";
@@ -289,6 +370,18 @@  usb0_pins: usb0 {
 		groups = "usb0";
 		function = "usb0";
 	};
+
+	hdmi1_pins: hdmi1 {
+		du {
+			groups = "du_rgb888", "du_sync", "du_clk_out_0", "du_disp";
+			function = "du";
+		};
+
+		adv7513-interrupt {
+			pins = "GP_2_14";
+			bias-pull-up;
+		};
+	};
 };
 
 &rcar_sound {