From patchwork Fri Oct 28 11:53:53 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: 13023487 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 A7796ECAAA1 for ; Fri, 28 Oct 2022 11:55: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: 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=nPaK7Op17953Yo9KQZ5QoHiGXvMkoZoYeK5HpSl7cfM=; b=EjyTWDw5/XYJ42 +dxqpZ8bJJJr9+s405qkTkDtajkJ7NpobgQgKmL7kkF1jnSwleyCbczRgyr2cKASP7oKuaX52acI/ GUFO93hmaU/2hNlEDMBSY7YNIU8TFXINMkQ6woF2hQQqhI8TlfPW4EOSEKHgWKZYOJX5GnN1+LM48 EMyOByKw21WdqbcPv3czgJeFcHYuXJpePDrKK8QaKGDWAjy1RCBWgTf8szRimFskeDalSpCrpaW1D qpxoO4UshE+t5gKyCCDXqyjOuSMZRsf1rVjb2ceHjWXEEgAvShR4ud/02BxIHGlCN/G+seWYtPUTm kdBMgAV9ajs4e+PTicDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooNw8-00H1nG-Ab; Fri, 28 Oct 2022 11:54:08 +0000 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooNw5-00H1mm-7g for linux-arm-kernel@lists.infradead.org; Fri, 28 Oct 2022 11:54:06 +0000 Received: by mail-lj1-x22e.google.com with SMTP id o4so8043153ljp.8 for ; Fri, 28 Oct 2022 04:54:04 -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=DEZSt98hHSJj7cf3ZfqmR5bgvqaU3IveLeY72/BlhHM=; b=n3mXmmdPYLbcZwTjjbD35qbIkWS6kej00R5A+lGE1tmr3Cea4M+NBNBTPXGQE32C8k Ft9VjTGATSIV3ibgZ8HhQlWTSVL3IKZ+SYt2HQLEAGaPCOPt8MBnK7Kw/jlw9dJVsGOs sDLnD4iq11ObEsUO7ZV4VemC7WphqbEux9Jg0Tk6p8DNeXqCem66Q4+DVev3/rQldPTs jcX0LHwnbAXRapYh6uzGlrz7xNJ0sqE6XzRTkmoQB0vJNO7nbWwdAr7ABLFFC6ADhS/b 8xTd+oNkxiFhtDpOl50xXHJIVmCtjbJ7FpNlxyH8yzUbBPRUVu4qK2yxz/MyHKzD15EP LQBg== 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=DEZSt98hHSJj7cf3ZfqmR5bgvqaU3IveLeY72/BlhHM=; b=GR+m+2vqXBO4sH6TnnTu8nnDQCqy0U2eR6tASmqelAl810eFrcRxQr4CCEotmvUTEy 3Eic0V8AWUYOr0tD+Cp0k5R8+zkwsxJvLR8Tt4LH22lTvbwKfJTDJl8HnOAIBGpYnMvb lTl1UgQvbMsY69xyYHdm2HMaTp206N/Ooewz8oJp5LtQQXDDoS8Ncq0KYodzAfOG8uMt 9mwOFRlSar7sevxXjZ74l0zGXe9Rrg7ZEV3OF2/rsPZefIV1vjMmhJT7qhMi7ItFP557 KLuTgOajH6b7OLokOMCcE27FrOQ0MA+7GcDmiYNTRhGqv7WIyrVNC0Ug2mPPjDaYIq99 LTdw== X-Gm-Message-State: ACrzQf30658nl4vnzCImzQLdplSTKFPmuKxe45IU8zZT4wu6fNkJQ766 6B0G2SJ7tADByrIMdMHGBEo= X-Google-Smtp-Source: AMsMyM6JPLADSazrdgIgAPcIABfjySF4B8wwvnumUewjzSeeebtNeJMWAyzOBBwjWlxaSzWNl3T63g== X-Received: by 2002:a2e:bd0b:0:b0:26d:ffdc:120f with SMTP id n11-20020a2ebd0b000000b0026dffdc120fmr20457897ljq.526.1666958042752; Fri, 28 Oct 2022 04:54:02 -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 v11-20020ac258eb000000b0049f5c71f1c4sm536552lfo.198.2022.10.28.04.54.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 04:54:02 -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 V2] dt-bindings: timer: add Broadcom's BCMBCA timers Date: Fri, 28 Oct 2022 13:53:53 +0200 Message-Id: <20221028115353.13881-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_045405_317341_2F3E0E3A X-CRM114-Status: GOOD ( 18.78 ) 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 Reviewed-by: Krzysztof Kozlowski --- V2: Limit to 1 example (they were almost the same) Drop "," in "e.g.," --- .../devicetree/bindings/mfd/brcm,twd.yaml | 8 ++++ .../bindings/timer/brcm,bcmbca-timer.yaml | 40 +++++++++++++++++++ 2 files changed, 48 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..6707d9760857 --- /dev/null +++ b/Documentation/devicetree/bindings/timer/brcm,bcmbca-timer.yaml @@ -0,0 +1,40 @@ +# 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>; + };