From patchwork Wed Jun 5 06:33:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Walsh X-Patchwork-Id: 13686232 Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [80.241.56.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6EE0E18C32A for ; Wed, 5 Jun 2024 06:34:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.161 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717569257; cv=none; b=HPm7qNpghjHdtrS8qXMymqHYJ/Bd8QQwi8wVQdrd2cyaYSnvznmI2/oiX0MHSFk7mUVtfuoHh/BSnXoFgScNHdkspocO1zs4yOe1hdMXKtnqm8VnHH4VHqNmAR6l+vYt6yEgFEwfmiIDw/JRqdIc4zaVn//lmT47S7CyNTi+RYw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717569257; c=relaxed/simple; bh=ruqDG+QNwILXYDQjZdx8DjPIl7jOpAZrddO/qf+cPow=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LTEtyPZTw/UebBWZiJY2YaCAcjVjywFWMLmX+s2dxqqV4VTYCPUWRxXZ4RGreiPRA8Xbgf22IRwuHzn98Cx63UeorS/HJT355UXa0Pz8wi/jkp/imQ2GnQoSrO23YP7mEi65vco7w/y1o9k8WJnqfqL/UrctvWljYNzrc751FiI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=jubnut.com; spf=pass smtp.mailfrom=jubnut.com; dkim=pass (2048-bit key) header.d=jubnut.com header.i=@jubnut.com header.b=OD9Cp+j+; arc=none smtp.client-ip=80.241.56.161 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=jubnut.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=jubnut.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=jubnut.com header.i=@jubnut.com header.b="OD9Cp+j+" Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4VvHjx1G4bz9snn; Wed, 5 Jun 2024 08:34:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jubnut.com; s=MBO0001; t=1717569253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QVWT4o4RJN6rHBWyrxsihWMYRQAtby4mFTEOZmR9bZ8=; b=OD9Cp+j+oYiI1npLa2sF9fA/R/eLbxx1cOSREITVCBCUUfp+T2KK9Vi8W7JzDNMpqmDF7Z evQ8iQSRvDne9UR39Pqjqnuc4oXX2vDbjqgbHl3Mxv15zNos3oTNouIAvjmhyAIZIcA9JW M/I0cDMFNvpNISrIE3skRPbVthuS8PbzZWykupAmKgj0UxAUpYnmLNoOn0QQ6pCnNR4Y8l 1gX0iNm1A/hz/yYWyJHwZotrWYZ0SRycklaGMDZyN9/cUkWSS2Yjh+0hMGC4G1vmFt3w++ I0EaQEJhNqyz2Iya8lcArailk830RT9RpPkdPryC9riJgMVWY2OwUhwmADmA2w== From: Ben Walsh To: Benson Leung , Tzung-Bi Shih , Guenter Roeck , "Dustin L. Howett" , Kieran Levin , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , Mario Limonciello , chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org Cc: Ben Walsh Subject: [PATCH v3 5/5] platform/chrome: cros_ec_lpc: Add quirks for Framework Laptop Date: Wed, 5 Jun 2024 07:33:51 +0100 Message-ID: <20240605063351.14836-6-ben@jubnut.com> In-Reply-To: <20240605063351.14836-1-ben@jubnut.com> References: <20240605063351.14836-1-ben@jubnut.com> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 For Framework Laptops with Microchip EC (MEC), use the ACPI id "PNP0C09" to find the ACPI device, and AML mutex "ECMT" to protect EC memory access. Signed-off-by: Ben Walsh --- drivers/platform/chrome/cros_ec_lpc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c index 5d9cc8df208b..ebe9fb143840 100644 --- a/drivers/platform/chrome/cros_ec_lpc.c +++ b/drivers/platform/chrome/cros_ec_lpc.c @@ -636,6 +636,12 @@ static const struct lpc_driver_data framework_laptop_amd_lpc_driver_data __initc .quirk_mmio_memory_base = 0xE00, }; +static const struct lpc_driver_data framework_laptop_11_lpc_driver_data __initconst = { + .quirks = CROS_EC_LPC_QUIRK_ACPI_ID|CROS_EC_LPC_QUIRK_AML_MUTEX, + .quirk_acpi_id = "PNP0C09", + .quirk_aml_mutex_name = "ECMT", +}; + static const struct dmi_system_id cros_ec_lpc_dmi_table[] __initconst = { { /* @@ -704,6 +710,7 @@ static const struct dmi_system_id cros_ec_lpc_dmi_table[] __initconst = { DMI_MATCH(DMI_SYS_VENDOR, "Framework"), DMI_MATCH(DMI_PRODUCT_NAME, "Laptop"), }, + .driver_data = (void *)&framework_laptop_11_lpc_driver_data, }, { /* sentinel */ } };