[PATCH v4 2/9] dt-bindings: net: starfive,jh7110-dwmac: Add JH7100 SoC compatible

Cristian Ciocaltea cristian.ciocaltea at collabora.com
Tue Dec 19 04:49:08 PST 2023


On 12/19/23 09:27, Krzysztof Kozlowski wrote:
> On 18/12/2023 22:44, Cristian Ciocaltea wrote:
>> The Synopsys DesignWare MAC found on StarFive JH7100 SoC is mostly
>> similar to the newer JH7110, but it requires only two interrupts and a
>> single reset line, which is 'ahb' instead of the commonly used
>> 'stmmaceth'.
>>
> 
>>    reg:
>> @@ -145,9 +146,13 @@ properties:
>>  
>>    reset-names:
>>      minItems: 1
>> -    items:
>> -      - const: stmmaceth
>> -      - const: ahb
>> +    maxItems: 2
> 
> min and maxItems should not be needed here.

Indeed, I will drop them.

>> +    oneOf:
>> +      - items:
>> +          - enum: [stmmaceth, ahb]
>> +      - items:
>> +          - const: stmmaceth
>> +          - const: ahb
>>  
>>    power-domains:
>>      maxItems: 1
>> diff --git a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
>> index d90cb82c1424..f5f0bff5be0f 100644
>> --- a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
>> +++ b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
>> @@ -16,16 +16,20 @@ select:
>>      compatible:
>>        contains:
>>          enum:
>> +          - starfive,jh7100-dwmac
>>            - starfive,jh7110-dwmac
>>    required:
>>      - compatible
>>  
>>  properties:
>>    compatible:
>> -    items:
>> -      - enum:
>> -          - starfive,jh7110-dwmac
>> -      - const: snps,dwmac-5.20
>> +    oneOf:
>> +      - items:
>> +          - const: starfive,jh7100-dwmac
>> +          - const: snps,dwmac
>> +      - items:
>> +          - const: starfive,jh7110-dwmac
>> +          - const: snps,dwmac-5.20
>>  
>>    reg:
>>      maxItems: 1
>> @@ -46,23 +50,6 @@ properties:
>>        - const: tx
>>        - const: gtx
>>  
>> -  interrupts:
>> -    minItems: 3
>> -    maxItems: 3
>> -
>> -  interrupt-names:
>> -    minItems: 3
>> -    maxItems: 3
>> -
>> -  resets:
>> -    minItems: 2
>> -    maxItems: 2
> 
> What is the point of your previous patch if you immediately remove it?
> It is a no-op. Just mention in this commit msg, that both resets and
> reset-names are coming from snps,dwmac so they can be removed from
> top-level entirely.

This has been discussed during v2 review [1], where I also provided the
rational behind not updating reset-names. So the code was not deleted,
but moved under an if clause.

Thanks for reviewing,
Cristian

[1]: https://lore.kernel.org/lkml/f4d0b216-5bdc-4559-aabb-8af638d33721@collabora.com/



More information about the linux-riscv mailing list