T-HEAD Devicetrees for 7.2

Enable wifi on two TH1520 boards: BeagleV Ahead and Lichee Pi 4a.
 
 The BeagleV Ahead board uses an AP6203BM WiFi module connected to SDIO1.
 The Lichee Pi 4A has an RTL8723DS WiFi module also connected to SDIO1.
 The module reset line is driven through a PCA9557 GPIO expander on the
 I2C1 bus.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSy8G7QpEpV9aCf6Lbb7CzD2SixDAUCah4clQAKCRDb7CzD2Six
 DF2AAQDknKUINZIFy4xuYA9J45iwjHOXxwo0YAWKKX5QFu5avgEAyQN+P31Vgjyi
 dzh1ilkH+nSO/blbeh8p8kaR3T8+AQ4=
 =ovaG
 -----END PGP SIGNATURE-----

Merge tag 'thead-dt-for-v7.2' of https://git.kernel.org/pub/scm/linux/kernel/git/fustini/linux into soc/dt

T-HEAD Devicetrees for 7.2

Enable wifi on two TH1520 boards: BeagleV Ahead and Lichee Pi 4a.

The BeagleV Ahead board uses an AP6203BM WiFi module connected to SDIO1.
The Lichee Pi 4A has an RTL8723DS WiFi module also connected to SDIO1.
The module reset line is driven through a PCA9557 GPIO expander on the
I2C1 bus.

* tag 'thead-dt-for-v7.2' of https://git.kernel.org/pub/scm/linux/kernel/git/fustini/linux:
  riscv: dts: thead: Enable wifi on the BeagleV-Ahead
  riscv: dts: thead: Enable WiFi on Lichee Pi 4A
  riscv: dts: thead: Add TH1520 I2C1 controller

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
This commit is contained in:
Krzysztof Kozlowski 2026-06-09 13:54:31 +02:00
commit d7f82a3fd1
3 changed files with 106 additions and 0 deletions

View File

@ -86,6 +86,11 @@ hdmi_con_in: endpoint {
};
};
};
wifi_pwrseq: wifi-pwrseq {
compatible = "mmc-pwrseq-simple";
reset-gpios = <&gpio2 31 GPIO_ACTIVE_LOW>; /* WL-REG-ON */
};
};
&osc {
@ -239,6 +244,28 @@ rx-pins {
slew-rate = <0>;
};
};
wifi_pins: wifi-0 {
host-wake-pins {
pins = "GPIO2_25";
function = "gpio";
bias-disable;
drive-strength = <1>;
input-enable;
input-schmitt-disable;
slew-rate = <0>;
};
reg-on-pins {
pins = "GPIO2_31";
function = "gpio";
bias-disable;
drive-strength = <3>;
input-disable;
input-schmitt-disable;
slew-rate = <0>;
};
};
};
&sdio0 {
@ -247,6 +274,27 @@ &sdio0 {
status = "okay";
};
&sdio1 {
bus-width = <4>;
max-frequency = <198000000>;
pinctrl-names = "default";
pinctrl-0 = <&wifi_pins>;
#address-cells = <1>;
#size-cells = <0>;
non-removable;
keep-power-in-suspend;
mmc-pwrseq = <&wifi_pwrseq>;
status = "okay";
wifi@1 {
compatible = "cypress,cyw43012-fmac", "brcm,bcm4329-fmac";
reg = <1>;
interrupt-parent = <&gpio2>;
interrupts = <25 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "host-wake";
};
};
&dpu {
status = "okay";
};

View File

@ -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";
};

View File

@ -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>;