[Letux-kernel] Turning off 3g in uboot
H. Nikolaus Schaller
hns at goldelico.com
Wed Feb 1 18:05:40 CET 2017
> Am 01.02.2017 um 17:26 schrieb Andreas Kemnade <andreas at kemnade.info>:
>
> Hi,
>
> I remember a paragraph in the gta04 user guide:
>
> Note: if the CPU is powered down through the emergency function (Power
> button pressed for >8 seconds) the module may remain powered on,
> although everything else is off. Although it typically draws only 3-10
> mA it may try to re-register to the network and in certain conditions
> (signal received from the base station is better than the own
> transmitted signal) it may draw up to 100 mA and send GSM bursts while
> unsuccessfully trying to re- register to base stations. It should be
> possible to handle that by some U-Boot hack (U-Boot starts but shuts
> down after release of the Power button).
Yes, this still seems to be the case according to the console log, although
I don't know how U-Boot recognises to shut down immediately in this situation.
Here is what I see right after 8 seconds elapsed after pressing the button.
The auto-reboot repeats until I release the power-button:
U-Boot SPL 2016.11-00211-g7620f06 (Jan 30 2017 - 18:09:58)
Trying to boot from OneNAND
spl: onenand
spl: payload image: *s load addr: 0x4 size: -2146435040
Jumping to U-Boot
loaded - jumping to U-Boot...
U-Boot 2016.11-00211-g7620f06 (Jan 30 2017 - 18:09:58 +0100)
OMAP36XX/37XX-GP ES1.2, CPU-OPP2, L3-200MHz, Max CPU Clock 1 Ghz
GTA04 + LPDDR/OneNAND
I2C: ready
DRAM: 512 MiB
NAND: Muxed OneNAND 512MB 1.8V 16-bit (0x50)
OneNAND version = 0x0232
Chip support all block unlock
Chip has 4KiB pagesize
Scanning device for bad blocks
onenand_bbt_wait: controller error = 0x0400
Bad eraseblock 843 at 0x0d2c0000
OneNAND: 512 MiB
MMC: OMAP SD/MMC: 0
U-Boot SPL 2016.11-00211-g7620f06 (Jan 30 2017 - 18:09:58)
Trying to boot from OneNAND
spl: onenand
spl: payload image: *s load addr: 0x4 size: -2146435040
Jumping to U-Boot
loaded - jumping to U-Boot...
U-Boot 2016.11-00211-g7620f06 (Jan 30 2017 - 18:09:58 +0100)
OMAP36XX/37XX-GP ES1.2, CPU-OPP2, L3-200MHz, Max CPU Clock 1 Ghz
GTA04 + LPDDR/OneNAND
I2C: ready
DRAM: 512 MiB
NAND: Muxed OneNAND 512MB 1.8V 16-bit (0x50)
OneNAND version = 0x0232
Chip support all block unlock
Chip has 4KiB pagesize
Scanning device for bad blocks
onenand_bbt_wait: controller error = 0x0400
Bad eraseblock 843 at 0x0d2c0000
OneNAND: 512 MiB
MMC: OMAP SD/MMC: 0
### here happens the power-button detection ###
We might find it in the initialization function table of u-boot
(there is an array of function pointers doing i2c, dram, nand,
mmc, ... in this sequence).
>
>
> What are the opinions about that now? If I understand correctly that
> should be doable more easily on GTA04A5.
Yes.
There are two gpios to handle this. We can try to read the "modem is
active gpio" (twl_gpio 6) and try to make a 200ms impulse on the on-key gpio
(&gpio6 26 = GPIO_186).
We do not have to restrict this to the emergency-power-off situation
but can do it for every u-boot startup. If the modem happens to be
already on, we can try to power it off (and use board-detection to
restrict this to GTA04A5).
BR,
Nikolaus
PS: I hope that we can easily read the twl gpios in U-Boot...
i2c seems to be available at the critical point.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20170201/e43b536c/attachment.asc>
More information about the Letux-kernel
mailing list