Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / waveshare-can-fd-hat-mode-b-overlay.dts
1 // redo: ovmerge -c mcp251xfd-overlay.dts,spi0-0,interrupt=25 mcp251xfd-overlay.dts,spi0-1,interrupt=16
2
3 // Device tree overlay for https://www.waveshare.com/2-ch-can-fd-hat.htm
4 // in "Mode B" (requried hardware modification) configuration
5 // for details see https://www.waveshare.com/wiki/2-CH_CAN_FD_HAT
6
7
8 /dts-v1/;
9 /plugin/;
10
11 #include <dt-bindings/gpio/gpio.h>
12 #include <dt-bindings/interrupt-controller/irq.h>
13 #include <dt-bindings/pinctrl/bcm2835.h>
14
15 / {
16         compatible = "brcm,bcm2835";
17         fragment@0 {
18                 target = <&spidev0>;
19                 __overlay__ {
20                         status = "disabled";
21                 };
22         };
23         fragment@1 {
24                 target = <&gpio>;
25                 __overlay__ {
26                         mcp251xfd_pins: mcp251xfd_spi0_0_pins {
27                                 brcm,pins = <25>;
28                                 brcm,function = <BCM2835_FSEL_GPIO_IN>;
29                         };
30                 };
31         };
32         fragment@2 {
33                 target-path = "/clocks";
34                 __overlay__ {
35                         clk_mcp251xfd_osc: mcp251xfd-spi0-0-osc {
36                                 #clock-cells = <0>;
37                                 compatible = "fixed-clock";
38                                 clock-frequency = <40000000>;
39                         };
40                 };
41         };
42         fragment@3 {
43                 target = <&spi0>;
44                 __overlay__ {
45                         status = "okay";
46                         #address-cells = <1>;
47                         #size-cells = <0>;
48                         mcp251xfd@0 {
49                                 compatible = "microchip,mcp251xfd";
50                                 reg = <0>;
51                                 pinctrl-names = "default";
52                                 pinctrl-0 = <&mcp251xfd_pins>;
53                                 spi-max-frequency = <20000000>;
54                                 interrupt-parent = <&gpio>;
55                                 interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
56                                 clocks = <&clk_mcp251xfd_osc>;
57                         };
58                 };
59         };
60         fragment@4 {
61                 target = <&spidev1>;
62                 __overlay__ {
63                         status = "disabled";
64                 };
65         };
66         fragment@5 {
67                 target = <&gpio>;
68                 __overlay__ {
69                         mcp251xfd_pins_1: mcp251xfd_spi0_1_pins {
70                                 brcm,pins = <16>;
71                                 brcm,function = <BCM2835_FSEL_GPIO_IN>;
72                         };
73                 };
74         };
75         fragment@6 {
76                 target-path = "/clocks";
77                 __overlay__ {
78                         clk_mcp251xfd_osc_1: mcp251xfd-spi0-1-osc {
79                                 #clock-cells = <0>;
80                                 compatible = "fixed-clock";
81                                 clock-frequency = <40000000>;
82                         };
83                 };
84         };
85         fragment@7 {
86                 target = <&spi0>;
87                 __overlay__ {
88                         status = "okay";
89                         #address-cells = <1>;
90                         #size-cells = <0>;
91                         mcp251xfd@1 {
92                                 compatible = "microchip,mcp251xfd";
93                                 reg = <1>;
94                                 pinctrl-names = "default";
95                                 pinctrl-0 = <&mcp251xfd_pins_1>;
96                                 spi-max-frequency = <20000000>;
97                                 interrupt-parent = <&gpio>;
98                                 interrupts = <16 IRQ_TYPE_LEVEL_LOW>;
99                                 clocks = <&clk_mcp251xfd_osc_1>;
100                         };
101                 };
102         };
103 };