From: Andrew Lunn <andrew@lunn.ch>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Marcin Wojtas <mw@semihalf.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Graeme Gregory <graeme.gregory@linaro.org>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"<netdev@vger.kernel.org>" <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Russell King - ARM Linux <linux@arm.linux.org.uk>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Antoine T?nart <antoine.tenart@free-electrons.com>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Gregory CLEMENT <gregory.clement@free-electrons.com>,
Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
Nadav Haklai <nadavh@marvell.com>,
Neta Zur Hershkovits <neta@marvell.com>,
Grzegorz Jaszczyk <jaz@semihalf.com>,
Tomasz Nowicki <tn@semihalf.com>,
Hanjun Guo <hanjun.guo@linaro.org>,
Sudeep Holla <sudeep.holla@arm.com>
Subject: Re: [net-next: PATCH 0/8] Armada 7k/8k PP2 ACPI support
Date: Sun, 21 Jan 2018 02:08:40 +0100 [thread overview]
Message-ID: <20180121010840.GB1217@lunn.ch> (raw)
In-Reply-To: <20180120195246.GC27654@lahna.fi.intel.com>
> I'm not familiar with MDIO bus but an alternative to GeneriSerialBus
> would be to follow what SDIO is doing, e.g have the PHY devices listed
> below the MDIO controller and use _ADR to describe their "address" on
> that bus. You can see how _ADR applies to SDIO bus from ACPI spec.
Hi Mika
SDIO is not a serial bus, well it can be in its simplest form, but
high speed implementations have 4 data lines. So i can understand them
not using GenericSerialBus.
MDIO is a serial bus, very similar to SPI, I2C, and UART.
> If you go with the SDIO way then each PHY is described as normal ACPI
> device and you can use ACPI _HID/_CID to match the device to the
> corresponding driver.
Just some background here. If you have a plain PHY as a device on an
MDIO bus, you don't need to match it to a driver within ACPI.
Registers 2 and 3 contain a vendor and product ID. That is what it
used to match the device to the driver.
What you might need to know is the protocol to talk on the bus. Most
devices use clause 22 protocol. A few devices are clause 45. 22 is the
default in Linux, and you need to indicate if 45 should be used. You
can also indicate 22.
It gets more complex when the device on the bus is not a PHY. It is a
generic bus, you can connect anything to it. Ethernet switches can be
on the bus. They generally cannot be identified using registers 2 and
3. So you do need to match the device to the driver. Most do have ID
registers, so the driver can work out what specific device is on the
bus. However, Marvell moved the ID registers on there newer generation
of devices, so we need to give the driver a hint where to look. So in
device tree, we have two different compatible string.
Broadcom really do use it as a generic bus. They have their USB PHYs
and PCIE PHYs on an MDIO bus. In DT, they have compatible strings to
match the device to the driver, as normal.
We need to ensure what we define for ACPI has the same level of
flexibility.
Andrew
next prev parent reply other threads:[~2018-01-21 1:09 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-18 9:17 Marcin Wojtas
2017-12-18 9:17 ` [net-next: PATCH 1/8] device property: Introduce fwnode_get_mac_address() Marcin Wojtas
2017-12-18 9:17 ` [net-next: PATCH 2/8] device property: Introduce fwnode_get_phy_mode() Marcin Wojtas
2017-12-18 9:17 ` [net-next: PATCH 3/8] mdio_bus: Introduce fwnode MDIO helpers Marcin Wojtas
2017-12-18 9:18 ` [net-next: PATCH 4/8] net: mvmdio: add ACPI support Marcin Wojtas
2017-12-18 9:18 ` [net-next: PATCH 5/8] net: mvpp2: simplify maintaining enabled ports' list Marcin Wojtas
2017-12-18 9:18 ` [net-next: PATCH 6/8] net: mvpp2: use device_*/fwnode_* APIs instead of of_* Marcin Wojtas
2017-12-18 9:18 ` [net-next: PATCH 7/8] net: mvpp2: handle PHY with its fwnode Marcin Wojtas
2017-12-18 9:18 ` [net-next: PATCH 8/8] net: mvpp2: enable ACPI support in the driver Marcin Wojtas
2017-12-18 9:40 ` [net-next: PATCH 0/8] Armada 7k/8k PP2 ACPI support Ard Biesheuvel
2017-12-18 15:49 ` Marcin Wojtas
2018-01-03 11:00 ` Graeme Gregory
2018-01-03 11:12 ` Marcin Wojtas
2018-01-03 12:47 ` Andrew Lunn
2018-01-03 13:13 ` Marcin Wojtas
2018-01-03 13:33 ` Andrew Lunn
2018-01-03 13:36 ` Marcin Wojtas
2018-01-04 16:09 ` Graeme Gregory
2018-01-04 16:20 ` Andrew Lunn
2018-01-08 14:45 ` Graeme Gregory
2018-01-08 14:53 ` Andrew Lunn
2018-01-08 15:14 ` Graeme Gregory
2018-01-08 15:42 ` Andrew Lunn
2018-01-08 17:17 ` Marcin Wojtas
2018-01-09 10:19 ` Graeme Gregory
2018-01-09 10:22 ` Marcin Wojtas
2018-01-09 13:00 ` Andrew Lunn
2018-01-18 12:31 ` Lorenzo Pieralisi
2018-01-18 13:00 ` Andrew Lunn
2018-01-19 18:07 ` Marcin Wojtas
2018-01-19 18:53 ` Andrew Lunn
2018-01-20 19:52 ` Mika Westerberg
2018-01-21 1:08 ` Andrew Lunn [this message]
2018-01-21 10:27 ` Mika Westerberg
2018-01-21 16:13 ` Andrew Lunn
2018-01-21 17:13 ` Ard Biesheuvel
2018-01-21 18:55 ` Andrew Lunn
2017-12-18 14:09 ` Rafael J. Wysocki
2017-12-19 18:48 ` David Miller
2017-12-19 18:59 ` Marcin Wojtas
2017-12-19 20:46 ` Andrew Lunn
2017-12-19 23:13 ` Marcin Wojtas
2017-12-21 19:21 ` Antoine Tenart
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=20180121010840.GB1217@lunn.ch \
--to=andrew@lunn.ch \
--cc=antoine.tenart@free-electrons.com \
--cc=ard.biesheuvel@linaro.org \
--cc=davem@davemloft.net \
--cc=ezequiel.garcia@free-electrons.com \
--cc=f.fainelli@gmail.com \
--cc=graeme.gregory@linaro.org \
--cc=gregory.clement@free-electrons.com \
--cc=hanjun.guo@linaro.org \
--cc=jaz@semihalf.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=lorenzo.pieralisi@arm.com \
--cc=mika.westerberg@linux.intel.com \
--cc=mw@semihalf.com \
--cc=nadavh@marvell.com \
--cc=neta@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=sudeep.holla@arm.com \
--cc=thomas.petazzoni@free-electrons.com \
--cc=tn@semihalf.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
all inboxes | Powered by JetHome®