dt-bindings: pinctrl: k3: Introduce debounce select mux macros
Subsystems (3)
PATCH 1/1 dt-bindings: pinctrl: k3: 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
--- include/dt-bindings/pinctrl/k3.h | 9 +++++++++ 1 file changed, 9 insertions(+)
include/dt-bindings/pinctrl/k3.h +9 -0
@@ -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 · 1 line
2.31.1
Quoted 11 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
Signed-off-by Nishanth Menon <[email protected]>--- include/dt-bindings/pinctrl/k3.h | 9 +++++++++ 1 file changed, 9 insertions(+)
So these are register values? You should consider moving them out of bindings, like we do for some other platforms.
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 7 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
Signed-off-by Nishanth Menon <[email protected]>
Patch applied.
Consider doing what Krzysztof recommends: move thes <dt-bindings/*.h> down to the arch where you're using it and have them as .dtsi files instead or something.
Yours,
Linus Walleij
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 7 lines · Linus Walleij
Quoted 5 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]).
Quoted 8 lines
Quoted 2 lines
[1] AM625x TRM (section 6.1.2.2): https://www.ti.com/lit/pdf/spruiv7
Signed-off-by Nishanth Menon <[email protected]>Patch applied.
Consider doing what Krzysztof recommends: move thes <dt-bindings/*.h> down to the arch where you're using it and have them as .dtsi files instead or something.
Yep, that sounds like a better idea. If you are ok to drop this patch, then lets do the cleanup first and move the pinctrl to something like arch/arm64/boot/dts/ti/k3-pinctrl.h
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Quoted 13 lines · Nishanth Menon
Quoted 12 lines · Linus Walleij
Quoted 7 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
Signed-off-by Nishanth Menon <[email protected]>Patch applied.
Quoted 7 lines
Quoted 3 lines
Consider doing what Krzysztof recommends: move thes <dt-bindings/*.h> down to the arch where you're using it and have them as .dtsi files instead or something.
Yep, that sounds like a better idea. If you are ok to drop this patch, then lets do the cleanup first and move the pinctrl to something like
arch/arm64/boot/dts/ti/k3-pinctrl.h
OK let's proceed like that, I dropped it!
Yours,
Linus Walleij
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel