Subject: Re: [PATCH v6 net-next 06/13] dt-bindings: net: ti: add new cpsw switch driver bindings

From: Tony Lindgren <[email-masked]>
Date: Tue, 12 Nov 2019 08:22:30 -0800

Hi,

* Grygorii Strashko <[email-masked]> [191112 09:54]:
> No, sorry I do not agree. The MDIO is inseparable part of CPSW and it's enabled when CPSW is enabled
> (on interconnect level), more over I want to get rid of platform device in MDIO for most of the cases
> as it only introduces boot/probing complexity.

Well the fact that mdio is enabled at the interconnect level is why
I think the cpsw child modules are independent components :)

So I did the following quick test on pocketbeagle with Linux next,
it has no Ethernet wired up, and by default we have ethernet@0
set to status = "disabled".

Manually enable the target module at 0x4a100000:
# echo on > /sys/devices/platform/ocp/4a000000.interconnect/\
4a000000.interconnect:segment@0/4a101200.target-module/power/control

Dump out mdio registers at offset 0x1000:
# rwmem 0x4a101000+0x100
0x4a101000 = 0x40070106
0x4a101004 = 0x810000ff
0x4a101008 = 0000000000
0x4a10100c = 0000000000
0x4a101010 = 0000000000
0x4a101014 = 0000000000
0x4a101018 = 0000000000
...

So yup, it seems quite independent of the other child devices
on the same interconnect target mdoule. I'm quessing it's the
same story for other modules like cppi_dma and so on, this
should be easy to check.

Hmm and isn't the some version of mdio also used stuffed into
davinci_emac and netcp too?

Anyways, up to you. But my experience is that having separate
driver modules is the way to go than trying to treat any TI
"subsystem" as a single device. This is because the child modules
tend to get updated and changed and moved around over time.

Regards,

Tony