From: Armando Visconti <armando.visconti@st.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v6] spi: pl022_spi: Add support for ARM PL022 spi controller
Date: Wed, 14 Sep 2016 16:39:05 +0200 [thread overview]
Message-ID: <61bb7df3-e399-87c2-bf17-2583489ef8ba@st.com> (raw)
In-Reply-To: <c22860da-f05f-fd4f-fd19-39d333d66203@hs-augsburg.de>
Ciao Michael,
On 09/08/2016 04:21 PM, Michael Brandl wrote:
> Dear U-Boot (SPI) Developers,
>
> this patch seems to be my only chance to get spi working without/before Linux.
I wrote and used this code for u-boot for a asic
specified by one of our customers. The patch was generic
enough to be pushed in u-boot, but I didn't have
much time to test it on a different, more generic
platform. So the maintainer decided to drop it...
Would be nice if you could work on it and resurrect it...
:)
Let me know if you have progressed on this or abandoned it.
>
> I'm a student from Augsburg (Germany) experimenting with the Hikey Board from 96boards.
> The hi6220 processor from HiSilicon isn't fully documented, there is just one document called Function Description:
> http://mirror.lemaker.org/Hi6220V100_Multi-Mode_Application_Processor_Function_Description.pdf
>
Yes, I'm currently using HiKey platform for doing my day by day
job here in office. Nevertheless, I don't think I have enough
time to take a look into testing this commit.
> U-Boot already supports the Hikey Board to be loaded from ARM Trusted Firmware (ATF) but only UART and SDMMC is supported by now.
> I cloned the u-boot-spi.git and tried to integrate this patch but I'm not experienced enough to adjust the specific config for the Hikey Board.
>
Maybe I can try to recover the work that was done to integrate
this commit into the customer platform I was talking about.
I'll take a look into it right now...
> Taking a look at armv7 devices with spi support I started like this:
>
> +++ b/arch/arm/include/asm/arch-hi6220/hi6220.h
>
> +/*Hi6220V100_Multi-Mode_Application_Processor_Function_Description on p.5-45*/
> +#define HI6220_SPI_BASE 0xF7106000
>
>
> +++ b/include/configs/hikey.h
>
> +/* Synchronous Serial Port PL022 for SPI */
> +#define CONFIG_PL022_SPI
>
>
> +++ b/board/hisilicon/hikey/hikey.c
>
> int board_init(void)
> {
> +#ifdef CONFIG_PL022_SPI
> + hikey_spi0_hw_init();
> +#endif
> return 0;
> }
>
>
> +static void hikey_spi0_hw_init(void)
> +{
> + hi6220_pinmux_config(PERIPH_ID_SPI0)
> +// at91_set_pio_output(AT91_PIO_PORTC, 3, 1); /* SPI0_CS0 */
> + gpio_request(0, "PWR_HOLD_GPIO0_0");
> + gpio_direction_output(0, 1);
> +
> + /* Enable clock */
> +// at91_periph_clk_enable(ATMEL_ID_SPI0);
> +/* from Kernel { HI6220_SPI_CLK, "spi_clk", "clk_150m", CLK_SET_RATE_PARENT|CLK_IGNORE_UNUSED, 0x230, 9, 0, }, */
> + hi6220_clk_enable(PERI_CLK0_SPI0, &peri_sc->clk3_en);
> +
> +}
> +#endif /* CONFIG_PL022_SPI */
> +
>
>
> +++ b/arch/arm/cpu/armv8/hisilicon/pinmux.c
>
> +static void hi6220_spi_config(int peripheral)
> +{
> + switch (peripheral) {
> + case PERIPH_ID_SPI0:
> +// at91_set_a_periph(AT91_PIO_PORTC, 0, 0); /* SPI0_MISO */
> +// at91_set_a_periph(AT91_PIO_PORTC, 1, 0); /* SPI0_MOSI */
> +// at91_set_a_periph(AT91_PIO_PORTC, 2, 0); /* SPI0_SPCK */
> + break;
> +
> + case PERIPH_ID_SPI1:
> + break;
> +
> + default:
> + debug("%s: invalid peripheral %d", __func__, peripheral);
> + return;
> + }
> +}
>
> Maybe you can help me to get spi working on Hikey. My overall aim is to port the pl022 driver then to ARM TF ... maybe also that could be interessing for you.
>
> With kind Regards,
> Michael Brandl
>
>
>
>
Rgds,
Armando
next prev parent reply other threads:[~2016-09-14 14:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-08 14:21 [U-Boot] [PATCH v6] spi: pl022_spi: Add support for ARM PL022 spi controller Michael Brandl
2016-09-14 14:39 ` Armando Visconti [this message]
2016-09-19 11:59 ` [U-Boot] ?==?utf-8?q? ?==?utf-8?q? [PATCH v6]?==?utf-8?q? spi:?==?utf-8?q? " Michael Brandl
2016-09-19 14:14 ` [U-Boot] [PATCH v6] spi: " Armando Visconti
2016-09-20 6:25 ` Michael Brandl
2016-09-14 17:52 ` Jagan Teki
-- strict thread matches above, loose matches on Subject: below --
2013-06-12 12:47 Armando Visconti
2013-06-12 14:25 ` Jagan Teki
2013-06-12 15:07 ` Armando Visconti
2013-06-12 15:19 ` Armando Visconti
2013-06-12 15:29 ` Jagan Teki
2013-06-12 15:55 ` Armando Visconti
2013-10-03 19:52 ` Jagan Teki
2013-10-04 4:10 ` Vipin Kumar
2013-10-04 6:02 ` Jagan Teki
2013-10-04 6:27 ` Vipin Kumar
2013-10-04 6:50 ` Jagan Teki
2013-12-20 19:03 ` Jagan Teki
2014-01-08 9:19 ` Armando Visconti
2014-01-08 10:30 ` Jagan Teki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=61bb7df3-e399-87c2-bf17-2583489ef8ba@st.com \
--to=armando.visconti@st.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox