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: 849323 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: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: 849322 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: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: 849321 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: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: 849320 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: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: 849319 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: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: 849318 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: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: 849317 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: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: 849316 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: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: 849315 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: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: 849314 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: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: 849313 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: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: 849312 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"; +};