[OpenWrt-Devel] [PATCH 2/2] uboot-lantiq: Add support for Arcadyan ARV8539PW22 (Speedport W 504V)

2015-07-01 Thread Jannis Pinter
uboot-lantiq: Add support for Arcadyan ARV8539PW22 (Speedport W 504V) 

Signed-off-by: Jannis Pinter jan...@pinterjann.is
---
diff --git a/package/boot/uboot-lantiq/Makefile 
b/package/boot/uboot-lantiq/Makefile
index b396ab7..99b101f 100644
--- a/package/boot/uboot-lantiq/Makefile
+++ b/package/boot/uboot-lantiq/Makefile
@@ -150,6 +150,25 @@ define uboot/arv752dpw22_brn
   DEPS:=@TARGET_lantiq_xway_ARV752DPW22
 endef
 
+define uboot/arv8539pw22_ram
+  TITLE:=U-Boot for Speedport W 504V Typ A (RAM)
+  SOC:=danube
+  DDR_SETTINGS:=board/arcadyan/arv8539pw22/ddr_settings.h
+  DEPS:=@TARGET_lantiq_xway_ARV8539PW22
+endef
+
+define uboot/arv8539pw22_nor
+  TITLE:=U-Boot for Speedport W 504V Typ A (NOR)
+  SOC:=danube
+  DEPS:=@TARGET_lantiq_xway_ARV8539PW22
+endef
+
+define uboot/arv8539pw22_brn
+  TITLE:=U-Boot for Speedport W 504V Typ A (BRN)
+  SOC:=danube
+  DEPS:=@TARGET_lantiq_xway_ARV8539PW22
+endef
+
 define uboot/gigasx76x_ram
   TITLE:=U-Boot for Siemens Gigaset sx76x (RAM)
   SOC:=danube
@@ -283,6 +302,7 @@ UBOOTS:= \
arv7518pw_ram arv7518pw_nor arv7518pw_brn \
arv752dpw_ram arv752dpw_nor arv752dpw_brn \
arv752dpw22_ram arv752dpw22_nor arv752dpw22_brn \
+arv8539pw22_brn arv8539pw22_nor arv8539pw22_ram \
gigasx76x_ram gigasx76x_nor \
acmp252_ram acmp252_nor \
easy50712_ram easy50712_nor easy50712_norspl \
diff --git 
a/package/boot/uboot-lantiq/patches/0044-MIPS-add-board-support-for-Arcadyan-ARV8539PW22.patch
 
b/package/boot/uboot-lantiq/patches/0044-MIPS-add-board-support-for-Arcadyan-ARV8539PW22.patch
new file mode 100644
index 000..089529b
--- /dev/null
+++ 
b/package/boot/uboot-lantiq/patches/0044-MIPS-add-board-support-for-Arcadyan-ARV8539PW22.patch
@@ -0,0 +1,240 @@
+--- /dev/null
 b/board/arcadyan/arv8539pw22/Makefile
+@@ -0,0 +1,28 @@
++#
++# Copyright (C) 2000-2011 Wolfgang Denk, DENX Software Engineering, 
w...@denx.de
++#
++# SPDX-License-Identifier: GPL-2.0+
++#
++
++include $(TOPDIR)/config.mk
++
++LIB= $(obj)lib$(BOARD).o
++
++COBJS  = $(BOARD).o
++
++SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
++OBJS   := $(addprefix $(obj),$(COBJS))
++SOBJS  := $(addprefix $(obj),$(SOBJS))
++
++$(LIB):$(obj).depend $(OBJS) $(SOBJS)
++  $(call cmd_link_o_target, $(OBJS) $(SOBJS))
++
++#
++
++# defines $(obj).depend target
++include $(SRCTREE)/rules.mk
++
++sinclude $(obj).depend
++
++#
++
+--- /dev/null
 b/board/arcadyan/arv8539pw22/arv8539pw22.c
+@@ -0,0 +1,53 @@
++/*
++ * Copyright (C) 2012 Luka Perkov l...@openwrt.org
++ * Copyright (C) 2013 Oliver Muth dr.o.m...@gmx.de
++ *
++ * SPDX-License-Identifier:GPL-2.0+
++ */
++
++#include common.h
++#include switch.h
++#include asm/gpio.h
++#include asm/lantiq/eth.h
++#include asm/lantiq/reset.h
++#include asm/lantiq/chipid.h
++
++int board_early_init_f(void)
++{
++   return 0;
++}
++
++int checkboard(void)
++{
++   puts(Board:  CONFIG_BOARD_NAME \n);
++   ltq_chip_print_info();
++
++   return 0;
++}
++
++static const struct ltq_eth_port_config eth_port_config[] = {
++   /* MAC0: Atheros ar8216 switch */
++   { 0, 0x0, LTQ_ETH_PORT_SWITCH, PHY_INTERFACE_MODE_MII },
++};
++
++static const struct ltq_eth_board_config eth_board_config = {
++   .ports = eth_port_config,
++   .num_ports = ARRAY_SIZE(eth_port_config),
++};
++
++int board_eth_init(bd_t *bis)
++{
++   return ltq_eth_initialize(eth_board_config);
++}
++
++static struct switch_device ar8216_dev = {
++   .name = ar8216,
++   .cpu_port = 0,
++   .port_mask = 0xF,
++};
++
++int board_switch_init(void)
++{
++   return switch_device_register(ar8216_dev);
++}
++
+--- /dev/null
 b/board/arcadyan/arv8539pw22/config.mk
+@@ -0,0 +1,8 @@
++#
++# Copyright (C) 2011-2013 Daniel Schwierzeck, daniel.schwierz...@gmail.com
++#
++# SPDX-License-Identifier: GPL-2.0+
++#
++
++PLATFORM_CPPFLAGS += -I$(TOPDIR)/board/$(BOARDDIR)
++
+--- /dev/null
 b/board/arcadyan/arv8539pw22/ddr_settings.h
+@@ -0,0 +1,55 @@
++/*
++ * Copyright (C) 2011-2013 Luka Perkov l...@openwrt.org
++ *
++ * This file has been generated with lantiq_ram_extract_magic.awk script. 
++ *
++ * SPDX-License-Identifier:GPL-2.0+
++ */
++
++#define MC_DC00_VALUE  0x1B1B
++#define MC_DC01_VALUE  0x0
++#define MC_DC02_VALUE  0x0
++#define MC_DC03_VALUE  0x0
++#define MC_DC04_VALUE  0x0
++#define MC_DC05_VALUE  0x200
++#define MC_DC06_VALUE  0x605
++#define MC_DC07_VALUE  0x303
++#define MC_DC08_VALUE  0x102
++#define MC_DC09_VALUE  0x70A
++#define MC_DC10_VALUE  0x203
++#define MC_DC11_VALUE  0xC02
++#define MC_DC12_VALUE  0x1C8
++#define MC_DC13_VALUE  0x1
++#define MC_DC14_VALUE  0x0
++#define MC_DC15_VALUE  0x134
++#define MC_DC16_VALUE  0xC800
++#define MC_DC17_VALUE  0xD
++#define MC_DC18_VALUE  0x301
++#define MC_DC19_VALUE  0x200
++#define MC_DC20_VALUE

Re: [OpenWrt-Devel] For RG100A-AA, How to modify the default value of /etc/config/network?

2015-07-01 Thread Jannis Pinter
Hi zhengfish,

 I want to modify the default value of /etc/config/network while I build
 the images for RG100A-AA.
 I tried to modify this file --
 package/base-files/files/etc/config/network, but it seems have no effect.
 Which file should I modify?

to include custom files (e.g. config files) in your OpenWrt images,
create the directory files in your buildroot environment.

If you want to include a modified /etc/config/network in your builds,
create and adjust the following file:
buildroot dir/files/etc/config/network

There is some more information about this in the wiki [1].

[1] http://wiki.openwrt.org/doc/howto/build#custom_files

Regards,
Jannis




signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] lantiq: Add support for Arcadyan ARV8539PW22 (Speedport W 504V)

2015-07-01 Thread Jannis Pinter
lantiq: Add support for Arcadyan ARV8539PW22 (Speedport W 504V)

Signed-off-by: Jannis Pinter jan...@pinterjann.is
---
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds 
b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
index 8041ac9..2c97153 100644
--- a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
@@ -51,6 +51,13 @@ P2812HNUF*)
ucidef_set_led_netdev dsl dsl dsl nas0
ucidef_set_led_netdev internet_green internet_green 
internet_green pppoe-wan
;;
+ARV8539PW22)
+ucidef_set_led_default power power soc:green:power 1
+ucidef_set_led_default power2 power2 soc:red:power 0
+ucidef_set_led_wlan wifi wifi soc:green:wireless phy0tpt
+ucidef_set_led_netdev dsl dsl soc:green:dsl nas0
+ucidef_set_led_netdev online online soc:green:online pppoe-wan
+;;
 *)
;;
 esac
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/02_network 
b/target/linux/lantiq/base-files/etc/uci-defaults/02_network
index afb8714..d5ee62c 100644
--- a/target/linux/lantiq/base-files/etc/uci-defaults/02_network
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_network
@@ -93,7 +93,7 @@ ACMP252|GIGASX76X)
;;
 
 # ar8316
-ARV4519PW|ARV7510PW22|ARV7518PW|ARV752DPW22)
+ARV4519PW|ARV7510PW22|ARV7518PW|ARV752DPW22|ARV8539PW22)
ucidef_set_interface_lan eth0.1
ucidef_add_switch switch0 1 1
ucidef_add_switch_vlan switch0 1 0t 2 3 4 5
diff --git a/target/linux/lantiq/dts/ARV8539PW22.dts 
b/target/linux/lantiq/dts/ARV8539PW22.dts
new file mode 100644
index 000..acca47f
--- /dev/null
+++ b/target/linux/lantiq/dts/ARV8539PW22.dts
@@ -0,0 +1,162 @@
+/dts-v1/;
+
+/include/ danube.dtsi
+
+/ {
+model = ARV8539PW22 - Speedport W 504V Typ A;
+
+memory@0 {
+reg = 0x0 0x400;
+};
+
+sram@1F00 {
+vmmc@107000 {
+status = okay;
+gpios = gpio 31 0;
+};
+};
+
+fpi@1000 {
+localbus@0 {
+nor-boot@0 {
+compatible = lantiq,nor;
+bank-width = 2;
+reg = 0 0x0 0x80;
+#address-cells = 1;
+#size-cells = 1;
+
+partition@0 {
+label = uboot;
+reg = 0x0 0x3;/* 192 
KiB */
+read-only;
+};
+
+partition@3 {
+label = uboot;
+reg = 0x3 0x1;/* 64 
KiB */
+read-only;
+};
+
+partition@4 {
+label = firmware;
+reg = 0x4 0x7B;   /* 
7872 KiB */
+};
+
+partition@7F {
+label = art;
+reg = 0x7F 0x1;   /* 64 
KiB*/
+read-only;
+};
+};
+
+mac_addr {
+compatible = lantiq,eth-mac;
+reg = 0 0x7f0016 0x6;
+mac-increment = 2;
+};
+
+ath9k_eep {
+compatible = ath9k,eeprom;
+reg = 0 0x7f0400 0x1000
+0 0x7f0016 0x6;
+ath,mac-increment = 1;
+ath,pci-slot = 14;
+ath,eep-endian;
+ath,arv-ath9k-fix;
+};
+};
+
+gpio: pinmux@E100B10 {
+pinctrl-names = default;
+pinctrl-0 = state_default;
+
+state_default: pinmux {
+
+pci_in {
+lantiq,groups = req1;
+lantiq,function = pci;
+lantiq,open-drain = 1;
+lantiq,pull = 2;
+lantiq,output = 0;
+};
+pci_out {
+lantiq,groups = gnt1;
+lantiq