thermal: tegra: add T210-specific SOC_THERM driver
Subsystems (2)
PATCH v2 5/11 thermal: tegra: add T210-specific SOC_THERM driver
Add Tegra210 specific SOC_THERM driver.
Signed-off-by Wei Ni <[email protected]>
--- drivers/thermal/tegra/Makefile | 1 + drivers/thermal/tegra/soctherm-fuse.c | 11 ++ drivers/thermal/tegra/soctherm.c | 6 + drivers/thermal/tegra/soctherm.h | 4 + drivers/thermal/tegra/tegra210-soctherm.c | 181 ++++++++++++++++++++++++++++++ 5 files changed, 203 insertions(+) create mode 100644 drivers/thermal/tegra/tegra210-soctherm.c
drivers/thermal/tegra/Makefile +1 -0
@@ -2,3 +2,4 @@ obj-$(CONFIG_TEGRA_SOCTHERM) += tegra-soctherm.o tegra-soctherm-y := soctherm.o soctherm-fuse.o tegra-soctherm-$(CONFIG_ARCH_TEGRA_124_SOC) += tegra124-soctherm.o +tegra-soctherm-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-soctherm.o
drivers/thermal/tegra/soctherm-fuse.c +11 -0
@@ -28,7 +28,18 @@#define FUSE_TSENSOR_COMMON 0x180/* +* Tegra210: Layout of bits in FUSE_TSENSOR_COMMON: +* 3 2 1 0 +* 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 +* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +* | BASE_FT | BASE_CP | SHFT_FT | SHIFT_CP | +* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +* * Tegra12x, etc: +* In chips prior to T210, this fuse was incorrectly sized as 26 bits, +* and didn't hold SHIFT_CP in [31:26]. Therefore these missing six bits +* were obtained via the FUSE_SPARE_REALIGNMENT_REG register [5:0]. +* * FUSE_TSENSOR_COMMON: * 3 2 1 0 * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
drivers/thermal/tegra/soctherm.c +6 -0
@@ -144,6 +144,12 @@ static const struct of_device_id tegra_soctherm_of_match[] = { .data = &tegra124_soctherm, },#endif +#ifdef CONFIG_ARCH_TEGRA_210_SOC + { + .compatible = "nvidia,tegra210-soctherm", + .data = &tegra210_soctherm, + }, +#endif { }, };MODULE_DEVICE_TABLE (of, tegra_soctherm_of_match);
drivers/thermal/tegra/soctherm.h +4 -0
@@ -108,5 +108,9 @@ int tegra_soctherm_calculate_tsensor_calibration(extern struct tegra_soctherm_soc tegra124_soctherm;#endif +#ifdef CONFIG_ARCH_TEGRA_210_SOC +extern struct tegra_soctherm_soc tegra210_soctherm; +#endif +#endif
drivers/thermal/tegra/tegra210-soctherm.c new file +181 -0
181 lines not on this page · raw message
Signature · 1 line
1.9.1