2024-05-23 23:18:57

by Judith Mendez

[permalink] [raw]
Subject: [PATCH v2 0/8] 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.

Changes since v1:
- Add new compatible ti,am62-eqep
- Fix eqep binding for new compatible, require
power-domains for new compatible
- Fix eQEP DT node to use new ti,am62-eqep compatible

Judith Mendez (8):
counter/ti-eqep: Add new ti-am62-eqep compatible
dt-bindings: counter: Add new ti,am62-eqep compatible
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
counter: ti-eqep: Allow eQEP driver to be built for K3 devices
arm64: defconfig: Enable TI eQEP Driver

.../devicetree/bindings/counter/ti-eqep.yaml | 53 +++++++++++++++++--
arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 27 ++++++++++
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 27 ++++++++++
arch/arm64/boot/dts/ti/k3-am62p-main.dtsi | 27 ++++++++++
arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 27 ++++++++++
arch/arm64/configs/defconfig | 1 +
drivers/counter/Kconfig | 2 +-
drivers/counter/ti-eqep.c | 1 +
8 files changed, 159 insertions(+), 6 deletions(-)


base-commit: 534ad093bb80f19c20b251a89f09ce1a0e3d4f2d
--
2.45.1



2024-05-23 23:19:13

by Judith Mendez

[permalink] [raw]
Subject: [PATCH v2 8/8] 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]>
---
Changes since v1:
- No change
---
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.45.1


2024-05-23 23:19:24

by Judith Mendez

[permalink] [raw]
Subject: [PATCH v2 6/8] arm64: dts: ti: k3-am64-main: Add eQEP nodes

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

Signed-off-by: Judith Mendez <[email protected]>
---
Changes since v1:
- Fix eQEP DT node to use new ti,am62-eqep compatible
---
arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 27 ++++++++++++++++++++++++
1 file changed, 27 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
index 6f9aa5e02138f..6be710138dded 100644
--- a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
@@ -1171,6 +1171,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>;
--
2.45.1


2024-05-23 23:28:45

by Judith Mendez

[permalink] [raw]
Subject: [PATCH v2 7/8] 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]>
---
Changes since v1:
- No change
---
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.45.1


2024-05-24 06:00:41

by Nishanth Menon

[permalink] [raw]
Subject: Re: [PATCH v2 8/8] arm64: defconfig: Enable TI eQEP Driver

On 18:15-20240523, Judith Mendez wrote:
> TI K3 SoC's support eQEP hardware, so enable TI eQEP driver
> to be built as a module.

All the nodes seem to be only in disabled mode, is there even a single
board that is actually using this? if so, why isn't it enabled?

>
> Signed-off-by: Judith Mendez <[email protected]>
> ---
> Changes since v1:
> - No change
> ---
> 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.45.1
>

--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D

2024-05-24 14:14:50

by Judith Mendez

[permalink] [raw]
Subject: Re: [PATCH v2 8/8] arm64: defconfig: Enable TI eQEP Driver

Hi Nishanth,

On 5/24/24 12:59 AM, Nishanth Menon wrote:
> On 18:15-20240523, Judith Mendez wrote:
>> TI K3 SoC's support eQEP hardware, so enable TI eQEP driver
>> to be built as a module.
>
> All the nodes seem to be only in disabled mode, is there even a single
> board that is actually using this? if so, why isn't it enabled?

I will add pinmux and enable in the board level dts file.

~ Judith

>
>>
>> Signed-off-by: Judith Mendez <[email protected]>
>> ---
>> Changes since v1:
>> - No change
>> ---
>> 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.45.1
>>
>


2024-05-24 21:08:08

by David Lechner

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

On 5/23/24 6:15 PM, Judith Mendez wrote:
> 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]>
> ---
> Changes since v1:
> - No change
> ---

Reviewed-by: David Lechner <[email protected]>


2024-05-30 15:32:45

by Judith Mendez

[permalink] [raw]
Subject: Re: [PATCH v2 8/8] arm64: defconfig: Enable TI eQEP Driver

Hi Nishanth,

On 5/24/24 9:13 AM, Judith Mendez wrote:
> Hi Nishanth,
>
> On 5/24/24 12:59 AM, Nishanth Menon wrote:
>> On 18:15-20240523, Judith Mendez wrote:
>>> TI K3 SoC's support eQEP hardware, so enable TI eQEP driver
>>> to be built as a module.
>>
>> All the nodes seem to be only in disabled mode, is there even a single
>> board that is actually using this? if so, why isn't it enabled?
>
> I will add pinmux and enable in the board level dts file.

Question about the above... If I enable eQEP at the board level,
there will be pinmux conflicts. So, I could:
1. Leave eQEP disabled
2. Enable eQEP and disable main_uart1 at the board level dts file
3. Enable eQEP in an overlay and also disable main_uart1

Let me know which option works for you.

~ Judith

>
>>
>>>
>>> Signed-off-by: Judith Mendez <[email protected]>
>>> ---
>>> Changes since v1:
>>> - No change
>>> ---
>>>   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.45.1
>>>
>>
>
>