* [U-Boot] [PATCH 0/3] arm: omap: Introduce vcores_init function
@ 2016-05-24 6:15 Keerthy
2016-05-24 6:15 ` [U-Boot] [PATCH 1/3] " Keerthy
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Keerthy @ 2016-05-24 6:15 UTC (permalink / raw)
To: u-boot
The series Introduces vcores_init function to update am57xx
information after the board detection. Fixes assigning
wrong value to to omap_vcores over riding the vcores_init
function for am572x-idk and does a minor alignment correction.
This series is on top of the series:
http://marc.info/?l=u-boot&m=146402916631764&w=2
Boot tested on beagle-x15, am572x-idk and dra7-evm.
Checked for the correct PMIC voltages using i2c reads on PMIC registers.
Keerthy (3):
arm: omap: Introduce vcores_init function
arm: am57xx: Fix omap_vcores assignment for am572x-idk
arm: am57xx: Fix alignment where necessary
arch/arm/cpu/armv7/omap-common/hwinit-common.c | 11 ++
arch/arm/include/asm/arch-omap5/sys_proto.h | 1 +
board/ti/am57xx/board.c | 135 ++++++++++++++++---------
3 files changed, 101 insertions(+), 46 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 1/3] arm: omap: Introduce vcores_init function
2016-05-24 6:15 [U-Boot] [PATCH 0/3] arm: omap: Introduce vcores_init function Keerthy
@ 2016-05-24 6:15 ` Keerthy
2016-06-03 13:58 ` [U-Boot] [U-Boot, " Tom Rini
2016-05-24 6:15 ` [U-Boot] [PATCH 2/3] arm: am57xx: Fix omap_vcores assignment for am572x-idk Keerthy
2016-05-24 6:15 ` [U-Boot] [PATCH 3/3] arm: am57xx: Fix alignment where necessary Keerthy
2 siblings, 1 reply; 7+ messages in thread
From: Keerthy @ 2016-05-24 6:15 UTC (permalink / raw)
To: u-boot
The pmic registers for variants of am57xx boards are different
hence we need to assign them carefully based on the board type.
Add a function to assign omap_vcores after the board detection.
Signed-off-by: Keerthy <j-keerthy@ti.com>
---
arch/arm/cpu/armv7/omap-common/hwinit-common.c | 11 +++++++++++
arch/arm/include/asm/arch-omap5/sys_proto.h | 1 +
2 files changed, 12 insertions(+)
diff --git a/arch/arm/cpu/armv7/omap-common/hwinit-common.c b/arch/arm/cpu/armv7/omap-common/hwinit-common.c
index 01c2d57..8ad82f6 100644
--- a/arch/arm/cpu/armv7/omap-common/hwinit-common.c
+++ b/arch/arm/cpu/armv7/omap-common/hwinit-common.c
@@ -94,6 +94,16 @@ void __weak do_board_detect(void)
{
}
+/**
+ * vcores_init() - Assign omap_vcores based on board
+ *
+ * Function to pick the vcores based on board. This is expected to be
+ * overridden in the SoC family board file where desired.
+ */
+void __weak vcores_init(void)
+{
+}
+
void s_init(void)
{
}
@@ -131,6 +141,7 @@ void early_system_init(void)
#endif
setup_early_clocks();
do_board_detect();
+ vcores_init();
prcm_init();
}
diff --git a/arch/arm/include/asm/arch-omap5/sys_proto.h b/arch/arm/include/asm/arch-omap5/sys_proto.h
index 804266a..d25e4fa 100644
--- a/arch/arm/include/asm/arch-omap5/sys_proto.h
+++ b/arch/arm/include/asm/arch-omap5/sys_proto.h
@@ -51,6 +51,7 @@ void sdelay(unsigned long);
void setup_early_clocks(void);
void prcm_init(void);
void do_board_detect(void);
+void vcores_init(void);
void bypass_dpll(u32 const base);
void freq_update_core(void);
u32 get_sys_clk_freq(void);
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 2/3] arm: am57xx: Fix omap_vcores assignment for am572x-idk
2016-05-24 6:15 [U-Boot] [PATCH 0/3] arm: omap: Introduce vcores_init function Keerthy
2016-05-24 6:15 ` [U-Boot] [PATCH 1/3] " Keerthy
@ 2016-05-24 6:15 ` Keerthy
2016-06-03 13:58 ` [U-Boot] [U-Boot, " Tom Rini
2016-05-24 6:15 ` [U-Boot] [PATCH 3/3] arm: am57xx: Fix alignment where necessary Keerthy
2 siblings, 1 reply; 7+ messages in thread
From: Keerthy @ 2016-05-24 6:15 UTC (permalink / raw)
To: u-boot
Currently omap_vcores is wrongly assigned a default value of
beagle_x15_volts. Hence populating a new structure for am572x-idk
and assigning it to omap_vcores in the vcores_init function.
Fixes: c020d355c45ed40fe12a ("board: ti: am57xx: Add support for am572x idk in SPL")
Reported-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
---
board/ti/am57xx/board.c | 45 ++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-)
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index a6a4ccb..5992f49 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -251,6 +251,42 @@ struct vcores_data beagle_x15_volts = {
.iva.abb_tx_done_mask = OMAP_ABB_IVA_TXDONE_MASK,
};
+struct vcores_data am572x_idk_volts = {
+ .mpu.value = VDD_MPU_DRA7,
+ .mpu.efuse.reg = STD_FUSE_OPP_VMIN_MPU,
+ .mpu.efuse.reg_bits = DRA752_EFUSE_REGBITS,
+ .mpu.addr = TPS659038_REG_ADDR_SMPS12,
+ .mpu.pmic = &tps659038,
+ .mpu.abb_tx_done_mask = OMAP_ABB_MPU_TXDONE_MASK,
+
+ .eve.value = VDD_EVE_DRA7,
+ .eve.efuse.reg = STD_FUSE_OPP_VMIN_DSPEVE,
+ .eve.efuse.reg_bits = DRA752_EFUSE_REGBITS,
+ .eve.addr = TPS659038_REG_ADDR_SMPS45,
+ .eve.pmic = &tps659038,
+ .eve.abb_tx_done_mask = OMAP_ABB_EVE_TXDONE_MASK,
+
+ .gpu.value = VDD_GPU_DRA7,
+ .gpu.efuse.reg = STD_FUSE_OPP_VMIN_GPU,
+ .gpu.efuse.reg_bits = DRA752_EFUSE_REGBITS,
+ .gpu.addr = TPS659038_REG_ADDR_SMPS6,
+ .gpu.pmic = &tps659038,
+ .gpu.abb_tx_done_mask = OMAP_ABB_GPU_TXDONE_MASK,
+
+ .core.value = VDD_CORE_DRA7,
+ .core.efuse.reg = STD_FUSE_OPP_VMIN_CORE,
+ .core.efuse.reg_bits = DRA752_EFUSE_REGBITS,
+ .core.addr = TPS659038_REG_ADDR_SMPS7,
+ .core.pmic = &tps659038,
+
+ .iva.value = VDD_IVA_DRA7,
+ .iva.efuse.reg = STD_FUSE_OPP_VMIN_IVA,
+ .iva.efuse.reg_bits = DRA752_EFUSE_REGBITS,
+ .iva.addr = TPS659038_REG_ADDR_SMPS8,
+ .iva.pmic = &tps659038,
+ .iva.abb_tx_done_mask = OMAP_ABB_IVA_TXDONE_MASK,
+};
+
#ifdef CONFIG_SPL_BUILD
/* No env to setup for SPL */
static inline void setup_board_eeprom_env(void) { }
@@ -315,11 +351,18 @@ invalid_eeprom:
#endif /* CONFIG_SPL_BUILD */
+void vcores_init(void)
+{
+ if (board_is_am572x_idk())
+ *omap_vcores = &am572x_idk_volts;
+ else
+ *omap_vcores = &beagle_x15_volts;
+}
+
void hw_data_init(void)
{
*prcm = &dra7xx_prcm;
*dplls_data = &dra7xx_dplls;
- *omap_vcores = &beagle_x15_volts;
*ctrl = &dra7xx_ctrl;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 3/3] arm: am57xx: Fix alignment where necessary
2016-05-24 6:15 [U-Boot] [PATCH 0/3] arm: omap: Introduce vcores_init function Keerthy
2016-05-24 6:15 ` [U-Boot] [PATCH 1/3] " Keerthy
2016-05-24 6:15 ` [U-Boot] [PATCH 2/3] arm: am57xx: Fix omap_vcores assignment for am572x-idk Keerthy
@ 2016-05-24 6:15 ` Keerthy
2016-06-03 13:58 ` [U-Boot] [U-Boot, " Tom Rini
2 siblings, 1 reply; 7+ messages in thread
From: Keerthy @ 2016-05-24 6:15 UTC (permalink / raw)
To: u-boot
This just fixes alignment for better readability.
Signed-off-by: Keerthy <j-keerthy@ti.com>
---
board/ti/am57xx/board.c | 90 ++++++++++++++++++++++++-------------------------
1 file changed, 45 insertions(+), 45 deletions(-)
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index 5992f49..6b58722 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -63,28 +63,28 @@ void emif_get_dmm_regs(const struct dmm_lisa_map_regs **dmm_lisa_regs)
}
static const struct emif_regs beagle_x15_emif1_ddr3_532mhz_emif_regs = {
- .sdram_config_init = 0x61851b32,
- .sdram_config = 0x61851b32,
- .sdram_config2 = 0x08000000,
- .ref_ctrl = 0x000040F1,
- .ref_ctrl_final = 0x00001035,
- .sdram_tim1 = 0xcccf36ab,
- .sdram_tim2 = 0x308f7fda,
- .sdram_tim3 = 0x409f88a8,
- .read_idle_ctrl = 0x00050000,
- .zq_config = 0x5007190b,
- .temp_alert_config = 0x00000000,
- .emif_ddr_phy_ctlr_1_init = 0x0024400b,
- .emif_ddr_phy_ctlr_1 = 0x0e24400b,
- .emif_ddr_ext_phy_ctrl_1 = 0x10040100,
- .emif_ddr_ext_phy_ctrl_2 = 0x00910091,
- .emif_ddr_ext_phy_ctrl_3 = 0x00950095,
- .emif_ddr_ext_phy_ctrl_4 = 0x009b009b,
- .emif_ddr_ext_phy_ctrl_5 = 0x009e009e,
- .emif_rd_wr_lvl_rmp_win = 0x00000000,
- .emif_rd_wr_lvl_rmp_ctl = 0x80000000,
- .emif_rd_wr_lvl_ctl = 0x00000000,
- .emif_rd_wr_exec_thresh = 0x00000305
+ .sdram_config_init = 0x61851b32,
+ .sdram_config = 0x61851b32,
+ .sdram_config2 = 0x08000000,
+ .ref_ctrl = 0x000040F1,
+ .ref_ctrl_final = 0x00001035,
+ .sdram_tim1 = 0xcccf36ab,
+ .sdram_tim2 = 0x308f7fda,
+ .sdram_tim3 = 0x409f88a8,
+ .read_idle_ctrl = 0x00050000,
+ .zq_config = 0x5007190b,
+ .temp_alert_config = 0x00000000,
+ .emif_ddr_phy_ctlr_1_init = 0x0024400b,
+ .emif_ddr_phy_ctlr_1 = 0x0e24400b,
+ .emif_ddr_ext_phy_ctrl_1 = 0x10040100,
+ .emif_ddr_ext_phy_ctrl_2 = 0x00910091,
+ .emif_ddr_ext_phy_ctrl_3 = 0x00950095,
+ .emif_ddr_ext_phy_ctrl_4 = 0x009b009b,
+ .emif_ddr_ext_phy_ctrl_5 = 0x009e009e,
+ .emif_rd_wr_lvl_rmp_win = 0x00000000,
+ .emif_rd_wr_lvl_rmp_ctl = 0x80000000,
+ .emif_rd_wr_lvl_ctl = 0x00000000,
+ .emif_rd_wr_exec_thresh = 0x00000305
};
/* Ext phy ctrl regs 1-35 */
@@ -127,28 +127,28 @@ static const u32 beagle_x15_emif1_ddr3_ext_phy_ctrl_const_regs[] = {
};
static const struct emif_regs beagle_x15_emif2_ddr3_532mhz_emif_regs = {
- .sdram_config_init = 0x61851b32,
- .sdram_config = 0x61851b32,
- .sdram_config2 = 0x08000000,
- .ref_ctrl = 0x000040F1,
- .ref_ctrl_final = 0x00001035,
- .sdram_tim1 = 0xcccf36b3,
- .sdram_tim2 = 0x308f7fda,
- .sdram_tim3 = 0x407f88a8,
- .read_idle_ctrl = 0x00050000,
- .zq_config = 0x5007190b,
- .temp_alert_config = 0x00000000,
- .emif_ddr_phy_ctlr_1_init = 0x0024400b,
- .emif_ddr_phy_ctlr_1 = 0x0e24400b,
- .emif_ddr_ext_phy_ctrl_1 = 0x10040100,
- .emif_ddr_ext_phy_ctrl_2 = 0x00910091,
- .emif_ddr_ext_phy_ctrl_3 = 0x00950095,
- .emif_ddr_ext_phy_ctrl_4 = 0x009b009b,
- .emif_ddr_ext_phy_ctrl_5 = 0x009e009e,
- .emif_rd_wr_lvl_rmp_win = 0x00000000,
- .emif_rd_wr_lvl_rmp_ctl = 0x80000000,
- .emif_rd_wr_lvl_ctl = 0x00000000,
- .emif_rd_wr_exec_thresh = 0x00000305
+ .sdram_config_init = 0x61851b32,
+ .sdram_config = 0x61851b32,
+ .sdram_config2 = 0x08000000,
+ .ref_ctrl = 0x000040F1,
+ .ref_ctrl_final = 0x00001035,
+ .sdram_tim1 = 0xcccf36b3,
+ .sdram_tim2 = 0x308f7fda,
+ .sdram_tim3 = 0x407f88a8,
+ .read_idle_ctrl = 0x00050000,
+ .zq_config = 0x5007190b,
+ .temp_alert_config = 0x00000000,
+ .emif_ddr_phy_ctlr_1_init = 0x0024400b,
+ .emif_ddr_phy_ctlr_1 = 0x0e24400b,
+ .emif_ddr_ext_phy_ctrl_1 = 0x10040100,
+ .emif_ddr_ext_phy_ctrl_2 = 0x00910091,
+ .emif_ddr_ext_phy_ctrl_3 = 0x00950095,
+ .emif_ddr_ext_phy_ctrl_4 = 0x009b009b,
+ .emif_ddr_ext_phy_ctrl_5 = 0x009e009e,
+ .emif_rd_wr_lvl_rmp_win = 0x00000000,
+ .emif_rd_wr_lvl_rmp_ctl = 0x80000000,
+ .emif_rd_wr_lvl_ctl = 0x00000000,
+ .emif_rd_wr_exec_thresh = 0x00000305
};
static const u32 beagle_x15_emif2_ddr3_ext_phy_ctrl_const_regs[] = {
@@ -221,7 +221,7 @@ struct vcores_data beagle_x15_volts = {
.mpu.efuse.reg_bits = DRA752_EFUSE_REGBITS,
.mpu.addr = TPS659038_REG_ADDR_SMPS12,
.mpu.pmic = &tps659038,
- .mpu.abb_tx_done_mask = OMAP_ABB_MPU_TXDONE_MASK,
+ .mpu.abb_tx_done_mask = OMAP_ABB_MPU_TXDONE_MASK,
.eve.value = VDD_EVE_DRA7,
.eve.efuse.reg = STD_FUSE_OPP_VMIN_DSPEVE,
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [U-Boot, 1/3] arm: omap: Introduce vcores_init function
2016-05-24 6:15 ` [U-Boot] [PATCH 1/3] " Keerthy
@ 2016-06-03 13:58 ` Tom Rini
0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2016-06-03 13:58 UTC (permalink / raw)
To: u-boot
On Tue, May 24, 2016 at 11:45:05AM +0530, Keerthy wrote:
> The pmic registers for variants of am57xx boards are different
> hence we need to assign them carefully based on the board type.
> Add a function to assign omap_vcores after the board detection.
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160603/15e889af/attachment.sig>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [U-Boot, 2/3] arm: am57xx: Fix omap_vcores assignment for am572x-idk
2016-05-24 6:15 ` [U-Boot] [PATCH 2/3] arm: am57xx: Fix omap_vcores assignment for am572x-idk Keerthy
@ 2016-06-03 13:58 ` Tom Rini
0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2016-06-03 13:58 UTC (permalink / raw)
To: u-boot
On Tue, May 24, 2016 at 11:45:06AM +0530, Keerthy wrote:
> Currently omap_vcores is wrongly assigned a default value of
> beagle_x15_volts. Hence populating a new structure for am572x-idk
> and assigning it to omap_vcores in the vcores_init function.
>
> Fixes: c020d355c45ed40fe12a ("board: ti: am57xx: Add support for am572x idk in SPL")
> Reported-by: Suman Anna <s-anna@ti.com>
> Signed-off-by: Keerthy <j-keerthy@ti.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160603/f3382194/attachment.sig>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [U-Boot, 3/3] arm: am57xx: Fix alignment where necessary
2016-05-24 6:15 ` [U-Boot] [PATCH 3/3] arm: am57xx: Fix alignment where necessary Keerthy
@ 2016-06-03 13:58 ` Tom Rini
0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2016-06-03 13:58 UTC (permalink / raw)
To: u-boot
On Tue, May 24, 2016 at 11:45:07AM +0530, Keerthy wrote:
> This just fixes alignment for better readability.
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160603/fd77277b/attachment.sig>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-06-03 13:58 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-24 6:15 [U-Boot] [PATCH 0/3] arm: omap: Introduce vcores_init function Keerthy
2016-05-24 6:15 ` [U-Boot] [PATCH 1/3] " Keerthy
2016-06-03 13:58 ` [U-Boot] [U-Boot, " Tom Rini
2016-05-24 6:15 ` [U-Boot] [PATCH 2/3] arm: am57xx: Fix omap_vcores assignment for am572x-idk Keerthy
2016-06-03 13:58 ` [U-Boot] [U-Boot, " Tom Rini
2016-05-24 6:15 ` [U-Boot] [PATCH 3/3] arm: am57xx: Fix alignment where necessary Keerthy
2016-06-03 13:58 ` [U-Boot] [U-Boot, " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox