dt-bindings: microchip-otpc: document Microchip OTPC

Document Microchip OTP controller.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220706100627.6534-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Claudiu Beznea 2022-07-06 11:06:21 +01:00 committed by Greg Kroah-Hartman
parent b7e241bbff
commit 4d5e3b06e1
2 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,50 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/nvmem/microchip,sama7g5-otpc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Microchip SAMA7G5 OTP Controller (OTPC)
maintainers:
- Claudiu Beznea <claudiu.beznea@microchip.com>
description: |
OTP controller drives a NVMEM memory where system specific data
(e.g. calibration data for analog cells, hardware configuration
settings, chip identifiers) or user specific data could be stored.
allOf:
- $ref: "nvmem.yaml#"
properties:
compatible:
items:
- const: microchip,sama7g5-otpc
- const: syscon
reg:
maxItems: 1
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/nvmem/microchip,sama7g5-otpc.h>
otpc: efuse@e8c00000 {
compatible = "microchip,sama7g5-otpc", "syscon";
reg = <0xe8c00000 0xec>;
#address-cells = <1>;
#size-cells = <1>;
temperature_calib: calib@1 {
reg = <OTP_PKT(1) 76>;
};
};
...

View File

@ -0,0 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
#ifndef _DT_BINDINGS_NVMEM_MICROCHIP_OTPC_H
#define _DT_BINDINGS_NVMEM_MICROCHIP_OTPC_H
/*
* Need to have it as a multiple of 4 as NVMEM memory is registered with
* stride = 4.
*/
#define OTP_PKT(id) ((id) * 4)
#endif