Jump to content

Lime2 autostart when power + battery connected


splite

Recommended Posts

Hello,

 

I'm testing the latest (kernel 4.5) jessie server vanilla on a Olimex Lime2.

If a battery is connected to the board and the power plugged in, the board start by itself !

 

I would like to change this behavior, is there any file to tweak ?

 

Thanks

Link to comment
Share on other sites

On A20/AXP209 boards default behaviour is that when AXP209 (the power management unit) detects voltage/amperage provided through DC-IN is sufficient then the board starts immediately. When you provide power through (Mini) USB or battery you would need to press the power button.

 

So there's nothing to tweak, your only solution would be to use the USB OTG port to provide power to the board (be careful to choose an USB cable with low gauge ratings -- 20 AWG would be the best since otherwise voltage drops might occur under load!)

Link to comment
Share on other sites

Thanks for your reply Tkaiser,

 

It's a pity that we can not change this behavior. I posted a small hack few months ago on Olimex Forum about changing this behavior https://www.olimex.com/forum/index.php?topic=4739.new;topicseen#new

I thought it was a bug from U boot but apparently not...I don't know if this hack can work on the latest jessie server image.

 

What I heard about the USB OTG power supply is that it can not provide sufficient power to the board and all the components (I'm using 2 wifi dongle, an hard drive connected on SATA + a battery).

 

I'm not sure about the best option

Link to comment
Share on other sites

IIRC @chradev posted some consumption figures a while ago that made use of powering through USB OTG (since in this case AXP209 is able to monitor the whole system consumption unlike when powered through DC-IN). Maybe this is the right thread, maybe not (forum search not sufficient and I lack the time to read through completely): http://forum.armbian.com/index.php/topic/853-armbian-customization/page-4#entry7971

 

I would try it out. And if you choose this attempt you can measure consumption individually by plugging in your components one after another. I would fear peak consumption when spinning up the disk is the biggest problem.

 

You know that you can enable/disable power for USB devices on Lime2? It's PH3/PH6 and you can disable power in fex/dts and then enable it using sunxi-pio. For example

To power off usb port:
sunxi-pio -m PH6'<default><default<default><0>'
To power it up again:
sunxi-pio -m PH6'<default><default<default><1>'

This way you could disable power for the WiFi dongles at startup, let the disk spin up and then activate USB peripherals later.

Link to comment
Share on other sites

Regarding this doc https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXIno-LIME2/resources/A20-OLinuXino-LIME2-UM.pdf, 5V USB_OTG is given to deliver exactly 523mA. I don't know if this work in both way. I mean, if the board can draw more than 523mA throught USB_OTG, I guess no...

 

I did not know about disabling power for USB devices, but I got 2 wifi dongle + an SSD drive. So it would be more than 500mA...

 

I'm gonna make some more test...

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines