phy: sun4i-usb: add support for the USB PHY on F1C100s SoC
authorIcenowy Zheng <uwu@icenowy.me>
Mon, 9 Jan 2023 01:22:22 +0000 (01:22 +0000)
committerVinod Koul <vkoul@kernel.org>
Thu, 12 Jan 2023 17:38:57 +0000 (23:08 +0530)
The F1C100s SoC has one USB OTG port connected to a MUSB controller.

Add support for its USB PHY.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Link: https://lore.kernel.org/r/20230109012223.4079299-3-andre.przywara@arm.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/allwinner/phy-sun4i-usb.c

index 5472db9..d9beacc 100644 (file)
@@ -918,6 +918,14 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev)
        return 0;
 }
 
+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 sun4i_usb_phy_cfg sun4i_a10_cfg = {
        .num_phys = 3,
        .type = sun4i_a10_phy,
@@ -1059,6 +1067,8 @@ static const struct of_device_id sun4i_usb_phy_of_match[] = {
          .data = &sun50i_a64_cfg},
        { .compatible = "allwinner,sun50i-h6-usb-phy", .data = &sun50i_h6_cfg },
        { .compatible = "allwinner,sun50i-h616-usb-phy", .data = &sun50i_h616_cfg },
+       { .compatible = "allwinner,suniv-f1c100s-usb-phy",
+         .data = &suniv_f1c100s_cfg },
        { },
 };
 MODULE_DEVICE_TABLE(of, sun4i_usb_phy_of_match);