Skip to contentSkip to conversation

ARM: dts: imx7ulp: add "tpm6" pwm node to i.MX7ULP

PATCH Superseded Krzysztof Kaszubski 3 participants 5 messages Oct 21

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: imx7ulp: add "tpm6" pwm node to i.MX7ULP

From: Krzysztof Kaszubski <[email protected]>

Add the Low Power Timer/Pulse Width Modulation Module 6 (TPM6) node to the i.MX 7ULP device tree.

TPM6 is located in the Application Domain (Cortex-A7) at base address 0x40a10000. This enables PWM and timer support for peripherals connected to this domain, such as display backlight controllers.

---
 arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi +10 -0
index 39e37ae9b2b1..f5ec5e9d65de 100644
@@ -216,6 +216,16 @@ tpm5: tpm@40260000 {
 			clock-names = "ipg", "per";
 		};
 
+		tpm6: pwm@40a10000 {
+			compatible = "fsl,imx7ulp-pwm";
+			reg = <0x40a10000 0x1000>;
+			assigned-clocks = <&pcc3 IMX7ULP_CLK_LPTPM6>;
+			assigned-clock-parents = <&scg1 IMX7ULP_CLK_SOSC_BUS_CLK>;
+			clocks = <&pcc3 IMX7ULP_CLK_LPTPM6>;
+			#pwm-cells = <3>;
+			status = "disabled";
+		};
+
 		usbotg1: usb@40330000 {
 			compatible = "fsl,imx7ulp-usb", "fsl,imx6ul-usb", "fsl,imx27-usb";
 			reg = <0x40330000 0x200>;
Signature · 1 line
2.43.0
#1 lore raw
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] ARM: dts: imx7ulp: tpm6 placed under ahbbridge0 instead of ahbbridge1 --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] ARM: dts: imx7ulp: tpm6 placed under ahbbridge0 instead of ahbbridge1 --

commit cb9013d8dcda32d8a277bf006e44680f1bf14cb8
Author: Krzysztof Kaszubski <[email protected]>

ARM: dts: imx7ulp: add "tpm6" pwm node to i.MX7ULP

This commit adds the tpm6 (pwm@40a10000) device tree node to arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi to enable PWM and timer support in the Application Domain.

Quoted 11 lines
arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi +3 -0
index 39e37ae9b2b1e..f5ec5e9d65de2 100644
@@ -216,6 +216,16 @@ tpm5: tpm@40260000 {
 			clock-names = "ipg", "per";
 		};
 
+		tpm6: pwm@40a10000 {
+			compatible = "fsl,imx7ulp-pwm";
+			reg = <0x40a10000 0x1000>;

arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi tpm5: tpm@40260000 { · line 231

Quoted 10 lines
arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi +7 -0
+			assigned-clocks = <&pcc3 IMX7ULP_CLK_LPTPM6>;
+			assigned-clock-parents = <&scg1 IMX7ULP_CLK_SOSC_BUS_CLK>;
+			clocks = <&pcc3 IMX7ULP_CLK_LPTPM6>;
+			#pwm-cells = <3>;
+			status = "disabled";
+		};
+
 		usbotg1: usb@40330000 {
 			compatible = "fsl,imx7ulp-usb", "fsl,imx6ul-usb", "fsl,imx27-usb";
 			reg = <0x40330000 0x200>;

[Severity: Low]
Should tpm6 (pwm@40a10000) be placed under ahbbridge1 instead of ahbbridge0?

In arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi, this hunk inserts tpm6 inside ahbbridge0 (bus@40000000) between tpm5 (tpm@40260000) and usbotg1 (usb@40330000). However, ahbbridge0 only covers the address range 0x40000000 through 0x407fffff:

	ahbbridge0: bus@40000000 {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <1>;
		reg = <0x40000000 0x800000>;
		ranges;

Peripherals in the 0x40800000..0x40ffffff range and clocked by pcc3 reside under ahbbridge1 (bus@40800000):

	ahbbridge1: bus@40800000 {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <1>;
		reg = <0x40800000 0x800000>;
		ranges;

		lpi2c6: i2c@40a40000 {

Placing pwm@40a10000 under ahbbridge0 puts it outside the parent bus reg range and out of unit-address order when compiling or validating device trees that include imx7ulp.dtsi. Should tpm6 be moved under ahbbridge1 right before lpi2c6 (i2c@40a40000)?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#2 lore raw

PATCH v2 1/1 ARM: dts: imx7ulp: Add TMP6 PWM node to i.MX7ULP

In reply to Krzysztof Kaszubski

Add the Low Power Timer/Pulse Width Modulation Module 6 (TPM6) node to the i.MX 7ULP device tree.

TPM6 is located in the Application Domain (Cortex-A7) at base address 0x40a10000. This enables PWM and timer support for peripherals connected to this domain, such as display backlight controllers.

---
v2:
- Move tpm6 node under ahbbridge1 (bus@40800000), before lpi2c6@40a40000 (reported by DT bot)
- Fix author/Signed-off-by email typo (simpthicode -> sympthicode)

 arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi +10 -0
index 39e37ae9b2b1..6240750b84dc 100644
@@ -366,6 +366,16 @@ ahbbridge1: bus@40800000 {
 		reg = <0x40800000 0x800000>;
 		ranges;
 
+		tpm6: pwm@40a10000 {
+			compatible = "fsl,imx7ulp-pwm";
+			reg = <0x40a10000 0x1000>;
+			assigned-clocks = <&pcc3 IMX7ULP_CLK_LPTPM6>;
+			assigned-clock-parents = <&scg1 IMX7ULP_CLK_SOSC_BUS_CLK>;
+			clocks = <&pcc3 IMX7ULP_CLK_LPTPM6>;
+			#pwm-cells = <3>;
+			status = "disabled";
+		};
+
 		lpi2c6: i2c@40a40000 {
 			compatible = "fsl,imx7ulp-lpi2c";
 			reg = <0x40a40000 0x10000>;
Signature · 1 line
2.43.0
#4 lore raw
In reply to Krzysztof Kaszubski
Quoted 22 lines · Krzysztof Kaszubski

[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

From: Krzysztof Kaszubski <[email protected]>

Add the Low Power Timer/Pulse Width Modulation Module 6 (TPM6) node to the i.MX 7ULP device tree.

TPM6 is located in the Application Domain (Cortex-A7) at base address 0x40a10000. This enables PWM and timer support for peripherals connected to this domain, such as display backlight controllers.

---
 arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi +0 -0
index 39e37ae9b2b1..f5ec5e9d65de 100644

arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi tpm5: tpm@40260000 { · line 219

Quoted 4 lines
arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi +1 -0
@@ -216,6 +216,16 @@ tpm5: tpm@40260000 {
                        clock-names = "ipg", "per";
                };
 
+               tpm6: pwm@40a10000 {

Order by address

Frank

Quoted 16 lines
arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi +9 -1
+                       compatible = "fsl,imx7ulp-pwm";
+                       reg = <0x40a10000 0x1000>;
+                       assigned-clocks = <&pcc3 IMX7ULP_CLK_LPTPM6>;
+                       assigned-clock-parents = <&scg1 IMX7ULP_CLK_SOSC_BUS_CLK>;
+                       clocks = <&pcc3 IMX7ULP_CLK_LPTPM6>;
+                       #pwm-cells = <3>;
+                       status = "disabled";
+               };
+
                usbotg1: usb@40330000 {
                        compatible = "fsl,imx7ulp-usb", "fsl,imx6ul-usb", "fsl,imx27-usb";
                        reg = <0x40330000 0x200>;
--

2.43.0

#3 lore raw

Re: [PATCH v2] ARM: dts: imx7ulp: Add TMP6 PWM node to i.MX7ULP

In reply to Krzysztof Kaszubski
Quoted 5 lines · Krzysztof Kaszubski

[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

Add the Low Power Timer/Pulse Width Modulation Module 6 (TPM6) node to the i.MX 7ULP device tree.

Quoted 8 lines

TPM6 is located in the Application Domain (Cortex-A7) at base address 0x40a10000. This enables PWM and timer support for peripherals connected to this domain, such as display backlight controllers.

---
v2:

Please slow down and avoid post new patch in old thread, which will confuse patchwork or other tools.

Frank

Quoted 32 lines

- Move tpm6 node under ahbbridge1 (bus@40800000), before lpi2c6@40a40000 (reported by DT bot)
- Fix author/Signed-off-by email typo (simpthicode -> sympthicode)

 arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi +10 -1
index 39e37ae9b2b1..6240750b84dc 100644
@@ -366,6 +366,16 @@ ahbbridge1: bus@40800000 {
                reg = <0x40800000 0x800000>;
                ranges;
 
+               tpm6: pwm@40a10000 {
+                       compatible = "fsl,imx7ulp-pwm";
+                       reg = <0x40a10000 0x1000>;
+                       assigned-clocks = <&pcc3 IMX7ULP_CLK_LPTPM6>;
+                       assigned-clock-parents = <&scg1 IMX7ULP_CLK_SOSC_BUS_CLK>;
+                       clocks = <&pcc3 IMX7ULP_CLK_LPTPM6>;
+                       #pwm-cells = <3>;
+                       status = "disabled";
+               };
+
                lpi2c6: i2c@40a40000 {
                        compatible = "fsl,imx7ulp-lpi2c";
                        reg = <0x40a40000 0x10000>;
--

2.43.0