realtek: wire up GPIO fan for Zyxel XS1930 switches
The switches from Zyxels XS1930 have one or two fans in the case. They might be controlled in a limited fashion. There's a single GPIO which - depending on the state - drives the fan in slow or fast mode. Wire that up as a device tree node to be able to control that in userspace. XS1930-10 and XS1930-12HP use the same GPIO while XS1930-12F moves that to one of its GPIO expanders. Also add 'kmod-hwmon-gpiofan' for all three devices to be selected by default. Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com> Link: https://github.com/openwrt/openwrt/pull/23428 Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
0c50884201
commit
161a871edd
@ -122,6 +122,8 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&fan0 { gpios = <&gpio1 35 GPIO_ACTIVE_HIGH>; };
|
||||||
|
|
||||||
&gpio0 {
|
&gpio0 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pinmux_disable_jtag>,
|
pinctrl-0 = <&pinmux_disable_jtag>,
|
||||||
|
|||||||
@ -78,6 +78,16 @@
|
|||||||
gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fan0: gpio-fan {
|
||||||
|
compatible = "gpio-fan";
|
||||||
|
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
|
||||||
|
|
||||||
|
gpio-fan,speed-map =
|
||||||
|
<3600 0>,
|
||||||
|
<9000 1>;
|
||||||
|
#cooling-cells = <2>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&spi0 {
|
&spi0 {
|
||||||
|
|||||||
@ -49,7 +49,7 @@ TARGET_DEVICES += xikestor_sks8300-12x-v1
|
|||||||
|
|
||||||
define Device/zyxel_xs1930
|
define Device/zyxel_xs1930
|
||||||
SOC := rtl9313
|
SOC := rtl9313
|
||||||
DEVICE_PACKAGES := kmod-hwmon-lm85
|
DEVICE_PACKAGES := kmod-hwmon-lm85 kmod-hwmon-gpiofan
|
||||||
FLASH_ADDR := 0xb4280000
|
FLASH_ADDR := 0xb4280000
|
||||||
IMAGE_SIZE := 31808k
|
IMAGE_SIZE := 31808k
|
||||||
ZYNFW_ALIGN := 0x10000
|
ZYNFW_ALIGN := 0x10000
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user