Subject: Re: [PATCH v5] soc: at91: Add Atmel SFR SN (Serial Number) support

From: Alexandre Belloni <[email-masked]>
Date: Tue, 5 Nov 2019 18:29:36 +0100

On 01/11/2019 08:13:49+0100, Alexander Dahl wrote:
> Hei hei,
> 
> I know this was already applied, but let me add some comments.
> 
> On Fri, Oct 04, 2019 at 03:25:27PM +0000, [email-masked] wrote:
> > Well, I'm sure to not know all the applications of this feature but 
> > surely unique serial number (per single chip) is very useful while 
> > wanting to identify your system precisely: attributing a MAC address, 
> > pairing with one service or user software, generating unique keys, etc.
> 
> +1
> 
> > What I don't know is if there is special API in the kernel to use it as 
> > several vendors seem to expose it differently (/proc/cpuinfo being one 
> > other option). This one in nvmem /sys file is surely a valid one.
> 
> With commit 9aebf4de2203 ("base: soc: Add serial_number attribute to soc")
> there was added a member serial_number to struct soc_device_attribute.
> As far as I can see this is part of mainline since v5.4-rc1.
> 
> I saw some patches for i.MX on this list recently, which also got
> applied, and which use that mechanism. So there seem to be at least
> two different ways to access this now.
> 
> FWIW: I was working on a patch for exposing the sama5d2 SN through
> that interface. If anyone is interested: 
> 
> https://github.com/LeSpocky/linux/tree/wip/sama5d2-sn-squash
> 

The main issue with that interface is that there is no way to consume
the SN from the kernel while nvmem has both in-kernel and userspace
APIs.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel