Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1387687rdb; Fri, 9 Feb 2024 23:10:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IH1ICxMcSU09a0sZaCsgXCowL8pp6Ug7oCWQKqhPjfHBQGiOnmim1R05lYHKwR7s61mY1Fn X-Received: by 2002:a17:906:354a:b0:a3c:6a8:e3c3 with SMTP id s10-20020a170906354a00b00a3c06a8e3c3mr865588eja.1.1707549012001; Fri, 09 Feb 2024 23:10:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707549011; cv=pass; d=google.com; s=arc-20160816; b=donnHv2Guhuy7E5iszn+vZ51UFgXdhluSLwapccwSM9ya3/1OC96KZPw8iqe961MMQ pR43UQiU3CXsIhONNPHAquw00PAmZjDCwrb9H+mRNe8B+/FY0zDWFEh805XLP9gdxaJ+ gLZ+q8SA+k6g7RCVJZA4ctzdHyzaKuaryDCNA9OWn9C3ncufjwan9bYdgNkT4KNXusN1 qKL3kVP0hg+WqDdej89hwQZ7wv6S2CEYuwdRjrffcXSq1TXFUd4F0nP7aa8et/KNLfIu ohlF/uMn2z/gXbrqd20NNgid5wiL8bxfpJmVfuargCBgftB6AF9E1sszBnjydaAWzIjE vvsA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=q+i5FQpJgQZM9grJNtVDZ+U7TB243p9ucbtyKq1qJsw=; fh=K3HYyiUIVORBTGl2oclKz1pG2UE4jFMp+4Meb9le49M=; b=v8s0b9lOp71BCSkPH8K2wVKJJWpQRua+/K7QrQOBbLnhsQBmwSul60DDGsPCOiGuhS FbKKRWT4prREOHLv3IBpeSuuN5blKNcPFI8/C1G1LFOZq6qG+CnIzWbMDvUn1Lo0/c0G SrTA1W3GolLA6nGh1oFR7duR9GqYZwaP/dkwqukfSGKn1GCbqw+1g2mXr1+LzMbEhgFL NQ7b/b0HUJVglQkBDBf8VCGfmQ5ylC4r5DVVuZdW1M4Ox8K99mCE4Jg2MWRhEWNX3aOL PmvsUZLV7kEIQljMb7s7go4Ho/j3Wp3ivqzYFkVgV6ROjGbSYc2egNuL3oBtLkcMZnBU HmLw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ncUZbEt4; 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-60307-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60307-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org X-Forwarded-Encrypted: i=2; AJvYcCXp/4ZN4OXrXL3ihT7S1dLTKBpArSsYRcPFmz1rSLQqkSXcXjlIqS92D4DefR3c6DHzeroXTQe9Tgf/mQ/9PN1weAZOiYN+ZOtTRE+kow== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ku19-20020a170907789300b00a37b3ed0a95si1700964ejc.189.2024.02.09.23.10.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 23:10:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60307-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ncUZbEt4; 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-60307-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60307-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 69C5B1F24475 for ; Sat, 10 Feb 2024 07:10:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 85ED6328DB; Sat, 10 Feb 2024 07:09:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ncUZbEt4" Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) (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 B5CB325619 for ; Sat, 10 Feb 2024 07:09:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707548983; cv=none; b=SwSSHkd+5nHj5qYDf4pBZYw2K8EVmfD9FaT+e/+uvFV6LiDQwAoW+NbRsR5SkhESMvejZjV481lh5WOSLWleB1CxKrFA7SYyvEPprEygOZ7DuGBdgp68yH1E0Ggs9+Cqq0RX66G+42uyqmOn2JeBnNLs+ZRPPRsABv/gySYjZdA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707548983; c=relaxed/simple; bh=WXij6tQJVWGfA0jVq1TwtVWpf8MLUZF7maDtetHyCq8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tqLjtAaSFP3+2HVPcmyWXezUc3caONqfRg4h04i7GyT13w9cNCe1D1M/iVB+tRtSHIgIYookoKfMmBaoZsGcC0Gne8gmB9TrPqV5L8djz4x3gsOoBKwtI9fMkMm4Bgn6DWvuvpxV939ADNKjeLZGuGdv0ZiAAjvAjFUCfL9I8JQ= 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=ncUZbEt4; arc=none smtp.client-ip=209.85.215.172 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-f172.google.com with SMTP id 41be03b00d2f7-5ce6b5e3c4eso1277349a12.2 for ; Fri, 09 Feb 2024 23:09:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1707548981; x=1708153781; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=q+i5FQpJgQZM9grJNtVDZ+U7TB243p9ucbtyKq1qJsw=; b=ncUZbEt4RjEMhyWQ/qi54rYwzgQG+iBLYaLTjLTBugzcZVXaAN5z/Rpncyh3TX3O+Q LFMQc0L1Jpr+FaLKQrZ5e3CFeNAGiIbZkq2xKpegEd9LBvZGDyMuMYyCT0M9ewWzNhKo CoV/UI1iN6oLOfEO5c6GiG1wVK3KCMOAImUIY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707548981; x=1708153781; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=q+i5FQpJgQZM9grJNtVDZ+U7TB243p9ucbtyKq1qJsw=; b=w9K2Ef3aqPPXqp+D9jWWOrd3QvB0ypZP4v7hbe0vhTq4A4nDD5DzoM1LVEmDIIo7z+ IiBoqFTdVMhRYxHEvh5WN7LK5UnlC6mHF/u9yZoEjHLsF/jWyOtg6pzcVTZI07LDxeP/ x4nwn37sUJxbhtqX6nXKQzgHu6lxPSyPRItQVajTND+QFfDfB39Ka3nq04mo5lVYjh4e NXd2y+vNdhjgvLXFxRtvMa+oWGhKkVs7VyRq9J0LLy6xxGD62AKL2vbWTKdXBvfGgfy5 M64EOfuyTqlvbhD9/JuYleizQK2pjwtiGZZy2M0ddlbbIXfkm+Lpmfucs384ci3uBtyn iEUA== X-Gm-Message-State: AOJu0YwHP5MC5FJvzDBRTkPDZMNlI8kTMbISX21OZDrTqQ3yi0ARDiMv 7y9oBXW8bFr1BH/kXCJEhfKqh6301aeX/QgTglWhf6GJsKE+owghknOu2/HX+w== X-Received: by 2002:a05:6a00:990:b0:6e0:6c89:e30b with SMTP id u16-20020a056a00099000b006e06c89e30bmr2062527pfg.19.1707548981026; Fri, 09 Feb 2024 23:09:41 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXfaOQFPe2ptrEFchii8p8d5wFLx6aGOVBzgPCXZjXz6vMArnzaBrz54ebBSrY7Rc7Zb7W2VUAj9BdKIpE0W9dkz5cxBOzIBdQ4QU0l/WvK0O7VjhRWZMwqOXXJ5ykMFpmTSqgratP/faTwzXpvQwn39FSfIVAhwQwraGaTVviZc4cp5j3/BD5CdKGz4B69dvTKZDYXQVUFxLlqnjUvGKFk/DOrZ2zHtEL4xejpVDpzr3Dej3ggRlW+HoqkdCsWPepKV9T+nn9nGOIx4uY7HkdsNGhKIBRFHvFYOERt3EAfj1LY3bkRx0U41mzkKYcK1byjGEHYtEjLSBA3XWVqiZEGmSVaJTnW7QekqO11p2FvukW0hU6g6S8g5ev5eGJBl644kRvLYhHhmgIt237GF/RFZeOSkp6lJLy6lhPpBTyHf9wAeXRDf4/GfAKkUsAuhXX6e5pxcnu723SER6nLBovy4WVE9TkC2SLLkdafuZ/oWR/6aqc7YxZlFlDXXfwdiEzrdLr2sP1bzMCNmf2WF+hM6HhJXzB0gz/8ZcEMMipVJH9k Received: from localhost (175.199.125.34.bc.googleusercontent.com. [34.125.199.175]) by smtp.gmail.com with UTF8SMTPSA id z16-20020aa78890000000b006dff3ca9e26sm1635066pfe.102.2024.02.09.23.09.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Feb 2024 23:09:40 -0800 (PST) From: Stephen Boyd To: chrome-platform@lists.linux.dev Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Douglas Anderson , Pin-yen Lin , Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Benson Leung , Guenter Roeck , linux-gpio@vger.kernel.org Subject: [PATCH 01/22] dt-bindings: gpio: Add binding for ChromeOS EC GPIO controller Date: Fri, 9 Feb 2024 23:09:12 -0800 Message-ID: <20240210070934.2549994-2-swboyd@chromium.org> X-Mailer: git-send-email 2.43.0.687.g38aa6559b0-goog In-Reply-To: <20240210070934.2549994-1-swboyd@chromium.org> References: <20240210070934.2549994-1-swboyd@chromium.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The ChromeOS embedded controller (EC) supports setting the state of GPIOs when the system is unlocked, and getting the state of GPIOs in all cases. The GPIOs are on the EC itself, so the EC acts similar to a GPIO expander. Add a binding to describe these GPIOs in DT so that other devices described in DT can read the GPIOs on the EC. Cc: Linus Walleij Cc: Bartosz Golaszewski Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Conor Dooley Cc: Lee Jones Cc: Benson Leung Cc: Guenter Roeck Cc: Cc: Cc: Cc: Pin-yen Lin Signed-off-by: Stephen Boyd --- .../bindings/gpio/google,cros-ec-gpio.yaml | 49 +++++++++++++++++++ .../bindings/mfd/google,cros-ec.yaml | 3 ++ 2 files changed, 52 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/google,cros-ec-gpio.yaml diff --git a/Documentation/devicetree/bindings/gpio/google,cros-ec-gpio.yaml b/Documentation/devicetree/bindings/gpio/google,cros-ec-gpio.yaml new file mode 100644 index 000000000000..a9f1d7784070 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/google,cros-ec-gpio.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/google,cros-ec-gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: GPIOs controlled by ChromeOS EC + +maintainers: + - Stephen Boyd + +description: + Google's ChromeOS EC has a gpio controller inside the Embedded Controller + (EC) and controlled via a host-command interface. The node for this + device should be under a cros-ec node like google,cros-ec-spi. + +properties: + compatible: + const: google,cros-ec-gpio + + '#gpio-cells': + const: 2 + + gpio-controller: true + +required: + - compatible + - '#gpio-cells' + - gpio-controller + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + cros-ec@0 { + compatible = "google,cros-ec-spi"; + reg = <0>; + interrupts = <101 0>; + gpio { + compatible = "google,cros-ec-gpio"; + gpio-controller; + #gpio-cells = <2>; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml index e1ca4f297c6d..ded396b28fba 100644 --- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml +++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml @@ -93,6 +93,9 @@ properties: '#size-cells': const: 0 + gpio: + $ref: /schemas/gpio/google,cros-ec-gpio.yaml# + typec: $ref: /schemas/chrome/google,cros-ec-typec.yaml# -- https://chromeos.dev