Message ID | 20250331104514.79090-37-tommaso.merciai.xr@bp.renesas.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <tommaso.merciai.xr@bp.renesas.com> 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 <webhook@archiver.kernel.org>; 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 <cip-dev@lists.cip-project.org>; 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 <tommaso.merciai.xr@bp.renesas.com> To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>, Pavel Machek <pavel@denx.de> CC: Biju Das <biju.das.jz@bp.renesas.com>, Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>, 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> Content-Transfer-Encoding: quoted-printable Content-Type: text/plain 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: bOrtHzeRMiP44m0R1otm3S3qV6mdVA83G6ReJZiP7df2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ehshhf6+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/swU3Pxt0CPUbx1GUQxluB8sG0G7KoVDcUm6ASkNfVoh8pAypx3f43kYSO1R5yXuavil36Zg5RxaSQm7izUJ3Aku7eg9D98oxOXrKOBslqrh8CdztmSy2K/AGKV/YKLxf7ElO7l1p65sLWalhvahp/CqAM4rOPxMxp3TbbbSbI5zHhpLmp4DZ9XBJRiQwsAke3nq7bgz5tm1j49Dv/9RcoICBTirN/ozvHGUY3q5pHWGaO4RlBdLiEiShVi8n6g/0shE6Z+YIztHkXXsuREoQkWu/0H64fL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mlvV43E9jbvikmC48t9BnTNBmKmf67V9EKAHqwy0evEWE98= 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: <cip-dev.lists.cip-project.org> 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 <cip-dev@lists.cip-project.org>; Mon, 31 Mar 2025 10:47:31 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18424 |
Series |
Add RZ/G3E pinctrl support
|
expand
|
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;