Skip to contentSkip to conversation

Enable eQEP DT support for Sitara K3 platforms

PATCH Applied Judith Mendez 3 participants 9 messages Sep 24, 2024 – Oct 28, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v6 cover Enable eQEP DT support for Sitara K3 platforms

Git rebased the series since due to merge conflicts, part of the series was not merged. Also dropped the patches that were already merged.

This patch series adds eQEP DT nodes for K3 Sitara devices:
- AM62x
- AM62ax
- AM62px
- AM64x

Changes since v5:
- Drop patch 1/8, 2/8, 8/8 since they have been merged

v5: https://lore.kernel.org/linux-devicetree/[email protected]/
v4: https://lore.kernel.org/linux-devicetree/[email protected]/
v3: https://lore.kernel.org/linux-devicetree/[email protected]/
v2: https://lore.kernel.org/linux-devicetree/[email protected]/
v1: https://lore.kernel.org/linux-devicetree/[email protected]/

Judith Mendez (5):
arm64: dts: ti: k3-am62-main: Add eQEP nodes
arm64: dts: ti: k3-am62a-main: Add eQEP nodes
arm64: dts: ti: k3-am62p-main: Add eQEP nodes
arm64: dts: ti: k3-am64-main: Add eQEP nodes
arm64: dts: ti: k3-am64x-sk: Enable eQEP

 arch/arm64/boot/dts/ti/k3-am62-main.dtsi      | 27 +++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi     | 27 +++++++++++++++++++
 .../dts/ti/k3-am62p-j722s-common-main.dtsi    | 27 +++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi      | 27 +++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am642-sk.dts        | 17 ++++++++++++
 5 files changed, 125 insertions(+)
Signature · 1 line
2.46.0
#1 lore raw

PATCH v6 1/5 arm64: dts: ti: k3-am62-main: Add eQEP nodes

Add eQEP device tree nodes 0-2 for AM625 SoC.

---
Changes since v5:
- No change

---
 arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 27 ++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
arch/arm64/boot/dts/ti/k3-am62-main.dtsi +27 -0
index 5b92aef5b284..98ba75af8730 100644
@@ -843,6 +843,33 @@ ecap2: pwm@23120000 {
 		status = "disabled";
 	};
 
+	eqep0: counter@23200000 {
+		compatible = "ti,am62-eqep";
+		reg = <0x00 0x23200000 0x00 0x100>;
+		power-domains = <&k3_pds 59 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 59 0>;
+		interrupts = <GIC_SPI 116 IRQ_TYPE_EDGE_RISING>;
+		status = "disabled";
+	};
+
+	eqep1: counter@23210000 {
+		compatible = "ti,am62-eqep";
+		reg = <0x00 0x23210000 0x00 0x100>;
+		power-domains = <&k3_pds 60 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 60 0>;
+		interrupts = <GIC_SPI 117 IRQ_TYPE_EDGE_RISING>;
+		status = "disabled";
+	};
+
+	eqep2: counter@23220000 {
+		compatible = "ti,am62-eqep";
+		reg = <0x00 0x23220000 0x00 0x100>;
+		power-domains = <&k3_pds 62 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 62 0>;
+		interrupts = <GIC_SPI 118 IRQ_TYPE_EDGE_RISING>;
+		status = "disabled";
+	};
+
 	main_mcan0: can@20701000 {
 		compatible = "bosch,m_can";
 		reg = <0x00 0x20701000 0x00 0x200>,
Signature · 1 line
2.46.0
#2 lore raw

PATCH v6 2/5 arm64: dts: ti: k3-am62a-main: Add eQEP nodes

In reply to Judith Mendez

Add eQEP device tree nodes 0-2 for AM62A7 SoC.

---
Changes since v5:
- No change

---
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 27 +++++++++++++++++++++++
 1 file changed, 27 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +27 -0
index 16a578ae2b41..a93e2cd7b8c7 100644
@@ -943,6 +943,33 @@ ecap2: pwm@23120000 {
 		status = "disabled";
 	};
 
+	eqep0: counter@23200000 {
+		compatible = "ti,am62-eqep";
+		reg = <0x00 0x23200000 0x00 0x100>;
+		power-domains = <&k3_pds 59 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 59 0>;
+		interrupts = <GIC_SPI 116 IRQ_TYPE_EDGE_RISING>;
+		status = "disabled";
+	};
+
+	eqep1: counter@23210000 {
+		compatible = "ti,am62-eqep";
+		reg = <0x00 0x23210000 0x00 0x100>;
+		power-domains = <&k3_pds 60 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 60 0>;
+		interrupts = <GIC_SPI 117 IRQ_TYPE_EDGE_RISING>;
+		status = "disabled";
+	};
+
+	eqep2: counter@23220000 {
+		compatible = "ti,am62-eqep";
+		reg = <0x00 0x23220000 0x00 0x100>;
+		power-domains = <&k3_pds 62 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 62 0>;
+		interrupts = <GIC_SPI 118 IRQ_TYPE_EDGE_RISING>;
+		status = "disabled";
+	};
+
 	mcasp0: audio-controller@2b00000 {
 		compatible = "ti,am33xx-mcasp-audio";
 		reg = <0x00 0x02b00000 0x00 0x2000>,
Signature · 1 line
2.46.0
#3 lore raw

PATCH v6 3/5 arm64: dts: ti: k3-am62p-main: Add eQEP nodes

In reply to Judith Mendez

Add eQEP device tree nodes 0-2 for AM62P5 SoC.

---
Changes since v5:
- No change

---
 .../dts/ti/k3-am62p-j722s-common-main.dtsi    | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +27 -0
index 9b6f51379108..41e1c24b1144 100644
@@ -827,6 +827,33 @@ ecap2: pwm@23120000 {
 		status = "disabled";
 	};
 
+	eqep0: counter@23200000 {
+		compatible = "ti,am62-eqep";
+		reg = <0x00 0x23200000 0x00 0x100>;
+		power-domains = <&k3_pds 59 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 59 0>;
+		interrupts = <GIC_SPI 116 IRQ_TYPE_EDGE_RISING>;
+		status = "disabled";
+	};
+
+	eqep1: counter@23210000 {
+		compatible = "ti,am62-eqep";
+		reg = <0x00 0x23210000 0x00 0x100>;
+		power-domains = <&k3_pds 60 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 60 0>;
+		interrupts = <GIC_SPI 117 IRQ_TYPE_EDGE_RISING>;
+		status = "disabled";
+	};
+
+	eqep2: counter@23220000 {
+		compatible = "ti,am62-eqep";
+		reg = <0x00 0x23220000 0x00 0x100>;
+		power-domains = <&k3_pds 62 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 62 0>;
+		interrupts = <GIC_SPI 118 IRQ_TYPE_EDGE_RISING>;
+		status = "disabled";
+	};
+
 	main_mcan0: can@20701000 {
 		compatible = "bosch,m_can";
 		reg = <0x00 0x20701000 0x00 0x200>,
Signature · 1 line
2.46.0
#4 lore raw

PATCH v6 4/5 arm64: dts: ti: k3-am64-main: Add eQEP nodes

In reply to Judith Mendez

Add eQEP device tree nodes 0-2 for AM642 SoC.

---
Changes since v5:
- No change

---
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 27 ++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
arch/arm64/boot/dts/ti/k3-am64-main.dtsi +27 -0
index 7eae18399caa..f96cb19fb3f1 100644
@@ -1175,6 +1175,33 @@ ecap2: pwm@23120000 {
 		status = "disabled";
 	};
 
+	eqep0: counter@23200000 {
+		compatible = "ti,am62-eqep";
+		reg = <0x00 0x23200000 0x00 0x100>;
+		power-domains = <&k3_pds 59 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 59 0>;
+		interrupts = <GIC_SPI 116 IRQ_TYPE_EDGE_RISING>;
+		status = "disabled";
+	};
+
+	eqep1: counter@23210000 {
+		compatible = "ti,am62-eqep";
+		reg = <0x00 0x23210000 0x00 0x100>;
+		power-domains = <&k3_pds 60 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 60 0>;
+		interrupts = <GIC_SPI 117 IRQ_TYPE_EDGE_RISING>;
+		status = "disabled";
+	};
+
+	eqep2: counter@23220000 {
+		compatible = "ti,am62-eqep";
+		reg = <0x00 0x23220000 0x00 0x100>;
+		power-domains = <&k3_pds 62 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 62 0>;
+		interrupts = <GIC_SPI 118 IRQ_TYPE_EDGE_RISING>;
+		status = "disabled";
+	};
+
 	main_rti0: watchdog@e000000 {
 		compatible = "ti,j7-rti-wdt";
 		reg = <0x00 0xe000000 0x00 0x100>;
Signature · 1 line
2.46.0
#5 lore raw

PATCH v6 5/5 arm64: dts: ti: k3-am64x-sk: Enable eQEP

In reply to Judith Mendez

There are 3 instances of eQEP on AM64x. Only EQEP0 signals can be routed to the user expansion so enable only EQEP0 in k3-am642-sk.dts.

---
Changes since v5:
- No change

---
 arch/arm64/boot/dts/ti/k3-am642-sk.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm64/boot/dts/ti/k3-am642-sk.dts +17 -0
index 86369525259c..47b351067bb8 100644
@@ -357,6 +357,16 @@ main_ecap0_pins_default: main-ecap0-default-pins {
 			AM64X_IOPAD(0x0270, PIN_INPUT, 0) /* (D18) ECAP0_IN_APWM_OUT */
 		>;
 	};
+
+	main_eqep0_pins_default: main-eqep0-default-pins {
+		pinctrl-single,pins = <
+			AM64X_IOPAD(0x00a0, PIN_INPUT, 3) /* (N16) GPMC0_WPn.EQEP0_A */
+			AM64X_IOPAD(0x00a4, PIN_INPUT, 3) /* (N17) GPMC0_DIR.EQEP0_B */
+			AM64X_IOPAD(0x00ac, PIN_INPUT, 3) /* (R20) GPMC0_CSn1.EQEP0_I */
+			AM64X_IOPAD(0x00a8, PIN_INPUT, 3) /* (R19) GPMC0_CSn0.EQEP0_S */
+		>;
+	};
+
 	main_wlan_en_pins_default: main-wlan-en-default-pins {
 		pinctrl-single,pins = <
 			AM64X_IOPAD(0x00c4, PIN_OUTPUT_PULLUP, 7) /* (V8) GPIO0_48 */
@@ -687,3 +697,10 @@ &ecap0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&main_ecap0_pins_default>;
 };
+
+&eqep0 {
+	status = "okay";
+	/* EQEP0 A & B available on pins 18 & 22 of J4 header */
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_eqep0_pins_default>;
+};
Signature · 1 line
2.46.0
#6 lore raw
In reply to Judith Mendez
Quoted 26 lines · Judith Mendez

Git rebased the series since due to merge conflicts, part of the series was not merged. Also dropped the patches that were already merged.

This patch series adds eQEP DT nodes for K3 Sitara devices:
- AM62x
- AM62ax
- AM62px
- AM64x

Changes since v5:
- Drop patch 1/8, 2/8, 8/8 since they have been merged

v5: https://lore.kernel.org/linux-devicetree/[email protected]/
v4: https://lore.kernel.org/linux-devicetree/[email protected]/
v3: https://lore.kernel.org/linux-devicetree/[email protected]/
v2: https://lore.kernel.org/linux-devicetree/[email protected]/
v1: https://lore.kernel.org/linux-devicetree/[email protected]/

Judith Mendez (5):
arm64: dts: ti: k3-am62-main: Add eQEP nodes
arm64: dts: ti: k3-am62a-main: Add eQEP nodes
arm64: dts: ti: k3-am62p-main: Add eQEP nodes
arm64: dts: ti: k3-am64-main: Add eQEP nodes
arm64: dts: ti: k3-am64x-sk: Enable eQEP

Quoted 10 lines
 arch/arm64/boot/dts/ti/k3-am62-main.dtsi      | 27 +++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi     | 27 +++++++++++++++++++
 .../dts/ti/k3-am62p-j722s-common-main.dtsi    | 27 +++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi      | 27 +++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am642-sk.dts        | 17 ++++++++++++
 5 files changed, 125 insertions(+)
Signature · 1 line
2.46.0

I recall last time these needed to go via the TI SoC/arm64 tree [^1]. Is that still the case, or do you want me to pick these up now via the Counter tree?

William Breathitt Gray

[^1]: https://lore.kernel.org/all/[email protected]/

#7 lore raw

Hi,

Quoted 34 lines · William Breathitt Gray
Quoted 33 lines · Judith Mendez

Git rebased the series since due to merge conflicts, part of the series was not merged. Also dropped the patches that were already merged.

This patch series adds eQEP DT nodes for K3 Sitara devices:
- AM62x
- AM62ax
- AM62px
- AM64x

Changes since v5:
- Drop patch 1/8, 2/8, 8/8 since they have been merged

v5: https://lore.kernel.org/linux-devicetree/[email protected]/
v4: https://lore.kernel.org/linux-devicetree/[email protected]/
v3: https://lore.kernel.org/linux-devicetree/[email protected]/
v2: https://lore.kernel.org/linux-devicetree/[email protected]/
v1: https://lore.kernel.org/linux-devicetree/[email protected]/

Judith Mendez (5):
arm64: dts: ti: k3-am62-main: Add eQEP nodes
arm64: dts: ti: k3-am62a-main: Add eQEP nodes
arm64: dts: ti: k3-am62p-main: Add eQEP nodes
arm64: dts: ti: k3-am64-main: Add eQEP nodes
arm64: dts: ti: k3-am64x-sk: Enable eQEP

 arch/arm64/boot/dts/ti/k3-am62-main.dtsi      | 27 +++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi     | 27 +++++++++++++++++++
 .../dts/ti/k3-am62p-j722s-common-main.dtsi    | 27 +++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi      | 27 +++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am642-sk.dts        | 17 ++++++++++++
 5 files changed, 125 insertions(+)
Quoted 5 lines
Quoted 3 lines
Signature · 1 line
2.46.0

I recall last time these needed to go via the TI SoC/arm64 tree [^1].

Yes, I will queue this up now to 6.12-rc1 is out. Feel free to ignore the series

Quoted 6 lines

Is that still the case, or do you want me to pick these up now via the Counter tree?

William Breathitt Gray

[^1]: https://lore.kernel.org/all/[email protected]/

Regards
Vignesh

Signature · 2 lines
Regards
Vignesh
maintainer Applied
#8 lore raw
In reply to Judith Mendez

Hi Judith Mendez,

Quoted 11 lines · Judith Mendez

Git rebased the series since due to merge conflicts, part of the series was not merged. Also dropped the patches that were already merged.

This patch series adds eQEP DT nodes for K3 Sitara devices:
- AM62x
- AM62ax
- AM62px
- AM64x

[...]

I have applied the following to branch ti-k3-dts-next on [1]. Thank you!

[1/5] arm64: dts: ti: k3-am62-main: Add eQEP nodes

      commit: 79e668d0d938ca05f340bd1faf37262f31c7a029
[2/5] arm64: dts: ti: k3-am62a-main: Add eQEP nodes
      commit: 36370ccf93bd0bd2be0c529ef7c0b687988ad3c0
[3/5] arm64: dts: ti: k3-am62p-main: Add eQEP nodes
      commit: 0f4a318ee64c647e2cbf7d802b8d06b03aef31e5
[4/5] arm64: dts: ti: k3-am64-main: Add eQEP nodes
      commit: 78b918b58e4b13ad53373882b01945106d196ff9
[5/5] arm64: dts: ti: k3-am64x-sk: Enable eQEP
      commit: 25da98eb3997d21e128ab75d426923a0dc23c4e4

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Vignesh