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 = , ,