arm: tegra: macallan: create board file
Kerwin Wan [Mon, 14 Jan 2013 07:39:19 +0000 (15:39 +0800)]
Create initial board files and config files for Macallan.

The commit id of the original change in rel-17 is c02427baf3890
But due to that the kernel in main differs from that in rel-17,
a little rebase needs to be done and we need to squash the following commits:
cdefd04d0fd6a: macallan:  Move all tj dependent thermals from nct to soc_therm
ccc79951c26bb: macallan: Upgrade CL-DVFS disable output ops
b37127d1c36d6: Add raydium touch clock names for macallan

Bug 1216782

Change-Id: I2384f68892989f10af64e2291f7ee53d9100e8f1
Signed-off-by: Hayden Du <haydend@nvidia.com>
Signed-off-by: Kerwin Wan <kerwinw@nvidia.com>
Reviewed-on: http://git-master/r/203144
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

19 files changed:
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/tegra114-macallan.dts [new file with mode: 0644]
arch/arm/configs/tegra11_android_defconfig
arch/arm/mach-tegra/Kconfig
arch/arm/mach-tegra/Makefile
arch/arm/mach-tegra/board-macallan-kbc.c [new file with mode: 0644]
arch/arm/mach-tegra/board-macallan-memory.c [new file with mode: 0644]
arch/arm/mach-tegra/board-macallan-panel.c [new file with mode: 0644]
arch/arm/mach-tegra/board-macallan-pinmux-t11x.h [new file with mode: 0644]
arch/arm/mach-tegra/board-macallan-pinmux.c [new file with mode: 0644]
arch/arm/mach-tegra/board-macallan-power.c [new file with mode: 0644]
arch/arm/mach-tegra/board-macallan-powermon.c [new file with mode: 0644]
arch/arm/mach-tegra/board-macallan-sdhci.c [new file with mode: 0644]
arch/arm/mach-tegra/board-macallan-sensors.c [new file with mode: 0644]
arch/arm/mach-tegra/board-macallan.c [new file with mode: 0644]
arch/arm/mach-tegra/board-macallan.h [new file with mode: 0644]
arch/arm/mach-tegra/panel-p-wuxga-10-1.c
arch/arm/mach-tegra/tegra-board-id.h
sound/soc/tegra/Kconfig

index d41482b..19108a3 100644 (file)
@@ -196,6 +196,7 @@ dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \
        tegra30-cardhu-a02.dtb \
        tegra30-cardhu-a04.dtb \
        tegra114-dalmore.dtb \
+       tegra114-macallan.dtb \
        tegra114-roth.dtb \
        tegra114-pluto.dtb
 dtb-$(CONFIG_ARCH_VERSATILE) += versatile-ab.dtb \
diff --git a/arch/arm/boot/dts/tegra114-macallan.dts b/arch/arm/boot/dts/tegra114-macallan.dts
new file mode 100644 (file)
index 0000000..9461396
--- /dev/null
@@ -0,0 +1,766 @@
+/dts-v1/;
+
+/include/ "tegra114.dtsi"
+
+/ {
+       model = "NVIDIA Tegra114 macallan evaluation board";
+       compatible = "nvidia,macallan", "nvidia,tegra114";
+
+       gpio: gpio@6000d000 {
+               status = "okay";
+       };
+
+       pinmux {
+               pinctrl-names = "default";
+               pinctrl-0 = <&state_default>;
+
+               state_default: pinmux {
+                       clk1_out_pw4 {
+                               nvidia,pins = "clk1_out_pw4";
+                               nvidia,function = "extperiph1";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       dap1_din_pn1 {
+                               nvidia,pins = "dap1_din_pn1";
+                               nvidia,function = "i2s0";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <1>;
+                               nvidia,enable-input = <1>;
+                       };
+                       dap1_dout_pn2 {
+                               nvidia,pins = "dap1_dout_pn2",
+                                               "dap1_fs_pn0",
+                                               "dap1_sclk_pn3";
+                               nvidia,function = "i2s0";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       dap2_din_pa4 {
+                               nvidia,pins = "dap2_din_pa4";
+                               nvidia,function = "i2s1";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <1>;
+                               nvidia,enable-input = <1>;
+                       };
+                       dap2_dout_pa5 {
+                               nvidia,pins = "dap2_dout_pa5",
+                                               "dap2_fs_pa2",
+                                               "dap2_sclk_pa3";
+                               nvidia,function = "i2s1";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       dap4_din_pp5 {
+                               nvidia,pins = "dap4_din_pp5",
+                                               "dap4_dout_pp6",
+                                               "dap4_fs_pp4",
+                                               "dap4_sclk_pp7";
+                               nvidia,function = "i2s3";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       dvfs_pwm_px0 {
+                               nvidia,pins = "dvfs_pwm_px0",
+                                               "dvfs_clk_px2";
+                               nvidia,function = "cldvfs";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       ulpi_clk_py0 {
+                               nvidia,pins = "ulpi_clk_py0",
+                                               "ulpi_data0_po1",
+                                               "ulpi_data1_po2",
+                                               "ulpi_data2_po3",
+                                               "ulpi_data3_po4",
+                                               "ulpi_data4_po5",
+                                               "ulpi_data5_po6",
+                                               "ulpi_data6_po7",
+                                               "ulpi_data7_po0";
+                               nvidia,function = "ulpi";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       ulpi_dir_py1 {
+                               nvidia,pins = "ulpi_dir_py1",
+                                               "ulpi_nxt_py2";
+                               nvidia,function = "ulpi";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <1>;
+                               nvidia,enable-input = <1>;
+                       };
+                       ulpi_stp_py3 {
+                               nvidia,pins = "ulpi_stp_py3";
+                               nvidia,function = "ulpi";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       cam_i2c_scl_pbb1 {
+                               nvidia,pins = "cam_i2c_scl_pbb1",
+                                               "cam_i2c_sda_pbb2";
+                               nvidia,function = "i2c3";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                               nvidia,lock = <0>;
+                               nvidia,open-drain = <0>;
+                       };
+                       cam_mclk_pcc0 {
+                               nvidia,pins = "cam_mclk_pcc0",
+                                               "pbb0";
+                               nvidia,function = "vi_alt3";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                               nvidia,lock = <0>;
+                       };
+                       gen2_i2c_scl_pt5 {
+                               nvidia,pins = "gen2_i2c_scl_pt5",
+                                               "gen2_i2c_sda_pt6";
+                               nvidia,function = "i2c2";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                               nvidia,lock = <0>;
+                               nvidia,open-drain = <0>;
+                       };
+                       gmi_a16_pj7 {
+                               nvidia,pins = "gmi_a16_pj7";
+                               nvidia,function = "uartd";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       gmi_a17_pb0 {
+                               nvidia,pins = "gmi_a17_pb0",
+                                               "gmi_a18_pb1";
+                               nvidia,function = "uartd";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <1>;
+                               nvidia,enable-input = <1>;
+                       };
+                       gmi_a19_pk7 {
+                               nvidia,pins = "gmi_a19_pk7";
+                               nvidia,function = "uartd";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       gmi_ad5_pg5 {
+                               nvidia,pins = "gmi_ad5_pg5",
+                                               "gmi_cs6_n_pi3",
+                                               "gmi_wr_n_pi0";
+                               nvidia,function = "spi4";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       gmi_ad6_pg6 {
+                               nvidia,pins = "gmi_ad6_pg6",
+                                               "gmi_ad7_pg7";
+                               nvidia,function = "spi4";
+                               nvidia,pull = <2>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       gmi_ad12_ph4 {
+                               nvidia,pins = "gmi_ad12_ph4";
+                               nvidia,function = "rsvd4";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       gmi_ad9_ph1 {
+                               nvidia,pins = "gmi_ad9_ph1";
+                               nvidia,function = "pwm1";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       gmi_cs1_n_pj2 {
+                               nvidia,pins = "gmi_cs1_n_pj2",
+                                               "gmi_oe_n_pi1";
+                               nvidia,function = "soc";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <1>;
+                               nvidia,enable-input = <1>;
+                       };
+                       clk2_out_pw5 {
+                               nvidia,pins = "clk2_out_pw5";
+                               nvidia,function = "extperiph2";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       sdmmc1_clk_pz0 {
+                               nvidia,pins = "sdmmc1_clk_pz0";
+                               nvidia,function = "sdmmc1";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       sdmmc1_cmd_pz1 {
+                               nvidia,pins = "sdmmc1_cmd_pz1",
+                                               "sdmmc1_dat0_py7",
+                                               "sdmmc1_dat1_py6",
+                                               "sdmmc1_dat2_py5",
+                                               "sdmmc1_dat3_py4";
+                               nvidia,function = "sdmmc1";
+                               nvidia,pull = <2>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       sdmmc1_wp_n_pv3 {
+                               nvidia,pins = "sdmmc1_wp_n_pv3";
+                               nvidia,function = "spi4";
+                               nvidia,pull = <2>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       sdmmc3_clk_pa6 {
+                               nvidia,pins = "sdmmc3_clk_pa6";
+                               nvidia,function = "sdmmc3";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       sdmmc3_cmd_pa7 {
+                               nvidia,pins = "sdmmc3_cmd_pa7",
+                                               "sdmmc3_dat0_pb7",
+                                               "sdmmc3_dat1_pb6",
+                                               "sdmmc3_dat2_pb5",
+                                               "sdmmc3_dat3_pb4",
+                                               "kb_col4_pq4",
+                                               "sdmmc3_clk_lb_out_pee4",
+                                               "sdmmc3_clk_lb_in_pee5";
+                               nvidia,function = "sdmmc3";
+                               nvidia,pull = <2>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       sdmmc4_clk_pcc4 {
+                               nvidia,pins = "sdmmc4_clk_pcc4";
+                               nvidia,function = "sdmmc4";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       sdmmc4_cmd_pt7 {
+                               nvidia,pins = "sdmmc4_cmd_pt7",
+                                               "sdmmc4_dat0_paa0",
+                                               "sdmmc4_dat1_paa1",
+                                               "sdmmc4_dat2_paa2",
+                                               "sdmmc4_dat3_paa3",
+                                               "sdmmc4_dat4_paa4",
+                                               "sdmmc4_dat5_paa5",
+                                               "sdmmc4_dat6_paa6",
+                                               "sdmmc4_dat7_paa7";
+                               nvidia,function = "sdmmc4";
+                               nvidia,pull = <2>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       clk_32k_out_pa0 {
+                               nvidia,pins = "clk_32k_out_pa0";
+                               nvidia,function = "blink";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       kb_col0_pq0 {
+                               nvidia,pins = "kb_col0_pq0",
+                                               "kb_col1_pq1",
+                                               "kb_col2_pq2",
+                                               "kb_row0_pr0",
+                                               "kb_row1_pr1",
+                                               "kb_row2_pr2";
+                               nvidia,function = "kbc";
+                               nvidia,pull = <2>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       dap3_din_pp1 {
+                               nvidia,pins = "dap3_din_pp1",
+                                               "dap3_sclk_pp3";
+                               nvidia,function = "displayb";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <1>;
+                               nvidia,enable-input = <0>;
+                       };
+                       pv0 {
+                               nvidia,pins = "pv0";
+                               nvidia,function = "rsvd4";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <1>;
+                               nvidia,enable-input = <0>;
+                       };
+                       kb_row7_pr7 {
+                               nvidia,pins = "kb_row7_pr7";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <2>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       kb_row10_ps2 {
+                               nvidia,pins = "kb_row10_ps2";
+                               nvidia,function = "uarta";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <1>;
+                               nvidia,enable-input = <1>;
+                       };
+                       kb_row9_ps1 {
+                               nvidia,pins = "kb_row9_ps1";
+                               nvidia,function = "uarta";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       pwr_i2c_scl_pz6 {
+                               nvidia,pins = "pwr_i2c_scl_pz6",
+                                               "pwr_i2c_sda_pz7";
+                               nvidia,function = "i2cpwr";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                               nvidia,lock = <0>;
+                               nvidia,open-drain = <0>;
+                       };
+                       sys_clk_req_pz5 {
+                               nvidia,pins = "sys_clk_req_pz5";
+                               nvidia,function = "sysclk";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       core_pwr_req {
+                               nvidia,pins = "core_pwr_req";
+                               nvidia,function = "pwron";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       cpu_pwr_req {
+                               nvidia,pins = "cpu_pwr_req";
+                               nvidia,function = "cpu";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       pwr_int_n {
+                               nvidia,pins = "pwr_int_n";
+                               nvidia,function = "pmi";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <1>;
+                               nvidia,enable-input = <1>;
+                       };
+                       reset_out_n {
+                               nvidia,pins = "reset_out_n";
+                               nvidia,function = "reset_out_n";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       clk3_out_pee0 {
+                               nvidia,pins = "clk3_out_pee0";
+                               nvidia,function = "extperiph3";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       gen1_i2c_scl_pc4 {
+                               nvidia,pins = "gen1_i2c_scl_pc4",
+                                               "gen1_i2c_sda_pc5";
+                               nvidia,function = "i2c1";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                               nvidia,lock = <0>;
+                               nvidia,open-drain = <0>;
+                       };
+                       uart2_cts_n_pj5 {
+                               nvidia,pins = "uart2_cts_n_pj5";
+                               nvidia,function = "uartb";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <1>;
+                               nvidia,enable-input = <1>;
+                       };
+                       uart2_rts_n_pj6 {
+                               nvidia,pins = "uart2_rts_n_pj6";
+                               nvidia,function = "uartb";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       uart2_rxd_pc3 {
+                               nvidia,pins = "uart2_rxd_pc3";
+                               nvidia,function = "irda";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <1>;
+                               nvidia,enable-input = <1>;
+                       };
+                       uart2_txd_pc2 {
+                               nvidia,pins = "uart2_txd_pc2";
+                               nvidia,function = "irda";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       uart3_cts_n_pa1 {
+                               nvidia,pins = "uart3_cts_n_pa1",
+                                               "uart3_rxd_pw7";
+                               nvidia,function = "uartc";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <1>;
+                               nvidia,enable-input = <1>;
+                       };
+                       uart3_rts_n_pc0 {
+                               nvidia,pins = "uart3_rts_n_pc0",
+                                               "uart3_txd_pw6";
+                               nvidia,function = "uartc";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       owr {
+                               nvidia,pins = "owr";
+                               nvidia,function = "owr";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       hdmi_cec_pee3 {
+                               nvidia,pins = "hdmi_cec_pee3";
+                               nvidia,function = "cec";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                               nvidia,lock = <0>;
+                               nvidia,open-drain = <0>;
+                       };
+                       ddc_scl_pv4 {
+                               nvidia,pins = "ddc_scl_pv4",
+                                               "ddc_sda_pv5";
+                               nvidia,function = "i2c4";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                               nvidia,lock = <0>;
+                               nvidia,rcv-sel = <1>;
+                       };
+                       spdif_in_pk6 {
+                               nvidia,pins = "spdif_in_pk6";
+                               nvidia,function = "usb";
+                               nvidia,pull = <2>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                               nvidia,lock = <0>;
+                       };
+                       usb_vbus_en0_pn4 {
+                               nvidia,pins = "usb_vbus_en0_pn4";
+                               nvidia,function = "usb";
+                               nvidia,pull = <2>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                               nvidia,lock = <0>;
+                               nvidia,open-drain = <1>;
+                       };
+                       gpio_x6_aud_px6 {
+                               nvidia,pins = "gpio_x6_aud_px6";
+                               nvidia,function = "spi6";
+                               nvidia,pull = <2>;
+                               nvidia,tristate = <1>;
+                               nvidia,enable-input = <1>;
+                       };
+                       gpio_x4_aud_px4 {
+                               nvidia,pins = "gpio_x4_aud_px4",
+                                               "gpio_x7_aud_px7";
+                               nvidia,function = "rsvd1";
+                               nvidia,pull = <1>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       gpio_x5_aud_px5 {
+                               nvidia,pins = "gpio_x5_aud_px5";
+                               nvidia,function = "rsvd1";
+                               nvidia,pull = <2>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       gpio_w2_aud_pw2 {
+                               nvidia,pins = "gpio_w2_aud_pw2";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <2>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       gpio_w3_aud_pw3 {
+                               nvidia,pins = "gpio_w3_aud_pw3";
+                               nvidia,function = "spi6";
+                               nvidia,pull = <2>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       gpio_x1_aud_px1 {
+                               nvidia,pins = "gpio_x1_aud_px1";
+                               nvidia,function = "rsvd4";
+                               nvidia,pull = <1>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       gpio_x3_aud_px3 {
+                               nvidia,pins = "gpio_x3_aud_px3";
+                               nvidia,function = "rsvd4";
+                               nvidia,pull = <2>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       dap3_fs_pp0 {
+                               nvidia,pins = "dap3_fs_pp0";
+                               nvidia,function = "i2s2";
+                               nvidia,pull = <1>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       dap3_dout_pp2 {
+                               nvidia,pins = "dap3_dout_pp2";
+                               nvidia,function = "i2s2";
+                               nvidia,pull = <1>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       pv1 {
+                               nvidia,pins = "pv1";
+                               nvidia,function = "rsvd1";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       pbb3 {
+                               nvidia,pins = "pbb3",
+                                               "pbb5",
+                                               "pbb6",
+                                               "pbb7";
+                               nvidia,function = "rsvd4";
+                               nvidia,pull = <1>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       pcc1 {
+                               nvidia,pins = "pcc1",
+                                               "pcc2";
+                               nvidia,function = "rsvd4";
+                               nvidia,pull = <1>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       gmi_ad0_pg0 {
+                               nvidia,pins = "gmi_ad0_pg0",
+                                               "gmi_ad1_pg1";
+                               nvidia,function = "gmi";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       gmi_ad10_ph2 {
+                               nvidia,pins = "gmi_ad10_ph2",
+                                               "gmi_ad11_ph3",
+                                               "gmi_ad13_ph5",
+                                               "gmi_ad8_ph0",
+                                               "gmi_clk_pk1";
+                               nvidia,function = "gmi";
+                               nvidia,pull = <1>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       gmi_ad2_pg2 {
+                               nvidia,pins = "gmi_ad2_pg2",
+                                               "gmi_ad3_pg3";
+                               nvidia,function = "gmi";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       gmi_adv_n_pk0 {
+                               nvidia,pins = "gmi_adv_n_pk0",
+                                               "gmi_cs0_n_pj0",
+                                               "gmi_cs2_n_pk3",
+                                               "gmi_cs4_n_pk2",
+                                               "gmi_cs7_n_pi6",
+                                               "gmi_dqs_p_pj3",
+                                               "gmi_iordy_pi5",
+                                               "gmi_wp_n_pc7";
+                               nvidia,function = "gmi";
+                               nvidia,pull = <2>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       gmi_cs3_n_pk4 {
+                               nvidia,pins = "gmi_cs3_n_pk4";
+                               nvidia,function = "gmi";
+                               nvidia,pull = <2>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       clk2_req_pcc5 {
+                               nvidia,pins = "clk2_req_pcc5";
+                               nvidia,function = "rsvd4";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       kb_col3_pq3 {
+                               nvidia,pins = "kb_col3_pq3",
+                                               "kb_col6_pq6",
+                                               "kb_col7_pq7";
+                               nvidia,function = "kbc";
+                               nvidia,pull = <2>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       kb_col5_pq5 {
+                               nvidia,pins = "kb_col5_pq5";
+                               nvidia,function = "kbc";
+                               nvidia,pull = <2>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       kb_row3_pr3 {
+                               nvidia,pins = "kb_row3_pr3",
+                                               "kb_row4_pr4",
+                                               "kb_row6_pr6",
+                                               "kb_row8_ps0";
+                               nvidia,function = "kbc";
+                               nvidia,pull = <1>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       clk3_req_pee1 {
+                               nvidia,pins = "clk3_req_pee1";
+                               nvidia,function = "rsvd4";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       pu4 {
+                               nvidia,pins = "pu4";
+                               nvidia,function = "displayb";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <0>;
+                       };
+                       pu5 {
+                               nvidia,pins = "pu5",
+                                               "pu6";
+                               nvidia,function = "displayb";
+                               nvidia,pull = <0>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       hdmi_int_pn7 {
+                               nvidia,pins = "hdmi_int_pn7";
+                               nvidia,function = "rsvd1";
+                               nvidia,pull = <1>;
+                               nvidia,tristate = <0>;
+                               nvidia,enable-input = <1>;
+                       };
+                       clk1_req_pee2 {
+                               nvidia,pins = "clk1_req_pee2",
+                                               "usb_vbus_en1_pn5";
+                               nvidia,function = "rsvd4";
+                               nvidia,pull = <1>;
+                               nvidia,tristate = <1>;
+                               nvidia,enable-input = <0>;
+                       };
+
+                       drive_sdio1 {
+                               nvidia,pins = "drive_sdio1";
+                               nvidia,high-speed-mode = <1>;
+                               nvidia,schmitt = <0>;
+                               nvidia,low-power-mode = <3>;
+                               nvidia,pull-down-strength = <36>;
+                               nvidia,pull-up-strength = <20>;
+                               nvidia,slew-rate-rising = <2>;
+                               nvidia,slew-rate-falling = <2>;
+                       };
+                       drive_sdio3 {
+                               nvidia,pins = "drive_sdio3";
+                               nvidia,high-speed-mode = <1>;
+                               nvidia,schmitt = <0>;
+                               nvidia,low-power-mode = <3>;
+                               nvidia,pull-down-strength = <22>;
+                               nvidia,pull-up-strength = <36>;
+                               nvidia,slew-rate-rising = <0>;
+                               nvidia,slew-rate-falling = <0>;
+                       };
+                       drive_gma {
+                               nvidia,pins = "drive_gma";
+                               nvidia,high-speed-mode = <1>;
+                               nvidia,schmitt = <0>;
+                               nvidia,low-power-mode = <3>;
+                               nvidia,pull-down-strength = <2>;
+                               nvidia,pull-up-strength = <1>;
+                               nvidia,slew-rate-rising = <0>;
+                               nvidia,slew-rate-falling = <0>;
+                               nvidia,drive-type = <1>;
+                       };
+               };
+       };
+
+       i2c@7000c000 {
+               status = "okay";
+               clock-frequency = <100000>;
+       };
+
+       i2c@7000c400 {
+               status = "okay";
+               clock-frequency = <100000>;
+       };
+
+       i2c@7000c500 {
+               status = "okay";
+               clock-frequency = <100000>;
+       };
+
+       i2c@7000c700 {
+               status = "okay";
+               clock-frequency = <100000>;
+       };
+
+       i2c@7000d000 {
+               status = "okay";
+               clock-frequency = <400000>;
+       };
+
+       sdhci@78000600 {
+               tap-delay = <5>;
+               trim-delay = <3>;
+               ddr-clk-limit = <41000000>;
+               base-clk = <104000000>;
+               mmc-ocr-mask = <0>;
+               support-8bit;
+               built-in;
+               status = "okay";
+       };
+       sdhci@78000400 {
+               cd-gpios = <&gpio 170 0>; /* gpio PV2 */
+               tap-delay = <3>;
+               trim-delay = <3>;
+               ddr-clk-limit = <41000000>;
+               base-clk = <208000000>;
+               status = "okay";
+       };
+       sdhci@78000000 {
+               status = "okay";
+       };
+
+       camera {
+               status = "okay";
+       };
+};
index 41da29e..9f90a4a 100644 (file)
@@ -29,6 +29,7 @@ CONFIG_GPIO_PCA953X=y
 CONFIG_ARCH_TEGRA_11x_SOC=y
 CONFIG_MACH_CERES=y
 CONFIG_MACH_DALMORE=y
+CONFIG_MACH_MACALLAN=y
 CONFIG_MACH_TEGRA_PLUTO=y
 CONFIG_MACH_ROTH=y
 CONFIG_TEGRA_EMC_SCALING_ENABLE=y
index 47c4add..9f8f78b 100644 (file)
@@ -236,6 +236,14 @@ config MACH_PISMO
        help
          Support for NVIDIA PISMO development platform
 
+config MACH_MACALLAN
+       bool "Macallan board"
+       depends on ARCH_TEGRA_11x_SOC
+       select MACH_HAS_SND_SOC_TEGRA_RT5639 if SND_SOC
+       select MACH_HAS_SND_SOC_TEGRA_RT5640 if SND_SOC
+       help
+         Support for NVIDIA MACALLAN development platform
+
 config MACH_TEGRA_PLUTO
        bool "Pluto board"
        depends on ARCH_TEGRA_11x_SOC
index a80f3fc..af0e908 100644 (file)
@@ -204,6 +204,18 @@ obj-${CONFIG_MACH_PISMO}                += board-pismo-sdhci.o
 obj-${CONFIG_MACH_PISMO}                += board-pismo-panel.o
 obj-${CONFIG_MACH_PISMO}                += board-pismo-sensors.o
 
+obj-${CONFIG_MACH_MACALLAN}             += board-macallan.o
+obj-${CONFIG_MACH_MACALLAN}             += board-macallan-memory.o
+obj-${CONFIG_MACH_MACALLAN}             += board-macallan-pinmux.o
+obj-${CONFIG_MACH_MACALLAN}             += board-macallan-power.o
+obj-${CONFIG_MACH_MACALLAN}             += board-macallan-powermon.o
+obj-${CONFIG_MACH_MACALLAN}             += board-macallan-sdhci.o
+obj-${CONFIG_MACH_MACALLAN}             += board-macallan-panel.o
+obj-${CONFIG_MACH_MACALLAN}             += board-macallan-kbc.o
+obj-${CONFIG_MACH_MACALLAN}             += board-macallan-sensors.o
+obj-${CONFIG_MACH_MACALLAN}             += panel-p-wuxga-10-1.o
+
+
 obj-${CONFIG_MACH_TEGRA_PLUTO}          += board-pluto.o
 obj-${CONFIG_MACH_TEGRA_PLUTO}          += board-pluto-memory.o
 obj-${CONFIG_MACH_TEGRA_PLUTO}          += board-pluto-pinmux.o
diff --git a/arch/arm/mach-tegra/board-macallan-kbc.c b/arch/arm/mach-tegra/board-macallan-kbc.c
new file mode 100644 (file)
index 0000000..6c9ac9d
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * arch/arm/mach-tegra/board-macallan-kbc.c
+ * Keys configuration for Nvidia t114 macallan platform.
+ *
+ * Copyright (C) 2013 NVIDIA, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ * 02111-1307, USA
+ */
+
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/input.h>
+#include <linux/input/tegra_kbc.h>
+#include <linux/gpio.h>
+#include <linux/gpio_keys.h>
+#include <linux/mfd/palmas.h>
+
+#include "tegra-board-id.h"
+#include "board.h"
+#include "board-macallan.h"
+#include "devices.h"
+
+#define GPIO_KEY(_id, _gpio, _iswake)           \
+       {                                       \
+               .code = _id,                    \
+               .gpio = TEGRA_GPIO_##_gpio,     \
+               .active_low = 1,                \
+               .desc = #_id,                   \
+               .type = EV_KEY,                 \
+               .wakeup = _iswake,              \
+               .debounce_interval = 10,        \
+       }
+
+static struct gpio_keys_button macallan_e1545_keys[] = {
+       [0] = GPIO_KEY(KEY_POWER, PQ0, 1),
+       [1] = GPIO_KEY(KEY_VOLUMEUP, PR2, 0),
+       [2] = GPIO_KEY(KEY_VOLUMEDOWN, PR1, 0),
+       [3] = GPIO_KEY(KEY_HOME, PI5, 0),
+       [4] = GPIO_KEY(KEY_BACK, PQ2, 0), /* Todo : CAMF */
+       [5] = GPIO_KEY(KEY_MENU, PR0, 0), /* Todo : CAMS */
+};
+
+static struct gpio_keys_platform_data macallan_e1545_keys_pdata = {
+       .buttons        = macallan_e1545_keys,
+       .nbuttons       = ARRAY_SIZE(macallan_e1545_keys),
+};
+
+static struct platform_device macallan_e1545_keys_device = {
+       .name   = "gpio-keys",
+       .id     = 0,
+       .dev    = {
+               .platform_data  = &macallan_e1545_keys_pdata,
+       },
+};
+
+int __init macallan_kbc_init(void)
+{
+       platform_device_register(&macallan_e1545_keys_device);
+
+       return 0;
+}
+
diff --git a/arch/arm/mach-tegra/board-macallan-memory.c b/arch/arm/mach-tegra/board-macallan-memory.c
new file mode 100644 (file)
index 0000000..1470b2a
--- /dev/null
@@ -0,0 +1,1619 @@
+/*
+ * Copyright (C) 2013 NVIDIA, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ * 02111-1307, USA
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_data/tegra_emc.h>
+
+#include "board.h"
+#include "board-macallan.h"
+
+#include "tegra-board-id.h"
+#include "tegra11_emc.h"
+#include "fuse.h"
+#include "devices.h"
+
+static struct tegra11_emc_table e1545_h5tc4g63mfr_pba_table[] = {
+       {
+               0x41,       /* Rev 4.0.3 */
+               12750,      /* SDRAM frequency */
+               900,       /* min voltage */
+               "pll_p",    /* clock source id */
+               0x4000003e, /* CLK_SOURCE_EMC */
+               99,         /* number of burst_regs */
+               30,         /* number of trim_regs (each channel) */
+               11,         /* number of up_down_regs */
+               {
+                       0x00000000, /* EMC_RC */
+                       0x00000003, /* EMC_RFC */
+                       0x00000000, /* EMC_RFC_SLR */
+                       0x00000000, /* EMC_RAS */
+                       0x00000000, /* EMC_RP */
+                       0x00000004, /* EMC_R2W */
+                       0x0000000a, /* EMC_W2R */
+                       0x00000003, /* EMC_R2P */
+                       0x0000000b, /* EMC_W2P */
+                       0x00000000, /* EMC_RD_RCD */
+                       0x00000000, /* EMC_WR_RCD */
+                       0x00000003, /* EMC_RRD */
+                       0x00000001, /* EMC_REXT */
+                       0x00000000, /* EMC_WEXT */
+                       0x00000005, /* EMC_WDV */
+                       0x00000005, /* EMC_WDV_MASK */
+                       0x00000005, /* EMC_IBDLY */
+                       0x00010000, /* EMC_PUTERM_EXTRA */
+                       0x00000000, /* EMC_CDB_CNTL_2 */
+                       0x00000004, /* EMC_QRST */
+                       0x0000000d, /* EMC_RDV_MASK */
+                       0x00000060, /* EMC_REFRESH */
+                       0x00000000, /* EMC_BURST_REFRESH_NUM */
+                       0x00000018, /* EMC_PRE_REFRESH_REQ_CNT */
+                       0x00000002, /* EMC_PDEX2WR */
+                       0x00000002, /* EMC_PDEX2RD */
+                       0x00000001, /* EMC_PCHG2PDEN */
+                       0x00000000, /* EMC_ACT2PDEN */
+                       0x00000007, /* EMC_AR2PDEN */
+                       0x0000000f, /* EMC_RW2PDEN */
+                       0x00000005, /* EMC_TXSR */
+                       0x00000005, /* EMC_TXSRDLL */
+                       0x00000004, /* EMC_TCKE */
+                       0x00000004, /* EMC_TCKESR */
+                       0x00000004, /* EMC_TPD */
+                       0x00000001, /* EMC_TFAW */
+                       0x00000000, /* EMC_TRPAB */
+                       0x00000004, /* EMC_TCLKSTABLE */
+                       0x00000005, /* EMC_TCLKSTOP */
+                       0x00000064, /* EMC_TREFBW */
+                       0x00000005, /* EMC_QUSE_EXTRA */
+                       0x00000020, /* EMC_ODT_WRITE */
+                       0x00000000, /* EMC_ODT_READ */
+                       0x0000aa88, /* EMC_FBIO_CFG5 */
+                       0x002c00a0, /* EMC_CFG_DIG_DLL */
+                       0x00008000, /* EMC_CFG_DIG_DLL_PERIOD */
+                       0x00060000, /* EMC_DLL_XFORM_DQS4 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS5 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS6 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS7 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE4 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE5 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE6 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE7 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS4 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS5 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS6 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS7 */
+                       0x001112a0, /* EMC_XM2CMDPADCTRL */
+                       0x00000000, /* EMC_XM2CMDPADCTRL4 */
+                       0x0000a11c, /* EMC_XM2DQSPADCTRL2 */
+                       0x00000000, /* EMC_XM2DQPADCTRL2 */
+                       0x77ffc084, /* EMC_XM2CLKPADCTRL */
+                       0x81f1f108, /* EMC_XM2COMPPADCTRL */
+                       0x03035504, /* EMC_XM2VTTGENPADCTRL */
+                       0x00000000, /* EMC_XM2VTTGENPADCTRL2 */
+                       0x0000003f, /* EMC_DSR_VTTGEN_DRV */
+                       0x00000000, /* EMC_TXDSRVTTGEN */
+                       0x02000000, /* EMC_FBIO_SPARE */
+                       0x00000802, /* EMC_CTT_TERM_CTRL */
+                       0x00000000, /* EMC_ZCAL_INTERVAL */
+                       0x00000042, /* EMC_ZCAL_WAIT_CNT */
+                       0x000c000c, /* EMC_MRS_WAIT_CNT */
+                       0x000c000c, /* EMC_MRS_WAIT_CNT2 */
+                       0x00000000, /* EMC_AUTO_CAL_CONFIG2 */
+                       0x00000000, /* EMC_AUTO_CAL_CONFIG3 */
+                       0x00000000, /* EMC_CTT */
+                       0x00000000, /* EMC_CTT_DURATION */
+                       0x800001c6, /* EMC_DYN_SELF_REF_CONTROL */
+                       0x1f7df7df, /* EMC_CA_TRAINING_TIMING_CNTL1 */
+                       0x0000001f, /* EMC_CA_TRAINING_TIMING_CNTL2 */
+                       0x40040001, /* MC_EMEM_ARB_CFG */
+                       0x8000003f, /* MC_EMEM_ARB_OUTSTANDING_REQ */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_RCD */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_RP */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_RC */
+                       0x00000000, /* MC_EMEM_ARB_TIMING_RAS */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_FAW */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_RRD */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_RAP2PRE */
+                       0x00000008, /* MC_EMEM_ARB_TIMING_WAP2PRE */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_R2R */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_W2W */
+                       0x00000003, /* MC_EMEM_ARB_TIMING_R2W */
+                       0x00000006, /* MC_EMEM_ARB_TIMING_W2R */
+                       0x06030102, /* MC_EMEM_ARB_DA_TURNS */
+                       0x000a0402, /* MC_EMEM_ARB_DA_COVERS */
+                       0x77e30303, /* MC_EMEM_ARB_MISC0 */
+                       0x001f0000, /* MC_EMEM_ARB_RING1_THROTTLE */
+               },
+               {
+                       0x00000000, /* EMC_CDB_CNTL_1 */
+                       0x00000006, /* EMC_FBIO_CFG6 */
+                       0x00000006, /* EMC_QUSE */
+                       0x00000005, /* EMC_EINPUT */
+                       0x00000004, /* EMC_EINPUT_DURATION */
+                       0x00060000, /* EMC_DLL_XFORM_DQS0 */
+                       0x00000009, /* EMC_QSAFE */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE0 */
+                       0x0000000d, /* EMC_RDV */
+                       0x0079e79e, /* EMC_XM2DQSPADCTRL4 */
+                       0x20820800, /* EMC_XM2DQSPADCTRL3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ0 */
+                       0xa0f10000, /* EMC_AUTO_CAL_CONFIG */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR0 */
+                       0x00000808, /* EMC_XM2CLKPADCTRL2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS0 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR1 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR2 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS1 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS2 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ1 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ2 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ3 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS1 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS3 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE1 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE2 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE3 */
+               },
+               {
+                       0x00000000, /* EMC_CDB_CNTL_1 */
+                       0x00000006, /* EMC_FBIO_CFG6 */
+                       0x00000006, /* EMC_QUSE */
+                       0x00000005, /* EMC_EINPUT */
+                       0x00000004, /* EMC_EINPUT_DURATION */
+                       0x00060000, /* EMC_DLL_XFORM_DQS0 */
+                       0x00000009, /* EMC_QSAFE */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE0 */
+                       0x0000000d, /* EMC_RDV */
+                       0x0079e79e, /* EMC_XM2DQSPADCTRL4 */
+                       0x20820800, /* EMC_XM2DQSPADCTRL3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ0 */
+                       0xa8f10000, /* EMC_AUTO_CAL_CONFIG */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR0 */
+                       0x00000808, /* EMC_XM2CLKPADCTRL2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS0 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR1 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR2 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS1 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS2 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ1 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ2 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ3 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS1 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS3 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE1 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE2 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE3 */
+               },
+               {
+                       0x0000000e, /* MC_PTSA_GRANT_DECREMENT */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_G2_0 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_G2_1 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_NV_0 */
+                       0x000000ff, /* MC_LATENCY_ALLOWANCE_NV2_0 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_NV_2 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_NV_1 */
+                       0x000000ff, /* MC_LATENCY_ALLOWANCE_NV2_1 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_NV3 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_EPP_0 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_EPP_1 */
+               },
+               0x00000042, /* EMC_ZCAL_WAIT_CNT after clock change */
+               0x001fffff, /* EMC_AUTO_CAL_INTERVAL */
+               0x7320000e, /* EMC_CFG */
+               0x80001221, /* Mode Register 0 */
+               0x80100003, /* Mode Register 1 */
+               0x80200008, /* Mode Register 2 */
+               0x00000000, /* Mode Register 4 */
+               57820,      /* expected dvfs latency (ns) */
+       },
+       {
+               0x41,       /* Rev 4.0.3 */
+               20400,      /* SDRAM frequency */
+               900,       /* min voltage */
+               "pll_p",    /* clock source id */
+               0x40000026, /* CLK_SOURCE_EMC */
+               99,         /* number of burst_regs */
+               30,         /* number of trim_regs (each channel) */
+               11,         /* number of up_down_regs */
+               {
+                       0x00000000, /* EMC_RC */
+                       0x00000005, /* EMC_RFC */
+                       0x00000000, /* EMC_RFC_SLR */
+                       0x00000000, /* EMC_RAS */
+                       0x00000000, /* EMC_RP */
+                       0x00000004, /* EMC_R2W */
+                       0x0000000a, /* EMC_W2R */
+                       0x00000003, /* EMC_R2P */
+                       0x0000000b, /* EMC_W2P */
+                       0x00000000, /* EMC_RD_RCD */
+                       0x00000000, /* EMC_WR_RCD */
+                       0x00000003, /* EMC_RRD */
+                       0x00000001, /* EMC_REXT */
+                       0x00000000, /* EMC_WEXT */
+                       0x00000005, /* EMC_WDV */
+                       0x00000005, /* EMC_WDV_MASK */
+                       0x00000005, /* EMC_IBDLY */
+                       0x00010000, /* EMC_PUTERM_EXTRA */
+                       0x00000000, /* EMC_CDB_CNTL_2 */
+                       0x00000004, /* EMC_QRST */
+                       0x0000000d, /* EMC_RDV_MASK */
+                       0x0000009a, /* EMC_REFRESH */
+                       0x00000000, /* EMC_BURST_REFRESH_NUM */
+                       0x00000026, /* EMC_PRE_REFRESH_REQ_CNT */
+                       0x00000002, /* EMC_PDEX2WR */
+                       0x00000002, /* EMC_PDEX2RD */
+                       0x00000001, /* EMC_PCHG2PDEN */
+                       0x00000000, /* EMC_ACT2PDEN */
+                       0x00000007, /* EMC_AR2PDEN */
+                       0x0000000f, /* EMC_RW2PDEN */
+                       0x00000006, /* EMC_TXSR */
+                       0x00000006, /* EMC_TXSRDLL */
+                       0x00000004, /* EMC_TCKE */
+                       0x00000004, /* EMC_TCKESR */
+                       0x00000004, /* EMC_TPD */
+                       0x00000001, /* EMC_TFAW */
+                       0x00000000, /* EMC_TRPAB */
+                       0x00000004, /* EMC_TCLKSTABLE */
+                       0x00000005, /* EMC_TCLKSTOP */
+                       0x000000a0, /* EMC_TREFBW */
+                       0x00000005, /* EMC_QUSE_EXTRA */
+                       0x00000020, /* EMC_ODT_WRITE */
+                       0x00000000, /* EMC_ODT_READ */
+                       0x0000aa88, /* EMC_FBIO_CFG5 */
+                       0x002c00a0, /* EMC_CFG_DIG_DLL */
+                       0x00008000, /* EMC_CFG_DIG_DLL_PERIOD */
+                       0x00060000, /* EMC_DLL_XFORM_DQS4 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS5 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS6 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS7 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE4 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE5 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE6 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE7 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS4 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS5 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS6 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS7 */
+                       0x001112a0, /* EMC_XM2CMDPADCTRL */
+                       0x00000000, /* EMC_XM2CMDPADCTRL4 */
+                       0x0000a11c, /* EMC_XM2DQSPADCTRL2 */
+                       0x00000000, /* EMC_XM2DQPADCTRL2 */
+                       0x77ffc084, /* EMC_XM2CLKPADCTRL */
+                       0x81f1f108, /* EMC_XM2COMPPADCTRL */
+                       0x03035504, /* EMC_XM2VTTGENPADCTRL */
+                       0x00000000, /* EMC_XM2VTTGENPADCTRL2 */
+                       0x0000003f, /* EMC_DSR_VTTGEN_DRV */
+                       0x00000000, /* EMC_TXDSRVTTGEN */
+                       0x02000000, /* EMC_FBIO_SPARE */
+                       0x00000802, /* EMC_CTT_TERM_CTRL */
+                       0x00000000, /* EMC_ZCAL_INTERVAL */
+                       0x00000042, /* EMC_ZCAL_WAIT_CNT */
+                       0x000c000c, /* EMC_MRS_WAIT_CNT */
+                       0x000c000c, /* EMC_MRS_WAIT_CNT2 */
+                       0x00000000, /* EMC_AUTO_CAL_CONFIG2 */
+                       0x00000000, /* EMC_AUTO_CAL_CONFIG3 */
+                       0x00000000, /* EMC_CTT */
+                       0x00000000, /* EMC_CTT_DURATION */
+                       0x8000023a, /* EMC_DYN_SELF_REF_CONTROL */
+                       0x1f7df7df, /* EMC_CA_TRAINING_TIMING_CNTL1 */
+                       0x0000001f, /* EMC_CA_TRAINING_TIMING_CNTL2 */
+                       0x40020001, /* MC_EMEM_ARB_CFG */
+                       0x80000046, /* MC_EMEM_ARB_OUTSTANDING_REQ */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_RCD */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_RP */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_RC */
+                       0x00000000, /* MC_EMEM_ARB_TIMING_RAS */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_FAW */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_RRD */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_RAP2PRE */
+                       0x00000008, /* MC_EMEM_ARB_TIMING_WAP2PRE */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_R2R */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_W2W */
+                       0x00000003, /* MC_EMEM_ARB_TIMING_R2W */
+                       0x00000006, /* MC_EMEM_ARB_TIMING_W2R */
+                       0x06030102, /* MC_EMEM_ARB_DA_TURNS */
+                       0x000a0402, /* MC_EMEM_ARB_DA_COVERS */
+                       0x76230303, /* MC_EMEM_ARB_MISC0 */
+                       0x001f0000, /* MC_EMEM_ARB_RING1_THROTTLE */
+               },
+               {
+                       0x00000000, /* EMC_CDB_CNTL_1 */
+                       0x00000006, /* EMC_FBIO_CFG6 */
+                       0x00000006, /* EMC_QUSE */
+                       0x00000005, /* EMC_EINPUT */
+                       0x00000004, /* EMC_EINPUT_DURATION */
+                       0x00060000, /* EMC_DLL_XFORM_DQS0 */
+                       0x00000009, /* EMC_QSAFE */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE0 */
+                       0x0000000d, /* EMC_RDV */
+                       0x0079e79e, /* EMC_XM2DQSPADCTRL4 */
+                       0x20820800, /* EMC_XM2DQSPADCTRL3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ0 */
+                       0xa0f10000, /* EMC_AUTO_CAL_CONFIG */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR0 */
+                       0x00000808, /* EMC_XM2CLKPADCTRL2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS0 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR1 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR2 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS1 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS2 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ1 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ2 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ3 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS1 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS3 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE1 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE2 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE3 */
+               },
+               {
+                       0x00000000, /* EMC_CDB_CNTL_1 */
+                       0x00000006, /* EMC_FBIO_CFG6 */
+                       0x00000006, /* EMC_QUSE */
+                       0x00000005, /* EMC_EINPUT */
+                       0x00000004, /* EMC_EINPUT_DURATION */
+                       0x00060000, /* EMC_DLL_XFORM_DQS0 */
+                       0x00000009, /* EMC_QSAFE */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE0 */
+                       0x0000000d, /* EMC_RDV */
+                       0x0079e79e, /* EMC_XM2DQSPADCTRL4 */
+                       0x20820800, /* EMC_XM2DQSPADCTRL3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ0 */
+                       0xa8f10000, /* EMC_AUTO_CAL_CONFIG */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR0 */
+                       0x00000808, /* EMC_XM2CLKPADCTRL2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS0 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR1 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR2 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS1 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS2 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ1 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ2 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ3 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS1 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS3 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE1 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE2 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE3 */
+               },
+               {
+                       0x00000014, /* MC_PTSA_GRANT_DECREMENT */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_G2_0 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_G2_1 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_NV_0 */
+                       0x000000ff, /* MC_LATENCY_ALLOWANCE_NV2_0 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_NV_2 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_NV_1 */
+                       0x000000ff, /* MC_LATENCY_ALLOWANCE_NV2_1 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_NV3 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_EPP_0 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_EPP_1 */
+               },
+               0x00000042, /* EMC_ZCAL_WAIT_CNT after clock change */
+               0x001fffff, /* EMC_AUTO_CAL_INTERVAL */
+               0x7320000e, /* EMC_CFG */
+               0x80001221, /* Mode Register 0 */
+               0x80100003, /* Mode Register 1 */
+               0x80200008, /* Mode Register 2 */
+               0x00000000, /* Mode Register 4 */
+               35610,      /* expected dvfs latency (ns) */
+       },
+       {
+               0x41,       /* Rev 4.0.3 */
+               40800,      /* SDRAM frequency */
+               900,       /* min voltage */
+               "pll_p",    /* clock source id */
+               0x40000012, /* CLK_SOURCE_EMC */
+               99,         /* number of burst_regs */
+               30,         /* number of trim_regs (each channel) */
+               11,         /* number of up_down_regs */
+               {
+                       0x00000001, /* EMC_RC */
+                       0x0000000a, /* EMC_RFC */
+                       0x00000000, /* EMC_RFC_SLR */
+                       0x00000001, /* EMC_RAS */
+                       0x00000000, /* EMC_RP */
+                       0x00000004, /* EMC_R2W */
+                       0x0000000a, /* EMC_W2R */
+                       0x00000003, /* EMC_R2P */
+                       0x0000000b, /* EMC_W2P */
+                       0x00000000, /* EMC_RD_RCD */
+                       0x00000000, /* EMC_WR_RCD */
+                       0x00000003, /* EMC_RRD */
+                       0x00000001, /* EMC_REXT */
+                       0x00000000, /* EMC_WEXT */
+                       0x00000005, /* EMC_WDV */
+                       0x00000005, /* EMC_WDV_MASK */
+                       0x00000005, /* EMC_IBDLY */
+                       0x00010000, /* EMC_PUTERM_EXTRA */
+                       0x00000000, /* EMC_CDB_CNTL_2 */
+                       0x00000004, /* EMC_QRST */
+                       0x0000000d, /* EMC_RDV_MASK */
+                       0x00000134, /* EMC_REFRESH */
+                       0x00000000, /* EMC_BURST_REFRESH_NUM */
+                       0x0000004d, /* EMC_PRE_REFRESH_REQ_CNT */
+                       0x00000002, /* EMC_PDEX2WR */
+                       0x00000002, /* EMC_PDEX2RD */
+                       0x00000001, /* EMC_PCHG2PDEN */
+                       0x00000000, /* EMC_ACT2PDEN */
+                       0x00000008, /* EMC_AR2PDEN */
+                       0x0000000f, /* EMC_RW2PDEN */
+                       0x0000000c, /* EMC_TXSR */
+                       0x0000000c, /* EMC_TXSRDLL */
+                       0x00000004, /* EMC_TCKE */
+                       0x00000004, /* EMC_TCKESR */
+                       0x00000004, /* EMC_TPD */
+                       0x00000002, /* EMC_TFAW */
+                       0x00000000, /* EMC_TRPAB */
+                       0x00000004, /* EMC_TCLKSTABLE */
+                       0x00000005, /* EMC_TCLKSTOP */
+                       0x0000013f, /* EMC_TREFBW */
+                       0x00000005, /* EMC_QUSE_EXTRA */
+                       0x00000020, /* EMC_ODT_WRITE */
+                       0x00000000, /* EMC_ODT_READ */
+                       0x0000aa88, /* EMC_FBIO_CFG5 */
+                       0x002c00a0, /* EMC_CFG_DIG_DLL */
+                       0x00008000, /* EMC_CFG_DIG_DLL_PERIOD */
+                       0x00060000, /* EMC_DLL_XFORM_DQS4 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS5 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS6 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS7 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE4 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE5 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE6 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE7 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS4 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS5 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS6 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS7 */
+                       0x001112a0, /* EMC_XM2CMDPADCTRL */
+                       0x00000000, /* EMC_XM2CMDPADCTRL4 */
+                       0x0000a11c, /* EMC_XM2DQSPADCTRL2 */
+                       0x00000000, /* EMC_XM2DQPADCTRL2 */
+                       0x77ffc084, /* EMC_XM2CLKPADCTRL */
+                       0x81f1f108, /* EMC_XM2COMPPADCTRL */
+                       0x03035504, /* EMC_XM2VTTGENPADCTRL */
+                       0x00000000, /* EMC_XM2VTTGENPADCTRL2 */
+                       0x0000003f, /* EMC_DSR_VTTGEN_DRV */
+                       0x00000000, /* EMC_TXDSRVTTGEN */
+                       0x02000000, /* EMC_FBIO_SPARE */
+                       0x00000802, /* EMC_CTT_TERM_CTRL */
+                       0x00000000, /* EMC_ZCAL_INTERVAL */
+                       0x00000042, /* EMC_ZCAL_WAIT_CNT */
+                       0x000c000c, /* EMC_MRS_WAIT_CNT */
+                       0x000c000c, /* EMC_MRS_WAIT_CNT2 */
+                       0x00000000, /* EMC_AUTO_CAL_CONFIG2 */
+                       0x00000000, /* EMC_AUTO_CAL_CONFIG3 */
+                       0x00000000, /* EMC_CTT */
+                       0x00000000, /* EMC_CTT_DURATION */
+                       0x80000370, /* EMC_DYN_SELF_REF_CONTROL */
+                       0x1f7df7df, /* EMC_CA_TRAINING_TIMING_CNTL1 */
+                       0x0000001f, /* EMC_CA_TRAINING_TIMING_CNTL2 */
+                       0xa0000001, /* MC_EMEM_ARB_CFG */
+                       0x8000005b, /* MC_EMEM_ARB_OUTSTANDING_REQ */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_RCD */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_RP */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_RC */
+                       0x00000000, /* MC_EMEM_ARB_TIMING_RAS */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_FAW */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_RRD */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_RAP2PRE */
+                       0x00000008, /* MC_EMEM_ARB_TIMING_WAP2PRE */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_R2R */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_W2W */
+                       0x00000003, /* MC_EMEM_ARB_TIMING_R2W */
+                       0x00000006, /* MC_EMEM_ARB_TIMING_W2R */
+                       0x06030102, /* MC_EMEM_ARB_DA_TURNS */
+                       0x000a0402, /* MC_EMEM_ARB_DA_COVERS */
+                       0x74a30303, /* MC_EMEM_ARB_MISC0 */
+                       0x001f0000, /* MC_EMEM_ARB_RING1_THROTTLE */
+               },
+               {
+                       0x00000000, /* EMC_CDB_CNTL_1 */
+                       0x00000006, /* EMC_FBIO_CFG6 */
+                       0x00000006, /* EMC_QUSE */
+                       0x00000005, /* EMC_EINPUT */
+                       0x00000004, /* EMC_EINPUT_DURATION */
+                       0x00060000, /* EMC_DLL_XFORM_DQS0 */
+                       0x00000009, /* EMC_QSAFE */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE0 */
+                       0x0000000d, /* EMC_RDV */
+                       0x0079e79e, /* EMC_XM2DQSPADCTRL4 */
+                       0x20820800, /* EMC_XM2DQSPADCTRL3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ0 */
+                       0xa0f10000, /* EMC_AUTO_CAL_CONFIG */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR0 */
+                       0x00000808, /* EMC_XM2CLKPADCTRL2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS0 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR1 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR2 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS1 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS2 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ1 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ2 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ3 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS1 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS3 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE1 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE2 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE3 */
+               },
+               {
+                       0x00000000, /* EMC_CDB_CNTL_1 */
+                       0x00000006, /* EMC_FBIO_CFG6 */
+                       0x00000006, /* EMC_QUSE */
+                       0x00000005, /* EMC_EINPUT */
+                       0x00000004, /* EMC_EINPUT_DURATION */
+                       0x00060000, /* EMC_DLL_XFORM_DQS0 */
+                       0x00000009, /* EMC_QSAFE */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE0 */
+                       0x0000000d, /* EMC_RDV */
+                       0x0079e79e, /* EMC_XM2DQSPADCTRL4 */
+                       0x20820800, /* EMC_XM2DQSPADCTRL3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ0 */
+                       0xa8f10000, /* EMC_AUTO_CAL_CONFIG */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR0 */
+                       0x00000808, /* EMC_XM2CLKPADCTRL2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS0 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR1 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR2 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS1 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS2 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ1 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ2 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ3 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS1 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS3 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE1 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE2 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE3 */
+               },
+               {
+                       0x0000002a, /* MC_PTSA_GRANT_DECREMENT */
+                       0x00b000b0, /* MC_LATENCY_ALLOWANCE_G2_0 */
+                       0x00b000c4, /* MC_LATENCY_ALLOWANCE_G2_1 */
+                       0x00d700eb, /* MC_LATENCY_ALLOWANCE_NV_0 */
+                       0x000000eb, /* MC_LATENCY_ALLOWANCE_NV2_0 */
+                       0x00eb00eb, /* MC_LATENCY_ALLOWANCE_NV_2 */
+                       0x00ff00eb, /* MC_LATENCY_ALLOWANCE_NV_1 */
+                       0x000000ff, /* MC_LATENCY_ALLOWANCE_NV2_1 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_NV3 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_EPP_0 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_EPP_1 */
+               },
+               0x00000042, /* EMC_ZCAL_WAIT_CNT after clock change */
+               0x001fffff, /* EMC_AUTO_CAL_INTERVAL */
+               0x7320000e, /* EMC_CFG */
+               0x80001221, /* Mode Register 0 */
+               0x80100003, /* Mode Register 1 */
+               0x80200008, /* Mode Register 2 */
+               0x00000000, /* Mode Register 4 */
+               20850,      /* expected dvfs latency (ns) */
+       },
+       {
+               0x41,       /* Rev 4.0.3 */
+               68000,      /* SDRAM frequency */
+               900,       /* min voltage */
+               "pll_p",    /* clock source id */
+               0x4000000a, /* CLK_SOURCE_EMC */
+               99,         /* number of burst_regs */
+               30,         /* number of trim_regs (each channel) */
+               11,         /* number of up_down_regs */
+               {
+                       0x00000003, /* EMC_RC */
+                       0x00000011, /* EMC_RFC */
+                       0x00000000, /* EMC_RFC_SLR */
+                       0x00000002, /* EMC_RAS */
+                       0x00000000, /* EMC_RP */
+                       0x00000004, /* EMC_R2W */
+                       0x0000000a, /* EMC_W2R */
+                       0x00000003, /* EMC_R2P */
+                       0x0000000b, /* EMC_W2P */
+                       0x00000000, /* EMC_RD_RCD */
+                       0x00000000, /* EMC_WR_RCD */
+                       0x00000003, /* EMC_RRD */
+                       0x00000001, /* EMC_REXT */
+                       0x00000000, /* EMC_WEXT */
+                       0x00000005, /* EMC_WDV */
+                       0x00000005, /* EMC_WDV_MASK */
+                       0x00000005, /* EMC_IBDLY */
+                       0x00010000, /* EMC_PUTERM_EXTRA */
+                       0x00000000, /* EMC_CDB_CNTL_2 */
+                       0x00000004, /* EMC_QRST */
+                       0x0000000c, /* EMC_RDV_MASK */
+                       0x00000202, /* EMC_REFRESH */
+                       0x00000000, /* EMC_BURST_REFRESH_NUM */
+                       0x00000080, /* EMC_PRE_REFRESH_REQ_CNT */
+                       0x00000002, /* EMC_PDEX2WR */
+                       0x00000002, /* EMC_PDEX2RD */
+                       0x00000001, /* EMC_PCHG2PDEN */
+                       0x00000000, /* EMC_ACT2PDEN */
+                       0x0000000f, /* EMC_AR2PDEN */
+                       0x0000000f, /* EMC_RW2PDEN */
+                       0x00000013, /* EMC_TXSR */
+                       0x00000013, /* EMC_TXSRDLL */
+                       0x00000004, /* EMC_TCKE */
+                       0x00000004, /* EMC_TCKESR */
+                       0x00000004, /* EMC_TPD */
+                       0x00000003, /* EMC_TFAW */
+                       0x00000000, /* EMC_TRPAB */
+                       0x00000004, /* EMC_TCLKSTABLE */
+                       0x00000005, /* EMC_TCLKSTOP */
+                       0x00000213, /* EMC_TREFBW */
+                       0x00000005, /* EMC_QUSE_EXTRA */
+                       0x00000020, /* EMC_ODT_WRITE */
+                       0x00000000, /* EMC_ODT_READ */
+                       0x0000aa88, /* EMC_FBIO_CFG5 */
+                       0x002c00a0, /* EMC_CFG_DIG_DLL */
+                       0x00008000, /* EMC_CFG_DIG_DLL_PERIOD */
+                       0x00060000, /* EMC_DLL_XFORM_DQS4 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS5 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS6 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS7 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE4 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE5 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE6 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE7 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS4 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS5 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS6 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS7 */
+                       0x001112a0, /* EMC_XM2CMDPADCTRL */
+                       0x00000000, /* EMC_XM2CMDPADCTRL4 */
+                       0x0000a11c, /* EMC_XM2DQSPADCTRL2 */
+                       0x00000000, /* EMC_XM2DQPADCTRL2 */
+                       0x77ffc084, /* EMC_XM2CLKPADCTRL */
+                       0x81f1f108, /* EMC_XM2COMPPADCTRL */
+                       0x03035504, /* EMC_XM2VTTGENPADCTRL */
+                       0x00000000, /* EMC_XM2VTTGENPADCTRL2 */
+                       0x0000003f, /* EMC_DSR_VTTGEN_DRV */
+                       0x00000000, /* EMC_TXDSRVTTGEN */
+                       0x02000000, /* EMC_FBIO_SPARE */
+                       0x00000802, /* EMC_CTT_TERM_CTRL */
+                       0x00000000, /* EMC_ZCAL_INTERVAL */
+                       0x00000042, /* EMC_ZCAL_WAIT_CNT */
+                       0x000c000c, /* EMC_MRS_WAIT_CNT */
+                       0x000c000c, /* EMC_MRS_WAIT_CNT2 */
+                       0x00000000, /* EMC_AUTO_CAL_CONFIG2 */
+                       0x00000000, /* EMC_AUTO_CAL_CONFIG3 */
+                       0x00000000, /* EMC_CTT */
+                       0x00000000, /* EMC_CTT_DURATION */
+                       0x8000050e, /* EMC_DYN_SELF_REF_CONTROL */
+                       0x1f7df7df, /* EMC_CA_TRAINING_TIMING_CNTL1 */
+                       0x0000001f, /* EMC_CA_TRAINING_TIMING_CNTL2 */
+                       0x00000001, /* MC_EMEM_ARB_CFG */
+                       0x80000076, /* MC_EMEM_ARB_OUTSTANDING_REQ */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_RCD */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_RP */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_RC */
+                       0x00000000, /* MC_EMEM_ARB_TIMING_RAS */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_FAW */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_RRD */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_RAP2PRE */
+                       0x00000008, /* MC_EMEM_ARB_TIMING_WAP2PRE */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_R2R */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_W2W */
+                       0x00000003, /* MC_EMEM_ARB_TIMING_R2W */
+                       0x00000006, /* MC_EMEM_ARB_TIMING_W2R */
+                       0x06030102, /* MC_EMEM_ARB_DA_TURNS */
+                       0x000a0402, /* MC_EMEM_ARB_DA_COVERS */
+                       0x74230403, /* MC_EMEM_ARB_MISC0 */
+                       0x001f0000, /* MC_EMEM_ARB_RING1_THROTTLE */
+               },
+               {
+                       0x00000000, /* EMC_CDB_CNTL_1 */
+                       0x00000006, /* EMC_FBIO_CFG6 */
+                       0x00000006, /* EMC_QUSE */
+                       0x00000005, /* EMC_EINPUT */
+                       0x00000004, /* EMC_EINPUT_DURATION */
+                       0x00060000, /* EMC_DLL_XFORM_DQS0 */
+                       0x0000000a, /* EMC_QSAFE */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE0 */
+                       0x0000000c, /* EMC_RDV */
+                       0x0079e79e, /* EMC_XM2DQSPADCTRL4 */
+                       0x20820800, /* EMC_XM2DQSPADCTRL3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ0 */
+                       0xa0f10000, /* EMC_AUTO_CAL_CONFIG */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR0 */
+                       0x00000808, /* EMC_XM2CLKPADCTRL2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS0 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR1 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR2 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS1 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS2 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ1 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ2 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ3 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS1 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS3 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE1 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE2 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE3 */
+               },
+               {
+                       0x00000000, /* EMC_CDB_CNTL_1 */
+                       0x00000006, /* EMC_FBIO_CFG6 */
+                       0x00000006, /* EMC_QUSE */
+                       0x00000005, /* EMC_EINPUT */
+                       0x00000004, /* EMC_EINPUT_DURATION */
+                       0x00060000, /* EMC_DLL_XFORM_DQS0 */
+                       0x0000000a, /* EMC_QSAFE */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE0 */
+                       0x0000000c, /* EMC_RDV */
+                       0x0079e79e, /* EMC_XM2DQSPADCTRL4 */
+                       0x20820800, /* EMC_XM2DQSPADCTRL3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ0 */
+                       0xa8f10000, /* EMC_AUTO_CAL_CONFIG */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR0 */
+                       0x00000808, /* EMC_XM2CLKPADCTRL2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS0 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR1 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR2 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS1 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS2 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ1 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ2 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ3 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS1 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS3 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE1 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE2 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE3 */
+               },
+               {
+                       0x00000046, /* MC_PTSA_GRANT_DECREMENT */
+                       0x00690069, /* MC_LATENCY_ALLOWANCE_G2_0 */
+                       0x00690075, /* MC_LATENCY_ALLOWANCE_G2_1 */
+                       0x0081008d, /* MC_LATENCY_ALLOWANCE_NV_0 */
+                       0x0000008d, /* MC_LATENCY_ALLOWANCE_NV2_0 */
+                       0x008d008d, /* MC_LATENCY_ALLOWANCE_NV_2 */
+                       0x00bc008d, /* MC_LATENCY_ALLOWANCE_NV_1 */
+                       0x000000bc, /* MC_LATENCY_ALLOWANCE_NV2_1 */
+                       0x00bc00bc, /* MC_LATENCY_ALLOWANCE_NV3 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_EPP_0 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_EPP_1 */
+               },
+               0x00000042, /* EMC_ZCAL_WAIT_CNT after clock change */
+               0x001fffff, /* EMC_AUTO_CAL_INTERVAL */
+               0x7320000e, /* EMC_CFG */
+               0x80001221, /* Mode Register 0 */
+               0x80100003, /* Mode Register 1 */
+               0x80200008, /* Mode Register 2 */
+               0x00000000, /* Mode Register 4 */
+               10720,      /* expected dvfs latency (ns) */
+       },
+       {
+               0x41,       /* Rev 4.0.3 */
+               102000,     /* SDRAM frequency */
+               900,       /* min voltage */
+               "pll_p",    /* clock source id */
+               0x40000006, /* CLK_SOURCE_EMC */
+               99,         /* number of burst_regs */
+               30,         /* number of trim_regs (each channel) */
+               11,         /* number of up_down_regs */
+               {
+                       0x00000004, /* EMC_RC */
+                       0x0000001a, /* EMC_RFC */
+                       0x00000000, /* EMC_RFC_SLR */
+                       0x00000003, /* EMC_RAS */
+                       0x00000001, /* EMC_RP */
+                       0x00000004, /* EMC_R2W */
+                       0x0000000a, /* EMC_W2R */
+                       0x00000003, /* EMC_R2P */
+                       0x0000000b, /* EMC_W2P */
+                       0x00000001, /* EMC_RD_RCD */
+                       0x00000001, /* EMC_WR_RCD */
+                       0x00000003, /* EMC_RRD */
+                       0x00000001, /* EMC_REXT */
+                       0x00000000, /* EMC_WEXT */
+                       0x00000005, /* EMC_WDV */
+                       0x00000005, /* EMC_WDV_MASK */
+                       0x00000005, /* EMC_IBDLY */
+                       0x00010000, /* EMC_PUTERM_EXTRA */
+                       0x00000000, /* EMC_CDB_CNTL_2 */
+                       0x00000004, /* EMC_QRST */
+                       0x0000000c, /* EMC_RDV_MASK */
+                       0x00000303, /* EMC_REFRESH */
+                       0x00000000, /* EMC_BURST_REFRESH_NUM */
+                       0x000000c0, /* EMC_PRE_REFRESH_REQ_CNT */
+                       0x00000002, /* EMC_PDEX2WR */
+                       0x00000002, /* EMC_PDEX2RD */
+                       0x00000001, /* EMC_PCHG2PDEN */
+                       0x00000000, /* EMC_ACT2PDEN */
+                       0x00000018, /* EMC_AR2PDEN */
+                       0x0000000f, /* EMC_RW2PDEN */
+                       0x0000001c, /* EMC_TXSR */
+                       0x0000001c, /* EMC_TXSRDLL */
+                       0x00000004, /* EMC_TCKE */
+                       0x00000004, /* EMC_TCKESR */
+                       0x00000004, /* EMC_TPD */
+                       0x00000005, /* EMC_TFAW */
+                       0x00000000, /* EMC_TRPAB */
+                       0x00000004, /* EMC_TCLKSTABLE */
+                       0x00000005, /* EMC_TCLKSTOP */
+                       0x0000031c, /* EMC_TREFBW */
+                       0x00000005, /* EMC_QUSE_EXTRA */
+                       0x00000020, /* EMC_ODT_WRITE */
+                       0x00000000, /* EMC_ODT_READ */
+                       0x0000aa88, /* EMC_FBIO_CFG5 */
+                       0x002c00a0, /* EMC_CFG_DIG_DLL */
+                       0x00008000, /* EMC_CFG_DIG_DLL_PERIOD */
+                       0x00060000, /* EMC_DLL_XFORM_DQS4 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS5 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS6 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS7 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE4 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE5 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE6 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE7 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS4 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS5 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS6 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS7 */
+                       0x001112a0, /* EMC_XM2CMDPADCTRL */
+                       0x00000000, /* EMC_XM2CMDPADCTRL4 */
+                       0x0000a11c, /* EMC_XM2DQSPADCTRL2 */
+                       0x00000000, /* EMC_XM2DQPADCTRL2 */
+                       0x77ffc084, /* EMC_XM2CLKPADCTRL */
+                       0x81f1f108, /* EMC_XM2COMPPADCTRL */
+                       0x03035504, /* EMC_XM2VTTGENPADCTRL */
+                       0x00000000, /* EMC_XM2VTTGENPADCTRL2 */
+                       0x0000003f, /* EMC_DSR_VTTGEN_DRV */
+                       0x00000000, /* EMC_TXDSRVTTGEN */
+                       0x02000000, /* EMC_FBIO_SPARE */
+                       0x00000802, /* EMC_CTT_TERM_CTRL */
+                       0x00000000, /* EMC_ZCAL_INTERVAL */
+                       0x00000042, /* EMC_ZCAL_WAIT_CNT */
+                       0x000c000c, /* EMC_MRS_WAIT_CNT */
+                       0x000c000c, /* EMC_MRS_WAIT_CNT2 */
+                       0x00000000, /* EMC_AUTO_CAL_CONFIG2 */
+                       0x00000000, /* EMC_AUTO_CAL_CONFIG3 */
+                       0x00000000, /* EMC_CTT */
+                       0x00000000, /* EMC_CTT_DURATION */
+                       0x80000714, /* EMC_DYN_SELF_REF_CONTROL */
+                       0x1f7df7df, /* EMC_CA_TRAINING_TIMING_CNTL1 */
+                       0x0000001f, /* EMC_CA_TRAINING_TIMING_CNTL2 */
+                       0x08000001, /* MC_EMEM_ARB_CFG */
+                       0x80000098, /* MC_EMEM_ARB_OUTSTANDING_REQ */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_RCD */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_RP */
+                       0x00000003, /* MC_EMEM_ARB_TIMING_RC */
+                       0x00000000, /* MC_EMEM_ARB_TIMING_RAS */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_FAW */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_RRD */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_RAP2PRE */
+                       0x00000008, /* MC_EMEM_ARB_TIMING_WAP2PRE */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_R2R */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_W2W */
+                       0x00000003, /* MC_EMEM_ARB_TIMING_R2W */
+                       0x00000006, /* MC_EMEM_ARB_TIMING_W2R */
+                       0x06030102, /* MC_EMEM_ARB_DA_TURNS */
+                       0x000a0403, /* MC_EMEM_ARB_DA_COVERS */
+                       0x73c30504, /* MC_EMEM_ARB_MISC0 */
+                       0x001f0000, /* MC_EMEM_ARB_RING1_THROTTLE */
+               },
+               {
+                       0x00000000, /* EMC_CDB_CNTL_1 */
+                       0x00000006, /* EMC_FBIO_CFG6 */
+                       0x00000006, /* EMC_QUSE */
+                       0x00000005, /* EMC_EINPUT */
+                       0x00000004, /* EMC_EINPUT_DURATION */
+                       0x00060000, /* EMC_DLL_XFORM_DQS0 */
+                       0x0000000a, /* EMC_QSAFE */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE0 */
+                       0x0000000c, /* EMC_RDV */
+                       0x0079e79e, /* EMC_XM2DQSPADCTRL4 */
+                       0x20820800, /* EMC_XM2DQSPADCTRL3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ0 */
+                       0xa0f10000, /* EMC_AUTO_CAL_CONFIG */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR0 */
+                       0x00000808, /* EMC_XM2CLKPADCTRL2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS0 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR1 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR2 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS1 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS2 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ1 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ2 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ3 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS1 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS3 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE1 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE2 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE3 */
+               },
+               {
+                       0x00000000, /* EMC_CDB_CNTL_1 */
+                       0x00000006, /* EMC_FBIO_CFG6 */
+                       0x00000006, /* EMC_QUSE */
+                       0x00000005, /* EMC_EINPUT */
+                       0x00000004, /* EMC_EINPUT_DURATION */
+                       0x00060000, /* EMC_DLL_XFORM_DQS0 */
+                       0x0000000a, /* EMC_QSAFE */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE0 */
+                       0x0000000c, /* EMC_RDV */
+                       0x0079e79e, /* EMC_XM2DQSPADCTRL4 */
+                       0x20820800, /* EMC_XM2DQSPADCTRL3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ0 */
+                       0xa8f10000, /* EMC_AUTO_CAL_CONFIG */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR0 */
+                       0x00000808, /* EMC_XM2CLKPADCTRL2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS0 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR1 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR2 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS1 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS2 */
+                       0x00060000, /* EMC_DLL_XFORM_DQS3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ1 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ2 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ3 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS1 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS3 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE1 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE2 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE3 */
+               },
+               {
+                       0x00000068, /* MC_PTSA_GRANT_DECREMENT */
+                       0x00460046, /* MC_LATENCY_ALLOWANCE_G2_0 */
+                       0x0046004e, /* MC_LATENCY_ALLOWANCE_G2_1 */
+                       0x0056005e, /* MC_LATENCY_ALLOWANCE_NV_0 */
+                       0x0000005e, /* MC_LATENCY_ALLOWANCE_NV2_0 */
+                       0x005e005e, /* MC_LATENCY_ALLOWANCE_NV_2 */
+                       0x007d005e, /* MC_LATENCY_ALLOWANCE_NV_1 */
+                       0x0000007d, /* MC_LATENCY_ALLOWANCE_NV2_1 */
+                       0x007d007d, /* MC_LATENCY_ALLOWANCE_NV3 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_EPP_0 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_EPP_1 */
+               },
+               0x00000042, /* EMC_ZCAL_WAIT_CNT after clock change */
+               0x001fffff, /* EMC_AUTO_CAL_INTERVAL */
+               0x7320000e, /* EMC_CFG */
+               0x80001221, /* Mode Register 0 */
+               0x80100003, /* Mode Register 1 */
+               0x80200008, /* Mode Register 2 */
+               0x00000000, /* Mode Register 4 */
+               6890,       /* expected dvfs latency (ns) */
+       },
+       {
+               0x41,       /* Rev 4.0.3 */
+               204000,     /* SDRAM frequency */
+               1000,       /* min voltage */
+               "pll_p",    /* clock source id */
+               0x40000002, /* CLK_SOURCE_EMC */
+               99,         /* number of burst_regs */
+               30,         /* number of trim_regs (each channel) */
+               11,         /* number of up_down_regs */
+               {
+                       0x00000009, /* EMC_RC */
+                       0x00000035, /* EMC_RFC */
+                       0x00000000, /* EMC_RFC_SLR */
+                       0x00000007, /* EMC_RAS */
+                       0x00000002, /* EMC_RP */
+                       0x00000004, /* EMC_R2W */
+                       0x0000000a, /* EMC_W2R */
+                       0x00000003, /* EMC_R2P */
+                       0x0000000b, /* EMC_W2P */
+                       0x00000002, /* EMC_RD_RCD */
+                       0x00000002, /* EMC_WR_RCD */
+                       0x00000003, /* EMC_RRD */
+                       0x00000001, /* EMC_REXT */
+                       0x00000000, /* EMC_WEXT */
+                       0x00000005, /* EMC_WDV */
+                       0x00000005, /* EMC_WDV_MASK */
+                       0x00000006, /* EMC_IBDLY */
+                       0x00010000, /* EMC_PUTERM_EXTRA */
+                       0x00000000, /* EMC_CDB_CNTL_2 */
+                       0x00000004, /* EMC_QRST */
+                       0x0000000d, /* EMC_RDV_MASK */
+                       0x00000607, /* EMC_REFRESH */
+                       0x00000000, /* EMC_BURST_REFRESH_NUM */
+                       0x00000181, /* EMC_PRE_REFRESH_REQ_CNT */
+                       0x00000002, /* EMC_PDEX2WR */
+                       0x00000002, /* EMC_PDEX2RD */
+                       0x00000001, /* EMC_PCHG2PDEN */
+                       0x00000000, /* EMC_ACT2PDEN */
+                       0x00000032, /* EMC_AR2PDEN */
+                       0x0000000f, /* EMC_RW2PDEN */
+                       0x00000038, /* EMC_TXSR */
+                       0x00000038, /* EMC_TXSRDLL */
+                       0x00000004, /* EMC_TCKE */
+                       0x00000004, /* EMC_TCKESR */
+                       0x00000004, /* EMC_TPD */
+                       0x00000009, /* EMC_TFAW */
+                       0x00000000, /* EMC_TRPAB */
+                       0x00000004, /* EMC_TCLKSTABLE */
+                       0x00000005, /* EMC_TCLKSTOP */
+                       0x00000638, /* EMC_TREFBW */
+                       0x00000006, /* EMC_QUSE_EXTRA */
+                       0x00000020, /* EMC_ODT_WRITE */
+                       0x00000000, /* EMC_ODT_READ */
+                       0x0000aa88, /* EMC_FBIO_CFG5 */
+                       0x000000a0, /* EMC_CFG_DIG_DLL */
+                       0x00008000, /* EMC_CFG_DIG_DLL_PERIOD */
+                       0x00064000, /* EMC_DLL_XFORM_DQS4 */
+                       0x00064000, /* EMC_DLL_XFORM_DQS5 */
+                       0x00064000, /* EMC_DLL_XFORM_DQS6 */
+                       0x00064000, /* EMC_DLL_XFORM_DQS7 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE4 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE5 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE6 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE7 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS4 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS5 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS6 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS7 */
+                       0x001112a0, /* EMC_XM2CMDPADCTRL */
+                       0x00000000, /* EMC_XM2CMDPADCTRL4 */
+                       0x0000a11c, /* EMC_XM2DQSPADCTRL2 */
+                       0x00000000, /* EMC_XM2DQPADCTRL2 */
+                       0x77ffc084, /* EMC_XM2CLKPADCTRL */
+                       0x81f1f108, /* EMC_XM2COMPPADCTRL */
+                       0x05057404, /* EMC_XM2VTTGENPADCTRL */
+                       0x0000001f, /* EMC_XM2VTTGENPADCTRL2 */
+                       0x0000003f, /* EMC_DSR_VTTGEN_DRV */
+                       0x00000000, /* EMC_TXDSRVTTGEN */
+                       0x02000000, /* EMC_FBIO_SPARE */
+                       0x00000802, /* EMC_CTT_TERM_CTRL */
+                       0x00020000, /* EMC_ZCAL_INTERVAL */
+                       0x00000100, /* EMC_ZCAL_WAIT_CNT */
+                       0x000c000c, /* EMC_MRS_WAIT_CNT */
+                       0x000c000c, /* EMC_MRS_WAIT_CNT2 */
+                       0x00000000, /* EMC_AUTO_CAL_CONFIG2 */
+                       0x00000000, /* EMC_AUTO_CAL_CONFIG3 */
+                       0x00000000, /* EMC_CTT */
+                       0x00000000, /* EMC_CTT_DURATION */
+                       0x80000d22, /* EMC_DYN_SELF_REF_CONTROL */
+                       0x1f7df7df, /* EMC_CA_TRAINING_TIMING_CNTL1 */
+                       0x0000001f, /* EMC_CA_TRAINING_TIMING_CNTL2 */
+                       0x01000003, /* MC_EMEM_ARB_CFG */
+                       0x800000fe, /* MC_EMEM_ARB_OUTSTANDING_REQ */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_RCD */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_RP */
+                       0x00000005, /* MC_EMEM_ARB_TIMING_RC */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_RAS */
+                       0x00000004, /* MC_EMEM_ARB_TIMING_FAW */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_RRD */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_RAP2PRE */
+                       0x00000008, /* MC_EMEM_ARB_TIMING_WAP2PRE */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_R2R */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_W2W */
+                       0x00000003, /* MC_EMEM_ARB_TIMING_R2W */
+                       0x00000006, /* MC_EMEM_ARB_TIMING_W2R */
+                       0x06030102, /* MC_EMEM_ARB_DA_TURNS */
+                       0x000a0405, /* MC_EMEM_ARB_DA_COVERS */
+                       0x73840a06, /* MC_EMEM_ARB_MISC0 */
+                       0x001f0000, /* MC_EMEM_ARB_RING1_THROTTLE */
+               },
+               {
+                       0x00000000, /* EMC_CDB_CNTL_1 */
+                       0x00000004, /* EMC_FBIO_CFG6 */
+                       0x00000007, /* EMC_QUSE */
+                       0x00000004, /* EMC_EINPUT */
+                       0x00000004, /* EMC_EINPUT_DURATION */
+                       0x00064000, /* EMC_DLL_XFORM_DQS0 */
+                       0x00000009, /* EMC_QSAFE */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE0 */
+                       0x0000000d, /* EMC_RDV */
+                       0x0079e79e, /* EMC_XM2DQSPADCTRL4 */
+                       0x20820800, /* EMC_XM2DQSPADCTRL3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ0 */
+                       0xa0f10000, /* EMC_AUTO_CAL_CONFIG */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR0 */
+                       0x00000808, /* EMC_XM2CLKPADCTRL2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS0 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR1 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR2 */
+                       0x00064000, /* EMC_DLL_XFORM_DQS1 */
+                       0x00064000, /* EMC_DLL_XFORM_DQS2 */
+                       0x00064000, /* EMC_DLL_XFORM_DQS3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ1 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ2 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ3 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS1 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS3 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE1 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE2 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE3 */
+               },
+               {
+                       0x00000000, /* EMC_CDB_CNTL_1 */
+                       0x00000004, /* EMC_FBIO_CFG6 */
+                       0x00000007, /* EMC_QUSE */
+                       0x00000004, /* EMC_EINPUT */
+                       0x00000004, /* EMC_EINPUT_DURATION */
+                       0x00064000, /* EMC_DLL_XFORM_DQS0 */
+                       0x00000009, /* EMC_QSAFE */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE0 */
+                       0x0000000d, /* EMC_RDV */
+                       0x0079e79e, /* EMC_XM2DQSPADCTRL4 */
+                       0x20820800, /* EMC_XM2DQSPADCTRL3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ0 */
+                       0xa8f10000, /* EMC_AUTO_CAL_CONFIG */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR0 */
+                       0x00000808, /* EMC_XM2CLKPADCTRL2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS0 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR1 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR2 */
+                       0x00064000, /* EMC_DLL_XFORM_DQS1 */
+                       0x00064000, /* EMC_DLL_XFORM_DQS2 */
+                       0x00064000, /* EMC_DLL_XFORM_DQS3 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ1 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ2 */
+                       0x00048000, /* EMC_DLL_XFORM_DQ3 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS1 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS3 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE1 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE2 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE3 */
+               },
+               {
+                       0x000000d0, /* MC_PTSA_GRANT_DECREMENT */
+                       0x00230023, /* MC_LATENCY_ALLOWANCE_G2_0 */
+                       0x00230027, /* MC_LATENCY_ALLOWANCE_G2_1 */
+                       0x002b002f, /* MC_LATENCY_ALLOWANCE_NV_0 */
+                       0x0000002f, /* MC_LATENCY_ALLOWANCE_NV2_0 */
+                       0x002f002f, /* MC_LATENCY_ALLOWANCE_NV_2 */
+                       0x003e002f, /* MC_LATENCY_ALLOWANCE_NV_1 */
+                       0x0000003e, /* MC_LATENCY_ALLOWANCE_NV2_1 */
+                       0x003e003e, /* MC_LATENCY_ALLOWANCE_NV3 */
+                       0x00ff00c8, /* MC_LATENCY_ALLOWANCE_EPP_0 */
+                       0x00ff00ff, /* MC_LATENCY_ALLOWANCE_EPP_1 */
+               },
+               0x00000042, /* EMC_ZCAL_WAIT_CNT after clock change */
+               0x001fffff, /* EMC_AUTO_CAL_INTERVAL */
+               0x7320000e, /* EMC_CFG */
+               0x80001221, /* Mode Register 0 */
+               0x80100003, /* Mode Register 1 */
+               0x80200008, /* Mode Register 2 */
+               0x00000000, /* Mode Register 4 */
+               3420,       /* expected dvfs latency (ns) */
+       },
+       {
+               0x41,       /* Rev 4.0.3 */
+               408000,     /* SDRAM frequency */
+               1100,       /* min voltage */
+               "pll_p",    /* clock source id */
+               0x40000000, /* CLK_SOURCE_EMC */
+               99,         /* number of burst_regs */
+               30,         /* number of trim_regs (each channel) */
+               11,         /* number of up_down_regs */
+               {
+                       0x00000012, /* EMC_RC */
+                       0x00000069, /* EMC_RFC */
+                       0x00000000, /* EMC_RFC_SLR */
+                       0x0000000d, /* EMC_RAS */
+                       0x00000004, /* EMC_RP */
+                       0x00000005, /* EMC_R2W */
+                       0x00000009, /* EMC_W2R */
+                       0x00000002, /* EMC_R2P */
+                       0x0000000c, /* EMC_W2P */
+                       0x00000004, /* EMC_RD_RCD */
+                       0x00000004, /* EMC_WR_RCD */
+                       0x00000002, /* EMC_RRD */
+                       0x00000001, /* EMC_REXT */
+                       0x00000000, /* EMC_WEXT */
+                       0x00000004, /* EMC_WDV */
+                       0x00000004, /* EMC_WDV_MASK */
+                       0x00000007, /* EMC_IBDLY */
+                       0x00010000, /* EMC_PUTERM_EXTRA */
+                       0x00000000, /* EMC_CDB_CNTL_2 */
+                       0x00000004, /* EMC_QRST */
+                       0x0000000e, /* EMC_RDV_MASK */
+                       0x00000c2f, /* EMC_REFRESH */
+                       0x00000000, /* EMC_BURST_REFRESH_NUM */
+                       0x0000030b, /* EMC_PRE_REFRESH_REQ_CNT */
+                       0x00000001, /* EMC_PDEX2WR */
+                       0x00000008, /* EMC_PDEX2RD */
+                       0x00000001, /* EMC_PCHG2PDEN */
+                       0x00000000, /* EMC_ACT2PDEN */
+                       0x00000066, /* EMC_AR2PDEN */
+                       0x00000011, /* EMC_RW2PDEN */
+                       0x0000006f, /* EMC_TXSR */
+                       0x00000200, /* EMC_TXSRDLL */
+                       0x00000004, /* EMC_TCKE */
+                       0x00000004, /* EMC_TCKESR */
+                       0x00000004, /* EMC_TPD */
+                       0x00000011, /* EMC_TFAW */
+                       0x00000000, /* EMC_TRPAB */
+                       0x00000004, /* EMC_TCLKSTABLE */
+                       0x00000005, /* EMC_TCLKSTOP */
+                       0x00000c70, /* EMC_TREFBW */
+                       0x00000006, /* EMC_QUSE_EXTRA */
+                       0x00000020, /* EMC_ODT_WRITE */
+                       0x00000000, /* EMC_ODT_READ */
+                       0x0000ba88, /* EMC_FBIO_CFG5 */
+                       0x002c0080, /* EMC_CFG_DIG_DLL */
+                       0x00008000, /* EMC_CFG_DIG_DLL_PERIOD */
+                       0x00030000, /* EMC_DLL_XFORM_DQS4 */
+                       0x00030000, /* EMC_DLL_XFORM_DQS5 */
+                       0x00030000, /* EMC_DLL_XFORM_DQS6 */
+                       0x00030000, /* EMC_DLL_XFORM_DQS7 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE4 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE5 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE6 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE7 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS4 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS5 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS6 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS7 */
+                       0x001112a0, /* EMC_XM2CMDPADCTRL */
+                       0x00000000, /* EMC_XM2CMDPADCTRL4 */
+                       0x0003033d, /* EMC_XM2DQSPADCTRL2 */
+                       0x00000000, /* EMC_XM2DQPADCTRL2 */
+                       0x77ffc084, /* EMC_XM2CLKPADCTRL */
+                       0x81f1f108, /* EMC_XM2COMPPADCTRL */
+                       0x03035504, /* EMC_XM2VTTGENPADCTRL */
+                       0x00000000, /* EMC_XM2VTTGENPADCTRL2 */
+                       0x0000003f, /* EMC_DSR_VTTGEN_DRV */
+                       0x00000000, /* EMC_TXDSRVTTGEN */
+                       0x02000000, /* EMC_FBIO_SPARE */
+                       0x00000802, /* EMC_CTT_TERM_CTRL */
+                       0x00020000, /* EMC_ZCAL_INTERVAL */
+                       0x00000100, /* EMC_ZCAL_WAIT_CNT */
+                       0x0158000c, /* EMC_MRS_WAIT_CNT */
+                       0x0158000c, /* EMC_MRS_WAIT_CNT2 */
+                       0x07070707, /* EMC_AUTO_CAL_CONFIG2 */
+                       0x00000404, /* EMC_AUTO_CAL_CONFIG3 */
+                       0x00000000, /* EMC_CTT */
+                       0x00000000, /* EMC_CTT_DURATION */
+                       0x80001944, /* EMC_DYN_SELF_REF_CONTROL */
+                       0x1f7df7df, /* EMC_CA_TRAINING_TIMING_CNTL1 */
+                       0x0000001f, /* EMC_CA_TRAINING_TIMING_CNTL2 */
+                       0x02000006, /* MC_EMEM_ARB_CFG */
+                       0x80000190, /* MC_EMEM_ARB_OUTSTANDING_REQ */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_RCD */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_RP */
+                       0x0000000a, /* MC_EMEM_ARB_TIMING_RC */
+                       0x00000006, /* MC_EMEM_ARB_TIMING_RAS */
+                       0x00000008, /* MC_EMEM_ARB_TIMING_FAW */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_RRD */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_RAP2PRE */
+                       0x00000009, /* MC_EMEM_ARB_TIMING_WAP2PRE */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_R2R */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_W2W */
+                       0x00000004, /* MC_EMEM_ARB_TIMING_R2W */
+                       0x00000006, /* MC_EMEM_ARB_TIMING_W2R */
+                       0x06040202, /* MC_EMEM_ARB_DA_TURNS */
+                       0x000e070a, /* MC_EMEM_ARB_DA_COVERS */
+                       0x7547130b, /* MC_EMEM_ARB_MISC0 */
+                       0x001f0000, /* MC_EMEM_ARB_RING1_THROTTLE */
+               },
+               {
+                       0x00000000, /* EMC_CDB_CNTL_1 */
+                       0x00000006, /* EMC_FBIO_CFG6 */
+                       0x00000007, /* EMC_QUSE */
+                       0x00000005, /* EMC_EINPUT */
+                       0x00000004, /* EMC_EINPUT_DURATION */
+                       0x00030000, /* EMC_DLL_XFORM_DQS0 */
+                       0x0000000c, /* EMC_QSAFE */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE0 */
+                       0x0000000e, /* EMC_RDV */
+                       0x0079e79e, /* EMC_XM2DQSPADCTRL4 */
+                       0x20820800, /* EMC_XM2DQSPADCTRL3 */
+                       0x00018000, /* EMC_DLL_XFORM_DQ0 */
+                       0xa0f10000, /* EMC_AUTO_CAL_CONFIG */
+                       0x00008000, /* EMC_DLL_XFORM_ADDR0 */
+                       0x00000000, /* EMC_XM2CLKPADCTRL2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS0 */
+                       0x00008000, /* EMC_DLL_XFORM_ADDR1 */
+                       0x00008000, /* EMC_DLL_XFORM_ADDR2 */
+                       0x00030000, /* EMC_DLL_XFORM_DQS1 */
+                       0x00030000, /* EMC_DLL_XFORM_DQS2 */
+                       0x00030000, /* EMC_DLL_XFORM_DQS3 */
+                       0x00018000, /* EMC_DLL_XFORM_DQ1 */
+                       0x00018000, /* EMC_DLL_XFORM_DQ2 */
+                       0x00018000, /* EMC_DLL_XFORM_DQ3 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS1 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS3 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE1 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE2 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE3 */
+               },
+               {
+                       0x00000000, /* EMC_CDB_CNTL_1 */
+                       0x00000006, /* EMC_FBIO_CFG6 */
+                       0x00000007, /* EMC_QUSE */
+                       0x00000005, /* EMC_EINPUT */
+                       0x00000004, /* EMC_EINPUT_DURATION */
+                       0x00030000, /* EMC_DLL_XFORM_DQS0 */
+                       0x0000000c, /* EMC_QSAFE */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE0 */
+                       0x0000000e, /* EMC_RDV */
+                       0x0079e79e, /* EMC_XM2DQSPADCTRL4 */
+                       0x20820800, /* EMC_XM2DQSPADCTRL3 */
+                       0x00018000, /* EMC_DLL_XFORM_DQ0 */
+                       0xa8f10000, /* EMC_AUTO_CAL_CONFIG */
+                       0x00008000, /* EMC_DLL_XFORM_ADDR0 */
+                       0x00000000, /* EMC_XM2CLKPADCTRL2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS0 */
+                       0x00008000, /* EMC_DLL_XFORM_ADDR1 */
+                       0x00008000, /* EMC_DLL_XFORM_ADDR2 */
+                       0x00030000, /* EMC_DLL_XFORM_DQS1 */
+                       0x00030000, /* EMC_DLL_XFORM_DQS2 */
+                       0x00030000, /* EMC_DLL_XFORM_DQS3 */
+                       0x00018000, /* EMC_DLL_XFORM_DQ1 */
+                       0x00018000, /* EMC_DLL_XFORM_DQ2 */
+                       0x00018000, /* EMC_DLL_XFORM_DQ3 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS1 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS3 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE1 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE2 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE3 */
+               },
+               {
+                       0x000000d1, /* MC_PTSA_GRANT_DECREMENT */
+                       0x00110011, /* MC_LATENCY_ALLOWANCE_G2_0 */
+                       0x00110013, /* MC_LATENCY_ALLOWANCE_G2_1 */
+                       0x00150017, /* MC_LATENCY_ALLOWANCE_NV_0 */
+                       0x00000017, /* MC_LATENCY_ALLOWANCE_NV2_0 */
+                       0x00170017, /* MC_LATENCY_ALLOWANCE_NV_2 */
+                       0x001f0017, /* MC_LATENCY_ALLOWANCE_NV_1 */
+                       0x0000001f, /* MC_LATENCY_ALLOWANCE_NV2_1 */
+                       0x001f001f, /* MC_LATENCY_ALLOWANCE_NV3 */
+                       0x00d30064, /* MC_LATENCY_ALLOWANCE_EPP_0 */
+                       0x00d300d3, /* MC_LATENCY_ALLOWANCE_EPP_1 */
+               },
+               0x00000042, /* EMC_ZCAL_WAIT_CNT after clock change */
+               0x001fffff, /* EMC_AUTO_CAL_INTERVAL */
+               0x73200006, /* EMC_CFG */
+               0x80000731, /* Mode Register 0 */
+               0x80100002, /* Mode Register 1 */
+               0x80200008, /* Mode Register 2 */
+               0x00000000, /* Mode Register 4 */
+               1750,       /* expected dvfs latency (ns) */
+       },
+       {
+               0x41,       /* Rev 4.0.3 */
+               480000,     /* SDRAM frequency */
+               1100,       /* min voltage */
+               "pll_m",    /* clock source id */
+               0x80000000, /* CLK_SOURCE_EMC */
+               99,         /* number of burst_regs */
+               30,         /* number of trim_regs (each channel) */
+               11,         /* number of up_down_regs */
+               {
+                       0x00000017, /* EMC_RC */
+                       0x00000082, /* EMC_RFC */
+                       0x00000000, /* EMC_RFC_SLR */
+                       0x00000010, /* EMC_RAS */
+                       0x00000005, /* EMC_RP */
+                       0x00000005, /* EMC_R2W */
+                       0x00000009, /* EMC_W2R */
+                       0x00000002, /* EMC_R2P */
+                       0x0000000d, /* EMC_W2P */
+                       0x00000005, /* EMC_RD_RCD */
+                       0x00000005, /* EMC_WR_RCD */
+                       0x00000002, /* EMC_RRD */
+                       0x00000001, /* EMC_REXT */
+                       0x00000000, /* EMC_WEXT */
+                       0x00000004, /* EMC_WDV */
+                       0x00000004, /* EMC_WDV_MASK */
+                       0x00000007, /* EMC_IBDLY */
+                       0x00010000, /* EMC_PUTERM_EXTRA */
+                       0x00000000, /* EMC_CDB_CNTL_2 */
+                       0x00000004, /* EMC_QRST */
+                       0x0000000e, /* EMC_RDV_MASK */
+                       0x00000f23, /* EMC_REFRESH */
+                       0x00000000, /* EMC_BURST_REFRESH_NUM */
+                       0x000003c8, /* EMC_PRE_REFRESH_REQ_CNT */
+                       0x00000002, /* EMC_PDEX2WR */
+                       0x0000000b, /* EMC_PDEX2RD */
+                       0x00000001, /* EMC_PCHG2PDEN */
+                       0x00000000, /* EMC_ACT2PDEN */
+                       0x0000007f, /* EMC_AR2PDEN */
+                       0x00000012, /* EMC_RW2PDEN */
+                       0x00000089, /* EMC_TXSR */
+                       0x00000200, /* EMC_TXSRDLL */
+                       0x00000004, /* EMC_TCKE */
+                       0x00000004, /* EMC_TCKESR */
+                       0x00000004, /* EMC_TPD */
+                       0x00000015, /* EMC_TFAW */
+                       0x00000000, /* EMC_TRPAB */
+                       0x00000005, /* EMC_TCLKSTABLE */
+                       0x00000006, /* EMC_TCLKSTOP */
+                       0x00000f64, /* EMC_TREFBW */
+                       0x00000006, /* EMC_QUSE_EXTRA */
+                       0x00000020, /* EMC_ODT_WRITE */
+                       0x00000000, /* EMC_ODT_READ */
+                       0x0000ba88, /* EMC_FBIO_CFG5 */
+                       0xf0140091, /* EMC_CFG_DIG_DLL */
+                       0x00008000, /* EMC_CFG_DIG_DLL_PERIOD */
+                       0x0000000a, /* EMC_DLL_XFORM_DQS4 */
+                       0x0000000a, /* EMC_DLL_XFORM_DQS5 */
+                       0x0000000a, /* EMC_DLL_XFORM_DQS6 */
+                       0x0000000a, /* EMC_DLL_XFORM_DQS7 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE4 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE5 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE6 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE7 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS4 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS5 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS6 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS7 */
+                       0x001112a0, /* EMC_XM2CMDPADCTRL */
+                       0x00000000, /* EMC_XM2CMDPADCTRL4 */
+                       0x0003033d, /* EMC_XM2DQSPADCTRL2 */
+                       0x00000000, /* EMC_XM2DQPADCTRL2 */
+                       0x77ffc084, /* EMC_XM2CLKPADCTRL */
+                       0x81f1f108, /* EMC_XM2COMPPADCTRL */
+                       0x07077704, /* EMC_XM2VTTGENPADCTRL */
+                       0x00000000, /* EMC_XM2VTTGENPADCTRL2 */
+                       0x0000003f, /* EMC_DSR_VTTGEN_DRV */
+                       0x00000000, /* EMC_TXDSRVTTGEN */
+                       0x02000000, /* EMC_FBIO_SPARE */
+                       0x00000802, /* EMC_CTT_TERM_CTRL */
+                       0x00020000, /* EMC_ZCAL_INTERVAL */
+                       0x00000100, /* EMC_ZCAL_WAIT_CNT */
+                       0x013f000c, /* EMC_MRS_WAIT_CNT */
+                       0x013f000c, /* EMC_MRS_WAIT_CNT2 */
+                       0x00000000, /* EMC_AUTO_CAL_CONFIG2 */
+                       0x00000808, /* EMC_AUTO_CAL_CONFIG3 */
+                       0x00000000, /* EMC_CTT */
+                       0x00000000, /* EMC_CTT_DURATION */
+                       0x80001f05, /* EMC_DYN_SELF_REF_CONTROL */
+                       0x1f7df7df, /* EMC_CA_TRAINING_TIMING_CNTL1 */
+                       0x0000001f, /* EMC_CA_TRAINING_TIMING_CNTL2 */
+                       0x09000007, /* MC_EMEM_ARB_CFG */
+                       0x80000190, /* MC_EMEM_ARB_OUTSTANDING_REQ */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_RCD */
+                       0x00000003, /* MC_EMEM_ARB_TIMING_RP */
+                       0x0000000c, /* MC_EMEM_ARB_TIMING_RC */
+                       0x00000007, /* MC_EMEM_ARB_TIMING_RAS */
+                       0x0000000a, /* MC_EMEM_ARB_TIMING_FAW */
+                       0x00000001, /* MC_EMEM_ARB_TIMING_RRD */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_RAP2PRE */
+                       0x00000009, /* MC_EMEM_ARB_TIMING_WAP2PRE */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_R2R */
+                       0x00000002, /* MC_EMEM_ARB_TIMING_W2W */
+                       0x00000004, /* MC_EMEM_ARB_TIMING_R2W */
+                       0x00000006, /* MC_EMEM_ARB_TIMING_W2R */
+                       0x06040202, /* MC_EMEM_ARB_DA_TURNS */
+                       0x000f080c, /* MC_EMEM_ARB_DA_COVERS */
+                       0x7448170d, /* MC_EMEM_ARB_MISC0 */
+                       0x001f0000, /* MC_EMEM_ARB_RING1_THROTTLE */
+               },
+               {
+                       0x00000000, /* EMC_CDB_CNTL_1 */
+                       0x00000006, /* EMC_FBIO_CFG6 */
+                       0x00000007, /* EMC_QUSE */
+                       0x00000005, /* EMC_EINPUT */
+                       0x00000006, /* EMC_EINPUT_DURATION */
+                       0x0000000a, /* EMC_DLL_XFORM_DQS0 */
+                       0x0000000c, /* EMC_QSAFE */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE0 */
+                       0x0000000e, /* EMC_RDV */
+                       0x0079e79e, /* EMC_XM2DQSPADCTRL4 */
+                       0x20820800, /* EMC_XM2DQSPADCTRL3 */
+                       0x0000400b, /* EMC_DLL_XFORM_DQ0 */
+                       0xa0f10f0f, /* EMC_AUTO_CAL_CONFIG */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR0 */
+                       0x00000000, /* EMC_XM2CLKPADCTRL2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS0 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR1 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR2 */
+                       0x0000000a, /* EMC_DLL_XFORM_DQS1 */
+                       0x0000000a, /* EMC_DLL_XFORM_DQS2 */
+                       0x0000000a, /* EMC_DLL_XFORM_DQS3 */
+                       0x0000000c, /* EMC_DLL_XFORM_DQ1 */
+                       0x0000000c, /* EMC_DLL_XFORM_DQ2 */
+                       0x0000400b, /* EMC_DLL_XFORM_DQ3 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS1 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS3 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE1 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE2 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE3 */
+               },
+               {
+                       0x00000000, /* EMC_CDB_CNTL_1 */
+                       0x00000006, /* EMC_FBIO_CFG6 */
+                       0x00000007, /* EMC_QUSE */
+                       0x00000005, /* EMC_EINPUT */
+                       0x00000006, /* EMC_EINPUT_DURATION */
+                       0x0000000a, /* EMC_DLL_XFORM_DQS0 */
+                       0x0000000c, /* EMC_QSAFE */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE0 */
+                       0x0000000e, /* EMC_RDV */
+                       0x0079e79e, /* EMC_XM2DQSPADCTRL4 */
+                       0x20820800, /* EMC_XM2DQSPADCTRL3 */
+                       0x0000400b, /* EMC_DLL_XFORM_DQ0 */
+                       0xa8f10f0f, /* EMC_AUTO_CAL_CONFIG */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR0 */
+                       0x00000000, /* EMC_XM2CLKPADCTRL2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS0 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR1 */
+                       0x00000000, /* EMC_DLL_XFORM_ADDR2 */
+                       0x0000000a, /* EMC_DLL_XFORM_DQS1 */
+                       0x0000000a, /* EMC_DLL_XFORM_DQS2 */
+                       0x0000000a, /* EMC_DLL_XFORM_DQS3 */
+                       0x0000000c, /* EMC_DLL_XFORM_DQ1 */
+                       0x0000000c, /* EMC_DLL_XFORM_DQ2 */
+                       0x0000400b, /* EMC_DLL_XFORM_DQ3 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS1 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS2 */
+                       0x00000000, /* EMC_DLI_TRIM_TXDQS3 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE1 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE2 */
+                       0x00000000, /* EMC_DLL_XFORM_QUSE3 */
+               },
+               {
+                       0x000000f6, /* MC_PTSA_GRANT_DECREMENT */
+                       0x000f000f, /* MC_LATENCY_ALLOWANCE_G2_0 */
+                       0x000f0010, /* MC_LATENCY_ALLOWANCE_G2_1 */
+                       0x00120014, /* MC_LATENCY_ALLOWANCE_NV_0 */
+                       0x00000014, /* MC_LATENCY_ALLOWANCE_NV2_0 */
+                       0x00140014, /* MC_LATENCY_ALLOWANCE_NV_2 */
+                       0x001a0014, /* MC_LATENCY_ALLOWANCE_NV_1 */
+                       0x0000001a, /* MC_LATENCY_ALLOWANCE_NV2_1 */
+                       0x001a001a, /* MC_LATENCY_ALLOWANCE_NV3 */
+                       0x00b40055, /* MC_LATENCY_ALLOWANCE_EPP_0 */
+                       0x00b400b4, /* MC_LATENCY_ALLOWANCE_EPP_1 */
+               },
+               0x00000042, /* EMC_ZCAL_WAIT_CNT after clock change */
+               0x001fffff, /* EMC_AUTO_CAL_INTERVAL */
+               0x73200006, /* EMC_CFG */
+               0x80000931, /* Mode Register 0 */
+               0x80100002, /* Mode Register 1 */
+               0x80200008, /* Mode Register 2 */
+               0x00000000, /* Mode Register 4 */
+               1750,       /* expected dvfs latency (ns) */
+       },
+};
+
+static struct tegra11_emc_pdata e1545_h5tc4g63mfr_pba_pdata = {
+       .description = "e1545_h5tc4g63mfr_pba",
+       .tables = e1545_h5tc4g63mfr_pba_table,
+       .num_tables = ARRAY_SIZE(e1545_h5tc4g63mfr_pba_table),
+};
+
+static struct tegra11_emc_pdata *macallan_get_emc_data(void)
+{
+       return &e1545_h5tc4g63mfr_pba_pdata;
+}
+
+int __init macallan_emc_init(void)
+{
+       tegra_emc_device.dev.platform_data = macallan_get_emc_data();
+       platform_device_register(&tegra_emc_device);
+       tegra11_emc_init();
+       return 0;
+}
diff --git a/arch/arm/mach-tegra/board-macallan-panel.c b/arch/arm/mach-tegra/board-macallan-panel.c
new file mode 100644 (file)
index 0000000..c07fb19
--- /dev/null
@@ -0,0 +1,504 @@
+/*
+ * arch/arm/mach-tegra/board-macallan-panel.c
+ *
+ * Copyright (c) 2013, NVIDIA Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include <linux/ioport.h>
+#include <linux/fb.h>
+#include <linux/nvmap.h>
+#include <linux/nvhost.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/gpio.h>
+#include <linux/tegra_pwm_bl.h>
+#include <linux/regulator/consumer.h>
+#include <linux/pwm_backlight.h>
+
+#include <mach/irqs.h>
+#include <mach/dc.h>
+
+#include "board.h"
+#include "devices.h"
+#include "gpio-names.h"
+#include "board-panel.h"
+#include "common.h"
+#include "iomap.h"
+#include "tegra11_host1x_devices.h"
+
+#define DSI_PANEL_RST_GPIO     TEGRA_GPIO_PH5
+#define DSI_PANEL_BL_PWM_GPIO  TEGRA_GPIO_PH1
+
+struct platform_device * __init macallan_host1x_init(void)
+{
+       struct platform_device *pdev = NULL;
+
+#ifdef CONFIG_TEGRA_GRHOST
+       if (!of_have_populated_dt())
+               pdev = tegra11_register_host1x_devices();
+       else
+               pdev = to_platform_device(bus_find_device_by_name(
+                       &platform_bus_type, NULL, "host1x"));
+#endif
+       return pdev;
+}
+
+#ifdef CONFIG_TEGRA_DC
+
+/* HDMI Hotplug detection pin */
+#define macallan_hdmi_hpd      TEGRA_GPIO_PN7
+
+static struct regulator *macallan_hdmi_reg;
+static struct regulator *macallan_hdmi_pll;
+static struct regulator *macallan_hdmi_vddio;
+
+static struct resource macallan_disp1_resources[] = {
+       {
+               .name   = "irq",
+               .start  = INT_DISPLAY_GENERAL,
+               .end    = INT_DISPLAY_GENERAL,
+               .flags  = IORESOURCE_IRQ,
+       },
+       {
+               .name   = "regs",
+               .start  = TEGRA_DISPLAY_BASE,
+               .end    = TEGRA_DISPLAY_BASE + TEGRA_DISPLAY_SIZE - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       {
+               .name   = "fbmem",
+               .start  = 0, /* Filled in by macallan_panel_init() */
+               .end    = 0, /* Filled in by macallan_panel_init() */
+               .flags  = IORESOURCE_MEM,
+       },
+       {
+               .name   = "ganged_dsia_regs",
+               .start  = 0, /* Filled in the panel file by init_resources() */
+               .end    = 0, /* Filled in the panel file by init_resources() */
+               .flags  = IORESOURCE_MEM,
+       },
+       {
+               .name   = "ganged_dsib_regs",
+               .start  = 0, /* Filled in the panel file by init_resources() */
+               .end    = 0, /* Filled in the panel file by init_resources() */
+               .flags  = IORESOURCE_MEM,
+       },
+       {
+               .name   = "dsi_regs",
+               .start  = 0, /* Filled in the panel file by init_resources() */
+               .end    = 0, /* Filled in the panel file by init_resources() */
+               .flags  = IORESOURCE_MEM,
+       },
+       {
+               .name   = "mipi_cal",
+               .start  = TEGRA_MIPI_CAL_BASE,
+               .end    = TEGRA_MIPI_CAL_BASE + TEGRA_MIPI_CAL_SIZE - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+static struct resource macallan_disp2_resources[] = {
+       {
+               .name   = "irq",
+               .start  = INT_DISPLAY_B_GENERAL,
+               .end    = INT_DISPLAY_B_GENERAL,
+               .flags  = IORESOURCE_IRQ,
+       },
+       {
+               .name   = "regs",
+               .start  = TEGRA_DISPLAY2_BASE,
+               .end    = TEGRA_DISPLAY2_BASE + TEGRA_DISPLAY2_SIZE - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       {
+               .name   = "fbmem",
+               .start  = 0, /* Filled in by macallan_panel_init() */
+               .end    = 0, /* Filled in by macallan_panel_init() */
+               .flags  = IORESOURCE_MEM,
+       },
+       {
+               .name   = "hdmi_regs",
+               .start  = TEGRA_HDMI_BASE,
+               .end    = TEGRA_HDMI_BASE + TEGRA_HDMI_SIZE - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+
+static struct tegra_dc_sd_settings sd_settings;
+
+static struct tegra_dc_out macallan_disp1_out = {
+       .type           = TEGRA_DC_OUT_DSI,
+       .sd_settings    = &sd_settings,
+};
+
+static int macallan_hdmi_enable(struct device *dev)
+{
+       int ret;
+       if (!macallan_hdmi_reg) {
+               macallan_hdmi_reg = regulator_get(dev, "avdd_hdmi");
+               if (IS_ERR_OR_NULL(macallan_hdmi_reg)) {
+                       pr_err("hdmi: couldn't get regulator avdd_hdmi\n");
+                       macallan_hdmi_reg = NULL;
+                       return PTR_ERR(macallan_hdmi_reg);
+               }
+       }
+       ret = regulator_enable(macallan_hdmi_reg);
+       if (ret < 0) {
+               pr_err("hdmi: couldn't enable regulator avdd_hdmi\n");
+               return ret;
+       }
+       if (!macallan_hdmi_pll) {
+               macallan_hdmi_pll = regulator_get(dev, "avdd_hdmi_pll");
+               if (IS_ERR_OR_NULL(macallan_hdmi_pll)) {
+                       pr_err("hdmi: couldn't get regulator avdd_hdmi_pll\n");
+                       macallan_hdmi_pll = NULL;
+                       regulator_put(macallan_hdmi_reg);
+                       macallan_hdmi_reg = NULL;
+                       return PTR_ERR(macallan_hdmi_pll);
+               }
+       }
+       ret = regulator_enable(macallan_hdmi_pll);
+       if (ret < 0) {
+               pr_err("hdmi: couldn't enable regulator avdd_hdmi_pll\n");
+               return ret;
+       }
+       return 0;
+}
+
+static int macallan_hdmi_disable(void)
+{
+       if (macallan_hdmi_reg) {
+               regulator_disable(macallan_hdmi_reg);
+               regulator_put(macallan_hdmi_reg);
+               macallan_hdmi_reg = NULL;
+       }
+
+       if (macallan_hdmi_pll) {
+               regulator_disable(macallan_hdmi_pll);
+               regulator_put(macallan_hdmi_pll);
+               macallan_hdmi_pll = NULL;
+       }
+
+       return 0;
+}
+
+static int macallan_hdmi_postsuspend(void)
+{
+       if (macallan_hdmi_vddio) {
+               regulator_disable(macallan_hdmi_vddio);
+               regulator_put(macallan_hdmi_vddio);
+               macallan_hdmi_vddio = NULL;
+       }
+       return 0;
+}
+
+static int macallan_hdmi_hotplug_init(struct device *dev)
+{
+       if (!macallan_hdmi_vddio) {
+               macallan_hdmi_vddio = regulator_get(dev, "vdd_hdmi_5v0");
+               if (WARN_ON(IS_ERR(macallan_hdmi_vddio))) {
+                       pr_err("%s: couldn't get regulator vdd_hdmi_5v0: %ld\n",
+                               __func__, PTR_ERR(macallan_hdmi_vddio));
+                               macallan_hdmi_vddio = NULL;
+               } else {
+                       regulator_enable(macallan_hdmi_vddio);
+                       mdelay(5);
+               }
+       }
+
+       return 0;
+}
+
+static struct tegra_dc_out macallan_disp2_out = {
+       .type           = TEGRA_DC_OUT_HDMI,
+       .flags          = TEGRA_DC_OUT_HOTPLUG_HIGH,
+       .parent_clk     = "pll_d2_out0",
+
+       .dcc_bus        = 3,
+       .hotplug_gpio   = macallan_hdmi_hpd,
+
+       .max_pixclock   = KHZ2PICOS(297000),
+
+       .align          = TEGRA_DC_ALIGN_MSB,
+       .order          = TEGRA_DC_ORDER_RED_BLUE,
+
+       .enable         = macallan_hdmi_enable,
+       .disable        = macallan_hdmi_disable,
+       .postsuspend    = macallan_hdmi_postsuspend,
+       .hotplug_init   = macallan_hdmi_hotplug_init,
+};
+
+static struct tegra_fb_data macallan_disp1_fb_data = {
+       .win            = 0,
+       .bits_per_pixel = 32,
+       .flags          = TEGRA_FB_FLIP_ON_PROBE,
+};
+
+static struct tegra_dc_platform_data macallan_disp1_pdata = {
+       .flags          = TEGRA_DC_FLAG_ENABLED,
+       .default_out    = &macallan_disp1_out,
+       .fb             = &macallan_disp1_fb_data,
+       .emc_clk_rate   = 204000000,
+#ifdef CONFIG_TEGRA_DC_CMU
+       .cmu_enable     = 1,
+#endif
+};
+
+static struct tegra_fb_data macallan_disp2_fb_data = {
+       .win            = 0,
+       .xres           = 1024,
+       .yres           = 600,
+       .bits_per_pixel = 32,
+       .flags          = TEGRA_FB_FLIP_ON_PROBE,
+};
+
+static struct tegra_dc_platform_data macallan_disp2_pdata = {
+       .flags          = TEGRA_DC_FLAG_ENABLED,
+       .default_out    = &macallan_disp2_out,
+       .fb             = &macallan_disp2_fb_data,
+       .emc_clk_rate   = 300000000,
+};
+
+static struct platform_device macallan_disp2_device = {
+       .name           = "tegradc",
+       .id             = 1,
+       .resource       = macallan_disp2_resources,
+       .num_resources  = ARRAY_SIZE(macallan_disp2_resources),
+       .dev = {
+               .platform_data = &macallan_disp2_pdata,
+       },
+};
+
+static struct platform_device macallan_disp1_device = {
+       .name           = "tegradc",
+       .id             = 0,
+       .resource       = macallan_disp1_resources,
+       .num_resources  = ARRAY_SIZE(macallan_disp1_resources),
+       .dev = {
+               .platform_data = &macallan_disp1_pdata,
+       },
+};
+
+static struct nvmap_platform_carveout macallan_carveouts[] = {
+       [0] = {
+               .name           = "iram",
+               .usage_mask     = NVMAP_HEAP_CARVEOUT_IRAM,
+               .base           = TEGRA_IRAM_BASE + TEGRA_RESET_HANDLER_SIZE,
+               .size           = TEGRA_IRAM_SIZE - TEGRA_RESET_HANDLER_SIZE,
+               .buddy_size     = 0, /* no buddy allocation for IRAM */
+       },
+       [1] = {
+               .name           = "generic-0",
+               .usage_mask     = NVMAP_HEAP_CARVEOUT_GENERIC,
+               .base           = 0, /* Filled in by macallan_panel_init() */
+               .size           = 0, /* Filled in by macallan_panel_init() */
+               .buddy_size     = SZ_32K,
+       },
+       [2] = {
+               .name           = "vpr",
+               .usage_mask     = NVMAP_HEAP_CARVEOUT_VPR,
+               .base           = 0, /* Filled in by macallan_panel_init() */
+               .size           = 0, /* Filled in by macallan_panel_init() */
+               .buddy_size     = SZ_32K,
+       },
+};
+
+static struct nvmap_platform_data macallan_nvmap_data = {
+       .carveouts      = macallan_carveouts,
+       .nr_carveouts   = ARRAY_SIZE(macallan_carveouts),
+};
+static struct platform_device macallan_nvmap_device __initdata = {
+       .name   = "tegra-nvmap",
+       .id     = -1,
+       .dev    = {
+               .platform_data = &macallan_nvmap_data,
+       },
+};
+
+static struct tegra_dc_sd_settings macallan_sd_settings = {
+       .enable = 1, /* enabled by default. */
+       .use_auto_pwm = false,
+       .hw_update_delay = 0,
+       .bin_width = -1,
+       .aggressiveness = 5,
+       .use_vid_luma = false,
+       .phase_in_adjustments = 0,
+       .k_limit_enable = true,
+       .k_limit = 200,
+       .sd_window_enable = false,
+       .soft_clipping_enable = true,
+       /* Low soft clipping threshold to compensate for aggressive k_limit */
+       .soft_clipping_threshold = 128,
+       .smooth_k_enable = false,
+       .smooth_k_incr = 64,
+       /* Default video coefficients */
+       .coeff = {5, 9, 2},
+       .fc = {0, 0},
+       /* Immediate backlight changes */
+       .blp = {1024, 255},
+       /* Gammas: R: 2.2 G: 2.2 B: 2.2 */
+       /* Default BL TF */
+       .bltf = {
+                       {
+                               {57, 65, 73, 82},
+                               {92, 103, 114, 125},
+                               {138, 150, 164, 178},
+                               {193, 208, 224, 241},
+                       },
+               },
+       /* Default LUT */
+       .lut = {
+                       {
+                               {255, 255, 255},
+                               {199, 199, 199},
+                               {153, 153, 153},
+                               {116, 116, 116},
+                               {85, 85, 85},
+                               {59, 59, 59},
+                               {36, 36, 36},
+                               {17, 17, 17},
+                               {0, 0, 0},
+                       },
+               },
+       .sd_brightness = &sd_brightness,
+       .use_vpulse2 = true,
+};
+
+static void macallan_panel_select(void)
+{
+       struct tegra_panel *panel = NULL;
+       struct board_info board;
+       u8 dsi_instance;
+
+       tegra_get_display_board_info(&board);
+
+       switch (board.board_id) {
+       default:
+               panel = &dsi_p_wuxga_10_1;
+               dsi_instance = DSI_INSTANCE_0;
+               break;
+       }
+       if (panel) {
+               if (panel->init_sd_settings)
+                       panel->init_sd_settings(&sd_settings);
+
+               if (panel->init_dc_out) {
+                       panel->init_dc_out(&macallan_disp1_out);
+                       macallan_disp1_out.dsi->dsi_instance = dsi_instance;
+                       macallan_disp1_out.dsi->dsi_panel_rst_gpio =
+                               DSI_PANEL_RST_GPIO;
+                       macallan_disp1_out.dsi->dsi_panel_bl_pwm_gpio =
+                               DSI_PANEL_BL_PWM_GPIO;
+               }
+
+               if (panel->init_fb_data)
+                       panel->init_fb_data(&macallan_disp1_fb_data);
+
+               if (panel->init_cmu_data)
+                       panel->init_cmu_data(&macallan_disp1_pdata);
+
+               if (panel->set_disp_device)
+                       panel->set_disp_device(&macallan_disp1_device);
+
+               tegra_dsi_resources_init(dsi_instance, macallan_disp1_resources,
+                                ARRAY_SIZE(macallan_disp1_resources));
+
+               if (panel->register_bl_dev)
+                       panel->register_bl_dev();
+
+               if (panel->register_i2c_bridge)
+                       panel->register_i2c_bridge();
+       }
+
+}
+int __init macallan_panel_init(void)
+{
+       int err = 0;
+       struct resource __maybe_unused *res;
+       struct platform_device *phost1x = NULL;
+
+       sd_settings = macallan_sd_settings;
+
+       macallan_panel_select();
+
+#ifdef CONFIG_TEGRA_NVMAP
+       macallan_carveouts[1].base = tegra_carveout_start;
+       macallan_carveouts[1].size = tegra_carveout_size;
+       macallan_carveouts[2].base = tegra_vpr_start;
+       macallan_carveouts[2].size = tegra_vpr_size;
+
+       err = platform_device_register(&macallan_nvmap_device);
+       if (err) {
+               pr_err("nvmap device registration failed\n");
+               return err;
+       }
+#endif
+
+       phost1x = macallan_host1x_init();
+       if (!phost1x) {
+               pr_err("host1x devices registration failed\n");
+               return -EINVAL;
+       }
+
+       res = platform_get_resource_byname(&macallan_disp1_device,
+                                        IORESOURCE_MEM, "fbmem");
+       res->start = tegra_fb_start;
+       res->end = tegra_fb_start + tegra_fb_size - 1;
+
+       /* Copy the bootloader fb to the fb. */
+       __tegra_move_framebuffer(&macallan_nvmap_device,
+               tegra_fb_start, tegra_bootloader_fb_start,
+                       min(tegra_fb_size, tegra_bootloader_fb_size));
+
+       res = platform_get_resource_byname(&macallan_disp2_device,
+               IORESOURCE_MEM, "fbmem");
+       res->start = tegra_fb2_start;
+       res->end = tegra_fb2_start + tegra_fb2_size - 1;
+
+       macallan_disp1_device.dev.parent = &phost1x->dev;
+       err = platform_device_register(&macallan_disp1_device);
+       if (err) {
+               pr_err("disp1 device registration failed\n");
+               return err;
+       }
+
+       macallan_disp2_device.dev.parent = &phost1x->dev;
+       err = platform_device_register(&macallan_disp2_device);
+       if (err) {
+               pr_err("disp2 device registration failed\n");
+               return err;
+       }
+
+#ifdef CONFIG_TEGRA_NVAVP
+       nvavp_device.dev.parent = &phost1x->dev;
+       err = platform_device_register(&nvavp_device);
+       if (err) {
+               pr_err("nvavp device registration failed\n");
+               return err;
+       }
+#endif
+       return err;
+}
+#else
+int __init macallan_panel_init(void)
+{
+       if (macallan_host1x_init())
+               return 0;
+       else
+               return -EINVAL;
+}
+#endif
diff --git a/arch/arm/mach-tegra/board-macallan-pinmux-t11x.h b/arch/arm/mach-tegra/board-macallan-pinmux-t11x.h
new file mode 100644 (file)
index 0000000..d3eb0db
--- /dev/null
@@ -0,0 +1,351 @@
+/*
+ * arch/arm/mach-tegra/board-macallan-pinmux-t11x.h
+ *
+ * Copyright (c) 2013, NVIDIA Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth floor, Boston, MA  02110-1301, USA
+ */
+
+
+/* DO NOT EDIT THIS FILE. THIS FILE IS GENERATED FROM MACALLAN_PINMUX.XLSM */
+
+
+static __initdata struct tegra_pingroup_config macallan_pinmux_common[] = {
+
+       /* EXTPERIPH1 pinmux */
+       DEFAULT_PINMUX(CLK1_OUT,      EXTPERIPH1,  NORMAL,    NORMAL,   OUTPUT),
+
+       /* I2S0 pinmux */
+       DEFAULT_PINMUX(DAP1_DIN,      I2S0,        NORMAL,    NORMAL,   INPUT),
+       DEFAULT_PINMUX(DAP1_DOUT,     I2S0,        NORMAL,    NORMAL,   OUTPUT),
+       DEFAULT_PINMUX(DAP1_FS,       I2S0,        NORMAL,    NORMAL,   OUTPUT),
+       DEFAULT_PINMUX(DAP1_SCLK,     I2S0,        NORMAL,    NORMAL,   OUTPUT),
+
+       /* I2S1 pinmux */
+       DEFAULT_PINMUX(DAP2_DIN,      I2S1,        NORMAL,    NORMAL,   INPUT),
+       DEFAULT_PINMUX(DAP2_DOUT,     I2S1,        NORMAL,    NORMAL,   OUTPUT),
+       DEFAULT_PINMUX(DAP2_FS,       I2S1,        NORMAL,    NORMAL,   OUTPUT),
+       DEFAULT_PINMUX(DAP2_SCLK,     I2S1,        NORMAL,    NORMAL,   OUTPUT),
+
+       /* CLDVFS pinmux */
+       DEFAULT_PINMUX(DVFS_PWM,      CLDVFS,      NORMAL,    NORMAL,   OUTPUT),
+       DEFAULT_PINMUX(DVFS_CLK,      CLDVFS,      NORMAL,    NORMAL,   OUTPUT),
+
+       /* SPI1 pinmux */
+       DEFAULT_PINMUX(ULPI_CLK,      SPI1,        NORMAL,    NORMAL,   OUTPUT),
+       DEFAULT_PINMUX(ULPI_DIR,      SPI1,        NORMAL,    NORMAL,   INPUT),
+       DEFAULT_PINMUX(ULPI_NXT,      SPI1,        NORMAL,    NORMAL,   OUTPUT),
+       DEFAULT_PINMUX(ULPI_STP,      SPI1,        NORMAL,    NORMAL,   OUTPUT),
+
+       /* I2C3 pinmux */
+       I2C_PINMUX(CAM_I2C_SCL, I2C3, NORMAL, NORMAL, INPUT, DISABLE, ENABLE),
+       I2C_PINMUX(CAM_I2C_SDA, I2C3, NORMAL, NORMAL, INPUT, DISABLE, ENABLE),
+
+       /* VI_ALT3 pinmux */
+       VI_PINMUX(CAM_MCLK, VI_ALT3, NORMAL, NORMAL, OUTPUT, DISABLE, DISABLE),
+       VI_PINMUX(GPIO_PBB0, VI_ALT3, NORMAL, NORMAL, OUTPUT, DISABLE, DISABLE),
+
+       /* I2C2 pinmux */
+       I2C_PINMUX(GEN2_I2C_SCL, I2C2, NORMAL, NORMAL, INPUT, DISABLE, ENABLE),
+       I2C_PINMUX(GEN2_I2C_SDA, I2C2, NORMAL, NORMAL, INPUT, DISABLE, ENABLE),
+
+       /* UARTD pinmux */
+       DEFAULT_PINMUX(GMI_A16,       UARTD,       NORMAL,    NORMAL,   OUTPUT),
+       DEFAULT_PINMUX(GMI_A17,       UARTD,       NORMAL,    NORMAL,   INPUT),
+       DEFAULT_PINMUX(GMI_A18,       UARTD,       NORMAL,    NORMAL,   INPUT),
+       DEFAULT_PINMUX(GMI_A19,       UARTD,       NORMAL,    NORMAL,   OUTPUT),
+
+       /* SPI4 pinmux */
+       DEFAULT_PINMUX(GMI_AD5,       SPI4,        NORMAL,    NORMAL,   OUTPUT),
+       DEFAULT_PINMUX(GMI_AD6,       SPI4,        NORMAL,    NORMAL,   OUTPUT),
+       DEFAULT_PINMUX(GMI_AD7,       SPI4,        PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(GMI_WR_N,      SPI4,        NORMAL,    NORMAL,   OUTPUT),
+
+       /* PWM1 pinmux */
+       DEFAULT_PINMUX(GMI_AD9,       PWM1,        NORMAL,    NORMAL,   OUTPUT),
+
+       /* SOC pinmux */
+       DEFAULT_PINMUX(GMI_CS1_N,     SOC,         PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(GMI_OE_N,      SOC,         PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(CLK_32K_OUT,   SOC,         PULL_UP,   NORMAL,   INPUT),
+
+       /* EXTPERIPH2 pinmux */
+       DEFAULT_PINMUX(CLK2_OUT,      EXTPERIPH2,  NORMAL,    NORMAL,   OUTPUT),
+
+       /* SDMMC1 pinmux */
+       DEFAULT_PINMUX(SDMMC1_CLK,    SDMMC1,      NORMAL,    NORMAL,   INPUT),
+       DEFAULT_PINMUX(SDMMC1_CMD,    SDMMC1,      PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(SDMMC1_DAT0,   SDMMC1,      PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(SDMMC1_DAT1,   SDMMC1,      PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(SDMMC1_DAT2,   SDMMC1,      PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(SDMMC1_DAT3,   SDMMC1,      PULL_UP,   NORMAL,   INPUT),
+
+       /* SDMMC3 pinmux */
+       DEFAULT_PINMUX(SDMMC3_CLK,    SDMMC3,      NORMAL,    NORMAL,   OUTPUT),
+       DEFAULT_PINMUX(SDMMC3_CMD,    SDMMC3,      PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(SDMMC3_DAT0,   SDMMC3,      PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(SDMMC3_DAT1,   SDMMC3,      PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(SDMMC3_DAT2,   SDMMC3,      PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(SDMMC3_DAT3,   SDMMC3,      PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(SDMMC3_CLK_LB_OUT, SDMMC3,  PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(SDMMC3_CLK_LB_IN, SDMMC3,   PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(KB_COL4,       SDMMC3,      PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(SDMMC3_CD_N,   SDMMC3,      PULL_UP,   NORMAL,   INPUT),
+
+       /* SDMMC4 pinmux */
+       DEFAULT_PINMUX(SDMMC4_CLK,    SDMMC4,      NORMAL,    NORMAL,   INPUT),
+       DEFAULT_PINMUX(SDMMC4_CMD,    SDMMC4,      PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(SDMMC4_DAT0,   SDMMC4,      PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(SDMMC4_DAT1,   SDMMC4,      PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(SDMMC4_DAT2,   SDMMC4,      PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(SDMMC4_DAT3,   SDMMC4,      PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(SDMMC4_DAT4,   SDMMC4,      PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(SDMMC4_DAT5,   SDMMC4,      PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(SDMMC4_DAT6,   SDMMC4,      PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(SDMMC4_DAT7,   SDMMC4,      PULL_UP,   NORMAL,   INPUT),
+
+       /* UARTA pinmux */
+       DEFAULT_PINMUX(KB_ROW10,      UARTA,       PULL_DOWN, NORMAL,   INPUT),
+       DEFAULT_PINMUX(KB_ROW9,       UARTA,       NORMAL,    NORMAL,   OUTPUT),
+
+       DEFAULT_PINMUX(KB_ROW6,       KBC,         PULL_DOWN, NORMAL,   INPUT),
+
+       /* I2CPWR pinmux */
+       I2C_PINMUX(PWR_I2C_SCL, I2CPWR, NORMAL, NORMAL, INPUT, DISABLE, ENABLE),
+       I2C_PINMUX(PWR_I2C_SDA, I2CPWR, NORMAL, NORMAL, INPUT, DISABLE, ENABLE),
+
+       /* SYSCLK pinmux */
+       DEFAULT_PINMUX(SYS_CLK_REQ,   SYSCLK,      NORMAL,    NORMAL,   OUTPUT),
+
+       /* RTCK pinmux */
+       DEFAULT_PINMUX(JTAG_RTCK,     RTCK,        NORMAL,    NORMAL,   INPUT),
+
+       /* CLK pinmux */
+       DEFAULT_PINMUX(CLK_32K_IN,    CLK,         NORMAL,    NORMAL,   INPUT),
+
+       /* PWRON pinmux */
+       DEFAULT_PINMUX(CORE_PWR_REQ,  PWRON,       NORMAL,    NORMAL,   OUTPUT),
+
+       /* CPU pinmux */
+       DEFAULT_PINMUX(CPU_PWR_REQ,   CPU,         NORMAL,    NORMAL,   OUTPUT),
+
+       /* PMI pinmux */
+       DEFAULT_PINMUX(PWR_INT_N,     PMI,         PULL_UP,   NORMAL,   INPUT),
+
+       /* RESET_OUT_N pinmux */
+       DEFAULT_PINMUX(RESET_OUT_N,   RESET_OUT_N, NORMAL,    NORMAL,   OUTPUT),
+
+       /* EXTPERIPH3 pinmux */
+       DEFAULT_PINMUX(CLK3_OUT,      EXTPERIPH3,  NORMAL,    NORMAL,   OUTPUT),
+
+       /* I2S3 pinmux */
+       DEFAULT_PINMUX(DAP4_DIN,      I2S3,        NORMAL,    NORMAL,   INPUT),
+       DEFAULT_PINMUX(DAP4_DOUT,     I2S3,        NORMAL,    NORMAL,   OUTPUT),
+       DEFAULT_PINMUX(DAP4_FS,       I2S3,        NORMAL,    NORMAL,   OUTPUT),
+       DEFAULT_PINMUX(DAP4_SCLK,     I2S3,        NORMAL,    NORMAL,   OUTPUT),
+
+       /* I2C1 pinmux */
+       I2C_PINMUX(GEN1_I2C_SCL, I2C1, NORMAL, NORMAL, INPUT, DISABLE, ENABLE),
+       I2C_PINMUX(GEN1_I2C_SDA, I2C1, NORMAL, NORMAL, INPUT, DISABLE, ENABLE),
+
+       /* UARTB pinmux */
+       DEFAULT_PINMUX(UART2_CTS_N,   UARTB,       PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(UART2_RTS_N,   UARTB,       NORMAL,    NORMAL,   OUTPUT),
+
+       /* IRDA pinmux */
+       DEFAULT_PINMUX(UART2_RXD,     IRDA,        PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(UART2_TXD,     IRDA,        NORMAL,    NORMAL,   OUTPUT),
+
+       /* UARTC pinmux */
+       DEFAULT_PINMUX(UART3_CTS_N,   UARTC,       PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(UART3_RTS_N,   UARTC,       NORMAL,    NORMAL,   OUTPUT),
+       DEFAULT_PINMUX(UART3_RXD,     UARTC,       PULL_UP,   NORMAL,   INPUT),
+       DEFAULT_PINMUX(UART3_TXD,     UARTC,       NORMAL,    NORMAL,   OUTPUT),
+
+       /* CEC pinmux */
+       CEC_PINMUX(HDMI_CEC, CEC, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
+
+       /* I2C4 pinmux */
+       DDC_PINMUX(DDC_SCL, I2C4, NORMAL, NORMAL, INPUT, DISABLE, HIGH),
+       DDC_PINMUX(DDC_SDA, I2C4, NORMAL, NORMAL, INPUT, DISABLE, HIGH),
+
+       /* USB pinmux */
+       DEFAULT_PINMUX(USB_VBUS_EN0,  USB,         NORMAL,    NORMAL,   OUTPUT),
+
+       /* GPIO pinmux */
+       GPIO_PINMUX(GPIO_X4_AUD, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GPIO_X5_AUD, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GPIO_X6_AUD, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GPIO_X7_AUD, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GPIO_W2_AUD, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GPIO_W3_AUD, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GPIO_X1_AUD, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GPIO_X3_AUD, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(DAP3_DIN, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(DAP3_DOUT, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(DAP3_FS, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(DAP3_SCLK, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GPIO_PV0, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GPIO_PV1, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(ULPI_DATA2, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(ULPI_DATA3, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(ULPI_DATA4, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GPIO_PBB3, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GPIO_PBB4, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GPIO_PBB5, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GPIO_PBB6, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GPIO_PBB7, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GPIO_PCC1, PULL_DOWN, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GPIO_PCC2, PULL_DOWN, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GMI_AD0, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GMI_AD1, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GMI_AD10, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GMI_AD11, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GMI_AD12, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GMI_AD13, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GMI_AD14, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GMI_AD2, NORMAL, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GMI_AD3, NORMAL, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GMI_AD8, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GMI_ADV_N, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GMI_CLK, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GMI_CS0_N, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GMI_CS2_N, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GMI_CS3_N, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GMI_CS4_N, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GMI_CS7_N, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GMI_DQS_P, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GMI_IORDY, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GMI_RST_N, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GMI_WAIT, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GMI_WP_N, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(CLK2_REQ, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(SDMMC1_WP_N, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(KB_COL0, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(KB_COL1, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(KB_COL2, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(KB_COL3, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(KB_COL5, PULL_DOWN, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(KB_COL6, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(KB_COL7, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(KB_ROW0, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(KB_ROW1, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(KB_ROW2, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(KB_ROW3, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(KB_ROW4, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(KB_ROW5, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(KB_ROW7, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(KB_ROW8, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(CLK3_REQ, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GPIO_PU0, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GPIO_PU1, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GPIO_PU2, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GPIO_PU3, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GPIO_PU4, NORMAL, NORMAL, OUTPUT, DISABLE),
+       GPIO_PINMUX(GPIO_PU5, PULL_UP, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(GPIO_PU6, NORMAL, NORMAL, INPUT, DISABLE),
+       GPIO_PINMUX(HDMI_INT, PULL_DOWN, NORMAL, INPUT, DEFAULT),
+       GPIO_PINMUX(SPDIF_IN, NORMAL, NORMAL, OUTPUT, DISABLE),
+};
+
+static __initdata struct tegra_pingroup_config unused_pins_lowpower[] = {
+       UNUSED_PINMUX(CLK1_REQ),
+       UNUSED_PINMUX(ULPI_DATA0),
+       UNUSED_PINMUX(ULPI_DATA1),
+       UNUSED_PINMUX(ULPI_DATA5),
+       UNUSED_PINMUX(ULPI_DATA6),
+       UNUSED_PINMUX(ULPI_DATA7),
+       UNUSED_PINMUX(GMI_AD15),
+       UNUSED_PINMUX(GMI_AD4),
+       UNUSED_PINMUX(GMI_CS6_N),
+       UNUSED_PINMUX(OWR),
+       UNUSED_PINMUX(SPDIF_OUT),
+       UNUSED_PINMUX(USB_VBUS_EN1),
+};
+
+static struct gpio_init_pin_info init_gpio_mode_macallan_common[] = {
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PX4, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PX5, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PX6, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PX7, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PW2, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PW3, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PX1, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PX3, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PP1, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PP2, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PP0, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PP3, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PV0, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PV1, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PO3, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PO4, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PO5, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PBB3, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PBB4, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PBB5, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PBB6, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PBB7, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PCC1, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PCC2, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PG0, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PG1, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PH2, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PH3, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PH4, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PH5, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PH6, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PG2, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PG3, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PH0, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PK0, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PK1, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PJ0, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PK3, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PK4, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PK2, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PI6, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PJ3, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PI5, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PI4, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PI7, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PC7, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PCC5, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PV3, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PQ0, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PQ1, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PQ2, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PQ3, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PQ5, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PQ6, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PQ7, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PR0, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PR1, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PR2, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PR3, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PR4, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PR5, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PR7, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PS0, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PEE1, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PU0, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PU1, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PU2, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PU3, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PU4, false, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PU5, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PU6, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PN7, true, 0),
+       GPIO_INIT_PIN_MODE(TEGRA_GPIO_PK6, false, 0),
+};
diff --git a/arch/arm/mach-tegra/board-macallan-pinmux.c b/arch/arm/mach-tegra/board-macallan-pinmux.c
new file mode 100644 (file)
index 0000000..306b0ce
--- /dev/null
@@ -0,0 +1,254 @@
+/*
+ * arch/arm/mach-tegra/board-macallan-pinmux.c
+ *
+ * Copyright (C) 2013 NVIDIA Corporation
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/gpio.h>
+#include <mach/pinmux.h>
+#include <mach/gpio-tegra.h>
+#include "board.h"
+#include "board-macallan.h"
+#include "devices.h"
+#include "gpio-names.h"
+
+#include <mach/pinmux-t11.h>
+
+#define DEFAULT_DRIVE(_name)                                   \
+       {                                                       \
+               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,       \
+               .hsm = TEGRA_HSM_DISABLE,                       \
+               .schmitt = TEGRA_SCHMITT_ENABLE,                \
+               .drive = TEGRA_DRIVE_DIV_1,                     \
+               .pull_down = TEGRA_PULL_31,                     \
+               .pull_up = TEGRA_PULL_31,                       \
+               .slew_rising = TEGRA_SLEW_SLOWEST,              \
+               .slew_falling = TEGRA_SLEW_SLOWEST,             \
+       }
+/* Setting the drive strength of pins
+ * hsm: Enable High speed mode (ENABLE/DISABLE)
+ * Schimit: Enable/disable schimit (ENABLE/DISABLE)
+ * drive: low power mode (DIV_1, DIV_2, DIV_4, DIV_8)
+ * pulldn_drive - drive down (falling edge) - Driver Output Pull-Down drive
+ *                strength code. Value from 0 to 31.
+ * pullup_drive - drive up (rising edge)  - Driver Output Pull-Up drive
+ *                strength code. Value from 0 to 31.
+ * pulldn_slew -  Driver Output Pull-Up slew control code  - 2bit code
+ *                code 11 is least slewing of signal. code 00 is highest
+ *                slewing of the signal.
+ *                Value - FASTEST, FAST, SLOW, SLOWEST
+ * pullup_slew -  Driver Output Pull-Down slew control code -
+ *                code 11 is least slewing of signal. code 00 is highest
+ *                slewing of the signal.
+ *                Value - FASTEST, FAST, SLOW, SLOWEST
+ */
+#define SET_DRIVE(_name, _hsm, _schmitt, _drive, _pulldn_drive, _pullup_drive, _pulldn_slew, _pullup_slew) \
+       {                                               \
+               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,   \
+               .hsm = TEGRA_HSM_##_hsm,                    \
+               .schmitt = TEGRA_SCHMITT_##_schmitt,        \
+               .drive = TEGRA_DRIVE_##_drive,              \
+               .pull_down = TEGRA_PULL_##_pulldn_drive,    \
+               .pull_up = TEGRA_PULL_##_pullup_drive,          \
+               .slew_rising = TEGRA_SLEW_##_pulldn_slew,   \
+               .slew_falling = TEGRA_SLEW_##_pullup_slew,      \
+       }
+
+/* Setting the drive strength of pins
+ * hsm: Enable High speed mode (ENABLE/DISABLE)
+ * Schimit: Enable/disable schimit (ENABLE/DISABLE)
+ * drive: low power mode (DIV_1, DIV_2, DIV_4, DIV_8)
+ * pulldn_drive - drive down (falling edge) - Driver Output Pull-Down drive
+ *                strength code. Value from 0 to 31.
+ * pullup_drive - drive up (rising edge)  - Driver Output Pull-Up drive
+ *                strength code. Value from 0 to 31.
+ * pulldn_slew -  Driver Output Pull-Up slew control code  - 2bit code
+ *                code 11 is least slewing of signal. code 00 is highest
+ *                slewing of the signal.
+ *                Value - FASTEST, FAST, SLOW, SLOWEST
+ * pullup_slew -  Driver Output Pull-Down slew control code -
+ *                code 11 is least slewing of signal. code 00 is highest
+ *                slewing of the signal.
+ *                Value - FASTEST, FAST, SLOW, SLOWEST
+ * drive_type - Drive type to be used depending on the resistors.
+ */
+
+#define SET_DRIVE_WITH_TYPE(_name, _hsm, _schmitt, _drive, _pulldn_drive,\
+               _pullup_drive, _pulldn_slew, _pullup_slew, _drive_type) \
+       {                                                               \
+               .pingroup = TEGRA_DRIVE_PINGROUP_##_name,               \
+               .hsm = TEGRA_HSM_##_hsm,                                \
+               .schmitt = TEGRA_SCHMITT_##_schmitt,                    \
+               .drive = TEGRA_DRIVE_##_drive,                          \
+               .pull_down = TEGRA_PULL_##_pulldn_drive,                \
+               .pull_up = TEGRA_PULL_##_pullup_drive,                  \
+               .slew_rising = TEGRA_SLEW_##_pulldn_slew,               \
+               .slew_falling = TEGRA_SLEW_##_pullup_slew,              \
+               .drive_type = TEGRA_DRIVE_TYPE_##_drive_type,           \
+       }
+
+#define DEFAULT_PINMUX(_pingroup, _mux, _pupd, _tri, _io)      \
+       {                                                       \
+               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
+               .func           = TEGRA_MUX_##_mux,             \
+               .pupd           = TEGRA_PUPD_##_pupd,           \
+               .tristate       = TEGRA_TRI_##_tri,             \
+               .io             = TEGRA_PIN_##_io,              \
+               .lock           = TEGRA_PIN_LOCK_DEFAULT,       \
+               .od             = TEGRA_PIN_OD_DEFAULT,         \
+               .ioreset        = TEGRA_PIN_IO_RESET_DEFAULT,   \
+       }
+
+#define I2C_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _od) \
+       {                                                       \
+               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
+               .func           = TEGRA_MUX_##_mux,             \
+               .pupd           = TEGRA_PUPD_##_pupd,           \
+               .tristate       = TEGRA_TRI_##_tri,             \
+               .io             = TEGRA_PIN_##_io,              \
+               .lock           = TEGRA_PIN_LOCK_##_lock,       \
+               .od             = TEGRA_PIN_OD_##_od,           \
+               .ioreset        = TEGRA_PIN_IO_RESET_DEFAULT,   \
+       }
+
+#define DDC_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _rcv_sel) \
+       {                                                       \
+               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
+               .func           = TEGRA_MUX_##_mux,             \
+               .pupd           = TEGRA_PUPD_##_pupd,           \
+               .tristate       = TEGRA_TRI_##_tri,             \
+               .io             = TEGRA_PIN_##_io,              \
+               .lock           = TEGRA_PIN_LOCK_##_lock,       \
+               .rcv_sel        = TEGRA_PIN_RCV_SEL_##_rcv_sel,         \
+               .ioreset        = TEGRA_PIN_IO_RESET_DEFAULT,   \
+       }
+
+#define VI_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _ioreset) \
+       {                                                       \
+               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
+               .func           = TEGRA_MUX_##_mux,             \
+               .pupd           = TEGRA_PUPD_##_pupd,           \
+               .tristate       = TEGRA_TRI_##_tri,             \
+               .io             = TEGRA_PIN_##_io,              \
+               .lock           = TEGRA_PIN_LOCK_##_lock,       \
+               .od             = TEGRA_PIN_OD_DEFAULT,         \
+               .ioreset        = TEGRA_PIN_IO_RESET_##_ioreset \
+       }
+
+#define CEC_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _od)   \
+       {                                                               \
+               .pingroup   = TEGRA_PINGROUP_##_pingroup,                   \
+               .func       = TEGRA_MUX_##_mux,                             \
+               .pupd       = TEGRA_PUPD_##_pupd,                           \
+               .tristate   = TEGRA_TRI_##_tri,                             \
+               .io         = TEGRA_PIN_##_io,                              \
+               .lock       = TEGRA_PIN_LOCK_##_lock,                       \
+               .od         = TEGRA_PIN_OD_##_od,                           \
+               .ioreset    = TEGRA_PIN_IO_RESET_DEFAULT,                   \
+       }
+
+#define GPIO_PINMUX(_pingroup, _pupd, _tri, _io, _od)   \
+       {                                                   \
+               .pingroup   = TEGRA_PINGROUP_##_pingroup,       \
+               .func       = TEGRA_MUX_SAFE,                   \
+               .pupd       = TEGRA_PUPD_##_pupd,               \
+               .tristate   = TEGRA_TRI_##_tri,                 \
+               .io         = TEGRA_PIN_##_io,                  \
+               .lock       = TEGRA_PIN_LOCK_DEFAULT,           \
+               .od         = TEGRA_PIN_OD_##_od,               \
+               .ioreset    = TEGRA_PIN_IO_RESET_DEFAULT,       \
+       }
+
+#define UNUSED_PINMUX(_pingroup)                    \
+       {                                               \
+               .pingroup   = TEGRA_PINGROUP_##_pingroup,   \
+               .func       = TEGRA_MUX_SAFE,               \
+               .pupd       = TEGRA_PUPD_PULL_DOWN,         \
+               .tristate   = TEGRA_TRI_TRISTATE,           \
+               .io         = TEGRA_PIN_OUTPUT,             \
+               .lock       = TEGRA_PIN_LOCK_DEFAULT,       \
+               .od         = TEGRA_PIN_OD_DEFAULT,         \
+               .ioreset    = TEGRA_PIN_IO_RESET_DEFAULT,   \
+       }
+
+#define USB_PINMUX CEC_PINMUX
+
+#define GPIO_INIT_PIN_MODE(_gpio, _is_input, _value)   \
+       {                                       \
+               .gpio_nr        = _gpio,        \
+               .is_input       = _is_input,    \
+               .value          = _value,       \
+       }
+
+static __initdata struct tegra_drive_pingroup_config macallan_drive_pinmux[] = {
+       /* DEFAULT_DRIVE(<pin_group>), */
+       /* SDMMC1 */
+       SET_DRIVE(SDIO1, ENABLE, DISABLE, DIV_1, 36, 20, SLOW, SLOW),
+
+       /* SDMMC3 */
+       SET_DRIVE(SDIO3, ENABLE, DISABLE, DIV_1, 22, 36, FASTEST, FASTEST),
+
+       /* SDMMC4 */
+       SET_DRIVE_WITH_TYPE(GMA, ENABLE, DISABLE, DIV_1, 2, 1, FASTEST,
+                                                               FASTEST, 1),
+};
+
+#include "board-macallan-pinmux-t11x.h"
+
+/* THIS IS FOR TESTING OR WORKAROUND PURPOSES. ANYTHING INSIDE THIS TABLE
+ * SHOULD BE PUSHED TO PINMUX SPREADSHEET FOR AUTOGEN OR FIXED
+ * */
+static __initdata struct tegra_pingroup_config manual_config_pinmux[] = {
+
+       /* ULPI SFIOs are not supposed to be supported.
+        * This setting is only for Macallan. */
+       DEFAULT_PINMUX(ULPI_DATA0,    ULPI,        NORMAL,    NORMAL,   INPUT),
+       DEFAULT_PINMUX(ULPI_DATA1,    ULPI,        NORMAL,    NORMAL,   INPUT),
+       DEFAULT_PINMUX(ULPI_DATA5,    ULPI,        NORMAL,    NORMAL,   INPUT),
+       DEFAULT_PINMUX(ULPI_DATA6,    ULPI,        NORMAL,    NORMAL,   INPUT),
+       DEFAULT_PINMUX(ULPI_DATA7,    ULPI,        NORMAL,    NORMAL,   INPUT),
+};
+
+static void __init macallan_gpio_init_configure(void)
+{
+       int len;
+       int i;
+       struct gpio_init_pin_info *pins_info;
+
+       len = ARRAY_SIZE(init_gpio_mode_macallan_common);
+       pins_info = init_gpio_mode_macallan_common;
+
+       for (i = 0; i < len; ++i) {
+               tegra_gpio_init_configure(pins_info->gpio_nr,
+                       pins_info->is_input, pins_info->value);
+               pins_info++;
+       }
+}
+
+int __init macallan_pinmux_init(void)
+{
+       macallan_gpio_init_configure();
+
+       tegra_pinmux_config_table(macallan_pinmux_common,
+                                       ARRAY_SIZE(macallan_pinmux_common));
+       tegra_drive_pinmux_config_table(macallan_drive_pinmux,
+                                       ARRAY_SIZE(macallan_drive_pinmux));
+       tegra_pinmux_config_table(unused_pins_lowpower,
+               ARRAY_SIZE(unused_pins_lowpower));
+       tegra_pinmux_config_table(manual_config_pinmux,
+               ARRAY_SIZE(manual_config_pinmux));
+
+       return 0;
+}
diff --git a/arch/arm/mach-tegra/board-macallan-power.c b/arch/arm/mach-tegra/board-macallan-power.c
new file mode 100644 (file)
index 0000000..7c9f77c
--- /dev/null
@@ -0,0 +1,669 @@
+/*
+ * arch/arm/mach-tegra/board-macallan-power.c
+ *
+ * Copyright (C) 2012-2013 NVIDIA Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+#include <linux/i2c.h>
+#include <linux/pda_power.h>
+#include <linux/platform_device.h>
+#include <linux/resource.h>
+#include <linux/io.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/driver.h>
+#include <linux/regulator/fixed.h>
+#include <linux/mfd/palmas.h>
+#include <linux/gpio.h>
+#include <linux/interrupt.h>
+#include <linux/regulator/userspace-consumer.h>
+
+#include <asm/mach-types.h>
+#include <linux/power/sbs-battery.h>
+
+#include <mach/irqs.h>
+#include <mach/hardware.h>
+#include <mach/edp.h>
+#include <mach/gpio-tegra.h>
+
+#include "cpu-tegra.h"
+#include "pm.h"
+#include "tegra-board-id.h"
+#include "board.h"
+#include "gpio-names.h"
+#include "board-common.h"
+#include "board-macallan.h"
+#include "tegra_cl_dvfs.h"
+#include "devices.h"
+#include "tegra11_soctherm.h"
+#include "tegra3_tsensor.h"
+#include "iomap.h"
+
+#define PMC_CTRL               0x0
+#define PMC_CTRL_INTR_LOW      (1 << 17)
+
+/************************ Macallan based regulator ****************/
+static struct regulator_consumer_supply palmas_smps123_supply[] = {
+       REGULATOR_SUPPLY("vdd_cpu", NULL),
+};
+
+static struct regulator_consumer_supply palmas_smps45_supply[] = {
+       REGULATOR_SUPPLY("vdd_core", NULL),
+};
+
+static struct regulator_consumer_supply palmas_smps6_supply[] = {
+       REGULATOR_SUPPLY("vdd_lcd_hv", NULL),
+       REGULATOR_SUPPLY("avdd_lcd", NULL),
+       REGULATOR_SUPPLY("avdd", "spi0.0"),
+};
+
+static struct regulator_consumer_supply palmas_smps7_supply[] = {
+       REGULATOR_SUPPLY("vddio_ddr", NULL),
+};
+
+static struct regulator_consumer_supply palmas_smps8_supply[] = {
+       REGULATOR_SUPPLY("avdd_usb_pll", "tegra-udc.0"),
+       REGULATOR_SUPPLY("avdd_usb_pll", "tegra-ehci.0"),
+       REGULATOR_SUPPLY("avdd_usb_pll", "tegra-ehci.1"),
+       REGULATOR_SUPPLY("avdd_osc", NULL),
+       REGULATOR_SUPPLY("vddio_sys", NULL),
+       REGULATOR_SUPPLY("vddio_bb", NULL),
+       REGULATOR_SUPPLY("vddio_sdmmc", "sdhci-tegra.0"),
+       REGULATOR_SUPPLY("pwrdet_sdmmc1", NULL),
+       REGULATOR_SUPPLY("vddio_sdmmc", "sdhci-tegra.3"),
+       REGULATOR_SUPPLY("vdd_emmc", "sdhci-tegra.3"),
+       REGULATOR_SUPPLY("pwrdet_sdmmc4", NULL),
+       REGULATOR_SUPPLY("vddio_audio", NULL),
+       REGULATOR_SUPPLY("pwrdet_audio", NULL),
+       REGULATOR_SUPPLY("vddio_uart", NULL),
+       REGULATOR_SUPPLY("pwrdet_uart", NULL),
+       REGULATOR_SUPPLY("vddio_gmi", NULL),
+};
+
+static struct regulator_consumer_supply palmas_smps9_supply[] = {
+       REGULATOR_SUPPLY("vddio_sd_slot", "sdhci-tegra.3"),
+};
+
+static struct regulator_consumer_supply palmas_smps10_supply[] = {
+};
+
+static struct regulator_consumer_supply palmas_ldo1_supply[] = {
+       REGULATOR_SUPPLY("avdd_hdmi_pll", "tegradc.1"),
+       REGULATOR_SUPPLY("avdd_csi_dsi_pll", "tegradc.0"),
+       REGULATOR_SUPPLY("avdd_csi_dsi_pll", "tegradc.1"),
+       REGULATOR_SUPPLY("avdd_csi_dsi_pll", "vi"),
+       REGULATOR_SUPPLY("avdd_pllm", NULL),
+       REGULATOR_SUPPLY("avdd_pllu", NULL),
+       REGULATOR_SUPPLY("avdd_plla_p_c", NULL),
+       REGULATOR_SUPPLY("avdd_pllx", NULL),
+       REGULATOR_SUPPLY("vdd_ddr_hs", NULL),
+       REGULATOR_SUPPLY("avdd_plle", NULL),
+};
+
+static struct regulator_consumer_supply palmas_ldo2_supply[] = {
+       REGULATOR_SUPPLY("avdd_dsi_csi", "tegradc.0"),
+       REGULATOR_SUPPLY("avdd_dsi_csi", "tegradc.1"),
+       REGULATOR_SUPPLY("avdd_dsi_csi", "vi"),
+       REGULATOR_SUPPLY("vddio_hsic", "tegra-ehci.1"),
+       REGULATOR_SUPPLY("vddio_hsic", "tegra-ehci.2"),
+};
+
+static struct regulator_consumer_supply palmas_ldo3_supply[] = {
+       REGULATOR_SUPPLY("vpp_fuse", NULL),
+};
+
+static struct regulator_consumer_supply palmas_ldo4_supply[] = {
+};
+
+static struct regulator_consumer_supply palmas_ldo5_supply[] = {
+};
+
+static struct regulator_consumer_supply palmas_ldo6_supply[] = {
+};
+
+static struct regulator_consumer_supply palmas_ldo7_supply[] = {
+};
+static struct regulator_consumer_supply palmas_ldo8_supply[] = {
+       REGULATOR_SUPPLY("vdd_rtc", NULL),
+};
+static struct regulator_consumer_supply palmas_ldo9_supply[] = {
+       REGULATOR_SUPPLY("vddio_sdmmc", "sdhci-tegra.2"),
+       REGULATOR_SUPPLY("pwrdet_sdmmc3", NULL),
+};
+static struct regulator_consumer_supply palmas_ldoln_supply[] = {
+       REGULATOR_SUPPLY("avdd_hdmi", "tegradc.1"),
+};
+
+static struct regulator_consumer_supply palmas_ldousb_supply[] = {
+       REGULATOR_SUPPLY("avdd_usb", "tegra-udc.0"),
+       REGULATOR_SUPPLY("avdd_usb", "tegra-ehci.0"),
+       REGULATOR_SUPPLY("avdd_usb", "tegra-ehci.1"),
+       REGULATOR_SUPPLY("avdd_usb", "tegra-ehci.2"),
+       REGULATOR_SUPPLY("hvdd_usb", "tegra-ehci.2"),
+
+};
+
+static struct regulator_consumer_supply palmas_regen1_supply[] = {
+};
+
+static struct regulator_consumer_supply palmas_regen2_supply[] = {
+};
+
+#define PALMAS_PDATA_INIT(_name, _minmv, _maxmv, _supply_reg, _always_on, \
+       _boot_on, _apply_uv)                                            \
+       static struct regulator_init_data reg_idata_##_name = {         \
+               .constraints = {                                        \
+                       .name = palmas_rails(_name),                    \
+                       .min_uV = (_minmv)*1000,                        \
+                       .max_uV = (_maxmv)*1000,                        \
+                       .valid_modes_mask = (REGULATOR_MODE_NORMAL |    \
+                                       REGULATOR_MODE_STANDBY),        \
+                       .valid_ops_mask = (REGULATOR_CHANGE_MODE |      \
+                                       REGULATOR_CHANGE_STATUS |       \
+                                       REGULATOR_CHANGE_VOLTAGE),      \
+                       .always_on = _always_on,                        \
+                       .boot_on = _boot_on,                            \
+                       .apply_uV = _apply_uv,                          \
+               },                                                      \
+               .num_consumer_supplies =                                \
+                       ARRAY_SIZE(palmas_##_name##_supply),            \
+               .consumer_supplies = palmas_##_name##_supply,           \
+               .supply_regulator = _supply_reg,                        \
+       }
+
+PALMAS_PDATA_INIT(smps123, 900,  1300, NULL, 0, 0, 0);
+PALMAS_PDATA_INIT(smps45, 900,  1400, NULL, 0, 0, 0);
+PALMAS_PDATA_INIT(smps6, 2800,  3000, NULL, 0, 0, 0);
+PALMAS_PDATA_INIT(smps7, 1350,  1350, NULL, 0, 0, 1);
+PALMAS_PDATA_INIT(smps8, 1800,  1800, NULL, 1, 1, 1);
+PALMAS_PDATA_INIT(smps9, 2900,  2900, NULL, 1, 0, 1);
+PALMAS_PDATA_INIT(smps10, 5000,  5000, NULL, 0, 0, 0);
+PALMAS_PDATA_INIT(ldo1, 1050,  1050, palmas_rails(smps7), 1, 0, 1);
+PALMAS_PDATA_INIT(ldo2, 1200,  1200, palmas_rails(smps7), 0, 1, 1);
+PALMAS_PDATA_INIT(ldo3, 1800,  1800, NULL, 0, 0, 0);
+PALMAS_PDATA_INIT(ldo4, 1200,  1200, palmas_rails(smps8), 0, 0, 0);
+PALMAS_PDATA_INIT(ldo5, 2700,  2700, palmas_rails(smps9), 0, 0, 1);
+PALMAS_PDATA_INIT(ldo6, 2850,  2850, palmas_rails(smps9), 1, 1, 1);
+PALMAS_PDATA_INIT(ldo7, 2700,  2700, palmas_rails(smps9), 0, 0, 1);
+PALMAS_PDATA_INIT(ldo8, 1100,  1100, NULL, 1, 1, 1);
+PALMAS_PDATA_INIT(ldo9, 1800,  2900, palmas_rails(smps9), 0, 0, 1);
+PALMAS_PDATA_INIT(ldoln, 3300, 3300, NULL, 0, 0, 1);
+PALMAS_PDATA_INIT(ldousb, 3300,  3300, NULL, 0, 0, 1);
+PALMAS_PDATA_INIT(regen1, 4200,  4200, NULL, 0, 0, 0);
+PALMAS_PDATA_INIT(regen2, 4200,  4200, palmas_rails(smps8), 0, 0, 0);
+
+#define PALMAS_REG_PDATA(_sname) (&reg_idata_##_sname)
+static struct regulator_init_data *macallan_reg_data[PALMAS_NUM_REGS] = {
+       NULL,
+       PALMAS_REG_PDATA(smps123),
+       NULL,
+       PALMAS_REG_PDATA(smps45),
+       NULL,
+       PALMAS_REG_PDATA(smps6),
+       PALMAS_REG_PDATA(smps7),
+       PALMAS_REG_PDATA(smps8),
+       PALMAS_REG_PDATA(smps9),
+       PALMAS_REG_PDATA(smps10),
+       PALMAS_REG_PDATA(ldo1),
+       PALMAS_REG_PDATA(ldo2),
+       PALMAS_REG_PDATA(ldo3),
+       PALMAS_REG_PDATA(ldo4),
+       PALMAS_REG_PDATA(ldo5),
+       PALMAS_REG_PDATA(ldo6),
+       PALMAS_REG_PDATA(ldo7),
+       PALMAS_REG_PDATA(ldo8),
+       PALMAS_REG_PDATA(ldo9),
+       PALMAS_REG_PDATA(ldoln),
+       PALMAS_REG_PDATA(ldousb),
+       PALMAS_REG_PDATA(regen1),
+       PALMAS_REG_PDATA(regen2),
+       NULL,
+       NULL,
+       NULL,
+};
+
+#define PALMAS_REG_INIT(_name, _warm_reset, _roof_floor, _mode_sleep,  \
+               _tstep, _vsel)                                          \
+       static struct palmas_reg_init reg_init_data_##_name = {         \
+               .warm_reset = _warm_reset,                              \
+               .roof_floor =   _roof_floor,                            \
+               .mode_sleep = _mode_sleep,              \
+               .tstep = _tstep,                        \
+               .vsel = _vsel,          \
+       }
+
+PALMAS_REG_INIT(smps12, 0, 0, 0, 0, 0);
+PALMAS_REG_INIT(smps123, 0, PALMAS_EXT_CONTROL_ENABLE1, 0, 0, 0);
+PALMAS_REG_INIT(smps3, 0, 0, 0, 0, 0);
+PALMAS_REG_INIT(smps45, 0, PALMAS_EXT_CONTROL_NSLEEP, 0, 0, 0);
+PALMAS_REG_INIT(smps457, 0, 0, 0, 0, 0);
+PALMAS_REG_INIT(smps6, 0, 0, 0, 0, 0);
+PALMAS_REG_INIT(smps7, 0, 0, 0, 0, 0);
+PALMAS_REG_INIT(smps8, 0, 0, 0, 0, 0);
+PALMAS_REG_INIT(smps9, 0, 0, 0, 0, 0);
+PALMAS_REG_INIT(smps10, 0, 0, 0, 0, 0);
+PALMAS_REG_INIT(ldo1, 0, PALMAS_EXT_CONTROL_NSLEEP, 0, 0, 0);
+PALMAS_REG_INIT(ldo2, 0, PALMAS_EXT_CONTROL_NSLEEP, 0, 0, 0);
+PALMAS_REG_INIT(ldo3, 0, PALMAS_EXT_CONTROL_NSLEEP, 0, 0, 0);
+PALMAS_REG_INIT(ldo4, 0, PALMAS_EXT_CONTROL_NSLEEP, 0, 0, 0);
+PALMAS_REG_INIT(ldo5, 0, PALMAS_EXT_CONTROL_NSLEEP, 0, 0, 0);
+PALMAS_REG_INIT(ldo6, 0, 0, 0, 0, 0);
+PALMAS_REG_INIT(ldo7, 0, PALMAS_EXT_CONTROL_NSLEEP, 0, 0, 0);
+PALMAS_REG_INIT(ldo8, 0, 0, 0, 0, 0);
+PALMAS_REG_INIT(ldo9, 0, PALMAS_EXT_CONTROL_NSLEEP, 0, 0, 0);
+PALMAS_REG_INIT(ldoln, 0, PALMAS_EXT_CONTROL_NSLEEP, 0, 0, 0);
+PALMAS_REG_INIT(ldousb, 0, PALMAS_EXT_CONTROL_NSLEEP, 0, 0, 0);
+
+#define PALMAS_REG_INIT_DATA(_sname) (&reg_init_data_##_sname)
+static struct palmas_reg_init *macallan_reg_init[PALMAS_NUM_REGS] = {
+       PALMAS_REG_INIT_DATA(smps12),
+       PALMAS_REG_INIT_DATA(smps123),
+       PALMAS_REG_INIT_DATA(smps3),
+       PALMAS_REG_INIT_DATA(smps45),
+       PALMAS_REG_INIT_DATA(smps457),
+       PALMAS_REG_INIT_DATA(smps6),
+       PALMAS_REG_INIT_DATA(smps7),
+       PALMAS_REG_INIT_DATA(smps8),
+       PALMAS_REG_INIT_DATA(smps9),
+       PALMAS_REG_INIT_DATA(smps10),
+       PALMAS_REG_INIT_DATA(ldo1),
+       PALMAS_REG_INIT_DATA(ldo2),
+       PALMAS_REG_INIT_DATA(ldo3),
+       PALMAS_REG_INIT_DATA(ldo4),
+       PALMAS_REG_INIT_DATA(ldo5),
+       PALMAS_REG_INIT_DATA(ldo6),
+       PALMAS_REG_INIT_DATA(ldo7),
+       PALMAS_REG_INIT_DATA(ldo8),
+       PALMAS_REG_INIT_DATA(ldo9),
+       PALMAS_REG_INIT_DATA(ldoln),
+       PALMAS_REG_INIT_DATA(ldousb),
+};
+
+static struct palmas_pmic_platform_data pmic_platform = {
+       .enable_ldo8_tracking = true,
+       .disabe_ldo8_tracking_suspend = true,
+       .disable_smps10_boost_suspend = true,
+};
+
+static struct palmas_platform_data palmas_pdata = {
+       .gpio_base = PALMAS_TEGRA_GPIO_BASE,
+       .irq_base = PALMAS_TEGRA_IRQ_BASE,
+       .pmic_pdata = &pmic_platform,
+       .mux_from_pdata = true,
+       .pad1 = 0,
+       .pad2 = 0,
+       .pad3 = PALMAS_PRIMARY_SECONDARY_PAD3_DVFS1,
+       .use_power_off = true,
+};
+
+static struct i2c_board_info palma_device[] = {
+       {
+               I2C_BOARD_INFO("tps65913", 0x58),
+               .irq            = INT_EXTERNAL_PMU,
+               .platform_data  = &palmas_pdata,
+       },
+};
+
+static struct regulator_consumer_supply fixed_reg_dvdd_lcd_1v8_supply[] = {
+       REGULATOR_SUPPLY("dvdd_lcd", NULL),
+};
+
+static struct regulator_consumer_supply fixed_reg_vdd_lcd_bl_en_supply[] = {
+       REGULATOR_SUPPLY("vdd_lcd_bl_en", NULL),
+};
+
+/* EN_1V8_TS From TEGRA_GPIO_PH4 */
+static struct regulator_consumer_supply fixed_reg_dvdd_ts_supply[] = {
+       REGULATOR_SUPPLY("dvdd", "spi0.0"),
+};
+
+/* ENABLE 5v0 for HDMI */
+static struct regulator_consumer_supply fixed_reg_vdd_hdmi_5v0_supply[] = {
+       REGULATOR_SUPPLY("vdd_hdmi_5v0", "tegradc.1"),
+};
+
+static struct regulator_consumer_supply fixed_reg_vddio_sd_slot_supply[] = {
+       REGULATOR_SUPPLY("vddio_sd_slot", "sdhci-tegra.2"),
+};
+
+
+/* Macro for defining fixed regulator sub device data */
+#define FIXED_SUPPLY(_name) "fixed_reg_"#_name
+#define FIXED_REG(_id, _var, _name, _in_supply, _always_on, _boot_on,  \
+       _gpio_nr, _open_drain, _active_high, _boot_state, _millivolts)  \
+       static struct regulator_init_data ri_data_##_var =              \
+       {                                                               \
+               .supply_regulator = _in_supply,                         \
+               .num_consumer_supplies =                                \
+                       ARRAY_SIZE(fixed_reg_##_name##_supply),         \
+               .consumer_supplies = fixed_reg_##_name##_supply,        \
+               .constraints = {                                        \
+                       .valid_modes_mask = (REGULATOR_MODE_NORMAL |    \
+                                       REGULATOR_MODE_STANDBY),        \
+                       .valid_ops_mask = (REGULATOR_CHANGE_MODE |      \
+                                       REGULATOR_CHANGE_STATUS |       \
+                                       REGULATOR_CHANGE_VOLTAGE),      \
+                       .always_on = _always_on,                        \
+                       .boot_on = _boot_on,                            \
+               },                                                      \
+       };                                                              \
+       static struct fixed_voltage_config fixed_reg_##_var##_pdata =   \
+       {                                                               \
+               .supply_name = FIXED_SUPPLY(_name),                     \
+               .microvolts = _millivolts * 1000,                       \
+               .gpio = _gpio_nr,                                       \
+               .gpio_is_open_drain = _open_drain,                      \
+               .enable_high = _active_high,                            \
+               .enabled_at_boot = _boot_state,                         \
+               .init_data = &ri_data_##_var,                           \
+       };                                                              \
+       static struct platform_device fixed_reg_##_var##_dev = {        \
+               .name = "reg-fixed-voltage",                            \
+               .id = _id,                                              \
+               .dev = {                                                \
+                       .platform_data = &fixed_reg_##_var##_pdata,     \
+               },                                                      \
+       }
+
+/*
+ * Creating the fixed regulator device table
+ */
+
+FIXED_REG(1,   dvdd_lcd_1v8,   dvdd_lcd_1v8,
+       palmas_rails(smps8),    0,      1,
+       PALMAS_TEGRA_GPIO_BASE + PALMAS_GPIO4,  false,  true,   1,      1800);
+
+FIXED_REG(2,   vdd_lcd_bl_en,  vdd_lcd_bl_en,
+       NULL,   0,      1,
+       TEGRA_GPIO_PH2, false,  true,   1,      3700);
+
+FIXED_REG(3,   dvdd_ts,        dvdd_ts,
+       palmas_rails(smps8),    0,      0,
+       TEGRA_GPIO_PH4, false,  false,  1,      1800);
+
+FIXED_REG(4,   vdd_hdmi_5v0,   vdd_hdmi_5v0,
+       palmas_rails(smps10),   0,      0,
+       TEGRA_GPIO_PK6, false,  true,   0,      5000);
+
+FIXED_REG(5,   vddio_sd_slot,  vddio_sd_slot,
+       palmas_rails(smps9),    0,      0,
+       TEGRA_GPIO_PK1, false,  true,   0,      2900);
+
+#define ADD_FIXED_REG(_name)   (&fixed_reg_##_name##_dev)
+
+/* Gpio switch regulator platform data for Macallan E1545 */
+static struct platform_device *fixed_reg_devs[] = {
+       ADD_FIXED_REG(dvdd_lcd_1v8),
+       ADD_FIXED_REG(vdd_lcd_bl_en),
+       ADD_FIXED_REG(dvdd_ts),
+       ADD_FIXED_REG(vdd_hdmi_5v0),
+       ADD_FIXED_REG(vddio_sd_slot),
+};
+
+
+int __init macallan_palmas_regulator_init(void)
+{
+       void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE);
+       u32 pmc_ctrl;
+       int i;
+
+       /* TPS65913: Normal state of INT request line is LOW.
+        * configure the power management controller to trigger PMU
+        * interrupts when HIGH.
+        */
+       pmc_ctrl = readl(pmc + PMC_CTRL);
+       writel(pmc_ctrl | PMC_CTRL_INTR_LOW, pmc + PMC_CTRL);
+       for (i = 0; i < PALMAS_NUM_REGS ; i++) {
+               pmic_platform.reg_data[i] = macallan_reg_data[i];
+               pmic_platform.reg_init[i] = macallan_reg_init[i];
+       }
+
+       i2c_register_board_info(4, palma_device,
+                       ARRAY_SIZE(palma_device));
+       return 0;
+}
+
+static int ac_online(void)
+{
+       return 1;
+}
+
+static struct resource macallan_pda_resources[] = {
+       [0] = {
+               .name   = "ac",
+       },
+};
+
+static struct pda_power_pdata macallan_pda_data = {
+       .is_ac_online   = ac_online,
+};
+
+static struct platform_device macallan_pda_power_device = {
+       .name           = "pda-power",
+       .id             = -1,
+       .resource       = macallan_pda_resources,
+       .num_resources  = ARRAY_SIZE(macallan_pda_resources),
+       .dev    = {
+               .platform_data  = &macallan_pda_data,
+       },
+};
+
+static struct tegra_suspend_platform_data macallan_suspend_data = {
+       .cpu_timer      = 300,
+       .cpu_off_timer  = 300,
+       .suspend_mode   = TEGRA_SUSPEND_LP0,
+       .core_timer     = 0x157e,
+       .core_off_timer = 2000,
+       .corereq_high   = true,
+       .sysclkreq_high = true,
+       .min_residency_crail = 20000,
+};
+#ifdef CONFIG_ARCH_TEGRA_HAS_CL_DVFS
+/* board parameters for cpu dfll */
+static struct tegra_cl_dvfs_cfg_param macallan_cl_dvfs_param = {
+       .sample_rate = 12500,
+
+       .force_mode = TEGRA_CL_DVFS_FORCE_FIXED,
+       .cf = 10,
+       .ci = 0,
+       .cg = 2,
+
+       .droop_cut_value = 0xF,
+       .droop_restore_ramp = 0x0,
+       .scale_out_ramp = 0x0,
+};
+#endif
+
+/* palmas: fixed 10mV steps from 600mV to 1400mV, with offset 0x10 */
+#define PMU_CPU_VDD_MAP_SIZE ((1400000 - 600000) / 10000 + 1)
+static struct voltage_reg_map pmu_cpu_vdd_map[PMU_CPU_VDD_MAP_SIZE];
+static inline void fill_reg_map(void)
+{
+       int i;
+       for (i = 0; i < PMU_CPU_VDD_MAP_SIZE; i++) {
+               pmu_cpu_vdd_map[i].reg_value = i + 0x10;
+               pmu_cpu_vdd_map[i].reg_uV = 600000 + 10000 * i;
+       }
+}
+
+#ifdef CONFIG_ARCH_TEGRA_HAS_CL_DVFS
+static struct tegra_cl_dvfs_platform_data macallan_cl_dvfs_data = {
+       .dfll_clk_name = "dfll_cpu",
+       .pmu_if = TEGRA_CL_DVFS_PMU_I2C,
+       .u.pmu_i2c = {
+               .fs_rate = 400000,
+               .slave_addr = 0xb0,
+               .reg = 0x23,
+       },
+       .vdd_map = pmu_cpu_vdd_map,
+       .vdd_map_size = PMU_CPU_VDD_MAP_SIZE,
+
+       .cfg_param = &macallan_cl_dvfs_param,
+};
+
+static int __init macallan_cl_dvfs_init(void)
+{
+       fill_reg_map();
+       if (tegra_revision < TEGRA_REVISION_A02)
+               macallan_cl_dvfs_data.out_quiet_then_disable = true;
+       tegra_cl_dvfs_device.dev.platform_data = &macallan_cl_dvfs_data;
+       platform_device_register(&tegra_cl_dvfs_device);
+
+       return 0;
+}
+#endif
+
+static struct regulator_bulk_data macallan_gps_regulator_supply[] = {
+       [0] = {
+               .supply = "vdd_gps_3v3",
+       },
+       [1] = {
+               .supply = "vdd_gps_1v8",
+       },
+};
+
+static struct regulator_userspace_consumer_data macallan_gps_regulator_pdata = {
+       .num_supplies   = ARRAY_SIZE(macallan_gps_regulator_supply),
+       .supplies       = macallan_gps_regulator_supply,
+};
+
+static struct platform_device macallan_gps_regulator_device = {
+       .name   = "reg-userspace-consumer",
+       .id     = 2,
+       .dev    = {
+                       .platform_data = &macallan_gps_regulator_pdata,
+       },
+};
+
+static int __init macallan_fixed_regulator_init(void)
+{
+       if (!machine_is_macallan())
+               return 0;
+
+       return platform_add_devices(fixed_reg_devs,
+                       ARRAY_SIZE(fixed_reg_devs));
+}
+subsys_initcall_sync(macallan_fixed_regulator_init);
+
+int __init macallan_regulator_init(void)
+{
+
+#ifdef CONFIG_ARCH_TEGRA_HAS_CL_DVFS
+       macallan_cl_dvfs_init();
+#endif
+       macallan_palmas_regulator_init();
+
+       platform_device_register(&macallan_pda_power_device);
+       platform_device_register(&macallan_gps_regulator_device);
+
+       return 0;
+}
+
+int __init macallan_suspend_init(void)
+{
+       tegra_init_suspend(&macallan_suspend_data);
+       return 0;
+}
+
+int __init macallan_edp_init(void)
+{
+       unsigned int regulator_mA;
+
+       regulator_mA = get_maximum_cpu_current_supported();
+       if (!regulator_mA)
+               regulator_mA = 15000;
+
+       pr_info("%s: CPU regulator %d mA\n", __func__, regulator_mA);
+       tegra_init_cpu_edp_limits(regulator_mA);
+
+       regulator_mA = get_maximum_core_current_supported();
+       if (!regulator_mA)
+               regulator_mA = 4000;
+
+       pr_info("%s: core regulator %d mA\n", __func__, regulator_mA);
+       tegra_init_core_edp_limits(regulator_mA);
+
+       return 0;
+}
+
+static struct tegra_tsensor_pmu_data tpdata_palmas = {
+       .reset_tegra = 1,
+       .pmu_16bit_ops = 0,
+       .controller_type = 0,
+       .pmu_i2c_addr = 0x58,
+       .i2c_controller_id = 4,
+       .poweroff_reg_addr = 0xa0,
+       .poweroff_reg_data = 0x0,
+};
+
+static struct soctherm_platform_data macallan_soctherm_data = {
+       .therm = {
+               [THERM_CPU] = {
+                       .zone_enable = true,
+                       .passive_delay = 1000,
+                       .num_trips = 3,
+                       .trips = {
+                               {
+                                       .cdev_type = "tegra-balanced",
+                                       .trip_temp = 90000,
+                                       .trip_type = THERMAL_TRIP_PASSIVE,
+                                       .upper = THERMAL_NO_LIMIT,
+                                       .lower = THERMAL_NO_LIMIT,
+                               },
+                               {
+                                       .cdev_type = "tegra-heavy",
+                                       .trip_temp = 100000,
+                                       .trip_type = THERMAL_TRIP_HOT,
+                                       .upper = THERMAL_NO_LIMIT,
+                                       .lower = THERMAL_NO_LIMIT,
+                               },
+                               {
+                                       .cdev_type = "tegra-shutdown",
+                                       .trip_temp = 102000,
+                                       .trip_type = THERMAL_TRIP_CRITICAL,
+                                       .upper = THERMAL_NO_LIMIT,
+                                       .lower = THERMAL_NO_LIMIT,
+                               },
+                       },
+               },
+               [THERM_GPU] = {
+                       .zone_enable = true,
+               },
+               [THERM_PLL] = {
+                       .zone_enable = true,
+               },
+       },
+       .throttle = {
+               [THROTTLE_HEAVY] = {
+                       .devs = {
+                               [THROTTLE_DEV_CPU] = {
+                                       .enable = 1,
+                               },
+                       },
+               },
+       },
+       .tshut_pmu_trip_data = &tpdata_palmas,
+};
+
+int __init macallan_soctherm_init(void)
+{
+       tegra_platform_edp_init(macallan_soctherm_data.therm[THERM_CPU].trips,
+                       &macallan_soctherm_data.therm[THERM_CPU].num_trips,
+                       8000);
+       tegra_add_tj_trips(macallan_soctherm_data.therm[THERM_CPU].trips,
+                       &macallan_soctherm_data.therm[THERM_CPU].num_trips);
+
+       return tegra11_soctherm_init(&macallan_soctherm_data);
+}
diff --git a/arch/arm/mach-tegra/board-macallan-powermon.c b/arch/arm/mach-tegra/board-macallan-powermon.c
new file mode 100644 (file)
index 0000000..bf878f0
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * arch/arm/mach-tegra/board-macallan-powermon.c
+ *
+ * Copyright (c) 2013, NVIDIA Corporation. All Rights Reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "board.h"
+#include "board-macallan.h"
+
+int __init macallan_pmon_init(void)
+{
+       return 0;
+}
diff --git a/arch/arm/mach-tegra/board-macallan-sdhci.c b/arch/arm/mach-tegra/board-macallan-sdhci.c
new file mode 100644 (file)
index 0000000..a0ab8c2
--- /dev/null
@@ -0,0 +1,198 @@
+/*
+ * arch/arm/mach-tegra/board-macallan-sdhci.c
+ *
+ * Copyright (C) 2013 NVIDIA Corporation.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/resource.h>
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+#include <linux/gpio.h>
+#include <linux/clk.h>
+#include <linux/err.h>
+#include <linux/regulator/consumer.h>
+#include <linux/mmc/host.h>
+#include <linux/platform_data/mmc-sdhci-tegra.h>
+
+#include <asm/mach-types.h>
+#include <mach/irqs.h>
+#include <mach/gpio-tegra.h>
+#include <mach/io_dpd.h>
+
+#include "gpio-names.h"
+#include "board.h"
+#include "board-macallan.h"
+#include "iomap.h"
+
+#define MACALLAN_SD_CD         TEGRA_GPIO_PV2
+
+static int macallan_wifi_status_register(void (*callback)(int , void *), void *);
+
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
+static struct embedded_sdio_data embedded_sdio_data0 = {
+       .cccr   = {
+               .sdio_vsn       = 2,
+               .multi_block    = 1,
+               .low_speed      = 0,
+               .wide_bus       = 0,
+               .high_power     = 1,
+               .high_speed     = 1,
+       },
+       .cis  = {
+               .vendor  = 0x02d0,
+               .device  = 0x4329,
+       },
+};
+#endif
+
+struct tegra_sdhci_platform_data macallan_tegra_sdhci_platform_data0 = {
+       .mmc_data = {
+               .register_status_notify = macallan_wifi_status_register,
+#ifdef CONFIG_MMC_EMBEDDED_SDIO
+               .embedded_sdio = &embedded_sdio_data0,
+#endif
+               .built_in = 0,
+               .ocr_mask = MMC_OCR_1V8_MASK,
+       },
+#ifndef CONFIG_MMC_EMBEDDED_SDIO
+       .pm_flags = MMC_PM_KEEP_POWER,
+#endif
+       .cd_gpio = -1,
+       .wp_gpio = -1,
+       .power_gpio = -1,
+       .tap_delay = 0x2,
+       .trim_delay = 0x2,
+       .ddr_clk_limit = 41000000,
+       .uhs_mask = MMC_UHS_MASK_SDR104 |
+               MMC_UHS_MASK_DDR50,
+       .base_clk = 208000000,
+};
+
+#ifndef CONFIG_USE_OF
+static struct resource sdhci_resource0[] = {
+       [0] = {
+               .start  = INT_SDMMC1,
+               .end    = INT_SDMMC1,
+               .flags  = IORESOURCE_IRQ,
+       },
+       [1] = {
+               .start  = TEGRA_SDMMC1_BASE,
+               .end    = TEGRA_SDMMC1_BASE + TEGRA_SDMMC1_SIZE-1,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+static struct resource sdhci_resource2[] = {
+       [0] = {
+               .start  = INT_SDMMC3,
+               .end    = INT_SDMMC3,
+               .flags  = IORESOURCE_IRQ,
+       },
+       [1] = {
+               .start  = TEGRA_SDMMC3_BASE,
+               .end    = TEGRA_SDMMC3_BASE + TEGRA_SDMMC3_SIZE-1,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+static struct resource sdhci_resource3[] = {
+       [0] = {
+               .start  = INT_SDMMC4,
+               .end    = INT_SDMMC4,
+               .flags  = IORESOURCE_IRQ,
+       },
+       [1] = {
+               .start  = TEGRA_SDMMC4_BASE,
+               .end    = TEGRA_SDMMC4_BASE + TEGRA_SDMMC4_SIZE-1,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+
+static struct tegra_sdhci_platform_data tegra_sdhci_platform_data2 = {
+       .cd_gpio = MACALLAN_SD_CD,
+       .wp_gpio = -1,
+       .power_gpio = -1,
+       .tap_delay = 0x3,
+       .trim_delay = 0x3,
+       .ddr_clk_limit = 41000000,
+};
+
+static struct tegra_sdhci_platform_data tegra_sdhci_platform_data3 = {
+       .cd_gpio = -1,
+       .wp_gpio = -1,
+       .power_gpio = -1,
+       .is_8bit = 1,
+       .tap_delay = 0x5,
+       .trim_delay = 0,
+       .ddr_clk_limit = 41000000,
+       .mmc_data = {
+               .built_in = 1,
+               .ocr_mask = MMC_OCR_1V8_MASK,
+       }
+};
+
+static struct platform_device tegra_sdhci_device0 = {
+       .name           = "sdhci-tegra",
+       .id             = 0,
+       .resource       = sdhci_resource0,
+       .num_resources  = ARRAY_SIZE(sdhci_resource0),
+       .dev = {
+               .platform_data = &macallan_tegra_sdhci_platform_data0,
+       },
+};
+
+static struct platform_device tegra_sdhci_device2 = {
+       .name           = "sdhci-tegra",
+       .id             = 2,
+       .resource       = sdhci_resource2,
+       .num_resources  = ARRAY_SIZE(sdhci_resource2),
+       .dev = {
+               .platform_data = &tegra_sdhci_platform_data2,
+       },
+};
+
+static struct platform_device tegra_sdhci_device3 = {
+       .name           = "sdhci-tegra",
+       .id             = 3,
+       .resource       = sdhci_resource3,
+       .num_resources  = ARRAY_SIZE(sdhci_resource3),
+       .dev = {
+               .platform_data = &tegra_sdhci_platform_data3,
+       },
+};
+#endif
+
+static int macallan_wifi_status_register(
+               void (*callback)(int card_present, void *dev_id),
+               void *dev_id)
+{
+       return 0;
+}
+
+
+static int __init macallan_wifi_init(void)
+{
+       return 0;
+}
+
+int __init macallan_sdhci_init(void)
+{
+#ifndef CONFIG_USE_OF
+       platform_device_register(&tegra_sdhci_device3);
+       platform_device_register(&tegra_sdhci_device2);
+       platform_device_register(&tegra_sdhci_device0);
+#endif
+       macallan_wifi_init();
+       return 0;
+}
diff --git a/arch/arm/mach-tegra/board-macallan-sensors.c b/arch/arm/mach-tegra/board-macallan-sensors.c
new file mode 100644 (file)
index 0000000..de83805
--- /dev/null
@@ -0,0 +1,759 @@
+/*
+ * arch/arm/mach-tegra/board-macallan-sensors.c
+ *
+ * Copyright (c) 2013 NVIDIA CORPORATION, All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of NVIDIA CORPORATION nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/i2c.h>
+#include <linux/delay.h>
+#include <linux/mpu.h>
+#include <linux/regulator/consumer.h>
+#include <linux/gpio.h>
+#include <linux/therm_est.h>
+#include <linux/nct1008.h>
+#include <mach/edp.h>
+#include <linux/edp.h>
+#include <mach/gpio-tegra.h>
+#include <mach/pinmux-t11.h>
+#include <mach/pinmux.h>
+#include <media/imx091.h>
+#include <media/ov9772.h>
+#include <media/as364x.h>
+#include <media/ad5816.h>
+#include <generated/mach-types.h>
+#include <linux/power/sbs-battery.h>
+
+#include "gpio-names.h"
+#include "board.h"
+#include "board-common.h"
+#include "board-macallan.h"
+#include "cpu-tegra.h"
+#include "devices.h"
+#include "tegra-board-id.h"
+#include "dvfs.h"
+
+static struct nvc_gpio_pdata imx091_gpio_pdata[] = {
+       {IMX091_GPIO_RESET, CAM_RSTN, true, false},
+       {IMX091_GPIO_PWDN, CAM1_POWER_DWN_GPIO, true, false},
+       {IMX091_GPIO_GP1, CAM_GPIO1, true, false}
+};
+
+static struct board_info board_info;
+
+static struct throttle_table tj_throttle_table[] = {
+               /* CPU_THROT_LOW cannot be used by other than CPU */
+               /* NO_CAP cannot be used by CPU */
+               /*    CPU,   C2BUS,   C3BUS,    SCLK,     EMC */
+               { { 1530000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1428000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1326000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1224000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1122000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1020000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  918000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  816000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  714000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  612000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  612000,  564000,  564000,  NO_CAP,  NO_CAP } },
+               { {  612000,  528000,  528000,  NO_CAP,  NO_CAP } },
+               { {  612000,  492000,  492000,  NO_CAP,  NO_CAP } },
+               { {  612000,  420000,  420000,  NO_CAP,  NO_CAP } },
+               { {  612000,  408000,  408000,  NO_CAP,  NO_CAP } },
+               { {  612000,  360000,  360000,  NO_CAP,  NO_CAP } },
+               { {  612000,  360000,  360000,  312000,  NO_CAP } },
+               { {  510000,  360000,  360000,  312000,  480000 } },
+               { {  468000,  360000,  360000,  312000,  480000 } },
+               { {  468000,  276000,  276000,  208000,  480000 } },
+               { {  372000,  276000,  276000,  208000,  204000 } },
+               { {  288000,  276000,  276000,  208000,  204000 } },
+               { {  252000,  276000,  228000,  208000,  102000 } },
+               { {  204000,  276000,  228000,  208000,  102000 } },
+               { {  102000,  276000,  228000,  208000,  102000 } },
+       { { CPU_THROT_LOW,  276000,  228000,  208000,  102000 } },
+};
+
+static struct balanced_throttle tj_throttle = {
+       .throt_tab_size = ARRAY_SIZE(tj_throttle_table),
+       .throt_tab = tj_throttle_table,
+};
+
+static int __init macallan_throttle_init(void)
+{
+       if (machine_is_macallan())
+               balanced_throttle_register(&tj_throttle, "tegra-balanced");
+       return 0;
+}
+module_init(macallan_throttle_init);
+
+static struct nct1008_platform_data macallan_nct1008_pdata = {
+       .supported_hwrev = true,
+       .ext_range = true,
+       .conv_rate = 0x08,
+       .shutdown_ext_limit = 105, /* C */
+       .shutdown_local_limit = 120, /* C */
+};
+
+static struct i2c_board_info macallan_i2c4_nct1008_board_info[] = {
+       {
+               I2C_BOARD_INFO("nct1008", 0x4C),
+               .platform_data = &macallan_nct1008_pdata,
+               .irq = -1,
+       }
+};
+
+#define VI_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _ioreset) \
+       {                                                       \
+               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
+               .func           = TEGRA_MUX_##_mux,             \
+               .pupd           = TEGRA_PUPD_##_pupd,           \
+               .tristate       = TEGRA_TRI_##_tri,             \
+               .io             = TEGRA_PIN_##_io,              \
+               .lock           = TEGRA_PIN_LOCK_##_lock,       \
+               .od             = TEGRA_PIN_OD_DEFAULT,         \
+               .ioreset        = TEGRA_PIN_IO_RESET_##_ioreset \
+}
+
+static int macallan_focuser_power_on(struct ad5816_power_rail *pw)
+{
+       int err;
+
+       if (unlikely(WARN_ON(!pw || !pw->vdd || !pw->vdd_i2c)))
+               return -EFAULT;
+
+       err = regulator_enable(pw->vdd_i2c);
+       if (unlikely(err))
+               goto ad5816_vdd_i2c_fail;
+
+       err = regulator_enable(pw->vdd);
+       if (unlikely(err))
+               goto ad5816_vdd_fail;
+
+       return 0;
+
+ad5816_vdd_fail:
+       regulator_disable(pw->vdd_i2c);
+
+ad5816_vdd_i2c_fail:
+       pr_err("%s FAILED\n", __func__);
+
+       return -ENODEV;
+}
+
+static int macallan_focuser_power_off(struct ad5816_power_rail *pw)
+{
+       if (unlikely(WARN_ON(!pw || !pw->vdd || !pw->vdd_i2c)))
+               return -EFAULT;
+
+       regulator_disable(pw->vdd);
+       regulator_disable(pw->vdd_i2c);
+
+       return 0;
+}
+
+static struct tegra_pingroup_config mclk_disable =
+       VI_PINMUX(CAM_MCLK, VI, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT);
+
+static struct tegra_pingroup_config mclk_enable =
+       VI_PINMUX(CAM_MCLK, VI_ALT3, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT);
+
+static struct tegra_pingroup_config pbb0_disable =
+       VI_PINMUX(GPIO_PBB0, VI, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT);
+
+static struct tegra_pingroup_config pbb0_enable =
+       VI_PINMUX(GPIO_PBB0, VI_ALT3, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT);
+
+/*
+ * As a workaround, macallan_vcmvdd need to be allocated to activate the
+ * sensor devices. This is due to the focuser device(AD5816) will hook up
+ * the i2c bus if it is not powered up.
+*/
+static struct regulator *macallan_vcmvdd;
+
+static int macallan_get_vcmvdd(void)
+{
+       if (!macallan_vcmvdd) {
+               macallan_vcmvdd = regulator_get(NULL, "vdd_af_cam1");
+               if (unlikely(WARN_ON(IS_ERR(macallan_vcmvdd)))) {
+                       pr_err("%s: can't get regulator vcmvdd: %ld\n",
+                               __func__, PTR_ERR(macallan_vcmvdd));
+                       macallan_vcmvdd = NULL;
+                       return -ENODEV;
+               }
+       }
+       return 0;
+}
+
+static int macallan_imx091_power_on(struct nvc_regulator *vreg)
+{
+       int err;
+
+       if (unlikely(WARN_ON(!vreg)))
+               return -EFAULT;
+
+       if (macallan_get_vcmvdd())
+               goto imx091_poweron_fail;
+
+       gpio_set_value(CAM1_POWER_DWN_GPIO, 0);
+       usleep_range(10, 20);
+
+       err = regulator_enable(vreg[IMX091_VREG_AVDD].vreg);
+       if (err)
+               goto imx091_avdd_fail;
+
+       err = regulator_enable(vreg[IMX091_VREG_IOVDD].vreg);
+       if (err)
+               goto imx091_iovdd_fail;
+
+       usleep_range(1, 2);
+       gpio_set_value(CAM1_POWER_DWN_GPIO, 1);
+
+       err = regulator_enable(macallan_vcmvdd);
+       if (unlikely(err))
+               goto imx091_vcmvdd_fail;
+
+       tegra_pinmux_config_table(&mclk_enable, 1);
+       usleep_range(300, 310);
+
+       return 1;
+
+imx091_vcmvdd_fail:
+       regulator_disable(vreg[IMX091_VREG_IOVDD].vreg);
+
+imx091_iovdd_fail:
+       regulator_disable(vreg[IMX091_VREG_AVDD].vreg);
+
+imx091_avdd_fail:
+       gpio_set_value(CAM1_POWER_DWN_GPIO, 0);
+
+imx091_poweron_fail:
+       pr_err("%s FAILED\n", __func__);
+       return -ENODEV;
+}
+
+static int macallan_imx091_power_off(struct nvc_regulator *vreg)
+{
+       if (unlikely(WARN_ON(!vreg)))
+               return -EFAULT;
+
+       usleep_range(1, 2);
+       tegra_pinmux_config_table(&mclk_disable, 1);
+       gpio_set_value(CAM1_POWER_DWN_GPIO, 0);
+       usleep_range(1, 2);
+
+       regulator_disable(macallan_vcmvdd);
+       regulator_disable(vreg[IMX091_VREG_IOVDD].vreg);
+       regulator_disable(vreg[IMX091_VREG_AVDD].vreg);
+
+       return 1;
+}
+
+static struct nvc_imager_cap imx091_cap = {
+       .identifier             = "IMX091",
+       .sensor_nvc_interface   = 3,
+       .pixel_types[0]         = 0x100,
+       .orientation            = 0,
+       .direction              = 0,
+       .initial_clock_rate_khz = 6000,
+       .clock_profiles[0] = {
+               .external_clock_khz     = 24000,
+               .clock_multiplier       = 850000, /* value / 1,000,000 */
+       },
+       .clock_profiles[1] = {
+               .external_clock_khz     = 0,
+               .clock_multiplier       = 0,
+       },
+       .h_sync_edge            = 0,
+       .v_sync_edge            = 0,
+       .mclk_on_vgp0           = 0,
+       .csi_port               = 0,
+       .data_lanes             = 4,
+       .virtual_channel_id     = 0,
+       .discontinuous_clk_mode = 1,
+       .cil_threshold_settle   = 0x0,
+       .min_blank_time_width   = 16,
+       .min_blank_time_height  = 16,
+       .preferred_mode_index   = 0,
+       .focuser_guid           = NVC_FOCUS_GUID(0),
+       .torch_guid             = NVC_TORCH_GUID(0),
+       .cap_version            = NVC_IMAGER_CAPABILITIES_VERSION2,
+};
+
+static struct imx091_platform_data imx091_pdata = {
+       .num                    = 0,
+       .sync                   = 0,
+       .dev_name               = "camera",
+       .gpio_count             = ARRAY_SIZE(imx091_gpio_pdata),
+       .gpio                   = imx091_gpio_pdata,
+       .flash_cap              = {
+               .sdo_trigger_enabled = 1,
+               .adjustable_flash_timing = 1,
+       },
+       .cap                    = &imx091_cap,
+       .power_on               = macallan_imx091_power_on,
+       .power_off              = macallan_imx091_power_off,
+};
+
+static struct sbs_platform_data sbs_pdata = {
+       .poll_retry_count = 100,
+       .i2c_retry_count = 2,
+};
+
+static int macallan_ov9772_power_on(struct ov9772_power_rail *pw)
+{
+       int err;
+
+       if (unlikely(!pw || !pw->avdd || !pw->dovdd))
+               return -EFAULT;
+
+       if (macallan_get_vcmvdd())
+               goto ov9772_get_vcmvdd_fail;
+
+       gpio_set_value(CAM2_POWER_DWN_GPIO, 0);
+       gpio_set_value(CAM_RSTN, 0);
+
+       err = regulator_enable(pw->avdd);
+       if (unlikely(err))
+               goto ov9772_avdd_fail;
+
+       err = regulator_enable(pw->dovdd);
+       if (unlikely(err))
+               goto ov9772_dovdd_fail;
+
+       gpio_set_value(CAM_RSTN, 1);
+       gpio_set_value(CAM2_POWER_DWN_GPIO, 1);
+
+       err = regulator_enable(macallan_vcmvdd);
+       if (unlikely(err))
+               goto ov9772_vcmvdd_fail;
+
+       tegra_pinmux_config_table(&pbb0_enable, 1);
+       usleep_range(340, 380);
+
+       /* return 1 to skip the in-driver power_on sequence */
+       return 1;
+
+ov9772_vcmvdd_fail:
+       regulator_disable(pw->dovdd);
+
+ov9772_dovdd_fail:
+       regulator_disable(pw->avdd);
+
+ov9772_avdd_fail:
+       gpio_set_value(CAM_RSTN, 0);
+       gpio_set_value(CAM2_POWER_DWN_GPIO, 0);
+
+ov9772_get_vcmvdd_fail:
+       pr_err("%s FAILED\n", __func__);
+       return -ENODEV;
+}
+
+static int macallan_ov9772_power_off(struct ov9772_power_rail *pw)
+{
+       if (unlikely(!pw || !macallan_vcmvdd || !pw->avdd || !pw->dovdd))
+               return -EFAULT;
+
+       usleep_range(21, 25);
+       tegra_pinmux_config_table(&pbb0_disable, 1);
+
+       gpio_set_value(CAM2_POWER_DWN_GPIO, 0);
+       gpio_set_value(CAM_RSTN, 0);
+
+       regulator_disable(macallan_vcmvdd);
+       regulator_disable(pw->dovdd);
+       regulator_disable(pw->avdd);
+
+       /* return 1 to skip the in-driver power_off sequence */
+       return 1;
+}
+
+static struct nvc_gpio_pdata ov9772_gpio_pdata[] = {
+       { OV9772_GPIO_TYPE_SHTDN, CAM2_POWER_DWN_GPIO, true, 0, },
+       { OV9772_GPIO_TYPE_PWRDN, CAM_RSTN, true, 0, },
+};
+
+static struct ov9772_platform_data macallan_ov9772_pdata = {
+       .num            = 1,
+       .dev_name       = "camera",
+       .gpio_count     = ARRAY_SIZE(ov9772_gpio_pdata),
+       .gpio           = ov9772_gpio_pdata,
+       .power_on       = macallan_ov9772_power_on,
+       .power_off      = macallan_ov9772_power_off,
+};
+
+static int macallan_as3648_power_on(struct as364x_power_rail *pw)
+{
+       int err = macallan_get_vcmvdd();
+
+       if (err)
+               return err;
+
+       return regulator_enable(macallan_vcmvdd);
+}
+
+static int macallan_as3648_power_off(struct as364x_power_rail *pw)
+{
+       if (!macallan_vcmvdd)
+               return -ENODEV;
+
+       return regulator_disable(macallan_vcmvdd);
+}
+
+static struct as364x_platform_data macallan_as3648_pdata = {
+       .config         = {
+               .max_total_current_mA = 1000,
+               .max_peak_current_mA = 600,
+               .vin_low_v_run_mV = 3070,
+               .strobe_type = 1,
+               },
+       .pinstate       = {
+               .mask   = 1 << (CAM_FLASH_STROBE - TEGRA_GPIO_PBB0),
+               .values = 1 << (CAM_FLASH_STROBE - TEGRA_GPIO_PBB0)
+               },
+       .dev_name       = "torch",
+       .type           = AS3648,
+       .gpio_strobe    = CAM_FLASH_STROBE,
+       .led_mask       = 3,
+
+       .power_on_callback = macallan_as3648_power_on,
+       .power_off_callback = macallan_as3648_power_off,
+};
+
+static struct ad5816_platform_data macallan_ad5816_pdata = {
+       .cfg = 0,
+       .num = 0,
+       .sync = 0,
+       .dev_name = "focuser",
+       .power_on = macallan_focuser_power_on,
+       .power_off = macallan_focuser_power_off,
+};
+
+static struct i2c_board_info macallan_i2c_board_info_e1625[] = {
+       {
+               I2C_BOARD_INFO("imx091", 0x36),
+               .platform_data = &imx091_pdata,
+       },
+       {
+               I2C_BOARD_INFO("ov9772", 0x10),
+               .platform_data = &macallan_ov9772_pdata,
+       },
+       {
+               I2C_BOARD_INFO("as3648", 0x30),
+               .platform_data = &macallan_as3648_pdata,
+       },
+       {
+               I2C_BOARD_INFO("ad5816", 0x0E),
+               .platform_data = &macallan_ad5816_pdata,
+       },
+};
+
+static int macallan_camera_init(void)
+{
+       tegra_pinmux_config_table(&mclk_disable, 1);
+       tegra_pinmux_config_table(&pbb0_disable, 1);
+
+       i2c_register_board_info(2, macallan_i2c_board_info_e1625,
+               ARRAY_SIZE(macallan_i2c_board_info_e1625));
+       return 0;
+}
+
+/* MPU board file definition   */
+static struct mpu_platform_data mpu9150_gyro_data = {
+       .int_config     = 0x10,
+       .level_shifter  = 0,
+       /* Located in board_[platformname].h */
+       .orientation    = MPU_GYRO_ORIENTATION,
+       .sec_slave_type = SECONDARY_SLAVE_TYPE_COMPASS,
+       .sec_slave_id   = COMPASS_ID_AK8975,
+       .secondary_i2c_addr     = MPU_COMPASS_ADDR,
+       .secondary_read_reg     = 0x06,
+       .secondary_orientation  = MPU_COMPASS_ORIENTATION,
+       .key            = {0x4E, 0xCC, 0x7E, 0xEB, 0xF6, 0x1E, 0x35, 0x22,
+                          0x00, 0x34, 0x0D, 0x65, 0x32, 0xE9, 0x94, 0x89},
+};
+
+#define TEGRA_CAMERA_GPIO(_gpio, _label, _value)               \
+       {                                                       \
+               .gpio = _gpio,                                  \
+               .label = _label,                                \
+               .value = _value,                                \
+       }
+
+static struct i2c_board_info macallan_i2c_board_info_cm3218[] = {
+       {
+               I2C_BOARD_INFO("cm3218", 0x48),
+       },
+};
+
+static struct i2c_board_info __initdata inv_mpu9150_i2c2_board_info[] = {
+       {
+               I2C_BOARD_INFO(MPU_GYRO_NAME, MPU_GYRO_ADDR),
+               .platform_data = &mpu9150_gyro_data,
+       },
+};
+
+static void mpuirq_init(void)
+{
+       int ret = 0;
+       unsigned gyro_irq_gpio = MPU_GYRO_IRQ_GPIO;
+       unsigned gyro_bus_num = MPU_GYRO_BUS_NUM;
+       char *gyro_name = MPU_GYRO_NAME;
+
+       pr_info("*** MPU START *** mpuirq_init...\n");
+
+       ret = gpio_request(gyro_irq_gpio, gyro_name);
+
+       if (ret < 0) {
+               pr_err("%s: gpio_request failed %d\n", __func__, ret);
+               return;
+       }
+
+       ret = gpio_direction_input(gyro_irq_gpio);
+       if (ret < 0) {
+               pr_err("%s: gpio_direction_input failed %d\n", __func__, ret);
+               gpio_free(gyro_irq_gpio);
+               return;
+       }
+       pr_info("*** MPU END *** mpuirq_init...\n");
+
+       inv_mpu9150_i2c2_board_info[0].irq = gpio_to_irq(MPU_GYRO_IRQ_GPIO);
+       i2c_register_board_info(gyro_bus_num, inv_mpu9150_i2c2_board_info,
+               ARRAY_SIZE(inv_mpu9150_i2c2_board_info));
+}
+
+static int macallan_nct1008_init(void)
+{
+       int nct1008_port;
+       int ret = 0;
+
+       nct1008_port = TEGRA_GPIO_PO4;
+
+       tegra_add_cdev_trips(macallan_nct1008_pdata.trips,
+                               &macallan_nct1008_pdata.num_trips);
+
+       macallan_i2c4_nct1008_board_info[0].irq = gpio_to_irq(nct1008_port);
+       pr_info("%s: macallan nct1008 irq %d",
+                       __func__, macallan_i2c4_nct1008_board_info[0].irq);
+
+       ret = gpio_request(nct1008_port, "temp_alert");
+       if (ret < 0)
+               return ret;
+
+       ret = gpio_direction_input(nct1008_port);
+       if (ret < 0) {
+               pr_info("%s: calling gpio_free(nct1008_port)", __func__);
+               gpio_free(nct1008_port);
+       }
+
+       /* macallan has thermal sensor on GEN1-I2C i.e. instance 0 */
+       i2c_register_board_info(0, macallan_i2c4_nct1008_board_info,
+               ARRAY_SIZE(macallan_i2c4_nct1008_board_info));
+
+       return ret;
+}
+
+static struct i2c_board_info __initdata bq20z45_pdata[] = {
+       {
+               I2C_BOARD_INFO("sbs-battery", 0x0B),
+               .platform_data = &sbs_pdata,
+       },
+};
+
+#ifdef CONFIG_TEGRA_SKIN_THROTTLE
+static int tegra_skin_match(struct thermal_zone_device *thz, void *data)
+{
+       return strcmp((char *)data, thz->type) == 0;
+}
+
+static int tegra_skin_get_temp(void *data, long *temp)
+{
+       struct thermal_zone_device *thz;
+
+       thz = thermal_zone_device_find(data, tegra_skin_match);
+
+       if (!thz || thz->ops->get_temp(thz, temp))
+               *temp = 25000;
+
+       return 0;
+}
+
+static struct therm_est_data skin_data = {
+       .cdev_type = "skin-balanced",
+       .toffset = 9793,
+       .polling_period = 1100,
+       .ndevs = 2,
+       .tc1 = 10,
+       .tc2 = 1,
+       .devs = {
+                       {
+                               .dev_data = "nct_ext",
+                               .get_temp = tegra_skin_get_temp,
+                               .coeffs = {
+                                       2, 1, 1, 1,
+                                       1, 1, 1, 1,
+                                       1, 1, 1, 0,
+                                       1, 1, 0, 0,
+                                       0, 0, -1, -7
+                               },
+                       },
+                       {
+                               .dev_data = "nct_int",
+                               .get_temp = tegra_skin_get_temp,
+                               .coeffs = {
+                                       -11, -7, -5, -3,
+                                       -3, -2, -1, 0,
+                                       0, 0, 1, 1,
+                                       1, 2, 2, 3,
+                                       4, 6, 11, 18
+                               },
+                       },
+       },
+       .trip_temp = 45000,
+       .passive_delay = 15000,
+};
+
+static struct throttle_table skin_throttle_table[] = {
+               /* CPU_THROT_LOW cannot be used by other than CPU */
+               /* NO_CAP cannot be used by CPU */
+               /*    CPU,   C2BUS,   C3BUS,    SCLK,     EMC */
+               { { 1530000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1530000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1326000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1326000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1326000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1326000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1326000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1122000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1122000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1122000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1122000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1122000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1122000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1020000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1020000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1020000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1020000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1020000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { { 1020000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  918000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  918000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  918000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  918000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  918000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  918000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  816000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  816000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  816000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  816000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  816000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  816000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  714000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  714000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  714000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  714000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  714000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  714000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  612000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  612000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  612000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  612000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  612000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  612000,  NO_CAP,  NO_CAP,  NO_CAP,  NO_CAP } },
+               { {  612000,  564000,  564000,  NO_CAP,  NO_CAP } },
+               { {  612000,  564000,  564000,  NO_CAP,  NO_CAP } },
+               { {  612000,  528000,  528000,  NO_CAP,  NO_CAP } },
+               { {  612000,  528000,  528000,  NO_CAP,  NO_CAP } },
+               { {  612000,  492000,  492000,  NO_CAP,  NO_CAP } },
+               { {  612000,  492000,  492000,  NO_CAP,  NO_CAP } },
+               { {  612000,  420000,  420000,  NO_CAP,  NO_CAP } },
+               { {  612000,  420000,  420000,  NO_CAP,  NO_CAP } },
+               { {  612000,  408000,  408000,  NO_CAP,  NO_CAP } },
+               { {  612000,  408000,  408000,  NO_CAP,  NO_CAP } },
+               { {  612000,  360000,  360000,  NO_CAP,  NO_CAP } },
+               { {  612000,  360000,  360000,  NO_CAP,  NO_CAP } },
+               { {  510000,  360000,  360000,  312000,  NO_CAP } },
+               { {  510000,  360000,  360000,  312000,  NO_CAP } },
+               { {  510000,  360000,  360000,  312000,  480000 } },
+               { {  510000,  360000,  360000,  312000,  480000 } },
+               { {  510000,  360000,  360000,  312000,  480000 } },
+               { {  510000,  360000,  360000,  312000,  480000 } },
+               { {  510000,  360000,  360000,  312000,  480000 } },
+               { {  510000,  360000,  360000,  312000,  480000 } },
+               { {  468000,  360000,  360000,  312000,  480000 } },
+               { {  468000,  360000,  360000,  312000,  480000 } },
+               { {  468000,  276000,  276000,  208000,  480000 } },
+               { {  468000,  276000,  276000,  208000,  480000 } },
+               { {  372000,  276000,  276000,  208000,  204000 } },
+               { {  372000,  276000,  276000,  208000,  204000 } },
+               { {  288000,  276000,  276000,  208000,  204000 } },
+               { {  288000,  276000,  276000,  208000,  204000 } },
+               { {  252000,  276000,  228000,  208000,  102000 } },
+               { {  252000,  276000,  228000,  208000,  102000 } },
+               { {  204000,  276000,  228000,  208000,  102000 } },
+               { {  204000,  276000,  228000,  208000,  102000 } },
+               { {  102000,  276000,  228000,  208000,  102000 } },
+       { { CPU_THROT_LOW,  276000,  228000,  208000,  102000 } },
+};
+
+static struct balanced_throttle skin_throttle = {
+       .throt_tab_size = ARRAY_SIZE(skin_throttle_table),
+       .throt_tab = skin_throttle_table,
+};
+
+static int __init macallan_skin_init(void)
+{
+       if (machine_is_macallan()) {
+               balanced_throttle_register(&skin_throttle, "skin-balanced");
+               tegra_skin_therm_est_device.dev.platform_data = &skin_data;
+               platform_device_register(&tegra_skin_therm_est_device);
+       }
+
+       return 0;
+}
+late_initcall(macallan_skin_init);
+#endif
+
+int __init macallan_sensors_init(void)
+{
+       int err;
+
+       tegra_get_board_info(&board_info);
+
+       err = macallan_nct1008_init();
+       if (err)
+               return err;
+
+       macallan_camera_init();
+       mpuirq_init();
+
+       i2c_register_board_info(0, macallan_i2c_board_info_cm3218,
+                               ARRAY_SIZE(macallan_i2c_board_info_cm3218));
+
+       i2c_register_board_info(0, bq20z45_pdata,
+               ARRAY_SIZE(bq20z45_pdata));
+
+       return 0;
+}
diff --git a/arch/arm/mach-tegra/board-macallan.c b/arch/arm/mach-tegra/board-macallan.c
new file mode 100644 (file)
index 0000000..eed8b0f
--- /dev/null
@@ -0,0 +1,813 @@
+/*
+ * arch/arm/mach-tegra/board-macallan.c
+ *
+ * Copyright (c) 2013, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/ctype.h>
+#include <linux/platform_device.h>
+#include <linux/clk.h>
+#include <linux/serial_8250.h>
+#include <linux/i2c.h>
+#include <linux/dma-mapping.h>
+#include <linux/delay.h>
+#include <linux/i2c-tegra.h>
+#include <linux/gpio.h>
+#include <linux/input.h>
+#include <linux/platform_data/tegra_usb.h>
+#include <linux/usb/tegra_usb_phy.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/rm31080a_ts.h>
+#include <linux/tegra_uart.h>
+#include <linux/memblock.h>
+#include <linux/spi-tegra.h>
+#include <linux/nfc/pn544.h>
+#include <linux/rfkill-gpio.h>
+#include <linux/skbuff.h>
+#include <linux/ti_wilink_st.h>
+#include <linux/regulator/consumer.h>
+#include <linux/smb349-charger.h>
+#include <linux/max17048_battery.h>
+#include <linux/leds.h>
+#include <linux/i2c/at24.h>
+#include <linux/of_platform.h>
+#include <linux/edp.h>
+
+#include <asm/hardware/gic.h>
+
+#include <mach/clk.h>
+#include <mach/irqs.h>
+#include <mach/pinmux.h>
+#include <mach/pinmux-tegra30.h>
+#include <mach/io_dpd.h>
+#include <mach/i2s.h>
+#include <mach/isomgr.h>
+#include <mach/tegra_asoc_pdata.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <mach/gpio-tegra.h>
+#include <mach/tegra_fiq_debugger.h>
+#include <mach/tegra_usb_modem_power.h>
+
+#include "board-touch-raydium.h"
+#include "board.h"
+#include "board-common.h"
+#include "clock.h"
+#include "board-macallan.h"
+#include "devices.h"
+#include "gpio-names.h"
+#include "fuse.h"
+#include "iomap.h"
+#include "pm.h"
+#include "pm-irq.h"
+#include "common.h"
+#include "tegra-board-id.h"
+
+static struct board_info board_info, display_board_info;
+
+#ifdef CONFIG_BT_BLUESLEEP
+static struct rfkill_gpio_platform_data macallan_bt_rfkill_pdata = {
+               .name           = "bt_rfkill",
+               .shutdown_gpio  = TEGRA_GPIO_PQ7,
+               .reset_gpio     = TEGRA_GPIO_PQ6,
+               .type           = RFKILL_TYPE_BLUETOOTH,
+};
+
+static struct platform_device macallan_bt_rfkill_device = {
+       .name = "rfkill_gpio",
+       .id             = -1,
+       .dev = {
+               .platform_data = &macallan_bt_rfkill_pdata,
+       },
+};
+
+static struct resource macallan_bluesleep_resources[] = {
+       [0] = {
+               .name = "gpio_host_wake",
+                       .start  = TEGRA_GPIO_PU6,
+                       .end    = TEGRA_GPIO_PU6,
+                       .flags  = IORESOURCE_IO,
+       },
+       [1] = {
+               .name = "gpio_ext_wake",
+                       .start  = TEGRA_GPIO_PEE1,
+                       .end    = TEGRA_GPIO_PEE1,
+                       .flags  = IORESOURCE_IO,
+       },
+       [2] = {
+               .name = "host_wake",
+                       .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
+       },
+};
+
+static struct platform_device macallan_bluesleep_device = {
+       .name           = "bluesleep",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(macallan_bluesleep_resources),
+       .resource       = macallan_bluesleep_resources,
+};
+
+static noinline void __init macallan_setup_bt_rfkill(void)
+{
+       platform_device_register(&macallan_bt_rfkill_device);
+}
+
+static noinline void __init macallan_setup_bluesleep(void)
+{
+       macallan_bluesleep_resources[2].start =
+               macallan_bluesleep_resources[2].end =
+                       gpio_to_irq(TEGRA_GPIO_PU6);
+       platform_device_register(&macallan_bluesleep_device);
+       return;
+}
+#elif defined CONFIG_BLUEDROID_PM
+static struct resource macallan_bluedroid_pm_resources[] = {
+       [0] = {
+               .name   = "shutdown_gpio",
+               .start  = TEGRA_GPIO_PQ7,
+               .end    = TEGRA_GPIO_PQ7,
+               .flags  = IORESOURCE_IO,
+       },
+       [1] = {
+               .name = "host_wake",
+               .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
+       },
+       [2] = {
+               .name = "gpio_ext_wake",
+               .start  = TEGRA_GPIO_PEE1,
+               .end    = TEGRA_GPIO_PEE1,
+               .flags  = IORESOURCE_IO,
+       },
+       [3] = {
+               .name = "gpio_host_wake",
+               .start  = TEGRA_GPIO_PU6,
+               .end    = TEGRA_GPIO_PU6,
+               .flags  = IORESOURCE_IO,
+       },
+       [4] = {
+               .name = "reset_gpio",
+               .start  = TEGRA_GPIO_PQ6,
+               .end    = TEGRA_GPIO_PQ6,
+               .flags  = IORESOURCE_IO,
+       },
+};
+
+static struct platform_device macallan_bluedroid_pm_device = {
+       .name = "bluedroid_pm",
+       .id             = 0,
+       .num_resources  = ARRAY_SIZE(macallan_bluedroid_pm_resources),
+       .resource       = macallan_bluedroid_pm_resources,
+};
+
+static noinline void __init macallan_setup_bluedroid_pm(void)
+{
+       macallan_bluedroid_pm_resources[1].start =
+               macallan_bluedroid_pm_resources[1].end =
+                               gpio_to_irq(TEGRA_GPIO_PU6);
+       platform_device_register(&macallan_bluedroid_pm_device);
+}
+#endif
+
+static __initdata struct tegra_clk_init_table macallan_clk_init_table[] = {
+       /* name         parent          rate            enabled */
+       { "pll_m",      NULL,           0,              false},
+       { "hda",        "pll_p",        108000000,      false},
+       { "hda2codec_2x", "pll_p",      48000000,       false},
+       { "pwm",        "pll_p",        3187500,        false},
+       { "blink",      "clk_32k",      32768,          true},
+       { "i2s1",       "pll_a_out0",   0,              false},
+       { "i2s3",       "pll_a_out0",   0,              false},
+       { "i2s4",       "pll_a_out0",   0,              false},
+       { "spdif_out",  "pll_a_out0",   0,              false},
+       { "d_audio",    "clk_m",        12000000,       false},
+       { "dam0",       "clk_m",        12000000,       false},
+       { "dam1",       "clk_m",        12000000,       false},
+       { "dam2",       "clk_m",        12000000,       false},
+       { "audio1",     "i2s1_sync",    0,              false},
+       { "audio3",     "i2s3_sync",    0,              false},
+       /* Setting vi_sensor-clk to true for validation purpose, will imapact
+        * power, later set to be false.*/
+       { "vi_sensor",  "pll_p",        150000000,      false},
+       { "cilab",      "pll_p",        150000000,      false},
+       { "cilcd",      "pll_p",        150000000,      false},
+       { "cile",       "pll_p",        150000000,      false},
+       { "i2c1",       "pll_p",        3200000,        false},
+       { "i2c2",       "pll_p",        3200000,        false},
+       { "i2c3",       "pll_p",        3200000,        false},
+       { "i2c4",       "pll_p",        3200000,        false},
+       { "i2c5",       "pll_p",        3200000,        false},
+       { NULL,         NULL,           0,              0},
+};
+
+#ifndef CONFIG_USE_OF
+static struct tegra_i2c_platform_data macallan_i2c1_platform_data = {
+       .bus_clk_rate   = 100000,
+       .scl_gpio       = TEGRA_GPIO_I2C1_SCL,
+       .sda_gpio       = TEGRA_GPIO_I2C1_SDA,
+};
+
+static struct tegra_i2c_platform_data macallan_i2c2_platform_data = {
+       .bus_clk_rate   = 100000,
+       .is_clkon_always = true,
+       .scl_gpio       = TEGRA_GPIO_I2C2_SCL,
+       .sda_gpio       = TEGRA_GPIO_I2C2_SDA,
+};
+
+static struct tegra_i2c_platform_data macallan_i2c3_platform_data = {
+       .bus_clk_rate   = 100000,
+       .scl_gpio       = TEGRA_GPIO_I2C3_SCL,
+       .sda_gpio       = TEGRA_GPIO_I2C3_SDA,
+};
+
+static struct tegra_i2c_platform_data macallan_i2c4_platform_data = {
+       .bus_clk_rate   = 10000,
+       .scl_gpio       = TEGRA_GPIO_I2C4_SCL,
+       .sda_gpio       = TEGRA_GPIO_I2C4_SDA,
+};
+
+static struct tegra_i2c_platform_data macallan_i2c5_platform_data = {
+       .bus_clk_rate   = 400000,
+       .scl_gpio       = TEGRA_GPIO_I2C5_SCL,
+       .sda_gpio       = TEGRA_GPIO_I2C5_SDA,
+};
+#endif
+
+static struct i2c_board_info __initdata rt5640_board_info = {
+       I2C_BOARD_INFO("rt5640", 0x1c),
+};
+
+static struct pn544_i2c_platform_data nfc_pdata = {
+       .irq_gpio = TEGRA_GPIO_PW2,
+       .ven_gpio = TEGRA_GPIO_PQ3,
+       .firm_gpio = TEGRA_GPIO_PH0,
+};
+
+static struct i2c_board_info __initdata nfc_board_info = {
+       I2C_BOARD_INFO("pn544", 0x28),
+       .platform_data = &nfc_pdata,
+};
+
+static void macallan_i2c_init(void)
+{
+#ifndef CONFIG_USE_OF
+       tegra11_i2c_device1.dev.platform_data = &macallan_i2c1_platform_data;
+       tegra11_i2c_device2.dev.platform_data = &macallan_i2c2_platform_data;
+       tegra11_i2c_device3.dev.platform_data = &macallan_i2c3_platform_data;
+       tegra11_i2c_device4.dev.platform_data = &macallan_i2c4_platform_data;
+       tegra11_i2c_device5.dev.platform_data = &macallan_i2c5_platform_data;
+
+       platform_device_register(&tegra11_i2c_device5);
+       platform_device_register(&tegra11_i2c_device4);
+       platform_device_register(&tegra11_i2c_device3);
+       platform_device_register(&tegra11_i2c_device2);
+       platform_device_register(&tegra11_i2c_device1);
+#endif
+
+       nfc_board_info.irq = gpio_to_irq(TEGRA_GPIO_PW2);
+       i2c_register_board_info(0, &nfc_board_info, 1);
+       i2c_register_board_info(0, &rt5640_board_info, 1);
+}
+
+static struct platform_device *macallan_uart_devices[] __initdata = {
+       &tegra_uarta_device,
+       &tegra_uartb_device,
+       &tegra_uartc_device,
+       &tegra_uartd_device,
+};
+static struct uart_clk_parent uart_parent_clk[] = {
+       [0] = {.name = "clk_m"},
+       [1] = {.name = "pll_p"},
+#ifndef CONFIG_TEGRA_PLLM_RESTRICTED
+       [2] = {.name = "pll_m"},
+#endif
+};
+
+static struct tegra_uart_platform_data macallan_uart_pdata;
+static struct tegra_uart_platform_data macallan_loopback_uart_pdata;
+
+static void __init uart_debug_init(void)
+{
+       int debug_port_id;
+
+       debug_port_id = uart_console_debug_init(3);
+       if (debug_port_id < 0)
+               return;
+
+       macallan_uart_devices[debug_port_id] = uart_console_debug_device;
+}
+
+static void __init macallan_uart_init(void)
+{
+       struct clk *c;
+       int i;
+
+       for (i = 0; i < ARRAY_SIZE(uart_parent_clk); ++i) {
+               c = tegra_get_clock_by_name(uart_parent_clk[i].name);
+               if (IS_ERR_OR_NULL(c)) {
+                       pr_err("Not able to get the clock for %s\n",
+                                               uart_parent_clk[i].name);
+                       continue;
+               }
+               uart_parent_clk[i].parent_clk = c;
+               uart_parent_clk[i].fixed_clk_rate = clk_get_rate(c);
+       }
+       macallan_uart_pdata.parent_clk_list = uart_parent_clk;
+       macallan_uart_pdata.parent_clk_count = ARRAY_SIZE(uart_parent_clk);
+       macallan_loopback_uart_pdata.parent_clk_list = uart_parent_clk;
+       macallan_loopback_uart_pdata.parent_clk_count =
+                                               ARRAY_SIZE(uart_parent_clk);
+       macallan_loopback_uart_pdata.is_loopback = true;
+       tegra_uarta_device.dev.platform_data = &macallan_uart_pdata;
+       tegra_uartb_device.dev.platform_data = &macallan_uart_pdata;
+       tegra_uartc_device.dev.platform_data = &macallan_uart_pdata;
+       tegra_uartd_device.dev.platform_data = &macallan_uart_pdata;
+
+       /* Register low speed only if it is selected */
+       if (!is_tegra_debug_uartport_hs())
+               uart_debug_init();
+
+       platform_add_devices(macallan_uart_devices,
+                               ARRAY_SIZE(macallan_uart_devices));
+}
+
+static struct resource tegra_rtc_resources[] = {
+       [0] = {
+               .start = TEGRA_RTC_BASE,
+               .end = TEGRA_RTC_BASE + TEGRA_RTC_SIZE - 1,
+               .flags = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start = INT_RTC,
+               .end = INT_RTC,
+               .flags = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device tegra_rtc_device = {
+       .name = "tegra_rtc",
+       .id   = -1,
+       .resource = tegra_rtc_resources,
+       .num_resources = ARRAY_SIZE(tegra_rtc_resources),
+};
+
+static struct tegra_asoc_platform_data macallan_audio_pdata = {
+       .gpio_spkr_en           = TEGRA_GPIO_SPKR_EN,
+       .gpio_hp_det            = TEGRA_GPIO_HP_DET,
+       .gpio_hp_mute           = -1,
+       .gpio_int_mic_en        = TEGRA_GPIO_INT_MIC_EN,
+       .gpio_ext_mic_en        = TEGRA_GPIO_EXT_MIC_EN,
+       .gpio_ldo1_en           = TEGRA_GPIO_LDO1_EN,
+       .gpio_codec1 = TEGRA_GPIO_CODEC1_EN,
+       .gpio_codec2 = TEGRA_GPIO_CODEC2_EN,
+       .gpio_codec3 = TEGRA_GPIO_CODEC3_EN,
+       .i2s_param[HIFI_CODEC]  = {
+               .audio_port_id  = 1,
+               .is_i2s_master  = 1,
+               .i2s_mode       = TEGRA_DAIFMT_I2S,
+       },
+       .i2s_param[BT_SCO]      = {
+               .audio_port_id  = 3,
+               .is_i2s_master  = 1,
+               .i2s_mode       = TEGRA_DAIFMT_DSP_A,
+       },
+};
+
+static struct platform_device macallan_audio_device = {
+       .name   = "tegra-snd-rt5640",
+       .id     = 0,
+       .dev    = {
+               .platform_data = &macallan_audio_pdata,
+       },
+};
+
+static struct platform_device *macallan_devices[] __initdata = {
+       &tegra_pmu_device,
+       &tegra_rtc_device,
+       &tegra_udc_device,
+#if defined(CONFIG_TEGRA_AVP)
+       &tegra_avp_device,
+#endif
+#if defined(CONFIG_CRYPTO_DEV_TEGRA_SE)
+       &tegra11_se_device,
+#endif
+       &tegra_ahub_device,
+       &tegra_dam_device0,
+       &tegra_dam_device1,
+       &tegra_dam_device2,
+       &tegra_i2s_device1,
+       &tegra_i2s_device3,
+       &tegra_i2s_device4,
+       &tegra_spdif_device,
+       &spdif_dit_device,
+       &bluetooth_dit_device,
+       &macallan_audio_device,
+       &tegra_hda_device,
+#if defined(CONFIG_CRYPTO_DEV_TEGRA_AES)
+       &tegra_aes_device,
+#endif
+};
+
+#ifdef CONFIG_USB_SUPPORT
+static struct tegra_usb_platform_data tegra_udc_pdata = {
+       .port_otg = true,
+       .has_hostpc = true,
+       .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
+       .op_mode = TEGRA_USB_OPMODE_DEVICE,
+       .u_data.dev = {
+               .vbus_pmu_irq = 0,
+               .vbus_gpio = -1,
+               .charging_supported = false,
+               .remote_wakeup_supported = false,
+       },
+       .u_cfg.utmi = {
+               .hssync_start_delay = 0,
+               .elastic_limit = 16,
+               .idle_wait_delay = 17,
+               .term_range_adj = 6,
+               .xcvr_setup = 8,
+               .xcvr_lsfslew = 2,
+               .xcvr_lsrslew = 2,
+               .xcvr_setup_offset = 0,
+               .xcvr_use_fuses = 1,
+       },
+};
+
+static struct tegra_usb_platform_data tegra_ehci1_utmi_pdata = {
+       .port_otg = true,
+       .has_hostpc = true,
+       .unaligned_dma_buf_supported = false,
+       .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
+       .op_mode = TEGRA_USB_OPMODE_HOST,
+       .u_data.host = {
+               .vbus_gpio = -1,
+               .hot_plug = false,
+               .remote_wakeup_supported = true,
+               .power_off_on_suspend = true,
+       },
+       .u_cfg.utmi = {
+               .hssync_start_delay = 0,
+               .elastic_limit = 16,
+               .idle_wait_delay = 17,
+               .term_range_adj = 6,
+               .xcvr_setup = 15,
+               .xcvr_lsfslew = 2,
+               .xcvr_lsrslew = 2,
+               .xcvr_setup_offset = 0,
+               .xcvr_use_fuses = 1,
+               .vbus_oc_map = 0x4,
+       },
+};
+
+static struct tegra_usb_otg_data tegra_otg_pdata = {
+       .ehci_device = &tegra_ehci1_device,
+       .ehci_pdata = &tegra_ehci1_utmi_pdata,
+};
+
+static void macallan_usb_init(void)
+{
+       int usb_port_owner_info = tegra_get_usb_port_owner_info();
+
+       /* Set USB wake sources for macallan */
+       tegra_set_usb_wake_source();
+
+       if (!(usb_port_owner_info & UTMI1_PORT_OWNER_XUSB)) {
+               tegra_otg_device.dev.platform_data = &tegra_otg_pdata;
+               platform_device_register(&tegra_otg_device);
+               /* Setup the udc platform data */
+               tegra_udc_device.dev.platform_data = &tegra_udc_pdata;
+       }
+}
+
+static struct gpio modem_gpios[] = { /* Nemo modem */
+       {MODEM_EN, GPIOF_OUT_INIT_HIGH, "MODEM EN"},
+       {MDM_RST, GPIOF_OUT_INIT_LOW, "MODEM RESET"},
+};
+
+static struct tegra_usb_platform_data tegra_ehci2_hsic_baseband_pdata = {
+       .port_otg = false,
+       .has_hostpc = true,
+       .unaligned_dma_buf_supported = false,
+       .phy_intf = TEGRA_USB_PHY_INTF_HSIC,
+       .op_mode = TEGRA_USB_OPMODE_HOST,
+       .u_data.host = {
+               .vbus_gpio = -1,
+               .hot_plug = false,
+               .remote_wakeup_supported = true,
+               .power_off_on_suspend = true,
+       },
+};
+
+static int baseband_init(void)
+{
+       int ret;
+
+       ret = gpio_request_array(modem_gpios, ARRAY_SIZE(modem_gpios));
+       if (ret) {
+               pr_warn("%s:gpio request failed\n", __func__);
+               return ret;
+       }
+
+       /* enable pull-down for MDM_COLD_BOOT */
+       tegra_pinmux_set_pullupdown(TEGRA_PINGROUP_ULPI_DATA4,
+                                   TEGRA_PUPD_PULL_DOWN);
+
+       /* export GPIO for user space access through sysfs */
+       gpio_export(MDM_RST, false);
+
+       return 0;
+}
+
+static const struct tegra_modem_operations baseband_operations = {
+       .init = baseband_init,
+};
+
+static struct tegra_usb_modem_power_platform_data baseband_pdata = {
+       .ops = &baseband_operations,
+       .wake_gpio = -1,
+       .boot_gpio = MDM_COLDBOOT,
+       .boot_irq_flags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+       .autosuspend_delay = 2000,
+       .short_autosuspend_delay = 50,
+       .tegra_ehci_device = &tegra_ehci2_device,
+       .tegra_ehci_pdata = &tegra_ehci2_hsic_baseband_pdata,
+};
+
+static struct platform_device icera_nemo_device = {
+       .name = "tegra_usb_modem_power",
+       .id = -1,
+       .dev = {
+               .platform_data = &baseband_pdata,
+       },
+};
+
+static void macallan_modem_init(void)
+{
+       int modem_id = tegra_get_modem_id();
+       int usb_port_owner_info = tegra_get_usb_port_owner_info();
+       switch (modem_id) {
+       case TEGRA_BB_NEMO: /* on board i500 HSIC */
+               if (!(usb_port_owner_info & HSIC1_PORT_OWNER_XUSB))
+                       platform_device_register(&icera_nemo_device);
+               break;
+       }
+}
+
+#else
+static void macallan_usb_init(void) { }
+static void macallan_modem_init(void) { }
+#endif
+
+static void macallan_audio_init(void)
+{
+       macallan_audio_pdata.codec_name = "rt5640.0-001c";
+       macallan_audio_pdata.codec_dai_name = "rt5640-aif1";
+}
+
+
+static struct platform_device *macallan_spi_devices[] __initdata = {
+       &tegra11_spi_device1,
+};
+
+struct spi_clk_parent spi_parent_clk_macallan[] = {
+       [0] = {.name = "pll_p"},
+#ifndef CONFIG_TEGRA_PLLM_RESTRICTED
+       [1] = {.name = "pll_m"},
+       [2] = {.name = "clk_m"},
+#else
+       [1] = {.name = "clk_m"},
+#endif
+};
+
+static struct tegra_spi_platform_data macallan_spi_pdata = {
+       .is_dma_based           = false,
+       .max_dma_buffer         = 16 * 1024,
+       .is_clkon_always        = false,
+       .max_rate               = 25000000,
+};
+
+static void __init macallan_spi_init(void)
+{
+       int i;
+       struct clk *c;
+
+       for (i = 0; i < ARRAY_SIZE(spi_parent_clk_macallan); ++i) {
+               c = tegra_get_clock_by_name(spi_parent_clk_macallan[i].name);
+               if (IS_ERR_OR_NULL(c)) {
+                       pr_err("Not able to get the clock for %s\n",
+                                       spi_parent_clk_macallan[i].name);
+                       continue;
+               }
+               spi_parent_clk_macallan[i].parent_clk = c;
+               spi_parent_clk_macallan[i].fixed_clk_rate = clk_get_rate(c);
+       }
+       macallan_spi_pdata.parent_clk_list = spi_parent_clk_macallan;
+       macallan_spi_pdata.parent_clk_count = ARRAY_SIZE(spi_parent_clk_macallan);
+       tegra11_spi_device1.dev.platform_data = &macallan_spi_pdata;
+       platform_add_devices(macallan_spi_devices,
+                               ARRAY_SIZE(macallan_spi_devices));
+}
+
+static __initdata struct tegra_clk_init_table touch_clk_init_table[] = {
+       /* name         parent          rate            enabled */
+       { "extern2",    "pll_p",        41000000,       false},
+       { "clk_out_2",  "extern2",      40800000,       false},
+       { NULL,         NULL,           0,              0},
+};
+
+struct rm_spi_ts_platform_data rm31080ts_macallan_data = {
+       .gpio_reset = 0,
+       .config = 0,
+       .platform_id = RM_PLATFORM_D010,
+       .name_of_clock = "clk_out_2",
+       .name_of_clock_con = "extern2",
+};
+
+static struct tegra_spi_device_controller_data dev_cdata = {
+       .rx_clk_tap_delay = 0,
+       .tx_clk_tap_delay = 16,
+};
+
+struct spi_board_info rm31080a_macallan_spi_board[1] = {
+       {
+        .modalias = "rm_ts_spidev",
+        .bus_num = 0,
+        .chip_select = 0,
+        .max_speed_hz = 12 * 1000 * 1000,
+        .mode = SPI_MODE_0,
+        .controller_data = &dev_cdata,
+        .platform_data = &rm31080ts_macallan_data,
+        },
+};
+
+static int __init macallan_touch_init(void)
+{
+       tegra_clk_init_from_table(touch_clk_init_table);
+       if (display_board_info.board_id == BOARD_E1582)
+               rm31080ts_macallan_data.platform_id = RM_PLATFORM_P005;
+       else
+               rm31080ts_macallan_data.platform_id = RM_PLATFORM_D010;
+       mdelay(20);
+       rm31080a_macallan_spi_board[0].irq = gpio_to_irq(TOUCH_GPIO_IRQ_RAYDIUM_SPI);
+       touch_init_raydium(TOUCH_GPIO_IRQ_RAYDIUM_SPI,
+                               TOUCH_GPIO_RST_RAYDIUM_SPI,
+                               &rm31080ts_macallan_data,
+                               &rm31080a_macallan_spi_board[0],
+                               ARRAY_SIZE(rm31080a_macallan_spi_board));
+       return 0;
+}
+
+#ifdef CONFIG_USE_OF
+struct of_dev_auxdata macallan_auxdata_lookup[] __initdata = {
+       OF_DEV_AUXDATA("nvidia,tegra114-sdhci", 0x78000600, "sdhci-tegra.3",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-sdhci", 0x78000400, "sdhci-tegra.2",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-sdhci", 0x78000000, "sdhci-tegra.0",
+                               &macallan_tegra_sdhci_platform_data0),
+       OF_DEV_AUXDATA("nvidia,tegra114-camera", 0x0, "tegra_camera",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-host1x", TEGRA_HOST1X_BASE, "host1x",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-gr3d", TEGRA_GR3D_BASE, "gr3d",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-gr2d", TEGRA_GR2D_BASE, "gr2d",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-msenc", TEGRA_MSENC_BASE, "msenc",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-vi", TEGRA_VI_BASE, "vi",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-isp", TEGRA_ISP_BASE, "isp",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-tsec", TEGRA_TSEC_BASE, "tsec",
+                               NULL),
+
+       OF_DEV_AUXDATA("nvidia,tegra114-i2c", 0x7000c000, "tegra11-i2c.0",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-i2c", 0x7000c400, "tegra11-i2c.1",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-i2c", 0x7000c500, "tegra11-i2c.2",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-i2c", 0x7000c700, "tegra11-i2c.3",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-i2c", 0x7000d000, "tegra11-i2c.4",
+                               NULL),
+       {}
+};
+#endif
+
+static void __init tegra_macallan_early_init(void)
+{
+       tegra_clk_init_from_table(macallan_clk_init_table);
+       tegra_clk_vefify_parents();
+       tegra_smmu_init();
+       tegra_soc_device_init("macallan");
+}
+
+
+static void __init tegra_macallan_late_init(void)
+{
+       platform_device_register(&tegra_pinmux_device);
+       macallan_pinmux_init();
+       macallan_i2c_init();
+       macallan_spi_init();
+       macallan_usb_init();
+       macallan_uart_init();
+       macallan_audio_init();
+       platform_add_devices(macallan_devices, ARRAY_SIZE(macallan_devices));
+       //tegra_ram_console_debug_init();
+       tegra_io_dpd_init();
+       macallan_regulator_init();
+       macallan_sdhci_init();
+       macallan_suspend_init();
+       macallan_emc_init();
+       macallan_edp_init();
+       isomgr_init();
+       macallan_touch_init();
+       macallan_panel_init();
+       macallan_kbc_init();
+       macallan_pmon_init();
+#ifdef CONFIG_BT_BLUESLEEP
+       macallan_setup_bluesleep();
+       macallan_setup_bt_rfkill();
+#elif defined CONFIG_BLUEDROID_PM
+       macallan_setup_bluedroid_pm();
+#endif
+       tegra_release_bootloader_fb();
+       macallan_modem_init();
+#ifdef CONFIG_TEGRA_WDT_RECOVERY
+       tegra_wdt_recovery_init();
+#endif
+       tegra_serial_debug_init(TEGRA_UARTD_BASE, INT_WDT_CPU, NULL, -1, -1);
+       /* macallan_sensors_init(); */
+       macallan_soctherm_init();
+       tegra_register_fuse();
+}
+
+static void __init macallan_ramconsole_reserve(unsigned long size)
+{
+       tegra_ram_console_debug_reserve(SZ_1M);
+}
+
+static void __init tegra_macallan_dt_init(void)
+{
+       tegra_get_board_info(&board_info);
+       tegra_get_display_board_info(&display_board_info);
+
+       tegra_macallan_early_init();
+
+#ifdef CONFIG_USE_OF
+       of_platform_populate(NULL,
+               of_default_bus_match_table, macallan_auxdata_lookup,
+               &platform_bus);
+#else
+       platform_device_register(&tegra_gpio_device);
+#endif
+
+       tegra_macallan_late_init();
+}
+
+static void __init tegra_macallan_reserve(void)
+{
+#if defined(CONFIG_NVMAP_CONVERT_CARVEOUT_TO_IOVMM)
+       /* 1920*1200*4*2 = 18432000 bytes */
+       tegra_reserve(0, SZ_16M + SZ_2M, SZ_16M);
+#else
+       tegra_reserve(SZ_128M, SZ_16M + SZ_2M, SZ_4M);
+#endif
+       macallan_ramconsole_reserve(SZ_1M);
+}
+
+static const char * const macallan_dt_board_compat[] = {
+       "nvidia,macallan",
+       NULL
+};
+
+MACHINE_START(MACALLAN, "macallan")
+       .atag_offset    = 0x100,
+       .smp            = smp_ops(tegra_smp_ops),
+       .map_io         = tegra_map_common_io,
+       .reserve        = tegra_macallan_reserve,
+       .init_early     = tegra11x_init_early,
+       .init_irq       = tegra_dt_init_irq,
+       .handle_irq     = gic_handle_irq,
+       .timer          = &tegra_sys_timer,
+       .init_machine   = tegra_macallan_dt_init,
+       .restart        = tegra_assert_system_reset,
+       .dt_compat      = macallan_dt_board_compat,
+MACHINE_END
diff --git a/arch/arm/mach-tegra/board-macallan.h b/arch/arm/mach-tegra/board-macallan.h
new file mode 100644 (file)
index 0000000..cc9c016
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * arch/arm/mach-tegra/board-macallan.h
+ *
+ * Copyright (c) 2013, NVIDIA Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+#ifndef _MACH_TEGRA_BOARD_MACALLAN_H
+#define _MACH_TEGRA_BOARD_MACALLAN_H
+
+#include <mach/irqs.h>
+#include "gpio-names.h"
+
+/* External peripheral act as gpio */
+#define PALMAS_TEGRA_GPIO_BASE TEGRA_NR_GPIOS
+
+/* Audio-related GPIOs */
+#define TEGRA_GPIO_CDC_IRQ             TEGRA_GPIO_PW3
+#define TEGRA_GPIO_LDO1_EN             TEGRA_GPIO_PV3
+#define TEGRA_GPIO_CODEC1_EN   TEGRA_GPIO_PP3
+#define TEGRA_GPIO_CODEC2_EN   TEGRA_GPIO_PP1
+#define TEGRA_GPIO_CODEC3_EN   TEGRA_GPIO_PV0
+
+#define TEGRA_GPIO_SPKR_EN             -1
+#define TEGRA_GPIO_HP_DET              TEGRA_GPIO_PR7
+#define TEGRA_GPIO_INT_MIC_EN          TEGRA_GPIO_PK3
+#define TEGRA_GPIO_EXT_MIC_EN          -1
+
+/* External peripheral act as interrupt controller */
+#define PALMAS_TEGRA_IRQ_BASE   TEGRA_NR_IRQS
+#define PALMAS_TEGRA_IRQ_END   (PALMAS_TEGRA_IRQ_BASE + PALMAS_NUM_IRQ)
+
+/* I2C related GPIOs */
+#define TEGRA_GPIO_I2C1_SCL            TEGRA_GPIO_PC4
+#define TEGRA_GPIO_I2C1_SDA             TEGRA_GPIO_PC5
+#define TEGRA_GPIO_I2C2_SCL             TEGRA_GPIO_PT5
+#define TEGRA_GPIO_I2C2_SDA             TEGRA_GPIO_PT6
+#define TEGRA_GPIO_I2C3_SCL             TEGRA_GPIO_PBB1
+#define TEGRA_GPIO_I2C3_SDA             TEGRA_GPIO_PBB2
+#define TEGRA_GPIO_I2C4_SCL             TEGRA_GPIO_PV4
+#define TEGRA_GPIO_I2C4_SDA             TEGRA_GPIO_PV5
+#define TEGRA_GPIO_I2C5_SCL             TEGRA_GPIO_PZ6
+#define TEGRA_GPIO_I2C5_SDA             TEGRA_GPIO_PZ7
+
+/* Camera related GPIOs */
+#define CAM_RSTN                       TEGRA_GPIO_PBB3
+#define CAM_FLASH_STROBE               TEGRA_GPIO_PBB4
+#define CAM1_POWER_DWN_GPIO            TEGRA_GPIO_PBB5
+#define CAM2_POWER_DWN_GPIO            TEGRA_GPIO_PBB6
+#define CAM_AF_PWDN                    TEGRA_GPIO_PBB7
+#define CAM_GPIO1                      TEGRA_GPIO_PCC1
+#define CAM_GPIO2                      TEGRA_GPIO_PCC2
+
+/* Touchscreen definitions */
+#define TOUCH_GPIO_IRQ_RAYDIUM_SPI      TEGRA_GPIO_PK2
+#define TOUCH_GPIO_RST_RAYDIUM_SPI      TEGRA_GPIO_PK4
+
+/* Invensense MPU Definitions */
+#define MPU_GYRO_NAME           "mpu9150"
+#define MPU_GYRO_IRQ_GPIO       TEGRA_GPIO_PR3
+#define MPU_GYRO_ADDR           0x69
+#define MPU_GYRO_BUS_NUM        0
+#define MPU_GYRO_ORIENTATION   { -1, 0, 0, 0, 1, 0, 0, 0, -1 }
+#define MPU_ACCEL_NAME          "kxtf9"
+#define MPU_ACCEL_IRQ_GPIO      0 /* DISABLE ACCELIRQ:  TEGRA_GPIO_PJ2 */
+#define MPU_ACCEL_ADDR          0x0F
+#define MPU_ACCEL_BUS_NUM       0
+#define MPU_ACCEL_ORIENTATION   { 0, 1, 0, -1, 0, 0, 0, 0, 1 }
+#define MPU_COMPASS_NAME        "ak8975"
+#define MPU_COMPASS_IRQ_GPIO    0
+#define MPU_COMPASS_ADDR        0x0D
+#define MPU_COMPASS_BUS_NUM     0
+#define MPU_COMPASS_ORIENTATION { 0, 1, 0, -1, 0, 0, 0, 0, 1 }
+
+/* Modem related GPIOs */
+#define MODEM_EN               TEGRA_GPIO_PP2
+#define MDM_RST                        TEGRA_GPIO_PP0
+#define MDM_COLDBOOT           TEGRA_GPIO_PO5
+
+int macallan_regulator_init(void);
+int macallan_suspend_init(void);
+int macallan_sdhci_init(void);
+int macallan_pinmux_init(void);
+int macallan_sensors_init(void);
+int macallan_emc_init(void);
+int macallan_edp_init(void);
+int macallan_panel_init(void);
+int roth_panel_init(void);
+int macallan_kbc_init(void);
+int macallan_pmon_init(void);
+int macallan_soctherm_init(void);
+
+extern struct tegra_sdhci_platform_data macallan_tegra_sdhci_platform_data0;
+
+/* Baseband IDs */
+enum tegra_bb_type {
+       TEGRA_BB_NEMO = 1,
+};
+
+#define UTMI1_PORT_OWNER_XUSB  0x1
+#define UTMI2_PORT_OWNER_XUSB  0x2
+#define HSIC1_PORT_OWNER_XUSB  0x4
+
+#endif
index 9e9f6ac..7344a2c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * arch/arm/mach-tegra/panel-p-wuxga-10-1.c
  *
- * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2013, NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -25,6 +25,7 @@
 #include <linux/max8831_backlight.h>
 #include <linux/leds.h>
 #include <linux/ioport.h>
+#include <generated/mach-types.h>
 #include "board.h"
 #include "board-panel.h"
 #include "devices.h"
@@ -202,16 +203,77 @@ fail:
        return err;
 }
 
+static int macallan_dsi_regulator_get(struct device *dev)
+{
+       int err = 0;
+
+       if (reg_requested)
+               return 0;
+       avdd_lcd_3v3 = regulator_get(dev, "avdd_lcd");
+       if (IS_ERR_OR_NULL(avdd_lcd_3v3)) {
+               pr_err("avdd_lcd regulator get failed\n");
+               err = PTR_ERR(avdd_lcd_3v3);
+               avdd_lcd_3v3 = NULL;
+               goto fail;
+       }
+
+       vdd_lcd_bl_en = regulator_get(dev, "vdd_lcd_bl_en");
+       if (IS_ERR_OR_NULL(vdd_lcd_bl_en)) {
+               pr_err("vdd_lcd_bl_en regulator get failed\n");
+               err = PTR_ERR(vdd_lcd_bl_en);
+               vdd_lcd_bl_en = NULL;
+               goto fail;
+       }
+       reg_requested = true;
+       return 0;
+fail:
+       return err;
+}
+
+static int macallan_dsi_gpio_get(void)
+{
+       int err = 0;
+
+       if (gpio_requested)
+               return 0;
+
+       err = gpio_request(dsi_p_wuxga_10_1_pdata.dsi_panel_rst_gpio,
+               "panel rst");
+       if (err < 0) {
+               pr_err("panel reset gpio request failed\n");
+               goto fail;
+       }
+
+       /* free pwm GPIO */
+       err = gpio_request(dsi_p_wuxga_10_1_pdata.dsi_panel_bl_pwm_gpio,
+               "panel pwm");
+       if (err < 0) {
+               pr_err("panel pwm gpio request failed\n");
+               goto fail;
+       }
+       gpio_free(dsi_p_wuxga_10_1_pdata.dsi_panel_bl_pwm_gpio);
+       gpio_requested = true;
+       return 0;
+fail:
+       return err;
+}
+
 static int dsi_p_wuxga_10_1_enable(struct device *dev)
 {
        int err = 0;
 
-       err = dalmore_dsi_regulator_get(dev);
+       if (machine_is_dalmore())
+               err = dalmore_dsi_regulator_get(dev);
+       else if (machine_is_macallan())
+               err = macallan_dsi_regulator_get(dev);
        if (err < 0) {
                pr_err("dsi regulator get failed\n");
                goto fail;
        }
-       err = dalmore_dsi_gpio_get();
+       if (machine_is_dalmore())
+               err = dalmore_dsi_gpio_get();
+       else if (machine_is_macallan())
+               err = macallan_dsi_gpio_get();
        if (err < 0) {
                pr_err("dsi gpio request failed\n");
                goto fail;
@@ -541,9 +603,9 @@ static int  __init dsi_p_wuxga_10_1_register_bl_dev(void)
 }
 
 static void dsi_p_wuxga_10_1_set_disp_device(
-       struct platform_device *dalmore_display_device)
+       struct platform_device *display_device)
 {
-       disp_device = dalmore_display_device;
+       disp_device = display_device;
 }
 
 static void dsi_p_wuxga_10_1_dc_out_init(struct tegra_dc_out *dc)
index e7b01f4..f308f11 100644 (file)
@@ -32,6 +32,7 @@
 #define BOARD_E1577   0x0629
 #define BOARD_P2454   0x0996
 #define BOARD_PM347   0x015B
+#define BOARD_E1545   0x0609
 
 /* Panel board ID */
 #define    BOARD_E1582    0x062e
index 6a88d36..46eaf70 100644 (file)
@@ -215,7 +215,7 @@ config SND_SOC_TEGRA_RT5640
        help
          Say Y or M here if you want to add support for SoC audio on Tegra
          boards using the ALC5640 codec. Currently, the supported boards
-         are Kai,Cardhu and Dalmore.
+         are Kai,Cardhu,Dalmore and Macallan.
 
 config MACH_HAS_SND_SOC_TEGRA_MAX98095
        bool