Skip to content

Commit fec6519

Browse files
committed
feat: add spi1 to rock2
Signed-off-by: Nascs Fang <[email protected]>
1 parent ea57ba2 commit fec6519

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

arch/arm64/boot/dts/rockchip/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ dtb-$(CONFIG_CLK_RK3528) += \
136136
rk3528-spi0-cs1-enc28j60.dtbo \
137137
rk3528-spi0-cs1-mcp2515.dtbo \
138138
rk3528-spi0-cs1-spidev.dtbo \
139+
rk3528-spi1-cs-gpio.dtbo \
139140
rk3528-uart0-m0.dtbo \
140141
rk3528-uart1-m0.dtbo \
141142
rk3528-uart2-m1.dtbo \
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/dts-v1/;
2+
/plugin/;
3+
#include <dt-bindings/gpio/gpio.h>
4+
#include <dt-bindings/pinctrl/rockchip.h>
5+
6+
/ {
7+
metadata {
8+
title = "Enable spidev on SPI1 over PIN_26";
9+
compatible = "radxa,rock-2a", "radxa,rock-2f", "radxa,medge-rk3528a-io";
10+
category = "misc";
11+
exclusive = "GPIO1_B6", "GPIO1_B7", "GPIO1_C0", "GPIO4_C1";
12+
description = "Enable spidev on SPI1 over PIN_26.";
13+
};
14+
};
15+
16+
&spi1 {
17+
status = "okay";
18+
#address-cells = <1>;
19+
#size-cells = <0>;
20+
max-freq = <50000000>;
21+
num-cs = <1>;
22+
cs-gpios = <&gpio4 RK_PC1 GPIO_ACTIVE_LOW>;
23+
pinctrl-0 = <&spi1_pins>;
24+
25+
spidev@1 {
26+
compatible = "rockchip,spidev";
27+
status = "okay";
28+
reg = <1>;
29+
spi-max-frequency = <50000000>;
30+
};
31+
};

0 commit comments

Comments
 (0)