public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Wei Fang <wei.fang@nxp.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"robh@kernel.org" <robh@kernel.org>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	Clark Wang <xiaoning.wang@nxp.com>, Frank Li <frank.li@nxp.com>,
	"christophe.leroy@csgroup.eu" <christophe.leroy@csgroup.eu>,
	"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
	"bhelgaas@google.com" <bhelgaas@google.com>,
	"horms@kernel.org" <horms@kernel.org>,
	"imx@lists.linux.dev" <imx@lists.linux.dev>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"alexander.stein@ew.tq-group.com"
	<alexander.stein@ew.tq-group.com>
Subject: Re: [PATCH v4 net-next 03/13] dt-bindings: net: add bindings for NETC blocks control
Date: Thu, 24 Oct 2024 17:32:14 +0300	[thread overview]
Message-ID: <20241024143214.qhsxghepykrxbiyk@skbuf> (raw)
In-Reply-To: <PAXPR04MB851034FDAC4E63F1866356B4884D2@PAXPR04MB8510.eurprd04.prod.outlook.com>

On Wed, Oct 23, 2024 at 11:18:43AM +0300, Wei Fang wrote:
> > > +maintainers:
> > > +  - Wei Fang <wei.fang@nxp.com>
> > > +  - Clark Wang <xiaoning.wang@nxp.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.
> > 
> 
> There are three register blocks, IERB and PRB are inside NETC IP, but NETCMIX
> is outside NETC. There are dependencies between these three blocks, so it is
> better to configure them in one driver. But for other platforms like S32, it does
> not have NETCMIX, so NETCMIX is optional.

Looking at this patch (in v5), I was confused as to why you've made pcie@4cb00000
a child of system-controller@4cde0000, when there's no obvious parent/child
relationship between them (the ECAM node is not even within the same address
space as the "system-controller@4cde0000" address space, and it's not
even clear what the "system-controller@4cde0000" node _represents_:

examples:
  - |
    bus {
        #address-cells = <2>;
        #size-cells = <2>;

        system-controller@4cde0000 {
            compatible = "nxp,imx95-netc-blk-ctrl";
            reg = <0x0 0x4cde0000 0x0 0x10000>,
                  <0x0 0x4cdf0000 0x0 0x10000>,
                  <0x0 0x4c81000c 0x0 0x18>;
            reg-names = "ierb", "prb", "netcmix";
            #address-cells = <2>;
            #size-cells = <2>;
            ranges;
            clocks = <&scmi_clk 98>;
            clock-names = "ipg";
            power-domains = <&scmi_devpd 18>;

            pcie@4cb00000 {
                compatible = "pci-host-ecam-generic";
                reg = <0x0 0x4cb00000 0x0 0x100000>;
                #address-cells = <3>;
                #size-cells = <2>;
                device_type = "pci";
                bus-range = <0x1 0x1>;
                ranges = <0x82000000 0x0 0x4cce0000  0x0 0x4cce0000  0x0 0x20000
                          0xc2000000 0x0 0x4cd10000  0x0 0x4cd10000  0x0 0x10000>;

But then I saw your response, and I think your response answers my confusion.
The "system-controller@4cde0000" node doesn't represent anything in and
of itself, it is just a container to make the implementation easier.

The Linux driver treatment should not have a definitive say in the device tree bindings.
To solve the dependencies problem, you have options such as the component API at
your disposal to have a "component master" driver which waits until all its
components have probed.

But if the IERB, PRB and NETCMIX are separate register blocks, they should have
separate OF nodes under their respective buses, and the ECAM should be on the same
level. You should describe the hierarchy from the perspective of the SoC address
space, and not abuse the "ranges" property here.

  parent reply	other threads:[~2024-10-24 14:32 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22  5:52 [PATCH v4 net-next 00/13] add basic support for i.MX95 NETC Wei Fang
2024-10-22  5:52 ` [PATCH v4 net-next 01/13] dt-bindings: net: add compatible string for i.MX95 EMDIO Wei Fang
2024-10-24 14:06   ` Vladimir Oltean
2024-10-24 14:16     ` Vladimir Oltean
2024-10-22  5:52 ` [PATCH v4 net-next 02/13] dt-bindings: net: add i.MX95 ENETC support Wei Fang
2024-10-22 16:13   ` Frank Li
2024-10-23  1:40     ` Wei Fang
2024-10-22  5:52 ` [PATCH v4 net-next 03/13] dt-bindings: net: add bindings for NETC blocks control Wei Fang
2024-10-22 16:17   ` Frank Li
2024-10-23  1:46     ` Wei Fang
2024-10-23  6:56   ` Krzysztof Kozlowski
2024-10-23  8:18     ` Wei Fang
2024-10-23  8:55       ` Krzysztof Kozlowski
2024-10-23 10:03         ` Wei Fang
2024-10-24 13:27           ` Krzysztof Kozlowski
2024-10-25  7:15             ` Wei Fang
2024-10-24 14:32       ` Vladimir Oltean [this message]
2024-10-25  8:22         ` Wei Fang
2024-10-25  8:48           ` Wei Fang
2024-10-25 13:06             ` Vladimir Oltean
2024-10-26  3:01               ` Wei Fang
2024-10-31 12:45                 ` Vladimir Oltean
2024-11-01  2:18                   ` Wei Fang
2024-11-01 10:34                     ` Vladimir Oltean
2024-10-22  5:52 ` [PATCH v4 net-next 04/13] net: enetc: add initial netc-blk-ctrl driver support Wei Fang
2024-10-22  5:52 ` [PATCH v4 net-next 05/13] net: enetc: extract common ENETC PF parts for LS1028A and i.MX95 platforms Wei Fang
2024-10-23  6:38   ` Claudiu Manoil
2024-10-22  5:52 ` [PATCH v4 net-next 06/13] net: enetc: build enetc_pf_common.c as a separate module Wei Fang
2024-10-22 16:20   ` Frank Li
2024-10-23  6:38   ` Claudiu Manoil
2024-10-22  5:52 ` [PATCH v4 net-next 07/13] net: enetc: remove ERR050089 workaround for i.MX95 Wei Fang
2024-10-22  5:52 ` [PATCH v4 net-next 08/13] PCI: Add NXP NETC vendor ID and device IDs Wei Fang
2024-10-22  5:52 ` [PATCH v4 net-next 09/13] net: enetc: add i.MX95 EMDIO support Wei Fang
2024-10-22  5:52 ` [PATCH v4 net-next 10/13] net: enetc: extract enetc_int_vector_init/destroy() from enetc_alloc_msix() Wei Fang
2024-10-23  6:37   ` Claudiu Manoil
2024-10-22  5:52 ` [PATCH v4 net-next 11/13] net: enetc: optimize the allocation of tx_bdr Wei Fang
2024-10-22  5:52 ` [PATCH v4 net-next 12/13] net: enetc: add preliminary support for i.MX95 ENETC PF Wei Fang
2024-10-22 19:27   ` Frank Li
2024-10-23  1:57     ` Wei Fang
2024-10-23  2:16       ` Wei Fang
2024-10-23  6:15   ` Claudiu Manoil
2024-10-22  5:52 ` [PATCH v4 net-next 13/13] MAINTAINERS: update ENETC driver files and maintainers Wei Fang

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=20241024143214.qhsxghepykrxbiyk@skbuf \
    --to=vladimir.oltean@nxp.com \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=bhelgaas@google.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=claudiu.manoil@nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=frank.li@nxp.com \
    --cc=horms@kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    --cc=wei.fang@nxp.com \
    --cc=xiaoning.wang@nxp.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