From patchwork Sun Feb 12 23:21:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 13137656 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C1643C636D3 for ; Sun, 12 Feb 2023 23:23:15 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id CCC3F20B; Mon, 13 Feb 2023 00:22:22 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CCC3F20B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1676244192; bh=C06VX05TcW1I4bOIHYFHLkWdSczpwmDHwYtqx/kD/0M=; h=From:To:Subject:Date:CC:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=o6BU/wGVSvYm4XJ2vOcxj+8SO6luFBXkUzXfPBOGYgIG2sLXR639gzaOY/BvD1EfY MLp7GCbKD9wtQtaZV+JfnuOcvyIQc2pK1OTbGtSrl+2aUfDGXRx7+Agz48FBl3wFgh 78+pYJstHLFkZgfCq+nRrIlkYCJkCAorgkhBtyTM= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C2370F804B0; Mon, 13 Feb 2023 00:21:57 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D8DC8F804B4; Mon, 13 Feb 2023 00:21:52 +0100 (CET) Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 6B408F8001E for ; Mon, 13 Feb 2023 00:21:42 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6B408F8001E Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=YxAW4UwT Received: by mail-wm1-x32e.google.com with SMTP id l37-20020a05600c1d2500b003dfe46a9801so7823769wms.0 for ; Sun, 12 Feb 2023 15:21:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ZxzNaW6I0fLNWCS9Oc9e/6gDL8buv4rI/3fG8NdUfZM=; b=YxAW4UwTezMfmdVo1Nl41KG8a4sWPOcryhtlVzJT6IDZQys7SAk5XgHXBH+Mg273iV 5+yYjnaZhL1+NWtm3/KlVHau/wjEB+F/cIi1/ORB/gOdnmu8BUgit3HH7BcoRHZj+FSa F4GdZsFS5+eFfZyTcLs9TK6Yw2kCdqKXz/sEH4cN7e0C2gMZb1fSqYB9usEghhjSkmuR QMLT8x1F+wp+hASXNroo9caQGZx+3xTYVNcTfMI4rbMq3iYS2pxrhtRi28FPTjmaQjFx zoX3OSAuAuSMmbCOINuwSGPWupzrpCKJjatfUV8fiD3PX3RgQ6vOzdcs1qjvBjmG1IHS kgHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZxzNaW6I0fLNWCS9Oc9e/6gDL8buv4rI/3fG8NdUfZM=; b=Qujn4cx5mSYeYsvNz+HhgEtucipepr2ptxkev/qhzMuBzf7aeXM6gyGPUab0gqs1H/ bAuJxUWHGCHf9t0bFMnRe30c03qGhVixt1T4/HU1raH99hMeNSbBjvpEGCM0i0CgLv5n UsK6zCLHGiO8PAjQjOXziiUF7/wMQUYAl6otmiZuUDSm/T3NahpSfVevGTwOS+ElDANv Mxr6ATWNqj3AT3YqGSRtGQgw25BOI99miyiM+/7f+O4iVm7PWRVgd2WGzYyhg7RUFTho Cz2QIkDeNgNirl/cglM73Dmt4ktkGXdWMIMxdGqFGu2yHYkqSnE//ViqG2FYZ1K/KWWt ln0g== X-Gm-Message-State: AO0yUKXT5NeTE28vkjT1G4y5FRpsDtYhZcZPc6iCKQTyjwFM3N4AtFS2 XhiYhDeeHiUvUuLKCZN1G1M= X-Google-Smtp-Source: AK7set8FeLsNAVdoImo2fwRuicgKBYl6QRDgEjD9OLjW+s7/9U/IdECxA+GDa3j7X7NsiZx3ZSGzXg== X-Received: by 2002:a05:600c:3086:b0:3dc:5c86:12f3 with SMTP id g6-20020a05600c308600b003dc5c8612f3mr21658640wmn.1.1676244101006; Sun, 12 Feb 2023 15:21:41 -0800 (PST) Received: from localhost ([2a02:1210:8629:800:82ee:73ff:feb8:99e3]) by smtp.gmail.com with UTF8SMTPSA id g20-20020a7bc4d4000000b003a3442f1229sm15417359wmk.29.2023.02.12.15.21.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Feb 2023 15:21:40 -0800 (PST) From: Alexander Sverdlin To: devicetree@vger.kernel.org Subject: [PATCH 1/2] dt-bindings: sound: ep93xx: Add I2S and AC'97 descriptions Date: Mon, 13 Feb 2023 00:21:36 +0100 Message-Id: <20230212232137.299005-1-alexander.sverdlin@gmail.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Message-ID-Hash: YZEFPIKLW33VPE7LO5EPL45A6KIDQOUU X-Message-ID-Hash: YZEFPIKLW33VPE7LO5EPL45A6KIDQOUU X-MailFrom: alexander.sverdlin@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Alexander Sverdlin , Hartley Sweeten , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add device tree bindings for Cirrus Logic EP93xx internal SoCs' I2S and AC'97 controllers. Signed-off-by: Alexander Sverdlin --- .../bindings/sound/cirrus,ep9301-ac97.yaml | 47 ++++++++++++++ .../bindings/sound/cirrus,ep9301-i2s.yaml | 63 +++++++++++++++++++ MAINTAINERS | 1 + 3 files changed, 111 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/cirrus,ep9301-ac97.yaml create mode 100644 Documentation/devicetree/bindings/sound/cirrus,ep9301-i2s.yaml diff --git a/Documentation/devicetree/bindings/sound/cirrus,ep9301-ac97.yaml b/Documentation/devicetree/bindings/sound/cirrus,ep9301-ac97.yaml new file mode 100644 index 000000000000..bfa5d392f525 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/cirrus,ep9301-ac97.yaml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/cirrus,ep9301-ac97.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cirrus EP93xx AC'97 Controller + +description: | + The AC’97 Controller includes a 5-pin serial interface to an external audio + codec. + +maintainers: + - Alexander Sverdlin + +properties: + compatible: + const: cirrus,ep9301-ac97 + + '#sound-dai-cells': + const: 0 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + +required: + - compatible + - '#sound-dai-cells' + - reg + - interrupts + +additionalProperties: false + +examples: + - | + ac97: ac97@80880000 { + compatible = "cirrus,ep9301-ac97"; + #sound-dai-cells = <0>; + reg = <0x80880000 0xac>; + interrupt-parent = <&vic0>; + interrupts = <6>; + }; + +... diff --git a/Documentation/devicetree/bindings/sound/cirrus,ep9301-i2s.yaml b/Documentation/devicetree/bindings/sound/cirrus,ep9301-i2s.yaml new file mode 100644 index 000000000000..b47d28dc8389 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/cirrus,ep9301-i2s.yaml @@ -0,0 +1,63 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/cirrus,ep9301-i2s.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cirrus EP93xx I2S Controller + +description: | + The I2S controller is used to stream serial audio data between the external + I2S CODECs’, ADCs/DACs, and the ARM Core. The controller supports I2S, Left- + and Right-Justified DSP formats. + +maintainers: + - Alexander Sverdlin + +properties: + compatible: + const: cirrus,ep9301-i2s + + '#sound-dai-cells': + const: 0 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + minItems: 3 + + clock-names: + items: + - const: mclk + - const: sclk + - const: lrclk + +required: + - compatible + - '#sound-dai-cells' + - reg + - interrupts + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + i2s: i2s@80820000 { + compatible = "cirrus,ep9301-i2s"; + #sound-dai-cells = <0>; + reg = <0x80820000 0x100>; + interrupt-parent = <&vic1>; + interrupts = <28>; + clocks = <&syscon 29 + &syscon 30 + &syscon 31>; + clock-names = "mclk", "sclk", "lrclk"; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index 254aab631fd4..765902756c37 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2092,6 +2092,7 @@ M: Alexander Sverdlin L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) S: Maintained F: Documentation/devicetree/bindings/iio/adc/cirrus,ep9301-adc.yaml +F: Documentation/devicetree/bindings/sound/cirrus,ep9301-* F: arch/arm/mach-ep93xx/ F: arch/arm/mach-ep93xx/include/mach/ F: drivers/iio/adc/ep93xx_adc.c From patchwork Sun Feb 12 23:21:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 13137657 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6099AC636D3 for ; Sun, 12 Feb 2023 23:23:41 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E4246839; Mon, 13 Feb 2023 00:22:48 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E4246839 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1676244219; bh=kGeLRXiDa7knz098hWBa2d+OHQJhxhdOFcYAKDs1eXo=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=j8uLHtleJgEnjPq5f/nKp/Ju/W7GVww+ohP7XRUF4opxYVKPDt/IobxFTnxLJAzFM fxiGePh/7qKegWG1MWdB8cHOioBOE/tgFt+2LDfYv1bPOLyXF251byTIWbRDNPY393 sS9Zg4tpiq22sfURxF1Xnzhi5D823a69yN6HaYRA= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 672BCF804D6; Mon, 13 Feb 2023 00:22:00 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7CCF6F804B0; Mon, 13 Feb 2023 00:21:55 +0100 (CET) Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3BFCFF8012A for ; Mon, 13 Feb 2023 00:21:43 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3BFCFF8012A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=d2gSMSWK Received: by mail-wr1-x42a.google.com with SMTP id r2so10465802wrv.7 for ; Sun, 12 Feb 2023 15:21:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=b/zdHwH2kmbWZySL0e/UmcJFCdqPH/8nI1Dh4bwAor4=; b=d2gSMSWKgND/nrlDKUGFXD0dubydZVkf3ZciHrhn1inExzjHq4ytLJ/jhLykgwq/nf xV+794A4YFe39C52lK/zWOMcAF0qh4mLg14ppqKQjl1f26zI5w9kkjQszSsJLwPxiGZ7 peM4ihF2n3y1tJPuQq5ZGi/Piy4av/2vvvZZGjkPdUpT6F1c+23rsspc88Zk/PXgKp+5 3JDQe23qsd16cQtKCoUlSqOxOKoGzWeax1qK0PXTMxgdZQQBRGvOG9sJVXaaX1cmemPg 3E2dkoPAZE6OlDx4CbnEYMD6Ht92G+imln8ekpBKGYOIvo1yOUXx1sFVK93tCm5D3ytU f1nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=b/zdHwH2kmbWZySL0e/UmcJFCdqPH/8nI1Dh4bwAor4=; b=xHejbr6bniixS5CpqFQOfMV6ifZmjf1MiYaa3+Gwpbo48p8SbSS+DTlf8uhPdPlybb /yZo0/n2mFk4knl0EBLxrAcqsSmZ1nKtMdxR1Gf9DOEX5+8NLxYTG7rAe2C+0Fol2LQl BZpKNzkJdseK/w/Q7XK9yeMAJJ8YdnkjYP6LGQ8W1+oY75uiHE51vZwShltnrC+cGA4g 6ReIbWmb+1Of5ZheNl58RK80SQ6izTjkiZjzvIuH42noNemfZFwaJEShpOCR9vzfgQdG TXheKcErqqJ8d9CIVWP/LP+qT+C5onCFVDkV0ztyaoJ0+eMtlVn4Yn8EuBj2vB84IgnQ sIdg== X-Gm-Message-State: AO0yUKXUwxHkdDctrrsycqxZZDaEh42M6q1xXHuTWUQLGwegb5WyPise pScei5gXpKrm3WyX2zCRjQo= X-Google-Smtp-Source: AK7set8OJKW9fiAW/UVEhR5z3lBBDIr+kE+QjnSfBHt2UipMTB4J6+ZDbyhynEQBj6z2qsLEAxvdVw== X-Received: by 2002:a5d:4bc7:0:b0:2c3:ee83:5195 with SMTP id l7-20020a5d4bc7000000b002c3ee835195mr22327804wrt.29.1676244102139; Sun, 12 Feb 2023 15:21:42 -0800 (PST) Received: from localhost ([2a02:1210:8629:800:82ee:73ff:feb8:99e3]) by smtp.gmail.com with UTF8SMTPSA id m9-20020adfe0c9000000b002c3d29d83d2sm9210624wri.63.2023.02.12.15.21.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Feb 2023 15:21:41 -0800 (PST) From: Alexander Sverdlin To: devicetree@vger.kernel.org Subject: [PATCH 2/2] ASoC: ep93xx: Add OF support Date: Mon, 13 Feb 2023 00:21:37 +0100 Message-Id: <20230212232137.299005-2-alexander.sverdlin@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230212232137.299005-1-alexander.sverdlin@gmail.com> References: <20230212232137.299005-1-alexander.sverdlin@gmail.com> MIME-Version: 1.0 Message-ID-Hash: J3H4PZBAI453QI3HDIXRHHUXADVBKEU7 X-Message-ID-Hash: J3H4PZBAI453QI3HDIXRHHUXADVBKEU7 X-MailFrom: alexander.sverdlin@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Alexander Sverdlin , Hartley Sweeten , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add the new cirrus,ep9301-ac97 and cirrus,ep9301-i2s compatibles. Signed-off-by: Alexander Sverdlin --- sound/soc/cirrus/ep93xx-ac97.c | 8 ++++++++ sound/soc/cirrus/ep93xx-i2s.c | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/sound/soc/cirrus/ep93xx-ac97.c b/sound/soc/cirrus/ep93xx-ac97.c index 37593abe6053..fd7f6b3a5317 100644 --- a/sound/soc/cirrus/ep93xx-ac97.c +++ b/sound/soc/cirrus/ep93xx-ac97.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -430,11 +431,18 @@ static int ep93xx_ac97_remove(struct platform_device *pdev) return 0; } +static const struct of_device_id ep93xx_ac97_of_ids[] = { + { .compatible = "cirrus,ep9301-ac97" }, + {} +}; +MODULE_DEVICE_TABLE(of, ep93xx_ac97_of_ids); + static struct platform_driver ep93xx_ac97_driver = { .probe = ep93xx_ac97_probe, .remove = ep93xx_ac97_remove, .driver = { .name = "ep93xx-ac97", + .of_match_table = ep93xx_ac97_of_ids, }, }; diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c index f41712df7994..3c6fa8e23c52 100644 --- a/sound/soc/cirrus/ep93xx-i2s.c +++ b/sound/soc/cirrus/ep93xx-i2s.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -505,11 +506,18 @@ static int ep93xx_i2s_remove(struct platform_device *pdev) return 0; } +static const struct of_device_id ep93xx_i2s_of_ids[] = { + { .compatible = "cirrus,ep9301-i2s" }, + {} +}; +MODULE_DEVICE_TABLE(of, ep93xx_i2s_of_ids); + static struct platform_driver ep93xx_i2s_driver = { .probe = ep93xx_i2s_probe, .remove = ep93xx_i2s_remove, .driver = { .name = "ep93xx-i2s", + .of_match_table = ep93xx_i2s_of_ids, }, };