Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2064751iof; Tue, 7 Jun 2022 18:34:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtmsOgC8Qyhj+/03zl5BTsZwz+RqorIIn6hKr9ZaF2axLaK+h7kdd7tMmPA6UhXci42S7Y X-Received: by 2002:a17:90b:2482:b0:1e8:a80b:c5bf with SMTP id nt2-20020a17090b248200b001e8a80bc5bfmr5724565pjb.14.1654652041058; Tue, 07 Jun 2022 18:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654652041; cv=none; d=google.com; s=arc-20160816; b=WoaBULM8QDpl+Htv/X8zmbuQegQ8/QaUhJ+4adaECQs4rGSTSC1nnc+cM5WAU9Khmc JHShMZeBMhFMF5w/+M4aaT68EH57z4+XEMXa/Kkw+z9Wkcmv2uPd922czxRZ41B0Y8L9 pLS+r/xGIX65pIO/iX2GoJfGTu0h9N1SDt61dfCjG3GV8wHAXSVuXfECMM8AbSUl7qyI qnjXC9wEnbFA3aky4U4+mPfCHIUiQo9WDDPnUzl4hFQfrOrRCas54QBW8vKDds/uQeGX qM3dIHYFFsvWv0bFs6NF5DQLnCT9oiTmxhWgQZUC3iCaQ2SXExJf1Kio51PYHYdkKAIl XrAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=XmiBGLOqeSCLAOqSQbaY6v/VQ8m/vaJ+VL88Myz4yGM=; b=DZt9lSIKteV8pfUTgsjPcl0GvDuomEZn4rt28dGtN4nalfEHFGE5tLwdaXgXDw+sC1 pNbXYqEbTDQoaHSTOnzuENtbYDKPYDZc7iowKZyLSRmDCBvDHGC3Iy1CL3SCpkY8ebxA 9dF0ALQgOKvG4/gNBsoFwszyB1FeUBZGIM9m3As8SnRNjlBrvZ7mG3FCOP2w4mlszyz/ GJxsHWxxRdnnDYspSdFfEq6lBDcCV6VL1l39kqLHaXt/35+TiYyOHFPh34lW5pxaKBO1 CMycI7oYHMLT2FCYibe1LsvSb/6GRB8h7PoXcu8q/KDg/odwvnnBkiTBniPXlABmFiYP M18A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id e2-20020a636902000000b003c6af783a2fsi25493673pgc.797.2022.06.07.18.34.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 18:34:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3168F29DC03; Tue, 7 Jun 2022 18:24:29 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237242AbiFGGsF (ORCPT + 99 others); Tue, 7 Jun 2022 02:48:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237222AbiFGGrs (ORCPT ); Tue, 7 Jun 2022 02:47:48 -0400 Received: from mail-sz.amlogic.com (mail-sz.amlogic.com [211.162.65.117]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 005EC39BA9 for ; Mon, 6 Jun 2022 23:47:44 -0700 (PDT) Received: from droid11-sz.amlogic.com (10.28.8.21) by mail-sz.amlogic.com (10.28.11.5) with Microsoft SMTP Server id 15.1.2176.2; Tue, 7 Jun 2022 14:47:41 +0800 From: Liang Yang To: Miquel Raynal , CC: Liang Yang , Rob Herring , Richard Weinberger , Vignesh Raghavendra , Jerome Brunet , Neil Armstrong , Martin Blumenstingl , Kevin Hilman , Jianxin Pan , Victor Wan , XianWei Zhao , Kelvin Zhang , BiChao Zheng , YongHui Yu , , , Subject: [PATCH v6 4/5] dt-bindings: nand: meson: convert txt to yaml Date: Tue, 7 Jun 2022 14:47:29 +0800 Message-ID: <20220607064731.13367-5-liang.yang@amlogic.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220607064731.13367-1-liang.yang@amlogic.com> References: <20220607064731.13367-1-liang.yang@amlogic.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.28.8.21] X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org convert the amlogic,meson-name.txt to amlogic,meson-nand.yaml Signed-off-by: Liang Yang --- .../bindings/mtd/amlogic,meson-nand.txt | 55 ------------ .../bindings/mtd/amlogic,meson-nand.yaml | 88 +++++++++++++++++++ 2 files changed, 88 insertions(+), 55 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mtd/amlogic,meson-nand.txt create mode 100644 Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml diff --git a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.txt b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.txt deleted file mode 100644 index 5d5cdfef417f..000000000000 --- a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.txt +++ /dev/null @@ -1,55 +0,0 @@ -Amlogic NAND Flash Controller (NFC) for GXBB/GXL/AXG family SoCs - -This file documents the properties in addition to those available in -the MTD NAND bindings. - -Required properties: -- compatible : contains one of: - - "amlogic,meson-gxl-nfc" - - "amlogic,meson-axg-nfc" - -- reg : Offset and length of the register set - -- reg-names : "nfc" is the register set for NFC controller and "emmc" - is the register set for MCI controller. - -- clocks : - A list of phandle + clock-specifier pairs for the clocks listed - in clock-names. - -- clock-names: Should contain the following: - "core" - NFC module gate clock - "device" - parent clock for internal NFC - -Optional children nodes: -Children nodes represent the available nand chips. - -Other properties: -see Documentation/devicetree/bindings/mtd/nand-controller.yaml for generic bindings. - -Example demonstrate on AXG SoC: - - nand-controller@7800 { - compatible = "amlogic,meson-axg-nfc"; - reg = <0x0 0x7800 0x0 0x100>, - <0x0 0x7000 0x0 0x800>; - reg-names = "nfc", "emmc"; - #address-cells = <1>; - #size-cells = <0>; - interrupts = ; - - clocks = <&clkc CLKID_SD_EMMC_C>, - <&clkc CLKID_FCLK_DIV2>; - clock-names = "core", "device"; - - pinctrl-names = "default"; - pinctrl-0 = <&nand_pins>; - - nand@0 { - reg = <0>; - #address-cells = <1>; - #size-cells = <1>; - - nand-on-flash-bbt; - }; - }; diff --git a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml new file mode 100644 index 000000000000..42634e9c0d3c --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml @@ -0,0 +1,88 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/amlogic,meson-nand.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic NAND Flash Controller (NFC) for GXBB/GXL/AXG family SoCs + +allOf: + - $ref: "nand-controller.yaml" + +maintainers: + - liang.yang@amlogic.com + +properties: + compatible: + enum: + - "amlogic,meson-gxl-nfc" + - "amlogic,meson-axg-nfc" + + reg: + maxItems: 2 + + interrupts: + maxItems: 1 + + clocks: + minItems: 2 + + clock-names: + items: + - const: core + - const: device + +patternProperties: + "^nand@[0-7]$": + type: object + properties: + reg: + minimum: 0 + maximum: 1 + + nand-ecc-mode: + const: hw + + nand-ecc-step-size: + const: 1024 + + nand-ecc-strength: + enum: [8, 16, 24, 30, 40, 50, 60] + description: | + The ECC configurations that can be supported are as follows. + meson-gxl-nfc 8, 16, 24, 30, 40, 50, 60 + meson-axg-nfc 8 + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + +unevaluatedProperties: false + +examples: + - | + #include + #include + nand-controller@ffe07800 { + compatible = "amlogic,meson-axg-nfc"; + reg = <0xffe07800 0x100>, <0xffe07000 0x800>; + reg-names = "nfc", "emmc"; + interrupts = ; + clocks = <&clkc CLKID_SD_EMMC_C>, <&clkc CLKID_FCLK_DIV2>; + clock-names = "core", "device"; + + pinctrl-0 = <&nand_pins>; + pinctrl-names = "default"; + + #address-cells = <1>; + #size-cells = <0>; + + nand@0 { + reg = <0>; + }; + }; + +... -- 2.34.1