Skip to contentSkip to conversation

board/t208xrdb: VID support

PATCH New ying.zhang at freescale.com 2 participants 2 messages Mar 10, 2015 – Apr 20, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board/t208xrdb: VID support

From: Ying Zhang <[email protected]>

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.

---
 board/freescale/t208xrdb/t208xrdb.c |  7 +++++++
 include/configs/T208xRDB.h          | 11 +++++++++++
 2 files changed, 18 insertions(+)
board/freescale/t208xrdb/t208xrdb.c +7 -0
index 341453b..ad393df 100644
@@ -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;
 }
 
include/configs/T208xRDB.h +11 -0
index db6b42e..2e48fc8 100644
@@ -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
Signature · 1 line
1.8.4.1
Applied
#1 lore raw

PATCH 1/1 board/t208xrdb: VID support

Quoted 11 lines · ying.zhang at freescale.com

From: Ying Zhang <[email protected]>

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.

---

Applied to mpc85xx master, awaiting upstream.

York