Skip to content

Instantly share code, notes, and snippets.

@lategoodbye
Last active February 8, 2019 12:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lategoodbye/ead75129684370a777d281975cefd563 to your computer and use it in GitHub Desktop.
Save lategoodbye/ead75129684370a777d281975cefd563 to your computer and use it in GitHub Desktop.
Enable Wifi on Tinker board S
From b2593553b2e3c418cb17e9788f14c1d7a5c9f810 Mon Sep 17 00:00:00 2001
From: Stefan Wahren <stefan.wahren@i2se.com>
Date: Fri, 8 Feb 2019 13:38:10 +0100
Subject: [PATCH] ARM: dts: rk3288-tinker-s: Enable Wifi
This enables the Wifi part of the Realtek RTL8723BS combo module.
Since the schematics doesn't provide any helpful information this patch
mostly based on the vendor kernel:
https://github.com/TinkerBoard/debian_kernel/commit/6a3128ade33f758887048578ada61a4b7ab8e678
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
arch/arm/boot/dts/rk3288-tinker-s.dts | 50 +++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288-tinker-s.dts b/arch/arm/boot/dts/rk3288-tinker-s.dts
index 3709392..4c9ca0d 100644
--- a/arch/arm/boot/dts/rk3288-tinker-s.dts
+++ b/arch/arm/boot/dts/rk3288-tinker-s.dts
@@ -5,11 +5,29 @@
/dts-v1/;
+#include <dt-bindings/clock/rockchip,rk808.h>
#include "rk3288-tinker.dtsi"
/ {
model = "Rockchip RK3288 Asus Tinker Board S";
compatible = "asus,rk3288-tinker-s", "rockchip,rk3288";
+
+ sdio_pwrseq: sdio-pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ clocks = <&rk808 RK808_CLKOUT1>;
+ clock-names = "ext_clock";
+ pinctrl-names = "default";
+ pinctrl-0 = <&wifi_enable>;
+ reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>;
+ };
+
+ vbat_wl: wifi-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vbat_wl";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc_io>;
+ };
};
&emmc {
@@ -24,3 +42,35 @@
mmc-ddr-1_8v;
status = "okay";
};
+
+&io_domains {
+ wifi-supply = <&vcc_18>;
+};
+
+&pinctrl {
+ sdio {
+ wifi_enable: wifi-enable {
+ rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
+&sdio0 {
+ bus-width = <4>;
+ cap-sd-highspeed;
+ cap-sdio-irq;
+ disable-wp;
+ keep-power-in-suspend;
+ mmc-pwrseq = <&sdio_pwrseq>;
+ non-removable;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>, <&sdio0_int>;
+ max-frequency = <50000000>;
+ sd-uhs-sdr12;
+ sd-uhs-sdr25;
+ sd-uhs-sdr50;
+ sd-uhs-ddr50;
+ vmmc-supply = <&vbat_wl>;
+ vqmmc-supply = <&vcc_18>;
+ status = "okay";
+};
--
2.7.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment