From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6FF1F1A2C11 for ; Tue, 20 May 2025 02:17:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747707441; cv=none; b=jtC8ponRwgOdr/MSeJvMWznbiEiAgCS0AlpzATlb86JK0R1IOoZYZ26nkvmIcAxsBkk/fhAprq1aIwxwiUyWcSp3Kux2VL052yVwntfV+kqq/0BUxfXO35DclON7TMMjmTXokDhnMFl7kwQgCDs7VsiAFIFd/pYEs1Zxz9mr6mE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747707441; c=relaxed/simple; bh=0ELGpuT6X196vDWFxZcQyQLTCIT3NcPHZVI0ad0L2tU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=o2nDaGVxx3/TtAWdmO21qtZd5P6fY1LFI1G8TziiHBptoPCbiawLzqYYMzBJ0jaSXamcrLAvUsSh9OS8SLdXzs1fiMiiXUkoGydkR9oHmpLbsUMuU7b4YRE255yKTPEjost8m61SoIQZSO1PK33GhA/AdG9ES8BA6ZoiKnVOikA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pdp7.com; spf=none smtp.mailfrom=pdp7.com; dkim=pass (2048-bit key) header.d=pdp7-com.20230601.gappssmtp.com header.i=@pdp7-com.20230601.gappssmtp.com header.b=blEKiG6S; arc=none smtp.client-ip=209.85.215.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pdp7.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=pdp7.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pdp7-com.20230601.gappssmtp.com header.i=@pdp7-com.20230601.gappssmtp.com header.b="blEKiG6S" Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-af51596da56so3721713a12.0 for ; Mon, 19 May 2025 19:17:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pdp7-com.20230601.gappssmtp.com; s=20230601; t=1747707437; x=1748312237; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Qgc1WWyAa4IDJXeZMlquPom4mmmQ18LfyHJ9MogW4mM=; b=blEKiG6SpqCLBtjghxT5NAgvhZhieKpNdlgX5smT8ZbUcTaROo8ghLIw5txeIQLPpV pjGtgGpPmRCQsNq1+Aw5sdontUtUswGqkOP/rC5aoGanD08hD9SlBhoRJlsWQZXiWVFm qitIw0GVUpNGsy51d/z/LiKr+VwbZoUhZhBvnEMoweVwDhGnu6qcrXcFMo5LTrBtCo8m fdu9tVsa32QOuwo0in4i6BXWsn31lvrzrV7sTzs7Ej1XplqCzK1lRTEglX4pE94r2gR/ jES+e4EIq2XQKEDV+C+A8Y3/RC7PQGc25zJi3+nmIcfZbAguYCwJFixX/+TR4vLGq/ys GjDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747707437; x=1748312237; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Qgc1WWyAa4IDJXeZMlquPom4mmmQ18LfyHJ9MogW4mM=; b=qAqUaVjJF5EFA+XA9IRIaFmLw5XXwc1Kb18AbmHsTNLyEuscmeFGb8WZKFHbmPOyEt doxNSjyU8xpswccF1ZqaNtF4+QNQfc0ACExOzWTIZf6cQvUubEtu0qxig/uXualFHBgU x4DYtmEJrz2S4be7+iY13V9uXqkNu8fF3boKuwWRvIOqReb2v1D6dmDu6aHb0PhDhPt9 m5LRuQ6iHTaiV7SGZIFAyrHRZ3LtcIQLzwx1vurTZ8NghTQSsAp+3R6NKV0rRysQGO6s r7B9CI2hn5VNfbKfc/xOkq1AnoMIdGmcLn4a+F/bEBgFnJLRYKPtkKqwf4Np+3FvyPmn 49gw== X-Forwarded-Encrypted: i=1; AJvYcCWdh0vD9VvQKrXYEQJn9yM/WE3xQ0RuQWmGXvJEYQlSTQ1Q02bzhUNSTpT18eXCJUW0mvmBYnt7A7//@vger.kernel.org X-Gm-Message-State: AOJu0YxV0z0U6orNltMeD10bI1JZ4ULcaMOHIY6VyHNru1v2EGdk4MBn bHUsCIvAioYeXFpCRPKwhjaNvqlzp6lXVSXYeHvQQI0wmsyQQap1qs3k7euohVwWQ9UD0iqlVXi SNivK X-Gm-Gg: ASbGncsMqrd/23kPYmmZwK128RzoiHrQrGgX59pkr2c+sXroo4Tc/6RMiRxapcMTrHP QXa0KORCAe52Srea5Hf0r/RqOCDaNBLMDnAsShNz+rG5jHJ9ahHWej2fxnMeCBLJ5lHij2Wyl4P QwZPJkZJaC2ylCiUt6euzdreoeAIZrB1exrw83gphAhh/mDzvX8QDnm4SpOHpEdYQJQ1YFg1kXO gvcCvgVmhIe61MYBJ0POer0YYeUOTqRgqm4bkCEflbiU79FQYggWo0+QRdhTY+0QkOFlTKPV419 ppYrtT7gKDIru+HiGfOQMeVXT64Sb3ORSS7qbawORwy31L/f+DSQMjjillCA6+b4i+NSmJDTbeG ubkRWD6HUHg== X-Google-Smtp-Source: AGHT+IGIdIH2mqsPlYNb8bZRO78i8ULrukpluljyciVMskkMfers0XHXo5DCyjiVjVUdhAJ/Ropdmw== X-Received: by 2002:a17:903:18d:b0:220:c4e8:3b9d with SMTP id d9443c01a7336-231d4596b26mr191179295ad.37.1747707437566; Mon, 19 May 2025 19:17:17 -0700 (PDT) Received: from x1.tailc1103.ts.net (97-120-251-212.ptld.qwest.net. [97.120.251.212]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-231d4ebaf5esm66904945ad.194.2025.05.19.19.17.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 May 2025 19:17:17 -0700 (PDT) From: Drew Fustini To: Oliver O'Halloran , Rob Herring , Krzysztof Kozlowski , Conor Dooley , nvdimm@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Drew Fustini Subject: [PATCH] dt-bindings: pmem: Convert binding to YAML Date: Mon, 19 May 2025 19:14:40 -0700 Message-Id: <20250520021440.24324-1-drew@pdp7.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Convert the PMEM device tree binding from text to YAML. This will allow device trees with pmem-region nodes to pass dtbs_check. Signed-off-by: Drew Fustini --- v2: remove the txt file to make the conversion complete .../devicetree/bindings/pmem/pmem-region.txt | 65 ------------------- .../devicetree/bindings/pmem/pmem-region.yaml | 49 ++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 50 insertions(+), 66 deletions(-) delete mode 100644 Documentation/devicetree/bindings/pmem/pmem-region.txt create mode 100644 Documentation/devicetree/bindings/pmem/pmem-region.yaml diff --git a/Documentation/devicetree/bindings/pmem/pmem-region.txt b/Documentation/devicetree/bindings/pmem/pmem-region.txt deleted file mode 100644 index cd79975e85ec..000000000000 --- a/Documentation/devicetree/bindings/pmem/pmem-region.txt +++ /dev/null @@ -1,65 +0,0 @@ -Device-tree bindings for persistent memory regions ------------------------------------------------------ - -Persistent memory refers to a class of memory devices that are: - - a) Usable as main system memory (i.e. cacheable), and - b) Retain their contents across power failure. - -Given b) it is best to think of persistent memory as a kind of memory mapped -storage device. To ensure data integrity the operating system needs to manage -persistent regions separately to the normal memory pool. To aid with that this -binding provides a standardised interface for discovering where persistent -memory regions exist inside the physical address space. - -Bindings for the region nodes: ------------------------------ - -Required properties: - - compatible = "pmem-region" - - - reg = ; - The reg property should specify an address range that is - translatable to a system physical address range. This address - range should be mappable as normal system memory would be - (i.e cacheable). - - If the reg property contains multiple address ranges - each address range will be treated as though it was specified - in a separate device node. Having multiple address ranges in a - node implies no special relationship between the two ranges. - -Optional properties: - - Any relevant NUMA associativity properties for the target platform. - - - volatile; This property indicates that this region is actually - backed by non-persistent memory. This lets the OS know that it - may skip the cache flushes required to ensure data is made - persistent after a write. - - If this property is absent then the OS must assume that the region - is backed by non-volatile memory. - -Examples: --------------------- - - /* - * This node specifies one 4KB region spanning from - * 0x5000 to 0x5fff that is backed by non-volatile memory. - */ - pmem@5000 { - compatible = "pmem-region"; - reg = <0x00005000 0x00001000>; - }; - - /* - * This node specifies two 4KB regions that are backed by - * volatile (normal) memory. - */ - pmem@6000 { - compatible = "pmem-region"; - reg = < 0x00006000 0x00001000 - 0x00008000 0x00001000 >; - volatile; - }; - diff --git a/Documentation/devicetree/bindings/pmem/pmem-region.yaml b/Documentation/devicetree/bindings/pmem/pmem-region.yaml new file mode 100644 index 000000000000..a4aa4ce3318b --- /dev/null +++ b/Documentation/devicetree/bindings/pmem/pmem-region.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pmem-region.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +maintainers: + - Bjorn Helgaas + - Oliver O'Halloran + +title: Persistent Memory Regions + +description: | + Persistent memory refers to a class of memory devices that are: + + a) Usable as main system memory (i.e. cacheable), and + b) Retain their contents across power failure. + + Given b) it is best to think of persistent memory as a kind of memory mapped + storage device. To ensure data integrity the operating system needs to manage + persistent regions separately to the normal memory pool. To aid with that this + binding provides a standardised interface for discovering where persistent + memory regions exist inside the physical address space. + +properties: + compatible: + const: pmem-region + + reg: + maxItems: 1 + + volatile: + description: | + Indicates the region is volatile (non-persistent) and the OS can skip + cache flushes for writes + type: boolean + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + pmem@5000 { + compatible = "pmem-region"; + reg = <0x00005000 0x00001000>; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 96b827049501..68012219f3f7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13564,7 +13564,7 @@ M: Oliver O'Halloran L: nvdimm@lists.linux.dev S: Supported Q: https://patchwork.kernel.org/project/linux-nvdimm/list/ -F: Documentation/devicetree/bindings/pmem/pmem-region.txt +F: Documentation/devicetree/bindings/pmem/pmem-region.yaml F: drivers/nvdimm/of_pmem.c LIBNVDIMM: NON-VOLATILE MEMORY DEVICE SUBSYSTEM -- 2.34.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA2393FBB3 for ; Wed, 28 May 2025 06:17:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=209.85.214.171 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748413031; cv=fail; b=DdMq5WLVNX05I+FVfOXH3yYsUfRQ90rlBGNr0N/RXyFq79RRoHdj9o/85G4hCm6O982Owmwqf3GCnPaUAM+w+mTCrz9xix+Up5R2Iphf88RFe9QBN7Eb5egBYdASGC3pWfCX/eIf/JbcfexVYVbUsQtmLgv9U+aiZXtM/tBCyKs= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748413031; c=relaxed/simple; bh=MCWis4V4cMntS12cdVoBUX/N1eeYl/hMBd518yUZHo0=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=YpqydhcjoTjhnIGsAvdnU6tKnwuGS5keTOl8vbiRmMsdFNfMyxvsgnDWVQ2RWwZvRjl+GmG7+yVyfF8Nmnmf3OZZ5W/igzDd+dvHJkB92JYpHH5Sbb+J/+iWNNwzCNZYclVih0XPaQSixYhN6Yr2/FdNcMtkjJEysamxR++BrnE= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pdp7.com; spf=none smtp.mailfrom=pdp7.com; dkim=permerror (0-bit key) header.d=pdp7-com.20230601.gappssmtp.com header.i=@pdp7-com.20230601.gappssmtp.com header.b=2wbrvJXD; arc=none smtp.client-ip=209.85.215.174; dmarc=none (p=none dis=none) header.from=pdp7.com; spf=none smtp.mailfrom=pdp7.com; arc=fail smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pdp7.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=pdp7.com Authentication-Results: smtp.subspace.kernel.org; dkim=permerror (0-bit key) header.d=pdp7-com.20230601.gappssmtp.com header.i=@pdp7-com.20230601.gappssmtp.com header.b="2wbrvJXD" Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-2346765d5b0so27589455ad.2 for ; Tue, 27 May 2025 23:17:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748413029; x=1749017829; h=content-transfer-encoding:lines:status:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:dkim-signature :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UGq8qB8BWQm+0UxnK/sByjGjmVPXqUa9SVsBlG80qmM=; b=wOxWLblbdyRBFMZx7gtIZ6eovfC3ItzxCAMPrg6CUznbtRdq35zCDWYJA/qPPxs+Dk YKlCe5Gx7I3zCUhQm7Ax9q4T50WPv2/Hyn6SfE3vElpB26ynisKdlfXdR9XZWAEEEmef ZZHmnzhTpGZUWArcYbF2civBDMfUdZjNMxYqwcOgkp2vG3POm0+y3NjiNrEPfJcCoVJ0 JK2HbOyCSd8hxrZ5jLsHDJqtscRWiUUMaDrAGnMRd6cGiUiWp+W9Dbbvz9ZeL2vt+24t J6L2ggt+5UepKo11zRgOXLmmMs6lqWwm8cQ06idzOr5s1Xsb9rrIg5nridwTNeIDP5NR Xxxw== X-Forwarded-Encrypted: i=2; AJvYcCXLYiu0jlK9BMvDwGRmKnyA75vsmOG1+7v86pPkHl44JI0swVAzY+PDUzG2COiER5lBjrTIHC9mUPXE@vger.kernel.org X-Gm-Message-State: AOJu0YzGIXlRuxWWdGb8ui2Qr/WhE9QXUyCOAGUsxF1AeFFUfRLHEkt2 LYXuYjRbdhjrJlE8pjjLP1YQA7JVm+QcGC2EhYGniSf9x8sWcc2QlXtyl7Oil8CM7HA= X-Gm-Gg: ASbGncu1Po3ukV0yWfnt3l1m0KIfYo/IVe3fAqiLh8nvq8cS5IwVrBJDnG2hOy95pJt OEnB00DB2mdOT0V1slkG/tLnY2mZqxsDUezTz+zZy2tPX32eNoKH3tYWTKVglvSLbrfA+UWiK7x wNximkwgA9L27ZMUQgzgyNBwdZhMulno8181X1n9DSCaIvv0eIhGgNjLoqHLKWaM+Vts0b00GAc qZ1Yw1W6iJytmpt4fOCkKZlVjFYejkSWWBvTgkiPdUH6dB6YPPE7QEOJ4lzOhEV1cOSxkrLm1/1 hkyx0pj+Sat3ernmkcImOvonb7fXPj41lV5F6riLSu+3YbfTNAbb4ejDAklzgM3wznwa15AzTJo sj5k0u8q5uA== X-Google-Smtp-Source: AGHT+IFzBJdsDTUHGKodotOsjn8lID1Nfc3u4PJKKlIRamyNvsoDz6+vH3RLaEonKqIClc+bFdyRvA== X-Received: by 2002:a17:902:ea0e:b0:234:cc7c:d2e8 with SMTP id d9443c01a7336-234cc7cd572mr20347475ad.37.1748413028872; Tue, 27 May 2025 23:17:08 -0700 (PDT) Received: from x1.tailc1103.ts.net (97-120-251-212.ptld.qwest.net. [97.120.251.212]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-234d2fd253esm4603935ad.16.2025.05.27.23.17.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 May 2025 23:17:08 -0700 (PDT) From: Drew Fustini To: drew@pdp7.com, Oliver O'Halloran , Rob Herring , Krzysztof Kozlowski , Conor Dooley , nvdimm@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RESEND PATCH v2] dt-bindings: pmem: Convert binding to YAML Date: Tue, 27 May 2025 23:17:04 -0700 Message-ID: <20250520021440.24324-1-drew@pdp7.com> X-Mailer: git-send-email 2.34.1 Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A0D178F45 for ; Tue, 20 May 2025 02:17:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747707441; cv=none; b=pvu0oByWG/Q8/vzvtLA1TwXVmh6idczRFHbFiV2CQReRaclSE6MhN3VLg83+uTFC6JJ/wT++ybVAv+vnJZFEawkKwWLYOLFNKc7glGTJxSnUBBIxqqnOFAi/hRLXzj465opA044fMDHEARCY1lCN2XeTgHwviH6kFzLnuhXdfcQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747707441; c=relaxed/simple; bh=0ELGpuT6X196vDWFxZcQyQLTCIT3NcPHZVI0ad0L2tU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=o2nDaGVxx3/TtAWdmO21qtZd5P6fY1LFI1G8TziiHBptoPCbiawLzqYYMzBJ0jaSXamcrLAvUsSh9OS8SLdXzs1fiMiiXUkoGydkR9oHmpLbsUMuU7b4YRE255yKTPEjost8m61SoIQZSO1PK33GhA/AdG9ES8BA6ZoiKnVOikA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pdp7.com; spf=none smtp.mailfrom=pdp7.com; dkim=pass (2048-bit key) header.d=pdp7-com.20230601.gappssmtp.com header.i=@pdp7-com.20230601.gappssmtp.com header.b=2wbrvJXD; arc=none smtp.client-ip=209.85.215.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pdp7.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=pdp7.com Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-b1ff9b276c2so3076177a12.1 for ; Mon, 19 May 2025 19:17:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pdp7-com.20230601.gappssmtp.com; s=20230601; t=1747707437; x=1748312237; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Qgc1WWyAa4IDJXeZMlquPom4mmmQ18LfyHJ9MogW4mM=; b=2wbrvJXDrz69BG0Lfo0ABVVGfxRC/OAO1Tz+B+DjH2fjPAeiySTYhoZOjXwnZDgEck W2mqGX2L5CuVv1YR3PIvvEDTFm8wxq4G2DoJXvdbtQWWsDd8sAM0PXttKrTVZJCWBKp4 gC2r3GnGd7aG/EwzcWTp4wFPIH5iTKPRJnUXW/sqOsInT9PbT3ZjUIhjSOtt7E11YD4K VBUt7613W3mNgA/gXIFy3BcYRzenh+azTNQULkZgGBGKPGaFbuWKYREEwlwc+fsNJds2 IU82MJ4Ap9ZPY46UT9kwm7mXYu62XmYcLbvw8pZpjmioaf+doJYfYqOIQ3UtZ+gOUtBN RvYQ== X-Forwarded-Encrypted: i=1; AJvYcCU8mVG72K/47zIu5yyAOWtKZ602UUhCnMwwMgNMzx8nLWYC+++b495NcJKwhefzle55drbRQN0=@lists.linux.dev X-Received: by 2002:a17:903:18d:b0:220:c4e8:3b9d with SMTP id d9443c01a7336-231d4596b26mr191179295ad.37.1747707437566; Mon, 19 May 2025 19:17:17 -0700 (PDT) Received: from x1.tailc1103.ts.net (97-120-251-212.ptld.qwest.net. [97.120.251.212]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-231d4ebaf5esm66904945ad.194.2025.05.19.19.17.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 May 2025 19:17:17 -0700 (PDT) X-Mailer: git-send-email 2.34.1 Precedence: bulk Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: <20250528061704.8oPGHCwfZdsPra2Myo9fqrW9gSkvucYDWKUuzPDGZUA@z> Convert the PMEM device tree binding from text to YAML. This will allow device trees with pmem-region nodes to pass dtbs_check. Signed-off-by: Drew Fustini --- v2 resend: - actually put v2 in the Subject - add Conor's Acked-by - https://lore.kernel.org/all/20250520-refract-fling-d064e11ddbdf@spud/ v2: - remove the txt file to make the conversion complete - https://lore.kernel.org/all/20250520021440.24324-1-drew@pdp7.com/ v1: - https://lore.kernel.org/all/20250518035539.7961-1-drew@pdp7.com/ .../devicetree/bindings/pmem/pmem-region.txt | 65 ------------------- .../devicetree/bindings/pmem/pmem-region.yaml | 49 ++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 50 insertions(+), 66 deletions(-) delete mode 100644 Documentation/devicetree/bindings/pmem/pmem-region.txt create mode 100644 Documentation/devicetree/bindings/pmem/pmem-region.yaml diff --git a/Documentation/devicetree/bindings/pmem/pmem-region.txt b/Documentation/devicetree/bindings/pmem/pmem-region.txt deleted file mode 100644 index cd79975e85ec..000000000000 --- a/Documentation/devicetree/bindings/pmem/pmem-region.txt +++ /dev/null @@ -1,65 +0,0 @@ -Device-tree bindings for persistent memory regions ------------------------------------------------------ - -Persistent memory refers to a class of memory devices that are: - - a) Usable as main system memory (i.e. cacheable), and - b) Retain their contents across power failure. - -Given b) it is best to think of persistent memory as a kind of memory mapped -storage device. To ensure data integrity the operating system needs to manage -persistent regions separately to the normal memory pool. To aid with that this -binding provides a standardised interface for discovering where persistent -memory regions exist inside the physical address space. - -Bindings for the region nodes: ------------------------------ - -Required properties: - - compatible = "pmem-region" - - - reg = ; - The reg property should specify an address range that is - translatable to a system physical address range. This address - range should be mappable as normal system memory would be - (i.e cacheable). - - If the reg property contains multiple address ranges - each address range will be treated as though it was specified - in a separate device node. Having multiple address ranges in a - node implies no special relationship between the two ranges. - -Optional properties: - - Any relevant NUMA associativity properties for the target platform. - - - volatile; This property indicates that this region is actually - backed by non-persistent memory. This lets the OS know that it - may skip the cache flushes required to ensure data is made - persistent after a write. - - If this property is absent then the OS must assume that the region - is backed by non-volatile memory. - -Examples: --------------------- - - /* - * This node specifies one 4KB region spanning from - * 0x5000 to 0x5fff that is backed by non-volatile memory. - */ - pmem@5000 { - compatible = "pmem-region"; - reg = <0x00005000 0x00001000>; - }; - - /* - * This node specifies two 4KB regions that are backed by - * volatile (normal) memory. - */ - pmem@6000 { - compatible = "pmem-region"; - reg = < 0x00006000 0x00001000 - 0x00008000 0x00001000 >; - volatile; - }; - diff --git a/Documentation/devicetree/bindings/pmem/pmem-region.yaml b/Documentation/devicetree/bindings/pmem/pmem-region.yaml new file mode 100644 index 000000000000..a4aa4ce3318b --- /dev/null +++ b/Documentation/devicetree/bindings/pmem/pmem-region.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pmem-region.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +maintainers: + - Bjorn Helgaas + - Oliver O'Halloran + +title: Persistent Memory Regions + +description: | + Persistent memory refers to a class of memory devices that are: + + a) Usable as main system memory (i.e. cacheable), and + b) Retain their contents across power failure. + + Given b) it is best to think of persistent memory as a kind of memory mapped + storage device. To ensure data integrity the operating system needs to manage + persistent regions separately to the normal memory pool. To aid with that this + binding provides a standardised interface for discovering where persistent + memory regions exist inside the physical address space. + +properties: + compatible: + const: pmem-region + + reg: + maxItems: 1 + + volatile: + description: | + Indicates the region is volatile (non-persistent) and the OS can skip + cache flushes for writes + type: boolean + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + pmem@5000 { + compatible = "pmem-region"; + reg = <0x00005000 0x00001000>; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 96b827049501..68012219f3f7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13564,7 +13564,7 @@ M: Oliver O'Halloran L: nvdimm@lists.linux.dev S: Supported Q: https://patchwork.kernel.org/project/linux-nvdimm/list/ -F: Documentation/devicetree/bindings/pmem/pmem-region.txt +F: Documentation/devicetree/bindings/pmem/pmem-region.yaml F: drivers/nvdimm/of_pmem.c LIBNVDIMM: NON-VOLATILE MEMORY DEVICE SUBSYSTEM -- 2.34.1