imx6D reboot.c issue?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx6D reboot.c issue?

1,793 Views
jiujinhong
Contributor IV

Hi,

Currently i am debuging this issueimx6d wdog1 reboot not stable , but still can't fix this issue even if with the help from community.

So, I want to choose another way to implement reboot for my board, such as SNVS way (PMIC).  both do_switch_normal in reboot.c and below func didn't make any sense to reboot, power consumption has no change.

So, i have missed other things for this? thanks.

     void do_power_off(void)                                                                                                             
   14 {                                                                                                                                   
   13     u32 reg;                                                                                                                        
   12     void *addr;                                                                                                                     
   11     phys_addr_t snvs_base_addr;                                                                                                     
   10     phys_addr_t snvs_lpcr;                                                                                                          
    9     size_t snvs_size;                                                                                                               
    8     if (cpu_is_imx6()) {                                                                                                            
    7         pr_warn("cpu is mx6\n");                                                                                                    
    6         snvs_base_addr = MX6_SNVS_BASE_ADDR;                                                                                        
    5         snvs_size = MX6_SNVS_SIZE;                                                                                                  
    4         snvs_lpcr = MX6_SNVS_LPCR;                                                                                                  
    3     } else {                                                                                                                        
    2         snvs_base_addr = MX7_SNVS_BASE_ADDR;                                                                                        
    1         snvs_size = MX7_SNVS_SIZE;                                                                                                  
  79          snvs_lpcr = MX7_SNVS_LPCR;                                                                                                  
    1     }       
   11                                                                                                                                     
   10     addr = ioremap(snvs_base_addr, snvs_size);                                                                                      
    9     if (!addr) {                                                                                                                    
    8         pr_warn("SNVS ioremap failed!\n");                                                                                          
    7         return;                                                                                                                     
    6     }                                                                                                                               
    5     reg = __raw_readl(addr + snvs_lpcr);                                                                                            
    4     reg |= 0x60;                                                                                                                    
    3     pr_warn("PMIC Config...\n");                                                                                                    
    2     __raw_writel(reg, (addr + snvs_lpcr));                                                                                          
    1     iounmap(addr);                                                                                                                  
  92  }    

[   12.428086] sysrq: SysRq : Emergency Remount R/O
[   12.435704] EXT4-fs (mmcblk3p6): re-mounted. Opts: (null)
[   12.448787] EXT4-fs (mmcblk3p4): re-mounted. Opts: (null)
[   12.467832] Emergency Remount complete
[   13.066736] imx2-wdt 20bc000.wdog: Device shutdown: Expect reboot!
[   13.073044] reboot: Restarting system with command ''
[   13.087046] cpu is mx6
[   13.089432] PMIC Config...
[   14.092149] Reboot failed -- System halted

Labels (5)
0 Kudos
Reply
4 Replies

978 Views
igorpadykov
NXP Employee
NXP Employee

Hi jiu

reliable reboot can be implemented only removing power (voltage source)

to all components on the board, as it is done on i.MX6Q Sabre SD spf-27392

schematic p.21 (WDOG_B,PWRON, U507 components).

In general one can try other options as described on

Q&A: How is mx6 PMIC_ON_REQ under SW control? 

or rtcwakeup in imx-test
www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-test-5.7.tar.gz

If board hangs may be recommended to check VDD_ARM_IN, VDD_SOC_IN voltages

they should be configured for 792 MHz for reliable reboot. Linux cpufreq/busfreq

drivers may lower these voltages to values, not suitable for reboot.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

978 Views
jiujinhong
Contributor IV

Hi Igor,

  1. I have test  1256-ENGR00178629-i.MX6-sabresd-support-software-power-of.patch.txt.zip patch, can't make system reboot.
  2. I have test "echo performance > scanling_govexx" before rebooting, still hangs in U-boot someplace.
  3. I have fixed cpufreq in dts, still hangs in U-boot someplace.
0 Kudos
Reply

978 Views
igorpadykov
NXP Employee
NXP Employee

Hi jiu

please make board modifications as is done on i.MX6Q Sabre SD spf-27392

schematic p.21 (WDOG_B,PWRON, U507 components).

Best regards
igor

0 Kudos
Reply

978 Views
jiujinhong
Contributor IV

wdog1 reboot issue is fixed by kernel dts.

0 Kudos
Reply