mbox series

[v3,0/2] platform/chrome: add support for the Framework Laptop

Message ID 20220217165930.15081-1-dustin@howett.net (mailing list archive)
Headers show
Series platform/chrome: add support for the Framework Laptop | expand

Message

Dustin L. Howett Feb. 17, 2022, 4:59 p.m. UTC
This series adds support for the Framework Laptop to the cros_ec LPC
driver.

The Framework Laptop is a non-Chromebook laptop that uses the ChromeOS
Embedded Controller. Since the machine was designed to present a more
normal device profile, it does not report all 512 I/O ports that are
typically used by cros_ec_lpcs. Because of this, changes to the driver's
port reservation scheme were required.

Since this EC driver probes the MEC range first, and uses only the MEC
range if that probe succeeds[^1], we can get by without requesting the
entire port range required by non-MEC embedded controllers until
absolutely necessary.

[^1]: this includes "memory mapped" read - where the traditional LPC EC
requires I/O ports 0x900-0x9FF, the MEC EC multiplexes reads/writes
over the same eight ports, 0x800-0x807.

Changes in v2:
  - Cleaned up the commit subjects per request.
Changes in v3:
  - Sync'd cros_ec_commands.h with the EC changelist at
    https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3460548

Dustin L. Howett (2):
  platform/chrome: cros_ec_lpcs: detect the Framework Laptop
  platform/chrome: cros_ec_lpcs: reserve the MEC LPC I/O ports first

 drivers/platform/chrome/cros_ec_lpc.c          | 47 ++++++++++++++-----
 include/linux/platform_data/cros_ec_commands.h | 10 ++--
 2 files changed, 41 insertions(+), 16 deletions(-)

Comments

Tzung-Bi Shih Feb. 18, 2022, 2:32 a.m. UTC | #1
On Thu, Feb 17, 2022 at 10:59:28AM -0600, Dustin L. Howett wrote:
> This series adds support for the Framework Laptop to the cros_ec LPC
> driver.
> 
> The Framework Laptop is a non-Chromebook laptop that uses the ChromeOS
> Embedded Controller. Since the machine was designed to present a more
> normal device profile, it does not report all 512 I/O ports that are
> typically used by cros_ec_lpcs. Because of this, changes to the driver's
> port reservation scheme were required.
> 
> Since this EC driver probes the MEC range first, and uses only the MEC
> range if that probe succeeds[^1], we can get by without requesting the
> entire port range required by non-MEC embedded controllers until
> absolutely necessary.
> 
> [^1]: this includes "memory mapped" read - where the traditional LPC EC
> requires I/O ports 0x900-0x9FF, the MEC EC multiplexes reads/writes
> over the same eight ports, 0x800-0x807.
> 
> Changes in v2:
>   - Cleaned up the commit subjects per request.
> Changes in v3:
>   - Sync'd cros_ec_commands.h with the EC changelist at
>     https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3460548
> 
> Dustin L. Howett (2):
>   platform/chrome: cros_ec_lpcs: detect the Framework Laptop
>   platform/chrome: cros_ec_lpcs: reserve the MEC LPC I/O ports first

For the series,
Reviewed-by: Tzung-Bi Shih <tzungbi@google.com>
patchwork-bot+chrome-platform@kernel.org May 3, 2022, 6:10 a.m. UTC | #2
Hello:

This series was applied to chrome-platform/linux.git (for-kernelci)
by Tzung-Bi Shih <tzungbi@kernel.org>:

On Thu, 17 Feb 2022 10:59:28 -0600 you wrote:
> This series adds support for the Framework Laptop to the cros_ec LPC
> driver.
> 
> The Framework Laptop is a non-Chromebook laptop that uses the ChromeOS
> Embedded Controller. Since the machine was designed to present a more
> normal device profile, it does not report all 512 I/O ports that are
> typically used by cros_ec_lpcs. Because of this, changes to the driver's
> port reservation scheme were required.
> 
> [...]

Here is the summary with links:
  - [v3,1/2] platform/chrome: cros_ec_lpcs: detect the Framework Laptop
    https://git.kernel.org/chrome-platform/c/6a5d778edaa3
  - [v3,2/2] platform/chrome: cros_ec_lpcs: reserve the MEC LPC I/O ports first
    https://git.kernel.org/chrome-platform/c/c9bc1a0ef9f6

You are awesome, thank you!
patchwork-bot+chrome-platform@kernel.org May 4, 2022, 2:20 a.m. UTC | #3
Hello:

This series was applied to chrome-platform/linux.git (for-next)
by Tzung-Bi Shih <tzungbi@kernel.org>:

On Thu, 17 Feb 2022 10:59:28 -0600 you wrote:
> This series adds support for the Framework Laptop to the cros_ec LPC
> driver.
> 
> The Framework Laptop is a non-Chromebook laptop that uses the ChromeOS
> Embedded Controller. Since the machine was designed to present a more
> normal device profile, it does not report all 512 I/O ports that are
> typically used by cros_ec_lpcs. Because of this, changes to the driver's
> port reservation scheme were required.
> 
> [...]

Here is the summary with links:
  - [v3,1/2] platform/chrome: cros_ec_lpcs: detect the Framework Laptop
    https://git.kernel.org/chrome-platform/c/6a5d778edaa3
  - [v3,2/2] platform/chrome: cros_ec_lpcs: reserve the MEC LPC I/O ports first
    https://git.kernel.org/chrome-platform/c/c9bc1a0ef9f6

You are awesome, thank you!