From nobody Sun May 24 17:48:32 2026 Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8DB70399004 for ; Sun, 24 May 2026 15:11:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779635491; cv=none; b=SLNmovDMuySTMNn2TK+uksGtPxcb00rpIipdKeh1l7+/d1l+iohfscVVkI9KRlDiQAJwNJiMD9nBIWXdmns/Xv/qVu18oIZ49cu7PITxOH+Zpk5K7hvrozc0FzmpQKdeAXPQA29n1SvdYONhb64cxzacFABq8b7kHHM1+mvhdew= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779635491; c=relaxed/simple; bh=OUtAOVwne9bvsXDe3iQGcZBu/tBOqt/Kf3mXhe2EU1E=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=skiEbGcuePZSCNB1SBK6AxJVeObhJp8MClkZFp2BdPl7vHHMB3XEBe02USqDyrFA9pD2vGgq2sV/tdGKQuaHR2Php1sJ3Far03n3xIBGANm/P/GqpgX1b0OuQkflYgSAl4QqHOoR+V5k/D/VRcYb6YLCcKSkbkYkf/cekD3g+wc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=LMXQD5jB; arc=none smtp.client-ip=209.85.216.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LMXQD5jB" Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-36936dcf19dso4300046a91.0 for ; Sun, 24 May 2026 08:11:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779635488; x=1780240288; 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; bh=xx4kXC0gPV4SZPi2HPcoBpfpiipwhrpU54HmKY1vzdQ=; b=LMXQD5jBAWO9D4PrP9aCIDdZ6Lyz4ioyR4kiCuN9+OwQYXfChHQsYkAgg/HtVqgxFE X2inUcvJSd82SnU5DEfEX1J+VlibSPV+JC7ZNrF1BrDb8oWUlm6+iH9UBGUq4tnlnpa5 eR/YKGf26iUBuW15CO8MakJW1bMjulpIfQ7IYwnM5JUk59JTZffFFjlxvcxodyXPiKvw ZPsl1jXVCfC5nWu46o34AIussMO/qsWnAXCT2sy3d+/4f93KUoPinw89r2yw0pmAF1bz X4XGvuq+pf/A4iN5pp3VtvLxe14CfkO7CBy+PMd5QOwaNlKzraHGxVpN15JoQWMW4p7E 4g+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779635488; x=1780240288; 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; bh=xx4kXC0gPV4SZPi2HPcoBpfpiipwhrpU54HmKY1vzdQ=; b=VNbw+8WwoGP/9ihjDeBIxKTHjNiidQFAgKUTlSfzVPmEAEYMY3r60pcj33Z3Jwrz6B 3rMkozgCszTguO3BG74c/EgYGNqnX7t/G7TbY3qUjB2ms32XZiri4skN6ugfFuvEOzoU PahiHiW3d3cMeeR+DBXJPfoZbpek1n64PMwl+Qhm9KaULo/JP59TGvAlc4fBbca4DSPR MH2r9yV68VWEW4OouK0jtCDnwRCUqWtjEygYoVOBH+pgs3d4O7IunMhaVWHMQ/klc9HK DU7jDE0xxpJ0mrTHr1/6koSAvEzfNRW6YxSx4WbQpE8MKWQyvlKXo29rnSj8dKJmLXGX 4GXg== X-Forwarded-Encrypted: i=1; AFNElJ+PbEi7yxypa39SxSDEENo+HF6z8YKxIWtlwFAMoltTpV0sXIlHqKZpLFum/vqh707dXwfKKDNHw4j0Ni8=@vger.kernel.org X-Gm-Message-State: AOJu0YzzdE633QvVZ8Jes0aB4QVGmbAJzzZR58EHOP65MVC9XbsD1Nc6 2QIe5yNcQW/EkXgZ/DLQ/zX0ILq/ZmWEBQWxZYHNgQXwoll7GjViYbNRtWQOupa1 X-Gm-Gg: Acq92OFNNy7OIqI0RC4nY1Q9NhsTHN7ghtdBYvaCwOgLaOR/ia10dWRFo38QyvzHjXa hnyPJaWQh8IIT7tT0ystBkELLL04g6bxZ9Gkzunb9J9t897NZ05luKDZzDr1NwgK0GaWMrfRTtX N4sxnZaP3NaW9WrtBNzarVt2TkBIuQxyT8NsW0Mtcf3pZaCdSa1poY0Jt1Z7RKo3609SGIjhCNn gJIuZAz5DXcfryyny39MwXUNZ7Tgqkqsa7OmPeD07ksXJx+0pJtQAYkN+Vzm9ha6/om81ax8C6s x48o+XEe8FJbZosSpWebTWMZQYS9tcmEs+3ivI2ydLpJ1gTqfcjHol3HpMopySLSoRZRaWYvWOS XtulI31h9edtP5KhT2gAGeG55BYTd2tczIx8d/mQE3QhDjcnAT/wTt/w7ZcBOuTd4C1LeYTxby5 b+JtCoWxb6wCg778LT27vpl8f3etgjtMdcnFSqzg== X-Received: by 2002:a17:902:f78b:b0:2bd:7684:34b0 with SMTP id d9443c01a7336-2beb057fd79mr137000465ad.15.1779635487568; Sun, 24 May 2026 08:11:27 -0700 (PDT) Received: from ultimate.. ([58.84.60.222]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2beb591f63dsm90061775ad.83.2026.05.24.08.11.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 May 2026 08:11:27 -0700 (PDT) From: Udaya Kiran Challa To: mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org Cc: skhan@linuxfoundation.org, me@brighamcampbell.com, linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Udaya Kiran Challa Subject: [PATCH v4] dt-bindings: clock: via,vt8500: Convert to DT Schema Date: Sun, 24 May 2026 20:40:26 +0530 Message-ID: <20260524151110.21277-1-challauday369@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Convert the VIA/Wondermedia VT8500 and Wondermedia WM8xxx series SoCs clock controller binding from the legacy text format to DT schema. Signed-off-by: Udaya Kiran Challa --- Changelog: Changes since v3 - Add schema select matching for via,vt8500-pmc - Allow hyphen in node names under patternProperties - Add dependentRequired validation for enable-reg/enable-bit - Fix example validation against PMC schema Link to v3:https://lore.kernel.org/all/20260524111813.39810-1-challauday369= @gmail.com/ Changes since v2: - Drop redundant description for clocks - Disable reg property for device clocks - Fix schema hierarchy to match actual DTS structure Link to v2:https://lore.kernel.org/all/20260521170810.19702-1-challauday369= @gmail.com/ Changes since v1: - Add default value for divisor-mask - Add required properties compatible and model - Fix example node name - Update example size cells and reg value Link to v1:https://lore.kernel.org/all/20260520025131.17772-1-challauday369= @gmail.com/ --- .../bindings/clock/via,vt8500-clock.yaml | 209 ++++++++++++++++++ .../devicetree/bindings/clock/vt8500.txt | 74 ------- 2 files changed, 209 insertions(+), 74 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/via,vt8500-cloc= k.yaml delete mode 100644 Documentation/devicetree/bindings/clock/vt8500.txt diff --git a/Documentation/devicetree/bindings/clock/via,vt8500-clock.yaml = b/Documentation/devicetree/bindings/clock/via,vt8500-clock.yaml new file mode 100644 index 000000000000..51a68df6c2f3 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/via,vt8500-clock.yaml @@ -0,0 +1,209 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/via,vt8500-clock.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: VIA/Wondermedia VT8500 Clock Controller + +maintainers: + - Michael Turquette + - Stephen Boyd + +description: + Clock controller bindings for VIA/Wondermedia VT8500 and Wondermedia WM8= xxx + series SoCs. + +select: + properties: + compatible: + const: via,vt8500-pmc + + required: + - compatible + +properties: + compatible: + const: via,vt8500-pmc + + reg: + maxItems: 1 + + clocks: + type: object + additionalProperties: true + + properties: + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + required: + - "#address-cells" + - "#size-cells" + + patternProperties: + "^[a-z0-9-]+(@[0-9a-f]+)?$": + type: object + + properties: + compatible: + enum: + - via,vt8500-pll-clock + - wm,wm8650-pll-clock + - wm,wm8750-pll-clock + - wm,wm8850-pll-clock + - via,vt8500-device-clock + + reg: + maxItems: 1 + description: + Offset of the PLL register within the PMC register space. + + clocks: + maxItems: 1 + + "#clock-cells": + const: 0 + + enable-reg: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Offset of the clock enable register within the PMC + register space. + + enable-bit: + $ref: /schemas/types.yaml#/definitions/uint32 + maximum: 31 + description: + Bit index controlling clock enable. + + divisor-reg: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Offset of the clock divisor register within the PMC + register space. + + divisor-mask: + $ref: /schemas/types.yaml#/definitions/uint32 + default: 0x1f + description: + Bitmask describing the divisor field inside divisor-reg. + + dependentRequired: + enable-reg: + - enable-bit + + enable-bit: + - enable-reg + + required: + - compatible + - "#clock-cells" + + allOf: + - if: + properties: + compatible: + enum: + - via,vt8500-pll-clock + - wm,wm8650-pll-clock + - wm,wm8750-pll-clock + - wm,wm8850-pll-clock + then: + required: + - reg + - clocks + + - if: + properties: + compatible: + const: via,vt8500-device-clock + then: + properties: + reg: false + + required: + - clocks + + anyOf: + - required: + - enable-reg + - enable-bit + + - required: + - divisor-reg + + additionalProperties: false + +required: + - compatible + - reg + - clocks + +additionalProperties: false + +examples: + - | + pmc@d8130000 { + compatible =3D "via,vt8500-pmc"; + reg =3D <0xd8130000 0x1000>; + + clocks { + #address-cells =3D <1>; + #size-cells =3D <0>; + + ref24: ref24M { + compatible =3D "fixed-clock"; + #clock-cells =3D <0>; + clock-frequency =3D <24000000>; + }; + + ref25: ref25M { + compatible =3D "fixed-clock"; + #clock-cells =3D <0>; + clock-frequency =3D <25000000>; + }; + + plla: clock@200 { + compatible =3D "wm,wm8650-pll-clock"; + #clock-cells =3D <0>; + clocks =3D <&ref25>; + reg =3D <0x200>; + }; + + pllb: clock@204 { + compatible =3D "wm,wm8650-pll-clock"; + #clock-cells =3D <0>; + clocks =3D <&ref25>; + reg =3D <0x204>; + }; + + clkarm: arm { + compatible =3D "via,vt8500-device-clock"; + #clock-cells =3D <0>; + clocks =3D <&plla>; + divisor-reg =3D <0x300>; + }; + + clkuart0: uart0 { + compatible =3D "via,vt8500-device-clock"; + #clock-cells =3D <0>; + clocks =3D <&ref24>; + enable-reg =3D <0x250>; + enable-bit =3D <1>; + }; + + clksdhc: sdhc { + compatible =3D "via,vt8500-device-clock"; + #clock-cells =3D <0>; + clocks =3D <&pllb>; + divisor-reg =3D <0x328>; + divisor-mask =3D <0x3f>; + enable-reg =3D <0x254>; + enable-bit =3D <18>; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/clock/vt8500.txt b/Documenta= tion/devicetree/bindings/clock/vt8500.txt deleted file mode 100644 index 91d71cc0314a..000000000000 --- a/Documentation/devicetree/bindings/clock/vt8500.txt +++ /dev/null @@ -1,74 +0,0 @@ -Device Tree Clock bindings for arch-vt8500 - -This binding uses the common clock binding[1]. - -[1] Documentation/devicetree/bindings/clock/clock-bindings.txt - -Required properties: -- compatible : shall be one of the following: - "via,vt8500-pll-clock" - for a VT8500/WM8505 PLL clock - "wm,wm8650-pll-clock" - for a WM8650 PLL clock - "wm,wm8750-pll-clock" - for a WM8750 PLL clock - "wm,wm8850-pll-clock" - for a WM8850 PLL clock - "via,vt8500-device-clock" - for a VT/WM device clock - -Required properties for PLL clocks: -- reg : shall be the control register offset from PMC base for the pll clo= ck. -- clocks : shall be the input parent clock phandle for the clock. This sho= uld - be the reference clock. -- #clock-cells : from common clock binding; shall be set to 0. - -Required properties for device clocks: -- clocks : shall be the input parent clock phandle for the clock. This sho= uld - be a pll output. -- #clock-cells : from common clock binding; shall be set to 0. - - -Device Clocks - -Device clocks are required to have one or both of the following sets of -properties: - - -Gated device clocks: - -Required properties: -- enable-reg : shall be the register offset from PMC base for the enable - register. -- enable-bit : shall be the bit within enable-reg to enable/disable the cl= ock. - - -Divisor device clocks: - -Required property: -- divisor-reg : shall be the register offset from PMC base for the divisor - register. -Optional property: -- divisor-mask : shall be the mask for the divisor register. Defaults to 0= x1f - if not specified. - - -For example: - -ref25: ref25M { - #clock-cells =3D <0>; - compatible =3D "fixed-clock"; - clock-frequency =3D <25000000>; -}; - -plla: plla { - #clock-cells =3D <0>; - compatible =3D "wm,wm8650-pll-clock"; - clocks =3D <&ref25>; - reg =3D <0x200>; -}; - -sdhc: sdhc { - #clock-cells =3D <0>; - compatible =3D "via,vt8500-device-clock"; - clocks =3D <&pllb>; - divisor-reg =3D <0x328>; - divisor-mask =3D <0x3f>; - enable-reg =3D <0x254>; - enable-bit =3D <18>; -}; --=20 2.43.0