hwmon: add support for GMT G751 chip in lm75 driver
PATCH 1/1 hwmon: add support for GMT G751 chip in lm75 driver
This was tested on a NETGEAR ReadyNAS 2120 device (Marvell Armada XP based board, via DT).
---
Hi Guenter,
As a side note, I removed the hunk that was present in previous patch to add gmt to the list of DT vendor prefixes because I noticed someone had taken care: https://lkml.org/lkml/2013/9/12/365
For the records, here is what I get on my NAS with the attached patch:
root@thin:/sys# sensors g762-i2c-0-3e Adapter: mv64xxx_i2c adapter fan1: 5461 RPM (div = 1)
g762-i2c-0-48
Adapter: mv64xxx_i2c adapter
fan1: 5461 RPM (div = 1)
g762-i2c-0-49
Adapter: mv64xxx_i2c adapter
fan1: 5461 RPM (div = 1)
g751-i2c-0-4c
Adapter: mv64xxx_i2c adapter
temp1: +30.5°C (high = +80.0°C, hyst = +75.0°C)
armada_thermal-virtual-0
Adapter: Virtual device
temp1: +34.2°C
root@thin:/sys/bus/i2c/drivers/lm75/0-004c# ls driver modalias subsystem temp1_max uevent hwmon name temp1_input temp1_max_hyst
root@thin:/sys/bus/i2c/drivers/lm75/0-004c# dmesg | grep lm [ 120.960471] lm75 0-004c: hwmon3: sensor 'g751'
just by adding the following to the .dts:
g751: g751@4c {
compatible = "gmt,g751";
reg = <0x4c>;
};Do not hesitate to tell me if I missed something.
Cheers,
a+
Documentation/devicetree/bindings/i2c/trivial-devices.txt | 1 + drivers/hwmon/Kconfig | 1 + drivers/hwmon/lm75.c | 3 +++ 3 files changed, 5 insertions(+)
Documentation/devicetree/bindings/i2c/trivial-devices.txt +1 -0
@@ -35,6 +35,7 @@ fsl,mc13892 MC13892: Power Management Integrated Circuit (PMIC) for i.MX35/51 fsl,mma8450 MMA8450Q: Xtrinsic Low-power, 3-axis Xtrinsic Accelerometer fsl,mpr121 MPR121: Proximity Capacitive Touch Sensor Controller fsl,sgtl5000 SGTL5000: Ultra Low-Power Audio Codec +gmt,g751 G751: Digital Temperature Sensor and Thermal Watchdog with Two-Wire Interface infineon,slb9635tt Infineon SLB9635 (Soft-) I2C TPM (old protocol, max 100khz) infineon,slb9645tt Infineon SLB9645 I2C TPM (new protocol, max 400khz) maxim,ds1050 5 Bit Programmable, Pulse-Width Modulator
drivers/hwmon/Kconfig +1 -0
@@ -656,6 +656,7 @@ config SENSORS_LM75 - Analog Devices ADT75 - Dallas Semiconductor DS75, DS1775 and DS7505 + - Global Mixed-mode Technology (GMT) G751 - Maxim MAX6625 and MAX6626 - Microchip MCP980x - National Semiconductor LM75, LM75A
drivers/hwmon/lm75.c +3 -0
@@ -39,6 +39,7 @@ enum lm75_type { /* keep sorted in alphabetical order */ ds1775, ds75, ds7505, + g751, lm75, lm75a, max6625,
@@ -208,6 +209,7 @@ lm75_probe(struct i2c_client *client, const struct i2c_device_id *id) data->resolution =12 ; data->sample_time =HZ /4 ;break ; +case g751:case lm75:case lm75a: data->resolution =9 ;
@@ -296,6 +298,7 @@ static const struct i2c_device_id lm75_ids[] = { { "ds1775", ds1775, }, { "ds75", ds75, }, { "ds7505", ds7505, }, + { "g751", g751, }, { "lm75", lm75, }, { "lm75a", lm75a, }, { "max6625", max6625, },
Signature · 1 line
1.8.4.rc3
Guenter Roeck
maintainerQuoted 5 lines · Arnaud Ebalard
This was tested on a NETGEAR ReadyNAS 2120 device (Marvell Armada XP based board, via DT).
Signed-off-by Arnaud Ebalard <[email protected]>
Looks good. I'll apply it to my -next branch. Since I already sent my pull request to Linus, this will only go in after -rc1, which I hope should be ok (unless Jean wants to pick it up for his pull request).
Quoted 14 lines
---
Hi Guenter,As a side note, I removed the hunk that was present in previous patch to add gmt to the list of DT vendor prefixes because I noticed someone had taken care: https://lkml.org/lkml/2013/9/12/365
For the records, here is what I get on my NAS with the attached patch:
root@thin:/sys# sensors g762-i2c-0-3e Adapter: mv64xxx_i2c adapter fan1: 5461 RPM (div = 1)
Quoted 8 lines
g762-i2c-0-48
Adapter:mv64xxx_i2cadapter
fan1: 5461 RPM (div = 1)g762-i2c-0-49
Adapter:mv64xxx_i2cadapter
fan1: 5461 RPM (div = 1)
Those rpms are pretty high. Are the fans all really running that fast ?
Thanks,
Guenter
Hi Guenter,
Quoted 10 lines · Guenter Roeck
Quoted 5 lines · Arnaud Ebalard
This was tested on a NETGEAR ReadyNAS 2120 device (Marvell Armada XP based board, via DT).
Signed-off-by Arnaud Ebalard <[email protected]>Looks good. I'll apply it to my -next branch. Since I already sent my pull request to Linus, this will only go in after -rc1, which I hope should be ok (unless Jean wants to pick it up for his pull request).
Perfect, thanks.
Quoted 18 lines
Quoted 18 lines
---
Hi Guenter,As a side note, I removed the hunk that was present in previous patch to add gmt to the list of DT vendor prefixes because I noticed someone had taken care: https://lkml.org/lkml/2013/9/12/365
For the records, here is what I get on my NAS with the attached patch:
root@thin:/sys# sensors g762-i2c-0-3e Adapter: mv64xxx_i2c adapter fan1: 5461 RPM (div = 1)g762-i2c-0-48
Adapter:mv64xxx_i2cadapter
fan1: 5461 RPM (div = 1)
Quoted 5 lines
Quoted 4 lines
g762-i2c-0-49
Adapter:mv64xxx_i2cadapter
fan1: 5461 RPM (div = 1)Those rpms are pretty high. Are the fans all really running that fast ?
Unlike the fans on NETGEAR ReadyNAS 102 and 104 which are Protechnic MGT9212YB-025 92mmx92mm running at 3200 RPM max, the three fans in the RN2120 are Protechnic MGT4012XB-O20, i.e. 40mmx40mm running at 8000 RPM max. At least, this is the max RPM value I found on their website (Search Products on left side of http://www.protechnic-us.com/en/) for both devices.
When pushing one a bit, here is the max rotation speed I get:
root@thin:/sys/bus/i2c/drivers/g762/0-003e# echo 9000 > fan1_target ; \
sleep 5 ; cat fan1_input
8057which AFAICT validates current settings for G762 and fan combination. Did I miss something?
Cheers,
a+
Quoted 10 lines · Guenter Roeck
Quoted 5 lines · Arnaud Ebalard
This was tested on a NETGEAR ReadyNAS 2120 device (Marvell Armada XP based board, via DT).
Signed-off-by Arnaud Ebalard <[email protected]>Looks good. I'll apply it to my -next branch. Since I already sent my pull request to Linus, this will only go in after -rc1, which I hope should be ok (unless Jean wants to pick it up for his pull request).
No, I don't.
Signature · 1 line
Jean Delvare