From patchwork Wed Jul 31 06:28:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ivan T . Ivanov" X-Patchwork-Id: 13748152 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6863FC3DA7F for ; Wed, 31 Jul 2024 06:29:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uF7PQFFHy0CMjEgZhnWAnVCzGYYSmqRPZkEKrS0jKn0=; b=xtygYDnTotBApOGuHLkT7CW0Ao 0xC+ZfXkrUF8Ymz2fd+XYbDMiTA4c0k+42Lypcb46SRITvdrtVMgeJxpBGPOkipjKLUKYwh4LU3s+ hAZ0VB2TjaNox8a1pN9RS4RVNJPrfaSSMxBkxDlpNGsuBbzdbcB6CHq7BkRBzmC7icGUDv+zFmJ+v nxMyWioThDnfJ+qt0xJWx0PTUuc0s0emqK+WZLjSM1YVTzGQFp1rvwwVPKrGQnF0ArueNZIoc28hD Wj/xgxp00tbAYKWhpWDyE0zZDPVm5hVkgKTtTN9spg7m38Ahx/hqXDOukfdpdr/XEi8z3aCPSVlP4 D18dc52g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZ2pc-0000000HYDY-047t; Wed, 31 Jul 2024 06:29:04 +0000 Received: from smtp-out2.suse.de ([195.135.223.131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZ2nY-0000000HX96-23sO for linux-arm-kernel@lists.infradead.org; Wed, 31 Jul 2024 06:27:00 +0000 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 413B81FD73; Wed, 31 Jul 2024 06:26:53 +0000 (UTC) Authentication-Results: smtp-out2.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 8823513AEA; Wed, 31 Jul 2024 06:26:52 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id YL/TICzZqWYkZgAAD6G6ig (envelope-from ); Wed, 31 Jul 2024 06:26:52 +0000 From: "Ivan T. Ivanov" To: linus.walleij@linaro.org, robh@kernel.org, krzk+dt@kernel.org Cc: conor+dt@kernel.org, florian.fainelli@broadcom.com, wahrenst@gmx.net, andrea.porta@suse.com, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "Ivan T. Ivanov" Subject: [PATCH 7/7] arm64: dts: broadcom: bcm2712: Add UARTA controller node. Date: Wed, 31 Jul 2024 09:28:14 +0300 Message-ID: <20240731062814.215833-8-iivanov@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240731062814.215833-1-iivanov@suse.de> References: <20240731062814.215833-1-iivanov@suse.de> MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Rspamd-Queue-Id: 413B81FD73 X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[]; TAGGED_RCPT(0.00)[dt] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240730_232656_744914_1DC181D1 X-CRM114-Status: GOOD ( 10.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On RPi5 device Bluetooth chips is connected to UARTA port. Add Bluetooth chips and related pin definitions. With this and firmware already provided by distributions, at least on openSUSE Tumbleweed, this is sufficient to make Bluetooth operational on RPi5 \o/. Signed-off-by: Ivan T. Ivanov --- .../boot/dts/broadcom/bcm2712-rpi-5-b.dts | 45 +++++++++++++++++++ arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 11 +++++ 2 files changed, 56 insertions(+) diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts index b6bfe0abb774..a557cbd8ba17 100644 --- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts +++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts @@ -133,11 +133,39 @@ wl_on_pins: wl-on-pins { pins = "gpio28"; }; + bt_shutdown_pins: bt-shutdown-pins { + function = "gpio"; + pins = "gpio29"; + }; + emmc_sd_pulls: emmc-sd-pulls { pins = "emmc_cmd", "emmc_dat0", "emmc_dat1", "emmc_dat2", "emmc_dat3"; bias-pull-up; }; + uarta_24_pins: uarta-24-pins { + pin-rts { + function = "uart0"; + pins = "gpio24"; + bias-disable; + }; + pin-cts { + function = "uart0"; + pins = "gpio25"; + bias-pull-up; + }; + pin-txd { + function = "uart0"; + pins = "gpio26"; + bias-disable; + }; + pin-rxd { + function = "uart0"; + pins = "gpio27"; + bias-pull-up; + }; + }; + sdio2_30_pins: sdio2-30-pins { pin-clk { function = "sd2"; @@ -156,3 +184,20 @@ pins-dat { }; }; }; + +/* uarta communicates with the BT module */ +&uarta { + uart-has-rtscts; + auto-flow-control; + status = "okay"; + clock-frequency = <96000000>; + pinctrl-0 = <&uarta_24_pins &bt_shutdown_pins>; + pinctrl-names = "default"; + + bluetooth: bluetooth { + compatible = "brcm,bcm43438-bt"; + max-speed = <3000000>; + shutdown-gpios = <&gio 29 GPIO_ACTIVE_HIGH>; + local-bd-address = [ 00 00 00 00 00 00 ]; + }; +}; diff --git a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi index 3c0663dc6712..e972f94d6828 100644 --- a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi +++ b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi @@ -305,6 +305,17 @@ gio: gpio@7d508500 { brcm,gpio-direct; }; + uarta: serial@7d50c000 { + compatible = "brcm,bcm7271-uart"; + reg = <0x7d50c000 0x20>; + reg-names = "uart"; + reg-shift = <2>; + reg-io-width = <4>; + interrupts = ; + skip-init; + status = "disabled"; + }; + pinctrl_aon: pinctrl@7d510700 { compatible = "brcm,bcm2712-aon-pinctrl"; reg = <0x7d510700 0x20>;