xref: /openbmc/linux/Documentation/devicetree/bindings/mfd/cirrus,lochnagar.yaml (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
19dae090fSCharles Keepax# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
29dae090fSCharles Keepax%YAML 1.2
39dae090fSCharles Keepax---
49dae090fSCharles Keepax$id: http://devicetree.org/schemas/mfd/cirrus,lochnagar.yaml#
59dae090fSCharles Keepax$schema: http://devicetree.org/meta-schemas/core.yaml#
69dae090fSCharles Keepax
79dae090fSCharles Keepaxtitle: Cirrus Logic Lochnagar Audio Development Board
89dae090fSCharles Keepax
99dae090fSCharles Keepaxmaintainers:
109dae090fSCharles Keepax  - patches@opensource.cirrus.com
119dae090fSCharles Keepax
129dae090fSCharles Keepaxdescription: |
139dae090fSCharles Keepax  Lochnagar is an evaluation and development board for Cirrus Logic
149dae090fSCharles Keepax  Smart CODEC and Amp devices. It allows the connection of most Cirrus
159dae090fSCharles Keepax  Logic devices on mini-cards, as well as allowing connection of
169dae090fSCharles Keepax  various application processor systems to provide a full evaluation
179dae090fSCharles Keepax  platform.  Audio system topology, clocking and power can all be
189dae090fSCharles Keepax  controlled through the Lochnagar, allowing the device under test
199dae090fSCharles Keepax  to be used in a variety of possible use cases.
209dae090fSCharles Keepax
219dae090fSCharles Keepax  Also see these documents for generic binding information:
229dae090fSCharles Keepax    [1] GPIO : ../gpio/gpio.txt
239dae090fSCharles Keepax
249dae090fSCharles Keepax  And these for relevant defines:
259dae090fSCharles Keepax    [2] include/dt-bindings/pinctrl/lochnagar.h
269dae090fSCharles Keepax    [3] include/dt-bindings/clock/lochnagar.h
279dae090fSCharles Keepax
289dae090fSCharles Keepax  And these documents for the required sub-node binding details:
299dae090fSCharles Keepax    [4] Clock: ../clock/cirrus,lochnagar.yaml
309dae090fSCharles Keepax    [5] Pinctrl: ../pinctrl/cirrus,lochnagar.yaml
319dae090fSCharles Keepax    [6] Sound: ../sound/cirrus,lochnagar.yaml
329dae090fSCharles Keepax    [7] Hardware Monitor: ../hwmon/cirrus,lochnagar.yaml
339dae090fSCharles Keepax
349dae090fSCharles KeepaxallOf:
359dae090fSCharles Keepax  - if:
369dae090fSCharles Keepax      properties:
379dae090fSCharles Keepax        compatible:
389dae090fSCharles Keepax          enum:
399dae090fSCharles Keepax            - cirrus,lochnagar2
409dae090fSCharles Keepax    then:
419dae090fSCharles Keepax      properties:
429dae090fSCharles Keepax        lochnagar-hwmon:
439dae090fSCharles Keepax          type: object
449dae090fSCharles Keepax          $ref: /schemas/hwmon/cirrus,lochnagar.yaml#
459dae090fSCharles Keepax
469dae090fSCharles Keepax        lochnagar-sc:
479dae090fSCharles Keepax          type: object
489dae090fSCharles Keepax          $ref: /schemas/sound/cirrus,lochnagar.yaml#
499dae090fSCharles Keepax
509dae090fSCharles Keepaxproperties:
519dae090fSCharles Keepax  compatible:
529dae090fSCharles Keepax    enum:
539dae090fSCharles Keepax      - cirrus,lochnagar1
549dae090fSCharles Keepax      - cirrus,lochnagar2
559dae090fSCharles Keepax
569dae090fSCharles Keepax  reg:
579dae090fSCharles Keepax    const: 0x22
589dae090fSCharles Keepax
599dae090fSCharles Keepax  reset-gpios:
609dae090fSCharles Keepax    maxItems: 1
619dae090fSCharles Keepax
629dae090fSCharles Keepax  present-gpios:
639dae090fSCharles Keepax    description: |
649dae090fSCharles Keepax      Host present line, indicating the presence of a
659dae090fSCharles Keepax      host system, see [1]. This can be omitted if the present line is
669dae090fSCharles Keepax      tied in hardware.
679dae090fSCharles Keepax    maxItems: 1
689dae090fSCharles Keepax
699dae090fSCharles Keepax  lochnagar-clk:
709dae090fSCharles Keepax    type: object
719dae090fSCharles Keepax    $ref: /schemas/clock/cirrus,lochnagar.yaml#
729dae090fSCharles Keepax
739dae090fSCharles Keepax  lochnagar-pmic32k:
749dae090fSCharles Keepax    type: object
759dae090fSCharles Keepax    $ref: /schemas/clock/fixed-clock.yaml#
769dae090fSCharles Keepax    properties:
779dae090fSCharles Keepax      clock-frequency:
789dae090fSCharles Keepax        const: 32768
799dae090fSCharles Keepax
809dae090fSCharles Keepax  lochnagar-clk12m:
819dae090fSCharles Keepax    type: object
829dae090fSCharles Keepax    $ref: /schemas/clock/fixed-clock.yaml#
839dae090fSCharles Keepax    properties:
849dae090fSCharles Keepax      clock-frequency:
859dae090fSCharles Keepax        const: 12288000
869dae090fSCharles Keepax
879dae090fSCharles Keepax  lochnagar-clk11m:
889dae090fSCharles Keepax    type: object
899dae090fSCharles Keepax    $ref: /schemas/clock/fixed-clock.yaml#
909dae090fSCharles Keepax    properties:
919dae090fSCharles Keepax      clock-frequency:
929dae090fSCharles Keepax        const: 11298600
939dae090fSCharles Keepax
949dae090fSCharles Keepax  lochnagar-clk24m:
959dae090fSCharles Keepax    type: object
969dae090fSCharles Keepax    $ref: /schemas/clock/fixed-clock.yaml#
979dae090fSCharles Keepax    properties:
989dae090fSCharles Keepax      clock-frequency:
999dae090fSCharles Keepax        const: 24576000
1009dae090fSCharles Keepax
1019dae090fSCharles Keepax  lochnagar-clk22m:
1029dae090fSCharles Keepax    type: object
1039dae090fSCharles Keepax    $ref: /schemas/clock/fixed-clock.yaml#
1049dae090fSCharles Keepax    properties:
1059dae090fSCharles Keepax      clock-frequency:
1069dae090fSCharles Keepax        const: 22579200
1079dae090fSCharles Keepax
1089dae090fSCharles Keepax  lochnagar-clk8m:
1099dae090fSCharles Keepax    type: object
1109dae090fSCharles Keepax    $ref: /schemas/clock/fixed-clock.yaml#
1119dae090fSCharles Keepax    properties:
1129dae090fSCharles Keepax      clock-frequency:
1139dae090fSCharles Keepax        const: 8192000
1149dae090fSCharles Keepax
1159dae090fSCharles Keepax  lochnagar-usb24m:
1169dae090fSCharles Keepax    type: object
1179dae090fSCharles Keepax    $ref: /schemas/clock/fixed-clock.yaml#
1189dae090fSCharles Keepax    properties:
1199dae090fSCharles Keepax      clock-frequency:
1209dae090fSCharles Keepax        const: 24576000
1219dae090fSCharles Keepax
1229dae090fSCharles Keepax  lochnagar-usb12m:
1239dae090fSCharles Keepax    type: object
1249dae090fSCharles Keepax    $ref: /schemas/clock/fixed-clock.yaml#
1259dae090fSCharles Keepax    properties:
1269dae090fSCharles Keepax      clock-frequency:
1279dae090fSCharles Keepax        const: 12288000
1289dae090fSCharles Keepax
1297e807f4bSRob Herring  pinctrl:
1309dae090fSCharles Keepax    type: object
1319dae090fSCharles Keepax    $ref: /schemas/pinctrl/cirrus,lochnagar.yaml#
1329dae090fSCharles Keepax
1334828556dSRob Herring  lochnagar-hwmon:
1344828556dSRob Herring    type: object
1354828556dSRob Herring    $ref: /schemas/hwmon/cirrus,lochnagar.yaml#
1364828556dSRob Herring
1374828556dSRob Herring  lochnagar-sc:
1384828556dSRob Herring    type: object
1394828556dSRob Herring    $ref: /schemas/sound/cirrus,lochnagar.yaml#
1404828556dSRob Herring
1419dae090fSCharles Keepax  VDDCORE:
1429dae090fSCharles Keepax    description:
1439dae090fSCharles Keepax      Initialisation data for the VDDCORE regulator, which supplies the
1449dae090fSCharles Keepax      CODECs digital core if not being provided by an internal regulator.
1459dae090fSCharles Keepax    type: object
1469dae090fSCharles Keepax    $ref: /schemas/regulator/regulator.yaml#
147*42839dcaSRob Herring    unevaluatedProperties: false
1489dae090fSCharles Keepax    properties:
1499dae090fSCharles Keepax      compatible:
1509dae090fSCharles Keepax        enum:
1519dae090fSCharles Keepax          - cirrus,lochnagar2-vddcore
1529dae090fSCharles Keepax
1539dae090fSCharles Keepax      SYSVDD-supply:
1549dae090fSCharles Keepax        description:
1559dae090fSCharles Keepax          Primary power supply for the Lochnagar.
1569dae090fSCharles Keepax    required:
1579dae090fSCharles Keepax      - compatible
1589dae090fSCharles Keepax
1599dae090fSCharles Keepax  MICVDD:
1609dae090fSCharles Keepax    description:
1619dae090fSCharles Keepax      Initialisation data for the MICVDD regulator, which supplies the
1629dae090fSCharles Keepax      CODECs MICVDD.
1639dae090fSCharles Keepax    type: object
1649dae090fSCharles Keepax    $ref: /schemas/regulator/regulator.yaml#
165*42839dcaSRob Herring    unevaluatedProperties: false
1669dae090fSCharles Keepax    properties:
1679dae090fSCharles Keepax      compatible:
1689dae090fSCharles Keepax        enum:
1699dae090fSCharles Keepax          - cirrus,lochnagar2-micvdd
1709dae090fSCharles Keepax
1719dae090fSCharles Keepax      SYSVDD-supply:
1729dae090fSCharles Keepax        description:
1739dae090fSCharles Keepax          Primary power supply for the Lochnagar.
1749dae090fSCharles Keepax    required:
1759dae090fSCharles Keepax      - compatible
1769dae090fSCharles Keepax
1779dae090fSCharles Keepax  MIC1VDD:
1789dae090fSCharles Keepax    description:
1799dae090fSCharles Keepax      Initialisation data for the MIC1VDD supplies.
1809dae090fSCharles Keepax    type: object
1819dae090fSCharles Keepax    $ref: /schemas/regulator/regulator.yaml#
182*42839dcaSRob Herring    unevaluatedProperties: false
1839dae090fSCharles Keepax    properties:
1849dae090fSCharles Keepax      compatible:
1859dae090fSCharles Keepax        enum:
1869dae090fSCharles Keepax          - cirrus,lochnagar2-mic1vdd
1879dae090fSCharles Keepax
1889dae090fSCharles Keepax      cirrus,micbias-input:
1899dae090fSCharles Keepax        description:
1909dae090fSCharles Keepax          A property selecting which of the CODEC minicard micbias outputs
1919dae090fSCharles Keepax          should be used.
1929dae090fSCharles Keepax        $ref: /schemas/types.yaml#/definitions/uint32
1939dae090fSCharles Keepax        minimum: 1
1949dae090fSCharles Keepax        maximum: 4
1959dae090fSCharles Keepax
1969dae090fSCharles Keepax      MICBIAS1-supply:
1979dae090fSCharles Keepax        description:
1989dae090fSCharles Keepax          Regulator supplies for the MIC1VDD outputs, supplying the digital
1999dae090fSCharles Keepax          microphones, normally supplied from the attached CODEC.
2009dae090fSCharles Keepax    required:
2019dae090fSCharles Keepax      - compatible
2029dae090fSCharles Keepax
2039dae090fSCharles Keepax  MIC2VDD:
2049dae090fSCharles Keepax    description:
2059dae090fSCharles Keepax      Initialisation data for the MIC2VDD supplies.
2069dae090fSCharles Keepax    type: object
2079dae090fSCharles Keepax    $ref: /schemas/regulator/regulator.yaml#
208*42839dcaSRob Herring    unevaluatedProperties: false
2099dae090fSCharles Keepax    properties:
2109dae090fSCharles Keepax      compatible:
2119dae090fSCharles Keepax        enum:
2129dae090fSCharles Keepax          - cirrus,lochnagar2-mic2vdd
2139dae090fSCharles Keepax
2149dae090fSCharles Keepax      cirrus,micbias-input:
2159dae090fSCharles Keepax        description:
2169dae090fSCharles Keepax          A property selecting which of the CODEC minicard micbias outputs
2179dae090fSCharles Keepax          should be used.
2189dae090fSCharles Keepax        $ref: /schemas/types.yaml#/definitions/uint32
2199dae090fSCharles Keepax        minimum: 1
2209dae090fSCharles Keepax        maximum: 4
2219dae090fSCharles Keepax
2229dae090fSCharles Keepax      MICBIAS2-supply:
2239dae090fSCharles Keepax        description:
2249dae090fSCharles Keepax          Regulator supplies for the MIC2VDD outputs, supplying the digital
2259dae090fSCharles Keepax          microphones, normally supplied from the attached CODEC.
2269dae090fSCharles Keepax    required:
2279dae090fSCharles Keepax      - compatible
2289dae090fSCharles Keepax
2299dae090fSCharles Keepax  VDD1V8:
2309dae090fSCharles Keepax    description:
2319dae090fSCharles Keepax      Recommended fixed regulator for the VDD1V8 regulator, which supplies
2329dae090fSCharles Keepax      the CODECs analog and 1.8V digital supplies.
2339dae090fSCharles Keepax    type: object
2349dae090fSCharles Keepax    $ref: /schemas/regulator/regulator.yaml#
235*42839dcaSRob Herring    unevaluatedProperties: false
2369dae090fSCharles Keepax    properties:
2379dae090fSCharles Keepax      compatible:
2389dae090fSCharles Keepax        enum:
2399dae090fSCharles Keepax          - regulator-fixed
2409dae090fSCharles Keepax
2419dae090fSCharles Keepax      regulator-min-microvolt:
2429dae090fSCharles Keepax        const: 1800000
2439dae090fSCharles Keepax
2449dae090fSCharles Keepax      regulator-max-microvolt:
2459dae090fSCharles Keepax        const: 1800000
2469dae090fSCharles Keepax
2479dae090fSCharles Keepax      vin-supply:
2489dae090fSCharles Keepax        description:
2499dae090fSCharles Keepax          Should be set to same supply as SYSVDD
2509dae090fSCharles Keepax    required:
2519dae090fSCharles Keepax      - compatible
2529dae090fSCharles Keepax      - regulator-min-microvolt
2539dae090fSCharles Keepax      - regulator-max-microvolt
2549dae090fSCharles Keepax      - regulator-boot-on
2559dae090fSCharles Keepax      - regulator-always-on
2569dae090fSCharles Keepax      - vin-supply
2579dae090fSCharles Keepax
2589dae090fSCharles Keepaxrequired:
2599dae090fSCharles Keepax  - compatible
2609dae090fSCharles Keepax  - reg
2619dae090fSCharles Keepax  - reset-gpios
2629dae090fSCharles Keepax  - lochnagar-clk
2637e807f4bSRob Herring  - pinctrl
2649dae090fSCharles Keepax
2654828556dSRob HerringadditionalProperties: false
2669dae090fSCharles Keepax
2679dae090fSCharles Keepaxexamples:
2689dae090fSCharles Keepax  - |
2690384759bSLukas Bulwahn    #include <dt-bindings/clock/lochnagar.h>
2709dae090fSCharles Keepax    #include <dt-bindings/pinctrl/lochnagar.h>
2719dae090fSCharles Keepax    i2c@e0004000 {
2729dae090fSCharles Keepax        #address-cells = <1>;
2739dae090fSCharles Keepax        #size-cells = <0>;
2749dae090fSCharles Keepax        reg = <0xe0004000 0x1000>;
2759dae090fSCharles Keepax
2769dae090fSCharles Keepax        lochnagar: lochnagar@22 {
2779dae090fSCharles Keepax            compatible = "cirrus,lochnagar2";
2789dae090fSCharles Keepax            reg = <0x22>;
2799dae090fSCharles Keepax
2809dae090fSCharles Keepax            reset-gpios = <&gpio0 55 0>;
2819dae090fSCharles Keepax            present-gpios = <&gpio0 60 0>;
2829dae090fSCharles Keepax
2839dae090fSCharles Keepax            lochnagarclk: lochnagar-clk {
2849dae090fSCharles Keepax                compatible = "cirrus,lochnagar2-clk";
2859dae090fSCharles Keepax
2869dae090fSCharles Keepax                #clock-cells = <1>;
2879dae090fSCharles Keepax                clocks = <&clkaudio>, <&clkpmic>;
2889dae090fSCharles Keepax                clock-names = "ln-gf-mclk2", "ln-pmic-32k";
2899dae090fSCharles Keepax
2909dae090fSCharles Keepax                assigned-clocks = <&lochnagarclk LOCHNAGAR_CDC_MCLK1>,
2919dae090fSCharles Keepax                                  <&lochnagarclk LOCHNAGAR_CDC_MCLK2>;
2929dae090fSCharles Keepax                assigned-clock-parents = <&clkaudio>, <&clkpmic>;
2939dae090fSCharles Keepax            };
2949dae090fSCharles Keepax
2959dae090fSCharles Keepax            clkpmic: lochnagar-pmic32k {
2969dae090fSCharles Keepax                compatible = "fixed-clock";
2979dae090fSCharles Keepax                #clock-cells = <0>;
2989dae090fSCharles Keepax                clock-frequency = <32768>;
2999dae090fSCharles Keepax            };
3009dae090fSCharles Keepax
3017e807f4bSRob Herring            pinctrl {
3029dae090fSCharles Keepax                compatible = "cirrus,lochnagar-pinctrl";
3039dae090fSCharles Keepax
3049dae090fSCharles Keepax                gpio-controller;
3059dae090fSCharles Keepax                #gpio-cells = <2>;
3069dae090fSCharles Keepax                gpio-ranges = <&lochnagar 0 0 LOCHNAGAR2_PIN_NUM_GPIOS>;
3079dae090fSCharles Keepax
3089dae090fSCharles Keepax                pinctrl-names = "default";
3099dae090fSCharles Keepax                pinctrl-0 = <&pinsettings>;
3109dae090fSCharles Keepax
3119dae090fSCharles Keepax                pinsettings: pin-settings {
3129dae090fSCharles Keepax                    ap2aif-pins {
3139dae090fSCharles Keepax                        input-enable;
3149dae090fSCharles Keepax                        groups = "gf-aif1";
3159dae090fSCharles Keepax                        function = "codec-aif3";
3169dae090fSCharles Keepax                    };
3179dae090fSCharles Keepax                    codec2aif-pins {
3189dae090fSCharles Keepax                        output-enable;
3199dae090fSCharles Keepax                        groups = "codec-aif3";
3209dae090fSCharles Keepax                        function = "gf-aif1";
3219dae090fSCharles Keepax                    };
3229dae090fSCharles Keepax                };
3239dae090fSCharles Keepax            };
3249dae090fSCharles Keepax
3259dae090fSCharles Keepax            lochnagar-sc {
3269dae090fSCharles Keepax                compatible = "cirrus,lochnagar2-soundcard";
3279dae090fSCharles Keepax
3289dae090fSCharles Keepax                #sound-dai-cells = <1>;
3299dae090fSCharles Keepax
3309dae090fSCharles Keepax                clocks = <&lochnagarclk LOCHNAGAR_SOUNDCARD_MCLK>;
3319dae090fSCharles Keepax                clock-names = "mclk";
3329dae090fSCharles Keepax            };
3339dae090fSCharles Keepax
3349dae090fSCharles Keepax            lochnagar-hwmon {
3359dae090fSCharles Keepax                compatible = "cirrus,lochnagar2-hwmon";
3369dae090fSCharles Keepax            };
3379dae090fSCharles Keepax
3389dae090fSCharles Keepax            MIC1VDD {
3399dae090fSCharles Keepax                compatible = "cirrus,lochnagar2-mic1vdd";
3409dae090fSCharles Keepax
3419dae090fSCharles Keepax                cirrus,micbias-input = <3>;
3429dae090fSCharles Keepax            };
3439dae090fSCharles Keepax
3449dae090fSCharles Keepax            MICVDD {
3459dae090fSCharles Keepax                compatible = "cirrus,lochnagar2-micvdd";
3469dae090fSCharles Keepax
3479dae090fSCharles Keepax                SYSVDD-supply = <&wallvdd>;
3489dae090fSCharles Keepax
3499dae090fSCharles Keepax                regulator-min-microvolt = <3300000>;
3509dae090fSCharles Keepax                regulator-max-microvolt = <3300000>;
3519dae090fSCharles Keepax            };
3529dae090fSCharles Keepax
3539dae090fSCharles Keepax            VDD1V8 {
3549dae090fSCharles Keepax                compatible = "regulator-fixed";
3559dae090fSCharles Keepax
3569dae090fSCharles Keepax                regulator-name = "VDD1V8";
3579dae090fSCharles Keepax                regulator-min-microvolt = <1800000>;
3589dae090fSCharles Keepax                regulator-max-microvolt = <1800000>;
3599dae090fSCharles Keepax                regulator-boot-on;
3609dae090fSCharles Keepax                regulator-always-on;
3619dae090fSCharles Keepax
3629dae090fSCharles Keepax                vin-supply = <&wallvdd>;
3639dae090fSCharles Keepax            };
3649dae090fSCharles Keepax        };
3659dae090fSCharles Keepax    };
366