]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
soc/tegra: fuse: Add custom SoC attributes
authorJon Hunter <jonathanh@nvidia.com>
Fri, 17 Apr 2020 12:39:48 +0000 (13:39 +0100)
committerThierry Reding <treding@nvidia.com>
Tue, 21 Apr 2020 22:07:23 +0000 (00:07 +0200)
commit379ac9eb1fe94cc40173b83fda1ee8d611a756e9
tree4148f1b14fb3e55af822fbef7e8ef225a26c1832
parentc78cf9956f19a7db7199310802ec514266653931
soc/tegra: fuse: Add custom SoC attributes

Add a custom SoC attribute for Tegra to expose the HIDREV register
fields to userspace via the sysfs. This register provides additional
details about the type of device (eg, silicon, FPGA, etc) as well as
revision. Exposing this information is useful for identifying the
exact device revision and device type.

For Tegra devices up until Tegra186, the majorrev and minorrev fields of
the HIDREV register are used to determine the device revision and device
type. For Tegra194, the majorrev and minorrev fields only determine the
revision. Starting with Tegra194, there is an additional field,
pre_si_platform (which occupies bits 20-23), that now determines device
type. Therefore, for all Tegra devices, add a custom SoC attribute for
the majorrev and minorrev fields and for Tegra194 add an additional
attribute for the pre_si_platform field.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/soc/tegra/fuse/fuse-tegra.c
drivers/soc/tegra/fuse/fuse-tegra20.c
drivers/soc/tegra/fuse/fuse-tegra30.c
drivers/soc/tegra/fuse/fuse.h
drivers/soc/tegra/fuse/tegra-apbmisc.c