Skip to content

Serial number in Device Tree #1670

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
notro opened this issue Oct 8, 2016 · 8 comments
Closed

Serial number in Device Tree #1670

notro opened this issue Oct 8, 2016 · 8 comments

Comments

@notro
Copy link
Contributor

notro commented Oct 8, 2016

Currently the serial number is passed in 2 ways by the bootloader:

  • Kernel commandline as text: bcm270{8,9}.serial= (used by bcm2708/9)
  • Device Tree in binary form: /system/linux,serial (used by downstream bcm2835)

This is the only in-kernel user of this information:

$ cat /proc/cpuinfo | grep Serial
Serial          : 00000000316e5228

Linux 4.2 introduced a way to pass in the serial number via Device Tree as a string:
Commit: torvalds/linux@3f59987
Doc: torvalds/linux@13dd92b

/ {
    serial-number = "00000000316e5228";
};

@pelwell can we have it a third way? :-)

@pelwell
Copy link
Contributor

pelwell commented Oct 10, 2016

Sure - I've dropped a patch in the pipe.

popcornmix added a commit to raspberrypi/firmware that referenced this issue Oct 11, 2016
firmware: resize: Fix for no padding giving incorrect pitch
See: https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=162349

firmware: arm_dt: Populate the /serial-number property
See: raspberrypi/linux#1670

firmware: deinterlace: Provide a mode where frame flags are exclusively used

firmware: arm_loader: do not allow qpu usage when arm owns the 3d
See: #669

firmware: vcinclude: Fix macro for IS_ALIAS_L1L2_NONALLOCATING
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Oct 11, 2016
firmware: resize: Fix for no padding giving incorrect pitch
See: https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=162349

firmware: arm_dt: Populate the /serial-number property
See: raspberrypi/linux#1670

firmware: deinterlace: Provide a mode where frame flags are exclusively used

firmware: arm_loader: do not allow qpu usage when arm owns the 3d
See: raspberrypi/firmware#669

firmware: vcinclude: Fix macro for IS_ALIAS_L1L2_NONALLOCATING
@popcornmix
Copy link
Collaborator

This is in latest rpi-update firmware.

@notro
Copy link
Contributor Author

notro commented Oct 11, 2016

Thanks, that worked just fine.

@notro notro closed this as completed Oct 11, 2016
@kukabu
Copy link

kukabu commented Oct 12, 2016

@popcornmix what about implement local-mac-address in DT? We can use the c489565 and drop the 1bc5568

@kukabu
Copy link

kukabu commented Oct 12, 2016

WOW! The mac-address exists in DT, it seems we can drop the 1bc5568.
But can you rename the mac-address to local-mac-address? The mac-address is better use for user-defined whereas local-mac-address - vendor-defined.

@pelwell
Copy link
Contributor

pelwell commented Oct 12, 2016

The of_get_mac_address() function tries "mac-address" first, then "local-mac-address", then "address", so using "mac-address" is actually a performance optimisation.

But seriously, can you think of a situation where defining "local-mac-address" instead is of some practical benefit?

@kukabu
Copy link

kukabu commented Oct 12, 2016

doc says:

  • local-mac-address: array of 6 bytes, specifies the MAC address that was
    assigned to the network device;
  • mac-address: array of 6 bytes, specifies the MAC address that was last used by
    the boot program; should be used in cases where the MAC address assigned to
    the device by the boot program is different from the "local-mac-address"
    property;

I think a one 'if' doesn't significantly degrade performance but the user may be able to change the mac address via DT.

@pelwell
Copy link
Contributor

pelwell commented Oct 12, 2016

I don't see how it is particularly useful retaining the original MAC address (except perhaps for information), but I agree that our usage doesn't really match the spec.

Create a new issue for tracking purposes (one problem per issue, please) and I'll change it (assuming there are no problems).

leeminghao pushed a commit to yudatun/vendor_raspberrypi_firmware that referenced this issue Oct 18, 2016
firmware: resize: Fix for no padding giving incorrect pitch
See: https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=162349

firmware: arm_dt: Populate the /serial-number property
See: raspberrypi/linux#1670

firmware: deinterlace: Provide a mode where frame flags are exclusively used

firmware: arm_loader: do not allow qpu usage when arm owns the 3d
See: raspberrypi#669

firmware: vcinclude: Fix macro for IS_ALIAS_L1L2_NONALLOCATING
mkreisl added a commit to xbianonpi/xbian-package-firmware that referenced this issue Oct 19, 2016
- vcimage: Fix detection of coherent addresses after IS_ALIAS_L1L2_NONALLOCATING change
  See: http://forum.kodi.tv/showthread.php?tid=269814&pid=2435907#pid2435907

- firmware: platform: Remove max_usb_current and default to enabled

- firmware: arm_dt: Only mask interrupts for enabled DT nodes
  See: raspberrypi/linux#1664

- firmware: ISP tuner: Lower rate at fast fps

- firmware: resize: Fix for no padding giving incorrect pitch
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=162349

- firmware: arm_dt: Populate the /serial-number property
  See: raspberrypi/linux#1670

- firmware: deinterlace: Provide a mode where frame flags are exclusively used

- firmware: arm_loader: do not allow qpu usage when arm owns the 3d
  See: #669

- firmware: vcinclude: Fix macro for IS_ALIAS_L1L2_NONALLOCATING

- firmware: platform: Don't set kernel name explicitly for recovery.elf

- firmware: resize: Add a queue of input images to avoid dropped frames with opaque input

- firmware: resize: Set the direct_input flag when using mmal opaque mode

- firmware: arm_loader: Restrict automatic loading to LOWMEM
  See: raspberrypi/linux#1641

- firmware: RaspiVid: Make open_filename() unified for all outputs (video, imv, pts)
  See: raspberrypi/userland#338
neuschaefer pushed a commit to neuschaefer/raspi-binary-firmware that referenced this issue Feb 27, 2017
firmware: resize: Fix for no padding giving incorrect pitch
See: https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=162349

firmware: arm_dt: Populate the /serial-number property
See: raspberrypi/linux#1670

firmware: deinterlace: Provide a mode where frame flags are exclusively used

firmware: arm_loader: do not allow qpu usage when arm owns the 3d
See: raspberrypi#669

firmware: vcinclude: Fix macro for IS_ALIAS_L1L2_NONALLOCATING
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants