Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1827364rbb; Tue, 27 Feb 2024 02:23:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWnqRZ4D9I9h1fPCwO7HAer72cruDX1pnYtAbYeH+/W5W7IhouB5SPa6Jo3/gt4BfUDtxUmDvn5tfFJ3exvSp/f+/9XiEdJhZhLfBQKCw== X-Google-Smtp-Source: AGHT+IHhETVb+fl8jce6ds+ILtjrJt6nXwfQF8WxnehbODCWVzElFJJmvQ5LCf6vzr8FtUetjpBx X-Received: by 2002:a05:6a21:3a87:b0:1a0:cc37:f850 with SMTP id zv7-20020a056a213a8700b001a0cc37f850mr2065887pzb.36.1709029436775; Tue, 27 Feb 2024 02:23:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709029436; cv=pass; d=google.com; s=arc-20160816; b=fUqc+9NgeWB8UsNnYOdP3l6EAKtP7M9AGUGYT6u7J+wHGYLJ5LsF0zG8vea+YcZguc HRWJJYubPr9JHd/VWvx6AaXiaPy+UHS43VLbHf7B3OeGFhTVhIxlAIkMtnwv5CfmWyMA OESdbKmwlfVTUQdhCytNb5Ysskwr7UciYR2cmWB+SPsgnvZ//Qbl8g74fSIYB1ruiW7M 19gpP2lUX0LuCnNbJSxPMVjd55xv6ubfll97+iCWco9jiAWuHTavSe5I6IFqYzbqdt/N HcqkmoAH4zLcyOqSE4jIgyHR2Anj8s3aiZp2haijVYt+Iz6yID9MeRpoj7Kk3UJ1xMKU oPLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=wRDnUl47SBcmf8gVz+t2ubWEYD6TUCpoZIdH8z+nNoU=; fh=thvf88CYvMQgOKGepbQ2zh/jTCrqL1kH6i5bIOIvm3k=; b=OV4La82t/K3bHCugwez4ikW2ZsBmNKcG3lnTZu50EREZPj76XN93BNjIbQzGuP7jZK Yu/QLhfjb/rVRkXJy1slLQUIHLOd6iEubKXm3fht7g09E0ConaNGrW9SSYncufzKyw9N NCgH+w1RJah7ZnY7tWapBDE0iE/dvhsE33Z4CMnbeQ03Y74Dp574jlGoAjuXAOY3kcEc oxUeugfYBYctKM4QXRMULO7z2qxqTUIUKnO34DqFtH3dyxlUq7nqjnQygTmCLXgTX4PQ 9vx01BBlETiLBISA9xgeQuE21FLfRUuAT9ABFjoCeRX2MoYFO9X7iX+2miIQxRKsMMJq GWhg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=Qt3Mvm6X; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-83025-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83025-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id ok12-20020a17090b1d4c00b0029ab976ea0bsi3646428pjb.148.2024.02.27.02.23.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 02:23:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83025-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=Qt3Mvm6X; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-83025-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83025-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 742C228E6E2 for ; Tue, 27 Feb 2024 10:23:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D8AD1386AD; Tue, 27 Feb 2024 10:23:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="Qt3Mvm6X" Received: from mail-il1-f176.google.com (mail-il1-f176.google.com [209.85.166.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 23DA8138498 for ; Tue, 27 Feb 2024 10:23:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709029417; cv=none; b=sSoI91vt+Vqgk4o2wgt+WLM/Pw19Pw8JkQbB0cKNCNuIlsQBbygcxkO0oRXXOy/dH2GBH398oiMIPalOv22MNPMltchnNDd6ynAY8OSuybdf+GIJUqD0ZH7mHEhOb7AQWolmxhByDiebx9aupCiBgekZGCgV7uFzJ5BLe+fcHPA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709029417; c=relaxed/simple; bh=5u+d29M3CDX3NbLVvd9IU8TbBtjbvakMQDSEITp/s8w=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=dMpT+5GEjOqLxQbf8XAtXkCW1VklpO+bECLAAtQyI4bJ3r8B1HRCVLdTIbEYGvSuVftpUc2eyVJGjjmxlAEaTFT4jGp0jTo+dUhrFGGWIu5vZ6FKBFZMmu4WkKD3EMXydaCe8LCsf+2S8rSEjTnjLP3lZ5v1Sbu/zo08plhoySQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=Qt3Mvm6X; arc=none smtp.client-ip=209.85.166.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Received: by mail-il1-f176.google.com with SMTP id e9e14a558f8ab-3657c437835so7666815ab.2 for ; Tue, 27 Feb 2024 02:23:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1709029414; x=1709634214; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=wRDnUl47SBcmf8gVz+t2ubWEYD6TUCpoZIdH8z+nNoU=; b=Qt3Mvm6X4sSgNwsf+HUsxufJ4dYMHtUASZzeTM9O7nXQ14f2hmWORYXN/63OihxAua Ew8xXWn4+iR8ESMNw2X9j5C1r4QR5XynpNe740qIjOtJc5HjcRzqDNRkY8ACnjRAQW4p AEcgo57K4CCal/VbCwgAFnE40aA8G3pfkMwjnIJdvnqgi3H1Hqwcmm3Dzd4TuqpLuarh K1YFjDOdaIi5LIMizyBz1PH/Yz95xbxsGdLqNa8u536ZO9/mAGZ4mrL+B1vOluv/U0yj c4X3typK/rF6Sq2l3XlNOXZ1zMzguzFyxgo/7q/klm2obm0KF6ziBbRfbMNb8tbk/Xoy HT/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709029414; x=1709634214; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wRDnUl47SBcmf8gVz+t2ubWEYD6TUCpoZIdH8z+nNoU=; b=rFlv4o5tiNhz28zma9N98Y5iPSXcfHVwgDGokbpYydTeCxIjpetHY9FYak2t0FWYxo 9h7mPnLZ+843s3bfinc93tvAgQaih+pTh25gtTxg0ibQmCLDWvZ4mis0ZVU3M38OSk3m Kb64+NRulQP4+X/z0CQs6P0WS7CkuCmk5/gDaYDeC+e5S74ttdXrPxgU2AuHvtg2u5E0 X/Y3WpzGSGpPfyDyHGP4A1oMEq75m32woYIM4wEf/5gvIzYUCmEi8fe3vE10LzWTYjPO 9NipLujF/D5ICDwCtUivW0EiS/9QX0aICGheEA6yB+osY0JDZmAcPGZ18j8JS0+r178o DHuQ== X-Forwarded-Encrypted: i=1; AJvYcCW8Sl5oqx2OAvetfhloZzSPfXTByEd69e/f1FyJOH0iTWj3mfQgc1H7Kc73RJnBhA1bshe6rF3zKbKtMPXQ47sU3pFihjOdfepJQx52 X-Gm-Message-State: AOJu0YyzpdQ11//GLxpb/VpvmX9izvTxXfXJmNHguOpZrVROURvC2viL 7ASSe4vgnzROOu+AjYvdZ//nlfcyvFQroPe0Zj0gdkDj8ngaqePtQeaxmyDtgec= X-Received: by 2002:a05:6e02:e10:b0:365:1b7c:670 with SMTP id a16-20020a056e020e1000b003651b7c0670mr7885060ilk.8.1709029414201; Tue, 27 Feb 2024 02:23:34 -0800 (PST) Received: from [192.168.1.172] ([93.5.22.158]) by smtp.gmail.com with ESMTPSA id p6-20020a92c606000000b003642dacafa5sm2063105ilm.29.2024.02.27.02.23.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Feb 2024 02:23:33 -0800 (PST) Message-ID: <92b9e9ac-6265-4611-888d-ba74bb871be5@baylibre.com> Date: Tue, 27 Feb 2024 11:23:26 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 02/18] ASoC: dt-bindings: mediatek,mt8365-mt6357: Add audio sound card document Content-Language: en-US To: AngeloGioacchino Del Regno , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , Lee Jones , Flora Fu , Jaroslav Kysela , Takashi Iwai , Sumit Semwal , =?UTF-8?Q?Christian_K=C3=B6nig?= , Catalin Marinas , Will Deacon Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org References: <20240226-audio-i350-v1-0-4fa1cea1667f@baylibre.com> <20240226-audio-i350-v1-2-4fa1cea1667f@baylibre.com> From: Alexandre Mergnat In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 26/02/2024 16:30, AngeloGioacchino Del Regno wrote: > Il 26/02/24 15:01, Alexandre Mergnat ha scritto: >> Add soundcard bindings for the MT8365 SoC with the MT6357 audio codec. >> >> Signed-off-by: Alexandre Mergnat >> --- >>   .../bindings/sound/mediatek,mt8365-mt6357.yaml     | 127 >> +++++++++++++++++++++ >>   1 file changed, 127 insertions(+) >> >> diff --git >> a/Documentation/devicetree/bindings/sound/mediatek,mt8365-mt6357.yaml >> b/Documentation/devicetree/bindings/sound/mediatek,mt8365-mt6357.yaml >> new file mode 100644 >> index 000000000000..f469611ec6b6 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/sound/mediatek,mt8365-mt6357.yaml >> @@ -0,0 +1,127 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/sound/mediatek,mt8365-mt6357.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Mediatek MT8365 sound card with MT6357 sound codec. >> + >> +maintainers: >> +  - Alexandre Mergnat >> + >> +description: >> +  This binding describes the MT8365 sound card. >> + >> +properties: >> +  compatible: >> +    const: mediatek,mt8365-mt6357 >> + >> +  mediatek,hp-pull-down: >> +    description: >> +      Earphone driver positive output stage short to the >> +      audio reference ground. >> +      Default value is false. >> +    type: boolean >> + >> +  mediatek,micbias0-microvolt: >> +    description: | > > description: Selects MIC Bias 0 output voltage > >> +      Selects MIC Bias 0 output voltage. >> +      [1.7v, 1.8v, 1.9v, 2.0v, 2.1v, 2.5v, 2.6v, 2.7v] >> +    enum: [0, 1, 2, 3, 4, 5, 6, 7] > > No, you don't say 0 1 2 3 4 to a property that says "microvolt", that's > simply > wrong. > > mediatek,micbias0-microvolt = <2100000>; > > ...so you want a binding that says > enum: [ 1700000, 1800000, this, that, 2700000] > Is it correct if I put "description: Selects MIC Bias 0 output voltage index" ? >> + >> +  mediatek,micbias1-microvolt: >> +    description: | >> +      Selects MIC Bias 1 output voltage. >> +      [1.7v, 1.8v, 1.9v, 2.0v, 2.1v, 2.5v, 2.6v, 2.7v] >> +    enum: [0, 1, 2, 3, 4, 5, 6, 7] > > same here. > >> + >> +  mediatek,platform: >> +    $ref: /schemas/types.yaml#/definitions/phandle >> +    description: The phandle of MT8365 ASoC platform. >> + >> +  pinctrl-names: >> +    minItems: 1 >> +    items: >> +      - const: aud_default >> +      - const: aud_dmic >> +      - const: aud_miso_off >> +      - const: aud_miso_on >> +      - const: aud_mosi_off >> +      - const: aud_mosi_on >> + >> +  vaud28-supply: >> +    description: >> +      2.8 volt supply for the audio codec >> + >> +patternProperties: >> +  "^dai-link-[0-9]+$": >> +    type: object >> +    description: >> +      Container for dai-link level properties and CODEC sub-nodes. >> + >> +    properties: >> +      codec: >> +        type: object >> +        description: Holds subnode which indicates codec dai. >> + >> +        properties: >> +          sound-dai: >> +            maxItems: 1 >> +            description: phandle of the codec DAI >> + >> +        additionalProperties: false >> + >> +      link-name: >> +        description: >> +          This property corresponds to the name of the BE dai-link to >> which >> +          we are going to update parameters in this node. >> +        items: >> +          const: 2ND I2S BE >> + >> +      sound-dai: >> +        maxItems: 1 >> +        description: phandle of the CPU DAI >> + >> +    additionalProperties: false >> + >> +    required: >> +      - link-name >> +      - sound-dai >> + >> +additionalProperties: false >> + >> +required: >> +  - compatible >> +  - mediatek,platform >> +  - pinctrl-names >> +  - vaud28-supply >> + >> +examples: >> +  - | >> +    sound { >> +        compatible = "mediatek,mt8365-mt6357"; >> +        mediatek,platform = <&afe>; > > Please: > > https://docs.kernel.org/devicetree/bindings/dts-coding-style.html Is it about the wrong pinctrl-names tab alignment ? Also, 2ND I2S BE => 2ND_I2S_BE ? Otherwise, I don't get it sorry. > > Regards, > Angelo > >> +        pinctrl-names = "aud_default", >> +            "aud_dmic", >> +            "aud_miso_off", >> +            "aud_miso_on", >> +            "aud_mosi_off", >> +            "aud_mosi_on"; >> +        pinctrl-0 = <&aud_default_pins>; >> +        pinctrl-1 = <&aud_dmic_pins>; >> +        pinctrl-2 = <&aud_miso_off_pins>; >> +        pinctrl-3 = <&aud_miso_on_pins>; >> +        pinctrl-4 = <&aud_mosi_off_pins>; >> +        pinctrl-5 = <&aud_mosi_on_pins>; >> +        vaud28-supply = <&mt6357_vaud28_reg>; >> + >> +        /* hdmi interface */ >> +        dai-link-0 { >> +            sound-dai = <&afe>; >> +            link-name = "2ND I2S BE"; >> + >> +            codec { >> +                sound-dai = <&it66121hdmitx>; >> +            }; >> +        }; >> +    }; >> > -- Regards, Alexandre