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