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=-3.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 642F8C433E1 for ; Thu, 27 Aug 2020 18:56:25 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 2F33D2087E for ; Thu, 27 Aug 2020 18:56:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="N8khYKEp"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QNz8+bhT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2F33D2087E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=42Q7ydGFC2z6jL6Zj5QlrTpxMjNFLtyvDnE2k8YwWqk=; b=N8khYKEpeg8FBZdwyojjISgH7 Qw6sBAbYalYGt2cE4SbNCz0ljbW7dAK2LDz6M2tklX++XjjWWIHBkg8SvWyynWzbzvkQuWQPbhbT2 uArf1bnlh+lljWhY1W4aBcmPrTLFo8kPxUZBY3z16z0TQOOPmZsOIVacImCcYSMBxRwb3+XV5ljLT i18PfyH+htHfog++DaTkOzoasMeV2cDe2atX8R2KKIEAcyqtJd25IE3aqxR5NUV3Kj+ciM3MVi9Ju oRPmnJuIgnLvbVpN06XoVuGMutkDPIsdR39c8hsW77kNIhBU/Lp+xocSplg7xMD+yWYdPXijMXcta Sbulc1PCA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBN38-0003GY-G1; Thu, 27 Aug 2020 18:55:02 +0000 Received: from mail-ej1-x641.google.com ([2a00:1450:4864:20::641]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBN36-0003Fx-C6; Thu, 27 Aug 2020 18:55:01 +0000 Received: by mail-ej1-x641.google.com with SMTP id si26so9054275ejb.12; Thu, 27 Aug 2020 11:54:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=LHHKRlpGcLJvCKpegwxUOUmIDZhAqnwwqQX2kkQlM7s=; b=QNz8+bhTuuSkmXiGILO4+og6Sl1O4SV5ipW6T/vNZSvL9MXrAJy7C07y5OxL0U3W9f X8UpK761iwRZR/2m/xhmNila1tS7nUqofK1sHe1vm1aJC1wbIPL8/Q7/ZKwXB3zQOfNV HYuz5T0vULxgCZKFHsQ9DdJ2NV1N4bjw656Z+TMM7bJ5Rf9Y5nNuOGtEKh5UmhP1G9vx kP1YpVSFFvLoCgMDJVhU38/5hNmoA99DXrdSMFN1jYXJ1YFQcfDpOe8Vqh54/DzbPTfs +dNgdhkFt23twviXTBwdovKxmBKjYj1LWkvhMkp1CxVx84UKdnRybvsaU2/XsM9R84Js YO6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=LHHKRlpGcLJvCKpegwxUOUmIDZhAqnwwqQX2kkQlM7s=; b=XMi3651HoTlClQeQwZuyAKRTLOmB5CudstxqZNphjGkOMenfpbbFhb5RKPQUiUntWE zqpgzKrdsm/KN9xxvao2juYNiDSaiV/JY7xTlE8nehx5Z5tAw90/Vj8JZyrt8wCySQVF tmVM54jc7WcIWq0TFfPtRV2cUmDgzLD5XvQ6zGQ4f8Z3/u58cnAWq9oBMvD1M1AVKv/o fxo+2Lw58yqR7HkCpNyXQ9EgU88OFDWeANpP9ppulqdCJdWBqcId2avrZKDzZiu0mW3l LY9OXQ7bmTll02nv3CFRpHsD0Devz3lufXUXRlOFpJsMw9798lGr9fC7d/GdC2Ra3m64 QzKg== X-Gm-Message-State: AOAM530eOfFvia0f/1hjRbzn7/Xtf8j8V8zORPYPmg//8OIVaVlrTkBG U9azGpkAFlk0lIXsNfAI13K9ICwais4= X-Google-Smtp-Source: ABdhPJzAisnvpJNwmg6E75pm+Dss0ilEJO1mrAtf34l/Azy1U3zXvkxujPh0hP3H2R4xka8Ms08ijg== X-Received: by 2002:a17:906:22d6:: with SMTP id q22mr14495824eja.242.1598554499144; Thu, 27 Aug 2020 11:54:59 -0700 (PDT) Received: from BV030612LT ([188.24.159.61]) by smtp.gmail.com with ESMTPSA id g11sm2100748edt.88.2020.08.27.11.54.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Aug 2020 11:54:58 -0700 (PDT) Date: Thu, 27 Aug 2020 21:54:56 +0300 From: Cristian Ciocaltea To: Marc Zyngier Subject: Re: [PATCH v5 1/3] dt-bindings: interrupt-controller: Add Actions SIRQ controller binding Message-ID: <20200827185456.GA2475396@BV030612LT> References: <6bd99d4a7e50904b57bb3ad050725fbb418874b7.1597852360.git.cristian.ciocaltea@gmail.com> <20200825220913.GA1423455@bogus> <20200826214220.GA2444747@BV030612LT> <20200827100629.GA2451538@BV030612LT> <64580e3b9acada6ff4ae9fdef02ac304@kernel.org> <20200827152428.GA2467154@BV030612LT> <7de137f820d5a3b7921bda0751509f85@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <7de137f820d5a3b7921bda0751509f85@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200827_145500_496246_C9C461BC X-CRM114-Status: GOOD ( 32.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Jason Cooper , devicetree@vger.kernel.org, linux-actions@lists.infradead.org, linux-kernel@vger.kernel.org, Manivannan Sadhasivam , Thomas Gleixner , Andreas =?iso-8859-1?Q?F=E4rber?= , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" 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 On Thu, Aug 27, 2020 at 04:42:04PM +0100, Marc Zyngier wrote: > Cristian, > > On 2020-08-27 16:24, Cristian Ciocaltea wrote: > > Hi Marc, > > > > On Thu, Aug 27, 2020 at 11:35:06AM +0100, Marc Zyngier wrote: > > > On 2020-08-27 11:06, Cristian Ciocaltea wrote: > > > > On Wed, Aug 26, 2020 at 04:48:38PM -0600, Rob Herring wrote: > > > > > On Wed, Aug 26, 2020 at 3:42 PM Cristian Ciocaltea > > > > > wrote: > > > > > > [...] > > > > > > > > Ultimately the GIC trigger type has to be > > > > > something. Is it fixed or passed thru? If the latter, just use 0 > > > > > (IRQ_TYPE_NONE) if the GIC trigger mode is not fixed. Having some sort > > > > > of translation of the trigger is pretty common. > > > > > > > > Yes, as explained above, the SIRQ controller performs indeed the > > > > translation of the incoming signal. So if I understand correctly, your > > > > suggestion would be to use the following inside the sirq node: > > > > > > > > interrupts = , /* SIRQ0 */ > > > > [...] > > > > > > Please don't. If you are describing a GIC interrupt, use a > > > trigger that actually exists. Given that you have a 1:1 > > > mapping between input and output, just encode the output > > > trigger that matches the input. > > > > Understood, the only remark here is that internally, the driver will > > not use this information and instead will continue to rely on the input > > to properly set the trigger type for the output. > > It's fine. The binding has to be consistent on its own, but > doesn't dictate the way the driver does thing. > > > The question is if the driver should also emit a warning (or error?) > > when the trigger type supplied via DT doesn't match the expected value. > > Rob will tell you that the kernel isn't a validation tool for broken > DTs. Shout if you want, but you are allowed to simply ignore the > output trigger for example > > > If yes, we should also clarify what the user is supposed to provide in > > the controller node: the trigger type before the conversion (the input) > > or the one after the conversion (the output). > > The output of a SIRQ should be compatible with the GIC input it is > attached to. You can have: > > device (LEVEL_LOW) -> SIRQ (LEVEL_HIGH) -> GIC > > but you can't have: > > device (LEVEL_LOW) -> SIRQ (EDGE_RISING) -> GIC > > because that's not an acceptable transformation for the SIRQ, > nor can you have: > > device (EDGE_FALLING) -> SIRQ (EDGE_FALLING) -> GIC > > because EDGE_FALLING isn't a valid input for the GIC. > > In both of the invalid cases, you would be free to apply > which ever transformation actually makes sense, and shout > at the user if you want to help them debugging their turf. > The later part is definitely optional. > > Hope this helps, This certainly helps a lot, now I have a clear understanding of what is to be done next. > M. > -- > Jazz is not dead. It just smells funny... Many thanks for the detailed explanations, Cristi _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel