* [PATCH 1/3] ARM: dts: am33xx: Add nodes for eQEP
2020-10-12 21:12 [PATCH 0/3] Enable eQEP counter driver on BeagleBone Blue David Lechner
@ 2020-10-12 21:12 ` David Lechner
2020-10-12 21:12 ` [PATCH 2/3] ARM: dts: am335x-boneblue: Enable eQEP David Lechner
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: David Lechner @ 2020-10-12 21:12 UTC (permalink / raw)
To: linux-omap
Cc: David Lechner, Benoît Cousson, Tony Lindgren, Robert Nelson,
Drew Fustini, Rob Herring, devicetree, linux-kernel,
linux-arm-kernel
This adds new nodes for the Texas Instruments Enhanced Quadrature
Encoder Pulse (eQEP) module in the PWM subsystem on AM33XX.
Signed-off-by: David Lechner <david@lechnology.com>
---
arch/arm/boot/dts/am33xx-l4.dtsi | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/arch/arm/boot/dts/am33xx-l4.dtsi b/arch/arm/boot/dts/am33xx-l4.dtsi
index b88d0caa4b2d..17910268df82 100644
--- a/arch/arm/boot/dts/am33xx-l4.dtsi
+++ b/arch/arm/boot/dts/am33xx-l4.dtsi
@@ -1924,6 +1924,15 @@ ecap0: ecap@100 {
status = "disabled";
};
+ eqep0: counter@180 {
+ compatible = "ti,am3352-eqep";
+ reg = <0x180 0x80>;
+ clocks = <&l4ls_gclk>;
+ clock-names = "sysclkout";
+ interrupts = <79>;
+ status = "disabled";
+ };
+
ehrpwm0: pwm@200 {
compatible = "ti,am3352-ehrpwm",
"ti,am33xx-ehrpwm";
@@ -1976,6 +1985,15 @@ ecap1: ecap@100 {
status = "disabled";
};
+ eqep1: counter@180 {
+ compatible = "ti,am3352-eqep";
+ reg = <0x180 0x80>;
+ clocks = <&l4ls_gclk>;
+ clock-names = "sysclkout";
+ interrupts = <88>;
+ status = "disabled";
+ };
+
ehrpwm1: pwm@200 {
compatible = "ti,am3352-ehrpwm",
"ti,am33xx-ehrpwm";
@@ -2028,6 +2046,15 @@ ecap2: ecap@100 {
status = "disabled";
};
+ eqep2: counter@180 {
+ compatible = "ti,am3352-eqep";
+ reg = <0x180 0x80>;
+ clocks = <&l4ls_gclk>;
+ clock-names = "sysclkout";
+ interrupts = <89>;
+ status = "disabled";
+ };
+
ehrpwm2: pwm@200 {
compatible = "ti,am3352-ehrpwm",
"ti,am33xx-ehrpwm";
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] ARM: dts: am335x-boneblue: Enable eQEP
2020-10-12 21:12 [PATCH 0/3] Enable eQEP counter driver on BeagleBone Blue David Lechner
2020-10-12 21:12 ` [PATCH 1/3] ARM: dts: am33xx: Add nodes for eQEP David Lechner
@ 2020-10-12 21:12 ` David Lechner
2020-10-12 21:12 ` [PATCH 3/3] ARM: omap2plus_defconfig: Enable TI eQEP counter driver David Lechner
2020-11-16 11:36 ` [PATCH 0/3] Enable eQEP counter driver on BeagleBone Blue Tony Lindgren
3 siblings, 0 replies; 6+ messages in thread
From: David Lechner @ 2020-10-12 21:12 UTC (permalink / raw)
To: linux-omap
Cc: David Lechner, Benoît Cousson, Tony Lindgren, Robert Nelson,
Drew Fustini, Rob Herring, devicetree, linux-kernel,
linux-arm-kernel
This enables the Enhanced Quadrature Encoder Pulse (eQEP) module for
connectors E1, E2 and E3 on BeagleBone Blue.
Signed-off-by: David Lechner <david@lechnology.com>
---
arch/arm/boot/dts/am335x-boneblue.dts | 54 +++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/arch/arm/boot/dts/am335x-boneblue.dts b/arch/arm/boot/dts/am335x-boneblue.dts
index c696d57cf364..69acaf4ea0f3 100644
--- a/arch/arm/boot/dts/am335x-boneblue.dts
+++ b/arch/arm/boot/dts/am335x-boneblue.dts
@@ -241,6 +241,30 @@ AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_OUTPUT, MUX_MODE2) /* (E18) uart0_cts
AM33XX_PADCONF(AM335X_PIN_MII1_RXD0, PIN_OUTPUT, MUX_MODE7) /* (M16) gmii1_rxd0.gpio2[21] */
>;
};
+
+ /* E1 */
+ eqep0_pins: pinmux_eqep0_pins {
+ pinctrl-single,pins = <
+ AM33XX_PADCONF(AM335X_PIN_MCASP0_AXR0, PIN_INPUT, MUX_MODE1) /* (B12) mcasp0_aclkr.eQEP0A_in */
+ AM33XX_PADCONF(AM335X_PIN_MCASP0_FSR, PIN_INPUT, MUX_MODE1) /* (C13) mcasp0_fsr.eQEP0B_in */
+ >;
+ };
+
+ /* E2 */
+ eqep1_pins: pinmux_eqep1_pins {
+ pinctrl-single,pins = <
+ AM33XX_PADCONF(AM335X_PIN_LCD_DATA12, PIN_INPUT, MUX_MODE2) /* (V2) lcd_data12.eQEP1A_in */
+ AM33XX_PADCONF(AM335X_PIN_LCD_DATA13, PIN_INPUT, MUX_MODE2) /* (V3) lcd_data13.eQEP1B_in */
+ >;
+ };
+
+ /* E3 */
+ eqep2_pins: pinmux_eqep2_pins {
+ pinctrl-single,pins = <
+ AM33XX_PADCONF(AM335X_PIN_GPMC_AD12, PIN_INPUT, MUX_MODE4) /* (T12) gpmc_ad12.eQEP2A_in */
+ AM33XX_PADCONF(AM335X_PIN_GPMC_AD13, PIN_INPUT, MUX_MODE4) /* (R12) gpmc_ad13.eQEP2B_in */
+ >;
+ };
};
&uart0 {
@@ -419,3 +443,33 @@ ls_buf_en {
line-name = "LS_BUF_EN";
};
};
+
+&epwmss0 {
+ status = "okay";
+};
+
+&eqep0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&eqep0_pins>;
+ status = "okay";
+};
+
+&epwmss1 {
+ status = "okay";
+};
+
+&eqep1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&eqep1_pins>;
+ status = "okay";
+};
+
+&epwmss2 {
+ status = "okay";
+};
+
+&eqep2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&eqep2_pins>;
+ status = "okay";
+};
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] ARM: omap2plus_defconfig: Enable TI eQEP counter driver
2020-10-12 21:12 [PATCH 0/3] Enable eQEP counter driver on BeagleBone Blue David Lechner
2020-10-12 21:12 ` [PATCH 1/3] ARM: dts: am33xx: Add nodes for eQEP David Lechner
2020-10-12 21:12 ` [PATCH 2/3] ARM: dts: am335x-boneblue: Enable eQEP David Lechner
@ 2020-10-12 21:12 ` David Lechner
2020-11-16 11:36 ` [PATCH 0/3] Enable eQEP counter driver on BeagleBone Blue Tony Lindgren
3 siblings, 0 replies; 6+ messages in thread
From: David Lechner @ 2020-10-12 21:12 UTC (permalink / raw)
To: linux-omap
Cc: David Lechner, Benoît Cousson, Tony Lindgren, Robert Nelson,
Drew Fustini, Rob Herring, devicetree, linux-kernel,
linux-arm-kernel
This enables the TI eQEP counter driver that is used by BeagleBone Blue.
Signed-off-by: David Lechner <david@lechnology.com>
---
arch/arm/configs/omap2plus_defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index fe383f5a92fb..71b1a8f4c241 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -524,6 +524,8 @@ CONFIG_PHY_DM816X_USB=m
CONFIG_OMAP_USB2=m
CONFIG_TI_PIPE3=y
CONFIG_TWL4030_USB=m
+CONFIG_COUNTER=m
+CONFIG_TI_EQEP=m
CONFIG_EXT2_FS=y
CONFIG_EXT3_FS=y
CONFIG_EXT4_FS_SECURITY=y
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] Enable eQEP counter driver on BeagleBone Blue
2020-10-12 21:12 [PATCH 0/3] Enable eQEP counter driver on BeagleBone Blue David Lechner
` (2 preceding siblings ...)
2020-10-12 21:12 ` [PATCH 3/3] ARM: omap2plus_defconfig: Enable TI eQEP counter driver David Lechner
@ 2020-11-16 11:36 ` Tony Lindgren
2020-11-16 14:27 ` David Lechner
3 siblings, 1 reply; 6+ messages in thread
From: Tony Lindgren @ 2020-11-16 11:36 UTC (permalink / raw)
To: David Lechner
Cc: linux-omap, Benoît Cousson, Robert Nelson, Drew Fustini,
Rob Herring, devicetree, linux-kernel, linux-arm-kernel
* David Lechner <david@lechnology.com> [201013 00:13]:
> This series adds device tree nodes for the eQEP portion of the PWMSS on AM33xx
> and enables it on BeagleBone Blue.
>
> I actually submitted these a year ago, but it looks like these patches never got
> applied with the actual eQEP driver when it was merged.
Sorry if I dropped these earlier, I guess I though you're reposting the
series and untagged them.
> For reference, there was some previous discussion about the clocks in "ARM: dts:
> am33xx: Add nodes for eQEP". [1]
>
> [1]: https://lore.kernel.org/linux-omap/20190723145100.GS5447@atomide.com/
>
> I have also included a new patch to enable the eQEP driver in the defconfig.
Great, thanks applying these into omap-for-v5.11/dt and defconfig branches.
Regards,
Tony
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] Enable eQEP counter driver on BeagleBone Blue
2020-11-16 11:36 ` [PATCH 0/3] Enable eQEP counter driver on BeagleBone Blue Tony Lindgren
@ 2020-11-16 14:27 ` David Lechner
0 siblings, 0 replies; 6+ messages in thread
From: David Lechner @ 2020-11-16 14:27 UTC (permalink / raw)
To: Tony Lindgren
Cc: linux-omap, Benoît Cousson, Robert Nelson, Drew Fustini,
Rob Herring, devicetree, linux-kernel, linux-arm-kernel
On 11/16/20 5:36 AM, Tony Lindgren wrote:
> * David Lechner <david@lechnology.com> [201013 00:13]:
>> This series adds device tree nodes for the eQEP portion of the PWMSS on AM33xx
>> and enables it on BeagleBone Blue.
>>
>> I actually submitted these a year ago, but it looks like these patches never got
>> applied with the actual eQEP driver when it was merged.
>
> Sorry if I dropped these earlier, I guess I though you're reposting the
> series and untagged them.
No worries, I forgot about them too. :-)
>
>> For reference, there was some previous discussion about the clocks in "ARM: dts:
>> am33xx: Add nodes for eQEP". [1]
>>
>> [1]: https://lore.kernel.org/linux-omap/20190723145100.GS5447@atomide.com/
>>
>> I have also included a new patch to enable the eQEP driver in the defconfig.
>
> Great, thanks applying these into omap-for-v5.11/dt and defconfig branches.
>
> Regards,
>
> Tony
>
^ permalink raw reply [flat|nested] 6+ messages in thread