<p>Patrick Georgi has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21193">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ec/google: Use feature flag layout that matches the EC host command<br><br>The EC side of the feature bits in ACPI EC space isn't stable yet, and<br>we're now going for matching them up with the EC host command of the<br>same purpose.<br><br>Change-Id: I9c1f0e5390e840ea0c32315a3da8eea6f3e12f54<br>Signed-off-by: Patrick Georgi <pgeorgi@google.com><br>---<br>M src/ec/google/chromeec/acpi/ec.asl<br>M src/ec/google/chromeec/acpi/keyboard_backlight.asl<br>2 files changed, 48 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/21193/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl<br>index 422abe1..0d05110 100644<br>--- a/src/ec/google/chromeec/acpi/ec.asl<br>+++ b/src/ec/google/chromeec/acpi/ec.asl<br>@@ -47,15 +47,49 @@<br>            RAMV, 8,        // EC RAM Version<br>             TSTB, 8,        // Test Byte<br>          TSTC, 8,        // Complement of Test Byte<br>-           KBLV, 8,        // Keyboard Backlight<br>+                KBLV, 8,        // Keyboard Backlight value<br>           FAND, 8,        // Set Fan Duty Cycle<br>                 PATI, 8,        // Programmable Auxiliary Trip Sensor ID<br>              PATT, 8,        // Programmable Auxiliary Trip Threshold<br>              PATC, 8,        // Programmable Auxiliary Trip Commit<br>                 CHGL, 8,        // Charger Current Limit<br>              TBMD, 1,        // Tablet mode<br>+               // DFUD must be 0 for the other 31 values to be valid<br>                 Offset (0x0a),<br>-               KBLE, 1,        // Keyboard Backlight exists<br>+         DFUD, 1,        // Device Features Undefined<br>+         FLSH, 1,        // Flash commands present<br>+            PFAN, 1,        // PWM Fan control present<br>+           KBLE, 1,        // Keyboard Backlight present<br>+                LTBR, 1,        // Lightbar present<br>+          LEDC, 1,        // LED control<br>+               MTNS, 1,        // Motion sensors present<br>+            KEYB, 1,        // EC is keyboard controller<br>+         PSTR, 1,        // Persistent storage<br>+                P80P, 1,        // EC serves I/O Port 80h<br>+            THRM, 1,        // EC supports thermal management<br>+            SBKL, 1,        // Screen backlight switch present<br>+           WIFI, 1,        // WIFI switch present<br>+               HOST, 1,        // EC monitors host events (eg SCI, SMI)<br>+             GPIO, 1,        // EC provides GPIO commands<br>+         I2CB, 1,        // EC provides I2C controller access<br>+         CHRG, 1,        // EC provides commands for charger control<br>+          BATT, 1,        // Simply Battery support<br>+            SBAT, 1,        // Smart Battery support<br>+             HANG, 1,        // EC can detect host hang<br>+           PMUI, 1,        // Power Information<br>+         DSEC, 1,        // another EC exists downstream<br>+              UPDC, 1,        // supports USB Power Delivery<br>+               UMUX, 1,        // supports USB Mux<br>+          MSFF, 1,        // Motion Sense has FIFO<br>+             TVST, 1,        // supports temporary secure vstore<br>+          TCMV, 1,        // USB Type C Muxing is virtual (host assisted)<br>+              RTCD, 1,        // EC provides an RTC device<br>+         FPRD, 1,        // EC provides a fingerprint reader device<br>+           TPAD, 1,        // EC provides a touchpad device<br>+             RWSG, 1,        // EC has RWSIG task enabled<br>+         DEVE, 1,        // EC supports device events<br>+         // make sure we're within our space envelope<br>+             Offset (0x0e),<br>        }<br> <br> #if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_ACPI_MEMMAP)<br>diff --git a/src/ec/google/chromeec/acpi/keyboard_backlight.asl b/src/ec/google/chromeec/acpi/keyboard_backlight.asl<br>index d76bed8..1edce81 100644<br>--- a/src/ec/google/chromeec/acpi/keyboard_backlight.asl<br>+++ b/src/ec/google/chromeec/acpi/keyboard_backlight.asl<br>@@ -33,8 +33,18 @@<br>              */<br>           Method (_STA, 0, NotSerialized)<br>               {<br>-                    Multiply (0xf, \_SB.PCI0.LPCB.EC0.KBLE, Local0)<br>-                      Return (Local0)<br>+                      /* If query is unsupported, but this code is compiled<br>+                         * in, assume the backlight exists physically.<br>+                        */<br>+                  If (LEqual (1, \_SB.PCI0.LPCB.EC0.DFUD)) {<br>+                           Return (0xf)<br>+                 }<br>+                    /* If EC reports that backlight exists, trust it */<br>+                  If (LEqual (1, \_SB.PCI0.LPCB.EC0.KBLE)) {<br>+                           Return (0xf)<br>+                 }<br>+                    /* Otherwise: no device -> disable */<br>+                     Return (0)<br>            }<br> <br>          /* Read current backlight value */<br></pre><p>To view, visit <a href="https://review.coreboot.org/21193">change 21193</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/21193"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I9c1f0e5390e840ea0c32315a3da8eea6f3e12f54 </div>
<div style="display:none"> Gerrit-Change-Number: 21193 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Patrick Georgi <pgeorgi@google.com> </div>