* [U-Boot] [PATCH] board/t208xrdb: VID support
@ 2015-03-10 6:21 ying.zhang at freescale.com
2015-04-20 20:58 ` York Sun
0 siblings, 1 reply; 2+ messages in thread
From: ying.zhang at freescale.com @ 2015-03-10 6:21 UTC (permalink / raw)
To: u-boot
From: Ying Zhang <b40530@freescale.com>
The fuse status register provides the values from on-chip
voltage ID efuses programmed at the factory.
These values define the voltage requirements for
the chip. u-boot reads FUSESR and translates the values
into the appropriate commands to set the voltage output
value of an external voltage regulator.
Signed-off-by: Ying Zhang <b40530@freescale.com>
---
board/freescale/t208xrdb/t208xrdb.c | 7 +++++++
include/configs/T208xRDB.h | 11 +++++++++++
2 files changed, 18 insertions(+)
diff --git a/board/freescale/t208xrdb/t208xrdb.c b/board/freescale/t208xrdb/t208xrdb.c
index 341453b..ad393df 100644
--- a/board/freescale/t208xrdb/t208xrdb.c
+++ b/board/freescale/t208xrdb/t208xrdb.c
@@ -19,6 +19,7 @@
#include <fm_eth.h>
#include "t208xrdb.h"
#include "cpld.h"
+#include "../common/vid.h"
DECLARE_GLOBAL_DATA_PTR;
@@ -85,6 +86,12 @@ int board_early_init_r(void)
setup_portals();
#endif
+ /*
+ * Adjust core voltage according to voltage ID
+ * This function changes I2C mux to channel 2.
+ */
+ if (adjust_vdd(0))
+ printf("Warning: Adjusting core voltage failed.\n");
return 0;
}
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index db6b42e..2e48fc8 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -449,6 +449,17 @@ unsigned long get_board_ddr_clk(void);
#define I2C_MUX_PCA_ADDR_SEC2 0x76 /* I2C bus multiplexer,secondary 2 */
#define I2C_MUX_CH_DEFAULT 0x8
+#define I2C_MUX_CH_VOL_MONITOR 0xa
+
+#define CONFIG_VID_FLS_ENV "t208xrdb_vdd_mv"
+#ifndef CONFIG_SPL_BUILD
+#define CONFIG_VID
+#endif
+#define CONFIG_VOL_MONITOR_IR36021_SET
+#define CONFIG_VOL_MONITOR_IR36021_READ
+/* The lowest and highest voltage allowed for T208xRDB */
+#define VDD_MV_MIN 819
+#define VDD_MV_MAX 1212
/*
* RapidIO
--
1.8.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* [U-Boot] [PATCH] board/t208xrdb: VID support
2015-03-10 6:21 [U-Boot] [PATCH] board/t208xrdb: VID support ying.zhang at freescale.com
@ 2015-04-20 20:58 ` York Sun
0 siblings, 0 replies; 2+ messages in thread
From: York Sun @ 2015-04-20 20:58 UTC (permalink / raw)
To: u-boot
On 03/09/2015 11:21 PM, ying.zhang at freescale.com wrote:
> From: Ying Zhang <b40530@freescale.com>
>
> The fuse status register provides the values from on-chip
> voltage ID efuses programmed at the factory.
> These values define the voltage requirements for
> the chip. u-boot reads FUSESR and translates the values
> into the appropriate commands to set the voltage output
> value of an external voltage regulator.
>
> Signed-off-by: Ying Zhang <b40530@freescale.com>
> ---
Applied to mpc85xx master, awaiting upstream.
York
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-20 20:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-10 6:21 [U-Boot] [PATCH] board/t208xrdb: VID support ying.zhang at freescale.com
2015-04-20 20:58 ` York Sun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox