Skip to contentSkip to conversation

dt-bindings: mfd: syscon: Add ti,dss-oldi-io-ctrl compatible

PATCH Superseded Andrew Davis 4 participants 8 messages Aug 9, 2023 – Aug 17, 2023

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 dt-bindings: mfd: syscon: Add ti,dss-oldi-io-ctrl compatible

Add TI DSS OLDI-IO control registers compatible. This is a region of 5 32bit registers found in the TI AM65 CTRL_MMR0 register space[0]. They are used to control the characteristics of the OLDI DATA/CLK IO as needed by the DSS display controller node.

[0] https://www.ti.com/lit/pdf/spruid7

---
 Documentation/devicetree/bindings/mfd/syscon.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/mfd/syscon.yaml +1 -0
index 8103154bbb529..5029abd6d6411 100644
@@ -69,6 +69,7 @@ properties:
               - rockchip,rk3588-qos
               - rockchip,rv1126-qos
               - starfive,jh7100-sysmain
+              - ti,dss-oldi-io-ctrl
 
           - const: syscon
 
Signature · 1 line
2.39.2
#1 lore raw

PATCH 2/2 arm64: dts: ti: k3-am65: Add full compatible to dss-oldi-io-ctrl node

This matches the binding for this register region which fixes a couple DTS check warnings.

While here trim the leading 0s from the "reg" definition.

---
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +2 -2
index d08f086d7d013..603adc1790515 100644
@@ -498,8 +498,8 @@ serdes_mux: mux-controller {
 		};
 
 		dss_oldi_io_ctrl: dss-oldi-io-ctrl@41e0 {
-			compatible = "syscon";
-			reg = <0x000041e0 0x14>;
+			compatible = "ti,dss-oldi-io-ctrl", "syscon";
+			reg = <0x41e0 0x14>;
 		};
 
 		ehrpwm_tbclk: clock-controller@4140 {
Signature · 1 line
2.39.2
#2 lore raw
In reply to Andrew Davis

Hi Andrew,

Thank you for quickly whipping up these patches! =)

Quoted 4 lines · Andrew Davis

Add TI DSS OLDI-IO control registers compatible. This is a region of 5 32bit registers found in the TI AM65 CTRL_MMR0 register space[0]. They are used to control the characteristics of the OLDI DATA/CLK IO as needed by the DSS display controller node.

As long as the driver takes care of it, we can reuse the same compatible even when OLDI IO Ctrl registers change from SoC to SoC, (in this case, AM65 to AM62), right?

Regards
Aradhya

Quoted 20 lines

[0] https://www.ti.com/lit/pdf/spruid7

---
 Documentation/devicetree/bindings/mfd/syscon.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/mfd/syscon.yaml +1 -0
index 8103154bbb529..5029abd6d6411 100644
@@ -69,6 +69,7 @@ properties:
               - rockchip,rk3588-qos
               - rockchip,rv1126-qos
               - starfive,jh7100-sysmain
+              - ti,dss-oldi-io-ctrl
 
           - const: syscon
 
#3 lore raw
Quoted 5 lines · Aradhya Bhatia

Hi Andrew,

Thank you for quickly whipping up these patches! =)

On 09-Aug-23 22:27, Andrew Davis wrote:

Quoted 9 lines
Quoted 4 lines

Add TI DSS OLDI-IO control registers compatible. This is a region of 5 32bit registers found in the TI AM65 CTRL_MMR0 register space[0]. They are used to control the characteristics of the OLDI DATA/CLK IO as needed by the DSS display controller node.

As long as the driver takes care of it, we can reuse the same compatible even when OLDI IO Ctrl registers change from SoC to SoC, (in this case, AM65 to AM62), right?

That depends, is the register space still "compatible" with the AM65 version of this space? If not then we would want to qualify these with their SoC versions.

A quick check of the documentation shows the register space is still 5 registers, 4 DATA and 1 CLK. The contents are different though, but since this compatible string is not used to match with a driver that would care (that is handled by the DSS node which does have different compatibles for each device), I'm actually not sure. Guess we can leave that decision to the DT binding maintainers..

Andrew

Quoted 23 lines

Regards
Aradhya

Quoted 20 lines

[0] https://www.ti.com/lit/pdf/spruid7

---
  Documentation/devicetree/bindings/mfd/syscon.yaml | 1 +
  1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/mfd/syscon.yaml +1 -0
index 8103154bbb529..5029abd6d6411 100644
@@ -69,6 +69,7 @@ properties:
                - rockchip,rk3588-qos
                - rockchip,rv1126-qos
                - starfive,jh7100-sysmain
+              - ti,dss-oldi-io-ctrl
 
            - const: syscon
 
#4 lore raw
Quoted 12 lines · Andrew Davis
Quoted 11 lines · Aradhya Bhatia

Hi Andrew,

Thank you for quickly whipping up these patches! =)

Quoted 5 lines · Andrew Davis

Add TI DSS OLDI-IO control registers compatible. This is a region of 5 32bit registers found in the TI AM65 CTRL_MMR0 register space[0]. They are used to control the characteristics of the OLDI DATA/CLK IO as needed
by the DSS display controller node.

Quoted 8 lines
Quoted 4 lines

As long as the driver takes care of it, we can reuse the same compatible even when OLDI IO Ctrl registers change from SoC to SoC, (in this case, AM65 to AM62), right?

That depends, is the register space still "compatible" with the AM65 version of this space? If not then we would want to qualify these with their SoC versions.

It is certainly not compatible. More on this below.

Quoted 7 lines

A quick check of the documentation shows the register space is still 5 registers, 4 DATA and 1 CLK. The contents are different though, but since this compatible string is not used to match with a driver that would care (that is handled by the DSS node which does have different compatibles for each device), I'm actually not sure. Guess we can leave that decision to the DT binding maintainers..

Exactly. The DSS driver in our, as you like to call, evil-vendor-tree uses the compatible information to decide which register offsets to write to, and what to write.

On the register compatibility situation...

AM62 OLDI IO Ctrl has, in total, 12 registers (as opposed to 5 in AM65).

There are 4 Data and 1 Clk registers (per OLDI). And there are 2 OLDI transmitters in AM62. However, their contents are different as you noted.

There are 2 more registers in AM62 (unlike AM65), that control power-down and loop-back. And it is the power-down register, that will be primarily used by the driver.

Regards
Aradhya

Quoted 26 lines

Andrew

Quoted 23 lines

Regards
Aradhya

Quoted 20 lines

[0] https://www.ti.com/lit/pdf/spruid7

---
  Documentation/devicetree/bindings/mfd/syscon.yaml | 1 +

  1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/mfd/syscon.yaml +0 -0
index 8103154bbb529..5029abd6d6411 100644
@@ -69,6 +69,7 @@ properties:

                - rockchip,rk3588-qos
                - rockchip,rv1126-qos
                - starfive,jh7100-sysmain
+              - ti,dss-oldi-io-ctrl
              - const: syscon

#5 lore raw
Quoted 15 lines · Aradhya Bhatia
Quoted 12 lines · Andrew Davis
Quoted 11 lines · Aradhya Bhatia

Hi Andrew,

Thank you for quickly whipping up these patches! =)

Quoted 5 lines · Andrew Davis

Add TI DSS OLDI-IO control registers compatible. This is a region of 5 32bit registers found in the TI AM65 CTRL_MMR0 register space[0]. They are used to control the characteristics of the OLDI DATA/CLK IO as needed
by the DSS display controller node.

Quoted 8 lines
Quoted 8 lines
Quoted 4 lines

As long as the driver takes care of it, we can reuse the same compatible even when OLDI IO Ctrl registers change from SoC to SoC, (in this case, AM65 to AM62), right?

That depends, is the register space still "compatible" with the AM65 version of this space? If not then we would want to qualify these with their SoC versions.

Even if they are compatible, having soc-specific compatibles with a fallback to the common oldi compatible string would be ideal.

Quoted 1 line

It is certainly not compatible. More on this below.

But as they're not compatible, that's kinda moot anyway.

Quoted 8 lines
Quoted 8 lines

A quick check of the documentation shows the register space is still 5 registers, 4 DATA and 1 CLK. The contents are different though, but since this compatible string is not used to match with a driver that would care (that is handled by the DSS node which does have different compatibles for each device), I'm actually not sure.

Guess we can leave
that decision to the DT binding maintainers..

I'm not 100% sure what this decision actually is. Could you elaborate?

Quoted 24 lines

Exactly. The DSS driver in our, as you like to call, evil-vendor-tree uses the compatible information to decide which register offsets to write to, and what to write.

On the register compatibility situation...

AM62 OLDI IO Ctrl has, in total, 12 registers (as opposed to 5 in AM65).

There are 4 Data and 1 Clk registers (per OLDI). And there are 2 OLDI transmitters in AM62. However, their contents are different as you noted.

There are 2 more registers in AM62 (unlike AM65), that control power-down and loop-back. And it is the power-down register, that will be primarily used by the driver.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

[0] https://www.ti.com/lit/pdf/spruid7

---
  Documentation/devicetree/bindings/mfd/syscon.yaml | 1 +

  1 file changed, 1 insertion(+)
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Documentation/devicetree/bindings/mfd/syscon.yaml +0 -0
index 8103154bbb529..5029abd6d6411 100644
@@ -69,6 +69,7 @@ properties:

                - rockchip,rk3588-qos
                - rockchip,rv1126-qos
                - starfive,jh7100-sysmain
+              - ti,dss-oldi-io-ctrl

So it sounds like this compatible, that appears to be generic, should instead be soc-specific as the register layout is different between SoCs?

Apologies if I have misunderstood.

Thanks,
Conor.

Quoted 3 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

              - const: syscon

#6 lore raw
Quoted 38 lines · Conor Dooley
Quoted 15 lines · Aradhya Bhatia
Quoted 12 lines · Andrew Davis
Quoted 11 lines · Aradhya Bhatia

Hi Andrew,

Thank you for quickly whipping up these patches! =)

Quoted 5 lines · Andrew Davis

Add TI DSS OLDI-IO control registers compatible. This is a region of 5 32bit registers found in the TI AM65 CTRL_MMR0 register space[0]. They are used to control the characteristics of the OLDI DATA/CLK IO as needed
by the DSS display controller node.

Quoted 8 lines
Quoted 8 lines
Quoted 4 lines

As long as the driver takes care of it, we can reuse the same compatible even when OLDI IO Ctrl registers change from SoC to SoC, (in this case, AM65 to AM62), right?

That depends, is the register space still "compatible" with the AM65 version of this space? If not then we would want to qualify these with their SoC versions.

Even if they are compatible, having soc-specific compatibles with a fallback to the common oldi compatible string would be ideal.

Quoted 1 line

It is certainly not compatible. More on this below.

But as they're not compatible, that's kinda moot anyway.

Quoted 5 lines
Quoted 5 lines

A quick check of the documentation shows the register space is still 5 registers, 4 DATA and 1 CLK. The contents are different though, but since this compatible string is not used to match with a driver that would care (that is handled by the DSS node which does have different compatibles for each device), I'm actually not sure.

Quoted 5 lines
Quoted 2 lines
Quoted 2 lines

Guess we can leave
that decision to the DT binding maintainers..

I'm not 100% sure what this decision actually is. Could you elaborate?

I was not exactly aware of the extent of the incompatibilities. If they are not compatible, then there is really no decision needed, they must have different strings.

Quoted 25 lines
Quoted 25 lines

Exactly. The DSS driver in our, as you like to call, evil-vendor-tree uses the compatible information to decide which register offsets to write to, and what to write.

On the register compatibility situation...

AM62 OLDI IO Ctrl has, in total, 12 registers (as opposed to 5 in AM65).

There are 4 Data and 1 Clk registers (per OLDI). And there are 2 OLDI transmitters in AM62. However, their contents are different as you noted.

There are 2 more registers in AM62 (unlike AM65), that control power-down and loop-back. And it is the power-down register, that will be primarily used by the driver.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

[0] https://www.ti.com/lit/pdf/spruid7

---
   Documentation/devicetree/bindings/mfd/syscon.yaml | 1 +
   1 file changed, 1 insertion(+)
Quoted 15 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

Documentation/devicetree/bindings/mfd/syscon.yaml properties: · line 72

Quoted 10 lines
Documentation/devicetree/bindings/mfd/syscon.yaml +1 -0
index 8103154bbb529..5029abd6d6411 100644
@@ -69,6 +69,7 @@ properties:
                 - rockchip,rk3588-qos
                 - rockchip,rv1126-qos
                 - starfive,jh7100-sysmain
+              - ti,dss-oldi-io-ctrl

So it sounds like this compatible, that appears to be generic, should instead be soc-specific as the register layout is different between SoCs?

Sounds like it, I'll go and make this soc-specific.

Thanks,
Andrew

Quoted 8 lines

Apologies if I have misunderstood.

Thanks,
Conor.

Quoted 3 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Documentation/devicetree/bindings/mfd/syscon.yaml +0 -0
               - const: syscon
 
maintainer
#7 lore raw
In reply to Andrew Davis
Quoted 11 lines · Andrew Davis

Add TI DSS OLDI-IO control registers compatible. This is a region of 5 32bit registers found in the TI AM65 CTRL_MMR0 register space[0]. They are used to control the characteristics of the OLDI DATA/CLK IO as needed by the DSS display controller node.

[0] https://www.ti.com/lit/pdf/spruid7

---
 Documentation/devicetree/bindings/mfd/syscon.yaml | 1 +
 1 file changed, 1 insertion(+)

Dropping. Please resubmit once the discussion is over.

Quoted 15 lines
Documentation/devicetree/bindings/mfd/syscon.yaml +1 -0
index 8103154bbb529..5029abd6d6411 100644
@@ -69,6 +69,7 @@ properties:
               - rockchip,rk3588-qos
               - rockchip,rv1126-qos
               - starfive,jh7100-sysmain
+              - ti,dss-oldi-io-ctrl
 
           - const: syscon
 
Signature · 1 line
2.39.2
Signature · 6 lines
Lee Jones [李琼斯]

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel