From patchwork Thu May 15 06:21:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Peter via B4 Relay X-Patchwork-Id: 890525 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BFCFA291144; Thu, 15 May 2025 06:22:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747290134; cv=none; b=eqHaQVAm58bI8HgmUnkuX/e2rWKD4TErCUfc/gbQaOntY6D1GWpHENywhWc4Gzczgx2lFAGURNgSxuw59YV0Dgs7lQPb3rBRs5Hy0L0R4dbZE+zuDUSk3Kf4UVQoxHH6z/pWmq66xP6acWnSUdeYAdVh7IttO242zSLANx0tHis= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747290134; c=relaxed/simple; bh=rk8j/Cmwc/wa16L9N0+5mRLDR8x8/Ue92XMxES+t57g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=b//GTZXmGtE5TXUoDdzt1BeBUQptG/3f9yVwZpodetHTaaci24o0ht5mHq7ZCOqGVgPZZyS3pgxUcPJPENIk0v9nNRiFSyxku0A4qNiqfVkEkt9CToAZ9Z+PFAuBcyX9x9jOb2azPrfF2sLOkE9m9wkPANjGqQVw3/kl+UmeOHE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hgSNLiGK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hgSNLiGK" Received: by smtp.kernel.org (Postfix) with ESMTPS id 4F25CC4CEF2; Thu, 15 May 2025 06:22:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747290134; bh=rk8j/Cmwc/wa16L9N0+5mRLDR8x8/Ue92XMxES+t57g=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=hgSNLiGKEwrUV7xoXuj81eIMbpXkBr2MufXDFW5GOaSVp7f766L3J04dMsT8nqVOX Iumld148DoGgbf59PUXfcfpucb0NyyuzlzhWfjP8NzUgd4ZVaz5UKZu3gS5bVqRNH2 obxPhXpWHfrqYqx3fcS8ZjZ+kI7WVw3Bd613BUZTmDmDBRxY3tVOjElQLwAfqSI8xl Xk/sV1VDagjDyyJH3qDeyeCsCB7aqg/Al/JKcjf70ABTX1E4F8jviEg/+iaJcbhBFO iWY+JZhjdl6PXVPWMtF7XGupzUN4qTSZONC+9C7GqYa4rAkuntYZl13lpT0PpFkOkC tNPAbUdNCgqGQ== 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 461A2C54756; Thu, 15 May 2025 06:22:14 +0000 (UTC) From: Sven Peter via B4 Relay Date: Thu, 15 May 2025 06:21:15 +0000 Subject: [PATCH v6 03/10] dt-bindings: mfd: Add Apple Mac System Management Controller Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250515-smc-6-15-v6-3-c47b1ef4b0ae@svenpeter.dev> References: <20250515-smc-6-15-v6-0-c47b1ef4b0ae@svenpeter.dev> In-Reply-To: <20250515-smc-6-15-v6-0-c47b1ef4b0ae@svenpeter.dev> To: Sven Peter , Janne Grunau , Alyssa Rosenzweig , Neal Gompa , Hector Martin , Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sebastian Reichel , Lee Jones , Marc Zyngier , "Russell King (Oracle)" Cc: asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3518; i=sven@svenpeter.dev; h=from:subject:message-id; bh=24GvFN6ibXD4G73jz0oF1G3/fyuiC8WVouHqMv8StLw=; b=owGbwMvMwCHmIlirolUq95LxtFoSQ4ZqB9fBZ2K12x/ufr+hQvX0tV3KPwXPvvxe+DexTnOPx ZEbS6N+dZSyMIhxMMiKKbJs329v+uThG8Glmy69h5nDygQyhIGLUwAmcusoI8PzBWcnPbpvrOZg sbQ06MOZY/W/j+UWMR5SqCt8Y72t+2I3w38nTdHf0+PLAt6uXb0o8rVEwH72ypx1Okbv2peYyNW ls7ACAA== X-Developer-Key: i=sven@svenpeter.dev; a=openpgp; fpr=A1E3E34A2B3C820DBC4955E5993B08092F131F93 X-Endpoint-Received: by B4 Relay for sven@svenpeter.dev/default with auth_id=167 X-Original-From: Sven Peter Reply-To: sven@svenpeter.dev From: "Russell King (Oracle)" Add a DT binding for the Apple Mac System Management Controller. Signed-off-by: Russell King (Oracle) Reviewed-by: Linus Walleij Reviewed-by: Krzysztof Kozlowski Reviewed-by: Alyssa Rosenzweig Reviewed-by: Neal Gompa Signed-off-by: Sven Peter --- .../devicetree/bindings/mfd/apple,smc.yaml | 79 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 80 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/apple,smc.yaml b/Documentation/devicetree/bindings/mfd/apple,smc.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1937fb3d2578dcf69991e83095e3e1e29958ef37 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/apple,smc.yaml @@ -0,0 +1,79 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/apple,smc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple Mac System Management Controller + +maintainers: + - Sven Peter + +description: + Apple Mac System Management Controller implements various functions + such as GPIO, RTC, power, reboot. + +properties: + compatible: + items: + - enum: + - apple,t6000-smc + - apple,t8103-smc + - apple,t8112-smc + - const: apple,smc + + reg: + items: + - description: SMC area + - description: SRAM area + + reg-names: + items: + - const: smc + - const: sram + + mboxes: + maxItems: 1 + + gpio: + $ref: /schemas/gpio/apple,smc-gpio.yaml + + reboot: + $ref: /schemas/power/reset/apple,smc-reboot.yaml + +additionalProperties: false + +required: + - compatible + - reg + - reg-names + - mboxes + +examples: + - | + soc { + #address-cells = <2>; + #size-cells = <2>; + + smc@23e400000 { + compatible = "apple,t8103-smc", "apple,smc"; + reg = <0x2 0x3e400000 0x0 0x4000>, + <0x2 0x3fe00000 0x0 0x100000>; + reg-names = "smc", "sram"; + mboxes = <&smc_mbox>; + + smc_gpio: gpio { + compatible = "apple,smc-gpio"; + gpio-controller; + #gpio-cells = <2>; + }; + + reboot { + compatible = "apple,smc-reboot"; + nvmem-cells = <&shutdown_flag>, <&boot_stage>, + <&boot_error_count>, <&panic_count>; + nvmem-cell-names = "shutdown_flag", "boot_stage", + "boot_error_count", "panic_count"; + }; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 3f32d028ab49994a0da9f3882f37b9c3b183f5b4..27caedc40262ee9b9fdb6478f7624422517375a7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2275,6 +2275,7 @@ F: Documentation/devicetree/bindings/iommu/apple,dart.yaml F: Documentation/devicetree/bindings/iommu/apple,sart.yaml F: Documentation/devicetree/bindings/leds/backlight/apple,dwi-bl.yaml F: Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml +F: Documentation/devicetree/bindings/mfd/apple,smc.yaml F: Documentation/devicetree/bindings/net/bluetooth/brcm,bcm4377-bluetooth.yaml F: Documentation/devicetree/bindings/nvme/apple,nvme-ans.yaml F: Documentation/devicetree/bindings/nvmem/apple,efuses.yaml