Commit 54bdf8a3 authored by Linus Torvalds's avatar Linus Torvalds

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

Pull phy updates from Vinod Koul:
 "New support:
   - UFS PHY for Qualcomm SA8775p, SM7150
   - PCIe 2 lane phy support for sc8180x and PCIe PHY for SDX65
   - Mediatke hdmi phy support for mt8195
   - rockchip naneng combo phy support for RK358

  Updates:
   - Drop Thunder Bay eMMC PHY driver
   - RC support for PCIe phy for Qualcomm SDX55
   - SGMII support in WIZ driver for J721E
   - PCIe and multilink SGMII PHY support in cadence driver
   - Big pile of platform remove callback returning void conversions"

* tag 'phy-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (77 commits)
  phy: cadence: cdns-dphy-rx: Add common module reset support
  phy: ti: j721e-wiz: Add SGMII support in WIZ driver for J721E
  dt-bindings: phy: ti: phy-gmii-sel: Add support for J784S4 CPSW9G
  phy: ti: j721e-wiz: Fix unreachable code in wiz_mode_select()
  phy: cadence: Sierra: Add PCIe + SGMII PHY multilink configuration
  phy: mediatek: add support for phy-mtk-hdmi-mt8195
  phy: phy-mtk-hdmi: Add generic phy configure callback
  dt-bindings: phy: mediatek: hdmi-phy: Add mt8195 compatible
  phy: tegra: xusb: Add missing tegra_xusb_port_unregister for usb2_port and ulpi_port
  dt-bindings: phy: ti,phy-j721e-wiz: document clock-output-names
  dt-bindings: phy: ti,phy-j721e-wiz: drop assigned-clocks
  dt-bindings: phy: ti,phy-am654-serdes: drop assigned-clocks type
  dt-bindings: phy: cadence-torrent: drop assigned-clocks
  dt-bindings: phy: cadence-sierra: drop assigned-clocks
  phy: rockchip: remove unused hw_to_inno function
  phy: qualcomm: phy-qcom-qmp-ufs: add definitions for sa8775p
  dt-bindings: phy: qmp-ufs: describe the UFS PHY for sa8775p
  phy: qcom-qmp-pcie: drop sdm845_qhp_pcie_rx_tbl
  phy: qcom-qmp-pcie: sc8180x PCIe PHY has 2 lanes
  phy: qcom-qmp-ufs: Add SM7150 support
  ...
parents 7994beab a0106132
...@@ -21,7 +21,11 @@ allOf: ...@@ -21,7 +21,11 @@ allOf:
properties: properties:
compatible: compatible:
items: oneOf:
- const: rockchip,rk3568-pcie
- items:
- enum:
- rockchip,rk3588-pcie
- const: rockchip,rk3568-pcie - const: rockchip,rk3568-pcie
reg: reg:
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
# Copyright 2019 Ondrej Jirman <megous@megous.com> # Copyright 2019 Ondrej Jirman <megous@megous.com>
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/allwinner,sun50i-h6-usb3-phy.yaml#" $id: http://devicetree.org/schemas/phy/allwinner,sun50i-h6-usb3-phy.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Allwinner H6 USB3 PHY title: Allwinner H6 USB3 PHY
......
...@@ -45,7 +45,7 @@ properties: ...@@ -45,7 +45,7 @@ properties:
maxItems: 1 maxItems: 1
allwinner,direction: allwinner,direction:
$ref: '/schemas/types.yaml#/definitions/string' $ref: /schemas/types.yaml#/definitions/string
description: | description: |
Direction of the D-PHY: Direction of the D-PHY:
- "rx" for receiving (e.g. when used with MIPI CSI-2); - "rx" for receiving (e.g. when used with MIPI CSI-2);
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
# Copyright 2020 BayLibre, SAS # Copyright 2020 BayLibre, SAS
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/amlogic,axg-mipi-dphy.yaml#" $id: http://devicetree.org/schemas/phy/amlogic,axg-mipi-dphy.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amlogic AXG MIPI D-PHY title: Amlogic AXG MIPI D-PHY
......
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/amlogic,g12a-mipi-dphy-analog.yaml#" $id: http://devicetree.org/schemas/phy/amlogic,g12a-mipi-dphy-analog.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amlogic G12A MIPI analog PHY title: Amlogic G12A MIPI analog PHY
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
# Copyright 2019 BayLibre, SAS # Copyright 2019 BayLibre, SAS
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/amlogic,g12a-usb2-phy.yaml#" $id: http://devicetree.org/schemas/phy/amlogic,g12a-usb2-phy.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amlogic G12A USB2 PHY title: Amlogic G12A USB2 PHY
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
# Copyright 2019 BayLibre, SAS # Copyright 2019 BayLibre, SAS
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/amlogic,g12a-usb3-pcie-phy.yaml#" $id: http://devicetree.org/schemas/phy/amlogic,g12a-usb3-pcie-phy.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amlogic G12A USB3 + PCIE Combo PHY title: Amlogic G12A USB3 + PCIE Combo PHY
......
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/amlogic,meson-axg-mipi-pcie-analog.yaml#" $id: http://devicetree.org/schemas/phy/amlogic,meson-axg-mipi-pcie-analog.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amlogic AXG shared MIPI/PCIE analog PHY title: Amlogic AXG shared MIPI/PCIE analog PHY
......
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/amlogic,meson-axg-pcie.yaml#" $id: http://devicetree.org/schemas/phy/amlogic,meson-axg-pcie.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amlogic AXG PCIE PHY title: Amlogic AXG PCIE PHY
......
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/amlogic,meson8-hdmi-tx-phy.yaml#" $id: http://devicetree.org/schemas/phy/amlogic,meson8-hdmi-tx-phy.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amlogic Meson8, Meson8b and Meson8m2 HDMI TX PHY title: Amlogic Meson8, Meson8b and Meson8m2 HDMI TX PHY
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/amlogic,meson8b-usb2-phy.yaml#" $id: http://devicetree.org/schemas/phy/amlogic,meson8b-usb2-phy.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amlogic Meson8, Meson8b, Meson8m2 and GXBB USB2 PHY title: Amlogic Meson8, Meson8b, Meson8m2 and GXBB USB2 PHY
......
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/brcm,bcm63xx-usbh-phy.yaml#" $id: http://devicetree.org/schemas/phy/brcm,bcm63xx-usbh-phy.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: BCM63xx USBH PHY title: BCM63xx USBH PHY
......
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/brcm,sata-phy.yaml#" $id: http://devicetree.org/schemas/phy/brcm,sata-phy.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Broadcom SATA3 PHY title: Broadcom SATA3 PHY
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
# Copyright (c) 2020 NXP # Copyright (c) 2020 NXP
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/cdns,salvo-phy.yaml#" $id: http://devicetree.org/schemas/phy/cdns,salvo-phy.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cadence SALVO PHY title: Cadence SALVO PHY
......
...@@ -19,11 +19,11 @@ properties: ...@@ -19,11 +19,11 @@ properties:
const: 0 const: 0
hisilicon,pericrg-syscon: hisilicon,pericrg-syscon:
$ref: '/schemas/types.yaml#/definitions/phandle' $ref: /schemas/types.yaml#/definitions/phandle
description: phandle of syscon used to control iso refclk. description: phandle of syscon used to control iso refclk.
hisilicon,pctrl-syscon: hisilicon,pctrl-syscon:
$ref: '/schemas/types.yaml#/definitions/phandle' $ref: /schemas/types.yaml#/definitions/phandle
description: phandle of syscon used to control usb tcxo. description: phandle of syscon used to control usb tcxo.
hisilicon,eye-diagram-param: hisilicon,eye-diagram-param:
......
...@@ -20,15 +20,15 @@ properties: ...@@ -20,15 +20,15 @@ properties:
const: 0 const: 0
hisilicon,pericrg-syscon: hisilicon,pericrg-syscon:
$ref: '/schemas/types.yaml#/definitions/phandle' $ref: /schemas/types.yaml#/definitions/phandle
description: phandle of syscon used to control iso refclk. description: phandle of syscon used to control iso refclk.
hisilicon,pctrl-syscon: hisilicon,pctrl-syscon:
$ref: '/schemas/types.yaml#/definitions/phandle' $ref: /schemas/types.yaml#/definitions/phandle
description: phandle of syscon used to control usb tcxo. description: phandle of syscon used to control usb tcxo.
hisilicon,sctrl-syscon: hisilicon,sctrl-syscon:
$ref: '/schemas/types.yaml#/definitions/phandle' $ref: /schemas/types.yaml#/definitions/phandle
description: phandle of syscon used to control phy deep sleep. description: phandle of syscon used to control phy deep sleep.
hisilicon,eye-diagram-param: hisilicon,eye-diagram-param:
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/phy/intel,phy-thunderbay-emmc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Intel Thunder Bay eMMC PHY
maintainers:
- Srikandan Nandhini <nandhini.srikandan@intel.com>
properties:
compatible:
const: intel,thunderbay-emmc-phy
"#phy-cells":
const: 0
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
items:
- const: emmcclk
required:
- "#phy-cells"
- compatible
- reg
- clocks
additionalProperties: false
examples:
- |
mmc_phy@80440800 {
#phy-cells = <0x0>;
compatible = "intel,thunderbay-emmc-phy";
reg = <0x80440800 0x100>;
clocks = <&emmc>;
clock-names = "emmcclk";
};
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/marvell,armada-3700-utmi-phy.yaml#" $id: http://devicetree.org/schemas/phy/marvell,armada-3700-utmi-phy.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Marvell Armada UTMI/UTMI+ PHY title: Marvell Armada UTMI/UTMI+ PHY
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/marvell,armada-cp110-utmi-phy.yaml#" $id: http://devicetree.org/schemas/phy/marvell,armada-cp110-utmi-phy.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Marvell Armada CP110/CP115 UTMI PHY title: Marvell Armada CP110/CP115 UTMI PHY
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
# Copyright 2019 Lubomir Rintel <lkundrak@v3.sk> # Copyright 2019 Lubomir Rintel <lkundrak@v3.sk>
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/marvell,mmp3-hsic-phy.yaml#" $id: http://devicetree.org/schemas/phy/marvell,mmp3-hsic-phy.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Marvell MMP3 HSIC PHY title: Marvell MMP3 HSIC PHY
......
...@@ -28,6 +28,7 @@ properties: ...@@ -28,6 +28,7 @@ properties:
- const: mediatek,mt2701-hdmi-phy - const: mediatek,mt2701-hdmi-phy
- const: mediatek,mt2701-hdmi-phy - const: mediatek,mt2701-hdmi-phy
- const: mediatek,mt8173-hdmi-phy - const: mediatek,mt8173-hdmi-phy
- const: mediatek,mt8195-hdmi-phy
reg: reg:
maxItems: 1 maxItems: 1
......
# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/mediatek,mt7621-pci-phy.yaml#" $id: http://devicetree.org/schemas/phy/mediatek,mt7621-pci-phy.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Mediatek Mt7621 PCIe PHY title: Mediatek Mt7621 PCIe PHY
......
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/phy-cadence-sierra.yaml#" $id: http://devicetree.org/schemas/phy/phy-cadence-sierra.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cadence Sierra PHY title: Cadence Sierra PHY
...@@ -61,14 +61,6 @@ properties: ...@@ -61,14 +61,6 @@ properties:
- const: pll0_refclk - const: pll0_refclk
- const: pll1_refclk - const: pll1_refclk
assigned-clocks:
minItems: 1
maxItems: 2
assigned-clock-parents:
minItems: 1
maxItems: 2
cdns,autoconf: cdns,autoconf:
type: boolean type: boolean
description: description:
......
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/phy-cadence-torrent.yaml#" $id: http://devicetree.org/schemas/phy/phy-cadence-torrent.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cadence Torrent SD0801 PHY title: Cadence Torrent SD0801 PHY
...@@ -44,12 +44,6 @@ properties: ...@@ -44,12 +44,6 @@ properties:
- const: refclk - const: refclk
- const: phy_en_refclk - const: phy_en_refclk
assigned-clocks:
maxItems: 3
assigned-clock-parents:
maxItems: 3
reg: reg:
minItems: 1 minItems: 1
items: items:
......
...@@ -13,6 +13,7 @@ properties: ...@@ -13,6 +13,7 @@ properties:
compatible: compatible:
enum: enum:
- rockchip,rk3568-naneng-combphy - rockchip,rk3568-naneng-combphy
- rockchip,rk3588-naneng-combphy
reg: reg:
maxItems: 1 maxItems: 1
......
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/phy-tegra194-p2u.yaml#" $id: http://devicetree.org/schemas/phy/phy-tegra194-p2u.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra194 & Tegra234 P2U title: NVIDIA Tegra194 & Tegra234 P2U
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/qcom,edp-phy.yaml#" $id: http://devicetree.org/schemas/phy/qcom,edp-phy.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm eDP PHY title: Qualcomm eDP PHY
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/qcom,qusb2-phy.yaml#" $id: http://devicetree.org/schemas/phy/qcom,qusb2-phy.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm QUSB2 phy controller title: Qualcomm QUSB2 phy controller
......
...@@ -19,6 +19,7 @@ properties: ...@@ -19,6 +19,7 @@ properties:
- qcom,sc8280xp-qmp-gen3x1-pcie-phy - qcom,sc8280xp-qmp-gen3x1-pcie-phy
- qcom,sc8280xp-qmp-gen3x2-pcie-phy - qcom,sc8280xp-qmp-gen3x2-pcie-phy
- qcom,sc8280xp-qmp-gen3x4-pcie-phy - qcom,sc8280xp-qmp-gen3x4-pcie-phy
- qcom,sdx65-qmp-gen4x2-pcie-phy
- qcom,sm8350-qmp-gen3x1-pcie-phy - qcom,sm8350-qmp-gen3x1-pcie-phy
- qcom,sm8550-qmp-gen3x2-pcie-phy - qcom,sm8550-qmp-gen3x2-pcie-phy
- qcom,sm8550-qmp-gen4x2-pcie-phy - qcom,sm8550-qmp-gen4x2-pcie-phy
......
...@@ -16,20 +16,25 @@ description: ...@@ -16,20 +16,25 @@ description:
properties: properties:
compatible: compatible:
enum: enum:
- qcom,sa8775p-qmp-ufs-phy
- qcom,sc8280xp-qmp-ufs-phy - qcom,sc8280xp-qmp-ufs-phy
- qcom,sm6125-qmp-ufs-phy - qcom,sm6125-qmp-ufs-phy
- qcom,sm7150-qmp-ufs-phy
- qcom,sm8550-qmp-ufs-phy - qcom,sm8550-qmp-ufs-phy
reg: reg:
maxItems: 1 maxItems: 1
clocks: clocks:
maxItems: 2 minItems: 2
maxItems: 3
clock-names: clock-names:
minItems: 2
items: items:
- const: ref - const: ref
- const: ref_aux - const: ref_aux
- const: qref
power-domains: power-domains:
maxItems: 1 maxItems: 1
...@@ -63,6 +68,26 @@ required: ...@@ -63,6 +68,26 @@ required:
- vdda-pll-supply - vdda-pll-supply
- "#phy-cells" - "#phy-cells"
allOf:
- if:
properties:
compatible:
contains:
enum:
- qcom,sa8775p-qmp-ufs-phy
then:
properties:
clocks:
maxItems: 3
clock-names:
maxItems: 3
else:
properties:
clocks:
maxItems: 2
clock-names:
maxItems: 2
additionalProperties: false additionalProperties: false
examples: examples:
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/qcom,usb-hs-28nm.yaml#" $id: http://devicetree.org/schemas/phy/qcom,usb-hs-28nm.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Synopsys DesignWare Core 28nm High-Speed PHY title: Qualcomm Synopsys DesignWare Core 28nm High-Speed PHY
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/qcom,usb-snps-femto-v2.yaml#" $id: http://devicetree.org/schemas/phy/qcom,usb-snps-femto-v2.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Synopsys Femto High-Speed USB PHY V2 title: Qualcomm Synopsys Femto High-Speed USB PHY V2
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/qcom,usb-ss.yaml#" $id: http://devicetree.org/schemas/phy/qcom,usb-ss.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Synopsys 1.0.0 SuperSpeed USB PHY title: Qualcomm Synopsys 1.0.0 SuperSpeed USB PHY
......
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/qcom-usb-ipq4019-phy.yaml#" $id: http://devicetree.org/schemas/phy/qcom-usb-ipq4019-phy.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcom IPQ40xx Dakota HS/SS USB PHY title: Qualcom IPQ40xx Dakota HS/SS USB PHY
......
...@@ -21,12 +21,12 @@ properties: ...@@ -21,12 +21,12 @@ properties:
maxItems: 1 maxItems: 1
samsung,pmu-syscon: samsung,pmu-syscon:
$ref: '/schemas/types.yaml#/definitions/phandle' $ref: /schemas/types.yaml#/definitions/phandle
description: phandle for PMU system controller interface, used to description: phandle for PMU system controller interface, used to
control PMU registers bits for PCIe PHY control PMU registers bits for PCIe PHY
samsung,fsys-sysreg: samsung,fsys-sysreg:
$ref: '/schemas/types.yaml#/definitions/phandle' $ref: /schemas/types.yaml#/definitions/phandle
description: phandle for FSYS sysreg interface, used to control description: phandle for FSYS sysreg interface, used to control
sysreg registers bits for PCIe PHY sysreg registers bits for PCIe PHY
......
...@@ -35,7 +35,7 @@ properties: ...@@ -35,7 +35,7 @@ properties:
maxItems: 4 maxItems: 4
samsung,pmu-syscon: samsung,pmu-syscon:
$ref: '/schemas/types.yaml#/definitions/phandle-array' $ref: /schemas/types.yaml#/definitions/phandle-array
maxItems: 1 maxItems: 1
items: items:
minItems: 1 minItems: 1
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
# Copyright (C) Sunplus Co., Ltd. 2021 # Copyright (C) Sunplus Co., Ltd. 2021
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/sunplus,sp7021-usb2-phy.yaml#" $id: http://devicetree.org/schemas/phy/sunplus,sp7021-usb2-phy.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Sunplus SP7021 USB 2.0 PHY Controller title: Sunplus SP7021 USB 2.0 PHY Controller
......
...@@ -34,11 +34,6 @@ properties: ...@@ -34,11 +34,6 @@ properties:
Three input clocks referring to left input reference clock, refclk and right input reference Three input clocks referring to left input reference clock, refclk and right input reference
clock. clock.
assigned-clocks:
$ref: "/schemas/types.yaml#/definitions/phandle-array"
assigned-clock-parents:
$ref: "/schemas/types.yaml#/definitions/phandle-array"
'#phy-cells': '#phy-cells':
const: 2 const: 2
description: description:
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
# Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/ # Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/ti,phy-gmii-sel.yaml#" $id: http://devicetree.org/schemas/phy/ti,phy-gmii-sel.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: CPSW Port's Interface Mode Selection PHY title: CPSW Port's Interface Mode Selection PHY
...@@ -55,6 +55,7 @@ properties: ...@@ -55,6 +55,7 @@ properties:
- ti,am654-phy-gmii-sel - ti,am654-phy-gmii-sel
- ti,j7200-cpsw5g-phy-gmii-sel - ti,j7200-cpsw5g-phy-gmii-sel
- ti,j721e-cpsw9g-phy-gmii-sel - ti,j721e-cpsw9g-phy-gmii-sel
- ti,j784s4-cpsw9g-phy-gmii-sel
reg: reg:
maxItems: 1 maxItems: 1
...@@ -87,6 +88,7 @@ allOf: ...@@ -87,6 +88,7 @@ allOf:
- ti,am654-phy-gmii-sel - ti,am654-phy-gmii-sel
- ti,j7200-cpsw5g-phy-gmii-sel - ti,j7200-cpsw5g-phy-gmii-sel
- ti,j721e-cpsw9g-phy-gmii-sel - ti,j721e-cpsw9g-phy-gmii-sel
- ti,j784s4-cpsw9g-phy-gmii-sel
then: then:
properties: properties:
'#phy-cells': '#phy-cells':
...@@ -113,6 +115,7 @@ allOf: ...@@ -113,6 +115,7 @@ allOf:
contains: contains:
enum: enum:
- ti,j721e-cpsw9g-phy-gmii-sel - ti,j721e-cpsw9g-phy-gmii-sel
- ti,j784s4-cpsw9g-phy-gmii-sel
then: then:
properties: properties:
ti,qsgmii-main-ports: ti,qsgmii-main-ports:
...@@ -130,6 +133,7 @@ allOf: ...@@ -130,6 +133,7 @@ allOf:
enum: enum:
- ti,j7200-cpsw5g-phy-gmii-sel - ti,j7200-cpsw5g-phy-gmii-sel
- ti,j721e-cpsw9g-phy-gmii-sel - ti,j721e-cpsw9g-phy-gmii-sel
- ti,j784s4-cpsw9g-phy-gmii-sel
then: then:
properties: properties:
ti,qsgmii-main-ports: false ti,qsgmii-main-ports: false
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
# Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/ # Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/ti,phy-j721e-wiz.yaml#" $id: http://devicetree.org/schemas/phy/ti,phy-j721e-wiz.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: TI J721E WIZ (SERDES Wrapper) title: TI J721E WIZ (SERDES Wrapper)
...@@ -54,18 +54,6 @@ properties: ...@@ -54,18 +54,6 @@ properties:
ranges: true ranges: true
assigned-clocks:
minItems: 1
maxItems: 2
assigned-clock-parents:
minItems: 1
maxItems: 2
assigned-clock-rates:
minItems: 1
maxItems: 2
typec-dir-gpios: typec-dir-gpios:
maxItems: 1 maxItems: 1
description: description:
...@@ -101,6 +89,9 @@ properties: ...@@ -101,6 +89,9 @@ properties:
"#clock-cells": "#clock-cells":
const: 0 const: 0
clock-output-names:
maxItems: 1
assigned-clocks: assigned-clocks:
maxItems: 1 maxItems: 1
...@@ -134,6 +125,9 @@ patternProperties: ...@@ -134,6 +125,9 @@ patternProperties:
"#clock-cells": "#clock-cells":
const: 0 const: 0
clock-output-names:
maxItems: 1
assigned-clocks: assigned-clocks:
maxItems: 1 maxItems: 1
...@@ -162,6 +156,9 @@ patternProperties: ...@@ -162,6 +156,9 @@ patternProperties:
"#clock-cells": "#clock-cells":
const: 0 const: 0
clock-output-names:
maxItems: 1
required: required:
- clocks - clocks
- "#clock-cells" - "#clock-cells"
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2 %YAML 1.2
--- ---
$id: "http://devicetree.org/schemas/phy/ti,tcan104x-can.yaml#" $id: http://devicetree.org/schemas/phy/ti,tcan104x-can.yaml#
$schema: "http://devicetree.org/meta-schemas/core.yaml#" $schema: http://devicetree.org/meta-schemas/core.yaml#
title: TCAN104x CAN TRANSCEIVER PHY title: TCAN104x CAN TRANSCEIVER PHY
......
...@@ -10530,13 +10530,6 @@ F: drivers/crypto/intel/keembay/keembay-ocs-hcu-core.c ...@@ -10530,13 +10530,6 @@ F: drivers/crypto/intel/keembay/keembay-ocs-hcu-core.c
F: drivers/crypto/intel/keembay/ocs-hcu.c F: drivers/crypto/intel/keembay/ocs-hcu.c
F: drivers/crypto/intel/keembay/ocs-hcu.h F: drivers/crypto/intel/keembay/ocs-hcu.h
INTEL THUNDER BAY EMMC PHY DRIVER
M: Nandhini Srikandan <nandhini.srikandan@intel.com>
M: Rashmi A <rashmi.a@intel.com>
S: Maintained
F: Documentation/devicetree/bindings/phy/intel,phy-thunderbay-emmc.yaml
F: drivers/phy/intel/phy-intel-thunderbay-emmc.c
INTEL MANAGEMENT ENGINE (mei) INTEL MANAGEMENT ENGINE (mei)
M: Tomas Winkler <tomas.winkler@intel.com> M: Tomas Winkler <tomas.winkler@intel.com>
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
......
...@@ -44,7 +44,7 @@ config PHY_PISTACHIO_USB ...@@ -44,7 +44,7 @@ config PHY_PISTACHIO_USB
config PHY_XGENE config PHY_XGENE
tristate "APM X-Gene 15Gbps PHY support" tristate "APM X-Gene 15Gbps PHY support"
depends on HAS_IOMEM && OF && (ARM64 || COMPILE_TEST) depends on HAS_IOMEM && OF && (ARCH_XGENE || COMPILE_TEST)
select GENERIC_PHY select GENERIC_PHY
help help
This option enables support for APM X-Gene SoC multi-purpose PHY. This option enables support for APM X-Gene SoC multi-purpose PHY.
......
...@@ -698,7 +698,7 @@ static struct phy *sun4i_usb_phy_xlate(struct device *dev, ...@@ -698,7 +698,7 @@ static struct phy *sun4i_usb_phy_xlate(struct device *dev,
return data->phys[args->args[0]].phy; return data->phys[args->args[0]].phy;
} }
static int sun4i_usb_phy_remove(struct platform_device *pdev) static void sun4i_usb_phy_remove(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct sun4i_usb_phy_data *data = dev_get_drvdata(dev); struct sun4i_usb_phy_data *data = dev_get_drvdata(dev);
...@@ -711,8 +711,6 @@ static int sun4i_usb_phy_remove(struct platform_device *pdev) ...@@ -711,8 +711,6 @@ static int sun4i_usb_phy_remove(struct platform_device *pdev)
devm_free_irq(dev, data->vbus_det_irq, data); devm_free_irq(dev, data->vbus_det_irq, data);
cancel_delayed_work_sync(&data->detect); cancel_delayed_work_sync(&data->detect);
return 0;
} }
static const unsigned int sun4i_usb_phy0_cable[] = { static const unsigned int sun4i_usb_phy0_cable[] = {
...@@ -758,7 +756,7 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev) ...@@ -758,7 +756,7 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev)
return PTR_ERR(data->vbus_det_gpio); return PTR_ERR(data->vbus_det_gpio);
} }
if (of_find_property(np, "usb0_vbus_power-supply", NULL)) { if (of_property_present(np, "usb0_vbus_power-supply")) {
data->vbus_power_supply = devm_power_supply_get_by_phandle(dev, data->vbus_power_supply = devm_power_supply_get_by_phandle(dev,
"usb0_vbus_power-supply"); "usb0_vbus_power-supply");
if (IS_ERR(data->vbus_power_supply)) { if (IS_ERR(data->vbus_power_supply)) {
...@@ -1054,7 +1052,7 @@ MODULE_DEVICE_TABLE(of, sun4i_usb_phy_of_match); ...@@ -1054,7 +1052,7 @@ MODULE_DEVICE_TABLE(of, sun4i_usb_phy_of_match);
static struct platform_driver sun4i_usb_phy_driver = { static struct platform_driver sun4i_usb_phy_driver = {
.probe = sun4i_usb_phy_probe, .probe = sun4i_usb_phy_probe,
.remove = sun4i_usb_phy_remove, .remove_new = sun4i_usb_phy_remove,
.driver = { .driver = {
.of_match_table = sun4i_usb_phy_of_match, .of_match_table = sun4i_usb_phy_of_match,
.name = "sun4i-usb-phy", .name = "sun4i-usb-phy",
......
...@@ -335,7 +335,6 @@ static int phy_meson_axg_mipi_dphy_probe(struct platform_device *pdev) ...@@ -335,7 +335,6 @@ static int phy_meson_axg_mipi_dphy_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct phy_provider *phy_provider; struct phy_provider *phy_provider;
struct resource *res;
struct phy_meson_axg_mipi_dphy_priv *priv; struct phy_meson_axg_mipi_dphy_priv *priv;
struct phy *phy; struct phy *phy;
void __iomem *base; void __iomem *base;
...@@ -348,8 +347,7 @@ static int phy_meson_axg_mipi_dphy_probe(struct platform_device *pdev) ...@@ -348,8 +347,7 @@ static int phy_meson_axg_mipi_dphy_probe(struct platform_device *pdev)
priv->dev = dev; priv->dev = dev;
platform_set_drvdata(pdev, priv); platform_set_drvdata(pdev, priv);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); base = devm_platform_ioremap_resource(pdev, 0);
base = devm_ioremap_resource(dev, res);
if (IS_ERR(base)) if (IS_ERR(base))
return PTR_ERR(base); return PTR_ERR(base);
......
...@@ -107,7 +107,7 @@ static int bcm_ns_usb2_probe(struct platform_device *pdev) ...@@ -107,7 +107,7 @@ static int bcm_ns_usb2_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
usb2->dev = dev; usb2->dev = dev;
if (of_find_property(dev->of_node, "brcm,syscon-clkset", NULL)) { if (of_property_present(dev->of_node, "brcm,syscon-clkset")) {
usb2->base = devm_platform_ioremap_resource(pdev, 0); usb2->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(usb2->base)) { if (IS_ERR(usb2->base)) {
dev_err(dev, "Failed to map control reg\n"); dev_err(dev, "Failed to map control reg\n");
......
...@@ -572,14 +572,12 @@ static int brcm_usb_phy_probe(struct platform_device *pdev) ...@@ -572,14 +572,12 @@ static int brcm_usb_phy_probe(struct platform_device *pdev)
return PTR_ERR_OR_ZERO(phy_provider); return PTR_ERR_OR_ZERO(phy_provider);
} }
static int brcm_usb_phy_remove(struct platform_device *pdev) static void brcm_usb_phy_remove(struct platform_device *pdev)
{ {
struct brcm_usb_phy_data *priv = dev_get_drvdata(&pdev->dev); struct brcm_usb_phy_data *priv = dev_get_drvdata(&pdev->dev);
sysfs_remove_group(&pdev->dev.kobj, &brcm_usb_phy_group); sysfs_remove_group(&pdev->dev.kobj, &brcm_usb_phy_group);
unregister_pm_notifier(&priv->pm_notifier); unregister_pm_notifier(&priv->pm_notifier);
return 0;
} }
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
...@@ -670,7 +668,7 @@ MODULE_DEVICE_TABLE(of, brcm_usb_dt_ids); ...@@ -670,7 +668,7 @@ MODULE_DEVICE_TABLE(of, brcm_usb_dt_ids);
static struct platform_driver brcm_usb_driver = { static struct platform_driver brcm_usb_driver = {
.probe = brcm_usb_phy_probe, .probe = brcm_usb_phy_probe,
.remove = brcm_usb_phy_remove, .remove_new = brcm_usb_phy_remove,
.driver = { .driver = {
.name = "brcmstb-usb-phy", .name = "brcmstb-usb-phy",
.pm = &brcm_usb_phy_pm_ops, .pm = &brcm_usb_phy_pm_ops,
......
...@@ -11,10 +11,12 @@ ...@@ -11,10 +11,12 @@
#include <linux/phy/phy.h> #include <linux/phy/phy.h>
#include <linux/phy/phy-mipi-dphy.h> #include <linux/phy/phy-mipi-dphy.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/sys_soc.h>
#define DPHY_PMA_CMN(reg) (reg) #define DPHY_PMA_CMN(reg) (reg)
#define DPHY_PCS(reg) (0xb00 + (reg)) #define DPHY_PCS(reg) (0xb00 + (reg))
#define DPHY_ISO(reg) (0xc00 + (reg)) #define DPHY_ISO(reg) (0xc00 + (reg))
#define DPHY_WRAP(reg) (0x1000 + (reg))
#define DPHY_CMN_SSM DPHY_PMA_CMN(0x20) #define DPHY_CMN_SSM DPHY_PMA_CMN(0x20)
#define DPHY_CMN_RX_MODE_EN BIT(10) #define DPHY_CMN_RX_MODE_EN BIT(10)
...@@ -33,6 +35,9 @@ ...@@ -33,6 +35,9 @@
#define DPHY_POWER_ISLAND_EN_CLK DPHY_PCS(0xc) #define DPHY_POWER_ISLAND_EN_CLK DPHY_PCS(0xc)
#define DPHY_POWER_ISLAND_EN_CLK_VAL 0xaa #define DPHY_POWER_ISLAND_EN_CLK_VAL 0xaa
#define DPHY_LANE DPHY_WRAP(0x0)
#define DPHY_LANE_RESET_CMN_EN BIT(23)
#define DPHY_ISO_CL_CTRL_L DPHY_ISO(0x10) #define DPHY_ISO_CL_CTRL_L DPHY_ISO(0x10)
#define DPHY_ISO_DL_CTRL_L0 DPHY_ISO(0x14) #define DPHY_ISO_DL_CTRL_L0 DPHY_ISO(0x14)
#define DPHY_ISO_DL_CTRL_L1 DPHY_ISO(0x20) #define DPHY_ISO_DL_CTRL_L1 DPHY_ISO(0x20)
...@@ -57,6 +62,10 @@ struct cdns_dphy_rx_band { ...@@ -57,6 +62,10 @@ struct cdns_dphy_rx_band {
unsigned int max_rate; unsigned int max_rate;
}; };
struct cdns_dphy_soc_data {
bool has_hw_cmn_rstb;
};
/* Order of bands is important since the index is the band number. */ /* Order of bands is important since the index is the band number. */
static const struct cdns_dphy_rx_band bands[] = { static const struct cdns_dphy_rx_band bands[] = {
{ 80, 100 }, { 100, 120 }, { 120, 160 }, { 160, 200 }, { 200, 240 }, { 80, 100 }, { 100, 120 }, { 120, 160 }, { 160, 200 }, { 200, 240 },
...@@ -142,13 +151,36 @@ static int cdns_dphy_rx_wait_lane_ready(struct cdns_dphy_rx *dphy, ...@@ -142,13 +151,36 @@ static int cdns_dphy_rx_wait_lane_ready(struct cdns_dphy_rx *dphy,
return 0; return 0;
} }
static struct cdns_dphy_soc_data j721e_soc_data = {
.has_hw_cmn_rstb = true,
};
static const struct soc_device_attribute cdns_dphy_socinfo[] = {
{
.family = "J721E",
.revision = "SR1.0",
.data = &j721e_soc_data,
},
{/* sentinel */}
};
static int cdns_dphy_rx_configure(struct phy *phy, static int cdns_dphy_rx_configure(struct phy *phy,
union phy_configure_opts *opts) union phy_configure_opts *opts)
{ {
struct cdns_dphy_rx *dphy = phy_get_drvdata(phy); struct cdns_dphy_rx *dphy = phy_get_drvdata(phy);
unsigned int reg, lanes = opts->mipi_dphy.lanes; unsigned int reg, lanes = opts->mipi_dphy.lanes;
const struct cdns_dphy_soc_data *soc_data = NULL;
const struct soc_device_attribute *soc;
int band_ctrl, ret; int band_ctrl, ret;
soc = soc_device_match(cdns_dphy_socinfo);
if (soc && soc->data)
soc_data = soc->data;
if (!soc || (soc_data && !soc_data->has_hw_cmn_rstb)) {
reg = DPHY_LANE_RESET_CMN_EN;
writel(reg, dphy->regs + DPHY_LANE);
}
/* Data lanes. Minimum one lane is mandatory. */ /* Data lanes. Minimum one lane is mandatory. */
if (lanes < DPHY_LANES_MIN || lanes > DPHY_LANES_MAX) if (lanes < DPHY_LANES_MIN || lanes > DPHY_LANES_MAX)
return -EINVAL; return -EINVAL;
......
...@@ -456,14 +456,12 @@ static int cdns_dphy_probe(struct platform_device *pdev) ...@@ -456,14 +456,12 @@ static int cdns_dphy_probe(struct platform_device *pdev)
return PTR_ERR_OR_ZERO(phy_provider); return PTR_ERR_OR_ZERO(phy_provider);
} }
static int cdns_dphy_remove(struct platform_device *pdev) static void cdns_dphy_remove(struct platform_device *pdev)
{ {
struct cdns_dphy *dphy = dev_get_drvdata(&pdev->dev); struct cdns_dphy *dphy = dev_get_drvdata(&pdev->dev);
if (dphy->ops->remove) if (dphy->ops->remove)
dphy->ops->remove(dphy); dphy->ops->remove(dphy);
return 0;
} }
static const struct of_device_id cdns_dphy_of_match[] = { static const struct of_device_id cdns_dphy_of_match[] = {
...@@ -475,7 +473,7 @@ MODULE_DEVICE_TABLE(of, cdns_dphy_of_match); ...@@ -475,7 +473,7 @@ MODULE_DEVICE_TABLE(of, cdns_dphy_of_match);
static struct platform_driver cdns_dphy_platform_driver = { static struct platform_driver cdns_dphy_platform_driver = {
.probe = cdns_dphy_probe, .probe = cdns_dphy_probe,
.remove = cdns_dphy_remove, .remove_new = cdns_dphy_remove,
.driver = { .driver = {
.name = "cdns-mipi-dphy", .name = "cdns-mipi-dphy",
.of_match_table = cdns_dphy_of_match, .of_match_table = cdns_dphy_of_match,
......
This diff is collapsed.
...@@ -2777,7 +2777,7 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev) ...@@ -2777,7 +2777,7 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int cdns_torrent_phy_remove(struct platform_device *pdev) static void cdns_torrent_phy_remove(struct platform_device *pdev)
{ {
struct cdns_torrent_phy *cdns_phy = platform_get_drvdata(pdev); struct cdns_torrent_phy *cdns_phy = platform_get_drvdata(pdev);
int i; int i;
...@@ -2791,8 +2791,6 @@ static int cdns_torrent_phy_remove(struct platform_device *pdev) ...@@ -2791,8 +2791,6 @@ static int cdns_torrent_phy_remove(struct platform_device *pdev)
clk_disable_unprepare(cdns_phy->clk); clk_disable_unprepare(cdns_phy->clk);
cdns_torrent_clk_cleanup(cdns_phy); cdns_torrent_clk_cleanup(cdns_phy);
return 0;
} }
/* Single DisplayPort(DP) link configuration */ /* Single DisplayPort(DP) link configuration */
...@@ -4708,7 +4706,7 @@ MODULE_DEVICE_TABLE(of, cdns_torrent_phy_of_match); ...@@ -4708,7 +4706,7 @@ MODULE_DEVICE_TABLE(of, cdns_torrent_phy_of_match);
static struct platform_driver cdns_torrent_phy_driver = { static struct platform_driver cdns_torrent_phy_driver = {
.probe = cdns_torrent_phy_probe, .probe = cdns_torrent_phy_probe,
.remove = cdns_torrent_phy_remove, .remove_new = cdns_torrent_phy_remove,
.driver = { .driver = {
.name = "cdns-torrent-phy", .name = "cdns-torrent-phy",
.of_match_table = cdns_torrent_phy_of_match, .of_match_table = cdns_torrent_phy_of_match,
......
...@@ -391,11 +391,9 @@ static int mixel_lvds_phy_probe(struct platform_device *pdev) ...@@ -391,11 +391,9 @@ static int mixel_lvds_phy_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int mixel_lvds_phy_remove(struct platform_device *pdev) static void mixel_lvds_phy_remove(struct platform_device *pdev)
{ {
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
return 0;
} }
static int __maybe_unused mixel_lvds_phy_runtime_suspend(struct device *dev) static int __maybe_unused mixel_lvds_phy_runtime_suspend(struct device *dev)
...@@ -436,7 +434,7 @@ MODULE_DEVICE_TABLE(of, mixel_lvds_phy_of_match); ...@@ -436,7 +434,7 @@ MODULE_DEVICE_TABLE(of, mixel_lvds_phy_of_match);
static struct platform_driver mixel_lvds_phy_driver = { static struct platform_driver mixel_lvds_phy_driver = {
.probe = mixel_lvds_phy_probe, .probe = mixel_lvds_phy_probe,
.remove = mixel_lvds_phy_remove, .remove_new = mixel_lvds_phy_remove,
.driver = { .driver = {
.pm = &mixel_lvds_phy_pm_ops, .pm = &mixel_lvds_phy_pm_ops,
.name = "mixel-lvds-phy", .name = "mixel-lvds-phy",
......
...@@ -46,13 +46,3 @@ config PHY_INTEL_LGM_EMMC ...@@ -46,13 +46,3 @@ config PHY_INTEL_LGM_EMMC
select GENERIC_PHY select GENERIC_PHY
help help
Enable this to support the Intel EMMC PHY Enable this to support the Intel EMMC PHY
config PHY_INTEL_THUNDERBAY_EMMC
tristate "Intel Thunder Bay eMMC PHY driver"
depends on OF && (ARCH_THUNDERBAY || COMPILE_TEST)
select GENERIC_PHY
help
This option enables support for Intel Thunder Bay SoC eMMC PHY.
To compile this driver as a module, choose M here: the module
will be called phy-intel-thunderbay-emmc.ko.
...@@ -3,4 +3,3 @@ obj-$(CONFIG_PHY_INTEL_KEEMBAY_EMMC) += phy-intel-keembay-emmc.o ...@@ -3,4 +3,3 @@ obj-$(CONFIG_PHY_INTEL_KEEMBAY_EMMC) += phy-intel-keembay-emmc.o
obj-$(CONFIG_PHY_INTEL_KEEMBAY_USB) += phy-intel-keembay-usb.o obj-$(CONFIG_PHY_INTEL_KEEMBAY_USB) += phy-intel-keembay-usb.o
obj-$(CONFIG_PHY_INTEL_LGM_COMBO) += phy-intel-lgm-combo.o obj-$(CONFIG_PHY_INTEL_LGM_COMBO) += phy-intel-lgm-combo.o
obj-$(CONFIG_PHY_INTEL_LGM_EMMC) += phy-intel-lgm-emmc.o obj-$(CONFIG_PHY_INTEL_LGM_EMMC) += phy-intel-lgm-emmc.o
obj-$(CONFIG_PHY_INTEL_THUNDERBAY_EMMC) += phy-intel-thunderbay-emmc.o
...@@ -589,13 +589,12 @@ static int intel_cbphy_probe(struct platform_device *pdev) ...@@ -589,13 +589,12 @@ static int intel_cbphy_probe(struct platform_device *pdev)
return intel_cbphy_create(cbphy); return intel_cbphy_create(cbphy);
} }
static int intel_cbphy_remove(struct platform_device *pdev) static void intel_cbphy_remove(struct platform_device *pdev)
{ {
struct intel_combo_phy *cbphy = platform_get_drvdata(pdev); struct intel_combo_phy *cbphy = platform_get_drvdata(pdev);
intel_cbphy_rst_assert(cbphy); intel_cbphy_rst_assert(cbphy);
clk_disable_unprepare(cbphy->core_clk); clk_disable_unprepare(cbphy->core_clk);
return 0;
} }
static const struct of_device_id of_intel_cbphy_match[] = { static const struct of_device_id of_intel_cbphy_match[] = {
...@@ -606,7 +605,7 @@ static const struct of_device_id of_intel_cbphy_match[] = { ...@@ -606,7 +605,7 @@ static const struct of_device_id of_intel_cbphy_match[] = {
static struct platform_driver intel_cbphy_driver = { static struct platform_driver intel_cbphy_driver = {
.probe = intel_cbphy_probe, .probe = intel_cbphy_probe,
.remove = intel_cbphy_remove, .remove_new = intel_cbphy_remove,
.driver = { .driver = {
.name = "intel-combo-phy", .name = "intel-combo-phy",
.of_match_table = of_intel_cbphy_match, .of_match_table = of_intel_cbphy_match,
......
This diff is collapsed.
...@@ -199,7 +199,7 @@ static struct platform_driver mv_hsic_phy_driver = { ...@@ -199,7 +199,7 @@ static struct platform_driver mv_hsic_phy_driver = {
.probe = mv_hsic_phy_probe, .probe = mv_hsic_phy_probe,
.driver = { .driver = {
.name = "mv-hsic-phy", .name = "mv-hsic-phy",
.of_match_table = of_match_ptr(mv_hsic_phy_dt_match), .of_match_table = mv_hsic_phy_dt_match,
}, },
}; };
module_platform_driver(mv_hsic_phy_driver); module_platform_driver(mv_hsic_phy_driver);
......
...@@ -331,7 +331,7 @@ static struct platform_driver mv_usb2_phy_driver = { ...@@ -331,7 +331,7 @@ static struct platform_driver mv_usb2_phy_driver = {
.probe = mv_usb2_phy_probe, .probe = mv_usb2_phy_probe,
.driver = { .driver = {
.name = "mv-usb2-phy", .name = "mv-usb2-phy",
.of_match_table = of_match_ptr(mv_usbphy_dt_match), .of_match_table = mv_usbphy_dt_match,
}, },
}; };
module_platform_driver(mv_usb2_phy_driver); module_platform_driver(mv_usb2_phy_driver);
......
...@@ -12,6 +12,7 @@ obj-$(CONFIG_PHY_MTK_XSPHY) += phy-mtk-xsphy.o ...@@ -12,6 +12,7 @@ obj-$(CONFIG_PHY_MTK_XSPHY) += phy-mtk-xsphy.o
phy-mtk-hdmi-drv-y := phy-mtk-hdmi.o phy-mtk-hdmi-drv-y := phy-mtk-hdmi.o
phy-mtk-hdmi-drv-y += phy-mtk-hdmi-mt2701.o phy-mtk-hdmi-drv-y += phy-mtk-hdmi-mt2701.o
phy-mtk-hdmi-drv-y += phy-mtk-hdmi-mt8173.o phy-mtk-hdmi-drv-y += phy-mtk-hdmi-mt8173.o
phy-mtk-hdmi-drv-y += phy-mtk-hdmi-mt8195.o
obj-$(CONFIG_PHY_MTK_HDMI) += phy-mtk-hdmi-drv.o obj-$(CONFIG_PHY_MTK_HDMI) += phy-mtk-hdmi-drv.o
phy-mtk-mipi-dsi-drv-y := phy-mtk-mipi-dsi.o phy-mtk-mipi-dsi-drv-y := phy-mtk-mipi-dsi.o
......
This diff is collapsed.
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2022 MediaTek Inc.
* Copyright (c) 2022 BayLibre, SAS
*/
#ifndef _MTK_HDMI_PHY_8195_H
#define _MTK_HDMI_PHY_8195_H
#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/types.h>
#define PCW_DECIMAL_WIDTH 24
#define PLL_PREDIV 1
#define PLL_FBKDIV_HS3 1
#define HDMI20_CLK_CFG 0x70
#define REG_TXC_DIV GENMASK(31, 30)
#define HDMI_1_CFG_0 0x00
#define RG_HDMITX21_DRV_IBIAS_CLK GENMASK(10, 5)
#define RG_HDMITX21_DRV_IMP_EN GENMASK(23, 20)
#define RG_HDMITX21_DRV_EN GENMASK(27, 24)
#define RG_HDMITX21_SER_EN GENMASK(31, 28)
#define HDMI_1_CFG_1 0x04
#define RG_HDMITX21_DRV_IBIAS_D0 GENMASK(19, 14)
#define RG_HDMITX21_DRV_IBIAS_D1 GENMASK(25, 20)
#define RG_HDMITX21_DRV_IBIAS_D2 GENMASK(31, 26)
#define HDMI_1_CFG_10 0x40
#define RG_HDMITXPLL_REF_CK_SEL GENMASK(2, 1)
#define RG_HDMITX21_VREF_SEL BIT(4)
#define RG_HDMITX21_BIAS_PE_VREF_SELB BIT(10)
#define RG_HDMITX21_BIAS_PE_BG_VREF_SEL GENMASK(16, 15)
#define RG_HDMITX21_BG_PWD BIT(20)
#define HDMI_1_CFG_2 0x08
#define RG_HDMITX21_DRV_IMP_D0_EN1 GENMASK(13, 8)
#define RG_HDMITX21_DRV_IMP_D1_EN1 GENMASK(19, 14)
#define RG_HDMITX21_DRV_IMP_D2_EN1 GENMASK(25, 20)
#define RG_HDMITX21_DRV_IMP_CLK_EN1 GENMASK(31, 26)
#define HDMI_1_CFG_3 0x0c
#define RG_HDMITX21_CKLDO_EN BIT(3)
#define RG_HDMITX21_SLDOLPF_EN BIT(7)
#define RG_HDMITX21_SLDO_EN GENMASK(11, 8)
#define HDMI_1_CFG_6 0x18
#define RG_HDMITX21_D2_DRV_OP_EN BIT(8)
#define RG_HDMITX21_D1_DRV_OP_EN BIT(9)
#define RG_HDMITX21_D0_DRV_OP_EN BIT(10)
#define RG_HDMITX21_CK_DRV_OP_EN BIT(11)
#define RG_HDMITX21_FRL_EN BIT(12)
#define RG_HDMITX21_FRL_CK_EN BIT(13)
#define RG_HDMITX21_FRL_D0_EN BIT(14)
#define RG_HDMITX21_FRL_D1_EN BIT(15)
#define RG_HDMITX21_FRL_D2_EN BIT(16)
#define RG_HDMITX21_INTR_CAL GENMASK(22, 18)
#define RG_HDMITX21_TX_POSDIV GENMASK(27, 26)
#define RG_HDMITX21_TX_POSDIV_EN BIT(28)
#define RG_HDMITX21_BIAS_EN BIT(29)
#define HDMI_1_CFG_9 0x24
#define RG_HDMITX21_SLDO_VREF_SEL GENMASK(5, 4)
#define HDMI_1_PLL_CFG_0 0x44
#define RG_HDMITXPLL_HREN GENMASK(13, 12)
#define RG_HDMITXPLL_IBAND_FIX_EN BIT(24)
#define RG_HDMITXPLL_LVR_SEL GENMASK(27, 26)
#define RG_HDMITXPLL_BP2 BIT(30)
#define RG_HDMITXPLL_TCL_EN BIT(31)
#define HDMI_1_PLL_CFG_1 0x48
#define RG_HDMITXPLL_RESERVE_BIT1_0 GENMASK(1, 0)
#define RG_HDMITXPLL_RESERVE_BIT3_2 GENMASK(3, 2)
#define RG_HDMITXPLL_RESERVE_BIT12_11 GENMASK(12, 11)
#define RG_HDMITXPLL_RESERVE_BIT13 BIT(13)
#define RG_HDMITXPLL_RESERVE_BIT14 BIT(14)
#define HDMI_1_PLL_CFG_2 0x4c
#define RG_HDMITXPLL_BC GENMASK(28, 27)
#define RG_HDMITXPLL_IC GENMASK(26, 22)
#define RG_HDMITXPLL_BR GENMASK(21, 19)
#define RG_HDMITXPLL_IR GENMASK(18, 14)
#define RG_HDMITXPLL_BP GENMASK(13, 10)
#define RG_HDMITXPLL_HIKVCO BIT(29)
#define RG_HDMITXPLL_PWD BIT(31)
#define HDMI_1_PLL_CFG_3 0x50
#define RG_HDMITXPLL_FBKDIV_LOW GENMASK(31, 0)
#define HDMI_1_PLL_CFG_4 0x54
#define DA_HDMITXPLL_ISO_EN BIT(1)
#define DA_HDMITXPLL_PWR_ON BIT(2)
#define RG_HDMITXPLL_POSDIV_DIV3_CTRL BIT(21)
#define RG_HDMITXPLL_POSDIV GENMASK(23, 22)
#define RG_HDMITXPLL_DIV_CTRL GENMASK(25, 24)
#define RG_HDMITXPLL_PREDIV GENMASK(29, 28)
#define RG_HDMITXPLL_FBKDIV_HIGH BIT(31)
#define HDMI_ANA_CTL 0x7c
#define REG_ANA_HDMI20_FIFO_EN BIT(16)
#define HDMI_CTL_3 0xcc
#define REG_HDMITXPLL_DIV GENMASK(4, 0)
#define REG_HDMITX_REF_XTAL_SEL BIT(7)
#define REG_HDMITX_REF_RESPLL_SEL BIT(9)
#define REG_PIXEL_CLOCK_SEL BIT(10)
#define REG_HDMITX_PIXEL_CLOCK BIT(23)
#endif /* MTK_HDMI_PHY_8195_H */
...@@ -8,10 +8,12 @@ ...@@ -8,10 +8,12 @@
static int mtk_hdmi_phy_power_on(struct phy *phy); static int mtk_hdmi_phy_power_on(struct phy *phy);
static int mtk_hdmi_phy_power_off(struct phy *phy); static int mtk_hdmi_phy_power_off(struct phy *phy);
static int mtk_hdmi_phy_configure(struct phy *phy, union phy_configure_opts *opts);
static const struct phy_ops mtk_hdmi_phy_dev_ops = { static const struct phy_ops mtk_hdmi_phy_dev_ops = {
.power_on = mtk_hdmi_phy_power_on, .power_on = mtk_hdmi_phy_power_on,
.power_off = mtk_hdmi_phy_power_off, .power_off = mtk_hdmi_phy_power_off,
.configure = mtk_hdmi_phy_configure,
.owner = THIS_MODULE, .owner = THIS_MODULE,
}; };
...@@ -43,6 +45,16 @@ static int mtk_hdmi_phy_power_off(struct phy *phy) ...@@ -43,6 +45,16 @@ static int mtk_hdmi_phy_power_off(struct phy *phy)
return 0; return 0;
} }
static int mtk_hdmi_phy_configure(struct phy *phy, union phy_configure_opts *opts)
{
struct mtk_hdmi_phy *hdmi_phy = phy_get_drvdata(phy);
if (hdmi_phy->conf->hdmi_phy_configure)
return hdmi_phy->conf->hdmi_phy_configure(phy, opts);
return 0;
}
static const struct phy_ops * static const struct phy_ops *
mtk_hdmi_phy_dev_get_ops(const struct mtk_hdmi_phy *hdmi_phy) mtk_hdmi_phy_dev_get_ops(const struct mtk_hdmi_phy *hdmi_phy)
{ {
...@@ -149,6 +161,9 @@ static const struct of_device_id mtk_hdmi_phy_match[] = { ...@@ -149,6 +161,9 @@ static const struct of_device_id mtk_hdmi_phy_match[] = {
{ .compatible = "mediatek,mt8173-hdmi-phy", { .compatible = "mediatek,mt8173-hdmi-phy",
.data = &mtk_hdmi_phy_8173_conf, .data = &mtk_hdmi_phy_8173_conf,
}, },
{ .compatible = "mediatek,mt8195-hdmi-phy",
.data = &mtk_hdmi_phy_8195_conf,
},
{}, {},
}; };
MODULE_DEVICE_TABLE(of, mtk_hdmi_phy_match); MODULE_DEVICE_TABLE(of, mtk_hdmi_phy_match);
......
...@@ -24,6 +24,7 @@ struct mtk_hdmi_phy_conf { ...@@ -24,6 +24,7 @@ struct mtk_hdmi_phy_conf {
const struct clk_ops *hdmi_phy_clk_ops; const struct clk_ops *hdmi_phy_clk_ops;
void (*hdmi_phy_enable_tmds)(struct mtk_hdmi_phy *hdmi_phy); void (*hdmi_phy_enable_tmds)(struct mtk_hdmi_phy *hdmi_phy);
void (*hdmi_phy_disable_tmds)(struct mtk_hdmi_phy *hdmi_phy); void (*hdmi_phy_disable_tmds)(struct mtk_hdmi_phy *hdmi_phy);
int (*hdmi_phy_configure)(struct phy *phy, union phy_configure_opts *opts);
}; };
struct mtk_hdmi_phy { struct mtk_hdmi_phy {
...@@ -39,10 +40,12 @@ struct mtk_hdmi_phy { ...@@ -39,10 +40,12 @@ struct mtk_hdmi_phy {
unsigned char drv_imp_d0; unsigned char drv_imp_d0;
unsigned int ibias; unsigned int ibias;
unsigned int ibias_up; unsigned int ibias_up;
bool tmds_over_340M;
}; };
struct mtk_hdmi_phy *to_mtk_hdmi_phy(struct clk_hw *hw); struct mtk_hdmi_phy *to_mtk_hdmi_phy(struct clk_hw *hw);
extern struct mtk_hdmi_phy_conf mtk_hdmi_phy_8195_conf;
extern struct mtk_hdmi_phy_conf mtk_hdmi_phy_8173_conf; extern struct mtk_hdmi_phy_conf mtk_hdmi_phy_8173_conf;
extern struct mtk_hdmi_phy_conf mtk_hdmi_phy_2701_conf; extern struct mtk_hdmi_phy_conf mtk_hdmi_phy_2701_conf;
......
...@@ -180,10 +180,9 @@ static int mtk_mipi_tx_probe(struct platform_device *pdev) ...@@ -180,10 +180,9 @@ static int mtk_mipi_tx_probe(struct platform_device *pdev)
mipi_tx->pll); mipi_tx->pll);
} }
static int mtk_mipi_tx_remove(struct platform_device *pdev) static void mtk_mipi_tx_remove(struct platform_device *pdev)
{ {
of_clk_del_provider(pdev->dev.of_node); of_clk_del_provider(pdev->dev.of_node);
return 0;
} }
static const struct of_device_id mtk_mipi_tx_match[] = { static const struct of_device_id mtk_mipi_tx_match[] = {
...@@ -199,7 +198,7 @@ MODULE_DEVICE_TABLE(of, mtk_mipi_tx_match); ...@@ -199,7 +198,7 @@ MODULE_DEVICE_TABLE(of, mtk_mipi_tx_match);
static struct platform_driver mtk_mipi_tx_driver = { static struct platform_driver mtk_mipi_tx_driver = {
.probe = mtk_mipi_tx_probe, .probe = mtk_mipi_tx_probe,
.remove = mtk_mipi_tx_remove, .remove_new = mtk_mipi_tx_remove,
.driver = { .driver = {
.name = "mediatek-mipi-tx", .name = "mediatek-mipi-tx",
.of_match_table = mtk_mipi_tx_match, .of_match_table = mtk_mipi_tx_match,
......
...@@ -692,7 +692,7 @@ static int cpcap_usb_phy_probe(struct platform_device *pdev) ...@@ -692,7 +692,7 @@ static int cpcap_usb_phy_probe(struct platform_device *pdev)
return error; return error;
} }
static int cpcap_usb_phy_remove(struct platform_device *pdev) static void cpcap_usb_phy_remove(struct platform_device *pdev)
{ {
struct cpcap_phy_ddata *ddata = platform_get_drvdata(pdev); struct cpcap_phy_ddata *ddata = platform_get_drvdata(pdev);
int error; int error;
...@@ -707,13 +707,11 @@ static int cpcap_usb_phy_remove(struct platform_device *pdev) ...@@ -707,13 +707,11 @@ static int cpcap_usb_phy_remove(struct platform_device *pdev)
usb_remove_phy(&ddata->phy); usb_remove_phy(&ddata->phy);
cancel_delayed_work_sync(&ddata->detect_work); cancel_delayed_work_sync(&ddata->detect_work);
regulator_disable(ddata->vusb); regulator_disable(ddata->vusb);
return 0;
} }
static struct platform_driver cpcap_usb_phy_driver = { static struct platform_driver cpcap_usb_phy_driver = {
.probe = cpcap_usb_phy_probe, .probe = cpcap_usb_phy_probe,
.remove = cpcap_usb_phy_remove, .remove_new = cpcap_usb_phy_remove,
.driver = { .driver = {
.name = "cpcap-usb-phy", .name = "cpcap-usb-phy",
.of_match_table = of_match_ptr(cpcap_usb_phy_id_table), .of_match_table = of_match_ptr(cpcap_usb_phy_id_table),
......
...@@ -634,7 +634,7 @@ static int phy_mdm6600_probe(struct platform_device *pdev) ...@@ -634,7 +634,7 @@ static int phy_mdm6600_probe(struct platform_device *pdev)
return error; return error;
} }
static int phy_mdm6600_remove(struct platform_device *pdev) static void phy_mdm6600_remove(struct platform_device *pdev)
{ {
struct phy_mdm6600 *ddata = platform_get_drvdata(pdev); struct phy_mdm6600 *ddata = platform_get_drvdata(pdev);
struct gpio_desc *reset_gpio = ddata->ctrl_gpios[PHY_MDM6600_RESET]; struct gpio_desc *reset_gpio = ddata->ctrl_gpios[PHY_MDM6600_RESET];
...@@ -653,13 +653,11 @@ static int phy_mdm6600_remove(struct platform_device *pdev) ...@@ -653,13 +653,11 @@ static int phy_mdm6600_remove(struct platform_device *pdev)
cancel_delayed_work_sync(&ddata->modem_wake_work); cancel_delayed_work_sync(&ddata->modem_wake_work);
cancel_delayed_work_sync(&ddata->bootup_work); cancel_delayed_work_sync(&ddata->bootup_work);
cancel_delayed_work_sync(&ddata->status_work); cancel_delayed_work_sync(&ddata->status_work);
return 0;
} }
static struct platform_driver phy_mdm6600_driver = { static struct platform_driver phy_mdm6600_driver = {
.probe = phy_mdm6600_probe, .probe = phy_mdm6600_probe,
.remove = phy_mdm6600_remove, .remove_new = phy_mdm6600_remove,
.driver = { .driver = {
.name = "phy-mapphone-mdm6600", .name = "phy-mapphone-mdm6600",
.pm = &phy_mdm6600_pm_ops, .pm = &phy_mdm6600_pm_ops,
......
...@@ -252,13 +252,11 @@ static int phy_probe(struct platform_device *pdev) ...@@ -252,13 +252,11 @@ static int phy_probe(struct platform_device *pdev)
return usb_add_phy_dev(phy); return usb_add_phy_dev(phy);
} }
static int phy_remove(struct platform_device *pdev) static void phy_remove(struct platform_device *pdev)
{ {
struct tca_apb *ta = platform_get_drvdata(pdev); struct tca_apb *ta = platform_get_drvdata(pdev);
usb_remove_phy(&ta->phy); usb_remove_phy(&ta->phy);
return 0;
} }
static const struct of_device_id intel_usb_phy_dt_ids[] = { static const struct of_device_id intel_usb_phy_dt_ids[] = {
...@@ -273,7 +271,7 @@ static struct platform_driver lgm_phy_driver = { ...@@ -273,7 +271,7 @@ static struct platform_driver lgm_phy_driver = {
.of_match_table = intel_usb_phy_dt_ids, .of_match_table = intel_usb_phy_dt_ids,
}, },
.probe = phy_probe, .probe = phy_probe,
.remove = phy_remove, .remove_new = phy_remove,
}; };
module_platform_driver(lgm_phy_driver); module_platform_driver(lgm_phy_driver);
......
...@@ -243,13 +243,11 @@ static int qcom_apq8064_sata_phy_probe(struct platform_device *pdev) ...@@ -243,13 +243,11 @@ static int qcom_apq8064_sata_phy_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int qcom_apq8064_sata_phy_remove(struct platform_device *pdev) static void qcom_apq8064_sata_phy_remove(struct platform_device *pdev)
{ {
struct qcom_apq8064_sata_phy *phy = platform_get_drvdata(pdev); struct qcom_apq8064_sata_phy *phy = platform_get_drvdata(pdev);
clk_disable_unprepare(phy->cfg_clk); clk_disable_unprepare(phy->cfg_clk);
return 0;
} }
static const struct of_device_id qcom_apq8064_sata_phy_of_match[] = { static const struct of_device_id qcom_apq8064_sata_phy_of_match[] = {
...@@ -260,7 +258,7 @@ MODULE_DEVICE_TABLE(of, qcom_apq8064_sata_phy_of_match); ...@@ -260,7 +258,7 @@ MODULE_DEVICE_TABLE(of, qcom_apq8064_sata_phy_of_match);
static struct platform_driver qcom_apq8064_sata_phy_driver = { static struct platform_driver qcom_apq8064_sata_phy_driver = {
.probe = qcom_apq8064_sata_phy_probe, .probe = qcom_apq8064_sata_phy_probe,
.remove = qcom_apq8064_sata_phy_remove, .remove_new = qcom_apq8064_sata_phy_remove,
.driver = { .driver = {
.name = "qcom-apq8064-sata-phy", .name = "qcom-apq8064-sata-phy",
.of_match_table = qcom_apq8064_sata_phy_of_match, .of_match_table = qcom_apq8064_sata_phy_of_match,
......
...@@ -223,16 +223,14 @@ static int eusb2_repeater_probe(struct platform_device *pdev) ...@@ -223,16 +223,14 @@ static int eusb2_repeater_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int eusb2_repeater_remove(struct platform_device *pdev) static void eusb2_repeater_remove(struct platform_device *pdev)
{ {
struct eusb2_repeater *rptr = platform_get_drvdata(pdev); struct eusb2_repeater *rptr = platform_get_drvdata(pdev);
if (!rptr) if (!rptr)
return 0; return;
eusb2_repeater_exit(rptr->phy); eusb2_repeater_exit(rptr->phy);
return 0;
} }
static const struct of_device_id eusb2_repeater_of_match_table[] = { static const struct of_device_id eusb2_repeater_of_match_table[] = {
...@@ -246,7 +244,7 @@ MODULE_DEVICE_TABLE(of, eusb2_repeater_of_match_table); ...@@ -246,7 +244,7 @@ MODULE_DEVICE_TABLE(of, eusb2_repeater_of_match_table);
static struct platform_driver eusb2_repeater_driver = { static struct platform_driver eusb2_repeater_driver = {
.probe = eusb2_repeater_probe, .probe = eusb2_repeater_probe,
.remove = eusb2_repeater_remove, .remove_new = eusb2_repeater_remove,
.driver = { .driver = {
.name = "qcom-eusb2-repeater", .name = "qcom-eusb2-repeater",
.of_match_table = eusb2_repeater_of_match_table, .of_match_table = eusb2_repeater_of_match_table,
......
...@@ -170,13 +170,11 @@ static int qcom_ipq806x_sata_phy_probe(struct platform_device *pdev) ...@@ -170,13 +170,11 @@ static int qcom_ipq806x_sata_phy_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int qcom_ipq806x_sata_phy_remove(struct platform_device *pdev) static void qcom_ipq806x_sata_phy_remove(struct platform_device *pdev)
{ {
struct qcom_ipq806x_sata_phy *phy = platform_get_drvdata(pdev); struct qcom_ipq806x_sata_phy *phy = platform_get_drvdata(pdev);
clk_disable_unprepare(phy->cfg_clk); clk_disable_unprepare(phy->cfg_clk);
return 0;
} }
static const struct of_device_id qcom_ipq806x_sata_phy_of_match[] = { static const struct of_device_id qcom_ipq806x_sata_phy_of_match[] = {
...@@ -187,7 +185,7 @@ MODULE_DEVICE_TABLE(of, qcom_ipq806x_sata_phy_of_match); ...@@ -187,7 +185,7 @@ MODULE_DEVICE_TABLE(of, qcom_ipq806x_sata_phy_of_match);
static struct platform_driver qcom_ipq806x_sata_phy_driver = { static struct platform_driver qcom_ipq806x_sata_phy_driver = {
.probe = qcom_ipq806x_sata_phy_probe, .probe = qcom_ipq806x_sata_phy_probe,
.remove = qcom_ipq806x_sata_phy_remove, .remove_new = qcom_ipq806x_sata_phy_remove,
.driver = { .driver = {
.name = "qcom-ipq806x-sata-phy", .name = "qcom-ipq806x-sata-phy",
.of_match_table = qcom_ipq806x_sata_phy_of_match, .of_match_table = qcom_ipq806x_sata_phy_of_match,
......
...@@ -1396,6 +1396,7 @@ static const struct qmp_combo_offsets qmp_combo_offsets_v3 = { ...@@ -1396,6 +1396,7 @@ static const struct qmp_combo_offsets qmp_combo_offsets_v3 = {
.usb3_serdes = 0x1000, .usb3_serdes = 0x1000,
.usb3_pcs_misc = 0x1a00, .usb3_pcs_misc = 0x1a00,
.usb3_pcs = 0x1c00, .usb3_pcs = 0x1c00,
.usb3_pcs_usb = 0x1f00,
.dp_serdes = 0x2000, .dp_serdes = 0x2000,
.dp_txa = 0x2200, .dp_txa = 0x2200,
.dp_txb = 0x2600, .dp_txb = 0x2600,
...@@ -1416,22 +1417,6 @@ static const struct qmp_combo_offsets qmp_combo_offsets_v5 = { ...@@ -1416,22 +1417,6 @@ static const struct qmp_combo_offsets qmp_combo_offsets_v5 = {
.dp_dp_phy = 0x2200, .dp_dp_phy = 0x2200,
}; };
static const struct qmp_combo_offsets qmp_combo_offsets_v6 = {
.com = 0x0000,
.txa = 0x1200,
.rxa = 0x1400,
.txb = 0x1600,
.rxb = 0x1800,
.usb3_serdes = 0x1000,
.usb3_pcs_misc = 0x1a00,
.usb3_pcs = 0x1c00,
.usb3_pcs_usb = 0x1f00,
.dp_serdes = 0x2000,
.dp_txa = 0x2200,
.dp_txb = 0x2600,
.dp_dp_phy = 0x2a00,
};
static const struct qmp_phy_cfg sc7180_usb3dpphy_cfg = { static const struct qmp_phy_cfg sc7180_usb3dpphy_cfg = {
.serdes_tbl = qmp_v3_usb3_serdes_tbl, .serdes_tbl = qmp_v3_usb3_serdes_tbl,
.serdes_tbl_num = ARRAY_SIZE(qmp_v3_usb3_serdes_tbl), .serdes_tbl_num = ARRAY_SIZE(qmp_v3_usb3_serdes_tbl),
...@@ -1758,7 +1743,7 @@ static const struct qmp_phy_cfg sm8350_usb3dpphy_cfg = { ...@@ -1758,7 +1743,7 @@ static const struct qmp_phy_cfg sm8350_usb3dpphy_cfg = {
}; };
static const struct qmp_phy_cfg sm8550_usb3dpphy_cfg = { static const struct qmp_phy_cfg sm8550_usb3dpphy_cfg = {
.offsets = &qmp_combo_offsets_v6, .offsets = &qmp_combo_offsets_v3,
.serdes_tbl = sm8550_usb3_serdes_tbl, .serdes_tbl = sm8550_usb3_serdes_tbl,
.serdes_tbl_num = ARRAY_SIZE(sm8550_usb3_serdes_tbl), .serdes_tbl_num = ARRAY_SIZE(sm8550_usb3_serdes_tbl),
......
This diff is collapsed.
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
#ifndef QCOM_PHY_QMP_PCS_PCIE_V4_20_H_ #ifndef QCOM_PHY_QMP_PCS_PCIE_V4_20_H_
#define QCOM_PHY_QMP_PCS_PCIE_V4_20_H_ #define QCOM_PHY_QMP_PCS_PCIE_V4_20_H_
#define QPHY_V4_20_PCS_PCIE_ENDPOINT_REFCLK_DRIVE 0x01c
#define QPHY_V4_20_PCS_PCIE_OSC_DTCT_ACTIONS 0x090
#define QPHY_V4_20_PCS_PCIE_EQ_CONFIG1 0x0a0 #define QPHY_V4_20_PCS_PCIE_EQ_CONFIG1 0x0a0
#define QPHY_V4_20_PCS_PCIE_G3_RXEQEVAL_TIME 0x0f0 #define QPHY_V4_20_PCS_PCIE_G3_RXEQEVAL_TIME 0x0f0
#define QPHY_V4_20_PCS_PCIE_G4_RXEQEVAL_TIME 0x0f4 #define QPHY_V4_20_PCS_PCIE_G4_RXEQEVAL_TIME 0x0f4
......
...@@ -12,8 +12,11 @@ ...@@ -12,8 +12,11 @@
#define QPHY_V5_20_PCS_PCIE_OSC_DTCT_ACTIONS 0x090 #define QPHY_V5_20_PCS_PCIE_OSC_DTCT_ACTIONS 0x090
#define QPHY_V5_20_PCS_PCIE_EQ_CONFIG1 0x0a0 #define QPHY_V5_20_PCS_PCIE_EQ_CONFIG1 0x0a0
#define QPHY_V5_20_PCS_PCIE_PRESET_P10_POST 0x0e0 #define QPHY_V5_20_PCS_PCIE_PRESET_P10_POST 0x0e0
#define QPHY_V5_20_PCS_PCIE_G4_EQ_CONFIG2 0x0fc
#define QPHY_V5_20_PCS_PCIE_G4_EQ_CONFIG5 0x108 #define QPHY_V5_20_PCS_PCIE_G4_EQ_CONFIG5 0x108
#define QPHY_V5_20_PCS_PCIE_G4_PRE_GAIN 0x15c #define QPHY_V5_20_PCS_PCIE_G4_PRE_GAIN 0x15c
#define QPHY_V5_20_PCS_PCIE_RX_MARGINING_CONFIG3 0x184 #define QPHY_V5_20_PCS_PCIE_RX_MARGINING_CONFIG3 0x184
#define QPHY_V5_20_PCS_LANE1_INSIG_SW_CTRL2 0xa24
#define QPHY_V5_20_PCS_LANE1_INSIG_MX_CTRL2 0xa28
#endif #endif
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#define QPHY_V5_20_PCS_G3S2_PRE_GAIN 0x170 #define QPHY_V5_20_PCS_G3S2_PRE_GAIN 0x170
#define QPHY_V5_20_PCS_RX_SIGDET_LVL 0x188 #define QPHY_V5_20_PCS_RX_SIGDET_LVL 0x188
#define QPHY_V5_20_PCS_EQ_CONFIG2 0x1d8
#define QPHY_V5_20_PCS_EQ_CONFIG4 0x1e0 #define QPHY_V5_20_PCS_EQ_CONFIG4 0x1e0
#define QPHY_V5_20_PCS_EQ_CONFIG5 0x1e4 #define QPHY_V5_20_PCS_EQ_CONFIG5 0x1e4
......
...@@ -11,6 +11,10 @@ ...@@ -11,6 +11,10 @@
#define QSERDES_V5_20_TX_RES_CODE_LANE_OFFSET_RX 0x34 #define QSERDES_V5_20_TX_RES_CODE_LANE_OFFSET_RX 0x34
#define QSERDES_V5_20_TX_LANE_MODE_1 0x78 #define QSERDES_V5_20_TX_LANE_MODE_1 0x78
#define QSERDES_V5_20_TX_LANE_MODE_2 0x7c #define QSERDES_V5_20_TX_LANE_MODE_2 0x7c
#define QSERDES_V5_20_TX_LANE_MODE_3 0x80
#define QSERDES_V5_20_TX_RCV_DETECT_LVL_2 0x90
#define QSERDES_V5_20_TX_VMODE_CTRL1 0xb0
#define QSERDES_V5_20_TX_PI_QEC_CTRL 0xcc
/* Only for QMP V5_20 PHY - RX registers */ /* Only for QMP V5_20 PHY - RX registers */
#define QSERDES_V5_20_RX_UCDR_FO_GAIN_RATE2 0x008 #define QSERDES_V5_20_RX_UCDR_FO_GAIN_RATE2 0x008
...@@ -19,16 +23,33 @@ ...@@ -19,16 +23,33 @@
#define QSERDES_V5_20_RX_AUX_DATA_THRESH_BIN_RATE_0_1 0x02c #define QSERDES_V5_20_RX_AUX_DATA_THRESH_BIN_RATE_0_1 0x02c
#define QSERDES_V5_20_RX_AUX_DATA_THRESH_BIN_RATE_2_3 0x030 #define QSERDES_V5_20_RX_AUX_DATA_THRESH_BIN_RATE_2_3 0x030
#define QSERDES_V5_20_RX_RX_IDAC_SAOFFSET 0x07c #define QSERDES_V5_20_RX_RX_IDAC_SAOFFSET 0x07c
#define QSERDES_V5_20_RX_DFE_1 0x088
#define QSERDES_V5_20_RX_DFE_2 0x08c
#define QSERDES_V5_20_RX_DFE_3 0x090 #define QSERDES_V5_20_RX_DFE_3 0x090
#define QSERDES_V5_20_RX_DFE_DAC_ENABLE1 0x0b4 #define QSERDES_V5_20_RX_DFE_DAC_ENABLE1 0x0b4
#define QSERDES_V5_20_RX_TX_ADAPT_PRE_THRESH1 0x0bc
#define QSERDES_V5_20_RX_TX_ADAPT_PRE_THRESH2 0x0c0
#define QSERDES_V5_20_RX_TX_ADAPT_POST_THRESH1 0x0c4 #define QSERDES_V5_20_RX_TX_ADAPT_POST_THRESH1 0x0c4
#define QSERDES_V5_20_RX_TX_ADAPT_POST_THRESH2 0x0c8 #define QSERDES_V5_20_RX_TX_ADAPT_POST_THRESH2 0x0c8
#define QSERDES_V5_20_RX_TX_ADAPT_MAIN_THRESH1 0x0cc
#define QSERDES_V5_20_RX_TX_ADAPT_MAIN_THRESH2 0x0d0
#define QSERDES_V5_20_RX_VGA_CAL_CNTRL1 0x0d4
#define QSERDES_V5_20_RX_VGA_CAL_CNTRL2 0x0d8
#define QSERDES_V5_20_RX_VGA_CAL_MAN_VAL 0x0dc #define QSERDES_V5_20_RX_VGA_CAL_MAN_VAL 0x0dc
#define QSERDES_V5_20_RX_GM_CAL 0x0ec #define QSERDES_V5_20_RX_GM_CAL 0x0ec
#define QSERDES_V5_20_RX_RX_EQU_ADAPTOR_CNTRL2 0x100
#define QSERDES_V5_20_RX_RX_EQU_ADAPTOR_CNTRL3 0x104
#define QSERDES_V5_20_RX_RX_EQU_ADAPTOR_CNTRL4 0x108 #define QSERDES_V5_20_RX_RX_EQU_ADAPTOR_CNTRL4 0x108
#define QSERDES_V5_20_RX_RX_EQ_OFFSET_ADAPTOR_CNTRL1 0x118
#define QSERDES_V5_20_RX_RX_OFFSET_ADAPTOR_CNTRL2 0x11c
#define QSERDES_V5_20_RX_SIGDET_ENABLES 0x120
#define QSERDES_V5_20_RX_SIGDET_CNTRL 0x124
#define QSERDES_V5_20_RX_SIGDET_DEGLITCH_CNTRL 0x12c
#define QSERDES_V5_20_RX_RX_MODE_RATE_0_1_B0 0x160
#define QSERDES_V5_20_RX_RX_MODE_RATE_0_1_B1 0x164 #define QSERDES_V5_20_RX_RX_MODE_RATE_0_1_B1 0x164
#define QSERDES_V5_20_RX_RX_MODE_RATE_0_1_B2 0x168 #define QSERDES_V5_20_RX_RX_MODE_RATE_0_1_B2 0x168
#define QSERDES_V5_20_RX_RX_MODE_RATE_0_1_B3 0x16c #define QSERDES_V5_20_RX_RX_MODE_RATE_0_1_B3 0x16c
#define QSERDES_V5_20_RX_RX_MODE_RATE_0_1_B4 0x170
#define QSERDES_V5_20_RX_RX_MODE_RATE_0_1_B5 0x174 #define QSERDES_V5_20_RX_RX_MODE_RATE_0_1_B5 0x174
#define QSERDES_V5_20_RX_RX_MODE_RATE_0_1_B6 0x178 #define QSERDES_V5_20_RX_RX_MODE_RATE_0_1_B6 0x178
#define QSERDES_V5_20_RX_RX_MODE_RATE2_B0 0x17c #define QSERDES_V5_20_RX_RX_MODE_RATE2_B0 0x17c
...@@ -46,7 +67,10 @@ ...@@ -46,7 +67,10 @@
#define QSERDES_V5_20_RX_RX_MODE_RATE3_B5 0x1ac #define QSERDES_V5_20_RX_RX_MODE_RATE3_B5 0x1ac
#define QSERDES_V5_20_RX_RX_MODE_RATE3_B6 0x1b0 #define QSERDES_V5_20_RX_RX_MODE_RATE3_B6 0x1b0
#define QSERDES_V5_20_RX_PHPRE_CTRL 0x1b4 #define QSERDES_V5_20_RX_PHPRE_CTRL 0x1b4
#define QSERDES_V5_20_RX_DFE_DAC_ENABLE2 0x1b8
#define QSERDES_V5_20_RX_DFE_EN_TIMER 0x1bc
#define QSERDES_V5_20_RX_DFE_CTLE_POST_CAL_OFFSET 0x1c0 #define QSERDES_V5_20_RX_DFE_CTLE_POST_CAL_OFFSET 0x1c0
#define QSERDES_V5_20_RX_DCC_CTRL1 0x1c4
#define QSERDES_V5_20_RX_RX_MARG_COARSE_THRESH1_RATE210 0x1f4 #define QSERDES_V5_20_RX_RX_MARG_COARSE_THRESH1_RATE210 0x1f4
#define QSERDES_V5_20_RX_RX_MARG_COARSE_THRESH1_RATE3 0x1f8 #define QSERDES_V5_20_RX_RX_MARG_COARSE_THRESH1_RATE3 0x1f8
#define QSERDES_V5_20_RX_RX_MARG_COARSE_THRESH2_RATE210 0x1fc #define QSERDES_V5_20_RX_RX_MARG_COARSE_THRESH2_RATE210 0x1fc
......
...@@ -349,6 +349,36 @@ static const struct qmp_phy_init_tbl sdm845_ufsphy_pcs[] = { ...@@ -349,6 +349,36 @@ static const struct qmp_phy_init_tbl sdm845_ufsphy_pcs[] = {
QMP_PHY_INIT_CFG(QPHY_V3_PCS_UFS_MULTI_LANE_CTRL1, 0x02), QMP_PHY_INIT_CFG(QPHY_V3_PCS_UFS_MULTI_LANE_CTRL1, 0x02),
}; };
static const struct qmp_phy_init_tbl sm7150_ufsphy_rx[] = {
QMP_PHY_INIT_CFG(QSERDES_V3_RX_SIGDET_LVL, 0x24),
QMP_PHY_INIT_CFG(QSERDES_V3_RX_SIGDET_CNTRL, 0x0f),
QMP_PHY_INIT_CFG(QSERDES_V3_RX_SIGDET_DEGLITCH_CNTRL, 0x1e),
QMP_PHY_INIT_CFG(QSERDES_V3_RX_RX_INTERFACE_MODE, 0x40),
QMP_PHY_INIT_CFG(QSERDES_V3_RX_UCDR_FASTLOCK_FO_GAIN, 0x0b),
QMP_PHY_INIT_CFG(QSERDES_V3_RX_RX_TERM_BW, 0x5b),
QMP_PHY_INIT_CFG(QSERDES_V3_RX_RX_EQU_ADAPTOR_CNTRL2, 0x06),
QMP_PHY_INIT_CFG(QSERDES_V3_RX_RX_EQU_ADAPTOR_CNTRL3, 0x04),
QMP_PHY_INIT_CFG(QSERDES_V3_RX_RX_EQU_ADAPTOR_CNTRL4, 0x1b),
QMP_PHY_INIT_CFG(QSERDES_V3_RX_UCDR_SVS_SO_GAIN_HALF, 0x04),
QMP_PHY_INIT_CFG(QSERDES_V3_RX_UCDR_SVS_SO_GAIN_QUARTER, 0x04),
QMP_PHY_INIT_CFG(QSERDES_V3_RX_UCDR_SVS_SO_GAIN, 0x04),
QMP_PHY_INIT_CFG(QSERDES_V3_RX_UCDR_SO_SATURATION_AND_ENABLE, 0x5b),
QMP_PHY_INIT_CFG(QSERDES_V3_RX_UCDR_PI_CONTROLS, 0x81),
QMP_PHY_INIT_CFG(QSERDES_V3_RX_UCDR_FASTLOCK_COUNT_LOW, 0x80),
QMP_PHY_INIT_CFG(QSERDES_V3_RX_RX_MODE_00, 0x59),
};
static const struct qmp_phy_init_tbl sm7150_ufsphy_pcs[] = {
QMP_PHY_INIT_CFG(QPHY_V3_PCS_UFS_RX_SIGDET_CTRL2, 0x6f),
QMP_PHY_INIT_CFG(QPHY_V3_PCS_UFS_TX_LARGE_AMP_DRV_LVL, 0x0f),
QMP_PHY_INIT_CFG(QPHY_V3_PCS_UFS_TX_SMALL_AMP_DRV_LVL, 0x02),
QMP_PHY_INIT_CFG(QPHY_V3_PCS_UFS_RX_SYM_RESYNC_CTRL, 0x03),
QMP_PHY_INIT_CFG(QPHY_V3_PCS_UFS_TX_MID_TERM_CTRL1, 0x43),
QMP_PHY_INIT_CFG(QPHY_V3_PCS_UFS_RX_SIGDET_CTRL1, 0x0f),
QMP_PHY_INIT_CFG(QPHY_V3_PCS_UFS_RX_MIN_HIBERN8_TIME, 0xff),
QMP_PHY_INIT_CFG(QPHY_V3_PCS_UFS_MULTI_LANE_CTRL1, 0x02),
};
static const struct qmp_phy_init_tbl sm8150_ufsphy_serdes[] = { static const struct qmp_phy_init_tbl sm8150_ufsphy_serdes[] = {
QMP_PHY_INIT_CFG(QSERDES_V4_COM_SYSCLK_EN_SEL, 0xd9), QMP_PHY_INIT_CFG(QSERDES_V4_COM_SYSCLK_EN_SEL, 0xd9),
QMP_PHY_INIT_CFG(QSERDES_V4_COM_HSCLK_SEL, 0x11), QMP_PHY_INIT_CFG(QSERDES_V4_COM_HSCLK_SEL, 0x11),
...@@ -823,6 +853,40 @@ static const struct qmp_phy_cfg msm8996_ufsphy_cfg = { ...@@ -823,6 +853,40 @@ static const struct qmp_phy_cfg msm8996_ufsphy_cfg = {
.no_pcs_sw_reset = true, .no_pcs_sw_reset = true,
}; };
static const struct qmp_phy_cfg sa8775p_ufsphy_cfg = {
.lanes = 2,
.offsets = &qmp_ufs_offsets,
.tbls = {
.serdes = sm8350_ufsphy_serdes,
.serdes_num = ARRAY_SIZE(sm8350_ufsphy_serdes),
.tx = sm8350_ufsphy_tx,
.tx_num = ARRAY_SIZE(sm8350_ufsphy_tx),
.rx = sm8350_ufsphy_rx,
.rx_num = ARRAY_SIZE(sm8350_ufsphy_rx),
.pcs = sm8350_ufsphy_pcs,
.pcs_num = ARRAY_SIZE(sm8350_ufsphy_pcs),
},
.tbls_hs_b = {
.serdes = sm8350_ufsphy_hs_b_serdes,
.serdes_num = ARRAY_SIZE(sm8350_ufsphy_hs_b_serdes),
},
.tbls_hs_g4 = {
.tx = sm8350_ufsphy_g4_tx,
.tx_num = ARRAY_SIZE(sm8350_ufsphy_g4_tx),
.rx = sm8350_ufsphy_g4_rx,
.rx_num = ARRAY_SIZE(sm8350_ufsphy_g4_rx),
.pcs = sm8350_ufsphy_g4_pcs,
.pcs_num = ARRAY_SIZE(sm8350_ufsphy_g4_pcs),
},
.clk_list = sm8450_ufs_phy_clk_l,
.num_clks = ARRAY_SIZE(sm8450_ufs_phy_clk_l),
.vreg_list = qmp_phy_vreg_l,
.num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
.regs = ufsphy_v5_regs_layout,
};
static const struct qmp_phy_cfg sc8280xp_ufsphy_cfg = { static const struct qmp_phy_cfg sc8280xp_ufsphy_cfg = {
.lanes = 2, .lanes = 2,
...@@ -911,6 +975,34 @@ static const struct qmp_phy_cfg sm6115_ufsphy_cfg = { ...@@ -911,6 +975,34 @@ static const struct qmp_phy_cfg sm6115_ufsphy_cfg = {
.no_pcs_sw_reset = true, .no_pcs_sw_reset = true,
}; };
static const struct qmp_phy_cfg sm7150_ufsphy_cfg = {
.lanes = 1,
.offsets = &qmp_ufs_offsets,
.tbls = {
.serdes = sdm845_ufsphy_serdes,
.serdes_num = ARRAY_SIZE(sdm845_ufsphy_serdes),
.tx = sdm845_ufsphy_tx,
.tx_num = ARRAY_SIZE(sdm845_ufsphy_tx),
.rx = sm7150_ufsphy_rx,
.rx_num = ARRAY_SIZE(sm7150_ufsphy_rx),
.pcs = sm7150_ufsphy_pcs,
.pcs_num = ARRAY_SIZE(sm7150_ufsphy_pcs),
},
.tbls_hs_b = {
.serdes = sdm845_ufsphy_hs_b_serdes,
.serdes_num = ARRAY_SIZE(sdm845_ufsphy_hs_b_serdes),
},
.clk_list = sdm845_ufs_phy_clk_l,
.num_clks = ARRAY_SIZE(sdm845_ufs_phy_clk_l),
.vreg_list = qmp_phy_vreg_l,
.num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
.regs = ufsphy_v3_regs_layout,
.no_pcs_sw_reset = true,
};
static const struct qmp_phy_cfg sm8150_ufsphy_cfg = { static const struct qmp_phy_cfg sm8150_ufsphy_cfg = {
.lanes = 2, .lanes = 2,
...@@ -1542,6 +1634,9 @@ static const struct of_device_id qmp_ufs_of_match_table[] = { ...@@ -1542,6 +1634,9 @@ static const struct of_device_id qmp_ufs_of_match_table[] = {
}, { }, {
.compatible = "qcom,msm8998-qmp-ufs-phy", .compatible = "qcom,msm8998-qmp-ufs-phy",
.data = &sdm845_ufsphy_cfg, .data = &sdm845_ufsphy_cfg,
}, {
.compatible = "qcom,sa8775p-qmp-ufs-phy",
.data = &sa8775p_ufsphy_cfg,
}, { }, {
.compatible = "qcom,sc8180x-qmp-ufs-phy", .compatible = "qcom,sc8180x-qmp-ufs-phy",
.data = &sm8150_ufsphy_cfg, .data = &sm8150_ufsphy_cfg,
...@@ -1560,6 +1655,9 @@ static const struct of_device_id qmp_ufs_of_match_table[] = { ...@@ -1560,6 +1655,9 @@ static const struct of_device_id qmp_ufs_of_match_table[] = {
}, { }, {
.compatible = "qcom,sm6350-qmp-ufs-phy", .compatible = "qcom,sm6350-qmp-ufs-phy",
.data = &sdm845_ufsphy_cfg, .data = &sdm845_ufsphy_cfg,
}, {
.compatible = "qcom,sm7150-qmp-ufs-phy",
.data = &sm7150_ufsphy_cfg,
}, { }, {
.compatible = "qcom,sm8150-qmp-ufs-phy", .compatible = "qcom,sm8150-qmp-ufs-phy",
.data = &sm8150_ufsphy_cfg, .data = &sm8150_ufsphy_cfg,
......
...@@ -126,11 +126,9 @@ static int rcar_gen3_phy_pcie_probe(struct platform_device *pdev) ...@@ -126,11 +126,9 @@ static int rcar_gen3_phy_pcie_probe(struct platform_device *pdev)
return error; return error;
} }
static int rcar_gen3_phy_pcie_remove(struct platform_device *pdev) static void rcar_gen3_phy_pcie_remove(struct platform_device *pdev)
{ {
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
return 0;
}; };
static struct platform_driver rcar_gen3_phy_driver = { static struct platform_driver rcar_gen3_phy_driver = {
...@@ -139,7 +137,7 @@ static struct platform_driver rcar_gen3_phy_driver = { ...@@ -139,7 +137,7 @@ static struct platform_driver rcar_gen3_phy_driver = {
.of_match_table = rcar_gen3_phy_pcie_match_table, .of_match_table = rcar_gen3_phy_pcie_match_table,
}, },
.probe = rcar_gen3_phy_pcie_probe, .probe = rcar_gen3_phy_pcie_probe,
.remove = rcar_gen3_phy_pcie_remove, .remove_new = rcar_gen3_phy_pcie_remove,
}; };
module_platform_driver(rcar_gen3_phy_driver); module_platform_driver(rcar_gen3_phy_driver);
......
...@@ -755,7 +755,7 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) ...@@ -755,7 +755,7 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int rcar_gen3_phy_usb2_remove(struct platform_device *pdev) static void rcar_gen3_phy_usb2_remove(struct platform_device *pdev)
{ {
struct rcar_gen3_chan *channel = platform_get_drvdata(pdev); struct rcar_gen3_chan *channel = platform_get_drvdata(pdev);
...@@ -763,8 +763,6 @@ static int rcar_gen3_phy_usb2_remove(struct platform_device *pdev) ...@@ -763,8 +763,6 @@ static int rcar_gen3_phy_usb2_remove(struct platform_device *pdev)
device_remove_file(&pdev->dev, &dev_attr_role); device_remove_file(&pdev->dev, &dev_attr_role);
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
return 0;
}; };
static struct platform_driver rcar_gen3_phy_usb2_driver = { static struct platform_driver rcar_gen3_phy_usb2_driver = {
...@@ -773,7 +771,7 @@ static struct platform_driver rcar_gen3_phy_usb2_driver = { ...@@ -773,7 +771,7 @@ static struct platform_driver rcar_gen3_phy_usb2_driver = {
.of_match_table = rcar_gen3_phy_usb2_match_table, .of_match_table = rcar_gen3_phy_usb2_match_table,
}, },
.probe = rcar_gen3_phy_usb2_probe, .probe = rcar_gen3_phy_usb2_probe,
.remove = rcar_gen3_phy_usb2_remove, .remove_new = rcar_gen3_phy_usb2_remove,
}; };
module_platform_driver(rcar_gen3_phy_usb2_driver); module_platform_driver(rcar_gen3_phy_usb2_driver);
......
...@@ -199,11 +199,9 @@ static int rcar_gen3_phy_usb3_probe(struct platform_device *pdev) ...@@ -199,11 +199,9 @@ static int rcar_gen3_phy_usb3_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int rcar_gen3_phy_usb3_remove(struct platform_device *pdev) static void rcar_gen3_phy_usb3_remove(struct platform_device *pdev)
{ {
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
return 0;
}; };
static struct platform_driver rcar_gen3_phy_usb3_driver = { static struct platform_driver rcar_gen3_phy_usb3_driver = {
...@@ -212,7 +210,7 @@ static struct platform_driver rcar_gen3_phy_usb3_driver = { ...@@ -212,7 +210,7 @@ static struct platform_driver rcar_gen3_phy_usb3_driver = {
.of_match_table = rcar_gen3_phy_usb3_match_table, .of_match_table = rcar_gen3_phy_usb3_match_table,
}, },
.probe = rcar_gen3_phy_usb3_probe, .probe = rcar_gen3_phy_usb3_probe,
.remove = rcar_gen3_phy_usb3_remove, .remove_new = rcar_gen3_phy_usb3_remove,
}; };
module_platform_driver(rcar_gen3_phy_usb3_driver); module_platform_driver(rcar_gen3_phy_usb3_driver);
......
...@@ -388,19 +388,17 @@ static int r8a779f0_eth_serdes_probe(struct platform_device *pdev) ...@@ -388,19 +388,17 @@ static int r8a779f0_eth_serdes_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int r8a779f0_eth_serdes_remove(struct platform_device *pdev) static void r8a779f0_eth_serdes_remove(struct platform_device *pdev)
{ {
pm_runtime_put(&pdev->dev); pm_runtime_put(&pdev->dev);
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
return 0;
} }
static struct platform_driver r8a779f0_eth_serdes_driver_platform = { static struct platform_driver r8a779f0_eth_serdes_driver_platform = {
.probe = r8a779f0_eth_serdes_probe, .probe = r8a779f0_eth_serdes_probe,
.remove = r8a779f0_eth_serdes_remove, .remove_new = r8a779f0_eth_serdes_remove,
.driver = { .driver = {
.name = "r8a779f0_eth_serdes", .name = "r8a779f0_eth_serdes",
.of_match_table = r8a779f0_eth_serdes_of_table, .of_match_table = r8a779f0_eth_serdes_of_table,
......
...@@ -459,13 +459,11 @@ static int rockchip_inno_csidphy_probe(struct platform_device *pdev) ...@@ -459,13 +459,11 @@ static int rockchip_inno_csidphy_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int rockchip_inno_csidphy_remove(struct platform_device *pdev) static void rockchip_inno_csidphy_remove(struct platform_device *pdev)
{ {
struct rockchip_inno_csidphy *priv = platform_get_drvdata(pdev); struct rockchip_inno_csidphy *priv = platform_get_drvdata(pdev);
pm_runtime_disable(priv->dev); pm_runtime_disable(priv->dev);
return 0;
} }
static struct platform_driver rockchip_inno_csidphy_driver = { static struct platform_driver rockchip_inno_csidphy_driver = {
...@@ -474,7 +472,7 @@ static struct platform_driver rockchip_inno_csidphy_driver = { ...@@ -474,7 +472,7 @@ static struct platform_driver rockchip_inno_csidphy_driver = {
.of_match_table = rockchip_inno_csidphy_match_id, .of_match_table = rockchip_inno_csidphy_match_id,
}, },
.probe = rockchip_inno_csidphy_probe, .probe = rockchip_inno_csidphy_probe,
.remove = rockchip_inno_csidphy_remove, .remove_new = rockchip_inno_csidphy_remove,
}; };
module_platform_driver(rockchip_inno_csidphy_driver); module_platform_driver(rockchip_inno_csidphy_driver);
......
...@@ -281,11 +281,6 @@ struct inno_mipi_dphy_timing inno_mipi_dphy_timing_table_max_2_5ghz[] = { ...@@ -281,11 +281,6 @@ struct inno_mipi_dphy_timing inno_mipi_dphy_timing_table_max_2_5ghz[] = {
{2500000000, 0x15, 0x54, 0x7f, 0x15, 0x6a}, {2500000000, 0x15, 0x54, 0x7f, 0x15, 0x6a},
}; };
static inline struct inno_dsidphy *hw_to_inno(struct clk_hw *hw)
{
return container_of(hw, struct inno_dsidphy, pll.hw);
}
static void phy_update_bits(struct inno_dsidphy *inno, static void phy_update_bits(struct inno_dsidphy *inno,
u8 first, u8 second, u8 mask, u8 val) u8 first, u8 second, u8 mask, u8 val)
{ {
...@@ -755,13 +750,11 @@ static int inno_dsidphy_probe(struct platform_device *pdev) ...@@ -755,13 +750,11 @@ static int inno_dsidphy_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int inno_dsidphy_remove(struct platform_device *pdev) static void inno_dsidphy_remove(struct platform_device *pdev)
{ {
struct inno_dsidphy *inno = platform_get_drvdata(pdev); struct inno_dsidphy *inno = platform_get_drvdata(pdev);
pm_runtime_disable(inno->dev); pm_runtime_disable(inno->dev);
return 0;
} }
static const struct of_device_id inno_dsidphy_of_match[] = { static const struct of_device_id inno_dsidphy_of_match[] = {
...@@ -788,7 +781,7 @@ static struct platform_driver inno_dsidphy_driver = { ...@@ -788,7 +781,7 @@ static struct platform_driver inno_dsidphy_driver = {
.of_match_table = of_match_ptr(inno_dsidphy_of_match), .of_match_table = of_match_ptr(inno_dsidphy_of_match),
}, },
.probe = inno_dsidphy_probe, .probe = inno_dsidphy_probe,
.remove = inno_dsidphy_remove, .remove_new = inno_dsidphy_remove,
}; };
module_platform_driver(inno_dsidphy_driver); module_platform_driver(inno_dsidphy_driver);
......
...@@ -1246,11 +1246,9 @@ static int inno_hdmi_phy_probe(struct platform_device *pdev) ...@@ -1246,11 +1246,9 @@ static int inno_hdmi_phy_probe(struct platform_device *pdev)
return PTR_ERR_OR_ZERO(phy_provider); return PTR_ERR_OR_ZERO(phy_provider);
} }
static int inno_hdmi_phy_remove(struct platform_device *pdev) static void inno_hdmi_phy_remove(struct platform_device *pdev)
{ {
of_clk_del_provider(pdev->dev.of_node); of_clk_del_provider(pdev->dev.of_node);
return 0;
} }
static const struct of_device_id inno_hdmi_phy_of_match[] = { static const struct of_device_id inno_hdmi_phy_of_match[] = {
...@@ -1266,7 +1264,7 @@ MODULE_DEVICE_TABLE(of, inno_hdmi_phy_of_match); ...@@ -1266,7 +1264,7 @@ MODULE_DEVICE_TABLE(of, inno_hdmi_phy_of_match);
static struct platform_driver inno_hdmi_phy_driver = { static struct platform_driver inno_hdmi_phy_driver = {
.probe = inno_hdmi_phy_probe, .probe = inno_hdmi_phy_probe,
.remove = inno_hdmi_phy_remove, .remove_new = inno_hdmi_phy_remove,
.driver = { .driver = {
.name = "inno-hdmi-phy", .name = "inno-hdmi-phy",
.of_match_table = inno_hdmi_phy_of_match, .of_match_table = inno_hdmi_phy_of_match,
......
...@@ -63,6 +63,9 @@ ...@@ -63,6 +63,9 @@
#define PHYREG18 0x44 #define PHYREG18 0x44
#define PHYREG18_PLL_LOOP 0x32 #define PHYREG18_PLL_LOOP 0x32
#define PHYREG27 0x6C
#define PHYREG27_RX_TRIM_RK3588 0x4C
#define PHYREG32 0x7C #define PHYREG32 0x7C
#define PHYREG32_SSC_MASK GENMASK(7, 4) #define PHYREG32_SSC_MASK GENMASK(7, 4)
#define PHYREG32_SSC_DIR_SHIFT 4 #define PHYREG32_SSC_DIR_SHIFT 4
...@@ -114,7 +117,10 @@ struct rockchip_combphy_grfcfg { ...@@ -114,7 +117,10 @@ struct rockchip_combphy_grfcfg {
struct combphy_reg con2_for_sata; struct combphy_reg con2_for_sata;
struct combphy_reg con3_for_sata; struct combphy_reg con3_for_sata;
struct combphy_reg pipe_con0_for_sata; struct combphy_reg pipe_con0_for_sata;
struct combphy_reg pipe_con1_for_sata;
struct combphy_reg pipe_xpcs_phy_ready; struct combphy_reg pipe_xpcs_phy_ready;
struct combphy_reg pipe_pcie1l0_sel;
struct combphy_reg pipe_pcie1l1_sel;
}; };
struct rockchip_combphy_cfg { struct rockchip_combphy_cfg {
...@@ -559,11 +565,189 @@ static const struct rockchip_combphy_cfg rk3568_combphy_cfgs = { ...@@ -559,11 +565,189 @@ static const struct rockchip_combphy_cfg rk3568_combphy_cfgs = {
.combphy_cfg = rk3568_combphy_cfg, .combphy_cfg = rk3568_combphy_cfg,
}; };
static int rk3588_combphy_cfg(struct rockchip_combphy_priv *priv)
{
const struct rockchip_combphy_grfcfg *cfg = priv->cfg->grfcfg;
unsigned long rate;
u32 val;
switch (priv->type) {
case PHY_TYPE_PCIE:
rockchip_combphy_param_write(priv->phy_grf, &cfg->con0_for_pcie, true);
rockchip_combphy_param_write(priv->phy_grf, &cfg->con1_for_pcie, true);
rockchip_combphy_param_write(priv->phy_grf, &cfg->con2_for_pcie, true);
rockchip_combphy_param_write(priv->phy_grf, &cfg->con3_for_pcie, true);
rockchip_combphy_param_write(priv->pipe_grf, &cfg->pipe_pcie1l0_sel, true);
rockchip_combphy_param_write(priv->pipe_grf, &cfg->pipe_pcie1l1_sel, true);
break;
case PHY_TYPE_USB3:
/* Set SSC downward spread spectrum */
rockchip_combphy_updatel(priv, PHYREG32_SSC_MASK,
PHYREG32_SSC_DOWNWARD << PHYREG32_SSC_DIR_SHIFT,
PHYREG32);
/* Enable adaptive CTLE for USB3.0 Rx. */
val = readl(priv->mmio + PHYREG15);
val |= PHYREG15_CTLE_EN;
writel(val, priv->mmio + PHYREG15);
/* Set PLL KVCO fine tuning signals. */
rockchip_combphy_updatel(priv, PHYREG33_PLL_KVCO_MASK,
PHYREG33_PLL_KVCO_VALUE << PHYREG33_PLL_KVCO_SHIFT,
PHYREG33);
/* Enable controlling random jitter. */
writel(PHYREG12_PLL_LPF_ADJ_VALUE, priv->mmio + PHYREG12);
/* Set PLL input clock divider 1/2. */
rockchip_combphy_updatel(priv, PHYREG6_PLL_DIV_MASK,
PHYREG6_PLL_DIV_2 << PHYREG6_PLL_DIV_SHIFT,
PHYREG6);
writel(PHYREG18_PLL_LOOP, priv->mmio + PHYREG18);
writel(PHYREG11_SU_TRIM_0_7, priv->mmio + PHYREG11);
rockchip_combphy_param_write(priv->phy_grf, &cfg->pipe_txcomp_sel, false);
rockchip_combphy_param_write(priv->phy_grf, &cfg->pipe_txelec_sel, false);
rockchip_combphy_param_write(priv->phy_grf, &cfg->usb_mode_set, true);
break;
case PHY_TYPE_SATA:
/* Enable adaptive CTLE for SATA Rx. */
val = readl(priv->mmio + PHYREG15);
val |= PHYREG15_CTLE_EN;
writel(val, priv->mmio + PHYREG15);
/*
* Set tx_rterm=50ohm and rx_rterm=44ohm for SATA.
* 0: 60ohm, 8: 50ohm 15: 44ohm (by step abort 1ohm)
*/
val = PHYREG7_TX_RTERM_50OHM << PHYREG7_TX_RTERM_SHIFT;
val |= PHYREG7_RX_RTERM_44OHM << PHYREG7_RX_RTERM_SHIFT;
writel(val, priv->mmio + PHYREG7);
rockchip_combphy_param_write(priv->phy_grf, &cfg->con0_for_sata, true);
rockchip_combphy_param_write(priv->phy_grf, &cfg->con1_for_sata, true);
rockchip_combphy_param_write(priv->phy_grf, &cfg->con2_for_sata, true);
rockchip_combphy_param_write(priv->phy_grf, &cfg->con3_for_sata, true);
rockchip_combphy_param_write(priv->pipe_grf, &cfg->pipe_con0_for_sata, true);
rockchip_combphy_param_write(priv->pipe_grf, &cfg->pipe_con1_for_sata, true);
break;
case PHY_TYPE_SGMII:
case PHY_TYPE_QSGMII:
default:
dev_err(priv->dev, "incompatible PHY type\n");
return -EINVAL;
}
rate = clk_get_rate(priv->refclk);
switch (rate) {
case REF_CLOCK_24MHz:
if (priv->type == PHY_TYPE_USB3 || priv->type == PHY_TYPE_SATA) {
/* Set ssc_cnt[9:0]=0101111101 & 31.5KHz. */
val = PHYREG15_SSC_CNT_VALUE << PHYREG15_SSC_CNT_SHIFT;
rockchip_combphy_updatel(priv, PHYREG15_SSC_CNT_MASK,
val, PHYREG15);
writel(PHYREG16_SSC_CNT_VALUE, priv->mmio + PHYREG16);
}
break;
case REF_CLOCK_25MHz:
rockchip_combphy_param_write(priv->phy_grf, &cfg->pipe_clk_25m, true);
break;
case REF_CLOCK_100MHz:
rockchip_combphy_param_write(priv->phy_grf, &cfg->pipe_clk_100m, true);
if (priv->type == PHY_TYPE_PCIE) {
/* PLL KVCO fine tuning. */
val = 4 << PHYREG33_PLL_KVCO_SHIFT;
rockchip_combphy_updatel(priv, PHYREG33_PLL_KVCO_MASK,
val, PHYREG33);
/* Enable controlling random jitter. */
writel(PHYREG12_PLL_LPF_ADJ_VALUE, priv->mmio + PHYREG12);
/* Set up rx_trim: PLL LPF C1 85pf R1 1.25kohm */
writel(PHYREG27_RX_TRIM_RK3588, priv->mmio + PHYREG27);
/* Set up su_trim: */
writel(PHYREG11_SU_TRIM_0_7, priv->mmio + PHYREG11);
} else if (priv->type == PHY_TYPE_SATA) {
/* downward spread spectrum +500ppm */
val = PHYREG32_SSC_DOWNWARD << PHYREG32_SSC_DIR_SHIFT;
val |= PHYREG32_SSC_OFFSET_500PPM << PHYREG32_SSC_OFFSET_SHIFT;
rockchip_combphy_updatel(priv, PHYREG32_SSC_MASK, val, PHYREG32);
}
break;
default:
dev_err(priv->dev, "Unsupported rate: %lu\n", rate);
return -EINVAL;
}
if (priv->ext_refclk) {
rockchip_combphy_param_write(priv->phy_grf, &cfg->pipe_clk_ext, true);
if (priv->type == PHY_TYPE_PCIE && rate == REF_CLOCK_100MHz) {
val = PHYREG13_RESISTER_HIGH_Z << PHYREG13_RESISTER_SHIFT;
val |= PHYREG13_CKRCV_AMP0;
rockchip_combphy_updatel(priv, PHYREG13_RESISTER_MASK, val, PHYREG13);
val = readl(priv->mmio + PHYREG14);
val |= PHYREG14_CKRCV_AMP1;
writel(val, priv->mmio + PHYREG14);
}
}
if (priv->enable_ssc) {
val = readl(priv->mmio + PHYREG8);
val |= PHYREG8_SSC_EN;
writel(val, priv->mmio + PHYREG8);
}
return 0;
}
static const struct rockchip_combphy_grfcfg rk3588_combphy_grfcfgs = {
/* pipe-phy-grf */
.pcie_mode_set = { 0x0000, 5, 0, 0x00, 0x11 },
.usb_mode_set = { 0x0000, 5, 0, 0x00, 0x04 },
.pipe_rxterm_set = { 0x0000, 12, 12, 0x00, 0x01 },
.pipe_txelec_set = { 0x0004, 1, 1, 0x00, 0x01 },
.pipe_txcomp_set = { 0x0004, 4, 4, 0x00, 0x01 },
.pipe_clk_25m = { 0x0004, 14, 13, 0x00, 0x01 },
.pipe_clk_100m = { 0x0004, 14, 13, 0x00, 0x02 },
.pipe_rxterm_sel = { 0x0008, 8, 8, 0x00, 0x01 },
.pipe_txelec_sel = { 0x0008, 12, 12, 0x00, 0x01 },
.pipe_txcomp_sel = { 0x0008, 15, 15, 0x00, 0x01 },
.pipe_clk_ext = { 0x000c, 9, 8, 0x02, 0x01 },
.pipe_phy_status = { 0x0034, 6, 6, 0x01, 0x00 },
.con0_for_pcie = { 0x0000, 15, 0, 0x00, 0x1000 },
.con1_for_pcie = { 0x0004, 15, 0, 0x00, 0x0000 },
.con2_for_pcie = { 0x0008, 15, 0, 0x00, 0x0101 },
.con3_for_pcie = { 0x000c, 15, 0, 0x00, 0x0200 },
.con0_for_sata = { 0x0000, 15, 0, 0x00, 0x0129 },
.con1_for_sata = { 0x0004, 15, 0, 0x00, 0x0000 },
.con2_for_sata = { 0x0008, 15, 0, 0x00, 0x80c1 },
.con3_for_sata = { 0x000c, 15, 0, 0x00, 0x0407 },
/* pipe-grf */
.pipe_con0_for_sata = { 0x0000, 11, 5, 0x00, 0x22 },
.pipe_con1_for_sata = { 0x0000, 2, 0, 0x00, 0x2 },
.pipe_pcie1l0_sel = { 0x0100, 0, 0, 0x01, 0x0 },
.pipe_pcie1l1_sel = { 0x0100, 1, 1, 0x01, 0x0 },
};
static const struct rockchip_combphy_cfg rk3588_combphy_cfgs = {
.grfcfg = &rk3588_combphy_grfcfgs,
.combphy_cfg = rk3588_combphy_cfg,
};
static const struct of_device_id rockchip_combphy_of_match[] = { static const struct of_device_id rockchip_combphy_of_match[] = {
{ {
.compatible = "rockchip,rk3568-naneng-combphy", .compatible = "rockchip,rk3568-naneng-combphy",
.data = &rk3568_combphy_cfgs, .data = &rk3568_combphy_cfgs,
}, },
{
.compatible = "rockchip,rk3588-naneng-combphy",
.data = &rk3588_combphy_cfgs,
},
{ }, { },
}; };
MODULE_DEVICE_TABLE(of, rockchip_combphy_of_match); MODULE_DEVICE_TABLE(of, rockchip_combphy_of_match);
......
...@@ -119,21 +119,6 @@ static inline void phy_wr_cfg(struct rockchip_pcie_phy *rk_phy, ...@@ -119,21 +119,6 @@ static inline void phy_wr_cfg(struct rockchip_pcie_phy *rk_phy,
PHY_CFG_WR_SHIFT)); PHY_CFG_WR_SHIFT));
} }
static inline u32 phy_rd_cfg(struct rockchip_pcie_phy *rk_phy,
u32 addr)
{
u32 val;
regmap_write(rk_phy->reg_base, rk_phy->phy_data->pcie_conf,
HIWORD_UPDATE(addr,
PHY_CFG_RD_MASK,
PHY_CFG_ADDR_SHIFT));
regmap_read(rk_phy->reg_base,
rk_phy->phy_data->pcie_status,
&val);
return val;
}
static int rockchip_pcie_phy_power_off(struct phy *phy) static int rockchip_pcie_phy_power_off(struct phy *phy)
{ {
struct phy_pcie_instance *inst = phy_get_drvdata(phy); struct phy_pcie_instance *inst = phy_get_drvdata(phy);
......
...@@ -1194,11 +1194,9 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev) ...@@ -1194,11 +1194,9 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int rockchip_typec_phy_remove(struct platform_device *pdev) static void rockchip_typec_phy_remove(struct platform_device *pdev)
{ {
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
return 0;
} }
static const struct of_device_id rockchip_typec_phy_dt_ids[] = { static const struct of_device_id rockchip_typec_phy_dt_ids[] = {
...@@ -1213,7 +1211,7 @@ MODULE_DEVICE_TABLE(of, rockchip_typec_phy_dt_ids); ...@@ -1213,7 +1211,7 @@ MODULE_DEVICE_TABLE(of, rockchip_typec_phy_dt_ids);
static struct platform_driver rockchip_typec_phy_driver = { static struct platform_driver rockchip_typec_phy_driver = {
.probe = rockchip_typec_phy_probe, .probe = rockchip_typec_phy_probe,
.remove = rockchip_typec_phy_remove, .remove_new = rockchip_typec_phy_remove,
.driver = { .driver = {
.name = "rockchip-typec-phy", .name = "rockchip-typec-phy",
.of_match_table = rockchip_typec_phy_dt_ids, .of_match_table = rockchip_typec_phy_dt_ids,
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/of.h> #include <linux/of.h>
...@@ -484,19 +485,11 @@ static inline void miphy28lp_pcie_config_gen(struct miphy28lp_phy *miphy_phy) ...@@ -484,19 +485,11 @@ static inline void miphy28lp_pcie_config_gen(struct miphy28lp_phy *miphy_phy)
static inline int miphy28lp_wait_compensation(struct miphy28lp_phy *miphy_phy) static inline int miphy28lp_wait_compensation(struct miphy28lp_phy *miphy_phy)
{ {
unsigned long finish = jiffies + 5 * HZ;
u8 val; u8 val;
/* Waiting for Compensation to complete */ /* Waiting for Compensation to complete */
do { return readb_relaxed_poll_timeout(miphy_phy->base + MIPHY_COMP_FSM_6,
val = readb_relaxed(miphy_phy->base + MIPHY_COMP_FSM_6); val, val & COMP_DONE, 1, 5 * USEC_PER_SEC);
if (time_after_eq(jiffies, finish))
return -EBUSY;
cpu_relax();
} while (!(val & COMP_DONE));
return 0;
} }
...@@ -805,7 +798,6 @@ static inline void miphy28lp_configure_usb3(struct miphy28lp_phy *miphy_phy) ...@@ -805,7 +798,6 @@ static inline void miphy28lp_configure_usb3(struct miphy28lp_phy *miphy_phy)
static inline int miphy_is_ready(struct miphy28lp_phy *miphy_phy) static inline int miphy_is_ready(struct miphy28lp_phy *miphy_phy)
{ {
unsigned long finish = jiffies + 5 * HZ;
u8 mask = HFC_PLL | HFC_RDY; u8 mask = HFC_PLL | HFC_RDY;
u8 val; u8 val;
...@@ -816,21 +808,14 @@ static inline int miphy_is_ready(struct miphy28lp_phy *miphy_phy) ...@@ -816,21 +808,14 @@ static inline int miphy_is_ready(struct miphy28lp_phy *miphy_phy)
if (miphy_phy->type == PHY_TYPE_SATA) if (miphy_phy->type == PHY_TYPE_SATA)
mask |= PHY_RDY; mask |= PHY_RDY;
do { return readb_relaxed_poll_timeout(miphy_phy->base + MIPHY_STATUS_1,
val = readb_relaxed(miphy_phy->base + MIPHY_STATUS_1); val, (val & mask) == mask, 1,
if ((val & mask) != mask) 5 * USEC_PER_SEC);
cpu_relax();
else
return 0;
} while (!time_after_eq(jiffies, finish));
return -EBUSY;
} }
static int miphy_osc_is_ready(struct miphy28lp_phy *miphy_phy) static int miphy_osc_is_ready(struct miphy28lp_phy *miphy_phy)
{ {
struct miphy28lp_dev *miphy_dev = miphy_phy->phydev; struct miphy28lp_dev *miphy_dev = miphy_phy->phydev;
unsigned long finish = jiffies + 5 * HZ;
u32 val; u32 val;
if (!miphy_phy->osc_rdy) if (!miphy_phy->osc_rdy)
...@@ -839,17 +824,10 @@ static int miphy_osc_is_ready(struct miphy28lp_phy *miphy_phy) ...@@ -839,17 +824,10 @@ static int miphy_osc_is_ready(struct miphy28lp_phy *miphy_phy)
if (!miphy_phy->syscfg_reg[SYSCFG_STATUS]) if (!miphy_phy->syscfg_reg[SYSCFG_STATUS])
return -EINVAL; return -EINVAL;
do { return regmap_read_poll_timeout(miphy_dev->regmap,
regmap_read(miphy_dev->regmap, miphy_phy->syscfg_reg[SYSCFG_STATUS],
miphy_phy->syscfg_reg[SYSCFG_STATUS], &val); val, val & MIPHY_OSC_RDY, 1,
5 * USEC_PER_SEC);
if ((val & MIPHY_OSC_RDY) != MIPHY_OSC_RDY)
cpu_relax();
else
return 0;
} while (!time_after_eq(jiffies, finish));
return -EBUSY;
} }
static int miphy28lp_get_resource_byname(struct device_node *child, static int miphy28lp_get_resource_byname(struct device_node *child,
......
...@@ -246,7 +246,7 @@ static struct platform_driver spear1310_miphy_driver = { ...@@ -246,7 +246,7 @@ static struct platform_driver spear1310_miphy_driver = {
.probe = spear1310_miphy_probe, .probe = spear1310_miphy_probe,
.driver = { .driver = {
.name = "spear1310-miphy", .name = "spear1310-miphy",
.of_match_table = of_match_ptr(spear1310_miphy_of_match), .of_match_table = spear1310_miphy_of_match,
}, },
}; };
......
...@@ -279,7 +279,7 @@ static struct platform_driver spear1340_miphy_driver = { ...@@ -279,7 +279,7 @@ static struct platform_driver spear1340_miphy_driver = {
.driver = { .driver = {
.name = "spear1340-miphy", .name = "spear1340-miphy",
.pm = &spear1340_miphy_pm_ops, .pm = &spear1340_miphy_pm_ops,
.of_match_table = of_match_ptr(spear1340_miphy_of_match), .of_match_table = spear1340_miphy_of_match,
}, },
}; };
......
...@@ -317,6 +317,9 @@ static int stm32_usbphyc_pll_enable(struct stm32_usbphyc *usbphyc) ...@@ -317,6 +317,9 @@ static int stm32_usbphyc_pll_enable(struct stm32_usbphyc *usbphyc)
stm32_usbphyc_set_bits(pll_reg, PLLEN); stm32_usbphyc_set_bits(pll_reg, PLLEN);
/* Wait for maximum lock time */
usleep_range(200, 300);
return 0; return 0;
reg_disable: reg_disable:
...@@ -766,7 +769,7 @@ static int stm32_usbphyc_probe(struct platform_device *pdev) ...@@ -766,7 +769,7 @@ static int stm32_usbphyc_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int stm32_usbphyc_remove(struct platform_device *pdev) static void stm32_usbphyc_remove(struct platform_device *pdev)
{ {
struct stm32_usbphyc *usbphyc = dev_get_drvdata(&pdev->dev); struct stm32_usbphyc *usbphyc = dev_get_drvdata(&pdev->dev);
int port; int port;
...@@ -779,8 +782,6 @@ static int stm32_usbphyc_remove(struct platform_device *pdev) ...@@ -779,8 +782,6 @@ static int stm32_usbphyc_remove(struct platform_device *pdev)
stm32_usbphyc_clk48_unregister(usbphyc); stm32_usbphyc_clk48_unregister(usbphyc);
clk_disable_unprepare(usbphyc->clk); clk_disable_unprepare(usbphyc->clk);
return 0;
} }
static int __maybe_unused stm32_usbphyc_resume(struct device *dev) static int __maybe_unused stm32_usbphyc_resume(struct device *dev)
...@@ -810,7 +811,7 @@ MODULE_DEVICE_TABLE(of, stm32_usbphyc_of_match); ...@@ -810,7 +811,7 @@ MODULE_DEVICE_TABLE(of, stm32_usbphyc_of_match);
static struct platform_driver stm32_usbphyc_driver = { static struct platform_driver stm32_usbphyc_driver = {
.probe = stm32_usbphyc_probe, .probe = stm32_usbphyc_probe,
.remove = stm32_usbphyc_remove, .remove_new = stm32_usbphyc_remove,
.driver = { .driver = {
.of_match_table = stm32_usbphyc_of_match, .of_match_table = stm32_usbphyc_of_match,
.name = "stm32-usbphyc", .name = "stm32-usbphyc",
......
...@@ -145,6 +145,8 @@ ...@@ -145,6 +145,8 @@
#define MODE_HS MODE(0) #define MODE_HS MODE(0)
#define MODE_RST MODE(1) #define MODE_RST MODE(1)
#define XUSB_AO_UTMIP_SLEEPWALK_STATUS(x) (0xa0 + (x) * 4)
#define XUSB_AO_UTMIP_SLEEPWALK_CFG(x) (0xd0 + (x) * 4) #define XUSB_AO_UTMIP_SLEEPWALK_CFG(x) (0xd0 + (x) * 4)
#define XUSB_AO_UHSIC_SLEEPWALK_CFG(x) (0xf0 + (x) * 4) #define XUSB_AO_UHSIC_SLEEPWALK_CFG(x) (0xf0 + (x) * 4)
#define FAKE_USBOP_VAL BIT(0) #define FAKE_USBOP_VAL BIT(0)
...@@ -172,24 +174,30 @@ ...@@ -172,24 +174,30 @@
#define AP_A BIT(4) #define AP_A BIT(4)
#define AN_A BIT(5) #define AN_A BIT(5)
#define HIGHZ_A BIT(6) #define HIGHZ_A BIT(6)
#define MASTER_ENABLE_A BIT(7)
/* phase B */ /* phase B */
#define USBOP_RPD_B BIT(8) #define USBOP_RPD_B BIT(8)
#define USBON_RPD_B BIT(9) #define USBON_RPD_B BIT(9)
#define AP_B BIT(12) #define AP_B BIT(12)
#define AN_B BIT(13) #define AN_B BIT(13)
#define HIGHZ_B BIT(14) #define HIGHZ_B BIT(14)
#define MASTER_ENABLE_B BIT(15)
/* phase C */ /* phase C */
#define USBOP_RPD_C BIT(16) #define USBOP_RPD_C BIT(16)
#define USBON_RPD_C BIT(17) #define USBON_RPD_C BIT(17)
#define AP_C BIT(20) #define AP_C BIT(20)
#define AN_C BIT(21) #define AN_C BIT(21)
#define HIGHZ_C BIT(22) #define HIGHZ_C BIT(22)
#define MASTER_ENABLE_C BIT(23)
/* phase D */ /* phase D */
#define USBOP_RPD_D BIT(24) #define USBOP_RPD_D BIT(24)
#define USBON_RPD_D BIT(25) #define USBON_RPD_D BIT(25)
#define AP_D BIT(28) #define AP_D BIT(28)
#define AN_D BIT(29) #define AN_D BIT(29)
#define HIGHZ_D BIT(30) #define HIGHZ_D BIT(30)
#define MASTER_ENABLE_D BIT(31)
#define MASTER_ENABLE_B_C_D \
(MASTER_ENABLE_B | MASTER_ENABLE_C | MASTER_ENABLE_D)
#define XUSB_AO_UHSIC_SLEEPWALK(x) (0x120 + (x) * 4) #define XUSB_AO_UHSIC_SLEEPWALK(x) (0x120 + (x) * 4)
/* phase A */ /* phase A */
...@@ -417,6 +425,8 @@ static int tegra186_utmi_enable_phy_sleepwalk(struct tegra_xusb_lane *lane, ...@@ -417,6 +425,8 @@ static int tegra186_utmi_enable_phy_sleepwalk(struct tegra_xusb_lane *lane,
value |= HIGHZ_A; value |= HIGHZ_A;
value |= AP_A; value |= AP_A;
value |= AN_B | AN_C | AN_D; value |= AN_B | AN_C | AN_D;
if (padctl->soc->supports_lp_cfg_en)
value |= MASTER_ENABLE_B_C_D;
break; break;
case USB_SPEED_LOW: case USB_SPEED_LOW:
...@@ -424,6 +434,8 @@ static int tegra186_utmi_enable_phy_sleepwalk(struct tegra_xusb_lane *lane, ...@@ -424,6 +434,8 @@ static int tegra186_utmi_enable_phy_sleepwalk(struct tegra_xusb_lane *lane,
value |= HIGHZ_A; value |= HIGHZ_A;
value |= AN_A; value |= AN_A;
value |= AP_B | AP_C | AP_D; value |= AP_B | AP_C | AP_D;
if (padctl->soc->supports_lp_cfg_en)
value |= MASTER_ENABLE_B_C_D;
break; break;
default: default:
...@@ -488,6 +500,13 @@ static int tegra186_utmi_disable_phy_sleepwalk(struct tegra_xusb_lane *lane) ...@@ -488,6 +500,13 @@ static int tegra186_utmi_disable_phy_sleepwalk(struct tegra_xusb_lane *lane)
value |= WAKE_VAL_NONE; value |= WAKE_VAL_NONE;
ao_writel(priv, value, XUSB_AO_UTMIP_SLEEPWALK_CFG(index)); ao_writel(priv, value, XUSB_AO_UTMIP_SLEEPWALK_CFG(index));
if (padctl->soc->supports_lp_cfg_en) {
/* disable the four stages of sleepwalk */
value = ao_readl(priv, XUSB_AO_UTMIP_SLEEPWALK(index));
value &= ~(MASTER_ENABLE_A | MASTER_ENABLE_B_C_D);
ao_writel(priv, value, XUSB_AO_UTMIP_SLEEPWALK(index));
}
/* power down the line state detectors of the port */ /* power down the line state detectors of the port */
value = ao_readl(priv, XUSB_AO_UTMIP_PAD_CFG(index)); value = ao_readl(priv, XUSB_AO_UTMIP_PAD_CFG(index));
value |= USBOP_VAL_PD | USBON_VAL_PD; value |= USBOP_VAL_PD | USBON_VAL_PD;
...@@ -1673,6 +1692,7 @@ const struct tegra_xusb_padctl_soc tegra234_xusb_padctl_soc = { ...@@ -1673,6 +1692,7 @@ const struct tegra_xusb_padctl_soc tegra234_xusb_padctl_soc = {
.supports_gen2 = true, .supports_gen2 = true,
.poll_trk_completed = true, .poll_trk_completed = true,
.trk_hw_mode = true, .trk_hw_mode = true,
.supports_lp_cfg_en = true,
}; };
EXPORT_SYMBOL_GPL(tegra234_xusb_padctl_soc); EXPORT_SYMBOL_GPL(tegra234_xusb_padctl_soc);
#endif #endif
......
...@@ -805,6 +805,7 @@ static int tegra_xusb_add_usb2_port(struct tegra_xusb_padctl *padctl, ...@@ -805,6 +805,7 @@ static int tegra_xusb_add_usb2_port(struct tegra_xusb_padctl *padctl,
usb2->base.lane = usb2->base.ops->map(&usb2->base); usb2->base.lane = usb2->base.ops->map(&usb2->base);
if (IS_ERR(usb2->base.lane)) { if (IS_ERR(usb2->base.lane)) {
err = PTR_ERR(usb2->base.lane); err = PTR_ERR(usb2->base.lane);
tegra_xusb_port_unregister(&usb2->base);
goto out; goto out;
} }
...@@ -871,6 +872,7 @@ static int tegra_xusb_add_ulpi_port(struct tegra_xusb_padctl *padctl, ...@@ -871,6 +872,7 @@ static int tegra_xusb_add_ulpi_port(struct tegra_xusb_padctl *padctl,
ulpi->base.lane = ulpi->base.ops->map(&ulpi->base); ulpi->base.lane = ulpi->base.ops->map(&ulpi->base);
if (IS_ERR(ulpi->base.lane)) { if (IS_ERR(ulpi->base.lane)) {
err = PTR_ERR(ulpi->base.lane); err = PTR_ERR(ulpi->base.lane);
tegra_xusb_port_unregister(&ulpi->base);
goto out; goto out;
} }
...@@ -1267,7 +1269,7 @@ static int tegra_xusb_padctl_probe(struct platform_device *pdev) ...@@ -1267,7 +1269,7 @@ static int tegra_xusb_padctl_probe(struct platform_device *pdev)
return err; return err;
} }
static int tegra_xusb_padctl_remove(struct platform_device *pdev) static void tegra_xusb_padctl_remove(struct platform_device *pdev)
{ {
struct tegra_xusb_padctl *padctl = platform_get_drvdata(pdev); struct tegra_xusb_padctl *padctl = platform_get_drvdata(pdev);
int err; int err;
...@@ -1285,8 +1287,6 @@ static int tegra_xusb_padctl_remove(struct platform_device *pdev) ...@@ -1285,8 +1287,6 @@ static int tegra_xusb_padctl_remove(struct platform_device *pdev)
dev_err(&pdev->dev, "failed to assert reset: %d\n", err); dev_err(&pdev->dev, "failed to assert reset: %d\n", err);
padctl->soc->ops->remove(padctl); padctl->soc->ops->remove(padctl);
return 0;
} }
static __maybe_unused int tegra_xusb_padctl_suspend_noirq(struct device *dev) static __maybe_unused int tegra_xusb_padctl_suspend_noirq(struct device *dev)
...@@ -1321,7 +1321,7 @@ static struct platform_driver tegra_xusb_padctl_driver = { ...@@ -1321,7 +1321,7 @@ static struct platform_driver tegra_xusb_padctl_driver = {
.pm = &tegra_xusb_padctl_pm_ops, .pm = &tegra_xusb_padctl_pm_ops,
}, },
.probe = tegra_xusb_padctl_probe, .probe = tegra_xusb_padctl_probe,
.remove = tegra_xusb_padctl_remove, .remove_new = tegra_xusb_padctl_remove,
}; };
module_platform_driver(tegra_xusb_padctl_driver); module_platform_driver(tegra_xusb_padctl_driver);
......
...@@ -434,6 +434,7 @@ struct tegra_xusb_padctl_soc { ...@@ -434,6 +434,7 @@ struct tegra_xusb_padctl_soc {
bool need_fake_usb3_port; bool need_fake_usb3_port;
bool poll_trk_completed; bool poll_trk_completed;
bool trk_hw_mode; bool trk_hw_mode;
bool supports_lp_cfg_en;
}; };
struct tegra_xusb_padctl { struct tegra_xusb_padctl {
......
...@@ -842,20 +842,18 @@ static int serdes_am654_probe(struct platform_device *pdev) ...@@ -842,20 +842,18 @@ static int serdes_am654_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int serdes_am654_remove(struct platform_device *pdev) static void serdes_am654_remove(struct platform_device *pdev)
{ {
struct serdes_am654 *am654_phy = platform_get_drvdata(pdev); struct serdes_am654 *am654_phy = platform_get_drvdata(pdev);
struct device_node *node = am654_phy->of_node; struct device_node *node = am654_phy->of_node;
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
of_clk_del_provider(node); of_clk_del_provider(node);
return 0;
} }
static struct platform_driver serdes_am654_driver = { static struct platform_driver serdes_am654_driver = {
.probe = serdes_am654_probe, .probe = serdes_am654_probe,
.remove = serdes_am654_remove, .remove_new = serdes_am654_remove,
.driver = { .driver = {
.name = "phy-am654", .name = "phy-am654",
.of_match_table = serdes_am654_id_table, .of_match_table = serdes_am654_id_table,
......
...@@ -211,7 +211,7 @@ static int da8xx_usb_phy_probe(struct platform_device *pdev) ...@@ -211,7 +211,7 @@ static int da8xx_usb_phy_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int da8xx_usb_phy_remove(struct platform_device *pdev) static void da8xx_usb_phy_remove(struct platform_device *pdev)
{ {
struct da8xx_usb_phy *d_phy = platform_get_drvdata(pdev); struct da8xx_usb_phy *d_phy = platform_get_drvdata(pdev);
...@@ -219,8 +219,6 @@ static int da8xx_usb_phy_remove(struct platform_device *pdev) ...@@ -219,8 +219,6 @@ static int da8xx_usb_phy_remove(struct platform_device *pdev)
phy_remove_lookup(d_phy->usb20_phy, "usb-phy", "musb-da8xx"); phy_remove_lookup(d_phy->usb20_phy, "usb-phy", "musb-da8xx");
phy_remove_lookup(d_phy->usb11_phy, "usb-phy", "ohci-da8xx"); phy_remove_lookup(d_phy->usb11_phy, "usb-phy", "ohci-da8xx");
} }
return 0;
} }
static const struct of_device_id da8xx_usb_phy_ids[] = { static const struct of_device_id da8xx_usb_phy_ids[] = {
...@@ -231,7 +229,7 @@ MODULE_DEVICE_TABLE(of, da8xx_usb_phy_ids); ...@@ -231,7 +229,7 @@ MODULE_DEVICE_TABLE(of, da8xx_usb_phy_ids);
static struct platform_driver da8xx_usb_phy_driver = { static struct platform_driver da8xx_usb_phy_driver = {
.probe = da8xx_usb_phy_probe, .probe = da8xx_usb_phy_probe,
.remove = da8xx_usb_phy_remove, .remove_new = da8xx_usb_phy_remove,
.driver = { .driver = {
.name = "da8xx-usb-phy", .name = "da8xx-usb-phy",
.of_match_table = da8xx_usb_phy_ids, .of_match_table = da8xx_usb_phy_ids,
......
...@@ -257,20 +257,18 @@ static int dm816x_usb_phy_probe(struct platform_device *pdev) ...@@ -257,20 +257,18 @@ static int dm816x_usb_phy_probe(struct platform_device *pdev)
return error; return error;
} }
static int dm816x_usb_phy_remove(struct platform_device *pdev) static void dm816x_usb_phy_remove(struct platform_device *pdev)
{ {
struct dm816x_usb_phy *phy = platform_get_drvdata(pdev); struct dm816x_usb_phy *phy = platform_get_drvdata(pdev);
usb_remove_phy(&phy->phy); usb_remove_phy(&phy->phy);
pm_runtime_disable(phy->dev); pm_runtime_disable(phy->dev);
clk_unprepare(phy->refclk); clk_unprepare(phy->refclk);
return 0;
} }
static struct platform_driver dm816x_usb_phy_driver = { static struct platform_driver dm816x_usb_phy_driver = {
.probe = dm816x_usb_phy_probe, .probe = dm816x_usb_phy_probe,
.remove = dm816x_usb_phy_remove, .remove_new = dm816x_usb_phy_remove,
.driver = { .driver = {
.name = "dm816x-usb-phy", .name = "dm816x-usb-phy",
.pm = &dm816x_usb_phy_pm_ops, .pm = &dm816x_usb_phy_pm_ops,
......
...@@ -443,18 +443,17 @@ static int wiz_mode_select(struct wiz *wiz) ...@@ -443,18 +443,17 @@ static int wiz_mode_select(struct wiz *wiz)
int i; int i;
for (i = 0; i < num_lanes; i++) { for (i = 0; i < num_lanes; i++) {
if (wiz->lane_phy_type[i] == PHY_TYPE_DP) if (wiz->lane_phy_type[i] == PHY_TYPE_DP) {
mode = LANE_MODE_GEN1; mode = LANE_MODE_GEN1;
else if (wiz->lane_phy_type[i] == PHY_TYPE_QSGMII) } else if (wiz->lane_phy_type[i] == PHY_TYPE_QSGMII) {
mode = LANE_MODE_GEN2; mode = LANE_MODE_GEN2;
else } else if (wiz->lane_phy_type[i] == PHY_TYPE_USXGMII) {
continue;
if (wiz->lane_phy_type[i] == PHY_TYPE_USXGMII) {
ret = regmap_field_write(wiz->p0_mac_src_sel[i], 0x3); ret = regmap_field_write(wiz->p0_mac_src_sel[i], 0x3);
ret = regmap_field_write(wiz->p0_rxfclk_sel[i], 0x3); ret = regmap_field_write(wiz->p0_rxfclk_sel[i], 0x3);
ret = regmap_field_write(wiz->p0_refclk_sel[i], 0x3); ret = regmap_field_write(wiz->p0_refclk_sel[i], 0x3);
mode = LANE_MODE_GEN1; mode = LANE_MODE_GEN1;
} else {
continue;
} }
ret = regmap_field_write(wiz->p_standard_mode[i], mode); ret = regmap_field_write(wiz->p_standard_mode[i], mode);
...@@ -1235,6 +1234,8 @@ static int wiz_phy_fullrt_div(struct wiz *wiz, int lane) ...@@ -1235,6 +1234,8 @@ static int wiz_phy_fullrt_div(struct wiz *wiz, int lane)
if (wiz->lane_phy_type[lane] == PHY_TYPE_PCIE) if (wiz->lane_phy_type[lane] == PHY_TYPE_PCIE)
return regmap_field_write(wiz->p0_fullrt_div[lane], 0x1); return regmap_field_write(wiz->p0_fullrt_div[lane], 0x1);
break; break;
case J721E_WIZ_16G:
case J721E_WIZ_10G: case J721E_WIZ_10G:
case J7200_WIZ_10G: case J7200_WIZ_10G:
case J721S2_WIZ_10G: case J721S2_WIZ_10G:
...@@ -1636,7 +1637,7 @@ static int wiz_probe(struct platform_device *pdev) ...@@ -1636,7 +1637,7 @@ static int wiz_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int wiz_remove(struct platform_device *pdev) static void wiz_remove(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct device_node *node = dev->of_node; struct device_node *node = dev->of_node;
...@@ -1650,13 +1651,11 @@ static int wiz_remove(struct platform_device *pdev) ...@@ -1650,13 +1651,11 @@ static int wiz_remove(struct platform_device *pdev)
wiz_clock_cleanup(wiz, node); wiz_clock_cleanup(wiz, node);
pm_runtime_put(dev); pm_runtime_put(dev);
pm_runtime_disable(dev); pm_runtime_disable(dev);
return 0;
} }
static struct platform_driver wiz_driver = { static struct platform_driver wiz_driver = {
.probe = wiz_probe, .probe = wiz_probe,
.remove = wiz_remove, .remove_new = wiz_remove,
.driver = { .driver = {
.name = "wiz", .name = "wiz",
.of_match_table = wiz_id_table, .of_match_table = wiz_id_table,
......
...@@ -445,11 +445,9 @@ static int omap_usb2_probe(struct platform_device *pdev) ...@@ -445,11 +445,9 @@ static int omap_usb2_probe(struct platform_device *pdev)
PTR_ERR(phy->wkupclk)); PTR_ERR(phy->wkupclk));
phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k"); phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k");
if (IS_ERR(phy->wkupclk)) { if (IS_ERR(phy->wkupclk))
if (PTR_ERR(phy->wkupclk) != -EPROBE_DEFER) return dev_err_probe(&pdev->dev, PTR_ERR(phy->wkupclk),
dev_err(&pdev->dev, "unable to get usb_phy_cm_clk32k\n"); "unable to get usb_phy_cm_clk32k\n");
return PTR_ERR(phy->wkupclk);
}
dev_warn(&pdev->dev, dev_warn(&pdev->dev,
"found usb_phy_cm_clk32k, please fix DTS\n"); "found usb_phy_cm_clk32k, please fix DTS\n");
...@@ -506,19 +504,17 @@ static int omap_usb2_probe(struct platform_device *pdev) ...@@ -506,19 +504,17 @@ static int omap_usb2_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int omap_usb2_remove(struct platform_device *pdev) static void omap_usb2_remove(struct platform_device *pdev)
{ {
struct omap_usb *phy = platform_get_drvdata(pdev); struct omap_usb *phy = platform_get_drvdata(pdev);
usb_remove_phy(&phy->phy); usb_remove_phy(&phy->phy);
pm_runtime_disable(phy->dev); pm_runtime_disable(phy->dev);
return 0;
} }
static struct platform_driver omap_usb2_driver = { static struct platform_driver omap_usb2_driver = {
.probe = omap_usb2_probe, .probe = omap_usb2_probe,
.remove = omap_usb2_remove, .remove_new = omap_usb2_remove,
.driver = { .driver = {
.name = "omap-usb2", .name = "omap-usb2",
.of_match_table = omap_usb2_id_table, .of_match_table = omap_usb2_id_table,
......
...@@ -841,7 +841,7 @@ static int ti_pipe3_probe(struct platform_device *pdev) ...@@ -841,7 +841,7 @@ static int ti_pipe3_probe(struct platform_device *pdev)
return PTR_ERR_OR_ZERO(phy_provider); return PTR_ERR_OR_ZERO(phy_provider);
} }
static int ti_pipe3_remove(struct platform_device *pdev) static void ti_pipe3_remove(struct platform_device *pdev)
{ {
struct ti_pipe3 *phy = platform_get_drvdata(pdev); struct ti_pipe3 *phy = platform_get_drvdata(pdev);
...@@ -850,8 +850,6 @@ static int ti_pipe3_remove(struct platform_device *pdev) ...@@ -850,8 +850,6 @@ static int ti_pipe3_remove(struct platform_device *pdev)
phy->sata_refclk_enabled = false; phy->sata_refclk_enabled = false;
} }
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
return 0;
} }
static int ti_pipe3_enable_clocks(struct ti_pipe3 *phy) static int ti_pipe3_enable_clocks(struct ti_pipe3 *phy)
...@@ -928,7 +926,7 @@ MODULE_DEVICE_TABLE(of, ti_pipe3_id_table); ...@@ -928,7 +926,7 @@ MODULE_DEVICE_TABLE(of, ti_pipe3_id_table);
static struct platform_driver ti_pipe3_driver = { static struct platform_driver ti_pipe3_driver = {
.probe = ti_pipe3_probe, .probe = ti_pipe3_probe,
.remove = ti_pipe3_remove, .remove_new = ti_pipe3_remove,
.driver = { .driver = {
.name = "ti-pipe3", .name = "ti-pipe3",
.of_match_table = ti_pipe3_id_table, .of_match_table = ti_pipe3_id_table,
......
This diff is collapsed.
This diff is collapsed.
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