Skip to contentSkip to conversation

DSS: Add support for DisplayPort

PATCH Applied Rahul T R 3 participants 5 messages Apr 29, 2022 – May 6, 2022

Subsystems (2)
lore
Share & tools
lore

Rahul T R

author
#0 lore raw

v5 cover DSS: Add support for DisplayPort

The following series of patches enables DisplayPort on j721e-evm

v2:
- use phandle with a parameter to refer clocks insted of sub nodes in serdes_wiz node
- move phy link node to board DTS file

v3:
- Fix the regulator node name as per the DT spec
- Use Macro for GPIO type

v4:
- Move adding of phy link nodes from 2/2 to 1/2, to fix dtbs checks warnings
- Add leading zeros to align reg property addresses and sizes
- Add empty ports for mhdp node in dtsi file to fix dtbs checks warnings

v5:
- Fix a typo in regulator name

boot logs:
https://gist.githubusercontent.com/ravi-rahul/1bdbc3f77ab381e486c8394650c2e85d/raw/2327c9894c3236950a00f4511ae668ac4399b71e/j7_DP_upstream.log

kernel patch verify report:
https://gist.githubusercontent.com/ravi-rahul/a982fef3fae03ec0dbdd5cb475a4cb25/raw/9ef482f96fa351cff7980e4340e9bcb8471ec3ab/report-kernel-patch-verify.txt

Tomi Valkeinen (2):
arm64: dts: ti: k3-j721e-*: add DP & DP PHY
arm64: dts: ti: k3-j721e-common-proc-board: add DP to j7 evm

 .../dts/ti/k3-j721e-common-proc-board.dts     | 77 ++++++++++++++++++-
 arch/arm64/boot/dts/ti/k3-j721e-main.dtsi     | 75 +++++++++++++++++-
 arch/arm64/boot/dts/ti/k3-j721e-sk.dts        | 16 ++++
 3 files changed, 162 insertions(+), 6 deletions(-)
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH v5 1/2 arm64: dts: ti: k3-j721e-*: add DP & DP PHY

From: Tomi Valkeinen <[email protected]>

Add DT nodes for DisplayPort and DisplayPort PHY. The DP is Cadence MHDP 8546 and the PHY is a Cadence Torrent PHY with TI WIZ wrapper.

Also add the required phy link nodes in the board dts files.

A slight irregularity in the bindings is the DPTX PHY register block, which is in the MHDP IP, but is needed and mapped by the PHY.

---
 .../dts/ti/k3-j721e-common-proc-board.dts     | 16 ++++
 arch/arm64/boot/dts/ti/k3-j721e-main.dtsi     | 75 ++++++++++++++++++-
 arch/arm64/boot/dts/ti/k3-j721e-sk.dts        | 16 ++++
 3 files changed, 105 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts +16 -0
index f5ca8e26ed99..2f119e94e783 100644
@@ -793,6 +793,22 @@
 	};
 };
 
+&serdes4 {
+	torrent_phy_dp: phy@0 {
+		reg = <0>;
+		resets = <&serdes_wiz4 1>;
+		cdns,phy-type = <PHY_TYPE_DP>;
+		cdns,num-lanes = <4>;
+		cdns,max-bit-rate = <5400>;
+		#phy-cells = <0>;
+	};
+};
+
+&mhdp {
+	phys = <&torrent_phy_dp>;
+	phy-names = "dpphy";
+};
+
 &pcie0_rc {
 	reset-gpios = <&exp1 6 GPIO_ACTIVE_HIGH>;
 	phys = <&serdes0_pcie_link>;
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi +73 -2

99 lines not on this page · raw message

arch/arm64/boot/dts/ti/k3-j721e-sk.dts +16 -0
index f25d85169e0d..98177a20b45f 100644
@@ -624,6 +624,22 @@
 	};
 };
 
+&serdes4 {
+	torrent_phy_dp: phy@0 {
+		reg = <0>;
+		resets = <&serdes_wiz4 1>;
+		cdns,phy-type = <PHY_TYPE_DP>;
+		cdns,num-lanes = <4>;
+		cdns,max-bit-rate = <5400>;
+		#phy-cells = <0>;
+	};
+};
+
+&mhdp {
+	phys = <&torrent_phy_dp>;
+	phy-names = "dpphy";
+};
+
 &usbss0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&main_usbss0_pins_default>;
Signature · 1 line
2.17.1
author
#2 lore raw

PATCH v5 2/2 arm64: dts: ti: k3-j721e-common-proc-board: add DP to j7 evm

In reply to Rahul T R

From: Tomi Valkeinen <[email protected]>

Add the endpoint nodes to describe connection from DSS => MHDP => DisplayPort connector.
Also add the required pinmux nodes for hotplug.

---
 .../dts/ti/k3-j721e-common-proc-board.dts     | 61 +++++++++++++++++--
 1 file changed, 57 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts +57 -4
index 2f119e94e783..2bc26a296496 100644
@@ -148,6 +148,28 @@
 		pinctrl-0 = <&main_mcan2_gpio_pins_default>;
 		standby-gpios = <&main_gpio0 127 GPIO_ACTIVE_HIGH>;
 	};
+
+	dp_pwr_3v3: regulator-dp-pwr {
+		compatible = "regulator-fixed";
+		regulator-name = "dp-pwr";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		gpio = <&exp4 0 GPIO_ACTIVE_HIGH>; /* P0 - DP0_PWR_SW_EN */
+		enable-active-high;
+	};
+
+	dp0: connector {
+		compatible = "dp-connector";
+		label = "DP0";
+		type = "full-size";
+		dp-pwr-supply = <&dp_pwr_3v3>;
+
+		port {
+			dp_connector_in: endpoint {
+				remote-endpoint = <&dp0_out>;
+			};
+		};
+	};
 };
 
 &main_pmx0 {
@@ -190,6 +212,12 @@
 		>;
 	};
 
+	dp0_pins_default: dp0-pins-default {
+		pinctrl-single,pins = <
+			J721E_IOPAD(0x1c4, PIN_INPUT, 5) /* SPI0_CS1.DP0_HPD */
+		>;
+	};
+
 	main_i2c1_exp4_pins_default: main-i2c1-exp4-pins-default {
 		pinctrl-single,pins = <
 			J721E_IOPAD(0x230, PIN_INPUT, 7) /* (U2) ECAP0_IN_APWM_OUT.GPIO1_11 */
@@ -658,6 +686,33 @@
 				 <&k3_clks 152 18>;	/* PLL23_HSDIV0 */
 };
 
+&dss_ports {
+	port {
+		dpi0_out: endpoint {
+			remote-endpoint = <&dp0_in>;
+		};
+	};
+};
+
+&dp0_ports {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	port@0 {
+		reg = <0>;
+		dp0_in: endpoint {
+			remote-endpoint = <&dpi0_out>;
+		};
+	};
+
+	port@4 {
+		reg = <4>;
+		dp0_out: endpoint {
+			remote-endpoint = <&dp_connector_in>;
+		};
+	};
+};
+
 &mcasp0 {
 	status = "disabled";
 };
@@ -807,6 +862,8 @@
 &mhdp {
 	phys = <&torrent_phy_dp>;
 	phy-names = "dpphy";
+	pinctrl-names = "default";
+	pinctrl-0 = <&dp0_pins_default>;
 };
 
 &pcie0_rc {
@@ -859,10 +916,6 @@
 	status = "disabled";
 };
 
-&dss {
-	status = "disabled";
-};
-
 &icssg0_mdio {
 	status = "disabled";
 };
Signature · 1 line
2.17.1
Reviewed-by on the v5 series
#3 lore raw
In reply to Rahul T R
Quoted 26 lines · Rahul T R

The following series of patches enables DisplayPort on j721e-evm

v2:
- use phandle with a parameter to refer clocks insted of sub nodes in serdes_wiz node
- move phy link node to board DTS file

v3:
- Fix the regulator node name as per the DT spec
- Use Macro for GPIO type

v4:
- Move adding of phy link nodes from 2/2 to 1/2, to fix dtbs checks warnings
- Add leading zeros to align reg property addresses and sizes
- Add empty ports for mhdp node in dtsi file to fix dtbs checks warnings

v5:
- Fix a typo in regulator name

boot logs:

   https://gist.githubusercontent.com/ravi-rahul/1bdbc3f77ab381e486c8394650c2e85d/raw/2327c9894c3236950a00f4511ae668ac4399b71e/j7_DP_upstream.log

kernel patch verify report:

   https://gist.githubusercontent.com/ravi-rahul/a982fef3fae03ec0dbdd5cb475a4cb25/raw/9ef482f96fa351cff7980e4340e9bcb8471ec3ab/report-kernel-patch-verify.txt
Quoted 9 lines

Tomi Valkeinen (2):
arm64: dts: ti: k3-j721e-*: add DP & DP PHY
arm64: dts: ti: k3-j721e-common-proc-board: add DP to j7 evm

 .../dts/ti/k3-j721e-common-proc-board.dts     | 77 ++++++++++++++++++-
 arch/arm64/boot/dts/ti/k3-j721e-main.dtsi     | 75 +++++++++++++++++-
 arch/arm64/boot/dts/ti/k3-j721e-sk.dts        | 16 ++++
 3 files changed, 162 insertions(+), 6 deletions(-)
maintainer Applied
#4 lore raw
In reply to Rahul T R

Hi Rahul T R,

Quoted 9 lines · Rahul T R

The following series of patches enables DisplayPort on j721e-evm

v2:
- use phandle with a parameter to refer clocks insted of sub nodes in serdes_wiz node
- move phy link node to board DTS file

[...]

I have applied the following to branch ti-k3-dts-next on [1]. Thank you!

[1/2] arm64: dts: ti: k3-j721e-*: add DP & DP PHY

      commit: 92c996f4ceabd5780bb7678138267db0a1e1a00e
[2/2] arm64: dts: ti: k3-j721e-common-proc-board: add DP to j7 evm
      commit: 8f984f60f2f1fa109f9ae8c9194b6989f6675c1d

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Vignesh