From patchwork Tue Dec 10 17:09:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903381 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75348E77180 for ; Wed, 11 Dec 2024 11:28:20 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 72DC3299C; Wed, 11 Dec 2024 12:28:08 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 72DC3299C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916498; bh=xBCdUB4AW8mhnjHqG44vkCdEwLfV+6wgiY3J65tG+OY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=EpxqPYRXVeoXLGuywx9Zb0P93ZcWUzMCIufigsSXl/PMx8bRwotFcOCKeZHeEOjWO Bci0Dq+j7cHdcOO5AHS/n8G70NRI20QYrr0MhuUpf7PFbLXA4CciAX7nkcgjdWc+Dh yD0F6mM4SV46m2scthC/7G0Up5CjN9Gergc9LnhI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 790F7F8060A; Wed, 11 Dec 2024 12:27:17 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id AF743F80609; Wed, 11 Dec 2024 12:27:17 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C8C46F80482; Tue, 10 Dec 2024 18:11:09 +0100 (CET) Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1E827F8016C for ; Tue, 10 Dec 2024 18:11:07 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1E827F8016C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=IEIXcdtZ Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-5d3f28a4fccso3467980a12.2 for ; Tue, 10 Dec 2024 09:11:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850607; x=1734455407; darn=alsa-project.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=uadH9PhfIl+f0c96d/6lazQpTxglh5DEUY3M9hlx46E=; b=IEIXcdtZk3QexipLIm4s+xDAA2kbxLI/R0mKnhuSmjNCBRj9EHSjHgbEsI9QyPfwxa z5f54nlvDOYTJ3mXUwAqDLFinUV4lMSEcTawq5VdikyzYUBaD55d8vN3jSjnODgtB+MW 2qNzG26mqykAyXX6Vn9mkeMsqOoSJxEcP37vGObhVhpVwVUfyjxYpYwBdljK8Rq2bqrg hRLD/Le4S9Z5sMC0WV9SGURfTf+RfsJmbCIUk3kU+DXPuMNlRS+19tDi7vyh23Qyaonq EtaM0Z9Yhv90nehYlfM0YfyVZmSSIWs5yWOOzjh4og4wvsyFfWpYzJcVtrzuK9BBrdrP mXSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850607; x=1734455407; 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=uadH9PhfIl+f0c96d/6lazQpTxglh5DEUY3M9hlx46E=; b=p/o0KFuTQfuTV9QE2/Q8qIITEuU6hYhRvZH3q4IQmtaNqA7taV/FVM70t1txJPUvpQ aSVQbbrSmj8agnErqxgFubnxpTmFpNJE578K5spLUUjl9m3Et6Xp4MRuYlSpmbW/5r0i IZqF8/xIFinjFqJwkWt16KuHWJQLPFcKCrPAnug6PGRJbs4yVvIF23iPFz3/zcixv/9W /A7jVhRhxcbxtk1t1hkqwt/jr3EulhYYXRTtY2soCX1SegMZLXNQQ102dZ8PFT7E7s96 0z25YhhPR8YmzWS0z/rnlRppZcIe8d+6sGy+8EmFTtc9hDk53nLug+RzzhlqUsKMWZzN kWTg== X-Forwarded-Encrypted: i=1; AJvYcCWGxYIxdb+aLwS2kEsllORdPK3ggpmEL2n/5W0B0SfYuAGtnQm3rQBiuCdXnEblqg/BfqnV8fkuR+ip@alsa-project.org X-Gm-Message-State: AOJu0YwgFZcQwbRyYKA4KLu8RBmo/sxVpvKGjJBe+lu+t9wf4zmiGzwI 7tF2Ifq9Ni55bihpMkQGPv5W+aZOnRjXuUdnV2R2ORJvhqs2yl2n2iLMbDOLizQ= X-Gm-Gg: ASbGncuCx/v8Ggb9IVYpVcX/nglOK64M0I8x27pc8H+AWikQZntP3cuHmnRs8FW6pqJ PMcnueTtjG75XIGMjfuYLQlYMb4H7Vs+/hxKibkFBwykyedW6lj21/2OXquL9fgUg92X8+ZTZiB NGx13tUFhwG8Yv2CfkvhgzALSgCJRtl42P84OWCFTwHGHv/11WDJkVV61flCs0xaEqoL64NR1jW kUYyviNJ3eVzWfM0F+klye2cBDBAl5ssdYJvBH748I9F3uR3cBe4qCA6BDgKKOLAgYOw0fhlOSO ndLTtkws X-Google-Smtp-Source: AGHT+IGFg61AhXK6q2yCp479aYEgRKUVM1++05q63Nd9oxa57q0bisHWfgqRash6JB5OY1cEW+iywA== X-Received: by 2002:a05:6402:4005:b0:5d2:7270:6125 with SMTP id 4fb4d7f45d1cf-5d3be6889e3mr17256633a12.8.1733850607270; Tue, 10 Dec 2024 09:10:07 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:06 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea Subject: [PATCH v4 01/24] clk: versaclock3: Prepare for the addition of 5L35023 device Date: Tue, 10 Dec 2024 19:09:30 +0200 Message-Id: <20241210170953.2936724-2-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: GGM4MVGXVHQ7E2JNAINAKQXCN5AGHFVV X-Message-ID-Hash: GGM4MVGXVHQ7E2JNAINAKQXCN5AGHFVV X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:06 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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. Reviewed-by: Biju Das Signed-off-by: Claudiu Beznea --- Changes in v4: - none Changes in v3: - collected tags 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 -#define VC3_PLL2_VCO_MIN 400000000UL -#define VC3_PLL2_VCO_MAX 1200000000UL - #define VC3_PLL3_VCO_MIN 300000000UL #define VC3_PLL3_VCO_MAX 800000000UL @@ -147,9 +144,13 @@ struct vc3_pfd_data { u8 mdiv2_bitmsk; }; +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; u32 div_int; u32 div_frc; }; +struct vc3_hw_cfg { + struct vc3_vco pll2_vco; + u32 se2_clk_sel_msk; +}; + static const struct clk_div_table div1_divs[] = { { .val = 0, .div = 1, }, { .val = 1, .div = 4, }, { .val = 2, .div = 5, }, { .val = 3, .div = 6, }, @@ -386,10 +392,10 @@ static long vc3_pll_round_rate(struct clk_hw *hw, unsigned long rate, const struct vc3_pll_data *pll = vc3->data; u64 div_frc; - if (rate < pll->vco_min) - rate = pll->vco_min; - if (rate > pll->vco_max) - rate = pll->vco_max; + if (rate < pll->vco.min) + rate = pll->vco.min; + if (rate > pll->vco.max) + rate = pll->vco.max; vc3->div_int = rate / *parent_rate; @@ -680,8 +686,10 @@ static struct vc3_hw_data clk_pll[] = { .num = VC3_PLL1, .int_div_msb_offs = VC3_PLL1_LOOP_FILTER_N_DIV_MSB, .int_div_lsb_offs = VC3_PLL1_VCO_N_DIVIDER, - .vco_min = VC3_PLL1_VCO_MIN, - .vco_max = VC3_PLL1_VCO_MAX + .vco = { + .min = VC3_PLL1_VCO_MIN, + .max = VC3_PLL1_VCO_MAX + } }, .hw.init = &(struct clk_init_data) { .name = "pll1", @@ -698,8 +706,6 @@ static struct vc3_hw_data clk_pll[] = { .num = VC3_PLL2, .int_div_msb_offs = VC3_PLL2_FB_INT_DIV_MSB, .int_div_lsb_offs = VC3_PLL2_FB_INT_DIV_LSB, - .vco_min = VC3_PLL2_VCO_MIN, - .vco_max = VC3_PLL2_VCO_MAX }, .hw.init = &(struct clk_init_data) { .name = "pll2", @@ -716,8 +722,10 @@ static struct vc3_hw_data clk_pll[] = { .num = VC3_PLL3, .int_div_msb_offs = VC3_PLL3_LOOP_FILTER_N_DIV_MSB, .int_div_lsb_offs = VC3_PLL3_N_DIVIDER, - .vco_min = VC3_PLL3_VCO_MIN, - .vco_max = VC3_PLL3_VCO_MAX + .vco = { + .min = VC3_PLL3_VCO_MIN, + .max = VC3_PLL3_VCO_MAX + } }, .hw.init = &(struct clk_init_data) { .name = "pll3", @@ -901,7 +909,6 @@ static struct vc3_hw_data clk_mux[] = { [VC3_SE2_MUX] = { .data = &(struct vc3_clk_data) { .offs = VC3_SE2_CTRL_REG0, - .bitmsk = VC3_SE2_CTRL_REG0_SE2_CLK_SEL }, .hw.init = &(struct clk_init_data) { .name = "se2_mux", @@ -982,6 +989,7 @@ static int vc3_probe(struct i2c_client *client) { struct device *dev = &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); } + data = i2c_get_match_data(client); + /* Register pll's */ for (i = 0; i < ARRAY_SIZE(clk_pll); i++) { clk_pll[i].regmap = regmap; + if (i == VC3_PLL2) { + struct vc3_pll_data *pll_data = clk_pll[i].data; + + pll_data->vco = data->pll2_vco; + } ret = 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 = 0; i < ARRAY_SIZE(clk_mux); i++) { clk_mux[i].regmap = regmap; + if (i == VC3_SE2_MUX) { + struct vc3_clk_data *clk_data = clk_mux[i].data; + + clk_data->bitmsk = data->se2_clk_sel_msk; + } ret = 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; } +static const struct vc3_hw_cfg vc3_5p = { + .pll2_vco = { .min = 400000000UL, .max = 1200000000UL }, + .se2_clk_sel_msk = BIT(6), +}; + static const struct of_device_id dev_ids[] = { - { .compatible = "renesas,5p35023" }, + { .compatible = "renesas,5p35023", .data = &vc3_5p }, { /* Sentinel */ } }; MODULE_DEVICE_TABLE(of, dev_ids); From patchwork Tue Dec 10 17:09:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903382 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E181CE7717D for ; Wed, 11 Dec 2024 11:28:37 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5ABD3265E; Wed, 11 Dec 2024 12:28:26 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5ABD3265E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916516; bh=28M0DwDkMWfh/cCYd77FlED8MgZgXdkVNsI9ruq8oCo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ZvSgwzmG6hcRdCVjx4MV8BH3cQobzoum54QRaMRoRMH9jgqn/f0mi7PMp9mp9/ASJ s658T5W2fLh+kRor2ZnQf2Lkv00WWc+JXTdMnZG4XKTieYbwH7ygPIXoCzCVdMuugC HJdzcJONltY0GW5T2WvKv/E3IhTXzXmdnW0bqUX8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id BB750F8062F; Wed, 11 Dec 2024 12:27:20 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 85D20F80635; Wed, 11 Dec 2024 12:27:20 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 47C2FF805AB; Tue, 10 Dec 2024 18:11:12 +0100 (CET) Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8E762F800E9 for ; Tue, 10 Dec 2024 18:11:10 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8E762F800E9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=Pcq1iHfv Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-5d3d143376dso5626696a12.3 for ; Tue, 10 Dec 2024 09:11:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850609; x=1734455409; darn=alsa-project.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=ehtFOxPVmrl0HXvdtrtv9cXQJbKgItgUhCJ0+pIiLcI=; b=Pcq1iHfv8XpFIT7uoN4qS/zGi327csrFJh/e6ipGofw5ndXi9re3o8m2POg2A0jbGM kg9LhArnov2sCiqdJWmihpJYVG6w5MqX1io64xdVAwmQWfemEFgFZLcV7zqJA3sQckBQ OWh8zEfkDvuOdiGkntugRuUljQGn8lYfORtYoGpYLNElnOwwoFMWfUBD7r9IAbCWHnB8 /VauLrTjhf2BtuqbYLozakSpNulT1OvLJttZVQweU/lihLLeZKHtElGzmRJzxjjbiZKf pn3ZU72d2SkWXGNbvsJbEGLVBR7ygyPZOzbjeC+zO405gKRtByrCAVBa3irEyQmmTzb9 6ndw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850609; x=1734455409; 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=ehtFOxPVmrl0HXvdtrtv9cXQJbKgItgUhCJ0+pIiLcI=; b=bjcdyGBp8Pxau1FvXKOhBVdrUHvPwDhhF//dm+mc10Fr6JaQTA0IZCbq7CYAx4nbaz G1HEZ6ROdVQY2PngfeP/Nk+gYmt7nVaXDhA/D9N1/rGzXfREoo1k55rnybST2SIXCM1l 7ljJ6ktSMzYD6UP9seXg3kr3UWDY96PHtufJeJZmK73BcWBQWtGjDlF9Ec2Aa9+J92A9 QL2GM+FwKDu+Ij06SI0Y0i/HaF1/3Gbr40vhl3VfW7dqD9temBuPKYWT4Dsykx0NpoBb wgg3UxMQkctZRufJvzBS1C9HgstuDzYKfOStsDZQD5mCNAueULa+9gB/siYC7PSRgI8C Tgow== X-Forwarded-Encrypted: i=1; AJvYcCXXaN2RaikoGer1UGV/lnRgqINj8yyCdb6yW4tNMyjnHzNaG6JbHVT4iPYPGSYkIb+rRAFX/p2GFH0B@alsa-project.org X-Gm-Message-State: AOJu0Yx1xFEHkY+3ieIXHk2rjYEmjm0XuC6Wrbp3Wt0jqlB1jpW4U8Nn 57H9/A5TTtPzfgaY7QuqHZPav9vHGCFarIIKPXECYqBxC83TX0fG7xbJNk1Xf9Q= X-Gm-Gg: ASbGnctuKGpZ8WygVk6C4kPhlQka9UaUFzKLPbPXlUixWRvXaGk7CuZkP8nyBd6ft/h eBNtwegQKh/9jfcgJFS7QX1lwzLXj1fxbAEw9bLnwvTxizzmqcUYEvXZH9eOtEGS6ZEmezRaFxt bmQYq8XVs9e6nkera4blcb2Di+ZKSXBxngTOFvphtfFIvJvKMPHrk+QeWFpxiXOawCJIZAi1/eN rO2IIXIQrzag6fC5MIz1rd7CCZqyzK9d3g8Kx2l+HyR6qkNWXP+ci1Ot5R+71WVZpZrUO5LHLHP MDpkm9lC X-Google-Smtp-Source: AGHT+IFmnNKXXAN067E1UbwhBJfMpK5O10AWTX9+hlwh80SSPAEOWU+7C2pI3MGNxXbuHtb4mGyh4w== X-Received: by 2002:a05:6402:1ed6:b0:5d1:3da:e6c with SMTP id 4fb4d7f45d1cf-5d41853e70cmr5928380a12.10.1733850609561; Tue, 10 Dec 2024 09:10:09 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:09 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea , Krzysztof Kozlowski Subject: [PATCH v4 02/24] dt-bindings: clock: versaclock3: Document 5L35023 Versa3 clock generator Date: Tue, 10 Dec 2024 19:09:31 +0200 Message-Id: <20241210170953.2936724-3-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: T7RNLITIGBTJH6PAKU5RADW75VFZT4Z5 X-Message-ID-Hash: T7RNLITIGBTJH6PAKU5RADW75VFZT4Z5 X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:07 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 Reviewed-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v4: - collected tags Changes in v3: - collected tags 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 reg: From patchwork Tue Dec 10 17:09:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903383 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 28196E7717D for ; Wed, 11 Dec 2024 11:28:56 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9D11C23D2; Wed, 11 Dec 2024 12:28:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9D11C23D2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916534; bh=OTYVPrJXZsCibJypCZf8QK2KZMdsmtd9T0kWyznh0q0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=NMclCQiqA1Z2YqZvxFkAyVHTOX2Yq1ifUuMCrUaRmGGG+X3PkjfCtXI6B1/nGeuoj hTv7TXNAlh+Om+N0KaOYZclkD9reXxP5hqoiuIDVnJO8eoL4nuc0vcAM2lYjey90A+ 3/oEFRumfffZ/q0qWq3yw844DqmQ5YKKhIBDoOY4= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1306AF80679; Wed, 11 Dec 2024 12:27:22 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 056F6F80674; Wed, 11 Dec 2024 12:27:22 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9ADE7F80518; Tue, 10 Dec 2024 18:11:15 +0100 (CET) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id ED599F8016C for ; Tue, 10 Dec 2024 18:11:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ED599F8016C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=NkLF3wmJ Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-5d122cf8e52so9170535a12.1 for ; Tue, 10 Dec 2024 09:11:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850613; x=1734455413; darn=alsa-project.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=Y4VjqX7iwW/vu6N1WvzJJpy4sCnLnXPgQs452O7qiog=; b=NkLF3wmJqyIT4c5MJ85QsPRVY7B4sIOs6yQk9H9x+QkBo4EqDpwiIZRnZSy6Ez0tcC GpM1LyrzIVquBQlFMTiQPpvRtOgHLhHqZUAi0wM8zZ7YRv/edA1aD7ANqwrYzOKGDIBw dJvLW6H5lq32Jg/ksHIKW4veFsLY/Oo8oOXySBNzsKSeVwKb27DFOrlzNZnUQI9Z3tfJ lnOllRgI5dZ/XzrvueuhS34uKI7KakjBN3S41HVVhQoON6gaNu+etCbZAZ8vn631FaTv 7RKJDYnpxvjujnKFR8/JdyTOXwoo4mTUTKWfrWsqBq4JuQ9zC/08+YnbEm5rop5cAHBD gAtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850613; x=1734455413; 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=Y4VjqX7iwW/vu6N1WvzJJpy4sCnLnXPgQs452O7qiog=; b=HFnCDo5+Ng7tr4x8HTEdoQirAZhVtsJ5zusv61mNsSkXIweMkdBYO92EHQFq2cmtw8 510k/9mqtru7/vQ9+hrOWSDTLkJutcr98oxGP59r+VtrgWiusady25DzR0ygLNi1Tfx6 d9mWOWfOxsIELFzLBqC0nZBLM6mvtIJntiJfa3EVQvWDDOyHy+Ks4xScbcD/Rdz4N0WH OeaJQ+lGU1a4CqG5bwwehov67yjF4Ym6ufReZWe9Wo3unKVVjG9vKvFtRvuz5aQVp9po OX+SiwK80YQ1Xr4Rp/F7ExgPuImzhTxhCimZAadOPcW1wN5hLr9IjMzu+zddgh3OFry3 30QA== X-Forwarded-Encrypted: i=1; AJvYcCUtpLXDduENOhe8v9oOlBeEL/ij64ZaccQ/q7qCQqG5iLvDyDlpakiWQQPyLp3E3AK3Hw7MjQ6paqhU@alsa-project.org X-Gm-Message-State: AOJu0YzxsR+ouZhWAh/RdSMAExiJjWCCSDXbMaiGyd//nYDFoFXdw63l GPp2IpfVs+OD5gQp/5mkp96ppvHcLY/QVnTRMkvnaNhEVSP+7Pvj3E7oG8WxUYg= X-Gm-Gg: ASbGnct7IVAWBp8tEL2O7QIk6TuJ4cCu+o0nRZQ8CHDSqayJi8eyXhavRTi4ZRPSftE g9wl5N+9d5CYJeojndM3gP3NHPAhJfwbirSB1x+BpGHf199MT9ZRsNUcLFg3a17uS14NuTcKDMC uNGZ8AAF2SN+W1pw/y+rm51cHRW+kHruY1cUxWsg2HG1CgpFrmjGvhSJQ4UR6YvhxJlGDw0h/43 b5MseFqzBvV9iw7wO06MkAH6Bxr6zE+R4mJVNrRc+niTz3QTbtv9AC8Bx3oRO3jGIrjQYBmmDWG FSUwWD53 X-Google-Smtp-Source: AGHT+IF1pww2qqLE9zMCq4Z4/K+bkG+iAYWr1I2S2Beewnfd6QMcuan64k6kobi5emQ4TB2NMs4iTA== X-Received: by 2002:a05:6402:13d4:b0:5d3:ba97:527e with SMTP id 4fb4d7f45d1cf-5d4185fea2fmr5584908a12.25.1733850612616; Tue, 10 Dec 2024 09:10:12 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:11 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea Subject: [PATCH v4 03/24] clk: versaclock3: Add support for the 5L35023 variant Date: Tue, 10 Dec 2024 19:09:32 +0200 Message-Id: <20241210170953.2936724-4-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: ANAFNCWBOHXWGZPL24OWWHGXTDS6LJ2I X-Message-ID-Hash: ANAFNCWBOHXWGZPL24OWWHGXTDS6LJ2I X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:07 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Claudiu Beznea Add support for the 5L35023 variant of the Versa 3 clock generator. Reviewed-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v4: - collected tags Changes in v3: - collected tags 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 = { .se2_clk_sel_msk = BIT(6), }; +static const struct vc3_hw_cfg vc3_5l = { + .pll2_vco = { .min = 30000000UL, .max = 130000000UL }, + .se2_clk_sel_msk = BIT(0), +}; + static const struct of_device_id dev_ids[] = { { .compatible = "renesas,5p35023", .data = &vc3_5p }, + { .compatible = "renesas,5l35023", .data = &vc3_5l }, { /* Sentinel */ } }; MODULE_DEVICE_TABLE(of, dev_ids); From patchwork Tue Dec 10 17:09:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903387 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D2C1AE7717D for ; Wed, 11 Dec 2024 11:29:13 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 186B52BA8; Wed, 11 Dec 2024 12:29:02 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 186B52BA8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916552; bh=o6bb+5TT8a4+4885SQUIo5IIlBm8LtwjyGEaLw06x18=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=q8/7Jyrb6crmZnqY5almYMi+RH0P64ejbEBi0qhv04TEyhD57K8Y+mJ3/g0PJm+EC xA2RBaUYgmj5U/k2yOz+iHkv1q6VWJmuTIuhZ08ThyvorspDu2KS8hLrhwoMn+5iWB jTTcfIhE8ArbjXba5jOTcN+FCuC6oAKjwUaKpjWs= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2FECDF8069C; Wed, 11 Dec 2024 12:27:24 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 69A46F8069A; Wed, 11 Dec 2024 12:27:24 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 44645F805AB; Tue, 10 Dec 2024 18:11:17 +0100 (CET) Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 932CDF80482 for ; Tue, 10 Dec 2024 18:11:15 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 932CDF80482 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=e5oVwzSz Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-5d3e8f64d5dso5211052a12.3 for ; Tue, 10 Dec 2024 09:11:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850615; x=1734455415; darn=alsa-project.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=qo27pKYlk9UKLBg0czdTh7Uwm7olEalHUIHQAM8AonU=; b=e5oVwzSz5ZsoADQhlaPPtGwTHI3x9LK1aRiFaChrvf7K8o9QzYzPDzGlUD5pALYNOT a7awQsBqLWd+thelvNZ5SfgRQkLSZP8hoMrm5vy6FUSx/TUZc+2dH78TxribsTpwUX2S GuYAW6rPguy2NltVR8+Lh7DE5ycGTzx4RE/MwvAVRAvnXc/fc6lJKG1qtftkp5BmN3Pc fUVueVLDE3kh95b6Za9RwLQYc+tB8L6ax7hS9w90kz4JL+gfFO4ckoIwxgL3+ZxgcnNY byPiiFNWcS75El3dCB+oCbUHt0LHLa9bjWIK4yeowQFNBzXbLFnGTJ6MVez31LP/c7Ge mfvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850615; x=1734455415; 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=qo27pKYlk9UKLBg0czdTh7Uwm7olEalHUIHQAM8AonU=; b=MZNMsDryNmbVXzm6WsMgWRrkUUEIWIesu8qSIpAup6ikCPpZOqqXhn1DDJmRENG/AC 6qGAbUWTH8uJSW43trXMWKEeE/MqUfUyBJCoQvR+/65DdoDxNR61HFZYgpOnffoCqZRm eVxQ/CjfsrbVJxOo4NQpROfQ3TJEOE4NDhiVsFFIgT+U3777SbspZx2HAcYXP9Dm266u NC39NwwqGRscI2ogvRQrSfBQkflLRIUZPOxOOmUB5R0GlJv1uCvfXZwy6eQyW5U7fAKT gyWMutP8zWMjwCMmnh++gQEIGTlmJ9IdGmTEs0bCb5pYguWjj93dXypM8MAsWEA52qQ8 gjWg== X-Forwarded-Encrypted: i=1; AJvYcCUYC8e9iozKAXBmPtEwCCjV48RNOIcHHDPzzThKW3eicijtV2OYEJs1ELwDj8aAm3YrtuO7S+jWNs4A@alsa-project.org X-Gm-Message-State: AOJu0YwF+zyxttT6362K7wxmEeiNB2lrJ8mwJRMP+/ND9C1yjnBwPRIK RYzMwUzBlVesrlZg/DBtsHmXObu9KiObfVRavym8nAS2dE11LswfG6GGbnODUwQ= X-Gm-Gg: ASbGnct41sNG+zfJdrJ6/OPM6Op4LiHj2OuPQIsXEwetzyPiXT6tQ7uYoVgJ75IU/G9 DGIkAe8jmRlGm5WDEuTLrXdOLQVCS3gEBlyD8MsVBszHziNF3wT+PnWzlLniyn+IB6+FeaA63qS 94AE+2tvVOb4g3WNUG2HFlGjQD0m131Dquo4fJZ/k8nkFRUJWINdY7QVk5ejbrCep1YO6FiZ7bZ m8BG/9ryZXaV7kjajy7uoGD/TVlyQ1fLKtV/0bEGR44+xf0+RR0MRbaQitUx3T5WcNX/O2tOZon gVFP7Osi X-Google-Smtp-Source: AGHT+IGWUjWO6EYZ1uAazblGzPDgU2K3A7r87jOiz1TUWyFTmpyxPZFuPXfCgEn67jBfzXe1r6LxEw== X-Received: by 2002:a05:6402:11d1:b0:5d1:f009:9266 with SMTP id 4fb4d7f45d1cf-5d3be65f80bmr15150003a12.2.1733850614698; Tue, 10 Dec 2024 09:10:14 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:14 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea , stable@vger.kernel.org Subject: [PATCH v4 04/24] ASoC: renesas: rz-ssi: Terminate all the DMA transactions Date: Tue, 10 Dec 2024 19:09:33 +0200 Message-Id: <20241210170953.2936724-5-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: SMWRMKHH7ZCOS7Q7D33ZYF2CCMSDKK5B X-Message-ID-Hash: SMWRMKHH7ZCOS7Q7D33ZYF2CCMSDKK5B X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:08 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Claudiu Beznea The stop trigger invokes rz_ssi_stop() and rz_ssi_stream_quit(). - The purpose of rz_ssi_stop() is to disable TX/RX, terminate DMA transactions, and set the controller to idle. - The purpose of rz_ssi_stream_quit() is to reset the substream-specific software data by setting strm->running and strm->substream appropriately. The function rz_ssi_is_stream_running() checks if both strm->substream and strm->running are valid and returns true if so. Its implementation is as follows: static inline bool rz_ssi_is_stream_running(struct rz_ssi_stream *strm) { return strm->substream && strm->running; } When the controller is configured in full-duplex mode (with both playback and capture active), the rz_ssi_stop() function does not modify the controller settings when called for the first substream in the full-duplex setup. Instead, it simply sets strm->running = 0 and returns if the companion substream is still running. The following code illustrates this: static int rz_ssi_stop(struct rz_ssi_priv *ssi, struct rz_ssi_stream *strm) { strm->running = 0; if (rz_ssi_is_stream_running(&ssi->playback) || rz_ssi_is_stream_running(&ssi->capture)) return 0; // ... } The controller settings, along with the DMA termination (for the last stopped substream), are only applied when the last substream in the full-duplex setup is stopped. While applying the controller settings only when the last substream stops is not problematic, terminating the DMA operations for only one substream causes failures when starting and stopping full-duplex operations multiple times in a loop. To address this issue, call dmaengine_terminate_async() for both substreams involved in the full-duplex setup when the last substream in the setup is stopped. Fixes: 4f8cd05a4305 ("ASoC: sh: rz-ssi: Add full duplex support") Cc: stable@vger.kernel.org Reviewed-by: Biju Das Signed-off-by: Claudiu Beznea --- Changes in v4: - updated patch description Changes in v3: - collected tags - use proper fixes commit SHA1 and description - s/sh/renesas in patch title 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); /* 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); + } rz_ssi_set_idle(ssi); From patchwork Tue Dec 10 17:09:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903388 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ED76FE7717D for ; Wed, 11 Dec 2024 11:29:30 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5A6AD2BA6; Wed, 11 Dec 2024 12:29:17 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5A6AD2BA6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916567; bh=cYpvDeE6GTSqLQn4hyIC1LguXTCN6MR9BcYpMn3wlfA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=mWOHs5ALFDMtkzMLD1R+M4JMKLBQEwphIMtsNIIx+MzEPYOP7lxEpZM2Z3f0ctFxu ATjDQDdYWGu/4x80201Bm9meolA5z6pBSjLnDL49UI5dyNqgTjejz+NnWavtYQuMwR 0DxYbJA5kL23FYR1sSs5z+YgoxwcHKAVjtoKyV8E= Received: by alsa1.perex.cz (Postfix, from userid 50401) id F3152F806B8; Wed, 11 Dec 2024 12:27:28 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 8583DF806AB; Wed, 11 Dec 2024 12:27:28 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B84DDF80518; Tue, 10 Dec 2024 18:11:18 +0100 (CET) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 12EFEF8016C for ; Tue, 10 Dec 2024 18:11:16 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 12EFEF8016C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=eaN/1zyS Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-5d41848901bso2976720a12.0 for ; Tue, 10 Dec 2024 09:11:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850616; x=1734455416; darn=alsa-project.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=WRP6aXMQvXzM2V4VFmQeuWDqqgGNHEkIoJ0Wes8B7Jk=; b=eaN/1zySMu9+wrpP3DuAKsArvmBK8Pw6c6JmPnIKhqcaJzQ0RE120BcgW8+75bvxGE 3y+loISVr/TYUAorYZELoWNfk6XTvrCFt4JJArQEGIPQYH2YYdYAI4k8PoJnqXrUVv0J SDqRzTcbBloqTISMhEUwY7lUiOO31BDIvbP9IVIKiMOXQQCTbwhqiQYa7wC2a23sZ/GX PDkG2dbSxDQH1i2FFqmghz5PHnUrxminVtUwPhMLw2yMfIqbGVkIPpCosv1Z+NXRB+OV IwPX/KTNNBz3PQ9gQ565V1lyuGi5CvWmN3/Iz1VAbKvlfBd5l0bETYXKU7rw99EF+cck bYXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850616; x=1734455416; 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=WRP6aXMQvXzM2V4VFmQeuWDqqgGNHEkIoJ0Wes8B7Jk=; b=dXRW+IWbHYDTs54zw6O0DC0jz5QZ6qqhDlDaz/QUx7DTrXiK0EVzoDQPPO+Ta8cSrz 8RCcseZYAU5NFD+PZku197PxBaGt6G1CSaYhrzTY6X816/aD1kHuRTM5gq8aVzFh7IzK 22KlnuodLEte+4iA+3dJaKVf0FRakSm+lQEYmIOHRm40oTmipk1w3OnT6oljPCVIMi+V teSFcthFpXd1Yf9+x0RPkZ+TZWcqr/waMwAwXnfUXlEC+lDQ8oD3Otsx6syFWxb4UJg8 lqbBbTbS+PHotDewiju/cJMn/k1MBwk/ZO6bcZCrGDTOphlymieoMVa+9n/M8wQ3WBTm 3UtA== X-Forwarded-Encrypted: i=1; AJvYcCXh0G12UykBjKPP0rK/G3SaoZI6x5qNFEFrrmNl5C1lhNFzyrIsqymz+LNAzVW4TizlKg6z/4ciN1Au@alsa-project.org X-Gm-Message-State: AOJu0YyQenzsDDbR+ZFD2gY1Cu9DQg+KKbYgxN5lDJTolZ9m0zlQJCPi /2waGL6CWpyR1enRL9qXwUkF3rqjGNk5jZ9H9MLFlPWg8WFwUWVeiA4Sn55rFjoUB6aHyU9fmQ+ m X-Gm-Gg: ASbGncvqjevDCFmBjZEcGDpZNtneAG2+nkYDTYE3O/u2lFpFp1zORRzUU3GOOUAdweE BgU3b0Jlf0IbVRYT6GMFkvqqVV96BvLOQEvHIzjTqnzE0HK8kYPG1yrWvk5SVgCEpuQ+2X8urDm /+UXO4Lwm9PMmOQFedodj7nWUD+LilmUiUgjimHzR2ixJBfzeiLYa7uj7tLzIAk4oGNhw/sU53C ChwCMns9wXLOPEfSRKOTmJh6URAZbFWqjypTURZP2tqtmfhrAODDDBvxXrD5voxHtzjiWvzO/ld ySbBEHpS X-Google-Smtp-Source: AGHT+IHNyZ6Gmhi8CkHwki8iCp5hZVMJCqmLrVUuVJwgJ65+43JewzpqCE+zMexCnQ7438KBklSDKg== X-Received: by 2002:a05:6402:510a:b0:5d0:d208:4cad with SMTP id 4fb4d7f45d1cf-5d41e16362amr4618611a12.2.1733850616337; Tue, 10 Dec 2024 09:10:16 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:15 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea Subject: [PATCH v4 05/24] ASoC: renesas: rz-ssi: Use only the proper amount of dividers Date: Tue, 10 Dec 2024 19:09:34 +0200 Message-Id: <20241210170953.2936724-6-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: 7HMH7BYAHJY67OGYMUMTUS6IZWU2QJ55 X-Message-ID-Hash: 7HMH7BYAHJY67OGYMUMTUS6IZWU2QJ55 X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:08 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 >= 0. While at it, change the ckdv type as u8, as the divider 128 was previously using the s8 sign bit. Signed-off-by: Claudiu Beznea --- Changes in v4: - changed the ckdv type from s8 to u8 and updated patch description to reflect it Changes in v3: - s/sh/renesas in patch title 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..178c915331e9 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] = { 1, 2, 4, 8, 16, 32, 64, 128, - 6, 12, 24, 48, 96, -1, -1, -1 }; + static u8 ckdv[] = { 1, 2, 4, 8, 16, 32, 64, 128, 6, 12, 24, 48, 96 }; unsigned int channel_bits = 32; /* System Word Length */ unsigned long bclk_rate = rate * channels * channel_bits; unsigned int div; From patchwork Tue Dec 10 17:09:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903389 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E15C9E7717D for ; Wed, 11 Dec 2024 11:29:46 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EDC58240C; Wed, 11 Dec 2024 12:29:34 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EDC58240C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916585; bh=hgummav4gWlxydCCaiYlSrENU1T64Eunf3Cfp6+7rSU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=vBRapJVOFEXeG+HPomPorNOwGUhKUKe34Nx0+oAWj+43HbDjhes0sQJP/8LsCvRpa j0O4ZH5DKa4Yhc3AXN9NsP/vB9po0vykbWzwqHdRKwHCKMxUWk8wYHH+9oWpV6ndOK mtE1s/MIbl4cXFyUT6hw+TlReI/94UzsthYj5UuQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 72190F806D5; Wed, 11 Dec 2024 12:27:32 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D6377F806D4; Wed, 11 Dec 2024 12:27:31 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EA827F805AA; Tue, 10 Dec 2024 18:11:20 +0100 (CET) Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 71CB6F80448 for ; Tue, 10 Dec 2024 18:11:19 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 71CB6F80448 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=J2x0AhRZ Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-5cec9609303so6813637a12.1 for ; Tue, 10 Dec 2024 09:11:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850619; x=1734455419; darn=alsa-project.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=eFuKmapnbE9+QOXBiNESOVZ7AOkqywZ/u7IM8EV36Uw=; b=J2x0AhRZBG7BKVZum1W/mMaul2Vilx6cKwDjIW7/DWNGeZlL8DPyUXh1JYYeMRzt08 YjF+qi5oERKIXSvRMyaXYb2Y8Rh+nq1yZ7qCsDARYm2jRRp4uHPJubpihM5xpJjEpT13 tcHGD0+udMW7h0YV/NhO2sjNNaE5uQfGAgplkg7OPV9qBpr+44boDbax7+R7vln5m0K5 XrcQREeFmA3yAeMrwMpO6S8CXMh1UmYzjb9F/jI3301qbYKdja1+YvX/oIiq5GFPuYmn 4MFsNAaGmuxDGyp9RqAUXlLmUvx+bKymA170zlrA0DNtnfF2EEo+9XBy5MDFwjXE5Ftc dQNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850619; x=1734455419; 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=eFuKmapnbE9+QOXBiNESOVZ7AOkqywZ/u7IM8EV36Uw=; b=Rc75IVUoTjq6Bh5HL5kRdsc8LMA6G/BkHBnUsIi9GzVqC+0rDsiANly3K2uATEgRPe 4QZbNDIfd1JQUHofWwCedWwDOXRd86c5ZUB/83RLa5oPzZlrGyptTGHCB7IWtQmdon4r QMcCe2OsGltmS1n6RFMrTvamAtq7K/Gu+gOyczPKiiFyohbi8hgBYeCQplvsCns6qlU7 xZN8mWxJCtTskZcUB9+h1Te67PPkNQdxuHtvPtaZrkZG/O524DP2+UyA/pldIZRDqhlT O4FMOA9S8J7+A0ylxUTNZxTiI4yRP2eIGH9JTN4a+PKlxmsZXTvvg0BMF16LFwIdYz60 JRoQ== X-Forwarded-Encrypted: i=1; AJvYcCXLwywJqVijEwZ3kP6YzGimzGH+Bf/mgYbk+ygaA32O4euL/2Ye+9bKNIX9KBSrFETBQEgPr/0ciR9R@alsa-project.org X-Gm-Message-State: AOJu0YxQGQI32YjezTWY2n6HKgwwixZprYYXJ4/oH8dLtEj80aT0VZH6 HRF3NKEk8bP00c29tC/fXO4nUkf1PJAIZwECCEm9qBuuSTMvDKbtNlhDAyX5+tc= X-Gm-Gg: ASbGnctlL0hJdiGXVS+ERWiTGI0QtmnXxzVvtaDKVliA/TYPM1h5zcOyHuSyD/7R63/ s5jE2Nn1QhIzBQdBJ3gHIta4dZur07Cu1uyqbtjTn2jcWXfZo6TSzNmE0EO48bpkY4oe3ks4jJp mD0gtaVARYmKrxjeLKaWUYKDRUkwsoqTTjGuo9hkLrFbKvck7C+7q/UGqkFtcpUiRkncy2kjph+ at2jn3zGK7XITczWwx0Hr1nZcuiWUJ0n+NlTxMzBND+Scyijn3EqIpuiPeAu1A9OjGQtf95i1ux u7NmaFIz X-Google-Smtp-Source: AGHT+IGIek6OPyyjZZjrXkuvdN81VR6DHl8mzdwNbzCCYx8cbaECzDZswIN2k+lpO7iWi6HMxuv6jA== X-Received: by 2002:a05:6402:360f:b0:5d3:bab1:513f with SMTP id 4fb4d7f45d1cf-5d3be6c4046mr19223495a12.18.1733850618930; Tue, 10 Dec 2024 09:10:18 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:18 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea Subject: [PATCH v4 06/24] ASoC: renesas: rz-ssi: Fix typo on SSI_RATES macro comment Date: Tue, 10 Dec 2024 19:09:35 +0200 Message-Id: <20241210170953.2936724-7-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: TOXT3ORKJT6O55IGDRBAJTWOJDYYD7QC X-Message-ID-Hash: TOXT3ORKJT6O55IGDRBAJTWOJDYYD7QC X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:08 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Claudiu Beznea The SSI_RATES macro covers 8KHz-48KHz audio frequencies. Update macro comment to reflect it. Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v4: - collected tags Changes in v3: - s/sh/renesas in patch title 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 178c915331e9..35929160a8a5 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) -#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 From patchwork Tue Dec 10 17:09:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903390 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 78261E7717D for ; Wed, 11 Dec 2024 11:30:06 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1511F2394; Wed, 11 Dec 2024 12:29:52 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1511F2394 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916602; bh=RalPxCPilUWbjYvZHpa4B7ebOphri7Uk5DSwxD2axvs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=CguggkTAIGh1LMOXVk6oxLEO7VQ+hXxLG0Z7Zp1ZH6winWEWTLz4+VdsDV5IghnVi vRoBp1k86+yNTcQs5H8QahoCSZbtaa4KI6j+40fB5bjm/8W0YAiRqyYFT3tZv/U/ZY 1GtqSDy2gTjsvzTpVpcrQ3YYNBS4zIrrAr0XC9n0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id AF07FF806F1; Wed, 11 Dec 2024 12:27:38 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 52655F806F1; Wed, 11 Dec 2024 12:27:38 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D6E9BF80533; Tue, 10 Dec 2024 18:11:24 +0100 (CET) Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 434D7F80448 for ; Tue, 10 Dec 2024 18:11:22 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 434D7F80448 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=ml4E1BkT Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-5cf6f367f97so8533285a12.0 for ; Tue, 10 Dec 2024 09:11:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850622; x=1734455422; darn=alsa-project.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=quo1xBiWZKYYPo7MUB0R0AMbPr7YypV5dW0W8isrnRE=; b=ml4E1BkT+us3SOIkpTGeCZYXWQcIIjjUK/w72afdfADgVi9f51ckGQxK+Ako6tJri3 vma4JBahS1nSSrwZ0ehrZER0CIaDLP5vqnEKsH96wUOeFsjK/04ahkS9Renc7vmmy/A9 kwXHIg/hWpqzLC/NpYurKpLvXpcvJx/KuwVEBFI685Jx7ifokRVo726S+lT/Ey2cVvd4 YV8sRQ96GqPBpMn1rnpXM5CX0ACyDhIotjkXDqKFU8JiAKWzJH1oKS6w7p5t9cTJZNju i9uzpXyUWGv4Roz1GnTmaDU9PW7HzsP6kmEk5k6HNQPEZ0oMUTss+wQ4fI0v77on94Qi wgHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850622; x=1734455422; 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=quo1xBiWZKYYPo7MUB0R0AMbPr7YypV5dW0W8isrnRE=; b=Mm2m+Ghvrq/As75qFXv+cu+2i3N8Dwe1vlzPRrFpNUJMBRTd6ebfm+v8FW4oochu1G FCx7VZQ1aEPbJYYvnS9QfZDk8+71ueYX3oxsRPdPvoa11HfwDpVOc/Aqx3gKodxsowB3 cem0SkIQNHLN8PCHPuavIxKyDFwLQokXk68ARdZO6Xrxf6Jieb36mMGN/Yx5hqVPOjHf izXlOJPUkqjhacrpJxiHriMqCWTx/9P7JPet71bmAUD2JNx4yne3h4hPPk0ew1dLEIpe DMGpvuO6Ec+OlF5jm2RwnMLd/HBQb8IOxPjaf774zQLIbv09tARX2HVnrvbysykNOrB9 /y1g== X-Forwarded-Encrypted: i=1; AJvYcCUCV5mwjnZ+fkDMzxQQ5F5ouV13Te8xLyDzU4hSHt0y5QHV++ZyL+YiqPP3JbRHaLygSvo0WR3Iihi9@alsa-project.org X-Gm-Message-State: AOJu0YxX7dHQC2O3nOmkPTl4m9k4eVNuEB5kMS/qBHzZDr8MrkWFp5KK l70RZ3Cq2aWH/R6dsGLV7q35lXHjPJ2Qy0pngLDHDSkMUvkgrkknFdhltsfs3NA= X-Gm-Gg: ASbGnctOfXlx/IdiDf/0bIJdLLfd15X/TMQ+gx5pebcRU8WxYrzdvw29sAt3AcFi5bo 6zr1bAoamAgoE4x4oLRVty9oZ0g0SX8fL1bcdmR+ad1gPVATu/ouiKqq3IYs7MxRajOYPcRokx5 eBbdMe9mICLIh6TEFkB3w193owmURU/F+LYuYLMY8xcM18cimz/1BrICFKbeQQuvmeWih8A+vpK E4MvdgPylf5F/V29T3oMlWZpyV0J6QsZuBZSvUF5t+7TqbFCQjjwJ/f/qO0GAgnTT6lYyySwOG/ 5x4PdJt4 X-Google-Smtp-Source: AGHT+IEVq5G+gawrHiPzQYVclV2UevSYSlAdxNYl7RmLq5d6hxx+eXzeCUIVNOyKC/W4oWQ1f5HO/Q== X-Received: by 2002:a05:6402:1cc1:b0:5d0:ee52:353e with SMTP id 4fb4d7f45d1cf-5d41862ed58mr5867285a12.29.1733850622148; Tue, 10 Dec 2024 09:10:22 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:20 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea Subject: [PATCH v4 07/24] ASoC: renesas: rz-ssi: Remove pdev member of struct rz_ssi_priv Date: Tue, 10 Dec 2024 19:09:36 +0200 Message-Id: <20241210170953.2936724-8-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: B6U4JQETKHKZ5ZSQ44WWTX27FJK4AMNO X-Message-ID-Hash: B6U4JQETKHKZ5ZSQ44WWTX27FJK4AMNO X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:09 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Claudiu Beznea Remove the pdev member of struct rz_ssi_priv as it is not used. Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v4: - collected tags Changes in v3: - s/sh/renesas in patch title 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 35929160a8a5..b24c323ee05f 100644 --- a/sound/soc/renesas/rz-ssi.c +++ b/sound/soc/renesas/rz-ssi.c @@ -99,7 +99,6 @@ struct rz_ssi_stream { 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; - ssi->pdev = pdev; ssi->dev = &pdev->dev; ssi->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(ssi->base)) From patchwork Tue Dec 10 17:09:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903391 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E76BEE7717D for ; Wed, 11 Dec 2024 11:30:21 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 40B8A240C; Wed, 11 Dec 2024 12:30:10 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 40B8A240C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916620; bh=TdUpesvK2bqZRA5lCnWS4V50ZEqpa6uiukIdp73czu8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=SvjFxrl25+ah5hUkNCaJ9AzoHt5WQQk6vsXo1KSvhamTc/NhlWpKIvvlQFc7HqDFC v6DvfDA29LIH9rVX4Mv8qGJ0Ub/pR1pj+f2HRQrlMiEXnhhqWo/8Z1hc2YMc+44fTE xAkpgxFNMbupMAE2+9Nqg0bSMHh0G7UJOWUBn3hM= Received: by alsa1.perex.cz (Postfix, from userid 50401) id B3371F8072D; Wed, 11 Dec 2024 12:27:42 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 64CEEF80735; Wed, 11 Dec 2024 12:27:42 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 13D94F80533; Tue, 10 Dec 2024 18:11:26 +0100 (CET) Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 81F47F800E9 for ; Tue, 10 Dec 2024 18:11:24 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 81F47F800E9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=qxeegh/h Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-5d3cf094768so6586735a12.0 for ; Tue, 10 Dec 2024 09:11:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850624; x=1734455424; darn=alsa-project.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=+fZD7MbYY4k4sOMCUWO81EIjBCeOEixHEXtaO9JyHpg=; b=qxeegh/hHMQZn74kew6vV7G3EBCEqfAbN8recdOQLB8W+9IdW0Fk0TspaDLENMY467 FLcfp5PyArc8DKeeTA9dJ01s6oYC1mN7Pq2XhA/VYD3CrjwtkMbYBwBzgYOM81dqVhRo s3mTqIEwEiTFQx+KyHsdeyHsMK2svvtl62ykR04CQZx8otV/gz+kOyScof/w3MtGHm9J fEqcH7CuMjSigb42RQq7WheRZMTSHyaOAJH1sm961Hd5muTYPHaeUTBXFUA1WQHNElOM ng+1hyKbq6LHiaXSFOasOlqMcNyEItAQ15JScftvoMYIkUbfJUTUEAbYrNEI7USMLMTP At8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850624; x=1734455424; 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=+fZD7MbYY4k4sOMCUWO81EIjBCeOEixHEXtaO9JyHpg=; b=mfO1LgqKFufYk2TlRLzmB5jPJc60okwKD/Q8UZ0R+yrvvJBnYaQJex0v7z+iSDBCiI rRJNSv/aJadsFulpeuBmRHKbmmTMrcZksVogM9+TbJWs0/o+0RxIvgp6qM4l6FX2U5U3 pRbdWgOrxDwxdBbUpfKnohtRSvrVwqwvR6gT/l6MUCrSvOzl6fnBSnuGnpSHBi65CUom gdSaXuL1HqeG3+KRX/NRkyrrxAoqcrxsa99D3ZLom5R+TvPPPbgexKNRs7KDGxX2I/At MF5uAF4yiYQYUIoT9aDhx7QSM/fmFFy95gjf4XgWl3ItfucXahTdFSbQKmyKM43CDhz8 2LBw== X-Forwarded-Encrypted: i=1; AJvYcCW+R+DcbzqLCxPdJKly9qWKIVn5AuzaLvZPfVGlWHvmw7E+Wk5+gU28KTTonE9WK8gEquP9DUoWfbVL@alsa-project.org X-Gm-Message-State: AOJu0YyoRr8xcyWN2zhzbKysK+aWpJJC6R4NzSorxGi1dXdkb/xhw4Nn 3cTWBloMERuo9aIDMgCAbEPB3nr9vD3yIMtlmwsfKVwURKIQi7dFvuDtG++Sdfg= X-Gm-Gg: ASbGncs8E7oBlT3cho3ROseXIUkgeVp5sVXAgzBUvmYOts/W5XmhhIwEa+Eyl04lO1U vvJCKyWhgk5Hsk3tFTnyaURV40CTrIb6TEyiJ+2ZfxrJSQyhdnpGOwmgox6ddDk1+aO5dwI4F9F q/gTIFz5QGynE6+ilM4ocEsmAHkVcGSTmsIj0oF9UIhe3+pBUnqMo+FrNTIMVNKh6qWu/kr1tfs bCTwzmFuwX+OFtjabR8ISNmjZaJ9E92iAwjGBfjhCddvN2ap06da/ShANNRGEdp33lpImPojTpe YC4s7Hvv X-Google-Smtp-Source: AGHT+IGPNWGY9jEOkszzr7a+HCzsQHx/+czOpLjoEtr5Y51ztb7vYMYNc711VxTTfs7vb+1yWs3GDg== X-Received: by 2002:a05:6402:26ce:b0:5d3:c4a8:d259 with SMTP id 4fb4d7f45d1cf-5d41856a452mr6845842a12.19.1733850623996; Tue, 10 Dec 2024 09:10:23 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:23 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea Subject: [PATCH v4 08/24] ASoC: renesas: rz-ssi: Remove the rz_ssi_get_dai() function Date: Tue, 10 Dec 2024 19:09:37 +0200 Message-Id: <20241210170953.2936724-9-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: S7JEYG73S6R3G4L5WSXKPUM3NRFHCK6C X-Message-ID-Hash: S7JEYG73S6R3G4L5WSXKPUM3NRFHCK6C X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:09 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Claudiu Beznea Remove the rz_ssi_get_dai() function and use directly the snd_soc_rtd_to_cpu() where needed or the struct device pointer embedded in the struct rz_ssi_priv objects. Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v4: - collected tags - updated patch description Changes in v3: - s/sh/renesas in patch title 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 b24c323ee05f..e2e172d8e9db 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 *priv, uint reg, writel(val, (priv->base + reg)); } -static inline struct snd_soc_dai * -rz_ssi_get_dai(struct snd_pcm_substream *substream) -{ - struct snd_soc_pcm_runtime *rtd = 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 = rz_ssi_get_dai(strm->substream); + struct device *dev = ssi->dev; rz_ssi_set_substream(strm, NULL); if (strm->oerr_num > 0) - dev_info(dai->dev, "overrun = %d\n", strm->oerr_num); + dev_info(dev, "overrun = %d\n", strm->oerr_num); if (strm->uerr_num > 0) - dev_info(dai->dev, "underrun = %d\n", strm->uerr_num); + dev_info(dev, "underrun = %d\n", strm->uerr_num); } 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 *component, static snd_pcm_uframes_t rz_ssi_pcm_pointer(struct snd_soc_component *component, struct snd_pcm_substream *substream) { - struct snd_soc_dai *dai = rz_ssi_get_dai(substream); + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); + struct snd_soc_dai *dai = snd_soc_rtd_to_cpu(rtd, 0); struct rz_ssi_priv *ssi = snd_soc_dai_get_drvdata(dai); struct rz_ssi_stream *strm = rz_ssi_stream_get(ssi, substream); From patchwork Tue Dec 10 17:09:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903392 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6CF6DE7717D for ; Wed, 11 Dec 2024 11:30:45 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 6BD0427A6; Wed, 11 Dec 2024 12:30:27 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6BD0427A6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916637; bh=ujffKmfqqDwP9nSS/Rh8QsJL6MbeKN+Qqc+lwPTDO6o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=kuhz2Xd+xztwfojC0dhix4ydBme5bwVFGA4shZEi2JrJLDeJQWsuhvGBOR4iDTTrC 2Tb828a6dJ/+UJgFE+0iHb1jt+kb3P7McL3lGlQrd+Y7TqwaixId6Jkne2Vl45W6W8 zazDLtCKijaP8VtK7UksN7DZg+94EgvzkNGRtIPc= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 36926F8078F; Wed, 11 Dec 2024 12:27:44 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id AD9BEF80792; Wed, 11 Dec 2024 12:27:44 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A446CF80482; Tue, 10 Dec 2024 18:11:27 +0100 (CET) Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3D749F800E9 for ; Tue, 10 Dec 2024 18:11:26 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3D749F800E9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=CBSQ41s6 Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-5d3e6274015so5213988a12.0 for ; Tue, 10 Dec 2024 09:11:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850626; x=1734455426; darn=alsa-project.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=Nt6/CuLO4TNfbHvjGkE7QWPE5biRbMT4tQY2cpGkikU=; b=CBSQ41s6sWDj5JD/qiExx6QsMh8qV6W+7ODhdvJ2hUbJaMGTO80wrc+elKtTU+18OQ buJxvJxykLb4n2wuRGMDLQzQmPPxs9pQ+EDCJTpT2KOpM7lt5pzsHYOg+7n7qgoltyJL sEEwoyb8HSxGidH4mQuo3wSr38dRnIiVWxozepmowCmxFsP0SK8rSlrAhjz4ndViaJe6 sn3hrcktcY7ynOo7dlR360xEoroRVcKoTok65YAWGwOJIf+Jfj3LHsYL777/ltKUuZau ZEKKdFeIt1GaSYbontRsgUqy191PjMbD/Mg7L/dcN0jjCWKd8BeSb7Qq96G1horJvRbl LmFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850626; x=1734455426; 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=Nt6/CuLO4TNfbHvjGkE7QWPE5biRbMT4tQY2cpGkikU=; b=lZsFB3G1s0N+NhoK1GNJrZ9o0BfaiKsdH0uxWE7AtrfH6TrTG+m7O7jUyE+vv4rWtH dO1SXYQaX16qfDDd3yGbV50u4IciuJRcSY0SxdmQGnUatkaW0guCZsWFxYX+Nne+DqAp FLfIO5g7uiq704RLv0/PIi71lBKMUMGwzZMCx25au/I8N/VvhZKeD4HnO5SS31KoPMh/ eU0lBhZ0WZOo75+tDK70o8+EKhXgCrAxW3bEwhQyOoo1Wthye5j4F7ihKd0TARuXo/mz N8/b24LEBn34LJzAjpk16FGvXcntAbnZmVdcc4af4UkvjjypAE2QEi4Rf/KTE8XmohwO wMrw== X-Forwarded-Encrypted: i=1; AJvYcCW904uY0SmTLB7q8r1Yb/kCniLJYK1VTZBa4YoHK8X8SHMo2z4LSgCu0vGkKaQhZW+Z1KnLz4p5g92T@alsa-project.org X-Gm-Message-State: AOJu0Yyi+WHDGJXSHrtzdqr6cXGhX3u3M5cbh6d1oEDdSAM2ZCDPmwIf 9ic2VsUeDt/Acd7dTtlxz++pllHni9fFpUhXasSldVRoJA2fMa/OlAKweO3oi8E= X-Gm-Gg: ASbGnctnqJblv1OZRf/fs2JiqktCKxani7ukou7MhtEw7/7roKaXa5aEJxG0wPHedsZ 8yJA/gFjnwspetHeexLdFBOqZbaC+Qx/f7pUdsEVYuvGSbiHBnlqr3tfffY3AbpPJrbayi4qxFx uf/Mj1tp8ffdVLyb4R1K0+8FNpTTdxK89SvGVW4q1eUEyBAoGaC+XgihnQajPTdM1KieED2CobC F3NyXCo0PQ26HxRregZTCRnbTf1Hw9XSJifp8xJCmrOry4srcFIEQM1fNrxGudEiKNXjiBg71ND xzsnNBj6 X-Google-Smtp-Source: AGHT+IFnf0CQr0jkK6OJUnuRd7yMlMyY8yimkX0n0o6RyaHOTAp9AyL9lRgA8mS0FG7jjIMo1TvGpQ== X-Received: by 2002:a05:6402:2813:b0:5d3:d4cf:feb5 with SMTP id 4fb4d7f45d1cf-5d3d4d00325mr14392707a12.29.1733850625802; Tue, 10 Dec 2024 09:10:25 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:25 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea Subject: [PATCH v4 09/24] ASoC: renesas: rz-ssi: Remove the first argument of rz_ssi_stream_is_play() Date: Tue, 10 Dec 2024 19:09:38 +0200 Message-Id: <20241210170953.2936724-10-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: 3CL5UYT2U22QSWQXIM27NELQS4AG4YZX X-Message-ID-Hash: 3CL5UYT2U22QSWQXIM27NELQS4AG4YZX X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:09 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 v4: - collected tags Changes in v3: - s/sh/renesas in patch title 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 e2e172d8e9db..1a98f6b3e6a7 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 *priv, uint reg, writel(val, (priv->base + reg)); } -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 *substream) { return substream->stream == SNDRV_PCM_STREAM_PLAYBACK; } @@ -337,7 +336,7 @@ static void rz_ssi_set_idle(struct rz_ssi_priv *ssi) static int rz_ssi_start(struct rz_ssi_priv *ssi, struct rz_ssi_stream *strm) { - bool is_play = rz_ssi_stream_is_play(ssi, strm->substream); + bool is_play = rz_ssi_stream_is_play(strm->substream); bool is_full_duplex; u32 ssicr, ssifcr; @@ -674,7 +673,7 @@ static int rz_ssi_dma_transfer(struct rz_ssi_priv *ssi, */ return 0; - dir = rz_ssi_stream_is_play(ssi, substream) ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM; + dir = rz_ssi_stream_is_play(substream) ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM; /* Always transfer 1 period */ amount = 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; - is_playback = rz_ssi_stream_is_play(ssi, substream); + is_playback = rz_ssi_stream_is_play(substream); ret = rz_ssi_dma_slave_config(ssi, ssi->playback.dma_ch, is_playback); /* Fallback to pio */ From patchwork Tue Dec 10 17:09:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903393 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AC732E7717D for ; Wed, 11 Dec 2024 11:30:56 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C991722AD; Wed, 11 Dec 2024 12:30:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C991722AD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916654; bh=cnajpc59mzRLWDYn+TlQEWJ18Tzqm1CRjbROQ6JPtZs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=KC9z6RbR/rnA0IeKPp8ZsjsoZNvzp8XEpurvZbMpCaQLqvpWREJ3eaFcDXLVBPAxf TXDFduLbDXL7d3hDzW5b0rB6lLsOMtycXJZYYltowc84wq6HjL8gTtCtR6QW9fhvYl QiKo0po/Sq/9wazu2O7yciNvsuHb4SSZ1EDa7JsA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 271D2F80799; Wed, 11 Dec 2024 12:27:47 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 4FF48F8079B; Wed, 11 Dec 2024 12:27:47 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9DFF7F80482; Tue, 10 Dec 2024 18:11:30 +0100 (CET) Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 071C0F800E9 for ; Tue, 10 Dec 2024 18:11:28 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 071C0F800E9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=QF1uP6lI Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-5d3d479b1e6so4966020a12.2 for ; Tue, 10 Dec 2024 09:11:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850628; x=1734455428; darn=alsa-project.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=3F8PzVf1JVHBMdfZjuuSPBsoTNCHuDc7mT2swoePkeA=; b=QF1uP6lI6gzIzeJljQ9BISgUYVl93o3ji+nF7JxfEqvISZulwVVcsIUK/soJf+9d4D W6d3lLPPIwgtxCZphMof3x7rp+YGEC6Ek1++IGEoFwe0cmLfFxkct16BPbhuTO3nzk/M 7sphaznUJtZFj7hy7/yCHQcFgtqV9qR6PS17bgaKZwb9na3iVcUvDmxYHfnVi75V5kts O0+OEwfk2JI5JfaRwLr/3YTdPxTpNVEnI+3SOBYaB5hui9yOa3HgDEP4spk9QM43oVIn QLj9pYb0c54K+dCdQzNow3ME3Qhh4XoWwa5DetbvGw836c1OgYDLzVogDQVYub6SxuOR 8d4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850628; x=1734455428; 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=3F8PzVf1JVHBMdfZjuuSPBsoTNCHuDc7mT2swoePkeA=; b=tT/Px40WVzt1qAJqe8jYGEdYnKjchV0RUhyev8Atd30gRN8P6GpnX0PY2TYxT1sZGM SYQTU5LzXF2nOV+g/p/7PKB4xXi9tAvEwX/Yivndk0AuzgYxoL0tdgsyEKnaPkK3v7/h tbY+vxz4l/jKH/9nfOgdJw7KOHArD1o+jo8yIpawXTaaOYWT0YbksxQcbxleoS+MUpJR tUYb6L1iCl1pF3P75Vi1THggNfe3h5kAn4YQIOdypjMw9Su7k1lnhbTsS+TGEJFz/STK eK/kEWKgDScHyTsYAWjnZYz4qDRbVLa3/i+wWZR7zn5w/QGBJzdNNGXhe4tWCcGjbGYU DQsQ== X-Forwarded-Encrypted: i=1; AJvYcCVeu+wA4v1Kb6NLMH2OQgGAnt3jHanRa5ZC6T3TZ4EfAr8ZdghMwMEUoh7ezRixZHdso1jNnkNSLbFg@alsa-project.org X-Gm-Message-State: AOJu0Ywj96RtsjcTfq63o1FUbXUR8Gnnk0gs4nbJ3r771wDsbnE5fm+l 63JsSrF3MjT2bvtaiSjCqNQpwuVkfu/gX0iFI7VHxeoTdiD2HiOrQwwPBBGiLUs= X-Gm-Gg: ASbGnctoX92FKwRQ+OyqQfiLOBPOWWwFWoXeaIYfKFahmde8phvCauhAbVGE6Wp5790 EcZzZb4nCxZGhPtsOvAvtExR831F5fqiLcELQBV4Rwux1/Q3MQT5vMl0fNVWXBcXivcq+/icmty E81EkBFU03oJlDJwFsIoec2i9mLn31DE+aE20Mj5wP3TOZekg7NLC76Xd+hACq4iRvdvlGqrJU4 CiXlH6sUqSRBVtaEOaA4i+LQD7e28KTU/7xkQmDCv9uwYc40rFyqUEb6Dt1aOp6TCL/FGCcOfdO PTEbw84l X-Google-Smtp-Source: AGHT+IF6mILseNMfJmIB9ZOyimXPXPfxpdkmjbt3WuqKLQbtoG5tgiV9L7CF+aAEAjMF8dRgPTsU9A== X-Received: by 2002:a05:6402:42c6:b0:5d0:ea4f:972f with SMTP id 4fb4d7f45d1cf-5d4185060b8mr11381588a12.8.1733850628448; Tue, 10 Dec 2024 09:10:28 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:27 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea Subject: [PATCH v4 10/24] ASoC: renesas: rz-ssi: Use readl_poll_timeout_atomic() Date: Tue, 10 Dec 2024 19:09:39 +0200 Message-Id: <20241210170953.2936724-11-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: SBMSDJPD4SWMPB2BMNCVHF7T6VU66XXP X-Message-ID-Hash: SBMSDJPD4SWMPB2BMNCVHF7T6VU66XXP X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:10 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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. Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v4: - collected tags Changes in v3: - s/sh/renesas in patch title 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 1a98f6b3e6a7..03d409d3070c 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, unsigned int rate, static void rz_ssi_set_idle(struct rz_ssi_priv *ssi) { - int timeout; + u32 tmp; + int ret; /* 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); /* Wait for idle */ - timeout = 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 = readl_poll_timeout_atomic(ssi->base + SSISR, tmp, (tmp & SSISR_IIRQ), 1, 100); + if (ret) + dev_warn_ratelimited(ssi->dev, "timeout waiting for SSI idle\n"); /* Hold FIFOs in reset */ rz_ssi_reg_mask_setl(ssi, SSIFCR, 0, SSIFCR_FIFO_RST); From patchwork Tue Dec 10 17:09:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903394 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EBC8DE7717D for ; Wed, 11 Dec 2024 11:31:12 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 667EB22AD; Wed, 11 Dec 2024 12:31:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 667EB22AD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916671; bh=k3Z7SepXf6kK0GBAAx+gh10sWRGIrQ/wXZMtZNGeO8k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=WgnKlxBblJZQzVgzfGeD/B8V1fUxxxp1eEWJx9jUxf772zrt2JJQNTHybT81H9AXD ClU1WeJf+W7vkLCEE3kpq9H2VxSq4o18gen9zpArYLJh0PrADFQMmyNIKJST3q2Dtn y6HO2xObdO8GT6F6o7i3TVtwjNsxGCApTVRHEdj4= Received: by alsa1.perex.cz (Postfix, from userid 50401) id E7522F8083F; Wed, 11 Dec 2024 12:27:50 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 117A5F80845; Wed, 11 Dec 2024 12:27:50 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B9E3EF80482; Tue, 10 Dec 2024 18:11:32 +0100 (CET) Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1625FF8016C for ; Tue, 10 Dec 2024 18:11:30 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1625FF8016C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=EFEB7Ms8 Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-5cedf5fe237so9122025a12.3 for ; Tue, 10 Dec 2024 09:11:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850630; x=1734455430; darn=alsa-project.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=hkl99V7JHk+PHmXk7Z/OM1i1KIFRiXSecR3DTIS4ac0=; b=EFEB7Ms8XqgkegMuQ3VwxHAWH0Bnhqd1429UozpVoT6VMUD8YmFCayQ3OInBewsKJk NAzLGa0jFZvy1ECgikURIGN+SgQEyBaEHiehuK34yJfbF47aO8XeSrqUSIAVIkM/zgXP moGOTG3Aw6JtS09fJdbELzwK56GOHrEvdd3FVMZER1806jJXKOueLtoQAj206lb+mcQ0 C3HwjMl7gIIfayD8KjJxDw5r8EjzZWs3TRLOBDJssp04RdiXnSCVmH4rj1MQdMaMTcg3 4ScEnr6aUzyBNajQSucpsJafaZ5Xnj6BVyV767WwxXMYY6yGKsRjbICTas7x0KUOcnyv T2wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850630; x=1734455430; 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=hkl99V7JHk+PHmXk7Z/OM1i1KIFRiXSecR3DTIS4ac0=; b=Uihu2FPKJTeMzYZNS9o81o0UTMN6u7ghIaAulQz4mSG8lxb+wUFi32Y52XdT8n6RIE mZK70571y7R4wCWG38uXhCC+tWTlnVUSUzIdYOYHGSb3rTm+R3uF8JiBf4L3qCmsGMNE W+jApu6D7lNrIiurlMH55ACEhKp5pCL0Gvde9SkzADjzGm90l8feCB1S+sBj6oLdzJog 7kRK7/lvUzT/5wWwUs6qfnkiUAMDESb3ueIQWgQjQEylK/T6C3cllapx8Mdf9pAdtRgo 8QlpxvSGppoUprXNqVfzcrGA4fsPjDRSkv98x8a/p1jVE46kOOKZJKIPEBNBZWkMsSgy NDUA== X-Forwarded-Encrypted: i=1; AJvYcCW/ZAEKoSwTEYDKwb60ReMdc/+rKJYqoMpTPjLQU4FXh8OvVDxL1QsDc+M75LEQGr2MDmWovAWcuIZ6@alsa-project.org X-Gm-Message-State: AOJu0Yx/cYoxV841N0XZbDBorUBaHb9FjcamWmPjAm4knPCChCaaEwcU /8J1swYO9GwdQN5NZuEetqbPIvuNlYyUFGxPiG26OGuuz36q8PxmxtoGwbLg49c= X-Gm-Gg: ASbGnct2l05zVAio8nejEwPWM+ou5u5OB5Y14vh/hF78IxXofi3AIWHMCFEOH9by1M3 BUoNN4PsEAlRT/XSyMU7WwSpEkcp6wrRZzrsTT5pnW0RMJvwTzJhaNYGC4UNCSIpiDZcL/Hbw9n qUi/vlAzzadCDa1uUKTqUQzZSt/0WXmTsvyvZRV3zPP4jp+XQD5rCz9XAapcvDXLISmrXrbSYDt vtJqYVWG+PBl6sMrZCCHwBakyV9QqzBAlgydYjA2Y9HPRY0DxDR3Zw1IFHYe+lTeeIVa/oc7dpQ fHv9bPRA X-Google-Smtp-Source: AGHT+IGiyQL90tdiVNR8CEbdQwt+84VQwU+X2Ih+j4zZRGxrQOsXOlnJklGXo6a6srhL1lfK868Leg== X-Received: by 2002:a05:6402:35c6:b0:5d0:e696:1bfc with SMTP id 4fb4d7f45d1cf-5d41856a3e0mr6960258a12.15.1733850630300; Tue, 10 Dec 2024 09:10:30 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:29 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea Subject: [PATCH v4 11/24] ASoC: renesas: rz-ssi: Use temporary variable for struct device Date: Tue, 10 Dec 2024 19:09:40 +0200 Message-Id: <20241210170953.2936724-12-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: IAO5S7QBC3M7BCHRGRAJ74EPCEWKRNZ2 X-Message-ID-Hash: IAO5S7QBC3M7BCHRGRAJ74EPCEWKRNZ2 X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:10 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Claudiu Beznea Use a temporary variable for the struct device pointers to avoid dereferencing. Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v4: - collected tags Changes in v3: - s/sh/renesas in patch title 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 03d409d3070c..74632e2482f8 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 = { static int rz_ssi_probe(struct platform_device *pdev) { + struct device *dev = &pdev->dev; struct rz_ssi_priv *ssi; struct clk *audio_clk; struct resource *res; int ret; - ssi = devm_kzalloc(&pdev->dev, sizeof(*ssi), GFP_KERNEL); + ssi = devm_kzalloc(dev, sizeof(*ssi), GFP_KERNEL); if (!ssi) return -ENOMEM; - ssi->dev = &pdev->dev; + ssi->dev = dev; ssi->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(ssi->base)) return PTR_ERR(ssi->base); ssi->phys = res->start; - ssi->clk = devm_clk_get(&pdev->dev, "ssi"); + ssi->clk = devm_clk_get(dev, "ssi"); if (IS_ERR(ssi->clk)) return PTR_ERR(ssi->clk); - ssi->sfr_clk = devm_clk_get(&pdev->dev, "ssi_sfr"); + ssi->sfr_clk = devm_clk_get(dev, "ssi_sfr"); if (IS_ERR(ssi->sfr_clk)) return PTR_ERR(ssi->sfr_clk); - audio_clk = devm_clk_get(&pdev->dev, "audio_clk1"); + audio_clk = devm_clk_get(dev, "audio_clk1"); if (IS_ERR(audio_clk)) return dev_err_probe(&pdev->dev, PTR_ERR(audio_clk), "no audio clk1"); ssi->audio_clk_1 = clk_get_rate(audio_clk); - audio_clk = devm_clk_get(&pdev->dev, "audio_clk2"); + audio_clk = 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 *pdev) ssi->audio_mck = ssi->audio_clk_1 ? ssi->audio_clk_1 : ssi->audio_clk_2; /* Detect DMA support */ - ret = rz_ssi_dma_request(ssi, &pdev->dev); + ret = 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 = rz_ssi_pio_send; ssi->capture.transfer = rz_ssi_pio_recv; } else { - dev_info(&pdev->dev, "DMA enabled"); + dev_info(dev, "DMA enabled"); ssi->playback.transfer = rz_ssi_dma_transfer; ssi->capture.transfer = rz_ssi_dma_transfer; } @@ -1078,7 +1079,7 @@ static int rz_ssi_probe(struct platform_device *pdev) ssi->capture.priv = ssi; spin_lock_init(&ssi->lock); - dev_set_drvdata(&pdev->dev, ssi); + dev_set_drvdata(dev, ssi); /* Error Interrupt */ ssi->irq_int = platform_get_irq_byname(pdev, "int_req"); @@ -1087,12 +1088,11 @@ static int rz_ssi_probe(struct platform_device *pdev) return ssi->irq_int; } - ret = devm_request_irq(&pdev->dev, ssi->irq_int, &rz_ssi_interrupt, - 0, dev_name(&pdev->dev), ssi); + ret = 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"); } if (!rz_ssi_is_dma_enabled(ssi)) { @@ -1104,11 +1104,11 @@ static int rz_ssi_probe(struct platform_device *pdev) if (ssi->irq_rt < 0) return ssi->irq_rt; - ret = devm_request_irq(&pdev->dev, ssi->irq_rt, + ret = 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 *pdev) if (ssi->irq_rx < 0) return ssi->irq_rx; - ret = devm_request_irq(&pdev->dev, ssi->irq_tx, + ret = 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"); - ret = devm_request_irq(&pdev->dev, ssi->irq_rx, + ret = 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"); } } - ssi->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL); + ssi->rstc = devm_reset_control_get_exclusive(dev, NULL); if (IS_ERR(ssi->rstc)) { ret = PTR_ERR(ssi->rstc); goto err_reset; } reset_control_deassert(ssi->rstc); - pm_runtime_enable(&pdev->dev); - ret = pm_runtime_resume_and_get(&pdev->dev); + pm_runtime_enable(dev); + ret = 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; } - ret = devm_snd_soc_register_component(&pdev->dev, &rz_ssi_soc_component, + ret = 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; } return 0; 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); From patchwork Tue Dec 10 17:09:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903395 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 43FF7E7717D for ; Wed, 11 Dec 2024 11:31:28 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A7D042BD8; Wed, 11 Dec 2024 12:31:16 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A7D042BD8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916686; bh=nYG4Bh/KOUygEwsE3gKVUjg9VDgkI5hhLIDAicMnjio=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=W+4iVkLcy1nsWLYn9JD6UuugGNpnQsos3mz4QQzI8k1OfUlWz5vn5/dfRN0/uDgv+ MDR9gv/JrJZsmnFUEAw6Bvq8b87ud8wwtQvEBe7IoPLbSHGj6jG0qBE2vMuSTBxgUr sLTxHhGikyxfq0UcOfAb9Oulj11f9CY39AVyXxA4= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 033E4F80C07; Wed, 11 Dec 2024 12:27:53 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 332FFF808F5; Wed, 11 Dec 2024 12:27:53 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B0875F805AA; Tue, 10 Dec 2024 18:11:34 +0100 (CET) Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4B166F80482 for ; Tue, 10 Dec 2024 18:11:33 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4B166F80482 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=FUhDczOU Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-5d122cf8e52so9171032a12.1 for ; Tue, 10 Dec 2024 09:11:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850633; x=1734455433; darn=alsa-project.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=A+Q7Wyi2VpUxYoA4m3KALmoe6y3o5M1OmNQXa4v/tj4=; b=FUhDczOUM0KtUyuKbBUbS0CgB16h0/MeDPdHek6wrUQTlBkfr6pkpt8HUpzwU7GbCE wvph/4owPVpNHK4hCk8ltmCIfL58G8dcTpwA102RUB3xTTz58HO8hHQ6fMAJx49vqEuD 5x270EHJKxbORIK8y9qoHxfQ1dyAM6PqV2kb7UmXdEAlUoo3byOWnuKVI+fbiyROpWm8 Xdu6hSlPEEDR0v3CAcIVEJjxNqk3ntOPIvd5ZTe2VTNMEvFneYSunYwkRehkylqaxFuP TUJ6N0YD301rS0zB+2IhyoRM5DUAcDSouZbZ2eVr+zUUyFZWbqy+ufZBGcbxSgOK0LFa Rlxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850633; x=1734455433; 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=A+Q7Wyi2VpUxYoA4m3KALmoe6y3o5M1OmNQXa4v/tj4=; b=LkSinV4ZtM+q/CxnDMgZOKIfvG2s7pURuG3zcUfo8LS2eyOe2lJxubt+PtiFcGw9CZ Z3ffXZkjjWGQEM9pFQtecbHBwqSRajC3KEtzAKT67SCi8EyS0SICtofwiy31kOwFIQjs PZLUO7jpYV9AvtE0fZ9HWav+Vxn8b+7BpnsgtVnnAUA7wtjiod8SEEjkP7xRKk8bex/P hsR63x9xjSxKXpE76CxZD9tmMrCyPXxcT6Tp0TQQ5m7s+bdUZ2AnsaCi6mzTA8tiSliu IP5APz8swKX1w9unMDpLwi93mr1fobSOQn/c78Qsc7trAwgJx8/EO7KtoQT0+ulNpI2l H1tg== X-Forwarded-Encrypted: i=1; AJvYcCU6ARbSTbSUPtVKDey0zF74Kt7NUo5M5B3QSj8IJl5DefXjDJHBS0BknQm5+aoVZwnhmrqjxlK0G7UA@alsa-project.org X-Gm-Message-State: AOJu0YwS4ShHOhnwV8AZWSxxrIr+Qd11RhqvV3s2/mfj6QFdw0MWluug XNiGVUbn4U+mOg+iik3oASgCLWrp55bBZX5qpmowfK29fKl7Lmvpf+FzLylLVLA= X-Gm-Gg: ASbGncvZaFTrEs0Ze8udfLHlsfK3g5CznsswpIEL4hza2TY+ZInzFoPHcTFPnssM8fo yjZ0qI8oaHZabM0BFJ+CXpoLAyEt973En5rTL0lJH4bF61RHGPfixjGYAv45XsV4Im5rERfk+s+ 2iBAXqRg8a0YMQzHvjw9kPtAZDBRuCjBTDpgupWFDdVrgz4fMu0COOSeE8I/gIG1u/J3uO8SsmP J4bnA6txZDWbE7focgj+1W6sdq3/OLVAKG4E6T0w4N7X++XcQrk4bIYHIjP+d3Kn3GeLmG9Z3I8 ZFC0lHJw X-Google-Smtp-Source: AGHT+IEBCVJ5ksFpp4FwClVaCrJfMHHPabOYnva4BY/zYpG72K/0Fg/nCKLr56XOe4brB+WYlaK2nA== X-Received: by 2002:a05:6402:2688:b0:5d2:7199:ae6 with SMTP id 4fb4d7f45d1cf-5d41852f3dcmr6281078a12.9.1733850632877; Tue, 10 Dec 2024 09:10:32 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:32 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea Subject: [PATCH v4 12/24] ASoC: renesas: rz-ssi: Use goto label names that specify their actions Date: Tue, 10 Dec 2024 19:09:41 +0200 Message-Id: <20241210170953.2936724-13-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: TIUVDNVNIPBO2RWO4XAKFHPN6RJJZI5N X-Message-ID-Hash: TIUVDNVNIPBO2RWO4XAKFHPN6RJJZI5N X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:10 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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. Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v4: - collected tags Changes in v3: - s/sh/renesas in patch title 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 74632e2482f8..209b5b8827e5 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 *pdev) /* Error Interrupt */ ssi->irq_int = platform_get_irq_byname(pdev, "int_req"); if (ssi->irq_int < 0) { - rz_ssi_release_dma_channels(ssi); - return ssi->irq_int; + ret = ssi->irq_int; + goto err_release_dma_chs; } ret = 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; } if (!rz_ssi_is_dma_enabled(ssi)) { @@ -1136,7 +1136,7 @@ static int rz_ssi_probe(struct platform_device *pdev) ssi->rstc = devm_reset_control_get_exclusive(dev, NULL); if (IS_ERR(ssi->rstc)) { ret = PTR_ERR(ssi->rstc); - goto err_reset; + goto err_release_dma_chs; } reset_control_deassert(ssi->rstc); @@ -1152,17 +1152,17 @@ static int rz_ssi_probe(struct platform_device *pdev) 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; } return 0; -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); return ret; From patchwork Tue Dec 10 17:09:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903396 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D7DD3E77180 for ; Wed, 11 Dec 2024 11:31:48 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 238132BCE; Wed, 11 Dec 2024 12:31:37 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 238132BCE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916707; bh=Yz055MkA+pxfsMjRAkbTxtMOq7knGNv3D+SNR/Ylrow=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=GQmEj2CKsXWNKvpTB/FfFg6wpqLTxY/ByPngvoKSThiDzmORsV8q+Y9PjzXJ7Hh0K 1h3NWgggPtE9uPz5WIzeMu2as3kgTkVLwb/taSBiUAadUEmeVwWqmB8R5A2JVcL5Ff PGLdR9v2Yl1zFuHrZPpaYNhuNLnagLRFUiYKO+5I= Received: by alsa1.perex.cz (Postfix, from userid 50401) id C3EC9F80C73; Wed, 11 Dec 2024 12:27:55 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 0C032F80C72; Wed, 11 Dec 2024 12:27:55 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CCB1BF80482; Tue, 10 Dec 2024 18:11:38 +0100 (CET) Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2A476F800E9 for ; Tue, 10 Dec 2024 18:11:36 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2A476F800E9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=EnIVj3Ks Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-5d122cf8dd1so9452018a12.2 for ; Tue, 10 Dec 2024 09:11:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850636; x=1734455436; darn=alsa-project.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=kGFKtP/kqhSYwKWsXVqygeaqizf9KcZRKhKS1yEgkJI=; b=EnIVj3Ks3r/ec5OFaCHzQf5z+dpadP32O6J6fJ2Fh4IGIBBaPA3FB6qejlkglUQLaQ cbf7HPrT+vreN2UaN0iLZxrasQggQgN2CosfpwmKbe6CV5qy5qT0AXsSCV+qtyKzdxGM Ag8wHcNh0VlaPrAVMhJjE6stfHPs9IPPZgGnArUUKwBHeFHdd+1GTr9CagqBHICx5uOF U/pMg8mPemmxo4fEAW8/8tkIoyKM9Ymxq/XJvJwPwQPM09aia1W0FNlCs6cPYaK1V6dB 1OdJxYNTXb33YAHu4e+I7SPwfMH0GbeOd81KoQ5J4NBWyGHK1E06Av67kE+B8qZ/x4Pp +mrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850636; x=1734455436; 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=kGFKtP/kqhSYwKWsXVqygeaqizf9KcZRKhKS1yEgkJI=; b=iBoJLBQSizD80hllpiDLXSN24czIGCGP0rSkhoq6SM8Nx+DlRDu3IcofAcFK6kRCQc 6/ZlToh1z5pNLx2MUoDBCGI1aMKX0uQ+RnJzdvD+fdz5yNfNrhTzGW4+jrIcqMEDPqKK UPYVa49G2JdRjdBniXBSNa6tnzz7/c1Hexi0VUXTe7Gp5AZPORwLC6FVEbXGOMd9uiZK G2151XlZjazF7OeDHeK4sZKKNAAsUi5ter1J1DgWGjS9ltLdPWS9jL9EyK1/OcD1Cvir /vm4/ZcO7qtDAQfUyXr8EQ9Arx765ukyl5R6Nu5YzQPia8w86jMBLwJf19rR6Nwq29rE jupA== X-Forwarded-Encrypted: i=1; AJvYcCUYHB3C8KWub/N/nsGecbfkJUkKmY0U4y9iYj9a/GEH37UHdg5rBbYddR1xVArmxKLLWmLPxBjadSI8@alsa-project.org X-Gm-Message-State: AOJu0YyuQ7aw5uP8Dz10EVKQmadUxwIIOJudMyx+t373YqfSYQv8woz3 K//227JPuogo/plLBJd4oltNbMmgkcTVU3FMnOyz4+SQ9E63RBgbh+k6aNVjS+c= X-Gm-Gg: ASbGncucUZbnbhJqR00J0N00ui/YkT8m+DJlnaH9WTVPp2y1RjpxvZuzudXzgAaD53H 6VNEvB6RCXav9vvqwfAfp/nSupdClAANCWff3lVN4WEXmIRWTGCAVLbzRrsnJMes5AW3KrLJEfN w0ZK+yWnnVZTlQQ9wwxlPnwoL3ZTxurktjkw5XFfH37OZFZqV6ygDEyVMWWy2AZOPsKS5UlydPO lgTg2pzvoY7n+AUh7umyXhiewM+iKmNS7glumYOcWxX0TG3vlTDUTxNpSVk4t9CcSaXubkh8ANq Pd9+ZB7W X-Google-Smtp-Source: AGHT+IEC55JYbSGMCcanrVtAVCn++NmOM5lxtdpdi4NfwxaJizcleFUS/sRGsmrPp5CnJom5vv0rQw== X-Received: by 2002:a05:6402:43c5:b0:5d0:b51c:8479 with SMTP id 4fb4d7f45d1cf-5d3be680125mr18546630a12.10.1733850636238; Tue, 10 Dec 2024 09:10:36 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:34 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea Subject: [PATCH v4 13/24] ASoC: renesas: rz-ssi: Rely on the ASoC subsystem to runtime resume/suspend the SSI Date: Tue, 10 Dec 2024 19:09:42 +0200 Message-Id: <20241210170953.2936724-14-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: 6R4IEC7OPL7TRORNC6D3TLU4KUFJLM2O X-Message-ID-Hash: 6R4IEC7OPL7TRORNC6D3TLU4KUFJLM2O X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:11 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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(). Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v4: - collected tags Changes in v3: - s/sh/renesas in patch title 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 209b5b8827e5..878158344f88 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 *pdev) } reset_control_deassert(ssi->rstc); - pm_runtime_enable(dev); - ret = pm_runtime_resume_and_get(dev); + ret = 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; } ret = devm_snd_soc_register_component(dev, &rz_ssi_soc_component, @@ -1152,15 +1151,12 @@ static int rz_ssi_probe(struct platform_device *pdev) 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; } return 0; -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 *pdev) rz_ssi_release_dma_channels(ssi); - pm_runtime_put(ssi->dev); - pm_runtime_disable(ssi->dev); reset_control_assert(ssi->rstc); } From patchwork Tue Dec 10 17:09:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903397 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2481CE7717D for ; Wed, 11 Dec 2024 11:32:03 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B70B72BE6; Wed, 11 Dec 2024 12:31:50 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B70B72BE6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916720; bh=cB+Bpu7l1dV+zM88HO7Ze3t/5fdXwi7jPTuxAvUk+U8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=JbHqWeth3MotFg/ijiaYPS4vpTLFqI36859ETMMzGi2NUrlComt85Vbk+l1anXBF/ 0GIqnPHYeZLCIPqhxXylqepksS9MvAO7lyOnRy7QqBCFmY6ha+Pezwd8LUsKlrI7bM odY8ePOnbGDzToHpLYDmhf2jolH1UUoaNYXBtZuQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id E0767F80C87; Wed, 11 Dec 2024 12:27:57 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A5FF9F80C7B; Wed, 11 Dec 2024 12:27:57 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7AA6EF805AA; Tue, 10 Dec 2024 18:11:40 +0100 (CET) Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D4921F80448 for ; Tue, 10 Dec 2024 18:11:38 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D4921F80448 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=ZS3ZvS08 Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-5d3d2a30afcso6571967a12.3 for ; Tue, 10 Dec 2024 09:11:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850638; x=1734455438; darn=alsa-project.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=Z6Hy/pRodMw2d91URONzNaEgR8YWtQs7fLTqCwO7+FQ=; b=ZS3ZvS087SlzV6h3Ossjkglu8zME7tU4FfLQxo7JxLYVTsiE8Fqd2BrX/dC/I3F5BR jT0DQ1mzL0kstSv+p/sFsxu4VRork0jB9w9Fk1OQ+Tg7Ove63AblXd435QP37lewPYkn Y4eAPZ3oq7wZYrOUMNvIwu+E6SZNlUk6Lt0Ltjpp2yYoWMEqtJJx+TTY/+AiQ4c5tRGk d+riefXCVQbxto1vwIfdXADjM7Lj0vKtNGSd4L9jCgxhS6ufnZWhezLQ1xBihRQ4y+Wj 93DLiC8rWq+hFaptwf0hMsmY3g5cFuCqsJVvWI7k9X8bQ600s+PdoEP7MFGn0kpNtuqi wX4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850638; x=1734455438; 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=Z6Hy/pRodMw2d91URONzNaEgR8YWtQs7fLTqCwO7+FQ=; b=bryEPxir6hLFX42mpCFWyQVRu7NOaXvHc6MBCdUws4dfUwHg7Bmt76EXBFXzBHRXzP /0b+DdoDU0yGS9PZ8fWdOb7MnN8RgZkTavDSXxI/orf1aPhaHFKBddQ+PpX4lfeK8vOs hdxg14bk6l/GzCiuzYsWtmXXHFaERFXrQJB7miTDIBu5oAXHSGTx0YJhuyz2dvXQ3UTh SzfuN8m8JypJULt2h5CMey3R8IqlXgUBB2fwjtm89BYThqpu7QMDikKqRpDzQ7rouJEs bckDt0dOy8/zRNdVDEJiDUSuP48hWOP+1YhIS5fvCMsO5b1cOelwj9YfTs1/tPPPbUJQ +kvg== X-Forwarded-Encrypted: i=1; AJvYcCVij8LMWWZENLRiUyGngfrtKipe1PMEcIe6UkgsNMY/lijf5wuFi0nFxHTLri2acoTi1NLeP0ezZa+b@alsa-project.org X-Gm-Message-State: AOJu0YzzQR3qUZgkbjK/c2yyaDAR0TPWJRuzoeOAhUmbkUmQJD2kpBbc kGW9RGcl2Q8yIhJWCPdKE3+9Q5/WaoGOYCOAaMXRbx6K4cm+CE1k35hc64MFSr8= X-Gm-Gg: ASbGncv3rWZhsrxQ3gFavfQjprgPBCxVBTIrs3j464QZ/qAgMTlBKr7OG3A/ua95CjJ PEo0LUd5ZWWZIJXTJ4y+LfNhyWhOCN/2eSdeoj8T6EpqPykapu+tU8Vy11cL1Bpus4u7PYtbZm5 EhOP1Z/KFQwMfXAdKtfvaTUrk56uGAJQ8uRAJ+5yR5UI9UrtV7xUL/KkTkSahWm1qjUKZDtvMlb 33sAxx9uQ0pscWoOnJgWe0ysPXmHnEilrYWXIrx6M8TCMVLeXh6orzAK1bBT1iocT2+dXdcVPh+ KiluQ179m60= X-Google-Smtp-Source: AGHT+IGqcJ6bqhwIIKJrt+yeOZgP79f+Ka5SbVUv4mcFJwjMu+9gX00sz7DE8koWILZTW546alVDvg== X-Received: by 2002:a05:6402:1f10:b0:5d0:b4ea:9743 with SMTP id 4fb4d7f45d1cf-5d3be67e142mr17354125a12.8.1733850638421; Tue, 10 Dec 2024 09:10:38 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:37 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea Subject: [PATCH v4 14/24] ASoC: renesas: rz-ssi: Enable runtime PM autosuspend support Date: Tue, 10 Dec 2024 19:09:43 +0200 Message-Id: <20241210170953.2936724-15-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: 7D5766WGOJUKDXMLVJTFVYBBTPYAMUV4 X-Message-ID-Hash: 7D5766WGOJUKDXMLVJTFVYBBTPYAMUV4 X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:11 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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. Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v4: - collected tags Changes in v3: - s/sh/renesas in patch title 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 878158344f88..eebf2d647ef2 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) } 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 = devm_pm_runtime_enable(dev); if (ret < 0) { dev_err(dev, "Failed to enable runtime PM!\n"); From patchwork Tue Dec 10 17:09:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903398 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 64628E77180 for ; Wed, 11 Dec 2024 11:32:20 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D3E802BD4; Wed, 11 Dec 2024 12:32:08 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D3E802BD4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916738; bh=QfMAQ3ObJOM7gWSlinrrpwhjt1hderzxfmdZZzAXUok=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=YP8Qvtpb5ZEwShrZbdOA4aKRS/DFArK3yYyQJAXbMTIoHC2cjYuhBa1/csh3ToG2S YjZxttH6wGNXFT2AjzOM0fLXuX+qW1yHTrqgl/h9SfxLF4VM7pDAWPrl98g8LsvqRT K42a6ABEFCIgA7ooRiNrt/kg1VA5vEhbSV2gwlkU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 37232F80CBB; Wed, 11 Dec 2024 12:28:01 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id F023CF80CBA; Wed, 11 Dec 2024 12:28:00 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5C5C3F80482; Tue, 10 Dec 2024 18:11:43 +0100 (CET) Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BD809F800E9 for ; Tue, 10 Dec 2024 18:11:41 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BD809F800E9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=U3ghXJHc Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-5d3f65844deso4040636a12.0 for ; Tue, 10 Dec 2024 09:11:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850641; x=1734455441; darn=alsa-project.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=6UysEDL+tYPOXb/CerEK2e/yd8/mnBKQO5ExCdaAA4A=; b=U3ghXJHcEbY9e77L9MXiX+p8CLh5w2pFyGBCzw38WrmNBWkioVVB/wTa8FO1Kc4H28 RjEwfQweb3aFAOvHBWJCvjJEXKBpdZVZpkIPQo0zW7ppuMxFSkxs7VRtpEjWqPz7HEth HoNkqO+0OjwNqjWDmqQWaidyUGI7nAL+46g7pDSdd+hB/kXe7GJgL3vhkVooT8Ovd/+o wRIC3fbN+p3WEMLI4eB9ZRleN+7sGEY/46gdFm3eEFsQs9hogGWJj9mcqWoH1dsuwHHc /lQ4bay+8a4X3dlkEc1VLhM5lr6rjy4WRLyP3TnC6FduBFEzWuiC0rwcYoEApD2UKn/I xuJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850641; x=1734455441; 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=6UysEDL+tYPOXb/CerEK2e/yd8/mnBKQO5ExCdaAA4A=; b=nXzmS8PHG3khLJVqDZ1pGhlk8q3wSbKFyGTE/Q8AxdZfa4605sHUdwsb+o+Y6LhyHE gp7T1iHCq005ToDSjqxWIwBOk3zszf4Gf0R0qqIH4S9jTISZsBTa5uxGC96FFb9sjUvM Ndlq/pQ2YgX9CEyRqqLhMgnssKIiW0GeDsqJz5Ox0cy3Tk2kr+74rAXTVymIZnGqNe++ /fTzWWtl9arVQlIFnR7e5Hh/ywLPafAgWWtzNvHBUaCsXFDSoBRyg93UeJGkZzrTU+kf 4VIUd93xxWSEvWJdg5DYz4KXYa1g83lzChbJVVHKj5d7Yhky5gH3BoxJ6vwFBjH1vu0I 8VvA== X-Forwarded-Encrypted: i=1; AJvYcCWAbZsJDkvozEEDR/rNziDsqWNPtZLD29drGcEbQYtyxWmN7zz1ICH1w/3ILh/1tr5uzZJkDSYhTDHi@alsa-project.org X-Gm-Message-State: AOJu0Yxjm5CRoHvWRTLe/aSHK++bmNC3cQ0dklQIzYTnrQ1ex0HuZjYJ nn5Yed1StzlYbbHfi0QE8mjRaacy3sbRDeE5APzWga6LsY3o5m/i+86I+x7Dg2E= X-Gm-Gg: ASbGnctsUa6wYicO0sFSQOE5qE3wcAkAKicfT+99L/o0v9hLJwMuyOUJogRw3YR5eXd JHgjTDDiMhGemTr+FwB6XAoAFi3p9fcvkyG/HEaQKmOfbZULHQ5zW2WRZw2QD3aws5mj585TNio JxosBk77P7+jU/Un/W2iXsbB4ZS9zvttgCjqNl9NMxB2FF1EZ9YPA6HelcCY2yxKIec7bDsTq6B /bwDXieww2yD54/32ln3DuhXEAwUIOF/suFoMtDSVcYrwxqsZav/Bs4YMVCo3ogVvIBw+LVoWS+ z/yVvyUD X-Google-Smtp-Source: AGHT+IGDKksFRS7v8EJ79Qo0q8lVB55Bo0RkH6EDk6sqVxrrszOEC3HW/n36JzbvJ+iqRQS48HVTZQ== X-Received: by 2002:a05:6402:35d1:b0:5d0:a80d:bce9 with SMTP id 4fb4d7f45d1cf-5d3be71c114mr15442107a12.20.1733850640930; Tue, 10 Dec 2024 09:10:40 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:40 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea Subject: [PATCH v4 15/24] ASoC: renesas: rz-ssi: Add runtime PM support Date: Tue, 10 Dec 2024 19:09:44 +0200 Message-Id: <20241210170953.2936724-16-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: NXJWEVHUIWQ7F3623STZ2NE3MFWVIXIQ X-Message-ID-Hash: NXJWEVHUIWQ7F3623STZ2NE3MFWVIXIQ X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:11 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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. Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v4: - collected tags Changes in v3: - s/sh/renesas in patch title 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 eebf2d647ef2..34c2e22b5a67 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 *pdev) goto err_release_dma_chs; } - 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 = 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; } ret = devm_snd_soc_register_component(dev, &rz_ssi_soc_component, @@ -1154,13 +1153,11 @@ static int rz_ssi_probe(struct platform_device *pdev) 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; } return 0; -err_reset: - reset_control_assert(ssi->rstc); err_release_dma_chs: rz_ssi_release_dma_channels(ssi); @@ -1182,10 +1179,29 @@ static const struct of_device_id rz_ssi_of_match[] = { }; MODULE_DEVICE_TABLE(of, rz_ssi_of_match); +static int rz_ssi_runtime_suspend(struct device *dev) +{ + struct rz_ssi_priv *ssi = dev_get_drvdata(dev); + + return reset_control_assert(ssi->rstc); +} + +static int rz_ssi_runtime_resume(struct device *dev) +{ + struct rz_ssi_priv *ssi = dev_get_drvdata(dev); + + return reset_control_deassert(ssi->rstc); +} + +static const struct dev_pm_ops rz_ssi_pm_ops = { + RUNTIME_PM_OPS(rz_ssi_runtime_suspend, rz_ssi_runtime_resume, NULL) +}; + static struct platform_driver rz_ssi_driver = { .driver = { .name = "rz-ssi-pcm-audio", .of_match_table = rz_ssi_of_match, + .pm = pm_ptr(&rz_ssi_pm_ops), }, .probe = rz_ssi_probe, .remove = rz_ssi_remove, From patchwork Tue Dec 10 17:09:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903399 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CB73EE7717D for ; Wed, 11 Dec 2024 11:32:40 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8AFF12BED; Wed, 11 Dec 2024 12:32:27 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8AFF12BED DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916757; bh=WRiEYmvCrEDu0efYiS+BnJtjOfOD3CrYjSzhUZqxggA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=n5VjE3oUeBkPxrSQpN5tlhOxglpnA9DAotbZSxTExES5B0uOcQyOYzdVCQouq9MPX 9rvE63CP59fzGvh1Y5R8Ybmg9trarqfMc4mkkcroFY0g/eOpLUBgcTM6KNUJ2qWfFx 68JPDFXS3hsyAp8kbINQ/TZuBGJ4csB+Pg3lFqmU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4708CF89670; Wed, 11 Dec 2024 12:28:04 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 4F405F805E9; Wed, 11 Dec 2024 12:28:04 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2FB67F80518; Tue, 10 Dec 2024 18:11:45 +0100 (CET) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 73656F80482 for ; Tue, 10 Dec 2024 18:11:43 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 73656F80482 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=Oobleg9X Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-5d3e9f60bf4so4671111a12.3 for ; Tue, 10 Dec 2024 09:11:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850643; x=1734455443; darn=alsa-project.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=gNFyzgag91SKUVQoD8nVAEcB8AscK0h2z9GDPU+fWvo=; b=Oobleg9XxT3HQakdqa37p2clQXu3VfO7HtpN4nIbRb2mzPlNOncitfBsM3F7TMUYnl jDcjHzu45blfm3Y5eYF8T1DMkI0+brVfCZ2hccnWRkOXKP1W8UfNIOCnfNe8iW7cjIqG xoheMqPgvSTTGIZWFdinJUGHXOckUJc/FMwIxkn73/we/JHm0GEDSzp/eelVxxDpgFT2 BW+7ZavG3SiySxhmPm0wCnGabya9yW609twg8o6sTjDzUHRD1DQfGlmtsP7CRGJwxjRm hsks4bjgUcm9lygN7xeP5/w6p2MGX75IVFfimsl2OiOwlEW34oNK8yM293j6VRR4eLAB cyoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850643; x=1734455443; 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=gNFyzgag91SKUVQoD8nVAEcB8AscK0h2z9GDPU+fWvo=; b=Q15JyBYydD21KjpucWLkR9KFs77sZpWP/gaQkpmMyIWYLYik0hotZZdAnYp3sRGGla 0qI0nEcaJnZsLbByy2LeE1OwnsV+JL4nxW0M59WfGtbUofHmrDsykBY3M9PsFgFSgP1p MKgqUO9MYWuu92djsl5oSb3/CzDwjKImO3Os6i77pyz1/EzeZVZK9muilwCZVEqHLn6c 4OWcCqYW+gESVnGcEWQVzJIw2kj2AkjRZqOYfK43c8cYxnTTejnznaJPl+hTxsiD0+zO VBNqOkC7EMJPMcc9KfiqhhhV0czHfh50VKrppN/Z+VLQtZkigIUNZieQTOKrI6Iynwv9 1DlA== X-Forwarded-Encrypted: i=1; AJvYcCXlL3e6V8F8Yj3gmVozt/TceSrWDANdNqB/A7X+flgEgsX8powekYwglqxYyeGn92k8VgSOotZG7Pgc@alsa-project.org X-Gm-Message-State: AOJu0Yw/a4lmev77LqMYapwSdnAA8TkVANzXYlUPPZOUr5bp+ETTP/S5 TJa9inthUvn2LJIFtwMslMc4jZocwVzBLNXIcuu2N2TycktQGRVqFatQaDsrRjY= X-Gm-Gg: ASbGncudDmtOV9uTi8X6x8OTh8YV2R1FTKfoO79EMM2oeAibhjHTb8keAkfYseh+I4W CEmJXJ5Rgmjlpu4rI3P8brm+exKaTFLSK7XYysOM8WmBbMZpC9L+sHoUpNSHR9NjWWB/TvfYoiI rsxazomkHIk49UNEv2zsQ+kaPwBMuhCwxRg/YxWVY5FxG0U94gnYx5530zr/kRDovh5geGNynVS fHTnI2pfLvIxVYRvrTyuMZV8j0mh0Q+Zh6R0qH3nJ6Z6DdU2oVPxTL1H44GHqR0qgKkz9sVviu+ 6dsGQOz7 X-Google-Smtp-Source: AGHT+IGBwrXeGyw9PzNdwLgYXKjgGaPgrny0AlmNGbVXlrqkKBOlqakuZUH3QzbVuduS9Y4Lgz1XGQ== X-Received: by 2002:aa7:d985:0:b0:5d3:d8b9:674d with SMTP id 4fb4d7f45d1cf-5d3d8b967femr12400130a12.0.1733850642620; Tue, 10 Dec 2024 09:10:42 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:42 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea Subject: [PATCH v4 16/24] ASoC: renesas: rz-ssi: Issue software reset in hw_params API Date: Tue, 10 Dec 2024 19:09:45 +0200 Message-Id: <20241210170953.2936724-17-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: CYSUV5UWI4WSH6YKSUZEMTUYHCR3Z6ZA X-Message-ID-Hash: CYSUV5UWI4WSH6YKSUZEMTUYHCR3Z6ZA X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:11 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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. Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v4: - collected tags - use rz_ssi_reg_mask_setl(ssi, SSIFCR, 0, SSIFCR_SSIRST); in rz_ssi_swreset() as suggested in the review process Changes in v3: - s/sh/renesas in patch title 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 34c2e22b5a67..486822d79458 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, struct rz_ssi_stream *strm) return 0; } +static int rz_ssi_swreset(struct rz_ssi_priv *ssi) +{ + u32 tmp; + + rz_ssi_reg_mask_setl(ssi, SSIFCR, 0, 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 = 0; @@ -782,14 +791,6 @@ static int rz_ssi_dai_trigger(struct snd_pcm_substream *substream, int cmd, 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); if (ssi->dma_rt) { @@ -914,6 +915,7 @@ static int rz_ssi_dai_hw_params(struct snd_pcm_substream *substream, SNDRV_PCM_HW_PARAM_SAMPLE_BITS)->min; unsigned int channels = params_channels(params); unsigned int rate = params_rate(params); + int ret; if (sample_bits != 16) { dev_err(ssi->dev, "Unsupported sample width: %d\n", @@ -940,6 +942,10 @@ static int rz_ssi_dai_hw_params(struct snd_pcm_substream *substream, rz_ssi_cache_hw_params(ssi, rate, channels, strm->sample_width, sample_bits); + ret = rz_ssi_swreset(ssi); + if (ret) + return ret; + return rz_ssi_clk_setup(ssi, rate, channels); } From patchwork Tue Dec 10 17:09:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903400 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A2782E7717D for ; Wed, 11 Dec 2024 11:32:52 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0D2A72BC7; Wed, 11 Dec 2024 12:32:41 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0D2A72BC7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916771; bh=JQNGPZYkGQRQ2sTS79lFZ6me2mcLImriGT7BK3n9sx8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Dcbj5sMY3dSFm2cnGPqZyl3CV/ALkCu2x1fwQuWxN5n1Y1Idu50tfZsPxegk2y/aG wRwrQf5NBhQcjdOLxAWN7RD/1G256uCdANe7AM7m9p2MFwUMchtJKBByLVwKWTUrMG MIiqy5CMSZyvLqpO1L0vrAZfa4uQiwrZb0mvHq5Q= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 52947F805F8; Wed, 11 Dec 2024 12:28:08 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 13233F805F8; Wed, 11 Dec 2024 12:28:08 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3A6D7F80533; Tue, 10 Dec 2024 18:11:47 +0100 (CET) Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 98906F80482 for ; Tue, 10 Dec 2024 18:11:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 98906F80482 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=aTdtzUc7 Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-5d3e6274015so5214486a12.0 for ; Tue, 10 Dec 2024 09:11:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850645; x=1734455445; darn=alsa-project.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=zdorf6J6oUWOvTlM/ckHP3yguOeZKUZzy/Da078XD3Q=; b=aTdtzUc7lsvq/h4ioxi0n/wBtYid5XIfgvKZw6a8DcF/S6Bpt1qDwyZSboMDpxtCQR 4jcbZGKoGaPB0G8iErihoYacYe159KPnIU+4TfCTW20HFJn11lj6FONsn3E2v4x5D0Fh PV5nhy72fbExk507x5Pm9vNowoypgs58vnVAFGJ9RthrgISx7gsLgDZwCFxaEd4z6P4u qDDnzora/BDf2D1sEQQ1pEsvHXsjApzgb97x/BYDX0VD76nki3iWLSQp8WLmB1+rRWYg TLe8O1Uciu6A8IUBKDCRx1qfwrwb5CT3e0gaP3Vv4M4QlRc2A5qz10Dch7fHpY8kW/qN +BAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850645; x=1734455445; 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=zdorf6J6oUWOvTlM/ckHP3yguOeZKUZzy/Da078XD3Q=; b=WOaoq/oBoy9CD2TyWKNvgr3VXdTJ6HWJ+N5ARjdZj7ZInLS4rcEiy4oPHMmzqOL7lY 6GXILB/kohhhwZeRV5VySEfnNNqm4vEA5XrmDjrr2eHnKq7MqWVbHT6wWszWvV3slWfH QWiBAMqnhhtn2ln+G8LF08bL5ZXW3lpwCE8P9GcrIabWFJ/+ttwdqjP/bt0BIBhOMAIF xMRQCN8CNknSimUQy05EpmldMJlgUrqcUn0rYdVuzcLKJ1GjhbEA3ueDVjjcepcgJ5q+ RBrCegblRQph0C5u2qGO/E8TJzumZ2KsKqpGpNimzBp+3cQA2kn5N3WUuy1vGp/fKa8d ulTQ== X-Forwarded-Encrypted: i=1; AJvYcCX5cJ4RPaeRD+59VzuvMNZMLjUumWocS8Yx5mlYKBahr34zgkP/vwcj2UZfW2Crl05YI8XIEuxWE357@alsa-project.org X-Gm-Message-State: AOJu0Yw9jCMuncxWzgV6aGW09bePoiJch5t8hnGP+IaQH7vQ6xT6Bz3y zR+nevDt71odkRqPlRqAFAK9jodW9reJgBLJoAej183y8OKLMF3xEUogUb7nL6E= X-Gm-Gg: ASbGncu2bNhS693wIulzcQdhNTq28MUxJnhl34cQeUkZd1MLKNBu47vwCbfpa5//bwC 3oYcN0zZ1cSt77qEEeZ+Dr9GaE/Gp37bLL1kHkAIAdHocID06DoGjGrNuYuW5L0wgTZPee8tB35 SZoNBw/iLRopBbO5u6lwntjfZaLHxYpy1zEaGsCt7BYdQT0z2dgMW69pZ0lPfXEB3uFqMRIgDmW VcLfKUgwED48lkyhT0LhyVqm1IEroPpLtkWWY+iokSCUaYzDS0HAM+hth6e1Km4uKgHhefybEL/ Z2kbHa1p X-Google-Smtp-Source: AGHT+IG0YYavl8GoEPcOWdjWdvPZujuBgG2HJ16HofI4S8uWOgmyS/RSRLDoRpiWfKoP6RlhHB13MA== X-Received: by 2002:a05:6402:3493:b0:5d3:e9fd:9a15 with SMTP id 4fb4d7f45d1cf-5d3e9fd9b71mr12243945a12.32.1733850644830; Tue, 10 Dec 2024 09:10:44 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:43 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea Subject: [PATCH v4 17/24] ASoC: renesas: rz-ssi: Add suspend to RAM support Date: Tue, 10 Dec 2024 19:09:46 +0200 Message-Id: <20241210170953.2936724-18-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: X6CZSZ2VNAUVIY3HTV46MKNQHG72TSQX X-Message-ID-Hash: X6CZSZ2VNAUVIY3HTV46MKNQHG72TSQX X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:11 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 v4: - none Changes in v3: - s/sh/renesas in patch title 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 486822d79458..d48e2e7356b6 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; } +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 = 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 = 0; + ssi->capture.dma_buffer_pos = 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 = 0, i, num_transfer = 1; switch (cmd) { + case SNDRV_PCM_TRIGGER_RESUME: + ret = rz_ssi_trigger_resume(ssi); + if (ret) + return ret; + + fallthrough; + case SNDRV_PCM_TRIGGER_START: - rz_ssi_stream_init(strm, substream); + if (cmd == SNDRV_PCM_TRIGGER_START) + rz_ssi_stream_init(strm, substream); if (ssi->dma_rt) { bool is_playback; @@ -819,6 +853,12 @@ static int rz_ssi_dai_trigger(struct snd_pcm_substream *substream, int cmd, ret = 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 = { static const struct snd_pcm_hardware rz_ssi_pcm_hardware = { .info = 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 = PREALLOC_BUFFER, .period_bytes_min = 32, .period_bytes_max = 8192, @@ -1201,6 +1242,7 @@ static int rz_ssi_runtime_resume(struct device *dev) static const struct dev_pm_ops rz_ssi_pm_ops = { RUNTIME_PM_OPS(rz_ssi_runtime_suspend, rz_ssi_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static struct platform_driver rz_ssi_driver = { From patchwork Tue Dec 10 17:09:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903401 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2F4E8E7717D for ; Wed, 11 Dec 2024 11:33:10 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DEC062BC7; Wed, 11 Dec 2024 12:32:57 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DEC062BC7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916787; bh=NtVph11BLd+x3z/1Zok/7JAFGIkvZxSriGpx0rha4FE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=oA2vsOiFsH3nTylMYsTYuH9L1B0gQXkkTJkVr/toi9MK9xrJZK9hWQQFNVxdcowKz 3YeB15/gRk/mQGmivAcBSlfo8oIYXZ5b6ufulT7v+GTrUW+YYihnHkd6usoRpGyv2M vk/JhfeZRgQQJ0Fik8phadrQZY4ZxvnQ2LlmbO4w= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6CCD4F896F2; Wed, 11 Dec 2024 12:28:10 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 41B6CF896F2; Wed, 11 Dec 2024 12:28:10 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 17849F80482; Tue, 10 Dec 2024 18:11:49 +0100 (CET) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5FA07F800E9 for ; Tue, 10 Dec 2024 18:11:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5FA07F800E9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=p0NQ+QbG Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-5d3e9f60bf4so4671212a12.3 for ; Tue, 10 Dec 2024 09:11:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850646; x=1734455446; darn=alsa-project.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=Pzloo09Dgg4guioxkvLZOvAnsn9Efhp0SVwyR1byrx8=; b=p0NQ+QbGnrhdqzeS48qNUAyKzytLVxiZF2kDAnGHEXDsI76lFlpZcntSV8iWEWYHO5 CH3sbyLZPhOdjU/kqv4F1m1ZvRnnRIZA9w79hzMQzhxmhANNOuou6rqrl5QA4t85g9Bt 6yknFAwYy76vYsLj+1T8bnBvphRlB8ddgPqsvlvqv64OzHzDrIcKJdw/3bVoUYhWoQn6 O0UhjPOgx2EtciBk4T66EkRZQyNygjaDMoZ5vOkP4dYiONJai17TjZ560saPbCYmlJVH RTDQGq/8Heawzpdet3kxxtqKFtiElJRAwxZr3tutbYawsK6E5QhMIEg/Ya8tWwdiI+iV Gcyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850646; x=1734455446; 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=Pzloo09Dgg4guioxkvLZOvAnsn9Efhp0SVwyR1byrx8=; b=cX2DUSCcSHRWqdHwDTkjUPUG0wJyEtFAMObI5Ta80No2XOwEKI+fHDSrSwOSc+x6ZM NXAbC87rpr+BCPmBzc2bHpD22dySKgdj1r1RymVL9A4I1HqzGKfHwgpIkqBUNfgBhVqS Dc+Sgm6SO91bW/Vj6SxCQ6F+fnI7GieY3jsckcqYCcz22UiRd4xDkPZS5LZl1oaEi4fe ckArFi8BTcASrrJmXwzwihIGJ70xXw492KXXmlm0Ei8G7OEaRJNcef9TaVZlrPpWREsT KhThQj6ywdlbfSmATaV8h5XVrsFoFQxIVGwjQURpg/1xSg/ZGW3wJMjXtb6FHTUDd19P XGPg== X-Forwarded-Encrypted: i=1; AJvYcCVJJ8aASP5HJ9K8ll9OcGHfa6NYGn7Pjr4Masmk+xkrbulVY6dZ+/EYb95ejBnIQ1QWyRsv5FUGNfss@alsa-project.org X-Gm-Message-State: AOJu0YwXvIuo3LXKxVimHAwlqrJQxq3s+9p5HaTDc1czCeZv1Bogo3BE H14hhyQz2uY2FDMRim/3ocj25JTtwKSP5ndSl1GViOaLDmdKzALC0nyOIBvnmMo= X-Gm-Gg: ASbGnct5F9RZnVIgLtgfo46vecCysZ2tgd1Y7Zb919kEVMFifvMHEqm+YgTQ23TI6Dd bWGoxgA+oZx14zfWTyid+GYgs9TkN8c9ad/gGtwVzg/zEKLCZp9f8i9gvLvETBv3t91cE08pSlB sP7qAnj4+9NUHKgNgrZbPKGWBaJQ7Xvv5Nrqjk63h0V2LCg0mbAeGXTh3NOwWPX6w9pWaqewDLx HEzTu9/NI6Nf1OXdVHCChhsu1wGiHO2Z4ZZxynOvRutfDTKIegR4/SOGNycyq0Km4id8dWgzMEF bkce2gPJLLE= X-Google-Smtp-Source: AGHT+IHu+/x+M8u5QIMjQ6egtfsihnsclgAo9NZ4IQV+C7GzhzYxCnvnX8xs1AndpKM2ie6VGxgEag== X-Received: by 2002:a05:6402:3591:b0:5d3:e45d:ba91 with SMTP id 4fb4d7f45d1cf-5d3e45dbbfbmr13230055a12.32.1733850646516; Tue, 10 Dec 2024 09:10:46 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:46 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea , Geert Uytterhoeven Subject: [PATCH v4 18/24] ASoC: dt-bindings: renesas,rz-ssi: Remove DMA description Date: Tue, 10 Dec 2024 19:09:47 +0200 Message-Id: <20241210170953.2936724-19-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: 5PXUUGUNMLOVAY6KM7CSTFDPJP6XWH74 X-Message-ID-Hash: 5PXUUGUNMLOVAY6KM7CSTFDPJP6XWH74 X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:11 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Claudiu Beznea Remove the DMA description, as it duplicates content from ../dma/renesas,rz-dma.yaml. Additionally, remove the MID/RID examples mentioned in the dropped description (this information is already documented in the hardware manual). Suggested-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v4: - none; this patch is new .../bindings/sound/renesas,rz-ssi.yaml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/renesas,rz-ssi.yaml b/Documentation/devicetree/bindings/sound/renesas,rz-ssi.yaml index f4610eaed1e1..5b42eec864f8 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rz-ssi.yaml +++ b/Documentation/devicetree/bindings/sound/renesas,rz-ssi.yaml @@ -57,24 +57,6 @@ properties: dmas: minItems: 1 maxItems: 2 - description: - The first cell represents a phandle to dmac. - The second cell specifies the encoded MID/RID values of the SSI port - connected to the DMA client and the slave channel configuration - parameters. - bits[0:9] - Specifies MID/RID value of a SSI channel as below - MID/RID value of SSI rx0 = 0x256 - MID/RID value of SSI tx0 = 0x255 - MID/RID value of SSI rx1 = 0x25a - MID/RID value of SSI tx1 = 0x259 - MID/RID value of SSI rt2 = 0x25f - MID/RID value of SSI rx3 = 0x262 - MID/RID value of SSI tx3 = 0x261 - bit[10] - HIEN = 1, Detects a request in response to the rising edge - of the signal - bit[11] - LVL = 0, Detects based on the edge - bits[12:14] - AM = 2, Bus cycle mode - bit[15] - TM = 0, Single transfer mode dma-names: oneOf: From patchwork Tue Dec 10 17:09:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903402 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 548BDE7717D for ; Wed, 11 Dec 2024 11:33:27 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 355CF2BCE; Wed, 11 Dec 2024 12:33:15 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 355CF2BCE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916805; bh=jlwgcsx3LUvZUCXYVhjc8Lyua4wYz+90XYYggB1WV0E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Z3hI1yscnQKi7fIDU3e355orxKcHYPcja7B0G25syOcY/I3pWyAOx1kPbACoe4rxj BBkECUFKG6soi3qE5706gQ+gOcD46EBIDJZu5RK4AKVCQ95TxYZNpjLQS0a4Ilv1EJ 1MaOPKZh/xryIwYrn24HhYUI6tUkiHlMsBzdtJzc= Received: by alsa1.perex.cz (Postfix, from userid 50401) id D5FDFF8970E; Wed, 11 Dec 2024 12:28:13 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 84942F8970E; Wed, 11 Dec 2024 12:28:13 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E5F35F80448; Tue, 10 Dec 2024 18:11:51 +0100 (CET) Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3D037F805AA for ; Tue, 10 Dec 2024 18:11:50 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3D037F805AA Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=Y7dXt704 Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-5d122cf8e52so9171512a12.1 for ; Tue, 10 Dec 2024 09:11:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850650; x=1734455450; darn=alsa-project.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=DMj/2kdBQwniGBjdZnm5DjNL0YdrCH1deyApmD3I+y8=; b=Y7dXt704h/TmgS37+s7c9NyGXARrnxaGfpaWOsGF+WLOjXZxcXk8/NsHDfzWHDl+uk mT/vrGRRIhg2Im+erYuYs9S4Uz/S2OmM7jNykDMh9wY+yU+ixjNqCeKtj2XUSPWSDUKT 5m/sqhWm33fmw/dVJoaaDQqmWGTl/szATad9n7o+bHvwZ9HNKvrBEgNkx2j3rODBG8cU /FDK7wiuCfwCv/1L6PMAJeLazL2oJCbqFoUdwKETLmGuclW1vGv7KRPf6525iE8Y/O3t vvkNNYhihnUO+Dx+uJzXcky3rw+4CK3dRT6uJ0RHo3jFr9Z4vOtO3Mt7Pho94Yoz/5q8 Ekhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850650; x=1734455450; 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=DMj/2kdBQwniGBjdZnm5DjNL0YdrCH1deyApmD3I+y8=; b=EZU9P8KJzaAL4l4t5rovKGoxitMKGzh8qXDQ452s5f34BRDTOZAX+mld29U/EQuwvj 2dHnDVJS/OPyYHDsNVit7c7Hm5s7Px7jGE+x/Sm360KsESpM5dsEGL0+G09aJ2Ideyi/ 4HftsACCPR//Y4oLXL0B+s+dheNRqGQzGYPuANCgwz4YX430ZizBwjnWCP1C2u31fgMl aHsyupn1RWaJUgPWsbkXtL0uDmEJjTE7634LhpF36mW6PfRQ/F0ml3oFqMIWzjwkSgDy H2BTaEVCliSvVbFus9Vlf7MfCY4zb7B0NnDyYp+VF31cMhikzjk3idXt4BvwBYMytTVE 2sZg== X-Forwarded-Encrypted: i=1; AJvYcCUzCxY3Yf06MlnIwQPaBrk12OWxA0Lsq4Bl6wOo3RWk5fzFpTmXxeDyT810ZFM6zuhhNwUEb8ini6si@alsa-project.org X-Gm-Message-State: AOJu0Yynmh4qL0xa+OXMvdKQsiKnoHlUabrNvGFgELCrktG4DrHgFO6L l3S0jxGb2OhMt2VfBtsKZJhswsixNvUXmQjvOmE5MnjSqWtmcDgMBuZr6X+JrvU= X-Gm-Gg: ASbGncv02qwg7kQbjRGzmLPIo+NWbO7t7vHIpI0FJAfSD6JhVAOwOuHkPtqEYESEbJZ Y5QjQJfH+pqXuDaZHQn8epVtGpEkNGygPKBgEMqDaTkB+3WWd7tEFr57D6hqe43/wl1U4FDkd3i 6eLaecrzVZzM0sycYGRyk2uJML4+PGowi66NtBDZrRCZLPtuDJsYXxeufPSolbgp7lQ343exSfn gFKUMaPdIpS02csUc+MLVy2QwK2rF3DGUR9MTQNlLnxbka3g1d2V0m/X6Mn6+V7BbbTSErkdkkF 5U4z4rKk X-Google-Smtp-Source: AGHT+IFXUw5ybDLD5qa89ZofGoIXkdy91MQ4lgB9QjSQ6ZzxsKHCx4/ijSbtTty6jRiH6OvTPqEZrg== X-Received: by 2002:a05:6402:2691:b0:5d0:8f1c:8b94 with SMTP id 4fb4d7f45d1cf-5d418534c20mr6265042a12.13.1733850649565; Tue, 10 Dec 2024 09:10:49 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:48 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea , Krzysztof Kozlowski Subject: [PATCH v4 19/24] ASoC: dt-bindings: renesas,rz-ssi: Document the Renesas RZ/G3S SoC Date: Tue, 10 Dec 2024 19:09:48 +0200 Message-Id: <20241210170953.2936724-20-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: 52HUYQHWXOEJQEYELVIKKYMCUECFYP6C X-Message-ID-Hash: 52HUYQHWXOEJQEYELVIKKYMCUECFYP6C X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:11 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 v4: - none Changes in v3: - none 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 5b42eec864f8..e4cdbf2202b9 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 reg: From patchwork Tue Dec 10 17:09:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903403 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E2BE1E77180 for ; Wed, 11 Dec 2024 11:33:45 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 389E62C08; Wed, 11 Dec 2024 12:33:34 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 389E62C08 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916824; bh=8/PHs3hergaZwLujvAzPGvYQcQ9nR8hOIaSM9/vOn8M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=eiMYikQv49LemEtZqO7IhAr6022oXbN52YtRxA2g9KSIvRFjERKx8hIIV7pugsDCl 0ZS9TMIiR1Tla+/rZJRAzQWLJ/ugWUX8+lM8k10VZQTlsTQ8NFRZkPfZvT8/ANgv2D dP4FIAyitsVz1hMcKAtB9TI7cGL1uVSep7KuRQB8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4A6B9F89732; Wed, 11 Dec 2024 12:28:16 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 26727F89737; Wed, 11 Dec 2024 12:28:16 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E4ABFF80482; Tue, 10 Dec 2024 18:11:53 +0100 (CET) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 56E01F800E9 for ; Tue, 10 Dec 2024 18:11:52 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 56E01F800E9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=E6/xNDlM Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-5d41848901bso2977714a12.0 for ; Tue, 10 Dec 2024 09:11:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850652; x=1734455452; darn=alsa-project.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=zbnqkT50sIwhXb4LpARwC8AegnQU36VT8IZg+EnVYck=; b=E6/xNDlMJ9pDVurNM0Xr9oss9jIBPt+5t9Cyfo117NJ533Bpnj82Ole3cCPbjjqLc1 4oSbkZhFgGXxs4a0ab1FwUvlhHYmhh2gSXiP0GQLmxgIsTxM0DVAtmjRVFTDKhc4MRai LgQIOUhL8VEAD0lZ3c6UR6EpgslvTCvL1yQs82IM4Sapuy4D+r6gbY86hw061sKQUhn2 u5lNH+JG4iHimLoSO/YYNpc374BsoIj95QGELPmc2L0A+raQdLfUgmhiGBVyNdWBIWe2 2I9rrj2E+yqQc2cYfcDKTR5wGt/ggL3sjBWpN9irB2T/pbLIR9UW2Y759mA5iX7xZurm RjyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850652; x=1734455452; 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=zbnqkT50sIwhXb4LpARwC8AegnQU36VT8IZg+EnVYck=; b=j2owkFpyNDD5ZTCW8mMV03xp6J8a6WUaNakMTyK1oiEupVSd1YojdlqoxGAmgWz3+B 3T7AvwJVETW0Y+M5Hml++rkbvBiUxgcXvzkwO+9urWsrXmsbgcx682j6zVKaigJ6EPcZ XndojYq/wYNW6vHehDF3f2N2oZXHTZy94X85WLEC941m4jgFr/v9j5A/JZvuMtUx4r7A CJi1yKvRu/EJmQOM+hb00KmOa1udnHXQt3AgJRbfj0teWk3vJHZUt4mf5cWKz8eYnoul DA6Jvz57fn8oUh1d4ll9nGzA5H/um12IVa4UmW1cwHnaU/kIP6YXhyFYjdQcvKKX4lCN AK5w== X-Forwarded-Encrypted: i=1; AJvYcCXVRUzdQcVHWccZQWsnS8shRLUHsYnTxCQMKTWx5CLztoG2zJTCL9y9thRLa6J1muUeJt0Jl1X/WkIu@alsa-project.org X-Gm-Message-State: AOJu0YwvWn+pBWl03GawJ35/Vj+ILgPvnxPiDpbOa7BF8+hW1GX+Xsnq TulklKrA7KuIQN7HEpdLx05JfETg2JufaqprTImbjUA2MU++oxWwcYvrbR2Xv4c= X-Gm-Gg: ASbGnctIYS4rN6XbbY4tA4VUpWDfAq6sVKtAP1Noapc25MbR2vCzKMpo/1+ZflyW0sR ZSR9tQ4000GwHVqQY4Gbwxn4EJRQUddBCd8ZliJLyLFNw2Hmwun20g7OVmsk5umDGteMIgizqnQ XSGHG/BGY2ZihpUnUYytR1q1YafPwGBad+viX35tlSBZsFzBDN+MwgW62gFh7/b3nFWBi2uX+Ih BDi+rf6rYMhPv2s62r2hwy4t69qd9uT8gqnwn/Zvxg6YRZiK8TF2OCkmP1dUII4iY384Xjyle7n TGEiRtstBXc= X-Google-Smtp-Source: AGHT+IGhOq0ISs6UITM0F+o/rYn/y64cloP1K9d/mnU2rOj31uCI1nueqLaUR3TcQZ6R+M3PsUDCEA== X-Received: by 2002:a05:6402:4308:b0:5d0:e9a8:4c96 with SMTP id 4fb4d7f45d1cf-5d41e2b4a25mr4157459a12.9.1733850651848; Tue, 10 Dec 2024 09:10:51 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:51 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea Subject: [PATCH v4 20/24] arm64: dts: renesas: r9a08g045: Add SSI nodes Date: Tue, 10 Dec 2024 19:09:49 +0200 Message-Id: <20241210170953.2936724-21-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: AIZCSOBYPINJX5LZV63RDV74QYN2N57S X-Message-ID-Hash: AIZCSOBYPINJX5LZV63RDV74QYN2N57S X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:12 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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. Reviewed-by: Biju Das Signed-off-by: Claudiu Beznea --- Changes in v4: - s/audio-clk1/audio1-clk - s/audio-clk2/audio2-clk - dropped status for the audio clock nodes - collected tags Changes in v3: - none Changes in v2: - none arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 94 ++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi index be8a0a768c65..0e06a4b96c64 100644 --- a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi @@ -14,6 +14,20 @@ / { #address-cells = <2>; #size-cells = <2>; + audio_clk1: audio1-clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + /* This value must be overridden by boards that provide it. */ + clock-frequency = <0>; + }; + + audio_clk2: audio2-clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + /* This value must be overridden by boards that provide it. */ + clock-frequency = <0>; + }; + cpus { #address-cells = <1>; #size-cells = <0>; @@ -187,6 +201,86 @@ i2c3: i2c@10090c00 { status = "disabled"; }; + ssi0: ssi@100a8000 { + compatible = "renesas,r9a08g045-ssi", + "renesas,rz-ssi"; + reg = <0 0x100a8000 0 0x400>; + interrupts = , + , + ; + interrupt-names = "int_req", "dma_rx", "dma_tx"; + clocks = <&cpg CPG_MOD R9A08G045_SSI0_PCLK2>, + <&cpg CPG_MOD R9A08G045_SSI0_PCLK_SFR>, + <&audio_clk1>, <&audio_clk2>; + clock-names = "ssi", "ssi_sfr", "audio_clk1", "audio_clk2"; + resets = <&cpg R9A08G045_SSI0_RST_M2_REG>; + dmas = <&dmac 0x2665>, <&dmac 0x2666>; + dma-names = "tx", "rx"; + power-domains = <&cpg>; + #sound-dai-cells = <0>; + status = "disabled"; + }; + + ssi1: ssi@100a8400 { + compatible = "renesas,r9a08g045-ssi", + "renesas,rz-ssi"; + reg = <0 0x100a8400 0 0x400>; + interrupts = , + , + ; + interrupt-names = "int_req", "dma_rx", "dma_tx"; + clocks = <&cpg CPG_MOD R9A08G045_SSI1_PCLK2>, + <&cpg CPG_MOD R9A08G045_SSI1_PCLK_SFR>, + <&audio_clk1>, <&audio_clk2>; + clock-names = "ssi", "ssi_sfr", "audio_clk1", "audio_clk2"; + resets = <&cpg R9A08G045_SSI1_RST_M2_REG>; + dmas = <&dmac 0x2669>, <&dmac 0x266a>; + dma-names = "tx", "rx"; + power-domains = <&cpg>; + #sound-dai-cells = <0>; + status = "disabled"; + }; + + ssi2: ssi@100a8800 { + compatible = "renesas,r9a08g045-ssi", + "renesas,rz-ssi"; + reg = <0 0x100a8800 0 0x400>; + interrupts = , + , + ; + interrupt-names = "int_req", "dma_rx", "dma_tx"; + clocks = <&cpg CPG_MOD R9A08G045_SSI2_PCLK2>, + <&cpg CPG_MOD R9A08G045_SSI2_PCLK_SFR>, + <&audio_clk1>, <&audio_clk2>; + clock-names = "ssi", "ssi_sfr", "audio_clk1", "audio_clk2"; + resets = <&cpg R9A08G045_SSI2_RST_M2_REG>; + dmas = <&dmac 0x266d>, <&dmac 0x266e>; + dma-names = "tx", "rx"; + power-domains = <&cpg>; + #sound-dai-cells = <0>; + status = "disabled"; + }; + + ssi3: ssi@100a8c00 { + compatible = "renesas,r9a08g045-ssi", + "renesas,rz-ssi"; + reg = <0 0x100a8c00 0 0x400>; + interrupts = , + , + ; + interrupt-names = "int_req", "dma_rx", "dma_tx"; + clocks = <&cpg CPG_MOD R9A08G045_SSI3_PCLK2>, + <&cpg CPG_MOD R9A08G045_SSI3_PCLK_SFR>, + <&audio_clk1>, <&audio_clk2>; + clock-names = "ssi", "ssi_sfr", "audio_clk1", "audio_clk2"; + resets = <&cpg R9A08G045_SSI3_RST_M2_REG>; + dmas = <&dmac 0x2671>, <&dmac 0x2672>; + dma-names = "tx", "rx"; + power-domains = <&cpg>; + #sound-dai-cells = <0>; + status = "disabled"; + }; + cpg: clock-controller@11010000 { compatible = "renesas,r9a08g045-cpg"; reg = <0 0x11010000 0 0x10000>; From patchwork Tue Dec 10 17:09:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903404 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C9430E77182 for ; Wed, 11 Dec 2024 11:34:01 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id ACA4A2BEF; Wed, 11 Dec 2024 12:33:49 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz ACA4A2BEF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916839; bh=d78/cjRoA1rGuCezGVFS8ZJSQg5DxH7DXWKg06PRmuY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=kR6lFZZi/z9INBd01gsSWy1B5EUby8va1SiYCeOjlepqKkEF8T0MzD6y6YaKPcOBy rGtpWwSwffVcfoNiHaOPouQa6LLSCNzWYxlhg2tu3gE2+qr5FHaAGYCoz2VqAaY8YM MgbnLZDRid+mjDJl71NIR1XIIwkAGz+NANBK4+8M= Received: by alsa1.perex.cz (Postfix, from userid 50401) id CACA3F8974F; Wed, 11 Dec 2024 12:28:18 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A3DABF8060A; Wed, 11 Dec 2024 12:28:18 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B00ACF80533; Tue, 10 Dec 2024 18:11:57 +0100 (CET) Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 09810F800E9 for ; Tue, 10 Dec 2024 18:11:55 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 09810F800E9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=Kj09W6lA Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5d3dce16a3dso6043486a12.1 for ; Tue, 10 Dec 2024 09:11:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850655; x=1734455455; darn=alsa-project.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=XG8zYqRJnsZkhZfRr2g1CnvN6FDBTlyfj/tmdbveBiw=; b=Kj09W6lAsGIzi45IuIBHJn49HlY+eQ+/Ve7WVLG+dCS9h+n/eonHa2lWk/WmyFkGuO 0kLHIY69LT7u9/lDlXL6xctZzYXtmf05wMOM1+UmQnkGpNePUvmLrQxDZzvMZjf4FnKb HSLHR1eaMiHFMhCxl1zmZVZrOHkWW4Mykj5XYVm7SkJeNaJaBOtTduLkjf6Zt8/nwQUJ YnhMVxzS18V+6mMOQFZRxTmXLdZ5zKbKYFgp0f6ncmwBRveabplaqPXfvvrgtAAQpMlZ 2R87d4S/UIDPV9ZGLX6/sd/7+rXfEgCJX61RY921WbICxn/H6Yxj7SJdhLm7IECvSxh8 or/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850655; x=1734455455; 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=XG8zYqRJnsZkhZfRr2g1CnvN6FDBTlyfj/tmdbveBiw=; b=Be7Ey4lnSqZ4N0wn3VMAiWq3x01LsqwEfjPEi6oBBtFBoXVCDTyB5NPil8scQeX22W tO4wNCO51sHcuIzTZ3cglajlied9ZeIev4KmFgobzD9HijNLns/Is9tsTGaJ7JE49dXK S8OapYJqySthFEtAZoHhgfeBHGeE6ESwqMg5jUhsEcYEBKiUEgmzOFOxOngnOFRAhp3F A0gI0POYnxR1jIdvwWTTy9q54aRqhF2/H1rlVMBX2wtdlU+A5h1TI8gzQjqm75McdYoI LY+xLctiHt0zOG9oBUcJwZkBrOY8vByvDxuBQUH1a0bmRoc5flyBnveO1jN0Y1+Td1VB 8PNQ== X-Forwarded-Encrypted: i=1; AJvYcCUz1GRculivBDJFGhziyNuJTsv9D6KsJ35VLMVloAlcRcyRcQD9MrRb/2HK44XGTa6zZemM2f7yzYrV@alsa-project.org X-Gm-Message-State: AOJu0YyQfnh3P+KgBM73v5cn4JTqsFHT21DhlwSur6m6BijALcNIKrB/ 9Mc1OrOdT60e3Ltoy1gM/zA+hzUiMDuout6b1NawinQY97bJRzHGz8TXlnjCpTA= X-Gm-Gg: ASbGnct37v30hMaEgopsTN6/i63yzP3z7aanhdRouQs/qBQb9LOTQjEW1API6w9cccC +WW6Q9FOVxPjB72SP27ywGxJbLo2P7JQscEDqSrNDaPG/OwJqp0KYknBCtBwhA764F1EmaWLxUq KlavKSwyi6CICRuLLX/6sGAIbs8c1bno2gCYPojUoeQXhdhOeHV30JnK1APadLRPhQnjOZqX1aX HpFI0TD0PbGOyvtsZbCKreCts7vYcigmpBei9jEr94LE9jd9r6JsnSoEkolloJNAl6UKnjSaKQd YeHnqtpH X-Google-Smtp-Source: AGHT+IEgKnHNaC3IX1FEtNtvTz24/8StgSao5VAD6Ub2m7Bx+D6TJNFGkozP9JnrbZSvN4zlM3/+Ng== X-Received: by 2002:a05:6402:510a:b0:5d0:d208:4cad with SMTP id 4fb4d7f45d1cf-5d41e16362amr4621139a12.2.1733850654831; Tue, 10 Dec 2024 09:10:54 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:53 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea Subject: [PATCH v4 21/24] arm64: dts: renesas: rzg3s-smarc-som: Add versa3 clock generator node Date: Tue, 10 Dec 2024 19:09:50 +0200 Message-Id: <20241210170953.2936724-22-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: DYDSG46G2OBWRDZCUINRR7SC7K3W45WK X-Message-ID-Hash: DYDSG46G2OBWRDZCUINRR7SC7K3W45WK X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:12 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Claudiu Beznea Add versa3 clock generator node. It provides the clocks for the Ethernet PHY, PCIe, audio devices. Reviewed-by: Geert Uytterhoeven Reviewed-by: Biju Das Signed-off-by: Claudiu Beznea --- Changes in v4: - collected tags Changes in v3: - none 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 = <&pinctrl RZG2L_GPIO(8, 1) GPIO_ACTIVE_HIGH>; enable-active-high; }; + + x3_clk: x3-clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + }; }; #if SW_CONFIG3 == SW_ON @@ -152,6 +158,30 @@ &extal_clk { &i2c1 { status = "okay"; + + versa3: clock-generator@68 { + compatible = "renesas,5l35023"; + reg = <0x68>; + clocks = <&x3_clk>; + #clock-cells = <1>; + assigned-clocks = <&versa3 0>, + <&versa3 1>, + <&versa3 2>, + <&versa3 3>, + <&versa3 4>, + <&versa3 5>; + assigned-clock-rates = <24000000>, + <12288000>, + <11289600>, + <25000000>, + <100000000>, + <100000000>; + renesas,settings = [ + 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 + ]; + }; }; #if SW_CONFIG2 == SW_ON From patchwork Tue Dec 10 17:09:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903416 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B4672E7717D for ; Wed, 11 Dec 2024 11:34:17 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7260F2BEB; Wed, 11 Dec 2024 12:34:05 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7260F2BEB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916855; bh=CcnOmZ4wJdtquX3MvcxFwHJDSz8ukso3gSLgf6pWQno=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=HVj+2q9tOuj1zCYeWpzdsZAbzT4TerfQ/8BmpMMs74PsiGshMozZeGEZHlOIG4rlR gnM+bhyqrYNP8hm/5gcXZleNZcVEiyAaoMXPgoDwaRIuKcxFteAaCrXUSwk3OlW/go tAFCMIcVllDDPOl/+I2l7RT+bdeRvfyQ+WYMCOHw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 07B02F89763; Wed, 11 Dec 2024 12:28:21 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D5C5FF89766; Wed, 11 Dec 2024 12:28:21 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8CBE8F80482; Tue, 10 Dec 2024 18:11:59 +0100 (CET) Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 049F6F800E9 for ; Tue, 10 Dec 2024 18:11:57 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 049F6F800E9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=HBM3dWYT Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-5d3ecae02beso3811747a12.0 for ; Tue, 10 Dec 2024 09:11:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850657; x=1734455457; darn=alsa-project.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=qbHdnNXTXnTR3tThfeMauJ9l0Itp93/txTopWT8Ines=; b=HBM3dWYTvknrTAsq7UjItfitZKGww47PbtJyv0VO0WmXpPKXIY/mpaiD7M5QVbAUnD L1Lvf40pkfpa2DOx/8Bg66XLVhtcTmfCvZ2HuWZDNLery1xY5DPynJGWF+3d1je9u0jB mN0GZ9+GbVI0T/qAGp8a5h3TJl+yhk3I2PX/fHlqwChg0o+ug3vyQ9psV2dJCO5PEhaV PpaMAL8cJhcdNFAXtBsIgJKmHo2I6LMBF2Sry60yTgVfGHN7E+5VhbTR/96wrq+NbI7y ZeKOrzsywQtpOj1Hleh4gBE8EPmrHC+UsA4aw5glkoZOFgU8fy0RBvaldTWLNZssMuc3 C0zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850657; x=1734455457; 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=qbHdnNXTXnTR3tThfeMauJ9l0Itp93/txTopWT8Ines=; b=Do3/em5VNAwbyxH2UuRqL3CHxdZ3kPMf/JKvQUtZC2PQdTxNGYi5IJ+FM/4sNBZd8b AVv+mMoQEQNe6WueWKnGTOMnTR33vfMW62BY7FcZlh4adxyfCBfCmofz1T8uXWr8DIew UweQs6p64b6s134kxTLy+YEDw6bYMOHILF3fN3/BQ6eh83Nc0ty+LvsJXtBX+9NsmTYn 2ay9hw/0vo7FoYyOF6Fm1408mHFWB+okhhj1BW7vs6mBjszKkmgzqerpPmLUJ3/P7Pol 61BBdtFpB8XA59bznd9YIJu+rpu45Lek+rmgujWU+unmqT8qUFfIahgE9qsTv8lbfomu SWdg== X-Forwarded-Encrypted: i=1; AJvYcCX8g5baMYczlTFBJN6fG6dmfQepC+lkCoS6P3TtQoaN0dtN4/JVe440j1lpwIG/FKV18CiJmnuuCX6Y@alsa-project.org X-Gm-Message-State: AOJu0Yz0l+1gm4tzXya3g6437eJ0JDAWq5e6XIeeDcZ92Z/tEwq1FSQf ldR3Mr2d8ih4XEQ/AUOXqGrRYc0oohZ+l9DioGtI6MQkte+2j+gRk4AmPhFuOs0= X-Gm-Gg: ASbGncsVZJ10UwbkOZCdCcCZBH8wCRcQQtuw3eNQUinrcJZqqiPbaIH7KKOkWrhJwdG ONlQ6UZLuKkH3GpauqqVIJp9G9lEhmoIu8IF9I6+TseWztWAlaOmUI/bAP1k4fmdSn9uVVns1BF KnaYJ1x6qyp73kEvGk9YnXxPrRZ7fXBMw7ghtWNS0dtPHcxhgUcmFrGkyuApSd2TzeAh7Xv0HBH VQKoNMmb71mZlcM4/pI2OoeLRaNwtdylEJWUNntk2yIAFJjX5kBWvkQWB98iliIqp+/qrrGld9F fhlqalM5qos= X-Google-Smtp-Source: AGHT+IFoRF8BSZrpYteUQ6a7MVI24wh97GfyVKWhabGoatai7X1+0ZapR3mbMn4ogZwncEoqa1pzEQ== X-Received: by 2002:a05:6402:3705:b0:5d0:d183:cc05 with SMTP id 4fb4d7f45d1cf-5d3be66d0b6mr16199052a12.5.1733850657163; Tue, 10 Dec 2024 09:10:57 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:56 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea Subject: [PATCH v4 22/24] arm64: dts: renesas: Add da7212 audio codec node Date: Tue, 10 Dec 2024 19:09:51 +0200 Message-Id: <20241210170953.2936724-23-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: UOMN5XEINKYHEJO5APDZJVEECW4SHQJX X-Message-ID-Hash: UOMN5XEINKYHEJO5APDZJVEECW4SHQJX X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:12 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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. Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v4: - collected tags - dropped #address-cells, #size-cells - moved #sound-dai-cells after clock names to align with the documentation example Changes in v3: - none Changes in v2: - none .../boot/dts/renesas/rzg3s-smarc-som.dtsi | 17 ++++++++++----- arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi | 21 +++++++++++++++++++ 2 files changed, 33 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; }; -#if SW_CONFIG2 == SW_ON vccq_sdhi0: regulator1 { compatible = "regulator-gpio"; regulator-name = "SDHI0 VccQ"; @@ -73,8 +72,8 @@ vccq_sdhi0: regulator1 { gpios-states = <1>; states = <3300000 1>, <1800000 0>; }; -#else - reg_1p8v: regulator1 { + + reg_1p8v: regulator2 { compatible = "regulator-fixed"; regulator-name = "fixed-1.8V"; regulator-min-microvolt = <1800000>; @@ -82,9 +81,17 @@ reg_1p8v: regulator1 { regulator-boot-on; regulator-always-on; }; -#endif - vcc_sdhi2: regulator2 { + reg_3p3v: regulator3 { + compatible = "regulator-fixed"; + regulator-name = "fixed-3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + vcc_sdhi2: regulator4 { compatible = "regulator-fixed"; regulator-name = "SDHI2 Vcc"; regulator-min-microvolt = <3300000>; diff --git a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi b/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi index ee19c4155750..899d88467d79 100644 --- a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi +++ b/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi @@ -68,6 +68,27 @@ &i2c0 { status = "okay"; clock-frequency = <1000000>; + + da7212: codec@1a { + compatible = "dlg,da7212"; + reg = <0x1a>; + + clocks = <&versa3 1>; + clock-names = "mclk"; + + #sound-dai-cells = <0>; + + dlg,micbias1-lvl = <2500>; + dlg,micbias2-lvl = <2500>; + dlg,dmic-data-sel = "lrise_rfall"; + dlg,dmic-samplephase = "between_clkedge"; + dlg,dmic-clkrate = <3000000>; + + VDDA-supply = <®_1p8v>; + VDDSP-supply = <®_3p3v>; + VDDMIC-supply = <®_3p3v>; + VDDIO-supply = <®_1p8v>; + }; }; &i2c1 { From patchwork Tue Dec 10 17:09:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903417 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5BC5BE77180 for ; Wed, 11 Dec 2024 11:34:36 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 89CAC2C38; Wed, 11 Dec 2024 12:34:24 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 89CAC2C38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916874; bh=j3EZQQ+bJ4Pgh8+9W/k4Ypg3jmTVeLSoZtZxACS5Ilw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Nts0e7INj3cyzytEfVl8TaZiJQCSRzEnkbTnYP0M8kIu9TLS1+IcjAR4z04GEHrMH 2McRTWTDCrqP66KZnrJpIO5YAnJXdH+IRpQ9WNJrO7SKnF1TmIrqqTfQg7LJ0x3rFp a63UYQcyKbK9oG9xWzucgDnoXBN6teCpFwCcBfbk= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 649B8F8061A; Wed, 11 Dec 2024 12:28:24 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 5AC48F89781; Wed, 11 Dec 2024 12:28:24 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EA403F80482; Tue, 10 Dec 2024 18:12:01 +0100 (CET) Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 13B38F800E9 for ; Tue, 10 Dec 2024 18:12:00 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 13B38F800E9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=C+dVmBtH Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-5d3f28a4fccso3468945a12.2 for ; Tue, 10 Dec 2024 09:12:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850660; x=1734455460; darn=alsa-project.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=jE6wTwaLZbTxO8+1zmhGoRQFuhziI2yndu2tr5ybLTY=; b=C+dVmBtHW+94J9xMzh2SML1kb8WCTMEcdLo1Pb1tNcTWiE72ZtojMc3S/ZQXwHgUEF anFHfeU98GsypKVZ75YT+WEkkd3ArKGvC4JfLAu+Hvcpt6gMFVcHXzWUd8vSPGz9ul2Q CeTAs0u+J172cyiDJKdZBAV97BMNclIc1OfsjScylFAH/I9nqO3QdxfvmTsA85TS6/HW 1TXYmkKJRn4nIfJXAEaYbq4Pp6COumSFT/mrWtJCy4EAY9NFCOT27UvKMikJNnCcmcGE oqqjG9qbbN5V2gg5yjF+6tsgRPwmYCNBmgg2PtodHwJJkGvAqGRT3+ABXw5GRpQ9kO+q vrXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850660; x=1734455460; 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=jE6wTwaLZbTxO8+1zmhGoRQFuhziI2yndu2tr5ybLTY=; b=ktznIpMVlZJEuqPoC1YZlS+DBXDGyqHhm9hVRF0rOmx1LLtxT7gjaeYPbCMLBSQH5n g2UhjVx+uVVRp0d9qkMZ837jXKKxONpxvkYrrA+bSuf8zVFPFPyDWNNhuhQ05INuAa6s Dgo6fjf2EqqhQ+PE3SC1JknMJ1z4FvypquNO1XoT+E7JMPOAMxf7vXR5/RJ97xWZMsru ei4C+QEzGgh9EPpb+7/uK5qT4Li/xXelHbc7KI7PZotBC/13SHPHfJXtyeQQsvd8hFfv mXcBgt136W3CTnxogK/u6AwdpebfFu5mOcgwKesZp+ClvSO8AIVggjB4GisyTC82A9R1 3F9w== X-Forwarded-Encrypted: i=1; AJvYcCVrNyPJwRpdvHuzN8ZxH9kP/YDag/mXXzouiil9Rd9krxLgZMbsK0Y5FtOc3ALXkUTZZGuieNDmdlvi@alsa-project.org X-Gm-Message-State: AOJu0Yycbi9izOsXX1p936tsKFiAAHcr6vh+3HHLkyUduLcHN4GhwCon etOCYmn2asd3wxRfidnAoUuGzFFxuJciiVzJtsIvZX2mm/+rrU2M1sJtUp+0G5o= X-Gm-Gg: ASbGncu27T3e64gx91eJVgjn2ZrvW8PUaYkG2ETqzUSLDg4OGhQQshQl7JcztqRaoAR NltDYGQ+tRh2AUOnH6gAqrkV+Uv6B/iETfFDj2hCx54KgdkSPZpl7L58bfEYg3d+PVJJv8AjcX6 f3EA78XMbzZpH1qAQNOBLLAgpCGVRPFlbQ+q+aH6jKEWPamfszGgBX/wrXEras8035bVHw4N4a4 RnhCt0R3DjWMdMs7O69ix0IvjeANcs0awrkr2VY08bOmnciy/7I6B1BGVnXBrnSKUu2Ms05iQfP +ZtpaI5j X-Google-Smtp-Source: AGHT+IFlYyo736yb9cxpJS2cGnLCOO0TpZQwWI6UbvDphomE+gSa6jZr1VtWzN9wAD+vqnofdD3cjQ== X-Received: by 2002:a05:6402:2791:b0:5d0:b925:a8a with SMTP id 4fb4d7f45d1cf-5d3be6c1598mr19946134a12.16.1733850659570; Tue, 10 Dec 2024 09:10:59 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:10:59 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea Subject: [PATCH v4 23/24] arm64: dts: renesas: rzg3s-smarc: Enable SSI3 Date: Tue, 10 Dec 2024 19:09:52 +0200 Message-Id: <20241210170953.2936724-24-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: CQO3R7QFAEMLVRNEHTU7TBL7RQNARHPG X-Message-ID-Hash: CQO3R7QFAEMLVRNEHTU7TBL7RQNARHPG X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:12 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Claudiu Beznea Enable SSI3. Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v4: - collected tags - dropped status for audio_clk2 Changes in v3: - none Changes in v2: - none arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi | 25 ++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi b/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi index 899d88467d79..1944468a2961 100644 --- a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi +++ b/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi @@ -64,6 +64,10 @@ vccq_sdhi1: regulator-vccq-sdhi1 { }; }; +&audio_clk2 { + clock-frequency = <12288000>; +}; + &i2c0 { status = "okay"; @@ -105,6 +109,11 @@ power-monitor@44 { }; &pinctrl { + audio_clock_pins: audio-clock { + pins = "AUDIO_CLK1", "AUDIO_CLK2"; + input-enable; + }; + key-1-gpio-hog { gpio-hog; gpios = ; @@ -162,6 +171,13 @@ cd { pinmux = ; /* SD1_CD */ }; }; + + ssi3_pins: ssi3 { + pinmux = , /* BCK */ + , /* RCK */ + , /* TXD */ + ; /* RXD */ + }; }; &scif0 { @@ -182,3 +198,12 @@ &sdhi1 { max-frequency = <125000000>; status = "okay"; }; + +&ssi3 { + clocks = <&cpg CPG_MOD R9A08G045_SSI3_PCLK2>, + <&cpg CPG_MOD R9A08G045_SSI3_PCLK_SFR>, + <&versa3 2>, <&audio_clk2>; + pinctrl-names = "default"; + pinctrl-0 = <&ssi3_pins>, <&audio_clock_pins>; + status = "okay"; +}; From patchwork Tue Dec 10 17:09:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13903418 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 126A7E77180 for ; Wed, 11 Dec 2024 11:34:51 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [45.14.194.44]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 365542BF7; Wed, 11 Dec 2024 12:34:39 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 365542BF7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1733916889; bh=hJDCv1TyaQlo/L0tvA82G+IiLtzZURDjCsIXt6YWZzI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Rcq+RD+RoeUUKVMbxLHIy1x6sBMehcBwkoJL4WMO6ivd4py9PQSdKxoAhTvWF88iz nhcaFxka+/nJCxHuFpslPpOCoXoy2Se8g/0Ql20Wa7gUXDG9z74SfXLEAxyF3Hz2+7 jl4aPTz6i0SZatgerDRDGi+3xs0iiHgaSXcZ14k0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 48308F897AB; Wed, 11 Dec 2024 12:28:29 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 1D385F897A8; Wed, 11 Dec 2024 12:28:29 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 49F4FF80482; Tue, 10 Dec 2024 18:12:05 +0100 (CET) Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8D23EF800E9 for ; Tue, 10 Dec 2024 18:12:03 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8D23EF800E9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=h/RpVRVo Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-5d3cf094768so6587768a12.0 for ; Tue, 10 Dec 2024 09:12:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1733850663; x=1734455463; darn=alsa-project.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=TwyXnruxyE1MIUM59wwP+urrQ2EdZ5O+ybJnem/vHTM=; b=h/RpVRVoDSDVXcydjmGiGuN+W0fkJg0fIYGtdt37Gg9b4yCXTUyvmn5JDwhPCkQ/rw ApYVXCuhvg3/d+XESv+nQ76h7+1zAWMcnJRt1kZGNK3mdoT8bT+Fj0OhUmMWbDNpCQEK XGk37nyTaKnsG/eEHI4maA1OPseXxe27AZNaW4O45e38sCNNVilWDaZ7pHhp456CumRb Vlf+S//DPwFgTxfNG0zVqLms8xgFRDw1sX+//N+G2dUE4IaBzl4qMi6mVhrXm5C76o8K FhyNvgBNKMpWyfLFn/OQop0Au7inG0CqViF+iDBGFtJD1ghlIksoUXPHZ6eV4ADy8jnp qIAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733850663; x=1734455463; 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=TwyXnruxyE1MIUM59wwP+urrQ2EdZ5O+ybJnem/vHTM=; b=Ovyp6VpM2r6vA2tnYs2fqgCIEkHWcX3I7L3jmO1CxFCNU0u+WQeA8CMNxaXB4A17bV lowXTmTK7r1k+Y6+xJcf/GWQj9VrdD0xA9rkUDELNje3xKWjqGWe2oIH2M/rwWaEUub6 /9eWox+HqVzQvVW8NAn7Hm1Et7zlmICN3JYD1RehgOHueEFliqJle4u1Bc3e+fuVh6oh yjukh2qTsakEX9txyagIIEKsz2rpSaEK/nA6efpT8CthaeK7XfzBeHbk8wa+ije+MF3q 15yh95EE+tLTmgbcB+Wv6BLS+6DSFcn0gABA/z8cNNthcJS7oLw9INF43P2+9ZgNm6OF KYnw== X-Forwarded-Encrypted: i=1; AJvYcCWxp41qgsHb6SBR6GOzPKUQHsHywekPOgRodxY1sGU3kOk9A3SQsT/Kvk54tTZfd/mGJvrwCtETKsP9@alsa-project.org X-Gm-Message-State: AOJu0Yw4v4srqZaqKc9Z+v/7kZ7Nsl2TU5LaWp5V2JfMWhki1GVe6SwZ /zFUpFBM3qIizMrU+wITUHcqo0gqx6VVjP07aoKd/nLla1Fnpvbuo1vPP8CgtqI= X-Gm-Gg: ASbGnctI63cUs2QUd+K2/yyIKAr6Y1NOQakfP0bK1joEGMJxyTPYX6TUsB8i1l8Kafm Dz8KcD3HneGuAXitDA88MivjOX1aBmgqNulMDUyyTgnqlLhpmDPeN4oyH8GPH34I7zXaPLqmDm1 hXCvKrZZyp54xKiK8MFp66U3uOjSE/uk1y1dLRNjHEELl0o/YfvEgyy7T/5rlAlwYkSzNQE3rXJ Nk88KXzWQv598+d9I/mbTesbEORSHXAyYfJqdQDXyMB1oBrq9Gwtg7kstgc2J/znfKEHOI44sKi CQi9w7X/ X-Google-Smtp-Source: AGHT+IGQNruuJ2fmbhGEBR6v4EYtbwtUlKzpp82KdDiJC4wYZhl0SU6OosybB2Txg3S5RjOBSBjG+g== X-Received: by 2002:a05:6402:3490:b0:5d0:d5af:d417 with SMTP id 4fb4d7f45d1cf-5d418502c64mr5890914a12.1.1733850662767; Tue, 10 Dec 2024 09:11:02 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3e7936581sm4853124a12.56.2024.12.10.09.10.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 09:11:01 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, magnus.damm@gmail.com, perex@perex.cz, tiwai@suse.com, p.zabel@pengutronix.de, biju.das.jz@bp.renesas.com Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Claudiu Beznea Subject: [PATCH v4 24/24] arm64: dts: renesas: rzg3s-smarc: Add sound card Date: Tue, 10 Dec 2024 19:09:53 +0200 Message-Id: <20241210170953.2936724-25-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> References: <20241210170953.2936724-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-MailFrom: claudiu.beznea@tuxon.dev X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: PN6FP4ZANWT5R3JQ42N5AJLPTI7JXSJW X-Message-ID-Hash: PN6FP4ZANWT5R3JQ42N5AJLPTI7JXSJW X-Mailman-Approved-At: Wed, 11 Dec 2024 11:27:12 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Claudiu Beznea Add sound card with SSI3 as CPU DAI and DA7212 as codec DAI. Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v4: - collected tags Changes in v3: - none 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 1944468a2961..5329f3461990 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 { }; }; + snd_rzg3s: sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,bitclock-master = <&cpu_dai>; + simple-audio-card,frame-master = <&cpu_dai>; + simple-audio-card,mclk-fs = <256>; + + cpu_dai: simple-audio-card,cpu { + sound-dai = <&ssi3>; + }; + + codec_dai: simple-audio-card,codec { + sound-dai = <&da7212>; + clocks = <&versa3 1>; + }; + }; + vcc_sdhi1: regulator-vcc-sdhi1 { compatible = "regulator-fixed"; regulator-name = "SDHI1 Vcc";