From patchwork Tue Feb 27 23:25:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 13574591 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 DD9F6C5478C for ; Tue, 27 Feb 2024 23:26:38 +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=PCLtCPNxARGspQv+dUdgxGxkhzTkamn4z+5umk/q66g=; b=EAMcI+C4dR2FCJ D4sW3DvrYstL3pv6xLXj3ggrmHlFtYb1rf9MRiyRjvGAtymdTyLfw0iImw9dhJuhZcSQ9TDTBerlS efE6jTnkLftRf/xwlIyI3rtIoRRr4QV36f/kK6/cp9mNzNqD2Dt8NBms/czC/QBWqPn3OjimaU7+Z 44Y5diKUsHCA8NTM0OrU8BDg/FPCYBlhJbQGqcYIE9/kIGP1liv3r8aEZ/M2dDcSzmcN+loBiHpO/ +C2l3b9cqBQLMTcQY9B3rjLQlIwOYnFANgT/H65Bxm2bZ3tHcOwke4FlBOhTxPHn+aJXYq52B79Yq B667D3Sd7UnmV6CAzmtg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rf6qB-00000007Ekb-38FC; Tue, 27 Feb 2024 23:26:27 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rf6pp-00000007EYd-1goZ for linux-arm-kernel@lists.infradead.org; Tue, 27 Feb 2024 23:26:06 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-412b36b1b86so748085e9.0 for ; Tue, 27 Feb 2024 15:26:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709076363; x=1709681163; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Vrbq9/3K+cXKsueDWBzf+N6MdOLNDuDdOsXrr/s8YT8=; b=YvgGmReDzbhT//6y5c+jVd4WU0YNDMFq3GFSLoM8ID3BaynV1lzo3PyElgxcjJOA4o Roe+NSNY6OBZYl6VysqRj/N1jIzsqnYgr8hxjYSUeZnCMQp/M00ZZbfj/kp7/k65LZd8 9di569FPSeAqpazjTjJbE3JB5b65J5rvX+RciBIAG6/PLcDH2b/pGI610VXGNPjZlIjX CC7v5YYjCXG5P/rZQE8kLjPWq+r7zCLo7n/kyzea0LdxHXx+gfK7/YA+1swPHwOevIag AtpyDt6I3pOTqM1KJAP4f7RTurccxPSOm01ZKi8tCKAZAk4ZxAt0rrvEA2YIF6VsndqT Odkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709076363; x=1709681163; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Vrbq9/3K+cXKsueDWBzf+N6MdOLNDuDdOsXrr/s8YT8=; b=Cred/g7HTIuaXaodd22IK84mHBkYgmqBCYcxHQ/Xc7Ate0JeqPqF8CPCX2sjCsBKnn hmNManl82+hXe9i1LumM2pKx8veKiu4MkqxMMxx3gMnCJ6hCps28LTz2kGtyKZELH2/1 KNovS27eTB/G5wHoc7k/JpVJvacG60VpWId76eWhQRnyh3nJ/tE0Lnw/zB08hoFndlgw Gte+kNG6gZZwFZESaRKGqJwBtc0sZ5IEBRbJ4LMPD8GcJeaZYgZMz80ecB+LK3U7/IL+ EkGld/Al9IzEhj85mrRDUC6p6n6wQllhZ2Ir2guWdnv1RTaJkXfI3ESO/xixYnmeJomm TI3g== X-Gm-Message-State: AOJu0Yx7DJnxfc+WbsgOb05h9qfnBytZjBYJz5xgqnccj2bvq69xCGi7 rCJgSNlZpmk6HHG8fLfawWLjmgCS/2ChcwRWsrblPDT5jqKqsyJgkhpwbgge X-Google-Smtp-Source: AGHT+IHsVjm2Q7TKH3P6XxUjdsf5x35MHtvMZ9f8l+fBRTkAGh8oJVyX1oT6LH8aHrVqysjgwPOOpQ== X-Received: by 2002:a5d:6649:0:b0:33d:aa78:ed82 with SMTP id f9-20020a5d6649000000b0033daa78ed82mr7972508wrw.34.1709076363542; Tue, 27 Feb 2024 15:26:03 -0800 (PST) Received: from prasmi.home ([2a00:23c8:2500:a01:e6a2:98b:e06b:631a]) by smtp.gmail.com with ESMTPSA id co22-20020a0560000a1600b0033d96b4efbasm13014444wrb.21.2024.02.27.15.26.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 15:26:02 -0800 (PST) From: Prabhakar X-Google-Original-From: Prabhakar To: Geert Uytterhoeven , Magnus Damm , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Will Deacon Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Prabhakar , Fabrizio Castro , Lad Prabhakar Subject: [PATCH v2 3/4] soc: renesas: Add identification support for RZ/V2H SoC Date: Tue, 27 Feb 2024 23:25:30 +0000 Message-Id: <20240227232531.218159-4-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240227232531.218159-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20240227232531.218159-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240227_152605_471245_0E342AD9 X-CRM114-Status: GOOD ( 17.73 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Lad Prabhakar Add support to identify the RZ/V2H (R9A09G057) SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven --- v1 -> v2 - Replaced RZ/V2H{P} -> RZ/V2H(P) - Used small case for hex value --- drivers/soc/renesas/Kconfig | 5 +++++ drivers/soc/renesas/renesas-soc.c | 20 +++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/soc/renesas/Kconfig b/drivers/soc/renesas/Kconfig index 5deca747fb77..91464ea48baf 100644 --- a/drivers/soc/renesas/Kconfig +++ b/drivers/soc/renesas/Kconfig @@ -344,6 +344,11 @@ config ARCH_R9A09G011 help This enables support for the Renesas RZ/V2M SoC. +config ARCH_R9A09G057 + bool "ARM64 Platform support for RZ/V2H(P)" + help + This enables support for the Renesas RZ/V2H(P) SoC variants. + endif # ARM64 if RISCV diff --git a/drivers/soc/renesas/renesas-soc.c b/drivers/soc/renesas/renesas-soc.c index 8f9b8d3736dc..172d59e6fbcf 100644 --- a/drivers/soc/renesas/renesas-soc.c +++ b/drivers/soc/renesas/renesas-soc.c @@ -75,6 +75,10 @@ static const struct renesas_family fam_rzg3s __initconst __maybe_unused = { .name = "RZ/G3S", }; +static const struct renesas_family fam_rzv2h __initconst __maybe_unused = { + .name = "RZ/V2H", +}; + static const struct renesas_family fam_rzv2l __initconst __maybe_unused = { .name = "RZ/V2L", }; @@ -177,6 +181,11 @@ static const struct renesas_soc soc_rz_g3s __initconst __maybe_unused = { .id = 0x85e0447, }; +static const struct renesas_soc soc_rz_v2h __initconst __maybe_unused = { + .family = &fam_rzv2h, + .id = 0x847a447, +}; + static const struct renesas_soc soc_rz_v2l __initconst __maybe_unused = { .family = &fam_rzv2l, .id = 0x8447447, @@ -407,6 +416,9 @@ static const struct of_device_id renesas_socs[] __initconst __maybe_unused = { #ifdef CONFIG_ARCH_R9A09G011 { .compatible = "renesas,r9a09g011", .data = &soc_rz_v2m }, #endif +#ifdef CONFIG_ARCH_R9A09G057 + { .compatible = "renesas,r9a09g057", .data = &soc_rz_v2h }, +#endif #ifdef CONFIG_ARCH_SH73A0 { .compatible = "renesas,sh73a0", .data = &soc_shmobile_ag5 }, #endif @@ -432,6 +444,11 @@ static const struct renesas_id id_rzg2l __initconst = { .mask = 0xfffffff, }; +static const struct renesas_id id_rzv2h __initconst = { + .offset = 0x304, + .mask = 0xfffffff, +}; + static const struct renesas_id id_rzv2m __initconst = { .offset = 0x104, .mask = 0xff, @@ -449,6 +466,7 @@ static const struct of_device_id renesas_ids[] __initconst = { { .compatible = "renesas,r9a07g054-sysc", .data = &id_rzg2l }, { .compatible = "renesas,r9a08g045-sysc", .data = &id_rzg2l }, { .compatible = "renesas,r9a09g011-sys", .data = &id_rzv2m }, + { .compatible = "renesas,r9a09g057-sys", .data = &id_rzv2h }, { .compatible = "renesas,prr", .data = &id_prr }, { /* sentinel */ } }; @@ -513,7 +531,7 @@ static int __init renesas_soc_init(void) eslo = product & 0xf; soc_dev_attr->revision = kasprintf(GFP_KERNEL, "ES%u.%u", eshi, eslo); - } else if (id == &id_rzg2l) { + } else if (id == &id_rzg2l || id == &id_rzv2h) { eshi = ((product >> 28) & 0x0f); soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u", eshi);