brintos

brintos / linux-shallow public Read only

0
0
Text · 9.3 KiB · ebbedab Raw
366 lines · yaml
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause2%YAML 1.23---4$id: http://devicetree.org/schemas/mfd/cirrus,lochnagar.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Cirrus Logic Lochnagar Audio Development Board8 9maintainers:10  - patches@opensource.cirrus.com11 12description: |13  Lochnagar is an evaluation and development board for Cirrus Logic14  Smart CODEC and Amp devices. It allows the connection of most Cirrus15  Logic devices on mini-cards, as well as allowing connection of16  various application processor systems to provide a full evaluation17  platform.  Audio system topology, clocking and power can all be18  controlled through the Lochnagar, allowing the device under test19  to be used in a variety of possible use cases.20 21  Also see these documents for generic binding information:22    [1] GPIO : ../gpio/gpio.txt23 24  And these for relevant defines:25    [2] include/dt-bindings/pinctrl/lochnagar.h26    [3] include/dt-bindings/clock/lochnagar.h27 28  And these documents for the required sub-node binding details:29    [4] Clock: ../clock/cirrus,lochnagar.yaml30    [5] Pinctrl: ../pinctrl/cirrus,lochnagar.yaml31    [6] Sound: ../sound/cirrus,lochnagar.yaml32    [7] Hardware Monitor: ../hwmon/cirrus,lochnagar.yaml33 34allOf:35  - if:36      properties:37        compatible:38          enum:39            - cirrus,lochnagar240    then:41      properties:42        lochnagar-hwmon:43          type: object44          $ref: /schemas/hwmon/cirrus,lochnagar.yaml#45 46        lochnagar-sc:47          type: object48          $ref: /schemas/sound/cirrus,lochnagar.yaml#49 50properties:51  compatible:52    enum:53      - cirrus,lochnagar154      - cirrus,lochnagar255 56  reg:57    const: 0x2258 59  reset-gpios:60    maxItems: 161 62  present-gpios:63    description: |64      Host present line, indicating the presence of a65      host system, see [1]. This can be omitted if the present line is66      tied in hardware.67    maxItems: 168 69  lochnagar-clk:70    type: object71    $ref: /schemas/clock/cirrus,lochnagar.yaml#72 73  lochnagar-pmic32k:74    type: object75    $ref: /schemas/clock/fixed-clock.yaml#76    properties:77      clock-frequency:78        const: 3276879 80  lochnagar-clk12m:81    type: object82    $ref: /schemas/clock/fixed-clock.yaml#83    properties:84      clock-frequency:85        const: 1228800086 87  lochnagar-clk11m:88    type: object89    $ref: /schemas/clock/fixed-clock.yaml#90    properties:91      clock-frequency:92        const: 1129860093 94  lochnagar-clk24m:95    type: object96    $ref: /schemas/clock/fixed-clock.yaml#97    properties:98      clock-frequency:99        const: 24576000100 101  lochnagar-clk22m:102    type: object103    $ref: /schemas/clock/fixed-clock.yaml#104    properties:105      clock-frequency:106        const: 22579200107 108  lochnagar-clk8m:109    type: object110    $ref: /schemas/clock/fixed-clock.yaml#111    properties:112      clock-frequency:113        const: 8192000114 115  lochnagar-usb24m:116    type: object117    $ref: /schemas/clock/fixed-clock.yaml#118    properties:119      clock-frequency:120        const: 24576000121 122  lochnagar-usb12m:123    type: object124    $ref: /schemas/clock/fixed-clock.yaml#125    properties:126      clock-frequency:127        const: 12288000128 129  pinctrl:130    type: object131    $ref: /schemas/pinctrl/cirrus,lochnagar.yaml#132 133  lochnagar-hwmon:134    type: object135    $ref: /schemas/hwmon/cirrus,lochnagar.yaml#136 137  lochnagar-sc:138    type: object139    $ref: /schemas/sound/cirrus,lochnagar.yaml#140 141  VDDCORE:142    description:143      Initialisation data for the VDDCORE regulator, which supplies the144      CODECs digital core if not being provided by an internal regulator.145    type: object146    $ref: /schemas/regulator/regulator.yaml#147    unevaluatedProperties: false148    properties:149      compatible:150        enum:151          - cirrus,lochnagar2-vddcore152 153      SYSVDD-supply:154        description:155          Primary power supply for the Lochnagar.156    required:157      - compatible158 159  MICVDD:160    description:161      Initialisation data for the MICVDD regulator, which supplies the162      CODECs MICVDD.163    type: object164    $ref: /schemas/regulator/regulator.yaml#165    unevaluatedProperties: false166    properties:167      compatible:168        enum:169          - cirrus,lochnagar2-micvdd170 171      SYSVDD-supply:172        description:173          Primary power supply for the Lochnagar.174    required:175      - compatible176 177  MIC1VDD:178    description:179      Initialisation data for the MIC1VDD supplies.180    type: object181    $ref: /schemas/regulator/regulator.yaml#182    unevaluatedProperties: false183    properties:184      compatible:185        enum:186          - cirrus,lochnagar2-mic1vdd187 188      cirrus,micbias-input:189        description:190          A property selecting which of the CODEC minicard micbias outputs191          should be used.192        $ref: /schemas/types.yaml#/definitions/uint32193        minimum: 1194        maximum: 4195 196      MICBIAS1-supply:197        description:198          Regulator supplies for the MIC1VDD outputs, supplying the digital199          microphones, normally supplied from the attached CODEC.200    required:201      - compatible202 203  MIC2VDD:204    description:205      Initialisation data for the MIC2VDD supplies.206    type: object207    $ref: /schemas/regulator/regulator.yaml#208    unevaluatedProperties: false209    properties:210      compatible:211        enum:212          - cirrus,lochnagar2-mic2vdd213 214      cirrus,micbias-input:215        description:216          A property selecting which of the CODEC minicard micbias outputs217          should be used.218        $ref: /schemas/types.yaml#/definitions/uint32219        minimum: 1220        maximum: 4221 222      MICBIAS2-supply:223        description:224          Regulator supplies for the MIC2VDD outputs, supplying the digital225          microphones, normally supplied from the attached CODEC.226    required:227      - compatible228 229  VDD1V8:230    description:231      Recommended fixed regulator for the VDD1V8 regulator, which supplies232      the CODECs analog and 1.8V digital supplies.233    type: object234    $ref: /schemas/regulator/regulator.yaml#235    unevaluatedProperties: false236    properties:237      compatible:238        enum:239          - regulator-fixed240 241      regulator-min-microvolt:242        const: 1800000243 244      regulator-max-microvolt:245        const: 1800000246 247      vin-supply:248        description:249          Should be set to same supply as SYSVDD250    required:251      - compatible252      - regulator-min-microvolt253      - regulator-max-microvolt254      - regulator-boot-on255      - regulator-always-on256      - vin-supply257 258required:259  - compatible260  - reg261  - reset-gpios262  - lochnagar-clk263  - pinctrl264 265additionalProperties: false266 267examples:268  - |269    #include <dt-bindings/clock/lochnagar.h>270    #include <dt-bindings/pinctrl/lochnagar.h>271    i2c@e0004000 {272        #address-cells = <1>;273        #size-cells = <0>;274        reg = <0xe0004000 0x1000>;275 276        lochnagar: lochnagar@22 {277            compatible = "cirrus,lochnagar2";278            reg = <0x22>;279 280            reset-gpios = <&gpio0 55 0>;281            present-gpios = <&gpio0 60 0>;282 283            lochnagarclk: lochnagar-clk {284                compatible = "cirrus,lochnagar2-clk";285 286                #clock-cells = <1>;287                clocks = <&clkaudio>, <&clkpmic>;288                clock-names = "ln-gf-mclk2", "ln-pmic-32k";289 290                assigned-clocks = <&lochnagarclk LOCHNAGAR_CDC_MCLK1>,291                                  <&lochnagarclk LOCHNAGAR_CDC_MCLK2>;292                assigned-clock-parents = <&clkaudio>, <&clkpmic>;293            };294 295            clkpmic: lochnagar-pmic32k {296                compatible = "fixed-clock";297                #clock-cells = <0>;298                clock-frequency = <32768>;299            };300 301            pinctrl {302                compatible = "cirrus,lochnagar-pinctrl";303 304                gpio-controller;305                #gpio-cells = <2>;306                gpio-ranges = <&lochnagar 0 0 LOCHNAGAR2_PIN_NUM_GPIOS>;307 308                pinctrl-names = "default";309                pinctrl-0 = <&pinsettings>;310 311                pinsettings: pin-settings {312                    ap2aif-pins {313                        input-enable;314                        groups = "gf-aif1";315                        function = "codec-aif3";316                    };317                    codec2aif-pins {318                        output-enable;319                        groups = "codec-aif3";320                        function = "gf-aif1";321                    };322                };323            };324 325            lochnagar-sc {326                compatible = "cirrus,lochnagar2-soundcard";327 328                #sound-dai-cells = <1>;329 330                clocks = <&lochnagarclk LOCHNAGAR_SOUNDCARD_MCLK>;331                clock-names = "mclk";332            };333 334            lochnagar-hwmon {335                compatible = "cirrus,lochnagar2-hwmon";336            };337 338            MIC1VDD {339                compatible = "cirrus,lochnagar2-mic1vdd";340 341                cirrus,micbias-input = <3>;342            };343 344            MICVDD {345                compatible = "cirrus,lochnagar2-micvdd";346 347                SYSVDD-supply = <&wallvdd>;348 349                regulator-min-microvolt = <3300000>;350                regulator-max-microvolt = <3300000>;351            };352 353            VDD1V8 {354                compatible = "regulator-fixed";355 356                regulator-name = "VDD1V8";357                regulator-min-microvolt = <1800000>;358                regulator-max-microvolt = <1800000>;359                regulator-boot-on;360                regulator-always-on;361 362                vin-supply = <&wallvdd>;363            };364        };365    };366