Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
9bcf8761
Commit
9bcf8761
authored
Oct 13, 2023
by
Vinod Koul
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fixes' into next
Merge fixes into next as qmp phy patches on list depend on it
parents
56156a76
089667aa
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
57 additions
and
48 deletions
+57
-48
Documentation/devicetree/bindings/phy/qcom,ipq8074-qmp-pcie-phy.yaml
...on/devicetree/bindings/phy/qcom,ipq8074-qmp-pcie-phy.yaml
+1
-1
drivers/phy/motorola/phy-mapphone-mdm6600.c
drivers/phy/motorola/phy-mapphone-mdm6600.c
+18
-20
drivers/phy/qualcomm/phy-qcom-apq8064-sata.c
drivers/phy/qualcomm/phy-qcom-apq8064-sata.c
+1
-1
drivers/phy/qualcomm/phy-qcom-m31.c
drivers/phy/qualcomm/phy-qcom-m31.c
+2
-3
drivers/phy/qualcomm/phy-qcom-qmp-combo.c
drivers/phy/qualcomm/phy-qcom-qmp-combo.c
+5
-1
drivers/phy/qualcomm/phy-qcom-qmp-pcs-usb-v6.h
drivers/phy/qualcomm/phy-qcom-qmp-pcs-usb-v6.h
+2
-1
drivers/phy/qualcomm/phy-qcom-qmp-usb.c
drivers/phy/qualcomm/phy-qcom-qmp-usb.c
+19
-5
drivers/phy/realtek/Kconfig
drivers/phy/realtek/Kconfig
+5
-0
drivers/phy/realtek/phy-rtk-usb2.c
drivers/phy/realtek/phy-rtk-usb2.c
+2
-8
drivers/phy/realtek/phy-rtk-usb3.c
drivers/phy/realtek/phy-rtk-usb3.c
+2
-8
No files found.
Documentation/devicetree/bindings/phy/qcom,ipq8074-qmp-pcie-phy.yaml
View file @
9bcf8761
...
...
@@ -70,7 +70,7 @@ examples:
phy@84000 {
compatible = "qcom,ipq6018-qmp-pcie-phy";
reg = <0x0
0x00084000 0x
0 0x1000>;
reg = <0x0
008400
0 0x1000>;
clocks = <&gcc GCC_PCIE0_AUX_CLK>,
<&gcc GCC_PCIE0_AHB_CLK>,
...
...
drivers/phy/motorola/phy-mapphone-mdm6600.c
View file @
9bcf8761
...
...
@@ -122,16 +122,10 @@ static int phy_mdm6600_power_on(struct phy *x)
{
struct
phy_mdm6600
*
ddata
=
phy_get_drvdata
(
x
);
struct
gpio_desc
*
enable_gpio
=
ddata
->
ctrl_gpios
[
PHY_MDM6600_ENABLE
];
int
error
;
if
(
!
ddata
->
enabled
)
return
-
ENODEV
;
error
=
pinctrl_pm_select_default_state
(
ddata
->
dev
);
if
(
error
)
dev_warn
(
ddata
->
dev
,
"%s: error with default_state: %i
\n
"
,
__func__
,
error
);
gpiod_set_value_cansleep
(
enable_gpio
,
1
);
/* Allow aggressive PM for USB, it's only needed for n_gsm port */
...
...
@@ -160,11 +154,6 @@ static int phy_mdm6600_power_off(struct phy *x)
gpiod_set_value_cansleep
(
enable_gpio
,
0
);
error
=
pinctrl_pm_select_sleep_state
(
ddata
->
dev
);
if
(
error
)
dev_warn
(
ddata
->
dev
,
"%s: error with sleep_state: %i
\n
"
,
__func__
,
error
);
return
0
;
}
...
...
@@ -456,6 +445,7 @@ static void phy_mdm6600_device_power_off(struct phy_mdm6600 *ddata)
{
struct
gpio_desc
*
reset_gpio
=
ddata
->
ctrl_gpios
[
PHY_MDM6600_RESET
];
int
error
;
ddata
->
enabled
=
false
;
phy_mdm6600_cmd
(
ddata
,
PHY_MDM6600_CMD_BP_SHUTDOWN_REQ
);
...
...
@@ -471,6 +461,17 @@ static void phy_mdm6600_device_power_off(struct phy_mdm6600 *ddata)
}
else
{
dev_err
(
ddata
->
dev
,
"Timed out powering down
\n
"
);
}
/*
* Keep reset gpio high with padconf internal pull-up resistor to
* prevent modem from waking up during deeper SoC idle states. The
* gpio bank lines can have glitches if not in the always-on wkup
* domain.
*/
error
=
pinctrl_pm_select_sleep_state
(
ddata
->
dev
);
if
(
error
)
dev_warn
(
ddata
->
dev
,
"%s: error with sleep_state: %i
\n
"
,
__func__
,
error
);
}
static
void
phy_mdm6600_deferred_power_on
(
struct
work_struct
*
work
)
...
...
@@ -571,12 +572,6 @@ static int phy_mdm6600_probe(struct platform_device *pdev)
ddata
->
dev
=
&
pdev
->
dev
;
platform_set_drvdata
(
pdev
,
ddata
);
/* Active state selected in phy_mdm6600_power_on() */
error
=
pinctrl_pm_select_sleep_state
(
ddata
->
dev
);
if
(
error
)
dev_warn
(
ddata
->
dev
,
"%s: error with sleep_state: %i
\n
"
,
__func__
,
error
);
error
=
phy_mdm6600_init_lines
(
ddata
);
if
(
error
)
return
error
;
...
...
@@ -627,10 +622,12 @@ static int phy_mdm6600_probe(struct platform_device *pdev)
pm_runtime_put_autosuspend
(
ddata
->
dev
);
cleanup:
if
(
error
<
0
)
if
(
error
<
0
)
{
phy_mdm6600_device_power_off
(
ddata
);
pm_runtime_disable
(
ddata
->
dev
);
pm_runtime_dont_use_autosuspend
(
ddata
->
dev
);
pm_runtime_disable
(
ddata
->
dev
);
pm_runtime_dont_use_autosuspend
(
ddata
->
dev
);
}
return
error
;
}
...
...
@@ -639,6 +636,7 @@ static void phy_mdm6600_remove(struct platform_device *pdev)
struct
phy_mdm6600
*
ddata
=
platform_get_drvdata
(
pdev
);
struct
gpio_desc
*
reset_gpio
=
ddata
->
ctrl_gpios
[
PHY_MDM6600_RESET
];
pm_runtime_get_noresume
(
ddata
->
dev
);
pm_runtime_dont_use_autosuspend
(
ddata
->
dev
);
pm_runtime_put_sync
(
ddata
->
dev
);
pm_runtime_disable
(
ddata
->
dev
);
...
...
drivers/phy/qualcomm/phy-qcom-apq8064-sata.c
View file @
9bcf8761
...
...
@@ -152,7 +152,7 @@ static int qcom_apq8064_sata_phy_init(struct phy *generic_phy)
return
ret
;
}
/* SATA phy calibrated succesfully, power up to functional mode */
/* SATA phy calibrated succes
s
fully, power up to functional mode */
writel_relaxed
(
0x3E
,
base
+
SATA_PHY_POW_DWN_CTRL1
);
writel_relaxed
(
0x01
,
base
+
SATA_PHY_RX_IMCAL0
);
writel_relaxed
(
0x01
,
base
+
SATA_PHY_TX_IMCAL0
);
...
...
drivers/phy/qualcomm/phy-qcom-m31.c
View file @
9bcf8761
...
...
@@ -126,7 +126,7 @@ static const struct m31_phy_regs m31_ipq5018_regs[] = {
},
};
struct
m31_phy_regs
m31_ipq5332_regs
[]
=
{
st
atic
st
ruct
m31_phy_regs
m31_ipq5332_regs
[]
=
{
{
USB_PHY_CFG0
,
UTMI_PHY_OVERRIDE_EN
,
...
...
@@ -216,8 +216,7 @@ static int m31usb_phy_init(struct phy *phy)
ret
=
clk_prepare_enable
(
qphy
->
clk
);
if
(
ret
)
{
if
(
qphy
->
vreg
)
regulator_disable
(
qphy
->
vreg
);
regulator_disable
(
qphy
->
vreg
);
dev_err
(
&
phy
->
dev
,
"failed to enable cfg ahb clock, %d
\n
"
,
ret
);
return
ret
;
}
...
...
drivers/phy/qualcomm/phy-qcom-qmp-combo.c
View file @
9bcf8761
...
...
@@ -859,10 +859,10 @@ static const struct qmp_phy_init_tbl sm8550_usb3_pcs_tbl[] = {
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_USB_V6_PCS_USB3_POWER_STATE_CONFIG1
,
0x68
),
};
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
),
...
...
@@ -2555,6 +2555,7 @@ static int qmp_combo_usb_power_on(struct phy *phy)
void
__iomem
*
tx2
=
qmp
->
tx2
;
void
__iomem
*
rx2
=
qmp
->
rx2
;
void
__iomem
*
pcs
=
qmp
->
pcs
;
void
__iomem
*
pcs_usb
=
qmp
->
pcs_usb
;
void
__iomem
*
status
;
unsigned
int
val
;
int
ret
;
...
...
@@ -2576,6 +2577,9 @@ static int qmp_combo_usb_power_on(struct phy *phy)
qmp_combo_configure
(
pcs
,
cfg
->
pcs_tbl
,
cfg
->
pcs_tbl_num
);
if
(
pcs_usb
)
qmp_combo_configure
(
pcs_usb
,
cfg
->
pcs_usb_tbl
,
cfg
->
pcs_usb_tbl_num
);
if
(
cfg
->
has_pwrdn_delay
)
usleep_range
(
10
,
20
);
...
...
drivers/phy/qualcomm/phy-qcom-qmp-pcs-usb-v6.h
View file @
9bcf8761
...
...
@@ -12,7 +12,7 @@
#define QPHY_USB_V6_PCS_LOCK_DETECT_CONFIG3 0xcc
#define QPHY_USB_V6_PCS_LOCK_DETECT_CONFIG6 0xd8
#define QPHY_USB_V6_PCS_REFGEN_REQ_CONFIG1 0xdc
#define QPHY_USB_V6_PCS_
USB3_POWER_STATE_CONFIG1
0x90
#define QPHY_USB_V6_PCS_
POWER_STATE_CONFIG1
0x90
#define QPHY_USB_V6_PCS_RX_SIGDET_LVL 0x188
#define QPHY_USB_V6_PCS_RCVR_DTCT_DLY_P1U2_L 0x190
#define QPHY_USB_V6_PCS_RCVR_DTCT_DLY_P1U2_H 0x194
...
...
@@ -23,6 +23,7 @@
#define QPHY_USB_V6_PCS_EQ_CONFIG1 0x1dc
#define QPHY_USB_V6_PCS_EQ_CONFIG5 0x1ec
#define QPHY_USB_V6_PCS_USB3_POWER_STATE_CONFIG1 0x00
#define QPHY_USB_V6_PCS_USB3_LFPS_DET_HIGH_COUNT_VAL 0x18
#define QPHY_USB_V6_PCS_USB3_RXEQTRAINING_DFE_TIME_S2 0x3c
#define QPHY_USB_V6_PCS_USB3_RCVR_DTCT_DLY_U3_L 0x40
...
...
drivers/phy/qualcomm/phy-qcom-qmp-usb.c
View file @
9bcf8761
...
...
@@ -1125,8 +1125,6 @@ static const struct qmp_phy_init_tbl sc8280xp_usb3_uniphy_pcs_tbl[] = {
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_RCVR_DTCT_DLY_P1U2_H
,
0x03
),
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_RX_SIGDET_LVL
,
0xaa
),
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_PCS_TX_RX_CONFIG
,
0x0c
),
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_USB3_RXEQTRAINING_DFE_TIME_S2
,
0x07
),
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_USB3_LFPS_DET_HIGH_COUNT_VAL
,
0xf8
),
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_CDR_RESET_TIME
,
0x0a
),
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_ALIGN_DETECT_CONFIG1
,
0x88
),
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_ALIGN_DETECT_CONFIG2
,
0x13
),
...
...
@@ -1135,6 +1133,11 @@ static const struct qmp_phy_init_tbl sc8280xp_usb3_uniphy_pcs_tbl[] = {
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_REFGEN_REQ_CONFIG1
,
0x21
),
};
static
const
struct
qmp_phy_init_tbl
sc8280xp_usb3_uniphy_pcs_usb_tbl
[]
=
{
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_USB3_RXEQTRAINING_DFE_TIME_S2
,
0x07
),
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_USB3_LFPS_DET_HIGH_COUNT_VAL
,
0xf8
),
};
static
const
struct
qmp_phy_init_tbl
sa8775p_usb3_uniphy_pcs_tbl
[]
=
{
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_LOCK_DETECT_CONFIG1
,
0xc4
),
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_LOCK_DETECT_CONFIG2
,
0x89
),
...
...
@@ -1144,9 +1147,6 @@ static const struct qmp_phy_init_tbl sa8775p_usb3_uniphy_pcs_tbl[] = {
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_RCVR_DTCT_DLY_P1U2_H
,
0x03
),
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_RX_SIGDET_LVL
,
0xaa
),
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_PCS_TX_RX_CONFIG
,
0x0c
),
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_USB3_RXEQTRAINING_DFE_TIME_S2
,
0x07
),
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_USB3_LFPS_DET_HIGH_COUNT_VAL
,
0xf8
),
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_USB3_POWER_STATE_CONFIG1
,
0x6f
),
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_CDR_RESET_TIME
,
0x0a
),
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_ALIGN_DETECT_CONFIG1
,
0x88
),
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_ALIGN_DETECT_CONFIG2
,
0x13
),
...
...
@@ -1155,6 +1155,12 @@ static const struct qmp_phy_init_tbl sa8775p_usb3_uniphy_pcs_tbl[] = {
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_REFGEN_REQ_CONFIG1
,
0x21
),
};
static
const
struct
qmp_phy_init_tbl
sa8775p_usb3_uniphy_pcs_usb_tbl
[]
=
{
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_USB3_RXEQTRAINING_DFE_TIME_S2
,
0x07
),
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_USB3_LFPS_DET_HIGH_COUNT_VAL
,
0xf8
),
QMP_PHY_INIT_CFG
(
QPHY_V5_PCS_USB3_POWER_STATE_CONFIG1
,
0x6f
),
};
struct
qmp_usb_offsets
{
u16
serdes
;
u16
pcs
;
...
...
@@ -1378,6 +1384,8 @@ static const struct qmp_phy_cfg sa8775p_usb3_uniphy_cfg = {
.
rx_tbl_num
=
ARRAY_SIZE
(
sc8280xp_usb3_uniphy_rx_tbl
),
.
pcs_tbl
=
sa8775p_usb3_uniphy_pcs_tbl
,
.
pcs_tbl_num
=
ARRAY_SIZE
(
sa8775p_usb3_uniphy_pcs_tbl
),
.
pcs_usb_tbl
=
sa8775p_usb3_uniphy_pcs_usb_tbl
,
.
pcs_usb_tbl_num
=
ARRAY_SIZE
(
sa8775p_usb3_uniphy_pcs_usb_tbl
),
.
vreg_list
=
qmp_phy_vreg_l
,
.
num_vregs
=
ARRAY_SIZE
(
qmp_phy_vreg_l
),
.
regs
=
qmp_v5_usb3phy_regs_layout
,
...
...
@@ -1396,6 +1404,8 @@ static const struct qmp_phy_cfg sc8280xp_usb3_uniphy_cfg = {
.
rx_tbl_num
=
ARRAY_SIZE
(
sc8280xp_usb3_uniphy_rx_tbl
),
.
pcs_tbl
=
sc8280xp_usb3_uniphy_pcs_tbl
,
.
pcs_tbl_num
=
ARRAY_SIZE
(
sc8280xp_usb3_uniphy_pcs_tbl
),
.
pcs_usb_tbl
=
sc8280xp_usb3_uniphy_pcs_usb_tbl
,
.
pcs_usb_tbl_num
=
ARRAY_SIZE
(
sc8280xp_usb3_uniphy_pcs_usb_tbl
),
.
vreg_list
=
qmp_phy_vreg_l
,
.
num_vregs
=
ARRAY_SIZE
(
qmp_phy_vreg_l
),
.
regs
=
qmp_v5_usb3phy_regs_layout
,
...
...
@@ -1672,6 +1682,7 @@ static int qmp_usb_power_on(struct phy *phy)
void
__iomem
*
tx
=
qmp
->
tx
;
void
__iomem
*
rx
=
qmp
->
rx
;
void
__iomem
*
pcs
=
qmp
->
pcs
;
void
__iomem
*
pcs_usb
=
qmp
->
pcs_usb
;
void
__iomem
*
status
;
unsigned
int
val
;
int
ret
;
...
...
@@ -1695,6 +1706,9 @@ static int qmp_usb_power_on(struct phy *phy)
qmp_usb_configure
(
pcs
,
cfg
->
pcs_tbl
,
cfg
->
pcs_tbl_num
);
if
(
pcs_usb
)
qmp_usb_configure
(
pcs_usb
,
cfg
->
pcs_usb_tbl
,
cfg
->
pcs_usb_tbl_num
);
if
(
cfg
->
has_pwrdn_delay
)
usleep_range
(
10
,
20
);
...
...
drivers/phy/realtek/Kconfig
View file @
9bcf8761
...
...
@@ -2,6 +2,9 @@
#
# Phy drivers for Realtek platforms
#
if ARCH_REALTEK || COMPILE_TEST
config PHY_RTK_RTD_USB2PHY
tristate "Realtek RTD USB2 PHY Transceiver Driver"
depends on USB_SUPPORT
...
...
@@ -25,3 +28,5 @@ config PHY_RTK_RTD_USB3PHY
The DHC (digital home center) RTD series SoCs used the Synopsys
DWC3 USB IP. This driver will do the PHY initialization
of the parameters.
endif # ARCH_REALTEK || COMPILE_TEST
drivers/phy/realtek/phy-rtk-usb2.c
View file @
9bcf8761
...
...
@@ -853,17 +853,11 @@ static inline void create_debug_files(struct rtk_phy *rtk_phy)
rtk_phy
->
debug_dir
=
debugfs_create_dir
(
dev_name
(
rtk_phy
->
dev
),
phy_debug_root
);
if
(
!
rtk_phy
->
debug_dir
)
return
;
if
(
!
debugfs_create_file
(
"parameter"
,
0444
,
rtk_phy
->
debug_dir
,
rtk_phy
,
&
rtk_usb2_parameter_fops
))
goto
file_error
;
debugfs_create_file
(
"parameter"
,
0444
,
rtk_phy
->
debug_dir
,
rtk_phy
,
&
rtk_usb2_parameter_fops
);
return
;
file_error:
debugfs_remove_recursive
(
rtk_phy
->
debug_dir
);
}
static
inline
void
remove_debug_files
(
struct
rtk_phy
*
rtk_phy
)
...
...
drivers/phy/realtek/phy-rtk-usb3.c
View file @
9bcf8761
...
...
@@ -416,17 +416,11 @@ static inline void create_debug_files(struct rtk_phy *rtk_phy)
return
;
rtk_phy
->
debug_dir
=
debugfs_create_dir
(
dev_name
(
rtk_phy
->
dev
),
phy_debug_root
);
if
(
!
rtk_phy
->
debug_dir
)
return
;
if
(
!
debugfs_create_file
(
"parameter"
,
0444
,
rtk_phy
->
debug_dir
,
rtk_phy
,
&
rtk_usb3_parameter_fops
))
goto
file_error
;
debugfs_create_file
(
"parameter"
,
0444
,
rtk_phy
->
debug_dir
,
rtk_phy
,
&
rtk_usb3_parameter_fops
);
return
;
file_error:
debugfs_remove_recursive
(
rtk_phy
->
debug_dir
);
}
static
inline
void
remove_debug_files
(
struct
rtk_phy
*
rtk_phy
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment