dt-bindings: cros-ec: Update for fingerprint devices
Subsystems (9)
v7 cover dt-bindings: cros-ec: Update for fingerprint devices
This patch series introduces a DT binding for chromeos fingerprint devices. The first patch tightens up the existing cros-ec binding and the second patch introduces the fingerprint binding. As there aren't any driver patches this can go directly through the chrome platform tree or the dt-binding tree or the mfd tree. I sent it to the binding maintainers in hopes it can go there directly but it doesn't really matter.
Changes from v6 (https://lore.kernel.org/r/[email protected]):
* Put back into the same cros-ec binding file again
* Gave up trying to make it use additionalProperties: false and added a comment instead
* Made symmetric for the spi and rpmsg case
Changes from v5 (https://lore.kernel.org/r/[email protected]):
* Split out to different binding file again, while using 'select'
* Fixed examples to have required interrupts property for cros-ec-spi
Changes from v4 (https://lore.kernel.org/r/[email protected]):
* Drop last patch that implemented driver logic
* Drop second to last patch because it's not really needed until compatible is used.
* Rolled cros-ec-spi into cros-ec-fp compatible to get all the pieces
Changes from v3 (https://lore.kernel.org/r/[email protected]):
* Drop spi_device_id because it isn't used
* Dropped struct members for gpios
* Picked up tags
Changes from v2 (https://lore.kernel.org/r/[email protected]):
* Dropped cros-ec spi dt properties that aren't of use right now
* Picked up tags
Changes from v1 (https://lore.kernel.org/r/[email protected]):
* Properly do the boot sequence
* Add a message that we're booting and delaying a while
* Fix typo in commit text
* Change binding to not spell out reset-gpios and indicate that boot0
is about asserting boot mode
* Split device id to different patch as it's a different topic from booting
Stephen Boyd (2):
dt-bindings: cros-ec: Reorganize and enforce property availability
dt-bindings: cros-ec: Add ChromeOS fingerprint binding
.../bindings/chrome/google,cros-ec-typec.yaml | 1 + .../chrome/google,cros-kbd-led-backlight.yaml | 1 + .../bindings/extcon/extcon-usbc-cros-ec.yaml | 1 + .../i2c/google,cros-ec-i2c-tunnel.yaml | 1 + .../bindings/mfd/google,cros-ec.yaml | 103 +++++++++++++++--- .../bindings/pwm/google,cros-ec-pwm.yaml | 1 + .../regulator/google,cros-ec-regulator.yaml | 1 + .../bindings/sound/google,cros-ec-codec.yaml | 1 + 8 files changed, 97 insertions(+), 13 deletions(-)
base-commit: 9abf2313adc1ca1b6180c508c25f22f9395cc780
Signature · 1 line
https://chromeos.dev
PATCH v7 1/2 dt-bindings: cros-ec: Reorganize and enforce property availability
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.
This reveals that many of the examples in bindings that use cros-ec were missing the interrupts property. Add the property to make those bindings whole again.
--- .../bindings/chrome/google,cros-ec-typec.yaml | 1 + .../chrome/google,cros-kbd-led-backlight.yaml | 1 + .../bindings/extcon/extcon-usbc-cros-ec.yaml | 1 + .../i2c/google,cros-ec-i2c-tunnel.yaml | 1 + .../bindings/mfd/google,cros-ec.yaml | 36 ++++++++++++------- .../bindings/pwm/google,cros-ec-pwm.yaml | 1 + .../regulator/google,cros-ec-regulator.yaml | 1 + .../bindings/sound/google,cros-ec-codec.yaml | 1 + 8 files changed, 30 insertions(+), 13 deletions(-)
Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml +1 -0
@@ -48,6 +48,7 @@ examples: cros_ec: ec@0 { compatible = "google,cros-ec-spi"; reg = <0>; + interrupts = <35 0>; typec { compatible = "google,cros-ec-typec";
Documentation/devicetree/bindings/chrome/google,cros-kbd-led-backlight.yaml +1 -0
@@ -27,6 +27,7 @@ examples: cros_ec: ec@0 { compatible = "google,cros-ec-spi"; reg = <0>; + interrupts = <15 0>; kbd-led-backlight { compatible = "google,cros-kbd-led-backlight";
Documentation/devicetree/bindings/extcon/extcon-usbc-cros-ec.yaml +1 -0
@@ -40,6 +40,7 @@ examples: cros-ec@0 { compatible = "google,cros-ec-spi"; reg = <0>; + interrupts = <44 0>; usbc_extcon0: extcon0 { compatible = "google,extcon-usbc-cros-ec";
Documentation/devicetree/bindings/i2c/google,cros-ec-i2c-tunnel.yaml +1 -0
@@ -47,6 +47,7 @@ examples: compatible = "google,cros-ec-spi"; reg = <0>; spi-max-frequency = <5000000>; + interrupts = <99 0>; i2c-tunnel { compatible = "google,cros-ec-i2c-tunnel";
Documentation/devicetree/bindings/mfd/google,cros-ec.yaml +23 -13
@@ -20,19 +20,16 @@ properties: compatible: oneOf: - description: - For implementations of the EC is connected through I2C. + For implementations of the EC connected through I2C. const: google,cros-ec-i2c - description: - For implementations of the EC is connected through SPI. + For implementations of the EC connected through SPI. const: google,cros-ec-spi - description: - For implementations of the EC is connected through RPMSG. + For implementations of the EC connected through RPMSG. const: google,cros-ec-rpmsg - controller-data: - description: - SPI controller data, see bindings/spi/samsung,spi-peripheral-props.yaml - type: object + controller-data: true google,cros-ec-spi-pre-delay: description:
@@ -62,8 +59,7 @@ properties: the SCP. $ref: "/schemas/types.yaml#/definitions/string" - spi-max-frequency: - description: Maximum SPI frequency of the device in Hz. + spi-max-frequency: true reg: maxItems: 1
@@ -155,18 +151,32 @@ allOf: - if: properties: compatible: - contains: - enum: - - google,cros-ec-i2c - - google,cros-ec-rpmsg + 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 else: $ref: /schemas/spi/spi-peripheral-props.yaml + - if: + properties: + compatible: + not: + contains: + const: google,cros-ec-rpmsg + then: + properties: + mediatek,rpmsg-name: false + + required: + - reg + - interrupts + additionalProperties: false examples:
Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.yaml +1 -0
@@ -48,6 +48,7 @@ examples: cros-ec@0 { compatible = "google,cros-ec-spi"; reg = <0>; + interrupts = <101 0>; cros_ec_pwm: pwm { compatible = "google,cros-ec-pwm";
Documentation/devicetree/bindings/regulator/google,cros-ec-regulator.yaml +1 -0
@@ -41,6 +41,7 @@ examples: reg = <0>; #address-cells = <1>; #size-cells = <0>; + interrupts = <99 0>; regulator@0 { compatible = "google,cros-ec-regulator";
Documentation/devicetree/bindings/sound/google,cros-ec-codec.yaml +1 -0
@@ -57,6 +57,7 @@ examples: cros-ec@0 { compatible = "google,cros-ec-spi"; reg = <0>; + interrupts = <93 0>; codecs { #address-cells = <2>;
Signature · 1 line
https://chromeos.dev
PATCH v7 2/2 dt-bindings: cros-ec: Add ChromeOS fingerprint binding
In reply to Stephen BoydAdd 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.
--- .../bindings/mfd/google,cros-ec.yaml | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+)
Documentation/devicetree/bindings/mfd/google,cros-ec.yaml +67 -0
@@ -25,6 +25,11 @@ properties: - description: For implementations of the EC connected through SPI. const: google,cros-ec-spi + - description: + For implementations of the FPMCU connected through SPI. + items: + - const: google,cros-ec-fp + - const: google,cros-ec-spi - description: For implementations of the EC connected through RPMSG. const: google,cros-ec-rpmsg
@@ -67,6 +72,15 @@ properties: interrupts: maxItems: 1 + reset-gpios: + maxItems: 1 + + boot0-gpios: + maxItems: 1 + description: Assert for bootloader mode. + + vdd-supply: true + wakeup-source: description: Button can wake-up the system.
@@ -177,6 +191,41 @@ 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 + kbd-led-backlight: false + keyboard-controller: false + proximity: false + codecs: false + cbas: false + + patternProperties: + "^i2c-tunnel[0-9]*$": false + "^regulator@[0-9]+$": false + "^extcon[0-9]*$": false + + # Using additionalProperties: false here and + # listing true properties doesn't work + + required: + - reset-gpios + - boot0-gpios + - vdd-supply + else: + properties: + reset-gpios: false + boot0-gpios: false + vdd-supply: false + additionalProperties: false examples:
@@ -232,4 +281,22 @@ examples: compatible = "google,cros-ec-rpmsg"; }; }; + + # Example for FPMCU + - | + spi0 { + #address-cells = <0x1>; + #size-cells = <0x0>; + + ec@0 { + compatible = "google,cros-ec-fp", "google,cros-ec-spi"; + reg = <0x0>; + 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>; + }; + }; ...
Signature · 1 line
https://chromeos.dev
Re: [PATCH v7 2/2] dt-bindings: cros-ec: Add ChromeOS fingerprint binding
Quoted 19 lines · Stephen Boyd
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 <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc <[email protected]>Cc <[email protected]>Cc Guenter Roeck <[email protected]>Cc Douglas Anderson <[email protected]>Cc Craig Hesling <[email protected]>Cc Tom Hughes <[email protected]>Cc Alexandru M Stan <[email protected]>Cc Tzung-Bi Shih <[email protected]>Cc Matthias Kaehlcke <[email protected]>Cc Benson Leung <[email protected]>Cc Lee Jones <[email protected]>Signed-off-by Stephen Boyd <[email protected]>
Quoted 4 lines
--- .../bindings/mfd/google,cros-ec.yaml | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+)
This series was applied to chrome-platform/linux.git (for-kernelci) by Tzung-Bi Shih <[email protected]>:
Hello:
This series was applied to chrome-platform/linux.git (for-kernelci) by Tzung-Bi Shih <[email protected]>:
Quoted 9 lines · On Tue, 25 Oct 2022 17:36:39 -0700 you wrote:
This patch series introduces a DT binding for chromeos fingerprint devices. The first patch tightens up the existing cros-ec binding and the second patch introduces the fingerprint binding. As there aren't any driver patches this can go directly through the chrome platform tree or the dt-binding tree or the mfd tree. I sent it to the binding maintainers in hopes it can go there directly but it doesn't really matter.
[...]
Here is the summary with links:
- [v7,1/2] dt-bindings: cros-ec: Reorganize and enforce property availability
https://git.kernel.org/chrome-platform/c/7a2f36828c7b - [v7,2/2] dt-bindings: cros-ec: Add ChromeOS fingerprint binding https://git.kernel.org/chrome-platform/c/e068bc0b01cf
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
This series was applied to chrome-platform/linux.git (for-next) by Tzung-Bi Shih <[email protected]>:
Hello:
This series was applied to chrome-platform/linux.git (for-next) by Tzung-Bi Shih <[email protected]>:
Quoted 9 lines · On Tue, 25 Oct 2022 17:36:39 -0700 you wrote:
This patch series introduces a DT binding for chromeos fingerprint devices. The first patch tightens up the existing cros-ec binding and the second patch introduces the fingerprint binding. As there aren't any driver patches this can go directly through the chrome platform tree or the dt-binding tree or the mfd tree. I sent it to the binding maintainers in hopes it can go there directly but it doesn't really matter.
[...]
Here is the summary with links:
- [v7,1/2] dt-bindings: cros-ec: Reorganize and enforce property availability
https://git.kernel.org/chrome-platform/c/7a2f36828c7b - [v7,2/2] dt-bindings: cros-ec: Add ChromeOS fingerprint binding https://git.kernel.org/chrome-platform/c/e068bc0b01cf
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html