diff options
author | Caleb Connolly <caleb.connolly@linaro.org> | 2024-02-26 17:26:21 +0000 |
---|---|---|
committer | Caleb Connolly <caleb.connolly@linaro.org> | 2024-03-01 14:44:37 +0000 |
commit | c744e6308951d47f597e5dac450cab5555698246 (patch) | |
tree | 4fa21f3dec3497ab59d7fb966d10ea87be387645 /drivers/usb | |
parent | e9302ba6cc6bfdf8a3dc4e9f232767b9bc0b217d (diff) |
board: dragonboard410c: upstream DT compat
Use the root compatible strings from upstream Linux, add missing
'#clock-cells' property to the gcc node.
Adjust some of the msm8916/apq8016 drivers to use the correct upstream
compatible properties and DT bindings.
This prepares us to switch to upstream DT in a future patch.
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Tested-by: Sumit Garg <sumit.garg@linaro.org> #qcs404
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/ehci-msm.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c index dd0d153500c..98fe7bc3bcb 100644 --- a/drivers/usb/host/ehci-msm.c +++ b/drivers/usb/host/ehci-msm.c @@ -9,6 +9,7 @@ #include <common.h> #include <dm.h> +#include <dm/lists.h> #include <errno.h> #include <usb.h> #include <usb/ehci-ci.h> @@ -119,6 +120,24 @@ static int ehci_usb_of_to_plat(struct udevice *dev) return 0; } +static int ehci_usb_of_bind(struct udevice *dev) +{ + ofnode ulpi_node = ofnode_first_subnode(dev_ofnode(dev)); + ofnode phy_node; + + if (!ofnode_valid(ulpi_node)) + return 0; + + phy_node = ofnode_first_subnode(ulpi_node); + if (!ofnode_valid(phy_node)) { + printf("%s: ulpi subnode with no phy\n", __func__); + return -ENOENT; + } + + return device_bind_driver_to_node(dev, "msm8916_usbphy", "msm8916_usbphy", + phy_node, NULL); +} + #if defined(CONFIG_CI_UDC) /* Little quirk that MSM needs with Chipidea controller * Must reinit phy after reset @@ -132,7 +151,7 @@ void ci_init_after_reset(struct ehci_ctrl *ctrl) #endif static const struct udevice_id ehci_usb_ids[] = { - { .compatible = "qcom,ehci-host", }, + { .compatible = "qcom,ci-hdrc", }, { } }; @@ -141,6 +160,7 @@ U_BOOT_DRIVER(usb_ehci) = { .id = UCLASS_USB, .of_match = ehci_usb_ids, .of_to_plat = ehci_usb_of_to_plat, + .bind = ehci_usb_of_bind, .probe = ehci_usb_probe, .remove = ehci_usb_remove, .ops = &ehci_usb_ops, |