From patchwork Mon Nov 21 04:25:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 23530 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1386364wrr; Sun, 20 Nov 2022 20:36:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf7cTRi2T5OOt0zRT0aiLEBMk6dBj81ZqV04vkS3+ZRLkzmbMn/munthYoaq7PNeddxOYQZR X-Received: by 2002:a17:906:144e:b0:78d:cd72:8e3e with SMTP id q14-20020a170906144e00b0078dcd728e3emr13523373ejc.212.1669005416229; Sun, 20 Nov 2022 20:36:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669005416; cv=pass; d=google.com; s=arc-20160816; b=wtQd5I3nfvfQsfC6Nr9YFNiLxgS/c9RZ7d8Aoa2E6VgeTTruskdUasB8z9QYmqoEY7 6bxfzS3+eLS2dEBixx4uSWcEoAMsHvbroXYfkXIrBAEBu7JHDpJCwHqUloAmh0MTg7OJ VoBnAjGc5fQUkxf8FuaeAVrJnKSmMmnHOWKuAEbrPVk5SmdWUChBoGfERGkGZ3xP0kVA pGHGrwInRkO2Yw5OPqhf6IGj8daHupgLxqzVI7kmu/6wO4oZZXtAem4nRgSFrDbRTOdj NryVVfbFX+5hvRRAwKPDfR/+yLSkQu4LqpP8oD5/CCrjyrPtyoGf1FY8klpsVJQr6+nW BeIg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=MQp3Bcww7uwH34e0QnChRkJJwq/5NAzIg0lalgR19co=; b=XMG2xrlHgxHRTwI4mgp2OHE5X/0V50KI04M5aejUHtPowGE1sJ5dr1+31RYz/DJ3X4 Zq9d9Dy2UJ9hz3IWL1jvVrkDZvqwpMKe0Fhwr6LM7BE9UP8XwGTYVucZpXXNAgIjgl3p ZB5mwN3v8qxJTkmbrbvFoBqfLgPqR5oSNxrYfQk5bn3lCN6LWLKqyoikZospcoFpcCfy wdGR+sYW2HdfhH7RXtQd9PrjoOFxfH/jzRC1TCrjRg/3rICj9A/AgrVMKhc2TCq18/FD 5jpT6eQfcv2D6nr1W0YDobvrB9+jpf/6eKk183oETGhDueBYty95WCSHC2+ATdVEfyxV 8K/g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@icenowy.me header.s=zmail header.b=CyMiwpmL; arc=pass (i=1 spf=pass spfdomain=icenowy.me dkim=pass dkdomain=icenowy.me dmarc=pass fromdomain=icenowy.me>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wg6-20020a17090705c600b007a11c253eaasi7472391ejb.809.2022.11.20.20.36.31; Sun, 20 Nov 2022 20:36:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@icenowy.me header.s=zmail header.b=CyMiwpmL; arc=pass (i=1 spf=pass spfdomain=icenowy.me dkim=pass dkdomain=icenowy.me dmarc=pass fromdomain=icenowy.me>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229502AbiKUE0S (ORCPT + 99 others); Sun, 20 Nov 2022 23:26:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229726AbiKUE0K (ORCPT ); Sun, 20 Nov 2022 23:26:10 -0500 Received: from sender4-op-o18.zoho.com (sender4-op-o18.zoho.com [136.143.188.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCD25248E3; Sun, 20 Nov 2022 20:26:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669004756; cv=none; d=zohomail.com; s=zohoarc; b=NtsxhcrC2wzFQZOlFCxsJZPDDQFKsEBsNkR7UEv2lxf1ucCsV6yrCYhh5KpYYqKz9dXzLtTIVnWlL5Mz6dJhA/OzEp02o+b/A7Tv/LKFcZR6Ec3TT/Ysv8hDTbRzueyc3XnzFrMzSLaSjqQw5N4vsytluBpKgx9nRFhd9Q7UcMk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669004756; h=Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=MQp3Bcww7uwH34e0QnChRkJJwq/5NAzIg0lalgR19co=; b=I4pi6Ji0iUgRMNAS9d4rKn2cf4HlU+ux9mYoa9D4f3654iieJgQgvBBXsRJJBKzKSNhihIFBkB4LzZu9Pq+PkiKpvLu6l4VZt6C/Ar97DkWi23mpcVyteZw5sUsW4gV3ojCS8SsnLxWy2dRcumfgGxjtcKqnFsy1sM9ChaFtuXU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=icenowy.me; spf=pass smtp.mailfrom=uwu@icenowy.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1669004756; s=zmail; d=icenowy.me; i=uwu@icenowy.me; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=MQp3Bcww7uwH34e0QnChRkJJwq/5NAzIg0lalgR19co=; b=CyMiwpmLl7/Whx6Sai27+Bqy58g7Yq2HjxGs92yFF6og+Ltfq2e5UtRruKwRP5a4 9YdwTka9zZa0npfTQxcLi1x9R7pk/zrqPui33H7+1q0FvC2+40limBgXpOFq/BjBNrI 386P/oCMKY+XZ0LA49IkIgeDKrSB5iHWO+mFM8Tg= Received: from edelgard.fodlan.icenowy.me (112.94.100.29 [112.94.100.29]) by mx.zohomail.com with SMTPS id 1669004754310175.0741417958027; Sun, 20 Nov 2022 20:25:54 -0800 (PST) From: Icenowy Zheng To: Daniel Lezcano , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Karol Gugala , Mateusz Holenko , Gabriel Somlo , Joel Stanley Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Icenowy Zheng Subject: [PATCH 1/2] dt-bindings: timer: add a binding for LiteX Timer Date: Mon, 21 Nov 2022 12:25:44 +0800 Message-Id: <20221121042545.421532-1-uwu@icenowy.me> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 X-ZohoMailClient: External X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLACK autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750079023368949139?= X-GMAIL-MSGID: =?utf-8?q?1750079023368949139?= The LiteX SoC generator has a timer core, which by default only generates a simple down counter. Add a DT binding for it. Signed-off-by: Icenowy Zheng --- .../bindings/timer/litex,timer.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/litex,timer.yaml diff --git a/Documentation/devicetree/bindings/timer/litex,timer.yaml b/Documentation/devicetree/bindings/timer/litex,timer.yaml new file mode 100644 index 000000000000..bece07586c6b --- /dev/null +++ b/Documentation/devicetree/bindings/timer/litex,timer.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/timer/litex,timer.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: LiteX Timer + +maintainers: + - Icenowy Zheng + +description: | + The LiteX Timer is a count-down timer that is defaultly embedded + into all LiteX SoCs, unless explicitly disabled. It's fed directly + by the system clock like other LiteX peripherals. + +properties: + compatible: + const: litex,timer + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + litex,width: + description: + The width of the timer's value, specified as the width argument + when creating an instance of litex.soc.cores.Timer. + +required: + - compatible + - reg + - interrupts + - clocks + - litex,width + +additionalProperties: false + +examples: + - | + timer@a0006000 { + compatible = "litex,timer"; + reg = <0xa0006000 0x20>; + clocks = <&sys_clk>; + interrupts = <17>; + litex,width = <32>; + };