From patchwork Mon Nov 13 22:18:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13454494 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E3EC2E626; Mon, 13 Nov 2023 22:20:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="NDuqezJ3"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="hLyoiPN7" Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [IPv6:2001:67c:2050:0:465::201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6800D10C; Mon, 13 Nov 2023 14:20:16 -0800 (PST) Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4STkQ32QQ1z9sW2; Mon, 13 Nov 2023 23:20:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1699914011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=fQv89aV+4ByK+wlmAgbHMFA8qk3Yc+TtNwQpfJj2H4M=; b=NDuqezJ37fA1/mXtLkuJrKae5GgwCpVLstdfRVaXgmscq20gfoHSw0iRw+x8Ndla/xmAMH hwXSAPITQq9cZWBJIF59adABv/gcmdCH0oZLkj816kiPk5ui7CBkTKc+Lu86VPz/BmO5TX YURai94PeTJLaiTRUCT4hkYG/KO/q4tWQs0wR+XkOcJ8N9SLAIXkXWT1WxObAFAritIQ9E 5nzIDV3svs1iJCtiqS/LAdehriJT4/KdzZmW5x8tgN+flNgwMMpudaBc8s4Dhk6327Tora kfHzRf6loquyzoYXBrtmq906+6d48VY5K1+SFCA9qevYRtGaglcilHkFNOiX9Q== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1699914009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=fQv89aV+4ByK+wlmAgbHMFA8qk3Yc+TtNwQpfJj2H4M=; b=hLyoiPN7E/yNP6/F2Yw//DNhUqF9Uct8ME5d9RE9gIojenoSj9a6KvUrvyb2M03d5pqwXy 4EnZuYwZWfYTkq94Piodd+Ec6Fqua3LoiZGTLlkD9aBsU8mYAc+nubS8IzS4/PycC2QsZO MoCpMzI22hFYI3VlL6bOuqZMVcvHyZ8kkBLDGs5UMkkqO2pY4ers/rq0sPtTbyjUCDp6+j lAOL6WcOGQOXmFQWSSMy91/N02jibUrGw1k5AgeMe58flQt7Y5X0xRi1V2M8TPbhoYW0XQ 4mByO0FeVe8vJzy6xmsxraC/YAzrUkMt3fmk2oyLdLfzNkyiDpfE8vMHvd/L/w== To: linux-clk@vger.kernel.org Cc: Marek Vasut , Alexander Stein , Conor Dooley , Conor Dooley , Geert Uytterhoeven , Krzysztof Kozlowski , Michael Turquette , Rob Herring , Stephen Boyd , devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH v3 1/4] dt-bindings: clk: rs9: Add 9FGV0841 Date: Mon, 13 Nov 2023 23:18:51 +0100 Message-ID: <20231113221949.111964-1-marek.vasut+renesas@mailbox.org> Precedence: bulk X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MBO-RS-ID: 30fe3d2de739b463a51 X-MBO-RS-META: nr7cwmi15zdoqhwf6tbza5pmh4fpxm7z X-Rspamd-Queue-Id: 4STkQ32QQ1z9sW2 This is an 8-channel variant of 9FGV series. Acked-by: Alexander Stein Acked-by: Conor Dooley Signed-off-by: Marek Vasut --- Cc: Alexander Stein Cc: Conor Dooley Cc: Geert Uytterhoeven Cc: Krzysztof Kozlowski Cc: Michael Turquette Cc: Rob Herring Cc: Stephen Boyd Cc: devicetree@vger.kernel.org Cc: linux-clk@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org --- V2: Add AB from Alexander and Conor V3: No change --- .../devicetree/bindings/clock/renesas,9series.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/renesas,9series.yaml b/Documentation/devicetree/bindings/clock/renesas,9series.yaml index 3afdebdb52ad..af6319697b1c 100644 --- a/Documentation/devicetree/bindings/clock/renesas,9series.yaml +++ b/Documentation/devicetree/bindings/clock/renesas,9series.yaml @@ -21,6 +21,15 @@ description: | 1 -- DIF1 2 -- DIF2 3 -- DIF3 + - 9FGV0841: + 0 -- DIF0 + 1 -- DIF1 + 2 -- DIF2 + 3 -- DIF3 + 4 -- DIF4 + 5 -- DIF5 + 6 -- DIF6 + 7 -- DIF7 maintainers: - Marek Vasut @@ -30,6 +39,7 @@ properties: enum: - renesas,9fgv0241 - renesas,9fgv0441 + - renesas,9fgv0841 reg: description: I2C device address From patchwork Mon Nov 13 22:18:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13454495 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E3B72E625; Mon, 13 Nov 2023 22:20:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="gSMf+XDW"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="t4uax94n" Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [IPv6:2001:67c:2050:0:465::201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CB56D50; Mon, 13 Nov 2023 14:20:16 -0800 (PST) Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4STkQ53MLbz9slX; Mon, 13 Nov 2023 23:20:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1699914013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G9dXAJy2AM725pB/pqmXYw+L/buu1cyuwhewSi6ID4Q=; b=gSMf+XDW/wgmZZMwy+bwAQVdndvosAM5bMoDrjOP2SLSkYCJHJd5sD3Q/gAlYv9YyQGnrr 53YTHCpQWgpycXV387gOy4uWz90/tE1w4OO5pf3wMcP5QfooINMrHCAEE7w4q6hExlOnPk V4ma7v7Ly4dvzhOl3m1alY0UFZ/BcnsDfzoLm028AYa7YdOSdQcs5HcHLZHaCVTsNFN0+C A/ucJUFN1GWAy/zJ1weiJ1OH1t44rhiibfEhgvtdGoHN+Rm42lS7/BfSEgc3PReHRp3wRx SFTQNMAdYDusq/+RriiyfTf8pRumXUOfeiJL/cS/DOT9Z4eoZ1mAqh4WwoXnRA== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1699914011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G9dXAJy2AM725pB/pqmXYw+L/buu1cyuwhewSi6ID4Q=; b=t4uax94nkxmrO1csSud2TThYpQ3mXNGZDeA2y/g2gE0o0qFTLbVioHwHZ8EeP8tVh1wpo3 htQPZ+f+4qbrW4qEztun+OOoaBLrCJt5a+pVDjHBO5OReeSUdm/Bpc4RWD4FYPPsbQ7ugV glgRDvW3fGC6IVGNhtEdGCJZgTm2vHX3sSHpSXwZ3wmMiWcAVPR2Sc+xppZmTF4t+V/9Tu YnR0RGv0cUVypWSvEsOd69NDJkDoaN7G+xXh373d7QHnbU+SVr3pxOWZjIdpTh6Ubsk4Tv J7EvcvG1tOnxkmH9yDg0PDWmP79Mb97kHGo6ZBjdErW4/+1rDh+jStODmbs6ng== To: linux-clk@vger.kernel.org Cc: Marek Vasut , Biju Das , Alexander Stein , Conor Dooley , Geert Uytterhoeven , Krzysztof Kozlowski , Michael Turquette , Rob Herring , Stephen Boyd , devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH v3 2/4] clk: rs9: Limit check to vendor ID in VID register Date: Mon, 13 Nov 2023 23:18:52 +0100 Message-ID: <20231113221949.111964-2-marek.vasut+renesas@mailbox.org> In-Reply-To: <20231113221949.111964-1-marek.vasut+renesas@mailbox.org> References: <20231113221949.111964-1-marek.vasut+renesas@mailbox.org> Precedence: bulk X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MBO-RS-META: ztfkpc8p8an7t7zsowe8s15wcfyjeum8 X-MBO-RS-ID: e747309860f3f3bb344 X-Rspamd-Queue-Id: 4STkQ53MLbz9slX Extract only vendor ID from VID register, the top 4 bits are revision ID which are not useful for the vendor ID check. Reviewed-by: Biju Das Signed-off-by: Marek Vasut --- Cc: Alexander Stein Cc: Conor Dooley Cc: Geert Uytterhoeven Cc: Krzysztof Kozlowski Cc: Michael Turquette Cc: Rob Herring Cc: Stephen Boyd Cc: devicetree@vger.kernel.org Cc: linux-clk@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org --- V2: Split off patch from 4/4 V3: Add RB from Biju --- drivers/clk/clk-renesas-pcie.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/clk/clk-renesas-pcie.c b/drivers/clk/clk-renesas-pcie.c index 6606aba253c5..b5c430e4899c 100644 --- a/drivers/clk/clk-renesas-pcie.c +++ b/drivers/clk/clk-renesas-pcie.c @@ -42,6 +42,7 @@ #define RS9_REG_DID 0x6 #define RS9_REG_BCP 0x7 +#define RS9_REG_VID_MASK GENMASK(3, 0) #define RS9_REG_VID_IDT 0x01 #define RS9_REG_DID_TYPE_FGV (0x0 << RS9_REG_DID_TYPE_SHIFT) @@ -333,6 +334,7 @@ static int rs9_probe(struct i2c_client *client) if (ret < 0) return ret; + vid &= RS9_REG_VID_MASK; if (vid != RS9_REG_VID_IDT || did != rs9->chip_info->did) return dev_err_probe(&client->dev, -ENODEV, "Incorrect VID/DID: %#02x, %#02x. Expected %#02x, %#02x\n", From patchwork Mon Nov 13 22:18:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13454496 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A0F52E62F; Mon, 13 Nov 2023 22:20:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="qamiiVZ3"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="T6Banqz+" Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20D80D51; Mon, 13 Nov 2023 14:20:17 -0800 (PST) Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4STkQ7368bz9sQm; Mon, 13 Nov 2023 23:20:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1699914015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dDJd7CBpDDwtdZoLDWV057mrZmwfQaR3lxbfo4GP/AA=; b=qamiiVZ3Emyi6Zud41Z6QP5rcHZHbp1lNF7V+paw233iyYKaJAe+Jsi6Rp1QIfRm2cazBq QufTlgOrXuL/OC7s06auRckjawb31Cai45tpQJ2frdAeknhg3izONN3GZUawhMCcfhT+FI kEK0h2QfeRAXSwa3bvfA6P+eUber5ghN3LvRCQdv7qPNUHjXs8jQiGKCOVZKkyqmBh6aO4 LnZH1997KfcFMv8b5QBr1+LH9C5XWnVkG2Gl9mD5AuoldSlQJ4fzWY1YGzPmG/UD/RKbmB zrK5km1xflPhUnMMF7YBUiUCS7TqVIpLCCT4AStghSMm2gC8hzwyV5w7SnU84g== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1699914013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dDJd7CBpDDwtdZoLDWV057mrZmwfQaR3lxbfo4GP/AA=; b=T6Banqz+lSL74bxilbK/ICy073LeuqT3XeAeqDOtt/SRxBYJTFfPUXzWhBi00BWeO5FG0E NJcXEUkfLow93cHpQh9F/Ntp5pqFJY43fjzOIjbJenoSbiYXuSohd0RUmJohjwGz4pYYTu TFpe8xYIgePdv1fe9Kr75UtwkNtQbSU2868JofP3/ZRO5d1A80hcqpUVmFPeuBSI3MoEzW 4cIPkbHl9IbS8rEpdhhBdPv3A12sD0P1auG/C5E1atI9vW7Rd9U01jTAQL2MRh/9Fj42Bo 64nuhytMKr+zQcSO1MFE3Nh8lMM7jTazv/JO6xygcHigAc/dbN9H4UwM2APwzg== To: linux-clk@vger.kernel.org Cc: Marek Vasut , Alexander Stein , Conor Dooley , Geert Uytterhoeven , Krzysztof Kozlowski , Michael Turquette , Rob Herring , Stephen Boyd , devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH v3 3/4] clk: rs9: Replace model check with bitshift from chip data Date: Mon, 13 Nov 2023 23:18:53 +0100 Message-ID: <20231113221949.111964-3-marek.vasut+renesas@mailbox.org> In-Reply-To: <20231113221949.111964-1-marek.vasut+renesas@mailbox.org> References: <20231113221949.111964-1-marek.vasut+renesas@mailbox.org> Precedence: bulk X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MBO-RS-META: uyrr57fjswkdbg7gogkhzmk7usibycnq X-MBO-RS-ID: a62cc8900b33ada1d05 X-Rspamd-Queue-Id: 4STkQ7368bz9sQm Adjust rs9_calc_dif() to special-case the 9FGV0241 where DIFx bits start at 1, encode this shift into chip data and drop the model check entirely. Signed-off-by: Marek Vasut --- Cc: Alexander Stein Cc: Conor Dooley Cc: Geert Uytterhoeven Cc: Krzysztof Kozlowski Cc: Michael Turquette Cc: Rob Herring Cc: Stephen Boyd Cc: devicetree@vger.kernel.org Cc: linux-clk@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org --- V2: New patch V3: Drop enum rs9_model --- drivers/clk/clk-renesas-pcie.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/drivers/clk/clk-renesas-pcie.c b/drivers/clk/clk-renesas-pcie.c index b5c430e4899c..e86c2911ceb4 100644 --- a/drivers/clk/clk-renesas-pcie.c +++ b/drivers/clk/clk-renesas-pcie.c @@ -50,16 +50,10 @@ #define RS9_REG_DID_TYPE_DMV (0x2 << RS9_REG_DID_TYPE_SHIFT) #define RS9_REG_DID_TYPE_SHIFT 0x6 -/* Supported Renesas 9-series models. */ -enum rs9_model { - RENESAS_9FGV0241, - RENESAS_9FGV0441, -}; - /* Structure to describe features of a particular 9-series model */ struct rs9_chip_info { - const enum rs9_model model; unsigned int num_clks; + u8 outshift; u8 did; }; @@ -161,14 +155,12 @@ static const struct regmap_config rs9_regmap_config = { static u8 rs9_calc_dif(const struct rs9_driver_data *rs9, int idx) { - enum rs9_model model = rs9->chip_info->model; - - if (model == RENESAS_9FGV0241) - return BIT(idx + 1); - else if (model == RENESAS_9FGV0441) - return BIT(idx); - - return 0; + /* + * On 9FGV0241, the DIF OE0 is BIT(1) and DIF OE(1) is BIT(2), + * on 9FGV0441 and 9FGV0841 the DIF OE0 is BIT(0) and so on. + * Increment the index in the 9FGV0241 special case here. + */ + return BIT(idx + rs9->chip_info->outshift); } static int rs9_get_output_config(struct rs9_driver_data *rs9, int idx) @@ -382,14 +374,14 @@ static int __maybe_unused rs9_resume(struct device *dev) } static const struct rs9_chip_info renesas_9fgv0241_info = { - .model = RENESAS_9FGV0241, .num_clks = 2, + .outshift = 1, .did = RS9_REG_DID_TYPE_FGV | 0x02, }; static const struct rs9_chip_info renesas_9fgv0441_info = { - .model = RENESAS_9FGV0441, .num_clks = 4, + .outshift = 0, .did = RS9_REG_DID_TYPE_FGV | 0x04, }; From patchwork Mon Nov 13 22:18:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13454497 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 573E730FA9; Mon, 13 Nov 2023 22:20:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="ZjWZs81l"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="DleaP8z/" Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E06F2D57; Mon, 13 Nov 2023 14:20:18 -0800 (PST) Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4STkQ92LxWz9smv; Mon, 13 Nov 2023 23:20:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1699914017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WcMuJA8F8tu8bD8DWsZ8RKrQ4aWARHioWYcOLvOY+eA=; b=ZjWZs81l3G4qEVP1AS9eWj01WzOM9ASpMJahr338o9rdqWuhnT0OuPaneELVx0VF03/gG2 ZjbEpkLDTob3/bmJOpiyKUu6flumVKVJ9I+I/GhInfa2014ckKhkmskNDrwUj8hQ9LNwuO k+xZ5F17RgQ6wjxepDeDA3o85Pi+BMPtIE7x5jm9wW2NPsqWW/bN12Tp7ttY7KeE1qX20a 3s1jegn+0wSfvN+ldeV143tghpPL+2bIJifLhwT0RYHFuAQISDAmGTKtNLJnm3qmmkGm/P uTt8ImItaobksRu4fYzo6a0260nndj6v/7HbIUKsXuw1AovfxD3WmfSR7MA9VQ== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1699914015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WcMuJA8F8tu8bD8DWsZ8RKrQ4aWARHioWYcOLvOY+eA=; b=DleaP8z/xbTgC5kuFn1hsYqOs3yyLC0uS1ZMjCdJ7Z2gL6TTICyVALUGNttxD32mPGnEf0 C3W66PRJ1yfSu6rOnqtAZFDB6untImQGz5ILG7XMiK+hQuooXfF3BeHXYU4oe2O6iuNuUx UDsv9Qgh3tl5JRZIz+mjkOyb81pdg+dL3QWLwwTN7gd/9LKyVcLFOTsLlF6UlB6SA7Bkcc NHoDUOGiI8I8aKpdb3ZLEMFgK9REgJZB1e7IbqLQ7eTiYnN/1STyRQmCYtvqsTYhe7Ioty 7pQmAeWcWhnpj9cvqBEij+JbyfnnlsIEq0LKDGj4pNnPeqseyc/L8pkqNQGWuw== To: linux-clk@vger.kernel.org Cc: Marek Vasut , Biju Das , Alexander Stein , Conor Dooley , Geert Uytterhoeven , Krzysztof Kozlowski , Michael Turquette , Rob Herring , Stephen Boyd , devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH v3 4/4] clk: rs9: Add support for 9FGV0841 Date: Mon, 13 Nov 2023 23:18:54 +0100 Message-ID: <20231113221949.111964-4-marek.vasut+renesas@mailbox.org> In-Reply-To: <20231113221949.111964-1-marek.vasut+renesas@mailbox.org> References: <20231113221949.111964-1-marek.vasut+renesas@mailbox.org> Precedence: bulk X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MBO-RS-ID: 8045b967857f787219b X-MBO-RS-META: 4p3edruhxtgqnhnk5g96usirfzcijczb X-Rspamd-Queue-Id: 4STkQ92LxWz9smv This model is similar to 9FGV0441, the DIFx bits start at bit 0 again, except this chip has 8 outputs. Reviewed-by: Biju Das Signed-off-by: Marek Vasut --- Cc: Alexander Stein Cc: Conor Dooley Cc: Geert Uytterhoeven Cc: Krzysztof Kozlowski Cc: Michael Turquette Cc: Rob Herring Cc: Stephen Boyd Cc: devicetree@vger.kernel.org Cc: linux-clk@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org --- V2: Update on top of 2/4 and 3/4 V3: - Update on top of 3/4 - Add RB from Biju --- drivers/clk/clk-renesas-pcie.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/clk/clk-renesas-pcie.c b/drivers/clk/clk-renesas-pcie.c index e86c2911ceb4..53e21ac302e6 100644 --- a/drivers/clk/clk-renesas-pcie.c +++ b/drivers/clk/clk-renesas-pcie.c @@ -7,6 +7,7 @@ * Currently supported: * - 9FGV0241 * - 9FGV0441 + * - 9FGV0841 * * Copyright (C) 2022 Marek Vasut */ @@ -385,9 +386,16 @@ static const struct rs9_chip_info renesas_9fgv0441_info = { .did = RS9_REG_DID_TYPE_FGV | 0x04, }; +static const struct rs9_chip_info renesas_9fgv0841_info = { + .num_clks = 8, + .outshift = 0, + .did = RS9_REG_DID_TYPE_FGV | 0x08, +}; + static const struct i2c_device_id rs9_id[] = { { "9fgv0241", .driver_data = (kernel_ulong_t)&renesas_9fgv0241_info }, { "9fgv0441", .driver_data = (kernel_ulong_t)&renesas_9fgv0441_info }, + { "9fgv0841", .driver_data = (kernel_ulong_t)&renesas_9fgv0841_info }, { } }; MODULE_DEVICE_TABLE(i2c, rs9_id); @@ -395,6 +403,7 @@ MODULE_DEVICE_TABLE(i2c, rs9_id); static const struct of_device_id clk_rs9_of_match[] = { { .compatible = "renesas,9fgv0241", .data = &renesas_9fgv0241_info }, { .compatible = "renesas,9fgv0441", .data = &renesas_9fgv0441_info }, + { .compatible = "renesas,9fgv0841", .data = &renesas_9fgv0841_info }, { } }; MODULE_DEVICE_TABLE(of, clk_rs9_of_match);