[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-22 20:45:06 +00: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 14:23:48 +00: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-22 20:45:06 +00:00
|
|
|
struct mv643xx_eth_platform_data;
|
|
|
|
struct mv_sata_platform_data;
|
2009-02-14 08:15:55 +00:00
|
|
|
struct mvsdio_platform_data;
|
2009-06-01 19:36:36 +00:00
|
|
|
struct mtd_partition;
|
2010-04-20 09:26:19 +00:00
|
|
|
struct mtd_info;
|
2010-05-31 11:49:12 +00: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-22 20:45:06 +00:00
|
|
|
|
2010-06-08 11:21:34 +00: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-22 20:45:06 +00:00
|
|
|
/*
|
|
|
|
* Basic Kirkwood init functions used early by machine-setup.
|
|
|
|
*/
|
|
|
|
void kirkwood_map_io(void);
|
|
|
|
void kirkwood_init(void);
|
2010-10-15 14:50:26 +00: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-22 20:45:06 +00:00
|
|
|
void kirkwood_init_irq(void);
|
|
|
|
|
|
|
|
void kirkwood_setup_cpu_mbus(void);
|
|
|
|
|
2011-02-02 22:16:10 +00:00
|
|
|
void kirkwood_enable_pcie(void);
|
2008-09-15 07:40:35 +00: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-22 20:45:06 +00:00
|
|
|
void kirkwood_ehci_init(void);
|
|
|
|
void kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data);
|
2008-10-19 21:10:14 +00:00
|
|
|
void kirkwood_ge01_init(struct mv643xx_eth_platform_data *eth_data);
|
2008-09-25 14:23:48 +00:00
|
|
|
void kirkwood_ge00_switch_init(struct dsa_platform_data *d, int irq);
|
2010-06-08 11:21:34 +00: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-22 20:45:06 +00:00
|
|
|
void kirkwood_sata_init(struct mv_sata_platform_data *sata_data);
|
2009-02-14 08:15:55 +00:00
|
|
|
void kirkwood_sdio_init(struct mvsdio_platform_data *mvsdio_data);
|
2008-08-09 13:38:18 +00:00
|
|
|
void kirkwood_spi_init(void);
|
2009-03-23 18:13:21 +00: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-22 20:45:06 +00:00
|
|
|
void kirkwood_uart0_init(void);
|
|
|
|
void kirkwood_uart1_init(void);
|
2009-06-01 19:36:36 +00:00
|
|
|
void kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, int delay);
|
2012-10-20 11:23:16 +00:00
|
|
|
void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts,
|
|
|
|
int (*dev_ready)(struct mtd_info *));
|
2010-05-31 11:49:12 +00:00
|
|
|
void kirkwood_audio_init(void);
|
2013-01-09 12:22:15 +00:00
|
|
|
void kirkwood_cpuidle_init(void);
|
2011-11-05 10:03:47 +00:00
|
|
|
void kirkwood_restart(char, const char *);
|
2011-12-15 07:15:07 +00: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-22 20:45:06 +00:00
|
|
|
|
2012-03-15 00:52:31 +00: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 12:57:59 +00: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 00:52:31 +00:00
|
|
|
|
2012-04-18 10:06:40 +00:00
|
|
|
#ifdef CONFIG_MACH_DLINK_KIRKWOOD_DT
|
|
|
|
void dnskw_init(void);
|
|
|
|
#else
|
|
|
|
static inline void dnskw_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-04-18 21:16:41 +00:00
|
|
|
#ifdef CONFIG_MACH_ICONNECT_DT
|
|
|
|
void iconnect_init(void);
|
|
|
|
#else
|
|
|
|
static inline void iconnect_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-04-30 21:55:17 +00:00
|
|
|
#ifdef CONFIG_MACH_IB62X0_DT
|
|
|
|
void ib62x0_init(void);
|
|
|
|
#else
|
|
|
|
static inline void ib62x0_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-08-14 20:43:41 +00:00
|
|
|
#ifdef CONFIG_MACH_DOCKSTAR_DT
|
|
|
|
void dockstar_dt_init(void);
|
|
|
|
#else
|
|
|
|
static inline void dockstar_dt_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-07-16 09:52:50 +00:00
|
|
|
#ifdef CONFIG_MACH_GOFLEXNET_DT
|
|
|
|
void goflexnet_init(void);
|
|
|
|
#else
|
|
|
|
static inline void goflexnet_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-07-17 05:25:55 +00:00
|
|
|
#ifdef CONFIG_MACH_LSXL_DT
|
|
|
|
void lsxl_init(void);
|
|
|
|
#else
|
|
|
|
static inline void lsxl_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-08-20 14:29:07 +00: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 09:55:02 +00:00
|
|
|
#ifdef CONFIG_MACH_KM_KIRKWOOD_DT
|
|
|
|
void km_kirkwood_init(void);
|
|
|
|
#else
|
|
|
|
static inline void km_kirkwood_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-11-18 15:46:16 +00:00
|
|
|
#ifdef CONFIG_MACH_MPLCEC4_DT
|
|
|
|
void mplcec4_init(void);
|
|
|
|
#else
|
|
|
|
static inline void mplcec4_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-10-17 10:09:04 +00:00
|
|
|
#if defined(CONFIG_MACH_INETSPACE_V2_DT) || \
|
|
|
|
defined(CONFIG_MACH_NETSPACE_V2_DT) || \
|
2012-10-17 10:09:05 +00:00
|
|
|
defined(CONFIG_MACH_NETSPACE_MAX_V2_DT) || \
|
2012-10-17 10:09:06 +00:00
|
|
|
defined(CONFIG_MACH_NETSPACE_LITE_V2_DT) || \
|
|
|
|
defined(CONFIG_MACH_NETSPACE_MINI_V2_DT)
|
2012-10-17 10:09:04 +00: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 15:56:16 +00:00
|
|
|
#ifdef CONFIG_MACH_NSA310_DT
|
|
|
|
void nsa310_init(void);
|
|
|
|
#else
|
|
|
|
static inline void nsa310_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-11-13 07:43:09 +00:00
|
|
|
#ifdef CONFIG_MACH_OPENBLOCKS_A6_DT
|
|
|
|
void openblocks_a6_init(void);
|
|
|
|
#else
|
|
|
|
static inline void openblocks_a6_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-10-22 02:15:35 +00:00
|
|
|
#ifdef CONFIG_MACH_TOPKICK_DT
|
|
|
|
void usi_topkick_init(void);
|
|
|
|
#else
|
|
|
|
static inline void usi_topkick_init(void) {};
|
|
|
|
#endif
|
|
|
|
|
2012-03-15 00:52:31 +00:00
|
|
|
/* early init functions not converted to fdt yet */
|
2012-02-29 17:39:08 +00: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 14:22:11 +00:00
|
|
|
extern int kirkwood_tclk;
|
2012-11-08 19:40:59 +00:00
|
|
|
extern void kirkwood_timer_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-22 20:45:06 +00:00
|
|
|
|
2009-06-01 19:36:36 +00: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-22 20:45:06 +00:00
|
|
|
|
|
|
|
#endif
|