Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ezynq
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
ezynq
Commits
505ed525
Commit
505ed525
authored
Sep 24, 2013
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://git.code.sf.net/p/elphel/ezynq
parents
182c3a98
05c713ee
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
23 deletions
+36
-23
ezynq_mio.py
ezynq_mio.py
+9
-5
test.mk
test.mk
+18
-9
zed_ezynq.h
u-boot-tree/include/configs/ezynq/zed_ezynq.h
+9
-9
No files found.
ezynq_mio.py
View file @
505ed525
...
@@ -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
:
...
...
test.mk
View file @
505ed525
...
@@ -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
...
...
u-boot-tree/include/configs/ezynq/zed_ezynq.h
View file @
505ed525
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment