* [PATCH 1/6] hwmon: lochnagar: Move binding over to dtschema @ 2020-04-27 10:28 Charles Keepax 2020-04-27 10:28 ` [PATCH 2/6] ASoC: " Charles Keepax ` (4 more replies) 0 siblings, 5 replies; 13+ messages in thread From: Charles Keepax @ 2020-04-27 10:28 UTC (permalink / raw) To: robh+dt, lee.jones, broonie, mturquette, sboyd, jdelvare, linux, linus.walleij Cc: lgirdwood, linux-kernel, devicetree, patches Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> --- .../devicetree/bindings/hwmon/cirrus,lochnagar.txt | 26 -------------- .../bindings/hwmon/cirrus,lochnagar.yaml | 40 ++++++++++++++++++++++ 2 files changed, 40 insertions(+), 26 deletions(-) delete mode 100644 Documentation/devicetree/bindings/hwmon/cirrus,lochnagar.txt create mode 100644 Documentation/devicetree/bindings/hwmon/cirrus,lochnagar.yaml diff --git a/Documentation/devicetree/bindings/hwmon/cirrus,lochnagar.txt b/Documentation/devicetree/bindings/hwmon/cirrus,lochnagar.txt deleted file mode 100644 index ffb79ccf51ee3..0000000000000 --- a/Documentation/devicetree/bindings/hwmon/cirrus,lochnagar.txt +++ /dev/null @@ -1,26 +0,0 @@ -Cirrus Logic Lochnagar Audio Development Board - -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. - -This binding document describes the binding for the hardware monitor -portion of the driver. - -This binding must be part of the Lochnagar MFD binding: - [4] ../mfd/cirrus,lochnagar.txt - -Required properties: - - - compatible : One of the following strings: - "cirrus,lochnagar2-hwmon" - -Example: - -lochnagar-hwmon { - compatible = "cirrus,lochnagar2-hwmon"; -}; diff --git a/Documentation/devicetree/bindings/hwmon/cirrus,lochnagar.yaml b/Documentation/devicetree/bindings/hwmon/cirrus,lochnagar.yaml new file mode 100644 index 0000000000000..db3e20319714c --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/cirrus,lochnagar.yaml @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/cirrus,lochnagar.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cirrus Logic Lochnagar Audio Development Board + +maintainers: + - patches@opensource.cirrus.com + +description: | + 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. + + This binding document describes the binding for the hardware monitor + portion of the driver. + + This binding must be part of the Lochnagar MFD binding: + [1] ../mfd/cirrus,lochnagar.yaml + +properties: + lochnagar-hwmon: + type: object + + properties: + compatible: + contains: + enum: + - cirrus,lochnagar2-hwmon + + required: + - compatible + + additionalProperties: false -- 2.11.0 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/6] ASoC: lochnagar: Move binding over to dtschema 2020-04-27 10:28 [PATCH 1/6] hwmon: lochnagar: Move binding over to dtschema Charles Keepax @ 2020-04-27 10:28 ` Charles Keepax 2020-05-01 21:06 ` Rob Herring 2020-04-27 10:28 ` [PATCH 3/6] pinctrl: " Charles Keepax ` (3 subsequent siblings) 4 siblings, 1 reply; 13+ messages in thread From: Charles Keepax @ 2020-04-27 10:28 UTC (permalink / raw) To: robh+dt, lee.jones, broonie, mturquette, sboyd, jdelvare, linux, linus.walleij Cc: lgirdwood, linux-kernel, devicetree, patches Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> --- .../devicetree/bindings/sound/cirrus,lochnagar.txt | 39 --------------- .../bindings/sound/cirrus,lochnagar.yaml | 58 ++++++++++++++++++++++ 2 files changed, 58 insertions(+), 39 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/cirrus,lochnagar.txt create mode 100644 Documentation/devicetree/bindings/sound/cirrus,lochnagar.yaml diff --git a/Documentation/devicetree/bindings/sound/cirrus,lochnagar.txt b/Documentation/devicetree/bindings/sound/cirrus,lochnagar.txt deleted file mode 100644 index 41ae2699f07a9..0000000000000 --- a/Documentation/devicetree/bindings/sound/cirrus,lochnagar.txt +++ /dev/null @@ -1,39 +0,0 @@ -Cirrus Logic Lochnagar Audio Development Board - -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. - -This binding document describes the binding for the audio portion -of the driver. - -This binding must be part of the Lochnagar MFD binding: - [4] ../mfd/cirrus,lochnagar.txt - -Required properties: - - - compatible : One of the following strings: - "cirrus,lochnagar2-soundcard" - - - #sound-dai-cells : Must be set to 1. - - - clocks : Contains an entry for each entry in clock-names. - - clock-names : Must include the following clocks: - "mclk" Master clock source for the sound card, should normally - be set to LOCHNAGAR_SOUNDCARD_MCLK provided by the Lochnagar - clock driver. - -Example: - -lochnagar-sc { - compatible = "cirrus,lochnagar2-soundcard"; - - #sound-dai-cells = <1>; - - clocks = <&lochnagar_clk LOCHNAGAR_SOUNDCARD_MCLK>; - clock-names = "mclk"; -}; diff --git a/Documentation/devicetree/bindings/sound/cirrus,lochnagar.yaml b/Documentation/devicetree/bindings/sound/cirrus,lochnagar.yaml new file mode 100644 index 0000000000000..6a266793ebd16 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/cirrus,lochnagar.yaml @@ -0,0 +1,58 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/cirrus,lochnagar.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cirrus Logic Lochnagar Audio Development Board + +maintainers: + - patches@opensource.cirrus.com + +description: | + 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. + + This binding document describes the binding for the audio portion of the + driver. + + This binding must be part of the Lochnagar MFD binding: + [1] ../mfd/cirrus,lochnagar.yaml + +properties: + lochnagar-sc: + type: object + + properties: + compatible: + contains: + enum: + - cirrus,lochnagar2-soundcard + + '#sound-dai-cells': + description: + Must be 1. The first cell indicating the audio interface. + const: 1 + + clocks: + maxItems: 1 + description: + Master clock source for the sound card, should normally be set to + LOCHNAGAR_SOUNDCARD_MCLK provided by the Lochnagar clock driver. + clock-names: + const: mclk + description: + Must contain the string mclk. + + required: + - compatible + - '#sound-dai-cells' + - clocks + - clock-names + + additionalProperties: false -- 2.11.0 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 2/6] ASoC: lochnagar: Move binding over to dtschema 2020-04-27 10:28 ` [PATCH 2/6] ASoC: " Charles Keepax @ 2020-05-01 21:06 ` Rob Herring 0 siblings, 0 replies; 13+ messages in thread From: Rob Herring @ 2020-05-01 21:06 UTC (permalink / raw) To: Charles Keepax Cc: lee.jones, broonie, mturquette, sboyd, jdelvare, linux, linus.walleij, lgirdwood, linux-kernel, devicetree, patches On Mon, Apr 27, 2020 at 11:28:08AM +0100, Charles Keepax wrote: > Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> > --- > .../devicetree/bindings/sound/cirrus,lochnagar.txt | 39 --------------- > .../bindings/sound/cirrus,lochnagar.yaml | 58 ++++++++++++++++++++++ > 2 files changed, 58 insertions(+), 39 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/sound/cirrus,lochnagar.txt > create mode 100644 Documentation/devicetree/bindings/sound/cirrus,lochnagar.yaml > > diff --git a/Documentation/devicetree/bindings/sound/cirrus,lochnagar.txt b/Documentation/devicetree/bindings/sound/cirrus,lochnagar.txt > deleted file mode 100644 > index 41ae2699f07a9..0000000000000 > --- a/Documentation/devicetree/bindings/sound/cirrus,lochnagar.txt > +++ /dev/null > @@ -1,39 +0,0 @@ > -Cirrus Logic Lochnagar Audio Development Board > - > -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. > - > -This binding document describes the binding for the audio portion > -of the driver. > - > -This binding must be part of the Lochnagar MFD binding: > - [4] ../mfd/cirrus,lochnagar.txt > - > -Required properties: > - > - - compatible : One of the following strings: > - "cirrus,lochnagar2-soundcard" > - > - - #sound-dai-cells : Must be set to 1. > - > - - clocks : Contains an entry for each entry in clock-names. > - - clock-names : Must include the following clocks: > - "mclk" Master clock source for the sound card, should normally > - be set to LOCHNAGAR_SOUNDCARD_MCLK provided by the Lochnagar > - clock driver. > - > -Example: > - > -lochnagar-sc { > - compatible = "cirrus,lochnagar2-soundcard"; > - > - #sound-dai-cells = <1>; > - > - clocks = <&lochnagar_clk LOCHNAGAR_SOUNDCARD_MCLK>; > - clock-names = "mclk"; > -}; > diff --git a/Documentation/devicetree/bindings/sound/cirrus,lochnagar.yaml b/Documentation/devicetree/bindings/sound/cirrus,lochnagar.yaml > new file mode 100644 > index 0000000000000..6a266793ebd16 > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/cirrus,lochnagar.yaml > @@ -0,0 +1,58 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/sound/cirrus,lochnagar.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Cirrus Logic Lochnagar Audio Development Board > + > +maintainers: > + - patches@opensource.cirrus.com > + > +description: | > + 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. > + > + This binding document describes the binding for the audio portion of the > + driver. > + > + This binding must be part of the Lochnagar MFD binding: > + [1] ../mfd/cirrus,lochnagar.yaml > + > +properties: > + lochnagar-sc: > + type: object > + > + properties: > + compatible: > + contains: > + enum: > + - cirrus,lochnagar2-soundcard > + > + '#sound-dai-cells': > + description: > + Must be 1. The first cell indicating the audio interface. 'Must be 1' is what the constraint says. > + const: 1 > + > + clocks: > + maxItems: 1 > + description: > + Master clock source for the sound card, should normally be set to > + LOCHNAGAR_SOUNDCARD_MCLK provided by the Lochnagar clock driver. blank line. > + clock-names: > + const: mclk > + description: > + Must contain the string mclk. That's what the constraint says already. > + > + required: > + - compatible > + - '#sound-dai-cells' > + - clocks > + - clock-names > + > + additionalProperties: false > -- > 2.11.0 > ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 3/6] pinctrl: lochnagar: Move binding over to dtschema 2020-04-27 10:28 [PATCH 1/6] hwmon: lochnagar: Move binding over to dtschema Charles Keepax 2020-04-27 10:28 ` [PATCH 2/6] ASoC: " Charles Keepax @ 2020-04-27 10:28 ` Charles Keepax 2020-05-12 11:40 ` Linus Walleij 2020-04-27 10:28 ` [PATCH 4/6] regulator: " Charles Keepax ` (2 subsequent siblings) 4 siblings, 1 reply; 13+ messages in thread From: Charles Keepax @ 2020-04-27 10:28 UTC (permalink / raw) To: robh+dt, lee.jones, broonie, mturquette, sboyd, jdelvare, linux, linus.walleij Cc: lgirdwood, linux-kernel, devicetree, patches Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> --- .../bindings/pinctrl/cirrus,lochnagar.txt | 141 ---------------- .../bindings/pinctrl/cirrus,lochnagar.yaml | 186 +++++++++++++++++++++ 2 files changed, 186 insertions(+), 141 deletions(-) delete mode 100644 Documentation/devicetree/bindings/pinctrl/cirrus,lochnagar.txt create mode 100644 Documentation/devicetree/bindings/pinctrl/cirrus,lochnagar.yaml diff --git a/Documentation/devicetree/bindings/pinctrl/cirrus,lochnagar.txt b/Documentation/devicetree/bindings/pinctrl/cirrus,lochnagar.txt deleted file mode 100644 index a87447180e838..0000000000000 --- a/Documentation/devicetree/bindings/pinctrl/cirrus,lochnagar.txt +++ /dev/null @@ -1,141 +0,0 @@ -Cirrus Logic Lochnagar Audio Development Board - -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. - -This binding document describes the binding for the pinctrl portion -of the driver. - -Also see these documents for generic binding information: - [1] GPIO : ../gpio/gpio.txt - [2] Pinctrl: ../pinctrl/pinctrl-bindings.txt - -And these for relevant defines: - [3] include/dt-bindings/pinctrl/lochnagar.h - -This binding must be part of the Lochnagar MFD binding: - [4] ../mfd/cirrus,lochnagar.txt - -Required properties: - - - compatible : One of the following strings: - "cirrus,lochnagar-pinctrl" - - - gpio-controller : Indicates this device is a GPIO controller. - - #gpio-cells : Must be 2. The first cell is the pin number, see - [3] for available pins and the second cell is used to specify - optional parameters, see [1]. - - gpio-ranges : Range of pins managed by the GPIO controller, see - [1]. Both the GPIO and Pinctrl base should be set to zero and the - count to the appropriate of the LOCHNAGARx_PIN_NUM_GPIOS define, - see [3]. - - - pinctrl-names : A pinctrl state named "default" must be defined. - - pinctrl-0 : A phandle to the default pinctrl state. - -Required sub-nodes: - -The pin configurations are defined as a child of the pinctrl states -node, see [2]. Each sub-node can have the following properties: - - groups : A list of groups to select (either this or "pins" must be - specified), available groups: - codec-aif1, codec-aif2, codec-aif3, dsp-aif1, dsp-aif2, psia1, - psia2, gf-aif1, gf-aif2, gf-aif3, gf-aif4, spdif-aif, usb-aif1, - usb-aif2, adat-aif, soundcard-aif - - pins : A list of pin names to select (either this or "groups" must - be specified), available pins: - fpga-gpio1, fpga-gpio2, fpga-gpio3, fpga-gpio4, fpga-gpio5, - fpga-gpio6, codec-gpio1, codec-gpio2, codec-gpio3, codec-gpio4, - codec-gpio5, codec-gpio6, codec-gpio7, codec-gpio8, dsp-gpio1, - dsp-gpio2, dsp-gpio3, dsp-gpio4, dsp-gpio5, dsp-gpio6, gf-gpio2, - gf-gpio3, gf-gpio7, codec-aif1-bclk, codec-aif1-rxdat, - codec-aif1-lrclk, codec-aif1-txdat, codec-aif2-bclk, - codec-aif2-rxdat, codec-aif2-lrclk, codec-aif2-txdat, - codec-aif3-bclk, codec-aif3-rxdat, codec-aif3-lrclk, - codec-aif3-txdat, dsp-aif1-bclk, dsp-aif1-rxdat, dsp-aif1-lrclk, - dsp-aif1-txdat, dsp-aif2-bclk, dsp-aif2-rxdat, - dsp-aif2-lrclk, dsp-aif2-txdat, psia1-bclk, psia1-rxdat, - psia1-lrclk, psia1-txdat, psia2-bclk, psia2-rxdat, psia2-lrclk, - psia2-txdat, gf-aif3-bclk, gf-aif3-rxdat, gf-aif3-lrclk, - gf-aif3-txdat, gf-aif4-bclk, gf-aif4-rxdat, gf-aif4-lrclk, - gf-aif4-txdat, gf-aif1-bclk, gf-aif1-rxdat, gf-aif1-lrclk, - gf-aif1-txdat, gf-aif2-bclk, gf-aif2-rxdat, gf-aif2-lrclk, - gf-aif2-txdat, dsp-uart1-rx, dsp-uart1-tx, dsp-uart2-rx, - dsp-uart2-tx, gf-uart2-rx, gf-uart2-tx, usb-uart-rx, - codec-pdmclk1, codec-pdmdat1, codec-pdmclk2, codec-pdmdat2, - codec-dmicclk1, codec-dmicdat1, codec-dmicclk2, codec-dmicdat2, - codec-dmicclk3, codec-dmicdat3, codec-dmicclk4, codec-dmicdat4, - dsp-dmicclk1, dsp-dmicdat1, dsp-dmicclk2, dsp-dmicdat2, i2c2-scl, - i2c2-sda, i2c3-scl, i2c3-sda, i2c4-scl, i2c4-sda, dsp-standby, - codec-mclk1, codec-mclk2, dsp-clkin, psia1-mclk, psia2-mclk, - gf-gpio1, gf-gpio5, dsp-gpio20, led1, led2 - - function : The mux function to select, available functions: - aif, fpga-gpio1, fpga-gpio2, fpga-gpio3, fpga-gpio4, fpga-gpio5, - fpga-gpio6, codec-gpio1, codec-gpio2, codec-gpio3, codec-gpio4, - codec-gpio5, codec-gpio6, codec-gpio7, codec-gpio8, dsp-gpio1, - dsp-gpio2, dsp-gpio3, dsp-gpio4, dsp-gpio5, dsp-gpio6, gf-gpio2, - gf-gpio3, gf-gpio7, gf-gpio1, gf-gpio5, dsp-gpio20, codec-clkout, - dsp-clkout, pmic-32k, spdif-clkout, clk-12m288, clk-11m2986, - clk-24m576, clk-22m5792, xmos-mclk, gf-clkout1, gf-mclk1, - gf-mclk3, gf-mclk2, gf-clkout2, codec-mclk1, codec-mclk2, - dsp-clkin, psia1-mclk, psia2-mclk, spdif-mclk, codec-irq, - codec-reset, dsp-reset, dsp-irq, dsp-standby, codec-pdmclk1, - codec-pdmdat1, codec-pdmclk2, codec-pdmdat2, codec-dmicclk1, - codec-dmicdat1, codec-dmicclk2, codec-dmicdat2, codec-dmicclk3, - codec-dmicdat3, codec-dmicclk4, codec-dmicdat4, dsp-dmicclk1, - dsp-dmicdat1, dsp-dmicclk2, dsp-dmicdat2, dsp-uart1-rx, - dsp-uart1-tx, dsp-uart2-rx, dsp-uart2-tx, gf-uart2-rx, - gf-uart2-tx, usb-uart-rx, usb-uart-tx, i2c2-scl, i2c2-sda, - i2c3-scl, i2c3-sda, i2c4-scl, i2c4-sda, spdif-aif, psia1, - psia1-bclk, psia1-lrclk, psia1-rxdat, psia1-txdat, psia2, - psia2-bclk, psia2-lrclk, psia2-rxdat, psia2-txdat, codec-aif1, - codec-aif1-bclk, codec-aif1-lrclk, codec-aif1-rxdat, - codec-aif1-txdat, codec-aif2, codec-aif2-bclk, codec-aif2-lrclk, - codec-aif2-rxdat, codec-aif2-txdat, codec-aif3, codec-aif3-bclk, - codec-aif3-lrclk, codec-aif3-rxdat, codec-aif3-txdat, dsp-aif1, - dsp-aif1-bclk, dsp-aif1-lrclk, dsp-aif1-rxdat, dsp-aif1-txdat, - dsp-aif2, dsp-aif2-bclk, dsp-aif2-lrclk, dsp-aif2-rxdat, - dsp-aif2-txdat, gf-aif3, gf-aif3-bclk, gf-aif3-lrclk, - gf-aif3-rxdat, gf-aif3-txdat, gf-aif4, gf-aif4-bclk, - gf-aif4-lrclk, gf-aif4-rxdat, gf-aif4-txdat, gf-aif1, - gf-aif1-bclk, gf-aif1-lrclk, gf-aif1-rxdat, gf-aif1-txdat, - gf-aif2, gf-aif2-bclk, gf-aif2-lrclk, gf-aif2-rxdat, - gf-aif2-txdat, usb-aif1, usb-aif2, adat-aif, soundcard-aif, - - - output-enable : Specifies that an AIF group will be used as a master - interface (either this or input-enable is required if a group is - being muxed to an AIF) - - input-enable : Specifies that an AIF group will be used as a slave - interface (either this or output-enable is required if a group is - being muxed to an AIF) - -Example: - -lochnagar-pinctrl { - compatible = "cirrus,lochnagar-pinctrl"; - - gpio-controller; - #gpio-cells = <2>; - gpio-ranges = <&lochnagar 0 0 LOCHNAGAR2_PIN_NUM_GPIOS>; - - pinctrl-names = "default"; - pinctrl-0 = <&pin-settings>; - - pin-settings: pin-settings { - ap-aif { - input-enable; - groups = "gf-aif1"; - function = "codec-aif3"; - }; - codec-aif { - output-enable; - groups = "codec-aif3"; - function = "gf-aif1"; - }; - }; -}; diff --git a/Documentation/devicetree/bindings/pinctrl/cirrus,lochnagar.yaml b/Documentation/devicetree/bindings/pinctrl/cirrus,lochnagar.yaml new file mode 100644 index 0000000000000..6ded7b3eb53bb --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/cirrus,lochnagar.yaml @@ -0,0 +1,186 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/cirrus,lochnagar.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cirrus Logic Lochnagar Audio Development Board + +maintainers: + - patches@opensource.cirrus.com + +description: | + 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. + + This binding document describes the binding for the pinctrl portion of + the driver. + + Also see these documents for generic binding information: + [1] GPIO : ../gpio/gpio.txt + [2] Pinctrl: ../pinctrl/pinctrl-bindings.txt + + And these for relevant defines: + [3] include/dt-bindings/pinctrl/lochnagar.h + + This binding must be part of the Lochnagar MFD binding: + [4] ../mfd/cirrus,lochnagar.yaml + +properties: + lochnagar-pinctrl: + type: object + + properties: + compatible: + contains: + enum: + - cirrus,lochnagar-pinctrl + + gpio-controller: + description: + Indicates this device is a GPIO controller. + '#gpio-cells': + description: + Must be 2. The first cell is the pin number and the second cell is + used to specify optional parameters. + const: 2 + gpio-ranges: + description: + Range of pins managed by the GPIO controller, see [1]. Both the + GPIO and Pinctrl base should be set to zero and the count to the + appropriate of the LOCHNAGARx_PIN_NUM_GPIOS define, see [3]. + maxItems: 1 + + pinctrl-0: + description: + A phandle to the default pinctrl state. + pinctrl-names: + description: + A pinctrl state named "default" must be defined. + const: default + + patternProperties: + '^.*$': + patternProperties: + '^.*$': + type: object + allOf: + - $ref: "pincfg-node.yaml#" + - $ref: "pinmux-node.yaml#" + description: + The pin configurations are defined as a child of the pinctrl + states node, see [2]. Each sub-node can have the following + properties. + properties: + groups: + description: + A list of groups to select (either this or "pins" must be + specified), available groups. + enum: [ codec-aif1, codec-aif2, codec-aif3, dsp-aif1, + dsp-aif2, psia1, psia2, gf-aif1, gf-aif2, gf-aif3, + gf-aif4, spdif-aif, usb-aif1, usb-aif2, adat-aif, + soundcard-aif ] + pins: + description: + A list of pin names to select (either this or "groups" must + be specified), available pins. + enum: [ fpga-gpio1, fpga-gpio2, fpga-gpio3, fpga-gpio4, + fpga-gpio5, fpga-gpio6, codec-gpio1, codec-gpio2, + codec-gpio3, codec-gpio4, codec-gpio5, codec-gpio6, + codec-gpio7, codec-gpio8, dsp-gpio1, dsp-gpio2, + dsp-gpio3, dsp-gpio4, dsp-gpio5, dsp-gpio6, + gf-gpio2, gf-gpio3, gf-gpio7, codec-aif1-bclk, + codec-aif1-rxdat, codec-aif1-lrclk, codec-aif1-txdat, + codec-aif2-bclk, codec-aif2-rxdat, codec-aif2-lrclk, + codec-aif2-txdat, codec-aif3-bclk, codec-aif3-rxdat, + codec-aif3-lrclk, codec-aif3-txdat, dsp-aif1-bclk, + dsp-aif1-rxdat, dsp-aif1-lrclk, dsp-aif1-txdat, + dsp-aif2-bclk, dsp-aif2-rxdat, dsp-aif2-lrclk, + dsp-aif2-txdat, psia1-bclk, psia1-rxdat, psia1-lrclk, + psia1-txdat, psia2-bclk, psia2-rxdat, psia2-lrclk, + psia2-txdat, gf-aif3-bclk, gf-aif3-rxdat, + gf-aif3-lrclk, gf-aif3-txdat, gf-aif4-bclk, + gf-aif4-rxdat, gf-aif4-lrclk, gf-aif4-txdat, + gf-aif1-bclk, gf-aif1-rxdat, gf-aif1-lrclk, + gf-aif1-txdat, gf-aif2-bclk, gf-aif2-rxdat, + gf-aif2-lrclk, gf-aif2-txdat, dsp-uart1-rx, + dsp-uart1-tx, dsp-uart2-rx, dsp-uart2-tx, + gf-uart2-rx, gf-uart2-tx, usb-uart-rx, codec-pdmclk1, + codec-pdmdat1, codec-pdmclk2, codec-pdmdat2, + codec-dmicclk1, codec-dmicdat1, codec-dmicclk2, + codec-dmicdat2, codec-dmicclk3, codec-dmicdat3, + codec-dmicclk4, codec-dmicdat4, dsp-dmicclk1, + dsp-dmicdat1, dsp-dmicclk2, dsp-dmicdat2, i2c2-scl, + i2c2-sda, i2c3-scl, i2c3-sda, i2c4-scl, i2c4-sda, + dsp-standby, codec-mclk1, codec-mclk2, dsp-clkin, + psia1-mclk, psia2-mclk, gf-gpio1, gf-gpio5, + dsp-gpio20, led1, led2 ] + function: + description: + The mux function to select, available functions. + enum: [ aif, fpga-gpio1, fpga-gpio2, fpga-gpio3, fpga-gpio4, + fpga-gpio5, fpga-gpio6, codec-gpio1, codec-gpio2, + codec-gpio3, codec-gpio4, codec-gpio5, codec-gpio6, + codec-gpio7, codec-gpio8, dsp-gpio1, dsp-gpio2, + dsp-gpio3, dsp-gpio4, dsp-gpio5, dsp-gpio6, + gf-gpio2, gf-gpio3, gf-gpio7, gf-gpio1, gf-gpio5, + dsp-gpio20, codec-clkout, dsp-clkout, pmic-32k, + spdif-clkout, clk-12m288, clk-11m2986, clk-24m576, + clk-22m5792, xmos-mclk, gf-clkout1, gf-mclk1, + gf-mclk3, gf-mclk2, gf-clkout2, codec-mclk1, + codec-mclk2, dsp-clkin, psia1-mclk, psia2-mclk, + spdif-mclk, codec-irq, codec-reset, dsp-reset, + dsp-irq, dsp-standby, codec-pdmclk1, codec-pdmdat1, + codec-pdmclk2, codec-pdmdat2, codec-dmicclk1, + codec-dmicdat1, codec-dmicclk2, codec-dmicdat2, + codec-dmicclk3, codec-dmicdat3, codec-dmicclk4, + codec-dmicdat4, dsp-dmicclk1, dsp-dmicdat1, + dsp-dmicclk2, dsp-dmicdat2, dsp-uart1-rx, + dsp-uart1-tx, dsp-uart2-rx, dsp-uart2-tx, + gf-uart2-rx, gf-uart2-tx, usb-uart-rx, usb-uart-tx, + i2c2-scl, i2c2-sda, i2c3-scl, i2c3-sda, i2c4-scl, + i2c4-sda, spdif-aif, psia1, psia1-bclk, psia1-lrclk, + psia1-rxdat, psia1-txdat, psia2, psia2-bclk, + psia2-lrclk, psia2-rxdat, psia2-txdat, codec-aif1, + codec-aif1-bclk, codec-aif1-lrclk, codec-aif1-rxdat, + codec-aif1-txdat, codec-aif2, codec-aif2-bclk, + codec-aif2-lrclk, codec-aif2-rxdat, codec-aif2-txdat, + codec-aif3, codec-aif3-bclk, codec-aif3-lrclk, + codec-aif3-rxdat, codec-aif3-txdat, dsp-aif1, + dsp-aif1-bclk, dsp-aif1-lrclk, dsp-aif1-rxdat, + dsp-aif1-txdat, dsp-aif2, dsp-aif2-bclk, + dsp-aif2-lrclk, dsp-aif2-rxdat, dsp-aif2-txdat, + gf-aif3, gf-aif3-bclk, gf-aif3-lrclk, gf-aif3-rxdat, + gf-aif3-txdat, gf-aif4, gf-aif4-bclk, gf-aif4-lrclk, + gf-aif4-rxdat, gf-aif4-txdat, gf-aif1, gf-aif1-bclk, + gf-aif1-lrclk, gf-aif1-rxdat, gf-aif1-txdat, gf-aif2, + gf-aif2-bclk, gf-aif2-lrclk, gf-aif2-rxdat, + gf-aif2-txdat, usb-aif1, usb-aif2, adat-aif, + soundcard-aif ] + output-enable: + description: + Specifies that an AIF group will be used as a master + interface (either this or input-enable is required if a + group is being muxed to an AIF) + input-enable: + description: + Specifies that an AIF group will be used as a slave + interface (either this or output-enable is required if a + group is being muxed to an AIF) + additionalProperties: false + required: + - function + additionalProperties: false + + required: + - compatible + - gpio-controller + - '#gpio-cells' + - gpio-ranges + - pinctrl-0 + - pinctrl-names -- 2.11.0 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 3/6] pinctrl: lochnagar: Move binding over to dtschema 2020-04-27 10:28 ` [PATCH 3/6] pinctrl: " Charles Keepax @ 2020-05-12 11:40 ` Linus Walleij 0 siblings, 0 replies; 13+ messages in thread From: Linus Walleij @ 2020-05-12 11:40 UTC (permalink / raw) To: Charles Keepax Cc: Rob Herring, Lee Jones, Mark Brown, Michael Turquette, Stephen Boyd, Jean Delvare, Guenter Roeck, Liam Girdwood, linux-kernel, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, patches On Mon, Apr 27, 2020 at 12:28 PM Charles Keepax <ckeepax@opensource.cirrus.com> wrote: > Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Patch applied. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 4/6] regulator: lochnagar: Move binding over to dtschema 2020-04-27 10:28 [PATCH 1/6] hwmon: lochnagar: Move binding over to dtschema Charles Keepax 2020-04-27 10:28 ` [PATCH 2/6] ASoC: " Charles Keepax 2020-04-27 10:28 ` [PATCH 3/6] pinctrl: " Charles Keepax @ 2020-04-27 10:28 ` Charles Keepax 2020-04-27 10:28 ` [PATCH 5/6] clk: " Charles Keepax 2020-04-27 10:28 ` [PATCH 6/6] mfd: " Charles Keepax 4 siblings, 0 replies; 13+ messages in thread From: Charles Keepax @ 2020-04-27 10:28 UTC (permalink / raw) To: robh+dt, lee.jones, broonie, mturquette, sboyd, jdelvare, linux, linus.walleij Cc: lgirdwood, linux-kernel, devicetree, patches Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> --- .../bindings/regulator/cirrus,lochnagar.txt | 82 ------------- .../bindings/regulator/cirrus,lochnagar.yaml | 132 +++++++++++++++++++++ 2 files changed, 132 insertions(+), 82 deletions(-) delete mode 100644 Documentation/devicetree/bindings/regulator/cirrus,lochnagar.txt create mode 100644 Documentation/devicetree/bindings/regulator/cirrus,lochnagar.yaml diff --git a/Documentation/devicetree/bindings/regulator/cirrus,lochnagar.txt b/Documentation/devicetree/bindings/regulator/cirrus,lochnagar.txt deleted file mode 100644 index 91974e6ee251b..0000000000000 --- a/Documentation/devicetree/bindings/regulator/cirrus,lochnagar.txt +++ /dev/null @@ -1,82 +0,0 @@ -Cirrus Logic Lochnagar Audio Development Board - -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. - -This binding document describes the binding for the regulator portion -of the driver. - -Also see these documents for generic binding information: - [1] Regulator: ../regulator/regulator.txt - -This binding must be part of the Lochnagar MFD binding: - [2] ../mfd/cirrus,lochnagar.txt - -Optional sub-nodes: - - - VDDCORE : Initialisation data for the VDDCORE regulator, which - supplies the CODECs digital core if it has no build regulator for that - purpose. - Required Properties: - - compatible : One of the following strings: - "cirrus,lochnagar2-vddcore" - - SYSVDD-supply: Primary power supply for the Lochnagar. - - - MICVDD : Initialisation data for the MICVDD regulator, which - supplies the CODECs MICVDD. - Required Properties: - - compatible : One of the following strings: - "cirrus,lochnagar2-micvdd" - - SYSVDD-supply: Primary power supply for the Lochnagar. - - - MIC1VDD, MIC2VDD : Initialisation data for the MICxVDD supplies. - Required Properties: - - compatible : One of the following strings: - "cirrus,lochnagar2-mic1vdd", "cirrus,lochnagar2-mic2vdd" - Optional Properties: - - cirrus,micbias-input : A property selecting which of the CODEC - minicard micbias outputs should be used, valid values are 1 - 4. - - MICBIAS1-supply, MICBIAS2-supply: Regulator supplies for the - MICxVDD outputs, supplying the digital microphones, normally - supplied from the attached CODEC. - - - VDD1V8 : Recommended fixed regulator for the VDD1V8 regulator, which supplies the - CODECs analog and 1.8V digital supplies. - Required Properties: - - compatible : Should be set to "regulator-fixed" - - regulator-min-microvolt : Should be set to 1.8V - - regulator-max-microvolt : Should be set to 1.8V - - regulator-boot-on - - regulator-always-on - - vin-supply : Should be set to same supply as SYSVDD - -Example: - -lochnagar { - lochnagar-micvdd: MICVDD { - compatible = "cirrus,lochnagar2-micvdd"; - - SYSVDD-supply = <&wallvdd>; - - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - lochnagar-vdd1v8: VDD1V8 { - compatible = "regulator-fixed"; - - regulator-name = "VDD1V8"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-boot-on; - regulator-always-on; - - vin-supply = <&wallvdd>; - }; -}; - diff --git a/Documentation/devicetree/bindings/regulator/cirrus,lochnagar.yaml b/Documentation/devicetree/bindings/regulator/cirrus,lochnagar.yaml new file mode 100644 index 0000000000000..49ffa1534050b --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/cirrus,lochnagar.yaml @@ -0,0 +1,132 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/cirrus,lochnagar.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cirrus Logic Lochnagar Audio Development Board + +maintainers: + - patches@opensource.cirrus.com + +description: | + 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. + + This binding document describes the binding for the regulator portion of + the driver. + + Also see these documents for generic binding information: + [1] Regulator: ../regulator/regulator.yaml + + This binding must be part of the Lochnagar MFD binding: + [2] ../mfd/cirrus,lochnagar.yaml + +properties: + VDDCORE: + description: + Initialisation data for the VDDCORE regulator, which supplies the + CODECs digital core if not being provided by an internal regulator. + $ref: "regulator.yaml#" + type: object + properties: + compatible: + enum: + - cirrus,lochnagar2-vddcore + SYSVDD-supply: + description: + Primary power supply for the Lochnagar. + required: + - compatible + + MICVDD: + description: + Initialisation data for the MICVDD regulator, which supplies the + CODECs MICVDD. + $ref: "regulator.yaml#" + type: object + properties: + compatible: + enum: + - cirrus,lochnagar2-micvdd + SYSVDD-supply: + description: + Primary power supply for the Lochnagar. + required: + - compatible + + MIC1VDD: + description: + Initialisation data for the MIC1VDD supplies. + $ref: "regulator.yaml#" + type: object + properties: + compatible: + enum: + - cirrus,lochnagar2-mic1vdd + cirrus,micbias-input: + description: + A property selecting which of the CODEC minicard micbias outputs + should be used. + $ref: "/schemas/types.yaml#/definitions/uint32" + minimum: 1 + maximum: 4 + MICBIAS1-supply: + description: + Regulator supplies for the MIC1VDD outputs, supplying the digital + microphones, normally supplied from the attached CODEC. + required: + - compatible + + MIC2VDD: + description: + Initialisation data for the MIC2VDD supplies. + $ref: "regulator.yaml#" + type: object + properties: + compatible: + enum: + - cirrus,lochnagar2-mic2vdd + cirrus,micbias-input: + description: + A property selecting which of the CODEC minicard micbias outputs + should be used. + $ref: "/schemas/types.yaml#/definitions/uint32" + minimum: 1 + maximum: 4 + MICBIAS2-supply: + description: + Regulator supplies for the MIC2VDD outputs, supplying the digital + microphones, normally supplied from the attached CODEC. + required: + - compatible + + VDD1V8: + description: + Recommended fixed regulator for the VDD1V8 regulator, which supplies + the CODECs analog and 1.8V digital supplies. + $ref: "regulator.yaml#" + type: object + properties: + compatible: + enum: + - regulator-fixed + regulator-min-microvolt: + const: 1800000 + regulator-max-microvolt: + const: 1800000 + vin-supply: + description: + Should be set to same supply as SYSVDD + required: + - compatible + - regulator-min-microvolt + - regulator-max-microvolt + - regulator-boot-on + - regulator-always-on + - vin-supply -- 2.11.0 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 5/6] clk: lochnagar: Move binding over to dtschema 2020-04-27 10:28 [PATCH 1/6] hwmon: lochnagar: Move binding over to dtschema Charles Keepax ` (2 preceding siblings ...) 2020-04-27 10:28 ` [PATCH 4/6] regulator: " Charles Keepax @ 2020-04-27 10:28 ` Charles Keepax 2020-05-01 21:03 ` Rob Herring 2020-04-27 10:28 ` [PATCH 6/6] mfd: " Charles Keepax 4 siblings, 1 reply; 13+ messages in thread From: Charles Keepax @ 2020-04-27 10:28 UTC (permalink / raw) To: robh+dt, lee.jones, broonie, mturquette, sboyd, jdelvare, linux, linus.walleij Cc: lgirdwood, linux-kernel, devicetree, patches Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> --- .../devicetree/bindings/clock/cirrus,lochnagar.txt | 94 --------- .../bindings/clock/cirrus,lochnagar.yaml | 220 +++++++++++++++++++++ 2 files changed, 220 insertions(+), 94 deletions(-) delete mode 100644 Documentation/devicetree/bindings/clock/cirrus,lochnagar.txt create mode 100644 Documentation/devicetree/bindings/clock/cirrus,lochnagar.yaml diff --git a/Documentation/devicetree/bindings/clock/cirrus,lochnagar.txt b/Documentation/devicetree/bindings/clock/cirrus,lochnagar.txt deleted file mode 100644 index 52a064c789eec..0000000000000 --- a/Documentation/devicetree/bindings/clock/cirrus,lochnagar.txt +++ /dev/null @@ -1,94 +0,0 @@ -Cirrus Logic Lochnagar Audio Development Board - -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. - -This binding document describes the binding for the clock portion of -the driver. - -Also see these documents for generic binding information: - [1] Clock : ../clock/clock-bindings.txt - -And these for relevant defines: - [2] include/dt-bindings/clock/lochnagar.h - -This binding must be part of the Lochnagar MFD binding: - [3] ../mfd/cirrus,lochnagar.txt - -Required properties: - - - compatible : One of the following strings: - "cirrus,lochnagar1-clk" - "cirrus,lochnagar2-clk" - - - #clock-cells : Must be 1. The first cell indicates the clock - number, see [2] for available clocks and [1]. - -Optional properties: - - - clocks : Must contain an entry for each clock in clock-names. - - clock-names : May contain entries for each of the following - clocks: - - ln-cdc-clkout : Output clock from CODEC card. - - ln-dsp-clkout : Output clock from DSP card. - - ln-gf-mclk1,ln-gf-mclk2,ln-gf-mclk3,ln-gf-mclk4 : Optional - input audio clocks from host system. - - ln-psia1-mclk, ln-psia2-mclk : Optional input audio clocks from - external connector. - - ln-spdif-mclk : Optional input audio clock from SPDIF. - - ln-spdif-clkout : Optional input audio clock from SPDIF. - - ln-adat-mclk : Optional input audio clock from ADAT. - - ln-pmic-32k : On board fixed clock. - - ln-clk-12m : On board fixed clock. - - ln-clk-11m : On board fixed clock. - - ln-clk-24m : On board fixed clock. - - ln-clk-22m : On board fixed clock. - - ln-clk-8m : On board fixed clock. - - ln-usb-clk-24m : On board fixed clock. - - ln-usb-clk-12m : On board fixed clock. - - - assigned-clocks : A list of Lochnagar clocks to be reparented, see - [2] for available clocks. - - assigned-clock-parents : Parents to be assigned to the clocks - listed in "assigned-clocks". - -Optional nodes: - - - fixed-clock nodes may be registered for the following on board clocks: - - ln-pmic-32k : 32768 Hz - - ln-clk-12m : 12288000 Hz - - ln-clk-11m : 11298600 Hz - - ln-clk-24m : 24576000 Hz - - ln-clk-22m : 22579200 Hz - - ln-clk-8m : 8192000 Hz - - ln-usb-clk-24m : 24576000 Hz - - ln-usb-clk-12m : 12288000 Hz - -Example: - -lochnagar { - lochnagar-clk { - compatible = "cirrus,lochnagar2-clk"; - - #clock-cells = <1>; - - clocks = <&clk-audio>, <&clk_pmic>; - clock-names = "ln-gf-mclk2", "ln-pmic-32k"; - - assigned-clocks = <&lochnagar-clk LOCHNAGAR_CDC_MCLK1>, - <&lochnagar-clk LOCHNAGAR_CDC_MCLK2>; - assigned-clock-parents = <&clk-audio>, - <&clk-pmic>; - }; - - clk-pmic: clk-pmic { - compatible = "fixed-clock"; - clock-cells = <0>; - clock-frequency = <32768>; - }; -}; diff --git a/Documentation/devicetree/bindings/clock/cirrus,lochnagar.yaml b/Documentation/devicetree/bindings/clock/cirrus,lochnagar.yaml new file mode 100644 index 0000000000000..55d27e4475333 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/cirrus,lochnagar.yaml @@ -0,0 +1,220 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/cirrus,lochnagar.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cirrus Logic Lochnagar Audio Development Board + +maintainers: + - patches@opensource.cirrus.com + +description: | + 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. + + This binding document describes the binding for the clock portion of the + driver. + + Also see these documents for generic binding information: + [1] Clock : ../clock/clock-bindings.txt + + And these for relevant defines: + [2] include/dt-bindings/clock/lochnagar.h + + This binding must be part of the Lochnagar MFD binding: + [3] ../mfd/cirrus,lochnagar.yaml + +properties: + lochnagar-clk: + type: object + + properties: + compatible: + contains: + enum: + - cirrus,lochnagar1-clk + - cirrus,lochnagar2-clk + + '#clock-cells': + description: + Must be 1. The first cell indicates the clock number, see [2] for + available clocks and [1]. + const: 1 + clock-names: + description: | + May contain entries for each of the following clocks: + - ln-cdc-clkout : Output clock from CODEC card. + - ln-dsp-clkout : Output clock from DSP card. + - ln-gf-mclk1,ln-gf-mclk2,ln-gf-mclk3,ln-gf-mclk4 : Optional + input audio clocks from host system. + - ln-psia1-mclk, ln-psia2-mclk : Optional input audio clocks from + external connector. + - ln-spdif-mclk : Optional input audio clock from SPDIF. + - ln-spdif-clkout : Optional input audio clock from SPDIF. + - ln-adat-mclk : Optional input audio clock from ADAT. + - ln-pmic-32k : On board fixed clock. + - ln-clk-12m : On board fixed clock. + - ln-clk-11m : On board fixed clock. + - ln-clk-24m : On board fixed clock. + - ln-clk-22m : On board fixed clock. + - ln-clk-8m : On board fixed clock. + - ln-usb-clk-24m : On board fixed clock. + - ln-usb-clk-12m : On board fixed clock. + items: + enum: + - ln-cdc-clkout + - ln-dsp-clkout + - ln-gf-mclk1 + - ln-gf-mclk2 + - ln-gf-mclk3 + - ln-gf-mclk4 + - ln-psia1-mclk + - ln-psia2-mclk + - ln-spdif-mclk + - ln-spdif-clkout + - ln-adat-mclk + - ln-pmic-32k + - ln-clk-12m + - ln-clk-11m + - ln-clk-24m + - ln-clk-22m + - ln-clk-8m + - ln-usb-clk-24m + - ln-usb-clk-12m + minItems: 1 + maxItems: 19 + clocks: true + assigned-clocks: true + assigned-clock-parents: true + + additionalProperties: false + + required: + - compatible + - '#clock-cells' + + lochnagar-pmic32k: + type: object + properties: + compatible: + enum: + - fixed-clock + '#clock-cells': + const: 0 + clock-frequency: + const: 32768 + required: + - compatible + - '#clock-cells' + - clock-frequency + + lochnagar-clk12m: + type: object + properties: + compatible: + enum: + - fixed-clock + '#clock-cells': + const: 0 + clock-frequency: + const: 12288000 + required: + - compatible + - '#clock-cells' + - clock-frequency + + lochnagar-clk11m: + type: object + properties: + compatible: + enum: + - fixed-clock + '#clock-cells': + const: 0 + clock-frequency: + const: 11298600 + required: + - compatible + - '#clock-cells' + - clock-frequency + + lochnagar-clk24m: + type: object + properties: + compatible: + enum: + - fixed-clock + '#clock-cells': + const: 0 + clock-frequency: + const: 24576000 + required: + - compatible + - '#clock-cells' + - clock-frequency + + lochnagar-clk22m: + type: object + properties: + compatible: + enum: + - fixed-clock + '#clock-cells': + const: 0 + clock-frequency: + const: 22579200 + required: + - compatible + - '#clock-cells' + - clock-frequency + + lochnagar-clk8m: + type: object + properties: + compatible: + enum: + - fixed-clock + '#clock-cells': + const: 0 + clock-frequency: + const: 8192000 + required: + - compatible + - '#clock-cells' + - clock-frequency + + lochnagar-usb24m: + type: object + properties: + compatible: + enum: + - fixed-clock + '#clock-cells': + const: 0 + clock-frequency: + const: 24576000 + required: + - compatible + - '#clock-cells' + - clock-frequency + + lochnagar-usb12m: + type: object + properties: + compatible: + enum: + - fixed-clock + '#clock-cells': + const: 0 + clock-frequency: + const: 12288000 + required: + - compatible + - '#clock-cells' + - clock-frequency -- 2.11.0 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 5/6] clk: lochnagar: Move binding over to dtschema 2020-04-27 10:28 ` [PATCH 5/6] clk: " Charles Keepax @ 2020-05-01 21:03 ` Rob Herring 0 siblings, 0 replies; 13+ messages in thread From: Rob Herring @ 2020-05-01 21:03 UTC (permalink / raw) To: Charles Keepax Cc: lee.jones, broonie, mturquette, sboyd, jdelvare, linux, linus.walleij, lgirdwood, linux-kernel, devicetree, patches On Mon, Apr 27, 2020 at 11:28:11AM +0100, Charles Keepax wrote: > Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> > --- > .../devicetree/bindings/clock/cirrus,lochnagar.txt | 94 --------- > .../bindings/clock/cirrus,lochnagar.yaml | 220 +++++++++++++++++++++ > 2 files changed, 220 insertions(+), 94 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/clock/cirrus,lochnagar.txt > create mode 100644 Documentation/devicetree/bindings/clock/cirrus,lochnagar.yaml > diff --git a/Documentation/devicetree/bindings/clock/cirrus,lochnagar.yaml b/Documentation/devicetree/bindings/clock/cirrus,lochnagar.yaml > new file mode 100644 > index 0000000000000..55d27e4475333 > --- /dev/null > +++ b/Documentation/devicetree/bindings/clock/cirrus,lochnagar.yaml > @@ -0,0 +1,220 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/clock/cirrus,lochnagar.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Cirrus Logic Lochnagar Audio Development Board > + > +maintainers: > + - patches@opensource.cirrus.com > + > +description: | > + 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. > + > + This binding document describes the binding for the clock portion of the > + driver. > + > + Also see these documents for generic binding information: > + [1] Clock : ../clock/clock-bindings.txt > + > + And these for relevant defines: > + [2] include/dt-bindings/clock/lochnagar.h > + > + This binding must be part of the Lochnagar MFD binding: > + [3] ../mfd/cirrus,lochnagar.yaml > + > +properties: > + lochnagar-clk: > + type: object > + > + properties: > + compatible: > + contains: Drop contains. > + enum: > + - cirrus,lochnagar1-clk > + - cirrus,lochnagar2-clk > + > + '#clock-cells': > + description: > + Must be 1. The first cell indicates the clock number, see [2] for > + available clocks and [1]. > + const: 1 > + clock-names: > + description: | > + May contain entries for each of the following clocks: > + - ln-cdc-clkout : Output clock from CODEC card. > + - ln-dsp-clkout : Output clock from DSP card. > + - ln-gf-mclk1,ln-gf-mclk2,ln-gf-mclk3,ln-gf-mclk4 : Optional > + input audio clocks from host system. > + - ln-psia1-mclk, ln-psia2-mclk : Optional input audio clocks from > + external connector. > + - ln-spdif-mclk : Optional input audio clock from SPDIF. > + - ln-spdif-clkout : Optional input audio clock from SPDIF. > + - ln-adat-mclk : Optional input audio clock from ADAT. > + - ln-pmic-32k : On board fixed clock. > + - ln-clk-12m : On board fixed clock. > + - ln-clk-11m : On board fixed clock. > + - ln-clk-24m : On board fixed clock. > + - ln-clk-22m : On board fixed clock. > + - ln-clk-8m : On board fixed clock. > + - ln-usb-clk-24m : On board fixed clock. > + - ln-usb-clk-12m : On board fixed clock. Don't define the list twice. Make the description a comment above or after each item below. > + items: > + enum: > + - ln-cdc-clkout > + - ln-dsp-clkout > + - ln-gf-mclk1 > + - ln-gf-mclk2 > + - ln-gf-mclk3 > + - ln-gf-mclk4 > + - ln-psia1-mclk > + - ln-psia2-mclk > + - ln-spdif-mclk > + - ln-spdif-clkout > + - ln-adat-mclk > + - ln-pmic-32k > + - ln-clk-12m > + - ln-clk-11m > + - ln-clk-24m > + - ln-clk-22m > + - ln-clk-8m > + - ln-usb-clk-24m > + - ln-usb-clk-12m > + minItems: 1 > + maxItems: 19 > + clocks: true > + assigned-clocks: true > + assigned-clock-parents: true > + > + additionalProperties: false > + > + required: > + - compatible > + - '#clock-cells' > + > + lochnagar-pmic32k: > + type: object > + properties: > + compatible: > + enum: > + - fixed-clock > + '#clock-cells': > + const: 0 > + clock-frequency: > + const: 32768 > + required: > + - compatible > + - '#clock-cells' > + - clock-frequency The fixed-clock.yaml schema will be applied to this. So all you need here are addtional constraints: clock-frequency: const: 32768 > + > + lochnagar-clk12m: > + type: object > + properties: > + compatible: > + enum: > + - fixed-clock > + '#clock-cells': > + const: 0 > + clock-frequency: > + const: 12288000 > + required: > + - compatible > + - '#clock-cells' > + - clock-frequency > + > + lochnagar-clk11m: > + type: object > + properties: > + compatible: > + enum: > + - fixed-clock > + '#clock-cells': > + const: 0 > + clock-frequency: > + const: 11298600 > + required: > + - compatible > + - '#clock-cells' > + - clock-frequency > + > + lochnagar-clk24m: > + type: object > + properties: > + compatible: > + enum: > + - fixed-clock > + '#clock-cells': > + const: 0 > + clock-frequency: > + const: 24576000 > + required: > + - compatible > + - '#clock-cells' > + - clock-frequency > + > + lochnagar-clk22m: > + type: object > + properties: > + compatible: > + enum: > + - fixed-clock > + '#clock-cells': > + const: 0 > + clock-frequency: > + const: 22579200 > + required: > + - compatible > + - '#clock-cells' > + - clock-frequency > + > + lochnagar-clk8m: > + type: object > + properties: > + compatible: > + enum: > + - fixed-clock > + '#clock-cells': > + const: 0 > + clock-frequency: > + const: 8192000 > + required: > + - compatible > + - '#clock-cells' > + - clock-frequency > + > + lochnagar-usb24m: > + type: object > + properties: > + compatible: > + enum: > + - fixed-clock > + '#clock-cells': > + const: 0 > + clock-frequency: > + const: 24576000 > + required: > + - compatible > + - '#clock-cells' > + - clock-frequency > + > + lochnagar-usb12m: > + type: object > + properties: > + compatible: > + enum: > + - fixed-clock > + '#clock-cells': > + const: 0 > + clock-frequency: > + const: 12288000 > + required: > + - compatible > + - '#clock-cells' > + - clock-frequency > -- > 2.11.0 > ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 6/6] mfd: lochnagar: Move binding over to dtschema 2020-04-27 10:28 [PATCH 1/6] hwmon: lochnagar: Move binding over to dtschema Charles Keepax ` (3 preceding siblings ...) 2020-04-27 10:28 ` [PATCH 5/6] clk: " Charles Keepax @ 2020-04-27 10:28 ` Charles Keepax 2020-04-27 10:36 ` Charles Keepax 2020-05-01 20:55 ` Rob Herring 4 siblings, 2 replies; 13+ messages in thread From: Charles Keepax @ 2020-04-27 10:28 UTC (permalink / raw) To: robh+dt, lee.jones, broonie, mturquette, sboyd, jdelvare, linux, linus.walleij Cc: lgirdwood, linux-kernel, devicetree, patches Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> --- .../devicetree/bindings/mfd/cirrus,lochnagar.txt | 85 ---------- .../devicetree/bindings/mfd/cirrus,lochnagar.yaml | 183 +++++++++++++++++++++ MAINTAINERS | 12 +- 3 files changed, 189 insertions(+), 91 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mfd/cirrus,lochnagar.txt create mode 100644 Documentation/devicetree/bindings/mfd/cirrus,lochnagar.yaml diff --git a/Documentation/devicetree/bindings/mfd/cirrus,lochnagar.txt b/Documentation/devicetree/bindings/mfd/cirrus,lochnagar.txt deleted file mode 100644 index 3bf92ad37fa1b..0000000000000 --- a/Documentation/devicetree/bindings/mfd/cirrus,lochnagar.txt +++ /dev/null @@ -1,85 +0,0 @@ -Cirrus Logic Lochnagar Audio Development Board - -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.txt - [5] Pinctrl: ../pinctrl/cirrus,lochnagar.txt - [6] Regulator: ../regulator/cirrus,lochnagar.txt - [7] Sound: ../sound/cirrus,lochnagar.txt - [8] Hardware Monitor: ../hwmon/cirrus,lochnagar.txt - -Required properties: - - - compatible : One of the following strings: - "cirrus,lochnagar1" - "cirrus,lochnagar2" - - - reg : I2C slave address - - - reset-gpios : Reset line to the Lochnagar, see [1]. - -Required sub-nodes: - - - lochnagar-clk : Binding for the clocking components, see [4]. - - - lochnagar-pinctrl : Binding for the pin control components, see [5]. - -Optional sub-nodes: - - - Bindings for the regulator components, see [6]. Only available on - Lochnagar 2. - - - lochnagar-sc : Binding for the sound card components, see [7]. - Only available on Lochnagar 2. - - lochnagar-hwmon : Binding for the hardware monitor components, see [8]. - Only available on Lochnagar 2. - -Optional properties: - - - present-gpios : Host present line, indicating the presence of a - host system, see [1]. This can be omitted if the present line is - tied in hardware. - -Example: - -lochnagar: lochnagar@22 { - compatible = "cirrus,lochnagar2"; - reg = <0x22>; - - reset-gpios = <&gpio0 55 0>; - present-gpios = <&gpio0 60 0>; - - lochnagar-clk { - compatible = "cirrus,lochnagar2-clk"; - ... - }; - - lochnagar-pinctrl { - compatible = "cirrus,lochnagar-pinctrl"; - ... - }; - - lochnagar-sc { - compatible = "cirrus,lochnagar2-soundcard"; - ... - }; - - lochnagar-hwmon { - compatible = "cirrus,lochnagar2-hwmon"; - ... - }; -}; diff --git a/Documentation/devicetree/bindings/mfd/cirrus,lochnagar.yaml b/Documentation/devicetree/bindings/mfd/cirrus,lochnagar.yaml new file mode 100644 index 0000000000000..b2967f141b2af --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/cirrus,lochnagar.yaml @@ -0,0 +1,183 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/cirrus,lochnagar.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cirrus Logic Lochnagar Audio Development Board + +maintainers: + - patches@opensource.cirrus.com + +description: | + 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] Regulator: ../regulator/cirrus,lochnagar.yaml + [7] Sound: ../sound/cirrus,lochnagar.yaml + [8] Hardware Monitor: ../hwmon/cirrus,lochnagar.yaml + +allOf: + - $ref: /schemas/clock/cirrus,lochnagar.yaml# + - $ref: /schemas/pinctrl/cirrus,lochnagar.yaml# + - $ref: /schemas/regulator/cirrus,lochnagar.yaml# + - if: + properties: + compatible: + contains: + enum: + - cirrus,lochnagar2 + then: + allOf: + - $ref: /schemas/sound/cirrus,lochnagar.yaml# + - $ref: /schemas/hwmon/cirrus,lochnagar.yaml# + +properties: + compatible: + contains: + enum: + - cirrus,lochnagar1 + - cirrus,lochnagar2 + + reg: + description: + I2C slave address. + const: 0x22 + + reset-gpios: + description: | + Reset line to the Lochnagar, see [1]. + maxItems: 1 + + present-gpios: + description: | + Host present line, indicating the presence of a + host system, see [1]. This can be omitted if the present line is + tied in hardware. + maxItems: 1 + +required: + - compatible + - reg + - reset-gpios + - lochnagar-clk + - lochnagar-pinctrl + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/clk/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>; + }; + + lochnagar-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 { + input-enable; + groups = "gf-aif1"; + function = "codec-aif3"; + }; + codec2aif { + 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"; + + MICBIAS1-supply = <&eric>; + + 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>; + }; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index e64e5db314976..a2b94e8cf585c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4062,12 +4062,12 @@ M: Charles Keepax <ckeepax@opensource.cirrus.com> M: Richard Fitzgerald <rf@opensource.cirrus.com> L: patches@opensource.cirrus.com S: Supported -F: Documentation/devicetree/bindings/clock/cirrus,lochnagar.txt -F: Documentation/devicetree/bindings/hwmon/cirrus,lochnagar.txt -F: Documentation/devicetree/bindings/mfd/cirrus,lochnagar.txt -F: Documentation/devicetree/bindings/pinctrl/cirrus,lochnagar.txt -F: Documentation/devicetree/bindings/regulator/cirrus,lochnagar.txt -F: Documentation/devicetree/bindings/sound/cirrus,lochnagar.txt +F: Documentation/devicetree/bindings/clock/cirrus,lochnagar.yaml +F: Documentation/devicetree/bindings/hwmon/cirrus,lochnagar.yaml +F: Documentation/devicetree/bindings/mfd/cirrus,lochnagar.yaml +F: Documentation/devicetree/bindings/pinctrl/cirrus,lochnagar.yaml +F: Documentation/devicetree/bindings/regulator/cirrus,lochnagar.yaml +F: Documentation/devicetree/bindings/sound/cirrus,lochnagar.yaml F: Documentation/hwmon/lochnagar.rst F: drivers/clk/clk-lochnagar.c F: drivers/hwmon/lochnagar-hwmon.c -- 2.11.0 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 6/6] mfd: lochnagar: Move binding over to dtschema 2020-04-27 10:28 ` [PATCH 6/6] mfd: " Charles Keepax @ 2020-04-27 10:36 ` Charles Keepax 2020-05-01 20:47 ` Rob Herring 2020-05-01 20:55 ` Rob Herring 1 sibling, 1 reply; 13+ messages in thread From: Charles Keepax @ 2020-04-27 10:36 UTC (permalink / raw) To: robh+dt, lee.jones, broonie, mturquette, sboyd, jdelvare, linux, linus.walleij Cc: lgirdwood, linux-kernel, devicetree, patches On Mon, Apr 27, 2020 at 11:28:12AM +0100, Charles Keepax wrote: > Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> > --- > + lochnagar-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>; This seems to cause the following error: Documentation/devicetree/bindings/mfd/cirrus,lochnagar.example.dt.yaml: lochnagar@22: lochnagar-pinctrl:pin-settings:phandle: [[4]] is not of type 'object' I think the schema is correct and the problem is one of tooling, I have been poking at it for a while but can't seem to find a way to silence this one. Any advice would be greatly appreciated. Thanks, Charles > + > + pinsettings: pin-settings { > + ap2aif { > + input-enable; > + groups = "gf-aif1"; > + function = "codec-aif3"; > + }; > + codec2aif { > + output-enable; > + groups = "codec-aif3"; > + function = "gf-aif1"; > + }; > + }; > + }; ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 6/6] mfd: lochnagar: Move binding over to dtschema 2020-04-27 10:36 ` Charles Keepax @ 2020-05-01 20:47 ` Rob Herring 2020-05-04 9:55 ` Charles Keepax 0 siblings, 1 reply; 13+ messages in thread From: Rob Herring @ 2020-05-01 20:47 UTC (permalink / raw) To: Charles Keepax Cc: lee.jones, broonie, mturquette, sboyd, jdelvare, linux, linus.walleij, lgirdwood, linux-kernel, devicetree, patches On Mon, Apr 27, 2020 at 10:36:14AM +0000, Charles Keepax wrote: > On Mon, Apr 27, 2020 at 11:28:12AM +0100, Charles Keepax wrote: > > Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> > > --- > > + lochnagar-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>; > > This seems to cause the following error: > > Documentation/devicetree/bindings/mfd/cirrus,lochnagar.example.dt.yaml: > lochnagar@22: lochnagar-pinctrl:pin-settings:phandle: [[4]] is not of type 'object' > > I think the schema is correct and the problem is one of tooling, > I have been poking at it for a while but can't seem to find a way > to silence this one. Any advice would be greatly appreciated. The problem is the "^.*$" patterns to match child node names also match properties like 'phandle'. Ideally, you'd have some pattern to match on for the node names. There is work-around doing: "^.*$": if: type: object then: properties: ... But I much prefer to see node names updated. '-pins$' is a common pattern. Rob ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 6/6] mfd: lochnagar: Move binding over to dtschema 2020-05-01 20:47 ` Rob Herring @ 2020-05-04 9:55 ` Charles Keepax 0 siblings, 0 replies; 13+ messages in thread From: Charles Keepax @ 2020-05-04 9:55 UTC (permalink / raw) To: Rob Herring Cc: lee.jones, broonie, mturquette, sboyd, jdelvare, linux, linus.walleij, lgirdwood, linux-kernel, devicetree, patches On Fri, May 01, 2020 at 03:47:21PM -0500, Rob Herring wrote: > On Mon, Apr 27, 2020 at 10:36:14AM +0000, Charles Keepax wrote: > > On Mon, Apr 27, 2020 at 11:28:12AM +0100, Charles Keepax wrote: > > > Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> > > > --- > > > + lochnagar-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>; > > > > This seems to cause the following error: > > > > Documentation/devicetree/bindings/mfd/cirrus,lochnagar.example.dt.yaml: > > lochnagar@22: lochnagar-pinctrl:pin-settings:phandle: [[4]] is not of type 'object' > > > > I think the schema is correct and the problem is one of tooling, > > I have been poking at it for a while but can't seem to find a way > > to silence this one. Any advice would be greatly appreciated. > > The problem is the "^.*$" patterns to match child node names also match > properties like 'phandle'. Ideally, you'd have some pattern to match on > for the node names. > > There is work-around doing: > > "^.*$": > if: > type: object > then: > properties: > ... > I believe I did try this and run into some other problems. > But I much prefer to see node names updated. '-pins$' is a common > pattern. > I have no problem requiring a pins suffix on the sub-nodes. Will add that and send a new version, fixing up your other comments as well. Thank you for your suggestions and review. Thanks, Charles ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 6/6] mfd: lochnagar: Move binding over to dtschema 2020-04-27 10:28 ` [PATCH 6/6] mfd: " Charles Keepax 2020-04-27 10:36 ` Charles Keepax @ 2020-05-01 20:55 ` Rob Herring 1 sibling, 0 replies; 13+ messages in thread From: Rob Herring @ 2020-05-01 20:55 UTC (permalink / raw) To: Charles Keepax Cc: lee.jones, broonie, mturquette, sboyd, jdelvare, linux, linus.walleij, lgirdwood, linux-kernel, devicetree, patches On Mon, Apr 27, 2020 at 11:28:12AM +0100, Charles Keepax wrote: > Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> > --- > .../devicetree/bindings/mfd/cirrus,lochnagar.txt | 85 ---------- > .../devicetree/bindings/mfd/cirrus,lochnagar.yaml | 183 +++++++++++++++++++++ > MAINTAINERS | 12 +- > 3 files changed, 189 insertions(+), 91 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/mfd/cirrus,lochnagar.txt > create mode 100644 Documentation/devicetree/bindings/mfd/cirrus,lochnagar.yaml > diff --git a/Documentation/devicetree/bindings/mfd/cirrus,lochnagar.yaml b/Documentation/devicetree/bindings/mfd/cirrus,lochnagar.yaml > new file mode 100644 > index 0000000000000..b2967f141b2af > --- /dev/null > +++ b/Documentation/devicetree/bindings/mfd/cirrus,lochnagar.yaml > @@ -0,0 +1,183 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mfd/cirrus,lochnagar.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Cirrus Logic Lochnagar Audio Development Board > + > +maintainers: > + - patches@opensource.cirrus.com > + > +description: | > + 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] Regulator: ../regulator/cirrus,lochnagar.yaml > + [7] Sound: ../sound/cirrus,lochnagar.yaml > + [8] Hardware Monitor: ../hwmon/cirrus,lochnagar.yaml > + > +allOf: > + - $ref: /schemas/clock/cirrus,lochnagar.yaml# > + - $ref: /schemas/pinctrl/cirrus,lochnagar.yaml# > + - $ref: /schemas/regulator/cirrus,lochnagar.yaml# The preferred form is to define the child nodes in this schema and then reference the child schema: lochnagar-clk: type: object $ref: /schemas/clock/cirrus,lochnagar.yaml# > + - if: > + properties: > + compatible: > + contains: > + enum: > + - cirrus,lochnagar2 > + then: > + allOf: > + - $ref: /schemas/sound/cirrus,lochnagar.yaml# > + - $ref: /schemas/hwmon/cirrus,lochnagar.yaml# That makes this part a bit more challenging: then: required: - lochnagar-sc else: not: required: - lochnagar-sc > + > +properties: > + compatible: > + contains: So this is valid? "foo", "cirrus,lochnagar1" I think you just want to drop 'contains'. > + enum: > + - cirrus,lochnagar1 > + - cirrus,lochnagar2 > + > + reg: > + description: > + I2C slave address. No need for generic descriptions of common properties. > + const: 0x22 > + > + reset-gpios: > + description: | > + Reset line to the Lochnagar, see [1]. > + maxItems: 1 > + > + present-gpios: > + description: | > + Host present line, indicating the presence of a > + host system, see [1]. This can be omitted if the present line is > + tied in hardware. > + maxItems: 1 > + > +required: > + - compatible > + - reg > + - reset-gpios > + - lochnagar-clk > + - lochnagar-pinctrl > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include <dt-bindings/clk/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>; > + }; > + > + lochnagar-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 { > + input-enable; > + groups = "gf-aif1"; > + function = "codec-aif3"; > + }; > + codec2aif { > + 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"; > + > + MICBIAS1-supply = <&eric>; > + > + 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>; > + }; > + }; > + }; > diff --git a/MAINTAINERS b/MAINTAINERS > index e64e5db314976..a2b94e8cf585c 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -4062,12 +4062,12 @@ M: Charles Keepax <ckeepax@opensource.cirrus.com> > M: Richard Fitzgerald <rf@opensource.cirrus.com> > L: patches@opensource.cirrus.com > S: Supported > -F: Documentation/devicetree/bindings/clock/cirrus,lochnagar.txt > -F: Documentation/devicetree/bindings/hwmon/cirrus,lochnagar.txt > -F: Documentation/devicetree/bindings/mfd/cirrus,lochnagar.txt > -F: Documentation/devicetree/bindings/pinctrl/cirrus,lochnagar.txt > -F: Documentation/devicetree/bindings/regulator/cirrus,lochnagar.txt > -F: Documentation/devicetree/bindings/sound/cirrus,lochnagar.txt > +F: Documentation/devicetree/bindings/clock/cirrus,lochnagar.yaml > +F: Documentation/devicetree/bindings/hwmon/cirrus,lochnagar.yaml > +F: Documentation/devicetree/bindings/mfd/cirrus,lochnagar.yaml > +F: Documentation/devicetree/bindings/pinctrl/cirrus,lochnagar.yaml > +F: Documentation/devicetree/bindings/regulator/cirrus,lochnagar.yaml > +F: Documentation/devicetree/bindings/sound/cirrus,lochnagar.yaml > F: Documentation/hwmon/lochnagar.rst > F: drivers/clk/clk-lochnagar.c > F: drivers/hwmon/lochnagar-hwmon.c > -- > 2.11.0 > ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2020-05-12 11:40 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-04-27 10:28 [PATCH 1/6] hwmon: lochnagar: Move binding over to dtschema Charles Keepax 2020-04-27 10:28 ` [PATCH 2/6] ASoC: " Charles Keepax 2020-05-01 21:06 ` Rob Herring 2020-04-27 10:28 ` [PATCH 3/6] pinctrl: " Charles Keepax 2020-05-12 11:40 ` Linus Walleij 2020-04-27 10:28 ` [PATCH 4/6] regulator: " Charles Keepax 2020-04-27 10:28 ` [PATCH 5/6] clk: " Charles Keepax 2020-05-01 21:03 ` Rob Herring 2020-04-27 10:28 ` [PATCH 6/6] mfd: " Charles Keepax 2020-04-27 10:36 ` Charles Keepax 2020-05-01 20:47 ` Rob Herring 2020-05-04 9:55 ` Charles Keepax 2020-05-01 20:55 ` Rob Herring
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).