immortalwrt/target/linux/realtek/dts
Andreas Böhler 3c152904c2 realtek: add fan controller support to D-Link DGS-1210-28MP
The DGS-1210-28MP has a LM63 fan controller connected via i2c of the
RTL8231. The clock line is always low if the property
i2c-gpio,scl-open-drain is not set; with this property, the GPIO pin is
force-drive and the clock works as expected.

The LM63 is not configured by U-Boot, thus only manual fan control is
possible by settings pwm1_enable to "1" and writing the desired values to
pwm1.

The OEM firmware drives the fan from user mode and sets it up like this:

// PWM LUT/value r/w, PWM Clock = 1.4kHz
0x4a 0x28
// Tachometer spinup disabled, spin-up cycles bypassed
0x4b 0x00
// PWM Frequency = default
0x4d 0x17
// PWM Value (28)
0x4c 0x1c
// If > 0 C, use
0x50 0x00
// PWM = 28
0x51 0x1c
// If > 51 C, use
0x52 0x33
// PWM = 44
0x53 0x2e
// Set hysteresis to 100 = default
0x4f 0x03
// Turn on automatic mode and w/p the LUT values
0x4a 0x08

A thread in the OEM firmware polls the ALERT status register for fan
failures.

Unfortunately, the lm63 kernel driver does not perform any initialization
of the chip and it does not support changing some config registers (like
PWM frequency or LUT). Hence, we are stuck with the defaults and need to do
fan control in software.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
Link: https://github.com/openwrt/openwrt/pull/15616
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2024-09-15 16:40:54 +02:00
..
rtl83xx_d-link_dgs-1210_common.dtsi
rtl83xx_d-link_dgs-1210_gpio_sfp.dtsi
rtl83xx_d-link_dgs-1210_gpio.dtsi
rtl83xx_panasonic_mxxeg-pn28xx0k.dtsi
rtl838x_hpe_1920.dtsi
rtl838x.dtsi
rtl839x.dtsi
rtl930x.dtsi
rtl931x.dtsi
rtl8380_d-link_dgs-1210-10mp-f.dts
rtl8380_engenius_ews2910p.dts
rtl8380_hpe_1920-8g-poe-65w.dts
rtl8380_hpe_1920-8g-poe-180w.dts
rtl8380_hpe_1920-8g.dts
rtl8380_hpe_1920-8g.dtsi
rtl8380_netgear_gigabit.dtsi
rtl8380_netgear_gs108t-v3.dts
rtl8380_netgear_gs110tpp-v1.dts
rtl8380_netgear_gs110tup-v1.dts
rtl8380_netgear_gs308t-v1.dts
rtl8380_netgear_gs310tp-v1.dts
rtl8380_panasonic_m8eg-pn28080k.dts
rtl8380_tplink_sg2xxx.dtsi
rtl8380_tplink_sg2008p-v1.dts
rtl8380_tplink_sg2210p-v3.dts
rtl8380_zyxel_gs1900-8.dts
rtl8380_zyxel_gs1900-8hp-v1.dts
rtl8380_zyxel_gs1900-8hp-v2.dts
rtl8380_zyxel_gs1900-10hp.dts
rtl8380_zyxel_gs1900.dtsi
rtl8382_allnet_all-sg8208m.dts
rtl8382_apresia_aplgs120gtss.dts
rtl8382_d-link_dgs-1210-10p.dts
rtl8382_d-link_dgs-1210-16.dts
rtl8382_d-link_dgs-1210-20.dts
rtl8382_d-link_dgs-1210-28_common.dtsi
rtl8382_d-link_dgs-1210-28.dts
rtl8382_d-link_dgs-1210-28mp-f.dts realtek: add fan controller support to D-Link DGS-1210-28MP 2024-09-15 16:40:54 +02:00
rtl8382_hpe_1920-16g.dts
rtl8382_hpe_1920-24g.dts
rtl8382_hpe_1920.dtsi
rtl8382_inaba_aml2-17gp.dts
rtl8382_iodata_bsh-g24mb.dts
rtl8382_panasonic_m16eg-pn28160k.dts
rtl8382_panasonic_m24eg-pn28240k.dts
rtl8382_tplink_t1600g-28ts-v3.dts
rtl8382_zyxel_gs1900-16.dts
rtl8382_zyxel_gs1900-24-v1.dts
rtl8382_zyxel_gs1900-24e.dts
rtl8382_zyxel_gs1900-24ep.dts
rtl8382_zyxel_gs1900-24hp-v1.dts
rtl8382_zyxel_gs1900-24hp-v2.dts
rtl8393_d-link_dgs-1210-52.dts
rtl8393_netgear_gs750e.dts
rtl8393_panasonic_m48eg-pn28480k.dts
rtl8393_tplink_sg2452p-v4.dts
rtl8393_zyxel_gs1900-48.dts
rtl9302_zyxel_xgs1250-12.dts