Advertisement
Guest User

Untitled

a guest
Dec 23rd, 2022
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.59 KB | None | 0 0
  1. // SPDX-License-Identifier: (GPL-2.0+ or MIT)
  2. /*
  3. * Copyright (C) 2020 Arm Ltd.
  4. */
  5.  
  6. /dts-v1/;
  7.  
  8. #include "sun50i-h616.dtsi"
  9.  
  10. #include <dt-bindings/gpio/gpio.h>
  11. #include <dt-bindings/interrupt-controller/arm-gic.h>
  12. #include <dt-bindings/leds/common.h>
  13.  
  14. / {
  15. model = "OrangePi Zero2";
  16. compatible = "xunlong,orangepi-zero2", "allwinner,sun50i-h616";
  17.  
  18. aliases {
  19. ethernet0 = &emac0;
  20. serial0 = &uart0;
  21. };
  22.  
  23. chosen {
  24. stdout-path = "serial0:115200n8";
  25. };
  26.  
  27. leds {
  28. compatible = "gpio-leds";
  29.  
  30. led-0 {
  31. function = LED_FUNCTION_POWER;
  32. label = "orangepi:blue:power";
  33. gpios = <&pio 4 19 GPIO_ACTIVE_LOW>; /* PE19 */
  34. default-state = "on";
  35. };
  36. };
  37.  
  38. reg_vcc5v: vcc5v {
  39. /* board wide 5V supply directly from the USB-C socket */
  40. compatible = "regulator-fixed";
  41. regulator-name = "vcc-5v";
  42. regulator-min-microvolt = <5000000>;
  43. regulator-max-microvolt = <5000000>;
  44. regulator-always-on;
  45. };
  46.  
  47. reg_vcc3v3: vcc3v3 {
  48. compatible = "regulator-fixed";
  49. regulator-name = "vcc3v3";
  50. regulator-min-microvolt = <3300000>;
  51. regulator-max-microvolt = <3300000>;
  52. regulator-always-on;
  53. };
  54. reg_vccio: vccio {
  55. compatible = "regulator-fixed";
  56. regulator-name = "vccio";
  57. regulator-min-microvolt = <3300000>;
  58. regulator-max-microvolt = <3300000>;
  59. enable-active-high;
  60. gpio = <&pio 3 22 GPIO_ACTIVE_HIGH>;
  61. };
  62. };
  63.  
  64. &emac0 {
  65. pinctrl-names = "default";
  66. pinctrl-0 = <&ext_rgmii_pins>;
  67. phy-mode = "rgmii";
  68. phy-handle = <&ext_rgmii_phy>;
  69. phy-supply = <&reg_vcc3v3>;
  70. allwinner,rx-delay-ps = <3100>;
  71. allwinner,tx-delay-ps = <700>;
  72. status = "okay";
  73. };
  74.  
  75. &mdio0 {
  76. ext_rgmii_phy: ethernet-phy@6 {
  77. compatible = "ethernet-phy-ieee802.3-c22";
  78. reg = <6>;
  79. reset-gpios = <&pio 8 6 GPIO_ACTIVE_LOW>; //PI6
  80. reset-assert-us = <50000>;
  81. reset-deassert-us = <1000>;
  82. };
  83. };
  84.  
  85. &mmc0 {
  86. vmmc-supply = <&reg_vcc3v3>;
  87. cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
  88. bus-width = <4>;
  89. status = "okay";
  90. };
  91.  
  92. &r_i2c {
  93. pinctrl-names = "default";
  94. pinctrl-0 = <&r_i2c_pins>;
  95. status = "okay";
  96. };
  97.  
  98. &pio {
  99. vcc-pc-supply = <&reg_vcc3v3>;
  100. vcc-pf-supply = <&reg_vcc3v3>;
  101. vcc-pg-supply = <&reg_vcc3v3>;
  102. vcc-ph-supply = <&reg_vcc3v3>;
  103. vcc-pi-supply = <&reg_vcc3v3>;
  104. vcc-pe-supply = <&reg_vcc3v3>;
  105. };
  106.  
  107. &spi0 {
  108. status = "okay";
  109. pinctrl-names = "default";
  110. pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>;
  111.  
  112. flash@0 {
  113. #address-cells = <1>;
  114. #size-cells = <1>;
  115. compatible = "jedec,spi-nor";
  116. reg = <0>;
  117. spi-max-frequency = <40000000>;
  118. };
  119. };
  120.  
  121. &uart0 {
  122. pinctrl-names = "default";
  123. pinctrl-0 = <&uart0_ph_pins>;
  124. status = "okay";
  125. };
  126.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement