From patchwork Fri Oct 28 09:54:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 13023349 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 EF182ECAAA1 for ; Fri, 28 Oct 2022 10:02:31 +0000 (UTC) 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: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:In-Reply-To:References: List-Owner; bh=PnrXQsI81//PNgdp7u5zIE7sUNeNfmMyXpQ/0+3pi7g=; b=3HO6LmJiiRVw09 IGUFikB+bpd9x+hMOrTDXKWViFOpqk7JUe61e8bOU4fro/O5/6LUI+8FCGioJGUZ5m5bGUYBHlcQ/ MoVuVKA9waY8tv5gEyBXAzUmgMjH9vI2xSXL0E8/dMLUSxWg11zrK0pIYx7FTHon3LrpSVLEwD4zY joVx+WAyuxRmW4MCH7E8341m5qk9nlgfZoGGuUUmM/rMJnFtUkREqpHB9btTbeljsaEUNfB8Cvc6v 1bt2Th5sJzvuP3mKAa762l6IWZtq5KMWYXGjQelRWi5k25FUTdQlx8YJLHB2Hhu+dJoUAsEM+dvW0 AGQU9HzYqM+RP4f2Na1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooMAs-00GV2X-7m; Fri, 28 Oct 2022 10:01:14 +0000 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooM4T-00GSLa-V0 for linux-arm-kernel@lists.infradead.org; Fri, 28 Oct 2022 09:54:39 +0000 Received: by mail-ed1-x534.google.com with SMTP id f7so1434980edc.6 for ; Fri, 28 Oct 2022 02:54:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=nmdVHdb0604svJdIsRaVukZi9ahZ7H2UV4HkwxeskFk=; b=JHy028xSipvYsrvmbs4y9KHaTCwLsFw/PY3zKDKbC2VeIhqNGRnj2XIn5JgpcWpAko /37Wr3ZMBagFhYyBvLl5ISIlh/cnYRB2fz8SxOvc9sNvuyodfZKjVUlJScWUKAr81Ywt up2s54mqKYI7aunqAsP4l7jgeEKzuOEUQqYAE+UrdaPD7ABB234gYNRp1ef1668OQZS0 Gr62KSEKhm9c5b7UPeVRHzZ/FNAgUAF4j5UszMOMVDAqnrz2IDY8/ZEoFNPYNtaCzHER IZbYtIQP8qDWjU77ys8lhLvIMjb1T4oKE7YAdQzoq3Il8pe2VoYBhJjTClNs+tiPzr6H Ig3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nmdVHdb0604svJdIsRaVukZi9ahZ7H2UV4HkwxeskFk=; b=nigmqaGXEFOtoOkprlD66K4IGhAm8bwMeIGjGN8joEb5ujO6/2jqt+pcpAhCKKIxxg buPlFoJtR1Pp35idNvLVu7W22KV5pZ+645zU47jkZqyUIujIGPkLQhWvYql9m/wxGQhr GXLnj2FMNtFOL+0hweA7ntKexn9iNMWxJW3yM/XrI64UM0gCGQgDxV/BAJbJ6nkTyQeU tpwLOMw3ydl68ez2p8ZzQr1oIvG0Pist6hV2PNgqB2ehg/8e5urBRefvSd0otDzPDsWj xg6XvYnXsuQFDInnH/mPJoQRb6wf+NrdXc68V9isxRKMMnznaMk7NuS7qRMR4UTFUXwl PE6w== X-Gm-Message-State: ACrzQf26S99UHB89ooDrrSenJxbP/yoxJUeVamz7NiVci+B+Osp+zcvV G0rePciL3R0DvCKlS8JTXG8= X-Google-Smtp-Source: AMsMyM4YPNxgtZVn81kP0Q9BvvV2MSxeepP/juFSeBKEUzdh1n1fSuPrCvzUxbL2oa2fJtdveXdRXg== X-Received: by 2002:a05:6402:3510:b0:461:f781:6dfe with SMTP id b16-20020a056402351000b00461f7816dfemr19358251edd.272.1666950873636; Fri, 28 Oct 2022 02:54:33 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id 10-20020a170906328a00b00772061034dbsm1968245ejw.182.2022.10.28.02.54.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 02:54:33 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Rob Herring , Krzysztof Kozlowski Cc: Daniel Lezcano , Thomas Gleixner , Lee Jones , William Zhang , Anand Gore , Kursad Oney , Florian Fainelli , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH] dt-bindings: timer: add Broadcom's BCMBCA timers Date: Fri, 28 Oct 2022 11:54:19 +0200 Message-Id: <20221028095419.6036-1-zajec5@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221028_025438_068504_A9C92018 X-CRM114-Status: GOOD ( 18.10 ) 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 From: Rafał Miłecki BCA is a big set / family of Broadcom devices sharing multiple hardware blocks. One of them is timer that actually exists in two versions. It's a part of TWD MFD block. Add binding for it so SoCs can be properly described. Linux (and probably any other OS) doesn't really seem to need a driver for it. it may be needed for bootloaders (e.g., U-Boot) though. Especially for SoCs with CPUs other than Cortex-A9 (which contains arch timers). Signed-off-by: Rafał Miłecki --- .../devicetree/bindings/mfd/brcm,twd.yaml | 8 ++++ .../bindings/timer/brcm,bcmbca-timer.yaml | 45 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/brcm,bcmbca-timer.yaml diff --git a/Documentation/devicetree/bindings/mfd/brcm,twd.yaml b/Documentation/devicetree/bindings/mfd/brcm,twd.yaml index 634526f790b8..e5136a37b0a3 100644 --- a/Documentation/devicetree/bindings/mfd/brcm,twd.yaml +++ b/Documentation/devicetree/bindings/mfd/brcm,twd.yaml @@ -36,6 +36,9 @@ properties: const: 1 patternProperties: + '^timer@[a-f0-9]+$': + $ref: /schemas/timer/brcm,bcmbca-timer.yaml + '^watchdog@[a-f0-9]+$': $ref: /schemas/watchdog/brcm,bcm7038-wdt.yaml @@ -54,6 +57,11 @@ examples: #address-cells = <1>; #size-cells = <1>; + timer@0 { + compatible = "brcm,bcm63138-timer"; + reg = <0x0 0x28>; + }; + watchdog@28 { compatible = "brcm,bcm7038-wdt"; reg = <0x28 0x8>; diff --git a/Documentation/devicetree/bindings/timer/brcm,bcmbca-timer.yaml b/Documentation/devicetree/bindings/timer/brcm,bcmbca-timer.yaml new file mode 100644 index 000000000000..7061f52bcb8a --- /dev/null +++ b/Documentation/devicetree/bindings/timer/brcm,bcmbca-timer.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/timer/brcm,bcmbca-timer.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom Broadband SoC timer + +maintainers: + - Rafał Miłecki + +properties: + compatible: + oneOf: + - const: brcm,bcm6345-timer + description: > + An old block with 3 timers. + + It can be found in BCM6345, BCM6838 and BCM63268. + - const: brcm,bcm63138-timer + description: > + Updated block with 4 timers and control regs at the beginning. + + It can be found in newer SoCs, e.g., BCM63138, BCM63148, BCM63381, + BCM68360, BCM6848, BCM6858, BCM4908. + + reg: + maxItems: 1 + +additionalProperties: false + +required: + - reg + +examples: + - | + timer@fffe0200 { + compatible = "brcm,bcm6345-timer"; + reg = <0xfffe0200 0x1c>; + }; + - | + timer@fffe8080 { + compatible = "brcm,bcm63138-timer"; + reg = <0xfffe8080 0x28>; + };