thermal: add brcmstb AVS TMON driver
Subsystems (5)
v3 cover thermal: add brcmstb AVS TMON driver
From: Markus Mayer <[email protected]>
This series adds the brcmstb AVS TMON driver.
The driver was originally written by Brian Norris.
v1 of this series can be found at https://lkml.org/lkml/2017/6/5/921
v2 of this series can be found at https://lkml.org/lkml/2017/7/21/585
Changes since v2:
- replaced calls to pr_debug() with calls to dev_dbg() [PATCH 2/4 only]
- all other patches are unchanged from v2
Changes since v1:
- Fixed wording in binding document
- Fixed lincensing to consistently mention GPL v2
- Use thermal_zone_get_slope() and thermal_zone_get_offset()
- Some minor clean-ups
Brian Norris (2):
Documentation: devicetree: add binding for Broadcom STB AVS TMON
thermal: add brcmstb AVS TMON driver
Markus Mayer (2):
ARM: multi_v7_defconfig: add CONFIG_BRCMSTB_THERMAL
arm64: defconfig: add CONFIG_BRCMSTB_THERMAL
.../devicetree/bindings/thermal/brcm,avs-tmon.txt | 20 ++ MAINTAINERS | 8 + arch/arm/configs/multi_v7_defconfig | 1 + arch/arm64/configs/defconfig | 1 + drivers/thermal/Kconfig | 2 +- drivers/thermal/broadcom/Kconfig | 7 + drivers/thermal/broadcom/Makefile | 1 + drivers/thermal/broadcom/brcmstb_thermal.c | 386 +++++++++++++++++++++ 8 files changed, 425 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt create mode 100644 drivers/thermal/broadcom/brcmstb_thermal.c
Signature · 1 line
2.7.4
PATCH v3 1/4 Documentation: devicetree: add binding for Broadcom STB AVS TMON
From: Brian Norris <[email protected]>
Add binding for Broadcom STB thermal.
--- .../devicetree/bindings/thermal/brcm,avs-tmon.txt | 20 ++++++++++++++++++++ MAINTAINERS | 8 ++++++++ 2 files changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt
Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt new file +20 -0
@@ -0,0 +1,20 @@ +* Broadcom STB thermal management + +Thermal management core, provided by the AVS TMON hardware block. + +Required properties: +- compatible: must be "brcm,avs-tmon" and/or "brcm,avs-tmon-bcm7445" +- reg: address range for the AVS TMON registers +- interrupts: temperature monitor interrupt, for high/low threshold triggers +- interrupt-names: should be "tmon" +- interrupt-parent: the parent interrupt controller + +Example: + + thermal at f04d1500 { + compatible = "brcm,avs-tmon-bcm7445", "brcm,avs-tmon"; + reg = <0xf04d1500 0x28>; + interrupts = <0x6>; + interrupt-names = "tmon"; + interrupt-parent = <&avs_host_l2_intc>; + };
MAINTAINERS +8 -0
@@ -2928,6 +2928,14 @@ S: Maintained F: Documentation/devicetree/bindings/cpufreq/brcm,stb-avs-cpu-freq.txt F: drivers/cpufreq/brcmstb* +BROADCOM STB AVS TMON DRIVER +M: Markus Mayer <[email protected]> +M: bcm-kernel-feedback-list at broadcom.com +L: linux-pm at vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt +F: drivers/thermal/broadcom/brcmstb* + BROADCOM SPECIFIC AMBA DRIVER (BCMA) M: Rafa? Mi?ecki <[email protected]> L: linux-wireless at vger.kernel.org
Signature · 1 line
2.7.4
Zhang Rui
reviewerRe: [PATCH v3 1/4] Documentation: devicetree: add binding for Broadcom STB AVS TMON
Quoted 6 lines · Markus Mayer
From: Brian Norris <[email protected]>
Add binding for Broadcom STB thermal.
Signed-off-by Brian Norris <[email protected]>Signed-off-by Markus Mayer <[email protected]>
$ file v3-1-4-Documentation-devicetree-add-binding-for-Broadcom-STB- AVS-TMON.patch? unified diff output, UTF-8 Unicode text
BTW, can you please rebase this patch set on top of v4.13-rc3? At least there are some conflicts in MAINTAINER file, introduced in -rc2.
thanks,
rui
Quoted 59 lines
---
?.../devicetree/bindings/thermal/brcm,avs-tmon.txt????| 20
++++++++++++++++++++
?MAINTAINERS??????????????????????????????????????????|??8 ++++++++ ?2 files changed, 28 insertions(+)
?create mode 100644Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt(quoted diff) +0
-0tmon.txt b/Documentation/devicetree/bindings/thermal/brcm,avs- tmon.txt
new file mode 100644
index 0000000..9d43553Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt new file +8
-0@@ -0,0 +1,20 @@ +* Broadcom STB thermal management + +Thermal management core, provided by the AVS TMON hardware block. + +Required properties: +- compatible: must be "brcm,avs-tmon" and/or "brcm,avs-tmon-bcm7445" +- reg: address range for the AVS TMON registers +- interrupts: temperature monitor interrupt, for high/low thresholdtriggers
+- interrupt-names: should be "tmon" +- interrupt-parent: the parent interrupt controllerDocumentation/devicetree/bindings/thermal/brcm,avs-tmon.txt new file +5
-0+ +Example: + + thermal at f04d1500 { + compatible = "brcm,avs-tmon-bcm7445", "brcm,avs-tmon";
Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt new file +5
-0+ reg = <0xf04d1500 0x28>; + interrupts = <0x6>; + interrupt-names = "tmon"; + interrupt-parent = <&avs_host_l2_intc>; + };MAINTAINERS +0
-0@@ -2928,6 +2928,14 @@ S: Maintained?F:
Documentation/devicetree/bindings/cpufreq/brcm,stb-avs-
cpu-freq.txt
?F:drivers/cpufreq/brcmstb*
?MAINTAINERS +6
-0+BROADCOM STB AVS TMON DRIVER +M: Markus Mayer <[email protected]> +M: bcm-kernel-feedback-list at broadcom.com +L: linux-pm at vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt
MAINTAINERS +2
-0+F: drivers/thermal/broadcom/brcmstb* +?BROADCOM SPECIFIC AMBA DRIVER (BCMA)
?M: Rafa? Mi?ecki <[email protected]>
?L: linux-wireless at vger.kernel.org
Re: [PATCH v3 1/4] Documentation: devicetree: add binding for Broadcom STB AVS TMON
Quoted 11 lines · Zhang Rui
Quoted 6 lines · Markus Mayer
From: Brian Norris <[email protected]>
Add binding for Broadcom STB thermal.
Signed-off-by Brian Norris <[email protected]>Signed-off-by Markus Mayer <[email protected]>$ file v3-1-4-Documentation-devicetree-add-binding-for-Broadcom-STB- AVS-TMON.patch unified diff output, UTF-8 Unicode text
It's UTF-8 encoded, because of Rafa?'s name in the recipient list.
Quoted 3 lines
BTW, can you please rebase this patch set on top of v4.13-rc3? At least there are some conflicts in MAINTAINER file, introduced in -rc2.
I'll send the rebased series shortly.
Quoted 61 lines
thanks,
ruiQuoted 59 lines
--- .../devicetree/bindings/thermal/brcm,avs-tmon.txt | 20 ++++++++++++++++++++ MAINTAINERS | 8 ++++++++ 2 files changed, 28 insertions(+) create mode 100644
Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt(quoted diff) +0
-0tmon.txt b/Documentation/devicetree/bindings/thermal/brcm,avs- tmon.txt
new file mode 100644
index 0000000..9d43553Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt new file +8
-0@@ -0,0 +1,20 @@ +* Broadcom STB thermal management + +Thermal management core, provided by the AVS TMON hardware block. + +Required properties: +- compatible: must be "brcm,avs-tmon" and/or "brcm,avs-tmon-bcm7445" +- reg: address range for the AVS TMON registers +- interrupts: temperature monitor interrupt, for high/low thresholdtriggers
+- interrupt-names: should be "tmon" +- interrupt-parent: the parent interrupt controllerDocumentation/devicetree/bindings/thermal/brcm,avs-tmon.txt new file +5
-0+ +Example: + + thermal at f04d1500 { + compatible = "brcm,avs-tmon-bcm7445", "brcm,avs-tmon";
Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt new file +5
-0+ reg = <0xf04d1500 0x28>; + interrupts = <0x6>; + interrupt-names = "tmon"; + interrupt-parent = <&avs_host_l2_intc>; + };MAINTAINERS +0
-0@@ -2928,6 +2928,14 @@ S: Maintained F: Documentation/devicetree/bindings/cpufreq/brcm,stb-avs-cpu-freq.txt
F:drivers/cpufreq/brcmstb*MAINTAINERS +6
-0+BROADCOM STB AVS TMON DRIVER +M: Markus Mayer <[email protected]> +M: bcm-kernel-feedback-list at broadcom.com +L: linux-pm at vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt
MAINTAINERS +2
-0+F: drivers/thermal/broadcom/brcmstb* + BROADCOM SPECIFIC AMBA DRIVER (BCMA) M: Rafa? Mi?ecki <[email protected]> L: linux-wireless at vger.kernel.org
PATCH v3 2/4 thermal: add brcmstb AVS TMON driver
In reply to Markus MayerFrom: Brian Norris <[email protected]>
The AVS TMON core provides temperature readings, a pair of configurable high- and low-temperature threshold interrupts, and an emergency over-temperature chip reset. The driver utilizes the first two to provide temperature readings and high-temperature notifications to applications. The over-temperature reset is not exposed to applications; this reset threshold is critical to the system and should be set with care within the bootloader.
Applications may choose to utilize the notification mechanism, the temperature reading mechanism (e.g., through polling), or both.
--- drivers/thermal/Kconfig | 2 +- drivers/thermal/broadcom/Kconfig | 7 + drivers/thermal/broadcom/Makefile | 1 + drivers/thermal/broadcom/brcmstb_thermal.c | 386 +++++++++++++++++++++++++++++ 4 files changed, 395 insertions(+), 1 deletion(-) create mode 100644 drivers/thermal/broadcom/brcmstb_thermal.c
drivers/thermal/Kconfig +1 -1
@@ -408,7 +408,7 @@ config MTK_THERMAL controller present in Mediatek SoCs menu "Broadcom thermal drivers" -depends on ARCH_BCM || COMPILE_TEST +depends on ARCH_BCM || ARCH_BRCMSTB || COMPILE_TEST source "drivers/thermal/broadcom/Kconfig" endmenu
drivers/thermal/broadcom/Kconfig +7 -0
@@ -6,6 +6,13 @@ config BCM2835_THERMAL help Support for thermal sensors on Broadcom bcm2835 SoCs. +config BRCMSTB_THERMAL + tristate "Broadcom STB AVS TMON thermal driver" + depends on ARCH_BRCMSTB || COMPILE_TEST + help + Enable this driver if you have a Broadcom STB SoC and would like + thermal framework support. + config BCM_NS_THERMAL tristate "Northstar thermal driver" depends on ARCH_BCM_IPROC || COMPILE_TEST
drivers/thermal/broadcom/Makefile +1 -0
@@ -1,2 +1,3 @@ obj-$(CONFIG_BCM2835_THERMAL) += bcm2835_thermal.o +obj-$(CONFIG_BRCMSTB_THERMAL) += brcmstb_thermal.o obj-$(CONFIG_BCM_NS_THERMAL) += ns-thermal.o
drivers/thermal/broadcom/brcmstb_thermal.c new file +386 -0
386 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v3 3/4 ARM: multi_v7_defconfig: add CONFIG_BRCMSTB_THERMAL
In reply to Markus MayerFrom: Markus Mayer <[email protected]>
Turn on CONFIG_BRCMSTB_THERMAL as module.
--- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/configs/multi_v7_defconfig +1 -0
@@ -455,6 +455,7 @@ CONFIG_SENSORS_NTC_THERMISTOR=m CONFIG_SENSORS_PWM_FAN=m CONFIG_SENSORS_INA2XX=m CONFIG_CPU_THERMAL=y +CONFIG_BRCMSTB_THERMAL=m CONFIG_ROCKCHIP_THERMAL=y CONFIG_RCAR_THERMAL=y CONFIG_ARMADA_THERMAL=y
Signature · 1 line
2.7.4
PATCH v3 4/4 arm64: defconfig: add CONFIG_BRCMSTB_THERMAL
In reply to Markus MayerFrom: Markus Mayer <[email protected]>
Turn on CONFIG_BRCMSTB_THERMAL as module.
--- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
@@ -304,6 +304,7 @@ CONFIG_SENSORS_INA2XX=m CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y CONFIG_CPU_THERMAL=y CONFIG_THERMAL_EMULATION=y +CONFIG_BRCMSTB_THERMAL=m CONFIG_EXYNOS_THERMAL=y CONFIG_ROCKCHIP_THERMAL=m CONFIG_WATCHDOG=y
Signature · 1 line
2.7.4
Quoted 8 lines · Markus Mayer
From: Markus Mayer <[email protected]>
This series adds the brcmstb AVS TMON driver.
The driver was originally written by Brian Norris.
v1 of this series can be found at https://lkml.org/lkml/2017/6/5/921
v2 of this series can be found at https://lkml.org/lkml/2017/7/21/585
FWIW, this looks good to me, Eduardo, Rui, can we get this moving?
Quoted 31 lines
Changes since v2:
- replaced calls topr_debug()with calls todev_dbg()[PATCH 2/4 only]
- all other patches are unchanged from v2Changes since v1:
- Fixed wording in binding document
- Fixed lincensing to consistently mention GPL v2
- Usethermal_zone_get_slope()andthermal_zone_get_offset()
- Some minor clean-upsBrian Norris (2):
Documentation: devicetree: add binding for Broadcom STB AVS TMON
thermal: add brcmstb AVS TMON driverMarkus Mayer (2):
ARM:multi_v7_defconfig: addCONFIG_BRCMSTB_THERMAL
arm64: defconfig: addCONFIG_BRCMSTB_THERMAL.../devicetree/bindings/thermal/brcm,avs-tmon.txt | 20 ++ MAINTAINERS | 8 + arch/arm/configs/multi_v7_defconfig | 1 + arch/arm64/configs/defconfig | 1 + drivers/thermal/Kconfig | 2 +- drivers/thermal/broadcom/Kconfig | 7 + drivers/thermal/broadcom/Makefile | 1 + drivers/thermal/broadcom/brcmstb_thermal.c | 386 +++++++++++++++++++++ 8 files changed, 425 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt create mode 100644 drivers/thermal/broadcom/brcmstb_thermal.c
Signature · 1 line
Florian
Zhang Rui
reviewerQuoted 6 lines · Florian Fainelli
Quoted 5 lines · Markus Mayer
From: Markus Mayer <[email protected]>
This series adds the brcmstb AVS TMON driver.
Quoted 8 lines
Quoted 6 lines
The driver was originally written by Brian Norris.
v1 of this series can be found at https://lkml.org/lkml/2017/6/5/92
1
v2 of this series can be found at https://lkml.org/lkml/2017/7/21/5
85FWIW, this looks good to me, Eduardo, Rui, can we get this moving?
Usually, Eduardo will take the arm soc thermal patches. But he is not able to take it this time as he is really busy.
To me, the thermal framework related code looks good, and I will queue it for next merge window, although I don't have the knowledge about the hardware details.
thanks,
rui
Quoted 36 lines
Quoted 35 lines
Changes since v2:
- replaced calls topr_debug()with calls todev_dbg()[PATCH 2/4 only]
- all other patches are unchanged from v2Changes since v1:
- Fixed wording in binding document
- Fixed lincensing to consistently mention GPL v2
- Usethermal_zone_get_slope()andthermal_zone_get_offset()
- Some minor clean-upsBrian Norris (2):
? Documentation: devicetree: add binding for Broadcom STB AVS TMON ? thermal: add brcmstb AVS TMON driverMarkus Mayer (2):
? ARM:multi_v7_defconfig: addCONFIG_BRCMSTB_THERMAL? arm64: defconfig: addCONFIG_BRCMSTB_THERMAL?.../devicetree/bindings/thermal/brcm,avs-tmon.txt??|??20 ++ ?MAINTAINERS????????????????????????????????????????|???8 + ?arch/arm/configs/multi_v7_defconfig????????????????|???1 + ?arch/arm64/configs/defconfig???????????????????????|???1 + ?drivers/thermal/Kconfig????????????????????????????|???2 +- ?drivers/thermal/broadcom/Kconfig???????????????????|???7 + ?drivers/thermal/broadcom/Makefile??????????????????|???1 + ?drivers/thermal/broadcom/brcmstb_thermal.c?????????| 386+++++++++++++++++++++
?8 files changed, 425 insertions(+), 1 deletion(-) ?create mode 100644Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt?create mode 100644drivers/thermal/broadcom/brcmstb_thermal.c