All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 00/14] powerpc/p4080: add support for FMan ethernet in Independent mode
@ 2011-01-27  4:52 Mingkai Hu
  2011-01-27  4:52 ` [U-Boot] [PATCH 01/14] powerpc/p4080: Add function to report which lane is used for a prtcl Mingkai Hu
  2011-01-27  6:04 ` [U-Boot] [PATCH 00/14] powerpc/p4080: add support for FMan ethernet in Independent mode Kumar Gala
  0 siblings, 2 replies; 27+ messages in thread
From: Mingkai Hu @ 2011-01-27  4:52 UTC (permalink / raw)
  To: u-boot

This patchset add support for the P4080's datapath accelation architecture
in independent mode, and do some code refactor of the file tsec.c.

1. Add the releated MAC controller support, includeing dTSEC and 10GEC
2. Add support for FMan ethernet in Independent mode
3. Add PHY support (VSC8244 and VSC8234) to a new file fsl_phy.c which
   can be reused by other code, such tsec and uec code.
4. tsec code cleanup
5. Move all the PHY code in tsec.c to fsl_phy.c to make it reuseable.

Based on the latest WD's U-Boot tree. Tested on P4080DS and MPC8536DS
board with SGMII card.

[PATCH 01/14] powerpc/p4080: Add function to report which lane is used for a prtcl
[PATCH 02/14] powerpc/fman: add PHY support for dTSEC
[PATCH 03/14] powerpc/fman: add dTSEC controller support
[PATCH 04/14] powerpc/fman: add 10GEC controller and PHY support
[PATCH 05/14] powerpc/qoirq: Add support for FMan ethernet in Independent mode
[PATCH 06/14] powerpc/corenet_ds: Add fman support
[PATCH 07/14] tsec: use IO accessories to access the register
[PATCH 08/14] tsec: arrange the code to avoid useless function declaration
[PATCH 09/14] tsec: use general ethernet MII register struct(tsec_mii_t)
[PATCH 10/14] tsec: refactor the PHY code to make it reuseable
[PATCH 11/14] PHY: add some Vitesse phy support
[PATCH 12/14] PHY: add some Broadcom phy support
[PATCH 13/14] PHY: add some Marvell phy support
[PATCH 14/14] PHY: add some misc phy code support

Thanks,
Mingkai

^ permalink raw reply	[flat|nested] 27+ messages in thread
* [U-Boot]  [PATCH 13/14] PHY: add some Marvell phy support
@ 2011-01-27  5:56 Hu Mingkai-B21284
  0 siblings, 0 replies; 27+ messages in thread
From: Hu Mingkai-B21284 @ 2011-01-27  5:56 UTC (permalink / raw)
  To: u-boot

Hi Macpaul,

I totally agree with you, maybe there're some effort to get all the PHY chip's datasheet. :)
As you know, some datasheet is under NDA.

Thanks,
Mingkai

From: Macpaul Lin [mailto:macpaul at gmail.com]
Sent: Thursday, January 27, 2011 1:44 PM
To: Hu Mingkai-B21284
Cc: u-boot at lists.denx.de; Phillips Kim-R1AAHA; Liu Dave-R63238; galak at kernel.crashing.org; Medve Emilian-EMMEDVE1; Radulescu Ruxandra Ioana-B05472; Fleming Andy-AFLEMING; Haruki Dai-R35557; Tabi Timur-B04825; Wolfgang Denk
Subject: Re: [U-Boot] [PATCH 13/14] PHY: add some Marvell phy support

Hi Mingkai,
2011/1/27 Mingkai Hu <Mingkai.hu at freescale.com<mailto:Mingkai.hu@freescale.com>>
Port from tsec.c file to add support for m88e1011s, m88e1111s, m88e1118,
m88e1121r, m88e1145, m88e1149s.

Signed-off-by: Mingkai Hu <Mingkai.hu at freescale.com<mailto:Mingkai.hu@freescale.com>>
---
 drivers/net/fsl_phy.c |  299 +++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/net/fsl_phy.h |   36 ++++++
 2 files changed, 335 insertions(+), 0 deletions(-)

diff --git a/drivers/net/fsl_phy.c b/drivers/net/fsl_phy.c
index 7c22666..ad9d65e 100644
--- a/drivers/net/fsl_phy.c
+++ b/drivers/net/fsl_phy.c
@@ -457,6 +457,245 @@ static int bcm5482_startup(struct mii_info *mii_info)
       return 0;
 }

+/* Marvell 88E1011S */
+static int m88e1011s_config(struct mii_info *mii_info)
+{
+       /* Reset and configure the PHY */
+       tsec_phy_write(mii_info, 0, MII_BMCR, BMCR_RESET);
+
+       tsec_phy_write(mii_info, 0, 0x1d, 0x1f);
+       tsec_phy_write(mii_info, 0, 0x1e, 0x200c);
+       tsec_phy_write(mii_info, 0, 0x1d, 0x5);
+       tsec_phy_write(mii_info, 0, 0x1e, 0);
+       tsec_phy_write(mii_info, 0, 0x1e, 0x100);
+       tsec_phy_write(mii_info, 0, MII_CTRL1000, MII_CTRL1000_INIT);
+       tsec_phy_write(mii_info, 0, MII_ADVERTISE, MII_ADVERTISE_INIT);
+
+       tsec_phy_write(mii_info, 0, MII_BMCR, BMCR_RESET);
+       tsec_phy_write(mii_info, 0, MII_BMCR, MII_BMCR_INIT);
+
+       return 0;
+}

Is this possible to assign the clear definition about bit fields with phy registers
rather than hard-code hex value?
I think clear definitions will help both other vendor and your customers,
whom are the ODM/OEM vendors is easier to debug with these phy chips.

Hope you can agree with this suggestions.

--
Best regards,
Macpaul Lin

^ permalink raw reply related	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2011-02-05 20:26 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-27  4:52 [U-Boot] [PATCH 00/14] powerpc/p4080: add support for FMan ethernet in Independent mode Mingkai Hu
2011-01-27  4:52 ` [U-Boot] [PATCH 01/14] powerpc/p4080: Add function to report which lane is used for a prtcl Mingkai Hu
2011-01-27  4:52   ` [U-Boot] [PATCH 02/14] powerpc/fman: add PHY support for dTSEC Mingkai Hu
2011-01-27  4:52     ` [U-Boot] [PATCH 03/14] powerpc/fman: add dTSEC controller support Mingkai Hu
2011-01-27  4:52       ` [U-Boot] [PATCH 04/14] powerpc/fman: add 10GEC controller and PHY support Mingkai Hu
2011-01-27  4:52         ` [U-Boot] [PATCH 05/14] powerpc/qoirq: Add support for FMan ethernet in Independent mode Mingkai Hu
2011-01-27  4:52           ` [U-Boot] [PATCH 06/14] powerpc/corenet_ds: Add fman support Mingkai Hu
2011-01-27  4:52             ` [U-Boot] [PATCH 07/14] tsec: use IO accessories to access the register Mingkai Hu
2011-01-27  4:52               ` [U-Boot] [PATCH 08/14] tsec: arrange the code to avoid useless function declaration Mingkai Hu
2011-01-27  4:52                 ` [U-Boot] [PATCH 09/14] tsec: use general ethernet MII register struct(tsec_mii_t) Mingkai Hu
2011-01-27  4:52                   ` [U-Boot] [PATCH 10/14] tsec: refactor the PHY code to make it reuseable Mingkai Hu
2011-01-27  4:52                     ` [U-Boot] [PATCH 11/14] PHY: add some Vitesse phy support Mingkai Hu
2011-01-27  4:52                       ` [U-Boot] [PATCH 12/14] PHY: add some Broadcom " Mingkai Hu
2011-01-27  4:52                         ` [U-Boot] [PATCH 13/14] PHY: add some Marvell " Mingkai Hu
2011-01-27  4:52                           ` [U-Boot] [PATCH 14/14] PHY: add some misc phy code support Mingkai Hu
2011-01-27  5:44                           ` [U-Boot] [PATCH 13/14] PHY: add some Marvell phy support Macpaul Lin
2011-02-02 22:48                 ` [U-Boot] [PATCH 08/14] tsec: arrange the code to avoid useless function declaration Andy Fleming
2011-02-05 20:26                 ` Kumar Gala
2011-02-02 22:47               ` [U-Boot] [PATCH 07/14] tsec: use IO accessories to access the register Andy Fleming
2011-02-05 20:26               ` Kumar Gala
2011-01-27 17:42             ` [U-Boot] [PATCH 06/14] powerpc/corenet_ds: Add fman support Timur Tabi
2011-01-27 17:40           ` [U-Boot] [PATCH 05/14] powerpc/qoirq: Add support for FMan ethernet in Independent mode Timur Tabi
2011-01-27  6:15     ` [U-Boot] [PATCH 02/14] powerpc/fman: add PHY support for dTSEC Kumar Gala
2011-01-27 16:10     ` Timur Tabi
2011-01-27  6:04 ` [U-Boot] [PATCH 00/14] powerpc/p4080: add support for FMan ethernet in Independent mode Kumar Gala
2011-01-27  6:09   ` Hu Mingkai-B21284
2011-01-27  5:56 [U-Boot] [PATCH 13/14] PHY: add some Marvell phy support Hu Mingkai-B21284

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.