Disabling PowerOff and Reset button

323 views
Skip to first unread message

PM

unread,
Mar 27, 2017, 6:02:01 AM3/27/17
to BeagleBoard
Hello everybody,

I am trying to disable my reset & poweroff button from my LCD7 cape.
I saw on the schematic diagram that these buttons are directly connected to SYS_RESET & PWR_BUT.

I would like to know if it is possible to disable these buttons by editing any 'dts' or 'dtso' file ?

Thank you very much.

Gerald Coley

unread,
Mar 27, 2017, 8:47:30 AM3/27/17
to beagl...@googlegroups.com
Reset pin goes to the reset line and the power button goes to the PMIC. PMIC pins and reset lines are not controlled via the DTS file 



--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/37da3ff7-94d4-4305-ad02-49b8c000655f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Jason Kridner

unread,
Mar 27, 2017, 9:14:37 AM3/27/17
to beagl...@googlegroups.com


On Mar 27, 2017, at 8:47 AM, Gerald Coley <ger...@beagleboard.org> wrote:

Reset pin goes to the reset line and the power button goes to the PMIC. PMIC pins and reset lines are not controlled via the DTS file 

The interrupt into software for the power button is dts controlled:


You can eliminate the software shutdown, but the hardware will still do a power down if the button is held for more than about 10-12 seconds. 





On Mon, Mar 27, 2017 at 5:02 AM, PM <paskal....@gmail.com> wrote:
Hello everybody,

I am trying to disable my reset & poweroff button from my LCD7 cape.
I saw on the schematic diagram that these buttons are directly connected to SYS_RESET & PWR_BUT.

I would like to know if it is possible to disable these buttons by editing any 'dts' or 'dtso' file ?

Thank you very much.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/37da3ff7-94d4-4305-ad02-49b8c000655f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAHK_S%2BccvBKiyy5-AXM7pU5eSP4S09%2B1XVH2kQp5P-zk-3PVzQ%40mail.gmail.com.

PM

unread,
Mar 27, 2017, 12:04:04 PM3/27/17
to BeagleBoard
Thanks for the info.

I tried to find the corresponding dtb to modify but no success :(

I can't find any am335x-bone-common.dtb. Do you know where should I look ?

Regards,

PM

PM

unread,
Mar 28, 2017, 11:32:03 AM3/28/17
to BeagleBoard
Okay I found the dtsi file in /opt/source/dtb-4.9-ti/src/arm/ :)

Do I have to recompile it after editing the file ?

If Yes, what command should i type ?

Thanks :)

PM

unread,
Mar 30, 2017, 12:08:54 PM3/30/17
to BeagleBoard
Hello :)

I tried to compile the dtb-4.9 but I get these errors, do you have any idea ?

debian@arm:/opt/source/dtb-4.9-ti$ sudo make
  DTC     src/arm/am335x-boneblack-bbb-exp-r.dtb
FATAL ERROR: Unrecognized check name "unit_address_vs_reg"
Makefile:136: recipe for target 'src/arm/am335x-boneblack-bbb-exp-r.dtb' failed
make[1]: *** [src/arm/am335x-boneblack-bbb-exp-r.dtb] Error 1
Makefile:84: recipe for target 'all_arm' failed
make: *** [all_arm] Error 2

Thank you very much !

Robert Nelson

unread,
Mar 30, 2017, 12:25:22 PM3/30/17
to Beagle Board, Pascal Marechal
On Thu, Mar 30, 2017 at 11:08 AM, PM <paskal....@gmail.com> wrote:
> Hello :)
>
> I tried to compile the dtb-4.9 but I get these errors, do you have any idea
> ?
>
> debian@arm:/opt/source/dtb-4.9-ti$ sudo make
> DTC src/arm/am335x-boneblack-bbb-exp-r.dtb
> FATAL ERROR: Unrecognized check name "unit_address_vs_reg"
> Makefile:136: recipe for target 'src/arm/am335x-boneblack-bbb-exp-r.dtb'
> failed
> make[1]: *** [src/arm/am335x-boneblack-bbb-exp-r.dtb] Error 1
> Makefile:84: recipe for target 'all_arm' failed
> make: *** [all_arm] Error 2

dtb-4.9-ti is using mainline dtc.. While i fixed this for Stretch,
Jessie still has the old one:

Fixed: https://github.com/RobertCNelson/dtb-rebuilder/commit/d9f78027cf4a635f81fc6d4aebafea6bc849f4f5

just run:

git pull
./dtc-overlay.sh

dtc --version
Version: DTC 1.4.4

Regards,

--
Robert Nelson
https://rcn-ee.com/
Message has been deleted

PM

unread,
Mar 31, 2017, 5:33:26 AM3/31/17
to BeagleBoard, paskal....@gmail.com
Thanks Robert ! It now compiles.

I run make & make install. It does something like that :

‘src/arm/am335x-abbbi.dtb’ -> ‘/boot/dtbs/4.4.43-ti-r84/
am335x-abbbi.dtb’
‘src/arm/am335x-baltos-ir2110.dtb’ -> ‘/boot/dtbs/4.4.43-ti-r84/am335x-baltos-ir2110.dtb’
‘src/arm/am335x-baltos-ir3220.dtb’ -> ‘/boot/dtbs/4.4.43-ti-r84/am335x-baltos-ir3220.dtb’
And so on....

But my modification inside am335x-bone-common.dtsi does not work.

pwrbutton {
interrupts = <TPS65217_IRQ_PB>;
              status = "disabled";
      };

The code does not disable the instant poweroff on my LCD7 power button :(

Any idea ?

Thanks !

Robert Nelson

unread,
Mar 31, 2017, 12:50:06 PM3/31/17
to Beagle Board, Pascal Marechal
On Fri, Mar 31, 2017 at 4:33 AM, PM <paskal....@gmail.com> wrote:
> Thanks Robert ! It now compiles.
>
> I run make & make install. It does something like that :
>
> ‘src/arm/am335x-abbbi.dtb’ -> ‘/boot/dtbs/4.4.43-ti-r84/
> am335x-abbbi.dtb’
> ‘src/arm/am335x-baltos-ir2110.dtb’ ->
> ‘/boot/dtbs/4.4.43-ti-r84/am335x-baltos-ir2110.dtb’
> ‘src/arm/am335x-baltos-ir3220.dtb’ ->
> ‘/boot/dtbs/4.4.43-ti-r84/am335x-baltos-ir3220.dtb’
> And so on....
>
> But my modification inside am335x-bone-common.dtsi does not work.
>
> pwrbutton {
> interrupts = <TPS65217_IRQ_PB>;
> status = "disabled";
> };
>
>
> The code does not disable the instant poweroff on my LCD7 power button :(
>
> Any idea ?

Remove the whole device-tree node:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/arm/boot/dts/am335x-bone-common.dtsi?id=eb3e4bbebac41946cf3001ebe11bd4c135b61f29

bilm...@gmail.com

unread,
Apr 1, 2017, 8:41:37 PM4/1/17
to BeagleBoard


I can see this being quite useful as a way to coopt the power button for other actions too:

example pseudocode:

If powerbutton held for > 1 second,  do nothing                              # reduces accidental presses 
if powerbutton held for >=1 s to < 2 s , call mysoftware restart
if powerbutton held for >=  2s to 5s,  call test routine           
if powerbutton held for > 5 s,# original action

bilm...@gmail.com

unread,
Apr 1, 2017, 8:41:45 PM4/1/17
to BeagleBoard

I see this being quite useful if we can co-opt the power button for other uses too.

e.g.

If pwr held for <1 second,  do nothing 

for 1 - 3 seconds, restart my software
for 3- 5 seconds,  run my test routine
for > 5 seconds perform original action - os shutdown

PM

unread,
Apr 4, 2017, 4:49:45 AM4/4/17
to BeagleBoard, paskal....@gmail.com
Thanks Robert.

I removed the whole node and still no success :(
Reply all
Reply to author
Forward
0 new messages