ARM: mvebu: x530: set MPP55 to gpio
Subsystems (3)
PATCH 1/2 ARM: mvebu: x530: set MPP55 to gpio
MPP55 is used as a reset connected to the L3 switch chip. This doesn't matter for u-boot as it doesn't use the L3 switch but it is useful to be able to toggle the switch in/out of reset for the OS.
---
board/alliedtelesis/x530/x530.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/alliedtelesis/x530/x530.c +1 -1
@@ -92,7 +92,7 @@ int board_early_init_f(void)writel (0x55550550 ,MVEBU_MPP_BASE +0x0c );writel (0x55555555 ,MVEBU_MPP_BASE +0x10 );writel (0x00100565 ,MVEBU_MPP_BASE +0x14 ); -writel (0x40000000 ,MVEBU_MPP_BASE +0x18 ); +writel (0x00000000 ,MVEBU_MPP_BASE +0x18 );writel (0x00004444 ,MVEBU_MPP_BASE +0x1c );return 0 ;
Signature · 1 line
2.34.1
PATCH 2/2 ARM: mvebu: x530: Add option for ECC
Some older x530 boards have layout issues that cause problems for DDR. These are usually seen as training failures but can also cause problems after training has completed. Add an option to enable ECC leaving the default as N which will work with both old and new boards.
---
arch/arm/mach-mvebu/Kconfig | 1 + board/alliedtelesis/x530/Kconfig | 20 ++++++++++++++++++++ board/alliedtelesis/x530/x530.c | 8 +++++++- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 board/alliedtelesis/x530/Kconfig
arch/arm/mach-mvebu/Kconfig +1 -0
@@ -341,5 +341,6 @@ config SECURED_MODE_CSK_INDEX source "board/solidrun/clearfog/Kconfig" source "board/kobol/helios4/Kconfig" +source "board/alliedtelesis/x530/Kconfig" endif
board/alliedtelesis/x530/Kconfig new file +20 -0
@@ -0,0 +1,20 @@ +menu "x530 configuration" + depends on TARGET_X530 + +config X530_ECC + bool "Enable DDR3 ECC" + help + Some of the older x530 board have layout issues which cause problems + for the DDR which usually exhibit as DDR training failures or + problems accessing DDR after training. + + The known affected boards are: + + * 844-001897-00 (x530-28GTXm, x530-28GPXm, GS980MX/28PSm) + * 844-001948-00 (GS980MX/28) + * 844-002008-00 (x530L-52GTX, x530L-52GPX) + * 844-001974-00 (x530-52GTXm, x530-52GPXm, GS980MX/52PSm) + + If you have a newer board you can set Y here, otherwise say N. + +endmenu
board/alliedtelesis/x530/x530.c +7 -1
@@ -45,6 +45,12 @@ int hws_board_topology_load(struct serdes_map **serdes_map_array, u8 *count)return 0 ; } +#if CONFIG_IS_ENABLED (X530_ECC ) +#define BUS_MASK BUS_MASK_32BIT_ECC +#else +#define BUS_MASK BUS_MASK_32BIT +#endif +/* * Define the DDR layout / topology here in the board file. This will * be used by the DDR3 init code in the SPL U-Boot version to configure
@@ -66,7 +72,7 @@ static struct mv_ddr_topology_map board_topology_map = {0 ,0 ,/* cas_l cas_wl */ MV_DDR_TEMP_LOW ,/* temperature */ MV_DDR_TIM_2T} }, /* timing */ -BUS_MASK_32BIT_ECC ,/* subphys mask */ +BUS_MASK ,/* subphys mask */ MV_DDR_CFG_DEFAULT ,/* ddr configuration data source */ NOT_COMBINED ,/* ddr twin-die combined */ { {0} }, /* raw spd data */
Signature · 1 line
2.34.1
Re: [PATCH 2/2] ARM: mvebu: x530: Add option for ECC
Quoted 6 lines · Chris Packham
Some older x530 boards have layout issues that cause problems for DDR. These are usually seen as training failures but can also cause problems after training has completed. Add an option to enable ECC leaving the default as N which will work with both old and new boards.
Signed-off-by Chris Packham <[email protected]>
Just checking: Most likely you don't have the possibility to detect the board version at runtime?
If this is not possible:
Thanks,
Stefan
Quoted 64 lines
---
arch/arm/mach-mvebu/Kconfig | 1 + board/alliedtelesis/x530/Kconfig | 20 ++++++++++++++++++++ board/alliedtelesis/x530/x530.c | 8 +++++++- 3 files changed, 28 insertions(+), 1 deletion(-)create mode 100644 board/alliedtelesis/x530/Kconfig
arch/arm/mach-mvebu/Kconfig +1
-0@@ -341,5 +341,6 @@ config SECURED_MODE_CSK_INDEX source "board/solidrun/clearfog/Kconfig" source "board/kobol/helios4/Kconfig" +source "board/alliedtelesis/x530/Kconfig" endifboard/alliedtelesis/x530/Kconfig new file +20
-0@@ -0,0 +1,20 @@ +menu "x530 configuration" + depends on TARGET_X530 + +config X530_ECC + bool "Enable DDR3 ECC" + help + Some of the older x530 board have layout issues which cause problems + for the DDR which usually exhibit as DDR training failures or + problems accessing DDR after training. + + The known affected boards are: + + * 844-001897-00 (x530-28GTXm, x530-28GPXm, GS980MX/28PSm) + * 844-001948-00 (GS980MX/28) + * 844-002008-00 (x530L-52GTX, x530L-52GPX) + * 844-001974-00 (x530-52GTXm, x530-52GPXm, GS980MX/52PSm) + + If you have a newer board you can set Y here, otherwise say N. + +endmenuboard/alliedtelesis/x530/x530.c +6
-0@@ -45,6 +45,12 @@ int hws_board_topology_load(struct serdes_map **serdes_map_array, u8 *count)return 0 ; } +#if CONFIG_IS_ENABLED (X530_ECC ) +#define BUS_MASK BUS_MASK_32BIT_ECC +#else +#define BUS_MASK BUS_MASK_32BIT +#endif +/* * Define the DDR layout / topology here in the board file. This will * be used by the DDR3 init code in the SPL U-Boot version to configure
board/alliedtelesis/x530/x530.c static struct mv_ddr_topology_map board_topology_map = { · line 78
Quoted 8 lines
board/alliedtelesis/x530/x530.c +1
-1@@ -66,7 +72,7 @@ static struct mv_ddr_topology_map board_topology_map = {0 ,0 ,/* cas_l cas_wl */ MV_DDR_TEMP_LOW ,/* temperature */ MV_DDR_TIM_2T} }, /* timing */ -BUS_MASK_32BIT_ECC ,/* subphys mask */ +BUS_MASK ,/* subphys mask */ MV_DDR_CFG_DEFAULT ,/* ddr configuration data source */ NOT_COMBINED ,/* ddr twin-die combined */ { {0} }, /* raw spd data */
Viele Grüße,
Stefan Roese
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Re: [PATCH 2/2] ARM: mvebu: x530: Add option for ECC
Quoted 11 lines · Stefan Roese,
Quoted 6 lines · Chris Packham
Some older x530 boards have layout issues that cause problems for DDR. These are usually seen as training failures but can also cause problems after training has completed. Add an option to enable ECC leaving the default as N which will work with both old and new boards.
Signed-off-by Chris Packham <[email protected]>Just checking: Most likely you don't have the possibility to detect the board version at runtime?
Not in a way that can be done without working RAM. For our internal fork we maintain 2 defconfigs one with ECC one without. We can manage via the BOM which boards get which bootloader.
Quoted 93 lines
If this is not possible:
Reviewed-by Stefan Roese <[email protected]>Thanks,
StefanReview
Quoted 20 lines
---
arch/arm/mach-mvebu/Kconfig | 1 + board/alliedtelesis/x530/Kconfig | 20 ++++++++++++++++++++ board/alliedtelesis/x530/x530.c | 8 +++++++- 3 files changed, 28 insertions(+), 1 deletion(-)create mode 100644 board/alliedtelesis/x530/Kconfig
arch/arm/mach-mvebu/Kconfig +1
-0@@ -341,5 +341,6 @@ config SECURED_MODE_CSK_INDEX source "board/solidrun/clearfog/Kconfig" source "board/kobol/helios4/Kconfig" +source "board/alliedtelesis/x530/Kconfig" endif(quoted diff) +0
-0b/board/alliedtelesis/x530/Kconfig
board/alliedtelesis/x530/Kconfig line 7
Quoted 12 lines
new file mode 100644
index 000000000000..5c1ae36aebaaboard/alliedtelesis/x530/Kconfig new file +7
-0@@ -0,0 +1,20 @@ +menu "x530 configuration" + depends on TARGET_X530 + +config X530_ECC + bool "Enable DDR3 ECC" + help + Some of the older x530 board have layout issues which causeproblems
Review
Quoted 14 lines
board/alliedtelesis/x530/Kconfig new file +13
-0+ for the DDR which usually exhibit as DDR training failures or + problems accessing DDR after training. + + The known affected boards are: + + * 844-001897-00 (x530-28GTXm, x530-28GPXm, GS980MX/28PSm) + * 844-001948-00 (GS980MX/28) + * 844-002008-00 (x530L-52GTX, x530L-52GPX) + * 844-001974-00 (x530-52GTXm, x530-52GPXm, GS980MX/52PSm) + + If you have a newer board you can set Y here, otherwise say N. + +endmenu(quoted diff) +0
-0
b/board/alliedtelesis/x530/x530.cboard/alliedtelesis/x530/x530.c int hws_board_topology_load(struct serdes_map
Quoted 4 lines
index
866b6e68cc16..de20684f4353100644board/alliedtelesis/x530/x530.c +0
-0@@ -45,6 +45,12 @@ int hws_board_topology_load(struct serdes_map**serdes_map_array, u8 *count)
board/alliedtelesis/x530/x530.c static struct mv_ddr_topology_map board_topology_map =
Quoted 13 lines
board/alliedtelesis/x530/x530.c +6
-0return 0 ; } +#if CONFIG_IS_ENABLED (X530_ECC ) +#define BUS_MASK BUS_MASK_32BIT_ECC +#else +#define BUS_MASK BUS_MASK_32BIT +#endif +/* * Define the DDR layout / topology here in the board file. This will * be used by the DDR3 init code in the SPL U-Boot version to configure @@ -66,7 +72,7 @@ static struct mv_ddr_topology_map board_topology_map ={
board/alliedtelesis/x530/x530.c static struct mv_ddr_topology_map board_topology_map = { · line 78
Quoted 9 lines
board/alliedtelesis/x530/x530.c +1
-10 ,0 ,/* cas_l cas_wl */ MV_DDR_TEMP_LOW ,/* temperature */ MV_DDR_TIM_2T} }, /* timing */ -BUS_MASK_32BIT_ECC ,/* subphys mask */ +BUS_MASK ,/* subphys mask */ MV_DDR_CFG_DEFAULT ,/* ddr configuration data source */ NOT_COMBINED ,/* ddr twin-die combined */ { {0} }, /* raw spd data */Viele Grüße,
Stefan Roese--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Re: [PATCH 2/2] ARM: mvebu: x530: Add option for ECC
Quoted 80 lines · Chris Packham
Quoted 11 lines · Stefan Roese,
Quoted 6 lines · Chris Packham
Some older x530 boards have layout issues that cause problems for DDR. These are usually seen as training failures but can also cause problems after training has completed. Add an option to enable ECC leaving the default as N which will work with both old and new boards.
Signed-off-by Chris Packham <[email protected]>Just checking: Most likely you don't have the possibility to detect the board version at runtime?
Not in a way that can be done without working RAM. For our internal fork we maintain 2 defconfigs one with ECC one without. We can manage via the BOM which boards get which bootloader.
Quoted 61 lines
If this is not possible:
Reviewed-by Stefan Roese <[email protected]>Thanks,
StefanQuoted 53 lines
---
arch/arm/mach-mvebu/Kconfig | 1 + board/alliedtelesis/x530/Kconfig | 20 ++++++++++++++++++++ board/alliedtelesis/x530/x530.c | 8 +++++++- 3 files changed, 28 insertions(+), 1 deletion(-)create mode 100644 board/alliedtelesis/x530/Kconfig
arch/arm/mach-mvebu/Kconfig +1
-0@@ -341,5 +341,6 @@ config SECURED_MODE_CSK_INDEX source "board/solidrun/clearfog/Kconfig" source "board/kobol/helios4/Kconfig" +source "board/alliedtelesis/x530/Kconfig" endifboard/alliedtelesis/x530/Kconfig new file +20
-0@@ -0,0 +1,20 @@ +menu "x530 configuration" + depends on TARGET_X530 + +config X530_ECC + bool "Enable DDR3 ECC" + help + Some of the older x530 board have layout issues which cause problems + for the DDR which usually exhibit as DDR training failures or + problems accessing DDR after training. + + The known affected boards are: + + * 844-001897-00 (x530-28GTXm, x530-28GPXm, GS980MX/28PSm) + * 844-001948-00 (GS980MX/28) + * 844-002008-00 (x530L-52GTX, x530L-52GPX) + * 844-001974-00 (x530-52GTXm, x530-52GPXm, GS980MX/52PSm) + + If you have a newer board you can set Y here, otherwise say N. + +endmenuboard/alliedtelesis/x530/x530.c +0
-0@@ -45,6 +45,12 @@ int hws_board_topology_load(struct serdes_map **serdes_map_array, u8 *count)return 0 ; }
Quoted 6 lines
Quoted 6 lines
board/alliedtelesis/x530/x530.c int hws_board_topology_load(struct serdes_map **serdes_map_array, u8 *count) · line 53
Quoted 6 lines
board/alliedtelesis/x530/x530.c +6
-0+#if CONFIG_IS_ENABLED (X530_ECC ) +#define BUS_MASK BUS_MASK_32BIT_ECC +#else +#define BUS_MASK BUS_MASK_32BIT +#endif +
Hmm this doesn't actually appear to be working as intended. When the SPL is built I end up with CONFIG_IS_ENABLED(X530_ECC) == 0 even when I set it to y. Do I need to define a SPL version of this Kconfig symbol?
Quoted 21 lines
Quoted 21 lines
board/alliedtelesis/x530/x530.c static struct mv_ddr_topology_map board_topology_map = { · line 78
Quoted 13 lines
board/alliedtelesis/x530/x530.c +1
-1/* * Define the DDR layout / topology here in the board file. This will * be used by the DDR3 init code in the SPL U-Boot version to configure @@ -66,7 +72,7 @@ static struct mv_ddr_topology_map board_topology_map = {0 ,0 ,/* cas_l cas_wl */ MV_DDR_TEMP_LOW ,/* temperature */ MV_DDR_TIM_2T} }, /* timing */ -BUS_MASK_32BIT_ECC ,/* subphys mask */ +BUS_MASK ,/* subphys mask */ MV_DDR_CFG_DEFAULT ,/* ddr configuration data source */ NOT_COMBINED ,/* ddr twin-die combined */ { {0} }, /* raw spd data */Viele Grüße,
Stefan Roese--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Re: [PATCH 2/2] ARM: mvebu: x530: Add option for ECC
Quoted 81 lines · Chris Packham
Quoted 80 lines · Chris Packham
Quoted 11 lines · Stefan Roese,
Quoted 6 lines · Chris Packham
Some older x530 boards have layout issues that cause problems for DDR. These are usually seen as training failures but can also cause problems after training has completed. Add an option to enable ECC leaving the default as N which will work with both old and new boards.
Signed-off-by Chris Packham <[email protected]>Just checking: Most likely you don't have the possibility to detect the board version at runtime?
Not in a way that can be done without working RAM. For our internal fork we maintain 2 defconfigs one with ECC one without. We can manage via the BOM which boards get which bootloader.
Quoted 61 lines
If this is not possible:
Reviewed-by Stefan Roese <[email protected]>Thanks,
StefanQuoted 53 lines
---
arch/arm/mach-mvebu/Kconfig | 1 + board/alliedtelesis/x530/Kconfig | 20 ++++++++++++++++++++ board/alliedtelesis/x530/x530.c | 8 +++++++- 3 files changed, 28 insertions(+), 1 deletion(-)create mode 100644 board/alliedtelesis/x530/Kconfig
arch/arm/mach-mvebu/Kconfig +1
-0@@ -341,5 +341,6 @@ config SECURED_MODE_CSK_INDEX source "board/solidrun/clearfog/Kconfig" source "board/kobol/helios4/Kconfig" +source "board/alliedtelesis/x530/Kconfig" endifboard/alliedtelesis/x530/Kconfig new file +20
-0@@ -0,0 +1,20 @@ +menu "x530 configuration" + depends on TARGET_X530 + +config X530_ECC + bool "Enable DDR3 ECC" + help + Some of the older x530 board have layout issues which cause problems + for the DDR which usually exhibit as DDR training failures or + problems accessing DDR after training. + + The known affected boards are: + + * 844-001897-00 (x530-28GTXm, x530-28GPXm, GS980MX/28PSm) + * 844-001948-00 (GS980MX/28) + * 844-002008-00 (x530L-52GTX, x530L-52GPX) + * 844-001974-00 (x530-52GTXm, x530-52GPXm, GS980MX/52PSm) + + If you have a newer board you can set Y here, otherwise say N. + +endmenuboard/alliedtelesis/x530/x530.c +0
-0@@ -45,6 +45,12 @@ int hws_board_topology_load(struct serdes_map **serdes_map_array, u8 *count)return 0 ; }
Quoted 11 lines
Quoted 6 lines
Quoted 6 lines
board/alliedtelesis/x530/x530.c int hws_board_topology_load(struct serdes_map **serdes_map_array, u8 *count) · line 53
Quoted 6 lines
board/alliedtelesis/x530/x530.c +6
-0+#if CONFIG_IS_ENABLED (X530_ECC ) +#define BUS_MASK BUS_MASK_32BIT_ECC +#else +#define BUS_MASK BUS_MASK_32BIT +#endif +Hmm this doesn't actually appear to be working as intended. When the SPL is built I end up with
CONFIG_IS_ENABLED(X530_ECC)== 0 even when I set it to y. Do I need to define a SPL version of thisKconfigsymbol?
If you're using CONFIG_IS_ENABLED, then yes. It doesn't always make sense to use CONFIG_IS_ENABLED or other macros rather than just #ifdef checks.
Signature · 1 line
Tom
Re: [PATCH 2/2] ARM: mvebu: x530: Add option for ECC
In reply to Chris PackhamQuoted 81 lines · Chris Packham
Quoted 80 lines · Chris Packham
Quoted 11 lines · Stefan Roese,
Quoted 6 lines · Chris Packham
Some older x530 boards have layout issues that cause problems for DDR. These are usually seen as training failures but can also cause problems after training has completed. Add an option to enable ECC leaving the default as N which will work with both old and new boards.
Signed-off-by Chris Packham <[email protected]>Just checking: Most likely you don't have the possibility to detect the board version at runtime?
Not in a way that can be done without working RAM. For our internal fork we maintain 2 defconfigs one with ECC one without. We can manage via the BOM which boards get which bootloader.
Quoted 61 lines
If this is not possible:
Reviewed-by Stefan Roese <[email protected]>Thanks,
StefanQuoted 53 lines
---
arch/arm/mach-mvebu/Kconfig | 1 + board/alliedtelesis/x530/Kconfig | 20 ++++++++++++++++++++ board/alliedtelesis/x530/x530.c | 8 +++++++- 3 files changed, 28 insertions(+), 1 deletion(-)create mode 100644 board/alliedtelesis/x530/Kconfig
arch/arm/mach-mvebu/Kconfig +1
-0@@ -341,5 +341,6 @@ config SECURED_MODE_CSK_INDEX source "board/solidrun/clearfog/Kconfig" source "board/kobol/helios4/Kconfig" +source "board/alliedtelesis/x530/Kconfig" endifboard/alliedtelesis/x530/Kconfig new file +20
-0@@ -0,0 +1,20 @@ +menu "x530 configuration" + depends on TARGET_X530 + +config X530_ECC + bool "Enable DDR3 ECC" + help + Some of the older x530 board have layout issues which cause problems + for the DDR which usually exhibit as DDR training failures or + problems accessing DDR after training. + + The known affected boards are: + + * 844-001897-00 (x530-28GTXm, x530-28GPXm, GS980MX/28PSm) + * 844-001948-00 (GS980MX/28) + * 844-002008-00 (x530L-52GTX, x530L-52GPX) + * 844-001974-00 (x530-52GTXm, x530-52GPXm, GS980MX/52PSm) + + If you have a newer board you can set Y here, otherwise say N. + +endmenuboard/alliedtelesis/x530/x530.c +0
-0@@ -45,6 +45,12 @@ int hws_board_topology_load(struct serdes_map **serdes_map_array, u8 *count)return 0 ; }
Quoted 11 lines
Quoted 6 lines
Quoted 6 lines
board/alliedtelesis/x530/x530.c int hws_board_topology_load(struct serdes_map **serdes_map_array, u8 *count) · line 53
Quoted 6 lines
board/alliedtelesis/x530/x530.c +6
-0+#if CONFIG_IS_ENABLED (X530_ECC ) +#define BUS_MASK BUS_MASK_32BIT_ECC +#else +#define BUS_MASK BUS_MASK_32BIT +#endif +Hmm this doesn't actually appear to be working as intended. When the SPL is built I end up with
CONFIG_IS_ENABLED(X530_ECC)== 0 even when I set it to y. Do I need to define a SPL version of thisKconfigsymbol?
AFAIK, IS_ENABLED(CONFIG_X530_ECC) would be a solution here. There is no need for a new SPL Kconfig option this way. Please give it a try.
Thanks,
Stefan
Quoted 5 lines · Chris Packham
MPP55 is used as a reset connected to the L3 switch chip. This doesn't matter for u-boot as it doesn't use the L3 switch but it is useful to be able to toggle the switch in/out of reset for the OS.
Signed-off-by Chris Packham <[email protected]>
Thanks,
Stefan
Quoted 11 lines
---
board/alliedtelesis/x530/x530.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)board/alliedtelesis/x530/x530.c +0
-0
board/alliedtelesis/x530/x530.c int board_early_init_f(void) · line 98
Quoted 8 lines
board/alliedtelesis/x530/x530.c +1
-1@@ -92,7 +92,7 @@ int board_early_init_f(void)writel (0x55550550 ,MVEBU_MPP_BASE +0x0c );writel (0x55555555 ,MVEBU_MPP_BASE +0x10 );writel (0x00100565 ,MVEBU_MPP_BASE +0x14 ); -writel (0x40000000 ,MVEBU_MPP_BASE +0x18 ); +writel (0x00000000 ,MVEBU_MPP_BASE +0x18 );writel (0x00004444 ,MVEBU_MPP_BASE +0x1c );return 0 ;
Viele Grüße,
Stefan Roese
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]