This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi there,
we are using a AM3352 on a custom board that was derived from the Beaglebone. It is using the EMIF with a single MT41K256M16HA-125 Memory Chip. The trace lengths are different to the trace lengths on the Beagleboard. As an SPL we use Uboot to load a Linux Kernel
Due to some errors in the linux device tree file the CPU at first was running with 300Mhz instead of 600Mhz. When the CPU was running with the lower Clock speed there were no Memory issues. With a higher clock speed we noticed that we had some memory issues ( corrupt SCP file transfers, dropped SSH sessions, memtester showed failures, ... ).
We tried to fix this by tuning the DDR3 timings like described in
But the Salve Ratio Search Programm only shows 0x0 values all the time. Since we use the same memory chip as the Beaglebone we get the same register values for ALLOP_DDR3_SDRAM_TIMING1-3 as used in the example. Only values for DATAx_PHY_RD DQS_SLAVE_RATIO, DATAx_PHY_FIFO_WE_SLAVE_RATIO and DATAx_PHY_WR DQS_SLAVE_RATIO are different.
Could there be another resaon for getting 0x0 values beside wrong register values in the GEL file?
Also:
Since we already have some devices deployed and don't want to update Uboot on deployed devices we thought of using the EMIF Linux Kernel drivers to change register values when we determined the right DDR3 timings. But the EMIF driver doesn't seem to be doing anything with our current Kernel ( 4.4.21 ).
Can the EMIF drivers be used to change memory timings when the kernel is loaded?
Best regards
Edit:
Xenon_CPU-FPGA-Module_RatioSeed.xlsx
BeagleBlack_400Mhz_4GbDDR_new_rev.gel
BeagleBlack_400Mhz_4GbDDR_PHY_INVERT_CLKOUT_0.gel
CortxA8: Output: **** AM335x BeagleBlack Initialization is in progress .......... CortxA8: Output: **** AM335x ALL PLL Config for OPP == OPP100 is in progress ......... CortxA8: Output: Input Clock Read from SYSBOOT[15:14]: 24MHz CortxA8: Output: **** Going to Bypass... CortxA8: Output: **** Bypassed, changing values... CortxA8: Output: **** Locking ARM PLL CortxA8: Output: **** Core Bypassed CortxA8: Output: **** Now locking Core... CortxA8: Output: **** Core locked CortxA8: Output: **** DDR DPLL Bypassed CortxA8: Output: **** DDR DPLL Locked CortxA8: Output: **** PER DPLL Bypassed CortxA8: Output: **** PER DPLL Locked CortxA8: Output: **** DISP PLL Config is in progress .......... CortxA8: Output: **** DISP PLL Config is DONE .......... CortxA8: Output: **** AM335x ALL ADPLL Config for OPP == OPP100 is Done ......... CortxA8: Output: **** AM335x DDR3 EMIF and PHY configuration is in progress......... CortxA8: Output: EMIF PRCM is in progress ....... CortxA8: Output: EMIF PRCM Done CortxA8: Output: DDR PHY Configuration in progress CortxA8: Output: Waiting for VTP Ready ....... CortxA8: Output: VTP is Ready! CortxA8: Output: DDR PHY CMD0 Register configuration is in progress ....... CortxA8: Output: DDR PHY CMD1 Register configuration is in progress ....... CortxA8: Output: DDR PHY CMD2 Register configuration is in progress ....... CortxA8: Output: DDR PHY DATA0 Register configuration is in progress ....... CortxA8: Output: DDR PHY DATA1 Register configuration is in progress ....... CortxA8: Output: Setting IO control registers....... CortxA8: Output: EMIF Timing register configuration is in progress ....... CortxA8: Output: EMIF Timing register configuration is done ....... CortxA8: Output: DDR PHY Configuration done CortxA8: Output: **** AM335x BeagleBlack Initialization is Done ****************** [CortxA8] Enter the PHY_INVERT_CLKOUT value (0 or 1) from the spreadsheet 0 Enter the Seed RD_DQS_SLAVE_RATIO Value in Hex to search the RD DQS Ratio Window 40 Enter the Seed FIFO_WE_SLAVE_RATIO Value in Hex to search the RD DQS Gate Window 6D Enter the Seed WR_DQS_SLAVE_RATIO Write DQS Ratio Value in Hex to search the Write DQS Ratio Window 0 *************************************************************** The Slave Ratio Search Program Values are... *************************************************************** PARAMETER MAX | MIN | OPTIMUM | RANGE *************************************************************** DATA_PHY_RD_DQS_SLAVE_RATIO 0x000 | 0x000 | 0x000 | 0x000 DATA_PHY_FIFO_WE_SLAVE_RATIO 0x000 | 0x000 | 0x000 | 0x000 DATA_PHY_WR_DQS_SLAVE_RATIO 0x000 | 0x000 | 0x000 | 0x000 DATA_PHY_WR_DATA_SLAVE_RATIO 0x000 | 0x000 | 0x000 | 0x000 *************************************************************** rd_dqs_range = 0 fifo_we_range = 0 wr_dqs_range = 0 wr_data_range = 0 Optimal values have been found!! *************************************************************** The Slave Ratio Search Program Values are... *************************************************************** PARAMETER MAX | MIN | OPTIMUM | RANGE *************************************************************** DATA_PHY_RD_DQS_SLAVE_RATIO 0x000 | 0x000 | 0x000 | 0x000 DATA_PHY_FIFO_WE_SLAVE_RATIO 0x000 | 0x000 | 0x000 | 0x000 DATA_PHY_WR_DQS_SLAVE_RATIO 0x000 | 0x000 | 0x000 | 0x000 DATA_PHY_WR_DATA_SLAVE_RATIO 0x000 | 0x000 | 0x000 | 0x000 *************************************************************** ===== END OF TEST =====
BeagleBlack_400Mhz_4GbDDR_PHY_INVERT_CLKOUT_1.gel
CortxA8: Output: **** AM335x BeagleBlack Initialization is in progress .......... CortxA8: Output: **** AM335x ALL PLL Config for OPP == OPP100 is in progress ......... CortxA8: Output: Input Clock Read from SYSBOOT[15:14]: 24MHz CortxA8: Output: **** Going to Bypass... CortxA8: Output: **** Bypassed, changing values... CortxA8: Output: **** Locking ARM PLL CortxA8: Output: **** Core Bypassed CortxA8: Output: **** Now locking Core... CortxA8: Output: **** Core locked CortxA8: Output: **** DDR DPLL Bypassed CortxA8: Output: **** DDR DPLL Locked CortxA8: Output: **** PER DPLL Bypassed CortxA8: Output: **** PER DPLL Locked CortxA8: Output: **** DISP PLL Config is in progress .......... CortxA8: Output: **** DISP PLL Config is DONE .......... CortxA8: Output: **** AM335x ALL ADPLL Config for OPP == OPP100 is Done ......... CortxA8: Output: **** AM335x DDR3 EMIF and PHY configuration is in progress......... CortxA8: Output: EMIF PRCM is in progress ....... CortxA8: Output: EMIF PRCM Done CortxA8: Output: DDR PHY Configuration in progress CortxA8: Output: Waiting for VTP Ready ....... CortxA8: Output: VTP is Ready! CortxA8: Output: DDR PHY CMD0 Register configuration is in progress ....... CortxA8: Output: DDR PHY CMD1 Register configuration is in progress ....... CortxA8: Output: DDR PHY CMD2 Register configuration is in progress ....... CortxA8: Output: DDR PHY DATA0 Register configuration is in progress ....... CortxA8: Output: DDR PHY DATA1 Register configuration is in progress ....... CortxA8: Output: Setting IO control registers....... CortxA8: Output: EMIF Timing register configuration is in progress ....... CortxA8: Output: EMIF Timing register configuration is done ....... CortxA8: Output: DDR PHY Configuration done CortxA8: Output: **** AM335x BeagleBlack Initialization is Done ****************** Enter the PHY_INVERT_CLKOUT value (0 or 1) from the spreadsheet 1 Enter the Seed RD_DQS_SLAVE_RATIO Value in Hex to search the RD DQS Ratio Window 40 Enter the Seed FIFO_WE_SLAVE_RATIO Value in Hex to search the RD DQS Gate Window ED Enter the Seed WR_DQS_SLAVE_RATIO Write DQS Ratio Value in Hex to search the Write DQS Ratio Window 7F *************************************************************** The Slave Ratio Search Program Values are... *************************************************************** PARAMETER MAX | MIN | OPTIMUM | RANGE *************************************************************** DATA_PHY_RD_DQS_SLAVE_RATIO 0x000 | 0x000 | 0x000 | 0x000 DATA_PHY_FIFO_WE_SLAVE_RATIO 0x000 | 0x000 | 0x000 | 0x000 DATA_PHY_WR_DQS_SLAVE_RATIO 0x000 | 0x000 | 0x000 | 0x000 DATA_PHY_WR_DATA_SLAVE_RATIO 0x000 | 0x000 | 0x000 | 0x000 *************************************************************** rd_dqs_range = 0 fifo_we_range = 0 wr_dqs_range = 0 wr_data_range = 0 Optimal values have been found!! *************************************************************** The Slave Ratio Search Program Values are... *************************************************************** PARAMETER MAX | MIN | OPTIMUM | RANGE *************************************************************** DATA_PHY_RD_DQS_SLAVE_RATIO 0x000 | 0x000 | 0x000 | 0x000 DATA_PHY_FIFO_WE_SLAVE_RATIO 0x000 | 0x000 | 0x000 | 0x000 DATA_PHY_WR_DQS_SLAVE_RATIO 0x000 | 0x000 | 0x000 | 0x000 DATA_PHY_WR_DATA_SLAVE_RATIO 0x000 | 0x000 | 0x000 | 0x000 *************************************************************** ===== END OF TEST =====
I apologize for the delay, I am talking to apps managers about this one....
Do you have VTT Regulator which is driven by a GPIO ? If so make sure the GPIO is driven high from the gel file.
The leveling routines now output values:
***************************************************************
The Slave Ratio Search Program Values are...
***************************************************************
PARAMETER MAX | MIN | OPTIMUM | RANGE
***************************************************************
DATA_PHY_RD_DQS_SLAVE_RATIO 0x059 | 0x002 | 0x02d | 0x057
DATA_PHY_FIFO_WE_SLAVE_RATIO 0x168 | 0x041 | 0x0d4 | 0x127
DATA_PHY_WR_DQS_SLAVE_RATIO 0x0ca | 0x085 | 0x0a7 | 0x045
DATA_PHY_WR_DATA_SLAVE_RATIO 0x112 | 0x0ad | 0x0df | 0x065
***************************************************************
I put the Values into the U-Boot memory register variables:
/* Micron MT41K256M16HA-125E on Xenon*/ #define MT41K256M16HA125E_XENON_EMIF_READ_LATENCY 0x100008 #define MT41K256M16HA125E_XENON_EMIF_TIM1 0x0AAAD4DB #define MT41K256M16HA125E_XENON_EMIF_TIM2 0x266B7FDA #define MT41K256M16HA125E_XENON_EMIF_TIM3 0x501F867F #define MT41K256M16HA125E_XENON_EMIF_SDCFG 0x61C05332 #define MT41K256M16HA125E_XENON_EMIF_SDREF 0xC30 #define MT41K256M16HA125E_XENON_ZQ_CFG 0x50074BE4 #define MT41K256M16HA125E_XENON_RATIO 0x100 #define MT41K256M16HA125E_XENON_INVERT_CLKOUT 0x1 #define MT41K256M16HA125E_XENON_RD_DQS 0x2D #define MT41K256M16HA125E_XENON_WR_DQS 0xA7 #define MT41K256M16HA125E_XENON_PHY_WR_DATA 0xDF #define MT41K256M16HA125E_XENON_PHY_FIFO_WE 0xD4 #define MT41K256M16HA125E_XENON_IOCTRL_VALUE 0x18B
But when i try to run U-Boot
I either get Errors like :
Unable to update property /ocp/ethernet@4a100000/slave@4a100200:mac-address, err=FDT_ERR_BADSTRUCTURE
Unable to update property /ocp/ethernet@4a100000/slave@4a100200:local-mac-address, err=FDT_ERR_BADSTRUCTURE
Unable to update property /ocp/ethernet@4a100000/slave@4a100300:mac-address, err=FDT_ERR_BADSTRUCTURE
Unable to update property /ocp/ethernet@4a100000/slave@4a100300:local-mac-address, err=FDT_ERR_BADSTRUCTURE
or:
musb-hdrc: kernel must blacklist external hubs
musb_init_controller failed with status -22
musb-hdrc: kernel must blacklist external hubs
musb_init_controller failed with status -22
Net: data abort
MAYBE you should read doc/README.arm-unaligned-accesses
pc : [<9f77c970>] lr : [<9f7a35fc>]
sp : 9f640ec8 ip : 00000000 fp : 80800020
r10: 8083ecc1 r9 : 9f640f28 r8 : 00000014
r7 : 4a100000 r6 : 9f7a1f18 r5 : 9f6412d0 r4 : 9f641318
r3 : 00000000 r2 : 9f6413e0 r1 : 00000000 r0 : 9f6413cc
Flags: Nzcv IRQs off FIQs on Mode SVC_32
Resetting CPU ...
resetting ...
Any ideas why this could happen?