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: <wna3loahthqbn5hnw2pbt3yznmzzv3zppi7f2nblvq3t22jdc2@7cse4r4p6q5z>
Date: Tue, 6 May 2025 16:57:17 +0300
From: Ioana Ciornei <ioana.ciornei@....com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: Lee Jones <lee@...nel.org>, Rob Herring <robh@...nel.org>, 
	Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, 
	Shawn Guo <shawnguo@...nel.org>, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 1/6] dt-bindings: mfd: add bindings for QIXIS CPLD

On Fri, May 02, 2025 at 09:01:59AM +0200, Krzysztof Kozlowski wrote:
> On Wed, Apr 30, 2025 at 06:36:29PM GMT, Ioana Ciornei wrote:
> > This adds device tree bindings for the board management controller -
> > QIXIS CPLD - found on some Layerscape based boards such as LX2160A-RDB,
> > LX2160AQDS, LS1028AQDS etc.
> > 
> > Signed-off-by: Ioana Ciornei <ioana.ciornei@....com>
> > ---
> >  .../bindings/mfd/fsl,qixis-i2c.yaml           | 65 +++++++++++++++++++
> >  1 file changed, 65 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/mfd/fsl,qixis-i2c.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/mfd/fsl,qixis-i2c.yaml b/Documentation/devicetree/bindings/mfd/fsl,qixis-i2c.yaml
> > new file mode 100644
> > index 000000000000..562878050916
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/mfd/fsl,qixis-i2c.yaml
> 
> Filename matching compatible.

How to choose one if there are multiple compatible strings?

> 
> > @@ -0,0 +1,65 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/mfd/fsl,qixis-i2c.yaml
> > +$schema: http://devicetree.org/meta-schemas/core.yaml
> > +
> > +title: NXP's QIXIS CPLD board management controller
> > +
> > +maintainers:
> > +  - Ioana Ciornei <ioana.ciornei@....com>
> > +
> > +description: |
> > +  The board management controller found on some Layerscape boards contains
> > +  different IP blocks like GPIO controllers, interrupt controllers, reg-muxes
> > +  etc.
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - fsl,lx2160a-qds-qixis-i2c
> > +      - fsl,lx2162a-qds-qixis-i2c
> > +      - fsl,ls1028a-qds-qixis-i2c
> 
> Keep alphabetical order.
> 
> What is actual device name? I2C? Is this an I2C controller or device?
> 
> > +
> > +  reg:
> > +    description:
> > +      I2C device address.
> 
> This says device, so i2c in compatible is wrong.
> 
> Anyway drop description, redundant.

Ok, will drop.

> 
> 
> > +    maxItems: 1
> > +
> > +  "#address-cells":
> > +    const: 1
> 
> Why?
> 
> > +
> > +  "#size-cells":
> > +    const: 0
> 
> Why? Drop cells.
> 

See below.

> > +
> > +  mux-controller:
> > +    $ref: /schemas/mux/reg-mux.yaml#
> > +
> > +required:
> > +  - "#address-cells"
> > +  - "#size-cells"
> > +  - compatible
> > +  - reg
> 
> Keep same order as in properties

Ok.

> 
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    i2c {
> > +        #address-cells = <1>;
> > +        #size-cells = <0>;
> > +
> > +        qixis@66 {
> 
> Node names should be generic. See also an explanation and list of
> examples (not exhaustive) in DT specification:
> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

In this case, an accepted node name is 'cpld'?

> 
> > +            compatible = "fsl,lx2160a-qds-qixis-i2c";
> > +            reg = <0x66>;
> > +            #address-cells = <1>;
> > +            #size-cells = <0>;
> 
> So were do you use address/size cells?
> 

For example, fsl-ls1028a-qds.dts looks like this:

	fpga@66 {
		compatible = "fsl,ls1028a-qds-qixis-i2c";
		reg = <0x66>;
		#address-cells = <1>;
		#size-cells = <0>;

		mux: mux-controller@54 {
			compatible = "reg-mux";
			reg = <0x54>;
			#mux-control-cells = <1>;
			mux-reg-masks = <0x54 0xf0>; /* 0: reg 0x54, bits 7:4 */
		};
	};

Also, some boards have in their qixis CPLD gpio controllers and I am
planning to add them as the next step.

Ioana

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ