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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3914C433EF for ; Thu, 12 May 2022 15:36:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356001AbiELPgG (ORCPT ); Thu, 12 May 2022 11:36:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356010AbiELPgB (ORCPT ); Thu, 12 May 2022 11:36:01 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6860E4EA11 for ; Thu, 12 May 2022 08:35:59 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id z2so11030929ejj.3 for ; Thu, 12 May 2022 08:35:59 -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=dY1vl3weSz3HUSkXvbO9oAN90X0HZR151m5rwAkxyvc=; b=h6gb1XURTrzoILQcvobjsYciUnutOsZHjaWMfUjMZKtanNQDuqSZtJqma1bTqKF4km Z+J4yPlE2SCEfwMHpQbejXF5kqd4foRaKIfVeasWXnGwWsJEGqbLBCjnQ7cGVgUPD+YT AjbWVqJOASkz6sksi1ztGgEi5B0EbsmJ8n7+a7iopsqD6M0B30MGLJPGduGXKmwHLAYH ibwrPYP7kDmokefeCIf7W+oStr//4sz3NAzWzP2NSX/6VSJ166nolMjHxXKO72Bq9Bka 8rh4ibhsjYgZAF2SSKo1uhx8vHQrf3Ll5FnhrSpur4e3kTLNsU7yQ0+KdY2jA0m+/4fZ tbJw== 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=dY1vl3weSz3HUSkXvbO9oAN90X0HZR151m5rwAkxyvc=; b=QPXfPOB/2lALnGyGX8QLKxR90Ok1ZC+SrnMNSbHJZjCzcEOmK4uPlWDnHLCTCCZdGR ymLH+LzJzlgAdje1VLyqTV7lUu+ddC16+EpYeTgDCuQAYX8KdTKey3wKDwGDGXic7bUQ b7daZk38+v3GziD5d0gIQ8ofBm6UjqX0tcS5uFKbGrHkAwsH8J2SGYC1X2xNvsyA4d2Y SUDFYAZvc2L5GH5Wz86mEXtWkEHKp8ECslvIzewUTByhx7QG00HvxgkVEp4PeKMC9N3p T1Mpv0gsKWVHEbpZffw3qF665O228Ch54Qk3ly6XtPdjIw+LCJOiTgL2Ndzp7YL8Tt6M SPpA== X-Gm-Message-State: AOAM532q9D6SgfdUG70PmpeV+1to6QgtRCT/4mKn3lcjWguxHDgi39K9 4VICmHahOXJw+d020LChyWs18w== X-Google-Smtp-Source: ABdhPJypW6haEmycge0JF+bK+Lw6JxzlTIz9QIlMIt0MXSTRwanuOYTV+IG6WdwtrdjCY0RTVYcWmg== X-Received: by 2002:a17:906:7313:b0:6f4:9079:2b2a with SMTP id di19-20020a170906731300b006f490792b2amr404816ejc.377.1652369758021; Thu, 12 May 2022 08:35:58 -0700 (PDT) Received: from [192.168.0.162] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id l11-20020a170906414b00b006f3ef214ddcsm2209600ejk.66.2022.05.12.08.35.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 May 2022 08:35:57 -0700 (PDT) Message-ID: <6ce3c0b1-3f6a-24f6-bcf2-4d4125a97604@linaro.org> Date: Thu, 12 May 2022 17:35:56 +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@microchip.com, 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> <75ce6291-77c7-c932-e8bb-a8bbae02431d@linaro.org> <59b47f0b-6201-3814-e17f-1435ce5c2dad@microchip.com> From: Krzysztof Kozlowski In-Reply-To: <59b47f0b-6201-3814-e17f-1435ce5c2dad@microchip.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/05/2022 17:31, Claudiu.Beznea@microchip.com wrote: >> >> Macro is a nice idea if it can be stable. I understood that length of >> packets depends on hardware, so this part could be stable. But what >> about number of packets, so the OTP_PKT_SAMA7G5_TEMP_CALIB_LEN below? > > The OTP_PKT_SAMA7G5_TEMP_CALIB_LEN here is the length of thermal > calibration packet. This length is fixed and will not be changed. > > After these 2 packets (provided by Microchip) user may further flash any > number of packets and use them as they wish. > > Driver is in charge of scanning the NVMEM for the available packets and > prepare a list with their IDs and their starting offsets in NVMEM memory > such that when it receives a read request it will be able to decode the > packet offset based on packet identifier. > > In case different number of packets are available in NVMEM for different > kind of setups (boards) these could also be referenced in board specific DT > using OTP_PKT() macro and with proper length (which will depend on what > user flashed). > >> You wrote "Boot configuration packet may vary in length", so it could be >> changed by Microchip? > > Yes, between chip revisions its length could be changed. Chip revisions like different board compatibles thus different bindings/macro values? If not, then maybe better skip the length out of bindings and just provide the first macro. Best regards, Krzysztof 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 0BF2EC433F5 for ; Thu, 12 May 2022 15:37:17 +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=Baw6DI3R3En0+oQg3OSxlsIWXmNgMaYUVwNQ79TAbqc=; b=0OHnvyIqw04Se+ WXQpWLOjePeDpKXD3hG7WcawrZ68UtPfbMiycQ8MyPzNBbtUE9rtcTTr9FJnJYGaYI8dtzEqmJh02 P7QErDwNvavHSKiYmqqlKoC+8FQJ5JIeJhQOXkWxB1HR9b4VdBF/8OyDDHmS3HyaG1cBqg8vUIHJ6 e8JpErcmSHMLdvhJjASqW51KVwuqCUhpd9ZV+ae6avsKCzqdlLz+9iU58r3Xn/aRrPMVzfBeQHvTx PlwcpMqWUmHBRHIv3i9MNQ82lBxRw53SB1nK89pSlL8eXfGXcFoT//sETEf9Suxa2ZVYksIzpeTjk Xm9BAwXuyF7a1EIMlseg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1npArB-00CfYw-Ui; Thu, 12 May 2022 15:36:02 +0000 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1npAr9-00CfXP-Dl for linux-arm-kernel@lists.infradead.org; Thu, 12 May 2022 15:36:00 +0000 Received: by mail-ej1-x62a.google.com with SMTP id kq17so11021743ejb.4 for ; Thu, 12 May 2022 08:35:59 -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=dY1vl3weSz3HUSkXvbO9oAN90X0HZR151m5rwAkxyvc=; b=h6gb1XURTrzoILQcvobjsYciUnutOsZHjaWMfUjMZKtanNQDuqSZtJqma1bTqKF4km Z+J4yPlE2SCEfwMHpQbejXF5kqd4foRaKIfVeasWXnGwWsJEGqbLBCjnQ7cGVgUPD+YT AjbWVqJOASkz6sksi1ztGgEi5B0EbsmJ8n7+a7iopsqD6M0B30MGLJPGduGXKmwHLAYH ibwrPYP7kDmokefeCIf7W+oStr//4sz3NAzWzP2NSX/6VSJ166nolMjHxXKO72Bq9Bka 8rh4ibhsjYgZAF2SSKo1uhx8vHQrf3Ll5FnhrSpur4e3kTLNsU7yQ0+KdY2jA0m+/4fZ tbJw== 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=dY1vl3weSz3HUSkXvbO9oAN90X0HZR151m5rwAkxyvc=; b=umMYTKry2dCCL8YAILPgEhkbgrgkvJNg+NnhwrtcXyXUjzPum0fniY+/bU1DXlE5+G 26B4BFCDXVDlxCoBVzDBJPw9B40y1F/yOAVaMfggmVCh8viZu8kGYKzTSotpDWUuL9cQ Iz3CTbGzztkFU+TEQvB1MmOUIzXvX0vytalnrKz9dTiOWQbdYRtooFYOZTOQUuKBj4ml npzZNIAx9BcnTHhl18jxa0Ck4FxbMNqA8NVWnFTfCByMpSYm0P+LQzDO6M1WT9YqbP8s JQ4k1Euwzx3JcOfIWdDt33pHZ8fVwWyYs/a4d3Rcv9REhpWdajcYdocn80C0v7Pbalec kSAg== X-Gm-Message-State: AOAM530nxTsXCBSC8Y57V+nE+O4AhQbox/x/WNdUykaClZ8hUiuiFoPN xpGZptRUE/GUivU1+HoPSaHd0Q== X-Google-Smtp-Source: ABdhPJypW6haEmycge0JF+bK+Lw6JxzlTIz9QIlMIt0MXSTRwanuOYTV+IG6WdwtrdjCY0RTVYcWmg== X-Received: by 2002:a17:906:7313:b0:6f4:9079:2b2a with SMTP id di19-20020a170906731300b006f490792b2amr404816ejc.377.1652369758021; Thu, 12 May 2022 08:35:58 -0700 (PDT) Received: from [192.168.0.162] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id l11-20020a170906414b00b006f3ef214ddcsm2209600ejk.66.2022.05.12.08.35.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 May 2022 08:35:57 -0700 (PDT) Message-ID: <6ce3c0b1-3f6a-24f6-bcf2-4d4125a97604@linaro.org> Date: Thu, 12 May 2022 17:35:56 +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@microchip.com, 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> <75ce6291-77c7-c932-e8bb-a8bbae02431d@linaro.org> <59b47f0b-6201-3814-e17f-1435ce5c2dad@microchip.com> From: Krzysztof Kozlowski In-Reply-To: <59b47f0b-6201-3814-e17f-1435ce5c2dad@microchip.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220512_083559_515346_38B37245 X-CRM114-Status: GOOD ( 19.33 ) 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 12/05/2022 17:31, Claudiu.Beznea@microchip.com wrote: >> >> Macro is a nice idea if it can be stable. I understood that length of >> packets depends on hardware, so this part could be stable. But what >> about number of packets, so the OTP_PKT_SAMA7G5_TEMP_CALIB_LEN below? > > The OTP_PKT_SAMA7G5_TEMP_CALIB_LEN here is the length of thermal > calibration packet. This length is fixed and will not be changed. > > After these 2 packets (provided by Microchip) user may further flash any > number of packets and use them as they wish. > > Driver is in charge of scanning the NVMEM for the available packets and > prepare a list with their IDs and their starting offsets in NVMEM memory > such that when it receives a read request it will be able to decode the > packet offset based on packet identifier. > > In case different number of packets are available in NVMEM for different > kind of setups (boards) these could also be referenced in board specific DT > using OTP_PKT() macro and with proper length (which will depend on what > user flashed). > >> You wrote "Boot configuration packet may vary in length", so it could be >> changed by Microchip? > > Yes, between chip revisions its length could be changed. Chip revisions like different board compatibles thus different bindings/macro values? If not, then maybe better skip the length out of bindings and just provide the first macro. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel