@@ -56,6 +56,7 @@
enum imx_rproc_variants {
IMX8QM,
IMX8QXP,
+ IMX7ULP,
IMX7D,
IMX6SX,
};
@@ -181,6 +182,10 @@ static const struct imx_rproc_dcfg imx_rproc_cfg_imx6sx = {
.att_size = ARRAY_SIZE(imx_rproc_att_imx6sx),
};
+static const struct imx_rproc_dcfg imx_rproc_cfg_imx7ulp = {
+ .variant = IMX7ULP,
+};
+
static const struct imx_rproc_dcfg imx_rproc_cfg_imx8qxp = {
.variant = IMX8QXP,
};
@@ -529,7 +534,9 @@ static int imx_rproc_configure_mode(struct imx_rproc *priv)
int ret;
u32 val;
- if (of_get_property(dev->of_node, "early-booted", NULL)) {
+ if (dcfg->variant == IMX7ULP) {
+ priv->early_boot = true;
+ } else if (of_get_property(dev->of_node, "early-booted", NULL)) {
priv->early_boot = true;
} else {
ret = regmap_read(priv->regmap, dcfg->src_reg, &val);
@@ -638,7 +645,14 @@ static int imx_rproc_probe(struct platform_device *pdev)
struct regmap *regmap = NULL;
int ret;
- if (!of_get_property(np, "early-booted", NULL)) {
+ dcfg = of_device_get_match_data(dev);
+ if (!dcfg) {
+ ret = -EINVAL;
+ return ret;
+ }
+
+ if (!of_get_property(np, "early-booted", NULL) &&
+ !(dcfg->variant == IMX7ULP)) {
regmap = syscon_regmap_lookup_by_phandle(np, "syscon");
if (IS_ERR(regmap)) {
dev_err(dev, "failed to find syscon\n");
@@ -653,12 +667,6 @@ static int imx_rproc_probe(struct platform_device *pdev)
if (!rproc)
return -ENOMEM;
- dcfg = of_device_get_match_data(dev);
- if (!dcfg) {
- ret = -EINVAL;
- goto err_put_rproc;
- }
-
priv = rproc->priv;
priv->rproc = rproc;
priv->regmap = regmap;
@@ -775,6 +783,7 @@ static int imx_rproc_remove(struct platform_device *pdev)
}
static const struct of_device_id imx_rproc_of_match[] = {
+ { .compatible = "fsl,imx7ulp-cm4", .data = &imx_rproc_cfg_imx7ulp },
{ .compatible = "fsl,imx7d-cm4", .data = &imx_rproc_cfg_imx7d },
{ .compatible = "fsl,imx6sx-cm4", .data = &imx_rproc_cfg_imx6sx },
{ .compatible = "fsl,imx8qxp-cm4", .data = &imx_rproc_cfg_imx8qxp },