Commit 7f2958e8 authored by Emil Renner Berthing's avatar Emil Renner Berthing Committed by Guenter Roeck
Browse files

hwmon: (sfctemp) Add StarFive JH71x0 temperature sensor



Add driver for the StarFive JH71x0 temperature sensor. You
can enable/disable it and read temperature in milli Celcius
through sysfs.

Signed-off-by: default avatarEmil Renner Berthing <kernel@esmil.dk>
Co-developed-by: default avatarSamin Guo <samin.guo@starfivetech.com>
Signed-off-by: default avatarSamin Guo <samin.guo@starfivetech.com>
Signed-off-by: default avatarHal Feng <hal.feng@starfivetech.com>
Link: https://lore.kernel.org/r/20230321022644.107027-3-hal.feng@starfivetech.com


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent d16718fc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -184,6 +184,7 @@ Hardware Monitoring Kernel Drivers
   sch5627
   sch5636
   scpi-hwmon
   sfctemp
   sht15
   sht21
   sht3x
+33 −0
Original line number Diff line number Diff line
.. SPDX-License-Identifier: GPL-2.0

Kernel driver sfctemp
=====================

Supported chips:
 - StarFive JH7100
 - StarFive JH7110

Authors:
 - Emil Renner Berthing <kernel@esmil.dk>

Description
-----------

This driver adds support for reading the built-in temperature sensor on the
JH7100 and JH7110 RISC-V SoCs by StarFive Technology Co. Ltd.

``sysfs`` interface
-------------------

The temperature sensor can be enabled, disabled and queried via the standard
hwmon interface in sysfs under ``/sys/class/hwmon/hwmonX`` for some value of
``X``:

================ ==== =============================================
Name             Perm Description
================ ==== =============================================
temp1_enable     RW   Enable or disable temperature sensor.
                      Automatically enabled by the driver,
                      but may be disabled to save power.
temp1_input      RO   Temperature reading in milli-degrees Celsius.
================ ==== =============================================
+8 −0
Original line number Diff line number Diff line
@@ -18908,6 +18908,14 @@ S: Supported
F:	Documentation/networking/devlink/sfc.rst
F:	drivers/net/ethernet/sfc/
SFCTEMP HWMON DRIVER
M:	Emil Renner Berthing <kernel@esmil.dk>
L:	linux-hwmon@vger.kernel.org
S:	Maintained
F:	Documentation/devicetree/bindings/hwmon/starfive,jh71x0-temp.yaml
F:	Documentation/hwmon/sfctemp.rst
F:	drivers/hwmon/sfctemp.c
SFF/SFP/SFP+ MODULE SUPPORT
M:	Russell King <linux@armlinux.org.uk>
L:	netdev@vger.kernel.org
+10 −0
Original line number Diff line number Diff line
@@ -1929,6 +1929,16 @@ config SENSORS_STTS751
	  This driver can also be built as a module. If so, the module
	  will be called stts751.

config SENSORS_SFCTEMP
	tristate "Starfive JH71x0 temperature sensor"
	depends on ARCH_STARFIVE || COMPILE_TEST
	help
	  If you say yes here you get support for temperature sensor
	  on the Starfive JH71x0 SoCs.

	  This driver can also be built as a module.  If so, the module
	  will be called sfctemp.

config SENSORS_SMM665
	tristate "Summit Microelectronics SMM665"
	depends on I2C
+1 −0
Original line number Diff line number Diff line
@@ -181,6 +181,7 @@ obj-$(CONFIG_SENSORS_SBRMI) += sbrmi.o
obj-$(CONFIG_SENSORS_SCH56XX_COMMON)+= sch56xx-common.o
obj-$(CONFIG_SENSORS_SCH5627)	+= sch5627.o
obj-$(CONFIG_SENSORS_SCH5636)	+= sch5636.o
obj-$(CONFIG_SENSORS_SFCTEMP)	+= sfctemp.o
obj-$(CONFIG_SENSORS_SL28CPLD)	+= sl28cpld-hwmon.o
obj-$(CONFIG_SENSORS_SHT15)	+= sht15.o
obj-$(CONFIG_SENSORS_SHT21)	+= sht21.o
Loading