paulv
Posts: 558
Joined: Tue Jan 15, 2013 12:10 pm
Location: Netherlands

Re: Overlay for on/off push-button controller.

Thu Jul 02, 2015 1:38 pm

Hi Phil,

Thanks for the explanation, that makes sense to me now.

The gpio-poweroff feature is very welcome, as long as you know what it really does.
If the active-high mode of the gpio-poweroff is used, there should be no problem with the start-up timing issue.

However, if you need to drive an active-low device, it is probably more straightforward (avoiding conceptual misunderstandings) to not use the active-low option for the gpio-poweroff module, but use a MOSFET inverter like so:
Kill Signal.png
Kill Signal.png (8.81 KiB) Viewed 4424 times
If VCC is 5V or higher, a BS170 MOSFET can be used instead.

paulv
Posts: 558
Joined: Tue Jan 15, 2013 12:10 pm
Location: Netherlands

Re: Overlay for on/off push-button controller.

Tue Aug 11, 2015 10:46 am

I really like the idea of using a chip to create a start-stop button with shutdown and power-off features, so I ordered some chips.

I built a prototype, and was pleased to find that you don't even need Device Tree features to make it work, although that can be used to add more functionality.
Here is the post that I created: viewtopic.php?f=41&t=117863&p=800623#p800623

Great find SparkyPi!

Enjoy!

sparkyPi
Posts: 33
Joined: Thu May 21, 2015 8:51 pm

Re: Overlay for on/off push-button controller.

Sun Aug 16, 2015 7:35 pm

PhilE wrote:That's a good question. The answer is that the "Device Tree" processing is in three parts.

1) dt-blob.bin (either the external file or the default one compiled into the start*.elf binaries) is read by the firmware to allow it to set up the initial pin configuration (and perhaps a few clocks as well). Note that although this has the syntax of a DT file and is compiled using dtc, it isn't really Device Tree as most people would know it (hence the scare quotes above).

2) After loading the kernel, the firmware loads the base .dtb file (e.g. bcm2709-rpi-2-b.dtb) and applies any parameters and overlays, then starts the ARM running to boot the kernel, passing in the combined DT blob.

3) A few seconds into booting, the kernel reads the DT blob, creating platform devices and applying pinctrl settings. This is when the gpio-poweroff settings take effect.

I found (theoretically - I don't have an external switch) that using an active-high KILL signal masked this delay, and would probably eliminate the problem of a restart accidentally powering-off the Pi, but I think you found otherwise.
Thanks for this post, PhilE --- lots of good info to better understand "Device Tree" process at boot.

Just thought I would contribute a little update having tested the gpio-poweroff overlay and on/off controller chip the past couple of months.

I am using the LTC2951 on/off controller with active low /KILL signal, and in my original setup I had it connected to GPIO 26, which had a default pull-low (according to ARM peripherals document, table 6-31). So, I needed an external weak pull-up on that pin to prevent the power being cut during start-up.

This solution worked well and boot (using on/off controller to turn on the system), reboot (from command line) and shutdown (either command line or on/off controller button) all worked correctly; gpio-poweroff did the job for me! :D

In an update to my hardware design I initially played with the idea of inverting the GPIO 26 signal before input to /KILL, so that the power cut signal would be active-high from the Broadcom chip and the pull-up could be avoided. But, there was nothing to gain (no benefit or simplicity) from the approach. In the end I switched /KILL to use one of the GPIO pins that defaults to pull-up (e.g. GPIO 4), and removed the external pull-up resistor. In my /boot/config.txt I have:

Code: Select all

dtoverlay=gpio-poweroff,gpiopin=4,active_low="y"
The ability to specify the gpio pin and active low makes the implementation super flexible --- thanks for the foresight to add those parameters to the overlay! Thanks a lot!

sparkyPi

sparkyPi
Posts: 33
Joined: Thu May 21, 2015 8:51 pm

Re: Overlay for on/off push-button controller.

Sun Aug 16, 2015 8:10 pm

paulv wrote: The gpio-poweroff feature is very welcome, as long as you know what it really does.
If the active-high mode of the gpio-poweroff is used, there should be no problem with the start-up timing issue.

However, if you need to drive an active-low device, it is probably more straightforward (avoiding conceptual misunderstandings) to not use the active-low option for the gpio-poweroff module, but use a MOSFET inverter like so:
Kill Signal.png
If VCC is 5V or higher, a BS170 MOSFET can be used instead.
I have not used the active-high configuration (because I don't have any such on/off controller chips), but I think regardless of the setup one chooses (active-high (KILL) or active-low (/KILL)), I think an awareness of the default pull-up and pull-down (BCM2835 ARM Peripherals, Table 6.31) state of the Broadcom chip is the most important aspect. With that knowledge just select a GPIO for the power cut signal which has a default pull opposite that of your on/off controller -- I believe that would eliminate any start-up timing issues.

I use LTC2951 as the controller with active-low /KILL signal, and because of my original choice of GPIO (GPIO 26) for this signal, I need an external weak pull-up to keep /KILL high during boot (until the gpio-poweroff overlay was loaded). I found the external pull-up can be avoided with choice of GPIO that defaults to pull-high (e.g. GPIO 4, which I am now using).

I don't see the benefit of the MOSFET inverter circuit -- it is more components. Is there some advantage of this approach? I don't follow that it's more straightforward.

As the gpio-poweroff overlay allows to select active-low or active-high signaling, the right behavior for a specific on/off controller can be selected as simple paramter to the dtoverlay=gpio-poweroff line in /boot/config.txt

sparkyPi

sparkyPi
Posts: 33
Joined: Thu May 21, 2015 8:51 pm

Re: Overlay for on/off push-button controller.

Fri Oct 09, 2015 1:24 am

Just wanted to post an update of complete schematics showing how I am using the LTC2951-1 on/off controller; using its /INT output (input to Raspberry Pi to initiate the shutdown process) and /KILL input (the "power off" signal from Raspberry Pi implemented by the gpio-poweroff Device Tree overlay).

The schematics indicate push-button SW1 (the "on/off button") connected to LTC2951 whose EN output is used to enable/disable a 5V switcher and two LDOs (1.8V and 3.3V). The 5V power at TP26 powers the Raspberry Pi though pins 2 and 4 of the 40-way GPIO header (according to the recommended design for back powering the Raspberry Pi).
OnOffController.png
OnOffController.png (28.96 KiB) Viewed 4082 times
5VSwitcher.png
5VSwitcher.png (62.09 KiB) Viewed 4082 times
LDOReg.png
LDOReg.png (38.37 KiB) Viewed 4082 times
Other than configuring the gpio-poweroff controller to use GPIO4 (as I've described in earlier posts) nothing further is needed in software. For hardware, no signal inversion or pull-ups are required when using a GPIO that defaults to pull-high (as GPIO4 does).

I've been using this design for several months without any problems to boot or shutdown using the on/off push-button, and initiating a reboot from terminal works as normal.

grp62
Posts: 32
Joined: Fri May 23, 2014 7:41 am
Location: Lyon, FR

Re: Overlay for on/off push-button controller.

Wed Nov 18, 2015 10:42 am

Hi all,
I tried to use the gpio-poweroff-overlay (active low) on my custom board.
The board boots and shutdown quickly.
Just for info i only added the code below in my the device-tree.
power_ctrl: power_ctrl {
compatible = "gpio-poweroff";
gpios = <&gpio 26 0>;
force;
};
The gpio assigned to KILL is well configured in my dt-blob.
If i prevent the gpio26 to be configured as an output in the gpio-poweroff.c driver, the system works fine.
I suspect a glitch due to gpiod_direction_output() call
A workaround could be to test the force flag and if set prevent the gpiod_direction_output() call ( as this gpio already configured in dt-blob)
Greg

hollol
Posts: 8
Joined: Sun Feb 28, 2016 8:31 am

Re: Overlay for on/off push-button controller.

Sun Feb 28, 2016 8:42 am

Hello,
tried to use the gpio-poweroff overlay with "active high" on my RPI2B running Openelec 6.0.1. Unfortunately, there isn't any change of the used gpio pin when Pi goes down. I checked with several pins in the config.txt.
How can I actually check, if the overlay is loaded correctly and where the problem is actually coming from?

Thanks for this nice feature and you assistance.

Lars

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2279
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Overlay for on/off push-button controller.

Sun Feb 28, 2016 3:33 pm

"raspi-gpio get" will show that the pin (the default is 26) is set to an output. Be careful with pin numbers - the kernel uses the Broadcom GPIO numbering, not the number of the pin on the 40-pin header. So pin 26 is actually GPIO 26 which is on header pin 37.

hollol
Posts: 8
Joined: Sun Feb 28, 2016 8:31 am

Re: Overlay for on/off push-button controller.

Mon Feb 29, 2016 10:13 am

PhilE wrote:"raspi-gpio get" will show that the pin (the default is 26) is set to an output. Be careful with pin numbers - the kernel uses the Broadcom GPIO numbering, not the number of the pin on the 40-pin header. So pin 26 is actually GPIO 26 which is on header pin 37.
Unfortunately, Openelc distribution does not offer raspi-gpio if I am not wrong. Is there any other way or a binary of raspi-gpio around? It is really hard to figure out, why it is actually not working.
Thanks for the tip with the GPIO numbers. I actually started testing with the default one, so GPIO26 which is pin header 37.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2279
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Overlay for on/off push-button controller.

Mon Feb 29, 2016 10:18 am

Here - have a birthday present from Raspberry Pi - raspi-gpio.

If you copy it into the boot partition you can run it from /flash/raspi-gpio.

hollol
Posts: 8
Joined: Sun Feb 28, 2016 8:31 am

Re: Overlay for on/off push-button controller.

Mon Feb 29, 2016 7:37 pm

PhilE wrote:Here - have a birthday present from Raspberry Pi - raspi-gpio.

If you copy it into the boot partition you can run it from /flash/raspi-gpio.
Thanks very much for that present.

I have the following line in my config.txt:

Code: Select all

dtoverlay=gpio-poweroff
Now I checked my GPIOs with the tool. And this is the output:

Code: Select all

BANK0 (GPIO 0 to 27):
  GPIO 00: level=1 fsel=0 alt=  func=INPUT
  GPIO 01: level=1 fsel=0 alt=  func=INPUT
  GPIO 02: level=1 fsel=0 alt=  func=INPUT
  GPIO 03: level=1 fsel=0 alt=  func=INPUT
  GPIO 04: level=1 fsel=0 alt=  func=INPUT
  GPIO 05: level=1 fsel=0 alt=  func=INPUT
  GPIO 06: level=1 fsel=0 alt=  func=INPUT
  GPIO 07: level=1 fsel=0 alt=  func=INPUT
  GPIO 08: level=1 fsel=0 alt=  func=INPUT
  GPIO 09: level=0 fsel=0 alt=  func=INPUT
  GPIO 10: level=0 fsel=0 alt=  func=INPUT
  GPIO 11: level=0 fsel=0 alt=  func=INPUT
  GPIO 12: level=0 fsel=0 alt=  func=INPUT
  GPIO 13: level=0 fsel=0 alt=  func=INPUT
  GPIO 14: level=1 fsel=4 alt=0 func=TXD0
  GPIO 15: level=1 fsel=4 alt=0 func=RXD0
  GPIO 16: level=0 fsel=0 alt=  func=INPUT
  GPIO 17: level=0 fsel=0 alt=  func=INPUT
  GPIO 18: level=0 fsel=0 alt=  func=INPUT
  GPIO 19: level=0 fsel=0 alt=  func=INPUT
  GPIO 20: level=0 fsel=0 alt=  func=INPUT
  GPIO 21: level=0 fsel=0 alt=  func=INPUT
  GPIO 22: level=0 fsel=0 alt=  func=INPUT
  GPIO 23: level=0 fsel=0 alt=  func=INPUT
  GPIO 24: level=0 fsel=0 alt=  func=INPUT
  GPIO 25: level=0 fsel=0 alt=  func=INPUT
  GPIO 26: level=0 fsel=0 alt=  func=INPUT
  GPIO 27: level=0 fsel=0 alt=  func=INPUT
BANK1 (GPIO 28 to 45):
  GPIO 28: level=1 fsel=0 alt=  func=INPUT
  GPIO 29: level=1 fsel=0 alt=  func=INPUT
  GPIO 30: level=0 fsel=0 alt=  func=INPUT
  GPIO 31: level=1 fsel=1 alt=  func=OUTPUT
  GPIO 32: level=0 fsel=1 alt=  func=OUTPUT
  GPIO 33: level=0 fsel=0 alt=  func=INPUT
  GPIO 34: level=1 fsel=0 alt=  func=INPUT
  GPIO 35: level=0 fsel=1 alt=  func=OUTPUT
  GPIO 36: level=1 fsel=0 alt=  func=INPUT
  GPIO 37: level=0 fsel=0 alt=  func=INPUT
  GPIO 38: level=0 fsel=1 alt=  func=OUTPUT
  GPIO 39: level=0 fsel=0 alt=  func=INPUT
  GPIO 40: level=0 fsel=4 alt=0 func=PWM0
  GPIO 41: level=0 fsel=1 alt=  func=OUTPUT
  GPIO 42: level=1 fsel=0 alt=  func=INPUT
  GPIO 43: level=1 fsel=0 alt=  func=INPUT
  GPIO 44: level=0 fsel=4 alt=0 func=GPCLK1
  GPIO 45: level=0 fsel=4 alt=0 func=PWM1
BANK2 (GPIO 46 to 53):
  GPIO 46: level=0 fsel=0 alt=  func=INPUT
  GPIO 47: level=0 fsel=1 alt=  func=OUTPUT
  GPIO 48: level=0 fsel=7 alt=3 func=SD1_CLK
  GPIO 49: level=1 fsel=7 alt=3 func=SD1_CMD
  GPIO 50: level=1 fsel=7 alt=3 func=SD1_DAT0
  GPIO 51: level=1 fsel=7 alt=3 func=SD1_DAT1
  GPIO 52: level=1 fsel=7 alt=3 func=SD1_DAT2
  GPIO 53: level=1 fsel=7 alt=3 func=SD1_DAT3
So actually GPIO26 shows up as input and not as output. So something with the overlay is not working (at least in Openelec 6.0.1). I guess the firmware/kernel within openelec should be recent enough, or am I wrong?

Thanks for your help.

ps. I actually also asked this question in the Openelec forum, but it seems nobody beside me is using this functionality within Openelec.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2279
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Overlay for on/off push-button controller.

Mon Feb 29, 2016 8:35 pm

Run this after a reboot:

Code: Select all

sudo vcdbg log msg |& grep -v -E "(HDMI|gpioman)"
and let me know what it says. It may be that the overlay is absent.

hollol
Posts: 8
Joined: Sun Feb 28, 2016 8:31 am

Re: Overlay for on/off push-button controller.

Tue Mar 01, 2016 7:29 pm

PhilE wrote:Run this after a reboot:

Code: Select all

sudo vcdbg log msg |& grep -v -E "(HDMI|gpioman)"
and let me know what it says. It may be that the overlay is absent.
This gives me an unknown syntax error. Nonetheless, here is the full output of "vcdbg log msg":

Code: Select all

OpenELEC:~ # vcdbg log msg
000961.822: clock: clock_set_clock:  dst: CLK_H264, source: XOSC, div: 0.000000
000961.858: clock: clock_set_clock:  dst: CLK_ISP, source: XOSC, div: 0.000000
000961.896: clock: clock_set_clock:  dst: CLK_H264, source: XOSC, div: 0.000000
000961.931: clock: clock_set_clock:  dst: CLK_ISP, source: XOSC, div: 0.000000
000961.971: clock: clock_set_clock:  dst: CLK_VEC, source: XOSC, div: 1.000000
000962.003: clock: clock_set_clock:  dst: CLK_VEC, source: XOSC, div: 0.000000
000974.045: HDMI:EDID version 1.3, 1 extensions, screen size 16x9 cm
000974.111: HDMI:EDID features - videodef 0x80 !standby !suspend !active off; colour encoding:RGB444|YCbCr422; sRGB is not default colourspace; preferred format is native; does not support GTF
000974.168: HDMI:EDID found preferred CEA detail timing format: 1920x1080p @ 60 Hz (16)
000974.234: HDMI:EDID found DMT detail timing format: 1360x768p @ 60 Hz (39)
000974.275: HDMI:EDID found DMT format: code 4, 640x480p @ 60 Hz in established timing I/II
000974.313: HDMI:EDID found DMT format: code 5, 640x480p @ 72 Hz in established timing I/II
000974.349: HDMI:EDID found DMT format: code 6, 640x480p @ 75 Hz in established timing I/II
000974.387: HDMI:EDID found DMT format: code 9, 800x600p @ 60 Hz in established timing I/II
000974.424: HDMI:EDID found DMT format: code 10, 800x600p @ 72 Hz in established timing I/II
000974.463: HDMI:EDID found DMT format: code 11, 800x600p @ 75 Hz in established timing I/II
000974.502: HDMI:EDID found DMT format: code 16, 1024x768p @ 60 Hz in established timing I/II
000974.541: HDMI:EDID found DMT format: code 17, 1024x768p @ 70 Hz in established timing I/II
000974.578: HDMI:EDID found DMT format: code 18, 1024x768p @ 75 Hz in established timing I/II
000974.620: HDMI:EDID found DMT format: code 36, 1280x1024p @ 75 Hz in established timing I/II
000974.703: HDMI:EDID standard timings block x 8: 0x714F 8100 8140 8180 9500 950F B300 A940 
000974.752: HDMI:EDID found DMT format: code 21, 1152x864p @ 75 Hz (4:3) in standard timing 0
000974.801: HDMI:EDID found DMT format: code 28, 1280x800p @ 60 Hz (16:10) in standard timing 1
000974.851: HDMI:EDID found DMT format: code 32, 1280x960p @ 60 Hz (4:3) in standard timing 2
000974.900: HDMI:EDID found DMT format: code 35, 1280x1024p @ 60 Hz (5:4) in standard timing 3
000974.952: HDMI:EDID found DMT format: code 47, 1440x900p @ 60 Hz (16:10) in standard timing 4
000975.004: HDMI:EDID found DMT format: code 48, 1440x900p @ 75 Hz (16:10) in standard timing 5
000975.055: HDMI:EDID found DMT format: code 58, 1680x1050p @ 60 Hz (16:10) in standard timing 6
000975.106: HDMI:EDID found DMT format: code 51, 1600x1200p @ 60 Hz (4:3) in standard timing 7
000988.113: HDMI:EDID parsing v3 CEA extension 0
000988.152: HDMI:EDID monitor support - underscan IT formats:yes, basic audio:yes, yuv444:yes, yuv422:yes, #native DTD:1
000988.194: HDMI:EDID found CEA detail timing format: 1280x720p @ 60 Hz (4)
000988.239: HDMI:EDID found CEA detail timing format: 1280x720p @ 50 Hz (19)
000988.279: HDMI:EDID found CEA detail timing format: 1920x1080i @ 60 Hz (5)
000988.321: HDMI:EDID found CEA detail timing format: 1920x1080i @ 50 Hz (20)
000988.356: HDMI:EDID found CEA format: code 16, 1920x1080p @ 60Hz (native)
000988.391: HDMI:EDID found CEA format: code 31, 1920x1080p @ 50Hz 
000988.423: HDMI:EDID found CEA format: code 4, 1280x720p @ 60Hz 
000988.457: HDMI:EDID found CEA format: code 19, 1280x720p @ 50Hz 
000988.488: HDMI:EDID found CEA format: code 5, 1920x1080i @ 60Hz 
000988.522: HDMI:EDID found CEA format: code 20, 1920x1080i @ 50Hz 
000988.553: HDMI:EDID found CEA format: code 3, 720x480p @ 60Hz 
000988.587: HDMI:EDID found CEA format: code 18, 720x576p @ 50Hz 
000988.621: HDMI:EDID found CEA format: code 32, 1920x1080p @ 24Hz 
000988.653: HDMI:EDID found CEA format: code 33, 1920x1080p @ 25Hz 
000988.687: HDMI:EDID found CEA format: code 34, 1920x1080p @ 30Hz 
000988.740: HDMI:EDID found audio format 2 channels PCM, sample rate: 32|44|48 kHz, sample size: 16|20|24 bits
000988.760: HDMI:EDID found Video Capability DB length 2
000988.787: HDMI:EDID video capability: CE:3 IT:3 PT:0 QS:0
000988.813: HDMI:EDID extended data block tag 0x05 length 3 not supported
000988.830: HDMI:EDID found HDMI VSDB length 7
000988.857: HDMI:EDID HDMI VSDB has physical address 4.0.0.0
000988.878: HDMI:EDID HDMI VSDB supports AI:yes, dual link DVI:no
000988.910: HDMI:EDID HDMI VSDB deep colour support - 48-bit:no 36-bit:yes 30-bit:yes DC_yuv444:yes
000988.929: HDMI:EDID HDMI VSDB max TMDS clock 225 MHz
000988.946: HDMI:EDID HDMI VSDB has no latency information
000988.988: HDMI:EDID filtering formats with pixel clock > 162 MHz or h. blanking > 1023
000989.234: HDMI:EDID preferred mode remained as CEA (16) 1920x1080p @ 60 Hz with pixel clock 148 MHz
000989.291: clock: clock_set_clock:  dst: CLK_VEC, source: XOSC, div: 1.000000
000989.323: clock: clock_set_clock:  dst: CLK_VEC, source: XOSC, div: 0.000000
000996.469: HDMI:Setting property pixel encoding to Default
000996.487: HDMI:Setting property pixel clock type to PAL
000996.508: HDMI:Setting property content type flag to No data
000996.526: HDMI:Setting property fuzzy format match to enabled
001012.590: clock: clock_set_clock:  dst: CLK_GP1, source: PLLD_PER, div: 20.000000
001012.621: gpioman: gpioman_get_pin_num: pin LEDS_RUNNING not defined
001012.646: gpioman: gpioman_get_pin_num: pin LEDS_NAND_ACTIVITY not defined
001012.666: gpioman: gpioman_get_pin_num: pin LEDS_USB_ACTIVITY not defined
001012.686: gpioman: gpioman_get_pin_num: pin LEDS_FATAL_ERROR not defined
001012.709: gpioman: gpioman_get_pin_num: pin LEDS_APP_OK not defined
001012.731: gpioman: gpioman_get_pin_num: pin LEDS_APP_FAILED not defined
001012.752: gpioman: gpioman_get_pin_num: pin LEDS_HDCP_AUTH not defined
001012.774: gpioman: gpioman_get_pin_num: pin LEDS_HDCP_UNAUTH not defined
001012.796: gpioman: gpioman_get_pin_num: pin LEDS_HDMI_ON not defined
001012.818: gpioman: gpioman_get_pin_num: pin LEDS_DVI_ON not defined
001012.840: gpioman: gpioman_get_pin_num: pin LEDS_HDMI_HPD_UP not defined
001012.861: gpioman: gpioman_get_pin_num: pin LEDS_REMOTE_CONTROL not defined
001012.882: gpioman: gpioman_get_pin_num: pin LEDS_ARM_CONTROLLED not defined
001174.980: clock: Set PLLB_VCO to 640000000
001175.090: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000
001175.125: clock: clock_set_clock:  dst: CLK_ARM, source: XOSC, div: 0.000000
001175.161: clock: clock_set_clock:  dst: CLK_ARM, source: XOSC, div: 1.000000
001175.193: clock: clock_set_clock:  dst: CLK_ARM, source: XOSC, div: 0.000000
001175.218: clock: Set PLLB_VCO to 640000000
001175.327: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000
001175.356: clock: Set PLLB_VCO to 1200000000
001175.428: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000
001195.854: clock: clock_set_clock:  dst: CLK_ARM, source: XOSC, div: 0.000000
001203.118: hdmi: HDMI:>>>>>>>>>>>>>Rx sensed, reading EDID<<<<<<<<<<<<<
001203.182: clock: clock_set_clock:  dst: CLK_H264, source: XOSC, div: 0.000000
001203.220: clock: clock_set_clock:  dst: CLK_ISP, source: XOSC, div: 0.000000
001203.257: clock: clock_set_clock:  dst: CLK_H264, source: XOSC, div: 0.000000
001203.290: clock: clock_set_clock:  dst: CLK_ISP, source: XOSC, div: 0.000000
001203.332: clock: clock_set_clock:  dst: CLK_VEC, source: XOSC, div: 1.000000
001203.365: clock: clock_set_clock:  dst: CLK_VEC, source: XOSC, div: 0.000000
001215.415: hdmi: HDMI:EDID version 1.3, 1 extensions, screen size 16x9 cm
001215.486: hdmi: HDMI:EDID features - videodef 0x80 !standby !suspend !active off; colour encoding:RGB444|YCbCr422; sRGB is not default colourspace; preferred format is native; does not support GTF
001215.549: hdmi: HDMI:EDID found preferred CEA detail timing format: 1920x1080p @ 60 Hz (16)
001215.621: hdmi: HDMI:EDID found DMT detail timing format: 1360x768p @ 60 Hz (39)
001215.665: hdmi: HDMI:EDID found DMT format: code 4, 640x480p @ 60 Hz in established timing I/II
001215.705: hdmi: HDMI:EDID found DMT format: code 5, 640x480p @ 72 Hz in established timing I/II
001215.747: hdmi: HDMI:EDID found DMT format: code 6, 640x480p @ 75 Hz in established timing I/II
001215.788: hdmi: HDMI:EDID found DMT format: code 9, 800x600p @ 60 Hz in established timing I/II
001215.830: hdmi: HDMI:EDID found DMT format: code 10, 800x600p @ 72 Hz in established timing I/II
001215.869: hdmi: HDMI:EDID found DMT format: code 11, 800x600p @ 75 Hz in established timing I/II
001215.911: hdmi: HDMI:EDID found DMT format: code 16, 1024x768p @ 60 Hz in established timing I/II
001215.951: hdmi: HDMI:EDID found DMT format: code 17, 1024x768p @ 70 Hz in established timing I/II
001215.994: hdmi: HDMI:EDID found DMT format: code 18, 1024x768p @ 75 Hz in established timing I/II
001216.038: hdmi: HDMI:EDID found DMT format: code 36, 1280x1024p @ 75 Hz in established timing I/II
001216.127: hdmi: HDMI:EDID standard timings block x 8: 0x714F 8100 8140 8180 9500 950F B300 A940 
001216.181: hdmi: HDMI:EDID found DMT format: code 21, 1152x864p @ 75 Hz (4:3) in standard timing 0
001216.236: hdmi: HDMI:EDID found DMT format: code 28, 1280x800p @ 60 Hz (16:10) in standard timing 1
001216.288: hdmi: HDMI:EDID found DMT format: code 32, 1280x960p @ 60 Hz (4:3) in standard timing 2
001216.343: hdmi: HDMI:EDID found DMT format: code 35, 1280x1024p @ 60 Hz (5:4) in standard timing 3
001216.397: hdmi: HDMI:EDID found DMT format: code 47, 1440x900p @ 60 Hz (16:10) in standard timing 4
001216.452: hdmi: HDMI:EDID found DMT format: code 48, 1440x900p @ 75 Hz (16:10) in standard timing 5
001216.509: hdmi: HDMI:EDID found DMT format: code 58, 1680x1050p @ 60 Hz (16:10) in standard timing 6
001216.562: hdmi: HDMI:EDID found DMT format: code 51, 1600x1200p @ 60 Hz (4:3) in standard timing 7
001229.571: hdmi: HDMI:EDID parsing v3 CEA extension 0
001229.612: hdmi: HDMI:EDID monitor support - underscan IT formats:yes, basic audio:yes, yuv444:yes, yuv422:yes, #native DTD:1
001229.656: hdmi: HDMI:EDID found CEA detail timing format: 1280x720p @ 60 Hz (4)
001229.703: hdmi: HDMI:EDID found CEA detail timing format: 1280x720p @ 50 Hz (19)
001229.749: hdmi: HDMI:EDID found CEA detail timing format: 1920x1080i @ 60 Hz (5)
001229.808: hdmi: HDMI:EDID found CEA detail timing format: 1920x1080i @ 50 Hz (20)
001229.849: hdmi: HDMI:EDID found CEA format: code 16, 1920x1080p @ 60Hz (native)
001229.886: hdmi: HDMI:EDID found CEA format: code 31, 1920x1080p @ 50Hz 
001229.923: hdmi: HDMI:EDID found CEA format: code 4, 1280x720p @ 60Hz 
001229.957: hdmi: HDMI:EDID found CEA format: code 19, 1280x720p @ 50Hz 
001229.994: hdmi: HDMI:EDID found CEA format: code 5, 1920x1080i @ 60Hz 
001230.032: hdmi: HDMI:EDID found CEA format: code 20, 1920x1080i @ 50Hz 
001230.068: hdmi: HDMI:EDID found CEA format: code 3, 720x480p @ 60Hz 
001230.102: hdmi: HDMI:EDID found CEA format: code 18, 720x576p @ 50Hz 
001230.139: hdmi: HDMI:EDID found CEA format: code 32, 1920x1080p @ 24Hz 
001230.176: hdmi: HDMI:EDID found CEA format: code 33, 1920x1080p @ 25Hz 
001230.213: hdmi: HDMI:EDID found CEA format: code 34, 1920x1080p @ 30Hz 
001230.270: hdmi: HDMI:EDID found audio format 2 channels PCM, sample rate: 32|44|48 kHz, sample size: 16|20|24 bits
001230.290: hdmi: HDMI:EDID found Video Capability DB length 2
001230.319: hdmi: HDMI:EDID video capability: CE:3 IT:3 PT:0 QS:0
001230.348: hdmi: HDMI:EDID extended data block tag 0x05 length 3 not supported
001230.370: hdmi: HDMI:EDID found HDMI VSDB length 7
001230.399: hdmi: HDMI:EDID HDMI VSDB has physical address 4.0.0.0
001230.423: hdmi: HDMI:EDID HDMI VSDB supports AI:yes, dual link DVI:no
001230.456: hdmi: HDMI:EDID HDMI VSDB deep colour support - 48-bit:no 36-bit:yes 30-bit:yes DC_yuv444:yes
001230.480: hdmi: HDMI:EDID HDMI VSDB max TMDS clock 225 MHz
001230.498: hdmi: HDMI:EDID HDMI VSDB has no latency information
001230.542: hdmi: HDMI:EDID filtering formats with pixel clock > 162 MHz or h. blanking > 1023
001230.790: hdmi: HDMI:EDID preferred mode remained as CEA (16) 1920x1080p @ 60 Hz with pixel clock 148 MHz
001230.812: hdmi: HDMI: hotplug attached with HDMI support
001230.865: clock: clock_set_clock:  dst: CLK_VEC, source: XOSC, div: 1.000000
001230.898: clock: clock_set_clock:  dst: CLK_VEC, source: XOSC, div: 0.000000
001230.936: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
001230.995: clock: clock_set_clock:  dst: CLK_H264, source: XOSC, div: 0.000000
001231.031: clock: clock_set_clock:  dst: CLK_ISP, source: XOSC, div: 0.000000
001231.069: clock: clock_set_clock:  dst: CLK_H264, source: XOSC, div: 0.000000
001231.104: clock: clock_set_clock:  dst: CLK_ISP, source: XOSC, div: 0.000000
001231.144: clock: clock_set_clock:  dst: CLK_VEC, source: XOSC, div: 1.000000
001231.174: clock: clock_set_clock:  dst: CLK_VEC, source: XOSC, div: 0.000000
001231.377: clock: clock_set_clock:  dst: CLK_HSM, source: PLLD_PER, div: 5.000000
001232.416: clock: Set PLLH_VCO to 1008000000
001233.607: hdmi: HDMI: power_on to CEA mode 1080p60
001234.671: clock: clock_set_clock:  dst: CLK_HSM, source: PLLD_PER, div: 3.054687
001235.709: clock: Set PLLH_VCO to 1485000000
001236.829: hdmi: HDMI: Action callback added to queue to happen at frame 2
001236.851: hdmi: HDMI: Action stop_3d_mode added to queue to happen at frame 2
001236.874: hdmi: HDMI: Action unmute added to queue to happen at frame 3
001286.879: clock: clock_set_clock:  dst: CLK_TSENS, source: XOSC, div: 9.600000
001286.949: *** Restart logging
001288.730: Read command line from file 'cmdline.txt'
boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 quiet
001288.904: clock: clock_set_clock:  dst: CLK_UART, source: PLLD_PER, div: 166.666700
001293.287: Can't find 'kernel7.img' on boot device - rc 2
001293.348: Loading 'kernel.img' from SD card
001606.457: Kernel trailer DTOK property says yes
001606.594: Loading 'bcm2709-rpi-2-b.dtb' from SD card
001662.604: dtparam: pwr_led_gpio=35
001668.590: dtparam: uart0_clkrate=3000000
001681.510: dtparam: act_led_trigger=none
001688.207: dtparam: act_led_activelow=off
001694.206: dtparam: pwr_led_trigger=none
001700.967: dtparam: pwr_led_activelow=off
001719.306: Loaded overlay 'gpio-poweroff'
001788.521: dtparam: arm_freq=900000000
001817.886: dtparam: cache_line_size=64
001834.890: clock: Set PLLB_VCO to 1800000000
001834.995: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000
001835.075: clock: clock_set_clock:  dst: CLK_VPU, source: PLLC_CORE0, div: 4.000000
001835.138: clock: clock_set_clock:  dst: CLK_EMMC, source: PLLC_PER, div: 4.000000
001835.209: clock: Set PLLA_VCO to 2000000000
001835.312: clock: clock_set_clock:  dst: CLK_V3D, source: PLLA_CORE, div: 4.000000
001835.375: clock: clock_set_clock:  dst: CLK_H264, source: PLLA_CORE, div: 4.000000
001835.435: clock: clock_set_clock:  dst: CLK_ISP, source: PLLA_CORE, div: 4.000000
001836.367: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
001836.459: clock: Set PLLB_VCO to 640000000
001836.533: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000
001836.563: clock: Set PLLB_VCO to 1800000000
001836.637: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000
001836.673: clock: clock_set_clock:  dst: CLK_ARM, source: XOSC, div: 1.000000
001836.707: clock: clock_set_clock:  dst: CLK_ARM, source: XOSC, div: 0.000000
001836.744: clock: Set PLLB_VCO to 1800000000
001836.851: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000
003173.375: vchiq_core: vchiq_init_state: slot_zero = 0xee880000, is_master = 1
003176.994: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
003180.815: gpioman: gpioman_get_pin_num: pin LEDS_RUNNING not defined
003180.841: gpioman: gpioman_get_pin_num: pin LEDS_NAND_ACTIVITY not defined
003180.864: gpioman: gpioman_get_pin_num: pin LEDS_USB_ACTIVITY not defined
003180.887: gpioman: gpioman_get_pin_num: pin LEDS_FATAL_ERROR not defined
003180.906: gpioman: gpioman_get_pin_num: pin LEDS_APP_OK not defined
003180.927: gpioman: gpioman_get_pin_num: pin LEDS_APP_FAILED not defined
003180.950: gpioman: gpioman_get_pin_num: pin LEDS_HDCP_AUTH not defined
003180.970: gpioman: gpioman_get_pin_num: pin LEDS_HDCP_UNAUTH not defined
003180.990: gpioman: gpioman_get_pin_num: pin LEDS_HDMI_ON not defined
003181.011: gpioman: gpioman_get_pin_num: pin LEDS_DVI_ON not defined
003181.031: gpioman: gpioman_get_pin_num: pin LEDS_HDMI_HPD_UP not defined
003181.055: gpioman: gpioman_get_pin_num: pin LEDS_REMOTE_CONTROL not defined
003181.078: gpioman: gpioman_get_pin_num: pin LEDS_ARM_CONTROLLED not defined
003181.459: TV service:host side not connected, dropping notification 0x00000002, 0x00000001, 0x00000010
008468.065: clock: Set PLLB_VCO to 1200000000
008468.144: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000
009103.370: clock: Set PLLB_VCO to 1800000000
009103.458: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000
010525.821: clock: clock_set_clock:  dst: CLK_H264, source: XOSC, div: 1.000000
010525.863: clock: clock_set_clock:  dst: CLK_H264, source: XOSC, div: 0.000000
010525.905: clock: clock_set_clock:  dst: CLK_H264, source: PLLA_CORE, div: 4.000000
010525.987: clock: clock_set_clock:  dst: CLK_H264, source: XOSC, div: 0.000000
010526.167: clock: clock_set_clock:  dst: CLK_H264, source: XOSC, div: 1.000000
010526.204: clock: clock_set_clock:  dst: CLK_H264, source: XOSC, div: 0.000000
010526.247: clock: clock_set_clock:  dst: CLK_H264, source: PLLA_CORE, div: 4.000000
010526.322: clock: clock_set_clock:  dst: CLK_H264, source: XOSC, div: 0.000000
011057.607: hdmi: HDMI:Setting property pixel clock type to NTSC
011057.712: hdmi: HDMI: power_on to CEA mode 1080p60
011057.758: hdmi: HDMI: Action detach added to queue to happen at frame 585
011057.781: hdmi: HDMI: Action change_mode added to queue to happen at frame 585
011057.803: hdmi: HDMI: Action attach added to queue to happen at frame 585
011057.824: hdmi: HDMI: Action start_mode added to queue to happen at frame 585
011057.848: hdmi: HDMI: Action callback added to queue to happen at frame 587
011057.870: hdmi: HDMI: Action stop_3d_mode added to queue to happen at frame 587
011057.894: hdmi: HDMI: Action unmute added to queue to happen at frame 588
011103.468: clock: Set PLLH_VCO to 1483516480
011438.481: hdmi: HDMI:Setting property pixel clock type to NTSC
011438.582: hdmi: HDMI: power_on to CEA mode 1080p60
011438.627: hdmi: HDMI: Action detach added to queue to happen at frame 608
011438.649: hdmi: HDMI: Action change_mode added to queue to happen at frame 608
011438.672: hdmi: HDMI: Action attach added to queue to happen at frame 608
011438.696: hdmi: HDMI: Action start_mode added to queue to happen at frame 608
011438.744: hdmi: HDMI: Action callback added to queue to happen at frame 610
011438.768: hdmi: HDMI: Action stop_3d_mode added to queue to happen at frame 610
011438.791: hdmi: HDMI: Action unmute added to queue to happen at frame 611
014501.437: clock: Set PLLB_VCO to 1200000000
014501.516: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000
014603.383: clock: Set PLLB_VCO to 1800000000
014603.465: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000
019501.407: clock: Set PLLB_VCO to 1200000000
019501.484: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000
038503.409: clock: Set PLLB_VCO to 1800000000
038503.493: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000
039501.409: clock: Set PLLB_VCO to 1200000000
039501.483: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000
042403.392: clock: Set PLLB_VCO to 1800000000
042403.472: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000
044501.441: clock: Set PLLB_VCO to 1200000000
044501.518: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000
069113.497: clock: Set PLLB_VCO to 1800000000
069113.590: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000
069501.509: clock: Set PLLB_VCO to 1200000000
069501.585: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000
319457.394: clock: Set PLLB_VCO to 1800000000
319457.474: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000
322155.417: clock: Set PLLB_VCO to 1200000000
322155.491: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000
329857.397: clock: Set PLLB_VCO to 1800000000
329857.473: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000
332155.444: clock: Set PLLB_VCO to 1200000000
332155.518: clock: clock_set_clock:  dst: CLK_ARM, source: PLLB_ARM, div: 1.000000

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2279
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Overlay for on/off push-button controller.

Wed Mar 02, 2016 12:19 pm

That log looks perfectly normal. I was curious so I dug out an OpenElec card, tried the overlay and got the same result, i.e. no visible change in the requested pin. The driver appears to be loaded - /sys/devices/platform/power_ctrl exists, and doesn't if you don't use the overlay. The same configuration line works fine on a Raspbian image so I'm stumped.

hollol
Posts: 8
Joined: Sun Feb 28, 2016 8:31 am

Re: Overlay for on/off push-button controller.

Thu Mar 03, 2016 8:16 am

PhilE wrote:That log looks perfectly normal. I was curious so I dug out an OpenElec card, tried the overlay and got the same result, i.e. no visible change in the requested pin. The driver appears to be loaded - /sys/devices/platform/power_ctrl exists, and doesn't if you don't use the overlay. The same configuration line works fine on a Raspbian image so I'm stumped.
Thanks for you effort. In this case I will raise an issue on the GitHub Openelec page.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2279
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Overlay for on/off push-button controller.

Thu Mar 03, 2016 10:12 am

You're welcome. I expect the question will get back to me eventually.

Return to “Device Tree”