ARM: DRA74x: Add support for ES2.0
cover ARM: DRA74x: Add support for ES2.0
Hi,
This series add detection and basic support for DRA74x/DRA75x support, and adds support for dra74x-evm platform.
Nishanth Menon (3):
ARM: DRA7: Add detection of ES2.0
ARM: DRA74-evm: Add iodelay values for SR2.0
ARM: DRA74-evm: Use SMA_1 spare register to workaround DP83865 phy on
SR2.0
arch/arm/cpu/armv7/omap5/hw_data.c | 2 + arch/arm/cpu/armv7/omap5/hwinit.c | 3 ++ arch/arm/cpu/armv7/omap5/prcm-regs.c | 9 ++++ arch/arm/cpu/armv7/omap5/sdram.c | 4 ++ arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h | 4 ++ arch/arm/include/asm/arch-omap5/omap.h | 3 ++ arch/arm/include/asm/omap_common.h | 2 + board/ti/dra7xx/evm.c | 39 ++++++++++++---- board/ti/dra7xx/mux_data.h | 58 +++++++++++++++++++++++- 9 files changed, 113 insertions(+), 11 deletions(-)
Signature · 1 line
2.1.4
PATCH 1/3 ARM: DRA7: Add detection of ES2.0
Add support for detection of ES2.0 version of DRA7 family of processors. ES2.0 is an incremental revision with various fixes including the following:
- reset logic fixes
- few assymetric aging logic fixes
- MMC clock rate fixes
- Ethernet speed fixes
- edma fixes for mcasp
--- arch/arm/cpu/armv7/omap5/hw_data.c | 2 ++ arch/arm/cpu/armv7/omap5/hwinit.c | 3 +++ arch/arm/cpu/armv7/omap5/sdram.c | 4 ++++ arch/arm/include/asm/arch-omap5/omap.h | 1 + arch/arm/include/asm/omap_common.h | 1 + 5 files changed, 11 insertions(+)
arch/arm/cpu/armv7/omap5/hw_data.c +2 -0
@@ -643,6 +643,7 @@ void __weak hw_data_init(void)case DRA752_ES1_0 :case DRA752_ES1_1 : +case DRA752_ES2_0 : *prcm = &dra7xx_prcm; *dplls_data = &dra7xx_dplls; *omap_vcores = &dra752_volts;
@@ -678,6 +679,7 @@ void get_ioregs(const struct ctrl_ioregs **regs)break ;case DRA752_ES1_0 :case DRA752_ES1_1 : +case DRA752_ES2_0 : *regs = &ioregs_dra7xx_es1;break ;case DRA722_ES1_0 :
arch/arm/cpu/armv7/omap5/hwinit.c +3 -0
@@ -365,6 +365,9 @@ void init_omap_revision(void)case DRA752_CONTROL_ID_CODE_ES1_1 : *omap_si_rev =DRA752_ES1_1 ;break ; +case DRA752_CONTROL_ID_CODE_ES2_0 : + *omap_si_rev =DRA752_ES2_0 ; +break ;case DRA722_CONTROL_ID_CODE_ES1_0 : *omap_si_rev =DRA722_ES1_0 ;break ;
arch/arm/cpu/armv7/omap5/sdram.c +4 -0
@@ -284,6 +284,7 @@ static void emif_get_reg_dump_sdp(u32 emif_nr, const struct emif_regs **regs)break ;case DRA752_ES1_0 :case DRA752_ES1_1 : +case DRA752_ES2_0 :switch (emif_nr) {case 1 : *regs = &emif_1_regs_ddr3_532_mhz_1cs_dra_es1;
@@ -316,6 +317,7 @@ static void emif_get_dmm_regs_sdp(const struct dmm_lisa_map_regsbreak ;case DRA752_ES1_0 :case DRA752_ES1_1 : +case DRA752_ES2_0 : *dmm_lisa_regs = &lisa_map_2G_x_2_x_2_2G_x_1_x_2;break ;case DRA722_ES1_0 :
@@ -569,6 +571,7 @@ void __weak emif_get_ext_phy_ctrl_const_regs(u32 emif_nr,break ;case DRA752_ES1_0 :case DRA752_ES1_1 : +case DRA752_ES2_0 :if (emif_nr ==1 ) { *regs = dra_ddr3_ext_phy_ctrl_const_base_es1_emif1; *size =
@@ -792,6 +795,7 @@ const struct read_write_regs *get_bug_regs(u32 *iterations)break ;case DRA752_ES1_0 :case DRA752_ES1_1 : +case DRA752_ES2_0 :case DRA722_ES1_0 : bug_00339_regs_ptr = dra_bug_00339_regs; *iterations = sizeof(dra_bug_00339_regs)/
arch/arm/include/asm/arch-omap5/omap.h +1 -0
@@ -52,6 +52,7 @@#define OMAP5432_CONTROL_ID_CODE_ES2_0 0x1B99802F#define DRA752_CONTROL_ID_CODE_ES1_0 0x0B99002F#define DRA752_CONTROL_ID_CODE_ES1_1 0x1B99002F +#define DRA752_CONTROL_ID_CODE_ES2_0 0x2B99002F#define DRA722_CONTROL_ID_CODE_ES1_0 0x0B9BC02F/* UART */
arch/arm/include/asm/omap_common.h +1 -0
@@ -672,6 +672,7 @@ static inline u8 is_dra72x(void)/* DRA7XX */ #define DRA752_ES1_0 0x07520100#define DRA752_ES1_1 0x07520110 +#define DRA752_ES2_0 0x07520200#define DRA722_ES1_0 0x07220100/*
Signature · 1 line
2.1.4
PATCH 1/3 ARM: DRA7: Add detection of ES2.0
Quoted 9 lines · Nishanth Menon
Add support for detection of ES2.0 version of DRA7 family of processors. ES2.0 is an incremental revision with various fixes including the following:
- reset logic fixes
- few assymetric aging logic fixes
- MMC clock rate fixes
- Ethernet speed fixes
- edma fixes for mcasp
Quoted 4 lines
[ravibabu at ti.com: posted internal for an older bootloader]Signed-off-by Ravi Babu <[email protected]>Signed-off-by Nishanth Menon <[email protected]>Acked-by Lokesh Vutla <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150817/4270901f/attachment.sig>
PATCH 1/3 ARM: DRA7: Add detection of ES2.0
In reply to Nishanth MenonQuoted 9 lines · Nishanth Menon
Add support for detection of ES2.0 version of DRA7 family of processors. ES2.0 is an incremental revision with various fixes including the following:
- reset logic fixes
- few assymetric aging logic fixes
- MMC clock rate fixes
- Ethernet speed fixes
- edma fixes for mcasp
Quoted 5 lines
[ravibabu at ti.com: posted internal for an older bootloader]Signed-off-by Ravi Babu <[email protected]>Signed-off-by Nishanth Menon <[email protected]>Acked-by Lokesh Vutla <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150828/0c886a51/attachment.sig>
PATCH 2/3 ARM: DRA74-evm: Add iodelay values for SR2.0
In reply to Nishanth MenonSilicon revision 2.0 has new signal routing hence has an updated set of iodelay parameters to be used. Update the configuration for the same. Padmux remains the same.
Based on data from VayuES2_EVM_Base_Config-20150807.
NOTE: With respect to the RGMII values, the Manual IODelay values are used for the fine adjusments needed to meet the tight RGMII specification.
--- board/ti/dra7xx/evm.c | 36 ++++++++++++++++++++-------- board/ti/dra7xx/mux_data.h | 58 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 83 insertions(+), 11 deletions(-)
board/ti/dra7xx/evm.c +26 -10
@@ -80,17 +80,33 @@ void set_muxconf_regs_essential(void)#ifdef CONFIG_IODELAY_RECALIBRATION void recalibrate_iodelay (void ) { -if (is_dra72x ()) { -__recalibrate_iodelay (core_padconf_array_essential, -ARRAY_SIZE (core_padconf_array_essential), - iodelay_cfg_array, -ARRAY_SIZE (iodelay_cfg_array)); - }else { -__recalibrate_iodelay (dra74x_core_padconf_array, -ARRAY_SIZE (dra74x_core_padconf_array), - dra742_iodelay_cfg_array, -ARRAY_SIZE (dra742_iodelay_cfg_array)); +struct pad_conf_entry const *pads; +struct iodelay_cfg_entry const *iodelay; +int npads, niodelays; + +switch (omap_revision ()) { +case DRA722_ES1_0 : + pads = core_padconf_array_essential; + npads =ARRAY_SIZE (core_padconf_array_essential); + iodelay = iodelay_cfg_array; + niodelays =ARRAY_SIZE (iodelay_cfg_array); +break ; +case DRA752_ES1_0 : +case DRA752_ES1_1 : + pads = dra74x_core_padconf_array; + npads =ARRAY_SIZE (dra74x_core_padconf_array); + iodelay = dra742_es1_1_iodelay_cfg_array; + niodelays =ARRAY_SIZE (dra742_es1_1_iodelay_cfg_array); +break ; +default : +case DRA752_ES2_0 : + pads = dra74x_core_padconf_array; + npads =ARRAY_SIZE (dra74x_core_padconf_array); + iodelay = dra742_es2_0_iodelay_cfg_array; + niodelays =ARRAY_SIZE (dra742_es2_0_iodelay_cfg_array); +break ; } +__recalibrate_iodelay (pads, npads, iodelay, niodelays); }#endif
board/ti/dra7xx/mux_data.h +57 -1
70 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH 2/3 ARM: DRA74-evm: Add iodelay values for SR2.0
Quoted 11 lines · Nishanth Menon
Silicon revision 2.0 has new signal routing hence has an updated set of iodelay parameters to be used. Update the configuration for the same. Padmux remains the same.
Based on data from VayuES2_EVM_Base_Config-20150807.
NOTE: With respect to the RGMII values, the Manual IODelay values are used for the fine adjusments needed to meet the tight RGMII specification.
Signed-off-by Nishanth Menon <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150817/bf973f74/attachment.sig>
PATCH 2/3 ARM: DRA74-evm: Add iodelay values for SR2.0
In reply to Nishanth MenonQuoted 4 lines · Nishanth Menon
Silicon revision 2.0 has new signal routing hence has an updated set of iodelay parameters to be used. Update the configuration for the same. Padmux remains the same.
Quoted 8 lines
Based on data from VayuES2_EVM_Base_Config-20150807.
NOTE: With respect to the RGMII values, the Manual IODelay values are used for the fine adjusments needed to meet the tight RGMII specification.
Signed-off-by Nishanth Menon <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150828/33cad055/attachment.sig>
PATCH 3/3 ARM: DRA74-evm: Use SMA_1 spare register to workaround DP83865 phy on SR2.0
In reply to Nishanth MenonDP83865 ethernet phy used on DRA74x-evm is quirky and the datasheet provided IODELAY values for standard RGMII phys do not work.
Silicon Revision(SR) 2.0 provides an alternative bit configuration that allows us to do a "gross adjustment" to launch the data off a different internal clock edge. Manual IO Delay overrides are still necessary to fine tune the clock-to-data delays. This is a necessary workaround for the quirky ethernet Phy we have on the platform.
NOTE: SMA registers are spare "kitchen sink" registers that does contain bits for other workaround as necessary as well. Hence the control for the same is introduced in a generic SoC specific, board generic location.
--- arch/arm/cpu/armv7/omap5/prcm-regs.c | 9 +++++++++ arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h | 4 ++++ arch/arm/include/asm/arch-omap5/omap.h | 2 ++ arch/arm/include/asm/omap_common.h | 1 + board/ti/dra7xx/evm.c | 3 +++ 5 files changed, 19 insertions(+)
arch/arm/cpu/armv7/omap5/prcm-regs.c +9 -0
@@ -11,6 +11,7 @@*/ #include <asm/omap_common.h> +#include <asm/io.h> struct prcm_regs const omap5_es1_prcm = {/* cm1.ckgen */
@@ -379,6 +380,7 @@ struct omap_sys_ctrl_regs const dra7xx_ctrl = { .control_phy_power_usb = 0x4A002370, .control_phy_power_sata = 0x4A002374, .ctrl_core_sma_sw_0 = 0x4A0023FC, + .ctrl_core_sma_sw_1 = 0x4A002534, .control_core_mac_id_0_lo = 0x4A002514, .control_core_mac_id_0_hi = 0x4A002518, .control_core_mac_id_1_lo = 0x4A00251C,
@@ -990,3 +992,10 @@ struct prcm_regs const dra7xx_prcm = { .prm_abbldo_mpu_setup = 0x4AE07DDC, .prm_abbldo_mpu_ctrl = 0x4AE07DE0, }; + +void clrset_spare_register (u8 spare_type,u32 clear_bits,u32 set_bits) +{ +u32 reg = spare_type ? (*ctrl)->ctrl_core_sma_sw_1 : + (*ctrl)->ctrl_core_sma_sw_0; +clrsetbits_le32 (reg, clear_bits, set_bits); +}
arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h +4 -0
@@ -49,6 +49,10 @@#define ISOLATE_IO 1#define DEISOLATE_IO 0 +/* CTRL_CORE_SMA_SW_1 */ +#define RGMII2_ID_MODE_N_MASK (1 << 26) +#define RGMII1_ID_MODE_N_MASK (1 << 25) +/* PRM_IO_PMCTRL */ #define PMCTRL_ISOCLK_OVERRIDE_SHIFT 0#define PMCTRL_ISOCLK_OVERRIDE_MASK (1 << 0)
arch/arm/include/asm/arch-omap5/omap.h +2 -0
@@ -235,6 +235,8 @@ struct ctrl_ioregs { u32 ctrl_ddr_ctrl_ext_0; }; +void clrset_spare_register (u8 spare_type,u32 clear_bits,u32 set_bits); +#endif /* __ASSEMBLY__ */ /* Boot parameters */
arch/arm/include/asm/omap_common.h +1 -0
@@ -462,6 +462,7 @@ struct omap_sys_ctrl_regs {u32 control_padconf_wkup_base;u32 iodelay_config_base;u32 ctrl_core_sma_sw_0; +u32 ctrl_core_sma_sw_1; };struct dpll_params {
board/ti/dra7xx/evm.c +3 -0
@@ -104,6 +104,9 @@ void recalibrate_iodelay(void) npads =ARRAY_SIZE (dra74x_core_padconf_array); iodelay = dra742_es2_0_iodelay_cfg_array; niodelays =ARRAY_SIZE (dra742_es2_0_iodelay_cfg_array); +/* Setup port1 and port2 for rgmii with 'no-id' mode */ +clrset_spare_register (1 ,0 ,RGMII2_ID_MODE_N_MASK | +RGMII1_ID_MODE_N_MASK );break ; }__recalibrate_iodelay (pads, npads, iodelay, niodelays);
Signature · 1 line
2.1.4
PATCH 3/3 ARM: DRA74-evm: Use SMA_1 spare register to workaround DP83865 phy on SR2.0
Quoted 9 lines · Nishanth Menon
DP83865 ethernet phy used on DRA74x-evm is quirky and the datasheet provided IODELAY values for standard RGMII phys do not work.
Silicon Revision(SR) 2.0 provides an alternative bit configuration that allows us to do a "gross adjustment" to launch the data off a different internal clock edge. Manual IO Delay overrides are still necessary to fine tune the clock-to-data delays. This is a necessary workaround for the quirky ethernet Phy we have on the platform.
Quoted 6 lines
NOTE: SMA registers are spare "kitchen sink" registers that does contain bits for other workaround as necessary as well. Hence the control for the same is introduced in a generic SoC specific, board generic location.
Signed-off-by Nishanth Menon <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150817/812eef33/attachment.sig>
PATCH 3/3 ARM: DRA74-evm: Use SMA_1 spare register to workaround DP83865 phy on SR2.0
In reply to Nishanth MenonQuoted 9 lines · Nishanth Menon
DP83865 ethernet phy used on DRA74x-evm is quirky and the datasheet provided IODELAY values for standard RGMII phys do not work.
Silicon Revision(SR) 2.0 provides an alternative bit configuration that allows us to do a "gross adjustment" to launch the data off a different internal clock edge. Manual IO Delay overrides are still necessary to fine tune the clock-to-data delays. This is a necessary workaround for the quirky ethernet Phy we have on the platform.
Quoted 7 lines
NOTE: SMA registers are spare "kitchen sink" registers that does contain bits for other workaround as necessary as well. Hence the control for the same is introduced in a generic SoC specific, board generic location.
Signed-off-by Nishanth Menon <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150828/9096acfe/attachment.sig>