Drive stregth for sama5d2_ptc_ek
cover Drive stregth for sama5d2_ptc_ek
These patches are originally created by Ludovic Desroches.
For the Sama5d2_ptc_ek board, we need to set nand PIO drive strength. Created macros for drive strength configuration.
The drive strength has to be set to medium for the NAND data lines. With a low drive, we can get some data corruption.
Ludovic Desroches (2):
gpio: atmel_pio4: add drive strength macros
board: atmel: sama5d2_ptc_ek: update pin configuration for NAND
arch/arm/mach-at91/include/mach/atmel_pio4.h | 4 ++++ board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c | 16 ++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/2 gpio: atmel_pio4: add drive strength macros
From: Ludovic Desroches <[email protected]>
Macros for drive strength configuration were missing.
--- arch/arm/mach-at91/include/mach/atmel_pio4.h | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/mach-at91/include/mach/atmel_pio4.h +4 -0
@@ -48,6 +48,10 @@ struct atmel_pio4_port {#define ATMEL_PIO_IFSCEN_MASK BIT(13)#define ATMEL_PIO_OPD_MASK BIT(14)#define ATMEL_PIO_SCHMITT_MASK BIT(15) +#define ATMEL_PIO_DRVSTR_MASK GENMASK(17, 16) +#define ATMEL_PIO_DRVSTR_LO (1 << 16) +#define ATMEL_PIO_DRVSTR_ME (2 << 16) +#define ATMEL_PIO_DRVSTR_HI (3 << 16)#define ATMEL_PIO_CFGR_EVTSEL_MASK GENMASK(26, 24)#define ATMEL_PIO_CFGR_EVTSEL_FALLING (0 << 24)#define ATMEL_PIO_CFGR_EVTSEL_RISING (1 << 24)
Signature · 1 line
2.7.4
PATCH 1/2 gpio: atmel_pio4: add drive strength macros
Quoted 5 lines · Eugen Hristev
From: Ludovic Desroches <[email protected]>
Macros for drive strength configuration were missing.
Signed-off-by Ludovic Desroches <[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: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180508/81c3ebab/attachment.sig>
PATCH 2/2 board: atmel: sama5d2_ptc_ek: update pin configuration for NAND
In reply to Eugen HristevFrom: Ludovic Desroches <[email protected]>
The drive strength has to be set to medium for the NAND data lines. With a low drive, we can get some data corruption.
--- board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c +8 -8
@@ -49,14 +49,14 @@ static void board_nand_hw_init(void)AT91_SMC_MODE_TDF_CYCLE (3 ), &smc->cs[3].mode); -atmel_pio4_set_b_periph (AT91_PIO_PORTA ,22 ,0 );/* D0 */ -atmel_pio4_set_b_periph (AT91_PIO_PORTA ,23 ,0 );/* D1 */ -atmel_pio4_set_b_periph (AT91_PIO_PORTA ,24 ,0 );/* D2 */ -atmel_pio4_set_b_periph (AT91_PIO_PORTA ,25 ,0 );/* D3 */ -atmel_pio4_set_b_periph (AT91_PIO_PORTA ,26 ,0 );/* D4 */ -atmel_pio4_set_b_periph (AT91_PIO_PORTA ,27 ,0 );/* D5 */ -atmel_pio4_set_b_periph (AT91_PIO_PORTA ,28 ,0 );/* D6 */ -atmel_pio4_set_b_periph (AT91_PIO_PORTA ,29 ,0 );/* D7 */ +atmel_pio4_set_b_periph (AT91_PIO_PORTA ,22 ,ATMEL_PIO_DRVSTR_ME );/* D0 */ +atmel_pio4_set_b_periph (AT91_PIO_PORTA ,23 ,ATMEL_PIO_DRVSTR_ME );/* D1 */ +atmel_pio4_set_b_periph (AT91_PIO_PORTA ,24 ,ATMEL_PIO_DRVSTR_ME );/* D2 */ +atmel_pio4_set_b_periph (AT91_PIO_PORTA ,25 ,ATMEL_PIO_DRVSTR_ME );/* D3 */ +atmel_pio4_set_b_periph (AT91_PIO_PORTA ,26 ,ATMEL_PIO_DRVSTR_ME );/* D4 */ +atmel_pio4_set_b_periph (AT91_PIO_PORTA ,27 ,ATMEL_PIO_DRVSTR_ME );/* D5 */ +atmel_pio4_set_b_periph (AT91_PIO_PORTA ,28 ,ATMEL_PIO_DRVSTR_ME );/* D6 */ +atmel_pio4_set_b_periph (AT91_PIO_PORTA ,29 ,ATMEL_PIO_DRVSTR_ME );/* D7 */ atmel_pio4_set_b_periph (AT91_PIO_PORTB ,2 ,0 );/* RE */ atmel_pio4_set_b_periph (AT91_PIO_PORTA ,30 ,0 );/* WE */ atmel_pio4_set_b_periph (AT91_PIO_PORTA ,31 ,1 );/* NCS */
Signature · 1 line
2.7.4
PATCH 2/2 board: atmel: sama5d2_ptc_ek: update pin configuration for NAND
Quoted 6 lines · Eugen Hristev
From: Ludovic Desroches <[email protected]>
The drive strength has to be set to medium for the NAND data lines. With a low drive, we can get some data corruption.
Signed-off-by Ludovic Desroches <[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: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180508/417cb693/attachment.sig>