bsp/lpc24xx: Use fast slew rate for EMC pins

This commit is contained in:
Sebastian Huber
2019-05-09 09:54:48 +02:00
parent 0a6b81ad1c
commit 50d8d32b66

View File

@@ -250,11 +250,15 @@ typedef enum {
#define LPC24XX_PIN_WITH_TYPE(p, i, f0, f1, t) { { p, i, f0, t, 0 } }
#define LPC24XX_PIN_RANGE(p, i, j, f0, f1) \
{ { p, i, f0, 0, 0 } }, { { p, j, f0, 0, 1 } }
#define LPC24XX_PIN_RANGE_WITH_TYPE(p, i, j, f0, f1, t) \
{ { p, i, f0, t, 0 } }, { { p, j, f0, t, 1 } }
#else
#define LPC24XX_PIN(p, i, f0, f1) { { p, i, f1, 0, 0 } }
#define LPC24XX_PIN_WITH_TYPE(p, i, f0, f1, t) { { p, i, f1, t, 0 } }
#define LPC24XX_PIN_RANGE(p, i, j, f0, f1) \
{ { p, i, f1, 0, 0 } }, { { p, j, f1, 0, 1 } }
#define LPC24XX_PIN_RANGE_WITH_TYPE(p, i, j, f0, f1, t) \
{ { p, i, f1, t, 0 } }, { { p, j, f1, t, 1 } }
#endif
#define LPC24XX_PIN_TERMINAL { { 0x7, 0x1f, 0x7, 0xf, 0x1 } }
@@ -424,110 +428,85 @@ static inline unsigned lpc24xx_pin_get_first_index(
* @{
*/
#define LPC24XX_PIN_EMC_CS_0 \
LPC24XX_PIN(4, 30, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_CS_1 \
LPC24XX_PIN(4, 31, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_CS_2 \
LPC24XX_PIN(2, 14, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_CS_3 \
LPC24XX_PIN(2, 15, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC(p, i) \
LPC24XX_PIN_WITH_TYPE(p, i, LPC24XX_PIN_FUNCTION_01, 1, \
LPC17XX_PIN_TYPE_FAST_SLEW_RATE)
#define LPC24XX_PIN_EMC_DYCS_0 \
LPC24XX_PIN(2, 20, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_DYCS_1 \
LPC24XX_PIN(2, 21, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_DYCS_2 \
LPC24XX_PIN(2, 22, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_DYCS_3 \
LPC24XX_PIN(2, 23, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_RANGE(p, i, j) \
LPC24XX_PIN_RANGE_WITH_TYPE(p, i, j, LPC24XX_PIN_FUNCTION_01, 1, \
LPC17XX_PIN_TYPE_FAST_SLEW_RATE)
#define LPC24XX_PIN_EMC_OE \
LPC24XX_PIN(4, 24, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_WE \
LPC24XX_PIN(4, 25, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_CAS \
LPC24XX_PIN(2, 16, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_RAS \
LPC24XX_PIN(2, 17, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_CS_0 LPC24XX_PIN_EMC(4, 30)
#define LPC24XX_PIN_EMC_CS_1 LPC24XX_PIN_EMC(4, 31)
#define LPC24XX_PIN_EMC_CS_2 LPC24XX_PIN_EMC(2, 14)
#define LPC24XX_PIN_EMC_CS_3 LPC24XX_PIN_EMC(2, 15)
#define LPC24XX_PIN_EMC_CLK_0 \
LPC24XX_PIN(2, 18, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_CLK_1 \
LPC24XX_PIN(2, 19, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_DYCS_0 LPC24XX_PIN_EMC(2, 20)
#define LPC24XX_PIN_EMC_DYCS_1 LPC24XX_PIN_EMC(2, 21)
#define LPC24XX_PIN_EMC_DYCS_2 LPC24XX_PIN_EMC(2, 22)
#define LPC24XX_PIN_EMC_DYCS_3 LPC24XX_PIN_EMC(2, 23)
#define LPC24XX_PIN_EMC_CKE_0 \
LPC24XX_PIN(2, 24, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_CKE_1 \
LPC24XX_PIN(2, 25, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_CKE_2 \
LPC24XX_PIN(2, 26, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_CKE_3 \
LPC24XX_PIN(2, 27, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_OE LPC24XX_PIN_EMC(4, 24)
#define LPC24XX_PIN_EMC_WE LPC24XX_PIN_EMC(4, 25)
#define LPC24XX_PIN_EMC_CAS LPC24XX_PIN_EMC(2, 16)
#define LPC24XX_PIN_EMC_RAS LPC24XX_PIN_EMC(2, 17)
#define LPC24XX_PIN_EMC_DQM_0 \
LPC24XX_PIN(2, 28, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_DQM_1 \
LPC24XX_PIN(2, 29, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_DQM_2 \
LPC24XX_PIN(2, 30, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_DQM_3 \
LPC24XX_PIN(2, 31, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_CLK_0 LPC24XX_PIN_EMC(2, 18)
#define LPC24XX_PIN_EMC_CLK_1 LPC24XX_PIN_EMC(2, 19)
#define LPC24XX_PIN_EMC_BLS0 \
LPC24XX_PIN(4, 26, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_BLS1 \
LPC24XX_PIN(4, 27, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_BLS2 \
LPC24XX_PIN(4, 28, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_BLS3 \
LPC24XX_PIN(4, 29, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_CKE_0 LPC24XX_PIN_EMC(2, 24)
#define LPC24XX_PIN_EMC_CKE_1 LPC24XX_PIN_EMC(2, 25)
#define LPC24XX_PIN_EMC_CKE_2 LPC24XX_PIN_EMC(2, 26)
#define LPC24XX_PIN_EMC_CKE_3 LPC24XX_PIN_EMC(2, 27)
#define LPC24XX_PIN_EMC_D_0_15 \
LPC24XX_PIN_RANGE(3, 0, 15, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_D_15_31 \
LPC24XX_PIN_RANGE(3, 15, 31, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_D_0_31 \
LPC24XX_PIN_RANGE(3, 0, 31, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_DQM_0 LPC24XX_PIN_EMC(2, 28)
#define LPC24XX_PIN_EMC_DQM_1 LPC24XX_PIN_EMC(2, 29)
#define LPC24XX_PIN_EMC_DQM_2 LPC24XX_PIN_EMC(2, 30)
#define LPC24XX_PIN_EMC_DQM_3 LPC24XX_PIN_EMC(2, 31)
#define LPC24XX_PIN_EMC_A_0_12 \
LPC24XX_PIN_RANGE(4, 0, 12, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_A_0_13 \
LPC24XX_PIN_RANGE(4, 0, 13, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_A_0_14 \
LPC24XX_PIN_RANGE(4, 0, 14, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_A_0_15 \
LPC24XX_PIN_RANGE(4, 0, 15, LPC24XX_PIN_FUNCTION_01, 1)
#define LPC24XX_PIN_EMC_BLS0 LPC24XX_PIN_EMC(4, 26)
#define LPC24XX_PIN_EMC_BLS1 LPC24XX_PIN_EMC(4, 27)
#define LPC24XX_PIN_EMC_BLS2 LPC24XX_PIN_EMC(4, 28)
#define LPC24XX_PIN_EMC_BLS3 LPC24XX_PIN_EMC(4, 29)
#define LPC24XX_PIN_EMC_D_0_15 LPC24XX_PIN_EMC_RANGE(3, 0, 15)
#define LPC24XX_PIN_EMC_D_15_31 LPC24XX_PIN_EMC_RANGE(3, 15, 31)
#define LPC24XX_PIN_EMC_D_0_31 LPC24XX_PIN_EMC_RANGE(3, 0, 31)
#define LPC24XX_PIN_EMC_A_0_12 LPC24XX_PIN_EMC_RANGE(4, 0, 12)
#define LPC24XX_PIN_EMC_A_0_13 LPC24XX_PIN_EMC_RANGE(4, 0, 13)
#define LPC24XX_PIN_EMC_A_0_14 LPC24XX_PIN_EMC_RANGE(4, 0, 14)
#define LPC24XX_PIN_EMC_A_0_15 LPC24XX_PIN_EMC_RANGE(4, 0, 15)
#define LPC24XX_PIN_EMC_A_0_16 \
LPC24XX_PIN_EMC_A_0_15, \
LPC24XX_PIN(4, 16, LPC24XX_PIN_FUNCTION_01, 1)
LPC24XX_PIN_EMC(4, 16)
#define LPC24XX_PIN_EMC_A_0_17 \
LPC24XX_PIN_EMC_A_0_15, \
LPC24XX_PIN_RANGE(4, 16, 17, LPC24XX_PIN_FUNCTION_01, 1)
LPC24XX_PIN_EMC_RANGE(4, 16, 17)
#define LPC24XX_PIN_EMC_A_0_18 \
LPC24XX_PIN_EMC_A_0_15, \
LPC24XX_PIN_RANGE(4, 16, 18, LPC24XX_PIN_FUNCTION_01, 1)
LPC24XX_PIN_EMC_RANGE(4, 16, 18)
#define LPC24XX_PIN_EMC_A_0_19 \
LPC24XX_PIN_EMC_A_0_15, \
LPC24XX_PIN_RANGE(4, 16, 19, LPC24XX_PIN_FUNCTION_01, 1)
LPC24XX_PIN_EMC_RANGE(4, 16, 19)
#define LPC24XX_PIN_EMC_A_0_20 \
LPC24XX_PIN_EMC_A_0_15, \
LPC24XX_PIN_RANGE(4, 16, 20, LPC24XX_PIN_FUNCTION_01, 1)
LPC24XX_PIN_EMC_RANGE(4, 16, 20)
#define LPC24XX_PIN_EMC_A_0_21 \
LPC24XX_PIN_EMC_A_0_15, \
LPC24XX_PIN_RANGE(4, 16, 21, LPC24XX_PIN_FUNCTION_01, 1)
LPC24XX_PIN_EMC_RANGE(4, 16, 21)
#define LPC24XX_PIN_EMC_A_0_22 \
LPC24XX_PIN_EMC_A_0_15, \
LPC24XX_PIN_RANGE(4, 16, 22, LPC24XX_PIN_FUNCTION_01, 1)
LPC24XX_PIN_EMC_RANGE(4, 16, 22)
#define LPC24XX_PIN_EMC_A_0_23 \
LPC24XX_PIN_EMC_A_0_15, \
LPC24XX_PIN_RANGE(4, 16, 23, LPC24XX_PIN_FUNCTION_01, 1)
LPC24XX_PIN_EMC_RANGE(4, 16, 23)
#define LPC24XX_PIN_EMC_A_0_24 \
LPC24XX_PIN_EMC_A_0_23, \
LPC24XX_PIN(5, 24, LPC24XX_PIN_FUNCTION_01, 1)
LPC24XX_PIN_EMC(5, 24)
#define LPC24XX_PIN_EMC_A_0_25 \
LPC24XX_PIN_EMC_A_0_23, \
LPC24XX_PIN_RANGE(5, 24, 25, LPC24XX_PIN_FUNCTION_01, 1)
LPC24XX_PIN_EMC_RANGE(5, 24, 25)
/** @} */