0001 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/mfd/cirrus,lochnagar.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Cirrus Logic Lochnagar Audio Development Board
0008
0009 maintainers:
0010 - patches@opensource.cirrus.com
0011
0012 description: |
0013 Lochnagar is an evaluation and development board for Cirrus Logic
0014 Smart CODEC and Amp devices. It allows the connection of most Cirrus
0015 Logic devices on mini-cards, as well as allowing connection of
0016 various application processor systems to provide a full evaluation
0017 platform. Audio system topology, clocking and power can all be
0018 controlled through the Lochnagar, allowing the device under test
0019 to be used in a variety of possible use cases.
0020
0021 Also see these documents for generic binding information:
0022 [1] GPIO : ../gpio/gpio.txt
0023
0024 And these for relevant defines:
0025 [2] include/dt-bindings/pinctrl/lochnagar.h
0026 [3] include/dt-bindings/clock/lochnagar.h
0027
0028 And these documents for the required sub-node binding details:
0029 [4] Clock: ../clock/cirrus,lochnagar.yaml
0030 [5] Pinctrl: ../pinctrl/cirrus,lochnagar.yaml
0031 [6] Sound: ../sound/cirrus,lochnagar.yaml
0032 [7] Hardware Monitor: ../hwmon/cirrus,lochnagar.yaml
0033
0034 allOf:
0035 - if:
0036 properties:
0037 compatible:
0038 enum:
0039 - cirrus,lochnagar2
0040 then:
0041 properties:
0042 lochnagar-hwmon:
0043 type: object
0044 $ref: /schemas/hwmon/cirrus,lochnagar.yaml#
0045
0046 lochnagar-sc:
0047 type: object
0048 $ref: /schemas/sound/cirrus,lochnagar.yaml#
0049
0050 properties:
0051 compatible:
0052 enum:
0053 - cirrus,lochnagar1
0054 - cirrus,lochnagar2
0055
0056 reg:
0057 const: 0x22
0058
0059 reset-gpios:
0060 maxItems: 1
0061
0062 present-gpios:
0063 description: |
0064 Host present line, indicating the presence of a
0065 host system, see [1]. This can be omitted if the present line is
0066 tied in hardware.
0067 maxItems: 1
0068
0069 lochnagar-clk:
0070 type: object
0071 $ref: /schemas/clock/cirrus,lochnagar.yaml#
0072
0073 lochnagar-pmic32k:
0074 type: object
0075 $ref: /schemas/clock/fixed-clock.yaml#
0076 properties:
0077 clock-frequency:
0078 const: 32768
0079
0080 lochnagar-clk12m:
0081 type: object
0082 $ref: /schemas/clock/fixed-clock.yaml#
0083 properties:
0084 clock-frequency:
0085 const: 12288000
0086
0087 lochnagar-clk11m:
0088 type: object
0089 $ref: /schemas/clock/fixed-clock.yaml#
0090 properties:
0091 clock-frequency:
0092 const: 11298600
0093
0094 lochnagar-clk24m:
0095 type: object
0096 $ref: /schemas/clock/fixed-clock.yaml#
0097 properties:
0098 clock-frequency:
0099 const: 24576000
0100
0101 lochnagar-clk22m:
0102 type: object
0103 $ref: /schemas/clock/fixed-clock.yaml#
0104 properties:
0105 clock-frequency:
0106 const: 22579200
0107
0108 lochnagar-clk8m:
0109 type: object
0110 $ref: /schemas/clock/fixed-clock.yaml#
0111 properties:
0112 clock-frequency:
0113 const: 8192000
0114
0115 lochnagar-usb24m:
0116 type: object
0117 $ref: /schemas/clock/fixed-clock.yaml#
0118 properties:
0119 clock-frequency:
0120 const: 24576000
0121
0122 lochnagar-usb12m:
0123 type: object
0124 $ref: /schemas/clock/fixed-clock.yaml#
0125 properties:
0126 clock-frequency:
0127 const: 12288000
0128
0129 pinctrl:
0130 type: object
0131 $ref: /schemas/pinctrl/cirrus,lochnagar.yaml#
0132
0133 lochnagar-hwmon:
0134 type: object
0135 $ref: /schemas/hwmon/cirrus,lochnagar.yaml#
0136
0137 lochnagar-sc:
0138 type: object
0139 $ref: /schemas/sound/cirrus,lochnagar.yaml#
0140
0141 VDDCORE:
0142 description:
0143 Initialisation data for the VDDCORE regulator, which supplies the
0144 CODECs digital core if not being provided by an internal regulator.
0145 type: object
0146 $ref: /schemas/regulator/regulator.yaml#
0147 properties:
0148 compatible:
0149 enum:
0150 - cirrus,lochnagar2-vddcore
0151
0152 SYSVDD-supply:
0153 description:
0154 Primary power supply for the Lochnagar.
0155 required:
0156 - compatible
0157
0158 MICVDD:
0159 description:
0160 Initialisation data for the MICVDD regulator, which supplies the
0161 CODECs MICVDD.
0162 type: object
0163 $ref: /schemas/regulator/regulator.yaml#
0164 properties:
0165 compatible:
0166 enum:
0167 - cirrus,lochnagar2-micvdd
0168
0169 SYSVDD-supply:
0170 description:
0171 Primary power supply for the Lochnagar.
0172 required:
0173 - compatible
0174
0175 MIC1VDD:
0176 description:
0177 Initialisation data for the MIC1VDD supplies.
0178 type: object
0179 $ref: /schemas/regulator/regulator.yaml#
0180 properties:
0181 compatible:
0182 enum:
0183 - cirrus,lochnagar2-mic1vdd
0184
0185 cirrus,micbias-input:
0186 description:
0187 A property selecting which of the CODEC minicard micbias outputs
0188 should be used.
0189 $ref: /schemas/types.yaml#/definitions/uint32
0190 minimum: 1
0191 maximum: 4
0192
0193 MICBIAS1-supply:
0194 description:
0195 Regulator supplies for the MIC1VDD outputs, supplying the digital
0196 microphones, normally supplied from the attached CODEC.
0197 required:
0198 - compatible
0199
0200 MIC2VDD:
0201 description:
0202 Initialisation data for the MIC2VDD supplies.
0203 type: object
0204 $ref: /schemas/regulator/regulator.yaml#
0205 properties:
0206 compatible:
0207 enum:
0208 - cirrus,lochnagar2-mic2vdd
0209
0210 cirrus,micbias-input:
0211 description:
0212 A property selecting which of the CODEC minicard micbias outputs
0213 should be used.
0214 $ref: /schemas/types.yaml#/definitions/uint32
0215 minimum: 1
0216 maximum: 4
0217
0218 MICBIAS2-supply:
0219 description:
0220 Regulator supplies for the MIC2VDD outputs, supplying the digital
0221 microphones, normally supplied from the attached CODEC.
0222 required:
0223 - compatible
0224
0225 VDD1V8:
0226 description:
0227 Recommended fixed regulator for the VDD1V8 regulator, which supplies
0228 the CODECs analog and 1.8V digital supplies.
0229 type: object
0230 $ref: /schemas/regulator/regulator.yaml#
0231 properties:
0232 compatible:
0233 enum:
0234 - regulator-fixed
0235
0236 regulator-min-microvolt:
0237 const: 1800000
0238
0239 regulator-max-microvolt:
0240 const: 1800000
0241
0242 vin-supply:
0243 description:
0244 Should be set to same supply as SYSVDD
0245 required:
0246 - compatible
0247 - regulator-min-microvolt
0248 - regulator-max-microvolt
0249 - regulator-boot-on
0250 - regulator-always-on
0251 - vin-supply
0252
0253 required:
0254 - compatible
0255 - reg
0256 - reset-gpios
0257 - lochnagar-clk
0258 - pinctrl
0259
0260 additionalProperties: false
0261
0262 examples:
0263 - |
0264 #include <dt-bindings/clk/lochnagar.h>
0265 #include <dt-bindings/pinctrl/lochnagar.h>
0266 i2c@e0004000 {
0267 #address-cells = <1>;
0268 #size-cells = <0>;
0269 reg = <0xe0004000 0x1000>;
0270
0271 lochnagar: lochnagar@22 {
0272 compatible = "cirrus,lochnagar2";
0273 reg = <0x22>;
0274
0275 reset-gpios = <&gpio0 55 0>;
0276 present-gpios = <&gpio0 60 0>;
0277
0278 lochnagarclk: lochnagar-clk {
0279 compatible = "cirrus,lochnagar2-clk";
0280
0281 #clock-cells = <1>;
0282 clocks = <&clkaudio>, <&clkpmic>;
0283 clock-names = "ln-gf-mclk2", "ln-pmic-32k";
0284
0285 assigned-clocks = <&lochnagarclk LOCHNAGAR_CDC_MCLK1>,
0286 <&lochnagarclk LOCHNAGAR_CDC_MCLK2>;
0287 assigned-clock-parents = <&clkaudio>, <&clkpmic>;
0288 };
0289
0290 clkpmic: lochnagar-pmic32k {
0291 compatible = "fixed-clock";
0292 #clock-cells = <0>;
0293 clock-frequency = <32768>;
0294 };
0295
0296 pinctrl {
0297 compatible = "cirrus,lochnagar-pinctrl";
0298
0299 gpio-controller;
0300 #gpio-cells = <2>;
0301 gpio-ranges = <&lochnagar 0 0 LOCHNAGAR2_PIN_NUM_GPIOS>;
0302
0303 pinctrl-names = "default";
0304 pinctrl-0 = <&pinsettings>;
0305
0306 pinsettings: pin-settings {
0307 ap2aif-pins {
0308 input-enable;
0309 groups = "gf-aif1";
0310 function = "codec-aif3";
0311 };
0312 codec2aif-pins {
0313 output-enable;
0314 groups = "codec-aif3";
0315 function = "gf-aif1";
0316 };
0317 };
0318 };
0319
0320 lochnagar-sc {
0321 compatible = "cirrus,lochnagar2-soundcard";
0322
0323 #sound-dai-cells = <1>;
0324
0325 clocks = <&lochnagarclk LOCHNAGAR_SOUNDCARD_MCLK>;
0326 clock-names = "mclk";
0327 };
0328
0329 lochnagar-hwmon {
0330 compatible = "cirrus,lochnagar2-hwmon";
0331 };
0332
0333 MIC1VDD {
0334 compatible = "cirrus,lochnagar2-mic1vdd";
0335
0336 cirrus,micbias-input = <3>;
0337 };
0338
0339 MICVDD {
0340 compatible = "cirrus,lochnagar2-micvdd";
0341
0342 SYSVDD-supply = <&wallvdd>;
0343
0344 regulator-min-microvolt = <3300000>;
0345 regulator-max-microvolt = <3300000>;
0346 };
0347
0348 VDD1V8 {
0349 compatible = "regulator-fixed";
0350
0351 regulator-name = "VDD1V8";
0352 regulator-min-microvolt = <1800000>;
0353 regulator-max-microvolt = <1800000>;
0354 regulator-boot-on;
0355 regulator-always-on;
0356
0357 vin-supply = <&wallvdd>;
0358 };
0359 };
0360 };