Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1527731ybk; Thu, 21 May 2020 08:58:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyU+QZx6z2ETAzjCySmJ/sgmn7eXMOJUqzHI0D0XHrTyyvKSIUVGL1hRksxPi+08u4++QPw X-Received: by 2002:aa7:cd01:: with SMTP id b1mr8312958edw.10.1590076725955; Thu, 21 May 2020 08:58:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590076725; cv=none; d=google.com; s=arc-20160816; b=ieUEQ3CUGKjZAOrNLEywljA3E2iK649lwCY4yrrBTLeKnoXo65M/ZrpUIlg6c+SylV wOC5U7H3+EtEO09ZXC/2EBuazIyRjyOrgZgsye5e9SDwGnQlAaOu7bpKg+PqHK5kZMzu YmEehBcqW6eXF6Gz292uVDaWW2lBdDJRWhaOaBlG+EPkqL8w6E9F8jAWtg3elNUCq4/X FQokcqrfrbgCerINlahF6NJ6fOVeug9hcwqQjrKcjotdGrMxQ4gp4oVIMrDDoZo9t14f 3lz6T/jCpLX07acEwaxp+dZ1mQFwkyb278S1DxgoY6jXYsB+MGPIDcV7Mr4vKaR17vdY HIZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=uLCMRTyOXjE9erVUxBDc3PTKU9Yt55p8AR+4yWGIsbg=; b=POUCFwPDLbG5WQS95FqmSHdLNGuuL/huvS4q4v8fpHw72Tx9gSOvXLCNxa0sK5pv95 nu0nVzBI3G11kQL9HZZ6w2jkI1Cg41DN3X5HAuJcyvGxXW0bP2+bRyH02WSokSy2Uhi0 nwMjvOud5zcLzom8PKSYTAJH4quT8SJ7VelycUDRFJqh9t+BPa8MZuZevhRuvOE1f9hi SOnXwJx7GtBNHCSCPBvS27MudftdHP51H2bPIhpKWxTxiGUU0XxlYDQVML8q0aDKTs8y 31BNcfCqdG6K9iwaIb0NBeBf4lhd4RPY3AlRMayqYUqJjG4eDNONmr9sfe3nwn9VNpn/ t2IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iR3pZfkK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n16si3406817eje.540.2020.05.21.08.58.23; Thu, 21 May 2020 08:58:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iR3pZfkK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728661AbgEUP4X (ORCPT + 99 others); Thu, 21 May 2020 11:56:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728266AbgEUP4X (ORCPT ); Thu, 21 May 2020 11:56:23 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F8B7C05BD43 for ; Thu, 21 May 2020 08:56:22 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id c3so2910740wru.12 for ; Thu, 21 May 2020 08:56:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=uLCMRTyOXjE9erVUxBDc3PTKU9Yt55p8AR+4yWGIsbg=; b=iR3pZfkKbiToIz1N7ufbr2Ugkp9DSrnwW2AOdbebzNhEOZ7YdsnlO9drTxWjtbxpfL BuXCNhnKsSaB+XWrfXNOIWyGeT19lgVwoEqDobqhDWNIabOOj65L55nGxewmeylThkmR lFBgxEJsbafCqXo1njqHmm7SsBEHYG30/1s7aPy1O+04VDrALmmv/vDzJxohtyxo8lqb Vjrv71oCYP4DHJo+dJbZiV/lLn/QvPEMPda0hMvOE3IfPQgJMtBfvYHNYFKZDDCRPD4U 2eKE7djjuKS49cG4Db9rPchi+xDoEEtjuLW6PoN42cTLWcKlBWtiCi33inM1sQW7EhQn 0azQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=uLCMRTyOXjE9erVUxBDc3PTKU9Yt55p8AR+4yWGIsbg=; b=nsu8Njdhcvz50K1m18SuXd9Q/n6lh1ll8yHEFQSjhdh2IgbDo+YWv0ipD/LdxRZPrE lPuZpfzAWA/9GsINGgjylbBMPGO4sBsAgdROTkzNF5DKqSg2irUviGR+OpeKv9Pn4w3L FqydWtSbYyN3OEcNyj2XNv9v+FyLDrP1uyjNvM8VMzgoIxkE3sH3stGKPKtLO5xE0eGA cJtAzHbgptkQpw4Z1vPY7GGvAroo+BxHYH+KWFSJbncGvzR7WLw5Z0HyFCdFHl/TWFls JttcQi+hE8FBNqzPHKWqUdrKusF/eXwUNJQVo6AiXmNaiEMUYY+eDmFu7XU1k2K3piLq N5+Q== X-Gm-Message-State: AOAM532Qz5ZB/l0N8Hh2DSsvIx/LVPjs/nBGvMFYtM9pzzhb/vXWlMve zvLD0gGC44I7oMVxGRjgxiS98g== X-Received: by 2002:a5d:4c49:: with SMTP id n9mr2020191wrt.266.1590076551258; Thu, 21 May 2020 08:55:51 -0700 (PDT) Received: from [192.168.86.34] (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.googlemail.com with ESMTPSA id m3sm6778597wrn.96.2020.05.21.08.55.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 May 2020 08:55:50 -0700 (PDT) Subject: Re: [RFC v1 2/3] drivers: nvmem: Add driver for QTI qfprom-efuse support To: Doug Anderson Cc: "Ravi Kumar Bokka (Temp)" , Rob Herring , LKML , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Rajendra Nayak , Sai Prakash Ranjan , dhavalp@codeaurora.org, mturney@codeaurora.org, sparate@codeaurora.org, c_rbokka@codeaurora.org, mkurumel@codeaurora.org References: <1589307480-27508-1-git-send-email-rbokka@codeaurora.org> <1589307480-27508-3-git-send-email-rbokka@codeaurora.org> <14e1fa51-066c-6e1b-01a4-2103612de9e9@codeaurora.org> <9864496c-b066-3fe8-5608-bd9af69663f4@linaro.org> <99f07eaa-d072-f391-098e-e6f7a50a1960@linaro.org> From: Srinivas Kandagatla Message-ID: <9ecb5790-47fe-583b-6fc3-8f4f3ce7860e@linaro.org> Date: Thu, 21 May 2020 16:55:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/05/2020 16:10, Doug Anderson wrote: >> On 20/05/2020 23:48, Doug Anderson wrote: >>>> Is this only applicable for corrected address space? >>> I guess I was proposing a two dts-node / two drive approach here. >>> >>> dts node #1:just covers the memory range for accessing the FEC-corrected data >>> driver #1: read-only and reads the FEC-corrected data >>> >>> dts node #2: covers the memory range that's_not_ the FEC-corrected >>> memory range. >>> driver #2: read-write. reading reads uncorrected data >>> >>> Does that seem sane? >> I see your point but it does not make sense to have two node for same thing. > OK, so that sounds as if we want to go with the proposal where we > "deprecate the old driver and/or bindings and say that there really > should just be one node and one driver". > > Would this be acceptable to you? > > 1. Officially mark the old bindings as deprecated. Possibly Yes for some reasons below! > > 2. Leave the old driver there to support the old deprecated bindings, > at least until everyone can be transferred over. There seem to be > quite a few existing users of "qcom,qfprom" and we're supposed to make > an attempt at keeping the old device trees working, at least for a > little while. Once everyone is transferred over we could decide to > delete the old driver. we could consider "qcom,qfrom" to be only passing corrected address space. Till we transition users to new bindings! > Yes. > 3. We will have a totally new driver here. No, we should still be using the same driver. But the exiting driver seems to incorrect and is need of fixing. Having a look at the memory map for old SoCs like msm8996 and msm8916 shows that memory map that was passed to qfprom driver is corrected address space. Writes will not obviously work! This should also be true with sdm845 or sc7180 That needs to be fixed first! > > 4. A given device tree will_not_ be allowed to have both > "qcom,qfprom" specified and "qcom,SOC-qfprom" specified. ...and by > "qcom,SOC-qfprom" I mean that SOC should be replaced by the SoC name, > so "qcom,sc7180-qfprom" or "qcom,sdm845-qfprom". So once you switch > to the new node it replaces the old node. Secondly, this IP is clearly an integral part of Secure Control Block, which clearly has versioning information. Versioning information should be part of compatible string in msm8996 it should be "qcom,qfprom-5.1.0" for msm8916 it should be "qcom,qfprom-4.0.0" this translates to "qcom,qfprom---" Thirdly we should be able to have common read for all these as they tend to just read from corrected address space. Offsets to corrected address space seems to always constant across SoCs too. platform specific device tree nodes should also be able to specify "read-only" property to not allow writes on to this raw area. Does this make sense ? Thanks, srini > > >> Isn't the raw address space reads used to for blowing and checking the >> fuses if they are blown correctly or not and software usage of these >> fuses should only be done from correct address space? >> >> the read interface to user should be always from corrected address space >> and write interface should be to raw address space. > Great. That sounds right to me. Presumably the driver could add some > sort of "debugfs" access to read the raw address space if needed.