Skip to contentSkip to conversation

Add WLAN/BT support

PATCH New Biju Das 3 participants 10 messages Oct 10, 2019 – Oct 13, 2019

Subsystems (2)
lore
Share & tools
lore

Biju Das

author
#0 lore raw

cover Add WLAN/BT support

This patch series add WLAN/BT support for HiHope RZ/G2M platform.

This patch series is based on linux-4.19.y-cip and all the patches in this series are cherry-picked from linux rc tree.

Biju Das (3):
arm64: dts: renesas: hihope-common: Add PCA9654 I/O expander
arm64: dts: renesas: hihope-common: Add BT support
arm64: dts: renesas: hihope-common: Add WLAN support

 arch/arm64/boot/dts/renesas/hihope-common.dtsi | 78 ++++++++++++++++++++++++++
 1 file changed, 78 insertions(+)
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/3 arm64: dts: renesas: hihope-common: Add PCA9654 I/O expander

commit cd3e43be14189542d8934faa94eff0392da32536 upstream.

Enable PCA9654 GPIO expander, so that we can configure its GPIOs later.

---
 arch/arm64/boot/dts/renesas/hihope-common.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/renesas/hihope-common.dtsi +7 -0
index 23fd022..a13cb88 100644
@@ -162,6 +162,13 @@
 	clock-frequency = <400000>;
 	status = "okay";
 
+	gpio_expander: gpio at 20 {
+		compatible = "onnn,pca9654";
+		reg = <0x20>;
+		gpio-controller;
+		#gpio-cells = <2>;
+	};
+
 	versaclock5: clock-generator at 6a {
 		compatible = "idt,5p49v5923";
 		reg = <0x6a>;
Signature · 1 line
2.7.4
author
#2 lore raw

PATCH 2/3 arm64: dts: renesas: hihope-common: Add BT support

In reply to Biju Das

commit d112c20925443b4a8876b101e5b7b13ef105057e upstream.

This patch enables BT support for the HiHope RZ/G2[MN] boards.

---
 arch/arm64/boot/dts/renesas/hihope-common.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm64/boot/dts/renesas/hihope-common.dtsi +26 -0
index a13cb88..76f7a9a 100644
@@ -10,6 +10,7 @@
 / {
 	aliases {
 		serial0 = &scif2;
+		serial1 = &hscif0;
 	};
 
 	chosen {
@@ -31,6 +32,13 @@
 	leds {
 		compatible = "gpio-leds";
 
+		bt_active_led {
+			label = "blue:bt";
+			gpios = <&gpio7  0 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "hci0-power";
+			default-state = "off";
+		};
+
 		led0 {
 			gpios = <&gpio6 11 GPIO_ACTIVE_HIGH>;
 		};
@@ -153,6 +161,19 @@
 	};
 };
 
+&hscif0 {
+	pinctrl-0 = <&hscif0_pins>;
+	pinctrl-names = "default";
+
+	uart-has-rtscts;
+	status = "okay";
+
+	bluetooth {
+		compatible = "ti,wl1837-st";
+		enable-gpios = <&gpio_expander 2 GPIO_ACTIVE_HIGH>;
+	};
+};
+
 &hsusb {
 	dr_mode = "otg";
 	status = "okay";
@@ -194,6 +215,11 @@
 	pinctrl-0 = <&scif_clk_pins>;
 	pinctrl-names = "default";
 
+	hscif0_pins: hscif0 {
+		groups = "hscif0_data", "hscif0_ctrl";
+		function = "hscif0";
+	};
+
 	scif2_pins: scif2 {
 		groups = "scif2_data_a";
 		function = "scif2";
Signature · 1 line
2.7.4
#3 lore raw

PATCH 2/3 arm64: dts: renesas: hihope-common: Add BT support

Hi!

arch/arm64/boot/dts/renesas/hihope-common.dtsi line 36

Quoted 11 lines

commit d112c20925443b4a8876b101e5b7b13ef105057e upstream.

This patch enables BT support for the HiHope RZ/G2[MN] boards.

+++ b/arch/arm64/boot/dts/renesas/hihope-common.dtsi

arch/arm64/boot/dts/renesas/hihope-common.dtsi +2 -0
@@ -31,6 +32,13 @@
 	leds {
 		compatible = "gpio-leds";
 
+		bt_active_led {
+			label = "blue:bt";

It would be good to change this to "blue:bluetooth", for consistency with include/dt-bindings/leds/common.h . It will change names in the sysfs.

Best regards,
Pavel

Signature · 9 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.cip-project.org/pipermail/cip-dev/attachments/20191010/0b1bbd64/attachment.sig>
author
#4 lore raw

PATCH 2/3 arm64: dts: renesas: hihope-common: Add BT support

Hi Pavel,

Thanks for the feedback.

Quoted 17 lines

-----Original Message-----
From: Pavel Machek <[email protected]>
Sent: Thursday, October 10, 2019 8:38 AM
To: Biju Das <[email protected]>
Cc: cip-dev at lists.cip-project.org; Nobuhiro Iwamatsu <[email protected]>; Pavel Machek <[email protected]>; Chris Paterson <[email protected]>; Fabrizio Castro <[email protected]>
Subject: Re: [PATCH 4.19.y-cip 2/3] arm64: dts: renesas: hihope-common:
Add BT support

Hi!

Quoted 3 lines

commit d112c20925443b4a8876b101e5b7b13ef105057e upstream.

This patch enables BT support for the HiHope RZ/G2[MN] boards.

Quoted 7 lines

arch/arm64/boot/dts/renesas/hihope-common.dtsi line 36

Quoted 7 lines

+++ b/arch/arm64/boot/dts/renesas/hihope-common.dtsi

arch/arm64/boot/dts/renesas/hihope-common.dtsi +2 -0
@@ -31,6 +32,13 @@
 	leds {
 		compatible = "gpio-leds";
 
+		bt_active_led {
+			label = "blue:bt";

As you mentioned, I agree we should fix this in mainline first and then backported to cip.

Cherrs,
Biju

Quoted 8 lines

It would be good to change this to "blue:bluetooth", for consistency with include/dt-bindings/leds/common.h . It will change names in the sysfs.

Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

author
#5 lore raw

PATCH 2/3 arm64: dts: renesas: hihope-common: Add BT support

In reply to Pavel Machek

Hi Pavel,

Thanks for feedback.

Quoted 14 lines

Subject: Re: [PATCH 4.19.y-cip 2/3] arm64: dts: renesas: hihope-common:
Add BT support

Hi!

Quoted 9 lines

commit d112c20925443b4a8876b101e5b7b13ef105057e upstream.

This patch enables BT support for the HiHope RZ/G2[MN] boards.

+++ b/arch/arm64/boot/dts/renesas/hihope-common.dtsi

arch/arm64/boot/dts/renesas/hihope-common.dtsi +0 -0
@@ -31,6 +32,13 @@
 	leds {
 		compatible = "gpio-leds";
 
Quoted 5 lines

arch/arm64/boot/dts/renesas/hihope-common.dtsi line 36

Quoted 2 lines
arch/arm64/boot/dts/renesas/hihope-common.dtsi +2 -0
+		bt_active_led {
+			label = "blue:bt";

It would be good to change this to "blue:bluetooth", for consistency with include/dt-bindings/leds/common.h . It will change names in the sysfs.

Can you please me point to the right file? There is nothing related to "blue:bluetooth", Mentioned in include/dt-bindings/leds/common.h

Cheers,
Biju

author
#6 lore raw

PATCH 3/3 arm64: dts: renesas: hihope-common: Add WLAN support

In reply to Biju Das

commit 176f936a1e887a53d78f05248dc3c9bbd2c7f4c8 upstream.

This patch enables WLAN support for the HiHope RZ/G2[MN] boards.

---
 arch/arm64/boot/dts/renesas/hihope-common.dtsi | 45 ++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
arch/arm64/boot/dts/renesas/hihope-common.dtsi +45 -0
index 76f7a9a..0daff2d 100644
@@ -54,6 +54,13 @@
 		led3 {
 			gpios = <&gpio0  0 GPIO_ACTIVE_HIGH>;
 		};
+
+		wlan_active_led {
+			label = "yellow:wlan";
+			gpios = <&gpio7  1 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "phy0tx";
+			default-state = "off";
+		};
 	};
 
 	reg_1p8v: regulator0 {
@@ -98,6 +105,17 @@
 			  1800000 0>;
 	};
 
+	wlan_en_reg: regulator-wlan_en {
+		compatible = "regulator-fixed";
+		regulator-name = "wlan-en-regulator";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		startup-delay-us = <70000>;
+
+		gpio = <&gpio_expander 1 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
 	x302_clk: x302-clock {
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
@@ -242,6 +260,12 @@
 		power-source = <1800>;
 	};
 
+	sdhi2_pins: sd2 {
+		groups = "sdhi2_data4", "sdhi2_ctrl";
+		function = "sdhi2";
+		power-source = <1800>;
+	};
+
 	sdhi3_pins: sd3 {
 		groups = "sdhi3_data8", "sdhi3_ctrl", "sdhi3_ds";
 		function = "sdhi3";
@@ -301,6 +325,27 @@
 	status = "okay";
 };
 
+&sdhi2 {
+	status = "okay";
+	pinctrl-0 = <&sdhi2_pins>;
+	pinctrl-names = "default";
+
+	vmmc-supply = <&wlan_en_reg>;
+	bus-width = <4>;
+	non-removable;
+	cap-power-off-card;
+	keep-power-in-suspend;
+
+	#address-cells = <1>;
+	#size-cells = <0>;
+	wlcore: wlcore at 2 {
+		compatible = "ti,wl1837";
+		reg = <2>;
+		interrupt-parent = <&gpio2>;
+		interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
+	};
+};
+
 &sdhi3 {
 	pinctrl-0 = <&sdhi3_pins>;
 	pinctrl-1 = <&sdhi3_pins>;
Signature · 1 line
2.7.4
#7 lore raw

cover Add WLAN/BT support

In reply to Biju Das

Hi!

Quoted 9 lines

This patch series add WLAN/BT support for HiHope RZ/G2M platform.

This patch series is based on linux-4.19.y-cip and all the patches in this series are cherry-picked from linux rc tree.

Biju Das (3):
arm64: dts: renesas: hihope-common: Add PCA9654 I/O expander
arm64: dts: renesas: hihope-common: Add BT support
arm64: dts: renesas: hihope-common: Add WLAN support

Thank you, series looks good. (Comment about label probably should be resolved in the mainline, first).

I can apply it unless Iwamatsu wants to do that?

Best regards,
Pavel

Signature · 9 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.cip-project.org/pipermail/cip-dev/attachments/20191010/a39c8273/attachment.sig>
#8 lore raw

cover Add WLAN/BT support

Hi all,

Quoted 17 lines

-----Original Message-----
From: Pavel Machek [mailto:pavel at denx.de]
Sent: Thursday, October 10, 2019 4:43 PM
To: Biju Das <[email protected]>
Cc: cip-dev at lists.cip-project.org; iwamatsu nobuhiro(?? ?? ??? ?????) <[email protected]>; Pavel Machek <[email protected]>; Chris Paterson <[email protected]>; Fabrizio Castro <[email protected]>
Subject: Re: [PATCH 4.19.y-cip 0/3] Add WLAN/BT support

Hi!

Quoted 5 lines

This patch series add WLAN/BT support for HiHope RZ/G2M platform.

This patch series is based on linux-4.19.y-cip and all the patches in this series are cherry-picked from linux rc tree.

Quoted 8 lines
Quoted 4 lines

Biju Das (3):
arm64: dts: renesas: hihope-common: Add PCA9654 I/O expander
arm64: dts: renesas: hihope-common: Add BT support
arm64: dts: renesas: hihope-common: Add WLAN support

Thank you, series looks good. (Comment about label probably should be resolved in the mainline, first).

Looks good to me too.

Quoted 2 lines

I can apply it unless Iwamatsu wants to do that?

Please apply.

Best regards,
Nobuhiro

Applied
#9 lore raw

cover Add WLAN/BT support

In reply to Biju Das
Quoted 4 lines · Biju Das

This patch series add WLAN/BT support for HiHope RZ/G2M platform.

This patch series is based on linux-4.19.y-cip and all the patches in this series are cherry-picked from linux rc tree.

Thanks, applied.

Best regards,
Pavel

Signature · 9 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.cip-project.org/pipermail/cip-dev/attachments/20191013/d82daaa5/attachment.sig>