* imx8 - gpc: Support IMX8 Lite
@ 2023-03-15 7:05 Hans Christian Lonstad
2023-03-15 9:13 ` Marco Felsch
2023-03-15 9:22 ` Lucas Stach
0 siblings, 2 replies; 6+ messages in thread
From: Hans Christian Lonstad @ 2023-03-15 7:05 UTC (permalink / raw)
To: barebox; +Cc: Hans Christian Lonstad, Hans Christian Lonstad
IMX8 Lite lacks some functionality and hence the corresponding
power domains (8, 11, 12, 13).
This results in Barebox error messages and unfortunately a failed
Linux kernel boot.
Add a "Lite" specific table selected using device tree compatible
clause.
Note that this should probably be related to the feature controller.
Signed-off-by: Hans Christian Lonstad <hcl@Datarespons.com>
diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
index b662363f79..40998c42c5 100644
--- a/drivers/soc/imx/gpcv2.c
+++ b/drivers/soc/imx/gpcv2.c
@@ -1053,6 +1053,192 @@ static const struct imx_pgc_domain imx8mp_pgc_domains[] = {
},
};
+static const struct imx_pgc_domain imx8mpl_pgc_domains[] = {
+ [IMX8MP_POWER_DOMAIN_MIPI_PHY1] = {
+ .genpd = {
+ .name = "mipi-phy1",
+ },
+ .bits = {
+ .pxx = IMX8MP_MIPI_PHY1_SW_Pxx_REQ,
+ .map = IMX8MP_MIPI_PHY1_A53_DOMAIN,
+ },
+ .pgc = BIT(IMX8MP_PGC_MIPI1),
+ },
+
+ [IMX8MP_POWER_DOMAIN_PCIE_PHY] = {
+ .genpd = {
+ .name = "pcie-phy1",
+ },
+ .bits = {
+ .pxx = IMX8MP_PCIE_PHY_SW_Pxx_REQ,
+ .map = IMX8MP_PCIE_PHY_A53_DOMAIN,
+ },
+ .pgc = BIT(IMX8MP_PGC_PCIE),
+ },
+
+ [IMX8MP_POWER_DOMAIN_USB1_PHY] = {
+ .genpd = {
+ .name = "usb-otg1",
+ },
+ .bits = {
+ .pxx = IMX8MP_USB1_PHY_Pxx_REQ,
+ .map = IMX8MP_USB1_PHY_A53_DOMAIN,
+ },
+ .pgc = BIT(IMX8MP_PGC_USB1),
+ },
+
+ [IMX8MP_POWER_DOMAIN_USB2_PHY] = {
+ .genpd = {
+ .name = "usb-otg2",
+ },
+ .bits = {
+ .pxx = IMX8MP_USB2_PHY_Pxx_REQ,
+ .map = IMX8MP_USB2_PHY_A53_DOMAIN,
+ },
+ .pgc = BIT(IMX8MP_PGC_USB2),
+ },
+
+ [IMX8MP_POWER_DOMAIN_MLMIX] = {
+ .genpd = {
+ .name = "mlmix",
+ },
+ .bits = {
+ .pxx = IMX8MP_MLMIX_Pxx_REQ,
+ .map = IMX8MP_MLMIX_A53_DOMAIN,
+ .hskreq = IMX8MP_MLMIX_PWRDNREQN,
+ .hskack = IMX8MP_MLMIX_PWRDNACKN,
+ },
+ .pgc = BIT(IMX8MP_PGC_MLMIX),
+ .keep_clocks = true,
+ },
+
+ [IMX8MP_POWER_DOMAIN_AUDIOMIX] = {
+ .genpd = {
+ .name = "audiomix",
+ },
+ .bits = {
+ .pxx = IMX8MP_AUDIOMIX_Pxx_REQ,
+ .map = IMX8MP_AUDIOMIX_A53_DOMAIN,
+ .hskreq = IMX8MP_AUDIOMIX_PWRDNREQN,
+ .hskack = IMX8MP_AUDIOMIX_PWRDNACKN,
+ },
+ .pgc = BIT(IMX8MP_PGC_AUDIOMIX),
+ .keep_clocks = true,
+ },
+
+ [IMX8MP_POWER_DOMAIN_GPU2D] = {
+ .genpd = {
+ .name = "gpu2d",
+ },
+ .bits = {
+ .pxx = IMX8MP_GPU_2D_Pxx_REQ,
+ .map = IMX8MP_GPU2D_A53_DOMAIN,
+ },
+ .pgc = BIT(IMX8MP_PGC_GPU2D),
+ },
+
+ [IMX8MP_POWER_DOMAIN_GPUMIX] = {
+ .genpd = {
+ .name = "gpumix",
+ },
+ .bits = {
+ .pxx = IMX8MP_GPU_SHARE_LOGIC_Pxx_REQ,
+ .map = IMX8MP_GPUMIX_A53_DOMAIN,
+ .hskreq = IMX8MP_GPUMIX_PWRDNREQN,
+ .hskack = IMX8MP_GPUMIX_PWRDNACKN,
+ },
+ .pgc = BIT(IMX8MP_PGC_GPUMIX),
+ .keep_clocks = true,
+ },
+
+ [IMX8MP_POWER_DOMAIN_GPU3D] = {
+ .genpd = {
+ .name = "gpu3d",
+ },
+ .bits = {
+ .pxx = IMX8MP_GPU_3D_Pxx_REQ,
+ .map = IMX8MP_GPU3D_A53_DOMAIN,
+ },
+ .pgc = BIT(IMX8MP_PGC_GPU3D),
+ },
+
+ [IMX8MP_POWER_DOMAIN_MEDIAMIX] = {
+ .genpd = {
+ .name = "mediamix",
+ },
+ .bits = {
+ .pxx = IMX8MP_MEDIMIX_Pxx_REQ,
+ .map = IMX8MP_MEDIAMIX_A53_DOMAIN,
+ .hskreq = IMX8MP_MEDIAMIX_PWRDNREQN,
+ .hskack = IMX8MP_MEDIAMIX_PWRDNACKN,
+ },
+ .pgc = BIT(IMX8MP_PGC_MEDIAMIX),
+ .keep_clocks = true,
+ },
+
+ [IMX8MP_POWER_DOMAIN_HDMIMIX] = {
+ .genpd = {
+ .name = "hdmimix",
+ },
+ .bits = {
+ .pxx = IMX8MP_HDMIMIX_Pxx_REQ,
+ .map = IMX8MP_HDMIMIX_A53_DOMAIN,
+ .hskreq = IMX8MP_HDMIMIX_PWRDNREQN,
+ .hskack = IMX8MP_HDMIMIX_PWRDNACKN,
+ },
+ .pgc = BIT(IMX8MP_PGC_HDMIMIX),
+ .keep_clocks = true,
+ },
+
+ [IMX8MP_POWER_DOMAIN_HDMI_PHY] = {
+ .genpd = {
+ .name = "hdmi-phy",
+ },
+ .bits = {
+ .pxx = IMX8MP_HDMI_PHY_Pxx_REQ,
+ .map = IMX8MP_HDMI_PHY_A53_DOMAIN,
+ },
+ .pgc = BIT(IMX8MP_PGC_HDMI),
+ },
+
+ [IMX8MP_POWER_DOMAIN_MIPI_PHY2] = {
+ .genpd = {
+ .name = "mipi-phy2",
+ },
+ .bits = {
+ .pxx = IMX8MP_MIPI_PHY2_Pxx_REQ,
+ .map = IMX8MP_MIPI_PHY2_A53_DOMAIN,
+ },
+ .pgc = BIT(IMX8MP_PGC_MIPI2),
+ },
+
+ [IMX8MP_POWER_DOMAIN_HSIOMIX] = {
+ .genpd = {
+ .name = "hsiomix",
+ },
+ .bits = {
+ .pxx = IMX8MP_HSIOMIX_Pxx_REQ,
+ .map = IMX8MP_HSIOMIX_A53_DOMAIN,
+ .hskreq = IMX8MP_HSIOMIX_PWRDNREQN,
+ .hskack = IMX8MP_HSIOMIX_PWRDNACKN,
+ },
+ .pgc = BIT(IMX8MP_PGC_HSIOMIX),
+ .keep_clocks = true,
+ },
+
+ [IMX8MP_POWER_DOMAIN_MEDIAMIX_ISPDWP] = {
+ .genpd = {
+ .name = "mediamix-isp-dwp",
+ },
+ .bits = {
+ .pxx = IMX8MP_MEDIA_ISP_DWP_Pxx_REQ,
+ .map = IMX8MP_MEDIA_ISPDWP_A53_DOMAIN,
+ },
+ .pgc = BIT(IMX8MP_PGC_MEDIA_ISP_DWP),
+ },
+};
+
+
static const struct imx_pgc_regs imx8mp_pgc_regs = {
.map = IMX8MP_GPC_PGC_CPU_MAPPING,
.pup = IMX8MP_GPC_PU_PGC_SW_PUP_REQ,
@@ -1065,6 +1251,12 @@ static const struct imx_pgc_domain_data imx8mp_pgc_domain_data = {
.pgc_regs = &imx8mp_pgc_regs,
};
+static const struct imx_pgc_domain_data imx8mpl_pgc_domain_data = {
+ .domains = imx8mpl_pgc_domains,
+ .domains_num = ARRAY_SIZE(imx8mpl_pgc_domains),
+ .pgc_regs = &imx8mp_pgc_regs,
+};
+
static const struct imx_pgc_domain imx8mn_pgc_domains[] = {
[IMX8MN_POWER_DOMAIN_HSIOMIX] = {
.genpd = {
@@ -1302,6 +1494,7 @@ static const struct of_device_id imx_gpcv2_dt_ids[] = {
{ .compatible = "fsl,imx8mm-gpc", .data = &imx8mm_pgc_domain_data, },
{ .compatible = "fsl,imx8mn-gpc", .data = &imx8mn_pgc_domain_data, },
{ .compatible = "fsl,imx8mp-gpc", .data = &imx8mp_pgc_domain_data, },
+ { .compatible = "fsl,imx8mpl-gpc", .data = &imx8mpl_pgc_domain_data, },
{ .compatible = "fsl,imx8mq-gpc", .data = &imx8m_pgc_domain_data, },
{ }
};
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: imx8 - gpc: Support IMX8 Lite
2023-03-15 7:05 imx8 - gpc: Support IMX8 Lite Hans Christian Lonstad
@ 2023-03-15 9:13 ` Marco Felsch
2023-03-16 15:09 ` Hans Christian Lønstad
2023-04-14 7:47 ` Hans Christian Lønstad
2023-03-15 9:22 ` Lucas Stach
1 sibling, 2 replies; 6+ messages in thread
From: Marco Felsch @ 2023-03-15 9:13 UTC (permalink / raw)
To: Hans Christian Lonstad; +Cc: barebox
Hi Hans,
the subject should be:
soc: imx: gpcv2: add i.MX8MP Lite support
On 23-03-15, Hans Christian Lonstad wrote:
> IMX8 Lite lacks some functionality and hence the corresponding
^
i.MX8MP Lite
> power domains (8, 11, 12, 13).
> This results in Barebox error messages and unfortunately a failed
> Linux kernel boot.
> Add a "Lite" specific table selected using device tree compatible
> clause.
>
> Note that this should probably be related to the feature controller.
What did you mean by this note? Also do we need this support within
Linux as well?
> Signed-off-by: Hans Christian Lonstad <hcl@Datarespons.com>
>
> diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
> index b662363f79..40998c42c5 100644
> --- a/drivers/soc/imx/gpcv2.c
> +++ b/drivers/soc/imx/gpcv2.c
> @@ -1053,6 +1053,192 @@ static const struct imx_pgc_domain imx8mp_pgc_domains[] = {
> },
> };
>
> +static const struct imx_pgc_domain imx8mpl_pgc_domains[] = {
> + [IMX8MP_POWER_DOMAIN_MIPI_PHY1] = {
> + .genpd = {
> + .name = "mipi-phy1",
> + },
> + .bits = {
> + .pxx = IMX8MP_MIPI_PHY1_SW_Pxx_REQ,
> + .map = IMX8MP_MIPI_PHY1_A53_DOMAIN,
> + },
> + .pgc = BIT(IMX8MP_PGC_MIPI1),
> + },
> +
> + [IMX8MP_POWER_DOMAIN_PCIE_PHY] = {
> + .genpd = {
> + .name = "pcie-phy1",
> + },
> + .bits = {
> + .pxx = IMX8MP_PCIE_PHY_SW_Pxx_REQ,
> + .map = IMX8MP_PCIE_PHY_A53_DOMAIN,
> + },
> + .pgc = BIT(IMX8MP_PGC_PCIE),
> + },
> +
> + [IMX8MP_POWER_DOMAIN_USB1_PHY] = {
> + .genpd = {
> + .name = "usb-otg1",
> + },
> + .bits = {
> + .pxx = IMX8MP_USB1_PHY_Pxx_REQ,
> + .map = IMX8MP_USB1_PHY_A53_DOMAIN,
> + },
> + .pgc = BIT(IMX8MP_PGC_USB1),
> + },
> +
> + [IMX8MP_POWER_DOMAIN_USB2_PHY] = {
> + .genpd = {
> + .name = "usb-otg2",
> + },
> + .bits = {
> + .pxx = IMX8MP_USB2_PHY_Pxx_REQ,
> + .map = IMX8MP_USB2_PHY_A53_DOMAIN,
> + },
> + .pgc = BIT(IMX8MP_PGC_USB2),
> + },
> +
> + [IMX8MP_POWER_DOMAIN_MLMIX] = {
> + .genpd = {
> + .name = "mlmix",
> + },
> + .bits = {
> + .pxx = IMX8MP_MLMIX_Pxx_REQ,
> + .map = IMX8MP_MLMIX_A53_DOMAIN,
> + .hskreq = IMX8MP_MLMIX_PWRDNREQN,
> + .hskack = IMX8MP_MLMIX_PWRDNACKN,
> + },
> + .pgc = BIT(IMX8MP_PGC_MLMIX),
> + .keep_clocks = true,
> + },
> +
> + [IMX8MP_POWER_DOMAIN_AUDIOMIX] = {
> + .genpd = {
> + .name = "audiomix",
> + },
> + .bits = {
> + .pxx = IMX8MP_AUDIOMIX_Pxx_REQ,
> + .map = IMX8MP_AUDIOMIX_A53_DOMAIN,
> + .hskreq = IMX8MP_AUDIOMIX_PWRDNREQN,
> + .hskack = IMX8MP_AUDIOMIX_PWRDNACKN,
> + },
> + .pgc = BIT(IMX8MP_PGC_AUDIOMIX),
> + .keep_clocks = true,
> + },
> +
> + [IMX8MP_POWER_DOMAIN_GPU2D] = {
> + .genpd = {
> + .name = "gpu2d",
> + },
> + .bits = {
> + .pxx = IMX8MP_GPU_2D_Pxx_REQ,
> + .map = IMX8MP_GPU2D_A53_DOMAIN,
> + },
> + .pgc = BIT(IMX8MP_PGC_GPU2D),
> + },
> +
> + [IMX8MP_POWER_DOMAIN_GPUMIX] = {
> + .genpd = {
> + .name = "gpumix",
> + },
> + .bits = {
> + .pxx = IMX8MP_GPU_SHARE_LOGIC_Pxx_REQ,
> + .map = IMX8MP_GPUMIX_A53_DOMAIN,
> + .hskreq = IMX8MP_GPUMIX_PWRDNREQN,
> + .hskack = IMX8MP_GPUMIX_PWRDNACKN,
> + },
> + .pgc = BIT(IMX8MP_PGC_GPUMIX),
> + .keep_clocks = true,
> + },
> +
> + [IMX8MP_POWER_DOMAIN_GPU3D] = {
> + .genpd = {
> + .name = "gpu3d",
> + },
> + .bits = {
> + .pxx = IMX8MP_GPU_3D_Pxx_REQ,
> + .map = IMX8MP_GPU3D_A53_DOMAIN,
> + },
> + .pgc = BIT(IMX8MP_PGC_GPU3D),
> + },
> +
> + [IMX8MP_POWER_DOMAIN_MEDIAMIX] = {
> + .genpd = {
> + .name = "mediamix",
> + },
> + .bits = {
> + .pxx = IMX8MP_MEDIMIX_Pxx_REQ,
> + .map = IMX8MP_MEDIAMIX_A53_DOMAIN,
> + .hskreq = IMX8MP_MEDIAMIX_PWRDNREQN,
> + .hskack = IMX8MP_MEDIAMIX_PWRDNACKN,
> + },
> + .pgc = BIT(IMX8MP_PGC_MEDIAMIX),
> + .keep_clocks = true,
> + },
> +
> + [IMX8MP_POWER_DOMAIN_HDMIMIX] = {
> + .genpd = {
> + .name = "hdmimix",
> + },
> + .bits = {
> + .pxx = IMX8MP_HDMIMIX_Pxx_REQ,
> + .map = IMX8MP_HDMIMIX_A53_DOMAIN,
> + .hskreq = IMX8MP_HDMIMIX_PWRDNREQN,
> + .hskack = IMX8MP_HDMIMIX_PWRDNACKN,
> + },
> + .pgc = BIT(IMX8MP_PGC_HDMIMIX),
> + .keep_clocks = true,
> + },
> +
> + [IMX8MP_POWER_DOMAIN_HDMI_PHY] = {
> + .genpd = {
> + .name = "hdmi-phy",
> + },
> + .bits = {
> + .pxx = IMX8MP_HDMI_PHY_Pxx_REQ,
> + .map = IMX8MP_HDMI_PHY_A53_DOMAIN,
> + },
> + .pgc = BIT(IMX8MP_PGC_HDMI),
> + },
> +
> + [IMX8MP_POWER_DOMAIN_MIPI_PHY2] = {
> + .genpd = {
> + .name = "mipi-phy2",
> + },
> + .bits = {
> + .pxx = IMX8MP_MIPI_PHY2_Pxx_REQ,
> + .map = IMX8MP_MIPI_PHY2_A53_DOMAIN,
> + },
> + .pgc = BIT(IMX8MP_PGC_MIPI2),
> + },
> +
> + [IMX8MP_POWER_DOMAIN_HSIOMIX] = {
> + .genpd = {
> + .name = "hsiomix",
> + },
> + .bits = {
> + .pxx = IMX8MP_HSIOMIX_Pxx_REQ,
> + .map = IMX8MP_HSIOMIX_A53_DOMAIN,
> + .hskreq = IMX8MP_HSIOMIX_PWRDNREQN,
> + .hskack = IMX8MP_HSIOMIX_PWRDNACKN,
> + },
> + .pgc = BIT(IMX8MP_PGC_HSIOMIX),
> + .keep_clocks = true,
> + },
> +
> + [IMX8MP_POWER_DOMAIN_MEDIAMIX_ISPDWP] = {
> + .genpd = {
> + .name = "mediamix-isp-dwp",
> + },
> + .bits = {
> + .pxx = IMX8MP_MEDIA_ISP_DWP_Pxx_REQ,
> + .map = IMX8MP_MEDIA_ISPDWP_A53_DOMAIN,
> + },
> + .pgc = BIT(IMX8MP_PGC_MEDIA_ISP_DWP),
> + },
> +};
> +
> +
delete one.
> static const struct imx_pgc_regs imx8mp_pgc_regs = {
> .map = IMX8MP_GPC_PGC_CPU_MAPPING,
> .pup = IMX8MP_GPC_PU_PGC_SW_PUP_REQ,
> @@ -1065,6 +1251,12 @@ static const struct imx_pgc_domain_data imx8mp_pgc_domain_data = {
> .pgc_regs = &imx8mp_pgc_regs,
> };
>
> +static const struct imx_pgc_domain_data imx8mpl_pgc_domain_data = {
> + .domains = imx8mpl_pgc_domains,
> + .domains_num = ARRAY_SIZE(imx8mpl_pgc_domains),
> + .pgc_regs = &imx8mp_pgc_regs,
> +};
> +
> static const struct imx_pgc_domain imx8mn_pgc_domains[] = {
> [IMX8MN_POWER_DOMAIN_HSIOMIX] = {
> .genpd = {
> @@ -1302,6 +1494,7 @@ static const struct of_device_id imx_gpcv2_dt_ids[] = {
> { .compatible = "fsl,imx8mm-gpc", .data = &imx8mm_pgc_domain_data, },
> { .compatible = "fsl,imx8mn-gpc", .data = &imx8mn_pgc_domain_data, },
> { .compatible = "fsl,imx8mp-gpc", .data = &imx8mp_pgc_domain_data, },
> + { .compatible = "fsl,imx8mpl-gpc", .data = &imx8mpl_pgc_domain_data, },
^
This compatible is does not exist.
Regards,
Marco
> { .compatible = "fsl,imx8mq-gpc", .data = &imx8m_pgc_domain_data, },
> { }
> };
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: imx8 - gpc: Support IMX8 Lite
2023-03-15 9:13 ` Marco Felsch
@ 2023-03-16 15:09 ` Hans Christian Lønstad
2023-04-14 7:47 ` Hans Christian Lønstad
1 sibling, 0 replies; 6+ messages in thread
From: Hans Christian Lønstad @ 2023-03-16 15:09 UTC (permalink / raw)
To: Marco Felsch; +Cc: barebox
I believe Lucas answered the reasoning for this well.
The compatible extension was used to get this up and running with minimum effort.
Hans Chr
> 15. mar. 2023 kl. 10:13 skrev Marco Felsch <m.felsch@pengutronix.de>:
>
> Hi Hans,
>
> the subject should be:
>
> soc: imx: gpcv2: add i.MX8MP Lite support
>
>> On 23-03-15, Hans Christian Lonstad wrote:
>> IMX8 Lite lacks some functionality and hence the corresponding
> ^
> i.MX8MP Lite
>
>> power domains (8, 11, 12, 13).
>> This results in Barebox error messages and unfortunately a failed
>> Linux kernel boot.
>> Add a "Lite" specific table selected using device tree compatible
>> clause.
>>
>> Note that this should probably be related to the feature controller.
>
> What did you mean by this note? Also do we need this support within
> Linux as well?
>
>> Signed-off-by: Hans Christian Lonstad <hcl@Datarespons.com>
>>
>> diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
>> index b662363f79..40998c42c5 100644
>> --- a/drivers/soc/imx/gpcv2.c
>> +++ b/drivers/soc/imx/gpcv2.c
>> @@ -1053,6 +1053,192 @@ static const struct imx_pgc_domain imx8mp_pgc_domains[] = {
>> },
>> };
>>
>> +static const struct imx_pgc_domain imx8mpl_pgc_domains[] = {
>> + [IMX8MP_POWER_DOMAIN_MIPI_PHY1] = {
>> + .genpd = {
>> + .name = "mipi-phy1",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_MIPI_PHY1_SW_Pxx_REQ,
>> + .map = IMX8MP_MIPI_PHY1_A53_DOMAIN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_MIPI1),
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_PCIE_PHY] = {
>> + .genpd = {
>> + .name = "pcie-phy1",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_PCIE_PHY_SW_Pxx_REQ,
>> + .map = IMX8MP_PCIE_PHY_A53_DOMAIN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_PCIE),
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_USB1_PHY] = {
>> + .genpd = {
>> + .name = "usb-otg1",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_USB1_PHY_Pxx_REQ,
>> + .map = IMX8MP_USB1_PHY_A53_DOMAIN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_USB1),
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_USB2_PHY] = {
>> + .genpd = {
>> + .name = "usb-otg2",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_USB2_PHY_Pxx_REQ,
>> + .map = IMX8MP_USB2_PHY_A53_DOMAIN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_USB2),
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_MLMIX] = {
>> + .genpd = {
>> + .name = "mlmix",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_MLMIX_Pxx_REQ,
>> + .map = IMX8MP_MLMIX_A53_DOMAIN,
>> + .hskreq = IMX8MP_MLMIX_PWRDNREQN,
>> + .hskack = IMX8MP_MLMIX_PWRDNACKN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_MLMIX),
>> + .keep_clocks = true,
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_AUDIOMIX] = {
>> + .genpd = {
>> + .name = "audiomix",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_AUDIOMIX_Pxx_REQ,
>> + .map = IMX8MP_AUDIOMIX_A53_DOMAIN,
>> + .hskreq = IMX8MP_AUDIOMIX_PWRDNREQN,
>> + .hskack = IMX8MP_AUDIOMIX_PWRDNACKN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_AUDIOMIX),
>> + .keep_clocks = true,
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_GPU2D] = {
>> + .genpd = {
>> + .name = "gpu2d",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_GPU_2D_Pxx_REQ,
>> + .map = IMX8MP_GPU2D_A53_DOMAIN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_GPU2D),
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_GPUMIX] = {
>> + .genpd = {
>> + .name = "gpumix",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_GPU_SHARE_LOGIC_Pxx_REQ,
>> + .map = IMX8MP_GPUMIX_A53_DOMAIN,
>> + .hskreq = IMX8MP_GPUMIX_PWRDNREQN,
>> + .hskack = IMX8MP_GPUMIX_PWRDNACKN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_GPUMIX),
>> + .keep_clocks = true,
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_GPU3D] = {
>> + .genpd = {
>> + .name = "gpu3d",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_GPU_3D_Pxx_REQ,
>> + .map = IMX8MP_GPU3D_A53_DOMAIN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_GPU3D),
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_MEDIAMIX] = {
>> + .genpd = {
>> + .name = "mediamix",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_MEDIMIX_Pxx_REQ,
>> + .map = IMX8MP_MEDIAMIX_A53_DOMAIN,
>> + .hskreq = IMX8MP_MEDIAMIX_PWRDNREQN,
>> + .hskack = IMX8MP_MEDIAMIX_PWRDNACKN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_MEDIAMIX),
>> + .keep_clocks = true,
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_HDMIMIX] = {
>> + .genpd = {
>> + .name = "hdmimix",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_HDMIMIX_Pxx_REQ,
>> + .map = IMX8MP_HDMIMIX_A53_DOMAIN,
>> + .hskreq = IMX8MP_HDMIMIX_PWRDNREQN,
>> + .hskack = IMX8MP_HDMIMIX_PWRDNACKN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_HDMIMIX),
>> + .keep_clocks = true,
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_HDMI_PHY] = {
>> + .genpd = {
>> + .name = "hdmi-phy",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_HDMI_PHY_Pxx_REQ,
>> + .map = IMX8MP_HDMI_PHY_A53_DOMAIN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_HDMI),
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_MIPI_PHY2] = {
>> + .genpd = {
>> + .name = "mipi-phy2",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_MIPI_PHY2_Pxx_REQ,
>> + .map = IMX8MP_MIPI_PHY2_A53_DOMAIN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_MIPI2),
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_HSIOMIX] = {
>> + .genpd = {
>> + .name = "hsiomix",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_HSIOMIX_Pxx_REQ,
>> + .map = IMX8MP_HSIOMIX_A53_DOMAIN,
>> + .hskreq = IMX8MP_HSIOMIX_PWRDNREQN,
>> + .hskack = IMX8MP_HSIOMIX_PWRDNACKN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_HSIOMIX),
>> + .keep_clocks = true,
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_MEDIAMIX_ISPDWP] = {
>> + .genpd = {
>> + .name = "mediamix-isp-dwp",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_MEDIA_ISP_DWP_Pxx_REQ,
>> + .map = IMX8MP_MEDIA_ISPDWP_A53_DOMAIN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_MEDIA_ISP_DWP),
>> + },
>> +};
>> +
>> +
>
> delete one.
>
>> static const struct imx_pgc_regs imx8mp_pgc_regs = {
>> .map = IMX8MP_GPC_PGC_CPU_MAPPING,
>> .pup = IMX8MP_GPC_PU_PGC_SW_PUP_REQ,
>> @@ -1065,6 +1251,12 @@ static const struct imx_pgc_domain_data imx8mp_pgc_domain_data = {
>> .pgc_regs = &imx8mp_pgc_regs,
>> };
>>
>> +static const struct imx_pgc_domain_data imx8mpl_pgc_domain_data = {
>> + .domains = imx8mpl_pgc_domains,
>> + .domains_num = ARRAY_SIZE(imx8mpl_pgc_domains),
>> + .pgc_regs = &imx8mp_pgc_regs,
>> +};
>> +
>> static const struct imx_pgc_domain imx8mn_pgc_domains[] = {
>> [IMX8MN_POWER_DOMAIN_HSIOMIX] = {
>> .genpd = {
>> @@ -1302,6 +1494,7 @@ static const struct of_device_id imx_gpcv2_dt_ids[] = {
>> { .compatible = "fsl,imx8mm-gpc", .data = &imx8mm_pgc_domain_data, },
>> { .compatible = "fsl,imx8mn-gpc", .data = &imx8mn_pgc_domain_data, },
>> { .compatible = "fsl,imx8mp-gpc", .data = &imx8mp_pgc_domain_data, },
>> + { .compatible = "fsl,imx8mpl-gpc", .data = &imx8mpl_pgc_domain_data, },
> ^
> This compatible is does not exist.
>
> Regards,
> Marco
>
>> { .compatible = "fsl,imx8mq-gpc", .data = &imx8m_pgc_domain_data, },
>> { }
>> };
>>
>>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: imx8 - gpc: Support IMX8 Lite
2023-03-15 9:13 ` Marco Felsch
2023-03-16 15:09 ` Hans Christian Lønstad
@ 2023-04-14 7:47 ` Hans Christian Lønstad
2023-04-14 7:59 ` Ahmad Fatoum
1 sibling, 1 reply; 6+ messages in thread
From: Hans Christian Lønstad @ 2023-04-14 7:47 UTC (permalink / raw)
To: Marco Felsch, Lucas Stach; +Cc: Hans Christian Lønstad, barebox
After applying NXP kernel 6.1 branch (6.1-1.0-x-imx) I can confirm a fix is needed in kernel as well.
In order to avoid specific DT for i.MX8MP Lite, the probe function in soc/imx/imx8m-blk-ctrl.c should consult fuse settings and skip the pm_genpd_init for functions not available.
I believe this should be properly handled as the Lite version is more applicable (and cost effective) for a broad range of applications.
Hans Christian Lønstad
> 15. mar. 2023 kl. 10:13 skrev Marco Felsch <m.felsch@pengutronix.de>:
>
> Hi Hans,
>
> the subject should be:
>
> soc: imx: gpcv2: add i.MX8MP Lite support
>
> On 23-03-15, Hans Christian Lonstad wrote:
>> IMX8 Lite lacks some functionality and hence the corresponding
> ^
> i.MX8MP Lite
>
>> power domains (8, 11, 12, 13).
>> This results in Barebox error messages and unfortunately a failed
>> Linux kernel boot.
>> Add a "Lite" specific table selected using device tree compatible
>> clause.
>>
>> Note that this should probably be related to the feature controller.
>
> What did you mean by this note? Also do we need this support within
> Linux as well?
>
>> Signed-off-by: Hans Christian Lonstad <hcl@Datarespons.com>
>>
>> diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
>> index b662363f79..40998c42c5 100644
>> --- a/drivers/soc/imx/gpcv2.c
>> +++ b/drivers/soc/imx/gpcv2.c
>> @@ -1053,6 +1053,192 @@ static const struct imx_pgc_domain imx8mp_pgc_domains[] = {
>> },
>> };
>>
>> +static const struct imx_pgc_domain imx8mpl_pgc_domains[] = {
>> + [IMX8MP_POWER_DOMAIN_MIPI_PHY1] = {
>> + .genpd = {
>> + .name = "mipi-phy1",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_MIPI_PHY1_SW_Pxx_REQ,
>> + .map = IMX8MP_MIPI_PHY1_A53_DOMAIN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_MIPI1),
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_PCIE_PHY] = {
>> + .genpd = {
>> + .name = "pcie-phy1",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_PCIE_PHY_SW_Pxx_REQ,
>> + .map = IMX8MP_PCIE_PHY_A53_DOMAIN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_PCIE),
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_USB1_PHY] = {
>> + .genpd = {
>> + .name = "usb-otg1",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_USB1_PHY_Pxx_REQ,
>> + .map = IMX8MP_USB1_PHY_A53_DOMAIN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_USB1),
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_USB2_PHY] = {
>> + .genpd = {
>> + .name = "usb-otg2",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_USB2_PHY_Pxx_REQ,
>> + .map = IMX8MP_USB2_PHY_A53_DOMAIN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_USB2),
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_MLMIX] = {
>> + .genpd = {
>> + .name = "mlmix",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_MLMIX_Pxx_REQ,
>> + .map = IMX8MP_MLMIX_A53_DOMAIN,
>> + .hskreq = IMX8MP_MLMIX_PWRDNREQN,
>> + .hskack = IMX8MP_MLMIX_PWRDNACKN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_MLMIX),
>> + .keep_clocks = true,
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_AUDIOMIX] = {
>> + .genpd = {
>> + .name = "audiomix",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_AUDIOMIX_Pxx_REQ,
>> + .map = IMX8MP_AUDIOMIX_A53_DOMAIN,
>> + .hskreq = IMX8MP_AUDIOMIX_PWRDNREQN,
>> + .hskack = IMX8MP_AUDIOMIX_PWRDNACKN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_AUDIOMIX),
>> + .keep_clocks = true,
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_GPU2D] = {
>> + .genpd = {
>> + .name = "gpu2d",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_GPU_2D_Pxx_REQ,
>> + .map = IMX8MP_GPU2D_A53_DOMAIN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_GPU2D),
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_GPUMIX] = {
>> + .genpd = {
>> + .name = "gpumix",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_GPU_SHARE_LOGIC_Pxx_REQ,
>> + .map = IMX8MP_GPUMIX_A53_DOMAIN,
>> + .hskreq = IMX8MP_GPUMIX_PWRDNREQN,
>> + .hskack = IMX8MP_GPUMIX_PWRDNACKN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_GPUMIX),
>> + .keep_clocks = true,
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_GPU3D] = {
>> + .genpd = {
>> + .name = "gpu3d",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_GPU_3D_Pxx_REQ,
>> + .map = IMX8MP_GPU3D_A53_DOMAIN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_GPU3D),
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_MEDIAMIX] = {
>> + .genpd = {
>> + .name = "mediamix",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_MEDIMIX_Pxx_REQ,
>> + .map = IMX8MP_MEDIAMIX_A53_DOMAIN,
>> + .hskreq = IMX8MP_MEDIAMIX_PWRDNREQN,
>> + .hskack = IMX8MP_MEDIAMIX_PWRDNACKN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_MEDIAMIX),
>> + .keep_clocks = true,
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_HDMIMIX] = {
>> + .genpd = {
>> + .name = "hdmimix",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_HDMIMIX_Pxx_REQ,
>> + .map = IMX8MP_HDMIMIX_A53_DOMAIN,
>> + .hskreq = IMX8MP_HDMIMIX_PWRDNREQN,
>> + .hskack = IMX8MP_HDMIMIX_PWRDNACKN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_HDMIMIX),
>> + .keep_clocks = true,
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_HDMI_PHY] = {
>> + .genpd = {
>> + .name = "hdmi-phy",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_HDMI_PHY_Pxx_REQ,
>> + .map = IMX8MP_HDMI_PHY_A53_DOMAIN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_HDMI),
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_MIPI_PHY2] = {
>> + .genpd = {
>> + .name = "mipi-phy2",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_MIPI_PHY2_Pxx_REQ,
>> + .map = IMX8MP_MIPI_PHY2_A53_DOMAIN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_MIPI2),
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_HSIOMIX] = {
>> + .genpd = {
>> + .name = "hsiomix",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_HSIOMIX_Pxx_REQ,
>> + .map = IMX8MP_HSIOMIX_A53_DOMAIN,
>> + .hskreq = IMX8MP_HSIOMIX_PWRDNREQN,
>> + .hskack = IMX8MP_HSIOMIX_PWRDNACKN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_HSIOMIX),
>> + .keep_clocks = true,
>> + },
>> +
>> + [IMX8MP_POWER_DOMAIN_MEDIAMIX_ISPDWP] = {
>> + .genpd = {
>> + .name = "mediamix-isp-dwp",
>> + },
>> + .bits = {
>> + .pxx = IMX8MP_MEDIA_ISP_DWP_Pxx_REQ,
>> + .map = IMX8MP_MEDIA_ISPDWP_A53_DOMAIN,
>> + },
>> + .pgc = BIT(IMX8MP_PGC_MEDIA_ISP_DWP),
>> + },
>> +};
>> +
>> +
>
> delete one.
>
>> static const struct imx_pgc_regs imx8mp_pgc_regs = {
>> .map = IMX8MP_GPC_PGC_CPU_MAPPING,
>> .pup = IMX8MP_GPC_PU_PGC_SW_PUP_REQ,
>> @@ -1065,6 +1251,12 @@ static const struct imx_pgc_domain_data imx8mp_pgc_domain_data = {
>> .pgc_regs = &imx8mp_pgc_regs,
>> };
>>
>> +static const struct imx_pgc_domain_data imx8mpl_pgc_domain_data = {
>> + .domains = imx8mpl_pgc_domains,
>> + .domains_num = ARRAY_SIZE(imx8mpl_pgc_domains),
>> + .pgc_regs = &imx8mp_pgc_regs,
>> +};
>> +
>> static const struct imx_pgc_domain imx8mn_pgc_domains[] = {
>> [IMX8MN_POWER_DOMAIN_HSIOMIX] = {
>> .genpd = {
>> @@ -1302,6 +1494,7 @@ static const struct of_device_id imx_gpcv2_dt_ids[] = {
>> { .compatible = "fsl,imx8mm-gpc", .data = &imx8mm_pgc_domain_data, },
>> { .compatible = "fsl,imx8mn-gpc", .data = &imx8mn_pgc_domain_data, },
>> { .compatible = "fsl,imx8mp-gpc", .data = &imx8mp_pgc_domain_data, },
>> + { .compatible = "fsl,imx8mpl-gpc", .data = &imx8mpl_pgc_domain_data, },
> ^
> This compatible is does not exist.
>
> Regards,
> Marco
>
>> { .compatible = "fsl,imx8mq-gpc", .data = &imx8m_pgc_domain_data, },
>> { }
>> };
>>
>>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: imx8 - gpc: Support IMX8 Lite
2023-04-14 7:47 ` Hans Christian Lønstad
@ 2023-04-14 7:59 ` Ahmad Fatoum
0 siblings, 0 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2023-04-14 7:59 UTC (permalink / raw)
To: Hans Christian Lønstad, Marco Felsch, Lucas Stach; +Cc: barebox
Hello Hans.
On 14.04.23 09:47, Hans Christian Lønstad wrote:
> After applying NXP kernel 6.1 branch (6.1-1.0-x-imx) I can confirm a fix is needed in kernel as well.
> In order to avoid specific DT for i.MX8MP Lite, the probe function in soc/imx/imx8m-blk-ctrl.c should consult fuse settings and skip the pm_genpd_init for functions not available.
>
> I believe this should be properly handled as the Lite version is more applicable (and cost effective) for a broad range of applications.
The consensus is that this is the job of the device tree. i.MX8MPL users need
to either use a DT which omits the nodes in question or the bootloader needs
to patch these nodes away. The feature controller supports patching the kernel
DT, so what's missing is adding i.MX8MP Lite support to it.
Cheers,
Ahmad
>
> Hans Christian Lønstad
>
>> 15. mar. 2023 kl. 10:13 skrev Marco Felsch <m.felsch@pengutronix.de>:
>>
>> Hi Hans,
>>
>> the subject should be:
>>
>> soc: imx: gpcv2: add i.MX8MP Lite support
>>
>> On 23-03-15, Hans Christian Lonstad wrote:
>>> IMX8 Lite lacks some functionality and hence the corresponding
>> ^
>> i.MX8MP Lite
>>
>>> power domains (8, 11, 12, 13).
>>> This results in Barebox error messages and unfortunately a failed
>>> Linux kernel boot.
>>> Add a "Lite" specific table selected using device tree compatible
>>> clause.
>>>
>>> Note that this should probably be related to the feature controller.
>>
>> What did you mean by this note? Also do we need this support within
>> Linux as well?
>>
>>> Signed-off-by: Hans Christian Lonstad <hcl@Datarespons.com>
>>>
>>> diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
>>> index b662363f79..40998c42c5 100644
>>> --- a/drivers/soc/imx/gpcv2.c
>>> +++ b/drivers/soc/imx/gpcv2.c
>>> @@ -1053,6 +1053,192 @@ static const struct imx_pgc_domain imx8mp_pgc_domains[] = {
>>> },
>>> };
>>>
>>> +static const struct imx_pgc_domain imx8mpl_pgc_domains[] = {
>>> + [IMX8MP_POWER_DOMAIN_MIPI_PHY1] = {
>>> + .genpd = {
>>> + .name = "mipi-phy1",
>>> + },
>>> + .bits = {
>>> + .pxx = IMX8MP_MIPI_PHY1_SW_Pxx_REQ,
>>> + .map = IMX8MP_MIPI_PHY1_A53_DOMAIN,
>>> + },
>>> + .pgc = BIT(IMX8MP_PGC_MIPI1),
>>> + },
>>> +
>>> + [IMX8MP_POWER_DOMAIN_PCIE_PHY] = {
>>> + .genpd = {
>>> + .name = "pcie-phy1",
>>> + },
>>> + .bits = {
>>> + .pxx = IMX8MP_PCIE_PHY_SW_Pxx_REQ,
>>> + .map = IMX8MP_PCIE_PHY_A53_DOMAIN,
>>> + },
>>> + .pgc = BIT(IMX8MP_PGC_PCIE),
>>> + },
>>> +
>>> + [IMX8MP_POWER_DOMAIN_USB1_PHY] = {
>>> + .genpd = {
>>> + .name = "usb-otg1",
>>> + },
>>> + .bits = {
>>> + .pxx = IMX8MP_USB1_PHY_Pxx_REQ,
>>> + .map = IMX8MP_USB1_PHY_A53_DOMAIN,
>>> + },
>>> + .pgc = BIT(IMX8MP_PGC_USB1),
>>> + },
>>> +
>>> + [IMX8MP_POWER_DOMAIN_USB2_PHY] = {
>>> + .genpd = {
>>> + .name = "usb-otg2",
>>> + },
>>> + .bits = {
>>> + .pxx = IMX8MP_USB2_PHY_Pxx_REQ,
>>> + .map = IMX8MP_USB2_PHY_A53_DOMAIN,
>>> + },
>>> + .pgc = BIT(IMX8MP_PGC_USB2),
>>> + },
>>> +
>>> + [IMX8MP_POWER_DOMAIN_MLMIX] = {
>>> + .genpd = {
>>> + .name = "mlmix",
>>> + },
>>> + .bits = {
>>> + .pxx = IMX8MP_MLMIX_Pxx_REQ,
>>> + .map = IMX8MP_MLMIX_A53_DOMAIN,
>>> + .hskreq = IMX8MP_MLMIX_PWRDNREQN,
>>> + .hskack = IMX8MP_MLMIX_PWRDNACKN,
>>> + },
>>> + .pgc = BIT(IMX8MP_PGC_MLMIX),
>>> + .keep_clocks = true,
>>> + },
>>> +
>>> + [IMX8MP_POWER_DOMAIN_AUDIOMIX] = {
>>> + .genpd = {
>>> + .name = "audiomix",
>>> + },
>>> + .bits = {
>>> + .pxx = IMX8MP_AUDIOMIX_Pxx_REQ,
>>> + .map = IMX8MP_AUDIOMIX_A53_DOMAIN,
>>> + .hskreq = IMX8MP_AUDIOMIX_PWRDNREQN,
>>> + .hskack = IMX8MP_AUDIOMIX_PWRDNACKN,
>>> + },
>>> + .pgc = BIT(IMX8MP_PGC_AUDIOMIX),
>>> + .keep_clocks = true,
>>> + },
>>> +
>>> + [IMX8MP_POWER_DOMAIN_GPU2D] = {
>>> + .genpd = {
>>> + .name = "gpu2d",
>>> + },
>>> + .bits = {
>>> + .pxx = IMX8MP_GPU_2D_Pxx_REQ,
>>> + .map = IMX8MP_GPU2D_A53_DOMAIN,
>>> + },
>>> + .pgc = BIT(IMX8MP_PGC_GPU2D),
>>> + },
>>> +
>>> + [IMX8MP_POWER_DOMAIN_GPUMIX] = {
>>> + .genpd = {
>>> + .name = "gpumix",
>>> + },
>>> + .bits = {
>>> + .pxx = IMX8MP_GPU_SHARE_LOGIC_Pxx_REQ,
>>> + .map = IMX8MP_GPUMIX_A53_DOMAIN,
>>> + .hskreq = IMX8MP_GPUMIX_PWRDNREQN,
>>> + .hskack = IMX8MP_GPUMIX_PWRDNACKN,
>>> + },
>>> + .pgc = BIT(IMX8MP_PGC_GPUMIX),
>>> + .keep_clocks = true,
>>> + },
>>> +
>>> + [IMX8MP_POWER_DOMAIN_GPU3D] = {
>>> + .genpd = {
>>> + .name = "gpu3d",
>>> + },
>>> + .bits = {
>>> + .pxx = IMX8MP_GPU_3D_Pxx_REQ,
>>> + .map = IMX8MP_GPU3D_A53_DOMAIN,
>>> + },
>>> + .pgc = BIT(IMX8MP_PGC_GPU3D),
>>> + },
>>> +
>>> + [IMX8MP_POWER_DOMAIN_MEDIAMIX] = {
>>> + .genpd = {
>>> + .name = "mediamix",
>>> + },
>>> + .bits = {
>>> + .pxx = IMX8MP_MEDIMIX_Pxx_REQ,
>>> + .map = IMX8MP_MEDIAMIX_A53_DOMAIN,
>>> + .hskreq = IMX8MP_MEDIAMIX_PWRDNREQN,
>>> + .hskack = IMX8MP_MEDIAMIX_PWRDNACKN,
>>> + },
>>> + .pgc = BIT(IMX8MP_PGC_MEDIAMIX),
>>> + .keep_clocks = true,
>>> + },
>>> +
>>> + [IMX8MP_POWER_DOMAIN_HDMIMIX] = {
>>> + .genpd = {
>>> + .name = "hdmimix",
>>> + },
>>> + .bits = {
>>> + .pxx = IMX8MP_HDMIMIX_Pxx_REQ,
>>> + .map = IMX8MP_HDMIMIX_A53_DOMAIN,
>>> + .hskreq = IMX8MP_HDMIMIX_PWRDNREQN,
>>> + .hskack = IMX8MP_HDMIMIX_PWRDNACKN,
>>> + },
>>> + .pgc = BIT(IMX8MP_PGC_HDMIMIX),
>>> + .keep_clocks = true,
>>> + },
>>> +
>>> + [IMX8MP_POWER_DOMAIN_HDMI_PHY] = {
>>> + .genpd = {
>>> + .name = "hdmi-phy",
>>> + },
>>> + .bits = {
>>> + .pxx = IMX8MP_HDMI_PHY_Pxx_REQ,
>>> + .map = IMX8MP_HDMI_PHY_A53_DOMAIN,
>>> + },
>>> + .pgc = BIT(IMX8MP_PGC_HDMI),
>>> + },
>>> +
>>> + [IMX8MP_POWER_DOMAIN_MIPI_PHY2] = {
>>> + .genpd = {
>>> + .name = "mipi-phy2",
>>> + },
>>> + .bits = {
>>> + .pxx = IMX8MP_MIPI_PHY2_Pxx_REQ,
>>> + .map = IMX8MP_MIPI_PHY2_A53_DOMAIN,
>>> + },
>>> + .pgc = BIT(IMX8MP_PGC_MIPI2),
>>> + },
>>> +
>>> + [IMX8MP_POWER_DOMAIN_HSIOMIX] = {
>>> + .genpd = {
>>> + .name = "hsiomix",
>>> + },
>>> + .bits = {
>>> + .pxx = IMX8MP_HSIOMIX_Pxx_REQ,
>>> + .map = IMX8MP_HSIOMIX_A53_DOMAIN,
>>> + .hskreq = IMX8MP_HSIOMIX_PWRDNREQN,
>>> + .hskack = IMX8MP_HSIOMIX_PWRDNACKN,
>>> + },
>>> + .pgc = BIT(IMX8MP_PGC_HSIOMIX),
>>> + .keep_clocks = true,
>>> + },
>>> +
>>> + [IMX8MP_POWER_DOMAIN_MEDIAMIX_ISPDWP] = {
>>> + .genpd = {
>>> + .name = "mediamix-isp-dwp",
>>> + },
>>> + .bits = {
>>> + .pxx = IMX8MP_MEDIA_ISP_DWP_Pxx_REQ,
>>> + .map = IMX8MP_MEDIA_ISPDWP_A53_DOMAIN,
>>> + },
>>> + .pgc = BIT(IMX8MP_PGC_MEDIA_ISP_DWP),
>>> + },
>>> +};
>>> +
>>> +
>>
>> delete one.
>>
>>> static const struct imx_pgc_regs imx8mp_pgc_regs = {
>>> .map = IMX8MP_GPC_PGC_CPU_MAPPING,
>>> .pup = IMX8MP_GPC_PU_PGC_SW_PUP_REQ,
>>> @@ -1065,6 +1251,12 @@ static const struct imx_pgc_domain_data imx8mp_pgc_domain_data = {
>>> .pgc_regs = &imx8mp_pgc_regs,
>>> };
>>>
>>> +static const struct imx_pgc_domain_data imx8mpl_pgc_domain_data = {
>>> + .domains = imx8mpl_pgc_domains,
>>> + .domains_num = ARRAY_SIZE(imx8mpl_pgc_domains),
>>> + .pgc_regs = &imx8mp_pgc_regs,
>>> +};
>>> +
>>> static const struct imx_pgc_domain imx8mn_pgc_domains[] = {
>>> [IMX8MN_POWER_DOMAIN_HSIOMIX] = {
>>> .genpd = {
>>> @@ -1302,6 +1494,7 @@ static const struct of_device_id imx_gpcv2_dt_ids[] = {
>>> { .compatible = "fsl,imx8mm-gpc", .data = &imx8mm_pgc_domain_data, },
>>> { .compatible = "fsl,imx8mn-gpc", .data = &imx8mn_pgc_domain_data, },
>>> { .compatible = "fsl,imx8mp-gpc", .data = &imx8mp_pgc_domain_data, },
>>> + { .compatible = "fsl,imx8mpl-gpc", .data = &imx8mpl_pgc_domain_data, },
>> ^
>> This compatible is does not exist.
>>
>> Regards,
>> Marco
>>
>>> { .compatible = "fsl,imx8mq-gpc", .data = &imx8m_pgc_domain_data, },
>>> { }
>>> };
>>>
>>>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: imx8 - gpc: Support IMX8 Lite
2023-03-15 7:05 imx8 - gpc: Support IMX8 Lite Hans Christian Lonstad
2023-03-15 9:13 ` Marco Felsch
@ 2023-03-15 9:22 ` Lucas Stach
1 sibling, 0 replies; 6+ messages in thread
From: Lucas Stach @ 2023-03-15 9:22 UTC (permalink / raw)
To: Hans Christian Lonstad, barebox
Hi Hans Christian,
Am Mittwoch, dem 15.03.2023 um 08:05 +0100 schrieb Hans Christian Lonstad:
> IMX8 Lite lacks some functionality and hence the corresponding
> power domains (8, 11, 12, 13).
> This results in Barebox error messages and unfortunately a failed
> Linux kernel boot.
> Add a "Lite" specific table selected using device tree compatible
> clause.
>
> Note that this should probably be related to the feature controller.
Yes, the lite versions of the SoC are usually just fused down versions
of the SoC and the fuses should tell you which features are actually
available. Please try to use the feature controller to disable the non
existent features/DT nodes. Adding a specific compatible and all this
code not look like the right way to go to me.
Regards,
Lucas
>
> Signed-off-by: Hans Christian Lonstad <hcl@Datarespons.com>
>
> diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
> index b662363f79..40998c42c5 100644
> --- a/drivers/soc/imx/gpcv2.c
> +++ b/drivers/soc/imx/gpcv2.c
> @@ -1053,6 +1053,192 @@ static const struct imx_pgc_domain imx8mp_pgc_domains[] = {
> },
> };
>
> +static const struct imx_pgc_domain imx8mpl_pgc_domains[] = {
> + [IMX8MP_POWER_DOMAIN_MIPI_PHY1] = {
> + .genpd = {
> + .name = "mipi-phy1",
> + },
> + .bits = {
> + .pxx = IMX8MP_MIPI_PHY1_SW_Pxx_REQ,
> + .map = IMX8MP_MIPI_PHY1_A53_DOMAIN,
> + },
> + .pgc = BIT(IMX8MP_PGC_MIPI1),
> + },
> +
> + [IMX8MP_POWER_DOMAIN_PCIE_PHY] = {
> + .genpd = {
> + .name = "pcie-phy1",
> + },
> + .bits = {
> + .pxx = IMX8MP_PCIE_PHY_SW_Pxx_REQ,
> + .map = IMX8MP_PCIE_PHY_A53_DOMAIN,
> + },
> + .pgc = BIT(IMX8MP_PGC_PCIE),
> + },
> +
> + [IMX8MP_POWER_DOMAIN_USB1_PHY] = {
> + .genpd = {
> + .name = "usb-otg1",
> + },
> + .bits = {
> + .pxx = IMX8MP_USB1_PHY_Pxx_REQ,
> + .map = IMX8MP_USB1_PHY_A53_DOMAIN,
> + },
> + .pgc = BIT(IMX8MP_PGC_USB1),
> + },
> +
> + [IMX8MP_POWER_DOMAIN_USB2_PHY] = {
> + .genpd = {
> + .name = "usb-otg2",
> + },
> + .bits = {
> + .pxx = IMX8MP_USB2_PHY_Pxx_REQ,
> + .map = IMX8MP_USB2_PHY_A53_DOMAIN,
> + },
> + .pgc = BIT(IMX8MP_PGC_USB2),
> + },
> +
> + [IMX8MP_POWER_DOMAIN_MLMIX] = {
> + .genpd = {
> + .name = "mlmix",
> + },
> + .bits = {
> + .pxx = IMX8MP_MLMIX_Pxx_REQ,
> + .map = IMX8MP_MLMIX_A53_DOMAIN,
> + .hskreq = IMX8MP_MLMIX_PWRDNREQN,
> + .hskack = IMX8MP_MLMIX_PWRDNACKN,
> + },
> + .pgc = BIT(IMX8MP_PGC_MLMIX),
> + .keep_clocks = true,
> + },
> +
> + [IMX8MP_POWER_DOMAIN_AUDIOMIX] = {
> + .genpd = {
> + .name = "audiomix",
> + },
> + .bits = {
> + .pxx = IMX8MP_AUDIOMIX_Pxx_REQ,
> + .map = IMX8MP_AUDIOMIX_A53_DOMAIN,
> + .hskreq = IMX8MP_AUDIOMIX_PWRDNREQN,
> + .hskack = IMX8MP_AUDIOMIX_PWRDNACKN,
> + },
> + .pgc = BIT(IMX8MP_PGC_AUDIOMIX),
> + .keep_clocks = true,
> + },
> +
> + [IMX8MP_POWER_DOMAIN_GPU2D] = {
> + .genpd = {
> + .name = "gpu2d",
> + },
> + .bits = {
> + .pxx = IMX8MP_GPU_2D_Pxx_REQ,
> + .map = IMX8MP_GPU2D_A53_DOMAIN,
> + },
> + .pgc = BIT(IMX8MP_PGC_GPU2D),
> + },
> +
> + [IMX8MP_POWER_DOMAIN_GPUMIX] = {
> + .genpd = {
> + .name = "gpumix",
> + },
> + .bits = {
> + .pxx = IMX8MP_GPU_SHARE_LOGIC_Pxx_REQ,
> + .map = IMX8MP_GPUMIX_A53_DOMAIN,
> + .hskreq = IMX8MP_GPUMIX_PWRDNREQN,
> + .hskack = IMX8MP_GPUMIX_PWRDNACKN,
> + },
> + .pgc = BIT(IMX8MP_PGC_GPUMIX),
> + .keep_clocks = true,
> + },
> +
> + [IMX8MP_POWER_DOMAIN_GPU3D] = {
> + .genpd = {
> + .name = "gpu3d",
> + },
> + .bits = {
> + .pxx = IMX8MP_GPU_3D_Pxx_REQ,
> + .map = IMX8MP_GPU3D_A53_DOMAIN,
> + },
> + .pgc = BIT(IMX8MP_PGC_GPU3D),
> + },
> +
> + [IMX8MP_POWER_DOMAIN_MEDIAMIX] = {
> + .genpd = {
> + .name = "mediamix",
> + },
> + .bits = {
> + .pxx = IMX8MP_MEDIMIX_Pxx_REQ,
> + .map = IMX8MP_MEDIAMIX_A53_DOMAIN,
> + .hskreq = IMX8MP_MEDIAMIX_PWRDNREQN,
> + .hskack = IMX8MP_MEDIAMIX_PWRDNACKN,
> + },
> + .pgc = BIT(IMX8MP_PGC_MEDIAMIX),
> + .keep_clocks = true,
> + },
> +
> + [IMX8MP_POWER_DOMAIN_HDMIMIX] = {
> + .genpd = {
> + .name = "hdmimix",
> + },
> + .bits = {
> + .pxx = IMX8MP_HDMIMIX_Pxx_REQ,
> + .map = IMX8MP_HDMIMIX_A53_DOMAIN,
> + .hskreq = IMX8MP_HDMIMIX_PWRDNREQN,
> + .hskack = IMX8MP_HDMIMIX_PWRDNACKN,
> + },
> + .pgc = BIT(IMX8MP_PGC_HDMIMIX),
> + .keep_clocks = true,
> + },
> +
> + [IMX8MP_POWER_DOMAIN_HDMI_PHY] = {
> + .genpd = {
> + .name = "hdmi-phy",
> + },
> + .bits = {
> + .pxx = IMX8MP_HDMI_PHY_Pxx_REQ,
> + .map = IMX8MP_HDMI_PHY_A53_DOMAIN,
> + },
> + .pgc = BIT(IMX8MP_PGC_HDMI),
> + },
> +
> + [IMX8MP_POWER_DOMAIN_MIPI_PHY2] = {
> + .genpd = {
> + .name = "mipi-phy2",
> + },
> + .bits = {
> + .pxx = IMX8MP_MIPI_PHY2_Pxx_REQ,
> + .map = IMX8MP_MIPI_PHY2_A53_DOMAIN,
> + },
> + .pgc = BIT(IMX8MP_PGC_MIPI2),
> + },
> +
> + [IMX8MP_POWER_DOMAIN_HSIOMIX] = {
> + .genpd = {
> + .name = "hsiomix",
> + },
> + .bits = {
> + .pxx = IMX8MP_HSIOMIX_Pxx_REQ,
> + .map = IMX8MP_HSIOMIX_A53_DOMAIN,
> + .hskreq = IMX8MP_HSIOMIX_PWRDNREQN,
> + .hskack = IMX8MP_HSIOMIX_PWRDNACKN,
> + },
> + .pgc = BIT(IMX8MP_PGC_HSIOMIX),
> + .keep_clocks = true,
> + },
> +
> + [IMX8MP_POWER_DOMAIN_MEDIAMIX_ISPDWP] = {
> + .genpd = {
> + .name = "mediamix-isp-dwp",
> + },
> + .bits = {
> + .pxx = IMX8MP_MEDIA_ISP_DWP_Pxx_REQ,
> + .map = IMX8MP_MEDIA_ISPDWP_A53_DOMAIN,
> + },
> + .pgc = BIT(IMX8MP_PGC_MEDIA_ISP_DWP),
> + },
> +};
> +
> +
> static const struct imx_pgc_regs imx8mp_pgc_regs = {
> .map = IMX8MP_GPC_PGC_CPU_MAPPING,
> .pup = IMX8MP_GPC_PU_PGC_SW_PUP_REQ,
> @@ -1065,6 +1251,12 @@ static const struct imx_pgc_domain_data imx8mp_pgc_domain_data = {
> .pgc_regs = &imx8mp_pgc_regs,
> };
>
> +static const struct imx_pgc_domain_data imx8mpl_pgc_domain_data = {
> + .domains = imx8mpl_pgc_domains,
> + .domains_num = ARRAY_SIZE(imx8mpl_pgc_domains),
> + .pgc_regs = &imx8mp_pgc_regs,
> +};
> +
> static const struct imx_pgc_domain imx8mn_pgc_domains[] = {
> [IMX8MN_POWER_DOMAIN_HSIOMIX] = {
> .genpd = {
> @@ -1302,6 +1494,7 @@ static const struct of_device_id imx_gpcv2_dt_ids[] = {
> { .compatible = "fsl,imx8mm-gpc", .data = &imx8mm_pgc_domain_data, },
> { .compatible = "fsl,imx8mn-gpc", .data = &imx8mn_pgc_domain_data, },
> { .compatible = "fsl,imx8mp-gpc", .data = &imx8mp_pgc_domain_data, },
> + { .compatible = "fsl,imx8mpl-gpc", .data = &imx8mpl_pgc_domain_data, },
> { .compatible = "fsl,imx8mq-gpc", .data = &imx8m_pgc_domain_data, },
> { }
> };
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-04-14 8:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-15 7:05 imx8 - gpc: Support IMX8 Lite Hans Christian Lonstad
2023-03-15 9:13 ` Marco Felsch
2023-03-16 15:09 ` Hans Christian Lønstad
2023-04-14 7:47 ` Hans Christian Lønstad
2023-04-14 7:59 ` Ahmad Fatoum
2023-03-15 9:22 ` Lucas Stach
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox