fsl-ls1028a-kontron-sl28.dts 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Device Tree file for the Kontron SMARC-sAL28 board.
  4. *
  5. * Copyright (C) 2021 Michael Walle <[email protected]>
  6. *
  7. */
  8. /dts-v1/;
  9. #include "fsl-ls1028a.dtsi"
  10. #include <dt-bindings/interrupt-controller/irq.h>
  11. #include <dt-bindings/gpio/gpio.h>
  12. #include <dt-bindings/input/input.h>
  13. / {
  14. model = "Kontron SMARC-sAL28";
  15. compatible = "kontron,sl28", "fsl,ls1028a";
  16. aliases {
  17. crypto = &crypto;
  18. serial0 = &duart0;
  19. serial1 = &duart1;
  20. serial2 = &lpuart1;
  21. spi0 = &fspi;
  22. spi1 = &dspi2;
  23. mmc0 = &esdhc1;
  24. mmc1 = &esdhc;
  25. rtc0 = &rtc;
  26. rtc1 = &ftm_alarm0;
  27. };
  28. buttons0 {
  29. compatible = "gpio-keys";
  30. power-button {
  31. interrupts-extended = <&sl28cpld_intc
  32. 4 IRQ_TYPE_EDGE_BOTH>;
  33. linux,code = <KEY_POWER>;
  34. label = "Power";
  35. };
  36. sleep-button {
  37. interrupts-extended = <&sl28cpld_intc
  38. 5 IRQ_TYPE_EDGE_BOTH>;
  39. linux,code = <KEY_SLEEP>;
  40. label = "Sleep";
  41. };
  42. };
  43. buttons1 {
  44. compatible = "gpio-keys-polled";
  45. poll-interval = <200>;
  46. lid-switch {
  47. linux,input-type = <EV_SW>;
  48. linux,code = <SW_LID>;
  49. gpios = <&sl28cpld_gpio3 4 GPIO_ACTIVE_LOW>;
  50. label = "Lid";
  51. };
  52. };
  53. chosen {
  54. stdout-path = "serial0:115200n8";
  55. };
  56. };
  57. &can0 {
  58. status = "okay";
  59. };
  60. &dspi2 {
  61. status = "okay";
  62. };
  63. &duart0 {
  64. status = "okay";
  65. };
  66. &duart1 {
  67. status = "okay";
  68. };
  69. &enetc_mdio_pf3 {
  70. phy0: ethernet-phy@5 {
  71. reg = <0x5>;
  72. eee-broken-1000t;
  73. eee-broken-100tx;
  74. };
  75. };
  76. &enetc_port0 {
  77. phy-handle = <&phy0>;
  78. phy-mode = "sgmii";
  79. managed = "in-band-status";
  80. status = "okay";
  81. };
  82. &esdhc {
  83. sd-uhs-sdr104;
  84. sd-uhs-sdr50;
  85. sd-uhs-sdr25;
  86. sd-uhs-sdr12;
  87. status = "okay";
  88. };
  89. &esdhc1 {
  90. mmc-hs200-1_8v;
  91. mmc-hs400-1_8v;
  92. bus-width = <8>;
  93. status = "okay";
  94. };
  95. &fspi {
  96. status = "okay";
  97. flash@0 {
  98. compatible = "jedec,spi-nor";
  99. m25p,fast-read;
  100. spi-max-frequency = <133000000>;
  101. reg = <0>;
  102. /* The following setting enables 1-1-2 (CMD-ADDR-DATA) mode */
  103. spi-rx-bus-width = <2>; /* 2 SPI Rx lines */
  104. spi-tx-bus-width = <1>; /* 1 SPI Tx line */
  105. partitions {
  106. compatible = "fixed-partitions";
  107. #address-cells = <1>;
  108. #size-cells = <1>;
  109. partition@0 {
  110. reg = <0x000000 0x010000>;
  111. label = "rcw";
  112. read-only;
  113. };
  114. partition@10000 {
  115. reg = <0x010000 0x1d0000>;
  116. label = "failsafe bootloader";
  117. read-only;
  118. };
  119. partition@200000 {
  120. reg = <0x200000 0x010000>;
  121. label = "configuration store";
  122. };
  123. partition@210000 {
  124. reg = <0x210000 0x1d0000>;
  125. label = "bootloader";
  126. };
  127. partition@3e0000 {
  128. reg = <0x3e0000 0x020000>;
  129. label = "bootloader environment";
  130. };
  131. };
  132. };
  133. };
  134. &ftm_alarm0 {
  135. status = "okay";
  136. };
  137. &gpio1 {
  138. gpio-line-names =
  139. "", "", "", "", "", "", "", "",
  140. "", "", "", "", "", "", "", "",
  141. "", "", "", "", "", "", "TDO", "TCK",
  142. "", "", "", "", "", "", "", "";
  143. };
  144. &gpio2 {
  145. gpio-line-names =
  146. "", "", "", "", "", "", "TMS", "TDI",
  147. "", "", "", "", "", "", "", "",
  148. "", "", "", "", "", "", "", "",
  149. "", "", "", "", "", "", "", "";
  150. };
  151. &i2c0 {
  152. status = "okay";
  153. rtc: rtc@32 {
  154. compatible = "microcrystal,rv8803";
  155. reg = <0x32>;
  156. };
  157. sl28cpld@4a {
  158. compatible = "kontron,sl28cpld";
  159. reg = <0x4a>;
  160. #address-cells = <1>;
  161. #size-cells = <0>;
  162. watchdog@4 {
  163. compatible = "kontron,sl28cpld-wdt";
  164. reg = <0x4>;
  165. kontron,assert-wdt-timeout-pin;
  166. };
  167. hwmon@b {
  168. compatible = "kontron,sl28cpld-fan";
  169. reg = <0xb>;
  170. };
  171. sl28cpld_pwm0: pwm@c {
  172. compatible = "kontron,sl28cpld-pwm";
  173. reg = <0xc>;
  174. #pwm-cells = <2>;
  175. };
  176. sl28cpld_pwm1: pwm@e {
  177. compatible = "kontron,sl28cpld-pwm";
  178. reg = <0xe>;
  179. #pwm-cells = <2>;
  180. };
  181. sl28cpld_gpio0: gpio@10 {
  182. compatible = "kontron,sl28cpld-gpio";
  183. reg = <0x10>;
  184. interrupts-extended = <&gpio2 6
  185. IRQ_TYPE_EDGE_FALLING>;
  186. gpio-controller;
  187. #gpio-cells = <2>;
  188. gpio-line-names =
  189. "GPIO0_CAM0_PWR_N", "GPIO1_CAM1_PWR_N",
  190. "GPIO2_CAM0_RST_N", "GPIO3_CAM1_RST_N",
  191. "GPIO4_HDA_RST_N", "GPIO5_PWM_OUT",
  192. "GPIO6_TACHIN", "GPIO7";
  193. interrupt-controller;
  194. #interrupt-cells = <2>;
  195. };
  196. sl28cpld_gpio1: gpio@15 {
  197. compatible = "kontron,sl28cpld-gpio";
  198. reg = <0x15>;
  199. interrupts-extended = <&gpio2 6
  200. IRQ_TYPE_EDGE_FALLING>;
  201. gpio-controller;
  202. #gpio-cells = <2>;
  203. gpio-line-names =
  204. "GPIO8", "GPIO9", "GPIO10", "GPIO11",
  205. "", "", "", "";
  206. interrupt-controller;
  207. #interrupt-cells = <2>;
  208. };
  209. sl28cpld_gpio2: gpio@1a {
  210. compatible = "kontron,sl28cpld-gpo";
  211. reg = <0x1a>;
  212. gpio-controller;
  213. #gpio-cells = <2>;
  214. gpio-line-names =
  215. "LCD0 voltage enable",
  216. "LCD0 backlight enable",
  217. "eMMC reset", "LVDS bridge reset",
  218. "LVDS bridge power-down",
  219. "SDIO power enable",
  220. "", "";
  221. };
  222. sl28cpld_gpio3: gpio@1b {
  223. compatible = "kontron,sl28cpld-gpi";
  224. reg = <0x1b>;
  225. gpio-controller;
  226. #gpio-cells = <2>;
  227. gpio-line-names =
  228. "Power button", "Force recovery", "Sleep",
  229. "Battery low", "Lid state", "Charging",
  230. "Charger present", "";
  231. };
  232. sl28cpld_intc: interrupt-controller@1c {
  233. compatible = "kontron,sl28cpld-intc";
  234. reg = <0x1c>;
  235. interrupts-extended = <&gpio2 6
  236. IRQ_TYPE_EDGE_FALLING>;
  237. interrupt-controller;
  238. #interrupt-cells = <2>;
  239. };
  240. };
  241. eeprom@50 {
  242. compatible = "atmel,24c32";
  243. reg = <0x50>;
  244. pagesize = <32>;
  245. };
  246. };
  247. &i2c3 {
  248. status = "okay";
  249. };
  250. &i2c4 {
  251. status = "okay";
  252. eeprom@50 {
  253. compatible = "atmel,24c32";
  254. reg = <0x50>;
  255. pagesize = <32>;
  256. };
  257. };
  258. &lpuart1 {
  259. status = "okay";
  260. };
  261. &mscc_felix_port4 {
  262. dsa-tag-protocol = "ocelot-8021q";
  263. };
  264. &mscc_felix_port5 {
  265. dsa-tag-protocol = "ocelot-8021q";
  266. };
  267. &usb0 {
  268. status = "okay";
  269. };
  270. &usb1 {
  271. dr_mode = "host";
  272. status = "okay";
  273. };