-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pramod Kumar says: ==================== Add MDIO bus multiplexer support for iProc SoCs Broadcom iProc based SoCs use a MDIO bus multiplexer where child buses could be internal as well external to SoCs. These buses could supports MDIO transaction compatible to C-22/C-45. Broadcom MDIO bus multiplexer is an integrated multiplexer where child bus selection and mdio transaction logic lies inside multiplexer itself. To accommodate this multiplexer in existing mux framework below changes were required- 1. Passed MDIO parent bus via mdio_mux_init to MDIO mux framework. This patch set includes MDIO bus multiplexer driver along with above framework change. It includes one external bus node having Ethernet PHY attached and two internal bus node holding PCIe PHYs. This patch series is based on v4.7-rc1 and is available from github- repo: https://github.com/Broadcom/arm64-linux.git branch:mdio-mux-v5 -Changes from v4: - disabled PCIe PHYs from dtsi and enabled in dts file. -Changes from v3: - Unregister and free the parent MDIO bus. - rebased on net-next/master branch. Reason for resend: -Rebased on v4.7-rc1 Changes from v2: -Addressed Rob's comments in this patch regarding typo/grammers. -Addressed David's comments regarding local variables order. -Removed property "mdio-integrated-mux" and used mdiobus_register() in place of of_mdiobus_regsiter(). -removed usage of IS_ERR_OR_NULL to IS_ERR in PCIe PHY driver. Changes from v1: - stop using "brcm,is_c45" from bus node as suggested by Andrew. MDIO PHY driver will logically OR MII_ADDR_C45 into the address when issues any C45 MDIO read/write transaction. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Showing
15 changed files
with
550 additions
and
15 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
Documentation/devicetree/bindings/net/brcm,mdio-mux-iproc.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
Properties for an MDIO bus multiplexer found in Broadcom iProc based SoCs. | ||
|
||
This MDIO bus multiplexer defines buses that could be internal as well as | ||
external to SoCs and could accept MDIO transaction compatible to C-22 or | ||
C-45 Clause. When child bus is selected, one needs to select these two | ||
properties as well to generate desired MDIO transaction on appropriate bus. | ||
|
||
Required properties in addition to the generic multiplexer properties: | ||
|
||
MDIO multiplexer node: | ||
- compatible: brcm,mdio-mux-iproc. | ||
|
||
Every non-ethernet PHY requires a compatible so that it could be probed based | ||
on this compatible string. | ||
|
||
Additional information regarding generic multiplexer properties can be found | ||
at- Documentation/devicetree/bindings/net/mdio-mux.txt | ||
|
||
|
||
for example: | ||
mdio_mux_iproc: mdio-mux@6602023c { | ||
compatible = "brcm,mdio-mux-iproc"; | ||
reg = <0x6602023c 0x14>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
mdio@0 { | ||
reg = <0x0>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
pci_phy0: pci-phy@0 { | ||
compatible = "brcm,ns2-pcie-phy"; | ||
reg = <0x0>; | ||
#phy-cells = <0>; | ||
}; | ||
}; | ||
|
||
mdio@7 { | ||
reg = <0x7>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
pci_phy1: pci-phy@0 { | ||
compatible = "brcm,ns2-pcie-phy"; | ||
reg = <0x0>; | ||
#phy-cells = <0>; | ||
}; | ||
}; | ||
mdio@10 { | ||
reg = <0x10>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
gphy0: eth-phy@10 { | ||
reg = <0x10>; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
Documentation/devicetree/bindings/phy/brcm,mdio-mux-bus-pci.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
* Broadcom NS2 PCIe PHY binding document | ||
|
||
Required bus properties: | ||
- reg: MDIO Bus number for the MDIO interface | ||
- #address-cells: must be 1 | ||
- #size-cells: must be 0 | ||
|
||
Required PHY properties: | ||
- compatible: should be "brcm,ns2-pcie-phy" | ||
- reg: MDIO Phy ID for the MDIO interface | ||
- #phy-cells: must be 0 | ||
|
||
This is a child bus node of "brcm,mdio-mux-iproc" node. | ||
|
||
Example: | ||
|
||
mdio@0 { | ||
reg = <0x0>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
pci_phy0: pci-phy@0 { | ||
compatible = "brcm,ns2-pcie-phy"; | ||
reg = <0x0>; | ||
#phy-cells = <0>; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.