[LEDE-DEV] mt7621 wdt reset- console not accepting commands
K.Mani
sailormani at gmail.com
Sat Jul 15 04:36:14 PDT 2017
i figured it out. Changed the
console=ttyS1,115200n8 to console=ttyS0,115200n8
Thanks
Mani
On Sat, Jul 15, 2017 at 12:23 PM, K.Mani <sailormani at gmail.com> wrote:
> The mediatek board 'mt7621', is having a external watchdog timer, it
> resets the GPIO-18 every 500ms.
> To handle this scenario.
>
> I modified the our dts file dummy.dts, added 'wdt-gpio'
>
> #include "mt7621.dtsi"/ {
> compatible = "mediatek,dummy", "mediatek,mt7621-soc";
> model = "Dummy MT7621";
> memory at 0 {
> device_type = "memory";
> reg = <0x0 0x8000000>;
> }; chosen {
> bootargs = "console=ttyS1,115200n8";
> };
> wdt-gpio {
> compatible = "linux,wdt-gpio";
> gpios = <&gpio0 18 1>;
> hw_algo = "toggle";
> hw_margin_ms = <400>;
> always-running = <1>;
> };
> };
>
> Added the following in Kernel config file, config-4.9
> CONFIG_GPIO_WATCHDOG=y
> CONFIG_GPIO_WATCHDOG_ARCH_INITCALL=y
>
> to compile, drivers/watchdog/gpio_wdt.c
>
> But, this resulted in 'gpio_wdt_probe', getting called before mt7621_gpio.
> logs->
> [ 0.410000] gpio_wdt_probe,
> [ 0.420000] gpio_wdt_probe, 170, priv->gpio=-517, flags=-2146148000
> [ 0.490000] mt7621_gpio 1e000600.gpio: registering 32 gpios
> [ 0.490000] mt7621_gpio 1e000600.gpio: registering 32 gpios
> [ 0.500000] mt7621_gpio 1e000600.gpio: registering 32 gpios
> [ 0.500000] clocksource: Switched to clocksource GIC
> [ 0.510000] NET: Registered protocol family 2
>
> So i modified
> drivers/watchdog/gpio_wdt.c
> -arch_initcall(gpio_wdt_init);
> +subsys_initcall(gpio_wdt_init);
>
> This resulted in, correct sequence..
> mt7621_gpio 1e000600.gpio: registering 32 gpios
> [ 0.450000] mt7621_gpio 1e000600.gpio: registering 32 gpios
> [ 0.460000] mt7621_gpio 1e000600.gpio: registering 32 gpios
> [ 0.460000] of_get_named_gpio_flags, 112
> [ 0.470000] gpio_wdt_probe, priv->gpio=18
> [ 0.470000] gpio_wdt_probe, 216
>
>
> The device WDT reset is not happening anymore, and boots fully..
>
> [ 12.690000] br-lan: port 1(eth0.1) entered disabled state
> [ 12.700000] device eth0.1 entered promiscuous mode
> [ 12.710000] device eth0 entered promiscuous mode
> [ 12.720000] br-lan: port 1(eth0.1) entered blocking state
> [ 12.720000] br-lan: port 1(eth0.1) entered forwarding state
> [ 103.470000] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
> [ 111.710000] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
>
> But the issue is console not accepting commands
> when i press enter or type anything the command is not seen on the console.
>
> Can someone help me!!
>
> Mani
More information about the Lede-dev
mailing list