[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<SEZPR06MB695934A8E7DEAD4366433AA496542@SEZPR06MB6959.apcprd06.prod.outlook.com>
Date: Sat, 24 Feb 2024 19:33:53 +0800
From: Yang Xiwen <forbidden405@...look.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>, Yang Xiwen <forbidden405@...mail.com>
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org
Subject: Re: [PATCH v2 1/2] dt-bindings: usb: add hisilicon,hi3798mv200-dwc3
On 2/24/2024 6:28 PM, Krzysztof Kozlowski wrote:
> On 23/02/2024 22:43, Yang Xiwen via B4 Relay wrote:
>> From: Yang Xiwen <forbidden405@...look.com>
>>
>> Document the DWC3 controller used by Hi3798MV200.
>>
>> Signed-off-by: Yang Xiwen <forbidden405@...look.com>
>
>> +
>> +properties:
>> + compatible:
>> + const: hisilicon,hi3798mv200-dwc3
>> +
>> + '#address-cells':
>> + const: 1
>> +
>> + '#size-cells':
>> + const: 1
>> +
>> + reg: true
> Constraints. maxItems: X
Is it mandatory to have this property if this node is going to be under
a "simple-bus"? I'm taking rk3399-dwc3.yaml as reference. In fact, dwc3
wrapper on mv200 does not have an extra register space. The wrapper only
needs to turn on the clocks and deassert the resets. It does not
need/have a register space.
I don't think it makes sense duplicating the same address twice.
But reg property is required by "simple-bus" so i don't know why there
is no warning for rk3399-dwc3.
>
>> +
>> + ranges: true
>> +
>> + clocks:
>> + items:
>> + - description: Controller bus clock
>> + - description: Controller suspend clock
>> + - description: Controller reference clock
>> + - description: Controller gm clock
>> + - description: Controller gs clock
>> + - description: Controller utmi clock
>> + - description: Controller pipe clock
>> +
>> + clock-names:
>> + items:
>> + - const: bus
>> + - const: suspend
>> + - const: ref
>> + - const: gm
>> + - const: gs
>> + - const: utmi
>> + - const: pipe
>> +
>> + resets:
>> + maxItems: 1
>> +
>> + reset-names:
>> + const: soft
>> +
>> +patternProperties:
>> + '^usb@[0-9a-z]+$':
> unit addresses are in hex, so a-f
>
> Open existing bindings and look how it is done there. There are no
> bindings for DWC3 glue/wrapper device having a-z.
>
>
>> + $ref: snps,dwc3.yaml#
>> +
>> +additionalProperties: false
> Same comments: open existing bindings and take a look how it is there.
> This goes after 'required:' block.
>
>> +
>> +required:
>> + - compatible
>> + - '#address-cells'
>> + - '#size-cells'
>> + - ranges
>> + - reg
>> + - clocks
>> + - clock-names
>> + - resets
>> + - reset-names
>> +
>> +examples:
>> + - |
>> + #include <dt-bindings/interrupt-controller/arm-gic.h>
>> +
>> + usb@...0000 {
>> + compatible = "hisilicon,hi3798mv200-dwc3";
> reg is always the second property. ranges is third.
>
>
>> + #address-cells = <1>;
>> + #size-cells = <1>;
> Use 4 spaces for example indentation.
>
>
>
> Best regards,
> Krzysztof
>
--
Regards,
Yang Xiwen
Powered by blists - more mailing lists