From patchwork Wed Jun 22 06:47:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 583909 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9134BC43334 for ; Wed, 22 Jun 2022 06:48:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351041AbiFVGsr (ORCPT ); Wed, 22 Jun 2022 02:48:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350539AbiFVGsj (ORCPT ); Wed, 22 Jun 2022 02:48:39 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC91B35262; Tue, 21 Jun 2022 23:48:36 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id v1so32028471ejg.13; Tue, 21 Jun 2022 23:48:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=u1eiPXpTeoJ4YK94xfC/4guXF7vZMwFhVUYu4kxiL+k=; b=VkjSZU+ZIalRBcg/aY9otvwjSGkG2louwosC9Z+WhTggAKAhLVvFnMb0KoB2qHcTjY B8flVc+KaVrqbbt153meF3pQFHuk6BnzUnvMPdFDzVnO97+3OcLPM5ird6+oXmE2SF4B MfIDi1MJj6n5DUGRPMiQGJGyU7QW15JmEI5jhld3HM/sRkORe/9MHUok7oxoePxGP5Y2 KkihqCGzT/yc2rhIQaaCT5IxizmniMdASV7EZSOXM6VeY+nhkrK5X+A7L13kmX+O/jVx caAxD8GeETvoeM26zApSyBXcrMAAyWDzn8vvnJYJwyM999MPX5m4/CP5p0BNsi6lP5Fl okDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=u1eiPXpTeoJ4YK94xfC/4guXF7vZMwFhVUYu4kxiL+k=; b=av9Z7zWwXbCK/kGwNWpaELJjWH5xUTE0cw7p8Yj0A+z/V/wpTw8C1iyEpSQsgdrZAh aTjYpUjmxLE3D09RlJdpiriYhbIKUbw3IxDRJ5XtUoZXqVNt5L/jTPHrg/Lyfs8K1bgD H9epuF5iN6yjC1sg/WwKH0/5/uJgZky/x5wsUex4L2/J/ZqobvcIrDwDcGelaPMF8rTC aCV4fTD4SMs5RLwgxA5XmaNJVO1BLdYSU/MSYdteisccisaE5YMBD8aOz+q3rLZp0E7B PFFHPsf1V1RETBRtKdAOfLSI8yAsIE8fE0mgF+fMs0s/GaVmz8JGdDTcjsf3p5lMnQGJ Vpjw== X-Gm-Message-State: AJIora+Vmi9gFb8X6WQhjojzwzp2DVsUuO2H6GbSB+H87EL9UdYFk3Kw xpF2h+9PsfGbVGaio1Pp92c= X-Google-Smtp-Source: AGRyM1vA2jfPhbVXwp0p2yLq5X8upNLnqULE7yWgNJaNCX+6/OXo9Ji5EpptSNXb6UAFCZV2uzeHzg== X-Received: by 2002:a17:907:1c1a:b0:705:3158:ab07 with SMTP id nc26-20020a1709071c1a00b007053158ab07mr1660279ejc.767.1655880515522; Tue, 21 Jun 2022 23:48:35 -0700 (PDT) Received: from localhost.localdomain ([185.107.95.225]) by smtp.gmail.com with ESMTPSA id sd12-20020a1709076e0c00b00722e8c47cc9sm1197148ejc.181.2022.06.21.23.48.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jun 2022 23:48:33 -0700 (PDT) From: Yassine Oudjana X-Google-Original-From: Yassine Oudjana To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: Yassine Oudjana , Yassine Oudjana , devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, phone-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] ASoC: dt-bindings: Add bindings for WCD9335 DAIs Date: Wed, 22 Jun 2022 10:47:56 +0400 Message-Id: <20220622064758.40543-2-y.oudjana@protonmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220622064758.40543-1-y.oudjana@protonmail.com> References: <20220622064758.40543-1-y.oudjana@protonmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Yassine Oudjana Add bindings for the DAIs available in WCD9335 to avoid having to use unclear number indices in device trees. Signed-off-by: Yassine Oudjana --- MAINTAINERS | 1 + include/dt-bindings/sound/qcom,wcd9335.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 include/dt-bindings/sound/qcom,wcd9335.h diff --git a/MAINTAINERS b/MAINTAINERS index b774f21828f7..2bcc3cc129c5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16366,6 +16366,7 @@ M: Srinivas Kandagatla M: Banajit Goswami L: alsa-devel@alsa-project.org (moderated for non-subscribers) S: Supported +F: include/dt-bindings/sound/qcom,wcd9335.h F: sound/soc/codecs/lpass-va-macro.c F: sound/soc/codecs/lpass-wsa-macro.* F: sound/soc/codecs/msm8916-wcd-analog.c diff --git a/include/dt-bindings/sound/qcom,wcd9335.h b/include/dt-bindings/sound/qcom,wcd9335.h new file mode 100644 index 000000000000..709d33ca748d --- /dev/null +++ b/include/dt-bindings/sound/qcom,wcd9335.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ + +#ifndef __DT_QCOM_WCD9335_H +#define __DT_QCOM_WCD9335_H + +#define AIF1_PB 0 +#define AIF1_CAP 1 +#define AIF2_PB 2 +#define AIF2_CAP 3 +#define AIF3_PB 4 +#define AIF3_CAP 5 +#define AIF4_PB 6 +#define NUM_CODEC_DAIS 7 + +#endif From patchwork Wed Jun 22 06:47:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 583908 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 442FDCCA47A for ; Wed, 22 Jun 2022 06:48:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351354AbiFVGsw (ORCPT ); Wed, 22 Jun 2022 02:48:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351301AbiFVGsv (ORCPT ); Wed, 22 Jun 2022 02:48:51 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F59935A83; Tue, 21 Jun 2022 23:48:50 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id h23so32048155ejj.12; Tue, 21 Jun 2022 23:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GBoEfewX7uE5qiTFF5ceaeSxviE76/D0VbXLBnCtMOk=; b=EUth92aS+ARXNsUtB82Fn+0F0yahSJwW0aRp3pWoXXG95IKw1RArK9Ig7q3Rce1Ehw IB9YD315FvrufeFHauaTVDmyU561dpJJXVoxeP+YEOqYEB0GnwGjYYtO1LZlK0o6QfsS BWFYFQiQlRYg0TliVlsC5C5feb19tNjrrKtR8kj8DM6+fCRVWi11MZKCMVbP+keN1pSk Y1EH0SW0kUa5wZx/+ZvoXeYEPP577kv00tMCUDJ/q/mSmcBZtgAtalgDCO97V29+FF0L wIqsPe04Qtlfs5uOqGtzgmol7qNeUSdazWS2kf76TziOEgPdeiTWHQ3efBkkbD6pe2Jo fq3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GBoEfewX7uE5qiTFF5ceaeSxviE76/D0VbXLBnCtMOk=; b=wMpAhawFPNW0Vdq5mzXoLO3H6+bcWlRzhsQHAM/MSerW/lfrdAh327/f4b5EJr9o1U rss20o2TKsJovRRyhkNJh1GwfaZO3tIgdRJ5ttArdvxfkPPozKOKk7mnK1CjkR6h4xp6 9eUpqMmp0Jho38Sk1H4UzNToJJ58nw07+gFJ45PxoEyebsSWI7ixJdqSul44AkHLva3b OCkaougOXLz4hlP4aSs9TFhwwCnG1ZCIbUFY+t6OCrR72zXlBkA6r/z35tg//x0DWaQz 10cWARIzPsp3RTccztRMUo2tkA0jEDVeDNB7dkzu2voZwlQ4sffSDnX8koGnmwES4unx Jetg== X-Gm-Message-State: AJIora+SJVDS8Gs5YITqaYkFttRKiDHrPzgm3MCi5IOpyCg+H76n2Ltp 9P/wphD2OWvOF9y/6+P+KIo= X-Google-Smtp-Source: AGRyM1vWBsfxuaNlo0tjKP0/6jEDWmmlRypkx4HG/8dsYU+wsKOh1CtyzxerPhaniyY/3W5GIrXT8A== X-Received: by 2002:a17:906:6a27:b0:708:1282:cbe9 with SMTP id qw39-20020a1709066a2700b007081282cbe9mr1767404ejc.186.1655880528800; Tue, 21 Jun 2022 23:48:48 -0700 (PDT) Received: from localhost.localdomain ([185.107.95.225]) by smtp.gmail.com with ESMTPSA id sd12-20020a1709076e0c00b00722e8c47cc9sm1197148ejc.181.2022.06.21.23.48.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jun 2022 23:48:47 -0700 (PDT) From: Yassine Oudjana X-Google-Original-From: Yassine Oudjana To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: Yassine Oudjana , Yassine Oudjana , devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, phone-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] arm64: dts: qcom: Use WCD9335 DT bindings Date: Wed, 22 Jun 2022 10:47:58 +0400 Message-Id: <20220622064758.40543-4-y.oudjana@protonmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220622064758.40543-1-y.oudjana@protonmail.com> References: <20220622064758.40543-1-y.oudjana@protonmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Yassine Oudjana Replace DAI indices in codec nodes with definitions from the WCD9335 DT bindings for devices that use WCD9335. Signed-off-by: Yassine Oudjana --- arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 5 +++-- arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts | 5 +++-- arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts index 49afbb1a066a..ff915cd8e5a6 100644 --- a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts +++ b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts @@ -13,6 +13,7 @@ #include #include #include +#include /* * GPIO name legend: proper name = the GPIO line is used as GPIO @@ -1009,7 +1010,7 @@ platform { }; codec { - sound-dai = <&wcd9335 6>; + sound-dai = <&wcd9335 AIF4_PB>; }; }; @@ -1024,7 +1025,7 @@ platform { }; codec { - sound-dai = <&wcd9335 1>; + sound-dai = <&wcd9335 AIF1_CAP>; }; }; }; diff --git a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts index 22978d06f85b..261f2ea7def0 100644 --- a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts +++ b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts @@ -9,6 +9,7 @@ #include #include #include +#include / { model = "Xiaomi Mi 5"; @@ -193,7 +194,7 @@ platform { }; codec { - sound-dai = <&wcd9335 6>; + sound-dai = <&wcd9335 AIF4_PB>; }; }; @@ -208,7 +209,7 @@ platform { }; codec { - sound-dai = <&wcd9335 1>; + sound-dai = <&wcd9335 AIF1_CAP>; }; }; }; diff --git a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts index 1e2dd6763ad1..c9f935cfb587 100644 --- a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts +++ b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts @@ -9,6 +9,7 @@ #include "pmi8996.dtsi" #include #include +#include / { model = "Xiaomi Mi Note 2"; @@ -171,7 +172,7 @@ platform { }; codec { - sound-dai = <&wcd9335 6>; + sound-dai = <&wcd9335 AIF4_PB>; }; }; @@ -186,7 +187,7 @@ platform { }; codec { - sound-dai = <&wcd9335 1>; + sound-dai = <&wcd9335 AIF1_CAP>; }; }; };