1c61f0256SMaxime Ripard# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2c61f0256SMaxime Ripard%YAML 1.2 3c61f0256SMaxime Ripard--- 4c61f0256SMaxime Ripard$id: http://devicetree.org/schemas/nvmem/nvmem.yaml# 5c61f0256SMaxime Ripard$schema: http://devicetree.org/meta-schemas/core.yaml# 6c61f0256SMaxime Ripard 7dd3cb467SAndrew Lunntitle: NVMEM (Non Volatile Memory) 8c61f0256SMaxime Ripard 9c61f0256SMaxime Ripardmaintainers: 10c61f0256SMaxime Ripard - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 11c61f0256SMaxime Ripard 12c61f0256SMaxime Riparddescription: | 13c61f0256SMaxime Ripard This binding is intended to represent the location of hardware 14c61f0256SMaxime Ripard configuration data stored in NVMEMs like eeprom, efuses and so on. 15c61f0256SMaxime Ripard 16c61f0256SMaxime Ripard On a significant proportion of boards, the manufacturer has stored 17c61f0256SMaxime Ripard some data on NVMEM, for the OS to be able to retrieve these 18c61f0256SMaxime Ripard information and act upon it. Obviously, the OS has to know about 19c61f0256SMaxime Ripard where to retrieve these data from, and where they are stored on the 20c61f0256SMaxime Ripard storage device. 21c61f0256SMaxime Ripard 22c61f0256SMaxime Ripardproperties: 23c61f0256SMaxime Ripard "#address-cells": 24c61f0256SMaxime Ripard const: 1 25c61f0256SMaxime Ripard 26c61f0256SMaxime Ripard "#size-cells": 27c61f0256SMaxime Ripard const: 1 28c61f0256SMaxime Ripard 29c61f0256SMaxime Ripard read-only: 30c61f0256SMaxime Ripard $ref: /schemas/types.yaml#/definitions/flag 31c61f0256SMaxime Ripard description: 32c61f0256SMaxime Ripard Mark the provider as read only. 33c61f0256SMaxime Ripard 3414f49573SKhouloud Touil wp-gpios: 3514f49573SKhouloud Touil description: 3614f49573SKhouloud Touil GPIO to which the write-protect pin of the chip is connected. 3714f49573SKhouloud Touil The write-protect GPIO is asserted, when it's driven high 3814f49573SKhouloud Touil (logical '1') to block the write operation. It's deasserted, 3914f49573SKhouloud Touil when it's driven low (logical '0') to allow writing. 4014f49573SKhouloud Touil maxItems: 1 4114f49573SKhouloud Touil 4227dfc44eSMiquel Raynal nvmem-layout: 4327dfc44eSMiquel Raynal $ref: /schemas/nvmem/layouts/nvmem-layout.yaml 4427dfc44eSMiquel Raynal description: 4527dfc44eSMiquel Raynal Alternative to the statically defined nvmem cells, this 4627dfc44eSMiquel Raynal container may reference more advanced (dynamic) layout 4727dfc44eSMiquel Raynal parsers. 4827dfc44eSMiquel Raynal 49c61f0256SMaxime RipardpatternProperties: 504b2545ddSKunihiko Hayashi "@[0-9a-f]+(,[0-7])?$": 51c61f0256SMaxime Ripard type: object 52*d63a4225SRafał Miłecki allOf: 53*d63a4225SRafał Miłecki - $ref: layouts/fixed-cell.yaml 54*d63a4225SRafał Miłecki - properties: 55*d63a4225SRafał Miłecki compatible: false 56bd912c99SRafał Miłecki deprecated: true 57c61f0256SMaxime Ripard 586a0e321eSRob HerringadditionalProperties: true 596a0e321eSRob Herring 60c61f0256SMaxime Ripardexamples: 61c61f0256SMaxime Ripard - | 6214f49573SKhouloud Touil #include <dt-bindings/gpio/gpio.h> 6314f49573SKhouloud Touil 64c61f0256SMaxime Ripard qfprom: eeprom@700000 { 6542b868b0SMiquel Raynal compatible = "qcom,msm8974-qfprom", "qcom,qfprom"; 66c61f0256SMaxime Ripard #address-cells = <1>; 67c61f0256SMaxime Ripard #size-cells = <1>; 6851a21e0eSRob Herring reg = <0x00700000 0x100000>; 6951a21e0eSRob Herring 7014f49573SKhouloud Touil wp-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>; 71c61f0256SMaxime Ripard 72c61f0256SMaxime Ripard /* ... */ 73c61f0256SMaxime Ripard 74fa7fbe53SRafał Miłecki nvmem-layout { 75fa7fbe53SRafał Miłecki compatible = "fixed-layout"; 76fa7fbe53SRafał Miłecki #address-cells = <1>; 77fa7fbe53SRafał Miłecki #size-cells = <1>; 78fa7fbe53SRafał Miłecki 79c61f0256SMaxime Ripard /* Data cells */ 80c61f0256SMaxime Ripard tsens_calibration: calib@404 { 81c61f0256SMaxime Ripard reg = <0x404 0x10>; 82c61f0256SMaxime Ripard }; 83c61f0256SMaxime Ripard 84c61f0256SMaxime Ripard tsens_calibration_bckp: calib_bckp@504 { 85c61f0256SMaxime Ripard reg = <0x504 0x11>; 86c61f0256SMaxime Ripard bits = <6 128>; 87c61f0256SMaxime Ripard }; 88c61f0256SMaxime Ripard 89c61f0256SMaxime Ripard pvs_version: pvs-version@6 { 90c61f0256SMaxime Ripard reg = <0x6 0x2>; 91c61f0256SMaxime Ripard bits = <7 2>; 92c61f0256SMaxime Ripard }; 93c61f0256SMaxime Ripard 94c61f0256SMaxime Ripard speed_bin: speed-bin@c{ 95c61f0256SMaxime Ripard reg = <0xc 0x1>; 96c61f0256SMaxime Ripard bits = <2 3>; 97c61f0256SMaxime Ripard }; 98c61f0256SMaxime Ripard }; 99fa7fbe53SRafał Miłecki }; 100c61f0256SMaxime Ripard 101c61f0256SMaxime Ripard... 102