Re: [PATCH v2 0/5] Add iProc MDIO and Cygnus PCIe PHY support
From: Ray Jui
Date: Tue Sep 01 2015 - 17:14:25 EST
Hi Arnd,
Please help to advise if the following changes make sense to you. There
does not seem to be a maintainer for drivers/bus/* and Florian mentioned
that you "may" be able to help to pull in changes for ARM SoCs related
changes under drivers/bus/*.
The problem I'm trying to solve:
Some iProc based SoCs (like Cygnus) has an internal MDIO based bus
interface that is used to communicate with various types of Serdes/PHYs
including PCIe, Ethernet, and etc. However, there's only one MDIO
interface per SoC so the access needs to be serialized and protected in
software
The solution:
1. According to convention, Ethernet PHYs should be in drivers/net/phy/*
and PCIe (and other) PHYs should be in drivers/phy/*
2. Kishon suggested putting the low-level MDIO interface/bus driver in
drivers/bus/* which I also think is more proper than leaving it any
where else
3. Both PCIe PHY driver and Ethernet PHY driver call specific iproc
based MDIO API to access their PHYs (e.g., iproc_mdio_write and
iproc_mdio_read).
There are some changes/fixes I need to make to both the MDIO bus driver
and PCIe PHY driver so there will be a v3 of this patchset. But before I
do that, I'd like to cross check with you and make sure the way how I
partition these drivers are acceptable.
Thanks,
Ray
On 5/21/2015 6:07 PM, Ray Jui wrote:
> This patch series adds support for the Cygnus PCIe PHY and support of the
> MDC/MDIO bus interface found in various iProc based of SoCs. The iProc
> MDC/MDIO bus interface can be used by the host processor to communicate with
> various internal Serdes/PHYs including Ethernet, PCIe, USB, etc.
>
> This patch series is based on Linux v4.1-rc4 and is avaliable in:
> https://github.com/Broadcom/cygnus-linux/tree/cygnus-pcie-phy-v2
>
> Changes from v1:
> - Move the MDC/MDIO bus driver from drivers/phy/* to drivers/bus/*
> - Make the PCIe PHY device node child node of the MDIO bus
> - Change the PCIe PHY driver to tristate so it can be compiled as a module
> - Other minor changes
>
> Ray Jui (5):
> dt_bindings: Add iProc MDC/MDIO interface binding
> phy: iproc-mdio: Initial iProc MDC/MDIO support
> phy: cygnus: pcie: Define DT binding
> phy: cygnus: pcie: Add Cygnus PCIe PHY support
> ARM: dts: enable PCIe PHY support for Cygnus
>
> .../devicetree/bindings/bus/brcm,iproc-mdio.txt | 21 ++
> .../bindings/phy/brcm,cygnus-pcie-phy.txt | 34 ++
> arch/arm/boot/dts/bcm-cygnus.dtsi | 20 ++
> drivers/bus/Kconfig | 12 +
> drivers/bus/Makefile | 1 +
> drivers/bus/iproc-mdio-bus.c | 255 +++++++++++++++
> drivers/phy/Kconfig | 15 +
> drivers/phy/Makefile | 1 +
> drivers/phy/phy-cygnus-pcie.c | 340 ++++++++++++++++++++
> include/linux/iproc_mdio_bus.h | 22 ++
> 10 files changed, 721 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/bus/brcm,iproc-mdio.txt
> create mode 100644 Documentation/devicetree/bindings/phy/brcm,cygnus-pcie-phy.txt
> create mode 100644 drivers/bus/iproc-mdio-bus.c
> create mode 100644 drivers/phy/phy-cygnus-pcie.c
> create mode 100644 include/linux/iproc_mdio_bus.h
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/