From 31e45a1a9ea07a9c36ada6401e4631a765398c75 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Mon, 4 Feb 2019 11:26:22 +0100 Subject: stpmic1: add NVM update support in fuse command Add functions to read/update the non volatile memory of STPMIC1 (8 bytes-register at 0xF8 address) and allow access with fuse command (bank=1, word > 0xF8). For example: STM32MP> fuse read 1 0xf8 8 Reading bank 1: Word 0x000000f8: 000000ee 00000092 000000c0 00000002 Word 0x000000fc: 000000f2 00000080 00000002 00000033 Signed-off-by: Patrick Delaunay --- include/power/stpmic1.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/power') diff --git a/include/power/stpmic1.h b/include/power/stpmic1.h index ea91b75..0e6721d 100644 --- a/include/power/stpmic1.h +++ b/include/power/stpmic1.h @@ -107,4 +107,11 @@ enum { STPMIC1_PWR_SW2, STPMIC1_MAX_PWR_SW, }; + +int stpmic1_shadow_read_byte(u8 addr, u8 *buf); +int stpmic1_shadow_write_byte(u8 addr, u8 *buf); +int stpmic1_nvm_read_byte(u8 addr, u8 *buf); +int stpmic1_nvm_write_byte(u8 addr, u8 *buf); +int stpmic1_nvm_read_all(u8 *buf, int buf_len); +int stpmic1_nvm_write_all(u8 *buf, int buf_len); #endif -- cgit v1.1