Commit 5c024e68 authored by Ricardo Cañuelo's avatar Ricardo Cañuelo Committed by Rob Herring

mfd: google,cros-ec: add missing properties

Add missing properties that are currently used in the examples of
subnode bindings and in many DTs.

Also updates the example in sound/google,cros-ec-codec.yaml to comply
with the google,cros-ec binding.
Reviewed-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: default avatarRicardo Cañuelo <ricardo.canuelo@collabora.com>
Link: https://lore.kernel.org/r/20201021114308.25485-4-ricardo.canuelo@collabora.com
[robh: Add missing '#address-cells' and '#size-cells']
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 50d68fee
...@@ -59,6 +59,14 @@ properties: ...@@ -59,6 +59,14 @@ properties:
whether this nvram is present or not. whether this nvram is present or not.
type: boolean type: boolean
mtk,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
device. Used to match the subnode to the rpmsg device announced by
the SCP.
$ref: "/schemas/types.yaml#/definitions/string"
spi-max-frequency: spi-max-frequency:
description: Maximum SPI frequency of the device in Hz. description: Maximum SPI frequency of the device in Hz.
...@@ -71,14 +79,54 @@ properties: ...@@ -71,14 +79,54 @@ properties:
wakeup-source: wakeup-source:
description: Button can wake-up the system. description: Button can wake-up the system.
'#address-cells':
const: 1
'#size-cells':
const: 0
typec:
$ref: "/schemas/chrome/google,cros-ec-typec.yaml#"
ec-pwm:
$ref: "/schemas/pwm/google,cros-ec-pwm.yaml#"
keyboard-controller: keyboard-controller:
$ref: "/schemas/input/google,cros-ec-keyb.yaml#" $ref: "/schemas/input/google,cros-ec-keyb.yaml#"
codecs:
type: object
additionalProperties: false
properties:
'#address-cells':
const: 2
'#size-cells':
const: 1
patternProperties:
"^ec-codec@[a-f0-9]+$":
type: object
$ref: "/schemas/sound/google,cros-ec-codec.yaml#"
required:
- "#address-cells"
- "#size-cells"
patternProperties: patternProperties:
"^i2c-tunnel[0-9]*$": "^i2c-tunnel[0-9]*$":
type: object type: object
$ref: "/schemas/i2c/google,cros-ec-i2c-tunnel.yaml#" $ref: "/schemas/i2c/google,cros-ec-i2c-tunnel.yaml#"
"^regulator@[0-9]+$":
type: object
$ref: "/schemas/regulator/google,cros-ec-regulator.yaml#"
"^extcon[0-9]*$":
type: object
$ref: "/schemas/extcon/extcon-usbc-cros-ec.yaml#"
required: required:
- compatible - compatible
......
...@@ -11,9 +11,10 @@ maintainers: ...@@ -11,9 +11,10 @@ maintainers:
description: | description: |
Google's ChromeOS EC codec is a digital mic codec provided by the Google's ChromeOS EC codec is a digital mic codec provided by the
Embedded Controller (EC) and is controlled via a host-command interface. Embedded Controller (EC) and is controlled via a host-command
An EC codec node should only be found as a sub-node of the EC node (see interface. An EC codec node should only be found inside the "codecs"
Documentation/devicetree/bindings/mfd/google,cros-ec.yaml). subnode of a cros-ec node.
(see Documentation/devicetree/bindings/mfd/google,cros-ec.yaml).
properties: properties:
compatible: compatible:
...@@ -54,14 +55,19 @@ examples: ...@@ -54,14 +55,19 @@ examples:
#size-cells = <0>; #size-cells = <0>;
cros-ec@0 { cros-ec@0 {
compatible = "google,cros-ec-spi"; compatible = "google,cros-ec-spi";
reg = <0>;
codecs {
#address-cells = <2>; #address-cells = <2>;
#size-cells = <1>; #size-cells = <1>;
reg = <0>;
cros_ec_codec: ec-codec@10500000 { cros_ec_codec: ec-codec@10500000 {
compatible = "google,cros-ec-codec"; compatible = "google,cros-ec-codec";
#sound-dai-cells = <1>; #sound-dai-cells = <1>;
reg = <0x0 0x10500000 0x80000>; reg = <0x0 0x10500000 0x80000>;
memory-region = <&reserved_mem>; memory-region = <&reserved_mem>;
}; };
};
}; };
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment