060-ARM-dts-sun8i-add-support-for-Orange-Pi-R1.patch 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. From 74942cd5dfe4ac4fd982fe58118bc69346a2bd18 Mon Sep 17 00:00:00 2001
  2. From: Icenowy Zheng <icenowy@aosc.io>
  3. Date: Sun, 12 Nov 2017 20:41:29 +0800
  4. Subject: [PATCH] ARM: dts: sun8i: add support for Orange Pi R1
  5. Orange Pi R1 is a board design based on Orange Pi Zero, with XR819 Wi-Fi
  6. chip replaced by RTL8189ETV Wi-Fi module and the USB Type-A jack
  7. replaced by an onboard USB RTL8152B USB-Ethernet adapter.
  8. Add support for it.
  9. Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
  10. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
  11. ---
  12. arch/arm/boot/dts/Makefile | 1 +
  13. arch/arm/boot/dts/sun8i-h2-plus-orangepi-r1.dts | 73 +++++++++++++++++++++++++
  14. 2 files changed, 74 insertions(+)
  15. create mode 100644 arch/arm/boot/dts/sun8i-h2-plus-orangepi-r1.dts
  16. --- a/arch/arm/boot/dts/Makefile
  17. +++ b/arch/arm/boot/dts/Makefile
  18. @@ -916,6 +916,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
  19. sun8i-a83t-allwinner-h8homlet-v2.dtb \
  20. sun8i-a83t-bananapi-m3.dtb \
  21. sun8i-a83t-cubietruck-plus.dtb \
  22. + sun8i-h2-plus-orangepi-r1.dtb \
  23. sun8i-h2-plus-orangepi-zero.dtb \
  24. sun8i-h3-bananapi-m2-plus.dtb \
  25. sun8i-h3-beelink-x2.dtb \
  26. --- /dev/null
  27. +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-r1.dts
  28. @@ -0,0 +1,73 @@
  29. +/*
  30. + * Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.xyz>
  31. + *
  32. + * This file is dual-licensed: you can use it either under the terms
  33. + * of the GPL or the X11 license, at your option. Note that this dual
  34. + * licensing only applies to this file, and not this project as a
  35. + * whole.
  36. + *
  37. + * a) This file is free software; you can redistribute it and/or
  38. + * modify it under the terms of the GNU General Public License as
  39. + * published by the Free Software Foundation; either version 2 of the
  40. + * License, or (at your option) any later version.
  41. + *
  42. + * This file is distributed in the hope that it will be useful,
  43. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  44. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  45. + * GNU General Public License for more details.
  46. + *
  47. + * Or, alternatively,
  48. + *
  49. + * b) Permission is hereby granted, free of charge, to any person
  50. + * obtaining a copy of this software and associated documentation
  51. + * files (the "Software"), to deal in the Software without
  52. + * restriction, including without limitation the rights to use,
  53. + * copy, modify, merge, publish, distribute, sublicense, and/or
  54. + * sell copies of the Software, and to permit persons to whom the
  55. + * Software is furnished to do so, subject to the following
  56. + * conditions:
  57. + *
  58. + * The above copyright notice and this permission notice shall be
  59. + * included in all copies or substantial portions of the Software.
  60. + *
  61. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  62. + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  63. + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  64. + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  65. + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  66. + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  67. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  68. + * OTHER DEALINGS IN THE SOFTWARE.
  69. + */
  70. +
  71. +/* Orange Pi R1 is based on Orange Pi Zero design */
  72. +#include "sun8i-h2-plus-orangepi-zero.dts"
  73. +
  74. +/ {
  75. + model = "Xunlong Orange Pi R1";
  76. + compatible = "xunlong,orangepi-r1", "allwinner,sun8i-h2-plus";
  77. +
  78. + /delete-node/ reg_vcc_wifi;
  79. +
  80. + aliases {
  81. + ethernet1 = &rtl8189etv;
  82. + };
  83. +};
  84. +
  85. +&ohci1 {
  86. + /*
  87. + * RTL8152B USB-Ethernet adapter is connected to USB1,
  88. + * and it's a USB 2.0 device. So the OHCI1 controller
  89. + * can be left disabled.
  90. + */
  91. + status = "disabled";
  92. +};
  93. +
  94. +&mmc1 {
  95. + vmmc-supply = <&reg_vcc3v3>;
  96. + vqmmc-supply = <&reg_vcc3v3>;
  97. +
  98. + rtl8189etv: sdio_wifi@1 {
  99. + reg = <1>;
  100. + };
  101. +};