When should gpio-restart be used/avoided?

Robert Marko robimarko at gmail.com
Sat Aug 13 13:48:31 PDT 2022


I had just that question today when reviewing a similar ZTE modem.
It appears that its to reset the modem as well:
https://github.com/openwrt/openwrt/pull/10418/files#r945125301

Regards,
Robert

On Sat, 13 Aug 2022 at 19:13, Bjørn Mork <bjorn at mork.no> wrote:
>
> I just got myself a ZTE286D.  But after installing OpenWrt I had an
> unexpected problem on reboot. The Openwrt DTS includes a gpio-restart
> device:
>         gpio-restart {
>                 compatible = "gpio-restart";
>                 gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>;
>         };
>
>
> The gpio-restart driver is therefore used to reboot the system due to
> default priorities.
>
> I have two concerns about this:
>
>  1) it's different from OEM, and
>  2) it cuts power to the 3.3V VCC console line on reboot
>
> A quick test indicates that reboot works just fine without using
> gpio-restart in OpenWrt too.  And a similar node seems to be rare in
> this target.  AFAICS, this is the only device having one.
>
> So I wonder if we could/should remove that gpio-restart device.  What do
> you think?
>
> The reason I ask is because the VCC toggling causes unnecessary problems
> for me.  I realize that I have an unusual setup, but I have connected a
> bluetooth module to the console port.  Toggling the console VCC on
> reboot makes it hard/imposible to enter the bootloader, or to capture
> the whole boot log.  It takes some time before the console server
> notices that the bluetooth device disappeared and tries to reconnect. I
> believe this is an unwanted side effect.  And it wasn't like that with
> OEM.
>
> This is of course only a minor problem. In addition to just pathcing the
> DTS myself, I could also put something like
>
>   test -w /sys/bus/platform/drivers/restart-gpio/unbind && echo gpio-restart >/sys/bus/platform/drivers/restart-gpio/unbind
>
> into /etc/rc.local.  That's a perfectly fine workaround.  But I wanted
> to ask becasuse of the different behaviour in OEM.
>
>
> Bjørn
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list