tests-interrupts.dtsi 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. // SPDX-License-Identifier: GPL-2.0
  2. / {
  3. testcase-data {
  4. interrupts {
  5. #address-cells = <1>;
  6. #size-cells = <1>;
  7. test_intc0: intc0 {
  8. interrupt-controller;
  9. #interrupt-cells = <1>;
  10. };
  11. test_intc1: intc1 {
  12. interrupt-controller;
  13. #interrupt-cells = <3>;
  14. };
  15. test_intc2: intc2 {
  16. interrupt-controller;
  17. #interrupt-cells = <2>;
  18. };
  19. test_intmap0: intmap0 {
  20. #interrupt-cells = <1>;
  21. #address-cells = <0>;
  22. interrupt-map = <1 &test_intc0 9>,
  23. <2 &test_intc1 10 11 12>,
  24. <3 &test_intc2 13 14>,
  25. <4 &test_intc2 15 16>;
  26. };
  27. test_intmap1: intmap1 {
  28. #interrupt-cells = <2>;
  29. /*
  30. * #address-cells is required
  31. *
  32. * The property is not provided in this node to
  33. * test that the code will properly handle
  34. * this case for legacy .dts files.
  35. *
  36. * Not having #address-cells will result in a
  37. * warning from dtc starting with
  38. * version v1.6.1-19-g0a3a9d3449c8
  39. * The warning is suppressed by adding
  40. * -Wno-interrupt_map to the Makefile for all
  41. * .dts files this include this .dtsi
  42. #address-cells = <1>;
  43. */
  44. interrupt-map = <0x5000 1 2 &test_intc0 15>;
  45. };
  46. interrupts0 {
  47. interrupt-parent = <&test_intc0>;
  48. interrupts = <1>, <2>, <3>, <4>;
  49. };
  50. interrupts1 {
  51. interrupt-parent = <&test_intmap0>;
  52. interrupts = <1>, <2>, <3>, <4>;
  53. };
  54. interrupts-extended0 {
  55. reg = <0x5000 0x100>;
  56. /*
  57. * Do not remove &test_intmap1 from this
  58. * property - see comment in node intmap1
  59. */
  60. interrupts-extended = <&test_intc0 1>,
  61. <&test_intc1 2 3 4>,
  62. <&test_intc2 5 6>,
  63. <&test_intmap0 1>,
  64. <&test_intmap0 2>,
  65. <&test_intmap0 3>,
  66. <&test_intmap1 1 2>;
  67. };
  68. };
  69. testcase-device1 {
  70. compatible = "testcase-device";
  71. interrupt-parent = <&test_intc0>;
  72. interrupts = <1>;
  73. };
  74. /*
  75. * testcase data that intentionally results in an error is
  76. * located in testcases.dts instead of in this file so that the
  77. * static overlay apply tests will not include the error.
  78. */
  79. };
  80. };