Advertisement
Guest User

Untitled

a guest
Apr 17th, 2017
597
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.78 KB | None | 0 0
  1. linux-4.11-rc6/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
  2.  
  3. /*
  4. * Copyright (C) 2016 James Pettigrew <james@innovum.com.au>
  5. * Copyright (C) 2016 Milo Kim <woogyom.kim@gmail.com>
  6. *
  7. * This file is dual-licensed: you can use it either under the terms
  8. * of the GPL or the X11 license, at your option. Note that this dual
  9. * licensing only applies to this file, and not this project as a
  10. * whole.
  11. *
  12. * a) This file is free software; you can redistribute it and/or
  13. * modify it under the terms of the GNU General Public License as
  14. * published by the Free Software Foundation; either version 2 of the
  15. * License, or (at your option) any later version.
  16. *
  17. * This file is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * Or, alternatively,
  23. *
  24. * b) Permission is hereby granted, free of charge, to any person
  25. * obtaining a copy of this software and associated documentation
  26. * files (the "Software"), to deal in the Software without
  27. * restriction, including without limitation the rights to use,
  28. * copy, modify, merge, publish, distribute, sublicense, and/or
  29. * sell copies of the Software, and to permit persons to whom the
  30. * Software is furnished to do so, subject to the following
  31. * conditions:
  32. *
  33. * The above copyright notice and this permission notice shall be
  34. * included in all copies or substantial portions of the Software.
  35. *
  36. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  37. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  38. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  39. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  40. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  41. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  42. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  43. * OTHER DEALINGS IN THE SOFTWARE.
  44. */
  45.  
  46. /dts-v1/;
  47. #include "sun8i-h3.dtsi"
  48. #include "sunxi-common-regulators.dtsi"
  49.  
  50. #include <dt-bindings/gpio/gpio.h>
  51. #include <dt-bindings/input/input.h>
  52. #include <dt-bindings/pinctrl/sun4i-a10.h>
  53.  
  54. / {
  55. aliases {
  56. serial0 = &uart0;
  57. };
  58.  
  59. chosen {
  60. stdout-path = "serial0:115200n8";
  61. };
  62.  
  63. leds {
  64. compatible = "gpio-leds";
  65. pinctrl-names = "default";
  66. pinctrl-0 = <&leds_npi>, <&leds_r_npi>;
  67.  
  68. status {
  69. label = "nanopi:blue:status";
  70. gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>;
  71. linux,default-trigger = "heartbeat";
  72. };
  73.  
  74. pwr {
  75. label = "nanopi:green:pwr";
  76. gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
  77. default-state = "on";
  78. };
  79. };
  80.  
  81. r_gpio_keys {
  82. compatible = "gpio-keys";
  83. input-name = "k1";
  84. pinctrl-names = "default";
  85. pinctrl-0 = <&sw_r_npi>;
  86.  
  87. k1@0 {
  88. label = "k1";
  89. linux,code = <KEY_POWER>;
  90. gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
  91. };
  92. };
  93. };
  94.  
  95. &codec {
  96. allwinner,audio-routing =
  97. "Line Out", "LINEOUT",
  98. "MIC1", "Mic",
  99. "Mic", "MBIAS";
  100. status = "okay";
  101. };
  102.  
  103. &ehci3 {
  104. status = "okay";
  105. };
  106.  
  107. &mmc0 {
  108. bus-width = <4>;
  109. cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
  110. cd-inverted;
  111. pinctrl-names = "default";
  112. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
  113. status = "okay";
  114. vmmc-supply = <&reg_vcc3v3>;
  115. };
  116.  
  117. &ohci3 {
  118. status = "okay";
  119. };
  120.  
  121. &pio {
  122. leds_npi: led_pins@0 {
  123. pins = "PA10";
  124. function = "gpio_out";
  125. };
  126. };
  127.  
  128. &r_pio {
  129. leds_r_npi: led_pins@0 {
  130. pins = "PL10";
  131. function = "gpio_out";
  132. };
  133.  
  134. sw_r_npi: key_pins@0 {
  135. pins = "PL3";
  136. function = "gpio_in";
  137. };
  138. };
  139.  
  140. &uart0 {
  141. pinctrl-names = "default";
  142. pinctrl-0 = <&uart0_pins_a>;
  143. status = "okay";
  144. };
  145.  
  146. &usbphy {
  147. status = "okay";
  148. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement