From a220a38ce03eaaafe6ff8bfab07d0ca45f463011 Mon Sep 17 00:00:00 2001 From: JohnTheCoolingFan Date: Sat, 25 Jan 2025 14:27:28 +0300 Subject: [PATCH] BigTreeTech CB1 dts adjustments (current 6.6) --- ...bigtereetech-cb1-i2c-gpio-and-ws2812.patch | 70 +++++++++++++++++++ patch/kernel/archive/sunxi-6.6/series.armbian | 1 + patch/kernel/archive/sunxi-6.6/series.conf | 1 + 3 files changed, 72 insertions(+) create mode 100644 patch/kernel/archive/sunxi-6.6/patches.armbian/bigtereetech-cb1-i2c-gpio-and-ws2812.patch diff --git a/patch/kernel/archive/sunxi-6.6/patches.armbian/bigtereetech-cb1-i2c-gpio-and-ws2812.patch b/patch/kernel/archive/sunxi-6.6/patches.armbian/bigtereetech-cb1-i2c-gpio-and-ws2812.patch new file mode 100644 index 0000000000..c10bcc9398 --- /dev/null +++ b/patch/kernel/archive/sunxi-6.6/patches.armbian/bigtereetech-cb1-i2c-gpio-and-ws2812.patch @@ -0,0 +1,70 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: JohnTheCoolingFan +Date: Sat, 25 Jan 2025 11:26:17 +0000 +Subject: BigTreeTech CB1: dts: i2c gpio mode adjustment and ws2812 rgb_value + +Signed-off-by: JohnTheCoolingFan +--- + arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-emmc.dts | 4 ++-- + arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-sd.dts | 4 ++-- + arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi | 2 +- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-emmc.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-emmc.dts +index f878c23f1..b059ea08f 100644 +--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-emmc.dts ++++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-emmc.dts +@@ -19,12 +19,12 @@ &mmc2 { + &ws2812 { + gpios = <&pio 8 15 GPIO_ACTIVE_LOW>; /* PI15 */ + }; + + &i2c_gpio { +- gpios = <&pio 8 6 GPIO_ACTIVE_HIGH>, /* SDA PI6 */ +- <&pio 8 4 GPIO_ACTIVE_HIGH>; /* SCL PI4 */ ++ gpios = <&pio 8 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>, /* SDA PI6 */ ++ <&pio 8 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; /* SCL PI4 */ + }; + + &can0_pin_irq { + pins = "PI3"; + }; +diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-sd.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-sd.dts +index e18dd854d..cc10be714 100644 +--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-sd.dts ++++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-sd.dts +@@ -10,12 +10,12 @@ + &ws2812 { + gpios = <&pio 2 14 GPIO_ACTIVE_LOW>; /* PC14 */ + }; + + &i2c_gpio { +- gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>, /* SDA PC12 */ +- <&pio 2 10 GPIO_ACTIVE_HIGH>; /* SCL PC10 */ ++ gpios = <&pio 2 12 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>, /* SDA PC12 */ ++ <&pio 2 10 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; /* SCL PC10 */ + }; + + &can0_pin_irq { + pins = "PC9"; + }; +diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi +index f4a4b4fea..a82b358e6 100644 +--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi ++++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi +@@ -105,11 +105,11 @@ wifi_pwrseq: wifi-pwrseq { + + ws2812: ws2812 { + compatible = "rgb-ws2812"; + pinctrl-names = "default"; + rgb_cnt = <2>; +- rgb_value = <0x010000 0x010000>; ++ rgb_value = <0x000001 0x010000>; + status = "disabled"; + }; + + i2c_gpio: i2c-gpio { + #address-cells = <1>; +-- +Created with Armbian build tools https://github.com/armbian/build + diff --git a/patch/kernel/archive/sunxi-6.6/series.armbian b/patch/kernel/archive/sunxi-6.6/series.armbian index df7bd1030a..8cd7f64ccb 100644 --- a/patch/kernel/archive/sunxi-6.6/series.armbian +++ b/patch/kernel/archive/sunxi-6.6/series.armbian @@ -202,3 +202,4 @@ patches.armbian/arm64-dts-sun50i-h618-cherryba-m1.patch patches.armbian/Add-BananaPi-BPI-M4-Zero-pinctrl.patch patches.armbian/Fix-ghost-touches-on-tsc2007-tft-screen.patch + patches.armbian/bigtereetech-cb1-i2c-gpio-and-ws2812.patch diff --git a/patch/kernel/archive/sunxi-6.6/series.conf b/patch/kernel/archive/sunxi-6.6/series.conf index b60b1a2725..8d70becc46 100644 --- a/patch/kernel/archive/sunxi-6.6/series.conf +++ b/patch/kernel/archive/sunxi-6.6/series.conf @@ -451,3 +451,4 @@ patches.armbian/arm64-dts-sun50i-h618-cherryba-m1.patch patches.armbian/Add-BananaPi-BPI-M4-Zero-pinctrl.patch patches.armbian/Fix-ghost-touches-on-tsc2007-tft-screen.patch + patches.armbian/bigtereetech-cb1-i2c-gpio-and-ws2812.patch