[v9,3/5] arm64: dts: ti: k3-j784s4-main: Add DSS and DP-bridge node

Message ID 20230803080441.367341-4-j-choudhary@ti.com
State New
Headers
Series Enable Display for J784S4 and AM69-SK platform |

Commit Message

Jayesh Choudhary Aug. 3, 2023, 8:04 a.m. UTC
  From: Rahul T R <r-ravikumar@ti.com>

Add DSS and DP-bridge node for J784S4 SoC. DSS IP in J784S4 is
same as DSS IP in J721E, so same compatible is being used.
The DP is Cadence MHDP8546.

Signed-off-by: Rahul T R <r-ravikumar@ti.com>
[j-choudhary@ti.com: move dss & mhdp node together in main, fix dss node]
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
---
 arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi | 63 ++++++++++++++++++++++
 1 file changed, 63 insertions(+)
  

Comments

Aradhya Bhatia Aug. 4, 2023, 7:33 p.m. UTC | #1
On 03-Aug-23 13:34, Jayesh Choudhary wrote:
> From: Rahul T R <r-ravikumar@ti.com>
> 
> Add DSS and DP-bridge node for J784S4 SoC. DSS IP in J784S4 is
> same as DSS IP in J721E, so same compatible is being used.
> The DP is Cadence MHDP8546.
DP-bridge

> 
> Signed-off-by: Rahul T R <r-ravikumar@ti.com>
> [j-choudhary@ti.com: move dss & mhdp node together in main, fix dss node]
> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>

Given that you make appropriate changes with properties in this patch,
wrt patches 4/5 and 5/5,

Reviewed-by: Aradhya Bhatia <a-bhatia1@ti.com>

> ---
>  arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi | 63 ++++++++++++++++++++++
>  1 file changed, 63 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
> index 446d7efa715f..824312b9ef9f 100644
> --- a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
> @@ -1741,4 +1741,67 @@ c71_3: dsp@67800000 {
>  		resets = <&k3_reset 40 1>;
>  		firmware-name = "j784s4-c71_3-fw";
>  	};
> +
> +	mhdp: bridge@a000000 {
> +		compatible = "ti,j721e-mhdp8546";
> +		reg = <0x0 0xa000000 0x0 0x30a00>,
> +		      <0x0 0x4f40000 0x0 0x20>;
> +		reg-names = "mhdptx", "j721e-intg";
> +		clocks = <&k3_clks 217 11>;
> +		interrupt-parent = <&gic500>;
> +		interrupts = <GIC_SPI 614 IRQ_TYPE_LEVEL_HIGH>;
> +		power-domains = <&k3_pds 217 TI_SCI_PD_EXCLUSIVE>;
> +		status = "disabled";
> +
> +		dp0_ports: ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +	};
> +
> +	dss: dss@4a00000 {
> +		compatible = "ti,j721e-dss";
> +		reg = <0x00 0x04a00000 0x00 0x10000>, /* common_m */
> +		      <0x00 0x04a10000 0x00 0x10000>, /* common_s0*/
> +		      <0x00 0x04b00000 0x00 0x10000>, /* common_s1*/
> +		      <0x00 0x04b10000 0x00 0x10000>, /* common_s2*/
> +		      <0x00 0x04a20000 0x00 0x10000>, /* vidl1 */
> +		      <0x00 0x04a30000 0x00 0x10000>, /* vidl2 */
> +		      <0x00 0x04a50000 0x00 0x10000>, /* vid1 */
> +		      <0x00 0x04a60000 0x00 0x10000>, /* vid2 */
> +		      <0x00 0x04a70000 0x00 0x10000>, /* ovr1 */
> +		      <0x00 0x04a90000 0x00 0x10000>, /* ovr2 */
> +		      <0x00 0x04ab0000 0x00 0x10000>, /* ovr3 */
> +		      <0x00 0x04ad0000 0x00 0x10000>, /* ovr4 */
> +		      <0x00 0x04a80000 0x00 0x10000>, /* vp1 */
> +		      <0x00 0x04aa0000 0x00 0x10000>, /* vp1 */
> +		      <0x00 0x04ac0000 0x00 0x10000>, /* vp1 */
> +		      <0x00 0x04ae0000 0x00 0x10000>, /* vp4 */
> +		      <0x00 0x04af0000 0x00 0x10000>; /* wb */
> +		reg-names = "common_m", "common_s0",
> +			    "common_s1", "common_s2",
> +			    "vidl1", "vidl2","vid1","vid2",
> +			    "ovr1", "ovr2", "ovr3", "ovr4",
> +			    "vp1", "vp2", "vp3", "vp4",
> +			    "wb";
> +		clocks = <&k3_clks 218 0>,
> +			 <&k3_clks 218 2>,
> +			 <&k3_clks 218 5>,
> +			 <&k3_clks 218 14>,
> +			 <&k3_clks 218 18>;
> +		clock-names = "fck", "vp1", "vp2", "vp3", "vp4";
> +		power-domains = <&k3_pds 218 TI_SCI_PD_EXCLUSIVE>;
> +		interrupts = <GIC_SPI 602 IRQ_TYPE_LEVEL_HIGH>,
> +			     <GIC_SPI 603 IRQ_TYPE_LEVEL_HIGH>,
> +			     <GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>,
> +			     <GIC_SPI 605 IRQ_TYPE_LEVEL_HIGH>;
> +		interrupt-names = "common_m",
> +				  "common_s0",
> +				  "common_s1",
> +				  "common_s2";
> +		status = "disabled";
> +
> +		dss_ports: ports {
> +		};
> +	};
>  };
  
Maxime Ripard Aug. 17, 2023, 10:54 a.m. UTC | #2
Hi,

On Thu, Aug 03, 2023 at 01:34:39PM +0530, Jayesh Choudhary wrote:
> From: Rahul T R <r-ravikumar@ti.com>
> 
> Add DSS and DP-bridge node for J784S4 SoC. DSS IP in J784S4 is
> same as DSS IP in J721E, so same compatible is being used.
> The DP is Cadence MHDP8546.
> 
> Signed-off-by: Rahul T R <r-ravikumar@ti.com>
> [j-choudhary@ti.com: move dss & mhdp node together in main, fix dss node]
> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
> ---
>  arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi | 63 ++++++++++++++++++++++
>  1 file changed, 63 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
> index 446d7efa715f..824312b9ef9f 100644
> --- a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
> @@ -1741,4 +1741,67 @@ c71_3: dsp@67800000 {
>  		resets = <&k3_reset 40 1>;
>  		firmware-name = "j784s4-c71_3-fw";
>  	};
> +
> +	mhdp: bridge@a000000 {
> +		compatible = "ti,j721e-mhdp8546";
> +		reg = <0x0 0xa000000 0x0 0x30a00>,
> +		      <0x0 0x4f40000 0x0 0x20>;
> +		reg-names = "mhdptx", "j721e-intg";
> +		clocks = <&k3_clks 217 11>;
> +		interrupt-parent = <&gic500>;
> +		interrupts = <GIC_SPI 614 IRQ_TYPE_LEVEL_HIGH>;
> +		power-domains = <&k3_pds 217 TI_SCI_PD_EXCLUSIVE>;
> +		status = "disabled";
> +
> +		dp0_ports: ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +	};
> +
> +	dss: dss@4a00000 {
> +		compatible = "ti,j721e-dss";

As far as I can see, this compatible limits the (DPI) pixel clock to
160MHz, but the TRM seems to mention that it's 600MHz?

Is it expected?

Maxime
  
Jayesh Choudhary Sept. 25, 2023, 6:46 a.m. UTC | #3
Hello Maxime,

On 17/08/23 16:24, Maxime Ripard wrote:
> Hi,
> 
> On Thu, Aug 03, 2023 at 01:34:39PM +0530, Jayesh Choudhary wrote:
>> From: Rahul T R <r-ravikumar@ti.com>
>>
>> Add DSS and DP-bridge node for J784S4 SoC. DSS IP in J784S4 is
>> same as DSS IP in J721E, so same compatible is being used.
>> The DP is Cadence MHDP8546.
>>

[...]

>> +
>> +	dss: dss@4a00000 {
>> +		compatible = "ti,j721e-dss";
> 
> As far as I can see, this compatible limits the (DPI) pixel clock to
> 160MHz, but the TRM seems to mention that it's 600MHz?
> 
> Is it expected?
> 
I am unsure about why the max DPI pixel clock was set to 170MHz for
videoport bus type DISPC_VP_DPI.
Bus type DISPC_VP_DPI is used only for tfp410 bridge which can support
min 6.06ns pixel period (165MHz pixel clk).
I think the max value however should still be independent to what the
bridge can support.
We can look into this issue independent to this series.

Tomi,
Any comments here..
There should not be any issue making the max pixel clock for DPI bus 
type 600 MHz as well????


-Jayesh
  
Tomi Valkeinen Sept. 25, 2023, 7:58 a.m. UTC | #4
On 25/09/2023 09:46, Jayesh Choudhary wrote:
> Hello Maxime,
> 
> On 17/08/23 16:24, Maxime Ripard wrote:
>> Hi,
>>
>> On Thu, Aug 03, 2023 at 01:34:39PM +0530, Jayesh Choudhary wrote:
>>> From: Rahul T R <r-ravikumar@ti.com>
>>>
>>> Add DSS and DP-bridge node for J784S4 SoC. DSS IP in J784S4 is
>>> same as DSS IP in J721E, so same compatible is being used.
>>> The DP is Cadence MHDP8546.
>>>
> 
> [...]
> 
>>> +
>>> +    dss: dss@4a00000 {
>>> +        compatible = "ti,j721e-dss";
>>
>> As far as I can see, this compatible limits the (DPI) pixel clock to
>> 160MHz, but the TRM seems to mention that it's 600MHz?
>>
>> Is it expected?
>>
> I am unsure about why the max DPI pixel clock was set to 170MHz for
> videoport bus type DISPC_VP_DPI.
> Bus type DISPC_VP_DPI is used only for tfp410 bridge which can support
> min 6.06ns pixel period (165MHz pixel clk).
> I think the max value however should still be independent to what the
> bridge can support.
> We can look into this issue independent to this series.
> 
> Tomi,
> Any comments here..
> There should not be any issue making the max pixel clock for DPI bus 
> type 600 MHz as well????

The dispc can output at high frequency, but when it goes to DPI, meaning 
a parallel video bus outside the SoC, we move into another domain. And 
even if the signals would be ok at the SoC's pins at higher freqs, I'm 
sure they would degrade quickly with a cable going to the panel 
(Disclaimer: I'm no HW engineer =)). If I had to guess, I'd guess that 
200 MHz would still be fine-ish in most cases, but I have hard time 
believing that a 300 MHz DPI signal would look valid in an oscilloscope.

With a quick look, the J7 datasheet says "Cycle time, VOUT(x)_PCLK " has 
min 6.06 ns. As that's the same as the one you mention for tfp410, and 
results in 165MHz, it sounds to me that it's just a safe limit, not any 
kind of real limit.

On DRA76, I think the "offical" DPI max was the same, but running with 
~210 MHz still worked fine, for the particular pieces of hardware I had.

So... I'd keep it (at least near) the official limit, unless someone has 
use cases which require higher frequencies.

  Tomi
  

Patch

diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
index 446d7efa715f..824312b9ef9f 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
@@ -1741,4 +1741,67 @@  c71_3: dsp@67800000 {
 		resets = <&k3_reset 40 1>;
 		firmware-name = "j784s4-c71_3-fw";
 	};
+
+	mhdp: bridge@a000000 {
+		compatible = "ti,j721e-mhdp8546";
+		reg = <0x0 0xa000000 0x0 0x30a00>,
+		      <0x0 0x4f40000 0x0 0x20>;
+		reg-names = "mhdptx", "j721e-intg";
+		clocks = <&k3_clks 217 11>;
+		interrupt-parent = <&gic500>;
+		interrupts = <GIC_SPI 614 IRQ_TYPE_LEVEL_HIGH>;
+		power-domains = <&k3_pds 217 TI_SCI_PD_EXCLUSIVE>;
+		status = "disabled";
+
+		dp0_ports: ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
+	};
+
+	dss: dss@4a00000 {
+		compatible = "ti,j721e-dss";
+		reg = <0x00 0x04a00000 0x00 0x10000>, /* common_m */
+		      <0x00 0x04a10000 0x00 0x10000>, /* common_s0*/
+		      <0x00 0x04b00000 0x00 0x10000>, /* common_s1*/
+		      <0x00 0x04b10000 0x00 0x10000>, /* common_s2*/
+		      <0x00 0x04a20000 0x00 0x10000>, /* vidl1 */
+		      <0x00 0x04a30000 0x00 0x10000>, /* vidl2 */
+		      <0x00 0x04a50000 0x00 0x10000>, /* vid1 */
+		      <0x00 0x04a60000 0x00 0x10000>, /* vid2 */
+		      <0x00 0x04a70000 0x00 0x10000>, /* ovr1 */
+		      <0x00 0x04a90000 0x00 0x10000>, /* ovr2 */
+		      <0x00 0x04ab0000 0x00 0x10000>, /* ovr3 */
+		      <0x00 0x04ad0000 0x00 0x10000>, /* ovr4 */
+		      <0x00 0x04a80000 0x00 0x10000>, /* vp1 */
+		      <0x00 0x04aa0000 0x00 0x10000>, /* vp1 */
+		      <0x00 0x04ac0000 0x00 0x10000>, /* vp1 */
+		      <0x00 0x04ae0000 0x00 0x10000>, /* vp4 */
+		      <0x00 0x04af0000 0x00 0x10000>; /* wb */
+		reg-names = "common_m", "common_s0",
+			    "common_s1", "common_s2",
+			    "vidl1", "vidl2","vid1","vid2",
+			    "ovr1", "ovr2", "ovr3", "ovr4",
+			    "vp1", "vp2", "vp3", "vp4",
+			    "wb";
+		clocks = <&k3_clks 218 0>,
+			 <&k3_clks 218 2>,
+			 <&k3_clks 218 5>,
+			 <&k3_clks 218 14>,
+			 <&k3_clks 218 18>;
+		clock-names = "fck", "vp1", "vp2", "vp3", "vp4";
+		power-domains = <&k3_pds 218 TI_SCI_PD_EXCLUSIVE>;
+		interrupts = <GIC_SPI 602 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 603 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 605 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "common_m",
+				  "common_s0",
+				  "common_s1",
+				  "common_s2";
+		status = "disabled";
+
+		dss_ports: ports {
+		};
+	};
 };