Skip to content

Commit aaaf919

Browse files
committed
Merge tag 'phy-fixes-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy
Pull phy fixes from Vinod Koul: - binding fix for g12a phys - Kconfig operator precedence for TI driver - renesas: register setting - sunplus: null deref fix - rockchip-inno fix for clk_disable_unprepare() - MDM9607 init sequence revert due to regression * tag 'phy-fixes-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: phy: phy-can-transceiver: Skip warning if no "max-bitrate" dt-bindings: phy: g12a-usb2-phy: fix compatible string documentation dt-bindings: phy: g12a-usb3-pcie-phy: fix compatible string documentation phy: freescale: imx8m-pcie: Add one missing error return phy: Revert "phy: qualcomm: usb28nm: Add MDM9607 init sequence" phy: rockchip-inno-usb2: Fix missing clk_disable_unprepare() in rockchip_usb2phy_power_on() phy: renesas: r8a779f0-eth-serdes: Fix register setting phy: usb: sunplus: Fix potential null-ptr-deref in sp_usb_phy_probe() phy: ti: fix Kconfig warning and operator precedence
2 parents 5deaa98 + bc30c15 commit aaaf919

File tree

10 files changed

+20
-28
lines changed

10 files changed

+20
-28
lines changed

Documentation/devicetree/bindings/phy/amlogic,meson-g12a-usb2-phy.yaml renamed to Documentation/devicetree/bindings/phy/amlogic,g12a-usb2-phy.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright 2019 BayLibre, SAS
33
%YAML 1.2
44
---
5-
$id: "http://devicetree.org/schemas/phy/amlogic,meson-g12a-usb2-phy.yaml#"
5+
$id: "http://devicetree.org/schemas/phy/amlogic,g12a-usb2-phy.yaml#"
66
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
77

88
title: Amlogic G12A USB2 PHY
@@ -13,8 +13,8 @@ maintainers:
1313
properties:
1414
compatible:
1515
enum:
16-
- amlogic,meson-g12a-usb2-phy
17-
- amlogic,meson-a1-usb2-phy
16+
- amlogic,g12a-usb2-phy
17+
- amlogic,a1-usb2-phy
1818

1919
reg:
2020
maxItems: 1
@@ -68,7 +68,7 @@ additionalProperties: false
6868
examples:
6969
- |
7070
phy@36000 {
71-
compatible = "amlogic,meson-g12a-usb2-phy";
71+
compatible = "amlogic,g12a-usb2-phy";
7272
reg = <0x36000 0x2000>;
7373
clocks = <&xtal>;
7474
clock-names = "xtal";

Documentation/devicetree/bindings/phy/amlogic,meson-g12a-usb3-pcie-phy.yaml renamed to Documentation/devicetree/bindings/phy/amlogic,g12a-usb3-pcie-phy.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright 2019 BayLibre, SAS
33
%YAML 1.2
44
---
5-
$id: "http://devicetree.org/schemas/phy/amlogic,meson-g12a-usb3-pcie-phy.yaml#"
5+
$id: "http://devicetree.org/schemas/phy/amlogic,g12a-usb3-pcie-phy.yaml#"
66
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
77

88
title: Amlogic G12A USB3 + PCIE Combo PHY
@@ -13,7 +13,7 @@ maintainers:
1313
properties:
1414
compatible:
1515
enum:
16-
- amlogic,meson-g12a-usb3-pcie-phy
16+
- amlogic,g12a-usb3-pcie-phy
1717

1818
reg:
1919
maxItems: 1
@@ -49,7 +49,7 @@ additionalProperties: false
4949
examples:
5050
- |
5151
phy@46000 {
52-
compatible = "amlogic,meson-g12a-usb3-pcie-phy";
52+
compatible = "amlogic,g12a-usb3-pcie-phy";
5353
reg = <0x46000 0x2000>;
5454
clocks = <&ref_clk>;
5555
clock-names = "ref_clk";

Documentation/devicetree/bindings/phy/qcom,usb-hs-28nm.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ properties:
1616
compatible:
1717
enum:
1818
- qcom,usb-hs-28nm-femtophy
19-
- qcom,usb-hs-28nm-mdm9607
2019

2120
reg:
2221
maxItems: 1

drivers/phy/freescale/phy-fsl-imx8m-pcie.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ static int imx8_pcie_phy_probe(struct platform_device *pdev)
255255
imx8_phy->perst =
256256
devm_reset_control_get_exclusive(dev, "perst");
257257
if (IS_ERR(imx8_phy->perst))
258-
dev_err_probe(dev, PTR_ERR(imx8_phy->perst),
258+
return dev_err_probe(dev, PTR_ERR(imx8_phy->perst),
259259
"Failed to get PCIE PHY PERST control\n");
260260
}
261261

drivers/phy/phy-can-transceiver.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ static int can_transceiver_phy_probe(struct platform_device *pdev)
9999
struct gpio_desc *standby_gpio;
100100
struct gpio_desc *enable_gpio;
101101
u32 max_bitrate = 0;
102+
int err;
102103

103104
can_transceiver_phy = devm_kzalloc(dev, sizeof(struct can_transceiver_phy), GFP_KERNEL);
104105
if (!can_transceiver_phy)
@@ -124,8 +125,8 @@ static int can_transceiver_phy_probe(struct platform_device *pdev)
124125
return PTR_ERR(phy);
125126
}
126127

127-
device_property_read_u32(dev, "max-bitrate", &max_bitrate);
128-
if (!max_bitrate)
128+
err = device_property_read_u32(dev, "max-bitrate", &max_bitrate);
129+
if ((err != -EINVAL) && !max_bitrate)
129130
dev_warn(dev, "Invalid value for transceiver max bitrate. Ignoring bitrate limit\n");
130131
phy->attrs.max_link_rate = max_bitrate;
131132

drivers/phy/qualcomm/phy-qcom-usb-hs-28nm.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -401,26 +401,13 @@ static const struct hsphy_init_seq init_seq_femtophy[] = {
401401
HSPHY_INIT_CFG(0x90, 0x60, 0),
402402
};
403403

404-
static const struct hsphy_init_seq init_seq_mdm9607[] = {
405-
HSPHY_INIT_CFG(0x80, 0x44, 0),
406-
HSPHY_INIT_CFG(0x81, 0x38, 0),
407-
HSPHY_INIT_CFG(0x82, 0x24, 0),
408-
HSPHY_INIT_CFG(0x83, 0x13, 0),
409-
};
410-
411404
static const struct hsphy_data hsphy_data_femtophy = {
412405
.init_seq = init_seq_femtophy,
413406
.init_seq_num = ARRAY_SIZE(init_seq_femtophy),
414407
};
415408

416-
static const struct hsphy_data hsphy_data_mdm9607 = {
417-
.init_seq = init_seq_mdm9607,
418-
.init_seq_num = ARRAY_SIZE(init_seq_mdm9607),
419-
};
420-
421409
static const struct of_device_id qcom_snps_hsphy_match[] = {
422410
{ .compatible = "qcom,usb-hs-28nm-femtophy", .data = &hsphy_data_femtophy, },
423-
{ .compatible = "qcom,usb-hs-28nm-mdm9607", .data = &hsphy_data_mdm9607, },
424411
{ },
425412
};
426413
MODULE_DEVICE_TABLE(of, qcom_snps_hsphy_match);

drivers/phy/renesas/r8a779f0-ether-serdes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ r8a779f0_eth_serdes_chan_setting(struct r8a779f0_eth_serdes_channel *channel)
126126
r8a779f0_eth_serdes_write32(channel->addr, 0x0160, 0x180, 0x0007);
127127
r8a779f0_eth_serdes_write32(channel->addr, 0x01ac, 0x180, 0x0000);
128128
r8a779f0_eth_serdes_write32(channel->addr, 0x00c4, 0x180, 0x0310);
129-
r8a779f0_eth_serdes_write32(channel->addr, 0x00c8, 0x380, 0x0101);
129+
r8a779f0_eth_serdes_write32(channel->addr, 0x00c8, 0x180, 0x0101);
130130
ret = r8a779f0_eth_serdes_reg_wait(channel, 0x00c8, 0x0180, BIT(0), 0);
131131
if (ret)
132132
return ret;

drivers/phy/rockchip/phy-rockchip-inno-usb2.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,10 @@ static int rockchip_usb2phy_power_on(struct phy *phy)
485485
return ret;
486486

487487
ret = property_enable(base, &rport->port_cfg->phy_sus, false);
488-
if (ret)
488+
if (ret) {
489+
clk_disable_unprepare(rphy->clk480m);
489490
return ret;
491+
}
490492

491493
/* waiting for the utmi_clk to become stable */
492494
usleep_range(1500, 2000);

drivers/phy/sunplus/phy-sunplus-usb2.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ static int sp_usb_phy_probe(struct platform_device *pdev)
254254
return PTR_ERR(usbphy->phy_regs);
255255

256256
usbphy->moon4_res_mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "moon4");
257+
if (!usbphy->moon4_res_mem)
258+
return -EINVAL;
259+
257260
usbphy->moon4_regs = devm_ioremap(&pdev->dev, usbphy->moon4_res_mem->start,
258261
resource_size(usbphy->moon4_res_mem));
259262
if (!usbphy->moon4_regs)

drivers/phy/ti/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ config PHY_DM816X_USB
2323

2424
config PHY_AM654_SERDES
2525
tristate "TI AM654 SERDES support"
26-
depends on OF && ARCH_K3 || COMPILE_TEST
26+
depends on OF && (ARCH_K3 || COMPILE_TEST)
2727
depends on COMMON_CLK
2828
select GENERIC_PHY
2929
select MULTIPLEXER
@@ -35,7 +35,7 @@ config PHY_AM654_SERDES
3535

3636
config PHY_J721E_WIZ
3737
tristate "TI J721E WIZ (SERDES Wrapper) support"
38-
depends on OF && ARCH_K3 || COMPILE_TEST
38+
depends on OF && (ARCH_K3 || COMPILE_TEST)
3939
depends on HAS_IOMEM && OF_ADDRESS
4040
depends on COMMON_CLK
4141
select GENERIC_PHY

0 commit comments

Comments
 (0)