Skip to contentSkip to conversation

Marvell Kirkwood newbie question GPIO functions

U-Boot Dieter Kiermaier 2 participants 8 messages Jun 18, 2009 – Jun 19, 2009

lore
Share & tools
lore
#0 lore raw

Hello everybody out there,

first off all - thanks to everyone from the u-boot community for this helpful piece of code :)

Could somebody give me a short overview of the plans regarding the u-boot port of the Kirkwood arch (e.g. Sheevaplug board)?

Currently I'm using the u-boot from git.marvell.com which has first board support for sheevaplug. I'm working on a custom hardware design but as a starting point the sheevaplug seems to work well.

Sadly there is no generic gpio support - at least I couldn't find it. Are there any plans to support a driver for this feature?

I'm willing to contribute some code if someone guides me a bit?

Thanks in advance,
Dieter

#1 lore raw
Quoted 9 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Dieter Kiermaier
Sent: Thursday, June 18, 2009 1:35 PM
To: u-boot at lists.denx.de
Subject: [U-Boot] Marvell Kirkwood newbie question GPIO functions

Quoted 8 lines

Hello everybody out there,

first off all - thanks to everyone from the u-boot community for this helpful piece of code :)

Could somebody give me a short overview of the plans regarding the u-boot port of the Kirkwood arch (e.g. Sheevaplug board)?

It's my pleasure to reply you :-)
Basic Kirkwood Soc Support patches are available on the u-boot-arm.git/next (will be mainlined soon) Sheevaplug board support patches are also submitted those are under review, you can find them here...
http://lists.denx.de/pipermail/u-boot/2009-June/054313.html
http://lists.denx.de/pipermail/u-boot/2009-June/054314.html
http://lists.denx.de/pipermail/u-boot/2009-June/054316.html

Some other board patches are in pipeline

Quoted 5 lines

Currently I'm using the u-boot from git.marvell.com which has first board support for sheevaplug. I'm working on a custom hardware design but as a starting point the sheevaplug seems to work well.

Objective for U-boot at git.marvell.com is to maintain a usable copy of u-boot with all accepted/unaccepted patches at one place to support Kirkwood developers, but once all these patches are mainlined, this repository will be removed.

Quoted 3 lines

Sadly there is no generic gpio support - at least I couldn't find it. Are there any plans to support a driver for this feature?

BTW: what you want to do at u-boot level with GPIOs?
Current Kirkwood drivers and board support does not need any specific GPIO driver, you can access registers directly to read/write GPIOs. But I think if this is a need in future, I will add gpio driver support. You can provide me your requirements too.

Quoted 2 lines

I'm willing to contribute some code if someone guides me a bit?

You are most welcomed....
Pls feel free to raise your queries...

Regards..
Prafulla . .

Quoted 9 lines

Thanks in advance,
Dieter

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#2 lore raw

Hi Prafulla,

Quoted 10 lines

It's my pleasure to reply you :-)
Basic Kirkwood Soc Support patches are available on the u-boot-arm.git/next (will be mainlined soon) Sheevaplug board support patches are also submitted those are under review, you can find them here...
http://lists.denx.de/pipermail/u-boot/2009-June/054313.html
http://lists.denx.de/pipermail/u-boot/2009-June/054314.html
http://lists.denx.de/pipermail/u-boot/2009-June/054316.html

Some other board patches are in pipeline

thanks very much for your help.
So far I have seen that marvell git u-boot is used to push it to mainline. Great job!
What patches are in the pipeline?

Quoted 11 lines
Quoted 5 lines

Currently I'm using the u-boot from git.marvell.com which has first board support for sheevaplug. I'm working on a custom hardware design but as a starting point the sheevaplug seems to work well.

Objective for U-boot at git.marvell.com is to maintain a usable copy of u-boot with all accepted/unaccepted patches at one place to support Kirkwood developers, but once all these patches are mainlined, this repository will be removed.

Quoted 8 lines
Quoted 2 lines

Sadly there is no generic gpio support - at least I couldn't find it. Are there any plans to support a driver for this feature?

BTW: what you want to do at u-boot level with GPIOs?
Current Kirkwood drivers and board support does not need any specific GPIO driver, you can access registers directly to read/write GPIOs. But I think if this is a need in future, I will add gpio driver support. You can provide me your requirements too.

I'm working on a custom hardware using the sheevaplug as a starting point. Hopefully end of summer I finish the hardware work and have my own board. But I have some additional requirements. For example control some power supplies for LCD, boot an FPGA, program a clock chip device and so on. So my demands are:
- GPIO support (for programming the clock generator which has a simple serial ????????interface to clock in the configuration data) ????????Yeah, I know that I can setup the GPIOs by writing directly to the registers,
????????but a gpio frameworks would be much nicer ;)

- SPI (from the TDM module) support which works independet ? from NAND flash and SD-Card

I have allready posted a query to arm-linux kernel mailing list and yesterday evening I have talked with Lennert on IRC regarding SPI and linux .

The SPI interface is needed in u-boot to boot my lattice FPGA which is configured as slave serial device (and later on in linux to drive a touch controller).
There is allready a FPGA configuration framework inside u-boot and I would like to integrate also a lattice FPGA into that. But to do this I need SPI support.

Quoted 5 lines
Quoted 2 lines

I'm willing to contribute some code if someone guides me a bit?

You are most welcomed....
Pls feel free to raise your queries...

Here they are :)
Thanks,
Dieter

Quoted 10 lines

Regards..
Prafulla . .

Quoted 7 lines

Thanks in advance,
Dieter

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#3 lore raw

Hi again,

Quoted 55 lines

Hi Prafulla,

Quoted 10 lines

It's my pleasure to reply you :-)
Basic Kirkwood Soc Support patches are available on the u-boot-arm.git/next (will be mainlined soon) Sheevaplug board support patches are also submitted those are under review, you can find them here...
http://lists.denx.de/pipermail/u-boot/2009-June/054313.html
http://lists.denx.de/pipermail/u-boot/2009-June/054314.html
http://lists.denx.de/pipermail/u-boot/2009-June/054316.html

Some other board patches are in pipeline

thanks very much for your help.
So far I have seen that marvell git u-boot is used to push it to mainline. Great job!
What patches are in the pipeline?

Quoted 10 lines
Quoted 4 lines

Currently I'm using the u-boot from git.marvell.com which has first board support for sheevaplug. I'm working on a custom hardware design but as a starting point the sheevaplug seems to work well.

Objective for U-boot at git.marvell.com is to maintain a usable copy of u-boot with all accepted/unaccepted patches at one place to support Kirkwood developers, but once all these patches are mainlined, this repository will be removed.

Quoted 8 lines
Quoted 2 lines

Sadly there is no generic gpio support - at least I couldn't find it. Are there any plans to support a driver for this feature?

BTW: what you want to do at u-boot level with GPIOs?
Current Kirkwood drivers and board support does not need any specific GPIO driver, you can access registers directly to read/write GPIOs. But I think if this is a need in future, I will add gpio driver support. You can provide me your requirements too.

I'm working on a custom hardware using the sheevaplug as a starting point. Hopefully end of summer I finish the hardware work and have my own board. But I have some additional requirements. For example control some power supplies for LCD, boot an FPGA, program a clock chip device and so on. So my demands are:
- GPIO support (for programming the clock generator which has a simple serial interface to clock in the configuration data) ????????Yeah, I know that I can setup the GPIOs by writing directly to the registers,
????????but a gpio frameworks would be much nicer ;)

- SPI (from the TDM module) support which works independet ? from NAND flash and SD-Card

I have allready posted a query to arm-linux kernel mailing list and yesterday evening I have talked with Lennert on IRC regarding SPI and linux .

Quoted 6 lines

The SPI interface is needed in u-boot to boot my lattice FPGA which is configured as slave serial device (and later on in linux to drive a touch controller).
There is allready a FPGA configuration framework inside u-boot and I would like to integrate also a lattice FPGA into that. But to do this I need SPI support.

What I forgot to mention is the i2c driver inside u-boot.
I need this to read the mac address from an additional eeprom. This makes mass production more ease and doesn't produce hight costs :)

Dieter

Quoted 25 lines
Quoted 5 lines
Quoted 2 lines

I'm willing to contribute some code if someone guides me a bit?

You are most welcomed....
Pls feel free to raise your queries...

Here they are :)
Thanks,
Dieter

Quoted 10 lines

Regards..
Prafulla . .

Quoted 7 lines

Thanks in advance,
Dieter

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#4 lore raw
Quoted 24 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Dieter Kiermaier
Sent: Friday, June 19, 2009 2:23 PM
To: u-boot at lists.denx.de
Subject: Re: [U-Boot] Marvell Kirkwood newbie question GPIO functions

Hi again,

Quoted 6 lines

Hi Prafulla,

Quoted 4 lines

It's my pleasure to reply you :-)
Basic Kirkwood Soc Support patches are available on the u-boot-arm.git/next (will be mainlined soon) Sheevaplug board support patches are also submitted those are under

review, you can

Quoted 5 lines
Quoted 5 lines

find them here...
http://lists.denx.de/pipermail/u-boot/2009-June/054313.html
http://lists.denx.de/pipermail/u-boot/2009-June/054314.html
http://lists.denx.de/pipermail/u-boot/2009-June/054316.html

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Some other board patches are in pipeline

thanks very much for your help.
So far I have seen that marvell git u-boot is used to push

it to mainline.

Quoted 2 lines

Great job!
What patches are in the pipeline?

Some other board supports (MV88F6281GTW_GE) and Kirkwood SPI driver support Kirkwood USB support (at this moment)

Quoted 53 lines
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines

Currently I'm using the u-boot from git.marvell.com which has first board support for sheevaplug. I'm working on a custom hardware design but as a starting point the sheevaplug seems to work well.

Objective for U-boot at git.marvell.com is to maintain a

usable copy

Quoted 5 lines
Quoted 5 lines

of u-boot with all accepted/unaccepted patches at one place to support Kirkwood developers, but once all these patches are mainlined, this repository will be removed.

Quoted 1 line

Sadly there is no generic gpio support - at least I

couldn't find it.

Quoted 9 lines
Quoted 7 lines
Quoted 1 line

Are there any plans to support a driver for this feature?

BTW: what you want to do at u-boot level with GPIOs? Current Kirkwood drivers and board support does not need any specific GPIO driver, you can access registers directly to read/write GPIOs. But I think if this is a need in future, I will add gpio driver support. You can provide me your requirements too.

I'm working on a custom hardware using the sheevaplug as a

starting point.

Quoted 1 line

Hopefully end of summer I finish the hardware work and have

my own board.

Quoted 2 lines

But I have some additional requirements. For example control some power supplies for LCD, boot an FPGA, program a clock chip

device and so on.

Quoted 2 lines

So my demands are:
- GPIO support (for programming the clock generator which

has a simple

Quoted 2 lines

serial interface to clock in the configuration data) ????????Yeah, I know that I can setup the GPIOs by writing

directly to

Quoted 8 lines

the registers,
????????but a gpio frameworks would be much nicer ;)

- SPI (from the TDM module) support which works independet ? from NAND flash and SD-Card

I have allready posted a query to arm-linux kernel mailing list and yesterday evening I have talked with Lennert on IRC

regarding SPI and

Quoted 3 lines

linux .

The SPI interface is needed in u-boot to boot my lattice

FPGA which is

Quoted 3 lines

configured as slave serial device (and later on in linux to drive a touch controller).
There is allready a FPGA configuration framework inside

u-boot and I

Quoted 1 line

would like to integrate also a lattice FPGA into that. But

Quoted 8 lines

to do this

Quoted 1 line

I need SPI support.

What I forgot to mention is the i2c driver inside u-boot. I need this to read the mac address from an additional eeprom. This makes mass production more ease and doesn't produce hight costs :)

Kirkwood has in-built i2c(TWSI) controller, well.. the plans are in place enable driver for it, but this is not blocking issue right now hence pending ;-)

Just FYI: you can protect some flash sector and use it in place of eeprom, this will lower the board cost and complexity too.

But if you are planning to use some different GPIOs for i2c and bit-banged driver on the top of it, then you will need gpio control, so you can do it by using simple readl/writel calls meanwhile driver to come in :-)

The best way I will suggest you is:
Put pre-programmed eeprom around Kirkwood TWSI interface and enable "TWSI serial ROM initialization" you don't need anything else for this. (I hope you are having enough kirkwood documentation)
Ref: table 32: http://www.marvell.com/files/products/embedded_processors/kirkwood/HW_88F6281_OpenSource.pdf

Regards..
Prafulla . .

Quoted 35 lines

Dieter

Quoted 21 lines
Quoted 5 lines
Quoted 2 lines

I'm willing to contribute some code if someone guides me a bit?

You are most welcomed....
Pls feel free to raise your queries...

Here they are :)
Thanks,
Dieter

Quoted 10 lines

Regards..
Prafulla . .

Quoted 7 lines

Thanks in advance,
Dieter

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Quoted 4 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#5 lore raw

Prafulla,

(...deleted some stuff...)

Quoted 5 lines
Quoted 1 line
Quoted 1 line

What patches are in the pipeline?

Some other board supports (MV88F6281GTW_GE) and Kirkwood SPI driver support Kirkwood USB support (at this moment)

Also very interesting :)

(...deleted, too...)

Quoted 10 lines
Quoted 5 lines

What I forgot to mention is the i2c driver inside u-boot. I need this to read the mac address from an additional eeprom. This makes mass production more ease and doesn't produce hight costs :)

Kirkwood has in-built i2c(TWSI) controller, well.. the plans are in place enable driver for it, but this is not blocking issue right now hence pending ;-)

Quoted 7 lines

Just FYI: you can protect some flash sector and use it in place of eeprom, this will lower the board cost and complexity too.

But if you are planning to use some different GPIOs for i2c and bit-banged driver on the top of it, then you will need gpio control, so you can do it by using simple readl/writel calls meanwhile driver to come in :-)

Yes, I thought about that, too. GPIO support will also be helpful for doing this!
Do you have some snippets how to readl/writel by hand?

Quoted 7 lines

The best way I will suggest you is:
Put pre-programmed eeprom around Kirkwood TWSI interface and enable "TWSI serial ROM initialization" you don't need anything else for this. (I hope you are having enough kirkwood documentation) Ref: table 32:
http://www.marvell.com/files/products/embedded_processors/kirkwood/HW_88F62
81_OpenSource.pdf

Good idea - I will read about that.
I've got access to all documents - including an marvell web account for internal documents.

Regards,
Dieter

Quoted 34 lines

Regards..
Prafulla . .

Quoted 31 lines

Dieter

Quoted 20 lines
Quoted 4 lines
Quoted 1 line

I'm willing to contribute some code if someone guides me a bit?

You are most welcomed....
Pls feel free to raise your queries...

Here they are :)
Thanks,
Dieter

Quoted 10 lines

Regards..
Prafulla . .

Quoted 7 lines

Thanks in advance,
Dieter

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Quoted 4 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#6 lore raw
Quoted 38 lines

-----Original Message-----
From: Dieter Kiermaier [mailto:dk-arm-linux at gmx.de]
Sent: Friday, June 19, 2009 3:17 PM
To: Prafulla Wadaskar
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] Marvell Kirkwood newbie question GPIO functions

Prafulla,

(...deleted some stuff...)

Quoted 5 lines
Quoted 1 line
Quoted 1 line

What patches are in the pipeline?

Some other board supports (MV88F6281GTW_GE) and Kirkwood SPI driver support Kirkwood USB support (at this moment)

Also very interesting :)

(...deleted, too...)

Quoted 4 lines
Quoted 4 lines

What I forgot to mention is the i2c driver inside u-boot. I need this to read the mac address from an additional eeprom. This makes mass production more ease and doesn't produce

hight costs

Quoted 4 lines
Quoted 1 line

:)

Kirkwood has in-built i2c(TWSI) controller, well.. the plans are in place enable driver for it, but this is not blocking issue

right now

Quoted 7 lines

hence pending ;-)

Just FYI: you can protect some flash sector and use it in place of eeprom, this will lower the board cost and complexity too.

But if you are planning to use some different GPIOs for i2c and bit-banged driver on the top of it, then you will need gpio

control,

Quoted 8 lines
Quoted 1 line

so you can do it by using simple readl/writel calls

meanwhile driver

Quoted 2 lines

to come in :-)

Yes, I thought about that, too. GPIO support will also be helpful for doing this!
Do you have some snippets how to readl/writel by hand?

You can refer kw_config_gpio function in cpu/arm926ejs/kirkwood/cpu.c

Quoted 7 lines
Quoted 5 lines

The best way I will suggest you is:
Put pre-programmed eeprom around Kirkwood TWSI interface and enable "TWSI serial ROM initialization" you don't need anything else for this. (I hope you are having enough kirkwood documentation)

Ref: table 32:

Quoted 1 line
Quoted 8 lines
Quoted 1 line

http://www.marvell.com/files/products/embedded_processors/kir

kwood/HW_8

Quoted 3 lines

8F62
81_OpenSource.pdf

Good idea - I will read about that.
I've got access to all documents - including an marvell web account for internal documents.

That's very good...

Regards..
Prafulla . .

Quoted 44 lines

Regards,
Dieter

Quoted 6 lines

Regards..
Prafulla . .

Quoted 3 lines

Dieter

Quoted 1 line
Quoted 1 line
Quoted 1 line

I'm willing to contribute some code if someone

guides me a bit?

Quoted 28 lines
Quoted 28 lines
Quoted 19 lines
Quoted 3 lines

You are most welcomed....
Pls feel free to raise your queries...

Here they are :)
Thanks,
Dieter

Quoted 10 lines

Regards..
Prafulla . .

Quoted 7 lines

Thanks in advance,
Dieter

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Quoted 4 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#7 lore raw
Quoted 47 lines
Quoted 47 lines

-----Original Message-----
From: Dieter Kiermaier [mailto:dk-arm-linux at gmx.de]
Sent: Friday, June 19, 2009 3:17 PM
To: Prafulla Wadaskar
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] Marvell Kirkwood newbie question GPIO functions

Prafulla,

(...deleted some stuff...)

Quoted 4 lines
Quoted 1 line
Quoted 1 line

What patches are in the pipeline?

Some other board supports (MV88F6281GTW_GE) and Kirkwood SPI driver support Kirkwood USB support (at this moment)

Also very interesting :)

(...deleted, too...)

Quoted 3 lines
Quoted 3 lines

What I forgot to mention is the i2c driver inside u-boot. I need this to read the mac address from an additional eeprom. This makes mass production more ease and doesn't produce

hight costs

Quoted 4 lines
Quoted 1 line

:)

Kirkwood has in-built i2c(TWSI) controller, well.. the plans are in place enable driver for it, but this is not blocking issue

right now

Quoted 7 lines

hence pending ;-)

Just FYI: you can protect some flash sector and use it in place of eeprom, this will lower the board cost and complexity too.

But if you are planning to use some different GPIOs for i2c and bit-banged driver on the top of it, then you will need gpio

control,

Quoted 1 line

so you can do it by using simple readl/writel calls

meanwhile driver

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

to come in :-)

Yes, I thought about that, too. GPIO support will also be helpful for doing this!
Do you have some snippets how to readl/writel by hand?

You can refer kw_config_gpio function in cpu/arm926ejs/kirkwood/cpu.c

I will have a look and try this, thanks for the hint!

Quoted 62 lines
Quoted 9 lines
Quoted 5 lines

The best way I will suggest you is:
Put pre-programmed eeprom around Kirkwood TWSI interface and enable "TWSI serial ROM initialization" you don't need anything else for this. (I hope you are having enough kirkwood documentation)

Ref: table 32:

Quoted 1 line

http://www.marvell.com/files/products/embedded_processors/kir

Quoted 8 lines

kwood/HW_8

Quoted 2 lines

8F62
81_OpenSource.pdf

Good idea - I will read about that.
I've got access to all documents - including an marvell web account for internal documents.

That's very good...

Regards..
Prafulla . .

Quoted 39 lines

Regards,
Dieter

Quoted 6 lines

Regards..
Prafulla . .

Quoted 3 lines

Dieter

Quoted 1 line
Quoted 1 line
Quoted 1 line

I'm willing to contribute some code if someone

guides me a bit?

Quoted 27 lines
Quoted 27 lines
Quoted 18 lines
Quoted 2 lines

You are most welcomed....
Pls feel free to raise your queries...

Here they are :)
Thanks,
Dieter

Quoted 10 lines

Regards..
Prafulla . .

Quoted 7 lines

Thanks in advance,
Dieter

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Quoted 4 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot