2023-07-10 10:42:01

by Jayesh Choudhary

[permalink] [raw]
Subject: [PATCH] dt-bindings: ti-serdes-mux: Add defines for SERDES4 in J784S4 SoC

SERDES4 has 4 lanes. Add lane definitions for it.

Signed-off-by: Jayesh Choudhary <[email protected]>
---
include/dt-bindings/mux/ti-serdes.h | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

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 */
--
2.25.1



2023-07-10 12:02:07

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: ti-serdes-mux: Add defines for SERDES4 in J784S4 SoC

On 10/07/2023 12:27, Jayesh Choudhary wrote:
> SERDES4 has 4 lanes. Add lane definitions for it.
>
> Signed-off-by: Jayesh Choudhary <[email protected]>
> ---
> 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


2023-07-11 06:24:58

by Jayesh Choudhary

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: ti-serdes-mux: Add defines for SERDES4 in J784S4 SoC

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 <[email protected]>
>> ---
>> 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

2023-07-11 06:26:47

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: ti-serdes-mux: Add defines for SERDES4 in J784S4 SoC

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 <[email protected]>
>>> ---
>>> 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


2023-07-11 07:36:50

by Jayesh Choudhary

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: ti-serdes-mux: Add defines for SERDES4 in J784S4 SoC



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 <[email protected]>
>>>> ---
>>>> 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
>

2023-07-11 08:03:35

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: ti-serdes-mux: Add defines for SERDES4 in J784S4 SoC

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 <[email protected]>
>>>>> ---
>>>>> 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


2023-07-11 08:16:52

by Jayesh Choudhary

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: ti-serdes-mux: Add defines for SERDES4 in J784S4 SoC



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 <[email protected]>
>>>>>> ---
>>>>>> 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/[email protected]/

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