* [U-Boot] cpsw not working with slave2 port defined only
@ 2015-05-25 19:30 Belisko Marek
2015-05-26 2:51 ` Mx21
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Belisko Marek @ 2015-05-25 19:30 UTC (permalink / raw)
To: u-boot
Hi,
I have custom am33xx board with phy connected to slave2 port. I
copy'n'paste cpsw setup from /board/BuR/common/common.c but I'm using
only slave2 port (RMII mode) so my cpsw_slave_data looks like:
static struct cpsw_slave_data cpsw_slaves[] = {
{
.slave_reg_ofs = 0x308,
.sliver_reg_ofs = 0xdc0,
.phy_addr = 4,
},
};
with this configuration cpsw driver can detect link but it cannot
establish any communication (tested with dhcp command). When I add to
cpsw_slaves dummy slave1 port definition (with e.g. phy_addr = 0) it
start working.
mdio bus is working fine (tested with mdio list + mdio read). Pinmux
is good as it works with dummy slave1 config. Any ideas what I'm doing
wrong or why only slave2 port cannot be used? I grep whole source code
but all boards using cpsw use slave1 only or slave1/slave2
configurations. Many thanks.
BR,
marek
--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer
Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] cpsw not working with slave2 port defined only
2015-05-25 19:30 [U-Boot] cpsw not working with slave2 port defined only Belisko Marek
@ 2015-05-26 2:51 ` Mx21
2015-05-26 6:06 ` Belisko Marek
2015-05-26 12:29 ` Belisko Marek
2015-06-01 9:10 ` Mugunthan V N
2 siblings, 1 reply; 8+ messages in thread
From: Mx21 @ 2015-05-26 2:51 UTC (permalink / raw)
To: u-boot
hi marek:
please check your cpsw_data.slaves change it to 1
and you can set cpsw_data.active_slave = 0 before cpsw_register ,if cpsw_data.slaves is 2.
------------------ Original ------------------
From: "Belisko Marek";<marek.belisko@gmail.com>;
Date: Tue, May 26, 2015 03:30 AM
To: "U-Boot Mailing List"<u-boot@lists.denx.de>;
Subject: [U-Boot] cpsw not working with slave2 port defined only
Hi,
I have custom am33xx board with phy connected to slave2 port. I
copy'n'paste cpsw setup from /board/BuR/common/common.c but I'm using
only slave2 port (RMII mode) so my cpsw_slave_data looks like:
static struct cpsw_slave_data cpsw_slaves[] = {
{
.slave_reg_ofs = 0x308,
.sliver_reg_ofs = 0xdc0,
.phy_addr = 4,
},
};
with this configuration cpsw driver can detect link but it cannot
establish any communication (tested with dhcp command). When I add to
cpsw_slaves dummy slave1 port definition (with e.g. phy_addr = 0) it
start working.
mdio bus is working fine (tested with mdio list + mdio read). Pinmux
is good as it works with dummy slave1 config. Any ideas what I'm doing
wrong or why only slave2 port cannot be used? I grep whole source code
but all boards using cpsw use slave1 only or slave1/slave2
configurations. Many thanks.
BR,
marek
--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer
Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] cpsw not working with slave2 port defined only
2015-05-26 2:51 ` Mx21
@ 2015-05-26 6:06 ` Belisko Marek
0 siblings, 0 replies; 8+ messages in thread
From: Belisko Marek @ 2015-05-26 6:06 UTC (permalink / raw)
To: u-boot
Hi,
On Tue, May 26, 2015 at 4:51 AM, Mx21 <dillonhua@qq.com> wrote:
> hi marek:
>
> please check your cpsw_data.slaves change it to 1
I have already cpsw_data.slaves = 1 as I have only one slave port (port 2).
>
> and you can set cpsw_data.active_slave = 0 before cpsw_register ,if
> cpsw_data.slaves is 2.
This is when you have more slaves and want to have preferred one to be
primary ethernet.
It's not my case also.
P.S.: please don't top post
BR,
marek
>
>
> ------------------ Original ------------------
> From: "Belisko Marek";<marek.belisko@gmail.com>;
> Date: Tue, May 26, 2015 03:30 AM
> To: "U-Boot Mailing List"<u-boot@lists.denx.de>;
> Subject: [U-Boot] cpsw not working with slave2 port defined only
>
> Hi,
>
> I have custom am33xx board with phy connected to slave2 port. I
> copy'n'paste cpsw setup from /board/BuR/common/common.c but I'm using
> only slave2 port (RMII mode) so my cpsw_slave_data looks like:
>
> static struct cpsw_slave_data cpsw_slaves[] = {
> {
> .slave_reg_ofs = 0x308,
> .sliver_reg_ofs = 0xdc0,
> .phy_addr = 4,
> },
> };
>
> with this configuration cpsw driver can detect link but it cannot
> establish any communication (tested with dhcp command). When I add to
> cpsw_slaves dummy slave1 port definition (with e.g. phy_addr = 0) it
> start working.
>
> mdio bus is working fine (tested with mdio list + mdio read). Pinmux
> is good as it works with dummy slave1 config. Any ideas what I'm doing
> wrong or why only slave2 port cannot be used? I grep whole source code
> but all boards using cpsw use slave1 only or slave1/slave2
> configurations. Many thanks.
>
> BR,
>
> marek
>
> --
> as simple and primitive as possible
> -------------------------------------------------
> Marek Belisko - OPEN-NANDRA
> Freelance Developer
>
> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> Tel: +421 915 052 184
> skype: marekwhite
> twitter: #opennandra
> web: http://open-nandra.com
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer
Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] cpsw not working with slave2 port defined only
2015-05-25 19:30 [U-Boot] cpsw not working with slave2 port defined only Belisko Marek
2015-05-26 2:51 ` Mx21
@ 2015-05-26 12:29 ` Belisko Marek
2015-05-26 13:51 ` Mx21
2015-06-01 9:10 ` Mugunthan V N
2 siblings, 1 reply; 8+ messages in thread
From: Belisko Marek @ 2015-05-26 12:29 UTC (permalink / raw)
To: u-boot
On Mon, May 25, 2015 at 9:30 PM, Belisko Marek <marek.belisko@gmail.com> wrote:
> Hi,
>
> I have custom am33xx board with phy connected to slave2 port. I
> copy'n'paste cpsw setup from /board/BuR/common/common.c but I'm using
> only slave2 port (RMII mode) so my cpsw_slave_data looks like:
>
> static struct cpsw_slave_data cpsw_slaves[] = {
> {
> .slave_reg_ofs = 0x308,
> .sliver_reg_ofs = 0xdc0,
> .phy_addr = 4,
> },
> };
>
> with this configuration cpsw driver can detect link but it cannot
> establish any communication (tested with dhcp command). When I add to
> cpsw_slaves dummy slave1 port definition (with e.g. phy_addr = 0) it
> start working.
I forgot to mention that I also update mii_sel register following way:
writel(RMII2_MODE_ENABLE | MII2_CLK_FROM_CHIP_PIN |
RGMII2_NO_INTERNAL_DELAY | MII1_MODE_NOT_USED , &cdev->miisel);
>
> mdio bus is working fine (tested with mdio list + mdio read). Pinmux
> is good as it works with dummy slave1 config. Any ideas what I'm doing
> wrong or why only slave2 port cannot be used? I grep whole source code
> but all boards using cpsw use slave1 only or slave1/slave2
> configurations. Many thanks.
>
> BR,
>
> marek
>
> --
> as simple and primitive as possible
> -------------------------------------------------
> Marek Belisko - OPEN-NANDRA
> Freelance Developer
>
> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> Tel: +421 915 052 184
> skype: marekwhite
> twitter: #opennandra
> web: http://open-nandra.com
BR,
marek
--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer
Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] cpsw not working with slave2 port defined only
2015-05-26 12:29 ` Belisko Marek
@ 2015-05-26 13:51 ` Mx21
2015-05-27 6:54 ` Belisko Marek
0 siblings, 1 reply; 8+ messages in thread
From: Mx21 @ 2015-05-26 13:51 UTC (permalink / raw)
To: u-boot
On Mon, May 25, 2015 at 9:30 PM, Belisko Marek <marek.belisko@gmail.com> wrote:
> Hi,
>
> I have custom am33xx board with phy connected to slave2 port. I
> copy'n'paste cpsw setup from /board/BuR/common/common.c but I'm using
> only slave2 port (RMII mode) so my cpsw_slave_data looks like:
>
> static struct cpsw_slave_data cpsw_slaves[] = {
> {
> .slave_reg_ofs = 0x308,
> .sliver_reg_ofs = 0xdc0,
> .phy_addr = 4,
> },
> };
>
> with this configuration cpsw driver can detect link but it cannot
> establish any communication (tested with dhcp command). When I add to
> cpsw_slaves dummy slave1 port definition (with e.g. phy_addr = 0) it
> start working.
I forgot to mention that I also update mii_sel register following way:
writel(RMII2_MODE_ENABLE | MII2_CLK_FROM_CHIP_PIN |
RGMII2_NO_INTERNAL_DELAY | MII1_MODE_NOT_USED , &cdev->miisel);
from ref manul, MII2_CLK_FROM_CHIP_PIN(default is from chip pin),RGMII2_NO_INTERNAL_DELAY(just for rgmii mode),MII1_MODE_NOT_USED(suggest to set as same as gmii2_sel)
like this: writel(RMII_MODE_ENABLE, &cdev->miisel);
>
> mdio bus is working fine (tested with mdio list + mdio read). Pinmux
> is good as it works with dummy slave1 config. Any ideas what I'm doing
> wrong or why only slave2 port cannot be used? I grep whole source code
> but all boards using cpsw use slave1 only or slave1/slave2
> configurations. Many thanks.
>
> BR,
>
> marek
>
> --
> as simple and primitive as possible
> -------------------------------------------------
> Marek Belisko - OPEN-NANDRA
> Freelance Developer
>
> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> Tel: +421 915 052 184
> skype: marekwhite
> twitter: #opennandra
> web: http://open-nandra.com
BR,
marek
--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer
Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4F28BB63 at 842D3B46.537A6455.jpg
Type: image/jpeg
Size: 361299 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150526/d0e7a127/attachment-0001.jpg>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] cpsw not working with slave2 port defined only
2015-05-26 13:51 ` Mx21
@ 2015-05-27 6:54 ` Belisko Marek
0 siblings, 0 replies; 8+ messages in thread
From: Belisko Marek @ 2015-05-27 6:54 UTC (permalink / raw)
To: u-boot
On Tue, May 26, 2015 at 3:51 PM, Mx21 <dillonhua@qq.com> wrote:
> On Mon, May 25, 2015 at 9:30 PM, Belisko Marek <marek.belisko@gmail.com>
> wrote:
> > Hi,
> >
> > I have custom am33xx board with phy connected to slave2 port. I
> > copy'n'paste cpsw setup from /board/BuR/common/common.c but I'm using
> > only slave2 port (RMII mode) so my cpsw_slave_data looks like:
> >
> > static struct cpsw_slave_data cpsw_slaves[] = {
> > {
> > .slave_reg_ofs = 0x308,
> > .sliver_reg_ofs = 0xdc0,
> > .phy_addr = 4,
> > },
> > };
> >
> > with this configuration cpsw driver can detect link but it cannot
> > establish any communication (tested with dhcp command). When I add to
> > cpsw_slaves dummy slave1 port definition (with e.g. phy_addr = 0) it
> > start working.
> I forgot to mention that I also update mii_sel register following way:
> writel(RMII2_MODE_ENABLE | MII2_CLK_FROM_CHIP_PIN |
> RGMII2_NO_INTERNAL_DELAY | MII1_MODE_NOT_USED , &cdev->miisel);
>
> from ref manul, MII2_CLK_FROM_CHIP_PIN(default is from chip
> pin),RGMII2_NO_INTERNAL_DELAY(just for rgmii
> mode),MII1_MODE_NOT_USED(suggest to set as same as gmii2_sel)
> like this: writel(RMII_MODE_ENABLE, &cdev->miisel);
>
I tried but it still not working. I have doubt that it must be something in
cpsw driver handling. Maybe some TI people can comment on? Many thanks.
>
> >
> > mdio bus is working fine (tested with mdio list + mdio read). Pinmux
> > is good as it works with dummy slave1 config. Any ideas what I'm doing
> > wrong or why only slave2 port cannot be used? I grep whole source code
> > but all boards using cpsw use slave1 only or slave1/slave2
> > configurations. Many thanks.
> >
> > BR,
> >
> > marek
> >
> > --
> > as simple and primitive as possible
> > -------------------------------------------------
> > Marek Belisko - OPEN-NANDRA
> > Freelance Developer
> >
> > Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> > Tel: +421 915 052 184
> > skype: marekwhite
> > twitter: #opennandra
> > web: http://open-nandra.com
>
> BR,
>
> marek
>
> --
> as simple and primitive as possible
> -------------------------------------------------
> Marek Belisko - OPEN-NANDRA
> Freelance Developer
>
> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> Tel: +421 915 052 184
> skype: marekwhite
> twitter: #opennandra
> web: http://open-nandra.com
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
BR,
marek
--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer
Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4F28BB63 at 842D3B46.537A6455.jpg
Type: image/jpeg
Size: 361299 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150527/7a48b995/attachment-0001.jpg>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] cpsw not working with slave2 port defined only
2015-05-25 19:30 [U-Boot] cpsw not working with slave2 port defined only Belisko Marek
2015-05-26 2:51 ` Mx21
2015-05-26 12:29 ` Belisko Marek
@ 2015-06-01 9:10 ` Mugunthan V N
2015-06-02 6:20 ` Belisko Marek
2 siblings, 1 reply; 8+ messages in thread
From: Mugunthan V N @ 2015-06-01 9:10 UTC (permalink / raw)
To: u-boot
On Tuesday 26 May 2015 01:00 AM, Belisko Marek wrote:
> Hi,
>
> I have custom am33xx board with phy connected to slave2 port. I
> copy'n'paste cpsw setup from /board/BuR/common/common.c but I'm using
> only slave2 port (RMII mode) so my cpsw_slave_data looks like:
>
> static struct cpsw_slave_data cpsw_slaves[] = {
> {
> .slave_reg_ofs = 0x308,
> .sliver_reg_ofs = 0xdc0,
> .phy_addr = 4,
> },
> };
>
> with this configuration cpsw driver can detect link but it cannot
> establish any communication (tested with dhcp command). When I add to
> cpsw_slaves dummy slave1 port definition (with e.g. phy_addr = 0) it
> start working.
>
> mdio bus is working fine (tested with mdio list + mdio read). Pinmux
> is good as it works with dummy slave1 config. Any ideas what I'm doing
> wrong or why only slave2 port cannot be used? I grep whole source code
> but all boards using cpsw use slave1 only or slave1/slave2
> configurations. Many thanks.
>
Do not remove slave 0 structures and have no of slaves as 2 and set
active slave to 1 as done in the following commit
4c8014b9429b593c28fbf0384a6c7ded8587806a in mainline u-boot.
The driver uses the slave numbers to add mac address to ALE, which will
fail when you remove slaves from the salve structures.
Regards
Mugunthan V N
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] cpsw not working with slave2 port defined only
2015-06-01 9:10 ` Mugunthan V N
@ 2015-06-02 6:20 ` Belisko Marek
0 siblings, 0 replies; 8+ messages in thread
From: Belisko Marek @ 2015-06-02 6:20 UTC (permalink / raw)
To: u-boot
Hi Mugunthan,
On Mon, Jun 1, 2015 at 11:10 AM, Mugunthan V N <mugunthanvnm@ti.com> wrote:
> On Tuesday 26 May 2015 01:00 AM, Belisko Marek wrote:
>> Hi,
>>
>> I have custom am33xx board with phy connected to slave2 port. I
>> copy'n'paste cpsw setup from /board/BuR/common/common.c but I'm using
>> only slave2 port (RMII mode) so my cpsw_slave_data looks like:
>>
>> static struct cpsw_slave_data cpsw_slaves[] = {
>> {
>> .slave_reg_ofs = 0x308,
>> .sliver_reg_ofs = 0xdc0,
>> .phy_addr = 4,
>> },
>> };
>>
>> with this configuration cpsw driver can detect link but it cannot
>> establish any communication (tested with dhcp command). When I add to
>> cpsw_slaves dummy slave1 port definition (with e.g. phy_addr = 0) it
>> start working.
>>
>> mdio bus is working fine (tested with mdio list + mdio read). Pinmux
>> is good as it works with dummy slave1 config. Any ideas what I'm doing
>> wrong or why only slave2 port cannot be used? I grep whole source code
>> but all boards using cpsw use slave1 only or slave1/slave2
>> configurations. Many thanks.
>>
>
> Do not remove slave 0 structures and have no of slaves as 2 and set
> active slave to 1 as done in the following commit
> 4c8014b9429b593c28fbf0384a6c7ded8587806a in mainline u-boot.
Thanks it works now. I picked 7a0227534dfc17c96bb02529fb69971d079a85f0
and setup everything
as you suggested and it works fine.
>
> The driver uses the slave numbers to add mac address to ALE, which will
> fail when you remove slaves from the salve structures.
I think this should be fixed to avoid problems when you have only
slave2. When I have time I'll look on it.
>
> Regards
> Mugunthan V N
BR,
marek
--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer
Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-06-02 6:20 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-25 19:30 [U-Boot] cpsw not working with slave2 port defined only Belisko Marek
2015-05-26 2:51 ` Mx21
2015-05-26 6:06 ` Belisko Marek
2015-05-26 12:29 ` Belisko Marek
2015-05-26 13:51 ` Mx21
2015-05-27 6:54 ` Belisko Marek
2015-06-01 9:10 ` Mugunthan V N
2015-06-02 6:20 ` Belisko Marek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox