Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3470158iog; Mon, 27 Jun 2022 17:16:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sgHAyYKiM2bLRvnanP23Xjv18572y7n+Z1zcyzpJ8IW/zOPs/CleR888BoeHivlolnn2LF X-Received: by 2002:a17:90a:ac04:b0:1ec:81d2:739 with SMTP id o4-20020a17090aac0400b001ec81d20739mr23688634pjq.171.1656375380891; Mon, 27 Jun 2022 17:16:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656375380; cv=none; d=google.com; s=arc-20160816; b=JOVFbJR6scjNd0HdfswlhKpOrOLRztFGg0iATs2OGxbQq2xh1aUZB57k+4xwxItSuQ i8N2gYmaLAarDj4mqgLCdde1/KCY+t3jzIrXCS8z+ihJ5XhN9Jiw9P8/I/dXn0qGY2Nc aLVuchUlcKU4ul0HPlI84DJ49ZmVYddmQQl6wkrbWwrHFVdUO6iPZoNyZ7pVsA3+gFQE 15//IN+S6mn0Uz87ft1azfOiRvaJ/Vf0ldHUiyxvxE4d8Ww9+psdZ7gpIfml7NewMa0a O/srfkM7kylGODZtoGRSl35hSsYDB3sTRG0UcjPybywTYFc35XhNk7VwSxF2KoUDfZKx LGfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=x8JlGuBlsyv8u11qNoGLGDrkEldcGlScrLvA1xIrWcM=; b=Zk2COcfliCQfaAIXm9cf+Lrs+ZnwZIznvl+6mVCXDa2DWlHfCg7ELMWdqYWfjtulcs IYK3oWtVNI85Ayb2uhGlv2bmvKl7Npr6rslcKKtJs8NT4FsNL0s3sSpXx16F4WEM56Ql geTrvaRavc/rpSxI6bM3QkzGZ2HvseFjJzNEF0ceM51I4Q4/31VLKsbDqDjjklxbWPi1 t38RSPRMki50tQKI6+pZBhdim3Y3s3qP8VXuIHxxIzYMy9bpUBH+FSgB4VJZFPZm9Tk+ +z05BmjDd4b/aebMq4+ihwYJO3qNiYZHSREDAFa6+r18iFGqaXwbTstFZUa0seYPt7oF Wsdw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l20-20020a17090aaa9400b001ecd48cd589si18783810pjq.85.2022.06.27.17.16.06; Mon, 27 Jun 2022 17:16:20 -0700 (PDT) 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; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241596AbiF0Xae (ORCPT + 99 others); Mon, 27 Jun 2022 19:30:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242076AbiF0Xab (ORCPT ); Mon, 27 Jun 2022 19:30:31 -0400 Received: from mail-il1-f173.google.com (mail-il1-f173.google.com [209.85.166.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1AA2D54; Mon, 27 Jun 2022 16:30:29 -0700 (PDT) Received: by mail-il1-f173.google.com with SMTP id a16so7075052ilr.6; Mon, 27 Jun 2022 16:30:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=x8JlGuBlsyv8u11qNoGLGDrkEldcGlScrLvA1xIrWcM=; b=qt7+fpuKX5G1NeZmhbolrtM+hLR1hBtYZx41xJ30DhLXJVGVCgP/mkh773Xn45uoxu 4Hs2VYCJDD15KPNDEREPC4+re3a549fS5VN2XhrOIjNSXELZFxyPgAdlDTZqiF7xkER0 yMgySKEHN8EM638I8C/By6Q1G82ZWTJDmyHwF/ATvg/asjSi1oU3+rpjDpYCzzDYmpTh qLRCwd2sUw4ooWrL9ZOMege66/Xn3IRN0EMx3KNLGGLz4zhfqnbbZHriZJbdL8obnYk9 rPPO14aUiZ4vOU9nidlLwxJ+vhZuOmk7pVuvAkPVE52XcxLUn1E/N6lwnjL1WKrpg+A5 WxaQ== X-Gm-Message-State: AJIora/KXRTB4Qq1diY0yDAYtZbXUyXK755ZUOr6XMfnJQqMdPeJ0g08 1U5hIFrYVCTdxBpEw58XWw== X-Received: by 2002:a05:6e02:1d19:b0:2d9:1705:892b with SMTP id i25-20020a056e021d1900b002d91705892bmr8430986ila.61.1656372628833; Mon, 27 Jun 2022 16:30:28 -0700 (PDT) Received: from robh.at.kernel.org ([64.188.179.253]) by smtp.gmail.com with ESMTPSA id s16-20020a5d9290000000b00672f405e911sm5910587iom.38.2022.06.27.16.30.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jun 2022 16:30:28 -0700 (PDT) Received: (nullmailer pid 3169022 invoked by uid 1000); Mon, 27 Jun 2022 23:30:25 -0000 Date: Mon, 27 Jun 2022 17:30:25 -0600 From: Rob Herring To: Conor Dooley Cc: David Airlie , Daniel Vetter , Krzysztof Kozlowski , Thierry Reding , Sam Ravnborg , Eugeniy Paltsev , Vinod Koul , Liam Girdwood , Mark Brown , Serge Semin , Daniel Lezcano , Palmer Dabbelt , Palmer Dabbelt , Thomas Gleixner , Paul Walmsley , Albert Ou , Conor Dooley , Masahiro Yamada , Damien Le Moal , Geert Uytterhoeven , Niklas Cassel , Dillon Min , Heng Sia , Jose Abreu , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, alsa-devel@alsa-project.org, linux-spi@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH 05/14] dt-bindings: timer: add Canaan k210 to Synopsys DesignWare timer Message-ID: <20220627233025.GA3167724-robh@kernel.org> References: <20220618123035.563070-1-mail@conchuod.ie> <20220618123035.563070-6-mail@conchuod.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220618123035.563070-6-mail@conchuod.ie> X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Sat, Jun 18, 2022 at 01:30:27PM +0100, Conor Dooley wrote: > From: Conor Dooley > > The Canaan k210 apparently has a Sysnopsys Designware timer but > according to the documentation & devicetree it has 2 interrupts rather > than the standard one. Add a custom compatible that supports the 2 > interrupt configuration and falls back to the standard binding (which > is currently the one in use in the devicetree entry). > > Link: https://canaan-creative.com/wp-content/uploads/2020/03/kendryte_standalone_programming_guide_20190311144158_en.pdf #Page 58 > Signed-off-by: Conor Dooley > --- > .../bindings/timer/snps,dw-apb-timer.yaml | 28 +++++++++++++++---- > 1 file changed, 22 insertions(+), 6 deletions(-) > > diff --git a/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml b/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml > index d33c9205a909..9a76acc7a66f 100644 > --- a/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml > +++ b/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml > @@ -12,6 +12,9 @@ maintainers: > properties: > compatible: > oneOf: > + - items: > + - const: canaan,k210-apb-timer > + - const: snps,dw-apb-timer > - const: snps,dw-apb-timer > - enum: > - snps,dw-apb-timer-sp > @@ -21,9 +24,6 @@ properties: > reg: > maxItems: 1 > > - interrupts: > - maxItems: 1 > - > resets: > maxItems: 1 > > @@ -41,7 +41,23 @@ properties: > > clock-frequency: true > > -additionalProperties: false > +unevaluatedProperties: false > + > +if: > + properties: > + compatible: > + contains: > + const: canaan,k210-apb-timer > + > +then: > + properties: > + interrupts: > + maxItems: 2 When more than 1, you need to define what they are and the order. > + > +else: > + properties: > + interrupts: > + maxItems: 1 > > required: > - compatible > @@ -60,8 +76,8 @@ oneOf: > examples: > - | > timer@ffe00000 { > - compatible = "snps,dw-apb-timer"; > - interrupts = <0 170 4>; > + compatible = "canaan,k210-apb-timer", "snps,dw-apb-timer"; > + interrupts = <0 170 4>, <0 170 4>; > reg = <0xffe00000 0x1000>; > clocks = <&timer_clk>, <&timer_pclk>; > clock-names = "timer", "pclk"; > -- > 2.36.1 > >