002-0019-dt-bindings-pinctrl-mediatek-add-a-header-for-common.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. From 920ba7b9ba1787fd03dad7a5bdc894073936c197 Mon Sep 17 00:00:00 2001
  2. From: Weijie Gao <[email protected]>
  3. Date: Thu, 28 Jul 2022 09:37:26 +0800
  4. Subject: [PATCH 19/31] dt-bindings: pinctrl: mediatek: add a header for common
  5. pinconf parameters
  6. This patch adds a pinctrl header for common pinconf parameters such as
  7. pull-up/pull-down resistors and drive strengths.
  8. Reviewed-by: Simon Glass <[email protected]>
  9. Signed-off-by: Weijie Gao <[email protected]>
  10. ---
  11. include/dt-bindings/pinctrl/mt65xx.h | 41 ++++++++++++++++++++++++++++
  12. 1 file changed, 41 insertions(+)
  13. create mode 100644 include/dt-bindings/pinctrl/mt65xx.h
  14. --- /dev/null
  15. +++ b/include/dt-bindings/pinctrl/mt65xx.h
  16. @@ -0,0 +1,41 @@
  17. +/* SPDX-License-Identifier: GPL-2.0-only */
  18. +/*
  19. + * Copyright (c) 2022 MediaTek Inc.
  20. + * Author: Hongzhou.Yang <[email protected]>
  21. + */
  22. +
  23. +#ifndef _DT_BINDINGS_PINCTRL_MT65XX_H
  24. +#define _DT_BINDINGS_PINCTRL_MT65XX_H
  25. +
  26. +#define MTK_PIN_NO(x) ((x) << 8)
  27. +#define MTK_GET_PIN_NO(x) ((x) >> 8)
  28. +#define MTK_GET_PIN_FUNC(x) ((x) & 0xf)
  29. +
  30. +#define MTK_PUPD_SET_R1R0_00 100
  31. +#define MTK_PUPD_SET_R1R0_01 101
  32. +#define MTK_PUPD_SET_R1R0_10 102
  33. +#define MTK_PUPD_SET_R1R0_11 103
  34. +
  35. +#define MTK_PULL_SET_RSEL_000 200
  36. +#define MTK_PULL_SET_RSEL_001 201
  37. +#define MTK_PULL_SET_RSEL_010 202
  38. +#define MTK_PULL_SET_RSEL_011 203
  39. +#define MTK_PULL_SET_RSEL_100 204
  40. +#define MTK_PULL_SET_RSEL_101 205
  41. +#define MTK_PULL_SET_RSEL_110 206
  42. +#define MTK_PULL_SET_RSEL_111 207
  43. +
  44. +#define MTK_DRIVE_2mA 2
  45. +#define MTK_DRIVE_4mA 4
  46. +#define MTK_DRIVE_6mA 6
  47. +#define MTK_DRIVE_8mA 8
  48. +#define MTK_DRIVE_10mA 10
  49. +#define MTK_DRIVE_12mA 12
  50. +#define MTK_DRIVE_14mA 14
  51. +#define MTK_DRIVE_16mA 16
  52. +#define MTK_DRIVE_20mA 20
  53. +#define MTK_DRIVE_24mA 24
  54. +#define MTK_DRIVE_28mA 28
  55. +#define MTK_DRIVE_32mA 32
  56. +
  57. +#endif /* _DT_BINDINGS_PINCTRL_MT65XX_H */