Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <charan.pedumuru@microchip.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20241120-can-v3-1-da5bb4f6128d@microchip.com
[mkl: fixed indention in example]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

authored by

Charan Pedumuru and committed by
Marc Kleine-Budde
2351998f 68d426da

+58 -15
+58
Documentation/devicetree/bindings/net/can/atmel,at91sam9263-can.yaml
··· 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 <nicolas.ferre@microchip.com> 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 + };
-15
Documentation/devicetree/bindings/net/can/atmel-can.txt
··· 1 - * AT91 CAN * 2 - 3 - Required properties: 4 - - compatible: Should be "atmel,at91sam9263-can", "atmel,at91sam9x5-can" or 5 - "microchip,sam9x60-can" 6 - - reg: Should contain CAN controller registers location and length 7 - - interrupts: Should contain IRQ line for the CAN controller 8 - 9 - Example: 10 - 11 - can0: can@f000c000 { 12 - compatible = "atmel,at91sam9x5-can"; 13 - reg = <0xf000c000 0x300>; 14 - interrupts = <40 4 5> 15 - };