<div dir="ltr"><div>Hello,<br></div><div><br>Is there documentation for the H8 EC somewhere? (not just some 
code - even if ec/lenovo/h8/acpi/ec.asl is very interesting)<br><br>There seem to be a 
discrepancy on battery charge thesholds, with ACPI events such as "charge
 complete" (battery PNP0C0A:00 00000080 00000001)  happening at 80%, 
while in /proc/acpi/battery/BAT0/ it keeps charging.<br><br>At the moment,it's not possible 
to use tp-smapi, but it might be possible to manually correct the 
threshold by writing to the EC, cf 
<a href="http://www.thinkwiki.org/wiki/Talk:Maintenance" target="_blank">http://www.thinkwiki.org/wiki/Talk:Maintenance</a>. However, I see nothing at offset 0x24 with ec-access.<br><br></div><div>I have no documentation for the H8 EC, but in  src/ec/quanta/it8518/acpi/ec.asl I see values that seem familiar 
for thinkpads (ex: at offset 0x3A, the rfkill wifi/bluetooth/wwan) and a very interesting reference, which seems to match thinkwiki discussion:<br>    Offset(0x03), // [Configuration Space 3]<br>(...)<span><br> CHGR</span><span>,</span><span> </span><span>1</span><span>,</span><span>        </span><span>//   Charge/Stop Charge threshold selector</span><span></span><br>// <span>0: Battery Charge Threshold / 1: Stop Battery Charge Threshol</span>d<br><br>    Offset(0x24), // [Battery Charge / Stop Charge Threshold Setting for Primary Battery] (Read/Write)<br><br><br></div><div>For the rfkill things, I see :<br>    Offset(0x01), // [Configuration Space 1]<br>    ENBT, 1, // Enable to toggle the BlueTooth and BDC power state every when the button is pressed.<br></div><div><br></div><div>Maybe the following control the USB port, to have a proper rfkill for wwan (on EHCI port 1)<br><ol><li><span>Offset</span><span>(</span><span>0x26</span><span>),</span><span>   </span><span>// [Reserved]</span></li><li><a name="14a126ea41a7658c_220"></a><span>             USP0</span><span>,</span><span> </span><span>1</span><span>,</span><span>        </span><span>//   bit 0 USB0</span></li><li><a name="14a126ea41a7658c_221"></a><span>            USP3</span><span>,</span><span> </span><span>1</span><span>,</span><span>        </span><span>//   bit 1 USB3</span></li><li><a name="14a126ea41a7658c_222"></a><span>            USP4</span><span>,</span><span> </span><span>1</span><span>,</span><span>        </span><span>//   bit 2 USB4</span></li><li><a name="14a126ea41a7658c_223"></a><span>            EHP0</span><span>,</span><span> </span><span>1</span><span>,</span><span>        </span><span>//   bit 3 EHCI0</span></li><li><a name="14a126ea41a7658c_224"></a><span>           EHP1</span><span>,</span><span> </span><span>1</span><span>,</span><span>        </span><span>//   bit 4 EHCI1</span></li></ol>Or :<br>    Offset(0x3B), // [Peripheral control 1]<br>(...)<br>    USBN, 1, // USB On<br><br></div><div>Anyway, it might not be a reliable description of the H8 features, so I though I should ask. I am also interested in the codes returned by the EC for various events to complete the ACPI tables. Any EC information is welcome!<br><br></div><div>Thanks<br>Charles<br></div></div>