080-arm64-allwinner-a64-add-SPI-nodes.patch 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. From b518bb159032aac33503fd4cf98706dc84cc1266 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
  3. Date: Thu, 31 Aug 2017 01:06:37 +0200
  4. Subject: [PATCH] arm64: allwinner: a64: add SPI nodes
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. The A64 SPI controllers are register compatible to the h3/h5 SPI
  9. controllers.
  10. The A64 has two SPI controllers, each with a single chip select.
  11. The handles for the DMA channels (23/24 for SPI0/SPI1) are omitted,
  12. as the A64 DMA support is currently missing.
  13. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
  14. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
  15. ---
  16. arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 41 +++++++++++++++++++
  17. 1 file changed, 41 insertions(+)
  18. --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
  19. +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
  20. @@ -326,6 +326,16 @@
  21. drive-strength = <40>;
  22. };
  23. + spi0_pins: spi0 {
  24. + pins = "PC0", "PC1", "PC2", "PC3";
  25. + function = "spi0";
  26. + };
  27. +
  28. + spi1_pins: spi1 {
  29. + pins = "PD0", "PD1", "PD2", "PD3";
  30. + function = "spi1";
  31. + };
  32. +
  33. uart0_pins_a: uart0@0 {
  34. pins = "PB8", "PB9";
  35. function = "uart0";
  36. @@ -471,6 +481,37 @@
  37. };
  38. };
  39. +
  40. + spi0: spi@01c68000 {
  41. + compatible = "allwinner,sun8i-h3-spi";
  42. + reg = <0x01c68000 0x1000>;
  43. + interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
  44. + clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_SPI0>;
  45. + clock-names = "ahb", "mod";
  46. + pinctrl-names = "default";
  47. + pinctrl-0 = <&spi0_pins>;
  48. + resets = <&ccu RST_BUS_SPI0>;
  49. + status = "disabled";
  50. + num-cs = <1>;
  51. + #address-cells = <1>;
  52. + #size-cells = <0>;
  53. + };
  54. +
  55. + spi1: spi@01c69000 {
  56. + compatible = "allwinner,sun8i-h3-spi";
  57. + reg = <0x01c69000 0x1000>;
  58. + interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
  59. + clocks = <&ccu CLK_BUS_SPI1>, <&ccu CLK_SPI1>;
  60. + clock-names = "ahb", "mod";
  61. + pinctrl-names = "default";
  62. + pinctrl-0 = <&spi1_pins>;
  63. + resets = <&ccu RST_BUS_SPI1>;
  64. + status = "disabled";
  65. + num-cs = <1>;
  66. + #address-cells = <1>;
  67. + #size-cells = <0>;
  68. + };
  69. +
  70. gic: interrupt-controller@1c81000 {
  71. compatible = "arm,gic-400";
  72. reg = <0x01c81000 0x1000>,