<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Andrew,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Understood. Thanks for your explanation.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Jason,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I will take it a shot. Thanks for your sharing.</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Regards,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Chris Chen</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>寄件者:</b> openbmc <openbmc-bounces+chris.chen3=flex.com@lists.ozlabs.org> 代表 Bills, Jason M <jason.m.bills@linux.intel.com><br>
<b>寄件日期:</b> 2021年8月18日 上午 03:04<br>
<b>收件者:</b> openbmc@lists.ozlabs.org <openbmc@lists.ozlabs.org><br>
<b>主旨:</b> Re: [x86-power-control]: press the power button for a long time that can't force turn off system power</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText"><br>
<br>
On 8/17/2021 5:30 AM, Andrew Jeffery wrote:<br>
> Hi Chris,<br>
> <br>
> On Tue, 17 Aug 2021, at 20:47, Chris Chen (TPI) wrote:<br>
>> Hi Andrew,<br>
>><br>
>> That means I'm able to choose one of following 2 options to achieve<br>
>> pass-through behavior when I using x86-power-control package, is my<br>
>> understanding correct?<br>
>><br>
>> 1. Add code to re-enable GPIOP0 and GPIOP1 into a pass-through function<br>
>> after they are requested as a GPIO function in the x86-power-control<br>
>> package. (Or maybe to create a script with "devmem > 0x1e6e24BC 32<br>
>> 0x0F000000" command that will be run automatically after system up to<br>
>> change register directly.)<br>
> <br>
> This is a hack and should be a last resort. Even then I'd avoid it.<br>
> <br>
> Certainly you should avoid shipping with /dev/mem enabled.<br>
> <br>
>><br>
>> 2. Modify pinctrl in Kernel that will not disable GPIOP0 and GPIOP1's<br>
>> pass-through function if they already are configured as a pass-through<br>
>> when they are requesting as a GPIO function.<br>
> <br>
> Perhaps, though maybe you should follow up on whether you can drive<br>
> GPIOP1 when it's in pass-through mode. My recollection is you cannot,<br>
> at least for the AST2500 and earlier, in which case both P0 and P1 are<br>
> effectively inputs for the purpose of the GPIO controller despite P1<br>
> being a physical output. This behaviour is probably more confusing than<br>
> it is helpful.<br>
> <br>
> There's also option 3 which is to emulate the pass-through in software,<br>
> as I outlined in my previous email.<br>
This is some of the configuration that I have on my system where the <br>
pass-through is working correctly in x86-power-control:<br>
<br>
I have one kernel patch that selects the "pass-through" pin <br>
configuration on startup: <br>
<a href="https://urldefense.com/v3/__https://github.com/Intel-BMC/linux/commit/8fe1ac31c13a0e8443c665394112ba407c90ae70__;!!HSntlCg!Ep_IWFI6dHqTAFsDwLYoJ0JYl3PjsE2hcEJQFIkNt1nDgHL9PvJEAWMmDWtE4az1$">https://urldefense.com/v3/__https://github.com/Intel-BMC/linux/commit/8fe1ac31c13a0e8443c665394112ba407c90ae70__;!!HSntlCg!Ep_IWFI6dHqTAFsDwLYoJ0JYl3PjsE2hcEJQFIkNt1nDgHL9PvJEAWMmDWtE4az1$</a>
.<br>
<br>
In x86-power-control, I have the POWER_BUTTON GPIO mapped to GPIOP2, and <br>
I'm able to claim and monitor that GPIO without affecting the <br>
pass-through status.<br>
<br>
I have POWER_OUT mapped to GPIOP3 which cannot be held in <br>
x86-power-control as it disables the pass-through when claimed. So, it <br>
is always released after the power-control action is completed.<br>
<br>
Thanks,<br>
-Jason<br>
<br>
> <br>
> Hope that helps,<br>
> <br>
> Andrew<br>
> <br>
</div>
</span></font></div>
</div>
<DIV>
Legal Disclaimer :<BR>
The information contained in this message may be privileged and confidential. <BR>
It is intended to be read only by the individual or entity to whom it is addressed <BR>
or by their designee. If the reader of this message is not the intended recipient, <BR>
you are on notice that any distribution of this message, in any form, <BR>
is strictly prohibited. If you have received this message in error, <BR>
please immediately notify the sender and delete or destroy any copy of this message!<BR>
</DIV></body>
</html>