From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F184EC98338 for ; Sun, 27 Sep 2026 20:14:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=u2l9hURmB1pkMb9PWrVWHcGWccs9x7IzxI7WG3HtlDU=; b=ocultUPzCJi1SKKPnp31s1sauK zyCCoogwSiuHOGkOM4UkEZyKjC0brdzhqaoR+KqgV0eiAgizLVNDfqty2l5LxDVlIoML0Vae8O4dj MRJ5cVl1zR0sKWkgwmG5uEzmZpgI8CY/z6QGte5l8sYl8F7/LPFof6fWHnnxhauM1iCfVEdzYpFzz HMEFZjLLS5YdClgFk1cbv25UB70BLHUHXBkXz61WEfvMa71BU9azmHm7bqbVLttVZ4L6MnG1q0E9N bWF6TKYDpy0CzJ5mLXh8aBwTFv/45JWtrl305RfhZ7Jc5hRkIYTY8VtEO2yJxpzIyjwRHr1/iI2us KoUtWO4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xAvG6-0000000GnMR-0fD4; Sun, 27 Sep 2026 20:14:02 +0000 Received: from mail-wr2-x0c.google.com ([2a00:1450:4864:30::c]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xAvFz-0000000GnJE-0XNI for linux-arm-kernel@lists.infradead.org; Sun, 27 Sep 2026 20:13:56 +0000 Received: by mail-wr2-x0c.google.com with SMTP id ffacd0b85a97d-482f6350f91so1347351f8f.1 for ; Sun, 27 Sep 2026 13:13:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790540033; x=1791144833; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=u2l9hURmB1pkMb9PWrVWHcGWccs9x7IzxI7WG3HtlDU=; b=ck0kX8wiybO+GcCXEblbISiuFPGzYnViA5T17xz1WeTuuc01t4Caeh9KSFGVoQ8wtx FAY9kWVhaqOpzEZoY0o6I8732bQIlUCkAOmJvSeoyYt6Zreai6R9cZwOyb7bDrdrn7Ya ezqbxTm1fASlJFAJa8hd9rOVaPsa83qqi0P+PiK3a59aHc4oesZEqM+XMkkD3Hp/fJ32 iNdVqaBG+/2ntjC4NAhdzHCsH/bJDzJkD/tumAIl7cH4pEV20CUX8DwDAKCHgSEWaZl2 opGtkDc1Bb9K6uRE8QK8P1jlcPPLpsz+FTv0OYBvo88rQiDX6GpkaM69JKrqNPaKfx0o s6rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790540033; x=1791144833; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=u2l9hURmB1pkMb9PWrVWHcGWccs9x7IzxI7WG3HtlDU=; b=ascHSEoOUYLF72cKim+TClWpXuzQtFqMJXehsUbQSUVb4dzNco/1EKaKdayTURV6eA 8IM+EPVn+icR7WMIU2afPlT1C471v7zzvxOTmptKLEHaoLENmti4AmzRTz7+KYvZs546 V+20a7z63hFHPOwYQG/6aMR/TSxX6EpWhsaaSX+pjvq+xUs3YEAdFVeZQF0CBVCPpMtI D/kXTbeTZ2lYNt9YeVEAgQ2b4ETQxsd4n0jr4xk63B+wD/NwAeKOs9DTxBhkaF2xw+cu sBjRM/7/NRQvTkHpF9tIZFAvI+ePF+sWPDmoOZ7Pkdupqmb/Nvq7l3QHTfpKYdPbbaql Gy6A== X-Forwarded-Encrypted: i=1; AKwUvBxa/PgIpNQOrNJ2Sp1TxZ1+sL04WKOFqQfCbUX8+u4OkQGVMvsu+Pp03evx3sWsjvYz2sjD+0yJf4RxVlvXZL/t@lists.infradead.org X-Gm-Message-State: AFq9FYKeTnbWtJ5pQYJPiqzeSPfEi/tWWCKdXc6hdrYrFjA4ri7JETQq NOLODChXhQE39EesnL6HLnk1zK9KbStFbqVop6S0jS9l1GeSp4mGLVuT X-Gm-Gg: AYBFou2+4zCdSqBtmLh0HoRNmd8O7tOvIdLTDzOA+kxI6hx4rwMAwQEHWEBEqx2UOS4 NYi/ytVJZrpSDdzKTIU2KRDfsrGcUKYLxAsefW9gYFnoaX4E7BHGPWXxhYkl/irrVF0oxFMD1Pp tAbKdCgf6ZIVtUlw7BvdNNVY0e0MCSWMBNZk7pMQ2w/A8WgQzRN9zcrVQ6ZImlg4m9mhLjBBi6h p+/7j1yrQlpHAuzDFILo8U1LMvqPr3S8B+OC4M8TcIOZMflqNBr17kIOQkbSOCg7qaDoAjZusZd y9XIAJjLaYM8MnJRcKc4l86ie52o7jXgVgSoWmEP1EFM6CqIBNDqDGWIpD4ZvV9KkCU1dLh/83U b51BMBE/OZ9tj2h71phlkeg0bd9NvDy1LLkrLRNKBGU53E5irqPykgtUNi3dZigWoJns7EUK2Kl 64x32F/cd0Hn5hguoccVZU5szf+Fz/mejrkXnZn7aH4qrreMHE/IPrE3Y57PVxbiqtH9ZTfMCtl toGKlBo X-Received: by 2002:a05:6000:288b:b0:488:6523:e15c with SMTP id ffacd0b85a97d-4887db2d079mr14668813f8f.32.1790540032951; Sun, 27 Sep 2026 13:13:52 -0700 (PDT) Received: from [192.168.0.2] ([197.250.96.148]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4887a34a570sm21781514f8f.13.2026.09.27.13.13.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2026 13:13:52 -0700 (PDT) From: =?utf-8?q?Stefan_D=C3=B6singer?= Date: Sun, 27 Sep 2026 23:13:29 +0300 Subject: [PATCH v13 01/13] dt-bindings: clk: zte: Add zx297520v3 top clock and reset controller MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20260927-zx29clk-v13-1-70d8f673386c@gmail.com> References: <20260927-zx29clk-v13-0-70d8f673386c@gmail.com> In-Reply-To: <20260927-zx29clk-v13-0-70d8f673386c@gmail.com> To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , Brian Masney , Vinod Koul , Neil Armstrong , Russell King , Lee Jones , Brian Masney , Jerome Brunet , Manivannan Sadhasivam Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, mfd@lists.linux.dev, =?utf-8?q?Stefan_D=C3=B6singer?= , Krzysztof Kozlowski X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=16292; i=stefandoesinger@gmail.com; h=from:subject:message-id; bh=fdcRqBAFZcfoRi9cgcm3iz61drb6ZrGz34PHxhWAGSA=; b=owEBiQJ2/ZANAwAIAT0TvMhUTxoiAcsmYgBquXj0Ls8uX3B17PE32AB6j+mpQEb/c79+M9Wv+ E20KXTdjFSJAk8EAAEIADkWIQRDFvS2qgVbJ5UyXWw9E7zIVE8aIgUCarl49BsUgAAAAAAEAA5t YW51MiwyLjUrMS4xMiwyLDIACgkQPRO8yFRPGiKmpg/7BQuS+kFxC6DUPLluHrLVsPzTsJJdG39 B6RtZzkuT2SHn7q8PIvx8J/cWSu2jk0fGLbyvNtbq/79OU0X0D/hWpsVb5lDNafpkjrgJEeYV9O OOTMXNgioq5xOvtEl56IY9R415sB5lZ4mlgF3AHchwgHFs5sQCvJ2+UIjFMXRc+JNB8pUjjYf0V 1L5vJMVT34jXuaOl5YDmUIvVKt8eBFBCY0auAfNqfgZyUbxvUfArv7XUgCOBNLarZ1lvvRDB7gS +qmN7RpZ4wpyaMLtDQnAI+Xn4hn057LE39bK6zTInQcfR3axilp+35CkUjxLSqCNlhEaqZVc2Kw bUG3F1Imd3w36K+tqJA+EtTFel9vghgOrzuYtuNfbXCFvY0URg0MWp3o0DVlQ91/zZy8wYcz+9L pXLffegGv95kY5NB/xKACPY5va/yus7hboPv5kmAqaJpZmWyiWnfJSpwi94kHZNdbAfwxrzgxTB H+CBBWLZ4eEnvYY5ArtNVA7LRam4hKhtndXwYwqs7IpEaAFYJegYfF5X0q6YHr5anjzAUg+VXqj n/BVe/4dvTj5/+qD1u73c2FlSEQna6bLjKihKYwgwjFBWJyRvj8JbcZ9t7roRrHw+U/34Tvb0Jq VUo+4z1DUKrMSqqamp8RusCwomN8qUdK7Dan/xUid1zJ1mMe70LI= X-Developer-Key: i=stefandoesinger@gmail.com; a=openpgp; fpr=4F9C2C8728019633893EBBB98CB81F9A72BBA155 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260927_131355_334976_4F981754 X-CRM114-Status: GOOD ( 39.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org These SoCs have 3 clock and reset controllers: Top, Matrix and LSP. Clocks go from oscillator -> top -> matrix -> LSP, with a register in top controlling most clocks that get passed to matrix and a register in matrix controlling all the clocks that get passed to LSP. Generally every device has two clocks (one work clock, and one that connects it to the bus, I call it PCLK), two reset bits (I don't know what the difference is - sometimes asserting one is enough to reset the device, sometimes both need to be asserted). PCLK and WCLK are controlled by individual gates. Some devices have a mux and/or a divider for their work clock. Some devices, like the GPIO controller, only have reset bits and no clocks. The top clock controller is fed by a 26 MHz external oscillator and has 4 PLLs to generate other clock rates. ZTE's kernel mostly relies on the boot ROM to set up PLLs, but one LTE-related PLL is not configured on some boards. Therefore my driver contains code to program PLLs. It produces identical settings as the boot ROM for the pre-programmed frequencies. Not all clocks will have an explicit user in the end. I am defining a lot of them simply to shut them off. The boot loader sets up a few of the proprietary timers, which will send regular IRQs (although the kernel of course doesn't need to listen to them). I don't plan to add a driver for the proprietary timer as I see no use for them - the ARM arch timer works just fine. I will add a driver for the very similar proprietary watchdog though. The clock list in this patch is pretty complete but not exhaustive. There are other bits that are enabled, but I couldn't deduce what they are controlling by trial and error. Some of them seem to do nothing. Others cause an instant hang of the board when disabled. It is quite likely that a handful more clocks will be added in the future, but not a large number. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Stefan Dösinger --- v12: Add some GSM and LTE related clocks v11: Unchanged content wise @Sashiko: The USB and HSIC PHY resets are deliberately not in the binding. They would be provided by the reset MFD child and consumed by its PHY sibling, resulting in a self-referencing node. Therefore the PHY MFD child accesses the bits via the shared regmap. The PHY driver is the exclusive owner of the bits. This does not impact the USB and HSIC controller resets. These are part of the binding and consumed by the (future) USB nodes. @Sashiko: There is no "simple-mfd" compatible because a MFD driver will bind to the node and (among other things) take care of the reboot child node. v9->v10: *) Rename ZX297520V3_ZSP_RESET to ZX297520V3_ZSP_CORE_RESET in preparation for a separate reset register in matrixcrm. *) Fix order of properties in the example code to satisfy dt-check-style --mode=strict. Changes v8->v9: *) "unevaluatedProperties: false" for the syscon child node (Krzysztof) *) "additionalProperties: false" for the binding itself (Krzysztof) *) Remove USB PHY resets, but USB controller resets remain unchanged (Krzysztof) *) Rename syscon reboot node to "reboot". While both "reboot" and "syscon-reboot" are common in actual device trees, syscon-reboot.yaml's own example uses "reboot". DT's Generic Names Recommendation contains neither (Sashiko, patch 12) Changes v7->v8 (all Krzysztof): *) Fold the PHY into the top-level node *) Start clock indices at 0 *) Rename the phy include file to zte,zx297520v3-topcrm.h. And a non-change despite/because of new discoveries: USB has more PHY and DWC controls in a different controller at 0x140000. ZTE calls this controller SOC_SYS, and it is a textbook case for syscon: It has a lot of different controls: A remap flag for boot ROM, a control to bring the A53 up in arm32 vs aarch64 mode, the entrypoint of the LTE DSP, SDIO, I2S, ... USB-wise it has a register with PHY and DWC controls: Endianness for the DWC2 registers, PHY clock adjustments, PHY and DWC host/device switch. In spite of this I think topcrm is the better home for #phy-cells: The USB ready flags in topcrm are essential for bringing up the USB devices whereas the soc_sys controls are a curiosity. Host mode only works if I externally inject VBUS. Clock adjustment is too inflexible to be of real value. Flipping the DWC registers to big endian works, but what for? If I find a use case for changing the default USB values in soc_sys it can be handled via syscon. soc_sys also has power controls for a few devices, including USB. This will be handled via #power-domain-cells. The self-referencing reset property causes the following boot messages: /soc/clock-controller@13b000: Fixed dependency cycle(s) with /soc/clock-controller@13b000 /soc/clock-controller@13b000: Fixed dependency cycle(s) with /soc/clock-controller@13b000 Do I need to add post-init-providers? As far as I understand it, this message is informational and not a problem that needs to be addressed. Changes v6->v7: *) Moved the bindings back into clock/ (Krzysztof). Use clock-controller@ in example and in the later DTSI patch. *) With a lucky find in strings in LTE's cpko.ko blob I could make sense of the register that controls which clocks get passed from PLLs into the clock distribution inside topcrm. Importantly that also narrows which clocks can possibly be passed to Matrix, so I could slim down the bindings considerably. *) Add a usb phy child node with the phy schema added in the previous patch. I don't expect the USB status register to ever be in another place, so the binding expresses the @84 expectation. Changes v5->v6: Set value for syscon-reboot example (Sashiko). It was my intention to set only the lowest bit, and I think Sashiko is right that without 'value' being set, all other bits are actively set to 0. It shouldn't matter given my understanding of the hardware (afaics all other bits are ignored), but actively clearing bits was not my intention. I haven't changed the name match for "syscon-reboot". I see plenty of examples of hardcoding this string as opposed to having a regex for syscon-reboot@12345678 in other bindings. Changes v4->v5: Rename from zte,zx297520v3-topclk to zte,zx297520v3-topcrm and move to soc/zte Fix path in MAINTAINERS Add syscon-reboot node to the binding Give the USB and HSIC PHY resets their own reset control --- .../bindings/clock/zte,zx297520v3-topcrm.yaml | 122 +++++++++++++++++++++ MAINTAINERS | 4 + include/dt-bindings/clock/zte,zx297520v3-clk.h | 72 ++++++++++++ include/dt-bindings/phy/zte,zx297520v3-topcrm.h | 12 ++ include/dt-bindings/reset/zte,zx297520v3-reset.h | 30 +++++ 5 files changed, 240 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/zte,zx297520v3-topcrm.yaml b/Documentation/devicetree/bindings/clock/zte,zx297520v3-topcrm.yaml new file mode 100644 index 000000000000..8510ffde2924 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/zte,zx297520v3-topcrm.yaml @@ -0,0 +1,122 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/zte,zx297520v3-topcrm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ZTE zx297520v3 SoC top clock and reset controller + +maintainers: + - Stefan Dösinger + +description: | + The zx297520v3 top clock and reset controller generates clocks for core + devices on the board like the main bus, USB and timers. In addition to clocks + it has reset controls for peripherals, a global board reset, watchdog reset + controls and a USB status register. + + The controller has two clock inputs: a 26 MHz and a 32 kHz external + oscillator. They need to be provided as input clocks. The controller provides + PLL output frequencies to downstream clock controllers. + + The USB PHY is exposed as two PHYs, one for USB and another for HSIC. Note + that while the controls for both PHYs are always present, the PHYs themselves + may be absent. If this is the case the controller never signals that the + missing PHY is ready. + + All available clocks are defined as preprocessor macros in the + "include/dt-bindings/clock/zte,zx297520v3-clk.h" header. The resets are + defined in the "include/dt-bindings/reset/zte,zx297520v3-reset.h" header. PHY + defines are found in "include/dt-bindings/phy/zte,zx297520v3-topcrm.h". + +properties: + compatible: + items: + - const: zte,zx297520v3-topcrm + - const: syscon + + reg: + maxItems: 1 + + clocks: + items: + - description: 26 MHz external oscillator + - description: 32 kHz external oscillator + + clock-names: + items: + - const: osc26m + - const: osc32k + + interrupts: + items: + - description: IRQ reporting USB connection + - description: IRQ reporting USB disconnection + - description: IRQ reporting HSIC connection + - description: IRQ reporting HSIC disconnection + + interrupt-names: + items: + - const: usb-up + - const: usb-down + - const: hsic-up + - const: hsic-down + + "#clock-cells": + const: 1 + + "#phy-cells": + const: 1 + + "#reset-cells": + const: 1 + + reboot: + type: object + $ref: /schemas/power/reset/syscon-reboot.yaml# + unevaluatedProperties: false + description: + Reboot method for the SoC. + +required: + - compatible + - reg + - clocks + - clock-names + - interrupts + - interrupt-names + - reboot + - "#clock-cells" + - "#phy-cells" + - "#reset-cells" + +additionalProperties: false + +examples: + - | + #include + #include + #include + #include + + clock-controller@13b000 { + compatible = "zte,zx297520v3-topcrm", "syscon"; + reg = <0x0013b000 0x400>; + #clock-cells = <1>; + clocks = <&osc26m>, <&osc32k>; + clock-names = "osc26m", "osc32k"; + interrupts = , + , + , + ; + interrupt-names = "usb-up", "usb-down", "hsic-up", "hsic-down"; + #phy-cells = <1>; + #reset-cells = <1>; + + reboot { + compatible = "syscon-reboot"; + mask = <0x1>; + offset = <0x0>; + value = <0x1>; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index dccddc99ac9a..43fd556e155b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3922,8 +3922,12 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) S: Odd fixes F: Documentation/arch/arm/zte/ F: Documentation/devicetree/bindings/arm/zte.yaml +F: Documentation/devicetree/bindings/clock/zte,zx297520v3-topcrm.yaml F: arch/arm/boot/dts/zte/ F: arch/arm/mach-zte/ +F: include/dt-bindings/clock/zte,zx297520v3-clk.h +F: include/dt-bindings/phy/zte,zx297520v3-topcrm.h +F: include/dt-bindings/reset/zte,zx297520v3-reset.h ARM/ZYNQ ARCHITECTURE M: Michal Simek diff --git a/include/dt-bindings/clock/zte,zx297520v3-clk.h b/include/dt-bindings/clock/zte,zx297520v3-clk.h new file mode 100644 index 000000000000..1bc9267e4d62 --- /dev/null +++ b/include/dt-bindings/clock/zte,zx297520v3-clk.h @@ -0,0 +1,72 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (C) Stefan Dösinger. + */ + +#ifndef __DT_BINDINGS_CLOCK_ZX297520V3_H +#define __DT_BINDINGS_CLOCK_ZX297520V3_H + +#define ZX297520V3_M0_WCLK 0 +#define ZX297520V3_SRAM1_PCLK 1 +#define ZX297520V3_SRAM2_PCLK 2 +#define ZX297520V3_UART0_WCLK 3 +#define ZX297520V3_UART0_PCLK 4 +#define ZX297520V3_I2C0_WCLK 5 +#define ZX297520V3_I2C0_PCLK 6 +#define ZX297520V3_RTC_WCLK 7 +#define ZX297520V3_RTC_PCLK 8 +#define ZX297520V3_LPM_GSM_WCLK 9 +#define ZX297520V3_LPM_GSM_PCLK 10 +#define ZX297520V3_LPM_LTE_WCLK 11 +#define ZX297520V3_LPM_LTE_PCLK 12 +#define ZX297520V3_LPM_TD_WCLK 13 +#define ZX297520V3_LPM_TD_PCLK 14 +#define ZX297520V3_LPM_W_WCLK 15 +#define ZX297520V3_LPM_W_PCLK 16 +#define ZX297520V3_TIMER_T08_WCLK 17 +#define ZX297520V3_TIMER_T08_PCLK 18 +#define ZX297520V3_TIMER_T09_WCLK 19 +#define ZX297520V3_TIMER_T09_PCLK 20 +#define ZX297520V3_MPLL 21 +#define ZX297520V3_MPLL_D5 22 +#define ZX297520V3_DPLL 23 +#define ZX297520V3_GPLL 24 +#define ZX297520V3_GPLL_D2 25 +#define ZX297520V3_GATED_OSC26M 26 +#define ZX297520V3_PMM_WCLK 27 +#define ZX297520V3_PMM_PCLK 28 +#define ZX297520V3_OUT0_WCLK 29 +#define ZX297520V3_OUT1_WCLK 30 +#define ZX297520V3_OUT2_WCLK 31 +#define ZX297520V3_OUT32K_WCLK 32 +#define ZX297520V3_RMIIPHY_WCLK 33 +#define ZX297520V3_TIMER_T12_WCLK 34 +#define ZX297520V3_TIMER_T12_PCLK 35 +#define ZX297520V3_TIMER_T13_WCLK 36 +#define ZX297520V3_TIMER_T13_PCLK 37 +#define ZX297520V3_TIMER_T14_WCLK 38 +#define ZX297520V3_TIMER_T14_PCLK 39 +#define ZX297520V3_TIMER_T15_WCLK 40 +#define ZX297520V3_TIMER_T15_PCLK 41 +#define ZX297520V3_TIMER_T16_WCLK 42 +#define ZX297520V3_TIMER_T16_PCLK 43 +#define ZX297520V3_TIMER_T17_WCLK 44 +#define ZX297520V3_TIMER_T17_PCLK 45 +#define ZX297520V3_WDT_T18_WCLK 46 +#define ZX297520V3_WDT_T18_PCLK 47 +#define ZX297520V3_USIM1_WCLK 48 +#define ZX297520V3_USIM1_PCLK 49 +#define ZX297520V3_AHB_WCLK 50 +#define ZX297520V3_AHB_PCLK 51 +#define ZX297520V3_USB_WCLK 52 +#define ZX297520V3_USB_PCLK 53 +#define ZX297520V3_HSIC_WCLK 54 +#define ZX297520V3_HSIC_PCLK 55 +#define ZX297520V3_GSM_32K 56 +#define ZX297520V3_GSM_26M 57 +#define ZX297520V3_GSM_48M 58 +#define ZX297520V3_GSM_104M 59 +#define ZX297520V3_GSM_156M 60 +#define ZX297520V3_ABB_WCLK 61 + +#endif /* __DT_BINDINGS_CLOCK_ZX297520V3_H */ diff --git a/include/dt-bindings/phy/zte,zx297520v3-topcrm.h b/include/dt-bindings/phy/zte,zx297520v3-topcrm.h new file mode 100644 index 000000000000..b36ccf2f54ef --- /dev/null +++ b/include/dt-bindings/phy/zte,zx297520v3-topcrm.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (C) Stefan Dösinger. + */ + +#ifndef __DT_BINDINGS_PHY_ZTE_ZX297520V3_TOPCRM_H +#define __DT_BINDINGS_PHY_ZTE_ZX297520V3_TOPCRM_H + +#define ZX297520V3_USB_PHY 0 +#define ZX297520V3_HSIC_PHY 1 + +#endif /* __DT_BINDINGS_PHY_ZTE_ZX297520V3_TOPCRM_H */ diff --git a/include/dt-bindings/reset/zte,zx297520v3-reset.h b/include/dt-bindings/reset/zte,zx297520v3-reset.h new file mode 100644 index 000000000000..4a0eaec0e981 --- /dev/null +++ b/include/dt-bindings/reset/zte,zx297520v3-reset.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (C) Stefan Dösinger. + */ + +#ifndef __DT_BINDINGS_RESET_ZX297520V3_H +#define __DT_BINDINGS_RESET_ZX297520V3_H + +#define ZX297520V3_ZSP_CORE_RESET 0 +#define ZX297520V3_UART0_RESET 1 +#define ZX297520V3_I2C0_RESET 2 +#define ZX297520V3_RTC_RESET 3 +#define ZX297520V3_TIMER_T08_RESET 4 +#define ZX297520V3_TIMER_T09_RESET 5 +#define ZX297520V3_PMM_RESET 6 +#define ZX297520V3_GPIO_RESET 7 +#define ZX297520V3_GPIO8_RESET 8 +#define ZX297520V3_TIMER_T12_RESET 9 +#define ZX297520V3_TIMER_T13_RESET 10 +#define ZX297520V3_TIMER_T14_RESET 11 +#define ZX297520V3_TIMER_T15_RESET 12 +#define ZX297520V3_TIMER_T16_RESET 13 +#define ZX297520V3_TIMER_T17_RESET 14 +#define ZX297520V3_WDT_T18_RESET 15 +#define ZX297520V3_USIM1_RESET 16 +#define ZX297520V3_AHB_RESET 17 +#define ZX297520V3_USB_RESET 18 +#define ZX297520V3_HSIC_RESET 19 + +#endif /* __DT_BINDINGS_RESET_ZX297520V3_H */ -- 2.55.0