From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 691BD32695F for ; Wed, 15 Apr 2026 12:47:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776257264; cv=none; b=Q99NSNHBdJpXUm/l9Q27QMD5pniFcsQVN/D7bVwQ5nnYcDySwb4tNKWFYJhE457/WXpzteXZt4fY4kEl6ZEEqv7dP0MnoH7HhNdGOTvCa0Fq1ZWApU7rtC8+ik8YaWMbHTaYfosb9pErjzdj3jEe/VeKs7I0+sJVKGboVxbyq4g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776257264; c=relaxed/simple; bh=1i4vtlL/MuJz61IDw0/C+/bm5U9XK4wosBXKE8p2dsI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=sBAw0EtK46Ca0LHMQa0jWKeRMNE6uSm8RUeTNzXRdpKAmP2gl8jCZguUwt+5SSaUDzKPoh6YO1f1fxxbc0PF2mo75Z9ErWZK1B45+CW+V6bsTm//8eYhrZlKCuZ138AqzDY6W2UQMAOIhLezEbIi7xH6oAGuCgIX3hYKCZhFfdA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=fg+QJ1jd; arc=none smtp.client-ip=209.85.221.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fg+QJ1jd" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-43d72875729so2427623f8f.3 for ; Wed, 15 Apr 2026 05:47:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776257261; x=1776862061; darn=vger.kernel.org; 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=UnajQ8XOv4b8ZHbW7mJFy+SmDdF5Y0rpVZJX4dT/uKs=; b=fg+QJ1jdM1U+9JYftr9loCH3r5mAtsgqj0+5v+OOWqvHHH3rhGeOqAvteX++tUIBrL E21eC5OHDssiSOnOAvitUfnfP/+nexA26iYnanGNYrzibO0Yzx2flRqaYDiogsXh/4lJ fShN2ML2ge7ihW5VbCw04DhVuaCUNPxZ5rP6CFWmM9KIynB0TKMiPu85dJEzmIOTra6q xYaFuVjLO1FJT/Op927wqSfVWNHYffWlHj1L+53Z8UG7Ogi3vMpXIHeapTR81qHSSJ0h p09B6+z+zdgl7B9ZMf23WMwHesq32Xagb/CmBxi+6W4iopZdxbh/6u1STe0lhttTbKYE +JEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776257261; x=1776862061; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=UnajQ8XOv4b8ZHbW7mJFy+SmDdF5Y0rpVZJX4dT/uKs=; b=Mv525AjFMknjN+NOXotkGeiGA3qk2QJyfaA7FrEHprL7+EnE9dmH2h89KHKdhj+u5t KBtQTcvLr1z+/kAV+LstnTloMq7wdnYkBlvc38lPAm1KWUbWBqHgHJj1WIGdqoyTVrPW vv69aM3Cr6i5zFY1fuHfs88ITl9YA+uzSgVXEO+4ANNRnM3v8wZlJDSHcoZ9oqJpu1bf cTsqaX9pNNUwBZ8neCJDsjFk06CHVux0CxjLecWWrXANZgwP8qf6ZdsBMDWD0a1G6VCg BEWSgZZy8r0+Xm+XRjjicWNonN6+JLkggjo0T+2LCZWSIueE1lKxZJK3PqbidalXG2ca rycQ== X-Forwarded-Encrypted: i=1; AFNElJ/KyBNNXQ3CUMsYoT3hzGUp1XrQXgKiW/avquBqfVLsAtkAKUWjk0E0XlBVbTCzpwq786snqG63Qm6bVuE=@vger.kernel.org X-Gm-Message-State: AOJu0YxCVuiMo9riR5bMlxUv1BdEen7OqpYprbbuji8VAA20xXR4ea/+ 91l5Yd2k1zu2dvOOL9l4kqWI5yR7LJaxc8EmPUhn4QUNiqgaDgJmGfZI X-Gm-Gg: AeBDietgSAoMO56e2UGufkiSITs+6AxnLJXkVWwBc8Cz2RYtagDairppRy4cY+JrtOL fxH3Br44CGYvejHcPAnjZpuIzbF+1x7CG1/Bk0KNX7Lof3azhbUiY5cL5M0Ngnbtaq7hKgxTxY5 WMKugoiVO55ThPjODfXCTMKERKEstOLYCx/7pKgDYiknHmAb9nw2PST0b46hA4+tbxdBVz14NLe 62SOogG9aHF+mVrb6jLfeBnSu+lo0Bdo/9By1gptz+JQamegzFYDvqfrgMdoPfXmniYxMhCzfDJ qs5auMdIYQ/pnXZTEYhQiKLX8FIGG3yOIqCSbPL594anQjVkiOW1Bv+jwFggtuOJFRXx+Eeuf3O DDyq2LWAneocKO+nIi3nZSIFNrOyPu20bjXToLnu4bSFsj8LYmPJUkDkoUjF6Yox3gehH1LOu0A IHBjq11IQoUduZ3TeGr9ROkoavzRdrbhkpnaXlq6qNlZEFL3cL X-Received: by 2002:a05:6000:40cb:b0:43c:ef4f:79e4 with SMTP id ffacd0b85a97d-43d642b461cmr31372573f8f.37.1776257260716; Wed, 15 Apr 2026 05:47:40 -0700 (PDT) Received: from localhost.localdomain ([2001:41d0:406:c100::]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43ead356616sm5123319f8f.13.2026.04.15.05.47.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2026 05:47:40 -0700 (PDT) From: John Madieu X-Google-Original-From: John Madieu To: Kuninori Morimoto , Mark Brown , Liam Girdwood Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jaroslav Kysela , Takashi Iwai , Geert Uytterhoeven , Magnus Damm , Philipp Zabel , Claudiu Beznea , Biju Das , john.madieu@gmail.com, linux-sound@vger.kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, John Madieu Subject: [PATCH v5 05/14] ASoC: rsnd: Add audmacpp clock and reset support for RZ/G3E Date: Wed, 15 Apr 2026 12:47:22 +0000 Message-Id: <20260415124731.3684773-6-john.madieu.xa@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260415124731.3684773-1-john.madieu.xa@bp.renesas.com> References: <20260415124731.3684773-1-john.madieu.xa@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit RZ/G3E requires additional audmapp clock and reset lines for Audio DMA-PP operation. Add global audmacpp clock/reset management in rsnd_dma_probe() using optional APIs to remain transparent to other platforms. Signed-off-by: John Madieu --- Changes: v5: - Add comment on audmapp clock/reset acquisition clarifying these are optional and transparent to platforms that don't have them in DT, per Kuninori's request - Drop spurious blank line added to struct rsnd_priv in rsnd.h v4: - Move audmapp_clk and audmapp_rstc from struct rsnd_priv into struct rsnd_dma_ctrl v3: No changes v2: No changes sound/soc/renesas/rcar/dma.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sound/soc/renesas/rcar/dma.c b/sound/soc/renesas/rcar/dma.c index 68c859897e68..ab9694589052 100644 --- a/sound/soc/renesas/rcar/dma.c +++ b/sound/soc/renesas/rcar/dma.c @@ -47,6 +47,9 @@ struct rsnd_dma_ctrl { phys_addr_t ppres; int dmaen_num; int dmapp_num; + /* RZ/G3E: Audio DMAC peri-peri clock and reset */ + struct clk *audmapp_clk; + struct reset_control *audmapp_rstc; }; #define rsnd_priv_to_dmac(p) ((struct rsnd_dma_ctrl *)(p)->dma) @@ -864,6 +867,24 @@ int rsnd_dma_probe(struct rsnd_priv *priv) if (rsnd_is_gen4(priv)) goto audmapp_end; + /* + * Audio DMAC peri-peri clock and reset for RZ/G3E. + * These use optional APIs, so they gracefully return NULL + * (no error) on platforms whose DT does not provide them. + */ + dmac->audmapp_rstc = + devm_reset_control_get_optional_exclusive_deasserted(dev, "audmapp"); + if (IS_ERR(dmac->audmapp_rstc)) { + return dev_err_probe(dev, PTR_ERR(dmac->audmapp_rstc), + "failed to get audmapp reset\n"); + } + + dmac->audmapp_clk = devm_clk_get_optional_enabled(dev, "audmapp"); + if (IS_ERR(dmac->audmapp_clk)) { + return dev_err_probe(dev, PTR_ERR(dmac->audmapp_clk), + "failed to get audmapp clock\n"); + } + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "audmapp"); if (!res) { dev_err(dev, "lack of audmapp in DT\n"); -- 2.25.1