From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [PATCH v6 net-next 06/13] dt-bindings: net: ti: add new cpsw switch driver bindings Date: Tue, 12 Nov 2019 08:22:30 -0800 Message-ID: <20191112162230.GK5610@atomide.com> References: <20191109151525.18651-1-grygorii.strashko@ti.com> <20191109151525.18651-7-grygorii.strashko@ti.com> <20191111172652.GV5610@atomide.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Grygorii Strashko Cc: Florian Fainelli , netdev@vger.kernel.org, Ilias Apalodimas , Andrew Lunn , "David S . Miller" , Ivan Khoronzhuk , Jiri Pirko , Sekhar Nori , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Murali Karicheri , Ivan Vecera , Rob Herring , devicetree@vger.kernel.org List-Id: linux-omap@vger.kernel.org Hi, * Grygorii Strashko [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