* [PATCH 0/7] nvmem: patches(set 1) for 5.4
@ 2019-08-18 9:33 Srinivas Kandagatla
2019-08-18 9:33 ` [PATCH 1/7] dt-bindings: imx-ocotp: Add i.MX8MN compatible Srinivas Kandagatla
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Srinivas Kandagatla @ 2019-08-18 9:33 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Srinivas Kandagatla
Hi Greg,
Here are some nvmem patches for 5.4 which includes:
- adding support to new imx mx8mn octp and mx8qm fsl providers
- fix for smaller word size in meson provider and fix in sunxi provier.
- finally author email update from Stefan
Can you please queue them up for 5.4.
thanks,
srini
Anson Huang (2):
dt-bindings: imx-ocotp: Add i.MX8MN compatible
nvmem: imx-ocotp: Add i.MX8MN support
Fugang Duan (2):
dt-bindings: fsl: scu: add new compatible string for ocotp
nvmem: imx: add i.MX8QM platform support
Martin Blumenstingl (1):
nvmem: meson-mx-efuse: allow reading data smaller than word_size
Stefan Mavrodiev (1):
nvmem: sunxi_sid: fix A64 SID controller support
Stefan Wahren (1):
nvmem: mxs-ocotp: update MODULE_AUTHOR() email address
.../devicetree/bindings/arm/freescale/fsl,scu.txt | 4 +++-
Documentation/devicetree/bindings/nvmem/imx-ocotp.txt | 3 ++-
drivers/nvmem/imx-ocotp-scu.c | 7 +++++++
drivers/nvmem/imx-ocotp.c | 7 +++++++
drivers/nvmem/meson-mx-efuse.c | 3 ++-
drivers/nvmem/mxs-ocotp.c | 2 +-
drivers/nvmem/sunxi_sid.c | 1 +
7 files changed, 23 insertions(+), 4 deletions(-)
--
2.21.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/7] dt-bindings: imx-ocotp: Add i.MX8MN compatible
2019-08-18 9:33 [PATCH 0/7] nvmem: patches(set 1) for 5.4 Srinivas Kandagatla
@ 2019-08-18 9:33 ` Srinivas Kandagatla
2019-08-18 9:33 ` [PATCH 2/7] nvmem: imx-ocotp: Add i.MX8MN support Srinivas Kandagatla
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Srinivas Kandagatla @ 2019-08-18 9:33 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Anson Huang, Rob Herring, Srinivas Kandagatla
From: Anson Huang <Anson.Huang@nxp.com>
Add compatible for i.MX8MN and add i.MX8MM/i.MX8MN to the description.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
Documentation/devicetree/bindings/nvmem/imx-ocotp.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
index 96ffd06d2ca8..904dadf3d07b 100644
--- a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
+++ b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
@@ -2,7 +2,7 @@ Freescale i.MX6 On-Chip OTP Controller (OCOTP) device tree bindings
This binding represents the on-chip eFuse OTP controller found on
i.MX6Q/D, i.MX6DL/S, i.MX6SL, i.MX6SX, i.MX6UL, i.MX6ULL/ULZ, i.MX6SLL,
-i.MX7D/S, i.MX7ULP and i.MX8MQ SoCs.
+i.MX7D/S, i.MX7ULP, i.MX8MQ, i.MX8MM and i.MX8MN SoCs.
Required properties:
- compatible: should be one of
@@ -16,6 +16,7 @@ Required properties:
"fsl,imx7ulp-ocotp" (i.MX7ULP),
"fsl,imx8mq-ocotp" (i.MX8MQ),
"fsl,imx8mm-ocotp" (i.MX8MM),
+ "fsl,imx8mn-ocotp" (i.MX8MN),
followed by "syscon".
- #address-cells : Should be 1
- #size-cells : Should be 1
--
2.21.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/7] nvmem: imx-ocotp: Add i.MX8MN support
2019-08-18 9:33 [PATCH 0/7] nvmem: patches(set 1) for 5.4 Srinivas Kandagatla
2019-08-18 9:33 ` [PATCH 1/7] dt-bindings: imx-ocotp: Add i.MX8MN compatible Srinivas Kandagatla
@ 2019-08-18 9:33 ` Srinivas Kandagatla
2019-08-18 9:33 ` [PATCH 3/7] nvmem: sunxi_sid: fix A64 SID controller support Srinivas Kandagatla
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Srinivas Kandagatla @ 2019-08-18 9:33 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Anson Huang, Srinivas Kandagatla
From: Anson Huang <Anson.Huang@nxp.com>
i.MX8MN is a new SoC of i.MX8M series, it is similar to i.MX8MM
in terms of addressing and clock setup, add support for its fuse
read/write.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/nvmem/imx-ocotp.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
index 42d4451e7d67..dff2f3c357f5 100644
--- a/drivers/nvmem/imx-ocotp.c
+++ b/drivers/nvmem/imx-ocotp.c
@@ -479,6 +479,12 @@ static const struct ocotp_params imx8mm_params = {
.set_timing = imx_ocotp_set_imx6_timing,
};
+static const struct ocotp_params imx8mn_params = {
+ .nregs = 256,
+ .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 },
@@ -490,6 +496,7 @@ static const struct of_device_id imx_ocotp_dt_ids[] = {
{ .compatible = "fsl,imx7ulp-ocotp", .data = &imx7ulp_params },
{ .compatible = "fsl,imx8mq-ocotp", .data = &imx8mq_params },
{ .compatible = "fsl,imx8mm-ocotp", .data = &imx8mm_params },
+ { .compatible = "fsl,imx8mn-ocotp", .data = &imx8mn_params },
{ },
};
MODULE_DEVICE_TABLE(of, imx_ocotp_dt_ids);
--
2.21.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/7] nvmem: sunxi_sid: fix A64 SID controller support
2019-08-18 9:33 [PATCH 0/7] nvmem: patches(set 1) for 5.4 Srinivas Kandagatla
2019-08-18 9:33 ` [PATCH 1/7] dt-bindings: imx-ocotp: Add i.MX8MN compatible Srinivas Kandagatla
2019-08-18 9:33 ` [PATCH 2/7] nvmem: imx-ocotp: Add i.MX8MN support Srinivas Kandagatla
@ 2019-08-18 9:33 ` Srinivas Kandagatla
2019-08-18 9:33 ` [PATCH 4/7] nvmem: meson-mx-efuse: allow reading data smaller than word_size Srinivas Kandagatla
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Srinivas Kandagatla @ 2019-08-18 9:33 UTC (permalink / raw)
To: gregkh
Cc: linux-kernel, Stefan Mavrodiev, Chen-Yu Tsai, Vasily Khoruzhick,
Srinivas Kandagatla
From: Stefan Mavrodiev <stefan@olimex.com>
Like in H3, A64 SID controller doesn't return correct data
when using direct access. It appears that on A64, SID needs
8 bytes of word_size.
Workaround is to enable read by registers.
Signed-off-by: Stefan Mavrodiev <stefan@olimex.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Tested-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/nvmem/sunxi_sid.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
index a079a80ddf2c..e26ef1bbf198 100644
--- a/drivers/nvmem/sunxi_sid.c
+++ b/drivers/nvmem/sunxi_sid.c
@@ -186,6 +186,7 @@ static const struct sunxi_sid_cfg sun8i_h3_cfg = {
static const struct sunxi_sid_cfg sun50i_a64_cfg = {
.value_offset = 0x200,
.size = 0x100,
+ .need_register_readout = true,
};
static const struct sunxi_sid_cfg sun50i_h6_cfg = {
--
2.21.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/7] nvmem: meson-mx-efuse: allow reading data smaller than word_size
2019-08-18 9:33 [PATCH 0/7] nvmem: patches(set 1) for 5.4 Srinivas Kandagatla
` (2 preceding siblings ...)
2019-08-18 9:33 ` [PATCH 3/7] nvmem: sunxi_sid: fix A64 SID controller support Srinivas Kandagatla
@ 2019-08-18 9:33 ` Srinivas Kandagatla
2019-08-18 9:33 ` [PATCH 5/7] nvmem: mxs-ocotp: update MODULE_AUTHOR() email address Srinivas Kandagatla
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Srinivas Kandagatla @ 2019-08-18 9:33 UTC (permalink / raw)
To: gregkh
Cc: linux-kernel, Martin Blumenstingl, Neil Armstrong, Srinivas Kandagatla
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Some Amlogic boards store the Ethernet MAC address inside the eFuse. The
Ethernet MAC address uses 6 bytes. The existing logic in
meson_mx_efuse_read() would write beyond the end of the data buffer when
trying to read data with a size that is not aligned to word_size (4
bytes on Meson8, Meson8b and Meson8m2).
Calculate the remaining data to copy inside meson_mx_efuse_read() so
reading 6 bytes doesn't write beyond the end of the data buffer.
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/nvmem/meson-mx-efuse.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/nvmem/meson-mx-efuse.c b/drivers/nvmem/meson-mx-efuse.c
index b9f9ce089de9..07c9f38c1c60 100644
--- a/drivers/nvmem/meson-mx-efuse.c
+++ b/drivers/nvmem/meson-mx-efuse.c
@@ -155,7 +155,8 @@ static int meson_mx_efuse_read(void *context, unsigned int offset,
if (err)
break;
- memcpy(buf + i, &tmp, efuse->config.word_size);
+ memcpy(buf + i, &tmp,
+ min_t(size_t, bytes - i, efuse->config.word_size));
}
meson_mx_efuse_mask_bits(efuse, MESON_MX_EFUSE_CNTL1,
--
2.21.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/7] nvmem: mxs-ocotp: update MODULE_AUTHOR() email address
2019-08-18 9:33 [PATCH 0/7] nvmem: patches(set 1) for 5.4 Srinivas Kandagatla
` (3 preceding siblings ...)
2019-08-18 9:33 ` [PATCH 4/7] nvmem: meson-mx-efuse: allow reading data smaller than word_size Srinivas Kandagatla
@ 2019-08-18 9:33 ` Srinivas Kandagatla
2019-08-18 9:33 ` [PATCH 6/7] dt-bindings: fsl: scu: add new compatible string for ocotp Srinivas Kandagatla
2019-08-18 9:33 ` [PATCH 7/7] nvmem: imx: add i.MX8QM platform support Srinivas Kandagatla
6 siblings, 0 replies; 8+ messages in thread
From: Srinivas Kandagatla @ 2019-08-18 9:33 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Stefan Wahren, Srinivas Kandagatla
From: Stefan Wahren <wahrenst@gmx.net>
The email address listed in MODULE_AUTHOR() will be disabled in the
near future. Replace it with my private one.
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/nvmem/mxs-ocotp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvmem/mxs-ocotp.c b/drivers/nvmem/mxs-ocotp.c
index c34d9fecfb10..8e4898dec002 100644
--- a/drivers/nvmem/mxs-ocotp.c
+++ b/drivers/nvmem/mxs-ocotp.c
@@ -200,6 +200,6 @@ static struct platform_driver mxs_ocotp_driver = {
};
module_platform_driver(mxs_ocotp_driver);
-MODULE_AUTHOR("Stefan Wahren <stefan.wahren@i2se.com>");
+MODULE_AUTHOR("Stefan Wahren <wahrenst@gmx.net");
MODULE_DESCRIPTION("driver for OCOTP in i.MX23/i.MX28");
MODULE_LICENSE("GPL v2");
--
2.21.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 6/7] dt-bindings: fsl: scu: add new compatible string for ocotp
2019-08-18 9:33 [PATCH 0/7] nvmem: patches(set 1) for 5.4 Srinivas Kandagatla
` (4 preceding siblings ...)
2019-08-18 9:33 ` [PATCH 5/7] nvmem: mxs-ocotp: update MODULE_AUTHOR() email address Srinivas Kandagatla
@ 2019-08-18 9:33 ` Srinivas Kandagatla
2019-08-18 9:33 ` [PATCH 7/7] nvmem: imx: add i.MX8QM platform support Srinivas Kandagatla
6 siblings, 0 replies; 8+ messages in thread
From: Srinivas Kandagatla @ 2019-08-18 9:33 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Fugang Duan, Srinivas Kandagatla
From: Fugang Duan <fugang.duan@nxp.com>
Add new compatible string "fsl,imx8qm-scu-ocotp" into binding
doc for i.MX8 SCU OCOTP driver.
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
index a575e42f7fec..c149fadc6f47 100644
--- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
+++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
@@ -136,7 +136,9 @@ Required properties:
OCOTP bindings based on SCU Message Protocol
------------------------------------------------------------
Required properties:
-- compatible: Should be "fsl,imx8qxp-scu-ocotp"
+- compatible: Should be one of:
+ "fsl,imx8qm-scu-ocotp",
+ "fsl,imx8qxp-scu-ocotp".
- #address-cells: Must be 1. Contains byte index
- #size-cells: Must be 1. Contains byte length
--
2.21.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 7/7] nvmem: imx: add i.MX8QM platform support
2019-08-18 9:33 [PATCH 0/7] nvmem: patches(set 1) for 5.4 Srinivas Kandagatla
` (5 preceding siblings ...)
2019-08-18 9:33 ` [PATCH 6/7] dt-bindings: fsl: scu: add new compatible string for ocotp Srinivas Kandagatla
@ 2019-08-18 9:33 ` Srinivas Kandagatla
6 siblings, 0 replies; 8+ messages in thread
From: Srinivas Kandagatla @ 2019-08-18 9:33 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Fugang Duan, Srinivas Kandagatla
From: Fugang Duan <fugang.duan@nxp.com>
i.MX8QM efuse table has some difference with i.MX8QXP platform,
so add i.MX8QM platform support.
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/nvmem/imx-ocotp-scu.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/nvmem/imx-ocotp-scu.c b/drivers/nvmem/imx-ocotp-scu.c
index d9dc482ecb2f..61a17f943f47 100644
--- a/drivers/nvmem/imx-ocotp-scu.c
+++ b/drivers/nvmem/imx-ocotp-scu.c
@@ -16,6 +16,7 @@
enum ocotp_devtype {
IMX8QXP,
+ IMX8QM,
};
struct ocotp_devtype_data {
@@ -39,6 +40,11 @@ static struct ocotp_devtype_data imx8qxp_data = {
.nregs = 800,
};
+static struct ocotp_devtype_data imx8qm_data = {
+ .devtype = IMX8QM,
+ .nregs = 800,
+};
+
static int imx_sc_misc_otp_fuse_read(struct imx_sc_ipc *ipc, u32 word,
u32 *val)
{
@@ -118,6 +124,7 @@ static struct nvmem_config imx_scu_ocotp_nvmem_config = {
static const struct of_device_id imx_scu_ocotp_dt_ids[] = {
{ .compatible = "fsl,imx8qxp-scu-ocotp", (void *)&imx8qxp_data },
+ { .compatible = "fsl,imx8qm-scu-ocotp", (void *)&imx8qm_data },
{ },
};
MODULE_DEVICE_TABLE(of, imx_scu_ocotp_dt_ids);
--
2.21.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-08-18 9:35 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-18 9:33 [PATCH 0/7] nvmem: patches(set 1) for 5.4 Srinivas Kandagatla
2019-08-18 9:33 ` [PATCH 1/7] dt-bindings: imx-ocotp: Add i.MX8MN compatible Srinivas Kandagatla
2019-08-18 9:33 ` [PATCH 2/7] nvmem: imx-ocotp: Add i.MX8MN support Srinivas Kandagatla
2019-08-18 9:33 ` [PATCH 3/7] nvmem: sunxi_sid: fix A64 SID controller support Srinivas Kandagatla
2019-08-18 9:33 ` [PATCH 4/7] nvmem: meson-mx-efuse: allow reading data smaller than word_size Srinivas Kandagatla
2019-08-18 9:33 ` [PATCH 5/7] nvmem: mxs-ocotp: update MODULE_AUTHOR() email address Srinivas Kandagatla
2019-08-18 9:33 ` [PATCH 6/7] dt-bindings: fsl: scu: add new compatible string for ocotp Srinivas Kandagatla
2019-08-18 9:33 ` [PATCH 7/7] nvmem: imx: add i.MX8QM platform support Srinivas Kandagatla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).