Commit 05c713ee authored by Andrey Filippov's avatar Andrey Filippov

Changed some configuratiom options (PULLUP, NOPULLUP, FAST, SLOW) format...

Changed some configuratiom options (PULLUP, NOPULLUP, FAST, SLOW) format (earlier variant did not work)
parent bb274fcf
...@@ -23,8 +23,10 @@ __maintainer__ = "Andrey Filippov" ...@@ -23,8 +23,10 @@ __maintainer__ = "Andrey Filippov"
__email__ = "andrey@elphel.com" __email__ = "andrey@elphel.com"
__status__ = "Development" __status__ = "Development"
import ezynq_registers import ezynq_registers
import ezynq_feature_config #import ezynq_feature_config
import ezynq_slcr_clk_def import ezynq_slcr_clk_def
MIO_ATTRIBS=['SLOW','FAST','PULLUP','NOPULLUP']
MIO_TEMPLATES = { MIO_TEMPLATES = {
'QUADSPI':( 'QUADSPI':(
{'NAME':'CS0', 'TRISTATE':False, 'FAST':True, 'PULLUP':True, 'L0':1, 'L1':0, 'L2':0, 'L3':0, 'PINS':((1,), (0,))}, {'NAME':'CS0', 'TRISTATE':False, 'FAST':True, 'PULLUP':True, 'L0':1, 'L1':0, 'L2':0, 'L3':0, 'PINS':((1,), (0,))},
...@@ -307,9 +309,9 @@ class EzynqMIO: ...@@ -307,9 +309,9 @@ class EzynqMIO:
('pullup', 1-led_on), ('pullup', 1-led_on),
('tri_enable', 1-led_on))) # ,force,warn) ('tri_enable', 1-led_on))) # ,force,warn)
return led_register_set.get_register_sets(sort_addr=True,apply_new=True) return led_register_set.get_register_sets(sort_addr=True,apply_new=True)
#MIO_ATTRIBS=['SLOW','FAST','PULLUP','NOPULLUP']
def parse_config_mio(self,raw_configs): def parse_config_mio(self,raw_configs):
attrib_suffix='ATTRIB' # attrib_suffix='ATTRIB'
options = {} options = {}
for line in raw_configs: for line in raw_configs:
option = line['KEY'] option = line['KEY']
...@@ -320,8 +322,10 @@ class EzynqMIO: ...@@ -320,8 +322,10 @@ class EzynqMIO:
options[option]={} options[option]={}
if not isinstance(options[option],dict): # make a former value a value in a dictionary if not isinstance(options[option],dict): # make a former value a value in a dictionary
options[option]={'INTERFACE_GROUP':options[option]} options[option]={'INTERFACE_GROUP':options[option]}
if qualifier==attrib_suffix: # if qualifier==attrib_suffix:
value=str(value).upper() if qualifier.upper() in MIO_ATTRIBS:
# value=str(value).upper()
value=qualifier.upper()
try: try:
options[option]['ATTRIBS'].add(value) options[option]['ATTRIBS'].add(value)
except: except:
......
...@@ -33,27 +33,36 @@ CONFIG_EZYNQ_MIO_1_VOLT=1.8 ...@@ -33,27 +33,36 @@ CONFIG_EZYNQ_MIO_1_VOLT=1.8
#CONFIG_EZYNQ_MIO_1_PULLUP=y #default pullup for MIO0 - may be overwritten for individual pins #CONFIG_EZYNQ_MIO_1_PULLUP=y #default pullup for MIO0 - may be overwritten for individual pins
#I/O standards will default to 1.3/2.5/3.3 according to MIO voltage #I/O standards will default to 1.3/2.5/3.3 according to MIO voltage
#CONFIG_EZYNQ_QUADSPI_0 = y #CONFIG_EZYNQ_QUADSPI_0 = y
CONFIG_EZYNQ_QUADSPI_0__ATTRIB = SLOW #CONFIG_EZYNQ_QUADSPI_0__ATTRIB = SLOW
CONFIG_EZYNQ_QUADSPI_0__SLOW = y
#CONFIG_EZYNQ_QUADSPI_1 = y #CONFIG_EZYNQ_QUADSPI_1 = y
#CONFIG_EZYNQ_QUADSPI_FBCLK = y #CONFIG_EZYNQ_QUADSPI_FBCLK = y
#CONFIG_EZYNQ_MIO_ETH_0=y #CONFIG_EZYNQ_MIO_ETH_0=y
CONFIG_EZYNQ_MIO_ETH_0__ATTRIB= SLOW #CONFIG_EZYNQ_MIO_ETH_0__ATTRIB= SLOW
CONFIG_EZYNQ_MIO_ETH_0__SLOW = y
#CONFIG_EZYNQ_MIO_ETH_1=y #CONFIG_EZYNQ_MIO_ETH_1=y
CONFIG_EZYNQ_MIO_ETH_MDIO__ATTRIB= SLOW #CONFIG_EZYNQ_MIO_ETH_MDIO__ATTRIB= SLOW
CONFIG_EZYNQ_MIO_USB_0__ATTRIB= SLOW CONFIG_EZYNQ_MIO_ETH_MDIO__SLOW
CONFIG_EZYNQ_MIO_USB_0__ATTRIB= PULLUP #CONFIG_EZYNQ_MIO_USB_0__ATTRIB= SLOW
CONFIG_EZYNQ_MIO_USB_0__SLOW = y
#CONFIG_EZYNQ_MIO_USB_0__ATTRIB= PULLUP
CONFIG_EZYNQ_MIO_USB_0__PULLUP = y
#CONFIG_EZYNQ_MIO_USB_1=y #CONFIG_EZYNQ_MIO_USB_1=y
#CONFIG_EZYNQ_MIO_SPI_0=16 #16,28,40 #CONFIG_EZYNQ_MIO_SPI_0=16 #16,28,40
#CONFIG_EZYNQ_MIO_SPI_1=10 #10,22,34,46 #CONFIG_EZYNQ_MIO_SPI_1=10 #10,22,34,46
CONFIG_EZYNQ_MIO_SDIO_0=40 #16,28,40 CONFIG_EZYNQ_MIO_SDIO_0=40 #16,28,40
CONFIG_EZYNQ_MIO_SDIO_0__ATTRIB=SLOW # CONFIG_EZYNQ_MIO_SDIO_0__ATTRIB=SLOW
CONFIG_EZYNQ_MIO_SDIO_0__ATTRIB=PULLUP # CONFIG_EZYNQ_MIO_SDIO_0__ATTRIB=PULLUP
CONFIG_EZYNQ_MIO_SDIO_0__SLOW = y
CONFIG_EZYNQ_MIO_SDIO_0__PULLUP = y
#CONFIG_EZYNQ_MIO_SDIO_1=10 #10,22,34,46 #CONFIG_EZYNQ_MIO_SDIO_1=10 #10,22,34,46
CONFIG_EZYNQ_MIO_SDCD_0=46 #any but 7,8 CONFIG_EZYNQ_MIO_SDCD_0=46 #any but 7,8
CONFIG_EZYNQ_MIO_SDCD_0__ATTRIB=PULLUP # CONFIG_EZYNQ_MIO_SDCD_0__ATTRIB=PULLUP
CONFIG_EZYNQ_MIO_SDCD_0__PULLUP = y
CONFIG_EZYNQ_MIO_SDWP_0=50 #any but 7,8 CONFIG_EZYNQ_MIO_SDWP_0=50 #any but 7,8
CONFIG_EZYNQ_MIO_SDWP_0__ATTRIB=PULLUP # CONFIG_EZYNQ_MIO_SDWP_0__ATTRIB=PULLUP
CONFIG_EZYNQ_MIO_SDWP_0__PULLUP = y
#CONFIG_EZYNQ_MIO_SDCD_1=48 #any but 7,8 #CONFIG_EZYNQ_MIO_SDCD_1=48 #any but 7,8
#CONFIG_EZYNQ_MIO_SDWP_1=48 #any but 7,8 #CONFIG_EZYNQ_MIO_SDWP_1=48 #any but 7,8
......
...@@ -53,18 +53,18 @@ ...@@ -53,18 +53,18 @@
#define CONFIG_EZYNQ_OCM /* not used */ #define CONFIG_EZYNQ_OCM /* not used */
#define CONFIG_EZYNQ_MIO_0_VOLT 3.3 #define CONFIG_EZYNQ_MIO_0_VOLT 3.3
#define CONFIG_EZYNQ_MIO_1_VOLT 1.8 #define CONFIG_EZYNQ_MIO_1_VOLT 1.8
#define CONFIG_EZYNQ_QUADSPI_0__ATTRIB SLOW #define CONFIG_EZYNQ_QUADSPI_0__SLOW
#define CONFIG_EZYNQ_MIO_ETH_0__ATTRIB SLOW #define CONFIG_EZYNQ_MIO_ETH_0__SLOW
#define CONFIG_EZYNQ_MIO_ETH_MDIO__ATTRIB SLOW #define CONFIG_EZYNQ_MIO_ETH_MDIO__SLOW
#define CONFIG_EZYNQ_MIO_USB_0__ATTRIB SLOW #define CONFIG_EZYNQ_MIO_USB_0__SLOW
#define CONFIG_EZYNQ_MIO_USB_0__ATTRIB PULLUP #define CONFIG_EZYNQ_MIO_USB_0__PULLUP
#define CONFIG_EZYNQ_MIO_SDIO_0 40 // 16,28,40 #define CONFIG_EZYNQ_MIO_SDIO_0 40 // 16,28,40
#define CONFIG_EZYNQ_MIO_SDIO_0__ATTRIB SLOW #define CONFIG_EZYNQ_MIO_SDIO_0__SLOW
#define CONFIG_EZYNQ_MIO_SDIO_0__ATTRIB PULLUP #define CONFIG_EZYNQ_MIO_SDIO_0__PULLUP
#define CONFIG_EZYNQ_MIO_SDCD_0 46 //#any but 7,8 #define CONFIG_EZYNQ_MIO_SDCD_0 46 //#any but 7,8
#define CONFIG_EZYNQ_MIO_SDCD_0__ATTRIB PULLUP #define CONFIG_EZYNQ_MIO_SDCD_0__PULLUP
#define CONFIG_EZYNQ_MIO_SDWP_0 50 //#any but 7,8 #define CONFIG_EZYNQ_MIO_SDWP_0 50 //#any but 7,8
#define CONFIG_EZYNQ_MIO_SDWP_0__ATTRIB PULLUP #define CONFIG_EZYNQ_MIO_SDWP_0__PULLUP
#define CONFIG_EZYNQ_MIO_UART_1 48 //# 8+4*N #define CONFIG_EZYNQ_MIO_UART_1 48 //# 8+4*N
/* LED will be OFF */ /* LED will be OFF */
#define CONFIG_EZYNQ_MIO_INOUT_47 OUT #define CONFIG_EZYNQ_MIO_INOUT_47 OUT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment