Commit 123dfdbc authored by Hans de Goede's avatar Hans de Goede Committed by Kishon Vijay Abraham I

phy-sun4i-usb: Add support for the usb-phys on the sun8i-a23 SoC

The usb-phys on the sun8i-a23 SoC have the same setup wrt clocks as on the
sun6i-a31 SoC, but there are only 2 instead of 3 like on the sun5i-a13 SoC.
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
parent 28464696
...@@ -7,6 +7,7 @@ Required properties: ...@@ -7,6 +7,7 @@ Required properties:
* allwinner,sun5i-a13-usb-phy * allwinner,sun5i-a13-usb-phy
* allwinner,sun6i-a31-usb-phy * allwinner,sun6i-a31-usb-phy
* allwinner,sun7i-a20-usb-phy * allwinner,sun7i-a20-usb-phy
* allwinner,sun8i-a23-usb-phy
- reg : a list of offset + length pairs - reg : a list of offset + length pairs
- reg-names : - reg-names :
* "phy_ctrl" * "phy_ctrl"
...@@ -17,6 +18,7 @@ Required properties: ...@@ -17,6 +18,7 @@ Required properties:
- clock-names : - clock-names :
* "usb_phy" for sun4i, sun5i or sun7i * "usb_phy" for sun4i, sun5i or sun7i
* "usb0_phy", "usb1_phy" and "usb2_phy" for sun6i * "usb0_phy", "usb1_phy" and "usb2_phy" for sun6i
* "usb0_phy", "usb1_phy" for sun8i
- resets : a list of phandle + reset specifier pairs - resets : a list of phandle + reset specifier pairs
- reset-names : - reset-names :
* "usb0_reset" * "usb0_reset"
......
...@@ -442,7 +442,8 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev) ...@@ -442,7 +442,8 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev)
INIT_DELAYED_WORK(&data->detect, sun4i_usb_phy0_id_vbus_det_scan); INIT_DELAYED_WORK(&data->detect, sun4i_usb_phy0_id_vbus_det_scan);
dev_set_drvdata(dev, data); dev_set_drvdata(dev, data);
if (of_device_is_compatible(np, "allwinner,sun5i-a13-usb-phy")) if (of_device_is_compatible(np, "allwinner,sun5i-a13-usb-phy") ||
of_device_is_compatible(np, "allwinner,sun8i-a23-usb-phy"))
data->num_phys = 2; data->num_phys = 2;
else else
data->num_phys = 3; data->num_phys = 3;
...@@ -453,7 +454,8 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev) ...@@ -453,7 +454,8 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev)
else else
data->disc_thresh = 3; data->disc_thresh = 3;
if (of_device_is_compatible(np, "allwinner,sun6i-a31-usb-phy")) if (of_device_is_compatible(np, "allwinner,sun6i-a31-usb-phy") ||
of_device_is_compatible(np, "allwinner,sun8i-a23-usb-phy"))
dedicated_clocks = true; dedicated_clocks = true;
else else
dedicated_clocks = false; dedicated_clocks = false;
...@@ -588,6 +590,7 @@ static const struct of_device_id sun4i_usb_phy_of_match[] = { ...@@ -588,6 +590,7 @@ static const struct of_device_id sun4i_usb_phy_of_match[] = {
{ .compatible = "allwinner,sun5i-a13-usb-phy" }, { .compatible = "allwinner,sun5i-a13-usb-phy" },
{ .compatible = "allwinner,sun6i-a31-usb-phy" }, { .compatible = "allwinner,sun6i-a31-usb-phy" },
{ .compatible = "allwinner,sun7i-a20-usb-phy" }, { .compatible = "allwinner,sun7i-a20-usb-phy" },
{ .compatible = "allwinner,sun8i-a23-usb-phy" },
{ }, { },
}; };
MODULE_DEVICE_TABLE(of, sun4i_usb_phy_of_match); MODULE_DEVICE_TABLE(of, sun4i_usb_phy_of_match);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment