Message ID | 20250331104514.79090-15-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 8ACD2C3600C for <webhook@archiver.kernel.org>; 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 <cip-dev@lists.cip-project.org>; 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 <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 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> 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_|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/pgLfUoWLgBFCRd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jKF3A6g4KHBPGWVSy0PnMcTLB7mYtU7ba46u9wFtuxnLHsIdbE6jy2ZiqrdYVLKH6+NVBDTyeX7H4gu3d8snbtfT+yfesUm35kfNWtC40hr4g/j6I2EYZcC2S7TwZKY0VFgbvGX4pRYCQLEk2dn1ZpP/2d5WZgqVVjsnMOnuHZ/TjHbB/CXHx5MFFfMCqHZNlsxwkR9UY2s7f1R5PJIdn0X6sy6yB+X+vPF5RGJKz6NM0qSIVVQl08zgqGzzNhMo68GXzDGCWFw1jZAZeMnj2ZPbNrWSj3UO/K9ZCX6e7UAbvEmIJiiSBephdAIh6xDZJzDZrYrnSujSuG7s95QY 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: vOrwAyph4I3hoG6NMFXBjjiMqJRIH16P9iN26bBSM1npFADzxN3S5ZXNAzt1E5x9qwquqkLxfEJlIbyyzMG13DNNZ24yvMSRXdykExJj5D9X8mWpapjv+QcK3xkOlfIq6u/FBWIYQBtqfJWAEIba0eH3M9y+1C4GXAz5q2priKwFxlrYH+ncmsg57WoctIG7Vj6cQSVhr/sedI8TJczvpKqr2woTdpUQqjMw+5yvVUAwkhSbcOz5x0XHWv4SCfC59jYXQjyJobypu8AWOJPhKS+jOAemwmqBO/Rru/BJ2bEGkh3GEe3Go7jblSJxBM19ntxrIte80OU5vY5e+DW/8qvaJAS1c6jSL5iBKMzNTBrN6C7h+paUuSUuDRxhudT/XtdJV6fqW9ElHslqOcarRmJOwLWWy4MvS6A7CUWauRVp0H/FuOcBAisF0DmwKGkbdg9EKY5iI3P1rrhbYDSniWtPPntHj1Gej8QZ+x4L/L4ujp6xz3eAyuJPNW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Xsv89Ej+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: <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:46:21 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/18402 |
Series |
Add RZ/G3E pinctrl support
|
expand
|
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]);