diff options
author | Emmanuel Vadot <manu@FreeBSD.org> | 2020-06-05 19:28:32 +0000 |
---|---|---|
committer | Emmanuel Vadot <manu@FreeBSD.org> | 2020-06-05 19:28:32 +0000 |
commit | 5df7ea339a6ba20ce6c2a001807a43a7cc1e9fe8 (patch) | |
tree | afa0718f88637c22a2d4a25cf54e32b0e701b338 /src/arm/gemini-dlink-dir-685.dts | |
parent | 937eaf8bbdcf7e2cd3231b71940f9221e6857210 (diff) | |
download | src-6f9dcba05c355472099964ba85e1cb27972464a4.tar.gz src-6f9dcba05c355472099964ba85e1cb27972464a4.zip |
Import DTS files from Linux 5.7vendor/device-tree/5.7
Diffstat (limited to 'src/arm/gemini-dlink-dir-685.dts')
-rw-r--r-- | src/arm/gemini-dlink-dir-685.dts | 50 |
1 files changed, 46 insertions, 4 deletions
diff --git a/src/arm/gemini-dlink-dir-685.dts b/src/arm/gemini-dlink-dir-685.dts index e2030ba16512..cc39289e99dd 100644 --- a/src/arm/gemini-dlink-dir-685.dts +++ b/src/arm/gemini-dlink-dir-685.dts @@ -119,13 +119,11 @@ /* * This is a Sunon Maglev GM0502PFV2-8 cooling fan @10000 RPM. - * Since the platform has no temperature sensor, this is controlled - * from userspace by using the hard disks S.M.A.R.T. temperature * sensor. It is turned on when the temperature exceeds 46 degrees * and turned off when the temperatures goes below 41 degrees * (celsius). */ - gpio-fan { + fan0: gpio-fan { compatible = "gpio-fan"; /* Collides with IDE */ gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; @@ -133,6 +131,40 @@ #cooling-cells = <2>; }; + thermal-zones { + chassis-thermal { + /* Poll every 20 seconds */ + polling-delay = <20000>; + /* Poll every 2nd second when cooling */ + polling-delay-passive = <2000>; + /* Use the thermal sensor in the hard drive */ + thermal-sensors = <&drive0>; + + /* Tripping points from the fan.script in the rootfs */ + trips { + alert: chassis-alert { + /* At 43 degrees turn on the fan */ + temperature = <43000>; + hysteresis = <3000>; + type = "active"; + }; + crit: chassis-crit { + /* Just shut down at 60 degrees */ + temperature = <60000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&alert>; + cooling-device = <&fan0 1 1>; + }; + }; + }; + }; + /* * The touchpad input is connected to a GPIO bit-banged * I2C bus. @@ -443,8 +475,18 @@ }; }; - ata@63000000 { + ide@63000000 { status = "okay"; + + /* + * This drive may have a temperature sensor with a + * thermal zone we can use for thermal control of the + * chassis temperature using the fan. + */ + drive0: ide-port@0 { + reg = <0>; + #thermal-sensor-cells = <0>; + }; }; display-controller@6a000000 { |