From patchwork Thu May 12 01:39:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 12846780 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (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 E272B19E for ; Thu, 12 May 2022 01:39:24 +0000 (UTC) Received: by mail-pl1-f173.google.com with SMTP id i1so3503010plg.7 for ; Wed, 11 May 2022 18:39:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7JY5OzjYLJW7Rr2xhfmPsDoAWZorsrA3jl8llvrg60E=; b=CkbH1Acr8lJ87fJOrQbgEx6SXYUoJXQllKefeIvEIVc9ckF4mlXxwIg7sw5ZIFZlSe KPJjJIAqpwQbuH7l4JyD2iVzLh5bvZm9hjLt26yPw3vUAfgk2aLAZbY8wpy01RPQ/lEc F8tgykp8v+d9SqCWc7+78bNTntl3w3Fp5AdDE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7JY5OzjYLJW7Rr2xhfmPsDoAWZorsrA3jl8llvrg60E=; b=RjN2uRPjYDVsqqHWUdO4TLdiWQpOp1s2MZvzYAePIHhZhKvMXocNbYUCBPpSFQyBPY K1fJD7r45JHmRGxi3yiKlj9DLmu9vRh+4QcO7B5nhsV5AKHCxgHVxobXt1Nwh18UHWPs gQkUcq3Ll0fE+COvbkyOiGiajklgIkqhxyqAeGWsBTzJ3Edqmrc+j+pjCIQ4DVP26W4U TNNs1nJpXXEUU28NEmlbocWiiuFXW4wk+6I+VW0gRG+TuNRzeUJL+ZR5Uw/G+n18D/qa ahKxEu4SiCLOiWpRTFWakq0Pcq678gBtkqSn1ez4fMA5G5tpAU0TqwcBme18Eb6iM4CJ Yf1w== X-Gm-Message-State: AOAM532q6BTQkyXj2QzskBTc2/yfMMLEmqNkCrWGwWCVqeHYYyj12+u4 XkjXRNOr4Ao4Tq7reNNi/pxH8A== X-Google-Smtp-Source: ABdhPJyMdRve7kEm91mSg9IVhIAWNGEF5IkkT0N0gEDCWsFRkKDNGC0YEfyDiZM6EpOoVX3qLxOpTA== X-Received: by 2002:a17:902:f68a:b0:15e:b12d:f4a1 with SMTP id l10-20020a170902f68a00b0015eb12df4a1mr27586276plg.166.1652319564440; Wed, 11 May 2022 18:39:24 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:201:193f:f17a:ab0d:1f83]) by smtp.gmail.com with ESMTPSA id b7-20020a170902d50700b0015e8d4eb2cfsm2614766plg.281.2022.05.11.18.39.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 18:39:24 -0700 (PDT) From: Stephen Boyd To: Rob Herring Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, devicetree@vger.kernel.org, Krzysztof Kozlowski , chrome-platform@lists.linux.dev, Guenter Roeck , Douglas Anderson , Craig Hesling , Tom Hughes , Alexandru M Stan , Tzung-Bi Shih , Matthias Kaehlcke , Benson Leung , Lee Jones Subject: [PATCH v5 1/3] dt-bindings: cros-ec: Fix a typo in description Date: Wed, 11 May 2022 18:39:19 -0700 Message-Id: <20220512013921.164637-2-swboyd@chromium.org> X-Mailer: git-send-email 2.36.0.512.ge40c2bad7a-goog In-Reply-To: <20220512013921.164637-1-swboyd@chromium.org> References: <20220512013921.164637-1-swboyd@chromium.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 A 's/pf/of/' on rpmsg-name description. Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Cc: Cc: Guenter Roeck Cc: Douglas Anderson Cc: Craig Hesling Cc: Tom Hughes Cc: Alexandru M Stan Cc: Tzung-Bi Shih Cc: Matthias Kaehlcke Cc: Benson Leung Cc: Lee Jones Signed-off-by: Stephen Boyd Reviewed-by: Guenter Roeck Acked-by: Rob Herring --- Documentation/devicetree/bindings/mfd/google,cros-ec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml index d1f53bd449f7..99eda9ab0651 100644 --- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml +++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml @@ -61,7 +61,7 @@ properties: mediatek,rpmsg-name: description: Must be defined if the cros-ec is a rpmsg device for a Mediatek - ARM Cortex M4 Co-processor. Contains the name pf the rpmsg + ARM Cortex M4 Co-processor. Contains the name of the rpmsg device. Used to match the subnode to the rpmsg device announced by the SCP. $ref: "/schemas/types.yaml#/definitions/string" From patchwork Thu May 12 01:39:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 12846781 Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) (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 E4A4D19F for ; Thu, 12 May 2022 01:39:25 +0000 (UTC) Received: by mail-pg1-f174.google.com with SMTP id r71so2940306pgr.0 for ; Wed, 11 May 2022 18:39:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8zSnMogrcWQWE/BuKkywg38wliZCVpEBThDjWjcPWOM=; b=VtUFbwwa5/ZVmUeo8CaGLWIcDdTY2xAxytCChncda0yPaC9e9mDt8yzSz+ehaOeQK0 hZGEVS9QRMY37sc00EMUzg6XHVfhP0S2QEqTzPV+KsmF/JV2YzXbNGjDORZDxsh/Qe+L Ja/impLhIi9fXS/4Lw9wrdFzuygfqeL/GFJ3A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8zSnMogrcWQWE/BuKkywg38wliZCVpEBThDjWjcPWOM=; b=R2CpI/xRaMYTSQ7LCMxwf9/XSQYG9uU9C7zEDGqvkEerVHEzok7YTNsBrzy7MKbEY4 q6I4syo+BsRh4Ha2JYQ0XkXYJnGOeEX9tV2szTgm231seVFTX2XM42hnCTBgUE5UaZDw LH8hRxLYEWfAWPPtxK2I0uAHe77YSjkKowr+UD8K+4MeNSKv+sUPY53diNAx2gqQkWFg k6halUotRAhvO2GHZcfJkT6INPBVa5OKNV5KZSK4Kvx8Yi4Bt8RuRjtid2T5uHybKUnU q9cFUFgzL8d0Sm0MuM8YG9yz59JY5KOjTjexXhVCwSUAVXPoLdMINoJSwWse5BgoiTLR y+jw== X-Gm-Message-State: AOAM531vGOAZzwvV+IAZXEb3FZ0qvO8IZ2cJiZiZwJWjAQ1VUM3n6BVf h2Ix+2gSmN/p/1iyMyP7sdP8PQ== X-Google-Smtp-Source: ABdhPJxtiZh2m0y02v4j2QxOoyQY+ZdeZXDWZV/CYYwyTocpEeBMbULAKws0Jzek6ic03DqmxVxQjQ== X-Received: by 2002:a65:4807:0:b0:3aa:3050:e24 with SMTP id h7-20020a654807000000b003aa30500e24mr23119709pgs.299.1652319565441; Wed, 11 May 2022 18:39:25 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:201:193f:f17a:ab0d:1f83]) by smtp.gmail.com with ESMTPSA id b7-20020a170902d50700b0015e8d4eb2cfsm2614766plg.281.2022.05.11.18.39.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 18:39:25 -0700 (PDT) From: Stephen Boyd To: Rob Herring Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, devicetree@vger.kernel.org, Krzysztof Kozlowski , chrome-platform@lists.linux.dev, Guenter Roeck , Douglas Anderson , Craig Hesling , Tom Hughes , Alexandru M Stan , Tzung-Bi Shih , Matthias Kaehlcke , Benson Leung , Lee Jones Subject: [PATCH v5 2/3] dt-bindings: cros-ec: Reorganize property availability Date: Wed, 11 May 2022 18:39:20 -0700 Message-Id: <20220512013921.164637-3-swboyd@chromium.org> X-Mailer: git-send-email 2.36.0.512.ge40c2bad7a-goog In-Reply-To: <20220512013921.164637-1-swboyd@chromium.org> References: <20220512013921.164637-1-swboyd@chromium.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Various properties in the cros-ec binding only apply to different compatible strings. For example, the interrupts and reg property are required for all cros-ec devices except for the rpmsg version. Add some conditions to update the availability of properties so that they can't be used with compatibles that don't support them. Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Cc: Cc: Guenter Roeck Cc: Douglas Anderson Cc: Craig Hesling Cc: Tom Hughes Cc: Alexandru M Stan Cc: Tzung-Bi Shih Cc: Matthias Kaehlcke Cc: Benson Leung Cc: Lee Jones Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Acked-by: Rob Herring --- .../bindings/mfd/google,cros-ec.yaml | 39 +++++++++++++------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml index 99eda9ab0651..409ecef967ce 100644 --- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml +++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml @@ -148,18 +148,33 @@ patternProperties: required: - compatible -if: - properties: - compatible: - contains: - enum: - - google,cros-ec-i2c - - google,cros-ec-rpmsg -then: - properties: - google,cros-ec-spi-pre-delay: false - google,cros-ec-spi-msg-delay: false - spi-max-frequency: false +allOf: + - if: + properties: + compatible: + not: + contains: + const: google,cros-ec-spi + then: + properties: + controller-data: false + google,cros-ec-spi-pre-delay: false + google,cros-ec-spi-msg-delay: false + spi-max-frequency: false + + - if: + properties: + compatible: + not: + contains: + const: google,cros-ec-rpmsg + then: + properties: + mediatek,rpmsg-name: false + + required: + - reg + - interrupts additionalProperties: false From patchwork Thu May 12 01:39:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 12846782 Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) (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 DE46515BE for ; Thu, 12 May 2022 01:39:26 +0000 (UTC) Received: by mail-pj1-f48.google.com with SMTP id x88so3825042pjj.1 for ; Wed, 11 May 2022 18:39:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OKsiMTO05pP2YFIGQs4jSS3mDepImUu3DLLTqj1JC+E=; b=YsayhIWOka75EoI2fzwHCCftn/Bb9jwmP/Rkx1xwXG9vjaIK2W0w0dUR3AAOr6r2Oe XonHI7AKz/OGZFdSX/xhBM/WsB3QQR9homjoWpklpdW2aQ3t2N0JI7Qm44zoJcYE3r0d TLEHZusT57YAmYqkJuMTvRpsLVn6DR2UuXZlg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OKsiMTO05pP2YFIGQs4jSS3mDepImUu3DLLTqj1JC+E=; b=gy16LCeG/2p8Mjur7JAoIojL5w1Qm3zYxsc1xUC1OSWbKrw0SYeGcmtDHW05/5UEd6 Zb5gF/lOvgc3GGdi/xbrpibdfN7l2ZNFIkdoYuXrjGkaI0jrCmqbH1NPu32BBrXUuBbI WBdzTK541Z0z+7Jtjg6qW4k2UNN9RsUqtefYnxl8M1zZa4//KPCCI+gxQtUj3AgQU0D3 msjCpMinKl3noFHjWHfvSqUjXlDitOwqa8yHKk36sqAB3ubk0SS+s3aV78YrYH9dXWix 2rCflZ5whpx7ne/ufHREsQiA4P9tG50eeJWUjZBejNJCDXoUl8m+BunIrSChuKHmVMzF S92Q== X-Gm-Message-State: AOAM533Qryk7tpWk3jnAVDVxWzLMWLq/6iUfm4xWLet1iprxhTgcEwg9 839YMI1sgF1g8EEuUVSzdEeUwA== X-Google-Smtp-Source: ABdhPJz5juvszW0WlRxr8OLPLsBo/MwprcIaMIxuhi+YYdwUVFMtA53XzJ8ap+j44qKXzkn75exLhQ== X-Received: by 2002:a17:902:e94e:b0:158:91e6:501 with SMTP id b14-20020a170902e94e00b0015891e60501mr28053817pll.29.1652319566414; Wed, 11 May 2022 18:39:26 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:201:193f:f17a:ab0d:1f83]) by smtp.gmail.com with ESMTPSA id b7-20020a170902d50700b0015e8d4eb2cfsm2614766plg.281.2022.05.11.18.39.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 18:39:26 -0700 (PDT) From: Stephen Boyd To: Rob Herring Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, devicetree@vger.kernel.org, Krzysztof Kozlowski , chrome-platform@lists.linux.dev, Guenter Roeck , Douglas Anderson , Craig Hesling , Tom Hughes , Alexandru M Stan , Tzung-Bi Shih , Matthias Kaehlcke , Benson Leung , Lee Jones Subject: [PATCH v5 3/3] dt-bindings: cros-ec: Add ChromeOS fingerprint binding Date: Wed, 11 May 2022 18:39:21 -0700 Message-Id: <20220512013921.164637-4-swboyd@chromium.org> X-Mailer: git-send-email 2.36.0.512.ge40c2bad7a-goog In-Reply-To: <20220512013921.164637-1-swboyd@chromium.org> References: <20220512013921.164637-1-swboyd@chromium.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add a binding to describe the fingerprint processor found on Chromebooks with a fingerprint sensor. Previously we've been describing this with the google,cros-ec-spi binding but it lacks gpio and regulator control used during firmware flashing. Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Cc: Cc: Guenter Roeck Cc: Douglas Anderson Cc: Craig Hesling Cc: Tom Hughes Cc: Alexandru M Stan Cc: Tzung-Bi Shih Cc: Matthias Kaehlcke Cc: Benson Leung Cc: Lee Jones Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson --- .../bindings/mfd/google,cros-ec.yaml | 80 ++++++++++++++++--- 1 file changed, 71 insertions(+), 9 deletions(-) diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml index 409ecef967ce..e5fe60beb9fe 100644 --- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml +++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml @@ -19,15 +19,19 @@ description: properties: compatible: oneOf: - - description: - For implementations of the EC is connected through I2C. - const: google,cros-ec-i2c - - description: - For implementations of the EC is connected through SPI. - const: google,cros-ec-spi - - description: - For implementations of the EC is connected through RPMSG. - const: google,cros-ec-rpmsg + # For implementations of the EC is connected through I2C. + - items: + - const: google,cros-ec-i2c + # For implementations of the FPMCU connected through SPI. + - items: + - const: google,cros-ec-fp + - const: google,cros-ec-spi + # For implementations of the EC is connected through SPI. + - items: + - const: google,cros-ec-spi + # For implementations of the EC is connected through RPMSG. + - items: + - const: google,cros-ec-rpmsg controller-data: description: @@ -132,6 +136,15 @@ properties: additionalProperties: false + reset-gpios: + maxItems: 1 + + boot0-gpios: + maxItems: 1 + description: Assert for bootloader mode. + + vdd-supply: true + patternProperties: "^i2c-tunnel[0-9]*$": type: object @@ -176,6 +189,37 @@ allOf: - reg - interrupts + - if: + properties: + compatible: + contains: + const: google,cros-ec-fp + then: + properties: + '#address-cells': false + '#size-cells': false + typec: false + ec-pwm: false + keyboard-controller: false + proximity: false + codecs: false + cbas: false + + patternProperties: + "^i2c-tunnel[0-9]*$": false + "^regulator@[0-9]+$": false + "^extcon[0-9]*$": false + + required: + - reset-gpios + - boot0-gpios + - vdd-supply + else: + properties: + reset-gpios: false + boot0-gpios: false + vdd-supply: false + additionalProperties: false examples: @@ -231,4 +275,22 @@ examples: compatible = "google,cros-ec-rpmsg"; }; }; + + - | + #include + #include + spi { + #address-cells = <0x1>; + #size-cells = <0x0>; + ec@0 { + compatible = "google,cros-ec-fp", "google,cros-ec-spi"; + reg = <0>; + interrupt-parent = <&gpio_controller>; + interrupts = <4 IRQ_TYPE_LEVEL_LOW>; + spi-max-frequency = <3000000>; + reset-gpios = <&gpio_controller 5 GPIO_ACTIVE_LOW>; + boot0-gpios = <&gpio_controller 10 GPIO_ACTIVE_HIGH>; + vdd-supply = <&pp3300_fp_mcu>; + }; + }; ...