X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fkeymile%2Fcommon%2Fcommon.h;h=c74f569a61ab71d18f1e857f755f07f653b64c3b;hb=f32c86493822174e27f4b3c7c9359094406afbd8;hp=6ce992ac32429786b50dec157d710d7dff4a918b;hpb=f30c62bbe8988a8341970cbb7e14bb7a99abb157;p=u-boot diff --git a/board/keymile/common/common.h b/board/keymile/common/common.h index 6ce992ac32..c74f569a61 100644 --- a/board/keymile/common/common.h +++ b/board/keymile/common/common.h @@ -2,10 +2,7 @@ * (C) Copyright 2008 * Heiko Schocher, DENX Software Engineering, hs@denx.de. * - * 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. + * SPDX-License-Identifier: GPL-2.0+ */ #ifndef __KEYMILE_COMMON_H @@ -16,6 +13,8 @@ #define WRG_LED 0x02 #define WRL_BOOT 0x01 +#define OPRTL_XBUFENA 0x20 + #define H_OPORTS_SCC4_ENA 0x10 #define H_OPORTS_SCC4_FD_ENA 0x04 #define H_OPORTS_FCC1_PW_DWN 0x01 @@ -30,7 +29,11 @@ struct km_bec_fpga { unsigned char res1[3]; unsigned char bprth; unsigned char bprtl; - unsigned char res2[6]; + unsigned char gprt3; + unsigned char gprt2; + unsigned char gprt1; + unsigned char gprt0; + unsigned char res2[2]; unsigned char prst; unsigned char res3[0xfff0]; unsigned char pgy_id; @@ -123,7 +126,15 @@ struct bfticu_iomap { #endif int ethernet_present(void); -int ivm_read_eeprom(void); +int ivm_read_eeprom(unsigned char *buf, int len); +int ivm_analyze_eeprom(unsigned char *buf, int len); + +int trigger_fpga_config(void); +int wait_for_fpga_config(void); +int fpga_reset(void); +int toggle_eeprom_spi_bus(void); + +int get_testpin(void); int set_km_env(void); int fdt_set_node_and_value(void *blob, @@ -136,5 +147,9 @@ int fdt_get_node_and_value(void *blob, char *propname, void **var); +#define DELAY_ABORT_SEQ 62 /* @200kHz 9 clocks = 44us, 62us is ok */ +#define DELAY_HALF_PERIOD (500 / (CONFIG_SYS_I2C_SPEED / 1000)) + int i2c_soft_read_pin(void); +int i2c_make_abort(void); #endif /* __KEYMILE_COMMON_H */