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=-15.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 93BBAC433ED for ; Fri, 7 May 2021 14:24:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 562D660724 for ; Fri, 7 May 2021 14:24:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237639AbhEGOZZ (ORCPT ); Fri, 7 May 2021 10:25:25 -0400 Received: from mail-db8eur05on2059.outbound.protection.outlook.com ([40.107.20.59]:55392 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235948AbhEGOZW (ORCPT ); Fri, 7 May 2021 10:25:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dacbkEj7I7U4FvF/PPxh+FnLotu+WHDQQZYB7le7t1kqkCgWa5ZinmFwhnOscYPqVy0oHpsjnFJeMBDMqpfYA3agcWNoJIg2TwhCGHFfP5/LuGJqOAUnvj8+h4DrO3f4kaxGKRsKEOo2D+36C1ZDBSjbb0hyEePLFuaJp1q9Pi3Rx4ueDm0HZq7Jf+73d8VGpt1/znK9JiqfDbNQIzvHhwRJ+vPU62RQmlYUmltRZoMhdSQL8Eq5P8K9RWVJLRKiIzDvBmdIYYclnLFL88a27vmOLmvEo3QUqA11w7kxrPOeRS7edRMhzYuwWFC/lJFIYT7RrUscJlq9LWtvVwmVBg== 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=PLl3eTyIefKaLhbY5MnBhLlscsmIy37090nWeKSvhGA=; b=eVsTFJsfZ6BSvXU5pcMYSrpIHlu83ZVOlbRq96cp+V04wf7tVxa0ZIvbCoYxQZLa7t74NiXS5n3qJ5V5X/Q4rM3xtKa7yCCBRvE4eIgq3KnApAsY7JABHikliwcc5APtP19xPu6hfqs0eSkFJ3H3Rb1AVZGkQU7gdYqZBat3QqrTvgCRnFpT8qN1teHFSwh7OIIniVD5H31flR/BmG1+IDTS7BFOd4+DRtJ5kNHmw/fxWll33vYUaV02gWrVEnofnN86pw3WW+PiU6Q579FcuH165DeWN2MSfdwtA3kE27r5OoQuT2NsiU12tW7pdQjgpALU3wFcoI8v/VxQZBHUCg== 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=PLl3eTyIefKaLhbY5MnBhLlscsmIy37090nWeKSvhGA=; b=IW9jz6PR4ZnJBpqBLVs/jfd4lhYh90ZuHKcdkJjrSU1QK5WgVMiLGjdb4Ybfk+TPOixpCXTlp2RtdciXqZpzC5+rPZFfEr6mdaJw12mOPcrPrZp5pyzcRlgxpE9Z1nCjfQe9RejYy4yNrj8nJsf0FBS082UvveA5XdaoGnkU+TE= Authentication-Results: hazent.com; dkim=none (message not signed) header.d=none;hazent.com; dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) by DBBPR03MB7129.eurprd03.prod.outlook.com (2603:10a6:10:206::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.40; Fri, 7 May 2021 14:24:20 +0000 Received: from DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::40d5:3554:c709:6b1b]) by DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::40d5:3554:c709:6b1b%5]) with mapi id 15.20.4108.029; Fri, 7 May 2021 14:24:20 +0000 Subject: Re: [PATCH v2 1/2] dt-bindings: pwm: Add Xilinx AXI Timer To: Michal Simek , Rob Herring Cc: linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alvaro Gamez References: <20210504184925.3399934-1-sean.anderson@seco.com> <20210506210527.GA789155@robh.at.kernel.org> From: Sean Anderson Message-ID: <11026a90-96e7-906d-a6d4-b3387fdd9b58@seco.com> Date: Fri, 7 May 2021 10:24:16 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [50.195.82.171] X-ClientProxiedBy: BL1PR13CA0379.namprd13.prod.outlook.com (2603:10b6:208:2c0::24) To DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [172.27.1.65] (50.195.82.171) by BL1PR13CA0379.namprd13.prod.outlook.com (2603:10b6:208:2c0::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.11 via Frontend Transport; Fri, 7 May 2021 14:24:19 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ccf1140b-af33-4de1-606c-08d91163cda1 X-MS-TrafficTypeDiagnostic: DBBPR03MB7129: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dMNldnWHPC9oJbGwFBIEb7+6k4fFevROPXbss2gyaTQrN7Xf/iXXi/4JGUS2bWguJMaLcjtwucRh7gh/kYo2W6LGbUE4vN2JgQK9MwBtCHdQ4PRxeoIxJSrtylSt8bThOUs1S1w1BmiufSFFHeaDzV/euj8tXBg64d7JwkZMIMnJIWQ44ldXMFTG8XW3MfP4Vwo42XE9ZapxVWEC7BzmqalVr9SNTU/dVgrX0VDYTWKygx0aO9lwdMAm595TUhFm2HTR0kUBFGlcFc7UmKyKorkNf9CU6hrC0anDrR5AWGG3S6/FB8EoQ8BqlciLMYzkEjuxcwen61JBkCbGO/BVAhvMjQhG5+FwIykwO/Qqj102aQQse/0BwyUFdRs7eO4pjcIydctTOPE3+PoMNbCELDHacktTd9WzCmTTz+08a9I1oz6csUKrDa5j+a7C0gMwyLuPS8T4v25dAg3XeIRX3wrjO5aMzHCr6BrPpzdiT8fHgp/bi2ZmEpIQBJ7VWTvnSi0ydMBj2xV7QhBifSVSvCDPovZ9tt7LPdT+nGQjjIB3Sng41sawnyiGWHEttXESxyNqXMMReWE9DPrRpuNL17FMilC15JmQgVvxUy+zWVnPTW4FhzdqNGlc8JgzV1s5lwdtqYZX/5KBPWtiy3drQXPT8YHJGBCtkQ3PhnriOS1T6LKN3lJqIe4lX/4fRrS68vaCHmOGq2dcYaZmYjCOSyewfltALdEvcPlfsaNaR8tQv1oPAtB5ydes2S4T5RMksUxSc/1bbeomuLd/uLzn7IdyhJSinR6DpgXpuuva9XI= 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:(366004)(396003)(136003)(39850400004)(376002)(346002)(86362001)(16576012)(6486002)(5660300002)(36756003)(83380400001)(316002)(66946007)(52116002)(6666004)(2906002)(110136005)(16526019)(31696002)(38100700002)(186003)(956004)(8676002)(2616005)(38350700002)(66476007)(8936002)(66556008)(966005)(26005)(31686004)(4326008)(44832011)(53546011)(478600001)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?ZWFONUllOWtCVHNlcURlNC9GUG50bnNpV1J6R1FLTmZYS2tQa1Nhc1pvbXhL?= =?utf-8?B?MEJrV2RqandwTjJmYUhROGZtbXROcFNmdnFnL3NGdWg3RW50K0NSWlV5c2E3?= =?utf-8?B?L0RNd0dnWUVxMmVCbGgvZEJsWURxTmVoN1JTeXJOTHA1K21ZcWNCUmJ4U3Bo?= =?utf-8?B?NWFsV21JbURTa2RGWE16YThpcFR4dGRxZFQyN09FQmZnV3R0cERVNWNrdVJH?= =?utf-8?B?cDhOMXl5UVRBZksrVVc5QTgvdFdxK25sL0prUEtWaTFRWTh2V2liNmNCVnlp?= =?utf-8?B?VTI2RGdjUExQeDlPWkJPdG1Wb01mVlZ0bEdNODdTaitTdmRLZWpobFo2Zzhx?= =?utf-8?B?ZElGMUxseWE2VWlDK2ZodnJ6MUNFL0ozbE1JWGFlZGZNZWpxdGxZYlBDbmlI?= =?utf-8?B?dVhBSEpQL0t2MDA0UGpPTUhCTk1JT0VLUjd2ajBXRnE5S2RXTGc1OVI4b0w1?= =?utf-8?B?S0hNTWV1dEo5VjZPbVkrWVJnS01UTElySVVGa2Exc2FaOGVybUgzRWV0ay95?= =?utf-8?B?ZWhkYU1zdlEvcmpWeXdhWmVjZ2VnRUE0YjFxN1dWbkx1ckFSVDFuSDc1NjRn?= =?utf-8?B?VnRuU29yUHlHdFY3MUZOS3lvYkt1RkNXVTgyYXc2Tno3MVZCcGJwR3hzUUlx?= =?utf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pjbDBDUVVuRWhSZ3pkVDM5?= =?utf-8?B?b1dGbFlmSWY5bkdBT2JFYlowYnpjakxaQmNINnhxeUxyTW5KNDc0ZUNhQWRw?= =?utf-8?B?RXU2alovNVUvbTBieDRQc1RGb1BaQ0ZqZWt5dWFvTS9BUFc0bllBZU9xRS9W?= =?utf-8?B?R0xVVGdvRk80SUV1c21aVzhEd0Q5NHhtVHd4WS9MQk5nN2hSbW5WcHowekNG?= =?utf-8?Q?u/LyZaubKIWNBpoeqyRiQf6z7c22AIVK+CmrjRF?= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: ccf1140b-af33-4de1-606c-08d91163cda1 X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4523.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2021 14:24:20.0214 (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: xfr52LR81MYzBeQ3vz9+0jYFh6zLbTPqnMXJ1ZIVs402BtbjZQSLeNtE7H0vqtfZ1fx84huVfWoOpYXgqKr6uw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR03MB7129 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/7/21 2:35 AM, Michal Simek wrote: > > > On 5/6/21 11:10 PM, Sean Anderson wrote: >> >> >> On 5/6/21 5:05 PM, Rob Herring wrote: >>> On Tue, May 04, 2021 at 02:49:24PM -0400, Sean Anderson wrote: >>>> This adds a binding for the Xilinx LogiCORE IP AXI Timer. This device is >>>> a "soft" block, so it has many 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 properties >>>> must be kept as they are. >>>> >>>> Signed-off-by: Sean Anderson >>>> --- >>>> >>>> Changes in v2: >>>> - Use 32-bit addresses for example binding >>>> >>>> .../bindings/pwm/xlnx,axi-timer.yaml | 91 +++++++++++++++++++ >>>> 1 file changed, 91 insertions(+) >>>> create mode 100644 >> Documentation/devicetree/bindings/pwm/xlnx,axi-timer.yaml >>>> >>>> diff --git >> a/Documentation/devicetree/bindings/pwm/xlnx,axi-timer.yaml >> b/Documentation/devicetree/bindings/pwm/xlnx,axi-timer.yaml >>>> new file mode 100644 >>>> index 000000000000..bd014134c322 >>>> --- /dev/null >>>> +++ b/Documentation/devicetree/bindings/pwm/xlnx,axi-timer.yaml >>>> @@ -0,0 +1,91 @@ >>>> +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause >>>> +%YAML 1.2 >>>> +--- >>>> +$id: http://devicetree.org/schemas/pwm/xlnx,axi-timer.yaml# >>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>>> + >>>> +title: Xilinx LogiCORE IP AXI Timer Device Tree Binding >>>> + >>>> +maintainers: >>>> + - Sean Anderson >>>> + >>>> +properties: >>>> + compatible: >>>> + items: >>>> + - const: xlnx,axi-timer-2.0 >>>> + - const: xlnx,xps-timer-1.00.a >>>> + >>>> + clocks: >>>> + maxItems: 1 >>>> + >>>> + clock-names: >>>> + const: s_axi_aclk >>>> + >>>> + reg: >>>> + maxItems: 1 >>>> + >>>> + xlnx,count-width: >>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>> + minimum: 8 >>>> + maximum: 32 >>>> + description: >>>> + The width of the counters, in bits. >>>> + >>>> + xlnx,gen0-assert: >>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>> + enum: [ 0, 1 ] >>>> + description: >>>> + The polarity of the generateout0 signal. 0 for active-low, 1 >> for active-high. >>>> + >>>> + xlnx,gen1-assert: >>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>> + enum: [ 0, 1 ] >>>> + description: >>>> + The polarity of the generateout1 signal. 0 for active-low, 1 >> for active-high. >>>> + >>>> + xlnx,one-timer-only: >>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>> + enum: [ 0, 1 ] >>>> + description: >>>> + Whether only one timer is present in this block. >>>> + >>>> + xlnx,trig0-assert: >>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>> + enum: [ 0, 1 ] >>>> + description: >>>> + The polarity of the capturetrig0 signal. 0 for active-low, 1 >> for active-high. >>>> + >>>> + xlnx,trig1-assert: >>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>> + enum: [ 0, 1 ] >>>> + description: >>>> + The polarity of the capturetrig1 signal. 0 for active-low, 1 >> for active-high. >>> >>> Can't all these be boolean? >> >> They could, but >> >>> This binding is usually automatically generated by Xilinx's tools, so >>> the names and values of properties must be kept as they are. >> >> Because this is a soft device, the binding may be (very conveniently) >> auto-generated. I am not opposed to adding additional properties which >> could be used by new code, but we should still accept this auto-generated >> output. > > I think in this case you should described what it is used by current > driver in Microblaze and these options are required. The rest are by > design optional. > If you want to change them to different value then current binding > should be deprecated and have any transition time with code alignment. Well, every single one of these is in the microblaze devicetree since 2009. And fundamentally, all of these are required for a complete driver implementation. They are generally not discoverable from hardware (though I think it might be possible for one-timer-only or perhaps counter-width by inspecting whether register writes stick). However, the signal polarity properties are required to determine whether PWM mode is possible, and to determine the polarity of PWM capture (if that is implemented in the future). I think allowing more conventional usage of devicetree is a good idea. E.g. we could accept both something like 'xlnx,gen0-assert = <0>;' and 'xlnx,gen0-active-low;'. But I think we should still parse older devicetree properties, given the (likely extensive) amount of existing devicetrees with this binding. And this would also require Xilinx to adopt whatever we decide on, and update their devicetree generators accordingly. --Sean 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=-15.9 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,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 290F6C433B4 for ; Fri, 7 May 2021 14:26:19 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 640DB60724 for ; Fri, 7 May 2021 14:26:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 640DB60724 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=seco.com 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=desiato.20200630; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lw3pAFI1Fh6/SaeP2E48T02rFQzUBKQYicgtHpEoZ+4=; b=KVHdVDEqlTBBu84Q1/PH93qZA jC51+8P/WyUZu57+JH7c/igok6E51V55nSWBtyEbwAVDWSj47nsexmnXjNDywquK6NHz37lF//cPi 1CwgejLDgOWxp3CmcW5SagKZ5+ovFCVEHuO/BRxiWxWCwisk7LGFJ/1CbpVZxhseiLRdhsyrmNt4u a8Jq1+yS+GbP1FN0q4CEN28SRmc4LwETGwEXLt4LxLlkS7PMhrGgjBjBfAGYnOy33m0DsQ7Ngxwo0 8hCDapocMcNwtGWGaiNL5eB8bXr0UxK7G9dlP2DUvuNLR21sRVSzYZ3fmOyML/t6mmyMzjodNwDz6 glveo8pKw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lf1P2-007JWQ-Nv; Fri, 07 May 2021 14:24:29 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lf1P0-007JWK-Go for linux-arm-kernel@desiato.infradead.org; Fri, 07 May 2021 14:24:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=MIME-Version: Content-Transfer-Encoding:Content-Type:In-Reply-To:Date:Message-ID:From: References:Cc:To:Subject:Sender:Reply-To:Content-ID:Content-Description; bh=PLl3eTyIefKaLhbY5MnBhLlscsmIy37090nWeKSvhGA=; b=d5W7zL81MWxS8fLHXTv2Nu+SmO jT0zAQvbToNfLgcJ/s826r2iAzDIJXojTvkXjLilrLRGFuRVZpX/t+DGGGEyKm2MI/PkWPIMl9FR1 CtcKbS/ryiYIR/PAZSuqIxwkJ6autH0VfYLcUt+wryTTZ7FRW7VrIWzlMnBElt28Tu82pobAOtbLI criQWL8H05W5shnWn2UDfl6fHceKOb8tWjNnH01sAr+JVAPkVQLT5auw+w43TGHiwYFiE5hJekbWw FVaGjzpQyluY+DjTrEETKkNLKf6O+We+RBP6bAaQZl+ip7AKZGlZt+k6+/iwN0d1fUaD0DpRChpMd JjUTXqNg==; Received: from mail-eopbgr60073.outbound.protection.outlook.com ([40.107.6.73] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lf1Ow-006vhc-Ux for linux-arm-kernel@lists.infradead.org; Fri, 07 May 2021 14:24:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dacbkEj7I7U4FvF/PPxh+FnLotu+WHDQQZYB7le7t1kqkCgWa5ZinmFwhnOscYPqVy0oHpsjnFJeMBDMqpfYA3agcWNoJIg2TwhCGHFfP5/LuGJqOAUnvj8+h4DrO3f4kaxGKRsKEOo2D+36C1ZDBSjbb0hyEePLFuaJp1q9Pi3Rx4ueDm0HZq7Jf+73d8VGpt1/znK9JiqfDbNQIzvHhwRJ+vPU62RQmlYUmltRZoMhdSQL8Eq5P8K9RWVJLRKiIzDvBmdIYYclnLFL88a27vmOLmvEo3QUqA11w7kxrPOeRS7edRMhzYuwWFC/lJFIYT7RrUscJlq9LWtvVwmVBg== 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=PLl3eTyIefKaLhbY5MnBhLlscsmIy37090nWeKSvhGA=; b=eVsTFJsfZ6BSvXU5pcMYSrpIHlu83ZVOlbRq96cp+V04wf7tVxa0ZIvbCoYxQZLa7t74NiXS5n3qJ5V5X/Q4rM3xtKa7yCCBRvE4eIgq3KnApAsY7JABHikliwcc5APtP19xPu6hfqs0eSkFJ3H3Rb1AVZGkQU7gdYqZBat3QqrTvgCRnFpT8qN1teHFSwh7OIIniVD5H31flR/BmG1+IDTS7BFOd4+DRtJ5kNHmw/fxWll33vYUaV02gWrVEnofnN86pw3WW+PiU6Q579FcuH165DeWN2MSfdwtA3kE27r5OoQuT2NsiU12tW7pdQjgpALU3wFcoI8v/VxQZBHUCg== 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=PLl3eTyIefKaLhbY5MnBhLlscsmIy37090nWeKSvhGA=; b=IW9jz6PR4ZnJBpqBLVs/jfd4lhYh90ZuHKcdkJjrSU1QK5WgVMiLGjdb4Ybfk+TPOixpCXTlp2RtdciXqZpzC5+rPZFfEr6mdaJw12mOPcrPrZp5pyzcRlgxpE9Z1nCjfQe9RejYy4yNrj8nJsf0FBS082UvveA5XdaoGnkU+TE= Authentication-Results: hazent.com; dkim=none (message not signed) header.d=none;hazent.com; dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) by DBBPR03MB7129.eurprd03.prod.outlook.com (2603:10a6:10:206::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.40; Fri, 7 May 2021 14:24:20 +0000 Received: from DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::40d5:3554:c709:6b1b]) by DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::40d5:3554:c709:6b1b%5]) with mapi id 15.20.4108.029; Fri, 7 May 2021 14:24:20 +0000 Subject: Re: [PATCH v2 1/2] dt-bindings: pwm: Add Xilinx AXI Timer To: Michal Simek , Rob Herring Cc: linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alvaro Gamez References: <20210504184925.3399934-1-sean.anderson@seco.com> <20210506210527.GA789155@robh.at.kernel.org> From: Sean Anderson Message-ID: <11026a90-96e7-906d-a6d4-b3387fdd9b58@seco.com> Date: Fri, 7 May 2021 10:24:16 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 In-Reply-To: Content-Language: en-US X-Originating-IP: [50.195.82.171] X-ClientProxiedBy: BL1PR13CA0379.namprd13.prod.outlook.com (2603:10b6:208:2c0::24) To DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [172.27.1.65] (50.195.82.171) by BL1PR13CA0379.namprd13.prod.outlook.com (2603:10b6:208:2c0::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.11 via Frontend Transport; Fri, 7 May 2021 14:24:19 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ccf1140b-af33-4de1-606c-08d91163cda1 X-MS-TrafficTypeDiagnostic: DBBPR03MB7129: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dMNldnWHPC9oJbGwFBIEb7+6k4fFevROPXbss2gyaTQrN7Xf/iXXi/4JGUS2bWguJMaLcjtwucRh7gh/kYo2W6LGbUE4vN2JgQK9MwBtCHdQ4PRxeoIxJSrtylSt8bThOUs1S1w1BmiufSFFHeaDzV/euj8tXBg64d7JwkZMIMnJIWQ44ldXMFTG8XW3MfP4Vwo42XE9ZapxVWEC7BzmqalVr9SNTU/dVgrX0VDYTWKygx0aO9lwdMAm595TUhFm2HTR0kUBFGlcFc7UmKyKorkNf9CU6hrC0anDrR5AWGG3S6/FB8EoQ8BqlciLMYzkEjuxcwen61JBkCbGO/BVAhvMjQhG5+FwIykwO/Qqj102aQQse/0BwyUFdRs7eO4pjcIydctTOPE3+PoMNbCELDHacktTd9WzCmTTz+08a9I1oz6csUKrDa5j+a7C0gMwyLuPS8T4v25dAg3XeIRX3wrjO5aMzHCr6BrPpzdiT8fHgp/bi2ZmEpIQBJ7VWTvnSi0ydMBj2xV7QhBifSVSvCDPovZ9tt7LPdT+nGQjjIB3Sng41sawnyiGWHEttXESxyNqXMMReWE9DPrRpuNL17FMilC15JmQgVvxUy+zWVnPTW4FhzdqNGlc8JgzV1s5lwdtqYZX/5KBPWtiy3drQXPT8YHJGBCtkQ3PhnriOS1T6LKN3lJqIe4lX/4fRrS68vaCHmOGq2dcYaZmYjCOSyewfltALdEvcPlfsaNaR8tQv1oPAtB5ydes2S4T5RMksUxSc/1bbeomuLd/uLzn7IdyhJSinR6DpgXpuuva9XI= 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:(366004)(396003)(136003)(39850400004)(376002)(346002)(86362001)(16576012)(6486002)(5660300002)(36756003)(83380400001)(316002)(66946007)(52116002)(6666004)(2906002)(110136005)(16526019)(31696002)(38100700002)(186003)(956004)(8676002)(2616005)(38350700002)(66476007)(8936002)(66556008)(966005)(26005)(31686004)(4326008)(44832011)(53546011)(478600001)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?ZWFONUllOWtCVHNlcURlNC9GUG50bnNpV1J6R1FLTmZYS2tQa1Nhc1pvbXhL?= =?utf-8?B?MEJrV2RqandwTjJmYUhROGZtbXROcFNmdnFnL3NGdWg3RW50K0NSWlV5c2E3?= =?utf-8?B?L0RNd0dnWUVxMmVCbGgvZEJsWURxTmVoN1JTeXJOTHA1K21ZcWNCUmJ4U3Bo?= =?utf-8?B?NWFsV21JbURTa2RGWE16YThpcFR4dGRxZFQyN09FQmZnV3R0cERVNWNrdVJH?= =?utf-8?B?cDhOMXl5UVRBZksrVVc5QTgvdFdxK25sL0prUEtWaTFRWTh2V2liNmNCVnlp?= =?utf-8?B?VTI2RGdjUExQeDlPWkJPdG1Wb01mVlZ0bEdNODdTaitTdmRLZWpobFo2Zzhx?= =?utf-8?B?ZElGMUxseWE2VWlDK2ZodnJ6MUNFL0ozbE1JWGFlZGZNZWpxdGxZYlBDbmlI?= =?utf-8?B?dVhBSEpQL0t2MDA0U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NL?= =?utf-8?B?RFk5UFM3bFFxVWhiYmxUK2E0aEFubmswakF5UnFLSmU0Q0ZSM1lScWhrd1hV?= =?utf-8?B?QWFpVWhOb1MrWlRjY2FRWkdNbXdvRFNMWXBQdisyb1RYN3k2dnNUVHlSWDhI?= =?utf-8?B?Z2pNWkhkaHAzanJkZEVxcnBKZ3hiZEVlS2NjZ050eWFGNkphc1pGVngzZzIv?= =?utf-8?B?ZDZLVm56VGdGYk5Bamt4WlhGOTY0SE5aelMxUmpjbDBDUVVuRWhSZ3pkVDM5?= =?utf-8?B?b1dGbFlmSWY5bkdBT2JFYlowYnpjakxaQmNINnhxeUxyTW5KNDc0ZUNhQWRw?= =?utf-8?B?RXU2alovNVUvbTBieDRQc1RGb1BaQ0ZqZWt5dWFvTS9BUFc0bllBZU9xRS9W?= =?utf-8?B?R0xVVGdvRk80SUV1c21aVzhEd0Q5NHhtVHd4WS9MQk5nN2hSbW5WcHowekNG?= =?utf-8?Q?u/LyZaubKIWNBpoeqyRiQf6z7c22AIVK+CmrjRF?= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: ccf1140b-af33-4de1-606c-08d91163cda1 X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4523.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2021 14:24:20.0214 (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: xfr52LR81MYzBeQ3vz9+0jYFh6zLbTPqnMXJ1ZIVs402BtbjZQSLeNtE7H0vqtfZ1fx84huVfWoOpYXgqKr6uw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR03MB7129 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210507_072423_093581_D72344A0 X-CRM114-Status: GOOD ( 24.96 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 5/7/21 2:35 AM, Michal Simek wrote: > > > On 5/6/21 11:10 PM, Sean Anderson wrote: >> >> >> On 5/6/21 5:05 PM, Rob Herring wrote: >>> On Tue, May 04, 2021 at 02:49:24PM -0400, Sean Anderson wrote: >>>> This adds a binding for the Xilinx LogiCORE IP AXI Timer. This device is >>>> a "soft" block, so it has many 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 properties >>>> must be kept as they are. >>>> >>>> Signed-off-by: Sean Anderson >>>> --- >>>> >>>> Changes in v2: >>>> - Use 32-bit addresses for example binding >>>> >>>> .../bindings/pwm/xlnx,axi-timer.yaml | 91 +++++++++++++++++++ >>>> 1 file changed, 91 insertions(+) >>>> create mode 100644 >> Documentation/devicetree/bindings/pwm/xlnx,axi-timer.yaml >>>> >>>> diff --git >> a/Documentation/devicetree/bindings/pwm/xlnx,axi-timer.yaml >> b/Documentation/devicetree/bindings/pwm/xlnx,axi-timer.yaml >>>> new file mode 100644 >>>> index 000000000000..bd014134c322 >>>> --- /dev/null >>>> +++ b/Documentation/devicetree/bindings/pwm/xlnx,axi-timer.yaml >>>> @@ -0,0 +1,91 @@ >>>> +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause >>>> +%YAML 1.2 >>>> +--- >>>> +$id: http://devicetree.org/schemas/pwm/xlnx,axi-timer.yaml# >>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>>> + >>>> +title: Xilinx LogiCORE IP AXI Timer Device Tree Binding >>>> + >>>> +maintainers: >>>> + - Sean Anderson >>>> + >>>> +properties: >>>> + compatible: >>>> + items: >>>> + - const: xlnx,axi-timer-2.0 >>>> + - const: xlnx,xps-timer-1.00.a >>>> + >>>> + clocks: >>>> + maxItems: 1 >>>> + >>>> + clock-names: >>>> + const: s_axi_aclk >>>> + >>>> + reg: >>>> + maxItems: 1 >>>> + >>>> + xlnx,count-width: >>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>> + minimum: 8 >>>> + maximum: 32 >>>> + description: >>>> + The width of the counters, in bits. >>>> + >>>> + xlnx,gen0-assert: >>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>> + enum: [ 0, 1 ] >>>> + description: >>>> + The polarity of the generateout0 signal. 0 for active-low, 1 >> for active-high. >>>> + >>>> + xlnx,gen1-assert: >>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>> + enum: [ 0, 1 ] >>>> + description: >>>> + The polarity of the generateout1 signal. 0 for active-low, 1 >> for active-high. >>>> + >>>> + xlnx,one-timer-only: >>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>> + enum: [ 0, 1 ] >>>> + description: >>>> + Whether only one timer is present in this block. >>>> + >>>> + xlnx,trig0-assert: >>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>> + enum: [ 0, 1 ] >>>> + description: >>>> + The polarity of the capturetrig0 signal. 0 for active-low, 1 >> for active-high. >>>> + >>>> + xlnx,trig1-assert: >>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>> + enum: [ 0, 1 ] >>>> + description: >>>> + The polarity of the capturetrig1 signal. 0 for active-low, 1 >> for active-high. >>> >>> Can't all these be boolean? >> >> They could, but >> >>> This binding is usually automatically generated by Xilinx's tools, so >>> the names and values of properties must be kept as they are. >> >> Because this is a soft device, the binding may be (very conveniently) >> auto-generated. I am not opposed to adding additional properties which >> could be used by new code, but we should still accept this auto-generated >> output. > > I think in this case you should described what it is used by current > driver in Microblaze and these options are required. The rest are by > design optional. > If you want to change them to different value then current binding > should be deprecated and have any transition time with code alignment. Well, every single one of these is in the microblaze devicetree since 2009. And fundamentally, all of these are required for a complete driver implementation. They are generally not discoverable from hardware (though I think it might be possible for one-timer-only or perhaps counter-width by inspecting whether register writes stick). However, the signal polarity properties are required to determine whether PWM mode is possible, and to determine the polarity of PWM capture (if that is implemented in the future). I think allowing more conventional usage of devicetree is a good idea. E.g. we could accept both something like 'xlnx,gen0-assert = <0>;' and 'xlnx,gen0-active-low;'. But I think we should still parse older devicetree properties, given the (likely extensive) amount of existing devicetrees with this binding. And this would also require Xilinx to adopt whatever we decide on, and update their devicetree generators accordingly. --Sean _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel