Commit d323ade1 authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by Nicolas Pitre

[ARM] Orion: add 88F6183 (Orion-1-90) support

The Orion-1-90 (88F6183) is another member of the Orion SoC family,
which has a 16 bit DDR2 interface, one x1 PCIe port (configurable as
Root Complex or Endpoint), one 10/100/1000 ethernet interface, one
USB 2.0 port with PHY, one SPDIF/I2S interface, one SDIO interface,
one TWSI interface, two UARTs, one SPI interface, a NAND controller,
a crypto engine, and a 4-channel DMA engine.
Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
parent 104ea078
...@@ -434,7 +434,7 @@ config ARCH_ORION5X ...@@ -434,7 +434,7 @@ config ARCH_ORION5X
help help
Support for the following Marvell Orion 5x series SoCs: Support for the following Marvell Orion 5x series SoCs:
Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182), Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182),
Orion-2 (5281). Orion-2 (5281), Orion-1-90 (6183).
config ARCH_PNX4008 config ARCH_PNX4008
bool "Philips Nexperia PNX4008 Mobile" bool "Philips Nexperia PNX4008 Mobile"
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/mv643xx_eth.h> #include <linux/mv643xx_eth.h>
#include <linux/mv643xx_i2c.h> #include <linux/mv643xx_i2c.h>
#include <linux/ata_platform.h> #include <linux/ata_platform.h>
#include <linux/spi/orion_spi.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/timex.h> #include <asm/timex.h>
...@@ -270,6 +271,38 @@ void __init orion5x_sata_init(struct mv_sata_platform_data *sata_data) ...@@ -270,6 +271,38 @@ void __init orion5x_sata_init(struct mv_sata_platform_data *sata_data)
} }
/*****************************************************************************
* SPI
****************************************************************************/
static struct orion_spi_info orion5x_spi_plat_data = {
.tclk = 0,
};
static struct resource orion5x_spi_resources[] = {
{
.name = "spi base",
.start = SPI_PHYS_BASE,
.end = SPI_PHYS_BASE + 0x1f,
.flags = IORESOURCE_MEM,
},
};
static struct platform_device orion5x_spi = {
.name = "orion_spi",
.id = 0,
.dev = {
.platform_data = &orion5x_spi_plat_data,
},
.num_resources = ARRAY_SIZE(orion5x_spi_resources),
.resource = orion5x_spi_resources,
};
void __init orion5x_spi_init()
{
platform_device_register(&orion5x_spi);
}
/***************************************************************************** /*****************************************************************************
* UART0 * UART0
****************************************************************************/ ****************************************************************************/
...@@ -462,6 +495,13 @@ int orion5x_tclk; ...@@ -462,6 +495,13 @@ int orion5x_tclk;
int __init orion5x_find_tclk(void) int __init orion5x_find_tclk(void)
{ {
u32 dev, rev;
orion5x_pcie_id(&dev, &rev);
if (dev == MV88F6183_DEV_ID &&
(readl(MPP_RESET_SAMPLE) & 0x00000200) == 0)
return 133333333;
return 166666667; return 166666667;
} }
...@@ -510,6 +550,12 @@ static void __init orion5x_id(u32 *dev, u32 *rev, char **dev_name) ...@@ -510,6 +550,12 @@ static void __init orion5x_id(u32 *dev, u32 *rev, char **dev_name)
} else { } else {
*dev_name = "MV88F5181(L)-Rev-Unsupported"; *dev_name = "MV88F5181(L)-Rev-Unsupported";
} }
} else if (*dev == MV88F6183_DEV_ID) {
if (*rev == MV88F6183_REV_B0) {
*dev_name = "MV88F6183-Rev-B0";
} else {
*dev_name = "MV88F6183-Rev-Unsupported";
}
} else { } else {
*dev_name = "Device-Unknown"; *dev_name = "Device-Unknown";
} }
...@@ -524,6 +570,7 @@ void __init orion5x_init(void) ...@@ -524,6 +570,7 @@ void __init orion5x_init(void)
printk(KERN_INFO "Orion ID: %s. TCLK=%d.\n", dev_name, orion5x_tclk); printk(KERN_INFO "Orion ID: %s. TCLK=%d.\n", dev_name, orion5x_tclk);
orion5x_eth_shared_data.t_clk = orion5x_tclk; orion5x_eth_shared_data.t_clk = orion5x_tclk;
orion5x_spi_plat_data.tclk = orion5x_tclk;
orion5x_uart0_data[0].uartclk = orion5x_tclk; orion5x_uart0_data[0].uartclk = orion5x_tclk;
orion5x_uart1_data[0].uartclk = orion5x_tclk; orion5x_uart1_data[0].uartclk = orion5x_tclk;
......
...@@ -31,6 +31,7 @@ void orion5x_ehci1_init(void); ...@@ -31,6 +31,7 @@ void orion5x_ehci1_init(void);
void orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data); void orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data);
void orion5x_i2c_init(void); void orion5x_i2c_init(void);
void orion5x_sata_init(struct mv_sata_platform_data *sata_data); void orion5x_sata_init(struct mv_sata_platform_data *sata_data);
void orion5x_spi_init(void);
void orion5x_uart0_init(void); void orion5x_uart0_init(void);
void orion5x_uart1_init(void); void orion5x_uart1_init(void);
void orion5x_xor_init(void); void orion5x_xor_init(void);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* arch/arm/mach-orion5x/include/mach/orion5x.h * arch/arm/mach-orion5x/include/mach/orion5x.h
* *
* Generic definitions of Orion SoC flavors: * Generic definitions of Orion SoC flavors:
* Orion-1, Orion-VoIP, Orion-NAS, and Orion-2. * Orion-1, Orion-VoIP, Orion-NAS, Orion-2, and Orion-1-90.
* *
* Maintainer: Tzachi Perelstein <tzachi@marvell.com> * Maintainer: Tzachi Perelstein <tzachi@marvell.com>
* *
...@@ -76,6 +76,9 @@ ...@@ -76,6 +76,9 @@
#define MV88F5281_REV_D0 4 #define MV88F5281_REV_D0 4
#define MV88F5281_REV_D1 5 #define MV88F5281_REV_D1 5
#define MV88F5281_REV_D2 6 #define MV88F5281_REV_D2 6
/* Orion-1-90 (88F6183) */
#define MV88F6183_DEV_ID 0x6183
#define MV88F6183_REV_B0 3
/******************************************************************************* /*******************************************************************************
* Orion Registers Map * Orion Registers Map
...@@ -86,6 +89,7 @@ ...@@ -86,6 +89,7 @@
#define ORION5X_DEV_BUS_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x10000) #define ORION5X_DEV_BUS_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x10000)
#define ORION5X_DEV_BUS_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x10000) #define ORION5X_DEV_BUS_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x10000)
#define ORION5X_DEV_BUS_REG(x) (ORION5X_DEV_BUS_VIRT_BASE | (x)) #define ORION5X_DEV_BUS_REG(x) (ORION5X_DEV_BUS_VIRT_BASE | (x))
#define SPI_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x0600)
#define I2C_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x1000) #define I2C_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x1000)
#define UART0_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x2000) #define UART0_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x2000)
#define UART0_VIRT_BASE (ORION5X_DEV_BUS_VIRT_BASE | 0x2000) #define UART0_VIRT_BASE (ORION5X_DEV_BUS_VIRT_BASE | 0x2000)
......
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