Skip to content

Commit 2136235

Browse files
nascsRadxaYuntian
andcommitted
feat: add mcp2515 for q6a
Signed-off-by: Nascs Fang <[email protected]> Co-authored-by: ZHANG Yuntian <[email protected]>
1 parent 16424c2 commit 2136235

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

arch/arm64/boot/dts/qcom/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ dtb-$(CONFIG_ARCH_QCOM) += qcs6490-radxa-dragon-q6a-cam1-imx577.dtbo \
1616
qcs6490-radxa-dragon-q6a-spi12-waveshare35b.dtbo \
1717
qcs6490-radxa-dragon-q6a-spi6-cs0-spidev.dtbo \
1818
qcs6490-radxa-dragon-q6a-spi7-cs0-spidev.dtbo \
19+
qcs6490-radxa-dragon-q6a-spi12-cs0-mcp2515-8mhz.dtbo \
1920
qcs6490-radxa-dragon-q6a-spi12-cs0-spidev.dtbo \
2021
qcs6490-radxa-dragon-q6a-spi14-cs0-spidev.dtbo \
2122
qcs6490-radxa-dragon-q6a-uart6-flowctl.dtbo \
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// SPDX-License-Identifier: BSD-3-Clause
2+
/*
3+
* Copyright (c) 2025 Radxa Computer (Shenzhen) Co., Ltd.
4+
*/
5+
6+
/dts-v1/;
7+
/plugin/;
8+
9+
#include <dt-bindings/gpio/gpio.h>
10+
#include <dt-bindings/interrupt-controller/irq.h>
11+
12+
/ {
13+
metadata {
14+
title = "Enable MCP2515 with 8MHz external clock on SPI12 over CS0";
15+
compatible = "radxa,dragon-q6a";
16+
category = "misc";
17+
exclusive = "spi12", "uart12", "i2c12", "gpio48", "gpio49", "gpio50", "gpio51", "GPIO_57";
18+
description = "Enable MCP2515 with 8MHz external clock on SPI12 over CS0.
19+
20+
Provide support for Microchip MCP2515 SPI CAN controller.
21+
Assumes 8MHz external clock.
22+
Uses Pin 22 (GPIO_57) for INT.";
23+
};
24+
};
25+
26+
&i2c12 {
27+
status = "disabled";
28+
};
29+
30+
&uart12 {
31+
status = "disabled";
32+
};
33+
34+
&spi12 {
35+
qcom,enable-gsi-dma;
36+
status = "okay";
37+
max-freq = <1000000>;
38+
#address-cells = <1>;
39+
#size-cells = <0>;
40+
41+
can0: mcp2515@0 {
42+
compatible = "microchip,mcp2515";
43+
status = "okay";
44+
reg = <0>;
45+
spi-max-frequency = <1000000>;
46+
47+
interrupt-parent = <&tlmm>;
48+
interrupts = <57 IRQ_TYPE_EDGE_FALLING>;
49+
50+
clocks = <&can0_osc>;
51+
vdd-supply = <&vcc_3v3>;
52+
xceiver-supply = <&vcc_3v3>;
53+
};
54+
};
55+
56+
&{/} {
57+
can0_osc: can0-osc {
58+
compatible = "fixed-clock";
59+
#clock-cells = <0>;
60+
clock-frequency = <8000000>;
61+
};
62+
};

0 commit comments

Comments
 (0)