RE: [PATCH v2 4/8] dt-bindings: net: renesas: Document Renesas Ethernet Switch
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Date: 2022-09-26 09:15:08
Also in:
linux-devicetree, linux-phy, linux-renesas-soc
From: Krzysztof Kozlowski, Sent: Monday, September 26, 2022 3:50 PM On 26/09/2022 08:10, Yoshihiro Shimoda wrote:quoted
I'll add a blank line here.quoted
quoted
+ '#size-cells': + const: 0 + + additionalProperties: falseDon't put it between properties. For nested object usually this is before properties:I'll drop it.Don't drop, but instead put it before "properties" for this nested object.
Oh, I got it. Thanks!
I'll put this before "properties:" like below:
-----
ethernet-ports:
type: object
additionalProperties: false
properties:
'#address-cells':
description: Port number of ETHA (TSNA).
const: 1
'#size-cells':
const: 0
-----
Best regards,
Yoshihiro Shimoda
quoted
quoted
quoted
+ + patternProperties: + "^port@[0-9a-f]+$": + type: object +Skip blank line.I got it.quoted
quoted
+ $ref: "/schemas/net/ethernet-controller.yaml#"No need for quotes.I'll drop the quotes.quoted
quoted
+ unevaluatedProperties: false + + properties: + reg: + description: + Port number of ETHA (TSNA). + + phy-handle: + description: + Phandle of an Ethernet PHY.Why do you need to mention this property? Isn't it coming from ethernet-controller.yaml?Indeed. I'll drop the description.quoted
quoted
+ + phy-mode: + description: + This specifies the interface used by the Ethernet PHY. + enum: + - mii + - sgmii + - usxgmii + + phys: + maxItems: 1 + description: + Phandle of an Ethernet SERDES.This is getting confusing. You have now: - phy-handle - phy - phy-device - phys in one schema... although lan966x serdes seems to do the same. :/Yes... I found the following documents have "phy" and "phy-handle" by using git grep -l -w "phys" `git grep -l phy-handle Documentation/devicetree/bindings/`: Documentation/devicetree/bindings/net/cdns,macb.yaml Documentation/devicetree/bindings/net/cpsw.txt Documentation/devicetree/bindings/net/microchip,lan966x-switch.yaml Documentation/devicetree/bindings/net/microchip,sparx5-switch.yaml Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml Documentation/devicetree/bindings/phy/phy-bindings.txt And I'm interesting that the phy-bindings.txt said the following: ----- phys : the phandle for the PHY device (used by the PHY subsystem; not to be confused with the Ethernet specific 'phy' and 'phy-handle' properties, see Documentation/devicetree/bindings/net/ethernet.txt for these) -----Indeed, seems ok.quoted
Best regards, Krzysztof