From patchwork Sat Nov 11 16:06:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13453133 X-Patchwork-Delegate: geert@linux-m68k.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77D87C4332F for ; Sat, 11 Nov 2023 16:08:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231295AbjKKQIc (ORCPT ); Sat, 11 Nov 2023 11:08:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229797AbjKKQIc (ORCPT ); Sat, 11 Nov 2023 11:08:32 -0500 Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91D183A8D; Sat, 11 Nov 2023 08:08:28 -0800 (PST) Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (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 4SSLG13vSkz9sl1; Sat, 11 Nov 2023 17:08:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1699718905; 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=THFzGgVQc4ntN9P7VC/aZKmxHiRSLWP038efWlg/W8s=; b=v2N6u4WjsWxb+yxEViiAqRNmSJUDI0z5QDtbanChomCNYY6rRGEkRW7zwvSTeeewWh1wsf oGZoyRIJ4zzuhrAmCULe7et/nyUNrb9tdr2pdTwUcnZ1l6kSQAZUYDSBnzC15rljXfCTz8 GY3atyyeDSOydXdar9DBUlG/cq8PvmVm23XOkxmU6I4WHPYOF4FfvieiftGXrVoQXlmD2t 9cSu92XSotx0NGHpjTXB4a8hESOfeWHkohnk6j3Sl532mpfcr2XkAzBP/t/aeEPfM7cfug 2QcubxZ35gSCUVjfZVOw+0BDhpJyK8eNBFu74YEDc/WnnJI8cDW4yLwJBWml8w== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1699718903; 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=THFzGgVQc4ntN9P7VC/aZKmxHiRSLWP038efWlg/W8s=; b=eARE8DLi/T6veLpspYaRKmvMRxSwvyY858xYgiRjOO75s14bAbR3Bt+inz93QhsoFEFxdm u30/BgHMtENh71T6zI/NDFYvE0gEf0XbLpbdiEXVU7B47XtMa+L6F0jni2o1wy2KG9a0oV Ye5V+TvhgTuQ6O37Z+6UxuQAbGpIzpibcozrkE46/i18ufiKqs3G4Yp4TQw0YKN5kiKqJ8 q3n1/LuNH4ln5LYOrBl1xA9er+UVn8w6UowAkf2nJXIEliBXd7WLLuUf8S1aF+2q4hiwM3 pe6MNf+2QUXzXlDFEUc0QV3TwZRMWbufPpt4PZaiX46i+BP9fKQTWSXmadRLmg== 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 v2 1/4] dt-bindings: clk: rs9: Add 9FGV0841 Date: Sat, 11 Nov 2023 17:06:59 +0100 Message-ID: <20231111160806.32954-1-marek.vasut+renesas@mailbox.org> MIME-Version: 1.0 X-MBO-RS-ID: 3d233b5fff2168a1c82 X-MBO-RS-META: xkah6ukywhykd831kcn4qk9z4kemaddy Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org 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 --- .../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 Sat Nov 11 16:07:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13453134 X-Patchwork-Delegate: geert@linux-m68k.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDBADC4167B for ; Sat, 11 Nov 2023 16:08:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229797AbjKKQId (ORCPT ); Sat, 11 Nov 2023 11:08:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231286AbjKKQIc (ORCPT ); Sat, 11 Nov 2023 11:08:32 -0500 Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 944313A8E; Sat, 11 Nov 2023 08:08:28 -0800 (PST) Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (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 4SSLG30dTkz9skh; Sat, 11 Nov 2023 17:08:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1699718907; 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=piYYf1dl2LfAa99R19jkampDYxFa2ddx0cCMItdWC6o=; b=uOdxAfIIOog1dbNUSzK/+g3nzq8bO5hIlLXKG/LgLEGH/xFIlsmuhtnERCwE1DC6Yc6gt2 oSMPb9gemt6x3U9kbMXPn1uXVNqYMDRWIMMTE8y92vVVvxTPjmrL9Mm4SSgAnq5gtHWzDw 4FgMga/NtFwNCjRtcVYUqkbZxD7lr+CKgfha0XgiBEtX6TE4P8mxevi1kjS8b6Cy0V2+qI wIyOxFtnHlQDZ7p5xX3HgVkpH13EeBxuHxKXF4rk414udrTzMux1ZDlNXH89+g4hbkKByN 9mLKIw3QMmuC2QLUNtrXdYjHe2EnDEMA7vPk1VubCYykajwdazO2jr+yy91WDA== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1699718905; 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=piYYf1dl2LfAa99R19jkampDYxFa2ddx0cCMItdWC6o=; b=GvRa6zxVuPsANS7PI+nYSf9tonxhqWkuAXghCudME1Qig19FDlupxaOhskP+fL+yyAaxKE UHnyZgviHpoGLPVqsq7AcbGSESfssTKWanxiBaVVMAE37nuseQEaMsv5ethM72lhrFKCoA Ak6bpHzkXtbxnHrXBHMKuppBDui1+ls9StRNnxaQRDZAf9CYoZ7Pgv68YBXnHv02l6CII0 CLnpw6rNni16QTnkIcySjYu8X4vsb9sOemiD7wti91bjhcXKGZuOREV0vWlEpp4kqAvccr EZndnIrf7svSv1k492WG8F065y7QrToyO3KYdwuUA1Yp3MioFyrBZPSSRKzu/A== 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 v2 2/4] clk: rs9: Limit check to vendor ID in VID register Date: Sat, 11 Nov 2023 17:07:00 +0100 Message-ID: <20231111160806.32954-2-marek.vasut+renesas@mailbox.org> In-Reply-To: <20231111160806.32954-1-marek.vasut+renesas@mailbox.org> References: <20231111160806.32954-1-marek.vasut+renesas@mailbox.org> MIME-Version: 1.0 X-MBO-RS-ID: e1789c2d3a99e5ffaad X-MBO-RS-META: ptxy7amyox6nbgb4ioeeqb3txp7ibw6s Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Extract only vendor ID from VID register, the top 4 bits are revision ID which are not useful for the vendor ID check. Signed-off-by: Marek Vasut Reviewed-by: Biju Das --- 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 --- 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 Sat Nov 11 16:07:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13453135 X-Patchwork-Delegate: geert@linux-m68k.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45EC9C4167D for ; Sat, 11 Nov 2023 16:08:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231296AbjKKQIe (ORCPT ); Sat, 11 Nov 2023 11:08:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231286AbjKKQIe (ORCPT ); Sat, 11 Nov 2023 11:08:34 -0500 Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C6543A9B; Sat, 11 Nov 2023 08:08:30 -0800 (PST) Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (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 4SSLG444Q0z9sgw; Sat, 11 Nov 2023 17:08:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1699718908; 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=wGeUWANFg2PrwdqglwpH1vKWTach+nB0+HajbevIFAw=; b=rS9mTcI0Cd/7Zk8DMua1e1mlTFcddMYpv7lWoSnwHgXTHhxGs5Ik3txV5AxnaGk/wesu8u 0Dlpebk0E4sgrAEzCvGwto4P7/xy+mgfv+QN1V5q43DsEkkTnmKfcI8m5BvdWKr+SpEcSB MVdZqo9xJvJqdU69Tdl02/MgqZW5taW04o0+lN6ua4EJs58Ua290PzWzZr61i/hQNTDIs2 nCqlTuEfOMFYja9tmRnAVuFPtHETQIdnVEquY1J4tN6JMsqlV9gTpXeATXy/zOYbRwMq3u 5ZPWmKd7De3+CiKaOEiuz5gcLPtMwsoDRQlwAgrti3VApY5LD64C7VfoS/LWBg== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1699718906; 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=wGeUWANFg2PrwdqglwpH1vKWTach+nB0+HajbevIFAw=; b=GhfiuGlaBHsN785lkLWbw3Mul7IAYRvmGGUd+EgXp9+wSD5RCRd9rogCy1VuYxchV/VO6L HITiTTaQhe3JeAMZ2SPrpYO2uDNjCaySu8R0pCc9uQfy3RlkDn0+NAY1+oAhh78GLp59b3 cOCNer9KDHYZxJmgr9BiPeiCo9rL3k3k9dp/VFKPJxk1bKtsiAM1Mg9tcHLvzV2xA+i7Wi pyj8vlkJ8DAX0l1Cgk2LFd0pnQg2uk/E7vdGZzndV/zCF3FgderUlXhQ3LZuzpxaDt4PYP vo41dOLVGaC7/XLE03G7jfewmlqH7DaHvh5mkxav6GC1ow+N/CPoF19QvFomAQ== 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 v2 3/4] clk: rs9: Replace model check with bitshift from chip data Date: Sat, 11 Nov 2023 17:07:01 +0100 Message-ID: <20231111160806.32954-3-marek.vasut+renesas@mailbox.org> In-Reply-To: <20231111160806.32954-1-marek.vasut+renesas@mailbox.org> References: <20231111160806.32954-1-marek.vasut+renesas@mailbox.org> MIME-Version: 1.0 X-MBO-RS-META: 8k1r5crkrw5yna5am7bhr81xonb5aii1 X-MBO-RS-ID: e556039b5d406acdb65 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org 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 Reviewed-by: Biju Das --- 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 --- drivers/clk/clk-renesas-pcie.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/clk/clk-renesas-pcie.c b/drivers/clk/clk-renesas-pcie.c index b5c430e4899c..5064016afbc3 100644 --- a/drivers/clk/clk-renesas-pcie.c +++ b/drivers/clk/clk-renesas-pcie.c @@ -58,8 +58,8 @@ enum rs9_model { /* 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 +161,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 +380,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 Sat Nov 11 16:07:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13453136 X-Patchwork-Delegate: geert@linux-m68k.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AFFFC4332F for ; Sat, 11 Nov 2023 16:08:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231298AbjKKQIg (ORCPT ); Sat, 11 Nov 2023 11:08:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231286AbjKKQIf (ORCPT ); Sat, 11 Nov 2023 11:08:35 -0500 Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CEC33A81; Sat, 11 Nov 2023 08:08:31 -0800 (PST) Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (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 4SSLG56ysjz9ssZ; Sat, 11 Nov 2023 17:08:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1699718910; 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=8YDiSCEhtqmiRnxCY7iMO5iFXIi0t3xSAQ0Qcz9bM4I=; b=uO0JlitUFM5QUGSSqfhaTiSxLl5owztG5rjVpxLQ9C+lEDlueQV0FXBZVZZBCt7HZxJVzW k+n/A7k+AcEu2K3PL69KpjfXB6/TrVRSyqVLRHU7A94Edx2puAFv22uRZQmmsV/LNHI1TT 5+ZcwJcuu/HO7BfjOaAqJMA6Zdl2CSc9AKWYAG8cVgoxNzHTdnq3wjEXPqx0YT9Gh0Ag4M 0j86K2oJGrA0IXP8DH2FBmvhgDbBxv1ICYmi7Vy+MToT1ZAvdaQTXasl4gscopD1oNdHNw Y1W+ZenCY/sAIyj41QzyOP2LGH8O+ZzgaMpVeKmH0G5GuJ5rIaeALlp0q8w1lQ== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1699718908; 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=8YDiSCEhtqmiRnxCY7iMO5iFXIi0t3xSAQ0Qcz9bM4I=; b=gW2rU8BfGtnQ0ukxNTh7mtYyi7LDVWIrw2VovSVwwRHVw2VTPh8I/igvY5YSU8GX2kyduQ R1c52ZwItwdQ4ui7EcbKxgJ/6UD/ygB/qg2jIMH+0A+6YEh4JjGOeSgx6r3BiU5wTcsrBR 0nDEkxzAYYSVCZyq0iX13pjG78zgYUU2ptkpf79g3pcjOe6MZEA8EkHKFMvL8RiV+98Vlg 9C4Uli1W1BYG0eroCMhx0LdLUFGT/mM+PRcys0YMlUlQgUgTruTGpT3BtCqCgA2TtuvOUf hXvfNi+Yd7znMrb1LmMFJDwtclQUK9Om/6Rg9WEv1bPBPe6iuGpl+kMYzptt/g== 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 v2 4/4] clk: rs9: Add support for 9FGV0841 Date: Sat, 11 Nov 2023 17:07:02 +0100 Message-ID: <20231111160806.32954-4-marek.vasut+renesas@mailbox.org> In-Reply-To: <20231111160806.32954-1-marek.vasut+renesas@mailbox.org> References: <20231111160806.32954-1-marek.vasut+renesas@mailbox.org> MIME-Version: 1.0 X-MBO-RS-ID: f3e480226b32c0e919c X-MBO-RS-META: as1prqd7ng9anjk5s3b79rqy47ytnysn X-Rspamd-Queue-Id: 4SSLG56ysjz9ssZ Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org This model is similar to 9FGV0441, the DIFx bits start at bit 0 again, except this chip has 8 outputs. Signed-off-by: Marek Vasut Reviewed-by: Biju Das --- 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 --- drivers/clk/clk-renesas-pcie.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/clk/clk-renesas-pcie.c b/drivers/clk/clk-renesas-pcie.c index 5064016afbc3..6d494e5f8fa7 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 */ @@ -54,6 +55,7 @@ enum rs9_model { RENESAS_9FGV0241, RENESAS_9FGV0441, + RENESAS_9FGV0841, }; /* Structure to describe features of a particular 9-series model */ @@ -391,9 +393,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); @@ -401,6 +410,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);