am437x-cm-t43.dts 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (C) 2015 CompuLab, Ltd. - http://www.compulab.co.il/
  4. */
  5. /dts-v1/;
  6. #include <dt-bindings/pinctrl/am43xx.h>
  7. #include <dt-bindings/gpio/gpio.h>
  8. #include <dt-bindings/interrupt-controller/irq.h>
  9. #include "am4372.dtsi"
  10. / {
  11. model = "CompuLab CM-T43";
  12. compatible = "compulab,am437x-cm-t43", "ti,am4372", "ti,am43";
  13. leds {
  14. compatible = "gpio-leds";
  15. ledb {
  16. label = "cm-t43:green";
  17. gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
  18. linux,default-trigger = "heartbeat";
  19. };
  20. };
  21. vmmc_3v3: fixedregulator-v3_3 {
  22. compatible = "regulator-fixed";
  23. regulator-name = "vmmc_3v3";
  24. regulator-min-microvolt = <3300000>;
  25. regulator-max-microvolt = <3300000>;
  26. regulator-always-on;
  27. enable-active-high;
  28. };
  29. };
  30. &am43xx_pinmux {
  31. pinctrl-names = "default";
  32. pinctrl-0 = <&cm_t43_led_pins>;
  33. cm_t43_led_pins: cm_t43_led_pins {
  34. pinctrl-single,pins = <
  35. AM4372_IOPAD(0xa78, MUX_MODE7)
  36. >;
  37. };
  38. i2c0_pins: i2c0_pins {
  39. pinctrl-single,pins = <
  40. AM4372_IOPAD(0x988, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* i2c0_sda.i2c0_sda */
  41. AM4372_IOPAD(0x98c, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* i2c0_scl.i2c0_scl */
  42. >;
  43. };
  44. emmc_pins: emmc_pins {
  45. pinctrl-single,pins = <
  46. AM4372_IOPAD(0x820, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad8.mmc1_dat0 */
  47. AM4372_IOPAD(0x824, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad9.mmc1_dat1 */
  48. AM4372_IOPAD(0x828, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad10.mmc1_dat2 */
  49. AM4372_IOPAD(0x82c, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad11.mmc1_dat3 */
  50. AM4372_IOPAD(0x830, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad12.mmc1_dat4 */
  51. AM4372_IOPAD(0x834, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad13.mmc1_dat5 */
  52. AM4372_IOPAD(0x838, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad14.mmc1_dat6 */
  53. AM4372_IOPAD(0x83c, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad15.mmc1_dat7 */
  54. AM4372_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
  55. AM4372_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
  56. >;
  57. };
  58. spi0_pins: pinmux_spi0_pins {
  59. pinctrl-single,pins = <
  60. AM4372_IOPAD(0x950, PIN_INPUT | MUX_MODE0) /* spi0_sclk.spi0_sclk */
  61. AM4372_IOPAD(0x954, PIN_INPUT | MUX_MODE0) /* spi0_d0.spi0_d0 */
  62. AM4372_IOPAD(0x958, PIN_OUTPUT | MUX_MODE0) /* spi0_d1.spi0_d1 */
  63. AM4372_IOPAD(0x95C, PIN_OUTPUT | MUX_MODE0) /* spi0_cs0.spi0_cs0 */
  64. >;
  65. };
  66. nand_flash_x8: nand_flash_x8 {
  67. pinctrl-single,pins = <
  68. AM4372_IOPAD(0x800, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
  69. AM4372_IOPAD(0x804, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
  70. AM4372_IOPAD(0x808, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
  71. AM4372_IOPAD(0x80c, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
  72. AM4372_IOPAD(0x810, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
  73. AM4372_IOPAD(0x814, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
  74. AM4372_IOPAD(0x818, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
  75. AM4372_IOPAD(0x81c, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
  76. AM4372_IOPAD(0x870, PIN_INPUT_PULLUP | MUX_MODE0)
  77. AM4372_IOPAD(0x874, PIN_OUTPUT_PULLUP | MUX_MODE0)
  78. AM4372_IOPAD(0x87c, PIN_OUTPUT_PULLUP | MUX_MODE0)
  79. AM4372_IOPAD(0x898, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
  80. AM4372_IOPAD(0x894, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
  81. AM4372_IOPAD(0x890, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
  82. AM4372_IOPAD(0x89c, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
  83. >;
  84. };
  85. cpsw_default: cpsw_default {
  86. pinctrl-single,pins = <
  87. /* Slave 1 */
  88. AM4372_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_txen */
  89. AM4372_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxdv.rgmii1_rxctl */
  90. AM4372_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_txd3 */
  91. AM4372_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_txd2 */
  92. AM4372_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_txd1 */
  93. AM4372_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_txd0 */
  94. AM4372_IOPAD(0x92c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rmii1_tclk */
  95. AM4372_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxclk.rmii1_rclk */
  96. AM4372_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd1.rgmii1_rxd3 */
  97. AM4372_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd0.rgmii1_rxd2 */
  98. AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd1.rgmii1_rxd1 */
  99. AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd0.rgmii1_rxd0 */
  100. AM4372_IOPAD(0xa74, MUX_MODE3)
  101. /* Slave 2 */
  102. AM4372_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a0.txen */
  103. AM4372_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a1.rxctl */
  104. AM4372_IOPAD(0x848, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a2.txd3 */
  105. AM4372_IOPAD(0x84c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a3.txd2 */
  106. AM4372_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a4.txd1 */
  107. AM4372_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a5.txd0 */
  108. AM4372_IOPAD(0x858, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a6.tclk */
  109. AM4372_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a7.rclk */
  110. AM4372_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a8.rxd3 */
  111. AM4372_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a9.rxd2 */
  112. AM4372_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a10.rxd1 */
  113. AM4372_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a11.rxd0 */
  114. AM4372_IOPAD(0xa38, MUX_MODE7)
  115. >;
  116. };
  117. davinci_mdio_default: davinci_mdio_default {
  118. pinctrl-single,pins = <
  119. /* MDIO */
  120. AM4372_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
  121. AM4372_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */
  122. >;
  123. };
  124. };
  125. &gpmc {
  126. status = "okay";
  127. pinctrl-names = "default";
  128. pinctrl-0 = <&nand_flash_x8>;
  129. ranges = <0 0 0x08000000 0x1000000>;
  130. nand@0,0 {
  131. compatible = "ti,omap2-nand";
  132. reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
  133. interrupt-parent = <&gpmc>;
  134. interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
  135. <1 IRQ_TYPE_NONE>; /* termcount */
  136. ti,nand-ecc-opt = "bch8";
  137. ti,elm-id = <&elm>;
  138. nand-bus-width = <8>;
  139. gpmc,device-width = <1>;
  140. gpmc,sync-clk-ps = <0>;
  141. gpmc,cs-on-ns = <0>;
  142. gpmc,cs-rd-off-ns = <44>;
  143. gpmc,cs-wr-off-ns = <44>;
  144. gpmc,adv-on-ns = <6>;
  145. gpmc,adv-rd-off-ns = <34>;
  146. gpmc,adv-wr-off-ns = <44>;
  147. gpmc,we-on-ns = <0>;
  148. gpmc,we-off-ns = <40>;
  149. gpmc,oe-on-ns = <0>;
  150. gpmc,oe-off-ns = <54>;
  151. gpmc,access-ns = <64>;
  152. gpmc,rd-cycle-ns = <82>;
  153. gpmc,wr-cycle-ns = <82>;
  154. gpmc,bus-turnaround-ns = <0>;
  155. gpmc,cycle2cycle-delay-ns = <0>;
  156. gpmc,clk-activation-ns = <0>;
  157. gpmc,wr-access-ns = <40>;
  158. gpmc,wr-data-mux-bus-ns = <0>;
  159. #address-cells = <1>;
  160. #size-cells = <1>;
  161. /* MTD partition table */
  162. partition@0 {
  163. label = "kernel";
  164. reg = <0x0 0x00980000>;
  165. };
  166. partition@980000 {
  167. label = "dtb";
  168. reg = <0x00980000 0x00080000>;
  169. };
  170. partition@a00000 {
  171. label = "rootfs";
  172. reg = <0x00a00000 0x0>;
  173. };
  174. };
  175. };
  176. &i2c0 {
  177. status = "okay";
  178. pinctrl-names = "default";
  179. pinctrl-0 = <&i2c0_pins>;
  180. clock-frequency = <100000>;
  181. tps65218: tps65218@24 {
  182. compatible = "ti,tps65218";
  183. reg = <0x24>;
  184. interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* NMIn */
  185. interrupt-parent = <&gic>;
  186. interrupt-controller;
  187. #interrupt-cells = <2>;
  188. dcdc1: regulator-dcdc1 {
  189. regulator-name = "vdd_core";
  190. regulator-min-microvolt = <912000>;
  191. regulator-max-microvolt = <1144000>;
  192. regulator-boot-on;
  193. regulator-always-on;
  194. };
  195. dcdc2: regulator-dcdc2 {
  196. regulator-name = "vdd_mpu";
  197. regulator-min-microvolt = <912000>;
  198. regulator-max-microvolt = <1378000>;
  199. regulator-boot-on;
  200. regulator-always-on;
  201. };
  202. dcdc3: regulator-dcdc3 {
  203. regulator-name = "vdcdc3";
  204. regulator-suspend-enable;
  205. regulator-min-microvolt = <1500000>;
  206. regulator-max-microvolt = <1500000>;
  207. regulator-boot-on;
  208. regulator-always-on;
  209. };
  210. dcdc5: regulator-dcdc5 {
  211. regulator-name = "v1_0bat";
  212. regulator-min-microvolt = <1000000>;
  213. regulator-max-microvolt = <1000000>;
  214. regulator-boot-on;
  215. regulator-always-on;
  216. };
  217. dcdc6: regulator-dcdc6 {
  218. regulator-name = "v1_8bat";
  219. regulator-min-microvolt = <1800000>;
  220. regulator-max-microvolt = <1800000>;
  221. regulator-boot-on;
  222. regulator-always-on;
  223. };
  224. ldo1: regulator-ldo1 {
  225. regulator-min-microvolt = <1800000>;
  226. regulator-max-microvolt = <1800000>;
  227. regulator-boot-on;
  228. regulator-always-on;
  229. };
  230. };
  231. eeprom_module: at24@50 {
  232. compatible = "atmel,24c02";
  233. reg = <0x50>;
  234. pagesize = <16>;
  235. };
  236. };
  237. &gpio0 {
  238. status = "okay";
  239. };
  240. &gpio1 {
  241. status = "okay";
  242. };
  243. &gpio2 {
  244. status = "okay";
  245. };
  246. &gpio3 {
  247. status = "okay";
  248. };
  249. &gpio4 {
  250. status = "okay";
  251. };
  252. &gpio5 {
  253. status = "okay";
  254. };
  255. &mmc2 {
  256. status = "okay";
  257. pinctrl-names = "default";
  258. pinctrl-0 = <&emmc_pins>;
  259. vmmc-supply = <&vmmc_3v3>;
  260. bus-width = <8>;
  261. non-removable;
  262. };
  263. &spi0 {
  264. status = "okay";
  265. pinctrl-names = "default";
  266. pinctrl-0 = <&spi0_pins>;
  267. dmas = <&edma 16 0
  268. &edma 17 0>;
  269. dma-names = "tx0", "rx0";
  270. flash: flash@0 {
  271. #address-cells = <1>;
  272. #size-cells = <1>;
  273. compatible = "jedec,spi-nor";
  274. reg = <0>;
  275. spi-max-frequency = <20000000>;
  276. partition@0 {
  277. label = "uboot";
  278. reg = <0x0 0xc0000>;
  279. };
  280. partition@c0000 {
  281. label = "uboot environment";
  282. reg = <0xc0000 0x40000>;
  283. };
  284. partition@100000 {
  285. label = "reserved";
  286. reg = <0x100000 0x100000>;
  287. };
  288. };
  289. };
  290. &mac_sw {
  291. pinctrl-names = "default";
  292. pinctrl-0 = <&cpsw_default>;
  293. status = "okay";
  294. };
  295. &davinci_mdio_sw {
  296. pinctrl-names = "default";
  297. pinctrl-0 = <&davinci_mdio_default>;
  298. ethphy0: ethernet-phy@0 {
  299. reg = <0>;
  300. };
  301. ethphy1: ethernet-phy@1 {
  302. reg = <1>;
  303. };
  304. };
  305. &cpsw_port1 {
  306. phy-handle = <&ethphy0>;
  307. phy-mode = "rgmii-txid";
  308. ti,dual-emac-pvid = <1>;
  309. };
  310. &cpsw_port2 {
  311. phy-handle = <&ethphy1>;
  312. phy-mode = "rgmii-txid";
  313. ti,dual-emac-pvid = <2>;
  314. };
  315. &dwc3_1 {
  316. status = "okay";
  317. };
  318. &usb2_phy1 {
  319. status = "okay";
  320. };
  321. &usb1 {
  322. dr_mode = "host";
  323. status = "okay";
  324. };
  325. &dwc3_2 {
  326. status = "okay";
  327. };
  328. &usb2_phy2 {
  329. status = "okay";
  330. };
  331. &usb2 {
  332. dr_mode = "host";
  333. status = "okay";
  334. interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>,
  335. <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>,
  336. <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
  337. interrupt-names = "peripheral", "host", "otg";
  338. };
  339. &elm {
  340. status = "okay";
  341. };
  342. &uart0 {
  343. status = "okay";
  344. };
  345. &tscadc {
  346. status = "okay";
  347. tsc {
  348. ti,wires = <4>;
  349. ti,x-plate-resistance = <200>;
  350. ti,coordinate-readouts = <5>;
  351. ti,wire-config = <0x00 0x11 0x22 0x33>;
  352. };
  353. adc {
  354. ti,adc-channels = <4 5 6 7>;
  355. };
  356. };
  357. &cpu {
  358. cpu0-supply = <&dcdc2>;
  359. operating-points = <1000000 1330000>,
  360. <800000 1260000>,
  361. <720000 1200000>,
  362. <600000 1100000>,
  363. <300000 950000>;
  364. };
  365. &pruss1_mdio {
  366. status = "disabled";
  367. };