public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] riscv: dts: thead: Enable WiFi on Lichee Pi 4A
@ 2026-04-26  5:52 MoeLeak
  2026-04-30 17:26 ` Drew Fustini
  0 siblings, 1 reply; 2+ messages in thread
From: MoeLeak @ 2026-04-26  5:52 UTC (permalink / raw)
  To: fustini; +Cc: linux-kernel, MoeLeak

Signed-off-by: MoeLeak <i@leak.moe>
---
 .../boot/dts/thead/th1520-lichee-pi-4a.dts    | 47 +++++++++++++++++++
 arch/riscv/boot/dts/thead/th1520.dtsi         | 11 +++++
 2 files changed, 58 insertions(+)

diff --git a/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts b/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts
index 7cb7d28683bc..af6f25ebbf60 100644
--- a/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts
+++ b/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts
@@ -4,6 +4,7 @@
  */
 
 #include "th1520-lichee-module-4a.dtsi"
+#include <dt-bindings/gpio/gpio.h>
 
 / {
 	model = "Sipeed Lichee Pi 4A";
@@ -40,6 +41,12 @@ hdmi_con_in: endpoint {
 		};
 	};
 
+	wifi_pwrseq: wifi-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		reset-gpios = <&ioexp2 4 GPIO_ACTIVE_LOW>;
+		post-power-on-delay-ms = <200>;
+	};
+
 	thermal-zones {
 		cpu-thermal {
 			polling-delay = <1000>;
@@ -96,6 +103,20 @@ fan: pwm-fan {
 
 };
 
+&padctrl1_apsys {
+	i2c1_pins: i2c1-0 {
+		i2c-pins {
+			pins = "I2C1_SCL", "I2C1_SDA";
+			function = "i2c";
+			bias-pull-up = <2100>;
+			drive-strength = <7>;
+			input-enable;
+			input-schmitt-enable;
+			slew-rate = <0>;
+		};
+	};
+};
+
 &padctrl0_apsys {
 	fan_pins: fan-0 {
 		pwm1-pins {
@@ -132,6 +153,32 @@ rx-pins {
 	};
 };
 
+&i2c1 {
+	clock-frequency = <400000>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins>;
+	status = "okay";
+
+	ioexp2: gpio@18 {
+		compatible = "nxp,pca9557";
+		reg = <0x18>;
+		gpio-controller;
+		#gpio-cells = <2>;
+	};
+};
+
+&sdio1 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	bus-width = <4>;
+	max-frequency = <198000000>;
+	cap-sdio-irq;
+	keep-power-in-suspend;
+	mmc-pwrseq = <&wifi_pwrseq>;
+	non-removable;
+	status = "okay";
+};
+
 &dpu {
 	status = "okay";
 };
diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi
index 5e91dc1d2b9b..94932c51b7e3 100644
--- a/arch/riscv/boot/dts/thead/th1520.dtsi
+++ b/arch/riscv/boot/dts/thead/th1520.dtsi
@@ -411,6 +411,17 @@ uart3: serial@ffe7f04000 {
 			status = "disabled";
 		};
 
+		i2c1: i2c@ffe7f24000 {
+			compatible = "thead,th1520-i2c", "snps,designware-i2c";
+			reg = <0xff 0xe7f24000 0x0 0x4000>;
+			interrupts = <45 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk CLK_I2C1>, <&clk CLK_PERI_APB_PCLK>;
+			clock-names = "ref", "pclk";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
 		gpio@ffe7f34000 {
 			compatible = "snps,dw-apb-gpio";
 			reg = <0xff 0xe7f34000 0x0 0x1000>;
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] riscv: dts: thead: Enable WiFi on Lichee Pi 4A
  2026-04-26  5:52 [PATCH] riscv: dts: thead: Enable WiFi on Lichee Pi 4A MoeLeak
@ 2026-04-30 17:26 ` Drew Fustini
  0 siblings, 0 replies; 2+ messages in thread
From: Drew Fustini @ 2026-04-30 17:26 UTC (permalink / raw)
  To: MoeLeak; +Cc: linux-kernel

On Sun, Apr 26, 2026 at 01:52:29PM +0800, MoeLeak wrote:
> Signed-off-by: MoeLeak <i@leak.moe>

There needs to be proper commit message with a description of why the
change is being made. Please run scripts/checkpatch.pl before
resending as this would have called out the missing commit message.

Also please review Documentation/process/submitting-patches.rst or visit
https://docs.kernel.org/process/submitting-patches.html

Please include revision number in the patch Subject: and also after the
'---' line in the patch so it is easier for a reviewer to know what
changed.

In addition, the To: and Cc: fields are missing several addresses per
MAINTAINERS. Please run scripts/get_maintainer.pl and make sure to
include the recommended addresses. For example:

./scripts/get_maintainer.pl -norolestats --separator="," <patch>

However, I have been using the wonderful b4 script for awhile now and it
makes the above much easier:

https://b4.docs.kernel.org/en/latest/contributor/overview.html

My flow would be something like:

b4 prep -n your-patch-topic # create new branch for your patch
b4 prep --edit-cover # creates the cover letter
b4 prep --auto-to-cc # this adds all the necessary people and lists
b4 prep --check # this runs checkpatch
b4 send --reflect # emails just yourself to review before sending
b4 send # actually posts your patch to the lists

You don't have to use it for this patch but keep it in mind as it can
prevent mistakes and save a lot time.

> ---
>  .../boot/dts/thead/th1520-lichee-pi-4a.dts    | 47 +++++++++++++++++++
>  arch/riscv/boot/dts/thead/th1520.dtsi         | 11 +++++
>  2 files changed, 58 insertions(+)

I think these should be split into two separate patches. The first
patch would add the i2c node in th1520.dtsi and the second patch would
make the changes to th1520-lichee-pi-4a.dts.

Thanks,
Drew

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-30 17:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-26  5:52 [PATCH] riscv: dts: thead: Enable WiFi on Lichee Pi 4A MoeLeak
2026-04-30 17:26 ` Drew Fustini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox