From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.216.53 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796064450; b=lrjXcevCaHH+U7KihJeZ99/BDVnsmFgasvEhI23sULc5nhU1jzkDk0RVEWQ9DV6nYJMV 08YDK1raWSfq2goADRRfvytWpVzZjP2BPpm2uGGBwGGm0uaBLFQt5VfyCeC4rSW+Hdq+G DbgH3DaTFfO+lyNBhlFH+UdR8Dozj00NCQTih2XUXamtG3nZWg+4iay+sU2NKMCGATmL6 7HlEALXBg5a4yVJcVxvOMHvN8c1WrF7R2SzDKs0GroKAOMg4bh4b1c5eXqxdokdXZeQh8 fNiGswrOavIhVoMQnO2TizDsW8XGGnOK+Fmwx/lUiXeNHHUioximPR20Xl/977BBoVA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796064450; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Message-ID:Date:MIME-Version:User-Agent:From:Subject:To:Cc:References: Content-Language:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=2OkRvUz1M1Ei3/qR9JHaOsu0xbvcQMz6lcUBl9pO7qI=; b=lKACdXjarjpVDkDgYRYUcKDsC/ALcy2tnUQbmolmY7rnn+1Cmq5eH+ZnvPgrp4OSKTMN pP26Y3Sn7M0XjsCFWOAzC+YkDqtdI/7hmj7y4YtfvD7KNRSfgYynkLfbgw4hhuNwpnmUW BHCA9fR3ekOFa2anOFwyWZMR6FI00JR5TGFLTH4pc6aDqDHpR7VE5U8fwtQpPptdWKPAd scj0DVKWsvNUZZwZcsOLQENePxGIoPhSGw6JIuBm5FdTCAU5aAGTEipkd4A/WCXrdPC86 MU3GpdebbUoRv+SPsd4zYBm9qlhxJp6lqmOGZEeIie6xGGesUsWV2xKhiIS2jNVu4yA== 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=uHzQUn4w; arc=none smtp.remote-ip=209.85.216.53 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (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 6A2F3606A327 for ; Mon, 30 Nov 2026 18:47:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6A2F3606A327 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=uHzQUn4w Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-3b413d04c93so6124932a91.1 for ; Mon, 30 Nov 2026 10:47:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar.com; s=google; t=1796064449; x=1796669249; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:content-language :references:cc:to:subject:from:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=2OkRvUz1M1Ei3/qR9JHaOsu0xbvcQMz6lcUBl9pO7qI=; b=uHzQUn4wp6gBWpcGQrboeY8qAsG3BckADaLhmuRTT1mMAWYirnKCALxXM3hDgBwVBj 26zUb2sD6gCfVe2Mfp3rTosufrZ+xIKRzpNRROGMtXSUdNXPCSUiUYt6sh7DwLrSViGa XaoM593paMD6IqOa7AlwY5u4Jzgx2ir4ITSEbDVJe0T6EAG1LL7uVhC3OOCXphPh90HJ JvGYC/0aauQ8Xgt1eGnVmbVSTt8v1mebzSA0YwjYKKeN+y+Yuxj93YqxJOAiYsDJBnTY GcxIxIg7X2tKhWBYwLBKS0S1PpEeYl1yNVLpfj8SDmXewehNWSbJpx6Wr0dPKYmeYH7t qBUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796064449; x=1796669249; h=content-transfer-encoding:content-type:in-reply-to:content-language :references:cc:to:subject:from:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=2OkRvUz1M1Ei3/qR9JHaOsu0xbvcQMz6lcUBl9pO7qI=; b=boG3AQ3V/Cq4o/ozwwwlqk2xAfVCo1hc7/IiKwRdZIif1RB9O3tCbIKX+WMmob4LVP wJnlGwheL2zw5RB0HB6eNt8ytvUNWef1ak1EKddxFBczH3+Rw9AttxJLdDY0jyNEG0O8 QOaYoFE8pXjXy4JTPimPFGKqyj/7Ls8N7O9RWgzY9r3+RmdPQta2bxBV2nLRFbvVVn1S Uke/NtBwR4toECjOTW2nI5vQcAdDxyFVuKbOJ4uhIHX4TKzzjCRklDyjzV08pBdeC+hT FtGfxxVtlK1rNOYfaFmR/iZtH2dOpdwOQ45w8P2YjLl1pVh20jOojqEe/67YSER+pR1Z T9Ug== X-Forwarded-Encrypted: i=1; AL+hErG1sP0YP5/0ZNcjJNrOlbNvcqbg5Li+J6mfDXJWWoy1/evAFRPOzQhvenkGZmGMNC91DK461/a8JxLt+rE=@vger.kernel.org X-Gm-Message-State: APuU4Z/xacTpfFoJFLQIu4kLEguawerQO/v7BkM/ox6d0mWvIKu4Ba+y YjU2Pc1t0uNbU6FS+LFoBwhS8909AcachCsqo5QOkkt/4zkGm9BkY8bAZvK/DPzn4wsnmVpR9lp 9vLRB X-Gm-Gg: AZFdTZdy2sA3Z0RKZd7uD8rdlKFw92W2lePb0z5GpLrU0oex9CulIQkTljDaG9rmtdm SmcEmDUSyKPBrM1pvcWyl6NiZty9pWznpjLUseMYy3DrQeGfPK8+YtpwmXOYV+Vao/vzK2X4qFq wSg/LQfD7+C4j7FJuEijo6GRsgewsW8pp6vqPzZZlmesiInZrSPkvmuoitj4x3FMMijiZJtM7/9 Hu4Q7GjWjP1pQhMHV3ESr7EEg14NwraEQbKNlxH8tJUUb8QQe2oob+/GrRH8E0BUbQVPfXerri/ doyB7TLuNEvkfAH4Co4Cn0qW5XXpwLaLRK41LHJRpDctlprzg/fpWzWqsgFI8Yf4fzpnmkrr3px zz9nZWMBZsKO2TYPZhHfdF+g1grwQZPUI9CobMBDeFhAeJKpzg8NX5tjfGNZBvUZYeNEYyBNC5M BIJudjd7cELSjxFEyDN6SU1BQPY0NI11A/6TpSmVd+taZzQGnnjcdahzhLu3p1QThMZT7ECY8Ip TBqyNeUPJlOkJn9QQJyP6UskodpM1eAO9LnvegcvUB1eKKO8hQPpjSWYjMa1pnCGPtDToTz7+Zk ZU9EbH8psInTALjTEiTWPfrkZeJUWyHo X-Received: by 2002:a17:90b:388c:b0:3b0:a378:1cf with SMTP id 98e67ed59e1d1-3b41c9b2d39mr35355722a91.22.1796064448623; Mon, 30 Nov 2026 10:47:28 -0800 (PST) Received: from [172.22.22.28] ([76.156.233.211]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b41aab4729sm53305254a91.0.2026.11.30.10.47.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Nov 2026 10:47:28 -0800 (PST) Message-ID: Date: Mon, 30 Nov 2026 12:47:25 -0600 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 User-Agent: Mozilla Thunderbird From: Alex Elder Subject: Re: [PATCH v3 1/3] dt-bindings: toshiba: introduce toshiba,tc9564-clock.yaml To: Jerome Brunet Cc: 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, 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, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20261125202141.1288493-1-elder@riscstar.com> <20261125202141.1288493-2-elder@riscstar.com> <179580249573.2809466.11034484697919897942.b4-review@b4> Content-Language: en-US In-Reply-To: <179580249573.2809466.11034484697919897942.b4-review@b4> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/27/26 12:01 PM, Jerome Brunet wrote: >> Define the binding for the clock and reset controller that present in >> the Toshiba TC9564 SoC. >> >> Reviewed-by: Lorenzo Bianconi >> Co-developed-by: Daniel Thompson >> Signed-off-by: Daniel Thompson >> Signed-off-by: Alex Elder >> --- >> v3: - Added Lorenzo's Reviewed-by >> - Changed to @kernel.org e-mails for Daniel and me >> - Only the gated clock IDs are now published in "toshiba,tc9564.h"; >> the PLL and internal fixed clocks are implemented and accessed >> only within "clk-tc9564.c" >> >> .../bindings/clock/toshiba,tc9564-clock.yaml | 73 +++++++++++++++++++ >> MAINTAINERS | 8 ++ >> include/dt-bindings/clock/toshiba,tc9564.h | 40 ++++++++++ >> 3 files changed, 121 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/clock/toshiba,tc9564-clock.yaml >> create mode 100644 include/dt-bindings/clock/toshiba,tc9564.h >> >> diff --git a/Documentation/devicetree/bindings/clock/toshiba,tc9564-clock.yaml b/Documentation/devicetree/bindings/clock/toshiba,tc9564-clock.yaml >> new file mode 100644 >> index 000000000000..026ed949f0f0 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/clock/toshiba,tc9564-clock.yaml >> @@ -0,0 +1,73 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/clock/toshiba,tc9564-clock.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Toshiba TC9564 Clock and Reset Controller >> + >> +maintainers: >> + - Lorenzo Bianconi >> + - Alex Elder >> + - Daniel Thompson >> + >> +description: >> + The Toshiba TC9564 is an SoC accessed by a host system through the >> + upstream PCIe port on the PCIe switch it implements. The chip includes >> + an embedded PCIe endpoint that provides access to various peripherals >> + within the SoC via its BARs. These peripherals include a simple >> + controller to gate internal clocks, and a reset controller. >> + >> + The TC9564 chip has a single input clock. Internally that clock is >> + multiplied by a PLL, and the PLL signal is divided internally into >> + a set of fixed rate, always-on clocks. >> + >> + The clock controller exposes a set of simple gated clocks, which are >> + controlled by two registers. Each is derived from one of the internal >> + fixed-rate clocks. A total of 21 gated clocks are implemented within >> + the chip, but support for enabling and disabling only a subset of them >> + is provided at this time. Two clocks (I2C and PCIE) are marked critical >> + to make it clear that they should never be disabled. >> + >> + The reset controller uses two other registers to control a set of 13 >> + resets that can be asserted or deasserted. Here too, only a subset >> + of the resets can currently be managed, and the I2C and PCIE resets >> + are treated as critical. >> + >> + Clock and reset IDs are defined . >> + >> +properties: >> + compatible: >> + items: >> + - const: toshiba,tc9564-clock >> + >> + reg: >> + maxItems: 1 >> + >> + clocks: >> + maxItems: 1 >> + >> + "#clock-cells": >> + const: 1 >> + >> + "#reset-cells": >> + const: 1 >> + >> +required: >> + - compatible >> + - reg >> + - clocks >> + - "#clock-cells" >> + - "#reset-cells" >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + clock-controller@1004 { >> + compatible = "toshiba,tc9564-clock"; >> + reg = <0x1004 0x10>; >> + clocks = <&tc9564_xo_board>; >> + #clock-cells = <1>; >> + #reset-cells = <1>; >> + }; >> diff --git a/MAINTAINERS b/MAINTAINERS >> index 93abbb315065..4d1f4cbfd731 100644 >> --- a/MAINTAINERS >> +++ b/MAINTAINERS >> @@ -28332,6 +28332,14 @@ F: Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.yaml >> F: drivers/media/i2c/tc358743* >> F: include/media/i2c/tc358743.h >> >> +TOSHIBA TC9564 CLOCK/RESET CONTROLLER DRIVER >> +M: Lorenzo Bianconi >> +M: Alex Elder >> +M: Daniel Thompson >> +S: Maintained >> +F: Documentation/devicetree/bindings/clock/toshiba,tc9564-clock.yaml >> +F: include/dt-bindings/clock/toshiba,tc9564.h >> + >> TOSHIBA TC9564 PCI DRIVER >> M: Alex Elder >> M: Daniel Thompson >> diff --git a/include/dt-bindings/clock/toshiba,tc9564.h b/include/dt-bindings/clock/toshiba,tc9564.h >> new file mode 100644 >> index 000000000000..7de8c8165199 >> --- /dev/null >> +++ b/include/dt-bindings/clock/toshiba,tc9564.h >> @@ -0,0 +1,40 @@ >> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ >> + >> +/* >> + * Copyright (C) 2026 by RISCstar Solutions Corporation. All rights reserved. >> + */ >> + >> +#ifndef __CLOCK_TOSHIBA_TC9564_H__ >> +#define __CLOCK_TOSHIBA_TC9564_H__ >> + >> +/* Clock IDs */ >> + >> +#define CLOCK_I2C 0 /* critical */ > > Name seems a touch too generic. > If everybody named clock this way, we would be very likely to get collision > in the DTS. > > suggest TC9564_CLK_XXX OK, I'll follow that pattern, and will use TC9564_RST_XXX for the resets. >> +#define CLOCK_PCIE 1 /* critical */ >> +#define CLOCK_MSIGEN 2 >> + >> +#define CLOCK_MAC0_TX 3 >> +#define CLOCK_MAC0_RX 4 >> +#define CLOCK_MAC0_125M 5 >> +#define CLOCK_MAC0_ALL 6 >> + >> +#define CLOCK_MAC1_TX 7 >> +#define CLOCK_MAC1_RX 8 >> +#define CLOCK_MAC1_125M 9 >> +#define CLOCK_MAC1_ALL 10 >> + >> +/* Reset IDs */ >> + >> +#define RESET_I2C 0 /* critical */ >> +#define RESET_PCIE 1 /* critical */ >> +#define RESET_MSIGEN 2 >> + >> +#define RESET_MAC0_MAC 3 >> +#define RESET_MAC0_PMA 4 >> +#define RESET_MAC0_XPCS 5 >> + >> +#define RESET_MAC1_MAC 6 >> +#define RESET_MAC1_PMA 7 >> +#define RESET_MAC1_XPCS 8 > > Those ids do not belong in include/dt-bindings/clock/ I only combined them because I saw other examples of headers under include/dt-bindings that combined both clocks and resets. But I'll create a separate include/dt-bindings/reset header file to contain the reset IDs. > >> + >> +#endif /* __CLOCK_TOSHIBA_TC9564_H__*/ > > Nit: missing space before the closing */ in the comment. Good catch, I'll fix that too. Thanks. -Alex