From patchwork Fri Oct 16 17:35:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 11842179 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8177EC433E7 for ; Fri, 16 Oct 2020 17:38:01 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E67B9204EA for ; Fri, 16 Oct 2020 17:38:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="2DOWcx3T"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="GqfLhYq5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E67B9204EA Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=o66Tow4uAGuVEiBg/3OSb0bhV2SM7SsVoMyHc909sWY=; b=2DOWcx3T1Ak6sPKz5OCaIdbANy K9SPJSlcOaJL2Z+UcgyxDdSD2RXZy6aaMFd42yeR22e7lR8quXkJjq57xbCT6bKjwrtonvByWyAYa s2oescPQEkGhr32vwgs6Id3OBXzCOV1A4uwGL7e55gyQptTC9Kp5lBABb8Vd3i2uXhqsKIEMw5MdS mPX4xfeKuxxZi8BTin+tP/sIGdb2EN4AhAF0/UQSP3aq9BKaXT9e5TrBowke1qpMnVR5Xq1sUNZ+v UxC4pWL4VcQ93Y7W6NLR/c1APp0itV/w0Bqlkh+tC7Kfc5a3ODqUFgeI8OVwW7vbSsTwTGOZSVzUm TgyaLPKQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kTTeF-0000Ql-PG; Fri, 16 Oct 2020 17:36:11 +0000 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25] helo=mx0b-001ae601.pphosted.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kTTdz-0000Lx-5u; Fri, 16 Oct 2020 17:36:01 +0000 Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 09GHQLpa024369; Fri, 16 Oct 2020 12:35:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=5ARtZ8iuUZWTt92xPnGmGgGIFglUvN30JaId3ybKh1U=; b=GqfLhYq5fVpf+NH05aA5aX6efreXaoZKcOKIXf8AFjnDuhgwGvpB1ZBdaBjpsln/gC4h JajQmv+HrdtfuzSRUt6s0d56rZpsJrlr5b2w9tBdrsFyeTfMVxdg/hKEVTChxPzitGdu eDOZxAHo//3K9LsLrF990RCy/EtNOI8CnUgEec0At13WXlzHXkec6cDmo8VpzgKUoFhc gSsRcekD0ACXP5JEKop4s3VrbLNltWrWYda8QbtJSdkloLcHmkGdKSTurH9qYQrOPHvs dEp6D9CwM1cUKzqgcnPc8lQRXiQ2R2WmzjRP4t5AwdmnIoceJFvYUlpeatKfe51Lz7JB dg== Received: from ediex01.ad.cirrus.com ([87.246.76.36]) by mx0a-001ae601.pphosted.com with ESMTP id 343ac20jk8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 16 Oct 2020 12:35:46 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Fri, 16 Oct 2020 18:35:44 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.1913.5 via Frontend Transport; Fri, 16 Oct 2020 18:35:44 +0100 Received: from AUSNPC0LSNW1-debian.ad.cirrus.com (ausnpc0lsnw1.ad.cirrus.com [198.61.64.143]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 1542545; Fri, 16 Oct 2020 17:35:44 +0000 (UTC) From: Richard Fitzgerald To: , , Subject: [PATCH v2 0/7] Add support for Rpi4b + Cirrus Lochnagar2 and CS47L15 Date: Fri, 16 Oct 2020 18:35:34 +0100 Message-ID: <20201016173541.21180-1-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 impostorscore=0 mlxscore=0 spamscore=0 bulkscore=0 mlxlogscore=871 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010160130 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201016_133555_755953_A57B5952 X-CRM114-Status: GOOD ( 17.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, Richard Fitzgerald , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This set of patches provides support for using the Raspberry Pi 4b with a Cirrus Logic Lochnagar 2 audio development platform plus Cirrus Logic CS47L15 codec. Patches are needed to audio-graph-card to enable support for setting the component sysclks and plls. The codec sysclks and plls cannot be placed under the clock framwork because they are I2C/SPI-connected peripherals and access to the registers would cause a nested get of the I2C/SPI bus clock. The clock framework does not support this and it would result in a deadlock. Richard Fitzgerald (7): of: base: Add of_count_phandle_with_fixed_args() ASoC: audio-graph-card: Add plls and sysclks DT bindings ASoC: audio-graph-card: Support setting component plls and sysclks ASoC: arizona: Allow codecs to be selected from kernel config ASoC: madera: Allow codecs to be selected from kernel config ARM: dts: Add dts for RPi4b + Cirrus Logic Lochnagar2 + CS47L15 MAINTAINERS: Add dts for Cirrus Logic Lochnagar on RPi4 .../bindings/sound/audio-graph-card.txt | 44 ++++ MAINTAINERS | 1 + arch/arm/boot/dts/Makefile | 1 + ...bcm2711-rpi4b-cirrus-lochnagar-cs47l15.dts | 166 +++++++++++++++ .../dts/bcm2711-rpi4b-cirrus-lochnagar.dtsi | 201 ++++++++++++++++++ drivers/of/base.c | 73 +++++-- include/linux/of.h | 9 + include/sound/simple_card_utils.h | 24 +++ sound/soc/codecs/Kconfig | 18 +- sound/soc/generic/audio-graph-card.c | 16 +- sound/soc/generic/simple-card-utils.c | 184 ++++++++++++++++ 11 files changed, 703 insertions(+), 34 deletions(-) create mode 100644 arch/arm/boot/dts/bcm2711-rpi4b-cirrus-lochnagar-cs47l15.dts create mode 100644 arch/arm/boot/dts/bcm2711-rpi4b-cirrus-lochnagar.dtsi