[ARM] add Marvell Kirkwood (88F6000) SoC support
The Marvell Kirkwood (88F6000) is a family of ARM SoCs based on a
Shiva CPU core, and features a DDR2 controller, a x1 PCIe interface,
a USB 2.0 interface, a SPI controller, a crypto accelerator, a TS
interface, and IDMA/XOR engines, and depending on the model, also
features one or two Gigabit Ethernet interfaces, two SATA II
interfaces, one or two TWSI interfaces, one or two UARTs, a
TDM/SLIC interface, a NAND controller, an I2S/SPDIF interface, and
an SDIO interface.
This patch adds supports for the Marvell DB-88F6281-BP Development
Board and the RD-88F6192-NAS and the RD-88F6281 Reference Designs,
enabling support for the PCIe interface, the USB interface, the
ethernet interfaces, the SATA interfaces, the TWSI interfaces, the
UARTs, and the NAND controller.
Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-06-23 04:45:06 +08:00
|
|
|
/*
|
|
|
|
* arch/arm/mach-kirkwood/common.h
|
|
|
|
*
|
|
|
|
* Core functions for Marvell Kirkwood SoCs
|
|
|
|
*
|
|
|
|
* This file is licensed under the terms of the GNU General Public
|
|
|
|
* License version 2. This program is licensed "as is" without any
|
|
|
|
* warranty of any kind, whether express or implied.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ARCH_KIRKWOOD_COMMON_H
|
|
|
|
#define __ARCH_KIRKWOOD_COMMON_H
|
|
|
|
|
2008-09-25 22:23:48 +08:00
|
|
|
struct dsa_platform_data;
|
[ARM] add Marvell Kirkwood (88F6000) SoC support
The Marvell Kirkwood (88F6000) is a family of ARM SoCs based on a
Shiva CPU core, and features a DDR2 controller, a x1 PCIe interface,
a USB 2.0 interface, a SPI controller, a crypto accelerator, a TS
interface, and IDMA/XOR engines, and depending on the model, also
features one or two Gigabit Ethernet interfaces, two SATA II
interfaces, one or two TWSI interfaces, one or two UARTs, a
TDM/SLIC interface, a NAND controller, an I2S/SPDIF interface, and
an SDIO interface.
This patch adds supports for the Marvell DB-88F6281-BP Development
Board and the RD-88F6192-NAS and the RD-88F6281 Reference Designs,
enabling support for the PCIe interface, the USB interface, the
ethernet interfaces, the SATA interfaces, the TWSI interfaces, the
UARTs, and the NAND controller.
Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-06-23 04:45:06 +08:00
|
|
|
struct mv643xx_eth_platform_data;
|
|
|
|
struct mv_sata_platform_data;
|
2009-02-14 16:15:55 +08:00
|
|
|
struct mvsdio_platform_data;
|
2009-06-02 03:36:36 +08:00
|
|
|
struct mtd_partition;
|
2010-04-20 17:26:19 +08:00
|
|
|
struct mtd_info;
|
2010-05-31 19:49:12 +08:00
|
|
|
struct kirkwood_asoc_platform_data;
|
[ARM] add Marvell Kirkwood (88F6000) SoC support
The Marvell Kirkwood (88F6000) is a family of ARM SoCs based on a
Shiva CPU core, and features a DDR2 controller, a x1 PCIe interface,
a USB 2.0 interface, a SPI controller, a crypto accelerator, a TS
interface, and IDMA/XOR engines, and depending on the model, also
features one or two Gigabit Ethernet interfaces, two SATA II
interfaces, one or two TWSI interfaces, one or two UARTs, a
TDM/SLIC interface, a NAND controller, an I2S/SPDIF interface, and
an SDIO interface.
This patch adds supports for the Marvell DB-88F6281-BP Development
Board and the RD-88F6192-NAS and the RD-88F6281 Reference Designs,
enabling support for the PCIe interface, the USB interface, the
ethernet interfaces, the SATA interfaces, the TWSI interfaces, the
UARTs, and the NAND controller.
Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-06-23 04:45:06 +08:00
|
|
|
|
2010-06-08 19:21:34 +08:00
|
|
|
#define KW_PCIE0 (1 << 0)
|
|
|
|
#define KW_PCIE1 (1 << 1)
|
|
|
|
|
[ARM] add Marvell Kirkwood (88F6000) SoC support
The Marvell Kirkwood (88F6000) is a family of ARM SoCs based on a
Shiva CPU core, and features a DDR2 controller, a x1 PCIe interface,
a USB 2.0 interface, a SPI controller, a crypto accelerator, a TS
interface, and IDMA/XOR engines, and depending on the model, also
features one or two Gigabit Ethernet interfaces, two SATA II
interfaces, one or two TWSI interfaces, one or two UARTs, a
TDM/SLIC interface, a NAND controller, an I2S/SPDIF interface, and
an SDIO interface.
This patch adds supports for the Marvell DB-88F6281-BP Development
Board and the RD-88F6192-NAS and the RD-88F6281 Reference Designs,
enabling support for the PCIe interface, the USB interface, the
ethernet interfaces, the SATA interfaces, the TWSI interfaces, the
UARTs, and the NAND controller.
Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-06-23 04:45:06 +08:00
|
|
|
/*
|
|
|
|
* Basic Kirkwood init functions used early by machine-setup.
|
|
|
|
*/
|
|
|
|
void kirkwood_map_io(void);
|
|
|
|
void kirkwood_init(void);
|
2010-10-15 22:50:26 +08:00
|
|
|
void kirkwood_init_early(void);
|
[ARM] add Marvell Kirkwood (88F6000) SoC support
The Marvell Kirkwood (88F6000) is a family of ARM SoCs based on a
Shiva CPU core, and features a DDR2 controller, a x1 PCIe interface,
a USB 2.0 interface, a SPI controller, a crypto accelerator, a TS
interface, and IDMA/XOR engines, and depending on the model, also
features one or two Gigabit Ethernet interfaces, two SATA II
interfaces, one or two TWSI interfaces, one or two UARTs, a
TDM/SLIC interface, a NAND controller, an I2S/SPDIF interface, and
an SDIO interface.
This patch adds supports for the Marvell DB-88F6281-BP Development
Board and the RD-88F6192-NAS and the RD-88F6281 Reference Designs,
enabling support for the PCIe interface, the USB interface, the
ethernet interfaces, the SATA interfaces, the TWSI interfaces, the
UARTs, and the NAND controller.
Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-06-23 04:45:06 +08:00
|
|
|
void kirkwood_init_irq(void);
|
|
|
|
|
|
|
|
void kirkwood_setup_cpu_mbus(void);
|
|
|
|
|
2011-02-03 06:16:10 +08:00
|
|
|
void kirkwood_enable_pcie(void);
|
2008-09-15 15:40:35 +08:00
|
|
|
void kirkwood_pcie_id(u32 *dev, u32 *rev);
|
|
|
|
|
[ARM] add Marvell Kirkwood (88F6000) SoC support
The Marvell Kirkwood (88F6000) is a family of ARM SoCs based on a
Shiva CPU core, and features a DDR2 controller, a x1 PCIe interface,
a USB 2.0 interface, a SPI controller, a crypto accelerator, a TS
interface, and IDMA/XOR engines, and depending on the model, also
features one or two Gigabit Ethernet interfaces, two SATA II
interfaces, one or two TWSI interfaces, one or two UARTs, a
TDM/SLIC interface, a NAND controller, an I2S/SPDIF interface, and
an SDIO interface.
This patch adds supports for the Marvell DB-88F6281-BP Development
Board and the RD-88F6192-NAS and the RD-88F6281 Reference Designs,
enabling support for the PCIe interface, the USB interface, the
ethernet interfaces, the SATA interfaces, the TWSI interfaces, the
UARTs, and the NAND controller.
Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-06-23 04:45:06 +08:00
|
|
|
void kirkwood_ehci_init(void);
|
|
|
|
void kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data);
|
2008-10-20 05:10:14 +08:00
|
|
|
void kirkwood_ge01_init(struct mv643xx_eth_platform_data *eth_data);
|
2008-09-25 22:23:48 +08:00
|
|
|
void kirkwood_ge00_switch_init(struct dsa_platform_data *d, int irq);
|
2010-06-08 19:21:34 +08:00
|
|
|
void kirkwood_pcie_init(unsigned int portmask);
|
[ARM] add Marvell Kirkwood (88F6000) SoC support
The Marvell Kirkwood (88F6000) is a family of ARM SoCs based on a
Shiva CPU core, and features a DDR2 controller, a x1 PCIe interface,
a USB 2.0 interface, a SPI controller, a crypto accelerator, a TS
interface, and IDMA/XOR engines, and depending on the model, also
features one or two Gigabit Ethernet interfaces, two SATA II
interfaces, one or two TWSI interfaces, one or two UARTs, a
TDM/SLIC interface, a NAND controller, an I2S/SPDIF interface, and
an SDIO interface.
This patch adds supports for the Marvell DB-88F6281-BP Development
Board and the RD-88F6192-NAS and the RD-88F6281 Reference Designs,
enabling support for the PCIe interface, the USB interface, the
ethernet interfaces, the SATA interfaces, the TWSI interfaces, the
UARTs, and the NAND controller.
Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-06-23 04:45:06 +08:00
|
|
|
void kirkwood_sata_init(struct mv_sata_platform_data *sata_data);
|
2009-02-14 16:15:55 +08:00
|
|
|
void kirkwood_sdio_init(struct mvsdio_platform_data *mvsdio_data);
|
2008-08-09 21:38:18 +08:00
|
|
|
void kirkwood_spi_init(void);
|
2009-03-24 02:13:21 +08:00
|
|
|
void kirkwood_i2c_init(void);
|
[ARM] add Marvell Kirkwood (88F6000) SoC support
The Marvell Kirkwood (88F6000) is a family of ARM SoCs based on a
Shiva CPU core, and features a DDR2 controller, a x1 PCIe interface,
a USB 2.0 interface, a SPI controller, a crypto accelerator, a TS
interface, and IDMA/XOR engines, and depending on the model, also
features one or two Gigabit Ethernet interfaces, two SATA II
interfaces, one or two TWSI interfaces, one or two UARTs, a
TDM/SLIC interface, a NAND controller, an I2S/SPDIF interface, and
an SDIO interface.
This patch adds supports for the Marvell DB-88F6281-BP Development
Board and the RD-88F6192-NAS and the RD-88F6281 Reference Designs,
enabling support for the PCIe interface, the USB interface, the
ethernet interfaces, the SATA interfaces, the TWSI interfaces, the
UARTs, and the NAND controller.
Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-06-23 04:45:06 +08:00
|
|
|
void kirkwood_uart0_init(void);
|
|
|
|
void kirkwood_uart1_init(void);
|
2009-06-02 03:36:36 +08:00
|
|
|
void kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, int delay);
|
2012-10-20 19:23:16 +08:00
|
|
|
void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts,
|
|
|
|
int (*dev_ready)(struct mtd_info *));
|
2010-05-31 19:49:12 +08:00
|
|
|
void kirkwood_audio_init(void);
|
2011-11-05 18:03:47 +08:00
|
|
|
void kirkwood_restart(char, const char *);
|
2011-12-15 15:15:07 +08:00
|
|
|
void kirkwood_clk_init(void);
|
[ARM] add Marvell Kirkwood (88F6000) SoC support
The Marvell Kirkwood (88F6000) is a family of ARM SoCs based on a
Shiva CPU core, and features a DDR2 controller, a x1 PCIe interface,
a USB 2.0 interface, a SPI controller, a crypto accelerator, a TS
interface, and IDMA/XOR engines, and depending on the model, also
features one or two Gigabit Ethernet interfaces, two SATA II
interfaces, one or two TWSI interfaces, one or two UARTs, a
TDM/SLIC interface, a NAND controller, an I2S/SPDIF interface, and
an SDIO interface.
This patch adds supports for the Marvell DB-88F6281-BP Development
Board and the RD-88F6192-NAS and the RD-88F6281 Reference Designs,
enabling support for the PCIe interface, the USB interface, the
ethernet interfaces, the SATA interfaces, the TWSI interfaces, the
UARTs, and the NAND controller.
Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-06-23 04:45:06 +08:00
|
|
|
|
2012-03-15 08:52:31 +08:00
|
|
|
/* board init functions for boards not fully converted to fdt */
|
|
|
|
#ifdef CONFIG_MACH_DREAMPLUG_DT
|
|
|
|
void dreamplug_init(void);
|
|
|
|
#else
|
|
|
|
static inline void dreamplug_init(void) {};
|
|
|
|
#endif
|
2012-05-12 20:57:59 +08:00
|
|
|
#ifdef CONFIG_MACH_TS219_DT
|
|
|
|
void qnap_dt_ts219_init(void);
|
|
|
|
#else
|
|
|
|
static inline void qnap_dt_ts219_init(void) {};
|
|
|
|
#endif
|
2012-03-15 08:52:31 +08:00
|
|
|
|
2012-04-18 18:06:40 +08:00
|
|
|
#ifdef CONFIG_MACH_DLINK_KIRKWOOD_DT
|
|
|
|
void dnskw_init(void);
|
|
|
|
#else
|
|
|
|
static inline void dnskw_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-04-19 05:16:41 +08:00
|
|
|
#ifdef CONFIG_MACH_ICONNECT_DT
|
|
|
|
void iconnect_init(void);
|
|
|
|
#else
|
|
|
|
static inline void iconnect_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-05-01 05:55:17 +08:00
|
|
|
#ifdef CONFIG_MACH_IB62X0_DT
|
|
|
|
void ib62x0_init(void);
|
|
|
|
#else
|
|
|
|
static inline void ib62x0_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-08-15 04:43:41 +08:00
|
|
|
#ifdef CONFIG_MACH_DOCKSTAR_DT
|
|
|
|
void dockstar_dt_init(void);
|
|
|
|
#else
|
|
|
|
static inline void dockstar_dt_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-07-16 17:52:50 +08:00
|
|
|
#ifdef CONFIG_MACH_GOFLEXNET_DT
|
|
|
|
void goflexnet_init(void);
|
|
|
|
#else
|
|
|
|
static inline void goflexnet_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-07-17 13:25:55 +08:00
|
|
|
#ifdef CONFIG_MACH_LSXL_DT
|
|
|
|
void lsxl_init(void);
|
|
|
|
#else
|
|
|
|
static inline void lsxl_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-08-20 22:29:07 +08:00
|
|
|
#ifdef CONFIG_MACH_IOMEGA_IX2_200_DT
|
|
|
|
void iomega_ix2_200_init(void);
|
|
|
|
#else
|
|
|
|
static inline void iomega_ix2_200_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-09-04 17:55:02 +08:00
|
|
|
#ifdef CONFIG_MACH_KM_KIRKWOOD_DT
|
|
|
|
void km_kirkwood_init(void);
|
|
|
|
#else
|
|
|
|
static inline void km_kirkwood_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-11-18 23:46:16 +08:00
|
|
|
#ifdef CONFIG_MACH_MPLCEC4_DT
|
|
|
|
void mplcec4_init(void);
|
|
|
|
#else
|
|
|
|
static inline void mplcec4_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-10-17 18:09:04 +08:00
|
|
|
#if defined(CONFIG_MACH_INETSPACE_V2_DT) || \
|
|
|
|
defined(CONFIG_MACH_NETSPACE_V2_DT) || \
|
2012-10-17 18:09:05 +08:00
|
|
|
defined(CONFIG_MACH_NETSPACE_MAX_V2_DT) || \
|
2012-10-17 18:09:06 +08:00
|
|
|
defined(CONFIG_MACH_NETSPACE_LITE_V2_DT) || \
|
|
|
|
defined(CONFIG_MACH_NETSPACE_MINI_V2_DT)
|
2012-10-17 18:09:04 +08:00
|
|
|
void ns2_init(void);
|
|
|
|
#else
|
|
|
|
static inline void ns2_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
arm: kirkwood: add support for ZyXEL NSA310
Hello, Andrew
> > +#define NSA310_GPIO_LED_ESATA_GREEN 12
> > <..>
> > +#define NSA310_GPIO_POWER_OFF 48
>
> It looks like most of these are not used. Please remove them.
True. Fixed.
> > +static struct mtd_partition nsa310_mtd_parts[] = {
> > + {
> > + .name = "uboot",
> > + .offset = 0,
> > + .size = 0x100000,
> > + .mask_flags = MTD_WRITEABLE,
> > + }, {
> > <..>
> You should be able to put all that into DT. Take a look at
Correct. I did the conversion and tested that the partitions
can be read with dd and produce exactly the same data before and
after conversion. So, the partition offsets at least should be fine.
> > +static struct i2c_board_info __initdata nsa310_i2c_info[] = {
> > + { I2C_BOARD_INFO("adt7476", 0x2e) },
> > +};
>
> You can also do this in DT as well. kirkwood-ts219.dtsi has
>
> i2c@11000 {
> status = "okay";
> clock-frequency = <400000>;
Ok, I did convert the i2c definition to use the devicetree.
The adt7476 device itself is not at reach of device tree,
AFAIK and requires more work at there?
Thanks for your valuable comments. Following is a new patch that
should address the problems and mistakes you pointed and also
some of the pointed by Jason Cooper. The nand and i2c are now
defined at DT and I also removed the pointless defines and
ARM_APPENDED_DTB. It is based against the Linus' official
3.6 version.
Best regards,
Tero
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-10-26 23:56:16 +08:00
|
|
|
#ifdef CONFIG_MACH_NSA310_DT
|
|
|
|
void nsa310_init(void);
|
|
|
|
#else
|
|
|
|
static inline void nsa310_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-11-13 15:43:09 +08:00
|
|
|
#ifdef CONFIG_MACH_OPENBLOCKS_A6_DT
|
|
|
|
void openblocks_a6_init(void);
|
|
|
|
#else
|
|
|
|
static inline void openblocks_a6_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-10-22 10:15:35 +08:00
|
|
|
#ifdef CONFIG_MACH_TOPKICK_DT
|
|
|
|
void usi_topkick_init(void);
|
|
|
|
#else
|
|
|
|
static inline void usi_topkick_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-03-15 08:52:31 +08:00
|
|
|
/* early init functions not converted to fdt yet */
|
2012-03-01 01:39:08 +08:00
|
|
|
char *kirkwood_id(void);
|
|
|
|
void kirkwood_l2_init(void);
|
|
|
|
void kirkwood_wdt_init(void);
|
|
|
|
void kirkwood_xor0_init(void);
|
|
|
|
void kirkwood_xor1_init(void);
|
|
|
|
void kirkwood_crypto_init(void);
|
|
|
|
|
2009-03-22 22:22:11 +08:00
|
|
|
extern int kirkwood_tclk;
|
[ARM] add Marvell Kirkwood (88F6000) SoC support
The Marvell Kirkwood (88F6000) is a family of ARM SoCs based on a
Shiva CPU core, and features a DDR2 controller, a x1 PCIe interface,
a USB 2.0 interface, a SPI controller, a crypto accelerator, a TS
interface, and IDMA/XOR engines, and depending on the model, also
features one or two Gigabit Ethernet interfaces, two SATA II
interfaces, one or two TWSI interfaces, one or two UARTs, a
TDM/SLIC interface, a NAND controller, an I2S/SPDIF interface, and
an SDIO interface.
This patch adds supports for the Marvell DB-88F6281-BP Development
Board and the RD-88F6192-NAS and the RD-88F6281 Reference Designs,
enabling support for the PCIe interface, the USB interface, the
ethernet interfaces, the SATA interfaces, the TWSI interfaces, the
UARTs, and the NAND controller.
Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-06-23 04:45:06 +08:00
|
|
|
extern struct sys_timer kirkwood_timer;
|
|
|
|
|
2009-06-02 03:36:36 +08:00
|
|
|
#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
|
[ARM] add Marvell Kirkwood (88F6000) SoC support
The Marvell Kirkwood (88F6000) is a family of ARM SoCs based on a
Shiva CPU core, and features a DDR2 controller, a x1 PCIe interface,
a USB 2.0 interface, a SPI controller, a crypto accelerator, a TS
interface, and IDMA/XOR engines, and depending on the model, also
features one or two Gigabit Ethernet interfaces, two SATA II
interfaces, one or two TWSI interfaces, one or two UARTs, a
TDM/SLIC interface, a NAND controller, an I2S/SPDIF interface, and
an SDIO interface.
This patch adds supports for the Marvell DB-88F6281-BP Development
Board and the RD-88F6192-NAS and the RD-88F6281 Reference Designs,
enabling support for the PCIe interface, the USB interface, the
ethernet interfaces, the SATA interfaces, the TWSI interfaces, the
UARTs, and the NAND controller.
Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-06-23 04:45:06 +08:00
|
|
|
|
|
|
|
#endif
|