From patchwork Wed Jul 31 06:28:13 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: 13748151 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 9B04DC3DA7F for ; Wed, 31 Jul 2024 06:28:49 +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=VSCwcKDRH/YXZ6BdQZzoWo6kgkAF84teCeavf+RScmA=; b=h4QXHLoWRKH+m06jMwsPuvtRzx UegtyIndZw2R19n57qSISpAar0Udm+VLIWMRr4ywtnwzQHi8ylFOtFyBcKR+adI0qvZ2Cbk5xAsFr Okj9JRvA4gelCHdLuiD3Zxy5ugXV9OYqWHVF5/2sSZCrfNR0Kr6UEQcslNodXuWDNT+EaB40eeW1g mvMnQ5ozHc9vva0Y2SpHNkJZAw5/Z081BR6Kp/5O5LSForbe/DYzsTeyTwqZel8GT8riJnd8DcNor J7GzaWts6bWjm/+I3GNIAL81nxZwFt8ov/sQbDz4X8pA7qtz314mZUEy/91OT/5cuC/i1mYR9bNAZ LXz3fRnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZ2pA-0000000HY3r-3obp; Wed, 31 Jul 2024 06:28:37 +0000 Received: from smtp-out1.suse.de ([195.135.223.130]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZ2nY-0000000HX97-1qXz for linux-arm-kernel@lists.infradead.org; Wed, 31 Jul 2024 06:26:59 +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-out1.suse.de (Postfix) with ESMTPS id 32EBD21F2D; Wed, 31 Jul 2024 06:26:53 +0000 (UTC) Authentication-Results: smtp-out1.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 6B38113AE5; 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 8IzDGSzZqWYkZgAAD6G6ig (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 6/7] arm64: dts: broadcom: bcm2712: Add second SDHCI controller node Date: Wed, 31 Jul 2024 09:28:13 +0300 Message-ID: <20240731062814.215833-7-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: 32EBD21F2D 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_668691_D7DE93AF X-CRM114-Status: UNSURE ( 9.88 ) X-CRM114-Notice: Please train this message. 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 Add SDIO2 node. On RPi5 it is connected to WiFi chip. Add related pin, gpio and regulator definitions and add WiFi node. With this and firmware already provided by distributions, at least on openSUSE Tumbleweed, this is sufficient to make WiFi operational on RPi5 \o/. Signed-off-by: Ivan T. Ivanov --- .../boot/dts/broadcom/bcm2712-rpi-5-b.dts | 55 +++++++++++++++++++ arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 13 +++++ 2 files changed, 68 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 06e926af16b7..b6bfe0abb774 100644 --- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts +++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts @@ -46,6 +46,20 @@ sd_vcc_reg: sd-vcc-reg { gpios = <&gio_aon 4 GPIO_ACTIVE_HIGH>; }; + wl_on_reg: wl-on-reg { + compatible = "regulator-fixed"; + regulator-name = "wl-on-regulator"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + pinctrl-0 = <&wl_on_pins>; + pinctrl-names = "default"; + + gpio = <&gio 28 GPIO_ACTIVE_HIGH>; + + startup-delay-us = <150000>; + enable-active-high; + }; + pwr-button { compatible = "gpio-keys"; @@ -80,6 +94,25 @@ &sdio1 { cd-gpios = <&gio_aon 5 GPIO_ACTIVE_LOW>; }; +/* SDIO2 drives the WLAN interface */ +&sdio2 { + pinctrl-0 = <&sdio2_30_pins>; + pinctrl-names = "default"; + bus-width = <4>; + vmmc-supply = <&wl_on_reg>; + sd-uhs-ddr50; + non-removable; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + wifi: wifi@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + local-mac-address = [00 00 00 00 00 00]; + }; +}; + &pinctrl_aon { emmc_aon_cd_pins: emmc-aon-cd-pins { function = "sd_card_g"; @@ -95,9 +128,31 @@ pwr_button_pins: pwr-button-pins { bias-pull-up; }; + wl_on_pins: wl-on-pins { + function = "gpio"; + pins = "gpio28"; + }; + emmc_sd_pulls: emmc-sd-pulls { pins = "emmc_cmd", "emmc_dat0", "emmc_dat1", "emmc_dat2", "emmc_dat3"; bias-pull-up; }; + sdio2_30_pins: sdio2-30-pins { + pin-clk { + function = "sd2"; + pins = "gpio30"; + bias-disable; + }; + pin-cmd { + function = "sd2"; + pins = "gpio31"; + bias-pull-up; + }; + pins-dat { + function = "sd2"; + pins = "gpio32", "gpio33", "gpio34", "gpio35"; + bias-pull-up; + }; + }; }; diff --git a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi index 39d2419ffce2..3c0663dc6712 100644 --- a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi +++ b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi @@ -27,6 +27,19 @@ sdio1: mmc@1000fff000 { mmc-ddr-3_3v; }; + sdio2: mmc@1001100000 { + compatible = "brcm,bcm2712-sdhci"; + reg = <0x10 0x01100000 0x260>, + <0x10 0x01100400 0x200>; + reg-names = "host", "cfg"; + interrupts = ; + clocks = <&clk_emmc2>; + sdhci-caps-mask = <0x0000C000 0x0>; + sdhci-caps = <0x0 0x0>; + mmc-ddr-3_3v; + status = "disabled"; + }; + gicv2: interrupt-controller@107fff9000 { interrupt-controller; #interrupt-cells = <3>;