From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Hongbo Wang <hongbo.wang@nxp.com>
Cc: Andrew Lunn <andrew@lunn.ch>, Hongjun Chen <hongjun.chen@nxp.com>,
"shawnguo@kernel.org" <shawnguo@kernel.org>,
Leo Li <leoyang.li@nxp.com>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
"vivien.didelot@gmail.com" <vivien.didelot@gmail.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Michael Walle <michael@walle.cc>,
Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
Subject: Re: [PATCH v1] arm64: dts: fsl: ls1028a-rdb: Add dts file to choose swp5 as dsa master
Date: Mon, 5 Sep 2022 20:52:27 +0000 [thread overview]
Message-ID: <20220905205226.hwrnjx6qnrkdjw76@skbuf> (raw)
In-Reply-To: <VI1PR04MB5677BA91547DC2228F615CEFE1FE9@VI1PR04MB5677.eurprd04.prod.outlook.com>
On Tue, Aug 17, 2021 at 02:59:07AM +0000, Hongbo Wang wrote:
> > On Mon, Aug 16, 2021 at 06:03:52AM +0000, Hongbo Wang wrote:
> > > > I was going to suggest as an alternative to define a device tree
> > > > overlay file with the changes in the CPU port assignment, instead of
> > > > defining a wholly new DTS for the LS1028A reference design board.
> > > > But I am pretty sure that it is not possible to specify a
> > > > /delete-property/ inside a device tree overlay file, so that won't actually work.
> > >
> > > hi Vladimir,
> > >
> > > if don't specify "/delete-property/" in this dts file, the
> > > corresponding dtb will not work well, so I add it to delete 'ethernet' property
> > > from mscc_felix_port4 explicitly.
> >
> > Judging by the reply, I am not actually sure you've understood what has been
> > said.
> >
> > I said:
> >
> > There is an option to create a device tree overlay:
> >
> > https://www.kernel.org/doc/html/latest/devicetree/overlay-notes.html
> >
> > We use these for the riser cards on the LS1028A-QDS boards.
> >
> > https://source.codeaurora.org/external/qoriq/qoriq-components/linux/tree/ar
> > ch/arm64/boot/dts/freescale/fsl-ls1028a-qds-13bb.dts?h=LSDK-20.12-V5.4
> >
> > They are included as usual in a U-Boot ITB file:
> >
> > / {
> > images {
> > /* Base DTB */
> > ls1028aqds-dtb {
> > description = "ls1028aqds-dtb";
> > data = /incbin/("arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dtb");
> > type = "flat_dt";
> > arch = "arm64";
> > os = "linux";
> > compression = "none";
> > load = <0x90000000>;
> > hash@1 {
> > algo = "crc32";
> > };
> > };
> > /* Overlay */
> > fdt@ls1028aqds-13bb {
> > description = "ls1028aqds-13bb";
> > data = /incbin/("arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-13bb.dtb");
> > type = "flat_dt";
> > arch = "arm64";
> > load = <0x90010000>;
> > };
> > };
> > };
> >
> > In U-Boot, you apply the overlay as following:
> >
> > tftp $kernel_addr_r boot.itb && bootm
> > $kernel_addr_r#ls1028aqds#ls1028aqds-13bb
> >
> > It would have been nice to have a similar device tree overlay that changes the
> > DSA master from eno2 to eno3, and for that overlay to be able to be applied
> > (or not) from U-Boot.
> >
> > But it's _not_ possible, because you cannot put the /delete-property/ (that you
> > need to have) in the .dtbo file. Or if you put it, it will not delete the property
> > from the base dtb.
> >
> > That's all I said.
>
> thanks for the detailed explanation,
> I have got your point.
>
> thanks,
> hongbo
I'm replying to a very old topic here, but I don't think this made too
much progress (NXP still carries a downstream fsl-ls1028a-rdb-dsa-swp5-eno3.dts,
for a use case which is valid: using one of the 2 internal Ethernet
ports between the switch and the SoC as a plain data port, rather than a
CPU port).
I've found what I think is a satisfactory solution for myself. Rather
than carrying an entirely new device tree just to move around the DSA
master from &enetc_port2 to &enetc_port3, I'm building upon the changes
for multiple CPU ports which Shawn has accepted now.
https://lore.kernel.org/linux-arm-kernel/20220831160124.914453-1-olteanv@gmail.com/
With that patch set, what Hongbo tried to add here simply becomes:
&mscc_felix_port4 {
/delete-property/ ethernet;
};
I've already expressed discontent with the fact that it isn't possible
to move just this action to a device tree overlay and apply it to
whatever LS1028A based board, not just the RDB. However, I found that it
is possible to do this instead, just from within the U-Boot shell:
fdt addr $fdt_addr_r
fdt rm /soc/pcie@1f0000000/ethernet-switch@0,5/ports/port@4 ethernet
...
bootm $kernel_addr_r - $fdt_addr_r
which is even more convenient, because this way, the board device trees
now don't even need to be compiled with the dtc "-@" option (to include
the __symbols__ node required for dtb overlays).
It's likely that some of the people copied here do fancier tricks with
dynamic editing of the FDT already, on a day by day basis. In that case,
what can I say, have a good rest of the day ;)
prev parent reply other threads:[~2022-09-05 20:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-13 3:01 [PATCH v1] arm64: dts: fsl: ls1028a-rdb: Add dts file to choose swp5 as dsa master hongbo.wang
2021-08-13 13:09 ` Andrew Lunn
2021-08-13 13:56 ` [EXT] " Hongbo Wang
2021-08-13 14:07 ` Vladimir Oltean
2021-08-13 14:25 ` Andrew Lunn
2021-08-16 6:03 ` Hongbo Wang
2021-08-16 17:48 ` Vladimir Oltean
2021-08-17 2:59 ` Hongbo Wang
2022-09-05 20:52 ` Vladimir Oltean [this message]
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=20220905205226.hwrnjx6qnrkdjw76@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=hongbo.wang@nxp.com \
--cc=hongjun.chen@nxp.com \
--cc=leoyang.li@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@walle.cc \
--cc=netdev@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=shawnguo@kernel.org \
--cc=vivien.didelot@gmail.com \
--cc=xiaoliang.yang_1@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;
as well as URLs for NNTP newsgroup(s).