From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (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 599591E3DE5 for ; Fri, 8 Nov 2024 10:50:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063014; cv=none; b=Sh99444OwEsT6TdN7XLmBVMoaIl0YQUwna9iLRIQh05zrpk5FrQuA7ThqI1lzlGXC7IOOFViAmXJ6dazTuZcSqvuAr/1fm+ox0WrIGr9ZQV84MxPuEPCbzCGYpo7d1L3ciGHXzj1M2GJpgBusa9LEBYJ0+eXLiZEDbrw3DTg+DY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063014; c=relaxed/simple; bh=OIWzb9PT/vmD0ClqIKnmLVf3WdEczLEZAkDYjoDAxno=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=bWyOCNj96BUB9DypowDAWE5hPYcJPC2fPaK8LQxJyee4egZxVLFb9iBvRZTvLRRoytErox+YRWt3kCwage1QuVRZBwT1G2zoihJzXSJuGD+0dW8w84Q8hKZ62m2jb+y5nytie9wBaHzyHLHSFqoa74wP05whI2SC88znUAw8XLE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=nk0IPnit; arc=none smtp.client-ip=209.85.208.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="nk0IPnit" Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-5c94a7239cfso1366400a12.3 for ; Fri, 08 Nov 2024 02:50:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063011; x=1731667811; 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=wdhSiBfchWd1u0OxSSBpI2SjvWgIfd9Wy0n5L6pUKPk=; b=nk0IPnitoUh4TV42dGTOelWwm3zQDfiOnG34/hJnQkB1nGLE8DUW8xO5FQHo1/ozry FF0HMK35ewz70ik6fqlzBD7dK6nQkw6RSSlPweJZURNBoDBMiGFHZPBy2aSG0FIXUtjs dvVP9waxoXMbW2FHL289wnYV/hAENJwny4StDza/h6mk4HQP6Da/nB5V7Nii+A2dEkwi bjg0i2by0faHAjMg/r7xDXOxFFelObp8YFN0QUbBvaSUn0T3127f9qH1XD1/LvhlkhJd 4h+jIPWfC5k0+bJPPAlLtIaCymOiTskeIO84tWzufqr3NUWSTUcP3PU2nY6EcpsJQfWY QCGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063011; x=1731667811; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wdhSiBfchWd1u0OxSSBpI2SjvWgIfd9Wy0n5L6pUKPk=; b=CqQSb1egWZuHfYINzb+xN7kHsEVH6Ima7WJjK3b+PPhmkxg56voDd+rBRwL/k9ExIE bUXq+BysWcBv8io9TqblBGlsL49e7JMcdJE20UfH1lcvBxYhjKlxUq2qG6bcvnCH5Tqv F4ZMpTZ4As7cMzN9TbLlXDp0xsQZNI2JU0+Hdn40ZOomptRAD7m5Em6ny7eg+f8xVpaB XZlS2JTNs0qJjjEFPX9Orb0Pk5prLMIBNO13xuMVpPO6WZABL1u506TWWSI0+0ekIFlN IIqnropfEkhoGyCDT+7TxQdZT8/SFfAeZlpz4hzLYB4MJKaWI8BIuRTAFus3cF6p1bIF dndg== X-Forwarded-Encrypted: i=1; AJvYcCUq28c37cVcVBQPGwdFPN6J9yfgu0BnqN/2Bf719xLPQ4keFQN3282nD1Gu4peEDPz5x931irZ+KEg2DPE=@vger.kernel.org X-Gm-Message-State: AOJu0YyJnv7gW/WngTItp+apVKNF91NRrje+/TDfBrEoZCpImMB600oU Vn+gbr/2NA2U+Nusthvv5dwUcIxZuv4llVr3Bb474m1VQAbmLJ8yHp7m0aGYH/Q= X-Google-Smtp-Source: AGHT+IFMdwxiVZoesnoXIy7bcf+ddrZv7CcvqxmMrKKfTptLmp8zJQZXWtYpXHwUJzxvkOCNzExJrA== X-Received: by 2002:a05:6402:510f:b0:5c9:44bc:f9b3 with SMTP id 4fb4d7f45d1cf-5cf0a31116amr2124979a12.11.1731063010553; Fri, 08 Nov 2024 02:50:10 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.50.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:50:09 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 01/25] clk: renesas: r9a08g045-cpg: Add clocks, resets and power domains support for SSI Date: Fri, 8 Nov 2024 12:49:34 +0200 Message-Id: <20241108104958.2931943-2-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Add SSI clocks, resets and power domains support for the SSI blocks available on the Renesas RZ/G3S SoC. Signed-off-by: Claudiu Beznea --- Changes in v2: - none drivers/clk/renesas/r9a08g045-cpg.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/clk/renesas/r9a08g045-cpg.c b/drivers/clk/renesas/r9a0= 8g045-cpg.c index b2ae8cdc4723..d71e77624fac 100644 --- a/drivers/clk/renesas/r9a08g045-cpg.c +++ b/drivers/clk/renesas/r9a08g045-cpg.c @@ -209,6 +209,14 @@ static const struct rzg2l_mod_clk r9a08g045_mod_clks[]= =3D { DEF_MOD("sdhi2_imclk2", R9A08G045_SDHI2_IMCLK2, CLK_SD2_DIV4, 0x554, 9), DEF_MOD("sdhi2_clk_hs", R9A08G045_SDHI2_CLK_HS, R9A08G045_CLK_SD2, 0x554= , 10), DEF_MOD("sdhi2_aclk", R9A08G045_SDHI2_ACLK, R9A08G045_CLK_P1, 0x554, 11), + DEF_MOD("ssi0_pclk", R9A08G045_SSI0_PCLK2, R9A08G045_CLK_P0, 0x570, 0), + DEF_MOD("ssi0_sfr", R9A08G045_SSI0_PCLK_SFR, R9A08G045_CLK_P0, 0x570, 1), + DEF_MOD("ssi1_pclk", R9A08G045_SSI1_PCLK2, R9A08G045_CLK_P0, 0x570, 2), + DEF_MOD("ssi1_sfr", R9A08G045_SSI1_PCLK_SFR, R9A08G045_CLK_P0, 0x570, 3), + DEF_MOD("ssi2_pclk", R9A08G045_SSI2_PCLK2, R9A08G045_CLK_P0, 0x570, 4), + DEF_MOD("ssi2_sfr", R9A08G045_SSI2_PCLK_SFR, R9A08G045_CLK_P0, 0x570, 5), + DEF_MOD("ssi3_pclk", R9A08G045_SSI3_PCLK2, R9A08G045_CLK_P0, 0x570, 6), + DEF_MOD("ssi3_sfr", R9A08G045_SSI3_PCLK_SFR, R9A08G045_CLK_P0, 0x570, 7), DEF_MOD("usb0_host", R9A08G045_USB_U2H0_HCLK, R9A08G045_CLK_P1, 0x578, 0= ), DEF_MOD("usb1_host", R9A08G045_USB_U2H1_HCLK, R9A08G045_CLK_P1, 0x578, 1= ), DEF_MOD("usb0_func", R9A08G045_USB_U2P_EXR_CPUCLK, R9A08G045_CLK_P1, 0x5= 78, 2), @@ -238,6 +246,10 @@ static const struct rzg2l_reset r9a08g045_resets[] =3D= { DEF_RST(R9A08G045_SDHI0_IXRST, 0x854, 0), DEF_RST(R9A08G045_SDHI1_IXRST, 0x854, 1), DEF_RST(R9A08G045_SDHI2_IXRST, 0x854, 2), + DEF_RST(R9A08G045_SSI0_RST_M2_REG, 0x870, 0), + DEF_RST(R9A08G045_SSI1_RST_M2_REG, 0x870, 1), + DEF_RST(R9A08G045_SSI2_RST_M2_REG, 0x870, 2), + DEF_RST(R9A08G045_SSI3_RST_M2_REG, 0x870, 3), DEF_RST(R9A08G045_USB_U2H0_HRESETN, 0x878, 0), DEF_RST(R9A08G045_USB_U2H1_HRESETN, 0x878, 1), DEF_RST(R9A08G045_USB_U2P_EXL_SYSRST, 0x878, 2), @@ -286,6 +298,14 @@ static const struct rzg2l_cpg_pm_domain_init_data r9a0= 8g045_pm_domains[] =3D { DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(1)), 0), DEF_PD("sdhi2", R9A08G045_PD_SDHI2, DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(11)), 0), + DEF_PD("ssi0", R9A08G045_PD_SSI0, + DEF_REG_CONF(CPG_BUS_MCPU1_MSTOP, BIT(10)), 0), + DEF_PD("ssi1", R9A08G045_PD_SSI1, + DEF_REG_CONF(CPG_BUS_MCPU1_MSTOP, BIT(11)), 0), + DEF_PD("ssi2", R9A08G045_PD_SSI2, + DEF_REG_CONF(CPG_BUS_MCPU1_MSTOP, BIT(12)), 0), + DEF_PD("ssi3", R9A08G045_PD_SSI3, + DEF_REG_CONF(CPG_BUS_MCPU1_MSTOP, BIT(13)), 0), DEF_PD("usb0", R9A08G045_PD_USB0, DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, GENMASK(6, 5)), 0), DEF_PD("usb1", R9A08G045_PD_USB1, --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (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 110F61E5015 for ; Fri, 8 Nov 2024 10:50:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063017; cv=none; b=B2fkdbFOGh+pukb3Gtnpt5xVAPh+KO81ZnbpOHlwEtehHpm2JKlndKHUoTvUSMFwXRXCRI9JDk9LWs7JBQ57MxCGqP0CKO2YUqFwpTo6es25vhnSeF0IRNQSCYTcMZ9k6JsbYHJ0sJfxotz4uFOuXzcpmpkUemigbj+2A0KNGW8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063017; c=relaxed/simple; bh=uewkcNd95ZHlKgRh9s9BjLOQ9p1PfnXZBXKYFxUQs+s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RcPMO+EImxmlv4nOlxXHyJj1nD8Fr2A1t8FrGv+TleybA3QDo8IUep/iNb9M9eINHOj1QauunQ6o3N/l16zgGdYkC6MAdA2WZ/fnbLWtQUVRx+5xbIWkR5FU+eL/RkEvuqXnOAk1XDqboQkUKssLGKJmIZZOtvl2yMN8m7H9Cyk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=GCuvI9vj; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="GCuvI9vj" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a9a850270e2so340399066b.0 for ; Fri, 08 Nov 2024 02:50:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063013; x=1731667813; 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=zbiN9IGyg41tRnn+qhaJfXa1IbZUMrZmq8kxPEzHJls=; b=GCuvI9vjYVOfD4WtDw5L8OND+pAqnmtDxo8KRmGjhx2grWFar6nAA7qlcmr2gKSF2C UGrZeV+e9Uw5QDRDl7KH4YSh50dKmwVaLRucN/or8dewRFEYuCPPMwaSITe1Dqa4ebYZ 6cUCHjoU6mq8GSvT0n4ANDrk4qSvg8lFJX1pciSXIwRjMdlDx9+059Qj3o4YJhpjWG0f nIHoIjaT0ulH3mVybGiQqKQ+O9umZJWIYhOMnl+6W5ePU3M4QYlRAGtJryL6sJ0obqRP rmNb92p9ct0UwpWIzAQPwfp6fQDlOtDjiIQ+bVwiXAWMjPT3TuSvdMwFar8cs+joia1a Y5mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063013; x=1731667813; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zbiN9IGyg41tRnn+qhaJfXa1IbZUMrZmq8kxPEzHJls=; b=iQGaywaa0Xx2/xw4zggxNeXMRhxmHi3o3/3rAvYlj11XvKw3I+055P6NL8h3sPDHMz GglP11pc2bPoYZ/UoHXO1AE5dO8MVCMMtVzhO9dFewZBNss9HTjDX8COs0M0F/msXRcA JdS5JSM3eUxfeVd/wKOUpbAORe8C0i7yCiBnuayvbrLpDtg0cOIzONz6Px8VGQxH2BH4 CLPBiIJX4VIrke3Y2QbHgclHABNqyGHO0Stt4kYTnfENqqbbBSCgbF52zK8lqS4odgmF bo3xYcJjBcI3YXxjV5eBnb8WDnSacs8lhR5bE7LB2sMwP1Pf/DvlDCdQ5SLh1viWypLK ovtA== X-Forwarded-Encrypted: i=1; AJvYcCV/vQnSd7mDGeDqzhLBsogTgbRRLlNppyuWIvnhNZAFi8P7VYk5hAQFri59PP6ecsPfgk96q1BZVhG3GfM=@vger.kernel.org X-Gm-Message-State: AOJu0Yx/DDRfZwrGC5sCVI4SnSD/X3njZIXB5sJhS6yAnI9D/w96GNto iWujBXn/a9v9/aWdjtZtwaPcqugViah3fIiVnljJkeTNXhzbn98t8gjiFbtPeZY= X-Google-Smtp-Source: AGHT+IFLIeQzzWSczltoBsjuUXERtW5ISfzTQIM6FdmX0Cy78vMrbXT7qlwdEcL+pljT0Msk1Ps1ww== X-Received: by 2002:a17:906:6a01:b0:a9a:5b78:d7d8 with SMTP id a640c23a62f3a-a9eefee9493mr217734366b.17.1731063013363; Fri, 08 Nov 2024 02:50:13 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.50.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:50:12 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 02/25] clk: versaclock3: Prepare for the addition of 5L35023 device Date: Fri, 8 Nov 2024 12:49:35 +0200 Message-Id: <20241108104958.2931943-3-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea The 5P35023 and 5L35035 Versa 3 clock generator variants are different but the versaclock3 driver could be used with small adjustments. The features that are implemented in driver and differs b/w variants are the PLL2 Fvco and clock sel bit for SE2 clock. Adjust the driver to prepare for the addition of 5L35023 device. Signed-off-by: Claudiu Beznea --- Changes in v2: - none drivers/clk/clk-versaclock3.c | 61 ++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 18 deletions(-) diff --git a/drivers/clk/clk-versaclock3.c b/drivers/clk/clk-versaclock3.c index 76d7ea1964c3..1398d16df5d0 100644 --- a/drivers/clk/clk-versaclock3.c +++ b/drivers/clk/clk-versaclock3.c @@ -78,9 +78,6 @@ #define VC3_PLL1_VCO_MIN 300000000UL #define VC3_PLL1_VCO_MAX 600000000UL =20 -#define VC3_PLL2_VCO_MIN 400000000UL -#define VC3_PLL2_VCO_MAX 1200000000UL - #define VC3_PLL3_VCO_MIN 300000000UL #define VC3_PLL3_VCO_MAX 800000000UL =20 @@ -147,9 +144,13 @@ struct vc3_pfd_data { u8 mdiv2_bitmsk; }; =20 +struct vc3_vco { + unsigned long min; + unsigned long max; +}; + struct vc3_pll_data { - unsigned long vco_min; - unsigned long vco_max; + struct vc3_vco vco; u8 num; u8 int_div_msb_offs; u8 int_div_lsb_offs; @@ -166,12 +167,17 @@ struct vc3_div_data { struct vc3_hw_data { struct clk_hw hw; struct regmap *regmap; - const void *data; + void *data; =20 u32 div_int; u32 div_frc; }; =20 +struct vc3_hw_cfg { + struct vc3_vco pll2_vco; + u32 se2_clk_sel_msk; +}; + static const struct clk_div_table div1_divs[] =3D { { .val =3D 0, .div =3D 1, }, { .val =3D 1, .div =3D 4, }, { .val =3D 2, .div =3D 5, }, { .val =3D 3, .div =3D 6, }, @@ -386,10 +392,10 @@ static long vc3_pll_round_rate(struct clk_hw *hw, uns= igned long rate, const struct vc3_pll_data *pll =3D vc3->data; u64 div_frc; =20 - if (rate < pll->vco_min) - rate =3D pll->vco_min; - if (rate > pll->vco_max) - rate =3D pll->vco_max; + if (rate < pll->vco.min) + rate =3D pll->vco.min; + if (rate > pll->vco.max) + rate =3D pll->vco.max; =20 vc3->div_int =3D rate / *parent_rate; =20 @@ -680,8 +686,10 @@ static struct vc3_hw_data clk_pll[] =3D { .num =3D VC3_PLL1, .int_div_msb_offs =3D VC3_PLL1_LOOP_FILTER_N_DIV_MSB, .int_div_lsb_offs =3D VC3_PLL1_VCO_N_DIVIDER, - .vco_min =3D VC3_PLL1_VCO_MIN, - .vco_max =3D VC3_PLL1_VCO_MAX + .vco =3D { + .min =3D VC3_PLL1_VCO_MIN, + .max =3D VC3_PLL1_VCO_MAX + } }, .hw.init =3D &(struct clk_init_data) { .name =3D "pll1", @@ -698,8 +706,6 @@ static struct vc3_hw_data clk_pll[] =3D { .num =3D VC3_PLL2, .int_div_msb_offs =3D VC3_PLL2_FB_INT_DIV_MSB, .int_div_lsb_offs =3D VC3_PLL2_FB_INT_DIV_LSB, - .vco_min =3D VC3_PLL2_VCO_MIN, - .vco_max =3D VC3_PLL2_VCO_MAX }, .hw.init =3D &(struct clk_init_data) { .name =3D "pll2", @@ -716,8 +722,10 @@ static struct vc3_hw_data clk_pll[] =3D { .num =3D VC3_PLL3, .int_div_msb_offs =3D VC3_PLL3_LOOP_FILTER_N_DIV_MSB, .int_div_lsb_offs =3D VC3_PLL3_N_DIVIDER, - .vco_min =3D VC3_PLL3_VCO_MIN, - .vco_max =3D VC3_PLL3_VCO_MAX + .vco =3D { + .min =3D VC3_PLL3_VCO_MIN, + .max =3D VC3_PLL3_VCO_MAX + } }, .hw.init =3D &(struct clk_init_data) { .name =3D "pll3", @@ -901,7 +909,6 @@ static struct vc3_hw_data clk_mux[] =3D { [VC3_SE2_MUX] =3D { .data =3D &(struct vc3_clk_data) { .offs =3D VC3_SE2_CTRL_REG0, - .bitmsk =3D VC3_SE2_CTRL_REG0_SE2_CLK_SEL }, .hw.init =3D &(struct clk_init_data) { .name =3D "se2_mux", @@ -982,6 +989,7 @@ static int vc3_probe(struct i2c_client *client) { struct device *dev =3D &client->dev; u8 settings[NUM_CONFIG_REGISTERS]; + const struct vc3_hw_cfg *data; struct regmap *regmap; const char *name; int ret, i; @@ -1029,9 +1037,16 @@ static int vc3_probe(struct i2c_client *client) clk_pfd[i].hw.init->name); } =20 + data =3D i2c_get_match_data(client); + /* Register pll's */ for (i =3D 0; i < ARRAY_SIZE(clk_pll); i++) { clk_pll[i].regmap =3D regmap; + if (i =3D=3D VC3_PLL2) { + struct vc3_pll_data *pll_data =3D clk_pll[i].data; + + pll_data->vco =3D data->pll2_vco; + } ret =3D devm_clk_hw_register(dev, &clk_pll[i].hw); if (ret) return dev_err_probe(dev, ret, "%s failed\n", @@ -1059,6 +1074,11 @@ static int vc3_probe(struct i2c_client *client) /* Register clk muxes */ for (i =3D 0; i < ARRAY_SIZE(clk_mux); i++) { clk_mux[i].regmap =3D regmap; + if (i =3D=3D VC3_SE2_MUX) { + struct vc3_clk_data *clk_data =3D clk_mux[i].data; + + clk_data->bitmsk =3D data->se2_clk_sel_msk; + } ret =3D devm_clk_hw_register(dev, &clk_mux[i].hw); if (ret) return dev_err_probe(dev, ret, "%s failed\n", @@ -1108,8 +1128,13 @@ static int vc3_probe(struct i2c_client *client) return ret; } =20 +static const struct vc3_hw_cfg vc3_5p =3D { + .pll2_vco =3D { .min =3D 400000000UL, .max =3D 1200000000UL }, + .se2_clk_sel_msk =3D BIT(6), +}; + static const struct of_device_id dev_ids[] =3D { - { .compatible =3D "renesas,5p35023" }, + { .compatible =3D "renesas,5p35023", .data =3D &vc3_5p }, { /* Sentinel */ } }; MODULE_DEVICE_TABLE(of, dev_ids); --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (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 190DA1E5703 for ; Fri, 8 Nov 2024 10:50:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063019; cv=none; b=DUn6yT9eGCiHxSnbq+1Ed6RSh9CVUWd6ik/pzim5A9e5Vf0BpoY2pQe+xStmpj0UFoomMNpOQxd57I/GXFSaHk96POP1tKeTz5JVsoLn96B6bd2TaEyhuAHwb9KNvaSDeztGoYd06uao8jmOOEwOhT9hC8CTbUfLHl1ftRlbEvs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063019; c=relaxed/simple; bh=G6w9SU/JyPHNM+uECWSJTLvFRR12Nj03dy5VFwcn+fE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VRMJY79jfPWPBCtck93PhB2Qf6lylgbwIvzfk02V+6nVsOB92gCFnqKd5mOBdukG4qk/5b4IEdPF7XrE0Mj9WJ78y/58JuevlkVWU3El/axc/u8rL4s31qFGOL820iKxKc/G240Idqu+3rAIm1b2ZbSmg6J5F2NROoKQHOHc600= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=JMUOky6S; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="JMUOky6S" Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a7aa086b077so268788866b.0 for ; Fri, 08 Nov 2024 02:50:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063016; x=1731667816; 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=vTliOjC8o47muw2PXFdZ4DeFAQHj/4JtsrXTotLewwM=; b=JMUOky6Si7BteOAMJo3Mi0Y44XpWhzXYDI2halQy0dLiuyxXXLb8GuPfKrOOittzvo Sdp+mExdujlkayFWLoyfSWgl7g04ky/cUWOC8JKYZAOIlaFRS7Vv+it3JXQGRxuPefiu Rx9uiok87Mmfx8ZB2fTVJ6u1FWg2EQXv86nkdE64zIX4xQtQXwBghc1d899zevw7erR5 plcvEiS9UEGmdf/aPaH3r505RxssssHpyYTiPOqDgnVmUGOanNosEAz8fH0fUVnUf2NT AU2nuoDtKMPMHpHUbhDHlg5Sw+m0nPhs8k0ktwBp4Q6+vQbBRJKZAELvOzAMqAGx/SAD I9aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063016; x=1731667816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vTliOjC8o47muw2PXFdZ4DeFAQHj/4JtsrXTotLewwM=; b=snSqUvjh6l9jxKWUGhlJXmzBCpNtZjNdOPUXm8qsqBAR/H5RN4Q+LFYT5ckfocXCc8 jBLk3z2x4sN4icCB3x05EkCD0OCprjeuo1HPB1Gv3AiuQw+Fhnym8jxsunoUKOZjjM8n M9CspJSYWVasI1plnoQeIBTiBzsRwu2BSBbnMb044Vrt0FAzTgfhmB5kUvBCq1aStdH/ CP2qxbIo+BTqTn78wHFGjK5EocaVAGC7jnQpYbTFPZP1nBui9YTfe0LhDu5IR6czfDZF 6H+7bN7vOqEGuj3mN7Q0n9FQwNwhMT+hN8pOXSeFTKsJQC4q/cgm/LyGwk5u4Qv7hS14 0d2A== X-Forwarded-Encrypted: i=1; AJvYcCXqFW6u7iPx5iEvL+WTDoxWEYgh38dBewTQM+lq434vY46cjJqMgXp+U6uOSC9zozcWziJROn9QI9PqZms=@vger.kernel.org X-Gm-Message-State: AOJu0YwzdHH77gZZIpOE7mjIblA0mv8loxF/1jEVa9a9+Scz9hMPw5aE nnBV3HHuHbEuaSHLR99oYdBSxQXqYywQnZhNgRgAoHrqtBiQJE19Jj6MM7libxc= X-Google-Smtp-Source: AGHT+IHBudDnUY5c/ccRKDOgI0Wk4Gwcz9Ak4iZWC2EMYNOBaQ417ZT6U7DBOFMInbbrD3TDu5MuIA== X-Received: by 2002:a17:907:3ea3:b0:a9a:3fd8:9c95 with SMTP id a640c23a62f3a-a9eefff131fmr192652766b.47.1731063016457; Fri, 08 Nov 2024 02:50:16 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.50.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:50:15 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea , Krzysztof Kozlowski Subject: [PATCH v2 03/25] dt-bindings: clock: versaclock3: Document 5L35023 Versa3 clock generator Date: Fri, 8 Nov 2024 12:49:36 +0200 Message-Id: <20241108104958.2931943-4-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea There are some differences b/w 5L35023 and 5P35023 Versa3 clock generator variants but the same driver could be used with minimal adjustments. The identified differences are PLL2 Fvco, the clock sel bit for SE2 clock and different default values for some registers. Acked-by: Krzysztof Kozlowski Signed-off-by: Claudiu Beznea --- Changes in v2: - collected tags Documentation/devicetree/bindings/clock/renesas,5p35023.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/clock/renesas,5p35023.yaml b= /Documentation/devicetree/bindings/clock/renesas,5p35023.yaml index 42b6f80613f3..162d38035188 100644 --- a/Documentation/devicetree/bindings/clock/renesas,5p35023.yaml +++ b/Documentation/devicetree/bindings/clock/renesas,5p35023.yaml @@ -31,6 +31,7 @@ description: | properties: compatible: enum: + - renesas,5l35023 - renesas,5p35023 =20 reg: --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (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 8F06F1E376B for ; Fri, 8 Nov 2024 10:50:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063022; cv=none; b=miql71q4SUbZD++UEEraOrSSj6SrH5qGqLXmSFoypBGAmkEMOyOsEXIpJOHmHuYzAU0H+kWC4STJhAQ6laOTBQFlWQGLFBlhN0ELYcz6Ggo10MHr2808NUDbWd7o+mARo8KCYnrqO3g+APIicFEZeHvypeGb2LK1e1nbSbTsHvc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063022; c=relaxed/simple; bh=gcbLp0EDuhXnLWcMfm7HepHAEOi/ma1whorW46vYLVc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tYWtC3fI+kDptgOPQ79RHLl46f/v8lbbjQGkd4iJFjgEhZ6Fv2WJcuhvQHR+0VK6mC+fFIcSehXf5bbjl06Pp4eQJ1hopuUB4aUbiyxJNGzRGOTRUo6XKaZ1tCLqnDGCb8xjY5qa2EGQ+fOIR93wBlY4YXlC6nsRP0K6H/yVR/o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=JYHpwHmO; arc=none smtp.client-ip=209.85.218.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="JYHpwHmO" Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a99f646ff1bso284286866b.2 for ; Fri, 08 Nov 2024 02:50:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063019; x=1731667819; 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=E9TIDVBXswiUE5qwMC9ASUWD1mYCqJbFdA9aImOCUio=; b=JYHpwHmO3Xe5Xq6eoP1qTEBV7R7rLrulFoSaktZ4tgiwRFL5uHzOnjbUv77xFH75ac 35hnxHCV4NyfY1VN7Gl1Bj4Hq4cRGkG+8MsbIgPoBaQWq+fLQ2RPHGdD2xlOMjxzIY86 gkTyhl3r8C87BmzeAxOsi9iHJdtyJKxConxafdIwYRv8eOPVeScM1PUz1uDrDIL/8wgV Nk6A0FXeaFGV9jT7F0VnUDdPUTb8+dFKfVRRnDUSPEyRzPTjM+kSbt8gNUmgaofHgoaY 8Ve5W1USshjgDvKkBKDdO8r013QGy+CPEyYBiZeDTnDtekW8eYdr+UbIDBMhqDKU+v0t Peuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063019; x=1731667819; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E9TIDVBXswiUE5qwMC9ASUWD1mYCqJbFdA9aImOCUio=; b=EIQtOI+2oDZ8mBF3SPPeoIfogSwWlNk0DocowIZNR5xIRgDoAeYu98djPvk1H13M6V AjJ/5P2PckS+SsuuV50f++nGZlzjHj9tbeitLR9RrL8FOuJLovR3ifzhPD1bu3KxA0Ya ZNa++s/NbW84HjFtOPyqqKDO7eg1lZ3N7excvt9VEHB76oI9JAhLngEjVolrjmyj919h K5K+VXmeFUkRmNUL5ws22hlFtEyfftiKmaWwpqQTV5A9W77B7k/SvnL39Et1mA473aDZ 2GXrQjISJAuwqqrWdwm1xo3wms5Gqq3Efv6vZOe1QToRONvwP5V7kzlusnfuRtpNui5J +8IQ== X-Forwarded-Encrypted: i=1; AJvYcCXIfY0LJ7AGdeM0Kn9TQUn6eSjzvs+83/EHzeIXciL9Cbp5LmnsT/5+/ns0FtxwVwC/yo5H+V47Hq5kQ0s=@vger.kernel.org X-Gm-Message-State: AOJu0YzSz5+kj4OLEqEeu7tRXyK1L0LGM3kTj0WJfyIp8JyuDmtCy9lX nD4WrgQ05J9OW2Hr5DYe+NHmB0ae13tTtV/dV73m2apCTPPQpWD887vLpDPVz+Q= X-Google-Smtp-Source: AGHT+IHeDcoAe/sAQtrD3IXuJOZe9XyJNaWHB16C9eW/o6XJaPaVjTfxbe6gh+mYzP09cZuV2+uATQ== X-Received: by 2002:a17:907:6d04:b0:a9e:441c:f729 with SMTP id a640c23a62f3a-a9eefced5fbmr221846166b.0.1731063018920; Fri, 08 Nov 2024 02:50:18 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.50.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:50:18 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 04/25] clk: versaclock3: Add support for the 5L35023 variant Date: Fri, 8 Nov 2024 12:49:37 +0200 Message-Id: <20241108104958.2931943-5-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Add support for the 5L35023 variant of the Versa 3 clock generator. Signed-off-by: Claudiu Beznea --- Changes in v2: - none drivers/clk/clk-versaclock3.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/clk/clk-versaclock3.c b/drivers/clk/clk-versaclock3.c index 1398d16df5d0..9fe27dace111 100644 --- a/drivers/clk/clk-versaclock3.c +++ b/drivers/clk/clk-versaclock3.c @@ -1133,8 +1133,14 @@ static const struct vc3_hw_cfg vc3_5p =3D { .se2_clk_sel_msk =3D BIT(6), }; =20 +static const struct vc3_hw_cfg vc3_5l =3D { + .pll2_vco =3D { .min =3D 30000000UL, .max =3D 130000000UL }, + .se2_clk_sel_msk =3D BIT(0), +}; + static const struct of_device_id dev_ids[] =3D { { .compatible =3D "renesas,5p35023", .data =3D &vc3_5p }, + { .compatible =3D "renesas,5l35023", .data =3D &vc3_5l }, { /* Sentinel */ } }; MODULE_DEVICE_TABLE(of, dev_ids); --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (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 2EB351E764A for ; Fri, 8 Nov 2024 10:50:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063025; cv=none; b=a2Jpd/ljKNoUWlSg50uahnxflqexJI52kbWg7+QAYpK+7mItrvbZALSeI4SGL1fUgSXwUY0GCKdPoDskFS5JcCkLoDZvzkFMiklZwJSHovOjMUB2omf4gpkQqM0D7pgmexa/+NQ/x0Ea/L+gVg1Mlx5INLdrdMHCJHpgEY9+TxM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063025; c=relaxed/simple; bh=hrCK2Zxoh8/JjqVyDPNA3H1fDJQ1g4J50LV6ttVxEeY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BK0Af3msmBxH4hBHpojkcB/YYtY5vJQif0Mh3zEWT9GlwJ57nx/eP+nZZQ5JCePsfClWUYybSrRAik4ZpOLVw6WdLtOGdxgY9IyWrHStouTcZcYWaaPGyxmgA9MY/ADCWZrCw0oWI/j37mEPUJtz8WFEIuL2uiCyPFw1MYlnLmU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=Of2V5iOP; arc=none smtp.client-ip=209.85.218.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="Of2V5iOP" Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a9a0ec0a94fso311184666b.1 for ; Fri, 08 Nov 2024 02:50:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063022; x=1731667822; 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=eJnwa8rEXc+YSCArORf3HuNYYv4Q3mj8WrGo4fAJplQ=; b=Of2V5iOPubC2ctWQI9tu1n17YiJ5OYg2t9IzB3hN+9WZKP2m5jhVxPU6ZWpwiblH1l ILB5NpUi5Q7a7UbnMeCv5fZeFLUfsFN+YTNUWqeOG5Azw88maJx++teA3dde35q4pmPn yVo2CXDwkCyJD83Wn3d2qEjMBtgVN63F2Tu/J6Ahs0VPUw3rrfL4mrb/O+jt3pXTSt6u YKFkoxu9lUu/2HbDc2vrysyvthvCPPVf3uAilAwndCf7IUW9r6MoBvNxih1o3+fsGkdY scmEwHFYaUsHT4nsLfmKezc73VIhRTZF4FeKe4v72V0xifcrnnoIkhvkpG2mSdG9phBf oXWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063022; x=1731667822; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eJnwa8rEXc+YSCArORf3HuNYYv4Q3mj8WrGo4fAJplQ=; b=O5eMFGuoFSGJSAjtFu4HjP4u5EHDXo/1LxNe56IURhmH4gAmUw7gOzCCwFCNmu1Egw YaY2bayC5wZvlymEOdGdNoKV4ImMxYxFujgX7kJ2nlGwp1m9SkFiSB6ftF5GRdaeNX+e ULH9gRYKj3o2T20dR1QtkGqbXLuRBJ+4il/KEXM5iqjr9j9pHfeDo+lzfmTdeNR28fty zZ1C3bimyj6iNwsDYJOjvOhrTVqQ8K2cKAnQPquP0KLtwwrOioYK+VCr3xpkccxaMjA3 qPt3sE2aorIIuAZefcKU050RphfTXl2myJwb4knrhlhMKVHOYMz44FgcxoUxzd+Mw2eD tWNw== X-Forwarded-Encrypted: i=1; AJvYcCWpzB+yUHMDkwTRl0kUJZ5kas5RY+273SPmMWZHl139FO3f9VnIKQVpo8l+j0vqZ1P0ZU5OkQJXN6PfUWA=@vger.kernel.org X-Gm-Message-State: AOJu0YxQnGFOYjY7Uw3hAhO9Gfr0aP5vY6v2WCfX9Hks442AasNLce/H Rgs3fXPACjeN6jKP+R/Mx4ainCcTSrM7h1+kX8JFOd9GdvFfiwb9Bw1pjHP/VmI= X-Google-Smtp-Source: AGHT+IGNV2dA76ASbDo550kV8XOA74/mKA8GWhaRSvJ7vuuCc3zBxqC9yt/lpj67Er6bgye0miE0Yw== X-Received: by 2002:a17:907:7b88:b0:a9e:441c:f74d with SMTP id a640c23a62f3a-a9eefee456bmr157988066b.16.1731063021547; Fri, 08 Nov 2024 02:50:21 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.50.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:50:21 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 05/25] pinctrl: renesas: rzg2l: Add audio clock pins Date: Fri, 8 Nov 2024 12:49:38 +0200 Message-Id: <20241108104958.2931943-6-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Add audio clock pins. These are used by audio IPs as input pins to feed them with audio clocks. Signed-off-by: Claudiu Beznea --- Changes in v2: - none drivers/pinctrl/renesas/pinctrl-rzg2l.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/rene= sas/pinctrl-rzg2l.c index 8ffb9430a134..1190ca4b1808 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -2086,6 +2086,8 @@ static const struct rzg2l_dedicated_configs rzg3s_ded= icated_pins[] =3D { PIN_CFG_SOFT_PS)) }, { "TDO", RZG2L_SINGLE_PIN_PACK(0x1, 1, (PIN_CFG_IOLH_A | PIN_CFG_SOFT_PS)= ) }, { "WDTOVF_PERROUT#", RZG2L_SINGLE_PIN_PACK(0x6, 0, PIN_CFG_IOLH_A | PIN_C= FG_SOFT_PS) }, + { "AUDIO_CLK1", RZG2L_SINGLE_PIN_PACK(0x2, 0, PIN_CFG_IEN) }, + { "AUDIO_CLK2", RZG2L_SINGLE_PIN_PACK(0x2, 1, PIN_CFG_IEN) }, { "SD0_CLK", RZG2L_SINGLE_PIN_PACK(0x10, 0, (PIN_CFG_IOLH_B | PIN_CFG_IO_= VMC_SD0)) }, { "SD0_CMD", RZG2L_SINGLE_PIN_PACK(0x10, 1, (PIN_CFG_IOLH_B | PIN_CFG_IEN= | PIN_CFG_IO_VMC_SD0)) }, --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (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 E9D8A1E9067 for ; Fri, 8 Nov 2024 10:50:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063027; cv=none; b=GcMzQJshvvObccVw0RgunygdoZft2yskj+WMTMhhGwzWjiwSAOUkbIowKyhJgLcK8fIEOAHL0VVfRtHsIj/2ETIA93cqfqEhy/JUzvn0ch1Xk27EukuWJfBxPNDltgnrDq9TTpAgcH+PRNY9jGP4tUYFuLuJxmKVmPc8/vdN3gI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063027; c=relaxed/simple; bh=bWpWS6bGVe6tZgUu3YvQOkO2GLe4NObnCQ10WekbNFk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Gu4xv6uXREcXk5wFrhu4ihPRQVWobqSKQI4Jm8KRDvG9uBPi5/BpiUaVepZNs9/+/aauJuiFJBwFE3K83OrefYC+AF9bKKibdtnZEpc6ytZwXboPluw65rvMWC7kATMpknwYORyFG8h2Mp6E2itbQMflGoX4JF8XRlQyRm+yqHQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=DiMckZJs; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="DiMckZJs" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a9a0ef5179dso324011366b.1 for ; Fri, 08 Nov 2024 02:50:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063024; x=1731667824; 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=riCvVik/XH/zEeXyUG50vFcKVp4ajfewa26rpwBWd84=; b=DiMckZJs7ACfGM2ZQU9+Z8Yu8o/9tcakEEwKPCSRZpQLUw3jTwvzsvg7gS+DXKX0WB 3YABT/yInAEKBtRMZWUBAi1Rl0zSr7W/JcVmGAvj4vA2/lmTerpWIDzVIyKiixPpjIyz f6L7hGl6Mi+KjN28WZKt1Vig3URF/s712+KhgxpRMch/1CGjO5Le9oNqzEacuRSrViT4 eieC7Jk8avBRx0mS7w8ahdQNUmDeooWKceZOac18bL4BDdSDqAK1k+0iext/YymZlinh bk9Zlh0ELtYpQgGDvXU1+q4hVUIK7x0A33WoJtG6NQovnTDlVCHm7dBFdeP+udS0r5vz iFxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063024; x=1731667824; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=riCvVik/XH/zEeXyUG50vFcKVp4ajfewa26rpwBWd84=; b=RgJxFczH3FZ6S6Tl177I/krq0IZIX2TRWMYVoqJspTsZUZ2KZ7QXcojzXyurL7G+XZ VNfmj9qZNCHLwaYWkpY+IVGpqa89mZN1ANDJxX470AAcw9poI/ofuhdVgJAGGQvdKzZn A3ISeR8TV6cIsK+sy5LFF9dPZ1UToyyxtgNSxpdTiEfMp/5ofjD1DUJrsptdisarqzEO tCsQHhm4nPNsP/NAZbchU2+XkvvrqRYe425gle1+kn8jRqEjnVCZEYoDW51sOYfeauto mtuR8TuZ8TWg3C/lpEbxnKUknny9fJ21iaGf0XkGki3fvVvv8X9n2rUxzOIUeokGendw kZew== X-Forwarded-Encrypted: i=1; AJvYcCXnwuUT3/rAd26prVU30LVXZSDqLJ9FuQ6nD0MxlDky0JnOFADjd8uE9vMtzvtAwdr1/Zhn+vFSH5e4df4=@vger.kernel.org X-Gm-Message-State: AOJu0YxkZVoJeAmbteFBURZ894x5nWXbLXmnBdMLHoC6NWR/aew8JNzg tdzZVH855re/XZsvo8KzRBEqq8+CrebFNopuw8bCEG2o5MULC5ZAcUyO5/2pvt0= X-Google-Smtp-Source: AGHT+IGaJCroj2+zUZfminHTFhl+OKQZqp+8gJVCO0eimP29bQw5M/mW9bNfWu638LxY/7dOtdvIXg== X-Received: by 2002:a17:906:ee8b:b0:a9a:1585:dd3b with SMTP id a640c23a62f3a-a9eeff0e35emr192664266b.21.1731063024276; Fri, 08 Nov 2024 02:50:24 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.50.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:50:23 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea , stable@vger.kernel.org Subject: [PATCH v2 06/25] ASoC: sh: rz-ssi: Terminate all the DMA transactions Date: Fri, 8 Nov 2024 12:49:39 +0200 Message-Id: <20241108104958.2931943-7-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea In case of full duplex the 1st closed stream doesn't benefit from the dmaengine_terminate_async(). Call it after the companion stream is closed. Fixes: 26ac471c5354 ("ASoC: sh: rz-ssi: Add SSI DMAC support") Cc: stable@vger.kernel.org Signed-off-by: Claudiu Beznea --- Changes in v2: - none sound/soc/renesas/rz-ssi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c index 6efd017aaa7f..2d8721156099 100644 --- a/sound/soc/renesas/rz-ssi.c +++ b/sound/soc/renesas/rz-ssi.c @@ -415,8 +415,12 @@ static int rz_ssi_stop(struct rz_ssi_priv *ssi, struct= rz_ssi_stream *strm) rz_ssi_reg_mask_setl(ssi, SSICR, SSICR_TEN | SSICR_REN, 0); =20 /* Cancel all remaining DMA transactions */ - if (rz_ssi_is_dma_enabled(ssi)) - dmaengine_terminate_async(strm->dma_ch); + if (rz_ssi_is_dma_enabled(ssi)) { + if (ssi->playback.dma_ch) + dmaengine_terminate_async(ssi->playback.dma_ch); + if (ssi->capture.dma_ch) + dmaengine_terminate_async(ssi->capture.dma_ch); + } =20 rz_ssi_set_idle(ssi); =20 --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (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 AC5A81E764A for ; Fri, 8 Nov 2024 10:50:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063030; cv=none; b=OifhYCQ0SjZcYlExU9gQxUEyZkeikGFj33+0W5i/4oONSmF9VJBTHn6nfDmnp0UbjkxIp3Ygsarvxb2iF9+wTjXQ6zU+Vi/7t4keiY+SFDOaK3e2gY2xBXmsLl98qYU62vf6cGsWyXw51LzCsG2Z0D92x1l9V3Hglza9NVResBM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063030; c=relaxed/simple; bh=h/y23T6WXsZosOzfQNnDY+T32ZVWlwo2fUWMCoZj4Lo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EykJv1cZ6lWyUwYGnZ+YpOxLo6xaeQTPCU8vkGEdH5NXHipmYgLFZXHsXWZPNcVpzNkFGCj7xP60Z0N//jky61J5KO+hAuIhuVp/XumT64wb8P+K0noxmC1laGPr3rnvkOKv+PNkQCqif3YZOtSO5YNGbPFjaBDn+PQ/iXk/+4s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=A81QYsmV; arc=none smtp.client-ip=209.85.218.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="A81QYsmV" Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a93c1cc74fdso298594666b.3 for ; Fri, 08 Nov 2024 02:50:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063027; x=1731667827; 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=EUINzcxd/jCXeTMEdPSmJ3jqpY02TDO75OGNa1aC3GU=; b=A81QYsmV5wYG7J3JXFfonWCtIdvPYV5VFyOYawGMs6iObrxcBQudpD6KldaYHa19kn E6d4I0655LOKvCqNOVrBXot3+5zE1tdXUaRZOOeYuDnj/USzrZjRs03+GChqdk5pKZuZ TQp9oZ+GbgjHXbwaKWx+wb/FCp/2WEOZ6tW800E02lq7DOTmuIc+lc8/shO2B1dYMR97 MwS4hqX6VzTjnWa1fBsGRq1g4PVxL2V4TZ65L+bg5ilxaypaLPWQ1HDR5RUPuxRqdhK2 l7nA9iOGwauyritVI0sXOQILpVGX98fVB3QD9yYZR/2ytJ06zxuH4wWWH6mg+iC5gz4v yHkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063027; x=1731667827; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EUINzcxd/jCXeTMEdPSmJ3jqpY02TDO75OGNa1aC3GU=; b=Kv17Q/WBhA4ZQdkfXMGuzk0ynAMGC/7YZ2n0b8c6XDWTwVV8XYc1PQLjLsgPGR/440 Dol9z5VSyzmF9TR+0gEwrh33E80IGcLpPUJxK2osXlr3INGLTziqyyoWKujpu5ZXI+TM /Kn7BU4cF5oXOTFOjkGZO8EdoWRo7I22iDe2gacVxou8d5XRceh2QwuXycBikGIC7dHN 4PQeWiXfDqhGxn7SeYhIWfLXj+NXsrgSrBuHi5Sd0Ve+/NAxc8PeYPORr3qgKVcSYYBM Eb541843Kz/xDdbX3u7G6NbobGdHd6BNxdhx72Ol0iEVAYsnpSBRiw96+NxTzhfU/ilv Kzxw== X-Forwarded-Encrypted: i=1; AJvYcCXyYnatZQDFBPjIm52kXSkyqVVdg//kJks8BqhmubmtQVaXQ+6+T5tL44mi42X4n4qGkeTX5Vma5zhwjo4=@vger.kernel.org X-Gm-Message-State: AOJu0YxoGBkKoWswXzF4zPxSu6FTJMnvJgOch6ZEL/G+NzXmGZCAy2gv iWmJfo7BUB1v2otDEYCluTW1rqSdQNJ1sX5SLhcmeV2ryQsU5+uSdeJseUg7mzk= X-Google-Smtp-Source: AGHT+IHa+tQzc4xAxHWtIFyR5mkaoQUPDtmy4x/74qPWFJq2UkKS0Y337B/HDHtOvTb+ulbrG5B3Lg== X-Received: by 2002:a17:907:9603:b0:a9e:b5d0:de6 with SMTP id a640c23a62f3a-a9ef0016d4emr181814966b.50.1731063027209; Fri, 08 Nov 2024 02:50:27 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.50.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:50:26 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 07/25] ASoC: sh: rz-ssi: Use only the proper amount of dividers Date: Fri, 8 Nov 2024 12:49:40 +0200 Message-Id: <20241108104958.2931943-8-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea There is no need to populate the ckdv[] with invalid dividers as that part will not be indexed anyway. The ssi->audio_mck/bclk_rate should always be >=3D 0. Signed-off-by: Claudiu Beznea --- Changes in v2: - none sound/soc/renesas/rz-ssi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c index 2d8721156099..b4439505929f 100644 --- a/sound/soc/renesas/rz-ssi.c +++ b/sound/soc/renesas/rz-ssi.c @@ -258,8 +258,7 @@ static void rz_ssi_stream_quit(struct rz_ssi_priv *ssi, static int rz_ssi_clk_setup(struct rz_ssi_priv *ssi, unsigned int rate, unsigned int channels) { - static s8 ckdv[16] =3D { 1, 2, 4, 8, 16, 32, 64, 128, - 6, 12, 24, 48, 96, -1, -1, -1 }; + static s8 ckdv[] =3D { 1, 2, 4, 8, 16, 32, 64, 128, 6, 12, 24, 48, 96 = }; unsigned int channel_bits =3D 32; /* System Word Length */ unsigned long bclk_rate =3D rate * channels * channel_bits; unsigned int div; --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (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 282531EABB6 for ; Fri, 8 Nov 2024 10:50:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063033; cv=none; b=hfR6d3PlwFnNXnkkebzFouSy7zadwjSzfqFdNj3LX0Z04Xo2afEIQkW5PPBzJzjQ3XJmm5hZqvQVOw9zlj8ouLc2J0gxMLUiAYEeqSofwd0Wu9xv8rZisyS7OzNmuOyvDCrvsy0e386AP6+MEhAXj8gOE473fKX0HgiNkLfwNLY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063033; c=relaxed/simple; bh=uQfKkEoR32N0d989ZespVXFD+EYoWvBvpUMB8tvOdrg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lhbnQjZZk9GXfFHa+E3dEIRtyIPSwh8W8Q3/AFvNd8q4mwtDJ+VNSzSsA3CiLx8duf77rP4tS2GtyE5ZY2dFsVNeCPeVq53kTHIShBy5wERuFktFrOblDv8YqWK1CnN13j8l0dH3Vfu+W0jHi6RZARBP5MxCEaXlrv0uFhapJK0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=iebG5QP+; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="iebG5QP+" Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a9ed7d8d4e0so291296966b.1 for ; Fri, 08 Nov 2024 02:50:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063031; x=1731667831; 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=RVWcqtL2/z6hHqWPVR/NbA1tV+dgOCVHn7AuI7jqeJ4=; b=iebG5QP+iP6Inr3RzPjO2Qc4Mlyw9fr0dqb3vxbEk6xx1YTG7nVwApjBp1mYrppw0s rzQis8MO+CHhIWaZw0J25uvRxk2DcbHUNjdqrvX3lC3zTh4VUhk9E/FktQH8sxsALkgs ABTKObYNuq4zEnOMi35/rP7Gje6Ad6dK5CduxQ7w9SAhQyWQcA6igVqOnG21riZXE+CO bFr6Vm7EzB/sva6webN6ueneeGDS+ySJ3A/VQqNc7dGAaqA+mvSPW0IFpe88RpFs/g8H ouyIWQZhN0y/WK+pOBFj0OhWMgx/9uliiY2/qlQ7zu1WC1rYWevGYybR/OkPpNH7SqKO +ruw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063031; x=1731667831; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RVWcqtL2/z6hHqWPVR/NbA1tV+dgOCVHn7AuI7jqeJ4=; b=O2Fd3smlceVCMukF3c/894GHdInMlmjv15k8WG/gk4KLxuTS1Hz4eh8hHYNY7ndlg1 o0z2FDIBcmUcvn5C8nkunu346gYaqSoC3CCBKbaLFsOZ3ZBCt87UckKuNDlwNNi254pc d5NdWt/bjdgPrxsSViPw146XUWFt7WdmI3UqGOldtvQBUqJofYXlis3ptjMflnMQmKIM 4RBmhRmcZuvjCaRs4e28y9AWTCD0BcotCfM1EjMM2tEd5fbibq4GhHkKf3+twr3/SEGk J7/L0kOeScHOKKhTV20HX6H5Rc988GMb8MAUtk7NRYlj7qAsmowINKSgpEtIVTB7yaPJ HCpA== X-Forwarded-Encrypted: i=1; AJvYcCUrNsZ6AhNB9XQD/e7tpWpLTR22zPLoTLexhCApOnbCVDbCUR91aQHeRgrRKEUZOLxF5xEV1qCkiMab7RQ=@vger.kernel.org X-Gm-Message-State: AOJu0YzJr2X+FGPA8/lSmHStiOjxxdfl6YP6Gx/DpxJ7U3llfkJTkHS+ 8GTW6aJxdR01WUvKt0MuX7lv6vcSIhTjSzkOg0c5g0BHB0IRiaUnsn4cDFBmgvI= X-Google-Smtp-Source: AGHT+IFft6CwH3EePxmvnwbJFYSPRDnYeOJGj9yj1dd1M3Hdcr69b4JKtRaHUgCl0R3MhySJFo0PIQ== X-Received: by 2002:a17:906:848:b0:a9e:f28c:3749 with SMTP id a640c23a62f3a-a9ef28c3ac0mr107670166b.32.1731063030575; Fri, 08 Nov 2024 02:50:30 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.50.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:50:29 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 08/25] ASoC: sh: rz-ssi: Fix typo on SSI_RATES macro comment Date: Fri, 8 Nov 2024 12:49:41 +0200 Message-Id: <20241108104958.2931943-9-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea The SSI_RATES macro covers 8KHz-48KHz audio frequencies. Update macro comment to reflect it. Signed-off-by: Claudiu Beznea --- Changes in v2: - none sound/soc/renesas/rz-ssi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c index b4439505929f..a4d65be17eb1 100644 --- a/sound/soc/renesas/rz-ssi.c +++ b/sound/soc/renesas/rz-ssi.c @@ -71,7 +71,7 @@ #define PREALLOC_BUFFER (SZ_32K) #define PREALLOC_BUFFER_MAX (SZ_32K) =20 -#define SSI_RATES SNDRV_PCM_RATE_8000_48000 /* 8k-44.1kHz */ +#define SSI_RATES SNDRV_PCM_RATE_8000_48000 /* 8k-48kHz */ #define SSI_FMTS SNDRV_PCM_FMTBIT_S16_LE #define SSI_CHAN_MIN 2 #define SSI_CHAN_MAX 2 --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.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 29C5F1E47D1 for ; Fri, 8 Nov 2024 10:50:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063037; cv=none; b=GuzQpHFGvbN+2nk0GfQzoOuYx1uy1h+wIkFDUd7f/pTpwuj7874ZyWR/K40Ex8xt+fmFJ88Ucx4UavkT7LfaAfKnhDafjXhmYkftVSeaI6QXLoLprNRAGt2mqObJUwp6bzWJmNMSQQ1NeitFDU9Ze952sk1q5ksH73a9p+5Pb6g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063037; c=relaxed/simple; bh=JjIahQr6A0j7MFD+w6mZNB6iEn2WX+1Wm4FASvWAtvU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=a84Z+Hhem53XlTJbf1I5EQyPx3KTsYpLbI9+BvRKoFNcZqmPJl6QhahXOYB49+wWF9HLCyaiL6v+HAzG5olO0s1LuP76D7j5PB2MeG2JbHbk+NxMTAnO32EtzoNFEYSI3fz2QRHQ3cQo1sJwOSUQ/AhLj3vLgyTRIa2QDmnONEI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=MCezlR8B; arc=none smtp.client-ip=209.85.218.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="MCezlR8B" Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a9a4031f69fso329970166b.0 for ; Fri, 08 Nov 2024 02:50:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063033; x=1731667833; 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=l8RwfIDsdAPmonZ2TVWnj8OzE+nZU+M7zjNrbRKY8/4=; b=MCezlR8BYV7NJ7y1eHnLvPoXVcOHurcSRg5/doI7sph4NSWJKwT5Gbic4XuxFkjKj/ qa7zS1Kr7YjRaDb8v9Yu2EbO77BGyoxtdpOl5lvagAA6VKcgC5uwQAJ7Bvk1MVhavbEg dfjY1CKsjkA4VKrNFoIY6SH1zHEDp+/jPm2FpuplxfeisxwnvSsIkJ3OvGbfqhVznI7p liEoUNMZ8T+a1JPPS/UPmE1Do5o5GV4myKflWwqipS98UoV6Q7ev9bYwy9BTyxs6Nl17 SvP9S5iU1kZh8yc751wLctE1fhiU+3ffUcu2AHqeFd5Rp+CjxDzg60mwcLEKl2V+dNgL 4RQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063033; x=1731667833; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=l8RwfIDsdAPmonZ2TVWnj8OzE+nZU+M7zjNrbRKY8/4=; b=rBCRSrTjJlOyoq2iJyxaBGHp1EsTB9NfYOW9egZ475+FWMRqLLPzV0Xi57Kp5Tslc/ i3xE6jJugpNK97j+/dMuI1ZywzoXm/ESML+08G5+SGa7sbuHyTetenFMEYoIpvEQclTr 0wySztkiQF02YCnmo0nVrHYxDeuMaIeRNelEPhqY0L0n6v5HkqgbNBqvtyGOscYdv9tL N62jDJ0gwTvmL8l4MTmfAJVNksCg7eG9LgBfSnE39o11wZMTq500pXO8K5mVj8rxK6JF KicyyCycz/7r4EJSt08tlimsTputYmOWga6uZ0+pJSb/GC4OLBR1dyI5hHxDybxqdjtO SxvA== X-Forwarded-Encrypted: i=1; AJvYcCVW62iEwU/JdA6wk2EZqA9f9ti5TtM0b//DwmIVXLL50Ak7kcyiHLetyQ3eNgbIh2fxjXagofsFvTp+MfE=@vger.kernel.org X-Gm-Message-State: AOJu0YwDYXkOl/R6O0lFrvpWosibxFPgq2K4AeCW6PoCmfH0APxXX7+g Fy94b0tlwXcjqDwXr/70fMU49i/mGjVOPHSWo/ZbSaHAFze5raxwnOJsAykxixE= X-Google-Smtp-Source: AGHT+IFPnrgFfPbNd3TP73wQjFYRKTrU9RrXTJRvMfUQhEiSnGU8niQr6Ks7xN8nlYRGUMQMvIJMJg== X-Received: by 2002:a17:907:84a:b0:a9a:be:37f8 with SMTP id a640c23a62f3a-a9ef0018b3bmr208920566b.43.1731063033457; Fri, 08 Nov 2024 02:50:33 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.50.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:50:32 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 09/25] ASoC: sh: rz-ssi: Remove pdev member of struct rz_ssi_priv Date: Fri, 8 Nov 2024 12:49:42 +0200 Message-Id: <20241108104958.2931943-10-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Remove the pdev member of struct rz_ssi_priv as it is not used. Signed-off-by: Claudiu Beznea --- Changes in v2: - none sound/soc/renesas/rz-ssi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c index a4d65be17eb1..a359235b55af 100644 --- a/sound/soc/renesas/rz-ssi.c +++ b/sound/soc/renesas/rz-ssi.c @@ -99,7 +99,6 @@ struct rz_ssi_stream { =20 struct rz_ssi_priv { void __iomem *base; - struct platform_device *pdev; struct reset_control *rstc; struct device *dev; struct clk *sfr_clk; @@ -1043,7 +1042,6 @@ static int rz_ssi_probe(struct platform_device *pdev) if (!ssi) return -ENOMEM; =20 - ssi->pdev =3D pdev; ssi->dev =3D &pdev->dev; ssi->base =3D devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(ssi->base)) --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (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 AE4201EE03C for ; Fri, 8 Nov 2024 10:50:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063039; cv=none; b=ogOTEniCF+thC8dmRP+4lcJq3Sl/bADfQRE3I/nfLMDWAm59j7Rlt6Gf6aSQhTlbrZYn8g7FnyUSXp1A8uPWo71H3IgbuLZgbem4cuWAycY9dpvnk9ndQLhACUxHO8HmfrVjMl+Maz+5KDjOhzCgM37H77fnt4Pns3Gbj0HAr00= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063039; c=relaxed/simple; bh=UDN/MsefSC8JXCNstGfSjjMFoiHdel1xmd8dafnOSoQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DUdezb8iMaYLeyEcEzqJwguawS2HvjymY6aO6Usfkv8B+PzH5GAuyi6fis06cVeSi49vLL/MgnwxrbWGDnVBq2rt+CUpbDU4kV0aothnd8CpFOtZmayaJ8sKI8rJ4K6wfmJwhG6X/txO0MW5pxjx/3TqKPIF7W43JXX7PnR5A5Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=IX7OwyH3; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="IX7OwyH3" Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a99ebb390a5so569007966b.1 for ; Fri, 08 Nov 2024 02:50:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063036; x=1731667836; 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=uBhbS3W72o/kN5HMA2yyeByauQZo+wVZ0wMkHWgTSh0=; b=IX7OwyH3u+RUKusPRAAoFdngkZk26ymUmU/NZPgzW/hI3smr3SUzwZkyW3GVSn7S0O GXpMANoyBml4G4n3g8J8/G1PbciHjn0UnsVI1BwMYO8o4QSKhGcMF0/y1uiZvdSDqX4a LcVAP1M3qq1H/FAv0OU5m1QgWTOY27tRkyuJxMGakdnTdF5nnSxncrXU+4iDqLzSdeWA eCnMD2CK93IGrxTbLRexlPpZbAxW2PEJnNCJFRwMRdEbcvgP83ue40eP4jwk9CHV1HDw C9TXhpLf8Zy44YSmWPLnH6o8eCN6eG7QgRrykxQoP7ng4Kuq+uCX1DQnDdPhHty7Y+v/ 7r/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063036; x=1731667836; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uBhbS3W72o/kN5HMA2yyeByauQZo+wVZ0wMkHWgTSh0=; b=ldt/o4sftLDumAi1OSQPQ2epG6cErU7oi+cokh0UDB5qClDyIhbIX2RXfGL/jNBaFT sx9XnCVdxagdfhXyqCZpOZIloXKKteMKshMT4nN1elUOBpvdE1Jg7dzr+ds3xvvTXahd M4q+rg8/MRZ1KixfNae7VBgM4opSxnk2/Lpo4ukFBh8T7YT+AQP1vvekTqHHa3SuDwvX UoB1tVwvdiCZPnq8IhtB57PuacXHfsXcIJPnrjcAfJThyxBdyza+ubkxpEY/sAMQMZEW nGKwvuyEI4YNjQMnAHtvjh3Tu9KDO3F88WnWe1uDi1fAN/5ln5if91q3yBeZ3ZY2PWji oegA== X-Forwarded-Encrypted: i=1; AJvYcCULQxXM5dUqknOd2jqvdPGPw6vJ/7V8/oLaCFIjBFzCHDMOjEQ0UXsQ/qIfKXy/FJB077ZxiOgYTpfbrJs=@vger.kernel.org X-Gm-Message-State: AOJu0YyOTgsAroCJh36XFRdXjfAd0HU0U5rF/3yJ0lVU5czB5CVhxmb7 npjPr4oEb4YqWZR6bVuoXBSYR9vH1utg6gHQfJ44yDasu096yrYBhMvSanIH1ZA= X-Google-Smtp-Source: AGHT+IHmQAxrHn6g8ivXKNKkvkcI1idTgMBasUX1xBaIWYqflPwTH9v07OxZX2Fp7AcqbL4NFB1cFA== X-Received: by 2002:a17:907:9492:b0:a9a:1575:23e3 with SMTP id a640c23a62f3a-a9eefeecbf6mr214458266b.19.1731063036148; Fri, 08 Nov 2024 02:50:36 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.50.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:50:35 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 10/25] ASoC: sh: rz-ssi: Remove the rz_ssi_get_dai() function Date: Fri, 8 Nov 2024 12:49:43 +0200 Message-Id: <20241108104958.2931943-11-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Remove the rz_ssi_get_dai() function as there are already helpers that can give the same output that rz_ssi_get_dai() gives. Signed-off-by: Claudiu Beznea --- Changes in v2: - none sound/soc/renesas/rz-ssi.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c index a359235b55af..4c33663a0ae4 100644 --- a/sound/soc/renesas/rz-ssi.c +++ b/sound/soc/renesas/rz-ssi.c @@ -162,14 +162,6 @@ static void rz_ssi_reg_mask_setl(struct rz_ssi_priv *p= riv, uint reg, writel(val, (priv->base + reg)); } =20 -static inline struct snd_soc_dai * -rz_ssi_get_dai(struct snd_pcm_substream *substream) -{ - struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); - - return snd_soc_rtd_to_cpu(rtd, 0); -} - static inline bool rz_ssi_stream_is_play(struct rz_ssi_priv *ssi, struct snd_pcm_substream *substream) { @@ -243,15 +235,15 @@ static void rz_ssi_stream_init(struct rz_ssi_stream *= strm, static void rz_ssi_stream_quit(struct rz_ssi_priv *ssi, struct rz_ssi_stream *strm) { - struct snd_soc_dai *dai =3D rz_ssi_get_dai(strm->substream); + struct device *dev =3D ssi->dev; =20 rz_ssi_set_substream(strm, NULL); =20 if (strm->oerr_num > 0) - dev_info(dai->dev, "overrun =3D %d\n", strm->oerr_num); + dev_info(dev, "overrun =3D %d\n", strm->oerr_num); =20 if (strm->uerr_num > 0) - dev_info(dai->dev, "underrun =3D %d\n", strm->uerr_num); + dev_info(dev, "underrun =3D %d\n", strm->uerr_num); } =20 static int rz_ssi_clk_setup(struct rz_ssi_priv *ssi, unsigned int rate, @@ -988,7 +980,8 @@ static int rz_ssi_pcm_open(struct snd_soc_component *co= mponent, static snd_pcm_uframes_t rz_ssi_pcm_pointer(struct snd_soc_component *comp= onent, struct snd_pcm_substream *substream) { - struct snd_soc_dai *dai =3D rz_ssi_get_dai(substream); + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); + struct snd_soc_dai *dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct rz_ssi_priv *ssi =3D snd_soc_dai_get_drvdata(dai); struct rz_ssi_stream *strm =3D rz_ssi_stream_get(ssi, substream); =20 --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (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 A5C291EF92C for ; Fri, 8 Nov 2024 10:50:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063042; cv=none; b=qIMcJfIDphqmNbJwkWS7L3hWXGUSDsSsl3qXQA0W4FM2sb3QCvMxMSJNv850QrwQHeAFyq3o1wjb9Tt2De0Zd+SteeTtButByzTjfAsF5Vx9+2dyFx0Uqsjmw5bEhQKEX1mVgfkZNxvd6Hvyq/U9YW15kUwuRkqTNkIcIQ7H4xE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063042; c=relaxed/simple; bh=d8mU8bYOrPorUuoOZuvaha0KU0RlKCB/stgC96hd0g8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=caTGC5JjXnkPQ+yiIznpN2qnSLfl7LYVU2zwM4Xwbl+M6iGNOmS5jFSFM0VwfWcIiumLGvjb3P6bec6jP7cjB2SVMEOk40vg/vjb+7+SJjNY6dWU9poSU6VlD06zFyuEX+xwJGTRybobeOzcTVEAqm6927AF4VQLjimbweAjEMM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=Dbeo1O7K; arc=none smtp.client-ip=209.85.208.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="Dbeo1O7K" Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5cec7cde922so2568326a12.3 for ; Fri, 08 Nov 2024 02:50:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063039; x=1731667839; 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=Y0HYIcZ4941pOAMBeRvtJV39WH2Y/jzU7I8a5PPgGFo=; b=Dbeo1O7KoHUqawQ/OBO+NwwWCSd6GBqHJzertGEHPBY2Q9Rlrs8v3XvZlbZCuby5ty 6mmFq9FICsoUAVLYpK2GnEXQnbDxj3B0TvjsC6Mzs87OqYeby+F9ukO1m4fuYcyk8VsI L9iMH2JvlUZqSir+JWrJktbgnNWHoAB7Z3HAnZagmuQbuEQSTgSzHMMtwPqrSP+bmFF9 onXFDbY6pO9ZMBubbahQe0Wz81JGpNJjvQQ4AgCr+hDWElBeIRBunyozwe4nFpJi4C1b 2OEqU6EY8xfqMwmWJH8hdp1VsWPn1LEcapAcPKIFacKKbkm2qhEh+KlLeFYRiIYB6Fek SDLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063039; x=1731667839; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y0HYIcZ4941pOAMBeRvtJV39WH2Y/jzU7I8a5PPgGFo=; b=vv3Nil2j2KRgzdKo2U/8VjiOnX8hjxrcOOylEqwZzL1qqR9v4gGXefQ386cYrj24x7 OYUANF/xO9mWH0Nb+X6j/Kau4UP/829hJvBw58cqvOqqTnxZmDvfEDks1XaO5mqvEWRF z7mYxb+O+jd16XlyQ7VmVZJK4Q56CYWlQnx02qEL6R/Zqqz6pkE3PMSsmB3MLkmmY9im edWiKzdxuKG0jryp+yICl61gRENZ0D7cCiN1m9y3vIbocSLcrEmuUcYg2q+c8iK4nM9e 8Zfe+Yw2yYSn193yrCDOSSUt+6azkQmJAJR19dL8Hd6t7mBFNgQDIIO9krb46/ELunzp bkxQ== X-Forwarded-Encrypted: i=1; AJvYcCVvWkusV0Ktxi6C0YXpInlr2yQ6sEFEvjxkj8BudAilTCxUVjC9j1hrsppdz9YwCKl6Kn3EJMGcyM6CJks=@vger.kernel.org X-Gm-Message-State: AOJu0YwRvd6FZY9SMEdZ5Fpt5ChR0dI5AUyRVKIvXgAoP6XfQpBWSkV9 pb1RTjgkz1eTfDR0w/VFRi6oABEBJI80lDbL/CxUA81yXRLIJ5/BRTeq6lc/wLM= X-Google-Smtp-Source: AGHT+IFGG1BBo43Xzy4yQ4uC6LGC4AjE4EiaqG8//Yidm3ggRg+BojPgMYe1LcTHoO/XqgYzHzGGaA== X-Received: by 2002:a17:907:842:b0:a9a:4f78:c3 with SMTP id a640c23a62f3a-a9eeff0dc7bmr201747066b.21.1731063038893; Fri, 08 Nov 2024 02:50:38 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.50.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:50:38 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 11/25] ASoC: sh: rz-ssi: Remove the first argument of rz_ssi_stream_is_play() Date: Fri, 8 Nov 2024 12:49:44 +0200 Message-Id: <20241108104958.2931943-12-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea The first argument of the rz_ssi_stream_is_play() is not used. Remove it. Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v2: - fixed typos in patch title and description - collected tags sound/soc/renesas/rz-ssi.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c index 4c33663a0ae4..f230d63339e8 100644 --- a/sound/soc/renesas/rz-ssi.c +++ b/sound/soc/renesas/rz-ssi.c @@ -162,8 +162,7 @@ static void rz_ssi_reg_mask_setl(struct rz_ssi_priv *pr= iv, uint reg, writel(val, (priv->base + reg)); } =20 -static inline bool rz_ssi_stream_is_play(struct rz_ssi_priv *ssi, - struct snd_pcm_substream *substream) +static inline bool rz_ssi_stream_is_play(struct snd_pcm_substream *substre= am) { return substream->stream =3D=3D SNDRV_PCM_STREAM_PLAYBACK; } @@ -337,7 +336,7 @@ static void rz_ssi_set_idle(struct rz_ssi_priv *ssi) =20 static int rz_ssi_start(struct rz_ssi_priv *ssi, struct rz_ssi_stream *str= m) { - bool is_play =3D rz_ssi_stream_is_play(ssi, strm->substream); + bool is_play =3D rz_ssi_stream_is_play(strm->substream); bool is_full_duplex; u32 ssicr, ssifcr; =20 @@ -674,7 +673,7 @@ static int rz_ssi_dma_transfer(struct rz_ssi_priv *ssi, */ return 0; =20 - dir =3D rz_ssi_stream_is_play(ssi, substream) ? DMA_MEM_TO_DEV : DMA_DEV_= TO_MEM; + dir =3D rz_ssi_stream_is_play(substream) ? DMA_MEM_TO_DEV : DMA_DEV_TO_ME= M; =20 /* Always transfer 1 period */ amount =3D runtime->period_size; @@ -800,7 +799,7 @@ static int rz_ssi_dai_trigger(struct snd_pcm_substream = *substream, int cmd, if (ssi->dma_rt) { bool is_playback; =20 - is_playback =3D rz_ssi_stream_is_play(ssi, substream); + is_playback =3D rz_ssi_stream_is_play(substream); ret =3D rz_ssi_dma_slave_config(ssi, ssi->playback.dma_ch, is_playback); /* Fallback to pio */ --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (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 3ED241EF95D for ; Fri, 8 Nov 2024 10:50:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063046; cv=none; b=pSOi0/hA8Q81vTpv7eCsMlJymjHHgHE8wx1cLt3JNwJuFI3cdU6ZfLP0g2wSg+749X336yrrH+m5PKv1LRent9bJv/TDqPQO+yngBP7tRh9uvmifwQNuO8bwJ6KBmHlYCd93z9gEjkQO1s5RcsrYLATfYn7uxc2QPEewSX3FCUE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063046; c=relaxed/simple; bh=K6Cw19VzanRggQJ9ackg58S/cIHnDftQ+AAbWSfLA4w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EJN4TsNas1XbHmhrhYEcZ37Aa0ixywGfwmW4DBbAapzJxSX9UsagZOYVFo8FoxjUw4nGqSWBu55R0C8kG1piwJ9f7LwF4Ss8Fa1Vm87/4ihOml0+Felbt+3BZM0/U68CGJ4WDfZosKw2bHoSPa4eWFmuyMONK76I6/Gdb74HykU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=kN2Y67Z1; arc=none smtp.client-ip=209.85.218.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="kN2Y67Z1" Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a9eb3794a04so275769866b.3 for ; Fri, 08 Nov 2024 02:50:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063042; x=1731667842; 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=oGI8BLotlgYkbPf2kxGSbSSNn1fEysvNxJMS0KOJ8NY=; b=kN2Y67Z1k4AnfMFTdK0wWOQ/R7DltDdeQ5KhekuxahpyP9shQhvXSJOhsnOmzO6oSF R2Ii2CMdt7NZvKeSTC7xL8JAr41LnQ1XEA68fCrhRZnydP6Qj4VQG0vj5jXi8NpHO1Ke 8t6J9EKB/Uss8IZYnbg06CMNBDuMclnnvd8vPOUqO93OWIdfo30eJD0gCOwpBRM8rlfg KG2NmCUkxJQ3Z/QbQgcjJsGOfk0eYPPoLeQnO+8bvI+KgiwL+ylQ51c8ihHqXFL9m1DJ HwFaloAqVp7NohURp7qIk1QvGVhnIzhK7YW2Nyc/mDvWguuxiSwpGx+9Pi8SNM4JXb5y y+lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063042; x=1731667842; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oGI8BLotlgYkbPf2kxGSbSSNn1fEysvNxJMS0KOJ8NY=; b=Gn7nONt0Sak/XD8Dbx0onG+pLA8qM085PMHMmuWU7viW0FAKX+BrMfecopML3OnKh8 xIFQIq6AJlx6PESDmnpb8SWZ6dVGS3NPCnzcL1JFA9nbsRjTphrK9kp9/4UmJcMfeQ0B 2uxub14u9PMVKK2n1nqIc2YztLrvUS6tmZ4HMhD054eu9+nrAX9hmNY0JPJZuoQzeR5K XH0An3080/0Ao6ac7UzxW2ONbVIQbMLvXO77i7MnhV+ToOvg+dMuqfUL5UYnFaZeldpa i+S01EjMmD8U/lXe3fMiTJ8O/xr+ReUhwekdk2HXb0tF++wdEe60RT7A9pbFDGiIf5vc l4ig== X-Forwarded-Encrypted: i=1; AJvYcCVMEBTZvY0sC8k+p7It9z9r6IEmNv3BOPAVS8Igad9iNsEQ3vy3ox8D1GVhoKm0Bocx5DLRWNXVMNK6iRs=@vger.kernel.org X-Gm-Message-State: AOJu0YyYhoQbS/e20mcXtJ7sNvyOrMEu9CRyE7PzljBPOk35pue0UWxN QMb9cPNSPUxbNenWJSRo0DYJtyB+ceH07wEZUukNktBh1Tsz8I0QE/+iTMGpPqU= X-Google-Smtp-Source: AGHT+IGs/OQqKoJK1pwx5fwra0tyGy3QmPPNa7cuyW1FS4OzMCdTq2C8v+8ndDd64d+x58RAV4CJrA== X-Received: by 2002:a17:907:e94:b0:a99:f746:385 with SMTP id a640c23a62f3a-a9eefebd439mr210008966b.1.1731063041624; Fri, 08 Nov 2024 02:50:41 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.50.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:50:41 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 12/25] ASoC: sh: rz-ssi: Use readl_poll_timeout_atomic() Date: Fri, 8 Nov 2024 12:49:45 +0200 Message-Id: <20241108104958.2931943-13-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Use readl_poll_timeout_atomic() instead of hardcoding something similar. While at it replace dev_info() with dev_warn_ratelimited() as the rz_ssi_set_idle() can also be called from IRQ context and if the SSI idle is not properly set this is at least a warning for user. Signed-off-by: Claudiu Beznea --- Changes in v2: - none sound/soc/renesas/rz-ssi.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c index f230d63339e8..aa175803867f 100644 --- a/sound/soc/renesas/rz-ssi.c +++ b/sound/soc/renesas/rz-ssi.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -307,7 +308,8 @@ static int rz_ssi_clk_setup(struct rz_ssi_priv *ssi, un= signed int rate, =20 static void rz_ssi_set_idle(struct rz_ssi_priv *ssi) { - int timeout; + u32 tmp; + int ret; =20 /* Disable irqs */ rz_ssi_reg_mask_setl(ssi, SSICR, SSICR_TUIEN | SSICR_TOIEN | @@ -320,15 +322,9 @@ static void rz_ssi_set_idle(struct rz_ssi_priv *ssi) SSISR_RUIRQ), 0); =20 /* Wait for idle */ - timeout =3D 100; - while (--timeout) { - if (rz_ssi_reg_readl(ssi, SSISR) & SSISR_IIRQ) - break; - udelay(1); - } - - if (!timeout) - dev_info(ssi->dev, "timeout waiting for SSI idle\n"); + ret =3D readl_poll_timeout_atomic(ssi->base + SSISR, tmp, (tmp & SSISR_II= RQ), 1, 100); + if (ret) + dev_warn_ratelimited(ssi->dev, "timeout waiting for SSI idle\n"); =20 /* Hold FIFOs in reset */ rz_ssi_reg_mask_setl(ssi, SSIFCR, 0, SSIFCR_FIFO_RST); --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (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 A51E91F1319 for ; Fri, 8 Nov 2024 10:50:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063047; cv=none; b=iMSNd4DJWBjPum8UtS8TSmh//Rz8OIWjt8hROkg+R2kduuDKKUTvlWj5hoimHMxstD85WuISFNKdDMbUGBa6q0iNcPK6WFGtZ53Xu7XUUWWWuSRAlOkyfd51OBnd0Kqku4OJHD38H8rrk7T9E3rSOOpgw8b2KmkLojMvaPWH/rI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063047; c=relaxed/simple; bh=NwMwmtlaT18hJnHfLU6mTOWxZRQJqMvTs4mxCmNNjKI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rb+94DVHz17rhXgPLmEcXF5LNgNMzDFwAONgclTQ5SMxH1XUhRdGeKphn4PkVy9JWbBYecuBzRvZmlMFhWW2TvKte7jjGdXXMa2IF/JmoGA84OCq3RWZO/yQEzfrZ8w7aByvKaQCDvboHpP8BDJX5U8i+SED9qoeeF9Hx9mLQpA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=WDxuLwej; arc=none smtp.client-ip=209.85.218.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="WDxuLwej" Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-a99e3b3a411so522240366b.0 for ; Fri, 08 Nov 2024 02:50:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063044; x=1731667844; 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=SJOEZBvPvjW7K+H1RBTXNfb6F0+/L3JfoVyW1uUG2Ac=; b=WDxuLwejB5Tr9/xMjgdisgYk1CBr/620ZpNfeUK/go8XzGcJzNuSlTkVe6Ryn3RcqZ JRZjkdtOvWgJencYN+c76xZiMIaTgYEkbxKoO8HRPzbBAEC5cOvS5WK/IjykAb8+Liks 95GqJK3UCFzU8sfEMG10tYreTVVQb7x+w46QT6voRdvLcfcuQ/4SKcoB8s5XV2qMYKVe 9aho1W4WTjtAsHsDaxmOB/nkumlU0UGytUGO3dQDTCRTyJTgBc/dCgF8sm9mR7v7T4Db Xaoy8+6/oYxqzJKACyaQ+zFVdFo/27FeduIYmqM746JhfaALIH/aTKvL9WSAKBRJNqWj B47Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063044; x=1731667844; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SJOEZBvPvjW7K+H1RBTXNfb6F0+/L3JfoVyW1uUG2Ac=; b=Us9XTVkAcZ2KH1HIt3I9sb3UzM4WltT9MLvj73yVKnN4qUW4C4CjHd9OKVJhAheLe7 eLE7r9pJa6j658wJEUZRUJRorQWAsoMI2oZu1Etsr9T/K4lXE6WDa/AaDswqoDmcg7JS 5b9/YQlqZdmVNNkfhoQDLsVt3L+0tlbQJqTRqzfUxzICDjnIUB1RuuZ9nM0QrwJI0SVO 77dsw0tWHsfQkVQap9L0Xaxd4Mo9den5PzGpGNw0pEoXX50ha9G5Gc0o4JCpUnRsxUKV 1fRVM/m41rza3kLjEpTFQ9BvA/Hz7nI0yoCViWbTJs5XtpP31xAe08jG0D8ytI90q3Dm 8TBA== X-Forwarded-Encrypted: i=1; AJvYcCViDOtsd25TA4mRErGIT9F1Z+bkg+1uFEZjcHOZyfdMvCisuHvPcFuCUU/FLfNevpwg1t42kTO2TLW6r/A=@vger.kernel.org X-Gm-Message-State: AOJu0Yy3BTAAGbfZOU2m2slqCEYyeLqUJBc4R1ebQ2MTSeyhzeXYatdE oOJ5QFPPr9cPI82bcncvlLg58Il8Xtvlv/jgL+OC7M0CHSAVfMpMus0OLOtgsvtHDD5sK7gzfCe 2 X-Google-Smtp-Source: AGHT+IH/99y+0YANpW/8sxDIiFKmQLtyD61rPWyljhpIaIihSrGsIz6DNWsbJUmatJ8M/8RbrS7BXA== X-Received: by 2002:a17:906:ee86:b0:a9e:c5a2:9cda with SMTP id a640c23a62f3a-a9eeca85d0emr286051066b.20.1731063044037; Fri, 08 Nov 2024 02:50:44 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.50.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:50:43 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 13/25] ASoC: sh: rz-ssi: Use temporary variable for struct device Date: Fri, 8 Nov 2024 12:49:46 +0200 Message-Id: <20241108104958.2931943-14-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Use a temporary variable for the struct device pointers to avoid dereferencing. Signed-off-by: Claudiu Beznea --- Changes in v2: - none sound/soc/renesas/rz-ssi.c | 62 +++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c index aa175803867f..2f56c63582e7 100644 --- a/sound/soc/renesas/rz-ssi.c +++ b/sound/soc/renesas/rz-ssi.c @@ -1021,36 +1021,37 @@ static const struct snd_soc_component_driver rz_ssi= _soc_component =3D { =20 static int rz_ssi_probe(struct platform_device *pdev) { + struct device *dev =3D &pdev->dev; struct rz_ssi_priv *ssi; struct clk *audio_clk; struct resource *res; int ret; =20 - ssi =3D devm_kzalloc(&pdev->dev, sizeof(*ssi), GFP_KERNEL); + ssi =3D devm_kzalloc(dev, sizeof(*ssi), GFP_KERNEL); if (!ssi) return -ENOMEM; =20 - ssi->dev =3D &pdev->dev; + ssi->dev =3D dev; ssi->base =3D devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(ssi->base)) return PTR_ERR(ssi->base); =20 ssi->phys =3D res->start; - ssi->clk =3D devm_clk_get(&pdev->dev, "ssi"); + ssi->clk =3D devm_clk_get(dev, "ssi"); if (IS_ERR(ssi->clk)) return PTR_ERR(ssi->clk); =20 - ssi->sfr_clk =3D devm_clk_get(&pdev->dev, "ssi_sfr"); + ssi->sfr_clk =3D devm_clk_get(dev, "ssi_sfr"); if (IS_ERR(ssi->sfr_clk)) return PTR_ERR(ssi->sfr_clk); =20 - audio_clk =3D devm_clk_get(&pdev->dev, "audio_clk1"); + audio_clk =3D devm_clk_get(dev, "audio_clk1"); if (IS_ERR(audio_clk)) return dev_err_probe(&pdev->dev, PTR_ERR(audio_clk), "no audio clk1"); =20 ssi->audio_clk_1 =3D clk_get_rate(audio_clk); - audio_clk =3D devm_clk_get(&pdev->dev, "audio_clk2"); + audio_clk =3D devm_clk_get(dev, "audio_clk2"); if (IS_ERR(audio_clk)) return dev_err_probe(&pdev->dev, PTR_ERR(audio_clk), "no audio clk2"); @@ -1063,13 +1064,13 @@ static int rz_ssi_probe(struct platform_device *pde= v) ssi->audio_mck =3D ssi->audio_clk_1 ? ssi->audio_clk_1 : ssi->audio_clk_2; =20 /* Detect DMA support */ - ret =3D rz_ssi_dma_request(ssi, &pdev->dev); + ret =3D rz_ssi_dma_request(ssi, dev); if (ret < 0) { - dev_warn(&pdev->dev, "DMA not available, using PIO\n"); + dev_warn(dev, "DMA not available, using PIO\n"); ssi->playback.transfer =3D rz_ssi_pio_send; ssi->capture.transfer =3D rz_ssi_pio_recv; } else { - dev_info(&pdev->dev, "DMA enabled"); + dev_info(dev, "DMA enabled"); ssi->playback.transfer =3D rz_ssi_dma_transfer; ssi->capture.transfer =3D rz_ssi_dma_transfer; } @@ -1078,7 +1079,7 @@ static int rz_ssi_probe(struct platform_device *pdev) ssi->capture.priv =3D ssi; =20 spin_lock_init(&ssi->lock); - dev_set_drvdata(&pdev->dev, ssi); + dev_set_drvdata(dev, ssi); =20 /* Error Interrupt */ ssi->irq_int =3D platform_get_irq_byname(pdev, "int_req"); @@ -1087,12 +1088,11 @@ static int rz_ssi_probe(struct platform_device *pde= v) return ssi->irq_int; } =20 - ret =3D devm_request_irq(&pdev->dev, ssi->irq_int, &rz_ssi_interrupt, - 0, dev_name(&pdev->dev), ssi); + ret =3D devm_request_irq(dev, ssi->irq_int, &rz_ssi_interrupt, + 0, dev_name(dev), ssi); if (ret < 0) { rz_ssi_release_dma_channels(ssi); - return dev_err_probe(&pdev->dev, ret, - "irq request error (int_req)\n"); + return dev_err_probe(dev, ret, "irq request error (int_req)\n"); } =20 if (!rz_ssi_is_dma_enabled(ssi)) { @@ -1104,11 +1104,11 @@ static int rz_ssi_probe(struct platform_device *pde= v) if (ssi->irq_rt < 0) return ssi->irq_rt; =20 - ret =3D devm_request_irq(&pdev->dev, ssi->irq_rt, + ret =3D devm_request_irq(dev, ssi->irq_rt, &rz_ssi_interrupt, 0, - dev_name(&pdev->dev), ssi); + dev_name(dev), ssi); if (ret < 0) - return dev_err_probe(&pdev->dev, ret, + return dev_err_probe(dev, ret, "irq request error (dma_rt)\n"); } else { if (ssi->irq_tx < 0) @@ -1117,50 +1117,50 @@ static int rz_ssi_probe(struct platform_device *pde= v) if (ssi->irq_rx < 0) return ssi->irq_rx; =20 - ret =3D devm_request_irq(&pdev->dev, ssi->irq_tx, + ret =3D devm_request_irq(dev, ssi->irq_tx, &rz_ssi_interrupt, 0, - dev_name(&pdev->dev), ssi); + dev_name(dev), ssi); if (ret < 0) - return dev_err_probe(&pdev->dev, ret, + return dev_err_probe(dev, ret, "irq request error (dma_tx)\n"); =20 - ret =3D devm_request_irq(&pdev->dev, ssi->irq_rx, + ret =3D devm_request_irq(dev, ssi->irq_rx, &rz_ssi_interrupt, 0, - dev_name(&pdev->dev), ssi); + dev_name(dev), ssi); if (ret < 0) - return dev_err_probe(&pdev->dev, ret, + return dev_err_probe(dev, ret, "irq request error (dma_rx)\n"); } } =20 - ssi->rstc =3D devm_reset_control_get_exclusive(&pdev->dev, NULL); + ssi->rstc =3D devm_reset_control_get_exclusive(dev, NULL); if (IS_ERR(ssi->rstc)) { ret =3D PTR_ERR(ssi->rstc); goto err_reset; } =20 reset_control_deassert(ssi->rstc); - pm_runtime_enable(&pdev->dev); - ret =3D pm_runtime_resume_and_get(&pdev->dev); + pm_runtime_enable(dev); + ret =3D pm_runtime_resume_and_get(dev); if (ret < 0) { - dev_err(&pdev->dev, "pm_runtime_resume_and_get failed\n"); + dev_err(dev, "pm_runtime_resume_and_get failed\n"); goto err_pm; } =20 - ret =3D devm_snd_soc_register_component(&pdev->dev, &rz_ssi_soc_component, + ret =3D devm_snd_soc_register_component(dev, &rz_ssi_soc_component, rz_ssi_soc_dai, ARRAY_SIZE(rz_ssi_soc_dai)); if (ret < 0) { - dev_err(&pdev->dev, "failed to register snd component\n"); + dev_err(dev, "failed to register snd component\n"); goto err_snd_soc; } =20 return 0; =20 err_snd_soc: - pm_runtime_put(ssi->dev); + pm_runtime_put(dev); err_pm: - pm_runtime_disable(ssi->dev); + pm_runtime_disable(dev); reset_control_assert(ssi->rstc); err_reset: rz_ssi_release_dma_channels(ssi); --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (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 2E9BF1F4288 for ; Fri, 8 Nov 2024 10:50:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063050; cv=none; b=GSV8fMlmWznEcHDojfm2lG+Nhmx4WGS0MV8sA26vY0tzLtLLqFDjXUsWFDNDLyhSkm6ScRSHrgGu+BUIRluoMF46/NPfA5AXZX8xQ6ulGXdAvSqLqOtt0hvmbNw9ZhowAJThzOtyEILVE63B0j7Eoq13I/3Ao0nPyjNjl5aZyyU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063050; c=relaxed/simple; bh=xFFbioEROLNPyGM49qKI+pehNU+1477vY2Y70y9bICA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Hspm2Y63nvC9GA87BQGHhk80WC8avy+DSJ7KjVDa6udeKxqm+HpJ/7qIQNiZIcVt7SFWlbyprDSPAc5gYPaZZo3l+nqVvbsxdVZVPKqqHUtQ5dQmKECT0Hko1viF2syuonn0UkipuID9ZdwZKS1lskxO3g2E9fUalCxoI9K8ygg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=NkNnPD0o; arc=none smtp.client-ip=209.85.218.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="NkNnPD0o" Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a99f646ff1bso284349866b.2 for ; Fri, 08 Nov 2024 02:50:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063046; x=1731667846; 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=rthMUF+vMt5MM5B9Aqdvs2YjjwpYxK5VQtE0WQ3XZxo=; b=NkNnPD0oJibAeFODQ/7ozde/gB9+x2ITCjOWutTnaWTdfJv/1Y6pipJjha5YmFPX6S mqi2t3TwM4TUgBLhlWspibsH2MxCS7ghdcRUW01ljIc0plzpHLaCu5etJ1xkwWQMMLsZ igsVIdA4uULr9uOiAOWj/SjRhSrqkoT+DF18Uei1v1tLW+WaLuWpPYaBCHEfgdpScHKY iWSQEimetVNGV0VYHZoisdkhE7kh1iwXJUFvEgrhOQi3VuHv761D7cIDz3WrxKfIWlIz +vNWjJNJgLhUrB+/v+aRhoxaA3X2F/BigUbRFQ/Y9zF5ScBHXHeusQZB6gPfaOUEhPy7 FMFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063046; x=1731667846; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rthMUF+vMt5MM5B9Aqdvs2YjjwpYxK5VQtE0WQ3XZxo=; b=qBymYcHHM2aCw6bgNcx5o8+REHNMuUjG9dADWhCAkui2nbbjsVKV4MJ1dD93xlS613 bCGgLf899H+BcGBqpd1tOLWtgvDUxgVCLtmHnvMGmpLxFFXoHHswL1i6EVrU4q372/4U +OQdXMcr0fg9OU5bQ4CSrUrdat9jEa6KHmy/WNZwDQhTBYYSNKbKhil6fkgsvpK9g7N7 ja8WtTHGYPms9omyxZt70VHl+vO7pW6XV6Bw2JHcWn3c4+tseLIjhZebtuFacIz0dv2S 7mJuwhMsaqUblIB3pW9H+VklsZrnqVDqPDCTphmMTTHEfQcn5uh41vyqqc/o11qEu+0r 7BQg== X-Forwarded-Encrypted: i=1; AJvYcCWPW4KdfQYt0DKeX1/Rqr4960E+0CDCZhyNgR4qBTg4Hc0Pc2UNvvBRW2eb3SSLiyQIvyNup1I+iHbDqsU=@vger.kernel.org X-Gm-Message-State: AOJu0YxKU7WAov9gwp5j21JuWlQaLeTI498Pf3MlCVdDyDSJGS5CMlQH h8rmWk+8coR4s8EhLeEU1rVW1ycYj4Rca14SjmSm+CAIc3qqpS0xyIaYUXF7y+Y= X-Google-Smtp-Source: AGHT+IGOSLqeQ+ElPtVRFNVoP4vVBtmPTa3P5gFos8Wi42uIeVIZ2ytk126yhHQS01GyrotYAEPuFA== X-Received: by 2002:a17:907:84a:b0:a9a:1a6a:b5f5 with SMTP id a640c23a62f3a-a9ef00234c9mr192359166b.56.1731063046591; Fri, 08 Nov 2024 02:50:46 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:50:46 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 14/25] ASoC: sh: rz-ssi: Use goto label names that specify their actions Date: Fri, 8 Nov 2024 12:49:47 +0200 Message-Id: <20241108104958.2931943-15-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Use goto label names that specify their action. In this way we can have a better understanding of what is the action associated with the label by just reading the label name. Signed-off-by: Claudiu Beznea --- Changes in v2: - none sound/soc/renesas/rz-ssi.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c index 2f56c63582e7..4af381f6d470 100644 --- a/sound/soc/renesas/rz-ssi.c +++ b/sound/soc/renesas/rz-ssi.c @@ -1084,15 +1084,15 @@ static int rz_ssi_probe(struct platform_device *pde= v) /* Error Interrupt */ ssi->irq_int =3D platform_get_irq_byname(pdev, "int_req"); if (ssi->irq_int < 0) { - rz_ssi_release_dma_channels(ssi); - return ssi->irq_int; + ret =3D ssi->irq_int; + goto err_release_dma_chs; } =20 ret =3D devm_request_irq(dev, ssi->irq_int, &rz_ssi_interrupt, 0, dev_name(dev), ssi); if (ret < 0) { - rz_ssi_release_dma_channels(ssi); - return dev_err_probe(dev, ret, "irq request error (int_req)\n"); + dev_err_probe(dev, ret, "irq request error (int_req)\n"); + goto err_release_dma_chs; } =20 if (!rz_ssi_is_dma_enabled(ssi)) { @@ -1136,7 +1136,7 @@ static int rz_ssi_probe(struct platform_device *pdev) ssi->rstc =3D devm_reset_control_get_exclusive(dev, NULL); if (IS_ERR(ssi->rstc)) { ret =3D PTR_ERR(ssi->rstc); - goto err_reset; + goto err_release_dma_chs; } =20 reset_control_deassert(ssi->rstc); @@ -1152,17 +1152,17 @@ static int rz_ssi_probe(struct platform_device *pde= v) ARRAY_SIZE(rz_ssi_soc_dai)); if (ret < 0) { dev_err(dev, "failed to register snd component\n"); - goto err_snd_soc; + goto err_pm_put; } =20 return 0; =20 -err_snd_soc: +err_pm_put: pm_runtime_put(dev); err_pm: pm_runtime_disable(dev); reset_control_assert(ssi->rstc); -err_reset: +err_release_dma_chs: rz_ssi_release_dma_channels(ssi); =20 return ret; --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (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 2B45F1F473A for ; Fri, 8 Nov 2024 10:50:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063053; cv=none; b=fYNrCf7qurfV62W1E6MbVbjlJunaZnzbnNEvoY/zhQbqFA4ObCde7F36ibUCY3ydKS6H6C19UNylddE4uLF1dr+1cWKgwUTg8sHN735MGX1KblbdPjfoG2OVy1q7F372NxiKv1MzM6KVw86wHRH5v6P/KXGRR1ZqXI48wRjV1YE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063053; c=relaxed/simple; bh=VonvejSvZtz2cWZ7EWWkpJ5UBzctxv952aKOBg6yZy8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=K8/vZSNmBwl8O4UTKM9mTdRHHUnZLo8qrSiK7k7CWnmpTIX4oDTLw3/t7triBZLm4A/wBVmSWuFTgfwO6dNQqJppl2EjmCBiXYu8DXKGPqg+LK7EtmDvwxqRK8fym/PeUUc0hos2RQ6WD1v8tjngjvLch0O24WE+yB6JVafaisU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=V8j+OEBM; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="V8j+OEBM" Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a9e8522445dso333406566b.1 for ; Fri, 08 Nov 2024 02:50:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063049; x=1731667849; 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=NxD29TLdBIx0OFMI1iZi4DJrptnupP/yjljls2N0w4U=; b=V8j+OEBMF6WFGysv6HOLU7vp2a0ENEL/8q80spkfXN12CLjlPnIi83qYEcaU2vMLaq xBPdPxRAuaM9jYYDco/Dg3aaG9Y03jNhGCMGqavUmwacrHfwLajn5S0Q/rWTw4yv+ifP ZoWVcwveM0nKI5tdRK2HNrJZ2dS2y7vq4BuxjacNcMApNv9ulldYWSaZr8TXx3lJZB/i 8ScpginyP8OOQznIB/eM+q/brvVJx5mZx+VeV9dqV7IA3fnzOzgQbT2nh0WBKae+tYUz trimE07bo6OjLRQhrWIvhrC/f/rYFCYYM8z1XlSMfhNFI8oJwazT2tGMiLFy1TE8yvkm gLkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063049; x=1731667849; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NxD29TLdBIx0OFMI1iZi4DJrptnupP/yjljls2N0w4U=; b=AJRpTVWNbVRgUi3+Kg5eE6qKvKvApGLEU/Bz/XX0K1kTnxMaeSj9FNUug0XSId5qzw p5B3vlC4pMr7G5v1Wfx/c+mphaMcGtOW7+AbSpgqI6nttDdEVE6DMHexAzke74hnWLZ+ qI2HgyvYHu9Hc8xJu7EISMgdAm376bTR8rm/JEdn7G0Plgs34SoeJydZfed/6mtdoUks XBEqyjTrs7jXejUsEIQzPv9MuULY+vgL4MDKQpXT6ypnxRxTsx8wITQvGUP9voWZ5dT+ 6tbQHwjlyI3KYB6uJzVYxqa6O6H/t0AOpPYcz0a1YKtpQI24kDH1UmI5q8K/GWeGZuwt JyVQ== X-Forwarded-Encrypted: i=1; AJvYcCW56N3mBGlBF2Rn/qzZkKtGdJ/1eHrizgOKftBlHS2MDqOrEK6ancIH7YNGf1xtnnSOcQFKQHCfpHKX+ro=@vger.kernel.org X-Gm-Message-State: AOJu0Yxf7YmvLIuZfRvjg+xLcJjknKgSGoSehhudk99pJvxXuOtqwBp4 ed9nLGCrowzGlOD0bzjCqxQCzSdTN+zAY+0uaoEpnsVfkzeqIMhFtNsTnrk8C+Y= X-Google-Smtp-Source: AGHT+IHvN0EL1LXToTh6UC1+zMH3D9cZ2TY8Jb6+WnY25RpAHLyVeWrjFPA7b1je8e1yRCDrv5kzpQ== X-Received: by 2002:a17:907:6d05:b0:a9a:19c8:740c with SMTP id a640c23a62f3a-a9eeffeeb1bmr219199566b.47.1731063049500; Fri, 08 Nov 2024 02:50:49 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.50.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:50:48 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 15/25] ASoC: sh: rz-ssi: Rely on the ASoC subsystem to runtime resume/suspend the SSI Date: Fri, 8 Nov 2024 12:49:48 +0200 Message-Id: <20241108104958.2931943-16-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea The ASoC subsystem takes care of runtime resume/suspend the audio devices when needed. Just enable the runtime PM on the SSI driver and let the subsystem runtime resume/suspend it. While at it use directly the devm_pm_runtime_enable(). Signed-off-by: Claudiu Beznea --- Changes in v2: - none sound/soc/renesas/rz-ssi.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c index 4af381f6d470..35172630be8b 100644 --- a/sound/soc/renesas/rz-ssi.c +++ b/sound/soc/renesas/rz-ssi.c @@ -1140,11 +1140,10 @@ static int rz_ssi_probe(struct platform_device *pde= v) } =20 reset_control_deassert(ssi->rstc); - pm_runtime_enable(dev); - ret =3D pm_runtime_resume_and_get(dev); + ret =3D devm_pm_runtime_enable(dev); if (ret < 0) { - dev_err(dev, "pm_runtime_resume_and_get failed\n"); - goto err_pm; + dev_err(dev, "Failed to enable runtime PM!\n"); + goto err_reset; } =20 ret =3D devm_snd_soc_register_component(dev, &rz_ssi_soc_component, @@ -1152,15 +1151,12 @@ static int rz_ssi_probe(struct platform_device *pde= v) ARRAY_SIZE(rz_ssi_soc_dai)); if (ret < 0) { dev_err(dev, "failed to register snd component\n"); - goto err_pm_put; + goto err_reset; } =20 return 0; =20 -err_pm_put: - pm_runtime_put(dev); -err_pm: - pm_runtime_disable(dev); +err_reset: reset_control_assert(ssi->rstc); err_release_dma_chs: rz_ssi_release_dma_channels(ssi); @@ -1174,8 +1170,6 @@ static void rz_ssi_remove(struct platform_device *pde= v) =20 rz_ssi_release_dma_channels(ssi); =20 - pm_runtime_put(ssi->dev); - pm_runtime_disable(ssi->dev); reset_control_assert(ssi->rstc); } =20 --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (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 C048D1F4FC0 for ; Fri, 8 Nov 2024 10:50:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063055; cv=none; b=s8X6CDA+mwNTmn7aeKnjc7q+rQGm/0v67mTMBNRUDm4DPXOAzZmjkAqYT4HQDEltbHLu5NAs+10l3Y6KpHIq0JeDF0Xd9Ucw5CT8tff7JIf0cg9p3/hSMIxL7dSR0N91nx7bhHL2rgYS83Lp4aORxr3PINn/37S6KvqeOWOLqDA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063055; c=relaxed/simple; bh=2PCe0KPg32gqCcVNDQNhmzPO/yYVoFRK2EiIUxDhWkE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tROkdlfkmmUUWmyhKDUk/ptnhWhRLA8Zg5PvESnXKOkv+mTgdgu53eyIs97nJAnqdZmcpPGDIH08dsKQqU9+NWS8kF3F+zlOp75XxcSjhUcX9JXwDXHdjx/Xt13bQyWw9EU9+C+9yh7MKw+EH8SaGcmMzlGwZprDpYonD3H1qVA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=KamFqlYV; arc=none smtp.client-ip=209.85.208.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="KamFqlYV" Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-5c95a962c2bso2893043a12.2 for ; Fri, 08 Nov 2024 02:50:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063052; x=1731667852; 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=WmXGRhaJRnp01BXYlkVN8dDsItsXKSTOjtaKujO1eXw=; b=KamFqlYV9JlAW+XHxAl6rRaYQcLltnlvvdChnHEPdIDryzoZgfpW1rikgD1G2XbXPz 8zcG9XmpqzAztxSr6Tlmf7k82J1n3z2mqY/gq/3OJdA83BY71mt5lkZGaXhtF0nJOogk +VJcBsLd347llcisAq1STTOff5j1gSocziQeVYyNZdVp6VS1nbmcyEtgAIbtbM25gK8d Y1QqISNPu6ZTyl2tM0FJGowtTMf1/YSKEpGgIE+A8QFf+sCJsKdh+eyeJqYGpmR/I8zL KlVIeBmyBb2JzTi6WKiuOL2X43IW4D3AziFYU2rDGDTPpVfPF5Aieq2hSThU/bzFgBYJ Ugsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063052; x=1731667852; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WmXGRhaJRnp01BXYlkVN8dDsItsXKSTOjtaKujO1eXw=; b=lozJ8MRL7y5Mz/qlTufnCySZwnAEgYJbC55ga86tZzKYo2d0MtqFfl7QFo2WUO/AfU YGAIW9RMMrk/DH/hfsxQTMCxBi3ImW1lCstdvmzkOH/PIOvtSrArVmHkgHivHQjJDgQe N5WwS9qp/dqrg1akHqrzWt1BtO5e1Mm+Q5mTFyFqtri9JUtouG0pTx/ObYwCTHeNu8Vw 07JkR1Fy5hVXU7v0Tp5hj+kXIXke5V2Tofp+z05vCrZl5UT1wmqYMYlUZNvqLSvIMlda 3QU9Ox5rk5sLzEKQjWncGILjl0XsaV7F92B/A6coLjYWA4l8f9MHed52oRPTMsM+iaHb Qkrw== X-Forwarded-Encrypted: i=1; AJvYcCUxE/UxyAvU+TRb4a5z6B6tOqAgFGnOb0hqMPini4ISxcTzOxuR69VjHaAFAi5pyjCgKLX/pc7OUuPmiRc=@vger.kernel.org X-Gm-Message-State: AOJu0YxUaexbVR2zuXUgL8YgztEB0/PzcBh0lzT4U9anYVBZGX3FihoG 5FT+Hl66qpZ4ro87fP/ZVHcJdO4pcomyvcPuw/aBeb7CBaSl6cM2fa41VihYGlM= X-Google-Smtp-Source: AGHT+IH0r5miaDDJh3qcrxQ3YOXZk9cffFGfj/2dKrk6beHOdzL6PXB1jZMLS7FCEfSw8jKUBbjkGw== X-Received: by 2002:a17:907:6d0d:b0:a9a:61d:7084 with SMTP id a640c23a62f3a-a9ef00234b8mr199857766b.50.1731063052126; Fri, 08 Nov 2024 02:50:52 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.50.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:50:51 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 16/25] ASoC: sh: rz-ssi: Enable runtime PM autosuspend support Date: Fri, 8 Nov 2024 12:49:49 +0200 Message-Id: <20241108104958.2931943-17-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Enable runtime PM autosuspend support. The chosen autosuspend delay is zero for immediate autosuspend. In case there are users that need a different autosuspend delay, it can be adjusted through sysfs. Signed-off-by: Claudiu Beznea --- Changes in v2: - none sound/soc/renesas/rz-ssi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c index 35172630be8b..01e8b6a4e8a8 100644 --- a/sound/soc/renesas/rz-ssi.c +++ b/sound/soc/renesas/rz-ssi.c @@ -1140,6 +1140,9 @@ static int rz_ssi_probe(struct platform_device *pdev) } =20 reset_control_deassert(ssi->rstc); + /* Default 0 for power saving. Can be overridden via sysfs. */ + pm_runtime_set_autosuspend_delay(dev, 0); + pm_runtime_use_autosuspend(dev); ret =3D devm_pm_runtime_enable(dev); if (ret < 0) { dev_err(dev, "Failed to enable runtime PM!\n"); --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (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 6A4581F6671 for ; Fri, 8 Nov 2024 10:50:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063059; cv=none; b=DwsfMkcddwLL10JrphcYtR3VDINHzV0CwaJDnTchEU+EKFr+kG6PzRT48icdF3/dtTi21boDfFz6ZbfHxTEqTZO+v3W5RaVfBtJYl2nZAg4bSvTusvWWGJG58Z1fbTpzVC7ZPV3znrvSYpOCj3wPMGBQtAhgjQdmIEERggGI9OU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063059; c=relaxed/simple; bh=1JLP8YBI/NfuJpSNZsJG39bojJB5MMAu0LS2Keuaup0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Af2lYOy/jIxLDoSAU+56PMAMDiyk0Sv38OgrReSSnc5rE+L1LOo3B+B550U4SzR4j71CWWw/l5yKQeyK98brcudh5hE231dU4wBwBw3zUJnSDSFbJp4NaqQd7/mMgOY2c+RA14WhHqfRQ7EGZCAnXFHg6PsnEwV1xTuIGVc2rJI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=pu4j2afD; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="pu4j2afD" Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a99eb8b607aso271923266b.2 for ; Fri, 08 Nov 2024 02:50:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063055; x=1731667855; 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=eOLdQvWvS7gaNvs3DCiJZvTYPDD5HWrJjoBCATic1So=; b=pu4j2afDyCIDpPPaTvvQlE3uz2+ANnJ/NY6vRRZQjx1b1QCrEASjrWtPToEFe5j67j dvoBRAm6gnvkrVpPrd5Y74QzkChPL/V5tZIMBR4ELGGo1WO5aNVBieaP4574Jw+oUlkE lSNoMKPfk94binQ4wKMlZ6tpP/ai41mBRQzoOAmB2UqSj48H7lWbrcswCrYF3uLXaaMe Qo+sYra4QPW+0CVsv7Cq42QJtFFULB3MCI/x8o7wUsA46g5n7QECSX+atzf3BF1fEhdN sgfdVdeIUrtS/SYASKxS9r0syByM2TaVdeMrSVhd1t1HDxna2AawrBVCy9vaGrIzj/Pb lVuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063055; x=1731667855; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eOLdQvWvS7gaNvs3DCiJZvTYPDD5HWrJjoBCATic1So=; b=MbpJbD2/XLaTrBHH22SXeSxXiWsi58dWJREi2LmMxwU0JxUcupae/cfmnomXlV75Lv iR1F7NODw5Z4VaG0Lkw9YuG6gnRzQ58H3kls1IfetOJd/tF5UJw0RD2w/0nTh/BEYpcJ fjDDq62IOytq94DcDKNIvFUhnxzViuzMBqQ5vMOOANhwYa12XwCMItKK88uA+KSp1j70 SMwETYJJnPzkhulm2yzBoCZQhXyR7qoDju/K30KyJkQO0I3wt+p/RgwzJ5HYsO8noi+y Pe/vtI+bJTeF9kDsF99NycygslmjDbwW+oiZKkZwhJCM4A/Eli9lVY84jCByt3/aS74j 6o9Q== X-Forwarded-Encrypted: i=1; AJvYcCVaWrrLUYMIsWpB97/LzNUuysde4Pf8il63fVurCylVHv2vkKhQz34cKrdgTfpT4tBwVRPaeS2oa/DVsKU=@vger.kernel.org X-Gm-Message-State: AOJu0Yz5nIPLIMxFZYVhWkGFtRVhWyOAcRtnJOUmsPbJ/bUC69vzh/sU fMfN3wttnaqv7A6M70o4tuiIf6OPcYvGAfiaF3iJMgNf4ojactzE3WaZ0GeX34A= X-Google-Smtp-Source: AGHT+IEDcIr4ZulRfChZaF/rfxZKMkUXnFBiVs3aCjpXf4oh+sd3M27JOSZF7Y01oPyVg+uYn/eBkQ== X-Received: by 2002:a17:907:94c1:b0:a9a:6752:ba80 with SMTP id a640c23a62f3a-a9eefebd152mr222750366b.5.1731063054628; Fri, 08 Nov 2024 02:50:54 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.50.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:50:54 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 17/25] ASoC: sh: rz-ssi: Add runtime PM support Date: Fri, 8 Nov 2024 12:49:50 +0200 Message-Id: <20241108104958.2931943-18-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Add runtime PM support to the ssi driver. This assert/de-assert the reset lines on runtime suspend/resume. Along with it the de-assertion of the reset line from probe function was removed as it is not necessary anymore. Signed-off-by: Claudiu Beznea --- Changes in v2: - none sound/soc/renesas/rz-ssi.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c index 01e8b6a4e8a8..d0e2665ec830 100644 --- a/sound/soc/renesas/rz-ssi.c +++ b/sound/soc/renesas/rz-ssi.c @@ -1139,14 +1139,13 @@ static int rz_ssi_probe(struct platform_device *pde= v) goto err_release_dma_chs; } =20 - reset_control_deassert(ssi->rstc); /* Default 0 for power saving. Can be overridden via sysfs. */ pm_runtime_set_autosuspend_delay(dev, 0); pm_runtime_use_autosuspend(dev); ret =3D devm_pm_runtime_enable(dev); if (ret < 0) { dev_err(dev, "Failed to enable runtime PM!\n"); - goto err_reset; + goto err_release_dma_chs; } =20 ret =3D devm_snd_soc_register_component(dev, &rz_ssi_soc_component, @@ -1154,13 +1153,11 @@ static int rz_ssi_probe(struct platform_device *pde= v) ARRAY_SIZE(rz_ssi_soc_dai)); if (ret < 0) { dev_err(dev, "failed to register snd component\n"); - goto err_reset; + goto err_release_dma_chs; } =20 return 0; =20 -err_reset: - reset_control_assert(ssi->rstc); err_release_dma_chs: rz_ssi_release_dma_channels(ssi); =20 @@ -1182,10 +1179,29 @@ static const struct of_device_id rz_ssi_of_match[] = =3D { }; MODULE_DEVICE_TABLE(of, rz_ssi_of_match); =20 +static int rz_ssi_runtime_suspend(struct device *dev) +{ + struct rz_ssi_priv *ssi =3D dev_get_drvdata(dev); + + return reset_control_assert(ssi->rstc); +} + +static int rz_ssi_runtime_resume(struct device *dev) +{ + struct rz_ssi_priv *ssi =3D dev_get_drvdata(dev); + + return reset_control_deassert(ssi->rstc); +} + +static const struct dev_pm_ops rz_ssi_pm_ops =3D { + RUNTIME_PM_OPS(rz_ssi_runtime_suspend, rz_ssi_runtime_resume, NULL) +}; + static struct platform_driver rz_ssi_driver =3D { .driver =3D { .name =3D "rz-ssi-pcm-audio", .of_match_table =3D rz_ssi_of_match, + .pm =3D pm_ptr(&rz_ssi_pm_ops), }, .probe =3D rz_ssi_probe, .remove =3D rz_ssi_remove, --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (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 69C941F6692 for ; Fri, 8 Nov 2024 10:50:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063062; cv=none; b=KAbyTf9sCW8pJu57rhgnHqv1wZ6PSdzcw0ojl4t5dIP9IbB4DcRArmN+mD5iL3Tj8pLeJidlYvEJYhaLiei5k8Z4tY6Zy2izzk7t27wvyE7XqW/9y9unhGUmVfrYOiFVFOpN4Z0P/Z3862gLCISoqCbHEISe0UfShi3U0wZk3Is= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063062; c=relaxed/simple; bh=Nfd4gDEK7GpGxcCuhGzfaZ7psjmgyb5HQdhVpDmwzn0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kT3LJyKgg4gmuNnnJk4nfw2v+Ofz4D44FzkuIhur9ShRc2yXwMrYptwOR9gqh+8Edfoydxs29BR/sRDGtDSdYXc52UT3cCURDbEhqTItYpe1uV/IAu2ci3GpqB1gQq0mzRUccQYlTpmeoIQAkKL7hDA4oXgB4KuKHCnuWw4P41Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=JUXWhKzF; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="JUXWhKzF" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a9e8522c10bso298791566b.1 for ; Fri, 08 Nov 2024 02:50:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063058; x=1731667858; 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=dsddwLgoaUC21DisQKymp7RX967qcBXHNoEIK2XIDWs=; b=JUXWhKzFd16CctZn7e8jQG3M61+vTk0J2aQx4QS/3YD9zCiXw8MSVqUsUo1j5XBISO KyG7nuy05aZY0sIWvr0Vc+uMJxOxK64wrAlYDWk4IQu8X9P7gl9qjSfN6ApK+mZe+C8B 0syfeLty2qA5CEBwYzDU6cf66a2yU6qWQioaXSuibqAUJkXYx/Tc6h3hRxdTlAJ5dRsL TQSVNVK2kC9YEqCbvdJs474pxk7UHnD5/OJj5GHhl/y5sQ8aEUsb7ZapPz2F/v9VnaWK wuwX8X9/EWL98KtbaMWmIXxPEQ+zEz+K+AGOglk9jHVlzwkikSb//+zVyLGOqAgSJzeD ph4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063058; x=1731667858; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dsddwLgoaUC21DisQKymp7RX967qcBXHNoEIK2XIDWs=; b=A2iGvfObXoGMqokcAKHKmn3MFLeOEX/1zBB9DFexuCCrZbbJvzWz/KcsU6KJv9iVB+ 1sf8IeHV9kPK5tU9LCL/Opwixk7FiaYp5j6ddVuhFJhk6RmlVI8hxmrma+LZ+yS/CVIn RpouyOpl+vh4Xb2WoT/xuB4jIQrsqKRbJ2eCorzCHOXCCbPSIE0DVl7UuX+t++UAraNw s6mBQr4KjDJxIfYj7jqcgzE9AyfWBd4W6OOF3mL9pc/yds4OXa3FXZNER5DeF/KtZ24D rLMJ/359J0vbevzgK6HWv5VQ9lxFEk6pMKPlQNIPVdEeg2NWo7e2ZbRdGA79SLk+VsD3 m9fA== X-Forwarded-Encrypted: i=1; AJvYcCU8DdHz5M5Na6dd2Qvii6GXGfoPJHgGxrUpKBLeOR0/CThMZmNazy2hIhiP2z6yKg8CZA29aYKQ2XFxUqE=@vger.kernel.org X-Gm-Message-State: AOJu0YwlxIMOePWh/0/iDn0gtKQPPLu+tRy6ipOUK6dENz9ZUegtF1wa g9URZUrqkKXG/e5KB4t6Jma3/8sQMD1t2cP+hK2zaDD/Vhi7isP/QT9WS3v/1M0= X-Google-Smtp-Source: AGHT+IEJg8K3pdmbEY8dCNi7XCNAbif69J5o4laKl4Sk/PK5iN8hqJH5aC5WbhvZFA416qHorGkEjg== X-Received: by 2002:a17:907:7e83:b0:a9a:170d:67b2 with SMTP id a640c23a62f3a-a9eeffe72a4mr197003166b.29.1731063057752; Fri, 08 Nov 2024 02:50:57 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.50.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:50:57 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 18/25] ASoC: sh: rz-ssi: Issue software reset in hw_params API Date: Fri, 8 Nov 2024 12:49:51 +0200 Message-Id: <20241108104958.2931943-19-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea The code initially issued software reset on SNDRV_PCM_TRIGGER_START action only before starting the first stream. This can be easily moved to hw_params() as the action is similar to setting the clocks. Moreover, according to the hardware manual (Table 35.7 Bits Initialized by Software Reset of the SSIFCR.SSIRST Bit) the software reset action acts also on the clock dividers bits. Due to this issue the software reset in hw_params() before configuring the clock dividers. This also simplifies the code in trigger API. Signed-off-by: Claudiu Beznea --- Changes in v2: - none sound/soc/renesas/rz-ssi.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c index d0e2665ec830..10dd973a1c85 100644 --- a/sound/soc/renesas/rz-ssi.c +++ b/sound/soc/renesas/rz-ssi.c @@ -388,6 +388,15 @@ static int rz_ssi_start(struct rz_ssi_priv *ssi, struc= t rz_ssi_stream *strm) return 0; } =20 +static int rz_ssi_swreset(struct rz_ssi_priv *ssi) +{ + u32 tmp; + + rz_ssi_reg_mask_setl(ssi, SSIFCR, SSIFCR_SSIRST, SSIFCR_SSIRST); + rz_ssi_reg_mask_setl(ssi, SSIFCR, SSIFCR_SSIRST, 0); + return readl_poll_timeout_atomic(ssi->base + SSIFCR, tmp, !(tmp & SSIFCR_= SSIRST), 1, 5); +} + static int rz_ssi_stop(struct rz_ssi_priv *ssi, struct rz_ssi_stream *strm) { strm->running =3D 0; @@ -782,14 +791,6 @@ static int rz_ssi_dai_trigger(struct snd_pcm_substream= *substream, int cmd, =20 switch (cmd) { case SNDRV_PCM_TRIGGER_START: - /* Soft Reset */ - if (!rz_ssi_is_stream_running(&ssi->playback) && - !rz_ssi_is_stream_running(&ssi->capture)) { - rz_ssi_reg_mask_setl(ssi, SSIFCR, 0, SSIFCR_SSIRST); - rz_ssi_reg_mask_setl(ssi, SSIFCR, SSIFCR_SSIRST, 0); - udelay(5); - } - rz_ssi_stream_init(strm, substream); =20 if (ssi->dma_rt) { @@ -914,6 +915,7 @@ static int rz_ssi_dai_hw_params(struct snd_pcm_substrea= m *substream, SNDRV_PCM_HW_PARAM_SAMPLE_BITS)->min; unsigned int channels =3D params_channels(params); unsigned int rate =3D params_rate(params); + int ret; =20 if (sample_bits !=3D 16) { dev_err(ssi->dev, "Unsupported sample width: %d\n", @@ -940,6 +942,10 @@ static int rz_ssi_dai_hw_params(struct snd_pcm_substre= am *substream, rz_ssi_cache_hw_params(ssi, rate, channels, strm->sample_width, sample_bits); =20 + ret =3D rz_ssi_swreset(ssi); + if (ret) + return ret; + return rz_ssi_clk_setup(ssi, rate, channels); } =20 --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (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 71FCE1F7093 for ; Fri, 8 Nov 2024 10:51:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063064; cv=none; b=GgsaROH+fBUqmOpOJSyFWY4pQWDD9D/W8kJQn+Kp0TJLuz8vIH2rkcpPzayJc3MIthyDpnpEM7Sjmxm1AwPqyrtxdf5mifBuXNPobgrcXynigdlxTVAz0miN7edzH5AXs59qsPrZbK9jXoyGhjnOdIZIAxS+2axMKFT427kYydI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063064; c=relaxed/simple; bh=7Aycs7iw0uTpqe/5B+Sd7tJmLzg6PTuKqWn2WBE/iHk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uAcEWnSRJvqjB+Unyp0+OcHR7A0i/MJcrRHwiI7aOGbxI+ayOk5Pf49VjHckLoNwkgEUAVIIRd+7TgKDfTkGtrHt0XpP9toSIIfFHXhHi6BHK8FkNjHGPmGTs7ce7dIbsCg/MGrex//PxUvSEk5kwVvp6Z41Zr47ZYhxT74IypU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=fa4vAzkf; arc=none smtp.client-ip=209.85.208.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="fa4vAzkf" Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-5cedea84d77so2836232a12.1 for ; Fri, 08 Nov 2024 02:51:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063061; x=1731667861; 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=J8Uk4fQmAWvdC1xeKG77LIM8dnesFI8Q0ss0r4c/eGw=; b=fa4vAzkf7JkJCxiOFehTy3t8pIgotPmqplIcaiWur530ccWRypTvNrlVotrCPR/INM QHe77W111tpkP3/nmkNSGNdRC/HifKGNk5GRhhKr6AkL+ESlbW0HP/Kk+mQeR6Ys0+GQ EQ+Hn7n8pPtA2MkXCKzHE63GwNQ9TbqxbgAhP0GtFN9fXgvS+IdmlefPOkJat2W08MpX vZQh7biLlnAyKrrL46pfNabRAfSuO4sTbMpcIfoOBThiczecisUxztQeq/D6NAnxs26s t0zfHB+UIX3+nd5iITmZgAnrYsDP5Ce3NgFqX+S4MZhajpBvFPLKpmP+kUZP561jE1PH ANlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063061; x=1731667861; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J8Uk4fQmAWvdC1xeKG77LIM8dnesFI8Q0ss0r4c/eGw=; b=Z4O/Vmwi8+QLaOHoierWT5N+HBjPRaOHq7PMhCZTEIzY89NUUkrVyO+4ADqVbtKAed HXLOgFMQsXQDINQWSsAwWSEIo9Hgasi2B72NuHAEGL8DSObEJu4VdINylJzDEaYPiX21 gEA5bs60u+60bxX8GC8LFCZDAOvMCjWxuGiD7jXle1Sv82+ZYkFKIE/TGipCoWQ9zhQF 0rJab94SCjMNTP9ASGIacsYWow3ZQPJTk5tzarF3y9sYdyfYzmgUoZKFNSix5xvOJ9Jo hOyJjgekBa+c66J6CT8Y3/bN90dJ6P3WrKTEAdPWzWtU5fYs3ST/g+pPjCBZaBMiC0VF 3Wtw== X-Forwarded-Encrypted: i=1; AJvYcCVUV4CsUJdW44VZezTuIU9hIgGImsBDjL+CFwdvuOek63tOTuC7tOkLML2uU+LWGnNfpViZdafGXZftMJA=@vger.kernel.org X-Gm-Message-State: AOJu0YzbJgRffmsGHLROc7FobH8ilOnbcb6yuaDN30ImGeRwNPCVtOm4 fHqwqpxog10kYn8HkQuZy3HysoJiwNll49JmwXSalnBf9fa8nxnlOfxhrboLfd0= X-Google-Smtp-Source: AGHT+IEU1GXWVhGI6kNsTH65WSwRs1TgPNBco228dyKtROcgVpJH7gyq/L5uX5nBBaQSNdFoMn3XDA== X-Received: by 2002:a17:906:6a2a:b0:a9a:80f9:d4e0 with SMTP id a640c23a62f3a-a9eeff44905mr217224766b.34.1731063060775; Fri, 08 Nov 2024 02:51:00 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.50.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:51:00 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 19/25] ASoC: sh: rz-ssi: Add suspend to RAM support Date: Fri, 8 Nov 2024 12:49:52 +0200 Message-Id: <20241108104958.2931943-20-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea The SSIF-2 IP is available on the Renesas RZ/G3S SoC. The Renesas RZ/G3S SoC supports a power-saving mode where power to most of the SoC components is turned off. Add suspend/resume support to the SSIF-2 driver to support this power-saving mode. On SNDRV_PCM_TRIGGER_SUSPEND trigger the SSI is stopped (the stream user pointer is left untouched to avoid breaking user space and the dma buffer pointer is set to zero), on SNDRV_PCM_TRIGGER_RESUME software reset is issued for the SSIF-2 IP and the clocks are re-configured. Signed-off-by: Claudiu Beznea --- Changes in v2: - none sound/soc/renesas/rz-ssi.c | 46 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c index 10dd973a1c85..c6bedb58d3ae 100644 --- a/sound/soc/renesas/rz-ssi.c +++ b/sound/soc/renesas/rz-ssi.c @@ -782,6 +782,32 @@ static int rz_ssi_dma_request(struct rz_ssi_priv *ssi,= struct device *dev) return -ENODEV; } =20 +static int rz_ssi_trigger_resume(struct rz_ssi_priv *ssi) +{ + int ret; + + if (rz_ssi_is_stream_running(&ssi->playback) || + rz_ssi_is_stream_running(&ssi->capture)) + return 0; + + ret =3D rz_ssi_swreset(ssi); + if (ret) + return ret; + + return rz_ssi_clk_setup(ssi, ssi->hw_params_cache.rate, + ssi->hw_params_cache.channels); +} + +static void rz_ssi_streams_suspend(struct rz_ssi_priv *ssi) +{ + if (rz_ssi_is_stream_running(&ssi->playback) || + rz_ssi_is_stream_running(&ssi->capture)) + return; + + ssi->playback.dma_buffer_pos =3D 0; + ssi->capture.dma_buffer_pos =3D 0; +} + static int rz_ssi_dai_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) { @@ -790,8 +816,16 @@ static int rz_ssi_dai_trigger(struct snd_pcm_substream= *substream, int cmd, int ret =3D 0, i, num_transfer =3D 1; =20 switch (cmd) { + case SNDRV_PCM_TRIGGER_RESUME: + ret =3D rz_ssi_trigger_resume(ssi); + if (ret) + return ret; + + fallthrough; + case SNDRV_PCM_TRIGGER_START: - rz_ssi_stream_init(strm, substream); + if (cmd =3D=3D SNDRV_PCM_TRIGGER_START) + rz_ssi_stream_init(strm, substream); =20 if (ssi->dma_rt) { bool is_playback; @@ -819,6 +853,12 @@ static int rz_ssi_dai_trigger(struct snd_pcm_substream= *substream, int cmd, =20 ret =3D rz_ssi_start(ssi, strm); break; + + case SNDRV_PCM_TRIGGER_SUSPEND: + rz_ssi_stop(ssi, strm); + rz_ssi_streams_suspend(ssi); + break; + case SNDRV_PCM_TRIGGER_STOP: rz_ssi_stop(ssi, strm); rz_ssi_stream_quit(ssi, strm); @@ -958,7 +998,8 @@ static const struct snd_soc_dai_ops rz_ssi_dai_ops =3D { static const struct snd_pcm_hardware rz_ssi_pcm_hardware =3D { .info =3D SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_MMAP | - SNDRV_PCM_INFO_MMAP_VALID, + SNDRV_PCM_INFO_MMAP_VALID | + SNDRV_PCM_INFO_RESUME, .buffer_bytes_max =3D PREALLOC_BUFFER, .period_bytes_min =3D 32, .period_bytes_max =3D 8192, @@ -1201,6 +1242,7 @@ static int rz_ssi_runtime_resume(struct device *dev) =20 static const struct dev_pm_ops rz_ssi_pm_ops =3D { RUNTIME_PM_OPS(rz_ssi_runtime_suspend, rz_ssi_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; =20 static struct platform_driver rz_ssi_driver =3D { --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (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 BD13B1F757A for ; Fri, 8 Nov 2024 10:51:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063066; cv=none; b=nYIUTOSgj3fOqKP9xkPWLyzHaeBUoc66BZm5AvhM18L86jAbxPOLgEovTM0MOIQVrWphAsQxMD/BXCUUnAeJkg1YLYURyTbCZHVqPUETd3KMthU28LVLMJN8n2vnMglf8dnIqLb7hrAbWJOAaEBFGLCslMI1KkzR1pr2uRSeQ70= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063066; c=relaxed/simple; bh=SyEoER49TgbOw8koZErfyUVPRsJyjMMAI7/EzV/zhUw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BDU2LteuaQtB+nHtv4KwwjT6/qAuVaStHQZ8nGu3DntI/AOKlMHSG3IHJ8+1hdYLFPShOwDwZvIXmU1jfRrxZ4GfztAbTOOlOzeKBKBl9GedcLU6LlApMg2byYunsQSMNsOVoiloKDH3k2OvZhCkdFuPVo7JgpAHk39Rjzq6dw8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=GsElz7ay; arc=none smtp.client-ip=209.85.221.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="GsElz7ay" Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-3807dd08cfcso1721692f8f.1 for ; Fri, 08 Nov 2024 02:51:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063063; x=1731667863; 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=N2LUcK8XuSXr1QJcg6d30scYHZwVtB8a9hiw+Z/icFQ=; b=GsElz7ays0ECMk/ayx2Wst8VGX/Uvgve9qxcD5cAeBqwubUcGYwVpS/aKx/GXoAMOW UvGC3bh7jz8OFwxr7wavcWXpoZsAMNKG6Hg6Cg08wZJD/fsaSYVjDuwbaMLdmSps0Qal Z09LbfAvKnPjrDK6zHdzTzGohDXVqksQWW3baOyoVeWzm8w1Q4xFcw16qUeH2FdcxsHD mmo7Ofw+vH0lgt769ygHc5OuN1Cf4y7E+tSZNMenEULy1Mg5x9xaJrVT8vdtO3kJH8MF XvDMzQNP6TMZZUvYQAGXWtIL+jX44TsiHAqh8/ka623I2uP62VHueq86wJVCkFD5nppW eRAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063063; x=1731667863; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=N2LUcK8XuSXr1QJcg6d30scYHZwVtB8a9hiw+Z/icFQ=; b=wZ2XysPi8Mmt/i4NxTxKOLxjrf98gjiCR7OlirXDuLma5W2TOfg0Y6krR+U5hOMUxt fjacdqeRdmxHAGTCSF1xKSBJkx1rCZsLyAV1/dNMVVYDfo63atsoPWspjW4Nag6TNpeV VipM+xG9gRII+qHHPQO212j2go5FcF5wFm+2AXUTxpQFIzYVjznvkYGeaqby0slYGhVq Q49PsshBduBFjTMFiWi8LMLeQu6HoEQRPKNQoRvJRS+y3NAn5i9umD4/A4oz6Hb6kZJZ YciMrRPIwnrGoBDQd5amULPQB/CF2tF2K9NvRYTCzsQfqgVW7AthHYktMteD6r9escye Zrsg== X-Forwarded-Encrypted: i=1; AJvYcCW4tdamO4yVWqWhrsjmQJYN8Tgl8VGrck0+PPnyqqjV4EhsMj7MuskCMxGiBKI6wI/CecaJviKXnN+/O7Y=@vger.kernel.org X-Gm-Message-State: AOJu0YxD3oMwGzG5/sCu17PPB1cR8Ei2biUhcquE3YL1Ut5dgbSQA2mX DOpAb7xX3L21s+Zmf9n5GmPKE1ijxk+rn4lzphZEk3KEMiEfdE9Y2yDxHr6aHRE= X-Google-Smtp-Source: AGHT+IH6ZeLrSNR+Q2akPh8YjeK/N2E/SJkNwBkiadlJZfpyopK+oUuuSM/gz5YCrmaT7nw9pdyYRA== X-Received: by 2002:a05:6000:4022:b0:37d:4f69:c9b with SMTP id ffacd0b85a97d-381f18726a8mr2396102f8f.35.1731063063174; Fri, 08 Nov 2024 02:51:03 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.51.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:51:02 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea , Krzysztof Kozlowski Subject: [PATCH v2 20/25] ASoC: dt-bindings: renesas,rz-ssi: Document the Renesas RZ/G3S SoC Date: Fri, 8 Nov 2024 12:49:53 +0200 Message-Id: <20241108104958.2931943-21-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea The SSI IP variant present on the Renesas RZ/G3S SoC is similar to the one found on the Renesas RZ/G2{UL, L, LC} SoCs. Add documentation for it. Acked-by: Krzysztof Kozlowski Signed-off-by: Claudiu Beznea --- Changes in v2: - collected tags Documentation/devicetree/bindings/sound/renesas,rz-ssi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/sound/renesas,rz-ssi.yaml b/= Documentation/devicetree/bindings/sound/renesas,rz-ssi.yaml index f4610eaed1e1..cab615f79ee4 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rz-ssi.yaml +++ b/Documentation/devicetree/bindings/sound/renesas,rz-ssi.yaml @@ -19,6 +19,7 @@ properties: - renesas,r9a07g043-ssi # RZ/G2UL and RZ/Five - renesas,r9a07g044-ssi # RZ/G2{L,LC} - renesas,r9a07g054-ssi # RZ/V2L + - renesas,r9a08g045-ssi # RZ/G3S - const: renesas,rz-ssi =20 reg: --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (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 59C531F76D0 for ; Fri, 8 Nov 2024 10:51:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063069; cv=none; b=pXaGc3BKuAHcANyB20fGs+SiNCZL22EIOZnpIY1Nq8jWm6sXj9aGWhN3mxf8rseKvH6bhRcCaL+51RA+WeEyPaTNMHaOudYPi4DFV4KmriZ4i8cnHU8zG1U/8a1fyF/XrmR+peTnQpxtmcrY4QdkQjjQrrHO/DJGswtHVsVy7mc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063069; c=relaxed/simple; bh=5R/kbi91DW/+YOWu/nBiwMSuOtCvIhihiX7sqnIwlYE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=g49g6TmhEc5QoxoGMKOCZCqIkaiBQTTN0hDA/lcWcGu2/xRB4xhKGXb46C+YeJEYA1VY3LCt9/GzWEY02gI5mJXn8C6+096b8Nr+EQMdibs2PPjjISW9R1DpzsWcDTv918WPe/YCZodvD7uJGq85rdLFHZFfjlod+j38ObqXw7c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=YnuNyk3m; arc=none smtp.client-ip=209.85.218.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="YnuNyk3m" Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a9ed49edd41so358678666b.0 for ; Fri, 08 Nov 2024 02:51:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063066; x=1731667866; 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=t/e38PQFjeFG209Rga4nKvvbj7y/1sdDyJVGbXYbeis=; b=YnuNyk3mSQywjwo9HIHwQsz4lyBRZM57OOvX136IGl1zgia4rjTQ3rqFhIwykL3Rtu An3Lv/5/GrigxGt222Z3qCPlq7zr4ONYIUNk5HxDtfv4lmzDgdYmnSptIACjBlbtFWMK 176+nRktwL+zZBZz7gfcfm67iQY5Ew/dUvpQhgfJRGjAEoMXG1T13eWOAuo5231QSH+/ SHn+/ZGz/k+dcKfX6vnEDoVf+BD1eMFrwZiVGS3BGylLpzpluPwOgvaMx9/gMi4LC+b8 uCEJYZMnSoY6u0Yeq0vcXpSMaHWBox4nUhKzYMBAUSA5fUPIs+4eGBy6aiYNdXxkwGl0 FXvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063066; x=1731667866; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t/e38PQFjeFG209Rga4nKvvbj7y/1sdDyJVGbXYbeis=; b=BbOole0lHjYy3vkhv5Lkm4XmvZO+IJgGrlrKA5YB5eXEn4huS69D9uy3nZoBbtUoUo 0GMDzxboEyoAZLJxJIhqtA8gdmb2nN5Mzrsps1obfDgRlCsLwEKK7XR0Y4F0/WFISQT1 zRsLwe/ST8BIJVTaBS/8EvKjyrS8zrM++i7w1vG8MG4P9sMMlcVyaghbMYHkPxESjJm3 6rrDjcYIMWQnyzHiEB/0s1mlyw1lv71ontP3VUjCvw+wK8dJGoE2K8SOjN0sVsac3sNP p27nFEtnpmrvLZ9Ai9Vo+YkMK5Tt0PX95k8mUUFOjEfjqKNrX8W8yXUpUDHoQJDkVZAy IRKw== X-Forwarded-Encrypted: i=1; AJvYcCVfHSRtzffdgUqrq/O5PfqX5IjJOb5L4k/gY9mHvlnkRCikoYGOeWQNrC3ld9Q+4cvj5IX2Ty4iKh4VPJU=@vger.kernel.org X-Gm-Message-State: AOJu0YxL10r4/SGFGUtHOe1Kh7msAOzfxLSExnEbMfEcO66NsvxVEmcE 2Dv5+j0Q7MyTCNyqgW5V+S2s7t1z+NJoyzwRgmYlblyRR+efHYbHOOJq3KMfDfM= X-Google-Smtp-Source: AGHT+IEROX9KaO6d/u0xO2QIjRrzXqnBo50+cssH572zzI8DNVKAplSUbSI9A0zYuxHxBmSPI6CWtA== X-Received: by 2002:a17:907:3e1d:b0:a99:4aa7:4d6f with SMTP id a640c23a62f3a-a9eefebc409mr218811466b.12.1731063065775; Fri, 08 Nov 2024 02:51:05 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.51.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:51:05 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 21/25] arm64: dts: renesas: r9a08g045: Add SSI nodes Date: Fri, 8 Nov 2024 12:49:54 +0200 Message-Id: <20241108104958.2931943-22-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Add DT nodes for the SSI IPs available on the Renesas RZ/G3S SoC. Along with it external audio clocks were added. Board device tree could use it and update the frequencies. Signed-off-by: Claudiu Beznea --- Changes in v2: - none arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 96 ++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi b/arch/arm64/boot/d= ts/renesas/r9a08g045.dtsi index be8a0a768c65..24c6388cd0d5 100644 --- a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi @@ -14,6 +14,22 @@ / { #address-cells =3D <2>; #size-cells =3D <2>; =20 + audio_clk1: audio-clk1 { + compatible =3D "fixed-clock"; + #clock-cells =3D <0>; + /* This value must be overridden by boards that provide it. */ + clock-frequency =3D <0>; + status =3D "disabled"; + }; + + audio_clk2: audio-clk2 { + compatible =3D "fixed-clock"; + #clock-cells =3D <0>; + /* This value must be overridden by boards that provide it. */ + clock-frequency =3D <0>; + status =3D "disabled"; + }; + cpus { #address-cells =3D <1>; #size-cells =3D <0>; @@ -187,6 +203,86 @@ i2c3: i2c@10090c00 { status =3D "disabled"; }; =20 + ssi0: ssi@100a8000 { + compatible =3D "renesas,r9a08g045-ssi", + "renesas,rz-ssi"; + reg =3D <0 0x100a8000 0 0x400>; + interrupts =3D , + , + ; + interrupt-names =3D "int_req", "dma_rx", "dma_tx"; + clocks =3D <&cpg CPG_MOD R9A08G045_SSI0_PCLK2>, + <&cpg CPG_MOD R9A08G045_SSI0_PCLK_SFR>, + <&audio_clk1>, <&audio_clk2>; + clock-names =3D "ssi", "ssi_sfr", "audio_clk1", "audio_clk2"; + resets =3D <&cpg R9A08G045_SSI0_RST_M2_REG>; + dmas =3D <&dmac 0x2665>, <&dmac 0x2666>; + dma-names =3D "tx", "rx"; + power-domains =3D <&cpg>; + #sound-dai-cells =3D <0>; + status =3D "disabled"; + }; + + ssi1: ssi@100a8400 { + compatible =3D "renesas,r9a08g045-ssi", + "renesas,rz-ssi"; + reg =3D <0 0x100a8400 0 0x400>; + interrupts =3D , + , + ; + interrupt-names =3D "int_req", "dma_rx", "dma_tx"; + clocks =3D <&cpg CPG_MOD R9A08G045_SSI1_PCLK2>, + <&cpg CPG_MOD R9A08G045_SSI1_PCLK_SFR>, + <&audio_clk1>, <&audio_clk2>; + clock-names =3D "ssi", "ssi_sfr", "audio_clk1", "audio_clk2"; + resets =3D <&cpg R9A08G045_SSI1_RST_M2_REG>; + dmas =3D <&dmac 0x2669>, <&dmac 0x266a>; + dma-names =3D "tx", "rx"; + power-domains =3D <&cpg>; + #sound-dai-cells =3D <0>; + status =3D "disabled"; + }; + + ssi2: ssi@100a8800 { + compatible =3D "renesas,r9a08g045-ssi", + "renesas,rz-ssi"; + reg =3D <0 0x100a8800 0 0x400>; + interrupts =3D , + , + ; + interrupt-names =3D "int_req", "dma_rx", "dma_tx"; + clocks =3D <&cpg CPG_MOD R9A08G045_SSI2_PCLK2>, + <&cpg CPG_MOD R9A08G045_SSI2_PCLK_SFR>, + <&audio_clk1>, <&audio_clk2>; + clock-names =3D "ssi", "ssi_sfr", "audio_clk1", "audio_clk2"; + resets =3D <&cpg R9A08G045_SSI2_RST_M2_REG>; + dmas =3D <&dmac 0x266d>, <&dmac 0x266e>; + dma-names =3D "tx", "rx"; + power-domains =3D <&cpg>; + #sound-dai-cells =3D <0>; + status =3D "disabled"; + }; + + ssi3: ssi@100a8c00 { + compatible =3D "renesas,r9a08g045-ssi", + "renesas,rz-ssi"; + reg =3D <0 0x100a8c00 0 0x400>; + interrupts =3D , + , + ; + interrupt-names =3D "int_req", "dma_rx", "dma_tx"; + clocks =3D <&cpg CPG_MOD R9A08G045_SSI3_PCLK2>, + <&cpg CPG_MOD R9A08G045_SSI3_PCLK_SFR>, + <&audio_clk1>, <&audio_clk2>; + clock-names =3D "ssi", "ssi_sfr", "audio_clk1", "audio_clk2"; + resets =3D <&cpg R9A08G045_SSI3_RST_M2_REG>; + dmas =3D <&dmac 0x2671>, <&dmac 0x2672>; + dma-names =3D "tx", "rx"; + power-domains =3D <&cpg>; + #sound-dai-cells =3D <0>; + status =3D "disabled"; + }; + cpg: clock-controller@11010000 { compatible =3D "renesas,r9a08g045-cpg"; reg =3D <0 0x11010000 0 0x10000>; --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 371671F80C8 for ; Fri, 8 Nov 2024 10:51:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063072; cv=none; b=X+G9K5bfH0avRH932pDKJB6DNL64BR7q/WbAs2a5e8c75exjixPgXFNI4pa0xZ4vvygtB4VqgBSN1ARAHv3HuZ3u3bI4AhdNubus8rqzFgg/sTT2oGOYrBMvc3+w1By1GMEpxEF1/5Eys2FleOmjd1/EG77WxQV/NjobrY/4ViY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063072; c=relaxed/simple; bh=iwKYtnUO5mBYbaZtdcCegsqfpDom/fKhIFinWfXd0vw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=d61UI6dwD2cx4CILoSpjULCplmb03Gza3s2XkgSWgi1/8z2A5oMA9cQdV1yOZR2KFi1w18EE27l1CjCsmQmQvbcA0opENzXWvO5FusWLk8JftodxzJq9JFBQ2Y+rBWOFdIuBCWy0DPA3tzaZwJHLBrClL5JfOzovfY0fmvm09i8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=RrYdwrn+; arc=none smtp.client-ip=209.85.221.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="RrYdwrn+" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-37d473c4bb6so1650586f8f.3 for ; Fri, 08 Nov 2024 02:51:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063068; x=1731667868; 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=nco7UE3UYy9Sta2zuMyVlE3BNHup7IH/6tKlAderS98=; b=RrYdwrn+DoD78GUZap2RTZz1d58r/fLthkTd7a+WoeAqV9kbgISfTZgc5SnB+zq1eX ixme4sISgIkvqaGg0ueHTKkxaITeMowQk6df+yKXvTZKK9+cQblgOXa9x5313EGgNzLS o93HAwf56t+sEW4Kw/PWgyRXQGSb0MSZIHkLqJjVDaz1wjOgYzk6lUveiO35UgJeFslu w0qyA/j93Tv8Fx7gLH9kaShuiD5NgSJ7y9BUCaRla/HlNg+5TvXILjbjmEiNkI8za/G+ WyvvyiRsfESphcUN24J3iSZBSzgQLk9iDwyqG1KgFykCBO58cZodsAgPEwEndLacdZBa 1r9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063068; x=1731667868; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nco7UE3UYy9Sta2zuMyVlE3BNHup7IH/6tKlAderS98=; b=d50Laz6kcf28uGH5LEX81MCnnyamjBDNzHJg0OXUfgI1FcyM5b2195zIZ8Ny9MHHdT s4c59Tde3470MyXaXIywuPP8/lgugHkjx9zGORIbhMFwsL0kRQuhvkRHC0NzlNeljIW0 Xode6d/suqTP2tD44s46zCgA34tWDj2aXLgltg0dIXstzN2FUHLp1daxatQNG+ZyIG/b 5QHyMrCHNZD0BNa8rqizE95tI8rIORg4JGDsfBFJK65yOpIEHGM44I4J0aaEnSwX9nXP S8FYRpeXWIL82Aq9fvOcFVfFC9HeJ1TouNzZFHF9A1ZVUyh3Xj0Ws4uzt9g6oGNj3UX7 GElg== X-Forwarded-Encrypted: i=1; AJvYcCVn0gRAhVrasFam6OSe9xeMSYRYky7zCqewhXCDknylUg+vZGPtw064pjaCn071OWddiQ4HFJ/2b0RgUY4=@vger.kernel.org X-Gm-Message-State: AOJu0YyZ5zUg943YiU7l8k/eErfny0QR0ao9l3LxTx+KFIW/Wug6cz6P WLdOOG0wmNNDnOcYgung7P59LlB5ep5S3N7JuTnfCM0rvG+4HwrnJJt2zVjiTGY= X-Google-Smtp-Source: AGHT+IGMKrD0gPssGmNoCMH/KMgV5TjluvYb5sJslXLi2kOy6vPr8TBZ9YYdW8gPW95TY8Tv75uqMw== X-Received: by 2002:a05:6000:1868:b0:37c:d1ea:f1ce with SMTP id ffacd0b85a97d-381f1871ae1mr2218295f8f.25.1731063068533; Fri, 08 Nov 2024 02:51:08 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.51.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:51:07 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 22/25] arm64: dts: renesas: rzg3s-smarc-som: Add versa3 clock generator node Date: Fri, 8 Nov 2024 12:49:55 +0200 Message-Id: <20241108104958.2931943-23-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Add versa3 clock generator node. It provides the clocks for the Ethernet PHY, PCIe, audio devices. Signed-off-by: Claudiu Beznea --- Changes in v2: - none .../boot/dts/renesas/rzg3s-smarc-som.dtsi | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi b/arch/arm64/= boot/dts/renesas/rzg3s-smarc-som.dtsi index 2ed01d391554..6e58d47d85b0 100644 --- a/arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi +++ b/arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi @@ -92,6 +92,12 @@ vcc_sdhi2: regulator2 { gpios =3D <&pinctrl RZG2L_GPIO(8, 1) GPIO_ACTIVE_HIGH>; enable-active-high; }; + + x3_clk: x3-clock { + compatible =3D "fixed-clock"; + #clock-cells =3D <0>; + clock-frequency =3D <24000000>; + }; }; =20 #if SW_CONFIG3 =3D=3D SW_ON @@ -152,6 +158,30 @@ &extal_clk { =20 &i2c1 { status =3D "okay"; + + versa3: clock-generator@68 { + compatible =3D "renesas,5l35023"; + reg =3D <0x68>; + clocks =3D <&x3_clk>; + #clock-cells =3D <1>; + assigned-clocks =3D <&versa3 0>, + <&versa3 1>, + <&versa3 2>, + <&versa3 3>, + <&versa3 4>, + <&versa3 5>; + assigned-clock-rates =3D <24000000>, + <12288000>, + <11289600>, + <25000000>, + <100000000>, + <100000000>; + renesas,settings =3D [ + 80 00 11 19 4c 42 dc 2f 06 7d 20 1a 5f 1e f2 27 + 00 40 00 00 00 00 00 00 06 0c 19 02 3f f0 90 86 + a0 80 30 30 9c + ]; + }; }; =20 #if SW_CONFIG2 =3D=3D SW_ON --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (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 EA6C81F818B for ; Fri, 8 Nov 2024 10:51:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063075; cv=none; b=QU3JcYyrvR3RW9cjYxA9MniuiT+3MgqtIpARwyLf3BoQ8rRB8PlCKa3ZQH1mn90XCOXjk7GwIzKr7ZzIvEHN/a28DHLARzhSOuMsPA5lLP+Y8t59MyieaEuINW5ESvRea/R5vLRUUj8lQWmErqOpijkRFIl7dEe7qj+3Uo8kXX8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063075; c=relaxed/simple; bh=+elLfA4VfsJY2MnJEDUj2dewBBjmVeBPdM0RWsMhp1o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=C084ZFOpghvkXov9AMNIrMQkdtNvQl+eFdjf1D1iLyRYwtp0kA00JpCuNXh14JWrXGQsKxqOXhYE/QO6DKAca+Dw1dAh7+lnX1NpL9Kgozj2GCFz37BFyK4rY4zLrIupB2VXV2OUBJ4EXeCbUUNVABtvMtUEKyzGJtWXSxNFWVk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=NYMrsbIr; arc=none smtp.client-ip=209.85.218.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="NYMrsbIr" Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a93c1cc74fdso298760366b.3 for ; Fri, 08 Nov 2024 02:51:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063071; x=1731667871; 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=snMV9I7XJiOsIBTioF2I79J9msSQHgGVZ9Uaq5lTtJM=; b=NYMrsbIrssCJgP6VSEXNbXwxv6JU9D296rshM8eNBFHa2rtLZZQZHlwUh49BF92q0i R+PoN44YD0M757RFJg8yDzgriEWBP0+jd+kxJ+/OBRh/t7L4Lhesy2VHO9s3Mi56JoaY S5WJtOSEIVVK37eHkdYitqX2/xIWB3OWsczXcR2cmfUzR+0qrPCMyDcXm5PGd/v5MqK4 3T3rVskEfyUnL0R183781BddMsma4oE+wCXrKV78X44C6s4/JjDjW4DjReR8X65nAt7j lQaZtpFt6Dc04NYyWV4haOlzrKk6XJjjLo8ocpReZ9/5KmX4+PXRN5D5hAXAcQ+0E5E4 79Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063071; x=1731667871; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=snMV9I7XJiOsIBTioF2I79J9msSQHgGVZ9Uaq5lTtJM=; b=A6vZH9iBdLrveZFuwhvR20ZqnFqo1n89CiKqedqcQpRXQHMsVHMqtd+qI8lZ2CSmKe U40UOOz9nhm3SXeHZ/mjXcheG63MbfoovrLYN88OcTsPqbecBH6CNBFIhH+sYpNmlEd/ MjkRHUvEDgZESpgjaYjRjLVR9KFyaoPQjIRmQhy5594oipuUL0noaifCX6Hfl9UA7whs A1KHvRAU/aAEpT9luplTgznp0gzWpHWMdMG+qEvVvhQ+sM/lE9cFiFQ1ROFTft0UKGwC 2k6TC6Kk3gzTVEyv+dg0qmgF3sRrjOFb/zw+1vSkwnGqxMU+BqNgkuc7BylT4ftQXu+N EROw== X-Forwarded-Encrypted: i=1; AJvYcCXnlvfERAuU/dVSosJkcYCApncMyNrUbyXgI0Z/+hxTeo0O3/VnJSgpZS4y+2pRQ07Ij2NvWV8lhav4zWk=@vger.kernel.org X-Gm-Message-State: AOJu0YwfeEB5UbxBWx3mLggUFl63O3EPTmZq7uYjxukUISe7RXcDbJ0W 97PjJ0k1bATutIE1pWxJU9dnL6ZTFZVgyVS2+QmdBIZjUuQ1fnIFVQgzHB+FOYU= X-Google-Smtp-Source: AGHT+IEXk2PGrE7aJCjvmKPF0q+eI385OHavfjmtOJvm3sOKQT90Qxfcy+mFFxyUp6Mj3N/Qcl6BUA== X-Received: by 2002:a17:906:6a1c:b0:a99:6791:5449 with SMTP id a640c23a62f3a-a9ef0019165mr208984566b.52.1731063071286; Fri, 08 Nov 2024 02:51:11 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.51.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:51:10 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 23/25] arm64: dts: renesas: Add da7212 audio codec node Date: Fri, 8 Nov 2024 12:49:56 +0200 Message-Id: <20241108104958.2931943-24-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Add the da7212 audio codec node. Along with it regulators nodes were reworked to be able to re-use them on da7212. Signed-off-by: Claudiu Beznea --- Changes in v2: - none .../boot/dts/renesas/rzg3s-smarc-som.dtsi | 17 ++++++++++---- arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi | 23 +++++++++++++++++++ 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi b/arch/arm64/= boot/dts/renesas/rzg3s-smarc-som.dtsi index 6e58d47d85b0..5ee9dac4aebb 100644 --- a/arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi +++ b/arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi @@ -63,7 +63,6 @@ vcc_sdhi0: regulator0 { enable-active-high; }; =20 -#if SW_CONFIG2 =3D=3D SW_ON vccq_sdhi0: regulator1 { compatible =3D "regulator-gpio"; regulator-name =3D "SDHI0 VccQ"; @@ -73,8 +72,8 @@ vccq_sdhi0: regulator1 { gpios-states =3D <1>; states =3D <3300000 1>, <1800000 0>; }; -#else - reg_1p8v: regulator1 { + + reg_1p8v: regulator2 { compatible =3D "regulator-fixed"; regulator-name =3D "fixed-1.8V"; regulator-min-microvolt =3D <1800000>; @@ -82,9 +81,17 @@ reg_1p8v: regulator1 { regulator-boot-on; regulator-always-on; }; -#endif =20 - vcc_sdhi2: regulator2 { + reg_3p3v: regulator3 { + compatible =3D "regulator-fixed"; + regulator-name =3D "fixed-3.3V"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + vcc_sdhi2: regulator4 { compatible =3D "regulator-fixed"; regulator-name =3D "SDHI2 Vcc"; regulator-min-microvolt =3D <3300000>; diff --git a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi b/arch/arm64/boot= /dts/renesas/rzg3s-smarc.dtsi index 4509151344c4..4aa99814b808 100644 --- a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi +++ b/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi @@ -68,6 +68,29 @@ &i2c0 { status =3D "okay"; =20 clock-frequency =3D <1000000>; + + da7212: codec@1a { + compatible =3D "dlg,da7212"; + reg =3D <0x1a>; + + #sound-dai-cells =3D <0>; + #address-cells =3D <1>; + #size-cells =3D <0>; + + clocks =3D <&versa3 1>; + clock-names =3D "mclk"; + + dlg,micbias1-lvl =3D <2500>; + dlg,micbias2-lvl =3D <2500>; + dlg,dmic-data-sel =3D "lrise_rfall"; + dlg,dmic-samplephase =3D "between_clkedge"; + dlg,dmic-clkrate =3D <3000000>; + + VDDA-supply =3D <®_1p8v>; + VDDSP-supply =3D <®_3p3v>; + VDDMIC-supply =3D <®_3p3v>; + VDDIO-supply =3D <®_1p8v>; + }; }; =20 &pinctrl { --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (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 6F9591F81B0 for ; Fri, 8 Nov 2024 10:51:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063077; cv=none; b=WdDRMmG8tTyOmUMExitH/yDiqYPfPyBImWR4wwp/81JqZRJdB/xsiDamE6gzLxkN1Oz0iesRhfjjhMcHM/Q52ogkaV3MjiPkRSw3ucL8rtVaxA0FbY+d35+uI7US17wTgiy82el/2j/c0GJGdkV5k3lLuOg+GRO1OebO5LLbL0o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063077; c=relaxed/simple; bh=hqyu/9qwuqDDVwdAINLf2spd90W5bEVXoMMCjRUAF+o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=HxR5DfcYCam8LkXxyqMFw0Bxe0kCYZcqvDkwK3rfD2e3eYupjFHrr3TOeeNSiNjJZNF7e2Mv3mlb4a0mcLSPjP0gf/zt/t21FvRo1GignH50ofnlEsjHcxsGok94p5UdknO1WzyyK30dtG8V15Q2GsmaoIAXHkyul5LWa5cqvac= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=b5QF2SRW; arc=none smtp.client-ip=209.85.208.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="b5QF2SRW" Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-5cb15b84544so2653472a12.2 for ; Fri, 08 Nov 2024 02:51:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063074; x=1731667874; 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=Nhv+LUNkX03bFAIIjXJ8kSHL67xt82fodrUWsAE+DN4=; b=b5QF2SRW7dwruDQtoYYbgvRLhlZiw7pV4vDoXRUGgw1IHJWGbkIsX+UQeGYAdgUFht 9V6S6AcQrO70wNgEL7f3CbRarYy6HlP8CQFp3Pd7Hz8AA6wgL79cTXGUFskdsqYuVY/W ROOxS5BfJi7m6teqBcS/Vn7m/xIuyO4LYoMsuIjn4OxLWCLY8ynfAyZdJD/24GZfCYVN x4wN55SiatmMDcbrmK/C7wm1+crMfWH4r3H4jbjCBzTRQtfAnCau0sZo9L3K4xPdQbCQ Z6zTKOTTy3e8KpJqYcvaIk16fW+jMIgK1gNbmh9sCMxUFLAfAPkWRXd7heVzzZBEzmW9 Czfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063074; x=1731667874; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Nhv+LUNkX03bFAIIjXJ8kSHL67xt82fodrUWsAE+DN4=; b=ZwAy+xvS0NLub7kdoYoyYRO/r2N1FbJmzcGbu9n3ER+Kq05gS4tO+bxYA1MKxTAoYL cNZyINnq7P4Q9MKJd+6WxfaYwW2OGZ9Eo5zgSXqnZOA2y9Uqlfj8s1WoGcX64Jn4ASCj COE8DcUezpkuqS1EGBN8/K7ApSXsnWkaeDAvOqFWrYCmyfaixjlgGiyoemaW28wE+8kR gx33J+AkZgQojx+cM1ww5Ui2ysRbs1k0uIccHLTZhoG+odjvx8GQZXZA/BVKgiwcougq wvbTyZKlfitjxy5car3TDRcf/hI0VXx4rSwplcICCFrTdLLN4hHKkUUTpHIHx/zZT0oI hgIA== X-Forwarded-Encrypted: i=1; AJvYcCX3VvyCay1Jni322pXGze3oQMKVhHpJztFvWmqXkU9FAOp7BI+Iw/LJqXWCB68bfa40qHx1xijOeNB1Xxo=@vger.kernel.org X-Gm-Message-State: AOJu0YxaVBgOZNMlFTaY8AE9i1qYGO8vTxMtd4WTSxkcqGdg88Gujh6Q uNjxOne+lC9T6JfwYqn/MsG618SnqSVHU9LWL8c0IXFtBL0OvTi2rKXXxg83ddc= X-Google-Smtp-Source: AGHT+IHUKLF63fTQjZZXGL9+QOGbq1MfnR4SJIk9s5yAvSCxzRCwnV4uEpnoB/HG2rOronjoba1QRA== X-Received: by 2002:a17:907:608b:b0:a9a:6847:e82c with SMTP id a640c23a62f3a-a9eefeecd1emr186776366b.15.1731063073712; Fri, 08 Nov 2024 02:51:13 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.51.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:51:13 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 24/25] arm64: dts: renesas: rzg3s-smarc: Enable SSI3 Date: Fri, 8 Nov 2024 12:49:57 +0200 Message-Id: <20241108104958.2931943-25-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Enable SSI3. Signed-off-by: Claudiu Beznea --- Changes in v2: - none arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi | 26 ++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi b/arch/arm64/boot= /dts/renesas/rzg3s-smarc.dtsi index 4aa99814b808..6dd439e68bd4 100644 --- a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi +++ b/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi @@ -64,6 +64,11 @@ vccq_sdhi1: regulator-vccq-sdhi1 { }; }; =20 +&audio_clk2 { + clock-frequency =3D <12288000>; + status =3D "okay"; +}; + &i2c0 { status =3D "okay"; =20 @@ -94,6 +99,11 @@ da7212: codec@1a { }; =20 &pinctrl { + audio_clock_pins: audio-clock { + pins =3D "AUDIO_CLK1", "AUDIO_CLK2"; + input-enable; + }; + key-1-gpio-hog { gpio-hog; gpios =3D ; @@ -151,6 +161,13 @@ cd { pinmux =3D ; /* SD1_CD */ }; }; + + ssi3_pins: ssi3 { + pinmux =3D , /* BCK */ + , /* RCK */ + , /* TXD */ + ; /* RXD */ + }; }; =20 &scif0 { @@ -171,3 +188,12 @@ &sdhi1 { max-frequency =3D <125000000>; status =3D "okay"; }; + +&ssi3 { + clocks =3D <&cpg CPG_MOD R9A08G045_SSI3_PCLK2>, + <&cpg CPG_MOD R9A08G045_SSI3_PCLK_SFR>, + <&versa3 2>, <&audio_clk2>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&ssi3_pins>, <&audio_clock_pins>; + status =3D "okay"; +}; --=20 2.39.2 From nobody Sun Nov 24 00:02:04 2024 Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (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 1E3661F81BE for ; Fri, 8 Nov 2024 10:51:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063080; cv=none; b=XVF8mr/Nb9TtriKPGZ0rlaXUYhbqW43ke2XOGE2k58ouXgXGsL/24+HKQnzzl5j0ByD23HAl0EPL2PRjcy605YBs785uPHgo3JBej48xchyysTtd9FMXpT4I0U64D+JekJ4N4Bt0nU7M4uO7wWvpY40NXz7HR2kQTbWlUlyKvPc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731063080; c=relaxed/simple; bh=FwNBb8PJKDitrkt9zMvuYiryGV3LO5HO7z0/y1frDmk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jyqqSI/QCX+FLpfvXWLvi8VhYlC1LUvBjI7EPcDtHGsIGPCV+69KLX1smQ93WgYX35/ugE8YKgkH4AhfJGUHPAncSCKZG9ZuYL31HwGH357u2Q1cnc/YwAz1oxqXwd8o9e9monqZTNrc9H1dhqt/oFaXjiAPYiab72KvRtwepQg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=L4No0hir; arc=none smtp.client-ip=209.85.208.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="L4No0hir" Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-5c941623a5aso5350088a12.0 for ; Fri, 08 Nov 2024 02:51:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1731063076; x=1731667876; 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=1Yv9S6ASNoJOmHUs/658HSVVjNOTRq4qk+h2A23x1rM=; b=L4No0hirQsa0zWYexQpA4aEGhpsFi9xkR5Ds9DbAAfqRnqtl1h3tR1vflk16FPLZra DLexmGk2PSxNQCrfFtJ1n8OPTl7POoT0kbhcrX/XT/xN63zbNBtG9fmy4jJARTQoEQqg hOQJlJMWdWfhYLcfSIZ7Yg5D1StHa7fQkr1T258iuP4VQpE/yZkxRLMiKsCF1ZUWoUSs epQDTinBxJ9zHXIJQJpGJbnq3mHUVx3uQ9xBT/Yfdb/7brzHZyGBiosZHU6pb7FHfs8m NhzXHV9RlpWi1rKATds1xz0zkezuhyTCoM8xJHUCLYlLoBBVDccv8/U/8PyaYZnk9RWQ LCOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731063076; x=1731667876; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1Yv9S6ASNoJOmHUs/658HSVVjNOTRq4qk+h2A23x1rM=; b=XGu+uJp7T+9MAT6ExqC/nC/PBTfMAPUFAiruhsHn7+2OZay8GVU3sDlNyaz0YhJcRW dm1g8/avaKLLnsjpJ3eLb6e+h8XjZPlqEXMhTDxbpTx/jDU1y9gH1+ASDn/knrnagTob Q84ohXcmswhUnxTbYB2S6QLYvlGInQQESOMQxsa8twZ0UGubZnIix3/z6cuINZkmK0ON e6qP4ZGPBsQyWL99Kjt0nCykLepCfWrcKi+ywuhuKHLOQC7vL61SDTNtj82Wgtlf7JC5 W+4xZiTaMMlhaU6RyDVyJANqU68PFPMUhEPs4aL3lBEbV1G/URBfmDoiq6SBjzTQYlzM Ermg== X-Forwarded-Encrypted: i=1; AJvYcCXcBL26wWI2zapo/eeaOx1RDgKK/y0hjJXuJFZbbNrojOXw3LyFFn6BOTgnIQXNBWspyRmjAbWvz0s9MFU=@vger.kernel.org X-Gm-Message-State: AOJu0Yy86Whr4HMIkd7Obhbazb+iNe4r1/nVnLzWlv0adnN6IexGtz6R Q62AcYOgKkbueAJSkg7ahE3l8j7v6KgutpjGuYpcI9fQG1jwToShSUD0b/bx2Y8= X-Google-Smtp-Source: AGHT+IFuBqaKmSlpAgIXdyExoaT/W1PzCgtdHUGxj4xhW8TXs0GWnsMiDurm3/upr/LpAR0vUHYMIw== X-Received: by 2002:a17:907:3188:b0:a9e:c4df:e3c9 with SMTP id a640c23a62f3a-a9eeff97fcemr219403566b.24.1731063076495; Fri, 08 Nov 2024 02:51:16 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc574dsm220464866b.101.2024.11.08.02.51.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 02:51:15 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, linus.walleij@linaro.org, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 25/25] arm64: dts: renesas: rzg3s-smarc: Add sound card Date: Fri, 8 Nov 2024 12:49:58 +0200 Message-Id: <20241108104958.2931943-26-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241108104958.2931943-1-claudiu.beznea.uj@bp.renesas.com> References: <20241108104958.2931943-1-claudiu.beznea.uj@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Add sound card with SSI3 as CPU DAI and DA7212 as codec DAI. Signed-off-by: Claudiu Beznea --- Changes in v2: - none arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi b/arch/arm64/boot= /dts/renesas/rzg3s-smarc.dtsi index 6dd439e68bd4..89673bbaee6d 100644 --- a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi +++ b/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi @@ -44,6 +44,23 @@ key-3 { }; }; =20 + snd_rzg3s: sound { + compatible =3D "simple-audio-card"; + simple-audio-card,format =3D "i2s"; + simple-audio-card,bitclock-master =3D <&cpu_dai>; + simple-audio-card,frame-master =3D <&cpu_dai>; + simple-audio-card,mclk-fs =3D <256>; + + cpu_dai: simple-audio-card,cpu { + sound-dai =3D <&ssi3>; + }; + + codec_dai: simple-audio-card,codec { + sound-dai =3D <&da7212>; + clocks =3D <&versa3 1>; + }; + }; + vcc_sdhi1: regulator-vcc-sdhi1 { compatible =3D "regulator-fixed"; regulator-name =3D "SDHI1 Vcc"; --=20 2.39.2