1 From 8d08ab1372ede05e1c9dabdd242fd4bb1e0be414 Mon Sep 17 00:00:00 2001
2 From: Scott Murray <scott.murray@konsulko.com>
3 Date: Tue, 21 Sep 2021 15:52:18 -0400
4 Subject: [PATCH 3/4] Add support for TI WL1837
6 This patch adds description of TI WL1837 and links interfaces
7 to communicate with the IC.
9 Signed-off-by: ito.yoshiki001 <ito.yoshiki001@jp.panasonic.com>
12 - WL1837 specific devicetree configuration moved to the board
13 specific r8a77951-agl-refhw.dts from agl-refhw-common.dtsi.
14 - Switched to HCI_LL driver for BT support to match other upstream
15 users and prepare for btwilink driver going away (dropped in 5.5
17 - WLAN_PWR_EN enabling moved to GPIO initialization to work around
18 BT initialization problems.
19 - Update sound configuration to enable WL1837 BT audio, and disable
20 the HDMI1 audio left over from the original Salvator-X devicetree.
21 The latter is clean up, as HDMI1 as defined uses a SSI that
22 conflicts with the ak4613 configuration.
23 - Updated for kernel 5.10 in BSP v5.5.0.
25 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
27 .../boot/dts/renesas/agl-refhw-common.dtsi | 37 +++++---
28 .../boot/dts/renesas/r8a77951-agl-refhw.dts | 84 +++++++++++++++----
29 2 files changed, 94 insertions(+), 27 deletions(-)
31 diff --git a/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi b/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi
32 index 7474ed578c21..3ae835a1ff13 100644
33 --- a/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi
34 +++ b/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi
35 @@ -183,6 +183,18 @@ vccq_sdhi3: regulator-vccq-sdhi3 {
39 + wlan_en: regulator-wlan_en {
40 + compatible = "regulator-fixed";
42 + regulator-name = "wlan-en-regulator";
43 + regulator-min-microvolt = <3300000>;
44 + regulator-max-microvolt = <3300000>;
46 + gpio = <&gpio7 2 GPIO_ACTIVE_HIGH>;
47 + startup-delay-us = <70000>;
52 compatible = "hdmi-connector";
54 @@ -673,7 +685,8 @@ sdhi3_pins_uhs: sd3_uhs {
58 - groups = "ssi349_ctrl", "ssi3_data", "ssi4_data";
59 + groups = "ssi349_ctrl", "ssi3_data", "ssi4_data",
60 + "ssi78_ctrl", "ssi7_data", "ssi8_data";
64 @@ -828,24 +841,28 @@ &sdhi2 {
68 + /* Default WLAN card configuration */
69 pinctrl-0 = <&sdhi3_pins>;
70 - pinctrl-1 = <&sdhi3_pins_uhs>;
71 - pinctrl-names = "default", "state_uhs";
72 + pinctrl-names = "default";
74 - vmmc-supply = <&vcc_sdhi3>;
75 - vqmmc-supply = <&vccq_sdhi3>;
76 - cd-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
77 - wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
78 + vmmc-supply = <&wlan_en>;
86 + keep-power-in-suspend;
88 + /* leave disabled by default */
100 clock-frequency = <50000000>;
102 diff --git a/arch/arm64/boot/dts/renesas/r8a77951-agl-refhw.dts b/arch/arm64/boot/dts/renesas/r8a77951-agl-refhw.dts
103 index 3d1107f6d9cc..24ba2c5c4b88 100644
104 --- a/arch/arm64/boot/dts/renesas/r8a77951-agl-refhw.dts
105 +++ b/arch/arm64/boot/dts/renesas/r8a77951-agl-refhw.dts
106 @@ -119,6 +119,23 @@ adv7123_out: endpoint {
111 + compatible = "audio-graph-card";
114 + dais = <&rsnd_port2>;
118 + compatible = "ti,wl18xx-pcm";
122 + wl18xx_endpoint: endpoint {
123 + remote-endpoint = <&rsnd_for_wl18xx>;
130 @@ -155,8 +172,14 @@ &hsusb3 {
133 dais = <&rsnd_port0 /* ak4613 */
134 - &rsnd_port1 /* HDMI0 */
135 - &rsnd_port2>; /* HDMI1 */
136 + &rsnd_port1>; /* HDMI0 */
141 + compatible = "ti,wl1837-st";
142 + enable-gpios = <&gpio7 3 GPIO_ACTIVE_HIGH>;
147 @@ -192,12 +215,6 @@ rcar_dw_hdmi1_out: endpoint {
148 remote-endpoint = <&hdmi1_con>;
153 - dw_hdmi1_snd_in: endpoint {
154 - remote-endpoint = <&rsnd_endpoint2>;
160 @@ -215,8 +232,11 @@ &ohci3 {
165 + #sound-dai-cells = <1>;
168 - /* rsnd_port0 is on salvator-common */
169 + /* rsnd_port0 is in agl-refhw-common */
172 rsnd_endpoint1: endpoint {
173 @@ -231,14 +251,15 @@ rsnd_endpoint1: endpoint {
177 - rsnd_endpoint2: endpoint {
178 - remote-endpoint = <&dw_hdmi1_snd_in>;
179 + rsnd_for_wl18xx: endpoint {
180 + remote-endpoint = <&wl18xx_endpoint>;
182 - dai-format = "i2s";
183 - bitclock-master = <&rsnd_endpoint2>;
184 - frame-master = <&rsnd_endpoint2>;
185 + simple-audio-card,format = "i2s";
186 + bitclock-master = <&wl18xx_endpoint>;
187 + frame-master = <&wl18xx_endpoint>;
189 - playback = <&ssi3>;
190 + playback = <&ssi7>;
195 @@ -373,11 +394,40 @@ &sdhi0 {
199 - /delete-property/ wp-gpios;
203 + max-frequency = <50000000>;
205 + #address-cells = <1>;
208 + compatible = "ti,wl1837";
210 + interrupt-parent = <&gpio1>;
211 + interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
217 + * Enable WLAN_PWR_EN right from boot to get reliable BT
218 + * initialization, as doing it at SDHI initialization
219 + * does not seem to do so, no matter how much BT_EN is
222 + * This is perhaps not ideal per the requirements described
223 + * in the "Level Shifting WL18xx/WL18xxMOD/WL18xxQ I/Os"
224 + * document (SWRA448A)[1], but the BT UART seems unusable
227 + * [1] https://www.ti.com/lit/an/swra448a/swra448a.pdf
231 + gpios = <9 GPIO_ACTIVE_HIGH>;
235 /* Enable the CAN 1 & 2 transceivers */
236 can-1-transceiver-stb {