[RFC 1/4] realtek: rtl8231 driver: dts option for GPIO state
Bjørn Mork
bjorn at mork.no
Tue Oct 22 08:28:39 PDT 2024
Evan Jobling via openwrt-devel <openwrt-devel at lists.openwrt.org> writes:
> This is due to the patch fixing output drivers,
> due to untrusted bootloader.
> i.e. This is by setting all GPIO's to input.
> 3810e897295cb66bc45a62bc2c0b70a01004fe3b
> "realtek: ensure output drivers are enabled in RTL8231"
Are we sure that commit shouldn't be reverted? Why is it be better to
set all pins to some arbitrary state than leaving them in whatever state
the bootloader (or we, before reboot) set them to?
Not sure I understand the purpose of the 3810e897295c commit... Why is
it necessary to set all pins to input for output drivers to be enabled?
And if some stupid boot loader pulls the SoC reset to 0, then why not
fix that specific bug instead of messing with every device out there?
Setting all pins to input is not guaranteed to be a safe operation, as
you point out.
In addition to your fan problem, I'm thinking about the PoE enable pin
on the Zyxel GS1900-10HP (and possibly other devices). If we had a boot
loader that didn't touch this output pin, then it would be nice to be
able to load the driver without toggling it too. Don't think your patch
will be sufficient. It will still toggle the pins briefly, won't it?
Bjørn
More information about the openwrt-devel
mailing list