Lines Matching +full:sun4i +full:- +full:a10 +full:- +full:display +full:- +full:clk
1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2012-2013 Henrik Nordstrom <henrik@henriknordstrom.net>
6 * (C) Copyright 2007-2011
10 * Some board init for the Allwinner A10-evb board.
17 #include <generic-phy.h>
18 #include <phy-sun4i-usb.h>
21 #include <asm/arch/display.h>
31 #include <u-boot/crc.h>
55 ret = gpio_request(soft_i2c_gpio_sda, "soft-i2c-sda"); in soft_i2c_board_init()
68 ret = gpio_request(soft_i2c_gpio_scl, "soft-i2c-scl"); in soft_i2c_board_init()
220 gd->bd->bi_boot_params = (PHYS_SDRAM_0 + 0x100); in board_init()
233 * write this from the non-secure world (read is OK, though). in board_init()
259 /* Give attached sata device time to power-up to avoid link timeouts */ in board_init()
271 * clk, reset and pinctrl drivers land. in board_init()
282 #if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1 in board_init()
300 uint8_t spl_header_version = spl->spl_signature[3]; in get_spl_header()
303 if (memcmp(spl->spl_signature, SPL_SIGNATURE, 3) != 0) in get_spl_header()
320 gd->ram_size = get_ram_size((long *)PHYS_SDRAM_0, in dram_init()
323 gd->ram_size = (phys_addr_t)spl->dram_size << 20; in dram_init()
325 if (gd->ram_size > CONFIG_SUNXI_DRAM_MAX_SIZE) in dram_init()
326 gd->ram_size = CONFIG_SUNXI_DRAM_MAX_SIZE; in dram_init()
343 /* sun4i / sun7i do have a PC23, but it is not used for nand, in nand_pinmux_setup()
355 setbits_le32(&ccm->ahb_gate0, (CLK_GATE_OPEN << AHB_GATE_OFFSET_NAND0)); in nand_clock_setup()
358 setbits_le32(&ccm->ahb_reset0_cfg, (1 << AHB_GATE_OFFSET_NAND0)); in nand_clock_setup()
360 setbits_le32(&ccm->nand0_clk_cfg, CCM_NAND_CTRL_ENABLE | AHB_DIV_1); in nand_clock_setup()
381 /* SDC0: PF0-PF5 */ in mmc_pinmux_setup()
395 /* SDC1: PH22-PH-27 */ in mmc_pinmux_setup()
402 /* SDC1: PG0-PG5 */ in mmc_pinmux_setup()
410 /* SDC1: PG3-PG8 */ in mmc_pinmux_setup()
417 /* SDC1: PG0-PG5 */ in mmc_pinmux_setup()
425 /* SDC1: PD2-PD7 */ in mmc_pinmux_setup()
432 /* SDC1: PG0-PG5 */ in mmc_pinmux_setup()
446 /* SDC2: PC6-PC11 */ in mmc_pinmux_setup()
454 /* SDC2: PE4-PE9 */ in mmc_pinmux_setup()
461 /* SDC2: PC6-PC15 */ in mmc_pinmux_setup()
470 /* SDC2: PA9-PA14 */ in mmc_pinmux_setup()
477 /* SDC2: PC6-PC15, PC24 */ in mmc_pinmux_setup()
489 /* SDC2: PC6-PC15, PC24 */ in mmc_pinmux_setup()
500 /* SDC2: PC5-PC6, PC8-PC16 */ in mmc_pinmux_setup()
513 /* SDC2: PC4-PC14 */ in mmc_pinmux_setup()
520 /* SDC2: PC6-PC16 */ in mmc_pinmux_setup()
534 /* SDC3: PI4-PI9 */ in mmc_pinmux_setup()
542 /* SDC3: PA9-PA14 */ in mmc_pinmux_setup()
549 /* SDC3: PC6-PC15, PC24 */ in mmc_pinmux_setup()
576 return -1; in board_mmc_init()
578 #if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1 in board_mmc_init()
582 return -1; in board_mmc_init()
598 /* Promote the header version for U-Boot proper, if needed. */ in sunxi_spl_store_dram_size()
599 if (spl->spl_signature[3] < SPL_DRAM_HEADER_VERSION) in sunxi_spl_store_dram_size()
600 spl->spl_signature[3] = SPL_DRAM_HEADER_VERSION; in sunxi_spl_store_dram_size()
602 spl->dram_size = dram_size >> 20; in sunxi_spl_store_dram_size()
668 gd->ram_size = sunxi_dram_init(); in sunxi_board_init()
669 printf(" %d MiB\n", (int)(gd->ram_size >> 20)); in sunxi_board_init()
670 if (!gd->ram_size) in sunxi_board_init()
673 sunxi_spl_store_dram_size(gd->ram_size); in sunxi_board_init()
701 pr_err("failed to get %s USB PHY\n", dev->name); in g_dnl_board_usb_cable_connected()
707 pr_err("failed to init %s USB PHY\n", dev->name); in g_dnl_board_usb_cable_connected()
714 return -ENODEV; in g_dnl_board_usb_cable_connected()
732 serialnr->high = (unsigned int) (serial >> 32); in get_board_serial()
733 serialnr->low = (unsigned int) (serial & 0xffffffff); in get_board_serial()
735 serialnr->high = 0; in get_board_serial()
736 serialnr->low = 0; in get_board_serial()
753 if (!spl->fel_script_address) in parse_spl_header()
756 if (spl->fel_uEnv_length != 0) { in parse_spl_header()
759 * import -t" the string(s) at fel_script_address right away. in parse_spl_header()
761 himport_r(&env_htab, (char *)(uintptr_t)spl->fel_script_address, in parse_spl_header()
762 spl->fel_uEnv_length, '\n', H_NOCLEAR, 0, 0, NULL); in parse_spl_header()
765 /* otherwise assume .scr format (mkimage-type script) */ in parse_spl_header()
766 env_set_hex("fel_scriptaddr", spl->fel_script_address); in parse_spl_header()
784 * The single words 1 - 3 of the SID have quite a few bits in setup_environment()
790 * fixed mac-addresses based on only using word 3 for a in setup_environment()
791 * long time and changing a fixed mac-address with an in setup_environment()
792 * u-boot update is not good. in setup_environment()
857 setup_environment(gd->fdt_blob); in misc_init_r()
872 * ethernet aliases the u-boot copy does not have. in ft_board_setup()
891 if (spl != INVALID_SPL_HEADER && spl->dt_name_offset) { in board_fit_config_name_match()
892 cmp_str += spl->dt_name_offset; in board_fit_config_name_match()
903 if (strstr(name, "-pine64") && strstr(cmp_str, "-pine64")) { in board_fit_config_name_match()
904 if ((gd->ram_size > 512 * 1024 * 1024)) in board_fit_config_name_match()