From: Conor Dooley <conor@kernel.org>
To: William Qiu <william.qiu@starfivetech.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org, linux-can@vger.kernel.org,
Emil Renner Berthing <kernel@esmil.dk>,
Rob Herring <robh+dt@kernel.org>,
Wolfgang Grandegger <wg@grandegger.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Marc Kleine-Budde <mkl@pengutronix.de>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>
Subject: Re: [PATCH v1 2/4] dt-bindings: can: Add bindings for CAST CAN Controller
Date: Mon, 29 Jan 2024 15:37:08 +0000 [thread overview]
Message-ID: <20240129-garnet-polar-65afd461a1c6@spud> (raw)
In-Reply-To: <20240129031239.17037-3-william.qiu@starfivetech.com>
[-- Attachment #1: Type: text/plain, Size: 3443 bytes --]
Hey William,
On Mon, Jan 29, 2024 at 11:12:37AM +0800, William Qiu wrote:
> Add bindings for CAST CAN Controller
>
> Signed-off-by: William Qiu <william.qiu@starfivetech.com>
> ---
> .../devicetree/bindings/net/can/cast,can.yaml | 95 +++++++++++++++++++
> 1 file changed, 95 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/can/cast,can.yaml
>
> diff --git a/Documentation/devicetree/bindings/net/can/cast,can.yaml b/Documentation/devicetree/bindings/net/can/cast,can.yaml
> new file mode 100644
> index 000000000000..ea52132d9b1c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/can/cast,can.yaml
> @@ -0,0 +1,95 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/can/cast,can.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: CAST CAN controller
> +
> +maintainers:
> + - William Qiu <william.qiu@starfivetech.com>
> +
> +allOf:
> + - $ref: can-controller.yaml#
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: starfive,can
> + then:
> + required:
> + - starfive,syscon
If you've got property related stuff in the allOf, move it down after
the property definitions.
> +properties:
> + compatible:
> + enum:
> + - cast,can
> + - cast,canfd
I don't like these uber generic compatibles that have no users as a
fallback. Allowing them in the binding only really discourages people
from creating device specific compatibles.
Secondly, this is some purchased IP that I am sure has a versioning
scheme and the compatibles that you have created do not reflect that.
If they were being used as a fallback, I would request some versioning.
That's not going to really work though since the canfd features on the
jh7110 require setting u0_can_ctrl_can_fd_enable, so neither of these
compatibles really has a use right now.
> + - starfive,can
Just "starfive,can"? Can you please add device specific compatibles for
the SoCs on which this is used?
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + minItems: 3
> +
> + clock-names:
> + items:
> + - const: apb_clk
> + - const: timer_clk
> + - const: can_clk
Drop _clk, they're all clocks!
> +
> + resets:
> + minItems: 3
> +
> + reset-names:
> + items:
> + - const: rst_apb
> + - const: rst_core
> + - const: rst_timer
Same here, drop rst_
> +
> + starfive,syscon:
> + $ref: /schemas/types.yaml#/definitions/phandle-array
> + items:
> + - items:
> + - description: phandle to System Register Controller syscon node
> + - description: offset of SYS_SYSCON_NE__SAIF__SYSCFG register for CAN controller
The docs I have call this register "SYS_SYSCONSAIF__SYSCFG". Did the
names change since the TRM I have was written?
> + - description: shift of SYS_SYSCON_NE__SAIF__SYSCFG register for CAN controller
> + - description: mask of SYS_SYSCON_NE__SAIF__SYSCFG register for CAN controller
> + description:
> + Should be four parameters, the phandle to System Register Controller
> + syscon node and the offset/shift/mask of SYS_SYSCON_NE__SAIF__SYSCFG register
> + for CAN controller.
Cheers,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-01-29 15:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-29 3:12 [PATCH v1 0/4] CAST Controller Area Network driver support William Qiu
2024-01-29 3:12 ` [PATCH v1 1/4] dt-bindings: vendor-prefixes: Add cast vendor prefix William Qiu
2024-01-29 14:59 ` Conor Dooley
2024-01-30 16:44 ` Rob Herring
2024-01-29 3:12 ` [PATCH v1 2/4] dt-bindings: can: Add bindings for CAST CAN Controller William Qiu
2024-01-29 15:37 ` Conor Dooley [this message]
2024-01-30 6:30 ` William Qiu
2024-01-30 17:02 ` Conor Dooley
2024-01-29 3:12 ` [PATCH v1 3/4] can: cast: add driver for CAST CAN controller William Qiu
2024-01-29 8:26 ` Marc Kleine-Budde
2024-01-29 8:42 ` William Qiu
2024-01-29 19:51 ` kernel test robot
2024-01-29 22:58 ` kernel test robot
2024-01-31 1:23 ` kernel test robot
2024-01-29 3:12 ` [PATCH v1 4/4] riscv: dts: starfive: jh7110: Add CAN node William Qiu
2024-01-29 7:57 ` [PATCH v1 0/4] CAST Controller Area Network driver support Marc Kleine-Budde
2024-01-29 8:07 ` William Qiu
2024-01-29 11:31 ` Marc Kleine-Budde
2024-01-30 6:41 ` William Qiu
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=20240129-garnet-polar-65afd461a1c6@spud \
--to=conor@kernel.org \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=kernel@esmil.dk \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mkl@pengutronix.de \
--cc=p.zabel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh+dt@kernel.org \
--cc=wg@grandegger.com \
--cc=william.qiu@starfivetech.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