dt-bindings: thermal: add support for Raspberry Pi thermal
Subsystems (4)
PATCH 1/2 dt-bindings: thermal: add support for Raspberry Pi thermal
From: Rafa? Mi?ecki <[email protected]>
This commit documents binding for BCM2835 SoC thermal used in Raspberry Pi devices.
--- .../bindings/thermal/raspberrypi,bcm2835-thermal | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/raspberrypi,bcm2835-thermal
Documentation/devicetree/bindings/thermal/raspberrypi,bcm2835-thermal new file +17 -0
@@ -0,0 +1,17 @@ +* Broadcom BCM2835 SoC Raspberry Pi Thermal + +This binding describes thermal sensor that is part of BCM2835 SoC. + +Required properties: +- compatible : Must be "raspberrypi,bcm2835-thermal" +- firmware : Reference to the Raspberry Pi firmware device node, see + raspberrypi,bcm2835-firmware for details +- #thermal-sensor-cells : Should be <0> + +Example: + +thermal { + compatible = "raspberrypi,bcm2835-thermal"; + firmware = <&firmware>; + #thermal-sensor-cells = <0>; +};
Signature · 1 line
2.11.0
PATCH 2/2 thermal: broadcom: add Raspberry Pi thermal driver
From: Rafa? Mi?ecki <[email protected]>
Raspberry Pi devices use BCM283[567] SoCs with a thermal device inside. Querying it is possible using Raspberry specific firmware interface. This simple driver allows reading SoC temperature.
--- drivers/thermal/Kconfig | 5 ++ drivers/thermal/Makefile | 1 + drivers/thermal/broadcom/Kconfig | 7 +++ drivers/thermal/broadcom/Makefile | 1 + drivers/thermal/broadcom/raspberrypi-thermal.c | 85 ++++++++++++++++++++++++++ 5 files changed, 99 insertions(+) create mode 100644 drivers/thermal/broadcom/Kconfig create mode 100644 drivers/thermal/broadcom/Makefile create mode 100644 drivers/thermal/broadcom/raspberrypi-thermal.c
drivers/thermal/Kconfig +5 -0
@@ -392,6 +392,11 @@ config MTK_THERMAL Enable this option if you want to have support for thermal management controller present in Mediatek SoCs +menu "Broadcom thermal drivers" +depends on ARCH_BCM || COMPILE_TEST +source "drivers/thermal/broadcom/Kconfig" +endmenu + menu "Texas Instruments thermal drivers" depends on ARCH_HAS_BANDGAP || COMPILE_TEST depends on HAS_IOMEM
drivers/thermal/Makefile +1 -0
@@ -27,6 +27,7 @@ thermal_sys-$(CONFIG_CLOCK_THERMAL) += clock_cooling.o thermal_sys-$(CONFIG_DEVFREQ_THERMAL) += devfreq_cooling.o # platform thermal drivers +obj-y += broadcom/ obj-$(CONFIG_QCOM_SPMI_TEMP_ALARM) += qcom-spmi-temp-alarm.o obj-$(CONFIG_SPEAR_THERMAL) += spear_thermal.o obj-$(CONFIG_ROCKCHIP_THERMAL) += rockchip_thermal.o
drivers/thermal/broadcom/Kconfig new file +7 -0
@@ -0,0 +1,7 @@ +config RASPBERRYPI_THERMAL + tristate "Raspberry Pi thermal driver" + depends on ARCH_BCM2835 || COMPILE_TEST + depends on RASPBERRYPI_FIRMWARE=y + help + This enables support for the RPi power domains which can be enabled + or disabled via the RPi firmware.
drivers/thermal/broadcom/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_RASPBERRYPI_THERMAL) += raspberrypi-thermal.o
drivers/thermal/broadcom/raspberrypi-thermal.c new file +85 -0
85 lines not on this page · raw message
Signature · 1 line
2.11.0
PATCH v2 1/2 dt-bindings: thermal: add support for Raspberry Pi thermal
In reply to Rafał MiłeckiFrom: Rafa? Mi?ecki <[email protected]>
This commit documents binding for BCM2835 SoC thermal used in Raspberry Pi devices.
--- .../bindings/thermal/raspberrypi,bcm2835-thermal | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/raspberrypi,bcm2835-thermal
Documentation/devicetree/bindings/thermal/raspberrypi,bcm2835-thermal new file +17 -0
@@ -0,0 +1,17 @@ +* Broadcom BCM2835 SoC Raspberry Pi Thermal + +This binding describes thermal sensor that is part of BCM2835 SoC. + +Required properties: +- compatible : Must be "raspberrypi,bcm2835-thermal" +- firmware : Reference to the Raspberry Pi firmware device node, see + raspberrypi,bcm2835-firmware for details +- #thermal-sensor-cells : Should be <0> + +Example: + +thermal { + compatible = "raspberrypi,bcm2835-thermal"; + firmware = <&firmware>; + #thermal-sensor-cells = <0>; +};
Signature · 1 line
2.11.0
PATCH v2 2/2 thermal: broadcom: add Raspberry Pi thermal driver
From: Rafa? Mi?ecki <[email protected]>
Raspberry Pi devices use BCM283[567] SoCs with a thermal device inside. Querying it is possible using Raspberry specific firmware interface. This simple driver allows reading SoC temperature.
---
V2: Update Kconfig help message. I forgot to locally rebase & fixup before
sending, sorry.
--- drivers/thermal/Kconfig | 5 ++ drivers/thermal/Makefile | 1 + drivers/thermal/broadcom/Kconfig | 7 +++ drivers/thermal/broadcom/Makefile | 1 + drivers/thermal/broadcom/raspberrypi-thermal.c | 85 ++++++++++++++++++++++++++ 5 files changed, 99 insertions(+) create mode 100644 drivers/thermal/broadcom/Kconfig create mode 100644 drivers/thermal/broadcom/Makefile create mode 100644 drivers/thermal/broadcom/raspberrypi-thermal.c
drivers/thermal/Kconfig +5 -0
@@ -392,6 +392,11 @@ config MTK_THERMAL Enable this option if you want to have support for thermal management controller present in Mediatek SoCs +menu "Broadcom thermal drivers" +depends on ARCH_BCM || COMPILE_TEST +source "drivers/thermal/broadcom/Kconfig" +endmenu + menu "Texas Instruments thermal drivers" depends on ARCH_HAS_BANDGAP || COMPILE_TEST depends on HAS_IOMEM
drivers/thermal/Makefile +1 -0
@@ -27,6 +27,7 @@ thermal_sys-$(CONFIG_CLOCK_THERMAL) += clock_cooling.o thermal_sys-$(CONFIG_DEVFREQ_THERMAL) += devfreq_cooling.o # platform thermal drivers +obj-y += broadcom/ obj-$(CONFIG_QCOM_SPMI_TEMP_ALARM) += qcom-spmi-temp-alarm.o obj-$(CONFIG_SPEAR_THERMAL) += spear_thermal.o obj-$(CONFIG_ROCKCHIP_THERMAL) += rockchip_thermal.o
drivers/thermal/broadcom/Kconfig new file +7 -0
@@ -0,0 +1,7 @@ +config RASPBERRYPI_THERMAL + tristate "Raspberry Pi thermal driver" + depends on ARCH_BCM2835 || COMPILE_TEST + depends on RASPBERRYPI_FIRMWARE=y + help + This enables support for the RPi thermal that is part of BCM2835 SoC + and can be accessed using firmware interface.
drivers/thermal/broadcom/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_RASPBERRYPI_THERMAL) += raspberrypi-thermal.o
drivers/thermal/broadcom/raspberrypi-thermal.c new file +85 -0
85 lines not on this page · raw message
Signature · 1 line
2.11.0
PATCH 1/2 dt-bindings: thermal: add support for Raspberry Pi thermal
In reply to Rafał MiłeckiQuoted 4 lines · Rafa? Mi?ecki
From: Rafa? Mi?ecki <[email protected]>
This commit documents binding for BCM2835 SoC thermal used in Raspberry Pi devices.
There's already a native (non-firmware) thermal driver just waiting for the maintainer to merge it.
https://www.spinics.net/lists/arm-kernel/msg566217.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170317/d9d6890a/attachment.sig>
PATCH 1/2 dt-bindings: thermal: add support for Raspberry Pi thermal
Quoted 11 lines · Eric Anholt
Quoted 4 lines · Rafa? Mi?ecki
From: Rafa? Mi?ecki <[email protected]>
This commit documents binding for BCM2835 SoC thermal used in Raspberry Pi devices.
There's already a native (non-firmware) thermal driver just waiting for the maintainer to merge it.
Oh my, you did a nice work there guys! Well, this patch can obviously be dropped.
Signature · 1 line
Rafa?