blob: bc1d79cb8785341b299ead16f7d9da7a81b08852 [file] [log] [blame]
Eugene Yasman6382ee02013-01-16 13:00:56 +02001/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
Deepa Dinamani7d6c8972011-12-14 15:16:56 -08002 *
3 * Redistribution and use in source and binary forms, with or without
Deepa Dinamani1e094942012-10-30 15:49:02 -07004 * modification, are permitted provided that the following conditions are
5 * met:
6 * * Redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer.
8 * * Redistributions in binary form must reproduce the above
9 * copyright notice, this list of conditions and the following
10 * disclaimer in the documentation and/or other materials provided
11 * with the distribution.
12 * * Neither the name of The Linux Foundation nor the names of its
13 * contributors may be used to endorse or promote products derived
14 * from this software without specific prior written permission.
Deepa Dinamani7d6c8972011-12-14 15:16:56 -080015 *
Deepa Dinamani1e094942012-10-30 15:49:02 -070016 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Deepa Dinamani7d6c8972011-12-14 15:16:56 -080027 */
28
29#include <debug.h>
30#include <platform/iomap.h>
Channagoud Kadabi744c8902013-04-02 11:54:53 -070031#include <platform/gpio.h>
Deepa Dinamani7d6c8972011-12-14 15:16:56 -080032#include <reg.h>
33#include <target.h>
34#include <platform.h>
Deepa Dinamani26e93262012-05-21 17:35:14 -070035#include <uart_dm.h>
Amol Jadi29f95032012-06-22 12:52:54 -070036#include <mmc.h>
Deepa Dinamanic2a9b362012-02-23 15:15:54 -080037#include <spmi.h>
Neeti Desai465491e2012-07-31 12:53:35 -070038#include <board.h>
39#include <smem.h>
40#include <baseband.h>
Deepa Dinamani9a612932012-08-14 16:15:03 -070041#include <dev/keys.h>
42#include <pm8x41.h>
Deepa Dinamanib9a57202012-12-20 18:05:11 -080043#include <crypto5_wrapper.h>
Eugene Yasmana0d18122013-02-26 13:23:05 +020044#include <hsusb.h>
45#include <clock.h>
sundarajan srinivasana098d832013-03-07 12:19:30 -080046#include <partition_parser.h>
47#include <scm.h>
48#include <platform/clock.h>
Channagoud Kadabif84830c2013-04-19 14:35:47 -070049#include <stdlib.h>
Deepa Dinamanib9a57202012-12-20 18:05:11 -080050
51extern bool target_use_signed_kernel(void);
Channagoud Kadabi744c8902013-04-02 11:54:53 -070052static void set_sdc_power_ctrl();
Deepa Dinamani7d6c8972011-12-14 15:16:56 -080053
54static unsigned int target_id;
Deepa Dinamani07f15712013-03-08 17:02:13 -080055static uint32_t pmic_ver;
Deepa Dinamani7d6c8972011-12-14 15:16:56 -080056
Deepa Dinamanic2a9b362012-02-23 15:15:54 -080057#define PMIC_ARB_CHANNEL_NUM 0
58#define PMIC_ARB_OWNER_ID 0
59
Deepa Dinamani1e094942012-10-30 15:49:02 -070060#define WDOG_DEBUG_DISABLE_BIT 17
Deepa Dinamani7d6c8972011-12-14 15:16:56 -080061
Deepa Dinamanib9a57202012-12-20 18:05:11 -080062#define CE_INSTANCE 2
63#define CE_EE 1
64#define CE_FIFO_SIZE 64
65#define CE_READ_PIPE 3
66#define CE_WRITE_PIPE 2
67#define CE_ARRAY_SIZE 20
68
sundarajan srinivasana098d832013-03-07 12:19:30 -080069#ifdef SSD_ENABLE
70#define SSD_CE_INSTANCE_1 1
71#define SSD_PARTITION_SIZE 8192
72#endif
73
Deepa Dinamanica5ad852012-05-07 18:19:47 -070074static uint32_t mmc_sdc_base[] =
75 { MSM_SDC1_BASE, MSM_SDC2_BASE, MSM_SDC3_BASE, MSM_SDC4_BASE };
76
Deepa Dinamani7d6c8972011-12-14 15:16:56 -080077void target_early_init(void)
78{
Deepa Dinamanib073ba22012-08-10 11:06:41 -070079#if WITH_DEBUG_UART
Neeti Desaiac011272012-08-29 18:24:54 -070080 uart_dm_init(1, 0, BLSP1_UART1_BASE);
Deepa Dinamanib073ba22012-08-10 11:06:41 -070081#endif
Deepa Dinamani7d6c8972011-12-14 15:16:56 -080082}
83
Deepa Dinamani9a612932012-08-14 16:15:03 -070084/* Return 1 if vol_up pressed */
85static int target_volume_up()
86{
87 uint8_t status = 0;
88 struct pm8x41_gpio gpio;
89
90 /* CDP vol_up seems to be always grounded. So gpio status is read as 0,
91 * whether key is pressed or not.
92 * Ignore volume_up key on CDP for now.
93 */
94 if (board_hardware_id() == HW_PLATFORM_SURF)
95 return 0;
96
97 /* Configure the GPIO */
98 gpio.direction = PM_GPIO_DIR_IN;
99 gpio.function = 0;
100 gpio.pull = PM_GPIO_PULL_UP_30;
Eugene Yasman6382ee02013-01-16 13:00:56 +0200101 gpio.vin_sel = 2;
Deepa Dinamani9a612932012-08-14 16:15:03 -0700102
103 pm8x41_gpio_config(5, &gpio);
104
105 /* Get status of P_GPIO_5 */
106 pm8x41_gpio_get(5, &status);
107
108 return !status; /* active low */
109}
110
111/* Return 1 if vol_down pressed */
Deepa Dinamani66a87962013-02-04 10:39:30 -0800112uint32_t target_volume_down()
Deepa Dinamani9a612932012-08-14 16:15:03 -0700113{
Deepa Dinamani66a87962013-02-04 10:39:30 -0800114 /* Volume down button is tied in with RESIN on MSM8974. */
Deepa Dinamani07f15712013-03-08 17:02:13 -0800115 if (pmic_ver == PMIC_VERSION_V2)
Deepa Dinamani13bfc852013-02-05 17:56:47 -0800116 return pm8x41_resin_bark_workaround_status();
117 else
118 return pm8x41_resin_status();
Deepa Dinamani9a612932012-08-14 16:15:03 -0700119}
120
121static void target_keystatus()
122{
123 keys_init();
124
125 if(target_volume_down())
126 keys_post_event(KEY_VOLUMEDOWN, 1);
127
128 if(target_volume_up())
129 keys_post_event(KEY_VOLUMEUP, 1);
130}
131
Deepa Dinamanib9a57202012-12-20 18:05:11 -0800132/* Set up params for h/w CE. */
133void target_crypto_init_params()
134{
135 struct crypto_init_params ce_params;
136
137 /* Set up base addresses and instance. */
138 ce_params.crypto_instance = CE_INSTANCE;
139 ce_params.crypto_base = MSM_CE2_BASE;
140 ce_params.bam_base = MSM_CE2_BAM_BASE;
141
142 /* Set up BAM config. */
143 ce_params.bam_ee = CE_EE;
144 ce_params.pipes.read_pipe = CE_READ_PIPE;
145 ce_params.pipes.write_pipe = CE_WRITE_PIPE;
146
147 /* Assign buffer sizes. */
148 ce_params.num_ce = CE_ARRAY_SIZE;
149 ce_params.read_fifo_size = CE_FIFO_SIZE;
150 ce_params.write_fifo_size = CE_FIFO_SIZE;
151
152 crypto_init_params(&ce_params);
153}
154
155crypto_engine_type board_ce_type(void)
156{
157 return CRYPTO_ENGINE_TYPE_HW;
158}
159
Deepa Dinamani7d6c8972011-12-14 15:16:56 -0800160void target_init(void)
161{
Deepa Dinamanica5ad852012-05-07 18:19:47 -0700162 uint32_t base_addr;
163 uint8_t slot;
Deepa Dinamani7d6c8972011-12-14 15:16:56 -0800164
165 dprintf(INFO, "target_init()\n");
166
Deepa Dinamanic2a9b362012-02-23 15:15:54 -0800167 spmi_init(PMIC_ARB_CHANNEL_NUM, PMIC_ARB_OWNER_ID);
Deepa Dinamani7d6c8972011-12-14 15:16:56 -0800168
Deepa Dinamani07f15712013-03-08 17:02:13 -0800169 /* Save PM8941 version info. */
170 pmic_ver = pm8x41_get_pmic_rev();
171
Deepa Dinamani9a612932012-08-14 16:15:03 -0700172 target_keystatus();
173
Deepa Dinamanib9a57202012-12-20 18:05:11 -0800174 if (target_use_signed_kernel())
175 target_crypto_init_params();
Siddhartha Agrawal7ac6d512013-01-22 18:39:50 -0800176 /* Display splash screen if enabled */
177#if DISPLAY_SPLASH_SCREEN
Channagoud Kadabi8a9c6a22013-02-05 14:43:48 -0800178 dprintf(INFO, "Display Init: Start\n");
Siddhartha Agrawal7ac6d512013-01-22 18:39:50 -0800179 display_init();
Channagoud Kadabi8a9c6a22013-02-05 14:43:48 -0800180 dprintf(INFO, "Display Init: Done\n");
Siddhartha Agrawal7ac6d512013-01-22 18:39:50 -0800181#endif
Deepa Dinamanib9a57202012-12-20 18:05:11 -0800182
Channagoud Kadabi744c8902013-04-02 11:54:53 -0700183 /*
184 * Set drive strength & pull ctrl for
185 * emmc
186 */
187 set_sdc_power_ctrl();
188
Deepa Dinamanica5ad852012-05-07 18:19:47 -0700189 /* Trying Slot 1*/
190 slot = 1;
191 base_addr = mmc_sdc_base[slot - 1];
192 if (mmc_boot_main(slot, base_addr))
193 {
Deepa Dinamanid18b47a2012-06-27 13:06:03 -0700194
195 /* Trying Slot 2 next */
196 slot = 2;
197 base_addr = mmc_sdc_base[slot - 1];
198 if (mmc_boot_main(slot, base_addr)) {
199 dprintf(CRITICAL, "mmc init failed!");
200 ASSERT(0);
201 }
Deepa Dinamanica5ad852012-05-07 18:19:47 -0700202 }
Deepa Dinamani7d6c8972011-12-14 15:16:56 -0800203}
204
205unsigned board_machtype(void)
206{
207 return target_id;
208}
209
210/* Do any target specific intialization needed before entering fastboot mode */
sundarajan srinivasana098d832013-03-07 12:19:30 -0800211#ifdef SSD_ENABLE
sundarajan srinivasana098d832013-03-07 12:19:30 -0800212static void ssd_load_keystore_from_emmc()
213{
214 uint64_t ptn = 0;
215 int index = -1;
216 uint32_t size = SSD_PARTITION_SIZE;
217 int ret = -1;
218
Channagoud Kadabif84830c2013-04-19 14:35:47 -0700219 uint32_t *buffer = (uint32_t *)memalign(CACHE_LINE,
220 ROUNDUP(SSD_PARTITION_SIZE, CACHE_LINE));
221
222 if (!buffer) {
223 dprintf(CRITICAL, "Error Allocating memory for SSD buffer\n");
224 ASSERT(0);
225 }
226
sundarajan srinivasana098d832013-03-07 12:19:30 -0800227 index = partition_get_index("ssd");
228
229 ptn = partition_get_offset(index);
230 if(ptn == 0){
231 dprintf(CRITICAL,"ERROR: ssd parition not found");
232 return;
233 }
234
235 if(mmc_read(ptn, buffer, size)){
236 dprintf(CRITICAL,"ERROR:Cannot read data\n");
237 return;
238 }
239
240 ret = scm_protect_keystore((uint32_t *)&buffer[0],size);
241 if(ret != 0)
242 dprintf(CRITICAL,"ERROR: scm_protect_keystore Failed");
Channagoud Kadabif84830c2013-04-19 14:35:47 -0700243
244 free(buffer);
sundarajan srinivasana098d832013-03-07 12:19:30 -0800245}
246#endif
247
Deepa Dinamani7d6c8972011-12-14 15:16:56 -0800248void target_fastboot_init(void)
249{
Deepa Dinamani9a612932012-08-14 16:15:03 -0700250 /* Set the BOOT_DONE flag in PM8921 */
251 pm8x41_set_boot_done();
sundarajan srinivasana098d832013-03-07 12:19:30 -0800252
253#ifdef SSD_ENABLE
254 clock_ce_enable(SSD_CE_INSTANCE_1);
255 ssd_load_keystore_from_emmc();
256#endif
Deepa Dinamani7d6c8972011-12-14 15:16:56 -0800257}
Neeti Desai465491e2012-07-31 12:53:35 -0700258
259/* Detect the target type */
260void target_detect(struct board_data *board)
261{
262 board->target = LINUX_MACHTYPE_UNKNOWN;
263}
264
265/* Detect the modem type */
266void target_baseband_detect(struct board_data *board)
267{
Channagoud Kadabif1d44422013-02-21 22:59:35 -0800268 uint32_t platform;
269 uint32_t platform_subtype;
270
271 platform = board->platform;
272 platform_subtype = board->platform_subtype;
273
274 /*
275 * Look for platform subtype if present, else
276 * check for platform type to decide on the
277 * baseband type
278 */
279 switch(platform_subtype) {
280 case HW_PLATFORM_SUBTYPE_UNKNOWN:
281 break;
282 default:
283 dprintf(CRITICAL, "Platform Subtype : %u is not supported\n",platform_subtype);
284 ASSERT(0);
285 };
286
287 switch(platform) {
288 case MSM8974:
Deepa Dinamani713a76f2013-05-03 13:17:24 -0700289 case MSM8274:
290 case MSM8674:
Neeti Desai465491e2012-07-31 12:53:35 -0700291 board->baseband = BASEBAND_MSM;
Channagoud Kadabif1d44422013-02-21 22:59:35 -0800292 break;
293 case APQ8074:
294 board->baseband = BASEBAND_APQ;
295 break;
296 default:
297 dprintf(CRITICAL, "Platform type: %u is not supported\n",platform);
298 ASSERT(0);
299 };
Neeti Desai465491e2012-07-31 12:53:35 -0700300}
Deepa Dinamani9a612932012-08-14 16:15:03 -0700301
Deepa Dinamani927a6b62013-03-28 17:05:32 -0700302unsigned target_baseband()
303{
304 return board_baseband();
305}
306
Deepa Dinamani9a612932012-08-14 16:15:03 -0700307void target_serialno(unsigned char *buf)
308{
309 unsigned int serialno;
310 if (target_is_emmc_boot()) {
311 serialno = mmc_get_psn();
312 snprintf((char *)buf, 13, "%x", serialno);
313 }
314}
Amol Jadi6639d452012-08-16 14:51:19 -0700315
316unsigned check_reboot_mode(void)
317{
318 uint32_t restart_reason = 0;
Channagoud Kadabi8c8587f2013-02-08 12:46:09 -0800319 uint32_t soc_ver = 0;
320 uint32_t restart_reason_addr;
321
322 soc_ver = board_soc_version();
323
324 if (soc_ver >= BOARD_SOC_VERSION2)
325 restart_reason_addr = RESTART_REASON_ADDR_V2;
326 else
327 restart_reason_addr = RESTART_REASON_ADDR;
Amol Jadi6639d452012-08-16 14:51:19 -0700328
329 /* Read reboot reason and scrub it */
Channagoud Kadabi8c8587f2013-02-08 12:46:09 -0800330 restart_reason = readl(restart_reason_addr);
331 writel(0x00, restart_reason_addr);
Amol Jadi6639d452012-08-16 14:51:19 -0700332
333 return restart_reason;
334}
Neeti Desai120b55d2012-08-20 17:15:56 -0700335
336void reboot_device(unsigned reboot_reason)
337{
Channagoud Kadabi8c8587f2013-02-08 12:46:09 -0800338 uint32_t soc_ver = 0;
339
340 soc_ver = board_soc_version();
341
Neeti Desai120b55d2012-08-20 17:15:56 -0700342 /* Write the reboot reason */
Channagoud Kadabi8c8587f2013-02-08 12:46:09 -0800343 if (soc_ver >= BOARD_SOC_VERSION2)
344 writel(reboot_reason, RESTART_REASON_ADDR_V2);
345 else
346 writel(reboot_reason, RESTART_REASON_ADDR);
Neeti Desai120b55d2012-08-20 17:15:56 -0700347
348 /* Configure PMIC for warm reset */
Deepa Dinamani07f15712013-03-08 17:02:13 -0800349 if (pmic_ver == PMIC_VERSION_V2)
350 pm8x41_v2_reset_configure(PON_PSHOLD_WARM_RESET);
351 else
352 pm8x41_reset_configure(PON_PSHOLD_WARM_RESET);
Neeti Desai120b55d2012-08-20 17:15:56 -0700353
Deepa Dinamani1e094942012-10-30 15:49:02 -0700354 /* Disable Watchdog Debug.
355 * Required becuase of a H/W bug which causes the system to
356 * reset partially even for non watchdog resets.
357 */
358 writel(readl(GCC_WDOG_DEBUG) & ~(1 << WDOG_DEBUG_DISABLE_BIT), GCC_WDOG_DEBUG);
359
Deepa Dinamanie0808e52012-11-26 15:22:46 -0800360 dsb();
361
362 /* Wait until the write takes effect. */
363 while(readl(GCC_WDOG_DEBUG) & (1 << WDOG_DEBUG_DISABLE_BIT));
364
Neeti Desai120b55d2012-08-20 17:15:56 -0700365 /* Drop PS_HOLD for MSM */
366 writel(0x00, MPM2_MPM_PS_HOLD);
367
368 mdelay(5000);
369
370 dprintf(CRITICAL, "Rebooting failed\n");
371}
Siddhartha Agrawal7ac6d512013-01-22 18:39:50 -0800372
Eugene Yasmana0d18122013-02-26 13:23:05 +0200373/* Do target specific usb initialization */
374void target_usb_init(void)
375{
376 /* Enable secondary USB PHY on DragonBoard8074 */
377 if (board_hardware_id() == HW_PLATFORM_DRAGON) {
378 /* Route ChipIDea to use secondary USB HS port2 */
379 writel_relaxed(1, USB2_PHY_SEL);
380
381 /* Enable access to secondary PHY by clamping the low
382 * voltage interface between DVDD of the PHY and Vddcx
383 * (set bit16 (USB2_PHY_HS2_DIG_CLAMP_N_2) = 1) */
384 writel_relaxed(readl_relaxed(USB_OTG_HS_PHY_SEC_CTRL)
385 | 0x00010000, USB_OTG_HS_PHY_SEC_CTRL);
386
387 /* Perform power-on-reset of the PHY.
388 * Delay values are arbitrary */
389 writel_relaxed(readl_relaxed(USB_OTG_HS_PHY_CTRL)|1,
390 USB_OTG_HS_PHY_CTRL);
391 thread_sleep(10);
392 writel_relaxed(readl_relaxed(USB_OTG_HS_PHY_CTRL) & 0xFFFFFFFE,
393 USB_OTG_HS_PHY_CTRL);
394 thread_sleep(10);
395
396 /* Enable HSUSB PHY port for ULPI interface,
397 * then configure related parameters within the PHY */
398 writel_relaxed(((readl_relaxed(USB_PORTSC) & 0xC0000000)
399 | 0x8c000004), USB_PORTSC);
400 }
401}
402
Siddhartha Agrawal7ac6d512013-01-22 18:39:50 -0800403/* Returns 1 if target supports continuous splash screen. */
404int target_cont_splash_screen()
405{
Siddhartha Agrawal17a6b832013-02-17 18:36:25 -0800406 switch(board_hardware_id())
Siddhartha Agrawal7ac6d512013-01-22 18:39:50 -0800407 {
Siddhartha Agrawal17a6b832013-02-17 18:36:25 -0800408 case HW_PLATFORM_SURF:
409 case HW_PLATFORM_MTP:
410 case HW_PLATFORM_FLUID:
411 dprintf(SPEW, "Target_cont_splash=1\n");
412 return 1;
413 break;
414 default:
415 dprintf(SPEW, "Target_cont_splash=0\n");
416 return 0;
Siddhartha Agrawal7ac6d512013-01-22 18:39:50 -0800417 }
418}
sundarajan srinivasanb5db0a92013-02-12 19:19:27 -0800419
420unsigned target_pause_for_battery_charge(void)
421{
422 uint8_t pon_reason = pm8x41_get_pon_reason();
423
424 /* This function will always return 0 to facilitate
425 * automated testing/reboot with usb connected.
426 * uncomment if this feature is needed */
427 /* if ((pon_reason == USB_CHG) || (pon_reason == DC_CHG))
428 return 1;*/
429
430 return 0;
431}
sundarajan srinivasana098d832013-03-07 12:19:30 -0800432
433void target_usb_stop(void)
434{
435#ifdef SSD_ENABLE
436 clock_ce_disable(SSD_CE_INSTANCE_1);
437#endif
438}
Deepa Dinamani65df9822013-03-08 13:38:34 -0800439
440void shutdown_device()
441{
442 dprintf(CRITICAL, "Going down for shutdown.\n");
443
444 /* Configure PMIC for shutdown. */
445 if (pmic_ver == PMIC_VERSION_V2)
446 pm8x41_v2_reset_configure(PON_PSHOLD_SHUTDOWN);
447 else
448 pm8x41_reset_configure(PON_PSHOLD_SHUTDOWN);
449
450 /* Drop PS_HOLD for MSM */
451 writel(0x00, MPM2_MPM_PS_HOLD);
452
453 mdelay(5000);
454
455 dprintf(CRITICAL, "Shutdown failed\n");
456
457}
Channagoud Kadabi744c8902013-04-02 11:54:53 -0700458
459/*
460 * Function to set the capabilities for the host
461 */
462void target_mmc_caps(struct mmc_host *host)
463{
Channagoud Kadabi45e22b22013-04-12 14:28:37 -0700464 uint32_t soc_ver = 0;
465
466 soc_ver = board_soc_version();
467
468 /*
469 * 8974 v1 fluid devices, have a hardware bug
470 * which limits the bus width to 4 bit.
471 */
472 switch(board_hardware_id())
473 {
474 case HW_PLATFORM_FLUID:
475 if (soc_ver >= BOARD_SOC_VERSION2)
476 host->caps.bus_width = MMC_BOOT_BUS_WIDTH_8_BIT;
477 else
478 host->caps.bus_width = MMC_BOOT_BUS_WIDTH_4_BIT;
479 break;
480 default:
481 host->caps.bus_width = MMC_BOOT_BUS_WIDTH_8_BIT;
482 };
483
Channagoud Kadabi744c8902013-04-02 11:54:53 -0700484 host->caps.ddr_mode = 1;
485 host->caps.hs200_mode = 1;
Channagoud Kadabi744c8902013-04-02 11:54:53 -0700486 host->caps.hs_clk_rate = MMC_CLK_96MHZ;
487}
488
489static void set_sdc_power_ctrl()
490{
491 /* Drive strength configs for sdc pins */
492 struct tlmm_cfgs sdc1_hdrv_cfg[] =
493 {
494 { SDC1_CLK_HDRV_CTL_OFF, TLMM_CUR_VAL_16MA, TLMM_HDRV_MASK },
495 { SDC1_CMD_HDRV_CTL_OFF, TLMM_CUR_VAL_10MA, TLMM_HDRV_MASK },
496 { SDC1_DATA_HDRV_CTL_OFF, TLMM_CUR_VAL_10MA, TLMM_HDRV_MASK },
497 };
498
499 /* Pull configs for sdc pins */
500 struct tlmm_cfgs sdc1_pull_cfg[] =
501 {
502 { SDC1_CLK_PULL_CTL_OFF, TLMM_NO_PULL, TLMM_PULL_MASK },
503 { SDC1_CMD_PULL_CTL_OFF, TLMM_PULL_UP, TLMM_PULL_MASK },
504 { SDC1_DATA_PULL_CTL_OFF, TLMM_PULL_UP, TLMM_PULL_MASK },
505 };
506
507 /* Set the drive strength & pull control values */
508 tlmm_set_hdrive_ctrl(sdc1_hdrv_cfg, ARRAY_SIZE(sdc1_hdrv_cfg));
509 tlmm_set_pull_ctrl(sdc1_pull_cfg, ARRAY_SIZE(sdc1_pull_cfg));
510}