Hector, On Thu, Dec 15, 2011 at 12:05:48AM +0100, Hector Oron wrote: > Hello Jason, > > 2011/12/14 Jason <deb...@lakedaemon.net>: > > In the end, I'd like to be able to do the same as here[3] for the > > dreamplug instead of the guruplug. Then, a preseed for the freedombox > > should be easy. > > Then, why not enable dreamplug device on debian installer...?
I prefer to build and test _before_ submitting patches. ;-) > > I need to build my own because I need to roll a custom kernel using the > > new dreamplug mach-type, and my patch [4]. > > ... Right, before enabling this device, we need to get support > mainline kernel. Why is not your patch being accepted upstream? It is not fdt, and the mach-type wasn't in mainline. As of yesterday, the dreamplug mach-type (3550) is in mainline. See aef1c03 in linus' tree. Also, Andrew Lunn has been doing cleanup work [1] across kirkwood and orion in preparation for converting all of it to fdt. I believe the referenced patch series has been pulled into arm's next/devel. Once he gets to the stage of having a kirkwood.dtsi, I can start helping (I don't have enough experience to learn devicetree and the guts of the kirkwood SoCs at the same time). Until we get to the point of a kirkwood.dtsi with a {guru,sheeva,dream}plug.dts, the patch I've submitted [2] will have to do. I have no idea if they will accept it now that 3550 is in mainline or if they will hold off until kirkwood fdt is done. I've had no complaints, so I assume it's queued up. > I had in my stack to test Arnaud's patch [1] and Grant Likely wanted > to open the door for device tree, so if possible enable DT in u-boot, > also patch attached [2]. Then, we wanted to talk to you about getting > this stuff into mainline vs your work. No versus here. :-) Whichever patch gets it to mainline support first is what I prefer. Mine, yours, Andrew's... As for u-boot status, that's done. You can checkout 2011.12-rc1 and make dreamplug_config. Also, I've made a few comments, below. thx, Jason. [1] http://www.spinics.net/lists/arm-kernel/msg151746.html [2] http://www.spinics.net/lists/arm-kernel/msg150785.html > kirkwood: dreamplug support > > guruplug and dreamplug are really similar so add support for dreamplug > by modifying guruplug support to handle both devices. > > Signed-off-by: Arnaud Patard <arnaud.pat...@rtp-net.org> > Index: linux-2.6/arch/arm/mach-kirkwood/Kconfig > =================================================================== > --- linux-2.6.orig/arch/arm/mach-kirkwood/Kconfig 2011-10-28 > 17:57:01.000000000 +0200 > +++ linux-2.6/arch/arm/mach-kirkwood/Kconfig 2011-10-28 17:58:08.000000000 > +0200 > @@ -44,6 +44,12 @@ config MACH_GURUPLUG > Say 'Y' here if you want your kernel to support the > Marvell GuruPlug Reference Board. > > +config MACH_DREAMPLUG > + bool "Marvell DreamPlug Reference Board" > + help > + Say 'Y' here if you want your kernel to support the > + Marvell DreamPlug Reference Board. > + > config MACH_TS219 > bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and > TS-219P+ Turbo NAS" > help > Index: linux-2.6/arch/arm/mach-kirkwood/Makefile > =================================================================== > --- linux-2.6.orig/arch/arm/mach-kirkwood/Makefile 2011-10-28 > 17:57:01.000000000 +0200 > +++ linux-2.6/arch/arm/mach-kirkwood/Makefile 2011-10-28 17:58:08.000000000 > +0200 > @@ -7,6 +7,7 @@ obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv > obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o > obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o > obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o > +obj-$(CONFIG_MACH_DREAMPLUG) += guruplug-setup.o > obj-$(CONFIG_MACH_DOCKSTAR) += dockstar-setup.o > obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o > obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o > Index: linux-2.6/arch/arm/mach-kirkwood/guruplug-setup.c > =================================================================== > --- linux-2.6.orig/arch/arm/mach-kirkwood/guruplug-setup.c 2011-10-28 > 17:57:02.000000000 +0200 > +++ linux-2.6/arch/arm/mach-kirkwood/guruplug-setup.c 2011-10-28 > 21:37:13.000000000 +0200 > @@ -16,6 +16,9 @@ > #include <linux/mv643xx_eth.h> > #include <linux/gpio.h> > #include <linux/leds.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> > @@ -23,6 +26,22 @@ > #include "common.h" > #include "mpp.h" > I chose 1MB offset for the u-boot env because the stock u-boot marvell shipped didn't even have the 1MB-2MB region accessible. An fdt partition could be added at +512K (size, 512K), or, after the u-boot env partition. 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, }, }; > +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 mtd_partition guruplug_nand_parts[] = { > { > .name = "u-boot", > @@ -91,6 +110,33 @@ static struct platform_device guruplug_l > } > }; > > +static struct gpio_led dreamplug_led_pins[] = { > + { > + .name = "dreamplug:blue:ap", > + .gpio = 46, > + .active_low = 1, > + }, { > + .name = "dreamplug:green:wifi", > + .gpio = 48, > + .active_low = 1, > + }, > +}; This seems to vary. Here's what's been working for me: 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 unsigned int dreamplug_mpp_config[] __initdata = { > + MPP0_SPI_SCn, > + MPP1_SPI_MOSI, > + MPP2_SPI_SCK, > + MPP3_SPI_MISO, > + MPP46_GPIO, /* Wifi AP LED */ > + MPP48_GPIO, /* Wifi LED */ And here, I have: MPP47_GPIO, /* Bluetooth LED */ MPP48_GPIO, /* Wifi LED */ MPP49_GPIO, /* Wifi AP LED */ > + 0 > +}; > + > static unsigned int guruplug_mpp_config[] __initdata = { > MPP46_GPIO, /* M_RLED */ > MPP47_GPIO, /* M_GLED */ > @@ -105,10 +151,21 @@ static void __init guruplug_init(void) > * Basic setup. Needs to be called early. > */ > kirkwood_init(); > - kirkwood_mpp_conf(guruplug_mpp_config); > > - kirkwood_uart0_init(); > - kirkwood_nand_init(ARRAY_AND_SIZE(guruplug_nand_parts), 25); > + if (machine_is_guruplug()) { > + kirkwood_mpp_conf(guruplug_mpp_config); > + kirkwood_uart0_init(); > + kirkwood_nand_init(ARRAY_AND_SIZE(guruplug_nand_parts), 25); > + } > + > + if (machine_is_dreamplug()) { > + 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(); > + guruplug_leds.dev.platform_data = &dreamplug_led_data; > + } > > kirkwood_ehci_init(); > kirkwood_ge00_init(&guruplug_ge00_data); > @@ -119,6 +176,12 @@ static void __init guruplug_init(void) > platform_device_register(&guruplug_leds); > } > > +#ifdef CONFIG_MACH_GURUPLUG > +static const char const *guruplug_dt_board_compat[] = { > + "marvell,guruplug", > + NULL > +}; > + > MACHINE_START(GURUPLUG, "Marvell GuruPlug Reference Board") > /* Maintainer: Siddarth Gore <go...@marvell.com> */ > .boot_params = 0x00000100, > @@ -127,4 +190,23 @@ MACHINE_START(GURUPLUG, "Marvell GuruPlu > .init_early = kirkwood_init_early, > .init_irq = kirkwood_init_irq, > .timer = &kirkwood_timer, > + .dt_compat = guruplug_dt_board_compat, > +MACHINE_END > +#endif > + > +#ifdef CONFIG_MACH_DREAMPLUG > +static const char const *dreamplug_dt_board_compat[] = { > + "marvell,dreamplug", > + NULL > +}; > + > +MACHINE_START(DREAMPLUG, "Marvell DreamPlug Reference Board") > + /* Maintainer: ? */ > + .init_machine = guruplug_init, > + .map_io = kirkwood_map_io, > + .init_early = kirkwood_init_early, > + .init_irq = kirkwood_init_irq, > + .timer = &kirkwood_timer, > + .dt_compat = dreamplug_dt_board_compat, > MACHINE_END > +#endif > Index: linux-2.6/arch/arm/boot/dts/marvell-dreamplug.dts > =================================================================== > --- /dev/null 1970-01-01 00:00:00.000000000 +0000 > +++ linux-2.6/arch/arm/boot/dts/marvell-dreamplug.dts 2011-10-28 > 21:36:09.000000000 +0200 > @@ -0,0 +1,8 @@ > +/dts-v1/ > +/include/ "skeleton.dtsi" > + > +/ { > + model = "Marvell Dreamplug"; > + compatible = "marvell,dreamplug"; "kirkwood,dreamplug" or, "arm926ejs,dreamplug" ? > +}; > + > diff --git a/include/configs/guruplug.h b/include/configs/guruplug.h > index f449da9..f1cacc4 100644 > --- a/include/configs/guruplug.h > +++ b/include/configs/guruplug.h > @@ -38,6 +38,7 @@ > #define CONFIG_KW88F6281 1 /* SOC Name */ > #define CONFIG_MACH_GURUPLUG /* Machine type */ > #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ > +#define CONFIG_OF_LIBFDT 1 > > /* > * Commands configuration -- To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20111215165345.gq23...@titan.lakedaemon.net