From patchwork Mon May 24 18:27:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Peter X-Patchwork-Id: 12277403 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-22.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7464BC2B9F7 for ; Tue, 25 May 2021 00:49:12 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 327D3613BF for ; Tue, 25 May 2021 00:49:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 327D3613BF Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=svenpeter.dev Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VGJ4XFjZCTeLh5pEoyKDNVDLbIQuR/rhSDXQEKIGmnw=; b=iqtiRKNOpqcBhy UrY2mJJ0a4ksD+NkleO/N3bu1DnlM5AdD6qneADiv/MCPRs8iofgDT9pqz8lX91tX1cAoR7qXplTP jCfsOr8TgexQrcV/bZAyARrUJNLmfOTQ4Xc8c2YVgPSEncemGS2CoQYxVgCE8Blo2RGx+F5t7q9NK +OcnSjf84FSZY9oHcBfPRWLFni34lO976RBauHIopbsioCnWEyMjXlv0ZOnYnUzc/WknZpzT/UZgZ jk+gOaEBVLKFPmxd8fpHPArndCeVzlExyVwJ/fYFAtfvL0nBmNncGTD+YoNsjGfFakxHoEUwMrvZg K7chjgGDVrq3ZYOqpf9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1llLDg-002d3Z-0u; Tue, 25 May 2021 00:46:53 +0000 Received: from new3-smtp.messagingengine.com ([66.111.4.229]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1llFJ7-001SJV-PU for linux-arm-kernel@lists.infradead.org; Mon, 24 May 2021 18:28:07 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 74F56581E72; Mon, 24 May 2021 14:28:00 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 24 May 2021 14:28:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svenpeter.dev; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=LwSKq/ex842eG i/egnj5f1CpSQ34FFJ9YcYzjun5nOQ=; b=2MVTAWaPVPvNHvFg2rYWvao0Ur3wo ATIE+7KWNKWNA+F+sKfMXbkH2tMQXSUDsvFrSPi39VDZ10GxwMk34ddLQ/G3vN88 LiXqwIA+pgD5WLNydG0z0ZNxz6LRIyzDiLytVNM3UvJt59hFZEueb+bc/Ln77Aby isvHPE7idQ9WuJ8nNRdWroUo7gQtzstmdQ4w3rGusuhUSch+yIBlr85toK6KK0Iv 1j3sf3YvK1dFlsCdicBA+tKJc++tUHCFNsTncyZmT8obdrTLYPkouQm/HT68OmH6 WukCJPSEM7eGwz6bAOWH3z88KeKT14azDfkAukB20IvvbF8N+0faKwcww== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=LwSKq/ex842eGi/egnj5f1CpSQ34FFJ9YcYzjun5nOQ=; b=jaETDRqV GFXmd92DPk5LEAYmrFUMayOm2reliCekKQaKQLuhqeyIweALc5GnoTpTNiN4sAbD N5h5U8gYbycPEZtk1Jy6QVKxnefdN0Jzm3hk5fF7A5XD0LRTD7n/DUmxXxNkbcHA GMamD92SzXBIxRwFGwVytpCqsS+Fpa2eMFiS6cYvJ0Vu48J0RhpRITUW8HUO8HYD bLeWBdvdPC3MOkvhW+kjtBbYuqxSGa2rmrmBYhOuGEKzOD2msUXr4JjriahsIPtr ShaNZprd5lYyuXDY5KHRjfCoQ2He4sUOPjwuElzOmI0TeXxA1y96rJ2Hij238nWV 7OJ76bjjq2Ux+Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdejledguddvjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufhvvghn ucfrvghtvghruceoshhvvghnsehsvhgvnhhpvghtvghrrdguvghvqeenucggtffrrghtth gvrhhnpeefgefhgeelhefhtedvuddvudehffffgffftedugeeufeevtdegudfhjeeuieeu hfenucffohhmrghinhepuggvvhhitggvthhrvggvrdhorhhgpdhgihhthhhusgdrtghomh dpfhhrvggvnhhouggvrdhnvghtnecukfhppedujeeirdduleelrddvuddurdduvdegnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshhvvghnse hsvhgvnhhpvghtvghrrdguvghv X-ME-Proxy: Received: from photon.s7r42.com (ip-176-199-211-124.hsi06.unitymediagroup.de [176.199.211.124]) by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 May 2021 14:27:58 -0400 (EDT) From: Sven Peter To: devicetree@vger.kernel.org, linux-clk@vger.kernel.org Cc: Sven Peter , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hector Martin , Michael Turquette , Rob Herring , Stephen Boyd , Mark Kettenis , Arnd Bergmann Subject: [PATCH 1/3] dt-bindings: clock: add DT bindings for apple,gate-clock Date: Mon, 24 May 2021 20:27:43 +0200 Message-Id: <20210524182745.22923-2-sven@svenpeter.dev> X-Mailer: git-send-email 2.30.1 (Apple Git-130) In-Reply-To: <20210524182745.22923-1-sven@svenpeter.dev> References: <20210524182745.22923-1-sven@svenpeter.dev> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210524_112806_034355_82775D01 X-CRM114-Status: GOOD ( 14.63 ) 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 These gated clocks are found on Apple SoCs, such as the M1, and are required to enable access to MMIO regions of various peripherals. Signed-off-by: Sven Peter --- .../bindings/clock/apple,gate-clock.yaml | 60 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 61 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/apple,gate-clock.yaml diff --git a/Documentation/devicetree/bindings/clock/apple,gate-clock.yaml b/Documentation/devicetree/bindings/clock/apple,gate-clock.yaml new file mode 100644 index 000000000000..3aae47c40b42 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/apple,gate-clock.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/apple,gate-clock.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Binding for Apple clock gates + +maintainers: + - Sven Peter + +description: | + Apple SoC's such as the M1 contain various clock gates. + These clock gates do not have a frequency associated with them and are only + used to power on/off various peripherals. Generally, a clock gate needs to + be enabled before the respective MMIO region can be accessed. + + Each clock gate is configured by a single 32bit MMIO register which contains + the actual and the target state. The state is encoded as four bits but + right now only "powered on" / 0b1111 and "powered off" / 0b0000 are used. + + +properties: + compatible: + enum: + - apple,t8103-gate-clock + - apple,gate-clock + + "#clock-cells": + const: 0 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + maxItems: 1 + + clock-output-names: + maxItems: 1 + +required: + - compatible + - reg + - clock-output-names + - "#clock-cells" + +additionalProperties: false + +examples: + - | + clock@3b7001c0 { + compatible = "apple,t8103-gate-clock"; + reg = <0x3b7001c0 0x4>; + #clock-cells = <0>; + clock-output-names = "sio_busif_clk"; + }; +... diff --git a/MAINTAINERS b/MAINTAINERS index 008fcad7ac00..59c026ce4d73 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1654,6 +1654,7 @@ B: https://github.com/AsahiLinux/linux/issues C: irc://chat.freenode.net/asahi-dev T: git https://github.com/AsahiLinux/linux.git F: Documentation/devicetree/bindings/arm/apple.yaml +F: Documentation/devicetree/bindings/clock/apple,gate-clock.yaml F: Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml F: arch/arm64/boot/dts/apple/ F: drivers/irqchip/irq-apple-aic.c