From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DDE9FC433EF for ; Wed, 11 May 2022 15:28:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZK15MGAlSC62GpepahuQFxKAi6L4eUWQ+lllM8d13Ks=; b=dDFM9namqPrqZl q5+hibw1QJIO4jiojZHpaRU2lSW4UTGUKfBqZHUNxqI3CahgDuTqZGQP8Myxt+tDSTHBT4BapXZK/ G9dX4F+eggYunsvCMaZ4cekJK4pccDUv1xoi+sxpj4qdJ0iPo0Vpzt4E78JNov9QJEVJYbWzvm8EM i9D1Zg7GY0MmiI3oAxx2Qg5aUN861EBaxMSC1dbE67DDN/DSHENT68HwBSC/Armb9LoG6JKW2m059 TnkM/HaO/e7aMunv/QeJ30lOyTs+QwzLjz8NXE5KXj0oL6GwkLY0L0HE7bUpGq4vKu6mhEcxfsDgh 3FdhlpY7V27QibQPbfFw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nooFh-007ZiN-6P; Wed, 11 May 2022 15:27:49 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nooFd-007Zgo-O2 for linux-arm-kernel@lists.infradead.org; Wed, 11 May 2022 15:27:47 +0000 Received: by mail-ed1-x52c.google.com with SMTP id p4so3074380edx.0 for ; Wed, 11 May 2022 08:27:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=+uroO/vY6XG1xI1X9Ud5Dc476KAfJP3kX2168zNzYO4=; b=fk1P5MGNZl3h9gT/nk2Obg3HmrryEHaslAi7OhrMkdNeVA7xAZBZr30WxMACYnUOyn 7UkJGnNIy0nvFOqAmuFyuvYCrHTBjjmmjEaWyarProKucTZzxeRY+UoqKHheTPgwyY/P 5/PUCzZ6A3xEXfap2TCG6EHAZgOCOl5Xh0eFKeDgO1oDfYR+5VwEA6oJDSEPIpPEZLEo sDO5y+6zTdcMaUbYDU2e/sj9nUsPpYNHnCYiqfVU3SuBFjR4ABn/oDvsysAlU9CDU3nx QD6H/Gk4grGiQchcEvi6PxhHdhzKBbq3PsPqdsBiDUU08NHEyYqUZcaYWgaAbtY8wcyw lWYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=+uroO/vY6XG1xI1X9Ud5Dc476KAfJP3kX2168zNzYO4=; b=hzW53NJLhe9r5o0Gma4FhRkgPP7VWIr/5z9RysXJ1eLl7mkuQNBCUNHFsLDLst6+0b /hff8kjFPZcdEBKqw05ud2P4snRKZP2B6GfAQDO9ELqhmqcYeqZwBBdToC/vaPBQhWrf o6AjYxgQ+U7hG3blvW7INDR8Xv3oCtI55V5jeH44QhwNh5aJbLw/9T5jRUSZx+9GJInk Eorzz7iG4YYatSvTB9Sp4RhJyMZA//+l6mPBcVg3eZWWf+4nnHqZabMnf6T4G0ad1hi5 Zc2zgYwX6tPIjETDVK15AbJCGv0mnR0mlFCiYVob6fOBPQ9sZFMQlO/bxrvdCuMJjjhQ ktnQ== X-Gm-Message-State: AOAM5317jkAcmAVY4MmEb75XjyuBauQXnjy4clIB5LERwfUGrCztvLPD kWJQICnTud7uftJjY+bT6h9c2g== X-Google-Smtp-Source: ABdhPJy96CstkysGFwN7nKsEZRY2/Sn2Wy/P5Gpj3mO5AwWu9FxTZSfFYCIVl9B5iV03G2Qb26uzaA== X-Received: by 2002:a50:9f06:0:b0:425:c1ba:5037 with SMTP id b6-20020a509f06000000b00425c1ba5037mr30308853edf.285.1652282862097; Wed, 11 May 2022 08:27:42 -0700 (PDT) Received: from [192.168.0.154] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id bd23-20020a056402207700b0042617ba63a3sm1291335edb.45.2022.05.11.08.27.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 May 2022 08:27:41 -0700 (PDT) Message-ID: <75ce6291-77c7-c932-e8bb-a8bbae02431d@linaro.org> Date: Wed, 11 May 2022 17:27:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH 1/2] dt-bindings: microchip-otpc: document Microchip OTPC Content-Language: en-US To: Claudiu Beznea , srinivas.kandagatla@linaro.org, robh+dt@kernel.org, krzk+dt@kernel.org Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220510094457.4070764-1-claudiu.beznea@microchip.com> <20220510094457.4070764-2-claudiu.beznea@microchip.com> From: Krzysztof Kozlowski In-Reply-To: <20220510094457.4070764-2-claudiu.beznea@microchip.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220511_082745_838156_7AEEC9FC X-CRM114-Status: GOOD ( 20.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 10/05/2022 11:44, Claudiu Beznea wrote: > Document Microchip OTP controller. > > Signed-off-by: Claudiu Beznea > --- > .../bindings/nvmem/microchip-otpc.yaml | 55 +++++++++++++++++++ > include/dt-bindings/nvmem/microchip,otpc.h | 18 ++++++ > 2 files changed, 73 insertions(+) > create mode 100644 Documentation/devicetree/bindings/nvmem/microchip-otpc.yaml > create mode 040000 include/dt-bindings/nvmem > create mode 100644 include/dt-bindings/nvmem/microchip,otpc.h > > diff --git a/Documentation/devicetree/bindings/nvmem/microchip-otpc.yaml b/Documentation/devicetree/bindings/nvmem/microchip-otpc.yaml > new file mode 100644 > index 000000000000..a8df7fee5c2b > --- /dev/null > +++ b/Documentation/devicetree/bindings/nvmem/microchip-otpc.yaml vendor,device.yaml device should not be a wildcard but first compatible, so microchip,sama7g5-otpc.yaml > @@ -0,0 +1,55 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/nvmem/microchip-otpc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Microchip SAMA7G5 OTP Controller (OTPC) device tree bindings s/device tree bindings// > + > +maintainers: > + - Claudiu Beznea > + > +description: | > + This binding represents the OTP controller found on SAMA7G5 SoC. Entire description is duplicating title. Please describe the hardware or skip it. OTOH, you should mention the header, for example in description. > + > +allOf: > + - $ref: "nvmem.yaml#" > + > +properties: > + compatible: > + items: > + - const: microchip,sama7g5-otpc > + - const: syscon > + > + reg: > + maxItems: 1 > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 1 These come from nvmem.yaml. > + > +required: > + - compatible > + - reg > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include How the clock is used here? > + #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,otpc.h b/include/dt-bindings/nvmem/microchip,otpc.h > new file mode 100644 > index 000000000000..44b6ed3b8f18 > --- /dev/null > +++ b/include/dt-bindings/nvmem/microchip,otpc.h > @@ -0,0 +1,18 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ Same license as bindings. > + > +#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) Do I get it correctly - the offset or register address is now part of a binding? You write here "id", however you use it as part of "reg", so it's confusing. > + > +/* > + * Temperature calibration packet length for SAMA7G5: 1 words header, > + * 18 words payload. > + */ > +#define OTP_PKT_SAMA7G5_TEMP_CALIB_LEN (19 * 4) Length of some memory region also does not look like job for bindings. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel