2 * Amazon Kindle Fire (first generation) codename kc1 config
4 * Copyright (C) 2016 Paul Kocialkowski <contact@paulk.fr>
6 * SPDX-License-Identifier: GPL-2.0+
11 #include <linux/ctype.h>
12 #include <linux/usb/musb.h>
13 #include <asm/omap_musb.h>
14 #include <asm/arch/sys_proto.h>
15 #include <asm/arch/mmc_host_def.h>
21 DECLARE_GLOBAL_DATA_PTR;
23 const struct omap_sysinfo sysinfo = {
27 static struct musb_hdrc_config musb_config = {
34 static struct omap_musb_board_data musb_board_data = {
35 .interface_type = MUSB_INTERFACE_UTMI,
38 static struct musb_hdrc_platform_data musb_platform_data = {
39 .mode = MUSB_PERIPHERAL,
40 .config = &musb_config,
42 .platform_ops = &omap2430_ops,
43 .board_data = &musb_board_data,
47 void set_muxconf_regs(void)
49 do_set_mux((*ctrl)->control_padconf_core_base, core_padconf_array,
50 sizeof(core_padconf_array) / sizeof(struct pad_conf_entry));
53 struct lpddr2_device_details *emif_get_device_details(u32 emif_nr, u8 cs,
54 struct lpddr2_device_details *lpddr2_dev_details)
59 *lpddr2_dev_details = elpida_2G_S4_details;
61 return lpddr2_dev_details;
64 void emif_get_device_timings(u32 emif_nr,
65 const struct lpddr2_device_timings **cs0_device_timings,
66 const struct lpddr2_device_timings **cs1_device_timings)
68 *cs0_device_timings = &elpida_2G_S4_timings;
69 *cs1_device_timings = NULL;
78 gd->bd->bi_arch_number = MACH_TYPE_OMAP_4430SDP;
81 gd->bd->bi_boot_params = OMAP44XX_DRAM_ADDR_SPACE_START + 0x100;
94 musb_register(&musb_platform_data, &musb_board_data, (void *)MUSB_BASE);
99 u32 get_board_rev(void)
103 gpio_request(KC1_GPIO_MBID0, "MBID0");
104 gpio_request(KC1_GPIO_MBID1, "MBID1");
105 gpio_request(KC1_GPIO_MBID2, "MBID2");
106 gpio_request(KC1_GPIO_MBID3, "MBID3");
108 gpio_direction_input(KC1_GPIO_MBID0);
109 gpio_direction_input(KC1_GPIO_MBID1);
110 gpio_direction_input(KC1_GPIO_MBID2);
111 gpio_direction_input(KC1_GPIO_MBID3);
113 value |= (gpio_get_value(KC1_GPIO_MBID0) << 0);
114 value |= (gpio_get_value(KC1_GPIO_MBID1) << 1);
115 value |= (gpio_get_value(KC1_GPIO_MBID2) << 2);
116 value |= (gpio_get_value(KC1_GPIO_MBID3) << 3);
121 void get_board_serial(struct tag_serialnr *serialnr)
123 omap_die_id_get_board_serial(serialnr);
126 #ifndef CONFIG_SPL_BUILD
127 int board_mmc_init(bd_t *bis)
129 return omap_mmc_init(1, 0, 0, -1, -1);
133 void board_mmc_power_init(void)
135 twl6030_power_mmc_init(1);