From patchwork Tue May 7 12:22:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Stuebner X-Patchwork-Id: 13656755 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 0562DC25B4F for ; Tue, 7 May 2024 12:23:40 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sxoO1/gXUGWJpmLQuAOP9WHEag7U5OCVlFgwtb7Uxd0=; b=azO35IIth+SZ8r 1p0JlDfYjD4WLI5zqlyRDbiM2ehnZrFMWJeQ5ioSLjildaut87gh8fY/wqYgpy1yPe15yfurr60GH kFDS9yPBdgS4w3o1YtcrKKP21SuaafKYqkLUgLmsfXFmCgZgx6y3U5IT8ld1RwCZNbsZ9Mtu6uzGh WjBZ4pp+zFA9muKQXJrM+awibD9kwcwzMaPdHJAObL1/3ULJwAHJLCc/TgPYQR2FBVSezdgkNSKR1 +o3QDPspabTuvJyjly8ttI3dRFDgbkRpqXafDUpplM1kTHFSCE86vyI5ogqCC8azhKQhLv0Sgw7kH QX5Y9vrlX5yzY3k28A0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Jr6-0000000Atlf-43c0; Tue, 07 May 2024 12:23:36 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Jqd-0000000AtNT-2QrK; Tue, 07 May 2024 12:23:09 +0000 Received: from i53875b5d.versanet.de ([83.135.91.93] helo=phil.lan) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s4JqZ-0006h6-CK; Tue, 07 May 2024 14:23:03 +0200 From: Heiko Stuebner To: srinivas.kandagatla@linaro.org Cc: heiko@sntech.de, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, quentin.schulz@cherry.de, Heiko Stuebner Subject: [PATCH 1/3] nvmem: rockchip-otp: set add_legacy_fixed_of_cells config option Date: Tue, 7 May 2024 14:22:54 +0200 Message-Id: <20240507122256.3765362-2-heiko@sntech.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240507122256.3765362-1-heiko@sntech.de> References: <20240507122256.3765362-1-heiko@sntech.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240507_052308_032198_7CAD1836 X-CRM114-Status: GOOD ( 11.32 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Heiko Stuebner The Rockchip OTP describes its layout via devicetree subnodes, so set the appropriate property. Fixes: 2cc3b37f5b6d ("nvmem: add explicit config option to read old syntax fixed OF cells") Signed-off-by: Heiko Stuebner --- drivers/nvmem/rockchip-otp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nvmem/rockchip-otp.c b/drivers/nvmem/rockchip-otp.c index cb9aa5428350a..7107d68a2f8c7 100644 --- a/drivers/nvmem/rockchip-otp.c +++ b/drivers/nvmem/rockchip-otp.c @@ -255,6 +255,7 @@ static int rockchip_otp_read(void *context, unsigned int offset, static struct nvmem_config otp_config = { .name = "rockchip-otp", .owner = THIS_MODULE, + .add_legacy_fixed_of_cells = true, .read_only = true, .stride = 1, .word_size = 1, From patchwork Tue May 7 12:22:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Stuebner X-Patchwork-Id: 13656753 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 A236AC10F1A for ; Tue, 7 May 2024 12:23:19 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ACIGkkob+6HiSqXVa+Z5pjTkpWs7U2NsJ9u8u2fHEWQ=; b=t6iBChvYsCC1Aw 197Sw9HtS103e9tg0CGWTPUq5T8Nj9ggqUXdbusTsvSLTOrRerBDPnuQPyjT+2rGuUEaevzHLSwRY zOntE7BknBNVF/+qXkU2XMcoAA7WGjrc00GxGNqI9uHSuONKP9HCm3+hgrckxpEO2USVsB/o0gpjj LJocybA5TBl7KG7u/y5PS+tt5ZSc8w63Hvnm5u2DwF8FZMcop8K6suC0EVCUYCltrv4FZTMPKZw/x wSbivI7JB+heZsyJa30mUHkNR/ex4FycJGbOxF+9mIZ5M5m97VFIfZ/Y8YFMUsJbdTZy29uad7Nxf WV5j4N71bYweZ9e837KA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Jql-0000000AtVK-3ZK0; Tue, 07 May 2024 12:23:15 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Jqc-0000000AtMf-3QhW; Tue, 07 May 2024 12:23:08 +0000 Received: from i53875b5d.versanet.de ([83.135.91.93] helo=phil.lan) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s4JqZ-0006h6-PV; Tue, 07 May 2024 14:23:03 +0200 From: Heiko Stuebner To: srinivas.kandagatla@linaro.org Cc: heiko@sntech.de, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, quentin.schulz@cherry.de, Heiko Stuebner Subject: [PATCH 2/3] nvmem: rockchip-otp: Set type to OTP Date: Tue, 7 May 2024 14:22:55 +0200 Message-Id: <20240507122256.3765362-3-heiko@sntech.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240507122256.3765362-1-heiko@sntech.de> References: <20240507122256.3765362-1-heiko@sntech.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240507_052306_989674_7867F175 X-CRM114-Status: GOOD ( 11.32 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Heiko Stuebner The Rockchip OTP is obviously an OTP memory, so document this fact. Signed-off-by: Heiko Stuebner --- drivers/nvmem/rockchip-otp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nvmem/rockchip-otp.c b/drivers/nvmem/rockchip-otp.c index 7107d68a2f8c7..ebc3f0b24166b 100644 --- a/drivers/nvmem/rockchip-otp.c +++ b/drivers/nvmem/rockchip-otp.c @@ -256,6 +256,7 @@ static struct nvmem_config otp_config = { .name = "rockchip-otp", .owner = THIS_MODULE, .add_legacy_fixed_of_cells = true, + .type = NVMEM_TYPE_OTP, .read_only = true, .stride = 1, .word_size = 1, From patchwork Tue May 7 12:22:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Stuebner X-Patchwork-Id: 13656752 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 CEC14C10F1A for ; Tue, 7 May 2024 12:23:14 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XBrQdwRnqYo8BTQvErRnd8PWueWcjfrYXEDfzcfYiGs=; b=QOH4NIN3WQyGd+ QVw2G6iePZ7zrf5YSfFp+v6bUBAy6mAND4IB43G9feDYPjxTwI/mqRvHYCDTZVpQ1hSu9eTh7yO0s E8BKvex4o2/10CuvxwnsFLJOlQWP/rNLDnkxw3Iwtj/55sgQykI5kAUIAzQML4o2cZJSVQIvf2fKu 69pmZhyTsrw1BcCiFnx+uU7qkfXbDdfurZO7PtJlynADavZj1YOKbD2HPhNgl74hrASDYJnpD6ob6 hb34UMcjS+Rjit81yEaqMrDeP44Azmciy9hVgOMQgulIqvXxdzghaEhhOX45hu1JgnXku8ICyQFLd AJm/CDrjC0RrSo4qHF8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Jqh-0000000AtRU-2ks6; Tue, 07 May 2024 12:23:11 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Jqc-0000000AtMn-3QJm; Tue, 07 May 2024 12:23:08 +0000 Received: from i53875b5d.versanet.de ([83.135.91.93] helo=phil.lan) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s4Jqa-0006h6-8J; Tue, 07 May 2024 14:23:04 +0200 From: Heiko Stuebner To: srinivas.kandagatla@linaro.org Cc: heiko@sntech.de, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, quentin.schulz@cherry.de, Heiko Stuebner Subject: [PATCH 3/3] nvmem: rockchip-efuse: set type to OTP Date: Tue, 7 May 2024 14:22:56 +0200 Message-Id: <20240507122256.3765362-4-heiko@sntech.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240507122256.3765362-1-heiko@sntech.de> References: <20240507122256.3765362-1-heiko@sntech.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240507_052306_951124_BA6AD316 X-CRM114-Status: GOOD ( 12.01 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Heiko Stuebner This device currently reports an "Unknown" type in sysfs. Since it is an eFuse hardware device, set its type to OTP. Signed-off-by: Heiko Stuebner --- drivers/nvmem/rockchip-efuse.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c index 2b40978ddb18c..013e67136f3b9 100644 --- a/drivers/nvmem/rockchip-efuse.c +++ b/drivers/nvmem/rockchip-efuse.c @@ -206,6 +206,7 @@ static int rockchip_rk3399_efuse_read(void *context, unsigned int offset, static struct nvmem_config econfig = { .name = "rockchip-efuse", .add_legacy_fixed_of_cells = true, + .type = NVMEM_TYPE_OTP, .stride = 1, .word_size = 1, .read_only = true,