From nobody Mon Feb 9 13:00:31 2026 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 4CCD634E74F for ; Tue, 13 Jan 2026 16:52:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768323157; cv=none; b=Z13b58ytkY66EnBbsTS76mjbjrVjhwlvZzfpNrWDob7mjR51mlEs1/07cIGe0y9wBfpajLox2V6NCE5BIaLmLtLQP10QvoZvmtMVTfCz8YxKch2tzi2tNj4VtNULSOTOxX7xGS6Gqrhu4gHlGiVnMlNshsHMRLkhhaFFePeA2ic= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768323157; c=relaxed/simple; bh=oJ9gKow6S8KEzSj2K6q1yw7J3LdgtVU6Q9IVbH+UGBA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dh1Hb5qbP7+vAqzxB19mJau+5yiGeS8wAed8VGibBmn8sgKxL9FCizvl7MDecKE1AO1Qc61LdzWwJdcmvZTahuq10BDwfL05ux72wUjHfGwNQfNEQx34wV8ScGiQ6PMva1C1Z4vZ+0dY7bkbwvc+GKGzygIBDl8TyjQ8SxDYrmo= 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=zwbBaG9E; arc=none smtp.client-ip=209.85.128.45 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="zwbBaG9E" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-47ee0291921so4161015e9.3 for ; Tue, 13 Jan 2026 08:52:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768323149; x=1768927949; 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=zwbBaG9E9CT3bHkBVCk/NesvscQ6HCIPhHJJnDHqd0Au4gCM0t22ztbvAaBj2O98hN z5q8yHR++mVuIMMn7p+el8C9vdsL05inlYW57mggWhanJ/MKLWRaW3UZuqYIHl5El69r X4TDVJGd81U1ET7fSvVIU6E289/MN9swdP2wziDvfRnBMtJs+vavyNzEuXNduy1JFwP1 MKwMXTx6KdNlZ5sZ4MJz37hboVLu9LLvRSQ8ICSIBQSjDfDvPRrBDSrjkFoRqVn7AXBB jU9tisF/eHn/S5E7+63COSmbG136NCrr/1JKgsUlZr2Zg61BBmK8W7qAF3v/DUfXXNEP y2sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768323149; x=1768927949; 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=idmxrZ7/HkI+VEalO/TST46RrCJrlY4eyti0gx3IyKTw9rpfbd9o5+4Z0q9PeONBxM UiO9133mroKHxYmloK+r3K1UqoIqBcNi3y7nOxcGFAQXZau7w7xAIowc9EEHtVflA9VW tWV7aM5GEl7aQk4IIaXvnpKHrrjep/8rlvB/Jdob7YeRehxgqo4ZNoqdCpgfZ5tGpZg3 S/MGlWuDAxQR7TzEHmK+XPcsa7Nt/ycZBT9jx0mNrQxRzRyj9UbYQgKuS2AWPEBX/ebj 7q6NFgWHCLWdOaIxRlxyWnh7IzRfwMmdp3CqJRdqDqOlu/v5216ilrQ4nevI2ydfnyRW jRew== X-Forwarded-Encrypted: i=1; AJvYcCXT6oVbgzq+dtQeyu8+WKoRjC4Y1MglQAAvBdBePVJeuskCxOWzL+AUa3UgZOoLsPv9UaRKxyErowdNpiw=@vger.kernel.org X-Gm-Message-State: AOJu0YzJ4qqDvlRByHoWAByhMdozyE7WRoMijalUxHiyC2IrlBrC1Y+U EUZNDxQRqN7KtcF+2I/tVfoBt0KP9e6xUKcxpSicUMzFungTvHF2icXbE2I21Vifeng= X-Gm-Gg: AY/fxX7EybvizLpdD/2VIhqYi24tZdjvGYGyn1Vj5e3HV2mn5BOFv/XUKUGY7fJSgmb +5krgSuwT0+ZfX+wfiXSmS7LS6jeAxLtyimm8RR3xDLSgBU88YowjT6xmG2ED0PGXrNmxoIS2+l AM5k7e6CobmEFGDIQ4Bcv+9nSgSg9N7v+/fefymWPJAiva0H9IulP62NM2+G8x40xedJyRmsLsE wRCenFKxCfbzB23CDDqGvIGW8J1yuc2ipjvUxbLkw0dB83aHxdWQqinw5mlwIx74D1q3BOKpIFA z5hknelMI9+N837VqQhEVcbreCuLO+dKSmU4kAKEvaUD1wEB8ec1ECNKeMsN7wjWvrDgO4h5+W9 +r87X9MS6SR1Nyr6itqdmuhXuD1uAjxQ37o+Xwwpxxl/rNv/3aWNPWvDpEy9BrOYgdr1VFbcWZX ZmE4H6zgpBojX6NtnVTcy/hFAT/6WwtSU= X-Google-Smtp-Source: AGHT+IEicAP01cQZjkyG01ghspfKpykhlK3qAoBCk+2ayoqlIhLWC13pIjU/Acop8PMmfgPDXUsETw== X-Received: by 2002:a05:600c:444c:b0:477:7b16:5f77 with SMTP id 5b1f17b1804b1-47d84b0b303mr225376805e9.3.1768323148712; Tue, 13 Jan 2026 08:52:28 -0800 (PST) Received: from mai.box.freepro.com ([2a05:6e02:1041:c10:3594:70ab:9964:c5ec]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47d7f41eb3bsm431684925e9.7.2026.01.13.08.52.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jan 2026 08:52:28 -0800 (PST) From: Daniel Lezcano To: wbg@kernel.org Cc: Frank.li@nxp.com, 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 v5 2/3] dt-bindings: counter: Add NXP System Timer Module Counter Date: Tue, 13 Jan 2026 17:52:19 +0100 Message-ID: <20260113165220.1599038-3-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260113165220.1599038-1-daniel.lezcano@linaro.org> References: <20260113165220.1599038-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