[OpenWrt-Devel] [PATCH] lantiq: add support for ARV7506PW11 (Alice/O2 IAD 4421)

Mathias Kresin dev at kresin.me
Wed May 18 07:19:59 EDT 2016


I got the same device last Weekend and planned to add support for this
device during the next days. Glad to see that most of the work is
already done.

Find my remarks in-line.

2016-05-18 9:37 GMT+02:00 Oswald Buddenhagen <oswald.buddenhagen at gmx.de>:
> Ethernet, WiFi, ADSL2+, and LEDS are fully functional.
>
> The RFkill switch doesn't appear to be correctly configured.
>
> Supporting the two TAE ports and SIP gateway was not attempted.
>
> The firmware image needs to be kept below ~3.6MiB due to brnboot's dual
> image magic. This is just enough for the above configuration plus
> dropbear. Luci and other non-critical packages must be installed into
> the jffs2 once the device has booted.
>
> U-boot support was not attempted.

I'll give it a try. Lately, I worked a lot with u-boot, so I'm
confident that it shouldn't be that problem.

But I need to identify the boot_sel pins first. I have looked at it
only briefly and was only able to identify one of the boot_sel pins:
R77. Unfortunately this pin alone doesn't switch the SoC to UART mode.
Did you found already the other pins?

> Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen at gmx.de>
> ---
>  .../linux/lantiq/base-files/etc/board.d/02_network |   8 +
>  .../etc/hotplug.d/firmware/10-rt2x00-eeprom        |   2 +-
>  target/linux/lantiq/dts/ARV7506PW11.dts            | 213 +++++++++++++++++++++
>  target/linux/lantiq/image/Makefile                 |   2 +
>  target/linux/lantiq/xway/profiles/arv.mk           |  12 ++
>  5 files changed, 236 insertions(+), 1 deletion(-)
>  create mode 100644 target/linux/lantiq/dts/ARV7506PW11.dts
>
> diff --git a/target/linux/lantiq/base-files/etc/board.d/02_network b/target/linux/lantiq/base-files/etc/board.d/02_network
> index b27b802..1f06c26 100755
> --- a/target/linux/lantiq/base-files/etc/board.d/02_network
> +++ b/target/linux/lantiq/base-files/etc/board.d/02_network
> @@ -39,6 +39,14 @@ ACMP252|GIGASX76X)
>                 "4:lan:1" "3:lan:2" "2:lan:3" "1:lan:4" "5t at eth0"
>         ;;
>
> +# rtl8306g
> +ARV7506PW11)
> +       lan_mac=$(mtd_get_mac_binary board_config 22)
> +       wan_mac=$(macaddr_add "$lan_mac" 1)
> +       ucidef_add_switch "switch0" \
> +               "4:lan:1" "3:lan:2" "2:lan:3" "1:lan:4" "5t at eth0"
> +       ;;
> +
>  # ar8316
>  ARV4519PW|ARV7510PW22|ARV7518PW|ARV752DPW22|ARV8539PW22)
>         ucidef_add_switch "switch0" \
> diff --git a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
> index 5f1cb00..da10797 100644
> --- a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
> +++ b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
> @@ -35,7 +35,7 @@ case "$FIRMWARE" in
>  "RT2860.eeprom" )
>         local board=$(lantiq_board_name)
>         case $board in
> -       ARV7510PW22|ARV7519PW|ARV752DPW|ARV752DPW22|VGV7519)
> +       ARV7506PW11|ARV7510PW22|ARV7519PW|ARV752DPW|ARV752DPW22|VGV7519)
>                 rt2x00_eeprom_extract "board_config" 520 256 1
>                 ;;
>         ARV7525PW)
> diff --git a/target/linux/lantiq/dts/ARV7506PW11.dts b/target/linux/lantiq/dts/ARV7506PW11.dts
> new file mode 100644
> index 0000000..bb9ffd4
> --- /dev/null
> +++ b/target/linux/lantiq/dts/ARV7506PW11.dts
> @@ -0,0 +1,213 @@
> +/dts-v1/;
> +
> +/include/ "danube.dtsi"
> +
> +/ {
> +       model = "ARV7506PW11 - Alice/O2 IAD 4421";
> +
> +       chosen {
> +               leds {
> +                       boot = &power;
> +                       failsafe = &power_red;
> +                       running = &power;
> +
> +                       dsl = &dsl;
> +                       internet = &internet;
> +                       wifi = &wlan;
> +               };
> +       };
> +
> +       memory at 0 {
> +               reg = <0x0 0x4000000>;
> +       };
> +
> +       sram at 1F000000 {
> +               vmmc at 107000 {
> +                       status = "okay";
> +                       gpios = <&gpiomm 1 0>;
> +               };
> +       };
> +
> +       fpi at 10000000 {
> +               localbus at 0 {
> +                       nor-boot at 0 {
> +                               compatible = "lantiq,nor";
> +                               bank-width = <2>;
> +                               reg = <0 0x0 0x800000>;
> +
> +                               partitions {
> +                                       compatible = "fixed-partitions";
> +                                       #address-cells = <1>;
> +                                       #size-cells = <1>;
> +
> +                                       partition at 0 {
> +                                               label = "brnboot";
> +                                               reg = <0x00000 0x20000>;
> +                                               read-only;
> +                                       };
> +
> +                                       partition at 20000 {
> +                                               label = "stuff";
> +                                               reg = <0x20000 0x70000>;
> +                                       };

Please add the real layout here and use proper names for the partitions!

> +
> +                                       partition at 90000 {
> +                                               label = "rootfs_data";
> +                                               reg = <0x90000 0x3B0000>;
> +                                       };
> +
> +                                       partition at 440000 {
> +                                               label = "firmware";
> +                                               reg = <0x440000 0x3B0000>;
> +                                       };

Assuming you're using the brnboot recovery to flash the firmware, this
wont work. brnboot recovery writes alternating to both partitions and
stores the current active one in the Primary Setting partition
(0x80000). Which could results in a situation that the kernel is
stored (and booted) at 0x90000 but the userland + kmods are loaded
from 0x440000. This could lead to a lot of errors and your additional
flash space for volatile data isn't available as well. My patch to use
the current active partition as firmware partition was merged lately
to OpenWrt. Have a look at the VGV7510KW22BRN.dts for reference.

As you already noticed, OpenWrt isn't really usable on devices with a
firmware partition <= 4MB. I would even say, that such are not longer
supported. But that is something the core devs need to decide.

Anyway, I would suggest to focus on u-boot + a custom partition layout
to have enough space for luci and so on.

Mathias
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list