All of lore.kernel.org
 help / color / mirror / Atom feed
From: Madalin-Cristian Bucur <madalin.bucur@nxp.com>
To: Shawn Guo <shawnguo@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	Roy Pledge <roy.pledge@nxp.com>,
	"will.deacon@arm.com" <will.deacon@arm.com>,
	"catalin.marinas@arm.com" <catalin.marinas@arm.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Russell King - ARM Linux" <linux@armlinux.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [PATCH v2 1/2] dts: arm64: add LS1043A DPAA support
Date: Mon, 27 Mar 2017 08:11:33 +0000	[thread overview]
Message-ID: <HE1PR04MB1129DA747FC5B7B977CADF43EC330@HE1PR04MB1129.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20170327075546.GR30608@dragon>

> -----Original Message-----
> From: Shawn Guo [mailto:shawnguo@kernel.org]
> Sent: Monday, March 27, 2017 10:56 AM
> Subject: Re: [PATCH v2 1/2] dts: arm64: add LS1043A DPAA support
> 
> On Mon, Mar 27, 2017 at 07:03:40AM +0000, Madalin-Cristian Bucur wrote:
> > > > > > +	fman@1a00000 {
> > > > > > +		enet0: ethernet@e0000 {
> > > > > > +		};
> > > > > > +
> > > > > > +		enet1: ethernet@e2000 {
> > > > > > +		};
> > > > > > +
> > > > > > +		enet2: ethernet@e4000 {
> > > > > > +		};
> > > > > > +
> > > > > > +		enet3: ethernet@e6000 {
> > > > > > +		};
> > > > > > +
> > > > > > +		enet4: ethernet@e8000 {
> > > > > > +		};
> > > > > > +
> > > > > > +		enet5: ethernet@ea000 {
> > > > > > +		};
> > > > > > +
> > > > > > +		enet6: ethernet@f0000 {
> > > > > > +		};
> > > > > > +	};
> > > > >
> > > > > I do not quite understand why these nodes are empty.
> > > >
> > > > These nodes provide the aliases (and custom SoC mapping) for the
> > > > FMan ports that are used on this particular SoC. The particular
> > > > node details are found in the port dtsi file thus no information
> > > > is required here. Given the fact that the numbering and actual
> > > > ports that are in use can vary between SoCs, the aliases cannot
> > > > be included in the port dtsi nor in the FMan dtsi.
> > >
> > > Do not completely follow.  What do you mean by 'port dtsi file'?
> Maybe
> > > I should wait for you new patches with better commit log and comments
> to
> > > understand these odd empty nodes.
> >
> > The DPAA IP can have a certain number of ports. Out of those, a certain
> > SoC can use all or only a subset, with diverse decisions on actual
> numbering
> > of the used ports. Next, when using the SoC on a particular board, some
> > ports will be used, some will not. The file hierarchy relates to this
> > hierarchy - you have individual port files that are included by the
> > SoC dtsi which in turn is included by the board dts. These nodes do not
> > need any new content as all the node details are provided by the port
> > dtsi files. The information they provide is the alias used for each
> port.
> 
> My impression is that such hierarchy mapping is not really necessary and
> only makes the device tree source messy and hard to follow.  I do not
> like it.

Hi Shawn, I respect your opinion on this, I'm sure it is the result of an
extensive experience dealing with less complicated devices. Before breaking
a construct that to date has served the DPAA users well I'd like to hear
more thoughts on this topic.

> >
> > > >
> > > > > > +};
> > > > > > diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts
> > > > > b/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts
> > > > > > index 0989d63..ee66bb2 100644
> > > > > > --- a/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts
> > > > > > +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts
> > > > > > @@ -181,3 +181,5 @@
> > > > > >  		reg = <0>;
> > > > > >  	};
> > > > > >  };
> > > > > > +
> > > > > > +/include/ "fsl-ls1043-post.dtsi"
> > > > >
> > > > > Move it to header of the file.
> > > >
> > > > This is to be included at the end, to make sure the references are
> > > > met and to allow overrides if needed.
> > >
> > > What is broken if you move the include to header?
> >
> > Not much besides the structure we've always used for our SoCs device
> > trees. The file is called "-post.dtsi" because here is the place any
> > required overrides can be made, if needed. Moving to the top renders
> > having this separate file useless.
> 
> That's great, and let's kill it then.
> 
> >
> > > >
> > > > > > diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
> > > > > b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
> > > > > > index c37110b..d94f003 100644
> > > > > > --- a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
> > > > > > +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
> > > > > > @@ -139,3 +139,78 @@
> > > > > >  &duart1 {
> > > > > >  	status = "okay";
> > > > > >  };
> > > > > > +
> > > > > > +/include/ "fsl-ls1043-post.dtsi"
> > > > > > +
> > > > >
> > > > > Ditto
> > > > >
> > > > > > +&soc {
> > > > > > +	fman@1a00000 {
> > > > > > +		ethernet@e0000 {
> > > > >
> > > > > You defined enet0 label.  Why don't you use it?
> > > > >
> > > >
> > > > The enet0 label is used by u-boot for fix-ups, providing the
> > > > actual offset here makes it easier to follow.
> > >
> > > You will not need to construct the node hierarchy with label.  And
> > > alias/label name is more easier to follow than offset.
> > >
> > > Shawn
> >
> > When I said easier to follow I was referring to someone creating a
> > new device tree for his custom board, not someone reading the device
> > tree. If you have the board and SoC reference manuals in your hands
> > and you are writing a new board device tree, having the offset here
> > makes things easier. The benefit of having one less indentation level
> > is lesser than that.
> 
> The while complex and messy file hierarchy makes users' life harder,
> both the ones reading the device tree and the ones creating board device
> tree.  I would suggest you go the opposite, making the device tree
> simple and easy for users by allowing data duplication.  In arm/arm64
> device tree world, we do not consider DT data reusing/sharing among
> different SoCs that much.
> 
> Shawn

Complex it is, mirroring the IP, but messy it is a word I would not use.

Regards,
Madalin

WARNING: multiple messages have this Message-ID (diff)
From: Madalin-Cristian Bucur <madalin.bucur@nxp.com>
To: Shawn Guo <shawnguo@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	Roy Pledge <roy.pledge@nxp.com>,
	"will.deacon@arm.com" <will.deacon@arm.com>,
	"catalin.marinas@arm.com" <catalin.marinas@arm.com>
Cc: Kumar Gala <galak@codeaurora.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Russell King - ARM Linux <linux@armlinux.org.uk>
Subject: RE: [PATCH v2 1/2] dts: arm64: add LS1043A DPAA support
Date: Mon, 27 Mar 2017 08:11:33 +0000	[thread overview]
Message-ID: <HE1PR04MB1129DA747FC5B7B977CADF43EC330@HE1PR04MB1129.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20170327075546.GR30608@dragon>

> -----Original Message-----
> From: Shawn Guo [mailto:shawnguo@kernel.org]
> Sent: Monday, March 27, 2017 10:56 AM
> Subject: Re: [PATCH v2 1/2] dts: arm64: add LS1043A DPAA support
> 
> On Mon, Mar 27, 2017 at 07:03:40AM +0000, Madalin-Cristian Bucur wrote:
> > > > > > +	fman@1a00000 {
> > > > > > +		enet0: ethernet@e0000 {
> > > > > > +		};
> > > > > > +
> > > > > > +		enet1: ethernet@e2000 {
> > > > > > +		};
> > > > > > +
> > > > > > +		enet2: ethernet@e4000 {
> > > > > > +		};
> > > > > > +
> > > > > > +		enet3: ethernet@e6000 {
> > > > > > +		};
> > > > > > +
> > > > > > +		enet4: ethernet@e8000 {
> > > > > > +		};
> > > > > > +
> > > > > > +		enet5: ethernet@ea000 {
> > > > > > +		};
> > > > > > +
> > > > > > +		enet6: ethernet@f0000 {
> > > > > > +		};
> > > > > > +	};
> > > > >
> > > > > I do not quite understand why these nodes are empty.
> > > >
> > > > These nodes provide the aliases (and custom SoC mapping) for the
> > > > FMan ports that are used on this particular SoC. The particular
> > > > node details are found in the port dtsi file thus no information
> > > > is required here. Given the fact that the numbering and actual
> > > > ports that are in use can vary between SoCs, the aliases cannot
> > > > be included in the port dtsi nor in the FMan dtsi.
> > >
> > > Do not completely follow.  What do you mean by 'port dtsi file'?
> Maybe
> > > I should wait for you new patches with better commit log and comments
> to
> > > understand these odd empty nodes.
> >
> > The DPAA IP can have a certain number of ports. Out of those, a certain
> > SoC can use all or only a subset, with diverse decisions on actual
> numbering
> > of the used ports. Next, when using the SoC on a particular board, some
> > ports will be used, some will not. The file hierarchy relates to this
> > hierarchy - you have individual port files that are included by the
> > SoC dtsi which in turn is included by the board dts. These nodes do not
> > need any new content as all the node details are provided by the port
> > dtsi files. The information they provide is the alias used for each
> port.
> 
> My impression is that such hierarchy mapping is not really necessary and
> only makes the device tree source messy and hard to follow.  I do not
> like it.

Hi Shawn, I respect your opinion on this, I'm sure it is the result of an
extensive experience dealing with less complicated devices. Before breaking
a construct that to date has served the DPAA users well I'd like to hear
more thoughts on this topic.

> >
> > > >
> > > > > > +};
> > > > > > diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts
> > > > > b/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts
> > > > > > index 0989d63..ee66bb2 100644
> > > > > > --- a/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts
> > > > > > +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts
> > > > > > @@ -181,3 +181,5 @@
> > > > > >  		reg = <0>;
> > > > > >  	};
> > > > > >  };
> > > > > > +
> > > > > > +/include/ "fsl-ls1043-post.dtsi"
> > > > >
> > > > > Move it to header of the file.
> > > >
> > > > This is to be included at the end, to make sure the references are
> > > > met and to allow overrides if needed.
> > >
> > > What is broken if you move the include to header?
> >
> > Not much besides the structure we've always used for our SoCs device
> > trees. The file is called "-post.dtsi" because here is the place any
> > required overrides can be made, if needed. Moving to the top renders
> > having this separate file useless.
> 
> That's great, and let's kill it then.
> 
> >
> > > >
> > > > > > diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
> > > > > b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
> > > > > > index c37110b..d94f003 100644
> > > > > > --- a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
> > > > > > +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
> > > > > > @@ -139,3 +139,78 @@
> > > > > >  &duart1 {
> > > > > >  	status = "okay";
> > > > > >  };
> > > > > > +
> > > > > > +/include/ "fsl-ls1043-post.dtsi"
> > > > > > +
> > > > >
> > > > > Ditto
> > > > >
> > > > > > +&soc {
> > > > > > +	fman@1a00000 {
> > > > > > +		ethernet@e0000 {
> > > > >
> > > > > You defined enet0 label.  Why don't you use it?
> > > > >
> > > >
> > > > The enet0 label is used by u-boot for fix-ups, providing the
> > > > actual offset here makes it easier to follow.
> > >
> > > You will not need to construct the node hierarchy with label.  And
> > > alias/label name is more easier to follow than offset.
> > >
> > > Shawn
> >
> > When I said easier to follow I was referring to someone creating a
> > new device tree for his custom board, not someone reading the device
> > tree. If you have the board and SoC reference manuals in your hands
> > and you are writing a new board device tree, having the offset here
> > makes things easier. The benefit of having one less indentation level
> > is lesser than that.
> 
> The while complex and messy file hierarchy makes users' life harder,
> both the ones reading the device tree and the ones creating board device
> tree.  I would suggest you go the opposite, making the device tree
> simple and easy for users by allowing data duplication.  In arm/arm64
> device tree world, we do not consider DT data reusing/sharing among
> different SoCs that much.
> 
> Shawn

Complex it is, mirroring the IP, but messy it is a word I would not use.

Regards,
Madalin

WARNING: multiple messages have this Message-ID (diff)
From: madalin.bucur@nxp.com (Madalin-Cristian Bucur)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] dts: arm64: add LS1043A DPAA support
Date: Mon, 27 Mar 2017 08:11:33 +0000	[thread overview]
Message-ID: <HE1PR04MB1129DA747FC5B7B977CADF43EC330@HE1PR04MB1129.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20170327075546.GR30608@dragon>

> -----Original Message-----
> From: Shawn Guo [mailto:shawnguo at kernel.org]
> Sent: Monday, March 27, 2017 10:56 AM
> Subject: Re: [PATCH v2 1/2] dts: arm64: add LS1043A DPAA support
> 
> On Mon, Mar 27, 2017 at 07:03:40AM +0000, Madalin-Cristian Bucur wrote:
> > > > > > +	fman at 1a00000 {
> > > > > > +		enet0: ethernet at e0000 {
> > > > > > +		};
> > > > > > +
> > > > > > +		enet1: ethernet at e2000 {
> > > > > > +		};
> > > > > > +
> > > > > > +		enet2: ethernet at e4000 {
> > > > > > +		};
> > > > > > +
> > > > > > +		enet3: ethernet at e6000 {
> > > > > > +		};
> > > > > > +
> > > > > > +		enet4: ethernet at e8000 {
> > > > > > +		};
> > > > > > +
> > > > > > +		enet5: ethernet at ea000 {
> > > > > > +		};
> > > > > > +
> > > > > > +		enet6: ethernet at f0000 {
> > > > > > +		};
> > > > > > +	};
> > > > >
> > > > > I do not quite understand why these nodes are empty.
> > > >
> > > > These nodes provide the aliases (and custom SoC mapping) for the
> > > > FMan ports that are used on this particular SoC. The particular
> > > > node details are found in the port dtsi file thus no information
> > > > is required here. Given the fact that the numbering and actual
> > > > ports that are in use can vary between SoCs, the aliases cannot
> > > > be included in the port dtsi nor in the FMan dtsi.
> > >
> > > Do not completely follow.  What do you mean by 'port dtsi file'?
> Maybe
> > > I should wait for you new patches with better commit log and comments
> to
> > > understand these odd empty nodes.
> >
> > The DPAA IP can have a certain number of ports. Out of those, a certain
> > SoC can use all or only a subset, with diverse decisions on actual
> numbering
> > of the used ports. Next, when using the SoC on a particular board, some
> > ports will be used, some will not. The file hierarchy relates to this
> > hierarchy - you have individual port files that are included by the
> > SoC dtsi which in turn is included by the board dts. These nodes do not
> > need any new content as all the node details are provided by the port
> > dtsi files. The information they provide is the alias used for each
> port.
> 
> My impression is that such hierarchy mapping is not really necessary and
> only makes the device tree source messy and hard to follow.  I do not
> like it.

Hi Shawn, I respect your opinion on this, I'm sure it is the result of an
extensive experience dealing with less complicated devices. Before breaking
a construct that to date has served the DPAA users well I'd like to hear
more thoughts on this topic.

> >
> > > >
> > > > > > +};
> > > > > > diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts
> > > > > b/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts
> > > > > > index 0989d63..ee66bb2 100644
> > > > > > --- a/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts
> > > > > > +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts
> > > > > > @@ -181,3 +181,5 @@
> > > > > >  		reg = <0>;
> > > > > >  	};
> > > > > >  };
> > > > > > +
> > > > > > +/include/ "fsl-ls1043-post.dtsi"
> > > > >
> > > > > Move it to header of the file.
> > > >
> > > > This is to be included at the end, to make sure the references are
> > > > met and to allow overrides if needed.
> > >
> > > What is broken if you move the include to header?
> >
> > Not much besides the structure we've always used for our SoCs device
> > trees. The file is called "-post.dtsi" because here is the place any
> > required overrides can be made, if needed. Moving to the top renders
> > having this separate file useless.
> 
> That's great, and let's kill it then.
> 
> >
> > > >
> > > > > > diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
> > > > > b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
> > > > > > index c37110b..d94f003 100644
> > > > > > --- a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
> > > > > > +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
> > > > > > @@ -139,3 +139,78 @@
> > > > > >  &duart1 {
> > > > > >  	status = "okay";
> > > > > >  };
> > > > > > +
> > > > > > +/include/ "fsl-ls1043-post.dtsi"
> > > > > > +
> > > > >
> > > > > Ditto
> > > > >
> > > > > > +&soc {
> > > > > > +	fman at 1a00000 {
> > > > > > +		ethernet at e0000 {
> > > > >
> > > > > You defined enet0 label.  Why don't you use it?
> > > > >
> > > >
> > > > The enet0 label is used by u-boot for fix-ups, providing the
> > > > actual offset here makes it easier to follow.
> > >
> > > You will not need to construct the node hierarchy with label.  And
> > > alias/label name is more easier to follow than offset.
> > >
> > > Shawn
> >
> > When I said easier to follow I was referring to someone creating a
> > new device tree for his custom board, not someone reading the device
> > tree. If you have the board and SoC reference manuals in your hands
> > and you are writing a new board device tree, having the offset here
> > makes things easier. The benefit of having one less indentation level
> > is lesser than that.
> 
> The while complex and messy file hierarchy makes users' life harder,
> both the ones reading the device tree and the ones creating board device
> tree.  I would suggest you go the opposite, making the device tree
> simple and easy for users by allowing data duplication.  In arm/arm64
> device tree world, we do not consider DT data reusing/sharing among
> different SoCs that much.
> 
> Shawn

Complex it is, mirroring the IP, but messy it is a word I would not use.

Regards,
Madalin

  reply	other threads:[~2017-03-27  8:13 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-01 15:35 [PATCH v2 0/2] dts: arm64: add DPAA 1 support for ARM based SoCs Madalin Bucur
2017-03-01 15:35 ` Madalin Bucur
2017-03-01 15:35 ` Madalin Bucur
2017-03-01 15:35 ` [PATCH v2 1/2] dts: arm64: add LS1043A DPAA support Madalin Bucur
2017-03-01 15:35   ` Madalin Bucur
2017-03-01 15:35   ` Madalin Bucur
2017-03-14  7:07   ` Shawn Guo
2017-03-14  7:07     ` Shawn Guo
2017-03-14  7:07     ` Shawn Guo
2017-03-22 10:58     ` Madalin-Cristian Bucur
2017-03-22 10:58       ` Madalin-Cristian Bucur
2017-03-22 10:58       ` Madalin-Cristian Bucur
2017-03-27  6:27       ` Shawn Guo
2017-03-27  6:27         ` Shawn Guo
2017-03-27  6:27         ` Shawn Guo
2017-03-27  7:03         ` Madalin-Cristian Bucur
2017-03-27  7:03           ` Madalin-Cristian Bucur
2017-03-27  7:03           ` Madalin-Cristian Bucur
2017-03-27  7:55           ` Shawn Guo
2017-03-27  7:55             ` Shawn Guo
2017-03-27  7:55             ` Shawn Guo
2017-03-27  8:11             ` Madalin-Cristian Bucur [this message]
2017-03-27  8:11               ` Madalin-Cristian Bucur
2017-03-27  8:11               ` Madalin-Cristian Bucur
2017-03-27  8:55               ` Shawn Guo
2017-03-27  8:55                 ` Shawn Guo
2017-03-27  8:55                 ` Shawn Guo
2017-03-01 15:35 ` [PATCH v2 2/2] dts: arm64: add LS1046A " Madalin Bucur
2017-03-01 15:35   ` Madalin Bucur
2017-03-01 15:35   ` Madalin Bucur

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=HE1PR04MB1129DA747FC5B7B977CADF43EC330@HE1PR04MB1129.eurprd04.prod.outlook.com \
    --to=madalin.bucur@nxp.com \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=roy.pledge@nxp.com \
    --cc=shawnguo@kernel.org \
    --cc=will.deacon@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.