ODROID-COMMON: pwm-fan device enabled for active cooling.

Change-Id: I1dcdfa4c22ab72cd24b1be870727420683073f9a
Signed-off-by: Kevin Kim <ckkim@hardkernel.com>
This commit is contained in:
Kevin Kim
2019-03-13 16:02:11 +09:00
committed by Chris
parent 921958bc70
commit e96f70698d
4 changed files with 55 additions and 8 deletions

View File

@@ -252,6 +252,49 @@
pwm-gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>;
status = "okay";
};
pwmfan:pwm-fan {
compatible = "pwm-fan";
pwms = <&pwmgpio 0 40000 PWM_POLARITY_INVERTED>;
cooling-min-state = <0>;
cooling-max-state = <3>;
#cooling-cells = <2>;
cooling-levels = <0 120 170 220>;
};
};
&soc_thermal {
trips {
fan_0: trip-point@4 {
temperature = <45000>;
hysteresis = <5000>;
type = "active";
};
fan_1: trip-point@5 {
temperature = <55000>;
hysteresis = <5000>;
type = "active";
};
fan_2: trip-point@6 {
temperature = <60000>;
hysteresis = <5000>;
type = "active";
};
};
cooling-maps {
fan_cooling_map0 {
trip = <&fan_0>;
cooling-device = <&pwmfan 0 1>;
};
fan_cooling_map1 {
trip = <&fan_1>;
cooling-device = <&pwmfan 1 2>;
};
fan_cooling_map2 {
trip = <&fan_2>;
cooling-device = <&pwmfan 2 3>;
};
};
};
&ethmac {

View File

@@ -2704,7 +2704,7 @@ CONFIG_HWMON=y
# CONFIG_SENSORS_NCT7904 is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_PMBUS is not set
# CONFIG_SENSORS_PWM_FAN is not set
CONFIG_SENSORS_PWM_FAN=y
# CONFIG_SENSORS_SHT15 is not set
# CONFIG_SENSORS_SHT21 is not set
# CONFIG_SENSORS_SHT3x is not set
@@ -2752,9 +2752,9 @@ CONFIG_THERMAL_WRITABLE_TRIPS=y
# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set
# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set
CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR=y
# CONFIG_THERMAL_GOV_FAIR_SHARE is not set
# CONFIG_THERMAL_GOV_STEP_WISE is not set
# CONFIG_THERMAL_GOV_BANG_BANG is not set
CONFIG_THERMAL_GOV_FAIR_SHARE=y
CONFIG_THERMAL_GOV_STEP_WISE=y
CONFIG_THERMAL_GOV_BANG_BANG=y
CONFIG_THERMAL_GOV_USER_SPACE=y
CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y
CONFIG_CPU_THERMAL=y

View File

@@ -2714,7 +2714,7 @@ CONFIG_HWMON=y
# CONFIG_SENSORS_NCT7904 is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_PMBUS is not set
# CONFIG_SENSORS_PWM_FAN is not set
CONFIG_SENSORS_PWM_FAN=y
# CONFIG_SENSORS_SHT15 is not set
# CONFIG_SENSORS_SHT21 is not set
# CONFIG_SENSORS_SHT3x is not set
@@ -2762,9 +2762,9 @@ CONFIG_THERMAL_WRITABLE_TRIPS=y
# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set
# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set
CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR=y
# CONFIG_THERMAL_GOV_FAIR_SHARE is not set
# CONFIG_THERMAL_GOV_STEP_WISE is not set
# CONFIG_THERMAL_GOV_BANG_BANG is not set
CONFIG_THERMAL_GOV_FAIR_SHARE=y
CONFIG_THERMAL_GOV_STEP_WISE=y
CONFIG_THERMAL_GOV_BANG_BANG=y
CONFIG_THERMAL_GOV_USER_SPACE=y
CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y
CONFIG_CPU_THERMAL=y

View File

@@ -661,7 +661,11 @@ static int meson_map_dt_data(struct platform_device *pdev)
data->tsensor_set_emulation = r1p1_tsensor_set_emulation;
data->tsensor_clear_irqs = r1p1_tsensor_clear_irqs;
data->tsensor_update_irqs = r1p1_tsensor_update_irqs;
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
data->ntrip = 7;
#else
data->ntrip = 4;
#endif
break;
default:
dev_err(&pdev->dev, "Platform not supported\n");