160 lines · yaml
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause2%YAML 1.23---4$id: http://devicetree.org/schemas/sound/cirrus,cs35l45.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Cirrus Logic CS35L45 Speaker Amplifier8 9maintainers:10 - Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>11 - Richard Fitzgerald <rf@opensource.cirrus.com>12 13description: |14 CS35L45 is a Boosted Mono Class D Amplifier with DSP15 Speaker Protection and Adaptive Battery Management.16 17allOf:18 - $ref: dai-common.yaml#19 20properties:21 compatible:22 enum:23 - cirrus,cs35l4524 25 reg:26 maxItems: 127 28 interrupts:29 maxItems: 130 31 '#sound-dai-cells':32 const: 133 34 reset-gpios:35 maxItems: 136 37 vdd-a-supply:38 description: voltage regulator phandle for the VDD_A supply39 40 vdd-batt-supply:41 description: voltage regulator phandle for the VDD_BATT supply42 43 spi-max-frequency:44 maximum: 500000045 46 cirrus,asp-sdout-hiz-ctrl:47 description:48 Audio serial port SDOUT Hi-Z control. Sets the Hi-Z49 configuration for SDOUT pin of amplifier. Logical OR of50 CS35L45_ASP_TX_HIZ_xxx values.51 $ref: /schemas/types.yaml#/definitions/uint3252 minimum: 053 maximum: 354 default: 255 56patternProperties:57 "^cirrus,gpio-ctrl[1-3]$":58 description:59 GPIO pins configuration.60 type: object61 additionalProperties: false62 properties:63 gpio-dir:64 description:65 GPIO pin direction. Valid only when 'gpio-ctrl' is 166 0 = Output67 1 = Input68 $ref: /schemas/types.yaml#/definitions/uint3269 minimum: 070 maximum: 171 default: 172 gpio-lvl:73 description:74 GPIO level. Valid only when 'gpio-ctrl' is 1 and 'gpio-dir' is 075 0 = Low76 1 = High77 $ref: /schemas/types.yaml#/definitions/uint3278 minimum: 079 maximum: 180 default: 081 gpio-op-cfg:82 description:83 GPIO level. Valid only when 'gpio-ctrl' is 1 and 'gpio-dir' is 084 0 = CMOS85 1 = Open Drain86 $ref: /schemas/types.yaml#/definitions/uint3287 minimum: 088 maximum: 189 default: 090 gpio-pol:91 description:92 GPIO output polarity select. Valid only when 'gpio-ctrl' is 193 and 'gpio-dir' is 094 0 = Non-inverted, Active High95 1 = Inverted, Active Low96 $ref: /schemas/types.yaml#/definitions/uint3297 minimum: 098 maximum: 199 default: 0100 gpio-ctrl:101 description:102 Defines the function of the GPIO pin.103 GPIO1104 0 = High impedance input105 1 = Pin acts as a GPIO, direction controlled by 'gpio-dir'106 2 = Pin acts as MDSYNC, direction controlled by MDSYNC107 3-7 = Reserved108 GPIO2109 0 = High impedance input110 1 = Pin acts as a GPIO, direction controlled by 'gpio-dir'111 2 = Pin acts as open drain INT112 3 = Reserved113 4 = Pin acts as push-pull output INT. Active low.114 5 = Pin acts as push-pull output INT. Active high.115 6,7 = Reserved116 GPIO3117 0 = High impedance input118 1 = Pin acts as a GPIO, direction controlled by 'gpio-dir'119 2-7 = Reserved120 $ref: /schemas/types.yaml#/definitions/uint32121 minimum: 0122 maximum: 7123 default: 0124required:125 - compatible126 - reg127 - "#sound-dai-cells"128 129unevaluatedProperties: false130 131examples:132 - |133 #include <dt-bindings/sound/cs35l45.h>134 spi {135 #address-cells = <1>;136 #size-cells = <0>;137 138 cs35l45: cs35l45@2 {139 #sound-dai-cells = <1>;140 compatible = "cirrus,cs35l45";141 reg = <2>;142 spi-max-frequency = <5000000>;143 vdd-a-supply = <&dummy_vreg>;144 vdd-batt-supply = <&dummy_vreg>;145 reset-gpios = <&gpio 110 0>;146 cirrus,asp-sdout-hiz-ctrl = <(CS35L45_ASP_TX_HIZ_UNUSED |147 CS35L45_ASP_TX_HIZ_DISABLED)>;148 cirrus,gpio-ctrl1 {149 gpio-ctrl = <0x2>;150 };151 cirrus,gpio-ctrl2 {152 gpio-ctrl = <0x2>;153 };154 cirrus,gpio-ctrl3 {155 gpio-ctrl = <0x1>;156 gpio-dir = <0x1>;157 };158 };159 };160