devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] nvmem: add lpc18xx OTP memory driver
@ 2016-09-13 16:12 Joachim Eastwood
       [not found] ` <20160913161241.22492-1-manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Joachim Eastwood @ 2016-09-13 16:12 UTC (permalink / raw)
  To: srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
  Cc: Joachim Eastwood,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, robh+dt-DgEjT+Ai2ygdnm+yROfE0A

This patch set adds a simple read-only nvmem driver for the
internal OTP (One Time Programmable) memory found on all
LPC18xx/43xx devices. Write support is coming later when
the required firmware driver for the boot ROM goes upstream.

Note that dtsi patch is only included for reference. I intend
to take it myself through the lpc18xx tree once the bindings
are accepted and the driver goes upstream.


Joachim Eastwood (3):
  nvmem: add NXP LPC18xx OTP driver
  nvmem: dt: document lpc1850 OTP binding
  ARM: dts: lpc18xx: add otp node

 .../devicetree/bindings/nvmem/lpc1850-otp.txt      |  20 ++++
 arch/arm/boot/dts/lpc18xx.dtsi                     |  12 ++
 drivers/nvmem/Kconfig                              |  10 ++
 drivers/nvmem/Makefile                             |   2 +
 drivers/nvmem/lpc18xx_otp.c                        | 123 +++++++++++++++++++++
 5 files changed, 167 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/nvmem/lpc1850-otp.txt
 create mode 100644 drivers/nvmem/lpc18xx_otp.c

-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 2/3] nvmem: dt: document lpc1850 OTP binding
       [not found] ` <20160913161241.22492-1-manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2016-09-13 16:12   ` Joachim Eastwood
       [not found]     ` <20160913161241.22492-3-manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2016-09-13 16:12   ` [PATCH 3/3] ARM: dts: lpc18xx: add otp node Joachim Eastwood
  1 sibling, 1 reply; 5+ messages in thread
From: Joachim Eastwood @ 2016-09-13 16:12 UTC (permalink / raw)
  To: srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A
  Cc: Joachim Eastwood,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Documenation for the LPC18xx/43xx OTP memory bindings.

Signed-off-by: Joachim Eastwood <manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 .../devicetree/bindings/nvmem/lpc1850-otp.txt        | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/nvmem/lpc1850-otp.txt

diff --git a/Documentation/devicetree/bindings/nvmem/lpc1850-otp.txt b/Documentation/devicetree/bindings/nvmem/lpc1850-otp.txt
new file mode 100644
index 0000000..853b6a7
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/lpc1850-otp.txt
@@ -0,0 +1,20 @@
+* NXP LPC18xx OTP memory
+
+Internal OTP (One Time Programmable) memory for NXP LPC18xx/43xx devices.
+
+Required properties:
+  - compatible: Should be "nxp,lpc1850-otp"
+  - reg: Must contain an entry with the physical base address and length
+    for each entry in reg-names.
+  - address-cells: must be set to 1.
+  - size-cells: must be set to 1.
+
+See nvmem.txt for more information.
+
+Example:
+  otp: otp@40045000 {
+    compatible = "nxp,lpc1850-otp";
+    reg = <0x40045000 0x1000>;
+    #address-cells = <1>;
+    #size-cells = <1>;
+  };
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 3/3] ARM: dts: lpc18xx: add otp node
       [not found] ` <20160913161241.22492-1-manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2016-09-13 16:12   ` [PATCH 2/3] nvmem: dt: document lpc1850 OTP binding Joachim Eastwood
@ 2016-09-13 16:12   ` Joachim Eastwood
  1 sibling, 0 replies; 5+ messages in thread
From: Joachim Eastwood @ 2016-09-13 16:12 UTC (permalink / raw)
  To: manabian-Re5JQEeQqe8AvxtiuMwx3w
  Cc: srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Add node for the internal OTP (One Time Programmable) memory found
on all LPC18xx/43xx SoCs.

Signed-off-by: Joachim Eastwood <manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 arch/arm/boot/dts/lpc18xx.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/lpc18xx.dtsi b/arch/arm/boot/dts/lpc18xx.dtsi
index c6508ed..7ef0bc8 100644
--- a/arch/arm/boot/dts/lpc18xx.dtsi
+++ b/arch/arm/boot/dts/lpc18xx.dtsi
@@ -250,6 +250,18 @@
 			};
 		};
 
+		otp@40045000 {
+			compatible = "nxp,lpc1850-otp";
+			reg = <0x40045000 0x1000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			/* Flashless devices has part ID in OTP bank 0 */
+			part_id: identification@0 {
+				reg = <0x0 0x10>;
+			};
+		};
+
 		rtc: rtc@40046000 {
 			compatible = "nxp,lpc1850-rtc", "nxp,lpc1788-rtc";
 			reg = <0x40046000 0x1000>;
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 2/3] nvmem: dt: document lpc1850 OTP binding
       [not found]     ` <20160913161241.22492-3-manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2016-09-23 13:35       ` Rob Herring
  2016-09-23 20:05         ` Joachim Eastwood
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2016-09-23 13:35 UTC (permalink / raw)
  To: Joachim Eastwood
  Cc: srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On Tue, Sep 13, 2016 at 06:12:40PM +0200, Joachim Eastwood wrote:
> Documenation for the LPC18xx/43xx OTP memory bindings.
> 
> Signed-off-by: Joachim Eastwood <manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  .../devicetree/bindings/nvmem/lpc1850-otp.txt        | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/nvmem/lpc1850-otp.txt
> 
> diff --git a/Documentation/devicetree/bindings/nvmem/lpc1850-otp.txt b/Documentation/devicetree/bindings/nvmem/lpc1850-otp.txt
> new file mode 100644
> index 0000000..853b6a7
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/nvmem/lpc1850-otp.txt
> @@ -0,0 +1,20 @@
> +* NXP LPC18xx OTP memory
> +
> +Internal OTP (One Time Programmable) memory for NXP LPC18xx/43xx devices.
> +
> +Required properties:
> +  - compatible: Should be "nxp,lpc1850-otp"
> +  - reg: Must contain an entry with the physical base address and length
> +    for each entry in reg-names.

> +  - address-cells: must be set to 1.
> +  - size-cells: must be set to 1.

Not needed unless you have child nodes.

> +
> +See nvmem.txt for more information.
> +
> +Example:
> +  otp: otp@40045000 {
> +    compatible = "nxp,lpc1850-otp";
> +    reg = <0x40045000 0x1000>;
> +    #address-cells = <1>;
> +    #size-cells = <1>;
> +  };
> -- 
> 2.9.3
> 
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 2/3] nvmem: dt: document lpc1850 OTP binding
  2016-09-23 13:35       ` Rob Herring
@ 2016-09-23 20:05         ` Joachim Eastwood
  0 siblings, 0 replies; 5+ messages in thread
From: Joachim Eastwood @ 2016-09-23 20:05 UTC (permalink / raw)
  To: Rob Herring
  Cc: Srinivas Kandagatla, Maxime Ripard,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree

On 23 September 2016 at 15:35, Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> On Tue, Sep 13, 2016 at 06:12:40PM +0200, Joachim Eastwood wrote:
>> Documenation for the LPC18xx/43xx OTP memory bindings.
>>
>> Signed-off-by: Joachim Eastwood <manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> ---
>>  .../devicetree/bindings/nvmem/lpc1850-otp.txt        | 20 ++++++++++++++++++++
>>  1 file changed, 20 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/nvmem/lpc1850-otp.txt
>>
>> diff --git a/Documentation/devicetree/bindings/nvmem/lpc1850-otp.txt b/Documentation/devicetree/bindings/nvmem/lpc1850-otp.txt
>> new file mode 100644
>> index 0000000..853b6a7
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/nvmem/lpc1850-otp.txt
>> @@ -0,0 +1,20 @@
>> +* NXP LPC18xx OTP memory
>> +
>> +Internal OTP (One Time Programmable) memory for NXP LPC18xx/43xx devices.
>> +
>> +Required properties:
>> +  - compatible: Should be "nxp,lpc1850-otp"
>> +  - reg: Must contain an entry with the physical base address and length
>> +    for each entry in reg-names.
>
>> +  - address-cells: must be set to 1.
>> +  - size-cells: must be set to 1.
>
> Not needed unless you have child nodes.

They will have "nvmem" cell children. See patch 3/3

+                       /* Flashless devices has part ID in OTP bank 0 */
+                       part_id: identification@0 {
+                               reg = <0x0 0x10>;
+                       };

These cells are documented in nvmem.txt.


regards,
Joachim Eastwood
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2016-09-23 20:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-13 16:12 [PATCH 0/3] nvmem: add lpc18xx OTP memory driver Joachim Eastwood
     [not found] ` <20160913161241.22492-1-manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-09-13 16:12   ` [PATCH 2/3] nvmem: dt: document lpc1850 OTP binding Joachim Eastwood
     [not found]     ` <20160913161241.22492-3-manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-09-23 13:35       ` Rob Herring
2016-09-23 20:05         ` Joachim Eastwood
2016-09-13 16:12   ` [PATCH 3/3] ARM: dts: lpc18xx: add otp node Joachim Eastwood

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).