linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chen-Yu Tsai <wens@csie.org>
To: Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Chen-Yu Tsai <wens@csie.org>,
	Loic Poulain <loic.poulain@gmail.com>,
	linux-bluetooth@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v3 15/15] arm64: dts: allwinner: a64: bananapi-m64: Add Bluetooth device node
Date: Mon, 17 Dec 2018 12:04:49 +0800	[thread overview]
Message-ID: <20181217040449.31437-16-wens@csie.org> (raw)
In-Reply-To: <20181217040449.31437-1-wens@csie.org>

The AP6212 is based on the Broadcom BCM43430 or BCM43438. The WiFi side
identifies as BCM43430, while the Bluetooth side identifies as BCM43438.

The Bluetooth side is connected to UART1 in a 4 wire configuration. Same
as the WiFi side, due to being the same chip and package, DLDO2 provides
overall power via VBAT, and DLDO4 provides I/O power via VDDIO. The RTC
clock output provides the LPO low power clock at 32.768 kHz.

This patch enables Bluetooth on this board, and also adds the missing
LPO clock on the WiFi side. There is also a PCM connection for Bluetooth,
but this is not covered here.

Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 .../boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
index 83e30e0afe5b..9d0afd7d50ec 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
@@ -94,6 +94,8 @@
 	wifi_pwrseq: wifi_pwrseq {
 		compatible = "mmc-pwrseq-simple";
 		reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
+		clocks = <&rtc 1>;
+		clock-names = "ext_clock";
 	};
 };
 
@@ -364,7 +366,19 @@
 &uart1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+	uart-has-rtscts;
 	status = "okay";
+
+	bluetooth {
+		compatible = "brcm,bcm43438-bt";
+		clocks = <&rtc 1>;
+		clock-names = "lpo";
+		vbat-supply = <&reg_dldo2>;
+		vddio-supply = <&reg_dldo4>;
+		device-wakeup-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
+		host-wakeup-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
+		shutdown-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
+	};
 };
 
 &usb_otg {
-- 
2.20.0


  parent reply	other threads:[~2018-12-17  4:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-17  4:04 [PATCH v3 00/15] ARM: sunxi: Enable Broadcom-based Bluetooth controllers Chen-Yu Tsai
2018-12-17  4:04 ` [PATCH v3 01/15] dt-bindings: net: broadcom-bluetooth: Fix external clock names Chen-Yu Tsai
2018-12-18 14:58   ` Rob Herring
2018-12-17  4:04 ` [PATCH v3 02/15] dt-bindings: net: broadcom-bluetooth: Add VBAT and VDDIO supplies Chen-Yu Tsai
2018-12-17  4:04 ` [PATCH v3 03/15] dt-bindings: net: broadcom-bluetooth: Add BCM20702A1 compatible string Chen-Yu Tsai
2018-12-17  4:04 ` [PATCH v3 04/15] dt-bindings: net: broadcom-bluetooth: Add BCM4330 " Chen-Yu Tsai
2018-12-17  4:04 ` [PATCH v3 05/15] Bluetooth: hci_bcm: Handle deferred probing for the clock supply Chen-Yu Tsai
2018-12-17  4:04 ` [PATCH v3 06/15] Bluetooth: hci_bcm: Simplify clk_get error handling Chen-Yu Tsai
2018-12-17  4:04 ` [PATCH v3 07/15] Bluetooth: hci_bcm: Use "txco" and "extclk" to get clock reference Chen-Yu Tsai
2018-12-17  4:04 ` [PATCH v3 08/15] Bluetooth: hci_bcm: Add support for LPO clock Chen-Yu Tsai
2018-12-17  4:04 ` [PATCH v3 09/15] Bluetooth: hci_bcm: Add support for regulator supplies Chen-Yu Tsai
2018-12-17  4:04 ` [PATCH v3 10/15] Bluetooth: hci_bcm: Wait for device to come out of reset after power on Chen-Yu Tsai
2018-12-17  4:04 ` [PATCH v3 11/15] Bluetooth: hci_bcm: Add BCM20702A1 variant Chen-Yu Tsai
2018-12-17  4:04 ` [PATCH v3 12/15] Bluetooth: hci_bcm: Add compatible string for BCM4330 Chen-Yu Tsai
2018-12-17  4:04 ` [PATCH v3 13/15] Bluetooth: btbcm: Add default address for BCM43430A0 Chen-Yu Tsai
2018-12-17  4:04 ` [PATCH v3 14/15] ARM: dts: sunxi: Enable Broadcom-based Bluetooth for multiple boards Chen-Yu Tsai
2018-12-17  4:04 ` Chen-Yu Tsai [this message]
2018-12-18 23:50 ` [PATCH v3 00/15] ARM: sunxi: Enable Broadcom-based Bluetooth controllers Marcel Holtmann
2018-12-19  9:54   ` Chen-Yu Tsai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181217040449.31437-16-wens@csie.org \
    --to=wens@csie.org \
    --cc=devicetree@vger.kernel.org \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.poulain@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).