* [U-Boot] [PATCH 0/2] arm/km: configuration of the mv88e6352 switch on kmnusa
@ 2012-08-16 11:25 Valentin Longchamp
2012-08-16 11:25 ` [U-Boot] [PATCH 1/2] arm/km: add mv88e6352 configuration for kmnusa Valentin Longchamp
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Valentin Longchamp @ 2012-08-16 11:25 UTC (permalink / raw)
To: u-boot
This series adds supoort for the configuration of the mv88e6352 external switch
on kmnusa. It has a clear dependancy to the minimal mv88e6352 net/phy driver:
http://patchwork.ozlabs.org/patch/177953/
Valentin Longchamp (2):
arm/km: add mv88e6352 configuration for kmnusa
km_kirkwood: enable MV88E6352_SWITCH support for kmnusa
board/keymile/km_arm/km_arm.c | 63 +++++++++++++++++++++++++++++++++++++++++
include/configs/km_kirkwood.h | 2 +
2 files changed, 65 insertions(+), 0 deletions(-)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 1/2] arm/km: add mv88e6352 configuration for kmnusa
2012-08-16 11:25 [U-Boot] [PATCH 0/2] arm/km: configuration of the mv88e6352 switch on kmnusa Valentin Longchamp
@ 2012-08-16 11:25 ` Valentin Longchamp
2012-08-17 7:59 ` Prafulla Wadaskar
2012-08-16 11:25 ` [U-Boot] [PATCH 2/2] km_kirkwood: enable MV88E6352_SWITCH support " Valentin Longchamp
` (2 subsequent siblings)
3 siblings, 1 reply; 13+ messages in thread
From: Valentin Longchamp @ 2012-08-16 11:25 UTC (permalink / raw)
To: u-boot
The kmnusa board uses a mv88e6352 switch that is connected to the main
eth interface of the kirkwood. Therefore the switch must be configured
so that the kirkwood's egiga eth inferface can be used.
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Cc: Holger Brunck <holger.brunck@keymile.com>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
---
board/keymile/km_arm/km_arm.c | 63 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 63 insertions(+), 0 deletions(-)
diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c
index 2b2ca39..c0069c1 100644
--- a/board/keymile/km_arm/km_arm.c
+++ b/board/keymile/km_arm/km_arm.c
@@ -385,6 +385,69 @@ void reset_phy(void)
/* reset the phy */
miiphy_reset(name, CONFIG_PHY_BASE_ADR);
}
+#elif defined(CONFIG_KM_PIGGY4_88E6352)
+
+#include <mv88e6352.h>
+
+#if defined(CONFIG_KM_NUSA)
+struct mv88e_sw_reg extsw_conf[] = {
+ /* port 0, PIGY4, autoneg */
+ /* first the fix for the 1000Mbits Autoneg, this is from
+ * a Marvell errata, the regs are undocumented */
+ { PHY(0), PHY_PAGE, AN1000FIX_PAGE },
+ { PHY(0), PHY_STATUS, AN1000FIX },
+ { PHY(0), PHY_PAGE, 0 },
+ /* now the real port and phy configuration */
+ { PORT(0), PORT_PHY, NO_SPEED_FOR },
+ { PORT(0), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
+ { PHY(0), PHY_1000_CTRL, NO_ADV },
+ { PHY(0), PHY_SPEC_CTRL, AUTO_MDIX_EN },
+ { PHY(0), PHY_CTRL, PHY_100_MBPS | AUTONEG_EN | AUTONEG_RST |
+ FULL_DUPLEX },
+ /* port 1, unused */
+ { PORT(1), PORT_CTRL, PORT_DIS },
+ { PHY(1), PHY_CTRL, PHY_PWR_DOWN },
+ { PHY(1), PHY_SPEC_CTRL, SPEC_PWR_DOWN },
+ /* port 2, unused */
+ { PORT(2), PORT_CTRL, PORT_DIS },
+ { PHY(2), PHY_CTRL, PHY_PWR_DOWN },
+ { PHY(2), PHY_SPEC_CTRL, SPEC_PWR_DOWN },
+ /* port 3, unused */
+ { PORT(3), PORT_CTRL, PORT_DIS },
+ { PHY(3), PHY_CTRL, PHY_PWR_DOWN },
+ { PHY(3), PHY_SPEC_CTRL, SPEC_PWR_DOWN },
+ /* port 4, ICNEV, SerDes, SGMII */
+ { PORT(4), PORT_STATUS, NO_PHY_DETECT },
+ { PORT(4), PORT_PHY, SPEED_1000_FOR },
+ { PORT(4), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
+ { PHY(4), PHY_CTRL, PHY_PWR_DOWN },
+ { PHY(4), PHY_SPEC_CTRL, SPEC_PWR_DOWN },
+ /* port 5, CPU_RGMII */
+ { PORT(5), PORT_PHY, RX_RGMII_TIM | TX_RGMII_TIM | FLOW_CTRL_EN |
+ FLOW_CTRL_FOR | LINK_VAL | LINK_FOR | FULL_DPX |
+ FULL_DPX_FOR | SPEED_1000_FOR },
+ { PORT(5), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
+ /* port 6, unused, this port has no phy */
+ { PORT(6), PORT_CTRL, PORT_DIS },
+};
+#else
+struct mv88e_sw_reg extsw_conf[] = {};
+#endif
+
+void reset_phy(void)
+{
+#if defined(CONFIG_KM_MVEXTSW_ADDR)
+ char *name = "egiga0";
+
+ if (miiphy_set_current_dev(name))
+ return;
+
+ mv88e_sw_program(name, CONFIG_KM_MVEXTSW_ADDR, extsw_conf,
+ ARRAY_SIZE(extsw_conf));
+ mv88e_sw_reset(name, CONFIG_KM_MVEXTSW_ADDR);
+#endif
+}
+
#else
/* Configure and enable MV88E1118 PHY on the piggy*/
void reset_phy(void)
--
1.7.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 2/2] km_kirkwood: enable MV88E6352_SWITCH support for kmnusa
2012-08-16 11:25 [U-Boot] [PATCH 0/2] arm/km: configuration of the mv88e6352 switch on kmnusa Valentin Longchamp
2012-08-16 11:25 ` [U-Boot] [PATCH 1/2] arm/km: add mv88e6352 configuration for kmnusa Valentin Longchamp
@ 2012-08-16 11:25 ` Valentin Longchamp
2012-08-17 7:59 ` Prafulla Wadaskar
2012-09-28 6:43 ` Prafulla Wadaskar
2012-08-17 7:59 ` [U-Boot] [PATCH 0/2] arm/km: configuration of the mv88e6352 switch on kmnusa Prafulla Wadaskar
2012-09-03 8:11 ` Prafulla Wadaskar
3 siblings, 2 replies; 13+ messages in thread
From: Valentin Longchamp @ 2012-08-16 11:25 UTC (permalink / raw)
To: u-boot
This is required to configure the external 88e6352 switch on nusa.
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
---
include/configs/km_kirkwood.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/configs/km_kirkwood.h b/include/configs/km_kirkwood.h
index fba181f..762cc10 100644
--- a/include/configs/km_kirkwood.h
+++ b/include/configs/km_kirkwood.h
@@ -62,6 +62,8 @@
#define CONFIG_KM_ENV_IS_IN_SPI_NOR
#define CONFIG_KM_FPGA_CONFIG
#define CONFIG_KM_PIGGY4_88E6352
+#define CONFIG_MV88E6352_SWITCH
+#define CONFIG_KM_MVEXTSW_ADDR 0x10
/* KM_MGCOGE3UN */
#elif defined(CONFIG_KM_MGCOGE3UN)
--
1.7.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 1/2] arm/km: add mv88e6352 configuration for kmnusa
2012-08-16 11:25 ` [U-Boot] [PATCH 1/2] arm/km: add mv88e6352 configuration for kmnusa Valentin Longchamp
@ 2012-08-17 7:59 ` Prafulla Wadaskar
2012-08-17 8:43 ` Valentin Longchamp
0 siblings, 1 reply; 13+ messages in thread
From: Prafulla Wadaskar @ 2012-08-17 7:59 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Valentin Longchamp [mailto:valentin.longchamp at keymile.com]
> Sent: 16 August 2012 16:55
> To: u-boot at lists.denx.de
> Cc: holger.brunck at keymile.com; Prafulla Wadaskar;
> valentin.longchamp at keymile.com
> Subject: [PATCH 1/2] arm/km: add mv88e6352 configuration for kmnusa
>
> The kmnusa board uses a mv88e6352 switch that is connected to the main
> eth interface of the kirkwood. Therefore the switch must be configured
> so that the kirkwood's egiga eth inferface can be used.
>
> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
> Cc: Holger Brunck <holger.brunck@keymile.com>
> Cc: Prafulla Wadaskar <prafulla@marvell.com>
> ---
> board/keymile/km_arm/km_arm.c | 63
> +++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 63 insertions(+), 0 deletions(-)
>
> diff --git a/board/keymile/km_arm/km_arm.c
> b/board/keymile/km_arm/km_arm.c
> index 2b2ca39..c0069c1 100644
> --- a/board/keymile/km_arm/km_arm.c
> +++ b/board/keymile/km_arm/km_arm.c
> @@ -385,6 +385,69 @@ void reset_phy(void)
> /* reset the phy */
> miiphy_reset(name, CONFIG_PHY_BASE_ADR);
> }
> +#elif defined(CONFIG_KM_PIGGY4_88E6352)
> +
> +#include <mv88e6352.h>
> +
> +#if defined(CONFIG_KM_NUSA)
> +struct mv88e_sw_reg extsw_conf[] = {
> + /* port 0, PIGY4, autoneg */
> + /* first the fix for the 1000Mbits Autoneg, this is from
> + * a Marvell errata, the regs are undocumented */
May you please follow standard c-style commenting?
Otherwise ack for this patch
Regards..
Prafulla . .
^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 2/2] km_kirkwood: enable MV88E6352_SWITCH support for kmnusa
2012-08-16 11:25 ` [U-Boot] [PATCH 2/2] km_kirkwood: enable MV88E6352_SWITCH support " Valentin Longchamp
@ 2012-08-17 7:59 ` Prafulla Wadaskar
2012-09-28 6:43 ` Prafulla Wadaskar
1 sibling, 0 replies; 13+ messages in thread
From: Prafulla Wadaskar @ 2012-08-17 7:59 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Valentin Longchamp [mailto:valentin.longchamp at keymile.com]
> Sent: 16 August 2012 16:55
> To: u-boot at lists.denx.de
> Cc: holger.brunck at keymile.com; Prafulla Wadaskar;
> valentin.longchamp at keymile.com
> Subject: [PATCH 2/2] km_kirkwood: enable MV88E6352_SWITCH support for
> kmnusa
>
> This is required to configure the external 88e6352 switch on nusa.
>
> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
> cc: Holger Brunck <holger.brunck@keymile.com>
> cc: Prafulla Wadaskar <prafulla@marvell.com>
> ---
> include/configs/km_kirkwood.h | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/include/configs/km_kirkwood.h
> b/include/configs/km_kirkwood.h
> index fba181f..762cc10 100644
> --- a/include/configs/km_kirkwood.h
> +++ b/include/configs/km_kirkwood.h
> @@ -62,6 +62,8 @@
> #define CONFIG_KM_ENV_IS_IN_SPI_NOR
> #define CONFIG_KM_FPGA_CONFIG
> #define CONFIG_KM_PIGGY4_88E6352
> +#define CONFIG_MV88E6352_SWITCH
> +#define CONFIG_KM_MVEXTSW_ADDR 0x10
>
> /* KM_MGCOGE3UN */
> #elif defined(CONFIG_KM_MGCOGE3UN)
Acked-by: Prafulla Wadaskar <Prafulla@marvell.com>
Regards...
Prafulla . . .
^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 0/2] arm/km: configuration of the mv88e6352 switch on kmnusa
2012-08-16 11:25 [U-Boot] [PATCH 0/2] arm/km: configuration of the mv88e6352 switch on kmnusa Valentin Longchamp
2012-08-16 11:25 ` [U-Boot] [PATCH 1/2] arm/km: add mv88e6352 configuration for kmnusa Valentin Longchamp
2012-08-16 11:25 ` [U-Boot] [PATCH 2/2] km_kirkwood: enable MV88E6352_SWITCH support " Valentin Longchamp
@ 2012-08-17 7:59 ` Prafulla Wadaskar
2012-09-03 8:11 ` Prafulla Wadaskar
3 siblings, 0 replies; 13+ messages in thread
From: Prafulla Wadaskar @ 2012-08-17 7:59 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Valentin Longchamp [mailto:valentin.longchamp at keymile.com]
> Sent: 16 August 2012 16:55
> To: u-boot at lists.denx.de
> Cc: holger.brunck at keymile.com; Prafulla Wadaskar;
> valentin.longchamp at keymile.com
> Subject: [PATCH 0/2] arm/km: configuration of the mv88e6352 switch on
> kmnusa
>
> This series adds supoort for the configuration of the mv88e6352
> external switch
> on kmnusa. It has a clear dependancy to the minimal mv88e6352 net/phy
> driver:
> http://patchwork.ozlabs.org/patch/177953/
Hi Joe
Unless above patch is in, I cannot pull this patch series,
May you please check and pull it?
Or let me know your ack on this if I need to pull it.
Regards...
Prafulla . . .
^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 1/2] arm/km: add mv88e6352 configuration for kmnusa
2012-08-17 7:59 ` Prafulla Wadaskar
@ 2012-08-17 8:43 ` Valentin Longchamp
2012-08-17 8:53 ` Prafulla Wadaskar
0 siblings, 1 reply; 13+ messages in thread
From: Valentin Longchamp @ 2012-08-17 8:43 UTC (permalink / raw)
To: u-boot
On 08/17/2012 09:59 AM, Prafulla Wadaskar wrote:
>
>
>> -----Original Message-----
>> From: Valentin Longchamp [mailto:valentin.longchamp at keymile.com]
>> Sent: 16 August 2012 16:55
>> To: u-boot at lists.denx.de
>> Cc: holger.brunck at keymile.com; Prafulla Wadaskar;
>> valentin.longchamp at keymile.com
>> Subject: [PATCH 1/2] arm/km: add mv88e6352 configuration for kmnusa
>>
>> The kmnusa board uses a mv88e6352 switch that is connected to the main
>> eth interface of the kirkwood. Therefore the switch must be configured
>> so that the kirkwood's egiga eth inferface can be used.
>>
>> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
>> Cc: Holger Brunck <holger.brunck@keymile.com>
>> Cc: Prafulla Wadaskar <prafulla@marvell.com>
>> ---
>> board/keymile/km_arm/km_arm.c | 63
>> +++++++++++++++++++++++++++++++++++++++++
>> 1 files changed, 63 insertions(+), 0 deletions(-)
>>
>> diff --git a/board/keymile/km_arm/km_arm.c
>> b/board/keymile/km_arm/km_arm.c
>> index 2b2ca39..c0069c1 100644
>> --- a/board/keymile/km_arm/km_arm.c
>> +++ b/board/keymile/km_arm/km_arm.c
>> @@ -385,6 +385,69 @@ void reset_phy(void)
>> /* reset the phy */
>> miiphy_reset(name, CONFIG_PHY_BASE_ADR);
>> }
>> +#elif defined(CONFIG_KM_PIGGY4_88E6352)
>> +
>> +#include <mv88e6352.h>
>> +
>> +#if defined(CONFIG_KM_NUSA)
>> +struct mv88e_sw_reg extsw_conf[] = {
>> + /* port 0, PIGY4, autoneg */
>> + /* first the fix for the 1000Mbits Autoneg, this is from
>> + * a Marvell errata, the regs are undocumented */
>
> May you please follow standard c-style commenting?
>
OK, I will change this comment. Is it OK if I just repost this updated patch as
a reply to this message since it's a very minor change or do you need the whole
series ?
Thanks
Valentin
^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 1/2] arm/km: add mv88e6352 configuration for kmnusa
2012-08-17 8:43 ` Valentin Longchamp
@ 2012-08-17 8:53 ` Prafulla Wadaskar
2012-08-17 9:35 ` [U-Boot] [PATCH v2 " Valentin Longchamp
0 siblings, 1 reply; 13+ messages in thread
From: Prafulla Wadaskar @ 2012-08-17 8:53 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Valentin Longchamp [mailto:valentin.longchamp at keymile.com]
> Sent: 17 August 2012 14:13
> To: Prafulla Wadaskar
> Cc: u-boot at lists.denx.de; holger.brunck at keymile.com
> Subject: Re: [PATCH 1/2] arm/km: add mv88e6352 configuration for
> kmnusa
>
> On 08/17/2012 09:59 AM, Prafulla Wadaskar wrote:
> >
> >
> >> -----Original Message-----
> >> From: Valentin Longchamp [mailto:valentin.longchamp at keymile.com]
> >> Sent: 16 August 2012 16:55
> >> To: u-boot at lists.denx.de
> >> Cc: holger.brunck at keymile.com; Prafulla Wadaskar;
> >> valentin.longchamp at keymile.com
> >> Subject: [PATCH 1/2] arm/km: add mv88e6352 configuration for kmnusa
> >>
> >> The kmnusa board uses a mv88e6352 switch that is connected to the
> main
> >> eth interface of the kirkwood. Therefore the switch must be
> configured
> >> so that the kirkwood's egiga eth inferface can be used.
> >>
> >> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
> >> Cc: Holger Brunck <holger.brunck@keymile.com>
> >> Cc: Prafulla Wadaskar <prafulla@marvell.com>
> >> ---
> >> board/keymile/km_arm/km_arm.c | 63
> >> +++++++++++++++++++++++++++++++++++++++++
> >> 1 files changed, 63 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/board/keymile/km_arm/km_arm.c
> >> b/board/keymile/km_arm/km_arm.c
> >> index 2b2ca39..c0069c1 100644
> >> --- a/board/keymile/km_arm/km_arm.c
> >> +++ b/board/keymile/km_arm/km_arm.c
> >> @@ -385,6 +385,69 @@ void reset_phy(void)
> >> /* reset the phy */
> >> miiphy_reset(name, CONFIG_PHY_BASE_ADR);
> >> }
> >> +#elif defined(CONFIG_KM_PIGGY4_88E6352)
> >> +
> >> +#include <mv88e6352.h>
> >> +
> >> +#if defined(CONFIG_KM_NUSA)
> >> +struct mv88e_sw_reg extsw_conf[] = {
> >> + /* port 0, PIGY4, autoneg */
> >> + /* first the fix for the 1000Mbits Autoneg, this is from
> >> + * a Marvell errata, the regs are undocumented */
> >
> > May you please follow standard c-style commenting?
> >
>
> OK, I will change this comment. Is it OK if I just repost this updated
> patch as
> a reply to this message since it's a very minor change or do you need
> the whole
> series ?
I think v2 for this patch only should work.
Regards...
Prafulla . . .
^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH v2 1/2] arm/km: add mv88e6352 configuration for kmnusa
2012-08-17 8:53 ` Prafulla Wadaskar
@ 2012-08-17 9:35 ` Valentin Longchamp
2012-08-21 6:31 ` Prafulla Wadaskar
2012-09-28 6:43 ` Prafulla Wadaskar
0 siblings, 2 replies; 13+ messages in thread
From: Valentin Longchamp @ 2012-08-17 9:35 UTC (permalink / raw)
To: u-boot
The kmnusa board uses a mv88e6352 switch that is connected to the main
eth interface of the kirkwood. Therefore the switch must be configured
so that the kirkwood's egiga eth inferface can be used.
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Cc: Holger Brunck <holger.brunck@keymile.com>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
---
changes for v2:
- update comment to follow c-style commenting
board/keymile/km_arm/km_arm.c | 65 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 65 insertions(+), 0 deletions(-)
diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c
index 2b2ca39..604085d 100644
--- a/board/keymile/km_arm/km_arm.c
+++ b/board/keymile/km_arm/km_arm.c
@@ -385,6 +385,71 @@ void reset_phy(void)
/* reset the phy */
miiphy_reset(name, CONFIG_PHY_BASE_ADR);
}
+#elif defined(CONFIG_KM_PIGGY4_88E6352)
+
+#include <mv88e6352.h>
+
+#if defined(CONFIG_KM_NUSA)
+struct mv88e_sw_reg extsw_conf[] = {
+ /*
+ * port 0, PIGGY4, autoneg
+ * first the fix for the 1000Mbits Autoneg, this is from
+ * a Marvell errata, the regs are undocumented
+ */
+ { PHY(0), PHY_PAGE, AN1000FIX_PAGE },
+ { PHY(0), PHY_STATUS, AN1000FIX },
+ { PHY(0), PHY_PAGE, 0 },
+ /* now the real port and phy configuration */
+ { PORT(0), PORT_PHY, NO_SPEED_FOR },
+ { PORT(0), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
+ { PHY(0), PHY_1000_CTRL, NO_ADV },
+ { PHY(0), PHY_SPEC_CTRL, AUTO_MDIX_EN },
+ { PHY(0), PHY_CTRL, PHY_100_MBPS | AUTONEG_EN | AUTONEG_RST |
+ FULL_DUPLEX },
+ /* port 1, unused */
+ { PORT(1), PORT_CTRL, PORT_DIS },
+ { PHY(1), PHY_CTRL, PHY_PWR_DOWN },
+ { PHY(1), PHY_SPEC_CTRL, SPEC_PWR_DOWN },
+ /* port 2, unused */
+ { PORT(2), PORT_CTRL, PORT_DIS },
+ { PHY(2), PHY_CTRL, PHY_PWR_DOWN },
+ { PHY(2), PHY_SPEC_CTRL, SPEC_PWR_DOWN },
+ /* port 3, unused */
+ { PORT(3), PORT_CTRL, PORT_DIS },
+ { PHY(3), PHY_CTRL, PHY_PWR_DOWN },
+ { PHY(3), PHY_SPEC_CTRL, SPEC_PWR_DOWN },
+ /* port 4, ICNEV, SerDes, SGMII */
+ { PORT(4), PORT_STATUS, NO_PHY_DETECT },
+ { PORT(4), PORT_PHY, SPEED_1000_FOR },
+ { PORT(4), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
+ { PHY(4), PHY_CTRL, PHY_PWR_DOWN },
+ { PHY(4), PHY_SPEC_CTRL, SPEC_PWR_DOWN },
+ /* port 5, CPU_RGMII */
+ { PORT(5), PORT_PHY, RX_RGMII_TIM | TX_RGMII_TIM | FLOW_CTRL_EN |
+ FLOW_CTRL_FOR | LINK_VAL | LINK_FOR | FULL_DPX |
+ FULL_DPX_FOR | SPEED_1000_FOR },
+ { PORT(5), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
+ /* port 6, unused, this port has no phy */
+ { PORT(6), PORT_CTRL, PORT_DIS },
+};
+#else
+struct mv88e_sw_reg extsw_conf[] = {};
+#endif
+
+void reset_phy(void)
+{
+#if defined(CONFIG_KM_MVEXTSW_ADDR)
+ char *name = "egiga0";
+
+ if (miiphy_set_current_dev(name))
+ return;
+
+ mv88e_sw_program(name, CONFIG_KM_MVEXTSW_ADDR, extsw_conf,
+ ARRAY_SIZE(extsw_conf));
+ mv88e_sw_reset(name, CONFIG_KM_MVEXTSW_ADDR);
+#endif
+}
+
#else
/* Configure and enable MV88E1118 PHY on the piggy*/
void reset_phy(void)
--
1.7.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH v2 1/2] arm/km: add mv88e6352 configuration for kmnusa
2012-08-17 9:35 ` [U-Boot] [PATCH v2 " Valentin Longchamp
@ 2012-08-21 6:31 ` Prafulla Wadaskar
2012-09-28 6:43 ` Prafulla Wadaskar
1 sibling, 0 replies; 13+ messages in thread
From: Prafulla Wadaskar @ 2012-08-21 6:31 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Valentin Longchamp [mailto:valentin.longchamp at keymile.com]
> Sent: 17 August 2012 15:05
> To: u-boot at lists.denx.de
> Cc: Valentin Longchamp; Holger Brunck; Prafulla Wadaskar
> Subject: [PATCH v2 1/2] arm/km: add mv88e6352 configuration for kmnusa
>
> The kmnusa board uses a mv88e6352 switch that is connected to the main
> eth interface of the kirkwood. Therefore the switch must be configured
> so that the kirkwood's egiga eth inferface can be used.
>
> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
> Cc: Holger Brunck <holger.brunck@keymile.com>
> Cc: Prafulla Wadaskar <prafulla@marvell.com>
> ---
> changes for v2:
> - update comment to follow c-style commenting
>
> board/keymile/km_arm/km_arm.c | 65
> +++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 65 insertions(+), 0 deletions(-)
>
> diff --git a/board/keymile/km_arm/km_arm.c
> b/board/keymile/km_arm/km_arm.c
> index 2b2ca39..604085d 100644
> --- a/board/keymile/km_arm/km_arm.c
> +++ b/board/keymile/km_arm/km_arm.c
> @@ -385,6 +385,71 @@ void reset_phy(void)
> /* reset the phy */
> miiphy_reset(name, CONFIG_PHY_BASE_ADR);
> }
> +#elif defined(CONFIG_KM_PIGGY4_88E6352)
> +
> +#include <mv88e6352.h>
> +
> +#if defined(CONFIG_KM_NUSA)
> +struct mv88e_sw_reg extsw_conf[] = {
> + /*
> + * port 0, PIGGY4, autoneg
> + * first the fix for the 1000Mbits Autoneg, this is from
> + * a Marvell errata, the regs are undocumented
> + */
> + { PHY(0), PHY_PAGE, AN1000FIX_PAGE },
> + { PHY(0), PHY_STATUS, AN1000FIX },
> + { PHY(0), PHY_PAGE, 0 },
> + /* now the real port and phy configuration */
> + { PORT(0), PORT_PHY, NO_SPEED_FOR },
> + { PORT(0), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
> + { PHY(0), PHY_1000_CTRL, NO_ADV },
> + { PHY(0), PHY_SPEC_CTRL, AUTO_MDIX_EN },
> + { PHY(0), PHY_CTRL, PHY_100_MBPS | AUTONEG_EN | AUTONEG_RST |
> + FULL_DUPLEX },
> + /* port 1, unused */
> + { PORT(1), PORT_CTRL, PORT_DIS },
> + { PHY(1), PHY_CTRL, PHY_PWR_DOWN },
> + { PHY(1), PHY_SPEC_CTRL, SPEC_PWR_DOWN },
> + /* port 2, unused */
> + { PORT(2), PORT_CTRL, PORT_DIS },
> + { PHY(2), PHY_CTRL, PHY_PWR_DOWN },
> + { PHY(2), PHY_SPEC_CTRL, SPEC_PWR_DOWN },
> + /* port 3, unused */
> + { PORT(3), PORT_CTRL, PORT_DIS },
> + { PHY(3), PHY_CTRL, PHY_PWR_DOWN },
> + { PHY(3), PHY_SPEC_CTRL, SPEC_PWR_DOWN },
> + /* port 4, ICNEV, SerDes, SGMII */
> + { PORT(4), PORT_STATUS, NO_PHY_DETECT },
> + { PORT(4), PORT_PHY, SPEED_1000_FOR },
> + { PORT(4), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
> + { PHY(4), PHY_CTRL, PHY_PWR_DOWN },
> + { PHY(4), PHY_SPEC_CTRL, SPEC_PWR_DOWN },
> + /* port 5, CPU_RGMII */
> + { PORT(5), PORT_PHY, RX_RGMII_TIM | TX_RGMII_TIM | FLOW_CTRL_EN |
> + FLOW_CTRL_FOR | LINK_VAL | LINK_FOR | FULL_DPX |
> + FULL_DPX_FOR | SPEED_1000_FOR },
> + { PORT(5), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
> + /* port 6, unused, this port has no phy */
> + { PORT(6), PORT_CTRL, PORT_DIS },
> +};
> +#else
> +struct mv88e_sw_reg extsw_conf[] = {};
> +#endif
> +
> +void reset_phy(void)
> +{
> +#if defined(CONFIG_KM_MVEXTSW_ADDR)
> + char *name = "egiga0";
> +
> + if (miiphy_set_current_dev(name))
> + return;
> +
> + mv88e_sw_program(name, CONFIG_KM_MVEXTSW_ADDR, extsw_conf,
> + ARRAY_SIZE(extsw_conf));
> + mv88e_sw_reset(name, CONFIG_KM_MVEXTSW_ADDR);
> +#endif
> +}
> +
> #else
> /* Configure and enable MV88E1118 PHY on the piggy*/
> void reset_phy(void)
> --
Acked-By: Prafulla Wadaskar <prafulla@marvell.com>
Regards...
Prafulla . . .
^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 0/2] arm/km: configuration of the mv88e6352 switch on kmnusa
2012-08-16 11:25 [U-Boot] [PATCH 0/2] arm/km: configuration of the mv88e6352 switch on kmnusa Valentin Longchamp
` (2 preceding siblings ...)
2012-08-17 7:59 ` [U-Boot] [PATCH 0/2] arm/km: configuration of the mv88e6352 switch on kmnusa Prafulla Wadaskar
@ 2012-09-03 8:11 ` Prafulla Wadaskar
3 siblings, 0 replies; 13+ messages in thread
From: Prafulla Wadaskar @ 2012-09-03 8:11 UTC (permalink / raw)
To: u-boot
> > -----Original Message-----
> > From: Valentin Longchamp [mailto:valentin.longchamp at keymile.com]
> > Sent: 16 August 2012 16:55
> > To: u-boot at lists.denx.de
> > Cc: holger.brunck at keymile.com; Prafulla Wadaskar;
> > valentin.longchamp at keymile.com
> > Subject: [PATCH 0/2] arm/km: configuration of the mv88e6352 switch
> on
> > kmnusa
> >
> > This series adds supoort for the configuration of the mv88e6352
> > external switch
> > on kmnusa. It has a clear dependancy to the minimal mv88e6352
> net/phy
> > driver:
> > http://patchwork.ozlabs.org/patch/177953/
>
> Hi Joe
> Unless above patch is in, I cannot pull this patch series,
> May you please check and pull it?
> Or let me know your ack on this if I need to pull it.
Hi Joe
I do not find this patch pulled in.
May you pls kindly ack and pull it, or I should pull it as dependency for this patch series
Regards...
Prafulla . . .
^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 2/2] km_kirkwood: enable MV88E6352_SWITCH support for kmnusa
2012-08-16 11:25 ` [U-Boot] [PATCH 2/2] km_kirkwood: enable MV88E6352_SWITCH support " Valentin Longchamp
2012-08-17 7:59 ` Prafulla Wadaskar
@ 2012-09-28 6:43 ` Prafulla Wadaskar
1 sibling, 0 replies; 13+ messages in thread
From: Prafulla Wadaskar @ 2012-09-28 6:43 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Valentin Longchamp [mailto:valentin.longchamp at keymile.com]
> Sent: 16 August 2012 16:55
> To: u-boot at lists.denx.de
> Cc: holger.brunck at keymile.com; Prafulla Wadaskar;
> valentin.longchamp at keymile.com
> Subject: [PATCH 2/2] km_kirkwood: enable MV88E6352_SWITCH support for
> kmnusa
>
> This is required to configure the external 88e6352 switch on nusa.
>
> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
> cc: Holger Brunck <holger.brunck@keymile.com>
> cc: Prafulla Wadaskar <prafulla@marvell.com>
> ---
> include/configs/km_kirkwood.h | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/include/configs/km_kirkwood.h
> b/include/configs/km_kirkwood.h
> index fba181f..762cc10 100644
> --- a/include/configs/km_kirkwood.h
> +++ b/include/configs/km_kirkwood.h
> @@ -62,6 +62,8 @@
> #define CONFIG_KM_ENV_IS_IN_SPI_NOR
> #define CONFIG_KM_FPGA_CONFIG
> #define CONFIG_KM_PIGGY4_88E6352
> +#define CONFIG_MV88E6352_SWITCH
> +#define CONFIG_KM_MVEXTSW_ADDR 0x10
>
> /* KM_MGCOGE3UN */
> #elif defined(CONFIG_KM_MGCOGE3UN)
Applied to u-boot-marvell.git master branch
Regards...
Prafulla . . .
^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH v2 1/2] arm/km: add mv88e6352 configuration for kmnusa
2012-08-17 9:35 ` [U-Boot] [PATCH v2 " Valentin Longchamp
2012-08-21 6:31 ` Prafulla Wadaskar
@ 2012-09-28 6:43 ` Prafulla Wadaskar
1 sibling, 0 replies; 13+ messages in thread
From: Prafulla Wadaskar @ 2012-09-28 6:43 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Prafulla Wadaskar
> Sent: 21 August 2012 12:01
> To: 'Valentin Longchamp'; u-boot at lists.denx.de
> Cc: Holger Brunck
> Subject: RE: [PATCH v2 1/2] arm/km: add mv88e6352 configuration for
> kmnusa
>
>
>
> > -----Original Message-----
> > From: Valentin Longchamp [mailto:valentin.longchamp at keymile.com]
> > Sent: 17 August 2012 15:05
> > To: u-boot at lists.denx.de
> > Cc: Valentin Longchamp; Holger Brunck; Prafulla Wadaskar
> > Subject: [PATCH v2 1/2] arm/km: add mv88e6352 configuration for
> kmnusa
> >
> > The kmnusa board uses a mv88e6352 switch that is connected to the
> main
> > eth interface of the kirkwood. Therefore the switch must be
> configured
> > so that the kirkwood's egiga eth inferface can be used.
> >
> > Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
> > Cc: Holger Brunck <holger.brunck@keymile.com>
> > Cc: Prafulla Wadaskar <prafulla@marvell.com>
> > ---
> > changes for v2:
> > - update comment to follow c-style commenting
> >
> > board/keymile/km_arm/km_arm.c | 65
> > +++++++++++++++++++++++++++++++++++++++++
> > 1 files changed, 65 insertions(+), 0 deletions(-)
> >
> > diff --git a/board/keymile/km_arm/km_arm.c
> > b/board/keymile/km_arm/km_arm.c
> > index 2b2ca39..604085d 100644
> > --- a/board/keymile/km_arm/km_arm.c
> > +++ b/board/keymile/km_arm/km_arm.c
> > @@ -385,6 +385,71 @@ void reset_phy(void)
> > /* reset the phy */
> > miiphy_reset(name, CONFIG_PHY_BASE_ADR);
> > }
> > +#elif defined(CONFIG_KM_PIGGY4_88E6352)
> > +
> > +#include <mv88e6352.h>
> > +
> > +#if defined(CONFIG_KM_NUSA)
> > +struct mv88e_sw_reg extsw_conf[] = {
> > + /*
> > + * port 0, PIGGY4, autoneg
> > + * first the fix for the 1000Mbits Autoneg, this is from
> > + * a Marvell errata, the regs are undocumented
> > + */
> > + { PHY(0), PHY_PAGE, AN1000FIX_PAGE },
> > + { PHY(0), PHY_STATUS, AN1000FIX },
> > + { PHY(0), PHY_PAGE, 0 },
> > + /* now the real port and phy configuration */
> > + { PORT(0), PORT_PHY, NO_SPEED_FOR },
> > + { PORT(0), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
> > + { PHY(0), PHY_1000_CTRL, NO_ADV },
> > + { PHY(0), PHY_SPEC_CTRL, AUTO_MDIX_EN },
> > + { PHY(0), PHY_CTRL, PHY_100_MBPS | AUTONEG_EN | AUTONEG_RST |
> > + FULL_DUPLEX },
> > + /* port 1, unused */
> > + { PORT(1), PORT_CTRL, PORT_DIS },
> > + { PHY(1), PHY_CTRL, PHY_PWR_DOWN },
> > + { PHY(1), PHY_SPEC_CTRL, SPEC_PWR_DOWN },
> > + /* port 2, unused */
> > + { PORT(2), PORT_CTRL, PORT_DIS },
> > + { PHY(2), PHY_CTRL, PHY_PWR_DOWN },
> > + { PHY(2), PHY_SPEC_CTRL, SPEC_PWR_DOWN },
> > + /* port 3, unused */
> > + { PORT(3), PORT_CTRL, PORT_DIS },
> > + { PHY(3), PHY_CTRL, PHY_PWR_DOWN },
> > + { PHY(3), PHY_SPEC_CTRL, SPEC_PWR_DOWN },
> > + /* port 4, ICNEV, SerDes, SGMII */
> > + { PORT(4), PORT_STATUS, NO_PHY_DETECT },
> > + { PORT(4), PORT_PHY, SPEED_1000_FOR },
> > + { PORT(4), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
> > + { PHY(4), PHY_CTRL, PHY_PWR_DOWN },
> > + { PHY(4), PHY_SPEC_CTRL, SPEC_PWR_DOWN },
> > + /* port 5, CPU_RGMII */
> > + { PORT(5), PORT_PHY, RX_RGMII_TIM | TX_RGMII_TIM | FLOW_CTRL_EN |
> > + FLOW_CTRL_FOR | LINK_VAL | LINK_FOR | FULL_DPX |
> > + FULL_DPX_FOR | SPEED_1000_FOR },
> > + { PORT(5), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
> > + /* port 6, unused, this port has no phy */
> > + { PORT(6), PORT_CTRL, PORT_DIS },
> > +};
> > +#else
> > +struct mv88e_sw_reg extsw_conf[] = {};
> > +#endif
> > +
> > +void reset_phy(void)
> > +{
> > +#if defined(CONFIG_KM_MVEXTSW_ADDR)
> > + char *name = "egiga0";
> > +
> > + if (miiphy_set_current_dev(name))
> > + return;
> > +
> > + mv88e_sw_program(name, CONFIG_KM_MVEXTSW_ADDR, extsw_conf,
> > + ARRAY_SIZE(extsw_conf));
> > + mv88e_sw_reset(name, CONFIG_KM_MVEXTSW_ADDR);
> > +#endif
> > +}
> > +
> > #else
> > /* Configure and enable MV88E1118 PHY on the piggy*/
> > void reset_phy(void)
> > --
>
> Acked-By: Prafulla Wadaskar <prafulla@marvell.com>
Applied to u-boot-marvell.git master branch
Regards...
Prafulla . . .
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2012-09-28 6:43 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-16 11:25 [U-Boot] [PATCH 0/2] arm/km: configuration of the mv88e6352 switch on kmnusa Valentin Longchamp
2012-08-16 11:25 ` [U-Boot] [PATCH 1/2] arm/km: add mv88e6352 configuration for kmnusa Valentin Longchamp
2012-08-17 7:59 ` Prafulla Wadaskar
2012-08-17 8:43 ` Valentin Longchamp
2012-08-17 8:53 ` Prafulla Wadaskar
2012-08-17 9:35 ` [U-Boot] [PATCH v2 " Valentin Longchamp
2012-08-21 6:31 ` Prafulla Wadaskar
2012-09-28 6:43 ` Prafulla Wadaskar
2012-08-16 11:25 ` [U-Boot] [PATCH 2/2] km_kirkwood: enable MV88E6352_SWITCH support " Valentin Longchamp
2012-08-17 7:59 ` Prafulla Wadaskar
2012-09-28 6:43 ` Prafulla Wadaskar
2012-08-17 7:59 ` [U-Boot] [PATCH 0/2] arm/km: configuration of the mv88e6352 switch on kmnusa Prafulla Wadaskar
2012-09-03 8:11 ` Prafulla Wadaskar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.