Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1718309lqe; Mon, 8 Apr 2024 19:27:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXzabcv7S1eZc9gRjBvenx7x1kpzXIGTTC3o/dmTb6S9ZLT5onf1AIDROqdKWkMrfRAWsyUx5Rl9L/+UdWGBjSRio5qnN08jn1dpuWmVQ== X-Google-Smtp-Source: AGHT+IGlTfkcOUYrepAih0TgImVUJEESDKPxM8zMmBd1DhI8qQkPq+ias8SmWJilOmIoGxGKzPHA X-Received: by 2002:a05:6870:5a84:b0:22e:7390:da7 with SMTP id dt4-20020a0568705a8400b0022e73900da7mr8006707oab.21.1712629679123; Mon, 08 Apr 2024 19:27:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712629679; cv=pass; d=google.com; s=arc-20160816; b=cbNaCb8uUTu3sS9najPxu4Zp40RAX3Y9h9MUsiz9cyr3BbgqZmAcu+9+4PpYHy6R9o 7VsU7i53MjVb8WEN7oS45jM5WJeij5eM7T63T1cfKOtuo15dTivX+XPU2Q5uVY7RPRQA YNry4Rode4kdt6nC+pMZvxdDBwAkNd8fT2F2QSTwrjXAHufVGmjiYgOMOHtmGv0aj+2F o2NH/k9Y8cFL2jeREVmircbg3L6XSqtvVIuHot4h5HwnanpnhlXwBcmXXAX0XQwXU8ny ODwAQp/g/1GNLyeRJNUiCio5pIsYe5eK15W4V3QX7OZcRWaFKC+qsm9MwjPswpsZ2pWO 6+fw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=FJlHPBrdTvEXRp/sm58R6lF6ryZ2TinFdRAYOgnph1w=; fh=mf2rInwHB0vZW5ZhX2I+O/9Y3COcAiBZWhM7ozXpt20=; b=gIwpV7l3bmlNW+OlIC4MhjtpVhoOGUx35z0YDp3OGLsSXHse1Vxs4HBl5SHi4HNuse kBzQr0kmfQnPZSTUC8nMbD7ixMHQDaEsel/kbKRYWxt7Mas3pWP825IyIFZgR4Qxuw4Z 9OZhKHG/7hbzAxITghSBvSOvGjCUlGlVqd3kxDELknTDb6HKK0ID4g/OwBO+B0LF822p LWMudVm418cJl9dXsCibOrwHCh1/7DsHCPXfw8CGtQBuROMrosjoUnXPv0DYc4tgrjB0 UiVtSyCSvEZX/0q1q+zA8ivCWAvogwxzZlDTrc70RYV1SmsaUEuntiEhVaD0mPsnCnte nmBg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=N0txTTbk; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-136131-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136131-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id v15-20020aa7850f000000b006e8f7973e28si7387255pfn.81.2024.04.08.19.27.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 19:27:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136131-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=N0txTTbk; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-136131-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136131-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id BD1312824A0 for ; Tue, 9 Apr 2024 02:27:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 67A6050277; Tue, 9 Apr 2024 02:27:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="N0txTTbk" Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 123594F213 for ; Tue, 9 Apr 2024 02:27:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712629662; cv=none; b=VDWMUV4BMJ4mDeiEaNHkHK7OwQtea2S6Ndgefb70FenAh+RP/120c85+CGbE+MOPYoX4P64rj7v+bQ9Ov1yWRMHqTVjEEg+Buobb7NAnAzUCzlXb+8hjSPdY6/rE+I6Y0MjC3pamvtZKjSK773tIHDtZGk+DseaSUzcC3XXC9tc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712629662; c=relaxed/simple; bh=qqGF9xLxJC4LQcm92S4IX/hRHYqAmBrg8Pca6o1qles=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BnL+7IX9mSxy8HYbVUbNF6tO3BLYZficPVfu4NU4NMyb0R6NBVG4DBB1jXCb5awFXg9e7aY3kOL+t7O9tVzH7glmILfDKewc7jOk7/hXA1/TiPLj8ZznIT887enH7vted598c0dpsKPjjHXR97OvW13VTETA0OhukXqw0jX/zeI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=N0txTTbk; arc=none smtp.client-ip=209.85.215.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-5d42e7ab8a9so3176408a12.3 for ; Mon, 08 Apr 2024 19:27:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1712629660; x=1713234460; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=FJlHPBrdTvEXRp/sm58R6lF6ryZ2TinFdRAYOgnph1w=; b=N0txTTbkNEh/ZmI+5ZL+HNVUmibMEofv348ejYYJLHsNaZQ/ffj36hpasiaBFe7bhi Kz4S4d/g5geyA7Wp5LkoOo38us5x5GGjTI8NqOmnKGSMJwIuu0K+etVg3h38OUTPCp53 pnCqKnesNWrflMyiZ9eQVEJZfpx0SX1ZYD1hk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712629660; x=1713234460; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FJlHPBrdTvEXRp/sm58R6lF6ryZ2TinFdRAYOgnph1w=; b=lBBXqX3hBboVXUjhfhuCNV9Qc1JdY6tWU0aiNSyYbhLEUravUjT/rhfz+1eqpAoCMC 5cgFNm47mrpOf48jCOQzYOtjSDID6V/R6WV/lwsg2perZ/P2VAmEsnjUPUeJMMOSQfbM wN1TLYHcLUgrUoQRGr3TKiwLCIou2z2ZASf8SUmbYBE6n9pR6Ha9XjSvR7P8ui8G4kpo eXhn1u+0nv3OHeem9x9UGnhK5asGn20Lssx/Bm4o9n095mrk2CPTg4H+IQ8pNStRNDjC Hn1aXSjBdCpUyBvV4JyjMc0dHBhxodY9jZe2kZKgNyV5hR9jbQWaEAXs5fylqQBMn1Ew tpJw== X-Gm-Message-State: AOJu0Yxo5Tk0INK92A+MlkzYFu/n/GdidNHxcRcQ4fKvbapS59Kr9Nyd SUW/UeR2Yo3DUMNxU3qPL9CSRTRq6eDmlIA06+bxlGNAh5eFovWSpWhYjx6Zkw== X-Received: by 2002:a17:902:d4c9:b0:1e3:e257:2c8d with SMTP id o9-20020a170902d4c900b001e3e2572c8dmr9714710plg.11.1712629660427; Mon, 08 Apr 2024 19:27:40 -0700 (PDT) Received: from pholla1.c.googlers.com (210.73.125.34.bc.googleusercontent.com. [34.125.73.210]) by smtp.gmail.com with ESMTPSA id h7-20020a170902680700b001e2b4f513e1sm7880850plk.106.2024.04.08.19.27.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 19:27:40 -0700 (PDT) From: Pavan Holla Date: Tue, 09 Apr 2024 02:27:36 +0000 Subject: [PATCH v4 1/2] platform/chrome: Update ChromeOS EC header for UCSI Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240409-public-ucsi-h-v4-1-e770735222a2@chromium.org> References: <20240409-public-ucsi-h-v4-0-e770735222a2@chromium.org> In-Reply-To: <20240409-public-ucsi-h-v4-0-e770735222a2@chromium.org> To: Greg Kroah-Hartman , Heikki Krogerus , Benson Leung , Tzung-Bi Shih , Guenter Roeck Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Abhishek Pandit-Subedi , chrome-platform@lists.linux.dev, Pavan Holla X-Mailer: b4 0.12.4 Add EC host commands for reading and writing UCSI structures in the EC. The corresponding kernel driver is cros-ec-ucsi. Also update PD events supported by the EC. Signed-off-by: Pavan Holla --- include/linux/platform_data/cros_ec_commands.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/include/linux/platform_data/cros_ec_commands.h b/include/linux/platform_data/cros_ec_commands.h index ecc47d5fe239..c0f6d054a566 100644 --- a/include/linux/platform_data/cros_ec_commands.h +++ b/include/linux/platform_data/cros_ec_commands.h @@ -4933,6 +4933,8 @@ struct ec_response_pd_status { #define PD_EVENT_POWER_CHANGE BIT(1) #define PD_EVENT_IDENTITY_RECEIVED BIT(2) #define PD_EVENT_DATA_SWAP BIT(3) +#define PD_EVENT_TYPEC BIT(4) +#define PD_EVENT_PPM BIT(5) struct ec_response_host_event_status { uint32_t status; /* PD MCU host event status */ } __ec_align4; @@ -5994,6 +5996,24 @@ struct ec_response_typec_vdm_response { #undef VDO_MAX_SIZE +/* + * Read/write interface for UCSI OPM <-> PPM communication. + */ +#define EC_CMD_UCSI_PPM_SET 0x0140 + +/* The data size is stored in the host command protocol header. */ +struct ec_params_ucsi_ppm_set { + uint16_t offset; + uint8_t data[]; +} __ec_align2; + +#define EC_CMD_UCSI_PPM_GET 0x0141 + +struct ec_params_ucsi_ppm_get { + uint16_t offset; + uint8_t size; +} __ec_align2; + /*****************************************************************************/ /* The command range 0x200-0x2FF is reserved for Rotor. */ -- 2.44.0.478.gd926399ef9-goog