Message ID | 20180727121806.18209-2-srinivas.kandagatla@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ASoC: Add support to WCD9335 Audio Codec | expand |
On Fri, Jul 27, 2018 at 01:17:57PM +0100, Srinivas Kandagatla wrote: > This patch adds bindings for wcd9335 audio codec which can support both SLIMbus > and I2S/I2C interface. > > Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> > --- > .../devicetree/bindings/sound/qcom,wcd9335.txt | 123 +++++++++++++++++++++ > 1 file changed, 123 insertions(+) > create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd9335.txt > > diff --git a/Documentation/devicetree/bindings/sound/qcom,wcd9335.txt b/Documentation/devicetree/bindings/sound/qcom,wcd9335.txt > new file mode 100644 > index 000000000000..1d8d49e30af7 > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/qcom,wcd9335.txt > @@ -0,0 +1,123 @@ > +QCOM WCD9335 Codec > + > +Qualcomm WCD9335 Codec is a standalone Hi-Fi audio codec IC, supports > +Qualcomm Technologies, Inc. (QTI) multimedia solutions, including > +the MSM8996, MSM8976, and MSM8956 chipsets. It has in-built > +Soundwire controller, interrupt mux. It supports both I2S/I2C and > +SLIMbus audio interfaces. > + > +Required properties with SLIMbus Interface: > + > +- compatible: > + Usage: required > + Value type: <stringlist> > + Definition: For SLIMbus interface it should be "slimMID,PID", > + textual representation of Manufacturer ID, Product Code, > + shall be in lower case hexadecimal with leading zeroes > + suppressed. Refer to slimbus/bus.txt for details. > + Should be: > + "slim217,1a0" for MSM8996 and APQ8096 SoCs with SLIMbus. > + > +- reg > + Usage: required > + Value type: <u32 u32> > + Definition: Should be ('Device index', 'Instance ID') > + > +- interrupts > + Usage: required > + Value type: <prop-encoded-array> > + Definition: Interrupts via WCD INTR1 and INTR2 pins > + > +- interrupt-names: > + Usage: required > + Value type: <String array> > + Definition: Interrupt names of WCD INTR1 and INTR2 > + Should be: "intr1", "intr2" > + > +- reset-gpio: reset-gpios > + Usage: required > + Value type: <String Array> > + Definition: Reset gpio line > + > +- qcom,ifd: > + Usage: required > + Value type: <phandle> > + Definition: SLIM interface device Wouldn't this be the parent? > + > +- clocks: > + Usage: required > + Value type: <prop-encoded-array> > + Definition: See clock-bindings.txt section "consumers". List of > + three clock specifiers for mclk, mclk2 and slimbus clock. > + > +- clock-names: > + Usage: required > + Value type: <string> > + Definition: Must contain "mclk", "mclk2" and "slimbus" strings. > + > +- vdd-buck-supply: > + Usage: required > + Value type: <phandle> > + Definition: Should contain a reference to the 1.8V buck supply > + > +- vdd-buck-sido-supply: > + Usage: required > + Value type: <phandle> > + Definition: Should contain a reference to the 1.8V SIDO buck supply > + > +- vdd-rx-supply: > + Usage: required > + Value type: <phandle> > + Definition: Should contain a reference to the 1.8V rx supply > + > +- vdd-tx-supply: > + Usage: required > + Value type: <phandle> > + Definition: Should contain a reference to the 1.8V tx supply > + > +- vdd-vbat-supply: > + Usage: Optional > + Value type: <phandle> > + Definition: Should contain a reference to the vbat supply > + > +- vdd-micbias-supply: > + Usage: required > + Value type: <phandle> > + Definition: Should contain a reference to the micbias supply > + > +- vdd-io-supply: > + Usage: required > + Value type: <phandle> > + Definition: Should contain a reference to the 1.8V io supply > + > +- interrupt-controller: > + Usage: required > + Definition: Indicating that this is a interrupt controller > + > +- #interrupt-cells: > + Usage: required > + Value type: <int> > + Definition: should be 1 > + > +#sound-dai-cells > + Usage: required > + Value type: <u32> > + Definition: Must be 1 > + > +codec@1{ audio-codec@1 > + compatible = "slim217,1a0"; > + reg = <1 0>; > + interrupts = <&msmgpio 54 IRQ_TYPE_LEVEL_HIGH>; > + interrupt-names = "intr2" > + reset-gpio = <&msmgpio 64 0>; > + qcom,ifd = <&wc9335_ifd>; > + clock-names = "mclk", "native"; > + clocks = <&rpmcc RPM_SMD_DIV_CLK1>, > + <&rpmcc RPM_SMD_BB_CLK1>; > + vdd-buck-supply = <&pm8994_s4>; > + vdd-rx-supply = <&pm8994_s4>; > + vdd-buck-sido-supply = <&pm8994_s4>; > + vdd-tx-supply = <&pm8994_s4>; > + vdd-io-supply = <&pm8994_s4>; > + #sound-dai-cells = <1>; > +} > -- > 2.16.2 >
Thanks for the review. On 31/07/18 21:43, Rob Herring wrote: >> + >> +- reset-gpio: > reset-gpios > Yep, reset-gpios makes more inline with others! >> + Usage: required >> + Value type: <String Array> >> + Definition: Reset gpio line >> + >> +- qcom,ifd: >> + Usage: required >> + Value type: <phandle> >> + Definition: SLIM interface device > Wouldn't this be the parent? > No, Interface device is just like other slim device and is part of SLIMbus Component and has a unique address. Every SLIMbus component has one interface device. ... >> + >> +codec@1{ > audio-codec@1 > Yep, I will fix this in next version. >> + compatible = "slim217,1a0"; >> + reg = <1 0>; Thanks, srini
On Wed, Aug 1, 2018 at 2:57 AM Srinivas Kandagatla <srinivas.kandagatla@linaro.org> wrote: > > Thanks for the review. > > On 31/07/18 21:43, Rob Herring wrote: > >> + > >> +- reset-gpio: > > reset-gpios > > > Yep, reset-gpios makes more inline with others! > >> + Usage: required > >> + Value type: <String Array> > >> + Definition: Reset gpio line > >> + > >> +- qcom,ifd: > >> + Usage: required > >> + Value type: <phandle> > >> + Definition: SLIM interface device > > Wouldn't this be the parent? > > > No, Interface device is just like other slim device and is part of > SLIMbus Component and has a unique address. Every SLIMbus component has > one interface device. I still don't understand what this means. If this is SLIMbus specific, then maybe it should be named that way? Or it is QCom specific? Rob
Thanks for review, On 01/08/18 23:20, Rob Herring wrote: >>>> +- qcom,ifd: >>>> + Usage: required >>>> + Value type: <phandle> >>>> + Definition: SLIM interface device >>> Wouldn't this be the parent? >>> >> No, Interface device is just like other slim device and is part of >> SLIMbus Component and has a unique address. Every SLIMbus component has >> one interface device. > I still don't understand what this means. If this is SLIMbus specific, > then maybe it should be named that way? Or it is QCom specific? It is SLIMbus specific, I will rename this to "slim,ifd" in next version which makes it clear! thanks, srini
On Thu, Aug 2, 2018 at 1:33 AM Srinivas Kandagatla <srinivas.kandagatla@linaro.org> wrote: > > Thanks for review, > > On 01/08/18 23:20, Rob Herring wrote: > >>>> +- qcom,ifd: > >>>> + Usage: required > >>>> + Value type: <phandle> > >>>> + Definition: SLIM interface device > >>> Wouldn't this be the parent? > >>> > >> No, Interface device is just like other slim device and is part of > >> SLIMbus Component and has a unique address. Every SLIMbus component has > >> one interface device. > > I still don't understand what this means. If this is SLIMbus specific, > > then maybe it should be named that way? Or it is QCom specific? > > It is SLIMbus specific, I will rename this to "slim,ifd" in next version > which makes it clear! 'slim' is not a vendor. So 'slim-ifc-dev' perhaps. Unless IFD is a well known acronym for someone familiar with SLIMbus. Rob
diff --git a/Documentation/devicetree/bindings/sound/qcom,wcd9335.txt b/Documentation/devicetree/bindings/sound/qcom,wcd9335.txt new file mode 100644 index 000000000000..1d8d49e30af7 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/qcom,wcd9335.txt @@ -0,0 +1,123 @@ +QCOM WCD9335 Codec + +Qualcomm WCD9335 Codec is a standalone Hi-Fi audio codec IC, supports +Qualcomm Technologies, Inc. (QTI) multimedia solutions, including +the MSM8996, MSM8976, and MSM8956 chipsets. It has in-built +Soundwire controller, interrupt mux. It supports both I2S/I2C and +SLIMbus audio interfaces. + +Required properties with SLIMbus Interface: + +- compatible: + Usage: required + Value type: <stringlist> + Definition: For SLIMbus interface it should be "slimMID,PID", + textual representation of Manufacturer ID, Product Code, + shall be in lower case hexadecimal with leading zeroes + suppressed. Refer to slimbus/bus.txt for details. + Should be: + "slim217,1a0" for MSM8996 and APQ8096 SoCs with SLIMbus. + +- reg + Usage: required + Value type: <u32 u32> + Definition: Should be ('Device index', 'Instance ID') + +- interrupts + Usage: required + Value type: <prop-encoded-array> + Definition: Interrupts via WCD INTR1 and INTR2 pins + +- interrupt-names: + Usage: required + Value type: <String array> + Definition: Interrupt names of WCD INTR1 and INTR2 + Should be: "intr1", "intr2" + +- reset-gpio: + Usage: required + Value type: <String Array> + Definition: Reset gpio line + +- qcom,ifd: + Usage: required + Value type: <phandle> + Definition: SLIM interface device + +- clocks: + Usage: required + Value type: <prop-encoded-array> + Definition: See clock-bindings.txt section "consumers". List of + three clock specifiers for mclk, mclk2 and slimbus clock. + +- clock-names: + Usage: required + Value type: <string> + Definition: Must contain "mclk", "mclk2" and "slimbus" strings. + +- vdd-buck-supply: + Usage: required + Value type: <phandle> + Definition: Should contain a reference to the 1.8V buck supply + +- vdd-buck-sido-supply: + Usage: required + Value type: <phandle> + Definition: Should contain a reference to the 1.8V SIDO buck supply + +- vdd-rx-supply: + Usage: required + Value type: <phandle> + Definition: Should contain a reference to the 1.8V rx supply + +- vdd-tx-supply: + Usage: required + Value type: <phandle> + Definition: Should contain a reference to the 1.8V tx supply + +- vdd-vbat-supply: + Usage: Optional + Value type: <phandle> + Definition: Should contain a reference to the vbat supply + +- vdd-micbias-supply: + Usage: required + Value type: <phandle> + Definition: Should contain a reference to the micbias supply + +- vdd-io-supply: + Usage: required + Value type: <phandle> + Definition: Should contain a reference to the 1.8V io supply + +- interrupt-controller: + Usage: required + Definition: Indicating that this is a interrupt controller + +- #interrupt-cells: + Usage: required + Value type: <int> + Definition: should be 1 + +#sound-dai-cells + Usage: required + Value type: <u32> + Definition: Must be 1 + +codec@1{ + compatible = "slim217,1a0"; + reg = <1 0>; + interrupts = <&msmgpio 54 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "intr2" + reset-gpio = <&msmgpio 64 0>; + qcom,ifd = <&wc9335_ifd>; + clock-names = "mclk", "native"; + clocks = <&rpmcc RPM_SMD_DIV_CLK1>, + <&rpmcc RPM_SMD_BB_CLK1>; + vdd-buck-supply = <&pm8994_s4>; + vdd-rx-supply = <&pm8994_s4>; + vdd-buck-sido-supply = <&pm8994_s4>; + vdd-tx-supply = <&pm8994_s4>; + vdd-io-supply = <&pm8994_s4>; + #sound-dai-cells = <1>; +}
This patch adds bindings for wcd9335 audio codec which can support both SLIMbus and I2S/I2C interface. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> --- .../devicetree/bindings/sound/qcom,wcd9335.txt | 123 +++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd9335.txt