[U-Boot] U-BOOT porting to PORTUX 920T

2010-03-13 Thread Luca Lazzarin
Hi all!
This is the "latest" version of our porting to Taskit PORTUX 920T mini-pc.

Thank to Achim Ehrlich - we got all we needed working! Timing has been set
to s$
Basically - we have seen:
- dataflash working
- usb transfers ok
- environment

We should test other hardware - hoping to get feedback, at least from
Taskit!

Thank to all the people helped us!

Motherboard config settings:
portux920t.h:
-
/*
 * Enrico Mioso & Luca Lazzarin - u-boot sub-porting for Taskit Portux 920T!
 * Derived from work made by Ulf Samuelsson  and Rick Bronson
 * (at91rm9200ek port)
 *
 * Configuration settings for the PORTUX920t mini-pc board.
 *
 *
 * 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.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 * MA 02111-1307 USA
 */

#ifndef __CONFIG_H
#define __CONFIG_H

/* ARM asynchronous clock */
/*
 * from 18.432 MHz crystal
 * (18432000 / 4 * 39)
 */
#define AT91C_MAIN_CLOCK 179712000
/*
 * peripheral clock
 * (AT91C_MASTER_CLOCK / 3)
 */
#define AT91C_MASTER_CLOCK 59904000

#define AT91_SLOW_CLOCK 32768 /* slow clock */

#define CONFIG_ARM920T 1 /* This is an ARM920T Core */
#define CONFIG_AT91RM9200 1 /* It's an Atmel AT91RM9200 SoC */
#define CONFIG_AT91RM9200EK 1 /* on an AT91RM9200EK Board */
#undef  CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
#define USE_920T_MMU 1
/*
  Those following defines are needed to support latest kernel - don't
  bother...
*/
#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
#define CONFIG_SETUP_MEMORY_TAGS 1
#define CONFIG_INITRD_TAG 1 /* and remember to "mkimage" initrd */

/*
 * LowLevel Init
 */
#ifndef CONFIG_SKIP_LOWLEVEL_INIT
#define CONFIG_SYS_USE_MAIN_OSCILLATOR 1
/* flash */
#define CONFIG_SYS_EBI_CFGR_VAL 0x
#define CONFIG_SYS_SMC_CSR0_VAL 0x3286 /* 16bit, 2 TDF, 4 WS ?? */

/* clocks */
#define CONFIG_SYS_PLLAR_VAL 0x20263E04 /* 179.712000 MHz for PCK */
#define CONFIG_SYS_PLLBR_VAL 0x10483E0E /* 48.054857 MHz (divider by 2 for
USB) */
/* PCK/3 = MCK Master Clock = 59.904000MHz from PLLA */
#define CONFIG_SYS_MCKR_VAL 0x0202

/* sdram */
#define CONFIG_SYS_PIOC_ASR_VAL 0x /* Configure PIOC as peripheral
(D16/D31) */
#define CONFIG_SYS_PIOC_BSR_VAL 0x
#define CONFIG_SYS_PIOC_PDR_VAL 0x
#define CONFIG_SYS_EBI_CSA_VAL 0x0002 /* CS1=CONFIG_SYS_SDRAM */
/* and here - the "secret" of this port... */
#define CONFIG_SYS_SDRC_CR_VAL 0x21914159 /* set up the CONFIG_SYS_SDRAM */
#define CONFIG_SYS_SDRAM 0x2000 /* address of the CONFIG_SYS_SDRAM */
#define CONFIG_SYS_SDRAM1 0x2080 /* address of the CONFIG_SYS_SDRAM */
#define CONFIG_SYS_SDRAM_VAL 0x /* value written to CONFIG_SYS_SDRAM
*/
#define CONFIG_SYS_SDRC_MR_VAL 0x0002 /* Precharge All */
#define CONFIG_SYS_SDRC_MR_VAL1 0x0004 /* refresh */
#define CONFIG_SYS_SDRC_MR_VAL2 0x0003 /* Load Mode Register */
#define CONFIG_SYS_SDRC_MR_VAL3 0x /* Normal Mode */
#define CONFIG_SYS_SDRC_TR_VAL 0x02E0 /* Write refresh rate */
#else
#define CONFIG_SKIP_RELOCATE_UBOOT
#endif /* CONFIG_SKIP_LOWLEVEL_INIT */

/* hardcode so no __divsi3 : AT91C_MASTER_CLOCK / baudrate / 16 */
#define CONFIG_SYS_AT91C_BRGR_DIVISOR 33

/*
 * Memory Configuration
 */
#define CONFIG_NR_DRAM_BANKS 2
#define PHYS_SDRAM 0x2000
#define PHYS_SDRAM_SIZE 0x0400 /* 64 megs */

#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM
#define CONFIG_SYS_MEMTEST_END \
 (CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - 262144)

/*
 * Hardware drivers
 */

/*
 * UART Configuration
 *
 * define one of these to choose the DBGU,
 * USART0 or USART1 as console
 */
#define CONFIG_AT91RM9200_USART
#define CONFIG_DBGU
#undef CONFIG_USART0
#undef CONFIG_USART1
/* don't include RTS/CTS flow control support */
#undef CONFIG_HWFLOW
/* disable modem initialization stuff */
#undef CONFIG_MODEM_SUPPORT

#define CONFIG_SYS_BAUDRATE_TABLE {115200 , 19200, 38400, 57600, 9600 }
#define CONFIG_BAUDRATE 115200

/*
 * Command line configuration.
 */
#include 
#include "ourboard.h"
/* let our new include file decide about this */
#define CONFIG_CMD_DHCP
#define CONFIG_CMD_FAT
#define CONFIG_CMD_MII
#define CONFIG_CMD_PING
/* holds on... */
#undef CONFIG_CMD_BDI /* see below */
#define CONFIG_CMD_IMI
#undef CONFIG_CMD_FPGA
#define CONFIG_CMD_MISC
#define CONFIG_CMD_LOADS

 #include  /* needed for port definitions */
/* Options for MMC/SD

Re: [U-Boot] U-BOOT porting to PORTUX 920T

2010-03-13 Thread Wolfgang Denk
Dear Luca Lazzarin,

In message  you 
wrote:
>
> This is the "latest" version of our porting to Taskit PORTUX 920T mini-pc.

Please do not post some random files here. If you want to contribute
to the projet, then please read the instructions and post a proper
patch. Make sure to clean up your code so it meets Coding Style
requirements etc. Please see here for instructions:

http://www.denx.de/wiki/U-Boot/CodingStyle
http://www.denx.de/wiki/U-Boot/Patches

Thanks.


Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
[Braddock:] Mr. Churchill, you are drunk.
[Churchill:] And you madam, are ugly.  But I shall be sober tomorrow.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] U-BOOT porting to PORTUX 920T

2010-03-16 Thread Achim Ehrlich
Hello Luca,

> 
> Thank to Achim Ehrlich - we got all we needed working! Timing has been 
> set to s$
> Basically - we have seen:
> - dataflash working
> - usb transfers ok  
> - environment
> 
> We should test other hardware - hoping to get feedback, at least from 
> Taskit!
> 

Nice to hear, that things are working now for you. Testing your changes is not 
so easy, as you didn't provide a proper patch to apply (and especially with 
which tree are you working?).

Do you have any intention to post your board file to the mailing list, when it 
is ready? I guess it is not.

Kind regards

Achim

-- 
product manager

email:aehrl...@taskit.de 
Tel.: ++49 30 611295-25
Fax: ++49 30 611295-11

--
taskit GmbH
Seelenbinderstr. 33 | D-12555 Berlin
web:http://www.taskit.de
Amtsgericht Charlottenburg: 93HRB39014
Managing director: Thorsten Raulfs
--
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot