Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp423491lqs; Tue, 5 Mar 2024 06:12:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWLXzjyICLhtE9nzDye2q3TFZmoyDcJkWwW7/ZcdceqpxwzbN9Su2P6Ktg1d21+dKEiEZx6tts7XLhG60nBfYUQEvHyUhqAZyVVt1njxw== X-Google-Smtp-Source: AGHT+IFS1sIni1pthyDhV8yWZJRMdLUbnCPbjtjs0gijEtH2QgY7nxMjL8UkcaB3CJlTEHMtHfJH X-Received: by 2002:a17:906:55c6:b0:a45:6926:c821 with SMTP id z6-20020a17090655c600b00a456926c821mr3793841ejp.10.1709647930155; Tue, 05 Mar 2024 06:12:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709647930; cv=pass; d=google.com; s=arc-20160816; b=IDwN9tbcnPHJKxv6jDyMR6HDtW8Vf3fJVE/JJTF+lmuLAgf3hzuwcfW5KIblVtB3n9 Y45q0H5Zc7iL6O7OtjmI6odMHQfnRLMmjpOkWqskpCYplebK+7/jq2+hd3k+aKzd/Gzs UMnzHkiljpcJPMZO2htHyeuv12ZkkiCWBIxM47WWCQtp/t0wqbC4PU71N/7yY6iJg8G/ Erj/iwwZLc5evEERwvB5ciHZoM++N7v78V+2E46rNfzNoEjgBUZfejyyV3MUhioDfWTL SKINlmy55+BTxCI3RRtyerPuz8Pr9WiWYeQgZRDWarYyFyiAhAwhw7FfAWgG5qKt2jN0 ymag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=QE8JAst173UwkVqHQ4RTnolH6FRG/0ukw2zH4n+S4sI=; fh=+5tXTwmJ+ehRNjutjP4VKHBgzGVw6/OLfs3Ow68weN0=; b=wAAnglzgTmslwT3CzYv8RjZENzCYHVom+MDlxZ+BUUDmE7zynIPCVhrcVEajolkbRN Wwbws1xjj81/a0mwMG776VwA6CiD+1XI/vOWYDxC1UrdftNEENJ952XaHFyDJjmQJ7v8 u1OAkJVf0kGQBdfvzPBWpH95oy5Be7jjC7DIIJzxMQtZH49TmcY5SZ26Gygpnol15sli quUqL8nf2/brnUUjzodJizf+rBGiQUM8gYO3lcekNkh8tbkjF1nDgshFAKgCabIK513c VIxSKoKUVlGshOvckzL21xqgpmcizAONugGJFSc9j/Q7dPqnGmpw+OtJEWF3OLYRLJQx zsvw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fbr0DgjC; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-92492-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92492-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lx26-20020a170906af1a00b00a449a040234si3988361ejb.5.2024.03.05.06.12.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 06:12:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92492-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fbr0DgjC; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-92492-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92492-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 1B6AE1F22850 for ; Tue, 5 Mar 2024 14:11:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E17D88662B; Tue, 5 Mar 2024 14:11:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="fbr0DgjC" Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D779D5915D for ; Tue, 5 Mar 2024 14:11:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709647906; cv=none; b=lQpB7327pvw1YA0L/xGoTHwd2rqNh840RiYyBXQqrItvUPAmXCSknSZO6EzZu7grCDx2jtTgVSgQg6aR/PA7vd/2iqYRLT2A5OUU35f9OUkcYQumssYp6R6BtDf6MRhTrMsa+tuHUX5EbUoJkMxyrbpB6EDxrfndk7nYN3EswgA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709647906; c=relaxed/simple; bh=iBbbuD5mVTRI0oJiXRDf+iOpoU0PBEBAmhF4q2K380A=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=PyCR4jUDSvCXtOuWe1FR4pnjPEFe31FagpKg6X4N9PggQ1LqOVf5H0wBkKJr3mMYKRIr8IUh/DWkRq7flTViLeVjIFFZIMRubNWuquvw4EjGdigJB3KgwciZy0QZ2FRBp14Ii00ptiufnHWXWj2AzZ18Shas0g++8IIRDw3Dy48= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=fbr0DgjC; arc=none smtp.client-ip=209.85.210.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ot1-f46.google.com with SMTP id 46e09a7af769-6e4eaa4b394so314073a34.1 for ; Tue, 05 Mar 2024 06:11:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709647904; x=1710252704; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=QE8JAst173UwkVqHQ4RTnolH6FRG/0ukw2zH4n+S4sI=; b=fbr0DgjCROsfuyGoYavwLgz7YU6Fnn1wFZxVGDOiHToiwAtJCjimoNCpQoh6NfYl4P /R/EiLnLyTaWVIAI5KEV5g7uC5O1ZrMExRIxPi3CmfH8l7VihCfKPbZ/OPZMOoS8JvKk N29Yb1bW7dK7cfyoIbme1h3aXWa7sUX6sgSDDde9+bI32tE0TPqw56VBinxYf3EK0Y0R fDjtlpXAwiaZdTldsQNLCtQrV0aKx0Zcxmpr7kgSSogZiCwwgMndATwXGWTbrzpASBW5 DcrX3DpW5Yudluo4ShlkM+QPJJifijAvRzVoM35T4YpYOQ1klz5Vj2aOwMEpJB6Z4Ws7 4q3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709647904; x=1710252704; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QE8JAst173UwkVqHQ4RTnolH6FRG/0ukw2zH4n+S4sI=; b=Ea++8WSvtAR1XdPtJd7aljHqEWlHBAY0NfkX0Kjw5AaTxk5am0SGnp/tgpg/HPi4Xv Lqwv44jdXyJX1QRfVEYYXurTIof99XsxcWBxAuBQeEwkTNjaUA4ud32pp9ythsp1Ld2+ Edey4+d0crmKoK4gF+701D/NoCyctq72Pu/4mB3MmXRFerPTQFbCvpjwm4GRhhcmfKOs UyUAH9ozERaNYziLbzxsikKPpX6b3+dI4UfW0bZ4yo1B/Q1F+qc6wf85j24cE/3aunQ5 Vd8K4/9TlbMfmf7dgZj/p2bZHdYNNzvwLGYfwp6ufV/7PnSQc/KxnAzKClAyN4uCwKFc uq8Q== X-Forwarded-Encrypted: i=1; AJvYcCWK7ofiHaqWXwICjyAGh3vb+/68Q4tK8+s9GW67UTfbTuxC7eiInnKtRaNGX0K54luH9PPIbXQI3GdBYNI1w9RgX/sGc39sBHyUnbLI X-Gm-Message-State: AOJu0YzflS/rQ9cCH4O7/45OZPQdDBk6GVWp+4INU+kOq+BUELhkfZl+ AptOOrEkGMCUSgDSQu2Ab+a3iqbt/NRTHN4KtapZte2q6eKhjOwS3cCVOipRWzk= X-Received: by 2002:a05:6870:f22a:b0:220:aaf1:d368 with SMTP id t42-20020a056870f22a00b00220aaf1d368mr2063022oao.16.1709647903932; Tue, 05 Mar 2024 06:11:43 -0800 (PST) Received: from [192.168.1.20] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id nd6-20020a056871440600b0022147ef9172sm5416oab.52.2024.03.05.06.11.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Mar 2024 06:11:43 -0800 (PST) Message-ID: <620a2dca-1901-43d4-8b2b-7ae823705a6e@linaro.org> Date: Tue, 5 Mar 2024 15:11:36 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/4] dt-bindings: hwinfo: ti,k3-socinfo: Add nvmem-cells Content-Language: en-US To: Markus Schneider-Pargmann Cc: Rob Herring , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Krzysztof Kozlowski , Conor Dooley , Srinivas Kandagatla , Santosh Shilimkar , Andrew Davis , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240206143711.2410135-1-msp@baylibre.com> <20240206143711.2410135-3-msp@baylibre.com> <20240206184305.GA1875492-robh@kernel.org> <48902771-5d3b-448a-8a74-ac18fb4f1a86@linaro.org> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD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+cY qc+rJggwMQcJL9F+oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 05/03/2024 12:17, Markus Schneider-Pargmann wrote: > Hi Krzysztof, > > On Tue, Mar 05, 2024 at 08:43:03AM +0100, Krzysztof Kozlowski wrote: >> On 04/03/2024 11:36, Markus Schneider-Pargmann wrote: >>> Hi, >>> >>> On Sat, Feb 17, 2024 at 03:25:30PM +0100, Krzysztof Kozlowski wrote: >>>> On 14/02/2024 10:31, Markus Schneider-Pargmann wrote: >>>>> Hi Rob, >>>>> >>>>> On Tue, Feb 06, 2024 at 06:43:05PM +0000, Rob Herring wrote: >>>>>> On Tue, Feb 06, 2024 at 03:37:09PM +0100, Markus Schneider-Pargmann wrote: >>>>>>> The information k3-socinfo requires is stored in an efuse area. This >>>>>>> area is required by other devices/drivers as well, so using nvmem-cells >>>>>>> can be a cleaner way to describe which information are used. >>>>>>> >>>>>>> If nvmem-cells are supplied, the address range is not required. >>>>>>> Cells chipvariant, chippartno and chipmanufacturer are introduced to >>>>>>> cover all required information. >>>>>>> >>>>>>> Signed-off-by: Markus Schneider-Pargmann >>>>>>> Reviewed-by: Andrew Davis >>>>>>> --- >>>>>>> .../bindings/hwinfo/ti,k3-socinfo.yaml | 23 ++++++++++++++++++- >>>>>>> 1 file changed, 22 insertions(+), 1 deletion(-) >>>>>>> >>>>>>> diff --git a/Documentation/devicetree/bindings/hwinfo/ti,k3-socinfo.yaml b/Documentation/devicetree/bindings/hwinfo/ti,k3-socinfo.yaml >>>>>>> index dada28b47ea0..f085b7275b7d 100644 >>>>>>> --- a/Documentation/devicetree/bindings/hwinfo/ti,k3-socinfo.yaml >>>>>>> +++ b/Documentation/devicetree/bindings/hwinfo/ti,k3-socinfo.yaml >>>>>>> @@ -26,9 +26,24 @@ properties: >>>>>>> reg: >>>>>>> maxItems: 1 >>>>>>> >>>>>>> + nvmem-cells: >>>>>>> + $ref: /schemas/types.yaml#/definitions/phandle-array >>>>>>> + >>>>>>> + nvmem-cell-names: >>>>>>> + items: >>>>>>> + - const: chipvariant >>>>>>> + - const: chippartno >>>>>>> + - const: chipmanufacturer >>>>>>> + >>>>>>> required: >>>>>>> - compatible >>>>>>> - - reg >>>>>>> + >>>>>>> +oneOf: >>>>>>> + - required: >>>>>>> + - reg >>>>>>> + - required: >>>>>>> + - nvmem-cells >>>>>>> + - nvmem-cell-names >>>>>>> >>>>>>> additionalProperties: false >>>>>>> >>>>>>> @@ -38,3 +53,9 @@ examples: >>>>>>> compatible = "ti,am654-chipid"; >>>>>>> reg = <0x43000014 0x4>; >>>>>>> }; >>>>>>> + - | >>>>>>> + chipid: chipid@14 { >>>>>>> + compatible = "ti,am654-chipid"; >>>>>> >>>>>> This isn't compatible if you have a completely different way to access >>>>>> it. >>>>> >>>>> Thanks, it is not entirely clear to me how I could go forward with this? >>>>> Are you suggesting to use a different compatible? Or is it something >>>>> else I could do to proceed with this conversion? >>>> >>>> What you claim now, is that you have one device with entirely different >>>> interfaces and programming model. So either this is not the same device >>>> or you just wrote bindings to whatever you have in driver. >>>> >>>> Nothing in commit msg explains this. >>>> >>>> What you should do? Depends. If you just write bindings for driver, then >>>> stop. It's a NAK. Instead write bindings for hardware. >>>> >>>> If the first choice, just the hardware is somehow like this, then >>>> explain in commit msg and device description, how this device can be >>>> connected over other bus, not MMIO. You can draw some schematics in >>>> commit msg explaining architecture etc. >>> >>> Sorry the information provided in the commit message is not very clear. >>> >>> The basic access to the registes is still MMIO. nvmem is used to have a >>> better abstraction and cleaner description of the hardware. >>> >>> Currently most of the data is exported using the parent syscon device. >>> The relevant data is read-only and contained in a single register with >>> offset 0x14: >>> - Chip variant >>> - Chip part number >>> - Chip manufacturer >>> >>> There are more read-only registers in this section of address space. >>> These are relevant to other components as they define the operating >>> points for example. For the OPP table relevant are chip variant and chip >>> speed (which is in a different register). >>> >>> Instead of devices refering to this whole register range of 0x20000 in >> >> Whaaaaat? >> >>> size, I would like to introduce this nvmem abstraction in between that >>> describes the information and can directly be referenced by the devices >>> that depend on it. In this case the above mentioned register with offset >>> 0x14 is instead described as nvmem-layout like this: >>> >>> nvmem-layout { >>> compatible = "fixed-layout"; >>> #address-cells = <1>; >>> #size-cells = <1>; >>> >>> chip_manufacturer: jtagidmfg@14 { >>> reg = <0x14 0x2>; >>> bits = <1 11>; >>> }; >>> >>> chip_partno: jtagidpartno@15 { >>> reg = <0x15 0x3>; >>> bits = <4 16>; >>> }; >>> >>> chip_variant: jtagidvariant@17 { >>> reg = <0x17 0x1>; >>> bits = <4 4>; >>> }; >>> >>> chip_speed: jtaguseridspeed@18 { >>> reg = <0x18 0x4>; >>> bits = <6 5>; >>> }; >>> >>> The underlying registers are still the same but they are not hidden >>> by the syscon phandles anymore. >>> >>> The device that consumes this data would now use >>> >>> nvmem-cells = <&chip_variant>, <&chip_speed>; >>> nvmem-cell-names = "chipvariant", "chipspeed"; >>> >>> instead of >>> >>> syscon = <&wkup_conf>; >> >> syscon allows you this as well - via phandle arguments. >> >> nvmem is for non-volatile memory, like OCOTP and eFUSE. This is not for >> accessing regular MMIO registers of system-controller, regardless >> whether they are read-only or not (regmap handles this nicely, BTW). >> Although probably Apple efuses and few others can confuse here. It still >> looks like you convert regular system-controller block into nvmem, >> because you prefer that Linux driver abstraction... > > The above mentioned data is set in the factory. There is other > non-volatile data, like device feature registers, in the same address > region, as well as OTP data like MAC and USB IDs. But it is not a pure > non-volatile memory region. The data is copied into these registers by > the ROM at boot. Still entire block is MMIO IP in your SoC, not a efuse/OTP hardware. nvmem is not for regular MMIO registers which are sometimes R, sometimes RW. Best regards, Krzysztof