mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
ipq807x: Patch x65 GPIO details based on env
Change-Id: I15464aea8696880086b1cb2bfa52e65964ecd297 Signed-off-by: Prasanna Kumar Thoorvas Samyrao Muralidharan <ptsm@codeaurora.org>
This commit is contained in:
parent
30c94d9ef4
commit
a4d1532bfb
3 changed files with 41 additions and 0 deletions
|
|
@ -883,6 +883,11 @@ __weak void fdt_fixup_qpic(void *blob)
|
|||
return;
|
||||
}
|
||||
|
||||
__weak void fdt_fixup_sdx65_gpio(void *blob)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void set_mtdids(void)
|
||||
{
|
||||
char mtdids[256];
|
||||
|
|
@ -1072,6 +1077,8 @@ int ft_board_setup(void *blob, bd_t *bd)
|
|||
#ifdef CONFIG_QCA_MMC
|
||||
board_mmc_deinit();
|
||||
#endif
|
||||
|
||||
fdt_fixup_sdx65_gpio(blob);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -921,6 +921,7 @@ void board_pci_init(int id)
|
|||
pcie_v2_clock_init(id);
|
||||
else
|
||||
pcie_clock_init(id);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -979,6 +980,37 @@ void board_pci_deinit()
|
|||
}
|
||||
#endif
|
||||
|
||||
int sdx65_attached(void)
|
||||
{
|
||||
const char *sdx65_env = getenv("x65_attached");
|
||||
int sdx65_available = 0;
|
||||
|
||||
if (sdx65_env != NULL && strncmp(sdx65_env, "1", sizeof("1")) == 0) {
|
||||
printf("sdx65_attached env is set to 1\n");
|
||||
sdx65_available = 1;
|
||||
return sdx65_available;
|
||||
}
|
||||
|
||||
return sdx65_available;
|
||||
}
|
||||
|
||||
void fdt_fixup_sdx65_gpio(void *blob)
|
||||
{
|
||||
unsigned int machid = gd->bd->bi_arch_number;
|
||||
if (machid != 0x08010400)
|
||||
return;
|
||||
|
||||
if (sdx65_attached() == 0)
|
||||
return;
|
||||
|
||||
parse_fdt_fixup("/soc/pci@20000000/%add%x65_attached", blob);
|
||||
parse_fdt_fixup("/soc/pci@20000000/%x65_attached%1", blob);
|
||||
parse_fdt_fixup("/soc/pci@20000000/pcie0_rp/qcom,mhi@0/%mdm2ap%21", blob);
|
||||
parse_fdt_fixup("/soc/pci@20000000/pcie0_rp/qcom,mhi@0/%ap2mdm%45", blob);
|
||||
parse_fdt_fixup("/soc/pinctrl@1000000/ap2mdm_status/%pins%?gpio45", blob);
|
||||
parse_fdt_fixup("/soc/pinctrl@1000000/mdm2ap_e911_status/%pins%?gpio22", blob);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USB_XHCI_IPQ
|
||||
void board_usb_deinit(int id)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -275,6 +275,8 @@ extern loff_t board_env_size;
|
|||
|
||||
#define CONFIG_FDT_FIXUP_PARTITIONS
|
||||
|
||||
#define CONFIG_IPQ_FDT_FIXUP
|
||||
|
||||
/*
|
||||
* USB Support
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue