9
0
Fork 0

ARM/Samsung: add the Tiny6410 platform as a user of the S3C6410 SoC

The Tiny6410 and its base board is a pure development platform.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Juergen Beisert 2012-07-28 17:10:50 +02:00 committed by Sascha Hauer
parent b36d795cf0
commit d65926656c
10 changed files with 336 additions and 0 deletions

View File

@ -124,6 +124,7 @@ board-$(CONFIG_MACH_FREESCALE_MX53_SMD) := freescale-mx53-smd
board-$(CONFIG_MACH_GUF_CUPID) := guf-cupid
board-$(CONFIG_MACH_MINI2440) := mini2440
board-$(CONFIG_MACH_MINI6410) := friendlyarm-mini6410
board-$(CONFIG_MACH_TINY6410) := friendlyarm-tiny6410
board-$(CONFIG_MACH_QIL_A9260) := qil-a9260
board-$(CONFIG_MACH_TNY_A9260) := tny-a926x
board-$(CONFIG_MACH_TNY_A9263) := tny-a926x

View File

@ -0,0 +1,19 @@
if MACH_TINY6410
choice
prompt "FriendlyARM Tiny6410 baseboard"
help
Since the Tiny6410 is a CPU card only, it requires a basebord to make
it work. Select here the baseboard Barebox should expect and
configure.
config MACH_TINY6410_FA
bool
select HAS_DM9000
prompt "FA development platform"
help
FriendlyARM's Tiny6410 evaluation board.
endchoice
endif

View File

@ -0,0 +1,3 @@
obj-y += tiny6410.o
obj-$(CONFIG_MACH_TINY6410_FA) += development-board.o

View File

@ -0,0 +1,8 @@
/* FriendlyARM Tiny6410 specific global settings */
#ifndef _TINY6410_CONFIG_H_
# define _TINY6410_CONFIG_H_
#define S3C64XX_CLOCK_REFERENCE 12000000
#endif /* _TINY6410_CONFIG_H_ */

View File

@ -0,0 +1,99 @@
/*
* Copyright (C) 2012 Juergen Beisert
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* The FriendlyARM's Tiny6410 evaluation board comes with all connectors and
* devices to make the Tiny6410 CPU card work. This includes:
*
* - the DM9000 network controller
* - USB/MCI connectors
* - display connector
*
*/
#include <common.h>
#include <driver.h>
#include <init.h>
#include <gpio.h>
#include <dm9000.h>
#include <mach/devices-s3c64xx.h>
#include <mach/s3c-generic.h>
#include "tiny6410.h"
/*
* dm9000 network controller onboard
* Connected to CS line 1 and interrupt line EINT7,
* data width is 16 bit
* Area 1: Offset 0x300...0x301
* Area 2: Offset 0x304...0x305
*/
static struct dm9000_platform_data dm9000_data = {
.srom = 0, /* no serial ROM for the ethernet address */
};
static const struct s3c6410_chipselect dm900_cs = {
.adr_setup_t = 0,
.access_setup_t = 0,
.access_t = 20,
.cs_hold_t = 3,
.adr_hold_t = 20, /* CS must be de-asserted for at least 20 ns */
.width = 16,
};
static void tiny6410evk_setup_dm9000_cs(void)
{
s3c6410_setup_chipselect(1, &dm900_cs);
}
static const unsigned tiny6410evk_pin_usage[] = {
/* UART1 (V24) */
GPA4_RXD1 | ENABLE_PU,
GPA5_TXD1,
GPA6_NCTS1 | ENABLE_PU,
GPA7_NRTS1,
/* UART2 (V24) */
GPB0_RXD2 | ENABLE_PU,
GPB1_TXD2,
/* UART3 (spare, 3,3 V TTL level only) */
GPB2_RXD3 | ENABLE_PU,
GPB3_TXD3,
};
static int tiny6410evk_devices_init(void)
{
int i;
/* init CPU card specific devices first */
tiny6410_init("FA EVK");
/* ----------- configure the access to the outer space ---------- */
for (i = 0; i < ARRAY_SIZE(tiny6410evk_pin_usage); i++)
s3c_gpio_mode(tiny6410evk_pin_usage[i]);
tiny6410evk_setup_dm9000_cs();
add_dm9000_device(0, S3C_CS1_BASE + 0x300, S3C_CS1_BASE + 0x304,
IORESOURCE_MEM_16BIT, &dm9000_data);
return 0;
}
device_initcall(tiny6410evk_devices_init);
static int tiny6410evk_console_init(void)
{
/* note: UART0 has no RTS/CTS connected */
s3c_gpio_mode(GPA0_RXD0 | ENABLE_PU);
s3c_gpio_mode(GPA1_TXD0);
s3c64xx_add_uart1();
return 0;
}
console_initcall(tiny6410evk_console_init);

View File

@ -0,0 +1,56 @@
#!/bin/sh
machine=tiny6410
eth0.serverip=a.b.c.d.e
user=
# use 'dhcp' to do dhcp in barebox and in kernel
# use 'none' if you want to skip kernel ip autoconfiguration
ip=dhcp
# or set your networking parameters here
#eth0.ipaddr=a.b.c.d.e
#eth0.netmask=a.b.c.d.e
#eth0.gateway=a.b.c.d.e
eth0.ethaddr=08:90:90:90:90:90
# can be either 'nfs', 'tftp' or 'nand'
kernel_loc=tftp
# can be either 'net', 'nand' or 'initrd'
rootfs_loc=net
# can be either 'jffs2' or 'ubifs'
rootfs_type=ubifs
rootfsimage=root-${machine}.${rootfs_type}
# The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo
kernelimage_type=zimage
kernelimage=zImage-${machine}
#kernelimage_type=uimage
#kernelimage=uImage-$machine
#kernelimage_type=raw
#kernelimage=Image-$machine
#kernelimage_type=raw_lzo
#kernelimage=Image-$machine.lzo
if [ -n $user ]; then
kernelimage="${user}"-"${kernelimage}"
nfsroot="${eth0.serverip}:/home/${user}/nfsroot/${machine}"
rootfsimage="${user}"-"${rootfsimage}"
else
nfsroot="${eth0.serverip}:/path/to/nfs/root"
fi
autoboot_timeout=3
#
# "tiny6410" kernel parameter
# 0 .. 9 = screen type
# i = touchscreen with propritary FriendlyARM protocol
# Note: can be "tiny6410= " if nothing of these components are connected
#
bootargs="console=ttySAC0,115200 tiny6410=0"
nand_device="nand"
nand_parts="256k(barebox),128k(bareboxenv),1536k(kernel),-(root)"
rootfs_mtdblock_nand=3

View File

@ -0,0 +1,80 @@
/*
* Copyright (C) 2012 Juergen Beisert
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <common.h>
#include <driver.h>
#include <init.h>
#include <gpio.h>
#include <generated/mach-types.h>
#include <asm/armlinux.h>
#include <mach/s3c-iomap.h>
#include <mach/s3c-generic.h>
static const unsigned tiny6410_pin_usage[] = {
/* UART0 */
GPA2_GPIO | GPIO_IN | ENABLE_PU, /* CTS not connected */
GPA3_GPIO | GPIO_IN | ENABLE_PU, /* RTS not connected */
/* local bus' D0 ... D15 are always active */
/* local bus' A0...A5 are always active */
/* internal NAND memory */
GPO0_NCS2, /* NAND's first chip select line */
/* NAND's second chip select line, not used */
GPO1_GPIO | GPIO_OUT | GPIO_VAL(1),
GPP3_FALE,
GPP4_FCLE,
GPP5_FWE,
GPP6_FRE,
GPP7_RNB, /* external pull-up */
GPF13_GPIO | GPIO_OUT | GPIO_VAL(0), /* OTG power supply, 0 = off */
/* nowhere connected */
GPO2_GPIO | GPIO_IN | ENABLE_PU,
GPO3_GPIO | GPIO_IN | ENABLE_PU,
GPO4_GPIO | GPIO_IN | ENABLE_PU,
GPO5_GPIO | GPIO_IN | ENABLE_PU,
/* local bus address lines 6...15 are nowhere connected */
GPO6_GPIO | GPIO_IN | ENABLE_PU,
GPO7_GPIO | GPIO_IN | ENABLE_PU,
GPO8_GPIO | GPIO_IN | ENABLE_PU,
GPO9_GPIO | GPIO_IN | ENABLE_PU,
GPO10_GPIO | GPIO_IN | ENABLE_PU,
GPO11_GPIO | GPIO_IN | ENABLE_PU,
GPO12_GPIO | GPIO_IN | ENABLE_PU,
GPO13_GPIO | GPIO_IN | ENABLE_PU,
GPO14_GPIO | GPIO_IN | ENABLE_PU,
GPO15_GPIO | GPIO_IN | ENABLE_PU,
};
static int tiny6410_mem_init(void)
{
arm_add_mem_device("ram0", S3C_SDRAM_BASE, s3c6410_get_memory_size());
return 0;
}
mem_initcall(tiny6410_mem_init);
void tiny6410_init(const char *bb_name)
{
int i;
/* ----------- configure the access to the outer space ---------- */
for (i = 0; i < ARRAY_SIZE(tiny6410_pin_usage); i++)
s3c_gpio_mode(tiny6410_pin_usage[i]);
armlinux_set_bootparams((void *)S3C_SDRAM_BASE + 0x100);
armlinux_set_architecture(MACH_TYPE_TINY6410);
}

View File

@ -0,0 +1,14 @@
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
/* to be called by the base board */
void tiny6410_init(const char*);

View File

@ -0,0 +1,41 @@
CONFIG_ARCH_S3C64xx=y
CONFIG_MACH_TINY6410=y
CONFIG_AEABI=y
CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
CONFIG_BROKEN=y
CONFIG_PROMPT="tiny6410:"
CONFIG_LONGHELP=y
CONFIG_GLOB=y
CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y
CONFIG_PARTITION=y
CONFIG_PARTITION_DISK=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/friendlyarm-tiny6410/env"
CONFIG_DEBUG_INFO=y
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
CONFIG_CMD_EXPORT=y
CONFIG_CMD_PRINTENV=y
CONFIG_CMD_READLINE=y
CONFIG_CMD_MEMINFO=y
CONFIG_CMD_MTEST=y
CONFIG_CMD_BOOTM_SHOW_TYPE=y
CONFIG_CMD_RESET=y
CONFIG_CMD_GO=y
CONFIG_CMD_TIMEOUT=y
CONFIG_CMD_PARTITION=y
CONFIG_CMD_MAGICVAR=y
CONFIG_CMD_MAGICVAR_HELP=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_UNCOMPRESS=y
CONFIG_NET=y
CONFIG_NET_DHCP=y
CONFIG_NET_PING=y
CONFIG_NET_TFTP=y
CONFIG_DRIVER_NET_DM9K=y
# CONFIG_SPI is not set
CONFIG_ZLIB=y
CONFIG_BZLIB=y
CONFIG_LZO_DECOMPRESS=y

View File

@ -7,12 +7,14 @@ config ARCH_TEXT_BASE
hex
default 0x31fc0000 if MACH_MINI2440
default 0x57fc0000 if MACH_MINI6410
default 0x57fc0000 if MACH_TINY6410
default 0x31fc0000 if MACH_A9M2440
default 0x31fc0000 if MACH_A9M2410
config BOARDINFO
default "Mini 2440" if MACH_MINI2440
default "Mini 6410" if MACH_MINI6410
default "Tiny 6410" if MACH_TINY6410
default "Digi A9M2440" if MACH_A9M2440
default "Digi A9M2410" if MACH_A9M2410
@ -105,8 +107,21 @@ config MACH_MINI6410
Say Y here if you are using FriendlyARM Mini6410 board equipped
with a Samsung S3C6410 Processor
config MACH_TINY6410
bool "Tiny 6410"
select CPU_S3C6410
help
Say Y here if you are using FriendlyARM Tiny6410 CPU card equipped
with a Samsung S3C6410 Processor
endchoice
menu "Board specific settings "
source arch/arm/boards/friendlyarm-tiny6410/Kconfig
endmenu
endif
if ARCH_S5PCxx