From patchwork Fri Jan 8 16:04:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 12006925 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=-12.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 E9093C433E0 for ; Fri, 8 Jan 2021 16:07:55 +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 A1FCB2399C for ; Fri, 8 Jan 2021 16:07:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A1FCB2399C 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=r9DeoV1LdmBbUpIdiH+7hCWNdqiBa3JVgQlX0O04Mo8=; b=ccMzfjV1wgwXzZMEuamdm53aJ+ N8o8k9AmB9gM5QKma2PJpW4tgyDMuS/M4qxRQS7DJikDOhG50FnADVulhB5Z8vaC0PeCBLV9ZST8I 8iBtqtBMfHps+vXlZGaAVZMUkV4RopPtQG5FvPHSCpbfA6PY8zbrQ1NH5GoAtwI/4HAd5KFkOuUOq ftSsbeXFeYvT3HjyYR/F6DHIkBLJ0OIU26VE1I09kW/gjCtNBkl9G8qvrRI/v9HLOINIiq0UwvQBI XvThgzqsIxOVm5aYQNsS2ONzsZZeEBGonNtQDiGjmmNpoX/JZYInsYffE7iJDTpu33vcbj9qOPT2p fDrg9ZKA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxuGl-0001tE-GU; Fri, 08 Jan 2021 16:05:43 +0000 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxuGL-0001qn-Vo; Fri, 08 Jan 2021 16:05:20 +0000 Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 108G23sQ011489; Fri, 8 Jan 2021 10:05:07 -0600 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=tqQw790delcllXWLBK7BIW10l+6uB+lTE/LLtib25BM=; b=UQHMooUk3DyqjBnXFwJ2yqrnLuwGrAfDvtQIwDmJQYdI6Bl+rty2FA87al0J+13ky+nw mvf3pZ6K4unOCo5TqZF8fjJNG3uZT1kvJGjyBAO4CXebK7FMfb79lEIbGmP4XrvjuCHn w0eQtq3/sijHGdBT5aUX2nf6cF/pelkA8McaEBaHOY9ouQU3TzV/17DseOPhY35erQrc EfTi5hq7+3XyANG/rUATjjFxNk1NIosGlQuAduvBj6HlKl8WCtlMQy1AVjgMmC5+Y3y6 3lwfUiZu3bQazLGTi2/IlSUUtuZqVBPjCChEBLzH18Vrzq4ZZD0E93C7pG4V6yRQl4yD eg== Received: from ediex01.ad.cirrus.com ([87.246.76.36]) by mx0b-001ae601.pphosted.com with ESMTP id 35wqjka90s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 08 Jan 2021 10:05:07 -0600 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, 8 Jan 2021 16:05:06 +0000 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, 8 Jan 2021 16:05:06 +0000 Received: from AUSNPC0LSNW1-debian.cirrus.com (AUSNPC0LSNW1.ad.cirrus.com [198.61.64.226]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 4E80C45; Fri, 8 Jan 2021 16:05:05 +0000 (UTC) From: Richard Fitzgerald To: , , , , Subject: [PATCH v4 0/6] Add support for Rpi4b + Cirrus Lochnagar2 and CS47L15 Date: Fri, 8 Jan 2021 16:04:55 +0000 Message-ID: <20210108160501.7638-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 mlxlogscore=999 malwarescore=0 spamscore=0 clxscore=1015 bulkscore=0 phishscore=0 priorityscore=1501 suspectscore=0 impostorscore=0 lowpriorityscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101080091 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210108_110518_493647_E36B45D0 X-CRM114-Status: GOOD ( 17.62 ) 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 , bcm-kernel-feedback-list@broadcom.com, 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. These are not specific to CS47L15 - several Cirrus and non-Cirrus codecs also require component clock setup, typically for larger codecs with multiple internal clocking options and clock domains. The codec sysclks and plls cannot be placed under the clock framework because they are typically I2C/SPI/Soundwire-connected peripherals and access to the registers would cause a nested get of the bus clock. The clock framework does not support this and it would result in a deadlock. Richard Fitzgerald (6): of: base: Add of_count_phandle_with_fixed_args() dt-bindings: audio-graph-card: Add plls and sysclks properties ASoC: audio-graph-card: Support setting component plls and sysclks ASoC: madera: Allow codecs to be selected from kernel config ASoC: madera: Export clock config defines to dt-bindings ARM: dts: Add dts for RPi4b + Cirrus Logic Lochnagar2 + CS47L15 .../bindings/sound/audio-graph.yaml | 46 ++++ MAINTAINERS | 1 + arch/arm/boot/dts/Makefile | 1 + .../dts/bcm2711-rpi-4-b-lochnagar-cs47l15.dts | 186 ++++++++++++++ .../boot/dts/bcm2711-rpi-4-b-lochnagar.dtsi | 201 +++++++++++++++ drivers/of/base.c | 73 ++++-- include/dt-bindings/sound/madera.h | 60 +++++ include/linux/of.h | 9 + include/sound/simple_card_utils.h | 25 ++ sound/soc/codecs/Kconfig | 10 +- sound/soc/codecs/madera.h | 56 +---- sound/soc/generic/audio-graph-card.c | 13 + sound/soc/generic/simple-card-utils.c | 238 ++++++++++++++++++ 13 files changed, 836 insertions(+), 83 deletions(-) create mode 100644 arch/arm/boot/dts/bcm2711-rpi-4-b-lochnagar-cs47l15.dts create mode 100644 arch/arm/boot/dts/bcm2711-rpi-4-b-lochnagar.dtsi