Skip to content

Commit 2351998

Browse files
Charan-Pedumurumarckleinebudde
authored andcommitted
dt-bindings: net: can: atmel: Convert to json schema
Convert old text based binding to json schema. Changes during conversion: - Add a fallback for `microchip,sam9x60-can` as it is compatible with the CAN IP core on `atmel,at91sam9x5-can`. - Add the required properties `clock` and `clock-names`, which were missing in the original binding. - Update examples and include appropriate file directives to resolve errors identified by `dt_binding_check` and `dtbs_check`. Signed-off-by: Charan Pedumuru <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Link: https://patch.msgid.link/[email protected] [mkl: fixed indention in example] Signed-off-by: Marc Kleine-Budde <[email protected]>
1 parent 68d426d commit 2351998

File tree

2 files changed

+58
-15
lines changed

2 files changed

+58
-15
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/net/can/atmel,at91sam9263-can.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Microchip AT91 CAN Controller
8+
9+
maintainers:
10+
- Nicolas Ferre <[email protected]>
11+
12+
allOf:
13+
- $ref: can-controller.yaml#
14+
15+
properties:
16+
compatible:
17+
oneOf:
18+
- enum:
19+
- atmel,at91sam9263-can
20+
- atmel,at91sam9x5-can
21+
- items:
22+
- enum:
23+
- microchip,sam9x60-can
24+
- const: atmel,at91sam9x5-can
25+
26+
reg:
27+
maxItems: 1
28+
29+
interrupts:
30+
maxItems: 1
31+
32+
clocks:
33+
maxItems: 1
34+
35+
clock-names:
36+
items:
37+
- const: can_clk
38+
39+
required:
40+
- compatible
41+
- reg
42+
- interrupts
43+
- clocks
44+
- clock-names
45+
46+
unevaluatedProperties: false
47+
48+
examples:
49+
- |
50+
#include <dt-bindings/interrupt-controller/irq.h>
51+
#include <dt-bindings/clock/at91.h>
52+
can@f000c000 {
53+
compatible = "atmel,at91sam9263-can";
54+
reg = <0xf000c000 0x300>;
55+
interrupts = <30 IRQ_TYPE_LEVEL_HIGH 3>;
56+
clocks = <&pmc PMC_TYPE_PERIPHERAL 12>;
57+
clock-names = "can_clk";
58+
};

Documentation/devicetree/bindings/net/can/atmel-can.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)