Re: [PATCHv3] ARM: OMAP2+: am335x-bone*: add DT for BeagleBone Black

2013-09-09 Thread Tom Rini
On 09/08/2013 07:12 AM, Koen Kooi wrote:
 The BeagleBone Black is basically a regular BeagleBone with eMMC and HDMI 
 added,
 so create a common dtsi both can use.
 
 IMPORTANT: booting the existing am335x-bone.dts will blow up the HDMI 
 transceiver 
 after a dozen boots with an uSD card inserted because LDO will be at 3.3V 
 instead
 of 1.8. 
 
 MMC support for AM335x still isn't in, so only the LDO change has been added.
 
 Signed-off-by: Koen Kooi k...@dominion.thruhere.net

Grabbed my beaglebone white and black and tested them both on top of
e5c832d (top of Linus' tree atm), came up with a ramdisk.

Tested-by: Tom Rini tr...@ti.com

-- 
Tom
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv3] ARM: OMAP2+: am335x-bone*: add DT for BeagleBone Black

2013-09-09 Thread Matt Porter
On Sun, Sep 08, 2013 at 01:12:26PM +0200, Koen Kooi wrote:
 The BeagleBone Black is basically a regular BeagleBone with eMMC and HDMI 
 added,
 so create a common dtsi both can use.
 
 IMPORTANT: booting the existing am335x-bone.dts will blow up the HDMI 
 transceiver 
 after a dozen boots with an uSD card inserted because LDO will be at 3.3V 
 instead
 of 1.8. 
 
 MMC support for AM335x still isn't in, so only the LDO change has been added.
 
 Signed-off-by: Koen Kooi k...@dominion.thruhere.net

Tested-by: Matt Porter matt.por...@linaro.org

Works fine for me on tip and 3.11. I did notice a regression in musb (worked
on 3.11, now failing to probe but this is not related to your new dts as it
happens on am335x-bone.dts too, assuming merge window volatility). One nit,
git-am picked up a whitespace error on that extra line at EOF so you should
trim that out.

Only thing is...for a clear bug like this that will destroy hardware, it
should be marked Cc: sta...@vger.kernel.org to be picked up in stable.

-Matt
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv3] ARM: OMAP2+: am335x-bone*: add DT for BeagleBone Black

2013-09-09 Thread Jonathan Austin

Hi Matt,

On 09/09/13 14:31, Matt Porter wrote:

On Sun, Sep 08, 2013 at 01:12:26PM +0200, Koen Kooi wrote:

The BeagleBone Black is basically a regular BeagleBone with eMMC and HDMI added,
so create a common dtsi both can use.

IMPORTANT: booting the existing am335x-bone.dts will blow up the HDMI 
transceiver
after a dozen boots with an uSD card inserted because LDO will be at 3.3V 
instead
of 1.8.

MMC support for AM335x still isn't in, so only the LDO change has been added.

Signed-off-by: Koen Kooi k...@dominion.thruhere.net


Tested-by: Matt Porter matt.por...@linaro.org

Works fine for me on tip and 3.11. I did notice a regression in musb (worked
on 3.11, now failing to probe but this is not related to your new dts as it
happens on am335x-bone.dts too, assuming merge window volatility). One nit,
git-am picked up a whitespace error on that extra line at EOF so you should
trim that out.

Only thing is...for a clear bug like this that will destroy hardware, it
should be marked Cc: sta...@vger.kernel.org to be picked up in stable.



If I've understood Koen correctly then what he's saying is that if you 
*were* to use the current (before this patch) am335x-bone.dts on a 
Beagle Bone Black (which would be wrong, as that's not the board you 
have...) then things would break.


I don't see that this patch fixes that - as far as I can see, even after 
the patch, using am335x-bone.dts with a Bone Black will risk the damage?


If so, I don't think this is a 'stable fix' kind of thing, as it doesn't 
actually fix the problem?


Koen - is there a way for a booting kernel to detect which board it is 
on and avoid any potential damage if someone gives it the wrong DT?


Jonny


-Matt

___
linux-arm-kernel mailing list
linux-arm-ker...@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel




--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv3] ARM: OMAP2+: am335x-bone*: add DT for BeagleBone Black

2013-09-09 Thread Matt Porter
On Mon, Sep 09, 2013 at 02:51:13PM +0100, Jonathan Austin wrote:
 Hi Matt,
 
 On 09/09/13 14:31, Matt Porter wrote:
 On Sun, Sep 08, 2013 at 01:12:26PM +0200, Koen Kooi wrote:
 The BeagleBone Black is basically a regular BeagleBone with eMMC and HDMI 
 added,
 so create a common dtsi both can use.
 
 IMPORTANT: booting the existing am335x-bone.dts will blow up the HDMI 
 transceiver
 after a dozen boots with an uSD card inserted because LDO will be at 3.3V 
 instead
 of 1.8.
 
 MMC support for AM335x still isn't in, so only the LDO change has been 
 added.
 
 Signed-off-by: Koen Kooi k...@dominion.thruhere.net
 
 Tested-by: Matt Porter matt.por...@linaro.org
 
 Works fine for me on tip and 3.11. I did notice a regression in musb (worked
 on 3.11, now failing to probe but this is not related to your new dts as it
 happens on am335x-bone.dts too, assuming merge window volatility). One nit,
 git-am picked up a whitespace error on that extra line at EOF so you should
 trim that out.
 
 Only thing is...for a clear bug like this that will destroy hardware, it
 should be marked Cc: sta...@vger.kernel.org to be picked up in stable.
 
 
 If I've understood Koen correctly then what he's saying is that if
 you *were* to use the current (before this patch) am335x-bone.dts on
 a Beagle Bone Black (which would be wrong, as that's not the board
 you have...) then things would break.
 
 I don't see that this patch fixes that - as far as I can see, even
 after the patch, using am335x-bone.dts with a Bone Black will risk
 the damage?
 
 If so, I don't think this is a 'stable fix' kind of thing, as it
 doesn't actually fix the problem?

It fixes the problem by providing the correct dts for BBB which the
vendor tree has had for sometime. In the absence of a specific dts
for BBB, it appears everybody (TI and OMAP maintainers, included)
has assumed that am335x-bone.dts is correct and safe.

I'm sure there's plenty of systems represented in dts/* where you
could cause damage by loading another dtb for a similar board from
the same SoC family...it's a common risk if you get the wrong dtb
with more-or-less arbitrary regulator settings.

-Matt

 
 Koen - is there a way for a booting kernel to detect which board it
 is on and avoid any potential damage if someone gives it the wrong
 DT?
 
 Jonny
 
 -Matt
 
 ___
 linux-arm-kernel mailing list
 linux-arm-ker...@lists.infradead.org
 http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
 
 
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv3] ARM: OMAP2+: am335x-bone*: add DT for BeagleBone Black

2013-09-09 Thread Matt Porter
On Mon, Sep 09, 2013 at 09:59:26AM -0400, Matt Porter wrote:
 On Mon, Sep 09, 2013 at 02:51:13PM +0100, Jonathan Austin wrote:
  Hi Matt,
  
  On 09/09/13 14:31, Matt Porter wrote:
  On Sun, Sep 08, 2013 at 01:12:26PM +0200, Koen Kooi wrote:
  The BeagleBone Black is basically a regular BeagleBone with eMMC and HDMI 
  added,
  so create a common dtsi both can use.
  
  IMPORTANT: booting the existing am335x-bone.dts will blow up the HDMI 
  transceiver
  after a dozen boots with an uSD card inserted because LDO will be at 3.3V 
  instead
  of 1.8.
  
  MMC support for AM335x still isn't in, so only the LDO change has been 
  added.
  
  Signed-off-by: Koen Kooi k...@dominion.thruhere.net
  
  Tested-by: Matt Porter matt.por...@linaro.org
  
  Works fine for me on tip and 3.11. I did notice a regression in musb 
  (worked
  on 3.11, now failing to probe but this is not related to your new dts as it
  happens on am335x-bone.dts too, assuming merge window volatility). One nit,
  git-am picked up a whitespace error on that extra line at EOF so you should
  trim that out.
  
  Only thing is...for a clear bug like this that will destroy hardware, it
  should be marked Cc: sta...@vger.kernel.org to be picked up in stable.
  
  
  If I've understood Koen correctly then what he's saying is that if
  you *were* to use the current (before this patch) am335x-bone.dts on
  a Beagle Bone Black (which would be wrong, as that's not the board
  you have...) then things would break.
  
  I don't see that this patch fixes that - as far as I can see, even
  after the patch, using am335x-bone.dts with a Bone Black will risk
  the damage?
  
  If so, I don't think this is a 'stable fix' kind of thing, as it
  doesn't actually fix the problem?
 
 It fixes the problem by providing the correct dts for BBB which the
 vendor tree has had for sometime. In the absence of a specific dts
 for BBB, it appears everybody (TI and OMAP maintainers, included)
 has assumed that am335x-bone.dts is correct and safe.
 
 I'm sure there's plenty of systems represented in dts/* where you
 could cause damage by loading another dtb for a similar board from
 the same SoC family...it's a common risk if you get the wrong dtb
 with more-or-less arbitrary regulator settings.

Sorry to reply to myself, but I probably didn't make it 100% clear as
to why this effectively fixes the problem. Both mainline u-boot *and*
the vendor u-boot have findfdt implemented to load an
am335x-boneblack.dtb based on board detection.

Hopefully this makes it clear why this fixes a bug in the kernel. If
you use appended dtb to include the wrong one, well, you shouldn't
be using appended dtb. It's a *hack* and loading it separately
works fine if you use the U-Boot that ships with BBB or mainline.

-Matt

  Koen - is there a way for a booting kernel to detect which board it
  is on and avoid any potential damage if someone gives it the wrong
  DT?
  
  Jonny
  
  -Matt
  
  ___
  linux-arm-kernel mailing list
  linux-arm-ker...@lists.infradead.org
  http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
  
  
  
  --
  To unsubscribe from this list: send the line unsubscribe linux-omap in
  the body of a message to majord...@vger.kernel.org
  More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv3] ARM: OMAP2+: am335x-bone*: add DT for BeagleBone Black

2013-09-09 Thread Jonathan Austin

Hi Matt,

On 09/09/13 15:16, Matt Porter wrote:

On Mon, Sep 09, 2013 at 09:59:26AM -0400, Matt Porter wrote:

On Mon, Sep 09, 2013 at 02:51:13PM +0100, Jonathan Austin wrote:

Hi Matt,

On 09/09/13 14:31, Matt Porter wrote:

On Sun, Sep 08, 2013 at 01:12:26PM +0200, Koen Kooi wrote:

The BeagleBone Black is basically a regular BeagleBone with eMMC and HDMI added,
so create a common dtsi both can use.

IMPORTANT: booting the existing am335x-bone.dts will blow up the HDMI 
transceiver
after a dozen boots with an uSD card inserted because LDO will be at 3.3V 
instead
of 1.8.

MMC support for AM335x still isn't in, so only the LDO change has been added.

Signed-off-by: Koen Kooi k...@dominion.thruhere.net


Tested-by: Matt Porter matt.por...@linaro.org

Works fine for me on tip and 3.11. I did notice a regression in musb (worked
on 3.11, now failing to probe but this is not related to your new dts as it
happens on am335x-bone.dts too, assuming merge window volatility). One nit,
git-am picked up a whitespace error on that extra line at EOF so you should
trim that out.

Only thing is...for a clear bug like this that will destroy hardware, it
should be marked Cc: sta...@vger.kernel.org to be picked up in stable.



If I've understood Koen correctly then what he's saying is that if
you *were* to use the current (before this patch) am335x-bone.dts on
a Beagle Bone Black (which would be wrong, as that's not the board
you have...) then things would break.

I don't see that this patch fixes that - as far as I can see, even
after the patch, using am335x-bone.dts with a Bone Black will risk
the damage?

If so, I don't think this is a 'stable fix' kind of thing, as it
doesn't actually fix the problem?


It fixes the problem by providing the correct dts for BBB which the
vendor tree has had for sometime. In the absence of a specific dts
for BBB, it appears everybody (TI and OMAP maintainers, included)
has assumed that am335x-bone.dts is correct and safe.

I'm sure there's plenty of systems represented in dts/* where you
could cause damage by loading another dtb for a similar board from
the same SoC family...it's a common risk if you get the wrong dtb
with more-or-less arbitrary regulator settings.


Sorry to reply to myself, but I probably didn't make it 100% clear as
to why this effectively fixes the problem. Both mainline u-boot *and*
the vendor u-boot have findfdt implemented to load an
am335x-boneblack.dtb based on board detection.


This makes more sense now, thanks. Not sure that it is still a good case 
for CC:stable. Are people currently working around findfdt failing, etc? 
If so, do you think backporting the fix will stop them doing that? I 
don't really know what the workflow looks like...


Generally the idea of backporting DT fixes to older kernels gives me the 
Heebie-Jeebies - this case of being able to damage hardware is a great 
example of why it might be scary (though I acknowledge that this 
specific patch is unlikely to have a bad outcome)


Jonny


Hopefully this makes it clear why this fixes a bug in the kernel. If
you use appended dtb to include the wrong one, well, you shouldn't
be using appended dtb. It's a *hack* and loading it separately
works fine if you use the U-Boot that ships with BBB or mainline.

-Matt


Koen - is there a way for a booting kernel to detect which board it
is on and avoid any potential damage if someone gives it the wrong
DT?

Jonny


-Matt

___
linux-arm-kernel mailing list
linux-arm-ker...@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel




--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html





--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCHv3] ARM: OMAP2+: am335x-bone*: add DT for BeagleBone Black

2013-09-08 Thread Koen Kooi
The BeagleBone Black is basically a regular BeagleBone with eMMC and HDMI added,
so create a common dtsi both can use.

IMPORTANT: booting the existing am335x-bone.dts will blow up the HDMI 
transceiver 
after a dozen boots with an uSD card inserted because LDO will be at 3.3V 
instead
of 1.8. 

MMC support for AM335x still isn't in, so only the LDO change has been added.

Signed-off-by: Koen Kooi k...@dominion.thruhere.net
---

Changes since 2:
Updated commit message to point out that the existing DT will damage 
the board.
Changes since v1:
Added the Makefile entry for the new dts

 arch/arm/boot/dts/Makefile |   1 +
 .../{am335x-bone.dts = am335x-bone-common.dtsi}   |   3 -
 arch/arm/boot/dts/am335x-bone.dts  | 256 +
 arch/arm/boot/dts/am335x-boneblack.dts |  18 ++
 4 files changed, 20 insertions(+), 258 deletions(-)
 copy arch/arm/boot/dts/{am335x-bone.dts = am335x-bone-common.dtsi} (99%)
 create mode 100644 arch/arm/boot/dts/am335x-boneblack.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 641b3c9a..b7c0c52 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -171,6 +171,7 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
am335x-evm.dtb \
am335x-evmsk.dtb \
am335x-bone.dtb \
+   am335x-boneblack.dtb \
am3517-evm.dtb \
am3517_mt_ventoux.dtb \
am43x-epos-evm.dtb
diff --git a/arch/arm/boot/dts/am335x-bone.dts 
b/arch/arm/boot/dts/am335x-bone-common.dtsi
similarity index 99%
copy from arch/arm/boot/dts/am335x-bone.dts
copy to arch/arm/boot/dts/am335x-bone-common.dtsi
index d318987..2f66ded 100644
--- a/arch/arm/boot/dts/am335x-bone.dts
+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
@@ -5,9 +5,6 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-/dts-v1/;
-
-#include am33xx.dtsi
 
 / {
model = TI AM335x BeagleBone;
diff --git a/arch/arm/boot/dts/am335x-bone.dts 
b/arch/arm/boot/dts/am335x-bone.dts
index d318987..7993c48 100644
--- a/arch/arm/boot/dts/am335x-bone.dts
+++ b/arch/arm/boot/dts/am335x-bone.dts
@@ -8,258 +8,4 @@
 /dts-v1/;
 
 #include am33xx.dtsi
-
-/ {
-   model = TI AM335x BeagleBone;
-   compatible = ti,am335x-bone, ti,am33xx;
-
-   cpus {
-   cpu@0 {
-   cpu0-supply = dcdc2_reg;
-   };
-   };
-
-   memory {
-   device_type = memory;
-   reg = 0x8000 0x1000; /* 256 MB */
-   };
-
-   am33xx_pinmux: pinmux@44e10800 {
-   pinctrl-names = default;
-   pinctrl-0 = clkout2_pin;
-
-   user_leds_s0: user_leds_s0 {
-   pinctrl-single,pins = 
-   0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* 
gpmc_a5.gpio1_21 */
-   0x58 (PIN_OUTPUT_PULLUP | MUX_MODE7)/* 
gpmc_a6.gpio1_22 */
-   0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* 
gpmc_a7.gpio1_23 */
-   0x60 (PIN_OUTPUT_PULLUP | MUX_MODE7)/* 
gpmc_a8.gpio1_24 */
-   ;
-   };
-
-   i2c0_pins: pinmux_i2c0_pins {
-   pinctrl-single,pins = 
-   0x188 (PIN_INPUT_PULLUP | MUX_MODE0)/* 
i2c0_sda.i2c0_sda */
-   0x18c (PIN_INPUT_PULLUP | MUX_MODE0)/* 
i2c0_scl.i2c0_scl */
-   ;
-   };
-
-   uart0_pins: pinmux_uart0_pins {
-   pinctrl-single,pins = 
-   0x170 (PIN_INPUT_PULLUP | MUX_MODE0)/* 
uart0_rxd.uart0_rxd */
-   0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* 
uart0_txd.uart0_txd */
-   ;
-   };
-
-   clkout2_pin: pinmux_clkout2_pin {
-   pinctrl-single,pins = 
-   0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* 
xdma_event_intr1.clkout2 */
-   ;
-   };
-
-   cpsw_default: cpsw_default {
-   pinctrl-single,pins = 
-   /* Slave 1 */
-   0x110 (PIN_INPUT_PULLUP | MUX_MODE0)/* 
mii1_rxerr.mii1_rxerr */
-   0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* 
mii1_txen.mii1_txen */
-   0x118 (PIN_INPUT_PULLUP | MUX_MODE0)/* 
mii1_rxdv.mii1_rxdv */
-   0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* 
mii1_txd3.mii1_txd3 */
-   0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* 
mii1_txd2.mii1_txd2 */
-   0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* 
mii1_txd1.mii1_txd1 */
-   0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /*