[v2,9/9] arm64: dts: rockchip: RockPro64: hook up bluetooth at uart0
diff mbox series

Message ID 20191211235253.2539-10-smoch@web.de
State New
Headers show
Series
  • brcmfmac: add support for BCM4359 SDIO chipset
Related show

Commit Message

Soeren Moch Dec. 11, 2019, 11:52 p.m. UTC
With enabled wifi support (required for firmware loading) for the
Ampak AP6359SA based wifi/bt combo module we now also can enable
the bluetooth part.

Suggested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Soeren Moch <smoch@web.de>
---
changes in v2:
- new patch

Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless@vger.kernel.org
Cc: brcm80211-dev-list.pdl@broadcom.com
Cc: brcm80211-dev-list@cypress.com
Cc: netdev@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 .../boot/dts/rockchip/rk3399-rockpro64.dts    | 29 ++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

--
2.17.1

Comments

Robin Murphy Dec. 12, 2019, 10:22 a.m. UTC | #1
Hi Soeren,

On 11/12/2019 11:52 pm, Soeren Moch wrote:
> With enabled wifi support (required for firmware loading) for the
> Ampak AP6359SA based wifi/bt combo module we now also can enable
> the bluetooth part.
> 
> Suggested-by: Heiko Stuebner <heiko@sntech.de>
> Signed-off-by: Soeren Moch <smoch@web.de>
> ---
> changes in v2:
> - new patch
> 
> Cc: Heiko Stuebner <heiko@sntech.de>
> Cc: Kalle Valo <kvalo@codeaurora.org>
> Cc: linux-wireless@vger.kernel.org
> Cc: brcm80211-dev-list.pdl@broadcom.com
> Cc: brcm80211-dev-list@cypress.com
> Cc: netdev@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-rockchip@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> ---
>   .../boot/dts/rockchip/rk3399-rockpro64.dts    | 29 ++++++++++++++++++-
>   1 file changed, 28 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
> index 9fa92790d6e0..94cc462e234d 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
> @@ -561,6 +561,20 @@
>   };
> 
>   &pinctrl {
> +	bt {
> +		bt_enable_h: bt-enable-h {
> +			rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
> +		};
> +
> +		bt_host_wake_l: bt-host-wake-l {
> +			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>;
> +		};
> +
> +		bt_wake_l: bt-wake-l {
> +			rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
> +		};
> +	};
> +
>   	buttons {
>   		pwrbtn: pwrbtn {
>   			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
> @@ -729,8 +743,21 @@
> 
>   &uart0 {
>   	pinctrl-names = "default";
> -	pinctrl-0 = <&uart0_xfer &uart0_cts>;
> +	pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
>   	status = "okay";
> +
> +	bluetooth {
> +		compatible = "brcm,bcm43438-bt";
> +		clocks = <&rk808 1>;
> +		clock-names = "extclk";

Is this right? Comparing the binding and the naming on the schematics, 
it seems more likely that this might be the LPO clock rather than the 
TXCO clock.

Robin.

> +		device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
> +		host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
> +		shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
> +		vbat-supply = <&vcc3v3_sys>;
> +		vddio-supply = <&vcc_1v8>;
> +	};
>   };
> 
>   &uart2 {
> --
> 2.17.1
> 
> 
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>
Soeren Moch Dec. 12, 2019, 10:47 a.m. UTC | #2
On 12.12.19 11:22, Robin Murphy wrote:
> Hi Soeren,
>
> On 11/12/2019 11:52 pm, Soeren Moch wrote:
>> With enabled wifi support (required for firmware loading) for the
>> Ampak AP6359SA based wifi/bt combo module we now also can enable
>> the bluetooth part.
>>
>> Suggested-by: Heiko Stuebner <heiko@sntech.de>
>> Signed-off-by: Soeren Moch <smoch@web.de>
>> ---
>> changes in v2:
>> - new patch
>>
>> Cc: Heiko Stuebner <heiko@sntech.de>
>> Cc: Kalle Valo <kvalo@codeaurora.org>
>> Cc: linux-wireless@vger.kernel.org
>> Cc: brcm80211-dev-list.pdl@broadcom.com
>> Cc: brcm80211-dev-list@cypress.com
>> Cc: netdev@vger.kernel.org
>> Cc: linux-arm-kernel@lists.infradead.org
>> Cc: linux-rockchip@lists.infradead.org
>> Cc: linux-kernel@vger.kernel.org
>> ---
>>   .../boot/dts/rockchip/rk3399-rockpro64.dts    | 29 ++++++++++++++++++-
>>   1 file changed, 28 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
>> b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
>> index 9fa92790d6e0..94cc462e234d 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
>> +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
>> @@ -561,6 +561,20 @@
>>   };
>>
>>   &pinctrl {
>> +    bt {
>> +        bt_enable_h: bt-enable-h {
>> +            rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
>> +        };
>> +
>> +        bt_host_wake_l: bt-host-wake-l {
>> +            rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>;
>> +        };
>> +
>> +        bt_wake_l: bt-wake-l {
>> +            rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
>> +        };
>> +    };
>> +
>>       buttons {
>>           pwrbtn: pwrbtn {
>>               rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
>> @@ -729,8 +743,21 @@
>>
>>   &uart0 {
>>       pinctrl-names = "default";
>> -    pinctrl-0 = <&uart0_xfer &uart0_cts>;
>> +    pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
>>       status = "okay";
>> +
>> +    bluetooth {
>> +        compatible = "brcm,bcm43438-bt";
>> +        clocks = <&rk808 1>;
>> +        clock-names = "extclk";
>
> Is this right? Comparing the binding and the naming on the schematics,
> it seems more likely that this might be the LPO clock rather than the
> TXCO clock.
>
> Robin.
On second thought I have to agree. So we need another round on this.

Thanks for your review and bug report,
Soeren
>
>> +        device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
>> +        host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
>> +        shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
>> +        pinctrl-names = "default";
>> +        pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
>> +        vbat-supply = <&vcc3v3_sys>;
>> +        vddio-supply = <&vcc_1v8>;
>> +    };
>>   };
>>
>>   &uart2 {
>> --
>> 2.17.1
>>
>>
>> _______________________________________________
>> Linux-rockchip mailing list
>> Linux-rockchip@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>>

Patch
diff mbox series

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
index 9fa92790d6e0..94cc462e234d 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
@@ -561,6 +561,20 @@ 
 };

 &pinctrl {
+	bt {
+		bt_enable_h: bt-enable-h {
+			rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		bt_host_wake_l: bt-host-wake-l {
+			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>;
+		};
+
+		bt_wake_l: bt-wake-l {
+			rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	buttons {
 		pwrbtn: pwrbtn {
 			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
@@ -729,8 +743,21 @@ 

 &uart0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_xfer &uart0_cts>;
+	pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
 	status = "okay";
+
+	bluetooth {
+		compatible = "brcm,bcm43438-bt";
+		clocks = <&rk808 1>;
+		clock-names = "extclk";
+		device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
+		host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
+		shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
+		vbat-supply = <&vcc3v3_sys>;
+		vddio-supply = <&vcc_1v8>;
+	};
 };

 &uart2 {