From: Krzysztof Kozlowski <krzk@kernel.org>
To: Francesco Dolcini <francesco@dolcini.it>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Saravana Kannan <saravanak@google.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
patches@opensource.cirrus.com,
Ernest Van Hoecke <ernest.vanhoecke@toradex.com>,
linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Francesco Dolcini <francesco.dolcini@toradex.com>,
Charles Keepax <ckeepax@opensource.cirrus.com>
Subject: Re: [PATCH v2 3/5] ASoC: dt-bindings: wm8904: Add DMIC, GPIO, MIC and EQ support
Date: Tue, 25 Feb 2025 09:41:17 +0100 [thread overview]
Message-ID: <20250225-delicate-tortoise-of-management-e43fa2@krzk-bin> (raw)
In-Reply-To: <20250224155500.52462-4-francesco@dolcini.it>
On Mon, Feb 24, 2025 at 04:54:58PM +0100, Francesco Dolcini wrote:
> + wlf,drc-cfg-regs:
> + $ref: /schemas/types.yaml#/definitions/uint16-array
> + description:
> + Default register values for R40/41/42/43 (DRC).
> + The list must be 4 times the length of wlf,drc-cfg-names.
> + If absent, DRC is disabled.
> +
> + wlf,retune-mobile-cfg-names:
> + $ref: /schemas/types.yaml#/definitions/string-array
> + description:
> + List of strings for the available retune modes.
> + If absent, retune is disabled.
How is this retune supposed to be used? If by user-space I can easily
imagine that static DTS configuration won't be enough, because you need
to factor for example temperature or some other minor differences
between same boards.
> +
> + wlf,retune-mobile-cfg-rates:
> + $ref: /schemas/types.yaml#/definitions/uint32-array
Drop
> + description:
> + List of rates for the available retune modes.
Use standard property suffixes - hz or whatever is matching here.
> + The list must be the same length as wlf,retune-mobile-cfg-names.
> + If absent, retune is disabled.
> +
> + wlf,retune-mobile-cfg-regs:
> + $ref: /schemas/types.yaml#/definitions/uint16-array
> + description:
> + Default register values for R134/.../157 (EQ).
> + The list must be 24 times the length of wlf,retune-mobile-cfg-names.
> + If absent, retune is disabled.
> +
> +dependencies:
> + wlf,drc-cfg-names: [ 'wlf,drc-cfg-regs' ]
> + wlf,drc-cfg-regs: [ 'wlf,drc-cfg-names' ]
> +
> + wlf,retune-mobile-cfg-names: [ 'wlf,retune-mobile-cfg-rates', 'wlf,retune-mobile-cfg-regs' ]
> + wlf,retune-mobile-cfg-regs: [ 'wlf,retune-mobile-cfg-names', 'wlf,retune-mobile-cfg-rates' ]
> + wlf,retune-mobile-cfg-rates: [ 'wlf,retune-mobile-cfg-names', 'wlf,retune-mobile-cfg-regs' ]
> +
> required:
> - compatible
> - reg
> @@ -70,5 +138,43 @@ examples:
> DBVDD-supply = <®_1p8v>;
> DCVDD-supply = <®_1p8v>;
> MICVDD-supply = <®_1p8v>;
> +
> + wlf,drc-cfg-names = "default", "peaklimiter", "tradition", "soft", "music";
> + wlf,drc-cfg-regs =
> + /* coded default: KNEE_IP = KNEE_OP = 0, HI_COMP = LO_COMP = 1 */
Please follow DTS coding style - how you wrap, where to break lines.
> + /bits/ 16 <0x01af 0x3248 0x0000 0x0000>,
> + /* coded default: KNEE_IP = -24, KNEE_OP = -6, HI_COMP = 1/4, LO_COMP = 1 */
> + /bits/ 16 <0x04af 0x324b 0x0010 0x0408>,
> + /* coded default: KNEE_IP = -42, KNEE_OP = -3, HI_COMP = 0, LO_COMP = 1 */
> + /bits/ 16 <0x04af 0x324b 0x0028 0x0704>,
> + /* coded default: KNEE_IP = -45, KNEE_OP = -9, HI_COMP = 1/8, LO_COMP = 1 */
> + /bits/ 16 <0x04af 0x324b 0x0018 0x078c>,
> + /* coded default: KNEE_IP = -30, KNEE_OP = -10.5, HI_COMP = 1/4, LO_COMP = 1 */
> + /bits/ 16 <0x04af 0x324b 0x0010 0x050e>;
> +
> + wlf,gpio-cfg = <
There is almost never empty line after <
> + 0x0018 /* GPIO1 => DMIC_CLK */
> + 0xffff /* GPIO2 => don't touch */
> + 0xffff /* GPIO3 => don't touch */
> + 0xffff /* GPIO4 => don't touch */
Not mentioning this looks really incorrect or incomplete. No ending of
property.
> +
> + wlf,retune-mobile-cfg-names = "bassboost", "bassboost", "treble";
> + wlf,retune-mobile-cfg-rates = <48000 44100 48000>;
> + wlf,retune-mobile-cfg-regs =
> + /* bassboost: EQ_ENA = 1, +6 dB @ 100 Hz, +3 dB @ 300 Hz, 0 dB @ 875, 2400, 6900 Hz */
> + /bits/ 16 <0x1 0x12 0xf 0xc 0xc 0xc>,
> + /* default values for ReTune Mobile registers 140-157 */
> + /bits/ 16 <0x0fca 0x0400 0x00d8 0x1eb5 0xf145 0x0bd5 0x0075 0x1c58 0xf3d3 0x0a54 0x0568 0x168e 0xf829 0x07ad 0x1103 0x0564 0x0559 0x4000>,
See DTS coding style.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-02-25 8:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-24 15:54 [PATCH v2 0/5] ASoC: wm8904: Add DMIC and DRC support Francesco Dolcini
2025-02-24 15:54 ` [PATCH v2 1/5] of: Add of_property_read_u16_index Francesco Dolcini
2025-02-24 15:54 ` [PATCH v2 2/5] ASoC: wm8904: Don't touch GPIO configs set to 0xFFFF Francesco Dolcini
2025-02-24 15:54 ` [PATCH v2 3/5] ASoC: dt-bindings: wm8904: Add DMIC, GPIO, MIC and EQ support Francesco Dolcini
2025-02-24 17:19 ` Rob Herring (Arm)
2025-02-25 8:41 ` Krzysztof Kozlowski [this message]
2025-02-27 15:34 ` Ernest Van Hoecke
2025-03-05 6:45 ` Krzysztof Kozlowski
2025-03-05 9:52 ` Charles Keepax
2025-03-05 13:18 ` Mark Brown
2025-02-24 15:54 ` [PATCH v2 4/5] ASoC: wm8904: get platform data from DT Francesco Dolcini
2025-02-24 15:55 ` [PATCH v2 5/5] ASoC: wm8904: add DMIC support Francesco Dolcini
2025-03-04 13:56 ` Charles Keepax
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250225-delicate-tortoise-of-management-e43fa2@krzk-bin \
--to=krzk@kernel.org \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=ernest.vanhoecke@toradex.com \
--cc=francesco.dolcini@toradex.com \
--cc=francesco@dolcini.it \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=robh@kernel.org \
--cc=saravanak@google.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®