Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp649857pxa; Thu, 27 Aug 2020 11:56:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHag3zVORwtd5fmnFGre9COUCNSkgwScF2qgAHWWrg9zZBFLu6Ue9PPRR5VCdLm4/69d5V X-Received: by 2002:a17:906:25d3:: with SMTP id n19mr21480667ejb.551.1598554581512; Thu, 27 Aug 2020 11:56:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598554581; cv=none; d=google.com; s=arc-20160816; b=GLdRcqxTSCLGBOd5pOVQmNKayqjhjcX5Ca+JPnb+basu3e37m+wiqvsGxUgHzPvx/l dRDIjX9eTmcQGMvs1Dh1Yh5Wc57wzjB2+f/83cT5RbNJXSe1L193RLYe4BeWzwf6f9hG F7PcyoT33JiNoXQuUtv7JCQS8WotE7JwI97ZfAg/Qgqg66btoR0wgvb4cmIgI7YPtqM7 o5Q+Ue2uo2JmljbgznqhZKPlWS+TuUETs/BkgtjDc3AoRf2r/ejX+xgpKzX68H8th6mA MqiYS+wkZQD1aBAxtXQCXl3+ysA2xxqM7P6I+LnHlNUnVM9UsjWMdxMqQoefNgQCgHt6 VRVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=LHHKRlpGcLJvCKpegwxUOUmIDZhAqnwwqQX2kkQlM7s=; b=yH73luL1SCmMBeHbdx2rwgR651Ul4JCVu0ZMLebwBoPCdTuZedYTQnMsYfhRgSetwi r6OPev1Iff1xsTNNb52nnp8W/jnmziP51sn3WvgbITTbj7C1zHu8J6ox+upQWiKJgZy2 wOe0WCMnS4ZGw3IqDXdXRjoGVTNISjnpiXXd5cmbnJpedtYu1XlpF9JEYEVHxQHdw4ON ivrKzd60IQd4jM4MU8LAdi2sgGtNl5N128JpKWLK71C0qehR5GItl+Cd5Edh09W1qDoH Za91tK5+k030IIXrVzfkmwfH6/oDgWQSUrxOSHL/nx7SyPJUuAG/WSvE57q2j8yjDEQA 2uwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QNz8+bhT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d17si2160523edy.541.2020.08.27.11.55.59; Thu, 27 Aug 2020 11:56:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QNz8+bhT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726858AbgH0SzC (ORCPT + 99 others); Thu, 27 Aug 2020 14:55:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726197AbgH0SzA (ORCPT ); Thu, 27 Aug 2020 14:55:00 -0400 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A4F1C061264; Thu, 27 Aug 2020 11:55:00 -0700 (PDT) Received: by mail-ej1-x643.google.com with SMTP id d11so9024928ejt.13; Thu, 27 Aug 2020 11:55:00 -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=SQ2Dw0LBKAyJP0xlKIPy+n9N4PFMVf8eq2+MRqWuXkSLoY9f+61L74nA0KSOvb+2hl y2KhuTHvjlGnUDsdgV/LxyH4ripSctTW1mtlC176s5T9ZyYozO8SXa4u/BrqyvOpb8cA Qoakv4L+KlYKgqTnASXSEpNNn9rIusmRyJfahBET/d3fvDukYsq/vlT/gu86yn/1Wqwp 7nZg/lSO3mFw6wK6c978Sqq3iZOcZIQa4HeABjRT5KCapmMaWOyU55ziOx1IyQ30EyAs HhpDDy2Isgodei/AaOjaB6jak5TUYP2RrI9EfGh9kw+gbld1/JZX0D/pGZg/GXsn7ebF XP9g== X-Gm-Message-State: AOAM531eDEXms3SlM/PuMdd1TXivB/oEmQ1YbRZUXhqTQO7v0QMYPQ1x efAIw2C+9UFtLuOkjjzWlZc= 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 Cc: Rob Herring , Thomas Gleixner , Jason Cooper , Andreas =?iso-8859-1?Q?F=E4rber?= , Manivannan Sadhasivam , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , linux-actions@lists.infradead.org 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7de137f820d5a3b7921bda0751509f85@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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