mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
Merge tag 'phy-for-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy
Pull generic phy updates from Vinod Koul:
"New Support:
- Qualcomm sa8775p qmp-pcie, IPQ5018, and SC7280 qmp-ufs support
- Mediatek MT8188 support
Updates:
- Device tree device_get_match_data() usage and dropping
of_match_device() calls
- Qualcomm qmp usb and combo phy updates for v6 register layout
- Qualcomm eusb2-repeater updates for tuning overrides, regmap fields
- STih407 usb binding and ralink usb-phy yaml conversion
- renesas r8a779f0 serdes init sequencing updates"
* tag 'phy-for-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (32 commits)
phy: Remove duplicated include in phy-ralink-usb.c
phy: Kconfig: Select GENERIC_PHY for GENERIC_PHY_MIPI_DPHY
phy: qcom-qmp-pcie: add endpoint support for sa8775p
dt-bindings: phy: ralink-usb-phy: convert to dtschema
dt-bindings: phy: Convert PXA1928 USB/HSIC PHY to DT schema
phy: Drop unnecessary of_match_device() calls
phy: rockchip-inno-usb2: Drop unnecessary DT includes
phy: Use device_get_match_data()
phy: realtek: Replace of_device.h with explicit includes
phy: renesas: r8a779f0-ether-serdes: Add .exit() ops
phy: renesas: r8a779f0-ether-serdes: Reset in .init()
phy: qcom-qmp-combo: use v6 registers in v6 regs layout
phy: qcom-qmp-usb: move PCS v6 register to the proper header
phy: qcom-qmp-combo: fix the prefix for the PCS_USB v6 registers
phy: sun4i-usb: update array size
phy: qualcomm: phy-qcom-eusb2-repeater: Add tuning overrides
phy: qualcomm: phy-qcom-eusb2-repeater: Zero out untouched tuning regs
phy: qualcomm: phy-qcom-eusb2-repeater: Use regmap_fields
dt-bindings: phy: qcom,snps-eusb2-repeater: Add magic tuning overrides
dt-bindings: phy: Add compatible for Mediatek MT8188
...
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/phy/marvell,pxa1928-usb-phy.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Marvell PXA1928 USB/HSIC PHY
|
||||
|
||||
maintainers:
|
||||
- Duje Mihanović <duje.mihanovic@skole.hr>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- marvell,pxa1928-usb-phy
|
||||
- marvell,pxa1928-hsic-phy
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
'#phy-cells':
|
||||
const: 0
|
||||
|
||||
resets:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- '#phy-cells'
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/marvell,pxa1928.h>
|
||||
|
||||
usbphy: phy@7000 {
|
||||
compatible = "marvell,pxa1928-usb-phy";
|
||||
reg = <0x7000 0xe0>;
|
||||
clocks = <&apmu PXA1928_CLK_USB>;
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
@@ -30,6 +30,7 @@ properties:
|
||||
- const: mediatek,mt8173-mipi-tx
|
||||
- items:
|
||||
- enum:
|
||||
- mediatek,mt8188-mipi-tx
|
||||
- mediatek,mt8365-mipi-tx
|
||||
- const: mediatek,mt8183-mipi-tx
|
||||
- const: mediatek,mt2701-mipi-tx
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/phy/mediatek,mt7628-usbphy.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Mediatek/Ralink USB PHY
|
||||
|
||||
maintainers:
|
||||
- Sergio Paracuellos <sergio.paracuellos@gmail.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- mediatek,mt7620-usbphy
|
||||
- mediatek,mt7628-usbphy
|
||||
- ralink,rt3352-usbphy
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
"#phy-cells":
|
||||
const: 0
|
||||
|
||||
ralink,sysctl:
|
||||
description:
|
||||
phandle to a ralink syscon register region.
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
|
||||
resets:
|
||||
items:
|
||||
- description: USB Host reset controller
|
||||
- description: USB Device reset controller
|
||||
|
||||
reset-names:
|
||||
items:
|
||||
- const: host
|
||||
- const: device
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- "#phy-cells"
|
||||
- ralink,sysctl
|
||||
- resets
|
||||
- reset-names
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: mediatek,mt7628-usbphy
|
||||
then:
|
||||
required:
|
||||
- reg
|
||||
else:
|
||||
properties:
|
||||
reg: false
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
phy@10120000 {
|
||||
compatible = "mediatek,mt7628-usbphy";
|
||||
reg = <0x10120000 0x1000>;
|
||||
#phy-cells = <0>;
|
||||
ralink,sysctl = <&sysc>;
|
||||
resets = <&rstctrl 22>,
|
||||
<&rstctrl 25>;
|
||||
reset-names = "host", "device";
|
||||
};
|
||||
|
||||
...
|
||||
@@ -1,24 +0,0 @@
|
||||
ST STiH407 USB PHY controller
|
||||
|
||||
This file documents the dt bindings for the usb picoPHY driver which is the PHY for both USB2 and USB3
|
||||
host controllers (when controlling usb2/1.1 devices) available on STiH407 SoC family from STMicroelectronics.
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "st,stih407-usb2-phy"
|
||||
- st,syscfg : phandle of sysconfig bank plus integer array containing phyparam and phyctrl register offsets
|
||||
- resets : list of phandle and reset specifier pairs. There should be two entries, one
|
||||
for the whole phy and one for the port
|
||||
- reset-names : list of reset signal names. Should be "global" and "port"
|
||||
See: Documentation/devicetree/bindings/reset/st,stih407-powerdown.yaml
|
||||
See: Documentation/devicetree/bindings/reset/reset.txt
|
||||
|
||||
Example:
|
||||
|
||||
usb2_picophy0: usbpicophy@f8 {
|
||||
compatible = "st,stih407-usb2-phy";
|
||||
#phy-cells = <0>;
|
||||
st,syscfg = <&syscfg_core 0x100 0xf4>;
|
||||
resets = <&softreset STIH407_PICOPHY_SOFTRESET>,
|
||||
<&picophyreset STIH407_PICOPHY0_RESET>;
|
||||
reset-names = "global", "port";
|
||||
};
|
||||
@@ -1,18 +0,0 @@
|
||||
* Marvell PXA1928 USB and HSIC PHYs
|
||||
|
||||
Required properties:
|
||||
- compatible: "marvell,pxa1928-usb-phy" or "marvell,pxa1928-hsic-phy"
|
||||
- reg: base address and length of the registers
|
||||
- clocks - A single clock. From common clock binding.
|
||||
- #phys-cells: should be 0. From common phy binding.
|
||||
- resets: reference to the reset controller
|
||||
|
||||
Example:
|
||||
|
||||
usbphy: phy@7000 {
|
||||
compatible = "marvell,pxa1928-usb-phy";
|
||||
reg = <0x7000 0xe0>;
|
||||
clocks = <&apmu_clocks PXA1928_CLK_USB>;
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
|
||||
@@ -17,7 +17,9 @@ description:
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- const: qcom,ipq5332-usb-hsphy
|
||||
- enum:
|
||||
- qcom,ipq5018-usb-hsphy
|
||||
- qcom,ipq5332-usb-hsphy
|
||||
|
||||
"#phy-cells":
|
||||
const: 0
|
||||
|
||||
@@ -1,287 +0,0 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/phy/qcom,msm8996-qmp-usb3-phy.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm QMP PHY controller (USB, MSM8996)
|
||||
|
||||
maintainers:
|
||||
- Vinod Koul <vkoul@kernel.org>
|
||||
|
||||
description:
|
||||
QMP PHY controller supports physical layer functionality for a number of
|
||||
controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
|
||||
|
||||
Note that these bindings are for SoCs up to SC8180X. For newer SoCs, see
|
||||
qcom,sc8280xp-qmp-usb3-uni-phy.yaml.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,ipq6018-qmp-usb3-phy
|
||||
- qcom,ipq8074-qmp-usb3-phy
|
||||
- qcom,msm8996-qmp-usb3-phy
|
||||
- qcom,msm8998-qmp-usb3-phy
|
||||
- qcom,sdm845-qmp-usb3-uni-phy
|
||||
- qcom,sdx55-qmp-usb3-uni-phy
|
||||
- qcom,sdx65-qmp-usb3-uni-phy
|
||||
- qcom,sm8150-qmp-usb3-uni-phy
|
||||
- qcom,sm8250-qmp-usb3-uni-phy
|
||||
- qcom,sm8350-qmp-usb3-uni-phy
|
||||
|
||||
reg:
|
||||
items:
|
||||
- description: serdes
|
||||
|
||||
"#address-cells":
|
||||
enum: [ 1, 2 ]
|
||||
|
||||
"#size-cells":
|
||||
enum: [ 1, 2 ]
|
||||
|
||||
ranges: true
|
||||
|
||||
clocks:
|
||||
minItems: 3
|
||||
maxItems: 4
|
||||
|
||||
clock-names:
|
||||
minItems: 3
|
||||
maxItems: 4
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
resets:
|
||||
maxItems: 2
|
||||
|
||||
reset-names:
|
||||
maxItems: 2
|
||||
|
||||
vdda-phy-supply: true
|
||||
|
||||
vdda-pll-supply: true
|
||||
|
||||
vddp-ref-clk-supply: true
|
||||
|
||||
patternProperties:
|
||||
"^phy@[0-9a-f]+$":
|
||||
type: object
|
||||
description: single PHY-provider child node
|
||||
properties:
|
||||
reg:
|
||||
minItems: 3
|
||||
maxItems: 6
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: PIPE clock
|
||||
|
||||
clock-names:
|
||||
deprecated: true
|
||||
items:
|
||||
- const: pipe0
|
||||
|
||||
"#clock-cells":
|
||||
const: 0
|
||||
|
||||
clock-output-names:
|
||||
maxItems: 1
|
||||
|
||||
"#phy-cells":
|
||||
const: 0
|
||||
|
||||
required:
|
||||
- reg
|
||||
- clocks
|
||||
- "#clock-cells"
|
||||
- clock-output-names
|
||||
- "#phy-cells"
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- ranges
|
||||
- clocks
|
||||
- clock-names
|
||||
- resets
|
||||
- reset-names
|
||||
- vdda-phy-supply
|
||||
- vdda-pll-supply
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sdm845-qmp-usb3-uni-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 4
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
- const: cfg_ahb
|
||||
- const: ref
|
||||
- const: com_aux
|
||||
resets:
|
||||
maxItems: 2
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy
|
||||
- const: common
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,ipq8074-qmp-usb3-phy
|
||||
- qcom,msm8996-qmp-usb3-phy
|
||||
- qcom,msm8998-qmp-usb3-phy
|
||||
- qcom,sdx55-qmp-usb3-uni-phy
|
||||
- qcom,sdx65-qmp-usb3-uni-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 3
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
- const: cfg_ahb
|
||||
- const: ref
|
||||
resets:
|
||||
maxItems: 2
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy
|
||||
- const: common
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sm8150-qmp-usb3-uni-phy
|
||||
- qcom,sm8250-qmp-usb3-uni-phy
|
||||
- qcom,sm8350-qmp-usb3-uni-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 4
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
- const: ref_clk_src
|
||||
- const: ref
|
||||
- const: com_aux
|
||||
resets:
|
||||
maxItems: 2
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy
|
||||
- const: common
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,msm8998-qmp-usb3-phy
|
||||
then:
|
||||
patternProperties:
|
||||
"^phy@[0-9a-f]+$":
|
||||
properties:
|
||||
reg:
|
||||
items:
|
||||
- description: TX lane 1
|
||||
- description: RX lane 1
|
||||
- description: PCS
|
||||
- description: TX lane 2
|
||||
- description: RX lane 2
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,ipq6018-qmp-usb3-phy
|
||||
- qcom,ipq8074-qmp-usb3-phy
|
||||
- qcom,sdx55-qmp-usb3-uni-phy
|
||||
- qcom,sdx65-qmp-usb3-uni-phy
|
||||
- qcom,sm8150-qmp-usb3-uni-phy
|
||||
then:
|
||||
patternProperties:
|
||||
"^phy@[0-9a-f]+$":
|
||||
properties:
|
||||
reg:
|
||||
items:
|
||||
- description: TX
|
||||
- description: RX
|
||||
- description: PCS
|
||||
- description: PCS_MISC
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,msm8996-qmp-usb3-phy
|
||||
- qcom,sm8250-qmp-usb3-uni-phy
|
||||
- qcom,sm8350-qmp-usb3-uni-phy
|
||||
then:
|
||||
patternProperties:
|
||||
"^phy@[0-9a-f]+$":
|
||||
properties:
|
||||
reg:
|
||||
items:
|
||||
- description: TX
|
||||
- description: RX
|
||||
- description: PCS
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,gcc-sdm845.h>
|
||||
usb_2_qmpphy: phy-wrapper@88eb000 {
|
||||
compatible = "qcom,sdm845-qmp-usb3-uni-phy";
|
||||
reg = <0x088eb000 0x18c>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x088eb000 0x2000>;
|
||||
|
||||
clocks = <&gcc GCC_USB3_SEC_PHY_AUX_CLK >,
|
||||
<&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
|
||||
<&gcc GCC_USB3_SEC_CLKREF_CLK>,
|
||||
<&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>;
|
||||
clock-names = "aux", "cfg_ahb", "ref", "com_aux";
|
||||
|
||||
resets = <&gcc GCC_USB3PHY_PHY_SEC_BCR>,
|
||||
<&gcc GCC_USB3_PHY_SEC_BCR>;
|
||||
reset-names = "phy", "common";
|
||||
|
||||
vdda-phy-supply = <&vdda_usb2_ss_1p2>;
|
||||
vdda-pll-supply = <&vdda_usb2_ss_core>;
|
||||
|
||||
usb_2_ssphy: phy@200 {
|
||||
reg = <0x200 0x128>,
|
||||
<0x400 0x1fc>,
|
||||
<0x800 0x218>,
|
||||
<0x600 0x70>;
|
||||
|
||||
clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>;
|
||||
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "usb3_uni_phy_pipe_clk_src";
|
||||
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
};
|
||||
@@ -19,6 +19,7 @@ properties:
|
||||
- qcom,msm8996-qmp-ufs-phy
|
||||
- qcom,msm8998-qmp-ufs-phy
|
||||
- qcom,sa8775p-qmp-ufs-phy
|
||||
- qcom,sc7280-qmp-ufs-phy
|
||||
- qcom,sc8180x-qmp-ufs-phy
|
||||
- qcom,sc8280xp-qmp-ufs-phy
|
||||
- qcom,sdm845-qmp-ufs-phy
|
||||
@@ -85,6 +86,7 @@ allOf:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sa8775p-qmp-ufs-phy
|
||||
- qcom,sc7280-qmp-ufs-phy
|
||||
- qcom,sm8450-qmp-ufs-phy
|
||||
then:
|
||||
properties:
|
||||
|
||||
@@ -16,21 +16,34 @@ description:
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,ipq6018-qmp-usb3-phy
|
||||
- qcom,ipq8074-qmp-usb3-phy
|
||||
- qcom,ipq9574-qmp-usb3-phy
|
||||
- qcom,msm8996-qmp-usb3-phy
|
||||
- qcom,msm8998-qmp-usb3-phy
|
||||
- qcom,qcm2290-qmp-usb3-phy
|
||||
- qcom,sa8775p-qmp-usb3-uni-phy
|
||||
- qcom,sc8280xp-qmp-usb3-uni-phy
|
||||
- qcom,sdm845-qmp-usb3-uni-phy
|
||||
- qcom,sdx55-qmp-usb3-uni-phy
|
||||
- qcom,sdx65-qmp-usb3-uni-phy
|
||||
- qcom,sdx75-qmp-usb3-uni-phy
|
||||
- qcom,sm6115-qmp-usb3-phy
|
||||
- qcom,sm8150-qmp-usb3-uni-phy
|
||||
- qcom,sm8250-qmp-usb3-uni-phy
|
||||
- qcom,sm8350-qmp-usb3-uni-phy
|
||||
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 4
|
||||
minItems: 4
|
||||
maxItems: 5
|
||||
|
||||
clock-names:
|
||||
maxItems: 4
|
||||
minItems: 4
|
||||
maxItems: 5
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
@@ -75,10 +88,18 @@ allOf:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,ipq6018-qmp-usb3-phy
|
||||
- qcom,ipq8074-qmp-usb3-phy
|
||||
- qcom,ipq9574-qmp-usb3-phy
|
||||
- qcom,msm8996-qmp-usb3-phy
|
||||
- qcom,msm8998-qmp-usb3-phy
|
||||
- qcom,sdx55-qmp-usb3-uni-phy
|
||||
- qcom,sdx65-qmp-usb3-uni-phy
|
||||
- qcom,sdx75-qmp-usb3-uni-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 4
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
@@ -111,6 +132,9 @@ allOf:
|
||||
enum:
|
||||
- qcom,sa8775p-qmp-usb3-uni-phy
|
||||
- qcom,sc8280xp-qmp-usb3-uni-phy
|
||||
- qcom,sm8150-qmp-usb3-uni-phy
|
||||
- qcom,sm8250-qmp-usb3-uni-phy
|
||||
- qcom,sm8350-qmp-usb3-uni-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
@@ -121,6 +145,33 @@ allOf:
|
||||
- const: ref
|
||||
- const: com_aux
|
||||
- const: pipe
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sdm845-qmp-usb3-uni-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 5
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
- const: cfg_ahb
|
||||
- const: ref
|
||||
- const: com_aux
|
||||
- const: pipe
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sa8775p-qmp-usb3-uni-phy
|
||||
- qcom,sc8280xp-qmp-usb3-uni-phy
|
||||
then:
|
||||
required:
|
||||
- power-domains
|
||||
|
||||
|
||||
@@ -32,6 +32,27 @@ properties:
|
||||
|
||||
vdd3-supply: true
|
||||
|
||||
qcom,tune-usb2-disc-thres:
|
||||
$ref: /schemas/types.yaml#/definitions/uint8
|
||||
description: High-Speed disconnect threshold
|
||||
minimum: 0
|
||||
maximum: 7
|
||||
default: 0
|
||||
|
||||
qcom,tune-usb2-amplitude:
|
||||
$ref: /schemas/types.yaml#/definitions/uint8
|
||||
description: High-Speed trasmit amplitude
|
||||
minimum: 0
|
||||
maximum: 15
|
||||
default: 8
|
||||
|
||||
qcom,tune-usb2-preem:
|
||||
$ref: /schemas/types.yaml#/definitions/uint8
|
||||
description: High-Speed TX pre-emphasis tuning
|
||||
minimum: 0
|
||||
maximum: 7
|
||||
default: 5
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
Mediatek/Ralink USB PHY
|
||||
|
||||
Required properties:
|
||||
- compatible: "ralink,rt3352-usbphy"
|
||||
"mediatek,mt7620-usbphy"
|
||||
"mediatek,mt7628-usbphy"
|
||||
- reg: required for "mediatek,mt7628-usbphy", unused otherwise
|
||||
- #phy-cells: should be 0
|
||||
- ralink,sysctl: a phandle to a ralink syscon register region
|
||||
- resets: the two reset controllers for host and device
|
||||
- reset-names: the names of the 2 reset controllers
|
||||
|
||||
Example:
|
||||
|
||||
usbphy: phy {
|
||||
compatible = "mediatek,mt7628-usbphy";
|
||||
reg = <0x10120000 0x1000>;
|
||||
#phy-cells = <0>;
|
||||
|
||||
ralink,sysctl = <&sysc>;
|
||||
resets = <&rstctrl 22 &rstctrl 25>;
|
||||
reset-names = "host", "device";
|
||||
};
|
||||
@@ -0,0 +1,63 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/phy/st,stih407-usb2-phy.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: STMicroelectronics STiH407 USB PHY controller
|
||||
|
||||
maintainers:
|
||||
- Patrice Chotard <patrice.chotard@foss.st.com>
|
||||
|
||||
description:
|
||||
The USB picoPHY device is the PHY for both USB2 and USB3 host controllers
|
||||
(when controlling usb2/1.1 devices) available on STiH407 SoC family from
|
||||
STMicroelectronics.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: st,stih407-usb2-phy
|
||||
|
||||
st,syscfg:
|
||||
description: Phandle to the syscfg bank
|
||||
$ref: /schemas/types.yaml#/definitions/phandle-array
|
||||
items:
|
||||
- items:
|
||||
- description: phandle to syscfg
|
||||
- description: phyparam register offset
|
||||
- description: phyctrl register offset
|
||||
|
||||
resets:
|
||||
items:
|
||||
- description: Phandle and reset specifier pair for the whole phy.
|
||||
- description: Phandle and reset specifier pair for the port.
|
||||
|
||||
reset-names:
|
||||
items:
|
||||
- const: global
|
||||
- const: port
|
||||
|
||||
"#phy-cells":
|
||||
const: 0
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- st,syscfg
|
||||
- resets
|
||||
- reset-names
|
||||
- "#phy-cells"
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/reset/stih407-resets.h>
|
||||
usb-phy {
|
||||
compatible = "st,stih407-usb2-phy";
|
||||
#phy-cells = <0>;
|
||||
st,syscfg = <&syscfg_core 0x100 0xf4>;
|
||||
resets = <&softreset STIH407_PICOPHY_SOFTRESET>,
|
||||
<&picophyreset STIH407_PICOPHY0_RESET>;
|
||||
reset-names = "global", "port";
|
||||
};
|
||||
...
|
||||
@@ -18,7 +18,7 @@ config GENERIC_PHY
|
||||
|
||||
config GENERIC_PHY_MIPI_DPHY
|
||||
bool
|
||||
depends on GENERIC_PHY
|
||||
select GENERIC_PHY
|
||||
help
|
||||
Generic MIPI D-PHY support.
|
||||
|
||||
|
||||
@@ -782,7 +782,7 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev)
|
||||
|
||||
for (i = 0; i < data->cfg->num_phys; i++) {
|
||||
struct sun4i_usb_phy *phy = data->phys + i;
|
||||
char name[16];
|
||||
char name[32];
|
||||
|
||||
if (data->cfg->missing_phys & BIT(i))
|
||||
continue;
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
#include <linux/iopoll.h>
|
||||
#include <linux/mdio.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/phy/phy.h>
|
||||
#include <linux/property.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#define BCM_NS_USB3_PHY_BASE_ADDR_REG 0x1f
|
||||
@@ -189,7 +190,6 @@ static int bcm_ns_usb3_mdio_phy_write(struct bcm_ns_usb3 *usb3, u16 reg,
|
||||
static int bcm_ns_usb3_mdio_probe(struct mdio_device *mdiodev)
|
||||
{
|
||||
struct device *dev = &mdiodev->dev;
|
||||
const struct of_device_id *of_id;
|
||||
struct phy_provider *phy_provider;
|
||||
struct device_node *syscon_np;
|
||||
struct bcm_ns_usb3 *usb3;
|
||||
@@ -203,10 +203,7 @@ static int bcm_ns_usb3_mdio_probe(struct mdio_device *mdiodev)
|
||||
usb3->dev = dev;
|
||||
usb3->mdiodev = mdiodev;
|
||||
|
||||
of_id = of_match_device(bcm_ns_usb3_id_table, dev);
|
||||
if (!of_id)
|
||||
return -EINVAL;
|
||||
usb3->family = (uintptr_t)of_id->data;
|
||||
usb3->family = (enum bcm_ns_family)device_get_match_data(dev);
|
||||
|
||||
syscon_np = of_parse_phandle(dev->of_node, "usb3-dmp-syscon", 0);
|
||||
err = of_address_to_resource(syscon_np, 0, &res);
|
||||
|
||||
@@ -8,9 +8,10 @@
|
||||
|
||||
#include <linux/io.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/phy/phy.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/property.h>
|
||||
#include <linux/reset.h>
|
||||
|
||||
#define USB_PHY_PLL 0x04
|
||||
@@ -162,8 +163,6 @@ MODULE_DEVICE_TABLE(of, phy_berlin_usb_of_match);
|
||||
|
||||
static int phy_berlin_usb_probe(struct platform_device *pdev)
|
||||
{
|
||||
const struct of_device_id *match =
|
||||
of_match_device(phy_berlin_usb_of_match, &pdev->dev);
|
||||
struct phy_berlin_usb_priv *priv;
|
||||
struct phy *phy;
|
||||
struct phy_provider *phy_provider;
|
||||
@@ -180,7 +179,7 @@ static int phy_berlin_usb_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(priv->rst_ctrl))
|
||||
return PTR_ERR(priv->rst_ctrl);
|
||||
|
||||
priv->pll_divider = *((u32 *)match->data);
|
||||
priv->pll_divider = *((u32 *)device_get_match_data(&pdev->dev));
|
||||
|
||||
phy = devm_phy_create(&pdev->dev, NULL, &phy_berlin_usb_ops);
|
||||
if (IS_ERR(phy)) {
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/iio/consumer.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
#include <linux/platform_device.h>
|
||||
@@ -612,14 +611,8 @@ static int cpcap_usb_phy_probe(struct platform_device *pdev)
|
||||
struct phy *generic_phy;
|
||||
struct phy_provider *phy_provider;
|
||||
struct usb_otg *otg;
|
||||
const struct of_device_id *of_id;
|
||||
int error;
|
||||
|
||||
of_id = of_match_device(of_match_ptr(cpcap_usb_phy_id_table),
|
||||
&pdev->dev);
|
||||
if (!of_id)
|
||||
return -EINVAL;
|
||||
|
||||
ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
|
||||
if (!ddata)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -24,23 +24,73 @@
|
||||
#define EUSB2_FORCE_VAL_5 0xeD
|
||||
#define V_CLK_19P2M_EN BIT(6)
|
||||
|
||||
#define EUSB2_TUNE_USB2_CROSSOVER 0x50
|
||||
#define EUSB2_TUNE_IUSB2 0x51
|
||||
#define EUSB2_TUNE_RES_FSDIF 0x52
|
||||
#define EUSB2_TUNE_HSDISC 0x53
|
||||
#define EUSB2_TUNE_SQUELCH_U 0x54
|
||||
#define EUSB2_TUNE_USB2_SLEW 0x55
|
||||
#define EUSB2_TUNE_USB2_EQU 0x56
|
||||
#define EUSB2_TUNE_USB2_PREEM 0x57
|
||||
#define EUSB2_TUNE_USB2_HS_COMP_CUR 0x58
|
||||
#define EUSB2_TUNE_EUSB_SLEW 0x59
|
||||
#define EUSB2_TUNE_EUSB_EQU 0x5A
|
||||
#define EUSB2_TUNE_EUSB_HS_COMP_CUR 0x5B
|
||||
|
||||
#define QCOM_EUSB2_REPEATER_INIT_CFG(o, v) \
|
||||
#define QCOM_EUSB2_REPEATER_INIT_CFG(r, v) \
|
||||
{ \
|
||||
.offset = o, \
|
||||
.reg = r, \
|
||||
.val = v, \
|
||||
}
|
||||
|
||||
struct eusb2_repeater_init_tbl {
|
||||
unsigned int offset;
|
||||
unsigned int val;
|
||||
enum reg_fields {
|
||||
F_TUNE_EUSB_HS_COMP_CUR,
|
||||
F_TUNE_EUSB_EQU,
|
||||
F_TUNE_EUSB_SLEW,
|
||||
F_TUNE_USB2_HS_COMP_CUR,
|
||||
F_TUNE_USB2_PREEM,
|
||||
F_TUNE_USB2_EQU,
|
||||
F_TUNE_USB2_SLEW,
|
||||
F_TUNE_SQUELCH_U,
|
||||
F_TUNE_HSDISC,
|
||||
F_TUNE_RES_FSDIF,
|
||||
F_TUNE_IUSB2,
|
||||
F_TUNE_USB2_CROSSOVER,
|
||||
F_NUM_TUNE_FIELDS,
|
||||
|
||||
F_FORCE_VAL_5 = F_NUM_TUNE_FIELDS,
|
||||
F_FORCE_EN_5,
|
||||
|
||||
F_EN_CTL1,
|
||||
|
||||
F_RPTR_STATUS,
|
||||
F_NUM_FIELDS,
|
||||
};
|
||||
|
||||
static struct reg_field eusb2_repeater_tune_reg_fields[F_NUM_FIELDS] = {
|
||||
[F_TUNE_EUSB_HS_COMP_CUR] = REG_FIELD(EUSB2_TUNE_EUSB_HS_COMP_CUR, 0, 1),
|
||||
[F_TUNE_EUSB_EQU] = REG_FIELD(EUSB2_TUNE_EUSB_EQU, 0, 1),
|
||||
[F_TUNE_EUSB_SLEW] = REG_FIELD(EUSB2_TUNE_EUSB_SLEW, 0, 1),
|
||||
[F_TUNE_USB2_HS_COMP_CUR] = REG_FIELD(EUSB2_TUNE_USB2_HS_COMP_CUR, 0, 1),
|
||||
[F_TUNE_USB2_PREEM] = REG_FIELD(EUSB2_TUNE_USB2_PREEM, 0, 2),
|
||||
[F_TUNE_USB2_EQU] = REG_FIELD(EUSB2_TUNE_USB2_EQU, 0, 1),
|
||||
[F_TUNE_USB2_SLEW] = REG_FIELD(EUSB2_TUNE_USB2_SLEW, 0, 1),
|
||||
[F_TUNE_SQUELCH_U] = REG_FIELD(EUSB2_TUNE_SQUELCH_U, 0, 2),
|
||||
[F_TUNE_HSDISC] = REG_FIELD(EUSB2_TUNE_HSDISC, 0, 2),
|
||||
[F_TUNE_RES_FSDIF] = REG_FIELD(EUSB2_TUNE_RES_FSDIF, 0, 2),
|
||||
[F_TUNE_IUSB2] = REG_FIELD(EUSB2_TUNE_IUSB2, 0, 3),
|
||||
[F_TUNE_USB2_CROSSOVER] = REG_FIELD(EUSB2_TUNE_USB2_CROSSOVER, 0, 2),
|
||||
|
||||
[F_FORCE_VAL_5] = REG_FIELD(EUSB2_FORCE_VAL_5, 0, 7),
|
||||
[F_FORCE_EN_5] = REG_FIELD(EUSB2_FORCE_EN_5, 0, 7),
|
||||
|
||||
[F_EN_CTL1] = REG_FIELD(EUSB2_EN_CTL1, 0, 7),
|
||||
|
||||
[F_RPTR_STATUS] = REG_FIELD(EUSB2_RPTR_STATUS, 0, 7),
|
||||
};
|
||||
|
||||
struct eusb2_repeater_cfg {
|
||||
const struct eusb2_repeater_init_tbl *init_tbl;
|
||||
const u32 *init_tbl;
|
||||
int init_tbl_num;
|
||||
const char * const *vreg_list;
|
||||
int num_vregs;
|
||||
@@ -48,11 +98,10 @@ struct eusb2_repeater_cfg {
|
||||
|
||||
struct eusb2_repeater {
|
||||
struct device *dev;
|
||||
struct regmap *regmap;
|
||||
struct regmap_field *regs[F_NUM_FIELDS];
|
||||
struct phy *phy;
|
||||
struct regulator_bulk_data *vregs;
|
||||
const struct eusb2_repeater_cfg *cfg;
|
||||
u16 base;
|
||||
enum phy_mode mode;
|
||||
};
|
||||
|
||||
@@ -60,10 +109,10 @@ static const char * const pm8550b_vreg_l[] = {
|
||||
"vdd18", "vdd3",
|
||||
};
|
||||
|
||||
static const struct eusb2_repeater_init_tbl pm8550b_init_tbl[] = {
|
||||
QCOM_EUSB2_REPEATER_INIT_CFG(EUSB2_TUNE_IUSB2, 0x8),
|
||||
QCOM_EUSB2_REPEATER_INIT_CFG(EUSB2_TUNE_SQUELCH_U, 0x3),
|
||||
QCOM_EUSB2_REPEATER_INIT_CFG(EUSB2_TUNE_USB2_PREEM, 0x5),
|
||||
static const u32 pm8550b_init_tbl[F_NUM_TUNE_FIELDS] = {
|
||||
[F_TUNE_IUSB2] = 0x8,
|
||||
[F_TUNE_SQUELCH_U] = 0x3,
|
||||
[F_TUNE_USB2_PREEM] = 0x5,
|
||||
};
|
||||
|
||||
static const struct eusb2_repeater_cfg pm8550b_eusb2_cfg = {
|
||||
@@ -91,9 +140,11 @@ static int eusb2_repeater_init_vregs(struct eusb2_repeater *rptr)
|
||||
|
||||
static int eusb2_repeater_init(struct phy *phy)
|
||||
{
|
||||
struct reg_field *regfields = eusb2_repeater_tune_reg_fields;
|
||||
struct eusb2_repeater *rptr = phy_get_drvdata(phy);
|
||||
const struct eusb2_repeater_init_tbl *init_tbl = rptr->cfg->init_tbl;
|
||||
int num = rptr->cfg->init_tbl_num;
|
||||
struct device_node *np = rptr->dev->of_node;
|
||||
u32 init_tbl[F_NUM_TUNE_FIELDS] = { 0 };
|
||||
u8 override;
|
||||
u32 val;
|
||||
int ret;
|
||||
int i;
|
||||
@@ -102,17 +153,34 @@ static int eusb2_repeater_init(struct phy *phy)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
regmap_update_bits(rptr->regmap, rptr->base + EUSB2_EN_CTL1,
|
||||
EUSB2_RPTR_EN, EUSB2_RPTR_EN);
|
||||
regmap_field_update_bits(rptr->regs[F_EN_CTL1], EUSB2_RPTR_EN, EUSB2_RPTR_EN);
|
||||
|
||||
for (i = 0; i < num; i++)
|
||||
regmap_update_bits(rptr->regmap,
|
||||
rptr->base + init_tbl[i].offset,
|
||||
init_tbl[i].val, init_tbl[i].val);
|
||||
for (i = 0; i < F_NUM_TUNE_FIELDS; i++) {
|
||||
if (init_tbl[i]) {
|
||||
regmap_field_update_bits(rptr->regs[i], init_tbl[i], init_tbl[i]);
|
||||
} else {
|
||||
/* Write 0 if there's no value set */
|
||||
u32 mask = GENMASK(regfields[i].msb, regfields[i].lsb);
|
||||
|
||||
ret = regmap_read_poll_timeout(rptr->regmap,
|
||||
rptr->base + EUSB2_RPTR_STATUS, val,
|
||||
val & RPTR_OK, 10, 5);
|
||||
regmap_field_update_bits(rptr->regs[i], mask, 0);
|
||||
}
|
||||
}
|
||||
memcpy(init_tbl, rptr->cfg->init_tbl, sizeof(init_tbl));
|
||||
|
||||
if (!of_property_read_u8(np, "qcom,tune-usb2-amplitude", &override))
|
||||
init_tbl[F_TUNE_IUSB2] = override;
|
||||
|
||||
if (!of_property_read_u8(np, "qcom,tune-usb2-disc-thres", &override))
|
||||
init_tbl[F_TUNE_HSDISC] = override;
|
||||
|
||||
if (!of_property_read_u8(np, "qcom,tune-usb2-preem", &override))
|
||||
init_tbl[F_TUNE_USB2_PREEM] = override;
|
||||
|
||||
for (i = 0; i < F_NUM_TUNE_FIELDS; i++)
|
||||
regmap_field_update_bits(rptr->regs[i], init_tbl[i], init_tbl[i]);
|
||||
|
||||
ret = regmap_field_read_poll_timeout(rptr->regs[F_RPTR_STATUS],
|
||||
val, val & RPTR_OK, 10, 5);
|
||||
if (ret)
|
||||
dev_err(rptr->dev, "initialization timed-out\n");
|
||||
|
||||
@@ -131,10 +199,10 @@ static int eusb2_repeater_set_mode(struct phy *phy,
|
||||
* per eUSB 1.2 Spec. Below implement software workaround until
|
||||
* PHY and controller is fixing seen observation.
|
||||
*/
|
||||
regmap_update_bits(rptr->regmap, rptr->base + EUSB2_FORCE_EN_5,
|
||||
F_CLK_19P2M_EN, F_CLK_19P2M_EN);
|
||||
regmap_update_bits(rptr->regmap, rptr->base + EUSB2_FORCE_VAL_5,
|
||||
V_CLK_19P2M_EN, V_CLK_19P2M_EN);
|
||||
regmap_field_update_bits(rptr->regs[F_FORCE_EN_5],
|
||||
F_CLK_19P2M_EN, F_CLK_19P2M_EN);
|
||||
regmap_field_update_bits(rptr->regs[F_FORCE_VAL_5],
|
||||
V_CLK_19P2M_EN, V_CLK_19P2M_EN);
|
||||
break;
|
||||
case PHY_MODE_USB_DEVICE:
|
||||
/*
|
||||
@@ -143,10 +211,10 @@ static int eusb2_repeater_set_mode(struct phy *phy,
|
||||
* repeater doesn't clear previous value due to shared
|
||||
* regulators (say host <-> device mode switch).
|
||||
*/
|
||||
regmap_update_bits(rptr->regmap, rptr->base + EUSB2_FORCE_EN_5,
|
||||
F_CLK_19P2M_EN, 0);
|
||||
regmap_update_bits(rptr->regmap, rptr->base + EUSB2_FORCE_VAL_5,
|
||||
V_CLK_19P2M_EN, 0);
|
||||
regmap_field_update_bits(rptr->regs[F_FORCE_EN_5],
|
||||
F_CLK_19P2M_EN, 0);
|
||||
regmap_field_update_bits(rptr->regs[F_FORCE_VAL_5],
|
||||
V_CLK_19P2M_EN, 0);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
@@ -175,8 +243,9 @@ static int eusb2_repeater_probe(struct platform_device *pdev)
|
||||
struct device *dev = &pdev->dev;
|
||||
struct phy_provider *phy_provider;
|
||||
struct device_node *np = dev->of_node;
|
||||
struct regmap *regmap;
|
||||
int i, ret;
|
||||
u32 res;
|
||||
int ret;
|
||||
|
||||
rptr = devm_kzalloc(dev, sizeof(*rptr), GFP_KERNEL);
|
||||
if (!rptr)
|
||||
@@ -189,15 +258,22 @@ static int eusb2_repeater_probe(struct platform_device *pdev)
|
||||
if (!rptr->cfg)
|
||||
return -EINVAL;
|
||||
|
||||
rptr->regmap = dev_get_regmap(dev->parent, NULL);
|
||||
if (!rptr->regmap)
|
||||
regmap = dev_get_regmap(dev->parent, NULL);
|
||||
if (!regmap)
|
||||
return -ENODEV;
|
||||
|
||||
ret = of_property_read_u32(np, "reg", &res);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
rptr->base = res;
|
||||
for (i = 0; i < F_NUM_FIELDS; i++)
|
||||
eusb2_repeater_tune_reg_fields[i].reg += res;
|
||||
|
||||
ret = devm_regmap_field_bulk_alloc(dev, regmap, rptr->regs,
|
||||
eusb2_repeater_tune_reg_fields,
|
||||
F_NUM_FIELDS);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = eusb2_repeater_init_vregs(rptr);
|
||||
if (ret < 0) {
|
||||
|
||||
@@ -82,6 +82,50 @@ struct m31_priv_data {
|
||||
unsigned int nregs;
|
||||
};
|
||||
|
||||
static const struct m31_phy_regs m31_ipq5018_regs[] = {
|
||||
{
|
||||
.off = USB_PHY_CFG0,
|
||||
.val = UTMI_PHY_OVERRIDE_EN
|
||||
},
|
||||
{
|
||||
.off = USB_PHY_UTMI_CTRL5,
|
||||
.val = POR_EN,
|
||||
.delay = 15
|
||||
},
|
||||
{
|
||||
.off = USB_PHY_FSEL_SEL,
|
||||
.val = FREQ_SEL
|
||||
},
|
||||
{
|
||||
.off = USB_PHY_HS_PHY_CTRL_COMMON0,
|
||||
.val = COMMONONN | FSEL | RETENABLEN
|
||||
},
|
||||
{
|
||||
.off = USB_PHY_REFCLK_CTRL,
|
||||
.val = CLKCORE
|
||||
},
|
||||
{
|
||||
.off = USB_PHY_UTMI_CTRL5,
|
||||
.val = POR_EN
|
||||
},
|
||||
{
|
||||
.off = USB_PHY_HS_PHY_CTRL2,
|
||||
.val = USB2_SUSPEND_N_SEL | USB2_SUSPEND_N | USB2_UTMI_CLK_EN
|
||||
},
|
||||
{
|
||||
.off = USB_PHY_UTMI_CTRL5,
|
||||
.val = 0x0
|
||||
},
|
||||
{
|
||||
.off = USB_PHY_HS_PHY_CTRL2,
|
||||
.val = USB2_SUSPEND_N | USB2_UTMI_CLK_EN
|
||||
},
|
||||
{
|
||||
.off = USB_PHY_CFG0,
|
||||
.val = 0x0
|
||||
},
|
||||
};
|
||||
|
||||
static struct m31_phy_regs m31_ipq5332_regs[] = {
|
||||
{
|
||||
USB_PHY_CFG0,
|
||||
@@ -241,7 +285,7 @@ static int m31usb_phy_probe(struct platform_device *pdev)
|
||||
qphy->clk = devm_clk_get(dev, NULL);
|
||||
if (IS_ERR(qphy->clk))
|
||||
return dev_err_probe(dev, PTR_ERR(qphy->clk),
|
||||
"failed to get clk\n");
|
||||
"failed to get clk\n");
|
||||
|
||||
data = of_device_get_match_data(dev);
|
||||
qphy->regs = data->regs;
|
||||
@@ -251,12 +295,12 @@ static int m31usb_phy_probe(struct platform_device *pdev)
|
||||
qphy->phy = devm_phy_create(dev, NULL, &m31usb_phy_gen_ops);
|
||||
if (IS_ERR(qphy->phy))
|
||||
return dev_err_probe(dev, PTR_ERR(qphy->phy),
|
||||
"failed to create phy\n");
|
||||
"failed to create phy\n");
|
||||
|
||||
qphy->vreg = devm_regulator_get(dev, "vdda-phy");
|
||||
if (IS_ERR(qphy->vreg))
|
||||
return dev_err_probe(dev, PTR_ERR(qphy->vreg),
|
||||
"failed to get vreg\n");
|
||||
return dev_err_probe(dev, PTR_ERR(qphy->phy),
|
||||
"failed to get vreg\n");
|
||||
|
||||
phy_set_drvdata(qphy->phy, qphy);
|
||||
|
||||
@@ -267,6 +311,12 @@ static int m31usb_phy_probe(struct platform_device *pdev)
|
||||
return PTR_ERR_OR_ZERO(phy_provider);
|
||||
}
|
||||
|
||||
static const struct m31_priv_data m31_ipq5018_data = {
|
||||
.ulpi_mode = false,
|
||||
.regs = m31_ipq5018_regs,
|
||||
.nregs = ARRAY_SIZE(m31_ipq5018_regs),
|
||||
};
|
||||
|
||||
static const struct m31_priv_data m31_ipq5332_data = {
|
||||
.ulpi_mode = false,
|
||||
.regs = m31_ipq5332_regs,
|
||||
@@ -274,6 +324,7 @@ static const struct m31_priv_data m31_ipq5332_data = {
|
||||
};
|
||||
|
||||
static const struct of_device_id m31usb_phy_id_table[] = {
|
||||
{ .compatible = "qcom,ipq5018-usb-hsphy", .data = &m31_ipq5018_data },
|
||||
{ .compatible = "qcom,ipq5332-usb-hsphy", .data = &m31_ipq5332_data },
|
||||
{ },
|
||||
};
|
||||
|
||||
@@ -194,14 +194,14 @@ static const unsigned int qmp_v5_5nm_usb3phy_regs_layout[QPHY_LAYOUT_SIZE] = {
|
||||
};
|
||||
|
||||
static const unsigned int qmp_v6_usb3phy_regs_layout[QPHY_LAYOUT_SIZE] = {
|
||||
[QPHY_SW_RESET] = QPHY_V5_PCS_SW_RESET,
|
||||
[QPHY_START_CTRL] = QPHY_V5_PCS_START_CONTROL,
|
||||
[QPHY_PCS_STATUS] = QPHY_V5_PCS_PCS_STATUS1,
|
||||
[QPHY_PCS_POWER_DOWN_CONTROL] = QPHY_V5_PCS_POWER_DOWN_CONTROL,
|
||||
[QPHY_SW_RESET] = QPHY_V6_PCS_SW_RESET,
|
||||
[QPHY_START_CTRL] = QPHY_V6_PCS_START_CONTROL,
|
||||
[QPHY_PCS_STATUS] = QPHY_V6_PCS_PCS_STATUS1,
|
||||
[QPHY_PCS_POWER_DOWN_CONTROL] = QPHY_V6_PCS_POWER_DOWN_CONTROL,
|
||||
|
||||
/* In PCS_USB */
|
||||
[QPHY_PCS_AUTONOMOUS_MODE_CTRL] = QPHY_V5_PCS_USB3_AUTONOMOUS_MODE_CTRL,
|
||||
[QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR] = QPHY_V5_PCS_USB3_LFPS_RXTERM_IRQ_CLEAR,
|
||||
[QPHY_PCS_AUTONOMOUS_MODE_CTRL] = QPHY_V6_PCS_USB3_AUTONOMOUS_MODE_CTRL,
|
||||
[QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR] = QPHY_V6_PCS_USB3_LFPS_RXTERM_IRQ_CLEAR,
|
||||
|
||||
[QPHY_COM_RESETSM_CNTRL] = QSERDES_V6_COM_RESETSM_CNTRL,
|
||||
[QPHY_COM_C_READY_STATUS] = QSERDES_V6_COM_C_READY_STATUS,
|
||||
@@ -845,28 +845,28 @@ static const struct qmp_phy_init_tbl sm8550_usb3_rx_tbl[] = {
|
||||
};
|
||||
|
||||
static const struct qmp_phy_init_tbl sm8550_usb3_pcs_tbl[] = {
|
||||
QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_LOCK_DETECT_CONFIG1, 0xc4),
|
||||
QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_LOCK_DETECT_CONFIG2, 0x89),
|
||||
QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_LOCK_DETECT_CONFIG3, 0x20),
|
||||
QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_LOCK_DETECT_CONFIG6, 0x13),
|
||||
QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_REFGEN_REQ_CONFIG1, 0x21),
|
||||
QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_RX_SIGDET_LVL, 0x99),
|
||||
QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_RCVR_DTCT_DLY_P1U2_L, 0xe7),
|
||||
QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_RCVR_DTCT_DLY_P1U2_H, 0x03),
|
||||
QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_CDR_RESET_TIME, 0x0a),
|
||||
QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_ALIGN_DETECT_CONFIG1, 0x88),
|
||||
QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_ALIGN_DETECT_CONFIG2, 0x13),
|
||||
QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_PCS_TX_RX_CONFIG, 0x0c),
|
||||
QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_EQ_CONFIG1, 0x4b),
|
||||
QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_EQ_CONFIG5, 0x10),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_LOCK_DETECT_CONFIG1, 0xc4),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_LOCK_DETECT_CONFIG2, 0x89),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_LOCK_DETECT_CONFIG3, 0x20),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_LOCK_DETECT_CONFIG6, 0x13),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_REFGEN_REQ_CONFIG1, 0x21),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_RX_SIGDET_LVL, 0x99),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_RCVR_DTCT_DLY_P1U2_L, 0xe7),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_RCVR_DTCT_DLY_P1U2_H, 0x03),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_CDR_RESET_TIME, 0x0a),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_ALIGN_DETECT_CONFIG1, 0x88),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_ALIGN_DETECT_CONFIG2, 0x13),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_PCS_TX_RX_CONFIG, 0x0c),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_EQ_CONFIG1, 0x4b),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_EQ_CONFIG5, 0x10),
|
||||
};
|
||||
|
||||
static const struct qmp_phy_init_tbl sm8550_usb3_pcs_usb_tbl[] = {
|
||||
QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_USB3_POWER_STATE_CONFIG1, 0x68),
|
||||
QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_USB3_LFPS_DET_HIGH_COUNT_VAL, 0xf8),
|
||||
QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_USB3_RXEQTRAINING_DFE_TIME_S2, 0x07),
|
||||
QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_USB3_RCVR_DTCT_DLY_U3_L, 0x40),
|
||||
QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_USB3_RCVR_DTCT_DLY_U3_H, 0x00),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_USB3_LFPS_DET_HIGH_COUNT_VAL, 0xf8),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_USB3_RXEQTRAINING_DFE_TIME_S2, 0x07),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_USB3_RCVR_DTCT_DLY_U3_L, 0x40),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_USB3_RCVR_DTCT_DLY_U3_H, 0x00),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_USB3_POWER_STATE_CONFIG1, 0x68),
|
||||
};
|
||||
|
||||
static const struct qmp_phy_init_tbl qmp_v4_dp_serdes_tbl[] = {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user