netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Rob Herring <robh@kernel.org>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>,
	devicetree@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>,
	netdev@vger.kernel.org, Marcin Wojtas <mw@semihalf.com>,
	Russell King <linux@armlinux.org.uk>,
	Taras Chornyi <tchornyi@marvell.com>,
	linux-kernel@vger.kernel.org,
	Robert Marko <robert.marko@sartura.hr>,
	Luka Perkov <luka.perkov@sartura.hr>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Michael Walle <michael@walle.cc>
Subject: Re: [PATCH 2/6] dt-bindings: net: marvell,dfx-server: Convert to yaml
Date: Thu, 24 Nov 2022 00:34:13 +0100	[thread overview]
Message-ID: <20221124003413.6a2c4518@xps-13> (raw)
In-Reply-To: <20221123221023.GA2582938-robh@kernel.org>

Hi Rob,

robh@kernel.org wrote on Wed, 23 Nov 2022 16:10:23 -0600:

> On Thu, Nov 17, 2022 at 10:55:53PM +0100, Miquel Raynal wrote:
> > Even though this description is not used anywhere upstream (no matching
> > driver), while on this file I decided I would try a conversion to yaml
> > in order to clarify the prestera family description.
> > 
> > I cannot keep the nodename dfx-server@xxxx so I switched to dfx-bus@xxxx
> > which matches simple-bus.yaml. Otherwise I took the example context from
> > the only user of this compatible: armada-xp-98dx3236.dtsi, which is a
> > rather old and not perfect DT.
> > 
> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > ---
> > I am fine dropping this file entirely as well, if judged useless.
> > ---
> >  .../bindings/net/marvell,dfx-server.yaml      | 60 +++++++++++++++++++
> >  .../bindings/net/marvell,prestera.txt         | 18 ------
> >  2 files changed, 60 insertions(+), 18 deletions(-)
> >  create mode 100644 Documentation/devicetree/bindings/net/marvell,dfx-server.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/net/marvell,dfx-server.yaml b/Documentation/devicetree/bindings/net/marvell,dfx-server.yaml
> > new file mode 100644
> > index 000000000000..72151a78396f
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/net/marvell,dfx-server.yaml
> > @@ -0,0 +1,60 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/net/marvell,dfx-server.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Marvell Prestera DFX server
> > +
> > +maintainers:
> > +  - Miquel Raynal <miquel.raynal@bootlin.com>
> > +
> > +select:
> > +  properties:
> > +    compatible:
> > +      contains:
> > +        const: marvell,dfx-server
> > +  required:
> > +    - compatible
> > +
> > +properties:
> > +  compatible:
> > +    items:
> > +      - const: marvell,dfx-server
> > +      - const: simple-bus
> > +
> > +  reg: true  
> 
> How many entries?

Right, there is a single one, I'll constrain reg properly in v2.

> > +
> > +  ranges: true
> > +
> > +  '#address-cells':
> > +    const: 1
> > +
> > +  '#size-cells':
> > +    const: 1
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - ranges
> > +
> > +# The DFX server may expose clocks described as subnodes
> > +additionalProperties: true  
> 
> addtionalProperties:
>   type: object
> 
> So that only nodes can be added.

Excellent, I never thought about this possibility, but of course that
works. Thanks a lot!

> 
> > +
> > +examples:
> > +  - |
> > +
> > +    #define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))
> > +    bus@0 {
> > +        reg = <0 0>;
> > +        #address-cells = <2>;
> > +        #size-cells = <1>;
> > +
> > +        dfx-bus@ac000000 {
> > +            compatible = "marvell,dfx-server", "simple-bus";
> > +            #address-cells = <1>;
> > +            #size-cells = <1>;
> > +            ranges = <0 MBUS_ID(0x08, 0x00) 0 0x100000>;
> > +            reg = <MBUS_ID(0x08, 0x00) 0 0x100000>;
> > +        };
> > +    };  


Thanks,
Miquèl

  reply	other threads:[~2022-11-23 23:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17 21:55 [PATCH 0/6] Marvell nvmem mac addresses support Miquel Raynal
2022-11-17 21:55 ` [PATCH 1/6] Revert "dt-bindings: marvell,prestera: Add description for device-tree bindings" Miquel Raynal
2022-11-23 22:02   ` Rob Herring
2022-11-17 21:55 ` [PATCH 2/6] dt-bindings: net: marvell,dfx-server: Convert to yaml Miquel Raynal
2022-11-23 22:10   ` Rob Herring
2022-11-23 23:34     ` Miquel Raynal [this message]
2022-11-17 21:55 ` [PATCH 3/6] dt-bindings: net: marvell,prestera: " Miquel Raynal
2022-11-23 22:11   ` Rob Herring
2022-11-17 21:55 ` [PATCH 4/6] dt-bindings: net: marvell,prestera: Describe PCI devices of the prestera family Miquel Raynal
2022-11-23 22:13   ` Rob Herring
2022-11-17 21:55 ` [PATCH net-next 5/6] net: marvell: prestera: Avoid unnecessary DT lookups Miquel Raynal
2022-11-17 21:55 ` [PATCH net-next 6/6] net: mvpp2: Consider NVMEM cells as possible MAC address source Miquel Raynal
2022-11-19  8:18   ` Marcin Wojtas
2022-11-21  9:29     ` Miquel Raynal
2022-11-21 14:46       ` Marcin Wojtas
2022-11-22 17:52         ` Miquel Raynal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221124003413.6a2c4518@xps-13 \
    --to=miquel.raynal@bootlin.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=luka.perkov@sartura.hr \
    --cc=michael@walle.cc \
    --cc=mw@semihalf.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robert.marko@sartura.hr \
    --cc=robh@kernel.org \
    --cc=tchornyi@marvell.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).