Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1225596lqh; Mon, 6 May 2024 00:22:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXzsB84B0w05oBzmdz9veY/Fy3suwOFzUoueGhEJvty9HuQP5HNZGChlZjcVPFHwSWadjVhCnin2tilD3I1FD5lvZabSh80oLtTQ/xjvg== X-Google-Smtp-Source: AGHT+IFQJszz/3CC+002tN6eAABGoHnr0WytX4OI3buHarrqFKfCm7JV2+V177yQiZzq76ufTpm8 X-Received: by 2002:a50:9e47:0:b0:56e:2abd:d00f with SMTP id z65-20020a509e47000000b0056e2abdd00fmr6480910ede.18.1714980132198; Mon, 06 May 2024 00:22:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714980132; cv=pass; d=google.com; s=arc-20160816; b=f3Xb7hgY/Q1ifkV+AbBuAdtUm0E0yBv8A0/1jzHn2E0eyKqbNOrVljeZnLUdQHF8YU vj3AkNrAt7IUk2NIvh36xt3y4tXzCdSsxEn9om8NKWWBeWGqBBfOu/peOm3/jLRslScU R+nzdqMIpclAHd7fLSfWPju3qhvrxqDeArX2mxpCEuaPfEMHBSuFX1fECCpSGiMpM5mq lXOzvc1g7LzFYvRLyFbO+aJC7OIY2GTIPixBxU832Elrdxnd5XA5TxQFbPpTiiX2fhso GRNql9/iB+LTqPxg6I1tKAMwHcC/Y7dAtBQi8iWJjcbnjye96XotOZBZG8DBWHvn0YBl q1eQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=0dlMWT58sNslF6/PywFTgVb8B4K2AkFKS2JdJ04ybUM=; fh=J2hxVH3iF8PoVofsvxo4TtG22DIeZqVjeQGzi2SA5AA=; b=tnAjlb5/vrfKlMtdlrIrLGBrWmClyDSbOL8wFMMrIZPdAJ7WkOXjADHmqmyVStILcb xJKbrZhryp63D3I6SPzFJxwMytz5FJKLQCJz+KcebE1NERAKGa3Ku+IEiYKNbIKDXh+C jJ0V6nCKxcf0xdqfyYqJ1yD0aCkqd+3LMFTDwrvh+3gg8F0/vkr0Vc35z2g6gfUj4UNA oM3EYwb7qtOZBmgOm4uYvmwd3+rzbbHjNQ0pjbiU3x+Gk6L4fkQr3lJjjZgjgdC/BjAo BhbbOytdZACAsqurj95aryzKDAAEuCZQaHwn6xB3g2b6vH+v7JcxHtZk0hQwX5NSDrVJ O8tA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=kUjdiYdD; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-169399-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169399-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id d12-20020a50fb0c000000b00572a170d1aasi4391316edq.546.2024.05.06.00.22.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 00:22:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169399-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=kUjdiYdD; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-169399-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169399-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 23CB11F2228B for ; Mon, 6 May 2024 07:14:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 641797580E; Mon, 6 May 2024 07:14:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="kUjdiYdD" Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEEF76D1A8; Mon, 6 May 2024 07:14:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714979690; cv=none; b=skCI98EW+9CAFlfAPPNrNTs2rzrVyCoQ8OKOt91aY3DxZzgES6OCl2fq37W74LTU9xKeIULnMeKp5NLw5d7CYTqN8o4FJduCsCzRUxGnDicQah6aNzwKEn9eB5kWj33e7DWpsLvyYWEPGlH497Mb6JNfSAjxg7mImiA6QbohSfI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714979690; c=relaxed/simple; bh=x+K7uJjDWqJHy+R8uwFrBt04oWI3036EKVKiTN1nWl8=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DAucwmYMBkn0Eh5H3JLIfIjRgF0KMemBcFfRlnLnsGCIZT5Jvj3HfDANRZZnb/14sKqHqm0tp04Bc3ts3ZrjncoF49bmkgM64F3f7qrGlLGJywoBL0sMgwEQ78bAR+4lKB8EVNJH9pzRsz2wxcdNZFi3kV5Q/ViVKkMjQMUAw7Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=kUjdiYdD; arc=none smtp.client-ip=217.70.183.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 1FBFFC0005; Mon, 6 May 2024 07:14:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1714979686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0dlMWT58sNslF6/PywFTgVb8B4K2AkFKS2JdJ04ybUM=; b=kUjdiYdDz9ua+bFQ4PfrO/xM0z6iIZkKKGkpQs2hkepXleMh07irjTNReu4L1Y01qdwi7s sJWfQ7GF2ygAMKH6ACP0GV8uAuzYBSPY5/emANHO/7VflPP8Zbi93Kfv94d+iQK3jClQ58 d3SBob6DbjPHW2rZKnP8xL5Jv+dyMAPtJ6Bd3eE2K07EaH+L/HpCVKMidFFqxgvhJxZspe 5a6Tn6i1+CflfPpuLt+fqHKRtimS0C+isz68VVCECZ4ZlmxFZbSjm6Q7wKugnXs7Yp0ZN5 GbRMgfM3UIaKOGpjwGeWR6kvGGw01YBBbIT9V8ZXWhuSmRRiqDY0MasudHCoLA== Date: Mon, 6 May 2024 09:14:44 +0200 From: Miquel Raynal To: Keguang Zhang via B4 Relay Cc: keguang.zhang@gmail.com, Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v7 1/3] dt-bindings: mtd: Add Loongson-1 NAND Controller Message-ID: <20240506091444.59228fa9@xps-13> In-Reply-To: <20240430-loongson1-nand-v7-1-60787c314fa4@gmail.com> References: <20240430-loongson1-nand-v7-0-60787c314fa4@gmail.com> <20240430-loongson1-nand-v7-1-60787c314fa4@gmail.com> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com Hello, devnull+keguang.zhang.gmail.com@kernel.org wrote on Tue, 30 Apr 2024 19:11:10 +0800: > From: Keguang Zhang >=20 > Add devicetree binding document for Loongson-1 NAND Controller. >=20 > Signed-off-by: Keguang Zhang > --- > Changes in v7: > - rename the file to loongson,ls1b-nfc.yaml >=20 > Changes in v6: > - A newly added patch > --- > .../devicetree/bindings/mtd/loongson,ls1b-nfc.yaml | 66 ++++++++++++++++= ++++++ > 1 file changed, 66 insertions(+) >=20 > diff --git a/Documentation/devicetree/bindings/mtd/loongson,ls1b-nfc.yaml= b/Documentation/devicetree/bindings/mtd/loongson,ls1b-nfc.yaml > new file mode 100644 > index 000000000000..a69f22b9fd9e > --- /dev/null > +++ b/Documentation/devicetree/bindings/mtd/loongson,ls1b-nfc.yaml > @@ -0,0 +1,66 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mtd/loongson,ls1b-nfc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Loongson-1 NAND Controller > + > +maintainers: > + - Keguang Zhang > + > +allOf: > + - $ref: nand-controller.yaml > + > +properties: > + compatible: > + oneOf: > + - const: loongson,ls1b-nfc What is the rationale behind this choice? Seems like the b variant has two possible implementations and should always be preceded by a more specific compatible. As there is currently no description of this controller upstream, I would not care too much about any out-of-tree description and directly go for a clean description. > + - items: > + - enum: > + - loongson,ls1a-nfc > + - loongson,ls1c-nfc > + - const: loongson,ls1b-nfc > + > + reg: > + maxItems: 1 > + > + dmas: > + maxItems: 1 > + > + dma-names: > + const: rxtx > + > +patternProperties: > + "^nand@[0-3]$": > + type: object > + $ref: raw-nand-chip.yaml > + > + unevaluatedProperties: false > + > +required: > + - compatible > + - reg > + - dmas > + - dma-names Should DMA props be required? > + > +unevaluatedProperties: false > + > +examples: > + - | > + nand-controller@1fe78000 { > + compatible =3D "loongson,ls1b-nfc"; > + reg =3D <0x1fe78000 0x40>; > + > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + > + dmas =3D <&dma 0>; > + dma-names =3D "rxtx"; There is a preferred spacing for DT nodes, see: https://docs.kernel.org/devicetree/bindings/dts-coding-style.html > + > + nand@0 { > + reg =3D <0>; > + nand-use-soft-ecc-engine; > + nand-ecc-algo =3D "hamming"; These two properties are not needed. Unless there is no hardware ECC capability on this controller and in this case you need to ensure the properties are present in the schema. > + }; > + }; >=20 Thanks, Miqu=C3=A8l