Alexey Guskov Posted June 1, 2022 Posted June 1, 2022 (edited) Hey guys, looks like there's no support for board serial number in latest images for Station M2. Serial number on rk356x is coming from otp memory, so: 1) there are no bindings for `otp` and `cpuinfo` devices in .dts, like here 2) there are no kernel driver to extract data from otp memory, like here I'm ready to contribute, but not sure what's the future plan for those. Edited June 1, 2022 by Alexey Guskov adding links 0 Quote
Myron Posted June 1, 2022 Posted June 1, 2022 What does this command report on your system: cat /proc/cpuinfo As far as I know there is no /dev/cpuinfo. 0 Quote
balbes150 Posted June 1, 2022 Posted June 1, 2022 There is no support for this driver in the main kernel, it is only in the old BSP. 0 Quote
Alexey Guskov Posted June 1, 2022 Author Posted June 1, 2022 On 6/1/2022 at 12:07 PM, Myron said: What does this command report on your system: cat /proc/cpuinfo As far as I know there is no /dev/cpuinfo. Expand sorry, a typo. Of course i meant /proc/cpuinfo 0 Quote
Alexey Guskov Posted June 1, 2022 Author Posted June 1, 2022 On 6/1/2022 at 12:11 PM, balbes150 said: There is no support for this driver in the main kernel, it is only in the old BSP. Expand I know there's no support, I checked the sources. But the driver seems to be simple enough and .dts changes are trivial. I can port the code from firefly kernel and create PR, but will probably need some help. 0 Quote
balbes150 Posted June 1, 2022 Posted June 1, 2022 On 6/1/2022 at 2:29 PM, Alexey Guskov said: I can port the code from firefly kernel and create PR, but will probably need some help. Expand Ok 0 Quote
Alexey Guskov Posted June 1, 2022 Author Posted June 1, 2022 On 6/1/2022 at 2:50 PM, balbes150 said: Ok Expand I'll start with questions then: 1) i got the armbian 5.17 kernel, patched the dts file, built a new .dtd, tried that on my device 2) Now i can see OTP device: # find /sys/firmware/devicetree/base/otp\@fe38c000/ /sys/firmware/devicetree/base/otp@fe38c000/ /sys/firmware/devicetree/base/otp@fe38c000/#address-cells /sys/firmware/devicetree/base/otp@fe38c000/cpu-leakage@1a /sys/firmware/devicetree/base/otp@fe38c000/cpu-leakage@1a/reg .... and cpuinfo device: # find /sys/firmware/devicetree/base/cpuinfo /sys/firmware/devicetree/base/cpuinfo /sys/firmware/devicetree/base/cpuinfo/nvmem-cells /sys/firmware/devicetree/base/cpuinfo/compatible /sys/firmware/devicetree/base/cpuinfo/nvmem-cell-names /sys/firmware/devicetree/base/cpuinfo/name But if I understand correctly, devices with NVMEM cells should be exposed to userspace as /sys/bus/nvmem/devices/somethingsomething/nvmem, but i got nothing there: # find /sys/bus/nvmem/ /sys/bus/nvmem/ /sys/bus/nvmem/uevent /sys/bus/nvmem/drivers_autoprobe /sys/bus/nvmem/devices /sys/bus/nvmem/drivers_probe /sys/bus/nvmem/drivers So, am I doing something wrong or this is expected behaviour? Do I need a loaded and active device driver for nvmem cells to be available via /sys/bus/nvmem or correct device tree definition should be enough? 0 Quote
9bx154 Posted June 1, 2022 Posted June 1, 2022 This should work: # cat /proc/device-tree/serial-number 0 Quote
Alexey Guskov Posted June 1, 2022 Author Posted June 1, 2022 On 6/1/2022 at 4:43 PM, 9bx154 said: This should work: # cat /proc/device-tree/serial-number Expand Nope # find /proc/device-tree/serial-number find: ‘/proc/device-tree/serial-number’: No such file or directory Don't see a 'serial-number' device in .dts files for rk356x, are you sure it works on Station M2 for you? 0 Quote
Alexey Guskov Posted June 1, 2022 Author Posted June 1, 2022 Okay, silly me, of course a device wont work if there's no driver for it 0 Quote
Myron Posted June 1, 2022 Posted June 1, 2022 On 6/1/2022 at 2:20 PM, Alexey Guskov said: sorry, a typo. Of course i meant /proc/cpuinfo Expand On 6/1/2022 at 2:20 PM, Alexey Guskov said: sorry, a typo. Of course i meant /proc/cpuinfo Expand I've corrected the topic subject for you. 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.