Message ID | 1399320549-16645-2-git-send-email-brian.austin@cirrus.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 3bb40619aca84905f87dd6bc7f6dce9efb525f28 |
Headers | show |
On May 5, 2014, at 3:09 PM, Brian Austin <brian.austin@cirrus.com> wrote: > This patch adds binding documentation for the Cirrus Logic CS42L56 Low Power Stereo I2C CODEC > > Signed-off-by: Brian Austin <brian.austin@cirrus.com> > --- > .../devicetree/bindings/sound/cs42l56.txt | 63 ++++++++++++++++++++ > 1 file changed, 63 insertions(+) > create mode 100644 Documentation/devicetree/bindings/sound/cs42l56.txt > > diff --git a/Documentation/devicetree/bindings/sound/cs42l56.txt b/Documentation/devicetree/bindings/sound/cs42l56.txt > new file mode 100644 > index 0000000..9ae074f > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/cs42l56.txt > @@ -0,0 +1,63 @@ > +CS42L52 audio CODEC > + > +Required properties: > + > + - compatible : "cirrus,cs42l56" > + > + - reg : the I2C address of the device for I2C > + > + - VA-supply, VCP-supply, VLDO-supply : power supplies for the device, > + as covered in Documentation/devicetree/bindings/regulator/regulator.txt. > + > +Optional properties: > + > + - cirrus,gpio-nreset : GPIO controller's phandle and the number > + of the GPIO used to reset the codec. > + > + - cirrus,chgfreq-divisor : Values used to set the Charge Pump Frequency. > + Allowable values of 0x00 through 0x0F. These are raw values written to the > + register, not the actual frequency. The frequency is determined by the following. > + Frequency = MCLK / 4 * (N+2) > + N = chgfreq_val > + MCLK = Where MCLK is the frequency of the mclk signal after the MCLKDIV2 circuit. > + > + - cirrus,ain1a-ref-cfg, ain1b-ref-cfg : boolean, If present, AIN1A or AIN1B are configured > + as a pseudo-differential input referenced to AIN1REF/AIN3A. What happens if a DT had both bools? > + > + - cirrus,ain2a-ref-cfg, ain2b-ref-cfg : boolean, If present, AIN2A or AIN2B are configured > + as a pseudo-differential input referenced to AIN2REF/AIN3B. > + > + - cirrus,micbias-lvl: Set the output voltage level on the MICBIAS Pin. > + 0 = 0.5 x VA > + 1 = 0.6 x VA > + 2 = 0.7 x VA > + 3 = 0.8 x VA > + 4 = 0.83 x VA > + 5 = 0.91 x VA > + > + - cirrus,adaptive-pwr-cfg : Configures how the power to the Headphone and Lineout > + Amplifiers adapt to the output signal levels. > + 0 = Adapt to Volume Mode. Voltage level determined by the sum of the relevant volume settings. > + 1 = Fixed - Headphone and Line Amp supply = + or - VCP/2. > + 2 = Fixed - Headphone and Line Amp supply = + or - VCP. > + 3 = Adapted to Signal; Voltage level is dynamically determined by the output signal. > + > + - cirrus,hpf-left-freq, hpf-right-freq : Sets the corner frequency (-3dB point) for the internal High-Pass > + Filter. > + 0 = 1.8Hz > + 1 = 119Hz > + 2 = 236Hz > + 3 = 464Hz > + Add a include/dt-bindings for all the various enums > + > +Example: > + > +codec: codec@4b { > + compatible = "cirrus,cs42l56"; > + reg = <0x4b>; > + gpio-reset = <&gpio 10 0>; > + cirrus,chgfreq-divisor = <0x05>; > + cirrus.ain1_ref_cfg; > + cirrus,micbias-lvl = <5>; > + VA-supply = <®_audio>; > +}; > -- > 1.7.9.5 >
On May 5, 2014, at 4:18 PM, Kumar Gala <galak@codeaurora.org> wrote: > > On May 5, 2014, at 3:09 PM, Brian Austin <brian.austin@cirrus.com> wrote: > >> This patch adds binding documentation for the Cirrus Logic CS42L56 Low Power Stereo I2C CODEC >> >> Signed-off-by: Brian Austin <brian.austin@cirrus.com> >> --- >> .../devicetree/bindings/sound/cs42l56.txt | 63 ++++++++++++++++++++ >> 1 file changed, 63 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/sound/cs42l56.txt >> >> diff --git a/Documentation/devicetree/bindings/sound/cs42l56.txt b/Documentation/devicetree/bindings/sound/cs42l56.txt >> new file mode 100644 >> index 0000000..9ae074f >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/sound/cs42l56.txt >> @@ -0,0 +1,63 @@ >> +CS42L52 audio CODEC >> + >> +Required properties: >> + >> + - compatible : "cirrus,cs42l56" >> + >> + - reg : the I2C address of the device for I2C >> + >> + - VA-supply, VCP-supply, VLDO-supply : power supplies for the device, >> + as covered in Documentation/devicetree/bindings/regulator/regulator.txt. >> + >> +Optional properties: >> + >> + - cirrus,gpio-nreset : GPIO controller's phandle and the number >> + of the GPIO used to reset the codec. >> + >> + - cirrus,chgfreq-divisor : Values used to set the Charge Pump Frequency. >> + Allowable values of 0x00 through 0x0F. These are raw values written to the >> + register, not the actual frequency. The frequency is determined by the following. >> + Frequency = MCLK / 4 * (N+2) >> + N = chgfreq_val >> + MCLK = Where MCLK is the frequency of the mclk signal after the MCLKDIV2 circuit. >> + >> + - cirrus,ain1a-ref-cfg, ain1b-ref-cfg : boolean, If present, AIN1A or AIN1B are configured >> + as a pseudo-differential input referenced to AIN1REF/AIN3A. > > What happens if a DT had both bools? That would not cause any issues, but you can only tie the ref to one of the inputs > >> + >> + - cirrus,ain2a-ref-cfg, ain2b-ref-cfg : boolean, If present, AIN2A or AIN2B are configured >> + as a pseudo-differential input referenced to AIN2REF/AIN3B. >> + >> + - cirrus,micbias-lvl: Set the output voltage level on the MICBIAS Pin. >> + 0 = 0.5 x VA >> + 1 = 0.6 x VA >> + 2 = 0.7 x VA >> + 3 = 0.8 x VA >> + 4 = 0.83 x VA >> + 5 = 0.91 x VA >> + >> + - cirrus,adaptive-pwr-cfg : Configures how the power to the Headphone and Lineout >> + Amplifiers adapt to the output signal levels. >> + 0 = Adapt to Volume Mode. Voltage level determined by the sum of the relevant volume settings. >> + 1 = Fixed - Headphone and Line Amp supply = + or - VCP/2. >> + 2 = Fixed - Headphone and Line Amp supply = + or - VCP. >> + 3 = Adapted to Signal; Voltage level is dynamically determined by the output signal. >> + >> + - cirrus,hpf-left-freq, hpf-right-freq : Sets the corner frequency (-3dB point) for the internal High-Pass >> + Filter. >> + 0 = 1.8Hz >> + 1 = 119Hz >> + 2 = 236Hz >> + 3 = 464Hz >> + > > Add a include/dt-bindings for all the various enums Could you explain more please? Thanks
On May 5, 2014, at 4:32 PM, Austin, Brian <brian.austin@cirrus.com> wrote: > > On May 5, 2014, at 4:18 PM, Kumar Gala <galak@codeaurora.org> wrote: > >> >> On May 5, 2014, at 3:09 PM, Brian Austin <brian.austin@cirrus.com> wrote: >> >>> This patch adds binding documentation for the Cirrus Logic CS42L56 Low Power Stereo I2C CODEC >>> >>> Signed-off-by: Brian Austin <brian.austin@cirrus.com> >>> --- >>> .../devicetree/bindings/sound/cs42l56.txt | 63 ++++++++++++++++++++ >>> 1 file changed, 63 insertions(+) >>> create mode 100644 Documentation/devicetree/bindings/sound/cs42l56.txt >>> >>> diff --git a/Documentation/devicetree/bindings/sound/cs42l56.txt b/Documentation/devicetree/bindings/sound/cs42l56.txt >>> new file mode 100644 >>> index 0000000..9ae074f >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/sound/cs42l56.txt >>> @@ -0,0 +1,63 @@ >>> +CS42L52 audio CODEC >>> + >>> +Required properties: >>> + >>> + - compatible : "cirrus,cs42l56" >>> + >>> + - reg : the I2C address of the device for I2C >>> + >>> + - VA-supply, VCP-supply, VLDO-supply : power supplies for the device, >>> + as covered in Documentation/devicetree/bindings/regulator/regulator.txt. >>> + >>> +Optional properties: >>> + >>> + - cirrus,gpio-nreset : GPIO controller's phandle and the number >>> + of the GPIO used to reset the codec. >>> + >>> + - cirrus,chgfreq-divisor : Values used to set the Charge Pump Frequency. >>> + Allowable values of 0x00 through 0x0F. These are raw values written to the >>> + register, not the actual frequency. The frequency is determined by the following. >>> + Frequency = MCLK / 4 * (N+2) >>> + N = chgfreq_val >>> + MCLK = Where MCLK is the frequency of the mclk signal after the MCLKDIV2 circuit. >>> + >>> + - cirrus,ain1a-ref-cfg, ain1b-ref-cfg : boolean, If present, AIN1A or AIN1B are configured >>> + as a pseudo-differential input referenced to AIN1REF/AIN3A. >> >> What happens if a DT had both bools? > That would not cause any issues, but you can only tie the ref to one of the inputs > >> >>> + >>> + - cirrus,ain2a-ref-cfg, ain2b-ref-cfg : boolean, If present, AIN2A or AIN2B are configured >>> + as a pseudo-differential input referenced to AIN2REF/AIN3B. >>> + >>> + - cirrus,micbias-lvl: Set the output voltage level on the MICBIAS Pin. >>> + 0 = 0.5 x VA >>> + 1 = 0.6 x VA >>> + 2 = 0.7 x VA >>> + 3 = 0.8 x VA >>> + 4 = 0.83 x VA >>> + 5 = 0.91 x VA >>> + >>> + - cirrus,adaptive-pwr-cfg : Configures how the power to the Headphone and Lineout >>> + Amplifiers adapt to the output signal levels. >>> + 0 = Adapt to Volume Mode. Voltage level determined by the sum of the relevant volume settings. >>> + 1 = Fixed - Headphone and Line Amp supply = + or - VCP/2. >>> + 2 = Fixed - Headphone and Line Amp supply = + or - VCP. >>> + 3 = Adapted to Signal; Voltage level is dynamically determined by the output signal. >>> + >>> + - cirrus,hpf-left-freq, hpf-right-freq : Sets the corner frequency (-3dB point) for the internal High-Pass >>> + Filter. >>> + 0 = 1.8Hz >>> + 1 = 119Hz >>> + 2 = 236Hz >>> + 3 = 464Hz >>> + >> >> Add a include/dt-bindings for all the various enums > Could you explain more please? > > Thanks I understand now thanks
> > Add a include/dt-bindings for all the various enums > Can I add that as a seperate patch with the update for the dt-bindings? Or do I need to resend the whole patch series? Thanks, Brian
On Mon, May 05, 2014 at 04:56:12PM -0500, Brian Austin wrote: > >Add a include/dt-bindings for all the various enums > Can I add that as a seperate patch with the update for the dt-bindings? Or > do I need to resend the whole patch series? Incremental is fine.
On Mon, May 05, 2014 at 03:09:09PM -0500, Brian Austin wrote:
> This patch adds binding documentation for the Cirrus Logic CS42L56 Low Power Stereo I2C CODEC
Applied, thanks.
diff --git a/Documentation/devicetree/bindings/sound/cs42l56.txt b/Documentation/devicetree/bindings/sound/cs42l56.txt new file mode 100644 index 0000000..9ae074f --- /dev/null +++ b/Documentation/devicetree/bindings/sound/cs42l56.txt @@ -0,0 +1,63 @@ +CS42L52 audio CODEC + +Required properties: + + - compatible : "cirrus,cs42l56" + + - reg : the I2C address of the device for I2C + + - VA-supply, VCP-supply, VLDO-supply : power supplies for the device, + as covered in Documentation/devicetree/bindings/regulator/regulator.txt. + +Optional properties: + + - cirrus,gpio-nreset : GPIO controller's phandle and the number + of the GPIO used to reset the codec. + + - cirrus,chgfreq-divisor : Values used to set the Charge Pump Frequency. + Allowable values of 0x00 through 0x0F. These are raw values written to the + register, not the actual frequency. The frequency is determined by the following. + Frequency = MCLK / 4 * (N+2) + N = chgfreq_val + MCLK = Where MCLK is the frequency of the mclk signal after the MCLKDIV2 circuit. + + - cirrus,ain1a-ref-cfg, ain1b-ref-cfg : boolean, If present, AIN1A or AIN1B are configured + as a pseudo-differential input referenced to AIN1REF/AIN3A. + + - cirrus,ain2a-ref-cfg, ain2b-ref-cfg : boolean, If present, AIN2A or AIN2B are configured + as a pseudo-differential input referenced to AIN2REF/AIN3B. + + - cirrus,micbias-lvl: Set the output voltage level on the MICBIAS Pin. + 0 = 0.5 x VA + 1 = 0.6 x VA + 2 = 0.7 x VA + 3 = 0.8 x VA + 4 = 0.83 x VA + 5 = 0.91 x VA + + - cirrus,adaptive-pwr-cfg : Configures how the power to the Headphone and Lineout + Amplifiers adapt to the output signal levels. + 0 = Adapt to Volume Mode. Voltage level determined by the sum of the relevant volume settings. + 1 = Fixed - Headphone and Line Amp supply = + or - VCP/2. + 2 = Fixed - Headphone and Line Amp supply = + or - VCP. + 3 = Adapted to Signal; Voltage level is dynamically determined by the output signal. + + - cirrus,hpf-left-freq, hpf-right-freq : Sets the corner frequency (-3dB point) for the internal High-Pass + Filter. + 0 = 1.8Hz + 1 = 119Hz + 2 = 236Hz + 3 = 464Hz + + +Example: + +codec: codec@4b { + compatible = "cirrus,cs42l56"; + reg = <0x4b>; + gpio-reset = <&gpio 10 0>; + cirrus,chgfreq-divisor = <0x05>; + cirrus.ain1_ref_cfg; + cirrus,micbias-lvl = <5>; + VA-supply = <®_audio>; +};
This patch adds binding documentation for the Cirrus Logic CS42L56 Low Power Stereo I2C CODEC Signed-off-by: Brian Austin <brian.austin@cirrus.com> --- .../devicetree/bindings/sound/cs42l56.txt | 63 ++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/cs42l56.txt