From nobody Tue Feb 10 10:59:32 2026 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (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 A09DB314A79 for ; Fri, 14 Nov 2025 10:52:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763117535; cv=none; b=jhJ6ugA2oNQmm1mTVMvOY1uxeH33/IJ5sornjfR4GJ2yA2mk2G+AiKM9cGIlgRgOWRYaJjMynuBZlm74BgnmYQPdzHND7tgBRA8gaB9bQ3w5Hs+TkLtUNO4EleFilKtFla82nm1krQHWuijPmmxDbvM5fdvOJK1PuWJ7tyYJg+E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763117535; c=relaxed/simple; bh=o2GT+tAT3KaMQHIum9qg97jjk1lJRZTQ0SAE08Yq7rY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Oeinnltzbvt7vcrqwbmkORV6P0I+3F42GSCdvpXUUlDzRkIDR9GAo3NMKiSLJYt1/HYXK2ik5JklteO4eOMdBGVTKLof1eS+e1jVlRZwATXK852sckht1ub9w+QxzrYFtHx/6MvFQsIVqA5DlD+1ejZDxoLuS8uKTWhVqx5QIUc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=JCu24F9I; arc=none smtp.client-ip=209.85.221.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JCu24F9I" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-42b3ac40ae4so982080f8f.0 for ; Fri, 14 Nov 2025 02:52:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763117530; x=1763722330; darn=vger.kernel.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=8X/Pwrf9F+TtHyTukhSNpyyWy/Sr3pdNdxYJ7CPLkpc=; b=JCu24F9IaG+ySSAmvwNI3+T5NC69RFhN/zuWjIML9rOWtn5xXJ6ga0iI2pjdHWfgE3 lSRuJnfPufv9PbCw3PpHRf6BFOGENhRwes4BuKamlEoVoncp5bqefiJPVFRaz7jTxuPh dBMggCH118Pd9lIVe5mW78w0W1cabwgBFjlEEzktFdBCl1MCAmFaSqYwuMYoT969imaX UKYcknTn9PgqQ2/63ctMZKnGhF81GsAZVOqxkTmUcSFlPxAmnAySdgWlCG/410CeCuZz TMbPR+HmCrTtZjbRGSbPzfWEtSTwDAE8BYpGhpgPR5VIh0D3VZaMaT497yD0XIVt9hG7 4pZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763117530; x=1763722330; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=8X/Pwrf9F+TtHyTukhSNpyyWy/Sr3pdNdxYJ7CPLkpc=; b=gViTtTDIsYO//KENSSMgPeMgOlaqifgplEmsbl6F20w9HR9OQknHYBhNfqEvYkCSgZ 6Ohvk2J+yGJz2e+qz5ZMUWRwrbMnML4y4BhfhSUmbV+EuwkY7FUaEXWl0MHkmdBFvH7u CBKUim95PwBJNzZn0c8IbMJinTO0u72dbDVkkssWbnMx/LEVk2gSKQTX4fDNNyC0Fw1V VCcx446DoZj7tHTq6icG6t5jRPNLdPg9gGRAiNRyidmDo5BVCce/LX5khRKf44TYWC8r m78ZJOMCnk9R0QpcnlWgef0tIzwk7QLinTpZOAS4QygPLtuZ8rUHobTMNNv9dhjKKF0T VxYQ== X-Forwarded-Encrypted: i=1; AJvYcCUJba4P3k/fK6snI6DVAox3lKifosYxP0thf+cghEWcGJR9xKT78FCjaYi2XR+ajzlP5VqMvxVfAqH4UIo=@vger.kernel.org X-Gm-Message-State: AOJu0YxeSv4df5HesGckOVMRvpwHcd6SwKXpRqfj2u0OY5PYzXlWJYWC UCOdOYx6lKVrJ1U+lk86Ugc+9YdwtT+x1GhZ0gskTFMPWsCLTop4qfXb X-Gm-Gg: ASbGncsLIDQ/rkVyapm7W3xPRJFrcLopqS7hPsE7GYyVZs34kees9nHAmrW6MqKuarU BzfgwxWz0j4IWsU3C+E6SrzuHHK6fk1YIaVcZInHVpKnJEIMvbZYJUcwbIF/ERiDuZoi2OASGOs Gu+7n/EG9OB03TKSRJXNNtQfmAarqT/NsZut2j5IjOV2xiu563wrfoKWQATLHq2boNptFHPthjQ dA0/5ULdzSz63ngHDlDItB9xfLlW0JQuCa3xcrLFyEw/Z0mZLniP2Iw92ILDZGkh625f2u7ZA1w KWAPdxtMgjnR7WwuE9/za80PTTjb5UnUB9kCqkgMk5lG5HwCnfsaRC82yKBVi3BsWJDhx3P+f+n xCCLJbqL8Tbi8dFB5Lc2zxZbkekQV+zZkk7n4ulJK5X7Aohnasz/0wz0ZQE9f6SY5wyP4C+NW8c u+H+j0quMSq5z5sYslCq6FkKqfiK8Hg/ZUg18dvTWWzIAOa2vadvpOTrWaReQ1o2E21fHJRbBKs FpiEBBzfZoXD1Q4 X-Google-Smtp-Source: AGHT+IGHCuqgfNwauAekSJk609AbqQ1B+ZH/YoLkb3M4enU+0WN1Ju/YsW4fhWWiQ3c21vO8G1F2kg== X-Received: by 2002:a05:6000:2008:b0:429:c450:8fad with SMTP id ffacd0b85a97d-42b59396f60mr2591122f8f.53.1763117530214; Fri, 14 Nov 2025 02:52:10 -0800 (PST) Received: from localhost.localdomain (host86-162-200-138.range86-162.btcentralplus.com. [86.162.200.138]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42b53f17cbfsm9031255f8f.35.2025.11.14.02.52.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Nov 2025 02:52:10 -0800 (PST) From: Biju X-Google-Original-From: Biju To: Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Magnus Damm Cc: Biju Das , Wolfram Sang , Lad Prabhakar , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Biju Das Subject: [PATCH v3 09/13] serial: sh-sci: Add support for RZ/G3E RSCI clks Date: Fri, 14 Nov 2025 10:51:18 +0000 Message-ID: <20251114105201.107406-10-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251114105201.107406-1-biju.das.jz@bp.renesas.com> References: <20251114105201.107406-1-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Biju Das RZ/G3E RSCI has 6 clocks (5 module clocks + 1 external clock). Add support for the module clocks. Signed-off-by: Biju Das --- v2->v3: * No change. v1->v2: * Updated commit description. --- drivers/tty/serial/sh-sci-common.h | 3 +++ drivers/tty/serial/sh-sci.c | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/drivers/tty/serial/sh-sci-common.h b/drivers/tty/serial/sh-sci= -common.h index 77f9a67d8efc..6c849757119b 100644 --- a/drivers/tty/serial/sh-sci-common.h +++ b/drivers/tty/serial/sh-sci-common.h @@ -17,6 +17,9 @@ enum SCI_CLKS { SCI_SCK, /* Optional External Clock */ SCI_BRG_INT, /* Optional BRG Internal Clock Source */ SCI_SCIF_CLK, /* Optional BRG External Clock Source */ + SCI_FCK_DIV64, /* Optional Functional Clock frequency-divided by 64 */ + SCI_FCK_DIV16, /* Optional Functional Clock frequency-divided by 16 */ + SCI_FCK_DIV4, /* Optional Functional Clock frequency-divided by 4 */ SCI_NUM_CLKS }; =20 diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 2da36e8ce555..3b03d3d3f2c7 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -3172,6 +3172,9 @@ static int sci_init_clocks(struct sci_port *sci_port,= struct device *dev) [SCI_SCK] =3D "sck", [SCI_BRG_INT] =3D "brg_int", [SCI_SCIF_CLK] =3D "scif_clk", + [SCI_FCK_DIV64] =3D "tclk_div64", + [SCI_FCK_DIV16] =3D "tclk_div16", + [SCI_FCK_DIV4] =3D "tclk_div4", }; struct clk *clk; unsigned int i; @@ -3181,6 +3184,9 @@ static int sci_init_clocks(struct sci_port *sci_port,= struct device *dev) } else if (sci_port->type =3D=3D SCI_PORT_RSCI) { clk_names[SCI_FCK] =3D "operation"; clk_names[SCI_BRG_INT] =3D "bus"; + } else if (sci_port->type =3D=3D RSCI_PORT_SCI || sci_port->type =3D=3D R= SCI_PORT_SCIF) { + clk_names[SCI_FCK] =3D "tclk"; + clk_names[SCI_BRG_INT] =3D "bus"; } =20 for (i =3D 0; i < SCI_NUM_CLKS; i++) { @@ -3194,6 +3200,12 @@ static int sci_init_clocks(struct sci_port *sci_port= , struct device *dev) (i =3D=3D SCI_FCK || i =3D=3D SCI_BRG_INT)) return dev_err_probe(dev, -ENODEV, "failed to get %s\n", name); =20 + if (!clk && (sci_port->type =3D=3D RSCI_PORT_SCI || + sci_port->type =3D=3D RSCI_PORT_SCIF) && + (i =3D=3D SCI_FCK || i =3D=3D SCI_BRG_INT || i =3D=3D SCI_FCK_DIV64 = || + i =3D=3D SCI_FCK_DIV16 || i =3D=3D SCI_FCK_DIV4)) + return dev_err_probe(dev, -ENODEV, "failed to get %s\n", name); + if (!clk && i =3D=3D SCI_FCK) { /* * Not all SH platforms declare a clock lookup entry --=20 2.43.0