stm32mp157c-lxa-mc1.dts 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. /* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause) */
  2. /*
  3. * Copyright (C) 2020 STMicroelectronics - All Rights Reserved
  4. * Copyright (C) 2020 Ahmad Fatoum, Pengutronix
  5. */
  6. /dts-v1/;
  7. #include "stm32mp157.dtsi"
  8. #include "stm32mp15xx-osd32.dtsi"
  9. #include "stm32mp15xxac-pinctrl.dtsi"
  10. #include <dt-bindings/gpio/gpio.h>
  11. #include <dt-bindings/pwm/pwm.h>
  12. / {
  13. model = "Linux Automation MC-1 board";
  14. compatible = "lxa,stm32mp157c-mc1", "oct,stm32mp15xx-osd32", "st,stm32mp157";
  15. aliases {
  16. ethernet0 = &ethernet0;
  17. mmc0 = &sdmmc1;
  18. mmc1 = &sdmmc2;
  19. serial0 = &uart4;
  20. };
  21. backlight: backlight {
  22. compatible = "pwm-backlight";
  23. pwms = <&backlight_pwm 1 100000 PWM_POLARITY_INVERTED>;
  24. brightness-levels = <0 31 63 95 127 159 191 223 255>;
  25. default-brightness-level = <7>;
  26. power-supply = <&reg_5v2>; /* 3V3_BACKLIGHT */
  27. };
  28. chosen {
  29. stdout-path = &uart4;
  30. };
  31. led-controller-0 {
  32. compatible = "gpio-leds";
  33. led-0 {
  34. label = "mc1:green:act";
  35. gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
  36. linux,default-trigger = "heartbeat";
  37. };
  38. };
  39. led-controller-1 {
  40. compatible = "pwm-leds";
  41. /* led-1 to led-3 are part of a single RGB led */
  42. led-1 {
  43. label = "mc1:red:rgb";
  44. pwms = <&leds_pwm 1 1000000 0>;
  45. max-brightness = <255>;
  46. active-low;
  47. };
  48. led-2 {
  49. label = "mc1:green:rgb";
  50. pwms = <&leds_pwm 2 1000000 0>;
  51. max-brightness = <255>;
  52. active-low;
  53. };
  54. led-3 {
  55. label = "mc1:blue:rgb";
  56. pwms = <&leds_pwm 3 1000000 0>;
  57. max-brightness = <255>;
  58. active-low;
  59. };
  60. };
  61. panel: panel {
  62. compatible = "edt,etm0700g0edh6", "simple-panel";
  63. backlight = <&backlight>;
  64. enable-gpios = <&gpiod 4 GPIO_ACTIVE_HIGH>;
  65. power-supply = <&reg_3v3>;
  66. port {
  67. panel_input: endpoint {
  68. remote-endpoint = <&ltdc_ep0_out>;
  69. };
  70. };
  71. };
  72. reg_3v3: regulator_3v3 {
  73. compatible = "regulator-fixed";
  74. regulator-name = "3V3";
  75. regulator-min-microvolt = <3300000>;
  76. regulator-max-microvolt = <3300000>;
  77. regulator-always-on;
  78. vin-supply = <&v3v3>;
  79. };
  80. /* supplied by either debug board or PoE */
  81. reg_5v2: regulator_5v2 {
  82. compatible = "regulator-fixed";
  83. regulator-name = "5V2";
  84. regulator-min-microvolt = <5200000>;
  85. regulator-max-microvolt = <5200000>;
  86. regulator-always-on;
  87. };
  88. };
  89. &ethernet0 {
  90. pinctrl-names = "default", "sleep";
  91. pinctrl-0 = <&ethernet0_rgmii_pins_b>;
  92. pinctrl-1 = <&ethernet0_rgmii_sleep_pins_b>;
  93. phy-mode = "rgmii-id";
  94. phy-handle = <&ethphy>;
  95. status = "okay";
  96. mdio {
  97. compatible = "snps,dwmac-mdio";
  98. #address-cells = <1>;
  99. #size-cells = <0>;
  100. ethphy: ethernet-phy@3 { /* KSZ9031RN */
  101. reg = <3>;
  102. reset-gpios = <&gpiog 0 GPIO_ACTIVE_LOW>; /* ETH_RST# */
  103. interrupt-parent = <&gpioa>;
  104. interrupts = <6 IRQ_TYPE_EDGE_FALLING>; /* ETH_MDINT# */
  105. reset-assert-us = <10000>;
  106. reset-deassert-us = <300>;
  107. micrel,force-master;
  108. };
  109. };
  110. };
  111. &gpioz {
  112. gpio-line-names = "HWID0", "HWID1", "HWID2", "HWID3", "", "",
  113. "HWID4", "HWID5";
  114. };
  115. &i2c5 {
  116. pinctrl-names = "default", "sleep";
  117. pinctrl-0 = <&i2c5_pins_b>;
  118. pinctrl-1 = <&i2c5_sleep_pins_b>;
  119. clock-frequency = <400000>;
  120. status = "okay";
  121. touchscreen@38 {
  122. compatible = "edt,edt-ft5x06";
  123. interrupt-parent = <&gpiod>;
  124. interrupts = <11 IRQ_TYPE_EDGE_FALLING>; /* TOUCH_INT# */
  125. vcc-supply = <&reg_3v3>;
  126. reg = <0x38>;
  127. reset-gpios = <&gpiof 8 GPIO_ACTIVE_LOW>; /* TOUCH_RESET# */
  128. touchscreen-size-x = <1792>;
  129. touchscreen-size-y = <1024>;
  130. wakeup-source;
  131. };
  132. };
  133. &ltdc {
  134. pinctrl-names = "default", "sleep";
  135. pinctrl-0 = <&ltdc_pins_c>;
  136. pinctrl-1 = <&ltdc_sleep_pins_c>;
  137. status = "okay";
  138. port {
  139. ltdc_ep0_out: endpoint@0 {
  140. reg = <0>;
  141. remote-endpoint = <&panel_input>;
  142. };
  143. };
  144. };
  145. &pmic {
  146. regulators {
  147. buck4-supply = <&reg_5v2>; /* VIN */
  148. ldo2-supply = <&reg_5v2>; /* PMIC_LDO25IN */
  149. ldo5-supply = <&reg_5v2>; /* PMIC_LDO25IN */
  150. boost-supply = <&reg_5v2>; /* PMIC_BSTIN */
  151. pwr_sw2-supply = <&bst_out>; /* PMIC_SWIN */
  152. };
  153. };
  154. &sdmmc1 {
  155. pinctrl-names = "default", "opendrain", "sleep";
  156. pinctrl-0 = <&sdmmc1_b4_pins_a>;
  157. pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
  158. pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
  159. bus-width = <4>;
  160. cd-gpios = <&gpioh 3 GPIO_ACTIVE_LOW>;
  161. disable-wp;
  162. no-1-8-v;
  163. st,neg-edge;
  164. vmmc-supply = <&reg_3v3>;
  165. status = "okay";
  166. };
  167. &sdmmc1_b4_pins_a {
  168. /*
  169. * board lacks external pull-ups on SDMMC lines. Class 10 SD refuses to
  170. * work, thus enable internal pull-ups.
  171. */
  172. pins1 {
  173. /delete-property/ bias-disable;
  174. bias-pull-up;
  175. };
  176. pins2 {
  177. /delete-property/ bias-disable;
  178. bias-pull-up;
  179. };
  180. };
  181. &sdmmc2 {
  182. pinctrl-names = "default", "opendrain", "sleep";
  183. pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_b>;
  184. pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_b>;
  185. pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_b>;
  186. bus-width = <8>;
  187. mmc-ddr-3_3v;
  188. no-1-8-v;
  189. no-sd;
  190. no-sdio;
  191. non-removable;
  192. st,neg-edge;
  193. vmmc-supply = <&reg_3v3>;
  194. status = "okay";
  195. };
  196. &timers3 {
  197. status = "okay";
  198. backlight_pwm: pwm {
  199. pinctrl-names = "default", "sleep";
  200. pinctrl-0 = <&pwm3_pins_b>;
  201. pinctrl-1 = <&pwm3_sleep_pins_b>;
  202. status = "okay";
  203. };
  204. };
  205. &timers5 {
  206. status = "okay";
  207. leds_pwm: pwm {
  208. pinctrl-names = "default", "sleep";
  209. pinctrl-0 = <&pwm5_pins_b>;
  210. pinctrl-1 = <&pwm5_sleep_pins_b>;
  211. status = "okay";
  212. };
  213. };
  214. &uart4 {
  215. pinctrl-names = "default";
  216. pinctrl-0 = <&uart4_pins_a>;
  217. /delete-property/dmas;
  218. /delete-property/dma-names;
  219. status = "okay";
  220. };