All of lore.kernel.org
 help / color / mirror / Atom feed
* bernard 5.0.1 and beagle-xm rev c
@ 2011-06-14 21:13 Robert Berger
  2011-06-15  1:31 ` Darren Hart
  2011-06-18 19:05 ` [PATCH] " Robert Berger
  0 siblings, 2 replies; 15+ messages in thread
From: Robert Berger @ 2011-06-14 21:13 UTC (permalink / raw)
  To: poky

I just got a few new beagle-xm boards (REV C) and I'm having fun with them;)

I created a poky-image-minimal from the bernard-5.0.1 tag and test the
micro SD card with one of my old beagle-xm (REV A3) and one of the new
ones (REV C).

The network is working with REV A3, but not with REV C.

That's what I added to /etc/network/interfaces:

# Ethernet/RNDIS gadget (g_ether) or LAN9514 on BeagleBoard xM
auto usb0
iface usb0 inet dhcp

Am I missing something?

REV C:  http://pastebin.com/cXaTnLCY
REV A3: http://pastebin.com/VFJ9w2VW

Regards,

Robert..."C++ has its place in the history of programming languages.
Just as Caligula has his place in the history of the Roman Empire." -
Robert Firth

My public pgp key is available at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1




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

* Re: bernard 5.0.1 and beagle-xm rev c
  2011-06-14 21:13 bernard 5.0.1 and beagle-xm rev c Robert Berger
@ 2011-06-15  1:31 ` Darren Hart
  2011-06-15 11:01   ` Robert Berger
  2011-06-18 19:05 ` [PATCH] " Robert Berger
  1 sibling, 1 reply; 15+ messages in thread
From: Darren Hart @ 2011-06-15  1:31 UTC (permalink / raw)
  To: gmane; +Cc: poky



On 06/14/2011 02:13 PM, Robert Berger wrote:
> I just got a few new beagle-xm boards (REV C) and I'm having fun with them;)
> 
> I created a poky-image-minimal from the bernard-5.0.1 tag and test the
> micro SD card with one of my old beagle-xm (REV A3) and one of the new
> ones (REV C).
> 
> The network is working with REV A3, but not with REV C.


Does USB work in general on Rev C?

--
Darren

> That's what I added to /etc/network/interfaces:
> 
> # Ethernet/RNDIS gadget (g_ether) or LAN9514 on BeagleBoard xM
> auto usb0
> iface usb0 inet dhcp
> 
> Am I missing something?
> 
> REV C:  http://pastebin.com/cXaTnLCY
> REV A3: http://pastebin.com/VFJ9w2VW
> 
> Regards,
> 
> Robert..."C++ has its place in the history of programming languages.
> Just as Caligula has his place in the history of the Roman Empire." -
> Robert Firth
> 
> My public pgp key is available at:
> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1
> 
> 
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


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

* Re: bernard 5.0.1 and beagle-xm rev c
  2011-06-15  1:31 ` Darren Hart
@ 2011-06-15 11:01   ` Robert Berger
  2011-06-15 11:46     ` Robert Berger
  2011-06-15 16:38     ` Darren Hart
  0 siblings, 2 replies; 15+ messages in thread
From: Robert Berger @ 2011-06-15 11:01 UTC (permalink / raw)
  To: poky

Hi,

On 06/15/2011 04:31 AM, Darren Hart wrote:
> 
> Does USB work in general on Rev C?
> 
> --
> Darren
> 

I built a minimal-image + usbutils

REV A3 with poky:

root@beagleboard:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.

REV C with Angstrom:

root@beagleboard:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 002 Device 003: ID 0424:ec00 Standard Microsystems Corp.

REV C with poky:

root@beagleboard:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

This looks like the USB hub on Bus 002 is not found and hence there is
also no Ethernet, which fits somehow into what I've found on
http://beagleboard.org/support/faq

# What do I need to do to get my software running on a BeagleBoard-xM rev C?

    * The revision ID on the board and the control signal for powering
the USB hub on the board changed between xM rev B and xM rev C. Older
versions of x-loader/MLO, u-boot and the Linux kernel did not properly
utilize the revision ID settings on the board, so xM rev B boards didn't
actually include settings different than xM rev A to work-around the
issue. On xM rev C, with the USB hub changes on the board, it became
necessary to no longer use this work-around and to actually change the
board revision ID. This causes older software to break. There is a bit
more discussion on this on the mailing list.

    * If you utilize the latest mainline x-loader (
http://gitorious.org/x-loader ) and u-boot (
http://git.denx.de/?p=u-boot.git ), including the variations shipped on
the microSD card on the board (available at circuitco.com/support ), the
revision will be properly detected.

    * The mainline kernel does not yet include the patch required to
utilize the proper polarity for the USB hub power enable. You can take a
look at this candidate patch for an idea of what to fix and potentially
apply this patch (
http://gitorious.org/beagleboard-validation/linux/commit/bfca58987039791522d1821e0506f8a113a0c239
) to your kernel. If you assemble an image of Angstrom using Narcissus,
you'll get a working kernel using the sources in Open Embedded.

I did not dig too much into the issue if and where changes need to be
made (x-loader, u-boot, kernel)

Judging from the u-boot output I think it needs to be patched:
Beagle unknown 0x02

u-boot which comes with Angstrom:
Beagle xM Rev C

I'm sure Koen can tell us more about this and also what patches should
be applied where;)

Regards,

Robert
..."As soon as we started programming, we found to our surprise that it
wasn't as easy to get programs right as we had thought.  Debugging had
to be discovered.  I can remember the exact instant when I realized that
a large part of my life from then on was going to be spent in finding
mistakes in my own programs." - Maurice Wilkes discovers debugging, 1949

My public pgp key is available at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1




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

* Re: bernard 5.0.1 and beagle-xm rev c
  2011-06-15 11:01   ` Robert Berger
@ 2011-06-15 11:46     ` Robert Berger
  2011-06-15 16:38     ` Darren Hart
  1 sibling, 0 replies; 15+ messages in thread
From: Robert Berger @ 2011-06-15 11:46 UTC (permalink / raw)
  To: poky

I found some more info here:

http://thread.gmane.org/gmane.comp.hardware.beagleboard.user/20438/match=compile+u+boot+bb+xm+rev+b

Those are the patches, which we could search for/try:

MLO (upstream):
http://gitorious.org/x-loader/x-loader/commit/2efa178acd56d83c86210b5934895cfb9ea62125

u-boot (upstream):
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=f6e593bb1255d1e15201cb5dec8c95264489e729
(reports unknown version, but works)

kernel:
http://gitorious.org/beagleboard-validation/linux/commit/bfca58987039791522d1821e0506f8a113a0c239
(looks like this one still needs to be cleaned up and submitted upstream
-- any help is useful here)

Regards,

Robert

...The significant problems we face cannot be solved at the same level
of thinking we were at when we created them. - Albert Einstein

My public pgp key is available at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1




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

* Re: bernard 5.0.1 and beagle-xm rev c
  2011-06-15 11:01   ` Robert Berger
  2011-06-15 11:46     ` Robert Berger
@ 2011-06-15 16:38     ` Darren Hart
  2011-06-15 17:18       ` Robert Berger
  2011-06-15 18:26       ` Jason Kridner
  1 sibling, 2 replies; 15+ messages in thread
From: Darren Hart @ 2011-06-15 16:38 UTC (permalink / raw)
  To: gmane; +Cc: poky



On 06/15/2011 04:01 AM, Robert Berger wrote:
> Hi,
> 
> On 06/15/2011 04:31 AM, Darren Hart wrote:
>>
>> Does USB work in general on Rev C?
>>
>> --
>> Darren
>>
> 
> I built a minimal-image + usbutils
> 
> REV A3 with poky:
> 
> root@beagleboard:~# lsusb
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
> Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
> 
> REV C with Angstrom:
> 
> root@beagleboard:~# lsusb
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 002 Device 002: ID 0424:9514 Standard Microsystems Corp.
> Bus 002 Device 003: ID 0424:ec00 Standard Microsystems Corp.
> 
> REV C with poky:
> 
> root@beagleboard:~# lsusb
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> 
> This looks like the USB hub on Bus 002 is not found and hence there is
> also no Ethernet, which fits somehow into what I've found on
> http://beagleboard.org/support/faq
> 
> # What do I need to do to get my software running on a BeagleBoard-xM rev C?

At the Bernard release I don't believe we had support for the xM rev C
(it supported at least up to xM rev A). I am currently working on a
refresh of the Beagleboard BSP in meta-yocto which does support rev C.
For details on that effort and it's status, please see:

https://lists.yoctoproject.org/pipermail/yocto/2011-June/001599.html


> Judging from the u-boot output I think it needs to be patched:
> Beagle unknown 0x02

Indeed.

> 
> u-boot which comes with Angstrom:
> Beagle xM Rev C
> 
> I'm sure Koen can tell us more about this and also what patches should
> be applied where;)

Both Koen and Jason K. have been helping to get the right bits merged
for the kernel. I had hoped to use mainline u-boot, but it appears we
may need at least a set of patches in support of Rev C.

The updated BSP will be released with 1.1. My patches and commits will
of course hit the list before then and you can build from master once
they arrive there. Within a week I suspect.

--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


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

* Re: bernard 5.0.1 and beagle-xm rev c
  2011-06-15 16:38     ` Darren Hart
@ 2011-06-15 17:18       ` Robert Berger
  2011-06-15 23:36         ` Darren Hart
  2011-06-15 18:26       ` Jason Kridner
  1 sibling, 1 reply; 15+ messages in thread
From: Robert Berger @ 2011-06-15 17:18 UTC (permalink / raw)
  To: poky

Hi,

On 06/15/2011 07:38 PM, Darren Hart wrote:
> 
> For details on that effort and it's status, please see:
> 
> https://lists.yoctoproject.org/pipermail/yocto/2011-June/001599.html
> 

I'm aware of this.

> 
> Both Koen and Jason K. have been helping to get the right bits merged
> for the kernel. I had hoped to use mainline u-boot, but it appears we
> may need at least a set of patches in support of Rev C.

What else is needed in addition to [2]?

> 
> The updated BSP will be released with 1.1. My patches and commits will
> of course hit the list before then and you can build from master once
> they arrive there. Within a week I suspect.
> 

I hope we'll have something which works without graphics on the Beagle
XM - Rev C before October (1.1) - before summer would be great.

This means, I would assume, gcc 4.6.0 fixes and the Beagle XM Rev C
stuff. I did not dare to touch master due to the gcc 4.6.0 issues.
Will this be fixed as well in the near future?

I also played around with the patches in the meantime and

[1] for the x-loader
[2] for for u-boot

seem to apply cleanly on whatever comes with bernard 5.0.1

[1]
http://gitorious.org/x-loader/x-loader/commit/2efa178acd56d83c86210b5934895cfb9ea62125

[2]
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=f6e593bb1255d1e15201cb5dec8c95264489e729

The kernel patch against 2.6.37 seems to be a bit more involved.

Of course more code might be needed to make the Beagle XM Rev C work.

Regards,

Robert

> --
> Darren Hart
> Intel Open Source Technology Center
> Yocto Project - Linux Kernel

..."In my egotistical opinion, most people's C programs should be
indented six feet downward and covered with dirt." - Blair P. Houghton

My public pgp key is available at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1




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

* Re: bernard 5.0.1 and beagle-xm rev c
  2011-06-15 16:38     ` Darren Hart
  2011-06-15 17:18       ` Robert Berger
@ 2011-06-15 18:26       ` Jason Kridner
  2011-06-15 19:05         ` Robert Berger
  1 sibling, 1 reply; 15+ messages in thread
From: Jason Kridner @ 2011-06-15 18:26 UTC (permalink / raw)
  To: Darren Hart; +Cc: gmane, poky

[-- Attachment #1: Type: text/plain, Size: 3207 bytes --]

On Wed, Jun 15, 2011 at 12:38 PM, Darren Hart <dvhart@linux.intel.com>wrote:

>
>
> On 06/15/2011 04:01 AM, Robert Berger wrote:
> > Hi,
> >
> > On 06/15/2011 04:31 AM, Darren Hart wrote:
> >>
> >> Does USB work in general on Rev C?
> >>
> >> --
> >> Darren
> >>
> >
> > I built a minimal-image + usbutils
> >
> > REV A3 with poky:
> >
> > root@beagleboard:~# lsusb
> > Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> > Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
> > Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
> >
> > REV C with Angstrom:
> >
> > root@beagleboard:~# lsusb
> > Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> > Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> > Bus 002 Device 002: ID 0424:9514 Standard Microsystems Corp.
> > Bus 002 Device 003: ID 0424:ec00 Standard Microsystems Corp.
> >
> > REV C with poky:
> >
> > root@beagleboard:~# lsusb
> > Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> >
> > This looks like the USB hub on Bus 002 is not found and hence there is
> > also no Ethernet, which fits somehow into what I've found on
> > http://beagleboard.org/support/faq
> >
> > # What do I need to do to get my software running on a BeagleBoard-xM rev
> C?
>
> At the Bernard release I don't believe we had support for the xM rev C
> (it supported at least up to xM rev A). I am currently working on a
> refresh of the Beagleboard BSP in meta-yocto which does support rev C.
> For details on that effort and it's status, please see:
>
> https://lists.yoctoproject.org/pipermail/yocto/2011-June/001599.html
>
>
> > Judging from the u-boot output I think it needs to be patched:
> > Beagle unknown 0x02
>
> Indeed.
>
> >
> > u-boot which comes with Angstrom:
> > Beagle xM Rev C
> >
> > I'm sure Koen can tell us more about this and also what patches should
> > be applied where;)
>
> Both Koen and Jason K. have been helping to get the right bits merged
> for the kernel. I had hoped to use mainline u-boot, but it appears we
> may need at least a set of patches in support of Rev C.
>

This thread has been moving faster than me. :)

You can use mainline u-boot.  There are some minor missing features, but I
did do some playing with mainline u-boot and xM rev C about a month ago and
it was good.  The version might not be reported properly, but the default
was updated to be if it was an unknown xM revision, it would default to the
latest.  Old u-boot versions had a but where they would revert to a really
old version.  If the default was the latest, there would have been no
breakage as no u-boot dependencies changed between xM rev A/B and xM rev C.


>
> The updated BSP will be released with 1.1. My patches and commits will
> of course hit the list before then and you can build from master once
> they arrive there. Within a week I suspect.
>
> --
> Darren Hart
> Intel Open Source Technology Center
> Yocto Project - Linux Kernel
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky
>

[-- Attachment #2: Type: text/html, Size: 4358 bytes --]

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

* Re: bernard 5.0.1 and beagle-xm rev c
  2011-06-15 18:26       ` Jason Kridner
@ 2011-06-15 19:05         ` Robert Berger
  2011-06-15 20:43           ` Jason Kridner
  0 siblings, 1 reply; 15+ messages in thread
From: Robert Berger @ 2011-06-15 19:05 UTC (permalink / raw)
  To: poky

Jason,

On 06/15/2011 09:26 PM, Jason Kridner wrote:
> 
> This thread has been moving faster than me. :)
> 
> You can use mainline u-boot.  There are some minor missing features, but
> I did do some playing with mainline u-boot and xM rev C about a month
> ago and it was good.  The version might not be reported properly, but
> the default was updated to be if it was an unknown xM revision, it would
> default to the latest.  Old u-boot versions had a bug where they would
> revert to a really old version.  If the default was the latest, there
> would have been no breakage as no u-boot dependencies changed between xM
> rev A/B and xM rev C.
>  

mainline u-boot sounds good.

What kernel did you use for your tests?

Regards,

Robert
..."Q:  What is IBM's definition of a man year? A:  720 programmers
trying to finish the job before lunch."

My public pgp key is available at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1




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

* Re: bernard 5.0.1 and beagle-xm rev c
  2011-06-15 19:05         ` Robert Berger
@ 2011-06-15 20:43           ` Jason Kridner
  0 siblings, 0 replies; 15+ messages in thread
From: Jason Kridner @ 2011-06-15 20:43 UTC (permalink / raw)
  To: gmane; +Cc: poky

[-- Attachment #1: Type: text/plain, Size: 1436 bytes --]

On Wed, Jun 15, 2011 at 3:05 PM, Robert Berger <
gmane@reliableembeddedsystems.com> wrote:

> Jason,
>
> On 06/15/2011 09:26 PM, Jason Kridner wrote:
> >
> > This thread has been moving faster than me. :)
> >
> > You can use mainline u-boot.  There are some minor missing features, but
> > I did do some playing with mainline u-boot and xM rev C about a month
> > ago and it was good.  The version might not be reported properly, but
> > the default was updated to be if it was an unknown xM revision, it would
> > default to the latest.  Old u-boot versions had a bug where they would
> > revert to a really old version.  If the default was the latest, there
> > would have been no breakage as no u-boot dependencies changed between xM
> > rev A/B and xM rev C.
> >
>
> mainline u-boot sounds good.
>
> What kernel did you use for your tests?
>

Angstrom linux-omap-psp_2.6.32 and linux-omap_2.6.39.  At the time, the
linux-omap_2.6.39 was a bit flaky, but I think most issues have been cleared
up now.


>
> Regards,
>
> Robert
> ..."Q:  What is IBM's definition of a man year? A:  720 programmers
> trying to finish the job before lunch."
>
> My public pgp key is available at:
> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1
>
>
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky
>

[-- Attachment #2: Type: text/html, Size: 2274 bytes --]

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

* Re: bernard 5.0.1 and beagle-xm rev c
  2011-06-15 17:18       ` Robert Berger
@ 2011-06-15 23:36         ` Darren Hart
  2011-06-16  1:32           ` Jason Kridner
  0 siblings, 1 reply; 15+ messages in thread
From: Darren Hart @ 2011-06-15 23:36 UTC (permalink / raw)
  To: gmane; +Cc: poky



On 06/15/2011 10:18 AM, Robert Berger wrote:
> Hi,
> 
> On 06/15/2011 07:38 PM, Darren Hart wrote:
>>
>> For details on that effort and it's status, please see:
>>
>> https://lists.yoctoproject.org/pipermail/yocto/2011-June/001599.html
>>
> 
> I'm aware of this.
> 
>>
>> Both Koen and Jason K. have been helping to get the right bits merged
>> for the kernel. I had hoped to use mainline u-boot, but it appears we
>> may need at least a set of patches in support of Rev C.
> 
> What else is needed in addition to [2]?


Mainline u-boot appears to be adequate according to Jason.


> 
>>
>> The updated BSP will be released with 1.1. My patches and commits will
>> of course hit the list before then and you can build from master once
>> they arrive there. Within a week I suspect.
>>
> 
> I hope we'll have something which works without graphics on the Beagle
> XM - Rev C before October (1.1) - before summer would be great.
>


We won't be making another 1.0 release for the Beagleboard. The refresh
will come with 1.1. If you don't want to build master for the entire
image, you could build the linux-yocto recipe from master and install
uImage and the kernel modules over a bernard image. I should have all
the necessary bits committed in the next few days.


> This means, I would assume, gcc 4.6.0 fixes and the Beagle XM Rev C
> stuff. I did not dare to touch master due to the gcc 4.6.0 issues.
> Will this be fixed as well in the near future?


This is resolved for ARM with the following patch from mainline
linux-2.6.git:

commit 139540170d9d9b7ead3caaf540f161756b356d56
Author: Rabin Vincent <rabin@rab.in>
Date:   Wed Apr 27 21:07:28 2011 +0530

    USB: ehci: remove structure packing from ehci_def

    As pointed out by Arnd Bergmann, in include/linux/usb/ehci_def.h, struct
    ehci_caps is defined with __attribute__((packed)) for no good reason,
    and this triggers undefined behaviour when using ARM's readl() on
    pointers to elements of this structure:

    http://lkml.kernel.org/r/201102021700.20683.arnd@arndb.de

    The same problem exists with the other two structures in ehci_def.h too,
    so remove the __attribute__((packed)) from all of them.

    Cc: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Rabin Vincent <rabin@rab.in>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>



> 
> I also played around with the patches in the meantime and
> 
> [1] for the x-loader
> [2] for for u-boot
> 
> seem to apply cleanly on whatever comes with bernard 5.0.1
> 
> [1]
> http://gitorious.org/x-loader/x-loader/commit/2efa178acd56d83c86210b5934895cfb9ea62125
> 
> [2]
> http://git.denx.de/?p=u-boot.git;a=commitdiff;h=f6e593bb1255d1e15201cb5dec8c95264489e729
> 
> The kernel patch against 2.6.37 seems to be a bit more involved.
> 
> Of course more code might be needed to make the Beagle XM Rev C work.
> 
> Regards,
> 
> Robert
> 
>> --
>> Darren Hart
>> Intel Open Source Technology Center
>> Yocto Project - Linux Kernel
> 
> ..."In my egotistical opinion, most people's C programs should be
> indented six feet downward and covered with dirt." - Blair P. Houghton
> 
> My public pgp key is available at:
> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1
> 
> 
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


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

* Re: bernard 5.0.1 and beagle-xm rev c
  2011-06-15 23:36         ` Darren Hart
@ 2011-06-16  1:32           ` Jason Kridner
       [not found]             ` <4DFA2189.7020804@ahsoftware.de>
  0 siblings, 1 reply; 15+ messages in thread
From: Jason Kridner @ 2011-06-16  1:32 UTC (permalink / raw)
  To: Darren Hart; +Cc: gmane, Alexander Holler, Rabin Vincent, Arnd Bergmann, poky

I don't know, but you might want to add align(4) attribute, rather
than remove the packed attribute, to provide the most compatible EHCI
code across architectures...

On Wed, Jun 15, 2011 at 7:36 PM, Darren Hart <dvhart@linux.intel.com> wrote:
>
>
> On 06/15/2011 10:18 AM, Robert Berger wrote:
> > Hi,
> >
> > On 06/15/2011 07:38 PM, Darren Hart wrote:
> >>
> >> For details on that effort and it's status, please see:
> >>
> >> https://lists.yoctoproject.org/pipermail/yocto/2011-June/001599.html
> >>
> >
> > I'm aware of this.
> >
> >>
> >> Both Koen and Jason K. have been helping to get the right bits merged
> >> for the kernel. I had hoped to use mainline u-boot, but it appears we
> >> may need at least a set of patches in support of Rev C.
> >
> > What else is needed in addition to [2]?
>
>
> Mainline u-boot appears to be adequate according to Jason.
>
>
> >
> >>
> >> The updated BSP will be released with 1.1. My patches and commits will
> >> of course hit the list before then and you can build from master once
> >> they arrive there. Within a week I suspect.
> >>
> >
> > I hope we'll have something which works without graphics on the Beagle
> > XM - Rev C before October (1.1) - before summer would be great.
> >
>
>
> We won't be making another 1.0 release for the Beagleboard. The refresh
> will come with 1.1. If you don't want to build master for the entire
> image, you could build the linux-yocto recipe from master and install
> uImage and the kernel modules over a bernard image. I should have all
> the necessary bits committed in the next few days.
>
>
> > This means, I would assume, gcc 4.6.0 fixes and the Beagle XM Rev C
> > stuff. I did not dare to touch master due to the gcc 4.6.0 issues.
> > Will this be fixed as well in the near future?
>
>
> This is resolved for ARM with the following patch from mainline
> linux-2.6.git:
>
> commit 139540170d9d9b7ead3caaf540f161756b356d56
> Author: Rabin Vincent <rabin@rab.in>
> Date:   Wed Apr 27 21:07:28 2011 +0530
>
>    USB: ehci: remove structure packing from ehci_def
>
>    As pointed out by Arnd Bergmann, in include/linux/usb/ehci_def.h, struct
>    ehci_caps is defined with __attribute__((packed)) for no good reason,
>    and this triggers undefined behaviour when using ARM's readl() on
>    pointers to elements of this structure:
>
>    http://lkml.kernel.org/r/201102021700.20683.arnd@arndb.de
>
>    The same problem exists with the other two structures in ehci_def.h too,
>    so remove the __attribute__((packed)) from all of them.
>
>    Cc: Arnd Bergmann <arnd@arndb.de>
>    Signed-off-by: Rabin Vincent <rabin@rab.in>
>    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

I've been pretty delinquent in following-up to mailing list feedback,
but we had a similar issue in trying to enable EHCI within u-boot.
Someone, I've forgotten who now, recommended to Alexander that it
would be better to do "__attribute__ ((packed, aligned(4)))" than to
remove the packed attribute altogether.

See http://patchwork.ozlabs.org/patch/92345/

>
>
> >
> > I also played around with the patches in the meantime and
> >
> > [1] for the x-loader
> > [2] for for u-boot
> >
> > seem to apply cleanly on whatever comes with bernard 5.0.1
> >
> > [1]
> > http://gitorious.org/x-loader/x-loader/commit/2efa178acd56d83c86210b5934895cfb9ea62125
> >
> > [2]
> > http://git.denx.de/?p=u-boot.git;a=commitdiff;h=f6e593bb1255d1e15201cb5dec8c95264489e729
> >
> > The kernel patch against 2.6.37 seems to be a bit more involved.
> >
> > Of course more code might be needed to make the Beagle XM Rev C work.
> >
> > Regards,
> >
> > Robert
> >
> >> --
> >> Darren Hart
> >> Intel Open Source Technology Center
> >> Yocto Project - Linux Kernel
> >
> > ..."In my egotistical opinion, most people's C programs should be
> > indented six feet downward and covered with dirt." - Blair P. Houghton
> >
> > My public pgp key is available at:
> > http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1
> >
> >
> > _______________________________________________
> > poky mailing list
> > poky@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/poky
>
> --
> Darren Hart
> Intel Open Source Technology Center
> Yocto Project - Linux Kernel
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky


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

* Re: bernard 5.0.1 and beagle-xm rev c
       [not found]             ` <4DFA2189.7020804@ahsoftware.de>
@ 2011-06-16 17:48               ` Darren Hart
  0 siblings, 0 replies; 15+ messages in thread
From: Darren Hart @ 2011-06-16 17:48 UTC (permalink / raw)
  To: Alexander Holler; +Cc: gmane, Rabin Vincent, Arnd Bergmann, poky



On 06/16/2011 08:30 AM, Alexander Holler wrote:
> Hello,
> 
> thanks for adding me to the cc.
> 
> Am 16.06.2011 03:32, schrieb Jason Kridner:
>> I don't know, but you might want to add align(4) attribute, rather
>> than remove the packed attribute, to provide the most compatible EHCI
>> code across architectures...
> 
> The original patch from Laine Walker-Avina <lwalkera@ieee.org> which I 
> used to get EHCI in U_Boot running has had the aligned(4) (I've never 
> seen the comment of the original patch, the patch without comment was 
> hinted to me by Anand Gadiyar <<gadiyar@ti.com>).
> I first just removed the packed attribute too, but after seeing it 
> again, I've come to the conclusion, that this might fail e.g. 64-bit 
> architectures. Without any packed attribute the compiler is free to 
> choose whatever alignment he thinks fits best, which e.g. might be 
> 8-byte on 64-bit machines. The problem with the packed seems to be that 
> gcc 4.6, I don't know why, access the members byte by byte. Using 
> aligned(4) helps here too and is imho the better solution.
> 
> Btw., commit 139540170d9d9b7ead3caaf540f161756b356d56 fixed a problem 
> with 2.6.38.5 upwards here. I couldn't use EHCI on such a kernel when it 
> was compiled with gcc 4.6 for ARM(v7). So that commit (preferable with 
> an added aligned(4) instead of the removal of packed), might be a 
> candidate for the stable tree.
> 
> I haven't had at first the idea to look in the kernel too if there is 
> such an attribute packed used for the EHCI-struct too, because I haven't 
> had any problems with a gcc 4.6 compiled 2.6.39.N on an armv5-box. I 
> still don't know why I've run in this problem only with an armv7-kernel 
> for the BeagleBoard, but I'm too lazy to look up why. I find it already 
> curious that packed or not packed makes a difference in how the compiler 
> accesses a member, but it's fixed in the kernel too with the changes of 
> the above commit (or with an added aligned(4)). I've tested both 
> solutions (and prefer the aligned).

I'm new to ARM development, but it was explained to me as being due to
ARM not being able to do misaligned loads for a word. I suspect
something in the previous compiler left those structures aligned,
despite the packing. (Not verified)

--
Darren

> 
> Regards,
> 
> Alexander
> 
> 
>>
>> On Wed, Jun 15, 2011 at 7:36 PM, Darren Hart<dvhart@linux.intel.com>  wrote:
>>>
>>>
>>> On 06/15/2011 10:18 AM, Robert Berger wrote:
>>>> Hi,
>>>>
>>>> On 06/15/2011 07:38 PM, Darren Hart wrote:
>>>>>
>>>>> For details on that effort and it's status, please see:
>>>>>
>>>>> https://lists.yoctoproject.org/pipermail/yocto/2011-June/001599.html
>>>>>
>>>>
>>>> I'm aware of this.
>>>>
>>>>>
>>>>> Both Koen and Jason K. have been helping to get the right bits merged
>>>>> for the kernel. I had hoped to use mainline u-boot, but it appears we
>>>>> may need at least a set of patches in support of Rev C.
>>>>
>>>> What else is needed in addition to [2]?
>>>
>>>
>>> Mainline u-boot appears to be adequate according to Jason.
>>>
>>>
>>>>
>>>>>
>>>>> The updated BSP will be released with 1.1. My patches and commits will
>>>>> of course hit the list before then and you can build from master once
>>>>> they arrive there. Within a week I suspect.
>>>>>
>>>>
>>>> I hope we'll have something which works without graphics on the Beagle
>>>> XM - Rev C before October (1.1) - before summer would be great.
>>>>
>>>
>>>
>>> We won't be making another 1.0 release for the Beagleboard. The refresh
>>> will come with 1.1. If you don't want to build master for the entire
>>> image, you could build the linux-yocto recipe from master and install
>>> uImage and the kernel modules over a bernard image. I should have all
>>> the necessary bits committed in the next few days.
>>>
>>>
>>>> This means, I would assume, gcc 4.6.0 fixes and the Beagle XM Rev C
>>>> stuff. I did not dare to touch master due to the gcc 4.6.0 issues.
>>>> Will this be fixed as well in the near future?
>>>
>>>
>>> This is resolved for ARM with the following patch from mainline
>>> linux-2.6.git:
>>>
>>> commit 139540170d9d9b7ead3caaf540f161756b356d56
>>> Author: Rabin Vincent<rabin@rab.in>
>>> Date:   Wed Apr 27 21:07:28 2011 +0530
>>>
>>>     USB: ehci: remove structure packing from ehci_def
>>>
>>>     As pointed out by Arnd Bergmann, in include/linux/usb/ehci_def.h, struct
>>>     ehci_caps is defined with __attribute__((packed)) for no good reason,
>>>     and this triggers undefined behaviour when using ARM's readl() on
>>>     pointers to elements of this structure:
>>>
>>>     http://lkml.kernel.org/r/201102021700.20683.arnd@arndb.de
>>>
>>>     The same problem exists with the other two structures in ehci_def.h too,
>>>     so remove the __attribute__((packed)) from all of them.
>>>
>>>     Cc: Arnd Bergmann<arnd@arndb.de>
>>>     Signed-off-by: Rabin Vincent<rabin@rab.in>
>>>     Signed-off-by: Greg Kroah-Hartman<gregkh@suse.de>
>>
>> I've been pretty delinquent in following-up to mailing list feedback,
>> but we had a similar issue in trying to enable EHCI within u-boot.
>> Someone, I've forgotten who now, recommended to Alexander that it
>> would be better to do "__attribute__ ((packed, aligned(4)))" than to
>> remove the packed attribute altogether.
>>
>> See http://patchwork.ozlabs.org/patch/92345/
>>
>>>
>>>
>>>>
>>>> I also played around with the patches in the meantime and
>>>>
>>>> [1] for the x-loader
>>>> [2] for for u-boot
>>>>
>>>> seem to apply cleanly on whatever comes with bernard 5.0.1
>>>>
>>>> [1]
>>>> http://gitorious.org/x-loader/x-loader/commit/2efa178acd56d83c86210b5934895cfb9ea62125
>>>>
>>>> [2]
>>>> http://git.denx.de/?p=u-boot.git;a=commitdiff;h=f6e593bb1255d1e15201cb5dec8c95264489e729
>>>>
>>>> The kernel patch against 2.6.37 seems to be a bit more involved.
>>>>
>>>> Of course more code might be needed to make the Beagle XM Rev C work.
>>>>
>>>> Regards,
>>>>
>>>> Robert
>>>>
>>>>> --
>>>>> Darren Hart
>>>>> Intel Open Source Technology Center
>>>>> Yocto Project - Linux Kernel
>>>>
>>>> ..."In my egotistical opinion, most people's C programs should be
>>>> indented six feet downward and covered with dirt." - Blair P. Houghton
>>>>
>>>> My public pgp key is available at:
>>>> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1
>>>>
>>>>
>>>> _______________________________________________
>>>> poky mailing list
>>>> poky@yoctoproject.org
>>>> https://lists.yoctoproject.org/listinfo/poky
>>>
>>> --
>>> Darren Hart
>>> Intel Open Source Technology Center
>>> Yocto Project - Linux Kernel
>>> _______________________________________________
>>> poky mailing list
>>> poky@yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/poky
> 

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


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

* Re: [PATCH] bernard 5.0.1 and beagle-xm rev c
  2011-06-14 21:13 bernard 5.0.1 and beagle-xm rev c Robert Berger
  2011-06-15  1:31 ` Darren Hart
@ 2011-06-18 19:05 ` Robert Berger
  2011-06-27 22:15   ` Darren Hart
  1 sibling, 1 reply; 15+ messages in thread
From: Robert Berger @ 2011-06-18 19:05 UTC (permalink / raw)
  To: poky; +Cc: Darren Hart, robertcnelson, Arnd Bergmann

From: Robert Berger <gmane@ReliableEmbeddedSystems.com>

I wanted to have bernard-5.0.1 run on my beagle xm rev c before the next
proper poky release and so I hacked up something quick and dirty which
is going to be __OBSOLETE__ soon and which is __NOT__ intended to go
into any proper release.

Anyhow, maybe someone else needs something similar;)

After applying this patch to bernard-5.0.1 you might want to bitbake
poky-image-minimal-usbutils (which is also part of the patch) as a
testcase and run lsusb. If everything went well you should see:

root@beagleboard:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.

I either took [1], [2], [3] unmodified, or added some minor tweaks,
so the real credits go to Jason Kridner, Koen Kooi and Robert C. Nelson.

[1]
http://gitorious.org/x-loader/x-loader/commit/2efa178acd56d83c86210b5934895cfb9ea62125
[2]
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=f6e593bb1255d1e15201cb5dec8c95264489e729
[3]
https://github.com/RobertCNelson/linux-2.6/commit/ebe1e26476768b8edde0607433e564ffd4b0e903

Signed-off-by: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
---
 .../beagleboard/0001-u-boot-xm-rev-c-support.patch |  114 ++++++++++++++
 meta/recipes-bsp/uboot/u-boot_git.bb               |    7 +-
 .../0001-x-loader-xm-rev-c-support.patch           |   54 +++++++
 meta/recipes-bsp/x-load/x-load_git.bb              |    3 +-
 .../images/poky-image-minimal-usbutils.bb          |    6 +
 .../beagleboard/0001-kernel-xm-rev-c-support.patch |  156
++++++++++++++++++++
 meta/recipes-kernel/linux/linux-yocto_git.bb       |    9 +-
 7 files changed, 346 insertions(+), 3 deletions(-)
 create mode 100644
meta/recipes-bsp/uboot/u-boot-git/beagleboard/0001-u-boot-xm-rev-c-support.patch
 create mode 100644
meta/recipes-bsp/x-load/x-load-git/beagleboard/0001-x-loader-xm-rev-c-support.patch
 create mode 100644 meta/recipes-core/images/poky-image-minimal-usbutils.bb
 create mode 100644
meta/recipes-kernel/linux/linux-yocto-git/beagleboard/0001-kernel-xm-rev-c-support.patch

diff --git
a/meta/recipes-bsp/uboot/u-boot-git/beagleboard/0001-u-boot-xm-rev-c-support.patch
b/meta/recipes-bsp/uboot/u-boot-git/beagleboard/0001-u-boot-xm-rev-c-support.patch
new file mode 100644
index 0000000..db79fff
--- /dev/null
+++
b/meta/recipes-bsp/uboot/u-boot-git/beagleboard/0001-u-boot-xm-rev-c-support.patch
@@ -0,0 +1,114 @@
+From c505155b127c507cc06ee2dfd48ce8e415353d5e Mon Sep 17 00:00:00 2001
+From: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
+Date: Sat, 18 Jun 2011 16:01:09 +0300
+Subject: [PATCH] beagle-xm-revc-u-boot-support
+
+
+Signed-off-by: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
+---
+ board/ti/beagle/beagle.c       |   32 +++++++++++++++++++++++++++-----
+ board/ti/beagle/beagle.h       |    4 +++-
+ include/configs/omap3_beagle.h |    2 +-
+ 3 files changed, 31 insertions(+), 7 deletions(-)
+
+diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
+index c066d6e..9939e1e 100644
+--- a/board/ti/beagle/beagle.c
++++ b/board/ti/beagle/beagle.c
+@@ -153,18 +153,15 @@ int misc_init_r(void)
+ 	case REVISION_AXBX:
+ 		printf("Beagle Rev Ax/Bx\n");
+ 		setenv("beaglerev", "AxBx");
+-		setenv("mpurate", "600");
+ 		break;
+ 	case REVISION_CX:
+ 		printf("Beagle Rev C1/C2/C3\n");
+ 		setenv("beaglerev", "Cx");
+-		setenv("mpurate", "600");
+ 		MUX_BEAGLE_C();
+ 		break;
+ 	case REVISION_C4:
+ 		printf("Beagle Rev C4\n");
+ 		setenv("beaglerev", "C4");
+-		setenv("mpurate", "720");
+ 		MUX_BEAGLE_C();
+ 		/* Set VAUX2 to 1.8V for EHCI PHY */
+ 		twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED,
+@@ -172,10 +169,19 @@ int misc_init_r(void)
+ 					TWL4030_PM_RECEIVER_VAUX2_DEV_GRP,
+ 					TWL4030_PM_RECEIVER_DEV_GRP_P1);
+ 		break;
+-	case REVISION_XM:
++	case REVISION_XM_A:
+ 		printf("Beagle xM Rev A\n");
+ 		setenv("beaglerev", "xMA");
+-		setenv("mpurate", "1000");
++                MUX_BEAGLE_XM();
++                /* Set VAUX2 to 1.8V for EHCI PHY */
++
twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED,
++                                        TWL4030_PM_RECEIVER_VAUX2_VSEL_18,
++                                        TWL4030_PM_RECEIVER_VAUX2_DEV_GRP,
++                                        TWL4030_PM_RECEIVER_DEV_GRP_P1);
++                break;
++        case REVISION_XM_B:
++                printf("Beagle xM Rev B\n");
++                setenv("beaglerev", "xMB");
+ 		MUX_BEAGLE_XM();
+ 		/* Set VAUX2 to 1.8V for EHCI PHY */
+ 		twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED,
+@@ -183,8 +189,24 @@ int misc_init_r(void)
+ 					TWL4030_PM_RECEIVER_VAUX2_DEV_GRP,
+ 					TWL4030_PM_RECEIVER_DEV_GRP_P1);
+ 		break;
++        case REVISION_XM_C:
++                printf("Beagle xM Rev C\n");
++                setenv("beaglerev", "xMC");
++                MUX_BEAGLE_XM();
++                /* Set VAUX2 to 1.8V for EHCI PHY */
++
twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED,
++                                        TWL4030_PM_RECEIVER_VAUX2_VSEL_18,
++                                        TWL4030_PM_RECEIVER_VAUX2_DEV_GRP,
++                                        TWL4030_PM_RECEIVER_DEV_GRP_P1);
++                break;
+ 	default:
+ 		printf("Beagle unknown 0x%02x\n", get_board_revision());
++                MUX_BEAGLE_XM();
++                /* Set VAUX2 to 1.8V for EHCI PHY */
++
twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED,
++                                        TWL4030_PM_RECEIVER_VAUX2_VSEL_18,
++                                        TWL4030_PM_RECEIVER_VAUX2_DEV_GRP,
++                                        TWL4030_PM_RECEIVER_DEV_GRP_P1);
+ 	}
+
+ 	switch (get_expansion_id()) {
+diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h
+index b22b653..59edd0c 100644
+--- a/board/ti/beagle/beagle.h
++++ b/board/ti/beagle/beagle.h
+@@ -37,7 +37,9 @@ const omap3_sysinfo sysinfo = {
+ #define REVISION_AXBX	0x7
+ #define REVISION_CX	0x6
+ #define REVISION_C4	0x5
+-#define REVISION_XM	0x0
++#define REVISION_XM_A	0x0
++#define REVISION_XM_B	0x1
++#define REVISION_XM_C	0x2
+
+ /*
+  * IEN  - Input Enable
+diff --git a/include/configs/omap3_beagle.h
b/include/configs/omap3_beagle.h
+index 5cfa4cb..bee0e41 100644
+--- a/include/configs/omap3_beagle.h
++++ b/include/configs/omap3_beagle.h
+@@ -190,7 +190,7 @@
+ 	"loadaddr=0x82000000\0" \
+ 	"usbtty=cdc_acm\0" \
+ 	"console=ttyS2,115200n8\0" \
+-	"mpurate=500\0" \
++	"mpurate=auto\0" \
+ 	"vram=12M\0" \
+ 	"dvimode=1024x768MR-16@60\0" \
+ 	"defaultdisplay=dvi\0" \
+--
+1.7.1
+
diff --git a/meta/recipes-bsp/uboot/u-boot_git.bb
b/meta/recipes-bsp/uboot/u-boot_git.bb
index 4c8f5df..a6d6bd3 100644
--- a/meta/recipes-bsp/uboot/u-boot_git.bb
+++ b/meta/recipes-bsp/uboot/u-boot_git.bb
@@ -8,10 +8,15 @@ FILESDIR =
"${@os.path.dirname(bb.data.getVar('FILE',d,1))}/u-boot-git/${MACHINE

 SRCREV = "v2011.03"
 PV = "v2011.03+git${SRCPV}"
-PR="r3"
+PR="r4"

 SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git"

+# patch for beagle-xm rev c
+SRC_URI_append_beagleboard = " \
+
file://0001-u-boot-xm-rev-c-support.patch;patch=1 \
+                             "
+
 UBOOT_MACHINE_beagleboard = "omap3_beagle_config"
 UBOOT_MACHINE_overo = "omap3_overo_config"

diff --git
a/meta/recipes-bsp/x-load/x-load-git/beagleboard/0001-x-loader-xm-rev-c-support.patch
b/meta/recipes-bsp/x-load/x-load-git/beagleboard/0001-x-loader-xm-rev-c-support.patch
new file mode 100644
index 0000000..91d1d7a
--- /dev/null
+++
b/meta/recipes-bsp/x-load/x-load-git/beagleboard/0001-x-loader-xm-rev-c-support.patch
@@ -0,0 +1,54 @@
+From cb8f553a1df59cbdd1fbd4957b4404d72a557e3c Mon Sep 17 00:00:00 2001
+From: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
+Date: Fri, 17 Jun 2011 18:13:51 +0300
+Subject: [PATCH] x-loader-xm-rev-c-support
+
+
+Signed-off-by: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
+---
+ board/omap3530beagle/omap3530beagle.c |   15 ++++++++++++++-
+ 1 files changed, 14 insertions(+), 1 deletions(-)
+
+diff --git a/board/omap3530beagle/omap3530beagle.c
b/board/omap3530beagle/omap3530beagle.c
+index 073e35a..51bcc40 100644
+--- a/board/omap3530beagle/omap3530beagle.c
++++ b/board/omap3530beagle/omap3530beagle.c
+@@ -212,6 +212,7 @@ u32 cpu_is_3410(void)
+  *		GPIO173, GPIO172, GPIO171: 1 1 0 => C1/2/3
+  *		GPIO173, GPIO172, GPIO171: 1 0 1 => C4
+  *		GPIO173, GPIO172, GPIO171: 0 0 0 => XM
++ *              default                          => XM
+  ******************************************/
+ int beagle_revision(void)
+ {
+@@ -227,6 +228,18 @@ int beagle_revision(void)
+ 	rev = omap_get_gpio_datain(173) << 2 |
+ 		omap_get_gpio_datain(172) << 1 |
+ 		omap_get_gpio_datain(171);
++
++	/* Default newer board revisions to XM */
++	switch(rev) {
++	case REVISION_AXBX:
++	case REVISION_CX:
++	case REVISION_C4:
++		break;
++	case REVISION_XM:
++	default:
++		rev = REVISION_XM;
++	}
++
+ 	omap_free_gpio(171);
+ 	omap_free_gpio(172);
+ 	omap_free_gpio(173);
+@@ -690,7 +703,7 @@ int misc_init_r(void)
+ 			printf("Beagle Rev C4\n");
+ 		break;
+ 	case REVISION_XM:
+-		printf("Beagle xM Rev A\n");
++		printf("Beagle xM\n");
+ 		break;
+ 	default:
+ 		printf("Beagle unknown 0x%02x\n", rev);
+--
+1.7.1
+
diff --git a/meta/recipes-bsp/x-load/x-load_git.bb
b/meta/recipes-bsp/x-load/x-load_git.bb
index fc2927e..05f48a9 100644
--- a/meta/recipes-bsp/x-load/x-load_git.bb
+++ b/meta/recipes-bsp/x-load/x-load_git.bb
@@ -6,7 +6,7 @@ LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM =
"file://README;beginline=1;endline=25;md5=ef08d08cb99057bbb5b9d6d0c5a4396f"

 PV = "1.42+${PR}+git${SRCPV}"
-PR="r13"
+PR="r14"

 #SRC_URI =
"git://www.sakoman.net/git/x-load-omap3.git;branch=master;protocol=git"
 #SRC_URI =
"git://gitorious.org/x-load-omap3/mainline.git;branch=master;protocol=git"
@@ -14,6 +14,7 @@ SRC_URI =
"git://gitorious.org/x-loader/x-loader.git;branch=master;protocol=git"

 SRC_URI_append_beagleboard = " \
                               file://name.patch;patch=1 \
+
file://0001-x-loader-xm-rev-c-support.patch;patch=2 \
                              "
 S = "${WORKDIR}/git"

diff --git a/meta/recipes-core/images/poky-image-minimal-usbutils.bb
b/meta/recipes-core/images/poky-image-minimal-usbutils.bb
new file mode 100644
index 0000000..3c54de2
--- /dev/null
+++ b/meta/recipes-core/images/poky-image-minimal-usbutils.bb
@@ -0,0 +1,6 @@
+#
+# Copyright (C) 2008 OpenedHand Ltd.
+#
+require poky-image-minimal.bb
+
+IMAGE_INSTALL += "usbutils"
diff --git
a/meta/recipes-kernel/linux/linux-yocto-git/beagleboard/0001-kernel-xm-rev-c-support.patch
b/meta/recipes-kernel/linux/linux-yocto-git/beagleboard/0001-kernel-xm-rev-c-support.patch
new file mode 100644
index 0000000..a42bbf8
--- /dev/null
+++
b/meta/recipes-kernel/linux/linux-yocto-git/beagleboard/0001-kernel-xm-rev-c-support.patch
@@ -0,0 +1,156 @@
+From 828220f35f2777b33295b3d7d65826b65fed9230 Mon Sep 17 00:00:00 2001
+From: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
+Date: Fri, 17 Jun 2011 18:30:15 +0300
+Subject: [PATCH] kernel-xm-rev-c-support
+
+
+Signed-off-by: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
+---
+ arch/arm/mach-omap2/board-omap3beagle.c |   79
++++++++++++++++++++++++++++---
+ 1 files changed, 72 insertions(+), 7 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-omap3beagle.c
b/arch/arm/mach-omap2/board-omap3beagle.c
+index 02a3469..694e6e2 100644
+--- a/arch/arm/mach-omap2/board-omap3beagle.c
++++ b/arch/arm/mach-omap2/board-omap3beagle.c
+@@ -58,7 +58,9 @@
+  *	AXBX	= GPIO173, GPIO172, GPIO171: 1 1 1
+  *	C1_3	= GPIO173, GPIO172, GPIO171: 1 1 0
+  *	C4	= GPIO173, GPIO172, GPIO171: 1 0 1
+- *	XM	= GPIO173, GPIO172, GPIO171: 0 0 0
++ *	XMA	= GPIO173, GPIO172, GPIO171: 0 0 0
++ *  	XMB  	= GPIO173, GPIO172, GPIO171: 0 0 1
++ *  	XMC  	= GPIO173, GPIO172, GPIO171: 0 1 0
+  */
+ enum {
+ 	OMAP3BEAGLE_BOARD_UNKN = 0,
+@@ -66,6 +68,7 @@ enum {
+ 	OMAP3BEAGLE_BOARD_C1_3,
+ 	OMAP3BEAGLE_BOARD_C4,
+ 	OMAP3BEAGLE_BOARD_XM,
++	OMAP3BEAGLE_BOARD_XMC,
+ };
+
+ static u8 omap3_beagle_version;
+@@ -120,9 +123,17 @@ static void __init omap3_beagle_init_rev(void)
+ 		printk(KERN_INFO "OMAP3 Beagle Rev: xM\n");
+ 		omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
+ 		break;
++	case 1:
++	        pr_info("OMAP3 Beagle Rev: xM B\n");
++		omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
++		break;
++	case 2:
++		pr_info("OMAP3 Beagle Rev: xM C\n");
++		omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC;
++		break;
+ 	default:
+-		printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev);
+-		omap3_beagle_version = OMAP3BEAGLE_BOARD_UNKN;
++		pr_info("OMAP3 Beagle Rev: unknown %hd, assuming xM C or newer\n",
beagle_rev);
++		omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC;
+ 	}
+
+ 	return;
+@@ -273,13 +284,17 @@ static struct gpio_led gpio_leds[];
+ static int beagle_twl_gpio_setup(struct device *dev,
+ 		unsigned gpio, unsigned ngpio)
+ {
+-	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
++	int r;
++
++	if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) ||
++		(omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMC)) {
+ 		mmc[0].gpio_wp = -EINVAL;
+ 	} else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) ||
+ 		(omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C4)) {
+ 		omap_mux_init_gpio(23, OMAP_PIN_INPUT);
+ 		mmc[0].gpio_wp = 23;
+ 	} else {
++		mmc[0].gpio_wp = 29;
+ 		omap_mux_init_gpio(29, OMAP_PIN_INPUT);
+ 	}
+ 	/* gpio + 0 is "mmc0_cd" (input/IRQ) */
+@@ -294,9 +309,17 @@ static int beagle_twl_gpio_setup(struct device *dev,
+ 	 * power switch and overcurrent detect
+ 	 */
+
+-	gpio_request(gpio + 1, "EHCI_nOC");
+-	gpio_direction_input(gpio + 1);
+-
++	if ((omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM) &&
++		(omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XMC)) {
++		r = gpio_request(gpio + 1, "EHCI_nOC");
++		if (!r) {
++			r = gpio_direction_input(gpio + 1);
++			if (r)
++		        gpio_free(gpio + 1);
++		}
++		if (r)
++			pr_err("%s: unable to configure EHCI_nOC\n", __func__);
++	}
+ 	/*
+ 	 * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
+ 	 * high / others active low)
+@@ -307,9 +330,44 @@ static int beagle_twl_gpio_setup(struct device *dev,
+ 	else
+ 		gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+
++	/* DVI reset GPIO is different between beagle revisions */
++	if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) ||
++		(omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMC))
++		beagle_dvi_device.reset_gpio = 129;
++	else
++		beagle_dvi_device.reset_gpio = 170;
++
+ 	/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
+ 	gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
+
++	/*
++	 * gpio + 1 on Xm controls the TFP410's enable line (active low)
++	 * gpio + 2 control varies depending on the board rev as follows:
++	 * P7/P8 revisions(prototype): Camera EN
++	 * A2+ revisions (production): LDO (supplies DVI, serial, led blocks)
++	 */
++	if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) ||
++		(omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMC)) {
++		r = gpio_request(gpio + 1, "nDVI_PWR_EN");
++		if (!r) {
++			r = gpio_direction_output(gpio + 1, 0);
++			if (r)
++				gpio_free(gpio + 1);
++		}
++		if (r)
++			pr_err("%s: unable to configure nDVI_PWR_EN\n",
++			__func__);
++		r = gpio_request(gpio + 2, "DVI_LDO_EN");
++		if (!r) {
++			r = gpio_direction_output(gpio + 2, 1);
++			if (r)
++				gpio_free(gpio + 2);
++		}
++		if (r)
++			pr_err("%s: unable to configure DVI_LDO_EN\n",
++			__func__);
++	}
++
+ 	return 0;
+ }
+
+@@ -569,6 +627,13 @@ static void __init omap3_beagle_init(void)
+ 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+ 	omap3_beagle_init_rev();
+ 	omap3_beagle_i2c_init();
++
++	/* xM version uses pin 4 instead of 7 for user button */
++	if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) ||
++		(omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMC)){
++		gpio_buttons[0].gpio = 4;
++	}
++
+ 	platform_add_devices(omap3_beagle_devices,
+ 			ARRAY_SIZE(omap3_beagle_devices));
+ 	omap_serial_init();
+--
+1.7.1
+
diff --git a/meta/recipes-kernel/linux/linux-yocto_git.bb
b/meta/recipes-kernel/linux/linux-yocto_git.bb
index 38fbba3..65a4333 100644
--- a/meta/recipes-kernel/linux/linux-yocto_git.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_git.bb
@@ -1,6 +1,8 @@
 inherit kernel
 require linux-yocto.inc

+FILESDIR =
"${@os.path.dirname(bb.data.getVar('FILE',d,1))}/linux-yocto-git/${MACHINE}"
+
 KMACHINE = "yocto/standard/base"
 KMACHINE_qemux86  = "yocto/standard/common-pc/base"
 KMACHINE_qemux86-64  = "yocto/standard/common-pc-64/base"
@@ -17,12 +19,17 @@ KMETA = meta

 LINUX_VERSION ?= "2.6.37"
 LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
-PR = "r16"
+PR = "r17"
 PV = "${LINUX_VERSION}+git${SRCPV}"
 SRCREV_FORMAT = "meta_machine"

 SRC_URI =
"git://git.pokylinux.org/linux-yocto-2.6.37;protocol=git;nocheckout=1;branch=${KBRANCH},meta;name=machine,meta"

+# patch for beagle-xm rev c
+SRC_URI_append_beagleboard = " \
+
file://0001-kernel-xm-rev-c-support.patch;patch=1 \
+                             "
+
 COMPATIBLE_MACHINE =
"(qemuarm|qemux86|qemuppc|qemumips|qemux86-64|mpc8315e-rdb|routerstationpro|beagleboard)"

 # Functionality flags
-- 1.7.1



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

* Re: [PATCH] bernard 5.0.1 and beagle-xm rev c
  2011-06-18 19:05 ` [PATCH] " Robert Berger
@ 2011-06-27 22:15   ` Darren Hart
  2011-06-28  4:43     ` Robert Berger
  0 siblings, 1 reply; 15+ messages in thread
From: Darren Hart @ 2011-06-27 22:15 UTC (permalink / raw)
  To: gmane; +Cc: robertcnelson, Arnd Bergmann, poky

Hi Robert,

Thanks for this report.

On 06/18/2011 12:05 PM, Robert Berger wrote:
> From: Robert Berger <gmane@ReliableEmbeddedSystems.com>
> 
> I wanted to have bernard-5.0.1 run on my beagle xm rev c before the next
> proper poky release and so I hacked up something quick and dirty which
> is going to be __OBSOLETE__ soon and which is __NOT__ intended to go
> into any proper release.
> 
> Anyhow, maybe someone else needs something similar;)
> 
> After applying this patch to bernard-5.0.1 you might want to bitbake
> poky-image-minimal-usbutils (which is also part of the patch) as a
> testcase and run lsusb. If everything went well you should see:
> 
> root@beagleboard:~# lsusb
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
> Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
> 
> I either took [1], [2], [3] unmodified, or added some minor tweaks,
> so the real credits go to Jason Kridner, Koen Kooi and Robert C. Nelson.
> 
> [1]
> http://gitorious.org/x-loader/x-loader/commit/2efa178acd56d83c86210b5934895cfb9ea62125

We will need to pull this in prior to 1.1

> [2]
> http://git.denx.de/?p=u-boot.git;a=commitdiff;h=f6e593bb1255d1e15201cb5dec8c95264489e729

We will need to pull this in prior to 1.1. I'd like to pick this up with
a refresh to the 2011.06 release, which should be out shortly.

> [3]
> https://github.com/RobertCNelson/linux-2.6/commit/ebe1e26476768b8edde0607433e564ffd4b0e903


It isn't clear to me where this one fits in. Is this a backport for
linux-2.6.git to 2.6.37 ? It strikes me as odd that there are
Beagleboard specific mainline changes that aren't in linux-omap. That is
the opposite direction I tend to see patches flow.

--
Darren

> 
> Signed-off-by: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
> ---
>  .../beagleboard/0001-u-boot-xm-rev-c-support.patch |  114 ++++++++++++++
>  meta/recipes-bsp/uboot/u-boot_git.bb               |    7 +-
>  .../0001-x-loader-xm-rev-c-support.patch           |   54 +++++++
>  meta/recipes-bsp/x-load/x-load_git.bb              |    3 +-
>  .../images/poky-image-minimal-usbutils.bb          |    6 +
>  .../beagleboard/0001-kernel-xm-rev-c-support.patch |  156
> ++++++++++++++++++++
>  meta/recipes-kernel/linux/linux-yocto_git.bb       |    9 +-
>  7 files changed, 346 insertions(+), 3 deletions(-)
>  create mode 100644
> meta/recipes-bsp/uboot/u-boot-git/beagleboard/0001-u-boot-xm-rev-c-support.patch
>  create mode 100644
> meta/recipes-bsp/x-load/x-load-git/beagleboard/0001-x-loader-xm-rev-c-support.patch
>  create mode 100644 meta/recipes-core/images/poky-image-minimal-usbutils.bb
>  create mode 100644
> meta/recipes-kernel/linux/linux-yocto-git/beagleboard/0001-kernel-xm-rev-c-support.patch
> 
> diff --git
> a/meta/recipes-bsp/uboot/u-boot-git/beagleboard/0001-u-boot-xm-rev-c-support.patch
> b/meta/recipes-bsp/uboot/u-boot-git/beagleboard/0001-u-boot-xm-rev-c-support.patch
> new file mode 100644
> index 0000000..db79fff
> --- /dev/null
> +++
> b/meta/recipes-bsp/uboot/u-boot-git/beagleboard/0001-u-boot-xm-rev-c-support.patch
> @@ -0,0 +1,114 @@
> +From c505155b127c507cc06ee2dfd48ce8e415353d5e Mon Sep 17 00:00:00 2001
> +From: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
> +Date: Sat, 18 Jun 2011 16:01:09 +0300
> +Subject: [PATCH] beagle-xm-revc-u-boot-support
> +
> +
> +Signed-off-by: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
> +---
> + board/ti/beagle/beagle.c       |   32 +++++++++++++++++++++++++++-----
> + board/ti/beagle/beagle.h       |    4 +++-
> + include/configs/omap3_beagle.h |    2 +-
> + 3 files changed, 31 insertions(+), 7 deletions(-)
> +
> +diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
> +index c066d6e..9939e1e 100644
> +--- a/board/ti/beagle/beagle.c
> ++++ b/board/ti/beagle/beagle.c
> +@@ -153,18 +153,15 @@ int misc_init_r(void)
> + 	case REVISION_AXBX:
> + 		printf("Beagle Rev Ax/Bx\n");
> + 		setenv("beaglerev", "AxBx");
> +-		setenv("mpurate", "600");
> + 		break;
> + 	case REVISION_CX:
> + 		printf("Beagle Rev C1/C2/C3\n");
> + 		setenv("beaglerev", "Cx");
> +-		setenv("mpurate", "600");
> + 		MUX_BEAGLE_C();
> + 		break;
> + 	case REVISION_C4:
> + 		printf("Beagle Rev C4\n");
> + 		setenv("beaglerev", "C4");
> +-		setenv("mpurate", "720");
> + 		MUX_BEAGLE_C();
> + 		/* Set VAUX2 to 1.8V for EHCI PHY */
> + 		twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED,
> +@@ -172,10 +169,19 @@ int misc_init_r(void)
> + 					TWL4030_PM_RECEIVER_VAUX2_DEV_GRP,
> + 					TWL4030_PM_RECEIVER_DEV_GRP_P1);
> + 		break;
> +-	case REVISION_XM:
> ++	case REVISION_XM_A:
> + 		printf("Beagle xM Rev A\n");
> + 		setenv("beaglerev", "xMA");
> +-		setenv("mpurate", "1000");
> ++                MUX_BEAGLE_XM();
> ++                /* Set VAUX2 to 1.8V for EHCI PHY */
> ++
> twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED,
> ++                                        TWL4030_PM_RECEIVER_VAUX2_VSEL_18,
> ++                                        TWL4030_PM_RECEIVER_VAUX2_DEV_GRP,
> ++                                        TWL4030_PM_RECEIVER_DEV_GRP_P1);
> ++                break;
> ++        case REVISION_XM_B:
> ++                printf("Beagle xM Rev B\n");
> ++                setenv("beaglerev", "xMB");
> + 		MUX_BEAGLE_XM();
> + 		/* Set VAUX2 to 1.8V for EHCI PHY */
> + 		twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED,
> +@@ -183,8 +189,24 @@ int misc_init_r(void)
> + 					TWL4030_PM_RECEIVER_VAUX2_DEV_GRP,
> + 					TWL4030_PM_RECEIVER_DEV_GRP_P1);
> + 		break;
> ++        case REVISION_XM_C:
> ++                printf("Beagle xM Rev C\n");
> ++                setenv("beaglerev", "xMC");
> ++                MUX_BEAGLE_XM();
> ++                /* Set VAUX2 to 1.8V for EHCI PHY */
> ++
> twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED,
> ++                                        TWL4030_PM_RECEIVER_VAUX2_VSEL_18,
> ++                                        TWL4030_PM_RECEIVER_VAUX2_DEV_GRP,
> ++                                        TWL4030_PM_RECEIVER_DEV_GRP_P1);
> ++                break;
> + 	default:
> + 		printf("Beagle unknown 0x%02x\n", get_board_revision());
> ++                MUX_BEAGLE_XM();
> ++                /* Set VAUX2 to 1.8V for EHCI PHY */
> ++
> twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED,
> ++                                        TWL4030_PM_RECEIVER_VAUX2_VSEL_18,
> ++                                        TWL4030_PM_RECEIVER_VAUX2_DEV_GRP,
> ++                                        TWL4030_PM_RECEIVER_DEV_GRP_P1);
> + 	}
> +
> + 	switch (get_expansion_id()) {
> +diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h
> +index b22b653..59edd0c 100644
> +--- a/board/ti/beagle/beagle.h
> ++++ b/board/ti/beagle/beagle.h
> +@@ -37,7 +37,9 @@ const omap3_sysinfo sysinfo = {
> + #define REVISION_AXBX	0x7
> + #define REVISION_CX	0x6
> + #define REVISION_C4	0x5
> +-#define REVISION_XM	0x0
> ++#define REVISION_XM_A	0x0
> ++#define REVISION_XM_B	0x1
> ++#define REVISION_XM_C	0x2
> +
> + /*
> +  * IEN  - Input Enable
> +diff --git a/include/configs/omap3_beagle.h
> b/include/configs/omap3_beagle.h
> +index 5cfa4cb..bee0e41 100644
> +--- a/include/configs/omap3_beagle.h
> ++++ b/include/configs/omap3_beagle.h
> +@@ -190,7 +190,7 @@
> + 	"loadaddr=0x82000000\0" \
> + 	"usbtty=cdc_acm\0" \
> + 	"console=ttyS2,115200n8\0" \
> +-	"mpurate=500\0" \
> ++	"mpurate=auto\0" \
> + 	"vram=12M\0" \
> + 	"dvimode=1024x768MR-16@60\0" \
> + 	"defaultdisplay=dvi\0" \
> +--
> +1.7.1
> +
> diff --git a/meta/recipes-bsp/uboot/u-boot_git.bb
> b/meta/recipes-bsp/uboot/u-boot_git.bb
> index 4c8f5df..a6d6bd3 100644
> --- a/meta/recipes-bsp/uboot/u-boot_git.bb
> +++ b/meta/recipes-bsp/uboot/u-boot_git.bb
> @@ -8,10 +8,15 @@ FILESDIR =
> "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/u-boot-git/${MACHINE
> 
>  SRCREV = "v2011.03"
>  PV = "v2011.03+git${SRCPV}"
> -PR="r3"
> +PR="r4"
> 
>  SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git"
> 
> +# patch for beagle-xm rev c
> +SRC_URI_append_beagleboard = " \
> +
> file://0001-u-boot-xm-rev-c-support.patch;patch=1 \
> +                             "
> +
>  UBOOT_MACHINE_beagleboard = "omap3_beagle_config"
>  UBOOT_MACHINE_overo = "omap3_overo_config"
> 
> diff --git
> a/meta/recipes-bsp/x-load/x-load-git/beagleboard/0001-x-loader-xm-rev-c-support.patch
> b/meta/recipes-bsp/x-load/x-load-git/beagleboard/0001-x-loader-xm-rev-c-support.patch
> new file mode 100644
> index 0000000..91d1d7a
> --- /dev/null
> +++
> b/meta/recipes-bsp/x-load/x-load-git/beagleboard/0001-x-loader-xm-rev-c-support.patch
> @@ -0,0 +1,54 @@
> +From cb8f553a1df59cbdd1fbd4957b4404d72a557e3c Mon Sep 17 00:00:00 2001
> +From: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
> +Date: Fri, 17 Jun 2011 18:13:51 +0300
> +Subject: [PATCH] x-loader-xm-rev-c-support
> +
> +
> +Signed-off-by: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
> +---
> + board/omap3530beagle/omap3530beagle.c |   15 ++++++++++++++-
> + 1 files changed, 14 insertions(+), 1 deletions(-)
> +
> +diff --git a/board/omap3530beagle/omap3530beagle.c
> b/board/omap3530beagle/omap3530beagle.c
> +index 073e35a..51bcc40 100644
> +--- a/board/omap3530beagle/omap3530beagle.c
> ++++ b/board/omap3530beagle/omap3530beagle.c
> +@@ -212,6 +212,7 @@ u32 cpu_is_3410(void)
> +  *		GPIO173, GPIO172, GPIO171: 1 1 0 => C1/2/3
> +  *		GPIO173, GPIO172, GPIO171: 1 0 1 => C4
> +  *		GPIO173, GPIO172, GPIO171: 0 0 0 => XM
> ++ *              default                          => XM
> +  ******************************************/
> + int beagle_revision(void)
> + {
> +@@ -227,6 +228,18 @@ int beagle_revision(void)
> + 	rev = omap_get_gpio_datain(173) << 2 |
> + 		omap_get_gpio_datain(172) << 1 |
> + 		omap_get_gpio_datain(171);
> ++
> ++	/* Default newer board revisions to XM */
> ++	switch(rev) {
> ++	case REVISION_AXBX:
> ++	case REVISION_CX:
> ++	case REVISION_C4:
> ++		break;
> ++	case REVISION_XM:
> ++	default:
> ++		rev = REVISION_XM;
> ++	}
> ++
> + 	omap_free_gpio(171);
> + 	omap_free_gpio(172);
> + 	omap_free_gpio(173);
> +@@ -690,7 +703,7 @@ int misc_init_r(void)
> + 			printf("Beagle Rev C4\n");
> + 		break;
> + 	case REVISION_XM:
> +-		printf("Beagle xM Rev A\n");
> ++		printf("Beagle xM\n");
> + 		break;
> + 	default:
> + 		printf("Beagle unknown 0x%02x\n", rev);
> +--
> +1.7.1
> +
> diff --git a/meta/recipes-bsp/x-load/x-load_git.bb
> b/meta/recipes-bsp/x-load/x-load_git.bb
> index fc2927e..05f48a9 100644
> --- a/meta/recipes-bsp/x-load/x-load_git.bb
> +++ b/meta/recipes-bsp/x-load/x-load_git.bb
> @@ -6,7 +6,7 @@ LICENSE = "GPLv2+"
>  LIC_FILES_CHKSUM =
> "file://README;beginline=1;endline=25;md5=ef08d08cb99057bbb5b9d6d0c5a4396f"
> 
>  PV = "1.42+${PR}+git${SRCPV}"
> -PR="r13"
> +PR="r14"
> 
>  #SRC_URI =
> "git://www.sakoman.net/git/x-load-omap3.git;branch=master;protocol=git"
>  #SRC_URI =
> "git://gitorious.org/x-load-omap3/mainline.git;branch=master;protocol=git"
> @@ -14,6 +14,7 @@ SRC_URI =
> "git://gitorious.org/x-loader/x-loader.git;branch=master;protocol=git"
> 
>  SRC_URI_append_beagleboard = " \
>                                file://name.patch;patch=1 \
> +
> file://0001-x-loader-xm-rev-c-support.patch;patch=2 \
>                               "
>  S = "${WORKDIR}/git"
> 
> diff --git a/meta/recipes-core/images/poky-image-minimal-usbutils.bb
> b/meta/recipes-core/images/poky-image-minimal-usbutils.bb
> new file mode 100644
> index 0000000..3c54de2
> --- /dev/null
> +++ b/meta/recipes-core/images/poky-image-minimal-usbutils.bb
> @@ -0,0 +1,6 @@
> +#
> +# Copyright (C) 2008 OpenedHand Ltd.
> +#
> +require poky-image-minimal.bb
> +
> +IMAGE_INSTALL += "usbutils"
> diff --git
> a/meta/recipes-kernel/linux/linux-yocto-git/beagleboard/0001-kernel-xm-rev-c-support.patch
> b/meta/recipes-kernel/linux/linux-yocto-git/beagleboard/0001-kernel-xm-rev-c-support.patch
> new file mode 100644
> index 0000000..a42bbf8
> --- /dev/null
> +++
> b/meta/recipes-kernel/linux/linux-yocto-git/beagleboard/0001-kernel-xm-rev-c-support.patch
> @@ -0,0 +1,156 @@
> +From 828220f35f2777b33295b3d7d65826b65fed9230 Mon Sep 17 00:00:00 2001
> +From: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
> +Date: Fri, 17 Jun 2011 18:30:15 +0300
> +Subject: [PATCH] kernel-xm-rev-c-support
> +
> +
> +Signed-off-by: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
> +---
> + arch/arm/mach-omap2/board-omap3beagle.c |   79
> ++++++++++++++++++++++++++++---
> + 1 files changed, 72 insertions(+), 7 deletions(-)
> +
> +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c
> b/arch/arm/mach-omap2/board-omap3beagle.c
> +index 02a3469..694e6e2 100644
> +--- a/arch/arm/mach-omap2/board-omap3beagle.c
> ++++ b/arch/arm/mach-omap2/board-omap3beagle.c
> +@@ -58,7 +58,9 @@
> +  *	AXBX	= GPIO173, GPIO172, GPIO171: 1 1 1
> +  *	C1_3	= GPIO173, GPIO172, GPIO171: 1 1 0
> +  *	C4	= GPIO173, GPIO172, GPIO171: 1 0 1
> +- *	XM	= GPIO173, GPIO172, GPIO171: 0 0 0
> ++ *	XMA	= GPIO173, GPIO172, GPIO171: 0 0 0
> ++ *  	XMB  	= GPIO173, GPIO172, GPIO171: 0 0 1
> ++ *  	XMC  	= GPIO173, GPIO172, GPIO171: 0 1 0
> +  */
> + enum {
> + 	OMAP3BEAGLE_BOARD_UNKN = 0,
> +@@ -66,6 +68,7 @@ enum {
> + 	OMAP3BEAGLE_BOARD_C1_3,
> + 	OMAP3BEAGLE_BOARD_C4,
> + 	OMAP3BEAGLE_BOARD_XM,
> ++	OMAP3BEAGLE_BOARD_XMC,
> + };
> +
> + static u8 omap3_beagle_version;
> +@@ -120,9 +123,17 @@ static void __init omap3_beagle_init_rev(void)
> + 		printk(KERN_INFO "OMAP3 Beagle Rev: xM\n");
> + 		omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
> + 		break;
> ++	case 1:
> ++	        pr_info("OMAP3 Beagle Rev: xM B\n");
> ++		omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
> ++		break;
> ++	case 2:
> ++		pr_info("OMAP3 Beagle Rev: xM C\n");
> ++		omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC;
> ++		break;
> + 	default:
> +-		printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev);
> +-		omap3_beagle_version = OMAP3BEAGLE_BOARD_UNKN;
> ++		pr_info("OMAP3 Beagle Rev: unknown %hd, assuming xM C or newer\n",
> beagle_rev);
> ++		omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC;
> + 	}
> +
> + 	return;
> +@@ -273,13 +284,17 @@ static struct gpio_led gpio_leds[];
> + static int beagle_twl_gpio_setup(struct device *dev,
> + 		unsigned gpio, unsigned ngpio)
> + {
> +-	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
> ++	int r;
> ++
> ++	if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) ||
> ++		(omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMC)) {
> + 		mmc[0].gpio_wp = -EINVAL;
> + 	} else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) ||
> + 		(omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C4)) {
> + 		omap_mux_init_gpio(23, OMAP_PIN_INPUT);
> + 		mmc[0].gpio_wp = 23;
> + 	} else {
> ++		mmc[0].gpio_wp = 29;
> + 		omap_mux_init_gpio(29, OMAP_PIN_INPUT);
> + 	}
> + 	/* gpio + 0 is "mmc0_cd" (input/IRQ) */
> +@@ -294,9 +309,17 @@ static int beagle_twl_gpio_setup(struct device *dev,
> + 	 * power switch and overcurrent detect
> + 	 */
> +
> +-	gpio_request(gpio + 1, "EHCI_nOC");
> +-	gpio_direction_input(gpio + 1);
> +-
> ++	if ((omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM) &&
> ++		(omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XMC)) {
> ++		r = gpio_request(gpio + 1, "EHCI_nOC");
> ++		if (!r) {
> ++			r = gpio_direction_input(gpio + 1);
> ++			if (r)
> ++		        gpio_free(gpio + 1);
> ++		}
> ++		if (r)
> ++			pr_err("%s: unable to configure EHCI_nOC\n", __func__);
> ++	}
> + 	/*
> + 	 * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
> + 	 * high / others active low)
> +@@ -307,9 +330,44 @@ static int beagle_twl_gpio_setup(struct device *dev,
> + 	else
> + 		gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
> +
> ++	/* DVI reset GPIO is different between beagle revisions */
> ++	if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) ||
> ++		(omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMC))
> ++		beagle_dvi_device.reset_gpio = 129;
> ++	else
> ++		beagle_dvi_device.reset_gpio = 170;
> ++
> + 	/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
> + 	gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
> +
> ++	/*
> ++	 * gpio + 1 on Xm controls the TFP410's enable line (active low)
> ++	 * gpio + 2 control varies depending on the board rev as follows:
> ++	 * P7/P8 revisions(prototype): Camera EN
> ++	 * A2+ revisions (production): LDO (supplies DVI, serial, led blocks)
> ++	 */
> ++	if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) ||
> ++		(omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMC)) {
> ++		r = gpio_request(gpio + 1, "nDVI_PWR_EN");
> ++		if (!r) {
> ++			r = gpio_direction_output(gpio + 1, 0);
> ++			if (r)
> ++				gpio_free(gpio + 1);
> ++		}
> ++		if (r)
> ++			pr_err("%s: unable to configure nDVI_PWR_EN\n",
> ++			__func__);
> ++		r = gpio_request(gpio + 2, "DVI_LDO_EN");
> ++		if (!r) {
> ++			r = gpio_direction_output(gpio + 2, 1);
> ++			if (r)
> ++				gpio_free(gpio + 2);
> ++		}
> ++		if (r)
> ++			pr_err("%s: unable to configure DVI_LDO_EN\n",
> ++			__func__);
> ++	}
> ++
> + 	return 0;
> + }
> +
> +@@ -569,6 +627,13 @@ static void __init omap3_beagle_init(void)
> + 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
> + 	omap3_beagle_init_rev();
> + 	omap3_beagle_i2c_init();
> ++
> ++	/* xM version uses pin 4 instead of 7 for user button */
> ++	if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) ||
> ++		(omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMC)){
> ++		gpio_buttons[0].gpio = 4;
> ++	}
> ++
> + 	platform_add_devices(omap3_beagle_devices,
> + 			ARRAY_SIZE(omap3_beagle_devices));
> + 	omap_serial_init();
> +--
> +1.7.1
> +
> diff --git a/meta/recipes-kernel/linux/linux-yocto_git.bb
> b/meta/recipes-kernel/linux/linux-yocto_git.bb
> index 38fbba3..65a4333 100644
> --- a/meta/recipes-kernel/linux/linux-yocto_git.bb
> +++ b/meta/recipes-kernel/linux/linux-yocto_git.bb
> @@ -1,6 +1,8 @@
>  inherit kernel
>  require linux-yocto.inc
> 
> +FILESDIR =
> "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/linux-yocto-git/${MACHINE}"
> +
>  KMACHINE = "yocto/standard/base"
>  KMACHINE_qemux86  = "yocto/standard/common-pc/base"
>  KMACHINE_qemux86-64  = "yocto/standard/common-pc-64/base"
> @@ -17,12 +19,17 @@ KMETA = meta
> 
>  LINUX_VERSION ?= "2.6.37"
>  LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
> -PR = "r16"
> +PR = "r17"
>  PV = "${LINUX_VERSION}+git${SRCPV}"
>  SRCREV_FORMAT = "meta_machine"
> 
>  SRC_URI =
> "git://git.pokylinux.org/linux-yocto-2.6.37;protocol=git;nocheckout=1;branch=${KBRANCH},meta;name=machine,meta"
> 
> +# patch for beagle-xm rev c
> +SRC_URI_append_beagleboard = " \
> +
> file://0001-kernel-xm-rev-c-support.patch;patch=1 \
> +                             "
> +
>  COMPATIBLE_MACHINE =
> "(qemuarm|qemux86|qemuppc|qemumips|qemux86-64|mpc8315e-rdb|routerstationpro|beagleboard)"
> 
>  # Functionality flags
> -- 1.7.1
> 
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


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

* Re: [PATCH] bernard 5.0.1 and beagle-xm rev c
  2011-06-27 22:15   ` Darren Hart
@ 2011-06-28  4:43     ` Robert Berger
  0 siblings, 0 replies; 15+ messages in thread
From: Robert Berger @ 2011-06-28  4:43 UTC (permalink / raw)
  To: poky
  Cc: public-robertcnelson-Re5JQEeQqe8AvxtiuMwx3w,
	public-poky-SXX0g9bRc0uhPH1hqNUYSQ, Arnd Bergmann,
	public-gmane-G/ASJRsgvFgvW+L+VdN226ESeJV5RFUqQQ4Iyu8u01E,
	Simon Glass

Hi Darren,

On 06/28/2011 01:15 AM, Darren Hart wrote:
> 
>> [3]
>> https://github.com/RobertCNelson/linux-2.6/commit/ebe1e26476768b8edde0607433e564ffd4b0e903
> 
> 
> It isn't clear to me where this one fits in. Is this a backport for
> linux-2.6.git to 2.6.37 ? It strikes me as odd that there are
> Beagleboard specific mainline changes that aren't in linux-omap. That is
> the opposite direction I tend to see patches flow.
> 

I guess Robert Nelson answered this one.

Besides there is something being cooked to add networking support to
u-boot here: git://github.com/koenkooi/u-boot.git

it is discussed here:
http://thread.gmane.org/gmane.comp.hardware.beagleboard.user/21719

Regards,

Robert
..."In the beginning, there was software. And it wasn't good."

My public pgp key is available at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1




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

end of thread, other threads:[~2011-06-28  4:43 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-14 21:13 bernard 5.0.1 and beagle-xm rev c Robert Berger
2011-06-15  1:31 ` Darren Hart
2011-06-15 11:01   ` Robert Berger
2011-06-15 11:46     ` Robert Berger
2011-06-15 16:38     ` Darren Hart
2011-06-15 17:18       ` Robert Berger
2011-06-15 23:36         ` Darren Hart
2011-06-16  1:32           ` Jason Kridner
     [not found]             ` <4DFA2189.7020804@ahsoftware.de>
2011-06-16 17:48               ` Darren Hart
2011-06-15 18:26       ` Jason Kridner
2011-06-15 19:05         ` Robert Berger
2011-06-15 20:43           ` Jason Kridner
2011-06-18 19:05 ` [PATCH] " Robert Berger
2011-06-27 22:15   ` Darren Hart
2011-06-28  4:43     ` Robert Berger

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.