From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=46.4.11.11 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796153846; b=vCiB5wFWTNquaPL8hWy9M7rQhZ88mQEJflZJIKh6JKmZE/WyzAbrl760XyIDf+ca6yHq eOxIJyJHtMvBxW80Q8SZqE+4zFtRovf1MA0JAgwjjhEvAP41RpIqxSWwRHuM6fcLPRzk2 hfLdayXHHiJtiSa0UKamt66bp7TvawDojXLOlK8gvs0zUqowJyWs7UCSqnZe00fnL407s oqv+JFqt1AALSOADmopF34G65qXSLwuELz8eP3Fb3STQO79/vI3p/GoreVGs3eZl1viZl sj5qzTpNiekg2i7q2RghRaiV9g2o3LgjWynZip/9cCUEGbowrPeYoxc8xYm5MCaHiYQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796153846; h=DMARC-Filter:Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; bh=xf0vWqYGojhKiUgtbbd9GosD/Plm4mgPFeNa+tbabhA=; b=4gJiwpZe5tvoQ/uCs3ZgeQnJKOtEogcJOOMMcFLkhpbGijus+AcaNeVAt3/l5GtsH93+ NelRoV3Hp4BA8GaNj5x3lLE2qaFQ2a5Ms6nC7MTOPr/bBfqzk+XLh52/+sHKB5EY48YsI Eaf8CJErRpJhoHp7UdV8MzCTdQO2lvzvSxSM9tY1CQArZbg5rQLgXC6TCRw6x9AZq8K8F slUha+DjFu/R2uL66QZfME359TdZLFpCYaoYufPS6chE/0M6ciijA2z99bkBZoVHo7ym9 b5ik93ebIqPiN3GnCBXfaPPK5LozKWoMQtMbV7QjAQJbejbLtXix8Ch8Ypmd6WdIxwA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=phrozen.org; spf=pass smtp.mailfrom=phrozen.org; arc=none smtp.remote-ip=46.4.11.11 Received: from nbd.name (nbd.name [46.4.11.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D45D7606A327; Tue, 1 Dec 2026 19:37:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D45D7606A327 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=phrozen.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=phrozen.org Received: from [2a04:4540:1405:15fc:bd72:1c73:6cc3:2cda] (helo=bertha10..) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1xYTfB-00At3c-0z; Tue, 01 Dec 2026 20:37:17 +0100 From: John Crispin To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephen Boyd , Brian Masney , Jerome Brunet , Philipp Zabel Cc: Daniel Lezcano , Christian Marangi , Vitaliy Sochnev , Lorenzo Bianconi , Felix Fietkau , devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, lei.dong@airoha.com, Linqi.zhang@airoha.com, Rajeev.kumar@airoha.com, upstream@airoha.com, Weifeng.xu@airoha.com, zhengping.zhang@airoha.com Subject: [PATCH v2 2/5] dt-bindings: clock: airoha: add AN7589 Date: Tue, 1 Dec 2026 20:36:54 +0100 Message-Id: <20261201193657.3072138-3-john@phrozen.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20261201193657.3072138-1-john@phrozen.org> References: <20261201193657.3072138-1-john@phrozen.org> 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 Add the AN7589 SCU. Like the AN7583 it has a single register range and needs the chip SCU phandle, but it has no serdes PHY. So only require '#phy-cells' on the AN7583 and forbid it on the AN7589. Add the eight new clock IDs after the AN7583 MDIO clocks and a reset header for reset control registers 2, 1 and 3. The layout is close to the EN7581 one but not identical. Most notably bits 3 to 5 of register 2 are UART3, HSUART and HSUART2 on this SoC. Reserved bits get no ID. The PERST outputs in PCIC are left out for now, nothing uses them. Signed-off-by: John Crispin --- v2: - rebased on the applied AN7583 series - reworked the reset header, a few names and bits changed - the AN7589 gets its own rule forbidding #phy-cells .../bindings/clock/airoha,en7523-scu.yaml | 22 ++++- include/dt-bindings/clock/en7523-clk.h | 9 ++ .../dt-bindings/reset/airoha,an7589-reset.h | 88 +++++++++++++++++++ 3 files changed, 117 insertions(+), 2 deletions(-) create mode 100644 include/dt-bindings/reset/airoha,an7589-reset.h diff --git a/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml b/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml index 0d5f89187525..7dc929f8586a 100644 --- a/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml +++ b/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml @@ -32,6 +32,7 @@ properties: items: - enum: - airoha,an7583-scu + - airoha,an7589-scu - airoha,en7523-scu - airoha,en7581-scu - econet,en751221-scu @@ -73,7 +74,9 @@ allOf: - if: properties: compatible: - const: airoha,an7583-scu + enum: + - airoha,an7583-scu + - airoha,an7589-scu then: properties: @@ -83,12 +86,27 @@ allOf: required: - airoha,chip-scu - '#reset-cells' - - '#phy-cells' else: properties: airoha,chip-scu: false + - if: + properties: + compatible: + const: airoha,an7583-scu + then: + required: + - '#phy-cells' + + - if: + properties: + compatible: + const: airoha,an7589-scu + then: + properties: + '#phy-cells': false + - if: properties: compatible: diff --git a/include/dt-bindings/clock/en7523-clk.h b/include/dt-bindings/clock/en7523-clk.h index 0fbbcb7b1b25..136cbbea1f81 100644 --- a/include/dt-bindings/clock/en7523-clk.h +++ b/include/dt-bindings/clock/en7523-clk.h @@ -17,4 +17,13 @@ #define AN7583_CLK_MDIO0 9 #define AN7583_CLK_MDIO1 10 +#define AN7589_CLK_EFUSE 11 +#define AN7589_CLK_TINY_NPU 12 +#define AN7589_CLK_ECC 13 +#define AN7589_CLK_PM_UPS 14 +#define AN7589_CLK_DQ_UPS 15 +#define AN7589_CLK_TM_UPS 16 +#define AN7589_CLK_ACP 17 +#define AN7589_CLK_MDIO2 18 + #endif /* _DT_BINDINGS_CLOCK_AIROHA_EN7523_H_ */ diff --git a/include/dt-bindings/reset/airoha,an7589-reset.h b/include/dt-bindings/reset/airoha,an7589-reset.h new file mode 100644 index 000000000000..2eafff5aa452 --- /dev/null +++ b/include/dt-bindings/reset/airoha,an7589-reset.h @@ -0,0 +1,88 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Author: John Crispin + */ + +#ifndef __DT_BINDINGS_RESET_CONTROLLER_AIROHA_AN7589_H_ +#define __DT_BINDINGS_RESET_CONTROLLER_AIROHA_AN7589_H_ + +/* RST_CTRL2 */ +#define AN7589_XPON_PHY_RST 0 +#define AN7589_GPON_OLT_RST 1 +#define AN7589_CPU_TIMER2_RST 2 +#define AN7589_UART3_RST 3 +#define AN7589_HSUART_RST 4 +#define AN7589_HSUART2_RST 5 +#define AN7589_I2C2_RST 6 +#define AN7589_XSI_MAC_RST 7 +#define AN7589_XSI_PHY_RST 8 +#define AN7589_NPU_RST 9 +#define AN7589_I2S_RST 10 +#define AN7589_TRNG_MSTART_RST 11 +#define AN7589_USB1_QP_RST 12 +#define AN7589_USB0_QP_RST 13 +#define AN7589_HSDMA_RST 14 +#define AN7589_EMMC_RST 15 +#define AN7589_SOE_RST 16 +#define AN7589_PCIE2_RST 17 +#define AN7589_USB_HOST_P1_RST 18 +#define AN7589_MDIO0_RST 19 +#define AN7589_MDIO1_RST 20 +/* RST_CTRL1 */ +#define AN7589_PCM1_ZSI_ISI_RST 21 +#define AN7589_FE_PDMA_RST 22 +#define AN7589_FE_QDMA_RST 23 +#define AN7589_PCM_SPIWP_RST 24 +#define AN7589_EIP_RST 25 +#define AN7589_TIMER_RST 26 +#define AN7589_PCM1_RST 27 +#define AN7589_UART_RST 28 +#define AN7589_GPIO_RST 29 +#define AN7589_GDMA_RST 30 +#define AN7589_I2C_MASTER_RST 31 +#define AN7589_PCM2_ZSI_ISI_RST 32 +#define AN7589_SFC_RST 33 +#define AN7589_UART2_RST 34 +#define AN7589_GDMP_RST 35 +#define AN7589_FE_RST 36 +#define AN7589_USB_HOST_P0_RST 37 +#define AN7589_GSW_RST 38 +#define AN7589_SFC2_PCM_RST 39 +#define AN7589_PCIE0_RST 40 +#define AN7589_PCIE1_RST 41 +#define AN7589_CPU_TIMER_RST 42 +#define AN7589_PCIE_HB_RST 43 +#define AN7589_XPON_MAC_RST 44 +/* RST_CTRL3 */ +#define AN7589_I2C3_RST 45 +#define AN7589_I2C4_RST 46 +#define AN7589_I2C5_RST 47 +#define AN7589_OPTL_SYS_RST 48 +#define AN7589_MCPP_DISPATCH1_RST 49 +#define AN7589_MCPP_DISPATCH2_RST 50 +#define AN7589_MCPP_DISPATCH3_RST 51 +#define AN7589_MCPP_REORDER1_RST 52 +#define AN7589_MCPP_REORDER2_RST 53 +#define AN7589_MCPP_REFILLER_RST 54 +#define AN7589_NPU_NIQ_RST 55 +#define AN7589_NPU_NEQ_RST 56 +#define AN7589_MDIO2_RST 57 +#define AN7589_XPON_BM_RST 58 +#define AN7589_ETH0_10G_MAC_PM_RST 59 +#define AN7589_ETH0_10G_MAC_TOD_RST 60 +#define AN7589_ETH0_10G_MAC_RST 61 +#define AN7589_ETH0_10G_PHY_RST 62 +#define AN7589_ETH0_10G_PHY_RG_RST 63 +#define AN7589_ETH1_10G_MAC_PM_RST 64 +#define AN7589_ETH1_10G_MAC_TOD_RST 65 +#define AN7589_ETH1_10G_MAC_RST 66 +#define AN7589_ETH1_10G_PHY_RST 67 +#define AN7589_ETH1_10G_PHY_RG_RST 68 +#define AN7589_AI_NPU_RST 69 +#define AN7589_TIMER2_RST 70 +#define AN7589_SPIM0_RST 71 +#define AN7589_SPIM1_RST 72 +#define AN7589_SPIM2_RST 73 +#define AN7589_SPIM3_RST 74 + +#endif /* __DT_BINDINGS_RESET_CONTROLLER_AIROHA_AN7589_H_ */ -- 2.34.1