Commit c33ffdb7 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'phy-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy

Pull phy updates from Vinod Koul:
 "New Support
   - Samsung Exynos gs101 drd combo phy
   - Qualcomm SC8180x USB uniphy, IPQ9574 QMP PCIe phy
   - Airoha EN7581 PCIe phy
   - Freescale i.MX8Q HSIO SerDes phy
   - Starfive jh7110 dphy tx

  Updates:
   - Resume support for j721e-wiz driver
   - Updates to Exynos usbdrd driver
   - Support for optional power domains in g12a usb2-phy driver
   - Debugfs support and updates to zynqmp driver"

* tag 'phy-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (56 commits)
  phy: airoha: Add dtime and Rx AEQ IO registers
  dt-bindings: phy: airoha: Add dtime and Rx AEQ IO registers
  dt-bindings: phy: rockchip-emmc-phy: Convert to dtschema
  dt-bindings: phy: qcom,qmp-usb: fix spelling error
  phy: exynos5-usbdrd: support Exynos USBDRD 3.1 combo phy (HS & SS)
  phy: exynos5-usbdrd: convert Vbus supplies to regulator_bulk
  phy: exynos5-usbdrd: convert (phy) register access clock to clk_bulk
  phy: exynos5-usbdrd: convert core clocks to clk_bulk
  phy: exynos5-usbdrd: support isolating HS and SS ports independently
  dt-bindings: phy: samsung,usb3-drd-phy: add gs101 compatible
  phy: core: Fix documentation of of_phy_get
  phy: starfive: Correct the dphy configure process
  phy: zynqmp: Add debugfs support
  phy: zynqmp: Take the phy mutex in xlate
  phy: zynqmp: Only wait for PLL lock "primary" instances
  phy: zynqmp: Store instance instead of type
  phy: zynqmp: Enable reference clock correctly
  phy: cadence-torrent: Check return value on register read
  phy: Fix the cacography in phy-exynos5250-usb2.c
  phy: phy-rockchip-samsung-hdptx: Select CONFIG_MFD_SYSCON
  ...
parents ad7b0b7b 2a011c3c
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/phy/airoha,en7581-pcie-phy.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Airoha EN7581 PCI-Express PHY
maintainers:
- Lorenzo Bianconi <lorenzo@kernel.org>
description:
The PCIe PHY supports physical layer functionality for PCIe Gen2/Gen3 port.
properties:
compatible:
const: airoha,en7581-pcie-phy
reg:
items:
- description: PCIE analog base address
- description: PCIE lane0 base address
- description: PCIE lane1 base address
- description: PCIE lane0 detection time base address
- description: PCIE lane1 detection time base address
- description: PCIE Rx AEQ base address
reg-names:
items:
- const: csr-2l
- const: pma0
- const: pma1
- const: p0-xr-dtime
- const: p1-xr-dtime
- const: rx-aeq
"#phy-cells":
const: 0
required:
- compatible
- reg
- reg-names
- "#phy-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/phy/phy.h>
soc {
#address-cells = <2>;
#size-cells = <2>;
phy@11e80000 {
compatible = "airoha,en7581-pcie-phy";
#phy-cells = <0>;
reg = <0x0 0x1fa5a000 0x0 0xfff>,
<0x0 0x1fa5b000 0x0 0xfff>,
<0x0 0x1fa5c000 0x0 0xfff>,
<0x0 0x1fc10044 0x0 0x4>,
<0x0 0x1fc30044 0x0 0x4>,
<0x0 0x1fc15030 0x0 0x104>;
reg-names = "csr-2l", "pma0", "pma1",
"p0-xr-dtime", "p1-xr-dtime",
"rx-aeq";
};
};
......@@ -41,6 +41,9 @@ properties:
Phandle to a regulator that provides power to the PHY. This
regulator will be managed during the PHY power on/off sequence.
power-domains:
maxItems: 1
required:
- compatible
- reg
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/phy/fsl,imx8qm-hsio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale i.MX8QM SoC series High Speed IO(HSIO) SERDES PHY
maintainers:
- Richard Zhu <hongxing.zhu@nxp.com>
properties:
compatible:
enum:
- fsl,imx8qm-hsio
- fsl,imx8qxp-hsio
reg:
items:
- description: Base address and length of the PHY block
- description: HSIO control and status registers(CSR) of the PHY
- description: HSIO CSR of the controller bound to the PHY
- description: HSIO CSR for MISC
reg-names:
items:
- const: reg
- const: phy
- const: ctrl
- const: misc
"#phy-cells":
const: 3
description:
The first defines lane index.
The second defines the type of the PHY refer to the include phy.h.
The third defines the controller index, indicated which controller
is bound to the lane.
clocks:
minItems: 5
maxItems: 14
clock-names:
minItems: 5
maxItems: 14
fsl,hsio-cfg:
description: |
Specifies the use case of the HSIO module in the hardware design.
Regarding the design of i.MX8QM HSIO subsystem, HSIO module can be
confiured as following three use cases.
+---------------------------------------+
| | i.MX8QM |
|------------------|--------------------|
| | Lane0| Lane1| Lane2|
|------------------|------|------|------|
| pciea-x2-sata | PCIEA| PCIEA| SATA |
|------------------|------|------|------|
| pciea-x2-pcieb | PCIEA| PCIEA| PCIEB|
|------------------|------|------|------|
| pciea-pcieb-sata | PCIEA| PCIEB| SATA |
+---------------------------------------+
$ref: /schemas/types.yaml#/definitions/string
enum: [ pciea-x2-sata, pciea-x2-pcieb, pciea-pcieb-sata]
default: pciea-pcieb-sata
fsl,refclk-pad-mode:
description:
Specifies the mode of the refclk pad used. INPUT(PHY refclock is
provided externally via the refclk pad) or OUTPUT(PHY refclock is
derived from SoC internal source and provided on the refclk pad).
This property not exists means unused(PHY refclock is derived from
SoC internal source).
$ref: /schemas/types.yaml#/definitions/string
enum: [ input, output, unused ]
default: unused
power-domains:
minItems: 1
maxItems: 2
required:
- compatible
- reg
- reg-names
- "#phy-cells"
- clocks
- clock-names
- fsl,hsio-cfg
allOf:
- if:
properties:
compatible:
contains:
enum:
- fsl,imx8qxp-hsio
then:
properties:
clock-names:
items:
- const: pclk0
- const: apb_pclk0
- const: phy0_crr
- const: ctl0_crr
- const: misc_crr
power-domains:
maxItems: 1
- if:
properties:
compatible:
contains:
enum:
- fsl,imx8qm-hsio
then:
properties:
clock-names:
items:
- const: pclk0
- const: pclk1
- const: apb_pclk0
- const: apb_pclk1
- const: pclk2
- const: epcs_tx
- const: epcs_rx
- const: apb_pclk2
- const: phy0_crr
- const: phy1_crr
- const: ctl0_crr
- const: ctl1_crr
- const: ctl2_crr
- const: misc_crr
power-domains:
minItems: 2
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/imx8-clock.h>
#include <dt-bindings/clock/imx8-lpcg.h>
#include <dt-bindings/firmware/imx/rsrc.h>
#include <dt-bindings/phy/phy-imx8-pcie.h>
phy@5f1a0000 {
compatible = "fsl,imx8qxp-hsio";
reg = <0x5f1a0000 0x10000>,
<0x5f120000 0x10000>,
<0x5f140000 0x10000>,
<0x5f160000 0x10000>;
reg-names = "reg", "phy", "ctrl", "misc";
clocks = <&phyx1_lpcg IMX_LPCG_CLK_0>,
<&phyx1_lpcg IMX_LPCG_CLK_4>,
<&phyx1_crr1_lpcg IMX_LPCG_CLK_4>,
<&pcieb_crr3_lpcg IMX_LPCG_CLK_4>,
<&misc_crr5_lpcg IMX_LPCG_CLK_4>;
clock-names = "pclk0", "apb_pclk0", "phy0_crr", "ctl0_crr", "misc_crr";
power-domains = <&pd IMX_SC_R_SERDES_1>;
#phy-cells = <3>;
fsl,hsio-cfg = "pciea-pcieb-sata";
fsl,refclk-pad-mode = "input";
};
...
......@@ -41,6 +41,12 @@ properties:
Phandle to the system controller node
$ref: /schemas/types.yaml#/definitions/phandle
swap-dx-lanes:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: |
Specifies the ports which will swap the differential-pair (D+/D-),
default is not-swapped.
# Required child nodes:
patternProperties:
......
......@@ -19,6 +19,8 @@ properties:
- qcom,ipq6018-qmp-pcie-phy
- qcom,ipq8074-qmp-gen3-pcie-phy
- qcom,ipq8074-qmp-pcie-phy
- qcom,ipq9574-qmp-gen3x1-pcie-phy
- qcom,ipq9574-qmp-gen3x2-pcie-phy
reg:
items:
......
......@@ -91,8 +91,7 @@ properties:
"#clock-cells": true
clock-output-names:
minItems: 1
maxItems: 2
maxItems: 1
"#phy-cells":
const: 0
......@@ -222,14 +221,10 @@ allOf:
- qcom,sm8650-qmp-gen4x2-pcie-phy
then:
properties:
clock-output-names:
minItems: 2
"#clock-cells":
const: 1
else:
properties:
clock-output-names:
maxItems: 1
"#clock-cells":
const: 0
......
......@@ -20,8 +20,9 @@ properties:
- qcom,ipq8074-qmp-usb3-phy
- qcom,ipq9574-qmp-usb3-phy
- qcom,msm8996-qmp-usb3-phy
- com,qdu1000-qmp-usb3-uni-phy
- qcom,qdu1000-qmp-usb3-uni-phy
- qcom,sa8775p-qmp-usb3-uni-phy
- qcom,sc8180x-qmp-usb3-uni-phy
- qcom,sc8280xp-qmp-usb3-uni-phy
- qcom,sdm845-qmp-usb3-uni-phy
- qcom,sdx55-qmp-usb3-uni-phy
......@@ -112,6 +113,7 @@ allOf:
enum:
- qcom,qdu1000-qmp-usb3-uni-phy
- qcom,sa8775p-qmp-usb3-uni-phy
- qcom,sc8180x-qmp-usb3-uni-phy
- qcom,sc8280xp-qmp-usb3-uni-phy
- qcom,sm8150-qmp-usb3-uni-phy
- qcom,sm8250-qmp-usb3-uni-phy
......@@ -152,6 +154,7 @@ allOf:
contains:
enum:
- qcom,sa8775p-qmp-usb3-uni-phy
- qcom,sc8180x-qmp-usb3-uni-phy
- qcom,sc8280xp-qmp-usb3-uni-phy
- qcom,x1e80100-qmp-usb3-uni-phy
then:
......
......@@ -15,6 +15,7 @@ if:
contains:
enum:
- qcom,usb-hs-phy-apq8064
- qcom,usb-hs-phy-msm8660
- qcom,usb-hs-phy-msm8960
then:
properties:
......@@ -41,6 +42,7 @@ properties:
- enum:
- qcom,usb-hs-phy-apq8064
- qcom,usb-hs-phy-msm8226
- qcom,usb-hs-phy-msm8660
- qcom,usb-hs-phy-msm8916
- qcom,usb-hs-phy-msm8960
- qcom,usb-hs-phy-msm8974
......
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/phy/rockchip,rk3399-emmc-phy.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Rockchip EMMC PHY
maintainers:
- Heiko Stuebner <heiko@sntech.de>
properties:
compatible:
const: rockchip,rk3399-emmc-phy
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
const: emmcclk
drive-impedance-ohm:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Specifies the drive impedance in Ohm.
enum: [33, 40, 50, 66, 100]
default: 50
rockchip,enable-strobe-pulldown:
type: boolean
description: |
Enable internal pull-down for the strobe
line. If not set, pull-down is not used.
rockchip,output-tapdelay-select:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Specifies the phyctrl_otapdlysec register.
default: 0x4
maximum: 0xf
"#phy-cells":
const: 0
required:
- compatible
- reg
- "#phy-cells"
additionalProperties: false
examples:
- |
phy@f780 {
compatible = "rockchip,rk3399-emmc-phy";
reg = <0xf780 0x20>;
clocks = <&sdhci>;
clock-names = "emmcclk";
drive-impedance-ohm = <50>;
#phy-cells = <0>;
};
Rockchip EMMC PHY
-----------------------
Required properties:
- compatible: rockchip,rk3399-emmc-phy
- #phy-cells: must be 0
- reg: PHY register address offset and length in "general
register files"
Optional properties:
- clock-names: Should contain "emmcclk". Although this is listed as optional
(because most boards can get basic functionality without having
access to it), it is strongly suggested.
See ../clock/clock-bindings.txt for details.
- clocks: Should have a phandle to the card clock exported by the SDHCI driver.
- drive-impedance-ohm: Specifies the drive impedance in Ohm.
Possible values are 33, 40, 50, 66 and 100.
If not set, the default value of 50 will be applied.
- rockchip,enable-strobe-pulldown: Enable internal pull-down for the strobe
line. If not set, pull-down is not used.
- rockchip,output-tapdelay-select: Specifies the phyctrl_otapdlysec register.
If not set, the register defaults to 0x4.
Maximum value 0xf.
Example:
grf: syscon@ff770000 {
compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd";
#address-cells = <1>;
#size-cells = <1>;
...
emmcphy: phy@f780 {
compatible = "rockchip,rk3399-emmc-phy";
reg = <0xf780 0x20>;
clocks = <&sdhci>;
clock-names = "emmcclk";
drive-impedance-ohm = <50>;
#phy-cells = <0>;
};
};
......@@ -25,6 +25,7 @@ description: |
properties:
compatible:
enum:
- google,gs101-usb31drd-phy
- samsung,exynos5250-usbdrd-phy
- samsung,exynos5420-usbdrd-phy
- samsung,exynos5433-usbdrd-phy
......@@ -57,7 +58,15 @@ properties:
the OF graph bindings specified.
reg:
maxItems: 1
minItems: 1
maxItems: 3
reg-names:
minItems: 1
items:
- const: phy
- const: pcs
- const: pma
samsung,pmu-syscon:
$ref: /schemas/types.yaml#/definitions/phandle
......@@ -72,6 +81,19 @@ properties:
description:
VBUS Boost 5V power source.
pll-supply:
description: Power supply for the USB PLL.
dvdd-usb20-supply:
description: DVDD power supply for the USB 2.0 phy.
vddh-usb20-supply:
description: VDDh power supply for the USB 2.0 phy.
vdd33-usb20-supply:
description: 3.3V power supply for the USB 2.0 phy.
vdda-usbdp-supply:
description: VDDa power supply for the USB DP phy.
vddh-usbdp-supply:
description: VDDh power supply for the USB DP phy.
required:
- compatible
- clocks
......@@ -81,6 +103,40 @@ required:
- samsung,pmu-syscon
allOf:
- if:
properties:
compatible:
contains:
const: google,gs101-usb31drd-phy
then:
properties:
clocks:
items:
- description: Gate of main PHY clock
- description: Gate of PHY reference clock
- description: Gate of control interface AXI clock
- description: Gate of control interface APB clock
- description: Gate of SCL APB clock
clock-names:
items:
- const: phy
- const: ref
- const: ctrl_aclk
- const: ctrl_pclk
- const: scl_pclk
reg:
minItems: 3
reg-names:
minItems: 3
required:
- reg-names
- pll-supply
- dvdd-usb20-supply
- vddh-usb20-supply
- vdd33-usb20-supply
- vdda-usbdp-supply
- vddh-usbdp-supply
- if:
properties:
compatible:
......@@ -100,7 +156,20 @@ allOf:
- const: phy_utmi
- const: phy_pipe
- const: itp
else:
reg:
maxItems: 1
reg-names:
maxItems: 1
- if:
properties:
compatible:
contains:
enum:
- samsung,exynos5250-usbdrd-phy
- samsung,exynos5420-usbdrd-phy
- samsung,exynos850-usbdrd-phy
then:
properties:
clocks:
minItems: 2
......@@ -109,6 +178,10 @@ allOf:
items:
- const: phy
- const: ref
reg:
maxItems: 1
reg-names:
maxItems: 1
additionalProperties: false
......
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/phy/starfive,jh7110-dphy-tx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Starfive SoC MIPI D-PHY Tx Controller
maintainers:
- Keith Zhao <keith.zhao@starfivetech.com>
- Shengyang Chen <shengyang.chen@starfivetech.com>
description:
The Starfive SoC uses the MIPI DSI D-PHY based on M31 IP to transfer
DSI data.
properties:
compatible:
const: starfive,jh7110-dphy-tx
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
items:
- const: txesc
resets:
items:
- description: MIPITX_DPHY_SYS reset
reset-names:
items:
- const: sys
power-domains:
maxItems: 1
"#phy-cells":
const: 0
required:
- compatible
- reg
- clocks
- clock-names
- resets
- reset-names
- power-domains
- "#phy-cells"
additionalProperties: false
examples:
- |
phy@295e0000 {
compatible = "starfive,jh7110-dphy-tx";
reg = <0x295e0000 0x10000>;
clocks = <&voutcrg 14>;
clock-names = "txesc";
resets = <&syscrg 10>;
reset-names = "sys";
power-domains = <&aon_syscon 0>;
#phy-cells = <0>;
};
......@@ -176,9 +176,10 @@ allOf:
Documentation/devicetree/bindings/phy/rockchip-pcie-phy.txt
patternProperties:
"phy@[0-9a-f]+$":
description:
Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt
"^phy@[0-9a-f]+$":
type: object
$ref: /schemas/phy/rockchip,rk3399-emmc-phy.yaml#
unevaluatedProperties: false
- if:
properties:
......@@ -292,6 +293,15 @@ examples:
#phy-cells = <0>;
};
phy@f780 {
compatible = "rockchip,rk3399-emmc-phy";
reg = <0xf780 0x20>;
clocks = <&sdhci>;
clock-names = "emmcclk";
drive-impedance-ohm = <50>;
#phy-cells = <0>;
};
u2phy0: usb2phy@e450 {
compatible = "rockchip,rk3399-usb2phy";
reg = <0xe450 0x10>;
......
......@@ -702,6 +702,14 @@ S: Maintained
F: Documentation/devicetree/bindings/net/airoha,en7581-eth.yaml
F: drivers/net/ethernet/mediatek/airoha_eth.c
AIROHA PCIE PHY DRIVER
M: Lorenzo Bianconi <lorenzo@kernel.org>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
F: Documentation/devicetree/bindings/phy/airoha,en7581-pcie-phy.yaml
F: drivers/phy/phy-airoha-pcie-regs.h
F: drivers/phy/phy-airoha-pcie.c
AIROHA SPI SNFI DRIVER
M: Lorenzo Bianconi <lorenzo@kernel.org>
M: Ray Liu <ray.liu@airoha.com>
......@@ -21682,6 +21690,13 @@ S: Supported
F: Documentation/devicetree/bindings/phy/starfive,jh7110-dphy-rx.yaml
F: drivers/phy/starfive/phy-jh7110-dphy-rx.c
STARFIVE JH7110 DPHY TX DRIVER
M: Keith Zhao <keith.zhao@starfivetech.com>
M: Shengyang Chen <shengyang.chen@starfivetech.com>
S: Supported
F: Documentation/devicetree/bindings/phy/starfive,jh7110-dphy-tx.yaml
F: drivers/phy/starfive/phy-jh7110-dphy-tx.c
STARFIVE JH7110 MMC/SD/SDIO DRIVER
M: William Qiu <william.qiu@starfivetech.com>
S: Supported
......
......@@ -72,6 +72,16 @@ config PHY_CAN_TRANSCEIVER
functional modes using gpios and sets the attribute max link
rate, for CAN drivers.
config PHY_AIROHA_PCIE
tristate "Airoha PCIe-PHY Driver"
depends on ARCH_AIROHA || COMPILE_TEST
depends on OF
select GENERIC_PHY
help
Say Y here to add support for Airoha PCIe PHY driver.
This driver create the basic PHY instance and provides initialize
callback for PCIe GEN3 port.
source "drivers/phy/allwinner/Kconfig"
source "drivers/phy/amlogic/Kconfig"
source "drivers/phy/broadcom/Kconfig"
......
......@@ -10,6 +10,7 @@ obj-$(CONFIG_PHY_LPC18XX_USB_OTG) += phy-lpc18xx-usb-otg.o
obj-$(CONFIG_PHY_XGENE) += phy-xgene.o
obj-$(CONFIG_PHY_PISTACHIO_USB) += phy-pistachio-usb.o
obj-$(CONFIG_USB_LGM_PHY) += phy-lgm-usb.o
obj-$(CONFIG_PHY_AIROHA_PCIE) += phy-airoha-pcie.o
obj-y += allwinner/ \
amlogic/ \
broadcom/ \
......
......@@ -162,4 +162,5 @@ static struct platform_driver bcm_ns_usb2_driver = {
};
module_platform_driver(bcm_ns_usb2_driver);
MODULE_DESCRIPTION("Broadcom Northstar USB 2.0 PHY Driver");
MODULE_LICENSE("GPL v2");
......@@ -240,5 +240,6 @@ static struct mdio_driver bcm_ns_usb3_mdio_driver = {
mdio_module_driver(bcm_ns_usb3_mdio_driver);
MODULE_DESCRIPTION("Broadcom Northstar USB 3.0 PHY Driver");
MODULE_LICENSE("GPL v2");
MODULE_DEVICE_TABLE(of, bcm_ns_usb3_id_table);
This diff is collapsed.
......@@ -35,12 +35,19 @@ config PHY_FSL_IMX8M_PCIE
Enable this to add support for the PCIE PHY as found on
i.MX8M family of SOCs.
config PHY_FSL_IMX8QM_HSIO
tristate "Freescale i.MX8QM HSIO PHY"
depends on OF && HAS_IOMEM
select GENERIC_PHY
help
Enable this to add support for the HSIO PHY as found on
i.MX8QM family of SOCs.
config PHY_FSL_SAMSUNG_HDMI_PHY
tristate "Samsung HDMI PHY support"
depends on OF && HAS_IOMEM && COMMON_CLK
help
Enable this to add support for the Samsung HDMI PHY in i.MX8MP.
endif
config PHY_FSL_LYNX_28G
......
......@@ -3,5 +3,6 @@ obj-$(CONFIG_PHY_FSL_IMX8MQ_USB) += phy-fsl-imx8mq-usb.o
obj-$(CONFIG_PHY_MIXEL_LVDS_PHY) += phy-fsl-imx8qm-lvds-phy.o
obj-$(CONFIG_PHY_MIXEL_MIPI_DPHY) += phy-fsl-imx8-mipi-dphy.o
obj-$(CONFIG_PHY_FSL_IMX8M_PCIE) += phy-fsl-imx8m-pcie.o
obj-$(CONFIG_PHY_FSL_IMX8QM_HSIO) += phy-fsl-imx8qm-hsio.o
obj-$(CONFIG_PHY_FSL_LYNX_28G) += phy-fsl-lynx-28g.o
obj-$(CONFIG_PHY_FSL_SAMSUNG_HDMI_PHY) += phy-fsl-samsung-hdmi.o
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -664,7 +664,7 @@ static struct phy *_of_phy_get(struct device_node *np, int index)
*
* Returns the phy driver, after getting a refcount to it; or
* -ENODEV if there is no such phy. The caller is responsible for
* calling phy_put() to release that count.
* calling of_phy_put() to release that count.
*/
struct phy *of_phy_get(struct device_node *np, const char *con_id)
{
......
This diff is collapsed.
......@@ -11,8 +11,22 @@
#define QPHY_V5_PCS_PCIE_POWER_STATE_CONFIG2 0x0c
#define QPHY_V5_PCS_PCIE_POWER_STATE_CONFIG4 0x14
#define QPHY_V5_PCS_PCIE_ENDPOINT_REFCLK_DRIVE 0x20
#define QPHY_V5_PCS_PCIE_L1P1_WAKEUP_DLY_TIME_AUXCLK_L 0x44
#define QPHY_V5_PCS_PCIE_L1P1_WAKEUP_DLY_TIME_AUXCLK_H 0x48
#define QPHY_V5_PCS_PCIE_L1P2_WAKEUP_DLY_TIME_AUXCLK_L 0x4c
#define QPHY_V5_PCS_PCIE_L1P2_WAKEUP_DLY_TIME_AUXCLK_H 0x50
#define QPHY_V5_PCS_PCIE_INT_AUX_CLK_CONFIG1 0x54
#define QPHY_V5_PCS_PCIE_OSC_DTCT_CONFIG1 0x5c
#define QPHY_V5_PCS_PCIE_OSC_DTCT_CONFIG2 0x60
#define QPHY_V5_PCS_PCIE_OSC_DTCT_CONFIG4 0x68
#define QPHY_V5_PCS_PCIE_OSC_DTCT_MODE2_CONFIG2 0x7c
#define QPHY_V5_PCS_PCIE_OSC_DTCT_MODE2_CONFIG4 0x84
#define QPHY_V5_PCS_PCIE_OSC_DTCT_MODE2_CONFIG5 0x88
#define QPHY_V5_PCS_PCIE_OSC_DTCT_MODE2_CONFIG6 0x8c
#define QPHY_V5_PCS_PCIE_OSC_DTCT_ACTIONS 0x94
#define QPHY_V5_PCS_PCIE_EQ_CONFIG1 0xa4
#define QPHY_V5_PCS_PCIE_EQ_CONFIG2 0xa8
#define QPHY_V5_PCS_PCIE_PRESET_P10_PRE 0xc0
#define QPHY_V5_PCS_PCIE_PRESET_P10_POST 0xe4
#endif
......@@ -8,6 +8,9 @@
/* QMP V2 PHY for PCIE gen3 ports - QSERDES PLL registers */
#define QSERDES_PLL_BG_TIMER 0x00c
#define QSERDES_PLL_SSC_EN_CENTER 0x010
#define QSERDES_PLL_SSC_ADJ_PER1 0x014
#define QSERDES_PLL_SSC_ADJ_PER2 0x018
#define QSERDES_PLL_SSC_PER1 0x01c
#define QSERDES_PLL_SSC_PER2 0x020
#define QSERDES_PLL_SSC_STEP_SIZE1_MODE0 0x024
......
......@@ -2252,6 +2252,9 @@ static const struct of_device_id qmp_usb_of_match_table[] = {
}, {
.compatible = "qcom,sa8775p-qmp-usb3-uni-phy",
.data = &sa8775p_usb3_uniphy_cfg,
}, {
.compatible = "qcom,sc8180x-qmp-usb3-uni-phy",
.data = &sm8150_usb3_uniphy_cfg,
}, {
.compatible = "qcom,sc8280xp-qmp-usb3-uni-phy",
.data = &sc8280xp_usb3_uniphy_cfg,
......
......@@ -86,7 +86,9 @@ config PHY_ROCKCHIP_PCIE
config PHY_ROCKCHIP_SAMSUNG_HDPTX
tristate "Rockchip Samsung HDMI/eDP Combo PHY driver"
depends on (ARCH_ROCKCHIP || COMPILE_TEST) && OF
depends on HAS_IOMEM
select GENERIC_PHY
select MFD_SYSCON
select RATIONAL
help
Enable this to support the Rockchip HDMI/eDP Combo PHY
......
This diff is collapsed.
......@@ -121,7 +121,7 @@
#define EXYNOS_5420_USB_ISOL_HOST_OFFSET 0x70C
#define EXYNOS_5250_USB_ISOL_ENABLE BIT(0)
/* Mode swtich register */
/* Mode switch register */
#define EXYNOS_5250_MODE_SWITCH_OFFSET 0x230
#define EXYNOS_5250_MODE_SWITCH_MASK 1
#define EXYNOS_5250_MODE_SWITCH_DEVICE 0
......
......@@ -228,11 +228,6 @@ struct miphy28lp_dev {
int nphys;
};
struct miphy_initval {
u16 reg;
u16 val;
};
enum miphy_sata_gen { SATA_GEN1, SATA_GEN2, SATA_GEN3 };
static char *PHY_TYPE_name[] = { "sata-up", "pcie-up", "", "usb3-up" };
......
......@@ -15,6 +15,16 @@ config PHY_STARFIVE_JH7110_DPHY_RX
system. If M is selected, the module will be called
phy-jh7110-dphy-rx.ko.
config PHY_STARFIVE_JH7110_DPHY_TX
tristate "StarFive JH7110 D-PHY TX Support"
depends on HAS_IOMEM
select GENERIC_PHY
select GENERIC_PHY_MIPI_DPHY
help
Choose this option if you have a StarFive D-PHY TX in your
system. If M is selected, the module will be called
phy-jh7110-dphy-tx.ko.
config PHY_STARFIVE_JH7110_PCIE
tristate "Starfive JH7110 PCIE 2.0/USB 3.0 PHY support"
depends on HAS_IOMEM
......
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_PHY_STARFIVE_JH7110_DPHY_RX) += phy-jh7110-dphy-rx.o
obj-$(CONFIG_PHY_STARFIVE_JH7110_DPHY_TX) += phy-jh7110-dphy-tx.o
obj-$(CONFIG_PHY_STARFIVE_JH7110_PCIE) += phy-jh7110-pcie.o
obj-$(CONFIG_PHY_STARFIVE_JH7110_USB) += phy-jh7110-usb.o
......@@ -46,11 +46,6 @@
#define STF_MAP_LANES_NUM 6
struct regval {
u32 addr;
u32 val;
};
struct stf_dphy_info {
/**
* @maps:
......
This diff is collapsed.
......@@ -30,7 +30,6 @@
#define LANE_R058 0x258
#define LANE_R06c 0x26c
#define LANE_R070 0x270
#define LANE_R070 0x270
#define LANE_R19C 0x39c
#define COMLANE_R004 0xa04
......
......@@ -1076,27 +1076,12 @@ static int wiz_clock_register(struct wiz *wiz)
return ret;
}
static int wiz_clock_init(struct wiz *wiz, struct device_node *node)
static void wiz_clock_init(struct wiz *wiz)
{
const struct wiz_clk_mux_sel *clk_mux_sel = wiz->clk_mux_sel;
struct device *dev = wiz->dev;
struct device_node *clk_node;
const char *node_name;
unsigned long rate;
struct clk *clk;
int ret;
int i;
clk = devm_clk_get(dev, "core_ref_clk");
if (IS_ERR(clk)) {
dev_err(dev, "core_ref_clk clock not found\n");
ret = PTR_ERR(clk);
return ret;
}
wiz->input_clks[WIZ_CORE_REFCLK] = clk;
rate = clk_get_rate(clk);
if (rate >= 100000000)
rate = clk_get_rate(wiz->input_clks[WIZ_CORE_REFCLK]);
if (rate >= REF_CLK_100MHZ)
regmap_field_write(wiz->pma_cmn_refclk_int_mode, 0x1);
else
regmap_field_write(wiz->pma_cmn_refclk_int_mode, 0x3);
......@@ -1120,35 +1105,55 @@ static int wiz_clock_init(struct wiz *wiz, struct device_node *node)
break;
}
if (wiz->data->pma_cmn_refclk1_int_mode) {
clk = devm_clk_get(dev, "core_ref1_clk");
if (IS_ERR(clk)) {
dev_err(dev, "core_ref1_clk clock not found\n");
ret = PTR_ERR(clk);
return ret;
}
wiz->input_clks[WIZ_CORE_REFCLK1] = clk;
rate = clk_get_rate(clk);
if (rate >= 100000000)
if (wiz->input_clks[WIZ_CORE_REFCLK1]) {
rate = clk_get_rate(wiz->input_clks[WIZ_CORE_REFCLK1]);
if (rate >= REF_CLK_100MHZ)
regmap_field_write(wiz->pma_cmn_refclk1_int_mode, 0x1);
else
regmap_field_write(wiz->pma_cmn_refclk1_int_mode, 0x3);
}
clk = devm_clk_get(dev, "ext_ref_clk");
if (IS_ERR(clk)) {
dev_err(dev, "ext_ref_clk clock not found\n");
ret = PTR_ERR(clk);
return ret;
}
wiz->input_clks[WIZ_EXT_REFCLK] = clk;
rate = clk_get_rate(clk);
if (rate >= 100000000)
rate = clk_get_rate(wiz->input_clks[WIZ_EXT_REFCLK]);
if (rate >= REF_CLK_100MHZ)
regmap_field_write(wiz->pma_cmn_refclk_mode, 0x0);
else
regmap_field_write(wiz->pma_cmn_refclk_mode, 0x2);
}
static int wiz_clock_probe(struct wiz *wiz, struct device_node *node)
{
const struct wiz_clk_mux_sel *clk_mux_sel = wiz->clk_mux_sel;
struct device *dev = wiz->dev;
struct device_node *clk_node;
const char *node_name;
struct clk *clk;
int ret;
int i;
clk = devm_clk_get(dev, "core_ref_clk");
if (IS_ERR(clk))
return dev_err_probe(dev, PTR_ERR(clk),
"core_ref_clk clock not found\n");
wiz->input_clks[WIZ_CORE_REFCLK] = clk;
if (wiz->data->pma_cmn_refclk1_int_mode) {
clk = devm_clk_get(dev, "core_ref1_clk");
if (IS_ERR(clk))
return dev_err_probe(dev, PTR_ERR(clk),
"core_ref1_clk clock not found\n");
wiz->input_clks[WIZ_CORE_REFCLK1] = clk;
}
clk = devm_clk_get(dev, "ext_ref_clk");
if (IS_ERR(clk))
return dev_err_probe(dev, PTR_ERR(clk),
"ext_ref_clk clock not found\n");
wiz->input_clks[WIZ_EXT_REFCLK] = clk;
wiz_clock_init(wiz);
switch (wiz->type) {
case AM64_WIZ_10G:
......@@ -1157,8 +1162,9 @@ static int wiz_clock_init(struct wiz *wiz, struct device_node *node)
case J721S2_WIZ_10G:
ret = wiz_clock_register(wiz);
if (ret)
dev_err(dev, "Failed to register wiz clocks\n");
return ret;
return dev_err_probe(dev, ret, "Failed to register wiz clocks\n");
return 0;
default:
break;
}
......@@ -1167,16 +1173,15 @@ static int wiz_clock_init(struct wiz *wiz, struct device_node *node)
node_name = clk_mux_sel[i].node_name;
clk_node = of_get_child_by_name(node, node_name);
if (!clk_node) {
dev_err(dev, "Unable to get %s node\n", node_name);
ret = -EINVAL;
ret = dev_err_probe(dev, -EINVAL, "Unable to get %s node\n", node_name);
goto err;
}
ret = wiz_mux_of_clk_register(wiz, clk_node, wiz->mux_sel_field[i],
clk_mux_sel[i].table);
if (ret) {
dev_err(dev, "Failed to register %s clock\n",
node_name);
dev_err_probe(dev, ret, "Failed to register %s clock\n",
node_name);
of_node_put(clk_node);
goto err;
}
......@@ -1188,16 +1193,15 @@ static int wiz_clock_init(struct wiz *wiz, struct device_node *node)
node_name = clk_div_sel[i].node_name;
clk_node = of_get_child_by_name(node, node_name);
if (!clk_node) {
dev_err(dev, "Unable to get %s node\n", node_name);
ret = -EINVAL;
ret = dev_err_probe(dev, -EINVAL, "Unable to get %s node\n", node_name);
goto err;
}
ret = wiz_div_clk_register(wiz, clk_node, wiz->div_sel_field[i],
clk_div_sel[i].table);
if (ret) {
dev_err(dev, "Failed to register %s clock\n",
node_name);
dev_err_probe(dev, ret, "Failed to register %s clock\n",
node_name);
of_node_put(clk_node);
goto err;
}
......@@ -1593,7 +1597,7 @@ static int wiz_probe(struct platform_device *pdev)
goto err_get_sync;
}
ret = wiz_clock_init(wiz, node);
ret = wiz_clock_probe(wiz, node);
if (ret < 0) {
dev_warn(dev, "Failed to initialize clocks\n");
goto err_get_sync;
......@@ -1655,12 +1659,41 @@ static void wiz_remove(struct platform_device *pdev)
pm_runtime_disable(dev);
}
static int wiz_resume_noirq(struct device *dev)
{
struct device_node *node = dev->of_node;
struct wiz *wiz = dev_get_drvdata(dev);
int ret;
/* Enable supplemental Control override if available */
if (wiz->sup_legacy_clk_override)
regmap_field_write(wiz->sup_legacy_clk_override, 1);
wiz_clock_init(wiz);
ret = wiz_init(wiz);
if (ret) {
dev_err(dev, "WIZ initialization failed\n");
goto err_wiz_init;
}
return 0;
err_wiz_init:
wiz_clock_cleanup(wiz, node);
return ret;
}
static DEFINE_NOIRQ_DEV_PM_OPS(wiz_pm_ops, NULL, wiz_resume_noirq);
static struct platform_driver wiz_driver = {
.probe = wiz_probe,
.remove_new = wiz_remove,
.driver = {
.name = "wiz",
.of_match_table = wiz_id_table,
.pm = pm_sleep_ptr(&wiz_pm_ops),
},
};
module_platform_driver(wiz_driver);
......
This diff is collapsed.
......@@ -660,5 +660,7 @@
/* For Tensor GS101 */
#define GS101_SYSIP_DAT0 (0x810)
#define GS101_SYSTEM_CONFIGURATION (0x3A00)
#define GS101_PHY_CTRL_USB20 (0x3EB0)
#define GS101_PHY_CTRL_USBDP (0x3EB4)
#endif /* __LINUX_SOC_EXYNOS_REGS_PMU_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment