summaryrefslogtreecommitdiff
path: root/chip/g/init_chip.h
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2017-03-02 10:34:46 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2017-03-08 01:40:19 +0000
commite416585de0c24f8b876c967791f8dae6fc49b0bf (patch)
tree2ef227c3c0a4aa3ba1a653dedca582e2eac8f030 /chip/g/init_chip.h
parent7ec0385d89ba3257c2d55662ffcff7917e060fb3 (diff)
downloadchrome-ec-e416585de0c24f8b876c967791f8dae6fc49b0bf.tar.gz
init_chip: add comment document pmu scratch registers
If we are using more PWRDN or LONG_LIFE scratch registers we want to make sure we don't clobber any existing uses. The use for each scratch register is not documented anywhere. This change adds a comment to init_chip with listing the uses for each long life and pwrdn scratch register. BUG=none BRANCH=cr50 TEST=make buildall Change-Id: I1e7d5b1f86dfa1a996671e864fe768976987a85e Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/448819 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> (cherry picked from commit 0f2b3d0ca31f6a470d4f9e353c13d1e69c90d564) Reviewed-on: https://chromium-review.googlesource.com/451540 Tested-by: Vadim Bendebury <vbendeb@chromium.org> Commit-Queue: Vadim Bendebury <vbendeb@chromium.org> Trybot-Ready: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'chip/g/init_chip.h')
-rw-r--r--chip/g/init_chip.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/chip/g/init_chip.h b/chip/g/init_chip.h
index 104a07c558..b4501618b0 100644
--- a/chip/g/init_chip.h
+++ b/chip/g/init_chip.h
@@ -6,6 +6,27 @@
#ifndef __CROS_EC_INIT_CHIP_H
#define __CROS_EC_INIT_CHIP_H
+/**
+ * This is the current state of the PMU persistent registers. There are two
+ * types: long life and pwrdn scratch. Long life will persist through any
+ * reset other than POR. PWRDN scratch only survives deep sleep.
+ *
+ * LONG_LIFE_SCRATCH 0 - 2
+ * SCRATCH0 - Rollback counter
+ * SCRATCH1 - Board properties
+ * SCRATCH2
+ *
+ * PWRDN_SCRATCH 0 - 15 - Locked
+ *
+ * PWRDN_SCRATCH 16 - 27 - Can be used by RW
+ * SCRATCH16 - Indicator that firmware is running for debug purposes
+ *
+ * SCRATCH18 - Preserving USB_DCFG through deep sleep
+ *
+ * PWRDN_SCRATCH 28 - 31 - Reserved for boot rom
+ */
+
+
enum permission_level {
PERMISSION_LOW = 0x00,
PERMISSION_MEDIUM = 0x33, /* APPS run at medium */