Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp439751lqm; Wed, 1 May 2024 05:40:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXerRos6E8gs8liBzDQNpbidmRID69MdcqnFJsCgUZOcxtn1NnVV2r4HOSr1LzbRvYjFGhVzUBT+DYEnwoeVD+psSwKMgb/phAGASXc/A== X-Google-Smtp-Source: AGHT+IH/3o3BwNmCMP055d+QDwHu7uQNnx9oMvQeqej6UoEOuXK0l3Zg1X5rg8jb7ah5mbJt4SJ5 X-Received: by 2002:a05:620a:158e:b0:792:64c0:ac5b with SMTP id d14-20020a05620a158e00b0079264c0ac5bmr2245565qkk.73.1714567226396; Wed, 01 May 2024 05:40:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714567226; cv=pass; d=google.com; s=arc-20160816; b=SgXc4oxHuqo4A9VpCN1/7ttkLN+ynBYlsNTA6jrzWkCf7c+XeKUiqxo5Sse7ehy8Oh CdtRYTrUMYKtgzhuwKT9g+TWXB5RNJyNegWqznjjLFmDfXVToZeRKCTZjfJyyBf9cSZT 0Zb7YIetPz53QiDgYGabN8V8ebN/1CSyZo7wGxRqd77jd4k7ycZvolqp1+twiblU/H+o m9FehUCJdV8/v5qW/H5tlp2VjHSYqDrRXPyklUr7pD3LF8dyVY/BP4bNPKgtig/VD9zq lhK6k7Tb3/V7w1hadUM6xhBPZSJ/BeXoH0r771tOvklcfYInYsTzmRN1KHq1xOZWuPSZ Zp6w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=mWvjHETqzmnGg3pmC6TF88LNqO5O0tnqWgVZCRuRNKY=; fh=kC7oY0DJCmpRLC4GlPIHnq30TA1tG+/fcxDI96dgY9Q=; b=J6lDAkuPeud1Ek2aILdLhbWzHZzxdl+LxYFa3ZaGel7Zjre3k3XmZluXbetPKJWwga HXaDUkAUXt9m3VnCPAHaDfuSkecSroRW+1byPhqo5eB1jOurq1y5RKHKSMGTYyPs4GPd jZCsSPqNU4rtKkhetvjnYEatFDjn6YZ/JvaRGHOxiRmTXCQC7j4McpGfHwSxiaBDHzye unRumBPDb9Cnxp1XLHl2uUFn8mwpN5N3G/oWQ7OogeU5aSA14ePO0TJuLcACFcjtLgZz dUbcTTtTjBcyKuZGS+wbL7ZVJQ86PriW+BsPTbn3OU0HrqN+898jyumixAhHiGsMPa5f BPPw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-165259-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165259-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id m22-20020a05620a215600b0078f0161c486si29694754qkm.125.2024.05.01.05.40.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 05:40:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-165259-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-165259-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165259-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E694E1C223FC for ; Wed, 1 May 2024 12:40:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5FC66524DC; Wed, 1 May 2024 12:40:21 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 17E022D05D; Wed, 1 May 2024 12:40:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714567220; cv=none; b=ebo5zOeEOlSYRsrZCWaefg1C0aKD//5O4vKu8qSHUZKT2MUgciBI36UITtYcxoQ+Pt5Ccc0O6VxyqmKm+vpIpGojYUQPhRpJ9mewYdYtXcis616ryKux9FebVkWMZllcbHMBTgNmVzZwlB85LAug2Y0UwRmHInKNi7ayvyttjR8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714567220; c=relaxed/simple; bh=/0Zzncqz2SvK0lBaGcJOFG/BHhemKsMawsxPUXQ+CUE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cZ9jo1Qc9R1Zh3bznEggZC1zYUikFD5n0vsdyRUNfXkH4CjuBSa95B0n8se/DEJE3JUelP3e+qjoGiUVVgkBqBGtrL9Yofm/zUI62oDDHnrzUFKXb1KPiWkUyutQdHAtuAXSZcYhtd+ejOOkTBnInKEC95D4QJenxi3hoL/B24Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 771EB2F4; Wed, 1 May 2024 05:40:44 -0700 (PDT) Received: from pluto (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 188A03F73F; Wed, 1 May 2024 05:40:15 -0700 (PDT) Date: Wed, 1 May 2024 13:40:13 +0100 From: Cristian Marussi To: Peng Fan Cc: Rob Herring , "Peng Fan (OSS)" , Linus Walleij , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Peng Fan , Sudeep Holla , "linux-gpio@vger.kernel.org" , "devicetree@vger.kernel.org" , "imx@lists.linux.dev" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2 1/2] dt-bindings: firmware: arm,scmi: Add properties for i.MX95 Pinctrl OEM extensions Message-ID: References: <20240418-pinctrl-scmi-oem-v1-v2-0-3a555a3c58c3@nxp.com> <20240418-pinctrl-scmi-oem-v1-v2-1-3a555a3c58c3@nxp.com> <20240424193007.GA329896-robh@kernel.org> 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: On Wed, May 01, 2024 at 12:11:41PM +0000, Peng Fan wrote: > > Subject: Re: [PATCH v2 1/2] dt-bindings: firmware: arm,scmi: Add properties > > for i.MX95 Pinctrl OEM extensions > > > > On Thu, Apr 25, 2024 at 09:06:00AM +0000, Peng Fan wrote: > > > Hi Rob, > > > > > > > Subject: Re: [PATCH v2 1/2] dt-bindings: firmware: arm,scmi: Add > > > > properties for i.MX95 Pinctrl OEM extensions > > > > > > > > On Thu, Apr 18, 2024 at 10:53:17AM +0800, Peng Fan (OSS) wrote: > > > > > From: Peng Fan > > > > > > > > > > i.MX95 Pinctrl is managed by SCMI firmware using OEM extensions. > > > > > This patch is to add i.MX95 Pinctrl OEM extensions properties. > > > > > > > > > > Signed-off-by: Peng Fan > > > > > --- > > > > > .../devicetree/bindings/firmware/arm,scmi.yaml | 9 ++- > > > > > .../bindings/firmware/nxp,imx95-scmi-pinctrl.yaml | 66 > > > > > ++++++++++++++++++++++ > > > > > 2 files changed, 72 insertions(+), 3 deletions(-) > > > > > > > > > > diff --git > > > > > a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml > > > > > b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml > > > > > > .... > > > > > > > > + > > > > > +title: i.MX System Control and Management Interface (SCMI) > > > > > +Pinctrl Protocol > > > > > + > > > > > +maintainers: > > > > > + - Peng Fan > > > > > + > > > > > +patternProperties: > > > > > + '[a-f0-9]+$': > > > > > + type: object > > > > > + unevaluatedProperties: false > > > > > + > > > > > + properties: > > > > > + pins: > > > > > + $ref: /schemas/types.yaml#/definitions/string > > > > > + description: name of the pin > > > > > + items: > > > > > + enum: [ daptdi, daptmsswdio, daptclkswclk, daptdotraceswo, > > > > > + gpioio00, gpioio01, gpioio02, gpioio03, > > > > > + gpioio04, > > > > > > > > ioio? > > > > > > Yes. The name is exported from SCMI firmware. > > > > > > > > > > > > + gpioio05, gpioio06, gpioio07, gpioio08, gpioio09, > > > > > + gpioio10, gpioio11, gpioio12, gpioio13, gpioio14, > > > > > + gpioio15, gpioio16, gpioio17, gpioio18, gpioio19, > > > > > + gpioio20, gpioio21, gpioio22, gpioio23, gpioio24, > > > > > + gpioio25, gpioio26, gpioio27, gpioio28, gpioio29, > > > > > + gpioio30, gpioio31, gpioio32, gpioio33, gpioio34, > > > > > + gpioio35, gpioio36, gpioio37, ccmclko1, ccmclko2, > > > > > + ccmclko3, ccmclko4, enet1mdc, enet1mdio, enet1td3, > > > > > + enet1td2, enet1td1, enet1td0, enet1txctl, enet1txc, > > > > > + enet1rxctl, enet1rxc, enet1rd0, enet1rd1, enet1rd2, > > > > > + enet1rd3, enet2mdc, enet2mdio, enet2td3, enet2td2, > > > > > + enet2td1, enet2td0, enet2txctl, enet2txc, enet2rxctl, > > > > > + enet2rxc, enet2rd0, enet2rd1, enet2rd2, enet2rd3, > > > > > + sd1clk, sd1cmd, sd1data0, sd1data1, sd1data2, sd1data3, > > > > > + sd1data4, sd1data5, sd1data6, sd1data7, sd1strobe, > > > > > + sd2vselect, sd3clk, sd3cmd, sd3data0, sd3data1, > > > > > + sd3data2, sd3data3, xspi1data0, xspi1data1, xspi1data2, > > > > > + xspi1data3, xspi1data4, xspi1data5, xspi1data6, > > > > > + xspi1data7, xspi1dqs, xspi1sclk, xspi1ss0b, xspi1ss1b, > > > > > + sd2cdb, sd2clk, sd2cmd, sd2data0, sd2data1, sd2data2, > > > > > + sd2data3, sd2resetb, i2c1scl, i2c1sda, i2c2scl, i2c2sda, > > > > > + uart1rxd, uart1txd, uart2rxd, uart2txd, pdmclk, > > > > > + pdmbitstream0, pdmbitstream1, sai1txfs, sai1txc, > > > > > + sai1txd0, sai1rxd0, wdogany, fccuerr0 ] > > > > > + > > > > > + nxp,func-id: > > > > > + $ref: /schemas/types.yaml#/definitions/uint32 > > > > > + description: Indicates the PAD connections which function > > > > > + module > > > > > > > > The description makes no sense... > > > > > > I will use below description in v3: > > > For each pin, there are up to 8 muxing options (called ALT modes). For > > example: > > > Select 1 of 5 iomux modes to be used for pad: DAP_TCLK_SWCLK. > > > 000b - Select mux mode: ALT0 mux port: JTAG_MUX_TCK of instance: > > > jtag_mux 010b - Select mux mode: ALT2 mux port: CAN4_RX of instance: > > > imx95_wakeupmix_top 100b - Select mux mode: ALT4 mux port: > > > FLEXIO1_FLEXIO30 of instance: imx95_wakeupmix_top 101b - Select mux > > > mode: ALT5 mux port: GPIO3_IO30 of instance: imx95_wakeupmix_top > > 110b > > > - Select mux mode: ALT6 mux port: LPUART5_CTS_B of instance: > > imx95_wakeupmix_top The nxp,func-id property is selecting one ALT mode. > > > > > > > > > > > > + > > > > > + nxp,pin-conf: > > > > > + $ref: /schemas/types.yaml#/definitions/uint32 > > > > > + description: The PAD configuration > > > > > > > > PAD stands for? Or is it pin configuration as the property name says? > > > > > > It is pin configuration which includes pull up/down, drive strength and etc. > > > > > > > > > > > This is just a raw register values? > > > > > > Yes. > > > > > > Why can't standard pinctrl properties be > > > > used here. What's the point of using SCMI pinctrl if you are just > > > > shuttling register values to SCMI? > > > > > > Standard pinctrl properties will need more memory in our SCMI firmware > > > design. We have limited on-chip memory for SCMI firmware usage. > > > > > > > So you sort of strip-down the server due to hw constraints, but is it the SCMI > > server still compliant with the spec ? (as in supporting all the mandatory > > commands and features for the protocols you decided to > > support) > > Yes, the SCMI server is compliant with the spec. It is the SCMI firmware > returns num function with value zero, num group with value zero. > > And only OEM pin configure type supported in our SCMI firmware. > > I have posted out v3 following Rob's suggestion, using property > 'pinmux', but now we could not reuse pinctrl-scmi.c As I wrote in a separated thread (only 5 mins ago), if you have written a distinct SCMI driver to use protocol@19 ops to suit your needs after having parsed your DT...why do you want to re-use pinctrl-scmi.c and so create a dependency between the 2 ? The only thing that they have in common is that they are SCMI drivers using SCMI Pinctrl protocol@19 operations in their own different way. Thanks, Cristian