Hi Graham,
I have taken some looks into the celinux 2.4 kernel sources and I
found something in drivers/char/minipc-misc.c that may be related to
power management of the Minibook.
This appears to be a /proc driver module for handling powerdown (and
polling the power button + battery status). During initialization it
links itself into the _machine_power_off hooks. If one does shutdown -
h or echo "powerdown" >/proc/powerdown it triggers a pic_shutdown()
which finally calls the jz_halt().
It looks as if there is some additional PIC chip (called MCU) for
power management which needs an indvidual driver... But there is both
code for I2C accessing a PIC and simply through a GPIO 65. So I
suspect there are two hardware variants and things are controlled by
CONFIG_MINIPC_PIC16X54.
BR,
Nikolaus
Am 08.05.2010 um 01:08 schrieb Graham Gower:
On 8 May 2010 06:30, Dr. H. Nikolaus Schaller <h...@computer.org>
wrote:
Does anyone have an idea (from a 2.4 kernel?) how we can command
the power
management chip to turn off power for the CPU and LCM? Does this go
through
a GPIO?
As you have surmised: watchdog for reset, gpio for power off.
I suggest you write a simple sysctl/proc hook that can be used to
whack specific gpio pins.
e.g.
echo "64" > /proc/gpio_high
would cause pin 64 to become an output logic high.
echo "64" > /proc/gpio_low
would cause pin 64 to become an output logic low.
Then you could write a script to loop through all the gpio, trying
them in turn to find out when the board powers off.
for i in `seq 1 120`; do
echo "trying $i high" > /home/foo/halt_attempt
echo $i > /proc/gpio_high
done
for i in `seq 1 120`; do
echo "trying $i low" > /home/foo/halt_attempt
echo $i > /proc/gpio_low
done
Its likely all sorts of peripherals will be disabled when you do this,
but it shouldn't cause any harm. I wouldn't make a habit of doing this
on random devices though, as its not beyond the realms of possibility
that a gpio is hooked to something dumb.
-Graham
_______________________________________________
Mipsbook-devel mailing list
Mipsbook-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/mipsbook-devel