Skip to content

Commit 9f10e7f

Browse files
committed
Merge tag 'phy-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy
Pull phy updates from Vinod Koul: "Lots of Qualcomm and Rockchip device support. New Support: - Qualcomm SAR2130P qmp usb, SAR2130P qmp pcie, QCS615 qusb2 and PCIe, IPQ5424 qmp pcie, IPQ5424 QUSB2 and USB3 PHY - Rockchip rk3576 combo phy support Updates: - Drop Shengyang for JH7110 maintainer - Freescale hdmi register calculation optimization - Rockchip pcie phy mutex and regmap updates" * tag 'phy-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (37 commits) dt-bindings: phy: qcom,qmp-pcie: document the SM8350 two lanes PCIe PHY phy: rockchip: phy-rockchip-typec: Fix Copyright description dt-bindings: phy: qcom,ipq8074-qmp-pcie: Document the IPQ5424 QMP PCIe PHYs phy: qcom-qusb2: Add support for QCS615 dt-bindings: usb: qcom,dwc3: Add QCS615 to USB DWC3 bindings phy: core: Simplify API of_phy_simple_xlate() implementation phy: sun4i-usb: Remove unused of_gpio.h phy: HiSilicon: Don't use "proxy" headers phy: samsung-ufs: switch back to syscon_regmap_lookup_by_phandle() phy: qualcomm: qmp-pcie: add support for SAR2130P phy: qualcomm: qmp-pcie: define several new registers phy: qualcomm: qmp-pcie: split PCS_LANE1 region phy: qualcomm: qmp-combo: add support for SAR2130P dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add SAR2130P compatible dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp: Add SAR2130P compatible phy: freescale: fsl-samsung-hdmi: Clean up fld_tg_code calculation phy: freescale: fsl-samsung-hdmi: Stop searching when exact match is found phy: freescale: fsl-samsung-hdmi: Expand Integer divider range phy: rockchip-naneng-combo: add rk3576 support dt-bindings: phy: rockchip: add rk3576 compatible ...
2 parents 7c775c6 + af1bc0e commit 9f10e7f

32 files changed

+922
-171
lines changed

Documentation/devicetree/bindings/phy/phy-rockchip-naneng-combphy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ properties:
1313
compatible:
1414
enum:
1515
- rockchip,rk3568-naneng-combphy
16+
- rockchip,rk3576-naneng-combphy
1617
- rockchip,rk3588-naneng-combphy
1718

1819
reg:

Documentation/devicetree/bindings/phy/qcom,ipq8074-qmp-pcie-phy.yaml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,21 @@ description:
1515

1616
properties:
1717
compatible:
18-
enum:
19-
- qcom,ipq6018-qmp-pcie-phy
20-
- qcom,ipq8074-qmp-gen3-pcie-phy
21-
- qcom,ipq8074-qmp-pcie-phy
22-
- qcom,ipq9574-qmp-gen3x1-pcie-phy
23-
- qcom,ipq9574-qmp-gen3x2-pcie-phy
18+
oneOf:
19+
- enum:
20+
- qcom,ipq6018-qmp-pcie-phy
21+
- qcom,ipq8074-qmp-gen3-pcie-phy
22+
- qcom,ipq8074-qmp-pcie-phy
23+
- qcom,ipq9574-qmp-gen3x1-pcie-phy
24+
- qcom,ipq9574-qmp-gen3x2-pcie-phy
25+
- items:
26+
- enum:
27+
- qcom,ipq5424-qmp-gen3x1-pcie-phy
28+
- const: qcom,ipq9574-qmp-gen3x1-pcie-phy
29+
- items:
30+
- enum:
31+
- qcom,ipq5424-qmp-gen3x2-pcie-phy
32+
- const: qcom,ipq9574-qmp-gen3x2-pcie-phy
2433

2534
reg:
2635
items:

Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ properties:
1818
oneOf:
1919
- items:
2020
- enum:
21+
- qcom,ipq5424-qusb2-phy
2122
- qcom,ipq6018-qusb2-phy
2223
- qcom,ipq8074-qusb2-phy
2324
- qcom,ipq9574-qusb2-phy

Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ description:
1616
properties:
1717
compatible:
1818
enum:
19+
- qcom,qcs615-qmp-gen3x1-pcie-phy
1920
- qcom,sa8775p-qmp-gen4x2-pcie-phy
2021
- qcom,sa8775p-qmp-gen4x4-pcie-phy
22+
- qcom,sar2130p-qmp-gen3x2-pcie-phy
2123
- qcom,sc8180x-qmp-pcie-phy
2224
- qcom,sc8280xp-qmp-gen3x1-pcie-phy
2325
- qcom,sc8280xp-qmp-gen3x2-pcie-phy
@@ -32,6 +34,7 @@ properties:
3234
- qcom,sm8250-qmp-gen3x2-pcie-phy
3335
- qcom,sm8250-qmp-modem-pcie-phy
3436
- qcom,sm8350-qmp-gen3x1-pcie-phy
37+
- qcom,sm8350-qmp-gen3x2-pcie-phy
3538
- qcom,sm8450-qmp-gen3x1-pcie-phy
3639
- qcom,sm8450-qmp-gen4x2-pcie-phy
3740
- qcom,sm8550-qmp-gen3x2-pcie-phy
@@ -139,6 +142,7 @@ allOf:
139142
compatible:
140143
contains:
141144
enum:
145+
- qcom,sar2130p-qmp-gen3x2-pcie-phy
142146
- qcom,sc8180x-qmp-pcie-phy
143147
- qcom,sdm845-qhp-pcie-phy
144148
- qcom,sdm845-qmp-pcie-phy
@@ -149,6 +153,7 @@ allOf:
149153
- qcom,sm8250-qmp-gen3x2-pcie-phy
150154
- qcom,sm8250-qmp-modem-pcie-phy
151155
- qcom,sm8350-qmp-gen3x1-pcie-phy
156+
- qcom,sm8350-qmp-gen3x2-pcie-phy
152157
- qcom,sm8450-qmp-gen3x1-pcie-phy
153158
- qcom,sm8450-qmp-gen3x2-pcie-phy
154159
- qcom,sm8550-qmp-gen3x2-pcie-phy
@@ -167,6 +172,7 @@ allOf:
167172
compatible:
168173
contains:
169174
enum:
175+
- qcom,qcs615-qmp-gen3x1-pcie-phy
170176
- qcom,sc8280xp-qmp-gen3x1-pcie-phy
171177
- qcom,sc8280xp-qmp-gen3x2-pcie-phy
172178
- qcom,sc8280xp-qmp-gen3x4-pcie-phy

Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ description:
1616
properties:
1717
compatible:
1818
enum:
19+
- qcom,ipq5424-qmp-usb3-phy
1920
- qcom,ipq6018-qmp-usb3-phy
2021
- qcom,ipq8074-qmp-usb3-phy
2122
- qcom,ipq9574-qmp-usb3-phy
@@ -89,6 +90,7 @@ allOf:
8990
compatible:
9091
contains:
9192
enum:
93+
- qcom,ipq5424-qmp-usb3-phy
9294
- qcom,ipq6018-qmp-usb3-phy
9395
- qcom,ipq8074-qmp-usb3-phy
9496
- qcom,ipq9574-qmp-usb3-phy

Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ description:
1616
properties:
1717
compatible:
1818
enum:
19+
- qcom,sar2130p-qmp-usb3-dp-phy
1920
- qcom,sc7180-qmp-usb3-dp-phy
2021
- qcom,sc7280-qmp-usb3-dp-phy
2122
- qcom,sc8180x-qmp-usb3-dp-phy
@@ -127,6 +128,7 @@ allOf:
127128
properties:
128129
compatible:
129130
enum:
131+
- qcom,sar2130p-qmp-usb3-dp-phy
130132
- qcom,sc8280xp-qmp-usb43dp-phy
131133
- qcom,sm6350-qmp-usb3-dp-phy
132134
- qcom,sm8550-qmp-usb3-dp-phy

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22507,7 +22507,6 @@ F: drivers/phy/starfive/phy-jh7110-dphy-rx.c
2250722507

2250822508
STARFIVE JH7110 DPHY TX DRIVER
2250922509
M: Keith Zhao <keith.zhao@starfivetech.com>
22510-
M: Shengyang Chen <shengyang.chen@starfivetech.com>
2251122510
S: Supported
2251222511
F: Documentation/devicetree/bindings/phy/starfive,jh7110-dphy-tx.yaml
2251322512
F: drivers/phy/starfive/phy-jh7110-dphy-tx.c

drivers/phy/allwinner/phy-sun4i-usb.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include <linux/module.h>
2424
#include <linux/mutex.h>
2525
#include <linux/of.h>
26-
#include <linux/of_gpio.h>
2726
#include <linux/phy/phy.h>
2827
#include <linux/phy/phy-sun4i-usb.h>
2928
#include <linux/platform_device.h>

drivers/phy/freescale/phy-fsl-samsung-hdmi.c

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -331,25 +331,17 @@ fsl_samsung_hdmi_phy_configure_pll_lock_det(struct fsl_samsung_hdmi_phy *phy,
331331
{
332332
u32 pclk = cfg->pixclk;
333333
u32 fld_tg_code;
334-
u32 pclk_khz;
335-
u8 div = 1;
336-
337-
switch (cfg->pixclk) {
338-
case 22250000 ... 47500000:
339-
div = 1;
340-
break;
341-
case 50349650 ... 99000000:
342-
div = 2;
343-
break;
344-
case 100699300 ... 198000000:
345-
div = 4;
346-
break;
347-
case 205000000 ... 297000000:
348-
div = 8;
349-
break;
334+
u32 int_pllclk;
335+
u8 div;
336+
337+
/* Find int_pllclk speed */
338+
for (div = 0; div < 4; div++) {
339+
int_pllclk = pclk / (1 << div);
340+
if (int_pllclk < (50 * MHZ))
341+
break;
350342
}
351343

352-
writeb(FIELD_PREP(REG12_CK_DIV_MASK, ilog2(div)), phy->regs + PHY_REG(12));
344+
writeb(FIELD_PREP(REG12_CK_DIV_MASK, div), phy->regs + PHY_REG(12));
353345

354346
/*
355347
* Calculation for the frequency lock detector target code (fld_tg_code)
@@ -362,10 +354,8 @@ fsl_samsung_hdmi_phy_configure_pll_lock_det(struct fsl_samsung_hdmi_phy *phy,
362354
* settings rounding up always too. TODO: Check if that is
363355
* correct.
364356
*/
365-
pclk /= div;
366-
pclk_khz = pclk / 1000;
367-
fld_tg_code = 256 * 1000 * 1000 / pclk_khz * 24;
368-
fld_tg_code = DIV_ROUND_UP(fld_tg_code, 1000);
357+
358+
fld_tg_code = DIV_ROUND_UP(24 * MHZ * 256, int_pllclk);
369359

370360
/* FLD_TOL and FLD_RP_CODE taken from downstream driver */
371361
writeb(FIELD_PREP(REG13_TG_CODE_LOW_MASK, fld_tg_code),
@@ -406,16 +396,15 @@ static unsigned long fsl_samsung_hdmi_phy_find_pms(unsigned long fout, u8 *p, u1
406396
continue;
407397

408398
/*
409-
* TODO: Ref Manual doesn't state the range of _m
410-
* so this should be further refined if possible.
411-
* This range was set based on the original values
412-
* in the lookup table
399+
* The Ref manual doesn't explicitly state the range of M,
400+
* but it does show it as an 8-bit value, so reject
401+
* any value above 255.
413402
*/
414403
tmp = (u64)fout * (_p * _s);
415404
do_div(tmp, 24 * MHZ);
416-
_m = tmp;
417-
if (_m < 0x30 || _m > 0x7b)
405+
if (tmp > 255)
418406
continue;
407+
_m = tmp;
419408

420409
/*
421410
* Rev 2 of the Ref Manual states the
@@ -440,9 +429,13 @@ static unsigned long fsl_samsung_hdmi_phy_find_pms(unsigned long fout, u8 *p, u1
440429
min_delta = delta;
441430
best_freq = tmp;
442431
}
432+
433+
/* If we have an exact match, stop looking for a better value */
434+
if (!delta)
435+
goto done;
443436
}
444437
}
445-
438+
done:
446439
if (best_freq) {
447440
*p = best_p;
448441
*m = best_m;

drivers/phy/hisilicon/phy-hi3670-pcie.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,20 @@
1616
*/
1717

1818
#include <linux/bitfield.h>
19+
#include <linux/bits.h>
1920
#include <linux/clk.h>
20-
#include <linux/gpio.h>
21-
#include <linux/kernel.h>
21+
#include <linux/delay.h>
22+
#include <linux/device.h>
23+
#include <linux/err.h>
24+
#include <linux/io.h>
2225
#include <linux/mfd/syscon.h>
26+
#include <linux/mod_devicetable.h>
2327
#include <linux/module.h>
24-
#include <linux/of_gpio.h>
28+
#include <linux/of.h>
2529
#include <linux/phy/phy.h>
2630
#include <linux/platform_device.h>
2731
#include <linux/regmap.h>
32+
#include <linux/types.h>
2833

2934
#define AXI_CLK_FREQ 207500000
3035
#define REF_CLK_FREQ 100000000

0 commit comments

Comments
 (0)