[PATCH net-next v7 5/7] ARM64: dts: marvell: Fix some common switch mistakes

Vladimir Oltean olteanv at gmail.com
Tue Oct 24 12:51:37 PDT 2023


On Tue, Oct 24, 2023 at 08:03:47PM +0100, Russell King (Oracle) wrote:
> On Tue, Oct 24, 2023 at 09:28:42PM +0300, Vladimir Oltean wrote:
> > U-Boot code does this, so you can't rename "ports":
> > 
> > 	/*
> > 	 * now if there are more switches or a SFP module coming after,
> > 	 * enable corresponding ports
> > 	 */
> > 	if (id < peridot + topaz - 1) {
> > 		res = fdt_status_okay_by_pathf(blob,
> > 					       "%s/switch%i@%x/ports/port at a",
> > 					       mdio_path, id, addr);
> > 	} else if (id == peridot - 1 && !topaz && sfp) {
> > 		res = fdt_status_okay_by_pathf(blob,
> > 					       "%s/switch%i@%x/ports/port-sfp at a",
> > 					       mdio_path, id, addr);
> > 	} else {
> > 		res = 0;
> > 	}
> 
> So that's now two platforms that do this. I think at this stage, we
> have to regard these node paths as an ABI that we just can't change
> without causing some breakage.

No, it's still the same as the one I pointed out on v4:
https://patchwork.kernel.org/project/netdevbpf/patch/20231018-marvell-88e6152-wan-led-v4-5-3ee0c67383be@linaro.org/

aka the Turris MOX. But it looks like my previous comment wasn't quite
clear, thus Linus' conversion still cleans up too much in this device
tree.

> If we can't fix up all platforms, doesn't that make the YAML
> conversion harder?

Well, I do see this as a valid concern that could potentially bite back,
yes. I did express that the schema should not emit warnings for
$nodename, but TBH I don't know how that constraint could be eliminated:
https://patchwork.kernel.org/project/netdevbpf/patch/20231018-marvell-88e6152-wan-led-v4-6-3ee0c67383be@linaro.org/

> You've asked me to test the Clearfog GT-8k change - which is something
> that won't happen for a while as I don't have the hardware to hand at
> my current location, nor remotely.
> 
> What I can do is poke about in the u-boot sources I have for that
> board and see# whether it's doing anything with those node paths. Off
> the top of my# head, given what the board is, I think it's highly
> unlikely though,# but I will check - possibly tomorrow.

Ok, if U-Boot is the only bootloader, I also looked through the upstream
board source files and only noticed any fixups for MOX. I don't know
what these boards ship with, and how far that is from mainline U-Boot.



More information about the linux-arm-kernel mailing list