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