1 From 6b458078a50b9332e799e045f91c288a7ff8d8ca Mon Sep 17 00:00:00 2001
2 From: Marc Kleine-Budde <mkl@pengutronix.de>
3 Date: Sat, 2 Jan 2021 21:08:59 +0100
4 Subject: [PATCH] overlays: give Seeed Studio CAN BUS FD HAT a -v2
7 There are several versions of the Seeed Studio CAN BUS FD HAT. This is the
8 second version, based on the mcp2518fd, so give it a -v2 postfix.
10 Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 arch/arm/boot/dts/overlays/Makefile | 2 +-
13 arch/arm/boot/dts/overlays/README | 8 ++++----
14 ...fd-hat-overlay.dts => seeed-can-fd-hat-v2-overlay.dts} | 0
15 3 files changed, 5 insertions(+), 5 deletions(-)
16 rename arch/arm/boot/dts/overlays/{seeed-can-fd-hat-overlay.dts => seeed-can-fd-hat-v2-overlay.dts} (100%)
18 --- a/arch/arm/boot/dts/overlays/Makefile
19 +++ b/arch/arm/boot/dts/overlays/Makefile
20 @@ -159,7 +159,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
24 - seeed-can-fd-hat.dtbo \
25 + seeed-can-fd-hat-v2.dtbo \
29 --- a/arch/arm/boot/dts/overlays/README
30 +++ b/arch/arm/boot/dts/overlays/README
31 @@ -2460,11 +2460,11 @@ Info: This overlay is now deprecated.
35 -Name: seeed-can-fd-hat
36 -Info: Overlay for Seeed Studio CAN BUS FD HAT with two CAN FD channels and an
38 +Name: seeed-can-fd-hat-v2
39 +Info: Overlay for Seeed Studio CAN BUS FD HAT with two CAN FD channels
40 + (based on the mcp2518fd) and an RTC.
41 https://www.seeedstudio.com/CAN-BUS-FD-HAT-for-Raspberry-Pi-p-4742.html
42 -Load: dtoverlay=seeed-can-fd-hat
43 +Load: dtoverlay=seeed-can-fd-hat-v2
47 --- a/arch/arm/boot/dts/overlays/seeed-can-fd-hat-overlay.dts
50 -// redo: ovmerge -c mcp251xfd-overlay.dts,spi0-0,interrupt=25 mcp251xfd-overlay.dts,spi0-1,interrupt=24 i2c-rtc-overlay.dts,pcf85063
52 -// Device tree overlay for https://www.seeedstudio.com/CAN-BUS-FD-HAT-for-Raspberry-Pi-p-4742.html
57 -#include <dt-bindings/gpio/gpio.h>
58 -#include <dt-bindings/interrupt-controller/irq.h>
59 -#include <dt-bindings/pinctrl/bcm2835.h>
62 - compatible = "brcm,bcm2835";
64 - target = <&spidev0>;
66 - status = "disabled";
72 - mcp251xfd_pins: mcp251xfd_spi0_0_pins {
74 - brcm,function = <BCM2835_FSEL_GPIO_IN>;
79 - target-path = "/clocks";
81 - clk_mcp251xfd_osc: mcp251xfd-spi0-0-osc {
83 - compatible = "fixed-clock";
84 - clock-frequency = <40000000>;
92 - #address-cells = <1>;
95 - compatible = "microchip,mcp251xfd";
97 - pinctrl-names = "default";
98 - pinctrl-0 = <&mcp251xfd_pins>;
99 - spi-max-frequency = <20000000>;
100 - interrupt-parent = <&gpio>;
101 - interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
102 - clocks = <&clk_mcp251xfd_osc>;
107 - target = <&spidev1>;
109 - status = "disabled";
115 - mcp251xfd_pins_1: mcp251xfd_spi0_1_pins {
117 - brcm,function = <BCM2835_FSEL_GPIO_IN>;
122 - target-path = "/clocks";
124 - clk_mcp251xfd_osc_1: mcp251xfd-spi0-1-osc {
125 - #clock-cells = <0>;
126 - compatible = "fixed-clock";
127 - clock-frequency = <40000000>;
135 - #address-cells = <1>;
138 - compatible = "microchip,mcp251xfd";
140 - pinctrl-names = "default";
141 - pinctrl-0 = <&mcp251xfd_pins_1>;
142 - spi-max-frequency = <20000000>;
143 - interrupt-parent = <&gpio>;
144 - interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
145 - clocks = <&clk_mcp251xfd_osc_1>;
150 - target = <&i2cbus>;
152 - #address-cells = <1>;
155 - compatible = "nxp,pcf85063";
161 - target = <&i2c_arm>;
162 - i2cbus: __overlay__ {
168 +++ b/arch/arm/boot/dts/overlays/seeed-can-fd-hat-v2-overlay.dts
170 +// redo: ovmerge -c mcp251xfd-overlay.dts,spi0-0,interrupt=25 mcp251xfd-overlay.dts,spi0-1,interrupt=24 i2c-rtc-overlay.dts,pcf85063
172 +// Device tree overlay for https://www.seeedstudio.com/CAN-BUS-FD-HAT-for-Raspberry-Pi-p-4742.html
177 +#include <dt-bindings/gpio/gpio.h>
178 +#include <dt-bindings/interrupt-controller/irq.h>
179 +#include <dt-bindings/pinctrl/bcm2835.h>
182 + compatible = "brcm,bcm2835";
184 + target = <&spidev0>;
186 + status = "disabled";
192 + mcp251xfd_pins: mcp251xfd_spi0_0_pins {
194 + brcm,function = <BCM2835_FSEL_GPIO_IN>;
199 + target-path = "/clocks";
201 + clk_mcp251xfd_osc: mcp251xfd-spi0-0-osc {
202 + #clock-cells = <0>;
203 + compatible = "fixed-clock";
204 + clock-frequency = <40000000>;
212 + #address-cells = <1>;
215 + compatible = "microchip,mcp251xfd";
217 + pinctrl-names = "default";
218 + pinctrl-0 = <&mcp251xfd_pins>;
219 + spi-max-frequency = <20000000>;
220 + interrupt-parent = <&gpio>;
221 + interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
222 + clocks = <&clk_mcp251xfd_osc>;
227 + target = <&spidev1>;
229 + status = "disabled";
235 + mcp251xfd_pins_1: mcp251xfd_spi0_1_pins {
237 + brcm,function = <BCM2835_FSEL_GPIO_IN>;
242 + target-path = "/clocks";
244 + clk_mcp251xfd_osc_1: mcp251xfd-spi0-1-osc {
245 + #clock-cells = <0>;
246 + compatible = "fixed-clock";
247 + clock-frequency = <40000000>;
255 + #address-cells = <1>;
258 + compatible = "microchip,mcp251xfd";
260 + pinctrl-names = "default";
261 + pinctrl-0 = <&mcp251xfd_pins_1>;
262 + spi-max-frequency = <20000000>;
263 + interrupt-parent = <&gpio>;
264 + interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
265 + clocks = <&clk_mcp251xfd_osc_1>;
270 + target = <&i2cbus>;
272 + #address-cells = <1>;
275 + compatible = "nxp,pcf85063";
281 + target = <&i2c_arm>;
282 + i2cbus: __overlay__ {