All of lore.kernel.org
 help / color / mirror / Atom feed
From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: dts: orion5x: add device tree for kurobox-pro
Date: Tue, 22 Mar 2016 17:42:00 +0100	[thread overview]
Message-ID: <20160322164200.GH5250@lunn.ch> (raw)
In-Reply-To: <1458656898-16183-1-git-send-email-rogershimizu@gmail.com>

On Tue, Mar 22, 2016 at 11:28:18PM +0900, Roger Shimizu wrote:
> Add dts file to support Buffalo/Revogear Kurobox-Pro, which is marvell
> orion5x based 3.5" HDD NAS.
> 
> It's a quite old product and already discontinued. So there's no
> official website for it. But it was an early product which used marvell
> orion5x 88F5182 chipset, it's popular in the community.
> Some unofficial site:
>   - http://buffalo.nas-central.org/wiki/Category:KuroboxPro
>   - http://nice.kaze.com/KUROPRO_ProductSpecifications.pdf
> 
> This device tree is based on the board file:
>   arch/arm/mach-orion5x/kurobox_pro-setup.c

Hi Roger

This looks good, but lets try to figure out the NAND.

> However, the NAND device, which is supported by board file, is not
> supported by device tree yet. So I still want to keep the board file
> for the time being.

> +&devbus_cs0 {
> +	status = "disabled";
> +	devbus,keep-config;
> +
> +	/* According to board file: arch/arm/mach-orion5x/kurobox_pro-setup.c
> +	 * There's a NAND flash on Device Bus CS0, but it fails on probing,
> +	 * so it's disabled here.
> +	 */
> +
> +	flash at 0 {
> +		compatible = "cfi-flash";
> +		reg = <0 0x1000000>;
> +		bank-width = <1>;
> +	};
> +};

kurobox_pro-setup.c says:

/*
 * 256K NOR flash Device bus boot chip select
 */

#define KUROBOX_PRO_NOR_BOOT_BASE       0xf4000000
#define KUROBOX_PRO_NOR_BOOT_SIZE       SZ_256K

/*
 * 256M NAND flash on Device bus chip select 1
 */

#define KUROBOX_PRO_NAND_BASE           0xfc000000
#define KUROBOX_PRO_NAND_SIZE           SZ_2M

So there is a NOR on CS0, not NAND.

static struct platform_device kurobox_pro_nand_flash = {
        .name           = "orion_nand",
        .id             = -1,
        .dev            = {
                .platform_data  = &kurobox_pro_nand_data,
        },
        .resource       = &kurobox_pro_nand_resource,
        .num_resources  = 1,
};

The name "orion_nand" means this fits with the driver:

drivers/mtd/nand/orion_nand.c:

static struct platform_driver orion_nand_driver = {
        .remove         = orion_nand_remove,
        .driver         = {
                .name   = "orion_nand",
                .of_match_table = of_match_ptr(orion_nand_of_match_table),
        },
};

And this uses compatible string         { .compatible = "marvell,orion-nand", },

We need to add this to the dts file. The kirkwood.dtsi might be a good
example to copy.

	Andrew

  reply	other threads:[~2016-03-22 16:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-22 14:28 [PATCH] ARM: dts: orion5x: add device tree for kurobox-pro Roger Shimizu
2016-03-22 16:42 ` Andrew Lunn [this message]
2016-03-22 22:54   ` Roger Shimizu
2016-03-23  2:12     ` Andrew Lunn
2016-03-23 10:38       ` Roger Shimizu
2016-03-28 11:09         ` Roger Shimizu
2016-03-29 16:11 ` [PATCH v2] " Roger Shimizu
2016-04-04 12:35   ` Andrew Lunn
2016-04-07 22:09     ` Gregory CLEMENT

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=20160322164200.GH5250@lunn.ch \
    --to=andrew@lunn.ch \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.