Skip to contentSkip to conversation

Add support for wireless on Radxa Rock2

PATCH New Sjoerd Simons 2 participants 4 messages Jan 9, 2016 – Jan 19, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Add support for wireless on Radxa Rock2

First patch improved the modelling of the power supplies on the Rock2 some a bit and adds the iodomain setup needed for wireless to work. Second patch adds the actual updates for the wireless setup on the rock2 square board.

With current kernels the probing of the wifi card is unfortunately not reliable as the 32k clock is provided by the external RTC module, this is fixed by a patch from Heiko still in RFC state[0] to properly defer things as needed. Also things only work if the io domains get initialized before the sdio bus is probed as their is no explicit dependency, fixing that is for a later patchset.

0: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-November/387833.html

Sjoerd Simons (2):
ARM: dts: rockchip: Add the iodomains for the Rock2 SOM
ARM: dts: rockchip: Add the SDIO wifi on Radxa Rock2 square

 arch/arm/boot/dts/rk3288-rock2-som.dtsi   | 26 ++++++++++++++++++++++++
 arch/arm/boot/dts/rk3288-rock2-square.dts | 33 ++++++++++++++++++++++++++++++-
 2 files changed, 58 insertions(+), 1 deletion(-)
Signature · 1 line
2.7.0.rc3
#1 lore raw

PATCH 1/2 ARM: dts: rockchip: Add the iodomains for the Rock2 SOM

Add the IO domain configuration for the Rock2 SOM and model the fixed regulator used as the vqmmc for the EMMC device.

---

 arch/arm/boot/dts/rk3288-rock2-som.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm/boot/dts/rk3288-rock2-som.dtsi +26 -0
index 1813b7c3..4e93316 100644
@@ -61,6 +61,31 @@
 		clock-output-names = "ext_gmac";
 	};
 
+	io_domains: io-domains {
+		compatible = "rockchip,rk3288-io-voltage-domain";
+		rockchip,grf = <&grf>;
+
+		audio-supply = <&vcc_io>;
+		bb-supply = <&vcc_io>;
+		dvp-supply = <&vcc_18>;
+		flash0-supply = <&vcc_flash>;
+		flash1-supply = <&vccio_pmu>;
+		gpio30-supply = <&vccio_pmu>;
+		gpio1830 = <&vcc_io>;
+		lcdc-supply = <&vcc_io>;
+		sdcard-supply = <&vccio_sd>;
+		wifi-supply = <&vcc_18>;
+	};
+
+	vcc_flash: flash-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc_sys";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		startup-delay-us = <150>;
+		vin-supply = <&vcc_io>;
+	};
+
 	vcc_sys: vsys-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc_sys";
@@ -85,6 +110,7 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
 	vmmc-supply = <&vcc_io>;
+	vqmmc-supply = <&vcc_flash>;
 	status = "okay";
 };
 
Signature · 1 line
2.7.0.rc3
#2 lore raw

PATCH 2/2 ARM: dts: rockchip: Add the SDIO wifi on Radxa Rock2 square

In reply to Sjoerd Simons

Enable the sdio0 slot on the Rock2 square which has a broadcom wifi chip attached and add a power sequence to enable the wifi chip and turn on the required 32k clock.

---

 arch/arm/boot/dts/rk3288-rock2-square.dts | 33 ++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)
arch/arm/boot/dts/rk3288-rock2-square.dts +32 -1
index 8af35c8..dd53af3 100644
@@ -63,6 +63,16 @@
 		#sound-dai-cells = <0>;
 	};
 
+	sdio_pwrseq: sdio-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		clocks = <&hym8563>;
+		clock-names = "xin32k";
+		reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&wifi_enable>;
+	};
+
 	vcc_usb_host: vcc-host-regulator {
 		compatible = "regulator-fixed";
 		enable-active-high;
@@ -88,6 +98,21 @@
 	};
 };
 
+&sdio0 {
+	bus-width = <4>;
+	cap-sd-highspeed;
+	cap-sdio-irq;
+	disable-wp;
+	mmc-pwrseq = <&sdio_pwrseq>;
+	non-removable;
+	num-slots = <1>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk &sdio0_int>;
+	vmmc-supply = <&vcc_io>;
+	vqmmc-supply = <&vcc_18>;
+	status = "okay";
+};
+
 &sdmmc {
 	bus-width = <4>;
 	cap-mmc-highspeed;
@@ -112,7 +137,7 @@
 };
 
 &i2c0 {
-	hym8563 at 51 {
+	hym8563: hym8563 at 51 {
 		compatible = "haoyu,hym8563";
 		reg = <0x51>;
 		#clock-cells = <0>;
@@ -148,6 +173,12 @@
 			rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
 	};
+
+	sdio {
+		wifi_enable: wifi-enable {
+			rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
 };
 
 &spdif {
Signature · 1 line
2.7.0.rc3
maintainer Applied
#3 lore raw

cover Add support for wireless on Radxa Rock2

In reply to Sjoerd Simons

Am Samstag, 9. Januar 2016, 13:54:16 schrieb Sjoerd Simons:

Quoted 11 lines

First patch improved the modelling of the power supplies on the Rock2 some a bit and adds the iodomain setup needed for wireless to work. Second patch adds the actual updates for the wireless setup on the rock2 square board.

With current kernels the probing of the wifi card is unfortunately not reliable as the 32k clock is provided by the external RTC module, this is fixed by a patch from Heiko still in RFC state[0] to properly defer things as needed. Also things only work if the io domains get initialized before the sdio bus is probed as their is no explicit dependency, fixing that is for a later patchset.

applied both to my dts32 branch for 4.6

Thaks
Heiko