aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc/imx8/scu.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-04-30 23:21:27 -0400
committerTom Rini <trini@konsulko.com>2019-05-01 07:25:51 -0400
commitb4ee6daad7a2604ca9466b2ba48de86cc27d381f (patch)
treef28b8d6bfeface9e9f188ffc37322c89e9d1fe77 /drivers/misc/imx8/scu.c
parenta69120a0d7c8d4044cdaceea9eb03913ba4e49c7 (diff)
parent0d3912fcd41dc2a85891f78e8fc255a379323619 (diff)
Merge tag 'u-boot-imx-20190426' of git://git.denx.de/u-boot-imx
Porting to DM and i.MX8 ------------------------ - warp7 to DM - kp_imx53 to DM - Warnings in DT - MX8QM support - colibri-imx6ull to DM - imx7d-pico to DM - ocotp for MX8
Diffstat (limited to 'drivers/misc/imx8/scu.c')
-rw-r--r--drivers/misc/imx8/scu.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/misc/imx8/scu.c b/drivers/misc/imx8/scu.c
index 1b9c49c99c..9ec00457b8 100644
--- a/drivers/misc/imx8/scu.c
+++ b/drivers/misc/imx8/scu.c
@@ -219,11 +219,21 @@ static int imx8_scu_bind(struct udevice *dev)
int ret;
struct udevice *child;
int node;
+ char *clk_compatible, *iomuxc_compatible;
+
+ if (IS_ENABLED(CONFIG_IMX8QXP)) {
+ clk_compatible = "fsl,imx8qxp-clk";
+ iomuxc_compatible = "fsl,imx8qxp-iomuxc";
+ } else if (IS_ENABLED(CONFIG_IMX8QM)) {
+ clk_compatible = "fsl,imx8qm-clk";
+ iomuxc_compatible = "fsl,imx8qm-iomuxc";
+ } else {
+ return -EINVAL;
+ }
debug("%s(dev=%p)\n", __func__, dev);
- node = fdt_node_offset_by_compatible(gd->fdt_blob, -1,
- "fsl,imx8qxp-clk");
+ node = fdt_node_offset_by_compatible(gd->fdt_blob, -1, clk_compatible);
if (node < 0)
panic("No clk node found\n");
@@ -234,7 +244,7 @@ static int imx8_scu_bind(struct udevice *dev)
plat->clk = child;
node = fdt_node_offset_by_compatible(gd->fdt_blob, -1,
- "fsl,imx8qxp-iomuxc");
+ iomuxc_compatible);
if (node < 0)
panic("No iomuxc node found\n");