Re: [PATCH net-next 2/8] dt-bindings: net: lan9645x: add LAN9645X switch bindings
flat view
From: Jens Emil Schulz Ostergaard <hidden>
Date: 2026-03-05 13:09:00
Also in:
linux-devicetree, lkml
On Wed, 2026-03-04 at 19:06 +0000, Conor Dooley wrote:
On Wed, Mar 04, 2026 at 06:14:57PM +0200, Vladimir Oltean wrote:quoted
On Wed, Mar 04, 2026 at 05:10:11PM +0100, Jens Emil Schulz Ostergaard wrote:quoted
On Tue, 2026-03-03 at 18:56 +0000, Conor Dooley wrote:quoted
On Tue, Mar 03, 2026 at 01:22:28PM +0100, Jens Emil Schulz Østergaard wrote:quoted
+examples: + - | + soc { + #address-cells = <1>; + #size-cells = <0>; + + ethernet-switch@0 { + reg = <0>;Also, this is an odd example, why are you at address 0 on a "soc" bus, which usually means that this device on an AXI/AHB bus, and 0 is very unusual for that. Obviously the example doesn't have to match the real user, but this stands out. I may have some follow up questions I think depending on your answer.The intended way to bind this driver is via a parent MFD driver which sets up the SPI register protocol, initiates regmaps and distributes them to child devices (like this DSA driver). Similar to mscc,vsc7512 in drivers/mfd/ocelot-spi.c. This MFD would be the soc node. All child nodes perform register IO over spi, using the regmaps requested from this parent so I think the addresses on the bus are purely ornamental. Should I write the smallest register address in all regions used by the DSA driver instead?They are not ornamental, they should be the same addresses you'd put if Linux had direct access to the SoC interconnect for MMIO, rather than to an SPI bridge to the SoC interconnect. Or at least I don't see why it wouldn't be that way.I don't mind if they're made up addresses, but the example should be realistic. 0 is likely not realistic, but if it was 0x4000_0000 when the real thing is 0x8123_1234 then I don't really care. Since the parent is not actually a soc bus, can't you just remove this fake parent entirely, like the ocelot switch example does? Or insert something more genuine, like: spi { #address-cells = <1>; #size-cells = <0>; soc@0 { compatible = "microchip,lan96455s"; reg = <0>; #address-cells = <1>; #size-cells = <1>; ethernet-switch@4000000 { reg = <4000000 44>;
I will go with the genuine example. I was not sure if it was appropriate to mention the spi node from here. But this is what it would look like with the mfd driver. I will also fix the addresses. Thanks, Emil