Support for TI bandgap temperature sensor
Subsystems (2)
v3 cover Support for TI bandgap temperature sensor
Adding support for TI bandgap temperature sensor.
Also add dt support for bandgap sensor in spl.
v3:
Missed adding Reviewed-by in v2.
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 v3 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.
---
v3:
Added Reviewed-by comment
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 v3 1/2 thermal: ti-bandgap: Add support for temperature sensor
Quoted 7 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]>Reviewed-by Simon Glass <[email protected]>
and note that in U-Boot, we let patchwork collect Reviewed-by/etc tags, so you don't need to repost with just tags added, in the future. Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171018/fedf933b/attachment.sig>
PATCH v3 1/2 thermal: ti-bandgap: Add support for temperature sensor
In reply to Faiz AbbasQuoted 52 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]>Reviewed-by Simon Glass <[email protected]>---
v3:
Added Reviewed-by commentv2:
1. Removed extra elements fromti_bandgap
2. Changed base address to ulong
3. Changed to udev to dev to maintain consistency
4. minor format changescommon/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.ccommon/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" helpconfigs/dra7xx_evm_defconfig +0
-0
configs/dra7xx_evm_defconfig CONFIG_USB_GADGET=y · line 95
Quoted 6 lines
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
Tom,
Do you want these options to be implied so that it will take effect for
HS board as well. Or enable it in defconfig as is?
Thanks and regards,
Lokesh
PATCH v3 1/2 thermal: ti-bandgap: Add support for temperature sensor
Quoted 55 lines · Lokesh Vutla
Quoted 54 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]>Reviewed-by Simon Glass <[email protected]>---
v3:
Added Reviewed-by commentv2:
1. Removed extra elements fromti_bandgap
2. Changed base address to ulong
3. Changed to udev to dev to maintain consistency
4. minor format changescommon/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.ccommon/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" helpconfigs/dra7xx_evm_defconfig +0
-0@@ -90,3 +90,6 @@ CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0451
Quoted 8 lines
configs/dra7xx_evm_defconfig CONFIG_USB_GADGET=y · line 95
Quoted 4 lines
configs/dra7xx_evm_defconfig +3
-0CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 +CONFIG_SPL_THERMAL=y +CONFIG_DM_THERMAL=y +CONFIG_TI_DRA7_THERMAL=yTom,
Do you want these options to be implied so that it will take effect for
HS board as well. Or enable it in defconfig as is?
How important is it that this be enabled? Is this 100% within the SoC? Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171022/794eedfd/attachment.sig>
PATCH v3 1/2 thermal: ti-bandgap: Add support for temperature sensor
Hi Tom,
Quoted 65 lines · Tom Rini
Quoted 55 lines · Lokesh Vutla
Quoted 54 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]>Reviewed-by Simon Glass <[email protected]>---
v3:
Added Reviewed-by commentv2:
1. Removed extra elements fromti_bandgap
2. Changed base address to ulong
3. Changed to udev to dev to maintain consistency
4. minor format changescommon/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.ccommon/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" helpconfigs/dra7xx_evm_defconfig +0
-0@@ -90,3 +90,6 @@ CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0451Quoted 8 lines
configs/dra7xx_evm_defconfig CONFIG_USB_GADGET=y · line 95
Quoted 4 lines
configs/dra7xx_evm_defconfig +3
-0CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 +CONFIG_SPL_THERMAL=y +CONFIG_DM_THERMAL=y +CONFIG_TI_DRA7_THERMAL=yTom,
Do you want these options to be implied so that it will take effect for
HS board as well. Or enable it in defconfig as is?
Quoted 3 lines
How important is it that this be enabled? Is this 100% within the SoC? Thanks!
There is an upcoming errata which requires temperature support to workaround. This errata will apply to the HS boards as well. Will send a new patch with imply added to TARGET_DRA7XX_EVM for these configs.
Thanks,
Faiz
PATCH v3 1/2 thermal: ti-bandgap: Add support for temperature sensor
Quoted 68 lines · Faiz Abbas
Hi Tom,
Quoted 65 lines · Tom Rini
Quoted 63 lines · Lokesh Vutla
Quoted 52 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]>Reviewed-by Simon Glass <[email protected]>---
v3:
Added Reviewed-by commentv2:
1. Removed extra elements fromti_bandgap
2. Changed base address to ulong
3. Changed to udev to dev to maintain consistency
4. minor format changescommon/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.ccommon/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" helpconfigs/dra7xx_evm_defconfig +0
-0configs/dra7xx_evm_defconfig CONFIG_USB_GADGET=y · line 95
Quoted 6 lines
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=yTom,
Do you want these options to be implied so that it will take effect for
HS board as well. Or enable it in defconfig as is?
Quoted 7 lines
Quoted 3 lines
How important is it that this be enabled? Is this 100% within the SoC? Thanks!
There is an upcoming errata which requires temperature support to workaround. This errata will apply to the HS boards as well. Will send a new patch with imply added to
TARGET_DRA7XX_EVMfor these configs.
Well, can you _not_ have this support enabled, on the dra7xx family? If it must be always there, please select it. Otherwise imply is OK. Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171023/9aec87dc/attachment.sig>
PATCH v3 1/2 thermal: ti-bandgap: Add support for temperature sensor
Quoted 73 lines · Tom Rini
Quoted 72 lines · Faiz Abbas
Hi Tom,
Quoted 68 lines · Tom Rini
Quoted 55 lines · Lokesh Vutla
Quoted 54 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]>Reviewed-by Simon Glass <[email protected]>---
v3:
Added Reviewed-by commentv2:
1. Removed extra elements fromti_bandgap
2. Changed base address to ulong
3. Changed to udev to dev to maintain consistency
4. minor format changescommon/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.ccommon/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" helpconfigs/dra7xx_evm_defconfig +0
-0@@ -90,3 +90,6 @@ CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0451Quoted 8 lines
configs/dra7xx_evm_defconfig CONFIG_USB_GADGET=y · line 95
Quoted 4 lines
configs/dra7xx_evm_defconfig +3
-0CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 +CONFIG_SPL_THERMAL=y +CONFIG_DM_THERMAL=y +CONFIG_TI_DRA7_THERMAL=yTom,
Do you want these options to be implied so that it will take effect for
HS board as well. Or enable it in defconfig as is?How important is it that this be enabled? Is this 100% within the SoC? Thanks!
Quoted 8 lines
Quoted 3 lines
There is an upcoming errata which requires temperature support to workaround. This errata will apply to the HS boards as well. Will send a new patch with imply added to
TARGET_DRA7XX_EVMfor these configs.Well, can you _not_ have this support enabled, on the dra7xx family? If it must be always there, please select it. Otherwise imply is OK. Thanks!
Its not enabled in the latest v4. Have added imply in TARGET_DRA7XX_EVM and TARGET_AM57XX_EVM instead.
Thanks,
Faiz
PATCH v3 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
---
v3:
Added Reviewed-by comment.
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
PATCH v3 2/2 ARM: dts: OMAP5+: Add support for bandgap sensor in SPL
Quoted 4 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]>Reviewed-by Simon Glass <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171018/4a29915c/attachment.sig>