AnsweredAssumed Answered

i.MX6solo wdog1 failed to reset spi-nor board

Question asked by Jasper Zhang on Oct 25, 2016
Latest reply on Oct 30, 2016 by igorpadykov

Hi All

 

We came across a wdog1 usage issue on our i.MX6Solo customized board. It can be summarized as simple as followings:

  1. If we don't define spi-nor chip select gpio in device tree, wdog1 works.
  2. If we define spi-nor chip select gpio in device tree, wdog1 doesn't work.

 

The kernel version is 4.01.15. If we define the cs-gpios as below, wdog1 failed.

&ecspi1 {
   fsl,spi-num-chipselects = <1>;
   cs-gpios = <&gpio3 19 0>; /* EIM_D19/ECSP1_SS1 */
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_ecspi1 &pinctrl_ecspi1_cs>;
   status = "okay";

   flash: m25p80@0 {
      #address-cells = <1>;
      #size-cells = <1>;
      compatible = "micron,n25q512a";
      spi-max-frequency = <20000000>;
      reg = <0>;
   };
};

 

We want to use wdog1 to reset i.MX6 SoC only. We don't need any watchdog reset output signals.


Spi-nor is the only flash storage on our board. It uses single spi port-1 (pad EIM_D16/17/18) and the chip select is EIM_D19/ECSPI1_SS1.

 

The ROM code can find and boot u-boot from the spi-nor and u-boot can boot kernel from spi-nor or through NFS.

 

We use NFS to verify wdog1.

 

When wdog1 works, it can reset SoC and we can see the u-boot message in the console again.

 

The working device tree looks like followings:

 

&ecspi1 {
   fsl,spi-num-chipselects = <1>;
   cs-gpios = <&gpio3 25 0>; /* remove this line and wdog1 works too */
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_ecspi1 &pinctrl_ecspi1_cs>;
   status = "okay";

   flash: m25p80@0 {
      #address-cells = <1>;
      #size-cells = <1>;
      compatible = "micron,n25q512a";
      spi-max-frequency = <20000000>;
      reg = <0>;
   };
};

We modified our board and tried to use another pin, EIM_D25/ECSP1_SS3, as chip select and we got the same result. This time, "cs-gpios = <&gpio3 19 0>;" in device tree made wdog1 worked and "cs-gpios = <&gpio3 25 0>;" didn't.

 

Any input is appreciated.

 

JasperZ

Outcomes