Skip to content

Commit f92dc8e

Browse files
authored
Merge pull request #266 from vdadhani/qcs6490-spi-can
QCS6490 spi can support
2 parents 8d4ba9a + 5b5f342 commit f92dc8e

7 files changed

Lines changed: 371 additions & 67 deletions

File tree

Documentation/devicetree/bindings/net/can/microchip,mcp251xfd.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ properties:
4949
Must be half or less of "clocks" frequency.
5050
maximum: 20000000
5151

52+
gpio-controller: true
53+
54+
"#gpio-cells":
55+
const: 2
56+
57+
patternProperties:
58+
"^.+-hog(-[0-9]+)?$":
59+
type: object
60+
required:
61+
- gpio-hog
62+
5263
required:
5364
- compatible
5465
- reg

arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@
4444
stdout-path = "serial0:115200n8";
4545
};
4646

47+
clocks {
48+
mcp2518fd_osc: can-clk {
49+
compatible = "fixed-clock";
50+
clock-frequency = <40000000>;
51+
#clock-cells = <0>;
52+
};
53+
};
54+
4755
dp-connector {
4856
compatible = "dp-connector";
4957
label = "DP";
@@ -1357,6 +1365,28 @@
13571365
};
13581366
};
13591367

1368+
&spi3 {
1369+
status = "okay";
1370+
1371+
can@0 {
1372+
compatible = "microchip,mcp2518fd";
1373+
reg = <0>;
1374+
interrupts-extended = <&tlmm 7 IRQ_TYPE_LEVEL_LOW>;
1375+
clocks = <&mcp2518fd_osc>;
1376+
spi-max-frequency = <10000000>;
1377+
vdd-supply = <&vreg_l11c_2p8>;
1378+
gpio-controller;
1379+
#gpio-cells = <2>;
1380+
1381+
gpio0-hog {
1382+
gpio-hog;
1383+
gpios = <0 GPIO_ACTIVE_LOW>;
1384+
output-high;
1385+
line-name = "mcp251xfd-gpio0";
1386+
};
1387+
};
1388+
};
1389+
13601390
&swr2 {
13611391
status = "okay";
13621392

arch/arm64/configs/prune.config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@
9898
# CONFIG_DP83TD510_PHY is not set
9999
# CONFIG_VITESSE_PHY is not set
100100
# CONFIG_CAN_FLEXCAN is not set
101-
# CONFIG_CAN_MCP251XFD is not set
102101
# CONFIG_BRCMFMAC is not set
103102
# CONFIG_MWIFIEX is not set
104103
# CONFIG_MWIFIEX_SDIO is not set

drivers/net/can/spi/mcp251xfd/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ config CAN_MCP251XFD
55
select CAN_RX_OFFLOAD
66
select REGMAP
77
select WANT_DEV_COREDUMP
8+
select GPIOLIB
89
help
910
Driver for the Microchip MCP251XFD SPI FD-CAN controller
1011
family.

0 commit comments

Comments
 (0)