Message ID | 20230802201824.3683-4-nick.hawkins@hpe.com |
---|---|
State | Changes Requested, archived |
Headers | show |
Series | ARM: Add GXP UMAC Support | expand |
Context | Check | Description |
---|---|---|
robh/checkpatch | success | |
robh/patch-applied | success | |
robh/dtbs-check | warning | build log |
robh/dt-meta-schema | success |
> + mdio: > + $ref: mdio.yaml# > + unevaluatedProperties: false Why do you have these properties? The MDIO bus masters are devices of there own, with their own binding. They cannot be part of the Ethernet device as well. Andrew
On Wed, Aug 02, 2023 at 03:18:22PM -0500, nick.hawkins@hpe.com wrote: > From: Nick Hawkins <nick.hawkins@hpe.com> > > Provide access to the register regions and interrupt for Universal > MAC(UMAC). The driver under the hpe,gxp-umac binding will provide an > interface for sending and receiving networking data from both of the > UMACs on the system. > > Signed-off-by: Nick Hawkins <nick.hawkins@hpe.com> > > --- > > v2: > *Move mac-addresses into ports > *Remove | where not needed > --- > .../devicetree/bindings/net/hpe,gxp-umac.yaml | 112 ++++++++++++++++++ > 1 file changed, 112 insertions(+) > create mode 100644 Documentation/devicetree/bindings/net/hpe,gxp-umac.yaml > > diff --git a/Documentation/devicetree/bindings/net/hpe,gxp-umac.yaml b/Documentation/devicetree/bindings/net/hpe,gxp-umac.yaml > new file mode 100644 > index 000000000000..ff1a3a201dcf > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/hpe,gxp-umac.yaml > @@ -0,0 +1,112 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/hpe,gxp-umac.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: HPE GXP Unified MAC Controller > + > +maintainers: > + - Nick Hawkins <nick.hawkins@hpe.com> > + > +description: > + HPE GXP 802.3 10/100/1000T Ethernet Unifed MAC controller. > + Device node of the controller has following properties. > + > +properties: > + compatible: > + const: hpe,gxp-umac > + > + use-ncsi: > + type: boolean > + description: > + Indicates if the device should use NCSI (Network Controlled > + Sideband Interface). How is one supposed to know if the device should use NCSI? If the property is present does that mean that the mac hardware supports it? Or is it determined by what board this mac is on? Or is this software configuration? Thanks, Conor.
Hi Conor, Thanks for your feedback. I will provide an explanation below. > > +description: > > + HPE GXP 802.3 10/100/1000T Ethernet Unifed MAC controller. > > + Device node of the controller has following properties. > > + > > +properties: > > + compatible: > > + const: hpe,gxp-umac > > + > > + use-ncsi: > > + type: boolean > > + description: > > + Indicates if the device should use NCSI (Network Controlled > > + Sideband Interface). > How is one supposed to know if the device should use NCSI? If the > property is present does that mean that the mac hardware supports > it? Or is it determined by what board this mac is on? > Or is this software configuration? Hi Conor, There are two MAC's available in the ASIC but only one can support NCSI. Even though it supports NCSI does not mean the board has been physically wired to support it. In terms of the device tree I would expect the "use-ncsi" to be present in the dts board specific file. There will be hardware configurations where both MAC0 and MAC1 will be using the SERDES connections. In that case there will be no NCSI available. Is a better description needed here to explain this? Thanks, -Nick Hawkins
On Wed, Aug 16, 2023 at 04:26:09PM +0000, Hawkins, Nick wrote: > Hi Conor, > > Thanks for your feedback. I will provide an explanation below. > > > > +description: > > > + HPE GXP 802.3 10/100/1000T Ethernet Unifed MAC controller. > > > + Device node of the controller has following properties. > > > + > > > +properties: > > > + compatible: > > > + const: hpe,gxp-umac > > > + > > > > > + use-ncsi: > > > + type: boolean > > > + description: > > > + Indicates if the device should use NCSI (Network Controlled > > > + Sideband Interface). > > > > How is one supposed to know if the device should use NCSI? If the > > property is present does that mean that the mac hardware supports > > it? Or is it determined by what board this mac is on? > > Or is this software configuration? > > Hi Conor, > > There are two MAC's available in the ASIC but only one can support > NCSI. Even though it supports NCSI does not mean the board has > been physically wired to support it. In terms of the device tree I would > expect the "use-ncsi" to be present in the dts board specific file. > > There will be hardware configurations where both MAC0 and MAC1 > will be using the SERDES connections. In that case there will be no > NCSI available. > > Is a better description needed here to explain this? Ah crap, I missed this yesterday - I think this came in as I was doing my queue sweep. The improved description seems good to me, thanks for adding to it.
diff --git a/Documentation/devicetree/bindings/net/hpe,gxp-umac.yaml b/Documentation/devicetree/bindings/net/hpe,gxp-umac.yaml new file mode 100644 index 000000000000..ff1a3a201dcf --- /dev/null +++ b/Documentation/devicetree/bindings/net/hpe,gxp-umac.yaml @@ -0,0 +1,112 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/hpe,gxp-umac.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: HPE GXP Unified MAC Controller + +maintainers: + - Nick Hawkins <nick.hawkins@hpe.com> + +description: + HPE GXP 802.3 10/100/1000T Ethernet Unifed MAC controller. + Device node of the controller has following properties. + +properties: + compatible: + const: hpe,gxp-umac + + use-ncsi: + type: boolean + description: + Indicates if the device should use NCSI (Network Controlled + Sideband Interface). + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + ethernet-ports: + type: object + additionalProperties: false + description: Ethernet ports to PHY + + properties: + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + patternProperties: + "^port@[0-1]$": + type: object + additionalProperties: false + description: Port to PHY + + properties: + reg: + minimum: 0 + maximum: 1 + + phy-handle: + maxItems: 1 + + mac-address: true + + required: + - reg + - phy-handle + + mdio: + $ref: mdio.yaml# + unevaluatedProperties: false + +additionalProperties: false + +required: + - compatible + - reg + - interrupts + - ethernet-ports + +examples: + - | + ethernet@4000 { + compatible = "hpe,gxp-umac"; + reg = <0x4000 0x80>; + interrupts = <22>; + ethernet-ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + phy-handle = <&int_phy0>; + mac-address = [00 00 00 00 00 00]; + }; + + port@1 { + reg = <1>; + phy-handle = <&ext_phy1>; + mac-address = [00 00 00 00 00 00]; + }; + }; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + eth_phy0: ethernet-phy@0 { + reg = <0>; + }; + + eth_phy1: ethernet-phy@1 { + reg = <1>; + }; + }; + }; +...