From patchwork Mon Feb 19 16:09:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 13562872 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 072E2C5475B for ; Mon, 19 Feb 2024 16:10: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=SS8UepXPinvbMpuO0qi8ax0sFLZy/EWgQOKOqT/Vj1c=; b=cwGib46haKbLvc 7nGRB46turhfQcqGm0tYdu82SvhifnM6sNeWoxsnAvjQTHG+vjttuw0dch5VKeNi5+4rEREmRvd+P g0qLjqkjf1CEmN01uqy8TNSAFHpujt5pAM7nO3w05B13zdtzYqjk+2fOYPgHKKGt4YwKN5TsVJtIg W861SwrPt9LfEJnf2YW9ySo76sr29kfqfSaC1i8LcP358h1WMtUDRqFUEpC7UAfw+A3cjIVrA2/Fg coX6CQvn8XZKczkAOT8dAXqyKafvGi09kyMJQvCIz9BY3yBAf/s0CJS15oQ8jJE/OYurxHKT1rlrg nv/Z/BScVimS2LEMIlgw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rc6DU-0000000BHGe-2Xyf; Mon, 19 Feb 2024 16:10:04 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rc6DO-0000000BHCo-0Cxe for linux-arm-kernel@lists.infradead.org; Mon, 19 Feb 2024 16:09:59 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4126aa42402so3698235e9.0 for ; Mon, 19 Feb 2024 08:09:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708358995; x=1708963795; 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=JAty1mWdwmMOLtDVPwWFJ/YPRqG9UrpAtFa4aRlt5qc=; b=JIeo6K5UNAEHNb8947ZQTcJ9bhpqqNyBtWVIqol5mT+4ciVY2PKAZrhfAryTs4kqo+ XHkAAb9QxVEbPs1hFRpsykDMeZ1eMyAK1HNuQ4nT8S0k4HIn4ZNZ5QrR8ruSgsz+UlMJ ftt2CUH10d17Eth3QNQt4fvQi7zFJ9qwaqqXHN99ELfxM/MDmZ66rX5minL1m9BNCw/G 8nzf6y4I3Itos8rLybBXH9dsInZ8+tNRW5P3P7fMIUue/mrsYh3kAkBHr/jMA2Yg8v6e 5+bMhKLyETgSAt8lrTnggWltlVC+sQTQT0L4R8JFlkwdO/DrOIcNceUKYO1bBiaiplWe zFLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708358995; x=1708963795; 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=JAty1mWdwmMOLtDVPwWFJ/YPRqG9UrpAtFa4aRlt5qc=; b=IbN8OUxT6dEXLDK4AJkD32hshzAbIsk8RFDNebdXI67wH9ixDE2oGdf+ny7Ch1Pr1w 9aJy0kvx3RSsIa+7DR5PgzWnnTqE/5RW1Y9XhNvoESGLzEdq1pPa20aXvhNe2EKnEeLF RqiqdCVnhgHDGkUpuDrL96dzRWUsWey0q/AIaZo4Dvk21+k/+GfZGwCdgjQOk040qes/ RSiGkzMSHLsDRGTne65rom2LyU/fdOhNcRzpi0W+dj1XUpalF/4BxMATt0TX8pKmwO44 kwRzecEETfxR71U8CW5Zcd2jkUwUCFOaGiP60d+u9qf/caW2o4+Bfb8Y3FEF6SLWY87U /7vg== X-Gm-Message-State: AOJu0YyIzw5c90Ejy+9THAu87K1llKNf90On8wHX4IrKGPDcqcBkt0q1 Hf9+YC3Ni5GiJHwWpLKTl37EftbHpxeh2nB8F7TJZy9F/l8Qz4Wx X-Google-Smtp-Source: AGHT+IHrkzblkrWsemQP5Dqf+bUZAM56ai8td+o/veIe6vP6nnk/AAMbYi1zMp751ZFku+6MsMv4Rg== X-Received: by 2002:a05:600c:3790:b0:40f:cf69:3e1a with SMTP id o16-20020a05600c379000b0040fcf693e1amr9584304wmr.39.1708358994673; Mon, 19 Feb 2024 08:09:54 -0800 (PST) Received: from prasmi.home ([2a00:23c8:2500:a01:3c2e:cd45:f50f:f083]) by smtp.gmail.com with ESMTPSA id l14-20020a7bc44e000000b00411d1ce4f9dsm11592670wmi.34.2024.02.19.08.09.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 08:09:53 -0800 (PST) From: Prabhakar X-Google-Original-From: Prabhakar To: Magnus Damm , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Will Deacon Cc: linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Prabhakar , Fabrizio Castro , Lad Prabhakar Subject: [PATCH 3/4] soc: renesas: Add identification support for RZ/V2H SoC Date: Mon, 19 Feb 2024 16:09:11 +0000 Message-Id: <20240219160912.1206647-4-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240219160912.1206647-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20240219160912.1206647-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-20240219_080958_621835_B161A1C3 X-CRM114-Status: GOOD ( 17.38 ) 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 --- 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..78d656d7699f 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..499d120f9978 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);