* [PATCH 1/2] nvmem: imx-ocotp: imx8m is compatible with imx6 not imx7
@ 2019-04-18 21:42 Leonard Crestez
2019-04-18 21:42 ` [PATCH 2/2] arm64: defconfig: NVMEM_IMX_OCOTP=y for imx8m Leonard Crestez
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Leonard Crestez @ 2019-04-18 21:42 UTC (permalink / raw)
To: Lucas Stach, Peng Fan, Shawn Guo, Srinivas Kandagatla
Cc: Aisheng Dong, Abel Vesa, Anson Huang, dl-linux-imx, kernel,
Fabio Estevam, linux-arm-kernel
According to NXP Reference Manuals and uboot/atf sources the OCOTP block
on imx8m behaves more like imx6 than imx7.
- Fuses can be read/written 32bits at a time (no imx7-like banking)
- The OCOTP_HW_OCOTP_TIMING register is like imx6 not imx7
Since nvmem doesn't support uboot-style "sense" and "override" this
issue only affected "write" which is very rarely used.
Fixes: 163c0dbd0cb1 ("nvmem: imx-ocotp: add support for imx8mq")
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
---
drivers/nvmem/imx-ocotp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
index 4cf7b61e4bf5..c3e1d9d8a537 100644
--- a/drivers/nvmem/imx-ocotp.c
+++ b/drivers/nvmem/imx-ocotp.c
@@ -444,12 +444,12 @@ static const struct ocotp_params imx7ulp_params = {
.bank_address_words = 0,
};
static const struct ocotp_params imx8mq_params = {
.nregs = 256,
- .bank_address_words = 4,
- .set_timing = imx_ocotp_set_imx7_timing,
+ .bank_address_words = 0,
+ .set_timing = imx_ocotp_set_imx6_timing,
};
static const struct of_device_id imx_ocotp_dt_ids[] = {
{ .compatible = "fsl,imx6q-ocotp", .data = &imx6q_params },
{ .compatible = "fsl,imx6sl-ocotp", .data = &imx6sl_params },
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] arm64: defconfig: NVMEM_IMX_OCOTP=y for imx8m
2019-04-18 21:42 [PATCH 1/2] nvmem: imx-ocotp: imx8m is compatible with imx6 not imx7 Leonard Crestez
@ 2019-04-18 21:42 ` Leonard Crestez
2019-04-19 4:16 ` Peng Fan
2019-04-22 2:35 ` Shawn Guo
2019-04-19 4:16 ` [PATCH 1/2] nvmem: imx-ocotp: imx8m is compatible with imx6 not imx7 Peng Fan
2019-04-19 9:32 ` Bryan O'Donoghue
2 siblings, 2 replies; 8+ messages in thread
From: Leonard Crestez @ 2019-04-18 21:42 UTC (permalink / raw)
To: Lucas Stach, Peng Fan, Shawn Guo, Srinivas Kandagatla
Cc: Aisheng Dong, Abel Vesa, Anson Huang, dl-linux-imx, kernel,
Fabio Estevam, linux-arm-kernel
Enable imx-ocotp nvmem driver for fuse access on imx8m family.
Tested on imx8mm-evk.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
---
arch/arm64/configs/defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 483d0e251f37..a308869ecdf4 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -745,10 +745,11 @@ CONFIG_PHY_UNIPHIER_USB2=y
CONFIG_PHY_UNIPHIER_USB3=y
CONFIG_PHY_TEGRA_XUSB=y
CONFIG_HISI_PMU=y
CONFIG_QCOM_L2_PMU=y
CONFIG_QCOM_L3_PMU=y
+CONFIG_NVMEM_IMX_OCOTP=y
CONFIG_QCOM_QFPROM=y
CONFIG_ROCKCHIP_EFUSE=y
CONFIG_UNIPHIER_EFUSE=y
CONFIG_MESON_EFUSE=m
CONFIG_TEE=y
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* RE: [PATCH 1/2] nvmem: imx-ocotp: imx8m is compatible with imx6 not imx7
2019-04-18 21:42 [PATCH 1/2] nvmem: imx-ocotp: imx8m is compatible with imx6 not imx7 Leonard Crestez
2019-04-18 21:42 ` [PATCH 2/2] arm64: defconfig: NVMEM_IMX_OCOTP=y for imx8m Leonard Crestez
@ 2019-04-19 4:16 ` Peng Fan
2019-04-19 9:32 ` Bryan O'Donoghue
2 siblings, 0 replies; 8+ messages in thread
From: Peng Fan @ 2019-04-19 4:16 UTC (permalink / raw)
To: Leonard Crestez, Lucas Stach, Shawn Guo, Srinivas Kandagatla
Cc: Aisheng Dong, Abel Vesa, Anson Huang, dl-linux-imx, kernel,
Fabio Estevam, linux-arm-kernel
> Subject: [PATCH 1/2] nvmem: imx-ocotp: imx8m is compatible with imx6 not
> imx7
>
> According to NXP Reference Manuals and uboot/atf sources the OCOTP block
> on imx8m behaves more like imx6 than imx7.
>
> - Fuses can be read/written 32bits at a time (no imx7-like banking)
> - The OCOTP_HW_OCOTP_TIMING register is like imx6 not imx7
>
> Since nvmem doesn't support uboot-style "sense" and "override" this issue
> only affected "write" which is very rarely used.
>
> Fixes: 163c0dbd0cb1 ("nvmem: imx-ocotp: add support for imx8mq")
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> ---
> drivers/nvmem/imx-ocotp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c index
> 4cf7b61e4bf5..c3e1d9d8a537 100644
> --- a/drivers/nvmem/imx-ocotp.c
> +++ b/drivers/nvmem/imx-ocotp.c
> @@ -444,12 +444,12 @@ static const struct ocotp_params imx7ulp_params
> = {
> .bank_address_words = 0,
> };
>
> static const struct ocotp_params imx8mq_params = {
> .nregs = 256,
> - .bank_address_words = 4,
> - .set_timing = imx_ocotp_set_imx7_timing,
> + .bank_address_words = 0,
> + .set_timing = imx_ocotp_set_imx6_timing,
> };
Reviewed-by: Peng Fan <peng.fan@nxp.com>
>
> static const struct of_device_id imx_ocotp_dt_ids[] = {
> { .compatible = "fsl,imx6q-ocotp", .data = &imx6q_params },
> { .compatible = "fsl,imx6sl-ocotp", .data = &imx6sl_params },
> --
> 2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH 2/2] arm64: defconfig: NVMEM_IMX_OCOTP=y for imx8m
2019-04-18 21:42 ` [PATCH 2/2] arm64: defconfig: NVMEM_IMX_OCOTP=y for imx8m Leonard Crestez
@ 2019-04-19 4:16 ` Peng Fan
2019-04-22 2:35 ` Shawn Guo
1 sibling, 0 replies; 8+ messages in thread
From: Peng Fan @ 2019-04-19 4:16 UTC (permalink / raw)
To: Leonard Crestez, Lucas Stach, Shawn Guo, Srinivas Kandagatla
Cc: Aisheng Dong, Abel Vesa, Anson Huang, dl-linux-imx, kernel,
Fabio Estevam, linux-arm-kernel
> Subject: [PATCH 2/2] arm64: defconfig: NVMEM_IMX_OCOTP=y for imx8m
>
> Enable imx-ocotp nvmem driver for fuse access on imx8m family.
>
> Tested on imx8mm-evk.
>
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> ---
> arch/arm64/configs/defconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> index 483d0e251f37..a308869ecdf4 100644
> --- a/arch/arm64/configs/defconfig
> +++ b/arch/arm64/configs/defconfig
> @@ -745,10 +745,11 @@ CONFIG_PHY_UNIPHIER_USB2=y
> CONFIG_PHY_UNIPHIER_USB3=y CONFIG_PHY_TEGRA_XUSB=y
> CONFIG_HISI_PMU=y CONFIG_QCOM_L2_PMU=y
> CONFIG_QCOM_L3_PMU=y
> +CONFIG_NVMEM_IMX_OCOTP=y
> CONFIG_QCOM_QFPROM=y
> CONFIG_ROCKCHIP_EFUSE=y
> CONFIG_UNIPHIER_EFUSE=y
> CONFIG_MESON_EFUSE=m
> CONFIG_TEE=y
Reviewed-by: Peng Fan <peng.fan@nxp.com>
> --
> 2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] nvmem: imx-ocotp: imx8m is compatible with imx6 not imx7
2019-04-18 21:42 [PATCH 1/2] nvmem: imx-ocotp: imx8m is compatible with imx6 not imx7 Leonard Crestez
2019-04-18 21:42 ` [PATCH 2/2] arm64: defconfig: NVMEM_IMX_OCOTP=y for imx8m Leonard Crestez
2019-04-19 4:16 ` [PATCH 1/2] nvmem: imx-ocotp: imx8m is compatible with imx6 not imx7 Peng Fan
@ 2019-04-19 9:32 ` Bryan O'Donoghue
2 siblings, 0 replies; 8+ messages in thread
From: Bryan O'Donoghue @ 2019-04-19 9:32 UTC (permalink / raw)
To: Leonard Crestez, Lucas Stach, Peng Fan, Shawn Guo, Srinivas Kandagatla
Cc: Aisheng Dong, Abel Vesa, Anson Huang, dl-linux-imx, kernel,
Fabio Estevam, linux-arm-kernel
On 18/04/2019 22:42, Leonard Crestez wrote:
> According to NXP Reference Manuals and uboot/atf sources the OCOTP block
> on imx8m behaves more like imx6 than imx7.
>
> - Fuses can be read/written 32bits at a time (no imx7-like banking)
> - The OCOTP_HW_OCOTP_TIMING register is like imx6 not imx7
>
> Since nvmem doesn't support uboot-style "sense" and "override" this
> issue only affected "write" which is very rarely used.
>
> Fixes: 163c0dbd0cb1 ("nvmem: imx-ocotp: add support for imx8mq")
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> ---
> drivers/nvmem/imx-ocotp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
> index 4cf7b61e4bf5..c3e1d9d8a537 100644
> --- a/drivers/nvmem/imx-ocotp.c
> +++ b/drivers/nvmem/imx-ocotp.c
> @@ -444,12 +444,12 @@ static const struct ocotp_params imx7ulp_params = {
> .bank_address_words = 0,
> };
>
> static const struct ocotp_params imx8mq_params = {
> .nregs = 256,
> - .bank_address_words = 4,
> - .set_timing = imx_ocotp_set_imx7_timing,
> + .bank_address_words = 0,
> + .set_timing = imx_ocotp_set_imx6_timing,
> };
>
> static const struct of_device_id imx_ocotp_dt_ids[] = {
> { .compatible = "fsl,imx6q-ocotp", .data = &imx6q_params },
> { .compatible = "fsl,imx6sl-ocotp", .data = &imx6sl_params },
>
Err.
I believe you are missing a few bits here.
Let me send through a patch-set I just completed this morning
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] arm64: defconfig: NVMEM_IMX_OCOTP=y for imx8m
2019-04-18 21:42 ` [PATCH 2/2] arm64: defconfig: NVMEM_IMX_OCOTP=y for imx8m Leonard Crestez
2019-04-19 4:16 ` Peng Fan
@ 2019-04-22 2:35 ` Shawn Guo
1 sibling, 0 replies; 8+ messages in thread
From: Shawn Guo @ 2019-04-22 2:35 UTC (permalink / raw)
To: Leonard Crestez
Cc: Aisheng Dong, Peng Fan, Abel Vesa, Anson Huang,
Srinivas Kandagatla, dl-linux-imx, kernel, Fabio Estevam,
linux-arm-kernel, Lucas Stach
On Thu, Apr 18, 2019 at 09:42:48PM +0000, Leonard Crestez wrote:
> Enable imx-ocotp nvmem driver for fuse access on imx8m family.
>
> Tested on imx8mm-evk.
>
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Applied, thanks.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] nvmem: imx-ocotp: imx8m is compatible with imx6 not imx7
2019-04-19 10:04 ` Bryan O'Donoghue
@ 2019-04-19 10:36 ` Leonard Crestez
0 siblings, 0 replies; 8+ messages in thread
From: Leonard Crestez @ 2019-04-19 10:36 UTC (permalink / raw)
To: Bryan O'Donoghue, Peng Fan
Cc: Aisheng Dong, Abel Vesa, Anson Huang, Srinivas Kandagatla,
dl-linux-imx, kernel, Fabio Estevam, Shawn Guo, linux-arm-kernel,
Lucas Stach
On 19.04.2019 13:04, Bryan O'Donoghue wrote:
> On 19/04/2019 10:35, Peng Fan wrote:
>>> On 18/04/2019 22:42, Leonard Crestez wrote:
>>>> According to NXP Reference Manuals and uboot/atf sources the OCOTP
>>>> block on imx8m behaves more like imx6 than imx7.
>>>>
>>>> - Fuses can be read/written 32bits at a time (no imx7-like banking)
>>>> - The OCOTP_HW_OCOTP_TIMING register is like imx6 not imx7
>>>>
>>>> Since nvmem doesn't support uboot-style "sense" and "override" this
>>>> issue only affected "write" which is very rarely used.
>>>>
>>>> Fixes: 163c0dbd0cb1 ("nvmem: imx-ocotp: add support for imx8mq")
>>>> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
>>>> static const struct ocotp_params imx8mq_params = {
>>>> .nregs = 256,
>>>> - .bank_address_words = 4,
>>>> - .set_timing = imx_ocotp_set_imx7_timing,
>>>> + .bank_address_words = 0,
>>>> + .set_timing = imx_ocotp_set_imx6_timing,
>>>> };
>>>
>>> I believe you are missing a few bits here.
>>
>> Would you please share more information?
>
> There are two bugs, worth fixing on the imx8 and one on the imx6 - same bug.
>
> By the looks of it, I'm not on quite the same tree you are on ..
I usually test upstream patches on top of linux-next/master before
sending. Some of your fixes were already covered but others seem real,
thanks for looking at this.
Please note that upstream defines CONFIG_ARCH_MXC for arm64 as well
(unlike older NXP trees) so you can't use that to distinguish imx6/8.
All differences should be handled via compat strings and ocotp_params.
--
Regards,
Leonard
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] nvmem: imx-ocotp: imx8m is compatible with imx6 not imx7
[not found] <AM0PR04MB4481DCC54DD4929D001EDF7488270@AM0PR04MB4481.eurprd04.prod.outlook.com>
@ 2019-04-19 10:04 ` Bryan O'Donoghue
2019-04-19 10:36 ` Leonard Crestez
0 siblings, 1 reply; 8+ messages in thread
From: Bryan O'Donoghue @ 2019-04-19 10:04 UTC (permalink / raw)
To: Peng Fan, Leonard Crestez, Lucas Stach, Shawn Guo, Srinivas Kandagatla
Cc: Aisheng Dong, Abel Vesa, Anson Huang, dl-linux-imx, kernel,
Fabio Estevam, linux-arm-kernel
On 19/04/2019 10:35, Peng Fan wrote:
> Hi Bryan,
>
>>
>> On 18/04/2019 22:42, Leonard Crestez wrote:
>>> According to NXP Reference Manuals and uboot/atf sources the OCOTP
>>> block on imx8m behaves more like imx6 than imx7.
>>>
>>> - Fuses can be read/written 32bits at a time (no imx7-like banking)
>>> - The OCOTP_HW_OCOTP_TIMING register is like imx6 not imx7
>>>
>>> Since nvmem doesn't support uboot-style "sense" and "override" this
>>> issue only affected "write" which is very rarely used.
>>>
>>> Fixes: 163c0dbd0cb1 ("nvmem: imx-ocotp: add support for imx8mq")
>>> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
>>> ---
>>> drivers/nvmem/imx-ocotp.c | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
>>> index 4cf7b61e4bf5..c3e1d9d8a537 100644
>>> --- a/drivers/nvmem/imx-ocotp.c
>>> +++ b/drivers/nvmem/imx-ocotp.c
>>> @@ -444,12 +444,12 @@ static const struct ocotp_params
>> imx7ulp_params = {
>>> .bank_address_words = 0,
>>> };
>>>
>>> static const struct ocotp_params imx8mq_params = {
>>> .nregs = 256,
>>> - .bank_address_words = 4,
>>> - .set_timing = imx_ocotp_set_imx7_timing,
>>> + .bank_address_words = 0,
>>> + .set_timing = imx_ocotp_set_imx6_timing,
>>> };
>>>
>>> static const struct of_device_id imx_ocotp_dt_ids[] = {
>>> { .compatible = "fsl,imx6q-ocotp", .data = &imx6q_params },
>>> { .compatible = "fsl,imx6sl-ocotp", .data = &imx6sl_params },
>>>
>>
>> Err.
>>
>> I believe you are missing a few bits here.
>
> Would you please share more information?
done
There are two bugs, worth fixing on the imx8 and one on the imx6 - same bug.
By the looks of it, I'm not on quite the same tree you are on ..
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-04-22 2:36 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-18 21:42 [PATCH 1/2] nvmem: imx-ocotp: imx8m is compatible with imx6 not imx7 Leonard Crestez
2019-04-18 21:42 ` [PATCH 2/2] arm64: defconfig: NVMEM_IMX_OCOTP=y for imx8m Leonard Crestez
2019-04-19 4:16 ` Peng Fan
2019-04-22 2:35 ` Shawn Guo
2019-04-19 4:16 ` [PATCH 1/2] nvmem: imx-ocotp: imx8m is compatible with imx6 not imx7 Peng Fan
2019-04-19 9:32 ` Bryan O'Donoghue
[not found] <AM0PR04MB4481DCC54DD4929D001EDF7488270@AM0PR04MB4481.eurprd04.prod.outlook.com>
2019-04-19 10:04 ` Bryan O'Donoghue
2019-04-19 10:36 ` Leonard Crestez
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.