Commit f38f5f4bcf8027041e8c5b9ea3bc1ae905510bc0

Authored by Marcel Ziswiler
Committed by Tom Warren
1 parent 5cf618ee60

arm: tegra: initial support for apalis tk1

This patch adds board support for the Toradex Apalis TK1 a computer on
module which can be used on different carrier boards.

The module consists of a Tegra TK1 SoC, a PMIC solution, 2 GB of DDR3L
RAM, a bunch of level shifters, an eMMC, a TMP451 temperature sensor
chip, an I210 gigabit Ethernet controller and a SGTL5000 audio codec.
Furthermore, there is a Kinetis MK20DN512 companion micro controller for
analogue, CAN and resistive touch functionality.

For the sake of ease of use we do not distinguish between different
carrier boards for now as the base module features are deemed
sufficient enough for regular booting.

The following functionality is working so far:
- eMMC boot, environment storage and Toradex factory config block
- Gigabit Ethernet
- MMC/SD cards (both MMC1 as well as SD1 slot)
- USB client/host (dual role OTG port as client e.g. for DFU/UMS or host,
  other two ports as host)

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>

Showing 12 changed files with 3095 additions and 0 deletions Side-by-side Diff

arch/arm/dts/Makefile
... ... @@ -58,6 +58,7 @@
58 58 tegra30-colibri.dtb \
59 59 tegra30-tec-ng.dtb \
60 60 tegra114-dalmore.dtb \
  61 + tegra124-apalis.dtb \
61 62 tegra124-jetson-tk1.dtb \
62 63 tegra124-nyan-big.dtb \
63 64 tegra124-cei-tk1-som.dtb \
arch/arm/dts/tegra124-apalis.dts
Changes suppressed. Click to show
  1 +/*
  2 + * Copyright 2016 Toradex AG
  3 + *
  4 + * This file is dual-licensed: you can use it either under the terms
  5 + * of the GPL or the X11 license, at your option. Note that this dual
  6 + * licensing only applies to this file, and not this project as a
  7 + * whole.
  8 + *
  9 + * a) This file is free software; you can redistribute it and/or
  10 + * modify it under the terms of the GNU General Public License
  11 + * version 2 as published by the Free Software Foundation.
  12 + *
  13 + * This file is distributed in the hope that it will be useful
  14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16 + * GNU General Public License for more details.
  17 + *
  18 + * Or, alternatively
  19 + *
  20 + * b) Permission is hereby granted, free of charge, to any person
  21 + * obtaining a copy of this software and associated documentation
  22 + * files (the "Software"), to deal in the Software without
  23 + * restriction, including without limitation the rights to use
  24 + * copy, modify, merge, publish, distribute, sublicense, and/or
  25 + * sell copies of the Software, and to permit persons to whom the
  26 + * Software is furnished to do so, subject to the following
  27 + * conditions:
  28 + *
  29 + * The above copyright notice and this permission notice shall be
  30 + * included in all copies or substantial portions of the Software.
  31 + *
  32 + * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
  33 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  34 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  35 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  36 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
  37 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  38 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  39 + * OTHER DEALINGS IN THE SOFTWARE.
  40 + */
  41 +
  42 +/dts-v1/;
  43 +
  44 +#include <dt-bindings/input/input.h>
  45 +#include "tegra124.dtsi"
  46 +
  47 +/ {
  48 + model = "Toradex Apalis TK1 on Apalis Evaluation Board";
  49 + compatible = "toradex,apalis-tk1-eval", "toradex,apalis-tk1",
  50 + "nvidia,tegra124";
  51 +
  52 + aliases {
  53 + i2c0 = "/i2c@7000d000";
  54 + i2c1 = "/i2c@7000c000";
  55 + i2c2 = "/i2c@7000c400";
  56 + i2c3 = "/i2c@7000c500";
  57 + mmc0 = "/sdhci@700b0600";
  58 + mmc1 = "/sdhci@700b0000";
  59 + mmc2 = "/sdhci@700b0400";
  60 + rtc0 = "/i2c@7000c000/rtc@68";
  61 + rtc1 = "/i2c@7000d000/pmic@40";
  62 + rtc2 = "/rtc@7000e000";
  63 + serial0 = &uarta;
  64 + serial1 = &uartb;
  65 + serial2 = &uartc;
  66 + serial3 = &uartd;
  67 + usb0 = "/usb@7d000000";
  68 + usb1 = "/usb@7d004000";
  69 + usb2 = "/usb@7d008000";
  70 + };
  71 +
  72 + chosen {
  73 + stdout-path = "serial0:115200n8";
  74 + };
  75 +
  76 + memory {
  77 + reg = <0x0 0x80000000 0x0 0x80000000>;
  78 + };
  79 +
  80 + pcie-controller@01003000 {
  81 + status = "okay";
  82 + avddio-pex-supply = <&vdd_1v05>;
  83 + avdd-pex-pll-supply = <&vdd_1v05>;
  84 + avdd-pll-erefe-supply = <&avdd_1v05>;
  85 + dvddio-pex-supply = <&vdd_1v05>;
  86 + hvdd-pex-pll-e-supply = <&reg_3v3>;
  87 + hvdd-pex-supply = <&reg_3v3>;
  88 + vddio-pex-ctl-supply = <&reg_3v3>;
  89 +
  90 + /* Apalis PCIe (additional lane Apalis type specific) */
  91 + pci@1,0 {
  92 + /* PCIE1_RX/TX and TS_DIFF1/2 left disabled */
  93 + };
  94 +
  95 + /* I210 Gigabit Ethernet Controller (On-module) */
  96 + pci@2,0 {
  97 + status = "okay";
  98 + };
  99 + };
  100 +
  101 + host1x@50000000 {
  102 + hdmi@54280000 {
  103 + pll-supply = <&reg_1v05_avdd_hdmi_pll>;
  104 + vdd-supply = <&reg_3v3_avdd_hdmi>;
  105 + nvidia,ddc-i2c-bus = <&hdmi_ddc>;
  106 + nvidia,hpd-gpio =
  107 + <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
  108 + status = "okay";
  109 + };
  110 + };
  111 +
  112 + gpu@0,57000000 {
  113 + /*
  114 + * Node left disabled on purpose - the bootloader will enable
  115 + * it after having set the VPR up
  116 + */
  117 + vdd-supply = <&vdd_gpu>;
  118 + };
  119 +
  120 + pinmux: pinmux@70000868 {
  121 + pinctrl-names = "default";
  122 + pinctrl-0 = <&state_default>;
  123 +
  124 + state_default: pinmux {
  125 + /* Analogue Audio (On-module) */
  126 + dap3_fs_pp0 {
  127 + nvidia,pins = "dap3_fs_pp0";
  128 + nvidia,function = "i2s2";
  129 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  130 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  131 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  132 + };
  133 + dap3_din_pp1 {
  134 + nvidia,pins = "dap3_din_pp1";
  135 + nvidia,function = "i2s2";
  136 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  137 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  138 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  139 + };
  140 + dap3_dout_pp2 {
  141 + nvidia,pins = "dap3_dout_pp2";
  142 + nvidia,function = "i2s2";
  143 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  144 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  145 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  146 + };
  147 + dap3_sclk_pp3 {
  148 + nvidia,pins = "dap3_sclk_pp3";
  149 + nvidia,function = "i2s2";
  150 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  151 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  152 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  153 + };
  154 + dap_mclk1_pw4 {
  155 + nvidia,pins = "dap_mclk1_pw4";
  156 + nvidia,function = "extperiph1";
  157 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  158 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  159 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  160 + };
  161 +
  162 + /* Apalis BKL1_ON */
  163 + pbb5 {
  164 + nvidia,pins = "pbb5";
  165 + nvidia,function = "vgp5";
  166 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  167 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  168 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  169 + };
  170 +
  171 + /* Apalis BKL1_PWM */
  172 + pu6 {
  173 + nvidia,pins = "pu6";
  174 + nvidia,function = "pwm3";
  175 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  176 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  177 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  178 + };
  179 +
  180 + /* Apalis CAM1_MCLK */
  181 + cam_mclk_pcc0 {
  182 + nvidia,pins = "cam_mclk_pcc0";
  183 + nvidia,function = "vi_alt3";
  184 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  185 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  186 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  187 + };
  188 +
  189 + /* Apalis Digital Audio */
  190 + dap2_fs_pa2 {
  191 + nvidia,pins = "dap2_fs_pa2";
  192 + nvidia,function = "hda";
  193 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  194 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  195 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  196 + };
  197 + dap2_sclk_pa3 {
  198 + nvidia,pins = "dap2_sclk_pa3";
  199 + nvidia,function = "hda";
  200 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  201 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  202 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  203 + };
  204 + dap2_din_pa4 {
  205 + nvidia,pins = "dap2_din_pa4";
  206 + nvidia,function = "hda";
  207 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  208 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  209 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  210 + };
  211 + dap2_dout_pa5 {
  212 + nvidia,pins = "dap2_dout_pa5";
  213 + nvidia,function = "hda";
  214 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  215 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  216 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  217 + };
  218 + pbb3 { /* DAP1_RESET */
  219 + nvidia,pins = "pbb3";
  220 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  221 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  222 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  223 + };
  224 + clk3_out_pee0 {
  225 + nvidia,pins = "clk3_out_pee0";
  226 + nvidia,function = "extperiph3";
  227 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  228 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  229 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  230 + };
  231 +
  232 + /* Apalis GPIO */
  233 + ddc_scl_pv4 {
  234 + nvidia,pins = "ddc_scl_pv4";
  235 + nvidia,function = "rsvd2";
  236 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  237 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  238 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  239 + };
  240 + ddc_sda_pv5 {
  241 + nvidia,pins = "ddc_sda_pv5";
  242 + nvidia,function = "rsvd2";
  243 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  244 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  245 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  246 + };
  247 + pex_l0_rst_n_pdd1 {
  248 + nvidia,pins = "pex_l0_rst_n_pdd1";
  249 + nvidia,function = "rsvd2";
  250 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  251 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  252 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  253 + };
  254 + pex_l0_clkreq_n_pdd2 {
  255 + nvidia,pins = "pex_l0_clkreq_n_pdd2";
  256 + nvidia,function = "rsvd2";
  257 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  258 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  259 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  260 + };
  261 + pex_l1_rst_n_pdd5 {
  262 + nvidia,pins = "pex_l1_rst_n_pdd5";
  263 + nvidia,function = "rsvd2";
  264 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  265 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  266 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  267 + };
  268 + pex_l1_clkreq_n_pdd6 {
  269 + nvidia,pins = "pex_l1_clkreq_n_pdd6";
  270 + nvidia,function = "rsvd2";
  271 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  272 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  273 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  274 + };
  275 + dp_hpd_pff0 {
  276 + nvidia,pins = "dp_hpd_pff0";
  277 + nvidia,function = "dp";
  278 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  279 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  280 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  281 + };
  282 + pff2 {
  283 + nvidia,pins = "pff2";
  284 + nvidia,function = "rsvd2";
  285 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  286 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  287 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  288 + };
  289 + owr { /* PEX_L1_CLKREQ_N multiplexed GPIO6 */
  290 + nvidia,pins = "owr";
  291 + nvidia,function = "rsvd2";
  292 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  293 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  294 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  295 + nvidia,rcv-sel = <TEGRA_PIN_DISABLE>;
  296 + };
  297 +
  298 + /* Apalis HDMI1_CEC */
  299 + hdmi_cec_pee3 {
  300 + nvidia,pins = "hdmi_cec_pee3";
  301 + nvidia,function = "cec";
  302 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  303 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  304 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  305 + nvidia,open-drain = <TEGRA_PIN_DISABLE>;
  306 + };
  307 +
  308 + /* Apalis HDMI1_HPD */
  309 + hdmi_int_pn7 {
  310 + nvidia,pins = "hdmi_int_pn7";
  311 + nvidia,function = "rsvd1";
  312 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  313 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  314 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  315 + nvidia,rcv-sel = <TEGRA_PIN_DISABLE>;
  316 + };
  317 +
  318 + /* Apalis I2C1 */
  319 + gen1_i2c_scl_pc4 {
  320 + nvidia,pins = "gen1_i2c_scl_pc4";
  321 + nvidia,function = "i2c1";
  322 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  323 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  324 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  325 + nvidia,open-drain = <TEGRA_PIN_ENABLE>;
  326 + };
  327 + gen1_i2c_sda_pc5 {
  328 + nvidia,pins = "gen1_i2c_sda_pc5";
  329 + nvidia,function = "i2c1";
  330 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  331 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  332 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  333 + nvidia,open-drain = <TEGRA_PIN_ENABLE>;
  334 + };
  335 +
  336 + /* Apalis I2C2 (DDC) */
  337 + gen2_i2c_scl_pt5 {
  338 + nvidia,pins = "gen2_i2c_scl_pt5";
  339 + nvidia,function = "i2c2";
  340 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  341 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  342 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  343 + nvidia,open-drain = <TEGRA_PIN_ENABLE>;
  344 + };
  345 + gen2_i2c_sda_pt6 {
  346 + nvidia,pins = "gen2_i2c_sda_pt6";
  347 + nvidia,function = "i2c2";
  348 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  349 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  350 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  351 + nvidia,open-drain = <TEGRA_PIN_ENABLE>;
  352 + };
  353 +
  354 + /* Apalis I2C3 (CAM) */
  355 + cam_i2c_scl_pbb1 {
  356 + nvidia,pins = "cam_i2c_scl_pbb1";
  357 + nvidia,function = "i2c3";
  358 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  359 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  360 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  361 + nvidia,open-drain = <TEGRA_PIN_ENABLE>;
  362 + };
  363 + cam_i2c_sda_pbb2 {
  364 + nvidia,pins = "cam_i2c_sda_pbb2";
  365 + nvidia,function = "i2c3";
  366 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  367 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  368 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  369 + nvidia,open-drain = <TEGRA_PIN_ENABLE>;
  370 + };
  371 +
  372 + /* Apalis MMC1 */
  373 + sdmmc1_cd_n_pv3 { /* CD# GPIO */
  374 + nvidia,pins = "sdmmc1_wp_n_pv3";
  375 + nvidia,function = "sdmmc1";
  376 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  377 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  378 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  379 + };
  380 + clk2_out_pw5 { /* D5 GPIO */
  381 + nvidia,pins = "clk2_out_pw5";
  382 + nvidia,function = "rsvd2";
  383 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  384 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  385 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  386 + };
  387 + sdmmc1_dat3_py4 {
  388 + nvidia,pins = "sdmmc1_dat3_py4";
  389 + nvidia,function = "sdmmc1";
  390 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  391 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  392 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  393 + };
  394 + sdmmc1_dat2_py5 {
  395 + nvidia,pins = "sdmmc1_dat2_py5";
  396 + nvidia,function = "sdmmc1";
  397 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  398 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  399 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  400 + };
  401 + sdmmc1_dat1_py6 {
  402 + nvidia,pins = "sdmmc1_dat1_py6";
  403 + nvidia,function = "sdmmc1";
  404 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  405 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  406 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  407 + };
  408 + sdmmc1_dat0_py7 {
  409 + nvidia,pins = "sdmmc1_dat0_py7";
  410 + nvidia,function = "sdmmc1";
  411 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  412 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  413 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  414 + };
  415 + sdmmc1_clk_pz0 {
  416 + nvidia,pins = "sdmmc1_clk_pz0";
  417 + nvidia,function = "sdmmc1";
  418 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  419 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  420 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  421 + };
  422 + sdmmc1_cmd_pz1 {
  423 + nvidia,pins = "sdmmc1_cmd_pz1";
  424 + nvidia,function = "sdmmc1";
  425 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  426 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  427 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  428 + };
  429 + clk2_req_pcc5 { /* D4 GPIO */
  430 + nvidia,pins = "clk2_req_pcc5";
  431 + nvidia,function = "rsvd2";
  432 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  433 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  434 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  435 + };
  436 + sdmmc3_clk_lb_in_pee5 { /* D6 GPIO */
  437 + nvidia,pins = "sdmmc3_clk_lb_in_pee5";
  438 + nvidia,function = "rsvd2";
  439 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  440 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  441 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  442 + };
  443 + usb_vbus_en2_pff1 { /* D7 GPIO */
  444 + nvidia,pins = "usb_vbus_en2_pff1";
  445 + nvidia,function = "rsvd2";
  446 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  447 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  448 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  449 + };
  450 +
  451 + /* Apalis PWM */
  452 + ph0 {
  453 + nvidia,pins = "ph0";
  454 + nvidia,function = "pwm0";
  455 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  456 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  457 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  458 + };
  459 + ph1 {
  460 + nvidia,pins = "ph1";
  461 + nvidia,function = "pwm1";
  462 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  463 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  464 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  465 + };
  466 + ph2 {
  467 + nvidia,pins = "ph2";
  468 + nvidia,function = "pwm2";
  469 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  470 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  471 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  472 + };
  473 + /* PWM3 active on pu6 being Apalis BKL1_PWM */
  474 + ph3 {
  475 + nvidia,pins = "ph3";
  476 + nvidia,function = "gmi";
  477 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  478 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  479 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  480 + };
  481 +
  482 + /* Apalis SATA1_ACT# */
  483 + dap1_dout_pn2 {
  484 + nvidia,pins = "dap1_dout_pn2";
  485 + nvidia,function = "gmi";
  486 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  487 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  488 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  489 + };
  490 +
  491 + /* Apalis SD1 */
  492 + sdmmc3_clk_pa6 {
  493 + nvidia,pins = "sdmmc3_clk_pa6";
  494 + nvidia,function = "sdmmc3";
  495 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  496 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  497 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  498 + };
  499 + sdmmc3_cmd_pa7 {
  500 + nvidia,pins = "sdmmc3_cmd_pa7";
  501 + nvidia,function = "sdmmc3";
  502 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  503 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  504 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  505 + };
  506 + sdmmc3_dat3_pb4 {
  507 + nvidia,pins = "sdmmc3_dat3_pb4";
  508 + nvidia,function = "sdmmc3";
  509 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  510 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  511 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  512 + };
  513 + sdmmc3_dat2_pb5 {
  514 + nvidia,pins = "sdmmc3_dat2_pb5";
  515 + nvidia,function = "sdmmc3";
  516 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  517 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  518 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  519 + };
  520 + sdmmc3_dat1_pb6 {
  521 + nvidia,pins = "sdmmc3_dat1_pb6";
  522 + nvidia,function = "sdmmc3";
  523 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  524 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  525 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  526 + };
  527 + sdmmc3_dat0_pb7 {
  528 + nvidia,pins = "sdmmc3_dat0_pb7";
  529 + nvidia,function = "sdmmc3";
  530 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  531 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  532 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  533 + };
  534 + sdmmc3_cd_n_pv2 { /* CD# GPIO */
  535 + nvidia,pins = "sdmmc3_cd_n_pv2";
  536 + nvidia,function = "rsvd3";
  537 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  538 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  539 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  540 + };
  541 +
  542 + /* Apalis SPDIF */
  543 + spdif_out_pk5 {
  544 + nvidia,pins = "spdif_out_pk5";
  545 + nvidia,function = "spdif";
  546 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  547 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  548 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  549 + };
  550 + spdif_in_pk6 {
  551 + nvidia,pins = "spdif_in_pk6";
  552 + nvidia,function = "spdif";
  553 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  554 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  555 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  556 + };
  557 +
  558 + /* Apalis SPI1 */
  559 + ulpi_clk_py0 {
  560 + nvidia,pins = "ulpi_clk_py0";
  561 + nvidia,function = "spi1";
  562 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  563 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  564 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  565 + };
  566 + ulpi_dir_py1 {
  567 + nvidia,pins = "ulpi_dir_py1";
  568 + nvidia,function = "spi1";
  569 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  570 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  571 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  572 + };
  573 + ulpi_nxt_py2 {
  574 + nvidia,pins = "ulpi_nxt_py2";
  575 + nvidia,function = "spi1";
  576 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  577 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  578 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  579 + };
  580 + ulpi_stp_py3 {
  581 + nvidia,pins = "ulpi_stp_py3";
  582 + nvidia,function = "spi1";
  583 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  584 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  585 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  586 + };
  587 +
  588 + /* Apalis SPI2 */
  589 + pg5 {
  590 + nvidia,pins = "pg5";
  591 + nvidia,function = "spi4";
  592 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  593 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  594 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  595 + };
  596 + pg6 {
  597 + nvidia,pins = "pg6";
  598 + nvidia,function = "spi4";
  599 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  600 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  601 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  602 + };
  603 + pg7 {
  604 + nvidia,pins = "pg7";
  605 + nvidia,function = "spi4";
  606 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  607 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  608 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  609 + };
  610 + pi3 {
  611 + nvidia,pins = "pi3";
  612 + nvidia,function = "spi4";
  613 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  614 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  615 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  616 + };
  617 +
  618 + /* Apalis UART1 */
  619 + pb1 { /* DCD GPIO */
  620 + nvidia,pins = "pb1";
  621 + nvidia,function = "rsvd2";
  622 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  623 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  624 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  625 + };
  626 + pk7 { /* RI GPIO */
  627 + nvidia,pins = "pk7";
  628 + nvidia,function = "rsvd2";
  629 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  630 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  631 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  632 + };
  633 + uart1_txd_pu0 {
  634 + nvidia,pins = "pu0";
  635 + nvidia,function = "uarta";
  636 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  637 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  638 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  639 + };
  640 + uart1_rxd_pu1 {
  641 + nvidia,pins = "pu1";
  642 + nvidia,function = "uarta";
  643 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  644 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  645 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  646 + };
  647 + uart1_cts_n_pu2 {
  648 + nvidia,pins = "pu2";
  649 + nvidia,function = "uarta";
  650 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  651 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  652 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  653 + };
  654 + uart1_rts_n_pu3 {
  655 + nvidia,pins = "pu3";
  656 + nvidia,function = "uarta";
  657 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  658 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  659 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  660 + };
  661 + uart3_cts_n_pa1 { /* DSR GPIO */
  662 + nvidia,pins = "uart3_cts_n_pa1";
  663 + nvidia,function = "gmi";
  664 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  665 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  666 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  667 + };
  668 + uart3_rts_n_pc0 { /* DTR GPIO */
  669 + nvidia,pins = "uart3_rts_n_pc0";
  670 + nvidia,function = "gmi";
  671 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  672 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  673 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  674 + };
  675 +
  676 + /* Apalis UART2 */
  677 + uart2_txd_pc2 {
  678 + nvidia,pins = "uart2_txd_pc2";
  679 + nvidia,function = "irda";
  680 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  681 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  682 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  683 + };
  684 + uart2_rxd_pc3 {
  685 + nvidia,pins = "uart2_rxd_pc3";
  686 + nvidia,function = "irda";
  687 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  688 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  689 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  690 + };
  691 + uart2_cts_n_pj5 {
  692 + nvidia,pins = "uart2_cts_n_pj5";
  693 + nvidia,function = "uartb";
  694 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  695 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  696 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  697 + };
  698 + uart2_rts_n_pj6 {
  699 + nvidia,pins = "uart2_rts_n_pj6";
  700 + nvidia,function = "uartb";
  701 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  702 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  703 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  704 + };
  705 +
  706 + /* Apalis UART3 */
  707 + uart3_txd_pw6 {
  708 + nvidia,pins = "uart3_txd_pw6";
  709 + nvidia,function = "uartc";
  710 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  711 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  712 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  713 + };
  714 + uart3_rxd_pw7 {
  715 + nvidia,pins = "uart3_rxd_pw7";
  716 + nvidia,function = "uartc";
  717 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  718 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  719 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  720 + };
  721 +
  722 + /* Apalis UART4 */
  723 + uart4_rxd_pb0 {
  724 + nvidia,pins = "pb0";
  725 + nvidia,function = "uartd";
  726 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  727 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  728 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  729 + };
  730 + uart4_txd_pj7 {
  731 + nvidia,pins = "pj7";
  732 + nvidia,function = "uartd";
  733 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  734 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  735 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  736 + };
  737 +
  738 + /* Apalis USBH_EN */
  739 + usb_vbus_en1_pn5 {
  740 + nvidia,pins = "usb_vbus_en1_pn5";
  741 + nvidia,function = "rsvd2";
  742 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  743 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  744 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  745 + nvidia,open-drain = <TEGRA_PIN_DISABLE>;
  746 + };
  747 +
  748 + /* Apalis USBH_OC# */
  749 + pbb0 {
  750 + nvidia,pins = "pbb0";
  751 + nvidia,function = "vgp6";
  752 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  753 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  754 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  755 + };
  756 +
  757 + /* Apalis USBO1_EN */
  758 + usb_vbus_en0_pn4 {
  759 + nvidia,pins = "usb_vbus_en0_pn4";
  760 + nvidia,function = "rsvd2";
  761 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  762 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  763 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  764 + nvidia,open-drain = <TEGRA_PIN_DISABLE>;
  765 + };
  766 +
  767 + /* Apalis USBO1_OC# */
  768 + pbb4 {
  769 + nvidia,pins = "pbb4";
  770 + nvidia,function = "vgp4";
  771 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  772 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  773 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  774 + };
  775 +
  776 + /* Apalis WAKE1_MICO */
  777 + pex_wake_n_pdd3 {
  778 + nvidia,pins = "pex_wake_n_pdd3";
  779 + nvidia,function = "rsvd2";
  780 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  781 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  782 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  783 + };
  784 +
  785 + /* CORE_PWR_REQ */
  786 + core_pwr_req {
  787 + nvidia,pins = "core_pwr_req";
  788 + nvidia,function = "pwron";
  789 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  790 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  791 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  792 + };
  793 +
  794 + /* CPU_PWR_REQ */
  795 + cpu_pwr_req {
  796 + nvidia,pins = "cpu_pwr_req";
  797 + nvidia,function = "cpu";
  798 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  799 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  800 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  801 + };
  802 +
  803 + /* DVFS */
  804 + dvfs_pwm_px0 {
  805 + nvidia,pins = "dvfs_pwm_px0";
  806 + nvidia,function = "cldvfs";
  807 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  808 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  809 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  810 + };
  811 + dvfs_clk_px2 {
  812 + nvidia,pins = "dvfs_clk_px2";
  813 + nvidia,function = "cldvfs";
  814 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  815 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  816 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  817 + };
  818 +
  819 + /* eMMC */
  820 + sdmmc4_dat0_paa0 {
  821 + nvidia,pins = "sdmmc4_dat0_paa0";
  822 + nvidia,function = "sdmmc4";
  823 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  824 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  825 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  826 + };
  827 + sdmmc4_dat1_paa1 {
  828 + nvidia,pins = "sdmmc4_dat1_paa1";
  829 + nvidia,function = "sdmmc4";
  830 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  831 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  832 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  833 + };
  834 + sdmmc4_dat2_paa2 {
  835 + nvidia,pins = "sdmmc4_dat2_paa2";
  836 + nvidia,function = "sdmmc4";
  837 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  838 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  839 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  840 + };
  841 + sdmmc4_dat3_paa3 {
  842 + nvidia,pins = "sdmmc4_dat3_paa3";
  843 + nvidia,function = "sdmmc4";
  844 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  845 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  846 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  847 + };
  848 + sdmmc4_dat4_paa4 {
  849 + nvidia,pins = "sdmmc4_dat4_paa4";
  850 + nvidia,function = "sdmmc4";
  851 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  852 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  853 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  854 + };
  855 + sdmmc4_dat5_paa5 {
  856 + nvidia,pins = "sdmmc4_dat5_paa5";
  857 + nvidia,function = "sdmmc4";
  858 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  859 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  860 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  861 + };
  862 + sdmmc4_dat6_paa6 {
  863 + nvidia,pins = "sdmmc4_dat6_paa6";
  864 + nvidia,function = "sdmmc4";
  865 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  866 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  867 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  868 + };
  869 + sdmmc4_dat7_paa7 {
  870 + nvidia,pins = "sdmmc4_dat7_paa7";
  871 + nvidia,function = "sdmmc4";
  872 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  873 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  874 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  875 + };
  876 + sdmmc4_clk_pcc4 {
  877 + nvidia,pins = "sdmmc4_clk_pcc4";
  878 + nvidia,function = "sdmmc4";
  879 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  880 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  881 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  882 + };
  883 + sdmmc4_cmd_pt7 {
  884 + nvidia,pins = "sdmmc4_cmd_pt7";
  885 + nvidia,function = "sdmmc4";
  886 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  887 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  888 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  889 + };
  890 +
  891 + /* JTAG_RTCK */
  892 + jtag_rtck {
  893 + nvidia,pins = "jtag_rtck";
  894 + nvidia,function = "rtck";
  895 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  896 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  897 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  898 + };
  899 +
  900 + /* LAN_DEV_OFF# */
  901 + ulpi_data5_po6 {
  902 + nvidia,pins = "ulpi_data5_po6";
  903 + nvidia,function = "ulpi";
  904 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  905 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  906 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  907 + };
  908 +
  909 + /* LAN_RESET# */
  910 + kb_row10_ps2 {
  911 + nvidia,pins = "kb_row10_ps2";
  912 + nvidia,function = "rsvd2";
  913 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  914 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  915 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  916 + };
  917 +
  918 + /* LAN_WAKE# */
  919 + ulpi_data4_po5 {
  920 + nvidia,pins = "ulpi_data4_po5";
  921 + nvidia,function = "ulpi";
  922 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  923 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  924 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  925 + };
  926 +
  927 + /* MCU_INT1# */
  928 + pk2 {
  929 + nvidia,pins = "pk2";
  930 + nvidia,function = "rsvd1";
  931 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  932 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  933 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  934 + };
  935 +
  936 + /* MCU_INT2# */
  937 + pj2 {
  938 + nvidia,pins = "pj2";
  939 + nvidia,function = "rsvd1";
  940 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  941 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  942 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  943 + };
  944 +
  945 + /* MCU_INT3# */
  946 + pi5 {
  947 + nvidia,pins = "pi5";
  948 + nvidia,function = "rsvd2";
  949 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  950 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  951 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  952 + };
  953 +
  954 + /* MCU_INT4# */
  955 + pj0 {
  956 + nvidia,pins = "pj0";
  957 + nvidia,function = "rsvd1";
  958 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  959 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  960 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  961 + };
  962 +
  963 + /* MCU_RESET */
  964 + pbb6 {
  965 + nvidia,pins = "pbb6";
  966 + nvidia,function = "rsvd2";
  967 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  968 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  969 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  970 + };
  971 +
  972 + /* MCU SPI */
  973 + gpio_x4_aud_px4 {
  974 + nvidia,pins = "gpio_x4_aud_px4";
  975 + nvidia,function = "spi2";
  976 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  977 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  978 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  979 + };
  980 + gpio_x5_aud_px5 {
  981 + nvidia,pins = "gpio_x5_aud_px5";
  982 + nvidia,function = "spi2";
  983 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  984 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  985 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  986 + };
  987 + gpio_x6_aud_px6 { /* MCU_CS */
  988 + nvidia,pins = "gpio_x6_aud_px6";
  989 + nvidia,function = "spi2";
  990 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  991 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  992 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  993 + };
  994 + gpio_x7_aud_px7 {
  995 + nvidia,pins = "gpio_x7_aud_px7";
  996 + nvidia,function = "spi2";
  997 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  998 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  999 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  1000 + };
  1001 + gpio_w2_aud_pw2 { /* MCU_CSEZP */
  1002 + nvidia,pins = "gpio_w2_aud_pw2";
  1003 + nvidia,function = "spi2";
  1004 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  1005 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  1006 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1007 + };
  1008 +
  1009 + /* PMIC_CLK_32K */
  1010 + clk_32k_in {
  1011 + nvidia,pins = "clk_32k_in";
  1012 + nvidia,function = "clk";
  1013 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  1014 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1015 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  1016 + };
  1017 +
  1018 + /* PMIC_CPU_OC_INT */
  1019 + clk_32k_out_pa0 {
  1020 + nvidia,pins = "clk_32k_out_pa0";
  1021 + nvidia,function = "soc";
  1022 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  1023 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1024 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  1025 + };
  1026 +
  1027 + /* PWR_I2C */
  1028 + pwr_i2c_scl_pz6 {
  1029 + nvidia,pins = "pwr_i2c_scl_pz6";
  1030 + nvidia,function = "i2cpwr";
  1031 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  1032 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  1033 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  1034 + nvidia,open-drain = <TEGRA_PIN_ENABLE>;
  1035 + };
  1036 + pwr_i2c_sda_pz7 {
  1037 + nvidia,pins = "pwr_i2c_sda_pz7";
  1038 + nvidia,function = "i2cpwr";
  1039 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  1040 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  1041 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  1042 + nvidia,open-drain = <TEGRA_PIN_ENABLE>;
  1043 + };
  1044 +
  1045 + /* PWR_INT_N */
  1046 + pwr_int_n {
  1047 + nvidia,pins = "pwr_int_n";
  1048 + nvidia,function = "pmi";
  1049 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  1050 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1051 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  1052 + };
  1053 +
  1054 + /* RESET_MOCI_CTRL */
  1055 + pu4 {
  1056 + nvidia,pins = "pu4";
  1057 + nvidia,function = "gmi";
  1058 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  1059 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  1060 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1061 + };
  1062 +
  1063 + /* RESET_OUT_N */
  1064 + reset_out_n {
  1065 + nvidia,pins = "reset_out_n";
  1066 + nvidia,function = "reset_out_n";
  1067 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  1068 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  1069 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  1070 + };
  1071 +
  1072 + /* SHIFT_CTRL_DIR_IN */
  1073 + kb_row0_pr0 {
  1074 + nvidia,pins = "kb_row0_pr0";
  1075 + nvidia,function = "rsvd2";
  1076 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1077 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1078 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1079 + };
  1080 + kb_row1_pr1 {
  1081 + nvidia,pins = "kb_row1_pr1";
  1082 + nvidia,function = "rsvd2";
  1083 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1084 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1085 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1086 + };
  1087 +
  1088 + /* Configure level-shifter as output for HDA */
  1089 + kb_row11_ps3 {
  1090 + nvidia,pins = "kb_row11_ps3";
  1091 + nvidia,function = "rsvd2";
  1092 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  1093 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1094 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1095 + };
  1096 +
  1097 + /* SHIFT_CTRL_DIR_OUT */
  1098 + kb_col5_pq5 {
  1099 + nvidia,pins = "kb_col5_pq5";
  1100 + nvidia,function = "rsvd2";
  1101 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  1102 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1103 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1104 + };
  1105 + kb_col6_pq6 {
  1106 + nvidia,pins = "kb_col6_pq6";
  1107 + nvidia,function = "rsvd2";
  1108 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  1109 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1110 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1111 + };
  1112 + kb_col7_pq7 {
  1113 + nvidia,pins = "kb_col7_pq7";
  1114 + nvidia,function = "rsvd2";
  1115 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  1116 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1117 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1118 + };
  1119 +
  1120 + /* SHIFT_CTRL_OE */
  1121 + kb_col0_pq0 {
  1122 + nvidia,pins = "kb_col0_pq0";
  1123 + nvidia,function = "rsvd2";
  1124 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1125 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1126 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1127 + };
  1128 + kb_col1_pq1 {
  1129 + nvidia,pins = "kb_col1_pq1";
  1130 + nvidia,function = "rsvd2";
  1131 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1132 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1133 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1134 + };
  1135 + kb_col2_pq2 {
  1136 + nvidia,pins = "kb_col2_pq2";
  1137 + nvidia,function = "rsvd2";
  1138 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1139 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1140 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1141 + };
  1142 + kb_col4_pq4 {
  1143 + nvidia,pins = "kb_col4_pq4";
  1144 + nvidia,function = "kbc";
  1145 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1146 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1147 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1148 + };
  1149 + kb_row2_pr2 {
  1150 + nvidia,pins = "kb_row2_pr2";
  1151 + nvidia,function = "rsvd2";
  1152 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1153 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1154 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1155 + };
  1156 +
  1157 + /* GPIO_PI6 aka TMP451 ALERT#/THERM2# */
  1158 + pi6 {
  1159 + nvidia,pins = "pi6";
  1160 + nvidia,function = "rsvd1";
  1161 + nvidia,pull = <TEGRA_PIN_PULL_UP>;
  1162 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1163 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  1164 + };
  1165 +
  1166 + /* TOUCH_INT */
  1167 + gpio_w3_aud_pw3 {
  1168 + nvidia,pins = "gpio_w3_aud_pw3";
  1169 + nvidia,function = "spi6";
  1170 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  1171 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1172 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  1173 + };
  1174 +
  1175 + pc7 { /* NC */
  1176 + nvidia,pins = "pc7";
  1177 + nvidia,function = "rsvd1";
  1178 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1179 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1180 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1181 + };
  1182 + pg0 { /* NC */
  1183 + nvidia,pins = "pg0";
  1184 + nvidia,function = "rsvd1";
  1185 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1186 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1187 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1188 + };
  1189 + pg1 { /* NC */
  1190 + nvidia,pins = "pg1";
  1191 + nvidia,function = "rsvd1";
  1192 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1193 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1194 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1195 + };
  1196 + pg2 { /* NC */
  1197 + nvidia,pins = "pg2";
  1198 + nvidia,function = "rsvd1";
  1199 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1200 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1201 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1202 + };
  1203 + pg3 { /* NC */
  1204 + nvidia,pins = "pg3";
  1205 + nvidia,function = "rsvd1";
  1206 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1207 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1208 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1209 + };
  1210 + pg4 { /* NC */
  1211 + nvidia,pins = "pg4";
  1212 + nvidia,function = "rsvd1";
  1213 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1214 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1215 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1216 + };
  1217 + ph4 { /* NC */
  1218 + nvidia,pins = "ph4";
  1219 + nvidia,function = "rsvd2";
  1220 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1221 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1222 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1223 + };
  1224 + ph5 { /* NC */
  1225 + nvidia,pins = "ph5";
  1226 + nvidia,function = "rsvd2";
  1227 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1228 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1229 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1230 + };
  1231 + ph6 { /* NC */
  1232 + nvidia,pins = "ph6";
  1233 + nvidia,function = "gmi";
  1234 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1235 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1236 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1237 + };
  1238 + ph7 { /* NC */
  1239 + nvidia,pins = "ph7";
  1240 + nvidia,function = "gmi";
  1241 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1242 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1243 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1244 + };
  1245 + pi0 { /* NC */
  1246 + nvidia,pins = "pi0";
  1247 + nvidia,function = "rsvd1";
  1248 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1249 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1250 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1251 + };
  1252 + pi1 { /* NC */
  1253 + nvidia,pins = "pi1";
  1254 + nvidia,function = "rsvd1";
  1255 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1256 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1257 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1258 + };
  1259 + pi2 { /* NC */
  1260 + nvidia,pins = "pi2";
  1261 + nvidia,function = "rsvd4";
  1262 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1263 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1264 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1265 + };
  1266 + pi4 { /* NC */
  1267 + nvidia,pins = "pi4";
  1268 + nvidia,function = "gmi";
  1269 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1270 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1271 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1272 + };
  1273 + pi7 { /* NC */
  1274 + nvidia,pins = "pi7";
  1275 + nvidia,function = "rsvd1";
  1276 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1277 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1278 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1279 + };
  1280 + pk0 { /* NC */
  1281 + nvidia,pins = "pk0";
  1282 + nvidia,function = "rsvd1";
  1283 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1284 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1285 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1286 + };
  1287 + pk1 { /* NC */
  1288 + nvidia,pins = "pk1";
  1289 + nvidia,function = "rsvd4";
  1290 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1291 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1292 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1293 + };
  1294 + pk3 { /* NC */
  1295 + nvidia,pins = "pk3";
  1296 + nvidia,function = "gmi";
  1297 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1298 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1299 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1300 + };
  1301 + pk4 { /* NC */
  1302 + nvidia,pins = "pk4";
  1303 + nvidia,function = "rsvd2";
  1304 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1305 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1306 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1307 + };
  1308 + dap1_fs_pn0 { /* NC */
  1309 + nvidia,pins = "dap1_fs_pn0";
  1310 + nvidia,function = "rsvd4";
  1311 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1312 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1313 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1314 + };
  1315 + dap1_din_pn1 { /* NC */
  1316 + nvidia,pins = "dap1_din_pn1";
  1317 + nvidia,function = "rsvd4";
  1318 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1319 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1320 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1321 + };
  1322 + dap1_sclk_pn3 { /* NC */
  1323 + nvidia,pins = "dap1_sclk_pn3";
  1324 + nvidia,function = "rsvd4";
  1325 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1326 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1327 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1328 + };
  1329 + ulpi_data7_po0 { /* NC */
  1330 + nvidia,pins = "ulpi_data7_po0";
  1331 + nvidia,function = "ulpi";
  1332 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1333 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1334 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1335 + };
  1336 + ulpi_data0_po1 { /* NC */
  1337 + nvidia,pins = "ulpi_data0_po1";
  1338 + nvidia,function = "ulpi";
  1339 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1340 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1341 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1342 + };
  1343 + ulpi_data1_po2 { /* NC */
  1344 + nvidia,pins = "ulpi_data1_po2";
  1345 + nvidia,function = "ulpi";
  1346 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1347 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1348 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1349 + };
  1350 + ulpi_data2_po3 { /* NC */
  1351 + nvidia,pins = "ulpi_data2_po3";
  1352 + nvidia,function = "ulpi";
  1353 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1354 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1355 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1356 + };
  1357 + ulpi_data3_po4 { /* NC */
  1358 + nvidia,pins = "ulpi_data3_po4";
  1359 + nvidia,function = "ulpi";
  1360 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1361 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1362 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1363 + };
  1364 + ulpi_data6_po7 { /* NC */
  1365 + nvidia,pins = "ulpi_data6_po7";
  1366 + nvidia,function = "ulpi";
  1367 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1368 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1369 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1370 + };
  1371 + dap4_fs_pp4 { /* NC */
  1372 + nvidia,pins = "dap4_fs_pp4";
  1373 + nvidia,function = "rsvd4";
  1374 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1375 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1376 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1377 + };
  1378 + dap4_din_pp5 { /* NC */
  1379 + nvidia,pins = "dap4_din_pp5";
  1380 + nvidia,function = "rsvd3";
  1381 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1382 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1383 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1384 + };
  1385 + dap4_dout_pp6 { /* NC */
  1386 + nvidia,pins = "dap4_dout_pp6";
  1387 + nvidia,function = "rsvd4";
  1388 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1389 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1390 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1391 + };
  1392 + dap4_sclk_pp7 { /* NC */
  1393 + nvidia,pins = "dap4_sclk_pp7";
  1394 + nvidia,function = "rsvd3";
  1395 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1396 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1397 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1398 + };
  1399 + kb_col3_pq3 { /* NC */
  1400 + nvidia,pins = "kb_col3_pq3";
  1401 + nvidia,function = "kbc";
  1402 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1403 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1404 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1405 + };
  1406 + kb_row3_pr3 { /* NC */
  1407 + nvidia,pins = "kb_row3_pr3";
  1408 + nvidia,function = "kbc";
  1409 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1410 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1411 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1412 + };
  1413 + kb_row4_pr4 { /* NC */
  1414 + nvidia,pins = "kb_row4_pr4";
  1415 + nvidia,function = "rsvd3";
  1416 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1417 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1418 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1419 + };
  1420 + kb_row5_pr5 { /* NC */
  1421 + nvidia,pins = "kb_row5_pr5";
  1422 + nvidia,function = "rsvd3";
  1423 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1424 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1425 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1426 + };
  1427 + kb_row6_pr6 { /* NC */
  1428 + nvidia,pins = "kb_row6_pr6";
  1429 + nvidia,function = "kbc";
  1430 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1431 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1432 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1433 + };
  1434 + kb_row7_pr7 { /* NC */
  1435 + nvidia,pins = "kb_row7_pr7";
  1436 + nvidia,function = "rsvd2";
  1437 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1438 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1439 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1440 + };
  1441 + kb_row8_ps0 { /* NC */
  1442 + nvidia,pins = "kb_row8_ps0";
  1443 + nvidia,function = "rsvd2";
  1444 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1445 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1446 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1447 + };
  1448 + kb_row9_ps1 { /* NC */
  1449 + nvidia,pins = "kb_row9_ps1";
  1450 + nvidia,function = "rsvd2";
  1451 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1452 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1453 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1454 + };
  1455 + kb_row12_ps4 { /* NC */
  1456 + nvidia,pins = "kb_row12_ps4";
  1457 + nvidia,function = "rsvd2";
  1458 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1459 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1460 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1461 + };
  1462 + kb_row13_ps5 { /* NC */
  1463 + nvidia,pins = "kb_row13_ps5";
  1464 + nvidia,function = "rsvd2";
  1465 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1466 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1467 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1468 + };
  1469 + kb_row14_ps6 { /* NC */
  1470 + nvidia,pins = "kb_row14_ps6";
  1471 + nvidia,function = "rsvd2";
  1472 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1473 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1474 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1475 + };
  1476 + kb_row15_ps7 { /* NC */
  1477 + nvidia,pins = "kb_row15_ps7";
  1478 + nvidia,function = "rsvd3";
  1479 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1480 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1481 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1482 + };
  1483 + kb_row16_pt0 { /* NC */
  1484 + nvidia,pins = "kb_row16_pt0";
  1485 + nvidia,function = "rsvd2";
  1486 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1487 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1488 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1489 + };
  1490 + kb_row17_pt1 { /* NC */
  1491 + nvidia,pins = "kb_row17_pt1";
  1492 + nvidia,function = "rsvd2";
  1493 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1494 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1495 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1496 + };
  1497 + pu5 { /* NC */
  1498 + nvidia,pins = "pu5";
  1499 + nvidia,function = "gmi";
  1500 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1501 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1502 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1503 + };
  1504 + pv0 { /* NC */
  1505 + nvidia,pins = "pv0";
  1506 + nvidia,function = "rsvd1";
  1507 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1508 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1509 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1510 + };
  1511 + pv1 { /* NC */
  1512 + nvidia,pins = "pv1";
  1513 + nvidia,function = "rsvd1";
  1514 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1515 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1516 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1517 + };
  1518 + gpio_x1_aud_px1 { /* NC */
  1519 + nvidia,pins = "gpio_x1_aud_px1";
  1520 + nvidia,function = "rsvd2";
  1521 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1522 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1523 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1524 + };
  1525 + gpio_x3_aud_px3 { /* NC */
  1526 + nvidia,pins = "gpio_x3_aud_px3";
  1527 + nvidia,function = "rsvd4";
  1528 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1529 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1530 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1531 + };
  1532 + pbb7 { /* NC */
  1533 + nvidia,pins = "pbb7";
  1534 + nvidia,function = "rsvd2";
  1535 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1536 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1537 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1538 + };
  1539 + pcc1 { /* NC */
  1540 + nvidia,pins = "pcc1";
  1541 + nvidia,function = "rsvd2";
  1542 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1543 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1544 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1545 + };
  1546 + pcc2 { /* NC */
  1547 + nvidia,pins = "pcc2";
  1548 + nvidia,function = "rsvd2";
  1549 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1550 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1551 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1552 + };
  1553 + clk3_req_pee1 { /* NC */
  1554 + nvidia,pins = "clk3_req_pee1";
  1555 + nvidia,function = "rsvd2";
  1556 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1557 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1558 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1559 + };
  1560 + dap_mclk1_req_pee2 { /* NC */
  1561 + nvidia,pins = "dap_mclk1_req_pee2";
  1562 + nvidia,function = "rsvd4";
  1563 + nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
  1564 + nvidia,tristate = <TEGRA_PIN_ENABLE>;
  1565 + nvidia,enable-input = <TEGRA_PIN_DISABLE>;
  1566 + };
  1567 + /*
  1568 + * Leave SDMMC3_CLK_LB_OUT muxed as SDMMC3 with output
  1569 + * driver enabled aka not tristated and input driver
  1570 + * enabled as well as it features some magic properties
  1571 + * even though the external loopback is disabled and the
  1572 + * internal loopback used as per
  1573 + * SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1
  1574 + * bits being set to 0xfffd according to the TRM!
  1575 + */
  1576 + sdmmc3_clk_lb_out_pee4 { /* NC */
  1577 + nvidia,pins = "sdmmc3_clk_lb_out_pee4";
  1578 + nvidia,function = "sdmmc3";
  1579 + nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  1580 + nvidia,tristate = <TEGRA_PIN_DISABLE>;
  1581 + nvidia,enable-input = <TEGRA_PIN_ENABLE>;
  1582 + };
  1583 + };
  1584 + };
  1585 +
  1586 + /* Apalis UART1 */
  1587 + serial@70006000 {
  1588 + status = "okay";
  1589 + };
  1590 +
  1591 + /* Apalis UART2 */
  1592 + serial@70006040 {
  1593 + compatible = "nvidia,tegra124-hsuart";
  1594 + status = "okay";
  1595 + };
  1596 +
  1597 + /* Apalis UART3 */
  1598 + serial@70006200 {
  1599 + compatible = "nvidia,tegra124-hsuart";
  1600 + status = "okay";
  1601 + };
  1602 +
  1603 + /* Apalis UART4 */
  1604 + serial@70006300 {
  1605 + compatible = "nvidia,tegra124-hsuart";
  1606 + status = "okay";
  1607 + };
  1608 +
  1609 + pwm@7000a000 {
  1610 + status = "okay";
  1611 + };
  1612 +
  1613 + hdmi_ddc: i2c@7000c400 {
  1614 + clock-frequency = <100000>;
  1615 + };
  1616 +
  1617 + /*
  1618 + * GEN1_I2C: I2C1_SDA/SCL on MXM3 pin 209/211 (e.g. RTC on carrier
  1619 + * board)
  1620 + */
  1621 + i2c@7000c000 {
  1622 + status = "okay";
  1623 + clock-frequency = <100000>;
  1624 +
  1625 + pcie-switch@58 {
  1626 + compatible = "plx,pex8605";
  1627 + reg = <0x58>;
  1628 + };
  1629 +
  1630 + /* M41T0M6 real time clock on carrier board */
  1631 + rtc@68 {
  1632 + compatible = "st,m41t00";
  1633 + reg = <0x68>;
  1634 + };
  1635 + };
  1636 +
  1637 + /*
  1638 + * GEN2_I2C: I2C2_SDA/SCL (DDC) on MXM3 pin 205/207 (e.g. display EDID)
  1639 + */
  1640 + hdmi_ddc: i2c@7000c400 {
  1641 + status = "okay";
  1642 + clock-frequency = <100000>;
  1643 + };
  1644 +
  1645 + /*
  1646 + * CAM_I2C: I2C3_SDA/SCL (CAM) on MXM3 pin 201/203 (e.g. camera sensor
  1647 + * on carrier board)
  1648 + */
  1649 + i2c@7000c500 {
  1650 + status = "okay";
  1651 + clock-frequency = <100000>;
  1652 + };
  1653 +
  1654 + /* I2C4 (DDC): unused */
  1655 +
  1656 + /* PWR_I2C: power I2C to audio codec, PMIC and temperature sensor */
  1657 + i2c@7000d000 {
  1658 + status = "okay";
  1659 + clock-frequency = <400000>;
  1660 +
  1661 + /* SGTL5000 audio codec */
  1662 + sgtl5000: codec@a {
  1663 + compatible = "fsl,sgtl5000";
  1664 + reg = <0x0a>;
  1665 + VDDA-supply = <&reg_3v3>;
  1666 + VDDIO-supply = <&vddio_1v8>;
  1667 + clocks = <&tegra_car TEGRA124_CLK_EXTERN1>;
  1668 + };
  1669 +
  1670 + pmic: pmic@40 {
  1671 + compatible = "ams,as3722";
  1672 + reg = <0x40>;
  1673 + interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
  1674 + ams,system-power-controller;
  1675 + #interrupt-cells = <2>;
  1676 + interrupt-controller;
  1677 + gpio-controller;
  1678 + #gpio-cells = <2>;
  1679 + pinctrl-names = "default";
  1680 + pinctrl-0 = <&as3722_default>;
  1681 +
  1682 + as3722_default: pinmux {
  1683 + gpio2_7 {
  1684 + pins = "gpio2", /* PWR_EN_+V3.3 */
  1685 + "gpio7"; /* +V1.6_LPO */
  1686 + function = "gpio";
  1687 + bias-pull-up;
  1688 + };
  1689 +
  1690 + gpio1_3_4_5_6 {
  1691 + pins = "gpio1", "gpio3", "gpio4",
  1692 + "gpio5", "gpio6";
  1693 + bias-high-impedance;
  1694 + };
  1695 + };
  1696 +
  1697 + regulators {
  1698 + vsup-sd2-supply = <&reg_3v3>;
  1699 + vsup-sd3-supply = <&reg_3v3>;
  1700 + vsup-sd4-supply = <&reg_3v3>;
  1701 + vsup-sd5-supply = <&reg_3v3>;
  1702 + vin-ldo0-supply = <&vddio_ddr_1v35>;
  1703 + vin-ldo1-6-supply = <&reg_3v3>;
  1704 + vin-ldo2-5-7-supply = <&vddio_1v8>;
  1705 + vin-ldo3-4-supply = <&reg_3v3>;
  1706 + vin-ldo9-10-supply = <&reg_3v3>;
  1707 + vin-ldo11-supply = <&reg_3v3>;
  1708 +
  1709 + vdd_cpu: sd0 {
  1710 + regulator-name = "+VDD_CPU_AP";
  1711 + regulator-min-microvolt = <700000>;
  1712 + regulator-max-microvolt = <1400000>;
  1713 + regulator-min-microamp = <3500000>;
  1714 + regulator-max-microamp = <3500000>;
  1715 + regulator-always-on;
  1716 + regulator-boot-on;
  1717 + ams,ext-control = <2>;
  1718 + };
  1719 +
  1720 + sd1 {
  1721 + regulator-name = "+VDD_CORE";
  1722 + regulator-min-microvolt = <700000>;
  1723 + regulator-max-microvolt = <1350000>;
  1724 + regulator-min-microamp = <2500000>;
  1725 + regulator-max-microamp = <4000000>;
  1726 + regulator-always-on;
  1727 + regulator-boot-on;
  1728 + ams,ext-control = <1>;
  1729 + };
  1730 +
  1731 + vddio_ddr_1v35: sd2 {
  1732 + regulator-name =
  1733 + "+V1.35_VDDIO_DDR(sd2)";
  1734 + regulator-min-microvolt = <1350000>;
  1735 + regulator-max-microvolt = <1350000>;
  1736 + regulator-always-on;
  1737 + regulator-boot-on;
  1738 + };
  1739 +
  1740 + sd3 {
  1741 + regulator-name =
  1742 + "+V1.35_VDDIO_DDR(sd3)";
  1743 + regulator-min-microvolt = <1350000>;
  1744 + regulator-max-microvolt = <1350000>;
  1745 + regulator-always-on;
  1746 + regulator-boot-on;
  1747 + };
  1748 +
  1749 + vdd_1v05: sd4 {
  1750 + regulator-name = "+V1.05";
  1751 + regulator-min-microvolt = <1050000>;
  1752 + regulator-max-microvolt = <1050000>;
  1753 + };
  1754 +
  1755 + vddio_1v8: sd5 {
  1756 + regulator-name = "+V1.8";
  1757 + regulator-min-microvolt = <1800000>;
  1758 + regulator-max-microvolt = <1800000>;
  1759 + regulator-boot-on;
  1760 + regulator-always-on;
  1761 + };
  1762 +
  1763 + vdd_gpu: sd6 {
  1764 + regulator-name = "+VDD_GPU_AP";
  1765 + regulator-min-microvolt = <650000>;
  1766 + regulator-max-microvolt = <1200000>;
  1767 + regulator-min-microamp = <3500000>;
  1768 + regulator-max-microamp = <3500000>;
  1769 + regulator-boot-on;
  1770 + regulator-always-on;
  1771 + };
  1772 +
  1773 + avdd_1v05: ldo0 {
  1774 + regulator-name = "+V1.05_AVDD";
  1775 + regulator-min-microvolt = <1050000>;
  1776 + regulator-max-microvolt = <1050000>;
  1777 + regulator-boot-on;
  1778 + regulator-always-on;
  1779 + ams,ext-control = <1>;
  1780 + };
  1781 +
  1782 + vddio_sdmmc1: ldo1 {
  1783 + regulator-name = "VDDIO_SDMMC1";
  1784 + regulator-min-microvolt = <1800000>;
  1785 + regulator-max-microvolt = <3300000>;
  1786 + };
  1787 +
  1788 + ldo2 {
  1789 + regulator-name = "+V1.2";
  1790 + regulator-min-microvolt = <1200000>;
  1791 + regulator-max-microvolt = <1200000>;
  1792 + regulator-boot-on;
  1793 + regulator-always-on;
  1794 + };
  1795 +
  1796 + ldo3 {
  1797 + regulator-name = "+V1.05_RTC";
  1798 + regulator-min-microvolt = <1000000>;
  1799 + regulator-max-microvolt = <1000000>;
  1800 + regulator-boot-on;
  1801 + regulator-always-on;
  1802 + ams,enable-tracking;
  1803 + };
  1804 +
  1805 + /* 1.8V for LVDS, 3.3V for eDP */
  1806 + ldo4 {
  1807 + regulator-name = "AVDD_LVDS0_PLL";
  1808 + regulator-min-microvolt = <1800000>;
  1809 + regulator-max-microvolt = <1800000>;
  1810 + };
  1811 +
  1812 + /* LDO5 not used */
  1813 +
  1814 + vddio_sdmmc3: ldo6 {
  1815 + regulator-name = "VDDIO_SDMMC3";
  1816 + regulator-min-microvolt = <1800000>;
  1817 + regulator-max-microvolt = <3300000>;
  1818 + };
  1819 +
  1820 + /* LDO7 not used */
  1821 +
  1822 + ldo9 {
  1823 + regulator-name = "+V3.3_ETH(ldo9)";
  1824 + regulator-min-microvolt = <3300000>;
  1825 + regulator-max-microvolt = <3300000>;
  1826 + regulator-always-on;
  1827 + };
  1828 +
  1829 + ldo10 {
  1830 + regulator-name = "+V3.3_ETH(ldo10)";
  1831 + regulator-min-microvolt = <3300000>;
  1832 + regulator-max-microvolt = <3300000>;
  1833 + regulator-always-on;
  1834 + };
  1835 +
  1836 + ldo11 {
  1837 + regulator-name = "+V1.8_VPP_FUSE";
  1838 + regulator-min-microvolt = <1800000>;
  1839 + regulator-max-microvolt = <1800000>;
  1840 + };
  1841 + };
  1842 + };
  1843 +
  1844 + /*
  1845 + * TMP451 temperature sensor
  1846 + * Note: THERM_N directly connected to AS3722 PMIC THERM
  1847 + */
  1848 + temperature-sensor@4c {
  1849 + compatible = "ti,tmp451";
  1850 + reg = <0x4c>;
  1851 + interrupt-parent = <&gpio>;
  1852 + interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_LEVEL_LOW>;
  1853 + #thermal-sensor-cells = <1>;
  1854 + };
  1855 + };
  1856 +
  1857 + /* SPI1: Apalis SPI1 */
  1858 + spi@7000d400 {
  1859 + status = "okay";
  1860 + spi-max-frequency = <50000000>;
  1861 +
  1862 + spidev0: spidev@0 {
  1863 + compatible = "spidev";
  1864 + reg = <0>;
  1865 + spi-max-frequency = <50000000>;
  1866 + };
  1867 + };
  1868 +
  1869 + /* SPI2: MCU SPI */
  1870 + spi@7000d600 {
  1871 + status = "okay";
  1872 + spi-max-frequency = <25000000>;
  1873 + };
  1874 +
  1875 + /* SPI4: Apalis SPI2 */
  1876 + spi@7000da00 {
  1877 + status = "okay";
  1878 + spi-max-frequency = <50000000>;
  1879 +
  1880 + spidev1: spidev@0 {
  1881 + compatible = "spidev";
  1882 + reg = <0>;
  1883 + spi-max-frequency = <50000000>;
  1884 + };
  1885 + };
  1886 +
  1887 + pmc@7000e400 {
  1888 + nvidia,invert-interrupt;
  1889 + nvidia,suspend-mode = <1>;
  1890 + nvidia,cpu-pwr-good-time = <500>;
  1891 + nvidia,cpu-pwr-off-time = <300>;
  1892 + nvidia,core-pwr-good-time = <641 3845>;
  1893 + nvidia,core-pwr-off-time = <61036>;
  1894 + nvidia,core-power-req-active-high;
  1895 + nvidia,sys-clock-req-active-high;
  1896 +
  1897 + /* Set power_off bit in ResetControl register of AS3722 PMIC */
  1898 + i2c-thermtrip {
  1899 + nvidia,i2c-controller-id = <4>;
  1900 + nvidia,bus-addr = <0x40>;
  1901 + nvidia,reg-addr = <0x36>;
  1902 + nvidia,reg-data = <0x2>;
  1903 + };
  1904 + };
  1905 +
  1906 + /* Apalis Serial ATA */
  1907 + sata@70020000 {
  1908 + avdd-supply = <&vdd_1v05>;
  1909 + hvdd-supply = <&reg_3v3>;
  1910 + vddio-supply = <&vdd_1v05>;
  1911 + status = "okay";
  1912 + };
  1913 +
  1914 + hda@70030000 {
  1915 + status = "okay";
  1916 + };
  1917 +
  1918 + usb@70090000 {
  1919 + /* USBO1, USBO1 (SS), USBH2, USBH4 and USBH4 (SS) */
  1920 + avddio-pex-supply = <&vdd_1v05>;
  1921 + avdd-pll-erefe-supply = <&avdd_1v05>;
  1922 + avdd-pll-utmip-supply = <&vddio_1v8>;
  1923 + avdd-usb-ss-pll-supply = <&vdd_1v05>;
  1924 + avdd-usb-supply = <&reg_3v3>;
  1925 + dvddio-pex-supply = <&vdd_1v05>;
  1926 + hvdd-usb-ss-pll-e-supply = <&reg_3v3>;
  1927 + hvdd-usb-ss-supply = <&reg_3v3>;
  1928 + status = "okay";
  1929 + };
  1930 +
  1931 + padctl@7009f000 {
  1932 + pinctrl-0 = <&padctl_default>;
  1933 + pinctrl-names = "default";
  1934 +
  1935 + padctl_default: pinmux {
  1936 + usb3 {
  1937 + nvidia,lanes = "pcie-0", "pcie-1";
  1938 + nvidia,function = "usb3";
  1939 + nvidia,iddq = <0>;
  1940 + };
  1941 +
  1942 + pcie {
  1943 + nvidia,lanes = "pcie-2", "pcie-3",
  1944 + "pcie-4";
  1945 + nvidia,function = "pcie";
  1946 + nvidia,iddq = <0>;
  1947 + };
  1948 +
  1949 + sata {
  1950 + nvidia,lanes = "sata-0";
  1951 + nvidia,function = "sata";
  1952 + nvidia,iddq = <0>;
  1953 + };
  1954 + };
  1955 + };
  1956 +
  1957 + /* Apalis MMC1 */
  1958 + sdhci@700b0000 {
  1959 + status = "okay";
  1960 + /* MMC1_CD# */
  1961 + cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_LOW>;
  1962 + bus-width = <4>;
  1963 + vqmmc-supply = <&vddio_sdmmc1>;
  1964 + };
  1965 +
  1966 + /* Apalis SD1 */
  1967 + sdhci@700b0400 {
  1968 + status = "okay";
  1969 + /* SD1_CD# */
  1970 + cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
  1971 + bus-width = <4>;
  1972 + vqmmc-supply = <&vddio_sdmmc3>;
  1973 + };
  1974 +
  1975 + /* eMMC */
  1976 + sdhci@700b0600 {
  1977 + status = "okay";
  1978 + bus-width = <8>;
  1979 + non-removable;
  1980 + };
  1981 +
  1982 + /* CPU DFLL clock */
  1983 + clock@70110000 {
  1984 + status = "okay";
  1985 + vdd-cpu-supply = <&vdd_cpu>;
  1986 + nvidia,i2c-fs-rate = <400000>;
  1987 + };
  1988 +
  1989 + ahub@70300000 {
  1990 + i2s@70301200 {
  1991 + status = "okay";
  1992 + };
  1993 + };
  1994 +
  1995 + /* EHCI instance 0: USB1_DP/N -> USBO1_DP/N */
  1996 + usb@7d000000 {
  1997 + status = "okay";
  1998 + dr_mode = "otg";
  1999 + };
  2000 +
  2001 + usb-phy@7d000000 {
  2002 + status = "okay";
  2003 + vbus-supply = <&reg_usbo1_vbus>;
  2004 + };
  2005 +
  2006 + /* EHCI instance 1: USB2_DP/N -> USBH2_DP/N */
  2007 + usb@7d004000 {
  2008 + status = "okay";
  2009 + };
  2010 +
  2011 + usb-phy@7d004000 {
  2012 + status = "okay";
  2013 + vbus-supply = <&reg_usbh_vbus>;
  2014 + };
  2015 +
  2016 + /* EHCI instance 2: USB3_DP/N -> USBH4_DP/N */
  2017 + usb@7d008000 {
  2018 + status = "okay";
  2019 + };
  2020 +
  2021 + usb-phy@7d008000 {
  2022 + status = "okay";
  2023 + vbus-supply = <&reg_usbh_vbus>;
  2024 + };
  2025 +
  2026 + backlight: backlight {
  2027 + compatible = "pwm-backlight";
  2028 + /* BKL1_PWM */
  2029 + pwms = <&pwm 3 5000000>;
  2030 + brightness-levels = <255 231 223 207 191 159 127 0>;
  2031 + default-brightness-level = <6>;
  2032 + /* BKL1_ON */
  2033 + enable-gpios = <&gpio TEGRA_GPIO(BB, 5) GPIO_ACTIVE_HIGH>;
  2034 + };
  2035 +
  2036 + clocks {
  2037 + compatible = "simple-bus";
  2038 + #address-cells = <1>;
  2039 + #size-cells = <0>;
  2040 +
  2041 + clk32k_in: clock@0 {
  2042 + compatible = "fixed-clock";
  2043 + reg = <0>;
  2044 + #clock-cells = <0>;
  2045 + clock-frequency = <32768>;
  2046 + };
  2047 + };
  2048 +
  2049 + cpus {
  2050 + cpu@0 {
  2051 + vdd-cpu-supply = <&vdd_cpu>;
  2052 + };
  2053 + };
  2054 +
  2055 + gpio-keys {
  2056 + compatible = "gpio-keys";
  2057 +
  2058 + wakeup {
  2059 + label = "WAKE1_MICO";
  2060 + gpios = <&gpio TEGRA_GPIO(DD, 3) GPIO_ACTIVE_LOW>;
  2061 + linux,code = <KEY_WAKEUP>;
  2062 + debounce-interval = <10>;
  2063 + wakeup-source;
  2064 + };
  2065 + };
  2066 +
  2067 + reg_1v05_avdd_hdmi_pll: regulator-1v05-avdd-hdmi-pll {
  2068 + compatible = "regulator-fixed";
  2069 + regulator-name = "+V1.05_AVDD_HDMI_PLL";
  2070 + regulator-min-microvolt = <1050000>;
  2071 + regulator-max-microvolt = <1050000>;
  2072 + gpio = <&gpio TEGRA_GPIO(H, 7) GPIO_ACTIVE_LOW>;
  2073 + vin-supply = <&vdd_1v05>;
  2074 + };
  2075 +
  2076 + reg_3v3_mxm: regulator-3v3-mxm {
  2077 + compatible = "regulator-fixed";
  2078 + regulator-name = "+V3.3_MXM";
  2079 + regulator-min-microvolt = <3300000>;
  2080 + regulator-max-microvolt = <3300000>;
  2081 + regulator-always-on;
  2082 + regulator-boot-on;
  2083 + };
  2084 +
  2085 + reg_3v3: regulator-3v3 {
  2086 + compatible = "regulator-fixed";
  2087 + regulator-name = "+V3.3";
  2088 + regulator-min-microvolt = <3300000>;
  2089 + regulator-max-microvolt = <3300000>;
  2090 + regulator-always-on;
  2091 + regulator-boot-on;
  2092 + /* PWR_EN_+V3.3 */
  2093 + gpio = <&pmic 2 GPIO_ACTIVE_HIGH>;
  2094 + enable-active-high;
  2095 + vin-supply = <&reg_3v3_mxm>;
  2096 + };
  2097 +
  2098 + reg_3v3_avdd_hdmi: regulator-3v3-avdd-hdmi {
  2099 + compatible = "regulator-fixed";
  2100 + regulator-name = "+V3.3_AVDD_HDMI";
  2101 + regulator-min-microvolt = <3300000>;
  2102 + regulator-max-microvolt = <3300000>;
  2103 + vin-supply = <&vdd_1v05>;
  2104 + };
  2105 +
  2106 + reg_5v0: regulator-5v0 {
  2107 + compatible = "regulator-fixed";
  2108 + regulator-name = "5V_SW";
  2109 + regulator-min-microvolt = <5000000>;
  2110 + regulator-max-microvolt = <5000000>;
  2111 + };
  2112 +
  2113 + /* USBO1_EN */
  2114 + reg_usbo1_vbus: regulator-usbo1-vbus {
  2115 + compatible = "regulator-fixed";
  2116 + regulator-name = "VCC_USBO1";
  2117 + regulator-min-microvolt = <5000000>;
  2118 + regulator-max-microvolt = <5000000>;
  2119 + gpio = <&gpio TEGRA_GPIO(N, 4) GPIO_ACTIVE_HIGH>;
  2120 + enable-active-high;
  2121 + vin-supply = <&reg_5v0>;
  2122 + };
  2123 +
  2124 + /* USBH_EN */
  2125 + reg_usbh_vbus: regulator-usbh-vbus {
  2126 + compatible = "regulator-fixed";
  2127 + regulator-name = "VCC_USBH(2A|2C|2D|3|4)";
  2128 + regulator-min-microvolt = <5000000>;
  2129 + regulator-max-microvolt = <5000000>;
  2130 + gpio = <&gpio TEGRA_GPIO(N, 5) GPIO_ACTIVE_HIGH>;
  2131 + enable-active-high;
  2132 + vin-supply = <&reg_5v0>;
  2133 + };
  2134 +
  2135 + sound {
  2136 + compatible = "toradex,tegra-audio-sgtl5000-apalis_tk1",
  2137 + "nvidia,tegra-audio-sgtl5000";
  2138 + nvidia,model = "Toradex Apalis TK1";
  2139 + nvidia,audio-routing =
  2140 + "Headphone Jack", "HP_OUT",
  2141 + "LINE_IN", "Line In Jack",
  2142 + "MIC_IN", "Mic Jack";
  2143 + nvidia,i2s-controller = <&tegra_i2s2>;
  2144 + nvidia,audio-codec = <&sgtl5000>;
  2145 + clocks = <&tegra_car TEGRA124_CLK_PLL_A>,
  2146 + <&tegra_car TEGRA124_CLK_PLL_A_OUT0>,
  2147 + <&tegra_car TEGRA124_CLK_EXTERN1>;
  2148 + clock-names = "pll_a", "pll_a_out0", "mclk";
  2149 + };
  2150 +
  2151 + thermal-zones {
  2152 + cpu {
  2153 + trips {
  2154 + trip@0 {
  2155 + temperature = <101000>;
  2156 + hysteresis = <0>;
  2157 + type = "critical";
  2158 + };
  2159 + };
  2160 +
  2161 + cooling-maps {
  2162 + /*
  2163 + * There are currently no cooling maps because
  2164 + * there are no cooling devices
  2165 + */
  2166 + };
  2167 + };
  2168 +
  2169 + mem {
  2170 + trips {
  2171 + trip@0 {
  2172 + temperature = <101000>;
  2173 + hysteresis = <0>;
  2174 + type = "critical";
  2175 + };
  2176 + };
  2177 +
  2178 + cooling-maps {
  2179 + /*
  2180 + * There are currently no cooling maps because
  2181 + * there are no cooling devices
  2182 + */
  2183 + };
  2184 + };
  2185 +
  2186 + gpu {
  2187 + trips {
  2188 + trip@0 {
  2189 + temperature = <101000>;
  2190 + hysteresis = <0>;
  2191 + type = "critical";
  2192 + };
  2193 + };
  2194 +
  2195 + cooling-maps {
  2196 + /*
  2197 + * There are currently no cooling maps because
  2198 + * there are no cooling devices
  2199 + */
  2200 + };
  2201 + };
  2202 + };
  2203 +};
arch/arm/mach-tegra/tegra124/Kconfig
... ... @@ -4,6 +4,12 @@
4 4 prompt "Tegra124 board select"
5 5 optional
6 6  
  7 +config TARGET_APALIS_TK1
  8 + bool "Toradex Apalis TK1 module"
  9 + select CPU_V7_HAS_NONSEC
  10 + select CPU_V7_HAS_VIRT
  11 + select ARCH_SUPPORT_PSCI
  12 +
7 13 config TARGET_JETSON_TK1
8 14 bool "NVIDIA Tegra124 Jetson TK1 board"
9 15 select BOARD_LATE_INIT
... ... @@ -46,6 +52,7 @@
46 52 source "board/nvidia/jetson-tk1/Kconfig"
47 53 source "board/nvidia/nyan-big/Kconfig"
48 54 source "board/nvidia/venice2/Kconfig"
  55 +source "board/toradex/apalis-tk1/Kconfig"
49 56  
50 57 endif
board/toradex/apalis-tk1/Kconfig
  1 +if TARGET_APALIS_TK1
  2 +
  3 +config SYS_BOARD
  4 + default "apalis-tk1"
  5 +
  6 +config SYS_VENDOR
  7 + default "toradex"
  8 +
  9 +config SYS_CONFIG_NAME
  10 + default "apalis-tk1"
  11 +
  12 +config TDX_CFG_BLOCK
  13 + default y
  14 +
  15 +config TDX_HAVE_MMC
  16 + default y
  17 +
  18 +config TDX_CFG_BLOCK_DEV
  19 + default "0"
  20 +
  21 +config TDX_CFG_BLOCK_PART
  22 + default "1"
  23 +
  24 +# Toradex config block in eMMC, at the end of 1st "boot sector"
  25 +config TDX_CFG_BLOCK_OFFSET
  26 + default "-512"
  27 +
  28 +source "board/toradex/common/Kconfig"
  29 +
  30 +endif
board/toradex/apalis-tk1/MAINTAINERS
  1 +Apalis TK1
  2 +M: Marcel Ziswiler <marcel.ziswiler@toradex.com>
  3 +S: Maintained
  4 +F: board/toradex/apalis-tk1/
  5 +F: include/configs/apalis-tk1.h
  6 +F: configs/apalis-tk1_defconfig
  7 +F: arch/arm/dts/tegra124-apalis.dtb
board/toradex/apalis-tk1/Makefile
  1 +# Copyright (c) 2016 Toradex, Inc.
  2 +# SPDX-License-Identifier: GPL-2.0+
  3 +
  4 +obj-y += as3722_init.o
  5 +obj-y += apalis-tk1.o
board/toradex/apalis-tk1/apalis-tk1.c
  1 +/*
  2 + * Copyright (c) 2016 Toradex, Inc.
  3 + *
  4 + * SPDX-License-Identifier: GPL-2.0+
  5 + */
  6 +
  7 +#include <common.h>
  8 +#include <asm/arch-tegra/ap.h>
  9 +#include <asm/gpio.h>
  10 +#include <asm/io.h>
  11 +#include <asm/arch/gpio.h>
  12 +#include <asm/arch/pinmux.h>
  13 +#include <power/as3722.h>
  14 +
  15 +#include "../common/tdx-common.h"
  16 +#include "pinmux-config-apalis-tk1.h"
  17 +
  18 +#define LAN_RESET_N TEGRA_GPIO(S, 2)
  19 +
  20 +int arch_misc_init(void)
  21 +{
  22 + if (readl(NV_PA_BASE_SRAM + NVBOOTINFOTABLE_BOOTTYPE) ==
  23 + NVBOOTTYPE_RECOVERY)
  24 + printf("USB recovery mode\n");
  25 +
  26 + return 0;
  27 +}
  28 +
  29 +int checkboard(void)
  30 +{
  31 + puts("Model: Toradex Apalis TK1 2GB\n");
  32 +
  33 + return 0;
  34 +}
  35 +
  36 +#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
  37 +int ft_board_setup(void *blob, bd_t *bd)
  38 +{
  39 + return ft_common_board_setup(blob, bd);
  40 +}
  41 +#endif
  42 +
  43 +/*
  44 + * Routine: pinmux_init
  45 + * Description: Do individual peripheral pinmux configs
  46 + */
  47 +void pinmux_init(void)
  48 +{
  49 + pinmux_clear_tristate_input_clamping();
  50 +
  51 + gpio_config_table(apalis_tk1_gpio_inits,
  52 + ARRAY_SIZE(apalis_tk1_gpio_inits));
  53 +
  54 + pinmux_config_pingrp_table(apalis_tk1_pingrps,
  55 + ARRAY_SIZE(apalis_tk1_pingrps));
  56 +
  57 + pinmux_config_drvgrp_table(apalis_tk1_drvgrps,
  58 + ARRAY_SIZE(apalis_tk1_drvgrps));
  59 +}
  60 +
  61 +#ifdef CONFIG_PCI_TEGRA
  62 +int tegra_pcie_board_init(void)
  63 +{
  64 + struct udevice *pmic;
  65 + int err;
  66 +
  67 + err = as3722_init(&pmic);
  68 + if (err) {
  69 + error("failed to initialize AS3722 PMIC: %d\n", err);
  70 + return err;
  71 + }
  72 +
  73 + err = as3722_sd_enable(pmic, 4);
  74 + if (err < 0) {
  75 + error("failed to enable SD4: %d\n", err);
  76 + return err;
  77 + }
  78 +
  79 + err = as3722_sd_set_voltage(pmic, 4, 0x24);
  80 + if (err < 0) {
  81 + error("failed to set SD4 voltage: %d\n", err);
  82 + return err;
  83 + }
  84 +
  85 + err = as3722_gpio_configure(pmic, 1, AS3722_GPIO_OUTPUT_VDDH |
  86 + AS3722_GPIO_INVERT);
  87 + if (err < 0) {
  88 + error("failed to configure GPIO#1 as output: %d\n", err);
  89 + return err;
  90 + }
  91 +
  92 + err = as3722_gpio_direction_output(pmic, 2, 1);
  93 + if (err < 0) {
  94 + error("failed to set GPIO#2 high: %d\n", err);
  95 + return err;
  96 + }
  97 +
  98 + /* Reset I210 Gigabit Ethernet Controller */
  99 + gpio_request(LAN_RESET_N, "LAN_RESET_N");
  100 + gpio_direction_output(LAN_RESET_N, 0);
  101 +
  102 + /*
  103 + * Make sure we don't get any back feeding from LAN_WAKE_N resp.
  104 + * DEV_OFF_N
  105 + */
  106 + gpio_request(TEGRA_GPIO(O, 5), "LAN_WAKE_N");
  107 + gpio_direction_output(TEGRA_GPIO(O, 5), 0);
  108 +
  109 + gpio_request(TEGRA_GPIO(O, 6), "LAN_DEV_OFF_N");
  110 + gpio_direction_output(TEGRA_GPIO(O, 6), 0);
  111 +
  112 + /* Make sure LDO9 and LDO10 are initially enabled @ 0V */
  113 + err = as3722_ldo_enable(pmic, 9);
  114 + if (err < 0) {
  115 + error("failed to enable LDO9: %d\n", err);
  116 + return err;
  117 + }
  118 + err = as3722_ldo_enable(pmic, 10);
  119 + if (err < 0) {
  120 + error("failed to enable LDO10: %d\n", err);
  121 + return err;
  122 + }
  123 + err = as3722_ldo_set_voltage(pmic, 9, 0x80);
  124 + if (err < 0) {
  125 + error("failed to set LDO9 voltage: %d\n", err);
  126 + return err;
  127 + }
  128 + err = as3722_ldo_set_voltage(pmic, 10, 0x80);
  129 + if (err < 0) {
  130 + error("failed to set LDO10 voltage: %d\n", err);
  131 + return err;
  132 + }
  133 +
  134 + mdelay(100);
  135 +
  136 + /* Make sure controller gets enabled by disabling DEV_OFF_N */
  137 + gpio_set_value(TEGRA_GPIO(O, 6), 1);
  138 +
  139 + /* Enable LDO9 and LDO10 for +V3.3_ETH on patched prototypes */
  140 + err = as3722_ldo_set_voltage(pmic, 9, 0xff);
  141 + if (err < 0) {
  142 + error("failed to set LDO9 voltage: %d\n", err);
  143 + return err;
  144 + }
  145 + err = as3722_ldo_set_voltage(pmic, 10, 0xff);
  146 + if (err < 0) {
  147 + error("failed to set LDO10 voltage: %d\n", err);
  148 + return err;
  149 + }
  150 +
  151 + mdelay(100);
  152 + gpio_set_value(LAN_RESET_N, 1);
  153 +
  154 +#ifdef APALIS_TK1_PCIE_EVALBOARD_INIT
  155 +#define PEX_PERST_N TEGRA_GPIO(DD, 1) /* Apalis GPIO7 */
  156 +#define RESET_MOCI_CTRL TEGRA_GPIO(U, 4)
  157 +
  158 + /* Reset PLX PEX 8605 PCIe Switch plus PCIe devices on Apalis Evaluation
  159 + Board */
  160 + gpio_request(PEX_PERST_N, "PEX_PERST_N");
  161 + gpio_request(RESET_MOCI_CTRL, "RESET_MOCI_CTRL");
  162 + gpio_direction_output(PEX_PERST_N, 0);
  163 + gpio_direction_output(RESET_MOCI_CTRL, 0);
  164 + /* Must be asserted for 100 ms after power and clocks are stable */
  165 + mdelay(100);
  166 + gpio_set_value(PEX_PERST_N, 1);
  167 + /* Err_5: PEX_REFCLK_OUTpx/nx Clock Outputs is not Guaranteed Until
  168 + 900 us After PEX_PERST# De-assertion */
  169 + mdelay(1);
  170 + gpio_set_value(RESET_MOCI_CTRL, 1);
  171 +#endif /* APALIS_T30_PCIE_EVALBOARD_INIT */
  172 +
  173 + return 0;
  174 +}
  175 +#endif /* CONFIG_PCI_TEGRA */
board/toradex/apalis-tk1/as3722_init.c
  1 +/*
  2 + * Copyright (c) 2012-2016 Toradex, Inc.
  3 + *
  4 + * SPDX-License-Identifier: GPL-2.0+
  5 + */
  6 +
  7 +#include <common.h>
  8 +#include <asm/io.h>
  9 +#include <asm/arch-tegra/tegra_i2c.h>
  10 +#include "as3722_init.h"
  11 +
  12 +/* AS3722-PMIC-specific early init code - get CPU rails up, etc */
  13 +
  14 +void tegra_i2c_ll_write_addr(uint addr, uint config)
  15 +{
  16 + struct i2c_ctlr *reg = (struct i2c_ctlr *)TEGRA_DVC_BASE;
  17 +
  18 + writel(addr, &reg->cmd_addr0);
  19 + writel(config, &reg->cnfg);
  20 +}
  21 +
  22 +void tegra_i2c_ll_write_data(uint data, uint config)
  23 +{
  24 + struct i2c_ctlr *reg = (struct i2c_ctlr *)TEGRA_DVC_BASE;
  25 +
  26 + writel(data, &reg->cmd_data1);
  27 + writel(config, &reg->cnfg);
  28 +}
  29 +
  30 +void pmic_enable_cpu_vdd(void)
  31 +{
  32 + debug("%s entry\n", __func__);
  33 +
  34 +#ifdef AS3722_SD1VOLTAGE_DATA
  35 + /* Set up VDD_CORE, for boards where OTP is incorrect*/
  36 + debug("%s: Setting VDD_CORE via AS3722 reg 1\n", __func__);
  37 + /* Configure VDD_CORE via the AS3722 PMIC on the PWR I2C bus */
  38 + tegra_i2c_ll_write_addr(AS3722_I2C_ADDR, 2);
  39 + tegra_i2c_ll_write_data(AS3722_SD1VOLTAGE_DATA, I2C_SEND_2_BYTES);
  40 + /*
  41 + * Don't write SDCONTROL - it's already 0x7F, i.e. all SDs enabled.
  42 + * tegra_i2c_ll_write_data(AS3722_SD1CONTROL_DATA, I2C_SEND_2_BYTES);
  43 + */
  44 + udelay(10 * 1000);
  45 +#endif
  46 +
  47 + debug("%s: Setting VDD_CPU to 1.0V via AS3722 reg 0/4D\n", __func__);
  48 + /*
  49 + * Bring up VDD_CPU via the AS3722 PMIC on the PWR I2C bus.
  50 + * First set VDD to 1.0V, then enable the VDD regulator.
  51 + */
  52 + tegra_i2c_ll_write_addr(AS3722_I2C_ADDR, 2);
  53 + tegra_i2c_ll_write_data(AS3722_SD0VOLTAGE_DATA, I2C_SEND_2_BYTES);
  54 + /*
  55 + * Don't write SDCONTROL - it's already 0x7F, i.e. all SDs enabled.
  56 + * tegra_i2c_ll_write_data(AS3722_SD0CONTROL_DATA, I2C_SEND_2_BYTES);
  57 + */
  58 + udelay(10 * 1000);
  59 +
  60 + debug("%s: Setting VDD_GPU to 1.0V via AS3722 reg 6/4D\n", __func__);
  61 + /*
  62 + * Bring up VDD_GPU via the AS3722 PMIC on the PWR I2C bus.
  63 + * First set VDD to 1.0V, then enable the VDD regulator.
  64 + */
  65 + tegra_i2c_ll_write_addr(AS3722_I2C_ADDR, 2);
  66 + tegra_i2c_ll_write_data(AS3722_SD6VOLTAGE_DATA, I2C_SEND_2_BYTES);
  67 + /*
  68 + * Don't write SDCONTROL - it's already 0x7F, i.e. all SDs enabled.
  69 + * tegra_i2c_ll_write_data(AS3722_SD6CONTROL_DATA, I2C_SEND_2_BYTES);
  70 + */
  71 + udelay(10 * 1000);
  72 +
  73 + debug("%s: Set VPP_FUSE to 1.2V via AS3722 reg 0x12/4E\n", __func__);
  74 + /*
  75 + * Bring up VPP_FUSE via the AS3722 PMIC on the PWR I2C bus.
  76 + * First set VDD to 1.2V, then enable the VDD regulator.
  77 + */
  78 + tegra_i2c_ll_write_addr(AS3722_I2C_ADDR, 2);
  79 + tegra_i2c_ll_write_data(AS3722_LDO2VOLTAGE_DATA, I2C_SEND_2_BYTES);
  80 + /*
  81 + * Don't write LDCONTROL - it's already 0xFF, i.e. all LDOs enabled.
  82 + * tegra_i2c_ll_write_data(AS3722_LDO2CONTROL_DATA, I2C_SEND_2_BYTES);
  83 + */
  84 + udelay(10 * 1000);
  85 +
  86 + debug("%s: Set VDD_SDMMC1 to 3.3V via AS3722 reg 0x11/4E\n", __func__);
  87 + /*
  88 + * Bring up VDD_SDMMC1 via the AS3722 PMIC on the PWR I2C bus.
  89 + * First set it to value closest to 3.3V, then enable the regulator
  90 + *
  91 + * NOTE: We do this early because doing it later seems to hose the CPU
  92 + * power rail/partition startup. Need to debug.
  93 + */
  94 + tegra_i2c_ll_write_addr(AS3722_I2C_ADDR, 2);
  95 + tegra_i2c_ll_write_data(AS3722_LDO1VOLTAGE_DATA, I2C_SEND_2_BYTES);
  96 + /*
  97 + * Don't write LDCONTROL - it's already 0xFF, i.e. all LDOs enabled.
  98 + * tegra_i2c_ll_write_data(AS3722_LDO1CONTROL_DATA, I2C_SEND_2_BYTES);
  99 + */
  100 + udelay(10 * 1000);
  101 +
  102 + debug("%s: Set VDD_SDMMC3 to 3.3V via AS3722 reg 0x16/4E\n", __func__);
  103 + /*
  104 + * Bring up VDD_SDMMC3 via the AS3722 PMIC on the PWR I2C bus.
  105 + * First set it to bypass 3.3V straight thru, then enable the regulator
  106 + *
  107 + * NOTE: We do this early because doing it later seems to hose the CPU
  108 + * power rail/partition startup. Need to debug.
  109 + */
  110 + tegra_i2c_ll_write_addr(AS3722_I2C_ADDR, 2);
  111 + tegra_i2c_ll_write_data(AS3722_LDO6VOLTAGE_DATA, I2C_SEND_2_BYTES);
  112 + /*
  113 + * Don't write LDCONTROL - it's already 0xFF, i.e. all LDOs enabled.
  114 + * tegra_i2c_ll_write_data(AS3722_LDO6CONTROL_DATA, I2C_SEND_2_BYTES);
  115 + */
  116 + udelay(10 * 1000);
  117 +}
board/toradex/apalis-tk1/as3722_init.h
  1 +/*
  2 + * Copyright (c) 2012-2016 Toradex, Inc.
  3 + *
  4 + * SPDX-License-Identifier: GPL-2.0+
  5 + */
  6 +
  7 +/* AS3722-PMIC-specific early init regs */
  8 +
  9 +#define AS3722_I2C_ADDR 0x80
  10 +
  11 +#define AS3722_SD0VOLTAGE_REG 0x00 /* CPU */
  12 +#define AS3722_SD1VOLTAGE_REG 0x01 /* CORE, already set by OTP */
  13 +#define AS3722_SD6VOLTAGE_REG 0x06 /* GPU */
  14 +#define AS3722_SDCONTROL_REG 0x4D
  15 +
  16 +#define AS3722_LDO1VOLTAGE_REG 0x11 /* VDD_SDMMC1 */
  17 +#define AS3722_LDO2VOLTAGE_REG 0x12 /* VPP_FUSE */
  18 +#define AS3722_LDO6VOLTAGE_REG 0x16 /* VDD_SDMMC3 */
  19 +#define AS3722_LDCONTROL_REG 0x4E
  20 +
  21 +#define AS3722_SD0VOLTAGE_DATA (0x3C00 | AS3722_SD0VOLTAGE_REG)
  22 +#define AS3722_SD0CONTROL_DATA (0x0100 | AS3722_SDCONTROL_REG)
  23 +
  24 +#define AS3722_SD1VOLTAGE_DATA (0x3200 | AS3722_SD1VOLTAGE_REG)
  25 +#define AS3722_SD1CONTROL_DATA (0x0200 | AS3722_SDCONTROL_REG)
  26 +
  27 +#define AS3722_SD6CONTROL_DATA (0x4000 | AS3722_SDCONTROL_REG)
  28 +#define AS3722_SD6VOLTAGE_DATA (0x2800 | AS3722_SD6VOLTAGE_REG)
  29 +
  30 +#define AS3722_LDO1CONTROL_DATA (0x0200 | AS3722_LDCONTROL_REG)
  31 +#define AS3722_LDO1VOLTAGE_DATA (0x7F00 | AS3722_LDO1VOLTAGE_REG)
  32 +
  33 +#define AS3722_LDO2CONTROL_DATA (0x0400 | AS3722_LDCONTROL_REG)
  34 +#define AS3722_LDO2VOLTAGE_DATA (0x1000 | AS3722_LDO2VOLTAGE_REG)
  35 +
  36 +#define AS3722_LDO6CONTROL_DATA (0x4000 | AS3722_LDCONTROL_REG)
  37 +#define AS3722_LDO6VOLTAGE_DATA (0x3F00 | AS3722_LDO6VOLTAGE_REG)
  38 +
  39 +#define I2C_SEND_2_BYTES 0x0A02
  40 +
  41 +void pmic_enable_cpu_vdd(void);
board/toradex/apalis-tk1/pinmux-config-apalis-tk1.h
  1 +/*
  2 + * Copyright (c) 2016, Toradex, Inc.
  3 + *
  4 + * SPDX-License-Identifier: GPL-2.0+
  5 + */
  6 +
  7 +#ifndef _PINMUX_CONFIG_APALIS_TK1_H_
  8 +#define _PINMUX_CONFIG_APALIS_TK1_H_
  9 +
  10 +#define GPIO_INIT(_port, _gpio, _init) \
  11 + { \
  12 + .gpio = TEGRA_GPIO(_port, _gpio), \
  13 + .init = TEGRA_GPIO_INIT_##_init, \
  14 + }
  15 +
  16 +static const struct tegra_gpio_config apalis_tk1_gpio_inits[] = {
  17 + /* port, pin, init_val */
  18 + GPIO_INIT(A, 1, IN),
  19 + GPIO_INIT(B, 1, IN),
  20 + GPIO_INIT(C, 0, OUT0),
  21 + GPIO_INIT(I, 5, IN),
  22 + GPIO_INIT(I, 6, IN),
  23 + GPIO_INIT(J, 0, IN),
  24 + GPIO_INIT(J, 2, IN),
  25 + GPIO_INIT(K, 2, IN),
  26 + GPIO_INIT(K, 7, IN),
  27 + GPIO_INIT(N, 2, OUT1),
  28 + GPIO_INIT(N, 4, OUT1),
  29 + GPIO_INIT(N, 5, OUT1),
  30 + GPIO_INIT(N, 7, IN),
  31 + GPIO_INIT(O, 5, IN),
  32 + GPIO_INIT(Q, 0, OUT0), /* Shift_CTRL_OE[0] */
  33 + GPIO_INIT(Q, 1, OUT0), /* Shift_CTRL_OE[1] */
  34 + GPIO_INIT(Q, 2, OUT0), /* Shift_CTRL_OE[2] */
  35 + GPIO_INIT(Q, 4, OUT0), /* Shift_CTRL_OE[4] */
  36 + GPIO_INIT(Q, 5, OUT1), /* Shift_CTRL_Dir_Out[0] */
  37 + GPIO_INIT(Q, 6, OUT1), /* Shift_CTRL_Dir_Out[1] */
  38 + GPIO_INIT(Q, 7, OUT1), /* Shift_CTRL_Dir_Out[2] */
  39 + GPIO_INIT(R, 0, OUT0), /* Shift_CTRL_Dir_In[0] */
  40 + GPIO_INIT(R, 1, OUT0), /* Shift_CTRL_Dir_In[1] */
  41 + GPIO_INIT(R, 2, OUT0), /* Shift_CTRL_OE[3] */
  42 + GPIO_INIT(S, 3, OUT0), /* Shift_CTRL_Dir_In[2] */
  43 + GPIO_INIT(U, 4, OUT1),
  44 + GPIO_INIT(W, 3, IN),
  45 + GPIO_INIT(W, 5, IN),
  46 + GPIO_INIT(BB, 0, IN),
  47 + GPIO_INIT(BB, 3, OUT0),
  48 + GPIO_INIT(BB, 4, IN),
  49 + GPIO_INIT(BB, 5, OUT1),
  50 + GPIO_INIT(BB, 6, OUT0),
  51 + GPIO_INIT(CC, 5, IN),
  52 + GPIO_INIT(DD, 3, IN),
  53 + GPIO_INIT(EE, 3, IN),
  54 + GPIO_INIT(EE, 5, IN),
  55 + GPIO_INIT(FF, 1, IN),
  56 +};
  57 +
  58 +#define PINCFG(_pingrp, _mux, _pull, _tri, _io, _od, _rcv_sel) \
  59 + { \
  60 + .pingrp = PMUX_PINGRP_##_pingrp, \
  61 + .func = PMUX_FUNC_##_mux, \
  62 + .pull = PMUX_PULL_##_pull, \
  63 + .tristate = PMUX_TRI_##_tri, \
  64 + .io = PMUX_PIN_##_io, \
  65 + .od = PMUX_PIN_OD_##_od, \
  66 + .rcv_sel = PMUX_PIN_RCV_SEL_##_rcv_sel, \
  67 + .lock = PMUX_PIN_LOCK_DEFAULT, \
  68 + .ioreset = PMUX_PIN_IO_RESET_DEFAULT, \
  69 + }
  70 +
  71 +static const struct pmux_pingrp_config apalis_tk1_pingrps[] = {
  72 + /* pingrp, mux, pull, tri, e_input, od, rcv_sel */
  73 + PINCFG(CLK_32K_OUT_PA0, SOC, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT),
  74 + PINCFG(UART3_CTS_N_PA1, GMI, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT),
  75 + PINCFG(DAP2_FS_PA2, HDA, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT),
  76 + PINCFG(DAP2_SCLK_PA3, HDA, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT),
  77 + PINCFG(DAP2_DIN_PA4, HDA, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT),
  78 + PINCFG(DAP2_DOUT_PA5, HDA, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  79 + PINCFG(SDMMC3_CLK_PA6, SDMMC3, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT),
  80 + PINCFG(SDMMC3_CMD_PA7, SDMMC3, UP, NORMAL, INPUT, DEFAULT, DEFAULT),
  81 + PINCFG(PB0, UARTD, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT),
  82 + PINCFG(PB1, RSVD2, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT),
  83 + PINCFG(SDMMC3_DAT3_PB4, SDMMC3, UP, NORMAL, INPUT, DEFAULT, DEFAULT),
  84 + PINCFG(SDMMC3_DAT2_PB5, SDMMC3, UP, NORMAL, INPUT, DEFAULT, DEFAULT),
  85 + PINCFG(SDMMC3_DAT1_PB6, SDMMC3, UP, NORMAL, INPUT, DEFAULT, DEFAULT),
  86 + PINCFG(SDMMC3_DAT0_PB7, SDMMC3, UP, NORMAL, INPUT, DEFAULT, DEFAULT),
  87 + PINCFG(UART3_RTS_N_PC0, GMI, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  88 + PINCFG(UART2_TXD_PC2, IRDA, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  89 + PINCFG(UART2_RXD_PC3, IRDA, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT),
  90 + PINCFG(GEN1_I2C_SCL_PC4, I2C1, NORMAL, NORMAL, INPUT, ENABLE, DEFAULT),
  91 + PINCFG(GEN1_I2C_SDA_PC5, I2C1, NORMAL, NORMAL, INPUT, ENABLE, DEFAULT),
  92 + PINCFG(PC7, RSVD1, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  93 + PINCFG(PG0, RSVD1, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  94 + PINCFG(PG1, RSVD1, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  95 + PINCFG(PG2, RSVD1, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  96 + PINCFG(PG3, RSVD1, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  97 + PINCFG(PG4, RSVD1, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  98 + PINCFG(PG5, SPI4, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  99 + PINCFG(PG6, SPI4, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  100 + PINCFG(PG7, SPI4, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT),
  101 + PINCFG(PH0, PWM0, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  102 + PINCFG(PH1, PWM1, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  103 + PINCFG(PH2, PWM2, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  104 + PINCFG(PH3, PWM3, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  105 + PINCFG(PH4, RSVD2, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  106 + PINCFG(PH5, RSVD2, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  107 + PINCFG(PH6, GMI, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  108 + PINCFG(PH7, GMI, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  109 + PINCFG(PI0, RSVD1, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  110 + PINCFG(PI1, RSVD1, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  111 + PINCFG(PI2, RSVD4, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  112 + PINCFG(PI3, SPI4, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  113 + PINCFG(PI4, GMI, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  114 + PINCFG(PI5, RSVD2, UP, TRISTATE, INPUT, ENABLE, DEFAULT),
  115 + PINCFG(PI6, RSVD1, UP, TRISTATE, INPUT, DEFAULT, DEFAULT),
  116 + PINCFG(PI7, RSVD1, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  117 + PINCFG(PJ0, RSVD1, UP, TRISTATE, INPUT, ENABLE, DEFAULT),
  118 + PINCFG(PJ2, RSVD1, UP, TRISTATE, INPUT, ENABLE, DEFAULT),
  119 + PINCFG(UART2_CTS_N_PJ5, UARTB, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT),
  120 + PINCFG(UART2_RTS_N_PJ6, UARTB, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  121 + PINCFG(PJ7, UARTD, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  122 + PINCFG(PK0, RSVD1, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  123 + PINCFG(PK1, RSVD4, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  124 + PINCFG(PK2, RSVD1, UP, TRISTATE, INPUT, ENABLE, DEFAULT),
  125 + PINCFG(PK3, GMI, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  126 + PINCFG(PK4, RSVD2, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  127 + PINCFG(SPDIF_OUT_PK5, SPDIF, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  128 + PINCFG(SPDIF_IN_PK6, SPDIF, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT),
  129 + PINCFG(PK7, RSVD2, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT),
  130 + PINCFG(DAP1_FS_PN0, RSVD4, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  131 + PINCFG(DAP1_DIN_PN1, RSVD4, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  132 + PINCFG(DAP1_DOUT_PN2, SATA, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  133 + PINCFG(DAP1_SCLK_PN3, RSVD4, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  134 + PINCFG(USB_VBUS_EN0_PN4, RSVD2, NORMAL, NORMAL, OUTPUT, DISABLE, DEFAULT),
  135 + PINCFG(USB_VBUS_EN1_PN5, RSVD2, NORMAL, NORMAL, OUTPUT, DISABLE, DEFAULT),
  136 + PINCFG(HDMI_INT_PN7, RSVD1, DOWN, TRISTATE, INPUT, DEFAULT, NORMAL),
  137 + PINCFG(ULPI_DATA7_PO0, ULPI, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  138 + PINCFG(ULPI_DATA0_PO1, ULPI, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  139 + PINCFG(ULPI_DATA1_PO2, ULPI, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  140 + PINCFG(ULPI_DATA2_PO3, ULPI, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  141 + PINCFG(ULPI_DATA3_PO4, ULPI, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  142 + PINCFG(ULPI_DATA4_PO5, ULPI, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT),
  143 + PINCFG(ULPI_DATA5_PO6, ULPI, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  144 + PINCFG(ULPI_DATA6_PO7, ULPI, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  145 + PINCFG(DAP3_FS_PP0, I2S2, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  146 + PINCFG(DAP3_DIN_PP1, I2S2, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT),
  147 + PINCFG(DAP3_DOUT_PP2, I2S2, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  148 + PINCFG(DAP3_SCLK_PP3, I2S2, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  149 + PINCFG(DAP4_FS_PP4, RSVD4, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  150 + PINCFG(DAP4_DIN_PP5, RSVD3, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  151 + PINCFG(DAP4_DOUT_PP6, RSVD4, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  152 + PINCFG(DAP4_SCLK_PP7, RSVD3, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  153 + PINCFG(KB_COL0_PQ0, RSVD2, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  154 + PINCFG(KB_COL1_PQ1, RSVD2, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  155 + PINCFG(KB_COL2_PQ2, RSVD2, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  156 + PINCFG(KB_COL3_PQ3, KBC, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  157 + PINCFG(KB_COL4_PQ4, KBC, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  158 + PINCFG(KB_COL5_PQ5, RSVD2, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  159 + PINCFG(KB_COL6_PQ6, RSVD2, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  160 + PINCFG(KB_COL7_PQ7, RSVD2, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  161 + PINCFG(KB_ROW0_PR0, RSVD2, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  162 + PINCFG(KB_ROW1_PR1, RSVD2, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  163 + PINCFG(KB_ROW2_PR2, RSVD2, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  164 + PINCFG(KB_ROW3_PR3, KBC, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  165 + PINCFG(KB_ROW4_PR4, RSVD3, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  166 + PINCFG(KB_ROW5_PR5, RSVD3, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  167 + PINCFG(KB_ROW6_PR6, KBC, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  168 + PINCFG(KB_ROW7_PR7, RSVD2, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  169 + PINCFG(KB_ROW8_PS0, RSVD2, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  170 + PINCFG(KB_ROW9_PS1, RSVD2, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  171 + PINCFG(KB_ROW10_PS2, RSVD2, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  172 + PINCFG(KB_ROW11_PS3, RSVD2, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  173 + PINCFG(KB_ROW12_PS4, RSVD2, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  174 + PINCFG(KB_ROW13_PS5, RSVD2, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  175 + PINCFG(KB_ROW14_PS6, RSVD2, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  176 + PINCFG(KB_ROW15_PS7, RSVD2, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  177 + PINCFG(KB_ROW16_PT0, RSVD2, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  178 + PINCFG(KB_ROW17_PT1, RSVD2, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  179 + PINCFG(GEN2_I2C_SCL_PT5, I2C2, NORMAL, NORMAL, INPUT, ENABLE, DEFAULT),
  180 + PINCFG(GEN2_I2C_SDA_PT6, I2C2, NORMAL, NORMAL, INPUT, ENABLE, DEFAULT),
  181 + PINCFG(SDMMC4_CMD_PT7, SDMMC4, UP, NORMAL, INPUT, DEFAULT, DEFAULT),
  182 + PINCFG(PU0, UARTA, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  183 + PINCFG(PU1, UARTA, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT),
  184 + PINCFG(PU2, UARTA, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT),
  185 + PINCFG(PU3, UARTA, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  186 + PINCFG(PU4, GMI, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  187 + PINCFG(PU5, GMI, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  188 + PINCFG(PU6, PWM3, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  189 + PINCFG(PV0, RSVD1, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  190 + PINCFG(PV1, RSVD1, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  191 + PINCFG(SDMMC3_CD_N_PV2, RSVD3, UP, TRISTATE, INPUT, DEFAULT, DEFAULT),
  192 + PINCFG(SDMMC1_WP_N_PV3, SDMMC1, UP, TRISTATE, INPUT, DEFAULT, DEFAULT),
  193 + PINCFG(DDC_SCL_PV4, RSVD2, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT),
  194 + PINCFG(DDC_SDA_PV5, RSVD2, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT),
  195 + PINCFG(GPIO_W2_AUD_PW2, SPI2, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  196 + PINCFG(GPIO_W3_AUD_PW3, SPI6, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT),
  197 + PINCFG(DAP_MCLK1_PW4, EXTPERIPH1, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  198 + PINCFG(CLK2_OUT_PW5, RSVD2, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT),
  199 + PINCFG(UART3_TXD_PW6, UARTC, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  200 + PINCFG(UART3_RXD_PW7, UARTC, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT),
  201 + PINCFG(DVFS_PWM_PX0, CLDVFS, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  202 + PINCFG(GPIO_X1_AUD_PX1, RSVD2, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  203 + PINCFG(DVFS_CLK_PX2, CLDVFS, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  204 + PINCFG(GPIO_X3_AUD_PX3, RSVD4, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  205 + PINCFG(GPIO_X4_AUD_PX4, SPI2, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  206 + PINCFG(GPIO_X5_AUD_PX5, SPI2, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  207 + PINCFG(GPIO_X6_AUD_PX6, SPI2, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  208 + PINCFG(GPIO_X7_AUD_PX7, SPI2, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT),
  209 + PINCFG(ULPI_CLK_PY0, SPI1, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  210 + PINCFG(ULPI_DIR_PY1, SPI1, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT),
  211 + PINCFG(ULPI_NXT_PY2, SPI1, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  212 + PINCFG(ULPI_STP_PY3, SPI1, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  213 + PINCFG(SDMMC1_DAT3_PY4, SDMMC1, UP, NORMAL, INPUT, DEFAULT, DEFAULT),
  214 + PINCFG(SDMMC1_DAT2_PY5, SDMMC1, UP, NORMAL, INPUT, DEFAULT, DEFAULT),
  215 + PINCFG(SDMMC1_DAT1_PY6, SDMMC1, UP, NORMAL, INPUT, DEFAULT, DEFAULT),
  216 + PINCFG(SDMMC1_DAT0_PY7, SDMMC1, UP, NORMAL, INPUT, DEFAULT, DEFAULT),
  217 + PINCFG(SDMMC1_CLK_PZ0, SDMMC1, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT),
  218 + PINCFG(SDMMC1_CMD_PZ1, SDMMC1, UP, NORMAL, INPUT, DEFAULT, DEFAULT),
  219 + PINCFG(PWR_I2C_SCL_PZ6, I2CPWR, NORMAL, NORMAL, INPUT, ENABLE, DEFAULT),
  220 + PINCFG(PWR_I2C_SDA_PZ7, I2CPWR, NORMAL, NORMAL, INPUT, ENABLE, DEFAULT),
  221 + PINCFG(SDMMC4_DAT0_PAA0, SDMMC4, UP, NORMAL, INPUT, DEFAULT, DEFAULT),
  222 + PINCFG(SDMMC4_DAT1_PAA1, SDMMC4, UP, NORMAL, INPUT, DEFAULT, DEFAULT),
  223 + PINCFG(SDMMC4_DAT2_PAA2, SDMMC4, UP, NORMAL, INPUT, DEFAULT, DEFAULT),
  224 + PINCFG(SDMMC4_DAT3_PAA3, SDMMC4, UP, NORMAL, INPUT, DEFAULT, DEFAULT),
  225 + PINCFG(SDMMC4_DAT4_PAA4, SDMMC4, UP, NORMAL, INPUT, DEFAULT, DEFAULT),
  226 + PINCFG(SDMMC4_DAT5_PAA5, SDMMC4, UP, NORMAL, INPUT, DEFAULT, DEFAULT),
  227 + PINCFG(SDMMC4_DAT6_PAA6, SDMMC4, UP, NORMAL, INPUT, DEFAULT, DEFAULT),
  228 + PINCFG(SDMMC4_DAT7_PAA7, SDMMC4, UP, NORMAL, INPUT, DEFAULT, DEFAULT),
  229 + PINCFG(PBB0, VGP6, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT),
  230 + PINCFG(CAM_I2C_SCL_PBB1, I2C3, NORMAL, NORMAL, INPUT, ENABLE, DEFAULT),
  231 + PINCFG(CAM_I2C_SDA_PBB2, I2C3, NORMAL, NORMAL, INPUT, ENABLE, DEFAULT),
  232 + PINCFG(PBB3, VGP3, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  233 + PINCFG(PBB4, VGP4, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT),
  234 + PINCFG(PBB5, VGP5, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  235 + PINCFG(PBB6, RSVD2, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  236 + PINCFG(PBB7, RSVD2, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  237 + PINCFG(CAM_MCLK_PCC0, VI_ALT3, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  238 + PINCFG(PCC1, RSVD2, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  239 + PINCFG(PCC2, RSVD2, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  240 + PINCFG(SDMMC4_CLK_PCC4, SDMMC4, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT),
  241 + PINCFG(CLK2_REQ_PCC5, RSVD2, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT),
  242 + PINCFG(PEX_L0_RST_N_PDD1, RSVD2, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT),
  243 + PINCFG(PEX_L0_CLKREQ_N_PDD2, RSVD2, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT),
  244 + PINCFG(PEX_WAKE_N_PDD3, RSVD2, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT),
  245 + PINCFG(PEX_L1_RST_N_PDD5, RSVD2, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT),
  246 + PINCFG(PEX_L1_CLKREQ_N_PDD6, RSVD2, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT),
  247 + PINCFG(CLK3_OUT_PEE0, EXTPERIPH3, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  248 + PINCFG(CLK3_REQ_PEE1, RSVD2, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  249 + PINCFG(DAP_MCLK1_REQ_PEE2, RSVD4, DOWN, TRISTATE, OUTPUT, DEFAULT, DEFAULT),
  250 + PINCFG(HDMI_CEC_PEE3, CEC, NORMAL, NORMAL, INPUT, DISABLE, DEFAULT),
  251 + /*
  252 + * Leave SDMMC3_CLK_LB_OUT muxed as SDMMC3 with output driver enabled aka not
  253 + * tristated and input driver enabled as well as it features some magic
  254 + * properties even though the external loopback is disabled and the internal
  255 + * loopback used as per SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1 bits
  256 + * being set to 0xfffd according to the TRM!
  257 + */
  258 + PINCFG(SDMMC3_CLK_LB_OUT_PEE4, SDMMC3, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT),
  259 + PINCFG(SDMMC3_CLK_LB_IN_PEE5, RSVD2, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT),
  260 + PINCFG(DP_HPD_PFF0, DP, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT),
  261 + PINCFG(USB_VBUS_EN2_PFF1, RSVD2, NORMAL, NORMAL, INPUT, DISABLE, DEFAULT),
  262 + PINCFG(PFF2, RSVD2, NORMAL, NORMAL, INPUT, DISABLE, DEFAULT),
  263 + PINCFG(CORE_PWR_REQ, PWRON, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  264 + PINCFG(CPU_PWR_REQ, CPU, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  265 + PINCFG(PWR_INT_N, PMI, UP, TRISTATE, INPUT, DEFAULT, DEFAULT),
  266 + PINCFG(RESET_OUT_N, RESET_OUT_N, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT),
  267 + PINCFG(OWR, RSVD2, NORMAL, TRISTATE, OUTPUT, DEFAULT, NORMAL),
  268 + PINCFG(CLK_32K_IN, CLK, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT),
  269 + PINCFG(JTAG_RTCK, RTCK, UP, NORMAL, OUTPUT, DEFAULT, DEFAULT),
  270 +};
  271 +
  272 +#define DRVCFG(_drvgrp, _slwf, _slwr, _drvup, _drvdn, _lpmd, _schmt, _hsm) \
  273 + { \
  274 + .drvgrp = PMUX_DRVGRP_##_drvgrp, \
  275 + .slwf = _slwf, \
  276 + .slwr = _slwr, \
  277 + .drvup = _drvup, \
  278 + .drvdn = _drvdn, \
  279 + .lpmd = PMUX_LPMD_##_lpmd, \
  280 + .schmt = PMUX_SCHMT_##_schmt, \
  281 + .hsm = PMUX_HSM_##_hsm, \
  282 + }
  283 +
  284 +static const struct pmux_drvgrp_config apalis_tk1_drvgrps[] = {
  285 +};
  286 +
  287 +#endif /* PINMUX_CONFIG_APALIS_TK1_H */
configs/apalis-tk1_defconfig
  1 +CONFIG_ARM=y
  2 +CONFIG_TEGRA=y
  3 +CONFIG_TEGRA124=y
  4 +CONFIG_TARGET_APALIS_TK1=y
  5 +CONFIG_DEFAULT_DEVICE_TREE="tegra124-apalis"
  6 +CONFIG_FIT=y
  7 +CONFIG_OF_SYSTEM_SETUP=y
  8 +CONFIG_BOOTDELAY=1
  9 +CONFIG_CONSOLE_MUX=y
  10 +CONFIG_SYS_STDIO_DEREGISTER=y
  11 +CONFIG_VERSION_VARIABLE=y
  12 +# CONFIG_DISPLAY_BOARDINFO is not set
  13 +CONFIG_SYS_PROMPT="Apalis TK1 # "
  14 +# CONFIG_CMD_IMI is not set
  15 +# CONFIG_CMD_IMLS is not set
  16 +# CONFIG_CMD_FLASH is not set
  17 +CONFIG_CMD_MMC=y
  18 +CONFIG_CMD_I2C=y
  19 +CONFIG_CMD_USB=y
  20 +CONFIG_CMD_DFU=y
  21 +CONFIG_CMD_USB_MASS_STORAGE=y
  22 +# CONFIG_CMD_FPGA is not set
  23 +CONFIG_CMD_GPIO=y
  24 +# CONFIG_CMD_NFS is not set
  25 +CONFIG_CMD_EXT4_WRITE=y
  26 +CONFIG_SPL_DM=y
  27 +# CONFIG_BLK is not set
  28 +CONFIG_DFU_MMC=y
  29 +CONFIG_DFU_RAM=y
  30 +# CONFIG_DM_MMC_OPS is not set
  31 +CONFIG_E1000=y
  32 +CONFIG_PCI=y
  33 +CONFIG_DM_PCI=y
  34 +CONFIG_DM_PCI_COMPAT=y
  35 +CONFIG_PCI_TEGRA=y
  36 +CONFIG_SYS_NS16550=y
  37 +CONFIG_USB=y
  38 +CONFIG_DM_USB=y
  39 +CONFIG_USB_STORAGE=y
  40 +CONFIG_USB_GADGET=y
  41 +CONFIG_CI_UDC=y
  42 +CONFIG_USB_GADGET_DOWNLOAD=y
  43 +CONFIG_G_DNL_MANUFACTURER="Toradex"
  44 +CONFIG_G_DNL_VENDOR_NUM=0x1b67
  45 +CONFIG_G_DNL_PRODUCT_NUM=0xffff
  46 +CONFIG_OF_LIBFDT_OVERLAY=y
include/configs/apalis-tk1.h
  1 +/*
  2 + * Copyright (c) 2017 Toradex, Inc.
  3 + *
  4 + * Configuration settings for the Toradex Apalis TK1 modules.
  5 + *
  6 + * SPDX-License-Identifier: GPL-2.0+
  7 + */
  8 +
  9 +#ifndef __CONFIG_H
  10 +#define __CONFIG_H
  11 +
  12 +#include <linux/sizes.h>
  13 +
  14 +/* enable PMIC */
  15 +#define CONFIG_AS3722_POWER
  16 +
  17 +#include "tegra124-common.h"
  18 +
  19 +#define CONFIG_ARCH_MISC_INIT
  20 +
  21 +/* High-level configuration options */
  22 +#define CONFIG_DISPLAY_BOARDINFO_LATE /* Calls show_board_info() */
  23 +
  24 +/* Board-specific serial config */
  25 +#define CONFIG_TEGRA_ENABLE_UARTA
  26 +#define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
  27 +
  28 +/* I2C */
  29 +#define CONFIG_SYS_I2C_TEGRA
  30 +
  31 +/* SD/MMC support */
  32 +#define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */
  33 +
  34 +/* Environment in eMMC, before config block at the end of 1st "boot sector" */
  35 +#define CONFIG_ENV_IS_IN_MMC
  36 +#define CONFIG_ENV_OFFSET (-CONFIG_ENV_SIZE + \
  37 + CONFIG_TDX_CFG_BLOCK_OFFSET)
  38 +#define CONFIG_SYS_MMC_ENV_DEV 0
  39 +#define CONFIG_SYS_MMC_ENV_PART 1
  40 +
  41 +/* USB host support */
  42 +#define CONFIG_USB_EHCI
  43 +#define CONFIG_USB_EHCI_TEGRA
  44 +
  45 +/* PCI host support */
  46 +#undef CONFIG_PCI_SCAN_SHOW
  47 +#define CONFIG_CMD_PCI
  48 +
  49 +/* PCI networking support */
  50 +#define CONFIG_E1000_NO_NVM
  51 +
  52 +/* General networking support */
  53 +#define CONFIG_IP_DEFRAG
  54 +#define CONFIG_TFTP_BLOCKSIZE 16352
  55 +#define CONFIG_TFTP_TSIZE
  56 +
  57 +/* Miscellaneous commands */
  58 +#define CONFIG_FAT_WRITE
  59 +
  60 +#undef CONFIG_IPADDR
  61 +#define CONFIG_IPADDR 192.168.10.2
  62 +#define CONFIG_NETMASK 255.255.255.0
  63 +#undef CONFIG_SERVERIP
  64 +#define CONFIG_SERVERIP 192.168.10.1
  65 +
  66 +#define CONFIG_BOOTCOMMAND \
  67 + "run emmcboot; setenv fdtfile ${soc}-apalis-${fdt_board}.dtb && " \
  68 + "run distro_bootcmd"
  69 +
  70 +#define DFU_ALT_EMMC_INFO "apalis-tk1.img raw 0x0 0x500 mmcpart 1; " \
  71 + "boot part 0 1 mmcpart 0; " \
  72 + "rootfs part 0 2 mmcpart 0; " \
  73 + "uImage fat 0 1 mmcpart 0; " \
  74 + "tegra124-apalis-eval.dtb fat 0 1 mmcpart 0"
  75 +
  76 +#define EMMC_BOOTCMD \
  77 + "emmcargs=ip=off root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait\0" \
  78 + "emmcboot=run setup; setenv bootargs ${defargs} ${emmcargs} " \
  79 + "${setupargs} ${vidargs}; echo Booting from internal eMMC " \
  80 + "chip...; run emmcdtbload; load mmc 0:1 ${kernel_addr_r} " \
  81 + "${boot_file} && run fdt_fixup && " \
  82 + "bootm ${kernel_addr_r} - ${dtbparam}\0" \
  83 + "emmcdtbload=setenv dtbparam; load mmc 0:1 ${fdt_addr_r} " \
  84 + "${soc}-apalis-${fdt_board}.dtb && " \
  85 + "setenv dtbparam ${fdt_addr_r}\0"
  86 +
  87 +#define NFS_BOOTCMD \
  88 + "nfsargs=ip=:::::eth0:on root=/dev/nfs rw\0" \
  89 + "nfsboot=pci enum; run setup; setenv bootargs ${defargs} ${nfsargs} " \
  90 + "${setupargs} ${vidargs}; echo Booting via DHCP/TFTP/NFS...; " \
  91 + "run nfsdtbload; dhcp ${kernel_addr_r} " \
  92 + "&& run fdt_fixup && bootm ${kernel_addr_r} - ${dtbparam}\0" \
  93 + "nfsdtbload=setenv dtbparam; tftp ${fdt_addr_r} " \
  94 + "${soc}-apalis-${fdt_board}.dtb " \
  95 + "&& setenv dtbparam ${fdt_addr_r}\0"
  96 +
  97 +#define SD_BOOTCMD \
  98 + "sdargs=ip=off root=/dev/mmcblk1p2 rw rootfstype=ext3 rootwait\0" \
  99 + "sdboot=run setup; setenv bootargs ${defargs} ${sdargs} ${setupargs} " \
  100 + "${vidargs}; echo Booting from SD card in 8bit slot...; " \
  101 + "run sddtbload; load mmc 1:1 ${kernel_addr_r} " \
  102 + "${boot_file} && run fdt_fixup && " \
  103 + "bootm ${kernel_addr_r} - ${dtbparam}\0" \
  104 + "sddtbload=setenv dtbparam; load mmc 1:1 ${fdt_addr_r} " \
  105 + "${soc}-apalis-${fdt_board}.dtb " \
  106 + "&& setenv dtbparam ${fdt_addr_r}\0"
  107 +
  108 +#define USB_BOOTCMD \
  109 + "usbargs=ip=off root=/dev/sda2 rw rootfstype=ext3 rootwait\0" \
  110 + "usbboot=run setup; setenv bootargs ${defargs} ${setupargs} " \
  111 + "${usbargs} ${vidargs}; echo Booting from USB stick...; " \
  112 + "usb start && run usbdtbload; load usb 0:1 ${kernel_addr_r} " \
  113 + "${boot_file} && run fdt_fixup && " \
  114 + "bootm ${kernel_addr_r} - ${dtbparam}\0" \
  115 + "usbdtbload=setenv dtbparam; load usb 0:1 ${fdt_addr_r} " \
  116 + "${soc}-apalis-${fdt_board}.dtb " \
  117 + "&& setenv dtbparam ${fdt_addr_r}\0"
  118 +
  119 +#define BOARD_EXTRA_ENV_SETTINGS \
  120 + "boot_file=uImage\0" \
  121 + "console=ttyS0\0" \
  122 + "defargs=lp0_vec=2064@0xf46ff000 core_edp_mv=1150 core_edp_ma=4000 " \
  123 + "usb_port_owner_info=2 lane_owner_info=6 emc_max_dvfs=0\0" \
  124 + "dfu_alt_info=" DFU_ALT_EMMC_INFO "\0" \
  125 + EMMC_BOOTCMD \
  126 + "fdt_board=eval\0" \
  127 + "fdt_fixup=;\0" \
  128 + NFS_BOOTCMD \
  129 + SD_BOOTCMD \
  130 + "setethupdate=if env exists ethaddr; then; else setenv ethaddr " \
  131 + "00:14:2d:00:00:00; fi; pci enum && tftpboot ${loadaddr} " \
  132 + "flash_eth.img && source ${loadaddr}\0" \
  133 + "setsdupdate=setenv interface mmc; setenv drive 1; mmc rescan; " \
  134 + "load ${interface} ${drive}:1 ${loadaddr} flash_blk.img " \
  135 + "|| setenv drive 2; mmc rescan; load ${interface} ${drive}:1 " \
  136 + "${loadaddr} flash_blk.img && " \
  137 + "source ${loadaddr}\0" \
  138 + "setup=setenv setupargs igb_mac=${ethaddr} " \
  139 + "consoleblank=0 no_console_suspend=1 console=tty1 " \
  140 + "console=${console},${baudrate}n8 debug_uartport=lsport,0 " \
  141 + "${memargs}\0" \
  142 + "setupdate=run setsdupdate || run setusbupdate || run setethupdate\0" \
  143 + "setusbupdate=usb start && setenv interface usb; setenv drive 0; " \
  144 + "load ${interface} ${drive}:1 ${loadaddr} flash_blk.img && " \
  145 + "source ${loadaddr}\0" \
  146 + USB_BOOTCMD \
  147 + "vidargs=video=tegrafb0:640x480-16@60 fbcon=map:1\0"
  148 +
  149 +/* Increase console I/O buffer size */
  150 +#undef CONFIG_SYS_CBSIZE
  151 +#define CONFIG_SYS_CBSIZE 1024
  152 +
  153 +/* Increase arguments buffer size */
  154 +#undef CONFIG_SYS_BARGSIZE
  155 +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  156 +
  157 +/* Increase print buffer size */
  158 +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  159 +
  160 +/* Increase maximum number of arguments */
  161 +#undef CONFIG_SYS_MAXARGS
  162 +#define CONFIG_SYS_MAXARGS 32
  163 +
  164 +#define CONFIG_CMD_TIME
  165 +
  166 +#define CONFIG_SUPPORT_RAW_INITRD
  167 +#define CONFIG_SYS_BOOT_RAMDISK_HIGH
  168 +
  169 +#include "tegra-common-usb-gadget.h"
  170 +#include "tegra-common-post.h"
  171 +
  172 +/* Reserve top 1M for secure RAM */
  173 +#define CONFIG_ARMV7_SECURE_BASE 0xfff00000
  174 +#define CONFIG_ARMV7_SECURE_RESERVE_SIZE 0x00100000
  175 +
  176 +#endif /* __CONFIG_H */