202-dt-sun5i-add-mmc-nodes.patch 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. From 7afa5fb704679e84c59e5ad25bbdf7605844c5ca Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?David=20Lanzend=C3=B6rfer?= <david.lanzendoerfer@o2s.ch>
  3. Date: Sat, 15 Feb 2014 14:02:29 +0100
  4. Subject: [PATCH] ARM: dts: sun5i: Add support for mmc
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Signed-off-by: David Lanzendörfer <david.lanzendoerfer@o2s.ch>
  9. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  10. ---
  11. arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 30 +++++++++++++++
  12. arch/arm/boot/dts/sun5i-a10s.dtsi | 47 ++++++++++++++++++++++++
  13. arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts | 15 ++++++++
  14. arch/arm/boot/dts/sun5i-a13-olinuxino.dts | 15 ++++++++
  15. arch/arm/boot/dts/sun5i-a13.dtsi | 29 +++++++++++++++
  16. 5 files changed, 136 insertions(+)
  17. --- a/arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts
  18. +++ b/arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts
  19. @@ -21,6 +21,14 @@
  20. compatible = "olimex,a13-olinuxino-micro", "allwinner,sun5i-a13";
  21. soc@01c00000 {
  22. + mmc0: mmc@01c0f000 {
  23. + pinctrl-names = "default", "default";
  24. + pinctrl-0 = <&mmc0_pins_a>;
  25. + pinctrl-1 = <&mmc0_cd_pin_olinuxinom>;
  26. + cd-gpios = <&pio 6 0 0>; /* PG0 */
  27. + status = "okay";
  28. + };
  29. +
  30. usbphy: phy@01c13400 {
  31. usb1_vbus-supply = <&reg_usb1_vbus>;
  32. status = "okay";
  33. @@ -35,6 +43,13 @@
  34. };
  35. pinctrl@01c20800 {
  36. + mmc0_cd_pin_olinuxinom: mmc0_cd_pin@0 {
  37. + allwinner,pins = "PG0";
  38. + allwinner,function = "gpio_in";
  39. + allwinner,drive = <0>;
  40. + allwinner,pull = <1>;
  41. + };
  42. +
  43. led_pins_olinuxinom: led_pins@0 {
  44. allwinner,pins = "PG9";
  45. allwinner,function = "gpio_out";
  46. --- a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
  47. +++ b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
  48. @@ -21,6 +21,14 @@
  49. compatible = "olimex,a13-olinuxino", "allwinner,sun5i-a13";
  50. soc@01c00000 {
  51. + mmc0: mmc@01c0f000 {
  52. + pinctrl-names = "default", "default";
  53. + pinctrl-0 = <&mmc0_pins_a>;
  54. + pinctrl-1 = <&mmc0_cd_pin_olinuxino>;
  55. + cd-gpios = <&pio 6 0 0>; /* PG0 */
  56. + status = "okay";
  57. + };
  58. +
  59. usbphy: phy@01c13400 {
  60. usb1_vbus-supply = <&reg_usb1_vbus>;
  61. status = "okay";
  62. @@ -35,6 +43,13 @@
  63. };
  64. pinctrl@01c20800 {
  65. + mmc0_cd_pin_olinuxino: mmc0_cd_pin@0 {
  66. + allwinner,pins = "PG0";
  67. + allwinner,function = "gpio_in";
  68. + allwinner,drive = <0>;
  69. + allwinner,pull = <1>;
  70. + };
  71. +
  72. led_pins_olinuxino: led_pins@0 {
  73. allwinner,pins = "PG9";
  74. allwinner,function = "gpio_out";
  75. --- a/arch/arm/boot/dts/sun5i-a13.dtsi
  76. +++ b/arch/arm/boot/dts/sun5i-a13.dtsi
  77. @@ -320,6 +320,28 @@
  78. #size-cells = <0>;
  79. };
  80. + mmc0: mmc@01c0f000 {
  81. + compatible = "allwinner,sun5i-a13-mmc";
  82. + reg = <0x01c0f000 0x1000>;
  83. + clocks = <&ahb_gates 8>, <&mmc0_clk>;
  84. + clock-names = "ahb", "mod";
  85. + interrupts = <32>;
  86. + bus-width = <4>;
  87. + cd-inverted;
  88. + status = "disabled";
  89. + };
  90. +
  91. + mmc2: mmc@01c11000 {
  92. + compatible = "allwinner,sun5i-a13-mmc";
  93. + reg = <0x01c11000 0x1000>;
  94. + clocks = <&ahb_gates 10>, <&mmc2_clk>;
  95. + clock-names = "ahb", "mod";
  96. + interrupts = <34>;
  97. + bus-width = <4>;
  98. + cd-inverted;
  99. + status = "disabled";
  100. + };
  101. +
  102. usbphy: phy@01c13400 {
  103. #phy-cells = <1>;
  104. compatible = "allwinner,sun5i-a13-usb-phy";
  105. @@ -415,6 +437,13 @@
  106. allwinner,drive = <0>;
  107. allwinner,pull = <0>;
  108. };
  109. +
  110. + mmc0_pins_a: mmc0@0 {
  111. + allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5";
  112. + allwinner,function = "mmc0";
  113. + allwinner,drive = <2>;
  114. + allwinner,pull = <0>;
  115. + };
  116. };
  117. timer@01c20c00 {