public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Parvathi Pudi <parvathi@couthit.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Andrew Davis <afd@ti.com>, nm <nm@ti.com>,
	 Vignesh Raghavendra <vigneshr@ti.com>,
	 Kevin Hilman <khilman@baylibre.com>, rogerq <rogerq@kernel.org>,
	 tony <tony@atomide.com>, robh <robh@kernel.org>,
	 krzk+dt <krzk+dt@kernel.org>, conor+dt <conor+dt@kernel.org>,
	 richardcochran <richardcochran@gmail.com>,
	 aaro koskinen <aaro.koskinen@iki.fi>,
	andreas <andreas@kemnade.info>,
	 linux-omap <linux-omap@vger.kernel.org>,
	 devicetree <devicetree@vger.kernel.org>,
	 linux-kernel <linux-kernel@vger.kernel.org>,
	 netdev <netdev@vger.kernel.org>,
	danishanwar <danishanwar@ti.com>,  pratheesh <pratheesh@ti.com>,
	j-rameshbabu <j-rameshbabu@ti.com>,  praneeth <praneeth@ti.com>,
	srk <srk@ti.com>, rogerq <rogerq@ti.com>,
	 krishna <krishna@couthit.com>, mohan <mohan@couthit.com>,
	 pmohan <pmohan@couthit.com>, basharath <basharath@couthit.com>,
	 Murali Karicheri <m-karicheri2@ti.com>,
	 Parvathi Pudi <parvathi@couthit.com>
Subject: Re: [PATCH v4 2/2] arm: dts: ti: Adds support for AM335x and AM437x
Date: Tue, 24 Feb 2026 13:39:45 +0530 (IST)	[thread overview]
Message-ID: <760333566.501717.1771920585648.JavaMail.zimbra@couthit.local> (raw)
In-Reply-To: <2a977fd4-910a-4838-9ed6-97224d6ab775@lunn.ch>

Hi,

>> On the AM335x board, the CPSW MDIO and PRUSS MDIO signals are routed to the same
>> physical
>> pins (as shown in the schematic, see page 10 “MII_MUX” in
>> tmdxice3359_sch_3h0013_v2_1a.pdf
>> from https://www.ti.com/lit/zip/TIDR336 ). Because of this shared routing, the
>> pinmux
>> configuration applied by U-Boot for CPSW MDIO remains active even if the CPSW
>> MDIO node is
>> later disabled in Linux, and Linux does not automatically revert the pins to
>> their reset state.
> 
> It is generally a bad idea to rely on the bootloader. I would make the
> CPSW MDIO configure the pins how it needs it. The PRUSS MDIO should
> also configure the pins how it needs them. However, it is not as
> simple as that...
> 

On AM335x, the MDIO interface is selected by a hardware jumper before the
bootloader runs. The selection is latched in hardware, so only one MDIO
controller (CPSW or PRUSS) is active at a time.

Since the hardware choice is fixed prior to Linux boot, we decided to ensure
in U-Boot that the pins are configured according to the selected hardware latch.
Linux still configures the active MDIO controller as required via its DT and
pinctrl settings. The U‑Boot change ensures a clean initial state that matches
the hardware latched configuration, and we have this prepared as a patch that
will be submitted to mainline U‑Boot shortly.

> Looking at the schematic, what you have is ugly. You literally wire
> the outputs together, without a hardware mux. For MDC you assume one
> is Hi-Z, while the other drives the line. For MDIO it does not matter,
> both are inputs. so Hi-Z.
> 

Although the schematic shows the signals tied together without an explicit mux,
the hardware jumper selects RMII (CPSW) or MII (PRUSS) before boot. Only the
selected block is enabled, and the other remains inactive, so the lines are never
driven concurrently.

> I actually think you might need to represent this in Linux, with
> something i would call a pinmux-mux. You give it two sets of pinmux
> configurations. The active device claims the mux and gets it to set
> the two sets of pinmux as needed. Also, just setting the pinmux to
> GPIO is not sufficient, you also need to ensure the GPIO is configured
> for input, so the lines go Hi-Z. Often pinmux and GPIO controllers are
> interconnected, so the pinmux subsystem might be able to do that for
> you.
> 
> I don't know if a pinmux-mux already exists in Linux. You probably
> want to ask on the pinmux mailing list, or they might have a different
> idea how to cleanly do this.
> 
>	Andrew

In this case, the selection is static and determined by hardware via a jumper,
not switchable at runtime. Linux reflects this by choosing the Device Tree
configuration corresponding to the latched jumper, it enables the selected
MDIO controller and sets up its pinmux, while the other MDIO controller
remains disabled.

We will update the patches by removing the CPSW pin reset configuration in
ICSS context and post the next version shortly.

Thanks and Regards,
Parvathi

  reply	other threads:[~2026-02-24  8:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-05 16:21 [PATCH v4 0/2] Add support for ICSSM Ethernet on AM57x, AM437x, and AM335x Parvathi Pudi
2026-01-05 16:21 ` [PATCH v4 1/2] arm: dts: ti: Adds device tree nodes for PRU Cores, IEP and eCAP modules of PRU-ICSS2 Instance Parvathi Pudi
2026-01-05 16:21 ` [PATCH v4 2/2] arm: dts: ti: Adds support for AM335x and AM437x Parvathi Pudi
2026-01-05 19:22   ` Andrew Davis
2026-01-08 12:02     ` Parvathi Pudi
2026-01-16 12:47       ` Parvathi Pudi
2026-01-16 13:55         ` Andrew Lunn
2026-02-24  8:09           ` Parvathi Pudi [this message]
2026-02-24  8:48   ` H. Nikolaus Schaller
2026-02-26  8:28     ` Parvathi Pudi

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=760333566.501717.1771920585648.JavaMail.zimbra@couthit.local \
    --to=parvathi@couthit.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=afd@ti.com \
    --cc=andreas@kemnade.info \
    --cc=andrew@lunn.ch \
    --cc=basharath@couthit.com \
    --cc=conor+dt@kernel.org \
    --cc=danishanwar@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=j-rameshbabu@ti.com \
    --cc=khilman@baylibre.com \
    --cc=krishna@couthit.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=m-karicheri2@ti.com \
    --cc=mohan@couthit.com \
    --cc=netdev@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=pmohan@couthit.com \
    --cc=praneeth@ti.com \
    --cc=pratheesh@ti.com \
    --cc=richardcochran@gmail.com \
    --cc=robh@kernel.org \
    --cc=rogerq@kernel.org \
    --cc=rogerq@ti.com \
    --cc=srk@ti.com \
    --cc=tony@atomide.com \
    --cc=vigneshr@ti.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