* [U-Boot] How do I use AM335x eth1 rather than eth0 ?
@ 2013-04-12 10:32 Mark Jackson
2013-04-18 15:49 ` Bo Shen
0 siblings, 1 reply; 7+ messages in thread
From: Mark Jackson @ 2013-04-12 10:32 UTC (permalink / raw)
To: u-boot
We have a dual Ethernet board (based on the BeagelBone) but with both Ethernet ports connected.
I'm wanting to use eth1 (rather than eth0), so in my board.c file, I changed:-
static struct cpsw_slave_data cpsw_slaves[] = {
{
.slave_reg_ofs = 0x208,
.sliver_reg_ofs = 0xd80,
.phy_id = 0,
},
{
.slave_reg_ofs = 0x308,
.sliver_reg_ofs = 0xdc0,
.phy_id = 1,
},
};
... to ...
static struct cpsw_slave_data cpsw_slaves[] = {
{
.slave_reg_ofs = 0x308,
.sliver_reg_ofs = 0xdc0,
.phy_id = 1,
},
{
.slave_reg_ofs = 0x208,
.sliver_reg_ofs = 0xd80,
.phy_id = 0,
},
};
... assuming that eth0 would now be ignored (as only 1 slave is configured).
But (eg) dhcp still only responds on eth0 !?!
What else do I have to change ?
Cheers
Mark J.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] How do I use AM335x eth1 rather than eth0 ?
@ 2013-04-12 10:56 Mark Jackson
2013-04-12 16:05 ` Tom Rini
0 siblings, 1 reply; 7+ messages in thread
From: Mark Jackson @ 2013-04-12 10:56 UTC (permalink / raw)
To: u-boot
We have a dual Ethernet board (based on the BeagelBone) but with both Ethernet ports connected.
I'm wanting to use eth1 (rather than eth0), so in my board.c file, I changed:-
static struct cpsw_slave_data cpsw_slaves[] = {
{
.slave_reg_ofs = 0x208,
.sliver_reg_ofs = 0xd80,
.phy_id = 0,
},
{
.slave_reg_ofs = 0x308,
.sliver_reg_ofs = 0xdc0,
.phy_id = 1,
},
};
... to ...
static struct cpsw_slave_data cpsw_slaves[] = {
{
.slave_reg_ofs = 0x308,
.sliver_reg_ofs = 0xdc0,
.phy_id = 1,
},
{
.slave_reg_ofs = 0x208,
.sliver_reg_ofs = 0xd80,
.phy_id = 0,
},
};
... assuming that eth0 would now be ignored (as only 1 slave is configured).
But (eg) dhcp still only responds on eth0 !?!
What else do I have to change ?
Cheers
Mark J.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] How do I use AM335x eth1 rather than eth0 ?
2013-04-12 10:56 Mark Jackson
@ 2013-04-12 16:05 ` Tom Rini
2013-04-12 19:20 ` Mark Jackson
0 siblings, 1 reply; 7+ messages in thread
From: Tom Rini @ 2013-04-12 16:05 UTC (permalink / raw)
To: u-boot
On Fri, Apr 12, 2013 at 11:56:57AM +0100, Mark Jackson wrote:
> We have a dual Ethernet board (based on the BeagelBone) but with both Ethernet ports connected.
>
> I'm wanting to use eth1 (rather than eth0), so in my board.c file, I changed:-
>
> static struct cpsw_slave_data cpsw_slaves[] = {
> {
> .slave_reg_ofs = 0x208,
> .sliver_reg_ofs = 0xd80,
> .phy_id = 0,
> },
> {
> .slave_reg_ofs = 0x308,
> .sliver_reg_ofs = 0xdc0,
> .phy_id = 1,
> },
> };
>
> ... to ...
>
> static struct cpsw_slave_data cpsw_slaves[] = {
> {
> .slave_reg_ofs = 0x308,
> .sliver_reg_ofs = 0xdc0,
> .phy_id = 1,
> },
> {
> .slave_reg_ofs = 0x208,
> .sliver_reg_ofs = 0xd80,
> .phy_id = 0,
> },
> };
>
> ... assuming that eth0 would now be ignored (as only 1 slave is configured).
>
> But (eg) dhcp still only responds on eth0 !?!
>
> What else do I have to change ?
Good question, do you have both ports working in Linux yet? The EVM-SK
design supports two interfaces and I know the cpsw driver in the kernel
required some changes to support two. I strongly suspect similar
changes would be required in the U-Boot driver (I don't have any
specific links other than look at the vendor kernel tree).
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130412/705e62f8/attachment.pgp>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] How do I use AM335x eth1 rather than eth0 ?
2013-04-12 16:05 ` Tom Rini
@ 2013-04-12 19:20 ` Mark Jackson
0 siblings, 0 replies; 7+ messages in thread
From: Mark Jackson @ 2013-04-12 19:20 UTC (permalink / raw)
To: u-boot
On 12/04/13 17:05, Tom Rini wrote:
> On Fri, Apr 12, 2013 at 11:56:57AM +0100, Mark Jackson wrote:
>
>> We have a dual Ethernet board (based on the BeagelBone) but with both Ethernet ports connected.
>>
>> I'm wanting to use eth1 (rather than eth0), so in my board.c file, I changed:-
<snip>
>> ... assuming that eth0 would now be ignored (as only 1 slave is configured).
>>
>> But (eg) dhcp still only responds on eth0 !?!
>>
>> What else do I have to change ?
>
> Good question, do you have both ports working in Linux yet? The EVM-SK
> design supports two interfaces and I know the cpsw driver in the kernel
> required some changes to support two. I strongly suspect similar
> changes would be required in the U-Boot driver (I don't have any
> specific links other than look at the vendor kernel tree).
Well, I've realised I needed to change CONFIG_PHY_ADDR in my board
config file.
So the link up/down portion now works to PHY#2, but I'm still unable to
ping anything from our board.
I'm guessing there's some hard-coded assumptions in the cpsw.c driver.
I've taken quick look at the Ethernet section of the TRM, but that's
*waaaay* over my head !?!
I've so far been unable to get Linux to see the 2nd port, and there is
no "vendor kernel tree" ... I'm the vendor :-)
Mark J.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] How do I use AM335x eth1 rather than eth0 ?
2013-04-12 10:32 [U-Boot] How do I use AM335x eth1 rather than eth0 ? Mark Jackson
@ 2013-04-18 15:49 ` Bo Shen
2013-04-18 17:23 ` Wolfgang Denk
0 siblings, 1 reply; 7+ messages in thread
From: Bo Shen @ 2013-04-18 15:49 UTC (permalink / raw)
To: u-boot
Hi Mark,
On 04/12/2013 06:32 PM, Mark Jackson wrote:
> We have a dual Ethernet board (based on the BeagelBone) but with both Ethernet ports connected.
>
> I'm wanting to use eth1 (rather than eth0), so in my board.c file, I changed:-
>
> static struct cpsw_slave_data cpsw_slaves[] = {
> {
> .slave_reg_ofs = 0x208,
> .sliver_reg_ofs = 0xd80,
> .phy_id = 0,
> },
> {
> .slave_reg_ofs = 0x308,
> .sliver_reg_ofs = 0xdc0,
> .phy_id = 1,
> },
> };
>
> ... to ...
>
> static struct cpsw_slave_data cpsw_slaves[] = {
> {
> .slave_reg_ofs = 0x308,
> .sliver_reg_ofs = 0xdc0,
> .phy_id = 1,
> },
> {
> .slave_reg_ofs = 0x208,
> .sliver_reg_ofs = 0xd80,
> .phy_id = 0,
> },
> };
>
> ... assuming that eth0 would now be ignored (as only 1 slave is configured).
>
> But (eg) dhcp still only responds on eth0 !?!
>
> What else do I have to change ?
Have you try "setenv ethprime eth1"? Then reset board, and do dhcp.
Best Regards,
Bo Shen
>
> Cheers
> Mark J.
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] How do I use AM335x eth1 rather than eth0 ?
2013-04-18 15:49 ` Bo Shen
@ 2013-04-18 17:23 ` Wolfgang Denk
2013-04-20 1:03 ` Bo Shen
0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Denk @ 2013-04-18 17:23 UTC (permalink / raw)
To: u-boot
Dear Bo Shen,
In message <517015FC.20007@gmail.com> you wrote:
>
> > What else do I have to change ?
>
> Have you try "setenv ethprime eth1"? Then reset board, and do dhcp.
Before thje reset, doi also a "saveenv" to make the setting stick.
Or "setenv ethact eth1" and retry then (without reset).
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] How do I use AM335x eth1 rather than eth0 ?
2013-04-18 17:23 ` Wolfgang Denk
@ 2013-04-20 1:03 ` Bo Shen
0 siblings, 0 replies; 7+ messages in thread
From: Bo Shen @ 2013-04-20 1:03 UTC (permalink / raw)
To: u-boot
Hi Wolfgang,
On 04/19/2013 01:23 AM, Wolfgang Denk wrote:
> Dear Bo Shen,
>
> In message <517015FC.20007@gmail.com> you wrote:
>>> What else do I have to change ?
>> Have you try "setenv ethprime eth1"? Then reset board, and do dhcp.
> Before thje reset, doi also a "saveenv" to make the setting stick.
>
> Or "setenv ethact eth1" and retry then (without reset).
Thanks for you information, without reset is better.
Best Regards,
Bo Shen
>
> Best regards,
>
> Wolfgang Denk
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-04-20 1:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-12 10:32 [U-Boot] How do I use AM335x eth1 rather than eth0 ? Mark Jackson
2013-04-18 15:49 ` Bo Shen
2013-04-18 17:23 ` Wolfgang Denk
2013-04-20 1:03 ` Bo Shen
-- strict thread matches above, loose matches on Subject: below --
2013-04-12 10:56 Mark Jackson
2013-04-12 16:05 ` Tom Rini
2013-04-12 19:20 ` Mark Jackson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox