Message ID | 20220516122511.40062-1-f.kardame@manjaro.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [v2,1/1] arm64: dts: meson: add gpio-fan control to GS-King-X | expand |
On 16/05/2022 14:25, Furkan Kardame wrote: > GS-King-X has a single speed GPIO fan which is always-on by default. If > we add controls for the fan and a trip point, the fan stays off most of > the time, reducing background noise from the unit. > > Signed-off-by: Furkan Kardame <f.kardame@manjaro.org> > --- > .../boot/dts/amlogic/meson-g12b-gsking-x.dts | 26 +++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts > index 6c7bfacba..243410913 100644 > --- a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts > +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts > @@ -19,6 +19,15 @@ aliases { > rtc0 = &rtc; > rtc1 = &vrtc; > }; > + > + gpio_fan: gpio-fan { > + compatible = "gpio-fan"; > + gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; > + /* Using Dummy Speed */ > + gpio-fan,speed-map = <0 0 > + 1 1>; The speed-map is not correctly indented, it should be: gpio-fan,speed-map = <0 0>, <1 1>; > + #cooling-cells = <2>; > + }; This bracked is not correctly aligned > > gpio-keys-polled { > compatible = "gpio-keys-polled"; > @@ -131,3 +140,20 @@ &tdmout_a { > &tohdmitx { > status = "okay"; > }; > + > +&cpu_thermal { > + trips { > + cpu_active: cpu-active > + temperature = <60000>; /* millicelsius */ > + hysteresis = <2000>; /* millicelsius */ > + type = "active"; > + }; > + }; > + > + cooling-maps { > + map { > + trip = <&cpu_active>; > + cooling-device = <&gpio_fan 1 THERMAL_NO_LIMIT>; This should be: cooling-device = <&gpio_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + }; > +}; Thanks, Neil
Hello Neil, Thank you for reviewing it. I have sent out v3 with the following changes: * Fixed speed-map indentation, * Aligned bracket * Sorted cpu_thermal node in alphabetical order. * Changed cooling-device * Increased temperature to 70°C I hope that is fine. On Friday 10 June 2022 09:42:02 (+03:00), Neil Armstrong wrote: > On 16/05/2022 14:25, Furkan Kardame wrote: > > GS-King-X has a single speed GPIO fan which is always-on by default. If > > we add controls for the fan and a trip point, the fan stays off most of > > the time, reducing background noise from the unit. > > Signed-off-by: Furkan Kardame <f.kardame@manjaro.org> > > --- > > .../boot/dts/amlogic/meson-g12b-gsking-x.dts | 26 +++++++++++++++++++ > > 1 file changed, 26 insertions(+) > > diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts > > index 6c7bfacba..243410913 100644 > > --- a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts > > +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts > > @@ -19,6 +19,15 @@ aliases { > > rtc0 = &rtc; > > rtc1 = &vrtc; > > }; > > + > > + gpio_fan: gpio-fan { > > + compatible = "gpio-fan"; > > + gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; > > + /* Using Dummy Speed */ > > + gpio-fan,speed-map = <0 0 > > + 1 1>; > > The speed-map is not correctly indented, it should be: > > gpio-fan,speed-map = <0 0>, <1 1>; > > > + #cooling-cells = <2>; > > + }; > > This bracked is not correctly aligned > > > gpio-keys-polled { > > compatible = "gpio-keys-polled"; > > @@ -131,3 +140,20 @@ &tdmout_a { > > &tohdmitx { > > status = "okay"; > > }; > > + > > +&cpu_thermal { > > + trips { > > + cpu_active: cpu-active > > + temperature = <60000>; /* millicelsius */ > > + hysteresis = <2000>; /* millicelsius */ > > + type = "active"; > > + }; > > + }; > > + > > + cooling-maps { > > + map { > > + trip = <&cpu_active>; > > + cooling-device = <&gpio_fan 1 THERMAL_NO_LIMIT>; > > This should be: cooling-device = <&gpio_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > > > + }; > > + }; > > +}; > > Thanks, > Neil >
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts index 6c7bfacba..243410913 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts @@ -19,6 +19,15 @@ aliases { rtc0 = &rtc; rtc1 = &vrtc; }; + + gpio_fan: gpio-fan { + compatible = "gpio-fan"; + gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; + /* Using Dummy Speed */ + gpio-fan,speed-map = <0 0 + 1 1>; + #cooling-cells = <2>; + }; gpio-keys-polled { compatible = "gpio-keys-polled"; @@ -131,3 +140,20 @@ &tdmout_a { &tohdmitx { status = "okay"; }; + +&cpu_thermal { + trips { + cpu_active: cpu-active + temperature = <60000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "active"; + }; + }; + + cooling-maps { + map { + trip = <&cpu_active>; + cooling-device = <&gpio_fan 1 THERMAL_NO_LIMIT>; + }; + }; +};
GS-King-X has a single speed GPIO fan which is always-on by default. If we add controls for the fan and a trip point, the fan stays off most of the time, reducing background noise from the unit. Signed-off-by: Furkan Kardame <f.kardame@manjaro.org> --- .../boot/dts/amlogic/meson-g12b-gsking-x.dts | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+)