1 Add support for TI WL1837
3 This patch adds description of TI WL1837 and links interfaces
4 to communicate with the IC.
6 Signed-off-by: ito.yoshiki001 <ito.yoshiki001@jp.panasonic.com>
9 - WL1837 specific devicetree configuration moved to the board
10 specific r8a7795-agl-refhw.dts from agl-refhw-common.dtsi.
11 - Switched to HCI_LL driver for BT support to match other upstream
12 users and prepare for btwilink driver going away (dropped in 5.5
14 - WLAN_PWR_EN enabling moved to GPIO initialization to work around
15 BT initialization problems.
16 - Update sound configuration to enable WL1837 BT audio, and disable
17 the HDMI1 audio left over from the original Salvator-X devicetree.
18 The latter is clean up, as HDMI1 as defined uses a SSI that
19 conflicts with the ak4613 configuration.
21 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
23 arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi | 37 +++++++---
24 arch/arm64/boot/dts/renesas/r8a7795-agl-refhw.dts | 84 ++++++++++++++++++-----
25 2 files changed, 94 insertions(+), 27 deletions(-)
27 diff --git a/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi b/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi
28 index 796ac4c078e0..6f34b54c6ce1 100644
29 --- a/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi
30 +++ b/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi
35 + wlan_en: regulator-wlan_en {
36 + compatible = "regulator-fixed";
38 + regulator-name = "wlan-en-regulator";
39 + regulator-min-microvolt = <3300000>;
40 + regulator-max-microvolt = <3300000>;
42 + gpio = <&gpio7 2 GPIO_ACTIVE_HIGH>;
43 + startup-delay-us = <70000>;
48 compatible = "hdmi-connector";
54 - groups = "ssi349_ctrl", "ssi3_data", "ssi4_data";
55 + groups = "ssi349_ctrl", "ssi3_data", "ssi4_data",
56 + "ssi78_ctrl", "ssi7_data", "ssi8_data";
64 + /* Default WLAN card configuration */
65 pinctrl-0 = <&sdhi3_pins>;
66 - pinctrl-1 = <&sdhi3_pins_uhs>;
67 - pinctrl-names = "default", "state_uhs";
68 + pinctrl-names = "default";
70 - vmmc-supply = <&vcc_sdhi3>;
71 - vqmmc-supply = <&vccq_sdhi3>;
72 - cd-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
73 - wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
74 + vmmc-supply = <&wlan_en>;
82 + keep-power-in-suspend;
84 + /* leave disabled by default */
96 clock-frequency = <50000000>;
98 diff --git a/arch/arm64/boot/dts/renesas/r8a7795-agl-refhw.dts b/arch/arm64/boot/dts/renesas/r8a7795-agl-refhw.dts
99 index 83638a6228c0..97cc6e08ee8f 100644
100 --- a/arch/arm64/boot/dts/renesas/r8a7795-agl-refhw.dts
101 +++ b/arch/arm64/boot/dts/renesas/r8a7795-agl-refhw.dts
107 + compatible = "audio-graph-card";
110 + dais = <&rsnd_port2>;
114 + compatible = "ti,wl18xx-pcm";
118 + wl18xx_endpoint: endpoint {
119 + remote-endpoint = <&rsnd_for_wl18xx>;
129 dais = <&rsnd_port0 /* ak4613 */
130 - &rsnd_port1 /* HDMI0 */
131 - &rsnd_port2>; /* HDMI1 */
132 + &rsnd_port1>; /* HDMI0 */
137 + compatible = "ti,wl1837-st";
138 + enable-gpios = <&gpio7 3 GPIO_ACTIVE_HIGH>;
144 remote-endpoint = <&hdmi1_con>;
149 - dw_hdmi1_snd_in: endpoint {
150 - remote-endpoint = <&rsnd_endpoint2>;
161 + #sound-dai-cells = <1>;
164 - /* rsnd_port0 is on salvator-common */
165 + /* rsnd_port0 is in agl-refhw-common */
168 rsnd_endpoint1: endpoint {
169 @@ -231,14 +251,15 @@
173 - rsnd_endpoint2: endpoint {
174 - remote-endpoint = <&dw_hdmi1_snd_in>;
175 + rsnd_for_wl18xx: endpoint {
176 + remote-endpoint = <&wl18xx_endpoint>;
178 - dai-format = "i2s";
179 - bitclock-master = <&rsnd_endpoint2>;
180 - frame-master = <&rsnd_endpoint2>;
181 + simple-audio-card,format = "i2s";
182 + bitclock-master = <&wl18xx_endpoint>;
183 + frame-master = <&wl18xx_endpoint>;
185 - playback = <&ssi3>;
186 + playback = <&ssi7>;
191 @@ -373,11 +394,40 @@
195 - /delete-property/ wp-gpios;
199 + max-frequency = <50000000>;
201 + #address-cells = <1>;
204 + compatible = "ti,wl1837";
206 + interrupt-parent = <&gpio1>;
207 + interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
213 + * Enable WLAN_PWR_EN right from boot to get reliable BT
214 + * initialization, as doing it at SDHI initialization
215 + * does not seem to do so, no matter how much BT_EN is
218 + * This is perhaps not ideal per the requirements described
219 + * in the "Level Shifting WL18xx/WL18xxMOD/WL18xxQ I/Os"
220 + * document (SWRA448A)[1], but the BT UART seems unusable
223 + * [1] https://www.ti.com/lit/an/swra448a/swra448a.pdf
227 + gpios = <9 GPIO_ACTIVE_HIGH>;
231 /* Enable the CAN 1 & 2 transceivers */
232 can-1-transceiver-stb {