* [PATCH 0/5] Support the codec and wifi/bt for rk3036 Kylin board
@ 2015-12-22 9:33 ` Caesar Wang
0 siblings, 0 replies; 16+ messages in thread
From: Caesar Wang @ 2015-12-22 9:33 UTC (permalink / raw)
To: linux-arm-kernel
Add the needed device for kylin board.
--------------
This series patches have the following decriptions:
PATCH[1/5]:
ARM: dts: set the pinctrl default setting for i2s
The kylin will hang in system when enable the i2s,
we need set the pinctrl default setting for i2s firstly.
--------------
PATCH[2/5]:
ARM: dts: add the sound codec for kylin board
Let the codec works.
RT5616 driver is landed in Mark branch.
(https://git.kernel.org/cgit/linux/kernel/git/broonie/sound.git/commit/
?h=for-next&id=b1d15059957d33d111e0ed38724a6b2c5caac790)
Maybe need wait the below patch be merged firstly.
(add an of_match table: https://patchwork.kernel.org/patch/7901951/
rt5616 document: https://patchwork.kernel.org/patch/7901971/)
---------------
PATCH[3/5]:
ARM: dts: rockchip: enable the high speed on sdio for kylin board
This patch is solving the wifi work frequency.
37.5MHz frequency for rk3036.
The wifi throughput:
iperf -s -i 1
...
[ 4] 116.0-117.0 sec 2.88 MBytes 24.1 Mbits/sec
[ 4] 117.0-118.0 sec 2.99 MBytes 25.0 Mbits/sec
[ 4] 118.0-119.0 sec 3.01 MBytes 25.2 Mbits/sec
[ 4] 119.0-120.0 sec 2.89 MBytes 24.2 Mbits/sec
[ 4] 0.0-120.4 sec 332 MBytes 23.1 Mbits/sec
----------------
PATCH[4/5]:
ARM: dts: add the wifi/bt regulator for kylin board
Add the wifi/bt regulator for wifi module, let the module work on bootup.
Yep, this patch is based on olof patch[0].
patch[0]:
https://patchwork.kernel.org/patch/3510571/
----------------
PATCH[5/5]:
ARM: dts: enable the uart0 for bluetooth module
Enable the uart0 for BT module working.
----------------
Note: that's seem the wifi driver has not landed in mainline.
This driver has existed in rockchip github develop4.1.
https://github.com/rockchip-linux/kernel/commit/a731ffcd0d6ee3b3e6f015d3e2f7b4bf698a3533
Caesar Wang (5):
ARM: dts: set the pinctrl default setting for i2s
ARM: dts: add the sound codec for kylin board
ARM: dts: rockchip: enable the high speed on sdio for kylin board
ARM: dts: add the wifi/bt regulator for kylin board
ARM: dts: enable the uart0 for bluetooth module
arch/arm/boot/dts/rk3036-kylin.dts | 85 +++++++++++++++++++++++++++++++++++++-
arch/arm/boot/dts/rk3036.dtsi | 12 +++---
2 files changed, 90 insertions(+), 7 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/5] ARM: dts: set the pinctrl default setting for i2s
2015-12-22 9:33 ` Caesar Wang
@ 2015-12-22 9:33 ` Caesar Wang
-1 siblings, 0 replies; 16+ messages in thread
From: Caesar Wang @ 2015-12-22 9:33 UTC (permalink / raw)
To: heiko
Cc: devicetree, linux-kernel, linux-rockchip, linux-arm-kernel,
keescook, leozwang, leecam, Caesar Wang
Sometime will hang if you set the i2s pinctrl as the none setting.
Let's set the pinctrl as the default setting to enable the gpio up/down.
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
---
arch/arm/boot/dts/rk3036.dtsi | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/arm/boot/dts/rk3036.dtsi b/arch/arm/boot/dts/rk3036.dtsi
index b9567c1..8f1bb0f 100644
--- a/arch/arm/boot/dts/rk3036.dtsi
+++ b/arch/arm/boot/dts/rk3036.dtsi
@@ -579,12 +579,12 @@
i2s {
i2s_bus: i2s-bus {
- rockchip,pins = <1 0 RK_FUNC_1 &pcfg_pull_none>,
- <1 1 RK_FUNC_1 &pcfg_pull_none>,
- <1 2 RK_FUNC_1 &pcfg_pull_none>,
- <1 3 RK_FUNC_1 &pcfg_pull_none>,
- <1 4 RK_FUNC_1 &pcfg_pull_none>,
- <1 5 RK_FUNC_1 &pcfg_pull_none>;
+ rockchip,pins = <1 0 RK_FUNC_1 &pcfg_pull_default>,
+ <1 1 RK_FUNC_1 &pcfg_pull_default>,
+ <1 2 RK_FUNC_1 &pcfg_pull_default>,
+ <1 3 RK_FUNC_1 &pcfg_pull_default>,
+ <1 4 RK_FUNC_1 &pcfg_pull_default>,
+ <1 5 RK_FUNC_1 &pcfg_pull_default>;
};
};
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 1/5] ARM: dts: set the pinctrl default setting for i2s
@ 2015-12-22 9:33 ` Caesar Wang
0 siblings, 0 replies; 16+ messages in thread
From: Caesar Wang @ 2015-12-22 9:33 UTC (permalink / raw)
To: linux-arm-kernel
Sometime will hang if you set the i2s pinctrl as the none setting.
Let's set the pinctrl as the default setting to enable the gpio up/down.
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
---
arch/arm/boot/dts/rk3036.dtsi | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/arm/boot/dts/rk3036.dtsi b/arch/arm/boot/dts/rk3036.dtsi
index b9567c1..8f1bb0f 100644
--- a/arch/arm/boot/dts/rk3036.dtsi
+++ b/arch/arm/boot/dts/rk3036.dtsi
@@ -579,12 +579,12 @@
i2s {
i2s_bus: i2s-bus {
- rockchip,pins = <1 0 RK_FUNC_1 &pcfg_pull_none>,
- <1 1 RK_FUNC_1 &pcfg_pull_none>,
- <1 2 RK_FUNC_1 &pcfg_pull_none>,
- <1 3 RK_FUNC_1 &pcfg_pull_none>,
- <1 4 RK_FUNC_1 &pcfg_pull_none>,
- <1 5 RK_FUNC_1 &pcfg_pull_none>;
+ rockchip,pins = <1 0 RK_FUNC_1 &pcfg_pull_default>,
+ <1 1 RK_FUNC_1 &pcfg_pull_default>,
+ <1 2 RK_FUNC_1 &pcfg_pull_default>,
+ <1 3 RK_FUNC_1 &pcfg_pull_default>,
+ <1 4 RK_FUNC_1 &pcfg_pull_default>,
+ <1 5 RK_FUNC_1 &pcfg_pull_default>;
};
};
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/5] ARM: dts: add the sound codec for kylin board
@ 2015-12-22 9:33 ` Caesar Wang
0 siblings, 0 replies; 16+ messages in thread
From: Caesar Wang @ 2015-12-22 9:33 UTC (permalink / raw)
To: heiko
Cc: devicetree, linux-kernel, linux-rockchip, linux-arm-kernel,
keescook, leozwang, leecam, Caesar Wang
Support the rt5616 codec for kylin board, but we need
enable the i2s firstly.
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
---
arch/arm/boot/dts/rk3036-kylin.dts | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/arch/arm/boot/dts/rk3036-kylin.dts b/arch/arm/boot/dts/rk3036-kylin.dts
index 992f9ca..bb7e549 100644
--- a/arch/arm/boot/dts/rk3036-kylin.dts
+++ b/arch/arm/boot/dts/rk3036-kylin.dts
@@ -46,6 +46,28 @@
model = "Rockchip RK3036 KylinBoard";
compatible = "rockchip,rk3036-kylin", "rockchip,rk3036";
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,name = "rockchip,rt5616-codec";
+ simple-audio-card,mclk-fs = <64>;
+ simple-audio-card,widgets =
+ "Microphone", "Microphone Jack",
+ "Headphone", "Headphone Jack";
+ simple-audio-card,routing =
+ "MIC1", "Microphone Jack",
+ "MIC2", "Microphone Jack",
+ "Microphone Jack", "micbias1",
+ "Headphone Jack", "HPOL",
+ "Headphone Jack", "HPOR";
+ simple-audio-card,cpu {
+ sound-dai = <&i2s>;
+ };
+ simple-audio-card,codec {
+ sound-dai = <&rt5616>;
+ };
+ };
+
vcc_sys: vsys-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc_sys";
@@ -257,6 +279,17 @@
&i2c2 {
status = "okay";
+
+ rt5616: rt5616@1b {
+ #sound-dai-cells = <0>;
+ compatible = "rt5616";
+ reg = <0x1b>;
+ };
+};
+
+&i2s {
+ #sound-dai-cells = <0>;
+ status = "okay";
};
&sdio {
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/5] ARM: dts: add the sound codec for kylin board
@ 2015-12-22 9:33 ` Caesar Wang
0 siblings, 0 replies; 16+ messages in thread
From: Caesar Wang @ 2015-12-22 9:33 UTC (permalink / raw)
To: linux-arm-kernel
Support the rt5616 codec for kylin board, but we need
enable the i2s firstly.
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
---
arch/arm/boot/dts/rk3036-kylin.dts | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/arch/arm/boot/dts/rk3036-kylin.dts b/arch/arm/boot/dts/rk3036-kylin.dts
index 992f9ca..bb7e549 100644
--- a/arch/arm/boot/dts/rk3036-kylin.dts
+++ b/arch/arm/boot/dts/rk3036-kylin.dts
@@ -46,6 +46,28 @@
model = "Rockchip RK3036 KylinBoard";
compatible = "rockchip,rk3036-kylin", "rockchip,rk3036";
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,name = "rockchip,rt5616-codec";
+ simple-audio-card,mclk-fs = <64>;
+ simple-audio-card,widgets =
+ "Microphone", "Microphone Jack",
+ "Headphone", "Headphone Jack";
+ simple-audio-card,routing =
+ "MIC1", "Microphone Jack",
+ "MIC2", "Microphone Jack",
+ "Microphone Jack", "micbias1",
+ "Headphone Jack", "HPOL",
+ "Headphone Jack", "HPOR";
+ simple-audio-card,cpu {
+ sound-dai = <&i2s>;
+ };
+ simple-audio-card,codec {
+ sound-dai = <&rt5616>;
+ };
+ };
+
vcc_sys: vsys-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc_sys";
@@ -257,6 +279,17 @@
&i2c2 {
status = "okay";
+
+ rt5616: rt5616 at 1b {
+ #sound-dai-cells = <0>;
+ compatible = "rt5616";
+ reg = <0x1b>;
+ };
+};
+
+&i2s {
+ #sound-dai-cells = <0>;
+ status = "okay";
};
&sdio {
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/5] ARM: dts: add the sound codec for kylin board
@ 2015-12-22 9:33 ` Caesar Wang
0 siblings, 0 replies; 16+ messages in thread
From: Caesar Wang @ 2015-12-22 9:33 UTC (permalink / raw)
To: heiko-4mtYJXux2i+zQB+pC5nmwQ
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
leecam-hpIqsD4AKlfQT0dZR+AlfA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
keescook-hpIqsD4AKlfQT0dZR+AlfA, leozwang-hpIqsD4AKlfQT0dZR+AlfA,
Caesar Wang
Support the rt5616 codec for kylin board, but we need
enable the i2s firstly.
Signed-off-by: Caesar Wang <wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---
arch/arm/boot/dts/rk3036-kylin.dts | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/arch/arm/boot/dts/rk3036-kylin.dts b/arch/arm/boot/dts/rk3036-kylin.dts
index 992f9ca..bb7e549 100644
--- a/arch/arm/boot/dts/rk3036-kylin.dts
+++ b/arch/arm/boot/dts/rk3036-kylin.dts
@@ -46,6 +46,28 @@
model = "Rockchip RK3036 KylinBoard";
compatible = "rockchip,rk3036-kylin", "rockchip,rk3036";
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,name = "rockchip,rt5616-codec";
+ simple-audio-card,mclk-fs = <64>;
+ simple-audio-card,widgets =
+ "Microphone", "Microphone Jack",
+ "Headphone", "Headphone Jack";
+ simple-audio-card,routing =
+ "MIC1", "Microphone Jack",
+ "MIC2", "Microphone Jack",
+ "Microphone Jack", "micbias1",
+ "Headphone Jack", "HPOL",
+ "Headphone Jack", "HPOR";
+ simple-audio-card,cpu {
+ sound-dai = <&i2s>;
+ };
+ simple-audio-card,codec {
+ sound-dai = <&rt5616>;
+ };
+ };
+
vcc_sys: vsys-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc_sys";
@@ -257,6 +279,17 @@
&i2c2 {
status = "okay";
+
+ rt5616: rt5616@1b {
+ #sound-dai-cells = <0>;
+ compatible = "rt5616";
+ reg = <0x1b>;
+ };
+};
+
+&i2s {
+ #sound-dai-cells = <0>;
+ status = "okay";
};
&sdio {
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 3/5] ARM: dts: rockchip: enable the high speed on sdio for kylin board
2015-12-22 9:33 ` Caesar Wang
@ 2015-12-22 9:33 ` Caesar Wang
-1 siblings, 0 replies; 16+ messages in thread
From: Caesar Wang @ 2015-12-22 9:33 UTC (permalink / raw)
To: heiko
Cc: devicetree, linux-kernel, linux-rockchip, linux-arm-kernel,
keescook, leozwang, leecam, Caesar Wang
We want to the higher speed for wifi module working.
Bootup kernel log:
...
mmc_host mmc0: Bus speed (slot 0) = 37125000Hz (slot req 37500000Hz,
actual 37125000HZ div = 0)
or run 'cat /sys/kernel/debug/clk/clk_summary |grep phase -C 1' to check
Otherwise, the mmc0 will run 400khz defalult value to work.
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
---
arch/arm/boot/dts/rk3036-kylin.dts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/rk3036-kylin.dts b/arch/arm/boot/dts/rk3036-kylin.dts
index bb7e549..2ef38be 100644
--- a/arch/arm/boot/dts/rk3036-kylin.dts
+++ b/arch/arm/boot/dts/rk3036-kylin.dts
@@ -297,6 +297,11 @@
broken-cd;
bus-width = <4>;
+ cap-sd-highspeed;
+ sd-uhs-sdr12;
+ sd-uhs-sdr25;
+ sd-uhs-sdr50;
+ sd-uhs-sdr104;
cap-sdio-irq;
default-sample-phase = <90>;
keep-power-in-suspend;
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 3/5] ARM: dts: rockchip: enable the high speed on sdio for kylin board
@ 2015-12-22 9:33 ` Caesar Wang
0 siblings, 0 replies; 16+ messages in thread
From: Caesar Wang @ 2015-12-22 9:33 UTC (permalink / raw)
To: linux-arm-kernel
We want to the higher speed for wifi module working.
Bootup kernel log:
...
mmc_host mmc0: Bus speed (slot 0) = 37125000Hz (slot req 37500000Hz,
actual 37125000HZ div = 0)
or run 'cat /sys/kernel/debug/clk/clk_summary |grep phase -C 1' to check
Otherwise, the mmc0 will run 400khz defalult value to work.
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
---
arch/arm/boot/dts/rk3036-kylin.dts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/rk3036-kylin.dts b/arch/arm/boot/dts/rk3036-kylin.dts
index bb7e549..2ef38be 100644
--- a/arch/arm/boot/dts/rk3036-kylin.dts
+++ b/arch/arm/boot/dts/rk3036-kylin.dts
@@ -297,6 +297,11 @@
broken-cd;
bus-width = <4>;
+ cap-sd-highspeed;
+ sd-uhs-sdr12;
+ sd-uhs-sdr25;
+ sd-uhs-sdr50;
+ sd-uhs-sdr104;
cap-sdio-irq;
default-sample-phase = <90>;
keep-power-in-suspend;
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 4/5] ARM: dts: add the wifi/bt regulator for kylin board
2015-12-22 9:33 ` Caesar Wang
@ 2015-12-22 9:33 ` Caesar Wang
-1 siblings, 0 replies; 16+ messages in thread
From: Caesar Wang @ 2015-12-22 9:33 UTC (permalink / raw)
To: heiko
Cc: devicetree, linux-kernel, linux-rockchip, linux-arm-kernel,
keescook, leozwang, leecam, Caesar Wang
Without this the wifi/bluetooth module doesn't work
properly at bootup.
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Patchset: Rockchip kylin board Patch[6/6], bring up kylin board.
We need add the wifi regulator to control the power.
(am https://patchwork.kernel.org/patch/7873721/)
---
arch/arm/boot/dts/rk3036-kylin.dts | 43 +++++++++++++++++++++++++++++++++++++-
1 file changed, 42 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/rk3036-kylin.dts b/arch/arm/boot/dts/rk3036-kylin.dts
index 2ef38be..ed0466f 100644
--- a/arch/arm/boot/dts/rk3036-kylin.dts
+++ b/arch/arm/boot/dts/rk3036-kylin.dts
@@ -76,6 +76,32 @@
regulator-always-on;
regulator-boot-on;
};
+
+ bt_regulator: bt-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio2 9 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&bt_rst_l>;
+ regulator-name = "bt_regulator";
+ };
+
+ wifi_regulator: wifi-regulator {
+ /*
+ * On the module itself this is one of these (depending
+ * on the actual card populated):
+ * - SDIO_RESET_L_WL_REG_ON
+ * - PDN (power down when low)
+ */
+
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&wifi_enable_h>;
+ regulator-name = "wifi_regulator";
+ vin-supply = <&bt_regulator>;
+ };
};
&acodec {
@@ -303,12 +329,13 @@
sd-uhs-sdr50;
sd-uhs-sdr104;
cap-sdio-irq;
+ card-external-vcc-supply = <&wifi_regulator>;
default-sample-phase = <90>;
keep-power-in-suspend;
non-removable;
num-slots = <1>;
pinctrl-names = "default";
- pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4>;
+ pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4 &bt_wake_h>;
};
&uart2 {
@@ -330,6 +357,20 @@
};
};
+ sdio {
+ wifi_enable_h: wifienable-h {
+ rockchip,pins = <0 26 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ bt_rst_l: bt-rst-l {
+ rockchip,pins = <2 9 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ bt_wake_h: bt-wake-h {
+ rockchip,pins = <2 8 RK_FUNC_GPIO &pcfg_pull_default>;
+ };
+ };
+
sleep {
global_pwroff: global-pwroff {
rockchip,pins = <2 7 RK_FUNC_1 &pcfg_pull_none>;
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 4/5] ARM: dts: add the wifi/bt regulator for kylin board
@ 2015-12-22 9:33 ` Caesar Wang
0 siblings, 0 replies; 16+ messages in thread
From: Caesar Wang @ 2015-12-22 9:33 UTC (permalink / raw)
To: linux-arm-kernel
Without this the wifi/bluetooth module doesn't work
properly at bootup.
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Patchset: Rockchip kylin board Patch[6/6], bring up kylin board.
We need add the wifi regulator to control the power.
(am https://patchwork.kernel.org/patch/7873721/)
---
arch/arm/boot/dts/rk3036-kylin.dts | 43 +++++++++++++++++++++++++++++++++++++-
1 file changed, 42 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/rk3036-kylin.dts b/arch/arm/boot/dts/rk3036-kylin.dts
index 2ef38be..ed0466f 100644
--- a/arch/arm/boot/dts/rk3036-kylin.dts
+++ b/arch/arm/boot/dts/rk3036-kylin.dts
@@ -76,6 +76,32 @@
regulator-always-on;
regulator-boot-on;
};
+
+ bt_regulator: bt-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio2 9 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&bt_rst_l>;
+ regulator-name = "bt_regulator";
+ };
+
+ wifi_regulator: wifi-regulator {
+ /*
+ * On the module itself this is one of these (depending
+ * on the actual card populated):
+ * - SDIO_RESET_L_WL_REG_ON
+ * - PDN (power down when low)
+ */
+
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&wifi_enable_h>;
+ regulator-name = "wifi_regulator";
+ vin-supply = <&bt_regulator>;
+ };
};
&acodec {
@@ -303,12 +329,13 @@
sd-uhs-sdr50;
sd-uhs-sdr104;
cap-sdio-irq;
+ card-external-vcc-supply = <&wifi_regulator>;
default-sample-phase = <90>;
keep-power-in-suspend;
non-removable;
num-slots = <1>;
pinctrl-names = "default";
- pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4>;
+ pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4 &bt_wake_h>;
};
&uart2 {
@@ -330,6 +357,20 @@
};
};
+ sdio {
+ wifi_enable_h: wifienable-h {
+ rockchip,pins = <0 26 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ bt_rst_l: bt-rst-l {
+ rockchip,pins = <2 9 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ bt_wake_h: bt-wake-h {
+ rockchip,pins = <2 8 RK_FUNC_GPIO &pcfg_pull_default>;
+ };
+ };
+
sleep {
global_pwroff: global-pwroff {
rockchip,pins = <2 7 RK_FUNC_1 &pcfg_pull_none>;
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 4/5] ARM: dts: add the wifi/bt regulator for kylin board
@ 2015-12-22 9:50 ` Heiko Stübner
0 siblings, 0 replies; 16+ messages in thread
From: Heiko Stübner @ 2015-12-22 9:50 UTC (permalink / raw)
To: Caesar Wang
Cc: devicetree, linux-kernel, linux-rockchip, linux-arm-kernel,
keescook, leozwang, leecam
Hi Caesaer,
Am Dienstag, 22. Dezember 2015, 17:33:52 schrieb Caesar Wang:
> Without this the wifi/bluetooth module doesn't work
> properly at bootup.
>
> Signed-off-by: Caesar Wang <wxt@rock-chips.com>
>
> Patchset: Rockchip kylin board Patch[6/6], bring up kylin board.
> We need add the wifi regulator to control the power.
>
> (am https://patchwork.kernel.org/patch/7873721/)
> ---
>
> arch/arm/boot/dts/rk3036-kylin.dts | 43
> +++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1
> deletion(-)
>
> diff --git a/arch/arm/boot/dts/rk3036-kylin.dts
> b/arch/arm/boot/dts/rk3036-kylin.dts index 2ef38be..ed0466f 100644
> --- a/arch/arm/boot/dts/rk3036-kylin.dts
> +++ b/arch/arm/boot/dts/rk3036-kylin.dts
> @@ -76,6 +76,32 @@
> regulator-always-on;
> regulator-boot-on;
> };
> +
> + bt_regulator: bt-regulator {
> + compatible = "regulator-fixed";
> + enable-active-high;
> + gpio = <&gpio2 9 GPIO_ACTIVE_HIGH>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&bt_rst_l>;
> + regulator-name = "bt_regulator";
> + };
> +
> + wifi_regulator: wifi-regulator {
> + /*
> + * On the module itself this is one of these (depending
> + * on the actual card populated):
> + * - SDIO_RESET_L_WL_REG_ON
> + * - PDN (power down when low)
> + */
> +
> + compatible = "regulator-fixed";
> + enable-active-high;
> + gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&wifi_enable_h>;
> + regulator-name = "wifi_regulator";
> + vin-supply = <&bt_regulator>;
> + };
> };
>
> &acodec {
> @@ -303,12 +329,13 @@
> sd-uhs-sdr50;
> sd-uhs-sdr104;
> cap-sdio-irq;
> + card-external-vcc-supply = <&wifi_regulator>;
as I said in our chat, that concept didn't make it into the kernel. mmc-power-
sequences are the new thing. Please look into the sdio-pwrseq node in rk3288-
veyron.dtsi for examples.
Heiko
> default-sample-phase = <90>;
> keep-power-in-suspend;
> non-removable;
> num-slots = <1>;
> pinctrl-names = "default";
> - pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4>;
> + pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4 &bt_wake_h>;
> };
>
> &uart2 {
> @@ -330,6 +357,20 @@
> };
> };
>
> + sdio {
> + wifi_enable_h: wifienable-h {
> + rockchip,pins = <0 26 RK_FUNC_GPIO &pcfg_pull_none>;
> + };
> +
> + bt_rst_l: bt-rst-l {
> + rockchip,pins = <2 9 RK_FUNC_GPIO &pcfg_pull_none>;
> + };
> +
> + bt_wake_h: bt-wake-h {
> + rockchip,pins = <2 8 RK_FUNC_GPIO &pcfg_pull_default>;
> + };
> + };
> +
> sleep {
> global_pwroff: global-pwroff {
> rockchip,pins = <2 7 RK_FUNC_1 &pcfg_pull_none>;
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 4/5] ARM: dts: add the wifi/bt regulator for kylin board
@ 2015-12-22 9:50 ` Heiko Stübner
0 siblings, 0 replies; 16+ messages in thread
From: Heiko Stübner @ 2015-12-22 9:50 UTC (permalink / raw)
To: linux-arm-kernel
Hi Caesaer,
Am Dienstag, 22. Dezember 2015, 17:33:52 schrieb Caesar Wang:
> Without this the wifi/bluetooth module doesn't work
> properly at bootup.
>
> Signed-off-by: Caesar Wang <wxt@rock-chips.com>
>
> Patchset: Rockchip kylin board Patch[6/6], bring up kylin board.
> We need add the wifi regulator to control the power.
>
> (am https://patchwork.kernel.org/patch/7873721/)
> ---
>
> arch/arm/boot/dts/rk3036-kylin.dts | 43
> +++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1
> deletion(-)
>
> diff --git a/arch/arm/boot/dts/rk3036-kylin.dts
> b/arch/arm/boot/dts/rk3036-kylin.dts index 2ef38be..ed0466f 100644
> --- a/arch/arm/boot/dts/rk3036-kylin.dts
> +++ b/arch/arm/boot/dts/rk3036-kylin.dts
> @@ -76,6 +76,32 @@
> regulator-always-on;
> regulator-boot-on;
> };
> +
> + bt_regulator: bt-regulator {
> + compatible = "regulator-fixed";
> + enable-active-high;
> + gpio = <&gpio2 9 GPIO_ACTIVE_HIGH>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&bt_rst_l>;
> + regulator-name = "bt_regulator";
> + };
> +
> + wifi_regulator: wifi-regulator {
> + /*
> + * On the module itself this is one of these (depending
> + * on the actual card populated):
> + * - SDIO_RESET_L_WL_REG_ON
> + * - PDN (power down when low)
> + */
> +
> + compatible = "regulator-fixed";
> + enable-active-high;
> + gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&wifi_enable_h>;
> + regulator-name = "wifi_regulator";
> + vin-supply = <&bt_regulator>;
> + };
> };
>
> &acodec {
> @@ -303,12 +329,13 @@
> sd-uhs-sdr50;
> sd-uhs-sdr104;
> cap-sdio-irq;
> + card-external-vcc-supply = <&wifi_regulator>;
as I said in our chat, that concept didn't make it into the kernel. mmc-power-
sequences are the new thing. Please look into the sdio-pwrseq node in rk3288-
veyron.dtsi for examples.
Heiko
> default-sample-phase = <90>;
> keep-power-in-suspend;
> non-removable;
> num-slots = <1>;
> pinctrl-names = "default";
> - pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4>;
> + pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4 &bt_wake_h>;
> };
>
> &uart2 {
> @@ -330,6 +357,20 @@
> };
> };
>
> + sdio {
> + wifi_enable_h: wifienable-h {
> + rockchip,pins = <0 26 RK_FUNC_GPIO &pcfg_pull_none>;
> + };
> +
> + bt_rst_l: bt-rst-l {
> + rockchip,pins = <2 9 RK_FUNC_GPIO &pcfg_pull_none>;
> + };
> +
> + bt_wake_h: bt-wake-h {
> + rockchip,pins = <2 8 RK_FUNC_GPIO &pcfg_pull_default>;
> + };
> + };
> +
> sleep {
> global_pwroff: global-pwroff {
> rockchip,pins = <2 7 RK_FUNC_1 &pcfg_pull_none>;
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 4/5] ARM: dts: add the wifi/bt regulator for kylin board
@ 2015-12-22 9:50 ` Heiko Stübner
0 siblings, 0 replies; 16+ messages in thread
From: Heiko Stübner @ 2015-12-22 9:50 UTC (permalink / raw)
To: Caesar Wang
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
keescook-hpIqsD4AKlfQT0dZR+AlfA, leozwang-hpIqsD4AKlfQT0dZR+AlfA,
leecam-hpIqsD4AKlfQT0dZR+AlfA
Hi Caesaer,
Am Dienstag, 22. Dezember 2015, 17:33:52 schrieb Caesar Wang:
> Without this the wifi/bluetooth module doesn't work
> properly at bootup.
>
> Signed-off-by: Caesar Wang <wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
>
> Patchset: Rockchip kylin board Patch[6/6], bring up kylin board.
> We need add the wifi regulator to control the power.
>
> (am https://patchwork.kernel.org/patch/7873721/)
> ---
>
> arch/arm/boot/dts/rk3036-kylin.dts | 43
> +++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1
> deletion(-)
>
> diff --git a/arch/arm/boot/dts/rk3036-kylin.dts
> b/arch/arm/boot/dts/rk3036-kylin.dts index 2ef38be..ed0466f 100644
> --- a/arch/arm/boot/dts/rk3036-kylin.dts
> +++ b/arch/arm/boot/dts/rk3036-kylin.dts
> @@ -76,6 +76,32 @@
> regulator-always-on;
> regulator-boot-on;
> };
> +
> + bt_regulator: bt-regulator {
> + compatible = "regulator-fixed";
> + enable-active-high;
> + gpio = <&gpio2 9 GPIO_ACTIVE_HIGH>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&bt_rst_l>;
> + regulator-name = "bt_regulator";
> + };
> +
> + wifi_regulator: wifi-regulator {
> + /*
> + * On the module itself this is one of these (depending
> + * on the actual card populated):
> + * - SDIO_RESET_L_WL_REG_ON
> + * - PDN (power down when low)
> + */
> +
> + compatible = "regulator-fixed";
> + enable-active-high;
> + gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&wifi_enable_h>;
> + regulator-name = "wifi_regulator";
> + vin-supply = <&bt_regulator>;
> + };
> };
>
> &acodec {
> @@ -303,12 +329,13 @@
> sd-uhs-sdr50;
> sd-uhs-sdr104;
> cap-sdio-irq;
> + card-external-vcc-supply = <&wifi_regulator>;
as I said in our chat, that concept didn't make it into the kernel. mmc-power-
sequences are the new thing. Please look into the sdio-pwrseq node in rk3288-
veyron.dtsi for examples.
Heiko
> default-sample-phase = <90>;
> keep-power-in-suspend;
> non-removable;
> num-slots = <1>;
> pinctrl-names = "default";
> - pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4>;
> + pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4 &bt_wake_h>;
> };
>
> &uart2 {
> @@ -330,6 +357,20 @@
> };
> };
>
> + sdio {
> + wifi_enable_h: wifienable-h {
> + rockchip,pins = <0 26 RK_FUNC_GPIO &pcfg_pull_none>;
> + };
> +
> + bt_rst_l: bt-rst-l {
> + rockchip,pins = <2 9 RK_FUNC_GPIO &pcfg_pull_none>;
> + };
> +
> + bt_wake_h: bt-wake-h {
> + rockchip,pins = <2 8 RK_FUNC_GPIO &pcfg_pull_default>;
> + };
> + };
> +
> sleep {
> global_pwroff: global-pwroff {
> rockchip,pins = <2 7 RK_FUNC_1 &pcfg_pull_none>;
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 5/5] ARM: dts: enable the uart0 for bluetooth module
2015-12-22 9:33 ` Caesar Wang
@ 2015-12-22 9:33 ` Caesar Wang
-1 siblings, 0 replies; 16+ messages in thread
From: Caesar Wang @ 2015-12-22 9:33 UTC (permalink / raw)
To: heiko
Cc: devicetree, linux-kernel, linux-rockchip, linux-arm-kernel,
keescook, leozwang, leecam, Caesar Wang
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
---
arch/arm/boot/dts/rk3036-kylin.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/boot/dts/rk3036-kylin.dts b/arch/arm/boot/dts/rk3036-kylin.dts
index ed0466f..700f79a 100644
--- a/arch/arm/boot/dts/rk3036-kylin.dts
+++ b/arch/arm/boot/dts/rk3036-kylin.dts
@@ -338,6 +338,10 @@
pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4 &bt_wake_h>;
};
+&uart0 {
+ status = "okay";
+};
+
&uart2 {
status = "okay";
};
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread