Community
cancel
Showing results for 
Search instead for 
Did you mean: 
MMüll3
Beginner
1,833 Views

How can I disable Intel Edison GPI_PWRBTN_N Poweroff?

Jump to solution

Hello

I want to disable any interaction with GPI_PWRBTN_N when the edison is running. I have disabled the pwr-button-handler.service but it still cuts the power when I press the button longer than 7 seconds. The worst is that it does directly turn off the power, without shutting it down properly, so possibly damaging the filesystem.

What exactly is still listening on this input? Where can I turn it off? Is it a kernel module? Or is it the PMIC? If yes, can I configure the PMIC not to turn off?

Thank you.

0 Kudos

Accepted Solutions
idata
Community Manager
141 Views

Hello Pai7u,

 

 

We have found something that will provide more information on your original request.

 

 

In the Hardware guides for Edison https://www.intel.com/content/dam/support/us/en/documents/edison/sb/edisonbreakout_hg_331190006.pdf Breakout Board (page 12, Section 2.4) and https://www.intel.com/content/dam/support/us/en/documents/edison/sb/edison-arduino-hardware-guide.pd... Arduino Kit (page 25, Section 9) you can find this information: "The power button [SW1 in Breakout Board and SW1UI2 in Arduino Kit] is configured by software. Pressing and holding the power button will produce different results depending on the current state of the Intel® Edison compute module and the duration of the hold..."

 

 

We have found a program written in C that might be responsible for the power button actions (pwr-button-handler.c). You may modify this program and rebuild the image to fit your project needs!

 

 

The location of the C program previously mentioned:

 

/iot-devkit-yp-poky-edison-20160606/poky/meta-intel-edison/meta-intel-edison-bsp/recipes-support/pwr-button-handler/files/pwr-button-handler.c

 

 

How to build the Edison image from source:I hope this information helps you with your project!

 

 

Best regards,

 

Eliza

View solution in original post

15 Replies
idata
Community Manager
141 Views

Hello Pai7u,

 

 

Thank you for your interest in the Intel Edison Board Kit.

 

 

We have acknowledged your request and we are currently working o it.

 

As soon as we will have a resolution, we will reach you back.

 

 

Thank you,

 

Eliza
idata
Community Manager
141 Views

Hello Pai7u,

 

 

Thank you for your patience.

When looking at the https://www.intel.com/content/www/us/en/support/articles/000005699/boards-and-kits.html schematics it looks like GPI_PWRBTN_N is going to Pin 17 on the 70 pin connector on the Edison Module.

 

 

We believe the GPI_PWRBTN_N is going to the PMIC. You may be able to disable it by modifying the source code. Please note that any modification to the source code is out of our support scope.

 

 

Feel free to give it a try and share your results with the community.

Useful links:

Please let us know if you have additional questions.

 

 

Best regards,

 

Eliza
idata
Community Manager
141 Views

Hello Pai7u,

 

 

Could you please let us know if the information provided was helpful?

 

Do you have further questions?

 

 

Thank you and best regards,

 

Eliza
MMüll3
Beginner
141 Views

Hello Eliza

Thanks for asking, but I'm afraid I couldn't resolve my issue despite your answer.

Before asking the question, I checked all the schematics and documents I could find. So of course I knew about pin 17, but it does not help solving the problem because I couldn't find any schematics showing where the pin goes to inside the module.

If you ask me if I have further questions, then well, yes:

- What chip is the PMIC exactly? I read in the hardware guide that it is a TI SNB9024 but I can't find any documentation on it. Is there a datasheet for this chip?

- According to the hardware guide, the SNB9024 is configurable via I2C. Is the I2C-port of the SNB9024 connected to an accessible I2C-bus?

- Which source code do you mean? The source code of the linux kernel? If yes, do you have any hint in which direction to search for it? Is there a kernel module for the PMIC? I searched in the source (thanks for the link) but could not find anything about the SNB9024. I found a lot of different PMICs, like e.g. the TPS65910, but not the SNB9024.

Any hint?

Best regards

idata
Community Manager
141 Views

Hello Pai7u,

 

 

Here are the responses to your questions: Best regards,

 

Eliza
MMüll3
Beginner
141 Views

Hello again

Unfortunately, TI won't give out the datasheet of the SNB9024, because it seems to be a customized chip for Intel ( ).

I think I have found a way to communicate to the SNB9024 (using the function intel_scu_ipc_ioread8 and write8 in drivers/platform/x86/intel_scu_ipc.c, please correct me if I am wrong). But without datasheet to know which register to write to, I'm not really able to get ahead. It seems Intel is the only one who could give out the datasheet of the SNB9024.

Can you please provide the datasheet of the SNB9024 or at least the registers concerning the configuration of the power button? Like e.g. in the same style as the table 31 in the Edison Module Hardware Guide describing the register for the backup battery...

Thank you in advance.

idata
Community Manager
142 Views

Hello Pai7u,

 

 

We have found something that will provide more information on your original request.

 

 

In the Hardware guides for Edison https://www.intel.com/content/dam/support/us/en/documents/edison/sb/edisonbreakout_hg_331190006.pdf Breakout Board (page 12, Section 2.4) and https://www.intel.com/content/dam/support/us/en/documents/edison/sb/edison-arduino-hardware-guide.pd... Arduino Kit (page 25, Section 9) you can find this information: "The power button [SW1 in Breakout Board and SW1UI2 in Arduino Kit] is configured by software. Pressing and holding the power button will produce different results depending on the current state of the Intel® Edison compute module and the duration of the hold..."

 

 

We have found a program written in C that might be responsible for the power button actions (pwr-button-handler.c). You may modify this program and rebuild the image to fit your project needs!

 

 

The location of the C program previously mentioned:

 

/iot-devkit-yp-poky-edison-20160606/poky/meta-intel-edison/meta-intel-edison-bsp/recipes-support/pwr-button-handler/files/pwr-button-handler.c

 

 

How to build the Edison image from source:I hope this information helps you with your project!

 

 

Best regards,

 

Eliza

View solution in original post

MMüll3
Beginner
141 Views

Hello Eliza

Thank you for your answer.

I know the pwr-button-handler.c program and in my first post I mentioned that I disabled it ("I have disabled the pwr-button-handler.service [...]"). This program does not talk to the PMIC itself, it just handles the interrupt which is fired when the button is pushed (e.g. to switch between WiFi client and AP mode). But with pwr-button-handler.c, you cannot prevent the PMIC to cut the power when the button is pressed for 7 seconds. To disable this, you have to change the PMIC registers. I have now found out how to change the PMIC registers (with the functions in intel_scu_ipc.c), but I don't know which register to write to and to which bits. That's why I need the datasheet of the SNB9024 or at least the figure of the register(s) and the bits to configure the power button behaviour of the PMIC.

Just to remind, it is very important to disable the power cut-off because it doesn't shut down the system properly and thus the file system may be damaged.

So please, can you kindly provide the datasheet of SNB9024 (or just the parts containing the description of the power button registers)? Thank you in advance.

FerryT
Valued Contributor I
141 Views

Andy Shevchenko (0andriy ) is working on this and has partially reverse engineered this: https://edison.internet-share.com/wiki/PMIC https://edison.internet-share.com/wiki/PMIC

I am sure he would appreciate someone filling in the ???

The U-Boot (2018.09) mentioned and kernel (4.18 as published by Andy) can be built along with a Yocto Sumo rootfs using: https://github.com/edison-fw/meta-intel-edison GitHub - edison-fw/meta-intel-edison: Here is the meta-intel-edison that builds, tries to stay up to date and provides a… . Documentation for that can for the time being be found here https://htot.github.io/meta-intel-edison/ Intel Edison Image Builder |

Andriy_S_Intel
Employee
141 Views

FerryT

To be correct, I'm not reverse engineering anything, I'm just re-using whatever had been published by Intel.

I'm cleaning that up or rewriting, but I don't expose any new information in comparison to the existing knowledge about PMIC.

FerryT
Valued Contributor I
141 Views

Sorry, didn't want to cause confusion. I meant to say that the data on the wiki is extracted from the published kernel code, not any kind of hardware reverse engineering like x-ray or signal probing.

idata
Community Manager
141 Views

Hello Pai7u,

 

 

We have been searching for the document of interest and unfortunately it is not available. The product has been discontinued and some of the resources are no longer available.

 

 

We apologize for the inconvenience this may have caused, please refer the Edison Discontinuation Notice at the following link /docs/DOC-112093 https://communities.intel.com/docs/DOC-112093.

 

 

Thank you,

 

Eliza
MMüll3
Beginner
141 Views

Hello Eliza

I received an answer from TI. They would give me the datasheet if you provide me a "letter of authorization" that you allow them to share it. Would it be possible to do that?

Thanks

Eliza_D_Intel
Employee
141 Views

Hello MMüll3,

 

Unfortunately, we are unable to resolve your request, as the product have been declared End-of-Life as of September 15 2017 as mentioned here https://software.intel.com/en-us/iot/hardware/discontinued) and so many of the resources are unavailable at this point in time.

 

We apologize for any inconveniences caused. If there are further questions please let us know.

 

Thank you and best regards,

Eliza

Andriy_S_Intel
Employee
141 Views

@MMüll3​ 

I can tell you, that even if you have a register description it won't help you. The Cold Off sequence is a part of state machine of the PMIC that can't be altered via registers. You will need to rewrite the state machine program. But I believe no-one will give you documentation how to achieve such.