From mboxrd@z Thu Jan 1 00:00:00 1970 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=-17.5 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,MSGID_FROM_MTA_HEADER,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 B645AC432BE for ; Thu, 26 Aug 2021 21:21:34 +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 6996360EAF for ; Thu, 26 Aug 2021 21:21:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6996360EAF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=seco.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=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: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=QEDbAGezzHP5d9QsjMp9rCDv/CE/QnX9WcIJ52CYeAU=; b=ZYDiDrgjpjLMit lKLLcUkgJGY7uyRyyqWeVohDB+AHpSssspYy1aiylb7aHjBzGI9tpNIFCaJ7ytvJZI1+ebjAu35zd ZhF0JeIjHfue1SUVa+wEqu57oWrb8GBTfjQU3PIAee+IKbCf5NXveLrq2N8QAZZYTCVuUKl0/M5ZI w4eLbtFMpCsy8fTv5AZetawSDnLSjiAGfOMaXjcyAPPAXuIvmXhgO0grjT3Aq7hSAenDlHDqvXJNn hPWIi0EnU6tCDMZXE1/fgm0EqvZ4sSHHRHQ3YBtHiO7qrA54JcUyHnGWVkG1/WfYj00bQ5dyXbOjP di0MVJP2DfXhKqd5tbqA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mJMlx-00Av0V-4b; Thu, 26 Aug 2021 21:18:53 +0000 Received: from mail-eopbgr80084.outbound.protection.outlook.com ([40.107.8.84] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mJMlq-00AuyL-OZ for linux-arm-kernel@lists.infradead.org; Thu, 26 Aug 2021 21:18:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MBYST5239Li6Kz2BrqHGn3dqTHyMjl+yom2PXswl/g/R8g9EBb4iiH+gIfBocn9xAy9Jvxw5OZ1kF/5lwG1XmCni6NLwl7zaURH+XvAFswIsAIhWog0jJR7i57pQIupr5ZGEk8XBbd14ub8znpadwZtz4vlZ3iUrNM9+4YhcstbFuKUVm/ch0gRk8JD5wGG0qedzUKvp47Nb8/STFK0dxe9Os7yyUdawGGeOOomVzwfUEJKk5V3f2ONarprzRGYJQhVv+GDY/lCysawseF9nqC5KTs77r9N6gDYoZt7OEl7gpOKuKuht76W6uG2hl/IFRCYkLwA9a2n+2NdRm/I/FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FkpsHXFmnCZxjsuFlqpUXqJIWrypXB/Px1dml5a1ahM=; b=KOA3OlOCFSOeIyA60edcdRsIErudf1Ne5hVk8MP+/qKIVPaDdlIpaCbAfBj7Vz0GLt1LbbsRHeW9TH8rbjfmUEvb5HJZwyj/RRStmU9wLA9zmFm4qCaDJnTugGEO7ZPvYj/aI+j7TaMdoLQjbV2y1Lu5ekRX8W9DclYl8/RmQVURY8kzZxutzVS1n89QUE+oAL/tLOonRKPTf7QSMAkpcrPPTKV+anp0+C+iiUAupAne/DhznFFZhWwFH8ZB4pPfzpK2V30QeZJm7sJvPLG7JZF/svF67zKMElLv2T4lyN6dUah89E9ACS+dar2RbFDyRt7IBSbSWdlduLbmEfDf1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secospa.onmicrosoft.com; s=selector2-secospa-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FkpsHXFmnCZxjsuFlqpUXqJIWrypXB/Px1dml5a1ahM=; b=N15T996vB5gLJUKc1H4MZQDd7IWbowEE25lewBKxc9Nzg4lSnVUVdCuFnfCczVeLEDyc4e0okJCNkN3JE5XWS5GHiC2IrVbN8FGZ8rP1w3GcHIurO1XZJpgSFBwgV/xoLUCLOvf4tGEtF8R/E1CAjutGxvVLLxemhIPOJ+HD/RA= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) by DB6PR0301MB2182.eurprd03.prod.outlook.com (2603:10a6:4:49::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.22; Thu, 26 Aug 2021 21:18:40 +0000 Received: from DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::dc6c:815b:2062:d1f1]) by DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::dc6c:815b:2062:d1f1%7]) with mapi id 15.20.4436.025; Thu, 26 Aug 2021 21:18:40 +0000 From: Sean Anderson To: linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, Thierry Reding Cc: Alvaro Gamez , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-arm-kernel@lists.infradead.org, Lee Jones , michal.simek@xilinx.com, linux-kernel@vger.kernel.org, Sean Anderson , Rob Herring Subject: [PATCH v6 1/3] dt-bindings: pwm: Add Xilinx AXI Timer Date: Thu, 26 Aug 2021 17:18:28 -0400 Message-Id: <20210826211830.3311140-1-sean.anderson@seco.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: MN2PR06CA0016.namprd06.prod.outlook.com (2603:10b6:208:23d::21) To DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from plantagenet.inhand.com (50.195.82.171) by MN2PR06CA0016.namprd06.prod.outlook.com (2603:10b6:208:23d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.21 via Frontend Transport; Thu, 26 Aug 2021 21:18:39 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b58a0555-7e22-47ae-b0d6-08d968d71379 X-MS-TrafficTypeDiagnostic: DB6PR0301MB2182: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oJh3Qo11Y4B2EGpGGC1z3KDSU3NnUUuyVohvlzFlitMfLzYWtXJCdQNRTu1BAO66MvU261/Waqlbn5gqFuXmC/jhl/uZE3rOovX1RMLzE3fB7sfN3NkEuEYjFP/VC3QeTcHYBvOKkFb5mS71lU1w3+AzZkRAiXASdRky78Kblkv7ycgQ2LTd/1vO06iD8lODSlmlK1QcjSD21sSoIDV3zepSSoOgF4gQc5lKLeHobJWww5IGKnC6u6gVcb/6+RKD8kqKKreZkq42UYVxl8+jlWShEmeMG7skbXhw/lLT013UrL5eQ7Dj7HFHxJuF0VnLE0jU5C2FXiDlTc6xtAA7hU8ErrKTB8wkYehbNOKI8hA/hCBloeKk/qkzx8N+0WOBDgKQjMThwt/g0gvvVkbEgP57N8Dh8iIUjLB2KQro4secB4EvEo6UiLEy5wZCkfCO1JkIWcajOCnHhoazi4KGdYzB2+23yjDGn4Eao/MQhAibKLXwVO4zFxyakf3q5bmsnolrPUddgnD4w26xXCjhnoEh1PJ/5avgM6zcboXtBtrfXCcwNsZTGjDpG4/xHvLBj5MtWT03/nj8RV/145TSuWAQKqj1K6HYMMH9AVwTSnCoxBw1gU0wqhJCv3MfqR081fLL+INlGl55f5juAcBOhDvR6XacAslvBI4NSdtjkNxOGDCywaq15gCjbuFPTS5Hu0PvhQ5KUCK/zVjhaMCYbTetzL3HzX9mEMC6U5UXJmJy0CFfoQoBVuzW9Rkvs0Mb8MayWpVBCdQNyhpc24E3KyoxaC3BC31CMxCiPNUZMkI= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB7PR03MB4523.eurprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(346002)(376002)(396003)(366004)(136003)(39840400004)(36756003)(5660300002)(38100700002)(6506007)(38350700002)(966005)(44832011)(478600001)(83380400001)(6916009)(316002)(2616005)(26005)(86362001)(54906003)(6512007)(956004)(6486002)(66946007)(1076003)(8676002)(8936002)(6666004)(7416002)(4326008)(2906002)(186003)(66476007)(52116002)(66556008); DIR:OUT; SFP:1101;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J+0NYFU5LkJDq/zBxm3jKo+jGBNgeRrR?= =?us-ascii?Q?f8yd+IY5FOSnERN5od98Vx9JqvNKt1EMP9c+35UnzR2WXmVPulJovea7+2S3?= =?us-ascii?Q?UWwiP4UzCbvOQ3NcHxUHZPW1Qfr+d8C+lsmz1eAEEYAu/Sw6bxCXmJTQeKQ0?= =?us-ascii?Q?BB10v+1yhsbdXRD3X5ife4GkuAmkaGyAtBKl3DcTBAH+0T/4/YxhLTiaBmY1?= =?us-ascii?Q?8/s9ZVbIdDOhB3wZk/DcZHrYOtUYytzstaZ5R85A+xJsoBJWsfHotU1ZKV3k?= =?us-ascii?Q?DE1deEmYUHmqmHQ+CxV2L9rkqfh0Vo2ACsUbAJfHxzuos18fuSchqH0rcZRo?= =?us-ascii?Q?nS30QyMpJ3BZ/gfxm/sh2d6XO2jFssWF5s/vFjYaYTVeKmUeCGaftZpnB2MU?= =?us-ascii?Q?qTeVe8XCeIaDTZjEoMG9Qc5MUexSslWpT5gLp1pBbkfA+YJP4QbFTLrPF1QJ?= =?us-ascii?Q?epdeHIq/U8xd7hCUn7DKTQ9BqbJ5Bf/U4zCp9JzHNnmE1tcrNZyqXOT6+WSd?= =?us-ascii?Q?+ntWTEC+f8qSPD+kVaPcoMFJ?= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: b58a0555-7e22-47ae-b0d6-08d968d71379 X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4523.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2021 21:18:40.5064 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LLECfsUWBvyEZRBuQDnQas6VSMGPbFaRsD3Qpp3zS7y7hzWirUyAB446sqSMi39J6oQQjCzzV1MVkeylgi6Qbg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0301MB2182 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210826_141846_856199_2A3195F3 X-CRM114-Status: GOOD ( 19.34 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This adds a binding for the Xilinx LogiCORE IP AXI Timer. This device is a "soft" block, so it has some parameters which would not be configurable in most hardware. This binding is usually automatically generated by Xilinx's tools, so the names and values of some properties should be kept as they are, if possible. In addition, this binding is already in the kernel at arch/microblaze/boot/dts/system.dts, and in user software such as QEMU. The existing driver uses the clock-frequency property, or alternatively the /cpus/timebase-frequency property as its frequency input. Because these properties are deprecated, they have not been included with this schema. All new bindings should use the clocks/clock-names properties to specify the parent clock. Because we need to init timer devices so early in boot, we determine if we should use the PWM driver or the clocksource/clockevent driver by the presence/absence, respectively, of #pwm-cells. Because both counters are used by the PWM, there is no need for a separate property specifying which counters are to be used for the PWM. Signed-off-by: Sean Anderson --- Changes in v6: - Fix incorrect schema id - Enumerate possible counter widths Changes in v5: - Update commit message to reflect revisions - Fix indentation lint - Add example for timer binding - Remove xlnx,axi-timer-2.0 compatible string - Move schema into the timer directory Changes in v4: - Remove references to generate polarity so this can get merged - Predicate PWM driver on the presence of #pwm-cells - Make some properties optional for clocksource drivers Changes in v3: - Mark all boolean-as-int properties as deprecated - Add xlnx,pwm and xlnx,gen?-active-low properties. - Make newer replacement properties mutually-exclusive with what they replace - Add an example with non-deprecated properties only. Changes in v2: - Use 32-bit addresses for example binding .../bindings/timer/xlnx,xps-timer.yaml | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/xlnx,xps-timer.yaml diff --git a/Documentation/devicetree/bindings/timer/xlnx,xps-timer.yaml b/Documentation/devicetree/bindings/timer/xlnx,xps-timer.yaml new file mode 100644 index 000000000000..5be353a642aa --- /dev/null +++ b/Documentation/devicetree/bindings/timer/xlnx,xps-timer.yaml @@ -0,0 +1,90 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/timer/xlnx,xps-timer.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Xilinx LogiCORE IP AXI Timer Device Tree Binding + +maintainers: + - Sean Anderson + +properties: + compatible: + contains: + const: xlnx,xps-timer-1.00.a + + clocks: + maxItems: 1 + + clock-names: + const: s_axi_aclk + + interrupts: + maxItems: 1 + + reg: + maxItems: 1 + + xlnx,count-width: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [8, 16, 32] + default: 32 + description: + The width of the counter(s), in bits. + + xlnx,one-timer-only: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 0, 1 ] + description: + Whether only one timer is present in this block. + +required: + - compatible + - reg + - xlnx,one-timer-only + +allOf: + - if: + required: + - '#pwm-cells' + then: + allOf: + - required: + - clocks + - properties: + xlnx,one-timer-only: + const: 0 + else: + required: + - interrupts + - if: + required: + - clocks + then: + required: + - clock-names + +additionalProperties: true + +examples: + - | + timer@800e0000 { + clock-names = "s_axi_aclk"; + clocks = <&zynqmp_clk 71>; + compatible = "xlnx,xps-timer-1.00.a"; + reg = <0x800e0000 0x10000>; + interrupts = <0 39 2>; + xlnx,count-width = <16>; + xlnx,one-timer-only = <0x0>; + }; + + timer@800f0000 { + #pwm-cells = <0>; + clock-names = "s_axi_aclk"; + clocks = <&zynqmp_clk 71>; + compatible = "xlnx,xps-timer-1.00.a"; + reg = <0x800e0000 0x10000>; + xlnx,count-width = <32>; + xlnx,one-timer-only = <0x0>; + }; -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel