<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);">
Thanks for your hint (CONFIG_DEBUG_PINCTRL=y) that let me see where the passthrough setting was disabled.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
======</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
[ 11.631044] aspeed-g6-pinctrl 1e6e2000.syscon:pinctrl: request pin 120 (AB22) for 1e780000.gpio:120
<div>[ 11.631064] Muxing pin 120 for GPIO</div>
<div>[ 11.631071] Disabling signal PWM8 for PWM8</div>
<div>[ 11.631087] Want SCU41C[0x01000000]=0x1, got 0x0 from 0x000000C0</div>
<div>[ 11.631094] Disabling signal THRUIN0 for THRU0</div>
<div>[ 11.631102] Want SCU4BC[0x01000000]=0x1, got 0x1 from 0x0F000000</div>
<div>[ 11.631118] Want SCU4BC[0x01000000]=0x0, got 0x0 from 0x0E000000</div>
[ 11.631124] Enabling signal GPIOP0 for GPIOP0<br>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="margin:0px;font-size:12pt">======</span><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)">
But something strange is the logs seems from <span style="background-color:rgb(255, 255, 255);display:inline !important">
"x86-power-control" package </span>because it would not appear after I commented out partial code
<span style="background-color:rgb(255, 255, 255);display:inline !important">as below in the package.</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="background-color:rgb(255, 255, 255);display:inline !important"><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255); display: inline !important;">Could you or others tell me why, please?
I mean did I miss any configurations or code changes or anything when using the "x86-power-control" package?</span><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="background-color:rgb(255, 255, 255);display:inline !important"><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="background-color:rgb(255, 255, 255);display:inline !important">
<div style="color:#d4d4d4;background-color:#1e1e1e;font-family:'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback';font-weight:normal;font-size:14px;line-height:19px">
<span><span style="color:#c586c0">#if</span><span style="color:#569cd6"> </span><span style="color:#b5cea8">0 //Added by Chris for testing</span></span>
<div><span style="color:#6a9955"> // Request POWER_BUTTON GPIO events</span></div>
<div><span> </span><span style="color:#c586c0">if</span><span> (!</span><span style="color:#9cdcfe">powerButtonName</span><span>.</span><span style="color:#dcdcaa">empty</span><span>())</span></div>
<div><span> {</span></div>
<div><span> </span><span style="color:#c586c0">if</span><span> (!</span><span style="color:#dcdcaa">requestGPIOEvents</span><span>(powerButtonName, powerButtonHandler,</span></div>
<div><span> powerButtonLine, powerButtonEvent))</span></div>
<div><span> {</span></div>
<div><span> </span><span style="color:#c586c0">return</span><span> -</span><span style="color:#b5cea8">1</span><span>;</span></div>
<div><span> }</span></div>
<div><span> }</span></div>
<div><span> </span><span style="color:#c586c0">else</span></div>
<div><span> {</span></div>
<div><span> </span><span style="color:#4ec9b0">phosphor</span><span>::</span><span style="color:#4ec9b0">logging</span><span>::</span><span style="color:#dcdcaa">log</span><span><</span><span style="color:#4ec9b0">phosphor</span><span>::</span><span style="color:#4ec9b0">logging</span><span>::</span><span style="color:#4ec9b0">level</span><span>::</span><span style="color:#4ec9b0">ERR</span><span>>(</span></div>
<div><span> </span><span style="color:#ce9178">"powerButton name should be configured from json config file"</span><span>);</span></div>
<div><span> </span><span style="color:#c586c0">return</span><span> -</span><span style="color:#b5cea8">1</span><span>;</span></div>
<div><span> }</span></div>
<span><span style="color:#c586c0">#endif <span style="color:rgb(181, 206, 168);background-color:rgb(30, 30, 30);display:inline !important">//Added by Chris for testing</span></span></span></div>
</span></div>
</div>
<div><font face="Calibri, Helvetica, sans-serif"><br>
</font></div>
<div><font face="Calibri, Helvetica, sans-serif">Another, last time I forgot to say that I have tried to use "devmem 0x1e6e24BC 32 0x0F000000" to set passthrough back manually and the power button works fine. This is why I think the passthrough was gone after
the system booting up.</font></div>
<div><font face="Calibri, Helvetica, sans-serif"><br>
</font></div>
<div><font face="Calibri, Helvetica, sans-serif">Regards,</font></div>
<div><font face="Calibri, Helvetica, sans-serif">Chris Chen<br>
</font><span style="font-family: Calibri, Helvetica, sans-serif;"></span>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</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> Andrew Jeffery <andrew@aj.id.au><br>
<b>寄件日期:</b> 2021年8月16日 下午 02:30<br>
<b>收件者:</b> Chris Chen (TPI) <Chris.Chen3@flex.com>; Bills, Jason M <jason.m.bills@linux.intel.com>; 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">Hi Chris,<br>
<br>
On Mon, 16 Aug 2021, at 13:22, Chris Chen (TPI) wrote:<br>
> Hi Jason and others,<br>
> <br>
> I think I figured out the problem is the GPIOP0 and GPIOP1 passthrough <br>
> was not set after system booting up. However, as I mentioned when <br>
> rising the question, I have already set GPIOP0 and P1 passthrough in <br>
> u-boot, it for now looks like was been turned off during Kernel or <br>
> OpenBMC application running up. Can you please give me a clue why the <br>
> GPIO passthrough would be turned off or where should I need to add <br>
> passthrough setting again?<br>
> <br>
<br>
If the kernel is disabling it you might be able to find the cause with <br>
CONFIG_DEBUG_PINCTRL=y and the pinctrl attributes in debugfs. Having <br>
said that, the upstream kernel hasn't been taught about SCU510[28] on <br>
the 2600, so if it is touching it then it's doing so via out-of-tree <br>
patches.<br>
<br>
Andrew<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>