All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add support for wireless on Radxa Rock2
@ 2016-01-09 12:54 ` Sjoerd Simons
  0 siblings, 0 replies; 8+ messages in thread
From: Sjoerd Simons @ 2016-01-09 12:54 UTC (permalink / raw)
  To: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: Heiko Stuebner, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

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(-)

-- 
2.7.0.rc3

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

* [PATCH 0/2] Add support for wireless on Radxa Rock2
@ 2016-01-09 12:54 ` Sjoerd Simons
  0 siblings, 0 replies; 8+ messages in thread
From: Sjoerd Simons @ 2016-01-09 12:54 UTC (permalink / raw)
  To: linux-arm-kernel

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(-)

-- 
2.7.0.rc3

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

* [PATCH 1/2] ARM: dts: rockchip: Add the iodomains for the Rock2 SOM
  2016-01-09 12:54 ` Sjoerd Simons
@ 2016-01-09 12:54     ` Sjoerd Simons
  -1 siblings, 0 replies; 8+ messages in thread
From: Sjoerd Simons @ 2016-01-09 12:54 UTC (permalink / raw)
  To: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: Heiko Stuebner, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

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

Signed-off-by: Sjoerd Simons <sjoerd.simons-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
---

 arch/arm/boot/dts/rk3288-rock2-som.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/arch/arm/boot/dts/rk3288-rock2-som.dtsi b/arch/arm/boot/dts/rk3288-rock2-som.dtsi
index 1813b7c3..4e93316 100644
--- a/arch/arm/boot/dts/rk3288-rock2-som.dtsi
+++ b/arch/arm/boot/dts/rk3288-rock2-som.dtsi
@@ -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";
 };
 
-- 
2.7.0.rc3

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

* [PATCH 1/2] ARM: dts: rockchip: Add the iodomains for the Rock2 SOM
@ 2016-01-09 12:54     ` Sjoerd Simons
  0 siblings, 0 replies; 8+ messages in thread
From: Sjoerd Simons @ 2016-01-09 12:54 UTC (permalink / raw)
  To: linux-arm-kernel

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

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
---

 arch/arm/boot/dts/rk3288-rock2-som.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/arch/arm/boot/dts/rk3288-rock2-som.dtsi b/arch/arm/boot/dts/rk3288-rock2-som.dtsi
index 1813b7c3..4e93316 100644
--- a/arch/arm/boot/dts/rk3288-rock2-som.dtsi
+++ b/arch/arm/boot/dts/rk3288-rock2-som.dtsi
@@ -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";
 };
 
-- 
2.7.0.rc3

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

* [PATCH 2/2] ARM: dts: rockchip: Add the SDIO wifi on Radxa Rock2 square
  2016-01-09 12:54 ` Sjoerd Simons
@ 2016-01-09 12:54     ` Sjoerd Simons
  -1 siblings, 0 replies; 8+ messages in thread
From: Sjoerd Simons @ 2016-01-09 12:54 UTC (permalink / raw)
  To: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: Heiko Stuebner, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

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.

Signed-off-by: Sjoerd Simons <sjoerd.simons-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>

---

 arch/arm/boot/dts/rk3288-rock2-square.dts | 33 ++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/rk3288-rock2-square.dts b/arch/arm/boot/dts/rk3288-rock2-square.dts
index 8af35c8..dd53af3 100644
--- a/arch/arm/boot/dts/rk3288-rock2-square.dts
+++ b/arch/arm/boot/dts/rk3288-rock2-square.dts
@@ -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@51 {
+	hym8563: hym8563@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 {
-- 
2.7.0.rc3

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

* [PATCH 2/2] ARM: dts: rockchip: Add the SDIO wifi on Radxa Rock2 square
@ 2016-01-09 12:54     ` Sjoerd Simons
  0 siblings, 0 replies; 8+ messages in thread
From: Sjoerd Simons @ 2016-01-09 12:54 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>

---

 arch/arm/boot/dts/rk3288-rock2-square.dts | 33 ++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/rk3288-rock2-square.dts b/arch/arm/boot/dts/rk3288-rock2-square.dts
index 8af35c8..dd53af3 100644
--- a/arch/arm/boot/dts/rk3288-rock2-square.dts
+++ b/arch/arm/boot/dts/rk3288-rock2-square.dts
@@ -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 {
-- 
2.7.0.rc3

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

* Re: [PATCH 0/2] Add support for wireless on Radxa Rock2
  2016-01-09 12:54 ` Sjoerd Simons
@ 2016-01-19 21:50     ` Heiko Stuebner
  -1 siblings, 0 replies; 8+ messages in thread
From: Heiko Stuebner @ 2016-01-19 21:50 UTC (permalink / raw)
  To: Sjoerd Simons
  Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Am Samstag, 9. Januar 2016, 13:54:16 schrieb Sjoerd Simons:
> 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

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

* [PATCH 0/2] Add support for wireless on Radxa Rock2
@ 2016-01-19 21:50     ` Heiko Stuebner
  0 siblings, 0 replies; 8+ messages in thread
From: Heiko Stuebner @ 2016-01-19 21:50 UTC (permalink / raw)
  To: linux-arm-kernel

Am Samstag, 9. Januar 2016, 13:54:16 schrieb Sjoerd Simons:
> 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

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

end of thread, other threads:[~2016-01-19 21:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-09 12:54 [PATCH 0/2] Add support for wireless on Radxa Rock2 Sjoerd Simons
2016-01-09 12:54 ` Sjoerd Simons
     [not found] ` <1452344058-27434-1-git-send-email-sjoerd.simons-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2016-01-09 12:54   ` [PATCH 1/2] ARM: dts: rockchip: Add the iodomains for the Rock2 SOM Sjoerd Simons
2016-01-09 12:54     ` Sjoerd Simons
2016-01-09 12:54   ` [PATCH 2/2] ARM: dts: rockchip: Add the SDIO wifi on Radxa Rock2 square Sjoerd Simons
2016-01-09 12:54     ` Sjoerd Simons
2016-01-19 21:50   ` [PATCH 0/2] Add support for wireless on Radxa Rock2 Heiko Stuebner
2016-01-19 21:50     ` Heiko Stuebner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.