From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.44 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796141296; b=EUAKYgcu+qXjVb6uKQjZ4KiOxPwe2Ee2G0duN7k0vlBqL6PSkjD1O/tUji4g2uZQ7gO+ wt4WviJ/ksM089/HR3kJulhP7XCIIctiJu7owT8wfmeFe6wT59rV1uZYVAt+qkD0Gj7rZ fbzhaOyCziDWoqT2KJ2JGtYM2/jv2Ba41AJbg6DuJf1UT2Evdu9inZLHl3GR75bYrPGKO 7hdQVpNcl3dZRYrJKG7CdMHLc4OqH3x9Klkt6U0+N1aY1UktGC4B5D2ee+stq4UGIgmGT 98Dmmod7fJg/Z5YZiT1mxO3iLszOgB5VWqRGr8CV7CPZdZhYzGTRPjFgTAlpzfkxq6A== 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=th7ZXMqP6MoagsBv1o9sGJchMj0kGLFFlgBpfPG6/L0p2Q3WB9x1uVuxqpWnvyky2v4N ujNQWruj9/iBXSbwuuYFVoet1rC7cNipX1Ybkw64bRPLufo6u855NAdDQMkMX5LwtCyeq jocBypDfEf3ph7Du8No60PwMTq3yubgRwyIWdPs1GL0yN9HwkH370uDG9BUH2C7Nlksm0 u+wVNg9slxvWAC9j4Jl0pL0xJm3HwBcd0DYLXDU9zsrhET7MOFF29AsMORH8QuYP7SCTM lwaDrIlaqwBcPF1pawFRf5kw0KpghnzXjryDPC91JCuuUg2TENikkEtmTHqHNZzxZ/g== 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.44 Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) (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 EF075606A325 for ; Tue, 1 Dec 2026 16:08:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EF075606A325 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, unprotected) header.d=riscstar.com header.i=@riscstar.com header.a=rsa-sha256 header.s=google header.b=h/fS7YQR Received: by mail-ot1-f44.google.com with SMTP id 46e09a7af769-862bb0a189aso5096308a34.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=DpHSkQEf+229VyBWPjVHFapBOIDLOjtCFDfovFwhKUxdy/Rnf2YmOLwdH3qBdLQ9C9 Qnm2edQOvLC1jfDvkOcF+8QNgxdV79DjAF4t4YeFqxOMvrgBj4/h2eoq6pKAaxxamx0x LxabwaU50MuylY4N20x4+tsSBzfcxwnUS6Hlfn3Ocg0zDP31l4eCxUgF+eMn35wdb3Hn IqKuQQHaphMuIBo4Q66Lr7TCtK6zBFx0nxjKt73oPxrDY2mVYsfV0tMJ1Re2XUPtMkd/ e6RZoipGqUUv5eOH5GLB1I9I3WDMrPbWu4rtrNbGA6jVwTAAKSiADOSkOXtBwAdNcqqp QKJw== X-Forwarded-Encrypted: i=1; AL+hErFt0OBTA9ql68WMHEwKf5Gf8CW8oCPcFJD0OJcyA7+uYtxl+qA6RL0JEr2K+gkJ+ZuawRkTLeiQtHyZ+wI=@vger.kernel.org X-Gm-Message-State: APuU4Z/A7zUoVqfCHf1NP1CrUK7hqXcVqCZAnSv5xF7WFjQzBjaF3gvf bS6GPIKNV9mLxF/7Z+Q2jXoiXRCqpypoj5pk9uZBeaB+nPOb+1PDgxMy8G9zzDe1jMw= X-Gm-Gg: AZFdTZe8r1d3LucjL1lFZKLTQ/YbVYK0y8y5uR6sUNPJPgCkaX7eufecVgRqENdRhpn eGq6SUWFq22ajfpObmIgWw87ZcY1dk/xDJUdqQS8HRhhj1Jq4KSIeVw9JcOE7NX3LvRlhwbU8/M fZbS4l3Y1xDiqYLLQphmOGu/qEk+NNjxKnguxljys7k9E/G0MHXTRmO2QWf/l/Fv1aFz8CpkUPS T2zGqShzhg682++DVIAwEqrlQn0dWfqzk1QiQZJqk1IB10S/6JkTC7BS3DAR4miKGVhsRCYsh4A uUf3LJY8gIwya+3ypiW9A/jc7Ua9GQFnqEgrBYt0INyTfhkfglaOHH+L47gT4suGQn6NcRhw0wv xRMdErCMLWoX0wtgSiJ/OCAs8MBS9YRWbDbvW4eMVElNei67lV5ZSXa3k/ZWqx8gO7TxVczzoAT qDybyup9+l0T89eeuCgQkq+r+P4zMQrq6nL0f3rVDrg3jmqgA7VBzRTQCHdUGsyOzNRe1ie37dS uvjC6hbGszQ+3tYw3qH6ygEhKVjN5mEqH6IeSpnhOceQ+Z4X9X3k3yRb75hOlyFvHNI0BwzOklw xPCb3sPrw73MEGmoMepZs8QN0ZkQK4+t79M4 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: linux-kernel@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