All of lore.kernel.org
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Frank Li <Frank.Li@nxp.com>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>,
	Vincent Mailhol <mailhol.vincent@wanadoo.fr>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	"open list:CAN NETWORK DRIVERS" <linux-can@vger.kernel.org>,
	"open list:NETWORKING DRIVERS" <netdev@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	imx@lists.linux.dev
Subject: Re: [PATCH 1/1] dt-bindings: can: convert microchip,mcp251x.txt to yaml
Date: Tue, 13 Aug 2024 17:02:15 +0100	[thread overview]
Message-ID: <20240813-distant-plastic-6534f660376c@spud> (raw)
In-Reply-To: <20240812211625.3835600-1-Frank.Li@nxp.com>

[-- Attachment #1: Type: text/plain, Size: 4374 bytes --]

On Mon, Aug 12, 2024 at 05:16:24PM -0400, Frank Li wrote:
> Convert binding doc microchip,mcp251x.txt to yaml.
> Additional change:
> - add ref to spi-peripheral-props.yaml
> 
> Fix below warning:
> arch/arm64/boot/dts/freescale/imx8dx-colibri-eval-v3.dtb: /bus@5a000000/spi@5a020000/can@0:
> 	failed to match any schema with compatible: ['microchip,mcp2515']
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
>  .../bindings/net/can/microchip,mcp251x.txt    | 30 --------
>  .../bindings/net/can/microchip,mcp251x.yaml   | 70 +++++++++++++++++++
>  2 files changed, 70 insertions(+), 30 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/net/can/microchip,mcp251x.txt
>  create mode 100644 Documentation/devicetree/bindings/net/can/microchip,mcp251x.yaml
> 
> diff --git a/Documentation/devicetree/bindings/net/can/microchip,mcp251x.txt b/Documentation/devicetree/bindings/net/can/microchip,mcp251x.txt
> deleted file mode 100644
> index 381f8fb3e865a..0000000000000
> --- a/Documentation/devicetree/bindings/net/can/microchip,mcp251x.txt
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -* Microchip MCP251X stand-alone CAN controller device tree bindings
> -
> -Required properties:
> - - compatible: Should be one of the following:
> -   - "microchip,mcp2510" for MCP2510.
> -   - "microchip,mcp2515" for MCP2515.
> -   - "microchip,mcp25625" for MCP25625.
> - - reg: SPI chip select.
> - - clocks: The clock feeding the CAN controller.
> - - interrupts: Should contain IRQ line for the CAN controller.
> -
> -Optional properties:
> - - vdd-supply: Regulator that powers the CAN controller.
> - - xceiver-supply: Regulator that powers the CAN transceiver.
> - - gpio-controller: Indicates this device is a GPIO controller.
> - - #gpio-cells: Should be two. The first cell is the pin number and
> -                the second cell is used to specify the gpio polarity.
> -
> -Example:
> -	can0: can@1 {
> -		compatible = "microchip,mcp2515";
> -		reg = <1>;
> -		clocks = <&clk24m>;
> -		interrupt-parent = <&gpio4>;
> -		interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
> -		vdd-supply = <&reg5v0>;
> -		xceiver-supply = <&reg5v0>;
> -		gpio-controller;
> -		#gpio-cells = <2>;
> -	};
> diff --git a/Documentation/devicetree/bindings/net/can/microchip,mcp251x.yaml b/Documentation/devicetree/bindings/net/can/microchip,mcp251x.yaml
> new file mode 100644
> index 0000000000000..789545b6c669a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/can/microchip,mcp251x.yaml

Filename matching a compatible please.

> @@ -0,0 +1,70 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/can/microchip,mcp251x.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Microchip MCP251X stand-alone CAN controller
> +
> +maintainers:
> +  - Frank Li <Frank.Li@nxp.com>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - microchip,mcp2510
> +      - microchip,mcp2515
> +      - microchip,mcp25625
> +
> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  vdd-supply:
> +    description: Regulator that powers the CAN controller.
> +
> +  xceiver-supply:
> +    description: Regulator that powers the CAN transceiver.
> +
> +  gpio-controller: true
> +
> +  "#gpio-cells":
> +    const: 2
> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - interrupts
> +
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        can0: can@1 {

The label here is not used and should be dropped.

Otherwise, looks good to me.

Thanks,
Conor.

> +             compatible = "microchip,mcp2515";
> +             reg = <1>;
> +             clocks = <&clk24m>;
> +             interrupt-parent = <&gpio4>;
> +             interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
> +             vdd-supply = <&reg5v0>;
> +             xceiver-supply = <&reg5v0>;
> +             gpio-controller;
> +             #gpio-cells = <2>;
> +        };
> +    };
> +
> -- 
> 2.34.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2024-08-13 16:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-12 21:16 [PATCH 1/1] dt-bindings: can: convert microchip,mcp251x.txt to yaml Frank Li
2024-08-13 16:02 ` Conor Dooley [this message]

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=20240813-distant-plastic-6534f660376c@spud \
    --to=conor@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=imx@lists.linux.dev \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailhol.vincent@wanadoo.fr \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.