[U-Boot] cpsw not working with slave2 port defined only

Belisko Marek marek.belisko at gmail.com
Tue Jun 2 08:20:43 CEST 2015


Hi Mugunthan,

On Mon, Jun 1, 2015 at 11:10 AM, Mugunthan V N <mugunthanvnm at 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


More information about the U-Boot mailing list