mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
CAINIAO CNIoT-CORE: add spidev to control WS2812 LEDs in user space
This commit is contained in:
@@ -128,10 +128,10 @@ index 00000000..345d9b86
|
||||
+CONFIG_ZSTD=y
|
||||
diff --git a/dts/upstream/src/arm64/amlogic/meson-g12b-a311d-cainiao-cniot-core.dts b/dts/upstream/src/arm64/amlogic/meson-g12b-a311d-cainiao-cniot-core.dts
|
||||
new file mode 100644
|
||||
index 00000000..e1deb707
|
||||
index 00000000..767b6e71
|
||||
--- /dev/null
|
||||
+++ b/dts/upstream/src/arm64/amlogic/meson-g12b-a311d-cainiao-cniot-core.dts
|
||||
@@ -0,0 +1,483 @@
|
||||
@@ -0,0 +1,506 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2019 BayLibre, SAS
|
||||
@@ -567,6 +567,29 @@ index 00000000..e1deb707
|
||||
+ vqmmc-supply = <&vddao_1v8>;
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * GPIOH_4 is connected to 6 WS2812 LEDs.
|
||||
+ * Reusing GPIOH_4 as SPI MOSI to control the WS2812 offers superior performance compared to the GPIO method.
|
||||
+ */
|
||||
+&spicc1_pins {
|
||||
+ mux {
|
||||
+ groups = "spi1_mosi";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* Controlling WS2812 LEDs via spidev in user space. */
|
||||
+&spicc1 {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&spicc1_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ spidev@0 {
|
||||
+ compatible = "rohm,dh2228fv";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <3340000>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&tdmif_b {
|
||||
+ status = "okay";
|
||||
+};
|
||||
|
||||
Reference in New Issue
Block a user