1d5b0e70fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2d5b0e70fSEmmanuel Vadot%YAML 1.2 3d5b0e70fSEmmanuel Vadot--- 4d5b0e70fSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/cirrus,cs35l45.yaml# 5d5b0e70fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6d5b0e70fSEmmanuel Vadot 7d5b0e70fSEmmanuel Vadottitle: Cirrus Logic CS35L45 Speaker Amplifier 8d5b0e70fSEmmanuel Vadot 9d5b0e70fSEmmanuel Vadotmaintainers: 10d5b0e70fSEmmanuel Vadot - Ricardo Rivera-Matos <rriveram@opensource.cirrus.com> 11d5b0e70fSEmmanuel Vadot - Richard Fitzgerald <rf@opensource.cirrus.com> 12d5b0e70fSEmmanuel Vadot 13d5b0e70fSEmmanuel Vadotdescription: | 14d5b0e70fSEmmanuel Vadot CS35L45 is a Boosted Mono Class D Amplifier with DSP 15d5b0e70fSEmmanuel Vadot Speaker Protection and Adaptive Battery Management. 16d5b0e70fSEmmanuel Vadot 178bab661aSEmmanuel VadotallOf: 188bab661aSEmmanuel Vadot - $ref: dai-common.yaml# 198bab661aSEmmanuel Vadot 20d5b0e70fSEmmanuel Vadotproperties: 21d5b0e70fSEmmanuel Vadot compatible: 22d5b0e70fSEmmanuel Vadot enum: 23d5b0e70fSEmmanuel Vadot - cirrus,cs35l45 24d5b0e70fSEmmanuel Vadot 25d5b0e70fSEmmanuel Vadot reg: 26d5b0e70fSEmmanuel Vadot maxItems: 1 27d5b0e70fSEmmanuel Vadot 28d5b0e70fSEmmanuel Vadot '#sound-dai-cells': 29d5b0e70fSEmmanuel Vadot const: 1 30d5b0e70fSEmmanuel Vadot 31d5b0e70fSEmmanuel Vadot reset-gpios: 32d5b0e70fSEmmanuel Vadot maxItems: 1 33d5b0e70fSEmmanuel Vadot 34d5b0e70fSEmmanuel Vadot vdd-a-supply: 35d5b0e70fSEmmanuel Vadot description: voltage regulator phandle for the VDD_A supply 36d5b0e70fSEmmanuel Vadot 37d5b0e70fSEmmanuel Vadot vdd-batt-supply: 38d5b0e70fSEmmanuel Vadot description: voltage regulator phandle for the VDD_BATT supply 39d5b0e70fSEmmanuel Vadot 40d5b0e70fSEmmanuel Vadot spi-max-frequency: 41d5b0e70fSEmmanuel Vadot maximum: 5000000 42d5b0e70fSEmmanuel Vadot 43d5b0e70fSEmmanuel Vadot cirrus,asp-sdout-hiz-ctrl: 44d5b0e70fSEmmanuel Vadot description: 45d5b0e70fSEmmanuel Vadot Audio serial port SDOUT Hi-Z control. Sets the Hi-Z 46d5b0e70fSEmmanuel Vadot configuration for SDOUT pin of amplifier. Logical OR of 47d5b0e70fSEmmanuel Vadot CS35L45_ASP_TX_HIZ_xxx values. 48fac71e4eSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 49d5b0e70fSEmmanuel Vadot minimum: 0 50d5b0e70fSEmmanuel Vadot maximum: 3 51d5b0e70fSEmmanuel Vadot default: 2 52d5b0e70fSEmmanuel Vadot 53fac71e4eSEmmanuel VadotpatternProperties: 54fac71e4eSEmmanuel Vadot "^cirrus,gpio-ctrl[1-3]$": 55fac71e4eSEmmanuel Vadot description: 56fac71e4eSEmmanuel Vadot GPIO pins configuration. 57fac71e4eSEmmanuel Vadot type: object 58fac71e4eSEmmanuel Vadot additionalProperties: false 59fac71e4eSEmmanuel Vadot properties: 60fac71e4eSEmmanuel Vadot gpio-dir: 61fac71e4eSEmmanuel Vadot description: 62fac71e4eSEmmanuel Vadot GPIO pin direction. Valid only when 'gpio-ctrl' is 1 63fac71e4eSEmmanuel Vadot 0 = Output 64fac71e4eSEmmanuel Vadot 1 = Input 65*f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 66fac71e4eSEmmanuel Vadot minimum: 0 67fac71e4eSEmmanuel Vadot maximum: 1 68fac71e4eSEmmanuel Vadot default: 1 69fac71e4eSEmmanuel Vadot gpio-lvl: 70fac71e4eSEmmanuel Vadot description: 71fac71e4eSEmmanuel Vadot GPIO level. Valid only when 'gpio-ctrl' is 1 and 'gpio-dir' is 0 72fac71e4eSEmmanuel Vadot 0 = Low 73fac71e4eSEmmanuel Vadot 1 = High 74*f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 75fac71e4eSEmmanuel Vadot minimum: 0 76fac71e4eSEmmanuel Vadot maximum: 1 77fac71e4eSEmmanuel Vadot default: 0 78fac71e4eSEmmanuel Vadot gpio-op-cfg: 79fac71e4eSEmmanuel Vadot description: 80fac71e4eSEmmanuel Vadot GPIO level. Valid only when 'gpio-ctrl' is 1 and 'gpio-dir' is 0 81fac71e4eSEmmanuel Vadot 0 = CMOS 82fac71e4eSEmmanuel Vadot 1 = Open Drain 83*f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 84fac71e4eSEmmanuel Vadot minimum: 0 85fac71e4eSEmmanuel Vadot maximum: 1 86fac71e4eSEmmanuel Vadot default: 0 87fac71e4eSEmmanuel Vadot gpio-pol: 88fac71e4eSEmmanuel Vadot description: 89fac71e4eSEmmanuel Vadot GPIO output polarity select. Valid only when 'gpio-ctrl' is 1 90fac71e4eSEmmanuel Vadot and 'gpio-dir' is 0 91fac71e4eSEmmanuel Vadot 0 = Non-inverted, Active High 92fac71e4eSEmmanuel Vadot 1 = Inverted, Active Low 93*f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 94fac71e4eSEmmanuel Vadot minimum: 0 95fac71e4eSEmmanuel Vadot maximum: 1 96fac71e4eSEmmanuel Vadot default: 0 97fac71e4eSEmmanuel Vadot gpio-ctrl: 98fac71e4eSEmmanuel Vadot description: 99fac71e4eSEmmanuel Vadot Defines the function of the GPIO pin. 100fac71e4eSEmmanuel Vadot GPIO1 101fac71e4eSEmmanuel Vadot 0 = High impedance input 102fac71e4eSEmmanuel Vadot 1 = Pin acts as a GPIO, direction controlled by 'gpio-dir' 103fac71e4eSEmmanuel Vadot 2 = Pin acts as MDSYNC, direction controlled by MDSYNC 104fac71e4eSEmmanuel Vadot 3-7 = Reserved 105fac71e4eSEmmanuel Vadot GPIO2 106fac71e4eSEmmanuel Vadot 0 = High impedance input 107fac71e4eSEmmanuel Vadot 1 = Pin acts as a GPIO, direction controlled by 'gpio-dir' 108fac71e4eSEmmanuel Vadot 2 = Pin acts as open drain INT 109fac71e4eSEmmanuel Vadot 3 = Reserved 110fac71e4eSEmmanuel Vadot 4 = Pin acts as push-pull output INT. Active low. 111fac71e4eSEmmanuel Vadot 5 = Pin acts as push-pull output INT. Active high. 112fac71e4eSEmmanuel Vadot 6,7 = Reserved 113fac71e4eSEmmanuel Vadot GPIO3 114fac71e4eSEmmanuel Vadot 0 = High impedance input 115fac71e4eSEmmanuel Vadot 1 = Pin acts as a GPIO, direction controlled by 'gpio-dir' 116fac71e4eSEmmanuel Vadot 2-7 = Reserved 117*f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 118fac71e4eSEmmanuel Vadot minimum: 0 119fac71e4eSEmmanuel Vadot maximum: 7 120fac71e4eSEmmanuel Vadot default: 0 121d5b0e70fSEmmanuel Vadotrequired: 122d5b0e70fSEmmanuel Vadot - compatible 123d5b0e70fSEmmanuel Vadot - reg 124d5b0e70fSEmmanuel Vadot - "#sound-dai-cells" 125d5b0e70fSEmmanuel Vadot 1268bab661aSEmmanuel VadotunevaluatedProperties: false 127d5b0e70fSEmmanuel Vadot 128d5b0e70fSEmmanuel Vadotexamples: 129d5b0e70fSEmmanuel Vadot - | 130d5b0e70fSEmmanuel Vadot #include <dt-bindings/sound/cs35l45.h> 131d5b0e70fSEmmanuel Vadot spi { 132d5b0e70fSEmmanuel Vadot #address-cells = <1>; 133d5b0e70fSEmmanuel Vadot #size-cells = <0>; 134d5b0e70fSEmmanuel Vadot 135d5b0e70fSEmmanuel Vadot cs35l45: cs35l45@2 { 136d5b0e70fSEmmanuel Vadot #sound-dai-cells = <1>; 137d5b0e70fSEmmanuel Vadot compatible = "cirrus,cs35l45"; 138d5b0e70fSEmmanuel Vadot reg = <2>; 139d5b0e70fSEmmanuel Vadot spi-max-frequency = <5000000>; 140d5b0e70fSEmmanuel Vadot vdd-a-supply = <&dummy_vreg>; 141d5b0e70fSEmmanuel Vadot vdd-batt-supply = <&dummy_vreg>; 142d5b0e70fSEmmanuel Vadot reset-gpios = <&gpio 110 0>; 143d5b0e70fSEmmanuel Vadot cirrus,asp-sdout-hiz-ctrl = <(CS35L45_ASP_TX_HIZ_UNUSED | 144d5b0e70fSEmmanuel Vadot CS35L45_ASP_TX_HIZ_DISABLED)>; 145fac71e4eSEmmanuel Vadot cirrus,gpio-ctrl1 { 146fac71e4eSEmmanuel Vadot gpio-ctrl = <0x2>; 147fac71e4eSEmmanuel Vadot }; 148fac71e4eSEmmanuel Vadot cirrus,gpio-ctrl2 { 149fac71e4eSEmmanuel Vadot gpio-ctrl = <0x2>; 150fac71e4eSEmmanuel Vadot }; 151fac71e4eSEmmanuel Vadot cirrus,gpio-ctrl3 { 152fac71e4eSEmmanuel Vadot gpio-ctrl = <0x1>; 153fac71e4eSEmmanuel Vadot gpio-dir = <0x1>; 154fac71e4eSEmmanuel Vadot }; 155d5b0e70fSEmmanuel Vadot }; 156d5b0e70fSEmmanuel Vadot }; 157