devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Charles Keepax <ckeepax@opensource.cirrus.com>,
	broonie@kernel.org, lee@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, linus.walleij@linaro.org,
	vkoul@kernel.org
Cc: robh+dt@kernel.org, conor+dt@kernel.org, lgirdwood@gmail.com,
	yung-chuan.liao@linux.intel.com, sanyog.r.kale@intel.com,
	pierre-louis.bossart@linux.intel.com,
	alsa-devel@alsa-project.org, patches@opensource.cirrus.com,
	devicetree@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/6] dt-bindings: sound: cirrus,cs42l43: Add initial DT binding
Date: Wed, 31 May 2023 11:02:24 +0200	[thread overview]
Message-ID: <eef819db-4de3-06fe-8fe6-b0fe87ab5d84@linaro.org> (raw)
In-Reply-To: <20230530122112.1314458-3-ckeepax@opensource.cirrus.com>

On 30/05/2023 14:21, Charles Keepax wrote:
> The CS42L43 is an audio CODEC with integrated MIPI SoundWire interface
> (Version 1.2.1 compliant), I2C, SPI, and I2S/TDM interfaces designed
> for portable applications. It provides a high dynamic range, stereo
> DAC for headphone output, two integrated Class D amplifiers for
> loudspeakers, and two ADCs for wired headset microphone input or
> stereo line input. PDM inputs are provided for digital microphones.
> 
> Add a YAML DT binding document for this device.
> 
> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thank you for your patch. There is something to discuss/improve.


> +  clocks:
> +    items:
> +      - description: Synchronous audio clock provided on mclk_in.
> +
> +  clock-names:
> +    const: mclk
> +
> +  cirrus,bias-low:
> +    type: boolean
> +    description:
> +      Select a 1.8V headset micbias rather than 2.8V.
> +
> +  cirrus,bias-sense-ua:

"ua" looks like microamp. If so, microamp instead:
https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml

> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      Current at which the headset micbias sense clamp will engage, 0 to
> +      disable.
> +    enum: [ 0, 14, 23, 41, 50, 60, 68, 86, 95 ]
> +    default: 0
> +
> +  cirrus,bias-ramp-ms:
> +    description:
> +      Time in milliseconds the hardware allows for the headset micbias to
> +      ramp up.
> +    enum: [ 10, 40, 90, 170 ]
> +    default: 170
> +
> +  cirrus,detect-us:
> +    description:
> +      Time in microseconds the type detection will run for. Long values will
> +      cause more audible effects, but give more accurate detection.
> +    enum: [ 20, 100, 1000, 10000, 50000, 75000, 100000, 200000 ]
> +    default: 10000
> +
> +  cirrus,button-automute:
> +    type: boolean
> +    description:
> +      Enable the hardware automuting of decimator 1 when a headset button is
> +      pressed.
> +
> +  cirrus,buttons-ohms:
> +    description:
> +      Impedance in Ohms for each headset button, these should be listed in
> +      ascending order.
> +    minItems: 1
> +    maxItems: 6
> +
> +  cirrus,tip-debounce-ms:
> +    description:
> +      Software debounce on tip sense triggering in milliseconds.
> +    default: 0
> +
> +  cirrus,tip-invert:
> +    type: boolean
> +    description:
> +      Indicates tip detect polarity, inverted implies open-circuit whilst the
> +      jack is inserted.
> +
> +  cirrus,tip-disable-pullup:
> +    type: boolean
> +    description:
> +      Indicates if the internal pullup on the tip detect should be disabled.
> +
> +  cirrus,tip-fall-db-ms:
> +    description:
> +      Time in milliseconds a falling edge on the tip detect should be hardware
> +      debounced for. Note the falling edge is considered after the invert.
> +    enum: [ 0, 125, 250, 500, 750, 1000, 1250, 1500 ]
> +    default: 500
> +
> +  cirrus,tip-rise-db-ms:
> +    description:
> +      Time in milliseconds a rising edge on the tip detect should be hardware
> +      debounced for. Note the rising edge is considered after the invert.
> +    enum: [ 0, 125, 250, 500, 750, 1000, 1250, 1500 ]
> +    default: 500
> +
> +  cirrus,use-ring-sense:
> +    type: boolean
> +    description:
> +      Indicates if the ring sense should be used.
> +
> +  cirrus,ring-invert:
> +    type: boolean
> +    description:
> +      Indicates ring detect polarity, inverted implies open-circuit whilst the
> +      jack is inserted.
> +
> +  cirrus,ring-disable-pullup:
> +    type: boolean
> +    description:
> +      Indicates if the internal pullup on the ring detect should be disabled.
> +
> +  cirrus,ring-fall-db-ms:
> +    description:
> +      Time in milliseconds a falling edge on the ring detect should be hardware
> +      debounced for. Note the falling edge is considered after the invert.
> +    enum: [ 0, 125, 250, 500, 750, 1000, 1250, 1500 ]
> +    default: 500
> +
> +  cirrus,ring-rise-db-ms:
> +    description:
> +      Time in milliseconds a rising edge on the ring detect should be hardware
> +      debounced for. Note the rising edge is considered after the invert.
> +    enum: [ 0, 125, 250, 500, 750, 1000, 1250, 1500 ]
> +    default: 500
> +
> +  pinctrl:
> +    type: object
> +
> +    allOf:

Drop allOf, just "$ref: ......"

> +      - $ref: /schemas/pinctrl/pinctrl.yaml#
> +
> +    additionalProperties: false

Also drop blank lines between these three above.

> +
> +    properties:
> +      gpio-controller: true
> +
> +      '#gpio-cells':
> +        const: 2
> +
> +      gpio-ranges:
> +        items:
> +          - description: A phandle to the CODEC pinctrl node
> +            minimum: 0
> +          - const: 0
> +          - const: 0
> +          - const: 3
> +
> +    patternProperties:
> +      "-state$":

Use consistent quotes, either " or ' everywhere

> +        oneOf:
> +          - $ref: "#/$defs/cirrus-cs42l43-state"
> +          - patternProperties:
> +              "-pins$":
> +                $ref: "#/$defs/cirrus-cs42l43-state"
> +            additionalProperties: false
> +
> +  spi:
> +    type: object
> +
> +    allOf:
> +      - $ref: /schemas/spi/spi-controller.yaml#
> +
> +    unevaluatedProperties: false

Same comments here.

> +
> +$defs:
> +  cirrus-cs42l43-state:
> +    type: object
> +



Best regards,
Krzysztof


  parent reply	other threads:[~2023-05-31  9:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30 12:21 [PATCH v2 0/6] Add cs42l43 PC focused SoundWire CODEC Charles Keepax
2023-05-30 12:21 ` [PATCH v2 1/6] soundwire: bus: Allow SoundWire peripherals to register IRQ handlers Charles Keepax
2023-05-30 12:21 ` [PATCH v2 2/6] dt-bindings: sound: cirrus,cs42l43: Add initial DT binding Charles Keepax
2023-05-31  8:50   ` Charles Keepax
2023-05-31  9:02   ` Krzysztof Kozlowski [this message]
2023-05-31 14:12     ` Charles Keepax
2023-05-30 12:21 ` [PATCH v2 3/6] mfd: cs42l43: Add support for cs42l43 core driver Charles Keepax
2023-05-30 12:21 ` [PATCH v2 4/6] pinctrl: cs42l43: Add support for the cs42l43 Charles Keepax
2023-06-01 11:22   ` Linus Walleij
2023-05-30 12:21 ` [PATCH v2 5/6] spi: cs42l43: Add SPI controller support Charles Keepax
2023-05-30 21:30   ` Mark Brown
2023-05-31  8:34     ` Charles Keepax
2023-05-31  5:26   ` Mahapatra, Amit Kumar
2023-05-31  8:44     ` Charles Keepax
2023-05-30 12:21 ` [PATCH v2 6/6] ASoC: cs42l43: Add support for the cs42l43 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=eef819db-4de3-06fe-8fe6-b0fe87ab5d84@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lee@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=robh+dt@kernel.org \
    --cc=sanyog.r.kale@intel.com \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.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;
as well as URLs for NNTP newsgroup(s).