From: valentin.longchamp@keymile.com (Valentin Longchamp)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH] ARM: initial DTS support for km_kirkwood
Date: Wed, 29 Aug 2012 10:04:21 +0200 [thread overview]
Message-ID: <503DCD05.5040500@keymile.com> (raw)
In-Reply-To: <20120828122054.GG31704@lunn.ch>
Hi Andrew,
On 08/28/2012 02:20 PM, Andrew Lunn wrote:
> Hi Valentin
>
>> This is a first attempt to support the km_kirkwood reference design with
>> a device tree. This km_kirkwood design is present in many Keymile
>> products. It is based on the Marvell Bobcat SOC which integrates a
>> Kirkwood CPU next to a big L2 Ethernet Switch. The Kirkwood in the SOC
>> is very similar to the "normal" one, but there are a few differences.
>
> Is there a public datasheet for this device?
Unfortunately I am not aware of such a document. I have just checked on
Marvell's website and I haven't found anything. All the documents we have are
under NDA.
>
>> diff --git a/arch/arm/mach-kirkwood/board-km_kirkwood.c b/arch/arm/mach-kirkwood/board-km_kirkwood.c
>> new file mode 100644
>> index 0000000..7a103db
>> --- /dev/null
>> +++ b/arch/arm/mach-kirkwood/board-km_kirkwood.c
>> @@ -0,0 +1,75 @@
>> +/*
>> + * Copyright 2012 2012 KEYMILE AG, CH-3097 Bern
>> + * Valentin Longchamp <valentin.longchamp@keymile.com>
>> + *
>> + * arch/arm/mach-kirkwood/board-km_kirkwood.c
>> + *
>> + * Keymile km_kirkwood Reference Desing Init for drivers not converted to
>> + * flattened device tree yet.
>> + *
>> + * This file is licensed under the terms of the GNU General Public
>> + * License version 2. This program is licensed "as is" without any
>> + * warranty of any kind, whether express or implied.
>> + */
>> +
>> +#include <linux/kernel.h>
>> +#include <linux/init.h>
>> +#include <linux/platform_device.h>
>> +#include <linux/ata_platform.h>
>> +#include <linux/mv643xx_eth.h>
>> +#include <linux/of.h>
>> +#include <linux/of_address.h>
>> +#include <linux/of_fdt.h>
>> +#include <linux/of_irq.h>
>> +#include <linux/of_platform.h>
>> +#include <linux/gpio.h>
>> +#include <linux/mtd/physmap.h>
>> +#include <linux/spi/flash.h>
>> +#include <linux/spi/spi.h>
>> +#include <linux/clk.h>
>> +#include <linux/clk-private.h>
>> +#include <asm/mach-types.h>
>> +#include <asm/mach/arch.h>
>> +#include <asm/mach/map.h>
>> +#include <mach/kirkwood.h>
>> +#include <mach/bridge-regs.h>
>> +#include <plat/mvsdio.h>
>> +#include "common.h"
>> +#include "mpp.h"
>
> Please remove all the header files you don't need.
OK.
>
>> +
>> +static struct mv643xx_eth_platform_data km_kirkwood_ge00_data = {
>> + .phy_addr = MV643XX_ETH_PHY_ADDR(0),
>> +};
>> +
>> +static unsigned int km_kirkwood_mpp_config[] __initdata = {
>> + MPP8_GPIO, /* I2C SDA */
>> + MPP9_GPIO, /* I2C SCL */
>> + 0
>> +};
>> +
>> +void __init km_kirkwood_init(void)
>> +{
>> + struct clk *sata_clk;
>> + /*
>> + * Basic setup. Needs to be called early.
>> + */
>> +
>> + kirkwood_mpp_conf(km_kirkwood_mpp_config);
>> +
>> + /*
>> + * Our variant of kirkwood (integrated in the Bobcat) hangs on accessing
>> + * SATA bits (14-15) of the Clock Gating Control Register. Since these
>> + * devices are also not present in this variant, their clocks get
>> + * disabled because unused when clk_disable_unused() gets called.
>
> So there is no SATA at all on this SoC? Anything else missing which a
> 'normal' kirkwood has?
No SATA at all. Yes, other missing peripherals are RTC, SDIO, I2S (Audio), TDM,
TS (MPEG-2 Transport Stream).
>
> If there a way to identify the chipset? e.g. what does
>
> kirkwood_pcie_id(&dev, &rev);
>
> give? It would be better to not create the clocks at all, if we could
> determine at runtime the hardware was not there.
>
Yeah I agree, it would be much better. However here is what is returned from the
kirkwood_pcie_id call in kirkwood_dt_init() (kirkwood_id())
> Kirkwood: MV88F6281-A0, TCLK=200000000.
To me it looks like this is the exact same ID as the usual kirkwood version so
we cannot determine this at runtime (at least not with that ID).
Valentin
next prev parent reply other threads:[~2012-08-29 8:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-28 11:56 [RFC PATCH] ARM: initial DTS support for km_kirkwood Valentin Longchamp
2012-08-28 12:20 ` Andrew Lunn
2012-08-29 8:04 ` Valentin Longchamp [this message]
2012-08-28 17:23 ` Jason Cooper
2012-08-29 8:15 ` Valentin Longchamp
2012-08-29 17:14 ` Jason Cooper
2012-09-03 17:56 ` Andrew Lunn
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=503DCD05.5040500@keymile.com \
--to=valentin.longchamp@keymile.com \
--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).