Re: [PATCH v2 1/2] dt-bindings: usb: add hisilicon,hi3798mv200-dwc3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>

Document the DWC3 controller used by Hi3798MV200.

Signed-off-by: Yang Xiwen <forbidden405@xxxxxxxxxxx>

+
+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@98a0000 {
+            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





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux