From patchwork Sat Oct 22 08:26:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadym Kochan X-Patchwork-Id: 13015857 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A885AC433FE for ; Sat, 22 Oct 2022 08:28:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WrFYQXwmpOB2sypZfjm59IVMYZAJOJ5Rtp7BCGyM8k4=; b=R5Y0c6hQAmAniH Er+oHKc4mb/aiEpAIff3VTYCVs37NpPZCr6WcWNyRgVp7z2xasuPDVAutRQNUVRD48ltn2obaFf64 oDbom217geEERl92PqGiSwlCEsj0HI9v0OU7L2mg0QmhZS+7O9lyc4A7Oqclmo2WMk41DYrKJvUwX QpJXe50PUdIEi794/natIq8+qx0z/o5HB+am3PcmUqIs2GTH1RiZg5P8c0GAo6PNexnvSP1lZ2x0N Vj0LNxswQjXa7HFzID1XFUJNqBmGFkoLVINX9xkVxIa6ypFphZksiryzd2LNrZXmh1WZVo7CUQKWk fdJTI6XQZJyVelXIe3fA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1om9qS-00BjNh-Pi; Sat, 22 Oct 2022 08:27:04 +0000 Received: from mail-am0eur02on2125.outbound.protection.outlook.com ([40.107.247.125] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1om9qC-00BjH2-7A; Sat, 22 Oct 2022 08:26:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gzm/j6m7QhjA++Kwcee+FScTl+6x3N+pj0X1VgJBMUExJ3SjdipRjn/NWhh8PjNz2HRMfSCz1Qk+1GiXHZbbLtc+sf6aRuXyxUaVV/ofWueCOuyvrcXxUMqO7wUUeLuQLxopvNbwwYxhBWc31lmdyjWrl/oDE/yynJ9WrPrbaf1/Ty3bMC4v+iRntvbGvDU1XmUlMV9CECue5Xpddfs8RwJQcx0bFgQJBXlsdSasxrugJCRRBB4ugLtV+MmMjMEb8tvAlbZnel94/URFN7KJyVodYg30C53nalsAelq5eEPI4BMSmVaqtA2VFwLLCz6bdx2tN5cSkKyAuXp8Eutcjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=m0J3QKmhzf2vVuorTS8f+IqiJ57dyaHM5PuxO1cAy1U=; b=UdQu4X/giTNUv/vDvqc1Mkh0i+QhUby1nwDq8xJ5XC2oPQOSaUVauHo2J9joG3N+hs654XEo4kt5MMc0DuD14vwIBJ6sksuNpA90EfZybkPi1heZPrgZnAR2TlibJgqdjHjqHWHIexxZihZ8cyz5C7AMCZVTNgE2e9hGiWW3+3ho49WzcKB+IvA1WShcV0h4WI+lTnndF4aPY1//LrVsx3A10Q5YW5GxVduclRTrcWT2VWiBM3UpddPFUKZ8uqgQI1d5omf4/qByHcDZJcowULbOSIdr7ZqNuA5hAl3PtSiAYLz764xw/gQLxN8qS0VuJnDNeYoxcGFkKLiA7K2S1Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=plvision.eu; dmarc=pass action=none header.from=plvision.eu; dkim=pass header.d=plvision.eu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plvision.eu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m0J3QKmhzf2vVuorTS8f+IqiJ57dyaHM5PuxO1cAy1U=; b=ZGVmZ2auQIzTeZlYvHo7uClbxIp08GobrQfHLrjDxtxk1NvdtyDTe7DIW/k+feh27kOcAs0BTSXSOJTmIfqxDiXYDwEL57c7RamB+zk4Xv5LQFVgDrCy2dmtb3H69DYEi1SLHyq9qcoJDLzN3vr3QMioR/w25I/Ct6dzW5lCpOE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=plvision.eu; Received: from VI1P190MB0317.EURP190.PROD.OUTLOOK.COM (2603:10a6:802:38::26) by AS4P190MB1855.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:506::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.35; Sat, 22 Oct 2022 08:26:43 +0000 Received: from VI1P190MB0317.EURP190.PROD.OUTLOOK.COM ([fe80::a621:b61f:de56:b8]) by VI1P190MB0317.EURP190.PROD.OUTLOOK.COM ([fe80::a621:b61f:de56:b8%7]) with mapi id 15.20.5746.021; Sat, 22 Oct 2022 08:26:43 +0000 From: Vadym Kochan To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Elad Nachman , Vadym Kochan Subject: [PATCH v2 1/2] dt-bindings: mtd: marvell-nand: Convert to YAML DT scheme Date: Sat, 22 Oct 2022 11:26:25 +0300 Message-Id: <20221022082628.23876-2-vadym.kochan@plvision.eu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221022082628.23876-1-vadym.kochan@plvision.eu> References: <20221022082628.23876-1-vadym.kochan@plvision.eu> X-ClientProxiedBy: FR0P281CA0085.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1e::9) To VI1P190MB0317.EURP190.PROD.OUTLOOK.COM (2603:10a6:802:38::26) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1P190MB0317:EE_|AS4P190MB1855:EE_ X-MS-Office365-Filtering-Correlation-Id: e8e7d332-4e29-4d72-0359-08dab40726db X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4YX8Eurr1r4+gWaVVd2a84ISpJWrBZT8yH2zbxTkdG8+gOS041dbE5hQ/xd3eazZHUzNZf4tyuuDUDG3A9zI3eQgPL7mueDb6opMqHch9gByfdp488GolS2j3xdvV+ZfRkvjana7L69K7lhUmmbq+qXzJ2UmwsMi4cg9iX7R913M4I5OKxAHwfgbC/b/1RWt5WX8lW7f9NZC9XiO+Pkze+nDbWuVy8/31oG/HWAX5m2/Whi5W0XrjyFQZBSaMq+okB4qB2ClC7X81/WYnilOkKW3bW2gCMa3ml7t/wvhmrFng+QzF3bQxg9MKbSiQxk26HmKXjeSiolEW59vK7xdzVQJPTMDCSM2ISbHn7wCP0FPXVSApA0t3OPxP2FHZxZTpy/f2+hPddbPyEhF2BHoE56EV63e/fVfmjA/lc6xv6X5Cwj3zDWKxHC+Kv19vpOR+6BWcVTWWfpA63NHT1Ql8EQXgW6myFD+euD4+atAykDREj2QIW8t1UVJRKSxi5Z+hCVnBlC2pCdVV6tVIM5BoQMsZfJntFwOyidINOxOvqorex+PaWX1t1rma0VmZZZxf5v78WllHX9BPBeDPGuA4PfyfzWTCLubHH0Pw0wnvvT0OcVu5ztkdgsE0xiGynNvvV/SEqvIMfkI23fl9Qrcv68SVSWTjVtitQX0uKkoyHyUzToLUcAuGj3wxgC2Ip/RWXXMsN+iQcRL71aO3Sarh7TPvK0/auqUFgdj9SJ/smO+GVFR0gopMCMWyN1F+tLDCapNtWHw7QKZg0DtcOWB+vCEAMpbCXZ/SIm8jBSsfKs= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1P190MB0317.EURP190.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230022)(4636009)(34036004)(136003)(366004)(376002)(39840400004)(346002)(396003)(451199015)(1076003)(186003)(6506007)(52116002)(6512007)(107886003)(6666004)(5660300002)(83380400001)(7416002)(26005)(44832011)(41320700001)(30864003)(4326008)(2616005)(508600001)(54906003)(41300700001)(6486002)(966005)(8936002)(66556008)(110136005)(66946007)(8676002)(66476007)(316002)(2906002)(86362001)(36756003)(38350700002)(38100700002)(921005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 7JoBSWi18yyVj14eaVZs7OEAuXAcldcQzia5TuV2UQlor+SOcyVn/XrjQCrtsuPbPPpYnem8/tXdQ9hnP9v+OjuFZCMXwMqc8AfG/qrg7PXxcR5jRBkkvoghMOU8uozPgcYq7ZywTiSsq7KfnZLtjN0Voe8LCxl1x684jXOcZ6Mq48rMWvdP4H/EHKA7rswfoU5TWmrgZv+jVZ2Y779dy2yw+XXCaAqkIiKB2FtyTbNjeGZdjqbIKizaQJPKeiJWiT+4nUz2RsD2g1fPTmqk038eSI+ktU9/BWYRdst77BBXcj/2vCl8lGjd7yW46+0SzP3jypFSpG4w504GaIlOSejxcoa62hBNflbNmZZk6/W1eDMmRmmzNY2jxZ6Fh41TKIlDqLXWwc9TX82aFaQ4E6H4yUYAr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g9/mj2j7vMB9sLjJi63Z08s8IxlueR0Jzj4adnLPzGx/cl+LUkWr/H1ZPedUIjtouKIIAeHSmTksnb+gxdbQ/syWSLc0wBurHFheO3nAwsP7MFuod7ERXU34mlbqk8oRFqTC596V1vmOGrpEg== X-OriginatorOrg: plvision.eu X-MS-Exchange-CrossTenant-Network-Message-Id: e8e7d332-4e29-4d72-0359-08dab40726db X-MS-Exchange-CrossTenant-AuthSource: VI1P190MB0317.EURP190.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2022 08:26:43.7410 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 03707b74-30f3-46b6-a0e0-ff0a7438c9c4 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: PXpE2uiEYDxVvdkzQPWIeEfGmPbJq4vfu5xIXQN7ov0vxw1+9EBKVpx1kMFbTl4nT0Oa6AUF7F+1nmEdpbW8XgUkJxC3l2iNFvfIrxj6zjc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4P190MB1855 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221022_012648_295663_E89FD04F X-CRM114-Status: GOOD ( 21.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Switch the DT binding to a YAML schema to enable the DT validation. Dropped deprecated compatibles and properties described in txt file. Signed-off-by: Vadym Kochan --- v2: 1) Fixed warning by yamllint with incorrect indentation for compatible list .../bindings/mtd/marvell,nand-controller.yaml | 199 ++++++++++++++++++ .../devicetree/bindings/mtd/marvell-nand.txt | 126 ----------- 2 files changed, 199 insertions(+), 126 deletions(-) create mode 100644 Documentation/devicetree/bindings/mtd/marvell,nand-controller.yaml delete mode 100644 Documentation/devicetree/bindings/mtd/marvell-nand.txt diff --git a/Documentation/devicetree/bindings/mtd/marvell,nand-controller.yaml b/Documentation/devicetree/bindings/mtd/marvell,nand-controller.yaml new file mode 100644 index 000000000000..b3f4de7478cc --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/marvell,nand-controller.yaml @@ -0,0 +1,199 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/marvell,nand-controller.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell NAND Flash Controller (NFC) + +maintainers: + - Miquel Raynal + +properties: + + compatible: + oneOf: + - items: + - const: marvell,armada-8k-nand-controller + - const: marvell,armada370-nand-controller + - const: marvell,armada370-nand-controller + - const: marvell,pxa3xx-nand-controller + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + interrupts: + maxItems: 1 + + clocks: + minItems: 1 + maxItems: 2 + description: | + Shall reference the NAND controller clocks, the second one is + is only needed for the Armada 7K/8K SoCs + + clock-names: + items: + - const: core + - const: reg + description: | + Mandatory if there is a second clock, in this case there + should be one clock named "core" and another one named "reg" + + dmas: + maxItems: 1 + description: rxtx DMA channel + + dma-names: + items: + - const: rxtx + + marvell,system-controller: + $ref: /schemas/types.yaml#/definitions/phandle + description: Syscon node that handles NAND controller related registers + +patternProperties: + "^nand@[0-3]$": + type: object + properties: + + reg: + minimum: 0 + maximum: 3 + + nand-rb: + minimum: 0 + maximum: 1 + + nand-ecc-strength: + enum: [1, 4, 8] + + nand-on-flash-bbt: true + + nand-ecc-mode: true + + nand-ecc-algo: + description: | + This property is essentially useful when not using hardware ECC. + Howerver, it may be added when using hardware ECC for clarification + but will be ignored by the driver because ECC mode is chosen depending + on the page size and the strength required by the NAND chip. + This value may be overwritten with nand-ecc-strength property. + + nand-ecc-step-size: + const: 512 + description: | + Marvell's NAND flash controller does use fixed strength + (1-bit for Hamming, 16-bit for BCH), so the actual step size + will shrink or grow in order to fit the required strength. + Step sizes are not completely random for all and follow certain + patterns described in AN-379, "Marvell SoC NFC ECC". + + label: + $ref: /schemas/types.yaml#/definitions/string + + partitions: + type: object + $ref: "/schemas/mtd/partitions/partition.yaml" + + marvell,nand-keep-config: + description: | + Orders the driver not to take the timings from the core and + leaving them completely untouched. Bootloader timings will then + be used. + $ref: /schemas/types.yaml#/definitions/flag + + marvell,nand-enable-arbiter: + description: | + To enable the arbiter, all boards blindly used it, + this bit was set by the bootloader for many boards and even if + it is marked reserved in several datasheets, it might be needed to set + it (otherwise it is harmless) so whether or not this property is set, + the bit is selected by the driver. + $ref: /schemas/types.yaml#/definitions/flag + deprecated: true + + additionalProperties: false + + required: + - reg + - nand-rb + +additionalProperties: false + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + - interrupts + - clocks + +allOf: + - $ref: "nand-controller.yaml#" + + - if: + properties: + compatible: + contains: + const: marvell,pxa3xx-nand-controller + then: + required: + - dmas + - dma-names + else: + properties: + dmas: false + dma-names: false + + - if: + properties: + compatible: + contains: + const: marvell,armada-8k-nand-controller + then: + required: + - marvell,system-controller + else: + properties: + marvell,system-controller: false + +examples: + - | + #include + nand_controller: nand-controller@d0000 { + compatible = "marvell,armada370-nand-controller"; + reg = <0xd0000 0x54>; + #address-cells = <1>; + #size-cells = <0>; + interrupts = ; + clocks = <&coredivclk 0>; + + nand@0 { + reg = <0>; + label = "main-storage"; + nand-rb = <0>; + nand-ecc-mode = "hw"; + marvell,nand-keep-config; + nand-on-flash-bbt; + nand-ecc-strength = <4>; + nand-ecc-step-size = <512>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "Rootfs"; + reg = <0x00000000 0x40000000>; + }; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/mtd/marvell-nand.txt b/Documentation/devicetree/bindings/mtd/marvell-nand.txt deleted file mode 100644 index a2d9a0f2b683..000000000000 --- a/Documentation/devicetree/bindings/mtd/marvell-nand.txt +++ /dev/null @@ -1,126 +0,0 @@ -Marvell NAND Flash Controller (NFC) - -Required properties: -- compatible: can be one of the following: - * "marvell,armada-8k-nand-controller" - * "marvell,armada370-nand-controller" - * "marvell,pxa3xx-nand-controller" - * "marvell,armada-8k-nand" (deprecated) - * "marvell,armada370-nand" (deprecated) - * "marvell,pxa3xx-nand" (deprecated) - Compatibles marked deprecated support only the old bindings described - at the bottom. -- reg: NAND flash controller memory area. -- #address-cells: shall be set to 1. Encode the NAND CS. -- #size-cells: shall be set to 0. -- interrupts: shall define the NAND controller interrupt. -- clocks: shall reference the NAND controller clocks, the second one is - is only needed for the Armada 7K/8K SoCs -- clock-names: mandatory if there is a second clock, in this case there - should be one clock named "core" and another one named "reg" -- marvell,system-controller: Set to retrieve the syscon node that handles - NAND controller related registers (only required with the - "marvell,armada-8k-nand[-controller]" compatibles). - -Optional properties: -- label: see partition.txt. New platforms shall omit this property. -- dmas: shall reference DMA channel associated to the NAND controller. - This property is only used with "marvell,pxa3xx-nand[-controller]" - compatible strings. -- dma-names: shall be "rxtx". - This property is only used with "marvell,pxa3xx-nand[-controller]" - compatible strings. - -Optional children nodes: -Children nodes represent the available NAND chips. - -Required properties: -- reg: shall contain the native Chip Select ids (0-3). -- nand-rb: see nand-controller.yaml (0-1). - -Optional properties: -- marvell,nand-keep-config: orders the driver not to take the timings - from the core and leaving them completely untouched. Bootloader - timings will then be used. -- label: MTD name. -- nand-on-flash-bbt: see nand-controller.yaml. -- nand-ecc-mode: see nand-controller.yaml. Will use hardware ECC if not specified. -- nand-ecc-algo: see nand-controller.yaml. This property is essentially useful when - not using hardware ECC. Howerver, it may be added when using hardware - ECC for clarification but will be ignored by the driver because ECC - mode is chosen depending on the page size and the strength required by - the NAND chip. This value may be overwritten with nand-ecc-strength - property. -- nand-ecc-strength: see nand-controller.yaml. -- nand-ecc-step-size: see nand-controller.yaml. Marvell's NAND flash controller does - use fixed strength (1-bit for Hamming, 16-bit for BCH), so the actual - step size will shrink or grow in order to fit the required strength. - Step sizes are not completely random for all and follow certain - patterns described in AN-379, "Marvell SoC NFC ECC". - -See Documentation/devicetree/bindings/mtd/nand-controller.yaml for more details on -generic bindings. - - -Example: -nand_controller: nand-controller@d0000 { - compatible = "marvell,armada370-nand-controller"; - reg = <0xd0000 0x54>; - #address-cells = <1>; - #size-cells = <0>; - interrupts = ; - clocks = <&coredivclk 0>; - - nand@0 { - reg = <0>; - label = "main-storage"; - nand-rb = <0>; - nand-ecc-mode = "hw"; - marvell,nand-keep-config; - nand-on-flash-bbt; - nand-ecc-strength = <4>; - nand-ecc-step-size = <512>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "Rootfs"; - reg = <0x00000000 0x40000000>; - }; - }; - }; -}; - - -Note on legacy bindings: One can find, in not-updated device trees, -bindings slightly different than described above with other properties -described below as well as the partitions node at the root of a so -called "nand" node (without clear controller/chip separation). - -Legacy properties: -- marvell,nand-enable-arbiter: To enable the arbiter, all boards blindly - used it, this bit was set by the bootloader for many boards and even if - it is marked reserved in several datasheets, it might be needed to set - it (otherwise it is harmless) so whether or not this property is set, - the bit is selected by the driver. -- num-cs: Number of chip-select lines to use, all boards blindly set 1 - to this and for a reason, other values would have failed. The value of - this property is ignored. - -Example: - - nand0: nand@43100000 { - compatible = "marvell,pxa3xx-nand"; - reg = <0x43100000 90>; - interrupts = <45>; - dmas = <&pdma 97 0>; - dma-names = "rxtx"; - #address-cells = <1>; - marvell,nand-keep-config; - marvell,nand-enable-arbiter; - num-cs = <1>; - /* Partitions (optional) */ - }; From patchwork Sat Oct 22 08:26:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadym Kochan X-Patchwork-Id: 13015856 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D229EFA373D for ; Sat, 22 Oct 2022 08:28:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KhCuMPO3xmNUHLEf1xyuwWNgm7kM+Rdwk22q/jE/Dm0=; b=LYD2XWsRs2NCmu rIywSZN4tc0KJ6ZWJJi0ZCFMDDjnCtBzbhYGD/RpTU7SkPsgGUWvBxy+Zw0eQCALPGRbtFtGEG4rj 9+EYwQEprbLhedfTa2+gR3OOZ1yuPZwoXCmrQLLWBpewpBv6a0Leok7f5aLo3T/q5G1T6ZWurViec 6IPPO7aajaGqBDNjlj0GvOu0W5V9dVvBvVUTSzoPmNr9ySLfx4YfD6r9+nrMbcwjoWzfA+BoOSZaK +TlZSqi2T2Teurt3WDm5/WqkUYqErQxLD/3th8m89nIesP9bm/ELSTOCwlHP3JamANoNBZR7tSeUv K9r/NJaonE1CmnrgNpjQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1om9qe-00BjSO-Ct; Sat, 22 Oct 2022 08:27:16 +0000 Received: from mail-am0eur02on2125.outbound.protection.outlook.com ([40.107.247.125] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1om9qE-00BjH2-SC; Sat, 22 Oct 2022 08:26:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YVArlX3cAqyMr1bdc9R/XQdhUQzmlG+ZZOxjvgikpoBTramfeuFQawNRLVTVuo2zQnz+7XOkO8GDU2DTASlwleT8UKaaEv4gs7FJbWSEniYkgQTeoUtLuw4Zaaq2JdbHSqdnfvy80Kgw+KLgIHkCMdccj4uKIk5aZYo6LxcigzkVgiVO5i6YeHQmrTRwnQ5pSp7Co4DxegKL/9vTH5vUC13GeJe4n07HGGioHeunRIOqLA5tPEiEAUYMAm6BM3le4CZEmHYV5yFjXX2lwj40Q4ePoClsSzaqFWZnzW8KFRP2x7pFIuOI29ctyEQdxXxO3Gz5uqpysq0JuT2d2aaN8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bT3zKk5OE9MeHqRlwAWA3oRF6Rlnl/yzQNBN+2ksvzo=; b=NHLd8nZti2+Uw9WmelDP/sgMMINxyQ9WdbjZCnKoM8GR13vW7aXR9RJTTc5BI98FIVt4fPoH9Wu+sFc7Bv10PxB2S+EJu/1QyCO27qIm1HPCEhyFOWRpyBSgusmnZXPlPFehQ8Bpouf8Tis6gi2ud/WfNUovr8CvkbSQCa6xBIUqrZqewog1/rxZbW+7418ZiigCGl3vL3D5A2DKcXqPfJZSpStvh4hg483UpkgBcD+rtyHH+u/AoMxLeD2yst+6HSj/YrNLme3OrX2/XmsWwcPQJ3BoQUwEO3V1zBUkhpKVKX4zYLKSZInAJR2U2AppeacwMVTjt8AdHBEH6NRf2w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=plvision.eu; dmarc=pass action=none header.from=plvision.eu; dkim=pass header.d=plvision.eu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plvision.eu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bT3zKk5OE9MeHqRlwAWA3oRF6Rlnl/yzQNBN+2ksvzo=; b=syK5vhKMT/rbdMIyFUUvjSic9Sl4Go/DJhKenMCietKuSMA3kAToRc5IO8HlzBD6Pa42MTO8EF5g/zYKblNfZXtw8/2emeoqc7pb6VsHJuRYIhBAyMaxgLyUFMVof6IY8z5eMflxyA2KoWaHN4Gkrq2UNVlR5pTQUHR6Cp6byAI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=plvision.eu; Received: from VI1P190MB0317.EURP190.PROD.OUTLOOK.COM (2603:10a6:802:38::26) by AS4P190MB1855.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:506::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.35; Sat, 22 Oct 2022 08:26:46 +0000 Received: from VI1P190MB0317.EURP190.PROD.OUTLOOK.COM ([fe80::a621:b61f:de56:b8]) by VI1P190MB0317.EURP190.PROD.OUTLOOK.COM ([fe80::a621:b61f:de56:b8%7]) with mapi id 15.20.5746.021; Sat, 22 Oct 2022 08:26:46 +0000 From: Vadym Kochan To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Elad Nachman , Vadym Kochan Subject: [PATCH v2 2/2] arm64: dts: marvell: cp11x: Fix nand_controller node name according to YAML Date: Sat, 22 Oct 2022 11:26:26 +0300 Message-Id: <20221022082628.23876-3-vadym.kochan@plvision.eu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221022082628.23876-1-vadym.kochan@plvision.eu> References: <20221022082628.23876-1-vadym.kochan@plvision.eu> X-ClientProxiedBy: FR0P281CA0085.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1e::9) To VI1P190MB0317.EURP190.PROD.OUTLOOK.COM (2603:10a6:802:38::26) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1P190MB0317:EE_|AS4P190MB1855:EE_ X-MS-Office365-Filtering-Correlation-Id: 5fb581e3-b792-4b00-70b4-08dab4072896 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HpJP/snf/FCuhvzaYx0Ypk22lptjz9JAw5tcmKUXynUBe/yWWcvIX7NbZqhBKzglJlpAQzb7o3Q+o0bFbUpG+CEL12S4uYqzuTu2ID++XBlQ+Q1FCC6A/sbv1nxxW3xOf++89XY+y4MKsKXqFxANuAGEN6cxpr6uTy8LCdZFBYHgRJJtJgaRaARsNJOhcuJr0K3V/rUL+Q1NSw5Emw3eBbmu4Dk7Gtc8QmkMYn2D3VKLyE/sFNcTxIrPLhLJ/k/O5VqcEPCw3oAXNr2Vmf4RTX102KVavw+oeNBUsY1rRgxOvFWeU+3sAfb+v93F7EqDMhRJrw2pgc1z5bphgkbqSKKOCwi2KMdKXyrOiwXfQ1VWaO4X/GdgnX9VezV66cjmhLZC/UvdmJzz8hPJxlmdhvL3czYzH+jJgUYB5v09TlqA0pW5hvEK0K/KujWvw84Uv0FCBasdqqEP5WwcHz/uFXrLolyKQ5W0dPJfdszG85+5hI2BhUywToqVT10aK+6euU746Vs2J8Nr5GlMiRNeZuU0uhA9AADW4yDuu7t/bm+8EVYePLLfGY8qQWYF7fLp607izDB8U2asV7xW2r+goHR9FjaSIow9pX1lwtUvVYk1THuYhvaZzGjTQKnOoI5FOKCaQ6yO8snUUp2UtqgIzDxs/YdDaWhV18dCEUpGNrlADlTbaXQhGsDRgH0QjRiTMsV4DfeSrXCWraGwf1M+q2XKXHAN0yCgAZ016mWHbZwLq7f3c7TtP7TxOL+JM4iWwTLClNNedy5CL+MUdt+9ww== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1P190MB0317.EURP190.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230022)(4636009)(34036004)(136003)(366004)(376002)(39840400004)(346002)(396003)(451199015)(1076003)(186003)(6506007)(52116002)(6512007)(107886003)(6666004)(5660300002)(83380400001)(7416002)(4744005)(26005)(44832011)(41320700001)(4326008)(2616005)(508600001)(54906003)(41300700001)(6486002)(8936002)(66556008)(110136005)(66946007)(8676002)(66476007)(316002)(2906002)(86362001)(36756003)(38350700002)(38100700002)(921005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xUo88qt6FMiv37TsrIeKI22htIz3QIEFlcyZyN74EkCs3KxTnMfkHgNLcFm/A9RmyMxPNkCGfWS5PBb0gpy41gDqZVgMCznNxAeuVys+HA6anTNoijG9fsYSdVXGDF46pn2+vYY4QsZic6O8j2chvXSkOAhKUGkLNjCvTYb6z+GBOenWoOqRuNQCN3KE6Lqb5LGwMWRfKfdFFZIN0gWyLav545NmJr4Y4iLFyZdjh/ecbgHVwqZqhKEXaf1+exWxCF276ZoCdQP3Vmhz9XKD/TmdwTjxOPG2FLfY+NxVV/uCInBLuIUCFGAWWfxIclkCZcdGO3x+HL9LHA37FHsuwf5Eoxwn+wOusgUOpB57UyQyWFILLD7bt3JUrBgd/0Maz1RL2KqpOlVGYX2UPAuJQL0R7rI9PjEoLemefL1HcH09Xpm8xlBv5dpKf688MoIqGypftgpKCCWNUvGm1k9nwoB73HfnIZVHqLkTwqDu+aMtGrtd1LeLaxHLUfOxihP2OT0xpJMMq6gZds5ry7kjoys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plvision.eu X-MS-Exchange-CrossTenant-Network-Message-Id: 5fb581e3-b792-4b00-70b4-08dab4072896 X-MS-Exchange-CrossTenant-AuthSource: VI1P190MB0317.EURP190.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2022 08:26:46.6627 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 03707b74-30f3-46b6-a0e0-ff0a7438c9c4 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: a1MjkxFBa3KIKGqNiJHcJPzMMGDMz0lYUiOTy5eiTRljOMVrtUaYcPJJqJLFlG0f+y3tVjuoBuCGF5cDicX2cNG4cbI5d7cyGy5mnz13vNI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4P190MB1855 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221022_012650_961255_9A61EF4B X-CRM114-Status: GOOD ( 10.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Marvell NAND controller has now YAML to validate it's DT bindings, so change the node name of cp11x DTSI as it is required by nand-controller.yaml Signed-off-by: Vadym Kochan --- arch/arm64/boot/dts/marvell/armada-cp11x.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/marvell/armada-cp11x.dtsi b/arch/arm64/boot/dts/marvell/armada-cp11x.dtsi index 7d0043824f2a..982b180b33e6 100644 --- a/arch/arm64/boot/dts/marvell/armada-cp11x.dtsi +++ b/arch/arm64/boot/dts/marvell/armada-cp11x.dtsi @@ -468,7 +468,7 @@ status = "disabled"; }; - CP11X_LABEL(nand_controller): nand@720000 { + CP11X_LABEL(nand_controller): nand-controller@720000 { /* * Due to the limitation of the pins available * this controller is only usable on the CPM