141-dt-sunxi-add-common-regulator-include.patch 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. From 6e763a8ebe7a16ae5635ade146fd2930749ed775 Mon Sep 17 00:00:00 2001
  2. From: Hans de Goede <hdegoede@redhat.com>
  3. Date: Sat, 1 Mar 2014 14:57:56 +0100
  4. Subject: [PATCH] ARM: sunxi: dt: Add sunxi-common-regulators include file
  5. Most sunxi boards with a sata connector also have a gpio controlled connector
  6. for sata target power and almost all sunxi boards have a gpio controlled vbus
  7. for usb1 and usb2.
  8. This commit adds an include file for the regulators representing these
  9. supplies, avoiding the need to copy and paste the regulator code to allmost
  10. all sunxi board dts files.
  11. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  12. ---
  13. arch/arm/boot/dts/sunxi-common-regulators.dtsi | 75 ++++++++++++++++++++++++++
  14. 1 file changed, 75 insertions(+)
  15. create mode 100644 arch/arm/boot/dts/sunxi-common-regulators.dtsi
  16. --- /dev/null
  17. +++ b/arch/arm/boot/dts/sunxi-common-regulators.dtsi
  18. @@ -0,0 +1,75 @@
  19. +/*
  20. + * sunxi boards common regulator (ahci target power supply, usb-vbus) code
  21. + *
  22. + * Copyright 2014 - Hans de Goede <hdegoede@redhat.com>
  23. + *
  24. + * The code contained herein is licensed under the GNU General Public
  25. + * License. You may obtain a copy of the GNU General Public License
  26. + * Version 2 or later at the following locations:
  27. + *
  28. + * http://www.opensource.org/licenses/gpl-license.html
  29. + * http://www.gnu.org/copyleft/gpl.html
  30. + */
  31. +
  32. +/ {
  33. + soc@01c00000 {
  34. + pio: pinctrl@01c20800 {
  35. + ahci_pwr_pin_a: ahci_pwr_pin@0 {
  36. + allwinner,pins = "PB8";
  37. + allwinner,function = "gpio_out";
  38. + allwinner,drive = <0>;
  39. + allwinner,pull = <0>;
  40. + };
  41. +
  42. + usb1_vbus_pin_a: usb1_vbus_pin@0 {
  43. + allwinner,pins = "PH6";
  44. + allwinner,function = "gpio_out";
  45. + allwinner,drive = <0>;
  46. + allwinner,pull = <0>;
  47. + };
  48. +
  49. + usb2_vbus_pin_a: usb2_vbus_pin@0 {
  50. + allwinner,pins = "PH3";
  51. + allwinner,function = "gpio_out";
  52. + allwinner,drive = <0>;
  53. + allwinner,pull = <0>;
  54. + };
  55. + };
  56. + };
  57. +
  58. + reg_ahci_5v: ahci-5v {
  59. + compatible = "regulator-fixed";
  60. + pinctrl-names = "default";
  61. + pinctrl-0 = <&ahci_pwr_pin_a>;
  62. + regulator-name = "ahci-5v";
  63. + regulator-min-microvolt = <5000000>;
  64. + regulator-max-microvolt = <5000000>;
  65. + enable-active-high;
  66. + gpio = <&pio 1 8 0>;
  67. + status = "disabled";
  68. + };
  69. +
  70. + reg_usb1_vbus: usb1-vbus {
  71. + compatible = "regulator-fixed";
  72. + pinctrl-names = "default";
  73. + pinctrl-0 = <&usb1_vbus_pin_a>;
  74. + regulator-name = "usb1-vbus";
  75. + regulator-min-microvolt = <5000000>;
  76. + regulator-max-microvolt = <5000000>;
  77. + enable-active-high;
  78. + gpio = <&pio 7 6 0>;
  79. + status = "disabled";
  80. + };
  81. +
  82. + reg_usb2_vbus: usb2-vbus {
  83. + compatible = "regulator-fixed";
  84. + pinctrl-names = "default";
  85. + pinctrl-0 = <&usb2_vbus_pin_a>;
  86. + regulator-name = "usb2-vbus";
  87. + regulator-min-microvolt = <5000000>;
  88. + regulator-max-microvolt = <5000000>;
  89. + enable-active-high;
  90. + gpio = <&pio 7 3 0>;
  91. + status = "disabled";
  92. + };
  93. +};