All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] board, zynqmp: Fix for wrong AMS setting by ROM
@ 2019-10-18  5:51 Mike Looijmans
  0 siblings, 0 replies; only message in thread
From: Mike Looijmans @ 2019-10-18  5:51 UTC (permalink / raw)
  To: u-boot

A bug in the ZynqMP bootrom sets the PS_SYSMON_ANALOG_BUS register
at 0xFFA50914 to the wrong value 0x3201. This causes the AMS to
exchange the PS supply voltages 0 and 1. On Xilinx boards this is
not noticable since these are tied together, it's only really
noticable if banks 500 and 501 have different supplies. Xilinx' tech
support reported this undocumented register to be the cause, and
this patch applies a fix for all boards by programming the correct
value.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
---
 board/xilinx/zynqmp/zynqmp.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index b94936474d..8d926c803b 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -326,6 +326,9 @@ int board_early_init_f(void)
 	return ret;
 }
 
+#define PS_SYSMON_ANALOG_BUS_VAL	0x3210
+#define PS_SYSMON_ANALOG_BUS_REG	0xFFA50914
+
 int board_init(void)
 {
 	struct udevice *dev;
@@ -343,6 +346,9 @@ int board_init(void)
 
 	printf("EL Level:\tEL%d\n", current_el());
 
+	/* Bug in ROM sets wrong value in this register */
+	writel(PS_SYSMON_ANALOG_BUS_VAL, PS_SYSMON_ANALOG_BUS_REG);
+
 #if defined(CONFIG_FPGA) && defined(CONFIG_FPGA_ZYNQMPPL) && \
     !defined(CONFIG_SPL_BUILD) || (defined(CONFIG_SPL_FPGA_SUPPORT) && \
     defined(CONFIG_SPL_BUILD))
-- 
2.17.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-10-18  5:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18  5:51 [U-Boot] [PATCH] board, zynqmp: Fix for wrong AMS setting by ROM Mike Looijmans

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.