Add PCIe phy driver for some Mediatek SoCs
Subsystems (3)
cover Add PCIe phy driver for some Mediatek SoCs
Hi,
This patch series add PCIe phy driver and related dt-binding file for Mediatek mt7623 SoCs families.
Changes since v1:
- revise binding document:
drop 'status' properties.
add a description to 'phy-switch' property and add vendor prefix.
Ryder Lee (2):
phy: add PCIe PHY driver for mt7623 SoCs families
dt-bindings: phy: Add documentation for Mediatek PCIe PHY
.../devicetree/bindings/phy/phy-mt7623-pcie.txt | 63 +++++ drivers/phy/Kconfig | 9 + drivers/phy/Makefile | 1 + drivers/phy/phy-mt7623-pcie.c | 290 +++++++++++++++++++++ 4 files changed, 363 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/phy-mt7623-pcie.txt create mode 100644 drivers/phy/phy-mt7623-pcie.c
Signature · 1 line
1.9.1
PATCH 1/2 phy: add PCIe PHY driver for mt7623 SoCs families
support PCIe PHY of MT7623 SoCs families
--- drivers/phy/Kconfig | 9 ++ drivers/phy/Makefile | 1 + drivers/phy/phy-mt7623-pcie.c | 290 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 300 insertions(+) create mode 100644 drivers/phy/phy-mt7623-pcie.c
drivers/phy/Kconfig +9 -0
@@ -518,4 +518,13 @@ config PHY_NSP_USB3 help Enable this to support the Broadcom Northstar plus USB3 PHY. If unsure, say N. + +config PHY_MT7623_PCIE + tristate "Mediatek PCIe PHY driver for MT7623 SoC families" + depends on ARCH_MEDIATEK && OF + select GENERIC_PHY + select MFD_SYSCON + help + Say 'Y' here to add support for Mediatek PCIe PHY driver which + can be found on the MT7623 SoC families. endmenu
drivers/phy/Makefile +1 -0
@@ -63,3 +63,4 @@ obj-$(CONFIG_ARCH_TEGRA) += tegra/ obj-$(CONFIG_PHY_NS2_PCIE) += phy-bcm-ns2-pcie.o obj-$(CONFIG_PHY_MESON8B_USB2) += phy-meson8b-usb2.o obj-$(CONFIG_PHY_NSP_USB3) += phy-bcm-nsp-usb3.o +obj-$(CONFIG_PHY_MT7623_PCIE) += phy-mt7623-pcie.o
drivers/phy/phy-mt7623-pcie.c new file +290 -0
290 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 2/2 dt-bindings: phy: Add documentation for Mediatek PCIe PHY
In reply to Ryder LeeAdd documentation for PCIe PHY available in MT7623 series SoCs.
--- .../devicetree/bindings/phy/phy-mt7623-pcie.txt | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/phy-mt7623-pcie.txt
Documentation/devicetree/bindings/phy/phy-mt7623-pcie.txt new file +63 -0
@@ -0,0 +1,63 @@ +Mediatek MT7623 PCIe PHY +----------------------- + +Required properties: + - compatible: Should contain "mediatek,mt7623-pcie-phy". + - reg: Base address and length of the registers. + - clocks: Must contain an entry in clock-names. + See ../clocks/clock-bindings.txt for details. + - clock-names: Must be "pciephya_ref" + - #phy-cells: Must be 0. + +Optional properties: + - mediatek,phy-switch: A phandle to the system controller, used to + switch the PHY on PCIe port2 which is shared with USB u3phy2. + +Example: + + pcie0_phy: pcie-phy at 1a149000 { + compatible = "mediatek,mt7623-pcie-phy"; + reg = <0 0x1a149000 0 0x1000>; + clocks = <&clk26m>; + clock-names = "pciephya_ref"; + #phy-cells = <0>; + }; + + pcie1_phy: pcie-phy at 1a14a000 { + compatible = "mediatek,mt7623-pcie-phy"; + reg = <0 0x1a14a000 0 0x1000>; + clocks = <&clk26m>; + clock-names = "pciephya_ref"; + #phy-cells = <0>; + }; + + pcie2_phy: pcie-phy at 1a244000 { + compatible = "mediatek,mt7623-pcie-phy"; + reg = <0 0x1a244000 0 0x1000>; + clocks = <&clk26m>; + clock-names = "pciephya_ref"; + #phy-cells = <0>; + + mediatek,phy-switch = <&hifsys>; + }; + +Specifying phy control of devices +--------------------------------- + +Device nodes should specify the configuration required in their "phys" +property, containing a phandle to the phy node and phy-names. + +Example: + +#include <dt-bindings/phy/phy.h> + +pcie: pcie at 1a140000 { + ... + pcie at 1,0 { + ... + phys = <&pcie0_phy>; + phy-names = "pcie-phy0"; + } + ... +}; +
Signature · 1 line
1.9.1
Re: [PATCH v1 2/2] dt-bindings: phy: Add documentation for Mediatek PCIe PHY
Quoted 7 lines · Ryder Lee
Add documentation for PCIe PHY available in MT7623 series SoCs.
Signed-off-by Ryder Lee <[email protected]>--- .../devicetree/bindings/phy/phy-mt7623-pcie.txt | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/phy-mt7623-pcie.txt