From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.8 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,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 16F3EC433B4 for ; Sat, 15 May 2021 02:59:10 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 4429C6144A for ; Sat, 15 May 2021 02:59:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4429C6144A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 14DA01727; Sat, 15 May 2021 04:58:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 14DA01727 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621047546; bh=0IOrVZPR9rAQiW7m3R7YiKI3tpebEYSrkKIk3W+II3M=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=G9zuL/2o7zFurIdrG5SxQ0xDSsQK7Ptu5Z3a0tTaT5ftq5odFhYQCqMf0vkPoHaTm pa2+pgN+rVjR747FYTasnRXK09kstncOUN0C7OV0du0/7G/d/UBiPM3ujwa8BVsyVv 0rL6i1YCs/j7Ct4hY7Np8r2lAxMqk/sSDe0cfVkE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8365AF80156; Sat, 15 May 2021 04:58:15 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8D0A2F80245; Sat, 15 May 2021 04:58:12 +0200 (CEST) Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1C709F80156 for ; Sat, 15 May 2021 04:57:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1C709F80156 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Tg0KsS2x" Received: by mail-oi1-x22c.google.com with SMTP id s19so1321303oic.7 for ; Fri, 14 May 2021 19:57:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Zg/5QXj0NQOLjGOpktrlON/n7PasEsK9TVYdrnmnD9Q=; b=Tg0KsS2xPm6IpjBdv4c+49Dbxg4u+hq6+RuCVFvLqdPbB9ixMlNgfhV9rfec3OkBPZ IvTdvbhp3NHPb/aTkZ6qVfnKmnVrioOvM1eY5fJGJZ/5y7ocOCwL0wmy/hphA0DEnme+ x+zdV+817e2/RINEYBv0hmRwrzfaQp1NLkFwLBQ6gosxm3hzWszs1DrIg0aRWHCc2/wc PClHridG4s67HGHPKUMO+8KMSKmtaq8zyDCHOTpGsf0yCVOR2QTg8/rkixJRcApJICEt TIRwB0S/yqYMTCipsL5yzXKzvTsOzCpODeYwblLFJFRS63R51qslMgwhtpGGdESrfuIp 9YiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Zg/5QXj0NQOLjGOpktrlON/n7PasEsK9TVYdrnmnD9Q=; b=CobBGfNqxAnZET3qXJSFx1i2O3f15GlbeTYR0tTs5aFJWJcLVSednfxXSZZlTHDgZ6 zq8dLmQpbCBrAznoIG1cqRhMyEXrI82cRcljgOm+kSlhxRarIcKTKF72aCzu0/3PEkuv sKi42ZickBWdR5Pif1JEtqN5ZDucfZ5784reTJKqmJeKqI/lQE2IZC2RB7Fvwf6tE38F ipA6N4z6fO3fZ00XAKHphKZ4IHMN5ruWYu29sVJb1L1HxTZtX1OcfZZS/3MSJzMcuMKi yrQBcXnc6g2pv7/xaVsVFEO1lpDDUmLD3qRDtgmEoBDYXDOyK8UmLDT0zYHTPCa8WBpH xmrQ== X-Gm-Message-State: AOAM53041zR5c8McfmAj8+OSAE1lqBNDw/nW1SUDGShoppiMBgnUqHdz r6CUmWJvtX7vZ4qCnrdD4Ifuv/bPKTs= X-Google-Smtp-Source: ABdhPJyx+Mj2Xnc1VVyohqVzJFvH4+AvlDMy34VVVb44+0ur5ea5Nbj7p61kmpDKkoWUZbqRkkNOFQ== X-Received: by 2002:aca:7556:: with SMTP id q83mr36046438oic.161.1621047476637; Fri, 14 May 2021 19:57:56 -0700 (PDT) Received: from wintermute.localdomain (cpe-76-183-134-35.tx.res.rr.com. [76.183.134.35]) by smtp.gmail.com with ESMTPSA id j16sm1689444otn.55.2021.05.14.19.57.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 May 2021 19:57:56 -0700 (PDT) From: Chris Morgan To: alsa-devel@alsa-project.org Subject: [PATCH v11 0/4] ASoC: codecs: add rk817 support Date: Fri, 14 May 2021 21:57:45 -0500 Message-Id: <20210515025749.11291-1-macroalpha82@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: pierre-louis.bossart@linux.intel.com, heiko@sntech.de, devicetree@vger.kernel.org, tiwai@suse.com, robh+dt@kernel.org, lgirdwood@gmail.com, linux-rockchip@lists.infradead.org, broonie@kernel.org, Chris Morgan , jbx6244@gmail.com, lee.jones@linaro.org, maccraft123mc@gmail.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Chris Morgan This series is to add support for the Rockchip rk817 audio codec which is present in all Rockchip rk817 MFD chips. Changes in v11: - Stopped checking for presence of parent node in codec driver, as driver should never be called if parent device doesn't exist to call it. - Made codec subnode optional and stopped returning errors if it is missing. - Downgraded missing codec clock message from dev_err to dev_dbg. Users who choose to use the rk817 PMIC but do not choose to use the codec will not get an error message unless they have debugging enabled, whereas users who wish to use the codec but don't have the clock defined will not get an error message unless they have debug messages enabled. This seems like a fair compromise between mututally exclusive users. Note that errors with the clock or codec will still result in a dev_err. - Updated DT documentation to note that codec subnode is optional if no properties are to exist beneath it. Changes in v10: - Correct order of test/ack/signed-off to chronological order. - Removed ifdef from mfd driver keep cell from being added when the codec was not to be built. - Changed codec DT parsing messages from error to debug to prevent errors in dmesg log in the rare but valid case a user has the rk817 PMIC but does not use the codec. Changes in v9: - Add cover letter. - Remove documentation for interrupt parent per Rob Herring's request. - Remove unused MODULE_DEVICE_TABLE to fix a bug identified by kernel test robot. Changes in v8: - Added additional documentation for missing properties of #sound-dai-cells, interrupt-parent, and wakeup-source for mfd documentation. - Corrected order of elements descriptions in device tree documentation. - Changed name of "mic-in-differential" to "rockchip,mic-in-differential". - Changed name of sound card from "rockchip,rk817-codec" to "Analog". - Removed unused resets and reset-names from the i2s1_2ch node. Changes in v7: - Removed ifdef around register definitions for MFD. - Replaced codec documentation with updates to MFD documentation. - Reordered elements in example to comply with upstream rules. - Added binding update back for Odroid Go Advance as requested. - Submitting patches from gmail now. Changes in v6: - Included additional project maintainers for correct subsystems. - Removed unneeded compatible from DT documentation. - Removed binding update for Odroid Go Advance (will do in separate series). Changes in v5: - Move register definitions from rk817_codec.h to main rk808.h register definitions. - Add volatile register for codec bits. - Add default values for codec bits. - Removed of_compatible from mtd driver (not necessary). - Switched to using parent regmap instead of private regmap for codec. Changes in v4: - Created set_pll() call. - Created user visible gain control in mic. - Check for return value of clk_prepare_enable(). - Removed duplicate clk_prepare_enable(). - Split DT documentation to separate commit. Changes in v3: - Use DAPM macros to set audio path. - Updated devicetree binding (as every rk817 has this codec chip). - Changed documentation to yaml format. - Split MFD changes to separate commit. Changes in v2: - Fixed audio path registers to solve some bugs. Chris Morgan (4): mfd: Add Rockchip rk817 audio CODEC support ASoC: Add Rockchip rk817 audio CODEC support dt-bindings: Add Rockchip rk817 audio CODEC support arm64: dts: rockchip: add rk817 codec to Odroid Go .../devicetree/bindings/mfd/rk808.txt | 188 ++++++ .../boot/dts/rockchip/rk3326-odroid-go2.dts | 36 +- drivers/mfd/rk808.c | 83 +++ include/linux/mfd/rk808.h | 81 +++ sound/soc/codecs/Kconfig | 6 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/rk817_codec.c | 539 ++++++++++++++++++ 7 files changed, 933 insertions(+), 2 deletions(-) create mode 100644 sound/soc/codecs/rk817_codec.c -- 2.25.1 From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 D0611C433ED for ; Sat, 15 May 2021 02:58:15 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 2AA9F61177 for ; Sat, 15 May 2021 02:58:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2AA9F61177 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc: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=5zyI+OY/TbINQaHTq/sRFer6pOGdC1cZin7e4oRkfHw=; b=lq8MsunrZsYT56ypG+vCQZwB8W XHbs3u6gN/itDtU6mM2Kq4+SCQO8mLHu6O0ONGtoLFXMdNtwyDEC78TYyEXcKaoV+IvqioZ9lWbMD euqufOAg0A6Kd1zJiOK61Lxvc9s+wR00iWC+6dKRO2IXM+ytg3gzPJFkvqw/9RpvsHOEU5u+BDY3r fLL9NO0GiAa8RfLWtmnuv9sz7jWOqx76n1PdUPuaFtprilaO/K7rtdcMB4PtWeCnu9e6ULNPw01eO drdwpRcneNQo6+CBTRtM0lOOfCVURJkFUJ4S/x7uEXcnSjBP9fKWEYtGJAqukb4Y+xnzvMpL8vdxL U8h4nKaA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhkVG-009YYj-R7; Sat, 15 May 2021 02:58:11 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhkVB-009YY0-BG for linux-rockchip@desiato.infradead.org; Sat, 15 May 2021 02:58:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=Zg/5QXj0NQOLjGOpktrlON/n7PasEsK9TVYdrnmnD9Q=; b=Z7aLJtFYJFfMO1qs6DhSd9Cqiw +kvys1QD3bFIrM4qsWs8q8S5zFlAuObj0E2vC3Ipvfyzaei/4EeXmSRPPKDGMzJxSqI08HKFF5pY7 4VKzIKMHWgb1+yRWo3hZWJrM28AlQY6iLbb8uHQ2MGMX33sIGS8bAQR/e0D70/U0UlWdTrOttiagf /TybiZ2ttKIQ0iY7N3RjQ9l2ugFh9tQavyAVVCrvGqhXIHXKLm1uGXFC2+zKQiRBM87qjfpVoPgjB DucSCP+QBWKMQpf8mHN2eSlxIwD3jdkY2LJ/CThaTurlKEYhaUX3WLmKbrUBT4UorrIvYe+dB8u6y 8pz6h7hw==; Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhkV8-00CMMk-BD for linux-rockchip@lists.infradead.org; Sat, 15 May 2021 02:58:04 +0000 Received: by mail-oi1-x231.google.com with SMTP id u11so1346046oiv.1 for ; Fri, 14 May 2021 19:57:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Zg/5QXj0NQOLjGOpktrlON/n7PasEsK9TVYdrnmnD9Q=; b=Tg0KsS2xPm6IpjBdv4c+49Dbxg4u+hq6+RuCVFvLqdPbB9ixMlNgfhV9rfec3OkBPZ IvTdvbhp3NHPb/aTkZ6qVfnKmnVrioOvM1eY5fJGJZ/5y7ocOCwL0wmy/hphA0DEnme+ x+zdV+817e2/RINEYBv0hmRwrzfaQp1NLkFwLBQ6gosxm3hzWszs1DrIg0aRWHCc2/wc PClHridG4s67HGHPKUMO+8KMSKmtaq8zyDCHOTpGsf0yCVOR2QTg8/rkixJRcApJICEt TIRwB0S/yqYMTCipsL5yzXKzvTsOzCpODeYwblLFJFRS63R51qslMgwhtpGGdESrfuIp 9YiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Zg/5QXj0NQOLjGOpktrlON/n7PasEsK9TVYdrnmnD9Q=; b=c9Dj4i7mRUTW9f+4xE5qkhCYWMGYCzJYgInp2wni4z+6UWrN4+vXi0HsvYJwkXSIdx Jxld4nhNlEz5VR978O+WGzw6u3ZfB5c9cl/TfPYeN8u1j0TumHq8tHbsFp+ycpGj2gT4 mz0MGWYQkfmHDJ+1xXtytH6PQAnsNYs4ZKLwRvBpQONhhpzC9nPNin5iMJBBeTBSA9rp KELjazJeXzH7gmxIznIe2xYaB9XsmM70CxySWKS5INkXYX/u81WEWAuDqU9WIh3+iGWW cfCLx5i4WZsLPjZNeM1sU7z2O/6xC0myfxjtcrUxQMRgek0gj6a/fMOKtvnjE0W3xKoI aHmA== X-Gm-Message-State: AOAM530/MQRHcd1Qbk951nRy0qNJplyVZUWy36/lf8gV8LNYUnjw7kLT uo6vFYYm/C5Kh29KxvCPsxU= X-Google-Smtp-Source: ABdhPJyx+Mj2Xnc1VVyohqVzJFvH4+AvlDMy34VVVb44+0ur5ea5Nbj7p61kmpDKkoWUZbqRkkNOFQ== X-Received: by 2002:aca:7556:: with SMTP id q83mr36046438oic.161.1621047476637; Fri, 14 May 2021 19:57:56 -0700 (PDT) Received: from wintermute.localdomain (cpe-76-183-134-35.tx.res.rr.com. [76.183.134.35]) by smtp.gmail.com with ESMTPSA id j16sm1689444otn.55.2021.05.14.19.57.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 May 2021 19:57:56 -0700 (PDT) From: Chris Morgan To: alsa-devel@alsa-project.org Cc: broonie@kernel.org, lgirdwood@gmail.com, pierre-louis.bossart@linux.intel.com, tiwai@suse.com, heiko@sntech.de, lee.jones@linaro.org, robh+dt@kernel.org, perex@perex.cz, jbx6244@gmail.com, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org, maccraft123mc@gmail.com, Chris Morgan Subject: [PATCH v11 0/4] ASoC: codecs: add rk817 support Date: Fri, 14 May 2021 21:57:45 -0500 Message-Id: <20210515025749.11291-1-macroalpha82@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210514_195802_408655_AD40D587 X-CRM114-Status: GOOD ( 19.34 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Chris Morgan This series is to add support for the Rockchip rk817 audio codec which is present in all Rockchip rk817 MFD chips. Changes in v11: - Stopped checking for presence of parent node in codec driver, as driver should never be called if parent device doesn't exist to call it. - Made codec subnode optional and stopped returning errors if it is missing. - Downgraded missing codec clock message from dev_err to dev_dbg. Users who choose to use the rk817 PMIC but do not choose to use the codec will not get an error message unless they have debugging enabled, whereas users who wish to use the codec but don't have the clock defined will not get an error message unless they have debug messages enabled. This seems like a fair compromise between mututally exclusive users. Note that errors with the clock or codec will still result in a dev_err. - Updated DT documentation to note that codec subnode is optional if no properties are to exist beneath it. Changes in v10: - Correct order of test/ack/signed-off to chronological order. - Removed ifdef from mfd driver keep cell from being added when the codec was not to be built. - Changed codec DT parsing messages from error to debug to prevent errors in dmesg log in the rare but valid case a user has the rk817 PMIC but does not use the codec. Changes in v9: - Add cover letter. - Remove documentation for interrupt parent per Rob Herring's request. - Remove unused MODULE_DEVICE_TABLE to fix a bug identified by kernel test robot. Changes in v8: - Added additional documentation for missing properties of #sound-dai-cells, interrupt-parent, and wakeup-source for mfd documentation. - Corrected order of elements descriptions in device tree documentation. - Changed name of "mic-in-differential" to "rockchip,mic-in-differential". - Changed name of sound card from "rockchip,rk817-codec" to "Analog". - Removed unused resets and reset-names from the i2s1_2ch node. Changes in v7: - Removed ifdef around register definitions for MFD. - Replaced codec documentation with updates to MFD documentation. - Reordered elements in example to comply with upstream rules. - Added binding update back for Odroid Go Advance as requested. - Submitting patches from gmail now. Changes in v6: - Included additional project maintainers for correct subsystems. - Removed unneeded compatible from DT documentation. - Removed binding update for Odroid Go Advance (will do in separate series). Changes in v5: - Move register definitions from rk817_codec.h to main rk808.h register definitions. - Add volatile register for codec bits. - Add default values for codec bits. - Removed of_compatible from mtd driver (not necessary). - Switched to using parent regmap instead of private regmap for codec. Changes in v4: - Created set_pll() call. - Created user visible gain control in mic. - Check for return value of clk_prepare_enable(). - Removed duplicate clk_prepare_enable(). - Split DT documentation to separate commit. Changes in v3: - Use DAPM macros to set audio path. - Updated devicetree binding (as every rk817 has this codec chip). - Changed documentation to yaml format. - Split MFD changes to separate commit. Changes in v2: - Fixed audio path registers to solve some bugs. Chris Morgan (4): mfd: Add Rockchip rk817 audio CODEC support ASoC: Add Rockchip rk817 audio CODEC support dt-bindings: Add Rockchip rk817 audio CODEC support arm64: dts: rockchip: add rk817 codec to Odroid Go .../devicetree/bindings/mfd/rk808.txt | 188 ++++++ .../boot/dts/rockchip/rk3326-odroid-go2.dts | 36 +- drivers/mfd/rk808.c | 83 +++ include/linux/mfd/rk808.h | 81 +++ sound/soc/codecs/Kconfig | 6 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/rk817_codec.c | 539 ++++++++++++++++++ 7 files changed, 933 insertions(+), 2 deletions(-) create mode 100644 sound/soc/codecs/rk817_codec.c -- 2.25.1 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip From mboxrd@z Thu Jan 1 00:00:00 1970 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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham 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 8D91EC433ED for ; Sat, 15 May 2021 02:57:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 61FBB61428 for ; Sat, 15 May 2021 02:57:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233919AbhEOC7J (ORCPT ); Fri, 14 May 2021 22:59:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232860AbhEOC7J (ORCPT ); Fri, 14 May 2021 22:59:09 -0400 Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C5C5C06174A for ; Fri, 14 May 2021 19:57:57 -0700 (PDT) Received: by mail-oi1-x235.google.com with SMTP id v22so1343894oic.2 for ; Fri, 14 May 2021 19:57:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Zg/5QXj0NQOLjGOpktrlON/n7PasEsK9TVYdrnmnD9Q=; b=Tg0KsS2xPm6IpjBdv4c+49Dbxg4u+hq6+RuCVFvLqdPbB9ixMlNgfhV9rfec3OkBPZ IvTdvbhp3NHPb/aTkZ6qVfnKmnVrioOvM1eY5fJGJZ/5y7ocOCwL0wmy/hphA0DEnme+ x+zdV+817e2/RINEYBv0hmRwrzfaQp1NLkFwLBQ6gosxm3hzWszs1DrIg0aRWHCc2/wc PClHridG4s67HGHPKUMO+8KMSKmtaq8zyDCHOTpGsf0yCVOR2QTg8/rkixJRcApJICEt TIRwB0S/yqYMTCipsL5yzXKzvTsOzCpODeYwblLFJFRS63R51qslMgwhtpGGdESrfuIp 9YiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Zg/5QXj0NQOLjGOpktrlON/n7PasEsK9TVYdrnmnD9Q=; b=Pu/xnOapDA7/QMO3dYZVxfNIOe+lr5n3Ka1bQWpWPnSd3G7zCndkVzqoOAmnUj2Wwy aPPqabeNYP7/GhEjF6WGU5nwVTZ+TbYiumEjrcze3b+dXIEYaK2crgOa9CjvC7BNgT+O LjLA1Rgzf77oD7wzrk80A31PDLwPQS4oPAxMq6iZvAmt+k2KkYX0wPkFalc4WOFM1PSo 5pzCS0hQyQD4IZ4y30eGENnUEz//4rRi8HfvoSV50JGQhVyWwesL0aqHUNdUwWb8onR3 eZtk02KjQoZzQ2BJgnU4cwNAcJbHlVkLYcbZrS1hwJFVuAvMZyT0ZmkHd2YctpG34sAk MxsA== X-Gm-Message-State: AOAM532vsb19G8e0aiLsxo6Jf5L+3m0YXdqb3yy9wHeLi5WF53SYGShH GVu6b02tlFMW+7YMndv3KkE= X-Google-Smtp-Source: ABdhPJyx+Mj2Xnc1VVyohqVzJFvH4+AvlDMy34VVVb44+0ur5ea5Nbj7p61kmpDKkoWUZbqRkkNOFQ== X-Received: by 2002:aca:7556:: with SMTP id q83mr36046438oic.161.1621047476637; Fri, 14 May 2021 19:57:56 -0700 (PDT) Received: from wintermute.localdomain (cpe-76-183-134-35.tx.res.rr.com. [76.183.134.35]) by smtp.gmail.com with ESMTPSA id j16sm1689444otn.55.2021.05.14.19.57.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 May 2021 19:57:56 -0700 (PDT) From: Chris Morgan To: alsa-devel@alsa-project.org Cc: broonie@kernel.org, lgirdwood@gmail.com, pierre-louis.bossart@linux.intel.com, tiwai@suse.com, heiko@sntech.de, lee.jones@linaro.org, robh+dt@kernel.org, perex@perex.cz, jbx6244@gmail.com, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org, maccraft123mc@gmail.com, Chris Morgan Subject: [PATCH v11 0/4] ASoC: codecs: add rk817 support Date: Fri, 14 May 2021 21:57:45 -0500 Message-Id: <20210515025749.11291-1-macroalpha82@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Chris Morgan This series is to add support for the Rockchip rk817 audio codec which is present in all Rockchip rk817 MFD chips. Changes in v11: - Stopped checking for presence of parent node in codec driver, as driver should never be called if parent device doesn't exist to call it. - Made codec subnode optional and stopped returning errors if it is missing. - Downgraded missing codec clock message from dev_err to dev_dbg. Users who choose to use the rk817 PMIC but do not choose to use the codec will not get an error message unless they have debugging enabled, whereas users who wish to use the codec but don't have the clock defined will not get an error message unless they have debug messages enabled. This seems like a fair compromise between mututally exclusive users. Note that errors with the clock or codec will still result in a dev_err. - Updated DT documentation to note that codec subnode is optional if no properties are to exist beneath it. Changes in v10: - Correct order of test/ack/signed-off to chronological order. - Removed ifdef from mfd driver keep cell from being added when the codec was not to be built. - Changed codec DT parsing messages from error to debug to prevent errors in dmesg log in the rare but valid case a user has the rk817 PMIC but does not use the codec. Changes in v9: - Add cover letter. - Remove documentation for interrupt parent per Rob Herring's request. - Remove unused MODULE_DEVICE_TABLE to fix a bug identified by kernel test robot. Changes in v8: - Added additional documentation for missing properties of #sound-dai-cells, interrupt-parent, and wakeup-source for mfd documentation. - Corrected order of elements descriptions in device tree documentation. - Changed name of "mic-in-differential" to "rockchip,mic-in-differential". - Changed name of sound card from "rockchip,rk817-codec" to "Analog". - Removed unused resets and reset-names from the i2s1_2ch node. Changes in v7: - Removed ifdef around register definitions for MFD. - Replaced codec documentation with updates to MFD documentation. - Reordered elements in example to comply with upstream rules. - Added binding update back for Odroid Go Advance as requested. - Submitting patches from gmail now. Changes in v6: - Included additional project maintainers for correct subsystems. - Removed unneeded compatible from DT documentation. - Removed binding update for Odroid Go Advance (will do in separate series). Changes in v5: - Move register definitions from rk817_codec.h to main rk808.h register definitions. - Add volatile register for codec bits. - Add default values for codec bits. - Removed of_compatible from mtd driver (not necessary). - Switched to using parent regmap instead of private regmap for codec. Changes in v4: - Created set_pll() call. - Created user visible gain control in mic. - Check for return value of clk_prepare_enable(). - Removed duplicate clk_prepare_enable(). - Split DT documentation to separate commit. Changes in v3: - Use DAPM macros to set audio path. - Updated devicetree binding (as every rk817 has this codec chip). - Changed documentation to yaml format. - Split MFD changes to separate commit. Changes in v2: - Fixed audio path registers to solve some bugs. Chris Morgan (4): mfd: Add Rockchip rk817 audio CODEC support ASoC: Add Rockchip rk817 audio CODEC support dt-bindings: Add Rockchip rk817 audio CODEC support arm64: dts: rockchip: add rk817 codec to Odroid Go .../devicetree/bindings/mfd/rk808.txt | 188 ++++++ .../boot/dts/rockchip/rk3326-odroid-go2.dts | 36 +- drivers/mfd/rk808.c | 83 +++ include/linux/mfd/rk808.h | 81 +++ sound/soc/codecs/Kconfig | 6 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/rk817_codec.c | 539 ++++++++++++++++++ 7 files changed, 933 insertions(+), 2 deletions(-) create mode 100644 sound/soc/codecs/rk817_codec.c -- 2.25.1