* [PATCH v2] ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema
@ 2026-06-24 16:02 David Heidelberg via B4 Relay
2026-06-24 16:07 ` sashiko-bot
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-06-24 16:02 UTC (permalink / raw)
To: David Rhodes, Richard Fitzgerald, Liam Girdwood, Mark Brown,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, patches,
Bjorn Helgaas
Cc: David Rhodes, linux-sound, devicetree, linux-kernel, phone-devel,
David Heidelberg
From: David Heidelberg <david@ixit.cz>
Convert CS35L36 Speaker Amplifier to yaml.
Changes:
- maintainers email to the generic Cirrus email
- Both the codec and downstream worked just fine without
VP-supply provided. Align with datasheet for similar models.
- add dai-common.yaml to cover for '#sound-dai-cells',
'sound-name-prefix'
Reviewed-by: David Rhodes <David.Rhodes@cirrus.com>
Co-developed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
---
Relevant for Pixel 3 / 3XL / 4.
---
Changes in v2:
- Rename the commit. (Mark)
- Link to v1: https://lore.kernel.org/r/20260618-dt-cirrus-cs35l36-v1-1-1a43515666ad@ixit.cz
---
.../devicetree/bindings/sound/cirrus,cs35l36.yaml | 224 +++++++++++++++++++++
.../devicetree/bindings/sound/cs35l36.txt | 168 ----------------
2 files changed, 224 insertions(+), 168 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml
new file mode 100644
index 0000000000000..af0acaaefb68e
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml
@@ -0,0 +1,224 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/cirrus,cs35l36.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cirrus Logic CS35L36 Speaker Amplifier
+
+maintainers:
+ - patches@opensource.cirrus.com
+ - Bjorn Helgaas <bhelgaas@google.com>
+
+description: |
+ CS35L36 is a boosted mono Class D amplifier
+
+allOf:
+ - $ref: /schemas/sound/dai-common.yaml#
+
+properties:
+ compatible:
+ enum:
+ - cirrus,cs35l36
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ VA-supply:
+ description: Voltage regulator of analog internal section
+
+ VP-supply:
+ description: Voltage regulator of boost converter
+
+ reset-gpios:
+ maxItems: 1
+
+ cirrus,boost-ctl-millivolt:
+ description: Boost converter output voltage in millivolts (step 50)
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 2550
+ maximum: 12000
+
+ cirrus,boost-peak-milliamp:
+ description: Boost-converter peak current limit in mA (step 50)
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 4500
+ minimum: 1600
+ maximum: 4500
+
+ cirrus,boost-ind-nanohenry:
+ description: Initial inductor estimation reference value in nanohenry (1000=1μH, 1200=1.2μH)
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 1000
+
+ cirrus,multi-amp-mode:
+ description: Hi-Z ASP port when more than one amplifier in system.
+ type: boolean
+
+ cirrus,boost-ctl-select:
+ description: Boost converter control source selection
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 0x01
+ enum:
+ - 0x00 # Control Port
+ - 0x01 # Class
+ - 0x10 # Sync
+
+ cirrus,amp-pcm-inv:
+ description: Invert incoming PCM data when true.
+ type: boolean
+
+ cirrus,imon-pol-inv:
+ description: Invert polarity of outbound IMON feedback when true.
+ type: boolean
+
+ cirrus,vmon-pol-inv:
+ description: Invert polarity of outbound VMON feedback when true.
+ type: boolean
+
+ cirrus,dcm-mode-enable:
+ description: Enable boost converter automatic Discontinuous Conduction Mode.
+ type: boolean
+
+ cirrus,weak-fet-disable:
+ description: Reduce output driver strength in Weak-FET Drive Mode when true.
+ type: boolean
+
+ cirrus,classh-wk-fet-delay:
+ description: Weak-FET entry delay in ms
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 100
+ enum:
+ - 0 # 0
+ - 1 # 5
+ - 2 # 10
+ - 3 # 50
+ - 4 # 100
+ - 5 # 200
+ - 6 # 500
+ - 7 # 1000
+
+ cirrus,classh-weak-fet-thld-millivolt:
+ description: Weak-FET drive threshold in mV
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700]
+
+ cirrus,temp-warn-threshold:
+ description: Overtemperature warning threshold
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 2
+ enum:
+ - 0 # 105°C
+ - 1 # 115°C
+ - 2 # 125°C
+ - 3 # 135°C
+
+ cirrus,irq-drive-select:
+ description: Interrupt output driver type
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 1
+ enum:
+ - 0 # open-drain
+ - 1 # push-pull
+
+ cirrus,irq-gpio-select:
+ description: Programmable IRQ pin selection
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum:
+ - 0 # PDM_DATA/SWIRE_SD/INT
+ - 1 # GPIO
+
+ cirrus,vpbr-config:
+ description: Brownout prevention configuration sub-node
+ type: object
+ additionalProperties: false
+
+ properties:
+ cirrus,vpbr-en:
+ description: VBST brownout prevention enable
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 0
+ enum:
+ - 0 # disabled
+ - 1 # enabled
+
+ cirrus,vpbr-thld:
+ description: Initial VPBR threshold voltage
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ cirrus,vpbr-atk-rate:
+ description: Attenuation attack step rate
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ cirrus,vpbr-atk-vol:
+ description: VP brownout prevention step size
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ cirrus,vpbr-max-attn:
+ description: Maximum attenuation during VP brownout prevention
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ cirrus,vpbr-wait:
+ description: Delay between brownout clearance and attenuation release
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ cirrus,vpbr-rel-rate:
+ description: Attenuation release step rate
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ cirrus,vpbr-mute-en:
+ description: Mute audio if maximum attenuation reached
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - VA-supply
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ codec@40 {
+ compatible = "cirrus,cs35l36";
+ reg = <0x40>;
+ VA-supply = <&dummy_vreg>;
+ VP-supply = <&dummy_vreg>;
+ reset-gpios = <&gpio0 54 GPIO_ACTIVE_HIGH>;
+ interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
+
+ cirrus,boost-ind-nanohenry = <1000>;
+ cirrus,boost-ctl-millivolt = <10000>;
+ cirrus,boost-peak-milliamp = <4500>;
+ cirrus,boost-ctl-select = <0x00>;
+ cirrus,weak-fet-delay = <4>;
+ cirrus,weak-fet-thld = <0x01>;
+ cirrus,temp-warn-threshold = <1>;
+ cirrus,multi-amp-mode;
+ cirrus,irq-drive-select = <1>;
+ cirrus,irq-gpio-select = <0x01>;
+
+ cirrus,vpbr-config {
+ cirrus,vpbr-en = <0>;
+ cirrus,vpbr-thld = <0x05>;
+ cirrus,vpbr-atk-rate = <0x02>;
+ cirrus,vpbr-atk-vol = <0x01>;
+ cirrus,vpbr-max-attn = <0x09>;
+ cirrus,vpbr-wait = <0x01>;
+ cirrus,vpbr-rel-rate = <0x05>;
+ cirrus,vpbr-mute-en = <0x00>;
+ };
+ };
+ };
+...
diff --git a/Documentation/devicetree/bindings/sound/cs35l36.txt b/Documentation/devicetree/bindings/sound/cs35l36.txt
deleted file mode 100644
index d34117b8558e5..0000000000000
--- a/Documentation/devicetree/bindings/sound/cs35l36.txt
+++ /dev/null
@@ -1,168 +0,0 @@
-CS35L36 Speaker Amplifier
-
-Required properties:
-
- - compatible : "cirrus,cs35l36"
-
- - 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.
-
- - cirrus,boost-ctl-millivolt : Boost Voltage Value. Configures the boost
- converter's output voltage in mV. The range is from 2550mV to 12000mV with
- increments of 50mV.
- (Default) VP
-
- - cirrus,boost-peak-milliamp : Boost-converter peak current limit in mA.
- Configures the peak current by monitoring the current through the boost FET.
- Range starts at 1600mA and goes to a maximum of 4500mA with increments of
- 50mA.
- (Default) 4.50 Amps
-
- - cirrus,boost-ind-nanohenry : Inductor estimation LBST reference value.
- Seeds the digital boost converter's inductor estimation block with the initial
- inductance value to reference.
-
- 1000 = 1uH (Default)
- 1200 = 1.2uH
-
-Optional properties:
- - cirrus,multi-amp-mode : Boolean to determine if there are more than
- one amplifier in the system. If more than one it is best to Hi-Z the ASP
- port to prevent bus contention on the output signal
-
- - cirrus,boost-ctl-select : Boost converter control source selection.
- Selects the source of the BST_CTL target VBST voltage for the boost
- converter to generate.
- 0x00 - Control Port Value
- 0x01 - Class H Tracking (Default)
- 0x10 - MultiDevice Sync Value
-
- - cirrus,amp-pcm-inv : Boolean to determine Amplifier will invert incoming
- PCM data
-
- - cirrus,imon-pol-inv : Boolean to determine Amplifier will invert the
- polarity of outbound IMON feedback data
-
- - cirrus,vmon-pol-inv : Boolean to determine Amplifier will invert the
- polarity of outbound VMON feedback data
-
- - cirrus,dcm-mode-enable : Boost converter automatic DCM Mode enable.
- This enables the digital boost converter to operate in a low power
- (Discontinuous Conduction) mode during low loading conditions.
-
- - cirrus,weak-fet-disable : Boolean : The strength of the output drivers is
- reduced when operating in a Weak-FET Drive Mode and must not be used to drive
- a large load.
-
- - cirrus,classh-wk-fet-delay : Weak-FET entry delay. Controls the delay
- (in ms) before the Class H algorithm switches to the weak-FET voltage
- (after the audio falls and remains below the value specified in WKFET_AMP_THLD).
-
- 0 = 0ms
- 1 = 5ms
- 2 = 10ms
- 3 = 50ms
- 4 = 100ms (Default)
- 5 = 200ms
- 6 = 500ms
- 7 = 1000ms
-
- - cirrus,classh-weak-fet-thld-millivolt : Weak-FET amplifier drive threshold.
- Configures the signal threshold at which the PWM output stage enters
- weak-FET operation. The range is 50mV to 700mV in 50mV increments.
-
- - cirrus,temp-warn-threshold : Amplifier overtemperature warning threshold.
- Configures the threshold at which the overtemperature warning condition occurs.
- When the threshold is met, the overtemperature warning attenuation is applied
- and the TEMP_WARN_EINT interrupt status bit is set.
- If TEMP_WARN_MASK = 0, INTb is asserted.
-
- 0 = 105C
- 1 = 115C
- 2 = 125C (Default)
- 3 = 135C
-
- - cirrus,irq-drive-select : Selects the driver type of the selected interrupt
- output.
-
- 0 = Open-drain
- 1 = Push-pull (Default)
-
- - cirrus,irq-gpio-select : Selects the pin to serve as the programmable
- interrupt output.
-
- 0 = PDM_DATA / SWIRE_SD / INT (Default)
- 1 = GPIO
-
-Optional properties for the "cirrus,vpbr-config" Sub-node
-
- - cirrus,vpbr-en : VBST brownout prevention enable. Configures whether the
- VBST brownout prevention algorithm is enabled or disabled.
-
- 0 = VBST brownout prevention disabled (default)
- 1 = VBST brownout prevention enabled
-
- See Section 7.31.1 VPBR Config for configuration options & further details
-
- - cirrus,vpbr-thld : Initial VPBR threshold. Configures the VP brownout
- threshold voltage
-
- - cirrus,cirrus,vpbr-atk-rate : Attenuation attack step rate. Configures the
- amount delay between consecutive volume attenuation steps when a brownout
- condition is present and the VP brownout condition is in an attacking state.
-
- - cirrus,vpbr-atk-vol : VP brownout prevention step size. Configures the VP
- brownout prevention attacking attenuation step size when operating in either
- digital volume or analog gain modes.
-
- - cirrus,vpbr-max-attn : Maximum attenuation that the VP brownout prevention
- can apply to the audio signal.
-
- - cirrus,vpbr-wait : Configures the delay time between a brownout condition
- no longer being present and the VP brownout prevention entering an attenuation
- release state.
-
- - cirrus,vpbr-rel-rate : Attenuation release step rate. Configures the delay
- between consecutive volume attenuation release steps when a brownout condition
- is not longer present and the VP brownout is in an attenuation release state.
-
- - cirrus,vpbr-mute-en : During the attack state, if the vpbr-max-attn value
- is reached, the error condition still remains, and this bit is set, the audio
- is muted.
-
-Example:
-
-cs35l36: cs35l36@40 {
- compatible = "cirrus,cs35l36";
- reg = <0x40>;
- VA-supply = <&dummy_vreg>;
- VP-supply = <&dummy_vreg>;
- reset-gpios = <&gpio0 54 0>;
- interrupt-parent = <&gpio8>;
- interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
-
- cirrus,boost-ind-nanohenry = <1000>;
- cirrus,boost-ctl-millivolt = <10000>;
- cirrus,boost-peak-milliamp = <4500>;
- cirrus,boost-ctl-select = <0x00>;
- cirrus,weak-fet-delay = <0x04>;
- cirrus,weak-fet-thld = <0x01>;
- cirrus,temp-warn-threshold = <0x01>;
- cirrus,multi-amp-mode;
- cirrus,irq-drive-select = <0x01>;
- cirrus,irq-gpio-select = <0x01>;
-
- cirrus,vpbr-config {
- cirrus,vpbr-en = <0x00>;
- cirrus,vpbr-thld = <0x05>;
- cirrus,vpbr-atk-rate = <0x02>;
- cirrus,vpbr-atk-vol = <0x01>;
- cirrus,vpbr-max-attn = <0x09>;
- cirrus,vpbr-wait = <0x01>;
- cirrus,vpbr-rel-rate = <0x05>;
- cirrus,vpbr-mute-en = <0x00>;
- };
-};
---
base-commit: 8cd9520d35a6c38db6567e97dd93b1f11f185dc6
change-id: 20260618-dt-cirrus-cs35l36-99c466fb13fd
Best regards,
--
David Heidelberg <david@ixit.cz>
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v2] ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema 2026-06-24 16:02 [PATCH v2] ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema David Heidelberg via B4 Relay @ 2026-06-24 16:07 ` sashiko-bot 2026-06-24 16:41 ` Mark Brown ` (2 subsequent siblings) 3 siblings, 0 replies; 8+ messages in thread From: sashiko-bot @ 2026-06-24 16:07 UTC (permalink / raw) To: David Heidelberg via B4 Relay; +Cc: robh, devicetree, conor+dt Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Medium] Incorrect `$id` path in the YAML schema breaks cross-referencing. - [Low] Undefined properties in the dt-schema example cause validation failure. -- commit 637d0c2cb3168267adcc3eaf3f2d6a7d9fd028f5 Author: David Heidelberg <david@ixit.cz> ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema This commit converts the CS35L36 Speaker Amplifier device tree binding from plain text to YAML schema. It also includes the dai-common.yaml schema for sound DAI cells and prefix. > diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml > new file mode 100644 > index 0000000000000..af0acaaefb68e > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml > @@ -0,0 +1,224 @@ > +# SPDX-License-Identifier: GPL-2.0-only > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/cirrus,cs35l36.yaml# [Severity: Medium] Does this $id field break schema cross-referencing? Since this file is located in the sound/ subdirectory, shouldn't the path exactly match the file location (e.g., http://devicetree.org/schemas/sound/cirrus,cs35l36.yaml#) to allow dt_binding_check to resolve references properly? [ ... ] > +required: > + - compatible > + - reg > + - interrupts > + - VA-supply > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include <dt-bindings/gpio/gpio.h> > + #include <dt-bindings/interrupt-controller/irq.h> [ ... ] > + cirrus,boost-ind-nanohenry = <1000>; > + cirrus,boost-ctl-millivolt = <10000>; > + cirrus,boost-peak-milliamp = <4500>; > + cirrus,boost-ctl-select = <0x00>; > + cirrus,weak-fet-delay = <4>; > + cirrus,weak-fet-thld = <0x01>; [Severity: Low] Will this example fail validation with dt_binding_check due to the unevaluatedProperties: false restriction? The example uses cirrus,weak-fet-delay and cirrus,weak-fet-thld, but the schema defined earlier specifies these properties as cirrus,classh-wk-fet-delay and cirrus,classh-weak-fet-thld-millivolt. Additionally, is <0x01> a valid value for the millivolt threshold enum? [ ... ] -- Sashiko AI review · https://sashiko.dev/#/patchset/20260624-dt-cirrus-cs35l36-v2-1-74eccdbd8fe4@ixit.cz?part=1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema 2026-06-24 16:02 [PATCH v2] ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema David Heidelberg via B4 Relay 2026-06-24 16:07 ` sashiko-bot @ 2026-06-24 16:41 ` Mark Brown 2026-06-24 17:30 ` Rob Herring (Arm) 2026-06-24 18:17 ` Rob Herring 3 siblings, 0 replies; 8+ messages in thread From: Mark Brown @ 2026-06-24 16:41 UTC (permalink / raw) To: david Cc: David Rhodes, Richard Fitzgerald, Liam Girdwood, Rob Herring, Krzysztof Kozlowski, Conor Dooley, patches, Bjorn Helgaas, linux-sound, devicetree, linux-kernel, phone-devel [-- Attachment #1: Type: text/plain, Size: 183 bytes --] On Wed, Jun 24, 2026 at 06:02:25PM +0200, David Heidelberg via B4 Relay wrote: > +$id: http://devicetree.org/schemas/cirrus,cs35l36.yaml# Other bindings include sound/ in the path. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema 2026-06-24 16:02 [PATCH v2] ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema David Heidelberg via B4 Relay 2026-06-24 16:07 ` sashiko-bot 2026-06-24 16:41 ` Mark Brown @ 2026-06-24 17:30 ` Rob Herring (Arm) 2026-06-24 18:17 ` Rob Herring 3 siblings, 0 replies; 8+ messages in thread From: Rob Herring (Arm) @ 2026-06-24 17:30 UTC (permalink / raw) To: David Heidelberg Cc: David Rhodes, linux-sound, Bjorn Helgaas, devicetree, linux-kernel, Conor Dooley, Krzysztof Kozlowski, phone-devel, Mark Brown, patches, Richard Fitzgerald, David Rhodes, Liam Girdwood On Wed, 24 Jun 2026 18:02:25 +0200, David Heidelberg wrote: > Convert CS35L36 Speaker Amplifier to yaml. > > Changes: > - maintainers email to the generic Cirrus email > - Both the codec and downstream worked just fine without > VP-supply provided. Align with datasheet for similar models. > - add dai-common.yaml to cover for '#sound-dai-cells', > 'sound-name-prefix' > > Reviewed-by: David Rhodes <David.Rhodes@cirrus.com> > Co-developed-by: Rob Herring (Arm) <robh@kernel.org> > Signed-off-by: Rob Herring (Arm) <robh@kernel.org> > Signed-off-by: David Heidelberg <david@ixit.cz> > --- > Relevant for Pixel 3 / 3XL / 4. > --- > Changes in v2: > - Rename the commit. (Mark) > - Link to v1: https://lore.kernel.org/r/20260618-dt-cirrus-cs35l36-v1-1-1a43515666ad@ixit.cz > --- > .../devicetree/bindings/sound/cirrus,cs35l36.yaml | 224 +++++++++++++++++++++ > .../devicetree/bindings/sound/cs35l36.txt | 168 ---------------- > 2 files changed, 224 insertions(+), 168 deletions(-) > My bot found errors running 'make dt_binding_check' on your patch: yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml: properties:cirrus,vpbr-config:type: 'boolean' was expected hint: A vendor boolean property can use "type: boolean" from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml: Unresolvable reference: /schemas/sound/dai-common.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/cirrus,cs35l36.example.dtb: codec@40 (cirrus,cs35l36): Unevaluated properties are not allowed ('cirrus,weak-fet-delay', 'cirrus,weak-fet-thld' were unexpected) from schema $id: http://devicetree.org/schemas/cirrus,cs35l36.yaml doc reference errors (make refcheckdocs): See https://patchwork.kernel.org/project/devicetree/patch/20260624-dt-cirrus-cs35l36-v2-1-74eccdbd8fe4@ixit.cz The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema 2026-06-24 16:02 [PATCH v2] ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema David Heidelberg via B4 Relay ` (2 preceding siblings ...) 2026-06-24 17:30 ` Rob Herring (Arm) @ 2026-06-24 18:17 ` Rob Herring 2026-06-24 18:39 ` David Heidelberg 3 siblings, 1 reply; 8+ messages in thread From: Rob Herring @ 2026-06-24 18:17 UTC (permalink / raw) To: david Cc: David Rhodes, Richard Fitzgerald, Liam Girdwood, Mark Brown, Krzysztof Kozlowski, Conor Dooley, patches, Bjorn Helgaas, linux-sound, devicetree, linux-kernel, phone-devel On Wed, Jun 24, 2026 at 11:02 AM David Heidelberg via B4 Relay <devnull+david.ixit.cz@kernel.org> wrote: > > From: David Heidelberg <david@ixit.cz> > > Convert CS35L36 Speaker Amplifier to yaml. > > Changes: > - maintainers email to the generic Cirrus email > - Both the codec and downstream worked just fine without > VP-supply provided. Align with datasheet for similar models. > - add dai-common.yaml to cover for '#sound-dai-cells', > 'sound-name-prefix' > > Reviewed-by: David Rhodes <David.Rhodes@cirrus.com> If you are going to take stuff I haven't fixed: Assisted-by: OpenAI:gpt-4 (I don't remember the exact flavor I used) > Co-developed-by: Rob Herring (Arm) <robh@kernel.org> > Signed-off-by: Rob Herring (Arm) <robh@kernel.org> > Signed-off-by: David Heidelberg <david@ixit.cz> > --- > Relevant for Pixel 3 / 3XL / 4. > --- > Changes in v2: > - Rename the commit. (Mark) > - Link to v1: https://lore.kernel.org/r/20260618-dt-cirrus-cs35l36-v1-1-1a43515666ad@ixit.cz > --- > .../devicetree/bindings/sound/cirrus,cs35l36.yaml | 224 +++++++++++++++++++++ > .../devicetree/bindings/sound/cs35l36.txt | 168 ---------------- > 2 files changed, 224 insertions(+), 168 deletions(-) > > diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml > new file mode 100644 > index 0000000000000..af0acaaefb68e > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml > @@ -0,0 +1,224 @@ > +# SPDX-License-Identifier: GPL-2.0-only > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/cirrus,cs35l36.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Cirrus Logic CS35L36 Speaker Amplifier > + > +maintainers: > + - patches@opensource.cirrus.com > + - Bjorn Helgaas <bhelgaas@google.com> Bjorn is not correct. Generally we want a person, not a company list. > + > +description: | Don't need '|'. > + CS35L36 is a boosted mono Class D amplifier > + > +allOf: > + - $ref: /schemas/sound/dai-common.yaml# > + > +properties: > + compatible: > + enum: > + - cirrus,cs35l36 > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + VA-supply: > + description: Voltage regulator of analog internal section > + > + VP-supply: > + description: Voltage regulator of boost converter > + > + reset-gpios: > + maxItems: 1 > + > + cirrus,boost-ctl-millivolt: > + description: Boost converter output voltage in millivolts (step 50) > + $ref: /schemas/types.yaml#/definitions/uint32 > + minimum: 2550 > + maximum: 12000 > + > + cirrus,boost-peak-milliamp: > + description: Boost-converter peak current limit in mA (step 50) > + $ref: /schemas/types.yaml#/definitions/uint32 > + default: 4500 > + minimum: 1600 > + maximum: 4500 > + > + cirrus,boost-ind-nanohenry: > + description: Initial inductor estimation reference value in nanohenry (1000=1μH, 1200=1.2μH) > + $ref: /schemas/types.yaml#/definitions/uint32 > + default: 1000 > + > + cirrus,multi-amp-mode: > + description: Hi-Z ASP port when more than one amplifier in system. > + type: boolean > + > + cirrus,boost-ctl-select: > + description: Boost converter control source selection > + $ref: /schemas/types.yaml#/definitions/uint32 > + default: 0x01 > + enum: > + - 0x00 # Control Port > + - 0x01 # Class > + - 0x10 # Sync > + > + cirrus,amp-pcm-inv: > + description: Invert incoming PCM data when true. > + type: boolean > + > + cirrus,imon-pol-inv: > + description: Invert polarity of outbound IMON feedback when true. > + type: boolean > + > + cirrus,vmon-pol-inv: > + description: Invert polarity of outbound VMON feedback when true. > + type: boolean > + > + cirrus,dcm-mode-enable: > + description: Enable boost converter automatic Discontinuous Conduction Mode. > + type: boolean > + > + cirrus,weak-fet-disable: > + description: Reduce output driver strength in Weak-FET Drive Mode when true. > + type: boolean > + > + cirrus,classh-wk-fet-delay: > + description: Weak-FET entry delay in ms > + $ref: /schemas/types.yaml#/definitions/uint32 > + default: 100 How? Range is 0-7. > + enum: > + - 0 # 0 > + - 1 # 5 > + - 2 # 10 > + - 3 # 50 > + - 4 # 100 > + - 5 # 200 > + - 6 # 500 > + - 7 # 1000 > + > + cirrus,classh-weak-fet-thld-millivolt: > + description: Weak-FET drive threshold in mV > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700] > + > + cirrus,temp-warn-threshold: > + description: Overtemperature warning threshold > + $ref: /schemas/types.yaml#/definitions/uint32 > + default: 2 > + enum: > + - 0 # 105°C > + - 1 # 115°C > + - 2 # 125°C > + - 3 # 135°C > + > + cirrus,irq-drive-select: > + description: Interrupt output driver type > + $ref: /schemas/types.yaml#/definitions/uint32 > + default: 1 > + enum: > + - 0 # open-drain > + - 1 # push-pull > + > + cirrus,irq-gpio-select: > + description: Programmable IRQ pin selection > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: > + - 0 # PDM_DATA/SWIRE_SD/INT > + - 1 # GPIO > + > + cirrus,vpbr-config: > + description: Brownout prevention configuration sub-node > + type: object > + additionalProperties: false > + > + properties: > + cirrus,vpbr-en: > + description: VBST brownout prevention enable > + $ref: /schemas/types.yaml#/definitions/uint32 > + default: 0 > + enum: > + - 0 # disabled > + - 1 # enabled > + > + cirrus,vpbr-thld: > + description: Initial VPBR threshold voltage > + $ref: /schemas/types.yaml#/definitions/uint32 > + > + cirrus,vpbr-atk-rate: > + description: Attenuation attack step rate > + $ref: /schemas/types.yaml#/definitions/uint32 > + > + cirrus,vpbr-atk-vol: > + description: VP brownout prevention step size > + $ref: /schemas/types.yaml#/definitions/uint32 > + > + cirrus,vpbr-max-attn: > + description: Maximum attenuation during VP brownout prevention > + $ref: /schemas/types.yaml#/definitions/uint32 > + > + cirrus,vpbr-wait: > + description: Delay between brownout clearance and attenuation release > + $ref: /schemas/types.yaml#/definitions/uint32 > + > + cirrus,vpbr-rel-rate: > + description: Attenuation release step rate > + $ref: /schemas/types.yaml#/definitions/uint32 > + > + cirrus,vpbr-mute-en: > + description: Mute audio if maximum attenuation reached > + $ref: /schemas/types.yaml#/definitions/uint32 Constraints on any of these? > + > +required: > + - compatible > + - reg > + - interrupts > + - VA-supply > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include <dt-bindings/gpio/gpio.h> > + #include <dt-bindings/interrupt-controller/irq.h> > + > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + codec@40 { > + compatible = "cirrus,cs35l36"; > + reg = <0x40>; > + VA-supply = <&dummy_vreg>; > + VP-supply = <&dummy_vreg>; > + reset-gpios = <&gpio0 54 GPIO_ACTIVE_HIGH>; > + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; > + > + cirrus,boost-ind-nanohenry = <1000>; > + cirrus,boost-ctl-millivolt = <10000>; > + cirrus,boost-peak-milliamp = <4500>; > + cirrus,boost-ctl-select = <0x00>; > + cirrus,weak-fet-delay = <4>; > + cirrus,weak-fet-thld = <0x01>; > + cirrus,temp-warn-threshold = <1>; > + cirrus,multi-amp-mode; > + cirrus,irq-drive-select = <1>; > + cirrus,irq-gpio-select = <0x01>; > + > + cirrus,vpbr-config { > + cirrus,vpbr-en = <0>; > + cirrus,vpbr-thld = <0x05>; > + cirrus,vpbr-atk-rate = <0x02>; > + cirrus,vpbr-atk-vol = <0x01>; > + cirrus,vpbr-max-attn = <0x09>; > + cirrus,vpbr-wait = <0x01>; > + cirrus,vpbr-rel-rate = <0x05>; > + cirrus,vpbr-mute-en = <0x00>; > + }; > + }; > + }; > +... > diff --git a/Documentation/devicetree/bindings/sound/cs35l36.txt b/Documentation/devicetree/bindings/sound/cs35l36.txt > deleted file mode 100644 > index d34117b8558e5..0000000000000 > --- a/Documentation/devicetree/bindings/sound/cs35l36.txt > +++ /dev/null > @@ -1,168 +0,0 @@ > -CS35L36 Speaker Amplifier > - > -Required properties: > - > - - compatible : "cirrus,cs35l36" > - > - - 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. > - > - - cirrus,boost-ctl-millivolt : Boost Voltage Value. Configures the boost > - converter's output voltage in mV. The range is from 2550mV to 12000mV with > - increments of 50mV. > - (Default) VP > - > - - cirrus,boost-peak-milliamp : Boost-converter peak current limit in mA. > - Configures the peak current by monitoring the current through the boost FET. > - Range starts at 1600mA and goes to a maximum of 4500mA with increments of > - 50mA. > - (Default) 4.50 Amps > - > - - cirrus,boost-ind-nanohenry : Inductor estimation LBST reference value. > - Seeds the digital boost converter's inductor estimation block with the initial > - inductance value to reference. > - > - 1000 = 1uH (Default) > - 1200 = 1.2uH > - > -Optional properties: > - - cirrus,multi-amp-mode : Boolean to determine if there are more than > - one amplifier in the system. If more than one it is best to Hi-Z the ASP > - port to prevent bus contention on the output signal > - > - - cirrus,boost-ctl-select : Boost converter control source selection. > - Selects the source of the BST_CTL target VBST voltage for the boost > - converter to generate. > - 0x00 - Control Port Value > - 0x01 - Class H Tracking (Default) > - 0x10 - MultiDevice Sync Value > - > - - cirrus,amp-pcm-inv : Boolean to determine Amplifier will invert incoming > - PCM data > - > - - cirrus,imon-pol-inv : Boolean to determine Amplifier will invert the > - polarity of outbound IMON feedback data > - > - - cirrus,vmon-pol-inv : Boolean to determine Amplifier will invert the > - polarity of outbound VMON feedback data > - > - - cirrus,dcm-mode-enable : Boost converter automatic DCM Mode enable. > - This enables the digital boost converter to operate in a low power > - (Discontinuous Conduction) mode during low loading conditions. > - > - - cirrus,weak-fet-disable : Boolean : The strength of the output drivers is > - reduced when operating in a Weak-FET Drive Mode and must not be used to drive > - a large load. > - > - - cirrus,classh-wk-fet-delay : Weak-FET entry delay. Controls the delay > - (in ms) before the Class H algorithm switches to the weak-FET voltage > - (after the audio falls and remains below the value specified in WKFET_AMP_THLD). > - > - 0 = 0ms > - 1 = 5ms > - 2 = 10ms > - 3 = 50ms > - 4 = 100ms (Default) > - 5 = 200ms > - 6 = 500ms > - 7 = 1000ms > - > - - cirrus,classh-weak-fet-thld-millivolt : Weak-FET amplifier drive threshold. > - Configures the signal threshold at which the PWM output stage enters > - weak-FET operation. The range is 50mV to 700mV in 50mV increments. > - > - - cirrus,temp-warn-threshold : Amplifier overtemperature warning threshold. > - Configures the threshold at which the overtemperature warning condition occurs. > - When the threshold is met, the overtemperature warning attenuation is applied > - and the TEMP_WARN_EINT interrupt status bit is set. > - If TEMP_WARN_MASK = 0, INTb is asserted. > - > - 0 = 105C > - 1 = 115C > - 2 = 125C (Default) > - 3 = 135C > - > - - cirrus,irq-drive-select : Selects the driver type of the selected interrupt > - output. > - > - 0 = Open-drain > - 1 = Push-pull (Default) > - > - - cirrus,irq-gpio-select : Selects the pin to serve as the programmable > - interrupt output. > - > - 0 = PDM_DATA / SWIRE_SD / INT (Default) > - 1 = GPIO > - > -Optional properties for the "cirrus,vpbr-config" Sub-node > - > - - cirrus,vpbr-en : VBST brownout prevention enable. Configures whether the > - VBST brownout prevention algorithm is enabled or disabled. > - > - 0 = VBST brownout prevention disabled (default) > - 1 = VBST brownout prevention enabled > - > - See Section 7.31.1 VPBR Config for configuration options & further details > - > - - cirrus,vpbr-thld : Initial VPBR threshold. Configures the VP brownout > - threshold voltage > - > - - cirrus,cirrus,vpbr-atk-rate : Attenuation attack step rate. Configures the > - amount delay between consecutive volume attenuation steps when a brownout > - condition is present and the VP brownout condition is in an attacking state. > - > - - cirrus,vpbr-atk-vol : VP brownout prevention step size. Configures the VP > - brownout prevention attacking attenuation step size when operating in either > - digital volume or analog gain modes. > - > - - cirrus,vpbr-max-attn : Maximum attenuation that the VP brownout prevention > - can apply to the audio signal. > - > - - cirrus,vpbr-wait : Configures the delay time between a brownout condition > - no longer being present and the VP brownout prevention entering an attenuation > - release state. > - > - - cirrus,vpbr-rel-rate : Attenuation release step rate. Configures the delay > - between consecutive volume attenuation release steps when a brownout condition > - is not longer present and the VP brownout is in an attenuation release state. > - > - - cirrus,vpbr-mute-en : During the attack state, if the vpbr-max-attn value > - is reached, the error condition still remains, and this bit is set, the audio > - is muted. > - > -Example: > - > -cs35l36: cs35l36@40 { > - compatible = "cirrus,cs35l36"; > - reg = <0x40>; > - VA-supply = <&dummy_vreg>; > - VP-supply = <&dummy_vreg>; > - reset-gpios = <&gpio0 54 0>; > - interrupt-parent = <&gpio8>; > - interrupts = <3 IRQ_TYPE_LEVEL_LOW>; > - > - cirrus,boost-ind-nanohenry = <1000>; > - cirrus,boost-ctl-millivolt = <10000>; > - cirrus,boost-peak-milliamp = <4500>; > - cirrus,boost-ctl-select = <0x00>; > - cirrus,weak-fet-delay = <0x04>; > - cirrus,weak-fet-thld = <0x01>; > - cirrus,temp-warn-threshold = <0x01>; > - cirrus,multi-amp-mode; > - cirrus,irq-drive-select = <0x01>; > - cirrus,irq-gpio-select = <0x01>; > - > - cirrus,vpbr-config { > - cirrus,vpbr-en = <0x00>; > - cirrus,vpbr-thld = <0x05>; > - cirrus,vpbr-atk-rate = <0x02>; > - cirrus,vpbr-atk-vol = <0x01>; > - cirrus,vpbr-max-attn = <0x09>; > - cirrus,vpbr-wait = <0x01>; > - cirrus,vpbr-rel-rate = <0x05>; > - cirrus,vpbr-mute-en = <0x00>; > - }; > -}; > > --- > base-commit: 8cd9520d35a6c38db6567e97dd93b1f11f185dc6 > change-id: 20260618-dt-cirrus-cs35l36-99c466fb13fd > > Best regards, > -- > David Heidelberg <david@ixit.cz> > > > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema 2026-06-24 18:17 ` Rob Herring @ 2026-06-24 18:39 ` David Heidelberg 2026-06-24 19:45 ` Rob Herring 0 siblings, 1 reply; 8+ messages in thread From: David Heidelberg @ 2026-06-24 18:39 UTC (permalink / raw) To: Rob Herring, David Rhodes Cc: Richard Fitzgerald, Liam Girdwood, Mark Brown, Krzysztof Kozlowski, Conor Dooley, patches, Bjorn Helgaas, linux-sound, devicetree, linux-kernel, phone-devel On 24/06/2026 20:17, Rob Herring wrote: > On Wed, Jun 24, 2026 at 11:02 AM David Heidelberg via B4 Relay > <devnull+david.ixit.cz@kernel.org> wrote: >> >> From: David Heidelberg <david@ixit.cz> >> >> Convert CS35L36 Speaker Amplifier to yaml. >> >> Changes: >> - maintainers email to the generic Cirrus email >> - Both the codec and downstream worked just fine without >> VP-supply provided. Align with datasheet for similar models. >> - add dai-common.yaml to cover for '#sound-dai-cells', >> 'sound-name-prefix' >> >> Reviewed-by: David Rhodes <David.Rhodes@cirrus.com> > > If you are going to take stuff I haven't fixed: > > Assisted-by: OpenAI:gpt-4 > > (I don't remember the exact flavor I used) > >> Co-developed-by: Rob Herring (Arm) <robh@kernel.org> >> Signed-off-by: Rob Herring (Arm) <robh@kernel.org> >> Signed-off-by: David Heidelberg <david@ixit.cz> >> --- >> Relevant for Pixel 3 / 3XL / 4. >> --- >> Changes in v2: >> - Rename the commit. (Mark) >> - Link to v1: https://lore.kernel.org/r/20260618-dt-cirrus-cs35l36-v1-1-1a43515666ad@ixit.cz >> --- >> .../devicetree/bindings/sound/cirrus,cs35l36.yaml | 224 +++++++++++++++++++++ >> .../devicetree/bindings/sound/cs35l36.txt | 168 ---------------- >> 2 files changed, 224 insertions(+), 168 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml >> new file mode 100644 >> index 0000000000000..af0acaaefb68e >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml >> @@ -0,0 +1,224 @@ >> +# SPDX-License-Identifier: GPL-2.0-only >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/cirrus,cs35l36.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Cirrus Logic CS35L36 Speaker Amplifier >> + >> +maintainers: >> + - patches@opensource.cirrus.com >> + - Bjorn Helgaas <bhelgaas@google.com> > > Bjorn is not correct. Generally we want a person, not a company list. I'm adding back James, can I keep the patches at 2nd place? > >> + >> +description: | > > Don't need '|'. > >> + CS35L36 is a boosted mono Class D amplifier >> + >> +allOf: >> + - $ref: /schemas/sound/dai-common.yaml# >> + >> +properties: >> + compatible: >> + enum: >> + - cirrus,cs35l36 >> + >> + reg: >> + maxItems: 1 >> + >> + interrupts: >> + maxItems: 1 >> + >> + VA-supply: >> + description: Voltage regulator of analog internal section >> + >> + VP-supply: >> + description: Voltage regulator of boost converter >> + >> + reset-gpios: >> + maxItems: 1 >> + >> + cirrus,boost-ctl-millivolt: >> + description: Boost converter output voltage in millivolts (step 50) >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + minimum: 2550 >> + maximum: 12000 >> + >> + cirrus,boost-peak-milliamp: >> + description: Boost-converter peak current limit in mA (step 50) >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + default: 4500 >> + minimum: 1600 >> + maximum: 4500 >> + >> + cirrus,boost-ind-nanohenry: >> + description: Initial inductor estimation reference value in nanohenry (1000=1μH, 1200=1.2μH) >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + default: 1000 >> + >> + cirrus,multi-amp-mode: >> + description: Hi-Z ASP port when more than one amplifier in system. >> + type: boolean >> + >> + cirrus,boost-ctl-select: >> + description: Boost converter control source selection >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + default: 0x01 >> + enum: >> + - 0x00 # Control Port >> + - 0x01 # Class >> + - 0x10 # Sync >> + >> + cirrus,amp-pcm-inv: >> + description: Invert incoming PCM data when true. >> + type: boolean >> + >> + cirrus,imon-pol-inv: >> + description: Invert polarity of outbound IMON feedback when true. >> + type: boolean >> + >> + cirrus,vmon-pol-inv: >> + description: Invert polarity of outbound VMON feedback when true. >> + type: boolean >> + >> + cirrus,dcm-mode-enable: >> + description: Enable boost converter automatic Discontinuous Conduction Mode. >> + type: boolean >> + >> + cirrus,weak-fet-disable: >> + description: Reduce output driver strength in Weak-FET Drive Mode when true. >> + type: boolean >> + >> + cirrus,classh-wk-fet-delay: >> + description: Weak-FET entry delay in ms >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + default: 100 > > How? Range is 0-7. Oh yeah, this was not thought, in next revision I converted this to cirrus,classh-wk-fet-delay mentioned in the example. Then I checked for it in the code, nowhere implemented or used, thus I switched to cirrus,classh-wk-fet-delay-ms and using the values directly. > >> + enum: >> + - 0 # 0 >> + - 1 # 5 >> + - 2 # 10 >> + - 3 # 50 >> + - 4 # 100 >> + - 5 # 200 >> + - 6 # 500 >> + - 7 # 1000 >> + >> + cirrus,classh-weak-fet-thld-millivolt: >> + description: Weak-FET drive threshold in mV >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + enum: [50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700] >> + >> + cirrus,temp-warn-threshold: >> + description: Overtemperature warning threshold >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + default: 2 >> + enum: >> + - 0 # 105°C >> + - 1 # 115°C >> + - 2 # 125°C >> + - 3 # 135°C >> + >> + cirrus,irq-drive-select: >> + description: Interrupt output driver type >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + default: 1 >> + enum: >> + - 0 # open-drain >> + - 1 # push-pull >> + >> + cirrus,irq-gpio-select: >> + description: Programmable IRQ pin selection >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + enum: >> + - 0 # PDM_DATA/SWIRE_SD/INT >> + - 1 # GPIO >> + >> + cirrus,vpbr-config: >> + description: Brownout prevention configuration sub-node >> + type: object >> + additionalProperties: false >> + >> + properties: >> + cirrus,vpbr-en: >> + description: VBST brownout prevention enable >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + default: 0 >> + enum: >> + - 0 # disabled >> + - 1 # enabled >> + >> + cirrus,vpbr-thld: >> + description: Initial VPBR threshold voltage >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + >> + cirrus,vpbr-atk-rate: >> + description: Attenuation attack step rate >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + >> + cirrus,vpbr-atk-vol: >> + description: VP brownout prevention step size >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + >> + cirrus,vpbr-max-attn: >> + description: Maximum attenuation during VP brownout prevention >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + >> + cirrus,vpbr-wait: >> + description: Delay between brownout clearance and attenuation release >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + >> + cirrus,vpbr-rel-rate: >> + description: Attenuation release step rate >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + >> + cirrus,vpbr-mute-en: >> + description: Mute audio if maximum attenuation reached >> + $ref: /schemas/types.yaml#/definitions/uint32 > > Constraints on any of these? Code just applies whatever is thrown at it, maybe David knows more? #nodatasheet (but would be lovely to have one) David > >> + >> +required: >> + - compatible >> + - reg >> + - interrupts >> + - VA-supply >> + >> +unevaluatedProperties: false >> + >> +examples: >> + - | >> + #include <dt-bindings/gpio/gpio.h> >> + #include <dt-bindings/interrupt-controller/irq.h> >> + >> + i2c { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + codec@40 { >> + compatible = "cirrus,cs35l36"; >> + reg = <0x40>; >> + VA-supply = <&dummy_vreg>; >> + VP-supply = <&dummy_vreg>; >> + reset-gpios = <&gpio0 54 GPIO_ACTIVE_HIGH>; >> + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; >> + >> + cirrus,boost-ind-nanohenry = <1000>; >> + cirrus,boost-ctl-millivolt = <10000>; >> + cirrus,boost-peak-milliamp = <4500>; >> + cirrus,boost-ctl-select = <0x00>; >> + cirrus,weak-fet-delay = <4>; >> + cirrus,weak-fet-thld = <0x01>; >> + cirrus,temp-warn-threshold = <1>; >> + cirrus,multi-amp-mode; >> + cirrus,irq-drive-select = <1>; >> + cirrus,irq-gpio-select = <0x01>; >> + >> + cirrus,vpbr-config { >> + cirrus,vpbr-en = <0>; >> + cirrus,vpbr-thld = <0x05>; >> + cirrus,vpbr-atk-rate = <0x02>; >> + cirrus,vpbr-atk-vol = <0x01>; >> + cirrus,vpbr-max-attn = <0x09>; >> + cirrus,vpbr-wait = <0x01>; >> + cirrus,vpbr-rel-rate = <0x05>; >> + cirrus,vpbr-mute-en = <0x00>; >> + }; >> + }; >> + }; >> +... >> diff --git a/Documentation/devicetree/bindings/sound/cs35l36.txt b/Documentation/devicetree/bindings/sound/cs35l36.txt >> deleted file mode 100644 >> index d34117b8558e5..0000000000000 >> --- a/Documentation/devicetree/bindings/sound/cs35l36.txt >> +++ /dev/null >> @@ -1,168 +0,0 @@ >> -CS35L36 Speaker Amplifier >> - >> -Required properties: >> - >> - - compatible : "cirrus,cs35l36" >> - >> - - 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. >> - >> - - cirrus,boost-ctl-millivolt : Boost Voltage Value. Configures the boost >> - converter's output voltage in mV. The range is from 2550mV to 12000mV with >> - increments of 50mV. >> - (Default) VP >> - >> - - cirrus,boost-peak-milliamp : Boost-converter peak current limit in mA. >> - Configures the peak current by monitoring the current through the boost FET. >> - Range starts at 1600mA and goes to a maximum of 4500mA with increments of >> - 50mA. >> - (Default) 4.50 Amps >> - >> - - cirrus,boost-ind-nanohenry : Inductor estimation LBST reference value. >> - Seeds the digital boost converter's inductor estimation block with the initial >> - inductance value to reference. >> - >> - 1000 = 1uH (Default) >> - 1200 = 1.2uH >> - >> -Optional properties: >> - - cirrus,multi-amp-mode : Boolean to determine if there are more than >> - one amplifier in the system. If more than one it is best to Hi-Z the ASP >> - port to prevent bus contention on the output signal >> - >> - - cirrus,boost-ctl-select : Boost converter control source selection. >> - Selects the source of the BST_CTL target VBST voltage for the boost >> - converter to generate. >> - 0x00 - Control Port Value >> - 0x01 - Class H Tracking (Default) >> - 0x10 - MultiDevice Sync Value >> - >> - - cirrus,amp-pcm-inv : Boolean to determine Amplifier will invert incoming >> - PCM data >> - >> - - cirrus,imon-pol-inv : Boolean to determine Amplifier will invert the >> - polarity of outbound IMON feedback data >> - >> - - cirrus,vmon-pol-inv : Boolean to determine Amplifier will invert the >> - polarity of outbound VMON feedback data >> - >> - - cirrus,dcm-mode-enable : Boost converter automatic DCM Mode enable. >> - This enables the digital boost converter to operate in a low power >> - (Discontinuous Conduction) mode during low loading conditions. >> - >> - - cirrus,weak-fet-disable : Boolean : The strength of the output drivers is >> - reduced when operating in a Weak-FET Drive Mode and must not be used to drive >> - a large load. >> - >> - - cirrus,classh-wk-fet-delay : Weak-FET entry delay. Controls the delay >> - (in ms) before the Class H algorithm switches to the weak-FET voltage >> - (after the audio falls and remains below the value specified in WKFET_AMP_THLD). >> - >> - 0 = 0ms >> - 1 = 5ms >> - 2 = 10ms >> - 3 = 50ms >> - 4 = 100ms (Default) >> - 5 = 200ms >> - 6 = 500ms >> - 7 = 1000ms >> - >> - - cirrus,classh-weak-fet-thld-millivolt : Weak-FET amplifier drive threshold. >> - Configures the signal threshold at which the PWM output stage enters >> - weak-FET operation. The range is 50mV to 700mV in 50mV increments. >> - >> - - cirrus,temp-warn-threshold : Amplifier overtemperature warning threshold. >> - Configures the threshold at which the overtemperature warning condition occurs. >> - When the threshold is met, the overtemperature warning attenuation is applied >> - and the TEMP_WARN_EINT interrupt status bit is set. >> - If TEMP_WARN_MASK = 0, INTb is asserted. >> - >> - 0 = 105C >> - 1 = 115C >> - 2 = 125C (Default) >> - 3 = 135C >> - >> - - cirrus,irq-drive-select : Selects the driver type of the selected interrupt >> - output. >> - >> - 0 = Open-drain >> - 1 = Push-pull (Default) >> - >> - - cirrus,irq-gpio-select : Selects the pin to serve as the programmable >> - interrupt output. >> - >> - 0 = PDM_DATA / SWIRE_SD / INT (Default) >> - 1 = GPIO >> - >> -Optional properties for the "cirrus,vpbr-config" Sub-node >> - >> - - cirrus,vpbr-en : VBST brownout prevention enable. Configures whether the >> - VBST brownout prevention algorithm is enabled or disabled. >> - >> - 0 = VBST brownout prevention disabled (default) >> - 1 = VBST brownout prevention enabled >> - >> - See Section 7.31.1 VPBR Config for configuration options & further details >> - >> - - cirrus,vpbr-thld : Initial VPBR threshold. Configures the VP brownout >> - threshold voltage >> - >> - - cirrus,cirrus,vpbr-atk-rate : Attenuation attack step rate. Configures the >> - amount delay between consecutive volume attenuation steps when a brownout >> - condition is present and the VP brownout condition is in an attacking state. >> - >> - - cirrus,vpbr-atk-vol : VP brownout prevention step size. Configures the VP >> - brownout prevention attacking attenuation step size when operating in either >> - digital volume or analog gain modes. >> - >> - - cirrus,vpbr-max-attn : Maximum attenuation that the VP brownout prevention >> - can apply to the audio signal. >> - >> - - cirrus,vpbr-wait : Configures the delay time between a brownout condition >> - no longer being present and the VP brownout prevention entering an attenuation >> - release state. >> - >> - - cirrus,vpbr-rel-rate : Attenuation release step rate. Configures the delay >> - between consecutive volume attenuation release steps when a brownout condition >> - is not longer present and the VP brownout is in an attenuation release state. >> - >> - - cirrus,vpbr-mute-en : During the attack state, if the vpbr-max-attn value >> - is reached, the error condition still remains, and this bit is set, the audio >> - is muted. >> - >> -Example: >> - >> -cs35l36: cs35l36@40 { >> - compatible = "cirrus,cs35l36"; >> - reg = <0x40>; >> - VA-supply = <&dummy_vreg>; >> - VP-supply = <&dummy_vreg>; >> - reset-gpios = <&gpio0 54 0>; >> - interrupt-parent = <&gpio8>; >> - interrupts = <3 IRQ_TYPE_LEVEL_LOW>; >> - >> - cirrus,boost-ind-nanohenry = <1000>; >> - cirrus,boost-ctl-millivolt = <10000>; >> - cirrus,boost-peak-milliamp = <4500>; >> - cirrus,boost-ctl-select = <0x00>; >> - cirrus,weak-fet-delay = <0x04>; >> - cirrus,weak-fet-thld = <0x01>; >> - cirrus,temp-warn-threshold = <0x01>; >> - cirrus,multi-amp-mode; >> - cirrus,irq-drive-select = <0x01>; >> - cirrus,irq-gpio-select = <0x01>; >> - >> - cirrus,vpbr-config { >> - cirrus,vpbr-en = <0x00>; >> - cirrus,vpbr-thld = <0x05>; >> - cirrus,vpbr-atk-rate = <0x02>; >> - cirrus,vpbr-atk-vol = <0x01>; >> - cirrus,vpbr-max-attn = <0x09>; >> - cirrus,vpbr-wait = <0x01>; >> - cirrus,vpbr-rel-rate = <0x05>; >> - cirrus,vpbr-mute-en = <0x00>; >> - }; >> -}; >> >> --- >> base-commit: 8cd9520d35a6c38db6567e97dd93b1f11f185dc6 >> change-id: 20260618-dt-cirrus-cs35l36-99c466fb13fd >> >> Best regards, >> -- >> David Heidelberg <david@ixit.cz> >> >> >> -- David Heidelberg ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema 2026-06-24 18:39 ` David Heidelberg @ 2026-06-24 19:45 ` Rob Herring 2026-06-24 20:04 ` David Heidelberg 0 siblings, 1 reply; 8+ messages in thread From: Rob Herring @ 2026-06-24 19:45 UTC (permalink / raw) To: David Heidelberg Cc: David Rhodes, Richard Fitzgerald, Liam Girdwood, Mark Brown, Krzysztof Kozlowski, Conor Dooley, patches, Bjorn Helgaas, linux-sound, devicetree, linux-kernel, phone-devel On Wed, Jun 24, 2026 at 08:39:28PM +0200, David Heidelberg wrote: > On 24/06/2026 20:17, Rob Herring wrote: > > On Wed, Jun 24, 2026 at 11:02 AM David Heidelberg via B4 Relay > > <devnull+david.ixit.cz@kernel.org> wrote: > > > > > > From: David Heidelberg <david@ixit.cz> > > > > > > Convert CS35L36 Speaker Amplifier to yaml. > > > > > > Changes: > > > - maintainers email to the generic Cirrus email > > > - Both the codec and downstream worked just fine without > > > VP-supply provided. Align with datasheet for similar models. > > > - add dai-common.yaml to cover for '#sound-dai-cells', > > > 'sound-name-prefix' > > > > > > Reviewed-by: David Rhodes <David.Rhodes@cirrus.com> > > > > If you are going to take stuff I haven't fixed: > > > > Assisted-by: OpenAI:gpt-4 > > > > (I don't remember the exact flavor I used) > > > > > Co-developed-by: Rob Herring (Arm) <robh@kernel.org> > > > Signed-off-by: Rob Herring (Arm) <robh@kernel.org> > > > Signed-off-by: David Heidelberg <david@ixit.cz> > > > --- > > > Relevant for Pixel 3 / 3XL / 4. > > > --- > > > Changes in v2: > > > - Rename the commit. (Mark) > > > - Link to v1: https://lore.kernel.org/r/20260618-dt-cirrus-cs35l36-v1-1-1a43515666ad@ixit.cz > > > --- > > > .../devicetree/bindings/sound/cirrus,cs35l36.yaml | 224 +++++++++++++++++++++ > > > .../devicetree/bindings/sound/cs35l36.txt | 168 ---------------- > > > 2 files changed, 224 insertions(+), 168 deletions(-) > > > > > > diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml > > > new file mode 100644 > > > index 0000000000000..af0acaaefb68e > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml > > > @@ -0,0 +1,224 @@ > > > +# SPDX-License-Identifier: GPL-2.0-only > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/cirrus,cs35l36.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: Cirrus Logic CS35L36 Speaker Amplifier > > > + > > > +maintainers: > > > + - patches@opensource.cirrus.com > > > + - Bjorn Helgaas <bhelgaas@google.com> > > > > Bjorn is not correct. Generally we want a person, not a company list. > > I'm adding back James, can I keep the patches at 2nd place? Yes. > > > + cirrus,vpbr-thld: > > > + description: Initial VPBR threshold voltage > > > + $ref: /schemas/types.yaml#/definitions/uint32 > > > + > > > + cirrus,vpbr-atk-rate: > > > + description: Attenuation attack step rate > > > + $ref: /schemas/types.yaml#/definitions/uint32 > > > + > > > + cirrus,vpbr-atk-vol: > > > + description: VP brownout prevention step size > > > + $ref: /schemas/types.yaml#/definitions/uint32 > > > + > > > + cirrus,vpbr-max-attn: > > > + description: Maximum attenuation during VP brownout prevention > > > + $ref: /schemas/types.yaml#/definitions/uint32 > > > + > > > + cirrus,vpbr-wait: > > > + description: Delay between brownout clearance and attenuation release > > > + $ref: /schemas/types.yaml#/definitions/uint32 > > > + > > > + cirrus,vpbr-rel-rate: > > > + description: Attenuation release step rate > > > + $ref: /schemas/types.yaml#/definitions/uint32 > > > + > > > + cirrus,vpbr-mute-en: > > > + description: Mute audio if maximum attenuation reached > > > + $ref: /schemas/types.yaml#/definitions/uint32 > > > > Constraints on any of these? > > Code just applies whatever is thrown at it, maybe David knows more? > > #nodatasheet (but would be lovely to have one) Unless the driver just takes these values and shoves them straight into a 32-bit register, the driver should give some clue about the size or possible values. Rob ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema 2026-06-24 19:45 ` Rob Herring @ 2026-06-24 20:04 ` David Heidelberg 0 siblings, 0 replies; 8+ messages in thread From: David Heidelberg @ 2026-06-24 20:04 UTC (permalink / raw) To: Rob Herring Cc: David Rhodes, Richard Fitzgerald, Liam Girdwood, Mark Brown, Krzysztof Kozlowski, Conor Dooley, patches, Bjorn Helgaas, linux-sound, devicetree, linux-kernel, phone-devel On 24/06/2026 21:45, Rob Herring wrote: > On Wed, Jun 24, 2026 at 08:39:28PM +0200, David Heidelberg wrote: >> On 24/06/2026 20:17, Rob Herring wrote: >>> On Wed, Jun 24, 2026 at 11:02 AM David Heidelberg via B4 Relay >>> <devnull+david.ixit.cz@kernel.org> wrote: >>>> >>>> From: David Heidelberg <david@ixit.cz> >>>> >>>> Convert CS35L36 Speaker Amplifier to yaml. >>>> >>>> Changes: >>>> - maintainers email to the generic Cirrus email >>>> - Both the codec and downstream worked just fine without >>>> VP-supply provided. Align with datasheet for similar models. >>>> - add dai-common.yaml to cover for '#sound-dai-cells', >>>> 'sound-name-prefix' >>>> >>>> Reviewed-by: David Rhodes <David.Rhodes@cirrus.com> >>> >>> If you are going to take stuff I haven't fixed: >>> >>> Assisted-by: OpenAI:gpt-4 >>> >>> (I don't remember the exact flavor I used) >>> >>>> Co-developed-by: Rob Herring (Arm) <robh@kernel.org> >>>> Signed-off-by: Rob Herring (Arm) <robh@kernel.org> >>>> Signed-off-by: David Heidelberg <david@ixit.cz> >>>> --- >>>> Relevant for Pixel 3 / 3XL / 4. >>>> --- >>>> Changes in v2: >>>> - Rename the commit. (Mark) >>>> - Link to v1: https://lore.kernel.org/r/20260618-dt-cirrus-cs35l36-v1-1-1a43515666ad@ixit.cz >>>> --- >>>> .../devicetree/bindings/sound/cirrus,cs35l36.yaml | 224 +++++++++++++++++++++ >>>> .../devicetree/bindings/sound/cs35l36.txt | 168 ---------------- >>>> 2 files changed, 224 insertions(+), 168 deletions(-) >>>> >>>> diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml >>>> new file mode 100644 >>>> index 0000000000000..af0acaaefb68e >>>> --- /dev/null >>>> +++ b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml >>>> @@ -0,0 +1,224 @@ >>>> +# SPDX-License-Identifier: GPL-2.0-only >>>> +%YAML 1.2 >>>> +--- >>>> +$id: http://devicetree.org/schemas/cirrus,cs35l36.yaml# >>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>>> + >>>> +title: Cirrus Logic CS35L36 Speaker Amplifier >>>> + >>>> +maintainers: >>>> + - patches@opensource.cirrus.com >>>> + - Bjorn Helgaas <bhelgaas@google.com> >>> >>> Bjorn is not correct. Generally we want a person, not a company list. >> >> I'm adding back James, can I keep the patches at 2nd place? > > Yes. > >>>> + cirrus,vpbr-thld: >>>> + description: Initial VPBR threshold voltage >>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>> + >>>> + cirrus,vpbr-atk-rate: >>>> + description: Attenuation attack step rate >>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>> + >>>> + cirrus,vpbr-atk-vol: >>>> + description: VP brownout prevention step size >>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>> + >>>> + cirrus,vpbr-max-attn: >>>> + description: Maximum attenuation during VP brownout prevention >>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>> + >>>> + cirrus,vpbr-wait: >>>> + description: Delay between brownout clearance and attenuation release >>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>> + >>>> + cirrus,vpbr-rel-rate: >>>> + description: Attenuation release step rate >>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>> + >>>> + cirrus,vpbr-mute-en: >>>> + description: Mute audio if maximum attenuation reached >>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>> >>> Constraints on any of these? >> >> Code just applies whatever is thrown at it, maybe David knows more? >> >> #nodatasheet (but would be lovely to have one) > > Unless the driver just takes these values and shoves them straight into > a 32-bit register, the driver should give some clue about the size or > possible values. Okay, that's me being too lazy. Fair enough, I'll fill the constraints :) Thanks David > > Rob -- David Heidelberg ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-06-24 20:05 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-06-24 16:02 [PATCH v2] ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema David Heidelberg via B4 Relay 2026-06-24 16:07 ` sashiko-bot 2026-06-24 16:41 ` Mark Brown 2026-06-24 17:30 ` Rob Herring (Arm) 2026-06-24 18:17 ` Rob Herring 2026-06-24 18:39 ` David Heidelberg 2026-06-24 19:45 ` Rob Herring 2026-06-24 20:04 ` David Heidelberg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox