From patchwork Mon Feb 10 22:32:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Stuebner X-Patchwork-Id: 13969327 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0856C25335E; Mon, 10 Feb 2025 22:40:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.11.138.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739227202; cv=none; b=AWn4rn+YZOj1DOMq8MbtnIZWezuMOIVy2209vcuN1uIW5QkHEY0k8L6od7HgEz6PGh8MxuCyXT2nI3ilzlKQi0lWMFZRM1jISL/WSMBqBHVzGI6fmvmBxxMG8gcoVzAW2Qb3k+3LdEgnOkN9CkouVOa1Yhx/d80XIrL6q+fkmVE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739227202; c=relaxed/simple; bh=BVJxFp26hQxuOIjb9WU7dvu3gglWDB0wMQRce6wT38g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Jv8f4tvJB+ZPlwb+9dDsJn4nhHs/bSW9bYhmSHCaD3lmc43ZxpjR68HdR1s32dPQTFRceCLepDTInieo/POoZZxUdqrpt8gcw/t4Sj0zJ6BcsFfqltKNPNRz5HHGrC0RWWR7kaoOzXzjvHXMRJGq1Jx3F7tIx9TSBR0Zh0Xkvz0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de; spf=pass smtp.mailfrom=sntech.de; dkim=pass (2048-bit key) header.d=sntech.de header.i=@sntech.de header.b=U2sG+i3f; arc=none smtp.client-ip=185.11.138.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sntech.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sntech.de header.i=@sntech.de header.b="U2sG+i3f" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sntech.de; s=gloria202408; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=x62ijsNCPVrYm4nC3upourBy1Fy9pOeygf/DPMb93sY=; b=U2sG+i3fszrTFjXKD4v7fanvsT m0ezMugZ9dsBmqhprndlHrr7g6flKayDcXnq77XGUJkY+WTU5n9Mve7X1RKSY4Yl5TX0bIQmeX6Fz FdIIS1Yti6wrMKWPzY/OxXrEqoLIyMrlRwcy8wGOVMec/4P4j8woe4svpldm4kRzACuqINmuOTXAT gRCMIZG6nFu5ZahWhMCmQmqERaVKy5+hIVqMY8d7FtmEhPE46D7aai6zTEj2N3x/FW9lE7l8ydbkq jGBOj4Uab83YxANmT9jUYw45A/1HNChk+quRP9GRr2/l1ykKJAgC+8WJ3y0KefHScjEcLSoPbaylk sriO5auQ==; Received: from i53875bc0.versanet.de ([83.135.91.192] helo=localhost.localdomain) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1thcKd-0008Cw-Um; Mon, 10 Feb 2025 23:32:48 +0100 From: Heiko Stuebner To: srinivas.kandagatla@linaro.org Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, heiko@sntech.de, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, detlev.casanova@collabora.com, sebastian.reichel@collabora.com Subject: [PATCH v2 5/6] nvmem: rockchip-otp: add rk3576 variant data Date: Mon, 10 Feb 2025 23:32:18 +0100 Message-ID: <20250210223219.1193346-13-heiko@sntech.de> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250210223219.1193346-1-heiko@sntech.de> References: <20250210223219.1193346-1-heiko@sntech.de> Precedence: bulk X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The variant works very similar to the rk3588, just with a different read-offset and size. Signed-off-by: Heiko Stuebner --- drivers/nvmem/rockchip-otp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/nvmem/rockchip-otp.c b/drivers/nvmem/rockchip-otp.c index 3edfbfc2d722..d88f12c53242 100644 --- a/drivers/nvmem/rockchip-otp.c +++ b/drivers/nvmem/rockchip-otp.c @@ -274,6 +274,14 @@ static const struct rockchip_data px30_data = { .reg_read = px30_otp_read, }; +static const struct rockchip_data rk3576_data = { + .size = 0x100, + .read_offset = 0x700, + .clks = px30_otp_clocks, + .num_clks = ARRAY_SIZE(px30_otp_clocks), + .reg_read = rk3588_otp_read, +}; + static const char * const rk3588_otp_clocks[] = { "otp", "apb_pclk", "phy", "arb", }; @@ -295,6 +303,10 @@ static const struct of_device_id rockchip_otp_match[] = { .compatible = "rockchip,rk3308-otp", .data = &px30_data, }, + { + .compatible = "rockchip,rk3576-otp", + .data = &rk3576_data, + }, { .compatible = "rockchip,rk3588-otp", .data = &rk3588_data,