2024-04-18 22:15:50

by Judith Mendez

[permalink] [raw]
Subject: [PATCH 0/7] Enable eQEP DT support for Sitara K3 platforms

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

Also enable eQEP to be built as a module for ARCH_k3.

Judith Mendez (7):
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
dt-bindings: counter: Update TI eQEP binding
counter: ti-eqep: Allow eQEP driver to be built for K3 devices
arm64: defconfig: Enable TI eQEP Driver

.../devicetree/bindings/counter/ti-eqep.yaml | 10 +++++--
arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 30 +++++++++++++++++++
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 30 +++++++++++++++++++
arch/arm64/boot/dts/ti/k3-am62p-main.dtsi | 30 +++++++++++++++++++
arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 30 +++++++++++++++++++
arch/arm64/configs/defconfig | 1 +
drivers/counter/Kconfig | 2 +-
7 files changed, 129 insertions(+), 4 deletions(-)


base-commit: 534ad093bb80f19c20b251a89f09ce1a0e3d4f2d
--
2.43.2



2024-04-18 22:15:50

by Judith Mendez

[permalink] [raw]
Subject: [PATCH 6/7] counter: ti-eqep: Allow eQEP driver to be built for K3 devices

TI K3 SoC's support eQEP hardware, so add ARCH_K3 to the depends
so the TI eQEP driver can be built for K3 devices.

Signed-off-by: Judith Mendez <[email protected]>
---
drivers/counter/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/counter/Kconfig b/drivers/counter/Kconfig
index 497bc05dca4df..d30d22dfe5774 100644
--- a/drivers/counter/Kconfig
+++ b/drivers/counter/Kconfig
@@ -138,7 +138,7 @@ config TI_ECAP_CAPTURE

config TI_EQEP
tristate "TI eQEP counter driver"
- depends on (SOC_AM33XX || COMPILE_TEST)
+ depends on SOC_AM33XX || ARCH_K3 || COMPILE_TEST
select REGMAP_MMIO
help
Select this option to enable the Texas Instruments Enhanced Quadrature
--
2.43.2


2024-04-18 22:16:33

by Judith Mendez

[permalink] [raw]
Subject: [PATCH 2/7] arm64: dts: ti: k3-am62a-main: Add eQEP nodes

Add eQEP DT nodes 0-2 for AM62A7 SoC.

Since external hardware was needed to test eQEP, the DT nodes
for eQEP were not included in the introductory commit. Now that
eQEP has been validated, add nodes to k3-am62a-main.dtsi.

Fixes: 5fc6b1b62639 ("arm64: dts: ti: Introduce AM62A7 family of SoCs")
Signed-off-by: Judith Mendez <[email protected]>
---
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 30 +++++++++++++++++++++++
1 file changed, 30 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
index aa1e057082f08..5b06cdf1c3436 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
@@ -905,6 +905,36 @@ ecap2: pwm@23120000 {
status = "disabled";
};

+ eqep0: counter@23200000 {
+ compatible = "ti,am3352-eqep";
+ reg = <0x00 0x23200000 0x00 0x100>;
+ power-domains = <&k3_pds 59 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 59 0>;
+ clock-names = "fck";
+ interrupts = <GIC_SPI 116 IRQ_TYPE_EDGE_RISING>;
+ status = "disabled";
+ };
+
+ eqep1: counter@23210000 {
+ compatible = "ti,am3352-eqep";
+ reg = <0x00 0x23210000 0x00 0x100>;
+ power-domains = <&k3_pds 60 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 60 0>;
+ clock-names = "fck";
+ interrupts = <GIC_SPI 117 IRQ_TYPE_EDGE_RISING>;
+ status = "disabled";
+ };
+
+ eqep2: counter@23220000 {
+ compatible = "ti,am3352-eqep";
+ reg = <0x00 0x23220000 0x00 0x100>;
+ power-domains = <&k3_pds 62 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 62 0>;
+ clock-names = "fck";
+ interrupts = <GIC_SPI 118 IRQ_TYPE_EDGE_RISING>;
+ status = "disabled";
+ };
+
mcasp0: audio-controller@2b00000 {
compatible = "ti,am33xx-mcasp-audio";
reg = <0x00 0x02b00000 0x00 0x2000>,
--
2.43.2


2024-04-18 22:16:33

by Judith Mendez

[permalink] [raw]
Subject: [PATCH 3/7] arm64: dts: ti: k3-am62p-main: Add eQEP nodes

Add eQEP DT nodes 0-2 for AM62P5 SoC.

Since external hardware was needed to test eQEP, the DT nodes
for eQEP were not included in the introductory commit. Now that
eQEP has been validated, add nodes to k3-am62p-main.dtsi.

Fixes: 29075cc09f43 ("arm64: dts: ti: Introduce AM62P5 family of SoCs")
Signed-off-by: Judith Mendez <[email protected]>
---
arch/arm64/boot/dts/ti/k3-am62p-main.dtsi | 30 +++++++++++++++++++++++
1 file changed, 30 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi
index 88bc64111234b..22f02b5bc8d4f 100644
--- a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi
@@ -805,6 +805,36 @@ ecap2: pwm@23120000 {
status = "disabled";
};

+ eqep0: counter@23200000 {
+ compatible = "ti,am3352-eqep";
+ reg = <0x00 0x23200000 0x00 0x100>;
+ power-domains = <&k3_pds 59 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 59 0>;
+ clock-names = "fck";
+ interrupts = <GIC_SPI 116 IRQ_TYPE_EDGE_RISING>;
+ status = "disabled";
+ };
+
+ eqep1: counter@23210000 {
+ compatible = "ti,am3352-eqep";
+ reg = <0x00 0x23210000 0x00 0x100>;
+ power-domains = <&k3_pds 60 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 60 0>;
+ clock-names = "fck";
+ interrupts = <GIC_SPI 117 IRQ_TYPE_EDGE_RISING>;
+ status = "disabled";
+ };
+
+ eqep2: counter@23220000 {
+ compatible = "ti,am3352-eqep";
+ reg = <0x00 0x23220000 0x00 0x100>;
+ power-domains = <&k3_pds 62 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 62 0>;
+ clock-names = "fck";
+ interrupts = <GIC_SPI 118 IRQ_TYPE_EDGE_RISING>;
+ status = "disabled";
+ };
+
main_mcan0: can@20701000 {
compatible = "bosch,m_can";
reg = <0x00 0x20701000 0x00 0x200>,
--
2.43.2


2024-04-18 22:16:58

by Judith Mendez

[permalink] [raw]
Subject: [PATCH 7/7] arm64: defconfig: Enable TI eQEP Driver

TI K3 SoC's support eQEP hardware, so enable TI eQEP driver
to be built as a module.

Signed-off-by: Judith Mendez <[email protected]>
---
arch/arm64/configs/defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 2c30d617e1802..23d11a1b20195 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -1593,6 +1593,7 @@ CONFIG_INTERCONNECT_QCOM_SM8550=y
CONFIG_INTERCONNECT_QCOM_SM8650=y
CONFIG_INTERCONNECT_QCOM_X1E80100=y
CONFIG_COUNTER=m
+CONFIG_TI_EQEP=m
CONFIG_RZ_MTU3_CNT=m
CONFIG_HTE=y
CONFIG_HTE_TEGRA194=y
--
2.43.2