ARM: DRA7xx: Update support for DRA7xx Soc's
Subsystems (2)
cover ARM: DRA7xx: Update support for DRA7xx Soc's
This series update support for DRA7xx family Socs and the data for DRA752 ES1.0 soc.
This is on top of my recent Misc cleanup series:
http://u-boot.10912.n7.nabble.com/PATCH-0-3-ARM-OMAP4-Misc-Cleanup-tt155877.html
Tested on DRA752 ES1.0, OMAP5432 ES2.0,
MAKEALL for all armv7 board has been verified.
Balaji T K (1):
mmc: omap_hsmmc: add mmc1 pbias, ldo1
Lokesh Vutla (6):
ARM: DRA7xx: Add control id code for DRA7xx
ARM: DRA7xx: power Add support for tps659038 PMIC
ARM: DRA7xx: clocks: Fixing i2c_init for PMIC
ARM: DRA7xx: Do not enable srcomp for DRA7xx Soc's
ARM: DRA7xx: Update pinmux data
ARM: DRA7xx: clocks: Update PLL values
Nishanth Menon (1):
ARM: OMAP5: DRA7xx: support class 0 optimized voltages
Sricharan R (4):
ARM: DRA7xx: Change the Debug UART to UART1
ARM: DRA7xx: Correct the SYS_CLK to 20MHZ
ARM: DRA7xx: Correct SRAM END address
ARM: DRA7xx: EMIF: Change settings required for EVM board
arch/arm/cpu/armv7/omap-common/clocks-common.c | 86 +++++++++--- arch/arm/cpu/armv7/omap-common/emif-common.c | 26 +++- arch/arm/cpu/armv7/omap-common/hwinit-common.c | 2 - arch/arm/cpu/armv7/omap5/hw_data.c | 156 ++++++++++++++++------ arch/arm/cpu/armv7/omap5/hwinit.c | 22 ++- arch/arm/cpu/armv7/omap5/prcm-regs.c | 2 + arch/arm/cpu/armv7/omap5/sdram.c | 170 ++++++++++++++++++++++-- arch/arm/include/asm/arch-omap4/clocks.h | 2 +- arch/arm/include/asm/arch-omap4/sys_proto.h | 1 + arch/arm/include/asm/arch-omap5/clocks.h | 64 ++++++++- arch/arm/include/asm/arch-omap5/mux_dra7xx.h | 7 +- arch/arm/include/asm/arch-omap5/omap.h | 14 +- arch/arm/include/asm/arch-omap5/sys_proto.h | 1 + arch/arm/include/asm/emif.h | 12 +- arch/arm/include/asm/omap_common.h | 26 +++- board/ti/dra7xx/mux_data.h | 38 ++++-- drivers/mmc/omap_hsmmc.c | 26 ++-- drivers/power/palmas.c | 25 +++- include/configs/dra7xx_evm.h | 11 ++ include/configs/omap5_common.h | 9 +- include/configs/omap5_uevm.h | 13 +- include/palmas.h | 5 +- 22 files changed, 582 insertions(+), 136 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/12 ARM: DRA7xx: Add control id code for DRA7xx
The registers that are used for device identification are changed from OMAP5 to DRA7xx.
Using the correct registers for DRA7xx.
--- arch/arm/include/asm/arch-omap5/clocks.h | 11 +++++++++++ arch/arm/include/asm/arch-omap5/omap.h | 3 --- 2 files changed, 11 insertions(+), 3 deletions(-)
arch/arm/include/asm/arch-omap5/clocks.h +11 -0
@@ -239,4 +239,15 @@* into microsec and passing the value. */ #define CONFIG_DEFAULT_OMAP_RESET_TIME_MAX_USEC 31219 + +/* CONTROL ID CODE */ +#define CONTROL_CORE_ID_CODE 0x4A002204 +#define CONTROL_WKUP_ID_CODE 0x4AE0C204 + +#ifdef CONFIG_DRA7XX +#define CONTROL_ID_CODE CONTROL_WKUP_ID_CODE +#else +#define CONTROL_ID_CODE CONTROL_CORE_ID_CODE +#endif +#endif /* _CLOCKS_OMAP5_H_ */
arch/arm/include/asm/arch-omap5/omap.h +0 -3
@@ -44,9 +44,6 @@#define DRAM_ADDR_SPACE_START OMAP54XX_DRAM_ADDR_SPACE_START#define DRAM_ADDR_SPACE_END OMAP54XX_DRAM_ADDR_SPACE_END -/* CONTROL_ID_CODE */ -#define CONTROL_ID_CODE 0x4A002204 -/* To be verified */ #define OMAP5430_CONTROL_ID_CODE_ES1_0 0x0B94202F#define OMAP5430_CONTROL_ID_CODE_ES2_0 0x1B94202F
Signature · 1 line
1.7.9.5
PATCH 2/12 ARM: DRA7xx: power Add support for tps659038 PMIC
In reply to Lokesh VutlaTPS659038 is the power IC used in DRA7XX boards.
Adding support for this and also adding pmic data
for DRA7XX boards.
--- arch/arm/cpu/armv7/omap-common/clocks-common.c | 23 ++++++++++++++ arch/arm/cpu/armv7/omap5/hw_data.c | 38 +++++++++++++++++++++++- arch/arm/include/asm/arch-omap4/sys_proto.h | 1 + arch/arm/include/asm/arch-omap5/clocks.h | 15 ++++++++++ arch/arm/include/asm/arch-omap5/sys_proto.h | 1 + arch/arm/include/asm/omap_common.h | 3 ++ 6 files changed, 80 insertions(+), 1 deletion(-)
arch/arm/cpu/armv7/omap-common/clocks-common.c +23 -0
@@ -30,6 +30,7 @@* MA 02111-1307 USA */ #include <common.h> +#include <i2c.h> #include <asm/omap_common.h> #include <asm/gpio.h> #include <asm/arch/clocks.h>
@@ -487,6 +488,9 @@ void do_scale_vcore(u32 vcore_reg, u32 volt_mv, struct pmic_data *pmic)u32 offset = volt_mv;int ret =0 ; +if (!volt_mv) +return ; + pmic->pmic_bus_init ();/* See if we can first get the GPIO if needed */ if (pmic->gpio_en)
@@ -534,6 +538,15 @@ void scale_vcores(struct vcores_data const *vcores)do_scale_vcore (vcores->mm.addr, vcores->mm.value, vcores->mm.pmic); +do_scale_vcore (vcores->gpu.addr, vcores->gpu.value, + vcores->gpu.pmic); + +do_scale_vcore (vcores->eve.addr, vcores->eve.value, + vcores->eve.pmic); + +do_scale_vcore (vcores->iva.addr, vcores->iva.value, + vcores->iva.pmic); +if (emif_sdram_type () ==EMIF_SDRAM_TYPE_DDR3 ) {/* Configure LDO SRAM "magic" bits */ writel (2 , (*prcm)->prm_sldo_core_setup);
@@ -723,3 +736,13 @@ void prcm_init(void)if (OMAP_INIT_CONTEXT_SPL !=omap_hw_init_context ())enable_basic_uboot_clocks (); } + +void gpi2c_init (void ) +{ +static int gpi2c =1 ; + +if (gpi2c) { +i2c_init (CONFIG_SYS_I2C_SPEED ,CONFIG_SYS_I2C_SLAVE ); + gpi2c =0 ; + } +}
arch/arm/cpu/armv7/omap5/hw_data.c +37 -1
@@ -26,6 +26,7 @@* MA 02111-1307 USA */ #include <common.h> +#include <palmas.h> #include <asm/arch/omap.h> #include <asm/arch/sys_proto.h> #include <asm/omap_common.h>
@@ -294,6 +295,19 @@ struct pmic_data palmas = { .pmic_write = omap_vc_bypass_send_value, }; +struct pmic_data tps659038 = { + .base_offset =PALMAS_SMPS_BASE_VOLT_UV , + .step =10000 ,/* 10 mV represented in uV */ +/* +* Offset codes 1-6 all give the base voltage in Palmas +* Offset code 0 switches OFF the SMPS +*/ + .start_code =6 , + .i2c_slave_addr =TPS659038_I2C_SLAVE_ADDR , + .pmic_bus_init = gpi2c_init, + .pmic_write = palmas_i2c_write_u8, +}; +struct vcores_data omap5430_volts = { .mpu.value =VDD_MPU , .mpu.addr =SMPS_REG_ADDR_12_MPU ,
@@ -322,6 +336,28 @@ struct vcores_data omap5430_volts_es2 = { .mm.pmic = &palmas, }; +struct vcores_data dra752_volts = { + .mpu.value =VDD_MPU_DRA752 , + .mpu.addr =TPS659038_REG_ADDR_SMPS12_MPU , + .mpu.pmic = &tps659038, + + .eve.value =VDD_EVE_DRA752 , + .eve.addr =TPS659038_REG_ADDR_SMPS45_EVE , + .eve.pmic = &tps659038, + + .gpu.value =VDD_GPU_DRA752 , + .gpu.addr =TPS659038_REG_ADDR_SMPS6_GPU , + .gpu.pmic = &tps659038, + + .core.value =VDD_CORE_DRA752 , + .core.addr =TPS659038_REG_ADDR_SMPS7_CORE , + .core.pmic = &tps659038, + + .iva.value =VDD_IVA_DRA752 , + .iva.addr =TPS659038_REG_ADDR_SMPS8_IVA , + .iva.pmic = &tps659038, +}; +/* * Enable essential clock domains, modules and * do some additional special settings needed
@@ -562,7 +598,7 @@ void hw_data_init(void)case DRA752_ES1_0 : *prcm = &dra7xx_prcm; *dplls_data = &dra7xx_dplls; - *omap_vcores = &omap5430_volts_es2; + *omap_vcores = &dra752_volts; *ctrl = &dra7xx_ctrl;break ;
arch/arm/include/asm/arch-omap4/sys_proto.h +1 -0
@@ -57,6 +57,7 @@ u32 cortex_rev(void);void init_omap_revision (void );void do_io_settings (void );void sri2c_init (void ); +void gpi2c_init (void );int omap_vc_bypass_send_value (u8 sa,u8 reg_addr,u8 reg_data);u32 warm_reset (void );void force_emif_self_refresh (void );
arch/arm/include/asm/arch-omap5/clocks.h +15 -0
@@ -212,9 +212,24 @@#define VDD_MPU_ES2_LOW 880#define VDD_MM_ES2_LOW 880 +/* TPS659038 Voltage settings in mv for OPP_NOMINAL */ +#define VDD_MPU_DRA752 1090 +#define VDD_EVE_DRA752 1060 +#define VDD_GPU_DRA752 1060 +#define VDD_CORE_DRA752 1030 +#define VDD_IVA_DRA752 1060 +/* Standard offset is 0.5v expressed in uv */ #define PALMAS_SMPS_BASE_VOLT_UV 500000 +/* TPS659038 */ +#define TPS659038_I2C_SLAVE_ADDR 0x58 +#define TPS659038_REG_ADDR_SMPS12_MPU 0x23 +#define TPS659038_REG_ADDR_SMPS45_EVE 0x2B +#define TPS659038_REG_ADDR_SMPS6_GPU 0x2F +#define TPS659038_REG_ADDR_SMPS7_CORE 0x33 +#define TPS659038_REG_ADDR_SMPS8_IVA 0x37 +/* TPS */ #define TPS62361_I2C_SLAVE_ADDR 0x60#define TPS62361_REG_ADDR_SET0 0x0
arch/arm/include/asm/arch-omap5/sys_proto.h +1 -0
@@ -61,6 +61,7 @@ u32 cortex_rev(void);void init_omap_revision (void );void do_io_settings (void );void sri2c_init (void ); +void gpi2c_init (void );int omap_vc_bypass_send_value (u8 sa,u8 reg_addr,u8 reg_data);u32 warm_reset (void );void force_emif_self_refresh (void );
arch/arm/include/asm/omap_common.h +3 -0
@@ -510,6 +510,9 @@ struct vcores_data {struct volts mpu;struct volts core;struct volts mm; +struct volts gpu; +struct volts eve; +struct volts iva; };extern struct prcm_regs const **prcm;
Signature · 1 line
1.7.9.5
PATCH 3/12 ARM: DRA7xx: clocks: Fixing i2c_init for PMIC
In reply to Lokesh VutlaIn DRA7xx Soc's voltage scaling is done using GPI2C. So i2c_init should happen before scaling. I2C driver uses __udelay which needs timer to be initialized. So moving timer_init just before voltage scaling.
--- arch/arm/cpu/armv7/omap-common/clocks-common.c | 1 + arch/arm/cpu/armv7/omap-common/hwinit-common.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-)
arch/arm/cpu/armv7/omap-common/clocks-common.c +1 -0
@@ -721,6 +721,7 @@ void prcm_init(void)case OMAP_INIT_CONTEXT_UBOOT_FROM_NOR :case OMAP_INIT_CONTEXT_UBOOT_AFTER_CH :enable_basic_clocks (); +timer_init ();scale_vcores (*omap_vcores);setup_dplls ();#ifdef CONFIG_SYS_CLOCKS_ENABLE_ALL
arch/arm/cpu/armv7/omap-common/hwinit-common.c +0 -2
@@ -202,8 +202,6 @@ void s_init(void)#endif prcm_init ();#ifdef CONFIG_SPL_BUILD -timer_init (); -/* For regular u-boot sdram_init() is called from dram_init() */ sdram_init ();#endif
Signature · 1 line
1.7.9.5
PATCH 4/12 ARM: OMAP5: DRA7xx: support class 0 optimized voltages
In reply to Lokesh VutlaFrom: Nishanth Menon <[email protected]>
DRA752 now uses AVS Class 0 voltages which are voltages in efuse.
This means that we can now use the optimized voltages which are stored as mV values in efuse and program PMIC accordingly.
This allows us to go with higher OPP as needed in the system without the need for implementing complex AVS logic.
--- arch/arm/cpu/armv7/omap-common/clocks-common.c | 58 +++++++++++++++++++----- arch/arm/cpu/armv7/omap5/hw_data.c | 10 ++++ arch/arm/include/asm/arch-omap5/clocks.h | 30 ++++++++++++ arch/arm/include/asm/omap_common.h | 11 +++++ 4 files changed, 97 insertions(+), 12 deletions(-)
arch/arm/cpu/armv7/omap-common/clocks-common.c +46 -12
@@ -521,6 +521,38 @@ void do_scale_vcore(u32 vcore_reg, u32 volt_mv, struct pmic_data *pmic)gpio_direction_output (pmic->gpio,1 ); } +static u32 optimize_vcore_voltage (struct volts const *v) +{ +u32 val; +if (!v->value) +return 0 ; +if (!v->efuse.reg) +return v->value; + +switch (v->efuse.reg_bits) { +case 16 : + val =readw (v->efuse.reg); +break ; +case 32 : + val =readl (v->efuse.reg); +break ; +default : +printf ("Error: efuse 0x%08x bits=%d unknown\n" , + v->efuse.reg, v->efuse.reg_bits); +return v->value; + } + +if (!val) { +printf ("Error: efuse 0x%08x bits=%d val=0, using %d\n" , + v->efuse.reg, v->efuse.reg_bits, v->value); +return v->value; + } + +debug ("%s:efuse 0x%08x bits=%d Vnom=%d, using efuse value %d\n" , + __func__, v->efuse.reg, v->efuse.reg_bits, v->value, val); +return val; +} +/* * Setup the voltages for vdd_mpu, vdd_core, and vdd_iva * We set the maximum voltages allowed here because Smart-Reflex is not
@@ -529,23 +561,25 @@ void do_scale_vcore(u32 vcore_reg, u32 volt_mv, struct pmic_data *pmic)*/ void scale_vcores (struct vcores_data const *vcores) { -do_scale_vcore (vcores->core.addr, vcores->core.value, - vcores->core.pmic); +u32 val; + + val =optimize_vcore_voltage (&vcores->core); +do_scale_vcore (vcores->core.addr, val, vcores->core.pmic); -do_scale_vcore (vcores->mpu.addr, vcores->mpu.value, - vcores->mpu.pmic); + val =optimize_vcore_voltage (&vcores->mpu); +do_scale_vcore (vcores->mpu.addr, val, vcores->mpu.pmic); -do_scale_vcore (vcores->mm.addr, vcores->mm.value, - vcores->mm.pmic); + val =optimize_vcore_voltage (&vcores->mm); +do_scale_vcore (vcores->mm.addr, val, vcores->mm.pmic); -do_scale_vcore (vcores->gpu.addr, vcores->gpu.value, - vcores->gpu.pmic); + val =optimize_vcore_voltage (&vcores->gpu); +do_scale_vcore (vcores->gpu.addr, val, vcores->gpu.pmic); -do_scale_vcore (vcores->eve.addr, vcores->eve.value, - vcores->eve.pmic); + val =optimize_vcore_voltage (&vcores->eve); +do_scale_vcore (vcores->eve.addr, val, vcores->eve.pmic); -do_scale_vcore (vcores->iva.addr, vcores->iva.value, - vcores->iva.pmic); + val =optimize_vcore_voltage (&vcores->iva); +do_scale_vcore (vcores->iva.addr, val, vcores->iva.pmic);if (emif_sdram_type () ==EMIF_SDRAM_TYPE_DDR3 ) {/* Configure LDO SRAM "magic" bits */
arch/arm/cpu/armv7/omap5/hw_data.c +10 -0
@@ -338,22 +338,32 @@ struct vcores_data omap5430_volts_es2 = {struct vcores_data dra752_volts = { .mpu.value =VDD_MPU_DRA752 , + .mpu.efuse.reg =STD_FUSE_OPP_VMIN_MPU_NOM , + .mpu.efuse.reg_bits =DRA752_EFUSE_REGBITS , .mpu.addr =TPS659038_REG_ADDR_SMPS12_MPU , .mpu.pmic = &tps659038, .eve.value =VDD_EVE_DRA752 , + .eve.efuse.reg =STD_FUSE_OPP_VMIN_DSPEVE_NOM , + .eve.efuse.reg_bits =DRA752_EFUSE_REGBITS , .eve.addr =TPS659038_REG_ADDR_SMPS45_EVE , .eve.pmic = &tps659038, .gpu.value =VDD_GPU_DRA752 , + .gpu.efuse.reg =STD_FUSE_OPP_VMIN_GPU_NOM , + .gpu.efuse.reg_bits =DRA752_EFUSE_REGBITS , .gpu.addr =TPS659038_REG_ADDR_SMPS6_GPU , .gpu.pmic = &tps659038, .core.value =VDD_CORE_DRA752 , + .core.efuse.reg =STD_FUSE_OPP_VMIN_CORE_NOM , + .core.efuse.reg_bits =DRA752_EFUSE_REGBITS , .core.addr =TPS659038_REG_ADDR_SMPS7_CORE , .core.pmic = &tps659038, .iva.value =VDD_IVA_DRA752 , + .iva.efuse.reg =STD_FUSE_OPP_VMIN_IVA_NOM , + .iva.efuse.reg_bits =DRA752_EFUSE_REGBITS , .iva.addr =TPS659038_REG_ADDR_SMPS8_IVA , .iva.pmic = &tps659038, };
arch/arm/include/asm/arch-omap5/clocks.h +30 -0
@@ -219,6 +219,36 @@#define VDD_CORE_DRA752 1030#define VDD_IVA_DRA752 1060 +/* Efuse register offsets for DRA7xx platform */ +#define DRA752_EFUSE_BASE 0x4A002000 +#define DRA752_EFUSE_REGBITS 16 +/* STD_FUSE_OPP_VMIN_IVA_2 */ +#define STD_FUSE_OPP_VMIN_IVA_NOM (DRA752_EFUSE_BASE + 0x05CC) +/* STD_FUSE_OPP_VMIN_IVA_3 */ +#define STD_FUSE_OPP_VMIN_IVA_OD (DRA752_EFUSE_BASE + 0x05D0) +/* STD_FUSE_OPP_VMIN_IVA_4 */ +#define STD_FUSE_OPP_VMIN_IVA_HIGH (DRA752_EFUSE_BASE + 0x05D4) +/* STD_FUSE_OPP_VMIN_DSPEVE_2 */ +#define STD_FUSE_OPP_VMIN_DSPEVE_NOM (DRA752_EFUSE_BASE + 0x05E0) +/* STD_FUSE_OPP_VMIN_DSPEVE_3 */ +#define STD_FUSE_OPP_VMIN_DSPEVE_OD (DRA752_EFUSE_BASE + 0x05E4) +/* STD_FUSE_OPP_VMIN_DSPEVE_4 */ +#define STD_FUSE_OPP_VMIN_DSPEVE_HIGH (DRA752_EFUSE_BASE + 0x05E8) +/* STD_FUSE_OPP_VMIN_CORE_2 */ +#define STD_FUSE_OPP_VMIN_CORE_NOM (DRA752_EFUSE_BASE + 0x05F4) +/* STD_FUSE_OPP_VMIN_GPU_2 */ +#define STD_FUSE_OPP_VMIN_GPU_NOM (DRA752_EFUSE_BASE + 0x1B08) +/* STD_FUSE_OPP_VMIN_GPU_3 */ +#define STD_FUSE_OPP_VMIN_GPU_OD (DRA752_EFUSE_BASE + 0x1B0C) +/* STD_FUSE_OPP_VMIN_GPU_4 */ +#define STD_FUSE_OPP_VMIN_GPU_HIGH (DRA752_EFUSE_BASE + 0x1B10) +/* STD_FUSE_OPP_VMIN_MPU_2 */ +#define STD_FUSE_OPP_VMIN_MPU_NOM (DRA752_EFUSE_BASE + 0x1B20) +/* STD_FUSE_OPP_VMIN_MPU_3 */ +#define STD_FUSE_OPP_VMIN_MPU_OD (DRA752_EFUSE_BASE + 0x1B24) +/* STD_FUSE_OPP_VMIN_MPU_4 */ +#define STD_FUSE_OPP_VMIN_MPU_HIGH (DRA752_EFUSE_BASE + 0x1B28) +/* Standard offset is 0.5v expressed in uv */ #define PALMAS_SMPS_BASE_VOLT_UV 500000
arch/arm/include/asm/omap_common.h +11 -0
@@ -500,9 +500,20 @@ struct pmic_data {int (*pmic_write)(u8 sa,u8 reg_addr,u8 reg_data); }; +/** +* struct volts_efuse_data - efuse definition for voltage +* @reg: register address for efuse +* @reg_bits: Number of bits in a register address, mandatory. +*/ +struct volts_efuse_data { +u32 reg; +u8 reg_bits; +}; +struct volts {u32 value;u32 addr; +struct volts_efuse_data efuse;struct pmic_data *pmic; };
Signature · 1 line
1.7.9.5
PATCH 5/12 ARM: DRA7xx: Do not enable srcomp for DRA7xx Soc's
In reply to Lokesh VutlaSlew rate compensation cells are not present for DRA7xx Soc's. So return from function srcomp_enable() if soc is not OMAP54xx.
--- arch/arm/cpu/armv7/omap5/hwinit.c | 3 +++ arch/arm/include/asm/omap_common.h | 8 ++++++++ 2 files changed, 11 insertions(+)
arch/arm/cpu/armv7/omap5/hwinit.c +3 -0
@@ -201,6 +201,9 @@ void srcomp_enable(void)u32 sysclk_ind =get_sys_clk_index ();u32 omap_rev =omap_revision (); +if (!is_omap54xx ()) +return ; + mul_factor = srcomp_parameters[sysclk_ind].multiply_factor; div_factor = srcomp_parameters[sysclk_ind].divide_factor;
arch/arm/include/asm/omap_common.h +8 -0
@@ -575,6 +575,14 @@ static inline u32 omap_revision(void)extern u32 *const omap_si_rev; return *omap_si_rev; } + +#define OMAP54xx 0x54000000 + +static inline u8 is_omap54xx (void ) +{ +extern u32 *const omap_si_rev; +return ((*omap_si_rev &0xFF000000 ) == OMAP54xx); +}#endif /*
Signature · 1 line
1.7.9.5
PATCH 6/12 ARM: DRA7xx: Change the Debug UART to UART1
In reply to Lokesh VutlaFrom: Sricharan R <[email protected]>
Serial UART is connected to UART1. So add the change for the same.
--- include/configs/dra7xx_evm.h | 3 +++ include/configs/omap5_common.h | 4 ---- include/configs/omap5_uevm.h | 4 ++++ 3 files changed, 7 insertions(+), 4 deletions(-)
include/configs/dra7xx_evm.h +3 -0
@@ -35,4 +35,7 @@#define CONFIG_DRA7XX /* in a TI DRA7XX core */ #define CONFIG_SYS_PROMPT "DRA752 EVM # " +#define CONFIG_CONS_INDEX 1 +#define CONFIG_SYS_NS16550_COM1 UART1_BASE +#define CONFIG_BAUDRATE 115200#endif /* __CONFIG_DRA7XX_EVM_H */
include/configs/omap5_common.h +0 -4
@@ -81,10 +81,6 @@#define CONFIG_SYS_NS16550_SERIAL #define CONFIG_SYS_NS16550_REG_SIZE (-4)#define CONFIG_SYS_NS16550_CLK V_NS16550_CLK -#define CONFIG_CONS_INDEX 3 -#define CONFIG_SYS_NS16550_COM3 UART3_BASE - -#define CONFIG_BAUDRATE 115200/* CPU */ #define CONFIG_ARCH_CPU_INIT
include/configs/omap5_uevm.h +4 -0
@@ -35,6 +35,10 @@#include <configs/omap5_common.h> +#define CONFIG_CONS_INDEX 3 +#define CONFIG_SYS_NS16550_COM3 UART3_BASE +#define CONFIG_BAUDRATE 115200 +/* TWL6035 */ #ifndef CONFIG_SPL_BUILD #define CONFIG_PALMAS_POWER
Signature · 1 line
1.7.9.5
PATCH 7/12 ARM: DRA7xx: Correct the SYS_CLK to 20MHZ
In reply to Lokesh VutlaFrom: Sricharan R <[email protected]>
The sys_clk on the dra evm board is 20MHZ.
Changing the configuration for the same.
--- include/configs/dra7xx_evm.h | 4 ++++ include/configs/omap5_common.h | 1 - include/configs/omap5_uevm.h | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-)
include/configs/dra7xx_evm.h +4 -0
@@ -38,4 +38,8 @@#define CONFIG_CONS_INDEX 1#define CONFIG_SYS_NS16550_COM1 UART1_BASE#define CONFIG_BAUDRATE 115200 + +/* Clock Defines */ +#define V_OSCK 20000000/* Clock output from T2 */ +#endif /* __CONFIG_DRA7XX_EVM_H */
include/configs/omap5_common.h +0 -1
@@ -46,7 +46,6 @@#define CONFIG_DISPLAY_BOARDINFO /* Clock Defines */ -#define V_OSCK 19200000/* Clock output from T2 */ #define V_SCLK V_OSCK#define CONFIG_MISC_INIT_R
include/configs/omap5_uevm.h +3 -0
@@ -58,5 +58,8 @@#define CONFIG_SYS_PROMPT "OMAP5430 EVM # " +/* Clock Defines */ +#define V_OSCK 19200000/* Clock output from T2 */ +#define CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC 16296#endif /* __CONFIG_OMAP5_EVM_H */
Signature · 1 line
1.7.9.5
PATCH 7/12 ARM: DRA7xx: Correct the SYS_CLK to 20MHZ
Quoted 11 lines · Lokesh Vutla
From: Sricharan R <[email protected]>
The
sys_clkon the dra evm board is 20MHZ.
Changing the configuration for the same.Signed-off-by Sricharan R <[email protected]>--- include/configs/dra7xx_evm.h | 4 ++++ include/configs/omap5_common.h | 1 - include/configs/omap5_uevm.h | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-)
OK, lets start fixing some of this madness while we're in here. V_OSCK (setting aside am335x) is only used for V_SCLK. V_SCLK is only used for TIMER_CLOCK in arch/arm/cpu/armv7/omap-common/timer.c. We need to move this value (or value pair) into <asm/arch/clock.h> and rename omap*/clocks.h to clock.h (it's the outlier vs the rest of ARM).
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130529/ce914972/attachment.pgp>
PATCH 8/12 ARM: DRA7xx: Correct SRAM END address
In reply to Lokesh VutlaFrom: Sricharan R <[email protected]>
NON SECURE SRAM is 512KB in DRA7xx devices.
So fixing it here.
--- arch/arm/include/asm/arch-omap5/omap.h | 7 ------- include/configs/dra7xx_evm.h | 3 +++ include/configs/omap5_uevm.h | 3 +++ 3 files changed, 6 insertions(+), 7 deletions(-)
arch/arm/include/asm/arch-omap5/omap.h +0 -7
@@ -159,13 +159,6 @@ struct s32ktimer {#define EFUSE_4 0x45145100#endif /* __ASSEMBLY__ */ -/* -* Non-secure SRAM Addresses -* Non-secure RAM starts at 0x40300000 for GP devices. But we keep SRAM_BASE -* at 0x40304000(EMU base) so that our code works for both EMU and GP -*/ -#define NON_SECURE_SRAM_START 0x40300000 -#define NON_SECURE_SRAM_END 0x40320000/* Not inclusive */ /* base address for indirect vectors (internal boot mode) */ #define SRAM_ROM_VECT_BASE 0x4031F000
include/configs/dra7xx_evm.h +3 -0
@@ -42,4 +42,7 @@/* Clock Defines */ #define V_OSCK 20000000/* Clock output from T2 */ +#define NON_SECURE_SRAM_START 0x40300000 +#define NON_SECURE_SRAM_END 0x40380000/* Not inclusive */ +#endif /* __CONFIG_DRA7XX_EVM_H */
include/configs/omap5_uevm.h +3 -0
@@ -61,5 +61,8 @@/* Clock Defines */ #define V_OSCK 19200000/* Clock output from T2 */ +#define NON_SECURE_SRAM_START 0x40300000 +#define NON_SECURE_SRAM_END 0x40320000/* Not inclusive */ +#define CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC 16296#endif /* __CONFIG_OMAP5_EVM_H */
Signature · 1 line
1.7.9.5
PATCH 8/12 ARM: DRA7xx: Correct SRAM END address
Quoted 10 lines · Lokesh Vutla
From: Sricharan R <[email protected]>
NON SECURE SRAM is 512KB in DRA7xx devices.
So fixing it here.Signed-off-by Sricharan R <[email protected]>--- arch/arm/include/asm/arch-omap5/omap.h | 7 ------- include/configs/dra7xx_evm.h | 3 +++ include/configs/omap5_uevm.h | 3 +++
No, we need to handle this in the include files, not the config files.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130529/a4e67a7f/attachment.pgp>
PATCH 8/12 ARM: DRA7xx: Correct SRAM END address
Quoted 7 lines · Tom Rini
Quoted 5 lines · Lokesh Vutla
From: Sricharan R <[email protected]>
NON SECURE SRAM is 512KB in DRA7xx devices.
So fixing it here.
Quoted 7 lines
Quoted 5 lines
Signed-off-by Sricharan R <[email protected]>--- arch/arm/include/asm/arch-omap5/omap.h | 7 ------- include/configs/dra7xx_evm.h | 3 +++ include/configs/omap5_uevm.h | 3 +++No, we need to handle this in the include files, not the config files.
Ok.. The only concern was headers were shared between OMAP5/DRA and this results in #ifdef CONFIG_XX checks. Just thinking how to handle this better.
Regards,
Sricharan
PATCH 8/12 ARM: DRA7xx: Correct SRAM END address
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 11 lines · Sricharan R
Quoted 10 lines · Tom Rini
Quoted 8 lines · Lokesh Vutla
From: Sricharan R <[email protected]>
NON SECURE SRAM is 512KB in DRA7xx devices. So fixing it here.
Signed-off-by Sricharan R <[email protected]> ---arch/arm/include/asm/arch-omap5/omap.h | 7 ------- include/configs/dra7xx_evm.h | 3 +++ include/configs/omap5_uevm.h | 3 +++
Quoted 6 lines
Quoted 3 lines
No, we need to handle this in the include files, not the config files.
Ok.. The only concern was headers were shared between OMAP5/DRA and this results in #ifdef
CONFIG_XXchecks. Just thinking how to handle this better.
That's fine. If we end up with large differences we can split the files, ala am335x and ti814x (and later, ti816x).
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJRpgg/AAoJENk4IS6UOR1WwpoP/0dzJxZRFRRStw96ef46hi8m gtCBN4AXxTrv5+d2wgShOxmFTufTqHYJDi68kVKmrB3brMUjpgbp/ApTyi4a4vRh Dim9VWHHnlFZOKHwJwfDNr6CTx4mPXmI2qs94pfzHOvFmGtfkhYRVF/wbF1XwgW5 86Qep+YW1mr62t3kact+Cg6Pln3Krbb3RjX3waUSZeKzOlifaSI3Dntvp2uLgrA2 YQCIVVYd3TE8L7utgHF48v8x7aRuAxcd5ZtZvtXoVAxXv3zFyyibGyBFFXxnMmLz 0dFwUm9mE1+MYATAjcxlB+OpD5bJDp30JhtF0s42rvrQGyBxy1mdLAQBxR0DxoPa 1GvhQgWKGJKhwXr9TSDT3N1DTCt0nPEzjs7iekz2NLHjhoYMPL/yfj0rliyfaw5o O2S3I1d1Yy/V0gyLJgAey1SqC4G9n9XQyjsxAeSdosdDHSKUM3w6bkIS+UbTL8OZ gq1MteO/fddvSGQIR5+YQ6R7boH3BenSOxJRiKNMWVXlDiqZGgMRSEqT/HGnrBgh WBM0Va5c3HJjce4WXc+gWpJR+QREB6cHuc7lRGjI+VAKFioFDdaDXQSc2TJ6Q74W QRwl0xCMgykvXekHG9t+KXrSBFh1cDiJXeyI9dD3UnvE09Hzu1DwPCZf/XfhcT+4 ic2Z/9fUSgPfHFqZqOnq
=/EmW
-----END PGP SIGNATURE-----
PATCH 9/12 mmc: omap_hsmmc: add mmc1 pbias, ldo1
In reply to Lokesh VutlaFrom: Balaji T K <[email protected]>
add dra mmc pbias support and ldo1 power on
--- arch/arm/include/asm/arch-omap5/omap.h | 3 ++- drivers/mmc/omap_hsmmc.c | 26 ++++++++++++++------------ drivers/power/palmas.c | 25 ++++++++++++++++++++++++- include/configs/omap5_common.h | 4 ++++ include/configs/omap5_uevm.h | 5 ----- include/palmas.h | 5 ++++- 6 files changed, 48 insertions(+), 20 deletions(-)
arch/arm/include/asm/arch-omap5/omap.h +2 -1
@@ -96,9 +96,10 @@/* CONTROL_EFUSE_2 */ #define CONTROL_EFUSE_2_NMOS_PMOS_PTV_CODE_1 0x00ffc000 +#define SDCARD_BIAS_PWRDNZ (1 << 27)#define SDCARD_PWRDNZ (1 << 26)#define SDCARD_BIAS_HIZ_MODE (1 << 25) -#define SDCARD_BIAS_PWRDNZ (1 << 22) +#define SDCARD_BIAS_PWRDNZ2 (1 << 22)#define SDCARD_PBIASLITE_VMODE (1 << 21)#ifndef __ASSEMBLY__
drivers/mmc/omap_hsmmc.c +14 -12
@@ -113,23 +113,25 @@ static void omap5_pbias_config(struct mmc *mmc)u32 value =0 ; value =readl ((*ctrl)->control_pbias); - value &= ~(SDCARD_PWRDNZ |SDCARD_BIAS_PWRDNZ ); - value |=SDCARD_BIAS_HIZ_MODE ; + value &= ~SDCARD_PWRDNZ ; +writel (value, (*ctrl)->control_pbias); +udelay (10 );/* wait 10 us */ + value &= ~SDCARD_BIAS_PWRDNZ ;writel (value, (*ctrl)->control_pbias); -palmas_mmc1_poweron_ldo (); +#if defined(CONFIG_DRA7XX ) +palmas_mmc1_poweron_ldo1 (); +#else +palmas_mmc1_poweron_ldo9 (); +#endif value =readl ((*ctrl)->control_pbias); - value &= ~SDCARD_BIAS_HIZ_MODE ; - value |=SDCARD_PBIASLITE_VMODE |SDCARD_PWRDNZ |SDCARD_BIAS_PWRDNZ ; + value |=SDCARD_BIAS_PWRDNZ ;writel (value, (*ctrl)->control_pbias); - - value =readl ((*ctrl)->control_pbias); -if (value & (1 <<23 )) { - value &= ~(SDCARD_PWRDNZ |SDCARD_BIAS_PWRDNZ ); - value |=SDCARD_BIAS_HIZ_MODE ; -writel (value, (*ctrl)->control_pbias); - } +udelay (150 );/* wait 10 us */ + value |=SDCARD_PWRDNZ ; +writel (value, (*ctrl)->control_pbias); + udelay(150); /* wait 10 us */ }#endif
drivers/power/palmas.c +24 -1
@@ -28,7 +28,7 @@ void palmas_init_settings(void)return ; } -int palmas_mmc1_poweron_ldo (void ) +int palmas_mmc1_poweron_ldo9 (void ) {u8 val =0 ;
@@ -50,3 +50,26 @@ int palmas_mmc1_poweron_ldo(void)return 0 ; } + +int palmas_mmc1_poweron_ldo1 (void ) +{ +u8 val =0 ; + +/* set LDO9 TWL6035 to 3V */ + val =0x2b ;/* (3 -.9)*20 +1 */ + +if (palmas_i2c_write_u8 (0x58 ,LDO1_VOLTAGE , val)) { +printf ("twl6035: could not set LDO1 voltage\n" ); +return 1 ; + } + +/* TURN ON LDO9 */ + val =LDO_ON |LDO_MODE_SLEEP |LDO_MODE_ACTIVE ; + +if (palmas_i2c_write_u8 (0x58 ,LDO1_CTRL , val)) { +printf ("twl6035: could not turn on LDO1\n" ); +return 1 ; + } + +return 0 ; +}
include/configs/omap5_common.h +4 -0
@@ -241,6 +241,10 @@#define CONFIG_SYS_DEFAULT_LPDDR2_TIMINGS #endif +#ifndef CONFIG_SPL_BUILD +#define CONFIG_PALMAS_POWER +#endif +/* Defines for SPL */ #define CONFIG_SPL #define CONFIG_SPL_FRAMEWORK
include/configs/omap5_uevm.h +0 -5
@@ -39,11 +39,6 @@#define CONFIG_SYS_NS16550_COM3 UART3_BASE#define CONFIG_BAUDRATE 115200 -/* TWL6035 */ -#ifndef CONFIG_SPL_BUILD -#define CONFIG_PALMAS_POWER -#endif -/* MMC ENV related defines */ #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 1/* SLOT2: eMMC(1) */
include/palmas.h +4 -1
@@ -30,6 +30,8 @@#define PALMAS_CHIP_ADDR 0x48/* 0x1XY translates to page 1, register address 0xXY */ +#define LDO1_CTRL 0x50 +#define LDO1_VOLTAGE 0x51#define LDO9_CTRL 0x60#define LDO9_VOLTAGE 0x61
@@ -53,6 +55,7 @@ static inline int palmas_i2c_read_u8(u8 chip_no, u8 reg, u8 *val) }void palmas_init_settings (void ); -int palmas_mmc1_poweron_ldo (void ); +int palmas_mmc1_poweron_ldo9 (void ); +int palmas_mmc1_poweron_ldo1 (void );#endif /* PALMAS_H */
Signature · 1 line
1.7.9.5
PATCH 9/12 mmc: omap_hsmmc: add mmc1 pbias, ldo1
Quoted 6 lines · Lokesh Vutla
From: Balaji T K <[email protected]>
add dra mmc pbias support and ldo1 power on
Signed-off-by Balaji T K <[email protected]>Signed-off-by Lokesh Vutla <[email protected]>
[snip]
drivers/mmc/omap_hsmmc.c static void omap5_pbias_config(struct mmc *mmc) · line 134
Quoted 4 lines
drivers/mmc/omap_hsmmc.c +4
-0+udelay (150 );/* wait 10 us */ + value |=SDCARD_PWRDNZ ; +writel (value, (*ctrl)->control_pbias); +udelay (150 );/* wait 10 us */
That's not 10us.
drivers/power/palmas.c int palmas_mmc1_poweron_ldo(void) · line 59
Quoted 1 line
drivers/power/palmas.c +1
-0+ val =0x2b ;/* (3 -.9)*20 +1 */
Consistent spacing in the math please (and leading 0).
drivers/power/palmas.c int palmas_mmc1_poweron_ldo(void) · line 69
Quoted 1 line
drivers/power/palmas.c +1
-0+if (palmas_i2c_write_u8 (0x58 ,LDO1_CTRL , val)) {
No magic values please.
Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130529/1fa9bcfe/attachment.pgp>
PATCH 10/12 ARM: DRA7xx: Update pinmux data
In reply to Lokesh VutlaUpdating pinmux data as specified in the latest DM
--- arch/arm/include/asm/arch-omap5/mux_dra7xx.h | 7 +++-- board/ti/dra7xx/mux_data.h | 38 ++++++++++++++++---------- 2 files changed, 29 insertions(+), 16 deletions(-)
arch/arm/include/asm/arch-omap5/mux_dra7xx.h +5 -2
@@ -28,11 +28,14 @@#include <asm/types.h> +#define FSC (1 << 19) +#define SSC (0 << 19) +#define IEN (1 << 18)#define IDIS (0 << 18) -#define PTU (3 << 16) -#define PTD (1 << 16) +#define PTU (1 << 17) +#define PTD (0 << 17)#define PEN (1 << 16)#define PDIS (0 << 16)
board/ti/dra7xx/mux_data.h +24 -14
@@ -29,19 +29,29 @@#include <asm/arch/mux_dra7xx.h> const struct pad_conf_entry core_padconf_array_essential[] = { - {MMC1_CLK , (PTU |IEN |M0 )},/* MMC1_CLK */ - {MMC1_CMD , (PTU |IEN |M0 )},/* MMC1_CMD */ - {MMC1_DAT0 , (PTU |IEN |M0 )},/* MMC1_DAT0 */ - {MMC1_DAT1 , (PTU |IEN |M0 )},/* MMC1_DAT1 */ - {MMC1_DAT2 , (PTU |IEN |M0 )},/* MMC1_DAT2 */ - {MMC1_DAT3 , (PTU |IEN |M0 )},/* MMC1_DAT3 */ - {MMC1_SDCD , (PTU |IEN |M0 )},/* MMC1_SDCD */ - {MMC1_SDWP , (PTU |IEN |M0 )},/* MMC1_SDWP */ - {UART1_RXD , (PTU |IEN |M0 )},/* UART1_RXD */ - {UART1_TXD , (M0 )},/* UART1_TXD */ - {UART1_CTSN , (PTU |IEN |M0 )},/* UART1_CTSN */ - {UART1_RTSN , (M0 )},/* UART1_RTSN */ - {I2C1_SDA , (PTU |IEN |M0 )},/* I2C1_SDA */ - {I2C1_SCL , (PTU |IEN |M0 )},/* I2C1_SCL */ + {MMC1_CLK , (IEN |PTU |PDIS |M0 )},/* MMC1_CLK */ + {MMC1_CMD , (IEN |PTU |PDIS |M0 )},/* MMC1_CMD */ + {MMC1_DAT0 , (IEN |PTU |PDIS |M0 )},/* MMC1_DAT0 */ + {MMC1_DAT1 , (IEN |PTU |PDIS |M0 )},/* MMC1_DAT1 */ + {MMC1_DAT2 , (IEN |PTU |PDIS |M0 )},/* MMC1_DAT2 */ + {MMC1_DAT3 , (IEN |PTU |PDIS |M0 )},/* MMC1_DAT3 */ + {MMC1_SDCD , (FSC |IEN |PTU |PDIS |M0 )},/* MMC1_SDCD */ + {MMC1_SDWP , (FSC |IEN |PTD |PEN |M14 )},/* MMC1_SDWP */ + {GPMC_A19 , (IEN |PTU |PDIS |M1 )},/* mmc2_dat4 */ + {GPMC_A20 , (IEN |PTU |PDIS |M1 )},/* mmc2_dat5 */ + {GPMC_A21 , (IEN |PTU |PDIS |M1 )},/* mmc2_dat6 */ + {GPMC_A22 , (IEN |PTU |PDIS |M1 )},/* mmc2_dat7 */ + {GPMC_A23 , (IEN |PTU |PDIS |M1 )},/* mmc2_clk */ + {GPMC_A24 , (IEN |PTU |PDIS |M1 )},/* mmc2_dat0 */ + {GPMC_A25 , (IEN |PTU |PDIS |M1 )},/* mmc2_dat1 */ + {GPMC_A26 , (IEN |PTU |PDIS |M1 )},/* mmc2_dat2 */ + {GPMC_A27 , (IEN |PTU |PDIS |M1 )},/* mmc2_dat3 */ + {GPMC_CS1 , (IEN |PTU |PDIS |M1 )},/* mmm2_cmd */ + {UART1_RXD , (FSC |IEN |PTU |PDIS |M0 )},/* UART1_RXD */ + {UART1_TXD , (FSC |IEN |PTU |PDIS |M0 )},/* UART1_TXD */ + {UART1_CTSN , (IEN |PTU |PDIS |M3 )},/* UART1_CTSN */ + {UART1_RTSN , (IEN |PTU |PDIS |M3 )},/* UART1_RTSN */ + {I2C1_SDA , (IEN |PTU |PDIS |M0 )},/* I2C1_SDA */ + {I2C1_SCL , (IEN |PTU |PDIS |M0 )},/* I2C1_SCL */ };#endif /* _MUX_DATA_DRA7XX_H_ */
Signature · 1 line
1.7.9.5
PATCH 11/12 ARM: DRA7xx: clocks: Update PLL values
In reply to Lokesh VutlaUpdate PLL values.SYS_CLKSEL value for 20MHz is changed to 2. In other platforms SYS_CLKSEL value 2 represents reserved. But in sys_clk array ind 1 is used for 13Mhz. Since other platforms are not using 13Mhz, reusing index 1 for 20MHz.
--- arch/arm/cpu/armv7/omap-common/clocks-common.c | 16 ++--- arch/arm/cpu/armv7/omap5/hw_data.c | 87 +++++++++++++++--------- arch/arm/cpu/armv7/omap5/prcm-regs.c | 1 + arch/arm/include/asm/arch-omap4/clocks.h | 2 +- arch/arm/include/asm/arch-omap5/clocks.h | 8 ++- arch/arm/include/asm/omap_common.h | 3 +- include/configs/dra7xx_evm.h | 1 + 7 files changed, 72 insertions(+), 46 deletions(-)
arch/arm/cpu/armv7/omap-common/clocks-common.c +7 -9
@@ -50,13 +50,12 @@const u32 sys_clk_array[8 ] = {12000000 ,/* 12 MHz */ -13000000 ,/* 13 MHz */ +20000000 ,/* 20 MHz */ 16800000 ,/* 16.8 MHz */ 19200000 ,/* 19.2 MHz */ 26000000 ,/* 26 MHz */ 27000000 ,/* 27 MHz */ 38400000 ,/* 38.4 MHz */ -20000000 ,/* 20 MHz */ };static inline u32 __get_sys_clk_index (void )
@@ -75,13 +74,6 @@ static inline u32 __get_sys_clk_index(void)/* SYS_CLKSEL - 1 to match the dpll param array indices */ ind = (readl ((*prcm)->cm_sys_clksel) &CM_SYS_CLKSEL_SYS_CLKSEL_MASK ) -1 ; -/* -* SYS_CLKSEL value for 20MHz is 0. This is introduced newly -* in DRA7XX socs. SYS_CLKSEL -1 will be greater than -* NUM_SYS_CLK. So considering the last 3 bits as the index -* for the dpll param array. -*/ - ind &=CM_SYS_CLKSEL_SYS_CLKSEL_MASK ; }return ind; }
@@ -441,6 +433,12 @@ static void setup_non_essential_dplls(void) params =get_abe_dpll_params (*dplls_data);#ifdef CONFIG_SYS_OMAP_ABE_SYSCK abe_ref_clk =CM_ABE_PLL_REF_CLKSEL_CLKSEL_SYSCLK ; + +if (omap_revision () ==DRA752_ES1_0 ) +/* Select the sys clk for dpll_abe */ +clrsetbits_le32 ((*prcm)->cm_abe_pll_sys_clksel, +CM_CLKSEL_ABE_PLL_SYS_CLKSEL_MASK , +CM_ABE_PLL_SYS_CLKSEL_SYSCLK2 );#else abe_ref_clk =CM_ABE_PLL_REF_CLKSEL_CLKSEL_32KCLK ;/*
arch/arm/cpu/armv7/omap5/hw_data.c +53 -34
138 lines not on this page · raw message
arch/arm/cpu/armv7/omap5/prcm-regs.c +1 -0
@@ -943,6 +943,7 @@ struct prcm_regs const dra7xx_prcm = {/* l4 wkup regs */ .cm_abe_pll_ref_clksel = 0x4ae0610c, .cm_sys_clksel = 0x4ae06110, + .cm_abe_pll_sys_clksel = 0x4ae06118, .cm_wkup_clkstctrl = 0x4ae07800, .cm_wkup_l4wkup_clkctrl = 0x4ae07820, .cm_wkup_wdtimer1_clkctrl = 0x4ae07828,
arch/arm/include/asm/arch-omap4/clocks.h +1 -1
@@ -76,7 +76,7 @@#define CM_CLKSEL_DCC_EN_MASK (1 << 22)/* CM_SYS_CLKSEL */ -#define CM_SYS_CLKSEL_SYS_CLKSEL_MASK 7 +#define CM_SYS_CLKSEL_SYS_CLKSEL_MASK 7/* CM_CLKSEL_CORE */ #define CLKSEL_CORE_SHIFT 0
arch/arm/include/asm/arch-omap5/clocks.h +7 -1
@@ -81,7 +81,7 @@#define CM_CLKSEL_DCC_EN_MASK (1 << 22)/* CM_SYS_CLKSEL */ -#define CM_SYS_CLKSEL_SYS_CLKSEL_MASK 7 +#define CM_SYS_CLKSEL_SYS_CLKSEL_MASK 7/* CM_CLKSEL_CORE */ #define CLKSEL_CORE_SHIFT 0
@@ -98,6 +98,12 @@#define CM_ABE_PLL_REF_CLKSEL_CLKSEL_SYSCLK 0#define CM_ABE_PLL_REF_CLKSEL_CLKSEL_32KCLK 1 +/* CM_CLKSEL_ABE_PLL_SYS */ +#define CM_CLKSEL_ABE_PLL_SYS_CLKSEL_SHIFT 0 +#define CM_CLKSEL_ABE_PLL_SYS_CLKSEL_MASK 1 +#define CM_ABE_PLL_SYS_CLKSEL_SYSCLK1 0 +#define CM_ABE_PLL_SYS_CLKSEL_SYSCLK2 1 +/* CM_BYPCLK_DPLL_IVA */ #define CM_BYPCLK_DPLL_IVA_CLKSEL_SHIFT 0#define CM_BYPCLK_DPLL_IVA_CLKSEL_MASK 3
arch/arm/include/asm/omap_common.h +2 -1
@@ -29,7 +29,7 @@#include <common.h> -#define NUM_SYS_CLKS 8 +#define NUM_SYS_CLKS 7struct prcm_regs {/* cm1.ckgen */
@@ -301,6 +301,7 @@ struct prcm_regs {/* l4 wkup regs */ u32 cm_abe_pll_ref_clksel;u32 cm_sys_clksel; +u32 cm_abe_pll_sys_clksel;u32 cm_wkup_clkstctrl;u32 cm_wkup_l4wkup_clkctrl;u32 cm_wkup_wdtimer1_clkctrl;
include/configs/dra7xx_evm.h +1 -0
@@ -45,4 +45,5 @@#define NON_SECURE_SRAM_START 0x40300000#define NON_SECURE_SRAM_END 0x40380000/* Not inclusive */ +#define CONFIG_SYS_OMAP_ABE_SYSCK #endif /* __CONFIG_DRA7XX_EVM_H */
Signature · 1 line
1.7.9.5
PATCH 12/12 ARM: DRA7xx: EMIF: Change settings required for EVM board
In reply to Lokesh VutlaFrom: Sricharan R <[email protected]>
DRA7 EVM board has the below configuration. Adding the settings for the same here.
2Gb_1_35V_DDR3L part * 2 on EMIF1
2Gb_1_35V_DDR3L part * 4 on EMIF2
--- arch/arm/cpu/armv7/omap-common/emif-common.c | 26 +++- arch/arm/cpu/armv7/omap5/hw_data.c | 21 +++- arch/arm/cpu/armv7/omap5/hwinit.c | 19 +-- arch/arm/cpu/armv7/omap5/prcm-regs.c | 1 + arch/arm/cpu/armv7/omap5/sdram.c | 170 ++++++++++++++++++++++++-- arch/arm/include/asm/arch-omap5/omap.h | 1 + arch/arm/include/asm/emif.h | 12 +- arch/arm/include/asm/omap_common.h | 1 + 8 files changed, 220 insertions(+), 31 deletions(-)
arch/arm/cpu/armv7/omap-common/emif-common.c +23 -3
@@ -209,7 +209,8 @@ void emif_update_timings(u32 base, const struct emif_regs *regs)writel (regs->temp_alert_config, &emif->emif_temp_alert_config);writel (regs->emif_ddr_phy_ctlr_1, &emif->emif_ddr_phy_ctrl_1_shdw); -if (omap_revision () >=OMAP5430_ES1_0 ) { +if ((omap_revision () >=OMAP5430_ES1_0 ) || + (omap_revision () ==DRA752_ES1_0 )) {writel (EMIF_L3_CONFIG_VAL_SYS_10_MPU_5_LL_0 , &emif->emif_l3_config); }else if (omap_revision () >=OMAP4460_ES1_0 ) {
@@ -263,6 +264,18 @@ static void ddr3_leveling(u32 base, const struct emif_regs *regs)__udelay (130 ); } +static void ddr3_sw_leveling (u32 base,const struct emif_regs *regs) +{ +struct emif_reg_struct *emif = (struct emif_reg_struct *)base; + +writel (regs->emif_ddr_phy_ctlr_1, &emif->emif_ddr_phy_ctrl_1); +writel (regs->emif_ddr_phy_ctlr_1, &emif->emif_ddr_phy_ctrl_1_shdw); +config_data_eye_leveling_samples (base); + +writel (regs->emif_rd_wr_lvl_ctl, &emif->emif_rd_wr_lvl_ctl); +writel (regs->sdram_config, &emif->emif_sdram_config); +} +static void ddr3_init (u32 base,const struct emif_regs *regs) {struct emif_reg_struct *emif = (struct emif_reg_struct *)base;
@@ -273,6 +286,7 @@ static void ddr3_init(u32 base, const struct emif_regs *regs)* defined, contents of mode Registers must be fully initialized. * H/W takes care of this initialization */ +writel (regs->sdram_config2, &emif->emif_lpddr2_nvm_config);writel (regs->sdram_config_init, &emif->emif_sdram_config);writel (regs->emif_ddr_phy_ctlr_1_init, &emif->emif_ddr_phy_ctrl_1);
@@ -290,7 +304,10 @@ static void ddr3_init(u32 base, const struct emif_regs *regs)/* enable leveling */ writel (regs->emif_rd_wr_lvl_rmp_ctl, &emif->emif_rd_wr_lvl_rmp_ctl); -ddr3_leveling (base, regs); +if (omap_revision () ==DRA752_ES1_0 ) +ddr3_sw_leveling (base, regs); +else +ddr3_leveling (base, regs); }#ifndef CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS
@@ -1078,7 +1095,10 @@ static void do_sdram_init(u32 base)if (warm_reset () && (emif_sdram_type () ==EMIF_SDRAM_TYPE_DDR3 )) {set_lpmode_selfrefresh (base);emif_reset_phy (base); -ddr3_leveling (base, regs); +if (omap_revision () ==DRA752_ES1_0 ) +ddr3_sw_leveling (base, regs); +else +ddr3_leveling (base, regs); }/* Write to the shadow registers */
arch/arm/cpu/armv7/omap5/hw_data.c +17 -4
@@ -602,6 +602,17 @@ const struct ctrl_ioregs ioregs_omap5432_es2 = { .ctrl_emif_sdram_config_ext = SDRAM_CONFIG_EXT_RD_LVL_11_SAMPLES, }; +const struct ctrl_ioregs ioregs_dra7xx_es1 = { + .ctrl_ddrch =0x40404040 , + .ctrl_lpddr2ch =0x40404040 , + .ctrl_ddr3ch =0x80808080 , + .ctrl_ddrio_0 =0xbae8c631 , + .ctrl_ddrio_1 =0xb46318d8 , + .ctrl_ddrio_2 =0x84210000 , + .ctrl_emif_sdram_config_ext =0xb2c00000 , + .ctrl_ddr_ctrl_ext_0 =0xA2000000 , +}; +void hw_data_init (void ) {u32 omap_rev =omap_revision ();
@@ -644,14 +655,16 @@ void get_ioregs(const struct ctrl_ioregs **regs)case OMAP5430_ES1_0 :case OMAP5430_ES2_0 : *regs = &ioregs_omap5430; -break ; +break ;case OMAP5432_ES1_0 : *regs = &ioregs_omap5432_es1; -break ; +break ;case OMAP5432_ES2_0 : -case DRA752_ES1_0 : *regs = &ioregs_omap5432_es2; -break ; +break ; +case DRA752_ES1_0 : + *regs = &ioregs_dra7xx_es1; +break ;default :printf ("\n INVALID OMAP REVISION " );
arch/arm/cpu/armv7/omap5/hwinit.c +12 -7
@@ -100,16 +100,21 @@ static void io_settings_ddr3(void)writel (ioregs->ctrl_emif_sdram_config_ext, (*ctrl)->control_emif2_sdram_config_ext); -/* Disable DLL select */ - io_settings = (readl ((*ctrl)->control_port_emif1_sdram_config) +if (is_omap54xx ()) { +/* Disable DLL select */ + io_settings = (readl ((*ctrl)->control_port_emif1_sdram_config) &0xFFEFFFFF ); -writel (io_settings, - (*ctrl)->control_port_emif1_sdram_config); +writel (io_settings, + (*ctrl)->control_port_emif1_sdram_config); - io_settings = (readl ((*ctrl)->control_port_emif2_sdram_config) + io_settings = (readl ((*ctrl)->control_port_emif2_sdram_config) &0xFFEFFFFF ); -writel (io_settings, - (*ctrl)->control_port_emif2_sdram_config); +writel (io_settings, + (*ctrl)->control_port_emif2_sdram_config); + }else { +writel (ioregs->ctrl_ddr_ctrl_ext_0, + (*ctrl)->control_ddr_control_ext_0); + } }/*
arch/arm/cpu/armv7/omap5/prcm-regs.c +1 -0
@@ -436,6 +436,7 @@ struct omap_sys_ctrl_regs const dra7xx_ctrl = { .control_srcomp_east_side = 0x4A002E7C, .control_srcomp_west_side = 0x4A002E80, .control_srcomp_code_latch = 0x4A002E84, + .control_ddr_control_ext_0 = 0x4A002E88, .control_padconf_core_base = 0x4A003400, .control_port_emif1_sdram_config = 0x4AE0C110, .control_port_emif1_lpddr2_nvm_config = 0x4AE0C114,
arch/arm/cpu/armv7/omap5/sdram.c +160 -10
256 lines not on this page · raw message
arch/arm/include/asm/arch-omap5/omap.h +1 -0
@@ -191,6 +191,7 @@ struct ctrl_ioregs {u32 ctrl_ddrio_1;u32 ctrl_ddrio_2;u32 ctrl_emif_sdram_config_ext; +u32 ctrl_ddr_ctrl_ext_0; };#endif /* __ASSEMBLY__ */ #endif
arch/arm/include/asm/emif.h +5 -7
@@ -581,7 +581,7 @@ (0xFF << EMIF_SYS_ADDR_SHIFT))#define EMIF_EXT_PHY_CTRL_TIMING_REG 0x5 -#define EMIF_EXT_PHY_CTRL_CONST_REG 0x13 +#define EMIF_EXT_PHY_CTRL_CONST_REG 0x14/* Reg mapping structure */ struct emif_reg_struct {
@@ -855,13 +855,10 @@ struct dmm_lisa_map_regs {#define DPD_ENABLE 1/* Maximum delay before Low Power Modes */ -#ifndef CONFIG_OMAP54XX -#define REG_CS_TIM 0xF -#else #define REG_CS_TIM 0x0 -#endif -#define REG_SR_TIM 0xF -#define REG_PD_TIM 0xF +#define REG_SR_TIM 0x0 +#define REG_PD_TIM 0x0 +/* EMIF_PWR_MGMT_CTRL register */ #define EMIF_PWR_MGMT_CTRL (\
@@ -1113,6 +1110,7 @@ struct emif_regs {u32 freq;u32 sdram_config_init;u32 sdram_config; +u32 sdram_config2;u32 ref_ctrl;u32 sdram_tim1;u32 sdram_tim2;
arch/arm/include/asm/omap_common.h +1 -0
@@ -396,6 +396,7 @@ struct omap_sys_ctrl_regs {u32 control_ddrio_0;u32 control_ddrio_1;u32 control_ddrio_2; +u32 control_ddr_control_ext_0;u32 control_lpddr2io1_0;u32 control_lpddr2io1_1;u32 control_lpddr2io1_2;
Signature · 1 line
1.7.9.5
cover ARM: DRA7xx: Update support for DRA7xx Soc's
In reply to Lokesh VutlaQuoted 7 lines · Lokesh Vutla
This series update support for DRA7xx family Socs and the data for DRA752 ES1.0 soc.
This is on top of my recent Misc cleanup series:
http://u-boot.10912.n7.nabble.com/PATCH-0-3-ARM-OMAP4-Misc-Cleanup-tt155877.htmlTested on DRA752 ES1.0, OMAP5432 ES2.0,
MAKEALL for all armv7 board has been verified.
Aside from a few comments, everything else looks good. Oh, and please test with MAKEALL -s omap as well as -c armv7, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130529/8a7d1292/attachment.pgp>
cover ARM: DRA7xx: Update support for DRA7xx Soc's
Hi,
Quoted 7 lines · Tom Rini
Quoted 5 lines · Lokesh Vutla
This series update support for DRA7xx family Socs and the data for DRA752 ES1.0 soc.
This is on top of my recent Misc cleanup series:
http://u-boot.10912.n7.nabble.com/PATCH-0-3-ARM-OMAP4-Misc-Cleanup-tt155877.html
Quoted 5 lines
Quoted 2 lines
Tested on DRA752 ES1.0, OMAP5432 ES2.0,
MAKEALL for all armv7 board has been verified.Aside from a few comments, everything else looks good. Oh, and please test with MAKEALL -s omap as well as -c armv7, thanks!
Thanks Tom. Will address your comments and post a V2. Ok will do MAKEALL for omap boards also.
Regards,
Lokesh