0001-BeagleBone-AI-support.patch 64 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783
  1. From 989c27c791a453550ff6c1440b41c55c6e70615d Mon Sep 17 00:00:00 2001
  2. From: Jason Kridner <jdk@ti.com>
  3. Date: Wed, 27 Mar 2019 14:06:24 -0400
  4. Subject: [PATCH] BeagleBone AI support
  5. Patch from:
  6. https://github.com/beagleboard/beaglebone-ai/blob/master/SW/buildroot/local/patches/uboot/0001-BeagleBone-AI-support.patch
  7. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
  8. ---
  9. arch/arm/dts/Makefile | 1 +
  10. arch/arm/dts/am5729-beagleboneai.dts | 494 +++++++++++++++++++++++++++
  11. arch/arm/mach-omap2/omap5/hw_data.c | 3 +-
  12. board/ti/am57xx/board.c | 134 +++++++-
  13. board/ti/am57xx/mux_data.h | 390 +++++++++++++++++++++
  14. configs/am57xx_evm_defconfig | 10 +-
  15. include/configs/am57xx_evm.h | 2 +-
  16. include/configs/ti_armv7_common.h | 357 +++++++++++++++++++
  17. include/configs/ti_omap5_common.h | 5 +
  18. include/environment/ti/boot.h | 49 +--
  19. include/environment/ti/mmc.h | 45 ++-
  20. 11 files changed, 1447 insertions(+), 43 deletions(-)
  21. create mode 100644 arch/arm/dts/am5729-beagleboneai.dts
  22. diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
  23. index 2a040b20a5..6771d457a4 100644
  24. --- a/arch/arm/dts/Makefile
  25. +++ b/arch/arm/dts/Makefile
  26. @@ -232,6 +232,7 @@ dtb-$(CONFIG_TARGET_DRA7XX_EVM) += dra72-evm.dtb dra7-evm.dtb \
  27. dtb-$(CONFIG_TARGET_AM57XX_EVM) += am57xx-beagle-x15.dtb \
  28. am57xx-beagle-x15-revb1.dtb \
  29. am57xx-beagle-x15-revc.dtb \
  30. + am5729-beagleboneai.dtb \
  31. am574x-idk.dtb \
  32. am572x-idk.dtb \
  33. am571x-idk.dtb
  34. diff --git a/arch/arm/dts/am5729-beagleboneai.dts b/arch/arm/dts/am5729-beagleboneai.dts
  35. new file mode 100644
  36. index 0000000000..d1afe55751
  37. --- /dev/null
  38. +++ b/arch/arm/dts/am5729-beagleboneai.dts
  39. @@ -0,0 +1,494 @@
  40. +/*
  41. + * Copyright (C) 2014-2018 Texas Instruments Incorporated - http://www.ti.com/
  42. + *
  43. + * This program is free software; you can redistribute it and/or modify
  44. + * it under the terms of the GNU General Public License version 2 as
  45. + * published by the Free Software Foundation.
  46. + */
  47. +/dts-v1/;
  48. +
  49. +#include "dra74x.dtsi"
  50. +#include "am57xx-commercial-grade.dtsi"
  51. +#include "dra74x-mmc-iodelay.dtsi"
  52. +#include <dt-bindings/gpio/gpio.h>
  53. +#include <dt-bindings/interrupt-controller/irq.h>
  54. +#include <dt-bindings/pinctrl/dra.h>
  55. +
  56. +/ {
  57. + model = "BeagleBoard.org BeagleBone AI";
  58. + compatible = "beagleboard.org,am57xx-beagleboneai", "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7";
  59. +
  60. + chosen {
  61. + stdout-path = &uart1;
  62. + };
  63. +
  64. + memory@0 {
  65. + device_type = "memory";
  66. + reg = <0x0 0x80000000 0x0 0x40000000>;
  67. + };
  68. +
  69. + vdd_5v: fixedregulator-vdd_5v {
  70. + compatible = "regulator-fixed";
  71. + regulator-name = "vdd_5v";
  72. + regulator-min-microvolt = <5000000>;
  73. + regulator-max-microvolt = <5000000>;
  74. + regulator-always-on;
  75. + regulator-boot-on;
  76. + };
  77. +
  78. + vtt_fixed: fixedregulator-vtt {
  79. + /* TPS51200 */
  80. + compatible = "regulator-fixed";
  81. + regulator-name = "vtt_fixed";
  82. + vin-supply = <&vdd_3v3>;
  83. + regulator-min-microvolt = <3300000>;
  84. + regulator-max-microvolt = <3300000>;
  85. + regulator-always-on;
  86. + regulator-boot-on;
  87. + };
  88. +
  89. + src_clk_x1: src_clk_x1 {
  90. + #clock-cells = <0>;
  91. + compatible = "fixed-clock";
  92. + clock-frequency = <20000000>;
  93. + };
  94. +
  95. + src_clk_osc1: src_clk_osc1 {
  96. + #clock-cells = <0>;
  97. + compatible = "fixed-clock";
  98. + clock-frequency = <24000000>;
  99. + };
  100. +
  101. + src_clk_osc4: src_clk_osc4 {
  102. + #clock-cells = <0>;
  103. + compatible = "fixed-clock";
  104. + clock-frequency = <24000000>;
  105. + };
  106. +
  107. + leds {
  108. + compatible = "gpio-leds";
  109. +
  110. + led0 {
  111. + label = "beaglebone:green:usr0";
  112. + gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
  113. + linux,default-trigger = "heartbeat";
  114. + default-state = "off";
  115. + };
  116. +
  117. + led1 {
  118. + label = "beaglebone:green:usr1";
  119. + gpios = <&gpio3 15 GPIO_ACTIVE_HIGH>;
  120. + linux,default-trigger = "mmc0";
  121. + default-state = "off";
  122. + };
  123. +
  124. + led2 {
  125. + label = "beaglebone:green:usr2";
  126. + gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>;
  127. + linux,default-trigger = "cpu";
  128. + default-state = "off";
  129. + };
  130. +
  131. + led3 {
  132. + label = "beaglebone:green:usr3";
  133. + gpios = <&gpio3 17 GPIO_ACTIVE_HIGH>;
  134. + linux,default-trigger = "mmc1";
  135. + default-state = "off";
  136. + };
  137. + };
  138. +};
  139. +
  140. +&i2c1 {
  141. + status = "okay";
  142. + clock-frequency = <400000>;
  143. +
  144. + tps659038: tps659038@58 {
  145. + compatible = "ti,tps659038";
  146. + reg = <0x58>;
  147. + interrupts-extended = <&gpio6 16 IRQ_TYPE_LEVEL_HIGH
  148. + &dra7_pmx_core 0x418>;
  149. +
  150. + #interrupt-cells = <2>;
  151. + interrupt-controller;
  152. +
  153. + ti,system-power-controller;
  154. + ti,palmas-override-powerhold;
  155. +
  156. + tps659038_pmic {
  157. + compatible = "ti,tps659038-pmic";
  158. +
  159. + smps12-in-supply = <&vdd_5v>;
  160. + smps3-in-supply = <&vdd_5v>;
  161. + smps45-in-supply = <&vdd_5v>;
  162. + smps6-in-supply = <&vdd_5v>;
  163. + smps7-in-supply = <&vdd_5v>;
  164. + mps3-in-supply = <&vdd_5v>;
  165. + smps8-in-supply = <&vdd_5v>;
  166. + smps9-in-supply = <&vdd_5v>;
  167. + ldo1-in-supply = <&vdd_5v>;
  168. + ldo2-in-supply = <&vdd_5v>;
  169. + ldo3-in-supply = <&vdd_5v>;
  170. + ldo4-in-supply = <&vdd_5v>;
  171. + ldo9-in-supply = <&vdd_5v>;
  172. + ldoln-in-supply = <&vdd_5v>;
  173. + ldousb-in-supply = <&vdd_5v>;
  174. + ldortc-in-supply = <&vdd_5v>;
  175. +
  176. + regulators {
  177. + vdd_mpu: smps12 {
  178. + /* VDD_MPU */
  179. + regulator-name = "smps12";
  180. + regulator-min-microvolt = <850000>;
  181. + regulator-max-microvolt = <1250000>;
  182. + regulator-always-on;
  183. + regulator-boot-on;
  184. + };
  185. +
  186. + vdd_ddr: smps3 {
  187. + /* VDD_DDR EMIF1 EMIF2 */
  188. + regulator-name = "smps3";
  189. + regulator-min-microvolt = <1350000>;
  190. + regulator-max-microvolt = <1350000>;
  191. + regulator-always-on;
  192. + regulator-boot-on;
  193. + };
  194. +
  195. + vdd_dspeve: smps45 {
  196. + /* VDD_DSPEVE on AM572 */
  197. + /* VDD_IVA + VDD_DSP on AM571 */
  198. + regulator-name = "smps45";
  199. + regulator-min-microvolt = <850000>;
  200. + regulator-max-microvolt = <1250000>;
  201. + regulator-always-on;
  202. + regulator-boot-on;
  203. + };
  204. +
  205. + vdd_gpu: smps6 {
  206. + /* VDD_GPU */
  207. + regulator-name = "smps6";
  208. + regulator-min-microvolt = <850000>;
  209. + regulator-max-microvolt = <1250000>;
  210. + regulator-always-on;
  211. + regulator-boot-on;
  212. + };
  213. +
  214. + vdd_core: smps7 {
  215. + /* VDD_CORE */
  216. + regulator-name = "smps7";
  217. + regulator-min-microvolt = <850000>; /*** 1.15V */
  218. + regulator-max-microvolt = <1150000>;
  219. + regulator-always-on;
  220. + regulator-boot-on;
  221. + };
  222. +
  223. + vdd_iva: smps8 {
  224. + /* 5728 - VDD_IVAHD */ /*** 1.06V */
  225. + /* 5718 - N.C. test point */
  226. + regulator-name = "smps8";
  227. + };
  228. +
  229. + vdd_3v3: smps9 {
  230. + /* VDD_3V3 */
  231. + regulator-name = "smps9";
  232. + regulator-min-microvolt = <3300000>;
  233. + regulator-max-microvolt = <3300000>;
  234. + regulator-always-on;
  235. + regulator-boot-on;
  236. + };
  237. +
  238. + vdd_sd: ldo1 {
  239. + /* VDDSHV8 - VSDMMC */
  240. + regulator-name = "ldo1";
  241. + regulator-min-microvolt = <1800000>;
  242. + regulator-max-microvolt = <3300000>;
  243. + regulator-boot-on;
  244. + regulator-always-on;
  245. + };
  246. +
  247. + vdd_1v8: ldo2 {
  248. + /* VDDSH18V */
  249. + regulator-name = "ldo2";
  250. + regulator-min-microvolt = <1800000>;
  251. + regulator-max-microvolt = <1800000>;
  252. + regulator-always-on;
  253. + regulator-boot-on;
  254. + };
  255. +
  256. + vdd_1v8_phy_ldo3: ldo3 {
  257. + /* R1.3a 572x V1_8PHY_LDO3: USB, SATA */
  258. + regulator-name = "ldo3";
  259. + regulator-min-microvolt = <1800000>;
  260. + regulator-max-microvolt = <1800000>;
  261. + regulator-always-on;
  262. + regulator-boot-on;
  263. + };
  264. +
  265. + vdd_1v8_phy_ldo4: ldo4 {
  266. + /* R1.3a 572x V1_8PHY_LDO4: PCIE, HDMI*/
  267. + regulator-name = "ldo4";
  268. + regulator-min-microvolt = <1800000>;
  269. + regulator-max-microvolt = <1800000>;
  270. + regulator-always-on;
  271. + regulator-boot-on;
  272. + };
  273. +
  274. + /* LDO5-8 unused */
  275. +
  276. + vdd_rtc: ldo9 {
  277. + /* VDD_RTC */
  278. + regulator-name = "ldo9";
  279. + regulator-min-microvolt = <840000>;
  280. + regulator-max-microvolt = <1160000>;
  281. + regulator-always-on;
  282. + regulator-boot-on;
  283. + };
  284. +
  285. + vdd_1v8_pll: ldoln {
  286. + /* VDDA_1V8_PLL */
  287. + regulator-name = "ldoln";
  288. + regulator-min-microvolt = <1800000>;
  289. + regulator-max-microvolt = <1800000>;
  290. + regulator-always-on;
  291. + regulator-boot-on;
  292. + };
  293. +
  294. + ldousb_reg: ldousb {
  295. + /* VDDA_3V_USB: VDDA_USBHS33 */
  296. + regulator-name = "ldousb";
  297. + regulator-min-microvolt = <3300000>;
  298. + regulator-max-microvolt = <3300000>;
  299. + regulator-always-on;
  300. + regulator-boot-on;
  301. + };
  302. +
  303. + ldortc_reg: ldortc {
  304. + /* VDDA_RTC */
  305. + regulator-name = "ldortc";
  306. + regulator-min-microvolt = <1800000>;
  307. + regulator-max-microvolt = <1800000>;
  308. + regulator-always-on;
  309. + regulator-boot-on;
  310. + };
  311. +
  312. + regen1: regen1 {
  313. + /* VDD_3V3_ON */
  314. + regulator-name = "regen1";
  315. + regulator-boot-on;
  316. + regulator-always-on;
  317. + };
  318. +
  319. + regen2: regen2 {
  320. + /* Needed for PMIC internal resource */
  321. + regulator-name = "regen2";
  322. + regulator-boot-on;
  323. + regulator-always-on;
  324. + };
  325. + };
  326. + };
  327. +
  328. + tps659038_rtc: tps659038_rtc {
  329. + compatible = "ti,palmas-rtc";
  330. + interrupt-parent = <&tps659038>;
  331. + interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
  332. + wakeup-source;
  333. + };
  334. +
  335. + tps659038_pwr_button: tps659038_pwr_button {
  336. + compatible = "ti,palmas-pwrbutton";
  337. + interrupt-parent = <&tps659038>;
  338. + interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
  339. + wakeup-source;
  340. + ti,palmas-long-press-seconds = <12>;
  341. + };
  342. +
  343. + tps659038_gpio: tps659038_gpio {
  344. + compatible = "ti,palmas-gpio";
  345. + gpio-controller;
  346. + #gpio-cells = <2>;
  347. + };
  348. +
  349. + extcon_usb2: tps659038_usb {
  350. + compatible = "ti,palmas-usb-vid";
  351. + };
  352. +
  353. + };
  354. +
  355. + eeprom: eeprom@50 {
  356. + compatible = "atmel,24c32";
  357. + reg = <0x50>;
  358. + };
  359. +};
  360. +
  361. +&i2c2 {
  362. + status = "okay";
  363. + clock-frequency = <400000>;
  364. +};
  365. +
  366. +&i2c3 {
  367. + status = "okay";
  368. + clock-frequency = <400000>;
  369. +};
  370. +
  371. +&i2c4 {
  372. + status = "okay";
  373. + clock-frequency = <100000>;
  374. +};
  375. +
  376. +&i2c5 {
  377. + status = "okay";
  378. + clock-frequency = <100000>;
  379. +};
  380. +
  381. +&cpu0 {
  382. + vdd-supply = <&vdd_mpu>;
  383. + voltage-tolerance = <1>;
  384. +};
  385. +
  386. +&uart1 {
  387. + status = "okay";
  388. + interrupts-extended = <&crossbar_mpu GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
  389. + <&dra7_pmx_core 0x3e0>;
  390. +};
  391. +
  392. +&uart3 {
  393. + status = "okay";
  394. + interrupts-extended = <&crossbar_mpu GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
  395. + <&dra7_pmx_core 0x3f8>;
  396. +};
  397. +
  398. +&davinci_mdio {
  399. + reset-gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
  400. + reset-delay-us = <2>;
  401. +
  402. + phy0: ethernet-phy@1 {
  403. + reg = <4>;
  404. + };
  405. +};
  406. +
  407. +&mac {
  408. + slaves = <1>;
  409. + status = "okay";
  410. + //dual_emac;
  411. +};
  412. +
  413. +&cpsw_emac0 {
  414. + phy-handle = <&phy0>;
  415. + phy-mode = "rgmii";
  416. + //dual_emac_res_vlan = <1>;
  417. +};
  418. +
  419. +&mmc1 {
  420. + status = "okay";
  421. + vmmc-supply = <&vdd_3v3>;
  422. + vmmc_aux-supply = <&vdd_sd>;
  423. + vqmmc-supply = <&vdd_sd>; /* IO Line Power */
  424. + bus-width = <4>;
  425. + max-frequency = <24000000>;
  426. + cd-gpios = <&gpio6 27 GPIO_ACTIVE_LOW>; /* gpio 219 */
  427. +
  428. + pinctrl-names = "default", "hs", "sdr12", "sdr25", "sdr50", "ddr50", "sdr104";
  429. + pinctrl-0 = <&mmc1_pins_default>;
  430. + pinctrl-1 = <&mmc1_pins_hs>;
  431. + pinctrl-2 = <&mmc1_pins_sdr12>;
  432. + pinctrl-3 = <&mmc1_pins_sdr25>;
  433. + pinctrl-4 = <&mmc1_pins_sdr50>;
  434. + pinctrl-5 = <&mmc1_pins_ddr50 &mmc1_iodelay_ddr_rev20_conf>;
  435. + pinctrl-6 = <&mmc1_pins_sdr104 &mmc1_iodelay_sdr104_rev20_conf>;
  436. +};
  437. +
  438. +&mmc2 {
  439. + status = "okay";
  440. + vmmc-supply = <&vdd_3v3>;
  441. + //FUTURE: vqmmc-supply = <&vdd_3v3>; /* IO Line Power */
  442. + bus-width = <8>;
  443. + ti,non-removable;
  444. + non-removable;
  445. + max-frequency = <96000000>;
  446. + no-1-8-v;
  447. + /delete-property/ mmc-hs200-1_8v;
  448. +
  449. + pinctrl-names = "default", "hs";
  450. + pinctrl-0 = <&mmc2_pins_default>;
  451. + pinctrl-1 = <&mmc2_pins_hs>;
  452. +};
  453. +
  454. +&usb2_phy1 {
  455. + phy-supply = <&ldousb_reg>;
  456. +};
  457. +
  458. +&usb2_phy2 {
  459. + phy-supply = <&ldousb_reg>;
  460. +};
  461. +
  462. +&usb1 {
  463. + dr_mode = "host";
  464. +};
  465. +
  466. +&omap_dwc3_2 {
  467. + extcon = <&extcon_usb2>;
  468. +};
  469. +
  470. +&usb2 {
  471. + dr_mode = "peripheral";
  472. +};
  473. +
  474. +&cpu_trips {
  475. + cpu_alert1: cpu_alert1 {
  476. + temperature = <50000>; /* millicelsius */
  477. + hysteresis = <2000>; /* millicelsius */
  478. + type = "active";
  479. + };
  480. +};
  481. +
  482. +&cpu_cooling_maps {
  483. + map1 {
  484. + trip = <&cpu_alert1>;
  485. + };
  486. +};
  487. +
  488. +&thermal_zones {
  489. + board_thermal: board_thermal {
  490. + polling-delay-passive = <1250>; /* milliseconds */
  491. + polling-delay = <1500>; /* milliseconds */
  492. +
  493. + board_trips: trips {
  494. + board_alert0: board_alert {
  495. + temperature = <40000>; /* millicelsius */
  496. + hysteresis = <2000>; /* millicelsius */
  497. + type = "active";
  498. + };
  499. +
  500. + board_crit: board_crit {
  501. + temperature = <105000>; /* millicelsius */
  502. + hysteresis = <0>; /* millicelsius */
  503. + type = "critical";
  504. + };
  505. + };
  506. +
  507. + board_cooling_maps: cooling-maps {
  508. + map0 {
  509. + trip = <&board_alert0>;
  510. + };
  511. + };
  512. + };
  513. +};
  514. +
  515. +&mailbox5 {
  516. + status = "okay";
  517. + mbox_ipu1_ipc3x: mbox_ipu1_ipc3x {
  518. + status = "okay";
  519. + };
  520. + mbox_dsp1_ipc3x: mbox_dsp1_ipc3x {
  521. + status = "okay";
  522. + };
  523. +};
  524. +
  525. +&mailbox6 {
  526. + status = "okay";
  527. + mbox_ipu2_ipc3x: mbox_ipu2_ipc3x {
  528. + status = "okay";
  529. + };
  530. + mbox_dsp2_ipc3x: mbox_dsp2_ipc3x {
  531. + status = "okay";
  532. + };
  533. +};
  534. diff --git a/arch/arm/mach-omap2/omap5/hw_data.c b/arch/arm/mach-omap2/omap5/hw_data.c
  535. index c4a41db92a..57b23b93b5 100644
  536. --- a/arch/arm/mach-omap2/omap5/hw_data.c
  537. +++ b/arch/arm/mach-omap2/omap5/hw_data.c
  538. @@ -418,8 +418,10 @@ void enable_basic_clocks(void)
  539. (*prcm)->cm_l3init_hsmmc2_clkctrl,
  540. (*prcm)->cm_l4per_gptimer2_clkctrl,
  541. (*prcm)->cm_wkup_wdtimer2_clkctrl,
  542. + (*prcm)->cm_l4per_uart1_clkctrl,
  543. (*prcm)->cm_l4per_uart3_clkctrl,
  544. (*prcm)->cm_l4per_i2c1_clkctrl,
  545. + (*prcm)->cm_l4per_i2c4_clkctrl,
  546. #ifdef CONFIG_DRIVER_TI_CPSW
  547. (*prcm)->cm_gmac_gmac_clkctrl,
  548. #endif
  549. @@ -493,7 +495,6 @@ void enable_basic_uboot_clocks(void)
  550. (*prcm)->cm_l4per_mcspi1_clkctrl,
  551. (*prcm)->cm_l4per_i2c2_clkctrl,
  552. (*prcm)->cm_l4per_i2c3_clkctrl,
  553. - (*prcm)->cm_l4per_i2c4_clkctrl,
  554. #if defined(CONFIG_DRA7XX)
  555. (*prcm)->cm_ipu_i2c5_clkctrl,
  556. #else
  557. diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
  558. index 7063345dcc..47a8391de8 100644
  559. --- a/board/ti/am57xx/board.c
  560. +++ b/board/ti/am57xx/board.c
  561. @@ -30,6 +30,8 @@
  562. #include <dwc3-omap-uboot.h>
  563. #include <ti-usb-phy-uboot.h>
  564. #include <mmc.h>
  565. +#include <dm/uclass.h>
  566. +#include <i2c.h>
  567. #include "../common/board_detect.h"
  568. #include "mux_data.h"
  569. @@ -46,6 +48,7 @@
  570. #define board_is_am574x_idk() board_ti_is("AM574IDK")
  571. #define board_is_am572x_idk() board_ti_is("AM572IDK")
  572. #define board_is_am571x_idk() board_ti_is("AM571IDK")
  573. +#define board_is_bbai() board_ti_is("BBBBAI__") //no EEPROM...
  574. #ifdef CONFIG_DRIVER_TI_CPSW
  575. #include <cpsw.h>
  576. @@ -75,6 +78,12 @@ DECLARE_GLOBAL_DATA_PTR;
  577. #define TPS65903X_PRIMARY_SECONDARY_PAD2 0xFB
  578. #define TPS65903X_PAD2_POWERHOLD_MASK 0x20
  579. +#define CAPE_EEPROM_BUS_NUM 3
  580. +#define CAPE_EEPROM_ADDR0 0x54
  581. +#define CAPE_EEPROM_ADDR3 0x57
  582. +
  583. +#define CAPE_EEPROM_ADDR_LEN 0x10
  584. +
  585. const struct omap_sysinfo sysinfo = {
  586. "Board: UNKNOWN(BeagleBoard X15?) REV UNKNOWN\n"
  587. };
  588. @@ -84,6 +93,12 @@ static const struct dmm_lisa_map_regs beagle_x15_lisa_regs = {
  589. .is_ma_present = 0x1
  590. };
  591. +static const struct dmm_lisa_map_regs bbai_lisa_regs = {
  592. + ///FIXME: Document, where this magic number come from?
  593. + .dmm_lisa_map_3 = 0x80640100,
  594. + .is_ma_present = 0x1
  595. +};
  596. +
  597. static const struct dmm_lisa_map_regs am571x_idk_lisa_regs = {
  598. .dmm_lisa_map_3 = 0x80640100,
  599. .is_ma_present = 0x1
  600. @@ -101,6 +116,8 @@ void emif_get_dmm_regs(const struct dmm_lisa_map_regs **dmm_lisa_regs)
  601. *dmm_lisa_regs = &am571x_idk_lisa_regs;
  602. else if (board_is_am574x_idk())
  603. *dmm_lisa_regs = &am574x_idk_lisa_regs;
  604. + else if (board_is_bbai())
  605. + *dmm_lisa_regs = &bbai_lisa_regs;
  606. else
  607. *dmm_lisa_regs = &beagle_x15_lisa_regs;
  608. }
  609. @@ -502,8 +519,30 @@ void do_board_detect(void)
  610. rc = ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
  611. CONFIG_EEPROM_CHIP_ADDRESS);
  612. - if (rc)
  613. + if (rc) {
  614. printf("ti_i2c_eeprom_init failed %d\n", rc);
  615. + ti_i2c_eeprom_am_set("BBBBAI__", "A");
  616. + };
  617. +
  618. + puts("in do_board_detect\n");
  619. + printf("do_board_detect\n");
  620. +}
  621. +
  622. +void write_hex (unsigned char i)
  623. +{
  624. + char cc;
  625. +
  626. + cc = i >> 4;
  627. + cc &= 0xf;
  628. + if (cc > 9)
  629. + serial_putc (cc + 55);
  630. + else
  631. + serial_putc (cc + 48);
  632. + cc = i & 0xf;
  633. + if (cc > 9)
  634. + serial_putc (cc + 55);
  635. + else
  636. + serial_putc (cc + 48);
  637. }
  638. #else /* CONFIG_SPL_BUILD */
  639. @@ -521,6 +560,8 @@ void do_board_detect(void)
  640. if (board_is_x15())
  641. bname = "BeagleBoard X15";
  642. + else if (board_is_bbai())
  643. + bname = "BeagleBone AI";
  644. else if (board_is_am572x_evm())
  645. bname = "AM572x EVM";
  646. else if (board_is_am574x_idk())
  647. @@ -535,6 +576,23 @@ void do_board_detect(void)
  648. "Board: %s REV %s\n", bname, board_ti_get_rev());
  649. }
  650. +void write_hex (unsigned char i)
  651. +{
  652. + char cc;
  653. +
  654. + cc = i >> 4;
  655. + cc &= 0xf;
  656. + if (cc > 9)
  657. + serial_putc (cc + 55);
  658. + else
  659. + serial_putc (cc + 48);
  660. + cc = i & 0xf;
  661. + if (cc > 9)
  662. + serial_putc (cc + 55);
  663. + else
  664. + serial_putc (cc + 48);
  665. +}
  666. +
  667. static void setup_board_eeprom_env(void)
  668. {
  669. char *name = "beagle_x15";
  670. @@ -557,6 +615,8 @@ static void setup_board_eeprom_env(void)
  671. name = "am57xx_evm_reva3";
  672. else
  673. name = "am57xx_evm";
  674. + } else if (board_is_bbai()) {
  675. + name = "am5729_beagleboneai";
  676. } else if (board_is_am574x_idk()) {
  677. name = "am574x_idk";
  678. } else if (board_is_am572x_idk()) {
  679. @@ -626,7 +686,7 @@ void am57x_idk_lcd_detect(void)
  680. struct udevice *dev;
  681. /* Only valid for IDKs */
  682. - if (board_is_x15() || board_is_am572x_evm())
  683. + if (board_is_x15() || board_is_am572x_evm() || board_is_bbai())
  684. return;
  685. /* Only AM571x IDK has gpio control detect.. so check that */
  686. @@ -720,6 +780,28 @@ int board_late_init(void)
  687. am57x_idk_lcd_detect();
  688. + ///FIXME, too late!! But useful for testing function...
  689. + unsigned char addr;
  690. + struct udevice *dev;
  691. + int rc;
  692. +
  693. + for ( addr = CAPE_EEPROM_ADDR0; addr <= CAPE_EEPROM_ADDR3; addr++ ) {
  694. + puts("BeagleBone: cape eeprom: i2c_probe: 0x"); write_hex(addr); puts(":\n");
  695. + rc = i2c_get_chip_for_busnum(CAPE_EEPROM_BUS_NUM, addr, 1, &dev);
  696. + if (rc) {
  697. + printf("failed to get device for EEPROM at address 0x%x\n",
  698. + addr);
  699. +// goto out;
  700. + }
  701. +// out:
  702. + }
  703. +
  704. + if (board_is_bbai()) {
  705. + env_set("console", "ttyS0,115200n8");
  706. + } else {
  707. + env_set("console", "ttyO2,115200n8");
  708. + }
  709. +
  710. #if !defined(CONFIG_SPL_BUILD)
  711. board_ti_set_ethaddr(2);
  712. #endif
  713. @@ -762,6 +844,13 @@ void recalibrate_iodelay(void)
  714. pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am571x_idk);
  715. iod = iodelay_cfg_array_am571x_idk;
  716. iod_sz = ARRAY_SIZE(iodelay_cfg_array_am571x_idk);
  717. + } else if (board_is_bbai()) {
  718. + /* Common for X15/GPEVM */
  719. + pconf = core_padconf_array_essential_bbai;
  720. + pconf_sz = ARRAY_SIZE(core_padconf_array_essential_bbai);
  721. + /* Since full production should switch to SR2.0 */
  722. + iod = iodelay_cfg_array_bbai;
  723. + iod_sz = ARRAY_SIZE(iodelay_cfg_array_bbai);
  724. } else {
  725. /* Common for X15/GPEVM */
  726. pconf = core_padconf_array_essential_x15;
  727. @@ -863,12 +952,50 @@ const struct mmc_platform_fixups *platform_fixups_mmc(uint32_t addr)
  728. #endif
  729. #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_OS_BOOT)
  730. +
  731. +//static int eeprom_has_been_read;
  732. +//static struct id_eeprom eeprom;
  733. +
  734. +struct am335x_cape_eeprom_id {
  735. + unsigned int header;
  736. + char eeprom_rev[2];
  737. + char board_name[32];
  738. + char version[4];
  739. + char manufacture[16];
  740. + char part_number[16];
  741. + char number_of_pins[2];
  742. + char serial_number[12];
  743. + char pin_usage[140];
  744. + char vdd_3v3exp[ 2];
  745. + char vdd_5v[ 2];
  746. + char sys_5v[2];
  747. + char dc_supplied[2];
  748. +};
  749. +
  750. int spl_start_uboot(void)
  751. {
  752. /* break into full u-boot on 'c' */
  753. if (serial_tstc() && serial_getc() == 'c')
  754. return 1;
  755. + //FIXME, i2c doesn't see to be up..
  756. + puts("spl_start_uboot\n");
  757. + unsigned char addr;
  758. + struct udevice *dev;
  759. + int rc;
  760. +
  761. + for ( addr = CAPE_EEPROM_ADDR0; addr <= CAPE_EEPROM_ADDR3; addr++ ) {
  762. + puts("BeagleBone: cape eeprom: i2c_probe: 0x"); write_hex(addr); puts(":\n");
  763. + rc = i2c_get_chip_for_busnum(CAPE_EEPROM_BUS_NUM, addr, 1, &dev);
  764. + if (rc) {
  765. + printf("failed to get device for EEPROM at address 0x%x\n",
  766. + addr);
  767. +// goto out;
  768. + }
  769. +// out:
  770. + }
  771. +
  772. +
  773. #ifdef CONFIG_SPL_ENV_SUPPORT
  774. env_init();
  775. env_load();
  776. @@ -1084,6 +1211,9 @@ int board_fit_config_name_match(const char *name)
  777. } else if (board_is_am572x_evm() &&
  778. !strcmp(name, "am57xx-beagle-x15")) {
  779. return 0;
  780. + } else if (board_is_bbai() &&
  781. + !strcmp(name, "am5729-beagleboneai")) {
  782. + return 0;
  783. } else if (board_is_am572x_idk() && !strcmp(name, "am572x-idk")) {
  784. return 0;
  785. } else if (board_is_am574x_idk() && !strcmp(name, "am574x-idk")) {
  786. diff --git a/board/ti/am57xx/mux_data.h b/board/ti/am57xx/mux_data.h
  787. index d4a15ae93d..9b8ee944f8 100644
  788. --- a/board/ti/am57xx/mux_data.h
  789. +++ b/board/ti/am57xx/mux_data.h
  790. @@ -233,6 +233,272 @@ const struct pad_conf_entry core_padconf_array_essential_x15[] = {
  791. {RSTOUTN, (M0 | PIN_OUTPUT)}, /* rstoutn.rstoutn */
  792. };
  793. +const struct pad_conf_entry core_padconf_array_essential_bbai[] = {
  794. + {GPMC_AD0, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad0.vin3a_d0 */
  795. + {GPMC_AD1, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad1.vin3a_d1 */
  796. + {GPMC_AD2, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad2.vin3a_d2 */
  797. + {GPMC_AD3, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad3.vin3a_d3 */
  798. + {GPMC_AD4, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad4.vin3a_d4 */
  799. + {GPMC_AD5, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad5.vin3a_d5 */
  800. + {GPMC_AD6, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad6.vin3a_d6 */
  801. + {GPMC_AD7, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad7.vin3a_d7 */
  802. + {GPMC_AD8, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad8.vin3a_d8 */
  803. + {GPMC_AD9, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad9.vin3a_d9 */
  804. + {GPMC_AD10, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad10.vin3a_d10 */
  805. + {GPMC_AD11, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad11.vin3a_d11 */
  806. + {GPMC_AD12, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad12.vin3a_d12 */
  807. + {GPMC_AD13, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad13.vin3a_d13 */
  808. + {GPMC_AD14, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad14.vin3a_d14 */
  809. + {GPMC_AD15, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad15.vin3a_d15 */
  810. +
  811. + /* Cape Bus i2c */
  812. + {GPMC_A0, (M7 | PIN_INPUT_PULLUP)}, /* R6_GPIO7_3: gpmc_a0.i2c4_scl (Shared with F4_UART10_RTSN) */
  813. + {GPMC_A1, (M7 | PIN_INPUT_PULLUP)}, /* T9_GPIO7_4: gpmc_a1.i2c4_sda (Shared with D2_UART10_CTSN) */
  814. +
  815. + {GPMC_A2, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a2.vin3a_d18 */
  816. + {GPMC_A3, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a3.vin3a_d19 */
  817. + {GPMC_A4, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a4.vin3a_d20 */
  818. + {GPMC_A5, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a5.vin3a_d21 */
  819. + {GPMC_A6, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a6.vin3a_d22 */
  820. + {GPMC_A7, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a7.vin3a_d23 */
  821. + {GPMC_A8, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a8.vin3a_hsync0 */
  822. + {GPMC_A9, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a9.vin3a_vsync0 */
  823. + {GPMC_A10, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a10.vin3a_de0 */
  824. + {GPMC_A11, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a11.vin3a_fld0 */
  825. + {GPMC_A12, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_a12.gpio2_2 */
  826. + {GPMC_A13, (M14 | PIN_INPUT_PULLDOWN)}, /* gpmc_a13.gpio2_3 */
  827. + {GPMC_A14, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_a14.gpio2_4 */
  828. + {GPMC_A15, (M14 | PIN_INPUT_PULLDOWN)}, /* gpmc_a15.gpio2_5 */
  829. + {GPMC_A16, (M14 | PIN_INPUT_PULLDOWN)}, /* gpmc_a16.gpio2_6 */
  830. + {GPMC_A17, (M14 | PIN_INPUT_PULLDOWN)}, /* gpmc_a17.gpio2_7 */
  831. + {GPMC_A18, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_a18.gpio2_8 */
  832. +
  833. + /* eMMC */
  834. + {GPMC_A19, (M1 | PIN_INPUT_PULLUP)}, /* K7: gpmc_a19.mmc2_dat4 */
  835. + {GPMC_A20, (M1 | PIN_INPUT_PULLUP)}, /* M7: gpmc_a20.mmc2_dat5 */
  836. + {GPMC_A21, (M1 | PIN_INPUT_PULLUP)}, /* J5: gpmc_a21.mmc2_dat6 */
  837. + {GPMC_A22, (M1 | PIN_INPUT_PULLUP)}, /* K6: gpmc_a22.mmc2_dat7 */
  838. + {GPMC_A23, (M1 | PIN_INPUT_PULLUP)}, /* J7: gpmc_a23.mmc2_clk */
  839. + {GPMC_A24, (M1 | PIN_INPUT_PULLUP)}, /* J4: gpmc_a24.mmc2_dat0 */
  840. + {GPMC_A25, (M1 | PIN_INPUT_PULLUP)}, /* J6: gpmc_a25.mmc2_dat1 */
  841. + {GPMC_A26, (M1 | PIN_INPUT_PULLUP)}, /* H4: gpmc_a26.mmc2_dat2 */
  842. + {GPMC_A27, (M1 | PIN_INPUT_PULLUP)}, /* H5: gpmc_a27.mmc2_dat3 */
  843. + {GPMC_CS1, (M1 | PIN_INPUT_PULLUP)}, /* H6: gpmc_cs1.mmc2_cmd */
  844. +
  845. + {GPMC_CS0, (M14 | PIN_INPUT_PULLDOWN)}, /* gpmc_cs0.gpio2_19 */
  846. + {GPMC_CS2, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_cs2.gpio2_20 */
  847. + {GPMC_CS3, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_cs3.vin3a_clk0 */
  848. + {GPMC_CLK, (M9 | PIN_INPUT_PULLDOWN)}, /* gpmc_clk.dma_evt1 */
  849. + {GPMC_ADVN_ALE, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_advn_ale.gpio2_23 */
  850. + {GPMC_OEN_REN, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_oen_ren.gpio2_24 */
  851. + {GPMC_WEN, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_wen.gpio2_25 */
  852. + {GPMC_BEN0, (M9 | PIN_INPUT_PULLDOWN)}, /* gpmc_ben0.dma_evt3 */
  853. + {GPMC_BEN1, (M9 | PIN_INPUT_PULLDOWN)}, /* gpmc_ben1.dma_evt4 */
  854. + {GPMC_WAIT0, (M14 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* gpmc_wait0.gpio2_28 */
  855. + {VIN1A_CLK0, (M14 | PIN_INPUT)}, /* vin1a_clk0.gpio2_30 */
  856. + {VIN1B_CLK1, (M14 | PIN_INPUT_SLEW)}, /* vin1b_clk1.gpio2_31 */
  857. + {VIN1A_D2, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d2.gpio3_6 */
  858. + {VIN1A_D3, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d3.gpio3_7 */
  859. + {VIN1A_D4, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d4.gpio3_8 */
  860. + {VIN1A_D5, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d5.gpio3_9 */
  861. + {VIN1A_D6, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d6.gpio3_10 */
  862. + {VIN1A_D7, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d7.gpio3_11 */
  863. + {VIN1A_D8, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d8.gpio3_12 */
  864. + {VIN1A_D10, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d10.gpio3_14 */
  865. + {VIN1A_D11, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d11.gpio3_15 */
  866. + {VIN1A_D12, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d12.gpio3_16 */
  867. + {VIN1A_D14, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d14.gpio3_18 */
  868. + {VIN1A_D16, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d16.gpio3_20 */
  869. + {VIN1A_D19, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d19.gpio3_23 */
  870. + {VIN1A_D20, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d20.gpio3_24 */
  871. + {VIN1A_D22, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d22.gpio3_26 */
  872. + {VIN2A_CLK0, (M14 | PIN_INPUT_PULLDOWN)}, /* vin2a_clk0.gpio3_28 */
  873. + {VIN2A_DE0, (M14 | PIN_INPUT_PULLDOWN)}, /* vin2a_de0.gpio3_29 */
  874. + {VIN2A_FLD0, (M14 | PIN_INPUT_PULLDOWN)}, /* vin2a_fld0.gpio3_30 */
  875. + {VIN2A_HSYNC0, (M11 | PIN_INPUT_PULLUP)}, /* vin2a_hsync0.pr1_uart0_cts_n */
  876. + {VIN2A_VSYNC0, (M11 | PIN_OUTPUT_PULLUP)}, /* vin2a_vsync0.pr1_uart0_rts_n */
  877. + {VIN2A_D0, (M11 | PIN_INPUT_PULLUP)}, /* vin2a_d0.pr1_uart0_rxd */
  878. + {VIN2A_D1, (M11 | PIN_OUTPUT)}, /* vin2a_d1.pr1_uart0_txd */
  879. + {VIN2A_D2, (M8 | PIN_INPUT_PULLUP)}, /* vin2a_d2.uart10_rxd */
  880. + {VIN2A_D3, (M8 | PIN_OUTPUT)}, /* vin2a_d3.uart10_txd */
  881. +
  882. + /* Cape Bus i2c (gpio shared) */
  883. + {VIN2A_D4, (M15 | PIN_INPUT)}, /* D2_UART10_CTSN: vin2a_d4.uart10_ctsn (Shared with T9_GPIO7_4) */
  884. + {VIN2A_D5, (M15 | PIN_INPUT)}, /* F4_UART10_RTSN: vin2a_d5.uart10_rtsn (Shared with R6_GPIO7_3) */
  885. +
  886. + {VIN2A_D6, (M14 | PIN_INPUT_PULLDOWN)}, /* vin2a_d6.gpio4_7 */
  887. + {VIN2A_D7, (M14 | PIN_INPUT_PULLDOWN)}, /* vin2a_d7.gpio4_8 */
  888. + {VIN2A_D8, (M14 | PIN_INPUT_PULLDOWN)}, /* vin2a_d8.gpio4_9 */
  889. + {VIN2A_D9, (M14 | PIN_INPUT_PULLDOWN)}, /* vin2a_d9.gpio4_10 */
  890. + {VIN2A_D10, (M10 | PIN_OUTPUT_PULLDOWN)}, /* vin2a_d10.ehrpwm2B */
  891. + {VIN2A_D11, (M10 | PIN_INPUT_PULLDOWN)}, /* vin2a_d11.ehrpwm2_tripzone_input */
  892. + {VIN2A_D12, (M3 | PIN_OUTPUT | MANUAL_MODE)}, /* vin2a_d12.rgmii1_txc */
  893. + {VIN2A_D13, (M3 | PIN_OUTPUT | MANUAL_MODE)}, /* vin2a_d13.rgmii1_txctl */
  894. + {VIN2A_D14, (M3 | PIN_OUTPUT | MANUAL_MODE)}, /* vin2a_d14.rgmii1_txd3 */
  895. + {VIN2A_D15, (M3 | PIN_OUTPUT | MANUAL_MODE)}, /* vin2a_d15.rgmii1_txd2 */
  896. + {VIN2A_D16, (M3 | PIN_OUTPUT | MANUAL_MODE)}, /* vin2a_d16.rgmii1_txd1 */
  897. + {VIN2A_D17, (M3 | PIN_OUTPUT | MANUAL_MODE)}, /* vin2a_d17.rgmii1_txd0 */
  898. + {VIN2A_D18, (M3 | PIN_INPUT | MANUAL_MODE)}, /* vin2a_d18.rgmii1_rxc */
  899. + {VIN2A_D19, (M3 | PIN_INPUT | MANUAL_MODE)}, /* vin2a_d19.rgmii1_rxctl */
  900. + {VIN2A_D20, (M3 | PIN_INPUT | MANUAL_MODE)}, /* vin2a_d20.rgmii1_rxd3 */
  901. + {VIN2A_D21, (M3 | PIN_INPUT | MANUAL_MODE)}, /* vin2a_d21.rgmii1_rxd2 */
  902. + {VIN2A_D22, (M3 | PIN_INPUT | MANUAL_MODE)}, /* vin2a_d22.rgmii1_rxd1 */
  903. + {VIN2A_D23, (M3 | PIN_INPUT | MANUAL_MODE)}, /* vin2a_d23.rgmii1_rxd0 */
  904. + {VOUT1_CLK, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_clk.vout1_clk */
  905. + {VOUT1_DE, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_de.vout1_de */
  906. + {VOUT1_FLD, (M14 | PIN_INPUT)}, /* vout1_fld.gpio4_21 */
  907. + {VOUT1_HSYNC, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_hsync.vout1_hsync */
  908. + {VOUT1_VSYNC, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_vsync.vout1_vsync */
  909. + {VOUT1_D0, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d0.vout1_d0 */
  910. + {VOUT1_D1, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d1.vout1_d1 */
  911. + {VOUT1_D2, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d2.vout1_d2 */
  912. + {VOUT1_D3, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d3.vout1_d3 */
  913. + {VOUT1_D4, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d4.vout1_d4 */
  914. + {VOUT1_D5, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d5.vout1_d5 */
  915. + {VOUT1_D6, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d6.vout1_d6 */
  916. + {VOUT1_D7, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d7.vout1_d7 */
  917. + {VOUT1_D8, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d8.vout1_d8 */
  918. + {VOUT1_D9, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d9.vout1_d9 */
  919. + {VOUT1_D10, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d10.vout1_d10 */
  920. + {VOUT1_D11, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d11.vout1_d11 */
  921. + {VOUT1_D12, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d12.vout1_d12 */
  922. + {VOUT1_D13, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d13.vout1_d13 */
  923. + {VOUT1_D14, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d14.vout1_d14 */
  924. + {VOUT1_D15, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d15.vout1_d15 */
  925. + {VOUT1_D16, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d16.vout1_d16 */
  926. + {VOUT1_D17, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d17.vout1_d17 */
  927. + {VOUT1_D18, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d18.vout1_d18 */
  928. + {VOUT1_D19, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d19.vout1_d19 */
  929. + {VOUT1_D20, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d20.vout1_d20 */
  930. + {VOUT1_D21, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d21.vout1_d21 */
  931. + {VOUT1_D22, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d22.vout1_d22 */
  932. + {VOUT1_D23, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d23.vout1_d23 */
  933. + {MDIO_MCLK, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* mdio_mclk.mdio_mclk */
  934. + {MDIO_D, (M0 | PIN_INPUT | SLEWCONTROL)}, /* mdio_d.mdio_d */
  935. + {RMII_MHZ_50_CLK, (M14 | PIN_INPUT_PULLUP)}, /* RMII_MHZ_50_CLK.gpio5_17 */
  936. + {UART3_RXD, (M14 | PIN_INPUT_SLEW)}, /* uart3_rxd.gpio5_18 */
  937. + {UART3_TXD, (M14 | PIN_INPUT_SLEW)}, /* uart3_txd.gpio5_19 */
  938. + {RGMII0_TXC, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txc.rgmii0_txc */
  939. + {RGMII0_TXCTL, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txctl.rgmii0_txctl */
  940. + {RGMII0_TXD3, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txd3.rgmii0_txd3 */
  941. + {RGMII0_TXD2, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txd2.rgmii0_txd2 */
  942. + {RGMII0_TXD1, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txd1.rgmii0_txd1 */
  943. + {RGMII0_TXD0, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txd0.rgmii0_txd0 */
  944. + {RGMII0_RXC, (M0 | PIN_INPUT | MANUAL_MODE)}, /* rgmii0_rxc.rgmii0_rxc */
  945. + {RGMII0_RXCTL, (M0 | PIN_INPUT | MANUAL_MODE)}, /* rgmii0_rxctl.rgmii0_rxctl */
  946. + {RGMII0_RXD3, (M0 | PIN_INPUT | MANUAL_MODE)}, /* rgmii0_rxd3.rgmii0_rxd3 */
  947. + {RGMII0_RXD2, (M0 | PIN_INPUT | MANUAL_MODE)}, /* rgmii0_rxd2.rgmii0_rxd2 */
  948. + {RGMII0_RXD1, (M0 | PIN_INPUT | MANUAL_MODE)}, /* rgmii0_rxd1.rgmii0_rxd1 */
  949. + {RGMII0_RXD0, (M0 | PIN_INPUT | MANUAL_MODE)}, /* rgmii0_rxd0.rgmii0_rxd0 */
  950. + {USB1_DRVVBUS, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* usb1_drvvbus.usb1_drvvbus */
  951. + {USB2_DRVVBUS, (M0 | PIN_OUTPUT_PULLDOWN | SLEWCONTROL)}, /* usb2_drvvbus.usb2_drvvbus */
  952. + {GPIO6_14, (M10 | PIN_INPUT_PULLUP)}, /* gpio6_14.timer1 */
  953. + {GPIO6_15, (M10 | PIN_INPUT_PULLUP)}, /* gpio6_15.timer2 */
  954. + {GPIO6_16, (M10 | PIN_INPUT_PULLUP)}, /* gpio6_16.timer3 */
  955. + {XREF_CLK0, (M9 | PIN_OUTPUT_PULLDOWN)}, /* xref_clk0.clkout2 */
  956. + {XREF_CLK1, (M14 | PIN_INPUT_PULLDOWN)}, /* xref_clk1.gpio6_18 */
  957. + {XREF_CLK2, (M14 | PIN_INPUT_PULLDOWN)}, /* xref_clk2.gpio6_19 */
  958. + {XREF_CLK3, (M9 | PIN_OUTPUT_PULLDOWN)}, /* xref_clk3.clkout3 */
  959. + {MCASP1_ACLKX, (M10 | PIN_INPUT_PULLUP)}, /* mcasp1_aclkx.i2c3_sda */
  960. + {MCASP1_FSX, (M10 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_fsx.i2c3_scl */
  961. + {MCASP1_ACLKR, (M10 | PIN_INPUT_PULLUP)}, /* mcasp1_aclkr.i2c4_sda */
  962. + {MCASP1_FSR, (M10 | PIN_INPUT_PULLUP)}, /* mcasp1_fsr.i2c4_scl */
  963. + {MCASP1_AXR0, (M10 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr0.i2c5_sda */
  964. + {MCASP1_AXR1, (M10 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr1.i2c5_scl */
  965. + {MCASP1_AXR2, (M14 | PIN_INPUT_PULLDOWN)}, /* mcasp1_axr2.gpio5_4 */
  966. + {MCASP1_AXR3, (M14 | PIN_INPUT_PULLDOWN)}, /* mcasp1_axr3.gpio5_5 */
  967. + {MCASP1_AXR4, (M14 | PIN_INPUT_PULLDOWN)}, /* mcasp1_axr4.gpio5_6 */
  968. + {MCASP1_AXR5, (M14 | PIN_INPUT_PULLDOWN)}, /* mcasp1_axr5.gpio5_7 */
  969. + {MCASP1_AXR6, (M14 | PIN_INPUT_PULLDOWN)}, /* mcasp1_axr6.gpio5_8 */
  970. + {MCASP1_AXR7, (M14 | PIN_INPUT_PULLDOWN)}, /* mcasp1_axr7.gpio5_9 */
  971. + {MCASP1_AXR8, (M14 | PIN_INPUT | SLEWCONTROL)}, /* mcasp1_axr8.gpio5_10 */
  972. + {MCASP1_AXR9, (M14 | PIN_INPUT | SLEWCONTROL)}, /* mcasp1_axr9.gpio5_11 */
  973. + {MCASP1_AXR10, (M14 | PIN_INPUT | SLEWCONTROL)}, /* mcasp1_axr10.gpio5_12 */
  974. + {MCASP1_AXR11, (M14 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr11.gpio4_17 */
  975. + {MCASP1_AXR12, (M1 | PIN_INPUT_SLEW | VIRTUAL_MODE10)}, /* mcasp1_axr12.mcasp7_axr0 */
  976. + {MCASP1_AXR13, (M1 | PIN_INPUT_SLEW | VIRTUAL_MODE10)}, /* mcasp1_axr13.mcasp7_axr1 */
  977. + {MCASP1_AXR14, (M1 | PIN_INPUT_SLEW | VIRTUAL_MODE10)}, /* mcasp1_axr14.mcasp7_aclkx */
  978. + {MCASP1_AXR15, (M1 | PIN_INPUT_SLEW | VIRTUAL_MODE10)}, /* mcasp1_axr15.mcasp7_fsx */
  979. + {MCASP3_ACLKX, (M0 | PIN_INPUT_PULLDOWN)}, /* mcasp3_aclkx.mcasp3_aclkx */
  980. + {MCASP3_FSX, (M0 | PIN_INPUT_SLEW)}, /* mcasp3_fsx.mcasp3_fsx */
  981. + {MCASP3_AXR0, (M0 | PIN_INPUT_SLEW)}, /* mcasp3_axr0.mcasp3_axr0 */
  982. + {MCASP3_AXR1, (M0 | PIN_INPUT_SLEW)}, /* mcasp3_axr1.mcasp3_axr1 */
  983. + {MCASP4_ACLKX, (M3 | PIN_INPUT_PULLUP)}, /* mcasp4_aclkx.uart8_rxd */
  984. + {MCASP4_FSX, (M3 | PIN_OUTPUT)}, /* mcasp4_fsx.uart8_txd */
  985. + {MCASP4_AXR0, (M3 | PIN_INPUT_PULLUP)}, /* mcasp4_axr0.uart8_ctsn */
  986. + {MCASP4_AXR1, (M3 | PIN_OUTPUT_PULLUP)}, /* mcasp4_axr1.uart8_rtsn */
  987. + {MCASP5_ACLKX, (M3 | PIN_INPUT_PULLUP)}, /* mcasp5_aclkx.uart9_rxd */
  988. + {MCASP5_FSX, (M3 | PIN_OUTPUT)}, /* mcasp5_fsx.uart9_txd */
  989. + {MCASP5_AXR0, (M3 | PIN_INPUT_PULLUP)}, /* mcasp5_axr0.uart9_ctsn */
  990. + {MCASP5_AXR1, (M3 | PIN_OUTPUT_PULLUP)}, /* mcasp5_axr1.uart9_rtsn */
  991. +
  992. + /* microSD Socket */
  993. + {MMC1_CLK, (M0 | PIN_INPUT_PULLUP)}, /* W6: mmc1_clk.mmc1_clk */
  994. + {MMC1_CMD, (M0 | PIN_INPUT_PULLUP)}, /* Y6: mmc1_cmd.mmc1_cmd */
  995. + {MMC1_DAT0, (M0 | PIN_INPUT_PULLUP)}, /* AA6: mmc1_dat0.mmc1_dat0 */
  996. + {MMC1_DAT1, (M0 | PIN_INPUT_PULLUP)}, /* Y4: mmc1_dat1.mmc1_dat1 */
  997. + {MMC1_DAT2, (M0 | PIN_INPUT_PULLUP)}, /* AA5: mmc1_dat2.mmc1_dat2 */
  998. + {MMC1_DAT3, (M0 | PIN_INPUT_PULLUP)}, /* Y3: mmc1_dat3.mmc1_dat3 */
  999. + {MMC1_SDCD, (M14 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* W7: mmc1_sdcd.gpio6_27 */
  1000. +
  1001. + {GPIO6_10, (M10 | PIN_OUTPUT_PULLDOWN)}, /* gpio6_10.ehrpwm2A */
  1002. + {GPIO6_11, (M0 | PIN_INPUT_PULLUP)}, /* gpio6_11.gpio6_11 */
  1003. + {MMC3_CLK, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_clk.mmc3_clk */
  1004. + {MMC3_CMD, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_cmd.mmc3_cmd */
  1005. + {MMC3_DAT0, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat0.mmc3_dat0 */
  1006. + {MMC3_DAT1, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat1.mmc3_dat1 */
  1007. + {MMC3_DAT2, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat2.mmc3_dat2 */
  1008. + {MMC3_DAT3, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat3.mmc3_dat3 */
  1009. + {MMC3_DAT4, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat4.mmc3_dat4 */
  1010. + {MMC3_DAT5, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat5.mmc3_dat5 */
  1011. + {MMC3_DAT6, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat6.mmc3_dat6 */
  1012. + {MMC3_DAT7, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat7.mmc3_dat7 */
  1013. + {SPI1_SCLK, (M14 | PIN_INPUT_PULLDOWN)}, /* spi1_sclk.gpio7_7 */
  1014. + {SPI1_D1, (M14 | PIN_INPUT_PULLDOWN)}, /* spi1_d1.gpio7_8 */
  1015. + {SPI1_D0, (M14 | PIN_INPUT_PULLDOWN)}, /* spi1_d0.gpio7_9 */
  1016. + {SPI1_CS0, (M14 | PIN_INPUT)}, /* spi1_cs0.gpio7_10 */
  1017. + {SPI1_CS1, (M14 | PIN_INPUT)}, /* spi1_cs1.gpio7_11 */
  1018. + {SPI1_CS2, (M14 | PIN_INPUT_SLEW)}, /* spi1_cs2.gpio7_12 */
  1019. + {SPI1_CS3, (M6 | PIN_INPUT | SLEWCONTROL)}, /* spi1_cs3.hdmi1_cec */
  1020. + {SPI2_SCLK, (M14 | PIN_INPUT_PULLDOWN)}, /* spi2_sclk.gpio7_14 */
  1021. + {SPI2_D1, (M14 | PIN_INPUT_SLEW)}, /* spi2_d1.gpio7_15 */
  1022. + {SPI2_D0, (M14 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* spi2_d0.gpio7_16 */
  1023. + {SPI2_CS0, (M14 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* spi2_cs0.gpio7_17 */
  1024. + {DCAN1_TX, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* dcan1_tx.dcan1_tx */
  1025. + {DCAN1_RX, (M0 | PIN_INPUT | SLEWCONTROL)}, /* dcan1_rx.dcan1_rx */
  1026. +
  1027. + /* BeagleBone AI: Debug UART */
  1028. + {UART1_RXD, (M0 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* uart1_rxd.uart1_rxd */
  1029. + {UART1_TXD, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* uart1_txd.uart1_txd */
  1030. +
  1031. + {UART1_CTSN, (M14 | PIN_INPUT_PULLDOWN)}, /* uart1_ctsn.gpio7_24 */
  1032. + {UART1_RTSN, (M14 | PIN_INPUT)}, /* uart1_rtsn.gpio7_25 */
  1033. + {UART2_RXD, (M14 | PIN_INPUT_PULLDOWN)}, /* uart2_rxd.gpio7_26 */
  1034. + {UART2_TXD, (M14 | PIN_INPUT_PULLDOWN)}, /* uart2_txd.gpio7_27 */
  1035. + {UART2_CTSN, (M2 | PIN_INPUT_PULLUP)}, /* uart2_ctsn.uart3_rxd */
  1036. + {UART2_RTSN, (M1 | PIN_OUTPUT)}, /* uart2_rtsn.uart3_txd */
  1037. + {I2C1_SDA, (M0 | PIN_INPUT_PULLUP)}, /* i2c1_sda.i2c1_sda */
  1038. + {I2C1_SCL, (M0 | PIN_INPUT_PULLUP)}, /* i2c1_scl.i2c1_scl */
  1039. + {I2C2_SDA, (M1 | PIN_INPUT_PULLUP)}, /* i2c2_sda.hdmi1_ddc_scl */
  1040. + {I2C2_SCL, (M1 | PIN_INPUT_PULLUP)}, /* i2c2_scl.hdmi1_ddc_sda */
  1041. + {WAKEUP0, (M0 | PIN_INPUT)}, /* Wakeup0.Wakeup0 */
  1042. + {WAKEUP1, (M0 | PIN_INPUT)}, /* Wakeup1.Wakeup1 */
  1043. + {WAKEUP2, (M0 | PIN_INPUT)}, /* Wakeup2.Wakeup2 */
  1044. + {WAKEUP3, (M0 | PIN_INPUT)}, /* Wakeup3.Wakeup3 */
  1045. + {ON_OFF, (M0 | PIN_OUTPUT)}, /* on_off.on_off */
  1046. + {RTC_PORZ, (M0 | PIN_INPUT)}, /* rtc_porz.rtc_porz */
  1047. + {TMS, (M0 | PIN_INPUT_PULLUP)}, /* tms.tms */
  1048. + {TDI, (M0 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* tdi.tdi */
  1049. + {TDO, (M0 | PIN_OUTPUT)}, /* tdo.tdo */
  1050. + {TCLK, (M0 | PIN_INPUT_PULLDOWN)}, /* tclk.tclk */
  1051. + {TRSTN, (M0 | PIN_INPUT)}, /* trstn.trstn */
  1052. + {RTCK, (M0 | PIN_OUTPUT)}, /* rtck.rtck */
  1053. + {EMU0, (M0 | PIN_INPUT)}, /* emu0.emu0 */
  1054. + {EMU1, (M0 | PIN_INPUT)}, /* emu1.emu1 */
  1055. + {NMIN_DSP, (M0 | PIN_INPUT)}, /* nmin_dsp.nmin_dsp */
  1056. + {RSTOUTN, (M0 | PIN_OUTPUT)}, /* rstoutn.rstoutn */
  1057. +};
  1058. +
  1059. const struct pad_conf_entry core_padconf_array_delta_x15_sr1_1[] = {
  1060. {MMC1_SDWP, (M14 | PIN_INPUT | SLEWCONTROL)}, /* mmc1_sdwp.gpio6_28 */
  1061. {VOUT1_CLK, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_clk.vout1_clk */
  1062. @@ -998,6 +1264,17 @@ const struct pad_conf_entry early_padconf[] = {
  1063. {UART2_RTSN, (M1 | PIN_INPUT_SLEW)}, /* uart2_rtsn.uart3_txd */
  1064. {I2C1_SDA, (PIN_INPUT_PULLUP | M0)}, /* I2C1_SDA */
  1065. {I2C1_SCL, (PIN_INPUT_PULLUP | M0)}, /* I2C1_SCL */
  1066. +
  1067. + /* BeagleBone AI: Debug UART */
  1068. + {UART1_RXD, (M0 | PIN_INPUT_SLEW)}, /* UART1_RXD */
  1069. + {UART1_TXD, (M0 | PIN_INPUT_SLEW)}, /* UART1_TXD */
  1070. +
  1071. + /* Cape Bus i2c */
  1072. + {GPMC_A0, (M7 | PIN_INPUT_PULLUP)}, /* R6_GPIO7_3: gpmc_a0.i2c4_scl (Shared with F4_UART10_RTSN) */
  1073. + {GPMC_A1, (M7 | PIN_INPUT_PULLUP)}, /* T9_GPIO7_4: gpmc_a1.i2c4_sda (Shared with D2_UART10_CTSN) */
  1074. + /* Cape Bus i2c (gpio shared) */
  1075. + {VIN2A_D4, (M14 | PIN_INPUT_PULLUP)}, /* D2_UART10_CTSN: vin2a_d4.uart10_ctsn (Shared with T9_GPIO7_4) */
  1076. + {VIN2A_D5, (M14 | PIN_INPUT_PULLUP)}, /* F4_UART10_RTSN: vin2a_d5.uart10_rtsn (Shared with R6_GPIO7_3) */
  1077. };
  1078. #ifdef CONFIG_IODELAY_RECALIBRATION
  1079. @@ -1199,6 +1476,119 @@ const struct iodelay_cfg_entry iodelay_cfg_array_x15_sr2_0[] = {
  1080. {0x0CEC, 2739, 0}, /* CFG_VOUT1_VSYNC_OUT */
  1081. };
  1082. +const struct iodelay_cfg_entry iodelay_cfg_array_bbai[] = {
  1083. + {0x0114, 2519, 702}, /* CFG_GPMC_A0_IN */
  1084. + {0x0120, 2435, 411}, /* CFG_GPMC_A10_IN */
  1085. + {0x012C, 2379, 755}, /* CFG_GPMC_A11_IN */
  1086. + {0x0198, 2384, 778}, /* CFG_GPMC_A1_IN */
  1087. + {0x0204, 2499, 1127}, /* CFG_GPMC_A2_IN */
  1088. + {0x0210, 2455, 1181}, /* CFG_GPMC_A3_IN */
  1089. + {0x021C, 2486, 1039}, /* CFG_GPMC_A4_IN */
  1090. + {0x0228, 2456, 938}, /* CFG_GPMC_A5_IN */
  1091. + {0x0234, 2463, 573}, /* CFG_GPMC_A6_IN */
  1092. + {0x0240, 2608, 783}, /* CFG_GPMC_A7_IN */
  1093. + {0x024C, 2430, 656}, /* CFG_GPMC_A8_IN */
  1094. + {0x0258, 2465, 850}, /* CFG_GPMC_A9_IN */
  1095. + {0x0264, 2316, 301}, /* CFG_GPMC_AD0_IN */
  1096. + {0x0270, 2324, 406}, /* CFG_GPMC_AD10_IN */
  1097. + {0x027C, 2278, 352}, /* CFG_GPMC_AD11_IN */
  1098. + {0x0288, 2297, 160}, /* CFG_GPMC_AD12_IN */
  1099. + {0x0294, 2278, 108}, /* CFG_GPMC_AD13_IN */
  1100. + {0x02A0, 2035, 0}, /* CFG_GPMC_AD14_IN */
  1101. + {0x02AC, 2279, 378}, /* CFG_GPMC_AD15_IN */
  1102. + {0x02B8, 2440, 70}, /* CFG_GPMC_AD1_IN */
  1103. + {0x02C4, 2404, 446}, /* CFG_GPMC_AD2_IN */
  1104. + {0x02D0, 2343, 212}, /* CFG_GPMC_AD3_IN */
  1105. + {0x02DC, 2355, 322}, /* CFG_GPMC_AD4_IN */
  1106. + {0x02E8, 2337, 192}, /* CFG_GPMC_AD5_IN */
  1107. + {0x02F4, 2270, 314}, /* CFG_GPMC_AD6_IN */
  1108. + {0x0300, 2339, 259}, /* CFG_GPMC_AD7_IN */
  1109. + {0x030C, 2308, 577}, /* CFG_GPMC_AD8_IN */
  1110. + {0x0318, 2334, 166}, /* CFG_GPMC_AD9_IN */
  1111. + {0x0378, 0, 0}, /* CFG_GPMC_CS3_IN */
  1112. + {0x0678, 0, 386}, /* CFG_MMC3_CLK_IN */
  1113. + {0x0680, 605, 0}, /* CFG_MMC3_CLK_OUT */
  1114. + {0x0684, 0, 0}, /* CFG_MMC3_CMD_IN */
  1115. + {0x0688, 0, 0}, /* CFG_MMC3_CMD_OEN */
  1116. + {0x068C, 0, 0}, /* CFG_MMC3_CMD_OUT */
  1117. + {0x0690, 171, 0}, /* CFG_MMC3_DAT0_IN */
  1118. + {0x0694, 0, 0}, /* CFG_MMC3_DAT0_OEN */
  1119. + {0x0698, 0, 0}, /* CFG_MMC3_DAT0_OUT */
  1120. + {0x069C, 221, 0}, /* CFG_MMC3_DAT1_IN */
  1121. + {0x06A0, 0, 0}, /* CFG_MMC3_DAT1_OEN */
  1122. + {0x06A4, 0, 0}, /* CFG_MMC3_DAT1_OUT */
  1123. + {0x06A8, 0, 0}, /* CFG_MMC3_DAT2_IN */
  1124. + {0x06AC, 0, 0}, /* CFG_MMC3_DAT2_OEN */
  1125. + {0x06B0, 0, 0}, /* CFG_MMC3_DAT2_OUT */
  1126. + {0x06B4, 474, 0}, /* CFG_MMC3_DAT3_IN */
  1127. + {0x06B8, 0, 0}, /* CFG_MMC3_DAT3_OEN */
  1128. + {0x06BC, 0, 0}, /* CFG_MMC3_DAT3_OUT */
  1129. + {0x06C0, 792, 0}, /* CFG_MMC3_DAT4_IN */
  1130. + {0x06C4, 0, 0}, /* CFG_MMC3_DAT4_OEN */
  1131. + {0x06C8, 0, 0}, /* CFG_MMC3_DAT4_OUT */
  1132. + {0x06CC, 782, 0}, /* CFG_MMC3_DAT5_IN */
  1133. + {0x06D0, 0, 0}, /* CFG_MMC3_DAT5_OEN */
  1134. + {0x06D4, 0, 0}, /* CFG_MMC3_DAT5_OUT */
  1135. + {0x06D8, 942, 0}, /* CFG_MMC3_DAT6_IN */
  1136. + {0x06DC, 0, 0}, /* CFG_MMC3_DAT6_OEN */
  1137. + {0x06E0, 0, 0}, /* CFG_MMC3_DAT6_OUT */
  1138. + {0x06E4, 636, 0}, /* CFG_MMC3_DAT7_IN */
  1139. + {0x06E8, 0, 0}, /* CFG_MMC3_DAT7_OEN */
  1140. + {0x06EC, 0, 0}, /* CFG_MMC3_DAT7_OUT */
  1141. + {0x06F0, 260, 0}, /* CFG_RGMII0_RXC_IN */
  1142. + {0x06FC, 0, 1412}, /* CFG_RGMII0_RXCTL_IN */
  1143. + {0x0708, 123, 1047}, /* CFG_RGMII0_RXD0_IN */
  1144. + {0x0714, 139, 1081}, /* CFG_RGMII0_RXD1_IN */
  1145. + {0x0720, 195, 1100}, /* CFG_RGMII0_RXD2_IN */
  1146. + {0x072C, 239, 1216}, /* CFG_RGMII0_RXD3_IN */
  1147. + {0x0740, 89, 0}, /* CFG_RGMII0_TXC_OUT */
  1148. + {0x074C, 15, 125}, /* CFG_RGMII0_TXCTL_OUT */
  1149. + {0x0758, 339, 162}, /* CFG_RGMII0_TXD0_OUT */
  1150. + {0x0764, 146, 94}, /* CFG_RGMII0_TXD1_OUT */
  1151. + {0x0770, 0, 27}, /* CFG_RGMII0_TXD2_OUT */
  1152. + {0x077C, 291, 205}, /* CFG_RGMII0_TXD3_OUT */
  1153. + {0x0A70, 0, 0}, /* CFG_VIN2A_D12_OUT */
  1154. + {0x0A7C, 219, 101}, /* CFG_VIN2A_D13_OUT */
  1155. + {0x0A88, 92, 58}, /* CFG_VIN2A_D14_OUT */
  1156. + {0x0A94, 135, 100}, /* CFG_VIN2A_D15_OUT */
  1157. + {0x0AA0, 154, 101}, /* CFG_VIN2A_D16_OUT */
  1158. + {0x0AAC, 78, 27}, /* CFG_VIN2A_D17_OUT */
  1159. + {0x0AB0, 411, 0}, /* CFG_VIN2A_D18_IN */
  1160. + {0x0ABC, 0, 382}, /* CFG_VIN2A_D19_IN */
  1161. + {0x0AD4, 320, 750}, /* CFG_VIN2A_D20_IN */
  1162. + {0x0AE0, 192, 836}, /* CFG_VIN2A_D21_IN */
  1163. + {0x0AEC, 294, 669}, /* CFG_VIN2A_D22_IN */
  1164. + {0x0AF8, 50, 700}, /* CFG_VIN2A_D23_IN */
  1165. + {0x0B9C, 0, 706}, /* CFG_VOUT1_CLK_OUT */
  1166. + {0x0BA8, 2313, 0}, /* CFG_VOUT1_D0_OUT */
  1167. + {0x0BB4, 2199, 0}, /* CFG_VOUT1_D10_OUT */
  1168. + {0x0BC0, 2266, 0}, /* CFG_VOUT1_D11_OUT */
  1169. + {0x0BCC, 3159, 0}, /* CFG_VOUT1_D12_OUT */
  1170. + {0x0BD8, 2100, 0}, /* CFG_VOUT1_D13_OUT */
  1171. + {0x0BE4, 2229, 0}, /* CFG_VOUT1_D14_OUT */
  1172. + {0x0BF0, 2202, 0}, /* CFG_VOUT1_D15_OUT */
  1173. + {0x0BFC, 2084, 0}, /* CFG_VOUT1_D16_OUT */
  1174. + {0x0C08, 2195, 0}, /* CFG_VOUT1_D17_OUT */
  1175. + {0x0C14, 2342, 0}, /* CFG_VOUT1_D18_OUT */
  1176. + {0x0C20, 2463, 0}, /* CFG_VOUT1_D19_OUT */
  1177. + {0x0C2C, 2439, 0}, /* CFG_VOUT1_D1_OUT */
  1178. + {0x0C38, 2304, 0}, /* CFG_VOUT1_D20_OUT */
  1179. + {0x0C44, 2103, 0}, /* CFG_VOUT1_D21_OUT */
  1180. + {0x0C50, 2145, 0}, /* CFG_VOUT1_D22_OUT */
  1181. + {0x0C5C, 1932, 0}, /* CFG_VOUT1_D23_OUT */
  1182. + {0x0C68, 2200, 0}, /* CFG_VOUT1_D2_OUT */
  1183. + {0x0C74, 2355, 0}, /* CFG_VOUT1_D3_OUT */
  1184. + {0x0C80, 3215, 0}, /* CFG_VOUT1_D4_OUT */
  1185. + {0x0C8C, 2314, 0}, /* CFG_VOUT1_D5_OUT */
  1186. + {0x0C98, 2238, 0}, /* CFG_VOUT1_D6_OUT */
  1187. + {0x0CA4, 2381, 0}, /* CFG_VOUT1_D7_OUT */
  1188. + {0x0CB0, 2138, 0}, /* CFG_VOUT1_D8_OUT */
  1189. + {0x0CBC, 2383, 0}, /* CFG_VOUT1_D9_OUT */
  1190. + {0x0CC8, 1984, 0}, /* CFG_VOUT1_DE_OUT */
  1191. + {0x0CE0, 1947, 0}, /* CFG_VOUT1_HSYNC_OUT */
  1192. + {0x0CEC, 2739, 0}, /* CFG_VOUT1_VSYNC_OUT */
  1193. +};
  1194. +
  1195. const struct iodelay_cfg_entry iodelay_cfg_array_am574x_idk[] = {
  1196. {0x0114, 2199, 621}, /* CFG_GPMC_A0_IN */
  1197. {0x0120, 0, 0}, /* CFG_GPMC_A10_IN */
  1198. diff --git a/configs/am57xx_evm_defconfig b/configs/am57xx_evm_defconfig
  1199. index 3e2c166e0d..b1e2960a9f 100644
  1200. --- a/configs/am57xx_evm_defconfig
  1201. +++ b/configs/am57xx_evm_defconfig
  1202. @@ -27,14 +27,20 @@ CONFIG_SPL_DMA_SUPPORT=y
  1203. CONFIG_SPL_OS_BOOT=y
  1204. CONFIG_SPL_SPI_LOAD=y
  1205. CONFIG_SPL_YMODEM_SUPPORT=y
  1206. +CONFIG_AUTOBOOT_KEYED=y
  1207. +CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n"
  1208. +CONFIG_AUTOBOOT_DELAY_STR="d"
  1209. +CONFIG_AUTOBOOT_STOP_STR=" "
  1210. CONFIG_CMD_SPL=y
  1211. # CONFIG_CMD_FLASH is not set
  1212. # CONFIG_CMD_SETEXPR is not set
  1213. # CONFIG_CMD_PMIC is not set
  1214. +CONFIG_CMD_BTRFS=y
  1215. CONFIG_OF_CONTROL=y
  1216. CONFIG_SPL_OF_CONTROL=y
  1217. -CONFIG_DEFAULT_DEVICE_TREE="am572x-idk"
  1218. -CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1 am57xx-beagle-x15-revc am572x-idk am571x-idk am574x-idk"
  1219. +CONFIG_DEFAULT_DEVICE_TREE="am5729-beagleboneai"
  1220. +CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1 am57xx-beagle-x15-revc am5729-beagleboneai am572x-idk am571x-idk am574x-idk"
  1221. +# CONFIG_ENV_IS_IN_FAT is not set
  1222. CONFIG_ENV_IS_IN_MMC=y
  1223. CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
  1224. CONFIG_DM=y
  1225. diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h
  1226. index 70aa425060..fcc6ac7f8f 100644
  1227. --- a/include/configs/am57xx_evm.h
  1228. +++ b/include/configs/am57xx_evm.h
  1229. @@ -24,7 +24,7 @@
  1230. #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
  1231. #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
  1232. -#define CONSOLEDEV "ttyO2"
  1233. +//#define CONSOLEDEV "ttyO2"
  1234. #define CONFIG_SYS_NS16550_COM1 UART1_BASE /* Base EVM has UART0 */
  1235. #define CONFIG_SYS_NS16550_COM2 UART2_BASE /* UART2 */
  1236. #define CONFIG_SYS_NS16550_COM3 UART3_BASE /* UART3 */
  1237. diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
  1238. index 1e2a62dd6f..47f641165d 100644
  1239. --- a/include/configs/ti_armv7_common.h
  1240. +++ b/include/configs/ti_armv7_common.h
  1241. @@ -80,6 +80,363 @@
  1242. #define CONFIG_SYS_I2C
  1243. #endif
  1244. +#define EEPROM_PROGRAMMING \
  1245. + "eeprom_dump=i2c dev 0; " \
  1246. + "i2c md 0x50 0x00.2 20; " \
  1247. + "\0" \
  1248. + "eeprom_blank=i2c dev 0; " \
  1249. + "i2c mw 0x50 0x00.2 ff; " \
  1250. + "i2c mw 0x50 0x01.2 ff; " \
  1251. + "i2c mw 0x50 0x02.2 ff; " \
  1252. + "i2c mw 0x50 0x03.2 ff; " \
  1253. + "i2c mw 0x50 0x04.2 ff; " \
  1254. + "i2c mw 0x50 0x05.2 ff; " \
  1255. + "i2c mw 0x50 0x06.2 ff; " \
  1256. + "i2c mw 0x50 0x07.2 ff; " \
  1257. + "i2c mw 0x50 0x08.2 ff; " \
  1258. + "i2c mw 0x50 0x09.2 ff; " \
  1259. + "i2c mw 0x50 0x0a.2 ff; " \
  1260. + "i2c mw 0x50 0x0b.2 ff; " \
  1261. + "i2c mw 0x50 0x0c.2 ff; " \
  1262. + "i2c mw 0x50 0x0d.2 ff; " \
  1263. + "i2c mw 0x50 0x0e.2 ff; " \
  1264. + "i2c mw 0x50 0x0f.2 ff; " \
  1265. + "i2c mw 0x50 0x10.2 ff; " \
  1266. + "i2c mw 0x50 0x11.2 ff; " \
  1267. + "i2c mw 0x50 0x12.2 ff; " \
  1268. + "i2c mw 0x50 0x13.2 ff; " \
  1269. + "i2c mw 0x50 0x14.2 ff; " \
  1270. + "i2c mw 0x50 0x15.2 ff; " \
  1271. + "i2c mw 0x50 0x16.2 ff; " \
  1272. + "i2c mw 0x50 0x17.2 ff; " \
  1273. + "i2c mw 0x50 0x18.2 ff; " \
  1274. + "i2c mw 0x50 0x19.2 ff; " \
  1275. + "i2c mw 0x50 0x1a.2 ff; " \
  1276. + "i2c mw 0x50 0x1b.2 ff; " \
  1277. + "i2c mw 0x50 0x1c.2 ff; " \
  1278. + "i2c mw 0x50 0x1d.2 ff; " \
  1279. + "i2c mw 0x50 0x1e.2 ff; " \
  1280. + "i2c mw 0x50 0x1f.2 ff; " \
  1281. + "i2c md 0x50 0x00.2 20; " \
  1282. + "\0" \
  1283. + "eeprom_x15_b1=i2c dev 0; " \
  1284. + "i2c mw 0x50 0x00.2 aa; " \
  1285. + "i2c mw 0x50 0x01.2 55; " \
  1286. + "i2c mw 0x50 0x02.2 33; " \
  1287. + "i2c mw 0x50 0x03.2 ee; " \
  1288. + "i2c mw 0x50 0x04.2 42; " \
  1289. + "i2c mw 0x50 0x05.2 42; " \
  1290. + "i2c mw 0x50 0x06.2 52; " \
  1291. + "i2c mw 0x50 0x07.2 44; " \
  1292. + "i2c mw 0x50 0x08.2 58; " \
  1293. + "i2c mw 0x50 0x09.2 31; " \
  1294. + "i2c mw 0x50 0x0a.2 35; " \
  1295. + "i2c mw 0x50 0x0b.2 5f; " \
  1296. + "i2c mw 0x50 0x0c.2 42; " \
  1297. + "i2c mw 0x50 0x0d.2 2e; " \
  1298. + "i2c mw 0x50 0x0e.2 31; " \
  1299. + "i2c mw 0x50 0x0f.2 30; " \
  1300. + "i2c mw 0x50 0x10.2 57; " \
  1301. + "i2c mw 0x50 0x11.2 57; " \
  1302. + "i2c mw 0x50 0x12.2 59; " \
  1303. + "i2c mw 0x50 0x13.2 59; " \
  1304. + "i2c mw 0x50 0x14.2 34; " \
  1305. + "i2c mw 0x50 0x15.2 50; " \
  1306. + "i2c mw 0x50 0x16.2 35; " \
  1307. + "i2c mw 0x50 0x17.2 35; " \
  1308. + "i2c mw 0x50 0x18.2 30; " \
  1309. + "i2c mw 0x50 0x19.2 30; " \
  1310. + "i2c mw 0x50 0x1a.2 30; " \
  1311. + "i2c mw 0x50 0x1b.2 30; " \
  1312. + "i2c mw 0x50 0x1c.2 ff; " \
  1313. + "i2c mw 0x50 0x1d.2 ff; " \
  1314. + "i2c mw 0x50 0x1e.2 ff; " \
  1315. + "i2c mw 0x50 0x1f.2 ff; " \
  1316. + "i2c md 0x50 0x00.2 20; " \
  1317. + "\0" \
  1318. + "eeprom_x15_c=i2c dev 0; " \
  1319. + "i2c mw 0x50 0x00.2 aa; " \
  1320. + "i2c mw 0x50 0x01.2 55; " \
  1321. + "i2c mw 0x50 0x02.2 33; " \
  1322. + "i2c mw 0x50 0x03.2 ee; " \
  1323. + "i2c mw 0x50 0x04.2 42; " \
  1324. + "i2c mw 0x50 0x05.2 42; " \
  1325. + "i2c mw 0x50 0x06.2 52; " \
  1326. + "i2c mw 0x50 0x07.2 44; " \
  1327. + "i2c mw 0x50 0x08.2 58; " \
  1328. + "i2c mw 0x50 0x09.2 31; " \
  1329. + "i2c mw 0x50 0x0a.2 35; " \
  1330. + "i2c mw 0x50 0x0b.2 5f; " \
  1331. + "i2c mw 0x50 0x0c.2 43; " \
  1332. + "i2c mw 0x50 0x0d.2 2e; " \
  1333. + "i2c mw 0x50 0x0e.2 30; " \
  1334. + "i2c mw 0x50 0x0f.2 30; " \
  1335. + "i2c mw 0x50 0x10.2 79; " \
  1336. + "i2c mw 0x50 0x11.2 79; " \
  1337. + "i2c mw 0x50 0x12.2 77; " \
  1338. + "i2c mw 0x50 0x13.2 77; " \
  1339. + "i2c mw 0x50 0x14.2 50; " \
  1340. + "i2c mw 0x50 0x15.2 58; " \
  1341. + "i2c mw 0x50 0x16.2 31; " \
  1342. + "i2c mw 0x50 0x17.2 35; " \
  1343. + "i2c mw 0x50 0x18.2 6e; " \
  1344. + "i2c mw 0x50 0x19.2 6e; " \
  1345. + "i2c mw 0x50 0x1a.2 6e; " \
  1346. + "i2c mw 0x50 0x1b.2 6e; " \
  1347. + "i2c mw 0x50 0x1c.2 ff; " \
  1348. + "i2c mw 0x50 0x1d.2 ff; " \
  1349. + "i2c mw 0x50 0x1e.2 ff; " \
  1350. + "i2c mw 0x50 0x1f.2 ff; " \
  1351. + "i2c md 0x50 0x00.2 20; " \
  1352. + "\0" \
  1353. +
  1354. +#define EEWIKI_MMC_BOOT \
  1355. + "mmc_boot=${devtype} dev ${mmcdev}; ${devtype} part; " \
  1356. + "if ${devtype} rescan; then " \
  1357. + "echo Scanning ${devtype} device ${mmcdev};" \
  1358. + "setenv bootpart ${mmcdev}:1; " \
  1359. + "echo Checking for: /uEnv.txt ...;" \
  1360. + "if test -e ${devtype} ${bootpart} /uEnv.txt; then " \
  1361. + "load ${devtype} ${bootpart} ${loadaddr} /uEnv.txt;" \
  1362. + "env import -t ${loadaddr} ${filesize};" \
  1363. + "echo Loaded environment from /uEnv.txt;" \
  1364. + "echo Checking if uenvcmd is set ...;" \
  1365. + "if test -n ${uenvcmd}; then " \
  1366. + "echo Running uenvcmd ...;" \
  1367. + "run uenvcmd;" \
  1368. + "fi;" \
  1369. + "fi; " \
  1370. + "echo Checking for: /boot/uEnv.txt ...;" \
  1371. + "for i in 1 2 3 4 5 6 7 ; do " \
  1372. + "setenv mmcpart ${i};" \
  1373. + "setenv bootpart ${mmcdev}:${mmcpart};" \
  1374. + "if test -e ${devtype} ${bootpart} /boot/uEnv.txt; then " \
  1375. + "load ${devtype} ${bootpart} ${loadaddr} /boot/uEnv.txt;" \
  1376. + "env import -t ${loadaddr} ${filesize};" \
  1377. + "echo Loaded environment from /boot/uEnv.txt;" \
  1378. + "if test -n ${dtb}; then " \
  1379. + "setenv fdtfile ${dtb};" \
  1380. + "echo debug: [dtb=${fdtfile}] ...;" \
  1381. + "fi;" \
  1382. + "echo Checking if uname_r is set in /boot/uEnv.txt ...;" \
  1383. + "if test -n ${uname_r}; then " \
  1384. + "echo debug: [uname_r=${uname_r}] ...;" \
  1385. + "setenv oldroot /dev/mmcblk${mmcdev}p${mmcpart};" \
  1386. + "run uname_boot;" \
  1387. + "fi;" \
  1388. + "fi;" \
  1389. + "done;" \
  1390. + "fi;\0" \
  1391. +
  1392. +#define EEWIKI_SCSI_BOOT \
  1393. + "scsi_boot=${devtype} reset ; " \
  1394. + "if ${devtype} dev ${mmcdev}; then " \
  1395. + "echo Scanning ${devtype} device ${mmcdev};" \
  1396. + "setenv bootpart ${mmcdev}:1; " \
  1397. + "echo Checking for: /uEnv.txt ...;" \
  1398. + "if test -e ${devtype} ${bootpart} /uEnv.txt; then " \
  1399. + "load ${devtype} ${bootpart} ${loadaddr} /uEnv.txt;" \
  1400. + "env import -t ${loadaddr} ${filesize};" \
  1401. + "echo Loaded environment from /uEnv.txt;" \
  1402. + "echo Checking if uenvcmd is set ...;" \
  1403. + "if test -n ${uenvcmd}; then " \
  1404. + "echo Running uenvcmd ...;" \
  1405. + "run uenvcmd;" \
  1406. + "fi;" \
  1407. + "fi; " \
  1408. + "echo Checking for: /boot/uEnv.txt ...;" \
  1409. + "for i in 1 2 3 4 ; do " \
  1410. + "setenv mmcpart ${i};" \
  1411. + "setenv bootpart ${mmcdev}:${mmcpart};" \
  1412. + "if test -e ${devtype} ${bootpart} /boot/uEnv.txt; then " \
  1413. + "load ${devtype} ${bootpart} ${loadaddr} /boot/uEnv.txt;" \
  1414. + "env import -t ${loadaddr} ${filesize};" \
  1415. + "echo Loaded environment from /boot/uEnv.txt;" \
  1416. + "if test -n ${dtb}; then " \
  1417. + "setenv fdtfile ${dtb};" \
  1418. + "echo debug: [dtb=${fdtfile}] ...;" \
  1419. + "fi;" \
  1420. + "echo Checking if uname_r is set in /boot/uEnv.txt ...;" \
  1421. + "if test -n ${uname_r}; then " \
  1422. + "echo debug: [uname_r=${uname_r}] ...;" \
  1423. + "setenv oldroot /dev/sda${mmcpart};" \
  1424. + "run uname_boot;" \
  1425. + "fi;" \
  1426. + "fi;" \
  1427. + "done;" \
  1428. + "fi;\0" \
  1429. +
  1430. +#define EEWIKI_USB_BOOT \
  1431. + "usb_boot=${devtype} reset ; " \
  1432. + "if ${devtype} dev ${mmcdev}; then " \
  1433. + "echo Scanning ${devtype} device ${mmcdev};" \
  1434. + "setenv bootpart ${mmcdev}:1; " \
  1435. + "echo Checking for: /uEnv.txt ...;" \
  1436. + "if test -e ${devtype} ${bootpart} /uEnv.txt; then " \
  1437. + "load ${devtype} ${bootpart} ${loadaddr} /uEnv.txt;" \
  1438. + "env import -t ${loadaddr} ${filesize};" \
  1439. + "echo Loaded environment from /uEnv.txt;" \
  1440. + "echo Checking if uenvcmd is set in /uEnv.txt ...;" \
  1441. + "if test -n ${uenvcmd}; then " \
  1442. + "echo Running uenvcmd ...;" \
  1443. + "run uenvcmd;" \
  1444. + "fi;" \
  1445. + "fi; " \
  1446. + "echo Checking for: /boot/uEnv.txt ...;" \
  1447. + "for i in 1 2 3 4 ; do " \
  1448. + "setenv mmcpart ${i};" \
  1449. + "setenv bootpart ${mmcdev}:${mmcpart};" \
  1450. + "if test -e ${devtype} ${bootpart} /boot/uEnv.txt; then " \
  1451. + "load ${devtype} ${bootpart} ${loadaddr} /boot/uEnv.txt;" \
  1452. + "env import -t ${loadaddr} ${filesize};" \
  1453. + "echo Loaded environment from /boot/uEnv.txt;" \
  1454. + "if test -n ${dtb}; then " \
  1455. + "setenv fdtfile ${dtb};" \
  1456. + "echo debug: [dtb=${fdtfile}] ...;" \
  1457. + "fi;" \
  1458. + "echo Checking if uname_r is set in /boot/uEnv.txt ...;" \
  1459. + "if test -n ${uname_r}; then " \
  1460. + "echo debug: [uname_r=${uname_r}] ...;" \
  1461. + "setenv oldroot /dev/sda${mmcpart};" \
  1462. + "run uname_boot;" \
  1463. + "fi;" \
  1464. + "fi;" \
  1465. + "done;" \
  1466. + "fi;\0" \
  1467. +
  1468. +#define EEWIKI_UNAME_BOOT \
  1469. + "uname_boot="\
  1470. + "setenv bootdir /boot; " \
  1471. + "setenv bootfile vmlinuz-${uname_r}; " \
  1472. + "if test -e ${devtype} ${bootpart} ${bootdir}/${bootfile}; then " \
  1473. + "echo loading ${bootdir}/${bootfile} ...; "\
  1474. + "run loadimage;" \
  1475. + "setenv fdtdir /boot/dtbs/${uname_r}; " \
  1476. + "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \
  1477. + "run loadfdt;" \
  1478. + "else " \
  1479. + "setenv fdtdir /usr/lib/linux-image-${uname_r}; " \
  1480. + "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \
  1481. + "run loadfdt;" \
  1482. + "else " \
  1483. + "setenv fdtdir /lib/firmware/${uname_r}/device-tree; " \
  1484. + "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \
  1485. + "run loadfdt;" \
  1486. + "else " \
  1487. + "setenv fdtdir /boot/dtb-${uname_r}; " \
  1488. + "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \
  1489. + "run loadfdt;" \
  1490. + "else " \
  1491. + "setenv fdtdir /boot/dtbs; " \
  1492. + "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \
  1493. + "run loadfdt;" \
  1494. + "else " \
  1495. + "setenv fdtdir /boot/dtb; " \
  1496. + "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \
  1497. + "run loadfdt;" \
  1498. + "else " \
  1499. + "setenv fdtdir /boot; " \
  1500. + "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \
  1501. + "run loadfdt;" \
  1502. + "else " \
  1503. + "echo; echo unable to find ${fdtfile} ...; echo booting legacy ...;"\
  1504. + "run args_mmc;" \
  1505. + "echo debug: [${bootargs}] ... ;" \
  1506. + "echo debug: [bootz ${loadaddr}] ... ;" \
  1507. + "bootz ${loadaddr}; " \
  1508. + "fi;" \
  1509. + "fi;" \
  1510. + "fi;" \
  1511. + "fi;" \
  1512. + "fi;" \
  1513. + "fi;" \
  1514. + "fi; " \
  1515. + "if test -n ${enable_uboot_overlays}; then " \
  1516. + "setenv fdt_buffer 0x60000;" \
  1517. + "if test -n ${uboot_fdt_buffer}; then " \
  1518. + "setenv fdt_buffer ${uboot_fdt_buffer};" \
  1519. + "fi;" \
  1520. + "echo uboot_overlays: [fdt_buffer=${fdt_buffer}] ... ;" \
  1521. + "if test -n ${uboot_overlay_addr0}; then " \
  1522. + "setenv uboot_overlay ${uboot_overlay_addr0}; " \
  1523. + "run capeloadoverlay;" \
  1524. + "fi;" \
  1525. + "if test -n ${uboot_overlay_addr1}; then " \
  1526. + "setenv uboot_overlay ${uboot_overlay_addr1}; " \
  1527. + "run capeloadoverlay;" \
  1528. + "fi;" \
  1529. + "if test -n ${uboot_overlay_addr2}; then " \
  1530. + "setenv uboot_overlay ${uboot_overlay_addr2}; " \
  1531. + "run capeloadoverlay;" \
  1532. + "fi;" \
  1533. + "if test -n ${uboot_overlay_addr3}; then " \
  1534. + "setenv uboot_overlay ${uboot_overlay_addr3}; " \
  1535. + "run capeloadoverlay;" \
  1536. + "fi;" \
  1537. + "if test -n ${uboot_overlay_addr4}; then " \
  1538. + "setenv uboot_overlay ${uboot_overlay_addr4}; " \
  1539. + "run capeloadoverlay;" \
  1540. + "fi;" \
  1541. + "if test -n ${uboot_overlay_addr5}; then " \
  1542. + "setenv uboot_overlay ${uboot_overlay_addr5}; " \
  1543. + "run capeloadoverlay;" \
  1544. + "fi;" \
  1545. + "if test -n ${uboot_overlay_addr6}; then " \
  1546. + "setenv uboot_overlay ${uboot_overlay_addr6}; " \
  1547. + "run capeloadoverlay;" \
  1548. + "fi;" \
  1549. + "if test -n ${uboot_overlay_addr7}; then " \
  1550. + "setenv uboot_overlay ${uboot_overlay_addr7}; " \
  1551. + "run capeloadoverlay;" \
  1552. + "fi;" \
  1553. + "if test -n ${uboot_overlay_pru}; then " \
  1554. + "setenv uboot_overlay ${uboot_overlay_pru}; " \
  1555. + "run virtualloadoverlay;" \
  1556. + "fi;" \
  1557. + "else " \
  1558. + "echo uboot_overlays: add [enable_uboot_overlays=1] to /boot/uEnv.txt to enable...;" \
  1559. + "fi;" \
  1560. + "setenv rdfile initrd.img-${uname_r}; " \
  1561. + "if test -e ${devtype} ${bootpart} ${bootdir}/${rdfile}; then " \
  1562. + "echo loading ${bootdir}/${rdfile} ...; "\
  1563. + "run loadrd;" \
  1564. + "if test -n ${netinstall_enable}; then " \
  1565. + "run args_netinstall; run message;" \
  1566. + "echo debug: [${bootargs}] ... ;" \
  1567. + "echo debug: [bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}] ... ;" \
  1568. + "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \
  1569. + "fi;" \
  1570. + "if test -n ${uenv_root}; then " \
  1571. + "run args_uenv_root;" \
  1572. + "echo debug: [${bootargs}] ... ;" \
  1573. + "echo debug: [bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}] ... ;" \
  1574. + "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \
  1575. + "fi;" \
  1576. + "if test -n ${uuid}; then " \
  1577. + "run args_mmc_uuid;" \
  1578. + "echo debug: [${bootargs}] ... ;" \
  1579. + "echo debug: [bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}] ... ;" \
  1580. + "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \
  1581. + "else " \
  1582. + "run args_mmc_old;" \
  1583. + "echo debug: [${bootargs}] ... ;" \
  1584. + "echo debug: [bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}] ... ;" \
  1585. + "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \
  1586. + "fi;" \
  1587. + "else " \
  1588. + "if test -n ${uenv_root}; then " \
  1589. + "run args_uenv_root;" \
  1590. + "echo debug: [${bootargs}] ... ;" \
  1591. + "echo debug: [bootz ${loadaddr} - ${fdtaddr}] ... ;" \
  1592. + "bootz ${loadaddr} - ${fdtaddr}; " \
  1593. + "fi;" \
  1594. + "run args_mmc_old;" \
  1595. + "echo debug: [${bootargs}] ... ;" \
  1596. + "echo debug: [bootz ${loadaddr} - ${fdtaddr}] ... ;" \
  1597. + "bootz ${loadaddr} - ${fdtaddr}; " \
  1598. + "fi;" \
  1599. + "fi;\0" \
  1600. +
  1601. /*
  1602. * The following are general good-enough settings for U-Boot. We set a
  1603. * large malloc pool as we generally have a lot of DDR, and we opt for
  1604. diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h
  1605. index ba57c40182..93368cdc51 100644
  1606. --- a/include/configs/ti_omap5_common.h
  1607. +++ b/include/configs/ti_omap5_common.h
  1608. @@ -63,6 +63,11 @@
  1609. DEFAULT_FIT_TI_ARGS \
  1610. DEFAULT_COMMON_BOOT_TI_ARGS \
  1611. DEFAULT_FDT_TI_ARGS \
  1612. + EEWIKI_USB_BOOT \
  1613. + EEWIKI_SCSI_BOOT \
  1614. + EEWIKI_MMC_BOOT \
  1615. + EEWIKI_UNAME_BOOT \
  1616. + EEPROM_PROGRAMMING \
  1617. DFUARGS \
  1618. NETARGS \
  1619. diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h
  1620. index 05bdbbc23e..b0254b064a 100644
  1621. --- a/include/environment/ti/boot.h
  1622. +++ b/include/environment/ti/boot.h
  1623. @@ -64,32 +64,18 @@
  1624. "bootpart=0:2\0" \
  1625. "bootdir=/boot\0" \
  1626. "bootfile=zImage\0" \
  1627. + "board_eeprom_header=undefined\0" \
  1628. "usbtty=cdc_acm\0" \
  1629. "vram=16M\0" \
  1630. AVB_VERIFY_CMD \
  1631. "partitions=" PARTS_DEFAULT "\0" \
  1632. "optargs=\0" \
  1633. "dofastboot=0\0" \
  1634. - "emmc_linux_boot=" \
  1635. - "echo Trying to boot Linux from eMMC ...; " \
  1636. - "setenv mmcdev 1; " \
  1637. - "setenv bootpart 1:2; " \
  1638. - "setenv mmcroot /dev/mmcblk0p2 rw; " \
  1639. - "run mmcboot;\0" \
  1640. - "emmc_android_boot=" \
  1641. - "echo Trying to boot Android from eMMC ...; " \
  1642. - "run update_to_fit; " \
  1643. - "setenv eval_bootargs setenv bootargs $bootargs; " \
  1644. - "run eval_bootargs; " \
  1645. - "setenv mmcdev 1; " \
  1646. - "setenv machid fe6; " \
  1647. - "mmc dev $mmcdev; " \
  1648. - "mmc rescan; " \
  1649. - AVB_VERIFY_CHECK \
  1650. - "part start mmc ${mmcdev} boot boot_start; " \
  1651. - "part size mmc ${mmcdev} boot boot_size; " \
  1652. - "mmc read ${loadaddr} ${boot_start} ${boot_size}; " \
  1653. - "bootm ${loadaddr}#${fdtfile};\0 "
  1654. + "read_board_eeprom="\
  1655. + "if test $board_eeprom_header = beagle_x15_revb1_blank; then " \
  1656. + "run eeprom_dump; run eeprom_x15_b1; reset; fi; " \
  1657. + "if test $board_eeprom_header = beagle_x15_revc_blank; then " \
  1658. + "run eeprom_dump; run eeprom_x15_c; reset; fi; \0 "
  1659. #ifdef CONFIG_OMAP54XX
  1660. @@ -127,20 +113,17 @@
  1661. "echo WARNING: Could not determine device tree to use; fi; \0"
  1662. #define CONFIG_BOOTCOMMAND \
  1663. - "if test ${dofastboot} -eq 1; then " \
  1664. - "echo Boot fastboot requested, resetting dofastboot ...;" \
  1665. - "setenv dofastboot 0; saveenv;" \
  1666. - "echo Booting into fastboot ...; " \
  1667. - "fastboot " __stringify(CONFIG_FASTBOOT_USB_DEV) "; " \
  1668. - "fi;" \
  1669. - "if test ${boot_fit} -eq 1; then " \
  1670. - "run update_to_fit;" \
  1671. - "fi;" \
  1672. + "run read_board_eeprom; " \
  1673. "run findfdt; " \
  1674. - "run envboot; " \
  1675. - "run mmcboot;" \
  1676. - "run emmc_linux_boot; " \
  1677. - "run emmc_android_boot; " \
  1678. + "setenv mmcdev 0; " \
  1679. + "setenv devtype usb; " \
  1680. + "echo usb_boot is currently disabled;" \
  1681. + "setenv devtype scsi; " \
  1682. + "echo scsi_boot is currently disabled;" \
  1683. + "setenv devtype mmc; " \
  1684. + "run mmc_boot;" \
  1685. + "setenv mmcdev 1; " \
  1686. + "run mmc_boot;" \
  1687. ""
  1688. #endif /* CONFIG_OMAP54XX */
  1689. diff --git a/include/environment/ti/mmc.h b/include/environment/ti/mmc.h
  1690. index 785fc15345..6481682fc7 100644
  1691. --- a/include/environment/ti/mmc.h
  1692. +++ b/include/environment/ti/mmc.h
  1693. @@ -11,11 +11,33 @@
  1694. #define DEFAULT_MMC_TI_ARGS \
  1695. "mmcdev=0\0" \
  1696. "mmcrootfstype=ext4 rootwait\0" \
  1697. - "finduuid=part uuid mmc ${bootpart} uuid\0" \
  1698. + "finduuid=part uuid ${devtype} ${bootpart} uuid\0" \
  1699. "args_mmc=run finduuid;setenv bootargs console=${console} " \
  1700. "${optargs} " \
  1701. - "root=PARTUUID=${uuid} rw " \
  1702. - "rootfstype=${mmcrootfstype}\0" \
  1703. + "root=PARTUUID=${uuid} ro " \
  1704. + "rootfstype=${mmcrootfstype} " \
  1705. + "${cmdline}\0" \
  1706. + "args_mmc_old=setenv bootargs console=${console} " \
  1707. + "${optargs} " \
  1708. + "root=${oldroot} ro " \
  1709. + "rootfstype=${mmcrootfstype} " \
  1710. + "${cmdline}\0" \
  1711. + "args_mmc_uuid=setenv bootargs console=${console} " \
  1712. + "${optargs} " \
  1713. + "root=UUID=${uuid} ro " \
  1714. + "rootfstype=${mmcrootfstype} " \
  1715. + "${cmdline}\0" \
  1716. + "args_uenv_root=setenv bootargs console=${console} " \
  1717. + "${optargs} " \
  1718. + "root=${uenv_root} ro " \
  1719. + "rootfstype=${mmcrootfstype} " \
  1720. + "${musb} ${cmdline}\0" \
  1721. + "args_netinstall=setenv bootargs ${netinstall_bootargs} " \
  1722. + "${optargs} " \
  1723. + "${cape_disable} " \
  1724. + "${cape_enable} " \
  1725. + "root=/dev/ram rw " \
  1726. + "${cmdline}\0" \
  1727. "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
  1728. "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
  1729. "source ${loadaddr}\0" \
  1730. @@ -24,7 +46,22 @@
  1731. "env import -t ${loadaddr} ${filesize}\0" \
  1732. "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \
  1733. "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
  1734. - "loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
  1735. + "loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}; setenv rdsize ${filesize}\0" \
  1736. + "loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}\0" \
  1737. + "loadoverlay=echo uboot_overlays: loading ${uboot_overlay} ...; " \
  1738. + "load ${devtype} ${bootpart} ${rdaddr} ${uboot_overlay}; " \
  1739. + "fdt addr ${fdtaddr}; fdt resize ${fdt_buffer}; " \
  1740. + "fdt apply ${rdaddr}; fdt resize ${fdt_buffer};\0" \
  1741. + "virtualloadoverlay=if test -e ${devtype} ${bootpart} ${uboot_overlay}; then " \
  1742. + "run loadoverlay;" \
  1743. + "else " \
  1744. + "echo uboot_overlays: unable to find [${devtype} ${bootpart} ${uboot_overlay}]...;" \
  1745. + "fi;\0" \
  1746. + "capeloadoverlay=if test -e ${devtype} ${bootpart} ${uboot_overlay}; then " \
  1747. + "run loadoverlay;" \
  1748. + "else " \
  1749. + "echo uboot_overlays: unable to find [${devtype} ${bootpart} ${uboot_overlay}]...;" \
  1750. + "fi;\0" \
  1751. "envboot=mmc dev ${mmcdev}; " \
  1752. "if mmc rescan; then " \
  1753. "echo SD/MMC found on device ${mmcdev};" \
  1754. --
  1755. 2.17.1