diff mbox series

[V2,3/3] arm64: dts: rockchip: Enable HDMI0 on Indiedroid Nova

Message ID 20241030192236.839105-4-macroalpha82@gmail.com (mailing list archive)
State New
Headers show
Series Indiedroid Nova Audio/HDMI Updates | expand

Commit Message

Chris Morgan Oct. 30, 2024, 7:22 p.m. UTC
From: Chris Morgan <macromorgan@hotmail.com>

Enable the HDMI0 port for the Indiedroid Nova. The schematics available
show the hdmim0_rx_hpdin is connected, so this pinctrl is enabled in
contrast with the other rk3588 boards.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 .../dts/rockchip/rk3588s-indiedroid-nova.dts  | 51 +++++++++++++++++++
 1 file changed, 51 insertions(+)

Comments

Jimmy Hon Oct. 31, 2024, 12:49 a.m. UTC | #1
On Wed, Oct 30, 2024 at 2:25 PM Chris Morgan <macroalpha82@gmail.com> wrote:
>
> From: Chris Morgan <macromorgan@hotmail.com>
>
> Enable the HDMI0 port for the Indiedroid Nova. The schematics available
> show the hdmim0_rx_hpdin is connected, so this pinctrl is enabled in
> contrast with the other rk3588 boards.

Which pin in the schematic [1] (page 24) does it refer to? It's not
obvious how to match it up.
The schematic looks the same as the Rock 5B schematic [2] (page 31)
and the Rock 5B dts uses the default pinctrl [3]

Note: The vendor kernel DTS doesn't modify the pinctrl either. [4]

If you try using the default pinctrl (not overriding), does HDMI not work?

Jimmy

[1] https://wiki.indiedroid.us/Nova/schematics
[2] https://dl.radxa.com/rock5/5b/docs/hw/radxa_rock_5b_v1450_schematic.pdf
[3] https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git/tree/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts?h=for-next&id=c8152f79c2dd8039e14073be76fdbce8760175da#n207
[4] https://github.com/stvhay/kernel/blob/batocera-rk3588-4.0/arch/arm64/boot/dts/rockchip/rk3588s-9tripod-x3588s.dtsi#L226
Heiko Stübner Oct. 31, 2024, 12:14 p.m. UTC | #2
Am Donnerstag, 31. Oktober 2024, 01:49:07 CET schrieb Jimmy Hon:
> On Wed, Oct 30, 2024 at 2:25 PM Chris Morgan <macroalpha82@gmail.com> wrote:
> >
> > From: Chris Morgan <macromorgan@hotmail.com>
> >
> > Enable the HDMI0 port for the Indiedroid Nova. The schematics available
> > show the hdmim0_rx_hpdin is connected, so this pinctrl is enabled in
> > contrast with the other rk3588 boards.
> 
> Which pin in the schematic [1] (page 24) does it refer to? It's not
> obvious how to match it up.
> The schematic looks the same as the Rock 5B schematic [2] (page 31)
> and the Rock 5B dts uses the default pinctrl [3]
> 
> Note: The vendor kernel DTS doesn't modify the pinctrl either. [4]
> 
> If you try using the default pinctrl (not overriding), does HDMI not work?

I stumbled over the same issue recently for our Theobroma boards too.

From the Indiedroid schematics, you can see that the hdmim0_rx_hpdin
pin is gpio4_b6, which in their board is connected to the hdmi0_tx_on_h
functionality, which controls the output functionality between hdmi2.0-tmds
and hdmi2.1-frl modes.

The hdmi-driver currently only does hdmi2.0 but normally, on most boards
I've seen so far, this pin has a default pull to set hdmi2.0 anyway, so other
boards don't need that.

So for one, please check if the nova can run without it, but if a pin
setting is needed, please define a new per-board one, labeling it correctly
for this hdmi0_tx_on_h functionality and do not re-use the hdmi-rx
pin-setting.


Heiko
Chris Morgan Oct. 31, 2024, 2:59 p.m. UTC | #3
On Thu, Oct 31, 2024 at 01:14:22PM +0100, Heiko Stübner wrote:
> Am Donnerstag, 31. Oktober 2024, 01:49:07 CET schrieb Jimmy Hon:
> > On Wed, Oct 30, 2024 at 2:25 PM Chris Morgan <macroalpha82@gmail.com> wrote:
> > >
> > > From: Chris Morgan <macromorgan@hotmail.com>
> > >
> > > Enable the HDMI0 port for the Indiedroid Nova. The schematics available
> > > show the hdmim0_rx_hpdin is connected, so this pinctrl is enabled in
> > > contrast with the other rk3588 boards.
> > 
> > Which pin in the schematic [1] (page 24) does it refer to? It's not
> > obvious how to match it up.
> > The schematic looks the same as the Rock 5B schematic [2] (page 31)
> > and the Rock 5B dts uses the default pinctrl [3]
> > 
> > Note: The vendor kernel DTS doesn't modify the pinctrl either. [4]
> > 
> > If you try using the default pinctrl (not overriding), does HDMI not work?
> 
> I stumbled over the same issue recently for our Theobroma boards too.
> 
> From the Indiedroid schematics, you can see that the hdmim0_rx_hpdin
> pin is gpio4_b6, which in their board is connected to the hdmi0_tx_on_h
> functionality, which controls the output functionality between hdmi2.0-tmds
> and hdmi2.1-frl modes.
> 
> The hdmi-driver currently only does hdmi2.0 but normally, on most boards
> I've seen so far, this pin has a default pull to set hdmi2.0 anyway, so other
> boards don't need that.
> 
> So for one, please check if the nova can run without it, but if a pin
> setting is needed, please define a new per-board one, labeling it correctly
> for this hdmi0_tx_on_h functionality and do not re-use the hdmi-rx
> pin-setting.

I can confirm it will run without it, so I'll simply set the pinctrl to
be the same as the other boards.

Thank you,
Chris

> 
> 
> Heiko
> 
> 
>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts b/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts
index 065d44735001..7272aba998cf 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts
@@ -5,6 +5,7 @@ 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/linux-event-codes.h>
 #include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/soc/rockchip,vop2.h>
 #include <dt-bindings/usb/pd.h>
 #include "rk3588s.dtsi"
 
@@ -50,6 +51,17 @@  chosen {
 		stdout-path = "serial2:1500000n8";
 	};
 
+	hdmi0-con {
+		compatible = "hdmi-connector";
+		type = "d";
+
+		port {
+			hdmi0_con_in: endpoint {
+				remote-endpoint = <&hdmi0_out_con>;
+			};
+		};
+	};
+
 	sdio_pwrseq: sdio-pwrseq {
 		compatible = "mmc-pwrseq-simple";
 		clock-names = "ext_clock";
@@ -247,6 +259,30 @@  &gpu {
 	status = "okay";
 };
 
+&hdmi0 {
+	pinctrl-0 = <&hdmim0_rx_hpdin>, <&hdmim0_tx0_scl>,
+		    <&hdmim0_tx0_sda>, <&hdmim0_tx0_hpd>,
+		    <&hdmim0_tx0_cec>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
+&hdmi0_in {
+	hdmi0_in_vp0: endpoint {
+		remote-endpoint = <&vp0_out_hdmi0>;
+	};
+};
+
+&hdmi0_out {
+	hdmi0_out_con: endpoint {
+		remote-endpoint = <&hdmi0_con_in>;
+	};
+};
+
+&hdptxphy_hdmi0 {
+	status = "okay";
+};
+
 &i2c0 {
 	pinctrl-0 = <&i2c0m2_xfer>;
 	pinctrl-names = "default";
@@ -924,3 +960,18 @@  usbdp_phy0_dp_altmode_mux: endpoint@1 {
 		};
 	};
 };
+
+&vop {
+	status = "okay";
+};
+
+&vop_mmu {
+	status = "okay";
+};
+
+&vp0 {
+	vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
+		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
+		remote-endpoint = <&hdmi0_in_vp0>;
+	};
+};