Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp400118iob; Wed, 18 May 2022 04:51:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCwxgPyGhbULfxnp3y5J7TMOJA1fr+xUAEOIIN0pVePPdYKrw3BZhmwUQZd/agLv5imHzB X-Received: by 2002:a17:902:aa85:b0:155:ceb9:3710 with SMTP id d5-20020a170902aa8500b00155ceb93710mr27310957plr.59.1652874683767; Wed, 18 May 2022 04:51:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652874683; cv=none; d=google.com; s=arc-20160816; b=sTk81606nscQpvS2+TbASu17CgeTQ4eh9c73wtn9YwQAjfUduUFuewB+/Y8KxgSdEK djXozm1gOB38ef7HzHcYA3BnBLBoD8uKdnOs462FnMNfsvKOVrkiqgHoT1bf85IRKI/K o48C2/NfXQZ5pZ2C9Tfmw7bH9jXfCjJdrEYXOmcircFbqhMJxYTfc6U//5Shbp3IRDwz 2QmxeaILYGQVSFD03a6FpGYgY8uSj1n6yWWUGIiSNbklPSotS2guF8Ip9dba6G8BWPxZ na72/1anPr0pkLT+qy08yvEKif++jrQ2iLxmw7DJPbQ1WG8xOfpRWMkIJFQt3czOhQP5 Zxow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=S9yulrjnHKDeBeKRz/ehVmONKzZ/mBMaAH39wseR5wU=; b=eFPpCu1HzP7jFoUN6+qvIUShSXHusZQbiTvlL80+fwfYbYudZG2lGaMFKjur0J/pHV uNolvmfOLs7IemtS6iyLuKE4mxrWo2/AhgINP4+9uEwuhZ6nTtGLa68ixXW5AyeVqeqG 0V917fmPKy/nwdnRZ2MaSQTaY8xjYUBVBCxLNdLrBH0ag8Irrx8Pmii943rqAkrrbftN yamuQ+0+OVFcdJBem4x0Ne5+szbdiEVB3aR7mVGAxJ8A5ON7F7WsMY0kg+hxB9eU+e8Y ZPNUTcGyrWSdf1mSiN8GFMK7aCX1001BFQ/QsoFQ90LYzLXIgO22EcGZTsJHwtP5Tr7q v2qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b="0/BJbn0F"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id v8-20020a17090331c800b0016157654cf4si2133137ple.227.2022.05.18.04.51.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 04:51:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b="0/BJbn0F"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1979717B84B; Wed, 18 May 2022 04:49:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235832AbiERLtS (ORCPT + 99 others); Wed, 18 May 2022 07:49:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235781AbiERLtL (ORCPT ); Wed, 18 May 2022 07:49:11 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46D50179C20; Wed, 18 May 2022 04:49:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1652874549; x=1684410549; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=K3dlaykSFHWsDcu0MDylqIPhXIfyaCnFB+tcjTZ90bk=; b=0/BJbn0FOSB3K1VOewPVdlF1qEyQJoslbd5KLV2i1kg6/+e4Lp6u24oP V6+vjFNKU0eo5djPBTep+UviQC1X7GSZ74uB4REc/x1zyUZWsm2TlrSWr mXtiaugn4TAepmoHj+O5mahs2yNUlEYal1qSLrhOiaR8mXE6kTYM2WjTR aoccFnAQ916V1HZ8GzRe4GZLKcufioMdNMIkfzojDUhzayQbVAiCMhDYC a6KXnRKsibYGoSyA+OU9f/MVPVYdT8ZVtTuwvgfac1b9NmIsuQnNDnw5C Ppf0J67ja0LbRaQ6q4qHgC/S2DYMnQ7EdrW9JQtYae7lQPXoBDbhyAPIp A==; X-IronPort-AV: E=Sophos;i="5.91,234,1647327600"; d="scan'208";a="164583737" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 18 May 2022 04:49:09 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Wed, 18 May 2022 04:49:09 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Wed, 18 May 2022 04:49:07 -0700 From: Claudiu Beznea To: , , CC: , , , Claudiu Beznea Subject: [PATCH v3 1/2] dt-bindings: microchip-otpc: document Microchip OTPC Date: Wed, 18 May 2022 14:51:28 +0300 Message-ID: <20220518115129.908787-2-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220518115129.908787-1-claudiu.beznea@microchip.com> References: <20220518115129.908787-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Document Microchip OTP controller. Signed-off-by: Claudiu Beznea --- .../nvmem/microchip,sama7g5-otpc.yaml | 50 +++++++++++++++++++ .../nvmem/microchip,sama7g5-otpc.h | 12 +++++ 2 files changed, 62 insertions(+) create mode 100644 Documentation/devicetree/bindings/nvmem/microchip,sama7g5-otpc.yaml create mode 040000 include/dt-bindings/nvmem create mode 100644 include/dt-bindings/nvmem/microchip,sama7g5-otpc.h diff --git a/Documentation/devicetree/bindings/nvmem/microchip,sama7g5-otpc.yaml b/Documentation/devicetree/bindings/nvmem/microchip,sama7g5-otpc.yaml new file mode 100644 index 000000000000..c3c96fd0baac --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/microchip,sama7g5-otpc.yaml @@ -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 + +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 + + otpc: efuse@e8c00000 { + compatible = "microchip,sama7g5-otpc", "syscon"; + reg = <0xe8c00000 0xec>; + #address-cells = <1>; + #size-cells = <1>; + + temperature_calib: calib@1 { + reg = ; + }; + }; + +... diff --git a/include/dt-bindings/nvmem/microchip,sama7g5-otpc.h b/include/dt-bindings/nvmem/microchip,sama7g5-otpc.h new file mode 100644 index 000000000000..f570b23165a2 --- /dev/null +++ b/include/dt-bindings/nvmem/microchip,sama7g5-otpc.h @@ -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 -- 2.34.1