104-2-dt-sun8i-add-orangepi-plus.patch 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. From dfcf8196de7411a5e7fd49795938b1bc8c56859c Mon Sep 17 00:00:00 2001
  2. From: Jens Kuske <jenskuske@gmail.com>
  3. Date: Fri, 4 Dec 2015 22:24:43 +0100
  4. Subject: [PATCH] ARM: dts: sun8i: Add Orange Pi Plus support
  5. The Orange Pi Plus is a SBC based on the Allwinner H3 SoC
  6. with 8GB eMMC, multiple USB ports through a USB hub chip, SATA through
  7. a USB-SATA bridge, one uSD slot, a 10/100/1000M ethernet port,
  8. WiFi, HDMI, headphone jack, IR receiver, a microphone, a CSI connector
  9. and a 40-pin GPIO header.
  10. Signed-off-by: Jens Kuske <jenskuske@gmail.com>
  11. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
  12. ---
  13. arch/arm/boot/dts/Makefile | 3 +-
  14. arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 77 ++++++++++++++++++++++++++++
  15. 2 files changed, 79 insertions(+), 1 deletion(-)
  16. create mode 100644 arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
  17. --- a/arch/arm/boot/dts/Makefile
  18. +++ b/arch/arm/boot/dts/Makefile
  19. @@ -660,7 +660,8 @@ dtb-$(CONFIG_MACH_SUN8I) += \
  20. sun8i-a33-ga10h-v1.1.dtb \
  21. sun8i-a33-ippo-q8h-v1.2.dtb \
  22. sun8i-a33-q8-tablet.dtb \
  23. - sun8i-a33-sinlinx-sina33.dtb
  24. + sun8i-a33-sinlinx-sina33.dtb \
  25. + sun8i-h3-orangepi-plus.dtb
  26. dtb-$(CONFIG_MACH_SUN9I) += \
  27. sun9i-a80-optimus.dtb \
  28. sun9i-a80-cubieboard4.dtb
  29. --- /dev/null
  30. +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
  31. @@ -0,0 +1,77 @@
  32. +/*
  33. + * Copyright (C) 2015 Jens Kuske <jenskuske@gmail.com>
  34. + *
  35. + * This file is dual-licensed: you can use it either under the terms
  36. + * of the GPL or the X11 license, at your option. Note that this dual
  37. + * licensing only applies to this file, and not this project as a
  38. + * whole.
  39. + *
  40. + * a) This file is free software; you can redistribute it and/or
  41. + * modify it under the terms of the GNU General Public License as
  42. + * published by the Free Software Foundation; either version 2 of the
  43. + * License, or (at your option) any later version.
  44. + *
  45. + * This file is distributed in the hope that it will be useful,
  46. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  47. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  48. + * GNU General Public License for more details.
  49. + *
  50. + * Or, alternatively,
  51. + *
  52. + * b) Permission is hereby granted, free of charge, to any person
  53. + * obtaining a copy of this software and associated documentation
  54. + * files (the "Software"), to deal in the Software without
  55. + * restriction, including without limitation the rights to use,
  56. + * copy, modify, merge, publish, distribute, sublicense, and/or
  57. + * sell copies of the Software, and to permit persons to whom the
  58. + * Software is furnished to do so, subject to the following
  59. + * conditions:
  60. + *
  61. + * The above copyright notice and this permission notice shall be
  62. + * included in all copies or substantial portions of the Software.
  63. + *
  64. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  65. + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  66. + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  67. + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  68. + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  69. + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  70. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  71. + * OTHER DEALINGS IN THE SOFTWARE.
  72. + */
  73. +
  74. +/dts-v1/;
  75. +#include "sun8i-h3.dtsi"
  76. +#include "sunxi-common-regulators.dtsi"
  77. +
  78. +#include <dt-bindings/gpio/gpio.h>
  79. +#include <dt-bindings/pinctrl/sun4i-a10.h>
  80. +
  81. +/ {
  82. + model = "Xunlong Orange Pi Plus";
  83. + compatible = "xunlong,orangepi-plus", "allwinner,sun8i-h3";
  84. +
  85. + aliases {
  86. + serial0 = &uart0;
  87. + };
  88. +
  89. + chosen {
  90. + stdout-path = "serial0:115200n8";
  91. + };
  92. +};
  93. +
  94. +&mmc0 {
  95. + pinctrl-names = "default";
  96. + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
  97. + vmmc-supply = <&reg_vcc3v3>;
  98. + bus-width = <4>;
  99. + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
  100. + cd-inverted;
  101. + status = "okay";
  102. +};
  103. +
  104. +&uart0 {
  105. + pinctrl-names = "default";
  106. + pinctrl-0 = <&uart0_pins_a>;
  107. + status = "okay";
  108. +};