From: Marc Kleine-Budde <mkl@pengutronix.de>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, linux-can@vger.kernel.org,
kernel@pengutronix.de, Biju Das <biju.das.jz@bp.renesas.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH net-next 07/29] dt-bindings: can: sja1000: Convert to json-schema
Date: Wed, 20 Jul 2022 10:10:12 +0200 [thread overview]
Message-ID: <20220720081034.3277385-8-mkl@pengutronix.de> (raw)
In-Reply-To: <20220720081034.3277385-1-mkl@pengutronix.de>
From: Biju Das <biju.das.jz@bp.renesas.com>
Convert the NXP SJA1000 CAN Controller Device Tree binding
documentation to json-schema.
Update the example to match reality.
Link: https://lore.kernel.org/all/20220710115248.190280-2-biju.das.jz@bp.renesas.com
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
.../bindings/net/can/nxp,sja1000.yaml | 101 ++++++++++++++++++
.../devicetree/bindings/net/can/sja1000.txt | 58 ----------
2 files changed, 101 insertions(+), 58 deletions(-)
create mode 100644 Documentation/devicetree/bindings/net/can/nxp,sja1000.yaml
delete mode 100644 Documentation/devicetree/bindings/net/can/sja1000.txt
diff --git a/Documentation/devicetree/bindings/net/can/nxp,sja1000.yaml b/Documentation/devicetree/bindings/net/can/nxp,sja1000.yaml
new file mode 100644
index 000000000000..ca9bfdfa50ab
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/can/nxp,sja1000.yaml
@@ -0,0 +1,101 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/can/nxp,sja1000.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Memory mapped SJA1000 CAN controller from NXP (formerly Philips)
+
+maintainers:
+ - Wolfgang Grandegger <wg@grandegger.com>
+
+properties:
+ compatible:
+ enum:
+ - nxp,sja1000
+ - technologic,sja1000
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ reg-io-width:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: I/O register width (in bytes) implemented by this device
+ default: 1
+ enum: [ 1, 2, 4 ]
+
+ nxp,external-clock-frequency:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 16000000
+ description: |
+ Frequency of the external oscillator clock in Hz.
+ The internal clock frequency used by the SJA1000 is half of that value.
+
+ nxp,tx-output-mode:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3 ]
+ default: 1
+ description: |
+ operation mode of the TX output control logic. Valid values are:
+ <0> : bi-phase output mode
+ <1> : normal output mode (default)
+ <2> : test output mode
+ <3> : clock output mode
+
+ nxp,tx-output-config:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 0x02
+ description: |
+ TX output pin configuration. Valid values are any one of the below
+ or combination of TX0 and TX1:
+ <0x01> : TX0 invert
+ <0x02> : TX0 pull-down (default)
+ <0x04> : TX0 pull-up
+ <0x06> : TX0 push-pull
+ <0x08> : TX1 invert
+ <0x10> : TX1 pull-down
+ <0x20> : TX1 pull-up
+ <0x30> : TX1 push-pull
+
+ nxp,clock-out-frequency:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: |
+ clock frequency in Hz on the CLKOUT pin.
+ If not specified or if the specified value is 0, the CLKOUT pin
+ will be disabled.
+
+ nxp,no-comparator-bypass:
+ type: boolean
+ description: Allows to disable the CAN input comparator.
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+allOf:
+ - $ref: can-controller.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: technologic,sja1000
+ then:
+ required:
+ - reg-io-width
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ can@1a000 {
+ compatible = "technologic,sja1000";
+ reg = <0x1a000 0x100>;
+ interrupts = <1>;
+ reg-io-width = <2>;
+ nxp,tx-output-config = <0x06>;
+ nxp,external-clock-frequency = <24000000>;
+ };
diff --git a/Documentation/devicetree/bindings/net/can/sja1000.txt b/Documentation/devicetree/bindings/net/can/sja1000.txt
deleted file mode 100644
index ac3160eca96a..000000000000
--- a/Documentation/devicetree/bindings/net/can/sja1000.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-Memory mapped SJA1000 CAN controller from NXP (formerly Philips)
-
-Required properties:
-
-- compatible : should be one of "nxp,sja1000", "technologic,sja1000".
-
-- reg : should specify the chip select, address offset and size required
- to map the registers of the SJA1000. The size is usually 0x80.
-
-- interrupts: property with a value describing the interrupt source
- (number and sensitivity) required for the SJA1000.
-
-Optional properties:
-
-- reg-io-width : Specify the size (in bytes) of the IO accesses that
- should be performed on the device. Valid value is 1, 2 or 4.
- This property is ignored for technologic version.
- Default to 1 (8 bits).
-
-- nxp,external-clock-frequency : Frequency of the external oscillator
- clock in Hz. Note that the internal clock frequency used by the
- SJA1000 is half of that value. If not specified, a default value
- of 16000000 (16 MHz) is used.
-
-- nxp,tx-output-mode : operation mode of the TX output control logic:
- <0x0> : bi-phase output mode
- <0x1> : normal output mode (default)
- <0x2> : test output mode
- <0x3> : clock output mode
-
-- nxp,tx-output-config : TX output pin configuration:
- <0x01> : TX0 invert
- <0x02> : TX0 pull-down (default)
- <0x04> : TX0 pull-up
- <0x06> : TX0 push-pull
- <0x08> : TX1 invert
- <0x10> : TX1 pull-down
- <0x20> : TX1 pull-up
- <0x30> : TX1 push-pull
-
-- nxp,clock-out-frequency : clock frequency in Hz on the CLKOUT pin.
- If not specified or if the specified value is 0, the CLKOUT pin
- will be disabled.
-
-- nxp,no-comparator-bypass : Allows to disable the CAN input comparator.
-
-For further information, please have a look to the SJA1000 data sheet.
-
-Examples:
-
-can@3,100 {
- compatible = "nxp,sja1000";
- reg = <3 0x100 0x80>;
- interrupts = <2 0>;
- interrupt-parent = <&mpic>;
- nxp,external-clock-frequency = <16000000>;
-};
-
--
2.35.1
next prev parent reply other threads:[~2022-07-20 8:12 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-20 8:10 [PATCH net-next 0/29] pull-request: can-next 2022-07-20 Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 01/29] can: slcan: use scnprintf() as a hardening measure Marc Kleine-Budde
2022-07-20 9:30 ` patchwork-bot+netdevbpf
2022-07-20 8:10 ` [PATCH net-next 02/29] can: slcan: convert comments to network style comments Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 03/29] can: slcan: slcan_init() convert printk(LEVEL ...) to pr_level() Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 04/29] can: slcan: fix whitespace issues Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 05/29] can: slcan: convert comparison to NULL into !val Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 06/29] can: slcan: clean up if/else Marc Kleine-Budde
2022-07-20 8:10 ` Marc Kleine-Budde [this message]
2022-07-20 8:10 ` [PATCH net-next 08/29] dt-bindings: can: nxp,sja1000: Document RZ/N1{D,S} support Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 09/29] can: sja1000: Add Quirk for RZ/N1 SJA1000 CAN controller Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 10/29] can: sja1000: Use device_get_match_data to get device data Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 11/29] can: sja1000: Change the return type as void for SoC specific init Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 12/29] can: slcan: do not sleep with a spin lock held Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 13/29] can: c_can: remove wrong comment Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 14/29] can: ctucanfd: Update CTU CAN FD IP core registers to match version 3.x Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 15/29] can: peak_usb: pcan_dump_mem(): mark input prompt and data pointer as const Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 16/29] can: peak_usb: correction of an initially misnamed field name Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 17/29] can: peak_usb: include support for a new MCU Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 18/29] can: pch_can: do not report txerr and rxerr during bus-off Marc Kleine-Budde
2022-07-21 15:27 ` Nathan Chancellor
2022-07-21 15:47 ` Marc Kleine-Budde
2022-07-21 16:11 ` Vincent MAILHOL
2022-07-21 16:20 ` Nathan Chancellor
2022-07-21 16:51 ` Jakub Kicinski
2022-07-21 16:00 ` [PATCH] can: pch_can: initialize errc before using it Vincent Mailhol
2022-07-21 16:02 ` Nathan Chancellor
2022-07-20 8:10 ` [PATCH net-next 19/29] can: rcar_can: do not report txerr and rxerr during bus-off Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 20/29] can: sja1000: " Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 21/29] can: slcan: " Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 22/29] can: hi311x: " Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 23/29] can: sun4i_can: " Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 24/29] can: kvaser_usb_hydra: " Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 25/29] can: kvaser_usb_leaf: " Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 26/29] can: usb_8dev: " Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 27/29] can: error: specify the values of data[5..7] of CAN error frames Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 28/29] can: add CAN_ERR_CNT flag to notify availability of error counter Marc Kleine-Budde
2022-07-20 8:10 ` [PATCH net-next 29/29] can: error: add definitions for the different CAN error thresholds Marc Kleine-Budde
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=20220720081034.3277385-8-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=biju.das.jz@bp.renesas.com \
--cc=davem@davemloft.net \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=netdev@vger.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 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).