PM1
March 27, 2017, 10:02am
1
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.
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
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:
https://patchwork.kernel.org/patch/9389243/
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.
PM1
March 27, 2017, 4:04pm
4
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
PM1
March 28, 2017, 3:32pm
5
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
PM1
March 30, 2017, 4:08pm
6
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 !
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,
PM1
March 31, 2017, 9:33am
8
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 !
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
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
PM1
April 4, 2017, 8:49am
12
Thanks Robert.
I removed the whole node and still no success