Commit 98d6699ee4eb39da43386dc83cc63136d742312a

Authored by Eric Lee
1 parent b4e185a8c3

Initial Commit, Upgrade SMARC-T4378 U-Boot to v2016.05

Showing 31 changed files with 3988 additions and 4 deletions Side-by-side Diff

... ... @@ -872,6 +872,7 @@
872 872 source "board/tcl/sl50/Kconfig"
873 873 source "board/ti/am335x/Kconfig"
874 874 source "board/ti/am43xx/Kconfig"
  875 +source "board/embedian/smarct437x/Kconfig"
875 876 source "board/birdland/bav335x/Kconfig"
876 877 source "board/ti/ti814x/Kconfig"
877 878 source "board/ti/ti816x/Kconfig"
arch/arm/cpu/armv7/am33xx/Kconfig
... ... @@ -10,6 +10,18 @@
10 10 to write software and develop hardware around
11 11 an AM43xx processor subsystem.
12 12  
  13 +config TARGET_SMARCT437X_EVM
  14 + bool "Support smarct437x_evm"
  15 + help
  16 + The SMARC-T4378 integrates all the functions of an embedded
  17 + general-purpose computer in a small, easy to use SMARC module
  18 + which incorporates the popular Texas Instruments Sitara AM4378
  19 + 32bit ARM Coretex-A9 processor, with fast DDR3L 512MB/1GB SDRAM,
  20 + 4GB of embedded MMC and a dual Gigabit ethernet with simple
  21 + connection to external connectors.
  22 +
  23 + For more information, visit: http://www.embedian.com/
  24 +
13 25 config ISW_ENTRY_ADDR
14 26 hex "Address in memory or XIP flash of bootloader entry point"
15 27 help
arch/arm/cpu/armv7/am33xx/board.c
... ... @@ -114,7 +114,7 @@
114 114 if (ret)
115 115 return ret;
116 116  
117   - return omap_mmc_init(1, 0, 0, -1, -1);
  117 + return omap_mmc_init(2, 0, 0, -1, -1);
118 118 }
119 119 #endif
120 120  
arch/arm/cpu/armv7/am33xx/clock_am43xx.c
... ... @@ -60,6 +60,11 @@
60 60 CD_CLKCTRL_CLKTRCTRL_SW_WKUP <<
61 61 CD_CLKCTRL_CLKTRCTRL_SHIFT);
62 62  
  63 + clrsetbits_le32(&cmper->l4lsclkstctrl, CD_CLKCTRL_CLKTRCTRL_MASK,
  64 + CD_CLKCTRL_CLKTRCTRL_SW_WKUP <<
  65 + CD_CLKCTRL_CLKTRCTRL_SHIFT);
  66 +
  67 +
63 68 /* Enable UART0 */
64 69 clrsetbits_le32(&cmwkup->wkup_uart0ctrl,
65 70 MODULE_CLKCTRL_MODULEMODE_MASK,
... ... @@ -72,6 +77,42 @@
72 77 idlest = (clkctrl & MODULE_CLKCTRL_IDLEST_MASK) >>
73 78 MODULE_CLKCTRL_IDLEST_SHIFT;
74 79 }
  80 +
  81 + /* Enable UART2 */
  82 + clrsetbits_le32(&cmper->uart2clkctrl,
  83 + MODULE_CLKCTRL_MODULEMODE_MASK,
  84 + MODULE_CLKCTRL_MODULEMODE_SW_EXPLICIT_EN <<
  85 + MODULE_CLKCTRL_MODULEMODE_SHIFT);
  86 + while ((idlest == MODULE_CLKCTRL_IDLEST_DISABLED) ||
  87 + (idlest == MODULE_CLKCTRL_IDLEST_TRANSITIONING)) {
  88 + clkctrl = readl(&cmper->uart2clkctrl);
  89 + idlest = (clkctrl & MODULE_CLKCTRL_IDLEST_MASK) >>
  90 + MODULE_CLKCTRL_IDLEST_SHIFT;
  91 + }
  92 +
  93 + /* Enable UART3 */
  94 + clrsetbits_le32(&cmper->uart3clkctrl,
  95 + MODULE_CLKCTRL_MODULEMODE_MASK,
  96 + MODULE_CLKCTRL_MODULEMODE_SW_EXPLICIT_EN <<
  97 + MODULE_CLKCTRL_MODULEMODE_SHIFT);
  98 + while ((idlest == MODULE_CLKCTRL_IDLEST_DISABLED) ||
  99 + (idlest == MODULE_CLKCTRL_IDLEST_TRANSITIONING)) {
  100 + clkctrl = readl(&cmper->uart3clkctrl);
  101 + idlest = (clkctrl & MODULE_CLKCTRL_IDLEST_MASK) >>
  102 + MODULE_CLKCTRL_IDLEST_SHIFT;
  103 + }
  104 +
  105 + /* Enable UART4 */
  106 + clrsetbits_le32(&cmper->uart4clkctrl,
  107 + MODULE_CLKCTRL_MODULEMODE_MASK,
  108 + MODULE_CLKCTRL_MODULEMODE_SW_EXPLICIT_EN <<
  109 + MODULE_CLKCTRL_MODULEMODE_SHIFT);
  110 + while ((idlest == MODULE_CLKCTRL_IDLEST_DISABLED) ||
  111 + (idlest == MODULE_CLKCTRL_IDLEST_TRANSITIONING)) {
  112 + clkctrl = readl(&cmper->uart4clkctrl);
  113 + idlest = (clkctrl & MODULE_CLKCTRL_IDLEST_MASK) >>
  114 + MODULE_CLKCTRL_IDLEST_SHIFT;
  115 + }
75 116 }
76 117  
77 118 void enable_basic_clocks(void)
... ... @@ -99,6 +140,7 @@
99 140 &cmper->elmclkctrl,
100 141 &cmper->mmc0clkctrl,
101 142 &cmper->mmc1clkctrl,
  143 + &cmper->mmc2clkctrl,
102 144 &cmwkup->wkup_i2c0ctrl,
103 145 &cmper->gpio1clkctrl,
104 146 &cmper->gpio2clkctrl,
105 147  
... ... @@ -106,11 +148,11 @@
106 148 &cmper->gpio4clkctrl,
107 149 &cmper->gpio5clkctrl,
108 150 &cmper->i2c1clkctrl,
  151 + &cmper->i2c2clkctrl,
109 152 &cmper->cpgmac0clkctrl,
110 153 &cmper->emiffwclkctrl,
111 154 &cmper->emifclkctrl,
112 155 &cmper->otfaemifclkctrl,
113   - &cmper->qspiclkctrl,
114 156 &cmper->spi0clkctrl,
115 157 0
116 158 };
... ... @@ -122,6 +164,10 @@
122 164  
123 165 /* For OPP100 the mac clock should be /5. */
124 166 writel(0x4, &cmdpll->clkselmacclk);
  167 +
  168 + /* enable i2c1 clock */
  169 + writel(0x2, &cmper->i2c1clkctrl);
  170 + while (readl(&cmper->i2c1clkctrl) != 0x2) ;
125 171 }
126 172  
127 173 void rtc_only_enable_basic_clocks(void)
arch/arm/dts/Makefile
... ... @@ -94,6 +94,7 @@
94 94 am335x-bonegreen.dtb \
95 95 am335x-icev2.dtb
96 96 dtb-$(CONFIG_AM43XX) += am437x-gp-evm.dtb am437x-sk-evm.dtb \
  97 + am437x-smarct437x.dtb \
97 98 am43x-epos-evm.dtb \
98 99 am437x-idk-evm.dtb
99 100 dtb-$(CONFIG_THUNDERX) += thunderx-88xx.dtb
arch/arm/dts/am437x-smarct437x.dts
  1 +/*
  2 + * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
  3 + *
  4 + * This program is free software; you can redistribute it and/or modify
  5 + * it under the terms of the GNU General Public License version 2 as
  6 + * published by the Free Software Foundation.
  7 + */
  8 +
  9 +/* AM437x SK EVM */
  10 +
  11 +/dts-v1/;
  12 +
  13 +#include "am4372.dtsi"
  14 +#include <dt-bindings/pinctrl/am43xx.h>
  15 +#include <dt-bindings/pwm/pwm.h>
  16 +#include <dt-bindings/gpio/gpio.h>
  17 +#include <dt-bindings/input/input.h>
  18 +
  19 +/ {
  20 + model = "TI AM437x SMARCT437X";
  21 + compatible = "ti,am437x-smarct437x","ti,am4372","ti,am43";
  22 +
  23 + aliases {
  24 + display0 = &lcd0;
  25 + };
  26 +
  27 + chosen {
  28 + stdout-path = &uart4;
  29 + tick-timer = &timer2;
  30 + };
  31 +
  32 + vmmcwl_fixed: fixedregulator-mmcwl {
  33 + compatible = "regulator-fixed";
  34 + regulator-name = "vmmcwl_fixed";
  35 + regulator-min-microvolt = <1800000>;
  36 + regulator-max-microvolt = <1800000>;
  37 + };
  38 +
  39 + backlight {
  40 + compatible = "pwm-backlight";
  41 + enable-gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>; /* Backlight Enable Pin*/
  42 + pwms = <&ehrpwm0 1 250000 PWM_POLARITY_INVERTED>;
  43 + brightness-levels = <0 51 53 56 62 75 128 212 255>;
  44 + default-brightness-level = <7>; /* 7 is the brightest */
  45 + };
  46 +
  47 + sound: sound@0 {
  48 + compatible = "simple-audio-card";
  49 + simple-audio-card,name = "SMARCT437X SOUND CARD";
  50 + simple-audio-card,widgets =
  51 + "Headphone", "Headphone Jack",
  52 + "Line", "Line In";
  53 + simple-audio-card,routing =
  54 + "Headphone Jack", "HPLOUT",
  55 + "Headphone Jack", "HPROUT",
  56 + "LINE1L", "Line In",
  57 + "LINE1R", "Line In";
  58 + simple-audio-card,format = "dsp_b";
  59 + simple-audio-card,bitclock-master = <&sound_master>;
  60 + simple-audio-card,frame-master = <&sound_master>;
  61 + simple-audio-card,bitclock-inversion;
  62 +
  63 + simple-audio-card,cpu {
  64 + sound-dai = <&mcasp1>;
  65 + system-clock-frequency = <12000000>;
  66 + };
  67 +
  68 + /* For TI TLV320AIC3106 Audio Codec */
  69 + /*sound_master: simple-audio-card,codec {
  70 + sound-dai = <&tlv320aic3106>;
  71 + system-clock-frequency = <24576000>;*/
  72 +
  73 + /* For Freescale SGTL5000 Audio Codec */
  74 + sound_master: simple-audio-card,codec {
  75 + sound-dai = <&sgtl5000>;
  76 + system-clock-frequency = <24000000>;
  77 + };
  78 + };
  79 +
  80 + audio_mstrclk: mclk_osc {
  81 + compatible = "fixed-clock";
  82 + #clock-cells = <0>;
  83 + clock-frequency = <24000000>;
  84 + };
  85 +
  86 + lcd0: display {
  87 + compatible = "primeview,pm070wl4", "panel-dpi";
  88 + label = "lcd";
  89 +
  90 + pinctrl-names = "default";
  91 + pinctrl-0 = <&lcd_pins>;
  92 +
  93 + enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
  94 +
  95 + panel-timing {
  96 + clock-frequency = <32000000>;
  97 + hactive = <800>;
  98 + vactive = <480>;
  99 + hfront-porch = <42>;
  100 + hback-porch = <84>;
  101 + hsync-len = <128>;
  102 + vback-porch = <33>;
  103 + vfront-porch = <10>;
  104 + vsync-len = <2>;
  105 + hsync-active = <0>;
  106 + vsync-active = <0>;
  107 + de-active = <1>;
  108 + pixelclk-active = <1>;
  109 + };
  110 +
  111 + port {
  112 + lcd_in: endpoint {
  113 + remote-endpoint = <&dpi_out>;
  114 + };
  115 + };
  116 + };
  117 +};
  118 +
  119 +&am43xx_pinmux {
  120 + pinctrl-names = "default";
  121 + pinctrl-0 = <&clkout1_pin &clkout2_pin &gpio_pins_default &wdt_time_out_pins_default &debugss_pins>;
  122 +
  123 + i2c0_pins: i2c0_pins {
  124 + pinctrl-single,pins = <
  125 + 0x188 (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0) /* i2c0_sda.i2c0_sda */
  126 + 0x18c (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0) /* i2c0_scl.i2c0_scl */
  127 + >;
  128 + };
  129 +
  130 + i2c1_pins: i2c1_pins {
  131 + pinctrl-single,pins = <
  132 + 0x110 (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE3) /* mii1_rxerr.i2c1_scl */
  133 + 0x10c (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE3) /* mii1_crs.i2c1_sda */
  134 + >;
  135 + };
  136 +
  137 + i2c2_pins: i2c2_pins {
  138 + pinctrl-single,pins = <
  139 + 0x1ec (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE3) /* cam1_data1.i2c2_scl */
  140 + 0x1e8 (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE3) /* cam1_data0.i2c2_sda */
  141 + >;
  142 + };
  143 +
  144 + mmc1_pins: pinmux_mmc1_pins {
  145 + pinctrl-single,pins = <
  146 + 0x0f0 (PIN_INPUT | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */
  147 + 0x0f4 (PIN_INPUT | MUX_MODE0) /* mmc0_dat2.mmc0_dat2 */
  148 + 0x0f8 (PIN_INPUT | MUX_MODE0) /* mmc0_dat1.mmc0_dat1 */
  149 + 0x0fc (PIN_INPUT | MUX_MODE0) /* mmc0_dat0.mmc0_dat0 */
  150 + 0x100 (PIN_INPUT | MUX_MODE0) /* mmc0_clk.mmc0_clk */
  151 + 0x104 (PIN_INPUT | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */
  152 + 0x160 (PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
  153 + >;
  154 + };
  155 +
  156 + emmc_pins: pinmux_emmc_pins {
  157 + pinctrl-single,pins = <
  158 + 0x80 (PIN_INPUT | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
  159 + 0x84 (PIN_INPUT | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
  160 + 0x00 (PIN_INPUT | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */
  161 + 0x04 (PIN_INPUT | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */
  162 + 0x08 (PIN_INPUT | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */
  163 + 0x0c (PIN_INPUT | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */
  164 + 0x10 (PIN_INPUT | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */
  165 + 0x14 (PIN_INPUT | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */
  166 + 0x18 (PIN_INPUT | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */
  167 + 0x1c (PIN_INPUT | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */
  168 + >;
  169 + };
  170 +
  171 + sdmmc_pins: pinmux_sdmmc_pins {
  172 + pinctrl-single,pins = <
  173 + 0x8c (PIN_INPUT | MUX_MODE3) /* gpmc_clk.mmc2_clk */
  174 + 0x88 (PIN_INPUT | MUX_MODE3) /* gpmc_csn3.mmc2_cmd */
  175 + 0x30 (PIN_INPUT | MUX_MODE3) /* gpmc_ad12.mmc2_dat0 */
  176 + 0x34 (PIN_INPUT | MUX_MODE3) /* gpmc_ad13.mmc2_dat1 */
  177 + 0x38 (PIN_INPUT | MUX_MODE3) /* gpmc_ad14.mmc2_dat2 */
  178 + 0x3c (PIN_INPUT | MUX_MODE3) /* gpmc_ad15.mmc2_dat3 */
  179 + 0x20 (PIN_INPUT | MUX_MODE3) /* gpmc_ad8.mmc2_dat4 */
  180 + 0x24 (PIN_INPUT | MUX_MODE3) /* gpmc_ad9.mmc2_dat5 */
  181 + 0x28 (PIN_INPUT | MUX_MODE3) /* gpmc_ad10.mmc2_dat6 */
  182 + 0x2c (PIN_INPUT | MUX_MODE3) /* gpmc_ad11.mmc2_dat7 */
  183 + >;
  184 + };
  185 +
  186 + ehrpwm0b_pins: backlight_pins {
  187 + pinctrl-single,pins = <
  188 + 0x1d8 (PIN_OUTPUT | MUX_MODE6) /* cam1_vd.ehrpwm0B */
  189 + >;
  190 + };
  191 +
  192 + clkout1_pin: pinmux_clkout1_pin {
  193 + pinctrl-single,pins = <
  194 + 0x270 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* XDMA_EVENT_INTR0/CLKOUT1 */
  195 + >;
  196 + };
  197 +
  198 + clkout2_pin: pinmux_clkout2_pin {
  199 + pinctrl-single,pins = <
  200 + 0x274 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* XDMA_EVENT_INTR1/CLKOUT2 */
  201 + >;
  202 + };
  203 +
  204 + dcan0_default: dcan0_default_pins {
  205 + pinctrl-single,pins = <
  206 + 0x17c (PIN_INPUT_PULLUP | MUX_MODE2) /* uart1_rtsn.dcan0_rx */
  207 + 0x178 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* uart1_ctsn.dcan0_tx */
  208 + >;
  209 + };
  210 +
  211 + dcan1_default: dcan1_default_pins {
  212 + pinctrl-single,pins = <
  213 + 0x184 (PIN_INPUT_PULLUP | MUX_MODE2) /* uart1_txd.dcan1_rx */
  214 + 0x180 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* uart1_rxd.dcan1_tx */
  215 + >;
  216 + };
  217 +
  218 + uart0_pins: pinmux_uart0_pins {
  219 + pinctrl-single,pins = <
  220 + 0x168 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE0) /* uart0_ctsn.uart0_ctsn */
  221 + 0x16c (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE0) /* uart0_rtsn.uart0_rtsn */
  222 + 0x170 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE0) /* uart0_rxd.uart0_rxd */
  223 + 0x174 (PIN_INPUT | PULL_DISABLE | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE0) /* uart0_txd.uart0_txd */
  224 + >;
  225 + };
  226 +
  227 + uart0_pins_sleep: pinmux_uart0_pins_sleep {
  228 + pinctrl-single,pins = <
  229 + 0x168 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  230 + 0x16c (PIN_INPUT_PULLDOWN | MUX_MODE7)
  231 + 0x170 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  232 + 0x174 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  233 + >;
  234 + };
  235 +
  236 + uart3_pins: pinmux_uart3_pins {
  237 + pinctrl-single,pins = <
  238 + 0x228 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE0) /* uart3_rxd.uart3_rxd */
  239 + 0x22c (PIN_INPUT | PULL_DISABLE | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE0) /* uart3_txd.uart3_txd */
  240 + >;
  241 + };
  242 +
  243 + uart3_pins_sleep: pinmux_uart3_pins_sleep {
  244 + pinctrl-single,pins = <
  245 + 0x228 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  246 + 0x22c (PIN_INPUT_PULLDOWN | MUX_MODE7)
  247 + >;
  248 + };
  249 +
  250 + uart2_pins: pinmux_uart2_pins {
  251 + pinctrl-single,pins = <
  252 + 0x200 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE2) /* cam1_data6.uart2_ctsn */
  253 + 0x204 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE2) /* cam1_data7_rtsn.uart2_rtsn */
  254 + 0x1f8 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE2) /* cam1_data4_uart2rxd */
  255 + 0x1fc (PIN_INPUT | PULL_DISABLE | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE2) /* cam1_data5.uart2_txd */
  256 + >;
  257 + };
  258 +
  259 + uart2_pins_sleep: pinmux_uart2_pins_sleep {
  260 + pinctrl-single,pins = <
  261 + 0x200 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  262 + 0x204 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  263 + 0x1f8 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  264 + 0x1fc (PIN_INPUT_PULLDOWN | MUX_MODE7)
  265 + >;
  266 + };
  267 +
  268 + uart4_pins: pinmux_uart4_pins {
  269 + pinctrl-single,pins = <
  270 + 0x070 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE6) /* gpmc_wait0.uart4_rxd */
  271 + 0x074 (PIN_INPUT | PULL_DISABLE | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE6) /* gpmc_wpn.uart4_txd */
  272 + >;
  273 + };
  274 +
  275 + uart4_pins_sleep: pinmux_uart4_pins_sleep {
  276 + pinctrl-single,pins = <
  277 + 0x070 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  278 + 0x174 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  279 + >;
  280 + };
  281 +
  282 + /*GPIO0-GPIO11, GPIO0-5 is input and GPIO6-11 is output by default.*/
  283 + gpio_pins_default: pinmux_gpio_pin {
  284 + pinctrl-single,pins = <
  285 + 0x26c (PIN_INPUT_PULLDOWN | MUX_MODE9) /* spi2_cs0.gpio0_23 */
  286 + 0x264 (PIN_INPUT_PULLDOWN | MUX_MODE9) /* spi2_d0.gpio0_20 */
  287 + 0x268 (PIN_INPUT_PULLDOWN | MUX_MODE9) /* spi2_d1.gpio0_21 */
  288 + 0x260 (PIN_INPUT_PULLDOWN | MUX_MODE9) /* spi2_sclk.gpio0_22 */
  289 + 0x21c (PIN_INPUT_PULLDOWN | MUX_MODE7) /* cam0_data5.gpio4_27 */
  290 + 0x224 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* cam0_data7.gpio4_29 */
  291 + 0x19c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* mcasp0_ahclkr.gpio3_17 */
  292 + 0x198 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* mcasp0_axr0.gpio3_16 */
  293 + 0x210 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* cam0_data2.gpio4_24 */
  294 + 0x214 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* cam0_data3.gpio4_25 */
  295 + 0x218 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* cam0_data4.gpio4_26 */
  296 + 0x220 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* cam0_data6.gpio4_28 */
  297 + >;
  298 + };
  299 +
  300 + wdt_time_out_pins_default: pinmux_wdt_time_out_pin {
  301 + pinctrl-single,pins = <
  302 + 0x234 (PIN_OUTPUT_PULLDOWN | MUX_MODE6) /* uart3_rtsn.ehrpwm5B */
  303 + >;
  304 + };
  305 +
  306 + cpsw_default: cpsw_default {
  307 + pinctrl-single,pins = <
  308 + /* Slave 1 */
  309 + 0x12c (PIN_OUTPUT | MUX_MODE2) /* mii1_txclk.rmii1_tclk */
  310 + 0x114 (PIN_OUTPUT | MUX_MODE2) /* mii1_txen.rgmii1_tctl */
  311 + 0x128 (PIN_OUTPUT | MUX_MODE2) /* mii1_txd0.rgmii1_td0 */
  312 + 0x124 (PIN_OUTPUT | MUX_MODE2) /* mii1_txd1.rgmii1_td1 */
  313 + 0x120 (PIN_OUTPUT | MUX_MODE2) /* mii1_txd0.rgmii1_td2 */
  314 + 0x11c (PIN_OUTPUT | MUX_MODE2) /* mii1_txd1.rgmii1_td3 */
  315 + 0x130 (PIN_INPUT | MUX_MODE2) /* mii1_rxclk.rmii1_rclk */
  316 + 0x118 (PIN_INPUT | MUX_MODE2) /* mii1_rxdv.rgmii1_rctl */
  317 + 0x140 (PIN_INPUT | MUX_MODE2) /* mii1_rxd0.rgmii1_rd0 */
  318 + 0x13c (PIN_INPUT | MUX_MODE2) /* mii1_rxd1.rgmii1_rd1 */
  319 + 0x138 (PIN_INPUT | MUX_MODE2) /* mii1_rxd0.rgmii1_rd2 */
  320 + 0x134 (PIN_INPUT | MUX_MODE2) /* mii1_rxd1.rgmii1_rd3 */
  321 +
  322 + /* Slave 2 */
  323 + 0x58 (PIN_OUTPUT | MUX_MODE2) /* gpmc_a6.rgmii2_tclk */
  324 + 0x40 (PIN_OUTPUT | MUX_MODE2) /* gpmc_a0.rgmii2_tctl */
  325 + 0x54 (PIN_OUTPUT | MUX_MODE2) /* gpmc_a5.rgmii2_td0 */
  326 + 0x50 (PIN_OUTPUT | MUX_MODE2) /* gpmc_a4.rgmii2_td1 */
  327 + 0x4c (PIN_OUTPUT | MUX_MODE2) /* gpmc_a3.rgmii2_td2 */
  328 + 0x48 (PIN_OUTPUT | MUX_MODE2) /* gpmc_a2.rgmii2_td3 */
  329 + 0x5c (PIN_INPUT | MUX_MODE2) /* gpmc_a7.rgmii2_rclk */
  330 + 0x44 (PIN_INPUT | MUX_MODE2) /* gpmc_a1.rgmii2_rtcl */
  331 + 0x6c (PIN_INPUT | MUX_MODE2) /* gpmc_a11.rgmii2_rd0 */
  332 + 0x68 (PIN_INPUT | MUX_MODE2) /* gpmc_a10.rgmii2_rd1 */
  333 + 0x64 (PIN_INPUT | MUX_MODE2) /* gpmc_a9.rgmii2_rd2 */
  334 + 0x60 (PIN_INPUT | MUX_MODE2) /* gpmc_a8.rgmii2_rd3 */
  335 + >;
  336 + };
  337 +
  338 + cpsw_sleep: cpsw_sleep {
  339 + pinctrl-single,pins = <
  340 + /* Slave 1 reset value */
  341 + 0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
  342 + 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  343 + 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  344 + 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  345 + 0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  346 + 0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
  347 + 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  348 + 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  349 + 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  350 + 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
  351 + 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  352 + 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  353 +
  354 + /* Slave 2 reset value */
  355 + 0x58 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  356 + 0x40 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  357 + 0x54 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  358 + 0x50 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  359 + 0x4c (PIN_INPUT_PULLDOWN | MUX_MODE7)
  360 + 0x48 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  361 + 0x5c (PIN_INPUT_PULLDOWN | MUX_MODE7)
  362 + 0x44 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  363 + 0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7)
  364 + 0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  365 + 0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  366 + 0x60 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  367 + >;
  368 + };
  369 +
  370 + davinci_mdio_default: davinci_mdio_default {
  371 + pinctrl-single,pins = <
  372 + /* MDIO */
  373 + 0x148 (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
  374 + 0x14c (PIN_OUTPUT | MUX_MODE0) /* mdio_clk.mdio_clk */
  375 + >;
  376 + };
  377 +
  378 + davinci_mdio_sleep: davinci_mdio_sleep {
  379 + pinctrl-single,pins = <
  380 + /* MDIO reset value */
  381 + 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  382 + 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
  383 + >;
  384 + };
  385 +
  386 + dss_pins: dss_pins {
  387 + pinctrl-single,pins = <
  388 + 0x1b0 (PIN_OUTPUT | MUX_MODE2) /* cam0_hd.dss_data23 */
  389 + 0x1b4 (PIN_OUTPUT | MUX_MODE2) /* cam0_vd.dss_data22 */
  390 + 0x1b8 (PIN_OUTPUT | MUX_MODE2) /* cam0_field.dss_data21 */
  391 + 0x1bc (PIN_OUTPUT | MUX_MODE2) /* cam0_wen.dss_data20 */
  392 + 0x1c0 (PIN_OUTPUT | MUX_MODE2) /* cam0_pclk.dss_data19 */
  393 + 0x1c4 (PIN_OUTPUT | MUX_MODE2) /* cam0_data8.dss_data18 */
  394 + 0x1c8 (PIN_OUTPUT | MUX_MODE2) /* cam0_data9.dss_data17 */
  395 + 0x1cc (PIN_OUTPUT | MUX_MODE2) /* cam1_data9.dss_data16 */
  396 + 0x0a0 (PIN_OUTPUT | MUX_MODE0) /* DSS DATA 0 */
  397 + 0x0a4 (PIN_OUTPUT | MUX_MODE0)
  398 + 0x0a8 (PIN_OUTPUT | MUX_MODE0)
  399 + 0x0ac (PIN_OUTPUT | MUX_MODE0)
  400 + 0x0b0 (PIN_OUTPUT | MUX_MODE0)
  401 + 0x0b4 (PIN_OUTPUT | MUX_MODE0)
  402 + 0x0b8 (PIN_OUTPUT | MUX_MODE0)
  403 + 0x0bc (PIN_OUTPUT | MUX_MODE0)
  404 + 0x0c0 (PIN_OUTPUT | MUX_MODE0)
  405 + 0x0c4 (PIN_OUTPUT | MUX_MODE0)
  406 + 0x0c8 (PIN_OUTPUT | MUX_MODE0)
  407 + 0x0cc (PIN_OUTPUT | MUX_MODE0)
  408 + 0x0d0 (PIN_OUTPUT | MUX_MODE0)
  409 + 0x0d4 (PIN_OUTPUT | MUX_MODE0)
  410 + 0x0d8 (PIN_OUTPUT | MUX_MODE0)
  411 + 0x0dc (PIN_OUTPUT | MUX_MODE0) /* DSS DATA 15 */
  412 + 0x0e0 (PIN_OUTPUT | MUX_MODE0) /* DSS VSYNC */
  413 + 0x0e4 (PIN_OUTPUT | MUX_MODE0) /* DSS HSYNC */
  414 + 0x0e8 (PIN_OUTPUT | MUX_MODE0) /* DSS PCLK */
  415 + 0x0ec (PIN_OUTPUT | MUX_MODE0) /* DSS AC BIAS EN */
  416 +
  417 + >;
  418 + };
  419 +
  420 + /* SPI_NOR Pins */
  421 + spi0_pins: spi0_pins {
  422 + pinctrl-single,pins = <
  423 + 0x15c (PIN_OUTPUT | MUX_MODE0) /* spi0_cs0.spi0_cs0 */
  424 + 0x150 (PIN_INPUT | MUX_MODE0) /* spi0_sclk.spi0_sclk */
  425 + 0x154 (PIN_INPUT | MUX_MODE0) /* spi0_d0.spi0_d0 */
  426 + 0x158 (PIN_OUTPUT | MUX_MODE0) /* spi0_d1.spi0_d1 */
  427 + >;
  428 + };
  429 +
  430 + /* SPI0 Pins */
  431 + spi2_pins: spi2_pins {
  432 + pinctrl-single,pins = <
  433 + 0x1d4 (PIN_OUTPUT | MUX_MODE4) /* cam1_hd.spi2_cs0 */
  434 + 0x1e0 (PIN_OUTPUT | MUX_MODE4) /* cam1_field.spi2_cs0 */
  435 + 0x1dc (PIN_INPUT | MUX_MODE4) /* cam1_pclk.spi2_sclk */
  436 + 0x1d0 (PIN_INPUT | MUX_MODE4) /* cam1_data8.spi2_d0 */
  437 + 0x1e4 (PIN_OUTPUT | MUX_MODE4) /* cam1_wen.spi2_d1 */
  438 + >;
  439 + };
  440 +
  441 + /* SPI1 Pins */
  442 + spi4_pins: spi4_pins {
  443 + pinctrl-single,pins = <
  444 + 0x25c (PIN_OUTPUT | MUX_MODE0) /* spi4_cs0.spi4_cs0 */
  445 + 0x230 (PIN_OUTPUT | MUX_MODE2) /* uart3_cstn.spi4_cs1 */
  446 + 0x250 (PIN_INPUT | MUX_MODE0) /* spi4_sclk.spi4_sclk */
  447 + 0x254 (PIN_INPUT | MUX_MODE0) /* spi4_d0.spi4_d0 */
  448 + 0x258 (PIN_OUTPUT | MUX_MODE0) /* spi4_d1.spi4_d1 */
  449 + >;
  450 + };
  451 +
  452 + mcasp1_pins: mcasp1_pins {
  453 + pinctrl-single,pins = <
  454 + 0x1a0 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mcasp0_aclkr.mcasp1_aclkx */
  455 + 0x1a4 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mcasp0_fsr.mcasp1_fsx */
  456 + 0x1a8 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* mcasp0_axr1.mcasp1_axr0 */
  457 + 0x1ac (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mcasp0_ahclkx.mcasp1_axr1 */
  458 + >;
  459 + };
  460 +
  461 + mcasp1_sleep_pins: mcasp1_sleep_pins {
  462 + pinctrl-single,pins = <
  463 + 0x1a0 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  464 + 0x1a4 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  465 + 0x1a8 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  466 + 0x1ac (PIN_INPUT_PULLDOWN | MUX_MODE7)
  467 + >;
  468 + };
  469 +
  470 + lcd_pins: lcd_pins {
  471 + pinctrl-single,pins = <
  472 + 0x09c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_be0n_cle.gpio2_5 */
  473 + >;
  474 + };
  475 +
  476 + debugss_pins: pinmux_debugss_pins {
  477 + pinctrl-single,pins = <
  478 + 0x290 (PIN_INPUT_PULLDOWN)
  479 + 0x294 (PIN_INPUT_PULLDOWN)
  480 + 0x298 (PIN_INPUT_PULLDOWN)
  481 + 0x29C (PIN_INPUT_PULLDOWN)
  482 + 0x2A0 (PIN_INPUT_PULLDOWN)
  483 + 0x2A4 (PIN_INPUT_PULLDOWN)
  484 + 0x2A8 (PIN_INPUT_PULLDOWN)
  485 + >;
  486 + };
  487 +
  488 + usb1_pins: usb1_pins {
  489 + pinctrl-single,pins = <
  490 + 0x2c0 (PIN_OUTPUT | MUX_MODE0) /* usb0_drvvbus.usb0_drvvbus */
  491 + /* USB0 Over Current */
  492 + 0x108 (PIN_INPUT | MUX_MODE9) /* mii1_col.gpio0_0 */
  493 + >;
  494 + };
  495 +
  496 + usb2_pins: usb2_pins {
  497 + pinctrl-single,pins = <
  498 + 0x2c4 (PIN_OUTPUT | MUX_MODE0) /* usb1_drvvbus.usb1_drvvbus */
  499 + /* USB1 Over Current */
  500 + 0x078 (PIN_INPUT | MUX_MODE7) /* gpmc_be1n.gpio1_28 */
  501 + >;
  502 + };
  503 +};
  504 +
  505 +&i2c0 {
  506 + status = "okay";
  507 + pinctrl-names = "default";
  508 + pinctrl-0 = <&i2c0_pins>;
  509 + clock-frequency = <100000>;
  510 +};
  511 +
  512 +&i2c1 {
  513 + status = "okay";
  514 + pinctrl-names = "default";
  515 + pinctrl-0 = <&i2c1_pins>;
  516 + clock-frequency = <100000>;
  517 +
  518 + tps@24 {
  519 + compatible = "ti,tps65218";
  520 + reg = <0x24>;
  521 + interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
  522 + interrupt-controller;
  523 + #interrupt-cells = <2>;
  524 +
  525 + dcdc1: regulator-dcdc1 {
  526 + compatible = "ti,tps65218-dcdc1";
  527 + /* VDD_CORE limits min of OPP50 and max of OPP100 */
  528 + regulator-name = "vdd_core";
  529 + regulator-min-microvolt = <912000>;
  530 + regulator-max-microvolt = <1144000>;
  531 + regulator-boot-on;
  532 + regulator-always-on;
  533 + };
  534 +
  535 + dcdc2: regulator-dcdc2 {
  536 + compatible = "ti,tps65218-dcdc2";
  537 + /* VDD_MPU limits min of OPP50 and max of OPP_NITRO */
  538 + regulator-name = "vdd_mpu";
  539 + regulator-min-microvolt = <912000>;
  540 + regulator-max-microvolt = <1378000>;
  541 + regulator-boot-on;
  542 + regulator-always-on;
  543 + };
  544 +
  545 + dcdc3: regulator-dcdc3 {
  546 + compatible = "ti,tps65218-dcdc3";
  547 + regulator-name = "vdds_ddr";
  548 + regulator-min-microvolt = <1500000>;
  549 + regulator-max-microvolt = <1500000>;
  550 + regulator-boot-on;
  551 + regulator-always-on;
  552 + regulator-state-mem {
  553 + regulator-on-in-suspend;
  554 + };
  555 + regulator-state-disk {
  556 + regulator-off-in-suspend;
  557 + };
  558 + };
  559 +
  560 + dcdc4: regulator-dcdc4 {
  561 + compatible = "ti,tps65218-dcdc4";
  562 + regulator-name = "v3_3d";
  563 + regulator-min-microvolt = <3300000>;
  564 + regulator-max-microvolt = <3300000>;
  565 + regulator-boot-on;
  566 + regulator-always-on;
  567 + };
  568 +
  569 + dcdc5: regulator-dcdc5 {
  570 + compatible = "ti,tps65218-dcdc5";
  571 + regulator-name = "v1_0bat";
  572 + regulator-min-microvolt = <1000000>;
  573 + regulator-max-microvolt = <1000000>;
  574 + regulator-boot-on;
  575 + regulator-always-on;
  576 + regulator-state-mem {
  577 + regulator-on-in-suspend;
  578 + };
  579 + };
  580 +
  581 + dcdc6: regulator-dcdc6 {
  582 + compatible = "ti,tps65218-dcdc6";
  583 + regulator-name = "v1_8bat";
  584 + regulator-min-microvolt = <1800000>;
  585 + regulator-max-microvolt = <1800000>;
  586 + regulator-boot-on;
  587 + regulator-always-on;
  588 + regulator-state-mem {
  589 + regulator-on-in-suspend;
  590 + };
  591 + };
  592 +
  593 + ldo1: regulator-ldo1 {
  594 + compatible = "ti,tps65218-ldo1";
  595 + regulator-name = "v1_8d";
  596 + regulator-min-microvolt = <1800000>;
  597 + regulator-max-microvolt = <1800000>;
  598 + regulator-boot-on;
  599 + regulator-always-on;
  600 + };
  601 +
  602 + power-button {
  603 + compatible = "ti,tps65218-pwrbutton";
  604 + status = "okay";
  605 + interrupts = <3 IRQ_TYPE_EDGE_BOTH>;
  606 + };
  607 + };
  608 +
  609 + s35390a: s35390a@30 {
  610 + compatible = "s35390a";
  611 + reg = <0x30>;
  612 + };
  613 +
  614 + at24@50 {
  615 + compatible = "at24,24c256";
  616 + reg = <0x50>;
  617 + };
  618 +
  619 + at24@57 {
  620 + compatible = "at24,24c256";
  621 + reg = <0x57>;
  622 + };
  623 +
  624 + /* For TI TLV320AIC3106 Audio Codec */
  625 + /*tlv320aic3106: tlv320aic3106@1b {
  626 + #sound-dai-cells = <0>;
  627 + compatible = "ti,tlv320aic3106";
  628 + reg = <0x1b>;
  629 + status = "okay";
  630 +
  631 + AVDD-supply = <&dcdc4>;
  632 + IOVDD-supply = <&dcdc6>;
  633 + DRVDD-supply = <&dcdc4>;
  634 + DVDD-supply = <&ldo1>;
  635 + };*/
  636 +
  637 + /* For Freescale SGTL5000 Audio Codec */
  638 + sgtl5000: sgtl5000@0a {
  639 + #sound-dai-cells = <0>;
  640 + compatible = "fsl,sgtl5000";
  641 + reg = <0x0a>;
  642 + clocks = <&audio_mstrclk>;
  643 + VDDA-supply = <&dcdc4>;
  644 + VDDIO-supply = <&dcdc6>;
  645 + VDDD-supply = <&ldo1>;
  646 + };
  647 +};
  648 +
  649 +&i2c2 {
  650 + status = "okay";
  651 + pinctrl-names = "default";
  652 + pinctrl-0 = <&i2c2_pins>;
  653 + clock-frequency = <100000>;
  654 +
  655 + /* CH7055A Parallel LCD to VGA D-SUB 15 way */
  656 + eeprom@76 {
  657 + compatible = "at,24c256";
  658 + reg = <0x76>;
  659 + };
  660 +};
  661 +
  662 +
  663 +&epwmss0 {
  664 + status = "okay";
  665 +
  666 + ehrpwm0: ehrpwm@48300200 {
  667 + status = "okay";
  668 + pinctrl-names = "default";
  669 + pinctrl-0 = <&ehrpwm0b_pins>;
  670 + };
  671 +};
  672 +
  673 +&gpio0 {
  674 + status = "okay";
  675 +};
  676 +
  677 +&gpio1 {
  678 + status = "okay";
  679 +};
  680 +
  681 +&gpio2 {
  682 + status = "okay";
  683 +};
  684 +
  685 +&gpio3 {
  686 + status = "okay";
  687 +};
  688 +
  689 +&gpio4 {
  690 + status = "okay";
  691 +};
  692 +
  693 +&gpio5 {
  694 + status = "okay";
  695 +};
  696 +
  697 +&mmc1 {
  698 + status = "okay";
  699 + pinctrl-names = "default";
  700 + pinctrl-0 = <&mmc1_pins>;
  701 +
  702 + vmmc-supply = <&dcdc4>;
  703 + bus-width = <4>;
  704 + cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
  705 +};
  706 +
  707 +&mmc2 {
  708 + pinctrl-names = "default";
  709 + pinctrl-0 = <&emmc_pins>;
  710 + bus-width = <8>;
  711 + vmmc-supply = <&vmmcwl_fixed>;
  712 + status = "okay";
  713 + ti,non-removable;
  714 +};
  715 +
  716 +/*If carrier board eMMC (or 2nd SD slot) is present and used, un-comment out the following nodes. SD card will be emulated /dev/mmcblk2 instead of /dev/mmcblk1*/
  717 +
  718 +&mmc3 {
  719 + status = "okay";
  720 + dmas = <&edma 30
  721 + &edma 31>;
  722 + dma-names = "tx", "rx";
  723 + vmmc-supply = <&vmmcwl_fixed>;
  724 + bus-width = <8>;
  725 + pinctrl-names = "default";
  726 + pinctrl-0 = <&sdmmc_pins>;
  727 + keep-power-in-suspend;
  728 + ti,non-removable;
  729 +};
  730 +
  731 +&edma {
  732 + ti,edma-xbar-event-map = /bits/ 16 <1 30
  733 + 2 31>;
  734 +};
  735 +
  736 +/* Four-Wire Resistive Touch */
  737 +&tscadc {
  738 + status = "disabled";
  739 + tsc {
  740 + ti,wires = <4>;
  741 + ti,x-plate-resistance = <200>;
  742 + ti,coordinate-readouts = <5>;
  743 + ti,wire-config = <0x00 0x11 0x22 0x33>;
  744 + ti,charge-delay = <0xB000>;
  745 + };
  746 +
  747 + adc {
  748 + ti,adc-channels = <0 1 2 3>;
  749 + };
  750 +};
  751 +
  752 +&usb2_phy1 {
  753 + status = "okay";
  754 +};
  755 +
  756 +&usb1 {
  757 + dr_mode = "host";
  758 + status = "okay";
  759 + pinctrl-names = "default";
  760 + pinctrl-0 = <&usb1_pins>;
  761 +};
  762 +
  763 +&usb2_phy2 {
  764 + status = "okay";
  765 +};
  766 +
  767 +&usb2 {
  768 + dr_mode = "host";
  769 + status = "okay";
  770 + pinctrl-names = "default";
  771 + pinctrl-0 = <&usb2_pins>;
  772 +};
  773 +
  774 +&spi0 {
  775 + ti,spi-num-cs = <1>;
  776 + status = "okay";
  777 + pinctrl-names = "default";
  778 + pinctrl-0 = <&spi0_pins>;
  779 + dmas = <&edma 16
  780 + &edma 17>;
  781 + dma-names = "tx0", "rx0";
  782 +
  783 + flash: mx25u3235f@0 {
  784 + #address-cells = <1>;
  785 + #size-cells = <1>;
  786 + compatible = "jedec,spi-nor";
  787 + spi-max-frequency = <24000000>;
  788 + reg = <0>;
  789 +
  790 + /* MTD partition table.
  791 + * The ROM checks the first 512KiB
  792 + * for a valid file to boot(XIP).
  793 + */
  794 + partition@0 {
  795 + label = "U-Boot";
  796 + reg = <0x0 0x100000>;
  797 + };
  798 +
  799 + partition@100000 {
  800 + label = "U-Boot Environment";
  801 + reg = <0x100000 0x080000>;
  802 + };
  803 +
  804 + partition@180000 {
  805 + label = "Flattened Device Tree";
  806 + reg = <0x180000 0x200000>;
  807 + };
  808 +
  809 + };
  810 +};
  811 +
  812 +&spi2 {
  813 + ti,spi-num-cs = <2>;
  814 + status = "okay";
  815 + pinctrl-names = "default";
  816 + pinctrl-0 = <&spi2_pins>;
  817 + dmas = <&edma 18
  818 + &edma 19
  819 + &edma 20
  820 + &edma 21>;
  821 + dma-names = "tx0", "rx0", "tx1", "rx1";
  822 +
  823 + spidev1: spidev@0 {
  824 + #address-cells = <1>;
  825 + #size-cells = <0>;
  826 + compatible = "spidev";
  827 + reg = <0>;
  828 + spi-max-frequency = <24000000>;
  829 + };
  830 +
  831 + spidev2: spidev@1 {
  832 + #address-cells = <1>;
  833 + #size-cells = <0>;
  834 + compatible = "spidev";
  835 + reg = <1>;
  836 + spi-max-frequency = <24000000>;
  837 + };
  838 + };
  839 +
  840 +&spi4 {
  841 + ti,spi-num-cs = <2>;
  842 + status = "okay";
  843 + pinctrl-names = "default";
  844 + pinctrl-0 = <&spi4_pins>;
  845 + dmas = <&edma 26
  846 + &edma 27
  847 + &edma 28
  848 + &edma 29>;
  849 + dma-names = "tx0", "rx0", "tx1", "rx1";
  850 +
  851 + spidev3: spidev@0 {
  852 + #address-cells = <1>;
  853 + #size-cells = <0>;
  854 + compatible = "spidev";
  855 + reg = <0>;
  856 + spi-max-frequency = <24000000>;
  857 + };
  858 +
  859 + spidev4: spidev@1 {
  860 + #address-cells = <1>;
  861 + #size-cells = <0>;
  862 + compatible = "spidev";
  863 + reg = <1>;
  864 + spi-max-frequency = <24000000>;
  865 + };
  866 + };
  867 +
  868 +&uart0 {
  869 + pinctrl-names = "default";
  870 + pinctrl-0 = <&uart0_pins>;
  871 + pinctrl-1 = <&uart0_pins_sleep>;
  872 +
  873 + status = "okay";
  874 +};
  875 +
  876 +&uart3 {
  877 + pinctrl-names = "default";
  878 + pinctrl-0 = <&uart3_pins>;
  879 + pinctrl-1 = <&uart3_pins_sleep>;
  880 +
  881 + status = "okay";
  882 +};
  883 +
  884 +&uart2 {
  885 + pinctrl-names = "default";
  886 + pinctrl-0 = <&uart2_pins>;
  887 + pinctrl-1 = <&uart2_pins_sleep>;
  888 +
  889 + status = "okay";
  890 +};
  891 +
  892 +&uart4 {
  893 + pinctrl-names = "default";
  894 + pinctrl-0 = <&uart4_pins>;
  895 + pinctrl-1 = <&uart4_pins_sleep>;
  896 +
  897 + status = "okay";
  898 +};
  899 +
  900 +&dcan0 {
  901 + pinctrl-names = "default";
  902 + pinctrl-0 = <&dcan0_default>;
  903 + status = "okay";
  904 +};
  905 +
  906 +&dcan1 {
  907 + pinctrl-names = "default";
  908 + pinctrl-0 = <&dcan1_default>;
  909 + status = "okay";
  910 +};
  911 +
  912 +&mac {
  913 + pinctrl-names = "default", "sleep";
  914 + pinctrl-0 = <&cpsw_default>;
  915 + pinctrl-1 = <&cpsw_sleep>;
  916 + dual_emac = <1>;
  917 + status = "okay";
  918 +};
  919 +
  920 +&davinci_mdio {
  921 + pinctrl-names = "default", "sleep";
  922 + pinctrl-0 = <&davinci_mdio_default>;
  923 + pinctrl-1 = <&davinci_mdio_sleep>;
  924 + status = "okay";
  925 +};
  926 +
  927 +&cpsw_emac0 {
  928 + phy_id = <&davinci_mdio>, <6>;
  929 + phy-mode = "rgmii";
  930 + dual_emac_res_vlan = <1>;
  931 +};
  932 +
  933 +&cpsw_emac1 {
  934 + phy_id = <&davinci_mdio>, <7>;
  935 + phy-mode = "rgmii";
  936 + dual_emac_res_vlan = <2>;
  937 +};
  938 +
  939 +&elm {
  940 + status = "okay";
  941 +};
  942 +
  943 +&mcasp1 {
  944 + #sound-dai-cells = <0>;
  945 + pinctrl-names = "default", "sleep";
  946 + pinctrl-0 = <&mcasp1_pins>;
  947 + pinctrl-1 = <&mcasp1_sleep_pins>;
  948 +
  949 + status = "okay";
  950 +
  951 + op-mode = <0>; /* MCASP_IIS_MODE */
  952 + tdm-slots = <2>;
  953 + /* 4 serializers */
  954 + serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
  955 + 1 2 0 0
  956 + >;
  957 +
  958 + tx-num-evt = <1>;
  959 + rx-num-evt = <1>;
  960 +};
  961 +
  962 +&dss {
  963 + status = "okay";
  964 +
  965 + pinctrl-names = "default";
  966 + pinctrl-0 = <&dss_pins>;
  967 +
  968 + port {
  969 + dpi_out: endpoint@0 {
  970 + remote-endpoint = <&lcd_in>;
  971 + data-lines = <24>;
  972 + };
  973 + };
  974 +};
  975 +
  976 +&rtc {
  977 + status = "disabled"; /* Use Seiko S35390A on Module instead */
  978 + ext-clk-src;
  979 +};
  980 +
  981 +&wdt {
  982 + status = "okay";
  983 +};
  984 +
  985 +&cpu {
  986 + cpu0-supply = <&dcdc2>;
  987 +};
arch/arm/include/asm/arch-am33xx/hardware_am43xx.h
... ... @@ -101,5 +101,12 @@
101 101 /* EDMA3 Base Address */
102 102 #define EDMA3_BASE 0x49000000
103 103  
  104 +/* LCD Controller */
  105 +#define LCD_CNTL_BASE 0x4832A000
  106 +
  107 +/* PWMSS */
  108 +#define PWMSS0_BASE 0x48300000
  109 +#define AM33XX_EHRPWM0_BASE 0x48300200
  110 +
104 111 #endif /* __AM43XX_HARDWARE_AM43XX_H */
arch/arm/include/asm/arch-am33xx/mmc_host_def.h
... ... @@ -23,6 +23,7 @@
23 23 */
24 24 #define OMAP_HSMMC1_BASE 0x48060100
25 25 #define OMAP_HSMMC2_BASE 0x481D8100
  26 +#define OMAP_HSMMC3_BASE 0x47810100
26 27  
27 28 #if defined(CONFIG_TI814X)
28 29 #undef MMC_CLOCK_REFERENCE
arch/arm/include/asm/arch-am33xx/spl.h
... ... @@ -55,6 +55,7 @@
55 55 #define BOOT_DEVICE_NAND 0x05
56 56 #define BOOT_DEVICE_MMC1 0x07
57 57 #define BOOT_DEVICE_MMC2 0x08
  58 +#define BOOT_DEVICE_MMC3 0x09
58 59 #define BOOT_DEVICE_SPI 0x0A
59 60 #define BOOT_DEVICE_USB 0x0D
60 61 #define BOOT_DEVICE_UART 0x41
board/embedian/smarct437x/Kconfig
  1 +if TARGET_SMARCT437X_EVM
  2 +
  3 +config SYS_BOARD
  4 + default "smarct437x"
  5 +
  6 +config SYS_VENDOR
  7 + default "embedian"
  8 +
  9 +config SYS_SOC
  10 + default "am33xx"
  11 +
  12 +config SYS_CONFIG_NAME
  13 + default "smarct437x_evm"
  14 +
  15 +endif
board/embedian/smarct437x/MAINTAINERS
  1 +SMARCT437X SMARC BOARD
  2 +M: Eric Lee <eric.lee@embedian.com>
  3 +S: Maintained
  4 +F: board/embedian/smarct437x/
  5 +F: include/configs/smarct437x_evm.h
  6 +F: configs/smarct437x_evm_defconfig
  7 +F: configs/smarct437x_evm_uart1_defconfig
  8 +F: configs/smarct437x_evm_uart2_defconfig
  9 +F: configs/smarct437x_evm_uart3_defconfig
  10 +F: configs/smarct437x_evm_spi_defconfig
  11 +F: configs/smarct437x_evm_spi_uart1_defconfig
  12 +F: configs/smarct437x_evm_spi_uart2_defconfig
  13 +F: configs/smarct437x_evm_spi_uart3_defconfig
  14 +F: configs/am43xx_evm_ethboot_defconfig
  15 +F: configs/am43xx_evm_usbhost_boot_defconfig
  16 +F: configs/am43xx_evm_rtconly_defconfig
  17 +F: configs/am43xx_evm_usbspl_defconfig
board/embedian/smarct437x/Makefile
  1 +#
  2 +# Makefile
  3 +#
  4 +# Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
  5 +#
  6 +# SPDX-License-Identifier: GPL-2.0+
  7 +#
  8 +
  9 +ifeq ($(CONFIG_SKIP_LOWLEVEL_INIT),)
  10 +obj-y := mux.o
  11 +endif
  12 +
  13 +obj-y += board.o
board/embedian/smarct437x/board.c
Changes suppressed. Click to show
  1 +/*
  2 + * board.c
  3 + *
  4 + * Board functions for TI AM43XX based boards
  5 + *
  6 + * Copyright (C) 2013, Texas Instruments, Incorporated - http://www.ti.com/
  7 + *
  8 + * SPDX-License-Identifier: GPL-2.0+
  9 + */
  10 +
  11 +#include <common.h>
  12 +#include <i2c.h>
  13 +#include <asm/errno.h>
  14 +#include <spl.h>
  15 +#include <usb.h>
  16 +#include <asm/arch/clock.h>
  17 +#include <asm/arch/sys_proto.h>
  18 +#include <asm/arch/mux.h>
  19 +#include <asm/arch/ddr_defs.h>
  20 +#include <asm/arch/gpio.h>
  21 +#include <asm/gpio.h>
  22 +#include <asm/emif.h>
  23 +#include "board.h"
  24 +#include <power/pmic.h>
  25 +#include <power/tps65218.h>
  26 +#include <power/tps62362.h>
  27 +#include <miiphy.h>
  28 +#include <cpsw.h>
  29 +#include <linux/usb/gadget.h>
  30 +#include <dwc3-uboot.h>
  31 +#include <dwc3-omap-uboot.h>
  32 +#include <ti-usb-phy-uboot.h>
  33 +
  34 +DECLARE_GLOBAL_DATA_PTR;
  35 +
  36 +static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
  37 +
  38 +/*
  39 + * Read header information from EEPROM into global structure.
  40 + */
  41 +static int read_eeprom(struct am43xx_board_id *header)
  42 +{
  43 + i2c_set_bus_num(1);
  44 + /* Check if baseboard eeprom is available */
  45 + if (i2c_probe(CONFIG_SYS_I2C_EEPROM_ADDR)) {
  46 + printf("Could not probe the EEPROM at 0x%x\n",
  47 + CONFIG_SYS_I2C_EEPROM_ADDR);
  48 + return -ENODEV;
  49 + }
  50 +
  51 + /* read the eeprom using i2c */
  52 + if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 2, (uchar *)header,
  53 + sizeof(struct am43xx_board_id))) {
  54 + printf("Could not read the EEPROM\n");
  55 + return -EIO;
  56 + }
  57 +
  58 + if (header->magic != 0xEE3355AA) {
  59 + /*
  60 + * read the eeprom using i2c again,
  61 + * but use only a 1 byte address
  62 + */
  63 + if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 1, (uchar *)header,
  64 + sizeof(struct am43xx_board_id))) {
  65 + printf("Could not read the EEPROM at 0x%x\n",
  66 + CONFIG_SYS_I2C_EEPROM_ADDR);
  67 + return -EIO;
  68 + }
  69 +
  70 + if (header->magic != 0xEE3355AA) {
  71 + /*printf("Incorrect magic number (0x%x) in EEPROM\n",
  72 + header->magic);
  73 + return -EINVAL;*/
  74 + }
  75 + }
  76 +
  77 + strncpy(am43xx_board_name, (char *)header->name, sizeof(header->name));
  78 + am43xx_board_name[sizeof(header->name)] = 0;
  79 +
  80 + strncpy(am43xx_board_rev, (char *)header->version, sizeof(header->version));
  81 + am43xx_board_rev[sizeof(header->version)] = 0;
  82 +
  83 + return 0;
  84 +}
  85 +
  86 +#ifndef CONFIG_SKIP_LOWLEVEL_INIT
  87 +
  88 +#define NUM_OPPS 6
  89 +
  90 +const struct dpll_params dpll_mpu[NUM_CRYSTAL_FREQ][NUM_OPPS] = {
  91 + { /* 19.2 MHz */
  92 + {125, 3, 2, -1, -1, -1, -1}, /* OPP 50 */
  93 + {-1, -1, -1, -1, -1, -1, -1}, /* OPP RESERVED */
  94 + {125, 3, 1, -1, -1, -1, -1}, /* OPP 100 */
  95 + {150, 3, 1, -1, -1, -1, -1}, /* OPP 120 */
  96 + {125, 2, 1, -1, -1, -1, -1}, /* OPP TB */
  97 + {625, 11, 1, -1, -1, -1, -1} /* OPP NT */
  98 + },
  99 + { /* 24 MHz */
  100 + {300, 23, 1, -1, -1, -1, -1}, /* OPP 50 */
  101 + {-1, -1, -1, -1, -1, -1, -1}, /* OPP RESERVED */
  102 + {600, 23, 1, -1, -1, -1, -1}, /* OPP 100 */
  103 + {720, 23, 1, -1, -1, -1, -1}, /* OPP 120 */
  104 + {800, 23, 1, -1, -1, -1, -1}, /* OPP TB */
  105 + {1000, 23, 1, -1, -1, -1, -1} /* OPP NT */
  106 + },
  107 + { /* 25 MHz */
  108 + {300, 24, 1, -1, -1, -1, -1}, /* OPP 50 */
  109 + {-1, -1, -1, -1, -1, -1, -1}, /* OPP RESERVED */
  110 + {600, 24, 1, -1, -1, -1, -1}, /* OPP 100 */
  111 + {720, 24, 1, -1, -1, -1, -1}, /* OPP 120 */
  112 + {800, 24, 1, -1, -1, -1, -1}, /* OPP TB */
  113 + {1000, 24, 1, -1, -1, -1, -1} /* OPP NT */
  114 + },
  115 + { /* 26 MHz */
  116 + {300, 25, 1, -1, -1, -1, -1}, /* OPP 50 */
  117 + {-1, -1, -1, -1, -1, -1, -1}, /* OPP RESERVED */
  118 + {600, 25, 1, -1, -1, -1, -1}, /* OPP 100 */
  119 + {720, 25, 1, -1, -1, -1, -1}, /* OPP 120 */
  120 + {800, 25, 1, -1, -1, -1, -1}, /* OPP TB */
  121 + {1000, 25, 1, -1, -1, -1, -1} /* OPP NT */
  122 + },
  123 +};
  124 +
  125 +const struct dpll_params dpll_core[NUM_CRYSTAL_FREQ] = {
  126 + {625, 11, -1, -1, 10, 8, 4}, /* 19.2 MHz */
  127 + {1000, 23, -1, -1, 10, 8, 4}, /* 24 MHz */
  128 + {1000, 24, -1, -1, 10, 8, 4}, /* 25 MHz */
  129 + {1000, 25, -1, -1, 10, 8, 4} /* 26 MHz */
  130 +};
  131 +
  132 +const struct dpll_params dpll_per[NUM_CRYSTAL_FREQ] = {
  133 + {400, 7, 5, -1, -1, -1, -1}, /* 19.2 MHz */
  134 + {400, 9, 5, -1, -1, -1, -1}, /* 24 MHz */
  135 + {384, 9, 5, -1, -1, -1, -1}, /* 25 MHz */
  136 + {480, 12, 5, -1, -1, -1, -1} /* 26 MHz */
  137 +};
  138 +
  139 +const struct dpll_params epos_evm_dpll_ddr[NUM_CRYSTAL_FREQ] = {
  140 + {665, 47, 1, -1, 4, -1, -1}, /*19.2*/
  141 + {133, 11, 1, -1, 4, -1, -1}, /* 24 MHz */
  142 + {266, 24, 1, -1, 4, -1, -1}, /* 25 MHz */
  143 + {133, 12, 1, -1, 4, -1, -1} /* 26 MHz */
  144 +};
  145 +
  146 +const struct dpll_params gp_evm_dpll_ddr = {
  147 + 50, 2, 1, -1, 2, -1, -1};
  148 +
  149 +static const struct dpll_params idk_dpll_ddr = {
  150 + 400, 23, 1, -1, 2, -1, -1
  151 +};
  152 +
  153 +static const u32 ext_phy_ctrl_const_base_lpddr2[] = {
  154 + 0x00500050,
  155 + 0x00350035,
  156 + 0x00350035,
  157 + 0x00350035,
  158 + 0x00350035,
  159 + 0x00350035,
  160 + 0x00000000,
  161 + 0x00000000,
  162 + 0x00000000,
  163 + 0x00000000,
  164 + 0x00000000,
  165 + 0x00000000,
  166 + 0x00000000,
  167 + 0x00000000,
  168 + 0x00000000,
  169 + 0x00000000,
  170 + 0x00000000,
  171 + 0x00000000,
  172 + 0x40001000,
  173 + 0x08102040
  174 +};
  175 +
  176 +const struct ctrl_ioregs ioregs_lpddr2 = {
  177 + .cm0ioctl = LPDDR2_ADDRCTRL_IOCTRL_VALUE,
  178 + .cm1ioctl = LPDDR2_ADDRCTRL_WD0_IOCTRL_VALUE,
  179 + .cm2ioctl = LPDDR2_ADDRCTRL_WD1_IOCTRL_VALUE,
  180 + .dt0ioctl = LPDDR2_DATA0_IOCTRL_VALUE,
  181 + .dt1ioctl = LPDDR2_DATA0_IOCTRL_VALUE,
  182 + .dt2ioctrl = LPDDR2_DATA0_IOCTRL_VALUE,
  183 + .dt3ioctrl = LPDDR2_DATA0_IOCTRL_VALUE,
  184 + .emif_sdram_config_ext = 0x1,
  185 +};
  186 +
  187 +const struct emif_regs emif_regs_lpddr2 = {
  188 + .sdram_config = 0x808012BA,
  189 + .ref_ctrl = 0x0000040D,
  190 + .sdram_tim1 = 0xEA86B411,
  191 + .sdram_tim2 = 0x103A094A,
  192 + .sdram_tim3 = 0x0F6BA37F,
  193 + .read_idle_ctrl = 0x00050000,
  194 + .zq_config = 0x50074BE4,
  195 + .temp_alert_config = 0x0,
  196 + .emif_rd_wr_lvl_rmp_win = 0x0,
  197 + .emif_rd_wr_lvl_rmp_ctl = 0x0,
  198 + .emif_rd_wr_lvl_ctl = 0x0,
  199 + .emif_ddr_phy_ctlr_1 = 0x0E284006,
  200 + .emif_rd_wr_exec_thresh = 0x80000405,
  201 + .emif_ddr_ext_phy_ctrl_1 = 0x04010040,
  202 + .emif_ddr_ext_phy_ctrl_2 = 0x00500050,
  203 + .emif_ddr_ext_phy_ctrl_3 = 0x00500050,
  204 + .emif_ddr_ext_phy_ctrl_4 = 0x00500050,
  205 + .emif_ddr_ext_phy_ctrl_5 = 0x00500050,
  206 + .emif_prio_class_serv_map = 0x80000001,
  207 + .emif_connect_id_serv_1_map = 0x80000094,
  208 + .emif_connect_id_serv_2_map = 0x00000000,
  209 + .emif_cos_config = 0x000FFFFF
  210 +};
  211 +
  212 +const struct ctrl_ioregs ioregs_ddr3 = {
  213 + .cm0ioctl = DDR3_ADDRCTRL_IOCTRL_VALUE,
  214 + .cm1ioctl = DDR3_ADDRCTRL_WD0_IOCTRL_VALUE,
  215 + .cm2ioctl = DDR3_ADDRCTRL_WD1_IOCTRL_VALUE,
  216 + .dt0ioctl = DDR3_DATA0_IOCTRL_VALUE,
  217 + .dt1ioctl = DDR3_DATA0_IOCTRL_VALUE,
  218 + .dt2ioctrl = DDR3_DATA0_IOCTRL_VALUE,
  219 + .dt3ioctrl = DDR3_DATA0_IOCTRL_VALUE,
  220 + .emif_sdram_config_ext = 0xc163,
  221 +};
  222 +
  223 +const struct emif_regs ddr3_emif_regs_400Mhz = {
  224 + .sdram_config = 0x638413B2,
  225 + .ref_ctrl = 0x00000C30,
  226 + .sdram_tim1 = 0xEAAAD4DB,
  227 + .sdram_tim2 = 0x266B7FDA,
  228 + .sdram_tim3 = 0x107F8678,
  229 + .read_idle_ctrl = 0x00050000,
  230 + .zq_config = 0x50074BE4,
  231 + .temp_alert_config = 0x0,
  232 + .emif_ddr_phy_ctlr_1 = 0x0E004008,
  233 + .emif_ddr_ext_phy_ctrl_1 = 0x08020080,
  234 + .emif_ddr_ext_phy_ctrl_2 = 0x00400040,
  235 + .emif_ddr_ext_phy_ctrl_3 = 0x00400040,
  236 + .emif_ddr_ext_phy_ctrl_4 = 0x00400040,
  237 + .emif_ddr_ext_phy_ctrl_5 = 0x00400040,
  238 + .emif_rd_wr_lvl_rmp_win = 0x0,
  239 + .emif_rd_wr_lvl_rmp_ctl = 0x0,
  240 + .emif_rd_wr_lvl_ctl = 0x0,
  241 + .emif_rd_wr_exec_thresh = 0x80000405,
  242 + .emif_prio_class_serv_map = 0x80000001,
  243 + .emif_connect_id_serv_1_map = 0x80000094,
  244 + .emif_connect_id_serv_2_map = 0x00000000,
  245 + .emif_cos_config = 0x000FFFFF
  246 +};
  247 +
  248 +/* EMIF DDR3 Configurations are different for beta AM43X GP EVMs */
  249 +const struct emif_regs ddr3_emif_regs_400Mhz_beta = {
  250 + .sdram_config = 0x638413B2,
  251 + .ref_ctrl = 0x00000C30,
  252 + .sdram_tim1 = 0xEAAAD4DB,
  253 + .sdram_tim2 = 0x266B7FDA,
  254 + .sdram_tim3 = 0x107F8678,
  255 + .read_idle_ctrl = 0x00050000,
  256 + .zq_config = 0x50074BE4,
  257 + .temp_alert_config = 0x0,
  258 + .emif_ddr_phy_ctlr_1 = 0x0E004008,
  259 + .emif_ddr_ext_phy_ctrl_1 = 0x08020080,
  260 + .emif_ddr_ext_phy_ctrl_2 = 0x00000065,
  261 + .emif_ddr_ext_phy_ctrl_3 = 0x00000091,
  262 + .emif_ddr_ext_phy_ctrl_4 = 0x000000B5,
  263 + .emif_ddr_ext_phy_ctrl_5 = 0x000000E5,
  264 + .emif_rd_wr_exec_thresh = 0x80000405,
  265 + .emif_prio_class_serv_map = 0x80000001,
  266 + .emif_connect_id_serv_1_map = 0x80000094,
  267 + .emif_connect_id_serv_2_map = 0x00000000,
  268 + .emif_cos_config = 0x000FFFFF
  269 +};
  270 +
  271 +/* EMIF DDR3 Configurations are different for production AM43X GP EVMs */
  272 +const struct emif_regs ddr3_emif_regs_400Mhz_production = {
  273 + .sdram_config = 0x638413B2,
  274 + .ref_ctrl = 0x00000C30,
  275 + .sdram_tim1 = 0xEAAAD4DB,
  276 + .sdram_tim2 = 0x266B7FDA,
  277 + .sdram_tim3 = 0x107F8678,
  278 + .read_idle_ctrl = 0x00050000,
  279 + .zq_config = 0x50074BE4,
  280 + .temp_alert_config = 0x0,
  281 + .emif_ddr_phy_ctlr_1 = 0x0E004008,
  282 + .emif_ddr_ext_phy_ctrl_1 = 0x08020080,
  283 + .emif_ddr_ext_phy_ctrl_2 = 0x00000066,
  284 + .emif_ddr_ext_phy_ctrl_3 = 0x00000091,
  285 + .emif_ddr_ext_phy_ctrl_4 = 0x000000B9,
  286 + .emif_ddr_ext_phy_ctrl_5 = 0x000000E6,
  287 + .emif_rd_wr_exec_thresh = 0x80000405,
  288 + .emif_prio_class_serv_map = 0x80000001,
  289 + .emif_connect_id_serv_1_map = 0x80000094,
  290 + .emif_connect_id_serv_2_map = 0x00000000,
  291 + .emif_cos_config = 0x000FFFFF
  292 +};
  293 +
  294 +static const struct emif_regs ddr3_sk_emif_regs_400Mhz = {
  295 + .sdram_config = 0x638413b2,
  296 + .sdram_config2 = 0x00000000,
  297 + .ref_ctrl = 0x00000c30,
  298 + .sdram_tim1 = 0xeaaad4db,
  299 + .sdram_tim2 = 0x266b7fda,
  300 + .sdram_tim3 = 0x107f8678,
  301 + .read_idle_ctrl = 0x00050000,
  302 + .zq_config = 0x50074be4,
  303 + .temp_alert_config = 0x0,
  304 + .emif_ddr_phy_ctlr_1 = 0x0e084008,
  305 + .emif_ddr_ext_phy_ctrl_1 = 0x08020080,
  306 + .emif_ddr_ext_phy_ctrl_2 = 0x89,
  307 + .emif_ddr_ext_phy_ctrl_3 = 0x90,
  308 + .emif_ddr_ext_phy_ctrl_4 = 0x8e,
  309 + .emif_ddr_ext_phy_ctrl_5 = 0x8d,
  310 + .emif_rd_wr_lvl_rmp_win = 0x0,
  311 + .emif_rd_wr_lvl_rmp_ctl = 0x00000000,
  312 + .emif_rd_wr_lvl_ctl = 0x00000000,
  313 + .emif_rd_wr_exec_thresh = 0x80000000,
  314 + .emif_prio_class_serv_map = 0x80000001,
  315 + .emif_connect_id_serv_1_map = 0x80000094,
  316 + .emif_connect_id_serv_2_map = 0x00000000,
  317 + .emif_cos_config = 0x000FFFFF
  318 +};
  319 +
  320 +static const struct emif_regs ddr3_idk_emif_regs_400Mhz = {
  321 + .sdram_config = 0x61a11b32,
  322 + .sdram_config2 = 0x00000000,
  323 + .ref_ctrl = 0x00000c30,
  324 + .sdram_tim1 = 0xeaaad4db,
  325 + .sdram_tim2 = 0x266b7fda,
  326 + .sdram_tim3 = 0x107f8678,
  327 + .read_idle_ctrl = 0x00050000,
  328 + .zq_config = 0x50074be4,
  329 + .temp_alert_config = 0x00000000,
  330 + .emif_ddr_phy_ctlr_1 = 0x00008009,
  331 + .emif_ddr_ext_phy_ctrl_1 = 0x08020080,
  332 + .emif_ddr_ext_phy_ctrl_2 = 0x00000040,
  333 + .emif_ddr_ext_phy_ctrl_3 = 0x0000003e,
  334 + .emif_ddr_ext_phy_ctrl_4 = 0x00000051,
  335 + .emif_ddr_ext_phy_ctrl_5 = 0x00000051,
  336 + .emif_rd_wr_lvl_rmp_win = 0x00000000,
  337 + .emif_rd_wr_lvl_rmp_ctl = 0x00000000,
  338 + .emif_rd_wr_lvl_ctl = 0x00000000,
  339 + .emif_rd_wr_exec_thresh = 0x00000405,
  340 + .emif_prio_class_serv_map = 0x00000000,
  341 + .emif_connect_id_serv_1_map = 0x00000000,
  342 + .emif_connect_id_serv_2_map = 0x00000000,
  343 + .emif_cos_config = 0x00ffffff
  344 +};
  345 +
  346 +static const struct emif_regs ddr3_smarc80_emif_regs_400Mhz = {
  347 + .sdram_config = 0x63841372,
  348 + .sdram_config2 = 0x00000000,
  349 + .ref_ctrl = 0x00000c30,
  350 + .sdram_tim1 = 0xeaaad4db,
  351 + .sdram_tim2 = 0x266b7fda,
  352 + .sdram_tim3 = 0x107f8678,
  353 + .read_idle_ctrl = 0x00050000,
  354 + .zq_config = 0x50074be4,
  355 + .temp_alert_config = 0x0,
  356 + .emif_ddr_phy_ctlr_1 = 0x0e084008,
  357 + .emif_ddr_ext_phy_ctrl_1 = 0x08020080,
  358 + .emif_ddr_ext_phy_ctrl_2 = 0x89,
  359 + .emif_ddr_ext_phy_ctrl_3 = 0x90,
  360 + .emif_ddr_ext_phy_ctrl_4 = 0x8e,
  361 + .emif_ddr_ext_phy_ctrl_5 = 0x8d,
  362 + .emif_rd_wr_lvl_rmp_win = 0x0,
  363 + .emif_rd_wr_lvl_rmp_ctl = 0x00000000,
  364 + .emif_rd_wr_lvl_ctl = 0x00000000,
  365 + .emif_rd_wr_exec_thresh = 0x80000000,
  366 + .emif_prio_class_serv_map = 0x80000001,
  367 + .emif_connect_id_serv_1_map = 0x80000094,
  368 + .emif_connect_id_serv_2_map = 0x00000000,
  369 + .emif_cos_config = 0x000FFFFF
  370 +};
  371 +
  372 +static const struct emif_regs ddr3_smarc1g_emif_regs_400Mhz = {
  373 + .sdram_config = 0x638413b2,
  374 + .sdram_config2 = 0x00000000,
  375 + .ref_ctrl = 0x00000c30,
  376 + .sdram_tim1 = 0xeaaad4db,
  377 + .sdram_tim2 = 0x266b7fda,
  378 + .sdram_tim3 = 0x107f8678,
  379 + .read_idle_ctrl = 0x00050000,
  380 + .zq_config = 0x50074be4,
  381 + .temp_alert_config = 0x0,
  382 + .emif_ddr_phy_ctlr_1 = 0x0e084008,
  383 + .emif_ddr_ext_phy_ctrl_1 = 0x08020080,
  384 + .emif_ddr_ext_phy_ctrl_2 = 0x89,
  385 + .emif_ddr_ext_phy_ctrl_3 = 0x90,
  386 + .emif_ddr_ext_phy_ctrl_4 = 0x8e,
  387 + .emif_ddr_ext_phy_ctrl_5 = 0x8d,
  388 + .emif_rd_wr_lvl_rmp_win = 0x0,
  389 + .emif_rd_wr_lvl_rmp_ctl = 0x00000000,
  390 + .emif_rd_wr_lvl_ctl = 0x00000000,
  391 + .emif_rd_wr_exec_thresh = 0x80000000,
  392 + .emif_prio_class_serv_map = 0x80000001,
  393 + .emif_connect_id_serv_1_map = 0x80000094,
  394 + .emif_connect_id_serv_2_map = 0x00000000,
  395 + .emif_cos_config = 0x000FFFFF
  396 +};
  397 +
  398 +void emif_get_ext_phy_ctrl_const_regs(const u32 **regs, u32 *size)
  399 +{
  400 + if (board_is_eposevm()) {
  401 + *regs = ext_phy_ctrl_const_base_lpddr2;
  402 + *size = ARRAY_SIZE(ext_phy_ctrl_const_base_lpddr2);
  403 + }
  404 +
  405 + return;
  406 +}
  407 +
  408 +/*
  409 + * get_sys_clk_index : returns the index of the sys_clk read from
  410 + * ctrl status register. This value is either
  411 + * read from efuse or sysboot pins.
  412 + */
  413 +static u32 get_sys_clk_index(void)
  414 +{
  415 + struct ctrl_stat *ctrl = (struct ctrl_stat *)CTRL_BASE;
  416 + u32 ind = readl(&ctrl->statusreg), src;
  417 +
  418 + src = (ind & CTRL_CRYSTAL_FREQ_SRC_MASK) >> CTRL_CRYSTAL_FREQ_SRC_SHIFT;
  419 + if (src == CTRL_CRYSTAL_FREQ_SRC_EFUSE) /* Value read from EFUSE */
  420 + return ((ind & CTRL_CRYSTAL_FREQ_SELECTION_MASK) >>
  421 + CTRL_CRYSTAL_FREQ_SELECTION_SHIFT);
  422 + else /* Value read from SYS BOOT pins */
  423 + return ((ind & CTRL_SYSBOOT_15_14_MASK) >>
  424 + CTRL_SYSBOOT_15_14_SHIFT);
  425 +}
  426 +
  427 +const struct dpll_params *get_dpll_ddr_params(void)
  428 +{
  429 + int ind = get_sys_clk_index();
  430 +
  431 + if (board_is_eposevm())
  432 + return &epos_evm_dpll_ddr[ind];
  433 + else if (board_is_gpevm() || board_is_sk() || board_is_smarc_t437x_800() || board_is_smarc_t437x_01g())
  434 + return &gp_evm_dpll_ddr;
  435 + else if (board_is_idk())
  436 + return &idk_dpll_ddr;
  437 + else
  438 + printf(" Board '%s' not supported\n", am43xx_board_name);
  439 + return NULL;
  440 +}
  441 +
  442 +
  443 +/*
  444 + * get_opp_offset:
  445 + * Returns the index for safest OPP of the device to boot.
  446 + * max_off: Index of the MAX OPP in DEV ATTRIBUTE register.
  447 + * min_off: Index of the MIN OPP in DEV ATTRIBUTE register.
  448 + * This data is read from dev_attribute register which is e-fused.
  449 + * A'1' in bit indicates OPP disabled and not available, a '0' indicates
  450 + * OPP available. Lowest OPP starts with min_off. So returning the
  451 + * bit with rightmost '0'.
  452 + */
  453 +static int get_opp_offset(int max_off, int min_off)
  454 +{
  455 + struct ctrl_stat *ctrl = (struct ctrl_stat *)CTRL_BASE;
  456 + int opp, offset, i;
  457 +
  458 + /* Bits 0:11 are defined to be the MPU_MAX_FREQ */
  459 + opp = readl(&ctrl->dev_attr) & ~0xFFFFF000;
  460 +
  461 + for (i = max_off; i >= min_off; i--) {
  462 + offset = opp & (1 << i);
  463 + if (!offset)
  464 + return i;
  465 + }
  466 +
  467 + return min_off;
  468 +}
  469 +
  470 +const struct dpll_params *get_dpll_mpu_params(void)
  471 +{
  472 + int opp = get_opp_offset(DEV_ATTR_MAX_OFFSET, DEV_ATTR_MIN_OFFSET);
  473 + u32 ind = get_sys_clk_index();
  474 +
  475 + return &dpll_mpu[ind][opp];
  476 +}
  477 +
  478 +const struct dpll_params *get_dpll_core_params(void)
  479 +{
  480 + int ind = get_sys_clk_index();
  481 +
  482 + return &dpll_core[ind];
  483 +}
  484 +
  485 +const struct dpll_params *get_dpll_per_params(void)
  486 +{
  487 + int ind = get_sys_clk_index();
  488 +
  489 + return &dpll_per[ind];
  490 +}
  491 +
  492 +void scale_vcores_generic(u32 m)
  493 +{
  494 + int mpu_vdd;
  495 +
  496 + if (i2c_probe(TPS65218_CHIP_PM))
  497 + return;
  498 +
  499 + switch (m) {
  500 + case 1000:
  501 + mpu_vdd = TPS65218_DCDC_VOLT_SEL_1330MV;
  502 + break;
  503 + case 800:
  504 + mpu_vdd = TPS65218_DCDC_VOLT_SEL_1260MV;
  505 + break;
  506 + case 720:
  507 + mpu_vdd = TPS65218_DCDC_VOLT_SEL_1200MV;
  508 + break;
  509 + case 600:
  510 + mpu_vdd = TPS65218_DCDC_VOLT_SEL_1100MV;
  511 + break;
  512 + case 300:
  513 + mpu_vdd = TPS65218_DCDC_VOLT_SEL_0950MV;
  514 + break;
  515 + default:
  516 + puts("Unknown MPU clock, not scaling\n");
  517 + return;
  518 + }
  519 +
  520 + /* Set DCDC1 (CORE) voltage to 1.1V */
  521 + if (tps65218_voltage_update(TPS65218_DCDC1,
  522 + TPS65218_DCDC_VOLT_SEL_1100MV)) {
  523 + printf("%s failure\n", __func__);
  524 + return;
  525 + }
  526 +
  527 + /* Set DCDC2 (MPU) voltage */
  528 + if (tps65218_voltage_update(TPS65218_DCDC2, mpu_vdd)) {
  529 + printf("%s failure\n", __func__);
  530 + return;
  531 + }
  532 +}
  533 +
  534 +void scale_vcores_idk(u32 m)
  535 +{
  536 + int mpu_vdd;
  537 +
  538 + if (i2c_probe(TPS62362_I2C_ADDR))
  539 + return;
  540 +
  541 + switch (m) {
  542 + case 1000:
  543 + mpu_vdd = TPS62362_DCDC_VOLT_SEL_1330MV;
  544 + break;
  545 + case 800:
  546 + mpu_vdd = TPS62362_DCDC_VOLT_SEL_1260MV;
  547 + break;
  548 + case 720:
  549 + mpu_vdd = TPS62362_DCDC_VOLT_SEL_1200MV;
  550 + break;
  551 + case 600:
  552 + mpu_vdd = TPS62362_DCDC_VOLT_SEL_1100MV;
  553 + break;
  554 + case 300:
  555 + mpu_vdd = TPS62362_DCDC_VOLT_SEL_1330MV;
  556 + break;
  557 + default:
  558 + puts("Unknown MPU clock, not scaling\n");
  559 + return;
  560 + }
  561 +
  562 + /* Set VDD_MPU voltage */
  563 + if (tps62362_voltage_update(TPS62362_SET3, mpu_vdd)) {
  564 + printf("%s failure\n", __func__);
  565 + return;
  566 + }
  567 +}
  568 +
  569 +void scale_vcores(void)
  570 +{
  571 + const struct dpll_params *mpu_params;
  572 + struct am43xx_board_id header;
  573 +
  574 + enable_i2c1_pin_mux();
  575 + i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
  576 + if (read_eeprom(&header) < 0)
  577 + puts("Could not get board ID.\n");
  578 +
  579 + /* Get the frequency */
  580 + mpu_params = get_dpll_mpu_params();
  581 +
  582 + if (board_is_idk())
  583 + scale_vcores_idk(mpu_params->m);
  584 + else
  585 + scale_vcores_generic(mpu_params->m);
  586 +}
  587 +
  588 +void set_uart_mux_conf(void)
  589 +{
  590 +#if CONFIG_CONS_INDEX == 1
  591 + enable_uart0_pin_mux();
  592 +#elif CONFIG_CONS_INDEX == 2
  593 + enable_uart1_pin_mux();
  594 +#elif CONFIG_CONS_INDEX == 3
  595 + enable_uart2_pin_mux();
  596 +#elif CONFIG_CONS_INDEX == 4
  597 + enable_uart3_pin_mux();
  598 +#elif CONFIG_CONS_INDEX == 5
  599 + enable_uart4_pin_mux();
  600 +#elif CONFIG_CONS_INDEX == 6
  601 + enable_uart5_pin_mux();
  602 +#endif
  603 +}
  604 +
  605 +void set_mux_conf_regs(void)
  606 +{
  607 + enable_board_pin_mux();
  608 +}
  609 +
  610 +static void enable_vtt_regulator(void)
  611 +{
  612 + u32 temp;
  613 +
  614 + /* enable module */
  615 + writel(GPIO_CTRL_ENABLEMODULE, AM33XX_GPIO5_BASE + OMAP_GPIO_CTRL);
  616 +
  617 + /* enable output for GPIO5_7 */
  618 + writel(GPIO_SETDATAOUT(7),
  619 + AM33XX_GPIO5_BASE + OMAP_GPIO_SETDATAOUT);
  620 + temp = readl(AM33XX_GPIO5_BASE + OMAP_GPIO_OE);
  621 + temp = temp & ~(GPIO_OE_ENABLE(7));
  622 + writel(temp, AM33XX_GPIO5_BASE + OMAP_GPIO_OE);
  623 +}
  624 +
  625 +enum {
  626 + RTC_BOARD_EPOS = 1,
  627 + RTC_BOARD_EVM14,
  628 + RTC_BOARD_EVM12,
  629 + RTC_BOARD_GPEVM,
  630 + RTC_BOARD_SK,
  631 + RTC_BOARD_SMARC_T437X_800,
  632 + RTC_BOARD_SMARC_T437X_01G,
  633 +};
  634 +
  635 +/*
  636 + * In the rtc_only boot path we have the board type info in the rtc scratch pad
  637 + * register hence we bypass the costly i2c reads to eeprom and directly program
  638 + * the board name string
  639 + */
  640 +void rtc_only_update_board_type(u32 btype)
  641 +{
  642 + const char *name = "";
  643 + const char *rev = "1.0";
  644 +
  645 + switch (btype) {
  646 + case RTC_BOARD_EPOS:
  647 + name = "AM43EPOS";
  648 + break;
  649 + case RTC_BOARD_EVM14:
  650 + name = "AM43__GP";
  651 + rev = "1.4";
  652 + break;
  653 + case RTC_BOARD_EVM12:
  654 + name = "AM43__GP";
  655 + rev = "1.2";
  656 + break;
  657 + case RTC_BOARD_GPEVM:
  658 + name = "AM43__GP";
  659 + break;
  660 + case RTC_BOARD_SK:
  661 + name = "AM43__SK";
  662 + break;
  663 + case RTC_BOARD_SMARC_T437X_800:
  664 + name = "SMCT4X80";
  665 + break;
  666 + case RTC_BOARD_SMARC_T437X_01G:
  667 + name = "SMCT4X1G";
  668 + break;
  669 + }
  670 + strcpy(am43xx_board_name, name);
  671 + strcpy(am43xx_board_rev, rev);
  672 +}
  673 +
  674 +u32 rtc_only_get_board_type(void)
  675 +{
  676 + if (board_is_eposevm())
  677 + return RTC_BOARD_EPOS;
  678 + else if (board_is_evm_14_or_later())
  679 + return RTC_BOARD_EVM14;
  680 + else if (board_is_evm_12_or_later())
  681 + return RTC_BOARD_EVM12;
  682 + else if (board_is_gpevm())
  683 + return RTC_BOARD_GPEVM;
  684 + else if (board_is_sk())
  685 + return RTC_BOARD_SK;
  686 + else if (board_is_smarc_t437x_800())
  687 + return RTC_BOARD_SMARC_T437X_800;
  688 + else if (board_is_smarc_t437x_01g())
  689 + return RTC_BOARD_SMARC_T437X_01G;
  690 +
  691 + return 0;
  692 +}
  693 +
  694 +void sdram_init(void)
  695 +{
  696 + /*
  697 + * EPOS EVM has 1GB LPDDR2 connected to EMIF.
  698 + * GP EMV has 1GB DDR3 connected to EMIF
  699 + * along with VTT regulator.
  700 + */
  701 + if (board_is_eposevm()) {
  702 + config_ddr(0, &ioregs_lpddr2, NULL, NULL, &emif_regs_lpddr2, 0);
  703 + } else if (board_is_evm_14_or_later()) {
  704 + enable_vtt_regulator();
  705 + config_ddr(0, &ioregs_ddr3, NULL, NULL,
  706 + &ddr3_emif_regs_400Mhz_production, 0);
  707 + } else if (board_is_evm_12_or_later()) {
  708 + enable_vtt_regulator();
  709 + config_ddr(0, &ioregs_ddr3, NULL, NULL,
  710 + &ddr3_emif_regs_400Mhz_beta, 0);
  711 + } else if (board_is_gpevm()) {
  712 + enable_vtt_regulator();
  713 + config_ddr(0, &ioregs_ddr3, NULL, NULL,
  714 + &ddr3_emif_regs_400Mhz, 0);
  715 + } else if (board_is_sk()) {
  716 + config_ddr(400, &ioregs_ddr3, NULL, NULL,
  717 + &ddr3_sk_emif_regs_400Mhz, 0);
  718 + } else if (board_is_idk()) {
  719 + config_ddr(400, &ioregs_ddr3, NULL, NULL,
  720 + &ddr3_idk_emif_regs_400Mhz, 0);
  721 + } else if (board_is_smarc_t437x_800()) {
  722 + config_ddr(400, &ioregs_ddr3, NULL, NULL,
  723 + &ddr3_smarc80_emif_regs_400Mhz, 0);
  724 + } else if (board_is_smarc_t437x_01g()) {
  725 + config_ddr(400, &ioregs_ddr3, NULL, NULL,
  726 + &ddr3_smarc1g_emif_regs_400Mhz, 0);
  727 + }
  728 +}
  729 +#endif
  730 +
  731 +/* setup board specific PMIC */
  732 +int power_init_board(void)
  733 +{
  734 + struct pmic *p;
  735 +
  736 + if (board_is_idk()) {
  737 + power_tps62362_init(I2C_PMIC);
  738 + p = pmic_get("TPS62362");
  739 + if (p && !pmic_probe(p))
  740 + puts("PMIC: TPS62362\n");
  741 + } else {
  742 + power_tps65218_init(I2C_PMIC);
  743 + p = pmic_get("TPS65218_PMIC");
  744 + if (p && !pmic_probe(p))
  745 + puts("PMIC: TPS65218\n");
  746 + }
  747 +
  748 + return 0;
  749 +}
  750 +
  751 +int board_init(void)
  752 +{
  753 + u32 sys_reboot;
  754 +
  755 + sys_reboot = readl(PRM_RSTST);
  756 + if (sys_reboot & (1 << 9))
  757 + puts("Reset Source: IcePick reset has occurred.\n");
  758 +
  759 + if (sys_reboot & (1 << 5))
  760 + puts("Reset Source: Global external warm reset has occurred.\n");
  761 +
  762 + if (sys_reboot & (1 << 4))
  763 + puts("Reset Source: watchdog reset has occurred.\n");
  764 +
  765 + if (sys_reboot & (1 << 1))
  766 + puts("Reset Source: Global warm SW reset has occurred.\n");
  767 +
  768 + if (sys_reboot & (1 << 0))
  769 + puts("Reset Source: Power-on reset has occurred.\n");
  770 +
  771 + struct l3f_cfg_bwlimiter *bwlimiter = (struct l3f_cfg_bwlimiter *)L3F_CFG_BWLIMITER;
  772 + u32 mreqprio_0, mreqprio_1, modena_init0_bw_fractional,
  773 + modena_init0_bw_integer, modena_init0_watermark_0;
  774 +
  775 + gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
  776 + gpmc_init();
  777 +
  778 + /* Clear all important bits for DSS errata that may need to be tweaked*/
  779 + mreqprio_0 = readl(&cdev->mreqprio_0) & MREQPRIO_0_SAB_INIT1_MASK &
  780 + MREQPRIO_0_SAB_INIT0_MASK;
  781 +
  782 + mreqprio_1 = readl(&cdev->mreqprio_1) & MREQPRIO_1_DSS_MASK;
  783 +
  784 + modena_init0_bw_fractional = readl(&bwlimiter->modena_init0_bw_fractional) &
  785 + BW_LIMITER_BW_FRAC_MASK;
  786 +
  787 + modena_init0_bw_integer = readl(&bwlimiter->modena_init0_bw_integer) &
  788 + BW_LIMITER_BW_INT_MASK;
  789 +
  790 + modena_init0_watermark_0 = readl(&bwlimiter->modena_init0_watermark_0) &
  791 + BW_LIMITER_BW_WATERMARK_MASK;
  792 +
  793 + /* Setting MReq Priority of the DSS*/
  794 + mreqprio_0 |= 0x77;
  795 +
  796 + /*
  797 + * Set L3 Fast Configuration Register
  798 + * Limiting bandwith for ARM core to 700 MBPS
  799 + */
  800 + modena_init0_bw_fractional |= 0x10;
  801 + modena_init0_bw_integer |= 0x3;
  802 +
  803 + writel(mreqprio_0, &cdev->mreqprio_0);
  804 + writel(mreqprio_1, &cdev->mreqprio_1);
  805 +
  806 + writel(modena_init0_bw_fractional, &bwlimiter->modena_init0_bw_fractional);
  807 + writel(modena_init0_bw_integer, &bwlimiter->modena_init0_bw_integer);
  808 + writel(modena_init0_watermark_0, &bwlimiter->modena_init0_watermark_0);
  809 +
  810 + return 0;
  811 +}
  812 +
  813 +#ifdef CONFIG_BOARD_LATE_INIT
  814 +int board_late_init(void)
  815 +{
  816 +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
  817 + char safe_string[HDR_NAME_LEN + 1];
  818 + struct am43xx_board_id header;
  819 +
  820 + if (read_eeprom(&header) < 0)
  821 + puts("Could not get board ID.\n");
  822 +
  823 + /* Read Board Info */
  824 + puts("-----------------------------------------\n");
  825 + printf("Board ID: %.*s\n",
  826 + sizeof(header.name), header.name);
  827 + printf("Board Revision: %.*s\n",
  828 + sizeof(header.version), header.version);
  829 + printf("Board Serial#: %.*s\n",
  830 + sizeof(header.serial), header.serial);
  831 + puts("-----------------------------------------\n");
  832 +
  833 + /* Now set variables based on the header. */
  834 + strncpy(safe_string, (char *)header.name, sizeof(header.name));
  835 + safe_string[sizeof(header.name)] = 0;
  836 + setenv("board_name", safe_string);
  837 +
  838 + strncpy(safe_string, (char *)header.version, sizeof(header.version));
  839 + safe_string[sizeof(header.version)] = 0;
  840 + setenv("board_rev", safe_string);
  841 +#endif
  842 +
  843 + /* Turn on LCD Backlight */
  844 +#define GPIO_LCD_BKLT_EN 68
  845 +#define GPIO_LCD_PWM_EN 138
  846 +#define GPIO_BOOT_SEL1 168
  847 +#define GPIO_BOOT_SEL2 169
  848 +#define GPIO_BOOT_SEL3 170
  849 + gpio_request(GPIO_LCD_BKLT_EN, "lcd_bklt_en");
  850 + gpio_direction_output(GPIO_LCD_BKLT_EN, 1);
  851 + gpio_request(GPIO_LCD_PWM_EN, "lcd_pwm_en");
  852 + gpio_direction_output(GPIO_LCD_PWM_EN, 1);
  853 +
  854 + gpio_request(GPIO_BOOT_SEL1, "boot_sel1");
  855 + gpio_direction_input(GPIO_BOOT_SEL1);
  856 + gpio_request(GPIO_BOOT_SEL2, "boot_sel2");
  857 + gpio_direction_input(GPIO_BOOT_SEL2);
  858 + gpio_request(GPIO_BOOT_SEL3, "boot_sel3");
  859 + gpio_direction_input(GPIO_BOOT_SEL3);
  860 +
  861 + /*Read BOOT_SEL Configuration */
  862 + if ((gpio_get_value(168) == 0)&&(gpio_get_value(169) == 0)&&(gpio_get_value(170) == 0)) {
  863 + puts("BOOT_SEL Detected: OFF OFF OFF, SATA Boot Up Not Defined...\n");
  864 + hang();
  865 + } else if ((gpio_get_value(168) == 0)&&(gpio_get_value(169) == 1)&&(gpio_get_value(170) == 0)) {
  866 + puts("BOOT_SEL Detected: OFF ON OFF, Load zImage from Carrier SDMMC...\n");
  867 + setenv_ulong("mmcdev", 2);
  868 + setenv("bootcmd", "run findfdt; run mmcboot;");
  869 + } else if ((gpio_get_value(168) == 1)&&(gpio_get_value(169) == 0)&&(gpio_get_value(170) == 0)) {
  870 + puts("BOOT_SEL Detected: ON OFF OFF, Load zImage from Carrier SD Card...\n");
  871 + setenv_ulong("mmcdev", 0);
  872 + setenv("bootcmd", "run findfdt; run mmcboot;");
  873 + } else if ((gpio_get_value(168) == 0)&&(gpio_get_value(169) == 1)&&(gpio_get_value(170) == 1)) {
  874 + puts("BOOT_SEL Detected: OFF ON ON, Load zImage from Module eMMC Flash...\n");
  875 + setenv_ulong("mmcdev", 1);
  876 + setenv("bootcmd", "mmc rescan; run findfdt; run mmcboot;");
  877 + } else if ((gpio_get_value(168) == 1)&&(gpio_get_value(169) == 0)&&(gpio_get_value(170) == 1)) {
  878 + puts("BOOT_SEL Detected: ON OFF ON, Load zImage from GBE...\n");
  879 + setenv("bootcmd", "dhcp;");
  880 + } else if ((gpio_get_value(168) == 1)&&(gpio_get_value(169) == 1)&&(gpio_get_value(170) == 0)) {
  881 + puts("BOOT_SEL Detected: ON ON OFF, Carrier SPI Boot Not Supported...\n");
  882 + hang();
  883 + } else if ((gpio_get_value(168) == 0)&&(gpio_get_value(169) == 0)&&(gpio_get_value(170) == 1)) {
  884 + puts("BOOT_SEL Detected: OFF OFF ON, Load zImage from USB1...\n");
  885 + setenv_ulong("usbdev", 0);
  886 + setenv("bootcmd", "run findfdt; run usbboot;");
  887 + } else if ((gpio_get_value(168) == 1)&&(gpio_get_value(169) == 1)&&(gpio_get_value(170) == 1)) {
  888 + puts("BOOT_SEL Detected: ON ON ON, MOdule SPI Boot up is Default, Load zImage from Module eMMC...\n");
  889 + setenv_ulong("mmcdev", 1);
  890 + setenv("bootcmd", "run findfdt; run mmcboot;");
  891 + } else {
  892 + puts("unsupported boot up devices\n");
  893 + hang();
  894 + }
  895 + return 0;
  896 +}
  897 +#endif
  898 +
  899 +#ifdef CONFIG_USB_DWC3
  900 +static struct dwc3_device usb_otg_ss1 = {
  901 + .maximum_speed = USB_SPEED_HIGH,
  902 + .base = USB_OTG_SS1_BASE,
  903 + .tx_fifo_resize = false,
  904 + .index = 0,
  905 +};
  906 +
  907 +static struct dwc3_omap_device usb_otg_ss1_glue = {
  908 + .base = (void *)USB_OTG_SS1_GLUE_BASE,
  909 + .utmi_mode = DWC3_OMAP_UTMI_MODE_SW,
  910 + .index = 0,
  911 +};
  912 +
  913 +static struct ti_usb_phy_device usb_phy1_device = {
  914 + .usb2_phy_power = (void *)USB2_PHY1_POWER,
  915 + .index = 0,
  916 +};
  917 +
  918 +static struct dwc3_device usb_otg_ss2 = {
  919 + .maximum_speed = USB_SPEED_HIGH,
  920 + .base = USB_OTG_SS2_BASE,
  921 + .tx_fifo_resize = false,
  922 + .index = 1,
  923 +};
  924 +
  925 +static struct dwc3_omap_device usb_otg_ss2_glue = {
  926 + .base = (void *)USB_OTG_SS2_GLUE_BASE,
  927 + .utmi_mode = DWC3_OMAP_UTMI_MODE_SW,
  928 + .index = 1,
  929 +};
  930 +
  931 +static struct ti_usb_phy_device usb_phy2_device = {
  932 + .usb2_phy_power = (void *)USB2_PHY2_POWER,
  933 + .index = 1,
  934 +};
  935 +
  936 +int board_usb_init(int index, enum usb_init_type init)
  937 +{
  938 + enable_usb_clocks(index);
  939 + switch (index) {
  940 + case 0:
  941 + if (init == USB_INIT_DEVICE) {
  942 + usb_otg_ss1.dr_mode = USB_DR_MODE_PERIPHERAL;
  943 + usb_otg_ss1_glue.vbus_id_status = OMAP_DWC3_VBUS_VALID;
  944 + } else {
  945 + usb_otg_ss1.dr_mode = USB_DR_MODE_HOST;
  946 + usb_otg_ss1_glue.vbus_id_status = OMAP_DWC3_ID_GROUND;
  947 + }
  948 +
  949 + dwc3_omap_uboot_init(&usb_otg_ss1_glue);
  950 + ti_usb_phy_uboot_init(&usb_phy1_device);
  951 + dwc3_uboot_init(&usb_otg_ss1);
  952 + break;
  953 + case 1:
  954 + if (init == USB_INIT_DEVICE) {
  955 + usb_otg_ss2.dr_mode = USB_DR_MODE_PERIPHERAL;
  956 + usb_otg_ss2_glue.vbus_id_status = OMAP_DWC3_VBUS_VALID;
  957 + } else {
  958 + usb_otg_ss2.dr_mode = USB_DR_MODE_HOST;
  959 + usb_otg_ss2_glue.vbus_id_status = OMAP_DWC3_ID_GROUND;
  960 + }
  961 +
  962 + ti_usb_phy_uboot_init(&usb_phy2_device);
  963 + dwc3_omap_uboot_init(&usb_otg_ss2_glue);
  964 + dwc3_uboot_init(&usb_otg_ss2);
  965 + break;
  966 + default:
  967 + printf("Invalid Controller Index\n");
  968 + }
  969 +
  970 + return 0;
  971 +}
  972 +
  973 +int board_usb_cleanup(int index, enum usb_init_type init)
  974 +{
  975 + switch (index) {
  976 + case 0:
  977 + case 1:
  978 + ti_usb_phy_uboot_exit(index);
  979 + dwc3_uboot_exit(index);
  980 + dwc3_omap_uboot_exit(index);
  981 + break;
  982 + default:
  983 + printf("Invalid Controller Index\n");
  984 + }
  985 + disable_usb_clocks(index);
  986 +
  987 + return 0;
  988 +}
  989 +
  990 +int usb_gadget_handle_interrupts(int index)
  991 +{
  992 + u32 status;
  993 +
  994 + status = dwc3_omap_uboot_interrupt_status(index);
  995 + if (status)
  996 + dwc3_uboot_handle_interrupt(index);
  997 +
  998 + return 0;
  999 +}
  1000 +#endif
  1001 +
  1002 +#if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) || \
  1003 + (defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
  1004 +static void cpsw_control(int enabled)
  1005 +{
  1006 + /* Additional controls can be added here */
  1007 + return;
  1008 +}
  1009 +
  1010 +static struct cpsw_slave_data cpsw_slaves[] = {
  1011 + {
  1012 + .slave_reg_ofs = 0x208,
  1013 + .sliver_reg_ofs = 0xd80,
  1014 + .phy_addr = 16,
  1015 + },
  1016 + {
  1017 + .slave_reg_ofs = 0x308,
  1018 + .sliver_reg_ofs = 0xdc0,
  1019 + .phy_addr = 1,
  1020 + },
  1021 +};
  1022 +
  1023 +static struct cpsw_platform_data cpsw_data = {
  1024 + .mdio_base = CPSW_MDIO_BASE,
  1025 + .cpsw_base = CPSW_BASE,
  1026 + .mdio_div = 0xff,
  1027 + .channels = 8,
  1028 + .cpdma_reg_ofs = 0x800,
  1029 + .slaves = 1,
  1030 + .slave_data = cpsw_slaves,
  1031 + .ale_reg_ofs = 0xd00,
  1032 + .ale_entries = 1024,
  1033 + .host_port_reg_ofs = 0x108,
  1034 + .hw_stats_reg_ofs = 0x900,
  1035 + .bd_ram_ofs = 0x2000,
  1036 + .mac_control = (1 << 5),
  1037 + .control = cpsw_control,
  1038 + .host_port_num = 0,
  1039 + .version = CPSW_CTRL_VERSION_2,
  1040 +};
  1041 +#endif
  1042 +
  1043 +/*
  1044 + * This function will:
  1045 + * Read the eFuse for MAC addresses, and set ethaddr/eth1addr/usbnet_devaddr
  1046 + * in the environment
  1047 + * Perform fixups to the PHY present on certain boards. We only need this
  1048 + * function in:
  1049 + * - SPL with either CPSW or USB ethernet support
  1050 + * - Full U-Boot, with either CPSW or USB ethernet
  1051 + * Build in only these cases to avoid warnings about unused variables
  1052 + * when we build an SPL that has neither option but full U-Boot will.
  1053 + */
  1054 +#if ((defined(CONFIG_SPL_ETH_SUPPORT) || \
  1055 + defined(CONFIG_SPL_USBETH_SUPPORT)) && \
  1056 + defined(CONFIG_SPL_BUILD)) || \
  1057 + ((defined(CONFIG_DRIVER_TI_CPSW) || \
  1058 + defined(CONFIG_USB_ETHER)) && !defined(CONFIG_SPL_BUILD))
  1059 +int board_eth_init(bd_t *bis)
  1060 +{
  1061 + int rv;
  1062 + uint8_t mac_addr[6];
  1063 + uint32_t mac_hi, mac_lo;
  1064 +
  1065 + /* try reading mac address from efuse */
  1066 + mac_lo = readl(&cdev->macid0l);
  1067 + mac_hi = readl(&cdev->macid0h);
  1068 + mac_addr[0] = mac_hi & 0xFF;
  1069 + mac_addr[1] = (mac_hi & 0xFF00) >> 8;
  1070 + mac_addr[2] = (mac_hi & 0xFF0000) >> 16;
  1071 + mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
  1072 + mac_addr[4] = mac_lo & 0xFF;
  1073 + mac_addr[5] = (mac_lo & 0xFF00) >> 8;
  1074 +
  1075 +#if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) || \
  1076 + (defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
  1077 + if (!getenv("ethaddr")) {
  1078 + puts("<ethaddr> not set. Validating first E-fuse MAC\n");
  1079 + if (is_valid_ethaddr(mac_addr))
  1080 + eth_setenv_enetaddr("ethaddr", mac_addr);
  1081 + }
  1082 +
  1083 +#ifndef CONFIG_SPL_BUILD
  1084 + mac_lo = readl(&cdev->macid1l);
  1085 + mac_hi = readl(&cdev->macid1h);
  1086 + mac_addr[0] = mac_hi & 0xFF;
  1087 + mac_addr[1] = (mac_hi & 0xFF00) >> 8;
  1088 + mac_addr[2] = (mac_hi & 0xFF0000) >> 16;
  1089 + mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
  1090 + mac_addr[4] = mac_lo & 0xFF;
  1091 + mac_addr[5] = (mac_lo & 0xFF00) >> 8;
  1092 +
  1093 + if (!getenv("eth1addr")) {
  1094 + if (is_valid_ethaddr(mac_addr))
  1095 + eth_setenv_enetaddr("eth1addr", mac_addr);
  1096 + }
  1097 +#endif
  1098 +
  1099 + if (board_is_eposevm()) {
  1100 + writel(RMII_MODE_ENABLE | RMII_CHIPCKL_ENABLE, &cdev->miisel);
  1101 + cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_RMII;
  1102 + cpsw_slaves[0].phy_addr = 16;
  1103 + } else if (board_is_sk()) {
  1104 + writel(RGMII_MODE_ENABLE, &cdev->miisel);
  1105 + cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_RGMII;
  1106 + cpsw_slaves[0].phy_addr = 4;
  1107 + cpsw_slaves[1].phy_addr = 5;
  1108 + } else if (board_is_idk()) {
  1109 + writel(RGMII_MODE_ENABLE, &cdev->miisel);
  1110 + cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_RGMII;
  1111 + cpsw_slaves[0].phy_addr = 0;
  1112 + } else if (board_is_smarc_t437x_800() || board_is_smarc_t437x_01g()) {
  1113 + writel((RGMII_MODE_ENABLE | RGMII_INT_DELAY), &cdev->miisel);
  1114 + cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_RGMII;
  1115 + cpsw_slaves[1].phy_if = PHY_INTERFACE_MODE_RGMII;
  1116 + cpsw_slaves[0].phy_addr = 6;
  1117 + cpsw_slaves[1].phy_addr = 7;
  1118 + } else {
  1119 + writel(RGMII_MODE_ENABLE, &cdev->miisel);
  1120 + cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_RGMII;
  1121 + cpsw_slaves[0].phy_addr = 0;
  1122 + }
  1123 +
  1124 + rv = cpsw_register(&cpsw_data);
  1125 + if (rv < 0) {
  1126 + printf("Error %d registering CPSW switch\n", rv);
  1127 + return rv;
  1128 + }
  1129 +#endif
  1130 +#if defined(CONFIG_USB_ETHER) && \
  1131 + (!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_USBETH_SUPPORT))
  1132 + if (is_valid_ethaddr(mac_addr))
  1133 + eth_setenv_enetaddr("usbnet_devaddr", mac_addr);
  1134 +
  1135 + rv = usb_eth_initialize(bis);
  1136 + if (rv < 0)
  1137 + printf("Error %d registering USB_ETHER\n", rv);
  1138 +#endif
  1139 +
  1140 + return rv;
  1141 +}
  1142 +#endif
  1143 +
  1144 +#ifdef CONFIG_SPL_LOAD_FIT
  1145 +int board_fit_config_name_match(const char *name)
  1146 +{
  1147 + if (board_is_gpevm() && !strcmp(name, "am437x-gp-evm"))
  1148 + return 0;
  1149 + else if (board_is_sk() && !strcmp(name, "am437x-sk-evm"))
  1150 + return 0;
  1151 + else if (board_is_eposevm() && !strcmp(name, "am43x-epos-evm"))
  1152 + return 0;
  1153 + else if (board_is_idk() && !strcmp(name, "am437x-idk-evm"))
  1154 + return 0;
  1155 + else if (board_is_smarc_t437x_800() && !strcmp(name, "am437x-smarct437x"))
  1156 + return 0;
  1157 + else if (board_is_smarc_t437x_01g() && !strcmp(name, "am437x-smarct437x"))
  1158 + return 0;
  1159 + else
  1160 + return -1;
  1161 +}
  1162 +#endif
board/embedian/smarct437x/board.h
  1 +/*
  2 + * board.h
  3 + *
  4 + * TI AM437x boards information header
  5 + * Derived from AM335x board.
  6 + *
  7 + * Copyright (C) 2013, Texas Instruments, Incorporated - http://www.ti.com/
  8 + *
  9 + * SPDX-License-Identifier: GPL-2.0+
  10 + */
  11 +
  12 +#ifndef _BOARD_H_
  13 +#define _BOARD_H_
  14 +
  15 +#include <asm/arch/omap.h>
  16 +
  17 +static char *const am43xx_board_name = (char *)AM4372_BOARD_NAME_START;
  18 +static char *const am43xx_board_rev = (char *)AM4372_BOARD_VERSION_START;
  19 +
  20 +/*
  21 + * TI AM437x EVMs define a system EEPROM that defines certain sub-fields.
  22 + * We use these fields to in turn see what board we are on, and what
  23 + * that might require us to set or not set.
  24 + */
  25 +#define HDR_NO_OF_MAC_ADDR 3
  26 +#define HDR_ETH_ALEN 6
  27 +#define HDR_NAME_LEN 8
  28 +
  29 +#define DEV_ATTR_MAX_OFFSET 5
  30 +#define DEV_ATTR_MIN_OFFSET 0
  31 +
  32 +struct am43xx_board_id {
  33 + unsigned int magic;
  34 + char name[HDR_NAME_LEN];
  35 + char version[4];
  36 + char serial[12];
  37 + char config[32];
  38 + char mac_addr[HDR_NO_OF_MAC_ADDR][HDR_ETH_ALEN];
  39 +};
  40 +
  41 +static inline int board_is_eposevm(void)
  42 +{
  43 + return !strncmp(am43xx_board_name, "AM43EPOS", HDR_NAME_LEN);
  44 +}
  45 +
  46 +static inline int board_is_gpevm(void)
  47 +{
  48 + return !strncmp(am43xx_board_name, "AM43__GP", HDR_NAME_LEN);
  49 +}
  50 +
  51 +static inline int board_is_sk(void)
  52 +{
  53 + return !strncmp(am43xx_board_name, "AM43__SK", HDR_NAME_LEN);
  54 +}
  55 +
  56 +static inline int board_is_smarc_t437x_800(void)
  57 +{
  58 + return !strncmp(am43xx_board_name, "SMCT4X80", HDR_NAME_LEN);
  59 +}
  60 +
  61 +static inline int board_is_smarc_t437x_01g(void)
  62 +{
  63 + return !strncmp(am43xx_board_name, "SMCT4X1G", HDR_NAME_LEN);
  64 +}
  65 +
  66 +static inline int board_is_idk(void)
  67 +{
  68 + return !strncmp(am43xx_board_name, "AM43_IDK", HDR_NAME_LEN);
  69 +}
  70 +
  71 +static inline int board_is_evm_14_or_later(void)
  72 +{
  73 + return (board_is_gpevm() && strncmp("1.4", am43xx_board_rev, 3) <= 0);
  74 +}
  75 +
  76 +static inline int board_is_evm_12_or_later(void)
  77 +{
  78 + return (board_is_gpevm() && strncmp("1.2", am43xx_board_rev, 3) <= 0);
  79 +}
  80 +
  81 +void enable_uart0_pin_mux(void);
  82 +void enable_uart2_pin_mux(void);
  83 +void enable_uart3_pin_mux(void);
  84 +void enable_uart4_pin_mux(void);
  85 +void enable_board_pin_mux(void);
  86 +void enable_i2c1_pin_mux(void);
  87 +#endif
board/embedian/smarct437x/mux.c
  1 +/*
  2 + * mux.c
  3 + *
  4 + * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
  5 + *
  6 + * SPDX-License-Identifier: GPL-2.0+
  7 + */
  8 +
  9 +#include <common.h>
  10 +#include <asm/arch/sys_proto.h>
  11 +#include <asm/arch/mux.h>
  12 +#include "board.h"
  13 +
  14 +static struct module_pin_mux rmii1_pin_mux[] = {
  15 + {OFFSET(mii1_txen), MODE(1)}, /* RMII1_TXEN */
  16 + {OFFSET(mii1_txd1), MODE(1)}, /* RMII1_TD1 */
  17 + {OFFSET(mii1_txd0), MODE(1)}, /* RMII1_TD0 */
  18 + {OFFSET(mii1_rxd1), MODE(1) | RXACTIVE}, /* RMII1_RD1 */
  19 + {OFFSET(mii1_rxd0), MODE(1) | RXACTIVE}, /* RMII1_RD0 */
  20 + {OFFSET(mii1_rxdv), MODE(1) | RXACTIVE}, /* RMII1_RXDV */
  21 + {OFFSET(mii1_crs), MODE(1) | RXACTIVE}, /* RMII1_CRS_DV */
  22 + {OFFSET(mii1_rxerr), MODE(1) | RXACTIVE}, /* RMII1_RXERR */
  23 + {OFFSET(rmii1_refclk), MODE(0) | RXACTIVE}, /* RMII1_refclk */
  24 + {-1},
  25 +};
  26 +
  27 +/* LAN1 */
  28 +static struct module_pin_mux rgmii1_pin_mux[] = {
  29 + {OFFSET(mii1_txen), MODE(2)}, /* RGMII1_TCTL */
  30 + {OFFSET(mii1_rxdv), MODE(2) | RXACTIVE}, /* RGMII1_RCTL */
  31 + {OFFSET(mii1_txd3), MODE(2)}, /* RGMII1_TD3 */
  32 + {OFFSET(mii1_txd2), MODE(2)}, /* RGMII1_TD2 */
  33 + {OFFSET(mii1_txd1), MODE(2)}, /* RGMII1_TD1 */
  34 + {OFFSET(mii1_txd0), MODE(2)}, /* RGMII1_TD0 */
  35 + {OFFSET(mii1_txclk), MODE(2)}, /* RGMII1_TCLK */
  36 + {OFFSET(mii1_rxclk), MODE(2) | RXACTIVE}, /* RGMII1_RCLK */
  37 + {OFFSET(mii1_rxd3), MODE(2) | RXACTIVE}, /* RGMII1_RD3 */
  38 + {OFFSET(mii1_rxd2), MODE(2) | RXACTIVE}, /* RGMII1_RD2 */
  39 + {OFFSET(mii1_rxd1), MODE(2) | RXACTIVE}, /* RGMII1_RD1 */
  40 + {OFFSET(mii1_rxd0), MODE(2) | RXACTIVE}, /* RGMII1_RD0 */
  41 + {-1},
  42 +};
  43 +
  44 +/* LAN2 */
  45 +static struct module_pin_mux rgmii2_pin_mux[] = {
  46 + {OFFSET(gpmc_a0), MODE(2)}, /* RGMII2_TCTL */
  47 + {OFFSET(gpmc_a1), MODE(2) | RXACTIVE}, /* RGMII2_RCTL */
  48 + {OFFSET(gpmc_a2), MODE(2)}, /* RGMII2_TD3 */
  49 + {OFFSET(gpmc_a3), MODE(2)}, /* RGMII2_TD2 */
  50 + {OFFSET(gpmc_a4), MODE(2)}, /* RGMII2_TD1 */
  51 + {OFFSET(gpmc_a5), MODE(2)}, /* RGMII2_TD0 */
  52 + {OFFSET(gpmc_a6), MODE(2)}, /* RGMII2_TCLK */
  53 + {OFFSET(gpmc_a7), MODE(2) | RXACTIVE}, /* RGMII2_RCLK */
  54 + {OFFSET(gpmc_a8), MODE(2) | RXACTIVE}, /* RGMII2_RD3 */
  55 + {OFFSET(gpmc_a9), MODE(2) | RXACTIVE}, /* RGMII2_RD2 */
  56 + {OFFSET(gpmc_a10), MODE(2) | RXACTIVE}, /* RGMII2_RD1 */
  57 + {OFFSET(gpmc_a11), MODE(2) | RXACTIVE}, /* RGMII2_RD0 */
  58 + {-1},
  59 +};
  60 +
  61 +static struct module_pin_mux mdio_pin_mux[] = {
  62 + {OFFSET(mdio_data), MODE(0) | RXACTIVE | PULLUP_EN}, /* MDIO_DATA */
  63 + {OFFSET(mdio_clk), MODE(0) | PULLUP_EN}, /* MDIO_CLK */
  64 + {-1},
  65 +};
  66 +
  67 +/* SER0 */
  68 +static struct module_pin_mux uart0_pin_mux[] = {
  69 + {OFFSET(uart0_rxd), (MODE(0) | PULLUP_EN | RXACTIVE | SLEWCTRL)},
  70 + {OFFSET(uart0_txd), (MODE(0) | PULLUDDIS | PULLUP_EN | SLEWCTRL)},
  71 + {OFFSET(uart0_ctsn), (MODE(0) | PULLUP_EN | RXACTIVE | SLEWCTRL)},
  72 + {OFFSET(uart0_rtsn), (MODE(0) | PULLUDDIS | PULLUP_EN | SLEWCTRL)},
  73 + {-1},
  74 +};
  75 +
  76 +/* SER2 */
  77 +static struct module_pin_mux uart2_pin_mux[] = {
  78 + {OFFSET(cam1_data4), (MODE(2) | PULLUP_EN | RXACTIVE | SLEWCTRL)},
  79 + {OFFSET(cam1_data5), (MODE(2) | PULLUDDIS | PULLUP_EN | SLEWCTRL)},
  80 + {OFFSET(cam1_data6), (MODE(2) | PULLUP_EN | RXACTIVE | SLEWCTRL)},
  81 + {OFFSET(cam1_data7), (MODE(2) | PULLUDDIS | PULLUP_EN | SLEWCTRL)},
  82 + {-1},
  83 +};
  84 +
  85 +/* SER1 */
  86 +static struct module_pin_mux uart3_pin_mux[] = {
  87 + {OFFSET(uart3_rxd), (MODE(0) | PULLUP_EN | RXACTIVE | SLEWCTRL)},
  88 + {OFFSET(uart3_txd), (MODE(0) | PULLUDDIS | PULLUP_EN | SLEWCTRL)},
  89 + {-1},
  90 +};
  91 +
  92 +/* SER3 */
  93 +static struct module_pin_mux uart4_pin_mux[] = {
  94 + {OFFSET(gpmc_wait0), (MODE(6) | PULLUP_EN | RXACTIVE | SLEWCTRL)},
  95 + {OFFSET(gpmc_wpn), (MODE(6) | PULLUDDIS | PULLUP_EN | SLEWCTRL)},
  96 + {-1},
  97 +};
  98 +
  99 +/* SD */
  100 +static struct module_pin_mux mmc0_pin_mux[] = {
  101 + {OFFSET(mmc0_clk), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* MMC0_CLK */
  102 + {OFFSET(mmc0_cmd), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* MMC0_CMD */
  103 + {OFFSET(mmc0_dat0), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* MMC0_DAT0 */
  104 + {OFFSET(mmc0_dat1), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* MMC0_DAT1 */
  105 + {OFFSET(mmc0_dat2), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* MMC0_DAT2 */
  106 + {OFFSET(mmc0_dat3), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* MMC0_DAT3 */
  107 + {OFFSET(rmii1_refclk), MODE(5) | PULLUP_EN}, /* SDIO_PWREN */
  108 + {-1},
  109 +};
  110 +
  111 +/* EMMC */
  112 +static struct module_pin_mux mmc1_pin_mux[] = {
  113 + {OFFSET(gpmc_csn1), (MODE(2) | PULLUDDIS | RXACTIVE)}, /* MMC1_CLK */
  114 + {OFFSET(gpmc_csn2), (MODE(2) | PULLUP_EN | RXACTIVE)}, /* MMC1_CMD */
  115 + {OFFSET(gpmc_ad0), (MODE(1) | PULLUP_EN | RXACTIVE)}, /* MMC1_DAT0 */
  116 + {OFFSET(gpmc_ad1), (MODE(1) | PULLUP_EN | RXACTIVE)}, /* MMC1_DAT1 */
  117 + {OFFSET(gpmc_ad2), (MODE(1) | PULLUP_EN | RXACTIVE)}, /* MMC1_DAT2 */
  118 + {OFFSET(gpmc_ad3), (MODE(1) | PULLUP_EN | RXACTIVE)}, /* MMC1_DAT3 */
  119 + {OFFSET(gpmc_ad4), (MODE(1) | PULLUP_EN | RXACTIVE)}, /* MMC1_DAT4 */
  120 + {OFFSET(gpmc_ad5), (MODE(1) | PULLUP_EN | RXACTIVE)}, /* MMC1_DAT5 */
  121 + {OFFSET(gpmc_ad6), (MODE(1) | PULLUP_EN | RXACTIVE)}, /* MMC1_DAT6 */
  122 + {OFFSET(gpmc_ad7), (MODE(1) | PULLUP_EN | RXACTIVE)}, /* MMC1_DAT7 */
  123 + {-1},
  124 +};
  125 +
  126 +/* SDMMC */
  127 +static struct module_pin_mux mmc2_pin_mux[] = {
  128 + {OFFSET(gpmc_clk), (MODE(3) | PULLUDDIS | RXACTIVE)}, /* MMC2_CLK */
  129 + {OFFSET(gpmc_csn3), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* MMC2_CMD */
  130 + {OFFSET(gpmc_ad12), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* MMC2_DAT0 */
  131 + {OFFSET(gpmc_ad13), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* MMC2_DAT1 */
  132 + {OFFSET(gpmc_ad14), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* MMC2_DAT2 */
  133 + {OFFSET(gpmc_ad15), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* MMC2_DAT3 */
  134 + {OFFSET(gpmc_ad8), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* MMC2_DAT4 */
  135 + {OFFSET(gpmc_ad9), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* MMC2_DAT5 */
  136 + {OFFSET(gpmc_ad10), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* MMC2_DAT6 */
  137 + {OFFSET(gpmc_ad11), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* MMC2_DAT7 */
  138 + {-1},
  139 +};
  140 +
  141 +/* I2C_GP */
  142 +static struct module_pin_mux i2c0_pin_mux[] = {
  143 + {OFFSET(i2c0_sda), (MODE(0) | PULLUP_EN | RXACTIVE | SLEWCTRL)},
  144 + {OFFSET(i2c0_scl), (MODE(0) | PULLUP_EN | RXACTIVE | SLEWCTRL)},
  145 + {-1},
  146 +};
  147 +
  148 +/* I2C_PM */
  149 +static struct module_pin_mux i2c1_pin_mux[] = {
  150 + {OFFSET(mii1_crs), (MODE(3) | PULLUP_EN | RXACTIVE | SLEWCTRL)},
  151 + {OFFSET(mii1_rxerr), (MODE(3) | PULLUP_EN | RXACTIVE | SLEWCTRL)},
  152 + {-1},
  153 +};
  154 +
  155 +/* I2C_LCD */
  156 +static struct module_pin_mux i2c2_pin_mux[] = {
  157 + {OFFSET(cam1_data0), (MODE(3) | PULLUP_EN | RXACTIVE | SLEWCTRL)},
  158 + {OFFSET(cam1_data1), (MODE(3) | PULLUP_EN | RXACTIVE | SLEWCTRL)},
  159 + {-1},
  160 +};
  161 +
  162 +/* GPIO */
  163 +static struct module_pin_mux smarc_gpio_pin_mux[] = {
  164 + {OFFSET(mii1_col), (MODE(9) | PULLUP_EN | RXACTIVE)}, /* USB0_OC#, mii1_col.gpio0_0*/
  165 + {OFFSET(gpmc_be1n), (MODE(7) | PULLUP_EN | RXACTIVE)}, /* USB1_OC#, gmpc_be1n.gpio1.28 */
  166 + {OFFSET(rmii1_refclk), (MODE(7) | PULLUP_EN)}, /* SDIO_PWREN, rmii1_refclk.gpio0.29 */
  167 +/* By SMARC Spec. GPIO0-5 is recommended for use as outputs. */
  168 + {OFFSET(spi2_cs0), (MODE(9) | PULLUP_EN)}, /* GPIO0, spi2_cs0.gpio0_23 */
  169 + {OFFSET(spi2_d0), (MODE(9) | PULLUP_EN)}, /* GPIO1, spi2_d0_gpio0_20 */
  170 + {OFFSET(spi2_d1), (MODE(9) | PULLUP_EN)}, /* GPIO2, spi2_d1.gpio0_21 */
  171 + {OFFSET(spi2_sclk), (MODE(9) | PULLUP_EN)}, /* GPIO3, spi2_sclk.gpio0_22*/
  172 + {OFFSET(cam0_data5), (MODE(7) | PULLUP_EN)}, /* GPIO4, cam0_data5.gpio4_7 */
  173 + {OFFSET(cam0_data7), (MODE(7) | PULLUP_EN)}, /* GPIO5, cam0_data7.gpio4_29 */
  174 +
  175 +/* By SMARC Spec. GPIO6-11 is recommended for use of inputs */
  176 + {OFFSET(mcasp0_ahclkr), (MODE(7) | RXACTIVE)}, /* GPIO6, mcasp0.ahclkr.gpio3_7 */
  177 + {OFFSET(mcasp0_axr0), (MODE(7) | PULLUP_EN | RXACTIVE)}, /* GPIO7, mcasp0.axr0.gpio3_6 */
  178 + {OFFSET(cam0_data2), (MODE(7) | PULLUP_EN | RXACTIVE)}, /* GPIO8, cam0_data2.gpio4_24 */
  179 + {OFFSET(cam0_data3), (MODE(7) | PULLUP_EN | RXACTIVE)}, /* GPIO9, cam0_data3.gpio4_25 */
  180 + {OFFSET(cam0_data4), (MODE(7) | PULLUP_EN | RXACTIVE)}, /* GPIO10, cam0_data4_gpio4_26 */
  181 + {OFFSET(cam0_data6), (MODE(7) | PULLUP_EN | RXACTIVE)}, /* GPIO11, cam0_data6_gpio4_28 */
  182 + {-1},
  183 +};
  184 +
  185 +/* DSS LCD */
  186 +static struct module_pin_mux dss_pin_mux[] = {
  187 + {OFFSET(lcd_data0), (MODE(0) | PULLUDDIS)},
  188 + {OFFSET(lcd_data1), (MODE(0) | PULLUDDIS)},
  189 + {OFFSET(lcd_data2), (MODE(0) | PULLUDDIS)},
  190 + {OFFSET(lcd_data3), (MODE(0) | PULLUDDIS)},
  191 + {OFFSET(lcd_data4), (MODE(0) | PULLUDDIS)},
  192 + {OFFSET(lcd_data5), (MODE(0) | PULLUDDIS)},
  193 + {OFFSET(lcd_data6), (MODE(0) | PULLUDDIS)},
  194 + {OFFSET(lcd_data7), (MODE(0) | PULLUDDIS)},
  195 + {OFFSET(lcd_data8), (MODE(0) | PULLUDDIS)},
  196 + {OFFSET(lcd_data9), (MODE(0) | PULLUDDIS)},
  197 + {OFFSET(lcd_data10), (MODE(0) | PULLUDDIS)},
  198 + {OFFSET(lcd_data11), (MODE(0) | PULLUDDIS)},
  199 + {OFFSET(lcd_data12), (MODE(0) | PULLUDDIS)},
  200 + {OFFSET(lcd_data13), (MODE(0) | PULLUDDIS)},
  201 + {OFFSET(lcd_data14), (MODE(0) | PULLUDDIS)},
  202 + {OFFSET(lcd_data15), (MODE(0) | PULLUDDIS)},
  203 + /* DSS DATA16~23 */
  204 + {OFFSET(cam1_data9), (MODE(2) | PULLUDDIS)},
  205 + {OFFSET(cam0_data9), (MODE(2) | PULLUDDIS)},
  206 + {OFFSET(cam0_data8), (MODE(2) | PULLUDDIS)},
  207 + {OFFSET(cam0_pclk), (MODE(2) | PULLUDDIS)},
  208 + {OFFSET(cam0_wen), (MODE(2) | PULLUDDIS)},
  209 + {OFFSET(cam0_field), (MODE(2) | PULLUDDIS)},
  210 + {OFFSET(cam0_vd), (MODE(2) | PULLUDDIS)},
  211 + {OFFSET(cam0_hd), (MODE(2) | PULLUDDIS)},
  212 + {OFFSET(lcd_vsync), (MODE(0) | PULLUDEN)},
  213 + {OFFSET(lcd_hsync), (MODE(0) | PULLUDEN)},
  214 + {OFFSET(lcd_pclk), (MODE(0) | PULLUDEN)},
  215 + {OFFSET(lcd_ac_bias_en), (MODE(0) | PULLUDEN)},
  216 + {-1},
  217 + };
  218 +
  219 +static struct module_pin_mux gpio5_7_pin_mux[] = {
  220 + {OFFSET(spi0_cs0), (MODE(7) | PULLUP_EN)}, /* GPIO5_7 */
  221 + {-1},
  222 +};
  223 +
  224 +#ifdef CONFIG_NAND
  225 +static struct module_pin_mux nand_pin_mux[] = {
  226 + {OFFSET(gpmc_ad0), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD0 */
  227 + {OFFSET(gpmc_ad1), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD1 */
  228 + {OFFSET(gpmc_ad2), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD2 */
  229 + {OFFSET(gpmc_ad3), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD3 */
  230 + {OFFSET(gpmc_ad4), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD4 */
  231 + {OFFSET(gpmc_ad5), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD5 */
  232 + {OFFSET(gpmc_ad6), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD6 */
  233 + {OFFSET(gpmc_ad7), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD7 */
  234 +#ifdef CONFIG_SYS_NAND_BUSWIDTH_16BIT
  235 + {OFFSET(gpmc_ad8), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD8 */
  236 + {OFFSET(gpmc_ad9), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD9 */
  237 + {OFFSET(gpmc_ad10), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD10 */
  238 + {OFFSET(gpmc_ad11), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD11 */
  239 + {OFFSET(gpmc_ad12), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD12 */
  240 + {OFFSET(gpmc_ad13), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD13 */
  241 + {OFFSET(gpmc_ad14), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD14 */
  242 + {OFFSET(gpmc_ad15), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD15 */
  243 +#endif
  244 + {OFFSET(gpmc_wait0), (MODE(0) | RXACTIVE | PULLUP_EN)}, /* Wait */
  245 + {OFFSET(gpmc_wpn), (MODE(7) | PULLUP_EN)}, /* Write Protect */
  246 + {OFFSET(gpmc_csn0), (MODE(0) | PULLUP_EN)}, /* Chip-Select */
  247 + {OFFSET(gpmc_wen), (MODE(0) | PULLDOWN_EN)}, /* Write Enable */
  248 + {OFFSET(gpmc_oen_ren), (MODE(0) | PULLDOWN_EN)}, /* Read Enable */
  249 + {OFFSET(gpmc_advn_ale), (MODE(0) | PULLDOWN_EN)}, /* Addr Latch Enable*/
  250 + {OFFSET(gpmc_be0n_cle), (MODE(0) | PULLDOWN_EN)}, /* Byte Enable */
  251 + {-1},
  252 +};
  253 +#endif
  254 +
  255 +static __maybe_unused struct module_pin_mux qspi_pin_mux[] = {
  256 + {OFFSET(gpmc_csn0), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* QSPI_CS0 */
  257 + {OFFSET(gpmc_csn3), (MODE(2) | PULLUP_EN | RXACTIVE)}, /* QSPI_CLK */
  258 + {OFFSET(gpmc_advn_ale), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* QSPI_D0 */
  259 + {OFFSET(gpmc_oen_ren), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* QSPI_D1 */
  260 + {OFFSET(gpmc_wen), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* QSPI_D2 */
  261 + {OFFSET(gpmc_be0n_cle), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* QSPI_D3 */
  262 + {-1},
  263 +};
  264 +
  265 +/* SPI BOOT */
  266 +static struct module_pin_mux spi0_pin_mux[] = {
  267 + {OFFSET(spi0_d0), (MODE(0) | RXACTIVE | PULLUDEN)},
  268 + {OFFSET(spi0_d1), (MODE(0) | PULLUDEN)},
  269 + {OFFSET(spi0_cs0), (MODE(0) | PULLUDEN)},
  270 + {OFFSET(spi0_sclk), (MODE(0) | RXACTIVE | PULLUDEN)},
  271 + {-1},
  272 +};
  273 +
  274 +/* SPI0 */
  275 +static struct module_pin_mux spi2_pin_mux[] = {
  276 + {OFFSET(cam1_hd), (MODE(4) | PULLUP_EN | RXACTIVE)}, /* SPI0_CS0 */
  277 + {OFFSET(cam1_field), (MODE(4) | PULLUP_EN | RXACTIVE)}, /* SPI0_CS1 */
  278 + {OFFSET(cam1_pclk), (MODE(4) | PULLUP_EN | RXACTIVE)}, /* SPI0_CLK */
  279 + {OFFSET(cam1_data8), (MODE(4) | PULLUP_EN | RXACTIVE)}, /* SPI0_D0 */
  280 + {OFFSET(cam1_wen), (MODE(4) | PULLUP_EN | RXACTIVE)}, /* SPI0_D1 */
  281 + {-1},
  282 +};
  283 +
  284 +/* SPI1 */
  285 +static struct module_pin_mux spi4_pin_mux[] = {
  286 + {OFFSET(spi4_cs0), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* SPI0_CS0 */
  287 + {OFFSET(uart3_ctsn), (MODE(2) | PULLUP_EN | RXACTIVE)}, /* SPI0_CS1 */
  288 + {OFFSET(spi4_sclk), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* SPI0_CLK */
  289 + {OFFSET(spi4_d0), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* SPI0_D0 */
  290 + {OFFSET(spi4_d1), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* SPI0_D1 */
  291 + {-1},
  292 +};
  293 +
  294 +/* BOOT_SEL */
  295 +static struct module_pin_mux boot_sel_pin_mux[] = {
  296 + {OFFSET(gpio5_8), (MODE(7) | PULLUP_EN | RXACTIVE)}, /* BOOT_SEL0, mii1_col.gpio0_0*/
  297 + {OFFSET(gpio5_9), (MODE(7) | PULLUP_EN | RXACTIVE)}, /* BOOT_SEL1, gmpc_be1n.gpio1.28 */
  298 + {OFFSET(gpio5_10), (MODE(7) | PULLUP_EN | RXACTIVE)}, /* BOOT_SEL2, spi2_cs0.gpio0_23 */
  299 + {-1},
  300 +};
  301 +
  302 +void enable_uart0_pin_mux(void)
  303 +{
  304 + configure_module_pin_mux(uart0_pin_mux);
  305 +}
  306 +
  307 +void enable_uart2_pin_mux(void)
  308 +{
  309 + configure_module_pin_mux(uart2_pin_mux);
  310 +}
  311 +
  312 +void enable_uart3_pin_mux(void)
  313 +{
  314 + configure_module_pin_mux(uart3_pin_mux);
  315 +}
  316 +
  317 +void enable_uart4_pin_mux(void)
  318 +{
  319 + configure_module_pin_mux(uart4_pin_mux);
  320 +}
  321 +
  322 +void enable_board_pin_mux(void)
  323 +{
  324 + configure_module_pin_mux(i2c1_pin_mux);
  325 + configure_module_pin_mux(spi0_pin_mux);
  326 + configure_module_pin_mux(mmc0_pin_mux);
  327 + if (board_is_gpevm()) {
  328 + configure_module_pin_mux(gpio5_7_pin_mux);
  329 + configure_module_pin_mux(rgmii1_pin_mux);
  330 +#if defined(CONFIG_NAND)
  331 + configure_module_pin_mux(nand_pin_mux);
  332 +#endif
  333 + } else if (board_is_sk() || board_is_idk()) {
  334 + configure_module_pin_mux(rgmii1_pin_mux);
  335 +#if defined(CONFIG_NAND)
  336 + printf("Error: NAND flash not present on this board\n");
  337 +#endif
  338 + configure_module_pin_mux(qspi_pin_mux);
  339 + } else if (board_is_smarc_t437x_800() || board_is_smarc_t437x_01g()) {
  340 + configure_module_pin_mux(mmc1_pin_mux);
  341 + configure_module_pin_mux(i2c0_pin_mux);
  342 + configure_module_pin_mux(mdio_pin_mux);
  343 + configure_module_pin_mux(spi2_pin_mux);
  344 + configure_module_pin_mux(spi4_pin_mux);
  345 + configure_module_pin_mux(rgmii1_pin_mux);
  346 + configure_module_pin_mux(rgmii2_pin_mux);
  347 + configure_module_pin_mux(mmc2_pin_mux);
  348 + configure_module_pin_mux(i2c2_pin_mux);
  349 + configure_module_pin_mux(smarc_gpio_pin_mux);
  350 + configure_module_pin_mux(dss_pin_mux);
  351 + configure_module_pin_mux(boot_sel_pin_mux);
  352 + } else if (board_is_eposevm()) {
  353 + configure_module_pin_mux(rmii1_pin_mux);
  354 +#if defined(CONFIG_NAND)
  355 + configure_module_pin_mux(nand_pin_mux);
  356 +#else
  357 + configure_module_pin_mux(qspi_pin_mux);
  358 +#endif
  359 + }
  360 +}
  361 +
  362 +void enable_i2c1_pin_mux(void)
  363 +{
  364 + configure_module_pin_mux(i2c1_pin_mux);
  365 +}
configs/smarct437x_evm_defconfig
  1 +CONFIG_ARM=y
  2 +CONFIG_AM43XX=y
  3 +CONFIG_TARGET_SMARCT437X_EVM=y
  4 +CONFIG_SYS_PROMPT="U-Boot# "
  5 +CONFIG_DM_SERIAL=y
  6 +CONFIG_DM_GPIO=y
  7 +CONFIG_SPL_STACK_R_ADDR=0x82000000
  8 +CONFIG_DEFAULT_DEVICE_TREE="am437x-smarct437x"
  9 +CONFIG_SPL=y
  10 +CONFIG_SPL_STACK_R=y
  11 +CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=1,EMMC_BOOT"
  12 +CONFIG_HUSH_PARSER=y
  13 +CONFIG_CMD_BOOTZ=y
  14 +# CONFIG_CMD_IMLS is not set
  15 +CONFIG_CMD_ASKENV=y
  16 +# CONFIG_CMD_FLASH is not set
  17 +CONFIG_CMD_MMC=y
  18 +CONFIG_CMD_SF=y
  19 +CONFIG_CMD_SPI=y
  20 +CONFIG_CMD_I2C=y
  21 +CONFIG_CMD_USB=y
  22 +CONFIG_CMD_DFU=y
  23 +CONFIG_CMD_GPIO=y
  24 +# CONFIG_CMD_SETEXPR is not set
  25 +CONFIG_OF_CONTROL=y
  26 +CONFIG_DM=y
  27 +CONFIG_DMA=y
  28 +CONFIG_CMD_DHCP=y
  29 +CONFIG_CMD_MII=y
  30 +CONFIG_CMD_PING=y
  31 +CONFIG_CMD_EXT2=y
  32 +CONFIG_CMD_EXT4=y
  33 +CONFIG_CMD_EXT4_WRITE=y
  34 +CONFIG_CMD_FAT=y
  35 +CONFIG_CMD_FS_GENERIC=y
  36 +CONFIG_SPI_FLASH=y
  37 +CONFIG_SPI_FLASH_BAR=y
  38 +CONFIG_SPI_FLASH_MACRONIX=y
  39 +CONFIG_SYS_NS16550=y
  40 +CONFIG_TIMER=y
  41 +CONFIG_OMAP_TIMER=y
  42 +CONFIG_USB=y
  43 +CONFIG_USB_DWC3=y
  44 +CONFIG_USB_DWC3_GADGET=y
  45 +CONFIG_USB_DWC3_OMAP=y
  46 +CONFIG_USB_DWC3_PHY_OMAP=y
  47 +CONFIG_USB_GADGET=y
  48 +CONFIG_SPL_OF_LIBFDT=y
  49 +CONFIG_SPL_LOAD_FIT=y
  50 +CONFIG_OF_LIST="am437x-smarct437x"
  51 +CONFIG_USB_GADGET_DOWNLOAD=y
  52 +CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
  53 +CONFIG_G_DNL_VENDOR_NUM=0x0403
  54 +CONFIG_G_DNL_PRODUCT_NUM=0xbd00
  55 +CONFIG_CMD_TIME=y
configs/smarct437x_evm_spi_defconfig
  1 +CONFIG_ARM=y
  2 +CONFIG_AM43XX=y
  3 +CONFIG_TARGET_SMARCT437X_EVM=y
  4 +CONFIG_SYS_PROMPT="U-Boot# "
  5 +CONFIG_DM_SERIAL=y
  6 +CONFIG_DM_GPIO=y
  7 +CONFIG_SPL_STACK_R_ADDR=0x82000000
  8 +CONFIG_DEFAULT_DEVICE_TREE="am437x-smarct437x"
  9 +CONFIG_SPL=y
  10 +CONFIG_SPL_STACK_R=y
  11 +CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=1,SPI_BOOT"
  12 +CONFIG_HUSH_PARSER=y
  13 +CONFIG_CMD_BOOTZ=y
  14 +# CONFIG_CMD_IMLS is not set
  15 +CONFIG_CMD_ASKENV=y
  16 +# CONFIG_CMD_FLASH is not set
  17 +CONFIG_CMD_MMC=y
  18 +CONFIG_CMD_SF=y
  19 +CONFIG_CMD_SPI=y
  20 +CONFIG_CMD_I2C=y
  21 +CONFIG_CMD_USB=y
  22 +CONFIG_CMD_DFU=y
  23 +CONFIG_CMD_GPIO=y
  24 +# CONFIG_CMD_SETEXPR is not set
  25 +CONFIG_OF_CONTROL=y
  26 +CONFIG_DM=y
  27 +CONFIG_CMD_DHCP=y
  28 +CONFIG_CMD_MII=y
  29 +CONFIG_CMD_PING=y
  30 +CONFIG_CMD_EXT2=y
  31 +CONFIG_CMD_EXT4=y
  32 +CONFIG_CMD_EXT4_WRITE=y
  33 +CONFIG_CMD_FAT=y
  34 +CONFIG_CMD_FS_GENERIC=y
  35 +CONFIG_SPI_FLASH=y
  36 +CONFIG_SPI_FLASH_BAR=y
  37 +CONFIG_SPI_FLASH_MACRONIX=y
  38 +CONFIG_SYS_NS16550=y
  39 +CONFIG_TIMER=y
  40 +CONFIG_OMAP_TIMER=y
  41 +CONFIG_USB=y
  42 +CONFIG_USB_DWC3=y
  43 +CONFIG_USB_DWC3_GADGET=y
  44 +CONFIG_USB_DWC3_OMAP=y
  45 +CONFIG_USB_DWC3_PHY_OMAP=y
  46 +CONFIG_USB_GADGET=y
  47 +CONFIG_FIT=y
  48 +CONFIG_SPL_OF_LIBFDT=y
  49 +CONFIG_SPL_LOAD_FIT=y
  50 +CONFIG_OF_LIST="am437x-smarct437x"
  51 +CONFIG_USB_GADGET_DOWNLOAD=y
  52 +CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
  53 +CONFIG_G_DNL_VENDOR_NUM=0x0403
  54 +CONFIG_G_DNL_PRODUCT_NUM=0xbd00
  55 +CONFIG_CMD_TIME=y
configs/smarct437x_evm_spi_uart1_defconfig
  1 +CONFIG_ARM=y
  2 +CONFIG_AM43XX=y
  3 +CONFIG_TARGET_SMARCT437X_EVM=y
  4 +CONFIG_SYS_PROMPT="U-Boot# "
  5 +CONFIG_DM_SERIAL=y
  6 +CONFIG_DM_GPIO=y
  7 +CONFIG_SPL_STACK_R_ADDR=0x82000000
  8 +CONFIG_DEFAULT_DEVICE_TREE="am437x-smarct437x"
  9 +CONFIG_SPL=y
  10 +CONFIG_SPL_STACK_R=y
  11 +CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=4,SPI_BOOT"
  12 +CONFIG_HUSH_PARSER=y
  13 +CONFIG_CMD_BOOTZ=y
  14 +# CONFIG_CMD_IMLS is not set
  15 +CONFIG_CMD_ASKENV=y
  16 +# CONFIG_CMD_FLASH is not set
  17 +CONFIG_CMD_MMC=y
  18 +CONFIG_CMD_SF=y
  19 +CONFIG_CMD_SPI=y
  20 +CONFIG_CMD_I2C=y
  21 +CONFIG_CMD_USB=y
  22 +CONFIG_CMD_DFU=y
  23 +CONFIG_CMD_GPIO=y
  24 +# CONFIG_CMD_SETEXPR is not set
  25 +CONFIG_OF_CONTROL=y
  26 +CONFIG_DM=y
  27 +CONFIG_CMD_DHCP=y
  28 +CONFIG_CMD_MII=y
  29 +CONFIG_CMD_PING=y
  30 +CONFIG_CMD_EXT2=y
  31 +CONFIG_CMD_EXT4=y
  32 +CONFIG_CMD_EXT4_WRITE=y
  33 +CONFIG_CMD_FAT=y
  34 +CONFIG_CMD_FS_GENERIC=y
  35 +CONFIG_SPI_FLASH=y
  36 +CONFIG_SPI_FLASH_BAR=y
  37 +CONFIG_SPI_FLASH_MACRONIX=y
  38 +CONFIG_SYS_NS16550=y
  39 +CONFIG_TIMER=y
  40 +CONFIG_OMAP_TIMER=y
  41 +CONFIG_USB=y
  42 +CONFIG_USB_DWC3=y
  43 +CONFIG_USB_DWC3_GADGET=y
  44 +CONFIG_USB_DWC3_OMAP=y
  45 +CONFIG_USB_DWC3_PHY_OMAP=y
  46 +CONFIG_USB_GADGET=y
  47 +CONFIG_FIT=y
  48 +CONFIG_SPL_OF_LIBFDT=y
  49 +CONFIG_SPL_LOAD_FIT=y
  50 +CONFIG_OF_LIST="am437x-smarct437x"
  51 +CONFIG_USB_GADGET_DOWNLOAD=y
  52 +CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
  53 +CONFIG_G_DNL_VENDOR_NUM=0x0403
  54 +CONFIG_G_DNL_PRODUCT_NUM=0xbd00
  55 +CONFIG_CMD_TIME=y
configs/smarct437x_evm_spi_uart2_defconfig
  1 +CONFIG_ARM=y
  2 +CONFIG_AM43XX=y
  3 +CONFIG_TARGET_SMARCT437X_EVM=y
  4 +CONFIG_SYS_PROMPT="U-Boot# "
  5 +CONFIG_DM_SERIAL=y
  6 +CONFIG_DM_GPIO=y
  7 +CONFIG_SPL_STACK_R_ADDR=0x82000000
  8 +CONFIG_DEFAULT_DEVICE_TREE="am437x-smarct437x"
  9 +CONFIG_SPL=y
  10 +CONFIG_SPL_STACK_R=y
  11 +CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=3,SPI_BOOT"
  12 +CONFIG_HUSH_PARSER=y
  13 +CONFIG_CMD_BOOTZ=y
  14 +# CONFIG_CMD_IMLS is not set
  15 +CONFIG_CMD_ASKENV=y
  16 +# CONFIG_CMD_FLASH is not set
  17 +CONFIG_CMD_MMC=y
  18 +CONFIG_CMD_SF=y
  19 +CONFIG_CMD_SPI=y
  20 +CONFIG_CMD_I2C=y
  21 +CONFIG_CMD_USB=y
  22 +CONFIG_CMD_DFU=y
  23 +CONFIG_CMD_GPIO=y
  24 +# CONFIG_CMD_SETEXPR is not set
  25 +CONFIG_OF_CONTROL=y
  26 +CONFIG_DM=y
  27 +CONFIG_CMD_DHCP=y
  28 +CONFIG_CMD_MII=y
  29 +CONFIG_CMD_PING=y
  30 +CONFIG_CMD_EXT2=y
  31 +CONFIG_CMD_EXT4=y
  32 +CONFIG_CMD_EXT4_WRITE=y
  33 +CONFIG_CMD_FAT=y
  34 +CONFIG_CMD_FS_GENERIC=y
  35 +CONFIG_SPI_FLASH=y
  36 +CONFIG_SPI_FLASH_BAR=y
  37 +CONFIG_SPI_FLASH_MACRONIX=y
  38 +CONFIG_SYS_NS16550=y
  39 +CONFIG_TIMER=y
  40 +CONFIG_OMAP_TIMER=y
  41 +CONFIG_USB=y
  42 +CONFIG_USB_DWC3=y
  43 +CONFIG_USB_DWC3_GADGET=y
  44 +CONFIG_USB_DWC3_OMAP=y
  45 +CONFIG_USB_DWC3_PHY_OMAP=y
  46 +CONFIG_USB_GADGET=y
  47 +CONFIG_FIT=y
  48 +CONFIG_SPL_OF_LIBFDT=y
  49 +CONFIG_SPL_LOAD_FIT=y
  50 +CONFIG_OF_LIST="am437x-smarct437x"
  51 +CONFIG_USB_GADGET_DOWNLOAD=y
  52 +CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
  53 +CONFIG_G_DNL_VENDOR_NUM=0x0403
  54 +CONFIG_G_DNL_PRODUCT_NUM=0xbd00
  55 +CONFIG_CMD_TIME=y
configs/smarct437x_evm_spi_uart3_defconfig
  1 +CONFIG_ARM=y
  2 +CONFIG_AM43XX=y
  3 +CONFIG_TARGET_SMARCT437X_EVM=y
  4 +CONFIG_SYS_PROMPT="U-Boot# "
  5 +CONFIG_DM_SERIAL=y
  6 +CONFIG_DM_GPIO=y
  7 +CONFIG_SPL_STACK_R_ADDR=0x82000000
  8 +CONFIG_DEFAULT_DEVICE_TREE="am437x-smarct437x"
  9 +CONFIG_SPL=y
  10 +CONFIG_SPL_STACK_R=y
  11 +CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5,SPI_BOOT"
  12 +CONFIG_HUSH_PARSER=y
  13 +CONFIG_CMD_BOOTZ=y
  14 +# CONFIG_CMD_IMLS is not set
  15 +CONFIG_CMD_ASKENV=y
  16 +# CONFIG_CMD_FLASH is not set
  17 +CONFIG_CMD_MMC=y
  18 +CONFIG_CMD_SF=y
  19 +CONFIG_CMD_SPI=y
  20 +CONFIG_CMD_I2C=y
  21 +CONFIG_CMD_USB=y
  22 +CONFIG_CMD_DFU=y
  23 +CONFIG_CMD_GPIO=y
  24 +# CONFIG_CMD_SETEXPR is not set
  25 +CONFIG_OF_CONTROL=y
  26 +CONFIG_DM=y
  27 +CONFIG_CMD_DHCP=y
  28 +CONFIG_CMD_MII=y
  29 +CONFIG_CMD_PING=y
  30 +CONFIG_CMD_EXT2=y
  31 +CONFIG_CMD_EXT4=y
  32 +CONFIG_CMD_EXT4_WRITE=y
  33 +CONFIG_CMD_FAT=y
  34 +CONFIG_CMD_FS_GENERIC=y
  35 +CONFIG_SPI_FLASH=y
  36 +CONFIG_SPI_FLASH_BAR=y
  37 +CONFIG_SPI_FLASH_MACRONIX=y
  38 +CONFIG_SYS_NS16550=y
  39 +CONFIG_TIMER=y
  40 +CONFIG_OMAP_TIMER=y
  41 +CONFIG_USB=y
  42 +CONFIG_USB_DWC3=y
  43 +CONFIG_USB_DWC3_GADGET=y
  44 +CONFIG_USB_DWC3_OMAP=y
  45 +CONFIG_USB_DWC3_PHY_OMAP=y
  46 +CONFIG_USB_GADGET=y
  47 +CONFIG_FIT=y
  48 +CONFIG_SPL_OF_LIBFDT=y
  49 +CONFIG_SPL_LOAD_FIT=y
  50 +CONFIG_OF_LIST="am437x-smarct437x"
  51 +CONFIG_USB_GADGET_DOWNLOAD=y
  52 +CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
  53 +CONFIG_G_DNL_VENDOR_NUM=0x0403
  54 +CONFIG_G_DNL_PRODUCT_NUM=0xbd00
  55 +CONFIG_CMD_TIME=y
configs/smarct437x_evm_uart1_defconfig
  1 +CONFIG_ARM=y
  2 +CONFIG_AM43XX=y
  3 +CONFIG_TARGET_SMARCT437X_EVM=y
  4 +CONFIG_SYS_PROMPT="U-Boot# "
  5 +CONFIG_DM_SERIAL=y
  6 +CONFIG_DM_GPIO=y
  7 +CONFIG_SPL_STACK_R_ADDR=0x82000000
  8 +CONFIG_DEFAULT_DEVICE_TREE="am437x-smarct437x"
  9 +CONFIG_SPL=y
  10 +CONFIG_SPL_STACK_R=y
  11 +CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=4,EMMC_BOOT"
  12 +CONFIG_HUSH_PARSER=y
  13 +CONFIG_CMD_BOOTZ=y
  14 +# CONFIG_CMD_IMLS is not set
  15 +CONFIG_CMD_ASKENV=y
  16 +# CONFIG_CMD_FLASH is not set
  17 +CONFIG_CMD_MMC=y
  18 +CONFIG_CMD_SF=y
  19 +CONFIG_CMD_SPI=y
  20 +CONFIG_CMD_I2C=y
  21 +CONFIG_CMD_USB=y
  22 +CONFIG_CMD_DFU=y
  23 +CONFIG_CMD_GPIO=y
  24 +# CONFIG_CMD_SETEXPR is not set
  25 +CONFIG_OF_CONTROL=y
  26 +CONFIG_DM=y
  27 +CONFIG_DMA=y
  28 +CONFIG_CMD_DHCP=y
  29 +CONFIG_CMD_MII=y
  30 +CONFIG_CMD_PING=y
  31 +CONFIG_CMD_EXT2=y
  32 +CONFIG_CMD_EXT4=y
  33 +CONFIG_CMD_EXT4_WRITE=y
  34 +CONFIG_CMD_FAT=y
  35 +CONFIG_CMD_FS_GENERIC=y
  36 +CONFIG_SPI_FLASH=y
  37 +CONFIG_SPI_FLASH_BAR=y
  38 +CONFIG_SPI_FLASH_MACRONIX=y
  39 +CONFIG_SYS_NS16550=y
  40 +CONFIG_TIMER=y
  41 +CONFIG_OMAP_TIMER=y
  42 +CONFIG_USB=y
  43 +CONFIG_USB_DWC3=y
  44 +CONFIG_USB_DWC3_GADGET=y
  45 +CONFIG_USB_DWC3_OMAP=y
  46 +CONFIG_USB_DWC3_PHY_OMAP=y
  47 +CONFIG_USB_GADGET=y
  48 +CONFIG_SPL_OF_LIBFDT=y
  49 +CONFIG_SPL_LOAD_FIT=y
  50 +CONFIG_OF_LIST="am437x-smarct437x"
  51 +CONFIG_USB_GADGET_DOWNLOAD=y
  52 +CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
  53 +CONFIG_G_DNL_VENDOR_NUM=0x0403
  54 +CONFIG_G_DNL_PRODUCT_NUM=0xbd00
  55 +CONFIG_CMD_TIME=y
configs/smarct437x_evm_uart2_defconfig
  1 +CONFIG_ARM=y
  2 +CONFIG_AM43XX=y
  3 +CONFIG_TARGET_SMARCT437X_EVM=y
  4 +CONFIG_SYS_PROMPT="U-Boot# "
  5 +CONFIG_DM_SERIAL=y
  6 +CONFIG_DM_GPIO=y
  7 +CONFIG_SPL_STACK_R_ADDR=0x82000000
  8 +CONFIG_DEFAULT_DEVICE_TREE="am437x-smarct437x"
  9 +CONFIG_SPL=y
  10 +CONFIG_SPL_STACK_R=y
  11 +CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=3,EMMC_BOOT"
  12 +CONFIG_HUSH_PARSER=y
  13 +CONFIG_CMD_BOOTZ=y
  14 +# CONFIG_CMD_IMLS is not set
  15 +CONFIG_CMD_ASKENV=y
  16 +# CONFIG_CMD_FLASH is not set
  17 +CONFIG_CMD_MMC=y
  18 +CONFIG_CMD_SF=y
  19 +CONFIG_CMD_SPI=y
  20 +CONFIG_CMD_I2C=y
  21 +CONFIG_CMD_USB=y
  22 +CONFIG_CMD_DFU=y
  23 +CONFIG_CMD_GPIO=y
  24 +# CONFIG_CMD_SETEXPR is not set
  25 +CONFIG_OF_CONTROL=y
  26 +CONFIG_DM=y
  27 +CONFIG_DMA=y
  28 +CONFIG_CMD_DHCP=y
  29 +CONFIG_CMD_MII=y
  30 +CONFIG_CMD_PING=y
  31 +CONFIG_CMD_EXT2=y
  32 +CONFIG_CMD_EXT4=y
  33 +CONFIG_CMD_EXT4_WRITE=y
  34 +CONFIG_CMD_FAT=y
  35 +CONFIG_CMD_FS_GENERIC=y
  36 +CONFIG_SPI_FLASH=y
  37 +CONFIG_SPI_FLASH_BAR=y
  38 +CONFIG_SPI_FLASH_MACRONIX=y
  39 +CONFIG_SYS_NS16550=y
  40 +CONFIG_TIMER=y
  41 +CONFIG_OMAP_TIMER=y
  42 +CONFIG_USB=y
  43 +CONFIG_USB_DWC3=y
  44 +CONFIG_USB_DWC3_GADGET=y
  45 +CONFIG_USB_DWC3_OMAP=y
  46 +CONFIG_USB_DWC3_PHY_OMAP=y
  47 +CONFIG_USB_GADGET=y
  48 +CONFIG_SPL_OF_LIBFDT=y
  49 +CONFIG_SPL_LOAD_FIT=y
  50 +CONFIG_OF_LIST="am437x-smarct437x"
  51 +CONFIG_USB_GADGET_DOWNLOAD=y
  52 +CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
  53 +CONFIG_G_DNL_VENDOR_NUM=0x0403
  54 +CONFIG_G_DNL_PRODUCT_NUM=0xbd00
  55 +CONFIG_CMD_TIME=y
configs/smarct437x_evm_uart3_defconfig
  1 +CONFIG_ARM=y
  2 +CONFIG_AM43XX=y
  3 +CONFIG_TARGET_SMARCT437X_EVM=y
  4 +CONFIG_SYS_PROMPT="U-Boot# "
  5 +CONFIG_DM_SERIAL=y
  6 +CONFIG_DM_GPIO=y
  7 +CONFIG_SPL_STACK_R_ADDR=0x82000000
  8 +CONFIG_DEFAULT_DEVICE_TREE="am437x-smarct437x"
  9 +CONFIG_SPL=y
  10 +CONFIG_SPL_STACK_R=y
  11 +CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5,EMMC_BOOT"
  12 +CONFIG_HUSH_PARSER=y
  13 +CONFIG_CMD_BOOTZ=y
  14 +# CONFIG_CMD_IMLS is not set
  15 +CONFIG_CMD_ASKENV=y
  16 +# CONFIG_CMD_FLASH is not set
  17 +CONFIG_CMD_MMC=y
  18 +CONFIG_CMD_SF=y
  19 +CONFIG_CMD_SPI=y
  20 +CONFIG_CMD_I2C=y
  21 +CONFIG_CMD_USB=y
  22 +CONFIG_CMD_DFU=y
  23 +CONFIG_CMD_GPIO=y
  24 +# CONFIG_CMD_SETEXPR is not set
  25 +CONFIG_OF_CONTROL=y
  26 +CONFIG_DM=y
  27 +CONFIG_DMA=y
  28 +CONFIG_CMD_DHCP=y
  29 +CONFIG_CMD_MII=y
  30 +CONFIG_CMD_PING=y
  31 +CONFIG_CMD_EXT2=y
  32 +CONFIG_CMD_EXT4=y
  33 +CONFIG_CMD_EXT4_WRITE=y
  34 +CONFIG_CMD_FAT=y
  35 +CONFIG_CMD_FS_GENERIC=y
  36 +CONFIG_SPI_FLASH=y
  37 +CONFIG_SPI_FLASH_BAR=y
  38 +CONFIG_SPI_FLASH_MACRONIX=y
  39 +CONFIG_SYS_NS16550=y
  40 +CONFIG_TIMER=y
  41 +CONFIG_OMAP_TIMER=y
  42 +CONFIG_USB=y
  43 +CONFIG_USB_DWC3=y
  44 +CONFIG_USB_DWC3_GADGET=y
  45 +CONFIG_USB_DWC3_OMAP=y
  46 +CONFIG_USB_DWC3_PHY_OMAP=y
  47 +CONFIG_USB_GADGET=y
  48 +CONFIG_SPL_OF_LIBFDT=y
  49 +CONFIG_SPL_LOAD_FIT=y
  50 +CONFIG_OF_LIST="am437x-smarct437x"
  51 +CONFIG_USB_GADGET_DOWNLOAD=y
  52 +CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
  53 +CONFIG_G_DNL_VENDOR_NUM=0x0403
  54 +CONFIG_G_DNL_PRODUCT_NUM=0xbd00
  55 +CONFIG_CMD_TIME=y
drivers/mmc/omap_hsmmc.c
... ... @@ -1222,7 +1222,8 @@
1222 1222 #ifdef OMAP_HSMMC3_BASE
1223 1223 case 2:
1224 1224 priv_data->base_addr = (struct hsmmc *)OMAP_HSMMC3_BASE;
1225   -#if (defined(CONFIG_DRA7XX) || defined(CONFIG_AM57XX)) && defined(CONFIG_HSMMC3_8BIT)
  1225 +#if (defined(CONFIG_DRA7XX) || defined(CONFIG_AM57XX) || \
  1226 + defined(CONFIG_AM43XX)) && defined(CONFIG_HSMMC3_8BIT)
1226 1227 /* Enable 8-bit interface for eMMC on DRA7XX */
1227 1228 host_caps_val |= MMC_MODE_8BIT;
1228 1229 #endif
drivers/mtd/spi/sf_params.c
... ... @@ -47,6 +47,7 @@
47 47 {"MX25L1605D", 0xc22015, 0x0, 64 * 1024, 32, RD_NORM, 0},
48 48 {"MX25L3205D", 0xc22016, 0x0, 64 * 1024, 64, RD_NORM, 0},
49 49 {"MX25L6405D", 0xc22017, 0x0, 64 * 1024, 128, RD_NORM, 0},
  50 + {"MX25U3235F", 0xc22536, 0x0, 64 * 1024, 64, RD_NORM, SECT_4K},
50 51 {"MX25L12805", 0xc22018, 0x0, 64 * 1024, 256, RD_FULL, WR_QPP},
51 52 {"MX25L25635F", 0xc22019, 0x0, 64 * 1024, 512, RD_FULL, WR_QPP},
52 53 {"MX25L51235F", 0xc2201a, 0x0, 64 * 1024, 1024, RD_FULL, WR_QPP},
drivers/power/power_i2c.c
... ... @@ -104,6 +104,7 @@
104 104 {
105 105 i2c_set_bus_num(p->bus);
106 106 debug("Bus: %d PMIC:%s probed!\n", p->bus, p->name);
  107 + i2c_set_bus_num(1);
107 108 if (i2c_probe(pmic_i2c_addr)) {
108 109 printf("Can't find PMIC:%s\n", p->name);
109 110 return -1;
include/config_distro_defaults.h
... ... @@ -48,7 +48,7 @@
48 48  
49 49 #define CONFIG_CMDLINE_EDITING
50 50 #define CONFIG_AUTO_COMPLETE
51   -#define CONFIG_BOOTDELAY 2
  51 +#define CONFIG_BOOTDELAY 1
52 52 #define CONFIG_SYS_LONGHELP
53 53 #define CONFIG_MENU
54 54 #define CONFIG_DOS_PARTITION
include/configs/embedian_armv7_common.h
  1 +/*
  2 + * ti_armv7_common.h
  3 + *
  4 + * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
  5 + *
  6 + * SPDX-License-Identifier: GPL-2.0+
  7 + *
  8 + * The various ARMv7 SoCs from TI all share a number of IP blocks when
  9 + * implementing a given feature. Rather than define these in every
  10 + * board or even SoC common file, we define a common file to be re-used
  11 + * in all cases. While technically true that some of these details are
  12 + * configurable at the board design, they are common throughout SoC
  13 + * reference platforms as well as custom designs and become de facto
  14 + * standards.
  15 + */
  16 +
  17 +#ifndef __CONFIG_EMBEDIAN_ARMV7_COMMON_H__
  18 +#define __CONFIG_EMBEDIAN_ARMV7_COMMON_H__
  19 +
  20 +/*
  21 + * We typically do not contain NOR flash. In the cases where we do, we
  22 + * undefine this later.
  23 + */
  24 +#define CONFIG_SYS_NO_FLASH
  25 +
  26 +/* Support both device trees and ATAGs. */
  27 +#define CONFIG_CMDLINE_TAG
  28 +#define CONFIG_SETUP_MEMORY_TAGS
  29 +#define CONFIG_INITRD_TAG
  30 +
  31 +/*
  32 + * Our DDR memory always starts at 0x80000000 and U-Boot shall have
  33 + * relocated itself to higher in memory by the time this value is used.
  34 + * However, set this to a 32MB offset to allow for easier Linux kernel
  35 + * booting as the default is often used as the kernel load address.
  36 + */
  37 +#define CONFIG_SYS_LOAD_ADDR 0x82000000
  38 +
  39 +/*
  40 + * We setup defaults based on constraints from the Linux kernel, which should
  41 + * also be safe elsewhere. We have the default load at 32MB into DDR (for
  42 + * the kernel), FDT above 128MB (the maximum location for the end of the
  43 + * kernel), and the ramdisk 512KB above that (allowing for hopefully never
  44 + * seen large trees). We say all of this must be within the first 256MB
  45 + * as that will normally be within the kernel lowmem and thus visible via
  46 + * bootm_size and we only run on platforms with 256MB or more of memory.
  47 + */
  48 +#define DEFAULT_LINUX_BOOT_ENV \
  49 + "loadaddr=0x82000000\0" \
  50 + "kernel_addr_r=0x82000000\0" \
  51 + "fdtaddr=0x88000000\0" \
  52 + "fdt_addr_r=0x88000000\0" \
  53 + "rdaddr=0x88080000\0" \
  54 + "ramdisk_addr_r=0x88080000\0" \
  55 + "scriptaddr=0x80000000\0" \
  56 + "pxefile_addr_r=0x80100000\0" \
  57 + "bootm_size=0x10000000\0"
  58 +
  59 +#define DEFAULT_MMC_TI_ARGS \
  60 + "mmcdev=0\0" \
  61 + "mmcrootfstype=ext4 rootwait fixrtc\0" \
  62 + "finduuid=part uuid mmc 0:2 uuid\0" \
  63 + "args_mmc=run finduuid;setenv bootargs console=${console} " \
  64 + "${optargs} " \
  65 + "root=PARTUUID=${uuid} rw " \
  66 + "rootfstype=${mmcrootfstype}\0" \
  67 + "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
  68 + "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
  69 + "source ${loadaddr}\0" \
  70 + "bootenvfile=uEnv.txt\0" \
  71 + "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
  72 + "env import -t ${loadaddr} ${filesize}\0" \
  73 + "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \
  74 + "envboot=mmc dev ${mmcdev}; " \
  75 + "if mmc rescan; then " \
  76 + "echo SD/MMC found on device ${mmcdev};" \
  77 + "if run loadbootscript; then " \
  78 + "run bootscript;" \
  79 + "else " \
  80 + "if run loadbootenv; then " \
  81 + "echo Loaded env from ${bootenvfile};" \
  82 + "run importbootenv;" \
  83 + "fi;" \
  84 + "if test -n $uenvcmd; then " \
  85 + "echo Running uenvcmd ...;" \
  86 + "run uenvcmd;" \
  87 + "fi;" \
  88 + "fi;" \
  89 + "fi;\0" \
  90 +
  91 +/*
  92 + * DDR information. If the CONFIG_NR_DRAM_BANKS is not defined,
  93 + * we say (for simplicity) that we have 1 bank, always, even when
  94 + * we have more. We always start at 0x80000000, and we place the
  95 + * initial stack pointer in our SRAM. Otherwise, we can define
  96 + * CONFIG_NR_DRAM_BANKS before including this file.
  97 + */
  98 +#ifndef CONFIG_NR_DRAM_BANKS
  99 +#define CONFIG_NR_DRAM_BANKS 1
  100 +#endif
  101 +#define CONFIG_SYS_SDRAM_BASE 0x80000000
  102 +
  103 +#ifndef CONFIG_SYS_INIT_SP_ADDR
  104 +#define CONFIG_SYS_INIT_SP_ADDR (NON_SECURE_SRAM_END - \
  105 + GENERATED_GBL_DATA_SIZE)
  106 +#endif
  107 +
  108 +/* Timer information. */
  109 +#define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
  110 +
  111 +/* I2C IP block */
  112 +#define CONFIG_I2C
  113 +#define CONFIG_SYS_I2C
  114 +
  115 +/* MMC/SD IP block */
  116 +#define CONFIG_OMAP3_SPI
  117 +#define CONFIG_MMC
  118 +#define CONFIG_GENERIC_MMC
  119 +
  120 +/* McSPI IP block */
  121 +#define CONFIG_SPI
  122 +
  123 +/* GPIO block */
  124 +
  125 +/*
  126 + * The following are general good-enough settings for U-Boot. We set a
  127 + * large malloc pool as we generally have a lot of DDR, and we opt for
  128 + * function over binary size in the main portion of U-Boot as this is
  129 + * generally easily constrained later if needed. We enable the config
  130 + * options that give us information in the environment about what board
  131 + * we are on so we do not need to rely on the command prompt. We set a
  132 + * console baudrate of 115200 and use the default baud rate table.
  133 + */
  134 +#ifdef CONFIG_DFU_MMC
  135 +#define CONFIG_SYS_MALLOC_LEN ((16 << 20) + CONFIG_SYS_DFU_DATA_BUF_SIZE)
  136 +#else
  137 +#define CONFIG_SYS_MALLOC_LEN (16 << 20)
  138 +#endif
  139 +#define CONFIG_CMD_SETEXPR
  140 +#define CONFIG_SYS_CONSOLE_INFO_QUIET
  141 +#define CONFIG_BAUDRATE 115200
  142 +#define CONFIG_ENV_VARS_UBOOT_CONFIG /* Strongly encouraged */
  143 +#define CONFIG_ENV_OVERWRITE /* Overwrite ethaddr / serial# */
  144 +
  145 +/* As stated above, the following choices are optional. */
  146 +#define CONFIG_SYS_LONGHELP
  147 +#define CONFIG_AUTO_COMPLETE
  148 +#define CONFIG_CMDLINE_EDITING
  149 +#define CONFIG_VERSION_VARIABLE
  150 +
  151 +/* We set the max number of command args high to avoid HUSH bugs. */
  152 +#define CONFIG_SYS_MAXARGS 64
  153 +
  154 +/* Console I/O Buffer Size */
  155 +#define CONFIG_SYS_CBSIZE 512
  156 +/* Print Buffer Size */
  157 +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE \
  158 + + sizeof(CONFIG_SYS_PROMPT) + 16)
  159 +/* Boot Argument Buffer Size */
  160 +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  161 +
  162 +/*
  163 + * When we have SPI, NOR or NAND flash we expect to be making use of
  164 + * mtdparts, both for ease of use in U-Boot and for passing information
  165 + * on to the Linux kernel.
  166 + */
  167 +#if defined(CONFIG_SPI_BOOT) || defined(CONFIG_NOR) || defined(CONFIG_NAND) || defined(CONFIG_NAND_DAVINCI)
  168 +#define CONFIG_MTD_DEVICE /* Required for mtdparts */
  169 +#define CONFIG_CMD_MTDPARTS
  170 +#endif
  171 +
  172 +/*
  173 + * Common filesystems support. When we have removable storage we
  174 + * enabled a number of useful commands and support.
  175 + */
  176 +#if defined(CONFIG_MMC) || defined(CONFIG_USB_STORAGE)
  177 +#define CONFIG_DOS_PARTITION
  178 +#define CONFIG_FAT_WRITE
  179 +#define CONFIG_PARTITION_UUIDS
  180 +#define CONFIG_CMD_PART
  181 +#endif
  182 +
  183 +/*
  184 + * Our platforms make use of SPL to initalize the hardware (primarily
  185 + * memory) enough for full U-Boot to be loaded. We also support Falcon
  186 + * Mode so that the Linux kernel can be booted directly from SPL
  187 + * instead, if desired. We make use of the general SPL framework found
  188 + * under common/spl/. Given our generally common memory map, we set a
  189 + * number of related defaults and sizes here.
  190 + */
  191 +#if !defined(CONFIG_NOR_BOOT) && \
  192 + !(defined(CONFIG_QSPI_BOOT) && defined(CONFIG_AM43XX))
  193 +#define CONFIG_SPL_FRAMEWORK
  194 +#define CONFIG_SPL_OS_BOOT
  195 +
  196 +/*
  197 + * Place the image at the start of the ROM defined image space (per
  198 + * CONFIG_SPL_TEXT_BASE and we limit our size to the ROM-defined
  199 + * downloaded image area. We initalize DRAM as soon as we can so that
  200 + * we can place stack, malloc and BSS there. We load U-Boot itself into
  201 + * memory at 0x80800000 for legacy reasons (to not conflict with older
  202 + * SPLs). We have our BSS be placed 2MiB after this, to allow for the
  203 + * default Linux kernel address of 0x80008000 to work with most sized
  204 + * kernels, in the Falcon Mode case. We have the SPL malloc pool at the
  205 + * end of the BSS area. We suggest that the stack be placed at 32MiB after
  206 + * the start of DRAM to allow room for all of the above (handled in Kconfig).
  207 + */
  208 +#ifndef CONFIG_SYS_TEXT_BASE
  209 +#define CONFIG_SYS_TEXT_BASE 0x80800000
  210 +#endif
  211 +#ifndef CONFIG_SPL_BSS_START_ADDR
  212 +#define CONFIG_SPL_BSS_START_ADDR 0x80a00000
  213 +#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */
  214 +#endif
  215 +#ifndef CONFIG_SYS_SPL_MALLOC_START
  216 +#define CONFIG_SYS_SPL_MALLOC_START (CONFIG_SPL_BSS_START_ADDR + \
  217 + CONFIG_SPL_BSS_MAX_SIZE)
  218 +#define CONFIG_SYS_SPL_MALLOC_SIZE CONFIG_SYS_MALLOC_LEN
  219 +#endif
  220 +
  221 +/* RAW SD card / eMMC locations. */
  222 +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */
  223 +#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x200 /* 256 KB */
  224 +
  225 +/* FAT sd card locations. */
  226 +#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
  227 +#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
  228 +
  229 +#ifdef CONFIG_SPL_OS_BOOT
  230 +/* FAT */
  231 +#define CONFIG_SPL_FS_LOAD_KERNEL_NAME "uImage"
  232 +#define CONFIG_SPL_FS_LOAD_ARGS_NAME "args"
  233 +
  234 +/* RAW SD card / eMMC */
  235 +#define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR 0x900 /* address 0x120000 */
  236 +#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR 0x80 /* address 0x10000 */
  237 +#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS 0x80 /* 64KiB */
  238 +
  239 +/* spl export command */
  240 +#define CONFIG_CMD_SPL
  241 +#endif
  242 +
  243 +#ifdef CONFIG_MMC
  244 +#define CONFIG_SPL_LIBDISK_SUPPORT
  245 +#define CONFIG_SPL_MMC_SUPPORT
  246 +#define CONFIG_SPL_FAT_SUPPORT
  247 +/*#define CONFIG_SPL_EXT_SUPPORT*/
  248 +#endif
  249 +
  250 +#define CONFIG_SYS_THUMB_BUILD
  251 +
  252 +/* General parts of the framework, required. */
  253 +#define CONFIG_SPL_I2C_SUPPORT
  254 +#define CONFIG_SPL_LIBCOMMON_SUPPORT
  255 +#define CONFIG_SPL_LIBGENERIC_SUPPORT
  256 +#define CONFIG_SPL_SERIAL_SUPPORT
  257 +#define CONFIG_SPL_POWER_SUPPORT
  258 +#define CONFIG_SPL_GPIO_SUPPORT
  259 +#define CONFIG_SPL_BOARD_INIT
  260 +
  261 +#ifdef CONFIG_NAND
  262 +#define CONFIG_SPL_NAND_SUPPORT
  263 +#define CONFIG_SPL_NAND_BASE
  264 +#define CONFIG_SPL_NAND_DRIVERS
  265 +#define CONFIG_SPL_NAND_ECC
  266 +#define CONFIG_SPL_MTD_SUPPORT
  267 +#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
  268 +#endif
  269 +#endif /* !CONFIG_NOR_BOOT */
  270 +
  271 +/* Generic Environment Variables */
  272 +
  273 +#ifdef CONFIG_CMD_NET
  274 +#define NETARGS \
  275 + "static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}" \
  276 + "::off\0" \
  277 + "nfsopts=nolock\0" \
  278 + "rootpath=/export/rootfs\0" \
  279 + "netloadimage=tftp ${loadaddr} ${bootfile}\0" \
  280 + "netloadfdt=tftp ${fdtaddr} ${fdtfile}\0" \
  281 + "netargs=setenv bootargs console=${console} " \
  282 + "${optargs} " \
  283 + "root=/dev/nfs " \
  284 + "nfsroot=${serverip}:${rootpath},${nfsopts} rw " \
  285 + "ip=dhcp\0" \
  286 + "netboot=echo Booting from network ...; " \
  287 + "setenv autoload no; " \
  288 + "dhcp; " \
  289 + "run netloadimage; " \
  290 + "run netloadfdt; " \
  291 + "run netargs; " \
  292 + "bootz ${loadaddr} - ${fdtaddr}\0"
  293 +#else
  294 +#define NETARGS ""
  295 +#endif
  296 +
  297 +#include <config_distro_defaults.h>
  298 +
  299 +#endif /* __CONFIG_EMBEDIAN_ARMV7_COMMON_H__ */
include/configs/embedian_armv7_smarct4x.h
  1 +/*
  2 + * ti_armv7_omap.h
  3 + *
  4 + * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
  5 + *
  6 + * SPDX-License-Identifier: GPL-2.0+
  7 + *
  8 + * The various ARMv7 SoCs from TI all share a number of IP blocks when
  9 + * implementing a given feature. This is meant to isolate the features
  10 + * that are based on OMAP architecture.
  11 + */
  12 +#ifndef __CONFIG_EMBEDIAN_ARMV7_SMARCT4X_H__
  13 +#define __CONFIG_EMBEDIAN_ARMV7_SMARCT4X_H__
  14 +
  15 +/* Common defines for all OMAP architecture based SoCs */
  16 +#define CONFIG_OMAP
  17 +#define CONFIG_OMAP_COMMON
  18 +
  19 +/* I2C IP block */
  20 +#define CONFIG_SYS_OMAP24_I2C_SPEED 100000
  21 +#define CONFIG_SYS_OMAP24_I2C_SLAVE 2
  22 +#define CONFIG_SYS_I2C_OMAP24XX
  23 +
  24 +/* MMC/SD IP block */
  25 +#define CONFIG_OMAP_HSMMC
  26 +
  27 +/* SPI IP Block */
  28 +#define CONFIG_OMAP3_SPI
  29 +
  30 +/* GPIO block */
  31 +#define CONFIG_OMAP_GPIO
  32 +
  33 +/*
  34 + * GPMC NAND block. We support 1 device and the physical address to
  35 + * access CS0 at is 0x8000000.
  36 + */
  37 +#ifdef CONFIG_NAND
  38 +#define CONFIG_NAND_OMAP_GPMC
  39 +#ifndef CONFIG_SYS_NAND_BASE
  40 +#define CONFIG_SYS_NAND_BASE 0x8000000
  41 +#endif
  42 +#define CONFIG_SYS_MAX_NAND_DEVICE 1
  43 +#define CONFIG_CMD_NAND
  44 +#endif
  45 +
  46 +/* Now for the remaining common defines */
  47 +#include <configs/embedian_armv7_common.h>
  48 +
  49 +#endif /* __CONFIG_EMBEDIAN_ARMV7_SMARCT4X_H__ */
include/configs/smarct437x_evm.h
  1 +/*
  2 + * am43xx_evm.h
  3 + *
  4 + * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
  5 + *
  6 + * SPDX-License-Identifier: GPL-2.0+
  7 + */
  8 +
  9 +#ifndef __CONFIG_SMARCT437X_EVM_H
  10 +#define __CONFIG_SMARCT437X_EVM_H
  11 +
  12 +#define CONFIG_BOARD_LATE_INIT
  13 +#define CONFIG_ARCH_CPU_INIT
  14 +#define CONFIG_SYS_CACHELINE_SIZE 32
  15 +#define CONFIG_MAX_RAM_BANK_SIZE (1024 << 21) /* 2GB */
  16 +#define CONFIG_SYS_TIMERBASE 0x48040000 /* Use Timer2 */
  17 +
  18 +#include <asm/arch/omap.h>
  19 +#define CONFIG_ENV_IS_NOWHERE
  20 +
  21 +/* NS16550 Configuration */
  22 +#define CONFIG_SYS_NS16550_CLK 48000000
  23 +#if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_DM_SERIAL)
  24 +#define CONFIG_SYS_NS16550_SERIAL
  25 +#define CONFIG_SYS_NS16550_REG_SIZE (-4)
  26 +#endif
  27 +
  28 +/* I2C Configuration */
  29 +#define CONFIG_CMD_EEPROM
  30 +#define CONFIG_ENV_EEPROM_IS_ON_I2C
  31 +#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Main EEPROM */
  32 +#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
  33 +#define CONFIG_SYS_I2C_MULTI_EEPROMS
  34 +
  35 +/* Power */
  36 +#define CONFIG_POWER
  37 +#define CONFIG_POWER_I2C
  38 +#define CONFIG_POWER_TPS65218
  39 +#define CONFIG_POWER_TPS62362
  40 +
  41 +/* SPL defines. */
  42 +#define CONFIG_SPL_TEXT_BASE CONFIG_ISW_ENTRY_ADDR
  43 +#define CONFIG_SPL_MAX_SIZE (NON_SECURE_SRAM_END - \
  44 + CONFIG_PUB_ROM_DATA_SIZE - \
  45 + CONFIG_SPL_TEXT_BASE)
  46 +#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \
  47 + (128 << 20))
  48 +#define CONFIG_SPL_POWER_SUPPORT
  49 +#define CONFIG_SPL_YMODEM_SUPPORT
  50 +
  51 +/* Enabling L2 Cache */
  52 +#define CONFIG_SYS_L2_PL310
  53 +#define CONFIG_SYS_PL310_BASE 0x48242000
  54 +#define CONFIG_SYS_CACHELINE_SIZE 32
  55 +
  56 +/*
  57 + * Since SPL did pll and ddr initialization for us,
  58 + * we don't need to do it twice.
  59 + */
  60 +#if !defined(CONFIG_SPL_BUILD) /*&& !defined(CONFIG_QSPI_BOOT)*/
  61 +#define CONFIG_SKIP_LOWLEVEL_INIT
  62 +#endif
  63 +
  64 +#define CONFIG_HSMMC2_8BIT
  65 +
  66 +/*
  67 + * When building U-Boot such that there is no previous loader
  68 + * we need to call board_early_init_f. This is taken care of in
  69 + * s_init when we have SPL used.
  70 + */
  71 +#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && !defined(CONFIG_SPL)
  72 +#define CONFIG_BOARD_EARLY_INIT_F
  73 +#endif
  74 +
  75 +/* Now bring in the rest of the common code. */
  76 +#include <configs/embedian_armv7_smarct4x.h>
  77 +
  78 +/* Always 64 KiB env size */
  79 +#define CONFIG_ENV_SIZE (64 << 10)
  80 +
  81 +#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
  82 +
  83 +/* Clock Defines */
  84 +#define V_OSCK 24000000 /* Clock output from T2 */
  85 +#define V_SCLK (V_OSCK)
  86 +
  87 +/* NS16550 Configuration */
  88 +#define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
  89 +#define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */
  90 +#define CONFIG_SYS_NS16550_COM3 0x48024000 /* UART2 */
  91 +#define CONFIG_SYS_NS16550_COM4 0x481a6000 /* UART3 */
  92 +#define CONFIG_SYS_NS16550_COM5 0x481a8000 /* UART4 */
  93 +#define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */
  94 +#define CONFIG_BAUDRATE 115200
  95 +
  96 +#if !defined(CONFIG_ENV_IS_NOWHERE)
  97 +#define CONFIG_ENV_IS_IN_FAT
  98 +#define FAT_ENV_INTERFACE "mmc"
  99 +#define FAT_ENV_DEVICE_AND_PART "0:1"
  100 +#define FAT_ENV_FILE "uboot.env"
  101 +#define CONFIG_FAT_WRITE
  102 +#endif
  103 +
  104 +#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
  105 +
  106 +/* SPL USB Support */
  107 +#ifdef CONFIG_SPL_USB_HOST_SUPPORT
  108 +#define CONFIG_SPL_USB_SUPPORT
  109 +#endif
  110 +
  111 +#if defined(CONFIG_SPL_USB_HOST_SUPPORT) || !defined(CONFIG_SPL_BUILD)
  112 +#define CONFIG_SYS_USB_FAT_BOOT_PARTITION 1
  113 +#define CONFIG_USB_HOST
  114 +#define CONFIG_USB_XHCI
  115 +#define CONFIG_USB_XHCI_DWC3
  116 +#define CONFIG_USB_XHCI_OMAP
  117 +#define CONFIG_USB_STORAGE
  118 +#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2
  119 +
  120 +#define CONFIG_OMAP_USB_PHY
  121 +#define CONFIG_AM437X_USB2PHY2_HOST
  122 +#endif
  123 +
  124 +#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_USBETH_SUPPORT)
  125 +#undef CONFIG_USB_DWC3_PHY_OMAP
  126 +#undef CONFIG_USB_DWC3_OMAP
  127 +#undef CONFIG_USB_DWC3
  128 +#undef CONFIG_USB_DWC3_GADGET
  129 +
  130 +#undef CONFIG_USB_GADGET_DOWNLOAD
  131 +#undef CONFIG_USB_GADGET_VBUS_DRAW
  132 +#undef CONFIG_G_DNL_MANUFACTURER
  133 +#undef CONFIG_G_DNL_VENDOR_NUM
  134 +#undef CONFIG_G_DNL_PRODUCT_NUM
  135 +#undef CONFIG_USB_GADGET_DUALSPEED
  136 +#endif
  137 +
  138 +/*
  139 + * Disable MMC DM for SPL build and can be re-enabled after adding
  140 + * DM support in SPL
  141 + */
  142 +#ifdef CONFIG_SPL_BUILD
  143 +#undef CONFIG_DM_MMC
  144 +#undef CONFIG_DM_SPI
  145 +#undef CONFIG_DM_SPI_FLASH
  146 +#undef CONFIG_TIMER
  147 +#undef CONFIG_DM_NAND
  148 +#endif
  149 +
  150 +#ifndef CONFIG_SPL_BUILD
  151 +/* USB Device Firmware Update support */
  152 +#define CONFIG_USB_FUNCTION_DFU
  153 +#define CONFIG_DFU_RAM
  154 +
  155 +#define CONFIG_DFU_MMC
  156 +#define DFU_ALT_INFO_MMC \
  157 + "dfu_alt_info_mmc=" \
  158 + "boot part 0 1;" \
  159 + "rootfs part 0 2;" \
  160 + "MLO fat 0 1;" \
  161 + "spl-os-args fat 0 1;" \
  162 + "spl-os-image fat 0 1;" \
  163 + "u-boot.img fat 0 1;" \
  164 + "uEnv.txt fat 0 1\0"
  165 +
  166 +#define DFU_ALT_INFO_EMMC \
  167 + "dfu_alt_info_emmc=" \
  168 + "MLO raw 0x100 0x100 mmcpart 0;" \
  169 + "u-boot.img raw 0x300 0x1000 mmcpart 0\0"
  170 +
  171 +#define CONFIG_DFU_RAM
  172 +#define DFU_ALT_INFO_RAM \
  173 + "dfu_alt_info_ram=" \
  174 + "kernel ram 0x80200000 0x4000000;" \
  175 + "fdt ram 0x80f80000 0x80000;" \
  176 + "ramdisk ram 0x81000000 0x4000000\0"
  177 +
  178 +#define DFUARGS \
  179 + "dfu_bufsiz=0x10000\0" \
  180 + DFU_ALT_INFO_MMC \
  181 + DFU_ALT_INFO_EMMC \
  182 + DFU_ALT_INFO_RAM
  183 +#else
  184 +#define DFUARGS
  185 +#endif
  186 +
  187 +/*
  188 + * Default to using SPI for environment, etc.
  189 + * 0x000000 - 0x020000 : SPL (128KiB)
  190 + * 0x020000 - 0x0A0000 : U-Boot (512KiB)
  191 + * 0x0A0000 - 0x0BFFFF : First copy of U-Boot Environment (128KiB)
  192 + * 0x0C0000 - 0x0DFFFF : Second copy of U-Boot Environment (128KiB)
  193 + * 0x0E0000 - 0x442000 : Linux Kernel
  194 + * 0x442000 - 0x800000 : Userland
  195 + */
  196 +#if defined(CONFIG_SPI_BOOT)
  197 +/* SPL related */
  198 +#undef CONFIG_SPL_OS_BOOT /* Not supported by existing map */
  199 +#define CONFIG_SPL_SPI_SUPPORT
  200 +#define CONFIG_SPL_SPI_FLASH_SUPPORT
  201 +#define CONFIG_SPL_SPI_LOAD
  202 +#define CONFIG_SPL_SPI_BUS 0
  203 +#define CONFIG_SPL_SPI_CS 0
  204 +#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000
  205 +
  206 +#undef CONFIG_SPL_OS_BOOT
  207 +#undef CONFIG_ENV_IS_NOWHERE
  208 +#define CONFIG_ENV_IS_IN_SPI_FLASH
  209 +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
  210 +#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
  211 +#define CONFIG_ENV_SECT_SIZE (4 << 10) /* 4 KB sectors */
  212 +#define CONFIG_ENV_OFFSET (768 << 10) /* 768 KiB in */
  213 +#define CONFIG_ENV_OFFSET_REDUND (896 << 10) /* 896 KiB in */
  214 +#define MTDIDS_DEFAULT "nor0=m25p80-flash.0"
  215 +#define MTDPARTS_DEFAULT "mtdparts=m25p80-flash.0:128k(SPL)," \
  216 + "512k(u-boot),128k(u-boot-env1)," \
  217 + "128k(u-boot-env2),3464k(kernel)," \
  218 + "-(rootfs)"
  219 +#endif
  220 +
  221 +#if defined(CONFIG_EMMC_BOOT)
  222 +#undef CONFIG_SPL_OS_BOOT
  223 +#undef CONFIG_ENV_IS_NOWHERE
  224 +#define CONFIG_ENV_IS_IN_MMC
  225 +#define CONFIG_SPL_ENV_SUPPORT
  226 +#define CONFIG_SYS_MMC_ENV_DEV 1
  227 +#define CONFIG_SYS_MMC_ENV_PART 2
  228 +#define CONFIG_ENV_OFFSET 0x0
  229 +#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
  230 +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
  231 +#endif
  232 +
  233 +/* SPI */
  234 +/*#undef CONFIG_OMAP3_SPI*/
  235 +#define CONFIG_TI_SPI_MMAP
  236 +#define CONFIG_SF_DEFAULT_BUS 0
  237 +#define CONFIG_SF_DEFAULT_SPEED 24000000
  238 +#define CONFIG_DEFAULT_SPI_MODE SPI_MODE_3
  239 +
  240 +#define CONFIG_TI_EDMA3
  241 +
  242 +/* Enhance our eMMC support / experience. */
  243 +#define CONFIG_CMD_GPT
  244 +#define CONFIG_EFI_PARTITION
  245 +
  246 +#ifndef CONFIG_SPL_BUILD
  247 +#define CONFIG_EXTRA_ENV_SETTINGS \
  248 + DEFAULT_LINUX_BOOT_ENV \
  249 + DEFAULT_MMC_TI_ARGS \
  250 + "boot_fdt=try\0" \
  251 + "bootpart=0:1\0" \
  252 + "bootdir=\0" \
  253 + "fdtdir=/dtbs\0" \
  254 + "bootfile=zImage\0" \
  255 + "fdtfile=am437x-smarct437x.dtb\0" \
  256 + "console=ttyO0,115200n8\0" \
  257 + "partitions=" \
  258 + "uuid_disk=${uuid_gpt_disk};" \
  259 + "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \
  260 + "optargs=\0" \
  261 + "cmdline=\0" \
  262 + "mmcpart=1\0" \
  263 + "mmcroot=/dev/mmcblk0p2 ro\0" \
  264 + "usbroot=/dev/sda2 rw\0" \
  265 + "usbrootfstype=ext4 rootwait\0" \
  266 + "usbdev=0\0" \
  267 + "ramroot=/dev/ram0 rw\0" \
  268 + "ramrootfstype=ext2\0" \
  269 + "usbargs=setenv bootargs console=${console} " \
  270 + "${optargs} " \
  271 + "root=${usbroot} " \
  272 + "rootfstype=${usbrootfstype}\0" \
  273 + "bootenv=uEnv.txt\0" \
  274 + "script=boot.scr\0" \
  275 + "scriptfile=${script}\0" \
  276 + "loadbootscript=load mmc ${bootpart} ${loadaddr} ${scriptfile};\0" \
  277 + "bootscript=echo Running bootscript from mmc${bootpart} ...; " \
  278 + "source ${loadaddr}\0" \
  279 + "loadbootenv=load mmc ${bootpart} ${loadaddr} ${bootenv}\0" \
  280 + "loadusbbootenv=load usb ${bootpart} ${loadaddr} ${bootenv}\0" \
  281 + "importbootenv=echo Importing environment from mmc ...; " \
  282 + "env import -t -r $loadaddr $filesize\0" \
  283 + "importusbbootenv=echo Importing environment from usb ...; " \
  284 + "env import -t -r $loadaddr $filesize\0" \
  285 + "ramargs=setenv bootargs console=${console} " \
  286 + "${optargs} " \
  287 + "root=${ramroot} " \
  288 + "rootfstype=${ramrootfstype}\0" \
  289 + "loadramdisk=load ${devtype} ${devnum} ${rdaddr} ramdisk.gz\0" \
  290 + "loadimage=load ${devtype} ${mmcdev}:1 ${loadaddr} ${bootdir}/${bootfile}\0" \
  291 + "loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${mmcdev}:1 ${fdtaddr} ${bootdir}/${fdtfile}\0" \
  292 + "mmcboot=mmc dev ${mmcdev}; " \
  293 + "setenv devnum ${mmcdev}; " \
  294 + "setenv bootpart ${mmcdev}:1; "\
  295 + "setenv devtype mmc; " \
  296 + "if mmc rescan; then " \
  297 + "echo SD/MMC found on device ${devnum};" \
  298 + "if run loadbootenv; then " \
  299 + "echo Loaded environment from ${bootenv};" \
  300 + "run importbootenv;" \
  301 + "fi;" \
  302 + "if test -n $uenvcmd; then " \
  303 + "echo Running uenvcmd ...;" \
  304 + "run uenvcmd;" \
  305 + "fi;" \
  306 + "if run loadimage; then " \
  307 + "run loadfdt; " \
  308 + "echo Booting from mmc${mmcdev} ...; " \
  309 + "run args_mmc; " \
  310 + "bootz ${loadaddr} - ${fdtaddr}; " \
  311 + "fi;" \
  312 + "fi;\0" \
  313 + "usbboot=" \
  314 + "setenv devnum ${usbdev}; " \
  315 + "setenv devtype usb; " \
  316 + "usb start ${usbdev}; " \
  317 + "if usb dev ${usbdev}; then " \
  318 + "if run loadusbbootenv; then " \
  319 + "echo Loaded environment from ${bootenv};" \
  320 + "run importusbbootenv;" \
  321 + "fi;" \
  322 + "if test -n $uenvcmd; then " \
  323 + "echo Running uenvcmd ...;" \
  324 + "run uenvcmd;" \
  325 + "fi;" \
  326 + "if run loadimage; then " \
  327 + "run loadfdt; " \
  328 + "echo Booting from usb ${usbdev}...; " \
  329 + "run usbargs;" \
  330 + "bootz ${loadaddr} - ${fdtaddr}; " \
  331 + "fi;" \
  332 + "fi\0" \
  333 + "fi;" \
  334 + "usb stop ${usbdev};\0" \
  335 + "findfdt="\
  336 + "if test $board_name = AM43EPOS; then " \
  337 + "setenv fdtfile am43x-epos-evm.dtb; fi; " \
  338 + "if test $board_name = AM43__GP; then " \
  339 + "setenv fdtfile am437x-gp-evm.dtb; fi; " \
  340 + "if test $board_name = AM43XXHS; then " \
  341 + "setenv fdtfile am437x-gp-evm.dtb; fi; " \
  342 + "if test $board_name = AM43__SK; then " \
  343 + "setenv fdtfile am437x-sk-evm.dtb; fi; " \
  344 + "if test $board_name = AM43_IDK; then " \
  345 + "setenv fdtfile am437x-idk-evm.dtb; fi; " \
  346 + "if test $board_name = SMCT4X80; then " \
  347 + "setenv fdtfile am437x-smarct437x.dtb; fi; " \
  348 + "if test $board_name = SMCT4X1G; then " \
  349 + "setenv fdtfile am437x-smarct437x.dtb; fi; " \
  350 + "if test $fdtfile = undefined; then " \
  351 + "echo WARNING: Could not determine device tree; fi; \0" \
  352 + NANDARGS \
  353 + NETARGS \
  354 + DFUARGS \
  355 +
  356 +#define CONFIG_BOOTCOMMAND \
  357 + "run findfdt; " \
  358 + "run envboot;" \
  359 + "run mmcboot;" \
  360 + "run usbboot;"
  361 +
  362 +#endif
  363 +
  364 +#ifndef CONFIG_SPL_BUILD
  365 +/* CPSW Ethernet */
  366 +#define CONFIG_MII
  367 +#define CONFIG_BOOTP_DEFAULT
  368 +#define CONFIG_BOOTP_DNS
  369 +#define CONFIG_BOOTP_DNS2
  370 +#define CONFIG_BOOTP_SEND_HOSTNAME
  371 +#define CONFIG_BOOTP_GATEWAY
  372 +#define CONFIG_BOOTP_SUBNETMASK
  373 +#define CONFIG_NET_RETRY_COUNT 10
  374 +#define CONFIG_PHY_GIGE
  375 +#endif
  376 +
  377 +#define CONFIG_DRIVER_TI_CPSW
  378 +#define CONFIG_PHYLIB
  379 +#define CONFIG_PHY_ATHEROS
  380 +#define PHY_ANEG_TIMEOUT 8000 /* PHY needs longer aneg time at 1G */
  381 +
  382 +#define CONFIG_SPL_ENV_SUPPORT
  383 +#define CONFIG_SPL_NET_VCI_STRING "AM43xx U-Boot SPL"
  384 +
  385 +#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_ETH_SUPPORT)
  386 +#undef CONFIG_ENV_IS_IN_FAT
  387 +#define CONFIG_ENV_IS_NOWHERE
  388 +#define CONFIG_SPL_NET_SUPPORT
  389 +#endif
  390 +
  391 +#define CONFIG_SYS_RX_ETH_BUFFER 64
  392 +
  393 +/* NAND support */
  394 +#ifdef CONFIG_NAND
  395 +/* NAND: device related configs */
  396 +#define CONFIG_SYS_NAND_PAGE_SIZE 4096
  397 +#define CONFIG_SYS_NAND_OOBSIZE 224
  398 +#define CONFIG_SYS_NAND_BLOCK_SIZE (256*1024)
  399 +#define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \
  400 + CONFIG_SYS_NAND_PAGE_SIZE)
  401 +#define CONFIG_SYS_NAND_5_ADDR_CYCLE
  402 +/* NAND: driver related configs */
  403 +#define CONFIG_NAND_OMAP_GPMC
  404 +#define CONFIG_NAND_OMAP_ELM
  405 +#define CONFIG_SYS_NAND_ONFI_DETECTION
  406 +#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH16_CODE_HW
  407 +#define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
  408 +#define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \
  409 + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, \
  410 + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, \
  411 + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, \
  412 + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, \
  413 + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, \
  414 + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, \
  415 + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, \
  416 + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, \
  417 + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, \
  418 + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, \
  419 + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, \
  420 + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, \
  421 + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, \
  422 + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, \
  423 + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, \
  424 + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, \
  425 + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, \
  426 + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, \
  427 + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, \
  428 + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, \
  429 + }
  430 +#define CONFIG_SYS_NAND_ECCSIZE 512
  431 +#define CONFIG_SYS_NAND_ECCBYTES 26
  432 +#define MTDIDS_DEFAULT "nand0=nand.0"
  433 +#define MTDPARTS_DEFAULT "mtdparts=nand.0:" \
  434 + "256k(NAND.SPL)," \
  435 + "256k(NAND.SPL.backup1)," \
  436 + "256k(NAND.SPL.backup2)," \
  437 + "256k(NAND.SPL.backup3)," \
  438 + "512k(NAND.u-boot-spl-os)," \
  439 + "1m(NAND.u-boot)," \
  440 + "256k(NAND.u-boot-env)," \
  441 + "256k(NAND.u-boot-env.backup1)," \
  442 + "7m(NAND.kernel)," \
  443 + "-(NAND.file-system)"
  444 +#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x00180000
  445 +/* NAND: SPL related configs */
  446 +#ifdef CONFIG_SPL_NAND_SUPPORT
  447 +#define CONFIG_SPL_NAND_AM33XX_BCH
  448 +#endif
  449 +/* NAND: SPL falcon mode configs */
  450 +#ifdef CONFIG_SPL_OS_BOOT
  451 +#define CONFIG_CMD_SPL_NAND_OFS 0x00100000 /* os parameters */
  452 +#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x00300000 /* kernel offset */
  453 +#define CONFIG_CMD_SPL_WRITE_SIZE CONFIG_SYS_NAND_BLOCK_SIZE
  454 +#endif
  455 +#define NANDARGS \
  456 + "mtdids=" MTDIDS_DEFAULT "\0" \
  457 + "mtdparts=" MTDPARTS_DEFAULT "\0" \
  458 + "nandargs=setenv bootargs console=${console} " \
  459 + "${optargs} " \
  460 + "root=${nandroot} " \
  461 + "rootfstype=${nandrootfstype}\0" \
  462 + "nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,4096\0" \
  463 + "nandrootfstype=ubifs rootwait=1\0" \
  464 + "nandboot=echo Booting from nand ...; " \
  465 + "run nandargs; " \
  466 + "nand read ${fdtaddr} NAND.u-boot-spl-os; " \
  467 + "nand read ${loadaddr} NAND.kernel; " \
  468 + "bootz ${loadaddr} - ${fdtaddr}\0"
  469 +#define NANDBOOT "run nandboot; "
  470 +#else /* !CONFIG_NAND */
  471 +#define NANDARGS
  472 +#define NANDBOOT
  473 +#endif /* CONFIG_NAND */
  474 +
  475 +#endif /* __CONFIG_SMARCT437X_EVM_H */
include/dt-bindings/pinctrl/am43xx.h
... ... @@ -14,12 +14,14 @@
14 14 #define MUX_MODE6 6
15 15 #define MUX_MODE7 7
16 16 #define MUX_MODE8 8
  17 +#define MUX_MODE9 9
17 18  
18 19 #define PULL_DISABLE (1 << 16)
19 20 #define PULL_UP (1 << 17)
20 21 #define INPUT_EN (1 << 18)
21 22 #define SLEWCTRL_SLOW (1 << 19)
22 23 #define SLEWCTRL_FAST 0
  24 +#define DS0_FORCE_OFF_MODE (1 << 24)
23 25 #define DS0_PULL_UP_DOWN_EN (1 << 27)
24 26 #define WAKEUP_ENABLE (1 << 29)
25 27