summaryrefslogtreecommitdiff
path: root/board/theobroma-systems/puma_rk3399/puma-rk3399.c
diff options
context:
space:
mode:
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-04-26 15:04:17 +0200
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-05-16 00:15:57 +0200
commit5806f37368b532a14de37ad5c06d7cd35662c736 (patch)
tree3f3338c0349ae2a3502c43d05c3302129c844931 /board/theobroma-systems/puma_rk3399/puma-rk3399.c
parent452330e78e486b97a35e9a4009a51115e7466894 (diff)
rockchip: efuse: add (misc) driver for RK3399 non-secure efuse block
This adds a simple driver for reading the efuse block of the RK3399. It should be easy enough to add drivers for other devices (e.g. the RK3328, RK3368, etc.) by passing the device details via driver_data. Unlike the kernel driver (using the nvmem subsystem), we don't expose the efuse as multiple named cells, but rather as a linear memory that can be read using misc_read(...). The primary use case (as of today) is the generation of a 'serial#' (and a 'cpuid#') environment variable for the RK3399-Q7 (Puma) system-on-module. Note that this adds a debug-only (i.e. only if DEBUG is defined) command 'rk3399_dump_efuses' that dumps the efuse block's content. N.B.: The name 'rk3399_dump_efuses' was intentionally chosen to include a SoC-name (together with a comment in the function) to remind whoever adds support for additional SoCs that this function currently makes assumptions regarding the size of the fuse-box based on the RK3399. The hope is that the function is adjusted to reflect any changes resulting from generalising the driver for multiple SoCs and is then renamed. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org> Series-changes: 3 - uses uclass_get_device_by_driver() to ensure we don't pick up the wrong misc-device
Diffstat (limited to 'board/theobroma-systems/puma_rk3399/puma-rk3399.c')
0 files changed, 0 insertions, 0 deletions