From 925ecb4fd225142304e00b020d20dbbf32d27828 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Tue, 19 Sep 2017 16:13:13 -0700 Subject: nautilus/poppy/soraka: Add support for dumping PMIC fault registers If during PMIC initialization, it is identified that there was a VR fault, then dump fault registers 0x16 and 0x17 to EC console. This information is very useful during debugging sudden power losses in field and so it is printed out to EC console. Additionally, add panic reason with these register values as panic data so that OS can provide this information in cros ec panicinfo. This helps in retaining the information even if EC console logs overflow. BUG=b:65732924,b:69334392 BRANCH=None TEST=Verified that on the failing Lux system, PMIC VR fault is reported:"PMIC VRFAULT: PWRSTAT1=0x00 PWRSTAT2=0x01". Also, verified that pmic fault register info is reported correctly in panicinfo: cat /sys/kernel/debug/cros_ec/panicinfo > /tmp/panicinfo hexdump -n 1 -s 0x14 -e '"0x""%02X""\n"' /tmp/panicinfo 0x00 hexdump -n 1 -s 0x15 -e '"0x""%02X""\n"' /tmp/panicinfo 0x01 Change-Id: Ic6096887cd66046d11a5eb1d942b635b3e48a236 Signed-off-by: Furquan Shaikh Reviewed-on: https://chromium-review.googlesource.com/674033 Reviewed-by: Shawn N --- board/poppy/board.h | 1 + 1 file changed, 1 insertion(+) (limited to 'board/poppy/board.h') diff --git a/board/poppy/board.h b/board/poppy/board.h index 95050f8700..eea4a75c02 100644 --- a/board/poppy/board.h +++ b/board/poppy/board.h @@ -31,6 +31,7 @@ #define CONFIG_LOW_POWER_IDLE #define CONFIG_LTO #define CONFIG_CHIP_PANIC_BACKUP +#define CONFIG_SOFTWARE_PANIC #define CONFIG_SPI_FLASH_REGS #define CONFIG_SPI_FLASH_W25X40 #define CONFIG_UART_HOST 0 -- cgit v1.2.1