ASoC: dt-bindings: nau8824: Convert to dtschema
Subsystems (2)
PATCH 1/1 ASoC: dt-bindings: nau8824: Convert to dtschema
Convert the NAU8824 audio CODEC bindings to DT schema.
--- .../devicetree/bindings/sound/nau8824.txt | 88 --------- .../bindings/sound/nuvoton,nau8824.yaml | 182 ++++++++++++++++++ 2 files changed, 182 insertions(+), 88 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/nau8824.txt create mode 100644 Documentation/devicetree/bindings/sound/nuvoton,nau8824.yaml
Documentation/devicetree/bindings/sound/nau8824.txt deleted +0 -88
@@ -1,88 +0,0 @@ -Nuvoton NAU8824 audio codec - -This device supports I2C only. - -Required properties: - - compatible : Must be "nuvoton,nau8824" - - - reg : the I2C address of the device. This is either 0x1a (CSB=0) or 0x1b (CSB=1). - -Optional properties: - - nuvoton,jkdet-polarity: JKDET pin polarity. 0 - active high, 1 - active low. - - - nuvoton,vref-impedance: VREF Impedance selection - 0 - Open - 1 - 25 kOhm - 2 - 125 kOhm - 3 - 2.5 kOhm - - - nuvoton,micbias-voltage: Micbias voltage level. - 0 - VDDA - 1 - VDDA - 2 - VDDA * 1.1 - 3 - VDDA * 1.2 - 4 - VDDA * 1.3 - 5 - VDDA * 1.4 - 6 - VDDA * 1.53 - 7 - VDDA * 1.53 - - - nuvoton,sar-threshold-num: Number of buttons supported - - nuvoton,sar-threshold: Impedance threshold for each button. Array that contains up to 8 buttons configuration. SAR value is calculated as - SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R) - where MICBIAS is configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by 'nuvoton,sar-voltage', R - button impedance. - Refer datasheet section 10.2 for more information about threshold calculation. - - - nuvoton,sar-hysteresis: Button impedance measurement hysteresis. - - - nuvoton,sar-voltage: Reference voltage for button impedance measurement. - 0 - VDDA - 1 - VDDA - 2 - VDDA * 1.1 - 3 - VDDA * 1.2 - 4 - VDDA * 1.3 - 5 - VDDA * 1.4 - 6 - VDDA * 1.53 - 7 - VDDA * 1.53 - - - nuvoton,sar-compare-time: SAR compare time - 0 - 500 ns - 1 - 1 us - 2 - 2 us - 3 - 4 us - - - nuvoton,sar-sampling-time: SAR sampling time - 0 - 2 us - 1 - 4 us - 2 - 8 us - 3 - 16 us - - - nuvoton,short-key-debounce: Button short key press debounce time. - 0 - 30 ms - 1 - 50 ms - 2 - 100 ms - - - nuvoton,jack-eject-debounce: Jack ejection debounce time. - 0 - 0 ms - 1 - 1 ms - 2 - 10 ms - - -Example: - - headset: nau8824@1a { - compatible = "nuvoton,nau8824"; - reg = <0x1a>; - interrupt-parent = <&gpio>; - interrupts = <TEGRA_GPIO(E, 6) IRQ_TYPE_LEVEL_LOW>; - nuvoton,vref-impedance = <2>; - nuvoton,micbias-voltage = <6>; - // Setup 4 buttons impedance according to Android specification - nuvoton,sar-threshold-num = <4>; - nuvoton,sar-threshold = <0xc 0x1e 0x38 0x60>; - nuvoton,sar-hysteresis = <0>; - nuvoton,sar-voltage = <6>; - nuvoton,sar-compare-time = <1>; - nuvoton,sar-sampling-time = <1>; - nuvoton,short-key-debounce = <0>; - nuvoton,jack-eject-debounce = <1>; - };
Documentation/devicetree/bindings/sound/nuvoton,nau8824.yaml new file +182 -0
182 lines not on this page · raw message
Signature · 1 line
2.25.1
Quoted 4 lines · David Lin
Convert the NAU8824 audio CODEC bindings to DT schema.
Signed-off-by David Lin <[email protected]>---
Thank you for your patch. There is something to discuss/improve.
Quoted 11 lines
Documentation/devicetree/bindings/sound/nuvoton,nau8824.yaml new file +11
-0+ + nuvoton,sar-threshold-num: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Number of buttons supported. + minimum: 1 + maximum: 4 + default: 4 + + nuvoton,sar-threshold: + $ref: /schemas/types.yaml#/definitions/uint32-array
Documentation/devicetree/bindings/sound/nuvoton,nau8824.yaml line 83
Quoted 10 lines
Documentation/devicetree/bindings/sound/nuvoton,nau8824.yaml new file +10
-0+ description: + Impedance threshold for each button. Array that contains up to 8 buttons + configuration. SAR value is calculated as + SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R) where MICBIAS is + configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by + 'nuvoton,sar-voltage', R - button impedance. + Refer datasheet section 10.2 for more information about threshold + calculation. + minItems: 1 + maxItems: 4
Your description mentions 8 buttons, so maybe it should be 8 here? Or description needs a fix?
Documentation/devicetree/bindings/sound/nuvoton,nau8824.yaml line 92
Quoted 9 lines
Documentation/devicetree/bindings/sound/nuvoton,nau8824.yaml new file +9
-0+ items: + minimum: 0 + maximum: 255 + + nuvoton,sar-hysteresis: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Button impedance measurement hysteresis. + default: 0
Best regards,
Krzysztof
Quoted 22 lines · Krzysztof Kozlowski
Quoted 4 lines · David Lin
Convert the NAU8824 audio CODEC bindings to DT schema.
Signed-off-by David Lin <[email protected]>---
Thank you for your patch. There is something to discuss/improve.
Quoted 15 lines
Documentation/devicetree/bindings/sound/nuvoton,nau8824.yaml new file +15
-0+ + nuvoton,sar-threshold-num: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Number of buttons supported. + minimum: 1 + maximum: 4 + default: 4 + + nuvoton,sar-threshold: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: + Impedance threshold for each button. Array that contains up to 8 buttons + configuration. SAR value is calculated as + SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R) where MICBIAS is
Quoted 8 lines
Documentation/devicetree/bindings/sound/nuvoton,nau8824.yaml line 83
Quoted 6 lines
Documentation/devicetree/bindings/sound/nuvoton,nau8824.yaml new file +6
-0+ configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by + 'nuvoton,sar-voltage', R - button impedance. + Refer datasheet section 10.2 for more information about threshold + calculation. + minItems: 1 + maxItems: 4Your description mentions 8 buttons, so maybe it should be 8 here? Or description needs a fix?
Driver just handle maxima 4 buttons for general application, but the the above description is truly hardware capability with 8 buttons support.
Quoted 11 lines
Documentation/devicetree/bindings/sound/nuvoton,nau8824.yaml line 92
Quoted 9 lines
Documentation/devicetree/bindings/sound/nuvoton,nau8824.yaml new file +9
-0+ items: + minimum: 0 + maximum: 255 + + nuvoton,sar-hysteresis: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Button impedance measurement hysteresis. + default: 0
Quoted 3 lines
Best regards,
Krzysztof
________________________________
________________________________
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.
Quoted 31 lines · On 15/05/2023 04:47, AS50 CTLin0 wrote:
Quoted 22 lines · Krzysztof Kozlowski
Quoted 4 lines · David Lin
Convert the NAU8824 audio CODEC bindings to DT schema.
Signed-off-by David Lin <[email protected]>---
Thank you for your patch. There is something to discuss/improve.
Quoted 15 lines
Documentation/devicetree/bindings/sound/nuvoton,nau8824.yaml new file +15
-0+ + nuvoton,sar-threshold-num: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Number of buttons supported. + minimum: 1 + maximum: 4 + default: 4 + + nuvoton,sar-threshold: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: + Impedance threshold for each button. Array that contains up to 8 buttons + configuration. SAR value is calculated as + SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R) where MICBIAS isQuoted 8 lines
Documentation/devicetree/bindings/sound/nuvoton,nau8824.yaml line 83
Quoted 6 lines
Documentation/devicetree/bindings/sound/nuvoton,nau8824.yaml new file +6
-0+ configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by + 'nuvoton,sar-voltage', R - button impedance. + Refer datasheet section 10.2 for more information about threshold + calculation. + minItems: 1 + maxItems: 4Your description mentions 8 buttons, so maybe it should be 8 here? Or description needs a fix?
Quoted 2 lines
Driver just handle maxima 4 buttons for general application, but the the above description is truly hardware capability with 8 buttons support.
Then it should be 8.
Best regards,
Krzysztof
Quoted 32 lines · Krzysztof Kozlowski
Quoted 31 lines · On 15/05/2023 04:47, AS50 CTLin0 wrote:
Quoted 30 lines · Krzysztof Kozlowski
Quoted 4 lines · David Lin
Convert the NAU8824 audio CODEC bindings to DT schema.
Signed-off-by David Lin <[email protected]>---
Thank you for your patch. There is something to discuss/improve.
Quoted 11 lines
Documentation/devicetree/bindings/sound/nuvoton,nau8824.yaml new file +11
-0+ + nuvoton,sar-threshold-num: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Number of buttons supported. + minimum: 1 + maximum: 4 + default: 4 + + nuvoton,sar-threshold: + $ref: /schemas/types.yaml#/definitions/uint32-arrayDocumentation/devicetree/bindings/sound/nuvoton,nau8824.yaml line 83
Quoted 10 lines
Documentation/devicetree/bindings/sound/nuvoton,nau8824.yaml new file +10
-0+ description: + Impedance threshold for each button. Array that contains up to 8 buttons + configuration. SAR value is calculated as + SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R) where MICBIAS is + configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by + 'nuvoton,sar-voltage', R - button impedance. + Refer datasheet section 10.2 for more information about threshold + calculation. + minItems: 1 + maxItems: 4Your description mentions 8 buttons, so maybe it should be 8 here? Or description needs a fix?
Quoted 6 lines
Quoted 2 lines
Driver just handle maxima 4 buttons for general application, but the the above description is truly hardware capability with 8 buttons support.
Then it should be 8.
Best regards,
Krzysztof
Thanks. I will revise it in v2 patch.
Quoted 1 line
________________________________
________________________________
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.