diff --git a/patch/kernel/archive/meson64-6.12/dt/meson-g12b-a311d-cainiao-cniot-core.dts b/patch/kernel/archive/meson64-6.12/dt/meson-g12b-a311d-cainiao-cniot-core.dts index 7901a110f..6274f671e 100644 --- a/patch/kernel/archive/meson64-6.12/dt/meson-g12b-a311d-cainiao-cniot-core.dts +++ b/patch/kernel/archive/meson64-6.12/dt/meson-g12b-a311d-cainiao-cniot-core.dts @@ -433,6 +433,29 @@ 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"; }; diff --git a/patch/kernel/archive/meson64-6.15/dt/meson-g12b-a311d-cainiao-cniot-core.dts b/patch/kernel/archive/meson64-6.15/dt/meson-g12b-a311d-cainiao-cniot-core.dts index 7901a110f..6274f671e 100644 --- a/patch/kernel/archive/meson64-6.15/dt/meson-g12b-a311d-cainiao-cniot-core.dts +++ b/patch/kernel/archive/meson64-6.15/dt/meson-g12b-a311d-cainiao-cniot-core.dts @@ -433,6 +433,29 @@ 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"; }; diff --git a/patch/u-boot/v2025.04/board_cainiao-cniot-core/add-board-cainiao-cniot-core.patch b/patch/u-boot/v2025.04/board_cainiao-cniot-core/add-board-cainiao-cniot-core.patch index 067a2ccde..b60729639 100644 --- a/patch/u-boot/v2025.04/board_cainiao-cniot-core/add-board-cainiao-cniot-core.patch +++ b/patch/u-boot/v2025.04/board_cainiao-cniot-core/add-board-cainiao-cniot-core.patch @@ -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"; +};