1# SPDX-License-Identifier: GPL-2.0-only
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/sound/sgtl5000.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Freescale SGTL5000 Stereo Codec
8
9maintainers:
10  - Fabio Estevam <festevam@gmail.com>
11
12properties:
13  compatible:
14    const: fsl,sgtl5000
15
16  reg:
17    maxItems: 1
18
19  "#sound-dai-cells":
20    const: 0
21
22  assigned-clock-parents: true
23  assigned-clock-rates: true
24  assigned-clocks: true
25
26  clocks:
27    items:
28      - description: the clock provider of SYS_MCLK
29
30  VDDA-supply:
31    description: the regulator provider of VDDA
32
33  VDDIO-supply:
34    description: the regulator provider of VDDIO
35
36  VDDD-supply:
37    description: the regulator provider of VDDD
38
39  micbias-resistor-k-ohms:
40    description: The bias resistor to be used in kOhms. The resistor can take
41      values of 2k, 4k or 8k. If set to 0 it will be off. If this node is not
42      mentioned or if the value is unknown, then micbias resistor is set to
43      4k.
44    $ref: "/schemas/types.yaml#/definitions/uint32"
45    enum: [ 0, 2, 4, 8 ]
46
47  micbias-voltage-m-volts:
48    description: The bias voltage to be used in mVolts. The voltage can take
49      values from 1.25V to 3V by 250mV steps. If this node is not mentioned
50      or the value is unknown, then the value is set to 1.25V.
51    $ref: "/schemas/types.yaml#/definitions/uint32"
52    enum: [ 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000 ]
53
54  lrclk-strength:
55    description: |
56      The LRCLK pad strength. Possible values are: 0, 1, 2 and 3 as per the
57      table below:
58
59        VDDIO		1.8V		2.5V		3.3V
60        0 =		Disable
61        1 =		1.66 mA		2.87 mA		4.02  mA
62        2 =		3.33 mA		5.74 mA		8.03  mA
63        3 =		4.99 mA		8.61 mA		12.05 mA
64    $ref: "/schemas/types.yaml#/definitions/uint32"
65    enum: [ 0, 1, 2, 3 ]
66
67  sclk-strength:
68    description: |
69      The SCLK pad strength. Possible values are: 0, 1, 2 and 3 as per the
70      table below:
71
72        VDDIO		1.8V		2.5V		3.3V
73        0 =		Disable
74        1 =		1.66 mA		2.87 mA		4.02  mA
75        2 =		3.33 mA		5.74 mA		8.03  mA
76        3 =		4.99 mA		8.61 mA		12.05 mA
77    $ref: "/schemas/types.yaml#/definitions/uint32"
78    enum: [ 0, 1, 2, 3 ]
79
80required:
81  - compatible
82  - reg
83  - "#sound-dai-cells"
84  - clocks
85  - VDDA-supply
86  - VDDIO-supply
87
88additionalProperties: false
89
90examples:
91  - |
92    i2c {
93        #address-cells = <1>;
94        #size-cells = <0>;
95
96        codec@a {
97            compatible = "fsl,sgtl5000";
98            reg = <0x0a>;
99            #sound-dai-cells = <0>;
100            clocks = <&clks 150>;
101            micbias-resistor-k-ohms = <2>;
102            micbias-voltage-m-volts = <2250>;
103            VDDA-supply = <&reg_3p3v>;
104            VDDIO-supply = <&reg_3p3v>;
105        };
106    };
107...
108