Support for TI bandgap temperature sensor
Subsystems (2)
v2 cover Support for TI bandgap temperature sensor
Adding support for TI bandgap temperature sensor.
Also add dt support for bandgap sensor in spl.
Faiz Abbas (2):
thermal: ti-bandgap: Add support for temperature sensor
ARM: dts: OMAP5+: Add support for bandgap sensor in SPL
arch/arm/dts/omap5-u-boot.dtsi | 4 + common/spl/Kconfig | 8 + configs/dra7xx_evm_defconfig | 3 + .../thermal/ti_soc_thermal.txt | 35 ++++ drivers/Makefile | 2 +- drivers/thermal/Kconfig | 6 + drivers/thermal/Makefile | 1 + drivers/thermal/ti-bandgap.c | 197 +++++++++++++++++++++ 8 files changed, 255 insertions(+), 1 deletion(-) create mode 100644 doc/device-tree-bindings/thermal/ti_soc_thermal.txt create mode 100644 drivers/thermal/ti-bandgap.c
Signature · 1 line
2.7.4
PATCH v2 1/2 thermal: ti-bandgap: Add support for temperature sensor
The dra7xx series of SOCs contain a temperature sensor and an associated analog-to-digital converter (ADC) which produces an output which is proportional to the SOC temperature. Add support for this temperature sensor.
---
v2:
1. Removed extra elements from ti_bandgap
2. Changed base address to ulong
3. Changed to udev to dev to maintain consistency
4. minor format changes
common/spl/Kconfig | 8 + configs/dra7xx_evm_defconfig | 3 + .../thermal/ti_soc_thermal.txt | 35 ++++ drivers/Makefile | 2 +- drivers/thermal/Kconfig | 6 + drivers/thermal/Makefile | 1 + drivers/thermal/ti-bandgap.c | 197 +++++++++++++++++++++ 7 files changed, 251 insertions(+), 1 deletion(-) create mode 100644 doc/device-tree-bindings/thermal/ti_soc_thermal.txt create mode 100644 drivers/thermal/ti-bandgap.c
common/spl/Kconfig +8 -0
@@ -604,6 +604,14 @@ config SPL_SPI_SUPPORT enable SPI drivers that are needed for other purposes also, such as a SPI PMIC. +config SPL_THERMAL + bool "Driver support for thermal devices" + help + Enable support for temperature-sensing devices. Some SoCs have on-chip + temperature sensors to permit warnings, speed throttling or even + automatic power-off when the temperature gets too high or low. Other + devices may be discrete but connected on a suitable bus. + config SPL_USB_HOST_SUPPORT bool "Support USB host drivers" help
configs/dra7xx_evm_defconfig +3 -0
@@ -90,3 +90,6 @@ CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0451 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 +CONFIG_SPL_THERMAL=y +CONFIG_DM_THERMAL=y +CONFIG_TI_DRA7_THERMAL=y
doc/device-tree-bindings/thermal/ti_soc_thermal.txt new file +35 -0
@@ -0,0 +1,35 @@ +* Texas Instrument dra7xx SCM bandgap bindings + +In the System Control Module, SoC supplies a voltage reference +and a temperature sensor feature that are gathered in the band +gap voltage and temperature sensor (VBGAPTS) module. The band +gap provides current and voltage reference for its internal +circuits and other analog IP blocks. The analog-to-digital +converter (ADC) produces an output value that is proportional +to the silicon temperature. + +Required properties: +- compatible : Should be: + - "ti,dra752-bandgap" +- interrupts : this entry should indicate which interrupt line +the talert signal is routed to; +- regs : this is specific to each bandgap version, because +the mapping may change from soc to soc, apart from depending +on available features. + +Optional: +- gpios : this entry should be used to inform which GPIO +line the tshut signal is routed to. The informed GPIO will +be treated as an IRQ; + +Example: +bandgap { + reg = <0x4a0021e0 0xc + 0x4a00232c 0xc + 0x4a002380 0x2c + 0x4a0023C0 0x3c + 0x4a002564 0x8 + 0x4a002574 0x50>; + compatible = "ti,dra752-bandgap"; + interrupts = <0 126 4>; /* talert */ +};
drivers/Makefile +1 -1
@@ -50,7 +50,7 @@ obj-$(CONFIG_SPL_SATA_SUPPORT) += ata/ scsi/ obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += block/ obj-$(CONFIG_SPL_MMC_SUPPORT) += block/ obj-$(CONFIG_SPL_FPGA_SUPPORT) += fpga/ - +obj-$(CONFIG_SPL_THERMAL) += thermal/ endif endif
drivers/thermal/Kconfig +6 -0
@@ -17,4 +17,10 @@ config IMX_THERMAL cpufreq is used as the cooling device to throttle CPUs when the passive trip is crossed. +config TI_DRA7_THERMAL + bool "Temperature sensor driver for TI dra7xx SOCs" + help + Enable thermal support for for the Texas Instruments DRA752 SoC family. + The driver supports reading CPU temperature. + endif # if DM_THERMAL
drivers/thermal/Makefile +1 -0
@@ -7,3 +7,4 @@ obj-$(CONFIG_DM_THERMAL) += thermal-uclass.o obj-$(CONFIG_IMX_THERMAL) += imx_thermal.o +obj-$(CONFIG_TI_DRA7_THERMAL) += ti-bandgap.o
drivers/thermal/ti-bandgap.c new file +197 -0
197 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v2 2/2 ARM: dts: OMAP5+: Add support for bandgap sensor in SPL
In reply to Faiz AbbasMark bandgap node as uboot,dm-spl so that it can be accessed in spl
--- arch/arm/dts/omap5-u-boot.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/dts/omap5-u-boot.dtsi +4 -0
@@ -18,6 +18,10 @@ ocp2scp at 4a090000 { compatible = "ti,omap-ocp2scp", "simple-bus"; }; + + bandgap at 4a0021e0 { + u-boot,dm-spl; + }; }; };
Signature · 1 line
2.7.4
v2 cover Support for TI bandgap temperature sensor
In reply to Faiz AbbasHi,
Quoted 7 lines · Faiz Abbas
Adding support for TI bandgap temperature sensor.
Also add dt support for bandgap sensor in spl.Faiz Abbas (2):
thermal: ti-bandgap: Add support for temperature sensor
ARM: dts: OMAP5+: Add support for bandgap sensor in SPL
Quoted 12 lines
arch/arm/dts/omap5-u-boot.dtsi | 4 + common/spl/Kconfig | 8 + configs/dra7xx_evm_defconfig | 3 + .../thermal/ti_soc_thermal.txt | 35 ++++ drivers/Makefile | 2 +- drivers/thermal/Kconfig | 6 + drivers/thermal/Makefile | 1 + drivers/thermal/ti-bandgap.c | 197 +++++++++++++++++++++ 8 files changed, 255 insertions(+), 1 deletion(-) create mode 100644 doc/device-tree-bindings/thermal/ti_soc_thermal.txt create mode 100644 drivers/thermal/ti-bandgap.c
Gentle ping.
Thanks,
Faiz
PATCH v2 1/2 thermal: ti-bandgap: Add support for temperature sensor
In reply to Faiz AbbasQuoted 13 lines · Faiz Abbas
The dra7xx series of SOCs contain a temperature sensor and an associated analog-to-digital converter (ADC) which produces an output which is proportional to the SOC temperature. Add support for this temperature sensor.
Signed-off-by Faiz Abbas <[email protected]>---
v2:
1. Removed extra elements fromti_bandgap
2. Changed base address to ulong
3. Changed to udev to dev to maintain consistency
4. minor format changes
Quoted 11 lines
common/spl/Kconfig | 8 + configs/dra7xx_evm_defconfig | 3 + .../thermal/ti_soc_thermal.txt | 35 ++++ drivers/Makefile | 2 +- drivers/thermal/Kconfig | 6 + drivers/thermal/Makefile | 1 + drivers/thermal/ti-bandgap.c | 197 +++++++++++++++++++++ 7 files changed, 251 insertions(+), 1 deletion(-) create mode 100644 doc/device-tree-bindings/thermal/ti_soc_thermal.txt create mode 100644 drivers/thermal/ti-bandgap.c
PATCH v2 2/2 ARM: dts: OMAP5+: Add support for bandgap sensor in SPL
In reply to Faiz AbbasQuoted 6 lines · Faiz Abbas
Mark bandgap node as uboot,dm-spl so that it can be accessed in spl
Signed-off-by Faiz Abbas <[email protected]>--- arch/arm/dts/omap5-u-boot.dtsi | 4 ++++ 1 file changed, 4 insertions(+)