From patchwork Mon Mar 31 10:44:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033439 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D4A1C3600B for ; Mon, 31 Mar 2025 10:45:41 +0000 (UTC) Received: from TYVP286CU001.outbound.protection.outlook.com (TYVP286CU001.outbound.protection.outlook.com [52.101.125.31]) by mx.groups.io with SMTP id smtpd.web10.49041.1743417936979762257 for ; Mon, 31 Mar 2025 03:45:38 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=r/apJ9p1; spf=pass (domain: bp.renesas.com, ip: 52.101.125.31, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=t7l2J5Ny5muUEwEUttwW5T+0NNgd4fablU333aw5HsAHMpir8W8WqgbMABsH7VoMoK3XLX7Pyiw7a1m4MLXP9QGAYP8ulP/QUVlP7BoCTszoO1OTmRLNzJZj8TVBruTgU/VrlGJh0KAhbxRmTvgZkHpZwtNQZiHUOsdUpiHLuBW7SYacqkC8/ob+PsyPv4CI5XstOQBcM33L3uS5v+s+g6rotPiPTCpcx5l3b9wCpErkq41ApdhqwdzZMoDuW9yLyyKKQLBXPJ96dXiykSk1j4alVRP0FgP7n0CGmnWmiZKPdt4e+rFba7E0B/P+fltQ5CxEfw19TPQ8YrRrBS/1OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YxHWdbHZE4dIMkhOG1bTj8tY2Xycq1+ZxkHLDkuV/Uk=; b=nmImtmYhhgO0xw754G3VDt2DCnOYN3Je9L1vcBDoQgD04Epbhat3Jv5UzzWbr1aYEWSMPhmuk60yIgraCM++iKmgrgiIYa/Dk5PFgpoEsZU/bimqlEHfwEi+msUtkOLCRNK3shFQjKAh5ryBFvcQ8TefsHVbguAuDTmlkO25XKaIulOTXDaFKdcQmfeaeax4PidVWaXPv9fTqDrjVpH9wrdihOLY9SrBAtYCJ8rS3Mr3bn1+0sn35fbEczvOCJhsRZr/mDkSlL1lHYs3OuNc71yvU8GACF7+3o+4znK0wM9N/Pph5c+VhkwcYKHCWqoFEdKbWwsPWjdJEkN/ZZLcZg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YxHWdbHZE4dIMkhOG1bTj8tY2Xycq1+ZxkHLDkuV/Uk=; b=r/apJ9p15KkgbFPGTE2wNThwWfrwqr5g9ygJmbMcySwDFmY759lzen6gWCZLNznZdF2/p/1dx9pvtNgoRPJvEPWhBcG6iBSr01XNiTWSBbOofQeRL+vpx7xaEtaTBVhA4WIcNVfFxxFSptqnCfrkyP1tAQY1Mpch7/7Q9Kc8UfA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TYCPR01MB9796.jpnprd01.prod.outlook.com (2603:1096:400:20a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.44; Mon, 31 Mar 2025 10:45:35 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:45:35 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 01/43] dt-bindings: pinctrl: renesas: Add alpha-numerical port support for RZ/V2H Date: Mon, 31 Mar 2025 12:44:32 +0200 Message-ID: <20250331104514.79090-2-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TYCPR01MB9796:EE_ X-MS-Office365-Filtering-Correlation-Id: 7b9012ad-7dbc-4ca2-6a59-08dd70412ab0 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: 4GprAD+34BKSqRBxcGMvKBz0dPx4jf9VZCPyyRSoq2mz4z/HTgthG2hJdkx4idpuAB7RMODmAUbof1jEQ/c/lS4aEFoVLPTKYx7mhaJJgw/GkT0A039SPlYWSAnZIW89YQjzvD/pDmAsQjm/X4QEL5m+vZg9nLilT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OFG6mK6ZdmJoKQbLxoUOCfTCco6QT4SMZgqm5IAROztYJMkih3C2Youg+mdXTjKN81pB0hAiRvafy+bZoTJm+PWh9dIGiSdKr0xoEOqJRJN0qMlP3iw97PuDkPGJ9YPsdRAbjaiTrYYpCuyZ5tM2ne7GKxa3PdyzT6WRDWVrIvS4xk0NrIXAzy5xwAyWndTmBQNx9GSEuPT/lcv+rbcpOdPPrVtgmPP9ZN6iqdw X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5s8S9Z8dnu1ybAlb3nb6g3TzuHTSsmlrYMM4OyG4qnmr2zWFYhQGrFu8cMIEVB4GFbhtKf8YUjrmgNXO4zUE+cmGvBPba1AfvcUhcqGYbDZbcpHkg5LDnfzDLMsxnoGPefKmXzqIzSP9rnNug+KsO0Ej+NiafV7EjW7frT4sHY9P5uMQGaXb+Y9v2Gc+du0/D0YC6VnB2neYke53Cy6Wj/nTMOGtoGZSV5pPAnuKnBaTRnyoyBVTMP5yxxKB4SQGPU++wIPG2VlQHKIy53KrvU5v7qWnCmOLTDX7d7nCCDYeLFu587pWyPP89ddz4U2X415JtXgRYdzT7oYX6pMirHRe2M2juzmnkscSxoMydb270ugXh08fbabRSFX8eM1/sNU7K58FdJ6c3KOzRJgjsAmblXXGg2HTg5dcmkvjh9iPFwNX4vbm7UXGd9TfBlFxFQJMnk98XCmytJGPIOjrMHAoKv0mPj4KNWxKUmsSRVOVdbqI3wzaUytngkYA6CyFIXvCvVw38a3JZKtA6cHOiNcKhVZJX/hxBV4y7MsHGcT0SLP8nBtvWFuCSsMTPfdfyTqpQRtBoPDp19tgpDxxx7co0u18X/O7OY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b9012ad-7dbc-4ca2-6a59-08dd70412ab0 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:45:35.1272 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TbS5SHXWb8uE2VMCQmrXYq/sJhxDoxeYdFxSSrokLrNxMHWl0Ae+sZXvofSp9zRAzJ54wb5ykkZ+XUVO4XG38OFpTVd1DjYhAMSrY+hQWqZUnIhM8IyxgE/GKt9vWkRJ X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9796 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:45:41 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18389 From: Biju Das commit 3e4863d24818a41db42b4f2680715f204657839e upstream. RZ/V2H has ports P0-P9 and PA-PB. Add support for defining alpha-numerical ports in DT using RZV2H_* macros. Signed-off-by: Biju Das Acked-by: Rob Herring (Arm) Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20241216195325.164212-2-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- .../pinctrl/renesas,r9a09g057-pinctrl.h | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 include/dt-bindings/pinctrl/renesas,r9a09g057-pinctrl.h diff --git a/include/dt-bindings/pinctrl/renesas,r9a09g057-pinctrl.h b/include/dt-bindings/pinctrl/renesas,r9a09g057-pinctrl.h new file mode 100644 index 0000000000000..2e83bf43160b9 --- /dev/null +++ b/include/dt-bindings/pinctrl/renesas,r9a09g057-pinctrl.h @@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * This header provides constants for Renesas RZ/V2H family pinctrl bindings. + * + * Copyright (C) 2024 Renesas Electronics Corp. + * + */ + +#ifndef __DT_BINDINGS_PINCTRL_RENESAS_R9A09G057_PINCTRL_H__ +#define __DT_BINDINGS_PINCTRL_RENESAS_R9A09G057_PINCTRL_H__ + +#include + +/* RZV2H_Px = Offset address of PFC_P_mn - 0x20 */ +#define RZV2H_P0 0 +#define RZV2H_P1 1 +#define RZV2H_P2 2 +#define RZV2H_P3 3 +#define RZV2H_P4 4 +#define RZV2H_P5 5 +#define RZV2H_P6 6 +#define RZV2H_P7 7 +#define RZV2H_P8 8 +#define RZV2H_P9 9 +#define RZV2H_PA 10 +#define RZV2H_PB 11 + +#define RZV2H_PORT_PINMUX(b, p, f) RZG2L_PORT_PINMUX(RZV2H_P##b, p, f) +#define RZV2H_GPIO(port, pin) RZG2L_GPIO(RZV2H_P##port, pin) + +#endif /* __DT_BINDINGS_PINCTRL_RENESAS_R9A09G057_PINCTRL_H__ */ From patchwork Mon Mar 31 10:44:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033442 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80542C3600C for ; Mon, 31 Mar 2025 10:45:51 +0000 (UTC) Received: from OS0P286CU010.outbound.protection.outlook.com (OS0P286CU010.outbound.protection.outlook.com [40.107.74.18]) by mx.groups.io with SMTP id smtpd.web11.48792.1743417941343694802 for ; Mon, 31 Mar 2025 03:45:41 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=t0TnrLIE; spf=pass (domain: bp.renesas.com, ip: 40.107.74.18, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=c8xb1juE8nx1vhdnU2Df2j/kixRYuveU1TULjRa44/KuOOPOsjnIBb8Cuv0YeE78o+DgRq8Iw47SA5JtkB8zhppLiqT6ltG2udPfuTjuNMdMBdqKizzA0yjWsdMNxI5W7PH6TnSsGLRWPeFuiIBKWVIFLZYpy82xivoHrIPXQ+d4iyCN9Rqq3f+9c2wvw95HT3Nd18jyhdgT82JSwEyEPtHNNVOnB6K3tdAAjgw8RDjMQ1pjDqOSva7ejmbBY7hWcCw5YIV2DDHSETp3hm9eXeC0eS1bl1TM6Y2qIfKrCYjEjk1ICqMtK1Gtvb2fOmL12MsLGDHHM4cgQiLDfoOaKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CL8L9OYEFFXdz48RLOjMed5itZKQGzaOOd/R2WZY1tE=; b=BL8akpxA3VHYmmOLVL+wAeRCJ1ZjLsvSrfv5IKDdVqYqX2Mmbbmz8woMN4dmHeQGGVpXyz5uZTQNXY38VjxO/je2STgjIjNPUOhhQHabIAOW5aGdWRFkxDVTx5xnBa8KiYtMcKwk9L69XXnLOJe1maqb8GVjP66MgBrIrHKRCrId/U0PCXADik2I82F+27gEro5tCsSFuZud+NSNe0YPSK88TSQIBItSNASTLpR9YBxkmkTiY6BabZawRoPg6X/K5kzsBBlbM/lcfcpxouQ16zOsUK1w9AUpP7f7be7KuTtuBxb8Ttm8lE8aWw8i5BEzKKh4lvPW8oP3fZK08NPDUA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CL8L9OYEFFXdz48RLOjMed5itZKQGzaOOd/R2WZY1tE=; b=t0TnrLIEpOz93B7f1km3xJbkfjphwDlpDVNT0tcd6sFtdYmsEeya+JkSEXPPsRo4b+HozrT1C2lerglDTgM7+ZRqQ1OTTdp5iPs7kWymJ6/NGmlJkh2V6C2pK//qBNEvSLBA16juckVSSxM1iDAaY2gMVp98eIxQCat2iajVBJE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TYCPR01MB9796.jpnprd01.prod.outlook.com (2603:1096:400:20a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.44; Mon, 31 Mar 2025 10:45:37 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:45:37 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 02/43] dt-bindings: pinctrl: renesas,rzg2l-pinctrl: Allow 'input' and 'output-enable' properties Date: Mon, 31 Mar 2025 12:44:33 +0200 Message-ID: <20250331104514.79090-3-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TYCPR01MB9796:EE_ X-MS-Office365-Filtering-Correlation-Id: 1e306ffb-df3c-4f28-5d62-08dd70412c77 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: PY5wIlDj0/+ILX1aCkZh9mbl911oMLe3Sh7YgVWu2U0zkV3P2Wn2j+4slDiizcWVsWnNmYHkfxBVeDm5iQimfe/gurABTpupU2fT8sYhJhmPTYM3hY4cGMDwDVIux2iXLNzgF10+IJ/sgCskQlRIgqFk6pbgT0VzHTLBl7qlmuflWnEs8aE14bNzrZCKQc5s3sqkBCRI8DfrSyzXMwwQB6ipvfuM8Rk4I3U9lXUXNZBQoCgYYfH8OWkHiiD0bgO9khvcWlTxRxRNqz9yq7YEK84HAisFl8aYm3CUtSDkKmL28B+mBIvR5Qmw2CJvyGDJiBxk2yI5+rvm2cAxVY/Nrw8D3Qz68bVKPSb4nISZH+2VnM/GZyCFYrozSXo4r/8ZQ+3Rep6lZtgWTTIZdCLF5/33tk9k3cvpLaoEJ/83H7tqzzAQ0fQUbZujq42Osg17NL17C0hfXcZ6Mi2QHUilGKvB/O0heW0zxVq4/SkX9afFovU3uZ1POgftIsk1h5mI79xC12TUWSUudM/QtkxSxw9p4DpuJMxhusZ3Ob6WYyDGkmWFMQdvgvklEwF8WEiRnKPa5pcZEauFov1Z0H6PQYMoRaMdt0IgyMQ4aBJ6b+lRjehRjSW8Zxdp8olAVRumhMbYBFxd5FCPP1Ig5Ml1Ucfe4RKsMZTy7Ql4chaeOf22GDm2b1nNSMAuoqaQvS/nJwxgOoZhqEswphZuRH3jF2LQ0qYY0ND5n8ll0/B1UmIY+qvRV6oHjXEVw5vlk1H1Yg9nn3YVr2MMMmpUfo1jb6OiM42K2rSk36xG7OSyBgZ1bkO+vsH+NWFOPBRuopyNGHwSn4LWDcyxqadb5y/ZhNT37HO+mZ5X/suJC42eps8HqfCEtumrhBWRenlTmNTSP1OoDWKknSjYsyQ7+volKlyj/rU6YKTDBpZ7p3BS0ILjqW+UMFxvCF4eMUrw7Nv6ur3xiNrX4ZniCYos+jdWPQ5U92HRGnVt0SYczuWPIu2cRZRG5lCD3qaR96AqoEDOMYzz85HqVzFMFrXb10X3WubgNUuIRtsmPvqdspph9ZN9oYaKd5ucxomYn6+9ubtO9Dfwbz3bQi5drq7b5XWNuyn+NWEJREynwSVT8/U4u9xlMcSrMui1B3D44E8rulyqIHsiAybXTg8kV8B/m8F9XaZM1bDYex2pmQaQoJDwGDsDzN/mu6FW0LegYEWXJ0INqTMYdkkCOMu/gfTSu3RMXD2544PTLYcy8cDcRxfqmZ9IkkK1d9nP2xMvZ7bwtiYu2Fq1UUV/nVew50GxeH4qFG4ZI4vPJYWPxzF1XCFfvymin7QrBXoOnEYKgLNXirt+l97cwS5IpoTJF4DKc785X+HJIqqOMkwPPGrNqRcmxKqg28i8/dmo9vhlYtcnhavgu5uxD/jKgq7fQxbyFEE+A9iKoLH4dAviSQ2fP/hf6NyG8maHBVLRc2AR80tkAEVq X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-A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5/m5VF3Wcoz1uyww8HJBLW45Kw1EsHA6G2u9I1g5YUNORgyNmTcLnkrdtlUqG+L2Qg9NmkM19NaS84NZ+7U6UMclsI6hB1HJB94kxIVC6ArKu4ZADdW2Ks7IbObYzwhDw3pqBSe+wgCKSscc3sUhTy27wuKIH/ZUXI+ICdcWUuH5rpU24HsFGRX0biZ6y63eYFLf60wTh56cxdh05g7nSFqA9sROpvumRxsShMUZuTnjtZLH/bx9nZZRBoDH51bbdzghaXBwlUxqwO5b4i/p0acLvr7HXePAbGJc6WvidMyJ8p+UuCiMdpC60U6lCDd9io1V2ORVhr83ly9pi+ZnS7TZs/fctnKBnAWMMSS28YuOsMQ3u7xnGemvv6NF2zo0xwwuO8t064JaJS3lJ2rmgMWFxSc+2+VsvHDKVqgDzjBRiIz3O0PLySL7C9W/DCWbdgnH5/ZhMH1P7AIguMyBYWHrFVPmn1VgnSScvjXO6Jm6gCTDsQZY1FCXgJorVZwCCs8SOrWKQqA9zVD38+WQm/FcmgWINV3U3uP1qNPf+6+zTQKt8IWhvVQR29eFIs/IUn7x0Fc= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1e306ffb-df3c-4f28-5d62-08dd70412c77 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:45:37.8620 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DM8B+5Adx5A0in7PWDeSW1iZbdidvaryD0YlZDHSYh9HMs4Em7t8u9kHlHNfvN6u3uOSivyfhZ7PbfcMWXz0NfT3EWQH6Y5x8xI5fSPurkGPg0DvwbMFB8kyEjXokprA X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9796 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:45:51 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18390 From: Lad Prabhakar commit a76932e45e9b56ac24ee947294fbb52c3713f839 upstream. On the RZ/G3S SMARC platform, the 'input' property is utilized in gpio-hog nodes, and the 'output-enable' property is used for ETH0/1 TXC pins. Update the binding documentation to include these properties, addressing the following dtbs_check warnings: arch/arm64/boot/dts/renesas/r9a08g045s33-smarc.dtb: pinctrl@11030000: key-1-gpio-hog: 'anyOf' conditional failed, one must be fixed: 'input' does not match any of the regexes: 'pinctrl-[0-9]+' arch/arm64/boot/dts/renesas/r9a08g045s33-smarc.dtb: pinctrl@11030000: eth0: 'anyOf' conditional failed, one must be fixed: 'output-enable' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Lad Prabhakar Acked-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240313083828.5048-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- .../devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml index b8937e01be922..845225d58cd01 100644 --- a/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml +++ b/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml @@ -120,7 +120,9 @@ additionalProperties: slew-rate: true gpio-hog: true gpios: true + input: true input-enable: true + output-enable: true output-high: true output-low: true line-name: true From patchwork Mon Mar 31 10:44:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033443 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D54DC36010 for ; Mon, 31 Mar 2025 10:45:51 +0000 (UTC) Received: from OS0P286CU010.outbound.protection.outlook.com (OS0P286CU010.outbound.protection.outlook.com [40.107.74.18]) by mx.groups.io with SMTP id smtpd.web11.48792.1743417941343694802 for ; Mon, 31 Mar 2025 03:45:42 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=mVCWIMOk; spf=pass (domain: bp.renesas.com, ip: 40.107.74.18, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xhAOKuu9IxcrQvB6FU4dT1qsGFnDJha3P+Vna74N8UPHpUbzeVkW9rMvdLsU8MfEv4mdmFtCt7Ly0tKiZVxtNMy+PrYggFFALZnLwGkHSnCuY1LGkeq5IFv+w9T4+F+xmBNTUuxYxKkaW9IMkLxfC03BiEMcMAOYOH+oqJWdrq8HKl5QRekJKEDOVklWrVuECH0+6+HqO1iDpUztm4KAMXsgcykwa6FJmQN874Z7lSn9Vz0JFVt+i44A+CGMKEtnhJ5gJ+hR6/FliRHZ64IzrB8QoNGqxWCmDlHJ73FQx6cx5BCwJLBoew285pxGR7lvBMBK1tfI8hs4eNNaOtiE/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=75I8bj2PnrXxgLdH6PPLVUNkkDRPCl91xzt9j8QjYJQ=; b=m2Omgnp9qOn4832g/KqvioPqMoACKwHfqVEAfzfDvUhHYHW252gr71qI1BH3OMAsz8hED/E/DNmO468KC+1123aomoq3RNPLWrwlRzSHYSTBCXvkc/S4C95QPeVChA40lFkAZJkYmpA32Jq0Ro6s5hbFWpucG1LBdFIT5UYntmoRpaeGicvRrI3m9Bhv5Jl8yRYS2NJV587hYSb6bmsPJDOqzg76s7d++QiDhxepYqdpxzOrfrp7mowPQm/ixrYFn8P6S3tc/2drBs593GrVhUVK0e0zpndzUneKTNnD8FCgyazvA3Fjq9e0FIZg9uSAgVyzabjLT6+4wO82p7ZQvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=75I8bj2PnrXxgLdH6PPLVUNkkDRPCl91xzt9j8QjYJQ=; b=mVCWIMOkcFHLtsDkpUnXn+NpLEvPZoZF28Y+1SLuUPdz4zZVUV353v1MONXtu9huCu3f59zoS40jE0E8rfk9d+b7IARj7n5WTS98uysmOM/Q0hJtJuodI/jH2M46tZ5GDahB4kZ6xcBvAgmbXlbbfcD7Z4nAUBi2cBgmAP8bRCc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TYCPR01MB9796.jpnprd01.prod.outlook.com (2603:1096:400:20a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.44; Mon, 31 Mar 2025 10:45:40 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:45:40 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 03/43] dt-bindings: pinctrl: renesas,rzg2l-pinctrl: Remove the check from the object Date: Mon, 31 Mar 2025 12:44:34 +0200 Message-ID: <20250331104514.79090-4-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TYCPR01MB9796:EE_ X-MS-Office365-Filtering-Correlation-Id: c61017e3-49fe-4e48-db31-08dd70412e15 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: bFY9h7WDDvafInao+6XrZ7/FFSfa0MkTQx1UtFCbLuesn8/zJ9YdqXSI4MLZJDYhYLIN+y0rkoXwl3rPDaDmtsk19ZdcZvTFOmD3H30Qf0Db4medkgY/IdB7+kiD8lz9Udyq4U7odTbSbtz7KLCnBXpJmaa5IzMJVZWPNR3a1FkHhW0aCsaxf/7jIQhj5jAIsbxL5HZT6aCZtMh2sNh9wzeY53/aaCTGkDEhg3O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TCowMytA0M9prxQOsO2yO/y+0tkC1UvI1CGnqUtaEATNKid+3IcRvp+TwKIdfUbNUjNLXHeWVd0jyb+JIR1Zf9VRNQolcheOK4CjvmNGw16Cg3VLYjP8ILMSxsoi2Kzo1khzFj8TaO7OJXgg8AZjekUIixCrzas1M9CCC X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FXEw2y9Gmxrd2Gzu2OhuQM+Cg32QxMzRruVYy7MWbfxKZP7aTS4ZdlX7+D8EXrntP57ANakXrhqwvvh135pbxOQ8NTQF7WUsamUVrhYu9hA/GbfVZtulDkU6mYz0BsNG78LIlFuYDu18QhnrzDqa2dVeEHs5ti6m+eSE+U5YfT+SViipP+HaTzLxygI2jgcDeDvdHa35HXt770OynK4x/fcIDmc9uFqDIXo2Sp9ILjbqcwUXteslZmaenTmqzKvlulFrmbwWJV8/F8ioS5Fgfq+V0MexNG82u543LV5OTs2wZu+raA+G0rY17/T6FQztrG27yVzoH5YSZdVPPJcFobyGOszmaf/GbU0ytMfhxWFEms3eGjmhKJHqclJNTkQPnf0msbSwYF/mO7XvvnSkfjtaRdZ8o/n4YKTOdVjB2alwlJCdSI0SHgwumJ9yq7++6ZLgUQXWETbAzrwllOM5PMRC2d4gPButOZNDm7Xz5JerQi61JJIbpuubKjBV4YCO/+f2SXXWiFnsepHsvp+tUJcnlkcB1O9qSmPRzzOycX/JvIQZqEcZRvxDA+KvxyhlSpwaACY4wEb2One5V9pYOQ8M02IbHYAattCJKA2vTusPKyKfby6sQ/d0tp+e6PiuGNnRiCeGVJ00dZuKlu/G9bdqQPYH+Y1xLMBAD4TSVHKbAS+2nQ+DrY+XU9t03uQKT1QFf7+bUyZkwY6f4fNxDK4puYt1H5YGJ/SYCRur4U2pQNNcRQbbJ6cvkhkwClf0JkELNP5cu1X+tOlSSPB5CEdeyDiws7fZ5sr6D4AYehPvmoMYyv/OL3E5BdSjibv3I0hQDZfNxJBMRpgDpOPL/xUpy5JkYXc2RYvRlezfuTc+Z7WOzq4syNOD8CEGksN8/RnosnAN7vl3PikCI0uA052FszU+q63iOe8rjE6gSCDig/g3V0xE53xOXLpWujzMqs1dDQriAFvxfCm9AcO7n5JCSPUAmDscX0vlB01fQ83wJvdkK7ca3mK7R1du4OcZPoCFWokBfYnMNsLcNIfGUAYWh+0s+birFfmwb351XygCG6E1qssQ8Fb62XtMIrsxPPsS/MhYDBZFMj6DdzK+ZFU+ofV7pvP1u+9XtIoPKZV0jg/EvDhrIvRA8pOGpqpBUxMbybC7yrbJxEmBdvBTTFVzYCVyt4LrpNe3QERn31WddLu8C1UUTKACPh/P/Kqhiclw5X/BtJ6wpR4u+VH1L6TigldlVHZJz/7h+pfZqIfjme43qqzuVmN2SKGrQ5Q5LaGG+Aa+uph1KINsEIAhmeJdBKwABRuNsusXBBXfb9rPOq11LZLbsSimChhR/F4JTvU5CR1k5ejSeuCFQtc9jddWOgeAKwKFDr09sn3Z0FJz53NGsSpr/uef4lQAqx6GYBrrDzdHlqDbMzjkd6yrI4IlnMZQ//BP4E3BYqzAHq75/50eo45CaCUhMGgSyIHa6F5LRtYjEjJW29RoLK6cgUrjpK6DVkFoVeOHTu6XFou/rhYiqNeQqFWJQOVyPVkMJxOl3lptXtMc0SC/w6/YWmnrvSPMYuHXnZfKfaxHV3FWjvb+8fwGnbfyQkPbJN//PFyy87MeH39cjK9k3UdPldb433/AcshRdIJA48oFezM= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: c61017e3-49fe-4e48-db31-08dd70412e15 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:45:40.5916 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9W7vK45whbAW8iLh/2ERe9gkFAzQ2PZEz8eXXXJZ8BZzjQc4h4y9WdUwYq12maKDvuttRUF985oc9oW2hiXugDxn+uvVLt+W0RIEuhF+fXFX8N7V8QxR2RE+LuN69lZ6 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9796 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:45:51 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18391 From: Lad Prabhakar commit 26771100519af263e3b04b635bc917f8dfbdb77c upstream. Drop the bogus check from object as this didn't really add restriction check. Signed-off-by: Lad Prabhakar Reviewed-by: Rob Herring Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240423175900.702640-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- .../bindings/pinctrl/renesas,rzg2l-pinctrl.yaml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml index 845225d58cd01..235cefe60f5dd 100644 --- a/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml +++ b/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml @@ -78,21 +78,6 @@ additionalProperties: - $ref: pincfg-node.yaml# - $ref: pinmux-node.yaml# - - if: - properties: - compatible: - contains: - enum: - - renesas,r9a08g045-pinctrl - then: - properties: - drive-strength: false - output-impedance-ohms: false - slew-rate: false - else: - properties: - drive-strength-microamp: false - description: Pin controller client devices use pin configuration subnodes (children and grandchildren) for desired pin configuration. From patchwork Mon Mar 31 10:44:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033444 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 822DCC36014 for ; Mon, 31 Mar 2025 10:45:51 +0000 (UTC) Received: from TY3P286CU002.outbound.protection.outlook.com (TY3P286CU002.outbound.protection.outlook.com [52.101.229.29]) by mx.groups.io with SMTP id smtpd.web10.49046.1743417947150721213 for ; Mon, 31 Mar 2025 03:45:47 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=rnUZdLPv; spf=pass (domain: bp.renesas.com, ip: 52.101.229.29, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oAF5BgKGJDcfYFzGDhvuw2ZagE932JaR3t1fFwtadLK6UWFYXQ9RPgcWydIzchfQA02Og7KUJL/jMXoRTSLRSClwIN3Cmo7Wm4pNT6GaTC9Beo52FhKXPD6D/s/i+ycJpFJni/JhirpRAL31+xX8UP3TIQJk8nwGOmeArSzVwae0CgDvsI9CZwiNiL0JCVxHxp49nX7EYr/mPL5o1mQnjRJhQueEuo4X6iJqcajtXFcvtadxOt5zAB9ZJI0vx4WckHETzNTLN0HHYbVZBNTXG8swbFMN4+SQwanj9iFkl6Lr5jC/j8JDucOCVPSyNwzAocJUJDyMIBfAG6BVgSnTzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1pIKDVxDKUV+IERQWmM0cmHdrte17J4SqXkRj0T/52c=; b=nM6wrDCxfcElDfNWvGJ8yUIQaQleqhzPY7AW058M3jcgFZHtLKef+Nt9D4uPiSVL36Q8g2AS//zLtmPTBVwS1f1F4I9Avrh2vbZZyHAO2LXGmgDLt1vUThB05H3YgkMxwbwt9oTliNqqPcqP5rx+gRxsVAx2RpnPxFAE1QLOD/48G1SA201g1LliFKDXej6to7GL0XsQ23AGVgHjjPryJKzq/9gi/ayNCh9yIc3m6Kuu1Qkxm2lIhxo1Wsxub3NHk2QXhK2MZDrrhBSSMCObmtupnr6eMHgrs6o+dPSeAHwQrnO6+BnoF2lfODOm0LbyfWlSqGGYtpoAEDA8ljCD/g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1pIKDVxDKUV+IERQWmM0cmHdrte17J4SqXkRj0T/52c=; b=rnUZdLPvoae9thM4bP9FNDq8vItAzE7P5GabXdGaiQZLPRYFK/9eXkyTsw10Ft2PFeYkzFgtjEMDZAtc6qtE1NcbqDqO5KlH9sKduU2gggi+NikLLXc1Sf+OjKNEa+q3dZMIDLbtIMfolFSHa59E7dnzhKFMobqFPNGNeq7kHCk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TYCPR01MB9796.jpnprd01.prod.outlook.com (2603:1096:400:20a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.44; Mon, 31 Mar 2025 10:45:43 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:45:43 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 04/43] dt-bindings: pinctrl: renesas: Document RZ/V2H(P) SoC Date: Mon, 31 Mar 2025 12:44:35 +0200 Message-ID: <20250331104514.79090-5-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TYCPR01MB9796:EE_ X-MS-Office365-Filtering-Correlation-Id: d9b403f3-c22c-4b47-dcb2-08dd70412fc2 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: hODLurNZVPn6YRE16V+amvvc2apAm6VvDebpIyIONxqEyVhJyoc6vWwSNjmMTzFZm+DEg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bZCYIg3/J/GG2Nc1N4ztAAM/U2yolXvVWXjumt+2IAcz3wr8EqCTrNXalNEjb2Q0Kn1LSSkHvurjgRGIQr4kCinORaESHLTKRdgryLYGK+TWneie8GUuTilBSMHzR+aBPBiTKYAHpET1OgFTeOreK/d5gy7VRDmgkdG5yel1SuBrzx6yZmwtD1XHwRFAbQBRI8LqlR5bgtyhFI8g3MIf8Zzoj4kRcWUTqWVDp00uMEEUggagQnzP2Oi6NwVutpcuK3kPWZ+dhqijDlrtt9bweUr1nJJXWRt1YYxc7NMNXrgwtSMSx0PNBTOL X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FcXfVBoYDLlON0pYQ3+CTomO62netrr8YbUekXI5sidSEA6goLejTl1ZphSL2dJMRm6CH65LEg7mxONzm9Nm6tnwbjZrBQBXlI0gKCEWHQRusnBDG8793uFtPJ+FCl4lOw/2S57jDPpa758/vFoColVWkckFzO3JuJ7oG2m2pgvkA9LSUyKmb0BouYfz2lkAEhiRzMqUAq1xfeugKWaQ0b/XEASouNpicKqzikLU1gzq0j3RB3NtZDBDXTQbOpZ9bdWYPQ7iwJFXuJei8eT/rNoOz9lruUR1/mKCLgI8B1nHC2hpBcuf6MU8SOAtwyh+L3v+o2hh9wJek38cVvVpcPhyQDdc/ZY/fWotrCIXsLbcNsr3t9ADmxFABedFUeqCHFHGMcDmoxecwse1y0lKa/8IXR3IODrFME75aOaq/83NsfFNKNmud+n2sl6lQ92SdSq0M1bkHZZBz59BrD41HnveKoepNkRq93uFqiC50C2pV0CCH+vVpcyRPmQA390Cc14YXngjI9rDMa3bfHrM0tGaqRgGPmeejxfRXMEKddU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dA= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9b403f3-c22c-4b47-dcb2-08dd70412fc2 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:45:43.6599 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4guwnVptdieIoMtBA0MUKIIE7R96xpxRWloM6P8CBLRBt1Qb53lc6ugrAy32X+V3PNVfJQehDx6c9QC5FS2I4WAS6L2Wio9rqlKjsm3vMKVb3T566Mg0KElzB/pBm2ci X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9796 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:45:51 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18392 From: Lad Prabhakar commit fb73d663b31398aea8528fb231e660c4958b29ff upstream. Add documentation for the pin controller found on the Renesas RZ/V2H(P) (R9A09G057) SoC. The RZ/V2H PFC varies slightly compared to the RZ/G2L family: - Additional bits need to be set during pinmuxing, - The GPIO pin count is different. Hence, a SoC-specific compatible string, 'renesas,r9a09g057-pinctrl', is added for the RZ/V2H(P) SoC. Also, add the 'renesas,output-impedance' property. The drive strength settings on RZ/V2H(P) depend on the different power rails coming out from the PMIC (connected via I2C). These power rails (required for drive strength) can be 1.2V, 1.8V, or 3.3V. Pins are grouped into 4 groups: Group 1: Impedance - 150/75/38/25 ohms (at 3.3V) - 130/65/33/22 ohms (at 1.8V) Group 2: Impedance - 50/40/33/25 ohms (at 1.8V) Group 3: Impedance - 150/75/37.5/25 ohms (at 3.3V) - 130/65/33/22 ohms (at 1.8V) Group 4: Impedance - 110/55/30/20 ohms (at 1.8V) - 150/75/38/25 ohms (at 1.2V) The 'renesas,output-impedance' property, as documented, can be [0, 1, 2, 3], these correspond to register bit values that can be set in the PFC_IOLH_mn register, which adjusts the drive strength value and is pin-dependent. As power rail information may not be available very early in the boot process, the 'renesas,output-impedance' property is added instead of reusing the 'output-impedance-ohms' property. Also, allow bias-disable, bias-pull-down and bias-pull-up properties as these can be used to configure the pins. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240606085133.632307-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- .../pinctrl/renesas,rzg2l-pinctrl.yaml | 37 +++++++++++++++++-- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml index 235cefe60f5dd..7d7e66eaabf19 100644 --- a/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml +++ b/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml @@ -26,6 +26,7 @@ properties: - renesas,r9a07g043-pinctrl # RZ/G2UL{Type-1,Type-2} and RZ/Five - renesas,r9a07g044-pinctrl # RZ/G2{L,LC} - renesas,r9a08g045-pinctrl # RZ/G3S + - renesas,r9a09g057-pinctrl # RZ/V2H(P) - items: - enum: @@ -66,10 +67,14 @@ properties: maxItems: 1 resets: - items: - - description: GPIO_RSTN signal - - description: GPIO_PORT_RESETN signal - - description: GPIO_SPARE_RESETN signal + oneOf: + - items: + - description: GPIO_RSTN signal + - description: GPIO_PORT_RESETN signal + - description: GPIO_SPARE_RESETN signal + - items: + - description: PFC main reset + - description: Reset for the control register related to WDTUDFCA and WDTUDFFCM pins additionalProperties: anyOf: @@ -111,6 +116,16 @@ additionalProperties: output-high: true output-low: true line-name: true + bias-disable: true + bias-pull-down: true + bias-pull-up: true + renesas,output-impedance: + description: + Output impedance for pins on the RZ/V2H(P) SoC. The value provided by this + property corresponds to register bit values that can be set in the PFC_IOLH_mn + register, which adjusts the drive strength value and is pin-dependent. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1, 2, 3] - type: object properties: @@ -122,6 +137,20 @@ additionalProperties: allOf: - $ref: "pinctrl.yaml#" + - if: + properties: + compatible: + contains: + const: renesas,r9a09g057-pinctrl + then: + properties: + resets: + maxItems: 2 + else: + properties: + resets: + minItems: 3 + required: - compatible - reg From patchwork Mon Mar 31 10:44:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033441 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E74AC3600B for ; Mon, 31 Mar 2025 10:45:51 +0000 (UTC) Received: from TY3P286CU002.outbound.protection.outlook.com (TY3P286CU002.outbound.protection.outlook.com [52.101.229.29]) by mx.groups.io with SMTP id smtpd.web10.49046.1743417947150721213 for ; Mon, 31 Mar 2025 03:45:48 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=WDL1nDDS; spf=pass (domain: bp.renesas.com, ip: 52.101.229.29, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=haMbxEqb08+WgHzj+ctJ0A0fn/CIN5pXBMAtqtPqwXC+xM/cOarehFhSRd8xuN86BqvMbm45w0vtnMJVMIAWVEB7rT4uvC56jMQtDAptHT4SpMT7TOoYkfKI/R4obKOIKrkTMCO0vxiA+WWrThzfPD55X0Ubhoiw1QUdacOasf/GfOECxcoZneHSRU/B561bqLwDIz0ZIHejsQ4VKfNg4Ps86+pggPwm48988FDcUCBkBHFxIGP1YRbC+H0WUquYuOIgzXjBMKhj6B814DnG6EkM25ZePV9ME6gkaUTZvaEqenqVHTk07ZaUVfrP3peTxpxw6WLigsUN2NqBdqch+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mgIeyCtMHquBzi+grN32qhwTg9fdS94ikZkkgn810M8=; b=V+bqJtRKXynBey4GN2++s2fKJDRjP0Gg0ARpVt2eSRjVlqyPWD51S7SRWITQ3kxZQc0m15enAg/lTVmnzizS360C9+UlIEfoSTbcEeI9UiVNZfSANfbfPoZ+coxaXDBEcT1T8HamzzBVwpwJgH0q9jhFUyqvaSUqir2CvfV4ve8EGXRhMNqWB5qXtS423lA/opTrIwtJtjAaVH5Xj3KF1r0LMEUs1biMnezKVUmln7MVwd5qAIJz3B+piy5QYkEBGu2uXm8oC8F2pRjrWzswIkfb9urhfbQzl5NcAPBKKn+rEboXg5S5mopazdOAb9FMLLaeEWyHq6DzhTSmPfHRRg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mgIeyCtMHquBzi+grN32qhwTg9fdS94ikZkkgn810M8=; b=WDL1nDDSrmJYhzQVgqdxThyMWXbt+Fn0PseSrEiCgBLX9rr3erbuMWKqDsUgF20LfVL64yddVN9JstewIYCExGdLXUyaFyxUT1m8hylDMSJDhWR+woT4if8ukUIZ1Ta0RS1U3ipy81MGXUBlynx7YVfxT7QUGZFxPxEzokBmA6o= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TYCPR01MB9796.jpnprd01.prod.outlook.com (2603:1096:400:20a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.44; Mon, 31 Mar 2025 10:45:46 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:45:46 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 05/43] dt-bindings: pinctrl: renesas,rzg2l-pinctrl: Allow schmitt and open drain properties Date: Mon, 31 Mar 2025 12:44:36 +0200 Message-ID: <20250331104514.79090-6-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TYCPR01MB9796:EE_ X-MS-Office365-Filtering-Correlation-Id: 5426905a-1965-4def-f190-08dd70413190 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: KUT2oz9faYdtsig6dgJu1pXuZXd0Crlr70rx3OCXLG1wG2itlaCBq/C2ZSYyqdeG8IT4nXo4zIYZ1QQVC+AYqHl0KAeYgaZrSL75Zn7L7LZzpXx3t6T9j23GNDs2cXbcjc7T1qrzjJTstdbXuSeh/C6HSD8ErDvjCwT2Uj5wf4h5MX+BK9LFc9gBb0tcmmEQyNiSWa+nC+pYWHOEjqhyX7bJNBSvIEaUCiKiRvSLwJuXcOFqE67hHxItf32QK38r5C8ovbU0FkaInz+1prw2FiC/gru9QKbMDap108yDltl2K1ZLxs1A/AgS8nGSi2SsGTiZGZYkez2wFwBRLHiA8Y5Bse4igMuhq4NSO8RnxYO0eE0X3sYVTe7le9rD2A0uknr7ZbPeiHWr7ljNr3jXAGrI6DIezh5O22V3+0eUcJc3z92beASVI75uXg7QSn77M9dFWYSZblRmG2HkNzTrwO83tdN2lrEkGb9VvkskmrJKBgsvs3JSGgVk2rKuMnkJ9ZrZr1RWptEKYlzKz6Xzj5W4RRdIw440zUzyeqTcTXK9XQlKVyLm0lCKUb4XAGWABoQuLdPClOKCnnX1gvGIhlwfPV0s7F8E8Je3IvJmZRHxaZy+czIQt11UvkCNfZqYcRRLmenw49+htFnqX6EUxuVSQcrFz5pVpSlP0fH9M0KVEoFMOccGZDR34UgFVCRg+bgOgfwGTNwZPw/ZedBF2Jhpv1GUUAdjdXrHiGjqWHlUdlug0Eto3z/Fry9e7aWUWQe7Y967PNPFhAMMoxwrU6RsYCpElHq3wxhoYgJML/1mtQgE1kQdQMbef7ot2hahMehROQmk/xTYCB8l/vUDEwRCp4lnF+levBNkM8YDTBzDFNQemLXIoFoxPNzvyF92gg0vVhe+5lO9o0Y+JpQhmnCaemPvAb0of+1zPn5a+Ufpn7vPa8GPHLR7UBPZyiw0Qu4fhPU9BIuw6g0woDz3G6E+FAXSOj8f3uYjrj+9F9X51eSptvNKE5D3/Liyod8L4S280ASFT6Q9H7DsoZ4SQtmmO4sPf9ZewD0JD0Mf3/+u8FMHzxBGQFwlpTn3GrC1pLcjEDcfk9CmDaVPoMvsw0TYJoqvKvXNUa8P47S/VMDbUpmupVYIEwKfYyisWXMIAPVilfmM975rxBxIQvjwWBMyr5AlOWo42wDcVDw61fyv0CvZKJ6M5HeYeJIZdxnfKJRHae95b/s3mFaBd0AKCtYN6Iv9Y8e5ZbewBCn++dSX+FYcJAOahcjttLxpdasxnk/BeRsZpCE3kbeXFeSRzvoENhZxixKl9TVp63/pXaH/RBLFxgN7bD0pG03hbKSzikUgjp1zPGLOnuGvLeS3DacBHETSbOTkcRzdcduiOciYe/gOpFyKTOsKkJIidyh9y0aby0f0fvxR3MdhFncPcFa3owbZ8FU3f5egGFpTnR/UZIgviLXdrIGOJ5/T/p95 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WFT0d/UuVbcZhRtb/mBXDB0pcsyYtg56FfP+D6Hjvsdgm7UH5D8eK3S2OmE/ndjFaHHiXoMtuKU1sePZirf+nemQesTJU1adS7ZJ0A1G+6UroD4ddx1cHlmlTAlgOr84qUTPt0AK2sLMNCoo0cKI8GO+ExBcwknsF9dkgIaybESv7459u9VEnzV3ndmEg2QP/M7O90FzD+3btCC79Zdz50GSUCY5Nd62EnX8yhKuXxlZdBeHLM07y/pvr91dnMm1fE4RdggJquJkx9S7zbRJfhZtLeR8pijG+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9V52LQZ7yyc+B259oGJLLTNxOPH6uy4L6N27cXNmf2p1/8tsMtil5FDPSa2XahATbXG21ojJj/rzhI3Zl7BJhyCi3mcBNQSy+4OqD5j0iG81r/27LTHG2aXtOleR2+9PR/X3ygSJmXZ0ahrDlvlg1zGv4IdoJ861GIeBn2KnU6PpiHJxjYro0NZoA7TRHYjM7rlJVJvp3RJ+X141k75AZHp9uiBF9eUXPBj8C/Gdvbc3ofXc67D+nkRobBT6UtjMqt11aV+qASTwGeuKKP976Y= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5426905a-1965-4def-f190-08dd70413190 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:45:46.4391 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mDPOONzchWFRw7KpBhYd+ffriY5qdwNXmotkWzcEl4XRicSOxlSyHD4v9CbVdQySBgjE7H2g2kzsdIHvsfSGN2SGAHhfmB2+MEEYBVm1CfnbWRkWc0hx3yuaz5Onkli5 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9796 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:45:51 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18393 From: Lad Prabhakar commit f07e2b681edd8d8ed25048b958fdcfb55abaf487 upstream. On the RZ/V2H(P) SoC one can configure the 'input-schmitt-{enable,disable}', 'drive-open-drain' and 'drive-push-pull' of multiplexed pins. Update the binding documentation to include these properties. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/20241004123658.764557-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- .../devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml index 7d7e66eaabf19..1a16fc06c96a7 100644 --- a/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml +++ b/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml @@ -119,6 +119,10 @@ additionalProperties: bias-disable: true bias-pull-down: true bias-pull-up: true + input-schmitt-enable: true + input-schmitt-disable: true + drive-open-drain: true + drive-push-pull: true renesas,output-impedance: description: Output impedance for pins on the RZ/V2H(P) SoC. The value provided by this From patchwork Mon Mar 31 10:44:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033446 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BE46C3600C for ; Mon, 31 Mar 2025 10:46:01 +0000 (UTC) Received: from OS0P286CU011.outbound.protection.outlook.com (OS0P286CU011.outbound.protection.outlook.com [52.101.228.25]) by mx.groups.io with SMTP id smtpd.web11.48795.1743417952516858295 for ; Mon, 31 Mar 2025 03:45:53 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=Oh2q8wY7; spf=pass (domain: bp.renesas.com, ip: 52.101.228.25, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QU5wN0WJfHGr4vZ2Lb7og4QnKO0hS1sJGeg6B8ESJeJ9EEhTHchrf6penWH/AZ6XJuHLfu/85kQKpe2rFxfc1YEJku0r+vqsadJ7wcJNMgyagbX+5ZM/G6NmZaZZCiNe7fCL283w/xuZ1k7ejc/ZgPzAKEfPV32uSiEgElaQWeWSBJ1A/Cja63m3SV63Y5opqQMAE+LckcPdunGpsQ9o0b0OSytBsD9mA0yK3bnfNeB7+sfDlUB01OlB/1JZnh45wkHDTQQMfDz/eBh/QsrtTv9cxL9e5eWNGwnzTcTg5CXtz5FO9eAw+YKFglBbbCUULEhJyj9PNW66OmUo136Wbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Wl4K0H2q/sFCpH2VFd21odQ+H69S7/PnjAZrK8rZgdY=; b=yjcTI6ShieI+5riTCvkL6QJYLpEwPlhPjGumoZGWQ6uT51H4RCxrCydkaqKQNWldk+gocQSJ2FjJoLbjHFErqkDqlG8o7zIyoYpPH3pdfBjH6VxNs0qLZ/1oH02X4MELlL0AQwDNmalDagqVnLZTI9SVqOvZZVjO3KBBA8Xgq0pDUm+gKx6QNEtW5dlV+k9mC8gtit20NVW5rBXGIkd2NIA6TO/tyulZgEFQEvJjng8pqHxLC0V3d6UxiP47wUPOV0P9lnpMmG5AUzw1+0M3QeaycGpsJ7ufzJbz1P3gmpz/0Ve1tOqWgBl+ll7WEUJESoW2DdVkbn0LNB22cD4/PQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Wl4K0H2q/sFCpH2VFd21odQ+H69S7/PnjAZrK8rZgdY=; b=Oh2q8wY7Rr/aVLvhN3eeXKDi164ZE0YaXGYcVlWjnXpjCilUR0SgPhr3h+983Hg48Q2ObbqAfIwjFigBtMRrxb4qsCDxD8CcQpVweRBADBMdk7GFcL5Zk/raEhTHn5/ro6MOZlob45XMWGQA4KkbTphXpDQrbTWhf9CGt0hfDIc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TYCPR01MB9796.jpnprd01.prod.outlook.com (2603:1096:400:20a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.44; Mon, 31 Mar 2025 10:45:49 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:45:49 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 06/43] dt-bindings: pinctrl: renesas: Document RZ/G3E SoC Date: Mon, 31 Mar 2025 12:44:37 +0200 Message-ID: <20250331104514.79090-7-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TYCPR01MB9796:EE_ X-MS-Office365-Filtering-Correlation-Id: d7421fa6-6467-4d35-4274-08dd70413338 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: kjpBLvGcn0qg5zcpiK8EMC3CKxbhcNYdXGn0HbovqSA0icfheRq0BLsbI1FNv5QOuZx72rRquRqEyoqb4Q2cM2mw8OIKkRHUijMPCuK3PVKErPHjL5paEiPa7QpLdL9kEEoIIW1ATlbOkxEmGMGZi01b7cXGEnoUQhJbCAfrol6IGaf10BLgaITvNDgOUKdrLd7+keuu2BZyl5vMrI8Es2nLLySb3SV8TXxpUSDmkid0957UJcp2tm8RMVqliQ7SbzveuCC4sEwBgBKgSY0WWQe3uNQFCvFvVO1zC6UDTBOLYeK47MIQLli4y5cvzq4rn16rI1ON7gCW3rPHg63qA5LmYVAsbm000XNZMc+LxLvgQKpjSs2PGfE1Vd5EEAlpEOJGhnCtA1cCLeEtXwLnbZK0tsfkqJEAXUdb5Zv1lIIUQVT1eUGWk5cY2A35laKvTQzZrgIUaYNujMguKrNsd2z4Rd8zOVVN1KtJAb5rjFKSdfph7XFEu/AWNq7lZNjyS9UXvbme+u1/XmPltvXoqKRCHqBTiAnnL6fiI5KPmb4+FDHDcYuRjJosGnFGjbEuXwY3OF1hJ9sQ4mA1w580AXAzXch8bbpDoCpRpZbBV55xtb/ZrTRkHmeuEoXQw8b1fyhjlEi7QSIsXfv+47tMYtNnw9di5d4qmuxPbUSz8m7NHnQrYqW+D+rGIu93S6SCpIqfSuzGsCBHVLgxpeRTZp/d7l46Ek/mLIiAwPA2PbMU2I8mU+wjSj1LvpD7MBPgGjHiHQod4qJPBCNAKjfvJ740czAJr3H0RvipPvJWId7uAMTBAMn/zGDyJEwr73lCHWoOm+PxYj2hmsxqSzYIZ5j59o4LorbrUq3kPgOyOEwvRnDUN5vcJzRnD0xcaESFJCrli058mcymRz/Skcu0nV1rQLO/lCOkGD9PdS1Ap3iP3eoW9NuvjCmOlVftfM3RFZK74m2NQA/GLmoU5rcSSFjQxpIj3x6RqkzATYy2tt98v8KD5a7WVDm62cM2whxKdM/HXjhODa87B4OIhFJ/7ljY8akpDyUR0DAiPV5a/QJ06xF3w2hAxQ+SyVbCegUbN6Cv4hVWuE8mkwByvMOAY9X5V0SReHvQeKJLrUOLFSDzWa1d5KocTy+/TJV1A5hU9eb3I+++479vHF/mqcJGjnyHzXK+ub8QGf0hpefx/Xt4IZ1ff5i6XBTOzAQ2bHbaUvhrKMOMH5STWT/GKxtU84doVhycgpGtFnnup0+zpcosunxDHpwA3ByoxWAXIVBSwOHXfnhFuKL0cFvur6nWO0Os+woakMOzRS91W+nikCJ3Wl5a97Z835otFIQMdF5wuFmFlpwERnfpZ2CWOOccuA7dM3bTYF2rrNN3u4CnBJgy/TIBfIq2315aufZVMbMwl3ksx8Xt8AFyQqBi6d7zb91dsDkr52DzjuydxFtQflArx7seKMGeSD9wIOutTa08 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: r/N7OmBfRINpK29rwatI6O2irJhldWv/6yfSXeB8xatTwCEzrVm0Kp60cm8/gCE5PpPEJ8jMnBEVDCYD8Iz0I6FEkR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cXLOoiMWzF3H/xydhWcrwG72giTDFQO6BizcBzKHnRMBUUIcC9yzGPPBuuGVdFOjY5geQqEu4ojwt6VDMJ8rluqOXmXLPLIdEIzSfeFUFRuBjVRuCuyRifeGSXgXgpNrxdxaon9uXYXTPfLvq81A2mXpQiBP68qkb9SB+b0vQHE8xVZXJ2keqWzah0Y7yvQDxGSWK/CDirPbmPd+/zzxquq8nMjjiuzHse70xLhXUZoc/K4hx5r9UINPSSXKidFiv3OzR4heG2xowsPBCRYtqzG+zRrpb7ZzsfoaLEr+quyfIho88HUswVlURbfYoDDdbEDapq3lH1+i105EaG6wMTiSeyIhkZ8HgMdT72pXhRYXDJgHgYCjGRJSB4hYM1ti4srHNO4YhOaO9Wvc6bwCG7x7LF976Gi8z304LuBHT7ZXlRibOMDqwESlkiXDYosIPBhokE6aPs8+iVovXiBYtY5tXZw3ITM13033I= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: d7421fa6-6467-4d35-4274-08dd70413338 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:45:49.2088 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: eGIbJogkBzCCnKQ5A0DSogfP7hwc8Tu3zj3bOG2kZt42lZiVKAyFMSeqZjMd0T4pQJNteQg90pkJAyckDcRL95yVyy7/aNDtfnHeaXUHEVQ3oOINlKTgTkW/KknbZ+Hr X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9796 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:46:01 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18394 From: Biju Das commit 5c7fb203d0dbfbfeed51991a4f98499b245634a7 upstream. Add documentation for the pin controller found on the Renesas RZ/G3E (R9A09G047) SoC. The RZ/G3E PFC is similar to the RZ/V2H SoC but has more pins(P00-PS3). Acked-by: Conor Dooley Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20241216195325.164212-3-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- .../pinctrl/renesas,rzg2l-pinctrl.yaml | 7 +++- .../pinctrl/renesas,r9a09g047-pinctrl.h | 41 +++++++++++++++++++ 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 include/dt-bindings/pinctrl/renesas,r9a09g047-pinctrl.h diff --git a/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml index 1a16fc06c96a7..716df90d5c09e 100644 --- a/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml +++ b/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml @@ -26,6 +26,7 @@ properties: - renesas,r9a07g043-pinctrl # RZ/G2UL{Type-1,Type-2} and RZ/Five - renesas,r9a07g044-pinctrl # RZ/G2{L,LC} - renesas,r9a08g045-pinctrl # RZ/G3S + - renesas,r9a09g047-pinctrl # RZ/G3E - renesas,r9a09g057-pinctrl # RZ/V2H(P) - items: @@ -125,7 +126,7 @@ additionalProperties: drive-push-pull: true renesas,output-impedance: description: - Output impedance for pins on the RZ/V2H(P) SoC. The value provided by this + Output impedance for pins on the RZ/{G3E,V2H(P)} SoC. The value provided by this property corresponds to register bit values that can be set in the PFC_IOLH_mn register, which adjusts the drive strength value and is pin-dependent. $ref: /schemas/types.yaml#/definitions/uint32 @@ -145,7 +146,9 @@ allOf: properties: compatible: contains: - const: renesas,r9a09g057-pinctrl + enum: + - renesas,r9a09g047-pinctrl + - renesas,r9a09g057-pinctrl then: properties: resets: diff --git a/include/dt-bindings/pinctrl/renesas,r9a09g047-pinctrl.h b/include/dt-bindings/pinctrl/renesas,r9a09g047-pinctrl.h new file mode 100644 index 0000000000000..5917096720bd2 --- /dev/null +++ b/include/dt-bindings/pinctrl/renesas,r9a09g047-pinctrl.h @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * This header provides constants for Renesas RZ/G3E family pinctrl bindings. + * + * Copyright (C) 2024 Renesas Electronics Corp. + * + */ + +#ifndef __DT_BINDINGS_PINCTRL_RENESAS_R9A09G047_PINCTRL_H__ +#define __DT_BINDINGS_PINCTRL_RENESAS_R9A09G047_PINCTRL_H__ + +#include + +/* RZG3E_Px = Offset address of PFC_P_mn - 0x20 */ +#define RZG3E_P0 0 +#define RZG3E_P1 1 +#define RZG3E_P2 2 +#define RZG3E_P3 3 +#define RZG3E_P4 4 +#define RZG3E_P5 5 +#define RZG3E_P6 6 +#define RZG3E_P7 7 +#define RZG3E_P8 8 +#define RZG3E_PA 10 +#define RZG3E_PB 11 +#define RZG3E_PC 12 +#define RZG3E_PD 13 +#define RZG3E_PE 14 +#define RZG3E_PF 15 +#define RZG3E_PG 16 +#define RZG3E_PH 17 +#define RZG3E_PJ 19 +#define RZG3E_PK 20 +#define RZG3E_PL 21 +#define RZG3E_PM 22 +#define RZG3E_PS 28 + +#define RZG3E_PORT_PINMUX(b, p, f) RZG2L_PORT_PINMUX(RZG3E_P##b, p, f) +#define RZG3E_GPIO(port, pin) RZG2L_GPIO(RZG3E_P##port, pin) + +#endif /* __DT_BINDINGS_PINCTRL_RENESAS_R9A09G047_PINCTRL_H__ */ From patchwork Mon Mar 31 10:44:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033447 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A5A6C36016 for ; Mon, 31 Mar 2025 10:46:01 +0000 (UTC) Received: from OS0P286CU011.outbound.protection.outlook.com (OS0P286CU011.outbound.protection.outlook.com [52.101.228.66]) by mx.groups.io with SMTP id smtpd.web11.48796.1743417954692865107 for ; Mon, 31 Mar 2025 03:45:55 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=IBP0Zg15; spf=pass (domain: bp.renesas.com, ip: 52.101.228.66, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=i3eJUsYN8/jJMzzi6OZEYaOa0HWNkufNjFwUxc69tZS82+zTdDl1ohZ1AJ5yaVAcwdmjFPiFrBtyHZvUGXoT9VVuQ8kw7gy3pRJ4V/EZSsNPdHMnMkgfbUIj3SheVYkin4u7Xds7hOvAB2F0M0ZY2Lpf5tKCxLUVl/qxTv633+wndxK0tUjJ+k9U03aXadTGRMoiknR3crtd6xUrgQCn7RRU6pYOSmO1k8vu5gTXA0v3Ao5yzSceGNm8bAf9gUY56V4e6L01hbIF/IrWiRnlCz2aBjr6V7ee8IzI5w117Zjv5URl7+4ecq0J9nLRYy+l/EloubwQAKpwdsEG/I9t1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ckwsI8omIklnIVL+1BijMVOBBPmu/THcahKWDj4nRhw=; b=YhL1dY84DQPPB90BrPJMT2UKn2RcyPoxdyDBnmi5RSVKbNPlDPPnffi262BRKLjpO9NyeL0tc5KbGXgwlPFeVw1MeBZHEkE4pH0LcBvTaQR4CbIB2KnAZx0usKEpnmciIpoetr5gQ14qq3fBbxeOjukPXygKxEZOao6nctXb/SBt4GS3mIAPioH3BgF8dZDvO3o1eLwb99+SouVfjbuxNyoa+lFFcNeUtXAn0FAFO4zbYPBbLQ1wYWgfOKqSsxBj0R77uXpmOaHfKk9r9uw0iSr3raHG+7Cs/8rKXo/vEOtB6WOIreY/NodfTTkjszvoYhfsdy2sPaOSqLuPXxxo5g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ckwsI8omIklnIVL+1BijMVOBBPmu/THcahKWDj4nRhw=; b=IBP0Zg15N+nefgZMkuRtI0oOw/G4QmeMlYqwaXYTn1q6lYMZ+M7WTdU5oPKwlfosM+50IJoOGdnR/emLjqhWSZhJoSo+DPTvHDTsWCyBbdUUjIXKw4dmbiyb/WnshXPPms84F7yHlqBrTUjcIkHfGIEQUu1Y4ocub1Zn8VXvjws= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TYCPR01MB9796.jpnprd01.prod.outlook.com (2603:1096:400:20a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.44; Mon, 31 Mar 2025 10:45:52 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:45:52 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 07/43] pinctrl: renesas: rzg2l: Allow more bits for pin configuration Date: Mon, 31 Mar 2025 12:44:38 +0200 Message-ID: <20250331104514.79090-8-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TYCPR01MB9796:EE_ X-MS-Office365-Filtering-Correlation-Id: bff5b341-68f8-4239-353b-08dd70413513 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: oUrcqhdhRHCTNvoRrHKsz9taSBmUELuyte9OIi7AdN96PDYUmodyrEFK9/wlsAl5jeqeg/Eq+XDQvV6iyWTOE11zvMgUaRSvtvgCQHoxuws08dYhMFvGlECgkveagrr12Lu01CavM50zRZx4TZTEdjDwIzezW+aXQoSwA8rgKsTbOVNUPvNsO7zugC2uq7YiFTWU0ro/sOLT/hl8KmomaoyfYU8K2+dbkG3EdaND32m9Oblq7oblrGbrhzrWphFgYH2oriLoDSpT40eBpC+GXmlhF2STNF7sQttu0NMrTeV34XrJ4Oj+iZ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lpvEDITyJW+6fOUY8X/bb3au1n9ok1wsBh1cz0hO7jgshcCQ1n72nkqT/XzPnfZV608dUD96EGogTN1w9Vrhtctt7X4t X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wErG1srD70+MOAWkelbdnGZoVg7h9jbxmbXbFJMtvd2sGuGwALRt8KmPd4y3TN2hcdlnQ20c1NU/6VyF/id7/ESnAc4DSKL9EAI9xKyAh8XirxGkmIVmSQuKyrvgY/ELlxEmtJg9PyeVv31qmJPRLTjJr0EONgPYrTr9YrdSXNXayjYsvMzBvT0de+Dn+/WrXc9nS6JLvzd9i6fgpSKhWhYKqF2YQzHQQkCdbwsgeGFYKJQKACEwRksq5hn3lsCKaqMm8+w1pSnBHGacS8XDpT8iuOyT0673CDqRsl8WuapSLvrn19kXWTwqjz2kMaUa7r4A+4MapOPJ9S+ixrO9GKXqioIF4xPZjA3fp5H7qt6pNBjGLotASjhlPsUgDIG9cUZIjYrG7vN/nCVgRapcrgg4kUQNID3pVzWbvv8x8/9+VTeIpjy0WECew6FFQSi2adJVNgRHiFbF1etNmy+oFgosQhZg/ulYwfWCY/SpG4jrApIY7JlQ3De/a+kotWDMiqbc7qydV6AE6hLozmBOyfmCXM/pDTG9NbsM4N+pcZm0O2RPGcVFyYZZRsy1M+EVwmW9UJ0GrjXH8Iti9YATme+iwLT5zpNwLaHISM1QH1e7bBVXizFuOfg/7gQQdyR2KJvBBtDZiWxYQQZ7Z+jrcCcrfIEK+CvwufqJ7LAYYS2R2kYir9tGtVbFQV6VORXlU8vA5w4L93hMIa3+DoeimPfQfm6QwYH0uvB204MdaJCaxFSSR8R2oIOPqn7kVjT3QhZr44adTjawkz+3tr3HLxxDB3Fw8mulMHl6B/hKFLEEKSxuz70FOr4J8WSJaUQlqE4wWkeIBgjWUS00CAXhzToeA0zvwm+Sa2wMviBUMwfoqLGUd6rDivMNznYBpGVxTBXXoGaBUjTCvuClM6sp52indPD1TogbH10HgNiHjiz4TU1ckmbjEcPQqx5Gfmr7wpjpwvYmNw72JxCkOsacA7QaVvv8Tb0EObs95sX1xUOhP5Xcre5StnnMKQCoAP6VdphIIdPaO6cjVJfNh+yCVtbBIc1d4roz5C8C0Bs+mvihYOXVM4kh9upu7ll7ChuH7n59qXkgivRUHYvgl09TQ38VPp+bRrUPemZxkcZDetagm4CKU3X5+TJFQ7Y22c7jrQxjmXFjLc8BIAFH4dNTZKkOOJif4YtS0DtYPlQP0eW/+jje6aNT9QsQpaLyW20UW6yO/7rcl1k62A54V9qaSXb77a19sOD/0+keOGEeMLZYsu+Kj2BD7k+uuUOwjFlbH7ZV+uv34c1LnJ0sgcLDAHVOmPzRiwHlLjCkN0wwzEZmC8xVasN7Uc3L7LAMpBv7lDLy6J/DijBzVgCpSGSzEn9bCayRj73X4L1+iM0E80DEhz984eumQ/7uDgOW7PbBjfyuZWl62NxYYeD7TxIcytWgveD12axX7xBqDHfbI17zcCWC3NAIwCjEc51bCW04mwCpoLXQ2lI9f2S0Aa8QrpsH0PnEFtzsP5IrRYBaS226xkX+hhQbGPhdcivU0SgQOJ69+gKzR631aSIetoibCAfNo4dJuLbX7qQt1AYjgoxtKdIkHsMBjAT9N7QRtvs0XyIRcg7msR+58HS5hpvPPYp7isdUdukbWeNT+wmiPPw= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: bff5b341-68f8-4239-353b-08dd70413513 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:45:52.5673 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LGYCp3yAwryuUeDAj6XOqgE1drxkYfCs10SojhyXcgPU0KTGSbkAp7Iy1HF9ybTvooB6QbbECkDEd2ZgeSDUjO9Q+cgW3sDkzuZL8N1lkWCnJvtqRi/hA/TlDxRZc1oU X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9796 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:46:01 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18395 From: Lad Prabhakar commit 8081a03793d3276c50d55a6f561872168eccf944 upstream. The pin configuration bits have been growing for every new SoCs being added for the pinctrl-rzg2l driver which would mean updating the macros every time for each new configuration. To avoid this allocate additional bits for pin configuration by relocating the known fixed bits to the very end of the configuration. Also update the size of 'cfg' to 'u64' to allow more configuration bits in the 'struct rzg2l_variable_pin_cfg'. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea # on RZ/G3S Link: https://lore.kernel.org/r/20240530173857.164073-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 30 ++++++++++++++----------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index cbb4780fb2d04..33eff02c6206e 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -77,9 +77,9 @@ PIN_CFG_FILNUM | \ PIN_CFG_FILCLKSEL) -#define PIN_CFG_PIN_MAP_MASK GENMASK_ULL(35, 28) -#define PIN_CFG_PIN_REG_MASK GENMASK(27, 20) -#define PIN_CFG_MASK GENMASK(19, 0) +#define PIN_CFG_PIN_MAP_MASK GENMASK_ULL(62, 55) +#define PIN_CFG_PIN_REG_MASK GENMASK_ULL(54, 47) +#define PIN_CFG_MASK GENMASK_ULL(46, 0) /* * m indicates the bitmap of supported pins, a is the register index @@ -101,8 +101,8 @@ * (b * 8) and f is the pin configuration capabilities supported. */ #define RZG2L_SINGLE_PIN BIT_ULL(63) -#define RZG2L_SINGLE_PIN_INDEX_MASK GENMASK(30, 24) -#define RZG2L_SINGLE_PIN_BITS_MASK GENMASK(22, 20) +#define RZG2L_SINGLE_PIN_INDEX_MASK GENMASK_ULL(62, 56) +#define RZG2L_SINGLE_PIN_BITS_MASK GENMASK_ULL(55, 53) #define RZG2L_SINGLE_PIN_PACK(p, b, f) (RZG2L_SINGLE_PIN | \ FIELD_PREP_CONST(RZG2L_SINGLE_PIN_INDEX_MASK, (p)) | \ @@ -240,9 +240,9 @@ struct rzg2l_dedicated_configs { * @pin: port pin */ struct rzg2l_variable_pin_cfg { - u32 cfg:20; - u32 port:5; - u32 pin:3; + u64 cfg:47; + u64 port:5; + u64 pin:3; }; struct rzg2l_pinctrl_data { @@ -1081,7 +1081,8 @@ static int rzg2l_pinctrl_pinconf_get(struct pinctrl_dev *pctldev, const struct pinctrl_pin_desc *pin = &pctrl->desc.pins[_pin]; u64 *pin_data = pin->drv_data; unsigned int arg = 0; - u32 off, cfg; + u32 off; + u64 cfg; int ret; u8 bit; @@ -1185,7 +1186,8 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, u64 *pin_data = pin->drv_data; enum pin_config_param param; unsigned int i, arg, index; - u32 cfg, off; + u32 off; + u64 cfg; int ret; u8 bit; @@ -2413,9 +2415,9 @@ static void rzg2l_pinctrl_pm_setup_regs(struct rzg2l_pinctrl *pctrl, bool suspen for (u32 port = 0; port < nports; port++) { bool has_iolh, has_ien; - u32 off, caps; + u64 cfg, caps; u8 pincnt; - u64 cfg; + u32 off; cfg = pctrl->data->port_pin_configs[port]; off = RZG2L_PIN_CFG_TO_PORT_OFFSET(cfg); @@ -2459,12 +2461,14 @@ static void rzg2l_pinctrl_pm_setup_regs(struct rzg2l_pinctrl *pctrl, bool suspen static void rzg2l_pinctrl_pm_setup_dedicated_regs(struct rzg2l_pinctrl *pctrl, bool suspend) { struct rzg2l_pinctrl_reg_cache *cache = pctrl->dedicated_cache; + u64 caps; + u32 i; /* * Make sure entries in pctrl->data->n_dedicated_pins[] having the same * port offset are close together. */ - for (u32 i = 0, caps = 0; i < pctrl->data->n_dedicated_pins; i++) { + for (i = 0, caps = 0; i < pctrl->data->n_dedicated_pins; i++) { bool has_iolh, has_ien; u32 off, next_off = 0; u64 cfg, next_cfg; From patchwork Mon Mar 31 10:44:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033445 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82138C36010 for ; Mon, 31 Mar 2025 10:46:01 +0000 (UTC) Received: from OS0P286CU011.outbound.protection.outlook.com (OS0P286CU011.outbound.protection.outlook.com [52.101.228.57]) by mx.groups.io with SMTP id smtpd.web11.48798.1743417957423731296 for ; Mon, 31 Mar 2025 03:45:57 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=DuE4DbDB; spf=pass (domain: bp.renesas.com, ip: 52.101.228.57, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gbZHuWQx9Yt5p3LtKzjsVUYkDhNuJOPAdN/GBvX0Z/lHFCQWgWtZEfCRyunp4JDsZof1y1CWUu+EwXIYIzAf9tVb+QwbTf0ZYkZKAIgLFZxzJ5b91HuQ95rngiuUcEbqUAJ1vQ5Wna00Q3PTlMbsMZikGOjCxb10Hd11VRqVGgy14LsZmgCbzUwXi4SQ9FkVwopYTV4EIHrSxerGa57RaY04tsyIK0ooRwXWZO8bS3Zynx694fu0YeKycZ0oD4aTgizrd/mzUO9j9ZrLzmuV+MTUN9EeL+iUnWP2BtHAvYcQmsVlpsx8oDVZWugVi2E3j0iNpqlo4/RXa3d5SfebtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/cGxZBQvS5euAlGQduBDvDXniAfzgRUFF3m/XwfBjsQ=; b=vCNf1/BHlmPhR2fjiFj5k+flgVpzF77ORSnw0LLOI+O71ld021eFa7sUGzdnDIiZMy8i/hA1xOteX4c3cLZfYeICKLSEExCPi36byo0YjbZD5FNh4flu/IddgrtGmxCf+Vs6/BUQVGH5pXtzbb1rkUE8DISlbaqTZpePplqls2poWG6SksWXACOOPFkvIgkny/Fx3uG+8ggJ/gQVjK3YiyYqMr3zFeGbNzql8wiXOMRPCXEhCbwgsSVxfzb6K8yPmrgwPF4/h3qTwnscr3CXjPSgP6ns/ppVjH81R7eqq1PEAdVLDrHzbtwEGiv8uBh5CJzOO3anOKySGGTCNkKOEw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/cGxZBQvS5euAlGQduBDvDXniAfzgRUFF3m/XwfBjsQ=; b=DuE4DbDBXmBCo0JiOFVGQi3fU2rXHcVUBtz5+FH07c84gmS1nt3uReL95zIgIPqtCb20HeP28NqoXMXMqWbZcUsUmA7sYfAfIrKAh+LfHwFJ/yoObG4fknV9rUV8aRB+ED/7yASi8O0ecYarxtlMVkH+x+rhFRBRr9K8vTsuJS8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TYCPR01MB9796.jpnprd01.prod.outlook.com (2603:1096:400:20a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.44; Mon, 31 Mar 2025 10:45:55 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:45:55 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 08/43] pinctrl: renesas: rzg2l: Drop struct rzg2l_variable_pin_cfg Date: Mon, 31 Mar 2025 12:44:39 +0200 Message-ID: <20250331104514.79090-9-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TYCPR01MB9796:EE_ X-MS-Office365-Filtering-Correlation-Id: c8ca43af-f248-4d97-2983-08dd704136e9 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: KegENfgBledG1at82wXyQWjV+bHbJkab183xi+/9W32qRA4fpBVR+hEAusxm3sOxEIPEi2PupeyjmqJn0Q2iiJOGH0bayRhUvoTqpfq0xp2JAYayW689XGfpWmVZCvCT34gtH2R1fh0InnKHcOFg0/N1O36uwgTSPh93xlVP2tBVtlAwEuXySW1SWlNMrN6OnOdesp4z4uFOfQZpnEfzZ2pCnTMZKdeujk6ElLWVn9HqaIVBABIOdyT6tQKHwoxvUXUGjada89HOE9SeOCsTJ+lM4zVxO+PRNkmYF+Ep2qK+h+mflzOLb9QMm9ZVQ6PU26PrgTYOjBzrEZmpgBDPB1BrceyRgT7X51mHCBxjRpT210oLsh3elxMtcWnRxgSCJis4nHpSBzd/i9T9lE2m0ARODapdhbHgK/lVTJS6AE4ctCfzwwGcHycDJNKFHC+1sYHFQyKSMoRG5XO8kOgx64niIY0b7BI4JXTPblvLkSC0JyT72F+3e7By0t1H7s1RTg7EeTtck26IufosNPgSmjgIOLTt3KOfNexkoY4fF5iLSWC7+jFi5/rF7n5kVYXhfgG1JR3HXp/BlAOVm+4xRPQGc5PZw6LOsjFEP4sKX74NMZtdcVkVesTWurrsO929cZOAGO/MFd66KpEFKp1D8boaJRdEg0jpp168/8HTSF+O4BWAHBOROQCtyZTHzYXuiK+CSSWuGWE9Q+6dzkhc1FxHmusFQ55QuLoTbvwMdL4jCh66pm4xu6kdWgbfQn+850ftijan/MlEvbuXpYwBp33y3u+jN0xRIa9fLQHS3n2gmE7NFZg2vFgJrvTBVjOW+qBWKkzFJmRYKP9tz0Cryu2TbWrnza243m84EfM/TY8y7nWF8xKz0XY2sNvAsnUrTL/pNo2XHZE1bQwdtRkQVHX5ATVuLbJYVMZ8QKlYd6t9wCQrM6iKRdwjPUjedTGkhCtU6l5OXuBmAICnM0JIM+74XOoUTO4RJNUdZnWTnGyFfB2EWDx4ptN4omBtw2gg99Su9Mz4JYq0IaTxwqkDoZBOOXCT0vkFtQ3yKYr2fAMf/KVZZo3uMGumh5B3nizbNAo4kMuZ6PdI5fjOBWHsBGoo7ATW53YL0VU5qa0BW4JbR+RIaSdZkP6RaxgZr1sQ8KxWs9BWT5PhDVlyHgnjC01l8yeCgfzdaEpUmPvQj3LD7aVeq88vHgoJpDnO3KOWWIRMDn8aIcY25L63lRunwWpuK9vDuiK4rcv2m4Un9WnOV/stREobR6wiWrCvJjtkGv+rQ4PZmmHkqlPV39DfNdof5hCQNC/H3rVPXytIINLSlUItm2Plw9FFwt+WE2WqMa9+eMmY73FuZYD98CSeQu4wG5zDv3R1LqBgLO2GcWKD/BzWquRV2v9qDNY+clUb4mneR03s11+W6ALfudfr01eDcY9FTcuaRKuYGvKFeIdrYHQ5LjHulo1GFPKWqfbp X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jgKS2gC4P/OfrVFc58NTgR6QyGmu4urhoK87PXYWtwL5rT9PYVy/KpMUTBNh/1ZMtUpzG3b996XpIgQ6dytsqM0Z+vPC3rmHdg39Q8RB3qhICdRdQ7LB8IZvGHIb6luLmL2rm/UV0hugt+BkAwJRa0cSUO3h+TbRrl0dbvJdEX7HDq1/w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zo3rjCxXvdL32bKHitjJh9186H60YsSoNnqk6lm7wpzUm1GXZjcWmpAzXmgg9CGUFNaPYrRMW4Pgqic4gQu24nbemA8pfnU8JSvqjFZzpsSVjGlcyPRZjDo/DOYFtXRkFBc6g3spFQQ/EL0P+BvnD23MXgdrJRsMumvbmZ9kLO4kzmKCdcP8DMnrfq6IiQsKU5dtSFUZocR7c9DI6yX/PJKRUtW/lzXKzxw3xG3RTP/+UCigiNOP8888Ny34w9g9/R4oPs+XsXU0D3EDK3Unx/3uJPWbvu1HJiuQIXMIUZL5s7wqSeUwUm9fCz9RTrlY0gfdSJO9YdAlhmRmUl1hZh8sqIijfFfcfwEGotnKE2tf1yuIkUZFgHA70XOYTJdV0T54= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: c8ca43af-f248-4d97-2983-08dd704136e9 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:45:55.4086 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6TmvxFIxTdp/Lnnw7cIXNeI/3QaT/3FIV9HJ67VupqqAUJUJc8ocCCqtKvOH3Ebd1m+lUoy+PIgE9oladp4kHqpg0zrwIEP5GxPUxiHCe5pshcOLTAeu2EycJydDAEVY X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9796 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:46:01 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18396 From: Lad Prabhakar commit 13a8cae6e561d607474f905028781a5aee7205cb upstream. Drop the rzg2l_variable_pin_cfg struct and instead use the RZG2L_VARIABLE_PIN_CFG_PACK() macro for the variable pin configuration. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea # on RZ/G3S Link: https://lore.kernel.org/r/20240530173857.164073-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 187 +++++++----------------- 1 file changed, 54 insertions(+), 133 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 33eff02c6206e..24eb4a375ce5f 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -113,6 +113,13 @@ FIELD_GET(RZG2L_SINGLE_PIN_INDEX_MASK, (cfg)) : \ FIELD_GET(PIN_CFG_PIN_REG_MASK, (cfg))) +#define VARIABLE_PIN_CFG_PIN_MASK GENMASK_ULL(54, 52) +#define VARIABLE_PIN_CFG_PORT_MASK GENMASK_ULL(51, 47) +#define RZG2L_VARIABLE_PIN_CFG_PACK(port, pin, cfg) \ + (FIELD_PREP_CONST(VARIABLE_PIN_CFG_PIN_MASK, (pin)) | \ + FIELD_PREP_CONST(VARIABLE_PIN_CFG_PORT_MASK, (port)) | \ + FIELD_PREP_CONST(PIN_CFG_MASK, (cfg))) + #define P(off) (0x0000 + (off)) #define PM(off) (0x0100 + (off) * 2) #define PMC(off) (0x0200 + (off)) @@ -233,18 +240,6 @@ struct rzg2l_dedicated_configs { u64 config; }; -/** - * struct rzg2l_variable_pin_cfg - pin data cfg - * @cfg: port pin configuration - * @port: port number - * @pin: port pin - */ -struct rzg2l_variable_pin_cfg { - u64 cfg:47; - u64 port:5; - u64 pin:3; -}; - struct rzg2l_pinctrl_data { const char * const *port_pins; const u64 *port_pin_configs; @@ -253,7 +248,7 @@ struct rzg2l_pinctrl_data { unsigned int n_port_pins; unsigned int n_dedicated_pins; const struct rzg2l_hwcfg *hwcfg; - const struct rzg2l_variable_pin_cfg *variable_pin_cfg; + const u64 *variable_pin_cfg; unsigned int n_variable_pin_cfg; }; @@ -330,131 +325,57 @@ static u64 rzg2l_pinctrl_get_variable_pin_cfg(struct rzg2l_pinctrl *pctrl, unsigned int i; for (i = 0; i < pctrl->data->n_variable_pin_cfg; i++) { - if (pctrl->data->variable_pin_cfg[i].port == port && - pctrl->data->variable_pin_cfg[i].pin == pin) - return (pincfg & ~PIN_CFG_VARIABLE) | pctrl->data->variable_pin_cfg[i].cfg; + u64 cfg = pctrl->data->variable_pin_cfg[i]; + + if (FIELD_GET(VARIABLE_PIN_CFG_PORT_MASK, cfg) == port && + FIELD_GET(VARIABLE_PIN_CFG_PIN_MASK, cfg) == pin) + return (pincfg & ~PIN_CFG_VARIABLE) | FIELD_GET(PIN_CFG_MASK, cfg); } return 0; } -static const struct rzg2l_variable_pin_cfg r9a07g043f_variable_pin_cfg[] = { - { - .port = 20, - .pin = 0, - .cfg = PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_FILONOFF | PIN_CFG_FILNUM | PIN_CFG_FILCLKSEL | - PIN_CFG_IEN | PIN_CFG_NOGPIO_INT, - }, - { - .port = 20, - .pin = 1, - .cfg = PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_FILONOFF | PIN_CFG_FILNUM | PIN_CFG_FILCLKSEL | - PIN_CFG_IEN | PIN_CFG_NOGPIO_INT, - }, - { - .port = 20, - .pin = 2, - .cfg = PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_FILONOFF | PIN_CFG_FILNUM | PIN_CFG_FILCLKSEL | - PIN_CFG_IEN | PIN_CFG_NOGPIO_INT, - }, - { - .port = 20, - .pin = 3, - .cfg = PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_IEN | PIN_CFG_NOGPIO_INT, - }, - { - .port = 20, - .pin = 4, - .cfg = PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_IEN | PIN_CFG_NOGPIO_INT, - }, - { - .port = 20, - .pin = 5, - .cfg = PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_IEN | PIN_CFG_NOGPIO_INT, - }, - { - .port = 20, - .pin = 6, - .cfg = PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_IEN | PIN_CFG_NOGPIO_INT, - }, - { - .port = 20, - .pin = 7, - .cfg = PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_IEN | PIN_CFG_NOGPIO_INT, - }, - { - .port = 23, - .pin = 1, - .cfg = PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_NOGPIO_INT - }, - { - .port = 23, - .pin = 2, - .cfg = PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_NOGPIO_INT, - }, - { - .port = 23, - .pin = 3, - .cfg = PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_NOGPIO_INT, - }, - { - .port = 23, - .pin = 4, - .cfg = PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_NOGPIO_INT, - }, - { - .port = 23, - .pin = 5, - .cfg = PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_NOGPIO_INT, - }, - { - .port = 24, - .pin = 0, - .cfg = PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_NOGPIO_INT, - }, - { - .port = 24, - .pin = 1, - .cfg = PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_NOGPIO_INT, - }, - { - .port = 24, - .pin = 2, - .cfg = PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_NOGPIO_INT, - }, - { - .port = 24, - .pin = 3, - .cfg = PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_NOGPIO_INT, - }, - { - .port = 24, - .pin = 4, - .cfg = PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_NOGPIO_INT, - }, - { - .port = 24, - .pin = 5, - .cfg = PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_FILONOFF | PIN_CFG_FILNUM | PIN_CFG_FILCLKSEL | - PIN_CFG_NOGPIO_INT, - }, +static const u64 r9a07g043f_variable_pin_cfg[] = { + RZG2L_VARIABLE_PIN_CFG_PACK(20, 0, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | + PIN_CFG_FILONOFF | PIN_CFG_FILNUM | PIN_CFG_FILCLKSEL | + PIN_CFG_IEN | PIN_CFG_NOGPIO_INT), + RZG2L_VARIABLE_PIN_CFG_PACK(20, 1, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | + PIN_CFG_FILONOFF | PIN_CFG_FILNUM | PIN_CFG_FILCLKSEL | + PIN_CFG_IEN | PIN_CFG_NOGPIO_INT), + RZG2L_VARIABLE_PIN_CFG_PACK(20, 2, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | + PIN_CFG_FILONOFF | PIN_CFG_FILNUM | PIN_CFG_FILCLKSEL | + PIN_CFG_IEN | PIN_CFG_NOGPIO_INT), + RZG2L_VARIABLE_PIN_CFG_PACK(20, 3, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | + PIN_CFG_IEN | PIN_CFG_NOGPIO_INT), + RZG2L_VARIABLE_PIN_CFG_PACK(20, 4, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | + PIN_CFG_IEN | PIN_CFG_NOGPIO_INT), + RZG2L_VARIABLE_PIN_CFG_PACK(20, 5, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | + PIN_CFG_IEN | PIN_CFG_NOGPIO_INT), + RZG2L_VARIABLE_PIN_CFG_PACK(20, 6, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | + PIN_CFG_IEN | PIN_CFG_NOGPIO_INT), + RZG2L_VARIABLE_PIN_CFG_PACK(20, 7, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | + PIN_CFG_IEN | PIN_CFG_NOGPIO_INT), + RZG2L_VARIABLE_PIN_CFG_PACK(23, 1, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | + PIN_CFG_NOGPIO_INT), + RZG2L_VARIABLE_PIN_CFG_PACK(23, 2, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | + PIN_CFG_NOGPIO_INT), + RZG2L_VARIABLE_PIN_CFG_PACK(23, 3, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | + PIN_CFG_NOGPIO_INT), + RZG2L_VARIABLE_PIN_CFG_PACK(23, 4, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | + PIN_CFG_NOGPIO_INT), + RZG2L_VARIABLE_PIN_CFG_PACK(23, 5, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_NOGPIO_INT), + RZG2L_VARIABLE_PIN_CFG_PACK(24, 0, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_NOGPIO_INT), + RZG2L_VARIABLE_PIN_CFG_PACK(24, 1, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | + PIN_CFG_NOGPIO_INT), + RZG2L_VARIABLE_PIN_CFG_PACK(24, 2, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | + PIN_CFG_NOGPIO_INT), + RZG2L_VARIABLE_PIN_CFG_PACK(24, 3, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | + PIN_CFG_NOGPIO_INT), + RZG2L_VARIABLE_PIN_CFG_PACK(24, 4, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | + PIN_CFG_NOGPIO_INT), + RZG2L_VARIABLE_PIN_CFG_PACK(24, 5, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | + PIN_CFG_FILONOFF | PIN_CFG_FILNUM | PIN_CFG_FILCLKSEL | + PIN_CFG_NOGPIO_INT), }; #endif From patchwork Mon Mar 31 10:44:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033448 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83F27C3600B for ; Mon, 31 Mar 2025 10:46:01 +0000 (UTC) Received: from OS0P286CU010.outbound.protection.outlook.com (OS0P286CU010.outbound.protection.outlook.com [40.107.74.14]) by mx.groups.io with SMTP id smtpd.web10.49052.1743417960564487065 for ; Mon, 31 Mar 2025 03:46:01 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=Dr/ZrypO; spf=pass (domain: bp.renesas.com, ip: 40.107.74.14, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Fy5D7SKnk/iyOoPLmVvRTRcWjPT23w+XxjHiS4g1nwgDL9mzJLp26d/N0bwWJSaNPwLvF1/Gg6R7oFZM0NFyOhXx+VAeK1wXSXYz1ckBc6HVO5RpFqtV7kH33QMR99gOG4T32JI4VdF4iG+a6M8fLkAk8vhtoWFH3xI4fztXKH/+yUIaktc7V+wPzepJAJajkkkp/kU/S/Ref4fZQWjBKL6+FYXQibJ5JTp5RJrymOIgcSHHqL9DrSTE2zrOI1Jlu1s4b8RtfuCgw0qBKXK/jH9gFeAdr2ThmuP2Q+4KRVq4Po8kbXgR1mrsuSEmeoDosDrNfmfC7Tkta/MDCwwIpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hFicCzmJs8mrRo3iByyT7L2GzUWBiK3CGQTf7uQZRRc=; b=iklP5FEh7LNbImzLkg7blG0Ls9xSNAe0jOEeFMvd072h50aEz1aOWaVUJGaAzdW0XpkZKIhRnsue/hF6oxRFByLL+N5paQI793bfBu7TEULiBgmlgZ1Sq02DhyQYw2GVrjMsvQnQqUvEe+cWxoE8YVBDXaX6fhQf+yvKnehcZiGsB7awwbmwugWYMhOcbB1vWm9NIK9nQMpVDx8lFKJF+0pQxIiuUu4MyckmXyHTGE9gstv7GbGYGtlcy/4ekfutjKkezjLI48k7JOwQdbsFZPemgcCYFCOBzr7/8048cnLwq7UMOQELmtXxPYMiw+O1Whs5cgIBOPI/nQZVkz/WtQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hFicCzmJs8mrRo3iByyT7L2GzUWBiK3CGQTf7uQZRRc=; b=Dr/ZrypORza6DuHPWfEeXRwngpoV7m1MjJR9q/bkakM5ujxKQI0eDwZmCmnkMg1aBFGs7ZMNlr7i2drJrQUjSU+u0HzwlFzxl4am0MBOKI+M+WiovughzLTZJBZxyeV89QdZ63xIJxvI1p7aAwExkW+erLp2ynBNVK2m7J0PCvE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TYCPR01MB9796.jpnprd01.prod.outlook.com (2603:1096:400:20a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.44; Mon, 31 Mar 2025 10:45:58 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:45:58 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 09/43] pinctrl: renesas: rzg2l: Enable variable configuration for all Date: Mon, 31 Mar 2025 12:44:40 +0200 Message-ID: <20250331104514.79090-10-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TYCPR01MB9796:EE_ X-MS-Office365-Filtering-Correlation-Id: 4c09e864-1db9-4652-ec34-08dd7041388e X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: IL0W9u37MYIZ6XMND8H6M6lqIXWeIpJ+4PkusEUTl9cyMvMulBmK3UcctC8K2d/txMtZEAqR62hTW2eooqpf6+aoP8TjjXrfuFe+HSJmtETeEhtwswCGhSg7SKFEaI+MCl87CEx6xYoB16gtFSQ7zCt9zhOc/bn14aalBFNqXb9eZCXW6jj+NokHo+5GL9QlwqBl3X389hcNGZvf1jYrDGqYn3BRCfjVLKfHzgf41BA2rbRoNZawzk1JvGOxuTfUfvN9iIsDQcAqivhlW1RAtOoG9u0TslIYxu1Pq06LrhefA1+oBaL2q1YTaEOzimeq0dY3FHWzCmkVws11kJIsCaYyYJlSYkElGVLmK59PMc8FWg+xh9LIrt4DmegUWMsuRZhTcRCF6OjbkuHmrnfFJkDlkWrL8aQbRhyNhlYabttxxBONAWy3MLD1CYpKIJlcatbljhVGCRZhUYSrWk51fyUa8zs1Lb62fJahg5cbJrWQikL/jJtKhdzuYc7ykZzPBfTuwa4vHdIY4/e4YUpxMWtsTFPSlaiPKEm1S+A4JSBiFPoB3MmO9vxsH/AsQP8LCjWTiQHsPmkxhGSo3rAudtii1iUuZa6yNU9OgMk5Eyrd+cnoRvf+pEKLMqWYoNq0/FWB8VQ9pGflVEOqL2gTDIyinly5dCwL0qq9Q3c++ZurPSp4sVhRT9dW3aLf5jWuJORcgqxjK/STkKDkcdPveo91rVIleu/4FM41T5bz9NCP7+4tioNv6vjnYUrvM1J28A6dfnXhcBOwJTnDDIJPHvnz0VwyZhVG2kl9dFtYP8RZyea4cYTWxiycPPX38RD3A4sfmdb2JDFLKaO1ErgQQUwB8CAw1Qyc5GTZpk5+Kj6y4GaFiNHVtmYVOAMOYB9Phl3UGVR8P06/dqLu46x4IE/R8kx+8JBhWR/Wk+EZcNjCg5xBMFzBpAMOqwTL+TRob0WoLH5mV4RVTJToIWtykS35IWQKFSLtOQ4GaoP0t5STFDccUIwv1QsIJASxoJWUNizhYt3s954HvBeJJgj2PMrA8UpY7rvBFCN47aPNjzvofzCPndx8ccqxxgb6TjBQcScHgXa2hT4QyTy5AHUkv9vsbTpMBu7WjtjPW/BysAVtSIEFudlLOLAck2a6JgEydp9nHRjmpACVkd/B03N752NfLD5FJsNvMYN/aTs25ZoKpvHYQLNQuUP6aX0K+ZrtIC426et6e+nj0z97LuF8LknrCmfb7avhXaNw40OM0HHPpJRUjYpFmR39RLNQpi0sf5YoV3zAVLArmxNkOh0QUqnZ///cWJFYNdCwITdujdtAnkiyZIBBnix3J/vbXZKC9Xgc0i8bxFWbV/2qpVTu6ztLr8k7QlJuW14BmsduIlXbLH1xA4GibKag888M0x4R5p4CZNzRDUpBlvcqzcr4f/Kr1Yf/1T6ffHrE9Vn21YOVR5s2S8gUfK4qylib1C5R X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BXe/J6SwYftlIJToA1pZCM2LsVGQlkniIReh9sj80DCVMDVK/9pAAXHe/dAkkbeVZZNmxL6AG3gr40C5mYVNtXWOgCH6YaeRUE/KHirJH3M0BCU/Kus+u7h42stjndpEeMlST9rLn9jAgtFSd7Qf7eEsG2OT77m38EbqP3Is1O4fQ+3bSxjYRjhhYaLUC5ouIeKyLjNCKetPY/kB9d7c+dgCcrN/koUlK+TjVmE1XOlvyyFbArST2cELCibqfcyj2UyEnOs87A/LsPz/A8UZPXzLAOD1Yb2xV1TToOiVpajYSWDjSh6/hgTi+5CWl3TKN3cUkG9K/NuzOBD5DM64sEtpxCWKjHlScL6cJ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aE5HK1f0aagEzav9oHdH+IYsyJTnVvlVGISufGgleXd3xJ5d+lvl334bEApfOMGblMKeW3AgaZx+V7m/rN/1AbgXuN3t5XdKp86X3Kk1QS2EOhdrxkUhZTytQn9mQQ3U+zskZvmccNLMRRhyXvnayxsIqytV5ZnWh1W573THWi0XUXs6jsTk8H0/OU/86Z2vwbQuoJscY2HA= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4c09e864-1db9-4652-ec34-08dd7041388e X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:45:58.4229 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: wgnk4N5jKNavSuwwuh96NlBDIYIit1s17MKiMFb3MaALtpyBNrPiB0nLF0vjzgyVZvIgPyrkrHwl62a3M1zmxLvjwPIRMzTIU3VzKqnduQyvT1fsr+Z+AimMCSDJF6+o X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9796 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:46:01 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18397 From: Lad Prabhakar commit 08b68ae5a0276f293c8da602f963f6de68b3599b upstream. Enable parsing of variable configuration for all architectures. This prepares for adding support for the RZ/V2H SoC, which utilizes the ARM64 architecture and features port pins with variable configuration. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea # on RZ/G3S Link: https://lore.kernel.org/r/20240530173857.164073-6-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 24eb4a375ce5f..0d3ffd7617625 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -316,7 +316,6 @@ struct rzg2l_pinctrl { static const u16 available_ps[] = { 1800, 2500, 3300 }; -#ifdef CONFIG_RISCV static u64 rzg2l_pinctrl_get_variable_pin_cfg(struct rzg2l_pinctrl *pctrl, u64 pincfg, unsigned int port, @@ -335,6 +334,7 @@ static u64 rzg2l_pinctrl_get_variable_pin_cfg(struct rzg2l_pinctrl *pctrl, return 0; } +#ifdef CONFIG_RISCV static const u64 r9a07g043f_variable_pin_cfg[] = { RZG2L_VARIABLE_PIN_CFG_PACK(20, 0, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | PIN_CFG_FILONOFF | PIN_CFG_FILNUM | PIN_CFG_FILCLKSEL | @@ -2219,13 +2219,11 @@ static int rzg2l_pinctrl_register(struct rzg2l_pinctrl *pctrl) if (i && !(i % RZG2L_PINS_PER_PORT)) j++; pin_data[i] = pctrl->data->port_pin_configs[j]; -#ifdef CONFIG_RISCV if (pin_data[i] & PIN_CFG_VARIABLE) pin_data[i] = rzg2l_pinctrl_get_variable_pin_cfg(pctrl, pin_data[i], j, i % RZG2L_PINS_PER_PORT); -#endif pins[i].drv_data = &pin_data[i]; } From patchwork Mon Mar 31 10:44:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033449 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E4E7C3600B for ; Mon, 31 Mar 2025 10:46:11 +0000 (UTC) Received: from TY3P286CU002.outbound.protection.outlook.com (TY3P286CU002.outbound.protection.outlook.com [52.101.229.48]) by mx.groups.io with SMTP id smtpd.web10.49054.1743417963420854391 for ; Mon, 31 Mar 2025 03:46:03 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=QdUQCUGf; spf=pass (domain: bp.renesas.com, ip: 52.101.229.48, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jOQrh1Mqe6EP69UIwziNp5fBxnC2qx3q+TcQlq4sISDOWrUyEuYbRjc2wNqo6G3fkkCw7F2FO31oQWK81QkIEJwgq4b1wBuQMY78FLPG+gIkJvv4I4CEXaWXR3iw/SqnoAK3lfMd/dNjjm4fuT3CHAcRahmemMvpCzbVG723SkjGHJ/CFT4tHuMVHSJvWoJWUKCR0dsO2IjHqhEpnqpPSfMpyXpiEbPrlXmZsKr/rq2Yp0w9IBlZjOSEAeb7dDbUTWK6gd+wfSORdtVEVkabBheEvU/kOgggYcUjZEzWv3QSMqxi7kKA0PjI7rUvV1TjcPJE+XUomPEacplMUmHMcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sJdDsx0gpxNztSPhjhDmJzhBGAbD2kx7tnLry2gOd2Q=; b=FviP8Wa4gZZ95POOzBnAh+t5fSGbtQu19INb2FPpaAf48fGuGXOOvwtC5V7V9EN1ZdkQZm3ZAoRV81jZnN1X5b8hessVDdPJHfLTT8ztz3qXGceGNfOMuD/jlFimGIDYwXSZX5sWhgk211pfPB1HwYvFx4Aff+2vnZn4LHZyU6vCCGNvsg4XDmBp3OWABmgr3NTaMouvR5ZowHZCmIq/k2LGo63xgjCV63RR4FrKZWsVJU0ijQmlAbjZanze1PSTkTNN/5QLvzGWXFbT4poZYyV7VwVrurIs6mg5XWodEPx9auuHQsYAWmPvPHtsQ3t1JGAZIbYfus+aFarPX5F/Cg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sJdDsx0gpxNztSPhjhDmJzhBGAbD2kx7tnLry2gOd2Q=; b=QdUQCUGfUJGntXj9AVi+BZfQiIdG/77bgB/GoSbNp7JkSZAKgOYzUGyfwEF60uqurtY9RmpFrUqWbcIyscsqzqe1xAc1VRgvvqCrp77vAiTcMpwknjvZh9osw5UsAmYIiPM/hDcj+/9bvbECk2o0GdDeMZNP/T03hYYRQnwQ1Ok= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TYCPR01MB9796.jpnprd01.prod.outlook.com (2603:1096:400:20a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.44; Mon, 31 Mar 2025 10:46:01 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:46:01 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 10/43] pinctrl: renesas: rzg2l: Validate power registers for SD and ETH Date: Mon, 31 Mar 2025 12:44:41 +0200 Message-ID: <20250331104514.79090-11-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TYCPR01MB9796:EE_ X-MS-Office365-Filtering-Correlation-Id: 97eed8aa-927a-41da-4eed-08dd70413a5c X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: uRkQTgpJC7U49ZC9V0XTN56K2vrAIDL3lN5TeFWU5SxiQ0uB0EBr39XLWTcMBph69zDGFLT+Xd2n9HqUMySHSBet43RMReXhD+eWcgUljmnMfDew3mEpat4ARx89qhxC4BAOGClVmzXMHojwOL78rMLBqyquj41GiwLs/5I/rlndoxbUe3o4GmPTu+fJ0C2opk3WkaXzFAy76m/a1ZlPjRk5z8pf8vmPWCaKiGuQUYdsYN6XznaSHctzSu1VhfI8znAHo/USHK3KiEYairOXxEcHsEJksVCQt3sExiic9XDmWoH/tNafC9IBVGsAAuq/M5gRgtSUd7xbGOYTNamJEgRc4a2Sfu36+fQIUQitzGzzDyBCkdO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2D3VAIh X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jApGCXDEr8+Du0PRRBOSLNDRxJ5IoSKBr4eKizEggI3uruczHqID9emJ2ARKh66DxlyeC8Sz5mpNW0FcoG2b01bgbt7LxGPuHM6qArTGfz6osfLpZAI3GgPAgHVV3wLTURY9QKkcdhMVVyZtUNC0k0obcy8cdlidS4CiLzxRdCx2OVwMifiDFyGgRn+dPwiU0pJDECB1H/XxrFTweoV6wmT4SobTAUJ6byIioLUSKt4S+m1ybATYji4KX2lDUo0nWAg7rJLIoSjPX4W0gA2MVp5CHAMq5TPMuiyWIWTF0H2sBdMqB88mkkcsitnshNY9YNWCse4cT67PJJlUCeqqhfkvllyXCMsn0fQzzoTH5cqqTWhxuZZbDRxjwNgtBVfRLLcb0jizurDhT9GS/rkcDytcVN5ftsFU6JHyinVlFf9IxW76NSUeSjEiUU7jacpOkFHxwtTU7pta/2/ywXw/AvWXtbaDmMwGpq2pby70d6hwjOmR/71Pp7K4laSBf7vC2XbZl0Qjoq587AE5x4txtRXX/r5QPi2rZp5225clCw5vkymAeI0WVUK5nhKF212vGBCDl526ra2rguOWGTnWvMWbLtLY6IcFoLLoyh2LREBl/aFurlEwkYihPngf6mUTBYz20XRyJEJ4z/A0k6ovz+NERMgj5/2ZCeZmMbCe5N0qZzBFjxSbiHEVzUr55iiWngHJe+sHXCvTLY43gZkFTwhFc554ocYmgl5+dHC9PR9DjwhBdbubKdZmIXx1De17TglMPSyIuuEdAakt64m11Xj8qybFsCOS/aywL4T/ojjDxEbL+bPwC8F0mKJ1XT+VEEKjSZ7wwHNOcTrvJOIZQj+ff3QwlqQtQZ8ok6NgYYyIk699US5XmIyXK+w9oi1Vm8tN361kHsdH9GShMdeuoXiSizjUgfBDJYCwRQA4blMQJu94bmgnhvaS/Cnz66rxt4He2MJ9yFS0jqqLpzesASyH8SptlzKSUtMv6Po9v1VNDguSjV81SLot0Y/kGZA6okrFbwN1cSvpmzMdLmy5wyshoYFftTqiEaYdoRe2De/10mahQ38vxfugvN5MywSTRKwIgJO/1XJExF3wkePT+STfYxr3fmbcI1huO7HN/w86PadsOeD6kz7FqSUpWn4Yj2MokMo88bTbYAM2xD2y4uG3Dk9TV036K0ABrUu4pcEYCACjK6YhkiHieV8ERVUnxDzgTtBvpzHEbFyxitZyUxQVRzqB2bu2ggoHmNEGij2TIPIbDzJY24yO9FVLXaW10+iFh0O3kO2Pz9Wgy9aLKvGiD6BnJqXF6qN6F5joVx4krh1t2yhG0mVCQAGJIk+cDwK7v2U7BTsrQrDNJC4f/AthShoqUTkhZf9ihCmSlMl+CVCU2tl27mS1rZg2p4IwWCaNkol4iaRJR7evPHMIJagD+KijcSDB7xFHlowvoBsWkSQzm7ulO97Vf+BVDkjJbCYqcKsGGXFB2FzGc54Vyq7Whd58PaBq4AK7IqB4T0wcmFUsZI/lbxfOa14DaF4tOhLab7UR9hcsV7n06OArE0i62eLrB3J3lroLY47YR+OVcf0UQoTPggO4NOOInTDsHnlz3v3dCSzVP7f94QKBZwzxUrAd70MHZGan67DSaBM= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 97eed8aa-927a-41da-4eed-08dd70413a5c X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:46:01.4164 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: F8RVPu6C5iAz3Yw5gwJJAFeh/he1ybxOLAdaVOTy9zEI05QMTYLM+vDtKMlxaW/D4WzPYgiE5xSbFeNp1TQ5A5iCvQ7TFT75ptqdk7F3/7V7z8hfdOu/sgKBQrXl2PBp X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9796 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:46:11 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18398 From: Lad Prabhakar commit a3a632ed87f0913779092c30bd0ea7dfd81601f3 upstream. On RZ/V2H(P) SoC, the power registers for SD and ETH do not exist, resulting in invalid register offsets. Ensure that the register offsets are valid before any read/write operations are performed. If the power registers are not available, both SD and ETH will be set to '0'. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea # on RZ/G3S Link: https://lore.kernel.org/r/20240530173857.164073-7-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 0d3ffd7617625..b6b53757d803b 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -2503,8 +2503,10 @@ static int rzg2l_pinctrl_suspend_noirq(struct device *dev) rzg2l_pinctrl_pm_setup_dedicated_regs(pctrl, true); for (u8 i = 0; i < 2; i++) { - cache->sd_ch[i] = readb(pctrl->base + SD_CH(regs->sd_ch, i)); - cache->eth_poc[i] = readb(pctrl->base + ETH_POC(regs->eth_poc, i)); + if (regs->sd_ch) + cache->sd_ch[i] = readb(pctrl->base + SD_CH(regs->sd_ch, i)); + if (regs->eth_poc) + cache->eth_poc[i] = readb(pctrl->base + ETH_POC(regs->eth_poc, i)); } cache->qspi = readb(pctrl->base + QSPI); @@ -2535,8 +2537,10 @@ static int rzg2l_pinctrl_resume_noirq(struct device *dev) writeb(cache->qspi, pctrl->base + QSPI); writeb(cache->eth_mode, pctrl->base + ETH_MODE); for (u8 i = 0; i < 2; i++) { - writeb(cache->sd_ch[i], pctrl->base + SD_CH(regs->sd_ch, i)); - writeb(cache->eth_poc[i], pctrl->base + ETH_POC(regs->eth_poc, i)); + if (regs->sd_ch) + writeb(cache->sd_ch[i], pctrl->base + SD_CH(regs->sd_ch, i)); + if (regs->eth_poc) + writeb(cache->eth_poc[i], pctrl->base + ETH_POC(regs->eth_poc, i)); } rzg2l_pinctrl_pm_setup_pfc(pctrl); From patchwork Mon Mar 31 10:44:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033451 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85FEFC3600C for ; Mon, 31 Mar 2025 10:46:11 +0000 (UTC) Received: from TY3P286CU002.outbound.protection.outlook.com (TY3P286CU002.outbound.protection.outlook.com [52.101.229.67]) by mx.groups.io with SMTP id smtpd.web10.49057.1743417967441982242 for ; Mon, 31 Mar 2025 03:46:07 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=g96876DZ; spf=pass (domain: bp.renesas.com, ip: 52.101.229.67, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DGIZVf7QrrtfHU+ulWNYOaLCJixGk+LFQQSjRyZrqlOH0yiNNqfp7vqK8c6toOWl1lZK8r7kKcHt2Sn7a6j8KJWzcr3dme0VgUsfouAZKGPbSHvmjbQrCC5spY3NI02+vyL4o2pnMHIEn/6jzUHT9FFbj5DGlMYfFrlZ2FjZyD1wuxp8EAxhOOfd/1um/ZGeWwqYhF//s7TgmRE1SsE0+cF8HPHsS2IVuj1LogkXgNLFzRyc2fzp+6oLzQovEflgZW+Y6+29FcNLNUPu37A8Q/DsSCbIFWuzgOLf3waCaDmPc7RpT6qhKRjan+GL+oT3NDhDTjjufPuFXuHD8vt2hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aVKcE8jCehCsEg9QOiPHSCmCMHomGoNUpRGbtJf8BPc=; b=UpdSlg+LGrwmOykL9K4AYQuOIKV4MAEB1LSOd1HQK13yt6Zjbq7RuCmdr2m+kGBvTN6yn5OpmOPkA+rG7A2ApAs4bJTdgcH1WN5S2XxgcFayL+LUPy6Wz4VYshP8g4Exow3iUdvxAfxr2DgpAPa/a5/k6Ozuq4/7sDuOY/3/MHUs/V/YXIGWyWbZyphciK6hxv6xqzBSlVnzhPSB+hXvSuPhSDHSwyqKVng2sHbiJwKUTrHk7p7eAZ5ik7OCRJ/vK/rShxhLSAytB7+wcIJpBVaGfxnkX9DW35kHKudoPknjAtayf6AMelUX9fCuR98oRkJR9mbYOu6OUHA61CcfCw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aVKcE8jCehCsEg9QOiPHSCmCMHomGoNUpRGbtJf8BPc=; b=g96876DZz1Prwb1LyCiNoRQaxq0pShsgX68KJWAL4L/D+2ajxbGIx0t/ETpFXROlGEhq8HCxO0d+/SV0vo6VgtWnCSQGfGygWaMzBcp75eIJDJ85XzWnUB1ix+LN7Uou5JAG128TwEMlUG6EUYIgptaUHgjgbuOUboJ+LZ4sjO8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TYCPR01MB9796.jpnprd01.prod.outlook.com (2603:1096:400:20a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.44; Mon, 31 Mar 2025 10:46:05 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:46:04 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 11/43] pinctrl: renesas: rzg2l: Add function pointer for PFC register locking Date: Mon, 31 Mar 2025 12:44:42 +0200 Message-ID: <20250331104514.79090-12-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TYCPR01MB9796:EE_ X-MS-Office365-Filtering-Correlation-Id: 4d0b727d-b2c6-4667-e689-08dd70413c26 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: S11Ut8BGzZ75MczzG4+waeESfmXgOZF7l7miFgn7TFQeFxGSl6Rp4vZc8uLUUYhL+XHt5MC0DRoz080qbmXbz8P5GmrKeTo3ySYxQ6eqtEbMOWbngGwC0ErKkX/XjLowNfGX5PKL4D3lea2w4arB87XP/cwbA+KC3b0G5pJI9MUEekPqeAfvod1yLjzH+ZpfZN6UXPVpctCCB29RBm8rnO1N6l5QbGmo1cGrbPSoQBY3pEVY8bGuZqbZOoYtYyrEyoWbv8XkMkRcPQXnod2GEH4Eas2wfwi05dq7DDPIi0Q0emSlPEMiQ29VA9MyXd/fGgK1GV87eBYfY1bDdqiYRNPvK9HGwirtETkdqzZztsXmWGWC4Yu429qo7lb2mAt+kg/Is8mCVEOyfcs+GoX+unYK39V0B9pZEfjPuPoGwmS/n9xgyJXP2JYCd0V0abSzmww5fgZZCg0+T9BdgRwH5V9lYIHqqRTXaepoNB7uSaSKKj7Rwx+7ZSHKO+8wWyCvvbinXDVBJqmt4OOHAw2hS7Ya8+6cu/Ih0oyqQsDO5cjGvQU5vt4tyxri5Y1bIeyW+Vvs5zSKHls35MNN1ob19S5NgfzRgQ0t9c18S3b3RwcVdIfb/h2JmmHpYaKL9t74LgkfAnWHDMOXt7pBDb9Toe4PYu7XTeZzOCrpfywTgvU4pafA3Fdi24M+S0RyHov5HKfL1akyf7PEXeHwqc2c3XPOlqiia2W4YbL4rHRAbm5CUJ0kWNgamp9h7QyXYSOR0fg3jYEo2XicqJRQDYnLoM3Ez/B0Av8wKcyyItv7TpwjyqBBQJ2d/1QGujGPzupcRLAkyw+6TsgPl9HDvBY0WMDP5V44MOR5dii4SYsOPrVYdLUXitWD28Cq2BnqF41V+DljV5Qg5LHloU39r0RBzCOXN5OPY4oSWm3nkhxOwisEV8BqiIHv3KnvHwGCD4r9YHgIj/tpcQUoHdub9I+kxOrmrl0/ol9zK0VABRAKWKDYQ+Owm7PermEgvWfHo12BCAD9g54tpRhJoNC5VY1Tr02AtsLvCcD2InPEdsBXTloOoX5LEUkKnkWftyKXZqY+zqdXb7SpaibjLvprlDCtPB55ojStqr0pS0Ps+3F2JxXkYutBdkXdMkQdB5NnuJ+wdjnFd9hJxjrhRpgo+5in33486hpbvo/l90vDU63MiZJq6xicEF8LUVvtRJ3gsTPde3EnSEDBihzeFiGkMqO9Zntamb21tj+/68AHXvTgllD0AZrbg1gAz9HvaKkLg9FBsyfzTOTyngJvaZoMRJSVVMCuBjXlKhtZ5FIZDMtCU6ybrBltSn6oA8cCDjOWhqpQ0hh4Cpg2CJFieOmwWFhqukVztXkybOpuxbXT4NFmv+SjTa3pH+kAmd1+jKPIkeLilDT5as4HNfY2EHNbcJYtiT7ww+1BZlQBNZQDBVvuWLVftn1Xl9lBUdKMY7gRNv0J X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: CBe1lnQqPbzbDqhZhlHVSUuqvdkdrZTv6ATDrL7FLddJZBVQNU3KgZnIqLdFFb1/fO1Vo+oaOCjhISG1QcouaB9I8lfDWP+a2jTdIwcVs9gTMCqC9OP/rwMtXU8pWK+G2mCTt8O694Z39AzJ+tYORY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sNnFKkRLJhMpmJoiySoLHjQHL7igX/fWHAih4vPWR1eNMASiuhqgoJ51a4M95vM1LlFfJP1BHZ2GIfacTODiCd5ufOgERkp1ePlUYQS39jwnDRtpEx27ovnFhLMW+ENQt7lPjz2pik+ORgPKGUQ8ruIyEM+WOxQd/Fk2wD9fMva/mKdpPvQaUuH1gC0ovCh94IgdfaGA7qpEwsoMh3MPTE0TYbCwflYjWgMbMnlzIoijfSLd6bVrjW9oqE+rRizkCicrZVGAM0WySI+0GXxhGoaxAiGUXQELNelT6y2dfRi3wF4G5g2WZkir6y5XCWrnWk6sWoi0ziCet5X/I5RdD252iskzsZ1yQfDJAPgOTX7YYxnejeVLXCrecJyFhpwcvyspSidGu9e3TS4= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d0b727d-b2c6-4667-e689-08dd70413c26 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:46:04.4245 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bZ3NQHIWQov3LEFAyENM5p0frQqMhvvpNQTNH6xKvNlVV+9kAuD04ECjdPL3NVt5xSOab7gks8e7bfChiNX62ZDoWcSV3vuXaneJo72r09ZAjgvCgLuq4zwVMDgVhWm4 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9796 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:46:11 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18399 From: Lad Prabhakar commit 14c32dc1f63d0de865e67c04c919ae036de20f87 upstream. On the RZ/G2L SoC, the PFCWE bit controls writing to PFC registers. However, on the RZ/V2H(P) SoC, the PFCWE (REGWE_A on RZ/V2H) bit controls writing to both PFC and PMC registers. Additionally, BIT(7) B0WI is undocumented for the PWPR register on RZ/V2H(P) SoC. To accommodate these differences across SoC variants, introduce the pwpr_pfc_lock_unlock() function pointer. Note, in rzg2l_pinctrl_set_pfc_mode() the pwpr_pfc_lock_unlock(.., false) is now called before PMC read/write and pwpr_pfc_lock_unlock(.., true) is now called after PMC read/write this is to keep changes minimal for RZ/V2H(P) SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea # on RZ/G3S Link: https://lore.kernel.org/r/20240530173857.164073-8-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 44 +++++++++++++++---------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index b6b53757d803b..95b51f31c387d 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -240,6 +240,8 @@ struct rzg2l_dedicated_configs { u64 config; }; +struct rzg2l_pinctrl; + struct rzg2l_pinctrl_data { const char * const *port_pins; const u64 *port_pin_configs; @@ -250,6 +252,7 @@ struct rzg2l_pinctrl_data { const struct rzg2l_hwcfg *hwcfg; const u64 *variable_pin_cfg; unsigned int n_variable_pin_cfg; + void (*pwpr_pfc_lock_unlock)(struct rzg2l_pinctrl *pctrl, bool lock); }; /** @@ -382,7 +385,6 @@ static const u64 r9a07g043f_variable_pin_cfg[] = { static void rzg2l_pinctrl_set_pfc_mode(struct rzg2l_pinctrl *pctrl, u8 pin, u8 off, u8 func) { - const struct rzg2l_register_offsets *regs = &pctrl->data->hwcfg->regs; unsigned long flags; u32 reg; @@ -393,27 +395,23 @@ static void rzg2l_pinctrl_set_pfc_mode(struct rzg2l_pinctrl *pctrl, reg &= ~(PM_MASK << (pin * 2)); writew(reg, pctrl->base + PM(off)); + pctrl->data->pwpr_pfc_lock_unlock(pctrl, false); + /* Temporarily switch to GPIO mode with PMC register */ reg = readb(pctrl->base + PMC(off)); writeb(reg & ~BIT(pin), pctrl->base + PMC(off)); - /* Set the PWPR register to allow PFC register to write */ - writel(0x0, pctrl->base + regs->pwpr); /* B0WI=0, PFCWE=0 */ - writel(PWPR_PFCWE, pctrl->base + regs->pwpr); /* B0WI=0, PFCWE=1 */ - /* Select Pin function mode with PFC register */ reg = readl(pctrl->base + PFC(off)); reg &= ~(PFC_MASK << (pin * 4)); writel(reg | (func << (pin * 4)), pctrl->base + PFC(off)); - /* Set the PWPR register to be write-protected */ - writel(0x0, pctrl->base + regs->pwpr); /* B0WI=0, PFCWE=0 */ - writel(PWPR_B0WI, pctrl->base + regs->pwpr); /* B0WI=1, PFCWE=0 */ - /* Switch to Peripheral pin function with PMC register */ reg = readb(pctrl->base + PMC(off)); writeb(reg | BIT(pin), pctrl->base + PMC(off)); + pctrl->data->pwpr_pfc_lock_unlock(pctrl, true); + spin_unlock_irqrestore(&pctrl->lock, flags); }; @@ -2439,12 +2437,8 @@ static void rzg2l_pinctrl_pm_setup_dedicated_regs(struct rzg2l_pinctrl *pctrl, b static void rzg2l_pinctrl_pm_setup_pfc(struct rzg2l_pinctrl *pctrl) { u32 nports = pctrl->data->n_port_pins / RZG2L_PINS_PER_PORT; - const struct rzg2l_hwcfg *hwcfg = pctrl->data->hwcfg; - const struct rzg2l_register_offsets *regs = &hwcfg->regs; - /* Set the PWPR register to allow PFC register to write. */ - writel(0x0, pctrl->base + regs->pwpr); /* B0WI=0, PFCWE=0 */ - writel(PWPR_PFCWE, pctrl->base + regs->pwpr); /* B0WI=0, PFCWE=1 */ + pctrl->data->pwpr_pfc_lock_unlock(pctrl, false); /* Restore port registers. */ for (u32 port = 0; port < nports; port++) { @@ -2487,9 +2481,7 @@ static void rzg2l_pinctrl_pm_setup_pfc(struct rzg2l_pinctrl *pctrl) } } - /* Set the PWPR register to be write-protected. */ - writel(0x0, pctrl->base + regs->pwpr); /* B0WI=0, PFCWE=0 */ - writel(PWPR_B0WI, pctrl->base + regs->pwpr); /* B0WI=1, PFCWE=0 */ + pctrl->data->pwpr_pfc_lock_unlock(pctrl, true); } static int rzg2l_pinctrl_suspend_noirq(struct device *dev) @@ -2551,6 +2543,21 @@ static int rzg2l_pinctrl_resume_noirq(struct device *dev) return 0; } +static void rzg2l_pwpr_pfc_lock_unlock(struct rzg2l_pinctrl *pctrl, bool lock) +{ + const struct rzg2l_register_offsets *regs = &pctrl->data->hwcfg->regs; + + if (lock) { + /* Set the PWPR register to be write-protected */ + writel(0x0, pctrl->base + regs->pwpr); /* B0WI=0, PFCWE=0 */ + writel(PWPR_B0WI, pctrl->base + regs->pwpr); /* B0WI=1, PFCWE=0 */ + } else { + /* Set the PWPR register to allow PFC register to write */ + writel(0x0, pctrl->base + regs->pwpr); /* B0WI=0, PFCWE=0 */ + writel(PWPR_PFCWE, pctrl->base + regs->pwpr); /* B0WI=0, PFCWE=1 */ + } +} + static const struct rzg2l_hwcfg rzg2l_hwcfg = { .regs = { .pwpr = 0x3014, @@ -2608,6 +2615,7 @@ static struct rzg2l_pinctrl_data r9a07g043_data = { .variable_pin_cfg = r9a07g043f_variable_pin_cfg, .n_variable_pin_cfg = ARRAY_SIZE(r9a07g043f_variable_pin_cfg), #endif + .pwpr_pfc_lock_unlock = &rzg2l_pwpr_pfc_lock_unlock, }; static struct rzg2l_pinctrl_data r9a07g044_data = { @@ -2619,6 +2627,7 @@ static struct rzg2l_pinctrl_data r9a07g044_data = { .n_dedicated_pins = ARRAY_SIZE(rzg2l_dedicated_pins.common) + ARRAY_SIZE(rzg2l_dedicated_pins.rzg2l_pins), .hwcfg = &rzg2l_hwcfg, + .pwpr_pfc_lock_unlock = &rzg2l_pwpr_pfc_lock_unlock, }; static struct rzg2l_pinctrl_data r9a08g045_data = { @@ -2629,6 +2638,7 @@ static struct rzg2l_pinctrl_data r9a08g045_data = { .n_port_pins = ARRAY_SIZE(r9a08g045_gpio_configs) * RZG2L_PINS_PER_PORT, .n_dedicated_pins = ARRAY_SIZE(rzg3s_dedicated_pins), .hwcfg = &rzg3s_hwcfg, + .pwpr_pfc_lock_unlock = &rzg2l_pwpr_pfc_lock_unlock, }; static const struct of_device_id rzg2l_pinctrl_of_table[] = { From patchwork Mon Mar 31 10:44:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033450 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8602EC3DA4A for ; Mon, 31 Mar 2025 10:46:11 +0000 (UTC) Received: from TY3P286CU002.outbound.protection.outlook.com (TY3P286CU002.outbound.protection.outlook.com [52.101.229.1]) by mx.groups.io with SMTP id smtpd.web10.49058.1743417969387923887 for ; Mon, 31 Mar 2025 03:46:09 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=GRViNM7F; spf=pass (domain: bp.renesas.com, ip: 52.101.229.1, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=c9EU938L0XUktBqZrscwb69jOSYQ6/ZbgIgqalkut7mxspSbjnGUAc0mcizIrXaUR+6rX0qer+ylaKdelbkf7adeHC0fHcgOlp1xap0+1opaTzsZv6mi1QT/e+gVY5xBQEUfre0ljoBdLOjQSsTX2rO5xexvXpT4cEK3V8n8UqU7JDMapwXtUztqqRBKbRIm0IST0JAux6F1YAnImGleN0FoHoXefLI0j+DvU2I8HnldT9iccEOXznnGgvBhd9KANtxngRsCfkI8uEKEJaX+4xcN8ZaUjNOGknswe/ZeXiGcK+5bRgMNdkyofZ/5uLWmu0+QhE5K+me/UpYNYItOAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PPaF7hB23IDH30LFcinx65+jeKcw2oonUY0C2E+XrnM=; b=mAHhD7QaQHPuttMR3iGDNNDl5qwxm6rmHncMaijy9iWnVZs9fnRJ26s5YK3LtYrYIEdH1ZHEJ2NpEqR5OkapLs+xwrhQuucQTyEIm+zq5lx+t2s9pnAJ6c3b6yFHxEpoM/rhE4WfWqFoMZkMdEGoANLYN3dRLgxXptwuzahaW2DaBpStOTLNnKg6IDUjx89shtl+gXacIpfRH/7WJY9CXzszzgo44sKeLRuFFjrzLuAkU313rVfo0zr89TCk5DA00nlbu+lrqUXdH5RJICcH/eaO9tMqa/anxCDCYV2sRjwLI9o+phsAQWcS1fKzmEL4vU8FqkdA96+NYR0VyTVxIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PPaF7hB23IDH30LFcinx65+jeKcw2oonUY0C2E+XrnM=; b=GRViNM7FbmurZu2IIa9ZmWw2nOh6Wp+ZFCGL3y8ORBze38sFISUPfDYrCfZA5ot6cbPcttuKQeFhVxRK6mHJ9OgIbKmgw1NIOjgw0Xp0JDB4gH85Eivmf5WJjuH7x1WhYiAxsM3MxitY15yjzYc7pGPAY/HUZVvWo2TSPdn0Y0o= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TYCPR01MB9796.jpnprd01.prod.outlook.com (2603:1096:400:20a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.44; Mon, 31 Mar 2025 10:46:07 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:46:07 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 12/43] pinctrl: renesas: rzg2l: Add function pointer for PMC register write Date: Mon, 31 Mar 2025 12:44:43 +0200 Message-ID: <20250331104514.79090-13-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TYCPR01MB9796:EE_ X-MS-Office365-Filtering-Correlation-Id: 2e8223ea-be22-47b3-23a6-08dd70413df5 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: Gn+Ioh2Ea43uc3FmMQXNdFZhZnDehVWtj32A0MX+IBtzzpk3taGVxomIpKwEtC0A8d1+b4wV/k1QC8hZefCEDp82DHRkwvL6KjBDbtIEk+PbZuFKep56PbtyqDb46is88fdX/qiRP68Uj2IbemJlC4Y8nxum/FrkP9U3pgKSQe35wNiuZ3EwptroALqsrPwDNCUzHYlucvft3tCnW2H0BvtdtBvJHAyGPiUgJRPGcali3tzBjN+3dRzQIA7dkK+DaMPHoAqdYRuTxPOyWtlPwW88kowNyRvoC/9r3w+O4yKCsqkYAGOLrIyuCb15YP8mGk09hlYLYxBxqq/68Q6sA7qTRvfL9KkRW0IAQvmw9d5HdyqkY7yppCMt6niTvS4csOye/xccXktoVIvw618n50aKGjsYfbfKo+BvkZzRJBPTi4OKdZ/LEiwCq8RLXzKCfeiUqcuzpxftLJO06oxOSXM0kEYOmgWuURNq/5z1kOzM7JFQrfysZTubLdLb7JnXpMwZPn+4a7EC40SveL1IBQiMHepjfuebkxg7+qAdzaNoG5/HEjefVHQSrTMoPEmgCYB70gQ+qpqXKvH+qJO++VIT9So4oZOXUReJZb1y65pAuYSPjXKd8WLMUJoFMEjHp+GlaEr4aK9EXEbNDeaMal6aHPDAFKjcKZLiaux0MzhZ3QsBxbdnUxezoi0TfyupIKZLBrMk2led6NkrosOodmw8cc1IqlvPXYfu/XqsTRtjRZCNxT5KmT4gkzOkHhQtbkMqkfA/7bBXoG6YIo28tMP8qw1Xo7ONljyExG+JtZzlYqQYmk0QHA6IhoprOl7SuEOn/ifd/Zn837wm5ovxKSUuZ4u3n6JLXMtQhC9D2urXFJ5FlQGqAV0mFC+Sz4Ox2oyTwX67UV2bYiMIqSJslE89rGPihiDYImu0Sjz1ZvAFhzflX1Wk2PW96kPQu3EA6BEm71ld0gekLMZtlpAkBqm0qETDyMhCPmdY9B6JjmpNdi6jl3aY0oq2r0TuCSazX6w8f4bIKgDjhQqKl99+6F+AZcJinEzpPmvCD+11a2vCxaiE2hfkdfvQ/T7xqQmTwoPWJNIk5C9JCcL5HWXXgYku8xelqF0L2Q9mIQ9Zvrsx7nrOgX720EruFyruHFGgw6t7IVOEsy+GQDP9wB3NTFvTlFdWB6UGGkDhPFoEjutTIKooaTNPiZeCGLuA3i2rjDZRd31vMEB5L/04OI/x/pUB82owvg5h0g00uQq0cinukq+5gzakx81SxwNKxyarUfkHG3UXbS/sF0SzujyzpQ5G5q9q7tRJZqyeiaVWmzU871ZlCr9mlMWQnKSgHLxUxtmiWiEawtDu/68Fr39cOM0EitJ1jk97ljeRQ8GHD6k0zT0DATK1kBYWD18TCy+AJ6AO8O3/4zJlxR1TJ9X3epc4gAPEd8waKnrlmecBsjVoqWQOeGMpKDfHrge+gvpE X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1+bL5dngYDBuMSAAsUiXyb/ocXP2wMuebtlvGBqnSZdCT57ZTPg+LPM37MwyRARDh8Aw0ghViuMuYkgwpO/A4//iuid3Yeg3QYwO1dBmlLY+Kc0OrwO850bM3cyt8txVqr2NBp7wq48mRyBKzyQUxfhYAB9oZWcVwxP1gwjDOoJO7diw1jFlvRO7SZpgL8h+eddHKWUauEjkOakxhcFmAlc3qDHIX8Pj6h/3zjRCG2qOYTuKWhKS0UVPpx52+vJixGJwF8Jpg3FawfLg7vbY3WHYY+k49sOlclqoXJMIljY6tKUzh6Y60G/ub3Ga7tbmVKEzW/amxTFhJ4ecMbxRIzDdac+PV7DYKq+gQQ8tcRDdSPOPQTm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MjxpULXa3yoyRKKyHqdnVq22bUXJ3ZkHXKcTdRbVCvW5vqI1kQw4/szrByJors9zpTQq/DXy/vKVRqVyiPUQ60J/7I/iXjT0EWCRcNO85mLybeAgCm6f7qcv1+/YJbn9Cw1/DJ104KgLgTjq757npmfCILFfmfT1IPJU2KcnUa22r3g8bpmA= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2e8223ea-be22-47b3-23a6-08dd70413df5 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:46:07.4412 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: s6HqEIbnrza8/bflmHEMzY8kLL5JN+qMpPdSpLpvD0y1fHFchyBbDNtmFbVKvpj0rvjvukiqHSdInTP7OV9zQK8OY2tomeQUTRXItDVUMe5PNsFflP1FyEORr+Gt/F9t X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9796 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:46:11 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18400 From: Lad Prabhakar commit ede014cd1ea6422d7436bd0a1771fe0d7b0fe12a upstream. Introduces pmc_writeb() function pointer, in the struct rzg2l_pinctrl_data to facilitate writing to the PMC register. On the RZ/V2H(P) SoC, unlocking the PWPR.REGWE_A bit before writing to PMC registers is required, whereas this is not the case for the existing RZ/G2L family. This addition enables the reuse of existing code for RZ/V2H(P). Additionally, populate this function pointer with appropriate data for existing SoCs. Note that this functionality is only handled in rzg2l_gpio_request(), as PMC unlock/lock during PFC setup will be taken care of in the pwpr_pfc_lock_unlock() function pointer. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea # on RZ/G3S Link: https://lore.kernel.org/r/20240530173857.164073-9-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 95b51f31c387d..947fcd39b1683 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -253,6 +253,7 @@ struct rzg2l_pinctrl_data { const u64 *variable_pin_cfg; unsigned int n_variable_pin_cfg; void (*pwpr_pfc_lock_unlock)(struct rzg2l_pinctrl *pctrl, bool lock); + void (*pmc_writeb)(struct rzg2l_pinctrl *pctrl, u8 val, u16 offset); }; /** @@ -382,6 +383,11 @@ static const u64 r9a07g043f_variable_pin_cfg[] = { }; #endif +static void rzg2l_pmc_writeb(struct rzg2l_pinctrl *pctrl, u8 val, u16 offset) +{ + writeb(val, pctrl->base + offset); +} + static void rzg2l_pinctrl_set_pfc_mode(struct rzg2l_pinctrl *pctrl, u8 pin, u8 off, u8 func) { @@ -1329,7 +1335,7 @@ static int rzg2l_gpio_request(struct gpio_chip *chip, unsigned int offset) /* Select GPIO mode in PMC Register */ reg8 = readb(pctrl->base + PMC(off)); reg8 &= ~BIT(bit); - writeb(reg8, pctrl->base + PMC(off)); + pctrl->data->pmc_writeb(pctrl, reg8, PMC(off)); spin_unlock_irqrestore(&pctrl->lock, flags); @@ -2616,6 +2622,7 @@ static struct rzg2l_pinctrl_data r9a07g043_data = { .n_variable_pin_cfg = ARRAY_SIZE(r9a07g043f_variable_pin_cfg), #endif .pwpr_pfc_lock_unlock = &rzg2l_pwpr_pfc_lock_unlock, + .pmc_writeb = &rzg2l_pmc_writeb, }; static struct rzg2l_pinctrl_data r9a07g044_data = { @@ -2628,6 +2635,7 @@ static struct rzg2l_pinctrl_data r9a07g044_data = { ARRAY_SIZE(rzg2l_dedicated_pins.rzg2l_pins), .hwcfg = &rzg2l_hwcfg, .pwpr_pfc_lock_unlock = &rzg2l_pwpr_pfc_lock_unlock, + .pmc_writeb = &rzg2l_pmc_writeb, }; static struct rzg2l_pinctrl_data r9a08g045_data = { @@ -2639,6 +2647,7 @@ static struct rzg2l_pinctrl_data r9a08g045_data = { .n_dedicated_pins = ARRAY_SIZE(rzg3s_dedicated_pins), .hwcfg = &rzg3s_hwcfg, .pwpr_pfc_lock_unlock = &rzg2l_pwpr_pfc_lock_unlock, + .pmc_writeb = &rzg2l_pmc_writeb, }; static const struct of_device_id rzg2l_pinctrl_of_table[] = { From patchwork Mon Mar 31 10:44:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033452 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85676C36010 for ; Mon, 31 Mar 2025 10:46:21 +0000 (UTC) Received: from TYVP286CU001.outbound.protection.outlook.com (TYVP286CU001.outbound.protection.outlook.com [52.101.125.47]) by mx.groups.io with SMTP id smtpd.web11.48803.1743417972400699426 for ; Mon, 31 Mar 2025 03:46:12 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=bT0wF2cD; spf=pass (domain: bp.renesas.com, ip: 52.101.125.47, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=E3dGTn3hRgJd63Rpj1njTrckV4uznLSgvnaDi7COZsthxaI7NzYts5RfyCbVSG7VabN+XhE1mFsqu6Lafyu5PEMQJGvdEd8r5EHaACF7oU9tQZ5JDZqSPYs45dvWxfopM9h9vts/dopOM2LZJOiF7nPuQYO3rMa7z6KyUT36ksRNLFj9fUknuIDha1Bv6TVasBsNyKdRnEvHdsQ8D+QBipbG8Gau8Rl2LI/VBlYWZuvlI5CIwlrkwHWaM+2JxDsCr0NRCixpSA94aHw0BShvjweQDZzEHk13n1jQHcUBoKFOc/oqZRPmqvUj6Qtg7pQzkq96DYjmmpzrv9MAt/AiSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nKRZBadYpFdn1OPfsQWfiipoljOXzZQozya1DbZ8xEk=; b=NVxLH2Wy8o9LOK3xiwMS0PvK7Kz3UIB7MiP+gkFXD2TBi4W1bX8as9tssJQWHhAdH1COc9GKAj61Qx2s1hjCqJyJG1TfFX6nDowB9nwzR83Cd7K5rRTAjytTfvsxsv35SiPx/8f7/F9Kd57W64SLgVGyZL3XEGGKTU14p3uR2f2iWzz5+v9tPjHQIF0qb7BLjnKvCexyuBO8nE9L/94tTB303kpreThvH0mCI+7TRbn3WgST8QxMElIRY9utp2EkVN/t8WuoQsDzlmtSgZ0D9qcbfKCyy33R0d4d6mZV3hI4FFvlxpesD3LahTNK7lyS847HA9Mo+IZRDLpDVVKKqw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nKRZBadYpFdn1OPfsQWfiipoljOXzZQozya1DbZ8xEk=; b=bT0wF2cDWZ07ysg0dSef0fP9R8UkSFNHFZG70zASWIQWvNvLGi08gyUXU1gCsbcJgJc96gShDor4ELD2BvSf1crxF2iWj5BtAxDYh0KgEHxzqyKhgzwDECX+uhISRdXxtcaW5NHo6edK8O2nnyKlXXSHCSHNQAE/GrJhByIrpn8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TYCPR01MB9796.jpnprd01.prod.outlook.com (2603:1096:400:20a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.44; Mon, 31 Mar 2025 10:46:10 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:46:10 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 13/43] pinctrl: renesas: rzg2l: Add function pointers for OEN register access Date: Mon, 31 Mar 2025 12:44:44 +0200 Message-ID: <20250331104514.79090-14-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TYCPR01MB9796:EE_ X-MS-Office365-Filtering-Correlation-Id: 5518f523-c22a-44fa-7426-08dd70413fbc X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: 85gBpJnSXWPJS/tXpkYGHkqw8qrwleqbOgE7yUDqmvstkosK2wLv5LOf1e4RgUuNcMeNpYp6QZRFirvEu3Vb35dUTdbwt5TNT8AbdYYLtC7IBrr69u2hkOFR4+96bjxysU4croBBuwD+XzJdXxAm9w6fQpFfQ3N0MX9Opj7gG52bt5Lngf9AyFNULN1xC8HcYsb4ipM4HQPi5Tq+jOmlMEKz7T9mZip5TrTjRCbk65R04BzReC22vjybnef9LhKM5lTPwE/fq01XaFbg58CoJm4B9tBdprFNfQbS3HBtvVYXQWNzTwtuz34MyNaHk1444iEQanD6grtW1ob6SjrU+Kax2joHlyjXqE2Gpnj6GLE/TSVl7RaAfBOKeQvk2zlYZYtfGxULDa3E9ONdVdleUkXXvuKPnOKWuXTDhOjgSE3/bA9wzcVFJ5yFhMs0SGNNoXC6YhTjmeep08T1Ub+3EAy8/FsXoRk0M7vyB6LyKZ5z4cO5xtv6fg1YZ8qy53mV9amcYIuwr66qyglZJxX3S5GoD4QPgfpLkyEnNSSvpO7HGzNLjIBTHjKAHnCXlFNikaid0meuOOI9VwQN3ZwOLCZqNobyOmFgzhfCcydNsYHEg3zZEOLrRydEM7bwZso71ksm8Rtfcyxs9S/LhI97YIaRgdbSMqta0wa+wetTzje4HorQoaDhBRAN7oimhB9LnE9MA2bP0gzl/cuFtT2IIihIElNneflqwYuW2FDKXOKEIcpAycuQkTKMtUZ4yW/w1DFo1vbj0iZszGps2XhxETOEemM8Gqy1OVw9WEwmhXackTWjdR2HDzZNtMtEJSBW5uthTmMpx+C7voq8vUyQUG1Jio89cpW8S5C4oP8G16Ijx2Dfzq/4h6iTH1u6Ew3apT6UvFOPgPqpyoz++LJlqSObVsUnqeuCVGVP3S0Y6LK4JiK77pPSGc1u49zQWNSV5yMcq8sxdYMAamEkklFOFeZLP5R9tzQsooCO2oXO0Ycg5q+dwGnhGQThKaEL4VTJ2jmtYp4d97/BwzkRTtx3e0ozaSKdCBysyyHoN31VCx1lCtv26cpbqs/PiGjS2l65zw+tdoCwhS92ifjmNpl18BGDOUQ3vQFV42IVVY3Lsq1KjUlVwkUsLnBpH+2rB/kDWG0pdgKYzqK7r6j+NWF47bORC5XW29YeFkYpk4CGID0LtDm1WzXWf2k77HJ/+1TRFxfmoA7jl1XDSaUY+zUW1Vyv6F3TnGad6brjEdjNYcWs5M/bAV3tBB8LKHJBOZCoZtG8eeA5lLXEUI2cIMvFXuOK3NknFvLEnP6XY5Z58PFIKGK5hGdq/eJ8Oyjvdnss5QfPR+c9bwnbSywZcVJCFDdrJS6JTrpLcx9Ud26D624bHCWWMXXzOPtdBXfWQ43MT0zaPgPzCpLqQx1keX+er6r5OUYv/LVyT8ixeYTAeubxYEwvPyQrpBUfZ7NiguLJ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: J65oX9e5TNntV3UKfTaGmap/7PxVX0jgryqu8VZQCnm1NN9k2Vfwjw/U0Pgo6N97ClK+q1sz10+6oYnE86opp+IA0jYX5AgdIFXv7fGu+WAd4X9bQUT5WHzE4pjG6cjaEBBPaZ2S7flJkaVm5VeRJtua+Ogk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9rii1djASV4z9pm6WloDfP+8R8YNmEQv7ohNseRWAojpmUGRP4eJ2BIboA8+E8VNsb1EPx4RVjAuKh/oXbSD2Q7Eoj+D5TtbUWOG+phcOz8sGOOPyc/t6M6D0SPXv4vEZZBhkQTOghA97KpTsWJcVvYe2qGWtDmzl2OGe17WKMfGbl8YLdZvEVzQG78qre0zPdBcnxH3crzexSwQLG+tBfnHHF33SY4oBJODWEz9BSGol3GsorYXar//t/v5hYmUpDXzjtmoB23XMz0e+M1Cr5JzpLBXEyKgCxOBu2yMHK12BjLYuIjZ09CfB8PdJ9cHvXGSfiqeqP3/6iCgQoVJR1sSOPFbrK5mys7xvgPiURsoFFdTrZ7x3s1GFCUFMijtIMpQbb++wDL7YndkQTooE+25w04= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5518f523-c22a-44fa-7426-08dd70413fbc X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:46:10.4416 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: m6PnLHnq+wfIoM/WxTkw+8E8vOQfUr9jCJlugfnBGaELETBla7Rn7BTUqg5DEubMphvs6YO2RwfTQDSlg2VgWCiubqyTEC+qaollV5DcofJRWgeEpx8WLeB6pskRcvgI X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9796 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:46:21 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18401 From: Lad Prabhakar commit 7d566a4d270c52ffffd04b78b753bb3ce8cbb867 upstream. Introduce function pointers oen_read() and oen_write(), in the struct rzg2l_pinctrl_data to facilitate reading and writing to the PFC_OEN register. On the RZ/V2H(P) SoC, unlocking the PWPR.REGWE_B bit before writing to the PFC_OEN register is necessary, and the PFC_OEN register has more bits compared to the RZ/G2L family. To handle these differences between RZ/G2L and RZ/V2H(P) and to reuse the existing code for RZ/V2H(P), these function pointers are introduced. Additionally, populate these function pointers with appropriate data for existing SoCs. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea # on RZ/G3S Link: https://lore.kernel.org/r/20240530173857.164073-10-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 947fcd39b1683..430a7638a9d39 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -254,6 +254,8 @@ struct rzg2l_pinctrl_data { unsigned int n_variable_pin_cfg; void (*pwpr_pfc_lock_unlock)(struct rzg2l_pinctrl *pctrl, bool lock); void (*pmc_writeb)(struct rzg2l_pinctrl *pctrl, u8 val, u16 offset); + u32 (*oen_read)(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin); + int (*oen_write)(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin, u8 oen); }; /** @@ -1035,7 +1037,7 @@ static int rzg2l_pinctrl_pinconf_get(struct pinctrl_dev *pctldev, break; case PIN_CONFIG_OUTPUT_ENABLE: - arg = rzg2l_read_oen(pctrl, cfg, _pin, bit); + arg = pctrl->data->oen_read(pctrl, cfg, _pin, bit); if (!arg) return -EINVAL; break; @@ -1144,7 +1146,7 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, case PIN_CONFIG_OUTPUT_ENABLE: arg = pinconf_to_config_argument(_configs[i]); - ret = rzg2l_write_oen(pctrl, cfg, _pin, bit, !!arg); + ret = pctrl->data->oen_write(pctrl, cfg, _pin, bit, !!arg); if (ret) return ret; break; @@ -2623,6 +2625,8 @@ static struct rzg2l_pinctrl_data r9a07g043_data = { #endif .pwpr_pfc_lock_unlock = &rzg2l_pwpr_pfc_lock_unlock, .pmc_writeb = &rzg2l_pmc_writeb, + .oen_read = &rzg2l_read_oen, + .oen_write = &rzg2l_write_oen, }; static struct rzg2l_pinctrl_data r9a07g044_data = { @@ -2636,6 +2640,8 @@ static struct rzg2l_pinctrl_data r9a07g044_data = { .hwcfg = &rzg2l_hwcfg, .pwpr_pfc_lock_unlock = &rzg2l_pwpr_pfc_lock_unlock, .pmc_writeb = &rzg2l_pmc_writeb, + .oen_read = &rzg2l_read_oen, + .oen_write = &rzg2l_write_oen, }; static struct rzg2l_pinctrl_data r9a08g045_data = { @@ -2648,6 +2654,8 @@ static struct rzg2l_pinctrl_data r9a08g045_data = { .hwcfg = &rzg3s_hwcfg, .pwpr_pfc_lock_unlock = &rzg2l_pwpr_pfc_lock_unlock, .pmc_writeb = &rzg2l_pmc_writeb, + .oen_read = &rzg2l_read_oen, + .oen_write = &rzg2l_write_oen, }; static const struct of_device_id rzg2l_pinctrl_of_table[] = { From patchwork Mon Mar 31 10:44:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033454 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8ACD2C3600C for ; Mon, 31 Mar 2025 10:46:21 +0000 (UTC) Received: from TYVP286CU001.outbound.protection.outlook.com (TYVP286CU001.outbound.protection.outlook.com [52.101.125.69]) by mx.groups.io with SMTP id smtpd.web10.49060.1743417975425535079 for ; Mon, 31 Mar 2025 03:46:15 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=dEvUxjM7; spf=pass (domain: bp.renesas.com, ip: 52.101.125.69, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TPhDnDTqgfJWZ//qlCrhWZI1BpO6WToQ3mzdhcTfnkcgoxpN38nKhpBHOS5nOKs+aQHhO05XBYzZ62QhrQ0RacFlB75Cgucz/VEMUZKUW2nFKaW0Njd/45bJhYtT1Eeoc6UUu4QnwKFTzW09lcse5euWnoOBR0mnmRtSQ2YqF9fv6ur+EMV+nP91uuKgT1X45vHzcaUPHz/K6AM06L460gsXyV0CCAcb1zEcXAWJbn7BNWgKf46LYSNXza6VQeaEVhn8P6BQOJZ3b37+Ona27+DCrEIIYANYkVeXA+sseescGIY73Y/BBKRgF65AwwT4QnKmx8YZHLvoS1PhZj41gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iM99AvQnh5R/wbCFRc67HaBSCYqoyM23b4nTsnu+8w4=; b=hVsV3lGljJWYvtC3ETugkg7qq2f/boiZlCg8noFXDHcgJ8p0/V8TE5Dc1Mv+fRskUrfstffVVaLcELOf5LThb6A5RW6IT0xEb32Lyw+0YNzg9F36oI+6zQIXXROlNCWQWOvoUUb+yFJUyzQ/L8EQQeCtgZCMBpKcws+6aY4CAIJW/2pKOCr4sBTAta6PRZ6sxmgTuqoYcU5GgRRDO3HMBO166ykYGegSrBGswnLvIgIJwyOPY3/xNhhwqzdk77F0FTr5KdPh0ph40WRq/rZPS0M2a0DOcwm1swuvA5IftWHss5mnmiwaFmy5x2wDTc68HEUWRxXwCPDODptqNHncPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iM99AvQnh5R/wbCFRc67HaBSCYqoyM23b4nTsnu+8w4=; b=dEvUxjM7NA1DRfX9pbewvGuJF4I/m7DBjZi1YIuS/zCrJk0Qu3j+WxoBdozBEBvVEnCVIFl5qtzdocMKuhOh9ufm63R0RlUzYgH0GpDQEn+kJ+0uGBkbLEsngkFzYmM5KvLzD0+h7/PBNNeHSyfxdykfOlT1eNd2Yu2SXbnT0JA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TYCPR01MB9796.jpnprd01.prod.outlook.com (2603:1096:400:20a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.44; Mon, 31 Mar 2025 10:46:13 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:46:13 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 14/43] pinctrl: renesas: rzg2l: Add support to configure slew-rate Date: Mon, 31 Mar 2025 12:44:45 +0200 Message-ID: <20250331104514.79090-15-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TYCPR01MB9796:EE_ X-MS-Office365-Filtering-Correlation-Id: 26e4a47e-6fc5-43af-6bf3-08dd7041418a X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: eq/koqHMhvD9+2KV4vwQx8mG/pgLfUoWLgBFCRdGgvC4d6sZM/ypLUomDQFo8REnmj/YqE9MO6C1lepPNXOTOcz8n4x4X9wPZrIxltbuNT0mX7nYEcOIO5yES5eM0F+pQvCV9eZZM0OlFkUDcRDsHueQtiNAp8oHAaj5yl7bJk11HkjdMUNmJQpBJXTBbcYYfLqoK00+YoCgQoqr94qz54o0OsVZnV1DeMskgZ/Zia6CDrErT5A2SIQpWYVI1Pl7aH2bO6u7weoWiXdibTrlx5iu5n7uTcOhjpBAejK8XmZ3sP7NqspuglfaZzl0xsfC7uODoOfERFi2jV7m11aystMVr9O5wfJ8yge74ynk0kTMTj21R5Xxfsig+mBA/sd5gXl/ygfyq9+UryYum2VEKpryrokoX5Ptebj5NezBJQ0U5jpOq8s98F/PW7ljN0NWWje7gBdfG1oqegValcniLFQIWAVuveYuILZ/tL3lM2erYYSgChJ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ook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vOrwAyph4I3hoG6NMFXBjjiMqJRIH16P9iN26bBSM1npFADzxN3S5ZXNAzt1E5x9qwquqkLxfEJlIbyyzMG13DNNZ24yvMSRXdykExJj5D9X8mWpapjv+QcK3xkOlfIq6u/FBWIYQBtqfJWAEIba0eH3M9y+1C4GXAz5q2priKwFxlrYH+ncmsg57WoctIG7Vj6cQSVhr/sedI8TJczvpKqr2woTdpUQqjMw+5yvVUAwkhSbcOz5x0XHWv4SCfC59jYXQjyJobypu8AWOJPhKS+jOAemwmqBO/Rru/BJ2bEGkh3GEe3Go7jblSJxBM19ntxrIte80OU5vY5e+DW/8qvaJAS1c6jSL5iBKMzNTBrN6C7h+paUuSUuDRxhudT/XtdJV6fqW9ElHslqOcarRmJOwLWWy4MvS6A7CUWauRVp0H/FuOcBAisF0DmwKGkbdg9EKY5iI3P1rrhbYDSniWtPPntHj1Gej8QZ+x4L/L4ujp6xz3eAyuJPNWGPfwEfjUXCIWYW3GMuXJMhPedCWmCTyvRp79RWsj0oe12CNgk3QM6jEx76u+MXgOE3n3AWaK26H/W0khoy6H5ThjxVxApM0HijoFi7FgMRdUzgJQs/4joptdOVIVx9ROViQphO5GqK3q6kYQSuDu6hucX9KpOULqZlC54SwKTUOmAN4sQpLhEHkFk6CRnnVtJUGpit7+G33rSm4Ysgb7Vke8t4vwDGkF7EWSTLVDA2z6R53E6WV2sPx8RUnKHCxYonPZ4cqMqKP7xneiThkjG/hOg3kShZnvmAfOtd7BOnueah7Y1CIoFlelyHb4chln4D3LO0fGlvNhOR+hA4FsGyLVXMbawpzKq9aUx093frm+bY/hpA5c2nQ4OXq743qL7xS/hw+5DULlOlzTU/ATa5Nt8FeR95exGIOcJfVGYs16AE3AAIhsCdAP9WSGH3itOTi7j6y6wjTNktJtcDZBY8+KytZvd2hsJip2It9nbS3Po6Dh4dRVnBkuKkXEdHZg3Mdeh4Rn9hl1rkDBaBWWZUKQVnKrlt5XNiWXX4k5ac6WMnfIJMiZEaDcx3d5D9wy4fDRdmU/XcFiNmbkYouAMaC0DPe12Bg7QqGuSN3gyVltAvNk+bG886H2n7oJ+CE1xWk5SMbQFlblT677vqrwXDVzSZqawMgm3zwu0KH8TECA0e03ffolRs4QINa5KXgbPeswTaGLfJvh7hKRf1VCJFSyyLfdS0WGHGZG4yMRPXQ7/P4f5J1y7+lZu1tR4o653p8SsPMQfOyPgUKtpml69f51fOc1aH1fEafkYWX0rrBGq8W3oQLVQfgsxU1ZBlz4bvHpABs7V9qJ4Z+Iz60Sg+2jhSVV3n8X0jwDyFwBInXpoYkqV4jUczHOVMrm+eKWCuDaNgoAbGmHqRtOiLe9pYWfeuDu2N6bDD/WJj0xtcKtcnS9KMyVxkC6UwTkjZoKAkNRuL2QJ3cDxDtBssZtuq7lodtkr/27pwXpuCfcdyWl665n7TFXi6op9CvafEu6tOnxg84M/XvTVmupt2flrFKsqFG7sb7rftgHuMREqzHwMCdqXGWb74+KZ2KByDXsv89Ej+OwaIq3WaKGvy2Usf6C8+77nmUDwNTdQf2m86UTfyVqc= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 26e4a47e-6fc5-43af-6bf3-08dd7041418a X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:46:13.4744 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Y7EJjP5HRotxkU3ccyoD2wVhAbvyqIqp0a1LqDo71xSezqvWPXq5L10wZBvKTORqPsZBvQ5OSqyz7sx5mw169Xt/0Lug1gGZeWqeZKXJaGfs/v6NTJXLNhZ1uuohtt8S X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9796 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:46:21 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18402 From: Lad Prabhakar commit b588b53b2c474bdebbac0a663e0a6a0390db2fdf upstream. Add support to configure slew-rate property of the pin. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240530173857.164073-11-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 430a7638a9d39..596e101f5b2d4 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -126,6 +126,7 @@ #define PFC(off) (0x0400 + (off) * 4) #define PIN(off) (0x0800 + (off)) #define IOLH(off) (0x1000 + (off) * 8) +#define SR(off) (0x1400 + (off) * 8) #define IEN(off) (0x1800 + (off) * 8) #define ISEL(off) (0x2C00 + (off) * 8) #define SD_CH(off, ch) ((off) + (ch) * 4) @@ -144,6 +145,7 @@ #define PFC_MASK 0x07 #define IEN_MASK 0x01 #define IOLH_MASK 0x03 +#define SR_MASK 0x01 #define PM_INPUT 0x1 #define PM_OUTPUT 0x2 @@ -1049,6 +1051,13 @@ static int rzg2l_pinctrl_pinconf_get(struct pinctrl_dev *pctldev, arg = ret; break; + case PIN_CONFIG_SLEW_RATE: + if (!(cfg & PIN_CFG_SR)) + return -EINVAL; + + arg = rzg2l_read_pin_config(pctrl, SR(off), bit, SR_MASK); + break; + case PIN_CONFIG_DRIVE_STRENGTH: { unsigned int index; @@ -1155,6 +1164,15 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, settings.power_source = pinconf_to_config_argument(_configs[i]); break; + case PIN_CONFIG_SLEW_RATE: + arg = pinconf_to_config_argument(_configs[i]); + + if (!(cfg & PIN_CFG_SR) || arg > 1) + return -EINVAL; + + rzg2l_rmw_pin_config(pctrl, SR(off), bit, SR_MASK, arg); + break; + case PIN_CONFIG_DRIVE_STRENGTH: arg = pinconf_to_config_argument(_configs[i]); From patchwork Mon Mar 31 10:44:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033453 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 811B0C3600B for ; Mon, 31 Mar 2025 10:46:21 +0000 (UTC) Received: from TYVP286CU001.outbound.protection.outlook.com (TYVP286CU001.outbound.protection.outlook.com [52.101.125.10]) by mx.groups.io with SMTP id smtpd.web11.48805.1743417978322730371 for ; Mon, 31 Mar 2025 03:46:18 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=NJdoNujs; spf=pass (domain: bp.renesas.com, ip: 52.101.125.10, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MggjfGAtjkYsFlUnPWFNVjrPo89kuycPBjceTJSGYTNluCH9+J9tkP1TeNKOz1IASETmdy/cfCMCts0otQoM7SfCwY6fhNKhqk4/P9T5dVTi0qvihCqKSPhwhKaWB5QnHDTmc5cu4nqfby9S9u6rRJaVpFJImkkadJTtGtOOBKiWXa0bs78aSE/AiFaKm56GZEPiUF1spt7K2AGWdvhKHWiqZGVkM1IExFXeqY6K3jbT4iwUYZr035K/SYS62rfqoU1QvM6fOI8qVqCN7ozbFWgOcSPcxvU3HNg322KNt3ZJfogvU9n30B4MjlVDlEgqtftvj9iJM1QcydAUpfKu+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GHLOdaZ+9EDpZ0pvp8et5M2qza69vo6KeCEjSEQdoiQ=; b=hzWIu7fckcKlkefmZbtwLViIUR4ooQUeZKViG+xREpZpJJbHZZCQKOn4W+PW+3HpUjDStep1l2QnV4OuLcmYMot7saE77ydQPrYJ2AXO/NNLXMhK53FykuNaq7MAixUtbZnuIppR2w9hknL6JBoEsMWJndSIgsYgoabk7nkNKOP23PgcAdfumVkTDhKDMUJ9yNHSJr7+G9owbbCKDdYqOJDgd+iGpU4gwbVBgfaugEJko3aHobJgZs6BBIQv81832p1D6klWbnZ3rKBJhQWONpygL1AE2Jw7mdZnJaF6eQIDO/qloUreJmGJ5Y4G3b0FqJ5Rubk/lkRZAAz5y3RdaA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GHLOdaZ+9EDpZ0pvp8et5M2qza69vo6KeCEjSEQdoiQ=; b=NJdoNujsE8pg3LVNuxYk9QhuBBmSWBwZVuu4rcy54MWr7/y5SXVone7kXYM0Md2TM9x8OsEZ39LSil1oKBr5YcJWPhhCs1dKIFSk9uOG/PHnfRebb4KULS6AgEUJqQfDQF3eqTBbZEYRd8Es1/06cGQxUGHi5k6OHHaLFEbU8/0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TYCPR01MB9796.jpnprd01.prod.outlook.com (2603:1096:400:20a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.44; Mon, 31 Mar 2025 10:46:16 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:46:16 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 15/43] pinctrl: renesas: rzg2l: Add support for pull-up/down Date: Mon, 31 Mar 2025 12:44:46 +0200 Message-ID: <20250331104514.79090-16-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TYCPR01MB9796:EE_ X-MS-Office365-Filtering-Correlation-Id: 8161ae78-f8f7-4fed-a1e2-08dd70414354 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: Vm2QR9+EFdesX9MJpepEFzxdWHgQGT9JHTrzXEzyKQT+V5K1OV95W9EFgqnaZIHe8JUbRuqKz2z5uylIiuJWf2DWvzbY9w8TzLeCQ2pHQQsL7eq7L8zNUk/+p/8M3wudahEfUeyf16t7QsBDN4M5ZFMKn794Lff/166VsNkwt4TCLhUrw2RdEpifmWLHyyZ/7YaauC8hm9m9S6fDbUBwWsbxof7jNIdjiX2MkjvtxNO6I7r11yAzN8O3X2WzPS0khmZbg2BRcbZUIRjiUIBJwfwcWVU6FT55iNr33wrPlZzsdmD5xZo6M7BpPaTcz2rK/HPbisP/bfZ7iRWBTTFNubkHh4gumqEWqG5zu8PuCH37IA+oGYOc3ppeNHHJBOX53cjt9EjtuVMAKZ/d8Z7kl77RQIIujM0CQnDh9xjjAlQdvMbtg1oZfLofs3jUJ55HGBA/a64iJdK8dCLJmtRUrClJpTsuPN1yoX7Ti/mbFyoFoW3DTYGSdSv9VOJBqAYiQbPtDnVaAuRZgEH/bneLlwpXsBg1Tq0IKjhtffRB7q+3KMgToQBt17FuqTtJtCek0FbRNVyfkP2OE0KWHu9m0mxpMi1sCCLEUNdHNPf0FXAzWj6yGFoWyQGFdNtljKqOBSV+AXzetcNKrBFV90wfvcRqOEJZL8/9lU/gZjlQWDNBYjpbsPHhJ80QXRJYCjSAMz85CfbhsBohafZo1s1RfKlqx0kBMN6tMzSx/M5WcZnxWvo3gkNjuwf2AmDbK9BLiglDrJR5G5R9peWkKcBsiOdczVx8q8KknMwzWcNE8O8frNSEMiNF8usXCGVIqfEqkOA2wRbXcEe2ZMMRu096HrehjQCHgQHtSSrqOL4sOGML9uvOeOVAQPYC6QWolPMEkJ0lEKNqACod9q/rzSXa1d32a9GZG2AYN1Kh7G5C6SM9C1ulr67De14M2Z+4vKGhPKVqvYjH7AhHOZhMuDeSNNWmLJUBOXXQQjqTbUSBZpH7EViH1i14Uog57tHgl0uEh2m/U1BlAa03/YxBF1UZjfSYUDoaPcSFF19msAOoVJ6p++d3Eo4JUb83IJ+E9cZ5oqGPXgPGG8AyJE9cfOeE1fyOU6ckrKjwh320QXiFQ+YXchMzaCNHXwxxTn4PYOsFGhobqbxQpklztd/SyniPkBTVNg5Z/zMbsYP7hm63xH77igt93ETaFJKiZbpnVOxMLYlBfD0emvDoNy7F4MA5gVQ6br4PWpMmGNpoY99lJd83FseT7PbEB0UTtKYJVrMfNaAUYbFDVIk+DLGPiY/d1nxbOZijNFTXtMg9sNOhlDTxJ71r/pvsY+WMITjNGtk5F21bXJ8cl3FPYQIgoAZRluZHlfWaToHhnUFcaYyLQj0l/ghvr+90JfL6teVvqnK5aqx+lioDo6ZKUJTcn27qXzCu5RMfk+jM8OucnSsugNHsQhMooO4ASO1zDLtsycIp X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4bQTInE5UaQC2ex7hoI9GSLjtbD+7pyZLEDnzuY4qze7iDaNBrRnfV4Pa+HgNSFp3kqKmab8vyWWDs3hht++xTroWxleHjJPbcbB0jArQJBVUbEteEwrydihYGpYdt55cqGD6ls0yde71jzdME6BQmUMZPCZqnBxqAtzGjvnwkujBA0OA7ZEtP4zvVD2u26B9zJbGJj6gHd/bptpwx3HdCUHXOPwVmf1kKUZh26j9BX/lXyGdD6OvnvPLyn6OHYakPqNTkYsBInxFURMO6tmwnpj4WmPAgZo0BF4oEoARBkAJ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s9c+5rE8Do341DAtckQDULjUH5027VpSCagpDd15ELpG+khvvlvotGftQpPGDJcsgJ+It/9Nw9EcgqzDFODgJoDxIXfSFOGMqS0vK886t1KMEocecCAbm9V0ayQ1SEE76elGN9binEsvnTUqBp3GL6TyWgeWc9XBP/kAcMAzYuZuwGmUO5iCNhw2iJ2XCiDYNkxSv1N+w+Pygq+Ac1JGTQzh7pXXNAwgUXsnCxNE/xpSU7gU+5VeYaDhAkY6UnsBnsNC/p9QSRaoAcZuWNA= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8161ae78-f8f7-4fed-a1e2-08dd70414354 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:46:16.4614 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: wqkA8IkC6lFRSfIsP/4j2wu1o+uxfpzdUG4JjzO9PebHuFGONXaEEk3Bfml+acTdGpI+Z5d4//sj174/suSrw7ktgEhOZaar3+pydRaLiRADIVsPnyka12phlV4+TgqE X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9796 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:46:21 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18403 From: Lad Prabhakar commit 19d4bce9ce876ad0ee4240ebd849b730b3dc3763 upstream. Add support to configure bias-disable, bias-pull-up, and bias-pull-down properties of the pin. Two new function pointers, hw_to_bias_param() and bias_param_to_hw(), are introduced in the struct rzg2l_pinctrl_data to configure bias settings, as the values in the PUPD register differ when compared to the RZ/G2L family and the RZ/V2H(P) SoC. Value | RZ/G2L | RZ/V2H --------------------------------- 00b: | Bias Disabled | Pull up/down disabled 01b: | Pull-up | Pull up/down disabled 10b: | Pull-down | Pull-down 11b: | Prohibited | Pull-up Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240530173857.164073-12-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 72 +++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 596e101f5b2d4..33c96661092bf 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -128,6 +128,7 @@ #define IOLH(off) (0x1000 + (off) * 8) #define SR(off) (0x1400 + (off) * 8) #define IEN(off) (0x1800 + (off) * 8) +#define PUPD(off) (0x1C00 + (off) * 8) #define ISEL(off) (0x2C00 + (off) * 8) #define SD_CH(off, ch) ((off) + (ch) * 4) #define ETH_POC(off, ch) ((off) + (ch) * 4) @@ -146,6 +147,7 @@ #define IEN_MASK 0x01 #define IOLH_MASK 0x03 #define SR_MASK 0x01 +#define PUPD_MASK 0x03 #define PM_INPUT 0x1 #define PM_OUTPUT 0x2 @@ -258,6 +260,8 @@ struct rzg2l_pinctrl_data { void (*pmc_writeb)(struct rzg2l_pinctrl *pctrl, u8 val, u16 offset); u32 (*oen_read)(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin); int (*oen_write)(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin, u8 oen); + int (*hw_to_bias_param)(unsigned int val); + int (*bias_param_to_hw)(enum pin_config_param param); }; /** @@ -1000,6 +1004,38 @@ static int rzg2l_write_oen(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 return 0; } +static int rzg2l_hw_to_bias_param(unsigned int bias) +{ + switch (bias) { + case 0: + return PIN_CONFIG_BIAS_DISABLE; + case 1: + return PIN_CONFIG_BIAS_PULL_UP; + case 2: + return PIN_CONFIG_BIAS_PULL_DOWN; + default: + break; + } + + return -EINVAL; +} + +static int rzg2l_bias_param_to_hw(enum pin_config_param param) +{ + switch (param) { + case PIN_CONFIG_BIAS_DISABLE: + return 0; + case PIN_CONFIG_BIAS_PULL_UP: + return 1; + case PIN_CONFIG_BIAS_PULL_DOWN: + return 2; + default: + break; + } + + return -EINVAL; +} + static int rzg2l_pinctrl_pinconf_get(struct pinctrl_dev *pctldev, unsigned int _pin, unsigned long *config) @@ -1058,6 +1094,23 @@ static int rzg2l_pinctrl_pinconf_get(struct pinctrl_dev *pctldev, arg = rzg2l_read_pin_config(pctrl, SR(off), bit, SR_MASK); break; + case PIN_CONFIG_BIAS_DISABLE: + case PIN_CONFIG_BIAS_PULL_UP: + case PIN_CONFIG_BIAS_PULL_DOWN: + if (!(cfg & PIN_CFG_PUPD)) + return -EINVAL; + + arg = rzg2l_read_pin_config(pctrl, PUPD(off), bit, PUPD_MASK); + ret = pctrl->data->hw_to_bias_param(arg); + if (ret < 0) + return ret; + + if (ret != param) + return -EINVAL; + /* for PIN_CONFIG_BIAS_PULL_UP/DOWN when enabled we just return 1 */ + arg = 1; + break; + case PIN_CONFIG_DRIVE_STRENGTH: { unsigned int index; @@ -1173,6 +1226,19 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, rzg2l_rmw_pin_config(pctrl, SR(off), bit, SR_MASK, arg); break; + case PIN_CONFIG_BIAS_DISABLE: + case PIN_CONFIG_BIAS_PULL_UP: + case PIN_CONFIG_BIAS_PULL_DOWN: + if (!(cfg & PIN_CFG_PUPD)) + return -EINVAL; + + ret = pctrl->data->bias_param_to_hw(param); + if (ret < 0) + return ret; + + rzg2l_rmw_pin_config(pctrl, PUPD(off), bit, PUPD_MASK, ret); + break; + case PIN_CONFIG_DRIVE_STRENGTH: arg = pinconf_to_config_argument(_configs[i]); @@ -2645,6 +2711,8 @@ static struct rzg2l_pinctrl_data r9a07g043_data = { .pmc_writeb = &rzg2l_pmc_writeb, .oen_read = &rzg2l_read_oen, .oen_write = &rzg2l_write_oen, + .hw_to_bias_param = &rzg2l_hw_to_bias_param, + .bias_param_to_hw = &rzg2l_bias_param_to_hw, }; static struct rzg2l_pinctrl_data r9a07g044_data = { @@ -2660,6 +2728,8 @@ static struct rzg2l_pinctrl_data r9a07g044_data = { .pmc_writeb = &rzg2l_pmc_writeb, .oen_read = &rzg2l_read_oen, .oen_write = &rzg2l_write_oen, + .hw_to_bias_param = &rzg2l_hw_to_bias_param, + .bias_param_to_hw = &rzg2l_bias_param_to_hw, }; static struct rzg2l_pinctrl_data r9a08g045_data = { @@ -2674,6 +2744,8 @@ static struct rzg2l_pinctrl_data r9a08g045_data = { .pmc_writeb = &rzg2l_pmc_writeb, .oen_read = &rzg2l_read_oen, .oen_write = &rzg2l_write_oen, + .hw_to_bias_param = &rzg2l_hw_to_bias_param, + .bias_param_to_hw = &rzg2l_bias_param_to_hw, }; static const struct of_device_id rzg2l_pinctrl_of_table[] = { From patchwork Mon Mar 31 10:44:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033456 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80661C3600C for ; Mon, 31 Mar 2025 10:46:31 +0000 (UTC) Received: from OS0P286CU010.outbound.protection.outlook.com (OS0P286CU010.outbound.protection.outlook.com [40.107.74.9]) by mx.groups.io with SMTP id smtpd.web11.48807.1743417983379384922 for ; Mon, 31 Mar 2025 03:46:23 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=Nm6590v+; spf=pass (domain: bp.renesas.com, ip: 40.107.74.9, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gM/fVR1r/4HawgdCi5TmRs4Igo315QgPv06VeXxoMIRsKYaixtt8/NDzgA3s+R+vo+C6mhmmrijZKgYzPQ2EPyaVQihNURbongvfgFf9gpGpq1bGc1m6Djgn9KLEOyJkqi3MR5sBzCHMd5LfnHslT3SzvFPjnWIcKp9pNKQst6D5DP7TgVLoNt1RiitKwbTdDJxqUgA+hrlnbWQhaS8fMK29qLhZ2959WhbBQtXOtTPSjnGHcd49rUVDL4dORmwdWn9Z61J8CHUtMBcxBnkBCEYB9XZecExiCOHb9TlLywMWR1Oh9WGQI+Na2D3VnmYAQf6PrsiyzOm2DNUNk+hQDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Wt+Jr33Yvbx3mvimY5yJzPcVmmX6cRwV8swR6VL4gkU=; b=MgYwnKpZV4nFZWxoWX3QNRzPFB8aNglWV0ZkengqckECQyZrcoLX+ltNgfkaVr77VJfjgpEN3IxRChuyalZHc8T7pdmyOURsxDlb8SV7AeZfiPD/UoQFZVlk3nqFo6c/xCPrb2Sa6ArKkDcjYWFm2OpAXBtC0nEx9awm5DH+RXF6MxkEWtHlV53lEO3WlA2bhF1zXI0yiR76CF8F4flOtg51TdfZY/+Qos6NtyymNJAA92DSqkoma089sgfwIqGmvd3gKc5T9aETh3UsIUylFYJ+RCNvI/0DUsGc2YTEu9Og0MwhGl+o1mBAZ9yn7FBlA+WP6cnIv2LSKXd5Q3EdeQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Wt+Jr33Yvbx3mvimY5yJzPcVmmX6cRwV8swR6VL4gkU=; b=Nm6590v+y6JFtCms2GAhlqDH4VL+7KPKSpYh23DSsJ9OVe+tHcX5vp/T5RqANbjCHUrU3s9jvkIBdnt9V2nM2htfVCyOkc8dQATj/XcX4le405So3N/itPIUVi/MatyQjREYHbuEX7wZ4NJCmUegj+J0dQLc7RCJ3tGxsRXveq8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TYCPR01MB9796.jpnprd01.prod.outlook.com (2603:1096:400:20a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.44; Mon, 31 Mar 2025 10:46:19 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:46:19 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 16/43] pinctrl: renesas: rzg2l: Pass pincontrol device to pinconf_generic_parse_dt_config() Date: Mon, 31 Mar 2025 12:44:47 +0200 Message-ID: <20250331104514.79090-17-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TYCPR01MB9796:EE_ X-MS-Office365-Filtering-Correlation-Id: a95d44a7-ef5f-4c19-0fc2-08dd7041452c X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: RtbGLgv9b/TnLVQI3cuDLgYYOqdLPskFb0UqGdNVstjYbBhQQVesIeVsie2iF8sXEXGHqHd/5hokTJjTRKt6HcQMT8591mtL7BW1kFLTfyHq153PBMPkYFwPaCFtSCiQDKHQ8345fyCkh137zTyxQKIWRFW9ijm0YGx9o9IrNQvFzmubqdFhYAoyvoxfu5dkaNjRulP7Q3lOXGjyZ2KuaMexJCgoG9Kj4NbQZbutv0VZReUxCOFHGwanyCb43N2al23bc1RKPcF0FCAUbBQIYgRIqZAJN3RF1gaWNJ1AmyEt0jBUZYrVCdhS7JxVSW9ue1xMQSjMjYsxsSRuiTmBs5oioVhv0wLGI/TptjDBciula4QfIfSSeBKWG5gheMCUWKxktPhrBBFmBXl4YvzNG3gdX7XoazdKvK2k1SLlQyCQeIDJI+U+M+dKxNf8BjoV9L10ofSSflfpLXwZ1W7WO57AuJHheBv+FOdupLgUX4STErkmRe+QJAS5Ykl3/DuDdDFESLxC4yYYBTvxQfqeL8igS6aBraZ9oumHDy7lZLuAx5JJ5PlejKwaPTNIpV2nqwhdO5xydr05u08bvoN2F6xCC6c4oNaPGumk++PnlhIsX5oC7Z6xGFM2Yc5JIju5upiKFoM5Is6TW77emRh9Lqwgip/GOFXKwTPiiAIedX44buXUl7rEgmrKgAFr4HpP4Lz5pFUzcmbhoLuGyPGf0K3o6Nz2C2S7PYkHlHYlc1x141NcXuDlXemAzL4HaPDv663pkFAbVsQSxTLqylBCyAEzN0rf0kT8fLz3gfwsXOefEYEuk3QrXPlwhO4AIrpiiWFX/Hbr28AT30u44u/oW1/kCOwkZBtCMQlJ4lVbBe1tEyLlLhiuii6xKIQD3a4gnPw1DZ0hzXC1k2OiNvaRXQudmyWJ4b1rIqhRuBsgXn14tQ0J4q061jp3dZGAFkcI3XSGYF6fUJqPD5hf7kawb0nXyocErJM5d+0i3uonsILTMAzeYfhd5aeTNxvx64zfuqnqyFtHYWPzkK4frEGcWRK0pnDJS1PjGKUYAW6f+c+T2FKHDyBXdnku4UA64so0aKytNg1oJAiBSqqvXAs3n68oenciVztHEp9QiwinsNRmJZ+BzhqG5izogpcAYZ4tp60TSrUFKq6wnzY9TNHIyb+gPwhMDR4nhPr8PDyBcv6EvSPoBvDwA6tFpK5bmWaybRXh16vRLUXAN93kmRdruqHWVrtCPP7Sg6S0Asne43q19zLDRUQkDZBzuR7rx7d3tkwfmUn5qnein4I9qPPVMpLIpey14361XPCTRZKg11zUq9LPFK+1q38zpij9j9RM2ZDgYwOQgFM7FiHGHiNNziqRTKhxdbJzEhGz1wzRWFZgbVjK+MzllsU7NhJzRmrShdaENQIBQPZuOueO9Z/Jy2O74DMEdm/nYxJtQJA558NGLm4xyYvdTBCnUQAD7Od1 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount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7nLL5jv6kSdC39Cf14nkpPbqdJE/n0AsUqS6ai7V50afAXfYIn7prfiCLjnMdBqYX40w/0ZSCHIJ+dVRGR8PIdaPJHEhfwx+XuUe5IAca6WE2WKCnRWE9bW4R5UopA6rkMl+cebprSksFYX8YrrPE/QUz/Sd9huFq2KJHB/zyvWpdSSRR8NfDS06/Ojmy0VhblZcbjFmGh5qH5H2Ohrz1SPA+NG2IUtVhhhwr6V5VmMauVFU97m2VhXVHEOCEVHNPuGj6AY2nzvGmy7n0s7td4llzkGX4ag5neiVnq0LNdYgoCuD6gfl0WinXWiZNf9a2QGbcCC9e6ucFTO/YbbOsl6zAuDyVGjsMcDFbkff5qlzEc7piaiwWdmzM1t2Ey90pBkfNRewYWdhVRpFzXbw0fQ/JgPF/McZBozrCmAyAh99h5OMmFXPm4l0lt252wcJpDb62L/dK8YT9s0Nz8CQScZTBb5Hc42L5htBaIwgU4EDV+WYvyIDz4enAXhaTB3T/6lnbWY6p6DcZfrXqPDTkv6t1MUJ15CbP9Xww1dtbpIeJouc6Zzy8wDD7/2FYcw7znAYVRuBnBAElE= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: a95d44a7-ef5f-4c19-0fc2-08dd7041452c X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:46:19.6208 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: B8HP9HutQt9Q3kPnjvg44FbZ0/R+QKZXDkNzrf+F6wKGkn2WGbm6CDvoFHECwSyPZBbGdnOPH60Hvwss9kfr1O32MS/oxu4wt11zRD+AV4YFYOwg85Rr7NswZ0+chEGQ X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9796 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:46:31 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18404 From: Lad Prabhakar commit 6f38a02ad8e0335dd4dda2c42dd599e254cdd91a upstream. Pass the pincontrol device pointer to pinconf_generic_parse_dt_config() in preparation for passing custom params. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea # on RZ/G3S Link: https://lore.kernel.org/r/20240530173857.164073-13-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 33c96661092bf..9c1f32f6e1e46 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -531,7 +531,7 @@ static int rzg2l_dt_subnode_to_map(struct pinctrl_dev *pctldev, return -EINVAL; } - ret = pinconf_generic_parse_dt_config(np, NULL, &configs, &num_configs); + ret = pinconf_generic_parse_dt_config(np, pctldev, &configs, &num_configs); if (ret < 0) return ret; From patchwork Mon Mar 31 10:44:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033455 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E5AEC36016 for ; Mon, 31 Mar 2025 10:46:31 +0000 (UTC) Received: from OS0P286CU010.outbound.protection.outlook.com (OS0P286CU010.outbound.protection.outlook.com [40.107.74.9]) by mx.groups.io with SMTP id smtpd.web11.48807.1743417983379384922 for ; Mon, 31 Mar 2025 03:46:24 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=vYze2Xbz; spf=pass (domain: bp.renesas.com, ip: 40.107.74.9, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rAB1pD4PUSYEFapGGKohZHgihNE4NrYoryalgR7NsFWivDK88ji+6T3fTalp5hlYGgBcu7oF/arPeCsq3j0D3p+Qk1gLGH4xL+mKqGnm/nG9UoT2g5yCxJlVWWqQhkLKwPL+BQYLDwk7aZC28aRPswlQ5L0sZwD8aaXgdQK7zH8L5Hiof9edcd306Z8XwtdtvS1geGwWyWT23bivL7BVV3bSFwgs0u6+9N9QpcL585x9NH1lBMVcWV1gVTcbcrnPNAesqSms8CFptpw6kGbB8UWjuQl6PhqFbTomhDcKyL+k36siBLsYP85a40UR5r4Kb/y8fh25uIZaDURboExwWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IdBuqtxR46TdoZLdXtf74k9pDsqpBCCESB3d2wsAUHk=; b=yaWLiCpf8v+jw1NI/KA1fYWAzqiRC0SbCly2wJzFqODTQDG9E0bu9NGbH0tKkqKkNe0oqQTiVQfqNb50rB858eOo5tR0gRF2G3dAMVHbm9NTLJsh1qWnXncF0Q90Kw5PRMuYGDN82rRs17j0ocb45D8u64l30fq7VI+lzzBeTgMhMyCtp6k5jv8Q506xn5Ye5ZYi1fxBWO+RaszWY1CV/eRNS8gX1v7IoZE8Ggu21sOzl/X1SS7S/hp//DParlvSnF6Aho9VZXuj3SN7B2DpMoqOF2k3wKhJ89KJRTRAgDIfZyqx5PGm+O/P0cwQT5X2UMjZXunFN9hXuKUC3Qd+lw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IdBuqtxR46TdoZLdXtf74k9pDsqpBCCESB3d2wsAUHk=; b=vYze2XbzxQyQ/BD6OoozalwT61ClmrWKKM/8kO2UXDVnrl8GU/75tdUVmkbeSbUCk3E1B5x+B2VbWaNL/oTzv83MXgdgE+PwJIuobvGz6B8QsCHMETeSkWqKroUGrGCHTELw7j3P+0uq4zYrn9dVNnVNQp0ZtkyYYIneMhTCYzs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TYCPR01MB9796.jpnprd01.prod.outlook.com (2603:1096:400:20a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.44; Mon, 31 Mar 2025 10:46:22 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:46:22 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 17/43] pinctrl: renesas: rzg2l: Add support for custom parameters Date: Mon, 31 Mar 2025 12:44:48 +0200 Message-ID: <20250331104514.79090-18-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TYCPR01MB9796:EE_ X-MS-Office365-Filtering-Correlation-Id: a3aebdd7-9890-4321-3ee9-08dd704146fe X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: YOOD4II+1j46nRQSfJmUI8pT1myA+ocHB7ExT+5zIN8Ll8YTIalX62AFcXX5NooRwIMmnSTRkC/3AlaTTeUuB6my6FLOuOxPcYalxUnQYT0FUaQOQo81LVQ1gSQwvtLPoN4Flwy4K/Y7e5vYgyjiY2+EZOgGI/Hi68IlevXxHwuK6h8Q0JjMV0+7kQuUu3kCGcZwCd6jaYNOsSHkw45ElPbxJo2VfyMUN27KnopGqLkJaktdvXG/keuXOm4AfaM9ZDgp7g2CgN1BFaLNFMuICgWWdYco/rtMNFaS0lAjiRDQk2+dO9TI4eutubWW4t/2LlXcK+zki0gudAq0/beZwLhUvtAb+aONjdh0Q7DOlHO1YQggKObuSSLMcxICcO9V1zrJdjaAB5oMVWXl5oYAQfLjtdTomGzJcHtSRBCfRNcyxh/4J2DlmzYM1kpgKXChmRHDQ2/OZLkg1kyLhw32CxPWo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jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9dr/pGvHNQfda+S4Eol/ovBKbar/xHLonCrInN4hF3FfWh8DYEDOUTuRsqs11W6TOzm/BJsoFcU1eb4zBBLsZ7XRoY//JW/T/XWIuINfvXrJ+Rq2+6LDWgnYn4fMz0maO4xB8Rc6Ja98KgGkzp2D7DoTioFsDlm/Nc+gLrx1L1gQxOrLUsTA9l2zo1Uea16f+dxsGNzSQJFv7qr2xiw1d1jq2e18RR0N8rHVfVAA31llZPXklBk0k1+xv0IY0+FHWPOkubXiKivVN4Ujg+QTdb6EM4//yBXwXO6jkLucn+8ICSlgXRUW0OZytaa6JxE4pvsSRdJ3rB26g8RsBZ+FyZpwwCFv7Ccu0T3OiBNDISm6jV1PHhb1wKwVKSDuS6u2RwIf9b6xA8szLNL1fgQgkHrFnO+kgFguNtzQubxxQphBeIqk9a8mElNi6ZgxwTjNwzo17aCGgCSRWlzxUYq5w+qYQOLfJm/prBMS+VXg3nzlNuWAYWXSEkeDXrmIvr34TNnSgxjkawLpIzvqGD8fU0b98lVGkRsp+XCwqrEnt78KQKXK1JutbI8/gNwqCvtUvdzA7IggfB9pl7a/+3iFp/lEiEMpJTFQ1K4AT9MfHUjszBFz1/WXodBG07ob/LH1N3MZdqR7r4uGpPUEK2F3t5eY+ZxnXMPG1cDpzlwVzo2AJzca7QlLyfUvBME1X2xslK9hiL9ew8bA3IQDrK4HgpGRIPaxiFZeDMDuqEy6qdsXCpHw9R88NNd0n589zXA/7Mi+rKXK2fzp0TOuTPg87GiU0YB3YvvBUIkaSjrpORJ1VyEC1xL2CxDEatGZQUo2Ty6H+/CuT1t8BG9Dz3yy9Jw1RC1Ke/rqwE9EvuKvvFFx6Gu8cBOEJ5fnu7f0PayEu2tIdGdT87R1gJBdwRULx+xuHudx7HBIwFw3GaUwJ32zT2aUvwEXVtkB69xQJyGTa1rGfwbCXpZmRHuW5Q+SvKLS3063L7l17VTWAhauTSy6HCf/5PbEGe7m3ZkRRd6Iu1vLuq/BhLnsxlEg7vkzG/jN0jdUEkOt7xp/v6xL1aoplbpDyINn4xsu/1tHnETpDRKmPhif625svqRhJjSD3O9KBMVA0dS5qjhqNPMApZk6+XHyv7CtaeMVdB5Ht1ttyg+eVI9x4rnGgX6vFbQP6uN6NnNkyvNoxNqaQbCyOqWups0bcRVjy4n+bOBl/cxsCXDo0akDQcuxcuFhySbZjzGZYvc7W8dNhg7N+HPIXZ+k7HKRXe4A0TzIqASuxN54U+TLWFhXnU9HZXZwmg2htfp4hSde0mWsDD9kalcc+6etxW0BB7ruKivXt04nM/r2x1dSOjL8HiBNXlNMPXu09hDc70lhOLhS0AvpRyWWjyrEEShd2FxmrR3xYtxDiSLmhLytB0HQtLb/DZAGX9PXlzIHLOu2JPg+5k4BcOsHPyXJReT4YzujEq6oA8zn9B+Q9rBLnBgzEEies0YaPIVOG2thuqhvHwyn2wpfkK2qz7LY0r74dT7DZvL4mlqDX5W75cMpyMJoBfqLoDqcbRO5H7kTSS8BsZ9BCOp0reA9Pq2Qqyz5qKNmnz9NsGHF8IoG70Pf3M5qDQnPepXaVS0CGiTakFrC9EqGcx3k/oc5kRE= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3aebdd7-9890-4321-3ee9-08dd704146fe X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:46:22.6130 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Qp+buGPzhwgNKaZC4ifs6pnsi185C50kAyNM0ZvVkUIOFf+6SRWSWZcXMoGnArGdXPuucIRLHS4+0br/CCstLQ0R+COK1qzq3rR/sWiXxJNjxYCM85lV/UuboE6RsS/e X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9796 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:46:31 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18405 From: Lad Prabhakar commit d930e8f783daef890980c0ca209a0f4f9ae73160 upstream. In preparation for passing custom params for RZ/V2H(P) SoC assign the custom params that are being passed via struct rzg2l_pinctrl_data. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240530173857.164073-14-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 9c1f32f6e1e46..538959643cde7 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -256,6 +256,11 @@ struct rzg2l_pinctrl_data { const struct rzg2l_hwcfg *hwcfg; const u64 *variable_pin_cfg; unsigned int n_variable_pin_cfg; + unsigned int num_custom_params; + const struct pinconf_generic_params *custom_params; +#ifdef CONFIG_DEBUG_FS + const struct pin_config_item *custom_conf_items; +#endif void (*pwpr_pfc_lock_unlock)(struct rzg2l_pinctrl *pctrl, bool lock); void (*pmc_writeb)(struct rzg2l_pinctrl *pctrl, u8 val, u16 offset); u32 (*oen_read)(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin); @@ -2290,6 +2295,13 @@ static int rzg2l_pinctrl_register(struct rzg2l_pinctrl *pctrl) pctrl->desc.pmxops = &rzg2l_pinctrl_pmxops; pctrl->desc.confops = &rzg2l_pinctrl_confops; pctrl->desc.owner = THIS_MODULE; + if (pctrl->data->num_custom_params) { + pctrl->desc.num_custom_params = pctrl->data->num_custom_params; + pctrl->desc.custom_params = pctrl->data->custom_params; +#ifdef CONFIG_DEBUG_FS + pctrl->desc.custom_conf_items = pctrl->data->custom_conf_items; +#endif + } pins = devm_kcalloc(pctrl->dev, pctrl->desc.npins, sizeof(*pins), GFP_KERNEL); if (!pins) From patchwork Mon Mar 31 10:44:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033457 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80606C3600B for ; Mon, 31 Mar 2025 10:46:31 +0000 (UTC) Received: from TYVP286CU001.outbound.protection.outlook.com (TYVP286CU001.outbound.protection.outlook.com [52.101.125.63]) by mx.groups.io with SMTP id smtpd.web11.48815.1743417990206988050 for ; Mon, 31 Mar 2025 03:46:30 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=fnQkVliS; spf=pass (domain: bp.renesas.com, ip: 52.101.125.63, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tr/eg6TqRE5pWoClTEIu57ofyIWQreGtc54pRp5V+Ab+YleCU8cG6p68hWd56cB9kuW5RwoMxq6eMrVvjHG6iCzSbrVm/XgGECol7Nt8SwMv/rnX1eIzviXnj3nxYq9FD+oCSTpScclnpObbhSj5o4Q/bUBpYrCSDOcLU3jtmPMz/S56cesmqhLDzSlwg3DDyNswTiyGqDnVon1Ex7Em9LkaR7dSDGX+BX6VGBiBbIMyVlGN3K5fMFeULyNlgQb0zyz/j8fwtfj6tV85f+aeJibP3XV4vSMBNNCgJQQM3zJI/jihMaCtUwP7xVv//Nt/0mhFU/qR2uLdT9F4a0M+Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JWlxXsid7EHI8Qh7l1aCv3e0RK+rMnSjzpAmQ67xAds=; b=o0sSh91WfTfurjO8sMjMncxezM1io9YM45bcAYhx5YC5+/2yyKaQf+jsFPadQigZ7xYQvB47NSk8Gtswy1MwmuWfBNYvp33fCm/ywtLFgoodW38RV827ka6xP420gZlAYlY2SdsGy0xwrlh4nMGMLhvhycFLlVHByDeZFIxZtfgPXyFVjOd4v2A7qZHx0eDbVzhcB/BQpqSGcZ1sCnMTAEcJ94PVWpz0fFvh3S83dMdWwKiY6xUdiFHwokpm109bCE3gVYaum+xpeYEftt+KUYOzHR4hARIRXkakgBAJG3inBwDfCrp1Wdp7PVmPzJqPJdaDlenYCmxVabiqpCRKaA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JWlxXsid7EHI8Qh7l1aCv3e0RK+rMnSjzpAmQ67xAds=; b=fnQkVliShOn2SPEXVyuFml05OSd+g9eIdYU1PY5rZXOcEUewIBPB1zNxNJCSvYyKVn7v5WXlGRAxroiTtuyBqw4lZ55SyRK8+EPSFsQVycl2mV2pxnvyKHL8NDuWgVMQdTZ9L81FoRvEND926hrxtiAbSy0sW6yJeaY0lNNKiLk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TYWPR01MB10032.jpnprd01.prod.outlook.com (2603:1096:400:1e0::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.36; Mon, 31 Mar 2025 10:46:25 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:46:25 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 18/43] pinctrl: renesas: rzg2l: Acquire lock in rzg2l_pinctrl_pm_setup_pfc() Date: Mon, 31 Mar 2025 12:44:49 +0200 Message-ID: <20250331104514.79090-19-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TYWPR01MB10032:EE_ X-MS-Office365-Filtering-Correlation-Id: 8742ca16-74ab-49b7-2aa8-08dd704148c7 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: FgB7GhoWDKVPUTsxLFA/C78r+xlj57AFYVRpNFdNCa8JVKwwv6qwbWcYZBp9hKIsw8K+Bwxipfvi1IyvDfUXSBXQEnuVSKf+uOOcUmGyOv1lp2kaFBCpEe6odj4y+DwdQhdY1AXc7/qBV0ooyDHY/a/sMQ0KWY1Kp7FIhN9uhp3XSC74RWj+uQGfCZgbtPU+0qIS5TKfy8Z5NN3n9SRLQY5AdUA0dKZGqZnZo/XQilWFYjVV+0yVE5avLGL/7twtf6MPels33UCi2C32PfB9Pm+PMMqkbikSSr4M6Pzrj+MNA9DMKAi9II3c3rjeTI3N1LfQo2dIr5gAg0FyTuDBgFi0sFzerrTK0mlxldFVK6b96SltR9XpQexVvSToCk3u+pOaMf2BORHuSrkK4kgm/bTnwhpkxrWo8J6zXZSUjn0GICrUeCDos1O2aym/b6eVspfXHiKvuI60cawCVD23nXBXOFnrgoFc8n0I5Anu9CoL/DN4XxdR0MbPnGePiSRnlbt7kaWvyyF8z1GnQ9vxrdXBzL1YONItGTILEZ9i0Mr1tFtBMYNe99mvl6w2iVEz4pqZJOML3BEdE+QrEQYMNlvfQadCcMxIfhHJaotY1LwnoKxSWLJHu8w5Hg9FdcPhJeNZZA9kwEK6Kiw9N+z4Rju1PwYIeCoZZ8GVMFGp903w019ctZ+LtcSqDsOlfT2I8tapYQY2szmS0/kpQASdnGMUxm08ORIojxlkhlJh0MGUfHqO3pjYQmZMmpjVMW7rJ6ff6VdHvs4f/QbWcu02Eu3okC2XHTJgcZuyURybe6TjG3dGdA4Yv0pp8+Il3yYEjygv1qk5wGlbJO6r/ZDQP5W1RwD4EIj+cMgtvAFp9K5crdkrmewDIfvSsfYseHOp0+jcvBswhR0ukYUPDH455aes2I/f/qElX/WfCLxt/EaTOzRJklRkYwc/er3HHEAmobEbsl0X3TeqMXsis1RmdlrJbwKxeinpukK4am06HW4jg/DxiTEEAgoBFshWg8T+Ms+fpwACvhjtwpYdrhaZJ4d3lfWc3f9xrasBDTFuyWlKYfvDxXDLf5s3PqUlIGZ/wauRFZZQLMaC4u6zHgg2TcDWR1HyT4bFmGHVHE8owiIBdENQ1+auF7bTI4y9YTnnfvss6WPEgUYxH8gYQN5mWJU88YwdO97v4HFDOTwr4N8WvHUlKA7750kxDKCkb2fuz3rjObuRW6+9vyOcb1WFtjQS+hC2OudkOipWz+S82+AjevdaNYdsrUSe0HhmS5Qtqv1auaLpj/Kd2V0B5pvq7RmZzKloFczo1qrfV0Rw++RoaCJVe5oDOYGJG+2JFGk41fBHSmFZHNDK0QX4voyRSt9zfgDc0yr8GO62kDZ2hdhCBywDSj3k5qQJ1qlGx6F8j7JoiMK/ekVsYr4gNS5LNGT88umssSSSg2mVko8MbTn6G8gmK2aZCQd0oiZuVjTDWQV9MbrRQshB2JRr9GrWLAp8ft4Ug8r+KZCJnAF3DgM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fIkDtHMtcoy8s5JIsQbjXQbwounjROpU9kK8EqyMikYFtbUz7q2EjHMoH8F7LSBOn360vKjYHqU2tKSmL6MbYCjIzAuRTpgH6YBcA376dLKDql7TeYWJlPN4RfuKdFuytYNtPizyYXh7K8tThcsl9K9STJgVfZ3h/gpyn6CKufE8IctwfRWNjiASt6ZSq6R0a3GQz44u/AoG8tscKp6Xd3syjMohv2yJg4PGhff6m9Q6VgVPDq3sHZ59Q0Yawq1u7q1/1TyyR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tNlPfNwQHFqe1+7Hu1h/x+WS/I/zSwfsA7cXwgDKoBThfrK6KRS+PyqKkaQmiqoJ9iHmrKlPXav4x6sGovYzCfFUMQlUWp12QT823O5vZyZohQoBojuyZA2yjpZT49iwstyxBipCr9X1FDm/4rHda+kp87FCX6/jlSZUfDLYFFs+w6qQgnoP88rUGs1rysh09pi+LyqtDs2UuL8CXB5D5dxOAD9RkVj5eu4Tgj2SMoqoJuLbGobPdfJSeR1wLPDPwLLGcJ9BOW9e7bc/CWtRFf0nMcu6nrNp46eb3ZNOU5XsHoPM= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8742ca16-74ab-49b7-2aa8-08dd704148c7 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:46:25.3698 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: L/OXl7NzyM9bqRWukBUldeIg6O4l00f+6p61dA5tqmTtnvJA2gZyhakNveGTP/KtlkzleaD9F4wFkWfwMHzCHzNgqenC60+m9v4ATlslZJmk/k9OAtYAgyKvOw+48jaU X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10032 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:46:31 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18406 From: Lad Prabhakar commit 951eaac107631b26649b00cf5f5d9d7d83d8bca4 upstream. To keep consistency with rzg2l_pinctrl_set_pfc_mode(), acquire the lock in rzg2l_pinctrl_pm_setup_pfc() during PFC setup. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea # on RZ/G3S Link: https://lore.kernel.org/r/20240530173857.164073-15-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 538959643cde7..d42ce90af83ac 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -2541,7 +2541,9 @@ static void rzg2l_pinctrl_pm_setup_dedicated_regs(struct rzg2l_pinctrl *pctrl, b static void rzg2l_pinctrl_pm_setup_pfc(struct rzg2l_pinctrl *pctrl) { u32 nports = pctrl->data->n_port_pins / RZG2L_PINS_PER_PORT; + unsigned long flags; + spin_lock_irqsave(&pctrl->lock, flags); pctrl->data->pwpr_pfc_lock_unlock(pctrl, false); /* Restore port registers. */ @@ -2586,6 +2588,7 @@ static void rzg2l_pinctrl_pm_setup_pfc(struct rzg2l_pinctrl *pctrl) } pctrl->data->pwpr_pfc_lock_unlock(pctrl, true); + spin_unlock_irqrestore(&pctrl->lock, flags); } static int rzg2l_pinctrl_suspend_noirq(struct device *dev) From patchwork Mon Mar 31 10:44:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033458 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89280C36014 for ; Mon, 31 Mar 2025 10:46:31 +0000 (UTC) Received: from TYVP286CU001.outbound.protection.outlook.com (TYVP286CU001.outbound.protection.outlook.com [52.101.125.63]) by mx.groups.io with SMTP id smtpd.web11.48815.1743417990206988050 for ; Mon, 31 Mar 2025 03:46:31 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=tJcWfy1r; spf=pass (domain: bp.renesas.com, ip: 52.101.125.63, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=X/AmVt8689ibxnOT42WD4+OgLDfLNrV6dmSJemQ9PWo2SIaLTiop1S5hRKlKRB53CAfJfy2N7WzA64KpxyUWmcANvIB2WlngBsSC0+1EZb+LpYCFBIp5N9I93Se8KY5roUKejSzkg5b4CVCOTY2zMFyjJJ/dmBc2SF4DSmTj1h91dHggfDM/jOXrZskdE8qqmSht80ju3fLwQu+luOgJ0816ARfT1I+THPzlP3p6nMNCe/W987QpwRYmFSFaGtLw1K9fXVQ5/6zQHMF7fxizxH2aaiHZ8DXd1Eq78tVtXtao4GlFyQKN0tl07Fp9pdYmgbErOWBRem0r7uRhZ19IBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=z3GDNQqD7JEkuuTa0wsyqPLVyWpt8zFDwfKY4INbhDQ=; b=GvhSWgSHmK9R85J06oo6cf8eauA21yG4O1TIkFyFRCYVl4Eb06g1G1MjuMj0tW6LHeCeRzsJF7mXYxu/4FyFgCE1z4sZdzrTOt5TIkJyF0LI0NfdT6CdAqIDCS45UCJiKQqtg6WxcoW93g7juZSBvgXl4YqsT3JAsMxLbVfHqD3+gBqKFCTBhJvI8SkPq1q1+yj7nfMRPcQai7cHAkYgGZU57rDSYMqKfSSdqQZssaTwjx73hPORRoAoJpAQ5CnbOue7BSF0blKt+k+6Ym89Pxg17ZElARDK2FXaLL87dAbiLCo3nhHot0YkdqFFWT/JPEEbBv4Co4//CVIz9HDQ1g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z3GDNQqD7JEkuuTa0wsyqPLVyWpt8zFDwfKY4INbhDQ=; b=tJcWfy1rtTobz/k9lUhchphIObvKJRn+zx71GfSHulEDc2rvABKpzRIhSKEaHnnRJak8LybOVfCNbbWZRTb3JMTNesv0ItSmPBLfjnHYhWV2uESB1kSi8fhUhZkS1w83SgxYalyHcQu9OHVnwMIhsd0G+GzkI9ZV9I64qqMRAzQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TYWPR01MB10032.jpnprd01.prod.outlook.com (2603:1096:400:1e0::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.36; Mon, 31 Mar 2025 10:46:28 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:46:28 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 19/43] pinctrl: renesas: rzg2l: Add support for RZ/V2H SoC Date: Mon, 31 Mar 2025 12:44:50 +0200 Message-ID: <20250331104514.79090-20-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TYWPR01MB10032:EE_ X-MS-Office365-Filtering-Correlation-Id: d439138e-4f97-428b-5011-08dd70414a68 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: EhYCpth+ATXSDmzQF52vxEi7NOGK3GbPPSxUt9G/f8avzi4fNN6nkjMpZL91yyhAQVxUeFWuoHEdoH8Cg9XlP+vIOXiblACry28Jhw8MFSEBHe2J39Hq9CUkLu9y8pD2a7Erhkpn/d/Y9yAvUAk5gpMv7DwXmz/sWrVGN98hXFRu8Y//5eJw2CRAgpNQ+L5Cr0exZgrxSeSW8CW0V07cU7PH2k0FzZKLwCibj/ojcGhsKN2FJ2fgvTTUZQ2A8EmwQJpqIQ5oVT0orWXmt2R6vwV5ma4oxVwL696H/S+t9+jigl+I3cNF3Z5l+qkQeUaZeBgnxsIUhxLcuu+3+1x7BSJoGzEE+MBtvNRzZz1kH3OuaMW+NKPLW3sHAi971oIRlkPLEua6Enm3psjbOk8NNKVlAg3yQ+ZtOMTj360kyMa/bJ+Ej0ZC+S0uYz9VNM0o3baxSs0ks75wtQ+h9wjet5RPWEo3W0fHjlhHHCpaql4CcvRjQrzJKcec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SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: etGZSmBtjOnAI+zC8MAMLDoCSLLTlOayGsofF4Kyw8URVg14Pk+4D9yJDoYYN/KeE047NesRTNoU/31btAP/BXZEuyKebQiQZ7B7o2t7aUYN6H1V9P0pXzfo8n36gJlygj9Zz07FFIMapUzmnUb2InjPcPuRZ37Enu7IMBCuWrGdv7fTMv5xTxFsasXjR/zWBNuC6ajmYYObjENoWNd8PhIzUVEvY9EDhgjfP4GSatnuplAnYwQ6JTRMVBNxwIDugoPeyZc/RmUCyN9wW+D+dU3tQUipCBL2vNWL6rdFIUG8qoL088RhsxTw3Brehqp0ISzy4W1Dk0doeZZl2eroDBUK2zPXMI+VhjZMqe9z2ML4zXsGvP6V4yEnA1AOOyFBbLeq2zta0IuIZf67XOQITrqGukk+VeMMpvZWRDORBD1jR23ByNUpAYxAAyaCKU5VgdBgoMVId6eU6j3Lj3agBELy+UCblAdIbfwHhSjGzzLeuapYsl1hLa73VkrQ9OefOuHE8kP1i3dQ317w3iydgSTfuttst+4u5egbqugHlcY20WYbvgtepJ00VdZWmmLg6NnXaLzyxi3TLIWYQU88NM0/AUspkWDE22dvWcdWMYey+c5YLyZRPwiRYj7i7v9PfJks7nnYogXjBCTOAkAiqU28yzA4ifd8q8YLzGRTp5mgGCe348Qylw6twVvcfL1Z2JEQZttzXdwKVHWqrUw0Yuxu2hHyoUNJPefBZAAJ3qAbrlt82bc+919QuLRu4Y28hf0WFaAeLIeIqxP3u2H3It8AebpT4WagsKwNxCsigLD200kudCq9mgIuWEoHp7Z14N2BMhYTUPz1PbhqCfNSdaJw4rVo9ERI3Ct4iKUYyWmcqNidetg+WAuLA9wuBhbWThdknYrPw6AX6ybcFgHhGoDYwbK7+O+IN/FZrKDnK0jB4p94gRcRRmI5VaUMKS8NBP5XXgyGbCHukXxBIip8c3kCvVhfJm8EqpP17JTci1ynHOGXWWNA8WjJK+pzhUdZLPMt+FjKbAtl6yVeDR3CbpjipPW5bWl0hHYeM5apxi7SbRDJJ/sngmqCSleaPUoRL6oQyT6wBYAGEJw//BFu98Tt8SVH+ZaXJfDz4p5XR8hwNR/JTABy2GgwZ+fdKlynJ59FhZBAQ295/zH/U6G0yW7KkFTj+eDaXRudd9TrlL1QNP/gH/H/Kk2zfMvUY7tfzpwFKLXRh6U46LOFepeDEKcKMnE0QHW8bdnyi8kEr7fgeDvlQgCsfyIfRegr/DE0XNDrEE2hUdXl972QOIsY2mz9wfL3q+R5CMxESPo0YePg2tX0efeRFkhE9wv29E/Nb4IkevWHaSaKL2kuhFJM1Erh4EQv/+Tlcqt3xBCeNvvIzjVCnWFmXsdKVWrLssLmDbCJHFQuJFVZJD+NBSfxQTExlweb750e64tpaqZUxvP5z0N/52MVie0UcyiUv0SrqobE5WZLY2/VMahcXfZXLu+TST7MDFEINrsE/VYUNRudOgRK19Ls3MWiixtB3kUzAG60E4dowCRHPwQ4D2AJ+VlobnCEPQlrTjzAYlCT2N+/SPXceg7iqWRA8XidDuITtLwo91smUPUbU9kxuJhnOraGvLfTbKxbPKWEwPKzb6w= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: d439138e-4f97-428b-5011-08dd70414a68 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:46:28.3710 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /cZ6TtcoI2/YM1MgsUh37452Hl4ri22DuuIfooNWcXN7RaQ6/whbknpHfabZ/mZDzWGnVXZ042uDlDsEJKEvMcC02cO+uc5ICcDGpjs6GcSFv6S2iYGGYFGj5jpNuWnb X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10032 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:46:31 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18407 From: Lad Prabhakar commit 9bd95ac86e700ab8b1a6c225685e0e5afe426b4e upstream. Add pinctrl driver support for RZ/V2H(P) SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240530173857.164073-16-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 374 +++++++++++++++++++++++- 1 file changed, 371 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index d42ce90af83ac..8c29c8d3c5743 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -58,6 +58,10 @@ #define PIN_CFG_OEN BIT(15) #define PIN_CFG_VARIABLE BIT(16) #define PIN_CFG_NOGPIO_INT BIT(17) +#define PIN_CFG_NOD BIT(18) /* N-ch Open Drain */ +#define PIN_CFG_SMT BIT(19) /* Schmitt-trigger input control */ +#define PIN_CFG_ELC BIT(20) +#define PIN_CFG_IOLH_RZV2H BIT(21) #define RZG2L_MPXED_COMMON_PIN_FUNCS(group) \ (PIN_CFG_IOLH_##group | \ @@ -72,6 +76,11 @@ #define RZG3S_MPXED_PIN_FUNCS(group) (RZG2L_MPXED_COMMON_PIN_FUNCS(group) | \ PIN_CFG_SOFT_PS) +#define RZV2H_MPXED_PIN_FUNCS (RZG2L_MPXED_COMMON_PIN_FUNCS(RZV2H) | \ + PIN_CFG_NOD | \ + PIN_CFG_SR | \ + PIN_CFG_SMT) + #define RZG2L_MPXED_ETH_PIN_FUNCS(x) ((x) | \ PIN_CFG_FILONOFF | \ PIN_CFG_FILNUM | \ @@ -134,6 +143,7 @@ #define ETH_POC(off, ch) ((off) + (ch) * 4) #define QSPI (0x3008) #define ETH_MODE (0x3018) +#define PFC_OEN (0x3C40) /* known on RZ/V2H(P) only */ #define PVDD_2500 2 /* I/O domain voltage 2.5V */ #define PVDD_1800 1 /* I/O domain voltage <= 1.8V */ @@ -141,6 +151,8 @@ #define PWPR_B0WI BIT(7) /* Bit Write Disable */ #define PWPR_PFCWE BIT(6) /* PFC Register Write Enable */ +#define PWPR_REGWE_A BIT(6) /* PFC and PMC Register Write Enable on RZ/V2H(P) */ +#define PWPR_REGWE_B BIT(5) /* OEN Register Write Enable, known only in RZ/V2H(P) */ #define PM_MASK 0x03 #define PFC_MASK 0x07 @@ -159,6 +171,19 @@ #define RZG2L_TINT_IRQ_START_INDEX 9 #define RZG2L_PACK_HWIRQ(t, i) (((t) << 16) | (i)) +/* Custom pinconf parameters */ +#define RENESAS_RZV2H_PIN_CONFIG_OUTPUT_IMPEDANCE (PIN_CONFIG_END + 1) + +static const struct pinconf_generic_params renesas_rzv2h_custom_bindings[] = { + { "renesas,output-impedance", RENESAS_RZV2H_PIN_CONFIG_OUTPUT_IMPEDANCE, 1 }, +}; + +#ifdef CONFIG_DEBUG_FS +static const struct pin_config_item renesas_rzv2h_conf_items[] = { + PCONFDUMP(RENESAS_RZV2H_PIN_CONFIG_OUTPUT_IMPEDANCE, "output-impedance", "x", true), +}; +#endif + /* Read/write 8 bits register */ #define RZG2L_PCTRL_REG_ACCESS8(_read, _addr, _val) \ do { \ @@ -351,6 +376,15 @@ static u64 rzg2l_pinctrl_get_variable_pin_cfg(struct rzg2l_pinctrl *pctrl, return 0; } +static const u64 r9a09g057_variable_pin_cfg[] = { + RZG2L_VARIABLE_PIN_CFG_PACK(11, 0, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(11, 1, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(11, 2, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(11, 3, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(11, 4, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(11, 5, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), +}; + #ifdef CONFIG_RISCV static const u64 r9a07g043f_variable_pin_cfg[] = { RZG2L_VARIABLE_PIN_CFG_PACK(20, 0, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | @@ -401,6 +435,17 @@ static void rzg2l_pmc_writeb(struct rzg2l_pinctrl *pctrl, u8 val, u16 offset) writeb(val, pctrl->base + offset); } +static void rzv2h_pmc_writeb(struct rzg2l_pinctrl *pctrl, u8 val, u16 offset) +{ + const struct rzg2l_register_offsets *regs = &pctrl->data->hwcfg->regs; + u8 pwpr; + + pwpr = readb(pctrl->base + regs->pwpr); + writeb(pwpr | PWPR_REGWE_A, pctrl->base + regs->pwpr); + writeb(val, pctrl->base + offset); + writeb(pwpr & ~PWPR_REGWE_A, pctrl->base + regs->pwpr); +} + static void rzg2l_pinctrl_set_pfc_mode(struct rzg2l_pinctrl *pctrl, u8 pin, u8 off, u8 func) { @@ -1041,14 +1086,104 @@ static int rzg2l_bias_param_to_hw(enum pin_config_param param) return -EINVAL; } +static int rzv2h_hw_to_bias_param(unsigned int bias) +{ + switch (bias) { + case 0: + case 1: + return PIN_CONFIG_BIAS_DISABLE; + case 2: + return PIN_CONFIG_BIAS_PULL_DOWN; + case 3: + return PIN_CONFIG_BIAS_PULL_UP; + default: + break; + } + + return -EINVAL; +} + +static int rzv2h_bias_param_to_hw(enum pin_config_param param) +{ + switch (param) { + case PIN_CONFIG_BIAS_DISABLE: + return 0; + case PIN_CONFIG_BIAS_PULL_DOWN: + return 2; + case PIN_CONFIG_BIAS_PULL_UP: + return 3; + default: + break; + } + + return -EINVAL; +} + +static u8 rzv2h_pin_to_oen_bit(struct rzg2l_pinctrl *pctrl, u32 offset) +{ + static const char * const pin_names[] = { "ET0_TXC_TXCLK", "ET1_TXC_TXCLK", + "XSPI0_RESET0N", "XSPI0_CS0N", + "XSPI0_CKN", "XSPI0_CKP" }; + const struct pinctrl_pin_desc *pin_desc = &pctrl->desc.pins[offset]; + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(pin_names); i++) { + if (!strcmp(pin_desc->name, pin_names[i])) + return i; + } + + /* Should not happen. */ + return 0; +} + +static u32 rzv2h_oen_read(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin) +{ + u8 bit; + + if (!(caps & PIN_CFG_OEN)) + return 0; + + bit = rzv2h_pin_to_oen_bit(pctrl, offset); + + return !(readb(pctrl->base + PFC_OEN) & BIT(bit)); +} + +static int rzv2h_oen_write(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin, u8 oen) +{ + const struct rzg2l_hwcfg *hwcfg = pctrl->data->hwcfg; + const struct rzg2l_register_offsets *regs = &hwcfg->regs; + unsigned long flags; + u8 val, bit; + u8 pwpr; + + if (!(caps & PIN_CFG_OEN)) + return -EINVAL; + + bit = rzv2h_pin_to_oen_bit(pctrl, offset); + spin_lock_irqsave(&pctrl->lock, flags); + val = readb(pctrl->base + PFC_OEN); + if (oen) + val &= ~BIT(bit); + else + val |= BIT(bit); + + pwpr = readb(pctrl->base + regs->pwpr); + writeb(pwpr | PWPR_REGWE_B, pctrl->base + regs->pwpr); + writeb(val, pctrl->base + PFC_OEN); + writeb(pwpr & ~PWPR_REGWE_B, pctrl->base + regs->pwpr); + spin_unlock_irqrestore(&pctrl->lock, flags); + + return 0; +} + static int rzg2l_pinctrl_pinconf_get(struct pinctrl_dev *pctldev, unsigned int _pin, unsigned long *config) { struct rzg2l_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); - enum pin_config_param param = pinconf_to_config_param(*config); const struct rzg2l_hwcfg *hwcfg = pctrl->data->hwcfg; const struct pinctrl_pin_desc *pin = &pctrl->desc.pins[_pin]; + u32 param = pinconf_to_config_param(*config); u64 *pin_data = pin->drv_data; unsigned int arg = 0; u32 off; @@ -1159,6 +1294,13 @@ static int rzg2l_pinctrl_pinconf_get(struct pinctrl_dev *pctldev, break; } + case RENESAS_RZV2H_PIN_CONFIG_OUTPUT_IMPEDANCE: + if (!(cfg & PIN_CFG_IOLH_RZV2H)) + return -EINVAL; + + arg = rzg2l_read_pin_config(pctrl, IOLH(off), bit, IOLH_MASK); + break; + default: return -ENOTSUPP; } @@ -1178,9 +1320,8 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, const struct rzg2l_hwcfg *hwcfg = pctrl->data->hwcfg; struct rzg2l_pinctrl_pin_settings settings = pctrl->settings[_pin]; u64 *pin_data = pin->drv_data; - enum pin_config_param param; unsigned int i, arg, index; - u32 off; + u32 off, param; u64 cfg; int ret; u8 bit; @@ -1285,6 +1426,16 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, rzg2l_rmw_pin_config(pctrl, IOLH(off), bit, IOLH_MASK, index); break; + case RENESAS_RZV2H_PIN_CONFIG_OUTPUT_IMPEDANCE: + if (!(cfg & PIN_CFG_IOLH_RZV2H)) + return -EINVAL; + + arg = pinconf_to_config_argument(_configs[i]); + if (arg > 3) + return -EINVAL; + rzg2l_rmw_pin_config(pctrl, IOLH(off), bit, IOLH_MASK, arg); + break; + default: return -EOPNOTSUPP; } @@ -1732,6 +1883,39 @@ static const u64 r9a08g045_gpio_configs[] = { RZG2L_GPIO_PORT_PACK(6, 0x2a, RZG3S_MPXED_PIN_FUNCS(A)), /* P18 */ }; +static const char * const rzv2h_gpio_names[] = { + "P00", "P01", "P02", "P03", "P04", "P05", "P06", "P07", + "P10", "P11", "P12", "P13", "P14", "P15", "P16", "P17", + "P20", "P21", "P22", "P23", "P24", "P25", "P26", "P27", + "P30", "P31", "P32", "P33", "P34", "P35", "P36", "P37", + "P40", "P41", "P42", "P43", "P44", "P45", "P46", "P47", + "P50", "P51", "P52", "P53", "P54", "P55", "P56", "P57", + "P60", "P61", "P62", "P63", "P64", "P65", "P66", "P67", + "P70", "P71", "P72", "P73", "P74", "P75", "P76", "P77", + "P80", "P81", "P82", "P83", "P84", "P85", "P86", "P87", + "P90", "P91", "P92", "P93", "P94", "P95", "P96", "P97", + "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", + "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", +}; + +static const u64 r9a09g057_gpio_configs[] = { + RZG2L_GPIO_PORT_PACK(8, 0x20, RZV2H_MPXED_PIN_FUNCS), /* P0 */ + RZG2L_GPIO_PORT_PACK(6, 0x21, RZV2H_MPXED_PIN_FUNCS), /* P1 */ + RZG2L_GPIO_PORT_PACK(2, 0x22, RZG2L_MPXED_COMMON_PIN_FUNCS(RZV2H) | + PIN_CFG_NOD), /* P2 */ + RZG2L_GPIO_PORT_PACK(8, 0x23, RZV2H_MPXED_PIN_FUNCS), /* P3 */ + RZG2L_GPIO_PORT_PACK(8, 0x24, RZV2H_MPXED_PIN_FUNCS), /* P4 */ + RZG2L_GPIO_PORT_PACK(8, 0x25, RZV2H_MPXED_PIN_FUNCS), /* P5 */ + RZG2L_GPIO_PORT_PACK(8, 0x26, RZV2H_MPXED_PIN_FUNCS | + PIN_CFG_ELC), /* P6 */ + RZG2L_GPIO_PORT_PACK(8, 0x27, RZV2H_MPXED_PIN_FUNCS), /* P7 */ + RZG2L_GPIO_PORT_PACK(8, 0x28, RZV2H_MPXED_PIN_FUNCS | + PIN_CFG_ELC), /* P8 */ + RZG2L_GPIO_PORT_PACK(8, 0x29, RZV2H_MPXED_PIN_FUNCS), /* P9 */ + RZG2L_GPIO_PORT_PACK(8, 0x2a, RZV2H_MPXED_PIN_FUNCS), /* PA */ + RZG2L_GPIO_PORT_PACK(6, 0x2b, PIN_CFG_VARIABLE), /* PB */ +}; + static const struct { struct rzg2l_dedicated_configs common[35]; struct rzg2l_dedicated_configs rzg2l_pins[7]; @@ -1858,6 +2042,138 @@ static const struct rzg2l_dedicated_configs rzg3s_dedicated_pins[] = { PIN_CFG_IO_VMC_SD1)) }, }; +static struct rzg2l_dedicated_configs rzv2h_dedicated_pins[] = { + { "NMI", RZG2L_SINGLE_PIN_PACK(0x1, 0, (PIN_CFG_FILONOFF | PIN_CFG_FILNUM | + PIN_CFG_FILCLKSEL)) }, + { "TMS_SWDIO", RZG2L_SINGLE_PIN_PACK(0x3, 0, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_IEN)) }, + { "TDO", RZG2L_SINGLE_PIN_PACK(0x3, 2, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR)) }, + { "WDTUDFCA", RZG2L_SINGLE_PIN_PACK(0x5, 0, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD | PIN_CFG_NOD)) }, + { "WDTUDFCM", RZG2L_SINGLE_PIN_PACK(0x5, 1, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD | PIN_CFG_NOD)) }, + { "SCIF_RXD", RZG2L_SINGLE_PIN_PACK(0x6, 0, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "SCIF_TXD", RZG2L_SINGLE_PIN_PACK(0x6, 1, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "XSPI0_CKP", RZG2L_SINGLE_PIN_PACK(0x7, 0, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD | PIN_CFG_OEN)) }, + { "XSPI0_CKN", RZG2L_SINGLE_PIN_PACK(0x7, 1, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD | PIN_CFG_OEN)) }, + { "XSPI0_CS0N", RZG2L_SINGLE_PIN_PACK(0x7, 2, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD | PIN_CFG_OEN)) }, + { "XSPI0_DS", RZG2L_SINGLE_PIN_PACK(0x7, 3, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "XSPI0_RESET0N", RZG2L_SINGLE_PIN_PACK(0x7, 4, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD | PIN_CFG_OEN)) }, + { "XSPI0_RSTO0N", RZG2L_SINGLE_PIN_PACK(0x7, 5, (PIN_CFG_PUPD)) }, + { "XSPI0_INT0N", RZG2L_SINGLE_PIN_PACK(0x7, 6, (PIN_CFG_PUPD)) }, + { "XSPI0_ECS0N", RZG2L_SINGLE_PIN_PACK(0x7, 7, (PIN_CFG_PUPD)) }, + { "XSPI0_IO0", RZG2L_SINGLE_PIN_PACK(0x8, 0, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "XSPI0_IO1", RZG2L_SINGLE_PIN_PACK(0x8, 1, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "XSPI0_IO2", RZG2L_SINGLE_PIN_PACK(0x8, 2, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "XSPI0_IO3", RZG2L_SINGLE_PIN_PACK(0x8, 3, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "XSPI0_IO4", RZG2L_SINGLE_PIN_PACK(0x8, 4, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "XSPI0_IO5", RZG2L_SINGLE_PIN_PACK(0x8, 5, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "XSPI0_IO6", RZG2L_SINGLE_PIN_PACK(0x8, 6, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "XSPI0_IO7", RZG2L_SINGLE_PIN_PACK(0x8, 7, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "SD0CLK", RZG2L_SINGLE_PIN_PACK(0x9, 0, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR)) }, + { "SD0CMD", RZG2L_SINGLE_PIN_PACK(0x9, 1, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "SD0RSTN", RZG2L_SINGLE_PIN_PACK(0x9, 2, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR)) }, + { "SD0DAT0", RZG2L_SINGLE_PIN_PACK(0xa, 0, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "SD0DAT1", RZG2L_SINGLE_PIN_PACK(0xa, 1, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "SD0DAT2", RZG2L_SINGLE_PIN_PACK(0xa, 2, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "SD0DAT3", RZG2L_SINGLE_PIN_PACK(0xa, 3, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "SD0DAT4", RZG2L_SINGLE_PIN_PACK(0xa, 4, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "SD0DAT5", RZG2L_SINGLE_PIN_PACK(0xa, 5, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "SD0DAT6", RZG2L_SINGLE_PIN_PACK(0xa, 6, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "SD0DAT7", RZG2L_SINGLE_PIN_PACK(0xa, 7, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "SD1CLK", RZG2L_SINGLE_PIN_PACK(0xb, 0, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR)) }, + { "SD1CMD", RZG2L_SINGLE_PIN_PACK(0xb, 1, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "SD1DAT0", RZG2L_SINGLE_PIN_PACK(0xc, 0, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "SD1DAT1", RZG2L_SINGLE_PIN_PACK(0xc, 1, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "SD1DAT2", RZG2L_SINGLE_PIN_PACK(0xc, 2, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "SD1DAT3", RZG2L_SINGLE_PIN_PACK(0xc, 3, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "PCIE0_RSTOUTB", RZG2L_SINGLE_PIN_PACK(0xe, 0, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR)) }, + { "PCIE1_RSTOUTB", RZG2L_SINGLE_PIN_PACK(0xe, 1, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR)) }, + { "ET0_MDIO", RZG2L_SINGLE_PIN_PACK(0xf, 0, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "ET0_MDC", RZG2L_SINGLE_PIN_PACK(0xf, 1, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "ET0_RXCTL_RXDV", RZG2L_SINGLE_PIN_PACK(0x10, 0, (PIN_CFG_PUPD)) }, + { "ET0_TXCTL_TXEN", RZG2L_SINGLE_PIN_PACK(0x10, 1, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "ET0_TXER", RZG2L_SINGLE_PIN_PACK(0x10, 2, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "ET0_RXER", RZG2L_SINGLE_PIN_PACK(0x10, 3, (PIN_CFG_PUPD)) }, + { "ET0_RXC_RXCLK", RZG2L_SINGLE_PIN_PACK(0x10, 4, (PIN_CFG_PUPD)) }, + { "ET0_TXC_TXCLK", RZG2L_SINGLE_PIN_PACK(0x10, 5, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD | PIN_CFG_OEN)) }, + { "ET0_CRS", RZG2L_SINGLE_PIN_PACK(0x10, 6, (PIN_CFG_PUPD)) }, + { "ET0_COL", RZG2L_SINGLE_PIN_PACK(0x10, 7, (PIN_CFG_PUPD)) }, + { "ET0_TXD0", RZG2L_SINGLE_PIN_PACK(0x11, 0, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "ET0_TXD1", RZG2L_SINGLE_PIN_PACK(0x11, 1, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "ET0_TXD2", RZG2L_SINGLE_PIN_PACK(0x11, 2, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "ET0_TXD3", RZG2L_SINGLE_PIN_PACK(0x11, 3, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "ET0_RXD0", RZG2L_SINGLE_PIN_PACK(0x11, 4, (PIN_CFG_PUPD)) }, + { "ET0_RXD1", RZG2L_SINGLE_PIN_PACK(0x11, 5, (PIN_CFG_PUPD)) }, + { "ET0_RXD2", RZG2L_SINGLE_PIN_PACK(0x11, 6, (PIN_CFG_PUPD)) }, + { "ET0_RXD3", RZG2L_SINGLE_PIN_PACK(0x11, 7, (PIN_CFG_PUPD)) }, + { "ET1_MDIO", RZG2L_SINGLE_PIN_PACK(0x12, 0, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "ET1_MDC", RZG2L_SINGLE_PIN_PACK(0x12, 1, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "ET1_RXCTL_RXDV", RZG2L_SINGLE_PIN_PACK(0x13, 0, (PIN_CFG_PUPD)) }, + { "ET1_TXCTL_TXEN", RZG2L_SINGLE_PIN_PACK(0x13, 1, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "ET1_TXER", RZG2L_SINGLE_PIN_PACK(0x13, 2, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "ET1_RXER", RZG2L_SINGLE_PIN_PACK(0x13, 3, (PIN_CFG_PUPD)) }, + { "ET1_RXC_RXCLK", RZG2L_SINGLE_PIN_PACK(0x13, 4, (PIN_CFG_PUPD)) }, + { "ET1_TXC_TXCLK", RZG2L_SINGLE_PIN_PACK(0x13, 5, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD | PIN_CFG_OEN)) }, + { "ET1_CRS", RZG2L_SINGLE_PIN_PACK(0x13, 6, (PIN_CFG_PUPD)) }, + { "ET1_COL", RZG2L_SINGLE_PIN_PACK(0x13, 7, (PIN_CFG_PUPD)) }, + { "ET1_TXD0", RZG2L_SINGLE_PIN_PACK(0x14, 0, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "ET1_TXD1", RZG2L_SINGLE_PIN_PACK(0x14, 1, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "ET1_TXD2", RZG2L_SINGLE_PIN_PACK(0x14, 2, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "ET1_TXD3", RZG2L_SINGLE_PIN_PACK(0x14, 3, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | + PIN_CFG_PUPD)) }, + { "ET1_RXD0", RZG2L_SINGLE_PIN_PACK(0x14, 4, (PIN_CFG_PUPD)) }, + { "ET1_RXD1", RZG2L_SINGLE_PIN_PACK(0x14, 5, (PIN_CFG_PUPD)) }, + { "ET1_RXD2", RZG2L_SINGLE_PIN_PACK(0x14, 6, (PIN_CFG_PUPD)) }, + { "ET1_RXD3", RZG2L_SINGLE_PIN_PACK(0x14, 7, (PIN_CFG_PUPD)) }, +}; + static int rzg2l_gpio_get_gpioint(unsigned int virq, struct rzg2l_pinctrl *pctrl) { const struct pinctrl_pin_desc *pin_desc = &pctrl->desc.pins[virq]; @@ -2394,6 +2710,9 @@ static int rzg2l_pinctrl_probe(struct platform_device *pdev) BUILD_BUG_ON(ARRAY_SIZE(r9a08g045_gpio_configs) * RZG2L_PINS_PER_PORT > ARRAY_SIZE(rzg2l_gpio_names)); + BUILD_BUG_ON(ARRAY_SIZE(r9a09g057_gpio_configs) * RZG2L_PINS_PER_PORT > + ARRAY_SIZE(rzv2h_gpio_names)); + pctrl = devm_kzalloc(&pdev->dev, sizeof(*pctrl), GFP_KERNEL); if (!pctrl) return -ENOMEM; @@ -2665,6 +2984,22 @@ static void rzg2l_pwpr_pfc_lock_unlock(struct rzg2l_pinctrl *pctrl, bool lock) } } +static void rzv2h_pwpr_pfc_lock_unlock(struct rzg2l_pinctrl *pctrl, bool lock) +{ + const struct rzg2l_register_offsets *regs = &pctrl->data->hwcfg->regs; + u8 pwpr; + + if (lock) { + /* Set the PWPR register to be write-protected */ + pwpr = readb(pctrl->base + regs->pwpr); + writeb(pwpr & ~PWPR_REGWE_A, pctrl->base + regs->pwpr); + } else { + /* Set the PWPR register to allow PFC and PMC register to write */ + pwpr = readb(pctrl->base + regs->pwpr); + writeb(PWPR_REGWE_A | pwpr, pctrl->base + regs->pwpr); + } +} + static const struct rzg2l_hwcfg rzg2l_hwcfg = { .regs = { .pwpr = 0x3014, @@ -2710,6 +3045,12 @@ static const struct rzg2l_hwcfg rzg3s_hwcfg = { .oen_max_port = 7, /* P7_1 is the maximum OEN port. */ }; +static const struct rzg2l_hwcfg rzv2h_hwcfg = { + .regs = { + .pwpr = 0x3c04, + }, +}; + static struct rzg2l_pinctrl_data r9a07g043_data = { .port_pins = rzg2l_gpio_names, .port_pin_configs = r9a07g043_gpio_configs, @@ -2763,6 +3104,29 @@ static struct rzg2l_pinctrl_data r9a08g045_data = { .bias_param_to_hw = &rzg2l_bias_param_to_hw, }; +static struct rzg2l_pinctrl_data r9a09g057_data = { + .port_pins = rzv2h_gpio_names, + .port_pin_configs = r9a09g057_gpio_configs, + .n_ports = ARRAY_SIZE(r9a09g057_gpio_configs), + .dedicated_pins = rzv2h_dedicated_pins, + .n_port_pins = ARRAY_SIZE(r9a09g057_gpio_configs) * RZG2L_PINS_PER_PORT, + .n_dedicated_pins = ARRAY_SIZE(rzv2h_dedicated_pins), + .hwcfg = &rzv2h_hwcfg, + .variable_pin_cfg = r9a09g057_variable_pin_cfg, + .n_variable_pin_cfg = ARRAY_SIZE(r9a09g057_variable_pin_cfg), + .num_custom_params = ARRAY_SIZE(renesas_rzv2h_custom_bindings), + .custom_params = renesas_rzv2h_custom_bindings, +#ifdef CONFIG_DEBUG_FS + .custom_conf_items = renesas_rzv2h_conf_items, +#endif + .pwpr_pfc_lock_unlock = &rzv2h_pwpr_pfc_lock_unlock, + .pmc_writeb = &rzv2h_pmc_writeb, + .oen_read = &rzv2h_oen_read, + .oen_write = &rzv2h_oen_write, + .hw_to_bias_param = &rzv2h_hw_to_bias_param, + .bias_param_to_hw = &rzv2h_bias_param_to_hw, +}; + static const struct of_device_id rzg2l_pinctrl_of_table[] = { { .compatible = "renesas,r9a07g043-pinctrl", @@ -2776,6 +3140,10 @@ static const struct of_device_id rzg2l_pinctrl_of_table[] = { .compatible = "renesas,r9a08g045-pinctrl", .data = &r9a08g045_data, }, + { + .compatible = "renesas,r9a09g057-pinctrl", + .data = &r9a09g057_data, + }, { /* sentinel */ } }; From patchwork Mon Mar 31 10:44:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033460 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 871F9C3600B for ; Mon, 31 Mar 2025 10:46:41 +0000 (UTC) Received: from TYVP286CU001.outbound.protection.outlook.com (TYVP286CU001.outbound.protection.outlook.com [52.101.125.52]) by mx.groups.io with SMTP id smtpd.web10.49070.1743417993355484910 for ; Mon, 31 Mar 2025 03:46:33 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=QsOQyYgt; spf=pass (domain: bp.renesas.com, ip: 52.101.125.52, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eOQN1TCmIGs2Hjj6rtsgym+ACmeEha77wiDEHpPld1JBtWzUSHBYFg2oS8Xsk2hO3Mg9S2OrwdInLbvHw4WTSlgCD0rK83Ur/XEH9i6SjWF7EydsxoMEFmDZxCGDg1zgT8Sw1hzk/L8iQPvxXH66GAm1tqz5RCurp9VkiB2lxSZXx4J9jX2/1ih0J4oUIcEXmH4j5dK3WLKbKwoepZSq/uruVZp+f1V9I4CyrifzxU03oZGdtcC/gomQsR5fIw9rVItrdQmvaz8t5BcfbYesUMIVBMzHvug1wNRHiFUhA98dP2UOjl7lqL2lUc+GslP3GV/U8tm2w+AHY24g1Y7mtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dXM3ZXyTTZiExDdWnRfkkVmtsY/h8bQRnz1JX/m1Sxo=; b=fK4EMqXFHI+boUcCcrEP7CoLtWesbHHGyNIct45kJeZVTYU+fL8QDXXp+Ho8vjh72r0w9lsVx2i3x9A5+hTD3BTbbjzCHCOb8wJvXGrp/XJrctm7zE4NBORD1xiEJzkOL5a36TrCxWWE7ae9T7OEkhjNSghuD2ZchEAsPQhB6O0eo4yOdTlRkalSMf2aFzrNXyT+ifj2tt+ZrulQJ64FFnctG5ZogwpHVTFuCxjYgBIKxr5Tq/ZcWeozPruwtGC8Vh5YYXSWyxLnRgRcOEdj9eZl9xQ6vETcA/M/RSdiXic/lx/AlTgT9AI/XbWtuWCA2glJkmNL+GB4NkHAnCBmTg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dXM3ZXyTTZiExDdWnRfkkVmtsY/h8bQRnz1JX/m1Sxo=; b=QsOQyYgtpzsJrfBNmUwn/97f7EfJrw8VscfGPwOEGl3nKIsobSuOvbERx8eK/HMjiKX9Ca4dfL4xYldgvqL7226jS8i6QxhO7bqWj6yXCiguJ7uMYRwiCfHXYz2ds/DGmsa4Vp++uZ65e4Yq4hBuFY48swPyZp1rNGEPt9tYu+M= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TYWPR01MB10032.jpnprd01.prod.outlook.com (2603:1096:400:1e0::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.36; Mon, 31 Mar 2025 10:46:31 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:46:31 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 20/43] pinctrl: renesas: rzg2l: Update PIN_CFG_MASK() macro to be 32-bit wide Date: Mon, 31 Mar 2025 12:44:51 +0200 Message-ID: <20250331104514.79090-21-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TYWPR01MB10032:EE_ X-MS-Office365-Filtering-Correlation-Id: b2b3391b-7149-4d3b-88b3-08dd70414c3c X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: goSavAXwYuKGazMfrf1Gbpbf7dGsv9HtXT+5QuSgPyodsCHIHcdtTwxk0f7mqVO0zqSfyG8/RRE+bY6sreHQs/Oz6Bu8h2FT+7VN/4JpJFPRmAi+SzdJmBf+90Tmf1TtyZidkWA0zdTGcZoCYcYwXrPES5ssCQXuwW83D64k9lpm1zzlPurMb3q/+qmyKsZ88mogNHFZmfp/tplAuoOMErXLu2+rkl4ty08EFIXv5B4tRPIHN6j2QBevzDov0XXyDN7bKZJkTqeYrhWA1zvkIsMOA6nSEA6qIbHGh7yo17f9o0Nx/YRToWvtex8xkhyqhLhvhpbdTh93C/rbbiRpVHv96BQ3aWUiBU4mNcl/qU3XAA3K/xeOWyCglN9L8Z/PvQPn1LUOHN3HUn9D9L4CktijJvFpTkm4r9uodHD45tGWA2q4DKn7DRhg5YxCQtJzXJuZ3rVlBMLLAUz/ORcs1zmuE7WxWkh8HYzhJcliOqqjDubMQdS+1mJS9drW4Zl7mDJCNJiAyKpscYnjm+SC7r2B05MOUvIm0EEHhWE9UnBt8kfwz+PyuJGHUH4OkEBvTY37Y38IRgm8a9+l5ARLz6zEBYcHGSX22VC05WI9a1dlB5RMiacewGGU16hRi8GA1Aaq+q3S04aScsPxYsEbE7kAFP6SA7/iPRuAALtuzoVBbM141eX5DDrI1T70wxDp1+ykLnqV4Wtofi1BSNk/Do1tunDwYDU45fosd+qqWowi7udE6cp+h4VSNKPl0lSywjIfbXjahrIeHA93cwC/ua6D/h1k9ZJwbGt66+cI5QNy9KCrzZRGRAz3M+OH0tERMADvCSZ075qvDQDxbc0qC/q1QHunbQDhnTj4YB4WQl1cVkO3EFE8XHnl1AZQOn2qB8dMWuAtcCHFvESiW2+1YdvPxd9moPGrt68FdKJAeKXneR1Qjq2n+ZkYRXdEBCO475C4HmOJp42NHrVLeXrBkvcXSmfr+HXwSqSz5GjNRw+KHP+zZTdhTv8OxGR8REZIYMXQ3yiwRGFt1EsC2q532zlBPV6A8wIjp/GW1xEe1tWqVUVaJtWpoTi3rGgu6jKMisiZ0IhaS30QeQUPrO7NtXFjzV3mt7AqZ9+I45u7BCPY1ZDM/DWplmYifTXNmxOJJjLHhKuL4ab8iMEfK2C0uzApjQhOU8qJol4k/KJEv4TPXwt7FeD2qv9+9RsPvKTLoOUF2mXh1CdBMGnapFvtUz5t4McGkep2l66MXhkGNmeHFi7xbOmTdid9yrbvIDnEtyM94NatnzNlVfm1uTlkBCfD0nqyNZ53kxF6ie8UiJrLn5m1bh0hWYJKH/1uPl2d/p+VUHacg600biN8TvEwmxzOYu39O9u+gR0dLNFoIwpdJmJJ5iA+yIiqBI8ZyJqWsu7oMPv73KpgacUwblGxhQfZGPcAra4k0c9QqKcrq5iunBaG1A10JtTQEmFhXxoGHGT2m0ybIKBXluIJQxlFBH/zYD9eV7JiDTjnv9a+jE0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AVy142WMMhW2zNtdeK99U9IKacdgDyIi6WUvn7HScs2veHkYaFSGWr8x6RgIh/YQSqehlEclTrJFq3Lt18yy5AB+DPimisAbbv1xjhU2L1D4O5g3Jg7RRyVvY7B0WVFGZ+1dpGWiCmg3tFOKKmsswMHBU7JCJjjl8fFhcpR2RXtj+7UcU5bFpNjntNd9s/nSGq1Lar9K57Q9MOjFlm1LuqEn703+5OBkgX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6Eper3X0kr84iCHrEUpA3xGJi0yHNoh0Pbc16uyMx3lg/6JneGmsUliGeKio49PLwgMARqRS2cXUzI1+YumRXG4U9dFX5dW6f+cRvib3AZMazjSuSKyVgb1NihPkXSvdw4TEG3mU+4XcI6DWPiWJQETOuQig401YewqFhzsoxr0ytQLk/+mPSlDIH3FItNui8AB4Uwf4F03ykoktquwZWvVfDWFHgJ1mq7gAQvvFi7NEZyv4bsH7fYMG2T9v4aeYiyWP5Qu4fyLs2sUxLCJXPmaxfbOATJh4lAZrWqCKm5A7e8RgG46E1szsABOm3Fucfh00yZyLI= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: b2b3391b-7149-4d3b-88b3-08dd70414c3c X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:46:31.4423 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: aidhrVUziVsgI7uYbHKykwpWUY3Huwng79ynS9fsRyyGaZ/8Say6GgaJOMpUVbtY4ATMLp3eth2TfDZNmPg0x9PjtXfaRgJ4yg4mmYJL6H/OZVA6UmMslwQcufVcZ9lE X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10032 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:46:41 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18408 From: Lad Prabhakar commit 0a5e40f9c29756dec3da573edce3f4b3194e6f91 upstream. Modify the `PIN_CFG_MASK()` macro to be 32-bit wide. The current maximum value for `PIN_CFG_*` is `BIT(21)`, which fits within a 32-bit mask. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea Link: https://lore.kernel.org/r/20240618174831.415583-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 8c29c8d3c5743..b4ad4a4d20463 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -88,7 +88,7 @@ #define PIN_CFG_PIN_MAP_MASK GENMASK_ULL(62, 55) #define PIN_CFG_PIN_REG_MASK GENMASK_ULL(54, 47) -#define PIN_CFG_MASK GENMASK_ULL(46, 0) +#define PIN_CFG_MASK GENMASK_ULL(31, 0) /* * m indicates the bitmap of supported pins, a is the register index @@ -1187,7 +1187,7 @@ static int rzg2l_pinctrl_pinconf_get(struct pinctrl_dev *pctldev, u64 *pin_data = pin->drv_data; unsigned int arg = 0; u32 off; - u64 cfg; + u32 cfg; int ret; u8 bit; @@ -1322,7 +1322,7 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, u64 *pin_data = pin->drv_data; unsigned int i, arg, index; u32 off, param; - u64 cfg; + u32 cfg; int ret; u8 bit; @@ -2755,9 +2755,9 @@ static void rzg2l_pinctrl_pm_setup_regs(struct rzg2l_pinctrl *pctrl, bool suspen for (u32 port = 0; port < nports; port++) { bool has_iolh, has_ien; - u64 cfg, caps; + u32 off, caps; u8 pincnt; - u32 off; + u64 cfg; cfg = pctrl->data->port_pin_configs[port]; off = RZG2L_PIN_CFG_TO_PORT_OFFSET(cfg); @@ -2801,7 +2801,7 @@ static void rzg2l_pinctrl_pm_setup_regs(struct rzg2l_pinctrl *pctrl, bool suspen static void rzg2l_pinctrl_pm_setup_dedicated_regs(struct rzg2l_pinctrl *pctrl, bool suspend) { struct rzg2l_pinctrl_reg_cache *cache = pctrl->dedicated_cache; - u64 caps; + u32 caps; u32 i; /* From patchwork Mon Mar 31 10:44:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033461 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C530C36014 for ; Mon, 31 Mar 2025 10:46:41 +0000 (UTC) Received: from TYVP286CU001.outbound.protection.outlook.com (TYVP286CU001.outbound.protection.outlook.com [52.101.125.14]) by mx.groups.io with SMTP id smtpd.web11.48817.1743417997231010548 for ; Mon, 31 Mar 2025 03:46:37 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=JLIxlcoc; spf=pass (domain: bp.renesas.com, ip: 52.101.125.14, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=u4m7LmAOqeanwesx0XhWOYNljqJf5VkrOM9J6aP65us5Fz/+jwJDR6tkv0arWSEs8VCJs1DCK+UFtJDAPeI22nmEoni4mEyv7AC4vBt24jnP8kaTx6nsxOy/i3O5EGpnT9t8qnCTzK20CPQbbXpGEJ7xBTC1OJpvaOOSbn95qB1q2iXHY916QvNxFuwzgeYhyWa54W7M742UlXNG6pCHchKdU2vZYU5iLWRUW5xL7tXAd+EB75RhXcZcNvinDlmEAovPNqakf3/6u9nLCvYsVwTSzxPbo003DLOgjN3z1gUXYhewsvLXrq0WVFh+OgfuyLz9REOB+GU50blt+Ql/Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yiUJ80mJQQkcEcVeG5cHRZGdPnsJv7eNh5zkMZOSrzw=; b=gui+TwkRpDHvXn/SGoOVWV5FpV/hHWZ+O+XXAw5wmVLI8EAYE9ymLW6Sl8ZCyK1aP+yNK37nOLV3kGpGX03x/CyOvQET34IVOQquUwjCIw4QBA7aO11PFcircqjAk7NNPmhy/ZET3Fedu0NBK3qv9dUqNPeyb/IztvIVaJF39RHd95FsE5Eikd1iBPNkBjvARYj4rxvd/H6KekLWWSr04KZe+Rz6HZsBzs3WV3nv5oVTdVk2C2+yU2Rb1Zr5g7GRdye3DkR6DmHw6QQE5JEBMKajNQ7NpYunjQ0D6lh4M1RYqQuQQV5punxf267u5zeeaZEaSsPr2H8jr/YzthsIGA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yiUJ80mJQQkcEcVeG5cHRZGdPnsJv7eNh5zkMZOSrzw=; b=JLIxlcocpSW+OT70AG+2I/LHNyCNPqv1NcBsw/JQSsnoJBo28z85YZkoN9np1XDgcDwFgsWkN8fsjcAFJ4E04m2xbaYvwaU3Tl2N18R0kRJIrrySbb9OznZpsts/XeaNCoF8iCv0poUIaKwG7VCis9Dze9uwqYJCgY18IjoJbFE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TYWPR01MB10032.jpnprd01.prod.outlook.com (2603:1096:400:1e0::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.36; Mon, 31 Mar 2025 10:46:34 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:46:34 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 21/43] pinctrl: renesas: rzg2l: Adjust bit masks for PIN_CFG_VARIABLE to use BIT(62) Date: Mon, 31 Mar 2025 12:44:52 +0200 Message-ID: <20250331104514.79090-22-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TYWPR01MB10032:EE_ X-MS-Office365-Filtering-Correlation-Id: 6448f24b-153b-4af2-8505-08dd70414e10 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: ayFT10ivliTLiddmWNrPN7Bm1QsiM4rKgyIrkmnM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qNdH5EMgBE4WTqMQD4jTyPGuIg5tpRKg7DsX9UMrFwi0QfycUn6S0UcCZNUyKpb5PsTfCJUDwvdypbY/xqILlFPe7MVeSQE/tYuBCq4mcL4jR6y3ySXzkkXan/D3cUjgRmUsgP37YciO0v0iFQGSrGFOrBN3sQI/qOaZTGcpkGWWJUgT62+GYaOv5HUL3uC8T6jJWUU5MnOsJY2o3Wm+i8l/phr0tT6+HIdgt1uGKkyCY3T9lSO1t9jUfwLKtP07YtrbvhXZ7Om3UbHZf6VJZoiiE6S0hQHY6QSOhLzmFdr9xl+zPdOVnNyVvIjpVD/G1h7QhSlwkGRqmROd7YIrzHIKtOxMOJSqLQJdHZIUxlNbPSpjnPAg8QMr3JEpe61LLZCTg6fHp8tP67+w= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: sAKRQSbwM6wjYa5LZxF827UBMOr4ssUUKI54EuNEr6A4WOpASz/5b34J4YgtLcLvKJ+8wmwmCdeKlEZv0/dF/2qR2tQRhlBWZMyDB2DccKqIi343hnepChuC6qK0x5Kqop2LAJnb7Sl8WOBzHGjKstGIpExYvInTDFOFAOk0CNrc4Dr82X25wQR0CNED0Xveh3eDGzbGj20qglwGDTY9M3UnvXNaEPwWE7b6m5E7bSateVSECusQNWF8a+izQ9p7lafEF3LNyYiUsCBkVbOJNZKSzOGVhuGYjkm1bZMVPFX7v4NcIoOfihlDge9Nn5Oj7h7WW1tgSnaATuTitCiQ6xLyw313vq8t+T/d8Bezj50d0gwDhDqGP6GSjn7sRLaF10Hv/0ROKcGF0Fwh29I/I7tGswXUVpcJcmbH/QX7cwh6LdueoNqcdtwNHfLCa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+FT/yrEn71tgM0E6DAzbjOSvTBWsrPKR3lWL5BfvAms11FfbJ6N3nyxLhfT3Z29k+p03zjbRBQbiwwEsrtForBB+5+9sHuN+1fAxGAmnXKPpGD73hLcblM= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6448f24b-153b-4af2-8505-08dd70414e10 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:46:34.2407 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: trnVaCnrdCP1lLKBF6qUNqahtovdJPvvvk6wNpQjHLWmb9qjXI56lJDyxJfJUdoNaT3lf/t/N5wi37qFfu1J0RbQbLBlojb1jVDzWf+909Yfcbh45aZpUtgEf6OkNI3a X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10032 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:46:41 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18409 From: Lad Prabhakar commit f0cdf878a22b91141d6050deed0eac70ab982ebc upstream. Shift the bit masks for `PIN_CFG_PIN_MAP_MASK` and `PIN_CFG_PIN_REG_MASK`, to accommodate `PIN_CFG_VARIABLE` using `BIT(62)`. Previously, these bit masks were placed higher up in the bit range, which did not leave room for `PIN_CFG_VARIABLE` at `BIT(62)`. By adjusting these masks, we ensure that `PIN_CFG_VARIABLE` can occupy `BIT(62)` without any conflicts. The updated masks are now: - `PIN_CFG_PIN_MAP_MASK`: `GENMASK_ULL(61, 54)` (was `GENMASK_ULL(62, 55)`) - `PIN_CFG_PIN_REG_MASK`: `GENMASK_ULL(53, 46)` (was `GENMASK_ULL(54, 47)`) Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea Link: https://lore.kernel.org/r/20240618174831.415583-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index b4ad4a4d20463..2a8223a9e226b 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -86,8 +86,8 @@ PIN_CFG_FILNUM | \ PIN_CFG_FILCLKSEL) -#define PIN_CFG_PIN_MAP_MASK GENMASK_ULL(62, 55) -#define PIN_CFG_PIN_REG_MASK GENMASK_ULL(54, 47) +#define PIN_CFG_PIN_MAP_MASK GENMASK_ULL(61, 54) +#define PIN_CFG_PIN_REG_MASK GENMASK_ULL(53, 46) #define PIN_CFG_MASK GENMASK_ULL(31, 0) /* From patchwork Mon Mar 31 10:44:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033459 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87BB3C3600C for ; Mon, 31 Mar 2025 10:46:41 +0000 (UTC) Received: from OS0P286CU011.outbound.protection.outlook.com (OS0P286CU011.outbound.protection.outlook.com [52.101.228.6]) by mx.groups.io with SMTP id smtpd.web11.48819.1743418000098288197 for ; Mon, 31 Mar 2025 03:46:40 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=MvcS9wsL; spf=pass (domain: bp.renesas.com, ip: 52.101.228.6, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RtIPpQlVOeA8rECEcgKPeHKLelCFBv3fqQHQpI8B4hbYv3uBdhRSiQ53Bp076rvlfizadFfVM3aF7QYStibqLtkZSgOI97622vCBfKKCnX9bW5e4HqXOPszFm6NK5c0ebZKal2XigkhBK+0HWSqysWBx/P4eunz14eOVXFoJpzfpGeoE1YlmmB7hygA75tc7B0ac0b1YFviLKpnDMyVzBrtbpSD+xlvuSVtF9K8Ycz5X6dU47hdVQyebc4QjwoxpZyyCX7ZNmgdBePHuuIYwecwc/UvVWL+kZLoIjXQWgqTZ/YvCxHEO0mNQzy4DdkaOKt31l4NUzBXi7iMbm+d/Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CF8foSSqQ81GWpEe96hyAlLp9TlUGjOxpXj2T4soehY=; b=ISDCCiwp+qMiNXuwhbhBAIG0OGv1umyI9OGrybLe8kC8FSDWJVCVWtznU2TYtevChKAbxhPYidcs7qAk6fpAvSifhHOW6yzwXMXFDRX/GqvGfvPC3VTFwPUQvNVHogwPRkoi0Yiw8A7fy5UCbRYDtdTF+Uq0hHBQvalUbUVbmfM5pbaLqrtWjmmypKsIZuvulrw2vuetFjYRpqpiSX2dqFgTC8hlCHTOYQz0s63V88QJhRxHATxV622vUwFhmSbEuwO1QbBSnH10Vh/2+0USBvBGnpnhTDknLsSo3/vU7Hz8jo9Hl4H6nIMIzF2abtOTye0F7SXyGCc+hGP3HT230Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CF8foSSqQ81GWpEe96hyAlLp9TlUGjOxpXj2T4soehY=; b=MvcS9wsLWIsXEg3ER545Y8GEjWp5IoTGJCOEVUxMI3s7iUK6J1Yr+BLFGsCpjwVRJHg44AudzrIwkHgA09vyz6BtYcV4py41Z9fnkM4FwKSE24uDSp5ACcl05pMCYNLTLj2sS+Pna4kDr3iOKBsR8RR1HrzEGBJctdE9MntAe28= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TY7PR01MB13744.jpnprd01.prod.outlook.com (2603:1096:405:1ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.33; Mon, 31 Mar 2025 10:46:37 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:46:37 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 22/43] pinctrl: renesas: rzg2l: Move RZG2L_SINGLE_PIN definition to top of the file Date: Mon, 31 Mar 2025 12:44:53 +0200 Message-ID: <20250331104514.79090-23-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TY7PR01MB13744:EE_ X-MS-Office365-Filtering-Correlation-Id: 16089afc-14c5-44cf-3459-08dd70414fb2 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: hPnrw4RxvMZ5Gf1WiS/pl9auNlp11HIfDDPGgDI16PXDqToWfQUXJ5pDx7KkStiTOqtoZXDtAUMt7zzz1TPLnL+QzoHBODa3iFl40qOMZJNqs3D7WCN+G7oG4nnylAhUgGq2gRHCjMLzyrnA7uHwsAR+cwNbd66R7Qwh8HqIye/dQyGySgGTijltAPz8tA6MbSbbv5+ZoIJ6eqJ0slhoGZDGIoz8rXythqIQsWDI1tH9cbL3n+VsIZsw+S+mWC/y9Q5451sMsnsOes0DRYV0nuaqnIAcBFb447fY8IlA4QbuiLqYtPTfPm0HaFkaygRNwLQGH/3ZmJPizSjE2FwZTvPiqodIKoYeVN2JM9TyZyCsjd2YLPLfAfDgeUrAk+1ubMfFxGzMzuxgF/uasouXQDPfLP71QPH4tduQK54Kp7hjJm3880/AxCJg6IB4HJIkQCvmxyESeceiMNSPsog2SaG4E3O9dmMT//KGjAWKc0H05WwZw6Z71AjB6YqfxATetyW6bXYVtIeDOuWDIZbhlkcbElgoO+VRMxev4USzjxG7tCrL/8JpNDdUdBWrJzfh5Rh7jALnmsfrXdxpw290K6CM/fzLiuFqhgPnGMBJ6GaKBjWdakofPDRZBmOL6PWWbOvOLzrDOLMc23KcLbsvM9ViDeYHpKDyzFI3nNJ/XwfP3vyL4oLQ6hLvpmUZ7Dt6GPXFlqVxRXpxZ7R7WLszHROyUWXNYuUuEDe8/rJAiiRW7D0Thh02A0deYLFCWxGGtyG2moBLxxgOfz6ZIU2vKh+z5vSrtzX1BarLpqXD3L8qgt5z+xNGzZT+JwRNxc7QMH1hHGJbF6dkO5HIL2ziAcmSElxvgPRc+vfJpCnUaB7ZqCncIwN6ualTFzjo2pEmYK8kRWhDQUxNEdvNElcyX3NiIbV/PMeV1b378eH0CxMVcd6B+Y24hG3AB0lkaHY1eu13jlWjiwZuLIPJW97VBOv9dY4jK9KPqwwc9C5XY0IaAGBc1YkpBvBx/dr6UkX+/0J+Iy669Zzvt8owvBFaKEIvmw9/HDbfHtbX/c/QtaKmNNyZleQgfwz69+87Kpc3hAvSFAfis3z81BRU2WVxnftBLFeL2Y6aDn0SI8fXMRCr3nvK7l4iN808gNcRoE6OxltpXf7KM9cIfd/T+b38uXFkUskoEqIhn8K0yBd6QMFji/mTWKeG+D7FPSzYUGLodJpXuAbG/w9oBPS0/TUSUfSOHoZSbhXXs2ylNoBkiCE5+YTbrWFDlUC3vyQ+l/LbFUd9irCzwivZHlBJPDcYTJ3VhRR4ThRIGWmnXjg3OS9hKxGUH4hxNSZk6H8BLzDTFTGh91g5c2tfBienUm09gpJnviouLRDKVNrQ5g97LGC4efd97kcRRG1beRu13DYulBUC4SJmoYnkY/zW7ZHRWTZo7ZxFoByy7URMep77vFABsbOBPD0DW8Qy9BTs3ACA X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-M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wkkWGhpaW/N5OmGy2dEonSl2uPk3mgHMVU0QTT+rv+AsquJo5eQV8h3rvjzVbHit0lVmUbrrSsPyNmFFePXcn5frk8SoAekkqeP8U7MpFb/Q827RIibCaEkvgZyNv4sAgS3R0diq1Yl+QqPOAWWCbvcNEE74UK6BJp7jzqMFgEgb4pczEQx3LNuc5rBFZuMk1GwBsob1VeNbEgOB3Dd/f9kFcweFQNqBMp84ChvMyNyYZ12x+UB7SjCt4HVxYcjGwWAI8r/oFdn0HXmyo2mRoxg1r1WcEfPgAqz9UQpSybdImj/T38xcplAYO/FCubCJdEhtURDVQjeQ37V5DQMOJjdSN55e4qjlyoI8vesngFY5kaN/25gO8dWOgWoycGG1HqzhAa1CD0tdS8Xm8oJE2m+BgHKjBSMX1NWPCL6KsrZevlAlo9B+lnHE/BlKJavuQERcdL/rMsLZz+5/7eN4eoNDCwqxKXjtcI38L7hIBV7qmB3uDsBaMeI55KjJnxTNxaJT9ze2dbVGJEUJLhjDGsRDtp+2gleZ9/Nz3T1EuzGX5oM74d8aUO3dcFwFyDNlPUdWu29ha06Sx4Bv004TsfuLLc= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 16089afc-14c5-44cf-3459-08dd70414fb2 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:46:37.2274 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vL/dSKLWZLmO110akUwjhxc13fgPKf8KfjxfuIyhGeGBTOhVQFau/HG3pBTYYXQ+JLt6NYL1vneLQ0MQi1psJzQ2WMxM4sPkf0mRVPoBaTfMjuESougDkRo6ZOq5DCsf X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY7PR01MB13744 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:46:41 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18410 From: Lad Prabhakar commit 13dcd63dc704b33a8ad94f1d161c0f5dad243a5b upstream. Define `RZG2L_SINGLE_PIN` at the top of the file to clarify its use for dedicated pins for improved readability. While at it update the comment for `RZG2L_SINGLE_PIN_PACK` macro and place it just above the macro for clarity. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea Link: https://lore.kernel.org/r/20240618174831.415583-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 2a8223a9e226b..d38df51c7118b 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -63,6 +63,8 @@ #define PIN_CFG_ELC BIT(20) #define PIN_CFG_IOLH_RZV2H BIT(21) +#define RZG2L_SINGLE_PIN BIT_ULL(63) /* Dedicated pin */ + #define RZG2L_MPXED_COMMON_PIN_FUNCS(group) \ (PIN_CFG_IOLH_##group | \ PIN_CFG_PUPD | \ @@ -104,15 +106,13 @@ */ #define RZG2L_GPIO_PORT_PACK(n, a, f) RZG2L_GPIO_PORT_SPARSE_PACK((1ULL << (n)) - 1, (a), (f)) -/* - * BIT(63) indicates dedicated pin, p is the register index while - * referencing to SR/IEN/IOLH/FILxx registers, b is the register bits - * (b * 8) and f is the pin configuration capabilities supported. - */ -#define RZG2L_SINGLE_PIN BIT_ULL(63) #define RZG2L_SINGLE_PIN_INDEX_MASK GENMASK_ULL(62, 56) #define RZG2L_SINGLE_PIN_BITS_MASK GENMASK_ULL(55, 53) - +/* + * p is the register index while referencing to SR/IEN/IOLH/FILxx + * registers, b is the register bits (b * 8) and f is the pin + * configuration capabilities supported. + */ #define RZG2L_SINGLE_PIN_PACK(p, b, f) (RZG2L_SINGLE_PIN | \ FIELD_PREP_CONST(RZG2L_SINGLE_PIN_INDEX_MASK, (p)) | \ FIELD_PREP_CONST(RZG2L_SINGLE_PIN_BITS_MASK, (b)) | \ From patchwork Mon Mar 31 10:44:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033462 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85740C3600B for ; Mon, 31 Mar 2025 10:46:51 +0000 (UTC) Received: from OS0P286CU011.outbound.protection.outlook.com (OS0P286CU011.outbound.protection.outlook.com [52.101.228.39]) by mx.groups.io with SMTP id smtpd.web11.48820.1743418002043064491 for ; Mon, 31 Mar 2025 03:46:42 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=B5fdLuF3; spf=pass (domain: bp.renesas.com, ip: 52.101.228.39, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BlWurSobnMQwhtBzBbaFjjZg1TH4fyT3k+tSYevBWVlxU6s191L3KRDodJp7jdcs8m2pCxRzxrkvi4ZKO1SmcSZcYg/IwKVRljR0HQtWmySGBa8sltbsOzBMBfz5AlRLnfV4XDXSwb9JDQDECHtFR0t5Qvhq4O7pACCszNaWjmiUNBm5WdlqUSWksfxy/SEbmTOIDlmg5vTIxWmIcfy80Z29iWdwM4bSR/1E/xBsLtthzsHhfDAkJu3GK941lVAV+Ms4YB3wbRWf8g/4rbU4blq3PjDWcizzADBQ8JZka4q1d2k+Ac0fDvz2mNHS8em6TEhLcZU31gw2EgO72kN7bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1wFeuz0Reot2yb77dO3DLbcdDRRsjn09sjHtNQ7HJRI=; b=XbmL5o1S4yv/E1h+sd7rrsm/mBsDeADDaNaNoYmlIG4UYhGKzniObSocCfTSNDKrmc4zSm8ndODlRyb9YDv3zVVnH2DHT8pOdQOaNuVj52C7rudyDSdDFjaeJcIvRI5IxGZafrjeO+/JX1a86n6KkYTOGmL0SscZzqNvd7Vk2ggXScl+Ptwbd06rcxxFeJDpDf2eYrv1MJ1+eV+MpUn5qGVDGp6nDzA09XEjqyBr2cZUA6C96YUqEbzgqMlEz6m9x8+GA9cg1KXP0CI0GyzpcP+B8YvCm3yImmWkwTZmT8FmqoQBejH4diLu75h9Jfz+GXfe+CRSQeyw3UvfKngw2w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1wFeuz0Reot2yb77dO3DLbcdDRRsjn09sjHtNQ7HJRI=; b=B5fdLuF3QLLtSnP4cEfKN/vFb0ucY0Pdt+Kj20cO2vHTslGImdthPopBcm+66LsoofyVxJkMceoSfES3+zRFm6CZywH8woLeJhpZ79WjdpGX+tDAYbXKzm1gfDYnO6YgzC3eq5gAU0q2GN133pTEAXIfuMSekHQmqFtkiuJ96kE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TY7PR01MB13744.jpnprd01.prod.outlook.com (2603:1096:405:1ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.33; Mon, 31 Mar 2025 10:46:40 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:46:40 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 23/43] pinctrl: renesas: rzg2l: Reorganize variable configuration macro Date: Mon, 31 Mar 2025 12:44:54 +0200 Message-ID: <20250331104514.79090-24-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TY7PR01MB13744:EE_ X-MS-Office365-Filtering-Correlation-Id: 1fec6275-e59b-4951-1eba-08dd7041517e X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: Kv78ga8N44L+JVJpBhKUUts0gJn7pOnsGkTa3zesvZk8PMyHiD5Nh4PYO1RTDyN6fFDaSKA2m5dIUekC50dDeu5y+LqGexQbC5BZRg3ViKFGer52VjfX6iP7zg1iZ9EIXKcSw/NJa/O2a92Z9T9ycz+1IJg91EY/MVUefZ2MDWbaXWuoWKnPfIOj2OXi6KciFYPWxREITkFl9Q228ZG8NB7y4orXphufJspaG6w65BeBP0RjuCjSg7KU+3nH4CtWOiqNWmciLJ6zjuditTk65oFvIiwCLP/uwzX3G6zHtBNzOPloO5iY/iEn+OorjBA2SV/6XoNmfpQeduew8A+2pEoSnRanzugJmmUwcMLVyirx1r1S4uxDCN1mBP9qMkhF6lz6P+uYmEnM9TpC5rgT/B3q9Smwh7POTS2Vw3X7J4lKYikVajRjnb/eiAD2ESoXy/UUfslQr9LVBx0ttgBltV2Nd9Jf1q9DbQEj/AZAT/s1x2fmNx0SmMMhqpLH5+3P+cT/LrkjfLir5ZsqeJR2QkoZNml7Gb12SRiOwtJS/pmME6gcFtp0X9g4vnEXDT+XzZL9j5ovqXt0VQT9d4qHBYnNDxvFCnvVIcZMEm8zQwyGlXniaQtVnu/ISCtCcruvsRe3RAJN1Hl7n1sD2hKTOeBP0lP0+rxa0QKpc4/V08MI6HPVeE+PEow9sExnaLjRo8GdoAw4lN2hpKvAKzbhVui/9RuCiKJjFoxLbwcC0e5Jje+JlnbL1FCAX+MVhteNjpZVpbIQ36GayqXxiBLtzHj8KoRs2h+wOAg/OcGQRiWsmKwCFMi/8QPh3hL6EzinR5WmZFOSvb/HNcvE6kh1dkVpSae/arJcrNCRYzxgs+yquP2RSoPTbd1plGMPsouu5dfuJDVCy6UdmN9kpSwibBGSqJfMKGK1zipYnfsbw5qNJopbdExclqm7xAmpzDCIfdndICsaXT1X7Ql4O3KdFMu2/gzQV9dNELYuMP8GrXkVWnNVfjEytEPcLGRxFTX52yP93oh/WmeQBkNGF2wcbj910vXOouHKz+JXmXKVp0HdI0SN0nwPUfvO1kyEl8dhy+Rw+T662Ec3U4Wxoz8kY+zcKAyIHAopQaKeL1lui5FhEfEpinZfTEsQu6g8mKpcTN5Ja4B2qdQJTvVeg/CxBEL6HCVoy28xEdei5MOydl+aXKlOUODI3AV4i9hdFiRnj1ZZlowDJsHhY8qfXRYQuIfUcAp7P/UM+rwaH0/nnK8bwUr1i9TnUD56Zpdg8gB4lhYUsU896RjdjNFGQ7mwlWcsi2WEXkM9hwBsIjFyGYXHrSePuSOhj5qecIi4WJtpnteifd4TixQT6DTN5Eg/+GwptkrbuWsC3LE4ZM8YFpV4eS6dW2V4grXhafC+/89/OrJJj2/ZcsGk2ufPV84fyiaWozJkZMWR2PZK3odUX7nmXjBRrtBOX/Kujhj9S6aX X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: co+6gseKoFgjRCFMGjuhdNi1eH5ZRbdIGgn7C5s7VJk5p/O0j0j0xCjYIie+PTVoKqN/blhBpSOsIlj6x4R9uJvq9U1fFyj16Du3CvOvSVeER70zwCiAATS5vv8sebB/xHU1hnr5YSu36AdLzNICPQAunr7/UMrhnpxTrwHnscNYBDbz23AQFbz9nnVHXOSYf6OYfit+wXGa3xCGX5ZPX/mpM693kG59wTZqy7hZLm5+fI1hq2LetuqdudgrNUTw1l6imqQksNTe6KfMWqVhybS7GQJ8CnFPU048m+I6FftUnMMpckCBHOSWbEFdrm+OFjQuBNdRRtAGN6zVW3eTUe6c2Q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aJxjE66ol8WDJNrGqDmmR/YTG2ts8FbTiCy1IqQ/+Dz8Z2ns/wXESicLk4yLIgoXpy/g+KRdmSBLblgCE+FBErSfZI4PWjl7+vyfK9Qa4w1oIklxXlMMJXvrn+X9RpG+o8n/TBf+GDiIjNfwYdHUnVyV4S8xL5tGD/npAkALUy/qeThkmhXO0pITY/AQ= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1fec6275-e59b-4951-1eba-08dd7041517e X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:46:40.2156 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TYHvRDHwl1r0To4aQKGm3X2RdSoYl+3wyzDxDGutvvqUE3z7Z6zQ3yFWxNfUN5nWj9bU6Nk8CGdloNIVEjMBe5vMGrQUEVMBvXQZmEOhcbPoPHohaZyuuugnK3fiTXK/ X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY7PR01MB13744 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:46:51 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18411 From: Lad Prabhakar commit 87d084bcbf1e8dbe97753e20d30fe9d56a97e6be upstream. The `PIN_CFG_VARIABLE` macro did not indicate the capabilities of a pin but served as a flag indicating that the pins of a port have different capabilities. To better reflect its purpose, move the `PIN_CFG_VARIABLE` macro beside `RZG2L_SINGLE_PIN` and rename it to `RZG2L_VARIABLE_CFG`. Additionally, introduce new macros for packing variable port configurations: - `RZG2L_GPIO_PORT_PACK_VARIABLE(n, a)`: Combines `RZG2L_VARIABLE_CFG` with `RZG2L_GPIO_PORT_PACK` to handle variable pin configurations for a packed port. - `RZG2L_GPIO_PORT_SPARSE_PACK_VARIABLE(m, a)`: Combines `RZG2L_VARIABLE_CFG` with `RZG2L_GPIO_PORT_SPARSE_PACK` to handle variable pin configurations for a sparse port. Due to the above change the configuration macros have been reorganized as follows: - Shift the bit positions of `PIN_CFG_NOGPIO_INT`, `PIN_CFG_NOD`, `PIN_CFG_SMT`, `PIN_CFG_ELC`, and `PIN_CFG_IOLH_RZV2H` down by one to accommodate the removal of `PIN_CFG_VARIABLE`. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea Link: https://lore.kernel.org/r/20240618174831.415583-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 29 +++++++++++++++---------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index d38df51c7118b..7d76e0962e5c7 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -56,14 +56,14 @@ #define PIN_CFG_IOLH_C BIT(13) #define PIN_CFG_SOFT_PS BIT(14) #define PIN_CFG_OEN BIT(15) -#define PIN_CFG_VARIABLE BIT(16) -#define PIN_CFG_NOGPIO_INT BIT(17) -#define PIN_CFG_NOD BIT(18) /* N-ch Open Drain */ -#define PIN_CFG_SMT BIT(19) /* Schmitt-trigger input control */ -#define PIN_CFG_ELC BIT(20) -#define PIN_CFG_IOLH_RZV2H BIT(21) +#define PIN_CFG_NOGPIO_INT BIT(16) +#define PIN_CFG_NOD BIT(17) /* N-ch Open Drain */ +#define PIN_CFG_SMT BIT(18) /* Schmitt-trigger input control */ +#define PIN_CFG_ELC BIT(19) +#define PIN_CFG_IOLH_RZV2H BIT(20) #define RZG2L_SINGLE_PIN BIT_ULL(63) /* Dedicated pin */ +#define RZG2L_VARIABLE_CFG BIT_ULL(62) /* Variable cfg for port pins */ #define RZG2L_MPXED_COMMON_PIN_FUNCS(group) \ (PIN_CFG_IOLH_##group | \ @@ -99,12 +99,17 @@ #define RZG2L_GPIO_PORT_SPARSE_PACK(m, a, f) (FIELD_PREP_CONST(PIN_CFG_PIN_MAP_MASK, (m)) | \ FIELD_PREP_CONST(PIN_CFG_PIN_REG_MASK, (a)) | \ FIELD_PREP_CONST(PIN_CFG_MASK, (f))) +#define RZG2L_GPIO_PORT_SPARSE_PACK_VARIABLE(m, a) \ + (RZG2L_VARIABLE_CFG | \ + RZG2L_GPIO_PORT_SPARSE_PACK(m, a, 0)) /* * n indicates number of pins in the port, a is the register index * and f is pin configuration capabilities supported. */ #define RZG2L_GPIO_PORT_PACK(n, a, f) RZG2L_GPIO_PORT_SPARSE_PACK((1ULL << (n)) - 1, (a), (f)) +#define RZG2L_GPIO_PORT_PACK_VARIABLE(n, a) (RZG2L_VARIABLE_CFG | \ + RZG2L_GPIO_PORT_PACK(n, a, 0)) #define RZG2L_SINGLE_PIN_INDEX_MASK GENMASK_ULL(62, 56) #define RZG2L_SINGLE_PIN_BITS_MASK GENMASK_ULL(55, 53) @@ -370,7 +375,7 @@ static u64 rzg2l_pinctrl_get_variable_pin_cfg(struct rzg2l_pinctrl *pctrl, if (FIELD_GET(VARIABLE_PIN_CFG_PORT_MASK, cfg) == port && FIELD_GET(VARIABLE_PIN_CFG_PIN_MASK, cfg) == pin) - return (pincfg & ~PIN_CFG_VARIABLE) | FIELD_GET(PIN_CFG_MASK, cfg); + return (pincfg & ~RZG2L_VARIABLE_CFG) | FIELD_GET(PIN_CFG_MASK, cfg); } return 0; @@ -1835,13 +1840,13 @@ static const u64 r9a07g043_gpio_configs[] = { RZG2L_GPIO_PORT_SPARSE_PACK(0x2, 0x06, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | PIN_CFG_FILONOFF | PIN_CFG_FILNUM | PIN_CFG_FILCLKSEL | PIN_CFG_IEN | PIN_CFG_NOGPIO_INT), /* P19 */ - RZG2L_GPIO_PORT_PACK(8, 0x07, PIN_CFG_VARIABLE), /* P20 */ + RZG2L_GPIO_PORT_PACK_VARIABLE(8, 0x07), /* P20 */ RZG2L_GPIO_PORT_SPARSE_PACK(0x2, 0x08, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | PIN_CFG_IEN | PIN_CFG_NOGPIO_INT), /* P21 */ RZG2L_GPIO_PORT_PACK(4, 0x09, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | PIN_CFG_IEN | PIN_CFG_NOGPIO_INT), /* P22 */ - RZG2L_GPIO_PORT_SPARSE_PACK(0x3e, 0x0a, PIN_CFG_VARIABLE), /* P23 */ - RZG2L_GPIO_PORT_PACK(6, 0x0b, PIN_CFG_VARIABLE), /* P24 */ + RZG2L_GPIO_PORT_SPARSE_PACK_VARIABLE(0x3e, 0x0a), /* P23 */ + RZG2L_GPIO_PORT_PACK_VARIABLE(6, 0x0b), /* P24 */ RZG2L_GPIO_PORT_SPARSE_PACK(0x2, 0x0c, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_FILONOFF | PIN_CFG_FILNUM | PIN_CFG_FILCLKSEL | PIN_CFG_NOGPIO_INT), /* P25 */ @@ -1913,7 +1918,7 @@ static const u64 r9a09g057_gpio_configs[] = { PIN_CFG_ELC), /* P8 */ RZG2L_GPIO_PORT_PACK(8, 0x29, RZV2H_MPXED_PIN_FUNCS), /* P9 */ RZG2L_GPIO_PORT_PACK(8, 0x2a, RZV2H_MPXED_PIN_FUNCS), /* PA */ - RZG2L_GPIO_PORT_PACK(6, 0x2b, PIN_CFG_VARIABLE), /* PB */ + RZG2L_GPIO_PORT_PACK_VARIABLE(6, 0x2b), /* PB */ }; static const struct { @@ -2637,7 +2642,7 @@ static int rzg2l_pinctrl_register(struct rzg2l_pinctrl *pctrl) if (i && !(i % RZG2L_PINS_PER_PORT)) j++; pin_data[i] = pctrl->data->port_pin_configs[j]; - if (pin_data[i] & PIN_CFG_VARIABLE) + if (pin_data[i] & RZG2L_VARIABLE_CFG) pin_data[i] = rzg2l_pinctrl_get_variable_pin_cfg(pctrl, pin_data[i], j, From patchwork Mon Mar 31 10:44:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033464 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 953FEC3600C for ; Mon, 31 Mar 2025 10:46:51 +0000 (UTC) Received: from TY3P286CU002.outbound.protection.outlook.com (TY3P286CU002.outbound.protection.outlook.com [52.101.229.20]) by mx.groups.io with SMTP id smtpd.web10.49075.1743418004815614726 for ; Mon, 31 Mar 2025 03:46:45 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=aYlBNBa+; spf=pass (domain: bp.renesas.com, ip: 52.101.229.20, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=L63B3mnBvxF2yM+zTxvHUrTVBlQ8858xk2xixiMKFhXPEIg7w/J3HrkmIx8VGXL2i9zaXh56IW1wMDOm4vQmyluSIi1Dh3vQrhbDcTG8za0ltOfF9bbSUUb89Ou2YhKJLrMRcJupQPoJTw6SivnfpG7Po1ULz678q+z6M5q+eZNvDZylIrW966uq/huOIKJ0VyGHFme1iruovyaD3hwvj62/cXXfbKvt+VKcOf11xEQmthNe+qHBq3+WhOqZ95DDdaITES023QNR1vHMLe7RCVijbzcQ7rXUYPwFzB0j4MzTSFw8BvDT/B77MUvRl7j9X2WpfkrrdBiB4Xwe3ow6Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iGN8zPMoyfj2E92phbzrJQzjZcjhjsczVuG3uYR7fDk=; b=iUj6uBxNKlhnM51X8C5sVHZDev+S2l1Fqig6vBKFn5GFVhNwe4FoK5Tz4l1Ah07jZsmUxIIgB7KUptvI6oosl3+n6peIQHA1iqX97zL9rlwoGPUGNtGHGzDJuPgt/zOCzTF+zBvGYnD6NtyOmLWX+w16dD3uhhiLXASWABarT+mMq79MBNuX1vGy8BggOEcukhjiaVlib0OWRTUi0qol1SeQAUJqqxwAOPEO9I8udZRCqr8hKQclI1phLZEkORd4+FGqTiCv/3au5sO4s9I00FdJkeO3N58nD46+yeF1IFd7K+uEbC7hYyfQri9tLQmOnlUInvoQI5BCRr9HNk9Ieg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iGN8zPMoyfj2E92phbzrJQzjZcjhjsczVuG3uYR7fDk=; b=aYlBNBa+UNWevsNRo1kyK1v5eGgpq3xNFcPZQafWGhPx/ePOBMV1qrwVJEnVQZ7Nb57muaU50uHH+iPtY+wFtnji1aPb2hUAWi34+rqSH35Ox7ETqQcNnuNHkJYKrWtl9jp6dYeZ094yK9iVAi4Hi/bXZbdrDLkOvkDMhgU1ezo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TY7PR01MB13744.jpnprd01.prod.outlook.com (2603:1096:405:1ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.33; Mon, 31 Mar 2025 10:46:43 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:46:43 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 24/43] pinctrl: renesas: rzg2l: Clarify OEN read/write support Date: Mon, 31 Mar 2025 12:44:55 +0200 Message-ID: <20250331104514.79090-25-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TY7PR01MB13744:EE_ X-MS-Office365-Filtering-Correlation-Id: b508f711-c0cf-4744-5a9b-08dd70415348 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X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gQy7r0eO7YHYCp2qYi8WANgLSvH5Iv37S7rcDmLP5t41QqxvffBT30rtiwlYtMMCl/kgWi8Cnf6yykHzDLpcemR7N/GNIhdw1QhKT56c6kkT2VLPIRtuz5bSc0bePTtXnsX8D+nxV7WpeBjz1yri2CZdqqPqHfKSxvToijxOGmpDnbv5xI918gsJk9PsCExE4pvWugEfEHkZQjks/gDsBwpWFbw3bwe551k36Ad0+/NWE26sZkecZc9qgDJwFplxGT1ZN2xNQ0qX2cK9ZnGR3BcjFrJpIc4vyBIm5IMrHBsNXjtHoz+vBXijfXnzx+VaduOhalOVALgM0mIz3y6DsKIY64/uD1Fcdhs9lOq2v0NIDH39pqWOf8sdhruq16D2iE8mzHjOKRNd5FZh4TP6ADxAPao X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JnDx2gcRe1EvDVGnL/KFgznUiwbIlZpZzvEcATmbsVeXp+3GWlrjPiMW59eItXJUhtaH9Kb5lGzbFY6dzZ7pkGn6m9RWoqQ6DRrUrTbNFnAP2mvFALnzjRfT8fjX5JIk73bdU9DlyVwbBSZpp1FI6ujd0VdzPcYJprexh7S3G6J3+ucr0qdAEUM8WzesOZtI20gHHUO3QzZoAyVeshKZLDGUIJW+vAfn+4DPvfpDZ+gsDWmKOkv432sdaZAvD/cK6oQM9mfcnadv9FmmPqbu5ZTDYHMH0cM4tCaSGUCCn0rR5QN2HnEpAg9eVy58+p/1JHpUcwfd6/ACQJNVBj79DsfN6PiMaE+tauESbVxo2/SVCgI4lM47um6pxHb4wUYCd0FoY1FWjcou3O++NKashHL2mRAT46WarMxFGCVT9NqoA6pmQFiX4zL7oyQOY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wklTI//ClSlWQtLybXRM70j1ygfkt/XYAOZlQ+8dmoydYzA+TbHP7uR3gYh8gr3gNAtsN+G8Ni87cPTlBtn3p2Ckgoz/u4KReXtA53D+NB7v+FSJir82OJ0= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: b508f711-c0cf-4744-5a9b-08dd70415348 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:46:43.0048 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SiCqpLAuogVV634YICL1XS3MGfyqDF+/8VMeX/A/Ch+PxYxyJuU0d1yxcNLTWvf1a/f8SjH5yNwr884KPky0fvtGqBPllr+Ne3A9ttJASI+OIXLB7UB8wGmTTLIh5Ilb X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY7PR01MB13744 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:46:51 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18412 From: Paul Barker commit 07dd08c39eb4b645a0e2f2440a54326b49944705 upstream. We currently support OEN read/write for the RZ/G3S SoC but not the RZ/G2L SoC family (consisting of RZ/G2L, RZ/G2LC, RZ/G2UL, RZ/V2L & RZ/Five). The appropriate functions are renamed to clarify this and to match the callback names. We should also only set the oen_read and oen_write function pointers for the devices which support these operations. This requires us to check that these function pointers are valid before calling them. Signed-off-by: Paul Barker Acked-by: Linus Walleij Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20240625200316.4282-2-paul.barker.ct@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 28 ++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 7d76e0962e5c7..5159dff565b74 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -999,7 +999,7 @@ static bool rzg2l_ds_is_supported(struct rzg2l_pinctrl *pctrl, u32 caps, return false; } -static bool rzg2l_oen_is_supported(u32 caps, u8 pin, u8 max_pin) +static bool rzg3s_oen_is_supported(u32 caps, u8 pin, u8 max_pin) { if (!(caps & PIN_CFG_OEN)) return false; @@ -1010,7 +1010,7 @@ static bool rzg2l_oen_is_supported(u32 caps, u8 pin, u8 max_pin) return true; } -static u8 rzg2l_pin_to_oen_bit(u32 offset, u8 pin, u8 max_port) +static u8 rzg3s_pin_to_oen_bit(u32 offset, u8 pin, u8 max_port) { if (pin) pin *= 2; @@ -1021,31 +1021,31 @@ static u8 rzg2l_pin_to_oen_bit(u32 offset, u8 pin, u8 max_port) return pin; } -static u32 rzg2l_read_oen(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin) +static u32 rzg3s_oen_read(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin) { u8 max_port = pctrl->data->hwcfg->oen_max_port; u8 max_pin = pctrl->data->hwcfg->oen_max_pin; u8 bit; - if (!rzg2l_oen_is_supported(caps, pin, max_pin)) + if (!rzg3s_oen_is_supported(caps, pin, max_pin)) return 0; - bit = rzg2l_pin_to_oen_bit(offset, pin, max_port); + bit = rzg3s_pin_to_oen_bit(offset, pin, max_port); return !(readb(pctrl->base + ETH_MODE) & BIT(bit)); } -static int rzg2l_write_oen(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin, u8 oen) +static int rzg3s_oen_write(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin, u8 oen) { u8 max_port = pctrl->data->hwcfg->oen_max_port; u8 max_pin = pctrl->data->hwcfg->oen_max_pin; unsigned long flags; u8 val, bit; - if (!rzg2l_oen_is_supported(caps, pin, max_pin)) + if (!rzg3s_oen_is_supported(caps, pin, max_pin)) return -EINVAL; - bit = rzg2l_pin_to_oen_bit(offset, pin, max_port); + bit = rzg3s_pin_to_oen_bit(offset, pin, max_port); spin_lock_irqsave(&pctrl->lock, flags); val = readb(pctrl->base + ETH_MODE); @@ -1220,6 +1220,8 @@ static int rzg2l_pinctrl_pinconf_get(struct pinctrl_dev *pctldev, break; case PIN_CONFIG_OUTPUT_ENABLE: + if (!pctrl->data->oen_read) + return -EOPNOTSUPP; arg = pctrl->data->oen_read(pctrl, cfg, _pin, bit); if (!arg) return -EINVAL; @@ -1359,6 +1361,8 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, case PIN_CONFIG_OUTPUT_ENABLE: arg = pinconf_to_config_argument(_configs[i]); + if (!pctrl->data->oen_write) + return -EOPNOTSUPP; ret = pctrl->data->oen_write(pctrl, cfg, _pin, bit, !!arg); if (ret) return ret; @@ -3070,8 +3074,6 @@ static struct rzg2l_pinctrl_data r9a07g043_data = { #endif .pwpr_pfc_lock_unlock = &rzg2l_pwpr_pfc_lock_unlock, .pmc_writeb = &rzg2l_pmc_writeb, - .oen_read = &rzg2l_read_oen, - .oen_write = &rzg2l_write_oen, .hw_to_bias_param = &rzg2l_hw_to_bias_param, .bias_param_to_hw = &rzg2l_bias_param_to_hw, }; @@ -3087,8 +3089,6 @@ static struct rzg2l_pinctrl_data r9a07g044_data = { .hwcfg = &rzg2l_hwcfg, .pwpr_pfc_lock_unlock = &rzg2l_pwpr_pfc_lock_unlock, .pmc_writeb = &rzg2l_pmc_writeb, - .oen_read = &rzg2l_read_oen, - .oen_write = &rzg2l_write_oen, .hw_to_bias_param = &rzg2l_hw_to_bias_param, .bias_param_to_hw = &rzg2l_bias_param_to_hw, }; @@ -3103,8 +3103,8 @@ static struct rzg2l_pinctrl_data r9a08g045_data = { .hwcfg = &rzg3s_hwcfg, .pwpr_pfc_lock_unlock = &rzg2l_pwpr_pfc_lock_unlock, .pmc_writeb = &rzg2l_pmc_writeb, - .oen_read = &rzg2l_read_oen, - .oen_write = &rzg2l_write_oen, + .oen_read = &rzg3s_oen_read, + .oen_write = &rzg3s_oen_write, .hw_to_bias_param = &rzg2l_hw_to_bias_param, .bias_param_to_hw = &rzg2l_bias_param_to_hw, }; From patchwork Mon Mar 31 10:44:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033463 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AA92C36014 for ; Mon, 31 Mar 2025 10:46:51 +0000 (UTC) Received: from TY3P286CU002.outbound.protection.outlook.com (TY3P286CU002.outbound.protection.outlook.com [52.101.229.4]) by mx.groups.io with SMTP id smtpd.web10.49076.1743418008864182298 for ; Mon, 31 Mar 2025 03:46:49 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=riKaFEMP; spf=pass (domain: bp.renesas.com, ip: 52.101.229.4, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dd2eDO4w8dGoKKOGSE2E+x9CW1D2aiJxZX9huFGXsVwpn6ef6m3PNo04NKwrxT3S5+/99yUc1SawJ7PhfJFIchEhjZlqJVBf/mgadthcY1GU/E6UX9PM7jT64U+xmz5qm+zSbGSaKbX7HNa/BdrhGt5TfgQ4hDIgnGRPnHM5MM85rbQMiSYnjHjhHqICH34fwrWWK4X/6QZenbRN5c+vApk6YCF5QqY2LRPP8z6HXL8goGFd54157UjUmpthDzKvcgI9zKoU7NAFCgF5IN7AMb0JzxSyEt7cDnqHaAQxIiiAQDd99jA9VAB2q3Rj8cd9EJf13IcAxQ4iYshty7Rx5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uy1q9lLwkerROK7WjiuSlgl1PMPzhiwlEiU1ADVopwA=; b=kYbfwvGo8idLpaq9WVD4dEM3/xudsoFKWlTWA8Jyr1nghcOGunInk32H4mzy7JSb0ZzY+pdwEdb1geZYElP1+8SqkldND5OxkU0KqAmNgUSiehFLu3Oqt2xMUF12ekbDYSVmMWEE2kfuTwnTIhvcCKa1xLBWBYn27lvJDuc+OZeD8TU1S84aRZzS4AVMVGQ1IXp30S0SqSxyjZSdMLJ+LM8gtQC0mhzzAZsM9aY3mG3U3Psbgf1G6su6olTsy6DhJKKQLrQxnJUW4NK7CqQR7td9ak9njg1PkKod6MNmHB8ZJaZCyuN9T3lwoUUq+Zl+2AOsqgI7tMaEB+i7+SqvOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uy1q9lLwkerROK7WjiuSlgl1PMPzhiwlEiU1ADVopwA=; b=riKaFEMP9fBsZBEzM35ob5cOKGwTh0TOhG+15+zEqaquiJSlV5IAY/xCWUqyVi005i2A2s/R9VGHN987Ds5WX1Hb17jn0R+dmV7KoCzU3ie4O6Wz7gjxCtnjPSmVL6hNMu7nWrCWqa2Y0qAdqhXyCqWlxs7zphC4R7PgxfnSTCw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TY7PR01MB13744.jpnprd01.prod.outlook.com (2603:1096:405:1ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.33; Mon, 31 Mar 2025 10:46:46 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:46:46 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 25/43] pinctrl: renesas: rzg2l: Clean up and refactor OEN read/write functions Date: Mon, 31 Mar 2025 12:44:56 +0200 Message-ID: <20250331104514.79090-26-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TY7PR01MB13744:EE_ X-MS-Office365-Filtering-Correlation-Id: 696a6fa1-64a3-4d72-f6c7-08dd704154ed X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: e9Z0aBtqB9O8XIA8Cl8klyZnxg3V6yFCcSdUD0Nkx0T5/00aE5l9BvGtPvjeUjCFSPNGC6MYqBWH6tBFRTBW/rOfKrXLsuSLNUydbg1+6hdbD7hXeSvXc84DYK11ymePHaqwUqHdDebsDgIrMhA+DdMIIk1EMucyXJgjrIg4Jg3p6TqJQ8FoXnPyuk1j/0/TxDVIOLKfdEF8BK2NswV8vYRaldsuVuUemzsHeoxGezS/9jHWsf8heffES0hw8L7DB9Wq10birJh6cjXU/fVoiCa3gO4kwJ6ow9xP42GrZKXr5I55+qom0ojAtFj8nNg3dWs6zp4n5xItSSMWdGM3EhYPcf+qAVYP/HkJL/5B8l1RsLnT8yT6LanjiLDQQRA3nmemT4DUgnOWSveiQR6OINI+NHHG/k7xpkxE/kcpqif3mmCTeA5UrkInF+HnWKsDYXR9QfFb2fg6QkLjil/FY4mVJlwh/YMyBo1boxuvxBZpzUh8AxuGifpIpw+osmFPRZsNy3OHcj+TgboF666XDK00koH86ReD0OCxGpGQsI5l1i56pYK8c2WwJE8TD7vp8c5owCmZzm2oTUfQcWWoW48vGJTWdFSM34eR5yJexBmtewNUyOfSQsZLw6Hh/P3lcPN7aDYhlVzcEeJODxCJz2jP2PCz8Uk0Zhf+OfN+e86TQkRwbYoUAUqlU3Bbz6sICAHZrzholsnyplizHjwsA2l4+1yi0MgK9ahuxFsvjsUYnwa92NbjPqnumIBJQc1Bqf/7AanpFUwJ5PsTOiN4XqYNa6JuTbtwtbZPPUdI5y7m2+n9nJ+zxkfRVBi+rAUm/RRQfWzRC43BL2Vcdc7gv3GJaU6aMrrDk1cE6pZybMxwLm2BNA2K8DIBhDCw+CzzA6H06xyZzAH3P5I2ZZOVSH4KaeGNdpfdk9N1E9W0Zdqmx2sU/7BkxkfNsWrwB6LIvfpUMBuuhuG2vm0lENchomrhk7bqr1HVTwaux6aaaoGE1DsSyvyxeaxfRVyRlAULYO9Yba2yTHXS6dbxzHkjm0aGI/yuuJF8CizI7yYA9OsgBOpqZZVeSURcpc9RSyraAb1YGBO/hxcj38QU5EX74mFlAstCiYBZGWww6Kyct60nG44eQ0H7Q7UndFLdvKpoZ2bYkJUlUZq7sBuDIT4B1Z7TVmNwtqoPsiFEgtGXuzKCdO7HYlzFNtwveEdfF3sThNUvkyBLhqC7HJqkXnLZys55DpjWekj6U+ziJx3ENaDOxuC6fNISMsTKgVHxguOC0pjibtiB1SU0Mw8cG5TXopi3HZMOaBBcTAon2Anmi53CqlCodxDHB4TdL5Y+zMxCai8ZnIcW8xQ4oyzMqXSuhmmDjlxizO2ILXwe/ZoAh1UseJEFyTiBdGIzs6Tb9FKrYvttPalEhi4OJQ9ZwO30QjMHcPT8XgU42JPMmPzkB0NO1I8LJTUC6FlP9dSzmMRQ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WUMUdIhVm5+iL3eyN/ahvajShgmYaJd16cuUOfWdp94AGeQIMIy1/f3FFfr5wkqibaY4lNfZ9dqCwgd/KuHyddcrSQOF/s/EkfcNgcSSXgtB+7fXdw7/kHtJBoqosvUcapXFw+4GCCFhjf+uFhDmm5yb9uedz49nJ026Ea5jBEiC61ihyGpqlKzQE5gRYMPpbg8cD2qCK3lYRK+WtJxAZWTalMbeiGgIdyMQNUgf7wVm9guy53iZ0R7COyp1kuHzzT+9ZoXQZ2vSCVsqvc2Le9I2K0y5IfhyJF/ZS+A2O32BSrrlanFKa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k67Bbw6/M20l5DlBi1z7bBhX3QydxC42GphKUxzM7GMME3b4DHb/y8BhWwh2kjJcOSCkLWlDE/unfhQrxT8aHkouYBAmDFgXf2lcOYv+irbTUd+R1yfSlQg6nqGZwcP0t1TkEz1ahJktdhPebkeDQuWZqZF5l3V16A/yof5YT/C+/LMkhnk4/DQW6GrR84N2Q51jU0kbbmcWpQ/IdhKCUnUSv+paKV9e0u7OBab37GTJSi9F7QyalRxZf0= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 696a6fa1-64a3-4d72-f6c7-08dd704154ed X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:46:45.9842 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rF1BBjs2IbSByI1oKd0jf7UhnZKGG0GqbSGyiQRSIDvb8M09ncuiAyozEc4iOPUc0vL39bF5X5ItBi7IvK2krvLsumaYUKBA2QgM/CkJ4J1rSokKQwj9U0OcUPQOdk8+ X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY7PR01MB13744 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:46:51 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18413 From: Paul Barker commit a9024a323af2235a6d11cbbde924c6dde8bd355b upstream. The variable naming in the various OEN functions has been confusing. We were passing the _pin & bit variables from rzg2l_pinctrl_pinconf_get() and rzg2l_pinctrl_pinconf_set() as the offset & pin argument to the oen_read() and oen_write() functions. This doesn't make sense, the first of these isn't actually an offset and the second is not needed for RZ/V2H but leads to confusion with the bit variable used within these functions. To tidy this up, instead pass the _pin variable directly to the oen_read() and oen_write() functions with consistent naming. Then rzg3s_read_oen() and rzg3s_write_oen() can use macros to get the port and pin numbers it needs. Instead of passing the pin capabilities into oen_read() and oen_write(), check that the pin supports OEN before calling these functions. Also, merge rzg3s_oen_is_supported() into rzg3s_pin_to_oen_bit() to give a single translation function which returns an error if the pin doesn't support OEN. While we're here, remove an unnecessary branch and clarify the variable naming. Lastly, check that we are not dealing with a dedicated pin before calling RZG2L_PIN_ID_TO_{PORT,PIN}(). Signed-off-by: Paul Barker Acked-by: Linus Walleij Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20240625200316.4282-3-paul.barker.ct@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 85 +++++++++++-------------- 1 file changed, 36 insertions(+), 49 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 5159dff565b74..6b383f2baf478 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -293,8 +293,8 @@ struct rzg2l_pinctrl_data { #endif void (*pwpr_pfc_lock_unlock)(struct rzg2l_pinctrl *pctrl, bool lock); void (*pmc_writeb)(struct rzg2l_pinctrl *pctrl, u8 val, u16 offset); - u32 (*oen_read)(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin); - int (*oen_write)(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin, u8 oen); + u32 (*oen_read)(struct rzg2l_pinctrl *pctrl, unsigned int _pin); + int (*oen_write)(struct rzg2l_pinctrl *pctrl, unsigned int _pin, u8 oen); int (*hw_to_bias_param)(unsigned int val); int (*bias_param_to_hw)(enum pin_config_param param); }; @@ -999,53 +999,46 @@ static bool rzg2l_ds_is_supported(struct rzg2l_pinctrl *pctrl, u32 caps, return false; } -static bool rzg3s_oen_is_supported(u32 caps, u8 pin, u8 max_pin) +static int rzg3s_pin_to_oen_bit(struct rzg2l_pinctrl *pctrl, unsigned int _pin) { - if (!(caps & PIN_CFG_OEN)) - return false; - - if (pin > max_pin) - return false; + u64 *pin_data = pctrl->desc.pins[_pin].drv_data; + u8 port, pin, bit; - return true; -} + if (*pin_data & RZG2L_SINGLE_PIN) + return -EINVAL; -static u8 rzg3s_pin_to_oen_bit(u32 offset, u8 pin, u8 max_port) -{ - if (pin) - pin *= 2; + port = RZG2L_PIN_ID_TO_PORT(_pin); + pin = RZG2L_PIN_ID_TO_PIN(_pin); + if (pin > pctrl->data->hwcfg->oen_max_pin) + return -EINVAL; - if (offset / RZG2L_PINS_PER_PORT == max_port) - pin += 1; + bit = pin * 2; + if (port == pctrl->data->hwcfg->oen_max_port) + bit += 1; - return pin; + return bit; } -static u32 rzg3s_oen_read(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin) +static u32 rzg3s_oen_read(struct rzg2l_pinctrl *pctrl, unsigned int _pin) { - u8 max_port = pctrl->data->hwcfg->oen_max_port; - u8 max_pin = pctrl->data->hwcfg->oen_max_pin; - u8 bit; - - if (!rzg3s_oen_is_supported(caps, pin, max_pin)) - return 0; + int bit; - bit = rzg3s_pin_to_oen_bit(offset, pin, max_port); + bit = rzg3s_pin_to_oen_bit(pctrl, _pin); + if (bit < 0) + return bit; return !(readb(pctrl->base + ETH_MODE) & BIT(bit)); } -static int rzg3s_oen_write(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin, u8 oen) +static int rzg3s_oen_write(struct rzg2l_pinctrl *pctrl, unsigned int _pin, u8 oen) { - u8 max_port = pctrl->data->hwcfg->oen_max_port; - u8 max_pin = pctrl->data->hwcfg->oen_max_pin; unsigned long flags; - u8 val, bit; - - if (!rzg3s_oen_is_supported(caps, pin, max_pin)) - return -EINVAL; + int bit; + u8 val; - bit = rzg3s_pin_to_oen_bit(offset, pin, max_port); + bit = rzg3s_pin_to_oen_bit(pctrl, _pin); + if (bit < 0) + return bit; spin_lock_irqsave(&pctrl->lock, flags); val = readb(pctrl->base + ETH_MODE); @@ -1124,12 +1117,12 @@ static int rzv2h_bias_param_to_hw(enum pin_config_param param) return -EINVAL; } -static u8 rzv2h_pin_to_oen_bit(struct rzg2l_pinctrl *pctrl, u32 offset) +static u8 rzv2h_pin_to_oen_bit(struct rzg2l_pinctrl *pctrl, unsigned int _pin) { static const char * const pin_names[] = { "ET0_TXC_TXCLK", "ET1_TXC_TXCLK", "XSPI0_RESET0N", "XSPI0_CS0N", "XSPI0_CKN", "XSPI0_CKP" }; - const struct pinctrl_pin_desc *pin_desc = &pctrl->desc.pins[offset]; + const struct pinctrl_pin_desc *pin_desc = &pctrl->desc.pins[_pin]; unsigned int i; for (i = 0; i < ARRAY_SIZE(pin_names); i++) { @@ -1141,19 +1134,16 @@ static u8 rzv2h_pin_to_oen_bit(struct rzg2l_pinctrl *pctrl, u32 offset) return 0; } -static u32 rzv2h_oen_read(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin) +static u32 rzv2h_oen_read(struct rzg2l_pinctrl *pctrl, unsigned int _pin) { u8 bit; - if (!(caps & PIN_CFG_OEN)) - return 0; - - bit = rzv2h_pin_to_oen_bit(pctrl, offset); + bit = rzv2h_pin_to_oen_bit(pctrl, _pin); return !(readb(pctrl->base + PFC_OEN) & BIT(bit)); } -static int rzv2h_oen_write(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin, u8 oen) +static int rzv2h_oen_write(struct rzg2l_pinctrl *pctrl, unsigned int _pin, u8 oen) { const struct rzg2l_hwcfg *hwcfg = pctrl->data->hwcfg; const struct rzg2l_register_offsets *regs = &hwcfg->regs; @@ -1161,10 +1151,7 @@ static int rzv2h_oen_write(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 u8 val, bit; u8 pwpr; - if (!(caps & PIN_CFG_OEN)) - return -EINVAL; - - bit = rzv2h_pin_to_oen_bit(pctrl, offset); + bit = rzv2h_pin_to_oen_bit(pctrl, _pin); spin_lock_irqsave(&pctrl->lock, flags); val = readb(pctrl->base + PFC_OEN); if (oen) @@ -1220,9 +1207,9 @@ static int rzg2l_pinctrl_pinconf_get(struct pinctrl_dev *pctldev, break; case PIN_CONFIG_OUTPUT_ENABLE: - if (!pctrl->data->oen_read) + if (!pctrl->data->oen_read || !(cfg & PIN_CFG_OEN)) return -EOPNOTSUPP; - arg = pctrl->data->oen_read(pctrl, cfg, _pin, bit); + arg = pctrl->data->oen_read(pctrl, _pin); if (!arg) return -EINVAL; break; @@ -1361,9 +1348,9 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, case PIN_CONFIG_OUTPUT_ENABLE: arg = pinconf_to_config_argument(_configs[i]); - if (!pctrl->data->oen_write) + if (!pctrl->data->oen_write || !(cfg & PIN_CFG_OEN)) return -EOPNOTSUPP; - ret = pctrl->data->oen_write(pctrl, cfg, _pin, bit, !!arg); + ret = pctrl->data->oen_write(pctrl, _pin, !!arg); if (ret) return ret; break; From patchwork Mon Mar 31 10:44:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033465 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AA4DC36010 for ; Mon, 31 Mar 2025 10:46:51 +0000 (UTC) Received: from TY3P286CU002.outbound.protection.outlook.com (TY3P286CU002.outbound.protection.outlook.com [52.101.229.44]) by mx.groups.io with SMTP id smtpd.web10.49077.1743418010884818855 for ; Mon, 31 Mar 2025 03:46:51 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=bU/awbHd; spf=pass (domain: bp.renesas.com, ip: 52.101.229.44, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CnOxo4tjCEp9JWSxcKts9QVZMw6DLLaIO2vZkYX9kr289aTj5PmKWnS8PCLsMmyJRV59G6mvwNQ77f83SPC0S3WdnFmgarauriEAGIJsuHHvYNFd6eWxUxSKZTuKP35GY8nqHrmIAxm5qoFyDO3ICC7AhKlFe1Q4aManNwFVKrFRD2yvoZqj2dvXbyqlJIfJOZsgmMhO7mSTS/HJ7ifyfXBH3O4J0BVkzTckPSsbEgSx3EqkCywGDAhuRLoZm1pnOGcJl7vQGuJxa8FzkPi+2J9sKFwZeQe7t51qgFNaIpMtTvmLKpjWgJeWVOunym1FhdSGRpsmm4mJd0hJbrIVOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oQ/Y537IIP9Lxz2J2y8tmeKtGb5Plu3ylVanq4ellfg=; b=fVfQS7yFZ5jmJ/96XpmbLp4gHDGgFpDDc/P0O3Gt/hXE/McgKZNqJWhYhdtro+ywxzyUBbkwQGF7Aa7zqHItJmvILjGgmfOD/ADVaQl1Bbi/UdLxk3TYViI+BZuyUY4w26pG83+7p7W8AB0mvBDzKVhtJND6jwmPwgZPkY2yE9PMLf652f3mX8EFRA4p0ngABImdsswTnVjb+yxyllWw3XbMUT/lHT9sqAIKxTQdYp6Ng69+yS1ZoSrsftAE3HGfyganvxmD142Gaiz7ayMNwg8gYjWfMxgyLjDsG4aUbzzQOFCufL1M7LD2+4HdowA/tmOFWzmr+v7rdBAqNzzV7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oQ/Y537IIP9Lxz2J2y8tmeKtGb5Plu3ylVanq4ellfg=; b=bU/awbHdmkPzOH14MQDFWIZXY+wD0CPbF9fQ6cjbZzwwM0EyCjgm3PRhUVcEV8PM7HjmLC0duDHbcjlHxtNWwZBizzVZS6E03PrTvRKjJcrdtuS/+unwTu7n8AAMzZx+r+I8dftuVThKJ0R6+AHURb15hYYrOncSY0W04WH4vGY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TY7PR01MB13744.jpnprd01.prod.outlook.com (2603:1096:405:1ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.33; Mon, 31 Mar 2025 10:46:49 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:46:49 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 26/43] pinctrl: renesas: rzg2l: Support output enable on RZ/G2L Date: Mon, 31 Mar 2025 12:44:57 +0200 Message-ID: <20250331104514.79090-27-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TY7PR01MB13744:EE_ X-MS-Office365-Filtering-Correlation-Id: 027ff358-3496-4dff-0439-08dd704156be X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: gFkY8WdT3tVWmt7AhGcWayB+dWeo6dwTFMXAcwXflIdfkCqwz/vFBqe8xLs0nf0Dv0ABFhNCyBlIGF9dT4oNBJScZjCjbhwnyWA2qx3j3y0/CmHbDxvDtm/IDqVB/PeKzF3bTtlvRI/wfHRKkTUSifaDjS4FdtN8+5M0B8AlLp0GmJ6hEkkKA5VvbTHkgvZ/rpmByDymp/LhzymVQphTzSxDFNvc2tl0HWUe3mQrhw6pMFu8+8uUWrYyD2g76dpo/nb1X74BEIhAfaubo9cIJ/k0eVdSuHt82lbDbUaV7SWIvvAiP5nX24Hc1rTxX1+MIPcwcG7pObL5AiAOA5B0B6UdmDH8K+2xnDTqia4Nj4y0HOezYWhEurpO2g6S9mGoHJtuacmLtpDF20rVuqLgkTMaBU7kip9XJ3PAEUEJScc2abJ07yhaS8XnlptVC3YyjpgqtIjtgyI1BAqKkdPOOxU2AnF/q2lzKg1iVMGgADKV5J2WLjqgvCfKmzmWMqefjbZiXwyzvssioGoWBGYbr6Bq3euVaiettcQrv4j7xn8CeQMK4v2utJdu5H1Tlz31zGDVRaLOgmzKJFA1Fy+ja1uGqZjVCIJOOkr1eru6DFOnTcMjosNjpQenqgPd6vKMM5CpkCFV6xExraigDO6ZR5ZsRR8l4jZzqwhmKtWJdlbcF2fTga38MuJX1oQDMqbEBXc2G5eTvOSlNHhjOUf0Ly8Zbm2sDWmp6IKaCpnXB+95kZgDd+bEtCjpr2/TVVONYOQtnKSvJ/8RrVqMvEPZzxqLJ/jHrZ+SJ8DLz7jVCU15O5X2QprwiAj2BQ1e+xybpX0SuTgwLec1WVzkQGCOWXnCM5tt96I6ElqP4KbEr+OnTYPPLpG3R0i+VN1ChnvExGNGUxtkyRyCWZ0eD4lasx/Qi7QFn0ZSFUjcRvNi87M6YqAYzjRmt8EdRJBktXo5ijVW1nkbSZwLjGmZH0sFc/g8p6JnVqIi0GgNrywPYu/s2Hyzr9H9QMqmQXw/2p/uOqPl9s3MWjVEqpUUNXx/rT9P/Lg3hN+/8kT3hIpIos0w20SnA4uFHHaln/CoHUOWZm5pCrrTOD/hpNas8zCdFOY4Dug0GcYE1dWPlG2OGrgajjGkt5JBloGdmGLndqsJREWlkzFZE4Z88HaOHw5JSynhiI6Mv053IU9ANer27/79k1gTeScJenvV/r9JZZ/5jOUsm2EDkNSK9JjbqCWM3guMEuEAtYUi6vxaxMjQ6VtRB0IWpLu1fROzEQzBeW3N8t3BlvOHn4b2Eo0klZ5OJLHiRFvdTuFPlK2fB6IZkqs45Ohtqyaks5yfqMGAMrucGXJvm7HoOKhNmAsSct2cpNok2y1HxCNqtibeiTsOoPWOPVk/NPJTq5WKt58721IdDlMArNNNHtC6DaPZEllT3wkyLP8dEFECLd9igrLWsxIPE0P1xaBfLCpAqghN4EPy X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: J3GNnlLpkeNod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GDtJZTrwpii/3ODZl3xtV5aU8B99jvXSMO8f6+WNcCtLJh+V57+z45BmAlmsovM7yzL/bQ1qPDFFGxSH7T9rBg41YWMdqq3DmnRIDcqEGElUqR90AecIptaybUHe0c1qK4/awYTjH1VCJzVThE+z4qzp+Hx928RVOXky7WxTfJ5azKXYIAeF3mfNhyvgcPpcc1TZKQCiPsmYStA9ARcghUb6m8vY5nw+bEvBCUAVt59TtrVemYtGDepRlx7U1S+t2tfc7q81aF0DYklPvxcUZiC1hvFv1apjemG+Oz0W5XLsSI6QrG+4rZfa+ttakts3Pn26xe1PHNkI0cdhBquppFNh7TvP9ANdTe6+C60H8/n+R6x1E01orANucKzRd309h84I8BwMH2eX/86Bi3oPJUx6otUEaiKoKsAeax1jz/HEvVMbVFHYE3X3bdTZqKzAEDTs910xDGHIYYQqK9hapS6wTngokwguXNpSy1NUpv/2jsS3+r9jXQ3hvfJ4DFUKuSEghX5ahsgjp5a7ZHsl4jzYAI9qhUvD31aADECo1/A= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 027ff358-3496-4dff-0439-08dd704156be X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:46:49.0394 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rzhF+5y7v/PMOePNU3k92Anc5/Fr9HshAfOl/tkmK2Rq4qyfigbNzUoH3PkOl2GfuRgKmJmMt26XMSbqlozvTzIJCrbFIkVtAbsTZHWIW3g4745e3E5vUDGoXX2kKqgw X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY7PR01MB13744 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:46:51 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18414 From: Paul Barker commit 2453e858e945e5e2fa8da9fde8584995e7dd17d1 upstream. On the RZ/G2L SoC family, the direction of the Ethernet TXC/TX_CLK signal is selectable to support an Ethernet PHY operating in either MII or RGMII mode. By default, the signal is configured as an input and MII mode is supported. The ETH_MODE register can be modified to configure this signal as an output to support RGMII mode. As this signal is by default an input, and can optionally be switched to an output, it maps neatly onto an `output-enable` property in the device tree. Signed-off-by: Paul Barker Acked-by: Linus Walleij Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20240625200316.4282-4-paul.barker.ct@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 67 +++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 6b383f2baf478..ba0122b46da08 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -999,6 +999,60 @@ static bool rzg2l_ds_is_supported(struct rzg2l_pinctrl *pctrl, u32 caps, return false; } +static int rzg2l_pin_to_oen_bit(struct rzg2l_pinctrl *pctrl, unsigned int _pin) +{ + u64 *pin_data = pctrl->desc.pins[_pin].drv_data; + u64 caps = FIELD_GET(PIN_CFG_MASK, *pin_data); + u8 pin = RZG2L_PIN_ID_TO_PIN(_pin); + + if (pin > pctrl->data->hwcfg->oen_max_pin) + return -EINVAL; + + /* + * We can determine which Ethernet interface we're dealing with from + * the caps. + */ + if (caps & PIN_CFG_IO_VMC_ETH0) + return 0; + if (caps & PIN_CFG_IO_VMC_ETH1) + return 1; + + return -EINVAL; +} + +static u32 rzg2l_read_oen(struct rzg2l_pinctrl *pctrl, unsigned int _pin) +{ + int bit; + + bit = rzg2l_pin_to_oen_bit(pctrl, _pin); + if (bit < 0) + return 0; + + return !(readb(pctrl->base + ETH_MODE) & BIT(bit)); +} + +static int rzg2l_write_oen(struct rzg2l_pinctrl *pctrl, unsigned int _pin, u8 oen) +{ + unsigned long flags; + int bit; + u8 val; + + bit = rzg2l_pin_to_oen_bit(pctrl, _pin); + if (bit < 0) + return bit; + + spin_lock_irqsave(&pctrl->lock, flags); + val = readb(pctrl->base + ETH_MODE); + if (oen) + val &= ~BIT(bit); + else + val |= BIT(bit); + writeb(val, pctrl->base + ETH_MODE); + spin_unlock_irqrestore(&pctrl->lock, flags); + + return 0; +} + static int rzg3s_pin_to_oen_bit(struct rzg2l_pinctrl *pctrl, unsigned int _pin) { u64 *pin_data = pctrl->desc.pins[_pin].drv_data; @@ -1775,7 +1829,7 @@ static const u64 r9a07g044_gpio_configs[] = { RZG2L_GPIO_PORT_PACK(3, 0x21, RZG2L_MPXED_PIN_FUNCS), RZG2L_GPIO_PORT_PACK(2, 0x22, RZG2L_MPXED_PIN_FUNCS), RZG2L_GPIO_PORT_PACK(2, 0x23, RZG2L_MPXED_PIN_FUNCS), - RZG2L_GPIO_PORT_PACK(3, 0x24, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH0)), + RZG2L_GPIO_PORT_PACK(3, 0x24, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH0) | PIN_CFG_OEN), RZG2L_GPIO_PORT_PACK(2, 0x25, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH0)), RZG2L_GPIO_PORT_PACK(2, 0x26, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH0)), RZG2L_GPIO_PORT_PACK(2, 0x27, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH0)), @@ -1784,7 +1838,7 @@ static const u64 r9a07g044_gpio_configs[] = { RZG2L_GPIO_PORT_PACK(2, 0x2a, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH0)), RZG2L_GPIO_PORT_PACK(2, 0x2b, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH0)), RZG2L_GPIO_PORT_PACK(2, 0x2c, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH0)), - RZG2L_GPIO_PORT_PACK(2, 0x2d, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH1)), + RZG2L_GPIO_PORT_PACK(2, 0x2d, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH1) | PIN_CFG_OEN), RZG2L_GPIO_PORT_PACK(2, 0x2e, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH1)), RZG2L_GPIO_PORT_PACK(2, 0x2f, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH1)), RZG2L_GPIO_PORT_PACK(2, 0x30, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH1)), @@ -1808,13 +1862,13 @@ static const u64 r9a07g044_gpio_configs[] = { static const u64 r9a07g043_gpio_configs[] = { RZG2L_GPIO_PORT_PACK(4, 0x10, RZG2L_MPXED_PIN_FUNCS), - RZG2L_GPIO_PORT_PACK(5, 0x11, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH0)), + RZG2L_GPIO_PORT_PACK(5, 0x11, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH0) | PIN_CFG_OEN), RZG2L_GPIO_PORT_PACK(4, 0x12, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH0)), RZG2L_GPIO_PORT_PACK(4, 0x13, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH0)), RZG2L_GPIO_PORT_PACK(6, 0x14, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH0)), RZG2L_GPIO_PORT_PACK(5, 0x15, RZG2L_MPXED_PIN_FUNCS), RZG2L_GPIO_PORT_PACK(5, 0x16, RZG2L_MPXED_PIN_FUNCS), - RZG2L_GPIO_PORT_PACK(5, 0x17, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH1)), + RZG2L_GPIO_PORT_PACK(5, 0x17, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH1) | PIN_CFG_OEN), RZG2L_GPIO_PORT_PACK(5, 0x18, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH1)), RZG2L_GPIO_PORT_PACK(4, 0x19, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH1)), RZG2L_GPIO_PORT_PACK(5, 0x1a, RZG2L_MPXED_ETH_PIN_FUNCS(PIN_CFG_IO_VMC_ETH1)), @@ -3007,6 +3061,7 @@ static const struct rzg2l_hwcfg rzg2l_hwcfg = { [RZG2L_IOLH_IDX_3V3] = 2000, 4000, 8000, 12000, }, .iolh_groupb_oi = { 100, 66, 50, 33, }, + .oen_max_pin = 0, }; static const struct rzg2l_hwcfg rzg3s_hwcfg = { @@ -3061,6 +3116,8 @@ static struct rzg2l_pinctrl_data r9a07g043_data = { #endif .pwpr_pfc_lock_unlock = &rzg2l_pwpr_pfc_lock_unlock, .pmc_writeb = &rzg2l_pmc_writeb, + .oen_read = &rzg2l_read_oen, + .oen_write = &rzg2l_write_oen, .hw_to_bias_param = &rzg2l_hw_to_bias_param, .bias_param_to_hw = &rzg2l_bias_param_to_hw, }; @@ -3076,6 +3133,8 @@ static struct rzg2l_pinctrl_data r9a07g044_data = { .hwcfg = &rzg2l_hwcfg, .pwpr_pfc_lock_unlock = &rzg2l_pwpr_pfc_lock_unlock, .pmc_writeb = &rzg2l_pmc_writeb, + .oen_read = &rzg2l_read_oen, + .oen_write = &rzg2l_write_oen, .hw_to_bias_param = &rzg2l_hw_to_bias_param, .bias_param_to_hw = &rzg2l_bias_param_to_hw, }; From patchwork Mon Mar 31 10:44:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033466 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88993C3600C for ; Mon, 31 Mar 2025 10:47:01 +0000 (UTC) Received: from OS0P286CU010.outbound.protection.outlook.com (OS0P286CU010.outbound.protection.outlook.com [40.107.74.63]) by mx.groups.io with SMTP id smtpd.web10.49079.1743418013966373336 for ; Mon, 31 Mar 2025 03:46:54 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=K4TQTXdR; spf=pass (domain: bp.renesas.com, ip: 40.107.74.63, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vSY4l3sM47Fzn78hjoXAnoyIqnS29saIQ/oywtoHefpRvyErr+dVXYsx3XZFKwMbZ3/unZhWxbV4iGQJUw2M/8VKzIa6r+VZqkBYurN0MsfzVFmfoJWMBKcOnWhSagSbM/XpVjzqQdj6N7OdirEhdxayM91bDHFSnCuhfVNodlnKV9ffZn22kn9i2l+GBHy1AumOSBbD3A6BxdrMwpawcODd+MieOZu/4DRgoFn02W4yeWj1ItlEIl/+08KTyn1dB5Jcf+2PlqzFFPMSygF0nntHeDvslN7kf/ga0b14v0Yg/01zeXo4Zn9Hs6JhBXtwQCFUAPOUUv6ay/YaO4Y9zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UBEFhnT3CVets8zI9wLf/TNnBdIi5ovNKxwzfsR7gLA=; b=F/TZlPtbwAGFT+rC9kfCVNHH6/P2xlWdgTIViOkP9DjnOrk1cI/8YQpJDfuZE08xs1mXw8nXfJMp9ymVbp8zY2cYUxg2Z/jgb4JZ62OtTtuatvhBI/eCUXrS0ej4OTRiVs+dCUaAfwbRgcABX00IZOW2vSiBVBiCjZ4uEUszo/RbCSd6SAX0TqkvItaRqGrtKikMB/RAh1AfM2GHP1+dfWwkNs1zjsQ2Rr6iOkvgjqOdbG4pVZpjtfJGp2APfCSoB43j8ja0l7X3gWBMoWTvcsBGD9vCLtK7slitXp/oTj/BPkQFfvGt9E3gwPEDPThdGdZ3EQPrJ/gAZEO3aRX8vA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UBEFhnT3CVets8zI9wLf/TNnBdIi5ovNKxwzfsR7gLA=; b=K4TQTXdRxok9J94wYsC//zRh1C5nqfnCXyi6rZ9xrQYqDh+eRPMROdnTXYNV7J7Kv+v8oxInFvBb6koEv9kA6NM40YyFy/jGMfWWZAedbOY82Vq2puWBZFlF9ZCDOXX26BXy0ifSImWBFb3P/zmHuDlN7ZDOHpngDvG3pWeCxiQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TY7PR01MB13744.jpnprd01.prod.outlook.com (2603:1096:405:1ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.33; Mon, 31 Mar 2025 10:46:52 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:46:52 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 27/43] pinctrl: renesas: rzg2l: Return -EINVAL if the pin doesn't support PIN_CFG_OEN Date: Mon, 31 Mar 2025 12:44:58 +0200 Message-ID: <20250331104514.79090-28-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TY7PR01MB13744:EE_ X-MS-Office365-Filtering-Correlation-Id: 5cddcc72-9fc9-44c7-7a0c-08dd70415889 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: sZCwE9T1I1AFJ6uguGvgNu8ZkHnwLfbx5ZrtlKbgUw1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6uXeH06Z/d7UquPEe8YmVF6sfW/aJzl9/X4wzo2/ZZMDyp3Pc+pvXuHHsWfF8Fw7Hms1Gj0QcF4BYRfyIxEonnmRLoRuXguMk6axp1ZvuRgoDtgxdypN4nlh9fcTKiD6pPX5EHGMAfwjbrm7+sP6HqPIMuLf0LQoBWtSE6dNj2YkPuSizb+J4/rj5EBp+KkEChaw7q4YnMsDy+wQiA8Yr6FGTtoqaHP/jt1ddeVi76qDqjjovXYlSyfQzOYciSjzjOej8eatp3mruFh2TKPob5jpCJq33zgxteoPjnsDTQP++FeQ13jL55mUpEXgoKK5Zm7ZOaP1qwZM4Z2/SxCBQ4T6BYZ6FmUGPNI7l82alTpRit X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0I44g4RXXRDkL1sclyImFAl56qSgQOoigW8RUwJc69YQFZkG45okYbVLaz1Fv4cwZdNx3DcYYIlncbzmRFKTHJ0B5CD31J1FrPrVoUvYDOqFzbbBqJewg/4rYagF61hu/fiF/wtU1wFbRvuq671idibmf1on+g7tp37XbfeF6UjKyT5cdEsEovG96wnt+EOnJmulCHJJugz2pQIwQ6chBzr97wLuoKjUPeduMmLMlAtjKzkvuc03g2hXgBW/msTRPN0J/pzpBxLaSCBphTuttCcghDUJREIiKv7v/ra5d+ckG3nEd5V6XIfBe61SNDELfQlJbPtz1J5cbQN9QC3+I4czkzrXLARffGjvJRIawnuk6h5ZGg9YlF6Rw7IL69mMoOmiT1d6eEftoVoXU+i0nudjI1ehS8CzUAgXjifdzDmvfizxQf/e/PQKgg8B1ssjrJzmq7YpKloepb5pqiQClSWv35Zo8QWwkYpxdNEK/wplfooA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ny0/zCmGeHUnm5AqBINfUmysp18D1/0GqSvYlgJvQ2UPe3qr7FZQ= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5cddcc72-9fc9-44c7-7a0c-08dd70415889 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:46:52.0405 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ucjlLfOqSopVbY1sFLg49qSWwZMKqwcL2fUdVNbyvBv5HuEiU/VhcTyG2ykw7BPanTiEo7Am9bSqEILVO/WuVYnbIJ2CXt9dgUTDgkan4zGKgMuX+jRzxywACgLUqwm1 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY7PR01MB13744 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:47:01 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18415 From: Lad Prabhakar commit d56abfed1c02814b5ee96b0ed1f989ea9d7f6cbb upstream. Update the rzg2l_pinctrl_pinconf_get() function to return -EINVAL for PIN_CONFIG_OUTPUT_ENABLE config if the pin doesn't support the PIN_CFG_OEN configuration. -EINVAL is a valid error when dumping the pin configurations. Returning -EOPNOTSUPP for a pin that does not support PIN_CFG_OEN resulted in the message 'ERROR READING CONFIG SETTING 16' being printed during dumping pinconf-pins. For consistency do similar change in rzg2l_pinctrl_pinconf_set() for PIN_CONFIG_OUTPUT_ENABLE config. Fixes: a9024a323af2 ("pinctrl: renesas: rzg2l: Clean up and refactor OEN read/write functions") Signed-off-by: Lad Prabhakar Tested-by: Claudiu Beznea Reviewed-by: Paul Barker Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20240723164744.505233-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index ba0122b46da08..7168495da5659 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -1261,7 +1261,9 @@ static int rzg2l_pinctrl_pinconf_get(struct pinctrl_dev *pctldev, break; case PIN_CONFIG_OUTPUT_ENABLE: - if (!pctrl->data->oen_read || !(cfg & PIN_CFG_OEN)) + if (!(cfg & PIN_CFG_OEN)) + return -EINVAL; + if (!pctrl->data->oen_read) return -EOPNOTSUPP; arg = pctrl->data->oen_read(pctrl, _pin); if (!arg) @@ -1402,7 +1404,9 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, case PIN_CONFIG_OUTPUT_ENABLE: arg = pinconf_to_config_argument(_configs[i]); - if (!pctrl->data->oen_write || !(cfg & PIN_CFG_OEN)) + if (!(cfg & PIN_CFG_OEN)) + return -EINVAL; + if (!pctrl->data->oen_write) return -EOPNOTSUPP; ret = pctrl->data->oen_write(pctrl, _pin, !!arg); if (ret) From patchwork Mon Mar 31 10:44:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033468 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F18FC3DA4A for ; Mon, 31 Mar 2025 10:47:01 +0000 (UTC) Received: from TY3P286CU002.outbound.protection.outlook.com (TY3P286CU002.outbound.protection.outlook.com [52.101.229.8]) by mx.groups.io with SMTP id smtpd.web10.49080.1743418017310566600 for ; Mon, 31 Mar 2025 03:46:57 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=aJNkFuWm; spf=pass (domain: bp.renesas.com, ip: 52.101.229.8, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HgWQOCfF6kiBt4tXSpCrkzV7QTesVLS9Fzcr9TcDvXv8I+6VsFppt07JEw1XJVkflxGhZhC1GWB1ecR4W8DcFmALUi6wKbJcM1y02pZ8lfVqdLNu2hUvMM4Zu7W+l2823Z41LBG9WUgLw42qGQr1CpK8D4jtq6ttmiTKkSYFolZvg3Rao6CdvpZN8F81z/9FvzaeQgfPh1ZZrs+WhmLwh0OidVZls2TNqgAzVQM1+rz+uvGSLJ1L0p1VAABoz582iN1NzcMqSr5nsk0K52dLd0xpMAvcKeVpazzbKa+SvXfbJ77wlX4jEYTe0PpeclW/WAl163MKUpdxGPjDb6uGtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gxSMWt8kl69JggGtPNxvnnWe57xBRR+lQvRI2pyQ4bE=; b=CF7rdHO2m/r5vBSHPdpB9jegOx4TVvbHrwaBtLQ049pvlwTVpqozjEnb+fg6GA1CuweFzVyKkzobr8Jg3Nnqs6K23v5TLCBFVNOowNU82nPLk1QbdsYSV60SsEhag7gR5nBe0jGIucps+gxHMZlO4Q5MH/Cgn9wAQ51HPE21fKntJ4L0btnheaxWDBU0s0ukUilfhnJFhSfcalDqXgImv5iY7OvE1NBwN9phDrv1yIs0cLPEUYi/IWxnrimzwHAJD+g0pY10Qpaw1mDGTqveUJnczdSxJl0AMWcHk5s/+AKioYCGFAxbaARzbreEP863G9iG3TA+VBuZenG/P7QWDw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gxSMWt8kl69JggGtPNxvnnWe57xBRR+lQvRI2pyQ4bE=; b=aJNkFuWmT3gsgglrmePI/BD03VZILX4QkS+D5I+SjHeKTZO+kvylIIVbQcSm9iHvKPqmsPBG7+iDTozWcLgXWZCZNehGIyOodTa13atp9Nyv/t6JUtwy3w5a9tpHYXrRHuvNHJFRq8r8qrOlf/lNNwelKnp5/H/tWP564n2+jik= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TY7PR01MB13744.jpnprd01.prod.outlook.com (2603:1096:405:1ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.33; Mon, 31 Mar 2025 10:46:55 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:46:55 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 28/43] pinctrl: renesas: rzg2l: Use dev_err_probe() Date: Mon, 31 Mar 2025 12:44:59 +0200 Message-ID: <20250331104514.79090-29-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TY7PR01MB13744:EE_ X-MS-Office365-Filtering-Correlation-Id: 5183caef-3e08-4a04-b8be-08dd70415a51 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: s80KYzqo9PQzX/V94Zo3RcihDvxBsyIam0R985jhKQTGYPhZXU2+qwtKV3hHYdFNVvkUsirbuzX2/jUzrO93tOvaR0Xnwks1rhpdDxvpd7fhFrgreh9yT2hhIgiSJcRLdvruouTvb8ZmyK6Q2FsDrZT3nN9WC/A9jT1fwtimI8hdQMcdTiUyROaDTTvley/IYIoFtXfLbH+YphnMJo0pJUoM/hNVzz5+zEQoU96SsukaL0zbGybncU2BM+g/20CHu3x9wozCTn0AtePYx+jgyyctuhGeZ8gstZVKm8iVy6wttj2aJgtUSf5HuImqJvwZThKE5esf9aB2OGgEgrgeTErbK/A7gDQgS1lZRHwU3XiQsp3mv45pfJq4KJHwp+a/SS/xPkJKp7L+TmJvbRmKXuHwsmX4REFm2CftB+dv6JntEKpxTMy9uii78AZyZHQKThcRh46bV1DMJC1oUbLEk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B13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Vv4wuv5f52g5jf8pvxGmdKBSvZ5Rhf1WYYvxzmcDZ8F9TlBf0OeUeh17rPRbquJvwFNpK+5J14ZMHBLm4mdBR6PHgPYhgOgotwof50A4Hy0um8CHiTyYiZ5DQqkTp5SKOjhA2E3WrvhXmBysTPMheYNphVZDdSTUddXJxuvcROOts9HARZZXZLabrrU84Wkl3WDk9wyrMiW5Bp04FomfWEdljt3OTfHTjFWcLq6iBJZ8HCP+zm0Q1c6sogF8WJdRbn/B66kgxdAVlMskVQzj40fbFE7kpFOuH/hMqayH5NIh8qinUlpOwaA/QSRab7e9P3ytk1V8Cqma3RVmMds+jnDiaM19IjRLmOPXJIWAQYPqt7R70Y9X1cKhwm70RN3wrQm/aC0+Utc7wLLjRY0KUaHpPx83MgbiaEyDcMfPwqz3wcIh2i0t9CYH2o1LgyHZwl4vKG1a/xmsdLiarZGluUBFO/nPM54fRV/OWSntsnYYo0btVOpzIQzfGPrAUPckxZkxQTnMzYLtOBfV08nZ0kUzDEHzrp6uBEU264HwIC5IVFyTkdkDbqfjJm1w//iPTNl97HKbp3GHrhJLWolro64KyqW4CF1+/RImmPFG4uIYtZkPMNFSuxYI64s5n2EzzQWR7CFFSGK03UzC7FwkvFuEZapb3Hko0h/FGiCEJQr0PVa4FEPBdsWw1NpBudLXq9uRSLrZ++U3QczJtgX7MPMdo2RkO1O+Ncl535UMsbT5cZUaGmCiwffa9J3lkYd9Ih75UAFl7y+Uxr4X/n1d9fCOlYKW6xzi6coLs2HKED1zuf8B/XScvGyP1/nTsezDjQyZsM7Vi5cY0fIHI4plE+SZDDSda7ceWCILB30RscL8nrjclzMzQT+P01i31ym09izXq8xX1ZG1/iZHD7f0RthZA0lIiAB9T3XyP8SIMYcLATo9ik+uMMteabh3FyPjxLHmJhFKvqo6HRBjEB2gvrM72hEh7wGG2xDTdrWTOh62WdD4jgrC/gqJM5OAyH2zoc0Rzr8E98CPGVyk0Tl5IaUrJLltqC/2EMR4vWjeSqG/5ZTrUF290W05ZaAJiZ3Ub9W5LcirAljIpBHKko+mnCCCFoaQ6LeekG7uB6od3yml1Qy4Ll69eupGcHd9ayvZTqarAdy1zkwHopMZ8a5bEM66OP2LoZklYAAIoJ8dp4nEROqVVdRLkJYhADo4voCHPvxxmTXJ5aEGJjY5QbXRnS+qsKp/wrb8t4N9geUmE2TfMmoWLlKIGb4dZT9MZSOeFcK6qxJqrqJF0zcyTjGPZnViLLTJnOq6tySo37P725lQZ79ZvL+VOyYyzRMzCQFGNPfDZgMma2EzjA+LnCUP4Acf/xHpKwbMLOUNl99WQU18bh03ldJWvVZMPiK8J4v28/1Bufobk3zcXKBCz4F9POfvZZ2WOBki+lRVfMRvXefirYcdxQObKJ2Kgk9RJxZ+yW3MM7GavcUU1zGJSrAfoU4fZGlLftmDis0ouuUtM59+6WXARW8YQ7Y4J1YUumknNF4bEgv64+SVwwO+TFV5F2gW02ro2fblUmbASNSONZRCUfh7oLu8UQvKYXEzcu8sG259jTWcqHJeudICOCXxr2GbnJCPBCWxbap3+7p4ybQ= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5183caef-3e08-4a04-b8be-08dd70415a51 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:46:55.7030 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: A7JR6XBlPM/2oWiyjsPU9UPkpST2wdjvY09xS6Udc29eKAhj/RXSWm6fxeSY0SaEK4eSWz8OBEZCeWE9LZbZv3hlPHdbB5ZUKmVGxne3a3cbstJSw6LhSu/9uB/oPXm1 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY7PR01MB13744 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:47:01 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18416 From: Biju Das commit f73f63b24491fa43641daf3b6162d2a451bd8481 upstream. Replace dev_err()->dev_err_probe() to simpilfy probe helper functions. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20240728090421.7136-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 37 +++++++++---------------- 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 7168495da5659..bc671807bad54 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -2600,16 +2600,13 @@ static int rzg2l_gpio_register(struct rzg2l_pinctrl *pctrl) return -EPROBE_DEFER; ret = of_parse_phandle_with_fixed_args(np, "gpio-ranges", 3, 0, &of_args); - if (ret) { - dev_err(pctrl->dev, "Unable to parse gpio-ranges\n"); - return ret; - } + if (ret) + return dev_err_probe(pctrl->dev, ret, "Unable to parse gpio-ranges\n"); if (of_args.args[0] != 0 || of_args.args[1] != 0 || - of_args.args[2] != pctrl->data->n_port_pins) { - dev_err(pctrl->dev, "gpio-ranges does not match selected SOC\n"); - return -EINVAL; - } + of_args.args[2] != pctrl->data->n_port_pins) + return dev_err_probe(pctrl->dev, -EINVAL, + "gpio-ranges does not match selected SOC\n"); chip->names = pctrl->data->port_pins; chip->request = rzg2l_gpio_request; @@ -2641,10 +2638,8 @@ static int rzg2l_gpio_register(struct rzg2l_pinctrl *pctrl) pctrl->gpio_range.name = chip->label; pctrl->gpio_range.gc = chip; ret = devm_gpiochip_add_data(pctrl->dev, chip, pctrl); - if (ret) { - dev_err(pctrl->dev, "failed to add GPIO controller\n"); - return ret; - } + if (ret) + return dev_err_probe(pctrl->dev, ret, "failed to add GPIO controller\n"); dev_dbg(pctrl->dev, "Registered gpio controller\n"); @@ -2730,22 +2725,16 @@ static int rzg2l_pinctrl_register(struct rzg2l_pinctrl *pctrl) ret = devm_pinctrl_register_and_init(pctrl->dev, &pctrl->desc, pctrl, &pctrl->pctl); - if (ret) { - dev_err(pctrl->dev, "pinctrl registration failed\n"); - return ret; - } + if (ret) + return dev_err_probe(pctrl->dev, ret, "pinctrl registration failed\n"); ret = pinctrl_enable(pctrl->pctl); - if (ret) { - dev_err(pctrl->dev, "pinctrl enable failed\n"); - return ret; - } + if (ret) + dev_err_probe(pctrl->dev, ret, "pinctrl enable failed\n"); ret = rzg2l_gpio_register(pctrl); - if (ret) { - dev_err(pctrl->dev, "failed to add GPIO chip: %i\n", ret); - return ret; - } + if (ret) + return dev_err_probe(pctrl->dev, ret, "failed to add GPIO chip\n"); return 0; } From patchwork Mon Mar 31 10:45:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033467 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88599C3600B for ; Mon, 31 Mar 2025 10:47:01 +0000 (UTC) Received: from OS0P286CU010.outbound.protection.outlook.com (OS0P286CU010.outbound.protection.outlook.com [40.107.74.48]) by mx.groups.io with SMTP id smtpd.web11.48829.1743418020672948806 for ; Mon, 31 Mar 2025 03:47:01 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=Ui2lPEDX; spf=pass (domain: bp.renesas.com, ip: 40.107.74.48, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QDJtXpeVqX35qNvkK/Gkhl0DapR320voaecpvTtwBTrfFsupF4TlupeSYEAaDl4BXx/9Q2ntgf9Eg6BHDYo0hVCZBRt02AaNxz9YsZsyzJbLh1FeXkz+Lxp+2k5nYpufvyqs/nrsXRM9iZ6XJD1MQmC/MGs781+VAz6UzT4OPsDrI49W8ALbKFjMDLylU0wnqTDUVjR/LQGnUyKF1wV9kbi38omJBflOWekBSBInfSSGlOzp67Vhf+Pn8ozDuhEGUVyad+uZGIxeP8fcZPd6Gusb+2v8GfOLSfxzyHsRIc27aQrMNkO6DqzU5G84h/d0Q85KSCwjMhCotSaVRucpig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kaqrf4NOmC9xNhh0HvQhc9B952nefh1wy0l1EBxWjF0=; b=pbMy4lDh4ONAzTnfw1Dy+trCtEHs+bKLiGikwyiEDu7FkuLbNAyn8fXwVROgnVuBu1lIxKQau6AcCCcPn8Pzw7GO2bTOHrlPJGup/bye6/EGJWm7x8ZWpLP6Jg3RwNVlhIaG1maGnhyLMcOEZRzNmE+pDP+rOxPnNfrut1KpV16k2kdP2ZP1eiFyekkZZGZFxXA/ulJd/+gzK6EX5hthdICuZuVoCnH+pK1SR6B+rrumiBposPedNt4orzaG70pBI/8QY7UyzEp6J7rfgqaM2EU5+zmSL2+lV0n49Yu1r3RSwWcKiIbXLewCxHP2N9zBsbAzGv+uqzp1PbOrGXq0Mw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kaqrf4NOmC9xNhh0HvQhc9B952nefh1wy0l1EBxWjF0=; b=Ui2lPEDX2/+Huy/dJcg42ENI1li9iM30ffFqlN0wvl2q8Eip6OWmCh/MKKLMgKIn0oQnrWZDd7jE3QB1YRFBZwGhSadjjZwuhNh2HRp0/9zGiTfX6wq7+Af/l9MzEdgcL5/4+CYjMqRMFpPyB1N7rlMk+hmdw7voinozVUW9Zho= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TY7PR01MB13744.jpnprd01.prod.outlook.com (2603:1096:405:1ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.33; Mon, 31 Mar 2025 10:46:58 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:46:58 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 29/43] mm/util: Introduce kmemdup_array() Date: Mon, 31 Mar 2025 12:45:00 +0200 Message-ID: <20250331104514.79090-30-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TY7PR01MB13744:EE_ X-MS-Office365-Filtering-Correlation-Id: 2e1c4d6d-adac-4aa8-498d-08dd70415c81 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: P56F5MvmifE/yBOhNN0M74DXGkN57MaiuljsErfWNYbCcuwE8O9863KPSqZEumDJavjj0IDms1xzPBaMYuDPe1FzGQg9DfguNNeU9/4NRxnMfNMes3yu6nbpMJfZUfp4ZJCpb765RUVSt4+Pq2Y9NbipzI+KInCTm0gY0hzFsNdgUbL5XNVVScxSnlyhoFiRcxnqvF0Twy9ngJCO66BGOp2YNIOfoANa/3yVzbRtj20QVybFq7Aq0o6AR81Jzu/E0gsYrQ3ZC04gGB/5S3qKuJqq5QHSF1v1bmAkTfRvdi4Xfxy6Mh8809K4JUs3T6CFBhgsLHXo6NfudUu1lypOau/rGQTLxb2npEcfxLRyNgluIq9EMbk9A3F0mS1yudDDcyB1zoDihdZY1vrtgruIbLSQ6+CvEakUflEpSp6c/2t8b9ajv2P6t5XSHNFI9tReBpIjxv2BeVnZENuoQxV4QW4aC/qSo7CUcgzABZuRK4UrNkDg/9uUeqwYdhCEPw0peAR0ncXtGnx9LlLBiYBibirhvdUcRBX5GlpPu54EqNdv2D7t2iNvidbl2SCnrZXiQRvg2I6hWxrSOHiVHHE/XHw7MxowAVCRS3VMwRKko6i73jYt6T+4RtA7WWEgwCtD8dvriVSAnM7axP0SMVgijZHhXnXFmy57cXtL7IOJ4o+SyR4eK/iZau6vR6Pj9b1ujq1I6ts82WvstIW9zbOofbtX3aYUEzyKlWjQN3QbqUIJgAsyZu47j8Df9C9bk5/kyxSJNbF+cdlOlZDLiIo2oCaHgHpAavs4vDKCinKVZpyt0unonC6hxD5KnqGrwfchEqle+aCbRceo7JOk10l5BDV0zuL5VRtzrbWrh+27L9gc4i0aXMAPQLZGZHg6jojfnv9/Gmz9RpaZtJogdaFIldbR05CrwE9Mcs/yz3RTGOHtRtLA5W3y5ymZ1SQ0RL7DMKEWZFQDRCz3Q5fo9glY5QmUO13gpNe0p5tNUAd5UARXo/2f6hCpBBjDa9tUHFtLVWTi1vmLZqi+d7DJxqfHehaQ1HsfTibv5CFzwY6N5xwe6Lkl5pQQtmICTeKTxRN9A1532MSj9RsDf2tPHiFHnWkxJTKsl0nf3HokFPXPJ2S7WPbS0eHuDSCJtlLfm6xmn657UR3uLr0jL7WPtx+hMNzN2ygWZ+2DKWKdQ0ft21cSwXJtb1eF2Kvm9+yQgraqP4iQeVqZVjObFTIsrJj0RegNn7xXP4j52Ph7YE79F+TikDg4oz3vv9hABb2TtNjUuLadRnF4Ev3mTfnKQBFdH8YRTEOXn0B7VtknnD2Vd4ZbOkVAaADiWdb/M7vC3j10lMazLcP2WUXgt1vC27GAWh6pZudfprsS4K7PV08y5Znw0pvRKD/Ivtr7ZbbQeSU9UO9XaBqH+oGJlAHOrDES58+qFmuiNeFT1WC6Pi2teEm+CsCYGA4SPHAtaBrjj4jC X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-M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h8fKz3UbM13lgUeWYacs5Aivoi9+Z6E1Xm/I6TE//Kth1kOYBjcyU6D7IeoSX4Qr/j7gWAtbcs6WSGThVYuyj1JIg8IPxb8J4cEvDFlPGaetGelf2qVyu7PY7yf/LNYz2qoSB0q2TMVlXLa6g8AdnXjFGQKo9TEHZ3kv2RevpR0gWGvRMsQW4ot6I9iG5hg896um3CXhQrY+L53P5BtB8sqMelHddbLwXuSe8eKT4AYpWs9v//4GbtOH8Zzfp4A7kfc0RsNfnyYI+V3iwKTe0KWgKxEBW0GOU3eklmbvvEYqtOlf6zho8zKIX8P8qb5uoRRKylLBitULx/mvVcAg37Kb1+bLvZU3o3iH/y2f791JwANBJRDade2Eawm5IR4Fe0652ebvSiVEJ7uL8j1bj4J4gDreuqSAJB/PvXjHYOFRK2tjSJl0MpvZTL98QY0axuDVAoLhKURoCzyMRGjT3Sc3jaYvTTaUPi/i4yTKUlPthlPerkMC/4DckfYY6OzzAJwDoyRJin2Mw9ZpoqfXF4JWO7EUHVPTJJlCE6l5w7iJgAgM8CJZ2caFqV1iY+BOz/UpRLsSnjV5SMHJYNB4dO9V+R2jQzJDXuYvll/ztSBaufw= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2e1c4d6d-adac-4aa8-498d-08dd70415c81 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:46:58.7102 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: A4zDB1pz3gtLpWi/HUYXhTo/q5lJ59t/vrTwP/OtqT0jg/TGQAH/sT1McjVextATg2z13hG0TNGCmxMngfiwq+Yr29YI7ObUOt3aXMPzbyKSp4/Gzc5z/NNTxPdi9MEo X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY7PR01MB13744 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:47:01 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18417 From: Kartik commit 7092e9b3bed1252c7d3f5812b9fb9d82375b73a6 upstream. Introduce kmemdup_array() API to duplicate `n` number of elements from a given array. This internally uses kmemdup to allocate and duplicate the `src` array. Signed-off-by: Kartik Acked-by: Kees Cook Signed-off-by: Thierry Reding Signed-off-by: Tommaso Merciai --- include/linux/string.h | 1 + mm/util.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/include/linux/string.h b/include/linux/string.h index 422606e98cc42..066203187c8d7 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -218,6 +218,7 @@ extern const char *kstrdup_const(const char *s, gfp_t gfp); extern char *kstrndup(const char *s, size_t len, gfp_t gfp); extern void *kmemdup(const void *src, size_t len, gfp_t gfp); extern char *kmemdup_nul(const char *s, size_t len, gfp_t gfp); +extern void *kmemdup_array(const void *src, size_t element_size, size_t count, gfp_t gfp); extern char **argv_split(gfp_t gfp, const char *str, int *argcp); extern void argv_free(char **argv); diff --git a/mm/util.c b/mm/util.c index d3a2877c176f9..770803ece7959 100644 --- a/mm/util.c +++ b/mm/util.c @@ -133,6 +133,23 @@ void *kmemdup(const void *src, size_t len, gfp_t gfp) } EXPORT_SYMBOL(kmemdup); +/** + * kmemdup_array - duplicate a given array. + * + * @src: array to duplicate. + * @element_size: size of each element of array. + * @count: number of elements to duplicate from array. + * @gfp: GFP mask to use. + * + * Return: duplicated array of @src or %NULL in case of error, + * result is physically contiguous. Use kfree() to free. + */ +void *kmemdup_array(const void *src, size_t element_size, size_t count, gfp_t gfp) +{ + return kmemdup(src, size_mul(element_size, count), gfp); +} +EXPORT_SYMBOL(kmemdup_array); + /** * kmemdup_nul - Create a NUL-terminated string from unterminated data * @s: The data to stringify From patchwork Mon Mar 31 10:45:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033471 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88B58C3600B for ; Mon, 31 Mar 2025 10:47:11 +0000 (UTC) Received: from OS0P286CU011.outbound.protection.outlook.com (OS0P286CU011.outbound.protection.outlook.com [52.101.228.0]) by mx.groups.io with SMTP id smtpd.web11.48832.1743418023523524754 for ; Mon, 31 Mar 2025 03:47:03 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=FLt25yZk; spf=pass (domain: bp.renesas.com, ip: 52.101.228.0, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FWKCQsGQ3CjnRG09Q9FksIelf1l9mFzXYPNU8e1BwqAPn1lPQE715XZt/DIWD7DyJAt2TBzktengCilTLu8yEjoV08ubEGXqKSRJqOnJBJL+qYF4U31IXUN6HWGNr0Oh6xNRAfMKNbt9kLZg4CPK42VgAtXY23rQ2zkCy//viZcxhq94HFVrfpFlfw8YrJ3OEXFKtne5BWo0A4QYB9FTQs3oZ3jGS5ZhixkzpLZwAkQ2csaDJlXtZ2sXmrCSgClchAPJBwHtPTYHPIXP1oxK8E8q3sb6+aWra3V1T5hmfARZ1AOEjHKCxg+SnMM2pJWLJ5ZciE1pKcE3vz0P2qzsAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tETmjSuyRQunNEMenBN67o5F5/qPVzSF5C1tCNpiSRM=; b=HK1jTD0+ypbgd4WOwGs383iWKc4b3N+B70wkIlBQpX1RQHQvmR+QhrK5dxTG6Wu6DjVrhJ2rcvVhS10NNywmv6Jmz1Dbp4osMMFnveFXUHI8Z9cqNbru6MfVWTjKLfRxHu/jnHzEbYSnZ01n2SUrHrf2bymre02Vjpp8g07Sc1TL4QCxSjuMcx0EBNKzy0aM8prnozkOom5SFPbKo0hFyw6iIi+K1CNBQEEP2s4r8ltbpJnwcQgZhdJeCWyafp3ZJ4j+cii9+/lw33qGM5zQho+WeUQosLQgTTrKSIaX46WbVrC6a78WqM/yPpBLxf+3SWZVyN0DSzSyC1ilRAu13w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tETmjSuyRQunNEMenBN67o5F5/qPVzSF5C1tCNpiSRM=; b=FLt25yZkN8OjuUzRGhfw1NWjo3OegGa5Ret7vscOgXOnfmv6Qa5gRqsRP1cV/ygtrsgSadnnY1Felyiy7OH344iS6fmg57otinCh8gXJOOAqmAUSgUNQ39qTTA0AYSkK0wBsVPxiWb8bzsxElBIDJ7ZgBoxNli/Qk+53WwKd88Q= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TY7PR01MB13744.jpnprd01.prod.outlook.com (2603:1096:405:1ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.33; Mon, 31 Mar 2025 10:47:01 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:47:01 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 30/43] pinctrl: renesas: Switch to use kmemdup_array() Date: Mon, 31 Mar 2025 12:45:01 +0200 Message-ID: <20250331104514.79090-31-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TY7PR01MB13744:EE_ X-MS-Office365-Filtering-Correlation-Id: c1bd4ad4-37f8-42d3-9b0e-08dd70415e4b X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: gKr+s00F40x1Vl0y4WpJUvVjUljZ7rnTwZY9QFZBY7REPx1wBwu5qn629pk6tE4B3dr7m4T7eF++EiVsyLzv5W703BfY5oEwyLUbEEH3XdtWNpYAQdnsh7cvK0x+VBp3hE3qD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0r2CydIVFekPzRWtmh/f/0QFg5DXe1z8t6Jye3A/bhvvcDUt5RM7U4CvNnGwyxIE8Ha0ptnlIIb+J/SZw+4UVb+Nv9vlgGC2S1MlDoRanfHonS7f4r+A80ZPbgeDjTBasMAlw28LLtHtrK0fKOC0CW1pHs1iAamazxGla5lOPrT0+TkH+c1KgmEx2+n6fDY7XmHD5TZcYC7ja2icxghhp5hUyd12YGFbCVgt8LgLoouHdT+0UKu+cq6Wv4HIcXJKVdc6pIIdM2KDl X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: cAAj9TqnUMjet1Q3xO+aJsbUsY7BPHp1LjrJoKRrYQhvyGsOlGjcpIvE8088fwQjQ9ggFwkeecFnE2SIHamjRBIrYNl0YWUYzvDTbp4BZVV8xIG0F589TKH30BDt7j8xvcBBB23Ce9GegfR3M7692WpA+odDAMEiZWrzYFMJG2/sczdK4vpV56EYCdLGdHgMrBoaesx1fNaBo2UAx8pEYVzuh+ntpeG9FhzV5Ol1HFLJ5T0J92LNGJbO13/BAoYg8+iFzi4hzRRWpno8lW3MU6JH64zFsmPCEPBaHOj7+cE08XHWJ8o8B60EnrG9UX1SFV0GHfhM+OXRmkDAqt2ecT/sGNqLbymYba+CKJx0vfEWRKErh9UrvNOLSl0Ly8xwwaJlcF04xv2IQtsQavqOjPU5P4tdoHN6QwoKA/gAUeoz7a6AttBV5GuHX0WiEBnD1C11kXuX7n4iHERi93o43a+qZ0SPCH9w+Mhzmr+D0NvW3X6V57IGDQDj8dwMYrudohxEXTlCptwBXAtTjqCXzbaqwozULvGWLArfFAgTFVDmUpCQRFUfrYxidsc1KveYf4xIf55664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exchange-CrossTenant-Network-Message-Id: c1bd4ad4-37f8-42d3-9b0e-08dd70415e4b X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:47:01.7156 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kZ2C5SBzUH7Lq/G1FKmEhrlD/hXsToNuUav1NEqod8fM8KoKxVjOaPPIZDZa0xXIjzCaqzdiVsSKFUlhWTmb8Cmloomnyftg2VKmZPe3IIxYOdkicQ/HkfomO6E/ufoQ X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY7PR01MB13744 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:47:11 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18418 From: Shen Lichuan commit 5e633f572bbae9397ee50347bbe0529894de4137 upstream. Let kmemdup_array() take care of multiplication and possible overflow. Signed-off-by: Shen Lichuan Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20240822061438.14617-1-shenlichuan@vivo.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 3 +-- drivers/pinctrl/renesas/pinctrl-rzv2m.c | 3 +-- drivers/pinctrl/renesas/pinctrl.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index bc671807bad54..4c111fb27845c 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -527,8 +527,7 @@ static int rzg2l_map_add_config(struct pinctrl_map *map, { unsigned long *cfgs; - cfgs = kmemdup(configs, num_configs * sizeof(*cfgs), - GFP_KERNEL); + cfgs = kmemdup_array(configs, num_configs, sizeof(*cfgs), GFP_KERNEL); if (!cfgs) return -ENOMEM; diff --git a/drivers/pinctrl/renesas/pinctrl-rzv2m.c b/drivers/pinctrl/renesas/pinctrl-rzv2m.c index c2845f6654122..32fa51abc2d3c 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzv2m.c +++ b/drivers/pinctrl/renesas/pinctrl-rzv2m.c @@ -196,8 +196,7 @@ static int rzv2m_map_add_config(struct pinctrl_map *map, { unsigned long *cfgs; - cfgs = kmemdup(configs, num_configs * sizeof(*cfgs), - GFP_KERNEL); + cfgs = kmemdup_array(configs, num_configs, sizeof(*cfgs), GFP_KERNEL); if (!cfgs) return -ENOMEM; diff --git a/drivers/pinctrl/renesas/pinctrl.c b/drivers/pinctrl/renesas/pinctrl.c index b741478003199..0cbeb70c1d7ba 100644 --- a/drivers/pinctrl/renesas/pinctrl.c +++ b/drivers/pinctrl/renesas/pinctrl.c @@ -87,8 +87,7 @@ static int sh_pfc_map_add_config(struct pinctrl_map *map, { unsigned long *cfgs; - cfgs = kmemdup(configs, num_configs * sizeof(*cfgs), - GFP_KERNEL); + cfgs = kmemdup_array(configs, num_configs, sizeof(*cfgs), GFP_KERNEL); if (cfgs == NULL) return -ENOMEM; From patchwork Mon Mar 31 10:45:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033469 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E170C3600C for ; Mon, 31 Mar 2025 10:47:11 +0000 (UTC) Received: from TYVP286CU001.outbound.protection.outlook.com (TYVP286CU001.outbound.protection.outlook.com [52.101.125.35]) by mx.groups.io with SMTP id smtpd.web11.48834.1743418026199439781 for ; Mon, 31 Mar 2025 03:47:06 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=ZR0Iykmd; spf=pass (domain: bp.renesas.com, ip: 52.101.125.35, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BrDuQEavcYAg44S5gxjQrm6vDKjpxqmtchl8oPxn/+dkioJk5HwlnVLv9naD3T6klmT3rlIcD+4vk4o0SpcJ7QMcZVr7oQr+r8b4voJfW1q6Ipi28jNVT/t2N7PW4yXIWPwSVEGu1nO8KNq9QOqI0auZXUlxnsh2+qlK1JnToLsxYXs5u6RG6fm8zxXGiIXxmeIl7q1aZgPgpteOu/otRBZfZzKKsqYSd2CxTgfaxLjWydy1Os/u8Vsr9Z1QlgutQoCIPsJwwOzayHW9O/637FwGGTjIQKOq7ctuG+2+apAUQIgLpp20OLaNHJAxi5FHU79QsU0lNwbEFgKr/JwRlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9vCbIkSPsmoLUXD1013TQ7PvfHEbj1UhhJ3Pf5W6a5o=; b=Ok7My5WHshnVvLpVMXXUGQ8ZgJJXi+Wt2Vt1PXgLYMlJObyWBcYrgqf6Z2LSEuijjFpyraJHq9tV00lnPA/Ow9OvYAwQ9uUoqLaetypf5kipecvwMpFYSAm2MqQrVEJ6i138MZ8gq1gGQGhcx3PkWG7rnSpLClY6MWnqqcWSE7AUTfk7h2/Pizck9WZVVPcrEF79i+mnv6RgfHAvWBFn921WP6mkNfOA6edEl7NHXid66pgVya+JjDJLfNzB+z1NCC2+E35Glx9FDmZEETT5Q3XRMjKe/nkweOIo/4e1FJ+J5KYWZq2nvHqAVw/JcUfFu43LRnFpxb6/XRQN5Duwow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9vCbIkSPsmoLUXD1013TQ7PvfHEbj1UhhJ3Pf5W6a5o=; b=ZR0Iykmd24kx16nCb+s7vwH5vkCVSTdMCOsc2KXtYiQmmu/j7LfK3KAsZ3BsicTuePlVjRkOzTnrPxn7T+R+g0OBr8aFwcrzwDsXMe5H4cJt7Zi+tsYk8YwcT5/HN+lP6Le5sz2+SwKZxF3QOmSp/5Hzw/o6SkBKWIbpACsOlec= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TY7PR01MB13744.jpnprd01.prod.outlook.com (2603:1096:405:1ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.33; Mon, 31 Mar 2025 10:47:04 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:47:04 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 31/43] pinctrl: renesas: rzg2l: Replace of_node_to_fwnode() with more suitable API Date: Mon, 31 Mar 2025 12:45:02 +0200 Message-ID: <20250331104514.79090-32-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TY7PR01MB13744:EE_ X-MS-Office365-Filtering-Correlation-Id: 98c3a648-f242-41e2-c169-08dd70416018 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: kYgYdzYvueA9oBtKCrwIgYYZY6bAyqXyC9QMixBcUWelWry05rBCujLMovb26ID8kRCVxP4ccTS0wV+TAmmj6dKMEImYJjpVrlSJaFiHcbXBfpbCV/7CliuQ09XiEPEpPdC+aaJ+nFFW8iz9nEkH5uhT2zYGhiOk5HC9BTQJx8xiG6MGjVBsiV4g7gYeZmS1KWm9960warv6hbf/efwn/IdoYAAzIm3GLakG1/2a5O4rX1qPcXJlM09Z7J7p/m076ygzfG85Kj78dAkEhqN7QfeuwTw9IzE/9hEA04YsXRpGUwoB2G+KYk/Z3dHc/QwY/4ml3K09t51HzIzIdZOstcy2OA6XkuVhehoR1zwmuS7YNTkE1gYq9xUsisPi0mnFAdG+QbbpLSZqfYffCOjFlGesgX5d01kpU2OMhgnNUdW/DPYymVfStd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ANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wIHBEsHhL11AGT8eVr8YVRzfBqYjcHVG49K1wOmuXwr2UkHxfvAcOf9ZlqOZySDaiePC9ed8OoVKpaXUWkxzCUrARgmWrzLPtLsPKgo8h8BZ0wqMIbIPqVgbQ7aL0D4iNjPyF5duK1lcUXzNu+7dX5epKfH8A0Org3IO1lXs/Yx4ezq6owMzjT/TJ9joH1t1oXjfvexv21vVKrWnhWlFXzIA7p2Eu7aUgyA76QVc4MkX5ImmfPSeJszgegTUwJt4qev27dU2wycwUcI3+7i414VE2kGOvPWdBhSOYu8JnALvJDigaGi/JXD+fVCmKzAMq7Y6sLKfPPIP85bsYNUDWsH1glCeHTAsBz870YgpLmgkkGTWbKSlEbUOYSrsCmTqgyEYWqmvO/Gjp4yX8FFw9X0lNbt+1lEZ3mxUziGfeZukS49d4eVlIW/vOZiAv//a0FzHAIOI+Su8NWvK7SFvJv+Vk8iFjFMdAxfgcTrXBGT/61lzPApcZLlz7r9ZdmoTanpvBpsjSXoJkXSiz35LgQngf8+Ysh2OknABN8CzVNIkhpxl42gn6BrA7VJXwhMMqIRoDPX1bokUecOe+zfapm2JyQ3WGKXmZMwpmCMDyC9qRaIBEuk+1BOGFtKBu2gv4SwJLg2XCsmJ6geicJ4qldrfUDdS7222r7ZxKXYu6isEj5pbkz8rU+R1f0iQR6YHEtoMAba0LmKb59dINWnyuWHeHycux7ypHDmUW6jpf3l842Kn0q23osnzqv5sJyfKwPHCXanH+bvGY1NvPOl4N0uzOobWFyME6H2h+dkPb+IbepecHUowp7GewBTIp3oAReJRBF5+UKvTCc17BIsXVSDG3DPbEkMYvwCnG4IaqMKbmFiC5p8BwQ1QFU3sWjrSfVCJ9fyO8oqFOUwffY4dpx/+xh8j6AXdLbalrqqJLKRHvIb6rQmOAej9qi/UqaCpY5zBD6ORz9HhkrUpW0Q3xuauf0CYxDaqpY6nlB5myRCVy34FgAEBzVrwbZkqe5uymXjomtNELFfxJ0B2tGHagZTnSLUgI6zp4nMhAI96w3Z5SD+1NTgUSb/Hwlq0lZt45Nk9/1uNqzwn8ZnI0bmpHin297KowcF0BhpQfuszhKuJH7oFGaeb8ffsMIIlITzEi47xlIZ0UwucvsSXr4sIOyChPj/UZZzJyqYpAiBjLHzYE18FvHQE2lqHOrInnQ5zFEZo3+DY1ziWjof7f1IBTNAKuKjWnHrZBGzlk55SAQjNiJg4QyjPkrpo54fGK7wiEdH+GIZXBU+MYjgtUpnqmNmoFr4m84xiQi5IDsLmSeH7mJYFdRE+zQ2s/4PsDxfe3LftRe5SbxZTVDsfdOgADjIyyUfDA9itYV1a6+MMjcGfLxz7TfOjZ0zebsvVESO5IKPlVbcK2sguwKzppFoNp/+wPptsiQ1MW7Ub5rMufvtL8U5lI37jbxqaN05w31FnBuaB7RaH9B+1lnAyzNr5Ppl9oR/cM9U11LQOZ93sB8XbObXftw7dpM8BKgFCGjPllNe1C+zSchXvyZTRWcKkCmkjqV5Mfu/n1uyIrP3X0Ac1yGXmWymD+ht2DFUhxRXhxJ4j4mBxgAiFz/VPxausejhatWikWlLjSGZLjZbhEv0= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 98c3a648-f242-41e2-c169-08dd70416018 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:47:04.5086 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: uMh3BzIxlPLpSE89O/UQ4KWTB0pfmLP3Wlf7dXzXVIOwR8GSH3LnIyGCRl6/JwzPXlA0H10DoPxL5O3EBZUh0r4m19a40Y+k3BMGcszdn84rTb7+buUQvd4JUdBlb62e X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY7PR01MB13744 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:47:11 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18419 From: Andy Shevchenko commit dad83b9527030e29cc3148f7274910cf40fe7f1a upstream. of_node_to_fwnode() is a IRQ domain specific implementation of of_fwnode_handle(). Replace the former with more suitable API. Signed-off-by: Andy Shevchenko Tested-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20240822230104.707812-1-andy.shevchenko@gmail.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 4c111fb27845c..bd739879055ac 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -2623,7 +2624,7 @@ static int rzg2l_gpio_register(struct rzg2l_pinctrl *pctrl) girq = &chip->irq; gpio_irq_chip_set_chip(girq, &rzg2l_gpio_irqchip); - girq->fwnode = of_node_to_fwnode(np); + girq->fwnode = dev_fwnode(pctrl->dev); girq->parent_domain = parent_domain; girq->child_to_parent_hwirq = rzg2l_gpio_child_to_parent_hwirq; girq->populate_parent_alloc_arg = rzg2l_gpio_populate_parent_fwspec; From patchwork Mon Mar 31 10:45:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033470 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E1F7C3DA4A for ; Mon, 31 Mar 2025 10:47:11 +0000 (UTC) Received: from TY3P286CU002.outbound.protection.outlook.com (TY3P286CU002.outbound.protection.outlook.com [52.101.229.46]) by mx.groups.io with SMTP id smtpd.web11.48835.1743418029168307384 for ; Mon, 31 Mar 2025 03:47:09 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=gzbFaKcF; spf=pass (domain: bp.renesas.com, ip: 52.101.229.46, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=n+uRD5TXL4gjsX3pRqos8EU8kS8Zg8AnLtRQCTgmWAo6S0HmP6PHkonSKmzqzmvgfErM/L0zDt1ffuuc183bmstNCzgmtgqYCsutbpkeBFVNk451YCn3RwHz4UkgxeuPJPS2/VAuJaet+d6NirVFPjoA6JgKkmTHZt6H4raelWeAb4IMj9U4Q1u83RHkHAkH/lmJ6fTi99Br29GFKzpmT49qzoi473QZ3F4AShDcYoWsT1gWM85FTd70k6dx9Iov8AUeA7xaFDD1GNSTzL29UKkQe1KGn4Xt0s+QBenhltPnPKkmKwitJygcpQ2XUuqexpw5soRVPePdKv1ZxsTaDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=i5G7D3ftyRAD6Kt0cWztWC6Z8BkNh1+ffXhDYo5oZQE=; b=C6G29lvcExaC18W0ndRcZDDuYvOAO06XM+betKhspGPGiPKqWqLM/HXM7FBZmebbm+YUsUbkHTBPTasTptRzNlnw2IrFl1f4OZb8N/k26aEfLDAP5XXCOsaSG53LvTYmZ7FFBSPBaSaFjZ1bRKd9cE+aJHYwhU0oTW4YsAd/3VgOBvB6sRwoJT/rP+dKe3mVMXK3Si/5jjMIA2LFv9bX943cmiMlBU3M+lw1hNP0fP7Df1lCQABSN8CfI3u+idYm/tC+Xo6xWWvj1UDgYvSihF1AnIUGPvXeQanWdp/6VnOWx/Ak+Xm5/J/Xto/PSQof4xRVRA1RHO/0kuJHeCNh+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=i5G7D3ftyRAD6Kt0cWztWC6Z8BkNh1+ffXhDYo5oZQE=; b=gzbFaKcFe6q1e0SyHnnDklXNKfVT5jEe4ltwxzCs+Nlqifo6yMaSEEPlBj7aTnmaGC8REdde3DduQ69rWExlTjLGgDPvTFSMkisctTY1GD77/sLSrgWDj63SVPXMTK7BNRIFwET81qNhfLSdCoo6lgyIpC+/E/ECjRyMnO/JA80= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TY7PR01MB13744.jpnprd01.prod.outlook.com (2603:1096:405:1ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.33; Mon, 31 Mar 2025 10:47:07 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:47:07 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 32/43] pinctrl: renesas: rzg2l: Introduce single macro for digital noise filter configuration Date: Mon, 31 Mar 2025 12:45:03 +0200 Message-ID: <20250331104514.79090-33-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TY7PR01MB13744:EE_ X-MS-Office365-Filtering-Correlation-Id: d67405a3-a5ff-488b-dba8-08dd704161c2 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: +mfB3fH7wnVt72Eit6dzO/zy0nXNfdi8rWz84OnYaEkRpoF9RjZCurWwUOs1aCcvcdkVHZJWU2CXdufyVaf+1k1QcA7bK25fflHdY2vomaDdDGRsEikrdiT18ipNMhHWJ39yamuT6ausN3vPK8zVPrw2Gyuc4nH23sqacIfRig5rAzZNW8TfAq/IDVpq+v8NhcNIfxQUzB8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CNM9MQuwAyFFs97T00rVl7ADeOu6vs6uP1igjQnm91e9L5FOaYV16zt5bmwUr4hePtoGNJleXgFFNBMLxUil5I1xav8cZ8wpcoOrHmq6nShVeooDOfv7Ym9MPMqAmvHpkLpJh2B6l1dGTjuH8gIonB/uvUfQQewCH7psD/bXehQ/8MOyOcTKX3Js7a0 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hPMYQ9SGmPefCGhLVrNZyCjf2sBRYYW+jP7rDTKBd4LDDia+JjKbCSNv20CPFBhBxN3dPSceaX+1xcCqLLYZZhE4lTrUscjYpBTTY7eUJFhrKJQpNG3+MK3WHedDKQO4TKSvoJqSxX1FVqwXTWd13yIjx9/OwsH6XHpV64UWDFv223KMhGGN9Rlhc0EVblR3+NFMrcMXPsiv1LfPbjzPcdvcIzxNK87JqpzXH5KqQu1tx8mRl8fZr9gzF51B8HjZpZMPkbQKIzMoC5hAPwkTuDkfaXMxKZZ8pQh7m0KhL9yJ6+PSWJOjBA3Y0irfOrx933uw5LipP/wNgeDDPoGkyq1naKWF5O7JCYICJxOFfctHuK8rNpexoK+7pH2LpBN9YPrhYo+sd/54ADD845SwxOK64AlTc6c3fzpSdmcsCVMAZUH62JUYuaApsHHvrOVVgjMIuHKrWiVg4Gw/dtuw7zfS+lXWdzKZlYTzOsQUm0bUk4hIao9XlF1x1oYo8DVDs5PAQhmfQVcKPNpRVtegAguDzic3i0XyEVyn98vzOHvroDyBQnaeNayZ1IhZIdt20R4hilm4n3RLHDntiNcgBsCokQzD0Lg+TBUxaKclVNwl1UkefQZ9ulWQ7IZ2VTfbKne2d9lhn32SujPcBh9a5VIhfj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-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:47:07.5099 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9/Xv4ODDUPZe6SRPkGMWzw8yNAggZZbxuKVG4T/FxvsPKQTv4yEZ85JTtP/VfF8S+Mad+YEOjdVj+UgXuifNP2dLc9QuorXu4ProhonG7s53mdZ9eGHoJpRLAtrHD6Cl X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY7PR01MB13744 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:47:11 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18420 From: Lad Prabhakar commit befcded23454825ca2cc4c24626b68c75fcb1528 upstream. Support for enabling the digital noise filter, and support for configuring the noise filter stages (via the FILNUM register) and the sampling interval (via the FILCLKSEL register) are related: a pin supports either all or none of them. Hence simplify declaring digital noise filter support for a pin by using a single feature flag instead of three separate flags. This patch removes the PIN_CFG_FILNUM and PIN_CFG_FILCLKSEL configuration macros and renames PIN_CFG_FILONOFF to PIN_CFG_NF. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20240829194841.84398-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 52 ++++++++++--------------- 1 file changed, 20 insertions(+), 32 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index bd739879055ac..d5249955c9a49 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -51,17 +51,15 @@ #define PIN_CFG_IO_VMC_QSPI BIT(7) #define PIN_CFG_IO_VMC_ETH0 BIT(8) #define PIN_CFG_IO_VMC_ETH1 BIT(9) -#define PIN_CFG_FILONOFF BIT(10) -#define PIN_CFG_FILNUM BIT(11) -#define PIN_CFG_FILCLKSEL BIT(12) -#define PIN_CFG_IOLH_C BIT(13) -#define PIN_CFG_SOFT_PS BIT(14) -#define PIN_CFG_OEN BIT(15) -#define PIN_CFG_NOGPIO_INT BIT(16) -#define PIN_CFG_NOD BIT(17) /* N-ch Open Drain */ -#define PIN_CFG_SMT BIT(18) /* Schmitt-trigger input control */ -#define PIN_CFG_ELC BIT(19) -#define PIN_CFG_IOLH_RZV2H BIT(20) +#define PIN_CFG_NF BIT(10) /* Digital noise filter */ +#define PIN_CFG_IOLH_C BIT(11) +#define PIN_CFG_SOFT_PS BIT(12) +#define PIN_CFG_OEN BIT(13) +#define PIN_CFG_NOGPIO_INT BIT(14) +#define PIN_CFG_NOD BIT(15) /* N-ch Open Drain */ +#define PIN_CFG_SMT BIT(16) /* Schmitt-trigger input control */ +#define PIN_CFG_ELC BIT(17) +#define PIN_CFG_IOLH_RZV2H BIT(18) #define RZG2L_SINGLE_PIN BIT_ULL(63) /* Dedicated pin */ #define RZG2L_VARIABLE_CFG BIT_ULL(62) /* Variable cfg for port pins */ @@ -69,9 +67,7 @@ #define RZG2L_MPXED_COMMON_PIN_FUNCS(group) \ (PIN_CFG_IOLH_##group | \ PIN_CFG_PUPD | \ - PIN_CFG_FILONOFF | \ - PIN_CFG_FILNUM | \ - PIN_CFG_FILCLKSEL) + PIN_CFG_NF) #define RZG2L_MPXED_PIN_FUNCS (RZG2L_MPXED_COMMON_PIN_FUNCS(A) | \ PIN_CFG_SR) @@ -84,10 +80,7 @@ PIN_CFG_SR | \ PIN_CFG_SMT) -#define RZG2L_MPXED_ETH_PIN_FUNCS(x) ((x) | \ - PIN_CFG_FILONOFF | \ - PIN_CFG_FILNUM | \ - PIN_CFG_FILCLKSEL) +#define RZG2L_MPXED_ETH_PIN_FUNCS(x) ((x) | PIN_CFG_NF) #define PIN_CFG_PIN_MAP_MASK GENMASK_ULL(61, 54) #define PIN_CFG_PIN_REG_MASK GENMASK_ULL(53, 46) @@ -394,13 +387,13 @@ static const u64 r9a09g057_variable_pin_cfg[] = { #ifdef CONFIG_RISCV static const u64 r9a07g043f_variable_pin_cfg[] = { RZG2L_VARIABLE_PIN_CFG_PACK(20, 0, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_FILONOFF | PIN_CFG_FILNUM | PIN_CFG_FILCLKSEL | + PIN_CFG_NF | PIN_CFG_IEN | PIN_CFG_NOGPIO_INT), RZG2L_VARIABLE_PIN_CFG_PACK(20, 1, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_FILONOFF | PIN_CFG_FILNUM | PIN_CFG_FILCLKSEL | + PIN_CFG_NF | PIN_CFG_IEN | PIN_CFG_NOGPIO_INT), RZG2L_VARIABLE_PIN_CFG_PACK(20, 2, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_FILONOFF | PIN_CFG_FILNUM | PIN_CFG_FILCLKSEL | + PIN_CFG_NF | PIN_CFG_IEN | PIN_CFG_NOGPIO_INT), RZG2L_VARIABLE_PIN_CFG_PACK(20, 3, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | PIN_CFG_IEN | PIN_CFG_NOGPIO_INT), @@ -431,7 +424,7 @@ static const u64 r9a07g043f_variable_pin_cfg[] = { RZG2L_VARIABLE_PIN_CFG_PACK(24, 4, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | PIN_CFG_NOGPIO_INT), RZG2L_VARIABLE_PIN_CFG_PACK(24, 5, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_FILONOFF | PIN_CFG_FILNUM | PIN_CFG_FILCLKSEL | + PIN_CFG_NF | PIN_CFG_NOGPIO_INT), }; #endif @@ -1887,8 +1880,7 @@ static const u64 r9a07g043_gpio_configs[] = { #ifdef CONFIG_RISCV /* Below additional port pins (P19 - P28) are exclusively available on RZ/Five SoC only */ RZG2L_GPIO_PORT_SPARSE_PACK(0x2, 0x06, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | - PIN_CFG_FILONOFF | PIN_CFG_FILNUM | PIN_CFG_FILCLKSEL | - PIN_CFG_IEN | PIN_CFG_NOGPIO_INT), /* P19 */ + PIN_CFG_NF | PIN_CFG_IEN | PIN_CFG_NOGPIO_INT), /* P19 */ RZG2L_GPIO_PORT_PACK_VARIABLE(8, 0x07), /* P20 */ RZG2L_GPIO_PORT_SPARSE_PACK(0x2, 0x08, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_PUPD | PIN_CFG_IEN | PIN_CFG_NOGPIO_INT), /* P21 */ @@ -1896,8 +1888,7 @@ static const u64 r9a07g043_gpio_configs[] = { PIN_CFG_IEN | PIN_CFG_NOGPIO_INT), /* P22 */ RZG2L_GPIO_PORT_SPARSE_PACK_VARIABLE(0x3e, 0x0a), /* P23 */ RZG2L_GPIO_PORT_PACK_VARIABLE(6, 0x0b), /* P24 */ - RZG2L_GPIO_PORT_SPARSE_PACK(0x2, 0x0c, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_FILONOFF | - PIN_CFG_FILNUM | PIN_CFG_FILCLKSEL | + RZG2L_GPIO_PORT_SPARSE_PACK(0x2, 0x0c, PIN_CFG_IOLH_B | PIN_CFG_SR | PIN_CFG_NF | PIN_CFG_NOGPIO_INT), /* P25 */ 0x0, /* P26 */ 0x0, /* P27 */ @@ -1975,8 +1966,7 @@ static const struct { struct rzg2l_dedicated_configs rzg2l_pins[7]; } rzg2l_dedicated_pins = { .common = { - { "NMI", RZG2L_SINGLE_PIN_PACK(0x1, 0, - (PIN_CFG_FILONOFF | PIN_CFG_FILNUM | PIN_CFG_FILCLKSEL)) }, + { "NMI", RZG2L_SINGLE_PIN_PACK(0x1, 0, PIN_CFG_NF) }, { "TMS/SWDIO", RZG2L_SINGLE_PIN_PACK(0x2, 0, (PIN_CFG_IOLH_A | PIN_CFG_SR | PIN_CFG_IEN)) }, { "TDO", RZG2L_SINGLE_PIN_PACK(0x3, 0, @@ -2057,8 +2047,7 @@ static const struct { }; static const struct rzg2l_dedicated_configs rzg3s_dedicated_pins[] = { - { "NMI", RZG2L_SINGLE_PIN_PACK(0x0, 0, (PIN_CFG_FILONOFF | PIN_CFG_FILNUM | - PIN_CFG_FILCLKSEL)) }, + { "NMI", RZG2L_SINGLE_PIN_PACK(0x0, 0, PIN_CFG_NF) }, { "TMS/SWDIO", RZG2L_SINGLE_PIN_PACK(0x1, 0, (PIN_CFG_IOLH_A | PIN_CFG_IEN | PIN_CFG_SOFT_PS)) }, { "TDO", RZG2L_SINGLE_PIN_PACK(0x1, 1, (PIN_CFG_IOLH_A | PIN_CFG_SOFT_PS)) }, @@ -2097,8 +2086,7 @@ static const struct rzg2l_dedicated_configs rzg3s_dedicated_pins[] = { }; static struct rzg2l_dedicated_configs rzv2h_dedicated_pins[] = { - { "NMI", RZG2L_SINGLE_PIN_PACK(0x1, 0, (PIN_CFG_FILONOFF | PIN_CFG_FILNUM | - PIN_CFG_FILCLKSEL)) }, + { "NMI", RZG2L_SINGLE_PIN_PACK(0x1, 0, PIN_CFG_NF) }, { "TMS_SWDIO", RZG2L_SINGLE_PIN_PACK(0x3, 0, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | PIN_CFG_IEN)) }, { "TDO", RZG2L_SINGLE_PIN_PACK(0x3, 2, (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR)) }, From patchwork Mon Mar 31 10:45:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033472 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8806CC3600C for ; Mon, 31 Mar 2025 10:47:21 +0000 (UTC) Received: from TY3P286CU002.outbound.protection.outlook.com (TY3P286CU002.outbound.protection.outlook.com [52.101.229.39]) by mx.groups.io with SMTP id smtpd.web10.49088.1743418032272919449 for ; Mon, 31 Mar 2025 03:47:13 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=F27HlM7K; spf=pass (domain: bp.renesas.com, ip: 52.101.229.39, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YVtTQBkc9jEy6sCURU4s0IkDqhXrZzYOKEz9eGupiEtcKzq7P1jdHUQwPJmN25J8Ba7UDv1tHyaetWTTBk0B2eJICQkKXSeRlSJpngC2fovqty4PQq1UBulx/xa4W3DJQdfDF+2NF2sTkTMxoOcBkQrxP5O+uy7ffkhqi6k6okQN4iFyiKlTMMyn1qHK0fzCsGD3p9B2SCMUuHk++bdAg+g8aKeoklE1rR8T7FqBotusCTs6jeJ6hqZvgzwTz7XU4SsTcDnWM9L+4joQIaTp1P1RhXAqo2zMfbkE0gxpfFnfoEj8XvoAduFIa38tKyKEDLs3YYzuuansJTN5vncJeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Pyj/XLvPxG+Vfbycj5J5+000vwlK6K+mpGRz2pk0VdY=; b=Zp/4LM8pbH+4ppXmLXKTs+mz0HLlZJfSuNQxtkjxriSeGDgGUELft+82EMQGeWUnSNAKwsiJBGw1d8JHY/ZWbSlARe/4ZcpUiWQMSVky0CrOLzTSgbHnivrsYVPXoBkMyRbNzyMb2qyW8BxWWf2PXK/h2kBNMRv+jZp2EBC2FSfNdTHVeBTOH8L7EI3Bszx437ecu88t1KpQptxapicAH2k7lD75M/DWVgXiQYjHaUmQj6XHh6yGG3np08cAyfKMZcXTHqxS0dwrwY0N4G0VWy2tgHZTnhbYKVEeyBO8GzMtAdtl8zF+SFnQYIyXDfQwWhNytGsfQgObDuyGdmoKMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Pyj/XLvPxG+Vfbycj5J5+000vwlK6K+mpGRz2pk0VdY=; b=F27HlM7KV8LfGasaTi3e8z4+SB6pdpCZH9rzmzepxRzfD/6s4qNIu31xbhz+Or1lzXvxCQLEZ5LILxDZcvlCpZECzex5yxGcTzSBytaBDUunwb7lcOEMK69guqhdjuQt0XoxqRBioEKyMFbisrBDBc/NcJasChpICMq4K5eOjSI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TY7PR01MB13744.jpnprd01.prod.outlook.com (2603:1096:405:1ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.33; Mon, 31 Mar 2025 10:47:10 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:47:10 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 33/43] pinctrl: renesas: rzg2l: Move pinconf_to_config_argument() call outside of switch cases Date: Mon, 31 Mar 2025 12:45:04 +0200 Message-ID: <20250331104514.79090-34-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TY7PR01MB13744:EE_ X-MS-Office365-Filtering-Correlation-Id: 99cb3db2-17fe-451b-7621-08dd7041638a X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: rzziHA8rnvSPGXF+DkjwivAOniYgrp/QUY2/M7sxVE0TITWqF8nay2k0nhDlLSUZRrNLxClp5NQSIZlttqJ6O14uKqR0X+VO2hO8RWagqsYCpdUfDD5i6bJPgyt2JsEYXPvqwmCzctMdTbapJ07bPJIYhBWvNTUASc8V21sx8lQVzaCHtIrvtJaRBHRsGKBBf2/JVMFDtHhfwyCO/VIl49tqCX9yQ4bX5NpVo7V+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dBGmZ89n+qXAkCj9SklXUuO5SaEbVBycr/wsBOCf3Lv4FiF9EkP8YQtDaEznnSpvIrOgIaniZxu+UgyZ5dRsIreRGAktkn+zvOYX1KYiA5ZWb130p3e4/h3fhwZCxlggL5CJyvZO7ObYaw0/ZKLsfAl X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: CR3yWiNc0Ux0BAe8okayL6AlX0A7+1xubQ/SD2KhkZkUCPWqhA+xzP3sGxi6vcYbK5eKyCmmbRnTCMzdMSJ8QcFdvr/vv7NUSMMvGge+cCzjit8oQGcoH+8+FOirQgVoHCrAkdLYVYbcE46RW5mg4q54xAl2hJodEh+3x4gxNasLkrqjjN8SC59xrLIVg15xU7+R5OPLal1dirt6WgaUcZwHF7DQYnYsZN8j2JE84w62FDE8FCwH686yPJyA8fM2R+hdGu1WoQTUH+68Y5zXZZi8onq4G5Mhzv+UVtE7H041jRDUXeJekU4l5B09mmA0L2u1G9nzZD3EJzRQ6NP+d+grYKcX514m8xZq3+BujMljXfuvpKOEpzoxSupPXYGTo+bzJvXsznmzfo5tkj/9oQUwVH4EH1Hd6n6OLdS+RNiyd32SIddnu8QQicYcJrCEDPRQ1OGRKTQuB12yLitfHnVv5SMPTT8BGXQg0okAwJ0o9TGJFK8GrpX+wtEh6n8ExjFa/SH3gDU7B2wO6hkgzIHDyUEgZ8SnLcJ3w7WYsDQJzwee6Ze0r+xosHl1VFyGzqjl6gF/RAPVL3tzmYl4IpDsKLAlOqq4+OmEVeaP67qOM4+UW0xmsai6cw43O2hrVt1IAMu0tsg5/U8bsINtfrC+mV7LquALuJzqm0CcO1T2aaKYiL3FhFGMYdAPdwntMNNOR7WbIR+ZOFHkaCZi3CEunXQg/SXnapXogMU5wfL1yYK5E9fzQeogxvgetU7XpknrmWQC5hGaR3WBrker39m7FDNL5LaUvfK7Rvwx8kUAcbh2Vj2nUsmS8sq6aR495QZIwFVmeWZKMNVQYWeKcKxKhHa5IiwYke2+KVIGt7GmWLupVFm7NtqrK4LE+hB+NfYNqXQq+FZjvLtgJBBa04cz7KabwWQ5fpseXWXvVqGE7OoL4w3OuMTDwxRK/1725jW3MXtotkPEsltLBSD7xQ/aJC6xh2PY8Ndf2NscN/s0kfrw16drE2evtgTqYJoKShg1rFAc+5pQQZA4ZusRKzwC0WCYEkGs1R+7H8boEYD1hX3qYtYhkqkA50QbuajqwoxgbQIqbUsQUCM1terAEVIC0bkCABe+HQiIWe8vXZ5M4D+KdWsmB0iVbSGjLL63502MSP4Jufr6G8r5Rmhm1d5o8p2qXM+0Vn1ozzihm6aqFh+ChpKbSIYjrdF8oWjjU0UwYrCx6QUyj1mimVGe3qKeMIzj4RDUn7JN89+UpHyl0cf8wW7KpL7z9giz4jVPE1EDCkRnWasrfkXpDy8p8RXGJaQ8Yoec+l7watL0J7sN7M7HXskewXkfnRrX07T09SjkCtU1VtVHb1u7KcnoF7jwqwC2UpZZbYwYAR43Ex9NuUEEiE+jZl1KbPWi/mFZFlch2TrpKqZ+YuVLdZgaC9w33ArXEI6tktsE3UnaPuV4y/Rlv/YAkxCM6GHKIGq7vz0AgXykrLKpC8YN+ysShG4SImImaB5XwYbcMoaTaIBWPycsvQ9O04ggidapXVlbEvs/5BJin0izq58XK8jbZHeuBxpts1CoXM0wK8d7ltHNfWxsF071jFPewNjk24J9cl30KSS+7a8kcOHYh12Rqb735UHr8SUdOehVsaFKD64= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99cb3db2-17fe-451b-7621-08dd7041638a X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:47:10.5406 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: X0bDZ/JcS8sOew9n6LzTNU35K7P/4vrlE0uqieauGNydz2BVRgXqx2s99bMGnmmbSF2qUwfLgMs3Y1unyGq78Tire5UAy+G1xK6fh2EIYxZjX3x803sG6LxhEed7JCpt X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY7PR01MB13744 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:47:21 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18421 From: Lad Prabhakar commit 1325820dd085809645bdd89a2fd408a05b4a5492 upstream. Refactor the `rzg2l_pinctrl_pinconf_set()` function by moving the call to `arg = pinconf_to_config_argument(_configs[i])` to the beginning of the loop. Previously, this call was redundantly made in most cases within the switch statement. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20240829194841.84398-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index d5249955c9a49..5919a9c441be9 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -1385,9 +1385,9 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, for (i = 0; i < num_configs; i++) { param = pinconf_to_config_param(_configs[i]); + arg = pinconf_to_config_argument(_configs[i]); switch (param) { case PIN_CONFIG_INPUT_ENABLE: - arg = pinconf_to_config_argument(_configs[i]); if (!(cfg & PIN_CFG_IEN)) return -EINVAL; @@ -1396,7 +1396,6 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, break; case PIN_CONFIG_OUTPUT_ENABLE: - arg = pinconf_to_config_argument(_configs[i]); if (!(cfg & PIN_CFG_OEN)) return -EINVAL; if (!pctrl->data->oen_write) @@ -1407,12 +1406,10 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, break; case PIN_CONFIG_POWER_SOURCE: - settings.power_source = pinconf_to_config_argument(_configs[i]); + settings.power_source = arg; break; case PIN_CONFIG_SLEW_RATE: - arg = pinconf_to_config_argument(_configs[i]); - if (!(cfg & PIN_CFG_SR) || arg > 1) return -EINVAL; @@ -1433,8 +1430,6 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, break; case PIN_CONFIG_DRIVE_STRENGTH: - arg = pinconf_to_config_argument(_configs[i]); - if (!(cfg & PIN_CFG_IOLH_A) || hwcfg->drive_strength_ua) return -EINVAL; @@ -1454,12 +1449,10 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, !hwcfg->drive_strength_ua) return -EINVAL; - settings.drive_strength_ua = pinconf_to_config_argument(_configs[i]); + settings.drive_strength_ua = arg; break; case PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS: - arg = pinconf_to_config_argument(_configs[i]); - if (!(cfg & PIN_CFG_IOLH_B) || !hwcfg->iolh_groupb_oi[0]) return -EINVAL; @@ -1477,7 +1470,6 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, if (!(cfg & PIN_CFG_IOLH_RZV2H)) return -EINVAL; - arg = pinconf_to_config_argument(_configs[i]); if (arg > 3) return -EINVAL; rzg2l_rmw_pin_config(pctrl, IOLH(off), bit, IOLH_MASK, arg); From patchwork Mon Mar 31 10:45:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033474 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90805C36014 for ; Mon, 31 Mar 2025 10:47:21 +0000 (UTC) Received: from TY3P286CU002.outbound.protection.outlook.com (TY3P286CU002.outbound.protection.outlook.com [52.101.229.35]) by mx.groups.io with SMTP id smtpd.web11.48839.1743418035632409241 for ; Mon, 31 Mar 2025 03:47:15 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=eqtOA0aG; spf=pass (domain: bp.renesas.com, ip: 52.101.229.35, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vmaKhHGjdRtzFKpm94R84xsHzkjfS6zfXxaQ3Bn5UrkCsgzVZtaCTmph+sf8IdTlc7JoY5LxjOHiGHaPnxYIt9Xzwl5BJqUuKIIOFihkLlukD7dW4dIElD6e5TFJb22EYAKSCJpZvDgZnosz/igVEKcNFqIEXbAU+Ivp9qMykyEQePbE9N0JJ+B8wskXA3WEAn+YHNG8zR4Hm7wpBenylVzWDfqLia1rsUsbTel3q5PP5kp+8y8J2rbcdCbfEu5Jekp0C7fUeG9GVoPX7krcM3uqgFX9Uni3aS//mq8JGdXcHjj2x3giB60Nga+xB2GArd0IofkGygJm3IX0NYybZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CbsXovNSlnDQr2TLZDgxbiaHxK6EROaScwpRo1XF9CY=; b=CsV4dfb69xCXXZEGQzCqKJ7y+fjZ2I8GrRrIUZu7wer+zxsxzezfC8euVtGkIFyZ1sC2jpLAV81vO8vlXtTWS+aV6edSLkuEfnx3nlgpHab45G8A6SXiGEchGDLtLsd7/G9MuYUgr4MTZ0UYqXshp3liXJQkKVfdjgdIA0gE0pRG2VWK2RMWaGoswruyeybow2NuhRNHP6xpiRFMHSyUz7ziTthXQfH3SGc6BfIZxGRShE1sROiMLHPjmdShh07b4oQCtMco4R7RtL0HRpJ/CEvGRtm/ql47FZ+77Rm8TKoOcdMb8toPsrgkR1KLH2WrDuxcod7I1wOEznHPBDeGsg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CbsXovNSlnDQr2TLZDgxbiaHxK6EROaScwpRo1XF9CY=; b=eqtOA0aG4kDrmtw67M0RPijjZDHlNxrWwks8WeqXs/SJc5osSaZsOVLes2lAEnKHaOC2cJvsoWpj6eabEug2+XI75phv3OdMYxnNPofenjS6JSgF5D1hbIWlwoMI1aeLIkJutfm3W3K/jfKpjqiRI8OIJROvyJJBACNbD17tDTE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TY7PR01MB13744.jpnprd01.prod.outlook.com (2603:1096:405:1ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.33; Mon, 31 Mar 2025 10:47:13 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:47:13 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 34/43] pinctrl: renesas: rzg2l: Remove RZG2L_TINT_IRQ_START_INDEX Date: Mon, 31 Mar 2025 12:45:05 +0200 Message-ID: <20250331104514.79090-35-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TY7PR01MB13744:EE_ X-MS-Office365-Filtering-Correlation-Id: 1c47a589-4206-4535-f035-08dd70416573 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: g/EqO4kK4l8+qX/VpNvDjLyC9ZL5hvN8dFyOh8pyoF/MvEYaSCsMYtEqdIFgG/jZG5Z4KXqjU1RmHJU1hDN7VleL4Enpk4UoABnimET9VkUDT8HedcJe+EaABaUUJ5K3fqIITA2tx8Rgd1TY0mrXO18NB9u5C1r331F255B4FQfRvxLORPOpt3498jz8nA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SA0J3Ri9C2/Ox2YzMeqECjsLE4q27BLxk4AyddXCuvzX961yF16IqiBs1SRHEQIA5UTVY/WSaN3pm60E7yOKAMcd5ZEl1H+XirfqaGzNOsOFi3C6tYEfQhWS6GV9ZS9I4N7dN68cGtVxTb+uTRjCAu9JND/sIm2BULunZsr/DHL3t7NsVG30IYwuZSdJS9JCK24Wgb/9y X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZXPzRE08GcBYoMZmGBeZtBZGrkNO4z4ShaLC0uFYFUPy1Jn8DOlZJ90Nbr+HV6atcX2T8b4ATQAEWHnXHuNdLWv15GkZUVCc7ajt8y215qaZ2GBRSRih1LiN76yoD8ul9X6S4ZoM98sV6ryFAQ3r4Kh6NBhrAIh0nib3Dg6cYG2bNv4YxYnsHEMPWVFEgqBQK9UfTeENVkOd1fVJrQSwCE6uw86r0EhUiD1dxes81D+dsI1bkDIhVnbBLyfeI/l1U6ILcGzr4wo857P4EZWU3Gzkuh5aZ5nbvauAwTB1iQ7AQhKacNywXioU7t3vmHxSBv+FJclm0C6E/iio73Ku5p4l3YUJhgErSL9kiYsntoOb3NuSCVBThUkfE6uHn+7bP1Eo1wfo7il50eJuklFCdlL51753lWl5HnYIGz90z/lLLt23YDE3JipfJ9NdAf1uRDeo2vtv+Wxyvl0HCq5ngIezJ1P0RdLwOoK0EsnKBOTzBrLyOCElBKo6Ci8VINRANTeQ8c7C7FcAMlof4fJOvq6EcvApjt522xqakx9HNk16ZOhefWgxuZyDnkaRh2jqPTCfkYBhOsTBpghLL8hEklvU+PtCXfhrVaoxb4uC72ocNq9S4P2Pi3uTbiIJ6ejtU/Tpyq37g9aitch8oriD1aQIkSo9N53eTVQOxPxTzsvFaiss1bqyI5+9hQzP18MguEcAHIScjFvFo96A7iCL0J4HOWu0b0yftMfuxxJ3oOlvE2opj+C3H+3/MQh1Y2FRFYzGpj8hYMSTmo4Pxozo2qCr27qm+ShqgWBAGKrG62Fh68lHVls8E/gZzTwWFVpnyJhRtWv1KyGOS+icM2TXQfuXBmITf36kpiNVBKZ4LQYdCNajphoCEDqvPJ65FBFjPYD7Nl3lMmuFI71nKrtLmDAw93k7T17TWFy5wmqre/InAWlDM4M3bmQEOrIt7MuZ7Y1LesxDPo9RQKg2hyU4uqDXnAGxwBIpvzUa9f2GmIYSZ5PXAiT7Up577WLvs+joWVX5jj5fzGfAXMHs7cEEvLPcdCQZz8sRbUSQS4awhRFhnpCTdYtnDmlRG0tMWrHB8YI834sDgKvdW0WeBcRwK479AuECigvT0AHA71pY06sjF/qAyjNLFVYtRSYN2O5xgS+U/7i5EiKL1J9Y52aR2knTxSllKEzxqO1v39GAHKRSHLk/rbhdPbJlMq6UGZs21SlM8LelCbZFZs+fPDQ6q3BVOzw+A68pCQaWmTe4XT9HuhUIIJF4ZjHjPE1Rxik49n77E86TZu3dBQtywuPH/K53yXdKL8f9nTDI2HFI1s8GeGzI/jleH5aqKEqphhwgXoP7DjW5Qye6GftF2CexfpSUQONLQOIPHJyR2++8cbxu7hqhqeYRExwr7T73oUj/xQRFzxMKMYMIlbudgcLeGRzUR5Er/0wTBb26ygX2XS1uHXOkTY8cviBh6seSHS4LaV74GelV9NncJ68Ocpf0JjdMWCPJuBfx/P7QeDGvqDhfQ2qPFSLUpM3Vs9BgvXNH9stD3XzhO6sReTFgcuTb+nZd1kTvmxRziKJjHTjXkE7ukNGbiL3/OsmRwOFOMCffSWVyz+76aDof1Bm8nfMk4R8w7fYJgooD+tjYc9kIHQU= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c47a589-4206-4535-f035-08dd70416573 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:47:13.7508 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: eftg9l9dGLiDc1WLPXbslhgoKj+O+and8d3Nh36WeESzdNDpZF64burJKtU2vFJx+cXlVX6DwKqsw5X2OYQZG+Z8/Hxv23Eovwdqc6I/+p6cOubvKvvlBZTDxj7G2eR4 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY7PR01MB13744 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:47:21 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18422 From: Fabrizio Castro commit 1d930d4bf8e68c2a7122a6d0899a99f0370c45b1 upstream. The RZ/V2H(P) SoC has 16 IRQ interrupts, while every other SoC has 8, and this affects the start index of TINT interrupts (1 + 16 = 17, rather than 1 + 8 = 9). Macro RZG2L_TINT_IRQ_START_INDEX cannot work anymore, replace it with a new member within struct rzg2l_hwcfg. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea Link: https://lore.kernel.org/20240930145244.356565-2-fabrizio.castro.jz@renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 5919a9c441be9..4ccdcb1457045 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -167,7 +167,6 @@ #define RZG2L_PIN_ID_TO_PIN(id) ((id) % RZG2L_PINS_PER_PORT) #define RZG2L_TINT_MAX_INTERRUPT 32 -#define RZG2L_TINT_IRQ_START_INDEX 9 #define RZG2L_PACK_HWIRQ(t, i) (((t) << 16) | (i)) /* Custom pinconf parameters */ @@ -246,6 +245,7 @@ enum rzg2l_iolh_index { * @iolh_groupb_ua: IOLH group B uA specific values * @iolh_groupc_ua: IOLH group C uA specific values * @iolh_groupb_oi: IOLH group B output impedance specific values + * @tint_start_index: the start index for the TINT interrupts * @drive_strength_ua: drive strength in uA is supported (otherwise mA is supported) * @func_base: base number for port function (see register PFC) * @oen_max_pin: the maximum pin number supporting output enable @@ -257,6 +257,7 @@ struct rzg2l_hwcfg { u16 iolh_groupb_ua[RZG2L_IOLH_IDX_MAX]; u16 iolh_groupc_ua[RZG2L_IOLH_IDX_MAX]; u16 iolh_groupb_oi[4]; + u16 tint_start_index; bool drive_strength_ua; u8 func_base; u8 oen_max_pin; @@ -2379,7 +2380,7 @@ static int rzg2l_gpio_child_to_parent_hwirq(struct gpio_chip *gc, rzg2l_gpio_irq_endisable(pctrl, child, true); pctrl->hwirq[irq] = child; - irq += RZG2L_TINT_IRQ_START_INDEX; + irq += pctrl->data->hwcfg->tint_start_index; /* All these interrupts are level high in the CPU */ *parent_type = IRQ_TYPE_LEVEL_HIGH; @@ -3034,6 +3035,7 @@ static const struct rzg2l_hwcfg rzg2l_hwcfg = { [RZG2L_IOLH_IDX_3V3] = 2000, 4000, 8000, 12000, }, .iolh_groupb_oi = { 100, 66, 50, 33, }, + .tint_start_index = 9, .oen_max_pin = 0, }; @@ -3063,6 +3065,7 @@ static const struct rzg2l_hwcfg rzg3s_hwcfg = { /* 3v3 power source */ [RZG2L_IOLH_IDX_3V3] = 4500, 5200, 5700, 6050, }, + .tint_start_index = 9, .drive_strength_ua = true, .func_base = 1, .oen_max_pin = 1, /* Pin 1 of P0 and P7 is the maximum OEN pin. */ @@ -3073,6 +3076,7 @@ static const struct rzg2l_hwcfg rzv2h_hwcfg = { .regs = { .pwpr = 0x3c04, }, + .tint_start_index = 17, }; static struct rzg2l_pinctrl_data r9a07g043_data = { From patchwork Mon Mar 31 10:45:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033473 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88029C3600B for ; Mon, 31 Mar 2025 10:47:21 +0000 (UTC) Received: from TY3P286CU002.outbound.protection.outlook.com (TY3P286CU002.outbound.protection.outlook.com [52.101.229.63]) by mx.groups.io with SMTP id smtpd.web11.48841.1743418038377730104 for ; Mon, 31 Mar 2025 03:47:18 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=G/3dJsxy; spf=pass (domain: bp.renesas.com, ip: 52.101.229.63, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ff+jOYw/8rJrgwERQo5aFN1ZZIlut90u2Iw02G/K240CilqOmzi71lQKzGekeyjTsl/cQtjRWYQx+xLFCd+E3CdStWIPL21jjM4JWh6+5TkjphI6+QmeUfyfmWtHgT484KE9b7B+FRL4aUWwCaXlxVCBRXL5fxyXkI4mvHfpngdTlZrcS+Jvjm3nLekBMJc4yKqvsoCFJ3ZOiI8ngHWwjJpX8Q7t7OoadslPonLraDJrXbAlHzxWzNUq6GyxX0LEibY5gYeH+Xf7Ji56dvGR/uZ620kwQXZ+EW43P6gtfdvIB5eOk3f3ieI4uHwG1XfvGmCQC7xxn/9duIMb2pxNAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=g0yS+CSTJryJdIx9UODoupW/EqbsxlFeLUvtzIxJ1Y0=; b=gXhKq9e8cUSltpEgSy5lq6qK/ggU2MjLawl5zU/z0/tg4ms6gHtqfSXOrKBvsT20Ivxerl8vBiZSFRD+b82WVdxtoLj8oXd0UjygSrDkj+i90nzIPY7+g8h+WekJsCZDXICvuMRCd/Rn56NBxbu6if6ILBz3uxS/w6eHjLcIItX+IKzXq1Z+A8DVvDHfnifdUF8BWKWHkR+j2Tl5HLkwr8Z17S6J5LTr9asH9S6Sk9GVbgM6qFnLhRa2EkHDz11Cem6ykhMjkx279FXXHmi4OFWVmcq/GXOnEum2mWjgecuWiAicrbh7iaCZHUTGusLZ8XF2LwTRd1xo5AuvsFpdXQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g0yS+CSTJryJdIx9UODoupW/EqbsxlFeLUvtzIxJ1Y0=; b=G/3dJsxy3g56nqYwIs1XeBfFtZslErDgxj+06ZfQB6WqtO1De8wNvc05rAiOOaOwd/3YSzuxyvgAl6B4i+cOpbeEgkRPnLrVWuPm43dB1qpZ9th/R+/LUYtGNExYBxANpeR2PIXejOof+pOpjpeUOi8y0+AAQxhlmGCprjZiFXI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TY7PR01MB13744.jpnprd01.prod.outlook.com (2603:1096:405:1ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.33; Mon, 31 Mar 2025 10:47:16 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:47:16 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 35/43] pinctrl: renesas: rzg2l: Fix missing return in rzg2l_pinctrl_register() Date: Mon, 31 Mar 2025 12:45:06 +0200 Message-ID: <20250331104514.79090-36-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TY7PR01MB13744:EE_ X-MS-Office365-Filtering-Correlation-Id: 62c85375-3d03-4aa1-04bb-08dd70416747 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: a2293NyJpChSF8AkyDYGAEfYlyGacKuSeePDJ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T3ix27blXJNOkNf0c1971yrEl/cHRvY7fve83tooV4U6iPtWswD7rq6wvWIoyD9qQnokcvBouqpvpapP8Vbst8amEplC8eLDiGb3ZbkG4GuwIt291ItF0VgF7DGKdQsShaDv7kJKWxTu+VxcOWmOVOBEAW+ZhQKsbNJ4eT9QQ4pZobLK8mMiv0CMmYkqV534lRrzkBMDcqc6Fqzyr6W+4PeJCk9eWKYWBuboWOr2wZGzCtYDq5nDm2ZW6CUqxzK2Kb1l7gc6lxg+ziyqQuAbmRqE7X5pJRzIT9JscSJO2vylPepJA5obE63d8Hv1E/vH9FjHNrVvrgETZRtVJBTEh4iHCm2UKt9w== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: b10HRFJFT126iW7ANV+iTAHSjXIkTYR1KtQeXxQP7mwFMjlkseFia5MQ7eYBhb0l8k8A7YVib/vNm3cIqL8PBUVR4FUay2UaoB1GcnRzWfL4ST+sAcl5YOPTuwxaQUAyBYNTSLpNvaCAsonDDLxnaCo/kLP2GNR/Dv9713J415tCDyF2IORkyA+Z8Suw5czhgB+KRlUILXm2EVrkEqJbrEUWVYxX5RDzr6MfezfKE/eb75UJw/jC4kjbpZzqh6Ogu1Asf7PAV6jLC5qNoVdOx6dnQ+m+5ae/kuc9CFOMid8fRQrmpbW2Vi5vnBm/1/rfZyjdcL5PaqrCOQfV+98D7WlUx+ImPRXqTgYdOupqdltiZPrEzD+53Iqcrfu5+n2JBcxIMD2LAc50VpA5mJC9MIl3eFGxa5oOkRyIj4zjQFSGP0joPylDn1nD6TKKMpSdqH22OUkYuJxX7LilTRIa+XWq+nM3xdtucJPFN/gmMTO7GjNk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V3bznyHjM82bKtnPca3wAXRNW+OaZUqXoYN6up/uOF/YpHeo6KjFJ+zb33a/KtHz+SlCIiKPHsw= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 62c85375-3d03-4aa1-04bb-08dd70416747 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:47:16.5515 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hCLj0z9pt0tLg7GMlT7WvZM0tyKAacTFcp5mc42LMt9SF1xqdGRgRSbLAA25x4dX/CO9/Km0SEheHjMJorfA1g1ynNTDWlOS0M/sd1M+PXzhEkTdODz2WQ6A4zjHUIV9 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY7PR01MB13744 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:47:21 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18423 From: Biju Das commit 1737715a4c2c08f207c94cc1f3af3c5945318d29 upstream. Fix the missing return statement in the error path of rzg2l_pinctrl_register(). Fixes: f73f63b24491fa43 ("pinctrl: renesas: rzg2l: Use dev_err_probe()") Reported-by: Nobuhiro Iwamatsu Closes: https://lore.kernel.org/all/OS0PR01MB638837327E5487B71D88A70392712@OS0PR01MB6388.jpnprd01.prod.outlook.com/ Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20241003082550.33341-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 4ccdcb1457045..c6ee32a7a9410 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -2711,7 +2711,7 @@ static int rzg2l_pinctrl_register(struct rzg2l_pinctrl *pctrl) ret = pinctrl_enable(pctrl->pctl); if (ret) - dev_err_probe(pctrl->dev, ret, "pinctrl enable failed\n"); + return dev_err_probe(pctrl->dev, ret, "pinctrl enable failed\n"); ret = rzg2l_gpio_register(pctrl); if (ret) From patchwork Mon Mar 31 10:45:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033475 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87269C36010 for ; Mon, 31 Mar 2025 10:47:31 +0000 (UTC) Received: from OS0P286CU011.outbound.protection.outlook.com (OS0P286CU011.outbound.protection.outlook.com [52.101.228.4]) by mx.groups.io with SMTP id smtpd.web11.48843.1743418041468676049 for ; Mon, 31 Mar 2025 03:47:21 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=XVCEuAGZ; spf=pass (domain: bp.renesas.com, ip: 52.101.228.4, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ao2d4MH36f77kHBit86laLcIMHdyyChT5vBVcTntbs8qNi2WA3rZRBVS2ipBgWXnwnrXPXVWazvUpuHXNaKsAoJ5xx7lOSlanOe5LYy3rwUgzlqkpj2euuosYGy1sIHJw8meOQMgAe+qfk06VSXOTL7jNgWhoinzITcidDZardxrJY+ZuNsQHjE5f/9vXH9lhDqJ5MFpjXOQVyaenuzs9xrE4L+33h4SqeWxeCC/ZwTqh9flxMHNqqI7VKlYj+y4/hzpGzN6JZJN0b15K+qcn28GZz2HHRyiV4f59PVvE4A2yYQKWLKFcsDHuUtNGMTxfo4OtWrWamd1N6JkV7Rvpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=E/M5PUlzWT1upO5IfsQb3X9qTEXNnUFNLDqsBZjrecI=; b=pbdeXI/jy90MK9RyaORyxSJ1DPoQzKrZwajOZ0EpbJ6QizNa3nIqSJK09QXydQVa0+bE3RtqTmWlIrGvqUlC80/rZw2iPTTmRLMTdTfNDNY3W8qJMj+IwjwokO9vQ7jMYO9LJPyNrvYSiv/Dp6gaLo3LC1niqa/ThbfyjB0YpSqFWMAPJyLy4tZvfQtVJdy/7ISm7OgYuL486TKPA/uYe797zOxQjw/RK8YXsnpn00heKdDGdizQB22gSCMWny41FGONBZQJP1pXTk7CI+QZD2x5DAbqQgXPhwAtSqYWHz9jT0WqJZmXIie5JGValtlvliVv811YuEH+VojZQ6L8Kg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=E/M5PUlzWT1upO5IfsQb3X9qTEXNnUFNLDqsBZjrecI=; b=XVCEuAGZdpuKNlE57zv9YHbr3XSSm9JLmZyihU5fV7y9icTjk/IUl/ykMVcDo2QWV2iL1xs4tEVmN95tDdLsxQ+BWl6s6NKK30+qZQwRhjCmG6Vfw2FWMnM714LLe55i6JGELJ7RV/ToUiffOkvwqFviLb3NLWbq2dVIQBAKkEw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TY7PR01MB13744.jpnprd01.prod.outlook.com (2603:1096:405:1ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.33; Mon, 31 Mar 2025 10:47:19 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:47:19 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 36/43] pinctrl: renesas: rzg2l: Add support for enabling/disabling open-drain outputs Date: Mon, 31 Mar 2025 12:45:07 +0200 Message-ID: <20250331104514.79090-37-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TY7PR01MB13744:EE_ X-MS-Office365-Filtering-Correlation-Id: 4a197bd7-c871-46db-0760-08dd704168ee X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: bOrtHzeRMiP44m0R1otm3S3qV6mdVA83G6ReJZiP7df2xFF7oJsbB7p3L+JhG7tmxiZo08N6Skt0ZQrcu/HCvGGL4K6k4mnDID8TJAnWvv6/CreoK8wbWKSDG4f+382ZgRAwT0Mf0zV3BeuYsLoex2zQyKFvqaxFbI9CMgAkx2QMZz2WEduW31U76sRk/dTWf6JgSGDcNCXR+gA224gAQnr8LHAjs5eXVDtqDU/Vixqkyd2lEX0z5z9AwLIdaKcTqW11p1rngti4sX0LSg47//ctiraK+js+NJZlmfrybrCQmI0MHU+txfQ6iMeyYQP612VzWzkUSta3YGYkBjqMbHJFHO9Ow2Ge39ug7gUPeS3MH3yZxvQg0dEVjHrDbo55z8DAre/S6/6B6w5wm+JMgoLKlB7pk1VzdJmbwny7lUd2QzN8BsGscUcBo6uSTkk1ASIgi0CTF66akC7zU0OaZX91stH2L3SLEjMuGwDkrD38NLgVvoq2HPWU2NY4umRpIx+VG42JPYQq2B6FV9qaiT3YCL5YdzvdKHBEMsjXH4vR8Sr9ud/IqjgD4KSfdbz8UGMedBawVOxE+8inmkbZWJzsm+Tg9aWDIlB4owbAitdD1DRg9MCMkok02N5hBQHqI9Bwo/Vzv9y2emBf0DuXWlfkSTu6HL7po32c+C655fwTprsoK08wkxh63kEJHucQve2KOF6Qow0GWPREUTa1s5fjALbrnJ2ZNEn/ppvgXMVVCtiOflgbRtRodGIkfuaFzFPjTPcFINnLWnDdTXFj8lH5kAgohtNL5w8Zf7AmUGoE+czjfHx10CpzEsgYnpQF4xzdUsu15zb/oSEisVq1NvLFGHlYRL2GmgnwCxjCgrtfBVPcAFFyF5fDbY0/679e7sg/X+sSJx6qckWcVjhuAaH+6JAkr+WdmVpan2CU5wO5VGKWf9XKqFu2UEz+BmFpAji/C5SK9nfmuxMDQMJmjYhT9+UMoexUyAWE1NKOZ4EdndtznV0YPCLPV47ov/gdBjVUluItd3X6UbScUfg79FsMkcxeq88d5yOgDayBIOntB6fJCaxiGUwuLZSup6VrEg02gTRzSon/Yt9mqM9MiPlYKmkQakXFTmxqDKcBrRAxOgfehshhf6+XZZVPL2pdBfyyCPU9riiWc1qOYoZ+/71R3QrWP+x9H8tS5B4nO2rw35DawO8+x6maejOsmvcAoeb8bdPwUFFWEYA1mrzU/9pJ+DGkljjsuOwjm6DRVBymY5d/tBxpibzy7A4pcOTsYj/SqAM3i12kVrYQ475Q3oV/NVkXpHioBHeuw7EYWk5cO1k9MR9yGJUG79TgLWacqYXofeK8Dlh1oOSVYPNG4YhKvNCG2BlbNEE09t8gE6lNMvBVbu8Pjm26qcsg4VSeUEdOEK/Hi6c8nLcl2ENis/aC6OUPAi7M0B+/ggl1fpsK3Fu9XGYLQbGSi421F4/i X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: X//BSHHsuWquZ2DS2Qt4UVncmANJ+IQ+6FPtUaVVHE4pmrQvjWLt4dKs64HOic7yjJKnkIFOxQdZb+EWY3z16Ji/E+ddEGm8zsffUPe0bWCpdpWpcZ6ZbD2CmlvasXdfLnWs61QJuGIChFXTBYmnSlEg4LjY1irudMHK9isz1QZYsj8vqJKZuAgZaCEtOJdO5Jhdb//CkUz+Z4JgceYATDXZoLRjoxJn1w/swU3Pxt0CPUbx1GUQxluB8sG0G7KoVDcUm6ASkNf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T5sDMGM0aaz9odJ2tRyT1LTBa/dUXWOsijcIm+oe7v0GFBNSQ2HdB3fKZEw3BC4pba5FYvT8LI1GIflFu0SY87DsENENGbaVfJAsSRHl6iGo3f34xQ6QwFE56gQK6Tay3fmwFF3f0S3mRhau9gyRZ1CP8NQTjtE338bmOWOLnlE/6DdOMLxCuBCV6dzEDHh5LKvSajvAV7ZcqrGUdDRAv7aoxx/xyjl8iSgxzw47jNshJxpbmlvV43E9jbvikmC48t9BnTNBmKmf67V9EKAHqwy0evEWE98= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4a197bd7-c871-46db-0760-08dd704168ee X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:47:19.5619 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: PCfV4q+UGze2Kvxqhp+2divrWTPUlB8xmSFqo/6FTv5Hi7Kl2tNqvB7n1O2ulb+k1zveSgO3SSGFKJ6pdSfdDkphbgmzA7Q+anY2GsRfn6G3WrF6gp7RmREWaSrqi6U2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY7PR01MB13744 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:47:31 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18424 From: Lad Prabhakar commit 9d75b70061917fbfe3247e2594879e5a14d3e24a upstream. Add support for enabling and disabling open-drain outputs. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea Link: https://lore.kernel.org/20241004123658.764557-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index c6ee32a7a9410..834fac5db21e0 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -138,6 +138,7 @@ #define IEN(off) (0x1800 + (off) * 8) #define PUPD(off) (0x1C00 + (off) * 8) #define ISEL(off) (0x2C00 + (off) * 8) +#define NOD(off) (0x3000 + (off) * 8) #define SD_CH(off, ch) ((off) + (ch) * 4) #define ETH_POC(off, ch) ((off) + (ch) * 4) #define QSPI (0x3008) @@ -159,6 +160,7 @@ #define IOLH_MASK 0x03 #define SR_MASK 0x01 #define PUPD_MASK 0x03 +#define NOD_MASK 0x01 #define PM_INPUT 0x1 #define PM_OUTPUT 0x2 @@ -1338,6 +1340,18 @@ static int rzg2l_pinctrl_pinconf_get(struct pinctrl_dev *pctldev, break; } + case PIN_CONFIG_DRIVE_OPEN_DRAIN: + case PIN_CONFIG_DRIVE_PUSH_PULL: + if (!(cfg & PIN_CFG_NOD)) + return -EINVAL; + + arg = rzg2l_read_pin_config(pctrl, NOD(off), bit, NOD_MASK); + if (!arg && param != PIN_CONFIG_DRIVE_PUSH_PULL) + return -EINVAL; + if (arg && param != PIN_CONFIG_DRIVE_OPEN_DRAIN) + return -EINVAL; + break; + case RENESAS_RZV2H_PIN_CONFIG_OUTPUT_IMPEDANCE: if (!(cfg & PIN_CFG_IOLH_RZV2H)) return -EINVAL; @@ -1467,6 +1481,15 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, rzg2l_rmw_pin_config(pctrl, IOLH(off), bit, IOLH_MASK, index); break; + case PIN_CONFIG_DRIVE_OPEN_DRAIN: + case PIN_CONFIG_DRIVE_PUSH_PULL: + if (!(cfg & PIN_CFG_NOD)) + return -EINVAL; + + rzg2l_rmw_pin_config(pctrl, NOD(off), bit, NOD_MASK, + param == PIN_CONFIG_DRIVE_OPEN_DRAIN ? 1 : 0); + break; + case RENESAS_RZV2H_PIN_CONFIG_OUTPUT_IMPEDANCE: if (!(cfg & PIN_CFG_IOLH_RZV2H)) return -EINVAL; From patchwork Mon Mar 31 10:45:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033477 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96224C3600C for ; Mon, 31 Mar 2025 10:47:31 +0000 (UTC) Received: from TY3P286CU002.outbound.protection.outlook.com (TY3P286CU002.outbound.protection.outlook.com [52.101.229.36]) by mx.groups.io with SMTP id smtpd.web10.49095.1743418044580660981 for ; Mon, 31 Mar 2025 03:47:24 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=pp1q40ww; spf=pass (domain: bp.renesas.com, ip: 52.101.229.36, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TP9CiFffQZMDcmOxX0A1NrlHrBmwHFUNNZfpHDW1BRDmYtdUdP2LmCnGl+KZaDbXTj5O+gd07uB3aqXHc2vreibHcRABBazflxkl++WsEP3K7tPOyW5RTDU5WeP+h+uqaSq89aU/9IRcj3BPDU+G7J9pplFbSnvJPVZDLIug/Q1L3rJzYFrB1TPU1NvspUXSJ0/C9LwbJu0xj+lOv4cy4Zh6W1LxFcFMUiEMg1bcKUlba6QEe4/xuckUDtlCq83eIBOzfH4cGf05dUVwuZp0FS1T4JTIPfW1DuAa9LbCvqCZXRJ35yH7oFlcHAwi8xxns7chjMtNV87PLjn2XWhkaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=T0/7KLxZti6jISaSed9ORyE7R2VKvapyRDlMc3YxaoQ=; b=h6E24+x6qAeyCNpXIiDdPrAfa8rRlzAoRXxU8B1ZSMc18ighBe0NutI0BaXZeYr4rOq9K7daksvB4edWWcXkjGPh9V4Smy/ho1xQXe6E8rzLYwdA1nJN/blxyWlYzN1pQ+DSOWMs5PH2CHqEaqWyYm0MCdDlDe4YveGt0S2/d19AJaJrqz1TuSUaSU19rmVz9h1y32t3sDhgR1fZP1C0gFyfL37bYMmcBm4l5c/JezYOF7AeSK04bSCdSyvaW3F1pr7+PwMCuJBqsEUE8HkikmkLeJsux+IfVJMwpxmhUzsKMrmvIJEp6XpduYoiJOLsMmFCB0S7RUcHHdPWP89ygw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=T0/7KLxZti6jISaSed9ORyE7R2VKvapyRDlMc3YxaoQ=; b=pp1q40wwRSoWErUx26baTMj7dgjifOHNGxZvH/puOfJ5tNu3L7ZfRrs8hJwU9y5TCBNk/2/HwkqIGu1V49xbUPtbopqPMXdo4zxcZ/dREOZoYE3SJT4HJki6ss3QaheoRLbvF5empwgBhkShhmXTCD0C6h3gj6GFy+cqpxGxVUY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TY7PR01MB13744.jpnprd01.prod.outlook.com (2603:1096:405:1ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.33; Mon, 31 Mar 2025 10:47:22 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:47:22 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 37/43] pinctrl: renesas: rzg2l: Add support for configuring schmitt-trigger Date: Mon, 31 Mar 2025 12:45:08 +0200 Message-ID: <20250331104514.79090-38-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TY7PR01MB13744:EE_ X-MS-Office365-Filtering-Correlation-Id: bb1e18c9-2c02-499f-9dbb-08dd70416abf X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: B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pnsRKS4lNBEmiHfrs8CbrjcV2rJX7JyvUf7isoIGNbBxbAmqwbB0u7YcMCVQIr5fqsPWc5Nn4cOO/rtiknIsp8H5ZBxS5hN9r76mjGBPoR1rF+Q4Y/FA4U1ZqtEjTzC9SJkCr0QWgVBZnaCB5enoYHrmQuUmV74+eReL5QXqTebe6fuNzsRfRR8qafhdWe/cjmujWMirpHPpUb8RrNqV6AkzB5BGGwd9xnHsKQbKF5gVJJEQwIW1j4VJGnVfipm2XOC1M/FbzEyPuUj2wxm/L5Rh0Lje6ua7Lru7/YJolNdiyckUsAzsrZPBDYMSRNl3xzIcFOLRP79Zwpl0dPSXmVXsEUs50EZ/Jwujac0e1KKjQj8YQJcgLOunbRjKL4Oo/GK48Vo8hFpkhRAEWsy4hapn1SHnnQXUNEokhHqupZ7vcWKkdWPLGQYN99o36GWlXwWt X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: I6pidjruWmG3DI2FgJQcR4gXefLXgiVzUj9k/uMcCuboShRhqwsFmo04oBm5Pxi+sKW4Qpq54z+7YBvCXbgN2ZN7tnEgqZe8+Dx+JOgXKudjBnZVVY2a1yhUmxAeaEQOOE2o/Z2V6eMgm7LadVMmKqIBZCzFNoOkNJNwU5e7cHpBM7xrm0jZBx9GsdQpBljWDhWllaF8GZhO4AKQtprqbG1lzj9FaPJ1Le/EJ+a6NhIzGtYTQv96y2vA/RuJXcPuUzbln435wBdk8RJI6/PZAn0AhwhZAQQFpuCUsBfXKVjavbmrVsUegJY3QZZpHN5VNEF6LolCOQk/0V/CVKUahELKTaaDzXX0aWDZHIkTgTvwo7omu35oQv5bp3RwaTsEtA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pCGtwR40ttC64Q9qMbSnBWeWuDEZWMnK33ARIkIIEUs6ytLhoNGn22bmgOMKZBA7O+qnXreNBvxJVOrGMzxAilt77TfnOldifTZ8AxmFjNJxA0AsUQ+r9BmwVl0b1Z4Q0+ib0yZWnHMt3jGiH/GHPJMGoBSwB2FKwiqpEDA= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: bb1e18c9-2c02-499f-9dbb-08dd70416abf X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:47:22.6071 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ygvAKQkY+8Kqv9DDSB3qM6IO9ALlPxiTNbdZNyMXZs0fsR82pJ7IIf22RpGKLMJ/KWqnx1Z+oIcvuDcTc0CHXUfqS/I5Mn0GedMzlkyab5VMfOmXDk4QK82O6b2+8gbY X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY7PR01MB13744 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:47:31 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18425 From: Lad Prabhakar commit 725933a54f718af5362ec39971b2933d8bdf6994 upstream. Add support for configuring the multiplexed pins as schmitt-trigger inputs. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea Link: https://lore.kernel.org/20241004123658.764557-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 834fac5db21e0..36f1a82352fbb 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -139,6 +139,7 @@ #define PUPD(off) (0x1C00 + (off) * 8) #define ISEL(off) (0x2C00 + (off) * 8) #define NOD(off) (0x3000 + (off) * 8) +#define SMT(off) (0x3400 + (off) * 8) #define SD_CH(off, ch) ((off) + (ch) * 4) #define ETH_POC(off, ch) ((off) + (ch) * 4) #define QSPI (0x3008) @@ -161,6 +162,7 @@ #define SR_MASK 0x01 #define PUPD_MASK 0x03 #define NOD_MASK 0x01 +#define SMT_MASK 0x01 #define PM_INPUT 0x1 #define PM_OUTPUT 0x2 @@ -1352,6 +1354,15 @@ static int rzg2l_pinctrl_pinconf_get(struct pinctrl_dev *pctldev, return -EINVAL; break; + case PIN_CONFIG_INPUT_SCHMITT_ENABLE: + if (!(cfg & PIN_CFG_SMT)) + return -EINVAL; + + arg = rzg2l_read_pin_config(pctrl, SMT(off), bit, SMT_MASK); + if (!arg) + return -EINVAL; + break; + case RENESAS_RZV2H_PIN_CONFIG_OUTPUT_IMPEDANCE: if (!(cfg & PIN_CFG_IOLH_RZV2H)) return -EINVAL; @@ -1490,6 +1501,13 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, param == PIN_CONFIG_DRIVE_OPEN_DRAIN ? 1 : 0); break; + case PIN_CONFIG_INPUT_SCHMITT_ENABLE: + if (!(cfg & PIN_CFG_SMT)) + return -EINVAL; + + rzg2l_rmw_pin_config(pctrl, SMT(off), bit, SMT_MASK, arg); + break; + case RENESAS_RZV2H_PIN_CONFIG_OUTPUT_IMPEDANCE: if (!(cfg & PIN_CFG_IOLH_RZV2H)) return -EINVAL; From patchwork Mon Mar 31 10:45:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033478 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87234C3600B for ; Mon, 31 Mar 2025 10:47:31 +0000 (UTC) Received: from OS0P286CU010.outbound.protection.outlook.com (OS0P286CU010.outbound.protection.outlook.com [40.107.74.13]) by mx.groups.io with SMTP id smtpd.web10.49098.1743418048927644782 for ; Mon, 31 Mar 2025 03:47:29 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=De+kGcrf; spf=pass (domain: bp.renesas.com, ip: 40.107.74.13, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vVNGD/9puWl9skgxLteamEZ3wMqxVh/jaeHnHcjjBotOh7CUJVY6LN+yz1V+c6eWVNtnkGhw+IvApAQS04rYH14V394VhfdY6vbkFNgOGX3056MsSiZ4qVjuyQ7pBKteeZdciGkFPbiHHRy32D8lrzHjknLHZcS0NAI4bl/w5A4NObKjdaoagFRaoC7VWGl4rjdvqRftPF8mm6B63VwJ2hezTVMlO+LU2QTnJK6a2Lu6qBSG3r9OFVq3epTkyHSq3hUPSsAJm+86dLlLodcBpNmvurA4ibQJ5rGXJ0xfympPNHFc5jyYGcUyol0Zellrqy9TpeLj26MKdPfzwq7Xpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mcuB5z5Nvph5bTro2t0FWX/aIexMnjOOUcaIhyiWQeo=; b=qAdNkDlhob01D5mnqoxsyeDMAjU3JO3xFH9BbD03JqtGdQ2EvAx/sDGQakSx6I8Q5RGdpx9hf/+kXE+0/r5OO3c6zJA9debV06lYOy1xMbkaW4HX5aN7ZrsTWyH/9tBv/hbp1PFfV9LgiVtdXCNJvjRVvPBvoDdHNApTkhZ2tUp9xBdfucWs3WStqG3gwquuTEORO0Xhul9t0qRmph8kHrVieEtiDLzo3GmHpdUnfm9xBo7QCOiAdCDlkuAleN6LLKHtPqlkoqRI5dG5FRSddUYC+GEnJqxVq/Q/XcwjVdPWOJ9mdqSF8Pq7JQVjYubeF9pGOAZ+nC5pWY44DA4NtQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mcuB5z5Nvph5bTro2t0FWX/aIexMnjOOUcaIhyiWQeo=; b=De+kGcrfRULAqH7+EAXALmPo/Lvmsht0det6qgePdWExtRfTDav5MUnVOtYv8+uJXBDeq4dq5ic0PyPyA9mSUWXQcNThyk1fnls6rH+XxhRL4XSkKsv4s77rrxWD6z3Uh4pZneMpV9Ffg1EOkAX2DRXd26FxZzwH3g4/ymOPcI0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TY7PR01MB13744.jpnprd01.prod.outlook.com (2603:1096:405:1ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.33; Mon, 31 Mar 2025 10:47:25 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:47:25 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 38/43] pinctrl: renesas: rzg2l: Use gpiochip_populate_parent_fwspec_twocell helper Date: Mon, 31 Mar 2025 12:45:09 +0200 Message-ID: <20250331104514.79090-39-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TY7PR01MB13744:EE_ X-MS-Office365-Filtering-Correlation-Id: 039ae4f0-f7cb-4cfb-eece-08dd70416c8f X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: HOAvsMmGcc496ux5zWVYXx5Gwh4OeOBSdqj6mGlSqSmEn5o2s2KbsW4+R5Ehwd3ef9QBpkqIhNHk5of8qUxQtNtA5uSRJZ7f6yUwEvw2lLN6Xgc4tXGXdnE95S0/uCiLqaKNLpPSdF2I5cOXkk/y+k+45Tv0QOSrjiWkPTXCR7yR91seR8J6QrhpQcBklRi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aepO24M7TYRgiI3UydE33qmD7mZZmojv11iDpBXISm0hUXanaQBS3V2mGfak42wX2SeI/zQlufAfwwOzikmc1daQonYIrLkZFLCeaXESpNZmip1leSA6qcT+E1tokMtbbOkUMzfscneD+evJ7FjNzE38BcoDkCUyPsng3aIIIuC00AOCX6woD3UhgOVX9fUQS7KzFwTmU X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: p2EZp1T28NCW8vg3AL2qCq+vj2UgOs3VjrJJMSHHbhay/g4twQGXJGxSxiVi+U5fBruNoqesbfsO8/cTJ8gHJZFlhSafC2u81xwNHrYBr9DLcCwAI9ysfKElaHCJ56HgIyPTKH92zd6oLwWMbxbO4fxTjKb6iIZMkINZp5UAbS5WSso0loqXRTHafKZd4ff0t8tWMYcPOXaXfGQyvyI0kToHc3auxvDY0fAKSER63uCDv2hCNBMA0SzFUKwexUSyBkNagLtdAwCpjg3fCCOjM/W7qgGMLV3yiviQOF78yZu8ans74Vv9XT7i+IucDoza587x0GhiFEYfP0ndB+mxYI9jvOx9v5eUUV1VdFdW/GgJ1zQI2YsRfT7EhRrbmero7H4vLu/zpm2vhO5Xr/DgftZ2w7p+W+rzTSZCjS+wqwEo9xqbKlZfULa8ETIOThnW45gsOsl/oEyrEXQje+HTJPqXCp/kOxSRmS5lipld8QUDQkydERtI3u9mMlvUfg/UcRnkP9/mvPtk5aUkmy92uyZNIy6ePNClq3LxQwrDiCpB3i1/hkgzNFmnmj6vYKGWKEWFOlZKwUFd/SnediI4s80JY4Q8Hs1rd9JAi0ndazqba7LiH5eCtsUh9CVf5ce5guZ4V7oVWZEXPhjv/jXULlOIdu0Y5Iq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Tenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:47:25.6409 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: t3hEMingC6jxsXM02d+kyos38yFtUjHmnkhAC39bPlR69soaEEcmZmrIWTg6sILw54rAcy82gqDXXDGPCM2MgdsE3brp7AqbmlfrXbRUrGdwYMyBNBvR4fHMTYi+znPS X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY7PR01MB13744 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:47:31 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18426 From: Lad Prabhakar commit f407af78c8d3b6035f81152b15ad67063f42514e upstream. Because rzg2l_gpio_populate_parent_fwspec() and gpiochip_populate_parent_fwspec_twocell() are identical. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20241017113942.139712-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 36f1a82352fbb..353f9b139413c 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -2433,21 +2433,6 @@ static int rzg2l_gpio_child_to_parent_hwirq(struct gpio_chip *gc, return ret; } -static int rzg2l_gpio_populate_parent_fwspec(struct gpio_chip *chip, - union gpio_irq_fwspec *gfwspec, - unsigned int parent_hwirq, - unsigned int parent_type) -{ - struct irq_fwspec *fwspec = &gfwspec->fwspec; - - fwspec->fwnode = chip->irq.parent_domain->fwnode; - fwspec->param_count = 2; - fwspec->param[0] = parent_hwirq; - fwspec->param[1] = parent_type; - - return 0; -} - static void rzg2l_gpio_irq_restore(struct rzg2l_pinctrl *pctrl) { struct irq_domain *domain = pctrl->gpio_chip.irq.domain; @@ -2649,7 +2634,7 @@ static int rzg2l_gpio_register(struct rzg2l_pinctrl *pctrl) girq->fwnode = dev_fwnode(pctrl->dev); girq->parent_domain = parent_domain; girq->child_to_parent_hwirq = rzg2l_gpio_child_to_parent_hwirq; - girq->populate_parent_alloc_arg = rzg2l_gpio_populate_parent_fwspec; + girq->populate_parent_alloc_arg = gpiochip_populate_parent_fwspec_twocell; girq->child_irq_domain_ops.free = rzg2l_gpio_irq_domain_free; girq->init_valid_mask = rzg2l_init_irq_valid_mask; From patchwork Mon Mar 31 10:45:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033476 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E4EFC3DA4A for ; Mon, 31 Mar 2025 10:47:31 +0000 (UTC) Received: from OS0P286CU010.outbound.protection.outlook.com (OS0P286CU010.outbound.protection.outlook.com [40.107.74.13]) by mx.groups.io with SMTP id smtpd.web10.49098.1743418048927644782 for ; Mon, 31 Mar 2025 03:47:29 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=EcHRJjQf; spf=pass (domain: bp.renesas.com, ip: 40.107.74.13, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FcNZdNdBGbNjNJyVbgOCVP+g15bnruvVtynRuNPSPUZYnnpGZhswAyOzaiatyXPpsGWM0uKzTpF8qTxQqOWmihnwffwtIpFiPxWJpWrXADo6s1k134g39hW+tHwFcTbSuIRaN+E+1Ho2CiJnSIoflj2XLJbvkO2v9o2oBMMB5wqFJr36Z7zyQwkMBgO0v0ZbcgO2zijn/jBTUb7LUtPhuR1iHrVbzFRF5pAbYX4Ka+wBjygT1r6afQfpHt0Lwu4SAN4G9P9kbYPc4Q03yeVidxdOv4MzEh7PD9XBclpFHlrIfdnQOKxg2bA81veGN8mS/1ZCiJ+krMAgRjL9sZ3Jgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=O+PyPPhFl/VEgruP7Cxun14HvrgOiDOTzP64rVlY96s=; b=sies/7ktqJa8bUQrZXpimoHCbt/itFi34hF/YblJ3mNc+0AZOcIAfVTh+1+IqRCLqww4IOYXyZVusguTPiJSXIBtV37bEo8pBeCNtg1ayGNFspoHiFmYYUA/ZR0A8cRFon28cwBsDcOeEPvYO0VmUUTiObEHo2YKLOwvehBz3Qg9acTbr92QUX0iwYtOSxjrRNKNfd5EuAdK6e4iQW2JAzGoe2S6jWj6T5nLjJBkiVvyxFs/H5oSf/iisIET57WKdwuO1jS2Ku0DTpTnH3vo6SOuJ03hcIjmtLiixB6TyOUY+CthMqYviIGbx9EJw6opzhMXDdczFzEzxU09rKRbIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=O+PyPPhFl/VEgruP7Cxun14HvrgOiDOTzP64rVlY96s=; b=EcHRJjQf1Z1rZSG+S/Pz3zS5j+khvziVLeZ+9Eked5hURlGLNa0a/NCSO213OKni+QAStptUPoDvRvwnI8V3b3pCwnPpyVlgt+ooXLC7HCS+q14v+eAMmVSKaXBOkXL2SALuQ5jR18KQGZex3K8XPyP8+StV1JCMowDBLhNcVEM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TY7PR01MB13744.jpnprd01.prod.outlook.com (2603:1096:405:1ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.33; Mon, 31 Mar 2025 10:47:28 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:47:28 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 39/43] pinctrl: renesas: rzg2l: Update r9a09g057_variable_pin_cfg table Date: Mon, 31 Mar 2025 12:45:10 +0200 Message-ID: <20250331104514.79090-40-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TY7PR01MB13744:EE_ X-MS-Office365-Filtering-Correlation-Id: 0fa579c6-7fc7-44aa-4b53-08dd70416e56 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: KMINUSq3To1aNTLpgC6mkgNUH01Ebd1wnfWQpUqDZpmtN4cOdixoOg6EOkoUaHWcoAhu7gdt2bgr/snOQ28/5CjW3P7HuIFDW2kdiugbNYPmjrSV4FyPl3eW/28LNAE4YwjhO0A85LAJfJg3kV5dRb3q87o6tYg1+rNnQYcgtkclqiLJb8Tt2GHbBqhqViNFgl+BcPCh/S0geEjcTwheY2jyyijnoylPbdgGquaLP+RZumxaGdKW1SB9ehpza/6INuHLH6K/hiNXtJvGzoN+jc+IhmZ6lHZLyq0RGEZosSeZOfV0GlFpYoxSrHzYdT8H6s+xRqEt1ebpIZoOOrsBd/LC6EuVFTps3CPtpewzdztsbc5P9m7j25zc9gDnJUJ0LJ3bCofz+x073B8+c8NcB/49/7y3FlOg1tSGuOKJxC0kOAzXegMDwyj3+zzsRnUPLJJfreGyKpO9t3s+LGaprSLvg7HEV1SlllQAP1URaeVIBuAtoPwygtkY85OIN809nIzRj2E//7/UzIuHOBI28USlJIgpAHDclQvwF1oGeSqk/K4yIFQiJFTdZe02dPouzNPrmwa0+xy93Zaynkfv2eJLGmyuhtedvJcFyqTOYs2Rwn0xd/1DgHhQG2DzdB5aG7EG1H2qAMDrIwIT6eALC8u+1YVaIu1sZGp5voK546hzIzJ7fo6TAovQj8ldEynT7LB4TQPEuoJImPvk7b2HkLRDcgW7cHrrq7V1WVvrCvkxu9LDuAUeq5NRlz9GEMXL2NyzV5ZItGE61ch7KHPXtFMFt02LtcOy2wxKrpntPX3wC247TR7xmnTucqTj0IeqRviiLWQwuxGuHgqgpGdEyQ2ly5x+z2HJkkvUsgqzXdsUb5ULwGbDZW43TOgYYmVLkwG0CeIPyRFk3tonjfjez1/YFUif9xSgPqr0BHWqkXq1T+PvEetRuO5yFLcP7OAp2+QxSUN3LRt8RQv4/9w3NriYOz/rg0sfbUtbm/xtRmAgLU89pE2xHo/vdQDs1Cbc0VTH+pHdNylSx9SglKyf4wERxQ7yOTS53k9iglRSsbcMkTMqX/wi/UruV/RgQqcVMXivRopiJ1it2fneiOPuZiB6wuQquOYuxVXeayDR2wpgZz5aBG1UZCOrq0KKIyyGaNivTvGMWYO+/wA1lY8hjoZqC0xWH3WvzdIpSheBoL99Hboliib9fRj3NpdhwyC89kXkw770pp9Fy1ouwJXS2D3+OE8jt5ZmO9N6eEFJqycw6wavG4Q23dmOB12V5o/p5lK2BX1kHzDaF9BKwuyDcVOWNn14X7Urx9IgxhFqLju8tRLxlMY2r9e9fmznsqD3TiYQjUblo0HkXEetH7nAoAtCDGfFccUSCtRK+0qxIf7hMjMLylgQATbu6PP6DaaWeO1rg9aCsQuDLQKbiWfyRIGiGbRd+l8xAf+49sHvn/vVYUYiojtcBIFtEmgRstWZ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: CgXlU9mIpVKnrS0T0NjLXnTmNNtvytqOBRE1tBZli/oJcbkpAu4SwdoHOr7+tiOeP6gPlIARGJpiS6HdcJWPiqkwpDbd3WHAgJ9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b5sYEvrC0QRc0P78kBxEp7+1+RoFXKgJI7GbDhTkwpjB9mtbdnBPqV3mGyG0Mv4ddNNFRU7uI8F3moT7is0jjOnrJ0LjDru2/bO/+SMQXKGtW54RCDjnC5SvaaqbrVzhPsX/BGDnTnnzdrJq6WFmq+0ttpravl4mVMZ+qx/iOuTotKEFwI/rK3ufAuFXB07eO+vsc5ryEN0ZcMOPAgb6sG0sPu5MmKeI2cquplScTIXGSFv9Ip1Cqp1lPu6ep1doKoou4mxfMcmLdtFNG/e4oxbez8gqFnE27sLvjnzVwwxO3MdbsWFVwegqytNXnyevwXw4amBVgViQT0ePWzG2bLs1ssSKFLYfEUKhW/5QNfWhebrBUAmeIsc45DbcWnu6QBXvAGGENJq5alIgNVfJ7iJH/MFsg10cmAKbXcqVlHDgiCs2mkM6w9n24LOehVjb+JvtaADb140= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0fa579c6-7fc7-44aa-4b53-08dd70416e56 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:47:28.6271 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: aVdkmIh+6mKE/RIK+Q3hZG3XBSL+uYD88wPrDdclDEIXR28fGlNlEEg8eyCLHcV29R6TAwITHQIIGHdeCppOcHQ7mDfpHIEsivHI7ZoiRW/ZanUaXSkLcF385AYx+dk1 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY7PR01MB13744 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:47:31 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18427 From: Biju Das commit 0ce66380a7c7566c91d4a159751d5801280957c1 upstream. Currently r9a09g057_variable_pin_cfg table uses port 11 instead of port PB as mentioned in the hardware manual. Update the r9a09g057_variable_pin_cfg table with alpha-numeric port names to match with the hardware manual. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20241216195325.164212-4-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 353f9b139413c..045033fc84f26 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -25,6 +25,7 @@ #include #include +#include #include #include "../core.h" @@ -381,12 +382,12 @@ static u64 rzg2l_pinctrl_get_variable_pin_cfg(struct rzg2l_pinctrl *pctrl, } static const u64 r9a09g057_variable_pin_cfg[] = { - RZG2L_VARIABLE_PIN_CFG_PACK(11, 0, RZV2H_MPXED_PIN_FUNCS), - RZG2L_VARIABLE_PIN_CFG_PACK(11, 1, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), - RZG2L_VARIABLE_PIN_CFG_PACK(11, 2, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), - RZG2L_VARIABLE_PIN_CFG_PACK(11, 3, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), - RZG2L_VARIABLE_PIN_CFG_PACK(11, 4, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), - RZG2L_VARIABLE_PIN_CFG_PACK(11, 5, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(RZV2H_PB, 0, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZV2H_PB, 1, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(RZV2H_PB, 2, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(RZV2H_PB, 3, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(RZV2H_PB, 4, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(RZV2H_PB, 5, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), }; #ifdef CONFIG_RISCV From patchwork Mon Mar 31 10:45:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033480 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93E42C3600B for ; Mon, 31 Mar 2025 10:47:41 +0000 (UTC) Received: from OS0P286CU010.outbound.protection.outlook.com (OS0P286CU010.outbound.protection.outlook.com [40.107.74.58]) by mx.groups.io with SMTP id smtpd.web10.49099.1743418053531490893 for ; Mon, 31 Mar 2025 03:47:34 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=N/koP9oF; spf=pass (domain: bp.renesas.com, ip: 40.107.74.58, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hGIfxj4pxKjRZ6TLLj3u4iVCek0Ds+xN081R0F+a7wDNSLjTMBfDFUhH3h7Ogq+/C9DLvtg6cUyLfB4i5slT3B4BPV7yJGLQ2YoqnkwK5S2d+seZQQ3rdY2IaieBXaNGGNHPDMWp4pPtYOIf8Vwz8vh9nQNhKdpvrCQqpCDev+EMMTJDETC6QaHtMjKNG5ZI3vhW8lit9NcYIB0z7Afu4rP7IIqn6XlWcN6NlD7Tq/ty3zWYwJubekgzGVwSSJMTs7sa+mCVXXBJhEuPV+vxA5+kfILAXii6ws9dBDklzMcx31lLi4tn4oasImmY1w2pcTB6/hytfzcEsKHZJUhWHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tfuDy4HR9wSPuUlsjaC6QUhOScXXmubm98+2136OEq4=; b=CcN+KmfjlGRIHZZKA315NyqRuPKH0IHcQX//Vie/US5puxkNgqqpBVbZirG8nl6YKaBR1F37CQYUwlioC750A33kb02c+u7LbZ5qhk6VFyt8ZrjJEVkpV4/igKvkS1r7hqf56L+kAsCVNQCgZDCSyyIDV/jokFpBfALO6waUag1C4UuaatUoCTlYi0wJXOeqiq8YZD/oGHyXy3Ia4Pntj5uvR2fV1pb0ds4xUSOuqygshU3N0hYmpx+/q9ZIx+9629pKDKE4c+JlihTrHVE/azFjGxpGyUEDEnZt8xTyhsc2r10WMn7SQ7gqmiK+O9rs53YzRtv+KMVCTXYDILTq5g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tfuDy4HR9wSPuUlsjaC6QUhOScXXmubm98+2136OEq4=; b=N/koP9oFe7F5t81NqvS46JpFS60X+Mc/iQdrPX3I61xPFAh/Kc+6Sg80Ne1EeRSArHWd2vO2cZW/Ffi9jKWfNJwgorVMMRne6hrB0u4i+oPdUmtbw3ARU/CFy13lq1tuhlRYcowEZTCOIdZpzq7FZ0uZs2tcKMgxF4hGZJOlcsc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by TY7PR01MB13744.jpnprd01.prod.outlook.com (2603:1096:405:1ef::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.33; Mon, 31 Mar 2025 10:47:31 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:47:31 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 40/43] pinctrl: renesas: rzg2l: Add support for RZ/G3E SoC Date: Mon, 31 Mar 2025 12:45:11 +0200 Message-ID: <20250331104514.79090-41-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|TY7PR01MB13744:EE_ X-MS-Office365-Filtering-Correlation-Id: 4ff27c33-4d34-43d3-9827-08dd70417020 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: Kcs5KxT5OWcPVWngNx0UQy9ckAYyJiVbmWPJYILfVK8Y/UNJV/03GZtFiyXEE7nyps8kWFOZtad4B2qy5ogGX8KVtJN+I7lp9qYLiIR5m6EKCVHDSBL2c9JvCt9el+4aUpo4MrydSH38kOh93yQfWxZvxp5AZao8hqJkz17LbPy74iOVpz0bFuOuzUOvIK0o8XpRBbdvb2K5Cm+6HV9jPrX06btbgXs/IH7ZmupE1aO/LRki894JjVIvKgqT7lEbpADJCLhU5CXUlhvLxFZVorB+rhly0Wo6t28z8XCXsqTK3W1ic5qPpgrXaTABi+jm4dcRseBfDUmF4H2hheEwqpM2YQ35cXG4vaTlpwXuRfBiu+MvPF/Tz56tAw+s2lQNuj55Qzr8UbvwkzWQRWbJrxqckafOI50/TCUvDVNK4j4ZEJ3I8nZZxrYwJ2bUYuNJnWFkLXfvHRRXmDcG972CSdPT5ZD+vZmTBJ/E64McmWVlS0NMI0DdRjhNPvv3YwUK9C8KieFSpZ1zBeUnpWdAzk3gc9A3VMbe2vNmD+f0G8yrH/XGJ5mBWf2OXTjZnIygKnrnu+Bj/3cgLqnhMm6w933wODdPJll/J5MJnPK5kQLht6YQCcMDFKTZvIug8n6eun8J/gJIOCmIjSsSPfXL6ADjxn355cQxkFrT6SGeUbAY1uWmdF1+za2filhLcbfG4rABJueorL8tpIbIX8xaEHQ0Qf1as5Ij6AYAW+ZdQiaUGeIAa/8eC188ajJalElYjLOG4ZIwfh03xgu8WO6IMYKVzm4sxb9sCC/aqtJlYC2yMekb98tYzThyweDVQyvxZGqmEW21MESr9B+/HUW7GVGIimKM1DZxQgMxpr4icvxwlZItau0jSi9B1/LHOTAcVcjyl30sI4GWCEWzylfanKHGqQt73f5SeifRbQ68MexjRuG3tnXRZqB5Zjedo6DJhfsDsW85rNIMT+XrsADnAGrC0X5cJOzF35uOxoaMxGNnnWPL0poX+hkupoTEpQLJWBA9wCcHvFVDxiATMYaOTI1JeStr4bPQJQNvI+0kEY1Ej/n9NIXGUQ5gDxxvem5bqhDNfx4iuPwRxAMShTsL8pPq3C8RacUHH9xOxhv+r/S2wDA6u0/5tF2ACMiwbk9kKee4rirJDcWcL+ge+hIhV4kRZwPdIpoF2QHmbwuBle1opsoKJEagh8N5R30U8LgXVoQLIcZdQz1Xk2bdKtod5gCMBFmCuyxulogFfcjgJaYApkYsHdveIKz0TgQktWz/RnNGls3iwh0zSLIpE7pWJlFlITJ6MzZG02MHdX2eVL7FcA7OmpBMEzJVjVg6h+UJoLCsmI7gjYG3wRzLc2aLbiiCqdCX+dcCLvha1FJh23R4zpbqeTUsax7mjKGnc5TyuhzNxXpcRPYMEGVUW1mxJ4ryfQOtIU0aajMthWall0vj63k+ex1tIY9ILVOspCeh X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: snREEd5nYJONqw9oh2f758i8s81Sn80PK49W2zyci63z03naJDU74h0QrEnvgY8s3/1TYBSiE73FvCXQ6Sx3VMRtg8cC6+30qgcA28kLvmVqugvYfyF0nvsKxwEb5fbBqWG536n5r1WU9KWqzASgGHyoi+E3YhdGUElwFzuntv2QUKG3emoyTTcN7Pq41O+VhtskRu7uzEq9emHAGXYLV3Q6rTOnTSyjDJICAQDjLwl9iaJYDRRcu9vtJQQfPiIlAAGLpp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uIQ39mgYgH8GwpVYSiuNNEvUrjPNrsO5jYCCFRNwQXYI4VPJQe6zPzwuzZgAOKU94mSpLlSn6W+nUCtdeU0CdrE9LTxdecc7CpKtYCtta6yng/Vit1FJfXdoGACsMr+ihusjWFaWIisFfimC3PcMt37vhZ8Nuc2jQrWHGcFcWmnxYMStuKixmc87UIgHMpeD9RgYBQ47xkmvOj4xN7EOpKtATrZ4aIOukqAUnA9q1oD6cmlBp+pNrUArkL5pWrJRleLBsX2b15rjNM2p/8JfB9bEVMlNzBnwO7swsRww= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4ff27c33-4d34-43d3-9827-08dd70417020 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:47:31.6417 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cTsl9o6n2cvo2LLSVyJ+HCXEt8Uc87nZoXmTnZsFbvyCJGhiusCPZXreOlxOTxx0wByt6J3fJmr8UWBgzgUiHATdkhmo7p5nrHp1Lv2XWPqE65g0z7ASODfZ8ws+QFbS X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY7PR01MB13744 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:47:41 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18428 From: Biju Das commit 829356da700bbe07e13b4403997bf8c5aac64660 upstream. Add pinctrl driver support for RZ/G3E SoC. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20241216195325.164212-5-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/Kconfig | 1 + drivers/pinctrl/renesas/pinctrl-rzg2l.c | 173 ++++++++++++++++++++++++ 2 files changed, 174 insertions(+) diff --git a/drivers/pinctrl/renesas/Kconfig b/drivers/pinctrl/renesas/Kconfig index 5fc190fa2f685..6efe4bc698316 100644 --- a/drivers/pinctrl/renesas/Kconfig +++ b/drivers/pinctrl/renesas/Kconfig @@ -41,6 +41,7 @@ config PINCTRL_RENESAS select PINCTRL_PFC_R8A779G0 if ARCH_R8A779G0 select PINCTRL_RZG2L if ARCH_RZG2L select PINCTRL_RZV2M if ARCH_R9A09G011 + select PINCTRL_RZG2L if ARCH_R9A09G047 select PINCTRL_PFC_SH7203 if CPU_SUBTYPE_SH7203 select PINCTRL_PFC_SH7264 if CPU_SUBTYPE_SH7264 select PINCTRL_PFC_SH7269 if CPU_SUBTYPE_SH7269 diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 045033fc84f26..36ef1b558ae34 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -381,6 +382,44 @@ static u64 rzg2l_pinctrl_get_variable_pin_cfg(struct rzg2l_pinctrl *pctrl, return 0; } +static const u64 r9a09g047_variable_pin_cfg[] = { + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PA, 0, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PA, 1, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PA, 2, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PA, 3, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PA, 4, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PA, 5, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PA, 6, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PA, 7, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PD, 0, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PD, 1, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PD, 2, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PD, 3, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PD, 4, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PD, 5, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PD, 6, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PD, 7, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PG, 0, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PG, 1, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PG, 2, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PG, 3, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PG, 4, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PG, 5, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PG, 6, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PG, 7, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PH, 0, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PH, 1, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PH, 2, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PH, 3, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PH, 4, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PH, 5, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PJ, 0, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PJ, 1, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PJ, 2, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PJ, 3, RZV2H_MPXED_PIN_FUNCS), + RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PJ, 4, RZV2H_MPXED_PIN_FUNCS), +}; + static const u64 r9a09g057_variable_pin_cfg[] = { RZG2L_VARIABLE_PIN_CFG_PACK(RZV2H_PB, 0, RZV2H_MPXED_PIN_FUNCS), RZG2L_VARIABLE_PIN_CFG_PACK(RZV2H_PB, 1, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN), @@ -1963,6 +2002,73 @@ static const u64 r9a08g045_gpio_configs[] = { RZG2L_GPIO_PORT_PACK(6, 0x2a, RZG3S_MPXED_PIN_FUNCS(A)), /* P18 */ }; +static const char * const rzg3e_gpio_names[] = { + "P00", "P01", "P02", "P03", "P04", "P05", "P06", "P07", + "P10", "P11", "P12", "P13", "P14", "P15", "P16", "P17", + "P20", "P21", "P22", "P23", "P24", "P25", "P26", "P27", + "P30", "P31", "P32", "P33", "P34", "P35", "P36", "P37", + "P40", "P41", "P42", "P43", "P44", "P45", "P46", "P47", + "P50", "P51", "P52", "P53", "P54", "P55", "P56", "P57", + "P60", "P61", "P62", "P63", "P64", "P65", "P66", "P67", + "P70", "P71", "P72", "P73", "P74", "P75", "P76", "P77", + "P80", "P81", "P82", "P83", "P84", "P85", "P86", "P87", + "", "", "", "", "", "", "", "", + "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", + "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", + "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", + "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", + "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", + "PF0", "PF1", "PF2", "PF3", "PF4", "PF5", "PF6", "PF7", + "PG0", "PG1", "PG2", "PG3", "PG4", "PG5", "PG6", "PG7", + "PH0", "PH1", "PH2", "PH3", "PH4", "PH5", "PH6", "PH7", + "", "", "", "", "", "", "", "", + "PJ0", "PJ1", "PJ2", "PJ3", "PJ4", "PJ5", "PJ6", "PJ7", + "PK0", "PK1", "PK2", "PK3", "PK4", "PK5", "PK6", "PK7", + "PL0", "PL1", "PL2", "PL3", "PL4", "PL5", "PL6", "PL7", + "PM0", "PM1", "PM2", "PM3", "PM4", "PM5", "PM6", "PM7", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "PS0", "PS1", "PS2", "PS3", "PS4", "PS5", "PS6", "PS7", +}; + +static const u64 r9a09g047_gpio_configs[] = { + RZG2L_GPIO_PORT_PACK(8, 0x20, RZV2H_MPXED_PIN_FUNCS), /* P0 */ + RZG2L_GPIO_PORT_PACK(8, 0x21, RZV2H_MPXED_PIN_FUNCS | + PIN_CFG_ELC), /* P1 */ + RZG2L_GPIO_PORT_PACK(2, 0x22, RZG2L_MPXED_COMMON_PIN_FUNCS(RZV2H) | + PIN_CFG_NOD), /* P2 */ + RZG2L_GPIO_PORT_PACK(8, 0x23, RZV2H_MPXED_PIN_FUNCS), /* P3 */ + RZG2L_GPIO_PORT_PACK(6, 0x24, RZV2H_MPXED_PIN_FUNCS), /* P4 */ + RZG2L_GPIO_PORT_PACK(7, 0x25, RZV2H_MPXED_PIN_FUNCS), /* P5 */ + RZG2L_GPIO_PORT_PACK(7, 0x26, RZV2H_MPXED_PIN_FUNCS), /* P6 */ + RZG2L_GPIO_PORT_PACK(8, 0x27, RZV2H_MPXED_PIN_FUNCS | + PIN_CFG_ELC), /* P7 */ + RZG2L_GPIO_PORT_PACK(6, 0x28, RZV2H_MPXED_PIN_FUNCS), /* P8 */ + 0x0, + RZG2L_GPIO_PORT_PACK_VARIABLE(8, 0x2a), /* PA */ + RZG2L_GPIO_PORT_PACK(8, 0x2b, RZV2H_MPXED_PIN_FUNCS), /* PB */ + RZG2L_GPIO_PORT_PACK(3, 0x2c, RZV2H_MPXED_PIN_FUNCS), /* PC */ + RZG2L_GPIO_PORT_PACK_VARIABLE(8, 0x2d), /* PD */ + RZG2L_GPIO_PORT_PACK(8, 0x2e, RZV2H_MPXED_PIN_FUNCS), /* PE */ + RZG2L_GPIO_PORT_PACK(3, 0x2f, RZV2H_MPXED_PIN_FUNCS), /* PF */ + RZG2L_GPIO_PORT_PACK_VARIABLE(8, 0x30), /* PG */ + RZG2L_GPIO_PORT_PACK_VARIABLE(6, 0x31), /* PH */ + 0x0, + RZG2L_GPIO_PORT_PACK_VARIABLE(5, 0x33), /* PJ */ + RZG2L_GPIO_PORT_PACK(4, 0x34, RZV2H_MPXED_PIN_FUNCS), /* PK */ + RZG2L_GPIO_PORT_PACK(8, 0x35, RZV2H_MPXED_PIN_FUNCS), /* PL */ + RZG2L_GPIO_PORT_PACK(8, 0x36, RZV2H_MPXED_PIN_FUNCS), /* PM */ + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + RZG2L_GPIO_PORT_PACK(4, 0x3c, RZV2H_MPXED_PIN_FUNCS), /* PS */ +}; + static const char * const rzv2h_gpio_names[] = { "P00", "P01", "P02", "P03", "P04", "P05", "P06", "P07", "P10", "P11", "P12", "P13", "P14", "P15", "P16", "P17", @@ -2251,6 +2357,43 @@ static struct rzg2l_dedicated_configs rzv2h_dedicated_pins[] = { { "ET1_RXD3", RZG2L_SINGLE_PIN_PACK(0x14, 7, (PIN_CFG_PUPD)) }, }; +static struct rzg2l_dedicated_configs rzg3e_dedicated_pins[] = { + { "WDTUDFCA", RZG2L_SINGLE_PIN_PACK(0x5, 0, + (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | PIN_CFG_PUPD | PIN_CFG_NOD)) }, + { "WDTUDFCM", RZG2L_SINGLE_PIN_PACK(0x5, 1, + (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | PIN_CFG_PUPD | PIN_CFG_NOD)) }, + { "SCIF_RXD", RZG2L_SINGLE_PIN_PACK(0x6, 0, + (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | PIN_CFG_PUPD)) }, + { "SCIF_TXD", RZG2L_SINGLE_PIN_PACK(0x6, 1, + (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | PIN_CFG_PUPD)) }, + { "SD0CLK", RZG2L_SINGLE_PIN_PACK(0x9, 0, + (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR)) }, + { "SD0CMD", RZG2L_SINGLE_PIN_PACK(0x9, 1, + (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "SD0RSTN", RZG2L_SINGLE_PIN_PACK(0x9, 2, + (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR)) }, + { "SD0PWEN", RZG2L_SINGLE_PIN_PACK(0x9, 3, + (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR)) }, + { "SD0IOVS", RZG2L_SINGLE_PIN_PACK(0x9, 4, + (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR)) }, + { "SD0DAT0", RZG2L_SINGLE_PIN_PACK(0xa, 0, + (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "SD0DAT1", RZG2L_SINGLE_PIN_PACK(0xa, 1, + (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "SD0DAT2", RZG2L_SINGLE_PIN_PACK(0xa, 2, + (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "SD0DAT3", RZG2L_SINGLE_PIN_PACK(0xa, 3, + (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "SD0DAT4", RZG2L_SINGLE_PIN_PACK(0xa, 4, + (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "SD0DAT5", RZG2L_SINGLE_PIN_PACK(0xa, 5, + (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "SD0DAT6", RZG2L_SINGLE_PIN_PACK(0xa, 6, + (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_PUPD)) }, + { "SD0DAT7", RZG2L_SINGLE_PIN_PACK(0xa, 7, + (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_PUPD)) }, +}; + static int rzg2l_gpio_get_gpioint(unsigned int virq, struct rzg2l_pinctrl *pctrl) { const struct pinctrl_pin_desc *pin_desc = &pctrl->desc.pins[virq]; @@ -2761,6 +2904,9 @@ static int rzg2l_pinctrl_probe(struct platform_device *pdev) BUILD_BUG_ON(ARRAY_SIZE(r9a08g045_gpio_configs) * RZG2L_PINS_PER_PORT > ARRAY_SIZE(rzg2l_gpio_names)); + BUILD_BUG_ON(ARRAY_SIZE(r9a09g047_gpio_configs) * RZG2L_PINS_PER_PORT > + ARRAY_SIZE(rzg3e_gpio_names)); + BUILD_BUG_ON(ARRAY_SIZE(r9a09g057_gpio_configs) * RZG2L_PINS_PER_PORT > ARRAY_SIZE(rzv2h_gpio_names)); @@ -3159,6 +3305,29 @@ static struct rzg2l_pinctrl_data r9a08g045_data = { .bias_param_to_hw = &rzg2l_bias_param_to_hw, }; +static struct rzg2l_pinctrl_data r9a09g047_data = { + .port_pins = rzg3e_gpio_names, + .port_pin_configs = r9a09g047_gpio_configs, + .n_ports = ARRAY_SIZE(r9a09g047_gpio_configs), + .dedicated_pins = rzg3e_dedicated_pins, + .n_port_pins = ARRAY_SIZE(r9a09g047_gpio_configs) * RZG2L_PINS_PER_PORT, + .n_dedicated_pins = ARRAY_SIZE(rzg3e_dedicated_pins), + .hwcfg = &rzv2h_hwcfg, + .variable_pin_cfg = r9a09g047_variable_pin_cfg, + .n_variable_pin_cfg = ARRAY_SIZE(r9a09g047_variable_pin_cfg), + .num_custom_params = ARRAY_SIZE(renesas_rzv2h_custom_bindings), + .custom_params = renesas_rzv2h_custom_bindings, +#ifdef CONFIG_DEBUG_FS + .custom_conf_items = renesas_rzv2h_conf_items, +#endif + .pwpr_pfc_lock_unlock = &rzv2h_pwpr_pfc_lock_unlock, + .pmc_writeb = &rzv2h_pmc_writeb, + .oen_read = &rzv2h_oen_read, + .oen_write = &rzv2h_oen_write, + .hw_to_bias_param = &rzv2h_hw_to_bias_param, + .bias_param_to_hw = &rzv2h_bias_param_to_hw, +}; + static struct rzg2l_pinctrl_data r9a09g057_data = { .port_pins = rzv2h_gpio_names, .port_pin_configs = r9a09g057_gpio_configs, @@ -3195,6 +3364,10 @@ static const struct of_device_id rzg2l_pinctrl_of_table[] = { .compatible = "renesas,r9a08g045-pinctrl", .data = &r9a08g045_data, }, + { + .compatible = "renesas,r9a09g047-pinctrl", + .data = &r9a09g047_data, + }, { .compatible = "renesas,r9a09g057-pinctrl", .data = &r9a09g057_data, From patchwork Mon Mar 31 10:45:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033479 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97648C36010 for ; Mon, 31 Mar 2025 10:47:41 +0000 (UTC) Received: from TYVP286CU001.outbound.protection.outlook.com (TYVP286CU001.outbound.protection.outlook.com [52.101.125.68]) by mx.groups.io with SMTP id smtpd.web11.48856.1743418056594779596 for ; Mon, 31 Mar 2025 03:47:36 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=FmuOoLSS; spf=pass (domain: bp.renesas.com, ip: 52.101.125.68, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bo0S+yLLu0yQdycd444xgnedkBUxpFncYigrNH9U/jam/EVJfyIQd2xU1LAU7DvD9OVjdiS+VJpivdrYQwYoL6BOp/QnlI7iOVp/3VWi9mNuq+TMZr/ySp/s3jg4H3/JSAsAXK46Dol+yYOcIaaqj+zZV6s0lo0nSInKuPCyo+piSUhTilCvc4YIMtJeXg9x1TGG1bLr373klHobxeLbtZEOemo3pY+h2vj072BSi19vFs9qzIXNE2PXw3vmq92W1GBusFbRk0RE7j2u5WcEKZ1k9SP7USFoLyN7TQvtGMIF39TruJdVxlC/BVS/DaBYRXVMexvwztV1osO8lJLTRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1WIp7aWVTjzgOwAeJb1quSACcHV5RiJVmzdzQTCJpjI=; b=OTJSvIdTXrJedqHVGluYnTwD6A7bzgGRyjjHCQXqPBMwZeeSxbg3ozLY0W0YoXBcm5RDTAQudnMgEPfOt4Bvst3LDYyoM8PxnNd7D1NYHKeJ/k8053pyA237TAAOcnxZybU9bYXnmTzbYg582iAWJeSoSIqN/TFs6+B9jDwhNwos3wABHhtYXR+UsjAWXql7M4y20nm3DKQ4+eO9oI4i8Op76v4nz3CUnp0KRGMP5BsSmk8rE2zjvfuLtvXcxeorD0Ixxt8mBxAp1oMxP5ASGTn2kAILukIzQ2dj+RMG80mW2JkxmBBQPJjs3eF0xMZc5ZtCBciimy18bogycZ5UzA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1WIp7aWVTjzgOwAeJb1quSACcHV5RiJVmzdzQTCJpjI=; b=FmuOoLSS/ImZoCwNkt/sM7t8pdEHgb4Qt4562r/2qVJYSVCo35vuOUCJR3GR/9Dqw7eUnZ67CyD8Wh+7xHIm5v0TGqk4Me8eEBd6sXXiJMdPENapT9vnzSeOzf4hkyvKHVP6JwK2S7wpL/cTz9A8ZMDsZbP5d55XamIwZlFM4Zc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by OSCPR01MB13299.jpnprd01.prod.outlook.com (2603:1096:604:34f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.31; Mon, 31 Mar 2025 10:47:34 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:47:34 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 41/43] pinctrl: renesas: rzg2l: Fix PFC_MASK for RZ/V2H and RZ/G3E Date: Mon, 31 Mar 2025 12:45:12 +0200 Message-ID: <20250331104514.79090-42-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|OSCPR01MB13299:EE_ X-MS-Office365-Filtering-Correlation-Id: 179182d7-da0d-4f11-b237-08dd704171ee X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|52116014|376014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: zw9o8j7vwPwgZppBE+o3tReAMjRwAGwPMkOla1RHaJU42Iv17QWmd0wVfcMIYOrgeitV6Uo3kPTT333IqJ1pPLsWoVAe+I4/7jHUtuDwYkJ5KWEovTuvFVzLL1szx1pi6voW5VxDofJTR1D7NnefEOtNK65hn0mdfcSDRMCj0XkDKVdrycO3rSl48OLxpx6DtEdTxZsw+lpqIucE3jNJHdoXK4xsvrW0us8vMRqk3p/rZJxEBn6IkWK4nPynVW8rqqP0gsSQ2bMAmDFt4ivFmTIP1l7dQ5ExsvLJhQSK0QIe3IChzWTVPlBZu58s5fK9+XSCTdTvqzqk5NIO2fUnmHxlRppbFOy3x4PkDwXacm8JUTezMgdaLydYq0SYMW0aOOVklLUoYJwIoae7ck+MMtue8+uWu8IIQUbF5+MbcLCbvVsrIQe5FsxBMWCg6lzPnTvbUQ6UMgQsBneI5ZHnyMEz34WTvVLWOUTa4gm9wV8B8B3kqxSQRJWp7sPyP/2UCpET7aXRYz16JVkD9nOfGiHdXpxz/ZZwWh1H4XG9wrJr/ctm26b65GXzxCvhU+nqIkBmVR/Nnbm8kSD1+0Wq2hV8N8OEje0vHJsmtPCvvWdHIU3g5FxYJO83VM3oJvl33Y0NSqlXpw/xoAXj/El40yB/DQ/u8kv0ELeHEOr1v2xNyZ2eD8Vj3gufQXTsXqp3XQ9su0svbgF+QPaP3n+IjXZtxqNuydKOSmYRZtJX+UZbAbasE0ZRK0QbwPESb3nM44EYpylW0ZcHUgvAihgg9Am9My9Y/cnX9eCJ2yHz+j7EQzmDYm/xSLlJxyaDkCod/C7hWPSd8lnOfX7N+19uPlnog6ctsr7keh9VAk9CfGQ3026WgcCWEQFPaQseNiyyjTgmCpe9l85Zo3/Nms4l4StaAVIhdVNrGNbNjhCrqwFgCN/PZ3fxlpW9pTtG8C6PXPxS394u2H3wUxy5XEFLDUH1GVZmVgi4UAfLq7gLWTUvfBy2LJCbofwzTMJDu+ovKnPHREHTVxX9/O4R2IZK5fjwxcVKX9ujBMtC8PoVvuBV1bOYz2HZp7qU2Z+ptbdccay5ryi0VYyb1sMBlkkx1vkr7HpABbnk2jqFmkPVq4D+fHQ+aYocu35MNUWn3UdmAmJrASezHKKK+4wYC9qMqwFncmfKwDlPCSLtOg9FQifCyjqDkY9E36UOuyIBNzNzofN3TpYNZ9UIvRmNDYPGJ674c4PdiXWV0+5hzgflBfw6Q07VrJyO3tH8LcIKAwrp+mGjLE4Co7DkGwgiWhIYvp25k/KOioBJohyr4lYFwql+6tNchngfBXf+GvcoQPmI7GtGWfOPVdUyOWawHP+9AK79P4utcs0lCOM5ODo0UosXUx1f6iuR54vs3EVeRY1375WMRsIsM7V3J5V3iFndxF1X92z5iIwHL3IuEhBZ9OAlRG7NUKFC5rbr4YXlDJQA X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(52116014)(376014)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 7tuU/HP57KkTii7nEnmxKUekLsR+YEsPiTnMOidevpOlbDNW++Rv6iGw0AThQcTJGPqguchn/ViwmDCW14tbGZStWeqHP7B398MuLbGBWtFUJilaI7RLOon1SDuvFWUFswheX6rlmyEdVAzhJzZJZcYv8B1D1oWNAj8CXoA3vY2/FU+dcz5NgxqaMEuOsaRIvkD2irrGS9OO7DzxdTKSI1aRtVIHuXbkIi7TXpKSK2Nx1NLAHqqm2lz9dT+VeUOLbWLcRpWnGXo+T1fBEsJbdgNeqdm/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IN6Ru+Y8aQl6LMeWz4tEd9EzYsME09kJe6QZRNCK0h0YF0GvgP+CavOTCPqgqZzSpbGry29bKA5GEfa+dm2Rt+c1ExK+h49NFh1W8fn/4nCOLbv/sFL3y31Ac2ihG0UrMP8dM65NaRJ0VXFUnYvmVixPRKIhKsMxQEPcYaz5ltslkpIVwgbZPqOtMkENt0+6kqIx022Dsr+3Vb753FsWxyHcuM/wuqFAGidw/Pu7crVaE1QiXwawTe0YPWd1spLezGR4+XgYEZ3ODY1btXEJkrQXrdjkoqjAW8= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 179182d7-da0d-4f11-b237-08dd704171ee X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:47:34.4504 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IunoxkcJz0+2hIUP/9LvW706+zQ6c6ebKHu3ddnEtVEQHba/gKHoA8Y1/54AdPaoFM3Gh7hXll90ZdApwNwrAwEelcHXlOrS3C04n3GYnCtxlAoiOIKvJ+6uRd976TG+ X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSCPR01MB13299 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:47:41 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18429 From: Lad Prabhakar commit accabfaae0940f9427c782bfee7340ce4c15151c upstream. The PFC_MASK value for the PFC_mx registers is currently hardcoded to 0x07, which is correct for SoCs in the RZ/G2L family, but insufficient for RZ/V2H and RZ/G3E, where the mask value should be 0x0f. This discrepancy causes incorrect PFC register configuration on RZ/V2H and RZ/G3E SoCs. On RZ/G2L, the PFC_mx bitfields are also 4 bits wide, with bit 4 marked as reserved. The reserved bits are documented to read as zero and be ignored when written. Updating the PFC_MASK definition from 0x07 to 0x0f ensures compatibility with both SoC families while maintaining correct behavior on RZ/G2L. Fixes: 9bd95ac86e70 ("pinctrl: renesas: rzg2l: Add support for RZ/V2H SoC") Cc: stable@vger.kernel.org Reported-by: Hien Huynh Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250110221045.594596-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 36ef1b558ae34..6e57153286828 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -158,7 +158,7 @@ #define PWPR_REGWE_B BIT(5) /* OEN Register Write Enable, known only in RZ/V2H(P) */ #define PM_MASK 0x03 -#define PFC_MASK 0x07 +#define PFC_MASK 0x0f #define IEN_MASK 0x01 #define IOLH_MASK 0x03 #define SR_MASK 0x01 From patchwork Mon Mar 31 10:45:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033481 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98003C36014 for ; Mon, 31 Mar 2025 10:47:41 +0000 (UTC) Received: from OS0P286CU010.outbound.protection.outlook.com (OS0P286CU010.outbound.protection.outlook.com [40.107.74.34]) by mx.groups.io with SMTP id smtpd.web10.49100.1743418058978427029 for ; Mon, 31 Mar 2025 03:47:39 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=Ol8gH21G; spf=pass (domain: bp.renesas.com, ip: 40.107.74.34, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MRJU2ZGSlEybFn3b8SNqiSGaJBuVafcecNhAMA7+a9pUhO40VXwr6yzWCwtvtjaM9DgVqOG5FTBliVpZV7AVhxrZhZWAKYjrwUAd4Hm7pdAfPpGG8rH/bCe2x3bXQI3vBVazfBBv/kyMn9+gVeZQvNQwiTF1KYaUe3ieHr0MzsFl5z0h8q3jJk2m9uYNNavpewVDGIb7rXI4BxEPsqH/Om9gbf1LoXPDqmFHwXi5JbWRFnty7BYn+uZoXvON9Jj+TROqI49oUxvFgPqiHSwnlf3OYeusQZbwviUnifV2O3/Cs56m1Yq3Eh1MnBR5Y3sxBNdnTMO+28ZZoTrVDvNdXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5Yq9Jz04NjuZNbgb4MZkft1h7sVkRAZ/Ed1ufs3vzjU=; b=MwCXEWpx0QMP1030j3/pXBYSgYYDw+tRK2uswa4GQ8TAU3LJPAAUhvwm3KrpfzrtyYP06ahowMdhzFFDE1ZNSFF71UoIiadLAmsDiC7Wyc3dSgD5VVoxXcwibapID0uZrGRrBak07c+uDSzE1F1YK+j2en8UPvuoP61b4i/o/Oinw+mfBOi+7PxoLFmC6T1jn609tYNBgGfsQHRoTnSWn9sX+aELS2zbge1JUjxZn3D4M/+ewE/GT9VPbGcHxn8KhUBrZkfYeRZvsqf169JsunqWsP0TQqysI1EFMBtLvqrPbbSn4GZeMCB8ZVuwZLxKOdzWPr8GVPbTHzucuXH94w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5Yq9Jz04NjuZNbgb4MZkft1h7sVkRAZ/Ed1ufs3vzjU=; b=Ol8gH21GWTEJNmsm4ojMkZyV5brCwmEJDgKuKSmrkvDB4h7ZWi9TyWHVjsuII/OZrgYeyAUsif/GnLvrRkBBUEZnvAujOThTYFPbvjTXnLozAPgj95vdulPBfJ78QmStbaNIpuwf92GTLoma8VqrB78QmzFzaJvdqtvBv5UuSGQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by OSCPR01MB13299.jpnprd01.prod.outlook.com (2603:1096:604:34f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.31; Mon, 31 Mar 2025 10:47:37 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:47:37 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 42/43] arm64: dts: renesas: r9a09g047: Add pincontrol node Date: Mon, 31 Mar 2025 12:45:13 +0200 Message-ID: <20250331104514.79090-43-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|OSCPR01MB13299:EE_ X-MS-Office365-Filtering-Correlation-Id: a9c41809-9a35-48f9-4309-08dd70417399 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|52116014|376014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: KqTEFu+GN3kqsYOuhiRKgs7I33hHa6pLsxDy7Dzj09xki6zURrJGbuZrcDWq0dahnTejiApDnb5L6hf8Ia4Jo0plRNe9ivIrzwjQhuICfyZNXcwrZXfqm2tjWvAa2QERoNfVju846s8wPRK3UGds0F+kXPBIWZEcK1XxI+wBejKwv3LD5Z8+Kt80MWF20HVPFA+m2Pxk02v13jUoqF528NFFJ/l0NhDjA42kCTVcmdwkNx0HjkTgX3n3etKOut7r40fguiwpBskHF/9Ds51lkaBaWg3qisdvpGeXXGuh1SWyQawLMnUfeTpS6DuPRZrVe4GVYSuj9U70bYOj67VmhqaygOcTwf1D9z/FJgbjEMMOqFtzI2IoTjt4EopO+qeIKaAxVNYBdCwA/3rqlyZoBmWBXF7za66ykTVUemzQtd46+kIwtQwEF19r9miNh6tJIFSu0WAqpV/t7touFlnIejm0Rk51Jr5gknnSEaGgtajxLiV1r2hgN9pg7hyPXN+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)(366016)(52116014)(376014)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: y321iTeL03tbueLhoaDzjoz47q57DdbmC647rUNYoJDRpnlpNfSSzUDVQS0ncjR4otHA5d2E6RBzh1hdixuYHfs0ObZ6Jaontxja2rF0nYvAOoeG8iX0uHed2n3mMbYOPUQrXEBYtvGxRSr44kLZW6mkk3muYbUjxhD+AXZr7ywAO7bvgAbKW2GrjpXVlPRGelk6JAGtM/AkcNrIUysO53W3HtLF272NqXf3TzTkzgODcjtq9nM3puBuOjPgL0Zkt+DKn7VL55x0YRISFgA7/wY3L6cQHHMrSqv6ii7ImNtHYOp3NZ1Pbv/gr1DhDDFCQ0CCsbg5pDAAgu/g8W1PzbDUzyROmbWB/+tH49dMFueDKN5a8McpENt1CA8YJlgbwjYjktH3CoTiccQLbaDfvY2Mj5EGb86CwpTwxffFVR8nOge4BNnurGnNtnPO5YvjsKFFAxTZd9L8MOYKdzUdBgmtNjY8WjFO4Odq30vhIeNV9klbEhZZUdiBEJOcRi4VtMigqEX4ElEKUvgfVBg/w9ro0REYH3AglrFLW441sw55LN5t6KHlRCQjcG7gRFHZLpbRB6Togpi+e6DoqPQ4VsDnxWonLDLsItwM2/HGmsNdTAs+7fO+DgyAekTzxvTkkFgIf0IpkK4H6BYyVf/+qQx7EOltBhZwJKlOR6a1SowFaT+lbta0yOotcq9F+dy9bP0g/kFHJeYxZKniPfd5bA439aCFOF9QE5CA9Tnga2M4xC34TqRup2Y/f7yqBSnJqklGHQMmBQuaD9Xm0ExSTW6CGv8/uMHKITF4uK0qIFWYwg8eqoh8ipOLPBlZ8a/hyytSp92YJJRymFAey2LNXJ97p+Mm4thCnXB+gfxmxY+VISKmUudhc1jcfS+nEZqM9/50y/VE3QJhkFlY7xEVKViDhXxgZxljM6Pq8S1C4Mdj4jXOIlUiEvcXNBG7GlI6eez9lxurW3oSfFpkteyQob8YhlUNo6Mq9L+daMywWHpTYpidkrffCbrs5mvgAz+GRR3b9fMVABQtuuZHcKt4H2Ly5Esz28AIQWcytNv+I0CPhmFuRR0TV0VlgJWX2CSxeu1Ghx8yWtuG1eLhv8yVHDI4j56eZjuWt12EYXCxcibn2p8lHLBH14+VCe7h5QRhnXzUGWRqjn7M0MFkN2RzWFKjuJCBuBPVzgFqJ5Y48S/Gw9LD2eiqz9+3GZfdfWkNIVk9xGltFs+tLWlArv+IpFvciEXJkRCEws3Eid6HDQUsPiHqGjaous/ix4qDqJJk8+fiGj8rdNckjPbBvGYrw6tkSXw0l+H0U3IBxQJBxv4eoTyCU6Z6QLWcPNTOn0eJ1D0tS1CvZNlnqFkk1NfO0lzcmTqwHxUJ4AlMNV4Xv95X94L3YbNHe9n8QrpZc4obD0kEwq1lRHbC8lFHZxrUVyLlX36MuckavoQCF2/F2cU18guzliRSAPzFe6YdCyzfB8Ss96GYQj5cLp+b/gZ8pD17S3nMsV4W64Yp7L71pMJP/U/ynlOBvsGeR2fNFx0tJVMfIQyYpYfEe+NSnQxVit6edEiq60iNS/8fZeYCOk3TfB1F2tqzSgaTbC/zClL1PSt5EFqBASpaTE0yUBS0zTnhtXMiQtgjcAiVC8+OvuA= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: a9c41809-9a35-48f9-4309-08dd70417399 X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:47:37.2252 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fRtIfnPY/A9W2fcpOcdA9nsCIMKssvU3sG+dLcAs4Sgogmfai75XyFcQW+7x4WZonXTtlD0C2FHDLx+Z0KtNAqdDMTgSDziV7vTvTjALf/vI4ouJKHSm0usfJGW8R/Va X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSCPR01MB13299 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:47:41 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18430 From: Biju Das commit 987040d4601e98e32c53837ef76aad115c4966f7 upstream. Add pincontrol node to RZ/G3E ("R9A09G047") SoC DTSI. Reviewed-by: Geert Uytterhoeven Signed-off-by: Biju Das Link: https://lore.kernel.org/20241216195325.164212-7-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- arch/arm64/boot/dts/renesas/r9a09g047.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r9a09g047.dtsi b/arch/arm64/boot/dts/renesas/r9a09g047.dtsi index 39a7cfb3095b0..15711f9b6038c 100644 --- a/arch/arm64/boot/dts/renesas/r9a09g047.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a09g047.dtsi @@ -131,6 +131,19 @@ soc: soc { #size-cells = <2>; ranges; + pinctrl: pinctrl@10410000 { + compatible = "renesas,r9a09g047-pinctrl"; + reg = <0 0x10410000 0 0x10000>; + clocks = <&cpg CPG_CORE R9A09G047_IOTOP_0_SHCLK>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pinctrl 0 0 232>; + #interrupt-cells = <2>; + interrupt-controller; + power-domains = <&cpg>; + resets = <&cpg 0xa5>, <&cpg 0xa6>; + }; + cpg: clock-controller@10420000 { compatible = "renesas,r9a09g047-cpg"; reg = <0 0x10420000 0 0x10000>; From patchwork Mon Mar 31 10:45:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 14033482 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 905C7C3600B for ; Mon, 31 Mar 2025 10:47:51 +0000 (UTC) Received: from OS0P286CU011.outbound.protection.outlook.com (OS0P286CU011.outbound.protection.outlook.com [52.101.228.63]) by mx.groups.io with SMTP id smtpd.web10.49103.1743418062781393708 for ; Mon, 31 Mar 2025 03:47:43 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bp.renesas.com header.s=selector1 header.b=sGbdqhD4; spf=pass (domain: bp.renesas.com, ip: 52.101.228.63, mailfrom: tommaso.merciai.xr@bp.renesas.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bWvwzCQrUm4DUIp53kCUASpfPGxVs4xwRs0nD65daLr+ts8pJlhGxA8jWeBvZCEVnf6nr9yzX9aVmNqax6CBLsXaaL0Uzzw2x1nRUm/NkbJVxgNJ1wJ6q4oNLyYwiHGUELGngnV6ORr/2g36H0iE3tI2Bw7WfMbRpQmrarLaDejahisgiWQf1CvCJwJ2HGYMiQcnBThhPbDmXN1voxFvAMcNiJ3yl4kdARNn5SYTbEtz5hjC5ZK3X48K1Z94UcDEI3KcS2h6Z1IjKviGbHxRt8g3sbDDCgzRwh7IFyAIjXduqgBXkFP46Hr9ZvfmKYExf+McGVd1Ce0E+hqqRgi2Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AEALd6uSJ63zhlZhlF6MntZ5FEmXlNSK5KCQaAtKg2M=; b=lgT//tBc/Gfu9kc9huBqSaNcUpi+AgfMfn8DFjpTHXSkrvwuGYqXpqW2ipv8gtm9SfLwUiLVev9OpUr+822lOx4D1+Stw7VwdgcOlTEFLnTJm7bkClHgnM0V8RKHDw0U5hJFStaCzf8gqWXvcf6mQzp05t7SHxUsGrxYY0+debtiQhMkj65HUNhQltFzw5TNKACLD/M3H9ie4d8jEnqZxCkHoGpQTgElgLvnbTvtCsfl67RuFOf/PL3HWlG4L50E1erlUraeYncsiJ91b+5HFC5rIgdy2BgxPesqlZlAaU0wgurFZQUHXozh5CsN1C+b2PyzL61//DZ5pMyEdPDgGw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AEALd6uSJ63zhlZhlF6MntZ5FEmXlNSK5KCQaAtKg2M=; b=sGbdqhD4j8qaN1dUqv2F9yjTpcsmIIVPLCrKr87fZKTZ4eSRX7XeIbq/36QQ3BGD1X0D2E/QQ5eEQA3acJ+BSpeDZz4I9C7QTtsQlKXaC2Gm57zJjdh5ZfG5ZyKzQjBrt4dDHoSuyZaVtCY/ykq/QoXadVc52S1PJu2AgiExfxw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) by OSCPR01MB13299.jpnprd01.prod.outlook.com (2603:1096:604:34f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.31; Mon, 31 Mar 2025 10:47:40 +0000 Received: from OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3]) by OS9PR01MB13950.jpnprd01.prod.outlook.com ([fe80::244d:8815:7064:a9f3%5]) with mapi id 15.20.8583.036; Mon, 31 Mar 2025 10:47:40 +0000 From: Tommaso Merciai To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek CC: Biju Das , Lad Prabhakar , tomm.merciai@gmail.com Subject: [PATCH 6.1.y-cip 43/43] arm64: dts: renesas: r9a09g047e57-smarc: Add SCIF pincontrol Date: Mon, 31 Mar 2025 12:45:14 +0200 Message-ID: <20250331104514.79090-44-tommaso.merciai.xr@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> References: <20250331104514.79090-1-tommaso.merciai.xr@bp.renesas.com> X-ClientProxiedBy: FR4P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b8::13) To OS9PR01MB13950.jpnprd01.prod.outlook.com (2603:1096:604:35e::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS9PR01MB13950:EE_|OSCPR01MB13299:EE_ X-MS-Office365-Filtering-Correlation-Id: ddb62cd2-d180-46e5-3e5a-08dd7041753e X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|52116014|376014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: uxQScpglp9Zhf8Ck3Q1Ry6b5MLlxK9A6xJgFtl3LFvglfxVIXpNUBDokZ/xYhsSFj/y1wIDuDAMdrb8J/cXeRyRDl6D42xRvXzydwp7Xs9CyaFVHTn2TLVZ2AZNMLNKhhIVanxdbfcTa+yUVVyJcfqX7TSio7T8gqCrB3/zMRODpFgvCR/sVlQ9mGQkJKTDOo5bNWmfBCoejAgcKIkGg0bYGnZ1EwjOsmlw/vC6fBi5Ft920OV5WorIJl/0DE+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e7QIzVQWtwkkfpUgqExXsKy2OUMLEW0d/NTlMGPt8FZdrmvfuPzOaEvzdOLvqUGquE01us+KEJqrik6Do87ywQvijDkxDFYJgeSolU6PgUiMto3zyGpTFvqR6rER8Ix X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS9PR01MB13950.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(52116014)(376014)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +mJzLNZ82+By/l+4WaniY6mzkl6tvYg82iApPYwKtzLlN7xMbABO5daC3vCbQwOF7VFyVZauC6L8cq4d9nO6Tvt5UHcuctFe5rhnQxg7s5ns/sHDB3yigm3p/DKR1c4hd7gGcLkOLUO5/qewPteCFQQYW1huD95MLwvehmwwZnkgSK7IrROdqepMHiCQAu418QWF71bOm83XZLTNoipwaV8ueG9VDY5uJLLiUsyWYwwF5VESJ8rJdHNqjDC6vG58/C1mWN8ogWfd3ergzzfUtbihsXJq37W3KRU44g4ckw5+UXMfrSiBbLkI+3UI1ZRQQlq2axMRsTWcIGsXcOezfuMy3UuFQ5zdl+a/MFziSW+a33VO/fQXJWa/zXFiEtH9Fah4LGP1bSNFLjZsaQ9mwPfa0j90RROIK9KLgTJpBlhCNq1n9Z/iEbGwW0dNv5ChjVtbSgt+bTuj4ExNmw4+LNwfD2eNJGxGCq6nShqJOeWulIBvJfjQh19hga7zuBLrzEp0qTVnfsTy90U7WXZc2Ti2DGRH/8E1ZgyzpxG/CatKqcmEEJAMAVg/iegHZjdNV3C2ZQiDZjEwKhxgIoEMX3PrmwrYOBjFrDpmmc28Pi9oxU8qf7ot7HjcqPKCJl/Fz2Bmx3o/ARj8zHAX4Q8midJIkuuy+aC9okY2yI1iB/PImo4LIzFkpYRozexsh12oMrwPy8KdUk16njvkxdQiN7wNX/yx5NfYzT2ElBeu5e6JdLI0N0hoj4AatOCiE8qefZKLScb0P7cvu1lSDWUg/EMsAFOSzLDRWokHjZAGJPvWkUrB6JWvk58+r+hs+kLouZv1PyGQEREvBJrzKzqRtE77cM5kvhNOrgxHX1abecD1Is4CnJinYXyjGE3YNb1f2/nix+mzeYcrcDQz9Snk8pKR3REbe4Rgp8G3OI4e0w7z+RbTT4yqDMHGflgOo1GmaFPcq5ZYcfN1sL/kWazRR27sxYSsiZJUkcO97A/asNbscRQf11JrZShCHyqQZE7HuiFndGkdehcW2C8b3zkyaLG9FOsdfB30/mU67gQCGWWnGHx0y62HRLp4uH/5+9hxp+vPoO709ui2jz9s3GMd9coHVtJvADX08w5obyJ0Gt9wPwfqxbo8jxqh0At3iEUMnnLhxG9OO4t8nspBuyfeYXKDKmdSmlZLKsweeag76tydqkvU5TBBA1PieMj+YW6pWJbv4mMczRffqQDv8VYP79N+CpWOy6CA7oGCIx3FcjNKdvJkE623v1ZBVFzwqo/2dG1jXEYDfscog2HFqaDlbVmoaxf2fZoImHue8hAMervvmSDw966OGFlufd7D7eWfi0s9jMdaBon8o06zSsdduCjDZUaVgqAuhFTvinKmteKOkYIlf9MD5TTyv0nKZe6cumUqd6uRsgkpLHNP2jJHb5XDTGUC9WmC+lsExCdNBkCK6cNeqzy3lfuZlktls1pwtwsi/rSLmAh2i+7FoNnJPp5MZTo+QncgO3cbJ5scqnEND+RVW0qsD+AIi3457v6R947bFO996V82g7vRG2kxMChNkVwpk1iIHr8vBUQ65q3/kIxio/a0CxiBVMYUa55CnoxF+Omg9kjnD62FT8851o//mLXYcrIdZHnjE61lsnY= X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: ddb62cd2-d180-46e5-3e5a-08dd7041753e X-MS-Exchange-CrossTenant-AuthSource: OS9PR01MB13950.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 10:47:39.9716 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gok08ZaTLmL7tMhOMupH4yloap84E6e/V0cqMPDG75C/ufuTfv9pDvyzRY/GGqrFyWnJ0dodxX5D19T18Nnp1eR+KJv17Q8qqPrpSK8Rsqp1snun9EXVGmAqI/by3yOw X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSCPR01MB13299 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 31 Mar 2025 10:47:51 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18431 From: Biju Das commit 9e269561b363038d573a69755c9eeabc9258837f upstream. Add device node for SCIF pincontrol. Reviewed-by: Geert Uytterhoeven Signed-off-by: Biju Das Link: https://lore.kernel.org/20241216195325.164212-8-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Tommaso Merciai --- arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts b/arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts index d4d61bd039696..c063d47e2952f 100644 --- a/arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts +++ b/arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts @@ -7,6 +7,7 @@ /dts-v1/; +#include #include "r9a09g047e57.dtsi" #include "rzg3e-smarc-som.dtsi" #include "renesas-smarc2.dtsi" @@ -16,3 +17,15 @@ / { compatible = "renesas,smarc2-evk", "renesas,rzg3e-smarcm", "renesas,r9a09g047e57", "renesas,r9a09g047"; }; + +&pinctrl { + scif_pins: scif { + pins = "SCIF_TXD", "SCIF_RXD"; + renesas,output-impedance = <1>; + }; +}; + +&scif0 { + pinctrl-0 = <&scif_pins>; + pinctrl-names = "default"; +};