2022-06-08 09:08:40

by Icenowy Zheng

[permalink] [raw]
Subject: [PATCH 0/7] SUNIV USB support (and updating mailmap)

This patchset introduces support for F1C100s' USB.

As I switched to a new mail address, and this patchset contains patches
authored before this change, a mailmap update is added.

The DT binding and driver support for SUNIV USB PHY/MUSB are added, in
addition to DT changes to the DTSI and Lichee Nano DT.

Icenowy Zheng (7):
mailmap: update Icenowy Zheng's mail address
dt-bindings: phy: add binding document for Allwinner F1C100s USB PHY
dt-bindings: usb: sunxi-musb: add F1C100s MUSB compatible string
phy: sun4i-usb: add support for the USB PHY on F1C100s SoC
musb: sunxi: add support for the F1C100s MUSB controller
ARM: suniv: add USB-related device nodes
ARM: suniv: f1c100s: enable USB on Lichee Pi Nano

.mailmap | 3 +
.../phy/allwinner,suniv-f1c100s-usb-phy.yaml | 83 +++++++++++++++++++
.../usb/allwinner,sun4i-a10-musb.yaml | 1 +
.../boot/dts/suniv-f1c100s-licheepi-nano.dts | 16 ++++
arch/arm/boot/dts/suniv-f1c100s.dtsi | 26 ++++++
drivers/phy/allwinner/phy-sun4i-usb.c | 11 +++
drivers/usb/musb/sunxi.c | 8 +-
7 files changed, 146 insertions(+), 2 deletions(-)
create mode 100644 Documentation/devicetree/bindings/phy/allwinner,suniv-f1c100s-usb-phy.yaml

--
2.36.0


2022-06-08 09:10:08

by Icenowy Zheng

[permalink] [raw]
Subject: [PATCH 4/7] phy: sun4i-usb: add support for the USB PHY on F1C100s SoC

From: Icenowy Zheng <[email protected]>

The F1C100s SoC has one USB OTG port connected to a MUSB controller.

Add support for its USB PHY.

Signed-off-by: Icenowy Zheng <[email protected]>
---
drivers/phy/allwinner/phy-sun4i-usb.c | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index d5f3b42eb8ce..f6592c8d611b 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -109,6 +109,7 @@ enum sun4i_usb_phy_type {
sun8i_v3s_phy,
sun50i_a64_phy,
sun50i_h6_phy,
+ suniv_f1c100s_phy,
};

struct sun4i_usb_phy_cfg {
@@ -859,6 +860,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 = suniv_f1c100s_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,
@@ -988,6 +997,8 @@ static const struct of_device_id sun4i_usb_phy_of_match[] = {
{ .compatible = "allwinner,sun50i-a64-usb-phy",
.data = &sun50i_a64_cfg},
{ .compatible = "allwinner,sun50i-h6-usb-phy", .data = &sun50i_h6_cfg },
+ { .compatible = "allwinner,suniv-f1c100s-usb-phy",
+ .data = &suniv_f1c100s_cfg },
{ },
};
MODULE_DEVICE_TABLE(of, sun4i_usb_phy_of_match);
--
2.36.0