ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
lamobo,lamobo-r1)
- ucidef_add_switch "switch0" \
- "4:lan:1" "0:lan:2" "1:lan:3" "2:lan:4" "3:wan" "8@eth0"
+ ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan
;;
olimex,a20-olinuxino-micro)
ucidef_set_interface_lan "wlan0"
--- /dev/null
+
+. /lib/functions.sh
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+case "$(board_name)" in
+ lamobo,lamobo-r1)
+ ucidef_set_compat_version "1.1"
+ ;;
+esac
+
+board_config_flush
+
+exit 0
+++ /dev/null
-do_b53_hack() {
- . /lib/functions.sh
-
- # hack: enable switch on Lamobo R1 and reset counters
- case $(board_name) in
- lamobo,lamobo-r1)
- ip link set eth0 up
- sleep 1
- swconfig dev switch0 set reset 1
- swconfig dev switch0 set reset_mib 1
- swconfig dev switch0 set apply 1
- ;;
- esac
-}
-
-boot_hook_add preinit_main do_b53_hack
CONFIG_SUNXI_WATCHDOG=y
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
-CONFIG_SWCONFIG=y
-CONFIG_SWCONFIG_B53=y
-CONFIG_SWCONFIG_B53_PHY_DRIVER=y
-CONFIG_SWCONFIG_B53_PHY_FIXUP=y
CONFIG_SWIOTLB=y
CONFIG_SWPHY=y
CONFIG_SWP_EMULATE=y
# CONFIG_USB_MUSB_HOST is not set
CONFIG_USB_MUSB_SUNXI=y
CONFIG_USB_PHY=y
+CONFIG_NET_DEVLINK=y
+CONFIG_NET_DSA=y
+CONFIG_NET_DSA_TAG_BRCM=y
+CONFIG_NET_DSA_TAG_BRCM_COMMON=y
+CONFIG_NET_DSA_TAG_BRCM_PREPEND=y
+CONFIG_NET_SWITCHDEV=y
+CONFIG_B53=y
+CONFIG_B53_MDIO_DRIVER=y
+# CONFIG_B53_MMAP_DRIVER is not set
+# CONFIG_B53_SERDES is not set
+# CONFIG_B53_SPI_DRIVER is not set
+# CONFIG_B53_SRAB_DRIVER is not set
define Device/lamobo_lamobo-r1
DEVICE_VENDOR := Lamobo
DEVICE_MODEL := Lamobo R1
- DEVICE_PACKAGES:=kmod-ata-sunxi kmod-rtl8192cu swconfig wpad-basic-wolfssl
+ DEVICE_ALT0_VENDOR := Bananapi
+ DEVICE_ALT0_MODEL := BPi-R1
+ DEVICE_PACKAGES := kmod-ata-sunxi kmod-rtl8192cu wpad-basic-wolfssl
+ DEVICE_COMPAT_VERSION := 1.1
+ DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
SOC := sun7i-a20
endef
TARGET_DEVICES += lamobo_lamobo-r1
+++ /dev/null
-From 49cd9ea6dc8d68eb519ccd9f31c9730dec8a181a Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke@hauke-m.de>
-Date: Thu, 8 Mar 2018 22:14:50 +0100
-Subject: [PATCH] Revert "ARM: dts: sun7i: Add BCM53125 switch nodes to the
- lamobo-r1 board"
-
-This reverts the changes needed for the upstream b53 DSA switch driver
-to use the OpenWrt b43 swconfig switch driver.
-
-This reverts commit 0cdefd5b5485ee6eb3512a75739d09a4090176ed.
-This reverts commit d7b9eaff5f0ca00726336b4c0c3c29decf30412a.
----
- arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts | 60 ++-----------------------------
- 1 file changed, 3 insertions(+), 57 deletions(-)
-
---- a/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
-+++ b/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
-@@ -120,65 +120,13 @@
- &gmac {
- pinctrl-names = "default";
- pinctrl-0 = <&gmac_rgmii_pins>;
-+ phy = <&phy1>;
- phy-mode = "rgmii";
- phy-supply = <®_gmac_3v3>;
- status = "okay";
-
-- fixed-link {
-- speed = <1000>;
-- full-duplex;
-- };
--
-- mdio {
-- compatible = "snps,dwmac-mdio";
-- #address-cells = <1>;
-- #size-cells = <0>;
--
-- switch: ethernet-switch@1e {
-- compatible = "brcm,bcm53125";
-- reg = <30>;
--
-- ports {
-- #address-cells = <1>;
-- #size-cells = <0>;
--
-- port0: port@0 {
-- reg = <0>;
-- label = "lan2";
-- };
--
-- port1: port@1 {
-- reg = <1>;
-- label = "lan3";
-- };
--
-- port2: port@2 {
-- reg = <2>;
-- label = "lan4";
-- };
--
-- port3: port@3 {
-- reg = <3>;
-- label = "wan";
-- };
--
-- port4: port@4 {
-- reg = <4>;
-- label = "lan1";
-- };
--
-- port8: port@8 {
-- reg = <8>;
-- label = "cpu";
-- ethernet = <&gmac>;
-- phy-mode = "rgmii-txid";
-- fixed-link {
-- speed = <1000>;
-- full-duplex;
-- };
-- };
-- };
-- };
-+ phy1: ethernet-phy@1 {
-+ reg = <1>;
- };
- };
-