SNVS_HP Command reset state

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

SNVS_HP Command reset state

1,425 Views
falstaff
Senior Contributor I

Hi,

We use the SNVS PMIC Dumb mode to control the on-module PMIC (via PWR_ON_REQ signal, using SNVS_LP Control, Bit 6 TOP Turn off System Power). This works as expected on i.MX 7Dual, however on the modules populated with the i.MX 7Solo SoC (same Mask 0N09P) we can not control that signal using the same bit.

I think the reason for that is that the i.MX 7Dual SoC's have bit 31 NPSWA_EN set in SNVS_HP Command, whereas the Solo's has that bit cleared. I also cannot set that bit on the Solo, even in U-Boot (which should be in privileged mode by default?):

Colibri iMX7 # md.l 0x30370004 1

30370004: 00000000                               ....

Colibri iMX7 # mw.l 0x30370004 0x80000000

Colibri iMX7 # md.l 0x30370004 1        

30370004: 00000000                               ....

Colibri iMX7 #

How can I get access to the SNVS block on i.MX 7Solo?

Best regards,

Stefan Agner

Labels (2)
0 Kudos
5 Replies

875 Views
falstaff
Senior Contributor I

Any update on that? I also found out that when using hwclock and the lockup detector is running I get this stack trace after a while:

[ 68.009195] NMI watchdog: BUG: soft lockup - CPU#0 stuck for 23s! [kworker/0:2:160]
[ 68.016854] Modules linked in:
[ 68.019928] CPU: 0 PID: 160 Comm: kworker/0:2 Not tainted 4.1.15-00093-g07e04d2-dirty #295
[ 68.028193] Hardware name: Freescale i.MX7 Dual (Device Tree)
[ 68.033947] Workqueue: events rtc_timer_do_work
[ 68.038492] task: 862b0540 ti: 864ec000 task.ti: 864ec000
[ 68.043896] PC is at _raw_spin_unlock_irqrestore+0x1c/0x20
[ 68.049386] LR is at regmap_read+0x50/0x60
[ 68.053488] pc : [<80623970>] lr : [<80373f14>] psr: 20090113
[ 68.053488] sp : 864ede00 ip : 808d75e8 fp : 862326ac
[ 68.064967] r10: 86232610 r9 : 00000000 r8 : 00000000
[ 68.070195] r7 : 00000000 r6 : 864ede1c r5 : 00000000 r4 : 8620b200
[ 68.076725] r3 : 00005ee3 r2 : 00000004 r1 : 60090113 r0 : 8620b200
[ 68.083257] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
[ 68.090568] Control: 10c5387d Table: 8652006a DAC: 00000015
[ 68.096319] CPU: 0 PID: 160 Comm: kworker/0:2 Not tainted 4.1.15-00093-g07e04d2-dirty #295
[ 68.104583] Hardware name: Freescale i.MX7 Dual (Device Tree)
[ 68.110335] Workqueue: events rtc_timer_do_work
[ 68.114891] [<80015864>] (unwind_backtrace) from [<80012870>] (show_stack+0x10/0x14)
[ 68.122645] [<80012870>] (show_stack) from [<8061f068>] (dump_stack+0x78/0x88)
[ 68.129878] [<8061f068>] (dump_stack) from [<80098b24>] (watchdog_timer_fn+0x1f8/0x258)
[ 68.137893] [<80098b24>] (watchdog_timer_fn) from [<800762e4>] (__run_hrtimer+0x54/0xe4)
[ 68.145994] [<800762e4>] (__run_hrtimer) from [<800766b4>] (hrtimer_interrupt+0x12c/0x308)
[ 68.154269] [<800766b4>] (hrtimer_interrupt) from [<804893bc>] (arch_timer_handler_phys+0x28/0x30)
[ 68.163238] [<804893bc>] (arch_timer_handler_phys) from [<8006b0f0>] (handle_percpu_devid_irq+0x6c/0x84)
[ 68.172726] [<8006b0f0>] (handle_percpu_devid_irq) from [<800672bc>] (generic_handle_irq+0x2c/0x3c)
[ 68.181778] [<800672bc>] (generic_handle_irq) from [<80067554>] (__handle_domain_irq+0x5c/0xb4)
[ 68.190484] [<80067554>] (__handle_domain_irq) from [<800093a8>] (gic_handle_irq+0x24/0x5c)
[ 68.198842] [<800093a8>] (gic_handle_irq) from [<80013340>] (__irq_svc+0x40/0x54)
[ 68.206327] Exception stack(0x864eddb8 to 0x864ede00)
[ 68.211382] dda0: 8620b200 60090113
[ 68.219566] ddc0: 00000004 00005ee3 8620b200 00000000 864ede1c 00000000 00000000 00000000
[ 68.227750] dde0: 86232610 862326ac 808d75e8 864ede00 80373f14 80623970 20090113 ffffffff
[ 68.235936] [<80013340>] (__irq_svc) from [<80623970>] (_raw_spin_unlock_irqrestore+0x1c/0x20)
[ 68.244558] [<80623970>] (_raw_spin_unlock_irqrestore) from [<80373f14>] (regmap_read+0x50/0x60)
[ 68.253353] [<80373f14>] (regmap_read) from [<80418450>] (snvs_rtc_alarm_irq_enable+0x88/0xb8)
[ 68.261974] [<80418450>] (snvs_rtc_alarm_irq_enable) from [<80415b28>] (rtc_timer_do_work+0xe0/0x1a8)
[ 68.271205] [<80415b28>] (rtc_timer_do_work) from [<80040064>] (process_one_work+0x130/0x3fc)
[ 68.279738] [<80040064>] (process_one_work) from [<8004037c>] (worker_thread+0x4c/0x55c)
[ 68.287837] [<8004037c>] (worker_thread) from [<800453fc>] (kthread+0xdc/0xf4)
[ 68.295068] [<800453fc>] (kthread) from [<8000f3e8>] (ret_from_fork+0x14/0x2c)
0 Kudos

875 Views
Yuri
NXP Employee
NXP Employee

Hello,

   Please try to set  TOP and DP_EN bits in the SNVS_LP Control Register

under JTAG debugger, assuming fully stand-alone environment.

Have a great day,
Yuri

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

0 Kudos

875 Views
falstaff
Senior Contributor I

Hi Yuri,

Sorry it took me somewhat longer to setup my JTAG environment. I use ARM DS-5 with ULINKpro D. Trying to write the memory address via JTAG fails too:

memory set_typed 0x30370004 (unsigned int)  0x80002000
ERROR(TAD11-NAL20):
! Failed to write 4 bytes to address 0x30370004
! Verify error on memory operation.

Reading it back shows that the location is still 0x00000000, same as in U-Boot.

The same operation works without error on i.MX 7Dual.

Btw, Linux also freezes when trying to write to the SNVS RTC (/dev/rtc1 in our case):

# hwclock -w -f /dev/rtc1 <freeze>

Best regards,

Stefan

0 Kudos

875 Views
Yuri
NXP Employee
NXP Employee

Hello,

SNVS_LP Control Register address is 0x3037_0038

TOP and DP_EN bits = 0x60

Regards,

Yuri.

0 Kudos

875 Views
falstaff
Senior Contributor I

Yeah I am aware that SNVS_LPCR is at 0x3037_0038, I did also tried to write 0x3037_0038 directly via JTAG, but it failed the same way.

Then I tried to write SNVS_HP HPCOMR (0x30370004)  because that register is 0x00000000 on i.MX 7Solo, whereas on 7Dual the highest bit (NPSWA_EN) is set. I think that this is the reason that I can't write 0x30370038...

0 Kudos