Skip to contentSkip to conversation

Add DSS support for AM62L SoC

PATCH Superseded Swamil Jain 2 participants 4 messages Oct 7

Subsystems (2)

v6 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v6 cover Add DSS support for AM62L SoC

This series:
- Adds base support to enable Display on TI AM62L[1] SoCs
- Adds base support for DSI output
- Enables HDMI output out-of-box

[1]: https://www.ti.com/product/AM62L
---
Changelog:
v5->v6:
- Drop bootph-all from parent node if child node use the property
- Pick R-by tag

Link to v5: https://lore.kernel.org/all/[email protected]/

v4->v5:
- Move pinctrl from sii9022 to dss
- Add bootph-all property to all display related nodes
- Pick R-by tag

Link to v4: https://lore.kernel.org/all/[email protected]/

v3->v4:
- Change pin configuration from PIN_OUTPUT to PIN_INPUT for VOUT_EXTPCLKIN

Link to v3: https://lore.kernel.org/all/[email protected]/

v2->v3:
- Split patches for SoC and EVM related changes
- Add dsi ports node
- Correct styling issues
- Drop GIC

Link to v2: https://lore.kernel.org/all/[email protected]/

v1->v2:
- Update the commit message to elaborate more about the patch.
- Add dpi-pinctrl configuration.
- Update the interrupt routing index for HDMI interrupt line

Link to v1: https://lore.kernel.org/all/[email protected]/
---
Devarsh Thakkar (2):
arm64: dts: ti: k3-am62l-main: Add DSS & DSI related nodes
arm64: dts: ti: k3-am62l3-evm: Add HDMI support

 arch/arm64/boot/dts/ti/k3-am62l-main.dtsi | 60 ++++++++++++++
 arch/arm64/boot/dts/ti/k3-am62l3-evm.dts  | 97 +++++++++++++++++++++++
 2 files changed, 157 insertions(+)
#1 lore raw

PATCH v6 1/2 arm64: dts: ti: k3-am62l-main: Add DSS & DSI related nodes

From: Devarsh Thakkar <[email protected]>

Add DSS, DSI and DPHY nodes to add base display support on AM62L[1]. AM62L shares a single video port for DPI and DSI output.

[1]: https://www.ti.com/product/AM62L

---
 arch/arm64/boot/dts/ti/k3-am62l-main.dtsi | 60 +++++++++++++++++++++++
 1 file changed, 60 insertions(+)
arch/arm64/boot/dts/ti/k3-am62l-main.dtsi +60 -0
index 80615ca1e01a..a3199a2455c3 100644
@@ -544,6 +544,66 @@ elm0: ecc@25010000 {
 		status = "disabled";
 	};
 
+	dphy_tx0: phy@301c0000 {
+		compatible = "ti,j721e-dphy";
+		reg = <0x00 0x301c0000 0x00 0x1000>;
+		clocks = <&scmi_clk 348>, <&scmi_clk 343>;
+		clock-names = "psm", "pll_ref";
+		#phy-cells = <0>;
+		power-domains = <&scmi_pds 86>;
+		assigned-clocks = <&scmi_clk 343>;
+		assigned-clock-parents = <&scmi_clk 341>;
+		assigned-clock-rates = <25000000>;
+		status = "disabled";
+	};
+
+	dss: dss@30200000 {
+		compatible = "ti,am62l-dss";
+		reg = <0x00 0x30200000 0x00 0x1000>, /* common */
+		      <0x00 0x30202000 0x00 0x1000>, /* vidl1 */
+		      <0x00 0x30207000 0x00 0x1000>, /* ovr1 */
+		      <0x00 0x3020a000 0x00 0x1000>, /* vp1 */
+		      <0x00 0x30201000 0x00 0x1000>; /* common1 */
+		reg-names = "common", "vidl1", "ovr1", "vp1", "common1";
+		power-domains = <&scmi_pds 39>;
+		clocks = <&scmi_clk 162>,
+			 <&scmi_clk 161>;
+		clock-names = "fck", "vp1";
+		interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+
+		dss_ports: ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
+	};
+
+	dsi0: dsi@30500000 {
+		compatible = "ti,j721e-dsi";
+		reg = <0x00 0x30500000 0x00 0x100000>,
+		      <0x00 0x30270000 0x00 0x100>;
+		clocks = <&scmi_clk 155>, <&scmi_clk 158>;
+		clock-names = "dsi_p_clk", "dsi_sys_clk";
+		power-domains = <&scmi_pds 38>;
+		interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
+		phys = <&dphy_tx0>;
+		phy-names = "dphy";
+		status = "disabled";
+
+		dsi0_ports: ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+			};
+
+			port@1 {
+				reg = <1>;
+			};
+		};
+	};
+
 	gpmc0: memory-controller@3b000000 {
 		compatible = "ti,am64-gpmc";
 		power-domains = <&scmi_pds 37>;
#2 lore raw

PATCH v6 2/2 arm64: dts: ti: k3-am62l3-evm: Add HDMI support

In reply to Swamil Jain

From: Devarsh Thakkar <[email protected]>

Add the SII9022 HDMI bridge and HDMI connector nodes, along with the DPI pinmux configuration connecting VOUT0 to the bridge. Enable the DSS and hook up its DPI output port to the SII9022 bridge input, and the bridge output to the HDMI connector.

---
 arch/arm64/boot/dts/ti/k3-am62l3-evm.dts | 97 ++++++++++++++++++++++++
 1 file changed, 97 insertions(+)
arch/arm64/boot/dts/ti/k3-am62l3-evm.dts +97 -0
index 964387eb5178..3cda48c3a918 100644
@@ -44,6 +44,19 @@ usr: button-usr {
 		};
 	};
 
+	hdmi0: connector-hdmi {
+		compatible = "hdmi-connector";
+		label = "hdmi";
+		type = "a";
+
+		port {
+			hdmi_connector_in: endpoint {
+				remote-endpoint = <&sii9022_out>;
+				bootph-all;
+			};
+		};
+	};
+
 	leds {
 		compatible = "gpio-leds";
 		pinctrl-names = "default";
@@ -192,6 +205,37 @@ exp2: gpio@23 {
 		bootph-all;
 	};
 
+	sii9022: bridge-hdmi@3b {
+		compatible = "sil,sii9022";
+		reg = <0x3b>;
+		interrupt-parent = <&exp1>;
+		interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
+		#sound-dai-cells = <0>;
+		sil,i2s-data-lanes = < 0 >;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				sii9022_in: endpoint {
+					remote-endpoint = <&dpi_out>;
+					bootph-all;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				sii9022_out: endpoint {
+					remote-endpoint = <&hdmi_connector_in>;
+					bootph-all;
+				};
+			};
+		};
+	};
 };
 
 &i2c2 {
@@ -221,6 +265,41 @@ usb_con_hs: endpoint {
 };
 
 &pmx0 {
+	dpi_pins_default: dpi-default-pins {
+		pinctrl-single,pins = <
+			AM62LX_IOPAD(0x00e4, PIN_OUTPUT, 1) /* (L20) GPMC0_CSn0.VOUT0_VSYNC */
+			AM62LX_IOPAD(0x00dc, PIN_OUTPUT, 1) /* (N21) GPMC0_WPn.VOUT0_HSYNC */
+			AM62LX_IOPAD(0x00e8, PIN_OUTPUT, 1) /* (L19) GPMC0_CSn1.VOUT0_PCLK */
+			AM62LX_IOPAD(0x00e0, PIN_OUTPUT, 1) /* (M21) GPMC0_DIR.VOUT0_DE */
+			AM62LX_IOPAD(0x0078, PIN_OUTPUT, 1) /* (L22) GPMC0_AD0.VOUT0_DATA0 */
+			AM62LX_IOPAD(0x007c, PIN_OUTPUT, 1) /* (L23) GPMC0_AD1.VOUT0_DATA1 */
+			AM62LX_IOPAD(0x0080, PIN_OUTPUT, 1) /* (K22) GPMC0_AD2.VOUT0_DATA2 */
+			AM62LX_IOPAD(0x0084, PIN_OUTPUT, 1) /* (J23) GPMC0_AD3.VOUT0_DATA3 */
+			AM62LX_IOPAD(0x0088, PIN_OUTPUT, 1) /* (K23) GPMC0_AD4.VOUT0_DATA4 */
+			AM62LX_IOPAD(0x008c, PIN_OUTPUT, 1) /* (H22) GPMC0_AD5.VOUT0_DATA5 */
+			AM62LX_IOPAD(0x0090, PIN_OUTPUT, 1) /* (H23) GPMC0_AD6.VOUT0_DATA6 */
+			AM62LX_IOPAD(0x0094, PIN_OUTPUT, 1) /* (J22) GPMC0_AD7.VOUT0_DATA7 */
+			AM62LX_IOPAD(0x0098, PIN_OUTPUT, 1) /* (H19) GPMC0_AD8.VOUT0_DATA8 */
+			AM62LX_IOPAD(0x009c, PIN_OUTPUT, 1) /* (H20) GPMC0_AD9.VOUT0_DATA9 */
+			AM62LX_IOPAD(0x00a0, PIN_OUTPUT, 1) /* (H21) GPMC0_AD10.VOUT0_DATA10 */
+			AM62LX_IOPAD(0x00a4, PIN_OUTPUT, 1) /* (H18) GPMC0_AD11.VOUT0_DATA11 */
+			AM62LX_IOPAD(0x00a8, PIN_OUTPUT, 1) /* (G23) GPMC0_AD12.VOUT0_DATA12 */
+			AM62LX_IOPAD(0x00ac, PIN_OUTPUT, 1) /* (G22) GPMC0_AD13.VOUT0_DATA13 */
+			AM62LX_IOPAD(0x00b0, PIN_OUTPUT, 1) /* (F22) GPMC0_AD14.VOUT0_DATA14 */
+			AM62LX_IOPAD(0x00b4, PIN_OUTPUT, 1) /* (F23) GPMC0_AD15.VOUT0_DATA15 */
+			AM62LX_IOPAD(0x00b8, PIN_OUTPUT, 1) /* (L21) GPMC0_CLK.VOUT0_DATA16 */
+			AM62LX_IOPAD(0x00c0, PIN_OUTPUT, 1) /* (N19) GPMC0_ADVn_ALE.VOUT0_DATA17 */
+			AM62LX_IOPAD(0x00c4, PIN_OUTPUT, 1) /* (N20) GPMC0_OEn_REn.VOUT0_DATA18 */
+			AM62LX_IOPAD(0x00c8, PIN_OUTPUT, 1) /* (M19) GPMC0_WEn.VOUT0_DATA19 */
+			AM62LX_IOPAD(0x00cc, PIN_OUTPUT, 1) /* (P23) GPMC0_BE0n_CLE.VOUT0_DATA20 */
+			AM62LX_IOPAD(0x00d0, PIN_OUTPUT, 1) /* (P22) GPMC0_BE1n.VOUT0_DATA21 */
+			AM62LX_IOPAD(0x00d4, PIN_OUTPUT, 1) /* (N23) GPMC0_WAIT0.VOUT0_DATA22 */
+			AM62LX_IOPAD(0x00d8, PIN_OUTPUT, 1) /* (N22) GPMC0_WAIT1.VOUT0_DATA23 */
+			AM62LX_IOPAD(0x00ec, PIN_INPUT,  5) /* (M23) GPMC0_CSn2.VOUT0_EXTPCLKIN */
+		>;
+		bootph-all;
+	};
+
 	gpio0_ioexp_intr_pins_default: gpio0-ioexp-intr-default-pins {
 		pinctrl-single,pins = <
 			AM62LX_IOPAD(0x01b0, PIN_INPUT, 7) /* (B12) SPI0_D1.GPIO0_91 */
@@ -321,6 +400,24 @@ AM62LX_IOPAD(0x0004, PIN_OUTPUT, 0) /* (AA23) WKUP_UART0_TXD */
 	};
 };
 
+&dss {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&dpi_pins_default>;
+};
+
+&dss_ports {
+	/* VP1: DPI Output */
+	port@0 {
+		reg = <0>;
+
+		dpi_out: endpoint {
+			remote-endpoint = <&sii9022_in>;
+			bootph-all;
+		};
+	};
+};
+
 &sdhci0 {
 	/* eMMC */
 	pinctrl-names = "default";
#3 lore raw

Re: [PATCH v6 2/2] arm64: dts: ti: k3-am62l3-evm: Add HDMI support

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider: - [Medium] arm64: dts: ti: missing reset-gpios for sii9022 HDMI bridge - [Medium] dts: missing gpio-hog for…

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Medium] arm64: dts: ti: missing reset-gpios for sii9022 HDMI bridge
- [Medium] dts: missing gpio-hog for VOUT0_FET_SEL0 hardware mux
- [Medium] dts: ineffective bootph-all properties on HDMI endpoints and pinmux --

commit 67599eb578ca3fc87e07bad393a95787a31afca5
Author: Devarsh Thakkar <[email protected]>

arm64: dts: ti: k3-am62l3-evm: Add HDMI support

This commit adds HDMI bridge and connector nodes to the TI AM62L3 EVM device tree. It configures the DPI pinmux connecting VOUT0 to the SII9022 bridge, and hooks up the DSS output to the bridge input.

Quoted 11 lines
arch/arm64/boot/dts/ti/k3-am62l3-evm.dts +3 -0
index 84a0cfaaf196a..7733a0d265ab4 100644
@@ -44,6 +44,19 @@ usr: button-usr {
 		};
 	};
 
+	hdmi0: connector-hdmi {
+		compatible = "hdmi-connector";
+		label = "hdmi";

arch/arm64/boot/dts/ti/k3-am62l3-evm.dts usr: button-usr { · line 59

Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62l3-evm.dts +10 -0
+		type = "a";
+
+		port {
+			hdmi_connector_in: endpoint {
+				remote-endpoint = <&sii9022_out>;
+				bootph-all;
+			};
+		};
+	};
+

[Severity: Medium]
The hdmi_connector_in endpoint has a bootph-all property, but the parent device node hdmi0 lacks it.

U-Boot's fdtgrep tool extracts subnodes structurally if a child has bootph-all, but strips the properties (such as compatible and reg) of the parent node unless the parent itself also has bootph-all.

Will this cause the connector driver to not probe in early boot, making the bootph-all property ineffective and dead code?

[ ... ]

arch/arm64/boot/dts/ti/k3-am62l3-evm.dts exp2: gpio@23 { · line 214

Quoted 11 lines
arch/arm64/boot/dts/ti/k3-am62l3-evm.dts +7 -0
@@ -192,6 +205,37 @@ exp2: gpio@23 {
 		bootph-all;
 	};
 
+	sii9022: bridge-hdmi@3b {
+		compatible = "sil,sii9022";
+		reg = <0x3b>;
+		interrupt-parent = <&exp1>;
+		interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
+		#sound-dai-cells = <0>;
+		sil,i2s-data-lanes = < 0 >;

[Severity: Medium]
The sii9022 node is missing the reset-gpios property. Does this allow the driver to probe silently without a reset line?

The AM62L3 EVM hardware has a dedicated reset line (GPIO_HDMI_RSTn) on the exp2 expander:

	exp2: gpio@23 {
		...
		gpio-line-names = "BT_EN_SOC", "VOUT0_FET_SEL0",
		...
				  "GPIO_QSPI_NAND_RSTn", "GPIO_HDMI_RSTn",

By omitting reset-gpios, the kernel fails to actively manage the reset state, relying on the bootloader to leave the pin de-asserted.

If the bootloader leaves it floating or asserted, or if the hardware loses state during suspend, will the HDMI bridge silently fail to operate?

[Severity: Medium]
Additionally, the exp2 GPIO expander defines a VOUT0_FET_SEL0 line, indicating a hardware FET switch multiplexes the DPI/VOUT0 signals.

Without a gpio-hog to actively select the HDMI output path, does the expander default to inputs (high impedance), leaving the FET switch floating or resting in an unverified default hardware state?

Could this cause display signals to not reach the HDMI bridge, rendering the HDMI output non-functional?

Quoted 14 lines
arch/arm64/boot/dts/ti/k3-am62l3-evm.dts +14 -0
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				sii9022_in: endpoint {
+					remote-endpoint = <&dpi_out>;
+					bootph-all;
+				};
+			};
+

arch/arm64/boot/dts/ti/k3-am62l3-evm.dts exp2: gpio@23 { · line 238

Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62l3-evm.dts +10 -0
+			port@1 {
+				reg = <1>;
+
+				sii9022_out: endpoint {
+					remote-endpoint = <&hdmi_connector_in>;
+					bootph-all;
+				};
+			};
+		};
+	};

[Severity: Medium]
Similar to the hdmi0 node, the sii9022_in and sii9022_out endpoints have bootph-all but the parent sii9022 node lacks it.

Will the missing bootph-all on the parent prevent the driver from probing in early boot, rendering the endpoints' bootph-all properties dead code?

[ ... ]

Quoted 11 lines
arch/arm64/boot/dts/ti/k3-am62l3-evm.dts +7 -0
@@ -321,6 +400,24 @@ AM62LX_IOPAD(0x0004, PIN_OUTPUT, 0) /* (AA23) WKUP_UART0_TXD */
 	};
 };
 
+&dss {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&dpi_pins_default>;
+};
+
+&dss_ports {

arch/arm64/boot/dts/ti/k3-am62l3-evm.dts AM62LX_IOPAD(0x0004, PIN_OUTPUT, 0) /* (AA23) WKUP_UART0_TXD */ · line 419

Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62l3-evm.dts +10 -0
+	/* VP1: DPI Output */
+	port@0 {
+		reg = <0>;
+
+		dpi_out: endpoint {
+			remote-endpoint = <&sii9022_in>;
+			bootph-all;
+		};
+	};
+};

[Severity: Medium]
The dpi_out endpoint has bootph-all, but the parent dss and dss_ports nodes lack it.

Will the missing bootph-all on the parents prevent the display subsystem from probing in early boot, making the endpoint bootph-all properties ineffective?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2