Re: Devicetree spec: Specifying /cpus/cpu@* unit address format?
David Gibson <[email protected]> Sun, 5 Apr 2026 14:43:41 +1000
| Newsgroups | dev.linux.lists.sophgo,org.infradead.lists.linux-riscv,org.kernel.vger.devicetree-spec,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <adHofcKAr7C5YCSA@zatzit> |
On Fri, Apr 03, 2026 at 06:06:17PM +0800, Vivian Wang wrote:
> (Also posted at: https://github.com/devicetree-org/devicetree-specification/issues/86 )
>
> Hi all,
>
> Presently, there seems to be some confusion in the community about the
> format of unit addresses for "/cpus/cpu@*" nodes for a CPU with ID > 9, e.g.
>
> cpu@??? {
> reg = <10>;
> /* reg = <0xa>; */ /* This should be equivalent */
> }
>
>
> Should this be a decimal "cpu@10", or hexadecimal "cpu@a"? I can't find
> any explicit specification.
It should be hex. That's a general convention for unit addresses.
Before flattened trees, OF essentially never used decimal
representations of things.
--
David Gibson (he or they) | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you, not the other way
| around.
http://www.ozlabs.org/~dgibson
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmnR6G4ACgkQzQJF27ox 2GfawxAAniXNBqMHwatrWhZhfnBwYG+zYbBqBPr3X8wjwwpBWhglY0IXR8XkdoUk Zn0gfxCLzh1cKBLzSlDvXte2b1FFcgIPu6V8jEV9kdYkQrClCknZA7KRjmZlDni7 xpUXHgLW2SZDHT2d9Ao3Rg/MWqrS+DAUPfzwElR1ZLIHXM0FRkREpnJfWFja9m/0 aH1JgDwHz+FUGUieeh9RrdnyWVjl5rdlO8DAogTFNOgrn239rsv7El/fm/7aZSvc iX+XKowv2EW2xIk6/UzaoHFXQ4FQN00NIZPZnfaxO7txWzpyyqH+NNoKYw9257zC 83/hPTWsIzYQ2jSsXKbRG3WQomA+gpkQ28XW7fPHOCNWLLnleSIYhHAK4iWCwlwH 41VhtpLiB/zn7NiS+t/rto0aGC72AW139lcCoJTtS9BsvOoOVt9PG3Bje23v1NRs /MsLFAtesDSRj/xNMGQzRag2NK9yRd/yh/Wm2PdmT7LmDHUrukmjHlwGLz85/Ck7 s+2pzKzVRYsiMbqv7m3SPWtWTl6y16tin3KHcBZx+V4eh+oT9ZI6dDTfC1YqvNuk ywT5aHxWfDeFvPPklQC8TzrTwK55twcgL3SJ3g5RcmORt1T8+nNRI4zkXZmFzn2/ aJ6HgJFHo7XBCRGBtuAcI3A7RXAJieqItx8g+O5ER2SfzPBi8FA= =Fs1W -----END PGP SIGNATURE-----