devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrei Stefanescu <andrei.stefanescu@oss.nxp.com>
To: Conor Dooley <conor@kernel.org>
Cc: Dong Aisheng <aisheng.dong@nxp.com>,
	Fabio Estevam <festevam@gmail.com>,
	Shawn Guo <shawnguo@kernel.org>, Jacky Bai <ping.bai@nxp.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Ghennadi Procopciuc <Ghennadi.Procopciuc@oss.nxp.com>,
	Chester Lin <chester62515@gmail.com>,
	Matthias Brugger <mbrugger@suse.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev,
	NXP S32 Linux Team <s32@nxp.com>,
	Christophe Lizzi <clizzi@redhat.com>,
	Alberto Ruiz <aruizrui@redhat.com>,
	Enric Balletbo <eballetb@redhat.com>
Subject: Re: [PATCH v2 2/3] dt-bindings: pinctrl: add S32G3 compatible for the SIUL2 driver
Date: Wed, 2 Oct 2024 18:25:21 +0300	[thread overview]
Message-ID: <a924bbb6-96ec-40be-9d82-a76b2ab73afd@oss.nxp.com> (raw)
In-Reply-To: <20241002-finer-huddling-d02b451a7c16@spud>

Hi Conor,

Thank you for reviewing this!

On 02/10/2024 18:02, Conor Dooley wrote:
> On Wed, Oct 02, 2024 at 04:59:19PM +0300, Andrei Stefanescu wrote:
>> The SIUL2 hardware module is also integrated into the S32G3 SoC. Add
>> another compatible for it.
>>
>> Signed-off-by: Andrei Stefanescu <andrei.stefanescu@oss.nxp.com>
> 
> I'm not convinced that the representation here is correct for the
> GPIO on these devices. See:
> https://lore.kernel.org/all/20240926143122.1385658-3-andrei.stefanescu@oss.nxp.com/
> Since GPIO and pinctrl share the same regions, that lack of conviction
> extends to the pinctrl. I don't think adding another compatible here is
> right, when I am already of the opinion that the binding is wrong for
> the existing one.

I will convert the SIUL2 GPIO driver from my other patch series(the one
you mentioned) and merge it with the existing SIUL2 pinctrl driver.
Therefore, the unified pinctrl&GPIO will use the existing pinctrl
compatible.

I also considered the syscon&simple-mfd approach but it is harder
to implement because:
- the memory regions for the two SIUL2 modules are not next to each other
  and cannot be grouped together
- some registers in SIUL2 are 32bit wide and some are 16bit wide

The combined GPIO&pinctrl driver will have 4 memory resources:
- SIUL2_0 32 bit registers (used for pinmux&pinconf)
- SIUL2_0 16 bit registers (used for setting/getting the GPIO
			    output/input value)
- SIUL2_1 32 bit registers (same as SIUL2_0 + interrupt related registers)
- SIUL2_1 16 bit registers (same as SIUL2_0)

Would that be ok?

Best regards,
Andrei

> 
>> ---
>>  .../bindings/pinctrl/nxp,s32g2-siul2-pinctrl.yaml         | 8 ++++++--
>>  1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/pinctrl/nxp,s32g2-siul2-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/nxp,s32g2-siul2-pinctrl.yaml
>> index a24286e4def6..cff766c2f03b 100644
>> --- a/Documentation/devicetree/bindings/pinctrl/nxp,s32g2-siul2-pinctrl.yaml
>> +++ b/Documentation/devicetree/bindings/pinctrl/nxp,s32g2-siul2-pinctrl.yaml
>> @@ -25,8 +25,12 @@ description: |
>>  
>>  properties:
>>    compatible:
>> -    enum:
>> -      - nxp,s32g2-siul2-pinctrl
>> +    oneOf:
>> +      - enum:
>> +          - nxp,s32g2-siul2-pinctrl
>> +      - items:
>> +          - const: nxp,s32g3-siul2-pinctrl
>> +          - const: nxp,s32g2-siul2-pinctrl
>>  
>>    reg:
>>      description: |
>> -- 
>> 2.45.2
>>


  reply	other threads:[~2024-10-02 15:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-02 13:59 [PATCH v2 0/3] pinctrl: s32: add missing pins and an S32G3 compatible Andrei Stefanescu
2024-10-02 13:59 ` [PATCH v2 1/3] pinctrl: s32: add missing pins definitions Andrei Stefanescu
2024-10-08 13:25   ` Andrei Stefanescu
2024-10-09 16:17     ` Linus Walleij
2024-10-02 13:59 ` [PATCH v2 2/3] dt-bindings: pinctrl: add S32G3 compatible for the SIUL2 driver Andrei Stefanescu
2024-10-02 15:02   ` Conor Dooley
2024-10-02 15:25     ` Andrei Stefanescu [this message]
2024-10-02 13:59 ` [PATCH v2 3/3] arm64: dts: S32G3: add S32G3 compatible for the pinctrl node Andrei Stefanescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a924bbb6-96ec-40be-9d82-a76b2ab73afd@oss.nxp.com \
    --to=andrei.stefanescu@oss.nxp.com \
    --cc=Ghennadi.Procopciuc@oss.nxp.com \
    --cc=aisheng.dong@nxp.com \
    --cc=aruizrui@redhat.com \
    --cc=chester62515@gmail.com \
    --cc=clizzi@redhat.com \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=eballetb@redhat.com \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbrugger@suse.com \
    --cc=ping.bai@nxp.com \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=s32@nxp.com \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).