From patchwork Wed Jul 31 06:28:07 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: 13748154 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 74125C3DA7F for ; Wed, 31 Jul 2024 06:30:05 +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: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:In-Reply-To:References:List-Owner; bh=ysVg8NKYfuKZ0U1GU6lkjKZUC39/oYsEHCysihtmi4I=; b=yQz0dNn7R/Cn3u97e/lxePCwJl a5qHs6yr322HmhYYfiwiEaRyCOFmyMmV8C9/H1Ppi8aDUQrrj8ANiRgfLN/TJDqlQQ7DIGD9bLbq3 3i/7khqvUe1LofBz8pXggLUp7LsCXp/ZVdnuRmACkSs8/dCZUinMiAgM3KsxAt6zSVlzpl+3i3l+v 8rK6TEFfdLS1TUR/2ULE9PtxJ/+Id/yJj1ucqSy4MQmi8rtzRaQ/EDpBJjk0LKKr9vdVv0WbatWl+ sy++1ReThF42OF2ppacJ99N0vbdEyAZvr8E+lvwHox9u6MasqSzo3CystXpcGW6zrUcuiCHlHBZpX Pn4cew6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZ2qS-0000000HYSt-25KG; Wed, 31 Jul 2024 06:29:56 +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-0000000HX93-1iwf for linux-arm-kernel@lists.infradead.org; Wed, 31 Jul 2024 06:27:12 +0000 Received: from imap1.dmz-prg2.suse.org (unknown [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 D08CC21EFE; Wed, 31 Jul 2024 06:26:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722407213; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ysVg8NKYfuKZ0U1GU6lkjKZUC39/oYsEHCysihtmi4I=; b=QQlDHhC7x/H1HzdWxFNzy/R8r1YNUx4HAgpYipbmTV6YvaWfjo7NK7Gm882iO6MgZh0kKG 0AjHaKF0Q6Sn1ESpMcecN74lz3wSiCKTg/egY9Oxm36CSZyIpLNcFWtMUQPczF6u7A77Z7 Umb8KYtAg9hzNAHynDUngKyhWxqw0Gs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722407213; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ysVg8NKYfuKZ0U1GU6lkjKZUC39/oYsEHCysihtmi4I=; b=btVtL2fYuwlyqtdVZEMd4xiRQipwxN7B/yL+KbUrCRRmlZYO2/NtD3JxpcheJbqg2O+crE O68LrJr20y8hnzBg== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722407211; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ysVg8NKYfuKZ0U1GU6lkjKZUC39/oYsEHCysihtmi4I=; b=WihMl513lFSFx5FL2zCdpwrtOgQeEogBi83iWMIJLZ4bVLAIcMKAcbJZwI2zjZCl4wlJQ2 JTuuMN/VypQ9QjQ4kjTf4epQP5U0tMb4q9/ALAIGnspM7xTyRtAnFJALcgtweQ1WRlQae5 s7ofJgF6fyIJsWC/dn1LMTs0svHl9B8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722407211; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ysVg8NKYfuKZ0U1GU6lkjKZUC39/oYsEHCysihtmi4I=; b=Ov3FaK6UX+pPuq45Is5/3Tb3P/F4VBsuFAO24RYaYcIe/M0dgMfxgRnEfv+2kYwAbD7Sj9 uKN6x+q7M5S0p2BQ== 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 A61F913297; Wed, 31 Jul 2024 06:26:51 +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 008ZKCvZqWYkZgAAD6G6ig (envelope-from ); Wed, 31 Jul 2024 06:26:51 +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 0/7] Add pin control driver for BCM2712 SoC Date: Wed, 31 Jul 2024 09:28:07 +0300 Message-ID: <20240731062814.215833-1-iivanov@suse.de> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spamd-Result: default: False [1.90 / 50.00]; SUSPICIOUS_RECIPS(1.50)[]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[kernel.org,broadcom.com,gmx.net,suse.com,vger.kernel.org,lists.infradead.org,suse.de]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_SEVEN(0.00)[11]; DBL_BLOCKED_OPENRESOLVER(0.00)[checkpatch.pl:url,imap1.dmz-prg2.suse.org:helo]; TAGGED_RCPT(0.00)[dt]; FREEMAIL_ENVRCPT(0.00)[gmx.net] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240730_232656_640046_AEB3709D X-CRM114-Status: GOOD ( 15.96 ) 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 Hi, The following patches add a pin control driver for the BCM2712 SoC and few pin/gpio Devicetree nodes for Raspberry Pi 5. Device driver is follow up version on what Andrea posted in April [1]. It is based on sources from here [2]. I just made few cosmetic changes and addressed review comments from earlier submission. I don't have documentation for this controller. Patch 3 was already posted by Andrea and it is in Broadcom integration tree[3]. Unfortunately it is still not in the Linus tree[4]. So I added it here as base for my changes and to easy building and testing. Patch 5 wire up power button on RPi5 Patch 6 adds WiFi Devicetree node for RPi5 Patch 7 adds Bluetooth Devicetree node for RPi5 They are few complaints from checkpatch.pl. Like few lines over 100 columns, which I keep that way for better readability or usage of EOPNOTSUPP, but it is according pin control API document. All this have been tested as kernel was directly booted RPi5 via kernel= config.txt option and cmdline.txt file with following content (Note I am using Tumbleweed RPi raw images) # cat /boot/efi/cmdline.txt root=/dev/mmcblk0p3 rootwait rw systemd.show_status=1 console=tty ignore_loglevel earlycon console=ttyAMA10,115200 With all these patches Bluetooth and Wifi are working fine (tm) with firmware files provided by openSUSE Tumbleweed. All comments and suggestions are welcome! Happy hacking! Ivan [1] https://lore.kernel.org/lkml/f6601f73-cb22-4ba3-88c5-241be8421fc3@broadcom.com/ [2] https://github.com/raspberrypi/linux/blob/rpi-6.6.y/drivers/pinctrl/bcm/pinctrl-bcm2712.c [3] https://lore.kernel.org/lkml/20240605120712.3523290-1-florian.fainelli@broadcom.com/#t [4] https://lore.kernel.org/all/bfc60a7e-54d2-48a6-a288-4fe76d66507a@gmx.net/ Andrea della Porta (1): arm64: dts: broadcom: Add support for BCM2712 Ivan T. Ivanov (6): dt-bindings: pinctrl: Add support for Broadcom STB pin controller pinctrl: bcm: Add STB family pin controller driver arm64: dts: broadcom: bcm2712: Add pin controller nodes arm64: dts: broadcom: bcm2712: Add one more GPIO node arm64: dts: broadcom: bcm2712: Add second SDHCI controller node arm64: dts: broadcom: bcm2712: Add UARTA controller node. .../pinctrl/brcm,brcmstb-pinctrl.yaml | 73 + arch/arm64/boot/dts/broadcom/Makefile | 1 + .../boot/dts/broadcom/bcm2712-rpi-5-b.dts | 203 +++ arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 357 +++++ drivers/pinctrl/bcm/Kconfig | 13 + drivers/pinctrl/bcm/Makefile | 1 + drivers/pinctrl/bcm/pinctrl-brcmstb.c | 1217 +++++++++++++++++ 7 files changed, 1865 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,brcmstb-pinctrl.yaml create mode 100644 arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts create mode 100644 arch/arm64/boot/dts/broadcom/bcm2712.dtsi create mode 100644 drivers/pinctrl/bcm/pinctrl-brcmstb.c base-commit: dc1c8034e31b14a2e5e212104ec508aec44ce1b9