Re: [PATCH 2/3] phy: sun4i-usb: add Allwinner F1C100s support

2023-06-09 Thread Jernej Škrabec
Dne petek, 09. junij 2023 ob 12:56:20 CEST je Andre Przywara napisal(a):
> The Allwinner F1C100s implements a single USB PHY, connected to its MUSB
> OTG controller. The USB PHY is of the simpler, older type (like the A10),
> the only real difference is that it's indeed only one PHY.
> 
> Add a struct describing those F1C100s USB PHY properties, and connect it
> to the new compatible string.
> 
> Signed-off-by: Andre Przywara 

Reviewed-by: Jernej Skrabec 

Best regards,
Jernej




[PATCH 2/3] phy: sun4i-usb: add Allwinner F1C100s support

2023-06-09 Thread Andre Przywara
The Allwinner F1C100s implements a single USB PHY, connected to its MUSB
OTG controller. The USB PHY is of the simpler, older type (like the A10),
the only real difference is that it's indeed only one PHY.

Add a struct describing those F1C100s USB PHY properties, and connect it
to the new compatible string.

Signed-off-by: Andre Przywara 
---
 drivers/phy/allwinner/phy-sun4i-usb.c | 9 +
 1 file changed, 9 insertions(+)

diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c 
b/drivers/phy/allwinner/phy-sun4i-usb.c
index dbea70f9a5e..2bf47fc36a7 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -648,6 +648,14 @@ static const struct sun4i_usb_phy_cfg sun50i_h6_cfg = {
.missing_phys = BIT(1) | BIT(2),
 };
 
+static const struct sun4i_usb_phy_cfg suniv_f1c100s_cfg = {
+   .num_phys = 1,
+   .type = sun4i_a10_phy,
+   .disc_thresh = 3,
+   .phyctl_offset = REG_PHYCTL_A10,
+   .dedicated_clocks = true,
+};
+
 static const struct udevice_id sun4i_usb_phy_ids[] = {
{ .compatible = "allwinner,sun4i-a10-usb-phy", .data = 
(ulong)_a10_cfg },
{ .compatible = "allwinner,sun5i-a13-usb-phy", .data = 
(ulong)_a13_cfg },
@@ -662,6 +670,7 @@ static const struct udevice_id sun4i_usb_phy_ids[] = {
{ .compatible = "allwinner,sun20i-d1-usb-phy", .data = 
(ulong)_d1_cfg },
{ .compatible = "allwinner,sun50i-a64-usb-phy", .data = 
(ulong)_a64_cfg},
{ .compatible = "allwinner,sun50i-h6-usb-phy", .data = 
(ulong)_h6_cfg},
+   { .compatible = "allwinner,suniv-f1c100s-usb-phy", .data = 
(ulong)_f1c100s_cfg },
{ }
 };
 
-- 
2.25.1