Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3212895pxa; Tue, 25 Aug 2020 14:52:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypdDsztzaPVvgnzqTAunP7O1W36mLbFeef4m0K+TC5Sdnq49DQkVvVxGuHFxG7lxA5l6da X-Received: by 2002:a17:906:84c1:: with SMTP id f1mr12473645ejy.494.1598392334815; Tue, 25 Aug 2020 14:52:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598392334; cv=none; d=google.com; s=arc-20160816; b=cmCCgY3P9jaglecRBGhIjNf96+lfmHuaLRhyx3drU96NoANarQOLSLaBsun1aKyQyG MHpgXri0sf0ursDnu7SsNN3Ul9S9UQ0yStCglWptzvRSPMCL2D/lldblXLYmJtbFGHUC pkvkVxxewIy2l47P/IqynPhx6TYXKRtu1DlE3XOSDQpLU2DsUxv5/4SCozp2zC4V5+Es XdWITvK7CaAxYDTBM9F/ZVdQvu9I+xx7UYjOQbZHUeDehrf+uJ2LaMpZ3GArYaqbDU7W BYtB3nyA6ONgnNc2xLIHJ3SZZeX+csrEyUx6pTGd6omjCB7L1LZL09RcrN+BHWieZq+P RwXg== 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; bh=RQP52sLIM0MfnF4NggVw656j4jf7VJADZKCoTHNbNKI=; b=iD80+78isAJRnN19XcwCrHYJZBARhzVYXDaJa+NkfLJ2E4BOy20SFbXw77fmvr+AjY hfWEx3F8YZrX4PunZni8L42l2gZpaChQs3IpDpgEwUDdbiDouGJZYv2iMtJcOzy9fYv5 YGWwKs8uKR965IexqbmPdee/zE0KRsWeRF4sxfMac4utREeFzAHD4sYBhoJPy6jWvKm2 EfBmO9FQBbsVTPbtlr3br3ac+fZVsjc9FpZKodwCLMNSC14r5320nsvG/Lsy0hN5TN+w PbWlh8SCXLi+rgqDelb5O/iW3jlfCVe1gUGyrnKTF7vV/KWWfkqMPHQTz0CEq74F6UgW q1kQ== ARC-Authentication-Results: i=1; mx.google.com; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l7si106471edv.354.2020.08.25.14.51.48; Tue, 25 Aug 2020 14:52:14 -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; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726551AbgHYVst (ORCPT + 99 others); Tue, 25 Aug 2020 17:48:49 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:42541 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726303AbgHYVss (ORCPT ); Tue, 25 Aug 2020 17:48:48 -0400 Received: by mail-io1-f66.google.com with SMTP id g13so45619ioo.9; Tue, 25 Aug 2020 14:48:47 -0700 (PDT) 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=RQP52sLIM0MfnF4NggVw656j4jf7VJADZKCoTHNbNKI=; b=oqfUPgX+gjBxakDKpvrTAQSwUlYMUsVtv6Tfnxy30v26D+DiH400WcudOQ84Be+Fxe gtz8Zm3ZiBvSLnv/QesK1GgeOjZC4QTJXJGk8iacUc9K6bXfk5h3n9HChizhDdK2yIbe TBS67Dq2eNk4OpuHnTk0dNBYOFHPkJ4fjDx+VO5Ppa/DNRT5Vj9f/2xlM7DaSHrcb66p /HSL77Kz4WcaUtl2JQmGtO3LseCQSj9E3MYc1R5wMTt2RfBRfOd2DwqfP9H3HT1Muu0F 6oLSahObcCzSe1e0qo/tbzA8W4vuYBNEx1fg/vo2Ax1+jNpb59mdzJhKDsGbFtjORZNd 8piA== X-Gm-Message-State: AOAM531NIDvbYZAGtueRMHADMnnzlgzCVjUGT+GTR+pFoPvU4dazS0oK 0Byv+dkzhCEu3RbsQGFw5HCr7knbL3uN X-Received: by 2002:a6b:5009:: with SMTP id e9mr10947465iob.156.1598392127545; Tue, 25 Aug 2020 14:48:47 -0700 (PDT) Received: from xps15 ([64.188.179.249]) by smtp.gmail.com with ESMTPSA id t187sm23566iof.54.2020.08.25.14.48.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Aug 2020 14:48:47 -0700 (PDT) Received: (nullmailer pid 1396452 invoked by uid 1000); Tue, 25 Aug 2020 21:48:42 -0000 Date: Tue, 25 Aug 2020 15:48:42 -0600 From: Rob Herring To: Mark-PK Tsai Cc: maz@kernel.org, tglx@linutronix.de, jason@lakedaemon.net, matthias.bgg@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, yj.chiang@mediatek.com, alix.wu@mediatek.com, daniel@0x0f.com Subject: Re: [PATCH 2/2] dt-bindings: interrupt-controller: Add MStar interrupt controller Message-ID: <20200825214842.GA1367012@bogus> References: <20200819034231.20726-1-mark-pk.tsai@mediatek.com> <20200819034231.20726-3-mark-pk.tsai@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200819034231.20726-3-mark-pk.tsai@mediatek.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 19, 2020 at 11:42:31AM +0800, Mark-PK Tsai wrote: > Add binding for MStar interrupt controller. > > Signed-off-by: Mark-PK Tsai > --- > .../interrupt-controller/mstar,mst-intc.yaml | 82 +++++++++++++++++++ > 1 file changed, 82 insertions(+) > create mode 100644 Documentation/devicetree/bindings/interrupt-controller/mstar,mst-intc.yaml > > diff --git a/Documentation/devicetree/bindings/interrupt-controller/mstar,mst-intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/mstar,mst-intc.yaml > new file mode 100644 > index 000000000000..6e383315e529 > --- /dev/null > +++ b/Documentation/devicetree/bindings/interrupt-controller/mstar,mst-intc.yaml > @@ -0,0 +1,82 @@ > +# SPDX-License-Identifier: GPL-2.0 Dual license new bindings. (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/interrupt-controller/mstar,mst-intc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: MStar Interrupt Controller > + > +maintainers: > + - Mark-PK Tsai > + > +description: |+ > + MStar, SigmaStar and Mediatek DTV SoCs contain multiple legacy > + interrupt controllers that routes interrupts to the GIC. > + > + The HW block exposes a number of interrupt controllers, each > + can support up to 64 interrupts. > + > +allOf: > + - $ref: /schemas/interrupt-controller.yaml# Drop this. It is applied based on node name matching already. > + > +properties: > + compatible: > + items: > + - const: mstar,mst-intc > + - enum: > + - mediatek,mt58xx-intc Normally, the 1st entry would be enum as that's where you'd add new compatibles (as the fallback is constant). But if you don't forsee any additions, just make both 'const' > + > + interrupt-controller: true > + > + "#address-cells": > + enum: [ 0, 1, 2 ] This would normally be 0 in an interrupt controller. It's only relevant if you have an 'interrupt-map' which this is the parent for. > + "#size-cells": > + enum: [ 1, 2 ] And this should be dropped. > + > + "#interrupt-cells": > + const: 3 > + description: | > + Use the same format as specified by GIC in arm,gic.yaml. That's odd. You have the same SPI and PPI stuff? > + > + reg: > + description: | > + Physical base address of the mstar interrupt controller > + registers and length of memory mapped region. Drop this. That's every 'reg' property. > + minItems: 1 maxItems is more logical. > + > + mstar,irqs-map-range: > + description: | > + The range of parent interrupt controller's interrupt lines > + that are hardwired to mstar interrupt controller. Is this or ? Really, this should just use 'interrupts' even though that's a bit verbose. Or be implied by the compatible string. What's the maximum number of parent interrupts? In any case, we really need to stop having vendor specific properties for this. > + $ref: /schemas/types.yaml#/definitions/uint32-matrix > + items: > + minItems: 2 > + maxItems: 2 > + > + mstar,intc-no-eoi: > + description: | Don't need '|' if there's no formatting. > + Mark this controller has no End Of Interrupt(EOI) implementation. > + This is a empty, boolean property. You can drop this line. The schema says this. > + type: boolean > + > +required: > + - compatible > + - reg > + - mstar,irqs-map-range > + > +additionalProperties: false > + > +examples: > + - | > + mst_intc0: interrupt-controller@1f2032d0 { > + compatible = "mstar,mst-intc", "mediatek,mt58xx-intc"; > + interrupt-controller; > + #interrupt-cells = <3>; > + #address-cells = <1>; > + #size-cells = <1>; > + interrupt-parent = <&gic>; > + reg = <0x1f2032d0 0x30>; > + mstar,irqs-map-range = <0 63>; Is 0 a PPI or SPI? This property is making some assumption and wouldn't be able to support both types or another parent interrupt controller. > + }; > +... > -- > 2.18.0