[OpenWrt-Devel] [PATCH] imx6: sysupgrade: document Apalis code handiing rootfs_data

2019-07-16 Thread Rafał Miłecki
From: Rafał Miłecki 

It should help people understand that code and prevent breaking it
during some cleanups.

Signed-off-by: Rafał Miłecki 
---
 target/linux/imx6/base-files/lib/upgrade/platform.sh | 4 
 1 file changed, 4 insertions(+)

diff --git a/target/linux/imx6/base-files/lib/upgrade/platform.sh 
b/target/linux/imx6/base-files/lib/upgrade/platform.sh
index c3be9d5424..a290a469ad 100755
--- a/target/linux/imx6/base-files/lib/upgrade/platform.sh
+++ b/target/linux/imx6/base-files/lib/upgrade/platform.sh
@@ -78,6 +78,10 @@ platform_pre_upgrade() {
 
case "$board" in
apalis*)
+   # On Apalis overlay doesn't get overwriten so it has to be
+   # cleared manually. Call jffs2reset which finds "rootfs_data"
+   # volume (eMMC F2FS partition with such a label) and erases all
+   # files from it.
[ "$SAVE_CONFIG" -eq 0 ] && {
jffs2reset -y
umount /overlay
-- 
2.21.0


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ar71xx: enable QCA955x SGMII fixup on Mikrotik wAP AC

2019-07-16 Thread Etienne Champetier
Hi David,

Le lun. 15 juil. 2019 à 01:58, David Bauer  a écrit :
>
> Hello Etienne,
>
> On 15.07.19 04:30, Etienne Champetier wrote:
> > Hi David,
> >
> > Le dim. 14 juil. 2019 à 04:25, David Bauer  a écrit :
> >>
> >> Hi Etienne,
> >>
> >> one small remark:
> >>
> >> On 14.07.19 04:43, Etienne Champetier wrote:
> >>>   ath79_init_mac(ath79_eth1_data.mac_addr, ath79_mac_base, 0);
> >>>   ath79_eth1_data.mii_bus_dev = _phy_device.dev;
> >>>   ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
> >>>   ath79_eth1_data.phy_mask = BIT(RBWAPGSC_MDIO_PHYADDR);
> >>> + ath79_eth1_data.enable_sgmii_fixup = 1;
> >>
> >> This should be dropped as it's not necessary anymore.
> >
> > Did some more tests and it's definitely needed (here this is ar71xx &
> > Linux 4.14)
> > It's still used for other boards, could you detail why it's not needed
> > anymore, since what version, reference some commits ?
>
> You are right, it is needed. I was only focused on the workaround for the PHY 
> side,
> but we indeed explicitly need to enable the MAC side workaround too.
>
> So this looks good to me.

Saw that you applied it to master, I just tested the patch on 19.07, works fine
Do you want me to send the patch again, or can you just cherry-pick it ?
(git cherry-pick 2a7519e29d6cbbe1eb73623ef35add0ef596fb5f)

Thanks
Etienne

>
> Best wishes
> David
>
> >
> > Thanks
> > Etienne
> >
> >>
> >> Best wishes
> >> David
> >>
> >>>   ath79_eth1_pll_data.pll_1000 = 0x03000101;
> >>>   ath79_eth1_pll_data.pll_100 = 0x8101;
> >>>   ath79_eth1_pll_data.pll_10 = 0x80001313;
> >>>

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/3] imx6: get rid of platform_pre_upgrade()

2019-07-16 Thread Rafał Miłecki

On 2019-07-12 14:05, Rafał Miłecki wrote:

From: Rafał Miłecki 

The only step between platform_pre_upgrade() and platform_do_upgrade()
is switching to ramdisk. It should be fine to call "jffs2reset" &
"umount" from the later callback and get rid of the first one.

Signed-off-by: Rafał Miłecki 


That patch was wrong. On imx6 "jffs2reset -y" has to be called in
platform_pre_upgrade() AKA before the switch_to_ramfs().

jffs2reset finds "rootfs_data" volume (emmc f2fs partition with
"rootfs_data" label) and erases all files from it:

/dev/loop0 is mounted as /overlay, only erasing files


It cannot be handled after switch_to_ramfs() as that function umounts
/overlay.

Big thanks for Petr for checking that with me!

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ramips: mt7621: Add new device AsiaRF AP7621-NV1

2019-07-16 Thread Daniel Danzberger
SoC:Mediatek MT7621A
CPU:4x 880Mhz
Cache:  32 KB I-Cache and 32 KB D-Cach
256 KB L2 Cache (shared by Dual-Core)
RAM:DDR3 512MB 16bits BUS
FLASH:  16MB
Switch: Mediatek Gigabit Switch (2 x LAN, 1 x WAN)
POE:(1x PD, 2x PSE)
USB:1x 3.0
PCI:3x Mini PCIe (3 USB2.0 + 2 x UIM interface)
GPS:Quectel L70B
SIM:2 Slots
BTN:Reset
LED:- Power
- Ethernet
- Wifi
- USB
UART:  UART is present as Pads with throughholes on the PCB.
   They are located on left side.
   3.3V - RX - GND - TX / 57600-8N1
   3.3V is the square pad

Installation

The stock image is a modified openwrt and can be overflashed via sysupgrade 
-F

Signed-off-by: Daniel Danzberger 
---
 target/linux/ramips/base-files/etc/board.d/02_network |  3 +++
 target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts  |  9 +
 target/linux/ramips/image/mt7621.mk   | 10 ++
 3 files changed, 22 insertions(+)
 create mode 100644 target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts

diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
b/target/linux/ramips/base-files/etc/board.d/02_network
index c3b7cd4390..c348b91a36 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -228,6 +228,9 @@ ramips_setup_interfaces()
asiarf,ap7621-001)
ucidef_add_switch "switch0" "0:lan" "4:wan" "6@eth0"
;;
+   asiarf,ap7621-nv1)
+   ucidef_add_switch "switch0" "0:wan" "2:lan" "3:lan" "6@eth0"
+   ;;
asiarf,awapn2403)
ucidef_add_switch "switch0" \
"0:lan" "1:wan" "6@eth0"
diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts 
b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts
new file mode 100644
index 00..93af3950d2
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+#include "mt7621_asiarf_ap7621-001.dts"
+
+/ {
+   compatible = "asiarf,ap7621-nv1", "mediatek,mt7621-soc";
+   model = "AsiaRF AP7621-NV1";
+};
diff --git a/target/linux/ramips/image/mt7621.mk 
b/target/linux/ramips/image/mt7621.mk
index e2928c80ce..1eb1a4cb99 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -106,6 +106,16 @@ define Device/asiarf_ap7621-001
 endef
 TARGET_DEVICES += asiarf_ap7621-001
 
+define Device/asiarf_ap7621-nv1
+  MTK_SOC := mt7621
+  IMAGE_SIZE := $(ralink_default_fw_size_16M)
+  DEVICE_VENDOR := AsiaRF
+  DEVICE_MODEL := AP7621-NV1
+  DEVICE_PACKAGES := \
+   kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3
+endef
+TARGET_DEVICES += asiarf_ap7621-nv1
+
 define Device/asus_rt-ac57u
   MTK_SOC := mt7621
   DEVICE_VENDOR := ASUS
-- 
2.20.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel