[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <xx4l4bs4iqmtgafs63ly2labvqzul2a7wkpyvxkbde257hfgs2@xgfs57rcdsk6>
Date: Wed, 23 Oct 2024 08:56:24 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Wei Fang <wei.fang@....com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
vladimir.oltean@....com, claudiu.manoil@....com, xiaoning.wang@....com, Frank.Li@....com,
christophe.leroy@...roup.eu, linux@...linux.org.uk, bhelgaas@...gle.com, horms@...nel.org,
imx@...ts.linux.dev, netdev@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org, alexander.stein@...tq-group.com
Subject: Re: [PATCH v4 net-next 03/13] dt-bindings: net: add bindings for
NETC blocks control
On Tue, Oct 22, 2024 at 01:52:13PM +0800, Wei Fang wrote:
> Add bindings for NXP NETC blocks control. Usually, NETC has 2 blocks of
> 64KB registers, integrated endpoint register block (IERB) and privileged
> register block (PRB). IERB is used for pre-boot initialization for all
> NETC devices, such as ENETC, Timer, EMDIO and so on. And PRB controls
> global reset and global error handling for NETC. Moreover, for the i.MX
> platform, there is also a NETCMIX block for link configuration, such as
> MII protocol, PCS protocol, etc.
>
> Signed-off-by: Wei Fang <wei.fang@....com>
> ---
> v2 changes:
> 1. Rephrase the commit message.
> 2. Change unevaluatedProperties to additionalProperties.
> 3. Remove the useless lables from examples.
> v3 changes:
> 1. Remove the items from clocks and clock-names, add maxItems to clocks
> and rename the clock.
> v4 changes:
> 1. Reorder the required properties.
> 2. Add assigned-clocks, assigned-clock-parents and assigned-clock-rates.
> ---
> .../bindings/net/nxp,netc-blk-ctrl.yaml | 111 ++++++++++++++++++
> 1 file changed, 111 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/nxp,netc-blk-ctrl.yaml
>
> diff --git a/Documentation/devicetree/bindings/net/nxp,netc-blk-ctrl.yaml b/Documentation/devicetree/bindings/net/nxp,netc-blk-ctrl.yaml
> new file mode 100644
> index 000000000000..0b7fd2c5e0d8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/nxp,netc-blk-ctrl.yaml
> @@ -0,0 +1,111 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/nxp,netc-blk-ctrl.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NETC Blocks Control
> +
> +description:
> + Usually, NETC has 2 blocks of 64KB registers, integrated endpoint register
> + block (IERB) and privileged register block (PRB). IERB is used for pre-boot
> + initialization for all NETC devices, such as ENETC, Timer, EMIDO and so on.
> + And PRB controls global reset and global error handling for NETC. Moreover,
> + for the i.MX platform, there is also a NETCMIX block for link configuration,
> + such as MII protocol, PCS protocol, etc.
> +
> +maintainers:
> + - Wei Fang <wei.fang@....com>
> + - Clark Wang <xiaoning.wang@....com>
> +
> +properties:
> + compatible:
> + enum:
> + - nxp,imx95-netc-blk-ctrl
> +
> + reg:
> + minItems: 2
> + maxItems: 3
You have one device, why this is flexible? Device either has exactly 2
or exactly 3 IO spaces, not both depending on the context.
> +
> + reg-names:
> + minItems: 2
> + items:
> + - const: ierb
> + - const: prb
> + - const: netcmix
> +
> + "#address-cells":
> + const: 2
> +
> + "#size-cells":
> + const: 2
> +
> + ranges: true
> + assigned-clocks: true
> + assigned-clock-parents: true
> + assigned-clock-rates: true
Drop these three.
> +
> + clocks:
> + maxItems: 1
> +
> + clock-names:
> + const: ipg
> +
> + power-domains:
> + maxItems: 1
> +
> +patternProperties:
> + "^pcie@[0-9a-f]+$":
> + $ref: /schemas/pci/host-generic-pci.yaml#
> +
> +required:
> + - compatible
> + - reg
> + - reg-names
> + - "#address-cells"
> + - "#size-cells"
> + - ranges
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + bus {
> + #address-cells = <2>;
> + #size-cells = <2>;
> +
> + netc-blk-ctrl@...e0000 {
system-controller? Don't use compatible as node name.
Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
Best regards,
Krzysztof
Powered by blists - more mailing lists