Message ID | cover.1698353854.git.oleksii_moisieiev@epam.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp398635vqb; Thu, 26 Oct 2023 23:29:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFeQzlKd06jkdihyecnSOgGZFOXIFBsJHBUxkDYfKEqJ6y9uF8CRKfyNaZVF8+W4Hfrp3kp X-Received: by 2002:a5b:b47:0:b0:da0:9bfe:3a5b with SMTP id b7-20020a5b0b47000000b00da09bfe3a5bmr7361787ybr.0.1698388151018; Thu, 26 Oct 2023 23:29:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698388151; cv=pass; d=google.com; s=arc-20160816; b=YRJlT7ajbsC8MuCXB1bAGHVxreH7YaMlCREj+kUzCirHgalMoAvaZhe/1n8h4/Va7c B+OCy7a/RuNHh8+/cNgID3yTPAaPJ/pcb79uUlei4dvtp6NMEUBx4aKxdGAsO3mhM9Yu bCM1SShoCZ3dd6KZn+Ul26tltKPjKWVz7GdWWfYR46BK6d4gNFsPFKI/nUAydqEWHdSv Bob4PNSuvhCotiekVaBMLFUWPkMjJ+la24A8Saj63R/XLa7FUQBDwQs3IWEg56dPnPIy gF1U5eOD6arFDlBfmVRPVN92+Y5jh6BJ4NuqMQuW+VgK7riKHwh3Of7Bx5IGDDM0YQ5t xQXA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=RYtkAlEceO+yGuD0orl/DE8cb9I1O5xZ54JsWJKQAbc=; fh=32Hlv+kMDXFb0ARMLWJ/tLAIo/czg3zsjRzHDHJ8aCQ=; b=v2hxmMe4GKScj7I6IB6z2r8D6xBtk+cI/mhBePPtQy307jCGZELi7UtTNhtcoxDIFp PFJeIhpDNQdlLTGS1PPEuN9fGRt2vE8q7DWEenxoMgaM1isiie3AAk27g48OuMfgNuLK N4W+HpNhXhagC97CXNJAKTcrft+9t8vhLro28S+Wffw3lSqy/MnS5W2dTWb/6pybkXue Gadld4Vj2law0olv+bBAmzUb0A9zGa9CC19ObFHDlILX+nfSpCzwIpAk6EQiwlWvwiU/ iSxSESa6KXZL0zFwWUsGt3R22e2E8b6PY/G/UfTQmrLUAiVNcPI1RL6FrHs0v1KlYWsL cLVA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@epam.com header.s=selector2 header.b=iC1fFLFX; arc=pass (i=1 spf=pass spfdomain=epam.com dkim=pass dkdomain=epam.com dmarc=pass fromdomain=epam.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=epam.com Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id g81-20020a252054000000b00da0c54653f0si1507307ybg.509.2023.10.26.23.29.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 23:29:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@epam.com header.s=selector2 header.b=iC1fFLFX; arc=pass (i=1 spf=pass spfdomain=epam.com dkim=pass dkdomain=epam.com dmarc=pass fromdomain=epam.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=epam.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 97CE682DFD21; Thu, 26 Oct 2023 23:28:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345144AbjJ0G2h (ORCPT <rfc822;aposhian.dev@gmail.com> + 26 others); Fri, 27 Oct 2023 02:28:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbjJ0G2g (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 27 Oct 2023 02:28:36 -0400 Received: from mx0b-0039f301.pphosted.com (mx0b-0039f301.pphosted.com [148.163.137.242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38A8C121; Thu, 26 Oct 2023 23:28:33 -0700 (PDT) Received: from pps.filterd (m0174681.ppops.net [127.0.0.1]) by mx0b-0039f301.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39QL6OQQ007652; Fri, 27 Oct 2023 06:28:16 GMT Received: from eur04-he1-obe.outbound.protection.outlook.com (mail-he1eur04lp2050.outbound.protection.outlook.com [104.47.13.50]) by mx0b-0039f301.pphosted.com (PPS) with ESMTPS id 3tywqm92ds-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Oct 2023 06:28:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q7ijHPTsMYyb4CaYQIZ1VnljxlzmbKreGCElw8oB24AuAEP7iGpJvK6UDro7JfQETRm8Axzf+X2d+OoyuvsQwVFmu23Yuh7gGsZhoLzuv+CU9igSTtMH3jpJaZxLhgoUd9oieYLIcReepOxceXpYl6vRAKgtuzX97Q1QNsuGFm2acys9gSJJiSg7yYyu4moNB8CGSxs6mNfpGGcOn3oZ4QpE1oNehDp5g+PeJeWy3lVWRcb7181QVtWUMD1kJshXjYNPktAU9M8ZU+iU08D/sIuqXuJKDNTz1T2lFhPSl6FU9Lv+nngmhdXRZ3oJpz5rF4mLcpkpjJSK3iOf+rv9nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=RYtkAlEceO+yGuD0orl/DE8cb9I1O5xZ54JsWJKQAbc=; b=nf292aH73apVAEosZ7oUjFgluFmqwbLsv1L4GLUGf7e4zgosWyaXohs2P3qyPtX5hsCFyldFNcQz1dSXyy9FBGrbd+Y8iN4lu6uMbdt4XwGnTn1NKbCzOx9T/E7JDTxwUKymV/+Pj7aGwLt20YgBliZNq1h2F5Pf6XWxv2Hp+bMjKjpJGLbsyq+7ii/+WRJwDetXExRTiyZOt6OBQV/k0t4YR6JtkVJTc4rvmFiMKi7Ru6rcJCzftqVEZ7PqoZ+BqeY6HM7DuqEN9Xy2gEHEsfAK4KtoindYX+yecGzaUVBZQ4m5/WW32vUB33JlkIsCBIgQtLsB/6vliMGzKK1wZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epam.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RYtkAlEceO+yGuD0orl/DE8cb9I1O5xZ54JsWJKQAbc=; b=iC1fFLFX4/7mYuxhvjKJYZ+DsYbEfQaTgUrTIK3OKoXaq0jy086bSEL1Gj5XXSjrmoah5AOLqrD/uegYPx/6ZufGupHfCi/vdm17h04mMEKD5L6PTKM+0KcWFimJ8RV8FQ0ReIOVAXCjxV4E4lgkQ3xqDlI6Fwhsg18CvIlWH/51ZmD7Fx2UZ9wNIFxHKjbh7UKQD1laGiyBvdTRXYCBj+6GxSfFez+bR1sG/plGE7T30ec8+Q5qA/gZpEuybOUVqcZaJ/UB1zOFugwXy7O/R0V//wsFG9pazzlZzWTXcp0qJM4MYegFD4zQE40twtBig0wHYzOVyu1sv2Uku10VBQ== Received: from PA4PR03MB7136.eurprd03.prod.outlook.com (2603:10a6:102:ea::23) by GV2PR03MB8876.eurprd03.prod.outlook.com (2603:10a6:150:c0::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.23; Fri, 27 Oct 2023 06:28:08 +0000 Received: from PA4PR03MB7136.eurprd03.prod.outlook.com ([fe80::2211:9053:228e:4e40]) by PA4PR03MB7136.eurprd03.prod.outlook.com ([fe80::2211:9053:228e:4e40%3]) with mapi id 15.20.6933.022; Fri, 27 Oct 2023 06:28:08 +0000 From: Oleksii Moisieiev <Oleksii_Moisieiev@epam.com> To: "sudeep.holla@arm.com" <sudeep.holla@arm.com> CC: Oleksii Moisieiev <Oleksii_Moisieiev@epam.com>, Cristian Marussi <cristian.marussi@arm.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Linus Walleij <linus.walleij@linaro.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org> Subject: [RFC v5 0/4] firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support Thread-Topic: [RFC v5 0/4] firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support Thread-Index: AQHaCJ7ACAlvqIOT5UmCfLuND/6RYA== Date: Fri, 27 Oct 2023 06:28:08 +0000 Message-ID: <cover.1698353854.git.oleksii_moisieiev@epam.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PA4PR03MB7136:EE_|GV2PR03MB8876:EE_ x-ms-office365-filtering-correlation-id: 78ea7828-0127-40d5-e1f4-08dbd6b5e2d4 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Yt1g1FfCPe3DCHtX48TVkUBo8LzhKZm7Hm3biudaB+aEz7X7CziD0+J6lDgu6Qo2t4EBHKjKOKvWJHVlEYs6cUYRUGBgcl/c33RqgtjySKJPq0o3UXBTYtzdGsdivaDGM0vrJepFVd/2PJzLKquHs4YTsoAHZ0Vm6SvwfzwdlNY2S7C8ngSFQoUuy6/Hxlu9KqJdDmz8yHijr6jzIJBVPbfFc5CFiHJWnBst/OgqMX+Y1G2VFMT0bawr+LC5Alu0P1HImf113Pil2DvzHM/KgijDTBVz5kHxB3wyn1+l18nON4APJeRfBCZ2zHbrB/0sF/iRnddt1VrOag7WNOZ9C6vfbU3ZQLvUxiFXy+nzP0sM2KWiayCKdIplihCEusvDliSrlLCyaJUgvwyZa/Cg6lJgDyOxYYVStx5jUuneuQ7N4eS9ZvP1XqDhYGFTrVPc0nl2plTapfwAYZp251sr/vUX7iduJKY4hsMJSUSJrndzWwTOWSSk6spbtd5s02xWZxf2HxhFX+8xHSDl2xoAbNMNwOJDDr0Lu0/MZF6lXish0jKD/N/6KecaPM8cgC0kqNN97WUd8tenPI733u/P8KoS/tWPWMsoN0gEhu9gCNc= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PA4PR03MB7136.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(136003)(376002)(396003)(346002)(366004)(230922051799003)(64100799003)(451199024)(1800799009)(186009)(2906002)(478600001)(966005)(6486002)(83380400001)(36756003)(86362001)(8936002)(7416002)(4326008)(8676002)(26005)(5660300002)(38070700009)(41300700001)(2616005)(66476007)(66556008)(66446008)(64756008)(66946007)(54906003)(91956017)(6916009)(316002)(76116006)(38100700002)(6512007)(122000001)(71200400001)(6506007);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?TikXYtf6QLp7pVWdJdDTMH4?= =?iso-8859-1?q?XR1zRe6NcV6fgXgItnvvruy4qSxQIASctfO9pwabtwpSFvwCZqey7C/i7lle?= =?iso-8859-1?q?uxI2CzwbXYojNsdrV1usR/nm4JPyloqXkvl9/krYnpiYXiFdKOxjtzREfokI?= =?iso-8859-1?q?kSHORwmIytiXYXOPWLsHPrp2wo9fFjl4DpP4kXeOOtehNypbFpX3wfl62Sve?= =?iso-8859-1?q?o60T4H0CrkdFAdfDZLpgz20AgrpUkLd6AOsoYCdAz4JgX4MFD6h2HXXlnp1b?= =?iso-8859-1?q?29rSqJF2Pr7CrfM68kjJPQ4zebo1jL5Ti6xZDPaGl2bU0PxNHO9JpZ06CrL6?= =?iso-8859-1?q?9hHNU/pqw4i58oBAX7NkDyyB4hizrK29aCgZxcy0p1DQH8gjsOchItxZx33W?= =?iso-8859-1?q?c0diSwhgNDZIgUiFZNAbDD05Z4G3GvsYgzF4RIP8cXQNlYGaRu/UFA+9oySM?= =?iso-8859-1?q?me++QU2tLMS5rRYZA5CycISOi6w51a313HsZ45fpglFvqyCEFfvVU5nKD+o+?= =?iso-8859-1?q?qR6K9NB1+rQzH1hS14e9RGLGbyNim4A3hnjjJSKUzxBqAWjHA0amiB6Z+YZd?= =?iso-8859-1?q?LFwArmG7zTjhWlcp0kq3itwt2r/UfpzuAwWabtYpSUhwPB7jRFz/6u/F8Tdt?= =?iso-8859-1?q?8j2tFAy2u7ufgPoA3ckKSJA92MViKUkx7FICTUAmQdnx6MwygOE/WvIFpGT9?= =?iso-8859-1?q?g9TkRaw+YyVdRLdbZIpIHok5baVRH03msDz7cn68uRLXBX6mg2SNSxT47I0A?= =?iso-8859-1?q?a8ImMZaHsZFvdoUeNRQP/Fjtn/P6a2hJupCYMYkbdewC38IeENRQvDpAGMl+?= =?iso-8859-1?q?BgtbRcHrI/cZXJsMfjkkzr5DU2U10nRZeImkAY1Hqvp5eKrJObPEMKNXCQbI?= =?iso-8859-1?q?TrZE7JkvbO9hv7v44F7BsIVCZkRQok3i3SlfJW8pBYOmIQzj7EcAoFh1Wdo0?= =?iso-8859-1?q?IE+e7mlVZ7PZTQEosalLfP+HZU9JofrTmxUT6oRylWSgNorYofrJ7jWrb9C2?= =?iso-8859-1?q?jqFhMWM/O7QJOn0dyN7/BxO/oiRC+edX7ewg15hEtMJ/7uKY2OY/nM6ns2ij?= =?iso-8859-1?q?6fJembe/8qbcr/oiFrWoUuX0mBlKSh0BHzT5ZVAgQB8X8q4ctkRbwZjOmC2F?= =?iso-8859-1?q?V/hfKVf7qzHFvao+Gc3z5gushwQc+4N7mWVBeSz6CkcOmEXYG685MBUZkLyg?= =?iso-8859-1?q?fuVANkUh1pAzHe7xB8nl42Zg1E6EiCb1E+Ioe1kkXc65tgvh/F200S6GG9XM?= =?iso-8859-1?q?AKKFhSsqrjAIVyaUe9MfPsRegloxnRTp9A808ieiQ9/EOHb/tgss2ZM+P3qC?= =?iso-8859-1?q?QuXKIXEBbVWwNFOiJL86yzEFKnjdcaeQk1/T6PGKsMPcIrNLYVVgs6daSxD1?= =?iso-8859-1?q?NgbQzozJ98rTAWybCPhZhMz3srp9Y7hx/7HozViRcgx+ejsF6JU1XcyMGu6f?= =?iso-8859-1?q?Ajd+ABYCe3tvvu2V80eTt3hZ6aQDEVQLZrParoqfptyYr+PzBqZWnWqcfqq6?= =?iso-8859-1?q?iIl79AG/EVwI+l2ZRfkGdxfJaIpGX95jzz7/s2DsbWE1m3nLGcPpzRG5ya/D?= =?iso-8859-1?q?8TYNh8A0CtrzovTeHv2OxjjCa8sja7GMiKM3Hs+2x8QHUUEhbkJ9RD4BfCzd?= =?iso-8859-1?q?54SrXr7cCAgxahqRHjGTZwo6djT4H62HMRuCbvg=3D=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PA4PR03MB7136.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 78ea7828-0127-40d5-e1f4-08dbd6b5e2d4 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Oct 2023 06:28:08.5596 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: d40bFyV33V9bRjPh1p+IN4Ntj0Ju4/o+2gGu5wWLckGhdv354DMo/H2XoT9DPq2tNp1vVW3/hg2A23+rInSirQBZlESAsw5EQe8tZzD6n5A= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR03MB8876 X-Proofpoint-ORIG-GUID: DEwCY_cik6MKLdRFxSJ_EUs_ZSPLf6OV X-Proofpoint-GUID: DEwCY_cik6MKLdRFxSJ_EUs_ZSPLf6OV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-27_03,2023-10-26_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 malwarescore=0 suspectscore=0 bulkscore=0 adultscore=0 impostorscore=0 mlxlogscore=999 phishscore=0 spamscore=0 priorityscore=1501 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310240000 definitions=main-2310270057 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 26 Oct 2023 23:28:55 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780889038600623380 X-GMAIL-MSGID: 1780889053764677246 |
Series |
firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support
|
|
Message
Oleksii Moisieiev
Oct. 27, 2023, 6:28 a.m. UTC
This RFC includes implementation of the new config_{get,set} according to the latest version of DEN0056E document (v3.2 beta2). Current RFC series covers the implementation of the SCMI protocol functions without integration to the pinctrl driver, which is under development. Please review changes to start the review process before I'll be ready to post complete v5 version. This Patch series is intended to introduce the generic driver for pin controls over SCMI protocol, provided in the latest beta version of DEN0056 [0]. On ARM-based systems, a separate Cortex-M based System Control Processor (SCP) provides control on pins, as well as with power, clocks, reset controllers. In this case, kernel should use one of the possible transports, described in [0] to access SCP and control clocks/power-domains etc. This driver is using SMC transport to communicate with SCP via SCMI protocol and access to the Pin Control Subsystem. The provided driver consists of 2 parts: - firmware/arm_scmi/pinctrl.c - the SCMI pinctrl protocol inmplementation responsible for the communication with SCP firmware. - drivers/pinctrl/pinctrl-scmi.c - pinctrl driver, which is using pinctrl protocol implementation to access all necessary data. Configuration: The scmi-pinctrl driver can be configured using DT bindings. For example: / { cpu_scp_shm: scp-shmem@0x53FF0000 { compatible = "arm,scmi-shmem"; reg = <0x0 0x53FF0000 0x0 0x1000>; }; firmware { scmi { compatible = "arm,scmi-smc"; arm,smc-id = <0x82000002>; shmem = <&cpu_scp_shm>; #address-cells = <1>; #size-cells = <0>; scmi_pinctrl: protocol@19 { reg = <0x18>; #pinctrl-cells = <0>; i2c2_pins: i2c2 { groups = "i2c2_a"; function = "i2c2"; }; }; }; }; }; &pfc { /delete-node/i2c2; }; So basically, it's enough to move pfc subnode, which configures pin group that should work through SCMI protocol to scmi_pinctrl node. The current driver implementation is using generic pinctrl dt_node format. I've tested this driver on the Renesas H3ULCB Kingfisher board with pinctrl driver ported to the Arm-trusted-firmware. Unfortunately, not all hardware was possible to test because the Renesas pinctrl driver has gaps in pins and groups numeration, when Spec [0] requires pins, groups and functions numerations to be 0..n without gaps. Also, sharing link to the ATF pinctrl driver I used for testing: https://github.com/oleksiimoisieiev/arm-trusted-firmware/tree/pinctrl_rcar_m3_up [0] https://developer.arm.com/documentation/den0056/latest --- Changes v4 -> v5 - add new calls to scmi_protocol description for config_{get,set} Changes v3 -> v4: - Fixed MAINTAINERS file description - adjusted pinctrl ops position and callback names - add trailing coma in scmi_protocol list - removed unneeded pi checks - corrected selector check - resource allocation refactoring - scmi_*_info swap params to generate better code - style, add trailing coma in definitions - reworked protocol@19 format in device-tree bindings - ordered config option and object file alphabetically - rephrased PINCTRL_SCMI config description - formatting fixes, removed blank lines after get_drvdata call - code style adjustments - add set_drvdata call - removed goto label - refactoring of the devm resource management - removed pctldev != NULL check - fix parameter name in pinconf-group-get - probe function refactoring - removed unneeded pmx checks Changes v2 -> v3: - update get_name calls as suggested by Cristian Marussi - fixing comments - refactoring of the dt_bindings according to the comments Changes v1 -> v2: - rebase patches to the latest kernel version - use protocol helpers in the pinctrl scmi protocol driver implementation - reworked pinctrl_ops. Removed similar calls to simplify the interface - implementation of the .instance_deinit callback to properly clean resources - add description of the pinctrl protocol to the device-tree schema --- Cristian Marussi (1): firmware: arm_scmi: Add optional flags to extended names helper Oleksii Moisieiev (4): drivers: firmware: scmi: Introduce scmi_get_max_msg_size function firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support pinctrl: Implementation of the generic scmi-pinctrl driver dt-bindings: firmware: arm,scmi: Add support for pinctrl protocol .../bindings/firmware/arm,scmi.yaml | 53 + MAINTAINERS | 7 + drivers/firmware/arm_scmi/Makefile | 2 +- drivers/firmware/arm_scmi/clock.c | 2 +- drivers/firmware/arm_scmi/common.h | 3 + drivers/firmware/arm_scmi/driver.c | 25 +- drivers/firmware/arm_scmi/perf.c | 3 +- drivers/firmware/arm_scmi/pinctrl.c | 922 ++++++++++++++++++ drivers/firmware/arm_scmi/power.c | 2 +- drivers/firmware/arm_scmi/powercap.c | 2 +- drivers/firmware/arm_scmi/protocols.h | 4 +- drivers/firmware/arm_scmi/reset.c | 3 +- drivers/firmware/arm_scmi/sensors.c | 2 +- drivers/firmware/arm_scmi/voltage.c | 2 +- drivers/pinctrl/Kconfig | 11 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/pinctrl-scmi.c | 445 +++++++++ include/linux/scmi_protocol.h | 47 + 18 files changed, 1525 insertions(+), 11 deletions(-) create mode 100644 drivers/firmware/arm_scmi/pinctrl.c create mode 100644 drivers/pinctrl/pinctrl-scmi.c
Comments
Hi Oleksii, thanks for this patch, which still looks very good to me. A question that was raised in discussion with Takahiro Akashi was how we identify pins that can be used for GPIO and if the spec or implementation has given any thought to that. I can think of a few, such that: 1. Pins that can be used for GPIO all belong to some group - possibly even one group per pin such as "gpioA1", "gpioA2", "gpioA3" etc - that can be assigned a function named "gpio" or similar. 2. GPIO is seen as something external or "third usecase" that is handled by pin config, not by pin mux. If it is 1 - which I find likely - it would be good to standardize the name of the function to be "gpio" and somehow make it clear that all pins that are desired to be used for GPIO need to have a (group, function) tuple pair such as ("gpio001", "gpio") that will put the pin into GPIO mode. If the assumption is anything goes, i.e. a vendor could say something like ("io-group-99", "generic-io") to put a certain pin into GPIO mode, that is maybe not so optimal, because it's nice for the GPIO driver (which will come up) to be able to figure out by e.g. string name conventions that a pin is in GPIO mode, and which group and function that will put it into GPIO mode. If this generality is not desired, having standard names for GPIO functions and groups is still going to be an upside, if it can be achieved. But maybe this isn't attainable at this point? Yours, Linus Walleij