gpio-smp2p.txt 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. Qualcomm SMSM Point-to-Point (SMP2P) GPIO Driver
  2. Used to map an SMP2P entry and remote processor ID to a virtual GPIO controller
  3. and virtual interrupt controller.
  4. Required properties:
  5. -compatible : should be "qcom,smp2pgpio";
  6. -qcom,entry-name : name of the SMP2P entry
  7. -qcom,remote-pid : the SMP2P remote processor ID (see smp2p_private_api.h)
  8. -gpio-controller : specifies that this is a GPIO controller
  9. -#gpio-cells : number of GPIO cells (should always be <2>)
  10. -interrupt-controller : specifies that this is an interrupt controller
  11. -#interrupt-cells : number of interrupt cells (should always be <2>)
  12. Optional properties:
  13. -qcom,is-inbound : specifies that this is an inbound entry (default is outbound)
  14. Comments:
  15. All device tree entries must be unique. Therefore to prevent naming collisions
  16. between clients, it is recommended that the DT nodes should be named using the
  17. format:
  18. smp2pgpio_<ENTRY_NAME>_<REMOTE PID>_<in|out>
  19. Example:
  20. /* Maps inbound "smp2p" entry on remote PID 7 to GPIO controller. */
  21. smp2pgpio_smp2p_7_in: qcom,smp2pgpio-smp2p-7-in {
  22. compatible = "qcom,smp2pgpio";
  23. qcom,entry-name = "smp2p";
  24. qcom,remote-pid = <7>;
  25. qcom,is-inbound;
  26. gpio-controller;
  27. #gpio-cells = <2>;
  28. interrupt-controller;
  29. #interrupt-cells = <2>;
  30. };
  31. /*
  32. * Maps inbound "smp2p" entry on remote PID 7 to client driver
  33. * "qcom,smp2pgpio_test_smp2p_7_in".
  34. *
  35. * Note: If all 32-pins are used by this client, then you
  36. * can just list pin 0 here as a shortcut.
  37. */
  38. qcom,smp2pgpio_test_smp2p_7_in {
  39. compatible = "qcom,smp2pgpio_test_smp2p_7_in";
  40. gpios = <&smp2pgpio_smp2p_7_in 0 0>, /* pin 0 */
  41. <&smp2pgpio_smp2p_7_in 1 0>,
  42. . . .
  43. <&smp2pgpio_smp2p_7_in 31 0>; /* pin 31 */
  44. };
  45. /* Maps outbound "smp2p" entry on remote PID 7 to GPIO controller. */
  46. smp2pgpio_smp2p_7_out: qcom,smp2pgpio-smp2p-7-out {
  47. compatible = "qcom,smp2pgpio";
  48. qcom,entry-name = "smp2p";
  49. qcom,remote-pid = <7>;
  50. gpio-controller;
  51. #gpio-cells = <2>;
  52. interrupt-controller;
  53. #interrupt-cells = <2>;
  54. };
  55. /*
  56. * Maps outbound "smp2p" entry on remote PID 7 to client driver
  57. * "qcom,smp2pgpio_test_smp2p_7_out".
  58. *
  59. * Note: If all 32-pins are used by this client, then you
  60. * can just list pin 0 here as a shortcut.
  61. */
  62. qcom,smp2pgpio_test_smp2p_7_out {
  63. compatible = "qcom,smp2pgpio_test_smp2p_7_out";
  64. gpios = <&smp2pgpio_smp2p_7_out 0 0>, /* pin 0 */
  65. <&smp2pgpio_smp2p_7_out 1 0>,
  66. . . .
  67. <&smp2pgpio_smp2p_7_out 31 0>; /* pin 31 */
  68. };