[PATCH v3 2/2] ipq40xx: add support for Wallystech DR40x9

2023-03-20 Thread Koen Vandeputte
From: Robert Marko 

Adds support for the Wallys DR40x9 series boards.
They come in IPQ4019 and IPQ4029 versions.
IPQ4019/4029 only differ in that that IPQ4029 is the industrial version that is 
rated to higher temperatures.

Specifications are:
* CPU: Qualcomm IPQ40x9 (4x ARMv7A Cortex A7) at 716 MHz
* RAM: 512 MB
* Storage: 2MB of SPI-NOR, 128 MB of parallel NAND
* USB 3.0 TypeA port for users
* MiniPCI-E with PCI-E 2.0 link
* MiniPCI-E for LTE modems with only USB2.0 link
* 2 SIM card slots that are selected via GPIO11
* MicroSD card slot
* Ethernet: 2x GBe with 24~48V passive POE
* SFP port (Does not work, I2C and GPIO's not connected on hardware)
* DC Jack
* UART header
* WLAN: In-SoC 2x2 802.11b/g/n and 2x2 802.11a/n/ac
* 4x MMCX connectors for WLAN
* Reset button
* 8x LED-s

Installation instructions:
Connect to UART, pins are like this:
-> 3.3V | TX | RX | GND

Settings are 115200 8n1

Boot initramfs from TFTP:
tftpboot 0x8400 
openwrt-ipq40xx-generic-wallys_dr40x9-initramfs-fit-uImage.itb

bootm

Then copy the sysupgrade image to the /tmp folder and execute sysupgrade -n 


The board file binary was provided from Wallystech on March 14th 2023
including full permission to use and distribute.

Signed-off-by: Robert Marko 
Signed-off-by: Koen Vandeputte 
---

v2:
- Remove unused alias
- Use original labels

v3:
- Remove bracketed comments
- get actual bdf from side repo

 package/firmware/ipq-wifi/Makefile|   2 +
 .../ipq40xx/base-files/etc/board.d/02_network |   1 +
 .../base-files/etc/board.d/03_gpio_switches   |   3 +
 .../base-files/lib/upgrade/platform.sh|   3 +-
 .../arch/arm/boot/dts/qcom-ipq40x9-dr40x9.dts | 422 ++
 target/linux/ipq40xx/image/generic.mk |  13 +
 6 files changed, 443 insertions(+), 1 deletion(-)
 create mode 100644 
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq40x9-dr40x9.dts

diff --git a/package/firmware/ipq-wifi/Makefile 
b/package/firmware/ipq-wifi/Makefile
index 846032c96f..f3bf1185f8 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -54,6 +54,7 @@ ALLWIFIBOARDS:= \
redmi_ax6 \
sony_ncp-hg100-cellular \
teltonika_rutx \
+   wallys_dr40x9 \
xiaomi_ax3600 \
xiaomi_ax9000 \
zte_mf18a \
@@ -158,6 +159,7 @@ $(eval $(call 
generate-ipq-wifi-package,qxwlan_e2600ac-c2,Qxwlan E2600AC C2))
 $(eval $(call generate-ipq-wifi-package,redmi_ax6,Redmi AX6))
 $(eval $(call generate-ipq-wifi-package,sony_ncp-hg100-cellular,Sony 
NCP-HG100/Cellular))
 $(eval $(call generate-ipq-wifi-package,teltonika_rutx,Teltonika RUTX))
+$(eval $(call generate-ipq-wifi-package,wallys_dr40x9,Wallys DR40X9))
 $(eval $(call generate-ipq-wifi-package,xiaomi_ax3600,Xiaomi AX3600))
 $(eval $(call generate-ipq-wifi-package,xiaomi_ax9000,Xiaomi AX9000))
 $(eval $(call generate-ipq-wifi-package,zte_mf18a,ZTE MF18A))
diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network 
b/target/linux/ipq40xx/base-files/etc/board.d/02_network
index 3625938e38..37b9ca268b 100644
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
@@ -39,6 +39,7 @@ ipq40xx_setup_interfaces()
mikrotik,cap-ac|\
netgear,wac510|\
sony,ncp-hg100-cellular|\
+   wallys,dr40x9|\
zte,mf18a|\
zte,mf289f)
ucidef_set_interfaces_lan_wan "lan" "wan"
diff --git a/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches 
b/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches
index 4918e2ccc1..f76fe9402d 100644
--- a/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches
+++ b/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches
@@ -32,6 +32,9 @@ mikrotik,hap-ac3-lte6-kit)
 sony,ncp-hg100-cellular)
ucidef_add_gpio_switch "uart_dbgcon_en" "debug console enable" "427" "1"
;;
+wallys,dr40x9)
+   ucidef_add_gpio_switch "sim_card_select" "SIM card select" "423" "0"
+   ;;
 zte,mf286d|\
 zte,mf289f)
ucidef_add_gpio_switch "power_btn_block" "Power button blocker" "421" 
"0"
diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
index 2012213a56..988921fa8c 100644
--- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
@@ -119,7 +119,8 @@ platform_do_upgrade() {
netgear,wac510 |\
p2w,r619ac-64m |\
p2w,r619ac-128m |\
-   qxwlan,e2600ac-c2)
+   qxwlan,e2600ac-c2 |\
+   wallys,dr40x9)
nand_do_upgrade "$1"
;;
glinet,gl-b2200)
diff --git 
a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq40x9-dr40x9.dts 
b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq40x9-dr40x9.dts
new file mode 100644
index 00..b90b6b28c3
--- /dev/null
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq40x9-dr40x9.dts
@@ 

[PATCH v3 1/2] ipq-wifi: bump to latest git HEAD

2023-03-20 Thread Koen Vandeputte
f9cece0 ipq40xx: add support for Wallystech DR40x9

Signed-off-by: Koen Vandeputte 
---
 package/firmware/ipq-wifi/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/firmware/ipq-wifi/Makefile 
b/package/firmware/ipq-wifi/Makefile
index 57cd226bb7..846032c96f 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -6,9 +6,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
-PKG_SOURCE_DATE:=2023-03-19
-PKG_SOURCE_VERSION:=31ff96d9f99f993cb43d79f0c411fe6bf55633bb
-PKG_MIRROR_HASH:=8005a884059925a627024b9022ed06a36ebf4ed7a20e8aab191585afbdd6895f
+PKG_SOURCE_DATE:=2023-03-20
+PKG_SOURCE_VERSION:=f9cece02724b8ca2c1a166a46f0afa89e632d431
+PKG_MIRROR_HASH:=89c20798c7ec83114aa69467f2467fe32cbb74ebeca277c60a033af960ca6c04
 
 PKG_FLAGS:=nonshared
 
-- 
2.34.1


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


Re: netifd Call Flow - WiFi

2023-03-20 Thread Paul Oranje via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Op 16 mrt. 2023, om 05:06 heeft Ravi Paluri (QUIC)  
het volgende geschreven:
> 
> I think wifi interface going up and coming down is expected.
> Can anyone help with flow how does netifd know that wifi interface is up and 
> where it adds this IP to the interface?
The netifd daemon implements a FSM [0] (several nested FSMs, though I haven't 
looked into the sources) and as such the actual call flow will be dependent on 
the state of the FSM when it processes a specific event (or command).

Have a look at the DESIGN doc [1]. That rather terse document ends though with 
"## TODO: Configuration management, ubus callbacks" so you'll have to look into 
the code to see how uci changes are handled. Maybe this helps understanding 
observed state transitions when for instance handling a configuration change.

Good luck

[0] https://en.wikipedia.org/wiki/Finite-state_machine
[1] https://github.com/openwrt/netifd/blob/master/DESIGN

> 
> Thanks,
> Ravi
> -Original Message-
> From: openwrt-devel  On Behalf Of 
> Ravi Paluri (QUIC)
> Sent: Thursday, March 16, 2023 6:37 AM
> To: openwrt-devel@lists.openwrt.org
> Subject: netifd Call Flow - WiFi
> 
> Hi All,
>  We are trying netifd to enable wlan.
> We have configured uci to set wlan interface IP statically.
> We are seeing when we do network reload, wifi interface is going down and 
> coming up.
> 
> Can we get flow how does netifd know that wifi interface is up and where it 
> adds this IP to the interface?
> This will help us in checking why wifi interface is going down and coming up 
> on doing network reload.
> 
> Thanks,
> Ravi
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel



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


[PATCH] ipq40xx: add support for Wallystech DR40x9

2023-03-20 Thread Koen Vandeputte
Adds support for the Wallys DR40x9 series boards.
They come in IPQ4019 and IPQ4029 versions.
IPQ4019/4029 only differ in that that IPQ4029 is the industrial version that is 
rated to higher temperatures.

Specifications are:
* CPU: Qualcomm IPQ40x9 (4x ARMv7A Cortex A7) at 716 MHz
* RAM: 512 MB
* Storage: 2MB of SPI-NOR, 128 MB of parallel NAND
* USB 3.0 TypeA port for users
* MiniPCI-E with PCI-E 2.0 link
* MiniPCI-E for LTE modems with only USB2.0 link
* 2 SIM card slots that are selected via GPIO11
* MicroSD card slot
* Ethernet: 2x GBe with 24~48V passive POE
* SFP port (Does not work, I2C and GPIO's not connected on hardware)
* DC Jack
* UART header
* WLAN: In-SoC 2x2 802.11b/g/n and 2x2 802.11a/n/ac
* 4x MMCX connectors for WLAN
* Reset button
* 8x LED-s

Installation instructions:
Connect to UART, pins are like this:
-> 3.3V | TX | RX | GND

Settings are 115200 8n1

Boot initramfs from TFTP:
tftpboot 0x8400 
openwrt-ipq40xx-generic-wallys_dr40x9-initramfs-fit-uImage.itb

bootm

Then copy the sysupgrade image to the /tmp folder and execute sysupgrade -n 


The board file binary was provided from Wallystech on March 14th 2023
including full permission to use and distribute.

Signed-off-by: Robert Marko 
Signed-off-by: Koen Vandeputte 
---

Board file commit for the Wallys DR40x9
Looks like I don't have access to push to that repo ..

 board-wallys_dr40x9.qca4019 | Bin 0 -> 24316 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 board-wallys_dr40x9.qca4019

diff --git a/board-wallys_dr40x9.qca4019 b/board-wallys_dr40x9.qca4019
new file mode 100644
index 
..f23ecdfabbb90dc8d293676c4449a5fa9e90e721
GIT binary patch
literal 24316
zcmeHPdr(tX8b1jj%4*?;fV{kf@JeV1A*2{2@{BY<3KkU!un1IR1@j)RX
z0<|DS&^joOrihHi2gGV^?Tj+*=8pf3%%_bZ6FG+tKc{GrNm>?hSzi5={iA0qz
zIp6v2`Of*yFDJ>p_x!kTCdP-x?-Ye|QbQBc<1>UnE|+C1F?~E+ii)iT#f7Xw
zxis{xVrglpbnjLUUMoCUP`($dayhKZf^uoWfkRt&7nGFLRD=pMc$};#ISKmHU|+N_
zk%}*aB_5k3IJ39UWvdp(;1UV$GQR_A|m3aCr?NM>KgFNUrxp9
zlO62fCFS;9zZTs{;29KnY`Qkx>f+qi`nof%|#kfeL*k60U;wiCa!dygd@C>95wMV
zbdcc=eXx__>{LDjcGp@{nw`PtOgjV{$M=F-4U`u+NN<7~^5Owh~Y>J+tLyz1UPx
z6}2xo(1g*lgps%q&5mgwpV^i|2mIJlh
zq^umbn9uubK1e^ouGsX}jlrtUH=07Le2PX-7FWmYV`d^zH(@)WjGf~ebE!|-A!>ZJ
z%DedbN0mKcb-typ`O6C>B3eBH4vy=7v%wj0b=%|_2vCk9O4?H2lGBTM=
z!g4!1__MrbS{yIeXK_64zq6f-1_b!Szd*X5pFiD?PS3PoJLjB49}-b6Ap%)h8EJI7
zFC5|LpP&3NHHDo4@tJ}CI@^DL_|x}>Hmu>M^^RnF`~Sgq^?&;G@grT^B@7qu
zx^xJhk3g-ou6YPcm@zVv$I~UKa5-#NNF-KWu*QRZaPeLiN5dyDCqqyKiAUp+a5Nk#
zRUEE6`d)Ke$9x3{rsbAZ3I(OGDGw-!7wX0K61$)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