]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
phy: sun4i-usb: Add D1 variant
authorSamuel Holland <samuel@sholland.org>
Fri, 15 Jul 2022 04:09:22 +0000 (23:09 -0500)
committerAndre Przywara <andre.przywara@arm.com>
Mon, 18 Jul 2022 22:48:37 +0000 (23:48 +0100)
D1 has a register layout like A100 and H616, with the moved SIDDQ bit.
Unlike H616 it does not have any dependencies between PHY instances.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
drivers/phy/allwinner/phy-sun4i-usb.c

index 73e660edc37d48f20ded7778c702f12509f573ba..2e969ab91e35195300015e5556e8b04d4895d420 100644 (file)
@@ -610,6 +610,15 @@ static const struct sun4i_usb_phy_cfg sun8i_v3s_cfg = {
        .phy0_dual_route = true,
 };
 
+static const struct sun4i_usb_phy_cfg sun20i_d1_cfg = {
+       .num_phys = 2,
+       .type = sun50i_h6_phy,
+       .phyctl_offset = REG_PHYCTL_A33,
+       .dedicated_clocks = true,
+       .hci_phy_ctl_clear = PHY_CTL_SIDDQ,
+       .phy0_dual_route = true,
+};
+
 static const struct sun4i_usb_phy_cfg sun50i_a64_cfg = {
        .num_phys = 2,
        .type = sun50i_a64_phy,
@@ -641,6 +650,7 @@ static const struct udevice_id sun4i_usb_phy_ids[] = {
        { .compatible = "allwinner,sun8i-h3-usb-phy", .data = (ulong)&sun8i_h3_cfg },
        { .compatible = "allwinner,sun8i-r40-usb-phy", .data = (ulong)&sun8i_r40_cfg },
        { .compatible = "allwinner,sun8i-v3s-usb-phy", .data = (ulong)&sun8i_v3s_cfg },
+       { .compatible = "allwinner,sun20i-d1-usb-phy", .data = (ulong)&sun20i_d1_cfg },
        { .compatible = "allwinner,sun50i-a64-usb-phy", .data = (ulong)&sun50i_a64_cfg},
        { .compatible = "allwinner,sun50i-h6-usb-phy", .data = (ulong)&sun50i_h6_cfg},
        { }