162306a36Sopenharmony_ciDevice-tree bindings for persistent memory regions
262306a36Sopenharmony_ci-----------------------------------------------------
362306a36Sopenharmony_ci
462306a36Sopenharmony_ciPersistent memory refers to a class of memory devices that are:
562306a36Sopenharmony_ci
662306a36Sopenharmony_ci	a) Usable as main system memory (i.e. cacheable), and
762306a36Sopenharmony_ci	b) Retain their contents across power failure.
862306a36Sopenharmony_ci
962306a36Sopenharmony_ciGiven b) it is best to think of persistent memory as a kind of memory mapped
1062306a36Sopenharmony_cistorage device. To ensure data integrity the operating system needs to manage
1162306a36Sopenharmony_cipersistent regions separately to the normal memory pool. To aid with that this
1262306a36Sopenharmony_cibinding provides a standardised interface for discovering where persistent
1362306a36Sopenharmony_cimemory regions exist inside the physical address space.
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ciBindings for the region nodes:
1662306a36Sopenharmony_ci-----------------------------
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ciRequired properties:
1962306a36Sopenharmony_ci	- compatible = "pmem-region"
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci	- reg = <base, size>;
2262306a36Sopenharmony_ci		The reg property should specify an address range that is
2362306a36Sopenharmony_ci		translatable to a system physical address range. This address
2462306a36Sopenharmony_ci		range should be mappable as normal system memory would be
2562306a36Sopenharmony_ci		(i.e cacheable).
2662306a36Sopenharmony_ci
2762306a36Sopenharmony_ci		If the reg property contains multiple address ranges
2862306a36Sopenharmony_ci		each address range will be treated as though it was specified
2962306a36Sopenharmony_ci		in a separate device node. Having multiple address ranges in a
3062306a36Sopenharmony_ci		node implies no special relationship between the two ranges.
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_ciOptional properties:
3362306a36Sopenharmony_ci	- Any relevant NUMA associativity properties for the target platform.
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci	- volatile; This property indicates that this region is actually
3662306a36Sopenharmony_ci	  backed by non-persistent memory. This lets the OS know that it
3762306a36Sopenharmony_ci	  may skip the cache flushes required to ensure data is made
3862306a36Sopenharmony_ci	  persistent after a write.
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ci	  If this property is absent then the OS must assume that the region
4162306a36Sopenharmony_ci	  is backed by non-volatile memory.
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ciExamples:
4462306a36Sopenharmony_ci--------------------
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ci	/*
4762306a36Sopenharmony_ci	 * This node specifies one 4KB region spanning from
4862306a36Sopenharmony_ci	 * 0x5000 to 0x5fff that is backed by non-volatile memory.
4962306a36Sopenharmony_ci	 */
5062306a36Sopenharmony_ci	pmem@5000 {
5162306a36Sopenharmony_ci		compatible = "pmem-region";
5262306a36Sopenharmony_ci		reg = <0x00005000 0x00001000>;
5362306a36Sopenharmony_ci	};
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ci	/*
5662306a36Sopenharmony_ci	 * This node specifies two 4KB regions that are backed by
5762306a36Sopenharmony_ci	 * volatile (normal) memory.
5862306a36Sopenharmony_ci	 */
5962306a36Sopenharmony_ci	pmem@6000 {
6062306a36Sopenharmony_ci		compatible = "pmem-region";
6162306a36Sopenharmony_ci		reg = < 0x00006000 0x00001000
6262306a36Sopenharmony_ci			0x00008000 0x00001000 >;
6362306a36Sopenharmony_ci		volatile;
6462306a36Sopenharmony_ci	};
6562306a36Sopenharmony_ci
66