sun8i-h2-plus-bananapi-m2-zero.dts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
  4. *
  5. * Based on sun8i-h3-bananapi-m2-plus.dts, which is:
  6. * Copyright (C) 2016 Chen-Yu Tsai <wens@csie.org>
  7. */
  8. /dts-v1/;
  9. #include "sun8i-h3.dtsi"
  10. #include "sunxi-common-regulators.dtsi"
  11. #include <dt-bindings/gpio/gpio.h>
  12. #include <dt-bindings/input/input.h>
  13. / {
  14. model = "Banana Pi BPI-M2-Zero";
  15. compatible = "sinovoip,bpi-m2-zero", "allwinner,sun8i-h2-plus";
  16. aliases {
  17. serial0 = &uart0;
  18. serial1 = &uart1;
  19. };
  20. chosen {
  21. stdout-path = "serial0:115200n8";
  22. };
  23. leds {
  24. compatible = "gpio-leds";
  25. pinctrl-names = "default";
  26. pwr_led {
  27. label = "bananapi-m2-zero:red:pwr";
  28. gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
  29. default-state = "on";
  30. };
  31. };
  32. gpio_keys {
  33. compatible = "gpio-keys";
  34. pinctrl-names = "default";
  35. sw4 {
  36. label = "power";
  37. linux,code = <BTN_0>;
  38. gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
  39. };
  40. };
  41. wifi_pwrseq: wifi_pwrseq {
  42. compatible = "mmc-pwrseq-simple";
  43. pinctrl-names = "default";
  44. reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
  45. };
  46. };
  47. &ehci0 {
  48. status = "okay";
  49. };
  50. &mmc0 {
  51. vmmc-supply = <&reg_vcc3v3>;
  52. bus-width = <4>;
  53. /*
  54. * On the production batch of this board the card detect GPIO is
  55. * high active (card inserted), although on the early samples it's
  56. * low active.
  57. */
  58. cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
  59. status = "okay";
  60. };
  61. &mmc1 {
  62. vmmc-supply = <&reg_vcc3v3>;
  63. vqmmc-supply = <&reg_vcc3v3>;
  64. mmc-pwrseq = <&wifi_pwrseq>;
  65. bus-width = <4>;
  66. non-removable;
  67. status = "okay";
  68. brcmf: wifi@1 {
  69. reg = <1>;
  70. compatible = "brcm,bcm4329-fmac";
  71. interrupt-parent = <&pio>;
  72. interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
  73. interrupt-names = "host-wake";
  74. };
  75. };
  76. &ohci0 {
  77. status = "okay";
  78. };
  79. &uart0 {
  80. pinctrl-names = "default";
  81. pinctrl-0 = <&uart0_pins_a>;
  82. status = "okay";
  83. };
  84. &uart1 {
  85. pinctrl-names = "default";
  86. pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
  87. status = "okay";
  88. };
  89. &usb_otg {
  90. dr_mode = "otg";
  91. status = "okay";
  92. };
  93. &usbphy {
  94. usb0_id_det-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
  95. /*
  96. * There're two micro-USB connectors, one is power-only and another is
  97. * OTG. The Vbus of these two connectors are connected together, so
  98. * the external USB device will be powered just by the power input
  99. * from the power-only USB port.
  100. */
  101. status = "okay";
  102. };