diff options
author | Caleb Connolly | 2024-02-26 17:26:21 +0000 |
---|---|---|
committer | Caleb Connolly | 2024-03-01 14:44:37 +0000 |
commit | c744e6308951d47f597e5dac450cab5555698246 (patch) | |
tree | 4fa21f3dec3497ab59d7fb966d10ea87be387645 /drivers | |
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')
-rw-r--r-- | drivers/clk/qcom/clock-apq8016.c | 7 | ||||
-rw-r--r-- | drivers/phy/qcom/msm8916-usbh-phy.c | 4 | ||||
-rw-r--r-- | drivers/pinctrl/qcom/pinctrl-apq8016.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ehci-msm.c | 22 |
4 files changed, 28 insertions, 7 deletions
diff --git a/drivers/clk/qcom/clock-apq8016.c b/drivers/clk/qcom/clock-apq8016.c index 0af7191cff5..9de0ad5ed32 100644 --- a/drivers/clk/qcom/clock-apq8016.c +++ b/drivers/clk/qcom/clock-apq8016.c @@ -13,6 +13,7 @@ #include <errno.h> #include <asm/io.h> #include <linux/bitops.h> +#include <dt-bindings/clock/qcom,gcc-msm8916.h> #include "clock-qcom.h" @@ -125,13 +126,13 @@ static ulong apq8016_clk_set_rate(struct clk *clk, ulong rate) struct msm_clk_priv *priv = dev_get_priv(clk->dev); switch (clk->id) { - case 0: /* SDC1 */ + case GCC_SDCC1_APPS_CLK: /* SDC1 */ return clk_init_sdc(priv, 0, rate); break; - case 1: /* SDC2 */ + case GCC_SDCC2_APPS_CLK: /* SDC2 */ return clk_init_sdc(priv, 1, rate); break; - case 4: /* UART2 */ + case GCC_BLSP1_UART2_APPS_CLK: /* UART2 */ return clk_init_uart(priv); break; default: diff --git a/drivers/phy/qcom/msm8916-usbh-phy.c b/drivers/phy/qcom/msm8916-usbh-phy.c index 7c9d030a4d8..f52046f7cb0 100644 --- a/drivers/phy/qcom/msm8916-usbh-phy.c +++ b/drivers/phy/qcom/msm8916-usbh-phy.c @@ -74,7 +74,7 @@ static int msm_phy_probe(struct udevice *dev) { struct msm_phy_priv *priv = dev_get_priv(dev); - priv->regs = dev_remap_addr(dev); + priv->regs = dev_remap_addr(dev_get_parent(dev)); if (!priv->regs) return -EINVAL; @@ -96,7 +96,7 @@ static struct phy_ops msm_phy_ops = { }; static const struct udevice_id msm_phy_ids[] = { - { .compatible = "qcom,apq8016-usbphy" }, + { .compatible = "qcom,usb-hs-phy-msm8916" }, { } }; diff --git a/drivers/pinctrl/qcom/pinctrl-apq8016.c b/drivers/pinctrl/qcom/pinctrl-apq8016.c index eb9bf87b6c2..db0e2124684 100644 --- a/drivers/pinctrl/qcom/pinctrl-apq8016.c +++ b/drivers/pinctrl/qcom/pinctrl-apq8016.c @@ -29,7 +29,7 @@ static const char * const msm_pinctrl_pins[] = { }; static const struct pinctrl_function msm_pinctrl_functions[] = { - {"blsp1_uart", 2}, + {"blsp_uart2", 2}, }; static const char *apq8016_get_function_name(struct udevice *dev, 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, |