From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.45 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796141296; b=eKkU2Olr8d0SPUJ3i6eILjExracIiptrT29Pnhg0Zp3Nb3kXR54dh7N3TJaK7lAOElTJ ZCN5vn7diE9ml3GcAJcnVtwEeYEUju6sVkm8SEVEwIIopEJ37xSPcruIxFCdCspEBfyF3 p9dm73daQRzlkOvNSqYh183oh7KJteSoITLk+P6rOHsCNLdqyjO5LMcNI0t2iS8cQMVZ2 fpckIiiIh2d/QOD5hOb7lAxU2Jg5ygpIeKsNsPe3YVEYVf96FoVKGjwkGZUXVBaY8TB/n 6Ppjb7sVHiIzuyjeihtWAhmBHmrdPdfkEEtqk8rlxsPZdibMZjElSC/0y9cbK98WZAQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796141296; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=d6DahbK1R61SRZ4beltwZery6hRp72BLIqALlQ3bwTI=; b=b219WTrvMR7EjdrKsT8ykSSVmU4ZnVSO2bXYeAkyzO2Gv12aKbYHZbm6N7gUE+uz7bBW 3fbADIRqpnFtidBzdlXtEkQTFsOn159Bi2mtKzQcJr/Wq4FDYS1qf4ZYGnqLlxIBZVv2N kMQiaPKWkyuHU50SkxxSEiOCn7AKG4WCQafnzSoG9gaLGEANYWRrxVC+t57pY6yWk3/1h tWMrStFZke68PH6GfTHGOLLemfWeQR25hQepi6m9pi6l1ztmQ6/vM+lzWYr0api1zlPL1 QTqr4U6SF6TZXD9mSJfdBKDh+cv7vnrI25gAdlB4ET5sfG4ob1O1k6+qoZtbxR55h8g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=riscstar.com; spf=pass smtp.mailfrom=riscstar.com; dkim=pass header.d=riscstar.com header.i=@riscstar.com header.a=rsa-sha256 header.s=google header.b="h/fS7YQR"; arc=none smtp.remote-ip=209.85.210.45 Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E75DF606A31A for ; Tue, 1 Dec 2026 16:08:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E75DF606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riscstar.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=riscstar.com header.i=@riscstar.com header.a=rsa-sha256 header.s=google header.b=h/fS7YQR Received: by mail-ot1-f45.google.com with SMTP id 46e09a7af769-862bb0a189aso5096309a34.1 for ; Tue, 01 Dec 2026 08:08:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar.com; s=google; t=1796141295; x=1796746095; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=d6DahbK1R61SRZ4beltwZery6hRp72BLIqALlQ3bwTI=; b=h/fS7YQRSzqauadUl9fpu62HlpG9P3yyHR9vjYrKTeErZj3FqVGkN8Em29PKD+z0fE eSpNHJMu7y7v0EK+68cpUihdFUkfpX+ntbOKlBiJcU1b3gokoCzECnkYaFkHDApsm/9r rkoXEptqwFReug7Pppq66p72Ia3IGX3115ygdMicLm2TC1dKdADNEJVLaVf9LY1bR+U5 qVVOT/pqAQ0Oze82ud0ySE4gccvAzjpvTaKO+kn2JNrg+qMYXE63uBEM4iqgDbsA+aDD nqj/n0Fz9W04JwDfwuA2/8ys8baB0KDH42DRbMi7I7K176OuTJpGSRxIPcXAmukH6Wf0 bGQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796141295; x=1796746095; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=d6DahbK1R61SRZ4beltwZery6hRp72BLIqALlQ3bwTI=; b=ojRBgGUa3LvFrNOYf6R571T/5HzxFVTVV7CX4phaDHjPCJLu6YyimwdMpG7EEPO+qu nvBrh/4ull/cAEHJE9Eo/YAZbwG7q3Jq5VA1G8QrZzwBEffa/p+nZ6yLlY+t3A1rq1y2 xspSszzl4rYvd5JucMwBvP+WHBWvdAAxKH1O7g6EQAiwqO/3Xsx32rWemDc1hLXkfES3 IqLTGifKheaF9aCqK4/E/lJm/dcUP8qAFByfrhzJtJpeWIddeyCMLrOS9Iu+fnT3R4Hi I8/8Zxenm2VHa1O9WtE29I+FL6G+ySCsEPhtQwGVecmd0TMQlgQsyHoC+yitYDrY/3Ou GX6w== X-Forwarded-Encrypted: i=1; AL+hErHWMgXIX+J7T7LE4VXwDxU97UWd90UzsoJiEnLMZTQE0aaudP27ITJAYHbW2fmjgx9H9QxESi7GcWXN@vger.kernel.org X-Gm-Message-State: APuU4Z/cgnAcM5jOmGip7xzNAtIvkf3uT7eeY2hogY8Cak1tShjEC4yD Ox3Pusr6hFclto333LKx8DzVVXl2kRe2zVKlmpdMbvzkT2fMLXViSEp8ZovGpf6sRqM= X-Gm-Gg: AZFdTZe7edaVg40JnudJTvAwFWv4stsIATT/ra1BPnrozpZlcOvgav/LNIaMljGN3fA NrwZTURZr9uIyl7VXVK3u/HvAhHicgqlPxtBmq9Z+W8PnukYiKSmb+kl3Ai7OGh7krsXWDR3V3O ioFtrdYT6goJHB6wR9uGcmbxFvGOeuebulNR/r0gLHNmuG0Dkc9Gp24L4vzW7TbypWSdzQo2GE1 yX2oQsluv/bbQA7Y7Ac0dIzQ+rpw1BAxEOie/HJIwAxB7j/0liWREf322cu+2F1dRSkZw0/4b4k Vav2KDJb09FoYpcnG2uwchwhJvo1nCpSeHHC5KyxfwQ9P+G30jwPVypaGx/c0VQ0+5AyYcfqjmk xemvcBrfD/wavsDM0UitkH4XbUHeDt5hH1lg90vW1Y5RssRTRQZCvzvx7iKTV23BGvnjBwz6FFc 6lqDkMtvcU0b8ICe7f4npf6mWVZ2eX/ps8UvSPHOJ94bAogqygXb4TwX8GWrdnMmvHRsjxYLJuf adIbstqYKXhZrejyWsFmO83QFQ8Qwbk8Jy59JJVggsn5hYYB2lkl4dYm89Kvhha877YV8z7vbap u2ehP/1APgqzZTMgtP1LJJ7c0ZzsxcFbkRTh X-Received: by 2002:a05:6830:4ac9:b0:85e:f43c:48ac with SMTP id 46e09a7af769-863158d1e6amr40902242a34.17.1796141294766; Tue, 01 Dec 2026 08:08:14 -0800 (PST) Received: from zippy.localdomain ([76.156.233.211]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-8631690fd36sm27182439a34.20.2026.12.01.08.08.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 08:08:14 -0800 (PST) From: Alex Elder To: sboyd@kernel.org, bmasney+clk@redhat.com, jbrunet+clk@baylibre.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, andersson@kernel.org, konradybcio@kernel.org, abelvesa@kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org Cc: daniel@riscstar.com, mohd.anwar@oss.qualcomm.com, lorenzo.bianconi@oss.qualcomm.com, fabrice.gasnier@foss.st.com, alexandre.torgue@foss.st.com, marex@nabladev.com, changhuang.liang@starfivetech.com, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 0/4] clk: tc9564: introduce clock and reset drivers Date: Tue, 1 Dec 2026 10:08:05 -0600 Message-ID: <20261201160810.2422466-1-elder@riscstar.com> X-Mailer: git-send-email 2.53.0 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series introduces a devicetree binding for a clock and reset controller, along with a clock driver and an auxiliary reset driver, to support the clock and reset components present within the Toshiba TC9564 chip. The Toshiba TC9564 is an SoC that attaches to a host system via PCIe. It includes a PCIe switch with three downstream ports. To one of these ports an embedded PCIe endpoint is attached, and that implements two PCI functions. BAR 4 for both PCI functions provides access to registers controlling blocks within the SoC, including the clock and reset controllers supported by this series. This version of the series addresses feedback received on version 3. It includes adding an "imply" statement in the Kconfig for the PCI driver (located under drivers/misc). -Alex Version 3 is available here: https://lore.kernel.org/all/20261125202141.1288493-1-elder@riscstar.com/ Between version 3 and version 4: - The reset driver functionality has been separated from the clock platform driver source code, into its own auxiliary device driver. - The clock driver now creates an auxiliary device representing the reset controller. - A few definitions are placed in an existing common header file, to define the interface between the clock and reset drivers. - Reset IDs are defined in a header file separate from the clock IDs. - The three clock types implemented by the clock driver (PLL, fixed rate, and gate) now have distinct zero-based identifiers, and are no longer represented within a single clk_hw_onecell_data->clk_hw[] array. - Clock and reset ID symbols now have a "TC9564_" prefix. - The function that formats clock names using kasprintf() now has the suffix "_alloc", to make it more obvious the caller must free the returned pointer. - The clock driver no longer *depends on* the TC9564_PCI config option (for the TC9564 PCI driver). Instead, the PCI driver *implies* the clock driver config option. - The clock driver no longer specifies that it prefers asynchronous probing. - The reset and clock drivers have separate Kconfig options, and the reset driver config option is *implied* by the clock driver. - The 25 MHz clock crystal is now defined within the "clocks" node in the RB3gen2 DTS, rather than inside the TC9564. - Added a Reviewed-by tag from Lorenzo on the last patch. Version 2 is available here: https://lore.kernel.org/all/20261120183212.1264522-1-elder@riscstar.com/ Between version 2 and version 3: - Added Lorenzo's Reviewed-by on the devicetree binding patch - The devicetree binding now uses @kernel.org e-mail addresses for Daniel and me - Cleaned up the patch header text in patch 2 - The Kconfig option now depends on RESET_CONTROLLER - The Kconfig option can now be enabled if COMPILE_TEST is enabled - The generic gate clock controller code is now used rather than implementing a custom one - Only the gate clock IDs are now published in "toshiba,tc9564.h"; the PLL and internal fixed clocks are implemented and accessed only within "clk-tc9564.c" - The PLL is initialialized, followed by all fixed rate clocks, followed by the gate clocks, to ensure each clock's parent is initialized before the clock is - Updating the reset registers (read/modify/write) is now protected by a spinlock - There are no more "unnecessary newlines" in the initialization arrays for clocks and resets - An update to the DTS file is now included as the last patch in this series Please refer to version 2 for more information about prior versions of this code. Alex Elder (4): dt-bindings: toshiba: introduce toshiba,tc9564-clock.yaml clk: toshiba: introduce a TC9564 clock driver reset: toshiba: introduce a TC9564 reset driver arm64: dts: qcom: qcs6490-rb3gen2: add TC9564 clock node .../bindings/clock/toshiba,tc9564-clock.yaml | 74 ++++ MAINTAINERS | 17 + arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 15 + drivers/clk/Kconfig | 9 + drivers/clk/Makefile | 1 + drivers/clk/clk-tc9564.c | 401 ++++++++++++++++++ drivers/misc/Kconfig | 1 + drivers/reset/Kconfig | 7 + drivers/reset/Makefile | 1 + drivers/reset/reset-tc9564.c | 190 +++++++++ include/dt-bindings/clock/toshiba,tc9564.h | 26 ++ include/dt-bindings/reset/toshiba,tc9564.h | 24 ++ include/linux/soc/qcom/tc9563.h | 9 + 13 files changed, 775 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/toshiba,tc9564-clock.yaml create mode 100644 drivers/clk/clk-tc9564.c create mode 100644 drivers/reset/reset-tc9564.c create mode 100644 include/dt-bindings/clock/toshiba,tc9564.h create mode 100644 include/dt-bindings/reset/toshiba,tc9564.h base-commit: 253f86660c1f882fbf554db5eaa34bc5d66dc7e8 -- 2.53.0