* [PATCH 1/5] ARM: dts: set the pinctrl default setting for i2s
2015-12-22 9:33 [PATCH 0/5] Support the codec and wifi/bt for rk3036 Kylin board Caesar Wang
@ 2015-12-22 9:33 ` Caesar Wang
[not found] ` <1450776833-27639-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ 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] 7+ messages in thread[parent not found: <1450776833-27639-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>]
* [PATCH 2/5] ARM: dts: add the sound codec for kylin board
[not found] ` <1450776833-27639-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2015-12-22 9:33 ` Caesar Wang
0 siblings, 0 replies; 7+ 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] 7+ messages in thread
* [PATCH 3/5] ARM: dts: rockchip: enable the high speed on sdio for kylin board
2015-12-22 9:33 [PATCH 0/5] Support the codec and wifi/bt for rk3036 Kylin board Caesar Wang
2015-12-22 9:33 ` [PATCH 1/5] ARM: dts: set the pinctrl default setting for i2s Caesar Wang
[not found] ` <1450776833-27639-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2015-12-22 9:33 ` Caesar Wang
2015-12-22 9:33 ` [PATCH 4/5] ARM: dts: add the wifi/bt regulator " Caesar Wang
2015-12-22 9:33 ` [PATCH 5/5] ARM: dts: enable the uart0 for bluetooth module Caesar Wang
4 siblings, 0 replies; 7+ 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] 7+ messages in thread* [PATCH 4/5] ARM: dts: add the wifi/bt regulator for kylin board
2015-12-22 9:33 [PATCH 0/5] Support the codec and wifi/bt for rk3036 Kylin board Caesar Wang
` (2 preceding siblings ...)
2015-12-22 9:33 ` [PATCH 3/5] ARM: dts: rockchip: enable the high speed on sdio " Caesar Wang
@ 2015-12-22 9:33 ` Caesar Wang
[not found] ` <1450776833-27639-5-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-12-22 9:33 ` [PATCH 5/5] ARM: dts: enable the uart0 for bluetooth module Caesar Wang
4 siblings, 1 reply; 7+ 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] 7+ messages in thread* [PATCH 5/5] ARM: dts: enable the uart0 for bluetooth module
2015-12-22 9:33 [PATCH 0/5] Support the codec and wifi/bt for rk3036 Kylin board Caesar Wang
` (3 preceding siblings ...)
2015-12-22 9:33 ` [PATCH 4/5] ARM: dts: add the wifi/bt regulator " Caesar Wang
@ 2015-12-22 9:33 ` Caesar Wang
4 siblings, 0 replies; 7+ 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] 7+ messages in thread