* [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support. [not found] <20120224075753.GA24858@lunn.ch> @ 2012-02-24 15:55 ` Jason 2012-02-24 19:36 ` Jason 2012-02-29 14:44 ` Jason 2 siblings, 0 replies; 13+ messages in thread From: Jason @ 2012-02-24 15:55 UTC (permalink / raw) To: linux-arm-kernel On Fri, Feb 24, 2012 at 08:57:53AM +0100, Andrew Lunn wrote: > Hi Jason > > Great to see this work going forward. I hope we can cooperating in the > future. I have an out of tree kirkwood board i would like to supported > via DT, and i also have a QNAP T119+ i can use for testing. Awesome, I don't have one of those. > I have some patches under development which will help. I've been > porting the different Orion machines to use Mike Turquette generic CLK > and clkdev... It appears that changing core platform code across an entire architecture is quite difficult. ;-) I hope it gets merged, but I'm not going to hold my breath. > ...so that the device drivers can determine for themselves > what the clock is. tclk is then removed from the platform data > structures, making DT a little bit simpler. This work should also > solve the kirkwood clock gating which is going to be an issue for > DT. For example, your board file is probably currently calling > kirkwood_spi_init(), in order to use SPI. This does: > > kirkwood_clk_ctrl |= CGC_RUNIT; > > and so ensures that the RUNIT clock does not get turned off in a > lateinit call. Once you have DT, this flag is not going to be set, and > so you have the danger of the clock to the SPI core gets turned > off. The clk framework should solve this, since the SPI device driver > will claim the clock and ensure it keeps running. Why not convert kirkwood_clock_gate() (mach-kirkwood/common.c:480) to make use of of_device_is_available() ? That would eliminate one global variable. That wouldn't even require a change to the devicetrees, since it returns 1 if 'status' doesn't exist (or is set to "okay" or "ok"). I don't even see where CGC_RUNIT is used in kirkwood_clock_gate(), except at line 528. Maybe I'm missing something, a lot of this is new to me. thx, Jason. ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support. [not found] <20120224075753.GA24858@lunn.ch> 2012-02-24 15:55 ` [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support Jason @ 2012-02-24 19:36 ` Jason 2012-02-29 14:44 ` Jason 2 siblings, 0 replies; 13+ messages in thread From: Jason @ 2012-02-24 19:36 UTC (permalink / raw) To: linux-arm-kernel On Fri, Feb 24, 2012 at 08:57:53AM +0100, Andrew Lunn wrote: > Hi Jason > > Great to see this work going forward. I hope we can cooperating in the > future. I have an out of tree kirkwood board i would like to supported > via DT, and i also have a QNAP T119+ i can use for testing. Awesome, I don't have one of those. > I have some patches under development which will help. I've been > porting the different Orion machines to use Mike Turquette generic CLK > and clkdev... It appears that changing core platform code across an entire architecture is quite difficult. ;-) I hope it gets merged, but I'm not going to hold my breath. > ...so that the device drivers can determine for themselves > what the clock is. tclk is then removed from the platform data > structures, making DT a little bit simpler. This work should also > solve the kirkwood clock gating which is going to be an issue for > DT. For example, your board file is probably currently calling > kirkwood_spi_init(), in order to use SPI. This does: > > kirkwood_clk_ctrl |= CGC_RUNIT; > > and so ensures that the RUNIT clock does not get turned off in a > lateinit call. Once you have DT, this flag is not going to be set, and > so you have the danger of the clock to the SPI core gets turned > off. The clk framework should solve this, since the SPI device driver > will claim the clock and ensure it keeps running. Why not convert kirkwood_clock_gate() (mach-kirkwood/common.c:480) to make use of of_device_is_available() ? That would eliminate one global variable. That wouldn't even require a change to the devicetrees, since it returns 1 if 'status' doesn't exist (or is set to "okay" or "ok"). I don't even see where CGC_RUNIT is used in kirkwood_clock_gate(), except at line 528. Maybe I'm missing something, a lot of this is new to me. thx, Jason. ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support. [not found] <20120224075753.GA24858@lunn.ch> 2012-02-24 15:55 ` [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support Jason 2012-02-24 19:36 ` Jason @ 2012-02-29 14:44 ` Jason 2012-02-29 23:53 ` Andrew Lunn 2 siblings, 1 reply; 13+ messages in thread From: Jason @ 2012-02-29 14:44 UTC (permalink / raw) To: linux-arm-kernel Andrew, On Fri, Feb 24, 2012 at 08:57:53AM +0100, Andrew Lunn wrote: > I have some patches under development which will help. Any chance you could shoot those to me? (on-list preferable) I'm thinking we could convert it to an interim solution eg kirkwood_{get,put}_clock() that would be easy to migrate to generic CLK/clkdev once it lands. thx, Jason. ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support. 2012-02-29 14:44 ` Jason @ 2012-02-29 23:53 ` Andrew Lunn 2012-03-01 12:20 ` Jason 0 siblings, 1 reply; 13+ messages in thread From: Andrew Lunn @ 2012-02-29 23:53 UTC (permalink / raw) To: linux-arm-kernel On Wed, Feb 29, 2012 at 09:44:50AM -0500, Jason wrote: > Andrew, > > On Fri, Feb 24, 2012 at 08:57:53AM +0100, Andrew Lunn wrote: > > I have some patches under development which will help. > > Any chance you could shoot those to me? (on-list preferable) I'm > thinking we could convert it to an interim solution eg > kirkwood_{get,put}_clock() that would be easy to migrate to generic > CLK/clkdev once it lands. Hi Jason It is not that easy. It is not kirkwood, but all platform orion, so includes dove, orion5x, mv78xx0 and kirkwood. All these share the same device drivers, since they all share the same SoC peripheral cores. However, only kirkwood has per peripheral gated clocks and all the others share tclk. I've also broke orion5x twice so far with my patches, since i don't have any hardware with that SoC. So this time i was hoping to ask for testing on orion5x before submitting to mainline. Mike did say he hoped the generic clk would be ready last week. Maybe we should ping him and ask for a new ETA? Andrew ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support. 2012-02-29 23:53 ` Andrew Lunn @ 2012-03-01 12:20 ` Jason 0 siblings, 0 replies; 13+ messages in thread From: Jason @ 2012-03-01 12:20 UTC (permalink / raw) To: linux-arm-kernel On Thu, Mar 01, 2012 at 12:53:26AM +0100, Andrew Lunn wrote: > On Wed, Feb 29, 2012 at 09:44:50AM -0500, Jason wrote: > > On Fri, Feb 24, 2012 at 08:57:53AM +0100, Andrew Lunn wrote: > > > I have some patches under development which will help. > > > > Any chance you could shoot those to me? (on-list preferable) I'm > > thinking we could convert it to an interim solution eg > > kirkwood_{get,put}_clock() that would be easy to migrate to generic > > CLK/clkdev once it lands. > > It is not that easy. It is not kirkwood, but all platform orion, so > includes dove, orion5x, mv78xx0 and kirkwood. All these share the same > device drivers, since they all share the same SoC peripheral > cores. However, only kirkwood has per peripheral gated clocks and all > the others share tclk. > > I've also broke orion5x twice so far with my patches, since i don't > have any hardware with that SoC. So this time i was hoping to ask for > testing on orion5x before submitting to mainline. > > Mike did say he hoped the generic clk would be ready last week. Maybe > we should ping him and ask for a new ETA? Nah, it'll be ready when it's ready. I'll keep things the way they are and gut through the conversion once his stuff is in mainline. thx, Jason. ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 0/3 v4] arm: kirkwood: add dreamplug/devicetree support @ 2012-02-22 19:18 Jason Cooper 2012-02-22 19:18 ` [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support Jason Cooper 0 siblings, 1 reply; 13+ messages in thread From: Jason Cooper @ 2012-02-22 19:18 UTC (permalink / raw) To: linux-arm-kernel This patch series provides initial support for devicetree on kirkwood for the dreamplug platform. After discussing the approach with Arnd Bergman last week at ELC, we decided to take an incremental approach to the conversion. First, I would detect that we were on the dreamplug via the devicetree blob. Then, configure uart0 via devicetree. We chose the uart since it is already well supported under devicetree. This patch series has been boot-tested on the dreamplug. In a future patch series, I plan to migrate spi/flash/partitions over to devicetree. When the migration is complete, board-dt.c will not be specific to the dreamplug, and dts files can be written for all of the other kirkwood boards. Jason Cooper (3): arm: ignore devicetree blobs. arm: kirkwood: add dreamplug (fdt) support. arm: kirkwood: convert uart0 to devicetree. arch/arm/boot/.gitignore | 1 + arch/arm/boot/dts/kirkwood-dreamplug.dts | 19 +++ arch/arm/boot/dts/kirkwood.dtsi | 14 +++ arch/arm/mach-kirkwood/Kconfig | 14 +++ arch/arm/mach-kirkwood/Makefile | 1 + arch/arm/mach-kirkwood/Makefile.boot | 2 + arch/arm/mach-kirkwood/board-dt.c | 180 ++++++++++++++++++++++++++++++ 7 files changed, 231 insertions(+), 0 deletions(-) create mode 100644 arch/arm/boot/dts/kirkwood-dreamplug.dts create mode 100644 arch/arm/boot/dts/kirkwood.dtsi create mode 100644 arch/arm/mach-kirkwood/board-dt.c -- 1.7.3.4 ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support. 2012-02-22 19:18 [PATCH 0/3 v4] arm: kirkwood: add dreamplug/devicetree support Jason Cooper @ 2012-02-22 19:18 ` Jason Cooper 2012-02-22 20:46 ` Arnd Bergmann 2012-02-23 3:19 ` Rob Herring 0 siblings, 2 replies; 13+ messages in thread From: Jason Cooper @ 2012-02-22 19:18 UTC (permalink / raw) To: linux-arm-kernel Initially, copied guruplug-setup.c and did s/guruplug/dreamplug/g. Then, switched to SPI based NOR flash. After talking to Arnd Bergman, chose an incremental approach to adding devicetree support. First, we use the dtb to tell us we are on the dreamplug, then we gradually port over drivers. Driver porting will start with the uart (see next patch), and progress from there. Possibly, spi/flash/partitions will be next. When done, board-dt.c will no longer be dreamplug specific, and dt's can be made for the other kirkwood boards. Signed-off-by: Jason Cooper <jason@lakedaemon.net> --- Changes from v1 - attempting dts, looking for pointers. Changes from v2 - resubmit as MACH_TYPE_DREAMPLUG (3550) is in arm/for-next, rebased against same. - removed lame fdt attempt, others are working on kirkwood fdt. Will convert once kirkwood fdt is mainline. - s/boot_params/atag_offset/ - added kirkwood_reset - 1 checkpatch.pl warning (help in Kconfig), looks the same as all other kirkwood boards... Changes from v3 - rebased against v3.3-rc3 (recommended by Arnd) - use devicetree to determine which board we are on - added patch to configure uart0 from devicetree arch/arm/boot/dts/kirkwood-dreamplug.dts | 19 +++ arch/arm/boot/dts/kirkwood.dtsi | 6 + arch/arm/mach-kirkwood/Kconfig | 14 +++ arch/arm/mach-kirkwood/Makefile | 1 + arch/arm/mach-kirkwood/Makefile.boot | 2 + arch/arm/mach-kirkwood/board-dt.c | 182 ++++++++++++++++++++++++++++++ 6 files changed, 224 insertions(+), 0 deletions(-) create mode 100644 arch/arm/boot/dts/kirkwood-dreamplug.dts create mode 100644 arch/arm/boot/dts/kirkwood.dtsi create mode 100644 arch/arm/mach-kirkwood/board-dt.c diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts new file mode 100644 index 0000000..fbfaaf6 --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts @@ -0,0 +1,19 @@ +/dts-v1/; + +/include/ "kirkwood.dtsi" + +/ { + model = "Marvell Dreamplug"; + compatible = "marvell,dreamplug", "marvell,kirkwood"; + + memory { + device_type = "memory"; + reg = <0x00000000 0x20000000>; + }; + + chosen { + bootargs = "console=ttyS0,115200n8 earlyprintk"; + }; + + +}; diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi new file mode 100644 index 0000000..771c6bb --- /dev/null +++ b/arch/arm/boot/dts/kirkwood.dtsi @@ -0,0 +1,6 @@ +/include/ "skeleton.dtsi" + +/ { + compatible = "marvell,kirkwood"; +}; + diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index 7fc603b..6095884 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig @@ -44,6 +44,20 @@ config MACH_GURUPLUG Say 'Y' here if you want your kernel to support the Marvell GuruPlug Reference Board. +config ARCH_KIRKWOOD_DT + bool "Marvell Kirkwood Flattened Device Tree" + select USE_OF + help + Say 'Y' here if you want your kernel to support the + Marvell Kirkwood using flattened device tree. + +config MACH_DREAMPLUG_DT + bool "Marvell DreamPlug (Flattened Device Tree)" + depends on ARCH_KIRKWOOD_DT + help + Say 'Y' here if you want your kernel to support the + Marvell DreamPlug (Flattened Device Tree). + config MACH_TS219 bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" help diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile index 5dcaa81..acbc5e1 100644 --- a/arch/arm/mach-kirkwood/Makefile +++ b/arch/arm/mach-kirkwood/Makefile @@ -20,3 +20,4 @@ obj-$(CONFIG_MACH_NET5BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o obj-$(CONFIG_MACH_T5325) += t5325-setup.o obj-$(CONFIG_CPU_IDLE) += cpuidle.o +obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o diff --git a/arch/arm/mach-kirkwood/Makefile.boot b/arch/arm/mach-kirkwood/Makefile.boot index 760a0ef..16f9385 100644 --- a/arch/arm/mach-kirkwood/Makefile.boot +++ b/arch/arm/mach-kirkwood/Makefile.boot @@ -1,3 +1,5 @@ zreladdr-y += 0x00008000 params_phys-y := 0x00000100 initrd_phys-y := 0x00800000 + +dtb-$(CONFIG_MACH_DREAMPLUG_DT) += kirkwood-dreamplug.dtb diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c new file mode 100644 index 0000000..ab13eb9 --- /dev/null +++ b/arch/arm/mach-kirkwood/board-dt.c @@ -0,0 +1,182 @@ +/* + * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net> + * + * arch/arm/mach-kirkwood/board-dt.c + * + * Marvell DreamPlug Reference Board Setup + * + * 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/mtd/partitions.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/leds.h> +#include <linux/mtd/physmap.h> +#include <linux/spi/flash.h> +#include <linux/spi/spi.h> +#include <linux/spi/orion_spi.h> +#include <asm/mach-types.h> +#include <asm/mach/arch.h> +#include <mach/kirkwood.h> +#include <plat/mvsdio.h> +#include "common.h" +#include "mpp.h" + +static struct of_device_id kirkwood_dt_match_table[] __initdata = { + { .compatible = "simple-bus", }, + { } +}; + +struct mtd_partition dreamplug_partitions[] = { + { + .name = "u-boot", + .size = SZ_512K, + .offset = 0, + }, + { + .name = "u-boot env", + .size = SZ_64K, + .offset = SZ_512K + SZ_512K, + }, + { + .name = "dtb", + .size = SZ_64K, + .offset = SZ_512K + SZ_512K + SZ_512K, + }, +}; + +static const struct flash_platform_data dreamplug_spi_slave_data = { + .type = "mx25l1606e", + .name = "spi_flash", + .parts = dreamplug_partitions, + .nr_parts = ARRAY_SIZE(dreamplug_partitions), +}; + +static struct spi_board_info __initdata dreamplug_spi_slave_info[] = { + { + .modalias = "m25p80", + .platform_data = &dreamplug_spi_slave_data, + .irq = -1, + .max_speed_hz = 50000000, + .bus_num = 0, + .chip_select = 0, + }, +}; + +static struct mv643xx_eth_platform_data dreamplug_ge00_data = { + .phy_addr = MV643XX_ETH_PHY_ADDR(0), +}; + +static struct mv643xx_eth_platform_data dreamplug_ge01_data = { + .phy_addr = MV643XX_ETH_PHY_ADDR(1), +}; + +static struct mv_sata_platform_data dreamplug_sata_data = { + .n_ports = 1, +}; + +static struct mvsdio_platform_data dreamplug_mvsdio_data = { + /* unfortunately the CD signal has not been connected */ +}; + +static struct gpio_led dreamplug_led_pins[] = { + { + .name = "dreamplug:blue:bluetooth", + .gpio = 47, + .active_low = 1, + }, + { + .name = "dreamplug:green:wifi", + .gpio = 48, + .active_low = 1, + }, + { + .name = "dreamplug:green:wifi_ap", + .gpio = 49, + .active_low = 1, + }, +}; + +static struct gpio_led_platform_data dreamplug_led_data = { + .leds = dreamplug_led_pins, + .num_leds = ARRAY_SIZE(dreamplug_led_pins), +}; + +static struct platform_device dreamplug_leds = { + .name = "leds-gpio", + .id = -1, + .dev = { + .platform_data = &dreamplug_led_data, + } +}; + +static unsigned int dreamplug_mpp_config[] __initdata = { + MPP0_SPI_SCn, + MPP1_SPI_MOSI, + MPP2_SPI_SCK, + MPP3_SPI_MISO, + MPP47_GPIO, /* Bluetooth LED */ + MPP48_GPIO, /* Wifi LED */ + MPP49_GPIO, /* Wifi AP LED */ + 0 +}; + +static void __init dreamplug_init(void) +{ + /* + * Basic setup. Needs to be called early. + */ + kirkwood_mpp_conf(dreamplug_mpp_config); + + kirkwood_uart0_init(); + + spi_register_board_info(dreamplug_spi_slave_info, + ARRAY_SIZE(dreamplug_spi_slave_info)); + kirkwood_spi_init(); + + kirkwood_ehci_init(); + kirkwood_ge00_init(&dreamplug_ge00_data); + kirkwood_ge01_init(&dreamplug_ge01_data); + kirkwood_sata_init(&dreamplug_sata_data); + kirkwood_sdio_init(&dreamplug_mvsdio_data); + + platform_device_register(&dreamplug_leds); +} + +static void __init kirkwood_dt_init(void) +{ + kirkwood_init(); + + if (!of_machine_is_compatible("kirkwood,dreamplug")) + dreamplug_init(); + + of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL); +} + +static const char *kirkwood_dt_board_compat[] = { + "marvell,dreamplug", + NULL +}; + +DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)") + /* Maintainer: Jason Cooper <jason@lakedaemon.net> */ + .map_io = kirkwood_map_io, + .init_early = kirkwood_init_early, + .init_irq = kirkwood_init_irq, + .timer = &kirkwood_timer, + .init_machine = kirkwood_dt_init, + .restart = kirkwood_restart, + .dt_compat = kirkwood_dt_board_compat, +MACHINE_END -- 1.7.3.4 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support. 2012-02-22 19:18 ` [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support Jason Cooper @ 2012-02-22 20:46 ` Arnd Bergmann 2012-02-22 21:17 ` Nicolas Pitre 2012-02-23 3:19 ` Rob Herring 1 sibling, 1 reply; 13+ messages in thread From: Arnd Bergmann @ 2012-02-22 20:46 UTC (permalink / raw) To: linux-arm-kernel On Wednesday 22 February 2012, Jason Cooper wrote: > Initially, copied guruplug-setup.c and did s/guruplug/dreamplug/g. > Then, switched to SPI based NOR flash. > > After talking to Arnd Bergman, chose an incremental approach to adding > devicetree support. First, we use the dtb to tell us we are on the > dreamplug, then we gradually port over drivers. > > Driver porting will start with the uart (see next patch), and progress > from there. Possibly, spi/flash/partitions will be next. > > When done, board-dt.c will no longer be dreamplug specific, and dt's can > be made for the other kirkwood boards. > > Signed-off-by: Jason Cooper <jason@lakedaemon.net> Looks good to me. I'm adding Nicolas and Lennert to Cc to make sure they see the mail. Acked-by: Arnd Bergmann <arnd@arndb.de> ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support. 2012-02-22 20:46 ` Arnd Bergmann @ 2012-02-22 21:17 ` Nicolas Pitre 0 siblings, 0 replies; 13+ messages in thread From: Nicolas Pitre @ 2012-02-22 21:17 UTC (permalink / raw) To: linux-arm-kernel On Wed, 22 Feb 2012, Arnd Bergmann wrote: > On Wednesday 22 February 2012, Jason Cooper wrote: > > Initially, copied guruplug-setup.c and did s/guruplug/dreamplug/g. > > Then, switched to SPI based NOR flash. > > > > After talking to Arnd Bergman, chose an incremental approach to adding > > devicetree support. First, we use the dtb to tell us we are on the > > dreamplug, then we gradually port over drivers. > > > > Driver porting will start with the uart (see next patch), and progress > > from there. Possibly, spi/flash/partitions will be next. > > > > When done, board-dt.c will no longer be dreamplug specific, and dt's can > > be made for the other kirkwood boards. > > > > Signed-off-by: Jason Cooper <jason@lakedaemon.net> > > Looks good to me. > > I'm adding Nicolas and Lennert to Cc to make sure they see the mail. > > Acked-by: Arnd Bergmann <arnd@arndb.de> I'm fine with the approach. Acked-by: Nicolas Pitre <nico@linaro.org> Arnd, Jason: please feel free to work something out between yourselves to move those patches into the arm-soc tree. Nicolas ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support. 2012-02-22 19:18 ` [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support Jason Cooper 2012-02-22 20:46 ` Arnd Bergmann @ 2012-02-23 3:19 ` Rob Herring 2012-02-23 7:34 ` Arnd Bergmann 1 sibling, 1 reply; 13+ messages in thread From: Rob Herring @ 2012-02-23 3:19 UTC (permalink / raw) To: linux-arm-kernel On 02/22/2012 01:18 PM, Jason Cooper wrote: > Initially, copied guruplug-setup.c and did s/guruplug/dreamplug/g. > Then, switched to SPI based NOR flash. > > After talking to Arnd Bergman, chose an incremental approach to adding > devicetree support. First, we use the dtb to tell us we are on the > dreamplug, then we gradually port over drivers. > > Driver porting will start with the uart (see next patch), and progress > from there. Possibly, spi/flash/partitions will be next. > > When done, board-dt.c will no longer be dreamplug specific, and dt's can > be made for the other kirkwood boards. > > Signed-off-by: Jason Cooper <jason@lakedaemon.net> > --- > Changes from v1 > > - attempting dts, looking for pointers. > > Changes from v2 > > - resubmit as MACH_TYPE_DREAMPLUG (3550) is in arm/for-next, rebased > against same. > - removed lame fdt attempt, others are working on kirkwood fdt. Will > convert once kirkwood fdt is mainline. > - s/boot_params/atag_offset/ > - added kirkwood_reset > - 1 checkpatch.pl warning (help in Kconfig), looks the same as all > other kirkwood boards... > > Changes from v3 > > - rebased against v3.3-rc3 (recommended by Arnd) > - use devicetree to determine which board we are on > - added patch to configure uart0 from devicetree > > arch/arm/boot/dts/kirkwood-dreamplug.dts | 19 +++ > arch/arm/boot/dts/kirkwood.dtsi | 6 + > arch/arm/mach-kirkwood/Kconfig | 14 +++ > arch/arm/mach-kirkwood/Makefile | 1 + > arch/arm/mach-kirkwood/Makefile.boot | 2 + > arch/arm/mach-kirkwood/board-dt.c | 182 ++++++++++++++++++++++++++++++ > 6 files changed, 224 insertions(+), 0 deletions(-) > create mode 100644 arch/arm/boot/dts/kirkwood-dreamplug.dts > create mode 100644 arch/arm/boot/dts/kirkwood.dtsi > create mode 100644 arch/arm/mach-kirkwood/board-dt.c > > diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts > new file mode 100644 > index 0000000..fbfaaf6 > --- /dev/null > +++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts > @@ -0,0 +1,19 @@ > +/dts-v1/; > + > +/include/ "kirkwood.dtsi" > + > +/ { > + model = "Marvell Dreamplug"; > + compatible = "marvell,dreamplug", "marvell,kirkwood"; > + > + memory { > + device_type = "memory"; > + reg = <0x00000000 0x20000000>; > + }; > + > + chosen { > + bootargs = "console=ttyS0,115200n8 earlyprintk"; > + }; > + > + > +}; > diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi > new file mode 100644 > index 0000000..771c6bb > --- /dev/null > +++ b/arch/arm/boot/dts/kirkwood.dtsi > @@ -0,0 +1,6 @@ > +/include/ "skeleton.dtsi" > + > +/ { > + compatible = "marvell,kirkwood"; > +}; > + > diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig > index 7fc603b..6095884 100644 > --- a/arch/arm/mach-kirkwood/Kconfig > +++ b/arch/arm/mach-kirkwood/Kconfig > @@ -44,6 +44,20 @@ config MACH_GURUPLUG > Say 'Y' here if you want your kernel to support the > Marvell GuruPlug Reference Board. > > +config ARCH_KIRKWOOD_DT > + bool "Marvell Kirkwood Flattened Device Tree" > + select USE_OF > + help > + Say 'Y' here if you want your kernel to support the > + Marvell Kirkwood using flattened device tree. > + > +config MACH_DREAMPLUG_DT > + bool "Marvell DreamPlug (Flattened Device Tree)" > + depends on ARCH_KIRKWOOD_DT > + help > + Say 'Y' here if you want your kernel to support the > + Marvell DreamPlug (Flattened Device Tree). Why do you need 2 entries? > + > config MACH_TS219 > bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" > help > diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile > index 5dcaa81..acbc5e1 100644 > --- a/arch/arm/mach-kirkwood/Makefile > +++ b/arch/arm/mach-kirkwood/Makefile > @@ -20,3 +20,4 @@ obj-$(CONFIG_MACH_NET5BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o > obj-$(CONFIG_MACH_T5325) += t5325-setup.o > > obj-$(CONFIG_CPU_IDLE) += cpuidle.o > +obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o > diff --git a/arch/arm/mach-kirkwood/Makefile.boot b/arch/arm/mach-kirkwood/Makefile.boot > index 760a0ef..16f9385 100644 > --- a/arch/arm/mach-kirkwood/Makefile.boot > +++ b/arch/arm/mach-kirkwood/Makefile.boot > @@ -1,3 +1,5 @@ > zreladdr-y += 0x00008000 > params_phys-y := 0x00000100 > initrd_phys-y := 0x00800000 > + > +dtb-$(CONFIG_MACH_DREAMPLUG_DT) += kirkwood-dreamplug.dtb > diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c > new file mode 100644 > index 0000000..ab13eb9 > --- /dev/null > +++ b/arch/arm/mach-kirkwood/board-dt.c > @@ -0,0 +1,182 @@ > +/* > + * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net> > + * > + * arch/arm/mach-kirkwood/board-dt.c > + * > + * Marvell DreamPlug Reference Board Setup > + * > + * 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/mtd/partitions.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/leds.h> > +#include <linux/mtd/physmap.h> > +#include <linux/spi/flash.h> > +#include <linux/spi/spi.h> > +#include <linux/spi/orion_spi.h> > +#include <asm/mach-types.h> > +#include <asm/mach/arch.h> > +#include <mach/kirkwood.h> > +#include <plat/mvsdio.h> > +#include "common.h" > +#include "mpp.h" > + > +static struct of_device_id kirkwood_dt_match_table[] __initdata = { > + { .compatible = "simple-bus", }, > + { } > +}; > + > +struct mtd_partition dreamplug_partitions[] = { > + { > + .name = "u-boot", > + .size = SZ_512K, > + .offset = 0, > + }, > + { > + .name = "u-boot env", > + .size = SZ_64K, > + .offset = SZ_512K + SZ_512K, > + }, > + { > + .name = "dtb", > + .size = SZ_64K, > + .offset = SZ_512K + SZ_512K + SZ_512K, > + }, > +}; > + > +static const struct flash_platform_data dreamplug_spi_slave_data = { > + .type = "mx25l1606e", > + .name = "spi_flash", > + .parts = dreamplug_partitions, > + .nr_parts = ARRAY_SIZE(dreamplug_partitions), > +}; > + > +static struct spi_board_info __initdata dreamplug_spi_slave_info[] = { > + { > + .modalias = "m25p80", > + .platform_data = &dreamplug_spi_slave_data, > + .irq = -1, > + .max_speed_hz = 50000000, > + .bus_num = 0, > + .chip_select = 0, > + }, > +}; > + > +static struct mv643xx_eth_platform_data dreamplug_ge00_data = { > + .phy_addr = MV643XX_ETH_PHY_ADDR(0), > +}; > + > +static struct mv643xx_eth_platform_data dreamplug_ge01_data = { > + .phy_addr = MV643XX_ETH_PHY_ADDR(1), > +}; > + > +static struct mv_sata_platform_data dreamplug_sata_data = { > + .n_ports = 1, > +}; > + > +static struct mvsdio_platform_data dreamplug_mvsdio_data = { > + /* unfortunately the CD signal has not been connected */ > +}; > + > +static struct gpio_led dreamplug_led_pins[] = { > + { > + .name = "dreamplug:blue:bluetooth", > + .gpio = 47, > + .active_low = 1, > + }, > + { > + .name = "dreamplug:green:wifi", > + .gpio = 48, > + .active_low = 1, > + }, > + { > + .name = "dreamplug:green:wifi_ap", > + .gpio = 49, > + .active_low = 1, > + }, > +}; > + > +static struct gpio_led_platform_data dreamplug_led_data = { > + .leds = dreamplug_led_pins, > + .num_leds = ARRAY_SIZE(dreamplug_led_pins), > +}; > + > +static struct platform_device dreamplug_leds = { > + .name = "leds-gpio", > + .id = -1, > + .dev = { > + .platform_data = &dreamplug_led_data, > + } > +}; > + > +static unsigned int dreamplug_mpp_config[] __initdata = { > + MPP0_SPI_SCn, > + MPP1_SPI_MOSI, > + MPP2_SPI_SCK, > + MPP3_SPI_MISO, > + MPP47_GPIO, /* Bluetooth LED */ > + MPP48_GPIO, /* Wifi LED */ > + MPP49_GPIO, /* Wifi AP LED */ > + 0 > +}; Do you need this to boot? All this data should come from the dtb. > + > +static void __init dreamplug_init(void) > +{ > + /* > + * Basic setup. Needs to be called early. > + */ > + kirkwood_mpp_conf(dreamplug_mpp_config); > + > + kirkwood_uart0_init(); > + > + spi_register_board_info(dreamplug_spi_slave_info, > + ARRAY_SIZE(dreamplug_spi_slave_info)); > + kirkwood_spi_init(); > + > + kirkwood_ehci_init(); > + kirkwood_ge00_init(&dreamplug_ge00_data); > + kirkwood_ge01_init(&dreamplug_ge01_data); > + kirkwood_sata_init(&dreamplug_sata_data); > + kirkwood_sdio_init(&dreamplug_mvsdio_data); > + > + platform_device_register(&dreamplug_leds); > +} > + > +static void __init kirkwood_dt_init(void) > +{ > + kirkwood_init(); > + > + if (!of_machine_is_compatible("kirkwood,dreamplug")) Huh? Your string doesn't match your dts file. You've already matched against "marvell,dreamplug", so is this check necessary? Rob > + dreamplug_init(); > + > + of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL); > +} > + > +static const char *kirkwood_dt_board_compat[] = { > + "marvell,dreamplug", > + NULL > +}; > + > +DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)") > + /* Maintainer: Jason Cooper <jason@lakedaemon.net> */ > + .map_io = kirkwood_map_io, > + .init_early = kirkwood_init_early, > + .init_irq = kirkwood_init_irq, > + .timer = &kirkwood_timer, > + .init_machine = kirkwood_dt_init, > + .restart = kirkwood_restart, > + .dt_compat = kirkwood_dt_board_compat, > +MACHINE_END ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support. 2012-02-23 3:19 ` Rob Herring @ 2012-02-23 7:34 ` Arnd Bergmann 2012-02-23 16:12 ` Jason 0 siblings, 1 reply; 13+ messages in thread From: Arnd Bergmann @ 2012-02-23 7:34 UTC (permalink / raw) To: linux-arm-kernel On Thursday 23 February 2012, Rob Herring wrote: > On 02/22/2012 01:18 PM, Jason Cooper wrote: > > diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig > > index 7fc603b..6095884 100644 > > --- a/arch/arm/mach-kirkwood/Kconfig > > +++ b/arch/arm/mach-kirkwood/Kconfig > > @@ -44,6 +44,20 @@ config MACH_GURUPLUG > > Say 'Y' here if you want your kernel to support the > > Marvell GuruPlug Reference Board. > > > > +config ARCH_KIRKWOOD_DT > > + bool "Marvell Kirkwood Flattened Device Tree" > > + select USE_OF > > + help > > + Say 'Y' here if you want your kernel to support the > > + Marvell Kirkwood using flattened device tree. > > + > > +config MACH_DREAMPLUG_DT > > + bool "Marvell DreamPlug (Flattened Device Tree)" > > + depends on ARCH_KIRKWOOD_DT > > + help > > + Say 'Y' here if you want your kernel to support the > > + Marvell DreamPlug (Flattened Device Tree). > > Why do you need 2 entries? The first one is used to build the board file for all DT based machines, the second one is used to select the dts file. I would be enough to have just the first one, but that makes it harder to find for people looking for dreamplug. Maybe change the text to "Generic Marvell Kirkwood DT based (e.g. DreamPlug)"? > > + > > +static unsigned int dreamplug_mpp_config[] __initdata = { > > + MPP0_SPI_SCn, > > + MPP1_SPI_MOSI, > > + MPP2_SPI_SCK, > > + MPP3_SPI_MISO, > > + MPP47_GPIO, /* Bluetooth LED */ > > + MPP48_GPIO, /* Wifi LED */ > > + MPP49_GPIO, /* Wifi AP LED */ > > + 0 > > +}; > > Do you need this to boot? All this data should come from the dtb. Putting this into the dtb would require converting kirkwood to use the pinctrl subsystem first, if we want to have proper bindings. When I did the hands-on review of the code with Jason during ELC, we decided to leave this being done the legacy way for now, which also matches how Tegra does it until we have the pinctrl bindings. Also note how the patch description says "Driver porting will start with the uart (see next patch), and progress from there. Possibly, spi/flash/partitions will be next." I think this is the best approach indeed and I'd probably leave the pinctrl stuff until the end. > > + > > +static void __init kirkwood_dt_init(void) > > +{ > > + kirkwood_init(); > > + > > + if (!of_machine_is_compatible("kirkwood,dreamplug")) > > Huh? Your string doesn't match your dts file. > > You've already matched against "marvell,dreamplug", so is this check > necessary? It's wrong, and the condition is negated. It should be if (of_machine_is_compatible("marvell,dreamplug")) dreamplug_init(); The idea is that there is one init function for all dt based kirkwood machines, which contains special setup functions for those boards that don't (yet) describe all the hardware in the dt. > > + > > +static const char *kirkwood_dt_board_compat[] = { > > + "marvell,dreamplug", > > + NULL > > +}; Since you mention the name, it should probably be "globalscale,dreamplug" because the device is made by GlobalScale instead of Marvell. Arnd ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support. 2012-02-23 7:34 ` Arnd Bergmann @ 2012-02-23 16:12 ` Jason 2012-02-23 18:56 ` Grant Likely 0 siblings, 1 reply; 13+ messages in thread From: Jason @ 2012-02-23 16:12 UTC (permalink / raw) To: linux-arm-kernel On Thu, Feb 23, 2012 at 07:34:33AM +0000, Arnd Bergmann wrote: > On Thursday 23 February 2012, Rob Herring wrote: > > On 02/22/2012 01:18 PM, Jason Cooper wrote: > > > > diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig > > > index 7fc603b..6095884 100644 > > > --- a/arch/arm/mach-kirkwood/Kconfig > > > +++ b/arch/arm/mach-kirkwood/Kconfig > > > @@ -44,6 +44,20 @@ config MACH_GURUPLUG > > > Say 'Y' here if you want your kernel to support the > > > Marvell GuruPlug Reference Board. > > > > > > +config ARCH_KIRKWOOD_DT > > > + bool "Marvell Kirkwood Flattened Device Tree" > > > + select USE_OF > > > + help > > > + Say 'Y' here if you want your kernel to support the > > > + Marvell Kirkwood using flattened device tree. > > > + > > > +config MACH_DREAMPLUG_DT > > > + bool "Marvell DreamPlug (Flattened Device Tree)" > > > + depends on ARCH_KIRKWOOD_DT > > > + help > > > + Say 'Y' here if you want your kernel to support the > > > + Marvell DreamPlug (Flattened Device Tree). > > > > Why do you need 2 entries? > > The first one is used to build the board file for all DT based machines, > the second one is used to select the dts file. I would be enough to have just > the first one, but that makes it harder to find for people looking for > dreamplug. > > Maybe change the text to "Generic Marvell Kirkwood DT based (e.g. DreamPlug)"? I was thinking about this more, and had, I hope, a better idea: change the 'depends on ARCH_KIRKWOOD_DT' to 'selects ARCH_KIRKWOOD_DT' and remove the first entry. This way, the logic remains the same and the word 'Dreamplug' is always visible. Any objections? > > > + > > > +static unsigned int dreamplug_mpp_config[] __initdata = { > > > + MPP0_SPI_SCn, > > > + MPP1_SPI_MOSI, > > > + MPP2_SPI_SCK, > > > + MPP3_SPI_MISO, > > > + MPP47_GPIO, /* Bluetooth LED */ > > > + MPP48_GPIO, /* Wifi LED */ > > > + MPP49_GPIO, /* Wifi AP LED */ > > > + 0 > > > +}; > > > > Do you need this to boot? All this data should come from the dtb. > > Putting this into the dtb would require converting kirkwood to use the > pinctrl subsystem first, if we want to have proper bindings. When I > did the hands-on review of the code with Jason during ELC, we decided > to leave this being done the legacy way for now, which also matches > how Tegra does it until we have the pinctrl bindings. > > Also note how the patch description says "Driver porting will start > with the uart (see next patch), and progress from there. Possibly, > spi/flash/partitions will be next." I think this is the best approach > indeed and I'd probably leave the pinctrl stuff until the end. Agreed. > > > + > > > +static void __init kirkwood_dt_init(void) > > > +{ > > > + kirkwood_init(); > > > + > > > + if (!of_machine_is_compatible("kirkwood,dreamplug")) > > > > Huh? Your string doesn't match your dts file. > > > > You've already matched against "marvell,dreamplug", so is this check > > necessary? > > It's wrong, and the condition is negated. It should be > > if (of_machine_is_compatible("marvell,dreamplug")) > dreamplug_init(); > > The idea is that there is one init function for all dt based > kirkwood machines, which contains special setup functions for > those boards that don't (yet) describe all the hardware in the > dt. Good catch, will fix in v5. > > > + > > > +static const char *kirkwood_dt_board_compat[] = { > > > + "marvell,dreamplug", > > > + NULL > > > +}; > > Since you mention the name, it should probably be "globalscale,dreamplug" > because the device is made by GlobalScale instead of Marvell. hmm, Globalscale Tech is, as I understand it, a turn-key manufacturer. They are simply building Marvell's development platforms for them, handling sales, etc. My impression was that Marvell designed the board and contracted Globalscale to build and distribute it. I don't care which we use, but is the convention to use the SoC designer (marvell,dreamplug), the SoC (kirkwood,dreamplug), or the brand (globalscale,dreamplug)? If there is no set standard, I think the SoC is most accurate, as nothing prevents a manufacturer from swapping out ICs/SoCs between manufacturing runs of the same make/model. Look at certain wifi USB devices for examples. thx, Jason. ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support. 2012-02-23 16:12 ` Jason @ 2012-02-23 18:56 ` Grant Likely 2012-02-23 19:00 ` Jason 0 siblings, 1 reply; 13+ messages in thread From: Grant Likely @ 2012-02-23 18:56 UTC (permalink / raw) To: linux-arm-kernel On Thu, Feb 23, 2012 at 9:12 AM, Jason <jason@lakedaemon.net> wrote: > On Thu, Feb 23, 2012 at 07:34:33AM +0000, Arnd Bergmann wrote: >> On Thursday 23 February 2012, Rob Herring wrote: >> > On 02/22/2012 01:18 PM, Jason Cooper wrote: >> >> > > diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig >> > > index 7fc603b..6095884 100644 >> > > --- a/arch/arm/mach-kirkwood/Kconfig >> > > +++ b/arch/arm/mach-kirkwood/Kconfig >> > > @@ -44,6 +44,20 @@ config MACH_GURUPLUG >> > > ? ? Say 'Y' here if you want your kernel to support the >> > > ? ? Marvell GuruPlug Reference Board. >> > > >> > > +config ARCH_KIRKWOOD_DT >> > > + bool "Marvell Kirkwood Flattened Device Tree" >> > > + select USE_OF >> > > + help >> > > + ? Say 'Y' here if you want your kernel to support the >> > > + ? Marvell Kirkwood using flattened device tree. >> > > + >> > > +config MACH_DREAMPLUG_DT >> > > + bool "Marvell DreamPlug (Flattened Device Tree)" >> > > + depends on ARCH_KIRKWOOD_DT >> > > + help >> > > + ? Say 'Y' here if you want your kernel to support the >> > > + ? Marvell DreamPlug (Flattened Device Tree). >> > >> > Why do you need 2 entries? >> >> The first one is used to build the board file for all DT based machines, >> the second one is used to select the dts file. I would be enough to have just >> the first one, but that makes it harder to find for people looking for >> dreamplug. >> >> Maybe change the text to "Generic Marvell Kirkwood DT based (e.g. DreamPlug)"? > > I was thinking about this more, and had, I hope, a better idea: ?change > the 'depends on ARCH_KIRKWOOD_DT' to 'selects ARCH_KIRKWOOD_DT' and > remove the first entry. ?This way, the logic remains the same and the > word 'Dreamplug' is always visible. ?Any objections? > >> > > + >> > > +static unsigned int dreamplug_mpp_config[] __initdata = { >> > > + MPP0_SPI_SCn, >> > > + MPP1_SPI_MOSI, >> > > + MPP2_SPI_SCK, >> > > + MPP3_SPI_MISO, >> > > + MPP47_GPIO, ? ? /* Bluetooth LED */ >> > > + MPP48_GPIO, ? ? /* Wifi LED */ >> > > + MPP49_GPIO, ? ? /* Wifi AP LED */ >> > > + 0 >> > > +}; >> > >> > Do you need this to boot? All this data should come from the dtb. >> >> Putting this into the dtb would require converting kirkwood to use the >> pinctrl subsystem first, if we want to have proper bindings. When I >> did the hands-on review of the code with Jason during ELC, we decided >> to leave this being done the legacy way for now, which also matches >> how Tegra does it until we have the pinctrl bindings. >> >> Also note how the patch description says "Driver porting will start >> with the uart (see next patch), and progress from there. ?Possibly, >> spi/flash/partitions will be next." I think this is the best approach >> indeed and I'd probably leave the pinctrl stuff until the end. > > Agreed. > >> > > + >> > > +static void __init kirkwood_dt_init(void) >> > > +{ >> > > + kirkwood_init(); >> > > + >> > > + if (!of_machine_is_compatible("kirkwood,dreamplug")) >> > >> > Huh? Your string doesn't match your dts file. >> > >> > You've already matched against "marvell,dreamplug", so is this check >> > necessary? >> >> It's wrong, and the condition is negated. It should be >> >> ? ? ? if (of_machine_is_compatible("marvell,dreamplug")) >> ? ? ? ? ? ? ? dreamplug_init(); >> >> The idea is that there is one init function for all dt based >> kirkwood machines, which contains special setup functions for >> those boards that don't (yet) describe all the hardware in the >> dt. > > Good catch, will fix in v5. > >> > > + >> > > +static const char *kirkwood_dt_board_compat[] = { >> > > + "marvell,dreamplug", >> > > + NULL >> > > +}; >> >> Since you mention the name, it should probably be "globalscale,dreamplug" >> because the device is made by GlobalScale instead of Marvell. > > hmm, Globalscale Tech is, as I understand it, a turn-key manufacturer. > They are simply building Marvell's development platforms for them, > handling sales, etc. ?My impression was that Marvell designed the board > and contracted Globalscale to build and distribute it. > > I don't care which we use, but is the convention to use the SoC designer > (marvell,dreamplug), the SoC (kirkwood,dreamplug), or the brand > (globalscale,dreamplug)? > > If there is no set standard, I think the SoC is most accurate, as > nothing prevents a manufacturer from swapping out ICs/SoCs between > manufacturing runs of the same make/model. ?Look at certain wifi USB > devices for examples. convention is to use the vendor of the device. If it is marketed as a Marvell product, then use "marvell,...". If it is Globalscale, then "globalscale,...". The actual SoC on the device is irrelevant for the top level compatible property name. g. ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support. 2012-02-23 18:56 ` Grant Likely @ 2012-02-23 19:00 ` Jason 0 siblings, 0 replies; 13+ messages in thread From: Jason @ 2012-02-23 19:00 UTC (permalink / raw) To: linux-arm-kernel On Thu, Feb 23, 2012 at 11:56:46AM -0700, Grant Likely wrote: > On Thu, Feb 23, 2012 at 9:12 AM, Jason <jason@lakedaemon.net> wrote: > > On Thu, Feb 23, 2012 at 07:34:33AM +0000, Arnd Bergmann wrote: > >> On Thursday 23 February 2012, Rob Herring wrote: > >> > On 02/22/2012 01:18 PM, Jason Cooper wrote: ... > >> > > + > >> > > +static const char *kirkwood_dt_board_compat[] = { > >> > > + "marvell,dreamplug", > >> > > + NULL > >> > > +}; > >> > >> Since you mention the name, it should probably be "globalscale,dreamplug" > >> because the device is made by GlobalScale instead of Marvell. > > > > hmm, Globalscale Tech is, as I understand it, a turn-key manufacturer. > > They are simply building Marvell's development platforms for them, > > handling sales, etc. ?My impression was that Marvell designed the board > > and contracted Globalscale to build and distribute it. > > > > I don't care which we use, but is the convention to use the SoC designer > > (marvell,dreamplug), the SoC (kirkwood,dreamplug), or the brand > > (globalscale,dreamplug)? > > > > If there is no set standard, I think the SoC is most accurate, as > > nothing prevents a manufacturer from swapping out ICs/SoCs between > > manufacturing runs of the same make/model. ?Look at certain wifi USB > > devices for examples. > > convention is to use the vendor of the device. If it is marketed as a > Marvell product, then use "marvell,...". If it is Globalscale, then > "globalscale,...". The actual SoC on the device is irrelevant for the > top level compatible property name. globalscale it is, then. Thanks for the clarification. thx, Jason. ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2012-03-01 12:20 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20120224075753.GA24858@lunn.ch> 2012-02-24 15:55 ` [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support Jason 2012-02-24 19:36 ` Jason 2012-02-29 14:44 ` Jason 2012-02-29 23:53 ` Andrew Lunn 2012-03-01 12:20 ` Jason 2012-02-22 19:18 [PATCH 0/3 v4] arm: kirkwood: add dreamplug/devicetree support Jason Cooper 2012-02-22 19:18 ` [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support Jason Cooper 2012-02-22 20:46 ` Arnd Bergmann 2012-02-22 21:17 ` Nicolas Pitre 2012-02-23 3:19 ` Rob Herring 2012-02-23 7:34 ` Arnd Bergmann 2012-02-23 16:12 ` Jason 2012-02-23 18:56 ` Grant Likely 2012-02-23 19:00 ` Jason
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).