* [U-Boot] [RFC] [PATCH] omap3_beagle: fdt: xMA/B set hsusb2_power_reg active-high
@ 2014-01-28 23:31 Robert Nelson
2014-01-29 14:51 ` Robert Nelson
0 siblings, 1 reply; 5+ messages in thread
From: Robert Nelson @ 2014-01-28 23:31 UTC (permalink / raw)
To: u-boot
With the xM revision C, the DC control of the usb hub was inverted.
By adding the enable-active-high property to hsusb2_power_reg, mainline omap3-beagle-xm.dtb
will now activiate properly activate the usb hub on older xMA/B varients.
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
CC: Tom Rini <trini@ti.com>
---
include/configs/omap3_beagle.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index c58bc91..d7d63ce 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -249,6 +249,9 @@
"setenv fdtfile omap3-beagle-xm.dtb; fi; " \
"if test $fdtfile = undefined; then " \
"echo WARNING: Could not determine device tree to use; fi; \0" \
+ "fixfdt=" \
+ "if test $beaglerev = xMAB; then " \
+ "fdt addr ${fdtaddr}; fdt resize; fdt set /hsusb2_power_reg enable-active-high; fi; \0" \
"bootenv=uEnv.txt\0" \
"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
"importbootenv=echo Importing environment from mmc ...; " \
@@ -308,6 +311,7 @@
"setenv bootfile zImage;" \
"if run loadimage; then " \
"run loadfdt;" \
+ "run fixfdt;" \
"run mmcbootz; " \
"fi; " \
--
1.8.5.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [RFC] [PATCH] omap3_beagle: fdt: xMA/B set hsusb2_power_reg active-high
2014-01-28 23:31 [U-Boot] [RFC] [PATCH] omap3_beagle: fdt: xMA/B set hsusb2_power_reg active-high Robert Nelson
@ 2014-01-29 14:51 ` Robert Nelson
2014-01-29 20:46 ` Tom Rini
0 siblings, 1 reply; 5+ messages in thread
From: Robert Nelson @ 2014-01-29 14:51 UTC (permalink / raw)
To: u-boot
On Tue, Jan 28, 2014 at 5:31 PM, Robert Nelson <robertcnelson@gmail.com> wrote:
> With the xM revision C, the DC control of the usb hub was inverted.
>
> By adding the enable-active-high property to hsusb2_power_reg, mainline omap3-beagle-xm.dtb
> will now activiate properly activate the usb hub on older xMA/B varients.
>
> Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
> CC: Tom Rini <trini@ti.com>
> ---
> include/configs/omap3_beagle.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
> index c58bc91..d7d63ce 100644
> --- a/include/configs/omap3_beagle.h
> +++ b/include/configs/omap3_beagle.h
> @@ -249,6 +249,9 @@
> "setenv fdtfile omap3-beagle-xm.dtb; fi; " \
> "if test $fdtfile = undefined; then " \
> "echo WARNING: Could not determine device tree to use; fi; \0" \
> + "fixfdt=" \
> + "if test $beaglerev = xMAB; then " \
> + "fdt addr ${fdtaddr}; fdt resize; fdt set /hsusb2_power_reg enable-active-high; fi; \0" \
> "bootenv=uEnv.txt\0" \
> "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
> "importbootenv=echo Importing environment from mmc ...; " \
> @@ -308,6 +311,7 @@
> "setenv bootfile zImage;" \
> "if run loadimage; then " \
> "run loadfdt;" \
> + "run fixfdt;" \
> "run mmcbootz; " \
> "fi; " \
>
> --
> 1.8.5.3
I've listed this as an RFC, as i'm not sure if there is a generic way
we should be doing device tree fixup's in u-boot.
I have thought about splitting omap3-beagle-xm.dtb into two variants
"ab" and "c" with just a simple one line delta:
https://github.com/RobertCNelson/armv7-multiplatform/blob/v3.13.x/patches/omap3_beagle_xm_rework/0002-ARM-dts-omap3-beagle-xm-ab-usb-host-is-active-high-t.patch
But it's just so trivial to just fix it in u-boot instead.
Thoughts?
Regards,
--
Robert Nelson
http://www.rcn-ee.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [RFC] [PATCH] omap3_beagle: fdt: xMA/B set hsusb2_power_reg active-high
2014-01-29 14:51 ` Robert Nelson
@ 2014-01-29 20:46 ` Tom Rini
2014-01-29 21:55 ` Robert Nelson
0 siblings, 1 reply; 5+ messages in thread
From: Tom Rini @ 2014-01-29 20:46 UTC (permalink / raw)
To: u-boot
On Wed, Jan 29, 2014 at 08:51:27AM -0600, Robert Nelson wrote:
> On Tue, Jan 28, 2014 at 5:31 PM, Robert Nelson <robertcnelson@gmail.com> wrote:
> > With the xM revision C, the DC control of the usb hub was inverted.
> >
> > By adding the enable-active-high property to hsusb2_power_reg, mainline omap3-beagle-xm.dtb
> > will now activiate properly activate the usb hub on older xMA/B varients.
> >
> > Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
> > CC: Tom Rini <trini@ti.com>
> > ---
> > include/configs/omap3_beagle.h | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
> > index c58bc91..d7d63ce 100644
> > --- a/include/configs/omap3_beagle.h
> > +++ b/include/configs/omap3_beagle.h
> > @@ -249,6 +249,9 @@
> > "setenv fdtfile omap3-beagle-xm.dtb; fi; " \
> > "if test $fdtfile = undefined; then " \
> > "echo WARNING: Could not determine device tree to use; fi; \0" \
> > + "fixfdt=" \
> > + "if test $beaglerev = xMAB; then " \
> > + "fdt addr ${fdtaddr}; fdt resize; fdt set /hsusb2_power_reg enable-active-high; fi; \0" \
> > "bootenv=uEnv.txt\0" \
> > "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
> > "importbootenv=echo Importing environment from mmc ...; " \
> > @@ -308,6 +311,7 @@
> > "setenv bootfile zImage;" \
> > "if run loadimage; then " \
> > "run loadfdt;" \
> > + "run fixfdt;" \
> > "run mmcbootz; " \
> > "fi; " \
> >
> > --
> > 1.8.5.3
>
> I've listed this as an RFC, as i'm not sure if there is a generic way
> we should be doing device tree fixup's in u-boot.
>
> I have thought about splitting omap3-beagle-xm.dtb into two variants
> "ab" and "c" with just a simple one line delta:
>
> https://github.com/RobertCNelson/armv7-multiplatform/blob/v3.13.x/patches/omap3_beagle_xm_rework/0002-ARM-dts-omap3-beagle-xm-ab-usb-host-is-active-high-t.patch
>
> But it's just so trivial to just fix it in u-boot instead.
>
> Thoughts?
Well, we have per-platform fixups in the tree today. However this now
means that only u-boot is going to provide a correct and fully
functional tree for those revs, which isn't good imho for the
beagleboard community use cases of older u-boots / distro support /
non-u-boot bootloader support, so it'd probably be best to have per rev
DTs and update findfdt to use the right one.
--
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/20140129/4af09353/attachment.pgp>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [RFC] [PATCH] omap3_beagle: fdt: xMA/B set hsusb2_power_reg active-high
2014-01-29 20:46 ` Tom Rini
@ 2014-01-29 21:55 ` Robert Nelson
2014-01-29 22:11 ` Tom Rini
0 siblings, 1 reply; 5+ messages in thread
From: Robert Nelson @ 2014-01-29 21:55 UTC (permalink / raw)
To: u-boot
> Well, we have per-platform fixups in the tree today. However this now
> means that only u-boot is going to provide a correct and fully
> functional tree for those revs, which isn't good imho for the
> beagleboard community use cases of older u-boots / distro support /
> non-u-boot bootloader support, so it'd probably be best to have per rev
> DTs and update findfdt to use the right one.
Thanks Tom,
The thing is, usb has been broken on the xMA/B's ever since we first
setup findfdt to use the omap3-beagle-xm.dtb. Although the usb ehci
port was finally fixed in v3.13-rcX, so nobody really noticed these
pre-xMC's where broken in the first place.
That's why I thought it made more sense to fix it in u-boot, as we
then get mainline v3.13.x working out of the box for free. (if the
distro upgrades u-boot) Otherwise all distro's need to carry a kernel
patch for v3.13/v3.14 adding a new omap3-beagle-xm-ab.dtb variant.
I can go either way, as i've been pushing out images with the *-ab.dtb
/ *-c.dtb variants running v3.12/v3.13 to the beagleboard community.
But while updating my base image to v2014.01, i thought pushing it to
u-boot might be better in the long run.
Regards,
--
Robert Nelson
http://www.rcn-ee.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [RFC] [PATCH] omap3_beagle: fdt: xMA/B set hsusb2_power_reg active-high
2014-01-29 21:55 ` Robert Nelson
@ 2014-01-29 22:11 ` Tom Rini
0 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2014-01-29 22:11 UTC (permalink / raw)
To: u-boot
On Wed, Jan 29, 2014 at 03:55:36PM -0600, Robert Nelson wrote:
> > Well, we have per-platform fixups in the tree today. However this now
> > means that only u-boot is going to provide a correct and fully
> > functional tree for those revs, which isn't good imho for the
> > beagleboard community use cases of older u-boots / distro support /
> > non-u-boot bootloader support, so it'd probably be best to have per rev
> > DTs and update findfdt to use the right one.
>
> Thanks Tom,
>
> The thing is, usb has been broken on the xMA/B's ever since we first
> setup findfdt to use the omap3-beagle-xm.dtb. Although the usb ehci
> port was finally fixed in v3.13-rcX, so nobody really noticed these
> pre-xMC's where broken in the first place.
>
> That's why I thought it made more sense to fix it in u-boot, as we
> then get mainline v3.13.x working out of the box for free. (if the
> distro upgrades u-boot) Otherwise all distro's need to carry a kernel
> patch for v3.13/v3.14 adding a new omap3-beagle-xm-ab.dtb variant.
>
> I can go either way, as i've been pushing out images with the *-ab.dtb
> / *-c.dtb variants running v3.12/v3.13 to the beagleboard community.
> But while updating my base image to v2014.01, i thought pushing it to
> u-boot might be better in the long run.
I think the answer is that bootloaders should only be modifying the
device tree for things that are individual board different (MAC, etc).
So yeah, get another device tree out of the kernel and distros would
either just pick up this patch or additional device trees. May be worth
asking the devicetree list about..
--
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/20140129/00756011/attachment.pgp>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-01-29 22:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-28 23:31 [U-Boot] [RFC] [PATCH] omap3_beagle: fdt: xMA/B set hsusb2_power_reg active-high Robert Nelson
2014-01-29 14:51 ` Robert Nelson
2014-01-29 20:46 ` Tom Rini
2014-01-29 21:55 ` Robert Nelson
2014-01-29 22:11 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox