sun8i-r40-oka40i-c.dts 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. // SPDX-License-Identifier: GPL-2.0+ OR MIT
  2. // Copyright (C) 2021 Ivan Uvarov <[email protected]>
  3. // Based on the sun8i-r40-bananapi-m2-ultra.dts, which is:
  4. // Copyright (C) 2017 Chen-Yu Tsai <[email protected]>
  5. // Copyright (C) 2017 Icenowy Zheng <[email protected]>
  6. /dts-v1/;
  7. #include "sun8i-r40-feta40i.dtsi"
  8. #include <dt-bindings/gpio/gpio.h>
  9. #include <dt-bindings/leds/common.h>
  10. / {
  11. model = "Forlinx OKA40i-C";
  12. compatible = "forlinx,oka40i-c", "forlinx,feta40i-c", "allwinner,sun8i-r40";
  13. aliases {
  14. ethernet0 = &gmac;
  15. serial0 = &uart0;
  16. serial2 = &uart2;
  17. serial3 = &uart3;
  18. serial4 = &uart4;
  19. serial5 = &uart5; /* RS485 */
  20. serial7 = &uart7;
  21. };
  22. chosen {
  23. stdout-path = "serial0:115200n8";
  24. };
  25. connector {
  26. compatible = "hdmi-connector";
  27. type = "a";
  28. port {
  29. hdmi_con_in: endpoint {
  30. remote-endpoint = <&hdmi_out_con>;
  31. };
  32. };
  33. };
  34. leds {
  35. compatible = "gpio-leds";
  36. led-5 { /* this is how the leds are labeled on the board */
  37. gpios = <&pio 7 26 GPIO_ACTIVE_LOW>; /* PH26 */
  38. color = <LED_COLOR_ID_GREEN>;
  39. function = LED_FUNCTION_STATUS;
  40. };
  41. led-6 {
  42. gpios = <&pio 8 15 GPIO_ACTIVE_LOW>; /* PI15 */
  43. color = <LED_COLOR_ID_BLUE>;
  44. function = LED_FUNCTION_STATUS;
  45. };
  46. };
  47. reg_vcc5v0: vcc5v0 {
  48. compatible = "regulator-fixed";
  49. regulator-name = "vcc5v0";
  50. regulator-min-microvolt = <5000000>;
  51. regulator-max-microvolt = <5000000>;
  52. };
  53. wifi_pwrseq: wifi_pwrseq {
  54. compatible = "mmc-pwrseq-simple";
  55. reset-gpios = <&pio 1 10 GPIO_ACTIVE_LOW>; // PB10 WIFI_EN
  56. clocks = <&ccu CLK_OUTA>;
  57. clock-names = "ext_clock";
  58. };
  59. };
  60. &ahci {
  61. ahci-supply = <&reg_dldo4>;
  62. phy-supply = <&reg_eldo2>;
  63. status = "okay";
  64. };
  65. &de {
  66. status = "okay";
  67. };
  68. &ehci1 {
  69. status = "okay";
  70. };
  71. &ehci2 {
  72. status = "okay";
  73. };
  74. &gmac {
  75. pinctrl-names = "default";
  76. pinctrl-0 = <&gmac_rgmii_pins>;
  77. phy-handle = <&phy1>;
  78. phy-mode = "rgmii-id";
  79. phy-supply = <&reg_dcdc1>;
  80. status = "okay";
  81. };
  82. &gmac_mdio {
  83. phy1: ethernet-phy@1 {
  84. compatible = "ethernet-phy-ieee802.3-c22";
  85. reg = <1>;
  86. };
  87. };
  88. &hdmi {
  89. status = "okay";
  90. };
  91. &hdmi_out {
  92. hdmi_out_con: endpoint {
  93. remote-endpoint = <&hdmi_con_in>;
  94. };
  95. };
  96. &i2c2 {
  97. status = "okay";
  98. };
  99. &mmc0 {
  100. vmmc-supply = <&reg_dcdc1>;
  101. vqmmc-supply = <&reg_dcdc1>;
  102. bus-width = <4>;
  103. cd-gpios = <&pio 8 11 GPIO_ACTIVE_LOW>; // PI11
  104. status = "okay";
  105. };
  106. &mmc3 {
  107. vmmc-supply = <&reg_dcdc1>;
  108. vqmmc-supply = <&reg_dcdc1>;
  109. bus-width = <4>;
  110. cd-gpios = <&pio 8 10 GPIO_ACTIVE_LOW>; // PI10
  111. status = "okay";
  112. };
  113. &ohci1 {
  114. status = "okay";
  115. };
  116. &ohci2 {
  117. status = "okay";
  118. };
  119. &reg_dc1sw {
  120. regulator-min-microvolt = <3300000>;
  121. regulator-max-microvolt = <3300000>;
  122. regulator-name = "vcc-lcd";
  123. };
  124. &reg_dldo2 {
  125. regulator-min-microvolt = <3300000>;
  126. regulator-max-microvolt = <3300000>;
  127. regulator-name = "vcc-wifi";
  128. };
  129. &tcon_tv0 {
  130. status = "okay";
  131. };
  132. &uart0 {
  133. pinctrl-names = "default";
  134. pinctrl-0 = <&uart0_pb_pins>;
  135. status = "okay";
  136. };
  137. &uart2 {
  138. pinctrl-names = "default";
  139. pinctrl-0 = <&uart2_pi_pins>, <&uart2_rts_cts_pi_pins>;
  140. uart-has-rtscts;
  141. status = "okay";
  142. };
  143. &uart3 {
  144. pinctrl-names = "default";
  145. pinctrl-0 = <&uart3_pg_pins>, <&uart3_rts_cts_pg_pins>;
  146. uart-has-rtscts;
  147. status = "okay";
  148. };
  149. &uart4 {
  150. pinctrl-names = "default";
  151. pinctrl-0 = <&uart4_pg_pins>;
  152. status = "okay";
  153. };
  154. &uart5 { /* RS485 */
  155. pinctrl-names = "default";
  156. pinctrl-0 = <&uart5_ph_pins>;
  157. status = "okay";
  158. };
  159. &uart7 {
  160. pinctrl-names = "default";
  161. pinctrl-0 = <&uart7_pi_pins>;
  162. status = "okay";
  163. };
  164. &usbphy {
  165. usb1_vbus-supply = <&reg_vcc5v0>;
  166. usb2_vbus-supply = <&reg_vcc5v0>;
  167. status = "okay";
  168. };