qcom-ipq8068-mr52.dts 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. // SPDX-License-Identifier: GPL-2.0 OR MIT
  2. #include "qcom-ipq8068-cryptid-common.dtsi"
  3. #include <dt-bindings/input/input.h>
  4. #include <dt-bindings/leds/common.h>
  5. / {
  6. model = "Meraki MR52";
  7. compatible = "meraki,mr52", "qcom,ipq8064";
  8. aliases {
  9. serial1 = &gsbi1_serial;
  10. mdio-gpio0 = &mdio_gpio0;
  11. ethernet0 = &gmac2;
  12. ethernet1 = &gmac3;
  13. led-boot = &led_active;
  14. led-failsafe = &led_power;
  15. led-running = &led_active;
  16. led-upgrade = &led_active;
  17. };
  18. keys {
  19. compatible = "gpio-keys";
  20. pinctrl-0 = <&button_pins>;
  21. pinctrl-names = "default";
  22. reset {
  23. label = "reset";
  24. gpios = <&qcom_pinmux 25 GPIO_ACTIVE_LOW>;
  25. linux,code = <KEY_RESTART>;
  26. debounce-interval = <60>;
  27. wakeup-source;
  28. };
  29. };
  30. leds {
  31. compatible = "gpio-leds";
  32. pinctrl-0 = <&led_pins>;
  33. pinctrl-names = "default";
  34. led_power: power {
  35. function = LED_FUNCTION_POWER;
  36. color = <LED_COLOR_ID_ORANGE>;
  37. gpios = <&qcom_pinmux 19 GPIO_ACTIVE_HIGH>;
  38. };
  39. lan2_green {
  40. label = "green:lan2";
  41. gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
  42. };
  43. lan1_green {
  44. label = "green:lan1";
  45. gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
  46. };
  47. led_active: active {
  48. label = "white:active";
  49. gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
  50. };
  51. lan2_orange {
  52. label = "orange:lan2";
  53. gpios = <&qcom_pinmux 60 GPIO_ACTIVE_HIGH>;
  54. };
  55. lan1_orange {
  56. label = "orange:lan1";
  57. gpios = <&qcom_pinmux 62 GPIO_ACTIVE_HIGH>;
  58. };
  59. };
  60. };
  61. &gmac2 {
  62. status = "okay";
  63. qcom,id = <2>;
  64. mdiobus = <&mdio0>;
  65. phy-mode = "sgmii";
  66. phy-handle = <&phy0>;
  67. nvmem-cells = <&mac_address 0>;
  68. nvmem-cell-names = "mac-address";
  69. };
  70. &gmac3 {
  71. status = "okay";
  72. qcom,id = <3>;
  73. mdiobus = <&mdio_gpio0>;
  74. phy-mode = "sgmii";
  75. phy-handle = <&phy4>;
  76. nvmem-cells = <&mac_address 1>;
  77. nvmem-cell-names = "mac-address";
  78. };
  79. &gsbi7 {
  80. status = "okay";
  81. qcom,mode = <GSBI_PROT_I2C>;
  82. };
  83. &gsbi7_i2c {
  84. status = "okay";
  85. pinctrl-0 = <&i2c_pins>;
  86. pinctrl-names = "default";
  87. ina2xx@45 {
  88. compatible = "ina219";
  89. shunt-resistor = <80000>;
  90. reg = <0x45>;
  91. };
  92. tlc591xx@49 {
  93. #address-cells = <1>;
  94. #size-cells = <0>;
  95. compatible = "ti,tlc59108";
  96. reg = <0x49>;
  97. red@0 {
  98. label = "red:user";
  99. reg = <0x0>;
  100. };
  101. green@1 {
  102. label = "green:user";
  103. reg = <0x1>;
  104. };
  105. blue@2 {
  106. label = "blue:user";
  107. reg = <0x2>;
  108. };
  109. };
  110. eeprom@52 {
  111. compatible = "atmel,24c64";
  112. pagesize = <32>;
  113. reg = <0x52>;
  114. read-only;
  115. nvmem-layout {
  116. compatible = "fixed-layout";
  117. #address-cells = <1>;
  118. #size-cells = <1>;
  119. mac_address: mac-address@66 {
  120. compatible = "mac-base";
  121. reg = <0x66 0x6>;
  122. #nvmem-cell-cells = <1>;
  123. };
  124. };
  125. };
  126. };
  127. &qcom_pinmux {
  128. i2c_pins: i2c_pins {
  129. mux {
  130. pins = "gpio8", "gpio9";
  131. function = "gsbi7";
  132. drive-strength = <2>;
  133. bias-pull-up;
  134. input;
  135. };
  136. };
  137. led_pins: led_pins {
  138. mux {
  139. pins = "gpio19", "gpio26";
  140. function = "gpio";
  141. drive-strength = <12>;
  142. bias-pull-down;
  143. output-low;
  144. };
  145. };
  146. button_pins: button_pins {
  147. mux {
  148. pins = "gpio25";
  149. function = "gpio";
  150. drive-strength = <2>;
  151. bias-pull-up;
  152. input;
  153. };
  154. };
  155. };
  156. &soc {
  157. mdio_gpio0: mdio {
  158. compatible = "virtual,mdio-gpio";
  159. #address-cells = <1>;
  160. #size-cells = <0>;
  161. status = "okay";
  162. pinctrl-0 = <&mdio0_pins_active>, <&phy_active>;
  163. pinctrl-names = "default";
  164. gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH
  165. &qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
  166. phy0: ethernet-phy0 {
  167. reg = <0>;
  168. reset-gpios = <&qcom_pinmux 7 GPIO_ACTIVE_LOW>;
  169. reset-assert-us = <24000>;
  170. };
  171. phy4: ethernet-phy4 {
  172. reg = <4>;
  173. reset-gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
  174. reset-assert-us = <24000>;
  175. };
  176. };
  177. };
  178. &wifi0 {
  179. nvmem-cells = <&mac_address 4>;
  180. nvmem-cell-names = "mac-address";
  181. };
  182. &wifi1 {
  183. nvmem-cells = <&mac_address 3>;
  184. nvmem-cell-names = "mac-address";
  185. };
  186. &wifi2 {
  187. nvmem-cells = <&mac_address 2>;
  188. nvmem-cell-names = "mac-address";
  189. };
  190. &hs_phy_0 {
  191. status = "okay";
  192. };
  193. &ss_phy_0 {
  194. status = "okay";
  195. };
  196. &usb3_0 {
  197. status = "okay";
  198. };
  199. &hs_phy_1 {
  200. status = "okay";
  201. };
  202. &ss_phy_1 {
  203. status = "okay";
  204. };
  205. &usb3_1 {
  206. status = "okay";
  207. };