Cirrus Logic Lochnagar Audio Development Board

Schema identifier ($id): "http://devicetree.org/schemas/mfd/cirrus,lochnagar.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "patches@opensource.cirrus.com"

Lochnagar is an evaluation and development board for Cirrus Logic Smart CODEC and Amp devices. It allows the connection of most Cirrus Logic devices on mini-cards, as well as allowing connection of various application processor systems to provide a full evaluation platform. Audio system topology, clocking and power can all be controlled through the Lochnagar, allowing the device under test to be used in a variety of possible use cases.

Also see these documents for generic binding information:
  [1] GPIO : ../gpio/gpio.txt
And these for relevant defines:
  [2] include/dt-bindings/pinctrl/lochnagar.h
  [3] include/dt-bindings/clock/lochnagar.h
And these documents for the required sub-node binding details:
  [4] Clock: ../clock/cirrus,lochnagar.yaml
  [5] Pinctrl: ../pinctrl/cirrus,lochnagar.yaml
  [6] Sound: ../sound/cirrus,lochnagar.yaml
  [7] Hardware Monitor: ../hwmon/cirrus,lochnagar.yaml

All of these rules must match (allOf) #

Rule 1 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "cirrus,lochnagar2"

When the condition matches (then) #

Properties and child nodes (properties)

lochnagar-hwmon — not listed as required here

Value type (type): "object"

Shared schema rule ($ref): /schemas/hwmon/cirrus,lochnagar.yaml#

lochnagar-sc — not listed as required here

Value type (type): "object"

Shared schema rule ($ref): /schemas/sound/cirrus,lochnagar.yaml#

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "cirrus,lochnagar1", "cirrus,lochnagar2"

reg — required here #

Exact value (const): 34

reset-gpios — required here #

Maximum number of items (maxItems): 1

present-gpios — not listed as required here #

Host present line, indicating the presence of a host system, see [1]. This can be omitted if the present line is tied in hardware.

Maximum number of items (maxItems): 1

lochnagar-clk — required here #

Value type (type): "object"

Shared schema rule ($ref): /schemas/clock/cirrus,lochnagar.yaml#

lochnagar-pmic32k — not listed as required here #

Value type (type): "object"

Shared schema rule ($ref): /schemas/clock/fixed-clock.yaml#

Properties and child nodes (properties) #

clock-frequency — not listed as required here

Exact value (const): 32768

lochnagar-clk12m — not listed as required here #

Value type (type): "object"

Shared schema rule ($ref): /schemas/clock/fixed-clock.yaml#

Properties and child nodes (properties) #

clock-frequency — not listed as required here

Exact value (const): 12288000

lochnagar-clk11m — not listed as required here #

Value type (type): "object"

Shared schema rule ($ref): /schemas/clock/fixed-clock.yaml#

Properties and child nodes (properties) #

clock-frequency — not listed as required here

Exact value (const): 11298600

lochnagar-clk24m — not listed as required here #

Value type (type): "object"

Shared schema rule ($ref): /schemas/clock/fixed-clock.yaml#

Properties and child nodes (properties) #

clock-frequency — not listed as required here

Exact value (const): 24576000

lochnagar-clk22m — not listed as required here #

Value type (type): "object"

Shared schema rule ($ref): /schemas/clock/fixed-clock.yaml#

Properties and child nodes (properties) #

clock-frequency — not listed as required here

Exact value (const): 22579200

lochnagar-clk8m — not listed as required here #

Value type (type): "object"

Shared schema rule ($ref): /schemas/clock/fixed-clock.yaml#

Properties and child nodes (properties) #

clock-frequency — not listed as required here

Exact value (const): 8192000

lochnagar-usb24m — not listed as required here #

Value type (type): "object"

Shared schema rule ($ref): /schemas/clock/fixed-clock.yaml#

Properties and child nodes (properties) #

clock-frequency — not listed as required here

Exact value (const): 24576000

lochnagar-usb12m — not listed as required here #

Value type (type): "object"

Shared schema rule ($ref): /schemas/clock/fixed-clock.yaml#

Properties and child nodes (properties) #

clock-frequency — not listed as required here

Exact value (const): 12288000

pinctrl — required here #

Value type (type): "object"

Shared schema rule ($ref): /schemas/pinctrl/cirrus,lochnagar.yaml#

lochnagar-hwmon — not listed as required here #

Value type (type): "object"

Shared schema rule ($ref): /schemas/hwmon/cirrus,lochnagar.yaml#

lochnagar-sc — not listed as required here #

Value type (type): "object"

Shared schema rule ($ref): /schemas/sound/cirrus,lochnagar.yaml#

VDDCORE — not listed as required here #

Initialisation data for the VDDCORE regulator, which supplies the CODECs digital core if not being provided by an internal regulator.

Value type (type): "object"

Shared schema rule ($ref): /schemas/regulator/regulator.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

compatible — required here

Allowed values (enum): "cirrus,lochnagar2-vddcore"

SYSVDD-supply — not listed as required here

Primary power supply for the Lochnagar.

Required in this object (required): "compatible"

MICVDD — not listed as required here #

Initialisation data for the MICVDD regulator, which supplies the CODECs MICVDD.

Value type (type): "object"

Shared schema rule ($ref): /schemas/regulator/regulator.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

compatible — required here

Allowed values (enum): "cirrus,lochnagar2-micvdd"

SYSVDD-supply — not listed as required here

Primary power supply for the Lochnagar.

Required in this object (required): "compatible"

MIC1VDD — not listed as required here #

Initialisation data for the MIC1VDD supplies.

Value type (type): "object"

Shared schema rule ($ref): /schemas/regulator/regulator.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

compatible — required here

Allowed values (enum): "cirrus,lochnagar2-mic1vdd"

cirrus,micbias-input — not listed as required here

A property selecting which of the CODEC minicard micbias outputs should be used.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Minimum value (minimum): 1

Maximum value (maximum): 4

MICBIAS1-supply — not listed as required here

Regulator supplies for the MIC1VDD outputs, supplying the digital microphones, normally supplied from the attached CODEC.

Required in this object (required): "compatible"

MIC2VDD — not listed as required here #

Initialisation data for the MIC2VDD supplies.

Value type (type): "object"

Shared schema rule ($ref): /schemas/regulator/regulator.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

compatible — required here

Allowed values (enum): "cirrus,lochnagar2-mic2vdd"

cirrus,micbias-input — not listed as required here

A property selecting which of the CODEC minicard micbias outputs should be used.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Minimum value (minimum): 1

Maximum value (maximum): 4

MICBIAS2-supply — not listed as required here

Regulator supplies for the MIC2VDD outputs, supplying the digital microphones, normally supplied from the attached CODEC.

Required in this object (required): "compatible"

VDD1V8 — not listed as required here #

Recommended fixed regulator for the VDD1V8 regulator, which supplies the CODECs analog and 1.8V digital supplies.

Value type (type): "object"

Shared schema rule ($ref): /schemas/regulator/regulator.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

compatible — required here

Allowed values (enum): "regulator-fixed"

regulator-min-microvolt — required here

Exact value (const): 1800000

regulator-max-microvolt — required here

Exact value (const): 1800000

vin-supply — required here

Should be set to same supply as SYSVDD

Required in this object (required): "compatible", "regulator-min-microvolt", "regulator-max-microvolt", "regulator-boot-on", "regulator-always-on", "vin-supply"

Required in this object (required): "compatible", "reg", "reset-gpios", "lochnagar-clk", "pinctrl"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/clock/lochnagar.h>
#include <dt-bindings/pinctrl/lochnagar.h>
i2c@e0004000 {
    #address-cells = <1>;
    #size-cells = <0>;
    reg = <0xe0004000 0x1000>;

    lochnagar: lochnagar@22 {
        compatible = "cirrus,lochnagar2";
        reg = <0x22>;

        reset-gpios = <&gpio0 55 0>;
        present-gpios = <&gpio0 60 0>;

        lochnagarclk: lochnagar-clk {
            compatible = "cirrus,lochnagar2-clk";

            #clock-cells = <1>;
            clocks = <&clkaudio>, <&clkpmic>;
            clock-names = "ln-gf-mclk2", "ln-pmic-32k";

            assigned-clocks = <&lochnagarclk LOCHNAGAR_CDC_MCLK1>,
                              <&lochnagarclk LOCHNAGAR_CDC_MCLK2>;
            assigned-clock-parents = <&clkaudio>, <&clkpmic>;
        };

        clkpmic: lochnagar-pmic32k {
            compatible = "fixed-clock";
            #clock-cells = <0>;
            clock-frequency = <32768>;
        };

        pinctrl {
            compatible = "cirrus,lochnagar-pinctrl";

            gpio-controller;
            #gpio-cells = <2>;
            gpio-ranges = <&lochnagar 0 0 LOCHNAGAR2_PIN_NUM_GPIOS>;

            pinctrl-names = "default";
            pinctrl-0 = <&pinsettings>;

            pinsettings: pin-settings {
                ap2aif-pins {
                    input-enable;
                    groups = "gf-aif1";
                    function = "codec-aif3";
                };
                codec2aif-pins {
                    output-enable;
                    groups = "codec-aif3";
                    function = "gf-aif1";
                };
            };
        };

        lochnagar-sc {
            compatible = "cirrus,lochnagar2-soundcard";

            #sound-dai-cells = <1>;

            clocks = <&lochnagarclk LOCHNAGAR_SOUNDCARD_MCLK>;
            clock-names = "mclk";
        };

        lochnagar-hwmon {
            compatible = "cirrus,lochnagar2-hwmon";
        };

        MIC1VDD {
            compatible = "cirrus,lochnagar2-mic1vdd";

            cirrus,micbias-input = <3>;
        };

        MICVDD {
            compatible = "cirrus,lochnagar2-micvdd";

            SYSVDD-supply = <&wallvdd>;

            regulator-min-microvolt = <3300000>;
            regulator-max-microvolt = <3300000>;
        };

        VDD1V8 {
            compatible = "regulator-fixed";

            regulator-name = "VDD1V8";
            regulator-min-microvolt = <1800000>;
            regulator-max-microvolt = <1800000>;
            regulator-boot-on;
            regulator-always-on;

            vin-supply = <&wallvdd>;
        };
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause

Edit this page