* [PATCH 1/3] dt-bindings: display: ti,am65x-dss: Add am62p dss compatible
2025-11-14 6:43 [PATCH 0/3] Add Display support for AM62P SoC Swamil Jain
@ 2025-11-14 6:43 ` Swamil Jain
2025-11-14 17:58 ` Conor Dooley
2025-11-14 6:43 ` [PATCH 2/3] drm/tidss: Power up attached PM domains on probe Swamil Jain
2025-11-14 6:43 ` [PATCH 3/3] drm: tidss: tidss_drv: Add support for AM62P display subsystem Swamil Jain
2 siblings, 1 reply; 8+ messages in thread
From: Swamil Jain @ 2025-11-14 6:43 UTC (permalink / raw)
To: jyri.sarha, tomi.valkeinen, airlied, simona, maarten.lankhorst,
mripard, tzimmermann, robh, krzk+dt, conor+dt, aradhya.bhatia
Cc: dri-devel, devicetree, linux-kernel, devarsht, praneeth, h-shenoy,
u-kumar1, s-jain1
TI's AM62P SoC contains two instances of the TI Keystone Display
SubSystem (DSS), each with two video ports and two video planes. These
instances support up to three independent video streams through OLDI,
DPI, and DSI interfaces.
DSS0 (first instance) supports:
- Two OLDI transmitters on video port 1, configurable in dual-link or
single-link mode.
- DPI output on video port 2.
DSS1 (second instance) supports:
- One OLDI transmitter on video port 1 (single-link mode only).
- DSI controller output on video port 2.
The two OLDI transmitters can be configured in clone mode to drive a
pair of identical OLDI single-link displays. DPI outputs from
DSS0 VP2, DSS1 VP1, and DSS1 VP2 are multiplexed, allowing only one
DPI output at a time.
Add the compatible string "ti,am62p-dss" and update related
description accordingly.
AM62P has different power domains for DSS and OLDI compared to other
Keystone SoCs. Therefore, add 'minItems' and set to 1 and update the
'maxItems' field in the power-domains property to 3 for the
"ti,am62p-dss" compatible entry to reflect this hardware difference.
Signed-off-by: Swamil Jain <s-jain1@ti.com>
---
.../bindings/display/ti/ti,am65x-dss.yaml | 127 +++++++++++++++++-
1 file changed, 126 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
index 361e9cae6896..8bd188e7f09b 100644
--- a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
+++ b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
@@ -24,6 +24,19 @@ description: |
DPI signals are also routed internally to DSI Tx controller present within the
SoC. Due to clocking limitations only one of the interface i.e. either DSI or
DPI can be used at once.
+ The AM62P has two instances of TI Keystone Display SubSystem, each with two
+ video ports and two video planes. These instances can support up to 3
+ independent video streams through OLDI, DPI, and DSI interfaces.
+ DSS0 (first instance) supports:
+ - Two OLDI TXes on video port 1, configurable in dual-link or
+ single link clone mode
+ - DPI output on video port 2
+ DSS1 (second instance) supports:
+ - One OLDI TX on video port 1 (single-link mode only)
+ - DSI controller output on video port 2
+ The two OLDI TXes can be configured in clone mode to drive a pair of
+ identical OLDI single-link displays. DPI outputs from DSS0 VP2, DSS1 VP1,
+ and DSS1 VP2 are muxed, allowing only one DPI output at a time.
properties:
compatible:
@@ -31,6 +44,7 @@ properties:
- ti,am625-dss
- ti,am62a7-dss
- ti,am62l-dss
+ - ti,am62p-dss
- ti,am65x-dss
reg:
@@ -81,7 +95,8 @@ properties:
maxItems: 1
power-domains:
- maxItems: 1
+ minItems: 1
+ maxItems: 3
description: phandle to the associated power domain
dma-coherent:
@@ -347,3 +362,113 @@ examples:
};
};
};
+
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/soc/ti,sci_pm_domain.h>
+
+ dss0: dss@30200000 {
+ compatible = "ti,am62p-dss";
+ reg = <0x30200000 0x1000>, /* common */
+ <0x30202000 0x1000>, /* vidl1 */
+ <0x30206000 0x1000>, /* vid */
+ <0x30207000 0x1000>, /* ovr1 */
+ <0x30208000 0x1000>, /* ovr2 */
+ <0x3020a000 0x1000>, /* vp1: Used for OLDI */
+ <0x3020b000 0x1000>, /* vp2: Used as DPI Out */
+ <0x30201000 0x1000>; /* common1 */
+ reg-names = "common", "vidl1", "vid",
+ "ovr1", "ovr2", "vp1", "vp2", "common1";
+ power-domains = <&k3_pds 186 TI_SCI_PD_EXCLUSIVE>,
+ <&k3_pds 243 TI_SCI_PD_EXCLUSIVE>,
+ <&k3_pds 244 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 186 6>,
+ <&dss0_vp1_clk>,
+ <&k3_clks 186 2>;
+ clock-names = "fck", "vp1", "vp2";
+ interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
+
+ oldi-transmitters {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ oldi0_am62p: oldi@0 {
+ reg = <0>;
+ clocks = <&k3_clks 186 0>;
+ clock-names = "serial";
+ ti,oldi-io-ctrl = <&dss_oldi_io_ctrl>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ oldi0_am62p_in: endpoint {
+ remote-endpoint = <&dpi0_am62p_out0>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ oldi0_am62p_out: endpoint {
+ remote-endpoint = <&panel0_in>;
+ };
+ };
+ };
+ };
+
+ oldi1_am62p: oldi@1 {
+ reg = <1>;
+ clocks = <&k3_clks 186 0>;
+ clock-names = "serial";
+ ti,oldi-io-ctrl = <&dss_oldi_io_ctrl>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ oldi1_am62p_in: endpoint {
+ remote-endpoint = <&dpi0_am62p_out1>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ oldi1_am62p_out: endpoint {
+ remote-endpoint = <&panel1_in>;
+ };
+ };
+ };
+ };
+ };
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+ dpi0_am62p_out0: endpoint@0 {
+ reg = <0>;
+ remote-endpoint = <&oldi0_am62p_in>;
+ };
+ dpi0_am62p_out1: endpoint@1 {
+ reg = <1>;
+ remote-endpoint = <&oldi1_am62p_in>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ dpi1_am62p_out: endpoint {
+ remote-endpoint = <&dpi_bridge>;
+ };
+ };
+ };
+ };
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 1/3] dt-bindings: display: ti,am65x-dss: Add am62p dss compatible
2025-11-14 6:43 ` [PATCH 1/3] dt-bindings: display: ti,am65x-dss: Add am62p dss compatible Swamil Jain
@ 2025-11-14 17:58 ` Conor Dooley
2025-11-17 5:10 ` Swamil Jain
0 siblings, 1 reply; 8+ messages in thread
From: Conor Dooley @ 2025-11-14 17:58 UTC (permalink / raw)
To: Swamil Jain
Cc: jyri.sarha, tomi.valkeinen, airlied, simona, maarten.lankhorst,
mripard, tzimmermann, robh, krzk+dt, conor+dt, aradhya.bhatia,
dri-devel, devicetree, linux-kernel, devarsht, praneeth, h-shenoy,
u-kumar1
[-- Attachment #1: Type: text/plain, Size: 7685 bytes --]
On Fri, Nov 14, 2025 at 12:13:34PM +0530, Swamil Jain wrote:
> TI's AM62P SoC contains two instances of the TI Keystone Display
> SubSystem (DSS), each with two video ports and two video planes. These
> instances support up to three independent video streams through OLDI,
> DPI, and DSI interfaces.
>
> DSS0 (first instance) supports:
> - Two OLDI transmitters on video port 1, configurable in dual-link or
> single-link mode.
> - DPI output on video port 2.
>
> DSS1 (second instance) supports:
> - One OLDI transmitter on video port 1 (single-link mode only).
> - DSI controller output on video port 2.
>
> The two OLDI transmitters can be configured in clone mode to drive a
> pair of identical OLDI single-link displays. DPI outputs from
> DSS0 VP2, DSS1 VP1, and DSS1 VP2 are multiplexed, allowing only one
> DPI output at a time.
>
> Add the compatible string "ti,am62p-dss" and update related
> description accordingly.
>
> AM62P has different power domains for DSS and OLDI compared to other
> Keystone SoCs. Therefore, add 'minItems' and set to 1 and update the
> 'maxItems' field in the power-domains property to 3 for the
> "ti,am62p-dss" compatible entry to reflect this hardware difference.
>
> Signed-off-by: Swamil Jain <s-jain1@ti.com>
> ---
> .../bindings/display/ti/ti,am65x-dss.yaml | 127 +++++++++++++++++-
> 1 file changed, 126 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
> index 361e9cae6896..8bd188e7f09b 100644
> --- a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
> +++ b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
> @@ -24,6 +24,19 @@ description: |
> DPI signals are also routed internally to DSI Tx controller present within the
> SoC. Due to clocking limitations only one of the interface i.e. either DSI or
> DPI can be used at once.
> + The AM62P has two instances of TI Keystone Display SubSystem, each with two
> + video ports and two video planes. These instances can support up to 3
> + independent video streams through OLDI, DPI, and DSI interfaces.
> + DSS0 (first instance) supports:
> + - Two OLDI TXes on video port 1, configurable in dual-link or
> + single link clone mode
> + - DPI output on video port 2
> + DSS1 (second instance) supports:
> + - One OLDI TX on video port 1 (single-link mode only)
> + - DSI controller output on video port 2
> + The two OLDI TXes can be configured in clone mode to drive a pair of
> + identical OLDI single-link displays. DPI outputs from DSS0 VP2, DSS1 VP1,
> + and DSS1 VP2 are muxed, allowing only one DPI output at a time.
>
> properties:
> compatible:
> @@ -31,6 +44,7 @@ properties:
> - ti,am625-dss
> - ti,am62a7-dss
> - ti,am62l-dss
> + - ti,am62p-dss
> - ti,am65x-dss
>
> reg:
> @@ -81,7 +95,8 @@ properties:
> maxItems: 1
>
> power-domains:
> - maxItems: 1
> + minItems: 1
> + maxItems: 3
> description: phandle to the associated power domain
>
> dma-coherent:
> @@ -347,3 +362,113 @@ examples:
I don't think you need a new 15 line example to add 2 power domains when
everything else remains the same.
Please also restrict the power domains by compatible. I'm not sure
reading this binding if the new device can function with 1 power domain,
but your binding permits that as well as not being clear that other
devices only need one.
pw-bot: changes-requested
Cheers,
Conor.
> };
> };
> };
> +
> + - |
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + #include <dt-bindings/interrupt-controller/irq.h>
> + #include <dt-bindings/soc/ti,sci_pm_domain.h>
> +
> + dss0: dss@30200000 {
> + compatible = "ti,am62p-dss";
> + reg = <0x30200000 0x1000>, /* common */
> + <0x30202000 0x1000>, /* vidl1 */
> + <0x30206000 0x1000>, /* vid */
> + <0x30207000 0x1000>, /* ovr1 */
> + <0x30208000 0x1000>, /* ovr2 */
> + <0x3020a000 0x1000>, /* vp1: Used for OLDI */
> + <0x3020b000 0x1000>, /* vp2: Used as DPI Out */
> + <0x30201000 0x1000>; /* common1 */
> + reg-names = "common", "vidl1", "vid",
> + "ovr1", "ovr2", "vp1", "vp2", "common1";
> + power-domains = <&k3_pds 186 TI_SCI_PD_EXCLUSIVE>,
> + <&k3_pds 243 TI_SCI_PD_EXCLUSIVE>,
> + <&k3_pds 244 TI_SCI_PD_EXCLUSIVE>;
> + clocks = <&k3_clks 186 6>,
> + <&dss0_vp1_clk>,
> + <&k3_clks 186 2>;
> + clock-names = "fck", "vp1", "vp2";
> + interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
> +
> + oldi-transmitters {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + oldi0_am62p: oldi@0 {
> + reg = <0>;
> + clocks = <&k3_clks 186 0>;
> + clock-names = "serial";
> + ti,oldi-io-ctrl = <&dss_oldi_io_ctrl>;
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> + oldi0_am62p_in: endpoint {
> + remote-endpoint = <&dpi0_am62p_out0>;
> + };
> + };
> +
> + port@1 {
> + reg = <1>;
> + oldi0_am62p_out: endpoint {
> + remote-endpoint = <&panel0_in>;
> + };
> + };
> + };
> + };
> +
> + oldi1_am62p: oldi@1 {
> + reg = <1>;
> + clocks = <&k3_clks 186 0>;
> + clock-names = "serial";
> + ti,oldi-io-ctrl = <&dss_oldi_io_ctrl>;
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> + oldi1_am62p_in: endpoint {
> + remote-endpoint = <&dpi0_am62p_out1>;
> + };
> + };
> +
> + port@1 {
> + reg = <1>;
> + oldi1_am62p_out: endpoint {
> + remote-endpoint = <&panel1_in>;
> + };
> + };
> + };
> + };
> + };
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + reg = <0>;
> + dpi0_am62p_out0: endpoint@0 {
> + reg = <0>;
> + remote-endpoint = <&oldi0_am62p_in>;
> + };
> + dpi0_am62p_out1: endpoint@1 {
> + reg = <1>;
> + remote-endpoint = <&oldi1_am62p_in>;
> + };
> + };
> +
> + port@1 {
> + reg = <1>;
> + dpi1_am62p_out: endpoint {
> + remote-endpoint = <&dpi_bridge>;
> + };
> + };
> + };
> + };
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH 1/3] dt-bindings: display: ti,am65x-dss: Add am62p dss compatible
2025-11-14 17:58 ` Conor Dooley
@ 2025-11-17 5:10 ` Swamil Jain
0 siblings, 0 replies; 8+ messages in thread
From: Swamil Jain @ 2025-11-17 5:10 UTC (permalink / raw)
To: Conor Dooley
Cc: jyri.sarha, tomi.valkeinen, airlied, simona, maarten.lankhorst,
mripard, tzimmermann, robh, krzk+dt, conor+dt, aradhya.bhatia,
dri-devel, devicetree, linux-kernel, devarsht, praneeth, h-shenoy,
u-kumar1
Hi Conor,
On 11/14/25 23:28, Conor Dooley wrote:
> On Fri, Nov 14, 2025 at 12:13:34PM +0530, Swamil Jain wrote:
>> TI's AM62P SoC contains two instances of the TI Keystone Display
>> SubSystem (DSS), each with two video ports and two video planes. These
>> instances support up to three independent video streams through OLDI,
>> DPI, and DSI interfaces.
>>
>> DSS0 (first instance) supports:
>> - Two OLDI transmitters on video port 1, configurable in dual-link or
>> single-link mode.
>> - DPI output on video port 2.
>>
>> DSS1 (second instance) supports:
>> - One OLDI transmitter on video port 1 (single-link mode only).
>> - DSI controller output on video port 2.
>>
>> The two OLDI transmitters can be configured in clone mode to drive a
>> pair of identical OLDI single-link displays. DPI outputs from
>> DSS0 VP2, DSS1 VP1, and DSS1 VP2 are multiplexed, allowing only one
>> DPI output at a time.
>>
>> Add the compatible string "ti,am62p-dss" and update related
>> description accordingly.
>>
>> AM62P has different power domains for DSS and OLDI compared to other
>> Keystone SoCs. Therefore, add 'minItems' and set to 1 and update the
>> 'maxItems' field in the power-domains property to 3 for the
>> "ti,am62p-dss" compatible entry to reflect this hardware difference.
>>
>> Signed-off-by: Swamil Jain <s-jain1@ti.com>
>> ---
>> .../bindings/display/ti/ti,am65x-dss.yaml | 127 +++++++++++++++++-
>> 1 file changed, 126 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
>> index 361e9cae6896..8bd188e7f09b 100644
>> --- a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
>> +++ b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
>> @@ -24,6 +24,19 @@ description: |
>> DPI signals are also routed internally to DSI Tx controller present within the
>> SoC. Due to clocking limitations only one of the interface i.e. either DSI or
>> DPI can be used at once.
>> + The AM62P has two instances of TI Keystone Display SubSystem, each with two
>> + video ports and two video planes. These instances can support up to 3
>> + independent video streams through OLDI, DPI, and DSI interfaces.
>> + DSS0 (first instance) supports:
>> + - Two OLDI TXes on video port 1, configurable in dual-link or
>> + single link clone mode
>> + - DPI output on video port 2
>> + DSS1 (second instance) supports:
>> + - One OLDI TX on video port 1 (single-link mode only)
>> + - DSI controller output on video port 2
>> + The two OLDI TXes can be configured in clone mode to drive a pair of
>> + identical OLDI single-link displays. DPI outputs from DSS0 VP2, DSS1 VP1,
>> + and DSS1 VP2 are muxed, allowing only one DPI output at a time.
>>
>> properties:
>> compatible:
>> @@ -31,6 +44,7 @@ properties:
>> - ti,am625-dss
>> - ti,am62a7-dss
>> - ti,am62l-dss
>> + - ti,am62p-dss
>> - ti,am65x-dss
>>
>> reg:
>> @@ -81,7 +95,8 @@ properties:
>> maxItems: 1
>>
>> power-domains:
>> - maxItems: 1
>> + minItems: 1
>> + maxItems: 3
>> description: phandle to the associated power domain
>>
>> dma-coherent:
>> @@ -347,3 +362,113 @@ examples:
>
> I don't think you need a new 15 line example to add 2 power domains when
> everything else remains the same.
Sure, added it for reference, yeah, I also think it is not required. Ok,
will drop this example.
>
> Please also restrict the power domains by compatible. I'm not sure
> reading this binding if the new device can function with 1 power domain,
> but your binding permits that as well as not being clear that other
> devices only need one.
Ack, will restrict the power domains by compatible.
Regards,
Swamil.
>
> pw-bot: changes-requested
>
> Cheers,
> Conor.
>
>> };
>> };
>> };
>> +
>> + - |
>> + #include <dt-bindings/interrupt-controller/arm-gic.h>
>> + #include <dt-bindings/interrupt-controller/irq.h>
>> + #include <dt-bindings/soc/ti,sci_pm_domain.h>
>> +
>> + dss0: dss@30200000 {
>> + compatible = "ti,am62p-dss";
>> + reg = <0x30200000 0x1000>, /* common */
>> + <0x30202000 0x1000>, /* vidl1 */
>> + <0x30206000 0x1000>, /* vid */
>> + <0x30207000 0x1000>, /* ovr1 */
>> + <0x30208000 0x1000>, /* ovr2 */
>> + <0x3020a000 0x1000>, /* vp1: Used for OLDI */
>> + <0x3020b000 0x1000>, /* vp2: Used as DPI Out */
>> + <0x30201000 0x1000>; /* common1 */
>> + reg-names = "common", "vidl1", "vid",
>> + "ovr1", "ovr2", "vp1", "vp2", "common1";
>> + power-domains = <&k3_pds 186 TI_SCI_PD_EXCLUSIVE>,
>> + <&k3_pds 243 TI_SCI_PD_EXCLUSIVE>,
>> + <&k3_pds 244 TI_SCI_PD_EXCLUSIVE>;
>> + clocks = <&k3_clks 186 6>,
>> + <&dss0_vp1_clk>,
>> + <&k3_clks 186 2>;
>> + clock-names = "fck", "vp1", "vp2";
>> + interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
>> +
>> + oldi-transmitters {
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> +
>> + oldi0_am62p: oldi@0 {
>> + reg = <0>;
>> + clocks = <&k3_clks 186 0>;
>> + clock-names = "serial";
>> + ti,oldi-io-ctrl = <&dss_oldi_io_ctrl>;
>> +
>> + ports {
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> +
>> + port@0 {
>> + reg = <0>;
>> + oldi0_am62p_in: endpoint {
>> + remote-endpoint = <&dpi0_am62p_out0>;
>> + };
>> + };
>> +
>> + port@1 {
>> + reg = <1>;
>> + oldi0_am62p_out: endpoint {
>> + remote-endpoint = <&panel0_in>;
>> + };
>> + };
>> + };
>> + };
>> +
>> + oldi1_am62p: oldi@1 {
>> + reg = <1>;
>> + clocks = <&k3_clks 186 0>;
>> + clock-names = "serial";
>> + ti,oldi-io-ctrl = <&dss_oldi_io_ctrl>;
>> +
>> + ports {
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> +
>> + port@0 {
>> + reg = <0>;
>> + oldi1_am62p_in: endpoint {
>> + remote-endpoint = <&dpi0_am62p_out1>;
>> + };
>> + };
>> +
>> + port@1 {
>> + reg = <1>;
>> + oldi1_am62p_out: endpoint {
>> + remote-endpoint = <&panel1_in>;
>> + };
>> + };
>> + };
>> + };
>> + };
>> +
>> + ports {
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> +
>> + port@0 {
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> + reg = <0>;
>> + dpi0_am62p_out0: endpoint@0 {
>> + reg = <0>;
>> + remote-endpoint = <&oldi0_am62p_in>;
>> + };
>> + dpi0_am62p_out1: endpoint@1 {
>> + reg = <1>;
>> + remote-endpoint = <&oldi1_am62p_in>;
>> + };
>> + };
>> +
>> + port@1 {
>> + reg = <1>;
>> + dpi1_am62p_out: endpoint {
>> + remote-endpoint = <&dpi_bridge>;
>> + };
>> + };
>> + };
>> + };
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/3] drm/tidss: Power up attached PM domains on probe
2025-11-14 6:43 [PATCH 0/3] Add Display support for AM62P SoC Swamil Jain
2025-11-14 6:43 ` [PATCH 1/3] dt-bindings: display: ti,am65x-dss: Add am62p dss compatible Swamil Jain
@ 2025-11-14 6:43 ` Swamil Jain
2025-11-14 15:39 ` Francesco Dolcini
2025-11-14 6:43 ` [PATCH 3/3] drm: tidss: tidss_drv: Add support for AM62P display subsystem Swamil Jain
2 siblings, 1 reply; 8+ messages in thread
From: Swamil Jain @ 2025-11-14 6:43 UTC (permalink / raw)
To: jyri.sarha, tomi.valkeinen, airlied, simona, maarten.lankhorst,
mripard, tzimmermann, robh, krzk+dt, conor+dt, aradhya.bhatia
Cc: dri-devel, devicetree, linux-kernel, devarsht, praneeth, h-shenoy,
u-kumar1, s-jain1
From: Devarsh Thakkar <devarsht@ti.com>
Some SoC's such as AM62P have dedicated power domains
for OLDI which need to be powered on separately along
with display controller.
So during driver probe, power up all attached PM domains
enumerated in devicetree node for DSS.
This also prepares base to add display support for AM62P.
Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
[j-choudhary@ti.com: fix PM call sequence causing kernel crash in OLDI]
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
---
drivers/gpu/drm/tidss/tidss_drv.c | 88 +++++++++++++++++++++++++++++--
drivers/gpu/drm/tidss/tidss_drv.h | 4 ++
2 files changed, 89 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tidss_drv.c
index 1c8cc18bc53c..50158281715f 100644
--- a/drivers/gpu/drm/tidss/tidss_drv.c
+++ b/drivers/gpu/drm/tidss/tidss_drv.c
@@ -8,6 +8,7 @@
#include <linux/of.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
+#include <linux/pm_domain.h>
#include <linux/aperture.h>
#include <drm/clients/drm_client_setup.h>
@@ -107,6 +108,72 @@ static const struct drm_driver tidss_driver = {
.minor = 0,
};
+static int tidss_detach_pm_domains(struct tidss_device *tidss)
+{
+ int i;
+
+ if (tidss->num_domains <= 1)
+ return 0;
+
+ for (i = 0; i < tidss->num_domains; i++) {
+ if (tidss->pd_link[i] && !IS_ERR(tidss->pd_link[i]))
+ device_link_del(tidss->pd_link[i]);
+ if (tidss->pd_dev[i] && !IS_ERR(tidss->pd_dev[i]))
+ dev_pm_domain_detach(tidss->pd_dev[i], true);
+ tidss->pd_dev[i] = NULL;
+ tidss->pd_link[i] = NULL;
+ }
+
+ return 0;
+}
+
+static int tidss_attach_pm_domains(struct tidss_device *tidss)
+{
+ struct device *dev = tidss->dev;
+ int i;
+ int ret;
+ struct platform_device *pdev = to_platform_device(dev);
+ struct device_node *np = pdev->dev.of_node;
+
+ tidss->num_domains = of_count_phandle_with_args(np, "power-domains",
+ "#power-domain-cells");
+ if (tidss->num_domains <= 1) {
+ dev_dbg(dev, "One or less power domains, no need to do attach domains\n");
+ return 0;
+ }
+
+ tidss->pd_dev = devm_kmalloc_array(dev, tidss->num_domains,
+ sizeof(*tidss->pd_dev), GFP_KERNEL);
+ if (!tidss->pd_dev)
+ return -ENOMEM;
+
+ tidss->pd_link = devm_kmalloc_array(dev, tidss->num_domains,
+ sizeof(*tidss->pd_link), GFP_KERNEL);
+ if (!tidss->pd_link)
+ return -ENOMEM;
+
+ for (i = 0; i < tidss->num_domains; i++) {
+ tidss->pd_dev[i] = dev_pm_domain_attach_by_id(dev, i);
+ if (IS_ERR(tidss->pd_dev[i])) {
+ ret = PTR_ERR(tidss->pd_dev[i]);
+ goto fail;
+ }
+
+ tidss->pd_link[i] = device_link_add(dev, tidss->pd_dev[i],
+ DL_FLAG_STATELESS |
+ DL_FLAG_PM_RUNTIME | DL_FLAG_RPM_ACTIVE);
+ if (!tidss->pd_link[i]) {
+ ret = -EINVAL;
+ goto fail;
+ }
+ }
+
+ return 0;
+fail:
+ tidss_detach_pm_domains(tidss);
+ return ret;
+}
+
static int tidss_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -129,15 +196,24 @@ static int tidss_probe(struct platform_device *pdev)
spin_lock_init(&tidss->irq_lock);
+ /* powering up associated OLDI domains */
+ ret = tidss_attach_pm_domains(tidss);
+ if (ret < 0) {
+ dev_err(dev, "failed to attach power domains %d\n", ret);
+ goto err_detach_pm_domains;
+ }
+
ret = dispc_init(tidss);
if (ret) {
dev_err(dev, "failed to initialize dispc: %d\n", ret);
- return ret;
+ goto err_detach_pm_domains;
}
ret = tidss_oldi_init(tidss);
- if (ret)
- return dev_err_probe(dev, ret, "failed to init OLDI\n");
+ if (ret) {
+ dev_dbg(dev, "failed to init OLDI: %d\n", ret);
+ goto err_oldi_deinit;
+ }
pm_runtime_enable(dev);
@@ -203,8 +279,12 @@ static int tidss_probe(struct platform_device *pdev)
pm_runtime_dont_use_autosuspend(dev);
pm_runtime_disable(dev);
+err_oldi_deinit:
tidss_oldi_deinit(tidss);
+err_detach_pm_domains:
+ tidss_detach_pm_domains(tidss);
+
return ret;
}
@@ -232,6 +312,8 @@ static void tidss_remove(struct platform_device *pdev)
/* devm allocated dispc goes away with the dev so mark it NULL */
dispc_remove(tidss);
+ tidss_detach_pm_domains(tidss);
+
dev_dbg(dev, "%s done\n", __func__);
}
diff --git a/drivers/gpu/drm/tidss/tidss_drv.h b/drivers/gpu/drm/tidss/tidss_drv.h
index e1c1f41d8b4b..6eb17cb32043 100644
--- a/drivers/gpu/drm/tidss/tidss_drv.h
+++ b/drivers/gpu/drm/tidss/tidss_drv.h
@@ -41,6 +41,10 @@ struct tidss_device {
/* protects the irq masks field and irqenable/irqstatus registers */
spinlock_t irq_lock;
dispc_irq_t irq_mask; /* enabled irqs */
+
+ int num_domains; /* Handle attached PM domains */
+ struct device **pd_dev;
+ struct device_link **pd_link;
};
#define to_tidss(__dev) container_of(__dev, struct tidss_device, ddev)
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 2/3] drm/tidss: Power up attached PM domains on probe
2025-11-14 6:43 ` [PATCH 2/3] drm/tidss: Power up attached PM domains on probe Swamil Jain
@ 2025-11-14 15:39 ` Francesco Dolcini
2025-11-17 5:12 ` Swamil Jain
0 siblings, 1 reply; 8+ messages in thread
From: Francesco Dolcini @ 2025-11-14 15:39 UTC (permalink / raw)
To: Swamil Jain
Cc: jyri.sarha, tomi.valkeinen, airlied, simona, maarten.lankhorst,
mripard, tzimmermann, robh, krzk+dt, conor+dt, aradhya.bhatia,
dri-devel, devicetree, linux-kernel, devarsht, praneeth, h-shenoy,
u-kumar1
Hello Swamil,
thanks for the patch.
On Fri, Nov 14, 2025 at 12:13:35PM +0530, Swamil Jain wrote:
> From: Devarsh Thakkar <devarsht@ti.com>
>
> Some SoC's such as AM62P have dedicated power domains
> for OLDI which need to be powered on separately along
> with display controller.
>
> So during driver probe, power up all attached PM domains
> enumerated in devicetree node for DSS.
>
> This also prepares base to add display support for AM62P.
>
> Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
> [j-choudhary@ti.com: fix PM call sequence causing kernel crash in OLDI]
> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
you need to add your signed-off-by at the end
Francesco
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] drm/tidss: Power up attached PM domains on probe
2025-11-14 15:39 ` Francesco Dolcini
@ 2025-11-17 5:12 ` Swamil Jain
0 siblings, 0 replies; 8+ messages in thread
From: Swamil Jain @ 2025-11-17 5:12 UTC (permalink / raw)
To: Francesco Dolcini
Cc: jyri.sarha, tomi.valkeinen, airlied, simona, maarten.lankhorst,
mripard, tzimmermann, robh, krzk+dt, conor+dt, aradhya.bhatia,
dri-devel, devicetree, linux-kernel, devarsht, praneeth, h-shenoy,
u-kumar1
Hi Francesco,
On 11/14/25 21:09, Francesco Dolcini wrote:
> Hello Swamil,
> thanks for the patch.
>
> On Fri, Nov 14, 2025 at 12:13:35PM +0530, Swamil Jain wrote:
>> From: Devarsh Thakkar <devarsht@ti.com>
>>
>> Some SoC's such as AM62P have dedicated power domains
>> for OLDI which need to be powered on separately along
>> with display controller.
>>
>> So during driver probe, power up all attached PM domains
>> enumerated in devicetree node for DSS.
>>
>> This also prepares base to add display support for AM62P.
>>
>> Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
>> [j-choudhary@ti.com: fix PM call sequence causing kernel crash in OLDI]
>> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
>
> you need to add your signed-off-by at the end
Thanks for pointing, will add.
Regards,
Swamil.
>
> Francesco
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/3] drm: tidss: tidss_drv: Add support for AM62P display subsystem
2025-11-14 6:43 [PATCH 0/3] Add Display support for AM62P SoC Swamil Jain
2025-11-14 6:43 ` [PATCH 1/3] dt-bindings: display: ti,am65x-dss: Add am62p dss compatible Swamil Jain
2025-11-14 6:43 ` [PATCH 2/3] drm/tidss: Power up attached PM domains on probe Swamil Jain
@ 2025-11-14 6:43 ` Swamil Jain
2 siblings, 0 replies; 8+ messages in thread
From: Swamil Jain @ 2025-11-14 6:43 UTC (permalink / raw)
To: jyri.sarha, tomi.valkeinen, airlied, simona, maarten.lankhorst,
mripard, tzimmermann, robh, krzk+dt, conor+dt, aradhya.bhatia
Cc: dri-devel, devicetree, linux-kernel, devarsht, praneeth, h-shenoy,
u-kumar1, s-jain1
The DSS controller on TI's AM62P SoC features two instances of the TI
DSS. Each DSS instance supports two video ports, similar to the DSS
controller found on the TI AM62X SoC. This allows three independent
video streams to be supported: OLDI, DPI, and DSI.
Since the DSS instances on AM62P are architecturally similar to those
on the AM62X DSS controller, the existing dispc_am625_feats
configuration can be reused for the AM62P DSS support.
This patch adds the necessary device tree compatibility entry for
"ti,am62p-dss" in the tidss driver, pointing to dispc_am625_feats,
thereby enabling DSS support on AM62P devices.
Signed-off-by: Swamil Jain <s-jain1@ti.com>
---
drivers/gpu/drm/tidss/tidss_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tidss_drv.c
index 50158281715f..620d0af478f8 100644
--- a/drivers/gpu/drm/tidss/tidss_drv.c
+++ b/drivers/gpu/drm/tidss/tidss_drv.c
@@ -327,6 +327,7 @@ static const struct of_device_id tidss_of_table[] = {
{ .compatible = "ti,am625-dss", .data = &dispc_am625_feats, },
{ .compatible = "ti,am62a7-dss", .data = &dispc_am62a7_feats, },
{ .compatible = "ti,am62l-dss", .data = &dispc_am62l_feats, },
+ { .compatible = "ti,am62p-dss", .data = &dispc_am625_feats, },
{ .compatible = "ti,am65x-dss", .data = &dispc_am65x_feats, },
{ .compatible = "ti,j721e-dss", .data = &dispc_j721e_feats, },
{ }
^ permalink raw reply related [flat|nested] 8+ messages in thread