All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] nvmem: patches (set 1) for 5.17
@ 2021-12-09 17:42 Srinivas Kandagatla
  2021-12-09 17:42 ` [PATCH 1/4] dt-bindings: nvmem: mediatek: add support bits property Srinivas Kandagatla
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Srinivas Kandagatla @ 2021-12-09 17:42 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Srinivas Kandagatla

Here are some nvmem patches for 5.17 mostly bindings updates and update in mtk-fuse
to support one byte access.

Can you please queue them up for 5.17.

thanks for you help,
srini

Chunfeng Yun (3):
  dt-bindings: nvmem: mediatek: add support bits property
  dt-bindings: nvmem: mediatek: add support for mt8195
  nvmem: mtk-efuse: support minimum one byte access stride and
    granularity

Rob Herring (1):
  dt-bindings: nvmem: Add missing 'reg' property

 .../devicetree/bindings/nvmem/brcm,nvram.yaml       |  3 +++
 .../devicetree/bindings/nvmem/mtk-efuse.txt         |  2 ++
 Documentation/devicetree/bindings/nvmem/rmem.yaml   |  3 +++
 .../devicetree/bindings/nvmem/st,stm32-romem.yaml   |  3 +++
 drivers/nvmem/mtk-efuse.c                           | 13 +++++++------
 5 files changed, 18 insertions(+), 6 deletions(-)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/4] dt-bindings: nvmem: mediatek: add support bits property
  2021-12-09 17:42 [PATCH 0/4] nvmem: patches (set 1) for 5.17 Srinivas Kandagatla
@ 2021-12-09 17:42 ` Srinivas Kandagatla
  2021-12-09 17:42 ` [PATCH 2/4] dt-bindings: nvmem: mediatek: add support for mt8195 Srinivas Kandagatla
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Srinivas Kandagatla @ 2021-12-09 17:42 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Chunfeng Yun, Rob Herring, Srinivas Kandagatla

From: Chunfeng Yun <chunfeng.yun@mediatek.com>

Add support bits property, will satisfy more consumers.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 Documentation/devicetree/bindings/nvmem/mtk-efuse.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
index b6791702bcfc..ec70c5b7a340 100644
--- a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
+++ b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
@@ -10,6 +10,7 @@ Required properties:
 	      "mediatek,mt8192-efuse", "mediatek,efuse": for MT8192
 	      "mediatek,mt8516-efuse", "mediatek,efuse": for MT8516
 - reg: Should contain registers location and length
+- bits: contain the bits range by offset and size
 
 = Data cells =
 Are child nodes of MTK-EFUSE, bindings of which as described in
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/4] dt-bindings: nvmem: mediatek: add support for mt8195
  2021-12-09 17:42 [PATCH 0/4] nvmem: patches (set 1) for 5.17 Srinivas Kandagatla
  2021-12-09 17:42 ` [PATCH 1/4] dt-bindings: nvmem: mediatek: add support bits property Srinivas Kandagatla
@ 2021-12-09 17:42 ` Srinivas Kandagatla
  2021-12-09 17:42 ` [PATCH 3/4] nvmem: mtk-efuse: support minimum one byte access stride and granularity Srinivas Kandagatla
  2021-12-09 17:42   ` Srinivas Kandagatla
  3 siblings, 0 replies; 6+ messages in thread
From: Srinivas Kandagatla @ 2021-12-09 17:42 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Chunfeng Yun, Rob Herring, Srinivas Kandagatla

From: Chunfeng Yun <chunfeng.yun@mediatek.com>

Add compatible for mt8195

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 Documentation/devicetree/bindings/nvmem/mtk-efuse.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
index ec70c5b7a340..39d529599444 100644
--- a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
+++ b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
@@ -8,6 +8,7 @@ Required properties:
 	      "mediatek,mt7623-efuse", "mediatek,efuse": for MT7623
 	      "mediatek,mt8173-efuse" or "mediatek,efuse": for MT8173
 	      "mediatek,mt8192-efuse", "mediatek,efuse": for MT8192
+	      "mediatek,mt8195-efuse", "mediatek,efuse": for MT8195
 	      "mediatek,mt8516-efuse", "mediatek,efuse": for MT8516
 - reg: Should contain registers location and length
 - bits: contain the bits range by offset and size
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/4] nvmem: mtk-efuse: support minimum one byte access stride and granularity
  2021-12-09 17:42 [PATCH 0/4] nvmem: patches (set 1) for 5.17 Srinivas Kandagatla
  2021-12-09 17:42 ` [PATCH 1/4] dt-bindings: nvmem: mediatek: add support bits property Srinivas Kandagatla
  2021-12-09 17:42 ` [PATCH 2/4] dt-bindings: nvmem: mediatek: add support for mt8195 Srinivas Kandagatla
@ 2021-12-09 17:42 ` Srinivas Kandagatla
  2021-12-09 17:42   ` Srinivas Kandagatla
  3 siblings, 0 replies; 6+ messages in thread
From: Srinivas Kandagatla @ 2021-12-09 17:42 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Chunfeng Yun, Srinivas Kandagatla

From: Chunfeng Yun <chunfeng.yun@mediatek.com>

In order to support nvmem bits property, should support minimum 1 byte
read stride and minimum 1 byte read granularity at the same time.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/mtk-efuse.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/nvmem/mtk-efuse.c b/drivers/nvmem/mtk-efuse.c
index 6a537d959f14..e9a375dd84af 100644
--- a/drivers/nvmem/mtk-efuse.c
+++ b/drivers/nvmem/mtk-efuse.c
@@ -19,11 +19,12 @@ static int mtk_reg_read(void *context,
 			unsigned int reg, void *_val, size_t bytes)
 {
 	struct mtk_efuse_priv *priv = context;
-	u32 *val = _val;
-	int i = 0, words = bytes / 4;
+	void __iomem *addr = priv->base + reg;
+	u8 *val = _val;
+	int i;
 
-	while (words--)
-		*val++ = readl(priv->base + reg + (i++ * 4));
+	for (i = 0; i < bytes; i++, val++)
+		*val = readb(addr + i);
 
 	return 0;
 }
@@ -45,8 +46,8 @@ static int mtk_efuse_probe(struct platform_device *pdev)
 	if (IS_ERR(priv->base))
 		return PTR_ERR(priv->base);
 
-	econfig.stride = 4;
-	econfig.word_size = 4;
+	econfig.stride = 1;
+	econfig.word_size = 1;
 	econfig.reg_read = mtk_reg_read;
 	econfig.size = resource_size(res);
 	econfig.priv = priv;
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/4] dt-bindings: nvmem: Add missing 'reg' property
  2021-12-09 17:42 [PATCH 0/4] nvmem: patches (set 1) for 5.17 Srinivas Kandagatla
@ 2021-12-09 17:42   ` Srinivas Kandagatla
  2021-12-09 17:42 ` [PATCH 2/4] dt-bindings: nvmem: mediatek: add support for mt8195 Srinivas Kandagatla
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Srinivas Kandagatla @ 2021-12-09 17:42 UTC (permalink / raw)
  To: gregkh
  Cc: linux-kernel, Rob Herring, Srinivas Kandagatla, Maxime Coquelin,
	Alexandre Torgue, Rafał Miłecki, Saenz Julienne,
	Fabrice Gasnier, linux-stm32, linux-arm-kernel, Thierry Reding

From: Rob Herring <robh@kernel.org>

With 'unevaluatedProperties' support implemented, the following warnings
are generated in the nvmem examples:

Documentation/devicetree/bindings/nvmem/st,stm32-romem.example.dt.yaml: efuse@1fff7800: Unevaluated properties are not allowed ('reg' was unexpected)
Documentation/devicetree/bindings/nvmem/rmem.example.dt.yaml: nvram@10000000: Unevaluated properties are not allowed ('reg' was unexpected)
Documentation/devicetree/bindings/nvmem/brcm,nvram.example.dt.yaml: nvram@1eff0000: Unevaluated properties are not allowed ('reg' was unexpected)

Add the missing 'reg' property definition.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Rafał Miłecki <rafal@milecki.pl>
Cc: Saenz Julienne <nsaenzjulienne@suse.de>
Cc: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml     | 3 +++
 Documentation/devicetree/bindings/nvmem/rmem.yaml           | 3 +++
 Documentation/devicetree/bindings/nvmem/st,stm32-romem.yaml | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml b/Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml
index 58ff6b0bdb1a..8c3f0cd22821 100644
--- a/Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml
+++ b/Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml
@@ -24,6 +24,9 @@ properties:
   compatible:
     const: brcm,nvram
 
+  reg:
+    maxItems: 1
+
 unevaluatedProperties: false
 
 examples:
diff --git a/Documentation/devicetree/bindings/nvmem/rmem.yaml b/Documentation/devicetree/bindings/nvmem/rmem.yaml
index 1d85a0a30846..a4a755dcfc43 100644
--- a/Documentation/devicetree/bindings/nvmem/rmem.yaml
+++ b/Documentation/devicetree/bindings/nvmem/rmem.yaml
@@ -19,6 +19,9 @@ properties:
           - raspberrypi,bootloader-config
       - const: nvmem-rmem
 
+  reg:
+    maxItems: 1
+
   no-map:
     $ref: /schemas/types.yaml#/definitions/flag
     description:
diff --git a/Documentation/devicetree/bindings/nvmem/st,stm32-romem.yaml b/Documentation/devicetree/bindings/nvmem/st,stm32-romem.yaml
index a48c8fa56bce..448a2678dc62 100644
--- a/Documentation/devicetree/bindings/nvmem/st,stm32-romem.yaml
+++ b/Documentation/devicetree/bindings/nvmem/st,stm32-romem.yaml
@@ -24,6 +24,9 @@ properties:
       - st,stm32f4-otp
       - st,stm32mp15-bsec
 
+  reg:
+    maxItems: 1
+
 patternProperties:
   "^.*@[0-9a-f]+$":
     type: object
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/4] dt-bindings: nvmem: Add missing 'reg' property
@ 2021-12-09 17:42   ` Srinivas Kandagatla
  0 siblings, 0 replies; 6+ messages in thread
From: Srinivas Kandagatla @ 2021-12-09 17:42 UTC (permalink / raw)
  To: gregkh
  Cc: linux-kernel, Rob Herring, Srinivas Kandagatla, Maxime Coquelin,
	Alexandre Torgue, Rafał Miłecki, Saenz Julienne,
	Fabrice Gasnier, linux-stm32, linux-arm-kernel, Thierry Reding

From: Rob Herring <robh@kernel.org>

With 'unevaluatedProperties' support implemented, the following warnings
are generated in the nvmem examples:

Documentation/devicetree/bindings/nvmem/st,stm32-romem.example.dt.yaml: efuse@1fff7800: Unevaluated properties are not allowed ('reg' was unexpected)
Documentation/devicetree/bindings/nvmem/rmem.example.dt.yaml: nvram@10000000: Unevaluated properties are not allowed ('reg' was unexpected)
Documentation/devicetree/bindings/nvmem/brcm,nvram.example.dt.yaml: nvram@1eff0000: Unevaluated properties are not allowed ('reg' was unexpected)

Add the missing 'reg' property definition.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Rafał Miłecki <rafal@milecki.pl>
Cc: Saenz Julienne <nsaenzjulienne@suse.de>
Cc: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml     | 3 +++
 Documentation/devicetree/bindings/nvmem/rmem.yaml           | 3 +++
 Documentation/devicetree/bindings/nvmem/st,stm32-romem.yaml | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml b/Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml
index 58ff6b0bdb1a..8c3f0cd22821 100644
--- a/Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml
+++ b/Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml
@@ -24,6 +24,9 @@ properties:
   compatible:
     const: brcm,nvram
 
+  reg:
+    maxItems: 1
+
 unevaluatedProperties: false
 
 examples:
diff --git a/Documentation/devicetree/bindings/nvmem/rmem.yaml b/Documentation/devicetree/bindings/nvmem/rmem.yaml
index 1d85a0a30846..a4a755dcfc43 100644
--- a/Documentation/devicetree/bindings/nvmem/rmem.yaml
+++ b/Documentation/devicetree/bindings/nvmem/rmem.yaml
@@ -19,6 +19,9 @@ properties:
           - raspberrypi,bootloader-config
       - const: nvmem-rmem
 
+  reg:
+    maxItems: 1
+
   no-map:
     $ref: /schemas/types.yaml#/definitions/flag
     description:
diff --git a/Documentation/devicetree/bindings/nvmem/st,stm32-romem.yaml b/Documentation/devicetree/bindings/nvmem/st,stm32-romem.yaml
index a48c8fa56bce..448a2678dc62 100644
--- a/Documentation/devicetree/bindings/nvmem/st,stm32-romem.yaml
+++ b/Documentation/devicetree/bindings/nvmem/st,stm32-romem.yaml
@@ -24,6 +24,9 @@ properties:
       - st,stm32f4-otp
       - st,stm32mp15-bsec
 
+  reg:
+    maxItems: 1
+
 patternProperties:
   "^.*@[0-9a-f]+$":
     type: object
-- 
2.21.0


_______________________________________________
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] 6+ messages in thread

end of thread, other threads:[~2021-12-09 17:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-09 17:42 [PATCH 0/4] nvmem: patches (set 1) for 5.17 Srinivas Kandagatla
2021-12-09 17:42 ` [PATCH 1/4] dt-bindings: nvmem: mediatek: add support bits property Srinivas Kandagatla
2021-12-09 17:42 ` [PATCH 2/4] dt-bindings: nvmem: mediatek: add support for mt8195 Srinivas Kandagatla
2021-12-09 17:42 ` [PATCH 3/4] nvmem: mtk-efuse: support minimum one byte access stride and granularity Srinivas Kandagatla
2021-12-09 17:42 ` [PATCH 4/4] dt-bindings: nvmem: Add missing 'reg' property Srinivas Kandagatla
2021-12-09 17:42   ` Srinivas Kandagatla

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.