Received: by 2002:ac8:5349:0:b0:427:7d78:cd45 with SMTP id d9csp806844qto; Wed, 20 Dec 2023 04:38:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IG+LiXvpbCliAKNFZdUyqdTN7lNH9M2DWph2ApIWyaTiERCv5YZbfdpNQHuMrlhLqiGQH5C X-Received: by 2002:a05:6870:230c:b0:1ff:aca:c776 with SMTP id w12-20020a056870230c00b001ff0acac776mr12571165oao.111.1703075909439; Wed, 20 Dec 2023 04:38:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703075909; cv=none; d=google.com; s=arc-20160816; b=d85tke2WB3fde1mNbNuMn8xuvuNqmipR187J4S8zFtTq0gTMkNpuHaqVF8bHoDkKtt QMWDf9HFi5WAjSJDcYShRKJkfa6x7w7Ff+bm+oDyuhWGNXVUwggwJjiWjxe1z5ratIVC 3aLuXf1UmrsRSmPpBhKwQaJZnfq3+DBiMk7KoqPH8JojDcRmeNAVvQJrhFuIPK46AEt0 jj7O8zMZp1VnZT5t/a4JeVYic5LreIv5YSPnkXZlFh5TSyzKVmUJqX7kYe7R8+FLgCAA iNrEb10EJ0kmiteRE0zJEptwcAMic6/ni5pExRYUzBU9SCsuu4Thr8VN17lF7Lp6skZf KCZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=TIBBubAiifWyJyk2lSQIqjt6MMx3Kf75s8ECYNR3bA0=; fh=4v2Z3oAST4Qrka76D2drV108OE8XPjFCIbtpn266oFU=; b=HSXJ9phS3hiY2xU3rJYkKoDHqCn5ftkWuXVu38VXcyKMoKoPqloKb7hXNEKqBxPnKe CCtbrv90zAFwIT99arF/tYYVB3cqOIDhbaAfDetg7i9ToY5Y06SvVShzSUTbiTOxIPal +Ow2fFTbglv2kR7i4in4ABpE4DrUriEMzJPSMyLVgqG0md1V/gl841pMoawTUs0K+yJi JPu2bA4RiehOgIsu31PqGaEttS54HPDUWKWAIIpQEQGvaLsF5zbOk2ToTOObbo76P5nE J2ngI3mCg26HnIDcSZvxEM0V+YltBGdkocl4rYWb3+eqVllhlKGfB1s8LsDC6TL9vTa1 21ug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-6902-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6902-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id x9-20020a63f709000000b005ca5616facesi12005936pgh.38.2023.12.20.04.38.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 04:38:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6902-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-6902-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6902-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2CABFB246E0 for ; Wed, 20 Dec 2023 12:38:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9038D24B26; Wed, 20 Dec 2023 12:37:53 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADE78249FC for ; Wed, 20 Dec 2023 12:37:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rFvpb-0005KA-Ig; Wed, 20 Dec 2023 13:37:47 +0100 Received: from [2a0a:edc0:2:b01:1d::c0] (helo=ptx.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rFvpY-000FU7-V8; Wed, 20 Dec 2023 13:37:46 +0100 Received: from mfe by ptx.whiteo.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1rFvpZ-007vo4-V2; Wed, 20 Dec 2023 13:37:45 +0100 Date: Wed, 20 Dec 2023 13:37:45 +0100 From: Marco Felsch To: Peng Fan Cc: "devicetree@vger.kernel.org" , Conor Dooley , Cristian Marussi , "Peng Fan (OSS)" , Krzysztof Kozlowski , Shawn Guo , Linus Walleij , "linux-kernel@vger.kernel.org" , "linux-gpio@vger.kernel.org" , Rob Herring , Oleksii Moisieiev , Pengutronix Kernel Team , Sudeep Holla , Fabio Estevam , Sascha Hauer , "linux-arm-kernel@lists.infradead.org" , dl-linux-imx Subject: Re: [PATCH 4/7] dt-bindings: firmware: arm,scmi: support pinctrl protocol Message-ID: <20231220123745.ksdumfymu4xruufa@pengutronix.de> References: <20231215-pinctrl-scmi-v1-0-0fe35e4611f7@nxp.com> <20231215-pinctrl-scmi-v1-4-0fe35e4611f7@nxp.com> <20231219192912.yulmczvqbuh4jizg@pengutronix.de> <20231220123033.nrbperhbr4jifuvh@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org On 23-12-20, Peng Fan wrote: > > Subject: Re: [PATCH 4/7] dt-bindings: firmware: arm,scmi: support pinctrl > > protocol > > > > On 23-12-20, Peng Fan wrote: > > > > Subject: Re: [PATCH 4/7] dt-bindings: firmware: arm,scmi: support > > > > pinctrl protocol > > > > > > > > Hi Peng, > > > > > > > > On 23-12-15, Peng Fan (OSS) wrote: > > > > > From: Peng Fan > > > > > > > > > > Add SCMI v3.2 pinctrl protocol bindings and example. > > > > > > > > > > Signed-off-by: Peng Fan > > > > > --- > > > > > .../devicetree/bindings/firmware/arm,scmi.yaml | 99 > > > > ++++++++++++++++++++++ > > > > > 1 file changed, 99 insertions(+) > > > > > > > > > > diff --git > > > > > a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml > > > > > b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml > > > > > index 4591523b51a0..bfd2b6a89979 100644 > > > > > --- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml > > > > > +++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml > > > > > @@ -247,6 +247,85 @@ properties: > > > > > reg: > > > > > const: 0x18 > > > > > > > > > > + protocol@19: > > > > > > > > ... > > > > > > > > > @@ -401,6 +480,26 @@ examples: > > > > > scmi_powercap: protocol@18 { > > > > > reg = <0x18>; > > > > > }; > > > > > + > > > > > + scmi_pinctrl: protocol@19 { > > > > > + reg = <0x19>; > > > > > + #pinctrl-cells = <0>; > > > > > + > > > > > + i2c2-pins { > > > > > + groups = "i2c2_a", "i2c2_b"; > > > > > + function = "i2c2"; > > > > > + }; > > > > > + > > > > > + mdio-pins { > > > > > + groups = "avb_mdio"; > > > > > + drive-strength = <24>; > > > > > + }; > > > > > + > > > > > + keys_pins: keys-pins { > > > > > + pins = "GP_5_17", "GP_5_20", "GP_5_22", "GP_2_1"; > > > > > + bias-pull-up; > > > > > + }; > > > > > + }; > > > > > > > > This example is different to the one you mentioned within the > > > > cover-letter. I didn't checked all patches just want to ask which > > > > API will be implemented by this patchset? > > > > > > I kept this change since it was tested by Oleksii, but anyway i.MX not use > > these. > > > > > > The API, I suppose you are asking about this? > > > static const struct pinctrl_ops pinctrl_scmi_pinctrl_ops = { > > > .get_groups_count = pinctrl_scmi_get_groups_count, > > > .get_group_name = pinctrl_scmi_get_group_name, > > > .get_group_pins = pinctrl_scmi_get_group_pins, > > > #ifdef CONFIG_OF > > > .dt_node_to_map = pinconf_generic_dt_node_to_map_all, > > > .dt_free_map = pinconf_generic_dt_free_map, > > > #endif > > > }; > > > > > > static const struct pinctrl_ops pinctrl_scmi_imx_pinctrl_ops = { > > > .get_groups_count = pinctrl_scmi_get_groups_count, > > > .get_group_name = pinctrl_scmi_get_group_name, > > > .get_group_pins = pinctrl_scmi_get_group_pins, > > > #ifdef CONFIG_OF > > > .dt_node_to_map = pinctrl_scmi_imx_dt_node_to_map, > > > .dt_free_map = pinconf_generic_dt_free_map, > > > #endif > > > }; > > > > I see, thanks for the clarification. In short: the i.MX SMCI pinctrl DT-API is the > > same as the non-SCMI pinctrl API since the dt_node_to_map will convert it. > > Yes, the fsl,pins format is same whether SCMI or non-SCMI. But we need > to pack the data to a format that matches the i.MX OEM SCMI PINCTRL > protocol, so we need to dedicated dt_node_to_map here. Yes, I saw that you're using the enum values 192-255 for the OEM specific part and the packing. Does you have public access to the FW implementing the SCMI? Regards, Marco > > Thanks, > Peng. > > > > > Regards, > > Marco > >