Skip to contentSkip to conversation

Add Renesas R-Car Gen4 E-FUSE support

PATCH RESEND Applied Geert Uytterhoeven 4 participants 11 messages Oct 3, 2024 – Oct 7, 2024

Subsystems (3)
lore
Share & tools
lore

Geert Uytterhoeven

author maintainer
#0 lore raw

v3 cover Add Renesas R-Car Gen4 E-FUSE support

Hi all,

(another rc1, so time for a resend)

R-Car Gen3/Gen4 SoCs contain fuses indicating hardware support or hardware parameters. Unfortunately the various SoCs require different mechanisms to read the state of the fuses:
- On R-Car Gen3, the fuse monitor registers are in the middle of the Pin Function Controller (PFC) register block,
- On R-Car V3U and S4-8, the E-FUSE non-volatile memory is accessible through a separate register block in the PFC,
- On R-Car V4H and V4M, the E-FUSE non-volatile memory is accessible through the second register block of OTP_MEM.

As the first variant is quite different from the other two, and there is currently no use case requiring support for it, this patch series adds support for the last 2 variants only.

Note that the first two revisions of this series implemented only basic nvmem support, and a custom in-kernel API, mimicked after the fuse-tregra driver. Then, Arnd told me on IRC that the R-Car E-FUSE driver should use the nvmem framework fully.

The fuses' states can be read using the nvmem subsystem:
- In kernelspace, through the nvmem_cell_*() API.
A first known use case is reading tuning parameters for the Universal Flash Storage controller on R-Car S4-8 ES1.2.

- In userspace, through sysfs. E.g. on R-Car S4-8 ES1.2:

    / # hd /sys/bus/nvmem/devices/rcar-fuse/nvmem
    00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    *
    000000e0  00 00 00 00 fe 00 00 00  00 00 00 00 00 00 00 00  |....�...........|
    000000f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    *
    00000140  00 00 00 00 23 51 23 51  52 98 52 98 00 00 00 00  |....#Q#QR�R�....|
    00000150  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    *
    00000200

Previous v3 submission[3]:
- Some discussion about #nvmem-cell-cells = <0>, no changes.

Changes compared to v2[2]:
- Dropped accepted dt-bindings,
- Drop "pinctrl: renesas: Add R-Car Gen3 fuse support",
- New patch "dt-bindings: fuse: Move renesas,rcar-{efuse,otp} to

    nvmem",
  - Drop superfluous semicolon,
  - Drop the custom rcar_fuse_read() kernel API, in favor of the
    standard nvmem_cell_*() API,
  - Drop support for explicitly-instantiated platform devices with
    accompanying platform data, which would be needed to support fuses
    tightly integrated with the Pin Function Controller on R-Car Gen3
    SoCs.  It can be added when a use case shows up.
  - Move from drivers/soc/renesas/ to drivers/nvmem/,
  - Register the full register block that contains the E-FUSE data
    registers with the nvmem subsystem, but use keepouts to ignore all
    registers before the first or after the last documented data
    register.  Undocumented registers in between are still accessible.
  - Replace offset/nregs in rcar_fuse_data by start/end,
  - Use __ioread32_copy() helper,
  - Initialize most fields of struct nvmem_config in its declaration,
  - Rename nvmem device from "fuse" to "rcar-fuse",
  - Use NVMEM_DEVID_NONE,
  - Add an entry to the MAINTAINERS file,
  - Fix reg size,
  - New patch "arm64: dts: renesas: r8a779f4: Add UFS tuning parameters
    in E-FUSE".

Changes compared to v1[3]:
- Drop RFC state and broaden audience,
- Fix typo in one-line summary,
- Add Reviewed-by.

This has been tested on R-Car V3U, S4-8 ES1.0 and ES1.2, V4H, and V4M.

Thanks for your comments!

[1] https://lore.kernel.org/[email protected]
[2] https://lore.kernel.org/[email protected]
[3] https://lore.kernel.org/[email protected]

Geert Uytterhoeven (7):
dt-bindings: fuse: Move renesas,rcar-{efuse,otp} to nvmem
nvmem: Add R-Car E-FUSE driver
arm64: dts: renesas: r8a779a0: Add E-FUSE node
arm64: dts: renesas: r8a779f0: Add E-FUSE node
arm64: dts: renesas: r8a779f4: Add UFS tuning parameters in E-FUSE
arm64: dts: renesas: r8a779g0: Add OTP_MEM node
arm64: dts: renesas: r8a779h0: Add OTP_MEM node

 .../{fuse => nvmem}/renesas,rcar-efuse.yaml   |  35 +++--
 .../{fuse => nvmem}/renesas,rcar-otp.yaml     |  17 ++-
 MAINTAINERS                                   |   2 +
 arch/arm64/boot/dts/renesas/r8a779a0.dtsi     |   8 +
 arch/arm64/boot/dts/renesas/r8a779f0.dtsi     |   8 +
 arch/arm64/boot/dts/renesas/r8a779f4.dtsi     |  12 ++
 arch/arm64/boot/dts/renesas/r8a779g0.dtsi     |   5 +
 arch/arm64/boot/dts/renesas/r8a779h0.dtsi     |   5 +
 drivers/nvmem/Kconfig                         |  11 ++
 drivers/nvmem/Makefile                        |   2 +
 drivers/nvmem/rcar-efuse.c                    | 142 ++++++++++++++++++
 11 files changed, 230 insertions(+), 17 deletions(-)
 rename Documentation/devicetree/bindings/{fuse => nvmem}/renesas,rcar-efuse.yaml (54%)
 rename Documentation/devicetree/bindings/{fuse => nvmem}/renesas,rcar-otp.yaml (60%)
 create mode 100644 drivers/nvmem/rcar-efuse.c
Signature · 12 lines
2.34.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
author maintainer
#1 lore raw

PATCH RESEND v3 1/7 dt-bindings: fuse: Move renesas,rcar-{efuse,otp} to nvmem

The R-Car E-FUSE blocks can be modelled better using the nvmem framework.

Replace the R-Car V3U example by an R-Car S4-8 ES1.2 example, to show the definition of nvmem cells. While at it, drop unneeded labels from the examples, and fix indentation.

Add an entry to the MAINTAINERS file.

---
v3:
- New.

---
 .../{fuse => nvmem}/renesas,rcar-efuse.yaml   | 35 +++++++++++++------
 .../{fuse => nvmem}/renesas,rcar-otp.yaml     | 17 +++++----
 MAINTAINERS                                   |  1 +
 3 files changed, 36 insertions(+), 17 deletions(-)
 rename Documentation/devicetree/bindings/{fuse => nvmem}/renesas,rcar-efuse.yaml (54%)
 rename Documentation/devicetree/bindings/{fuse => nvmem}/renesas,rcar-otp.yaml (60%)
Documentation/devicetree/bindings/nvmem/renesas,rcar-efuse.yaml renamed from Documentation/devicetree/bindings/fuse/renesas,rcar-efuse.yaml +24 -11
similarity index 54%
rename from Documentation/devicetree/bindings/fuse/renesas,rcar-efuse.yaml
rename to Documentation/devicetree/bindings/nvmem/renesas,rcar-efuse.yaml
index d7e289244e72cce1..ce7d65afa4602537 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
 %YAML 1.2
 ---
-$id: http://devicetree.org/schemas/fuse/renesas,rcar-efuse.yaml#
+$id: http://devicetree.org/schemas/nvmem/renesas,rcar-efuse.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
 title: R-Car E-FUSE connected to PFC
@@ -13,6 +13,9 @@ description:
   The E-FUSE is a type of non-volatile memory, which is accessible through the
   Pin Function Controller (PFC) on some R-Car Gen4 SoCs.
 
+allOf:
+  - $ref: nvmem.yaml#
+
 properties:
   compatible:
     enum:
@@ -39,17 +42,27 @@ required:
   - power-domains
   - resets
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
-    #include <dt-bindings/clock/r8a779a0-cpg-mssr.h>
-    #include <dt-bindings/power/r8a779a0-sysc.h>
-
-    fuse: fuse@e6078800 {
-            compatible = "renesas,r8a779a0-efuse";
-            reg = <0xe6078800 0x100>;
-            clocks = <&cpg CPG_MOD 916>;
-            power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
-            resets = <&cpg 916>;
+    #include <dt-bindings/clock/r8a779f0-cpg-mssr.h>
+    #include <dt-bindings/power/r8a779f0-sysc.h>
+
+    fuse@e6078800 {
+        compatible = "renesas,r8a779f0-efuse";
+        reg = <0xe6078800 0x200>;
+        clocks = <&cpg CPG_MOD 915>;
+        power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>;
+        resets = <&cpg 915>;
+
+        nvmem-layout {
+            compatible = "fixed-layout";
+            #address-cells = <1>;
+            #size-cells = <1>;
+
+            calib@144 {
+                reg = <0x144 0x08>;
+            };
+        };
     };
Documentation/devicetree/bindings/nvmem/renesas,rcar-otp.yaml renamed from Documentation/devicetree/bindings/fuse/renesas,rcar-otp.yaml +11 -6
similarity index 60%
rename from Documentation/devicetree/bindings/fuse/renesas,rcar-otp.yaml
rename to Documentation/devicetree/bindings/nvmem/renesas,rcar-otp.yaml
index d74872ae9ff378f9..3313c03ea68dfd57 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
 %YAML 1.2
 ---
-$id: http://devicetree.org/schemas/fuse/renesas,rcar-otp.yaml#
+$id: http://devicetree.org/schemas/nvmem/renesas,rcar-otp.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
 title: R-Car E-FUSE connected to OTP_MEM
@@ -13,6 +13,9 @@ description:
   The E-FUSE is a type of non-volatile memory, which is accessible through the
   One-Time Programmable Memory (OTP_MEM) module on some R-Car Gen4 SoCs.
 
+allOf:
+  - $ref: nvmem.yaml#
+
 properties:
   compatible:
     enum:
@@ -22,17 +25,19 @@ properties:
   reg:
     items:
       - description: OTP_MEM_0
-      - description: OTP_MEM_1
+      - description: OTP_MEM_1.
+          The addresses of cells defined under the optional nvmem-layout
+          subnode are relative to this register bank.
 
 required:
   - compatible
   - reg
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
-    otp: otp@e61be000 {
-            compatible = "renesas,r8a779g0-otp";
-            reg = <0xe61be000 0x1000>, <0xe61bf000 0x1000>;
+    otp@e61be000 {
+        compatible = "renesas,r8a779g0-otp";
+        reg = <0xe61be000 0x1000>, <0xe61bf000 0x1000>;
     };
MAINTAINERS +1 -0
index ca10c94405f3a43d..2437c49c19440a96 100644
@@ -2922,6 +2922,7 @@ Q:	http://patchwork.kernel.org/project/linux-renesas-soc/list/
 C:	irc://irc.libera.chat/renesas-soc
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel.git next
 F:	Documentation/devicetree/bindings/hwinfo/renesas,prr.yaml
+F:	Documentation/devicetree/bindings/nvmem/renesas,*
 F:	Documentation/devicetree/bindings/soc/renesas/
 F:	arch/arm/boot/dts/renesas/
 F:	arch/arm/configs/shmobile_defconfig
Signature · 1 line
2.34.1
maintainer Reviewed-by on v3 1/7
#2 lore raw

Re: [PATCH v3 resend 1/7] dt-bindings: fuse: Move renesas,rcar-{efuse,otp} to nvmem

Quoted 14 lines · Geert Uytterhoeven

The R-Car E-FUSE blocks can be modelled better using the nvmem framework.

Replace the R-Car V3U example by an R-Car S4-8 ES1.2 example, to show the definition of nvmem cells. While at it, drop unneeded labels from the examples, and fix indentation.

Add an entry to the MAINTAINERS file.

---
v3:
- New.

Quoted 8 lines
---
 .../{fuse => nvmem}/renesas,rcar-efuse.yaml   | 35 +++++++++++++------
 .../{fuse => nvmem}/renesas,rcar-otp.yaml     | 17 +++++----
 MAINTAINERS                                   |  1 +
 3 files changed, 36 insertions(+), 17 deletions(-)
 rename Documentation/devicetree/bindings/{fuse => nvmem}/renesas,rcar-efuse.yaml (54%)
 rename Documentation/devicetree/bindings/{fuse => nvmem}/renesas,rcar-otp.yaml (60%)
author maintainer
#3 lore raw

PATCH RESEND v3 2/7 nvmem: Add R-Car E-FUSE driver

In reply to Geert Uytterhoeven

R-Car Gen4 SoCs contain fuses indicating hardware support or hardware (e.g. tuning) parameters. Add a driver to access the state of the fuses. This supports two types of hardware fuse providers:
1. E-FUSE non-volatile memory accessible through the Pin Function Controller on R-Car V3U and S4-8,
2. E-FUSE non-volatile memory accessible through OTP_MEM on R-Car V4H and V4M.

The state of the cells can be read using the NVMEM framework, either from kernel space (e.g. by the Renesas UFSHCD driver), or from userspace.

---
v3:
- Drop superfluous semicolon,
- Drop the custom rcar_fuse_read() kernel API, in favor of the standard nvmem_cell_*() API,
- Drop support for explicitly-instantiated platform devices with accompanying platform data, which would be needed to support fuses tightly integrated with the Pin Function Controller on R-Car Gen3 SoCs. It can be added when a use case shows up.
- Move from drivers/soc/renesas/ to drivers/nvmem/,
- Register the full register block that contains the E-FUSE data registers with the nvmem subsystem, but use keepouts to ignore all registers before the first or after the last documented data register. Undocumented registers in between are still accessible.
- Replace offset/nregs in rcar_fuse_data by start/end,
- Use __ioread32_copy() helper,
- Initialize most fields of struct nvmem_config in its declaration,
- Rename nvmem device from "fuse" to "rcar-fuse",
- Use NVMEM_DEVID_NONE,
- Add an entry to the MAINTAINERS file,

v2:
- Add Reviewed-by.

---
 MAINTAINERS                |   1 +
 drivers/nvmem/Kconfig      |  11 +++
 drivers/nvmem/Makefile     |   2 +
 drivers/nvmem/rcar-efuse.c | 142 +++++++++++++++++++++++++++++++++++++
 4 files changed, 156 insertions(+)
 create mode 100644 drivers/nvmem/rcar-efuse.c
MAINTAINERS +1 -0
index 2437c49c19440a96..b7ef2becb402f921 100644
@@ -2930,6 +2930,7 @@ F:	arch/arm/mach-shmobile/
 F:	arch/arm/mach-shmobile/
 F:	arch/arm64/boot/dts/renesas/
 F:	arch/riscv/boot/dts/renesas/
+F:	drivers/nvmem/rcar-efuse.c
 F:	drivers/pmdomain/renesas/
 F:	drivers/soc/renesas/
 F:	include/linux/soc/renesas/
drivers/nvmem/Kconfig +11 -0
index d2c384f58028dce4..8671b7c974b933e1 100644
@@ -246,6 +246,17 @@ config NVMEM_RAVE_SP_EEPROM
 	help
 	  Say y here to enable Rave SP EEPROM support.
 
+config NVMEM_RCAR_EFUSE
+	tristate "Renesas R-Car Gen4 E-FUSE support"
+	depends on (ARCH_RENESAS && ARM64) || COMPILE_TEST
+	depends on NVMEM
+	help
+	  Enable support for reading the fuses in the E-FUSE or OTP
+	  non-volatile memory block on Renesas R-Car Gen4 SoCs.
+
+	  This driver can also be built as a module. If so, the module
+	  will be called nvmem-rcar-efuse.
+
 config NVMEM_RMEM
 	tristate "Reserved Memory Based Driver Support"
 	depends on HAS_IOMEM
drivers/nvmem/Makefile +2 -0
index cdd01fbf1313b58c..5b77bbb6488bf89b 100644
@@ -52,6 +52,8 @@ obj-$(CONFIG_NVMEM_QCOM_SEC_QFPROM)	+= nvmem_sec_qfprom.o
 nvmem_sec_qfprom-y			:= sec-qfprom.o
 obj-$(CONFIG_NVMEM_RAVE_SP_EEPROM)	+= nvmem-rave-sp-eeprom.o
 nvmem-rave-sp-eeprom-y			:= rave-sp-eeprom.o
+obj-$(CONFIG_NVMEM_RCAR_EFUSE)		+= nvmem-rcar-efuse.o
+nvmem-rcar-efuse-y			:= rcar-efuse.o
 obj-$(CONFIG_NVMEM_RMEM) 		+= nvmem-rmem.o
 nvmem-rmem-y				:= rmem.o
 obj-$(CONFIG_NVMEM_ROCKCHIP_EFUSE)	+= nvmem_rockchip_efuse.o
drivers/nvmem/rcar-efuse.c new file +142 -0

142 lines not on this page · raw message

Signature · 1 line
2.34.1
Acked-by on v3 2/7
#4 lore raw

Re: [PATCH v3 resend 2/7] nvmem: Add R-Car E-FUSE driver

Quoted 8 lines · Geert Uytterhoeven

R-Car Gen4 SoCs contain fuses indicating hardware support or hardware (e.g. tuning) parameters. Add a driver to access the state of the fuses. This supports two types of hardware fuse providers:
1. E-FUSE non-volatile memory accessible through the Pin Function Controller on R-Car V3U and S4-8,
2. E-FUSE non-volatile memory accessible through OTP_MEM on R-Car V4H and V4M.

Quoted 6 lines

The state of the cells can be read using the NVMEM framework, either from kernel space (e.g. by the Renesas UFSHCD driver), or from userspace.

author maintainer
#5 lore raw

PATCH RESEND v3 3/7 arm64: dts: renesas: r8a779a0: Add E-FUSE node

In reply to Geert Uytterhoeven

Add a device node for the System Group Fuse Control and Monitor block of the Pin Function Controller (PFC) on the R-Car V3U (R8A779A0) SoC, which provides E-FUSE services.

---
v3:
- No changes,

v2:
- Add Reviewed-by.

---
 arch/arm64/boot/dts/renesas/r8a779a0.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/renesas/r8a779a0.dtsi +8 -0
index 1f4ab27acc339895..7156b1a542e8a38a 100644
@@ -245,6 +245,14 @@ gpio9: gpio@e6069980 {
 			#interrupt-cells = <2>;
 		};
 
+		fuse: fuse@e6078800 {
+			compatible = "renesas,r8a779a0-efuse";
+			reg = <0 0xe6078800 0 0x100>;
+			clocks = <&cpg CPG_MOD 916>;
+			power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
+			resets = <&cpg 916>;
+		};
+
 		cmt0: timer@e60f0000 {
 			compatible = "renesas,r8a779a0-cmt0",
 				     "renesas,rcar-gen4-cmt0";
Signature · 1 line
2.34.1
author maintainer
#6 lore raw

PATCH RESEND v3 4/7 arm64: dts: renesas: r8a779f0: Add E-FUSE node

In reply to Geert Uytterhoeven

Add a device node for the System Group Fuse Control and Monitor block of the Pin Function Controller (PFC) on the R-Car S4-8 (R8A779F0) SoC, which provides E-FUSE services.

---
v3:
- Fix reg size,

v2:
- s/r8a779g0/r8a779f0/ in one-line summary,
- Add Reviewed-by.

---
 arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/renesas/r8a779f0.dtsi +8 -0
index 9629adb47d99f142..054498e54730b49c 100644
@@ -377,6 +377,14 @@ gpio3: gpio@e6051980 {
 			#interrupt-cells = <2>;
 		};
 
+		fuse: fuse@e6078800 {
+			compatible = "renesas,r8a779f0-efuse";
+			reg = <0 0xe6078800 0 0x200>;
+			clocks = <&cpg CPG_MOD 915>;
+			power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>;
+			resets = <&cpg 915>;
+		};
+
 		cmt0: timer@e60f0000 {
 			compatible = "renesas,r8a779f0-cmt0",
 				     "renesas,rcar-gen4-cmt0";
Signature · 1 line
2.34.1
author maintainer
#7 lore raw

PATCH RESEND v3 5/7 arm64: dts: renesas: r8a779f4: Add UFS tuning parameters in E-FUSE

In reply to Geert Uytterhoeven

Describe the location in the E-FUSE block of the PLL and AFE tuning parameters for the Universal Flash Storage controller.

---
v3:
- New.

After adding:

    &ufs {
	    nvmem-cells = <&ufs_tune>;
	    nvmem-cell-names = "calibration";
    };

The calibration data can be retrieved using the following sample code:

    #include <linux/nvmem-consumer.h>

    static int nvmem_dump_cell(struct platform_device *pdev, const char *name)
    {
	    struct device *dev = &pdev->dev;
	    struct nvmem_cell *cell;
	    int res = 0;
	    void *data;
	    size_t len;

	    cell = nvmem_cell_get(dev, name);
	    if (IS_ERR(cell))
		    return dev_err_probe(dev, PTR_ERR(cell),
					 "Failed to get cell %s\n", name);

	    data = nvmem_cell_read(cell, &len);
	    if (IS_ERR(data)) {
		    res = dev_err_probe(dev, PTR_ERR(data),
					"Failed to read cell %s\n", name);
		    goto put;
	    }

	    pr_info("Cell %s contains %zu bytes of data\n", name, len);
	    print_hex_dump(KERN_INFO, "| ", DUMP_PREFIX_NONE, 32, 1, data, len, 0);

	    kfree(data);
    put:
	    nvmem_cell_put(cell);
	    return res;
    }

Calling nvmem_dump_cell(pdev, "calibration") from ufs_renesas_probe() on the R-Car S4 Starter Kit development board gives:

Cell calibration contains 8 bytes of data
| 23 51 23 51 52 98 52 98

---
 arch/arm64/boot/dts/renesas/r8a779f4.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/renesas/r8a779f4.dtsi +12 -0
index ebed41892df3346c..dfa3c015e04b740c 100644
@@ -10,3 +10,15 @@
 / {
 	compatible = "renesas,r8a779f4", "renesas,r8a779f0";
 };
+
+&fuse {
+	nvmem-layout {
+		compatible = "fixed-layout";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		ufs_tune: calib@144 {
+			reg = <0x144 0x08>;
+		};
+	};
+};
Signature · 1 line
2.34.1
author maintainer
#8 lore raw

PATCH RESEND v3 6/7 arm64: dts: renesas: r8a779g0: Add OTP_MEM node

In reply to Geert Uytterhoeven

Add a device node for the OTP non-volatile memory on the R-Car V4H (R8A779G0) SoC, which provides E-FUSE services.

---
v3:
- No changes,

v2:
- Add Reviewed-by.

---
 arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/renesas/r8a779g0.dtsi +5 -0
index 12900ebd098b0b78..61c6b8022ffdc3b2 100644
@@ -477,6 +477,11 @@ tsc: thermal@e6198000 {
 			#thermal-sensor-cells = <1>;
 		};
 
+		otp: otp@e61be000 {
+			compatible = "renesas,r8a779g0-otp";
+			reg = <0 0xe61be000 0 0x1000>, <0 0xe61bf000 0 0x1000>;
+		};
+
 		intc_ex: interrupt-controller@e61c0000 {
 			compatible = "renesas,intc-ex-r8a779g0", "renesas,irqc";
 			#interrupt-cells = <2>;
Signature · 1 line
2.34.1
author maintainer
#9 lore raw

PATCH RESEND v3 7/7 arm64: dts: renesas: r8a779h0: Add OTP_MEM node

In reply to Geert Uytterhoeven

Add a device node for the OTP non-volatile memory on the R-Car V4M (R8A779H0) SoC, which provides E-FUSE services.

---
v3:
- No changes,

v2:
- Add Reviewed-by.

---
 arch/arm64/boot/dts/renesas/r8a779h0.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/renesas/r8a779h0.dtsi +5 -0
index 9fe5fd142bf48ed6..facfff4b9cdca155 100644
@@ -424,6 +424,11 @@ tsc: thermal@e6198000 {
 			#thermal-sensor-cells = <1>;
 		};
 
+		otp: otp@e61be000 {
+			compatible = "renesas,r8a779h0-otp";
+			reg = <0 0xe61be000 0 0x1000>, <0 0xe61bf000 0 0x1000>;
+		};
+
 		intc_ex: interrupt-controller@e61c0000 {
 			compatible = "renesas,intc-ex-r8a779h0", "renesas,irqc";
 			#interrupt-cells = <2>;
Signature · 1 line
2.34.1
#10 lore raw

Re: (subset) [PATCH v3 resend 0/7] Add Renesas R-Car Gen4 E-FUSE support

In reply to Geert Uytterhoeven
Quoted 14 lines · Geert Uytterhoeven

Hi all,

(another rc1, so time for a resend)

R-Car Gen3/Gen4 SoCs contain fuses indicating hardware support or hardware parameters. Unfortunately the various SoCs require different mechanisms to read the state of the fuses:
- On R-Car Gen3, the fuse monitor registers are in the middle of the Pin Function Controller (PFC) register block,
- On R-Car V3U and S4-8, the E-FUSE non-volatile memory is accessible through a separate register block in the PFC,
- On R-Car V4H and V4M, the E-FUSE non-volatile memory is accessible through the second register block of OTP_MEM.

Quoted 1 line

[...]

Applied, thanks!

[1/7] dt-bindings: fuse: Move renesas,rcar-{efuse,otp} to nvmem

      commit: 149e83f1b385661cae3a60cf27271e6ee53ea6e3
[2/7] nvmem: Add R-Car E-FUSE driver
      commit: 5ac5933d4e06647b83f6b971b18bc894903a83f2

Best regards,

Signature · 1 line
Srinivas Kandagatla <[email protected]>