lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DU0PR04MB941745B5D2316951F31B3B1888FAA@DU0PR04MB9417.eurprd04.prod.outlook.com>
Date:   Tue, 19 Sep 2023 12:17:43 +0000
From:   Peng Fan <peng.fan@....com>
To:     Conor Dooley <conor@...nel.org>,
        "Peng Fan (OSS)" <peng.fan@....nxp.com>
CC:     Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <brgl@...ev.pl>,
        Andy Shevchenko <andy@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Stefan Agner <stefan@...er.ch>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        dl-linux-imx <linux-imx@....com>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: RE: [PATCH v3 2/6] dt-bindings: gpio: vf610: correct i.MX8ULP and
 i.MX93

> Subject: Re: [PATCH v3 2/6] dt-bindings: gpio: vf610: correct i.MX8ULP and
> i.MX93
> 
> On Mon, Sep 18, 2023 at 04:16:06PM +0800, Peng Fan (OSS) wrote:
> > From: Peng Fan <peng.fan@....com>
> >
> > i.MX8ULP and i.MX93 actually has two interrupts for each gpio
> > controller, one for Trustzone non-secure world, one for secure world.
> >
> > And they has one register based, not two as i.MX7ULP or VF610.
> >
> > Although the Linux Kernel driver gpio-vf610.c could work with
> > fsl,imx7ulp-gpio compatible, it is based on some tricks did in device
> > tree with some offset added to base address.
> >
> > So actually i.MX8ULP/i.MX93 is not compatible with i.MX7ULP.
> >
> > Last, i.MX93 is directly derived from i.MX8ULP, so make i.MX93 GPIO
> > compatible with i.MX8ULP
> >
> > Signed-off-by: Peng Fan <peng.fan@....com>
> > ---
> >  .../devicetree/bindings/gpio/gpio-vf610.yaml       | 36
> +++++++++++++++++++---
> >  1 file changed, 31 insertions(+), 5 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
> > b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
> > index 59427d97adf5..5243b4cf1235 100644
> > --- a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
> > +++ b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
> > @@ -20,6 +20,7 @@ description: |
> >  properties:
> >    compatible:
> >      oneOf:
> > +      - const: fsl,imx8ulp-gpio
> >        - const: fsl,vf610-gpio
> >        - items:
> >            - const: fsl,imx7ulp-gpio
> > @@ -27,16 +28,17 @@ properties:
> >        - items:
> >            - enum:
> >                - fsl,imx93-gpio
> > -              - fsl,imx8ulp-gpio
> > -          - const: fsl,imx7ulp-gpio
> > +          - const: fsl,imx8ulp-gpio
> >
> >    reg:
> > -    description: The first reg tuple represents the PORT module, the second
> tuple
> > -      represents the GPIO module.
> > +    minItems: 1
> >      maxItems: 2
> >
> >    interrupts:
> > -    maxItems: 1
> > +    items:
> > +      - description: GPIO Trustzone non-secure interrupt number
> > +      - description: GPIO Trustzone secure interrupt number
> > +    minItems: 1
> >
> >    interrupt-controller: true
> >
> > @@ -78,6 +80,30 @@ required:
> >    - "#gpio-cells"
> >    - gpio-controller
> >
> > +allOf:
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - fsl,vf610-gpio
> > +              - fsl,imx7ulp-gpio
> > +    then:
> > +      properties:
> > +        interrupts:
> > +          maxItems: 1
> > +        reg:
> > +          items:
> > +            - description: PORT register base address
> > +            - description: GPIO register base address
> > +    else:
> > +      properties:
> > +        interrupts:
> > +          maxItems: 2
> 
> Doesn't this default to 2 because there are 2 items in your list of interrupts as
> things stand?

Oh, I should set this as minItems: 2. There are two interrupts.

Thanks,
Peng.

> Otherwise, this seems fine to me, provided the existing platforms are going to
> be broken as you implement the software side of this change.
> 
> Thanks,
> Conor.
> 
> > +        reg:
> > +          items:
> > +            - description: GPIO register base address
> > +
> >  additionalProperties: false
> >
> >  examples:
> >
> > --
> > 2.37.1
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ