From: Jens Peter Schroer Date: Fri, 7 Nov 2014 01:52:40 +0100 Subject: Re: Beaglebone reboot To: dturvene gmail Cc: Ives van der Flaas Hi, Sorry for the late reply. I was out on a business trip all day and could not reply earlier. Let me outline how I traced the issue on my systems, so that you can reproduce this with your systems. A few things up front: a. I did my experiments with 3.17.1-bone4. I assume it works under other kernel versions as well, but just as a heads up. b. I used Lei Wang's post in https://groups.google.com/forum/#!topic/beagleboard/xPxzYyNsA78 as gudianc= e c. You need to have debugfs and CONFIG_DYNAMIC_DEBUG enabled in the kernel (it's the case by default) d. I assume debugfs is mounted at /sys/kernel/debug e. I assume you know how to build a kernel Let's get started. First, let's see the issue (according to Lei Wang the probing for OTG devices can sometimes cause an overload and the system will reboot). 1. We need to become root: $> sudo su 2. Enable tracing for the OTG probing: $> echo 'file tps65217.c line 189 +p' > /sys/kernel/debug/dynamic_debug/control 3. Check dmesg for OTG probing logging: $> dmesg Output should show: [ 217.095367] tps65217_irq: USB power status change [ 217.259338] tps65217_irq: USB power status change [ 219.096801] tps65217_irq: USB power status change [ 219.256103] tps65217_irq: USB power status change [ 221.094177] tps65217_irq: USB power status change 4. Patch the kernel to make usb_0 run in peripheral mode with the following patch: diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi index 0dc22d2..dffe269 100644 --- a/arch/arm/boot/dts/am335x-bone-common.dtsi +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi @@ -94,6 +94,7 @@ &usb0 { status =3D "okay"; + dr_mode =3D "peripheral"; }; &usb1 { 5. As precaution I also disabled USB OTG support in the kernel. 6. Rebuild the kernel and reboot with it 7. Repeat step 3 to confirm patch was applied correctly. The ouput should NOT be present anymore! 8. Done Since I have applied this patch, our systems are running stable again. Our systems are making heavy use of Wifi as well. The two different system setups we are using: 1. BBB with D-LINK 7port USB 2.0 HUB and 2x Netgear WNA1100 dongles + 1 Bluetooth smart dongle 2. BBB with D-LINK 4port USB 2.0 HUB and 1 UWN200 dongle All systems rock solid so far even under wifi load. Dave, could you share what you are exactly are doing with your system (sample commands and programs used)? Kind regards, Jens