18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 28c2ecf20Sopenharmony_ci%YAML 1.2 38c2ecf20Sopenharmony_ci--- 48c2ecf20Sopenharmony_ci$id: http://devicetree.org/schemas/nvmem/nvmem.yaml# 58c2ecf20Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml# 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_cititle: NVMEM (Non Volatile Memory) Device Tree Bindings 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_cimaintainers: 108c2ecf20Sopenharmony_ci - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_cidescription: | 138c2ecf20Sopenharmony_ci This binding is intended to represent the location of hardware 148c2ecf20Sopenharmony_ci configuration data stored in NVMEMs like eeprom, efuses and so on. 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci On a significant proportion of boards, the manufacturer has stored 178c2ecf20Sopenharmony_ci some data on NVMEM, for the OS to be able to retrieve these 188c2ecf20Sopenharmony_ci information and act upon it. Obviously, the OS has to know about 198c2ecf20Sopenharmony_ci where to retrieve these data from, and where they are stored on the 208c2ecf20Sopenharmony_ci storage device. 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ciproperties: 238c2ecf20Sopenharmony_ci $nodename: 248c2ecf20Sopenharmony_ci pattern: "^(eeprom|efuse|nvram)(@.*|-[0-9a-f])*$" 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci "#address-cells": 278c2ecf20Sopenharmony_ci const: 1 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci "#size-cells": 308c2ecf20Sopenharmony_ci const: 1 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci read-only: 338c2ecf20Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/flag 348c2ecf20Sopenharmony_ci description: 358c2ecf20Sopenharmony_ci Mark the provider as read only. 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci wp-gpios: 388c2ecf20Sopenharmony_ci description: 398c2ecf20Sopenharmony_ci GPIO to which the write-protect pin of the chip is connected. 408c2ecf20Sopenharmony_ci The write-protect GPIO is asserted, when it's driven high 418c2ecf20Sopenharmony_ci (logical '1') to block the write operation. It's deasserted, 428c2ecf20Sopenharmony_ci when it's driven low (logical '0') to allow writing. 438c2ecf20Sopenharmony_ci maxItems: 1 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_cipatternProperties: 468c2ecf20Sopenharmony_ci "^.*@[0-9a-f]+$": 478c2ecf20Sopenharmony_ci type: object 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci properties: 508c2ecf20Sopenharmony_ci reg: 518c2ecf20Sopenharmony_ci maxItems: 1 528c2ecf20Sopenharmony_ci description: 538c2ecf20Sopenharmony_ci Offset and size in bytes within the storage device. 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci bits: 568c2ecf20Sopenharmony_ci maxItems: 1 578c2ecf20Sopenharmony_ci items: 588c2ecf20Sopenharmony_ci items: 598c2ecf20Sopenharmony_ci - minimum: 0 608c2ecf20Sopenharmony_ci maximum: 7 618c2ecf20Sopenharmony_ci description: 628c2ecf20Sopenharmony_ci Offset in bit within the address range specified by reg. 638c2ecf20Sopenharmony_ci - minimum: 1 648c2ecf20Sopenharmony_ci description: 658c2ecf20Sopenharmony_ci Size in bit within the address range specified by reg. 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci required: 688c2ecf20Sopenharmony_ci - reg 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_ciadditionalProperties: true 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_ciexamples: 738c2ecf20Sopenharmony_ci - | 748c2ecf20Sopenharmony_ci #include <dt-bindings/gpio/gpio.h> 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ci qfprom: eeprom@700000 { 778c2ecf20Sopenharmony_ci #address-cells = <1>; 788c2ecf20Sopenharmony_ci #size-cells = <1>; 798c2ecf20Sopenharmony_ci reg = <0x00700000 0x100000>; 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci wp-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>; 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ci /* ... */ 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ci /* Data cells */ 868c2ecf20Sopenharmony_ci tsens_calibration: calib@404 { 878c2ecf20Sopenharmony_ci reg = <0x404 0x10>; 888c2ecf20Sopenharmony_ci }; 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_ci tsens_calibration_bckp: calib_bckp@504 { 918c2ecf20Sopenharmony_ci reg = <0x504 0x11>; 928c2ecf20Sopenharmony_ci bits = <6 128>; 938c2ecf20Sopenharmony_ci }; 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_ci pvs_version: pvs-version@6 { 968c2ecf20Sopenharmony_ci reg = <0x6 0x2>; 978c2ecf20Sopenharmony_ci bits = <7 2>; 988c2ecf20Sopenharmony_ci }; 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ci speed_bin: speed-bin@c{ 1018c2ecf20Sopenharmony_ci reg = <0xc 0x1>; 1028c2ecf20Sopenharmony_ci bits = <2 3>; 1038c2ecf20Sopenharmony_ci }; 1048c2ecf20Sopenharmony_ci }; 1058c2ecf20Sopenharmony_ci 1068c2ecf20Sopenharmony_ci... 107