linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jochen@scram.de (Jochen Friedrich)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/3] Add support for mini-box.com picoSAM9G45 board
Date: Fri, 04 Nov 2011 16:57:34 +0100	[thread overview]
Message-ID: <4EB40B6E.2000801@scram.de> (raw)
In-Reply-To: <1320076396-6233-1-git-send-email-npavel@mini-box.com>

Hi Nicu,

> This patch adds support for picoSAM9G45 board from mini-box.com. This board is
> based on Atmel G45 SOC. More details can be found at http://arm.mini-box.com

I just wonder if it makes sense to add more application specific board files to
Linux rather than switching to a DT based configuration. This board file makes
use of several assumptions about hardware connected to the board:

> +	/* USART1 on ttyS1. (Rx, Tx, RTS, CTS) */
> +	at91_register_uart(AT91SAM9G45_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
> +	/* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
> +	at91_register_uart(AT91SAM9G45_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);

Optional. Depends on usage of J7 and J9. Can as well be used as GPIO lines.

> + * SPI devices.
> + */
> +static struct spi_board_info picosam9g45_spi_devices[] = {
> +	[0] = {/* SPI0 CS0 on right side connector J7*/
> +		.modalias= "spidev",
> +		.max_speed_hz= 15 * 1000 * 1000,
> +		.bus_num= 0,
> +		.chip_select= 0,
> +	},
> +	[1] = {/* SPI1 CS0 on left side connector J9*/
> +		.modalias= "spidev",
> +		.max_speed_hz= 15 * 1000 * 1000,
> +		.bus_num= 1,
> +		.chip_select= 0,
> +	},
> +};

Optional. Depends on usage of J7 and J9. Can as well be used as GPIO lines.

> +/*
> + * NAND flash
> + */
> +static struct mtd_partition __initdata picosam9g45_nand_partition[] = {
> +	{
> +		.name   = "Bootstrap",
> +		.offset = 0,
> +		.size   = SZ_4M
> +	},
> +	{
> +		.name= "RootFS",
> +		.offset= MTDPART_OFS_NXTBLK,
> +		.size= 60 * SZ_1M,
> +	},
> +	{
> +		.name= "Space",
> +		.offset= MTDPART_OFS_NXTBLK,
> +		.size= MTDPART_SIZ_FULL,
> +	},
> +};

At least my device didn't come with a NAND flash attached.

> +/*
> + * Touchscreen
> + */
> +static struct at91_tsadcc_data picosam9g45_tsadcc_data = {
> +	.adc_clock		= 300000,
> +	.pendet_debounce	= 0x0d,
> +	.ts_sample_hold_time	= 0x0a,
> +};

Useless for headless applications. The recently posted IIO AT91 ADC driver could
alternatively be used for the 4 ADC inputs if no TS is connected.

> +/*
> + * GPIO Buttons
> + */
> +#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
> +static struct gpio_keys_button picosam9g45_buttons[] = {
> +	{	/* J9 pin 5 gnd + pin 11 */
> +		.code		= KEY_BACK,
> +		.gpio		= AT91_PIN_PB6,
> +		.active_low	= 1,
> +		.desc		= "Back",
> +		.wakeup		= 1,
> +	},
> +	{	/* J9 pin 5 gnd + pin 13*/
> +		.code		= KEY_MENU,
> +		.gpio		= AT91_PIN_PB7,
> +		.active_low	= 1,
> +		.desc		= "Menu",
> +		.wakeup		= 1,
> +	},
> +	{	/* J9 pin 5 gnd + pin 12 */
> +		.code		= KEY_HOME,
> +		.gpio		= AT91_PIN_PB16,
> +		.active_low	= 1,
> +		.desc		= "Home",
> +	},
> +
> +};

Those are highly application specific as well.

Just my 2ct.

Thanks,
Jochen

      parent reply	other threads:[~2011-11-04 15:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-31 15:53 [PATCH v2 1/3] Add support for mini-box.com picoSAM9G45 board Nicu Pavel
2011-10-31 15:53 ` [PATCH v2 2/3] Add kernel configuration option for picosam9g45 board Nicu Pavel
2011-10-31 15:53 ` [PATCH v2 3/3] Add picosam9g45 board to Makefile Nicu Pavel
2011-11-02 14:28 ` [PATCH v2 1/3] Add support for mini-box.com picoSAM9G45 board Russell King - ARM Linux
2011-11-02 15:49   ` Jean-Christophe PLAGNIOL-VILLARD
2011-11-02 16:06     ` Russell King - ARM Linux
2011-11-02 18:30       ` Jean-Christophe PLAGNIOL-VILLARD
2011-11-04 15:57 ` Jochen Friedrich [this message]

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=4EB40B6E.2000801@scram.de \
    --to=jochen@scram.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).