Skip to contentSkip to conversation

arm64: dts: ti: k3-pinctrl: Introduce debounce select mux macros

PATCH Applied Nishanth Menon 2 participants 3 messages Jun 19, 2023 – Aug 2, 2023

Subsystems (2)
lore
Share & tools
lore

Nishanth Menon

author maintainer
#0 lore raw

PATCH v2 1/1 arm64: dts: ti: k3-pinctrl: Introduce debounce select mux macros

Introduce the debounce select mux macros to allow folks to setup debounce configuration for pins. Each configuration selected maps to a specific timing register as documented in appropriate Technical Reference Manual (example:[1]).

[1] AM625x TRM (section 6.1.2.2): https://www.ti.com/lit/pdf/spruiv7

---
Changes since V1:
- I have'nt picked up Krystoff's ack since the file modified is now different.
- Changes now applied to k3-pinctrl.h instead of the ABI header that is now set up to be deleted in v6.5-rc1.

V1: https://lore.kernel.org/linux-devicetree/[email protected]/

 arch/arm64/boot/dts/ti/k3-pinctrl.h | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/ti/k3-pinctrl.h +9 -0
index c97548a3f42d..6004e0967ec5 100644
@@ -11,6 +11,7 @@
 #define PULLUDEN_SHIFT		(16)
 #define PULLTYPESEL_SHIFT	(17)
 #define RXACTIVE_SHIFT		(18)
+#define DEBOUNCE_SHIFT		(11)
 
 #define PULL_DISABLE		(1 << PULLUDEN_SHIFT)
 #define PULL_ENABLE		(0 << PULLUDEN_SHIFT)
@@ -29,6 +30,14 @@
 #define PIN_INPUT_PULLUP	(INPUT_EN | PULL_UP)
 #define PIN_INPUT_PULLDOWN	(INPUT_EN | PULL_DOWN)
 
+#define PIN_DEBOUNCE_DISABLE	(0 << DEBOUNCE_SHIFT)
+#define PIN_DEBOUNCE_CONF1	(1 << DEBOUNCE_SHIFT)
+#define PIN_DEBOUNCE_CONF2	(2 << DEBOUNCE_SHIFT)
+#define PIN_DEBOUNCE_CONF3	(3 << DEBOUNCE_SHIFT)
+#define PIN_DEBOUNCE_CONF4	(4 << DEBOUNCE_SHIFT)
+#define PIN_DEBOUNCE_CONF5	(5 << DEBOUNCE_SHIFT)
+#define PIN_DEBOUNCE_CONF6	(6 << DEBOUNCE_SHIFT)
+
 #define AM62AX_IOPAD(pa, val, muxmode)		(((pa) & 0x1fff)) ((val) | (muxmode))
 #define AM62AX_MCU_IOPAD(pa, val, muxmode)	(((pa) & 0x1fff)) ((val) | (muxmode))
 
Signature · 7 lines
2.40.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Reviewed-by on v2 1/1
#1 lore raw
Quoted 14 lines · Nishanth Menon

Introduce the debounce select mux macros to allow folks to setup debounce configuration for pins. Each configuration selected maps to a specific timing register as documented in appropriate Technical Reference Manual (example:[1]).

[1] AM625x TRM (section 6.1.2.2): https://www.ti.com/lit/pdf/spruiv7

---
Changes since V1:
- I have'nt picked up Krystoff's ack since the file modified is now different.
- Changes now applied to k3-pinctrl.h instead of the ABI header that is now set up to be deleted in v6.5-rc1.

Quoted 5 lines

V1: https://lore.kernel.org/linux-devicetree/[email protected]/

 arch/arm64/boot/dts/ti/k3-pinctrl.h | 9 +++++++++
 1 file changed, 9 insertions(+)
Quoted 27 lines
arch/arm64/boot/dts/ti/k3-pinctrl.h +9 -0
index c97548a3f42d..6004e0967ec5 100644
@@ -11,6 +11,7 @@
 #define PULLUDEN_SHIFT		(16)
 #define PULLTYPESEL_SHIFT	(17)
 #define RXACTIVE_SHIFT		(18)
+#define DEBOUNCE_SHIFT		(11)
 
 #define PULL_DISABLE		(1 << PULLUDEN_SHIFT)
 #define PULL_ENABLE		(0 << PULLUDEN_SHIFT)
@@ -29,6 +30,14 @@
 #define PIN_INPUT_PULLUP	(INPUT_EN | PULL_UP)
 #define PIN_INPUT_PULLDOWN	(INPUT_EN | PULL_DOWN)
 
+#define PIN_DEBOUNCE_DISABLE	(0 << DEBOUNCE_SHIFT)
+#define PIN_DEBOUNCE_CONF1	(1 << DEBOUNCE_SHIFT)
+#define PIN_DEBOUNCE_CONF2	(2 << DEBOUNCE_SHIFT)
+#define PIN_DEBOUNCE_CONF3	(3 << DEBOUNCE_SHIFT)
+#define PIN_DEBOUNCE_CONF4	(4 << DEBOUNCE_SHIFT)
+#define PIN_DEBOUNCE_CONF5	(5 << DEBOUNCE_SHIFT)
+#define PIN_DEBOUNCE_CONF6	(6 << DEBOUNCE_SHIFT)
+
 #define AM62AX_IOPAD(pa, val, muxmode)		(((pa) & 0x1fff)) ((val) | (muxmode))
 #define AM62AX_MCU_IOPAD(pa, val, muxmode)	(((pa) & 0x1fff)) ((val) | (muxmode))
 
Signature · 2 lines
Regards
Vignesh
author maintainer Applied
#2 lore raw
In reply to Nishanth Menon

Hi Nishanth Menon,

Quoted 8 lines · Nishanth Menon

Introduce the debounce select mux macros to allow folks to setup debounce configuration for pins. Each configuration selected maps to a specific timing register as documented in appropriate Technical Reference Manual (example:[1]).

[1] AM625x TRM (section 6.1.2.2): https://www.ti.com/lit/pdf/spruiv7

[...]

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

[1/1] arm64: dts: ti: k3-pinctrl: Introduce debounce select mux macros

      commit: 0bec3d7ecc7493b0e530f6f34539841ef6779006

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

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