am335x-draco.dts 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /*
  2. * Support for Siemens DRACO board
  3. *
  4. * Copyright (C) 2014 - Lukas Stockmann <lukas.stockmann@siemens.com>
  5. *
  6. * This file is licensed under the terms of the GNU General Public License
  7. * version 2. This program is licensed "as is" without any warranty of any
  8. * kind, whether express or implied.
  9. */
  10. /dts-v1/;
  11. #include "am33xx.dtsi"
  12. #include "am335x-draco.dtsi"
  13. #include <dt-bindings/input/input.h>
  14. / {
  15. model = "Siemens DRACO";
  16. compatible = "siemens,draco", "ti,am33xx";
  17. /* ethernet alias is needed for the MAC address passing from U-Boot */
  18. aliases {
  19. ethernet0 = &cpsw_emac0;
  20. mdio-gpio0 = &mdio0;
  21. };
  22. gpio-keys {
  23. compatible = "gpio-keys";
  24. button0 {
  25. label = "button0";
  26. gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
  27. linux,code = <KEY_F1>; /* button0 */
  28. };
  29. button1 {
  30. label = "button1";
  31. gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
  32. linux,code = <KEY_F2>; /* button1 */
  33. };
  34. };
  35. ocp {
  36. debugss: debugss@4b000000 {
  37. compatible = "ti,debugss";
  38. ti,hwmods = "debugss";
  39. reg = <0x4b000000 1000000>;
  40. status = "disabled";
  41. };
  42. };
  43. };
  44. &am33xx_pinmux {
  45. pinctrl-names = "default";
  46. pinctrl-0 = <&gpio_mux_pins>;
  47. gpio_mux_pins: gpio_mux_pins {
  48. pinctrl-single,pins = <
  49. 0x1d0 (PIN_INPUT | MUX_MODE0) /* tms jtag */
  50. 0x1d4 (PIN_INPUT | MUX_MODE0) /* tdi jtag */
  51. 0x1d8 (PIN_OUTPUT | MUX_MODE0) /* tdo jtag */
  52. 0x1dc (PIN_INPUT | MUX_MODE0) /* tck jtag */
  53. 0x1e0 (PIN_INPUT | MUX_MODE0) /* trstn jtag */
  54. >;
  55. };
  56. cpsw_default: cpsw_default {
  57. pinctrl-single,pins = <
  58. 0x0E8 (PIN_INPUT_PULLUP | MUX_MODE7) /* lcd_plck FIX STO should be a OUTPUT driven high*/
  59. 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_crs.rmii1_crs_dv */
  60. 0x114 (PIN_OUTPUT | MUX_MODE1) /* mii1_txen.mii1_txen */
  61. 0x124 (PIN_OUTPUT | MUX_MODE1) /* mii1_txd1.mii1_txd1 */
  62. 0x128 (PIN_OUTPUT | MUX_MODE1) /* mii1_txd0.mii1_txd0 */
  63. 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd1.mii1_rxd1 */
  64. 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd0.mii1_rxd0 */
  65. 0x144 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii1_refclk.rmii1_refclk */
  66. >;
  67. };
  68. cpsw_sleep: cpsw_sleep {
  69. pinctrl-single,pins = <
  70. 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7)
  71. 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  72. 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  73. 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  74. 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
  75. 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  76. 0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  77. >;
  78. };
  79. davinci_mdio_default: davinci_mdio_default {
  80. pinctrl-single,pins = <
  81. /* MDIO */
  82. 0x148 (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
  83. 0x14c (PIN_OUTPUT | MUX_MODE0) /* mdio_clk.mdio_clk */
  84. >;
  85. };
  86. davinci_mdio_sleep: davinci_mdio_sleep {
  87. pinctrl-single,pins = <
  88. /* MDIO reset value */
  89. 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  90. 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
  91. >;
  92. };
  93. gpio_mdio_default: gpio_mdio_default {
  94. pinctrl-single,pins = <
  95. /* MDIO via GPIO */
  96. 0x148 (PIN_INPUT | MUX_MODE7) /* mdio_data.mdio_data GPIO0_0 */
  97. 0x14c (PIN_OUTPUT | MUX_MODE7) /* mdio_clk.mdio_clk GPIO0_1 */
  98. >;
  99. };
  100. };
  101. &mac {
  102. pinctrl-names = "default", "sleep";
  103. pinctrl-0 = <&cpsw_default>;
  104. pinctrl-1 = <&cpsw_sleep>;
  105. slaves = <1>; /* use only one emac if */
  106. mdio0: gpio {
  107. compatible = "virtual,mdio-gpio";
  108. pinctrl-names = "default";
  109. pinctrl-0 = <&gpio_mdio_default>;
  110. #address-cells = <1>;
  111. #size-cells = <0>;
  112. gpios = <&gpio0 1 GPIO_ACTIVE_HIGH /* MDIO-CLK */
  113. &gpio0 0 GPIO_ACTIVE_HIGH>; /* MDIO-DATA */
  114. phy0: ethernet-phy@1 {
  115. reg = <0>;
  116. };
  117. };
  118. };
  119. /* Disable davinci/am335x mdio interface on this platform */
  120. &davinci_mdio {
  121. pinctrl-names = "default", "sleep";
  122. pinctrl-0 = <&davinci_mdio_default>;
  123. pinctrl-1 = <&davinci_mdio_sleep>;
  124. status = "disabled";
  125. };
  126. &cpsw_emac0 {
  127. phy_id = <&mdio0>, <0>;
  128. phy-mode = "rmii";
  129. };
  130. &phy_sel {
  131. rmii-clock-ext;
  132. };