From: Rob Herring <robh@kernel.org>
To: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Cc: linux-kernel@vger.kernel.org,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Amarula patchwork <linux-amarula@amarulasolutions.com>,
Marc Kleine-Budde <mkl@pengutronix.de>,
michael@amarulasolutions.com, Dario Binacchi <dariobin@libero.it>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Paolo Abeni <pabeni@redhat.com>,
Wolfgang Grandegger <wg@grandegger.com>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-can@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org
Subject: Re: [RFC PATCH v2 1/4] dt-bindings: net: can: add STM32 bxcan DT bindings
Date: Thu, 25 Aug 2022 16:12:41 -0500 [thread overview]
Message-ID: <20220825211241.GA1688421-robh@kernel.org> (raw)
In-Reply-To: <20220820082936.686924-2-dario.binacchi@amarulasolutions.com>
On Sat, Aug 20, 2022 at 10:29:33AM +0200, Dario Binacchi wrote:
> Add documentation of device tree bindings for the STM32 basic extended
> CAN (bxcan) controller.
>
> Signed-off-by: Dario Binacchi <dariobin@libero.it>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
>
> ---
>
> Changes in v2:
> - Change the file name into 'st,stm32-bxcan-core.yaml'.
> - Rename compatibles:
> - st,stm32-bxcan-core -> st,stm32f4-bxcan-core
> - st,stm32-bxcan -> st,stm32f4-bxcan
> - Rename master property to st,can-master.
> - Remove the status property from the example.
> - Put the node child properties as required.
>
> .../bindings/net/can/st,stm32-bxcan.yaml | 136 ++++++++++++++++++
> 1 file changed, 136 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml
>
> diff --git a/Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml b/Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml
> new file mode 100644
> index 000000000000..288631b5556d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml
> @@ -0,0 +1,136 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/can/st,stm32-bxcan.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: STMicroelectronics bxCAN controller
> +
> +description: STMicroelectronics BxCAN controller for CAN bus
> +
> +maintainers:
> + - Dario Binacchi <dario.binacchi@amarulasolutions.com>
> +
> +allOf:
> + - $ref: can-controller.yaml#
> +
> +properties:
> + compatible:
> + enum:
> + - st,stm32f4-bxcan-core
> +
> + reg:
> + maxItems: 1
> +
> + resets:
> + maxItems: 1
> +
> + clocks:
> + description:
> + Input clock for registers access
> + maxItems: 1
> +
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 0
> +
> +additionalProperties: false
> +
> +required:
> + - compatible
> + - reg
> + - resets
> + - clocks
> + - '#address-cells'
> + - '#size-cells'
> +
> +patternProperties:
> + "^can@[0-9]+$":
> + type: object
> + description:
> + A CAN block node contains two subnodes, representing each one a CAN
> + instance available on the machine.
> +
> + properties:
> + compatible:
> + enum:
> + - st,stm32f4-bxcan
> +
> + st,can-master:
> + description:
> + Master and slave mode of the bxCAN peripheral is only relevant
> + if the chip has two CAN peripherals. In that case they share
> + some of the required logic, and that means you cannot use the
> + slave CAN without the master CAN.
> + type: boolean
> +
> + reg:
> + description: |
> + Offset of CAN instance in CAN block. Valid values are:
> + - 0x0: CAN1
> + - 0x400: CAN2
> + maxItems: 1
> +
> + interrupts:
> + items:
> + - description: transmit interrupt
> + - description: FIFO 0 receive interrupt
> + - description: FIFO 1 receive interrupt
> + - description: status change error interrupt
> +
> + interrupt-names:
> + items:
> + - const: tx
> + - const: rx0
> + - const: rx1
> + - const: sce
> +
> + resets:
> + maxItems: 1
> +
> + clocks:
> + description:
> + Input clock for registers access
> + maxItems: 1
> +
> + additionalProperties: false
> +
> + required:
> + - compatible
> + - reg
> + - interrupts
> + - resets
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/stm32fx-clock.h>
> + #include <dt-bindings/mfd/stm32f4-rcc.h>
> +
> + can: can@40006400 {
> + compatible = "st,stm32f4-bxcan-core";
> + reg = <0x40006400 0x800>;
> + resets = <&rcc STM32F4_APB1_RESET(CAN1)>;
> + clocks = <&rcc 0 STM32F4_APB1_CLOCK(CAN1)>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
Missing 'ranges'.
> + can1: can@0 {
> + compatible = "st,stm32f4-bxcan";
> + reg = <0x0>;
> + interrupts = <19>, <20>, <21>, <22>;
> + interrupt-names = "tx", "rx0", "rx1", "sce";
> + resets = <&rcc STM32F4_APB1_RESET(CAN1)>;
> + st,can-master;
No clocks?
> + };
> +
> + can2: can@400 {
> + compatible = "st,stm32f4-bxcan";
> + reg = <0x400>;
> + interrupts = <63>, <64>, <65>, <66>;
> + interrupt-names = "tx", "rx0", "rx1", "sce";
> + resets = <&rcc STM32F4_APB1_RESET(CAN2)>;
> + clocks = <&rcc 0 STM32F4_APB1_CLOCK(CAN2)>;
> + };
> + };
> --
> 2.32.0
>
>
next prev parent reply other threads:[~2022-08-25 21:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-20 8:29 [RFC PATCH v2 0/4] can: bxcan: add support for ST bxCAN controller Dario Binacchi
2022-08-20 8:29 ` [RFC PATCH v2 1/4] dt-bindings: net: can: add STM32 bxcan DT bindings Dario Binacchi
2022-08-23 13:41 ` Krzysztof Kozlowski
2022-08-26 7:12 ` Dario Binacchi
2022-08-25 21:12 ` Rob Herring [this message]
2022-08-26 7:27 ` Dario Binacchi
2022-08-31 22:05 ` Rob Herring
2022-08-20 8:29 ` [RFC PATCH v2 2/4] ARM: dts: stm32: add CAN support on stm32f429 Dario Binacchi
2022-08-20 8:29 ` [RFC PATCH v2 3/4] ARM: dts: stm32: add pin map for CAN controller on stm32f4 Dario Binacchi
2022-08-23 13:43 ` Krzysztof Kozlowski
2022-08-26 6:32 ` Dario Binacchi
2022-08-20 8:29 ` [RFC PATCH v2 4/4] can: bxcan: add support for ST bxCAN controller Dario Binacchi
2022-08-26 21:56 ` Vincent Mailhol
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=20220825211241.GA1688421-robh@kernel.org \
--to=robh@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=dario.binacchi@amarulasolutions.com \
--cc=dariobin@libero.it \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-amarula@amarulasolutions.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=michael@amarulasolutions.com \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=wg@grandegger.com \
/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).