All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 2/2] ASoc: Add devictree bindings for CS35L35 CODEC
       [not found] ` <1485360798-15523-1-git-send-email-brian.austin-jGc1dHjMKG3QT0dZR+AlfA@public.gmane.org>
@ 2017-01-25 16:13   ` Brian Austin
  2017-01-30 20:16     ` Rob Herring
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Austin @ 2017-01-25 16:13 UTC (permalink / raw)
  To: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, devicetree-u79uwXL29TY76Z2rM5mHXA
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A, lgirdwood-Re5JQEeQqe8AvxtiuMwx3w,
	mark.rutland-5wv7dgnIgG8, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E,
	Brian Austin

Add devicetree bindings documentatin for
Cirrus Logic CS35L35 Boosted Amplifier

Signed-off-by: Brian Austin <brian.austin-jGc1dHjMKG3QT0dZR+AlfA@public.gmane.org>
---
 .../devicetree/bindings/sound/cs35l35.txt          | 171 +++++++++++++++++++++
 1 file changed, 171 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/cs35l35.txt

diff --git a/Documentation/devicetree/bindings/sound/cs35l35.txt b/Documentation/devicetree/bindings/sound/cs35l35.txt
new file mode 100644
index 0000000..8a93b1b
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/cs35l35.txt
@@ -0,0 +1,171 @@
+CS35L35 Speaker Amplifier
+
+Required properties:
+
+  - compatible : "cirrus,cs35l35"
+
+  - reg : the I2C address of the device for I2C
+
+  - VA-supply, VP-supply : power supplies for the device,
+    as covered in
+    Documentation/devicetree/bindings/regulator/regulator.txt.
+
+  - interrupt-parent : Specifies the phandle of the interrupt controller to
+    which the IRQs from CS35L35 are delivered to.
+  - interrupts : IRQ line info CS35L35.
+    (See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
+    for further information relating to interrupt properties)
+
+Optional properties:
+  - reset-gpios : gpio used to reset the amplifier
+
+  - cirrus,stereo-config : Boolean to determine if there are 2 AMPs for a
+  Stereo configuration
+
+  - cirrus,audio-channel : Set Location of Audio Signal on Serial Port
+  0 = Data Packet received on Left I2S Channel
+  1 = Data Packet received on Right I2S Channel
+
+  - cirrus,advisory-channel : Set Location of Advisory Signal on Serial Port
+  0 = Data Packet received on Left I2S Channel
+  1 = Data Packet received on Right I2S Channel
+
+  - cirrus,shared-boost : Boolean to enable ClassH tracking of Advisory Signal
+  if 2 Devices share Boost BST_CTL
+
+  - cirrus,sp-drv-strength : Value for setting the Serial Port drive strength
+  Table 3-10 of the datasheet lists drive-strength specifications
+  0 = 1x (Default)
+  1 = .5x
+
+  - cirrus,bst-pdn-fet-on : Boolean to determine if the Boost PDN control
+  powers down with a rectification FET On or Off. If VSPK is supplied
+  externally then FET is off.
+
+  - cirrus,boost-ctl : Boost Converter control word.
+  Step Size: 100
+  0x00 = (Default) VP
+  Range is 0x01...0x41
+
+  - cirrus,boost-ipk : Boost-converter peak current limit.
+  Configures the peak current by monitoring the current through the boost FET.
+  Step size: 112
+  0x07 = (Default) 2.46 Amps
+  Range is 0x00...0x19
+
+  - cirrus,amp-gain-zc : Boolean to determine if to use Amplifier gain-change
+  zero-cross
+
+Optional H/G Algorithm sub-node:
+
+  The cs35l35 node can have a single "cirrus,classh-internal-algo" sub-node
+  that will disable automatic control of the internal H/G Algorithm.
+
+  It is strongly recommended that the Datasheet be referenced when adjusting
+  or using these Class H Algorithm controls over the internal Algorithm.
+  Serious damage can occur to the Device and surrounding components.
+
+  - cirrus,classh-internal-algo : Sub-node for the Internal Class H Algorithm
+  See Section 4.3 Internal Class H Algorithm in the Datasheet.
+  If not used, the device manages the ClassH Algorithm internally.
+
+Optional properties for the "cirrus,classh-internal-algo" Sub-node
+
+  Section 7.29 Class H Control
+  - cirrus,classh-bst-overide : Boolean
+  - cirrus,classh-bst-max-limit
+  - cirrus,classh-mem-depth
+
+  Section 7.30 Class H Headroom Control
+  - cirrus,classh-headroom
+
+  Section 7.31 Class H Release Rate
+  - cirrus,classh-release-rate
+
+  Section 7.32 Class H Weak FET Drive Control
+  - cirrus,classh-wk-fet-disable
+  - cirrus,classh-wk-fet-delay
+  - cirrus,classh-wk-fet-thld
+
+  Section 7.34 Class H VP Control
+  - cirrus,classh-vpch-auto
+  - cirrus,classh-vpch-rate
+  - cirrus,classh-vpch-man
+
+Optional Monitor Signal Format sub-node:
+
+  The cs35l35 node can have a single "cirrus,monitor-signal-format" sub-node
+  for adjusting the Depth, Location and Frame of the Monitoring Signals
+  for Algorithms.
+
+  See Sections 4.8.2 through 4.8.4 Serial-Port Control in the Datasheet
+
+  -cirrus,monitor-signal-format : Sub-node for the Monitor Signaling Formating
+  on the I2S Port. Each of the 3 8 bit values in the array contain the settings
+  for depth, location, and frame.
+
+  If not used, the defaults for the 6 monitor signals is used.
+
+  Sections 7.44 - 7.53 lists values for the depth, location, and frame
+  for each monitoring signal.
+
+  - cirrus,imon : 3 8 bit values to set the depth, location, and frame
+  of the IMON monitor signal.
+
+  - cirrus,vmon : 3 8 bit values to set the depth, location, and frame
+  of the VMON monitor signal.
+
+  - cirrus,vpmon : 3 8 bit values to set the depth, location, and frame
+  of the VPMON monitor signal.
+
+  - cirrus,vbstmon : 3 8 bit values to set the depth, location, and frame
+  of the VBSTMON monitor signal
+
+  - cirrus,vpbrstat : 3 8 bit values to set the depth, location, and frame
+  of the VPBRSTAT monitor signal
+
+  - cirrus,zerofill : 3 8 bit values to set the depth, location, and frame\
+  of the ZEROFILL packet in the monitor signal
+
+Example:
+
+cs35l35: cs35l35@20 {
+	compatible = "cirrus,cs35l35";
+	reg = <0x20>;
+	VA-supply = <&dummy_vreg>;
+	VP-supply = <&dummy_vreg>;
+	reset-gpios = <&axi_gpio 54 0>;
+	interrupt-parent = <&gpio8>;
+	interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
+	cirrus,boost-ctl = <0x41>;
+
+	cirrus,stereo-config;
+	cirrus,audio-channel = <0x00>;
+	cirrus,advisory-channel = <0x01>;
+	cirrus,shared-boost;
+
+	cirrus,classh-internal-algo {
+		cirrus,classh-bst-overide;
+		cirrus,classh-bst-max-limit = <0x01>;
+		cirrus,classh-mem-depth = <0x01>;
+		cirrus,classh-release-rate = <0x08>;
+		cirrus,classh-headroom-millivolt = <0x0B>;
+		cirrus,classh-wk-fet-disable = <0x01>;
+		cirrus,classh-wk-fet-delay = <0x04>;
+		cirrus,classh-wk-fet-thld = <0x01>;
+		cirrus,classh-vpch-auto = <0x01>;
+		cirrus,classh-vpch-rate = <0x02>;
+		cirrus,classh-vpch-man = <0x05>;
+	};
+
+	/* Depth, Location, Frame */
+	cirrus,monitor-signal-format {
+		cirrus,imon = /bits/ 8 <0x03 0x00 0x01>;
+		cirrus,vmon = /bits/ 8 <0x03 0x00 0x00>;
+		cirrus,vpmon = /bits/ 8 <0x03 0x04 0x00>;
+		cirrus,vbstmon = /bits/ 8 <0x03 0x04 0x01>;
+		cirrus,vpbrstat = /bits/ 8 <0x00 0x04 0x00>;
+		cirrus,zerofill = /bits/ 8 <0x00 0x00 0x00>;
+	};
+
+};
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v4 2/2] ASoc: Add devictree bindings for CS35L35 CODEC
  2017-01-25 16:13   ` [PATCH v4 2/2] ASoc: Add devictree bindings for CS35L35 CODEC Brian Austin
@ 2017-01-30 20:16     ` Rob Herring
  2017-01-30 20:39       ` Brian Austin
  0 siblings, 1 reply; 4+ messages in thread
From: Rob Herring @ 2017-01-30 20:16 UTC (permalink / raw)
  To: Brian Austin
  Cc: mark.rutland, devicetree, alsa-devel, lgirdwood, broonie, ckeepax

On Wed, Jan 25, 2017 at 10:13:18AM -0600, Brian Austin wrote:
> Add devicetree bindings documentatin for
> Cirrus Logic CS35L35 Boosted Amplifier
> 
> Signed-off-by: Brian Austin <brian.austin@cirrus.com>
> ---
>  .../devicetree/bindings/sound/cs35l35.txt          | 171 +++++++++++++++++++++
>  1 file changed, 171 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/cs35l35.txt

This looks similar to the CS35L33. Please align the property names and 
perhaps combine into a single binding doc.

Rob

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v4 2/2] ASoc: Add devictree bindings for CS35L35 CODEC
  2017-01-30 20:16     ` Rob Herring
@ 2017-01-30 20:39       ` Brian Austin
       [not found]         ` <b4c5fd4d-cc0b-4e17-923e-87048f391cec-XU/xxMRwCJnfk+Ne4bZl5AC/G2K4zDHf@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Austin @ 2017-01-30 20:39 UTC (permalink / raw)
  To: Rob Herring
  Cc: mark.rutland, devicetree, Brian Austin, alsa-devel, lgirdwood,
	broonie, ckeepax

On Mon, 30 Jan 2017, Rob Herring wrote:

> On Wed, Jan 25, 2017 at 10:13:18AM -0600, Brian Austin wrote:
> > Add devicetree bindings documentatin for
> > Cirrus Logic CS35L35 Boosted Amplifier
> > 
> > Signed-off-by: Brian Austin <brian.austin@cirrus.com>
> > ---
> >  .../devicetree/bindings/sound/cs35l35.txt          | 171 +++++++++++++++++++++
> >  1 file changed, 171 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/sound/cs35l35.txt
> 
> This looks similar to the CS35L33. Please align the property names and 
> perhaps combine into a single binding doc.
> 
> Rob
> 
I can make sure the names are consistent for some of them but most of it 
would be messy to combine into a single doc IMO. I know it looks similar 
for some of them like the algorithm nodes but they are very different in 
parameters and operation.

Would it suffice to just make sure the properties that are the same be 
reflected across both docs?

Thanks
Brian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v4 2/2] ASoc: Add devictree bindings for CS35L35 CODEC
       [not found]         ` <b4c5fd4d-cc0b-4e17-923e-87048f391cec-XU/xxMRwCJnfk+Ne4bZl5AC/G2K4zDHf@public.gmane.org>
@ 2017-02-02 15:46           ` Rob Herring
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2017-02-02 15:46 UTC (permalink / raw)
  To: Brian Austin
  Cc: Linux-ALSA, devicetree-u79uwXL29TY76Z2rM5mHXA, Mark Brown,
	Liam Girdwood, Mark Rutland, Charles Keepax

On Mon, Jan 30, 2017 at 2:39 PM, Brian Austin <brian.austin-jGc1dHjMKG3QT0dZR+AlfA@public.gmane.org> wrote:
> On Mon, 30 Jan 2017, Rob Herring wrote:
>
>> On Wed, Jan 25, 2017 at 10:13:18AM -0600, Brian Austin wrote:
>> > Add devicetree bindings documentatin for
>> > Cirrus Logic CS35L35 Boosted Amplifier
>> >
>> > Signed-off-by: Brian Austin <brian.austin-jGc1dHjMKG3QT0dZR+AlfA@public.gmane.org>
>> > ---
>> >  .../devicetree/bindings/sound/cs35l35.txt          | 171 +++++++++++++++++++++
>> >  1 file changed, 171 insertions(+)
>> >  create mode 100644 Documentation/devicetree/bindings/sound/cs35l35.txt
>>
>> This looks similar to the CS35L33. Please align the property names and
>> perhaps combine into a single binding doc.
>>
>> Rob
>>
> I can make sure the names are consistent for some of them but most of it
> would be messy to combine into a single doc IMO. I know it looks similar
> for some of them like the algorithm nodes but they are very different in
> parameters and operation.
>
> Would it suffice to just make sure the properties that are the same be
> reflected across both docs?

That would be move in the right direction. Then we can see how
different they are.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-02 15:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1485360798-15523-1-git-send-email-brian.austin@cirrus.com>
     [not found] ` <1485360798-15523-1-git-send-email-brian.austin-jGc1dHjMKG3QT0dZR+AlfA@public.gmane.org>
2017-01-25 16:13   ` [PATCH v4 2/2] ASoc: Add devictree bindings for CS35L35 CODEC Brian Austin
2017-01-30 20:16     ` Rob Herring
2017-01-30 20:39       ` Brian Austin
     [not found]         ` <b4c5fd4d-cc0b-4e17-923e-87048f391cec-XU/xxMRwCJnfk+Ne4bZl5AC/G2K4zDHf@public.gmane.org>
2017-02-02 15:46           ` Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.