diff mbox series

[v2,3/8] dt-bindings: mips: realtek: Add rtl930x-soc compatible

Message ID 20240624012300.1713290-4-chris.packham@alliedtelesis.co.nz (mailing list archive)
State Superseded
Headers show
Series mips: Support for RTL9302C | expand

Commit Message

Chris Packham June 24, 2024, 1:22 a.m. UTC
Add the rtl930x-soc and RTL9302C board to the list of Realtek compatible
strings.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---

Notes:
    Changes in v2:
    - Use specific compatible for rtl9302-soc
    - Fix to allow correct board, soc compatible

 Documentation/devicetree/bindings/mips/realtek-rtl.yaml | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Krzysztof Kozlowski June 24, 2024, 4:48 a.m. UTC | #1
On 24/06/2024 03:22, Chris Packham wrote:
> Add the rtl930x-soc and RTL9302C board to the list of Realtek compatible

930x or 9302?

> strings.
> 
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> ---
> 
> Notes:
>     Changes in v2:
>     - Use specific compatible for rtl9302-soc
>     - Fix to allow correct board, soc compatible
> 
>  Documentation/devicetree/bindings/mips/realtek-rtl.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mips/realtek-rtl.yaml b/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
> index f8ac309d2994..05daa53417e5 100644
> --- a/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
> +++ b/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
> @@ -20,5 +20,9 @@ properties:
>            - enum:
>                - cisco,sg220-26
>            - const: realtek,rtl8382-soc
> +      - items:
> +          - enum:
> +              - realtek,rtl9302c

Why board has the name of SoC?

> +          - const: realtek,rtl9302-soc

Drop the -soc suffix. The rtl9302 is the soc.

>  
>  additionalProperties: true

Best regards,
Krzysztof
Chris Packham June 24, 2024, 5 a.m. UTC | #2
Hi Krzysztof,

On 24/06/24 16:48, Krzysztof Kozlowski wrote:
> On 24/06/2024 03:22, Chris Packham wrote:
>> Add the rtl930x-soc and RTL9302C board to the list of Realtek compatible
> 930x or 9302?

Oops. Will fix.

>> strings.
>>
>> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
>> ---
>>
>> Notes:
>>      Changes in v2:
>>      - Use specific compatible for rtl9302-soc
>>      - Fix to allow correct board, soc compatible
>>
>>   Documentation/devicetree/bindings/mips/realtek-rtl.yaml | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/mips/realtek-rtl.yaml b/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
>> index f8ac309d2994..05daa53417e5 100644
>> --- a/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
>> +++ b/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
>> @@ -20,5 +20,9 @@ properties:
>>             - enum:
>>                 - cisco,sg220-26
>>             - const: realtek,rtl8382-soc
>> +      - items:
>> +          - enum:
>> +              - realtek,rtl9302c
> Why board has the name of SoC?

What I have is actually a reference board with the name 
RTL9302C_2xRTL8224_2XGE. If found that a bit incomprehensible so I 
(over) shortened it. Technically it would be something like 
cameo,rtl9302c-2x-rtl8224-2xge which I can include in the next round.

>> +          - const: realtek,rtl9302-soc
> Drop the -soc suffix. The rtl9302 is the soc.

On that. I hope to eventually add "realtek,rtl9302-switch" for the DSA 
switch block in the same chip. So keeping the -soc suffix was 
intentional to try to disambiguate things. I can drop the -soc if the 
consensus is that there is no need to disambiguate the two.

>>   
>>   additionalProperties: true
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski June 26, 2024, 7:12 a.m. UTC | #3
On 24/06/2024 07:00, Chris Packham wrote:
> Hi Krzysztof,
> 
> On 24/06/24 16:48, Krzysztof Kozlowski wrote:
>> On 24/06/2024 03:22, Chris Packham wrote:
>>> Add the rtl930x-soc and RTL9302C board to the list of Realtek compatible
>> 930x or 9302?
> 
> Oops. Will fix.
> 
>>> strings.
>>>
>>> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
>>> ---
>>>
>>> Notes:
>>>      Changes in v2:
>>>      - Use specific compatible for rtl9302-soc
>>>      - Fix to allow correct board, soc compatible
>>>
>>>   Documentation/devicetree/bindings/mips/realtek-rtl.yaml | 4 ++++
>>>   1 file changed, 4 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/mips/realtek-rtl.yaml b/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
>>> index f8ac309d2994..05daa53417e5 100644
>>> --- a/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
>>> +++ b/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
>>> @@ -20,5 +20,9 @@ properties:
>>>             - enum:
>>>                 - cisco,sg220-26
>>>             - const: realtek,rtl8382-soc
>>> +      - items:
>>> +          - enum:
>>> +              - realtek,rtl9302c
>> Why board has the name of SoC?
> 
> What I have is actually a reference board with the name 
> RTL9302C_2xRTL8224_2XGE. If found that a bit incomprehensible so I 
> (over) shortened it. Technically it would be something like 
> cameo,rtl9302c-2x-rtl8224-2xge which I can include in the next round.

Looks fine to me.

> 
>>> +          - const: realtek,rtl9302-soc
>> Drop the -soc suffix. The rtl9302 is the soc.
> 
> On that. I hope to eventually add "realtek,rtl9302-switch" for the DSA 
> switch block in the same chip. So keeping the -soc suffix was 
> intentional to try to disambiguate things. I can drop the -soc if the 
> consensus is that there is no need to disambiguate the two.

Thanks for explanation, kind of depends on what exactly is this. Most of
SoCs comprise of several items. The entire chip is the soc, e.g.
"qcom,foo1234". It might have MAC/Ethernet/whatever inside, controllable
by the SoC (Linux, bootloader, TF, hypervisor, other VM guest) and that
part is "qcom,foo1234-ethernet". Regardless whether Linux OS actually
controls it or not.

The question is whether DSA switch is part of the SoC or not.

Best regards,
Krzysztof
Chris Packham June 26, 2024, 9:01 p.m. UTC | #4
On 26/06/24 19:12, Krzysztof Kozlowski wrote:
> On 24/06/2024 07:00, Chris Packham wrote:
>> Hi Krzysztof,
>>
>> On 24/06/24 16:48, Krzysztof Kozlowski wrote:
>>> On 24/06/2024 03:22, Chris Packham wrote:
>>>> Add the rtl930x-soc and RTL9302C board to the list of Realtek compatible
>>> 930x or 9302?
>> Oops. Will fix.
>>
>>>> strings.
>>>>
>>>> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
>>>> ---
>>>>
>>>> Notes:
>>>>       Changes in v2:
>>>>       - Use specific compatible for rtl9302-soc
>>>>       - Fix to allow correct board, soc compatible
>>>>
>>>>    Documentation/devicetree/bindings/mips/realtek-rtl.yaml | 4 ++++
>>>>    1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/mips/realtek-rtl.yaml b/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
>>>> index f8ac309d2994..05daa53417e5 100644
>>>> --- a/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
>>>> +++ b/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
>>>> @@ -20,5 +20,9 @@ properties:
>>>>              - enum:
>>>>                  - cisco,sg220-26
>>>>              - const: realtek,rtl8382-soc
>>>> +      - items:
>>>> +          - enum:
>>>> +              - realtek,rtl9302c
>>> Why board has the name of SoC?
>> What I have is actually a reference board with the name
>> RTL9302C_2xRTL8224_2XGE. If found that a bit incomprehensible so I
>> (over) shortened it. Technically it would be something like
>> cameo,rtl9302c-2x-rtl8224-2xge which I can include in the next round.
> Looks fine to me.
>
>>>> +          - const: realtek,rtl9302-soc
>>> Drop the -soc suffix. The rtl9302 is the soc.
>> On that. I hope to eventually add "realtek,rtl9302-switch" for the DSA
>> switch block in the same chip. So keeping the -soc suffix was
>> intentional to try to disambiguate things. I can drop the -soc if the
>> consensus is that there is no need to disambiguate the two.
> Thanks for explanation, kind of depends on what exactly is this. Most of
> SoCs comprise of several items. The entire chip is the soc, e.g.
> "qcom,foo1234". It might have MAC/Ethernet/whatever inside, controllable
> by the SoC (Linux, bootloader, TF, hypervisor, other VM guest) and that
> part is "qcom,foo1234-ethernet". Regardless whether Linux OS actually
> controls it or not.
>
> The question is whether DSA switch is part of the SoC or not.

The RTL9302C is a single package but I'd assume internally it has 
multiple dies.

 From the block diagram in the datasheet they do have a portion they 
call the "SoC" which has the CPU and peripherals like UARTs, GPIOs, SPI 
etc. That is separate from the switch block which has a bunch of MACs, 
SERDES and various network switch tables. So based on that 
"realtek,rtl9302-soc" and "realtek,rtl9302-switch" as two separate 
things make sense to me.

I'm still trying to figure out a bit more of the details. The block 
diagram looks a lot like you'd expect to see with a traditional DSA 
switch where you have a SoC Ethernet NIC/MAC connected to one port of a 
switch. But getting into the datasheet it looks like what they call the 
NIC is actually just the DMA portion of the switch as the registers are 
all in that second block. As is the MDIO interface. I'm considering that 
maybe the DSA model isn't right for this and I should be looking at 
switchdev instead.

>
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski June 27, 2024, 6:59 a.m. UTC | #5
On 26/06/2024 23:01, Chris Packham wrote:
>>>>> +              - realtek,rtl9302c
>>>> Why board has the name of SoC?
>>> What I have is actually a reference board with the name
>>> RTL9302C_2xRTL8224_2XGE. If found that a bit incomprehensible so I
>>> (over) shortened it. Technically it would be something like
>>> cameo,rtl9302c-2x-rtl8224-2xge which I can include in the next round.
>> Looks fine to me.
>>
>>>>> +          - const: realtek,rtl9302-soc
>>>> Drop the -soc suffix. The rtl9302 is the soc.
>>> On that. I hope to eventually add "realtek,rtl9302-switch" for the DSA
>>> switch block in the same chip. So keeping the -soc suffix was
>>> intentional to try to disambiguate things. I can drop the -soc if the
>>> consensus is that there is no need to disambiguate the two.
>> Thanks for explanation, kind of depends on what exactly is this. Most of
>> SoCs comprise of several items. The entire chip is the soc, e.g.
>> "qcom,foo1234". It might have MAC/Ethernet/whatever inside, controllable
>> by the SoC (Linux, bootloader, TF, hypervisor, other VM guest) and that
>> part is "qcom,foo1234-ethernet". Regardless whether Linux OS actually
>> controls it or not.
>>
>> The question is whether DSA switch is part of the SoC or not.
> 
> The RTL9302C is a single package but I'd assume internally it has 
> multiple dies.
> 
>  From the block diagram in the datasheet they do have a portion they 
> call the "SoC" which has the CPU and peripherals like UARTs, GPIOs, SPI 
> etc. That is separate from the switch block which has a bunch of MACs, 
> SERDES and various network switch tables. So based on that 
> "realtek,rtl9302-soc" and "realtek,rtl9302-switch" as two separate 
> things make sense to me.
> 

OK, -soc and -switch are fine with me.

> I'm still trying to figure out a bit more of the details. The block 
> diagram looks a lot like you'd expect to see with a traditional DSA 
> switch where you have a SoC Ethernet NIC/MAC connected to one port of a 
> switch. But getting into the datasheet it looks like what they call the 
> NIC is actually just the DMA portion of the switch as the registers are 
> all in that second block. As is the MDIO interface. I'm considering that 
> maybe the DSA model isn't right for this and I should be looking at 
> switchdev instead.



Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mips/realtek-rtl.yaml b/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
index f8ac309d2994..05daa53417e5 100644
--- a/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
+++ b/Documentation/devicetree/bindings/mips/realtek-rtl.yaml
@@ -20,5 +20,9 @@  properties:
           - enum:
               - cisco,sg220-26
           - const: realtek,rtl8382-soc
+      - items:
+          - enum:
+              - realtek,rtl9302c
+          - const: realtek,rtl9302-soc
 
 additionalProperties: true