Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3360158iog; Mon, 27 Jun 2022 14:29:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sjkkKqMsxqqboXFMWUcfkh0PKsvP6q0DSx3snidNanjtxweC0pQdtnj2a4kFxoCciTSRlB X-Received: by 2002:a17:902:e0c3:b0:16a:1fc3:b6e4 with SMTP id e3-20020a170902e0c300b0016a1fc3b6e4mr138863pla.85.1656365374875; Mon, 27 Jun 2022 14:29:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656365374; cv=none; d=google.com; s=arc-20160816; b=TBGKYr+7643M4ipgIhDX2uzBS24dtkX0Qtzzj6LDT4B9Z2y2RZQg2iI5nMa9wg6Y1r Uccf0RtMUPqvfbuLfdZr0GXAFaHECa36DYSotNiGSL1BjjFM3j6Xzdq9G6SIFRwcJ17u 0GfVv9NBgwUhW/6Xtj0hdciMzeGpObaRWpH5rc06Dbpw1TV+Q/MD4IK7z0XWjwk8ZOr9 kEhjhNBB/DqbD8hlp2FMgiZop7HZeBEWvF1Sj9GHtiLyOxfP/gDKWY2nlgJAITzcg8sM 9Ljh8vZcDliB72Fq8R2dDy4s38BvVYhwAsdUTHXSnh/gED05/ynaDAbVu/SQ4KSiv7EF f9xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=7fqf134knRgs1GXmfgOSjMnBIhN/vd4XYE5cKns7XrQ=; b=Zv8KitZSZjLmzz59QfSGXFhEgVNk4ahoyRzeEFJCYXtPBFQEvfBkffzo3khsJMmPB1 Mv0uR3e4DTTTfRTVZrPK90wW/dsoVdjLf86lTdGGiuRQxIquHUYpRdHnkq7qeCfrreJZ HyLcELXOaG8kc1axjp8gESAYCgpAx+kor/2KyXF0d0KkLp8BPbn0JOCuP+nPeXFrrGYW 63t812hgrb2hW1pbHlNOZ9KmCB/l8loLRkEpizR/hhI0I24O4oUZdKHi7aCrs1a5lzrB ILtpNPnhYFLK+XFrlzpUshh379iK6enFawODkoK42EHTkie7/bzvMTcvhYKkwZ9IljM+ XX/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@conchuod.ie header.s=google header.b=HXbtK2wb; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=conchuod.ie Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gd20-20020a17090b0fd400b001ed199d99besi13047414pjb.55.2022.06.27.14.29.22; Mon, 27 Jun 2022 14:29:34 -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; dkim=pass header.i=@conchuod.ie header.s=google header.b=HXbtK2wb; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=conchuod.ie Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241136AbiF0VSQ (ORCPT + 99 others); Mon, 27 Jun 2022 17:18:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237982AbiF0VSM (ORCPT ); Mon, 27 Jun 2022 17:18:12 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EBD618B02 for ; Mon, 27 Jun 2022 14:18:11 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id w17so14785151wrg.7 for ; Mon, 27 Jun 2022 14:18:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=7fqf134knRgs1GXmfgOSjMnBIhN/vd4XYE5cKns7XrQ=; b=HXbtK2wb/8k7BKwx03O3vJd+frVE8kbRJOxAidgzWU3+M46idUPj4JY/ji2or61qN6 iFQfdI2q9HbabuCUzIKyuCuZZP+svfWOurR7utrBBG8lxHgf64RUya9tYBYoq/IZnb3/ vASCFCOveG3OPw4M9ElkzqOYoiWkSkXpjjzjUUkhiJcB7Uovli7STe8/BYj4orSkm5AF LTlyYI4wyNCu+hgP9xZwpFMXRxL0suMMMq/Wud/F2UCWdoxIQljh+9HLdF+xzDphLUPc JhfNdVvIWSYHIRmsF16qeXPK1XW0ExS6lCFXaFznUtqNyynV9EM41UOdeXzlroAzAzkv hWjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=7fqf134knRgs1GXmfgOSjMnBIhN/vd4XYE5cKns7XrQ=; b=P/kR8R6joLqa2kI2gb/ONoZuJGe7+a2Eve3Y3V9UChU0uaJADx6VUERwWNOqNyNpko IvyMTJmTiTFjFdgH2FUNvVJl6BYP/fGhNdO/BZfbBRjc1kAMIWoEdFauIlM6KR6MLxHp vt7M3qvWc/+p6Zw2krMWSh+jJb21t488duO64wjVGYCkTFn/OOsU/ZqXCwUEj/Ldpdo+ VD5JWFau7no1lLemI4UVi5sH5OxUIGt8vMy9ar4hpMgzXZtv1kQHIJcrSVH5VYUbfiFO d4lYi8P3FqLQXsjjgbpOO0IRo4ZxybJcewvpZMR8y5bV4Hp2yTZG4aYfzhCs8zt0TPEp 5CWA== X-Gm-Message-State: AJIora8qnyi9EU4GrIcq0dI62LQwxIqf3s/d7MEOBQ72GjmXBx7cb7UT gdIhVcLfgvwPUhX9dQuMTGo5RA== X-Received: by 2002:adf:d1ed:0:b0:21b:c74b:594 with SMTP id g13-20020adfd1ed000000b0021bc74b0594mr8958606wrd.221.1656364689777; Mon, 27 Jun 2022 14:18:09 -0700 (PDT) Received: from [192.168.2.222] ([51.37.234.167]) by smtp.gmail.com with ESMTPSA id az14-20020a05600c600e00b003a04c74efd1sm3048630wmb.21.2022.06.27.14.18.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Jun 2022 14:18:09 -0700 (PDT) Message-ID: Date: Mon, 27 Jun 2022 22:18:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v2 06/16] dt-bindings: timer: add Canaan k210 to Synopsys DesignWare timer Content-Language: en-US To: Serge Semin Cc: David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Thierry Reding , Sam Ravnborg , Eugeniy Paltsev , Vinod Koul , Liam Girdwood , Mark Brown , 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 References: <20220627194003.2395484-1-mail@conchuod.ie> <20220627194003.2395484-7-mail@conchuod.ie> <20220627211314.dc2hempelyl5ayjg@mobilestation> From: Conor Dooley In-Reply-To: <20220627211314.dc2hempelyl5ayjg@mobilestation> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 27/06/2022 22:13, Serge Semin wrote: > On Mon, Jun 27, 2022 at 08:39:54PM +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 > > Firstly, it's page 51 in the framework of the document pages > enumeration. Ah yes, sorry about that. > > Judging by the comment in the document above and what the HW reference > manual says regarding the IRQ signals, what you really have on K210 is > the DW APB Timer IP-cores each configured with two embedded timers. > It's done by the IP-core synthesize parameter NUM_TIMERS={1..8}, which > in your case equals to 2. A similar situation is on our SoC and, for > instance, here: > > arch/arm/boot/dts/berlin2q.dtsi > arch/arm/boot/dts/berlin2.dtsi > arch/arm/boot/dts/berlin2cd.dtsi > (Though the Berlin2 APB Timer have been configured with 8 timers.) > > So the correct modification would be: > 1. Split up the nodes into two ones with one IRQ per each node. > 2. Make sure I was right by testing the new dts out. > 3. Update the DT-node only and leave the DT-bindings as is. Hmm, sounds good. Will give that a whirl tomorrow. Thanks for the info/suggestions Sergey.