armbian_build/patch/kernel/archive/meson64-6.6/overlay/meson-g12-pwm-gpiox-5-fan.dts
c0rnelius e73c0b6514
meson64: overlays: additions and modifications (#6175)
PWM controllable fan (G12A/B/SM1)

Commit provides two new overlays. One for the BananaPi CM4IO
Baseboard "GPIOH_5" and another for general use "GPIOX_5".

CM4IO HEADER PINS: 5V "4"; GND "6"; PWM "7"

On other units the location of the PWM HEADER PIN may vary,
so users will need to either review the wiki or schematic
of said unit.

Fan used in testing:
https://a.co/d/hasnLtj

Modifications: M2S/M5 RTL8822CS
Modded the overlays to be specific to the unit they were made
to be used on.

Tested-on: BananaPi BPI-CM4IO Baseboard with BPI-CM4 Module

Signed-off-by: Patrick Yavitz <pyavitz@xxxxx.com>
Co-authored-by: Patrick Yavitz <pyavitz@xxxxx.com>
2024-01-18 14:31:43 -05:00

44 lines
814 B
Plaintext

/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/gpio/meson-g12a-gpio.h>
#include <dt-bindings/thermal/thermal.h>
/ {
compatible = "amlogic,a311d", "amlogic,g12a", "amlogic,g12b", "amlogic,sm1";
fragment@0 {
target-path = "/";
__overlay__ {
fan: gpio-fan {
compatible = "gpio-fan";
gpios = <&gpio GPIOX_5 GPIO_ACTIVE_HIGH>;
gpio-fan,speed-map = <0 0>, <5000 1>;
#cooling-cells = <2>;
};
};
};
fragment@1 {
target = <&cpu_thermal>;
polling-delay = <2000>;
__overlay__ {
trips {
cpu_active: cpu-active {
temperature = <55000>;
hysteresis = <10000>;
type = "active";
};
};
cooling-maps {
map {
trip = <&cpu_active>;
cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
};
};
};