From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.160.68 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796328594; b=hw+p2yyRPKe40DoISt6blnLO/ndKFiapqst9IfGzrXJ9ZXzieXwAKcr4JlhXXmbmGbEs aP/nOu0R4jfyuA9eIByqAdwF7e7EOyOgFqxfaMXuVUWKhMfXfcbQvrkEwvJ9ge+cQjPDU z1sEPwAWNmLiwfa+QnTkxeMnX/HbpHODrIrMWFm7V62Sd9XvHwJElQ1lzBixXxudVtfmn mh9o5lCxocVDC/HPO+fV1cX2L4jYwn9vozK/R3b11G4uguQ0EV86qOX0a3UgzCkBu6EY9 7iIls6a6Y6lEMXozG9j4uF/iZeXe5xRyk9jHvtBJ8DpMjipiWcLpkFxX9+i5AoZjGIw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796328594; 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=CI7Oj5jrdf804pnYYb5nL9k697fmq1NSHhNKLEsY8ms=; b=zALPE4DNtQTssGkCFm9xdXA4R/FwVdcUPIiIhiQrfYdoiAURIwcc5LbvYe/jimQ0waKp AFGmu9JbtIeNPbQ70XS5HHMg+wNt8lhlCkmlF342Use1En3dl/zuFSupGv18rXMpgz0lC Kp0xY2Vo9N0yxPzCSekSwFnib64qQNNQE4iZFJQxxfPC4UAhKGrKdFgUeYJSnlbtJPl/x nuKucEsKXDw3BEqgQZkdIYZDti6eDF9OJc0k7m1ITt8pmzqdA6c5uGjB0cmZ26tIcggj2 5PU6rTQHvWvSNeBkD1+/5rpx8jqqUbW5MXgauNIUrdeoTkpKu9jiK9mmmP72dVAxXgA== 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=D6LFdO16; arc=none smtp.remote-ip=209.85.160.68 Received: from mail-oa1-f68.google.com (mail-oa1-f68.google.com [209.85.160.68]) (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 7657B606A322 for ; Thu, 3 Dec 2026 20:09:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7657B606A322 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=D6LFdO16 Received: by mail-oa1-f68.google.com with SMTP id 586e51a60fabf-46556b9e02cso155381fac.1 for ; Thu, 03 Dec 2026 12:09:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar.com; s=google; t=1796328592; x=1796933392; 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=CI7Oj5jrdf804pnYYb5nL9k697fmq1NSHhNKLEsY8ms=; b=D6LFdO16IsvscN8a2qMpkJNoZzE5ivqaa5Ojnx6RSuodNKu3LYKmiczWsLN6dKcVIV rAR/oPu/RgzEqOTdSxxw6PNPBOkuTFZ79dH23c/fNUjm98MFpbYPl1o5Hp1ujnqoyIyQ caXj+FznyTNBCOKjou3kevtZoFWxNem0CqT3p7R967cnCubqWg5G1wCE+bh6nRzmF7iq hIhgA3CPy5QUxWRZBe5yU2F/nTlU5eqSp9o5Ee5wb/ARaXLRPiakDcEFTcpCZNPmKLqu UkRIbwNKHJzYFMLLrY4Oq8emMhxvl3kLEaS0IdyzqZzo6D7xE2F/Nxa1HyE30bV+i5DZ 7wug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796328592; x=1796933392; 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=CI7Oj5jrdf804pnYYb5nL9k697fmq1NSHhNKLEsY8ms=; b=LHvDiyB7AVMzYHB513s6g6dDHBf6dgS8/5PJbB9m25uOt2zqn26e8onOCJMIvHb+kY is32wKyo4st3B5rkVGzomRdXEkgX+ohaABFClwFzl0quQ8kXMiFfaVWYIQNfIWmj0Mej ws9iCt8xu045a/jKrRS6GMkXgD8ynY2rff7djwELlJBrGGlQp4r0gs0iEQg2eISkwZEL DR0msKkWYqG0wD/95AAmK+u39X5JqLPLPNw2BSfmBKdibPR3PvMQYmcZGDNXiK/eZapj RP2w4eZEkF0D5FL2KEoWvSGMzhzuF97J90Hs+Yfzp0IoAM3ZMTWji4wLaDloduo86Y6a UN0Q== X-Forwarded-Encrypted: i=1; AL+hErEFnCzEfyWcYxL947tgxGTnkQDcU8JLcggsuVVWiO1IKgj5X/nIQjrjb2uATnIva15YBAMXREy+/x1EE7ZQ@vger.kernel.org X-Gm-Message-State: APuU4Z9Ibf4HxOLHlrVL3F7+x+BSi5jGZek/kqUzhoMKTqXayU5Tg+Bi +DtVmid7Fo2JSSMs7b3LiMPXkbv0iVB/laSyiXSXtctsD5z+ghwPbEuL629T4FyMBVQ= X-Gm-Gg: AZFdTZdZx8Z2HwFFv9cJdj2H7pFPwj8ymjuFjTXBXQMQsoRwaIkvHoPjHloyzDnMXWA vsOxhIJBNQzULDks6ludj7JNcvk0rFNj15baJbpFFZqIOIv6NKk8IL/GUrXSRHRy4lzBCed5VnN TOguC2Yh8U+tteK6h0+8Mt86E1+u8TepfmuhjkhPJYROsDb3fjsO0FYK9e7f+SvVmYq7b6XRbri BDaX2nIhNe+VbCLPrOzgbZDRRHma9LCQDgeZy8TenRyUO/ZWOt3lHEhlMQzxFzR9AialL3Sy7Jc cVvzJXpZmb30yZDqLyrpeuyJtluK7F/PvpWS2AnGuLlq3Fwl677eUzdfjcZKN8BTpmyjiM1SxpM M1yByLBZ5ltdYUW12tnwW2fKki8gfvJu0WgJGL2YBXjtZT1XAYaPwRtfLHh6SgvxU7mXYtbNGpa ROBZtKONVAG64jhc82bozLxbO/My/FxOxckO/VZ3FFz9Y52IMQDZrjyXziHe+EzT8CFem9i7Z6a rW21igGwnNt5d4qTo9nNX1ChQjLjX8Ya7ka/mVrDIxn1aqz4KA1LmWdD+rYmDqWDhA9lR/2eI+4 zKp9vy7JrJ6WeKyf5AUj4qa+L5tZgMmGbNjo X-Received: by 2002:a05:6870:6594:b0:47b:e30b:893c with SMTP id 586e51a60fabf-4e0db3268famr2329401fac.6.1796328592324; Thu, 03 Dec 2026 12:09:52 -0800 (PST) Received: from zippy.localdomain ([76.156.233.211]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-4bd3008160dsm42590227fac.16.2026.12.03.12.09.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 12:09:51 -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 v5 0/4] clk: tc9564: introduce clock and reset drivers Date: Thu, 3 Dec 2026 14:09:43 -0600 Message-ID: <20261203200948.1595470-1-elder@riscstar.com> X-Mailer: git-send-email 2.53.0 X-Mailing-List: linux-arm-msm@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 4. -Alex Version 4 is available here: https://lore.kernel.org/all/20261201160810.2422466-1-elder@riscstar.com/ Between version 4 and version 5: General - The reset driver is included before the clock driver in the series. - A few things have been reworded or renamed. Binding - Comments in the header file about the I2C and PCIE clocks being critical have been removed. (These clocks are still registered with CLK_IS_CRITICAL flag.) - The I2C and PCIE resets no longer have publicly-defined reset IDs. Reset driver - Without public reset IDs, the I2C and PCIE resets will never be asserted, and the code that previously warned on any attempt to "get" them has been removed. - The reset driver Kconfig now selects AUXILIARY_BUS. - Philipp's Reviewed-by tag has been added. Clock driver - In the previous version, the clock controller driver erroneously added three separate clock hardware providers using a single device. Instead, a single clock hardware provider is added using a clk_hw_onecell_data structure which now represents the PLL, fixed clocks, and gate clocks. - There is no longer any need to track the clk_hw_onecell_data structure that contains the clk_hw pointers for clocks after initialization. - The mapped memory address used for clock and reset control registers is used during initialization in the clock probe, but is not needed thereafter. - Because various pointers are only needed at initialization time, there is no longer any need for a per-instance structure to be allocated for a probed clock device. - Gate clocks no longer specify their fixed rate parent clock with an ID; they instead indicate the rate they need. When a gate clock is initialized, the clk_hw pointer for the fixed clock having the desired rate (which will already have been registered) is looked up and used as the parent. - Each fixed rate clock is defined with a name and a divider value. IDs are no longer used for fixed clocks. - The probe function now iterates over fixed rate and gate clocks, calling functions that initialize individual clocks and return a clk_hw pointer. - The clock driver now uses __devm_auxiliary_device_create() to create the reset device, rather than duplicating code. - The clock driver Kconfig now selects AUXILIARY_BUS. - An unneeded include of has been removed from the clock controller driver. - A spinlock that was associated with resets in an earlier version of the code has been removed. 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. Please refer to version 3 for more information about prior versions of this code. Alex Elder (4): dt-bindings: toshiba: introduce toshiba,tc9564-clock.yaml reset: toshiba: introduce a TC9564 reset driver clk: toshiba: introduce a TC9564 clock driver arm64: dts: qcom: qcs6490-rb3gen2: add TC9564 clock node .../bindings/clock/toshiba,tc9564-clock.yaml | 73 ++++ MAINTAINERS | 17 + arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 15 + drivers/clk/Kconfig | 10 + drivers/clk/Makefile | 1 + drivers/clk/clk-tc9564.c | 326 ++++++++++++++++++ drivers/misc/Kconfig | 1 + drivers/reset/Kconfig | 8 + drivers/reset/Makefile | 1 + drivers/reset/reset-tc9564.c | 165 +++++++++ include/dt-bindings/clock/toshiba,tc9564.h | 26 ++ include/dt-bindings/reset/toshiba,tc9564.h | 22 ++ include/linux/soc/qcom/tc9563.h | 9 + 13 files changed, 674 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: 799dd936553182df5770dde7f38d94c8337df75a -- 2.53.0