From: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: devicetree <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: Paul Kocialkowski <contact-W9ppeneeCTY@public.gmane.org>,
U-Boot <u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.org>,
Ian Campbell <ijc-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>
Subject: serial atag tag in devicetree ?
Date: Sun, 22 Mar 2015 12:26:16 +0100 [thread overview]
Message-ID: <550EA6D8.3090702@redhat.com> (raw)
Hi All,
I'm sending this mail because Paul Kocialkowski (in the Cc)
has submitted a patch for upstream u-boot to set the serial
atag tag from u-boot for Allwinner SoCs, using the SoCs
SID, which is a 128 bit register containing a unique number
for each SoC.
In some cases a manufacturer may want to override this with
its own serial from say an eeprom, as such it is desirable
to communicate the serial from u-boot to the kernel rather
then reproducing the sid reading code in the kernel.
For old atag using kernels there is an atag for this, and
the contents of this tag will show up in /proc/cpuinfo,
currently there is no equivalent for this in devicetree.
I'm a bit reluctant to merge Paul's patch into u-boot
because of this as it will enable a feature on older
kernels while leaving the upstream kernel without it.
So I was wondering how to deal with this in devicetree,
at least one board in u-boot already sets a devicetree
property for this:
board/gateworks/gw_ventana/gw_ventana.c
1202: * serial# env var
1207: char *serial = getenv("serial#");
1432: setenv("serial#", str);
1512: fdt_setprop(blob, 0, "system-serial", getenv("serial#"),
1513: strlen(getenv("serial#")) + 1);
Which sets a system-serial property in the root node,
so at the same level where we also have the model string
this seems to make sense to me.
So do we want to add a devicetree binding for system
serials, and if we do should we make it a string like
above, or should we make it an 64 bit integer like the atag?
If we make it a string we can store longer serials, but
how should we deal with those wrt /proc/cpuinfo? Only show
the first 64 bits ?
Regards,
Hans
--
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
next reply other threads:[~2015-03-22 11:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-22 11:26 Hans de Goede [this message]
2015-03-22 21:01 ` serial atag tag in devicetree ? Rob Herring
2015-03-23 11:30 ` Hans de Goede
[not found] ` <550FF971.407-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-03-23 23:12 ` [U-Boot] " Rob Herring
[not found] ` <CAL_JsqLev+DeWCzvhF7bwYk3URxpgaQDR+6OmwWHjJ2nx=HijQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-24 8:01 ` Hans de Goede
2015-03-25 22:35 ` Paul Kocialkowski
2015-03-26 8:53 ` Hans de Goede
2015-03-26 9:11 ` Paul Kocialkowski
2015-03-26 9:16 ` [U-Boot] " Paul Kocialkowski
2015-03-27 4:30 ` Rob Herring
2015-03-27 8:36 ` Hans de Goede
2015-03-27 10:23 ` Paul Kocialkowski
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=550EA6D8.3090702@redhat.com \
--to=hdegoede-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=contact-W9ppeneeCTY@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ijc-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.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 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).