* [PATCH] dt-bindings: net: can: bosch,cc770: Convert to DT schema
@ 2026-09-14 3:02 Quchaosheng
2026-09-14 3:02 ` [PATCH] net: can: cc770: update the binding file reference in the driver comment Quchaosheng
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Quchaosheng @ 2026-09-14 3:02 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-can, devicetree, quchaosheng000406
Convert the Bosch CC770 and Intel AN82527 controller binding from
free-form text to DT schema, and reference the common can-controller.yaml
schema.
The driver reads one more property than the old text documented:
"bosch,no-comperator-bypass", which is checked at cc770_platform.c:94.
It is documented here so that it can be used. Its spelling is kept as
the driver spells it.
The interrupt is obtained with platform_get_irq(), so interrupts is
required. The register window is described with the chip select, the
address offset and the size, as the original text and the existing
device trees on the local bus use three cells. The size is usually 0x80.
unevaluatedProperties is used rather than additionalProperties so that
properties provided by can-controller.yaml, such as termination-gpios,
remain usable.
Signed-off-by: Quchaosheng <quchaosheng000406@163.com>
---
.../bindings/net/can/bosch,cc770.yaml | 109 ++++++++++++++++++
.../devicetree/bindings/net/can/cc770.txt | 53 ---------
2 files changed, 109 insertions(+), 53 deletions(-)
create mode 100644 Documentation/devicetree/bindings/net/can/bosch,cc770.yaml
delete mode 100644 Documentation/devicetree/bindings/net/can/cc770.txt
diff --git a/Documentation/devicetree/bindings/net/can/bosch,cc770.yaml b/Documentation/devicetree/bindings/net/can/bosch,cc770.yaml
new file mode 100644
index 000000000..448d5b4f7
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/can/bosch,cc770.yaml
@@ -0,0 +1,109 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/can/bosch,cc770.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Bosch CC770 and Intel AN82527 CAN controllers
+
+maintainers:
+ - Marc Kleine-Budde <mkl@pengutronix.de>
+
+description:
+ The CC770 is a CAN controller from Bosch which is 100% compatible with the
+ older AN82527 from Intel, except that some bugs have been fixed.
+
+allOf:
+ - $ref: can-controller.yaml#
+
+properties:
+ compatible:
+ enum:
+ - bosch,cc770
+ - intc,82527
+
+ reg:
+ description:
+ Register window of the controller. On a PowerPC system the controller
+ sits on the local bus and the property describes the chip select, the
+ address offset and the size, the size usually being 0x80.
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ bosch,external-clock-frequency:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Frequency of the external oscillator clock in Hz. The internal clock
+ frequency used by the controller is half of this value.
+ default: 16000000
+
+ bosch,clock-out-frequency:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Clock frequency in Hz on the CLKOUT pin. If not specified or if the
+ value is 0 the CLKOUT pin is disabled.
+ default: 0
+
+ bosch,slew-rate:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Slew rate of the CLKOUT signal. If not specified a reasonable value
+ is calculated. Only used when bosch,clock-out-frequency is set.
+
+ bosch,divide-memory-clock:
+ description: Divide the memory clock for slower memories.
+ type: boolean
+
+ bosch,iso-low-speed-mux:
+ description: Use the ISO low speed multiplexed bus configuration.
+ type: boolean
+
+ bosch,no-comperator-bypass:
+ description:
+ Disable the comparator bypass. When this property is absent the
+ comparator bypass is enabled.
+ type: boolean
+
+ bosch,disconnect-rx0-input:
+ description: Disconnect the RX0 input.
+ type: boolean
+
+ bosch,disconnect-rx1-input:
+ description: Disconnect the RX1 input.
+ type: boolean
+
+ bosch,disconnect-tx1-output:
+ description: Disconnect the TX1 output.
+ type: boolean
+
+ bosch,polarity-dominant:
+ description: Use dominant polarity on the bus.
+ type: boolean
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ localbus {
+ #address-cells = <2>;
+ #size-cells = <1>;
+
+ can@2,100 {
+ compatible = "bosch,cc770";
+ reg = <2 0x100 0x100>;
+ interrupts = <4 1>;
+ interrupt-parent = <&mpic>;
+ bosch,external-clock-frequency = <16000000>;
+ bosch,disconnect-rx1-input;
+ bosch,disconnect-tx1-output;
+ bosch,iso-low-speed-mux;
+ };
+ };
+...
diff --git a/Documentation/devicetree/bindings/net/can/cc770.txt b/Documentation/devicetree/bindings/net/can/cc770.txt
deleted file mode 100644
index 042200cf4..000000000
--- a/Documentation/devicetree/bindings/net/can/cc770.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-Memory mapped Bosch CC770 and Intel AN82527 CAN controller
-
-Note: The CC770 is a CAN controller from Bosch, which is 100%
-compatible with the old AN82527 from Intel, but with "bugs" being fixed.
-
-Required properties:
-
-- compatible : should be "bosch,cc770" for the CC770 and "intc,82527"
- for the AN82527.
-
-- reg : should specify the chip select, address offset and size required
- to map the registers of the controller. The size is usually 0x80.
-
-- interrupts : property with a value describing the interrupt source
- (number and sensitivity) required for the controller.
-
-Optional properties:
-
-- bosch,external-clock-frequency : frequency of the external oscillator
- clock in Hz. Note that the internal clock frequency used by the
- controller is half of that value. If not specified, a default
- value of 16000000 (16 MHz) is used.
-
-- bosch,clock-out-frequency : slock frequency in Hz on the CLKOUT pin.
- If not specified or if the specified value is 0, the CLKOUT pin
- will be disabled.
-
-- bosch,slew-rate : slew rate of the CLKOUT signal. If not specified,
- a reasonable value will be calculated.
-
-- bosch,disconnect-rx0-input : see data sheet.
-
-- bosch,disconnect-rx1-input : see data sheet.
-
-- bosch,disconnect-tx1-output : see data sheet.
-
-- bosch,polarity-dominant : see data sheet.
-
-- bosch,divide-memory-clock : see data sheet.
-
-- bosch,iso-low-speed-mux : see data sheet.
-
-For further information, please have a look to the CC770 or AN82527.
-
-Examples:
-
-can@3,100 {
- compatible = "bosch,cc770";
- reg = <3 0x100 0x80>;
- interrupts = <2 0>;
- interrupt-parent = <&mpic>;
- bosch,external-clock-frequency = <16000000>;
-};
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] net: can: cc770: update the binding file reference in the driver comment
2026-09-14 3:02 [PATCH] dt-bindings: net: can: bosch,cc770: Convert to DT schema Quchaosheng
@ 2026-09-14 3:02 ` Quchaosheng
2026-09-14 3:06 ` sashiko-bot
2026-09-14 3:02 ` [PATCH] dt-bindings: net: can: holt,hi3110: Convert to DT schema Quchaosheng
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Quchaosheng @ 2026-09-14 3:02 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-can, devicetree, quchaosheng000406
The cc770 binding was converted from cc770.txt to bosch,cc770.yaml, so
update the path mentioned in the comment at the top of the platform
driver.
Signed-off-by: Quchaosheng <quchaosheng000406@163.com>
---
drivers/net/can/cc770/cc770_platform.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/can/cc770/cc770_platform.c b/drivers/net/can/cc770/cc770_platform.c
index b6c4f02ff..b690167c4 100644
--- a/drivers/net/can/cc770/cc770_platform.c
+++ b/drivers/net/can/cc770/cc770_platform.c
@@ -30,8 +30,8 @@
* bosch,external-clock-frequency = <16000000>;
* };
*
- * See "Documentation/devicetree/bindings/net/can/cc770.txt" for further
- * information.
+ * See "Documentation/devicetree/bindings/net/can/bosch,cc770.yaml" for
+ * further information.
*/
#include <linux/kernel.h>
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] dt-bindings: net: can: holt,hi3110: Convert to DT schema
2026-09-14 3:02 [PATCH] dt-bindings: net: can: bosch,cc770: Convert to DT schema Quchaosheng
2026-09-14 3:02 ` [PATCH] net: can: cc770: update the binding file reference in the driver comment Quchaosheng
@ 2026-09-14 3:02 ` Quchaosheng
2026-09-14 3:12 ` sashiko-bot
2026-09-15 10:52 ` Krzysztof Kozlowski
2026-09-14 3:02 ` [PATCH] dt-bindings: net: can: fsl,mpc5xxx-mscan: " Quchaosheng
2026-09-14 3:09 ` [PATCH] dt-bindings: net: can: bosch,cc770: " sashiko-bot
3 siblings, 2 replies; 9+ messages in thread
From: Quchaosheng @ 2026-09-14 3:02 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-can, devicetree, quchaosheng000406
Convert the Holt HI-311X stand-alone CAN controller binding from
free-form text to DT schema, and reference the common can-controller.yaml
schema.
The old text listed clocks as required, but the driver obtains the clock
with devm_clk_get_optional() and falls back to the "clock-frequency"
property when no clock is provided, so either one of the two must be
present and neither is required on its own. This is expressed with an
anyOf block, and clock-frequency is documented, as it was previously
undocumented.
The maximum supported clock frequency of 40000000 is also documented,
as that is the limit the driver enforces.
unevaluatedProperties is used rather than additionalProperties so that
properties provided by can-controller.yaml, such as termination-gpios,
remain usable.
Signed-off-by: Quchaosheng <quchaosheng000406@163.com>
---
.../bindings/net/can/holt,hi311x.yaml | 80 +++++++++++++++++++
.../bindings/net/can/holt_hi311x.txt | 23 ------
2 files changed, 80 insertions(+), 23 deletions(-)
create mode 100644 Documentation/devicetree/bindings/net/can/holt,hi311x.yaml
delete mode 100644 Documentation/devicetree/bindings/net/can/holt_hi311x.txt
diff --git a/Documentation/devicetree/bindings/net/can/holt,hi311x.yaml b/Documentation/devicetree/bindings/net/can/holt,hi311x.yaml
new file mode 100644
index 000000000..8c433fcac
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/can/holt,hi311x.yaml
@@ -0,0 +1,80 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/can/holt,hi311x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Holt HI-311X stand-alone CAN controller
+
+maintainers:
+ - Marc Kleine-Budde <mkl@pengutronix.de>
+
+description:
+ The Holt HI-3110 is a stand-alone CAN controller with an SPI interface.
+
+allOf:
+ - $ref: can-controller.yaml#
+
+properties:
+ compatible:
+ const: holt,hi3110
+
+ reg:
+ description: SPI chip select.
+ maxItems: 1
+
+ clocks:
+ description:
+ The clock feeding the CAN controller. If this property is not present
+ clock-frequency must be specified instead.
+ maxItems: 1
+
+ clock-frequency:
+ description:
+ Frequency of the clock feeding the CAN controller, in Hz. Used when
+ no clocks property is provided. The maximum supported frequency is
+ 40000000.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ interrupts:
+ description: IRQ line for the CAN controller.
+ maxItems: 1
+
+ vdd-supply:
+ description: Regulator that powers the CAN controller.
+
+ xceiver-supply:
+ description: Regulator that powers the CAN transceiver.
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+anyOf:
+ - required:
+ - clocks
+ - required:
+ - clock-frequency
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ can@1 {
+ compatible = "holt,hi3110";
+ reg = <1>;
+ clocks = <&clk32m>;
+ interrupt-parent = <&gpio4>;
+ interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
+ vdd-supply = <®5v0>;
+ xceiver-supply = <®5v0>;
+ };
+ };
+...
diff --git a/Documentation/devicetree/bindings/net/can/holt_hi311x.txt b/Documentation/devicetree/bindings/net/can/holt_hi311x.txt
deleted file mode 100644
index 3a9926f99..000000000
--- a/Documentation/devicetree/bindings/net/can/holt_hi311x.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-* Holt HI-311X stand-alone CAN controller device tree bindings
-
-Required properties:
- - compatible: Should be one of the following:
- - "holt,hi3110" for HI-3110
- - 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.
-
-Example:
- can0: can@1 {
- compatible = "holt,hi3110";
- reg = <1>;
- clocks = <&clk32m>;
- interrupt-parent = <&gpio4>;
- interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
- vdd-supply = <®5v0>;
- xceiver-supply = <®5v0>;
- };
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] dt-bindings: net: can: fsl,mpc5xxx-mscan: Convert to DT schema
2026-09-14 3:02 [PATCH] dt-bindings: net: can: bosch,cc770: Convert to DT schema Quchaosheng
2026-09-14 3:02 ` [PATCH] net: can: cc770: update the binding file reference in the driver comment Quchaosheng
2026-09-14 3:02 ` [PATCH] dt-bindings: net: can: holt,hi3110: Convert to DT schema Quchaosheng
@ 2026-09-14 3:02 ` Quchaosheng
2026-09-14 3:12 ` sashiko-bot
2026-09-14 3:09 ` [PATCH] dt-bindings: net: can: bosch,cc770: " sashiko-bot
3 siblings, 1 reply; 9+ messages in thread
From: Quchaosheng @ 2026-09-14 3:02 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-can, devicetree, quchaosheng000406
Convert the Freescale MPC5xxx MSCAN controller binding from free-form
text to DT schema, and reference the common can-controller.yaml schema.
The original text described the two compatible strings and their clock
source properties in separate sections. This is expressed with a single
enum for compatible, and the allowed values of fsl,mscan-clock-source
are constrained to the strings the driver accepts: the driver compares
against "ip", "sys" and "ref" and rejects anything else.
The clocks and clock-names properties are documented as well. The
driver looks up the "ipg", "ips", "sys", "ref" and "mclk" clocks by
name, and the existing device trees provide exactly those. They were
not described by the old text.
The note that the MPC5121 Rev. 1 processor is not supported is kept from
the original text.
unevaluatedProperties is used rather than additionalProperties so that
properties provided by can-controller.yaml, such as termination-gpios,
remain usable.
Signed-off-by: Quchaosheng <quchaosheng000406@163.com>
---
.../bindings/net/can/fsl,mpc5xxx-mscan.yaml | 87 +++++++++++++++++++
.../bindings/net/can/mpc5xxx-mscan.txt | 53 -----------
2 files changed, 87 insertions(+), 53 deletions(-)
create mode 100644 Documentation/devicetree/bindings/net/can/fsl,mpc5xxx-mscan.yaml
delete mode 100644 Documentation/devicetree/bindings/net/can/mpc5xxx-mscan.txt
diff --git a/Documentation/devicetree/bindings/net/can/fsl,mpc5xxx-mscan.yaml b/Documentation/devicetree/bindings/net/can/fsl,mpc5xxx-mscan.yaml
new file mode 100644
index 000000000..108f225f9
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/can/fsl,mpc5xxx-mscan.yaml
@@ -0,0 +1,87 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/can/fsl,mpc5xxx-mscan.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale MPC5xxx MSCAN controller
+
+maintainers:
+ - Marc Kleine-Budde <mkl@pengutronix.de>
+
+description:
+ The MSCAN controller found on Freescale MPC5200 and MPC5121 SoCs. Note that
+ the MPC5121 Rev. 1 processor is not supported.
+
+allOf:
+ - $ref: can-controller.yaml#
+
+properties:
+ compatible:
+ enum:
+ - fsl,mpc5200-mscan
+ - fsl,mpc5121-mscan
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ description:
+ Clocks the controller needs. On MPC5121 the driver looks up "ipg",
+ "ips", "sys", "ref" and "mclk" by name.
+ maxItems: 5
+
+ clock-names:
+ items:
+ - const: ipg
+ - const: ips
+ - const: sys
+ - const: ref
+ - const: mclk
+
+ fsl,mscan-clock-source:
+ description:
+ Clock source used for the controller. Valid values are "ip" for the IP
+ bus clock, "ref" for the reference clock (XTAL) and "sys" for the
+ system clock. "sys" is only available on MPC5121. When the property is
+ absent, an optimal clock source based on the system clock is selected,
+ falling back to the reference clock.
+ enum: [ip, ref, sys]
+
+ fsl,mscan-clock-divider:
+ description:
+ Additional clock divider for the reference and system clock sources.
+ Defaults to 1 when not specified.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ can@1300 {
+ compatible = "fsl,mpc5121-mscan";
+ reg = <0x1300 0x80>;
+ interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-parent = <&ipic>;
+ };
+
+ can@1380 {
+ compatible = "fsl,mpc5121-mscan";
+ reg = <0x1380 0x80>;
+ interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-parent = <&ipic>;
+ fsl,mscan-clock-source = "ref";
+ fsl,mscan-clock-divider = <3>;
+ };
+...
diff --git a/Documentation/devicetree/bindings/net/can/mpc5xxx-mscan.txt b/Documentation/devicetree/bindings/net/can/mpc5xxx-mscan.txt
deleted file mode 100644
index 2fa4fcd38..000000000
--- a/Documentation/devicetree/bindings/net/can/mpc5xxx-mscan.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-CAN Device Tree Bindings
-------------------------
-
-(c) 2006-2009 Secret Lab Technologies Ltd
-Grant Likely <grant.likely@secretlab.ca>
-
-fsl,mpc5200-mscan nodes
------------------------
-In addition to the required compatible-, reg- and interrupt-properties, you can
-also specify which clock source shall be used for the controller:
-
-- fsl,mscan-clock-source : a string describing the clock source. Valid values
- are: "ip" for ip bus clock
- "ref" for reference clock (XTAL)
- "ref" is default in case this property is not
- present.
-
-fsl,mpc5121-mscan nodes
------------------------
-In addition to the required compatible-, reg- and interrupt-properties, you can
-also specify which clock source and divider shall be used for the controller:
-
-- fsl,mscan-clock-source : a string describing the clock source. Valid values
- are: "ip" for ip bus clock
- "ref" for reference clock
- "sys" for system clock
- If this property is not present, an optimal CAN
- clock source and frequency based on the system
- clock will be selected. If this is not possible,
- the reference clock will be used.
-
-- fsl,mscan-clock-divider: for the reference and system clock, an additional
- clock divider can be specified. By default, a
- value of 1 is used.
-
-Note that the MPC5121 Rev. 1 processor is not supported.
-
-Examples:
- can@1300 {
- compatible = "fsl,mpc5121-mscan";
- interrupts = <12 0x8>;
- interrupt-parent = <&ipic>;
- reg = <0x1300 0x80>;
- };
-
- can@1380 {
- compatible = "fsl,mpc5121-mscan";
- interrupts = <13 0x8>;
- interrupt-parent = <&ipic>;
- reg = <0x1380 0x80>;
- fsl,mscan-clock-source = "ref";
- fsl,mscan-clock-divider = <3>;
- };
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] net: can: cc770: update the binding file reference in the driver comment
2026-09-14 3:02 ` [PATCH] net: can: cc770: update the binding file reference in the driver comment Quchaosheng
@ 2026-09-14 3:06 ` sashiko-bot
0 siblings, 0 replies; 9+ messages in thread
From: sashiko-bot @ 2026-09-14 3:06 UTC (permalink / raw)
To: Quchaosheng
Cc: devicetree, robh, Marc Kleine-Budde, Oliver Hartkopp, linux-can,
Oleksij Rempel, Vincent Mailhol, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The commit updates a comment to reference a converted YAML binding file that does not exist in the repository.
--
commit e518a37460a65d07aab5618e8c0ad5c878991050
Author: Quchaosheng <quchaosheng000406@163.com>
net: can: cc770: update the binding file reference in the driver comment
This commit updates the comment at the top of the cc770 platform driver to
reference the newly converted device tree binding YAML file instead of the old
text file.
> diff --git a/drivers/net/can/cc770/cc770_platform.c b/drivers/net/can/cc770/cc770_platform.c
> index b6c4f02ffb97a..b690167c454fc 100644
> --- a/drivers/net/can/cc770/cc770_platform.c
> +++ b/drivers/net/can/cc770/cc770_platform.c
> @@ -30,8 +30,8 @@
> * bosch,external-clock-frequency = <16000000>;
> * };
> *
> - * See "Documentation/devicetree/bindings/net/can/cc770.txt" for further
> - * information.
> + * See "Documentation/devicetree/bindings/net/can/bosch,cc770.yaml" for
> + * further information.
[Severity: Low]
Does the bosch,cc770.yaml file actually exist in the repository?
It appears that Documentation/devicetree/bindings/net/can/bosch,cc770.yaml
was not added in this commit, and Documentation/devicetree/bindings/net/can/cc770.txt
is still present in the tree.
Is this patch part of a larger series where the YAML conversion happens in a
different commit that wasn't included?
> */
>
> #include <linux/kernel.h>
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260914030215.437602-2-quchaosheng000406@163.com?part=1
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] dt-bindings: net: can: bosch,cc770: Convert to DT schema
2026-09-14 3:02 [PATCH] dt-bindings: net: can: bosch,cc770: Convert to DT schema Quchaosheng
` (2 preceding siblings ...)
2026-09-14 3:02 ` [PATCH] dt-bindings: net: can: fsl,mpc5xxx-mscan: " Quchaosheng
@ 2026-09-14 3:09 ` sashiko-bot
3 siblings, 0 replies; 9+ messages in thread
From: sashiko-bot @ 2026-09-14 3:09 UTC (permalink / raw)
To: Quchaosheng
Cc: conor+dt, Oleksij Rempel, Vincent Mailhol, devicetree,
Marc Kleine-Budde, robh, Oliver Hartkopp, linux-can
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Pre-existing issues:
- [High] platform_get_irq() error code is shadowed.
- [High] Incorrect check of uninitialized field priv->cpu_interface instead of pdata->cir.
--
commit 534a229fcad73012a922f469773dd3f6d658bb9e
Author: Quchaosheng <quchaosheng000406@163.com>
dt-bindings: net: can: bosch,cc770: Convert to DT schema
This commit converts the Bosch CC770 and Intel AN82527 controller binding from
free-form text to DT schema. It also references the common can-controller.yaml
schema and documents additional properties used by the driver.
> diff --git a/Documentation/devicetree/bindings/net/can/bosch,cc770.yaml b/Documentation/devicetree/bindings/net/can/bosch,cc770.yaml
> new file mode 100644
> index 0000000000000..448d5b4f74b57
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/can/bosch,cc770.yaml
> @@ -0,0 +1,109 @@
[ ... ]
> +properties:
> + compatible:
> + enum:
> + - bosch,cc770
> + - intc,82527
[Severity: High]
This is a pre-existing issue, but while looking at the platform data
initialization for this controller, I noticed that the clock divider logic
seems to check an uninitialized field.
In drivers/net/can/cc770/cc770_platform.c:cc770_get_platform_data():
priv->can.clock.freq = pdata->osc_freq;
if (priv->cpu_interface & CPUIF_DSC)
priv->can.clock.freq /= 2;
priv->clkout = pdata->cor;
priv->bus_config = pdata->bcr;
priv->cpu_interface = pdata->cir;
Since priv->cpu_interface is assigned pdata->cir after the check, is
priv->cpu_interface unconditionally 0 here due to the zero-initialization
during allocation? If so, will this prevent the frequency from being correctly
halved when CPUIF_DSC is set in the platform data?
[ ... ]
> + reg:
> + description:
> + Register window of the controller. On a PowerPC system the controller
> + sits on the local bus and the property describes the chip select, the
> + address offset and the size, the size usually being 0x80.
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
[Severity: High]
This isn't a bug introduced by this patch, but while reviewing the interrupt
handling property, I noticed the driver shadows the error code during probe.
In drivers/net/can/cc770/cc770_platform.c:cc770_platform_probe():
irq = platform_get_irq(pdev, 0);
if (!mem || irq <= 0)
return -ENODEV;
If platform_get_irq() returns a negative error code such as -EPROBE_DEFER,
the function unconditionally returns -ENODEV instead of the actual error.
Could this permanently prevent the device from probing if its interrupt
controller is initialized after the CC770 driver?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260914030215.437602-1-quchaosheng000406@163.com?part=1
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] dt-bindings: net: can: fsl,mpc5xxx-mscan: Convert to DT schema
2026-09-14 3:02 ` [PATCH] dt-bindings: net: can: fsl,mpc5xxx-mscan: " Quchaosheng
@ 2026-09-14 3:12 ` sashiko-bot
0 siblings, 0 replies; 9+ messages in thread
From: sashiko-bot @ 2026-09-14 3:12 UTC (permalink / raw)
To: Quchaosheng
Cc: devicetree, Marc Kleine-Budde, robh, Vincent Mailhol,
Oleksij Rempel, conor+dt, Oliver Hartkopp, linux-can
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The schema omits the `fsl,mpc5200b-mscan` fallback compatible string used in existing device trees, causing schema validation failures.
- [Medium] The schema is missing conditional `if-then` blocks, globally allowing properties that are invalid for MPC5200, and failing to mandate required properties for MPC5121.
--
commit dee9e6a0d172cc57e05eeda41cfef5b093d00d22
Author: Quchaosheng <quchaosheng000406@163.com>
dt-bindings: net: can: fsl,mpc5xxx-mscan: Convert to DT schema
Converts the Freescale MPC5xxx MSCAN controller binding from free-form text
to DT schema. It specifies compatible strings, clocks, clock names, and
mscan clock properties.
> diff --git a/Documentation/devicetree/bindings/net/can/fsl,mpc5xxx-mscan.yaml b/Documentation/devicetree/bindings/net/can/fsl,mpc5xxx-mscan.yaml
> new file mode 100644
> index 0000000000000..108f225f91963
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/can/fsl,mpc5xxx-mscan.yaml
> @@ -0,0 +1,87 @@
[ ... ]
> +properties:
> + compatible:
> + enum:
> + - fsl,mpc5200-mscan
> + - fsl,mpc5121-mscan
[Severity: Medium]
Will this strict enum cause validation failures for existing device trees?
Existing device trees, such as arch/powerpc/boot/dts/mpc5200b.dtsi, use a
fallback array pattern:
compatible = "fsl,mpc5200b-mscan", "fsl,mpc5200-mscan";
Should the schema allow fsl,mpc5200b-mscan as well, perhaps using an items
list to support the fallback?
[ ... ]
> + fsl,mscan-clock-source:
> + description:
> + Clock source used for the controller. Valid values are "ip" for the IP
> + bus clock, "ref" for the reference clock (XTAL) and "sys" for the
> + system clock. "sys" is only available on MPC5121. When the property is
> + absent, an optimal clock source based on the system clock is selected,
> + falling back to the reference clock.
> + enum: [ip, ref, sys]
[Severity: Medium]
Should the sys value be restricted to the MPC5121 variant?
The schema currently allows sys globally, even though it is invalid for
the MPC5200. An if-then block could be used to restrict this.
> +
> + fsl,mscan-clock-divider:
> + description:
> + Additional clock divider for the reference and system clock sources.
> + Defaults to 1 when not specified.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + default: 1
[Severity: Medium]
Does this allow the fsl,mscan-clock-divider property on the MPC5200 variant
where it does not exist?
An if-then conditional block could also restrict this property to the MPC5121
variant to prevent it from silently passing validation on MPC5200 nodes.
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
[Severity: Medium]
Should clocks and clock-names be required for the MPC5121 variant?
The driver probe requires these clocks for MPC5121. Without an if-then block
requiring them, incomplete nodes will silently pass schema validation but fail
at runtime.
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/irq.h>
> +
> + can@1300 {
> + compatible = "fsl,mpc5121-mscan";
> + reg = <0x1300 0x80>;
> + interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
> + interrupt-parent = <&ipic>;
> + };
[Severity: Medium]
Since the clocks and clock-names properties are strictly required by the
driver for MPC5121, does this example represent a functionally broken
configuration?
Because the schema does not strictly require the clock properties, this
example passes validation, which demonstrates that the schema accepts
invalid configurations.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260914030215.437602-4-quchaosheng000406@163.com?part=1
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] dt-bindings: net: can: holt,hi3110: Convert to DT schema
2026-09-14 3:02 ` [PATCH] dt-bindings: net: can: holt,hi3110: Convert to DT schema Quchaosheng
@ 2026-09-14 3:12 ` sashiko-bot
2026-09-15 10:52 ` Krzysztof Kozlowski
1 sibling, 0 replies; 9+ messages in thread
From: sashiko-bot @ 2026-09-14 3:12 UTC (permalink / raw)
To: Quchaosheng
Cc: linux-can, Oliver Hartkopp, conor+dt, devicetree, Vincent Mailhol,
Marc Kleine-Budde, Oleksij Rempel, robh
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] The schema omits a reference to the standard SPI peripheral properties schema, which will cause valid standard SPI properties (like `spi-max-frequency`) to be falsely rejected.
- [Low] The maximum supported clock frequency is documented in the schema text but not formally enforced as a JSON Schema constraint.
--
commit 708f7e5cdeffdf3f0881283fe507970525fe6ae2
Author: Quchaosheng <quchaosheng000406@163.com>
dt-bindings: net: can: holt,hi3110: Convert to DT schema
This commit converts the Holt HI-311X stand-alone CAN controller binding from
free-form text to a DT schema. It references the common can-controller schema
and explicitly models the alternative between a provided clock and a clock
frequency fallback.
> diff --git a/Documentation/devicetree/bindings/net/can/holt,hi311x.yaml b/Documentation/devicetree/bindings/net/can/holt,hi311x.yaml
> new file mode 100644
> index 0000000000000..8c433fcac4a5a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/can/holt,hi311x.yaml
> @@ -0,0 +1,80 @@
[ ... ]
> +description:
> + The Holt HI-3110 is a stand-alone CAN controller with an SPI interface.
> +
> +allOf:
> + - $ref: can-controller.yaml#
[Severity: Low]
Does this schema need a reference to /schemas/spi/spi-peripheral-props.yaml#?
Because unevaluatedProperties is set to false at the bottom of the schema,
and the SPI peripheral properties are not pulled in by can-controller.yaml,
valid SPI properties like spi-max-frequency will be treated as undocumented
and falsely rejected by dtbs_check.
> +
> +properties:
> + compatible:
> + const: holt,hi3110
[ ... ]
> + clock-frequency:
> + description:
> + Frequency of the clock feeding the CAN controller, in Hz. Used when
> + no clocks property is provided. The maximum supported frequency is
> + 40000000.
> + $ref: /schemas/types.yaml#/definitions/uint32
[Severity: Low]
Should this property include a formal maximum: 40000000 constraint?
The description mentions the 40 MHz limit, but without the JSON Schema
constraint, device trees configuring a higher frequency will silently pass
schema validation even though the driver enforces the limit at runtime.
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260914030215.437602-3-quchaosheng000406@163.com?part=1
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] dt-bindings: net: can: holt,hi3110: Convert to DT schema
2026-09-14 3:02 ` [PATCH] dt-bindings: net: can: holt,hi3110: Convert to DT schema Quchaosheng
2026-09-14 3:12 ` sashiko-bot
@ 2026-09-15 10:52 ` Krzysztof Kozlowski
1 sibling, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-15 10:52 UTC (permalink / raw)
To: Quchaosheng
Cc: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-can, devicetree
On Mon, Sep 14, 2026 at 11:02:14AM +0800, Quchaosheng wrote:
> Convert the Holt HI-311X stand-alone CAN controller binding from
> free-form text to DT schema, and reference the common can-controller.yaml
> schema.
>
> The old text listed clocks as required, but the driver obtains the clock
> with devm_clk_get_optional() and falls back to the "clock-frequency"
> property when no clock is provided, so either one of the two must be
> present and neither is required on its own. This is expressed with an
> anyOf block, and clock-frequency is documented, as it was previously
> undocumented.
>
> The maximum supported clock frequency of 40000000 is also documented,
> as that is the limit the driver enforces.
>
> unevaluatedProperties is used rather than additionalProperties so that
> properties provided by can-controller.yaml, such as termination-gpios,
> remain usable.
>
> Signed-off-by: Quchaosheng <quchaosheng000406@163.com>
> ---
> .../bindings/net/can/holt,hi311x.yaml | 80 +++++++++++++++++++
> .../bindings/net/can/holt_hi311x.txt | 23 ------
> 2 files changed, 80 insertions(+), 23 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/net/can/holt,hi311x.yaml
> delete mode 100644 Documentation/devicetree/bindings/net/can/holt_hi311x.txt
I see here four patches clumped in one thread, of which I think I
responded to v2, but this is still in patchwork. Probably your patches
are organized in a way confusing the tools.
Please read carefully submitting patches and for example Linaro's guide
for first time contributions.
I am dropping this entire thread from DT Patchwork.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-09-15 10:52 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-14 3:02 [PATCH] dt-bindings: net: can: bosch,cc770: Convert to DT schema Quchaosheng
2026-09-14 3:02 ` [PATCH] net: can: cc770: update the binding file reference in the driver comment Quchaosheng
2026-09-14 3:06 ` sashiko-bot
2026-09-14 3:02 ` [PATCH] dt-bindings: net: can: holt,hi3110: Convert to DT schema Quchaosheng
2026-09-14 3:12 ` sashiko-bot
2026-09-15 10:52 ` Krzysztof Kozlowski
2026-09-14 3:02 ` [PATCH] dt-bindings: net: can: fsl,mpc5xxx-mscan: " Quchaosheng
2026-09-14 3:12 ` sashiko-bot
2026-09-14 3:09 ` [PATCH] dt-bindings: net: can: bosch,cc770: " sashiko-bot
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).