Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp415934rdb; Tue, 31 Oct 2023 10:52:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHuGDynTeBN6U85nmr8w0h2WamKwSbu6BkyioSbavKEexHuNqQKUK/chpgvpTVXtYK+mZKD X-Received: by 2002:a05:6a20:9184:b0:157:1b5:61ce with SMTP id v4-20020a056a20918400b0015701b561cemr17130345pzd.4.1698774744458; Tue, 31 Oct 2023 10:52:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698774744; cv=none; d=google.com; s=arc-20160816; b=s3rWbOlJ0fL3+5kbZ3pWtkOL7jgRV/nOLY9REiMhrzPjhgKQlUd+Wjx6O4Gnhpkm7J FFmmKxAR+y4UzR1OTKNfyWFuForAO6B2+NuxVI3Wodc4fRv35zJUhKg7LaaEBZ++VAwz 0YDvDU5D3OEHl3e72treNtfxH313Wn0AsuKbjkIeNcx05l/yAV+okF11JtuIo//OdzoD MMnU/d8x6NZ0/vecMGAP/VASJ2WBCGhAA0SskwwzPZMClzsAntA9jbccKUhOez3BwPDp XqWBKyb7RuK4Vz2sMu2B9bTJIusP2a2v830uKoqcBzIfPYQQHbHcpEGYRyN7neJXys7F DIrA== 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=ps8gVGM6a0bOEx91A6UnJicGRcymk1vWN92b42mtNSM=; fh=Cpof6sWbr+w6L0OLwHb5hGIjL3+0XPz7PSJKh2LeqTs=; b=wdhRW9RjFcdzM6MdTnoosxWqW5+rJkl0biVSQMD4XZ6cIkkWnHATk3Wn+9cq83VjCC SYGkeRwtFvjlLT4/bCAKFYiC9shwu7N1aVu02czYKZXAtsN0YMGQ5+VUwdCWZkL1hLQd 9HgNpM1pMdewrs0+NXZC+kQHACn0INbfCb5KTBrYQZbBlIu43iR3SzLAWUa14I8wKwMZ 2GvX0n8C0eOpYZ+T3bcbhAZCOmAKLBtoN1kVaAA510RFYbkTicVOieK842KWkkhksKg+ fuXctMzvaDMrCV9I69R8goqQrYHUItn95GBfvKYtRkbPvt6dnPKMplHYWpS6TMIoAHAN TLdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id m64-20020a633f43000000b005784ab1c4afsi1313309pga.736.2023.10.31.10.52.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 10:52:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 0DC6D80CC121; Tue, 31 Oct 2023 10:52:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346981AbjJaRwN (ORCPT + 99 others); Tue, 31 Oct 2023 13:52:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236514AbjJaRwM (ORCPT ); Tue, 31 Oct 2023 13:52:12 -0400 Received: from mail-oo1-f47.google.com (mail-oo1-f47.google.com [209.85.161.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82857E4; Tue, 31 Oct 2023 10:52:07 -0700 (PDT) Received: by mail-oo1-f47.google.com with SMTP id 006d021491bc7-58706a0309dso1190509eaf.1; Tue, 31 Oct 2023 10:52:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698774727; x=1699379527; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ps8gVGM6a0bOEx91A6UnJicGRcymk1vWN92b42mtNSM=; b=O2jkyQw7QQvx14yMsbLfihpomX9ZH0Siw5YgfDy0CFxxZ0DfcDK/W5C2fhD0jad6El q20DRUnH9aHEYfdxMTcOOKsdFl+AsVmR+9ARZz6+wy+0jqhjJ4/2WEoj+cIFSO1+2+c9 z4QbPymdaU5ROInfrb+19prXPsrVA76v6VLML8u+XPkWKBsktmN+0BtAKt16ttscVrHg qX+9pu9VUpXvDO2CybU5PS78aeRfRLIBgcTCcCX+RTGwB1lwdweUQAQnQFkxn6+C015N jkPe5wAw6HDaIg08hLdrQ0cSYXVApYYLAbsTa5HRi6VGzIyY1zE5Ly/wP7KblltxHVpH JDWw== X-Gm-Message-State: AOJu0YyvTG+NtK3knuK2SSAuB5cEKk1fUVCJVDrEt7t32OzC1tnosI00 WJOJMobIRX9sEjOdYseLDw== X-Received: by 2002:a4a:a649:0:b0:582:c8b4:d9df with SMTP id j9-20020a4aa649000000b00582c8b4d9dfmr13003433oom.1.1698774726805; Tue, 31 Oct 2023 10:52:06 -0700 (PDT) Received: from herring.priv ([4.31.143.193]) by smtp.gmail.com with ESMTPSA id y127-20020a4a4585000000b00581e7506f2fsm342322ooa.9.2023.10.31.10.52.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 10:52:06 -0700 (PDT) Received: (nullmailer pid 1805145 invoked by uid 1000); Tue, 31 Oct 2023 17:52:05 -0000 Date: Tue, 31 Oct 2023 12:52:05 -0500 From: Rob Herring To: Binbin Zhou Cc: Binbin Zhou , Huacai Chen , Thomas Gleixner , Krzysztof Kozlowski , Conor Dooley , Huacai Chen , loongson-kernel@lists.loongnix.cn, devicetree@vger.kernel.org, Thomas Bogendoerfer , Jiaxun Yang , linux-mips@vger.kernel.org, lvjianmin@loongson.cn, WANG Xuerui , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/5] dt-bindings: interrupt-controller: loongson,liointc: Fix dtbs_check warning for reg-names Message-ID: <20231031175205.GA1803813-robh@kernel.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 31 Oct 2023 10:52:22 -0700 (PDT) On Tue, Oct 31, 2023 at 10:36:37AM +0800, Binbin Zhou wrote: > As we know, the Loongson-2K0500 is a single-core CPU, and the > core1-related register (isr1) does not exist, and we need a separate > declaration. > > This fixes dtbs_check warning: > > DTC_CHK arch/loongarch/boot/dts/loongson-2k0500-ref.dtb > arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11400: reg-names: ['main', 'isr0'] is too short > From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml > arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11400: Unevaluated properties are not allowed ('reg-names' was unexpected) > From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml > arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11400: reg: [[0, 534844416, 0, 64], [0, 534843456, 0, 8]] is too short > From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml > arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11440: reg-names: ['main', 'isr0'] is too short > From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml > > Signed-off-by: Binbin Zhou > --- > .../loongson,liointc.yaml | 22 ++++++++++++++----- > 1 file changed, 16 insertions(+), 6 deletions(-) > > diff --git a/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml b/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml > index 0d9511b8a792..7393d7dfbe82 100644 > --- a/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml > +++ b/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml > @@ -11,8 +11,13 @@ maintainers: > > description: | > This interrupt controller is found in the Loongson-3 family of chips and > - Loongson-2K1000 chip, as the primary package interrupt controller which > + Loongson-2K series chips, as the primary package interrupt controller which > can route local I/O interrupt to interrupt lines of cores. > + Be aware of the following points. > + 1.The Loongson-2K0500 is a single core CPU, the isr1 register could not be defined; > + 2.The Loongson-2K0500/2K1000 has 64 device interrupt sources as inputs, so we > + need to define two nodes in dts{i} to describe the "0-31" and "32-61" interrupt > + sources respectively. > > allOf: > - $ref: /schemas/interrupt-controller.yaml# > @@ -29,10 +34,14 @@ properties: > maxItems: 3 > > reg-names: > - items: > - - const: main > - - const: isr0 > - - const: isr1 > + oneOf: > + - items: > + - const: main > + - const: isr0 > + - items: > + - const: main > + - const: isr0 > + - const: isr1 Just adding 'minItems: 2' accomplishes the same thing without duplicating the list. > > interrupt-controller: true > > @@ -94,7 +103,8 @@ if: > then: > properties: > reg: > - minItems: 3 > + minItems: 2 > + maxItems: 3 > > required: > - reg-names > -- > 2.39.3 >