Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add spi1 to rock2 #374

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/rockchip/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ dtb-$(CONFIG_CLK_RK3528) += \
rk3528-spi0-cs1-enc28j60.dtbo \
rk3528-spi0-cs1-mcp2515.dtbo \
rk3528-spi0-cs1-spidev.dtbo \
rk3528-spi1-cs-gpio.dtbo \
nascs marked this conversation as resolved.
Show resolved Hide resolved
rk3528-uart0-m0.dtbo \
rk3528-uart1-m0.dtbo \
rk3528-uart2-m1.dtbo \
Expand Down
31 changes: 31 additions & 0 deletions arch/arm64/boot/dts/rockchip/overlays/rk3528-spi1-cs-gpio.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>

/ {
metadata {
title = "Enable spidev on SPI1 over PIN_26";
nascs marked this conversation as resolved.
Show resolved Hide resolved
compatible = "radxa,rock-2a", "radxa,rock-2f", "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "GPIO1_B6", "GPIO1_B7", "GPIO1_C0", "GPIO4_C1";
description = "Enable spidev on SPI1 over PIN_26.";
nascs marked this conversation as resolved.
Show resolved Hide resolved
};
};

&spi1 {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
max-freq = <50000000>;
num-cs = <1>;
RadxaYuntian marked this conversation as resolved.
Show resolved Hide resolved
cs-gpios = <&gpio4 RK_PC1 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&spi1_pins>;
nascs marked this conversation as resolved.
Show resolved Hide resolved

spidev@0 {
compatible = "rockchip,spidev";
status = "okay";
reg = <0>;
spi-max-frequency = <50000000>;
};
};