2016-04-01 21:09:11

by Stuart Yoder

[permalink] [raw]
Subject: [PATCH 2/2] arm64: dts: ls2080a: fsl-mc dt node updates

From: Stuart Yoder <[email protected]>

updates to the fsl-mc node for full functionality:
-msi-parent is needed for interrupt support
-ranges is needed to enable the bus driver to translate bus addresses
-dpmac nodes provide a basis for relating dpmac objects to PHYs

Signed-off-by: Stuart Yoder <[email protected]>
---
arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi | 87 ++++++++++++++++++++++++
1 file changed, 87 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi
index 9d746c6..449c635 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi
@@ -265,6 +265,93 @@
compatible = "fsl,qoriq-mc";
reg = <0x00000008 0x0c000000 0 0x40>, /* MC portal base */
<0x00000000 0x08340000 0 0x40000>; /* MC control reg */
+ msi-parent = <&its>;
+ #address-cells = <3>;
+ #size-cells = <1>;
+
+ /*
+ * Region type 0x0 - MC portals
+ * Region type 0x1 - QBMAN portals
+ */
+ ranges = <0x0 0x0 0x0 0x8 0x0c000000 0x4000000
+ 0x1 0x0 0x0 0x8 0x18000000 0x8000000>;
+
+ /*
+ * Define the maximum number of MACs present on the SoC.
+ * They won't necessarily be all probed, since the
+ * Data Path Layout file and the MC firmware can put
+ * fewer actual DPMAC objects on the MC bus.
+ */
+ dpmacs {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ dpmac1: dpmac@1 {
+ compatible = "fsl,qoriq-mc-dpmac";
+ reg = <1>;
+ };
+ dpmac2: dpmac@2 {
+ compatible = "fsl,qoriq-mc-dpmac";
+ reg = <2>;
+ };
+ dpmac3: dpmac@3 {
+ compatible = "fsl,qoriq-mc-dpmac";
+ reg = <3>;
+ };
+ dpmac4: dpmac@4 {
+ compatible = "fsl,qoriq-mc-dpmac";
+ reg = <4>;
+ };
+ dpmac5: dpmac@5 {
+ compatible = "fsl,qoriq-mc-dpmac";
+ reg = <5>;
+ };
+ dpmac6: dpmac@6 {
+ compatible = "fsl,qoriq-mc-dpmac";
+ reg = <6>;
+ };
+ dpmac7: dpmac@7 {
+ compatible = "fsl,qoriq-mc-dpmac";
+ reg = <7>;
+ };
+ dpmac8: dpmac@8 {
+ compatible = "fsl,qoriq-mc-dpmac";
+ reg = <8>;
+ };
+ dpmac9: dpmac@9 {
+ compatible = "fsl,qoriq-mc-dpmac";
+ reg = <9>;
+ };
+ dpmac10: dpmac@10 {
+ compatible = "fsl,qoriq-mc-dpmac";
+ reg = <0xa>;
+ };
+ dpmac11: dpmac@11 {
+ compatible = "fsl,qoriq-mc-dpmac";
+ reg = <0xb>;
+ };
+ dpmac12: dpmac@12 {
+ compatible = "fsl,qoriq-mc-dpmac";
+ reg = <0xc>;
+ };
+ dpmac13: dpmac@13 {
+ compatible = "fsl,qoriq-mc-dpmac";
+ reg = <0xd>;
+ };
+ dpmac14: dpmac@14 {
+ compatible = "fsl,qoriq-mc-dpmac";
+ reg = <0xe>;
+ };
+ dpmac15: dpmac@15 {
+ compatible = "fsl,qoriq-mc-dpmac";
+ reg = <0xf>;
+ };
+ dpmac16: dpmac@16 {
+ compatible = "fsl,qoriq-mc-dpmac";
+ reg = <0x10>;
+ };
+ };
+
};

smmu: iommu@5000000 {
--
1.7.9.5


2016-04-13 05:50:59

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: dts: ls2080a: fsl-mc dt node updates

On Fri, Apr 01, 2016 at 03:54:40PM -0500, Stuart Yoder wrote:
> From: Stuart Yoder <[email protected]>
>
> updates to the fsl-mc node for full functionality:
> -msi-parent is needed for interrupt support
> -ranges is needed to enable the bus driver to translate bus addresses
> -dpmac nodes provide a basis for relating dpmac objects to PHYs
>
> Signed-off-by: Stuart Yoder <[email protected]>
> ---
> arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi | 87 ++++++++++++++++++++++++
> 1 file changed, 87 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi
> index 9d746c6..449c635 100644
> --- a/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi
> +++ b/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi
> @@ -265,6 +265,93 @@
> compatible = "fsl,qoriq-mc";
> reg = <0x00000008 0x0c000000 0 0x40>, /* MC portal base */
> <0x00000000 0x08340000 0 0x40000>; /* MC control reg */
> + msi-parent = <&its>;
> + #address-cells = <3>;
> + #size-cells = <1>;
> +
> + /*
> + * Region type 0x0 - MC portals
> + * Region type 0x1 - QBMAN portals
> + */
> + ranges = <0x0 0x0 0x0 0x8 0x0c000000 0x4000000
> + 0x1 0x0 0x0 0x8 0x18000000 0x8000000>;
> +
> + /*
> + * Define the maximum number of MACs present on the SoC.
> + * They won't necessarily be all probed, since the
> + * Data Path Layout file and the MC firmware can put
> + * fewer actual DPMAC objects on the MC bus.
> + */
> + dpmacs {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + dpmac1: dpmac@1 {
> + compatible = "fsl,qoriq-mc-dpmac";

I did not see how this compatible is used by kernel driver.

> + reg = <1>;
> + };

Please have a newline between nodes.

Shawn

> + dpmac2: dpmac@2 {
> + compatible = "fsl,qoriq-mc-dpmac";
> + reg = <2>;
> + };
> + dpmac3: dpmac@3 {
> + compatible = "fsl,qoriq-mc-dpmac";
> + reg = <3>;
> + };
> + dpmac4: dpmac@4 {
> + compatible = "fsl,qoriq-mc-dpmac";
> + reg = <4>;
> + };
> + dpmac5: dpmac@5 {
> + compatible = "fsl,qoriq-mc-dpmac";
> + reg = <5>;
> + };
> + dpmac6: dpmac@6 {
> + compatible = "fsl,qoriq-mc-dpmac";
> + reg = <6>;
> + };
> + dpmac7: dpmac@7 {
> + compatible = "fsl,qoriq-mc-dpmac";
> + reg = <7>;
> + };
> + dpmac8: dpmac@8 {
> + compatible = "fsl,qoriq-mc-dpmac";
> + reg = <8>;
> + };
> + dpmac9: dpmac@9 {
> + compatible = "fsl,qoriq-mc-dpmac";
> + reg = <9>;
> + };
> + dpmac10: dpmac@10 {
> + compatible = "fsl,qoriq-mc-dpmac";
> + reg = <0xa>;
> + };
> + dpmac11: dpmac@11 {
> + compatible = "fsl,qoriq-mc-dpmac";
> + reg = <0xb>;
> + };
> + dpmac12: dpmac@12 {
> + compatible = "fsl,qoriq-mc-dpmac";
> + reg = <0xc>;
> + };
> + dpmac13: dpmac@13 {
> + compatible = "fsl,qoriq-mc-dpmac";
> + reg = <0xd>;
> + };
> + dpmac14: dpmac@14 {
> + compatible = "fsl,qoriq-mc-dpmac";
> + reg = <0xe>;
> + };
> + dpmac15: dpmac@15 {
> + compatible = "fsl,qoriq-mc-dpmac";
> + reg = <0xf>;
> + };
> + dpmac16: dpmac@16 {
> + compatible = "fsl,qoriq-mc-dpmac";
> + reg = <0x10>;
> + };
> + };
> +
> };
>
> smmu: iommu@5000000 {
> --
> 1.7.9.5
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>

2016-04-13 20:39:38

by Stuart Yoder

[permalink] [raw]
Subject: RE: [PATCH 2/2] arm64: dts: ls2080a: fsl-mc dt node updates



> -----Original Message-----
> From: Shawn Guo [mailto:[email protected]]
> Sent: Wednesday, April 13, 2016 12:50 AM
> To: Stuart Yoder <[email protected]>
> Cc: [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected]; Yang-Leo Li
> <[email protected]>
> Subject: Re: [PATCH 2/2] arm64: dts: ls2080a: fsl-mc dt node updates
>
> On Fri, Apr 01, 2016 at 03:54:40PM -0500, Stuart Yoder wrote:
> > From: Stuart Yoder <[email protected]>
> >
> > updates to the fsl-mc node for full functionality:
> > -msi-parent is needed for interrupt support
> > -ranges is needed to enable the bus driver to translate bus addresses
> > -dpmac nodes provide a basis for relating dpmac objects to PHYs
> >
> > Signed-off-by: Stuart Yoder <[email protected]>
> > ---
> > arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi | 87 ++++++++++++++++++++++++
> > 1 file changed, 87 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi b/arch/arm64/boot/dts/freescale/fsl-
> ls2080a.dtsi
> > index 9d746c6..449c635 100644
> > --- a/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi
> > @@ -265,6 +265,93 @@
> > compatible = "fsl,qoriq-mc";
> > reg = <0x00000008 0x0c000000 0 0x40>, /* MC portal base */
> > <0x00000000 0x08340000 0 0x40000>; /* MC control reg */
> > + msi-parent = <&its>;
> > + #address-cells = <3>;
> > + #size-cells = <1>;
> > +
> > + /*
> > + * Region type 0x0 - MC portals
> > + * Region type 0x1 - QBMAN portals
> > + */
> > + ranges = <0x0 0x0 0x0 0x8 0x0c000000 0x4000000
> > + 0x1 0x0 0x0 0x8 0x18000000 0x8000000>;
> > +
> > + /*
> > + * Define the maximum number of MACs present on the SoC.
> > + * They won't necessarily be all probed, since the
> > + * Data Path Layout file and the MC firmware can put
> > + * fewer actual DPMAC objects on the MC bus.
> > + */
> > + dpmacs {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + dpmac1: dpmac@1 {
> > + compatible = "fsl,qoriq-mc-dpmac";
>
> I did not see how this compatible is used by kernel driver.

There is no driver yet, but it will be coming soon. But, does
it matter? Device trees should be describing hardware
without regards to some specific kernel use of a node or
property.

> > + reg = <1>;
> > + };
>
> Please have a newline between nodes.

Ok, will do.

Stuart

2016-04-18 02:03:37

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: dts: ls2080a: fsl-mc dt node updates

On Wed, Apr 13, 2016 at 08:39:32PM +0000, Stuart Yoder wrote:
> > > @@ -265,6 +265,93 @@
> > > compatible = "fsl,qoriq-mc";
> > > reg = <0x00000008 0x0c000000 0 0x40>, /* MC portal base */
> > > <0x00000000 0x08340000 0 0x40000>; /* MC control reg */
> > > + msi-parent = <&its>;
> > > + #address-cells = <3>;
> > > + #size-cells = <1>;
> > > +
> > > + /*
> > > + * Region type 0x0 - MC portals
> > > + * Region type 0x1 - QBMAN portals
> > > + */
> > > + ranges = <0x0 0x0 0x0 0x8 0x0c000000 0x4000000
> > > + 0x1 0x0 0x0 0x8 0x18000000 0x8000000>;
> > > +
> > > + /*
> > > + * Define the maximum number of MACs present on the SoC.
> > > + * They won't necessarily be all probed, since the
> > > + * Data Path Layout file and the MC firmware can put
> > > + * fewer actual DPMAC objects on the MC bus.
> > > + */
> > > + dpmacs {
> > > + #address-cells = <1>;
> > > + #size-cells = <0>;
> > > +
> > > + dpmac1: dpmac@1 {
> > > + compatible = "fsl,qoriq-mc-dpmac";
> >
> > I did not see how this compatible is used by kernel driver.
>
> There is no driver yet, but it will be coming soon. But, does
> it matter? Device trees should be describing hardware
> without regards to some specific kernel use of a node or
> property.

We need to at least have the bindings documented before we can accept it
in dts files.

Shawn

2016-04-18 03:41:35

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: dts: ls2080a: fsl-mc dt node updates

On Mon, Apr 18, 2016 at 10:02 AM, Shawn Guo <[email protected]> wrote:
> On Wed, Apr 13, 2016 at 08:39:32PM +0000, Stuart Yoder wrote:
>> > > @@ -265,6 +265,93 @@
>> > > compatible = "fsl,qoriq-mc";
>> > > reg = <0x00000008 0x0c000000 0 0x40>, /* MC portal base */
>> > > <0x00000000 0x08340000 0 0x40000>; /* MC control reg */
>> > > + msi-parent = <&its>;
>> > > + #address-cells = <3>;
>> > > + #size-cells = <1>;
>> > > +
>> > > + /*
>> > > + * Region type 0x0 - MC portals
>> > > + * Region type 0x1 - QBMAN portals
>> > > + */
>> > > + ranges = <0x0 0x0 0x0 0x8 0x0c000000 0x4000000
>> > > + 0x1 0x0 0x0 0x8 0x18000000 0x8000000>;
>> > > +
>> > > + /*
>> > > + * Define the maximum number of MACs present on the SoC.
>> > > + * They won't necessarily be all probed, since the
>> > > + * Data Path Layout file and the MC firmware can put
>> > > + * fewer actual DPMAC objects on the MC bus.
>> > > + */
>> > > + dpmacs {
>> > > + #address-cells = <1>;
>> > > + #size-cells = <0>;
>> > > +
>> > > + dpmac1: dpmac@1 {
>> > > + compatible = "fsl,qoriq-mc-dpmac";
>> >
>> > I did not see how this compatible is used by kernel driver.
>>
>> There is no driver yet, but it will be coming soon. But, does
>> it matter? Device trees should be describing hardware
>> without regards to some specific kernel use of a node or
>> property.
>
> We need to at least have the bindings documented before we can accept it
> in dts files.

Ah, sorry. Missed that the bindings are added by patch 1/2.

Shawn