Shutdown (Power off) with Android?

What is the next version? Board or source?

The Android 10 source.

1 Like

I built Android 10 from source for pi4c, but 40PIN does not work like power button.
Can you give me some patch to activate this function?

Please refer to the:

&rk_key {
    status = "okay";

    power-key {
		gpios = <&gpio4 26 GPIO_ACTIVE_HIGH>;
		linux,code = <116>;
		label = "power";

1 Like

This commit from Pie does not compile on Android 10.

DTC     arch/arm64/boot/dts/rockchip/rk3399-rockpi-4c.dtb
Error: arch/arm64/boot/dts/rockchip/rk3399-rockpi-4c.dts:938.1-8 Label or path rk_key not found
FATAL ERROR: Syntax error parsing input tree
scripts/Makefile.lib:307: recipe for target 'arch/arm64/boot/dts/rockchip/rk3399-rockpi-4c.dtb' failed
make[1]: *** [arch/arm64/boot/dts/rockchip/rk3399-rockpi-4c.dtb] Error 1
arch/arm64/Makefile:145: recipe for target 'rockchip/rk3399-rockpi-4c.dtb' failed

Could you tell me please, how fix it?

I have committed the changes, please repo Sync.

Please press the 16PIN grounding analog Power key in 40PIN.

1 Like

Thank you!

Do you mean that I need to connect 16PIN to GND PIN on header?

Power button works (16PIN to GND PIN), but if I shutdown Pi4, the power button cannot startup board. We need power button for wakeup board from deepsleep. I mean Pi4 needs to disable usb ports, disable LED flash and go to the ultra low power mode. But board does not enter to deepsleep, usb is disable, Led flash is disable too, but current still about 260mA on 5V. Then I cannot wakeup the board…
How to activate deepsleep mode with ultra low power mode? And how to wakeup board via power button?
It is very important for car usage. The Pi4 cannot be used for a car without this functionality…

What is the power button pad? Pre purchase questions Rock PI4C

Deep sleep requires the use of the Power key on the PMU,

1 Like

Ok, good. But I don’t see it on board.
I see this pads only Shutdown (Power off) with Android?
Could you tell me please where is it on board?

You need to connect the wires from the PMU.

You’re taking the wrong approach to this. You can’t use a power button for controlling power via car signals, because the power button triggers a state TOGGLE between wake and sleep. Your car’s signals, on the other hand, will be ON when the car is on, and OFF when the car is off. This doesn’t convert into triggering of a toggle.

And further to complicate matters, assuming that you did set up a circuit to use the state transitions to trigger a button press, you will also have to deal with the eventual loss of synchronization. I.e., when the toggle causes it to go to sleep when you want it to wake up, and to wake up when you want it to go to sleep.

Instead of this sillyness with the power button, what you want to do is to use the ACC line to control a GPIO pin. For instance, an NFET like a 2n7000 with connections as ACC-Gate, GND-Source, and GPIO-Sink. Then you set the GPIO pin to input-pull-up, active low.

So what that will do, is, when the ACC line is on, it will activate the 2n7000 and pull the GPIO low (active), and when the ACC line is off, it will deactivate the 2n7000 and the GPIO will pull back up (inactive).

Then you just need to inform your vehicle HAL to monitor that GPIO to determine whether it should be on or off.

I build android carPC for 7 years. I developed intelligent power supply (ITPS), it control all systems and android board. Many peoples of the world use my ROMs and ITPS. They want new ROMs and boards again and again. I want to show them Pi4c, but I need power button.
You can check out the features of my systems in my blog

1 Like