From nobody Mon Feb 9 07:22:15 2026 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (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 52FB233F373 for ; Wed, 7 Jan 2026 13:40:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767793203; cv=none; b=X3WEgXM5KnQDBJ6B0v2kwgePfsCN8pCTY0MW9XXpREFeBIq2BB/bOn4KV4CTJy0wPgHr2wVTbs1iMupX+vlJIKMRFIAvX6i3mLe4S6vQd2Z/oP63Aty7OMkXdcsEuVcVjGqT0SmrIWsJXBeHAV321HqcZSBEOfRLIqmWOVekDCc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767793203; c=relaxed/simple; bh=oJ9gKow6S8KEzSj2K6q1yw7J3LdgtVU6Q9IVbH+UGBA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=r34G38noOznrmgsyDqXu5VOXRNQLCwP6waXeZaOwsYDhtPbNTBbNn6DR4tmgKocVKHDoAL2mGZUpE9VqtULf8JHS+sdxsVBLAR0JBXaeeJuNbKuDcDLcS2EaP79mLXyo3Lg38UyelcPj4qLbwdqLsKUUO1RJEdJqpiDZ9cvuUO4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=mDGZtDrb; arc=none smtp.client-ip=209.85.221.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mDGZtDrb" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-431048c4068so527264f8f.1 for ; Wed, 07 Jan 2026 05:40:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767793200; x=1768398000; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2y3xJj6Lny5hNArf79Fe/OIMoyByArkbsGtk/c71GuI=; b=mDGZtDrb0dmWZF/F4OEy19m34NBpmnh7Ke3WgPNzfJ+sDGZbZCTArygVYxoy+JmNhn xRvbL5jOgpFqwvjfAqK+bRikBc2wXimn6qAE0pKgAe8zDCWxZolwaC+OYCSi7ASHueRq 575aVYAqNaDl9aoM/ImWLjUyGJAm2RpLQt1jE7o7sL14D56MASLFZQPtggY3eFB5WyJf cLPIqCyPavhi4p6lF3liqk9i4wG5clPgUAtZ6o5MLMsoRSFR55tog0YKsYbOJXWWBnUS kjlndJevwB9Si2AJf/FdfVBtjxLxr0cd+tMDPToC9yb+NWMQWM8Eaoa0PivvzOPvjHay MXPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767793200; x=1768398000; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=2y3xJj6Lny5hNArf79Fe/OIMoyByArkbsGtk/c71GuI=; b=in97RUpGpFBl43N2wtbAO9y/F9MtMu0qlut2IhcPn6adxXxQJZvoeXCx70k/O54zKs qqR1FAZp6m5y4bQ/HXTuG7JGJ2V6J+t1EJYDS1rbMWIXjXGcJhCmpEWKO32S9jw5LcCn Wb7bnf75qen6DBZG03YAQFx79BOT2aTYlcNkaGUvI+gXPd/vIshZF35QmPNj/xvVfIj7 1UOY9v3tIrzU4/q9HpgCqw/xPrNTlKas/fY5Yhe741VMmyv6eWFLxllpQtvV25f72Kwm GdjJ5Ddm4IYCJ7vMLm5F/J2kdllKdZuO7s5btjyl0oZTluDVJwjEOC1AZRaH99Vs16eV tQvQ== X-Forwarded-Encrypted: i=1; AJvYcCXJeEeCMWhSKjlwu37OD017Yz5tgau+LjFGEG9dKs3QG7ZIkgPxnv4wCCTQ345/Qzs+lcNR39SeK2ngtrg=@vger.kernel.org X-Gm-Message-State: AOJu0YwphUMc90W9KwsjeO9GzwkbmAyngUi2EysqAbj81WMjV3dJbPvc BuhCTyPW13jnLdWVIs4rmv6+zzR+xYBidAo3xdGYvBRFICQKLnFX9UuYwfspJHNKjeI= X-Gm-Gg: AY/fxX7v7Y9n2bRDKFjTldbLJzmlWTLdjy2BY21VcS++oD5Pg4nBd8cxqxmya3Zo/oN bKqTh23mrLgbP4YwYN+sNQyVCnSSohHwdSgi8qxJoI/6fVMY+rfTonacoXvF1ZM1ggiPPsJ+3Pr Y0DwUhoRUe5x4MMCBjd1r7Ks4Q9xYb8zCyXmJLOrebrhYki2u4RxXFMd+ssYNswNOydacBEnFrd znAA58a4zMXb8lulfPwIZF/QgfHTiEWXTQpAAue8rkl5ddT+XE1G/ZF/xRNHeE7x/9DJBQRRByv XZVWEw8reMucreoa88qFvBRVMpZV9/TjU6kb0QOg1ld74BypFHIJ2N4wF6hSOaNYd6+/f/eWt+N eJcX4GyKgmmWdl4gjWRdDvgmECAxoUWKdzObLnHRIj2CciMMDkIu/cCsd0CQmykJKl+Uov6I2du zGZm+xLaYlyyQSFG/XnBLiYERog5FxVJI= X-Google-Smtp-Source: AGHT+IEmv81ZP2nMx/GBeve9qwqbgXEMVOoOo0eHP+YvxZHkXRk317akrEbP+MJ11KaLATLdGlW1fQ== X-Received: by 2002:a05:6000:2511:b0:430:fbce:4575 with SMTP id ffacd0b85a97d-432bcfde8afmr8089849f8f.21.1767793199528; Wed, 07 Jan 2026 05:39:59 -0800 (PST) Received: from mai.box.freepro.com ([2a05:6e02:1041:c10:39ee:bc4c:aafe:6bd0]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432bd0dade5sm10595542f8f.9.2026.01.07.05.39.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jan 2026 05:39:59 -0800 (PST) From: Daniel Lezcano To: wbg@kernel.org Cc: robh@kernel.org, conor+dt@kernel.org, krzk+dt@kernel.org, s32@nxp.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org Subject: [PATCH v4 2/3] dt-bindings: counter: Add NXP System Timer Module Counter Date: Wed, 7 Jan 2026 14:39:51 +0100 Message-ID: <20260107133953.2094015-3-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260107133953.2094015-1-daniel.lezcano@linaro.org> References: <20260107133953.2094015-1-daniel.lezcano@linaro.org> 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" Add the System Timer Module description found on the NXP s32 platform when it is used as a counter and the compatible for the s32g2 variant. Reviewed-by: Rob Herring (Arm) Signed-off-by: Daniel Lezcano --- .../bindings/counter/nxp,s32g2-stm-cnt.yaml | 64 +++++++++++++++++++ arch/arm64/boot/dts/freescale/s32g2.dtsi | 6 +- .../boot/dts/freescale/s32g274a-rdb2.dts | 10 +-- 3 files changed, 70 insertions(+), 10 deletions(-) create mode 100644 Documentation/devicetree/bindings/counter/nxp,s32g2-stm= -cnt.yaml diff --git a/Documentation/devicetree/bindings/counter/nxp,s32g2-stm-cnt.ya= ml b/Documentation/devicetree/bindings/counter/nxp,s32g2-stm-cnt.yaml new file mode 100644 index 000000000000..4d42996f5ad3 --- /dev/null +++ b/Documentation/devicetree/bindings/counter/nxp,s32g2-stm-cnt.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/counter/nxp,s32g2-stm-cnt.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP System Timer Module (STM) + +maintainers: + - Daniel Lezcano + +description: + The System Timer Module supports commonly required system and application + software timing functions. STM includes a 32-bit count-up timer and four + 32-bit compare channels with a separate interrupt source for each channe= l. + The counter is driven by the STM module clock divided by an 8-bit presca= le + value. + +properties: + compatible: + oneOf: + - const: nxp,s32g2-stm-cnt + - items: + - const: nxp,s32g3-stm-cnt + - const: nxp,s32g2-stm-cnt + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: Counter clock + - description: Module clock + - description: Register clock + + clock-names: + items: + - const: counter + - const: module + - const: register + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + #include + + timer@4011c000 { + compatible =3D "nxp,s32g2-stm-cnt"; + reg =3D <0x4011c000 0x3000>; + interrupts =3D ; + clocks =3D <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>; + clock-names =3D "counter", "module", "register"; + }; diff --git a/arch/arm64/boot/dts/freescale/s32g2.dtsi b/arch/arm64/boot/dts= /freescale/s32g2.dtsi index 51d00dac12de..6bc0c75b574f 100644 --- a/arch/arm64/boot/dts/freescale/s32g2.dtsi +++ b/arch/arm64/boot/dts/freescale/s32g2.dtsi @@ -579,7 +579,7 @@ swt6: watchdog@40208000 { }; =20 stm4: timer@4021c000 { - compatible =3D "nxp,s32g2-stm"; + compatible =3D "nxp,s32g2-stm-cnt"; reg =3D <0x4021c000 0x3000>; clocks =3D <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>; clock-names =3D "counter", "module", "register"; @@ -588,7 +588,7 @@ stm4: timer@4021c000 { }; =20 stm5: timer@40220000 { - compatible =3D "nxp,s32g2-stm"; + compatible =3D "nxp,s32g2-stm-cnt"; reg =3D <0x40220000 0x3000>; clocks =3D <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>; clock-names =3D "counter", "module", "register"; @@ -597,7 +597,7 @@ stm5: timer@40220000 { }; =20 stm6: timer@40224000 { - compatible =3D "nxp,s32g2-stm"; + compatible =3D "nxp,s32g2-stm-cnt"; reg =3D <0x40224000 0x3000>; clocks =3D <&clks 0x3b>, <&clks 0x3c>, <&clks 0x3c>; clock-names =3D "counter", "module", "register"; diff --git a/arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts b/arch/arm64/b= oot/dts/freescale/s32g274a-rdb2.dts index ee3121b192e5..bde5d3726825 100644 --- a/arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts +++ b/arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts @@ -41,19 +41,15 @@ &uart1 { status =3D "okay"; }; =20 -&stm0 { +&stm4 { status =3D "okay"; }; =20 -&stm1 { +&stm5 { status =3D "okay"; }; =20 -&stm2 { - status =3D "okay"; -}; - -&stm3 { +&stm6 { status =3D "okay"; }; =20 --=20 2.43.0