From patchwork Thu Dec 21 03:32:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xingyu Wu X-Patchwork-Id: 18400 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp162939dyi; Wed, 20 Dec 2023 19:33:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IEiJnuXyKic3MvcE2sWpv5OFiHFfdUNeM4u1EhKyab+raU9jV7uvpT7Njyjxg7r/BAE1SAh X-Received: by 2002:a17:903:298b:b0:1d3:f43a:a2e1 with SMTP id lm11-20020a170903298b00b001d3f43aa2e1mr1365412plb.132.1703129607473; Wed, 20 Dec 2023 19:33:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703129607; cv=none; d=google.com; s=arc-20160816; b=PGRBIuSAWU7GpcGWFg/D3eG9jqQJ/PwrtjsPoBes8mDEHTUf+DnqqzYvAwy2czhSC7 QyXEAOADQoSwIcMYRAUH6MNUzD45UBkvHZ2yGwCkm+WXNsnxUemXYITtAF4d9/zmSyjn Ghsgvd32PutqGu4Fzoeqm2ucqv8JkcDl67lms4MGX905YsS6lRwuAjPlKI9GXwIJpDO4 wvsILUxfyVVIC90ePJBwmNMVJQvrZxDW2VVrRs7KQoQpYKSf8VuWEs+8bHc9MA9bvzgr oVAR+KMXOFD1G6jixAEvdaF8hbeMwTMkL/sg1ea48OJWFjLqiMAubD1RAW3K9F7kf1L3 4+ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=eA3rKd6F1XCfRS+UB43pqfMhdFbfV2hxJw0o4crhs7Q=; fh=rAwFsLMDdsiM3awWCOp+CHYbsVXjUmX08xz551L9WFQ=; b=iP+SWCc6lBGc5zq0dooLRLoBvcgD6rppNb9M5kJRzveSCLeg7GbvCljJkBwhliw+2A SRH30HFJN4mHXQj9VMncUfOpTN/76b2Jdx5cT/tP1uqfv616ZJZ0BcmWvbYnw/u020zE 5iqlGBRO6HDYnNxIpzT5OGf5SP4swnW6+TsfWT4UAdYC1PYkH+DBFo8lH+uBCfJnrKy8 sqDrTINxYm+hoP+JmhfmSKpoujVR04LZQVr+NAvDKZAQAs3HFIFdbvA9w9vRxqur7l8B QMFn71P8E8AS1ffMmNeQ+DAvJ7EEd3I9VdtkLabKuPFsdramw2h2Q1UrbEW/xA/DCO54 wcwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-7812-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7812-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d1-20020a170902854100b001d0cbef2eeesi740140plo.71.2023.12.20.19.33.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 19:33:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7812-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-7812-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7812-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4291A2814BD for ; Thu, 21 Dec 2023 03:33:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4608BB66F; Thu, 21 Dec 2023 03:32:41 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADF5DAD21; Thu, 21 Dec 2023 03:32:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=starfivetech.com Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id A003F24E285; Thu, 21 Dec 2023 11:32:24 +0800 (CST) Received: from EXMBX061.cuchost.com (172.16.6.61) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 21 Dec 2023 11:32:24 +0800 Received: from localhost.localdomain (113.72.145.47) by EXMBX061.cuchost.com (172.16.6.61) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 21 Dec 2023 11:32:23 +0800 From: Xingyu Wu To: Liam Girdwood , Mark Brown , Claudiu Beznea , Jaroslav Kysela , Takashi Iwai , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: Walker Chen , Xingyu Wu , , , , Subject: [PATCH v1 0/2] Add Cadence I2S controller driver for the Date: Thu, 21 Dec 2023 11:32:21 +0800 Message-ID: <20231221033223.73201-1-xingyu.wu@starfivetech.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: EXCAS061.cuchost.com (172.16.6.21) To EXMBX061.cuchost.com (172.16.6.61) X-YovoleRuleAgent: yovoleflag X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785860831038481555 X-GMAIL-MSGID: 1785860831038481555 The Cadence I2S Controller implements a function of the multi-channel (up to 8-channel) bus. Each stereo channel combines functions of a transmitter and a receiver, and can switch freely between them. Each channel has independent gating, clock and interruption control. It also support some of these channels are used as playback and others can also be used as record in the same time. Four I2S controllers are used on the StarFive JH8100 SoC. Two of the I2S controllers use two stereo channels, one of them use four channels, and one use eight. It had tested on the fpga with WM8960. Xingyu Wu (2): dt-bindings: ASoC: Add Cadence I2S controller for StarFive JH8100 SoC ASoC: starfive: Add drivers of Cadence Multi-Channel I2S Controller .../bindings/sound/cdns,jh8100-i2s.yaml | 100 +++ MAINTAINERS | 7 + sound/soc/starfive/Kconfig | 18 + sound/soc/starfive/Makefile | 4 + sound/soc/starfive/cdns-jh8100-i2s-pcm.c | 262 +++++++ sound/soc/starfive/cdns-jh8100-i2s.c | 727 ++++++++++++++++++ sound/soc/starfive/cdns-jh8100-i2s.h | 171 ++++ 7 files changed, 1289 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/cdns,jh8100-i2s.yaml create mode 100644 sound/soc/starfive/cdns-jh8100-i2s-pcm.c create mode 100644 sound/soc/starfive/cdns-jh8100-i2s.c create mode 100644 sound/soc/starfive/cdns-jh8100-i2s.h