Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1263087 > unrolled thread
| Started by | Adam Thomson <Adam.Thomson.Opensource@diasemi.com> |
|---|---|
| First post | 2015-11-05 11:50 +0100 |
| Last post | 2015-11-06 11:40 +0100 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/2] ASoC: da7218: Add bindings documentation for DA7218 audio codec Adam Thomson <Adam.Thomson.Opensource@diasemi.com> - 2015-11-05 11:50 +0100
Re: [PATCH 1/2] ASoC: da7218: Add bindings documentation for DA7218 audio codec Mark Brown <broonie@kernel.org> - 2015-11-05 16:00 +0100
RE: [PATCH 1/2] ASoC: da7218: Add bindings documentation for DA7218 audio codec "Opensource [Adam Thomson]" <Adam.Thomson.Opensource@diasemi.com> - 2015-11-05 19:00 +0100
Re: [PATCH 1/2] ASoC: da7218: Add bindings documentation for DA7218 audio codec Mark Brown <broonie@kernel.org> - 2015-11-06 11:40 +0100
| From | Adam Thomson <Adam.Thomson.Opensource@diasemi.com> |
|---|---|
| Date | 2015-11-05 11:50 +0100 |
| Subject | [PATCH 1/2] ASoC: da7218: Add bindings documentation for DA7218 audio codec |
| Message-ID | <qrqhc-5qX-15@gated-at.bofh.it> |
Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
---
Documentation/devicetree/bindings/sound/da7218.txt | 116 +++++++++++++++++++++
1 file changed, 116 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/da7218.txt
diff --git a/Documentation/devicetree/bindings/sound/da7218.txt b/Documentation/devicetree/bindings/sound/da7218.txt
new file mode 100644
index 0000000..ae7053d
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/da7218.txt
@@ -0,0 +1,116 @@
+Dialog Semiconductor DA7218 Audio Codec bindings
+
+DA7218 is an audio codec with HP detect feature.
+
+======
+
+Required properties:
+- compatible : Should be "dlg,da7217" or "dlg,da7218"
+- reg: Specifies the I2C slave address
+
+- VDD-supply: VDD power supply for the device
+- VDDMIC-supply: VDDMIC power supply for the device
+- VDDIO-supply: VDDIO power supply for the device
+ (See Documentation/devicetree/bindings/regulator/regulator.txt for further
+ information relating to regulators)
+
+Optional properties:
+- interrupt-parent: Specifies the phandle of the interrupt controller to which
+ the IRQs from DA7218 are delivered to.
+- interrupts: IRQ line info for DA7218 chip.
+ (See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt for
+ further information relating to interrupt properties)
+- interrupt-names : Name associated with interrupt line. Should be "wakeup" if
+ interrupt is to be used to wake system, otherwise "irq" should be used.
+- wakeup-source: Flag to indicate this device can wake system (suspend/resume).
+
+- clocks : phandle and clock specifier for codec MCLK.
+- clock-names : Clock name string for 'clocks' attribute, should be "mclk".
+
+- dlg,ldo-lvl : Required internal LDO voltage (mV) level
+ [<1050>, <1100>, <1200>, <1400>]
+- dlg,micbias1-lvl : Voltage (mV) for Mic Bias 1
+ [<1200>, <1600>, <1800>, <2000>, <2200>, <2400>, <2600>, <2800>, <3000>]
+- dlg,micbias2-lvl : Voltage (mV) for Mic Bias 2
+ [<1200>, <1600>, <1800>, <2000>, <2200>, <2400>, <2600>, <2800>, <3000>]
+- dlg,mic1-amp-in-sel : Mic1 input source type
+ ["diff", "se_p", "se_n"]
+- dlg,mic2-amp-in-sel : Mic2 input source type
+ ["diff", "se_p", "se_n"]
+- dlg,dmic1-data-sel : DMIC1 channel select based on clock edge.
+ ["lrise_rfall", "lfall_rrise"]
+- dlg,dmic1-samplephase : When to sample audio from DMIC1.
+ ["on_clkedge", "between_clkedge"]
+- dlg,dmic1-clkrate : DMic1 clock frequency (Hz).
+ [<1500000>, <3000000>]
+- dlg,dmic2-data-sel : DMic2 channel select based on clock edge.
+ ["lrise_rfall", "lfall_rrise"]
+- dlg,dmic2-samplephase : When to sample audio from DMic2.
+ ["on_clkedge", "between_clkedge"]
+- dlg,dmic2-clkrate : DMic2 clock frequency (Hz).
+ [<1500000>, <3000000>]
+- dlg,biquad-cfg : List of data & address pairs to configure BiQuad filters
+ [ < {data1} {addr1} {data2} {addr2} ... >; ]
+- dlg,st-biquad-cfg : List of data & address pairs to configure Sidetone
+ BiQuad filters
+ [ < {data1} {addr1} {data2} {addr2} ... >; ]
+- dlg,hp-diff-single-supply : Boolean flag, use single supply for HP
+ (DA7217 only)
+
+======
+
+Optional Child node - 'da7218_hpldet' (DA7218 only):
+
+Optional properties:
+- dlg,jack-rate : Time between jack detect measurements (us)
+ [<5>, <10>, <20>, <40>, <80>, <160>, <320>, <640>]
+- dlg,jack-debounce : Number of debounce measurements taken for jack detect
+ [<0>, <2>, <3>, <4>]
+- dlg,jack-threshold : Threshold level for jack detection (% of VDD)
+ [<84>, <88>, <92>, <96>]
+- dlg,comp-inv : Boolean flag, invert comparator output
+- dlg,hyst : Boolean flag, enable hysteresis
+- dlg,discharge : Boolean flag, auto discharge of Mic Bias on jack removal
+
+======
+
+Example:
+
+ codec: da7218@1a {
+ compatible = "dlg,da7218";
+ reg = <0x1a>;
+ interrupt-parent = <&gpio6>;
+ interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
+ wakeup-source;
+
+ VDD-supply = <®_audio>;
+ VDDMIC-supply = <®_audio>;
+ VDDIO-supply = <®_audio>;
+
+ clocks = <&clks 201>;
+ clock-names = "mclk";
+
+ dlg,ldo-lvl = <1200>;
+
+ dlg,micbias1-lvl = <2600>;
+ dlg,micbias2-lvl = <2600>;
+ dlg,mic1-amp-in-sel = "diff";
+ dlg,mic2-amp-in-sel = "diff";
+
+ dlg,dmic1-data-sel = "lrise_rfall";
+ dlg,dmic1-samplephase = "on_clkedge";
+ dlg,dmic1-clkrate = <3000000>;
+ dlg,dmic2-data-sel = "lrise_rfall";
+ dlg,dmic2-samplephase = "on_clkedge";
+ dlg,dmic2-clkrate = <3000000>;
+
+ dlg,biquad-cfg = <0x9c 0x00 0x40 0x01 0xd0 0x02 0x81 0x03>;
+ dlg,st-biquad-cfg = <0x00 0x00 0x40 0x01 0x00 0x02 0x00 0x03>;
+
+ da7218_hpldet {
+ dlg,jack-rate = <40>;
+ dlg,jack-debounce = <2>;
+ dlg,jack-threshold = <84>;
+ dlg,hyst;
+ };
+ };
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2015-11-05 16:00 +0100 |
| Subject | Re: [PATCH 1/2] ASoC: da7218: Add bindings documentation for DA7218 audio codec |
| Message-ID | <qrub8-81X-29@gated-at.bofh.it> |
| In reply to | #1263087 |
[Multipart message — attachments visible in raw view] — view raw
On Thu, Nov 05, 2015 at 10:43:15AM +0000, Adam Thomson wrote:
> +- dlg,ldo-lvl : Required internal LDO voltage (mV) level
> + [<1050>, <1100>, <1200>, <1400>]
Why would this ever be anything other than the minimum voltage, and
might we not want to vary it at runtime?
> +- dlg,biquad-cfg : List of data & address pairs to configure BiQuad filters
> + [ < {data1} {addr1} {data2} {addr2} ... >; ]
> +- dlg,st-biquad-cfg : List of data & address pairs to configure Sidetone
> + BiQuad filters
> + [ < {data1} {addr1} {data2} {addr2} ... >; ]
These look like DSP coefficients which I would therefore expect to be
configurable at runtime via a binary control rather than specified in
the DT - why are they in the DT?
[toc] | [prev] | [next] | [standalone]
| From | "Opensource [Adam Thomson]" <Adam.Thomson.Opensource@diasemi.com> |
|---|---|
| Date | 2015-11-05 19:00 +0100 |
| Subject | RE: [PATCH 1/2] ASoC: da7218: Add bindings documentation for DA7218 audio codec |
| Message-ID | <qrwZk-1nd-13@gated-at.bofh.it> |
| In reply to | #1263307 |
T24gTm92ZW1iZXIgMDUsIDIwMTUgMTQ6NTksIE1hcmsgQnJvd24gd3JvdGU6DQoNCj4gPiArLSBk bGcsbGRvLWx2bCA6IFJlcXVpc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gZmlsdGVycw0KPiA+ICsJWyA8IHtkYXRhMX0ge2FkZHIxfSB7ZGF0YTJ9IHth ZGRyMn0gLi4uID47IF0NCj4gDQo+IFRoZXNlIGxvb2sgbGlrZSBEU1AgY29lZmZpY2llbnRzIHdo aWNoIEkgd291bGQgdGhlcmVmb3JlIGV4cGVjdCB0byBiZQ0KPiBjb25maWd1cmFibGUgYXQgcnVu dGltZSB2aWEgYSBiaW5hcnkgY29udHJvbCByYXRoZXIgdGhhbiBzcGVjaWZpZWQgaW4NCj4gdGhl IERUIC0gd2h5IGFyZSB0aGV5IGluIHRoZSBEVD8NCg0KVGhlIGV4cGVjdGF0aW9uIHdhcyB0aGVz ZSB3b3VsZCBiZSBzZXQgb25jZSBhbmQgbGVmdCBmb3IgYSBwbGF0Zm9ybSwgd2hpY2ggaXMNCndo eSBJIGFkZGVkIHRoZW0gdG8gdGhlIERULiBIb3dldmVyIHRoZXJlJ3Mgbm8gcmVhc29uIHRoZXkg Y291bGRuJ3QgYmUgbW92ZWQNCnRvIGJpbmFyeSBjb250cm9sLiBIYXZpbmcgbG9va2VkIGF0IG90 aGVyIGNvZGVjcywgSSBhc3N1bWUgU05EX1NPQ19CWVRFUyogd291bGQNCmJlIHRoZSBwcmVmZXJy ZWQgbWV0aG9kIGZvciBzZXR0aW5nIHRoaXMga2luZCBvZiBkYXRhPw0K -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2015-11-06 11:40 +0100 |
| Subject | Re: [PATCH 1/2] ASoC: da7218: Add bindings documentation for DA7218 audio codec |
| Message-ID | <qrMB4-3if-27@gated-at.bofh.it> |
| In reply to | #1263457 |
[Multipart message — attachments visible in raw view] — view raw
On Thu, Nov 05, 2015 at 05:59:29PM +0000, Opensource [Adam Thomson] wrote: > On November 05, 2015 14:59, Mark Brown wrote: > > > +- dlg,ldo-lvl : Required internal LDO voltage (mV) level > > > + [<1050>, <1100>, <1200>, <1400>] > > Why would this ever be anything other than the minimum voltage, and > > might we not want to vary it at runtime? > Normally you are correct and you'll want minimum voltage for the digital engine > but there may be the possibility for certain platform scenarios that to meet > timings a higher voltage is required. Would prefer to leave this in in case it > is required in the future. As a side, the default setting is the lowest voltage, > if this binding is not provided. That doesn't make a huge degree of sense - your non-specific "certain platform scenarios" are almost certainly going to be DVFS things where you need to boost the voltage of the LDO when the device needs to operate at particularly high frequencies in which case the driver really ought to just manage the voltage appropriately as required (ideally only boosting it at the times where the extra load exists). Unless you can be more specific about what the intended use is this just doesn't seem like something we should be specifying in DT. > > These look like DSP coefficients which I would therefore expect to be > > configurable at runtime via a binary control rather than specified in > > the DT - why are they in the DT? > The expectation was these would be set once and left for a platform, which is > why I added them to the DT. However there's no reason they couldn't be moved > to binary control. Having looked at other codecs, I assume SND_SOC_BYTES* would > be the preferred method for setting this kind of data? Yes.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web