brintos

brintos / linux-shallow public Read only

0
0
Text · 6.1 KiB · af599d8 Raw
227 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/sound/cirrus,cs42l42.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Cirrus Logic CS42L42 audio CODEC8 9maintainers:10  - patches@opensource.cirrus.com11 12description:13  The CS42L42 is a low-power audio codec designed for portable applications.14  It provides a high-dynamic range, stereo DAC for audio playback and a mono15  high-dynamic-range ADC for audio capture. There is an integrated headset16  detection block.17 18properties:19  compatible:20    enum:21      - cirrus,cs42l4222      - cirrus,cs42l8323 24  reg:25    description:26      The I2C address of the CS42L42.27    maxItems: 128 29  VP-supply:30    description:31      VP power supply.32 33  VCP-supply:34    description:35      Charge pump power supply.36 37  VD_FILT-supply:38    description:39      FILT+ power supply.40 41  VL-supply:42    description:43      Logic power supply.44 45  VA-supply:46    description:47      Analog power supply.48 49  reset-gpios:50    description:51      This pin will be asserted and then deasserted to reset the52      CS42L42 before communication starts.53    maxItems: 154 55  interrupts:56    description:57      Interrupt for CS42L42 IRQ line.58    maxItems: 159 60  cirrus,ts-inv:61    description: |62      Sets the behaviour of the jack plug detect switch.63 64      0 - (Default) Shorted to tip when unplugged, open when plugged.65      This is "inverted tip sense (ITS)" in the datasheet.66 67      1 - Open when unplugged, shorted to tip when plugged.68      This is "normal tip sense (TS)" in the datasheet.69 70      The CS42L42_TS_INV_* defines are available for this.71    $ref: /schemas/types.yaml#/definitions/uint3272    minimum: 073    maximum: 174 75  cirrus,ts-dbnc-rise:76    description: |77      Debounce the rising edge of TIP_SENSE_PLUG. With no78      debounce, the tip sense pin might be noisy on a plug event.79 80      0 - 0ms81      1 - 125ms82      2 - 250ms83      3 - 500ms84      4 - 750ms85      5 - 1s (Default)86      6 - 1.25s87      7 - 1.5s88 89      The CS42L42_TS_DBNCE_* defines are available for this.90    $ref: /schemas/types.yaml#/definitions/uint3291    minimum: 092    maximum: 793 94  cirrus,ts-dbnc-fall:95    description: |96      Debounce the falling edge of TIP_SENSE_UNPLUG. With no97      debounce, the tip sense pin might be noisy on an unplug event.98 99      0 - 0ms100      1 - 125ms101      2 - 250ms102      3 - 500ms103      4 - 750ms104      5 - 1s (Default)105      6 - 1.25s106      7 - 1.5s107 108      The CS42L42_TS_DBNCE_* defines are available for this.109    $ref: /schemas/types.yaml#/definitions/uint32110    minimum: 0111    maximum: 7112 113  cirrus,btn-det-init-dbnce:114    description: |115      This sets how long to wait after enabling button detection116      interrupts before servicing button interrupts, to allow the117      HS bias time to settle. Value is in milliseconds.118      There may be erroneous button interrupts if this debounce time119      is too short.120 121      0ms - 200ms,122      Default = 100ms123    $ref: /schemas/types.yaml#/definitions/uint32124    minimum: 0125    maximum: 200126 127  cirrus,btn-det-event-dbnce:128    description: |129      This sets how long to wait after receiving a button press130      interrupt before processing it. Allows time for the button131      press to make a clean connection with the bias resistors.132      Value is in milliseconds.133 134      0ms - 20ms,135      Default = 10ms136    $ref: /schemas/types.yaml#/definitions/uint32137    minimum: 0138    maximum: 20139 140  cirrus,bias-lvls:141    description: |142      For a level-detect headset button scheme, each button will bias143      the mic pin to a certain voltage. To determine which button was144      pressed, the voltage is compared to sequential, decreasing145      voltages, until the compared voltage < bias voltage.146      For different hardware setups, a designer might want to tweak this.147      This is an array of descending values for the comparator voltage,148      given as percent of the HSBIAS voltage.149 150      Array of 4 values, each 0-63151      < x1 x2 x3 x4 >152      Default = < 15 8 4 1 >153    $ref: /schemas/types.yaml#/definitions/uint32-array154    minItems: 4155    maxItems: 4156    items:157      minimum: 0158      maximum: 63159 160  cirrus,hs-bias-ramp-rate:161    description: |162      If present this sets the rate that the HS bias should rise and fall.163      The actual rise and fall times depend on external hardware (the164      datasheet gives several rise and fall time examples).165 166      0 - Fast rise time; slow, load-dependent fall time167      1 - Fast168      2 - Slow (default)169      3 - Slowest170 171      The CS42L42_HSBIAS_RAMP_* defines are available for this.172    $ref: /schemas/types.yaml#/definitions/uint32173    minimum: 0174    maximum: 3175 176  cirrus,hs-bias-sense-disable:177    description: |178      If present the HSBIAS sense is disabled. Configures HSBIAS output179      current sense through the external 2.21-k resistor. HSBIAS_SENSE180      is a hardware feature to reduce the potential pop noise when the181      headset plug is removed slowly. But on some platforms ESD voltage182      will affect it causing plug detection to fail, especially with CTIA183      headset type. For different hardware setups, a designer might want184      to tweak default behavior.185    type: boolean186 187required:188  - compatible189  - reg190  - VP-supply191  - VCP-supply192  - VD_FILT-supply193  - VL-supply194  - VA-supply195 196additionalProperties: false197 198examples:199  - |200    #include <dt-bindings/sound/cs42l42.h>201    i2c {202      #address-cells = <1>;203      #size-cells = <0>;204 205      cs42l42: cs42l42@48 {206          compatible = "cirrus,cs42l42";207          reg = <0x48>;208          VA-supply = <&dummy_vreg>;209          VP-supply = <&dummy_vreg>;210          VCP-supply = <&dummy_vreg>;211          VD_FILT-supply = <&dummy_vreg>;212          VL-supply = <&dummy_vreg>;213 214          reset-gpios = <&axi_gpio_0 1 0>;215          interrupt-parent = <&gpio0>;216          interrupts = <55 8>;217 218          cirrus,ts-inv = <CS42L42_TS_INV_DIS>;219          cirrus,ts-dbnc-rise = <CS42L42_TS_DBNCE_1000>;220          cirrus,ts-dbnc-fall = <CS42L42_TS_DBNCE_0>;221          cirrus,btn-det-init-dbnce = <100>;222          cirrus,btn-det-event-dbnce = <10>;223          cirrus,bias-lvls = <0x0F 0x08 0x04 0x01>;224          cirrus,hs-bias-ramp-rate = <CS42L42_HSBIAS_RAMP_SLOW>;225      };226    };227