From patchwork Tue Dec 3 07:57:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janne Grunau via B4 Relay X-Patchwork-Id: 13891865 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 AEED6E6C617 for ; Tue, 3 Dec 2024 08:03:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZIwJfxL+REsPC0EzLsMrbPYPwDQbfDmBHJtA8hy/l8U=; b=d4P2cTDOxRH/4TYQ0s8SizwiNU C5mNzfPWZ673TLdaqJJEMPX9ZJSwwc4LVKEFb4EQLIgZKoQ/+pBH5hsNcnzGfBDDdG8fznXjTXGMQ 54nhvhqP+v7LuDTt8eBha8A7LTMK1qdT6xFnScj53YhbkiUvpu8EdxRZYiM7RWePWZc1yscBzNOZG Xszac2bExb6tSKaHjYZgisI4/rohRdvi5lgVQGPVIeO9JCkTojY9kNKe7fMeXaxqjJGaBdMNB92oi /R3bKFsMK5YBHEMvcRHNfbQZF6pV9t4cqaXUwnFi58bD/F7ryLmrgxI32j40Yq+qDOneSQL1Y63/T 4fwpqCsg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tINsG-00000008cYg-1Hmv; Tue, 03 Dec 2024 08:03:12 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tINnK-00000008b7G-2I2G for linux-arm-kernel@lists.infradead.org; Tue, 03 Dec 2024 07:58:08 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id C3CCCA40B18; Tue, 3 Dec 2024 07:56:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 778C9C4CEDA; Tue, 3 Dec 2024 07:58:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733212684; bh=MPqRUHL1p74lDraza5Gu6r3LXxFnHS9yDJRigvY6itc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=i+Iaz+vX7XJ67+hcwgVuwWv9LjqOuoMyzMI9v7VkUSbN+P7KEDODPx8RScbjD7eaE mRpss5A+Cg9kR9JbZE6F86/vTy18stbCz8oaRMedRwTduz8Ac/0GdPkXgEhudg3ila LhCFKDMmEckXyW0ZDa11z7JOtPewaYABpWqpCnMM01tzTWgmkO1BXjypdMzq6Y5Ner //S9/U0jguwxawM4DrqsK0YWGAJ2iPVUZ+CjZzPeSNF6aaKlFJBSGd1odaf6suIREL Xr9QdVqDdFlXsMg2XFYQyrUzBh8k6WnKa0vG+33jx4ikpsWAo7wXTLyv/aek3vNtsw e36PG9Rg7ttVA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61BC2E6C614; Tue, 3 Dec 2024 07:58:04 +0000 (UTC) From: Janne Grunau via B4 Relay Date: Tue, 03 Dec 2024 08:57:57 +0100 Subject: [PATCH v2 1/5] arm64: dts: apple: t8103: Fix spi4 power domain sort order MIME-Version: 1.0 Message-Id: <20241203-asahi-spi-dt-v2-1-cd68bfaf0c84@jannau.net> References: <20241203-asahi-spi-dt-v2-0-cd68bfaf0c84@jannau.net> In-Reply-To: <20241203-asahi-spi-dt-v2-0-cd68bfaf0c84@jannau.net> To: Hector Martin , Sven Peter , Alyssa Rosenzweig , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Janne Grunau , Neal Gompa X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1498; i=j@jannau.net; s=yk2024; h=from:subject:message-id; bh=9ueUveKszfxawJ0HmIK5r7NU/tiqsgQwLWeRgQUwJgA=; b=owGbwMvMwCW2UNrmdq9+ahrjabUkhnS/XVzVerG/X+kfvlZww+imQce2syrbvpnIbtvpz56tZ vDJ+VB0RykLgxgXg6yYIkuS9ssOhtU1ijG1D8Jg5rAygQxh4OIUgIlYSDIyHPl49dl3Zm+x2wZi F805WX4WfJtdxqR3LNIvlq1wkur2JEaGc9fKjx5hnDRx69rqxinMh1dsCmZbx+YgNvU3u8+FXav /sgEA X-Developer-Key: i=j@jannau.net; a=openpgp; fpr=8B336A6BE4E5695E89B8532B81E806F586338419 X-Endpoint-Received: by B4 Relay for j@jannau.net/yk2024 with auth_id=264 X-Original-From: Janne Grunau X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241202_235806_722673_B8407B4D X-CRM114-Status: UNSURE ( 9.16 ) 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: , Reply-To: j@jannau.net Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Hector Martin Signed-off-by: Hector Martin Reviewed-by: Neal Gompa --- arch/arm64/boot/dts/apple/t8103-pmgr.dtsi | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t8103-pmgr.dtsi b/arch/arm64/boot/dts/apple/t8103-pmgr.dtsi index 9645861a858c1a7c46c25a614c2cc4b03083bf46..c41c57d63997a59a9fe3c88de31fddb31781398e 100644 --- a/arch/arm64/boot/dts/apple/t8103-pmgr.dtsi +++ b/arch/arm64/boot/dts/apple/t8103-pmgr.dtsi @@ -387,6 +387,15 @@ ps_spi3: power-controller@258 { power-domains = <&ps_sio>, <&ps_spi_p>; }; + ps_spi4: power-controller@260 { + compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + reg = <0x260 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "spi4"; + power-domains = <&ps_sio>, <&ps_spi_p>; + }; + ps_uart_n: power-controller@268 { compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; reg = <0x268 4>; @@ -558,15 +567,6 @@ ps_mcc: power-controller@2f8 { apple,always-on; /* Memory controller */ }; - ps_spi4: power-controller@260 { - compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; - reg = <0x260 4>; - #power-domain-cells = <0>; - #reset-cells = <0>; - label = "spi4"; - power-domains = <&ps_sio>, <&ps_spi_p>; - }; - ps_dcs0: power-controller@300 { compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; reg = <0x300 4>; From patchwork Tue Dec 3 07:57:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janne Grunau via B4 Relay X-Patchwork-Id: 13891861 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 4E7F8E6C617 for ; Tue, 3 Dec 2024 07:59:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lirLx5IbL5Dj1ogILvdCZuddVfe+ns892ys9FzIJjjU=; b=2tD/Z2uZpv2Q2P1ms/eQZIYPOP t4bZfVCEAX+l4dvd6MKBEV6wAFn7r0ltYptDSbZTT/CiSbEcyfpCAsmHf4PFl5RydHFXapZHf568d aJsF9bp7z2EEWApvirNjnePHKiYz8cqi+ILsb4TYm46jYepgmqRmz2cyPj2f+zK5wyefdHErKX9RY /nObvKUGOq03ltPyhGGlQLdKQM72K83azjMkkrQZo11ETDk93v25D00TF1Fpk+f7PkLfTtCDlCwcN mpoBRi7wKgKhQfRAy/Tv9VnSoKNc+4kJWvATpG4Uzu7rFhxOXew8KmuBYAh7x+JrFn1ZbO+tThJXJ cKq/yNbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tINoM-00000008bPz-1yWh; Tue, 03 Dec 2024 07:59:10 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tINnK-00000008b7E-0ebX for linux-arm-kernel@lists.infradead.org; Tue, 03 Dec 2024 07:58:07 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 257495C6769; Tue, 3 Dec 2024 07:57:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 8A0F9C4AF48; Tue, 3 Dec 2024 07:58:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733212684; bh=VRjoTnc/r79MwWq6zWvYtYuLSBBDT+3foT1mFazvGpA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=mPMQu7FJO6neH6T5UUiv7gBkEJX2ze/rf82mqFi5tkKdnRXSUSR9ZIIT9XuleOoBC jZ/e2q/nfWrUSv4dBis02PRkEIc/oHGKBFBQR6At+9L4qCioOyxd3aqSu1X5PdHLgz bXlFQzj5d2BhJRyxQWlErm/BzBMrPogSy/ZFpoAXrp6My+GtCjP86SAW1SY17z4X3X 1AKaWcCrrUQI0PwNrV1oXqFGZpgtnghglzZ/aaaVOmzO5s5bGCaXSTCJnKs0HEkurP neYZrIcvhNbXQp2C/JxuTwbKDYukydZXPeJ3wU/YHOwcZt46Z3VNCPENgm4YqA8Xwb A7bazHVATMyzQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 723D4E6C616; Tue, 3 Dec 2024 07:58:04 +0000 (UTC) From: Janne Grunau via B4 Relay Date: Tue, 03 Dec 2024 08:57:58 +0100 Subject: [PATCH v2 2/5] arm64: dts: apple: t8103: Add spi controller nodes MIME-Version: 1.0 Message-Id: <20241203-asahi-spi-dt-v2-2-cd68bfaf0c84@jannau.net> References: <20241203-asahi-spi-dt-v2-0-cd68bfaf0c84@jannau.net> In-Reply-To: <20241203-asahi-spi-dt-v2-0-cd68bfaf0c84@jannau.net> To: Hector Martin , Sven Peter , Alyssa Rosenzweig , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Janne Grunau , Neal Gompa X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3632; i=j@jannau.net; s=yk2024; h=from:subject:message-id; bh=9MFJ0ZiYLZ8Qk0zHZWVIFqmiPpB2dmJwF7SezS0P754=; b=owGbwMvMwCW2UNrmdq9+ahrjabUkhnS/XVyOh+tNdlx0U+S8GPvusdbXNZwXHgglMFxhD3q+/ NTt2w/EO0pZGMS4GGTFFFmStF92MKyuUYypfRAGM4eVCWQIAxenAExEPJfhf3nC44ld7R5hb698 O5WTHdFteWlJLN8E85Ubr9k0f1fwvcTwi0lL3nRCJH+t4LNleYb/VI+pMat1qQvXrlkXdYOXXyq LHQA= X-Developer-Key: i=j@jannau.net; a=openpgp; fpr=8B336A6BE4E5695E89B8532B81E806F586338419 X-Endpoint-Received: by B4 Relay for j@jannau.net/yk2024 with auth_id=264 X-Original-From: Janne Grunau X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241202_235806_283978_41D0CE77 X-CRM114-Status: GOOD ( 12.40 ) 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: , Reply-To: j@jannau.net Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Janne Grunau Apple silicon devices have one or more SPI devices. Add device tree nodes for all known controllers. The missing ones could be guessed and tested with a little effort but since the devices expose no pins and no new devices are expected there is no point in spending the effort. SPI is used for spi-nor and input devices like keyboard, trackpad, touchscreen and fingerprint reader. Only the spi-nor flash has upstream drivers. Support for it will be added in a following commit. Reviewed-by: Neal Gompa Signed-off-by: Janne Grunau --- arch/arm64/boot/dts/apple/t8103.dtsi | 76 ++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t8103.dtsi b/arch/arm64/boot/dts/apple/t8103.dtsi index 9b0dad6b618444ac6b1c9735c50cccfc3965f947..c9b789a2ff7e1757930b3fc3682e734c1e4dbef9 100644 --- a/arch/arm64/boot/dts/apple/t8103.dtsi +++ b/arch/arm64/boot/dts/apple/t8103.dtsi @@ -326,6 +326,20 @@ clkref: clock-ref { clock-output-names = "clkref"; }; + clk_120m: clock-120m { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <120000000>; + clock-output-names = "clk_120m"; + }; + + clk_200m: clock-200m { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <200000000>; + clock-output-names = "clk_200m"; + }; + /* * This is a fabulated representation of the input clock * to NCO since we don't know the true clock tree. @@ -441,6 +455,48 @@ fpwm1: pwm@235044000 { status = "disabled"; }; + spi0: spi@235100000 { + compatible = "apple,t8103-spi", "apple,spi"; + reg = <0x2 0x35100000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + clocks = <&clk_200m>; + pinctrl-0 = <&spi0_pins>; + pinctrl-names = "default"; + power-domains = <&ps_spi0>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + spi1: spi@235104000 { + compatible = "apple,t8103-spi", "apple,spi"; + reg = <0x2 0x35104000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + clocks = <&clk_200m>; + pinctrl-0 = <&spi1_pins>; + pinctrl-names = "default"; + power-domains = <&ps_spi1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + spi3: spi@23510c000 { + compatible = "apple,t8103-spi", "apple,spi"; + reg = <0x2 0x3510c000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + clocks = <&clk_120m>; + pinctrl-0 = <&spi3_pins>; + pinctrl-names = "default"; + power-domains = <&ps_spi3>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + serial0: serial@235200000 { compatible = "apple,s5l-uart"; reg = <0x2 0x35200000 0x0 0x1000>; @@ -597,6 +653,26 @@ i2c4_pins: i2c4-pins { ; }; + spi0_pins: spi0-pins { + pinmux = , /* CLK */ + , /* MOSI */ + ; /* MISO */ + }; + + spi1_pins: spi1-pins { + pinmux = , + , + , + ; + }; + + spi3_pins: spi3-pins { + pinmux = , + , + , + ; + }; + pcie_pins: pcie-pins { pinmux = , , From patchwork Tue Dec 3 07:57:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janne Grunau via B4 Relay X-Patchwork-Id: 13891862 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 0162BE6C617 for ; Tue, 3 Dec 2024 08:00:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=B/jJiIHjvkiB22PNCi4eNueXPhKpos4iBXIHr+E1TmA=; b=RbpMTpd98JL1mscI3+KjWC8hhA 3fBw/W9RL79eXJ4++NqBujjcwz47X+EaxU88fET6eHmYIfP0uiGUw3UXnqt33vB+tuGb5TG2GUbcV QrXUtJixAL6SuXEZ5q9F1lKziIQ9F/mGpFjmXYHr4juAWJxc/dfS5NT/s2YHr6vqWz8q/HSUtwkkg OrDhgeikvv/muB7KF/K8XhZJspKNPkjprYlFYin85n61uWWhoAZqjeLzAxlSe3hkqDxfSoLV6iQ2a +fqJH6lV0lJuA0Do+j+AZe88pCPst3Allv4QeJadjm+Ry4xc5ypwd7vVOjHxRxrbn5tq70M/koiUN 0SClYRHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tINpL-00000008bhM-0New; Tue, 03 Dec 2024 08:00:11 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tINnK-00000008b7D-0eiL for linux-arm-kernel@lists.infradead.org; Tue, 03 Dec 2024 07:58:07 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 1E21E5C66DF; Tue, 3 Dec 2024 07:57:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 8FFF7C4CEE2; Tue, 3 Dec 2024 07:58:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733212684; bh=2F5Ap5T1lB8u5tqM6pAXUZmDBikyRGGz4fFHNUYaWKM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=kiav4+IjjJJMxmeDjtda1IXOK++k4ehpuUE601mm87dp1q/QV6ZodFPpvuYvKnj3G Bx2tDwFmtv7P1XBv6iHOSrYGbeKjcWY2RQInnFZ9KzacwpCkBf1eMZ1N8NjGUL5F9s /jWV+ty0YtZlOqXet+45RoVRfOh8lRzCmPhSGiGtRLXg+6kqbh+W/Wp13eHOdsY6J7 KzO8SmNAy4ZldSK5AmqCpQEEAz4+qLZD/FTeZsy/I7BJ+45bfqMr11xbu4oSc2Wxlh Vn8U241Upz1sWVz6EDC/sWLctjMAd1kFz5q5GU/OM5ez3PhEIxPEqiheCM3mWGp7MI YDSRjLhuDlQiQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85EBCE6C617; Tue, 3 Dec 2024 07:58:04 +0000 (UTC) From: Janne Grunau via B4 Relay Date: Tue, 03 Dec 2024 08:57:59 +0100 Subject: [PATCH v2 3/5] arm64: dts: apple: t8112: Add spi controller nodes MIME-Version: 1.0 Message-Id: <20241203-asahi-spi-dt-v2-3-cd68bfaf0c84@jannau.net> References: <20241203-asahi-spi-dt-v2-0-cd68bfaf0c84@jannau.net> In-Reply-To: <20241203-asahi-spi-dt-v2-0-cd68bfaf0c84@jannau.net> To: Hector Martin , Sven Peter , Alyssa Rosenzweig , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Janne Grunau , Neal Gompa X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2929; i=j@jannau.net; s=yk2024; h=from:subject:message-id; bh=AHySIPwyOhxDcF5B5Lzvbynlqb4i9BPBB11Y3mPxE4A=; b=owGbwMvMwCW2UNrmdq9+ahrjabUkhnS/XVzn3NQCKjdNN0yfwnZ7UpHptNoJ1xvCUvKub33Zt /OxhseSjlIWBjEuBlkxRZYk7ZcdDKtrFGNqH4TBzGFlAhnCwMUpABPZq8TIMOlxywQ/nzt9UUt1 KzvkjjJs7La63MK/THbP2Ts7OmboLGFk6Pp7i82f/V/RHxujqVy+yqYP97Cl719WMKvR9FvbcXd nfgA= X-Developer-Key: i=j@jannau.net; a=openpgp; fpr=8B336A6BE4E5695E89B8532B81E806F586338419 X-Endpoint-Received: by B4 Relay for j@jannau.net/yk2024 with auth_id=264 X-Original-From: Janne Grunau X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241202_235806_283404_5DF2E7E7 X-CRM114-Status: GOOD ( 13.19 ) 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: , Reply-To: j@jannau.net Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Janne Grunau Apple silicon devices have one or more SPI devices. Add device tree nodes for all known controllers. The missing ones could be guessed and tested with a little effort but since the devices expose no pins and no new devices are expected there is no point in spending the effort. SPI is used for spi-nor and input devices like keyboard, trackpad, touchscreen and fingerprint reader. Only the spi-nor flash has upstream drivers. Support for it will be added in a following commit. Reviewed-by: Neal Gompa Signed-off-by: Janne Grunau --- arch/arm64/boot/dts/apple/t8112.dtsi | 44 +++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/apple/t8112.dtsi b/arch/arm64/boot/dts/apple/t8112.dtsi index 1666e6ab250bc0be9b8318e3c8fc903ccd3f3760..58d88f1ef92a32061765bd3b569fdae0255dcd7e 100644 --- a/arch/arm64/boot/dts/apple/t8112.dtsi +++ b/arch/arm64/boot/dts/apple/t8112.dtsi @@ -349,6 +349,13 @@ clkref: clock-ref { clock-output-names = "clkref"; }; + clk_200m: clock-200m { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <200000000>; + clock-output-names = "clk_200m"; + }; + /* * This is a fabulated representation of the input clock * to NCO since we don't know the true clock tree. @@ -467,6 +474,34 @@ fpwm1: pwm@235044000 { status = "disabled"; }; + spi1: spi@235104000 { + compatible = "apple,t8112-spi", "apple,spi"; + reg = <0x2 0x35104000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + clocks = <&clk_200m>; + pinctrl-0 = <&spi1_pins>; + pinctrl-names = "default"; + power-domains = <&ps_spi1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + spi3: spi@23510c000 { + compatible = "apple,t8112-spi", "apple,spi"; + reg = <0x2 0x3510c000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + clocks = <&clkref>; + pinctrl-0 = <&spi3_pins>; + pinctrl-names = "default"; + power-domains = <&ps_spi3>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + serial0: serial@235200000 { compatible = "apple,s5l-uart"; reg = <0x2 0x35200000 0x0 0x1000>; @@ -626,13 +661,20 @@ i2c4_pins: i2c4-pins { ; }; - spi3_pins: spi3-pins { + spi1_pins: spi1-pins { pinmux = , , , ; }; + spi3_pins: spi3-pins { + pinmux = , + , + , + ; + }; + pcie_pins: pcie-pins { pinmux = , , From patchwork Tue Dec 3 07:58:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janne Grunau via B4 Relay X-Patchwork-Id: 13891863 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 67673E6C617 for ; Tue, 3 Dec 2024 08:01:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=syyEZcjigNPxkTRoDXzq3RLD/U/TZoOuvG0arQ9B5zg=; b=tmxotYIk59cxh9V7oJVzjSAcxE 1h5RYpR8+Jo9/QQlCQF9epnZ4Jj2UlOOpwjdUSvnPEuAt5dOQ4bYIjZ0TAYywZQWQd1X8kJKi7Dp/ GyceBn49XDuWw8QqE6Aiz373aFLgjYrp9nXlUFqJpTXAPDN5j+MOTB1KPAr0urYZl8DC3ZF2ceWlw Ky41K+Z934z+bPyjNy35Q/Sg4elAe6RN8kHRXyd5qC+M7nKU0WA1Sh9z8jSHoKQkpoC+ydt9YKIwe vZtvWYyF0+c055th3GzuYmo94hbGavlnSZ/0nh1qzbNlp5J+vBPxKu2sQGFUCl5lrWO3VzDtRHuYp +bHBvDjQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tINqI-00000008bzc-38Bz; Tue, 03 Dec 2024 08:01:10 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tINnK-00000008b7H-0yyl for linux-arm-kernel@lists.infradead.org; Tue, 03 Dec 2024 07:58:08 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id D559BA40B37; Tue, 3 Dec 2024 07:56:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id AEB22C4CEEE; Tue, 3 Dec 2024 07:58:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733212684; bh=tMDNAQGwIhv2L+4099mGn5sRXejuNYu8t6/fk8CpVsk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=XirOg8T6LxlZRuWZ9fZb/OMVcMsgefd0V4Ve3pBYjEhTlpmA8dOp36dCrcDsFIxkf 3wXDQFhl0lCZSyLdiwd51hN6kttSE8ncNOuxoPyEXBGqCbNF7FESTCkCa8/es3DNgg zTcaSR4dUvxAqnUOv8WL7L9YGvVRSInalJb5iCDYRH2FYCYq0aU7Gmac403bFz65hK Mc0A+cxwKpnafnvOZYrLzXG4j8eaJrU4/C87Qvr4RpdSguVPIG8/sNPilXRCSHqIZ3 J+SfcqBC73ahZHFv3zymlNS1OSqUZpOw/U4OLE8CeuO6+dDjLszSmzR8KjztTG5Ggq l9h7pQIZO7J2Q== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BD5EE6C61A; Tue, 3 Dec 2024 07:58:04 +0000 (UTC) From: Janne Grunau via B4 Relay Date: Tue, 03 Dec 2024 08:58:00 +0100 Subject: [PATCH v2 4/5] arm64: dts: apple: t600x: Add spi controller nodes MIME-Version: 1.0 Message-Id: <20241203-asahi-spi-dt-v2-4-cd68bfaf0c84@jannau.net> References: <20241203-asahi-spi-dt-v2-0-cd68bfaf0c84@jannau.net> In-Reply-To: <20241203-asahi-spi-dt-v2-0-cd68bfaf0c84@jannau.net> To: Hector Martin , Sven Peter , Alyssa Rosenzweig , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Janne Grunau , Neal Gompa X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3587; i=j@jannau.net; s=yk2024; h=from:subject:message-id; bh=0IOE/oeGR4/UyYbOobtI6bLuT1HdoZECpY8ZAr7l87o=; b=owGbwMvMwCW2UNrmdq9+ahrjabUkhnS/XVz1ev2nL4cJ2n50yqm5H9One/jcBP8dB18WzWnOW LhMZYJrRykLgxgXg6yYIkuS9ssOhtU1ijG1D8Jg5rAygQxh4OIUgIks38zwv6hzpdEmgbh++eRn KZ9Cdk+P8Iif3V8yO3/bNYvyJzdKrjL8s+NQPT79kda9LV42seGKc98w28ze/1n2z5PUZaFmd3k OcwMA X-Developer-Key: i=j@jannau.net; a=openpgp; fpr=8B336A6BE4E5695E89B8532B81E806F586338419 X-Endpoint-Received: by B4 Relay for j@jannau.net/yk2024 with auth_id=264 X-Original-From: Janne Grunau X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241202_235806_422716_BF0EEDCC X-CRM114-Status: GOOD ( 12.30 ) 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: , Reply-To: j@jannau.net Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Janne Grunau Apple silicon devices have one or more SPI devices. Add device tree nodes for all known controllers. The missing ones could be guessed and tested with a little effort but since the devices expose no pins and no new devices are expected there is no point in spending the effort. SPI is used for spi-nor and input devices like keyboard, trackpad, touchscreen and fingerprint reader. Only the spi-nor flash has upstream drivers. Support for it will be added in a following commit. Reviewed-by: Neal Gompa Signed-off-by: Janne Grunau --- arch/arm64/boot/dts/apple/t600x-common.dtsi | 7 +++++++ arch/arm64/boot/dts/apple/t600x-die0.dtsi | 28 ++++++++++++++++++++++++++ arch/arm64/boot/dts/apple/t600x-gpio-pins.dtsi | 14 +++++++++++++ 3 files changed, 49 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t600x-common.dtsi b/arch/arm64/boot/dts/apple/t600x-common.dtsi index fa8ead69936366999786cdd4910266ee08b5ca7a..87dfc13d74171f62bf3087401918d9d41eaac560 100644 --- a/arch/arm64/boot/dts/apple/t600x-common.dtsi +++ b/arch/arm64/boot/dts/apple/t600x-common.dtsi @@ -362,6 +362,13 @@ clkref: clock-ref { clock-output-names = "clkref"; }; + clk_200m: clock-200m { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <200000000>; + clock-output-names = "clk_200m"; + }; + /* * This is a fabulated representation of the input clock * to NCO since we don't know the true clock tree. diff --git a/arch/arm64/boot/dts/apple/t600x-die0.dtsi b/arch/arm64/boot/dts/apple/t600x-die0.dtsi index b1c875e692c8fb9c0af46a23568a7b0cd720141b..e9b3140ba1a996eeb91b3f60470833060b632bd2 100644 --- a/arch/arm64/boot/dts/apple/t600x-die0.dtsi +++ b/arch/arm64/boot/dts/apple/t600x-die0.dtsi @@ -163,6 +163,34 @@ i2c5: i2c@39b054000 { status = "disabled"; }; + spi1: spi@39b104000 { + compatible = "apple,t6000-spi", "apple,spi"; + reg = <0x3 0x9b104000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&clk_200m>; + pinctrl-0 = <&spi1_pins>; + pinctrl-names = "default"; + power-domains = <&ps_spi1>; + status = "disabled"; + }; + + spi3: spi@39b10c000 { + compatible = "apple,t6000-spi", "apple,spi"; + reg = <0x3 0x9b10c000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&clkref>; + pinctrl-0 = <&spi3_pins>; + pinctrl-names = "default"; + power-domains = <&ps_spi3>; + status = "disabled"; + }; + serial0: serial@39b200000 { compatible = "apple,s5l-uart"; reg = <0x3 0x9b200000 0x0 0x1000>; diff --git a/arch/arm64/boot/dts/apple/t600x-gpio-pins.dtsi b/arch/arm64/boot/dts/apple/t600x-gpio-pins.dtsi index b31f1a7a2b3fc36e7dfa480d27012d6d0fd56f97..1a994c3c1b79f088d685e13d1dc16e7d1e6546f4 100644 --- a/arch/arm64/boot/dts/apple/t600x-gpio-pins.dtsi +++ b/arch/arm64/boot/dts/apple/t600x-gpio-pins.dtsi @@ -36,6 +36,20 @@ i2c5_pins: i2c5-pins { ; }; + spi1_pins: spi1-pins { + pinmux = , + , + , + ; + }; + + spi3_pins: spi3-pins { + pinmux = , + , + , + ; + }; + pcie_pins: pcie-pins { pinmux = , , From patchwork Tue Dec 3 07:58:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janne Grunau via B4 Relay X-Patchwork-Id: 13891864 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 3CEDEE6C614 for ; Tue, 3 Dec 2024 08:02:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MIALpNpgE4769e0i7Lw8rCrq8jSRIEK8G+ARLJTyG2o=; b=dnU8AF+DfQuB+ubJXMXnZf+kih U/3ml7q8Ffi427MWJOh8QsAT06DhmTR9zfjyt9R1eBuJI34c0UUIPOWdb7TyUj/3WkOxhnqvsU/HT Ps8dlxTC93llwgJs9X57sIHTuqhg0yOrlydcIGBsDwzpML9vxWrOxEtCAQOtv5NGmvaUdff2vYjIQ RAsvmHH6gwOdgh2ffLsCq2Pv6fhqNm8Ix87bmaInTzj2tFWdBe2WzAvc6rXxHkOHzu8LXMsvkq5Po 2mVKhUwuF7aXxvKEPURr7a/kKgf9l+AIijbnGFKVoEcH+vkJ0iYhN9UL5j1/IJtX3GzX4Xf1iMgw/ RDmmej1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tINrH-00000008cG7-2XeB; Tue, 03 Dec 2024 08:02:11 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tINnK-00000008b7I-1a2Y for linux-arm-kernel@lists.infradead.org; Tue, 03 Dec 2024 07:58:08 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id D7F8EA40B61; Tue, 3 Dec 2024 07:56:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id BC20EC4CEF5; Tue, 3 Dec 2024 07:58:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733212684; bh=RvXXydv3bH1dUYAfXpdd8pnBNzEBwK7JMCwrpiha4Tc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=sX8dYvQq8pHI759u9aAWPwkdn4IclAHTwsFuy0zXmEiIWG+SSGDebKpz6OGXKg/LZ inS8Xs8NkufPAWeosg8oapJ6dPOieKswC/IxkGSL4gthCx0qgwjkh9eLiAqtY2+cXT /hpso2RjWgGuK74GbjrWczWpBtoHUeeC3Enozt9glFDk0pXJdK8zVs6QXXxM5IG40a MMm7qyNiN2ZKhLlfoQqszLzl1ykuA6fjAR5N9vRhAAMd3nsjcz0Mn7aTfirqtyt4ID lSt5Eubtc+/UDGazNZo9eTD1AMBqTrDNjOd9+Zm8oMXJBGw4ZX4w4h+k00x8qKHuef eVKY6iNcLSDsQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B15D0E6C614; Tue, 3 Dec 2024 07:58:04 +0000 (UTC) From: Janne Grunau via B4 Relay Date: Tue, 03 Dec 2024 08:58:01 +0100 Subject: [PATCH v2 5/5] arm64: dts: apple: Add SPI NOR nvram partition to all devices MIME-Version: 1.0 Message-Id: <20241203-asahi-spi-dt-v2-5-cd68bfaf0c84@jannau.net> References: <20241203-asahi-spi-dt-v2-0-cd68bfaf0c84@jannau.net> In-Reply-To: <20241203-asahi-spi-dt-v2-0-cd68bfaf0c84@jannau.net> To: Hector Martin , Sven Peter , Alyssa Rosenzweig , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Janne Grunau , Neal Gompa X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3548; i=j@jannau.net; s=yk2024; h=from:subject:message-id; bh=goZjmxtaAm4HRqmqPpfUIxijslYo2LoyehKKAI0aD84=; b=owGbwMvMwCW2UNrmdq9+ahrjabUkhnS/XVznGWaGH3g0JaF9w6nXjSLmM+ZllfyqPXDlqfZNn ceJn2qsOkpZGMS4GGTFFFmStF92MKyuUYypfRAGM4eVCWQIAxenAEzEdifDX4mlF05ka9zblx+d 8c+lIVXj46YnRyQ3/WyrM+oy7Cq5epOR4XeZ4Dk53f9K3+9cDnWv+f9UfOFCO1leltAZaz6bnZ1 ylRcA X-Developer-Key: i=j@jannau.net; a=openpgp; fpr=8B336A6BE4E5695E89B8532B81E806F586338419 X-Endpoint-Received: by B4 Relay for j@jannau.net/yk2024 with auth_id=264 X-Original-From: Janne Grunau X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241202_235806_574064_236B5A13 X-CRM114-Status: GOOD ( 12.73 ) 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: , Reply-To: j@jannau.net Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Janne Grunau All known M1* and M2* devices use an identical SPI NOR flash configuration with a partition containing a non-volatile key:value storage. Use a .dtsi and include it for every device. The nvram partition parameters itself depend on the version of the installed Apple iboot boot loader. m1n1 will fill in the current values provided by Apple's iboot. Reviewed-by: Neal Gompa Signed-off-by: Janne Grunau --- arch/arm64/boot/dts/apple/spi1-nvram.dtsi | 39 ++++++++++++++++++++++++++ arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi | 2 ++ arch/arm64/boot/dts/apple/t600x-j375.dtsi | 2 ++ arch/arm64/boot/dts/apple/t8103-jxxx.dtsi | 2 ++ arch/arm64/boot/dts/apple/t8112-jxxx.dtsi | 2 ++ 5 files changed, 47 insertions(+) diff --git a/arch/arm64/boot/dts/apple/spi1-nvram.dtsi b/arch/arm64/boot/dts/apple/spi1-nvram.dtsi new file mode 100644 index 0000000000000000000000000000000000000000..3df2fd3993b52884d7c00b65099c88d830a7a4c3 --- /dev/null +++ b/arch/arm64/boot/dts/apple/spi1-nvram.dtsi @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +// +// Devicetree include for common spi-nor nvram flash. +// +// Apple uses a consistent configiguration for the nvram on all known M1* and +// M2* devices. +// +// Copyright The Asahi Linux Contributors + +/ { + aliases { + nvram = &nvram; + }; +}; + +&spi1 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0x0>; + spi-max-frequency = <25000000>; + #address-cells = <1>; + #size-cells = <1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + nvram: partition@700000 { + label = "nvram"; + /* To be filled by the loader */ + reg = <0x0 0x0>; + status = "disabled"; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi b/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi index 2e471dfe43cf885c1234d36bf0e0acfdc4904621..22ebc78e120bf8f0f71fd532e9dce4dcd117bbc6 100644 --- a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi +++ b/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi @@ -119,3 +119,5 @@ sdhci0: mmc@0,0 { &fpwm0 { status = "okay"; }; + +#include "spi1-nvram.dtsi" diff --git a/arch/arm64/boot/dts/apple/t600x-j375.dtsi b/arch/arm64/boot/dts/apple/t600x-j375.dtsi index 1e5a19e49b089d4b3c5e12828b682d1993e35e75..d5b985ad567936111ee5cccc9ca9fc23d01d9edf 100644 --- a/arch/arm64/boot/dts/apple/t600x-j375.dtsi +++ b/arch/arm64/boot/dts/apple/t600x-j375.dtsi @@ -126,3 +126,5 @@ &pcie0_dart_2 { &pcie0_dart_3 { status = "okay"; }; + +#include "spi1-nvram.dtsi" diff --git a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi index 5988a4eb6efaa008c290b1842e0da2aae8052ba4..8e82231acab59ca0bffdcecfb6681f59661fcd96 100644 --- a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi +++ b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi @@ -90,3 +90,5 @@ bluetooth0: bluetooth@0,1 { &nco_clkref { clock-frequency = <900000000>; }; + +#include "spi1-nvram.dtsi" diff --git a/arch/arm64/boot/dts/apple/t8112-jxxx.dtsi b/arch/arm64/boot/dts/apple/t8112-jxxx.dtsi index f5edf61113e7aa869613d672b281f7b7e84efb79..6da35496a4c88dbaba125ebbe8c5a4a428c647c3 100644 --- a/arch/arm64/boot/dts/apple/t8112-jxxx.dtsi +++ b/arch/arm64/boot/dts/apple/t8112-jxxx.dtsi @@ -79,3 +79,5 @@ &i2c3 { &nco_clkref { clock-frequency = <900000000>; }; + +#include "spi1-nvram.dtsi"