Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
reform-boundary-uboot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jack Humbert
reform-boundary-uboot
Commits
a4a99fff
Commit
a4a99fff
authored
12 years ago
by
Tom Rini
Committed by
Albert ARIBAUD
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
am335x evm: Enable support for spi0
Signed-off-by:
Tom Rini
<
trini@ti.com
>
parent
4c0620bf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
board/ti/am335x/mux.c
+11
-0
11 additions, 0 deletions
board/ti/am335x/mux.c
drivers/spi/omap3_spi.c
+10
-0
10 additions, 0 deletions
drivers/spi/omap3_spi.c
include/configs/am335x_evm.h
+9
-0
9 additions, 0 deletions
include/configs/am335x_evm.h
with
30 additions
and
0 deletions
board/ti/am335x/mux.c
+
11
−
0
View file @
a4a99fff
...
@@ -310,6 +310,16 @@ static struct module_pin_mux i2c1_pin_mux[] = {
...
@@ -310,6 +310,16 @@ static struct module_pin_mux i2c1_pin_mux[] = {
{
-
1
},
{
-
1
},
};
};
static
struct
module_pin_mux
spi0_pin_mux
[]
=
{
{
OFFSET
(
spi0_sclk
),
(
MODE
(
0
)
|
RXACTIVE
|
PULLUDEN
)},
/* SPI0_SCLK */
{
OFFSET
(
spi0_d0
),
(
MODE
(
0
)
|
RXACTIVE
|
PULLUDEN
|
PULLUP_EN
)},
/* SPI0_D0 */
{
OFFSET
(
spi0_d1
),
(
MODE
(
0
)
|
RXACTIVE
|
PULLUDEN
)},
/* SPI0_D1 */
{
OFFSET
(
spi0_cs0
),
(
MODE
(
0
)
|
RXACTIVE
|
PULLUDEN
|
PULLUP_EN
)},
/* SPI0_CS0 */
{
-
1
},
};
static
struct
module_pin_mux
gpio0_7_pin_mux
[]
=
{
static
struct
module_pin_mux
gpio0_7_pin_mux
[]
=
{
{
OFFSET
(
ecap0_in_pwm0_out
),
(
MODE
(
7
)
|
PULLUDEN
)},
/* GPIO0_7 */
{
OFFSET
(
ecap0_in_pwm0_out
),
(
MODE
(
7
)
|
PULLUDEN
)},
/* GPIO0_7 */
{
-
1
},
{
-
1
},
...
@@ -430,6 +440,7 @@ void enable_board_pin_mux(struct am335x_baseboard_id *header)
...
@@ -430,6 +440,7 @@ void enable_board_pin_mux(struct am335x_baseboard_id *header)
configure_module_pin_mux
(
i2c1_pin_mux
);
configure_module_pin_mux
(
i2c1_pin_mux
);
else
if
(
profile
==
PROFILE_2
)
{
else
if
(
profile
==
PROFILE_2
)
{
configure_module_pin_mux
(
mmc1_pin_mux
);
configure_module_pin_mux
(
mmc1_pin_mux
);
configure_module_pin_mux
(
spi0_pin_mux
);
}
}
}
else
if
(
!
strncmp
(
header
->
name
,
"A335X_SK"
,
HDR_NAME_LEN
))
{
}
else
if
(
!
strncmp
(
header
->
name
,
"A335X_SK"
,
HDR_NAME_LEN
))
{
/* Starter Kit EVM */
/* Starter Kit EVM */
...
...
This diff is collapsed.
Click to expand it.
drivers/spi/omap3_spi.c
+
10
−
0
View file @
a4a99fff
...
@@ -173,8 +173,18 @@ int spi_claim_bus(struct spi_slave *slave)
...
@@ -173,8 +173,18 @@ int spi_claim_bus(struct spi_slave *slave)
/* standard 4-wire master mode: SCK, MOSI/out, MISO/in, nCS
/* standard 4-wire master mode: SCK, MOSI/out, MISO/in, nCS
* REVISIT: this controller could support SPI_3WIRE mode.
* REVISIT: this controller could support SPI_3WIRE mode.
*/
*/
#ifdef CONFIG_AM33XX
/*
* The reference design on AM33xx has D0 and D1 wired up opposite
* of how it has been done on previous platforms. We assume that
* custom hardware will also follow this convention.
*/
conf
&=
OMAP3_MCSPI_CHCONF_DPE0
;
conf
|=
~
(
OMAP3_MCSPI_CHCONF_IS
|
OMAP3_MCSPI_CHCONF_DPE1
);
#else
conf
&=
~
(
OMAP3_MCSPI_CHCONF_IS
|
OMAP3_MCSPI_CHCONF_DPE1
);
conf
&=
~
(
OMAP3_MCSPI_CHCONF_IS
|
OMAP3_MCSPI_CHCONF_DPE1
);
conf
|=
OMAP3_MCSPI_CHCONF_DPE0
;
conf
|=
OMAP3_MCSPI_CHCONF_DPE0
;
#endif
/* wordlength */
/* wordlength */
conf
&=
~
OMAP3_MCSPI_CHCONF_WL_MASK
;
conf
&=
~
OMAP3_MCSPI_CHCONF_WL_MASK
;
...
...
This diff is collapsed.
Click to expand it.
include/configs/am335x_evm.h
+
9
−
0
View file @
a4a99fff
...
@@ -134,6 +134,14 @@
...
@@ -134,6 +134,14 @@
#define CONFIG_CMD_FAT
#define CONFIG_CMD_FAT
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_EXT2
#define CONFIG_SPI
#define CONFIG_OMAP3_SPI
#define CONFIG_MTD_DEVICE
#define CONFIG_SPI_FLASH
#define CONFIG_SPI_FLASH_WINBOND
#define CONFIG_CMD_SF
#define CONFIG_SF_DEFAULT_SPEED (24000000)
/* Physical Memory Map */
/* Physical Memory Map */
#define CONFIG_NR_DRAM_BANKS 1
/* 1 bank of DRAM */
#define CONFIG_NR_DRAM_BANKS 1
/* 1 bank of DRAM */
#define PHYS_DRAM_1 0x80000000
/* DRAM Bank #1 */
#define PHYS_DRAM_1 0x80000000
/* DRAM Bank #1 */
...
@@ -163,6 +171,7 @@
...
@@ -163,6 +171,7 @@
#define CONFIG_I2C_MULTI_BUS
#define CONFIG_I2C_MULTI_BUS
#define CONFIG_DRIVER_OMAP24XX_I2C
#define CONFIG_DRIVER_OMAP24XX_I2C
#define CONFIG_CMD_EEPROM
#define CONFIG_CMD_EEPROM
#define CONFIG_ENV_EEPROM_IS_ON_I2C
#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
/* Main EEPROM */
#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
/* Main EEPROM */
#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
#define CONFIG_SYS_I2C_MULTI_EEPROMS
#define CONFIG_SYS_I2C_MULTI_EEPROMS
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment