Dnia 2011-12-26, o godz. 22:31:08 Gabor Juhos <[email protected]> napisaĆ(a):
> The 0x1dc00000 base address should be working with 4/8/16/32M flash chips as > well. Please change RT2880_FLASH0_BASE to 0x1dc00000, and RT2880_FLASH0_SIZE > to > (32 * 1024 * 1024), and check if that works on your device or not. Yes, still works. Bootlog: Starting kernel ... [ 0.000000] Linux version 2.6.39.4 ([email protected]) (gcc version 4.5.4 20110808 (prerelease) (Linaro GCC 4.5-2011.08) ) #1 Tue Dec 27 18:39:39 CET 2011 [ 0.000000] bootconsole [early0] enabled [ 0.000000] CPU revision is: 0001906c (MIPS 4KEc) [ 0.000000] Ralink RT2880 id:2 rev:1 running at 266.66 MHz [ 0.000000] Determined physical RAM map: [ 0.000000] memory: 02000000 @ 08000000 (usable) [ 0.000000] Wasting 1048576 bytes for tracking 32768 unused pages [ 0.000000] Initrd not found or empty - disabling initrd [ 0.000000] Zone PFN ranges: [ 0.000000] Normal 0x00008000 -> 0x0000a000 [ 0.000000] Movable zone start PFN for each node [ 0.000000] early_node_map[1] active PFN ranges [ 0.000000] 0: 0x00008000 -> 0x0000a000 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128 [ 0.000000] Kernel command line: board=F5D8235_V1 mtdparts=physmap-flash.0:320k(u-boot)ro,1536k(kernel),6208k(rootfs),64k(nvram),64k(factory),7744k@0x50000(firmware) console=ttyS1,57600 rootfstype=squashfs,jffs2 [ 0.000000] PID hash table entries: 128 (order: -3, 512 bytes) [ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) [ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.000000] Primary instruction cache 16kB, VIPT, 4-way, linesize 16 bytes. [ 0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 16 bytes [ 0.000000] Memory: 29932k/32768k available (1927k kernel code, 2836k reserved, 323k data, 152k init, 0k highmem) [ 0.000000] SLUB: Genslabs=9, HWalign=16, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] NR_IRQS:48 [ 0.000000] console [ttyS1] enabled, bootconsole disabled [ 0.000000] console [ttyS1] enabled, bootconsole disabled [ 0.010000] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104) [ 0.090000] pid_max: default: 32768 minimum: 301 [ 0.100000] Mount-cache hash table entries: 512 [ 0.110000] NET: Registered protocol family 16 [ 0.120000] MIPS: machine is Belkin F5D8235 v1 [ 0.130000] Skipping PCI bus scan due to resource conflict [ 0.150000] bio: create slab <bio-0> at 0 [ 0.160000] Switching to clocksource MIPS [ 0.170000] NET: Registered protocol family 2 [ 0.180000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.200000] TCP established hash table entries: 1024 (order: 1, 8192 bytes) [ 0.210000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes) [ 0.220000] TCP: Hash tables configured (established 1024 bind 1024) [ 0.240000] TCP reno registered [ 0.240000] UDP hash table entries: 256 (order: 0, 4096 bytes) [ 0.260000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) [ 0.270000] NET: Registered protocol family 1 [ 0.320000] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.330000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. [ 0.360000] msgmni has been set to 58 [ 0.360000] io scheduler noop registered [ 0.370000] io scheduler deadline registered (default) [ 0.380000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled [ 0.400000] serial8250: ttyS0 at MMIO 0x300500 (irq = 10) is a 16550A [ 0.410000] serial8250: ttyS1 at MMIO 0x300c00 (irq = 16) is a 16550A [ 0.430000] physmap platform flash device: 02000000 at bdc00000 [ 0.440000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022cb [ 0.460000] Amd/Fujitsu Extended Query Table at 0x0040 [ 0.470000] Amd/Fujitsu Extended Query version 1.1. [ 0.480000] number of CFI chips: 1 [ 0.490000] 6 cmdlinepart partitions found on MTD device physmap-flash.0 [ 0.500000] Creating 6 MTD partitions on "physmap-flash.0": [ 0.510000] 0x000000000000-0x000000050000 : "u-boot" [ 0.530000] 0x000000050000-0x0000001d0000 : "kernel" [ 0.540000] 0x0000001d0000-0x0000007e0000 : "rootfs" [ 0.560000] mtd: partition "rootfs" set to be root filesystem [ 0.570000] mtd: partition "rootfs_data" created automatically, ofs=320000, len=4C0000 [ 0.580000] 0x000000320000-0x0000007e0000 : "rootfs_data" [ 0.600000] 0x0000007e0000-0x0000007f0000 : "nvram" [ 0.610000] 0x0000007f0000-0x000000800000 : "factory" [ 0.630000] 0x000000050000-0x0000007e0000 : "firmware" [ 0.640000] Realtek RTL8366S ethernet switch driver version 0.2.2 [ 0.650000] rtl8366s rtl8366s: using GPIO pins 1 (SDA) and 2 (SCK) [ 0.670000] rtl8366s rtl8366s: RTL8366 ver. 1 chip found [ 0.730000] rtl8366s: probed [ 0.740000] TCP westwood registered [ 0.750000] NET: Registered protocol family 17 [ 0.760000] 802.1Q VLAN Support v1.8 Ben Greear <[email protected]> [ 0.770000] All bugs added by David S. Miller <[email protected]> [ 0.790000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2. [ 0.810000] Freeing unused kernel memory: 152k freed [ 3.140000] input: gpio-buttons as /devices/platform/gpio-buttons/input/input0 [ 3.340000] Button Hotplug driver version 0.4.1 - preinit - Press the [f] key and hit [enter] to enter failsafe mode - regular preinit - jffs2 not ready yet; using ramdisk - init - Please press Enter to activate this console. [ 7.950000] Compat-wireless backport release: compat-wireless-2011-11-29 [ 7.970000] Backport based on wireless-testing.git master-2011-12-01 [ 8.170000] cfg80211: Calling CRDA to update world regulatory domain [ 8.740000] cfg80211: World regulatory domain updated: [ 8.750000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) [ 8.760000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 8.780000] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm) [ 8.800000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm) [ 8.810000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 8.830000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 9.590000] SCSI subsystem initialized 272+0 records in 272+0 records out [ 11.150000] PPP generic driver version 2.4.2 [ 11.350000] ip_tables: (C) 2000-2006 Netfilter Core Team [ 11.760000] NET: Registered protocol family 24 [ 12.050000] nf_conntrack version 0.5.0 (470 buckets, 1880 max) [ 15.850000] device eth0.1 entered promiscuous mode [ 15.860000] device eth0 entered promiscuous mode [ 17.780000] br-lan: port 1(eth0.1) entering forwarding state [ 17.800000] br-lan: port 1(eth0.1) entering forwarding state BusyBox v1.19.3 (2011-12-27 17:24:30 CET) built-in shell (ash) Enter 'help' for a list of built-in commands. _______ ________ __ | |.-----.-----.-----.| | | |.----.| |_ | - || _ | -__| || | | || _|| _| |_______|| __|_____|__|__||________||__| |____| |__| W I R E L E S S F R E E D O M ATTITUDE ADJUSTMENT (bleeding edge, r29611) ---------- * 1/4 oz Vodka Pour all ingredients into mixing * 1/4 oz Gin tin with ice, strain into glass. * 1/4 oz Amaretto * 1/4 oz Triple sec * 1/4 oz Peach schnapps * 1/4 oz Sour mix * 1 splash Cranberry juice ----------------------------------------------------- root@OpenWrt:/# [ 30.650000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0 [ 30.690000] jffs2_build_filesystem(): unlocking the mtd device... done. [ 30.700000] jffs2_build_filesystem(): erasing all blocks after the end marker... root@OpenWrt:/# [ 63.570000] Newly-erased block contained word 0x70463f28 at offset 0x000e2000 [ 71.000000] done. [ 71.010000] JFFS2 notice: (1116) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found. [ 72.020000] ramips-wdt: timeout value 60 must be 0 < timeout < 32 root@OpenWrt:/# cat /proc/cpuinfo system type : Ralink RT2880 id:2 rev:1 machine : Belkin F5D8235 v1 processor : 0 cpu model : MIPS 4KEc V6.12 BogoMIPS : 265.42 wait instruction : yes microsecond timers : yes tlb_entries : 16 extra interrupt vector : yes hardware watchpoint : yes, count: 0, address/irw mask: [] ASEs implemented : mips16 shadow register sets : 1 kscratch registers : 0 core : 0 VCED exceptions : not available VCEI exceptions : not available root@OpenWrt:/# cat /proc/iomem 00300100-003001ff : ramips-wdt 00400000-00400fff : ramips_eth.0 00480000-004bffff : rt2800_wmac.0 08000000-09ffffff : System RAM 08000000-081e1d6f : Kernel code 081e1d70-08232cbf : Kernel data bdc00000-bfbfffff : physmap-flash.0 bdc00000-bfbfffff : physmap-flash.0 root@OpenWrt:/# And patch: --- target/linux/ramips/rt288x/config-2.6.39 (wersja 29611) +++ target/linux/ramips/rt288x/config-2.6.39 (kopia robocza) @@ -92,6 +92,7 @@ CONFIG_RALINK_RT288X=y # CONFIG_RALINK_RT305X is not set CONFIG_RAMIPS_WDT=y +CONFIG_RT288X_MACH_F5D8235_V1=y CONFIG_RT288X_MACH_RT_N15=y CONFIG_RT288X_MACH_WZR_AGL300NH=y CONFIG_RTL8366S_PHY=y --- target/linux/ramips/rt288x/profiles/belkin.mk (wersja 0) +++ target/linux/ramips/rt288x/profiles/belkin.mk (wersja 0) @@ -0,0 +1,18 @@ +# +# Copyright (C) 2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/F5D8235V1 + NAME:=Belkin F5D8235 V1 + PACKAGES:=kmod-switch-rtl8366s kmod-swconfig swconfig +endef + +define Profile/F5D8235_V1/Description + Package set for Belkin F5D8235 V1 +endef + +$(eval $(call Profile,F5D8235V1)) + --- target/linux/ramips/files/arch/mips/ralink/rt288x/Kconfig (wersja 29611) +++ target/linux/ramips/files/arch/mips/ralink/rt288x/Kconfig (kopia robocza) @@ -2,6 +2,10 @@ menu "Ralink RT288x machine selection" +config RT288X_MACH_F5D8235_V1 + bool "Belkin F5D8235 V1 board support" + select RALINK_DEV_GPIO_LEDS + config RT288X_MACH_RT_N15 bool "Asus RT-N15 board support" select RALINK_DEV_GPIO_BUTTONS --- target/linux/ramips/files/arch/mips/ralink/rt288x/mach-f5d8235-v1.c (wersja 0) +++ target/linux/ramips/files/arch/mips/ralink/rt288x/mach-f5d8235-v1.c (wersja 0) @@ -0,0 +1,142 @@ +/* + * Belkin F5D825 V1 board support + * + * Copyright (C) 2011 Cezary Jackiewicz <[email protected]> + * + * 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/mtd/mtd.h> +#include <linux/mtd/partitions.h> +#include <linux/mtd/physmap.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/rt288x.h> +#include <asm/mach-ralink/rt288x_regs.h> + +#include "devices.h" + +#include <linux/rtl8366.h> +#include <linux/ethtool.h> + +#include <asm/mach-ralink/ramips_eth_platform.h> + +#define F5D8235_GPIO_RTL8366_SCK 2 +#define F5D8235_GPIO_RTL8366_SDA 1 + +#define F5D8235_GPIO_LED_USB_BLUE 7 +#define F5D8235_GPIO_LED_USB_ORANGE 8 +#define F5D8235_GPIO_BUTTON_WPS 0 +#define F5D8235_GPIO_BUTTON_RESET 9 + +#define F5D8235_BUTTONS_POLL_INTERVAL 20 + +#ifdef CONFIG_MTD_PARTITIONS +static struct mtd_partition f5d8235_partitions[] = { + { + .name = "uboot", + .offset = 0, + .size = 0x050000, + .mask_flags = MTD_WRITEABLE, + }, { + .name = "kernel and rootfs", + .offset = 0x050000, + .size = 0x790000, + }, { + .name = "rootfs", + .offset = 0x1D0000, + .size = 0x610000, + }, { + .name = "nvram", + .offset = 0x7E0000, + .size = 0x010000, + }, { + .name = "factory", + .offset = 0x7F0000, + .size = 0x010000, + } +}; +#endif /* CONFIG_MTD_PARTITIONS */ + +static struct physmap_flash_data f5d8235_flash_data = { +#ifdef CONFIG_MTD_PARTITIONS + .nr_parts = ARRAY_SIZE(f5d8235_partitions), + .parts = f5d8235_partitions, +#endif +}; + +static struct rtl8366_platform_data f5d8235_rtl8366s_data = { + .gpio_sda = F5D8235_GPIO_RTL8366_SDA, + .gpio_sck = F5D8235_GPIO_RTL8366_SCK, +}; + +static struct platform_device f5d8235_rtl8366s_device = { + .name = RTL8366S_DRIVER_NAME, + .id = -1, + .dev = { + .platform_data = &f5d8235_rtl8366s_data, + } +}; + +static struct gpio_led f5d8235_leds_gpio[] __initdata = { + { + .name = "f5d8234-v1:blue:storage", + .gpio = F5D8235_GPIO_LED_USB_BLUE, + .active_low = 1, + },{ + .name = "f5d8234-v1:orange:storage", + .gpio = F5D8235_GPIO_LED_USB_ORANGE, + .active_low = 1, + } +}; + +static struct gpio_button f5d8235_gpio_buttons[] __initdata = { + { + .desc = "reset", + .type = EV_KEY, + .code = KEY_RESTART, + .threshold = 3, + .gpio = F5D8235_GPIO_BUTTON_RESET, + .active_low = 1, + }, { + .desc = "wps", + .type = EV_KEY, + .code = KEY_WPS_BUTTON, + .threshold = 3, + .gpio = F5D8235_GPIO_BUTTON_WPS, + .active_low = 1, + } +}; + +static void __init f5d8235_init(void) +{ + rt288x_gpio_init(RT2880_GPIO_MODE_UART0 | RT2880_GPIO_MODE_I2C); + + rt288x_register_flash(0, &f5d8235_flash_data); + rt288x_register_wifi(); + rt288x_register_wdt(); + + ramips_register_gpio_leds(-1, ARRAY_SIZE(f5d8235_leds_gpio), + f5d8235_leds_gpio); + + ramips_register_gpio_buttons(-1, F5D8235_BUTTONS_POLL_INTERVAL, + ARRAY_SIZE(f5d8235_gpio_buttons), + f5d8235_gpio_buttons); + + platform_device_register(&f5d8235_rtl8366s_device); + + rt288x_eth_data.speed = SPEED_1000; + rt288x_eth_data.duplex = DUPLEX_FULL; + rt288x_eth_data.tx_fc = 1; + rt288x_eth_data.rx_fc = 1; + rt288x_register_ethernet(); +} + +MIPS_MACHINE(RAMIPS_MACH_F5D8235_V1, "F5D8235_V1", + "Belkin F5D8235 v1", f5d8235_init); --- target/linux/ramips/files/arch/mips/ralink/rt288x/Makefile (wersja 29611) +++ target/linux/ramips/files/arch/mips/ralink/rt288x/Makefile (kopia robocza) @@ -13,6 +13,9 @@ obj-$(CONFIG_EARLY_PRINTK) += early_printk.o +obj-$(CONFIG_RT288X_MACH_F5D8235_V1) += mach-f5d8235-v1.o + obj-$(CONFIG_RT288X_MACH_RT_N15) += mach-rt-n15.o obj-$(CONFIG_RT288X_MACH_WZR_AGL300NH) += mach-wzr-agl300nh.o + --- target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt288x_regs.h (wersja 29611) +++ target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt288x_regs.h (kopia robocza) @@ -29,7 +29,7 @@ #define RT2880_PCI_BASE 0x00440000 #define RT2880_WMAC_BASE 0x00480000 #define RT2880_FLASH1_BASE 0x01000000 -#define RT2880_FLASH0_BASE 0x1fc00000 +#define RT2880_FLASH0_BASE 0x1dc00000 #define RT2880_SDRAM_BASE 0x08000000 #define RT2880_SYSC_SIZE 0x100 @@ -40,7 +40,7 @@ #define RT2880_PIO_SIZE 0x100 #define RT2880_UART1_SIZE 0x100 #define RT2880_FLASH1_SIZE (16 * 1024 * 1024) -#define RT2880_FLASH0_SIZE (4 * 1024 * 1024) +#define RT2880_FLASH0_SIZE (32 * 1024 * 1024) /* SYSC registers */ #define SYSC_REG_CHIP_NAME0 0x000 /* Chip Name 0 */ --- target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h (wersja 29611) +++ target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h (kopia robocza) @@ -14,6 +14,7 @@ enum ramips_mach_type { RAMIPS_MACH_GENERIC, /* RT2880 based machines */ + RAMIPS_MACH_F5D8235_V1, /* Belkin F5D8235 v1 */ RAMIPS_MACH_RT_N15, /* Asus RT-N15 */ RAMIPS_MACH_WZR_AGL300NH, /* Buffalo WZR-AGL300NH */ --- target/linux/ramips/image/Makefile (wersja 29611) +++ target/linux/ramips/image/Makefile (kopia robocza) @@ -247,7 +247,11 @@ $(call Image/Build/Template/F5D8235V2,$(1),f5d8235v2,F5D8235_V2) endef +define Image/Build/Template/F5D8235V1 + $(call BuildFirmware/Generic,$(1),$(2),board=$(3),mtdlayout_f5d8235,$(mtd_f5d8235_kernel_part_size),$(mtd_f5d8235_rootfs_part_size)) +endef + mtdlayout_wr5123gn=mtdparts=physmap-flash.0:192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro,832k(kernel),2944k(rootfs),3776k@0x50000(firmware) mtdlayout_wr5123gn8m=mtdparts=physmap-flash.0:192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro,832k(kernel),7040k(rootfs),7872k@0x50000(firmware) define Image/Build/Profile/WR5123GN @@ -255,7 +259,6 @@ $(call BuildFirmware/Generic,$(1),wr512-3gn-8M,board="WR512-3GN",mtdlayout_wr5123gn8m,851968,7208960) endef - ifeq ($(CONFIG_RALINK_RT305X),y) define Image/Build/Profile/Default $(call Image/Build/Profile/ARGUS_ATP52B,$(1)) @@ -279,6 +282,9 @@ endef endif +define Image/Build/Profile/F5D8235V1 + $(call Image/Build/Template/F5D8235V1,$(1),f5d8235v1,F5D8235_V1) +endef define Image/Build/Profile/RTN15 $(call Image/Build/Template/GENERIC_4M,$(1),rt-n15,RT-N15) @@ -286,6 +292,7 @@ ifeq ($(CONFIG_RALINK_RT288X),y) define Image/Build/Profile/Default + $(call Image/Build/Profile/F5D8235V1,$(1)) $(call Image/Build/Profile/RTN15,$(1)) endef endif --- target/linux/ramips/base-files/lib/ramips.sh (wersja 29611) +++ target/linux/ramips/base-files/lib/ramips.sh (kopia robocza) @@ -65,6 +65,9 @@ *"ESR-9753") name="esr-9753" ;; + *"F5D8235 v1") + name="f5d8235-v1" + ;; *"F5D8235 v2") name="f5d8235-v2" ;; --- target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom (wersja 29611) +++ target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom (kopia robocza) @@ -41,6 +41,7 @@ rt2x00_eeprom_extract "devconf" 0 272 ;; + f5d8235-v1 | \ f5d8235-v2) rt2x00_eeprom_extract "u-boot" 262144 272 ;; --- target/linux/ramips/base-files/etc/uci-defaults/network (wersja 29611) +++ target/linux/ramips/base-files/etc/uci-defaults/network (kopia robocza) @@ -30,6 +30,7 @@ ucidef_add_switch_vlan "rtl8366rb" "2" "4 5t" ;; + f5d8235-v1 | \ rt-n15) ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "rtl8366s" "1" "1" @@ -62,6 +63,7 @@ argus-atp52b | \ b2c | \ + f5d8235-v1 | \ nw718 | \ rt-n15 | \ wl-351) --- target/linux/ramips/base-files/etc/diag.sh (wersja 29611) +++ target/linux/ramips/base-files/etc/diag.sh (kopia robocza) @@ -36,6 +36,9 @@ esr-9753) status_led="esr-9753:orange:power" ;; + f5d8235-v1) + set_usb_led "f5d8235-v1:green:usb" + ;; fonera20n) status_led="fonera20n:green:power" ;; -- Pozdrawiam, Cezary Jackiewicz _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
