Skip to contentSkip to conversation

dt-bindings: thermal: add support for Raspberry Pi thermal

PATCH Superseded Rafał Miłecki 2 participants 6 messages Mar 18, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

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
new file mode 100644
index 000000000000..fbffa9291ba9
@@ -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
#1 lore raw

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
index 776b34396144..008e173ec825 100644
@@ -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
index 7adae2029355..549d81b6363c 100644
@@ -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
new file mode 100644
index 000000000000..03d52d1d1403
@@ -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
new file mode 100644
index 000000000000..5ea7f8819b7d
@@ -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
#2 lore raw

PATCH v2 1/2 dt-bindings: thermal: add support for Raspberry Pi thermal

In reply to Rafał Miłecki

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
new file mode 100644
index 000000000000..fbffa9291ba9
@@ -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
#3 lore raw

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
index 776b34396144..008e173ec825 100644
@@ -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
index 7adae2029355..549d81b6363c 100644
@@ -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
new file mode 100644
index 000000000000..2524b2ff16f6
@@ -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
new file mode 100644
index 000000000000..5ea7f8819b7d
@@ -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
#4 lore raw

PATCH 1/2 dt-bindings: thermal: add support for Raspberry Pi thermal

In reply to Rafał Miłecki
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.

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>

#5 lore raw

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.

https://www.spinics.net/lists/arm-kernel/msg566217.html

Oh my, you did a nice work there guys! Well, this patch can obviously be dropped.

Signature · 1 line
Rafa?