Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
- ===================================================================
- --- target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom (revision 34872)
- +++ target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom (working copy)
- @@ -67,6 +67,7 @@
- freestation5 | \
- hw550-3g | \
- mofi3500-3gn | \
- + mpr-a1 | \
- pwh2004 | \
- nbg-419n | \
- nw718 | \
- Index: target/linux/ramips/base-files/etc/uci-defaults/leds
- ===================================================================
- --- target/linux/ramips/base-files/etc/uci-defaults/leds (revision 34872)
- +++ target/linux/ramips/base-files/etc/uci-defaults/leds (working copy)
- @@ -65,6 +65,9 @@
- mofi3500-3gn)
- set_usb_led "mofi3500-3gn:green:usb"
- ;;
- + mpr-a1)
- + set_wifi_led "mpr-a1:blue:system"
- + ;;
- nw718)
- set_usb_led "nw718:amber:usb"
- ;;
- Index: target/linux/ramips/base-files/etc/uci-defaults/network
- ===================================================================
- --- target/linux/ramips/base-files/etc/uci-defaults/network (revision 34872)
- +++ target/linux/ramips/base-files/etc/uci-defaults/network (working copy)
- @@ -144,6 +144,7 @@
- bc2 | \
- broadway | \
- f5d8235-v1 | \
- + mpr-a1 | \
- nw718 | \
- psr-680w | \
- rt-n15 | \
- Index: target/linux/ramips/base-files/etc/diag.sh
- ===================================================================
- --- target/linux/ramips/base-files/etc/diag.sh (revision 34872)
- +++ target/linux/ramips/base-files/etc/diag.sh (working copy)
- @@ -64,6 +64,9 @@
- mofi3500-3gn)
- status_led="mofi3500-3gn:green:status"
- ;;
- + mpr-a1)
- + status_led="mpr-a1:red:power"
- + ;;
- nbg-419n)
- status_led="nbg-419n:green:power"
- ;;
- Index: target/linux/ramips/base-files/lib/ramips.sh
- ===================================================================
- --- target/linux/ramips/base-files/lib/ramips.sh (revision 34872)
- +++ target/linux/ramips/base-files/lib/ramips.sh (working copy)
- @@ -122,6 +122,9 @@
- *"MoFi Network MOFI3500-3GN")
- name="mofi3500-3gn"
- ;;
- + *"MPR-A1")
- + name="mpr-a1"
- + ;;
- *"NBG-419N")
- name="nbg-419n"
- ;;
- Index: target/linux/ramips/base-files/lib/upgrade/platform.sh
- ===================================================================
- --- target/linux/ramips/base-files/lib/upgrade/platform.sh (revision 34872)
- +++ target/linux/ramips/base-files/lib/upgrade/platform.sh (working copy)
- @@ -34,6 +34,7 @@
- freestation5 | \
- hw550-3g | \
- mofi3500-3gn | \
- + mpr-a1 | \
- nbg-419n | \
- nw718 | \
- omni-emb | \
- Index: target/linux/ramips/base-files/lib/preinit/06_set_iface_mac
- ===================================================================
- --- target/linux/ramips/base-files/lib/preinit/06_set_iface_mac (revision 34872)
- +++ target/linux/ramips/base-files/lib/preinit/06_set_iface_mac (working copy)
- @@ -17,6 +17,7 @@
- dir-620-a1 |\
- esr-9753 |\
- freestation5 |\
- + mpr-a1 | \
- nw718 |\
- psr-680w |\
- rt-n56u |\
- Index: target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h
- ===================================================================
- --- target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h (revision 34872)
- +++ target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h (working copy)
- @@ -75,5 +75,8 @@
- /* RT3883 based machines */
- RAMIPS_MACH_TEW_691GR, /* TRENDnet TEW-691GR */
- - RAMIPS_MACH_TEW_692GR /* TRENDnet TEW-692GR */
- + RAMIPS_MACH_TEW_692GR, /* TRENDnet TEW-692GR */
- +
- + /* RT5350 based machines */
- + RAMIPS_MACH_MPR_A1 /* HAME MPR-A1 */
- };
- Index: target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile
- ===================================================================
- --- target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile (revision 34872)
- +++ target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile (working copy)
- @@ -28,6 +28,7 @@
- obj-$(CONFIG_RT305X_MACH_FREESTATION5) += mach-freestation5.o
- obj-$(CONFIG_RT305X_MACH_HW550_3G) += mach-hw550-3g.o
- obj-$(CONFIG_RT305X_MACH_MOFI3500_3GN) += mach-mofi3500-3gn.o
- +obj-$(CONFIG_RT305X_MACH_MPR_A1) += mach-mpr-a1.o
- obj-$(CONFIG_RT305X_MACH_NBG_419N) += mach-nbg-419n.o
- obj-$(CONFIG_RT305X_MACH_NW718) += mach-nw718.o
- obj-$(CONFIG_RT305X_MACH_OMNI_EMB) += mach-omni-emb.o
- Index: target/linux/ramips/files/arch/mips/ralink/rt305x/Kconfig
- ===================================================================
- --- target/linux/ramips/files/arch/mips/ralink/rt305x/Kconfig (revision 34872)
- +++ target/linux/ramips/files/arch/mips/ralink/rt305x/Kconfig (working copy)
- @@ -114,6 +114,11 @@
- select RALINK_DEV_GPIO_BUTTONS
- select RALINK_DEV_GPIO_LEDS
- +config RT305X_MACH_MPR_A1
- + bool "HAME MPR-A1 board support"
- + select RALINK_DEV_GPIO_BUTTONS
- + select RALINK_DEV_GPIO_LEDS
- +
- config RT305X_MACH_WR512_3GN
- bool "SH-WR512NU/WS-WR512N1-like 3GN router"
- select RALINK_DEV_GPIO_BUTTONS
- Index: target/linux/ramips/files/arch/mips/ralink/rt305x/mach-mpr-a1.c
- ===================================================================
- --- target/linux/ramips/files/arch/mips/ralink/rt305x/mach-mpr-a1.c (revision 0)
- +++ target/linux/ramips/files/arch/mips/ralink/rt305x/mach-mpr-a1.c (revision 0)
- @@ -0,0 +1,108 @@
- +/*
- + * HAME MPR-A1 board support by Michel Stempin <michel.stempin@wanadoo.fr>
- + * Based on previous work by arpunk, arteq, Heffer & p1vo from OpenWrt forum.
- + *
- + *
- + * This program is free software; you can redistribute it and/or modify it
- + * under the terms of the GNU General Public License version 2 as published
- + * by the Free Software Foundation.
- + */
- +
- +#include <linux/init.h>
- +#include <linux/platform_device.h>
- +#include <linux/spi/spi.h>
- +#include <linux/spi/flash.h>
- +#include <linux/gpio.h>
- +
- +#include <asm/mach-ralink/machine.h>
- +#include <asm/mach-ralink/dev-gpio-buttons.h>
- +#include <asm/mach-ralink/dev-gpio-leds.h>*/
- +#include <asm/mach-ralink/rt305x.h>
- +#include <asm/mach-ralink/rt305x_regs.h>
- +
- +#include "devices.h"
- +
- +#define MPR_A1_GPIO_BUTTON_RESET 0
- +#define MPR_A1_GPIO_USB_POWER 7
- +#define MPR_A1_GPIO_ROOT_HUB_POWER 12
- +#define MPR_A1_GPIO_LED_POWER 17
- +#define MPR_A1_GPIO_LED_SYSTEM 20
- +
- +#define MPR_A1_KEYS_POLL_INTERVAL 20
- +#define MPR_A1_KEYS_DEBOUNCE_INTERVAL (3 * MPR_A1_KEYS_POLL_INTERVAL)
- +
- +const struct flash_platform_data mpr_a1_flash = {
- + .type = "pm25lq032",
- +};
- +
- +struct spi_board_info mpr_a1_spi_slave_info[] __initdata = {
- + {
- + .modalias = "m25p80",
- + .platform_data = &mpr_a1_flash,
- + .irq = -1,
- + .max_speed_hz = 10000000,
- + .bus_num = 0,
- + .chip_select = 0,
- + }
- +};
- +
- +static struct gpio_led mpr_a1_leds_gpio[] __initdata = {
- + {
- + .name = "mpr-a1:blue:system",
- + .gpio = MPR_A1_GPIO_LED_SYSTEM,
- + .active_low = 1,
- + },
- + {
- + .name = "mpr-a1:red:power",
- + .gpio = MPR_A1_GPIO_LED_POWER,
- + .active_low = 1,
- + .default_state = LEDS_GPIO_DEFSTATE_ON,
- + }
- +};
- +
- +static struct gpio_keys_button mpr_a1_gpio_buttons[] __initdata = {
- + {
- + .desc = "reset",
- + .type = EV_KEY,
- + .code = KEY_RESTART,
- + .debounce_interval = MPR_A1_KEYS_DEBOUNCE_INTERVAL,
- + .gpio = MPR_A1_GPIO_BUTTON_RESET,
- + .active_low = 1,
- + }
- +};
- +
- +static void __init mpr_a1_init(void)
- +{
- + // JTAG is required for LED control
- + rt305x_gpio_init((RT305X_GPIO_MODE_GPIO <<
- + RT305X_GPIO_MODE_UART0_SHIFT) |
- + RT305X_GPIO_MODE_JTAG);
- +
- + rt305x_register_spi(mpr_a1_spi_slave_info,
- + ARRAY_SIZE(mpr_a1_spi_slave_info));
- +
- + ramips_register_gpio_leds(-1, ARRAY_SIZE(mpr_a1_leds_gpio),
- + mpr_a1_leds_gpio);
- +
- + ramips_register_gpio_buttons(-1, MPR_A1_KEYS_POLL_INTERVAL,
- + ARRAY_SIZE(mpr_a1_gpio_buttons),
- + mpr_a1_gpio_buttons);
- +
- + rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
- + rt305x_register_ethernet();
- +
- + rt305x_register_wifi();
- +
- + rt305x_register_wdt();
- +
- + gpio_request_one(MPR_A1_GPIO_USB_POWER,
- + GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
- + "USB power");
- + gpio_request_one(MPR_A1_GPIO_ROOT_HUB_POWER,
- + GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
- + "USB root hub power");
- + rt305x_register_usb();
- +}
- +
- +MIPS_MACHINE(RAMIPS_MACH_MPR_A1, "MPR-A1", "HAME MPR-A1",
- + mpr_a1_init);
- Index: target/linux/ramips/image/Makefile
- ===================================================================
- --- target/linux/ramips/image/Makefile (revision 34872)
- +++ target/linux/ramips/image/Makefile (working copy)
- @@ -529,6 +529,10 @@
- $(call Image/Build/Template/$(fs_squash)/$(1),GENERIC_8M,mofi3500-3gn,MOFI3500-3GN,ttyS1,57600,phys)
- endef
- +define Image/Build/Profile/MPR_A1
- + $(call Image/Build/Template/$(fs_squash)/$(1),GENERIC_4M,mpr-a1,MPR-A1,ttyS1,57600,spi)
- +endef
- +
- define Image/Build/Profile/NBG419N
- $(call Image/Build/Template/$(fs_squash)/$(1),GENERIC_4M,nbg-419n,NBG-419N,ttyS1,57600,phys)
- endef
- @@ -637,6 +641,7 @@
- $(call Image/Build/Profile/FREESTATION5,$(1))
- $(call Image/Build/Profile/HW5503G,$(1))
- $(call Image/Build/Profile/MOFI35003GN,$(1))
- + $(call Image/Build/Profile/MPR_A1,$(1))
- $(call Image/Build/Profile/NBG419N,$(1))
- $(call Image/Build/Profile/NW718,$(1))
- $(call Image/Build/Profile/OMNIEMB,$(1))
- Index: target/linux/ramips/rt305x/profiles/hame.mk
- ===================================================================
- --- target/linux/ramips/rt305x/profiles/hame.mk (revision 0)
- +++ target/linux/ramips/rt305x/profiles/hame.mk (revision 0)
- @@ -0,0 +1,17 @@
- +#
- +# Copyright (C) 2012 Michel Stempin <michel.stempin@wanadoo.fr>
- +#
- +# This is free software, licensed under the GNU General Public License v2.
- +# See /LICENSE for more information.
- +#
- +
- +define Profile/MPR_A1
- + NAME:=HAME MPR-A1
- + PACKAGES:=kmod-usb-core kmod-usb2 kmod-ledtrig-netdev kmod-ledtrig-timer
- +endef
- +
- +define Profile/MPR_A1/Description
- + Package set for HAME MPR-A1 board
- +endef
- +
- +$(eval $(call Profile,MPR_A1))
- Index: target/linux/ramips/rt305x/config-3.6
- ===================================================================
- --- target/linux/ramips/rt305x/config-3.6 (revision 34872)
- +++ target/linux/ramips/rt305x/config-3.6 (working copy)
- @@ -108,6 +108,7 @@
- CONFIG_RT305X_MACH_FREESTATION5=y
- CONFIG_RT305X_MACH_HW550_3G=y
- CONFIG_RT305X_MACH_MOFI3500_3GN=y
- +CONFIG_RT305X_MACH_MPR_A1=y
- CONFIG_RT305X_MACH_NBG_419N=y
- CONFIG_RT305X_MACH_NW718=y
- CONFIG_RT305X_MACH_OMNI_EMB=y
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement