dt-bindings: ti-serdes-mux: Add defines for SERDES4 in J784S4 SoC

Message ID 20230710102712.155195-1-j-choudhary@ti.com
State New
Headers
Series dt-bindings: ti-serdes-mux: Add defines for SERDES4 in J784S4 SoC |

Commit Message

Jayesh Choudhary July 10, 2023, 10:27 a.m. UTC
  SERDES4 has 4 lanes. Add lane definitions for it.

Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
---
 include/dt-bindings/mux/ti-serdes.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
  

Comments

Krzysztof Kozlowski July 10, 2023, 11:41 a.m. UTC | #1
On 10/07/2023 12:27, Jayesh Choudhary wrote:
> SERDES4 has 4 lanes. Add lane definitions for it.
> 
> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
> ---
>  include/dt-bindings/mux/ti-serdes.h | 20 ++++++++++++++++++++

Where are the users of this binding constants? IOW, why do you need to
add these?

I don't see users of existing constants either...


Best regards,
Krzysztof
  
Jayesh Choudhary July 11, 2023, 5:55 a.m. UTC | #2
Hello Krzysztof,

On 10/07/23 17:11, Krzysztof Kozlowski wrote:
> On 10/07/2023 12:27, Jayesh Choudhary wrote:
>> SERDES4 has 4 lanes. Add lane definitions for it.
>>
>> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
>> ---
>>   include/dt-bindings/mux/ti-serdes.h | 20 ++++++++++++++++++++
> 
> Where are the users of this binding constants? IOW, why do you need to
> add these?
> 
> I don't see users of existing constants either...
> 

These constants are propagated in the idle-state property for the
mux-controller node (named serdes_ln_ctrl) usually in the final
board dts files and occasionally in the main dtsi files for TI SoCs.

-Jayesh
  
Krzysztof Kozlowski July 11, 2023, 6:04 a.m. UTC | #3
On 11/07/2023 07:55, Jayesh Choudhary wrote:
> Hello Krzysztof,
> 
> On 10/07/23 17:11, Krzysztof Kozlowski wrote:
>> On 10/07/2023 12:27, Jayesh Choudhary wrote:
>>> SERDES4 has 4 lanes. Add lane definitions for it.
>>>
>>> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
>>> ---
>>>   include/dt-bindings/mux/ti-serdes.h | 20 ++++++++++++++++++++
>>
>> Where are the users of this binding constants? IOW, why do you need to
>> add these?
>>
>> I don't see users of existing constants either...
>>
> 
> These constants are propagated in the idle-state property for the
> mux-controller node (named serdes_ln_ctrl) usually in the final
> board dts files and occasionally in the main dtsi files for TI SoCs.

So they are not used. Do not add headers which are not used - neither to
the kernel sources, nor to the DTSI. The header constants don't even
look as suitable for bindings, although this is tricky to judge without
users.

Best regards,
Krzysztof
  
Jayesh Choudhary July 11, 2023, 7:21 a.m. UTC | #4
On 11/07/23 11:34, Krzysztof Kozlowski wrote:
> On 11/07/2023 07:55, Jayesh Choudhary wrote:
>> Hello Krzysztof,
>>
>> On 10/07/23 17:11, Krzysztof Kozlowski wrote:
>>> On 10/07/2023 12:27, Jayesh Choudhary wrote:
>>>> SERDES4 has 4 lanes. Add lane definitions for it.
>>>>
>>>> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
>>>> ---
>>>>    include/dt-bindings/mux/ti-serdes.h | 20 ++++++++++++++++++++
>>>
>>> Where are the users of this binding constants? IOW, why do you need to
>>> add these?
>>>
>>> I don't see users of existing constants either...
>>>
>>
>> These constants are propagated in the idle-state property for the
>> mux-controller node (named serdes_ln_ctrl) usually in the final
>> board dts files and occasionally in the main dtsi files for TI SoCs.
> 
> So they are not used. 

'They' as in SERDES4 definition or others as well??

Do not add headers which are not used - neither to
> the kernel sources, nor to the DTSI. The header constants don't even
> look as suitable for bindings, although this is tricky to judge without
> users.
> 
> Best regards,
> Krzysztof
>
  
Krzysztof Kozlowski July 11, 2023, 7:35 a.m. UTC | #5
On 11/07/2023 09:21, Jayesh Choudhary wrote:
> 
> 
> On 11/07/23 11:34, Krzysztof Kozlowski wrote:
>> On 11/07/2023 07:55, Jayesh Choudhary wrote:
>>> Hello Krzysztof,
>>>
>>> On 10/07/23 17:11, Krzysztof Kozlowski wrote:
>>>> On 10/07/2023 12:27, Jayesh Choudhary wrote:
>>>>> SERDES4 has 4 lanes. Add lane definitions for it.
>>>>>
>>>>> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
>>>>> ---
>>>>>    include/dt-bindings/mux/ti-serdes.h | 20 ++++++++++++++++++++
>>>>
>>>> Where are the users of this binding constants? IOW, why do you need to
>>>> add these?
>>>>
>>>> I don't see users of existing constants either...
>>>>
>>>
>>> These constants are propagated in the idle-state property for the
>>> mux-controller node (named serdes_ln_ctrl) usually in the final
>>> board dts files and occasionally in the main dtsi files for TI SoCs.
>>
>> So they are not used. 
> 
> 'They' as in SERDES4 definition or others as well??

I made quick greps and it seems that none of the defines - existing and
new - are used. But here anyway we talk about this patch, which without
users does not have any rationale.

Best regards,
Krzysztof
  
Jayesh Choudhary July 11, 2023, 8:02 a.m. UTC | #6
On 11/07/23 13:05, Krzysztof Kozlowski wrote:
> On 11/07/2023 09:21, Jayesh Choudhary wrote:
>>
>>
>> On 11/07/23 11:34, Krzysztof Kozlowski wrote:
>>> On 11/07/2023 07:55, Jayesh Choudhary wrote:
>>>> Hello Krzysztof,
>>>>
>>>> On 10/07/23 17:11, Krzysztof Kozlowski wrote:
>>>>> On 10/07/2023 12:27, Jayesh Choudhary wrote:
>>>>>> SERDES4 has 4 lanes. Add lane definitions for it.
>>>>>>
>>>>>> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
>>>>>> ---
>>>>>>     include/dt-bindings/mux/ti-serdes.h | 20 ++++++++++++++++++++
>>>>>
>>>>> Where are the users of this binding constants? IOW, why do you need to
>>>>> add these?
>>>>>
>>>>> I don't see users of existing constants either...
>>>>>
>>>>
>>>> These constants are propagated in the idle-state property for the
>>>> mux-controller node (named serdes_ln_ctrl) usually in the final
>>>> board dts files and occasionally in the main dtsi files for TI SoCs.
>>>
>>> So they are not used.
>>
>> 'They' as in SERDES4 definition or others as well??
> 
> I made quick greps and it seems that none of the defines - existing and
> new - are used. But here anyway we talk about this patch, which without
> users does not have any rationale.
These defines are yet to be added. For reference:
https://lore.kernel.org/all/20230522092201.127598-3-s-vadapalli@ti.com/

SERDES4 by default is used for display but it can be configured for 
QSGMII too. There are users for that configuration as well. So it felt 
reasonable to add the definitions for SERDES4 which were missed earlier.

Warm Regards,
-Jayesh
  

Patch

diff --git a/include/dt-bindings/mux/ti-serdes.h b/include/dt-bindings/mux/ti-serdes.h
index 669ca2d6abce..0d7aec677df9 100644
--- a/include/dt-bindings/mux/ti-serdes.h
+++ b/include/dt-bindings/mux/ti-serdes.h
@@ -179,4 +179,24 @@ 
 #define J784S4_SERDES2_LANE3_IP3_UNUSED		0x2
 #define J784S4_SERDES2_LANE3_IP4_UNUSED		0x3
 
+#define J784S4_SERDES4_LANE0_EDP_LANE0		0x0
+#define J784S4_SERDES4_LANE0_QSGMII_LANE5	0x1
+#define J784S4_SERDES4_LANE0_IP3_UNUSED		0x2
+#define J784S4_SERDES4_LANE0_IP4_UNUSED		0x3
+
+#define J784S4_SERDES4_LANE1_EDP_LANE1		0x0
+#define J784S4_SERDES4_LANE1_QSGMII_LANE6	0x1
+#define J784S4_SERDES4_LANE1_IP3_UNUSED		0x2
+#define J784S4_SERDES4_LANE1_IP4_UNUSED		0x3
+
+#define J784S4_SERDES4_LANE2_EDP_LANE2		0x0
+#define J784S4_SERDES4_LANE2_QSGMII_LANE7	0x1
+#define J784S4_SERDES4_LANE2_IP3_UNUSED		0x2
+#define J784S4_SERDES4_LANE2_IP4_UNUSED		0x3
+
+#define J784S4_SERDES4_LANE3_EDP_LANE3		0x0
+#define J784S4_SERDES4_LANE3_QSGMII_LANE8	0x1
+#define J784S4_SERDES4_LANE3_USB		0x2
+#define J784S4_SERDES4_LANE3_IP4_UNUSED		0x3
+
 #endif /* _DT_BINDINGS_MUX_TI_SERDES */