Skip to contentSkip to conversation

Motorola i.MX support (1/2)

PATCH New Sascha Hauer 6 participants 18 messages Jun 17, 2004 – Jun 23, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Motorola i.MX support (1/2)

Hello List,

These patches add Motorola MM1 support for U-boot. The patches are against U-boot-1.1.1 and add support for two custom boards and the Davicom dm9000 ethernet chip.

All comments and feedback welcome,

Sascha Hauer

patch-u-boot-1.1.1-imx.bz2 - Motorola MX1 support
patch-u-boot-1.1.1-mx1fs2.bz2 - mx1fs2 board support patch-u-boot-1.1.1-scb9328.bz2 - scb9328 board support patch-u-boot-1.1.1-dm9000.bz2 - dm9000 network driver support (used in
scb9328)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-u-boot-1.1.1-imx.bz2
Type: application/octet-stream
Size: 12124 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20040617/dbdb413e/attachment.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-u-boot-1.1.1-mx1fs2.bz2
Type: application/octet-stream
Size: 13165 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20040617/dbdb413e/attachment-0001.obj

#1 lore raw

PATCH 1/1 Motorola i.MX support (1/2)

Quoted 5 lines · Sascha Hauer

Hello List,

These patches add Motorola MM1 support for U-boot. The patches are against U-boot-1.1.1 and add support for two custom boards and the Davicom dm9000 ethernet chip.

Looks like there are at least three (!) ports for Motorola's DragonBall i.MX (MC9328MX1/L) now:

1.) Ming-Len Wu <[email protected]>
already in CVS without (announcing on the list)
2.) Sascha Hauer <[email protected]>

	posted on 2004-06-17
3.) Bryan Larsen <[email protected]>
	mentioned on list on 2003-09-19

Is that correct, Wolfgang?

Steven

#2 lore raw

PATCH 1/1 Motorola i.MX support (1/2)

Dear Steven,

Quoted 4 lines · in message <[email protected]> you wrote:
Quoted 4 lines

These patches add Motorola MM1 support for U-boot. The patches are against U-boot-1.1.1 and add support for two custom boards and the Davicom dm9000 ethernet chip.

[I didn't check these patyches yet; I just put them on my stack ;-) ]

Quoted 5 lines

Looks like there are at least three (!) ports for Motorola's DragonBall i.MX (MC9328MX1/L) now:

1.) Ming-Len Wu <[email protected]>
already in CVS without (announcing on the list)

Correct. Checked in some time ago.

Quoted 2 lines

2.) Sascha Hauer <[email protected]>

	posted on 2004-06-17

Sasha, I think it makes sense that you check what's in the CVS first. Then let's discuss how to proceed. I think for now I will just put your patches on hold, as they seem obsoleted by the current code in CVS (sorry, but this is why ESR says "release early, release often").

Quoted 2 lines

3.) Bryan Larsen <[email protected]>

	mentioned on list on 2003-09-19

But I haven't seen any actual code from him, AFAICT.

Quoted 1 line

Is that correct, Wolfgang?

Yes, it is.

Best regards,

Wolfgang Denk

Signature · 3 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Intel told us the Pentium would have "RISK" features...
#3 lore raw

PATCH 1/1 Motorola i.MX support (1/2)

Quoted 1 line · Wolfgang Denk

[I didn't check these patyches yet; I just put them on my stack ;-) ]

You should ;)

Quoted 4 lines

Sasha, I think it makes sense that you check what's in the CVS first. Then let's discuss how to proceed. I think for now I will just put your patches on hold, as they seem obsoleted by the current code in CVS (sorry, but this is why ESR says "release early, release often").

The design in CVS is crap. i.MX is not a separate CPU architecture, it is just ARM920T. There is no reason for a new directory in cpu/.

Robert

Signature · 5 lines
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hornemannstra?e 12,  31137 Hildesheim, Germany
    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4
#4 lore raw

PATCH 1/1 Motorola i.MX support (1/2)

Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 2 lines

[I didn't check these patyches yet; I just put them on my stack ;-) ]

You should ;)

I will. As time permits.

Quoted 2 lines

The design in CVS is crap. i.MX is not a separate CPU architecture, it is just ARM920T. There is no reason for a new directory in cpu/.

Maybe you want to submit a patch to clean this up (after negotiating with the current maintainer, of course) ?

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
There's another way to survive.  Mutual trust -- and help.
	-- Kirk, "Day of the Dove", stardate unknown
#5 lore raw

PATCH 1/1 Motorola i.MX support (1/2)

Quoted 2 lines · Wolfgang Denk

Maybe you want to submit a patch to clean this up (after negotiating with the current maintainer, of course) ?

Well, Sascha's patch was our attempt to clean it up ;)

Robert

Signature · 5 lines
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hornemannstra?e 12,  31137 Hildesheim, Germany
    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4
#6 lore raw

PATCH 1/1 Motorola i.MX support (1/2)

Quoted 2 lines · In message <[email protected]> you wrote:

Well, Sascha's patch was our attempt to clean it up ;)

But AFAICT they are against an OLD version of U-Boot, which did not yet include Ming-Len Wu's patches.

So what is your suggestion?

We can:

(1) add your patch
(2) add your patch and revert Ming-Len Wu's patch
(3) use Ming-Len Wu's code as base for which you submit fixes/improvements

(1) means that we have the same architecture / board supported twice differently. Not good. rejected.

#7 lore raw

PATCH 1/1 Motorola i.MX support (1/2)

I've just had a look at the i.MX (MC9328 MX1, or however this thing is called) Port in current CVS. The main differences are:

- Like Robert said, my patch introduces less duplication of code
- the serial driver in CVS supports only a fixed (hardcoded) baudrate
- the architecture include file from cvs only has register definitions while my port also has bitmasks for most registers as well as a convenience function imx_gpio_mode which lets you set the gpio primary/alternate functions without having to play with hex values.
- different boards supported. Two custom boards <-> MX1ADS. Adding support for MX1ADS should be no problem, though, since we only have to rewrite some register definitions. Unfortunately I don't have the hardware.

Quoted 7 lines · Wolfgang Denk
Quoted 2 lines · In message <[email protected]> you wrote:

Well, Sascha's patch was our attempt to clean it up ;)

But AFAICT they are against an OLD version of U-Boot, which did not yet include Ming-Len Wu's patches.

No problem, I can send a patch against current CVS.

Quoted 12 lines

So what is your suggestion?

We can:

(1) add your patch
(2) add your patch and revert Ming-Len Wu's patch
(3) use Ming-Len Wu's code as base for which you submit fixes/improvements

(1) means that we have the same architecture / board supported twice differently. Not good. rejected.

Quoted 1 line

From your posting it seems clear that your position is (2) [is it?];

So I would prefer position (2), too.

Greetings

Sascha Hauer

#8 lore raw

PATCH 1/1 Motorola i.MX support (1/2)

Hi,

Quoted 2 lines · Sascha Hauer

I've just had a look at the i.MX (MC9328 MX1, or however this thing is called) Port in current CVS. The main differences are:

I would prefer imx for the architecture - it's i.MX, not only MC9328 or even MX1.

Quoted 4 lines

- different boards supported. Two custom boards <-> MX1ADS. Adding support for MX1ADS should be no problem, though, since we only have to rewrite some register definitions. Unfortunately I don't have the hardware.

Having support for the ADS would definitely a Good Thing (TM).

Quoted 10 lines
Quoted 8 lines

(1) add your patch
(2) add your patch and revert Ming-Len Wu's patch
(3) use Ming-Len Wu's code as base for which you submit fixes/improvements

(1) means that we have the same architecture / board supported twice differently. Not good. rejected.

Quoted 1 line

From your posting it seems clear that your position is (2) [is it?];

So I would prefer position (2), too.

I would prefer to do (2) with a little bit of (3) ;) It shouldn't be too much work to port Mng-Len Wu's port to the more generic variant.

Robert

Signature · 5 lines
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hornemannstra?e 12,  31137 Hildesheim, Germany
    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4
#9 lore raw

PATCH 1/1 Motorola i.MX support (1/2)

Quoted 2 lines · Robert Schwebel

Having support for the ADS would definitely a Good Thing (TM).

I just got a mail from Ming-Len Wu. He will have a look at our code so we can get the pieces together.

Sascha

#10 lore raw

PATCH 1/1 Motorola i.MX support (1/2)

In reply to Robert Schwebel
Quoted 10 lines · Robert Schwebel

Hi,

Quoted 2 lines · Sascha Hauer

I've just had a look at the i.MX (MC9328 MX1, or however this thing is called) Port in current CVS. The main differences are:

I would prefer imx for the architecture - it's i.MX, not only MC9328 or even MX1.

How do you seperate the MX1 from the MXL?
Maybe it's not neccessary for U-Boot. We will hardly support the BlueTooth stuff in U-Boot... On the other hand the MX1 got one more UART...

BTW: Does anyone got a working BDI2000 config file for the MC9328MX1/L? I want to be able to burn the flash when we got the ADS board...

Thanks a million!

Signature · 1 line
Steven Scholz
#11 lore raw

PATCH 1/1 Motorola i.MX support (1/2)

Quoted 3 lines · In message <[email protected]> you wrote:

Maybe it's not neccessary for U-Boot. We will hardly support the BlueTooth stuff in U-Boot... On the other hand the MX1 got one more UART...

Don't count on that. We have funny things in U-Boot - like VLAN support or a console over USB on a mobile phone...

Best regards,

Wolfgang Denk

Signature · 6 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
I distrust all systematisers, and avoid them. The will  to  a  system
shows a lack of honesty.
- Friedrich Wilhelm Nietzsche _G?tzen-D?mmerung [The Twilight of  the
Idols]_ ``Maxims and Missiles'' no. 26
#12 lore raw

PATCH 1/1 Motorola i.MX support (1/2)

In reply to Steven Scholz
Quoted 11 lines
Quoted 8 lines · Robert Schwebel

Hi,

Quoted 2 lines · Sascha Hauer

I've just had a look at the i.MX (MC9328 MX1, or however this thing is called) Port in current CVS. The main differences are:

I would prefer imx for the architecture - it's i.MX, not only MC9328 or even MX1.

Quoted 8 lines

How do you seperate the MX1 from the MXL?
Maybe it's not neccessary for U-Boot. We will hardly support the BlueTooth stuff in U-Boot... On the other hand the MX1 got one more UART...

BTW: Does anyone got a working BDI2000 config file for the MC9328MX1/L? I want to be able to burn the flash when we got the ADS board...

Thanks a million!

Hi Steven,

I have a M9328MXLADS 2.0 board right on my desktop.
If the time permits, I'll be able to give some help about testing the code in the next weeks.

Regards,

llandre

DAVE Electronics System House - R&D Department
www.dave-tech.it

#13 lore raw

PATCH 1/1 Motorola i.MX support (1/2)

In reply to Steven Scholz
Quoted 3 lines · Steven Scholz

How do you seperate the MX1 from the MXL? Maybe it's not neccessary for U-Boot. We will hardly support the BlueTooth stuff in U-Boot... On the other hand the MX1 got one more UART...

... which has the same register layout (well, at least that ones you need in u-boot) as the other ones. The basic serial support in cpu/arm920t/imx_serial.c (well, not exactly a good place for a serial driver, but that's how it was done for the other ports) can easily be extended to support more than two serial ports.

Quoted 3 lines

BTW: Does anyone got a working BDI2000 config file for the MC9328MX1/L? I want to be able to burn the flash when we got the ADS board...

Attached. I'm not sure about the memory situation on the ADS board, our board has 32 Bit flash.

Robert

Signature · 79 lines
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hornemannstra?e 12,  31137 Hildesheim, Germany
    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4
-------------- next part --------------
; bdiGDB configuration for Motorola M9328MX1ADS board
; ---------------------------------------------------
;
[INIT]
;
; Initialize DragonBall MX1 ADS Rev 0.1 board when using JTAG
; so SRAM and SDRAM are downloadable
;
WM32    0x0021b000  0x2f00ac03	;Select CLKO mux to output HCLK(BCLK)
WM32    0x0021b000  0x2f008403  ;48MHz System Clock
WM32    0x00220000  0x00008C00  ;CS0 - boot flash, 32 wait states, 8-bit
WM32    0x00220004  0x22222601
WM32    0x00220008  0x00000a00  ;CS1 - SRAM, 10 wait states, 32-bit
WM32    0x0022000c  0x11110601
WM32    0x00220020  0x00000a00  ;CS4 - External UART, 10 wait states, 8-bit
WM32    0x00220024  0x11110301
;
;Init SDRAM 16Mx16x2 IAM0 CS2 CL2
;
WM32    0x00221000  0x92120200  ;Set Precharge Command
WM32    0x08200000  0x00000000  ;Issue Precharge all Command
WM32    0x00221000  0xa2120200  ;Set AutoRefresh Command
WM32    0x08000000  0x00000000  ;Issue AutoRefresh Command
WM32    0x08000000  0x00000000
WM32    0x08000000  0x00000000
WM32    0x08000000  0x00000000
WM32    0x08000000  0x00000000
WM32    0x08000000  0x00000000
WM32    0x08000000  0x00000000
WM32    0x08000000  0x00000000
WM32    0x00221000  0xb2120200  ;Set Mode Register
WM32    0x08111800  0x00000000  ;Issue Mode Register Command, Burst Length = 8
WM32    0x00221000  0x82124200  ;Set to Normal Mode
;

[TARGET]
CPUTYPE     ARM920T
CLOCK       1                   ;JTAG clock
WAKEUP      750                ;because of slow rising reset line
RESET       HARD 100               ;beause of heavy capacitive load on reset line
TRST        PUSHPULL
ENDIAN      LITTLE              ;memory model (LITTLE | BIG)
BREAKMODE   SOFT 0xDFFFDFFF     ;SOFT or HARD, ARM / Thumb break code
;VECTOR      CATCH 0x1f          ;catch D_Abort, P_Abort, SWI, Undef and Reset
SIO         7 115200            ;Enable SIO via TCP port 7 at 115200
;DCC         7                   ;TCP port for DCC I/O


[HOST]
IP          213.252.143.162
FORMAT      BIN
LOAD        MANUAL

[FLASH]
CHIPTYPE    AM29F               ; Flash type
CHIPSIZE    0x800000            ; The size of one flash chip in bytes
BUSWIDTH    32			; The width of the flash memory bus in bits (8 | 16 | 32)
FORMAT      BIN 0x10060000	; Binary, to be flashed to 0x1006'0000
FILE        Image		; which file to flash if no name is given to 'prog'
WORKSPACE   0x09FFF000
ERASE       0x10060000		; Erase space for kernel
ERASE       0x10080000
ERASE       0x100A0000
ERASE       0x100C0000
ERASE       0x100E0000
ERASE       0x10100000
ERASE       0x10120000
ERASE       0x10140000
ERASE       0x10160000
ERASE       0x10180000
ERASE       0x101A0000
ERASE       0x101C0000
ERASE       0x101E0000
#14 lore raw

PATCH 1/1 Motorola i.MX support (1/2)

Quoted 10 lines · Robert Schwebel
Quoted 3 lines · Steven Scholz

How do you seperate the MX1 from the MXL? Maybe it's not neccessary for U-Boot. We will hardly support the BlueTooth stuff in U-Boot... On the other hand the MX1 got one more UART...

... which has the same register layout (well, at least that ones you need in u-boot) as the other ones. The basic serial support in cpu/arm920t/imx_serial.c (well, not exactly a good place for a serial driver, but that's how it was done for the other ports)...

Bad excuse for doing the same bad thing... ;-)

But where would be a goog place to store such code?
The same goes for the serial driver of the AT91RM9200 (which is ARM9 too). Wolfgang?

Quoted 4 lines
Quoted 4 lines

BTW: Does anyone got a working BDI2000 config file for the MC9328MX1/L? I want to be able to burn the flash when we got the ADS board...

Thanks a million for the config. I'll test it with the ADS as soon as we get it.

Steven

#15 lore raw

PATCH 1/1 Motorola i.MX support (1/2)

Quoted 4 lines · Steven Scholz

Bad excuse for doing the same bad thing... ;-)

But where would be a goog place to store such code? The same goes for the serial driver of the AT91RM9200 (which is ARM9 too).

It would probably belong into something like drivers/serial. The question is what else had to be changed when we do something like this.

Robert

Signature · 5 lines
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hornemannstra?e 12,  31137 Hildesheim, Germany
    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4
#16 lore raw

PATCH 1/1 Motorola i.MX support (1/2)

In reply to Sascha Hauer
Quoted 13 lines · Sascha Hauer

I've just had a look at the i.MX (MC9328 MX1, or however this thing is called) Port in current CVS. The main differences are:

- Like Robert said, my patch introduces less duplication of code
- the serial driver in CVS supports only a fixed (hardcoded) baudrate
- the architecture include file from cvs only has register definitions while my port also has bitmasks for most registers as well as a convenience function imx_gpio_mode which lets you set the gpio primary/alternate functions without having to play with hex values.
- different boards supported. Two custom boards <-> MX1ADS. Adding support for MX1ADS should be no problem, though, since we only have to rewrite some register definitions. Unfortunately I don't have the hardware.

We will have one in the next few days. I'd love to help testing it.

Steven

#17 lore raw

PATCH 1/1 Motorola i.MX support (1/2)

Quoted 17 lines · Steven Scholz
Quoted 13 lines · Sascha Hauer

I've just had a look at the i.MX (MC9328 MX1, or however this thing is called) Port in current CVS. The main differences are:

- Like Robert said, my patch introduces less duplication of code
- the serial driver in CVS supports only a fixed (hardcoded) baudrate
- the architecture include file from cvs only has register definitions while my port also has bitmasks for most registers as well as a convenience function imx_gpio_mode which lets you set the gpio primary/alternate functions without having to play with hex values.
- different boards supported. Two custom boards <-> MX1ADS. Adding support for MX1ADS should be no problem, though, since we only have to rewrite some register definitions. Unfortunately I don't have the hardware.

Quoted 1 line

We will have one in the next few days. I'd love to help testing it.

I just got my brand new toy! :o)

So any news on the U-Boot i.MX support?

Steven