All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	Eric Anholt <eric@anholt.net>, Arnd Bergmann <arnd@arndb.de>,
	gregkh@linuxfoundation.org
Cc: Stefan Wahren <stefan.wahren@i2se.com>,
	devicetree@vger.kernel.org,
	bcm-kernel-feedback-list@broadcom.com,
	linux-rpi-kernel@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/5] nvmem: Enable OTP access for Raspberry Pi
Date: Wed, 21 Nov 2018 14:11:39 +0100	[thread overview]
Message-ID: <1542805904-6446-1-git-send-email-stefan.wahren@i2se.com> (raw)

The VC4 firmware exposes a mailbox interface that allows the ARM core
to access only the customer part (8 cells * 32 bits) of the OTP memory.
This version brings read-only support, but could also be extended to
write support. Beside the kernelspace support this is also a limited userspace
alternative to the vendor specific "vcgencmd otp_dump".

I think this driver could be helpful for vendors, which integrate the
Raspberry Pi Compute Module in their products need to store unique data
like a serial or additional MAC address in the OTP.

Note for testers: This series needs "firmware: raspberrypi: Fix firmware calls
with large buffers" from James Hughes to work properly.

Changes since RFC:
- implement improvements suggested by Rob Herring and Eric Anholt
- extend Kconfig description
- define nvmem type and read only
- make MODULE_LICENSE match license text
- add patches to enable driver in bcm2835 and multi_v7 defconfig
- rebased on current srini/nvmem.git/for-next

Stefan Wahren (5):
  dt-bindings: nvmem: add binding for Raspberry Pi OTP
  nvmem: add driver for Raspberry Pi OTP
  ARM: dts: bcm2835-rpi: Enable OTP access for Raspberry Pi
  ARM: bcm2835_defconfig: Enable Raspberry Pi OTP driver
  ARM: multi_v7_defconfig: Enable Raspberry Pi OTP driver

 .../nvmem/raspberrypi,bcm2835-customer-otp.txt     |  22 ++++
 arch/arm/boot/dts/bcm2835-rpi.dtsi                 |   4 +
 arch/arm/configs/bcm2835_defconfig                 |   2 +
 arch/arm/configs/multi_v7_defconfig                |   1 +
 drivers/nvmem/Kconfig                              |  10 ++
 drivers/nvmem/Makefile                             |   2 +
 drivers/nvmem/raspberrypi-otp.c                    | 113 +++++++++++++++++++++
 7 files changed, 154 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/nvmem/raspberrypi,bcm2835-customer-otp.txt
 create mode 100644 drivers/nvmem/raspberrypi-otp.c

-- 
2.7.4

WARNING: multiple messages have this Message-ID (diff)
From: stefan.wahren@i2se.com (Stefan Wahren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/5] nvmem: Enable OTP access for Raspberry Pi
Date: Wed, 21 Nov 2018 14:11:39 +0100	[thread overview]
Message-ID: <1542805904-6446-1-git-send-email-stefan.wahren@i2se.com> (raw)

The VC4 firmware exposes a mailbox interface that allows the ARM core
to access only the customer part (8 cells * 32 bits) of the OTP memory.
This version brings read-only support, but could also be extended to
write support. Beside the kernelspace support this is also a limited userspace
alternative to the vendor specific "vcgencmd otp_dump".

I think this driver could be helpful for vendors, which integrate the
Raspberry Pi Compute Module in their products need to store unique data
like a serial or additional MAC address in the OTP.

Note for testers: This series needs "firmware: raspberrypi: Fix firmware calls
with large buffers" from James Hughes to work properly.

Changes since RFC:
- implement improvements suggested by Rob Herring and Eric Anholt
- extend Kconfig description
- define nvmem type and read only
- make MODULE_LICENSE match license text
- add patches to enable driver in bcm2835 and multi_v7 defconfig
- rebased on current srini/nvmem.git/for-next

Stefan Wahren (5):
  dt-bindings: nvmem: add binding for Raspberry Pi OTP
  nvmem: add driver for Raspberry Pi OTP
  ARM: dts: bcm2835-rpi: Enable OTP access for Raspberry Pi
  ARM: bcm2835_defconfig: Enable Raspberry Pi OTP driver
  ARM: multi_v7_defconfig: Enable Raspberry Pi OTP driver

 .../nvmem/raspberrypi,bcm2835-customer-otp.txt     |  22 ++++
 arch/arm/boot/dts/bcm2835-rpi.dtsi                 |   4 +
 arch/arm/configs/bcm2835_defconfig                 |   2 +
 arch/arm/configs/multi_v7_defconfig                |   1 +
 drivers/nvmem/Kconfig                              |  10 ++
 drivers/nvmem/Makefile                             |   2 +
 drivers/nvmem/raspberrypi-otp.c                    | 113 +++++++++++++++++++++
 7 files changed, 154 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/nvmem/raspberrypi,bcm2835-customer-otp.txt
 create mode 100644 drivers/nvmem/raspberrypi-otp.c

-- 
2.7.4

             reply	other threads:[~2018-11-21 13:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-21 13:11 Stefan Wahren [this message]
2018-11-21 13:11 ` [PATCH 0/5] nvmem: Enable OTP access for Raspberry Pi Stefan Wahren
2018-11-21 13:11 ` [PATCH 1/5] dt-bindings: nvmem: add binding for Raspberry Pi OTP Stefan Wahren
2018-11-21 13:11   ` Stefan Wahren
2018-12-06 23:49   ` Rob Herring
2018-12-06 23:49     ` Rob Herring
2018-12-07  8:10     ` Stefan Wahren
2018-12-28 15:46       ` Stefan Wahren
2018-11-21 13:11 ` [PATCH 2/5] nvmem: add driver " Stefan Wahren
2018-11-21 13:11   ` Stefan Wahren
2018-11-21 13:11 ` [PATCH 3/5] ARM: dts: bcm2835-rpi: Enable OTP access for Raspberry Pi Stefan Wahren
2018-11-21 13:11   ` Stefan Wahren
2018-11-21 13:11 ` [PATCH 4/5] ARM: bcm2835_defconfig: Enable Raspberry Pi OTP driver Stefan Wahren
2018-11-21 13:11   ` Stefan Wahren
2018-11-21 13:11 ` [PATCH 5/5] ARM: multi_v7_defconfig: " Stefan Wahren
2018-11-21 13:11   ` Stefan Wahren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1542805904-6446-1-git-send-email-stefan.wahren@i2se.com \
    --to=stefan.wahren@i2se.com \
    --cc=arnd@arndb.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=devicetree@vger.kernel.org \
    --cc=eric@anholt.net \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=rjui@broadcom.com \
    --cc=robh+dt@kernel.org \
    --cc=sbranden@broadcom.com \
    --cc=srinivas.kandagatla@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.