Compare commits

..

123 Commits

Author SHA1 Message Date
pratibha
3e0d3acbfb Merge branch 'staging-WIFI-14454-support-for-indio-525axm-wifi6-ap' of https://github.com/Telecominfraproject/wlan-ap into staging-WIFI-14454-support-for-indio-525axm-wifi6-ap 2025-04-07 16:04:36 +05:30
pratibha
e9f69e74e0 WIFI-14454: Add support for Indio 525AXM wifi6 AP Based on IPQ5018 platform.
Signed-off-by: Pratibha Kuril <pratibha.kuril@indionetworks.com>
2025-04-07 16:03:37 +05:30
pratibha
3b8df41c2c Merge branch 'staging-WIFI-14454-support-for-indio-525axm-wifi6-ap' of https://github.com/Telecominfraproject/wlan-ap into staging-WIFI-14454-support-for-indio-525axm-wifi6-ap 2025-04-07 15:51:04 +05:30
pratibha
4d569ed907 WIFI-14454: Add support for Indio 525AXM wifi6 AP Based on IPQ5018 platform.
Signed-off-by: Pratibha Kuril <pratibha.kuril@indionetworks.com>
2025-04-07 15:44:14 +05:30
pratibha
b4a7cca81d WIFI-14493: Add support for Indio 525AXM wifi6 AP Based on IPQ5018 platform.
Signed-off-by: Pratibha Kuril <pratibha.kuril@indionetworks.com>
2025-04-07 12:19:13 +05:30
John Crispin
dbdc16804d ipq5322: update rap7110c_341x to ATH12.5.5
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-27 15:54:48 +01:00
John Crispin
98375061da .github/workflows/: disable wf189 until we have an updated BDF
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-27 12:45:53 +01:00
John Crispin
e3edb1fdd5 qca: drop ath12.4 support
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-27 12:45:53 +01:00
John Crispin
68cf54d9f7 qca-wifi-7: update to ath12.5.5
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-27 12:45:52 +01:00
John Crispin
28161aff6e ucentral-schema: update to latest HEAD
90aa0ee system: Fix the delta_counters for dynamic vlan stations

Signed-off-by: John Crispin <john@phrozen.org>
2025-02-27 09:47:06 +01:00
steven.lin
c2ea273bea WIFI-14432: Fix MAC address assignment on SENAO IAP4300M
Signed-off-by: steven.lin <steven.lin@senao.com>
2025-02-27 09:43:32 +01:00
Tanya Singh
9d611028fd WIFI-14438: Fix LAN port issue in Edgecore EAP105
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-02-27 09:43:15 +01:00
steven.lin
24dbba4c5a WIFI-14424: Add SENAO models into auto build list
Signed-off-by: steven.lin <steven.lin@senao.com>
2025-02-12 13:31:42 +01:00
John Crispin
4c84a3dbdd mac80211/hostapd: more wifi bringup fixes
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-11 11:06:38 +01:00
John Crispin
664fa78572 hostapd: only enforce multiple bssid on 6G
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-10 17:10:15 +01:00
John Crispin
26e782627b rrmd: the daemon was crashing on wifi-7 devices.
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-10 12:05:45 +01:00
John Crispin
9105d688b9 mac80211: fix typo that caused device entry duplication
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-10 12:05:27 +01:00
Wingate Chi
a9694847cd WIFI-14410: Wifi7 driver with RAP7110C-341X support
Signed-off-by: Wingate Chi <wingate.chi@cybertan.com.tw>
2025-02-06 08:33:33 +01:00
Tanya Singh
426943c1c0 WIFI-14411: Fix typo in bootcount script for Edgecore EAP104
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-02-06 08:31:36 +01:00
John Crispin
6014103032 ucentral-schema: update to latest HEAD
Fixes: WIFI-14409
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-06 08:22:39 +01:00
John Crispin
56eee37052 iwinfo: move ucode based version into a feed
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-06 08:22:36 +01:00
Arif Alam
7374c39dea ath11k: fix STA roaming between radios
Fixes: WIFI-14396
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2025-02-06 08:22:35 +01:00
Tanya Singh
b77e80cf14 WIFI-14404: Enable dual boot support on EAP105 and certificate loading on dual boot for EAP104 and OAP101 series
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-02-06 08:22:35 +01:00
Tanya Singh
7544c1921b WIFI-14406: Fix MAC address assignment on Edgecore EAP105
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-02-06 08:22:35 +01:00
John Crispin
2d45944ba3 hostapd: add script support for acs_exclude_6ghz_non_psc
Fixes: WIFI-14187
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-06 08:22:34 +01:00
John Crispin
58d0932dee hostapd: fix ubus handler crash during teardown
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-06 08:22:34 +01:00
John Crispin
4f0f25ad05 hostapd: improve multi radio ACS
Fixes: WIFI-14402
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-06 08:22:33 +01:00
John Crispin
b74f824b3a mac80211: multiple_bssid is mandatory on 6e when using 11be
Fixes: WIFI-14343
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-06 08:22:32 +01:00
John Crispin
3e7fd62fc2 hostapd: fix wifi-7 e-mpsk
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-03 14:26:00 +01:00
John Crispin
4050db8ed6 ipq53xx: disable ujail
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-03 13:01:41 +01:00
John Crispin
8b5a449f6d ucentral-schema: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-03 11:43:33 +01:00
John Crispin
55e3e90513 ucode: fix none wifi-7 builds
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:28 +01:00
Ken
0d1ea98328 WIFI-14357 WF189 enable dual image support on wifi7 platform
Signed-off-by: Ken <xshi@actiontec.com>
2025-01-30 13:08:28 +01:00
John Crispin
aaaef76d7d ath12k: fix race condition when generating shadow config for wireless
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:28 +01:00
John Crispin
4b09108f72 iwinfo: use new ucode based code for wifi-7
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:28 +01:00
John Crispin
c02b5922d9 base-files: add ucidef_set_wireless_macaddr_base()
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:28 +01:00
John Crispin
9d54cda767 ipq53xx: fix ethernet link issues
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:28 +01:00
John Crispin
1f10af2355 base-files: do not generate default interfaces on firstboot
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:28 +01:00
John Crispin
0df07d514e ipq53xx: fix cig wf189 eth MAC addr assignment
Fixes: WIFI-14313
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:28 +01:00
John Crispin
9587fb3fee only build new ATH12.4 images
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:27 +01:00
John Crispin
4d4d356c1f qcom: fixes
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
John Crispin
64b1f96721 ucentral-schema: update to latest HEAD
61e5802 add multi radio support

Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
John Crispin
f3f070acb1 unetd: do not build on wifi-7 AP
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
John Crispin
aa909d9ab8 ucentral-event: fix phy name splitting
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
John Crispin
1de1426a80 kernel-6.1: add checksums
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
John Crispin
8279bae9db ucode: add multi-radio support
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
John Crispin
3554480103 ucode: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
John Crispin
e4b535f6cb ath12.4-cs1: update to latest SDK
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
Ken
ed7e047514 WIFI-14371 WF660A reset button for 5.4 kernel
Signed-off-by: Ken <xshi@actiontec.com>
2025-01-27 07:00:38 +01:00
wingate5678
7ced0ea2cc WIFI-14350 add platfrom into auto build list
Signed-off-by: wingate5678 <wingate.chi@cybertan.com.tw>
2025-01-27 07:00:05 +01:00
wingate5678
a3a957f688 WIFI-14350 RAP630W-311G fix wifi data memory region
Signed-off-by: wingate5678 <wingate.chi@cybertan.com.tw>
2025-01-27 07:00:05 +01:00
wingate5678
afcaa6dea2 WIFI-14348 RAP630W-312G fix interface mdio bus assign error
Signed-off-by: wingate5678 <wingate.chi@cybertan.com.tw>
2025-01-27 06:59:44 +01:00
Tanya Singh
605406e191 WIFI-14170: Update BDF for Edgecore EAP104
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-01-27 06:59:20 +01:00
Jaspreet Sachdev
d639c02ec1 Reverting to ubuntu-22.04
Signed-off-by: Jaspreet Sachdev <jaspreet.sachdev@kinarasystems.com>
2025-01-06 10:50:33 -05:00
Jaspreet Sachdev
cf45b65214 Fix the docker removal of images
Signed-off-by: Jaspreet Sachdev <jaspreet.sachdev@kinarasystems.com>
2025-01-06 10:32:52 -05:00
John Crispin
258c26e7e6 ipq60xx: disable sdhci LEDs
Fixes: WIFI-14340
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-06 11:49:40 +01:00
John Crispin
ed4f03a1a9 ipq60xx: make LEDs work on CIG WF660
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-06 11:38:59 +01:00
Marek Kwaczynski
7477963b1f ucentral-event: add channel switch handler
Add channel switch handler to update hapd object
with new frequency and channel info.

Fixes: WIFI-14336

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-01-06 11:02:08 +01:00
Tanya Singh
1cf48ae6d9 mediatek: Set GPIO pins to reset the LTE module on Edgecore EAP112
Fixes: WIFI-14098
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-01-06 11:01:34 +01:00
Firas Shaari
77144209e9 ucentral-schema: Fix typo qos.json
"bandwidth_up", and "bandwidth_down" had typos. The correct attributes are
"bandwidth-up", and "bandwidth-down"

Signed-off-by: Firas Shaari <firas.shaari@shaariconsultancy.com>
2025-01-06 11:00:46 +01:00
Ken
71315b140a ipq807x: WF188n/WF196 dual image support
Fixes: WIFI-14339
Signed-off-by: Ken <xshi@actiontec.com>
2025-01-06 10:59:16 +01:00
Jaspreet Sachdev
8332ba86e1 Removed WallysTech target builds
Signed-off-by: Jaspreet Sachdev <jaspreet.sachdev@kinarasystems.com>
2024-12-30 18:03:21 -05:00
John Crispin
6a94323a59 udevmand: update to latest HEAD
be0f45e udevmand: fix segmentation fault during deinit

Signed-off-by: John Crispin <john@phrozen.org>
2024-12-19 06:49:31 +01:00
John Crispin
3d43f4fc95 Revert "mediatek-sdk: update SDK to mp2.3 final"
This reverts commit 5f1d562f61.

Signed-off-by: John Crispin <john@phrozen.org>
2024-12-19 06:42:47 +01:00
Tanya Singh
ee80309fc3 mediatek: Fix MAC assignment for eth ports on Edgecore EAP112
Fixes: WIFI-14319
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-12-12 08:40:45 +01:00
John Crispin
5f1d562f61 mediatek-sdk: update SDK to mp2.3 final
We previously had a beta release.

Fixes: WIFI-14322
Signed-off-by: John Crispin <john@phrozen.org>
2024-12-10 16:42:40 +01:00
Felix Fietkau
5aa975b70c mediatek-sdk: fix roaming issue
Fixes: WIFI-14321
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-12-10 16:42:35 +01:00
John Crispin
47f71743f4 cloud_discovery: fix firstcontact fallback mode
Fixes: WIFI-14320
Signed-off-by: John Crispin <john@phrozen.org>
2024-12-10 14:40:21 +01:00
steven.lin
e6f20ce347 mediatek: Add SENAO JEAP6500
Specifications:
SoC: MediaTek MT7981BA
RF Chipset: MT7976DA @2.4GHz 2T2R
MT7976DA @5ghz 2T2R
RAM: 512MB DDR4 RAM
Flash: SPI-NAND 256 MiB
Ethernet: 2 x 1GbE PHY
Reset Button
Power Source: DC IN 12v, Standard PoE 802.3af/at
LED Indicator: 1 x single color LED (GPIO Control)

Fixes: WIFI-14312
Signed-off-by: steven.lin <steven.lin@senao.com>
2024-12-10 09:48:13 +01:00
jackcybertan
717b0ce261 ipq50xx: Support Cybertan RAP630W-312G
Fixes: WIFI-14318
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2024-12-10 09:47:56 +01:00
John Crispin
e3c805a714 workflows/build-dev.yml: remove cybertan board that does not exist
Signed-off-by: John Crispin <john@phrozen.org>
2024-12-09 16:23:37 +01:00
John Crispin
3047402b91 Revert "ath11k: fix multi band roaming"
This reverts commit 1d106efd51.

Fixes: WIFI-14201
Signed-off-by: John Crispin <john@phrozen.org>
2024-12-09 16:22:45 +01:00
John Crispin
4dcd206466 ucentral-schema: update to latest HEAD
1ddca91 set schema version to 3.2.1

Signed-off-by: John Crispin <john@phrozen.org>
2024-12-09 08:31:09 +01:00
jackcybertan
d3bb3be528 ramips: Support Cybertan RAP63XC-211G (MTK) solution
Fixes: WIFI-14317
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2024-12-09 08:22:27 +01:00
Ken
958ac1b6b0 ipq53xx: WF189 set the eth mac address
Fixes: WIFI-14313
Signed-off-by: Ken <xshi@actiontec.com>
2024-12-09 08:19:11 +01:00
John Crispin
405ec9c524 setup.py: add option to define build tree
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-28 15:42:45 +01:00
John Crispin
c321d6f6b1 cloud_discovery: correctly convert timeouts to integers
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-28 08:56:07 +01:00
John Crispin
9a941f2ee3 cloud_discovery: improve firstcontact support
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-28 08:44:13 +01:00
John Crispin
2e27d22a48 ucentral-schema: update wwan.json
Fixes: WIFI-14291
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-27 10:28:52 +01:00
John Crispin
9cfa767d7e ucentral-schema: update to latest HEAD
6e3e2df add support for configuring snmpd service using ucentral.

Fixes: WIFI-14152
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-27 10:24:26 +01:00
tanya.singh
78449ee633 mediatek: Add netfilter configs to mt7981, and packages to bring up LTE (wwan) on EAP112
Fixes: WIFI-14098
Signed-off-by: tanya.singh <tanya_singh@accton.com>
2024-11-21 06:05:52 +01:00
Arif Alam
5b9863a019 ipq60xx: wf188n: fix reset button
Fixes WIFI-14296

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2024-11-21 06:05:52 +01:00
Tanya Singh
5839ae9593 ucentral-schema: Add sleep time of 1 second before sending the command to add GST (NMEA) message to /dev/ttyMSM1 port
Fixes: WIFI-14270
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-11-21 06:05:49 +01:00
John Crispin
36ce8d2abb certificates: stage gateway.json
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-15 07:50:16 +01:00
John Crispin
656cc231a8 firstcontact: cloud_discovery will start the service
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-15 07:50:16 +01:00
John Crispin
35e073fb59 ucentral-schema: update to latest HEAD
b7207ae allow setting cloud_discovery timeouts

Signed-off-by: John Crispin <john@phrozen.org>
2024-11-15 07:50:16 +01:00
John Crispin
4bc2b9c821 ucentral-client: add default cloud_discovery timeouts
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-15 07:50:16 +01:00
John Crispin
41f4d5e619 ucentral-client: update to latest HEAD
8c45f96 send on/offline events to cloud discovery service

Signed-off-by: John Crispin <john@phrozen.org>
2024-11-15 07:50:16 +01:00
John Crispin
bd7bb9b74b busybox: do not use pool servers if DHCP provided NTP
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-15 07:50:16 +01:00
John Crispin
80358cf755 profiles: add cloud_discovery to default images
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-15 07:50:16 +01:00
John Crispin
09f3dba767 cloud_discovery: add new service
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-15 07:50:15 +01:00
John Crispin
a21f520666 ucentral-schema: update to latest HEAD
7ac7ed5 schema: configure sae on 6G when SSID is sae-mixed

Signed-off-by: John Crispin <john@phrozen.org>
2024-11-15 07:49:54 +01:00
John Crispin
7300252b07 hostapd: allow clients to refresh the used PSK if band is not 6G
Fixes: WIFI-14256
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-13 15:03:28 +01:00
John Crispin
dcfc17a150 uspot: fix idle timeout handling
Fixes: WIFI-14263
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-13 12:40:03 +01:00
John Crispin
e6f1cef31d ucentral-client: update to latest HEAD
c719c1b Include DHCP VSI information in CONNECT message

Signed-off-by: John Crispin <john@phrozen.org>
2024-11-11 07:59:40 +01:00
John Crispin
5c9c516ea1 ucentral-schema: update to latest HEAD
f0dfb40 Include DHCP VSI information in state message
44da3d6 Add config for vendor-class and request-options
a21635b always request option 43 and 224 when doing DHCP

Signed-off-by: John Crispin <john@phrozen.org>
2024-11-11 07:58:43 +01:00
Paul White
9cc151165e ucentral-schema: add udhcpc-vsi-parse script
Fixes: WIFI-14271
Signed-off-by: Paul White <paul@shasta.cloud>
2024-11-11 07:46:53 +01:00
Tanya Singh
ccd23cb4c1 hostapd: add afcd respawn
Customize the procd instance respawn time  parameters to avoid afcd instance
crash while creating afc-location.json

Fixes: WIFI-14261
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-11-11 07:00:41 +01:00
John Crispin
8ecd0c36dd netifd: various backports from HEAD branch
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-07 17:43:44 +01:00
John Crispin
7820775169 hostapd: more bss color improvements
Fixes: WIFI-14259
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-07 16:45:27 +01:00
John Crispin
bf37e6d4c9 mediatek: change default bss_color behaviour
Fixes: WIFI-14194
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-07 16:45:27 +01:00
John Crispin
d2845e7664 mediatek: swap eth0/1 on eap111
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-06 09:33:39 +01:00
Tanya Singh
eb9cbaec72 ipq807x: Shorten the kernel backtrace warning msg for ieee80211_bss_get_elem
Fixes: WIFI-11006
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-11-06 09:33:21 +01:00
Tanya Singh
f15e10bfdb ipq95xx: Update phy driver for EAP105 LAN port
Fixes: WIFI-14171
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-11-06 09:33:05 +01:00
Ken
08861e1db0 ipq807x: add ARQ114C support
Fixes: WIFI-14253
Signed-off-by: Ken <xshi@actiontec.com>
2024-11-06 09:32:40 +01:00
Arif Alam
064fac36b0 uspot: fix setting passwords greater than 16 characters
Fixes WIFI-13737

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2024-11-04 16:31:29 +01:00
John Crispin
786cdeb1c8 ucentral-schema: set 3.2.1 as the version
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-04 15:12:16 +01:00
John Crispin
010e10e7e8 ucentral-state: improve led blink handling
Fixes: WIFI-14194
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-04 14:58:33 +01:00
John Crispin
c0095b3ef9 ucentral-client: update to latest HEAD
cac85d9 improve blink command

Fixes: WIFI-14194
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-04 14:57:28 +01:00
John Crispin
413885f07b hostapd: change default bss_color behaviour
Signed-off-by: John Crispin <john@phrozen.org>
2024-11-04 14:44:38 +01:00
John Crispin
7b0e041bac ucentral-client: update to latest HEAD
62e0b2d This is a combination of commits for handling compressed configuration.

Signed-off-by: John Crispin <john@phrozen.org>
2024-10-23 13:44:13 +02:00
John Crispin
828cc9e597 ucentral-schema: update to latest HEAD
ad1c322 flag to denote compressed commands (configure for now) are supported

Signed-off-by: John Crispin <john@phrozen.org>
2024-10-23 13:43:44 +02:00
John Crispin
008ca9618d ipq95xx: import ath12.4-cs kernel and drivers
Signed-off-by: John Crispin <john@phrozen.org>
2024-10-20 09:25:13 +02:00
John Crispin
a3bc629684 ipq807x: import QCOM ath11k patch
Fixes: WIFI-13926
Signed-off-by: John Crispin <john@phrozen.org>
2024-10-20 09:24:08 +02:00
Tanya Singh
514210fd7e ipq95xx: Fix mac address assignment for eth0 (wan) and eth1 (lan) interfaces in Edgecore EAP105
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-10-20 07:53:37 +02:00
jackcybertan
d6f822a00b ipq807x: wifi thermal mitigation daemon
Fixes: WIFI-14202
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2024-10-20 07:52:50 +02:00
John Crispin
e8b9ec1234 ath11k-firmware: update ipq6018/8074 FW to 2.7.0.1-02409
Signed-off-by: John Crispin <john@phrozen.org>
2024-10-20 07:42:34 +02:00
John Crispin
f1a1d29f99 ucentral-client: update to latest HEAD
62e0b2d This is a combination of commits for handling compressed configuration.
3f0ad16 remove CI

Signed-off-by: John Crispin <john@phrozen.org>
2024-10-20 07:20:32 +02:00
Shashi
0c2c59f7c0 .github/workflows/build-dev.yml: add 'udaya_a6-od2'
Signed-off-by: Shashi <shashi.kushwaha@inventum.net>
2024-10-09 13:01:15 +02:00
Shashi
ab9a301155 ipq807x: add new files & made change for udaya outdoor wifi-6
Signed-off-by: Shashi <shashi.kushwaha@inventum.net>
2024-10-04 16:21:16 +02:00
John Crispin
a6cb3249c4 ucentral-schema: update to latest HEAD
a0f26ac disable OKC when MPSK is enabled

Signed-off-by: John Crispin <john@phrozen.org>
2024-10-01 15:51:29 +02:00
John Crispin
6616afca10 wireguard: update mirror URL
Signed-off-by: John Crispin <john@phrozen.org>
2024-10-01 10:25:23 +02:00
John Crispin
40ef18e788 ucentral-schema: update to latest HEAD
df95905 do not restart the mpsk daemon upon cfg reload

Signed-off-by: John Crispin <john@phrozen.org>
2024-10-01 10:24:41 +02:00
4122 changed files with 1075626 additions and 1388 deletions

11
.github/workflows/build-dev.yml vendored Normal file → Executable file
View File

@@ -15,21 +15,20 @@ on:
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
x64_vm_image_name: ${{ steps.package_and_upload_image.outputs.x64_vm_image_name }}
strategy:
fail-fast: false
matrix:
target: [ 'cig_wf186h', 'cig_wf186w', 'cig_wf188n', 'cig_wf196', 'cig_wf189', 'cybertan_eww631-a1', 'cybertan_eww631-b1','sonicfi_rap630c-311g', 'sonicfi_rap630w-311g', 'sonicfi_rap630w-211g', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_eap104', 'edgecore_eap105', 'edgecore_eap111', 'edgecore_eap112', 'edgecore_oap101', 'edgecore_oap101-6e', 'edgecore_oap101e', 'edgecore_oap101e-6e', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'hfcl_ion4x_3', 'hfcl_ion4xi_w', 'hfcl_ion4x_w', 'indio_um-305ax', 'sercomm_ap72tip', 'udaya_a6-id2', 'wallys_dr5018', 'wallys_dr6018', 'wallys_dr6018-v4', 'yuncore_ax820', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650', 'yuncore_fap655' ]
target: [ 'cig_wf186h', 'cig_wf186w', 'cig_wf188n', 'cig_wf196', 'cybertan_eww631-a1', 'cybertan_eww631-b1', 'cybertan_rap630w-312g', 'cybertan_rap63xc-211g', 'sonicfi_rap630c-311g', 'sonicfi_rap630w-311g', 'sonicfi_rap630w-211g', 'sonicfi_rap7110c-341x', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_eap104', 'edgecore_eap105', 'edgecore_eap111', 'edgecore_eap112', 'edgecore_oap101', 'edgecore_oap101-6e', 'edgecore_oap101e', 'edgecore_oap101e-6e', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'hfcl_ion4x_3', 'hfcl_ion4xi_w', 'hfcl_ion4x_w', 'indio_um-305ax', 'senao_iap4300m', 'senao_jeap6500', 'sercomm_ap72tip', 'udaya_a6-id2', 'udaya_a6-od2', 'yuncore_ax820', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650', 'yuncore_fap655' ]
steps:
- uses: actions/checkout@v3
# Clean unnecessary files to save disk space
- name: clean unncessary files to save space
run: |
docker rmi `docker images -q`
docker rmi `docker images -q` || true
- name: Build image for ${{ matrix.target }}
id: build
@@ -81,7 +80,7 @@ jobs:
fi
trigger-testing:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
@@ -94,7 +93,7 @@ jobs:
client-payload: '{"ref": "${GITHUB_REF#refs/tags/}", "sha": "${{ github.sha }}"}'
create-x64_vm-ami:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:

View File

@@ -0,0 +1,33 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=indio
PKG_VERSION:=1.0
PKG_BUILD_DIR:= $(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/indio
SECTION:=base
CATEGORY:=Utilities
TITLE:=indio Package
DEPENDS:=+base-files
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Compile/Default
endef
Build/Compile = $(Build/Compile/Default)
define Package/indio/install
cp -rf ./files/* $(1)
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DATA) ./files/rc.local $(1)/etc/rc.local
$(INSTALL_DATA) ./files/sys_led.sh $(1)/bin/sys_led.sh
$(INSTALL_DATA) ./files/hwwatchdog.sh $(1)/bin/hwwatchdog.sh
endef
$(eval $(call BuildPackage,indio))

View File

@@ -0,0 +1,8 @@
#!/bin/sh
while [ 1 ]; do
echo 1 > /sys/class/leds/hwwatchdog/brightness
sleep 1
echo 0 > /sys/class/leds/hwwatchdog/brightness
sleep 1
done

View File

@@ -0,0 +1,69 @@
#!/bin/sh
# Maximum number of retries
max_retries=5
# Delay between retries (in seconds)
retry_delay=1
# Function to turn on the LED (green)
turn_on_green_led()
{
echo "1" > /sys/class/leds/led_2g/brightness
echo "0" > /sys/class/leds/led_5g/brightness
echo "0" > /sys/class/leds/led_sys/brightness
}
# Function to turn on the LED (red)
turn_on_blue_led()
{
echo "1" > /sys/class/leds/led_2g/brightness
echo "1" > /sys/class/leds/led_5g/brightness
echo "0" > /sys/class/leds/led_sys/brightness
}
turn_on_pink_led()
{
echo "0" > /sys/class/leds/led_2g/brightness
echo "1" > /sys/class/leds/led_5g/brightness
echo "1" > /sys/class/leds/led_sys/brightness
}
# Function to check internet connectivity
check_internet()
{
if ping -q -c 1 -W 1 8.8.8.8 > /dev/null; then
# echo "Internet is working"
return 0
else
# echo "Internet is not working"
return 1
fi
}
# Main loop to continuously check internet connectivity
while true; do
# Attempt to check internet connectivity with retries
attempt=1
while [ $attempt -le $max_retries ]; do
#echo "Attempt $attempt:"
if check_internet; then
turn_on_green_led
break # Exit the retry loop if internet is working
fi
attempt=$(( attempt + 1 ))
sleep $retry_delay
done
# If all attempts fail, turn on red LED and continue loop
if [ $attempt -gt $max_retries ]; then
turn_on_blue_led
fi
# Sleep before the next iteration
sleep 10
done

View File

@@ -0,0 +1,5 @@
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
/bin/sh /bin/hwwatchdog.sh &
/bin/sh /bin/sys_led.sh &
exit 0

File diff suppressed because it is too large Load Diff

View File

@@ -1 +0,0 @@
WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 v1

View File

@@ -1 +0,0 @@
WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 v2

View File

View File

View File

View File

View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

Binary file not shown.

14
feeds/ipq807x_v5.4/ath11k-wifi/Makefile Normal file → Executable file
View File

@@ -32,8 +32,7 @@ ALLWIFIBOARDS:= \
cybertan-eww622-a1 \
cybertan-eww631-a1 \
cybertan-eww631-b1 \
sonicfi-rap630c-311g \
sonicfi-rap630w-311g \
cybertan-rap630w-312g \
edgecore-eap101 \
gl-ax1800 \
gl-axt1800 \
@@ -46,17 +45,21 @@ ALLWIFIBOARDS:= \
indio-um-310ax-v1 \
indio-um-510axp-v1 \
indio-um-510axm-v1 \
indio-um-525axm \
muxi-ap3220l \
plasmacloud-pax1800 \
wallys-dr5018 \
wallys-dr6018 \
wallys-dr6018-v4 \
sonicfi-rap630c-311g \
sonicfi-rap630w-311g \
tplink-ex227 \
tplink-ex447 \
yuncore-ax840 \
yuncore-fap650 \
yuncore-fap655 \
udaya-a6-id2 \
udaya-a6-od2 \
meshpp-s618
ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ath11k-wifi-$(BOARD))
@@ -392,8 +395,7 @@ $(eval $(call generate-ath11k-wifi-package,cig-wf194c4,Cigtech WF194c4))
$(eval $(call generate-ath11k-wifi-package,cybertan-eww622-a1,CyberTan EWW622 A1))
$(eval $(call generate-ath11k-wifi-package,cybertan-eww631-a1,CyberTan EWW631 A1))
$(eval $(call generate-ath11k-wifi-package,cybertan-eww631-b1,CyberTan EWW631 B1))
$(eval $(call generate-ath11k-wifi-package,sonicfi-rap630c-311g,Sonicfi RAP630C 311G))
$(eval $(call generate-ath11k-wifi-package,sonicfi-rap630w-311g,Sonicfi RAP630W 311G))
$(eval $(call generate-ath11k-wifi-package,cybertan-rap630w-312g,CyberTan RAP630W 312G))
$(eval $(call generate-ath11k-wifi-package,sercomm-wallaby,Sercomm Kiwi))
$(eval $(call generate-ath11k-wifi-package,wallys-dr6018,Wallys DR6018))
$(eval $(call generate-ath11k-wifi-package,wallys-dr6018-v4,Wallys DR6018 V4))
@@ -403,8 +405,11 @@ $(eval $(call generate-ath11k-wifi-package,edgecore-oap102,Edgecore OAP102))
$(eval $(call generate-ath11k-wifi-package,edgecore-eap104,Edgecore EAP104))
$(eval $(call generate-ath11k-wifi-package,liteon-wpx8324,Liteon WPX8324))
$(eval $(call generate-ath11k-wifi-package,indio-um-310ax-v1,Indio UM-310AX V1))
$(eval $(call generate-ath11k-wifi-package,indio-um-525axm,Indio UM-525AXM))
$(eval $(call generate-ath11k-wifi-package,indio-um-510axp-v1,Indio UM-510AXP V1))
$(eval $(call generate-ath11k-wifi-package,indio-um-510axm-v1,Indio UM-510AXM V1))
$(eval $(call generate-ath11k-wifi-package,sonicfi-rap630c-311g,Sonicfi RAP630C 311G))
$(eval $(call generate-ath11k-wifi-package,sonicfi-rap630w-311g,Sonicfi RAP630W 311G))
$(eval $(call generate-ath11k-wifi-package,tplink-ex227,TP-Link EX227))
$(eval $(call generate-ath11k-wifi-package,tplink-ex447,TP-Link EX447))
$(eval $(call generate-ath11k-wifi-package,yuncore-ax840,YunCore AX840))
@@ -413,6 +418,7 @@ $(eval $(call generate-ath11k-wifi-package,muxi-ap3220l,MUXI AP3220L))
$(eval $(call generate-ath11k-wifi-package,yuncore-fap650,YunCore FAP650))
$(eval $(call generate-ath11k-wifi-package,yuncore-fap655,YunCore FAP655))
$(eval $(call generate-ath11k-wifi-package,udaya-a6-id2,Udaya A6-ID2))
$(eval $(call generate-ath11k-wifi-package,udaya-a6-od2,Udaya A6-OD2))
$(eval $(call generate-ath11k-wifi-package,wallys-dr5018,Wallys DR5018))
$(foreach PACKAGE,$(ALLWIFIPACKAGES),$(eval $(call BuildPackage,$(PACKAGE))))

View File

@@ -0,0 +1,51 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
#PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_NAME:=cooling
PKG_RELEASE:=1
COOLING_MAKE_OPTS:= \
CROSS=$(TARGET_CROSS) \
COOLINGDIR=$(PKG_BUILD_DIR) \
include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_TARGET_ipq50xx_generic_DEVICE_sonicfi_rap630c_311g),y)
export TARGET_CFLAGS += -DPLATFORM_RAP630C_311G=1
endif
ifeq ($(CONFIG_TARGET_ipq50xx_generic_DEVICE_sonicfi_rap630w_311g),y)
export TARGET_CFLAGS += -DPLATFORM_RAP630W_311G=1
endif
define Package/cooling
SECTION:=utils
CATEGORY:=Utilities
MAINTAINER:=Sonicfi
DEPENDS:=+libubox +libubus +libuci @TARGET_ipq50xx
TITLE:=Wifi Thermal Mitigation daemon for QCA platform
endef
define Package/cooling/description
This package is wifi cooling mitigation daemon.
endef
define Build/Compile
LDFLAGS="$(TARGET_LDFLAGS)" \
$(MAKE) -C $(PKG_BUILD_DIR) $(strip $(COOLING_MAKE_OPTS))
endef
define Package/cooling/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/cooling $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/cooling
$(INSTALL_BIN) $(PKG_BUILD_DIR)/sonicfi-rap630c-311g-cooling.conf $(1)/etc/cooling
$(INSTALL_BIN) $(PKG_BUILD_DIR)/sonicfi-rap630w-311g-cooling.conf $(1)/etc/cooling
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/cooling.init $(1)/etc/init.d/cooling
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_BIN) ./files/cooling.config $(1)/etc/config/cooling
endef
$(eval $(call BuildPackage,cooling))

View File

@@ -0,0 +1,2 @@
config cooling config
option Enabled '1'

View File

@@ -0,0 +1,31 @@
#!/bin/sh /etc/rc.common
START=98
SERVICE_WRITE_PID=1
SERVICE_DAEMONIZE=1
board=$(board_name)
start() {
. /lib/functions.sh
local enabled
config_load 'cooling'
config_get_bool enabled config 'Enabled' '0'
[ "$enabled" -gt 0 ] || return 1
case "$board" in
sonicfi,rap630c-311g|\
sonicfi,rap630w-311g)
service_start /usr/sbin/cooling
;;
esac
}
stop() {
service_stop /usr/sbin/cooling
}

View File

@@ -0,0 +1,68 @@
#****************************************************************************
#
# Copyright (c) 2024 Sonicfi, Inc.
# All Rights Reserved.
# Sonicfi Confidential and Proprietary.
#
#****************************************************************************/
ifneq ($(strip $(TOOLPREFIX)),)
export CROSS:=$(TOOLPREFIX)
endif
COOLING_INSTALL_ROOT := $(COOLINGDIR)/install
ifndef INSTALL_ROOT
INSTALL_ROOT=$(COOLING_INSTALL_ROOT)
endif
export CC = $(CROSS)gcc
export CFLAGS += -O2 -Wall -c
export STRIP = $(CROSS)strip
export SOURCES= \
cooling.c
export OBJECTS=$(SOURCES:.c=.o)
export EXECUTABLE=cooling
LIBS += -lubus -lubox
CFLAGS += -L$(INSTALL_ROOT)/lib $(TARGET_CFLAGS) \
-fstack-protector-all -fpie
LDFLAGS += $(TARGET_LDFLAGS) -pie
# What we build by default:
ALL = $(EXECUTABLE)
# RULES ---------------------------------------------------------------
# Making default targets:
all: local
@echo All done in `pwd`
$(EXECUTABLE): $(OBJECTS)
$(CC) $(LIB_PATH) $(LIBS) $(LDFLAGS) $(OBJECTS) -o $@
@echo Build $@ successufully...
.c.o:
$(CC) $(INCLUDE) $(CFLAGS) $(LDFLAGS) $< -o $@
clean:
rm -rf *.o *.d $(EXECUTABLE)
local: $(SOURCES) $(EXECUTABLE)
@echo Build $@ successufully...
# Doing installation (see comments at top of this file)
install: local
mkdir -p $(INSTALL_ROOT)/usr/sbin/
cp -a -f $(ALL) $(INSTALL_ROOT)/usr/sbin/
mkdir -p $(INSTALL_ROOT)/etc/cooling
cp -a -f sonicfi-rap630*-cooling.conf $(INSTALL_ROOT)/etc/cooling/
@echo Installed outputs from `pwd`
# Remove all generated files
#clean: default_clean # from Makefile.rules
clean:
rm -rf $(INSTALL_ROOT)/usr/sbin/cooling
rm -rf ./$(ALL)
# END --------------------------------------------------------------------

View File

@@ -0,0 +1,215 @@
/*===========================================================================
cooling.c
DESCRIPTION
Thermal monitor and mitigation implementation functions.
===========================================================================*/
#include <stdio.h> /* Standard input/output definitions */
#include <stdlib.h>
#include <string.h> /* String function definitions */
#include <unistd.h> /* UNIX standard function definitions */
#include <fcntl.h> /* File control definitions */
#include <errno.h> /* Error number definitions */
#include <getopt.h>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/resource.h>
#include <libubox/ustream.h>
#include <libubox/uloop.h>
#include <libubox/list.h>
#include <libubox/ulog.h>
#include <libubus.h>
#define CUR_STATE_PATH "/sys/devices/virtual/thermal/cooling_device%i/cur_state"
#define TEMPER_PATH "/sys/devices/virtual/thermal/thermal_zone%i/temp"
#define PATH_MAX 256
#define BUF_MAX 8
#define THERSHOLD_MAX 20
#define PHY0 0
#define PHY1 1
typedef unsigned char u8;
u8 w2g_threshold_level=0;
u8 w5g_threshold_level=0;
u8 w2g_cur_temper=0;
u8 w5g_cur_temper=0;
#ifdef PLATFORM_RAP630C_311G
u8 level_2g_lo[4]={0, 105, 110, 115};
u8 level_2g_hi[4]={105, 110, 115, 120};
u8 level_2g_limit[4]={0, 35, 50, 70};
u8 level_5g_lo[4]={0, 105, 110, 115};
u8 level_5g_hi[4]={105, 110, 115, 120};
u8 level_5g_limit[4]={0, 20, 30, 50};
#endif
#ifdef PLATFORM_RAP630W_311G
u8 level_2g_lo[4]={0, 105, 110, 115};
u8 level_2g_hi[4]={105, 110, 115, 120};
u8 level_2g_limit[4]={0, 20, 50, 70};
u8 level_5g_lo[4]={0, 105, 110, 115};
u8 level_5g_hi[4]={105, 110, 115, 120};
u8 level_5g_limit[4]={0, 20, 50, 70};
#endif
static char *config_file = NULL;
char temp[4][BUF_MAX];
#define ULOG_DBG(fmt, ...) ulog(LOG_DEBUG, fmt, ## __VA_ARGS__)
static void write_cur_state (char *filename, int state) {
FILE * fp;
ULOG_DBG("write_cur_state filename=[%s] [%d]\n", filename, state);
fp = fopen(filename, "w");
if (!fp){
ULOG_ERR("some kind of error write cur_state\n");
}
fprintf(fp, "%d", state);
fclose(fp);
}
static void read_cur_state (char *filename, char *buffer) {
FILE * fp;
fp = fopen(filename, "r");
if (!fp){
ULOG_ERR("some kind of error write cur_state\n");
}
if (0 == fread(buffer, sizeof(char), 3, fp)) {
ULOG_ERR("some kind of error read value\n");
}
fclose(fp);
}
static void wifi_get_temperature() {
char filename[PATH_MAX];
FILE * fp;
int i = 0;
char buffer[BUF_MAX];
/* get current phy cooling state*/
for (i=0 ; i <= 1; i++ ) {
memset(buffer, 0, BUF_MAX);
snprintf(filename, PATH_MAX, CUR_STATE_PATH, i);
read_cur_state(filename, buffer);
ULOG_DBG("read from Phy%i cur_state is %s\n", i, buffer);
}
for (i=0 ; i <= 3; i++ ) {
snprintf(filename, PATH_MAX, TEMPER_PATH, i);
fp = fopen(filename, "r");
if (!fp) {
ULOG_ERR("some kind of error open value\n");
}
memset(temp[i], 0, BUF_MAX);
if (0 == fread(temp[i], sizeof(char), 3, fp)) {
ULOG_ERR("some kind of error read value\n");
}
fclose(fp);
ULOG_DBG("thermal_zone%i cur_temp is %s\n", i, temp[i]);
}
w2g_cur_temper=atoi(temp[0]);
w5g_cur_temper=atoi(temp[3]);
}
static void wifi_set_cooling() {
char filename[PATH_MAX];
int level;
for (level=0 ; level<=3 ; level++) {
if (w2g_cur_temper >= level_2g_lo[level] && w2g_cur_temper < level_2g_hi[level]) {
ULOG_DBG("2G at level %d , %d degree\n" ,level, w2g_cur_temper);
if (w2g_threshold_level != level) {
ULOG_DBG("setting 2G reduce %d percent\n" ,level_2g_limit[level]);
snprintf(filename, PATH_MAX, CUR_STATE_PATH, PHY0);
write_cur_state(filename, level_2g_limit[level]);
w2g_threshold_level = level;
}
}
if (w5g_cur_temper >= level_5g_lo[level] && w5g_cur_temper < level_5g_hi[level]) {
ULOG_DBG("5G at level %d , %d degree\n" ,level, w5g_cur_temper);
if (w5g_threshold_level != level) {
ULOG_DBG("setting 5G reduce %d percent\n" ,level_5g_limit[level]);
snprintf(filename, PATH_MAX, CUR_STATE_PATH, PHY1);
write_cur_state(filename, level_5g_limit[level]);
w5g_threshold_level = level;
}
}
}
}
static void cooling_init() {
char filename[256];
int i;
for (i=0 ; i <= 1; i++) {
snprintf(filename, PATH_MAX, CUR_STATE_PATH, i);
write_cur_state(filename, 0);
}
}
void print_usage(void)
{
printf("\nWifi-cooling daemon usage\n");
printf("Optional arguments:\n");
printf(" -c <file> config file\n");
printf(" -d debug output\n");
printf(" -h this usage screen\n");
}
static void state_timeout_cb(struct uloop_timeout *t)
{
wifi_get_temperature();
wifi_set_cooling();
uloop_timeout_set(t, 30 * 1000); // interval 30 seconds
}
int main(int argc, char *argv[])
{
int ch;
struct uloop_timeout state_timeout = {
.cb = state_timeout_cb,
};
setpriority(PRIO_PROCESS, getpid(), -20);
ulog_open(ULOG_STDIO | ULOG_SYSLOG, LOG_DAEMON, "cooling");
ulog_threshold(LOG_INFO);
while ((ch = getopt(argc, argv, "c:dh")) != -1) {
switch (ch) {
case 'c':
printf("wifi-cooling load configuration file %s\n", optarg);
config_file = optarg;
break;
case 'd':
printf("wifi-cooling ulog_threshold set to debug level\n");
ulog_threshold(LOG_DEBUG);
break;
case 'h':
default:
print_usage();
return 0;
}
}
cooling_init();
uloop_init();
uloop_timeout_set(&state_timeout, 1000);
uloop_run();
uloop_done();
return 0;
}

View File

@@ -0,0 +1,15 @@
sampling 5000
[tsens_tz_sensor1]
sampling 5000
thresholds 105 110 115 119 120
thresholds_clr 0 100 105 110 115
actions cooling cooling cooling cooling shutdown
action_info 0 35 50 70 800000
[tsens_tz_sensor4]
sampling 5000
thresholds 105 110 115 119 120
thresholds_clr 0 100 105 110 115
actions cooling cooling cooling cooling shutdown
action_info 0 20 30 50 800000

View File

@@ -0,0 +1,15 @@
sampling 5000
[tsens_tz_sensor1]
sampling 5000
thresholds 105 115 119 125
thresholds_clr 0 105 110 120
actions cooling cooling cooling cooling
action_info 0 20 50 70
[tsens_tz_sensor4]
sampling 5000
thresholds 105 115 119 125
thresholds_clr 0 105 110 120
actions cooling cooling cooling cooling
action_info 0 20 50 70

View File

@@ -25,7 +25,7 @@ _afc_location() {
# create afc-location.json
procd_open_instance
procd_set_param command "$PROG" /usr/share/hostap/afc_location.uc
procd_set_param respawn
procd_set_param respawn 0 60 5
procd_close_instance
}

View File

@@ -225,9 +225,13 @@ function sta_auth_psk(ifname, addr) {
if (!ssid)
return;
let cache = sta_cache_entry_get(ssid, addr);
if (cache)
return [ cache.key ];
if (interfaces[ifname]?.band == '6g') {
let cache = sta_cache_entry_get(ssid, addr);
if (cache)
return [ cache.key ];
} else if (cache[ssid]) {
delete cache[ssid][addr];
}
return ssid_psk(ssid, addr);
}

View File

@@ -10,11 +10,12 @@ case "$board" in
wallys,dr5018)
ucidef_set_led_netdev "wan" "wan" "green:uplink" "eth0"
;;
edgecore,eap104)
edgecore,eap104|\
indio,um-525axm)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy1tpt"
ucidef_set_led_netdev "wan" "wan" "yellow:uplink" "eth0"
ucidef_set_led_default "power" "POWER" "green:power" "on"
# ucidef_set_led_default "power" "POWER" "green:power" "on"
;;
cig,wf186h|\
cig,wf186w)
@@ -24,6 +25,11 @@ cybertan,eww631-a1|\
cybertan,eww631-b1)
ucidef_set_led_default "power" "POWER" "sys:blue" "on"
;;
cybertan,rap630w-312g)
ucidef_set_led_default "power" "POWER" "red:power" "on"
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy1tpt"
;;
sonicfi,rap630c-311g|\
sonicfi,rap630w-311g)
ucidef_set_led_default "power" "POWER" "pwm:blue" "on"

View File

@@ -31,6 +31,10 @@ qcom_setup_interfaces()
ucidef_set_interface_wan "eth1"
ucidef_set_interface_lan "eth0"
;;
udaya,a6-od2)
ucidef_set_interface_wan "eth1"
ucidef_set_interface_lan "eth0"
;;
edgecore,oap101|\
edgecore,oap101-6e|\
edgecore,oap101e|\
@@ -44,6 +48,12 @@ qcom_setup_interfaces()
ucidef_add_switch "switch1" \
"6@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
;;
indio,um-525axm)
ucidef_set_interface_wan "eth1"
ucidef_set_interface_lan "eth0"
ucidef_add_switch "switch1" \
"6@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
;;
hfcl,ion4x_w|\
hfcl,ion4xi_w)
ucidef_set_interface_wan "eth0"
@@ -55,6 +65,7 @@ qcom_setup_interfaces()
ucidef_set_interface_wan "eth0"
ucidef_set_interface_lan "eth1"
;;
cybertan,rap630w-312g|\
yuncore,fap655)
ucidef_add_switch "switch1" \
"6@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"

View File

@@ -123,6 +123,7 @@ ath11k/IPQ5018/hw1.0/caldata.bin)
sonicfi,rap630w-311g|\
cybertan,eww631-a1|\
cybertan,eww631-b1|\
cybertan,rap630w-312g|\
edgecore,eap104|\
edgecore,oap101|\
edgecore,oap101-6e|\
@@ -130,11 +131,13 @@ ath11k/IPQ5018/hw1.0/caldata.bin)
edgecore,oap101e-6e|\
hfcl,ion4x_w|\
hfcl,ion4xi_w|\
indio,um-525xm|\
optimcloud,d60|\
optimcloud,d60-5g|\
optimcloud,d50|\
optimcloud,d50-5g|\
udaya,a6-id2|\
udaya,a6-od2|\
wallys,dr5018|\
yuncore,fap655|\
glinet,b3000)
@@ -150,11 +153,13 @@ ath11k/qcn6122/hw1.0/caldata_1.bin)
sonicfi,rap630w-311g|\
cybertan,eww631-a1|\
cybertan,eww631-b1|\
cybertan,rap630w-312g|\
edgecore,oap101|\
edgecore,oap101-6e|\
edgecore,oap101e|\
edgecore,oap101e-6e|\
udaya,a6-id2|\
udaya,a6-od2|\
hfcl,ion4xi_w|\
wallys,dr5018|\
yuncore,fap655)
@@ -167,7 +172,8 @@ ath11k/qcn6122/hw1.0/caldata_2.bin)
wallys,dr5018|\
edgecore,eap104|\
edgecore,oap101-6e|\
edgecore,oap101e-6e)
edgecore,oap101e-6e|\
indio,um-525axm)
caldata_extract "0:ART" 0x4c000 0x20000
;;
sonicfi,rap630c-311g|\
@@ -215,7 +221,9 @@ ath11k-macs)
optimcloud,d60-5g|\
optimcloud,d50|\
optimcloud,d50-5g|\
yuncore,fap655)
cybertan,rap630w-312g|\
yuncore,fap655|\
indio,um-525axm)
ath11k_generate_macs
;;
hfcl,ion4x_w|\

View File

@@ -74,10 +74,12 @@ platform_check_image() {
sonicfi,rap630w-311g|\
cybertan,eww631-a1|\
cybertan,eww631-b1|\
cybertan,rap630w-312g|\
edgecore,eap104|\
wallys,dr5018|\
hfcl,ion4x_w|\
hfcl,ion4xi_w|\
indio,um-525axm|\
optimcloud,d60|\
optimcloud,d60-5g|\
optimcloud,d50|\
@@ -85,6 +87,7 @@ platform_check_image() {
yuncore,fap655|\
glinet,b3000|\
udaya,a6-id2|\
udaya,a6-od2|\
edgecore,oap101|\
edgecore,oap101-6e|\
edgecore,oap101e|\
@@ -107,7 +110,8 @@ platform_do_upgrade() {
edgecore,oap101-6e|\
edgecore,oap101e|\
edgecore,oap101e-6e|\
edgecore,eap104)
edgecore,eap104|\
indio,um-525axm)
CI_UBIPART="rootfs1"
[ "$(find_mtd_chardev rootfs)" ] && CI_UBIPART="rootfs"
nand_upgrade_tar "$1"
@@ -128,6 +132,7 @@ platform_do_upgrade() {
cig,wf186w|\
cig,wf186h|\
udaya,a6-id2|\
udaya,a6-od2|\
wallys,dr5018|\
optimcloud,d60|\
optimcloud,d60-5g|\
@@ -143,16 +148,17 @@ platform_do_upgrade() {
sonicfi,rap630c-311g|\
sonicfi,rap630w-311g|\
cybertan,eww631-a1|\
cybertan,eww631-b1)
cybertan,eww631-b1|\
cybertan,rap630w-312g)
boot_part=$(fw_printenv bootfrom | cut -d = -f2)
echo "Current bootfrom is $boot_part"
if [[ $boot_part == 1 ]]; then
CI_UBIPART="rootfs"
CI_FWSETENV="bootfrom 0"
else
CI_UBIPART="rootfs_1"
CI_FWSETENV="bootfrom 1"
fi
echo "Current bootfrom is $boot_part"
if [[ $boot_part == 1 ]]; then
CI_UBIPART="rootfs"
CI_FWSETENV="bootfrom 0"
elif [[ $boot_part == 0 ]]; then
CI_UBIPART="rootfs_1"
CI_FWSETENV="bootfrom 1"
fi
nand_upgrade_tar "$1"
;;
esac

View File

@@ -817,10 +817,9 @@
qcom,board_id = <0x24>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0 0>;
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0>;
qcom,caldb-size = <0x200000>;
mem-region = <&q6_ipq5018_data>;
1235
#else
memory-region = <&q6_ipq5018_data>;
#endif

View File

@@ -173,40 +173,40 @@
* | data | | |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | data | 0x4C400000 | 14MB |
* | data | 0x4C400000 | 13MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | M3 Dump | 0x4D200000 | 1MB |
* | M3 Dump | 0x4D100000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | QDSS | 0x4D300000 | 1MB |
* | QDSS | 0x4D200000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | Caldb | 0x4D400000 | 2MB |
* | Caldb | 0x4D300000 | 2MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | data | 0x4D600000 | 16MB |
* | data | 0x4D500000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | M3 Dump | 0x4E600000 | 1MB |
* | M3 Dump | 0x4E200000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | QDSS | 0x4E700000 | 1MB |
* | QDSS | 0x4E300000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | Caldb | 0x4E800000 | 5MB |
* | Caldb | 0x4E400000 | 5MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | data | 0x4ED00000 | 16MB |
* | data | 0x4E900000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | M3 Dump | 0x4FD00000 | 1MB |
* | M3 Dump | 0x4F600000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | QDSS | 0x4FE00000 | 1MB |
* | QDSS | 0x4F700000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | Caldb | 0x4FF00000 | 5MB |
* | Caldb | 0x4F800000 | 5MB |
* +----------+--------------+-------------------------+
* | |
* | Rest of the memory for Linux |
@@ -215,7 +215,7 @@
*/
q6_mem_regions: q6_mem_regions@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x5400000>;
reg = <0x0 0x4B000000 0x0 0x4D00000>;
};
q6_code_data: q6_code_data@4B000000 {
@@ -225,62 +225,62 @@
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
no-map;
reg = <0x0 0x4C400000 0x0 0xE00000>;
reg = <0x0 0x4C400000 0x0 0xD00000>;
};
m3_dump: m3_dump@4D200000 {
m3_dump: m3_dump@4D100000 {
no-map;
reg = <0x0 0x4D100000 0x0 0x100000>;
};
q6_etr_region: q6_etr_dump@4D200000 {
no-map;
reg = <0x0 0x4D200000 0x0 0x100000>;
};
q6_etr_region: q6_etr_dump@4D300000 {
q6_caldb_region: q6_caldb_region@4D300000 {
no-map;
reg = <0x0 0x4D300000 0x0 0x100000>;
reg = <0x0 0x4D300000 0x0 0x200000>;
};
q6_caldb_region: q6_caldb_region@4D400000 {
q6_qcn6122_data1: q6_qcn6122_data1@4D500000 {
no-map;
reg = <0x0 0x4D400000 0x0 0x200000>;
reg = <0x0 0x4D500000 0x0 0xD00000>;
};
q6_qcn6122_data1: q6_qcn6122_data1@4D600000 {
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E200000 {
no-map;
reg = <0x0 0x4D600000 0x0 0x1000000>;
reg = <0x0 0x4E200000 0x0 0x100000>;
};
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E600000 {
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E300000 {
no-map;
reg = <0x0 0x4E600000 0x0 0x100000>;
reg = <0x0 0x4E300000 0x0 0x100000>;
};
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E700000 {
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E400000 {
no-map;
reg = <0x0 0x4E700000 0x0 0x100000>;
};
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E800000 {
no-map;
reg = <0x0 0x4E800000 0x0 0x500000>;
reg = <0x0 0x4E400000 0x0 0x500000>;
};
q6_qcn6122_data2: q6_qcn6122_data2@4E900000 {
no-map;
reg = <0x0 0x4ED00000 0x0 0x1000000>;
reg = <0x0 0x4E900000 0x0 0xD00000>;
};
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4FD00000 {
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4F600000 {
no-map;
reg = <0x0 0x4FD00000 0x0 0x100000>;
reg = <0x0 0x4F600000 0x0 0x100000>;
};
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4FE00000 {
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F700000 {
no-map;
reg = <0x0 0x4FE00000 0x0 0x100000>;
reg = <0x0 0x4F700000 0x0 0x100000>;
};
q6_qcn6122_caldb_2: q6_qcn6122_caldb_2@4FF00000 {
q6_qcn6122_caldb_2: q6_qcn6122_caldb_2@4F800000 {
no-map;
reg = <0x0 0x4FF00000 0x0 0x500000>;
reg = <0x0 0x4F800000 0x0 0x500000>;
};
#endif
@@ -883,8 +883,8 @@
#endif
qcom,board_id = <0x24>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0 0x0>;
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0 0>;
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0>;
qcom,caldb-size = <0x200000>;
mem-region = <&q6_ipq5018_data>;
#else

View File

@@ -0,0 +1,940 @@
/dts-v1/;
/* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "ipq5018.dtsi"
#include <dt-bindings/input/input.h>
/ {
#address-cells = <0x2>;
#size-cells = <0x2>;
model = "Indio UM-525axm";
compatible = "indio,um-525axm", "qcom,ipq5018-mp03.5-c1", "qcom,ipq5018";
interrupt-parent = <&intc>;
aliases {
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
serial0 = &blsp1_uart1;
serial1 = &blsp1_uart2;
ethernet0 = "/soc/dp1";
ethernet1 = "/soc/dp2";
};
chosen {
bootargs = "console=ttyMSM0,115200,n8 rw init=/init";
#ifdef __IPQ_MEM_PROFILE_256_MB__
bootargs-append = " swiotlb=1";
#else
bootargs-append = " swiotlb=1 coherent_pool=2M";
#endif
stdout-path = "serial0";
};
reserved-memory {
#ifdef __IPQ_MEM_PROFILE_256_MB__
/* 256 MB Profile
* +==========+==============+=========================+
* | | | |
* | Region | Start Offset | Size |
* | | | |
* +----------+--------------+-------------------------+
* | NSS | 0x40000000 | 8MB |
* +----------+--------------+-------------------------+
* | Linux | 0x40800000 | Depends on total memory |
* +----------+--------------+-------------------------+
* | uboot | 0x4A600000 | 4MB |
* +----------+--------------+-------------------------+
* | SBL | 0x4AA00000 | 1MB |
* +----------+--------------+-------------------------+
* | smem | 0x4AB00000 | 1MB |
* +----------+--------------+-------------------------+
* | TZ | 0x4AC00000 | 4MB |
* +----------+--------------+-------------------------+
* | Q6 | | |
* | code/ | 0x4B000000 | 20MB |
* | data | | |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | data | 0x4C400000 | 13MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | M3 Dump | 0x4D100000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | QDSS | 0x4D200000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | data | 0x4D300000 | 15MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | M3 Dump | 0x4E200000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | QDSS | 0x4E300000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | data | 0x4E400000 | 15MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | M3 Dump | 0x4F300000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | QDSS | 0x4F400000 | 1MB |
* +----------+--------------+-------------------------+
* | |
* | Rest of the memory for Linux |
* | |
* +===================================================+
*/
q6_mem_regions: q6_mem_regions@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x4500000>;
};
q6_code_data: q6_code_data@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x1400000>;
};
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
no-map;
reg = <0x0 0x4C400000 0x0 0xD00000>;
};
m3_dump: m3_dump@4D100000 {
no-map;
reg = <0x0 0x4D100000 0x0 0x100000>;
};
q6_etr_region: q6_etr_dump@4D200000 {
no-map;
reg = <0x0 0x4D200000 0x0 0x100000>;
};
q6_qcn6122_data1: q6_qcn6122_data1@4D300000 {
no-map;
reg = <0x0 0x4D300000 0x0 0xF00000>;
};
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E200000 {
no-map;
reg = <0x0 0x4E200000 0x0 0x100000>;
};
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E300000 {
no-map;
reg = <0x0 0x4E300000 0x0 0x100000>;
};
q6_qcn6122_data2: q6_qcn6122_data2@4E400000 {
no-map;
reg = <0x0 0x4E400000 0x0 0xF00000>;
};
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4F300000 {
no-map;
reg = <0x0 0x4F300000 0x0 0x100000>;
};
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F400000 {
no-map;
reg = <0x0 0x4F400000 0x0 0x100000>;
};
#else
/* 512MB/1GB Profiles
* +==========+==============+=========================+
* | | | |
* | Region | Start Offset | Size |
* | | | |
* +----------+--------------+-------------------------+
* | NSS | 0x40000000 | 16MB |
* +----------+--------------+-------------------------+
* | Linux | 0x41000000 | Depends on total memory |
* +----------+--------------+-------------------------+
* | uboot | 0x4A600000 | 4MB |
* +----------+--------------+-------------------------+
* | SBL | 0x4AA00000 | 1MB |
* +----------+--------------+-------------------------+
* | smem | 0x4AB00000 | 1MB |
* +----------+--------------+-------------------------+
* | TZ | 0x4AC00000 | 4MB |
* +----------+--------------+-------------------------+
* | Q6 | | |
* | code/ | 0x4B000000 | 20MB |
* | data | | |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | data | 0x4C400000 | 14MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | M3 Dump | 0x4D200000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | QDSS | 0x4D300000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | Caldb | 0x4D400000 | 2MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | data | 0x4D600000 | 16MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | M3 Dump | 0x4E600000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | QDSS | 0x4E700000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | Caldb | 0x4E800000 | 5MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | data | 0x4ED00000 | 16MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | M3 Dump | 0x4FD00000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | QDSS | 0x4FE00000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | Caldb | 0x4FF00000 | 5MB |
* +----------+--------------+-------------------------+
* | |
* | Rest of the memory for Linux |
* | |
* +===================================================+
*/
q6_mem_regions: q6_mem_regions@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x5400000>;
};
q6_code_data: q6_code_data@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 01400000>;
};
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
no-map;
reg = <0x0 0x4C400000 0x0 0xE00000>;
};
m3_dump: m3_dump@4D200000 {
no-map;
reg = <0x0 0x4D200000 0x0 0x100000>;
};
q6_etr_region: q6_etr_dump@4D300000 {
no-map;
reg = <0x0 0x4D300000 0x0 0x100000>;
};
q6_caldb_region: q6_caldb_region@4D400000 {
no-map;
reg = <0x0 0x4D400000 0x0 0x200000>;
};
q6_qcn6122_data1: q6_qcn6122_data1@4D600000 {
no-map;
reg = <0x0 0x4D600000 0x0 0x1000000>;
};
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E600000 {
no-map;
reg = <0x0 0x4E600000 0x0 0x100000>;
};
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E700000 {
no-map;
reg = <0x0 0x4E700000 0x0 0x100000>;
};
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E800000 {
no-map;
reg = <0x0 0x4E800000 0x0 0x500000>;
};
q6_qcn6122_data2: q6_qcn6122_data2@4E900000 {
no-map;
reg = <0x0 0x4ED00000 0x0 0x1000000>;
};
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4FD00000 {
no-map;
reg = <0x0 0x4FD00000 0x0 0x100000>;
};
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4FE00000 {
no-map;
reg = <0x0 0x4FE00000 0x0 0x100000>;
};
q6_qcn6122_caldb_2: q6_qcn6122_caldb_2@4FF00000 {
no-map;
reg = <0x0 0x4FF00000 0x0 0x500000>;
};
#endif
};
soc {
serial@78af000 {
status = "ok";
};
blsp1_uart2: serial@78b0000 {
pinctrl-0 = <&blsp1_uart_pins>;
pinctrl-names = "default";
};
qpic_bam: dma@7984000{
status = "ok";
};
nand: qpic-nand@79b0000 {
pinctrl-0 = <&qspi_nand_pins>;
pinctrl-names = "default";
status = "ok";
};
spi_0: spi@78b5000 { /* BLSP1 QUP0 */
pinctrl-0 = <&blsp0_spi_pins>;
pinctrl-names = "default";
cs-select = <0>;
status = "ok";
m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
reg = <0>;
compatible = "n25q128a11";
linux,modalias = "m25p80", "n25q128a11";
spi-max-frequency = <50000000>;
use-default-sizes;
};
};
mdio0: mdio@88000 {
status = "ok";
ethernet-phy@0 {
reg = <7>;
};
};
mdio1: mdio@90000 {
status = "ok";
pinctrl-0 = <&mdio1_pins>;
pinctrl-names = "default";
phy-reset-gpio = <&tlmm 39 0>;
ethernet-phy@0 {
reg = <28>;
};
};
ess-instance {
num_devices = <0x1>;
ess-switch@0x39c00000 {
switch_mac_mode = <0xf>; /* mac mode for uniphy instance*/
cmnblk_clk = "internal_96MHz"; /* cmnblk clk*/
qcom,port_phyinfo {
port@0 {
port_id = <1>;
phy_address = <7>;
mdiobus = <&mdio0>;
};
port@1 {
port_id = <2>;
phy_address = <0x1c>;
mdiobus = <&mdio1>;
port_mac_sel = "QGMAC_PORT";
};
};
led_source@0 {
source = <0>;
mode = "normal";
speed = "all";
blink_en = "enable";
active = "high";
};
};
ess-switch1@1 {
compatible = "qcom,ess-switch-qca83xx";
device_id = <1>;
switch_access_mode = "mdio";
mdio-bus = <&mdio1>;
reset_gpio = <0x28>;
switch_cpu_bmp = <0x40>; /* cpu port bitmap */
switch_lan_bmp = <0x1e>; /* lan port bitmap */
switch_wan_bmp = <0x0>; /* wan port bitmap */
qca,ar8327-initvals = <
0x00004 0x7600000 /* PAD0_MODE */
0x00008 0x1000000 /* PAD5_MODE */
0x0000c 0x80 /* PAD6_MODE */
0x00010 0x2613a0 /* PORT6 FORCE MODE*/
0x000e4 0xaa545 /* MAC_POWER_SEL */
0x000e0 0xc74164de /* SGMII_CTRL */
0x0007c 0x4e /* PORT0_STATUS */
0x00094 0x4e /* PORT6_STATUS */
>;
qcom,port_phyinfo {
port@0 {
port_id = <1>;
phy_address = <28>;
};
};
};
};
dp1 {
device_type = "network";
compatible = "qcom,nss-dp";
clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>;
clock-names = "nss-snoc-gmac-axi-clk";
qcom,id = <1>;
reg = <0x39C00000 0x10000>;
interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
qcom,mactype = <2>;
qcom,link-poll = <1>;
qcom,phy-mdio-addr = <7>;
mdio-bus = <&mdio0>;
local-mac-address = [000000000000];
phy-mode = "sgmii";
};
dp2 {
device_type = "network";
compatible = "qcom,nss-dp";
clocks = <&gcc GCC_SNOC_GMAC1_AXI_CLK>;
clock-names = "nss-snoc-gmac-axi-clk";
qcom,id = <2>;
reg = <0x39D00000 0x10000>;
interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
qcom,mactype = <2>;
qcom,link-poll = <1>;
qcom,phy-mdio-addr = <28>;
mdio-bus = <&mdio1>;
local-mac-address = [000000000000];
phy-mode = "sgmii";
};
qcom,test@0 {
status = "ok";
};
nss-macsec1 {
compatible = "qcom,nss-macsec";
phy_addr = <0x1c>;
mdiobus = <&mdio1>;
};
lpass: lpass@0xA000000{
status = "disabled";
};
pcm: pcm@0xA3C0000{
pinctrl-0 = <&audio_pins>;
pinctrl-names = "default";
status = "disabled";
};
pcm_lb: pcm_lb@0 {
status = "disabled";
};
};
thermal-zones {
status = "ok";
};
};
&tlmm {
pinctrl-0 = <&blsp0_uart_pins &phy_led_pins>;
pinctrl-names = "default";
blsp0_uart_pins: uart_pins {
blsp0_uart_rx_tx {
pins = "gpio20", "gpio21";
function = "blsp0_uart0";
bias-disable;
};
};
blsp1_uart_pins: blsp1_uart_pins {
blsp1_uart_rx_tx {
pins = "gpio22", "gpio24", "gpio23", "gpio25";
function = "blsp1_uart2";
bias-disable;
};
};
blsp0_spi_pins: blsp0_spi_pins {
mux {
pins = "gpio10", "gpio11", "gpio12", "gpio13";
function = "blsp0_spi";
drive-strength = <2>;
bias-disable;
};
};
qspi_nand_pins: qspi_nand_pins {
qspi_clock {
pins = "gpio9";
function = "qspi_clk";
drive-strength = <8>;
bias-disable;
};
qspi_cs {
pins = "gpio8";
function = "qspi_cs";
drive-strength = <8>;
bias-disable;
};
qspi_data_0 {
pins = "gpio7";
function = "qspi0";
drive-strength = <8>;
bias-disable;
};
qspi_data_1 {
pins = "gpio6";
function = "qspi1";
drive-strength = <8>;
bias-disable;
};
qspi_data_2 {
pins = "gpio5";
function = "qspi2";
drive-strength = <8>;
bias-disable;
};
qspi_data_3 {
pins = "gpio4";
function = "qspi3";
drive-strength = <8>;
bias-disable;
};
};
mdio1_pins: mdio_pinmux {
mux_0 {
pins = "gpio36";
function = "mdc";
drive-strength = <8>;
bias-pull-up;
};
mux_1 {
pins = "gpio37";
function = "mdio";
drive-strength = <8>;
bias-pull-up;
};
};
phy_led_pins: phy_led_pins {
gephy_led_pin {
pins = "gpio46";
function = "led0";
drive-strength = <8>;
bias-pull-down;
};
};
i2c_pins: i2c_pins {
i2c_scl {
pins = "gpio25";
function = "blsp2_i2c1";
drive-strength = <8>;
bias-disable;
};
i2c_sda {
pins = "gpio26";
function = "blsp2_i2c1";
drive-strength = <8>;
bias-disable;
};
};
button_pins: button_pins {
reset_button {
pins = "gpio38";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};
};
audio_pins: audio_pinmux {
};
leds_pins: leds_pins {
led_5g {
pins = "gpio34";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_2g {
pins = "gpio33";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_sys {
pins = "gpio26";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
hwwatchdog {
pins = "gpio27";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_onekey {
pins = "gpio28";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
};
};
&soc {
gpio_keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";
button@1 {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&leds_pins>;
pinctrl-names = "default";
led@33 {
label = "led_5g";
gpios = <&tlmm 34 GPIO_ACTIVE_LOW>;
linux,default-trigger = "led_5g";
default-state = "off";
};
led@34 {
label = "led_2g";
gpios = <&tlmm 33 GPIO_ACTIVE_LOW>;
linux,default-trigger = "led_2g";
default-state = "off";
};
led@26 {
label = "led_sys";
gpios = <&tlmm 26 GPIO_ACTIVE_LOW>;
linux,default-trigger = "led_sys";
default-state = "on";
};
hwwatchdog {
label = "hwwatchdog";
gpios = <&tlmm 27 GPIO_ACTIVE_LOW>;
linux,default-trigger = "hwwatchdog";
default-state = "on";
};
led@28 {
label = "led_onekey";
gpios = <&tlmm 28 GPIO_ACTIVE_LOW>;
linux,default-trigger = "led_onekey";
default-state = "off";
};
};
};
&q6v5_wcss {
compatible = "qcom,ipq5018-q6-mpd";
#address-cells = <1>;
#size-cells = <1>;
ranges;
firmware = "IPQ5018/q6_fw.mdt";
reg = <0x0cd00000 0x4040>,
<0x1938000 0x8>,
<0x193d204 0x4>;
reg-names = "qdsp6",
"tcsr-msip",
"tcsr-q6";
resets = <&gcc GCC_WCSSAON_RESET>,
<&gcc GCC_WCSS_Q6_BCR>;
reset-names = "wcss_aon_reset",
"wcss_q6_reset";
clocks = <&gcc GCC_Q6_AXIS_CLK>,
<&gcc GCC_WCSS_ECAHB_CLK>,
<&gcc GCC_Q6_AXIM_CLK>,
<&gcc GCC_Q6_AXIM2_CLK>,
<&gcc GCC_Q6_AHB_CLK>,
<&gcc GCC_Q6_AHB_S_CLK>,
<&gcc GCC_WCSS_AXI_S_CLK>;
clock-names = "gcc_q6_axis_clk",
"gcc_wcss_ecahb_clk",
"gcc_q6_axim_clk",
"gcc_q6_axim2_clk",
"gcc_q6_ahb_clk",
"gcc_q6_ahb_s_clk",
"gcc_wcss_axi_s_clk";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_mem_regions>, <&q6_etr_region>;
#else
memory-region = <&q6_mem_regions>, <&q6_etr_region>,
<&q6_caldb_region>;
#endif
qcom,rproc = <&q6v5_wcss>;
qcom,bootargs_smem = <507>;
boot-args = <0x1 0x4 0x3 0x0F 0x0 0x0>,
<0x2 0x4 0x2 0x12 0x0 0x0>;
status = "ok";
q6_wcss_pd1: remoteproc_pd1@4ab000 {
compatible = "qcom,ipq5018-wcss-ahb-mpd";
reg = <0x4ab000 0x20>;
reg-names = "rmb";
firmware = "IPQ5018/q6_fw.mdt";
m3_firmware = "IPQ5018/m3_fw.mdt";
interrupts-extended = <&wcss_smp2p_in 8 0>,
<&wcss_smp2p_in 9 0>,
<&wcss_smp2p_in 12 0>,
<&wcss_smp2p_in 11 0>;
interrupt-names = "fatal",
"ready",
"spawn-ack",
"stop-ack";
resets = <&gcc GCC_WCSSAON_RESET>,
<&gcc GCC_WCSS_BCR>,
<&gcc GCC_CE_BCR>;
reset-names = "wcss_aon_reset",
"wcss_reset",
"ce_reset";
clocks = <&gcc GCC_WCSS_AHB_S_CLK>,
<&gcc GCC_WCSS_ACMT_CLK>,
<&gcc GCC_WCSS_AXI_M_CLK>;
clock-names = "gcc_wcss_ahb_s_clk",
"gcc_wcss_acmt_clk",
"gcc_wcss_axi_m_clk";
qcom,halt-regs = <&tcsr_q6_block 0xa000 0xd000 0x0>;
qcom,smem-states = <&wcss_smp2p_out 8>,
<&wcss_smp2p_out 9>,
<&wcss_smp2p_out 10>;
qcom,smem-state-names = "shutdown",
"stop",
"spawn";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_ipq5018_data>, <&m3_dump>,
<&q6_etr_region>;
#else
memory-region = <&q6_ipq5018_data>, <&m3_dump>,
<&q6_etr_region>, <&q6_caldb_region>;
#endif
};
q6_wcss_pd2: remoteproc_pd2 {
compatible = "qcom,ipq5018-wcss-pcie-mpd";
firmware = "IPQ5018/q6_fw.mdt";
m3_firmware = "qcn6122/m3_fw.mdt";
interrupts-extended = <&wcss_smp2p_in 16 0>,
<&wcss_smp2p_in 17 0>,
<&wcss_smp2p_in 20 0>,
<&wcss_smp2p_in 19 0>;
interrupt-names = "fatal",
"ready",
"spawn-ack",
"stop-ack";
qcom,smem-states = <&wcss_smp2p_out 16>,
<&wcss_smp2p_out 17>,
<&wcss_smp2p_out 18>;
qcom,smem-state-names = "shutdown",
"stop",
"spawn";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
<&q6_qcn6122_etr_1>;
#else
memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
<&q6_qcn6122_etr_1>, <&q6_qcn6122_caldb_1>;
#endif
};
q6_wcss_pd3: remoteproc_pd3 {
compatible = "qcom,ipq5018-wcss-pcie-mpd";
firmware = "IPQ5018/q6_fw.mdt";
interrupts-extended = <&wcss_smp2p_in 24 0>,
<&wcss_smp2p_in 25 0>,
<&wcss_smp2p_in 28 0>,
<&wcss_smp2p_in 27 0>;
interrupt-names = "fatal",
"ready",
"spawn-ack",
"stop-ack";
qcom,smem-states = <&wcss_smp2p_out 24>,
<&wcss_smp2p_out 25>,
<&wcss_smp2p_out 26>;
qcom,smem-state-names = "shutdown",
"stop",
"spawn";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_qcn6122_data2>, <&m3_dump_qcn6122_2>,
<&q6_qcn6122_etr_2>;
#else
memory-region = <&q6_qcn6122_data2>, <&m3_dump_qcn6122_2>,
<&q6_qcn6122_etr_2>, <&q6_qcn6122_caldb_2>;
#endif
};
};
&i2c_0 {
pinctrl-0 = <&i2c_pins>;
pinctrl-names = "default";
status = "disabled";
};
&wifi0 {
/* IPQ5018 */
qcom,multipd_arch;
qcom,rproc = <&q6_wcss_pd1>;
qcom,userpd-subsys-name = "q6v5_wcss_userpd1";
#ifdef __IPQ_MEM_PROFILE_256_MB__
qcom,tgt-mem-mode = <2>;
#else
qcom,tgt-mem-mode = <1>;
#endif
qcom,board_id = <0x24>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
qcom,caldb-addr = <0x4D400000 0x4D400000 0 0 0>;
qcom,caldb-size = <0x200000>;
mem-region = <&q6_ipq5018_data>;
#else
memory-region = <&q6_ipq5018_data>;
#endif
status = "ok";
};
&wifi1 {
/* QCN6122 5G */
qcom,multipd_arch;
qcom,userpd-subsys-name = "q6v5_wcss_userpd2";
qcom,rproc = <&q6_wcss_pd2>;
#ifdef __IPQ_MEM_PROFILE_256_MB__
qcom,tgt-mem-mode = <2>;
#else
qcom,tgt-mem-mode = <1>;
#endif
qcom,board_id = <0x50>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4D600000 0x4D600000 0x4D300000 0x0 0x0>;
qcom,caldb-addr = <0x4E800000 0x4E800000 0 0 0>;
qcom,caldb-size = <0x500000>;
mem-region = <&q6_qcn6122_data1>;
#else
memory-region = <&q6_qcn6122_data1>;
#endif
status = "disabled";
};
&wifi2 {
/* QCN6122 6G */
qcom,multipd_arch;
qcom,userpd-subsys-name = "q6v5_wcss_userpd3";
qcom,rproc = <&q6_wcss_pd3>;
#ifdef __IPQ_MEM_PROFILE_256_MB__
qcom,tgt-mem-mode = <2>;
#else
qcom,tgt-mem-mode = <1>;
#endif
qcom,board_id = <0xb0>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4ED00000 0x4ED00000 0x4E400000 0x0 0x0>;
qcom,caldb-addr = <0x4FF00000 0x4FF00000 0 0 0>;
qcom,caldb-size = <0x500000>;
mem-region = <&q6_qcn6122_data2>;
#else
memory-region = <&q6_qcn6122_data2>;
#endif
status = "ok";
};
&usb3 {
status = "ok";
device-power-gpio = <&tlmm 24 1>;
};
&dwc_0 {
/delete-property/ #phy-cells;
/delete-property/ phys;
/delete-property/ phy-names;
};
&hs_m31phy_0 {
status = "ok";
};
&eud {
status = "ok";
};
&pcie_x1 {
#status = "disabled";
#perst-gpio = <&tlmm 18 1>;
perst-gpio = <&tlmm 18 GPIO_ACTIVE_LOW>;
};
&pcie_x2 {
#status = "disabled";
#perst-gpio = <&tlmm 15 1>;
perst-gpio = <&tlmm 15 GPIO_ACTIVE_LOW>;
};
&pcie_x1_rp {
status = "disabled";
mhi_0: qcom,mhi@0 {
reg = <0 0 0 0 0 >;
};
};
&pcie_x2_rp {
status = "disabled";
mhi_1: qcom,mhi@1 {
reg = <0 0 0 0 0 >;
};
};

View File

@@ -816,10 +816,9 @@
qcom,board_id = <0x24>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0 0>;
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0>;
qcom,caldb-size = <0x200000>;
mem-region = <&q6_ipq5018_data>;
1235
#else
memory-region = <&q6_ipq5018_data>;
#endif

View File

@@ -175,40 +175,40 @@
* | data | | |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | data | 0x4C400000 | 14MB |
* | data | 0x4C400000 | 13MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | M3 Dump | 0x4D200000 | 1MB |
* | M3 Dump | 0x4D100000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | QDSS | 0x4D300000 | 1MB |
* | QDSS | 0x4D200000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | Caldb | 0x4D400000 | 2MB |
* | Caldb | 0x4D300000 | 2MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | data | 0x4D600000 | 16MB |
* | data | 0x4D500000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | M3 Dump | 0x4E600000 | 1MB |
* | M3 Dump | 0x4E200000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | QDSS | 0x4E700000 | 1MB |
* | QDSS | 0x4E300000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | Caldb | 0x4E800000 | 5MB |
* | Caldb | 0x4E400000 | 5MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | data | 0x4ED00000 | 16MB |
* | data | 0x4E900000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | M3 Dump | 0x4FD00000 | 1MB |
* | M3 Dump | 0x4F600000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | QDSS | 0x4FE00000 | 1MB |
* | QDSS | 0x4F700000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | Caldb | 0x4FF00000 | 5MB |
* | Caldb | 0x4F800000 | 5MB |
* +----------+--------------+-------------------------+
* | |
* | Rest of the memory for Linux |
@@ -217,7 +217,7 @@
*/
q6_mem_regions: q6_mem_regions@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x5400000>;
reg = <0x0 0x4B000000 0x0 0x4D00000>;
};
q6_code_data: q6_code_data@4B000000 {
@@ -227,62 +227,62 @@
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
no-map;
reg = <0x0 0x4C400000 0x0 0xE00000>;
reg = <0x0 0x4C400000 0x0 0xD00000>;
};
m3_dump: m3_dump@4D200000 {
m3_dump: m3_dump@4D100000 {
no-map;
reg = <0x0 0x4D100000 0x0 0x100000>;
};
q6_etr_region: q6_etr_dump@4D200000 {
no-map;
reg = <0x0 0x4D200000 0x0 0x100000>;
};
q6_etr_region: q6_etr_dump@4D300000 {
q6_caldb_region: q6_caldb_region@4D300000 {
no-map;
reg = <0x0 0x4D300000 0x0 0x100000>;
reg = <0x0 0x4D300000 0x0 0x200000>;
};
q6_caldb_region: q6_caldb_region@4D400000 {
q6_qcn6122_data1: q6_qcn6122_data1@4D500000 {
no-map;
reg = <0x0 0x4D400000 0x0 0x200000>;
reg = <0x0 0x4D500000 0x0 0xD00000>;
};
q6_qcn6122_data1: q6_qcn6122_data1@4D600000 {
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E200000 {
no-map;
reg = <0x0 0x4D600000 0x0 0x1000000>;
reg = <0x0 0x4E200000 0x0 0x100000>;
};
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E600000 {
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E300000 {
no-map;
reg = <0x0 0x4E600000 0x0 0x100000>;
reg = <0x0 0x4E300000 0x0 0x100000>;
};
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E700000 {
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E400000 {
no-map;
reg = <0x0 0x4E700000 0x0 0x100000>;
};
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E800000 {
no-map;
reg = <0x0 0x4E800000 0x0 0x500000>;
reg = <0x0 0x4E400000 0x0 0x500000>;
};
q6_qcn6122_data2: q6_qcn6122_data2@4E900000 {
no-map;
reg = <0x0 0x4ED00000 0x0 0x1000000>;
reg = <0x0 0x4E900000 0x0 0xD00000>;
};
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4FD00000 {
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4F600000 {
no-map;
reg = <0x0 0x4FD00000 0x0 0x100000>;
reg = <0x0 0x4F600000 0x0 0x100000>;
};
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4FE00000 {
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F700000 {
no-map;
reg = <0x0 0x4FE00000 0x0 0x100000>;
reg = <0x0 0x4F700000 0x0 0x100000>;
};
q6_qcn6122_caldb_2: q6_qcn6122_caldb_2@4FF00000 {
q6_qcn6122_caldb_2: q6_qcn6122_caldb_2@4F800000 {
no-map;
reg = <0x0 0x4FF00000 0x0 0x500000>;
reg = <0x0 0x4F800000 0x0 0x500000>;
};
#endif
@@ -894,8 +894,8 @@
#endif
qcom,board_id = <0x24>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0 0x0>;
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0 0>;
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0>;
qcom,caldb-size = <0x200000>;
mem-region = <&q6_ipq5018_data>;
#else

View File

@@ -0,0 +1,908 @@
/dts-v1/;
/* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
*
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "ipq5018.dtsi"
#include <dt-bindings/input/input.h>
/ {
#address-cells = <0x2>;
#size-cells = <0x2>;
model = "Cybertan RAP630W-312G";
compatible = "cybertan,rap630w-312g", "qcom,ipq5018-mp03.3", "qcom,ipq5018";
interrupt-parent = <&intc>;
aliases {
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
serial0 = &blsp1_uart1;
serial1 = &blsp1_uart2;
ethernet1 = "/soc/dp1";
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
chosen {
bootargs = "console=ttyMSM0,115200,n8 rw init=/init";
bootargs-append = " swiotlb=1 coherent_pool=2M";
stdout-path = "serial0";
};
reserved-memory {
#ifdef __IPQ_MEM_PROFILE_256_MB__
/* 256 MB Profile
* +==========+==============+=========================+
* | | | |
* | Region | Start Offset | Size |
* | | | |
* +----------+--------------+-------------------------+
* | NSS | 0x40000000 | 8MB |
* +----------+--------------+-------------------------+
* | Linux | 0x40800000 | Depends on total memory |
* +----------+--------------+-------------------------+
* | uboot | 0x4A600000 | 4MB |
* +----------+--------------+-------------------------+
* | SBL | 0x4AA00000 | 1MB |
* +----------+--------------+-------------------------+
* | smem | 0x4AB00000 | 1MB |
* +----------+--------------+-------------------------+
* | TZ | 0x4AC00000 | 4MB |
* +----------+--------------+-------------------------+
* | Q6 | | |
* | code/ | 0x4B000000 | 20MB |
* | data | | |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | data | 0x4C400000 | 13MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | M3 Dump | 0x4D100000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | QDSS | 0x4D200000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | data | 0x4D300000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | M3 Dump | 0x4E000000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | QDSS | 0x4E100000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | data | 0x4E200000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | M3 Dump | 0x4EF00000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | QDSS | 0x4F000000 | 1MB |
* +----------+--------------+-------------------------+
* | |
* | Rest of the memory for Linux |
* | |
* +===================================================+
*/
q6_mem_regions: q6_mem_regions@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x4100000>;
};
q6_code_data: q6_code_data@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x1400000>;
};
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
no-map;
reg = <0x0 0x4C400000 0x0 0xD00000>;
};
m3_dump: m3_dump@4D100000 {
no-map;
reg = <0x0 0x4D100000 0x0 0x100000>;
};
q6_etr_region: q6_etr_dump@4D200000 {
no-map;
reg = <0x0 0x4D200000 0x0 0x100000>;
};
q6_qcn6122_data1: q6_qcn6122_data1@4D300000 {
no-map;
reg = <0x0 0x4D300000 0x0 0xD00000>;
};
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E000000 {
no-map;
reg = <0x0 0x4E000000 0x0 0x100000>;
};
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E100000 {
no-map;
reg = <0x0 0x4E100000 0x0 0x100000>;
};
q6_qcn6122_data2: q6_qcn6122_data2@4E200000 {
no-map;
reg = <0x0 0x4E200000 0x0 0xD00000>;
};
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4EF00000 {
no-map;
reg = <0x0 0x4EF00000 0x0 0x100000>;
};
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F000000 {
no-map;
reg = <0x0 0x4F000000 0x0 0x100000>;
};
#else
/* 512MB/1GB Profiles
* +==========+==============+=========================+
* | | | |
* | Region | Start Offset | Size |
* | | | |
* +----------+--------------+-------------------------+
* | NSS | 0x40000000 | 16MB |
* +----------+--------------+-------------------------+
* | Linux | 0x41000000 | Depends on total memory |
* +----------+--------------+-------------------------+
* | uboot | 0x4A600000 | 4MB |
* +----------+--------------+-------------------------+
* | SBL | 0x4AA00000 | 1MB |
* +----------+--------------+-------------------------+
* | smem | 0x4AB00000 | 1MB |
* +----------+--------------+-------------------------+
* | TZ | 0x4AC00000 | 4MB |
* +----------+--------------+-------------------------+
* | Q6 | | |
* | code/ | 0x4B000000 | 20MB |
* | data | | |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | data | 0x4C400000 | 13MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | M3 Dump | 0x4D100000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | QDSS | 0x4D200000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | Caldb | 0x4D300000 | 2MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | data | 0x4D500000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | M3 Dump | 0x4E200000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | QDSS | 0x4E300000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | Caldb | 0x4E400000 | 5MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | data | 0x4E900000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | M3 Dump | 0x4F600000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | QDSS | 0x4F700000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | Caldb | 0x4F800000 | 5MB |
* +----------+--------------+-------------------------+
* | |
* | Rest of the memory for Linux |
* | |
* +===================================================+
*/
q6_mem_regions: q6_mem_regions@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x4D00000>;
};
q6_code_data: q6_code_data@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 01400000>;
};
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
no-map;
reg = <0x0 0x4C400000 0x0 0xD00000>;
};
m3_dump: m3_dump@4D100000 {
no-map;
reg = <0x0 0x4D100000 0x0 0x100000>;
};
q6_etr_region: q6_etr_dump@4D200000 {
no-map;
reg = <0x0 0x4D200000 0x0 0x100000>;
};
q6_caldb_region: q6_caldb_region@4D300000 {
no-map;
reg = <0x0 0x4D300000 0x0 0x200000>;
};
q6_qcn6122_data1: q6_qcn6122_data1@4D500000 {
no-map;
reg = <0x0 0x4D500000 0x0 0xD00000>;
};
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E200000 {
no-map;
reg = <0x0 0x4E200000 0x0 0x100000>;
};
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E300000 {
no-map;
reg = <0x0 0x4E300000 0x0 0x100000>;
};
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E400000 {
no-map;
reg = <0x0 0x4E400000 0x0 0x500000>;
};
q6_qcn6122_data2: q6_qcn6122_data2@4E900000 {
no-map;
reg = <0x0 0x4E900000 0x0 0xD00000>;
};
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4F600000 {
no-map;
reg = <0x0 0x4F600000 0x0 0x100000>;
};
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F700000 {
no-map;
reg = <0x0 0x4F700000 0x0 0x100000>;
};
q6_qcn6122_caldb_2: q6_qcn6122_caldb_2@4F800000 {
no-map;
reg = <0x0 0x4F800000 0x0 0x500000>;
};
#endif
};
soc {
serial@78af000 {
status = "ok";
};
blsp1_uart2: serial@78b0000 {
pinctrl-0 = <&blsp1_uart_pins>;
pinctrl-names = "default";
status = "disabled";
};
qpic_bam: dma@7984000{
status = "ok";
};
nand: qpic-nand@79b0000 {
pinctrl-0 = <&qspi_nand_pins>;
pinctrl-names = "default";
status = "ok";
};
spi_0: spi@78b5000 { /* BLSP1 QUP0 */
pinctrl-0 = <&blsp0_spi_pins>;
pinctrl-names = "default";
cs-select = <0>;
status = "ok";
m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
reg = <0>;
compatible = "n25q128a11";
linux,modalias = "m25p80", "n25q128a11";
spi-max-frequency = <50000000>;
use-default-sizes;
};
};
mdio0: mdio@88000 {
status = "ok";
ethernet-phy@0 {
reg = <7>;
};
};
mdio1: mdio@90000 {
status = "ok";
pinctrl-0 = <&mdio1_pins>;
pinctrl-names = "default";
phy-reset-gpio = <&tlmm 16 0>;
ethernet-phy@0 {
reg = <0>;
};
ethernet-phy@1 {
reg = <1>;
};
ethernet-phy@2 {
reg = <2>;
};
ethernet-phy@3 {
reg = <3>;
};
ethernet-phy@4 {
reg = <4>;
};
};
ess-instance {
num_devices = <0x2>;
ess-switch@0x39c00000 {
compatible = "qcom,ess-switch-ipq50xx";
device_id = <0>;
switch_mac_mode = <0xf>; /* mac mode for uniphy instance*/
cmnblk_clk = "internal_96MHz"; /* cmnblk clk*/
qcom,port_phyinfo {
port@0 {
port_id = <1>;
phy_address = <7>;
phy_dac = <0x10 0x10>;
mdio-bus = <&mdio0>;
};
port@1 {
mdio-bus = <&mdio0>;
port_id = <2>;
forced-speed = <1000>;
forced-duplex = <1>;
};
};
led_source@0 {
source = <0>;
mode = "normal";
speed = "all";
blink_en = "enable";
active = "high";
};
};
ess-switch1@1 {
compatible = "qcom,ess-switch-qca83xx";
device_id = <1>;
switch_access_mode = "mdio";
mdio-bus = <&mdio1>;
reset_gpio = <&tlmm 0x10 0>; /* gpio 16 */
switch_cpu_bmp = <0x40>; /* cpu port bitmap */
switch_lan_bmp = <0x3e>; /* lan port bitmap */
switch_wan_bmp = <0x0>; /* wan port bitmap */
qca,ar8327-initvals = <
0x00004 0x7600000 /* PAD0_MODE */
0x00008 0x1000000 /* PAD5_MODE */
0x0000c 0x80 /* PAD6_MODE */
0x00010 0x2613a0 /* PORT6 FORCE MODE*/
0x000e4 0xaa545 /* MAC_POWER_SEL */
0x000e0 0xc74164de /* SGMII_CTRL */
0x0007c 0x4e /* PORT0_STATUS */
0x00094 0x4e /* PORT6_STATUS */
>;
qcom,port_phyinfo {
port@0 {
port_id = <1>;
phy_address = <0>;
};
port@1 {
port_id = <2>;
phy_address = <1>;
};
port@2 {
port_id = <3>;
phy_address = <2>;
};
port@3 {
port_id = <4>;
phy_address = <3>;
};
port@4 {
port_id = <5>;
phy_address = <4>;
};
};
};
};
wifi0: wifi@c000000 {
status = "ok";
};
dp1 {
device_type = "network";
compatible = "qcom,nss-dp";
clocks = <&gcc GCC_SNOC_GMAC1_AXI_CLK>;
clock-names = "nss-snoc-gmac-axi-clk";
qcom,id = <2>;
reg = <0x39D00000 0x10000>;
interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
qcom,mactype = <2>;
mdio-bus = <&mdio1>;
local-mac-address = [000000000000];
phy-mode = "sgmii";
};
nss-macsec1 {
compatible = "qcom,nss-macsec";
phy_addr = <0x1c>;
mdiobus = <&mdio1>;
};
};
qcom,test@0 {
status = "ok";
};
thermal-zones {
status = "ok";
};
};
&tlmm {
pinctrl-0 = <&blsp0_uart_pins>;
pinctrl-names = "default";
blsp0_uart_pins: uart_pins {
blsp0_uart_rx_tx {
pins = "gpio20", "gpio21";
function = "blsp0_uart0";
bias-disable;
};
};
blsp1_uart_pins: blsp1_uart_pins {
blsp1_uart_rx_tx {
pins = "gpio23", "gpio25", "gpio24", "gpio26";
function = "blsp1_uart2";
bias-disable;
};
};
blsp0_spi_pins: blsp0_spi_pins {
mux {
pins = "gpio10", "gpio11", "gpio12", "gpio13";
function = "blsp0_spi";
drive-strength = <2>;
bias-disable;
};
};
qspi_nand_pins: qspi_nand_pins {
qspi_clock {
pins = "gpio9";
function = "qspi_clk";
drive-strength = <8>;
bias-disable;
};
qspi_cs {
pins = "gpio8";
function = "qspi_cs";
drive-strength = <8>;
bias-disable;
};
qspi_data {
pins = "gpio4", "gpio5", "gpio6", "gpio7";
function = "qspi_data";
drive-strength = <8>;
bias-disable;
};
};
mdio1_pins: mdio_pinmux {
mux_0 {
pins = "gpio36";
function = "mdc";
drive-strength = <8>;
bias-pull-up;
};
mux_1 {
pins = "gpio37";
function = "mdio";
drive-strength = <8>;
bias-pull-up;
};
};
// phy_led_pins: phy_led_pins {
// gephy_led_pin {
// pins = "gpio50";
// function = "led0";
// drive-strength = <8>;
// bias-pull-down;
// };
// };
button_pins: button_pins {
wps_button {
pins = "gpio38";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};
};
leds_pins: leds_pins {
led_sys {
pins = "gpio24";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_5g {
pins = "gpio22";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_2g {
pins = "gpio23";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_onekey {
pins = "gpio46";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
};
};
&soc {
gpio_keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";
button@1 {
label = "restart";
linux,code = <KEY_RESTART>;
gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&leds_pins>;
pinctrl-names = "default";
led_power: led24 {
label = "red:power";
gpios = <&tlmm 24 GPIO_ACTIVE_LOW>;
linux,default-trigger = "default-on";
default-state = "on";
};
led22 {
label = "green:wifi5";
gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
linux,default-trigger = "default-on";
default-state = "off";
};
led23 {
label = "green:wifi2";
gpios = <&tlmm 23 GPIO_ACTIVE_LOW>;
linux,default-trigger = "default-on";
default-state = "off";
};
led46 {
label = "led_onekey";
gpios = <&tlmm 46 GPIO_ACTIVE_LOW>;
linux,default-trigger = "led_onekey";
default-state = "off";
};
};
gpio_keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";
wps {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&tlmm 32 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
debounce-interval = <60>;
};
};
};
&q6v5_wcss {
compatible = "qcom,ipq5018-q6-mpd";
#address-cells = <1>;
#size-cells = <1>;
ranges;
firmware = "IPQ5018/q6_fw.mdt";
reg = <0x0cd00000 0x4040>,
<0x1938000 0x8>,
<0x193d204 0x4>;
reg-names = "qdsp6",
"tcsr-msip",
"tcsr-q6";
resets = <&gcc GCC_WCSSAON_RESET>,
<&gcc GCC_WCSS_Q6_BCR>;
reset-names = "wcss_aon_reset",
"wcss_q6_reset";
clocks = <&gcc GCC_Q6_AXIS_CLK>,
<&gcc GCC_WCSS_ECAHB_CLK>,
<&gcc GCC_Q6_AXIM_CLK>,
<&gcc GCC_Q6_AXIM2_CLK>,
<&gcc GCC_Q6_AHB_CLK>,
<&gcc GCC_Q6_AHB_S_CLK>,
<&gcc GCC_WCSS_AXI_S_CLK>;
clock-names = "gcc_q6_axis_clk",
"gcc_wcss_ecahb_clk",
"gcc_q6_axim_clk",
"gcc_q6_axim2_clk",
"gcc_q6_ahb_clk",
"gcc_q6_ahb_s_clk",
"gcc_wcss_axi_s_clk";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_mem_regions>, <&q6_etr_region>;
#else
memory-region = <&q6_mem_regions>, <&q6_etr_region>,
<&q6_caldb_region>;
#endif
qcom,rproc = <&q6v5_wcss>;
qcom,bootargs_smem = <507>;
boot-args = <0x1 0x4 0x3 0x0F 0x0 0x0>,
<0x2 0x4 0x2 0x12 0x0 0x0>;
status = "ok";
q6_wcss_pd1: remoteproc_pd1@4ab000 {
compatible = "qcom,ipq5018-wcss-ahb-mpd";
reg = <0x4ab000 0x20>;
reg-names = "rmb";
firmware = "IPQ5018/q6_fw.mdt";
m3_firmware = "IPQ5018/m3_fw.mdt";
interrupts-extended = <&wcss_smp2p_in 8 0>,
<&wcss_smp2p_in 9 0>,
<&wcss_smp2p_in 12 0>,
<&wcss_smp2p_in 11 0>;
interrupt-names = "fatal",
"ready",
"spawn-ack",
"stop-ack";
resets = <&gcc GCC_WCSSAON_RESET>,
<&gcc GCC_WCSS_BCR>,
<&gcc GCC_CE_BCR>;
reset-names = "wcss_aon_reset",
"wcss_reset",
"ce_reset";
clocks = <&gcc GCC_WCSS_AHB_S_CLK>,
<&gcc GCC_WCSS_ACMT_CLK>,
<&gcc GCC_WCSS_AXI_M_CLK>;
clock-names = "gcc_wcss_ahb_s_clk",
"gcc_wcss_acmt_clk",
"gcc_wcss_axi_m_clk";
qcom,halt-regs = <&tcsr_q6_block 0xa000 0xd000 0x0>;
qcom,smem-states = <&wcss_smp2p_out 8>,
<&wcss_smp2p_out 9>,
<&wcss_smp2p_out 10>;
qcom,smem-state-names = "shutdown",
"stop",
"spawn";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_ipq5018_data>, <&m3_dump>,
<&q6_etr_region>;
#else
memory-region = <&q6_ipq5018_data>, <&m3_dump>,
<&q6_etr_region>, <&q6_caldb_region>;
#endif
};
q6_wcss_pd2: remoteproc_pd2 {
compatible = "qcom,ipq5018-wcss-pcie-mpd";
firmware = "IPQ5018/q6_fw.mdt";
m3_firmware = "qcn6122/m3_fw.mdt";
interrupts-extended = <&wcss_smp2p_in 16 0>,
<&wcss_smp2p_in 17 0>,
<&wcss_smp2p_in 20 0>,
<&wcss_smp2p_in 19 0>;
interrupt-names = "fatal",
"ready",
"spawn-ack",
"stop-ack";
qcom,smem-states = <&wcss_smp2p_out 16>,
<&wcss_smp2p_out 17>,
<&wcss_smp2p_out 18>;
qcom,smem-state-names = "shutdown",
"stop",
"spawn";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
<&q6_qcn6122_etr_1>;
#else
memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
<&q6_qcn6122_etr_1>, <&q6_qcn6122_caldb_1>;
#endif
};
q6_wcss_pd3: remoteproc_pd3 {
compatible = "qcom,ipq5018-wcss-pcie-mpd";
firmware = "IPQ5018/q6_fw.mdt";
interrupts-extended = <&wcss_smp2p_in 24 0>,
<&wcss_smp2p_in 25 0>,
<&wcss_smp2p_in 28 0>,
<&wcss_smp2p_in 27 0>;
interrupt-names = "fatal",
"ready",
"spawn-ack",
"stop-ack";
qcom,smem-states = <&wcss_smp2p_out 24>,
<&wcss_smp2p_out 25>,
<&wcss_smp2p_out 26>;
qcom,smem-state-names = "shutdown",
"stop",
"spawn";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_qcn6122_data2>, <&m3_dump_qcn6122_2>,
<&q6_qcn6122_etr_2>;
#else
memory-region = <&q6_qcn6122_data2>, <&m3_dump_qcn6122_2>,
<&q6_qcn6122_etr_2>, <&q6_qcn6122_caldb_2>;
#endif
};
};
&wifi0 {
/* IPQ5018 */
qcom,multipd_arch;
qcom,rproc = <&q6_wcss_pd1>;
qcom,userpd-subsys-name = "q6v5_wcss_userpd1";
#ifdef __IPQ_MEM_PROFILE_256_MB__
qcom,tgt-mem-mode = <2>;
#else
qcom,tgt-mem-mode = <1>;
#endif
qcom,board_id = <0x23>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0>;
qcom,caldb-size = <0x200000>;
mem-region = <&q6_ipq5018_data>;
#else
memory-region = <&q6_ipq5018_data>;
#endif
status = "ok";
};
&wifi1 {
/* QCN6122 5G */
qcom,multipd_arch;
qcom,userpd-subsys-name = "q6v5_wcss_userpd2";
qcom,rproc = <&q6_wcss_pd2>;
#ifdef __IPQ_MEM_PROFILE_256_MB__
qcom,tgt-mem-mode = <2>;
#else
qcom,tgt-mem-mode = <1>;
#endif
qcom,board_id = <0x60>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4D500000 0x4D500000 0x4D300000 0x0 0x0>;
qcom,caldb-addr = <0x4E400000 0x4E400000 0 0 0>;
qcom,caldb-size = <0x500000>;
mem-region = <&q6_qcn6122_data1>;
#else
memory-region = <&q6_qcn6122_data1>;
#endif
status = "ok";
};
&wifi2 {
/* QCN6122 6G */
qcom,multipd_arch;
qcom,userpd-subsys-name = "q6v5_wcss_userpd3";
qcom,rproc = <&q6_wcss_pd3>;
#ifdef __IPQ_MEM_PROFILE_256_MB__
qcom,tgt-mem-mode = <2>;
#else
qcom,tgt-mem-mode = <1>;
#endif
qcom,board_id = <0xb0>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4E900000 0x4E900000 0x4E200000 0x0 0x0>;
qcom,caldb-addr = <0x4F800000 0x4F800000 0 0 0>;
qcom,caldb-size = <0x500000>;
mem-region = <&q6_qcn6122_data2>;
#else
memory-region = <&q6_qcn6122_data2>;
#endif
status = "disabled";
};
&usb3 {
status = "ok";
/* device-power-gpio = <&tlmm 24 1>; */
};
&dwc_0 {
/delete-property/ #phy-cells;
/delete-property/ phys;
/delete-property/ phy-names;
};
&hs_m31phy_0 {
status = "ok";
};
&eud {
status = "ok";
};
&pcie_x1 {
perst-gpio = <&tlmm 18 GPIO_ACTIVE_LOW>;
};
&pcie_x2 {
perst-gpio = <&tlmm 15 GPIO_ACTIVE_LOW>;
};
&pcie_x1_rp {
status = "disabled";
mhi_0: qcom,mhi@0 {
reg = <0 0 0 0 0 >;
};
};
&pcie_x2_rp {
status = "disabled";
mhi_1: qcom,mhi@1 {
reg = <0 0 0 0 0 >;
};
};

View File

@@ -0,0 +1,900 @@
/dts-v1/;
/* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
*
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "ipq5018.dtsi"
/ {
#address-cells = <0x2>;
#size-cells = <0x2>;
model = "Udaya A6-OD2";
compatible = "udaya,a6-od2", "qcom,ipq5018";
interrupt-parent = <&intc>;
aliases {
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
serial0 = &blsp1_uart1;
serial1 = &blsp1_uart2;
ethernet0 = "/soc/dp1";
ethernet1 = "/soc/dp2";
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
chosen {
bootargs = "console=ttyMSM0,115200,n8 rw init=/init";
bootargs-append = " swiotlb=1 coherent_pool=2M";
stdout-path = "serial0";
};
reserved-memory {
#ifdef __IPQ_MEM_PROFILE_256_MB__
/* 256 MB Profile
* +==========+==============+=========================+
* | | | |
* | Region | Start Offset | Size |
* | | | |
* +----------+--------------+-------------------------+
* | NSS | 0x40000000 | 8MB |
* +----------+--------------+-------------------------+
* | Linux | 0x40800000 | Depends on total memory |
* +----------+--------------+-------------------------+
* | uboot | 0x4A600000 | 4MB |
* +----------+--------------+-------------------------+
* | SBL | 0x4AA00000 | 1MB |
* +----------+--------------+-------------------------+
* | smem | 0x4AB00000 | 1MB |
* +----------+--------------+-------------------------+
* | TZ | 0x4AC00000 | 4MB |
* +----------+--------------+-------------------------+
* | Q6 | | |
* | code/ | 0x4B000000 | 20MB |
* | data | | |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | data | 0x4C400000 | 13MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | M3 Dump | 0x4D100000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | QDSS | 0x4D200000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | data | 0x4D300000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | M3 Dump | 0x4E000000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | QDSS | 0x4E100000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | data | 0x4E200000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | M3 Dump | 0x4EF00000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | QDSS | 0x4F000000 | 1MB |
* +----------+--------------+-------------------------+
* | |
* | Rest of the memory for Linux |
* | |
* +===================================================+
*/
q6_mem_regions: q6_mem_regions@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x4100000>;
};
q6_code_data: q6_code_data@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x1400000>;
};
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
no-map;
reg = <0x0 0x4C400000 0x0 0xD00000>;
};
m3_dump: m3_dump@4D100000 {
no-map;
reg = <0x0 0x4D100000 0x0 0x100000>;
};
q6_etr_region: q6_etr_dump@4D200000 {
no-map;
reg = <0x0 0x4D200000 0x0 0x100000>;
};
q6_qcn6122_data1: q6_qcn6122_data1@4D300000 {
no-map;
reg = <0x0 0x4D300000 0x0 0xD00000>;
};
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E000000 {
no-map;
reg = <0x0 0x4E000000 0x0 0x100000>;
};
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E100000 {
no-map;
reg = <0x0 0x4E100000 0x0 0x100000>;
};
q6_qcn6122_data2: q6_qcn6122_data2@4E200000 {
no-map;
reg = <0x0 0x4E200000 0x0 0xD00000>;
};
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4EF00000 {
no-map;
reg = <0x0 0x4EF00000 0x0 0x100000>;
};
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F000000 {
no-map;
reg = <0x0 0x4F000000 0x0 0x100000>;
};
#else
/* 512MB/1GB Profiles
* +==========+==============+=========================+
* | | | |
* | Region | Start Offset | Size |
* | | | |
* +----------+--------------+-------------------------+
* | NSS | 0x40000000 | 16MB |
* +----------+--------------+-------------------------+
* | Linux | 0x41000000 | Depends on total memory |
* +----------+--------------+-------------------------+
* | uboot | 0x4A600000 | 4MB |
* +----------+--------------+-------------------------+
* | SBL | 0x4AA00000 | 1MB |
* +----------+--------------+-------------------------+
* | smem | 0x4AB00000 | 1MB |
* +----------+--------------+-------------------------+
* | TZ | 0x4AC00000 | 4MB |
* +----------+--------------+-------------------------+
* | Q6 | | |
* | code/ | 0x4B000000 | 20MB |
* | data | | |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | data | 0x4C400000 | 13MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | M3 Dump | 0x4D100000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | QDSS | 0x4D200000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | Caldb | 0x4D300000 | 2MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | data | 0x4D500000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | M3 Dump | 0x4E200000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | QDSS | 0x4E300000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | Caldb | 0x4E400000 | 5MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | data | 0x4E900000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | M3 Dump | 0x4F600000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | QDSS | 0x4F700000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | Caldb | 0x4F800000 | 5MB |
* +----------+--------------+-------------------------+
* | |
* | Rest of the memory for Linux |
* | |
* +===================================================+
*/
q6_mem_regions: q6_mem_regions@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x4D00000>;
};
q6_code_data: q6_code_data@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 01400000>;
};
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
no-map;
reg = <0x0 0x4C400000 0x0 0xD00000>;
};
m3_dump: m3_dump@4D100000 {
no-map;
reg = <0x0 0x4D100000 0x0 0x100000>;
};
q6_etr_region: q6_etr_dump@4D200000 {
no-map;
reg = <0x0 0x4D200000 0x0 0x100000>;
};
q6_caldb_region: q6_caldb_region@4D300000 {
no-map;
reg = <0x0 0x4D300000 0x0 0x200000>;
};
q6_qcn6122_data1: q6_qcn6122_data1@4D500000 {
no-map;
reg = <0x0 0x4D500000 0x0 0xD00000>;
};
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E200000 {
no-map;
reg = <0x0 0x4E200000 0x0 0x100000>;
};
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E300000 {
no-map;
reg = <0x0 0x4E300000 0x0 0x100000>;
};
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E400000 {
no-map;
reg = <0x0 0x4E400000 0x0 0x500000>;
};
q6_qcn6122_data2: q6_qcn6122_data2@4E900000 {
no-map;
reg = <0x0 0x4E900000 0x0 0xD00000>;
};
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4F600000 {
no-map;
reg = <0x0 0x4F600000 0x0 0x100000>;
};
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F700000 {
no-map;
reg = <0x0 0x4F700000 0x0 0x100000>;
};
q6_qcn6122_caldb_2: q6_qcn6122_caldb_2@4F800000 {
no-map;
reg = <0x0 0x4F800000 0x0 0x500000>;
};
#endif
};
soc {
serial@78af000 {
status = "ok";
};
blsp1_uart2: serial@78b0000 {
pinctrl-0 = <&blsp1_uart_pins>;
pinctrl-names = "default";
};
qpic_bam: dma@7984000{
status = "ok";
};
nand: qpic-nand@79b0000 {
pinctrl-0 = <&qspi_nand_pins>;
pinctrl-names = "default";
status = "ok";
};
spi_0: spi@78b5000 { /* BLSP1 QUP0 */
pinctrl-0 = <&blsp0_spi_pins>;
pinctrl-names = "default";
cs-select = <0>;
status = "ok";
m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
reg = <0>;
compatible = "n25q128a11";
linux,modalias = "m25p80", "n25q128a11";
spi-max-frequency = <50000000>;
use-default-sizes;
};
};
mdio0: mdio@88000 {
status = "ok";
ethernet-phy@0 {
reg = <7>;
};
};
mdio1: mdio@90000 {
status = "ok";
pinctrl-0 = <&mdio1_pins>;
pinctrl-names = "default";
phy-reset-gpio = <&tlmm 39 0>;
ethernet-phy@0 {
reg = <28>;
};
};
ess-instance {
num_devices = <0x1>;
ess-switch@0x39c00000 {
switch_mac_mode = <0xf>; /* mac mode for uniphy instance*/
cmnblk_clk = "internal_96MHz"; /* cmnblk clk*/
qcom,port_phyinfo {
port@0 {
port_id = <1>;
phy_address = <7>;
mdiobus = <&mdio0>;
};
port@1 {
port_id = <2>;
phy_address = <0x1c>;
mdiobus = <&mdio1>;
port_mac_sel = "QGMAC_PORT";
};
};
led_source@0 {
source = <0>;
mode = "normal";
speed = "all";
blink_en = "enable";
active = "high";
};
};
};
dp1 {
device_type = "network";
compatible = "qcom,nss-dp";
clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>;
clock-names = "nss-snoc-gmac-axi-clk";
qcom,id = <1>;
reg = <0x39C00000 0x10000>;
interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
qcom,mactype = <2>;
qcom,link-poll = <1>;
qcom,phy-mdio-addr = <7>;
mdio-bus = <&mdio0>;
local-mac-address = [000000000000];
phy-mode = "sgmii";
qcom,rx-page-mode = <0>;
};
dp2 {
device_type = "network";
compatible = "qcom,nss-dp";
clocks = <&gcc GCC_SNOC_GMAC1_AXI_CLK>;
clock-names = "nss-snoc-gmac-axi-clk";
qcom,id = <2>;
reg = <0x39D00000 0x10000>;
interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
qcom,mactype = <2>;
qcom,link-poll = <1>;
qcom,phy-mdio-addr = <28>;
mdio-bus = <&mdio1>;
local-mac-address = [000000000000];
phy-mode = "sgmii";
qcom,rx-page-mode = <0>;
};
nss-macsec1 {
compatible = "qcom,nss-macsec";
phy_addr = <0x1c>;
mdiobus = <&mdio1>;
};
pcm: pcm@0xA3C0000{
pinctrl-0 = <&audio_pins>;
pinctrl-names = "default";
};
gpio_keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";
reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&leds_pins>;
pinctrl-names = "default";
led_power: led@30 {
label = "green:power";
gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
};
};
qcom,test@0 {
status = "ok";
};
thermal-zones {
status = "ok";
};
};
&tlmm {
pinctrl-0 = <&blsp0_uart_pins &phy_led_pins>;
pinctrl-names = "default";
blsp0_uart_pins: uart_pins {
blsp0_uart_rx_tx {
pins = "gpio20", "gpio21";
function = "blsp0_uart0";
bias-disable;
};
};
blsp1_uart_pins: blsp1_uart_pins {
blsp1_uart_rx_tx {
pins = "gpio23", "gpio25", "gpio24", "gpio26";
function = "blsp1_uart2";
bias-disable;
};
};
blsp0_spi_pins: blsp0_spi_pins {
mux {
pins = "gpio10", "gpio11", "gpio12", "gpio13";
function = "blsp0_spi";
drive-strength = <2>;
bias-disable;
};
};
qspi_nand_pins: qspi_nand_pins {
qspi_clock {
pins = "gpio9";
function = "qspi_clk";
drive-strength = <8>;
bias-disable;
};
qspi_cs {
pins = "gpio8";
function = "qspi_cs";
drive-strength = <8>;
bias-disable;
};
qspi_data {
pins = "gpio4", "gpio5", "gpio6", "gpio7";
function = "qspi_data";
drive-strength = <8>;
bias-disable;
};
};
mdio1_pins: mdio_pinmux {
mux_0 {
pins = "gpio36";
function = "mdc";
drive-strength = <8>;
bias-pull-up;
};
mux_1 {
pins = "gpio37";
function = "mdio";
drive-strength = <8>;
bias-pull-up;
};
};
phy_led_pins: phy_led_pins {
gephy_led_pin {
pins = "gpio46";
function = "led0";
drive-strength = <8>;
bias-pull-down;
};
};
i2c_pins: i2c_pins {
i2c_scl {
pins = "gpio25";
function = "blsp2_i2c1";
drive-strength = <8>;
bias-disable;
};
i2c_sda {
pins = "gpio26";
function = "blsp2_i2c1";
drive-strength = <8>;
bias-disable;
};
};
button_pins: button_pins {
reset_button {
pins = "gpio38";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};
};
leds_pins: leds_pins {
led_status {
pins = "gpio30";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
};
audio_pins: audio_pinmux {
mux_1 {
pins = "gpio24";
function = "audio_rxbclk";
drive-strength = <8>;
bias-pull-down;
};
mux_2 {
pins = "gpio25";
function = "audio_rxfsync";
drive-strength = <8>;
bias-pull-down;
};
mux_3 {
pins = "gpio26";
function = "audio_rxd";
drive-strength = <8>;
bias-pull-down;
};
mux_4 {
pins = "gpio27";
function = "audio_txmclk";
drive-strength = <8>;
bias-pull-down;
};
mux_5 {
pins = "gpio28";
function = "audio_txbclk";
drive-strength = <8>;
bias-pull-down;
};
mux_6 {
pins = "gpio29";
function = "audio_txfsync";
drive-strength = <8>;
bias-pull-down;
};
mux_7 {
pins = "gpio30";
function = "audio_txd";
drive-strength = <8>;
bias-pull-down;
};
};
};
&soc {
gpio_keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";
reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
debounce-interval = <60>;
};
};
};
&q6v5_wcss {
compatible = "qcom,ipq5018-q6-mpd";
#address-cells = <1>;
#size-cells = <1>;
ranges;
firmware = "IPQ5018/q6_fw.mdt";
reg = <0x0cd00000 0x4040>,
<0x1938000 0x8>,
<0x193d204 0x4>;
reg-names = "qdsp6",
"tcsr-msip",
"tcsr-q6";
resets = <&gcc GCC_WCSSAON_RESET>,
<&gcc GCC_WCSS_Q6_BCR>;
reset-names = "wcss_aon_reset",
"wcss_q6_reset";
clocks = <&gcc GCC_Q6_AXIS_CLK>,
<&gcc GCC_WCSS_ECAHB_CLK>,
<&gcc GCC_Q6_AXIM_CLK>,
<&gcc GCC_Q6_AXIM2_CLK>,
<&gcc GCC_Q6_AHB_CLK>,
<&gcc GCC_Q6_AHB_S_CLK>,
<&gcc GCC_WCSS_AXI_S_CLK>;
clock-names = "gcc_q6_axis_clk",
"gcc_wcss_ecahb_clk",
"gcc_q6_axim_clk",
"gcc_q6_axim2_clk",
"gcc_q6_ahb_clk",
"gcc_q6_ahb_s_clk",
"gcc_wcss_axi_s_clk";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_mem_regions>, <&q6_etr_region>;
#else
memory-region = <&q6_mem_regions>, <&q6_etr_region>,
<&q6_caldb_region>;
#endif
qcom,rproc = <&q6v5_wcss>;
qcom,bootargs_smem = <507>;
boot-args = <0x1 0x4 0x3 0x0F 0x0 0x0>,
<0x2 0x4 0x2 0x12 0x0 0x0>;
status = "ok";
q6_wcss_pd1: remoteproc_pd1@4ab000 {
compatible = "qcom,ipq5018-wcss-ahb-mpd";
reg = <0x4ab000 0x20>;
reg-names = "rmb";
firmware = "IPQ5018/q6_fw.mdt";
m3_firmware = "IPQ5018/m3_fw.mdt";
interrupts-extended = <&wcss_smp2p_in 8 0>,
<&wcss_smp2p_in 9 0>,
<&wcss_smp2p_in 12 0>,
<&wcss_smp2p_in 11 0>;
interrupt-names = "fatal",
"ready",
"spawn-ack",
"stop-ack";
resets = <&gcc GCC_WCSSAON_RESET>,
<&gcc GCC_WCSS_BCR>,
<&gcc GCC_CE_BCR>;
reset-names = "wcss_aon_reset",
"wcss_reset",
"ce_reset";
clocks = <&gcc GCC_WCSS_AHB_S_CLK>,
<&gcc GCC_WCSS_ACMT_CLK>,
<&gcc GCC_WCSS_AXI_M_CLK>;
clock-names = "gcc_wcss_ahb_s_clk",
"gcc_wcss_acmt_clk",
"gcc_wcss_axi_m_clk";
qcom,halt-regs = <&tcsr_q6_block 0xa000 0xd000 0x0>;
qcom,smem-states = <&wcss_smp2p_out 8>,
<&wcss_smp2p_out 9>,
<&wcss_smp2p_out 10>;
qcom,smem-state-names = "shutdown",
"stop",
"spawn";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_ipq5018_data>, <&m3_dump>,
<&q6_etr_region>;
#else
memory-region = <&q6_ipq5018_data>, <&m3_dump>,
<&q6_etr_region>, <&q6_caldb_region>;
#endif
};
q6_wcss_pd2: remoteproc_pd2 {
compatible = "qcom,ipq5018-wcss-pcie-mpd";
firmware = "IPQ5018/q6_fw.mdt";
m3_firmware = "qcn6122/m3_fw.mdt";
interrupts-extended = <&wcss_smp2p_in 16 0>,
<&wcss_smp2p_in 17 0>,
<&wcss_smp2p_in 20 0>,
<&wcss_smp2p_in 19 0>;
interrupt-names = "fatal",
"ready",
"spawn-ack",
"stop-ack";
qcom,smem-states = <&wcss_smp2p_out 16>,
<&wcss_smp2p_out 17>,
<&wcss_smp2p_out 18>;
qcom,smem-state-names = "shutdown",
"stop",
"spawn";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
<&q6_qcn6122_etr_1>;
#else
memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
<&q6_qcn6122_etr_1>, <&q6_qcn6122_caldb_1>;
#endif
};
q6_wcss_pd3: remoteproc_pd3 {
compatible = "qcom,ipq5018-wcss-pcie-mpd";
firmware = "IPQ5018/q6_fw.mdt";
interrupts-extended = <&wcss_smp2p_in 24 0>,
<&wcss_smp2p_in 25 0>,
<&wcss_smp2p_in 28 0>,
<&wcss_smp2p_in 27 0>;
interrupt-names = "fatal",
"ready",
"spawn-ack",
"stop-ack";
qcom,smem-states = <&wcss_smp2p_out 24>,
<&wcss_smp2p_out 25>,
<&wcss_smp2p_out 26>;
qcom,smem-state-names = "shutdown",
"stop",
"spawn";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_qcn6122_data2>, <&m3_dump_qcn6122_2>,
<&q6_qcn6122_etr_2>;
#else
memory-region = <&q6_qcn6122_data2>, <&m3_dump_qcn6122_2>,
<&q6_qcn6122_etr_2>, <&q6_qcn6122_caldb_2>;
#endif
};
};
&i2c_0 {
pinctrl-0 = <&i2c_pins>;
pinctrl-names = "default";
};
&wifi0 {
/* IPQ5018 */
qcom,multipd_arch;
qcom,rproc = <&q6_wcss_pd1>;
qcom,userpd-subsys-name = "q6v5_wcss_userpd1";
#ifdef __IPQ_MEM_PROFILE_256_MB__
qcom,tgt-mem-mode = <2>;
#else
qcom,tgt-mem-mode = <1>;
#endif
qcom,board_id = <0x23>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0>;
qcom,caldb-size = <0x200000>;
mem-region = <&q6_ipq5018_data>;
#else
memory-region = <&q6_ipq5018_data>;
#endif
status = "ok";
};
&wifi1 {
/* QCN6122 5G */
qcom,multipd_arch;
qcom,userpd-subsys-name = "q6v5_wcss_userpd2";
qcom,rproc = <&q6_wcss_pd2>;
#ifdef __IPQ_MEM_PROFILE_256_MB__
qcom,tgt-mem-mode = <2>;
#else
qcom,tgt-mem-mode = <1>;
#endif
qcom,board_id = <0x60>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4D500000 0x4D500000 0x4D300000 0x0 0x0>;
qcom,caldb-addr = <0x4E400000 0x4E400000 0 0 0>;
qcom,caldb-size = <0x500000>;
mem-region = <&q6_qcn6122_data1>;
#else
memory-region = <&q6_qcn6122_data1>;
#endif
status = "ok";
};
&wifi2 {
/* QCN6122 6G */
qcom,multipd_arch;
qcom,userpd-subsys-name = "q6v5_wcss_userpd3";
qcom,rproc = <&q6_wcss_pd3>;
#ifdef __IPQ_MEM_PROFILE_256_MB__
qcom,tgt-mem-mode = <2>;
#else
qcom,tgt-mem-mode = <1>;
#endif
qcom,board_id = <0xb0>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4E900000 0x4E900000 0x4E200000 0x0 0x0>;
qcom,caldb-addr = <0x4F800000 0x4F800000 0 0 0>;
qcom,caldb-size = <0x500000>;
mem-region = <&q6_qcn6122_data2>;
#else
memory-region = <&q6_qcn6122_data2>;
#endif
status = "disabled";
};
&usb3 {
status = "ok";
device-power-gpio = <&tlmm 24 1>;
};
&dwc_0 {
/delete-property/ #phy-cells;
/delete-property/ phys;
/delete-property/ phy-names;
};
&hs_m31phy_0 {
status = "ok";
};
&eud {
status = "ok";
};
&pcie_x1 {
perst-gpio = <&tlmm 18 GPIO_ACTIVE_LOW>;
};
&pcie_x2 {
perst-gpio = <&tlmm 15 GPIO_ACTIVE_LOW>;
};
&pcie_x1_rp {
status = "disabled";
mhi_0: qcom,mhi@0 {
reg = <0 0 0 0 0 >;
};
};
&pcie_x2_rp {
status = "disabled";
mhi_1: qcom,mhi@1 {
reg = <0 0 0 0 0 >;
};
};

29
feeds/ipq807x_v5.4/ipq50xx/image/ipq50xx.mk Normal file → Executable file
View File

@@ -40,6 +40,17 @@ define Device/cybertan_eww631_b1
endef
TARGET_DEVICES += cybertan_eww631_b1
define Device/cybertan_rap630w_312g
DEVICE_TITLE := CyberTan RAP630W-312G
DEVICE_DTS := qcom-ipq5018-rap630w-312g
SUPPORTED_DEVICES := cybertan,rap630w-312g
DEVICE_PACKAGES := ath11k-wifi-cybertan-rap630w-312g ath11k-firmware-ipq50xx-map-spruce \
-kmod-usb-dwc3-of-simple kmod-usb-dwc3-qcom kmod-usb3 \
kmod-usb-uas kmod-fs-msdos kmod-fs-ntfs
DEVICE_DTS_CONFIG := config@mp03.3
endef
TARGET_DEVICES += cybertan_rap630w_312g
define Device/sonicfi_rap630c_311g
DEVICE_TITLE := Sonicfi RAP630C-311G
DEVICE_DTS := qcom-ipq5018-rap630c-311g
@@ -71,6 +82,15 @@ define Device/edgecore_eap104
endef
TARGET_DEVICES += edgecore_eap104
define Device/indio_um-525axm
DEVICE_TITLE := Indio UM-525axm
DEVICE_DTS := qcom-ipq5018-indio-um-525axm
SUPPORTED_DEVICES := indio,um-525axm
DEVICE_PACKAGES := ath11k-wifi-indio-um-525axm ath11k-firmware-ipq50xx-spruce ath11k-firmware-qcn6122
DEVICE_DTS_CONFIG := config@mp03.5-c1
endef
TARGET_DEVICES += indio_um-525axm
define Device/udaya_a6_id2
DEVICE_TITLE := Udaya A6 - ID2
DEVICE_DTS := qcom-ipq5018-udaya-a6-id2
@@ -80,6 +100,15 @@ define Device/udaya_a6_id2
endef
TARGET_DEVICES += udaya_a6_id2
define Device/udaya_a6_od2
DEVICE_TITLE := Udaya A6 - OD2
DEVICE_DTS := qcom-ipq5018-udaya-a6-od2
SUPPORTED_DEVICES := udaya,a6-od2
DEVICE_PACKAGES := ath11k-wifi-udaya-a6-od2 ath11k-firmware-ipq50xx-spruce ath11k-firmware-qcn6122
DEVICE_DTS_CONFIG := config@mp03.5-c1
endef
TARGET_DEVICES += udaya_a6_od2
define Device/wallys_dr5018
DEVICE_TITLE := Wallys DR5018
DEVICE_DTS := qcom-ipq5018-wallys-dr5018

177
feeds/ipq807x_v5.4/ipq50xx/modules.mk Normal file → Executable file
View File

@@ -52,6 +52,183 @@ define KernelPackage/tpm-tis-i2c/description
endef
$(eval $(call KernelPackage,tpm-tis-i2c))
define KernelPackage/usb-dwc3-internal
TITLE:=DWC3 USB controller driver
DEPENDS:=+USB_GADGET_SUPPORT:kmod-usb-gadget
KCONFIG:= \
CONFIG_USB_DWC3 \
CONFIG_USB_DWC3_HOST=n \
CONFIG_USB_DWC3_GADGET=n \
CONFIG_USB_DWC3_DUAL_ROLE=y \
CONFIG_EXTCON=y \
CONFIG_USB_DWC3_DEBUG=n \
CONFIG_USB_DWC3_VERBOSE=n
FILES:= $(LINUX_DIR)/drivers/usb/dwc3/dwc3.ko
AUTOLOAD:=$(call AutoLoad,84,dwc3)
$(call AddPlatformDepends/usb)
endef
define KernelPackage/usb-dwc3-internal/description
This driver provides support for the Dual Role SuperSpeed
USB Controller based on the Synopsys DesignWare USB3 IP Core
endef
$(eval $(call KernelPackage,usb-dwc3-internal))
define KernelPackage/usb-dwc3-qcom-internal
TITLE:=DWC3 QTI USB driver
DEPENDS:=@!LINUX_4_14 @(TARGET_ipq40xx||TARGET_ipq806x||TARGET_ipq807x||TARGET_ipq60xx||TARGET_ipq95xx||TARGET_ipq50xx||TARGET_ipq53xx) +kmod-usb-dwc3-internal
KCONFIG:= CONFIG_USB_DWC3_QCOM
FILES:= $(LINUX_DIR)/drivers/usb/dwc3/dwc3-qcom.ko
AUTOLOAD:=$(call AutoLoad,83,dwc3-qcom)
$(call AddPlatformDepends/usb)
endef
define KernelPackage/usb-dwc3-qcom-internal/description
Some QTI SoCs use DesignWare Core IP for USB2/3 functionality.
This driver also handles Qscratch wrapper which is needed for
peripheral mode support.
endef
$(eval $(call KernelPackage,usb-dwc3-qcom-internal))
define KernelPackage/usb-configfs
TITLE:= USB functions
KCONFIG:=CONFIG_USB_CONFIGFS \
CONFIG_USB_CONFIGFS_SERIAL=n \
CONFIG_USB_CONFIGFS_ACM=n \
CONFIG_USB_CONFIGFS_OBEX=n \
CONFIG_USB_CONFIGFS_NCM=n \
CONFIG_USB_CONFIGFS_ECM=n \
CONFIG_USB_CONFIGFS_ECM_SUBSET=n \
CONFIG_USB_CONFIGFS_RNDIS=n \
CONFIG_USB_CONFIGFS_EEM=n \
CONFIG_USB_CONFIGFS_MASS_STORAGE=n \
CONFIG_USB_CONFIGFS_F_LB_SS=n \
CONFIG_USB_CONFIGFS_F_FS=n \
CONFIG_USB_CONFIGFS_F_UAC1=n \
CONFIG_USB_CONFIGFS_F_UAC2=n \
CONFIG_USB_CONFIGFS_F_MIDI=n \
CONFIG_USB_CONFIGFS_F_HID=n \
CONFIG_USB_CONFIGFS_F_PRINTER=n \
CONFIG_USB_CONFIGFS_F_QDSS=n
$(call AddPlatformDepends/usb)
endef
define KernelPackage/usb-configfs/description
USB functions
endef
$(eval $(call KernelPackage,usb-configfs))
define KernelPackage/usb-f-diag
TITLE:=USB DIAG
KCONFIG:=CONFIG_USB_F_DIAG \
CONFIG_USB_CONFIGFS_F_DIAG=y \
CONFIG_DIAG_OVER_USB=y
DEPENDS:=+kmod-usb-lib-composite +kmod-usb-configfs
FILES:=$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_diag.ko
AUTOLOAD:=$(call AutoLoad,52,usb_f_diag)
$(call AddPlatformDepends/usb)
endef
define KernelPackage/usb-f-diag/description
USB DIAG
endef
$(eval $(call KernelPackage,usb-f-diag))
define KernelPackage/usb-uas
TITLE:=USB Attched SCSI support
DEPENDS:= +kmod-scsi-core +kmod-usb-storage
KCONFIG:=CONFIG_USB_UAS
FILES:=$(LINUX_DIR)/drivers/usb/storage/uas.ko
AUTOLOAD:=$(call AutoProbe,uas)
$(call AddPlatformDepends/usb)
endef
define KernelPackage/usb-uas/description
Kernel support for USB Attached SCSI devices (UAS)
endef
$(eval $(call KernelPackage,usb-uas))
define KernelPackage/diag-char
TITLE:=CHAR DIAG
KCONFIG:= CONFIG_DIAG_MHI=y@ge5.4 \
CONFIG_DIAG_OVER_PCIE=n@ge5.4 \
CONFIG_DIAGFWD_BRIDGE_CODE=y \
CONFIG_DIAG_CHAR
DEPENDS:=+kmod-lib-crc-ccitt +USB_CONFIGFS_F_DIAG:kmod-usb-f-diag +USB_CONFIGFS_F_DIAG:kmod-usb-core
FILES:=$(LINUX_DIR)/drivers/char/diag/diagchar.ko
ifneq (,$(findstring $(CONFIG_KERNEL_IPQ_MEM_PROFILE), 256)$(CONFIG_LOWMEM_FLASH))
AUTOLOAD:=
else
AUTOLOAD:=$(call AutoLoad,52,diagchar)
endif
endef
define KernelPackage/diag-char/description
CHAR DIAG
endef
$(eval $(call KernelPackage,diag-char))
define KernelPackage/usb-f-qdss
TITLE:=USB QDSS
KCONFIG:=CONFIG_USB_F_QDSS \
CONFIG_USB_CONFIGFS_F_QDSS=y
DEPENDS:=@TARGET_ipq807x||TARGET_ipq60xx||TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64||TARGET_ipq_ipq50xx||TARGET_ipq_ipq50xx_64 +kmod-usb-lib-composite +kmod-usb-configfs +kmod-lib-crc-ccitt +kmod-usb-dwc3 +TARGET_ipq_ipq60xx:kmod-usb-dwc3-qcom +TARGET_ipq_ipq60xx_64:kmod-usb-dwc3-qcom +TARGET_ipq_ipq50xx:kmod-usb-dwc3-qcom +TARGET_ipq_ipq50xx_64:kmod-usb-dwc3-qcom +TARGET_ipq_ipq807x:kmod-usb-dwc3-of-simple +TARGET_ipq_ipq807x_64:kmod-usb-dwc3-of-simple +TARGET_ipq60xx:kmod-usb-dwc3-qcom +TARGET_ipq60xx:kmod-usb-dwc3-of-simple +TARGET_ipq807x:kmod-usb-dwc3-qcom +TARGET_ipq807x:kmod-usb-dwc3-of-simple
FILES:=$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_qdss.ko \
$(LINUX_DIR)/drivers/usb/gadget/function/u_qdss.ko
AUTOLOAD:=$(call AutoLoad,52,usb_f_qdss)
$(call AddPlatformDepends/usb)
endef
define KernelPackage/usb-f-qdss/description
USB QDSS
endef
$(eval $(call KernelPackage,usb-f-qdss))
define KernelPackage/usb-gdiag
TITLE:=USB GDIAG support
KCONFIG:=CONFIG_USB_G_DIAG
FILES:=\
$(LINUX_DIR)/drivers/usb/gadget/legacy/g_diag.ko
AUTOLOAD:=$(call AutoLoad,52,g_diag)
DEPENDS:=@TARGET_ipq807x||TARGET_ipq60xx||TARGET_ipq95xx||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64||TARGET_ipq50xx||TARGET_ipq53xx +kmod-usb-gadget +kmod-usb-lib-composite
$(call AddPlatformDepends/usb)
endef
define KernelPackage/usb-gdiag/description
Kernel support for USB gdiag mode
endef
$(eval $(call KernelPackage,usb-gdiag))
define KernelPackage/usb-phy-ipq5018
TITLE:=DWC3 USB PHY driver for IPQ5018
DEPENDS:=@TARGET_ipq50xx||TARGET_ipq53xx
KCONFIG:= \
CONFIG_USB_QCA_M31_PHY \
CONFIG_PHY_IPQ_UNIPHY_USB
FILES:= \
$(LINUX_DIR)/drivers/usb/phy/phy-qca-m31.ko \
$(LINUX_DIR)/drivers/phy/phy-qca-uniphy.ko@le4.4 \
$(LINUX_DIR)/drivers/phy/qualcomm/phy-qca-uniphy.ko@ge5.4
AUTOLOAD:=$(call AutoLoad,85,phy-qca-m31 phy-qca-uniphy)
$(call AddDepends/usb)
endef
define KernelPackage/usb-phy-ipq5018/description
This driver provides support for the USB PHY drivers
within the IPQ5018 SoCs.
endef
$(eval $(call KernelPackage,usb-phy-ipq5018))
define KernelPackage/bootconfig
SUBMENU:=Other modules
TITLE:=Bootconfig partition for failsafe

View File

@@ -15,6 +15,9 @@ cig,wf188n)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tpt"
ucidef_set_led_default "power" "POWER" "green:power" "on"
;;
cig,wf660a)
ucidef_set_led_default "power" "POWER" "status:blue" "on"
;;
edgecore,eap101)
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy0tpt"
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tpt"

View File

@@ -11,7 +11,7 @@ boot() {
edgecore,eap101|\
edgecore,eap102|\
edgecore,oap102|\
edgecore.eap104)
edgecore,eap104)
avail=$(fw_printenv -n upgrade_available)
[ ${avail} -eq 0 ] && fw_setenv upgrade_available 1
fw_setenv bootcount 0

View File

@@ -145,7 +145,13 @@ platform_do_upgrade() {
cig,wf660a)
spi_nor_emmc_do_upgrade_bootconfig $1
;;
cig,wf188n|\
cig,wf188n)
[ -f /proc/boot_info/rootfs/upgradepartition ] && {
CI_UBIPART="$(cat /proc/boot_info/rootfs/upgradepartition)"
CI_BOOTCFG=1
}
nand_upgrade_tar "$1"
;;
glinet,ax1800|\
glinet,axt1800|\
wallys,dr6018|\

View File

@@ -107,10 +107,10 @@
button_pins: button_pins {
wps_button {
pins = "gpio9";
pins = "gpio22";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
bias-pull-up;
};
};

View File

@@ -11,7 +11,6 @@
#include "ipq6018-cpr-regulator.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pwm/pwm.h>
/ {
compatible = "cig,wf660a", "qcom,ipq6018-ap-cp01", "qcom,ipq6018";
@@ -29,6 +28,11 @@
ethernet2 = "/soc/dp3";
ethernet3 = "/soc/dp4";
ethernet4 = "/soc/dp5";
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
chosen {
@@ -155,6 +159,21 @@
drive-strength = <8>;
bias-pull-up;
};
button_pins: button_pins {
wps_button {
pins = "gpio9";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};
reset_button {
pins = "gpio19";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};
};
mdio_pins: mdio_pinmux {
mux_0 {
@@ -181,20 +200,20 @@
};
};
pwm_pins: pwm_pinmux {
led_pins: led_pins {
mux_1 {
pins = "gpio22";
function = "pwm02";
function = "gpio";
drive-strength = <8>;
};
mux_2 {
pins = "gpio23";
function = "pwm12";
function = "gpio";
drive-strength = <8>;
};
mux_3 {
pins = "gpio24";
function = "pwm22";
function = "gpio";
drive-strength = <8>;
};
};
@@ -208,27 +227,6 @@
};
};
leds_pins: leds_pins {
led_5g {
pins = "gpio35";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_2g {
pins = "gpio37";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_usb0 {
pins = "gpio50";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
};
btcoex_pins: btcoex_pins {
mux_0 {
pins = "gpio51";
@@ -390,36 +388,38 @@
mdiobus = <&mdio>;
};
pwm {
pinctrl-0 = <&pwm_pins>;
gpio_keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";
used-pwm-indices = <1>, <1>, <1>, <0>;
dft-pwm-status = <0>, <1>, <0>, <0>;
status = "ok";
reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&tlmm 19 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&leds_pins>;
pinctrl-0 = <&led_pins>;
pinctrl-names = "default";
led@35 {
label = "led_5g";
gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "led_5g";
default-state = "off";
led_power: led@22 {
label = "status:blue";
gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>;
};
led@37 {
label = "led_2g";
gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "led_2g";
default-state = "off";
led@23 {
label = "status:green";
gpios = <&tlmm 23 GPIO_ACTIVE_HIGH>;
};
led@50 {
label = "led_usb0";
gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "usb-host";
default-state = "off";
led@24 {
label = "status:red";
gpios = <&tlmm 24 GPIO_ACTIVE_HIGH>;
};
};
};

View File

@@ -0,0 +1,11 @@
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -367,7 +367,7 @@ static void __sdhci_led_deactivate(struc
sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);
}
-#if IS_REACHABLE(CONFIG_LEDS_CLASS)
+#if 0
static void sdhci_led_control(struct led_classdev *led,
enum led_brightness brightness)
{

View File

@@ -11,7 +11,7 @@ boot() {
edgecore,eap101|\
edgecore,eap102|\
edgecore,oap102|\
edgecore.eap104)
edgecore,eap104)
avail=$(fw_printenv -n upgrade_available)
[ ${avail} -eq 0 ] && fw_setenv upgrade_available 1
fw_setenv bootcount 0

View File

@@ -46,8 +46,14 @@ platform_do_upgrade() {
tplink,ex227)
qca_do_upgrade "$1"
;;
cig,wf196)
[ -f /proc/boot_info/rootfs/upgradepartition ] && {
CI_UBIPART="$(cat /proc/boot_info/rootfs/upgradepartition)"
CI_BOOTCFG=1
}
nand_upgrade_tar "$1"
;;
cig,wf194c4|\
cig,wf196|\
tplink,ex447)
nand_upgrade_tar "$1"
;;

View File

@@ -0,0 +1,66 @@
Index: linux-5.4.213-qsdk-b2d40c94fad765a48c03f492d669aeecbbb9b617/drivers/net/phy/aquantia_main.c
===================================================================
--- linux-5.4.213-qsdk-b2d40c94fad765a48c03f492d669aeecbbb9b617.orig/drivers/net/phy/aquantia_main.c
+++ linux-5.4.213-qsdk-b2d40c94fad765a48c03f492d669aeecbbb9b617/drivers/net/phy/aquantia_main.c
@@ -31,6 +31,9 @@
#define PHY_ID_AQCS109 0x03a1b5c2
#define PHY_ID_AQR405 0x03a1b4b0
+#define PHY_ID_AQR114C 0x31c31c22
+#define PHY_ID_AQR114C_B1 0x31c31c23
+
#define MDIO_PHYXS_VEND_IF_STATUS 0xe812
#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK GENMASK(7, 3)
#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_KR 0
@@ -1101,6 +1104,42 @@ static struct phy_driver aqr_driver[] =
.ack_interrupt = aqr_ack_interrupt,
.read_status = aqr_read_status,
},
+{
+ PHY_ID_MATCH_MODEL(PHY_ID_AQR114C),
+ .name = "Aquantia AQR114C",
+ .probe = aqr107_probe,
+ .config_init = aqr107_config_init,
+ .config_aneg = aqr_config_aneg,
+ .config_intr = aqr_config_intr,
+ .ack_interrupt = aqr_ack_interrupt,
+ .read_status = aqr107_read_status,
+ .get_tunable = aqr107_get_tunable,
+ .set_tunable = aqr107_set_tunable,
+ .suspend = aqr107_suspend,
+ .resume = aqr107_resume,
+ .get_sset_count = aqr107_get_sset_count,
+ .get_strings = aqr107_get_strings,
+ .get_stats = aqr107_get_stats,
+ .link_change_notify = aqr107_link_change_notify,
+},
+{
+ PHY_ID_MATCH_MODEL(PHY_ID_AQR114C_B1),
+ .name = "Aquantia AQR114C_B1",
+ .probe = aqr107_probe,
+ .config_init = aqr107_config_init,
+ .config_aneg = aqr_config_aneg,
+ .config_intr = aqr_config_intr,
+ .ack_interrupt = aqr_ack_interrupt,
+ .read_status = aqr107_read_status,
+ .get_tunable = aqr107_get_tunable,
+ .set_tunable = aqr107_set_tunable,
+ .suspend = aqr107_suspend,
+ .resume = aqr107_resume,
+ .get_sset_count = aqr107_get_sset_count,
+ .get_strings = aqr107_get_strings,
+ .get_stats = aqr107_get_stats,
+ .link_change_notify = aqr107_link_change_notify,
+},
};
module_phy_driver(aqr_driver);
@@ -1120,6 +1159,8 @@ static struct mdio_device_id __maybe_unu
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) },
{ PHY_ID_MATCH_MODEL(PHY_ID_AQCS109) },
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR405) },
+ { PHY_ID_MATCH_MODEL(PHY_ID_AQR114C) },
+ { PHY_ID_MATCH_MODEL(PHY_ID_AQR114C_B1) },
{ }
};

View File

@@ -425,8 +425,7 @@ mac80211_hostapd_setup_base() {
he_spr_sr_control:3 \
he_spr_psr_enabled:0 \
he_spr_non_srg_obss_pd_max_offset:0 \
he_bss_color:128 \
he_bss_color_enabled:1
he_bss_color
he_phy_cap=$(iw phy "$phy" info | sed -n '/HE Iftypes: AP/,$p' | awk -F "[()]" '/HE PHY Capabilities/ { print $2 }' | head -1)
he_phy_cap=${he_phy_cap:2}
@@ -446,7 +445,7 @@ mac80211_hostapd_setup_base() {
he_spr_psr_enabled:${he_phy_cap:14:2}:0x1:$he_spr_psr_enabled \
he_twt_required:${he_mac_cap:0:2}:0x6:$he_twt_required
if [ "$he_bss_color_enabled" -gt 0 ]; then
if [ "$he_bss_color" -ge 0 ]; then
append base_cfg "he_bss_color=$he_bss_color" "$N"
[ "$he_spr_non_srg_obss_pd_max_offset" -gt 0 ] && { \
append base_cfg "he_spr_non_srg_obss_pd_max_offset=$he_spr_non_srg_obss_pd_max_offset" "$N"
@@ -454,8 +453,6 @@ mac80211_hostapd_setup_base() {
}
[ "$he_spr_psr_enabled" -gt 0 ] || he_spr_sr_control=$((he_spr_sr_control | (1 << 0)))
append base_cfg "he_spr_sr_control=$he_spr_sr_control" "$N"
else
append base_cfg "he_bss_color_disabled=1" "$N"
fi

View File

@@ -1,38 +0,0 @@
--- a/drivers/net/wireless/ath/ath11k/peer.c
+++ b/drivers/net/wireless/ath/ath11k/peer.c
@@ -819,8 +819,13 @@ int ath11k_peer_delete(struct ath11k *ar
}
}
#endif
- ath11k_peer_rhash_delete(ar->ab, peer);
+ if (peer->vdev_id == vdev_id)
+ ath11k_peer_rhash_delete(ar->ab, peer);
}
+
+ if (!peer)
+ peer = ath11k_peer_find(ar->ab, vdev_id, addr);
+
spin_unlock_bh(&ar->ab->base_lock);
mutex_unlock(&ar->ab->tbl_mtx_lock);
#ifdef CPTCFG_ATH11K_NSS_SUPPORT
@@ -870,8 +875,18 @@ int ath11k_peer_create(struct ath11k *ar
spin_lock_bh(&ar->ab->base_lock);
peer = ath11k_peer_find_by_addr(ar->ab, param->peer_addr);
if (peer) {
- spin_unlock_bh(&ar->ab->base_lock);
- return -EINVAL;
+ if (peer->vdev_id == param->vdev_id) {
+ spin_unlock_bh(&ar->ab->base_lock);
+ return -EINVAL;
+ }
+
+ /* Assume sta is transitioning to another band.
+ * Remove here the peer from rhash.
+ */
+ mutex_lock(&ar->ab->tbl_mtx_lock);
+ ath11k_peer_rhash_delete(ar->ab, peer);
+ mutex_unlock(&ar->ab->tbl_mtx_lock);
+
}
spin_unlock_bh(&ar->ab->base_lock);

View File

@@ -0,0 +1,63 @@
From d911f48294852be77371a675ab294e7c4f8d3b60 Mon Sep 17 00:00:00 2001
From: Sven Eckelmann <sven@narfation.org>
Date: Thu, 5 Sep 2024 16:13:01 +0530
Subject: [PATCH] wifi: ath11k: Don't drop tx_status when peer cannot be found
When a station is idle for a long time, hostapd will try to send a QoS
NULL frame to the station. The skb will be added to ack_status_frame,
waiting for a completion via ieee80211_report_ack_skb().
When a peer is removed before the tx_complete arrives, the
peer will be missing. Using dev_kfree_skb_any() which goes through
mac80211 will not delete the entry from ack_status_frames. This IDR
will therefore run full after 8K request were generated for such clients.
At this point, the access point will then just stall and not allow any new
clients because idr_alloc() for ack_status_frame will fail.
ieee80211_free_txskb() on the other hand will call
ieee80211_report_ack_skb() and make sure to remove the entry from
ack_status_frame.
Fixes: ff0d702450e5 (105-ath11k-fix-monitor-crash-if-tx-offload-is-enabled.patch)
92450479b82c (039-mac80211-ath11k-add-HE-TX-rate-reporting-to-radiotap.patch)
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
drivers/net/wireless/ath/ath11k/dp_tx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -555,12 +555,12 @@ ath11k_dp_tx_htt_tx_complete_buf(struct
kfree_skb_list(skb_shinfo(msdu)->frag_list);
skb_shinfo(msdu)->frag_list = NULL;
}
- dev_kfree_skb(msdu);
+ ieee80211_free_txskb(ar->hw, msdu);
return;
}
if (unlikely(!skb_cb->vif)) {
- dev_kfree_skb_any(msdu);
+ ieee80211_free_txskb(ar->hw, msdu);
return;
}
@@ -716,12 +716,12 @@ static void ath11k_dp_tx_complete_msdu(s
rcu_read_lock();
if (unlikely(!rcu_dereference(ab->pdevs_active[ar->pdev_idx]))) {
- dev_kfree_skb_any(msdu);
+ ieee80211_free_txskb(ar->hw, msdu);
goto exit;
}
if (unlikely(!skb_cb->vif)) {
- dev_kfree_skb_any(msdu);
+ ieee80211_free_txskb(ar->hw, msdu);
goto exit;
}
@@ -788,7 +788,7 @@ static void ath11k_dp_tx_complete_msdu(s
"dp_tx: failed to find the peer with peer_id %d\n",
ts.peer_id);
spin_unlock_bh(&ab->base_lock);
- dev_kfree_skb_any(msdu);
+ ieee80211_free_txskb(ar->hw, msdu);
goto exit;
}
arsta = (struct ath11k_sta *)peer->sta->drv_priv;

View File

@@ -0,0 +1,16 @@
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -1404,9 +1404,11 @@ static u32 cfg80211_calculate_bitrate_he
if (WARN_ON_ONCE(rate->he_ru_alloc >
NL80211_RATE_INFO_HE_RU_ALLOC_2x996))
return 0;
- if (WARN_ON_ONCE(rate->nss < 1 || rate->nss > 8))
+ if (rate->nss < 1 || rate->nss > 8) {
+ printk_once(1, "invalid rate->nss: %d\n", rate->nss);
return 0;
-
+ }
+
if (rate->bw == RATE_INFO_BW_160)
result = rates_160M[rate->he_gi];
else if (rate->bw == RATE_INFO_BW_80 ||

View File

@@ -0,0 +1,51 @@
--- a/drivers/net/wireless/ath/ath11k/peer.c
+++ b/drivers/net/wireless/ath/ath11k/peer.c
@@ -93,6 +93,25 @@ struct ath11k_peer *ath11k_peer_find_by_
return NULL;
}
+struct ath11k_peer *ath11k_peer_find_by_pdev_idx(struct ath11k_base *ab,
+ u8 pdev_idx, const u8 *addr)
+{
+ struct ath11k_peer *peer;
+
+ lockdep_assert_held(&ab->base_lock);
+
+ list_for_each_entry(peer, &ab->peers, list) {
+ if (peer->pdev_idx != pdev_idx)
+ continue;
+ if (!ether_addr_equal(peer->addr, addr))
+ continue;
+
+ return peer;
+ }
+
+ return NULL;
+}
+
struct ath11k_peer *ath11k_peer_find_by_ast(struct ath11k_base *ab,
int ast_hash)
{
@@ -867,13 +886,21 @@ int ath11k_peer_create(struct ath11k *ar
return -ENOBUFS;
}
+ mutex_lock(&ar->ab->tbl_mtx_lock);
spin_lock_bh(&ar->ab->base_lock);
- peer = ath11k_peer_find_by_addr(ar->ab, param->peer_addr);
+ peer = ath11k_peer_find_by_pdev_idx(ar->ab, ar->pdev_idx, param->peer_addr);
if (peer) {
spin_unlock_bh(&ar->ab->base_lock);
+ mutex_unlock(&ar->ab->tbl_mtx_lock);
return -EINVAL;
}
+
+ peer = ath11k_peer_find_by_addr(ar->ab, param->peer_addr);
+ if (peer)
+ ath11k_peer_rhash_delete(ar->ab, peer);
+
spin_unlock_bh(&ar->ab->base_lock);
+ mutex_unlock(&ar->ab->tbl_mtx_lock);
ret = ath11k_wmi_send_peer_create_cmd(ar, param);
if (ret) {

View File

@@ -18,7 +18,7 @@ ipq53xx_setup_interfaces()
edgecore,eap105|\
sercomm,ap72tip)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
;;
esac
}
@@ -30,12 +30,14 @@ qcom_setup_macs()
cig,wf189)
mtd=$(find_mtd_chardev "0:APPSBLENV")
[ -z "$mtd" ] && return;
mac=$(grep BaseMacAddress= $mtd | cut -dx -f2)
[ -z "$mac" ] && return;
wan_mac=$(macaddr_canonicalize $mac)
wan_mac=$(grep eth1addr= $mtd | cut -d= -f2)
[ -z "$wan_mac" ] && return;
lan_mac=$(macaddr_add "$wan_mac" 1)
ucidef_set_label_macaddr $wan_mac
;;
edgecore,eap105)
wan_mac=$(cat /sys/class/net/eth0/address)
lan_mac=$(macaddr_add "$wan_mac" 1)
ucidef_set_network_device_mac eth0 $lan_mac
ucidef_set_network_device_mac eth1 $wan_mac
ucidef_set_label_macaddr $wan_mac
;;
*)
@@ -43,9 +45,6 @@ qcom_setup_macs()
lan_mac=$(macaddr_add "$wan_mac" 1)
;;
esac
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
[ -n "$wan_mac" ] && ucidef_set_label_macaddr "$wan_mac"
}
board_config_update

View File

@@ -0,0 +1,86 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2007 OpenWrt.org
START=94
USE_PROCD=1
. /lib/functions.sh
eap105_eth_fix() {
#ethernet reset
echo 481 > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio481/direction
echo 0 > /sys/class/gpio/gpio481/value
echo 1 > /sys/class/gpio/gpio481/value
#eth1 Fix RE Fail
sleep 1
ssdk_sh debug phy set 0x2 0x1f 0x0A43
ssdk_sh debug phy set 0x2 0x19 0x0862
ssdk_sh debug phy set 0x2 0x1f 0x0000
ssdk_sh debug phy set 0x2 0x0 0x9200
#eth1 10/100M detect led flash setup
ssdk_sh debug phy set 0x2 0x1f 0x0d04
ssdk_sh debug phy set 0x2 0x10 0x6E51
#eth0 5G detect led flash setup
ssdk_sh debug phy set 0x1 0xd 0x1f
ssdk_sh debug phy set 0x1 0xe 0xd032
ssdk_sh debug phy set 0x1 0xd 0x401f
ssdk_sh debug phy set 0x1 0xe 0x1e7
ssdk_sh debug phy set 0x1 0xd 0x1f
ssdk_sh debug phy set 0x1 0xe 0xd040
ssdk_sh debug phy set 0x1 0xd 0x401f
ssdk_sh debug phy set 0x1 0xe 0x393f
#eth0 Fix USXGMII
ssdk_sh debug phy set 0x1 0x601E7588 0x05D8
ssdk_sh debug phy set 0x1 0x601E7589 0x2100
ssdk_sh debug phy set 0x1 0x601E7587 0x0003
count=0
while [ 1 ]
do
date
if [ $(($(echo $(echo $(ssdk_sh debug phy get 0x1 0x601E7587) | cut -d':' -f2) | cut -d' ' -f1) & 1)) -eq 0 ]; then
echo > /tmp/Pre-emphasis-PASS
break
fi
count=$(($count+1))
if [ $count -eq 10 ]; then
echo > /tmp/Pre-emphasis-FAIL
break
fi
sleep 1
done
ssdk_sh debug phy set 0x1 0x601E7588 0x05D7
ssdk_sh debug phy set 0x1 0x601E7589 0x2180
ssdk_sh debug phy set 0x1 0x601E7587 0x0003
count=0
while [ 1 ]
do
date
if [ $(($(echo $(echo $(ssdk_sh debug phy get 0x1 0x601E7587) | cut -d':' -f2) | cut -d' ' -f1) & 1)) -eq 0 ]; then
echo > /tmp/Amp-PASS
break
fi
count=$(($count+1))
if [ $count -eq 10 ]; then
echo > /tmp/Amp-FAIL
break
fi
sleep 1
done
}
start_service() {
case "$(board_name)" in
"edgecore,eap105")
eap105_eth_fix
;;
esac
}

View File

@@ -434,7 +434,7 @@
memory-region = <&q6_region>;
qcom,wsi = <&wsi>;
#endif
qcom,board_id = <0x16>;
qcom,board_id = <0x12>;
status = "ok";
};

View File

@@ -2019,14 +2019,14 @@ int32 rtl8251b_phy_init(struct phy_device *phydev)
{
BOOL status = FAILURE;
UINT16 i = 0; /* SW_SDK: use UINT16 instead of UINT8, for MMD_REG array may over 255 entries */
UINT16 phydata = 0;
UINT16 phydata = 0, rev_num = 0, mod_num = 0;
const UINT16 patchver = 0x0014, patchaddr = 0x8023;
status = Rtl8251b_wait_for_bit(phydev, MMD_VEND2, 0xA420, 0x3, 1, 100);
if (status != SUCCESS) {
goto exit;
}
#if 0
#if 1
status = MmdPhyRead(phydev, MMD_PMAPMD, 0x03, &phydata);
if (status != SUCCESS)
goto exit;
@@ -2038,7 +2038,10 @@ int32 rtl8251b_phy_init(struct phy_device *phydev)
osal_printf("rtl8251b and go init flow...\n");
}
else{
osal_printf("Not rtl8251b and skip init flow...id = %x \n",phydata);
if (phydata == 0xc868)
osal_printf("Realtek chip is RTL8251B-VB-CG\n");
else
osal_printf("Not rtl8251b and skip init flow...id = %x \n",phydata);
goto exit;
}
#endif

View File

@@ -76,4 +76,17 @@ endef
$(eval $(call KernelPackage,diag-char))
define KernelPackage/bootconfig
SUBMENU:=Other modules
TITLE:=Bootconfig partition for failsafe
KCONFIG:=CONFIG_BOOTCONFIG_PARTITION
FILES:=$(LINUX_DIR)/drivers/platform/ipq/bootconfig.ko@ge5.4
AUTOLOAD:=$(call AutoLoad,56,bootconfig,1)
endef
define KernelPackage/bootconfig/description
Bootconfig partition for failsafe
endef
$(eval $(call KernelPackage,bootconfig))

View File

@@ -15,7 +15,7 @@ PKG_VERSION:=1.0.20211208
PKG_RELEASE:=1
PKG_SOURCE:=wireguard-linux-compat-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-linux-compat/snapshot/
PKG_SOURCE_URL:=https://ucentral.io/
PKG_HASH:=c0e607138a17daac656f508d8e63ea3737b5221fa5d9288191ddeb099f5a3b92
PKG_LICENSE:=GPL-2.0

View File

@@ -420,8 +420,7 @@ mac80211_hostapd_setup_base() {
he_spr_sr_control:3 \
he_spr_psr_enabled:0 \
he_spr_non_srg_obss_pd_max_offset:0 \
he_bss_color:128 \
he_bss_color_enabled:1
he_bss_color
he_phy_cap=$(iw phy "$phy" info | sed -n '/HE Iftypes: AP/,$p' | awk -F "[()]" '/HE PHY Capabilities/ { print $2 }' | head -1)
he_phy_cap=${he_phy_cap:2}
@@ -441,7 +440,7 @@ mac80211_hostapd_setup_base() {
he_spr_psr_enabled:${he_phy_cap:14:2}:0x1:$he_spr_psr_enabled \
he_twt_required:${he_mac_cap:0:2}:0x6:$he_twt_required
if [ "$he_bss_color_enabled" -gt 0 ]; then
if [ "$he_bss_color" -ge 0 ]; then
append base_cfg "he_bss_color=$he_bss_color" "$N"
[ "$he_spr_non_srg_obss_pd_max_offset" -gt 0 ] && { \
append base_cfg "he_spr_non_srg_obss_pd_max_offset=$he_spr_non_srg_obss_pd_max_offset" "$N"
@@ -449,8 +448,6 @@ mac80211_hostapd_setup_base() {
}
[ "$he_spr_psr_enabled" -gt 0 ] || he_spr_sr_control=$((he_spr_sr_control | (1 << 0)))
append base_cfg "he_spr_sr_control=$he_spr_sr_control" "$N"
else
append base_cfg "he_bss_color_disabled=1" "$N"
fi

View File

@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEAylkhSz5UGwJnJjIchwS8KeJEmf2apWM40/z3ukTZHvnzR6cH
Wvx0uahlMaHdnXlt1+a1ZjEr9VIehFsnad1MmF0p3evHSdW95q4KXn7QXD0kfTrs
yiBbUbrzG+VSokpTY0xoUaqxSJWZyf0cytnnB+HYHVdjj5zshNHzJRCH494hB50m
wzw3jyB15DAQzCrd3nhRpb/SwdaMV80M9AzhxfvL6vMpWn+GcA9SPMEZupbFYPZv
7H/tDr6f+ZFQH8LCOuzA3wELbm6ML2pzRhR6iL8d8yft6k02uQ3C5mGXgz1LD7io
alEu3LrvkcUdcBmaaBlO3cdvvSygArZZXFsIFwIDAQABAoIBAQCBbgGd34Bsxly0
Udltg9nX8KNw3IbOw2jWMDlFLES1S6wRaQWLbXA8UTppROA8mi9oqmndtBYqFRzw
DF5pmOQlkXH2QZp34ABYTXrUdslQNsvgTpCnuYqv/KUEcusoY+Jy4azYkBZWF1sH
mJ+SIU9l+1ABdKR6eCXRz3l3e9twJMCoNbC6Sjohw32+YnFhChBKYH4v2tIbKGed
L/xBli4a9JqGHDI3+wY/3bDy2pr88RL631ru3KWN0QfokKv1dMDFFxnes7bhIeTD
oOJeCMPKOx6QU1zsNOb2N2OYfsrOplSRRVCL8TVgtu5dI2TnVyDrcD0NpeB0MSRt
ZLTwbAwBAoGBAP09NKF2RcsbJ6yhnXcGIBqL9SJP4SYPf0AAy0w4PQdtDE5B1QFF
xoIiGKZ+JOGnYiuaRpk4+EJyQvCQyMxS+4H69D6PwaerzJtvAzYDnOOyMAgxAcoU
pQEgjuChwKkWy1qiIBUrl20fNbrNHxVrZhHvNSWtLicC1MK7gPn9iPhvAoGBAMyN
4xeSkBgnYbrJm0xdtzZ+xS88UAGR71Fi+o/3f3CFR355ffWKFtRDMP+sj6CtH2Xq
ukIYawKuhO7DsuSw1DVYDpkKYHqxSMsAd2wqwNxKpR0dTPKXZ5qPUiumIOlCt0sn
ekYk62KoJPessuqjzBsFfR9uh2ouUK3M0eO8a67ZAoGBAJcM0f7ZIEpE2UZkZBth
wPZ0svQTd3WPWtSfZKQDC4wJZIStSdNnfj+S/OcaaP9cKvddH203iQWBSCJcChmu
Caz/Nn62mslbdUDlV6H5R7SdTX8lVC7oX3+rnu2oLdXt7cAS4lYeWUVSj2bsAPVy
yUA7UZU2lkfYrXW2B/mVXATrAoGBAMr/LBSioFk4C+agWHvqrP1pxSnhQsysFMHB
5kKlLVVvDspWq0fXKFyx6ZhxmX+tDvHHhdw9+0SICOgiUhBd49qkbqg2AhUAhure
paU0sHxtn3pLL6e31VsvTC6BCTwzt07f+JpP3UDk+PrJ6iytLMrMIaXlvIEFQY+Z
KdpFjN/RAoGAZc16tSE3zAON5/cYrCMRGrU1uNG2r7sWvUWSRKUB74Cgqhic9PS3
JQYHmfp7PN3EjLZvzSV08G9+qKatKUmuAErPviU+dEdUt1Yu3gws42I3fNYon02z
m7elGc61q6FXewd7KC4C4o7ZtkiZZK0E6JkLZLvwuSS6kNl2cg0Ak3s=
-----END RSA PRIVATE KEY-----

View File

@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAtxDPiHAgUZ/gQ4Go50eDuJ4URkhBZfIwIfwhZgGduW8x8fCY
kQjLthFY4rRX0kDTy+jg6Ov5jfXu3Gw4tjnNNQEzKhLv4eZfAgF9RCkXAyJnfDOJ
qKBLkvquiCiwPQrray5ZmUGecO6/L1LmTd1ktwJfgkbV3Pos6oFDEpJDvf5HKa6C
q2vqAs8GEP9RhqF4MTvqZkcxCwTp+f3neLVu1srK767Li7oEIpp0uhVAXLcBKo4N
j7SkZPLDsLN03IikpsTeqWF8b5RZKYy1vGXH/f72GTpVWg6J5qpluv6wR6nqM2P4
cWcT9LPRTVKAcBoEwuDJUhAOaTAAObQw7LAzUQIDAQABAoIBAB6mrOjeRTsFdso2
wm3+9loJ9cESxghotZBrI7htmtf6ezVUIGdgPqN8YhKLOY0Vl6CznDzDjeQsAlNb
t18jbG1shwGLbCi5pryyPSQVcSnwL72G74yRUjYIzQI1NdTyqBopB412hC3Ke65T
xgXRhNRzjERG0fYO2UhmXjGU1czQpuD2B9z9owAo4bN8MJ0rS/4ADFtnpblUF6aP
tknVHAV3UQY6JNkqlUHIYtkWLutUmsOzExN0/pX8wXaVN31qdSvh5REAszPAQuCA
cxCdYF6aFi/xs0ICG8xmfYmcTMMNHPXxhRK849wGWVTGSE/fh5MHFzMt6ZuVCl3M
26nrlmUCgYEA2cen+S2TNs54xsOaC6TxV8Lf4UtAlnD8O6MrkNt458D0Iy3Tpsl0
4kwX2bKFPBQAkIoDZJtZ3l5y4pSBwq5Ive4je/vJ2M33Mqfqp9VD0Uodkwrj5wGU
T9VBIqF3utZHXLV0NQuYlssN8K83ZmU4IWjrtc/Qncix6L4fTJMExYsCgYEA1zGG
S9R1hkCWgFZ5N8Ix0HjnWpwoPiU/jbtdjUl49K0aLybe98tztlkeqyO4nFw6Rohg
InfRQ/wEMlBeEWYgTHqMOfJCCWLeY8bGh3lU2MVSE2IkPlbb7/XIH5DXLpHi9fBh
3rARGv34J2vWuDFhbDcoI+dJkfQ1cX5aRrb13hMCgYBHGw9XJnBIlsWMcFUdtC8w
rmoWz1E5TY6tkispUt95G+Eak13luSU2tg2bgNRLt2QvzUAqWybOmhv8quxrOih6
CwT++EkBRs6NdZICVnmcHgzl88pRpIxePIzV186V7FzEgmJ851pc8dONYEhAYJAh
KHa9mCrPObYM/faOM/p83QKBgBE5t6ROR3INrX5sbZuXAeHMK8jHAzmmRaYUv3JV
1UbQrG3l0KdJM+P+0kOkwlxRzaBjvj5EFQ46GCPm5wDBighVLvBcggi6T07xVGb3
wWDwupcunfQXg9d7dx9/upnRt7c0HMF0monslnahXTi1SzUcXSwykWMLh1OkZ5mN
f7TdAoGABh4DU0SB7bY8LnQ21jNlzi3qdj4EKMkfQyTVDiT84hXi42OhGN23jKuI
2tl6KMqdsN/GLNCPGy5VMfbQCFyyn3g2gHc2Cl90LRf/PsQ4v4HD/c+bjEPJUrYe
W2sPfHJqK3UsUL68JVaVsHZZ49oM1wJr0bn82Pl/+kNe02Njs2U=
-----END RSA PRIVATE KEY-----

View File

@@ -0,0 +1,21 @@
-----BEGIN CERTIFICATE-----
MIIDazCCAlOgAwIBAgIUDRQDKYZevoXzVn+I8sJA7oo0TWowDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yNDA0MDIwNTIwMDhaFw0yNDA1
MDIwNTIwMDhaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQDDjDRntDuzUIXdSe3E21pEcuxOahgVU+BJnNuNR0xi
hAhgaFmRHHQKOgVkzld288+ofsxo2O+N22lDv/Vkk1FnRXrY6j1xeaRcoEEDkCvD
YxZsn7qrVWuzR7zowGjep8jYGvRY6zkWhz1c1FqHdW7TOqijK66+h8tnXM88C8Jb
OFAxRWxDreNNK+lvqRutLk1iEqChk1bRp0Dy8du3cbPTaCnMF8J0FPXuDmwJnPO0
6Hh6lBuNoN8arCKrZHlX4WUo+u+ghVPw3VygjTAYDHItjF+rCNTAQUnUAG14asIC
s4Px+/spq6XnSj1Cl/+LxF9azXoILLkHze7Hdm0Tw8ObAgMBAAGjUzBRMB0GA1Ud
DgQWBBSklcF1xTKDDwQDJ2y7O776Cqr7czAfBgNVHSMEGDAWgBSklcF1xTKDDwQD
J2y7O776Cqr7czAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAZ
XRrrtzpdZ+Rm9q8jUdUYguI+5t9Rw8RZbo1Uv9C4XAU6UqATGkD/wt073sEZCd/1
/BX83pyBaFROJzXSILH9lkyNyTy2Q45i8RG8Y8xk4iCUIMkrTZl3q42ZGgVKgHDz
q5m8Gn+VrkeVtPPfM77FFlPVqTbfFpwccanki8Qbd6w95ttx2/OCNkTJJokNA1E8
5FHF9eFiB/T9LqHKuT1W6/sPfETF+IIhIhTSpBP31tPfMgZYqqDmaY1cJotinI5t
7WopbjdXKZUfF+wUwChR7Hsuo0zQ8W6Jc+X4hzDTE7bmE/5YZ6Do0q0L1I84vEof
MBzUGXqXXFL7fFvjMQ6j
-----END CERTIFICATE-----

View File

@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAw4w0Z7Q7s1CF3UntxNtaRHLsTmoYFVPgSZzbjUdMYoQIYGhZ
kRx0CjoFZM5XdvPPqH7MaNjvjdtpQ7/1ZJNRZ0V62Oo9cXmkXKBBA5Arw2MWbJ+6
q1Vrs0e86MBo3qfI2Br0WOs5Foc9XNRah3Vu0zqooyuuvofLZ1zPPAvCWzhQMUVs
Q63jTSvpb6kbrS5NYhKgoZNW0adA8vHbt3Gz02gpzBfCdBT17g5sCZzztOh4epQb
jaDfGqwiq2R5V+FlKPrvoIVT8N1coI0wGAxyLYxfqwjUwEFJ1ABteGrCArOD8fv7
Kaul50o9Qpf/i8RfWs16CCy5B83ux3ZtE8PDmwIDAQABAoIBAAwDPuzn+4rmdXLE
qeCgAQmXbcDbb6NPxcV/51TkfmLG7aTOhEIP12kRa2dn7aOXEritIW2Hdh/mzK6m
yjJlgmivsf5FVYT1Dg3KonPPlYCpQ6VkopkH5FfdHlPGDisvb30nGr+jo5worrJX
MUCFDEvZnKZ5doCp4ur0np53snbcAQrTAJX8BqiHKiFhxszjgClelz2cuh1EqBG9
UylxK8q26uAOG1+fzbLqLEqpHxwjunU98/P8H+kTOCRg3eSlDK5gJP7psG6siPdd
d/vDKfxglUzf7FozBY1MkTnPE6dQqUuofd1kMYaLqC61IZf+c7Rpqu7dTanIt+T7
xhI68sECgYEA/hOGDIyGrVFOpN4rmplGtWzgBkXOf5Dj7l4CaKSvxEcUTfTLWvY4
OsIehari2w3eUl+dfmYXBZ+Q0QtEuWjdxv0biE3PFgBmHJbvJEoZNs5b57gnP4hm
C/vwwn3gV+mVnhwpkv0AUXLZLkwpA2RdybRC4xfiylOfqPrPmCw+TbECgYEAxQc8
KyFN1Kk2gG6mkdKEto0fO9sSToq6lvnShhm7HflFIfqXF2O3gytvwnRBrX4JWQpH
CeRCQfDssiz3zM8pLUcple2xUuZbjJovkulYu3bvP8XItL/YNIo5OF8dlpV46kQY
QWTgTYpeEDYQWUzp+UyrcSJhTH0XJcVL9npXfQsCgYEAvS2SSPO1L4VztiRKeTEZ
SerIH0OIzsj2Pby3tGyzBsUZ5DWZ2J+uHGn/Se2EPjBkUhcpcDzZdXFq5YurXxYq
04gQIPw2bh5b6XukkfOuNHWQTsd6Sb7opJGxoU8SZMLiiThU6EIDI6IM/YDtpL3t
a0sR5n8ZeSasoagmPBrtRPECgYEAiui/7fSMB/vI9iGNBFA0yvOR6sRYEtHSHXFC
kNMBTm+Y4wzmi1H9Ztgv8hu+1k9+zazmSr4ITK9MYY48osQHVunOEutC0pygPO/T
zLMBoSGIKiEKkQyUpO4yy2Cb3rfBSQD7TNePIHwGN022lw8YAnCgiqHfkWq78CA6
nyrAFeMCgYBDciC+Haz5Z38qzUrHYeTpFnUzKn6JW9RezCD61+LGHnhSaIm+9SsR
gtyzSr8K1btoMxKjZeGc0zbYvgtbZFviUtb1ixevqI2K58IT/vPELxlE4AYq5pZQ
/1/lITNjBLuAfZG7TCQK2JCPVGkTKpk9ewRXnfncfP2sFxVdYOFALQ==
-----END RSA PRIVATE KEY-----

View File

@@ -0,0 +1,378 @@
/dts-v1/;
#include "mt7981.dtsi"
/ {
model = "SENAO JEAP6500";
compatible = "senao,jeap6500";
chosen {
bootargs = "console=ttyS0,115200n1 loglevel=8 \
earlycon=uart8250,mmio32,0x11002000";
};
memory {
reg = <0 0x40000000 0 0x10000000>;
};
gpio-keys {
compatible = "gpio-keys";
reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&pio 1 GPIO_ACTIVE_LOW>;
};
};
nmbm_spim_nand {
compatible = "generic,nmbm";
#address-cells = <1>;
#size-cells = <1>;
lower-mtd-device = <&spi_nand>;
forced-create;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "BL2";
reg = <0x00000 0x0100000>;
read-only;
};
partition@100000 {
label = "u-boot-env";
reg = <0x0100000 0x0080000>;
};
factory: partition@180000 {
label = "Factory";
reg = <0x180000 0x0200000>;
};
partition@380000 {
label = "FIP";
reg = <0x380000 0x0200000>;
};
partition@580000 {
label = "ubi";
reg = <0x580000 0x6E00000>;
};
partition@7380000 {
label = "ubi_1";
reg = <0x7380000 0x6E00000>;
};
partition@E180000 {
label = "cert";
reg = <0xE180000 0x0060000>;
};
partition@E1E0000 {
label = "userconfig";
reg = <0xE1E0000 0x00a0000>;
};
partition@E280000 {
label = "crashdump";
reg = <0xE280000 0x0060000>;
};
};
};
sound_wm8960 {
compatible = "mediatek,mt79xx-wm8960-machine";
mediatek,platform = <&afe>;
audio-routing = "Headphone", "HP_L",
"Headphone", "HP_R",
"LINPUT1", "AMIC",
"RINPUT1", "AMIC";
mediatek,audio-codec = <&wm8960>;
status = "disabled";
};
sound_si3218x {
compatible = "mediatek,mt79xx-si3218x-machine";
mediatek,platform = <&afe>;
mediatek,ext-codec = <&proslic_spi>;
status = "disabled";
};
leds {
compatible = "gpio-leds";
power {
label = "power";
gpios = <&pio 12 GPIO_ACTIVE_LOW>;
drive-strength = <MTK_DRIVE_16mA>;
default-state = "on";
};
};
};
&afe {
pinctrl-names = "default";
pinctrl-0 = <&pcm_pins>;
status = "disabled";
};
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c_pins>;
status = "disabled";
wm8960: wm8960@1a {
compatible = "wlf,wm8960";
reg = <0x1a>;
};
};
&uart0 {
status = "okay";
};
&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&uart2_pins>;
status = "okay";
};
&watchdog {
status = "okay";
};
&eth {
status = "okay";
gmac0: mac@0 {
compatible = "mediatek,eth-mac";
reg = <0>;
phy-mode = "sgmii";
phy-handle = <&phy5>;
};
gmac1: mac@1 {
compatible = "mediatek,eth-mac";
reg = <1>;
phy-mode = "gmii";
phy-handle = <&phy0>;
};
mdio: mdio-bus {
#address-cells = <1>;
#size-cells = <0>;
reset-gpios = <&pio 39 1>;
phy0: ethernet-phy@0 {
compatible = "ethernet-phy-id03a2.9461";
reg = <0>;
phy-mode = "gmii";
nvmem-cells = <&phy_calibration>;
nvmem-cell-names = "phy-cal-data";
};
phy5: phy@5 {
compatible = "ethernet-phy-idc0ff.0421";
reg = <26>;
phy-mode = "sgmii";
full-duplex;
pause;
airoha,polarity = <2>;
};
};
};
&hnat {
mtketh-wan = "eth0";
mtketh-lan = "eth1";
mtketh-max-gmac = <2>;
status = "okay";
};
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_flash_pins>;
status = "okay";
spi_nand: spi_nand@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spi-nand";
reg = <0>;
spi-max-frequency = <52000000>;
spi-tx-bus-width = <4>;
spi-rx-bus-width = <4>;
};
};
&spi1 {
pinctrl-names = "default";
pinctrl-0 = <&spic_pins>;
status = "disabled";
proslic_spi: proslic_spi@0 {
compatible = "silabs,proslic_spi";
reg = <0>;
spi-max-frequency = <10000000>;
spi-cpha = <1>;
spi-cpol = <1>;
channel_count = <1>;
debug_level = <4>; /* 1 = TRC, 2 = DBG, 4 = ERR */
reset_gpio = <&pio 15 0>;
ig,enable-spi = <1>; /* 1: Enable, 0: Disable */
};
};
&wbsys {
mediatek,mtd-eeprom = <&factory 0x0000>;
status = "okay";
pinctrl-names = "dbdc";
pinctrl-0 = <&wf_dbdc_pins>;
};
&spi2 {
pinctrl-names = "default";
pinctrl-0 = <&spi2_pins>;
status = "okay";
tpm_spi_tis@0 {
compatible = "tcg,tpm_tis-spi";
reg = <0>;
#address-cells = <1>;
#size-cells = <1>;
spi-max-frequency = <1000000>;
spi-tx-buswidth = <4>;
spi-rx-buswidth = <4>;
reset-gpios = <&pio 31 1>;
};
};
&pio {
i2c_pins: i2c-pins-g0 {
mux {
function = "i2c";
groups = "i2c0_0";
};
};
pcm_pins: pcm-pins-g0 {
mux {
function = "pcm";
groups = "pcm";
};
};
pwm0_pin: pwm0-pin-g0 {
mux {
function = "pwm";
groups = "pwm0_0";
};
};
pwm1_pin: pwm1-pin-g0 {
mux {
function = "pwm";
groups = "pwm1_0";
};
};
pwm2_pin: pwm2-pin {
mux {
function = "pwm";
groups = "pwm2";
};
};
spi0_flash_pins: spi0-pins {
mux {
function = "spi";
groups = "spi0", "spi0_wp_hold";
};
conf-pu {
pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
drive-strength = <MTK_DRIVE_8mA>;
bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
};
conf-pd {
pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
drive-strength = <MTK_DRIVE_8mA>;
bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
};
};
spic_pins: spi1-pins {
mux {
function = "spi";
groups = "spi1_1";
};
};
spi2_pins: spi2-pins {
mux {
function = "spi";
groups = "spi2";
};
};
uart1_pins: uart1-pins-g1 {
mux {
function = "uart";
groups = "uart1_1";
};
};
uart2_pins: uart2-pins-g1 {
mux {
function = "uart";
groups = "uart2_1";
};
ble_loader {
pins = "SPI1_MISO";
function = "gpio";
drive-strength = <MTK_DRIVE_8mA>;
bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
output-high;
};
ble_reset {
pins = "SPI1_CS";
function = "gpio";
drive-strength = <MTK_DRIVE_8mA>;
bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
output-high;
};
};
wf_dbdc_pins: wf_dbdc-pins {
mux {
function = "eth";
groups = "wf0_mode1";
};
conf {
pins = "WF_HB1", "WF_HB2", "WF_HB3", "WF_HB4",
"WF_HB0", "WF_HB0_B", "WF_HB5", "WF_HB6",
"WF_HB7", "WF_HB8", "WF_HB9", "WF_HB10",
"WF_TOP_CLK", "WF_TOP_DATA", "WF_XO_REQ",
"WF_CBA_RESETB", "WF_DIG_RESETB";
drive-strength = <MTK_DRIVE_4mA>;
};
};
pta_pins: pta-pins {
mux {
function = "pta";
groups = "pta_ext_0";
};
};
};
&xhci {
mediatek,u3p-dis-msk = <0x0>;
phys = <&u2port0 PHY_TYPE_USB2>,
<&u3port0 PHY_TYPE_USB3>;
status = "okay";
};

View File

@@ -1,9 +1,9 @@
// SPDX-License-Identifier: GPL-2.0
/* FILE NAME: an8801.h
* PURPOSE:
* Define Airoha phy driver function
/*SPDX-License-Identifier: GPL-2.0*/
/*FILE NAME: an8801.h
*PURPOSE:
*Define Airoha phy driver function
*
* NOTES:
*NOTES:
*
*/
@@ -12,12 +12,13 @@
/* NAMING DECLARATIONS
*/
#define AN8801_DRIVER_VERSION "1.1.0"
#define AN8801_DRIVER_VERSION "1.1.4"
#define DEBUGFS_COUNTER "counter"
#define DEBUGFS_DRIVER_INFO "driver_info"
#define DEBUGFS_INFO "driver_info"
#define DEBUGFS_PBUS_OP "pbus_op"
#define DEBUGFS_POLARITY "polarity"
#define DEBUGFS_MDIO "mdio"
#define AN8801_MDIO_PHY_ID 0x1
#define AN8801_PHY_ID1 0xc0ff
@@ -97,6 +98,7 @@
#define PHY_PRE_SPEED_REG (0x2b)
#define MMD_DEV_VSPEC1 (0x1E)
#define MMD_DEV_VSPEC2 (0x1F)
#define RGMII_DELAY_STEP_MASK 0x7
@@ -202,6 +204,8 @@ struct an8801_priv {
#ifdef AN8801SB_DEBUGFS
struct dentry *debugfs_root;
#endif
int pol;
int surge;
};
enum an8801_polarity {
@@ -211,4 +215,10 @@ enum an8801_polarity {
AIR_POL_TX_REV_RX_NOR,
};
enum air_surge {
AIR_SURGE_0R,
AIR_SURGE_5R,
AIR_SURGE_LAST = 0xff
};
#endif /* End of __AN8801_H */

View File

@@ -1,5 +1,27 @@
KERNEL_LOADADDR := 0x48080000
define Build/fit-sign
$(TOPDIR)/scripts/mkits-secure_boot.sh \
-D $(DEVICE_NAME) \
-o $@.its \
-k $@ \
$(if $(word 2,$(1)),-d $(word 2,$(1))) -C $(word 1,$(1)) \
-a $(KERNEL_LOADADDR) \
-e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
-c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config-1") \
-A $(LINUX_KARCH) \
-v $(LINUX_VERSION) \
$(if $(FIT_KEY_NAME),-S $(FIT_KEY_NAME)) \
$(if $(FW_AR_VER),-r $(FW_AR_VER)) \
$(if $(CONFIG_TARGET_ROOTFS_SQUASHFS),-R $(ROOTFS/squashfs/$(DEVICE_NAME)))
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage \
-f $@.its \
$(if $(FIT_KEY_DIR),-k $(FIT_KEY_DIR)) \
-r \
$@.new
@mv $@.new $@
endef
define Device/mt7981-spim-nor-rfb
DEVICE_VENDOR := MediaTek
DEVICE_MODEL := mt7981-spim-nor-rfb
@@ -235,3 +257,28 @@ define Device/mt7981-fpga-sd
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef
TARGET_DEVICES += mt7981-fpga-sd
define Device/senao_jeap6500
DEVICE_VENDOR := SENAO
DEVICE_MODEL := JEAP6500
DEVICE_DTS := mt7981-senao-jeap6500
DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
SUPPORTED_DEVICES := senao,jeap6500
DEVICE_PACKAGES := kmod-mt7981-firmware kmod-mt7915e uboot-envtools -procd-ujail
UBINIZE_OPTS := -E 5
BLOCKSIZE := 128k
PAGESIZE := 2048
IMAGE_SIZE := 65536k
KERNEL_IN_UBI := 1
FIT_KEY_DIR := $(DTS_DIR)/mediatek/keys/senao_jeap6500
FIT_KEY_NAME := fit_key
IMAGES += factory.bin
IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
KERNEL = kernel-bin | lzma | \
fit-sign lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
KERNEL_INITRAMFS = kernel-bin | lzma | \
fit-sign lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd
endef
TARGET_DEVICES += senao_jeap6500
DEFAULT_DEVICE_VARS += FIT_KEY_DIR FIT_KEY_NAME

View File

@@ -23,11 +23,14 @@ mediatek_setup_interfaces()
*2500wan-p5*)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan
;;
senao,jeap6500)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
sonicfi,rap630w-211g)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" eth1
;;
*)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
esac
}
@@ -47,6 +50,18 @@ mediatek_setup_macs()
lan_mac_offset="0x24"
wan_mac_offset="0x2a"
;;
senao,jeap6500)
hw_mac_addr=$(mtd_get_mac_ascii u-boot-env ethaddr)
lan_mac="$hw_mac_addr"
wan_mac=$(macaddr_add $hw_mac_addr 1)
if [ -n "$lan_mac" ]; then
ucidef_set_interface_macaddr "lan" "$lan_mac"
fi
if [ -n "$wan_mac" ]; then
ucidef_set_interface_macaddr "wan" "$wan_mac"
ucidef_set_label_macaddr "$wan_mac"
fi
;;
sonicfi,rap630w-211g)
sysfs="/sys/class/ieee80211"
env_dev=$(get_boot_param "boot_param.env_part")

View File

@@ -0,0 +1,18 @@
#!/bin/sh
. /lib/functions/uci-defaults.sh
board_config_update
board=$(board_name)
case $board in
edgecore,eap112)
ucidef_add_gpio_switch "gpio_lte_reset" "LTE_reset" "457" "1"
ucidef_add_gpio_switch "gpio_lte_power" "LTE_power" "458" "1"
;;
esac
board_config_flush
exit 0

View File

@@ -0,0 +1,18 @@
[ "$ACTION" == "add" ] || exit 0
PHYNBR=${DEVPATH##*/phy}
[ -n $PHYNBR ] || exit 0
. /lib/functions.sh
. /lib/functions/system.sh
board=$(board_name)
case "$board" in
senao,jeap6500)
hw_mac_addr=$(mtd_get_mac_ascii u-boot-env ethaddr)
[ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 3 > /sys${DEVPATH}/macaddress
;;
esac

View File

@@ -16,7 +16,8 @@ board=$(board_name)
case "$board" in
edgecore,eap111|\
edgecore,eap112)
edgecore,eap112|\
senao,jeap6500)
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x20000" "0x20000"
;;
sonicfi,rap630w-211g)

View File

@@ -0,0 +1,487 @@
# Copyright (C) 2014 OpenWrt.org
#
. /lib/functions.sh
# 'kernel' partition or UBI volume on NAND contains the kernel
CI_KERNPART="${CI_KERNPART:-kernel}"
# 'ubi' partition on NAND contains UBI
# There are also CI_KERN_UBIPART and CI_ROOT_UBIPART if kernel
# and rootfs are on separated UBIs.
CI_UBIPART="${CI_UBIPART:-ubi}"
# 'rootfs' UBI volume on NAND contains the rootfs
CI_ROOTPART="${CI_ROOTPART:-rootfs}"
# update uboot-env if upgrade suceeded
CI_FWSETENV=
ubi_mknod() {
local dir="$1"
local dev="/dev/$(basename $dir)"
[ -e "$dev" ] && return 0
local devid="$(cat $dir/dev)"
local major="${devid%%:*}"
local minor="${devid##*:}"
mknod "$dev" c $major $minor
}
nand_find_volume() {
local ubidevdir ubivoldir
ubidevdir="/sys/class/ubi/"
[ ! -d "$ubidevdir" ] && return 1
for ubivoldir in $ubidevdir/${1}_*; do
[ ! -d "$ubivoldir" ] && continue
if [ "$( cat $ubivoldir/name )" = "$2" ]; then
basename $ubivoldir
ubi_mknod "$ubivoldir"
return 0
fi
done
}
nand_find_ubi() {
local ubidevdir ubidev mtdnum cmtdnum
mtdnum="$( find_mtd_index $1 )"
[ ! "$mtdnum" ] && return 1
for ubidevdir in /sys/class/ubi/ubi*; do
[ ! -e "$ubidevdir/mtd_num" ] && continue
cmtdnum="$( cat $ubidevdir/mtd_num )"
if [ "$mtdnum" = "$cmtdnum" ]; then
ubidev=$( basename $ubidevdir )
ubi_mknod "$ubidevdir"
echo $ubidev
return 0
fi
done
}
nand_get_magic_long() {
(${3}cat "$1" | dd bs=4 "skip=${2:-0}" count=1 | hexdump -v -n 4 -e '1/1 "%02x"') 2> /dev/null
}
get_magic_long_tar() {
(tar xO${3}f "$1" "$2" | dd bs=4 count=1 | hexdump -v -n 4 -e '1/1 "%02x"') 2> /dev/null
}
identify() {
identify_magic_long $(nand_get_magic_long "$@")
}
identify_tar() {
identify_magic_long $(get_magic_long_tar "$@")
}
identify_if_gzip() {
if [ "$(identify "$1")" = gzip ]; then echo -n z; fi
}
nand_restore_config() {
local ubidev=$( nand_find_ubi "${CI_ROOT_UBIPART:-$CI_UBIPART}" )
local ubivol="$( nand_find_volume $ubidev rootfs_data )"
if [ ! "$ubivol" ]; then
ubivol="$( nand_find_volume $ubidev "$CI_ROOTPART" )"
if [ ! "$ubivol" ]; then
echo "cannot find ubifs data volume"
return 1
fi
fi
mkdir /tmp/new_root
if ! mount -t ubifs /dev/$ubivol /tmp/new_root; then
echo "cannot mount ubifs volume $ubivol"
rmdir /tmp/new_root
return 1
fi
if mv "$1" "/tmp/new_root/$BACKUP_FILE"; then
if umount /tmp/new_root; then
echo "configuration saved"
rmdir /tmp/new_root
return 0
fi
else
umount /tmp/new_root
fi
echo "could not save configuration to ubifs volume $ubivol"
rmdir /tmp/new_root
return 1
}
nand_remove_ubiblock() {
local ubivol="$1"
local ubiblk="ubiblock${ubivol:3}"
if [ -e "/dev/$ubiblk" ]; then
umount "/dev/$ubiblk" && echo "unmounted /dev/$ubiblk" || :
if ! ubiblock -r "/dev/$ubivol"; then
echo "cannot remove $ubiblk"
return 1
fi
fi
}
nand_attach_ubi() {
local ubipart="$1"
local has_env="${2:-0}"
local mtdnum="$( find_mtd_index "$ubipart" )"
if [ ! "$mtdnum" ]; then
>&2 echo "cannot find ubi mtd partition $ubipart"
return 1
fi
local ubidev="$( nand_find_ubi "$ubipart" )"
if [ ! "$ubidev" ]; then
>&2 ubiattach -m "$mtdnum"
ubidev="$( nand_find_ubi "$ubipart" )"
if [ ! "$ubidev" ]; then
>&2 ubiformat /dev/mtd$mtdnum -y
>&2 ubiattach -m "$mtdnum"
ubidev="$( nand_find_ubi "$ubipart" )"
if [ ! "$ubidev" ]; then
>&2 echo "cannot attach ubi mtd partition $ubipart"
return 1
fi
if [ "$has_env" -gt 0 ]; then
>&2 ubimkvol /dev/$ubidev -n 0 -N ubootenv -s 1MiB
>&2 ubimkvol /dev/$ubidev -n 1 -N ubootenv2 -s 1MiB
fi
fi
fi
echo "$ubidev"
return 0
}
nand_detach_ubi() {
local ubipart="$1"
local mtdnum="$( find_mtd_index "$ubipart" )"
if [ ! "$mtdnum" ]; then
echo "cannot find ubi mtd partition $ubipart"
return 1
fi
local ubidev="$( nand_find_ubi "$ubipart" )"
if [ "$ubidev" ]; then
for ubivol in $(find /dev -name "${ubidev}_*" -maxdepth 1 | sort); do
ubivol="${ubivol:5}"
nand_remove_ubiblock "$ubivol" || :
umount "/dev/$ubivol" && echo "unmounted /dev/$ubivol" || :
done
if ! ubidetach -m "$mtdnum"; then
echo "cannot detach ubi mtd partition $ubipart"
return 1
fi
fi
}
nand_upgrade_prepare_ubi() {
local rootfs_length="$1"
local rootfs_type="$2"
local rootfs_data_max="$(fw_printenv -n rootfs_data_max 2> /dev/null)"
[ -n "$rootfs_data_max" ] && rootfs_data_max=$((rootfs_data_max))
local kernel_length="$3"
local has_env="${4:-0}"
local kern_ubidev
local root_ubidev
[ -n "$rootfs_length" -o -n "$kernel_length" ] || return 1
if [ -n "$CI_KERN_UBIPART" -a -n "$CI_ROOT_UBIPART" ]; then
kern_ubidev="$( nand_attach_ubi "$CI_KERN_UBIPART" "$has_env" )"
[ -n "$kern_ubidev" ] || return 1
root_ubidev="$( nand_attach_ubi "$CI_ROOT_UBIPART" )"
[ -n "$root_ubidev" ] || return 1
else
kern_ubidev="$( nand_attach_ubi "$CI_UBIPART" "$has_env" )"
[ -n "$kern_ubidev" ] || return 1
root_ubidev="$kern_ubidev"
fi
local kern_ubivol="$( nand_find_volume $kern_ubidev "$CI_KERNPART" )"
local root_ubivol="$( nand_find_volume $root_ubidev "$CI_ROOTPART" )"
local data_ubivol="$( nand_find_volume $root_ubidev rootfs_data )"
[ "$root_ubivol" = "$kern_ubivol" ] && root_ubivol=
# remove ubiblocks
[ "$kern_ubivol" ] && { nand_remove_ubiblock $kern_ubivol || return 1; }
[ "$root_ubivol" ] && { nand_remove_ubiblock $root_ubivol || return 1; }
[ "$data_ubivol" ] && { nand_remove_ubiblock $data_ubivol || return 1; }
# kill volumes
[ "$kern_ubivol" ] && ubirmvol /dev/$kern_ubidev -N "$CI_KERNPART" || :
[ "$root_ubivol" ] && ubirmvol /dev/$root_ubidev -N "$CI_ROOTPART" || :
[ "$data_ubivol" ] && ubirmvol /dev/$root_ubidev -N rootfs_data || :
# create kernel vol
if [ -n "$kernel_length" ]; then
if ! ubimkvol /dev/$kern_ubidev -N "$CI_KERNPART" -s $kernel_length; then
echo "cannot create kernel volume"
return 1;
fi
fi
# create rootfs vol
if [ -n "$rootfs_length" ]; then
local rootfs_size_param
if [ "$rootfs_type" = "ubifs" ]; then
rootfs_size_param="-m"
else
rootfs_size_param="-s $rootfs_length"
fi
if ! ubimkvol /dev/$root_ubidev -N "$CI_ROOTPART" $rootfs_size_param; then
echo "cannot create rootfs volume"
return 1;
fi
fi
# create rootfs_data vol for non-ubifs rootfs
if [ "$rootfs_type" != "ubifs" ]; then
local rootfs_data_size_param="-m"
if [ -n "$rootfs_data_max" ]; then
rootfs_data_size_param="-s $rootfs_data_max"
fi
if ! ubimkvol /dev/$root_ubidev -N rootfs_data $rootfs_data_size_param; then
if ! ubimkvol /dev/$root_ubidev -N rootfs_data -m; then
echo "cannot initialize rootfs_data volume"
return 1
fi
fi
fi
return 0
}
# Write the UBI image to MTD ubi partition
nand_upgrade_ubinized() {
local ubi_file="$1"
local gz="$2"
local ubi_length=$( (${gz}cat "$ubi_file" | wc -c) 2> /dev/null)
nand_detach_ubi "$CI_UBIPART" || return 1
local mtdnum="$( find_mtd_index "$CI_UBIPART" )"
${gz}cat "$ubi_file" | ubiformat "/dev/mtd$mtdnum" -S "$ubi_length" -y -f - && ubiattach -m "$mtdnum"
}
# Write the UBIFS image to UBI rootfs volume
nand_upgrade_ubifs() {
local ubifs_file="$1"
local gz="$2"
local ubifs_length=$( (${gz}cat "$ubifs_file" | wc -c) 2> /dev/null)
nand_upgrade_prepare_ubi "$ubifs_length" "ubifs" "" "" || return 1
local ubidev="$( nand_find_ubi "$CI_UBIPART" )"
local root_ubivol="$(nand_find_volume $ubidev "$CI_ROOTPART")"
${gz}cat "$ubifs_file" | ubiupdatevol /dev/$root_ubivol -s "$ubifs_length" -
}
# Write the FIT image to UBI kernel volume
nand_upgrade_fit() {
local fit_file="$1"
local gz="$2"
local fit_length=$( (${gz}cat "$fit_file" | wc -c) 2> /dev/null)
nand_upgrade_prepare_ubi "" "" "$fit_length" "1" || return 1
local fit_ubidev="$(nand_find_ubi "$CI_UBIPART")"
local fit_ubivol="$(nand_find_volume $fit_ubidev "$CI_KERNPART")"
${gz}cat "$fit_file" | ubiupdatevol /dev/$fit_ubivol -s "$fit_length" -
}
# Write images in the TAR file to MTD partitions and/or UBI volumes as required
nand_upgrade_tar() {
local tar_file="$1"
local gz="$2"
local jffs2_markers="${CI_JFFS2_CLEAN_MARKERS:-0}"
# WARNING: This fails if tar contains more than one 'sysupgrade-*' directory.
local board_dir="$(tar t${gz}f "$tar_file" | grep -m 1 '^sysupgrade-.*/$')"
board_dir="${board_dir%/}"
local kernel_mtd kernel_length
if [ "$CI_KERNPART" != "none" ]; then
kernel_mtd="$(find_mtd_index "$CI_KERNPART")"
kernel_length=$( (tar xO${gz}f "$tar_file" "$board_dir/kernel" | wc -c) 2> /dev/null)
[ "$kernel_length" = 0 ] && kernel_length=
fi
local rootfs_length=$( (tar xO${gz}f "$tar_file" "$board_dir/root" | wc -c) 2> /dev/null)
[ "$rootfs_length" = 0 ] && rootfs_length=
local rootfs_type
[ "$rootfs_length" ] && rootfs_type="$(identify_tar "$tar_file" "$board_dir/root" "$gz")"
local ubi_kernel_length
if [ "$kernel_length" ]; then
if [ "$kernel_mtd" ]; then
# On some devices, the raw kernel and ubi partitions overlap.
# These devices brick if the kernel partition is erased.
# Hence only invalidate kernel for now.
dd if=/dev/zero bs=4096 count=1 2> /dev/null | \
mtd write - "$CI_KERNPART"
else
ubi_kernel_length="$kernel_length"
fi
fi
local has_env=0
nand_upgrade_prepare_ubi "$rootfs_length" "$rootfs_type" "$ubi_kernel_length" "$has_env" || return 1
if [ "$rootfs_length" ]; then
local ubidev="$( nand_find_ubi "${CI_ROOT_UBIPART:-$CI_UBIPART}" )"
local root_ubivol="$( nand_find_volume $ubidev "$CI_ROOTPART" )"
tar xO${gz}f "$tar_file" "$board_dir/root" | \
ubiupdatevol /dev/$root_ubivol -s "$rootfs_length" -
fi
if [ "$kernel_length" ]; then
if [ "$kernel_mtd" ]; then
if [ "$jffs2_markers" = 1 ]; then
flash_erase -j "/dev/mtd${kernel_mtd}" 0 0
tar xO${gz}f "$tar_file" "$board_dir/kernel" | \
nandwrite "/dev/mtd${kernel_mtd}" -
else
tar xO${gz}f "$tar_file" "$board_dir/kernel" | \
mtd write - "$CI_KERNPART"
fi
else
local ubidev="$( nand_find_ubi "${CI_KERN_UBIPART:-$CI_UBIPART}" )"
local kern_ubivol="$( nand_find_volume $ubidev "$CI_KERNPART" )"
tar xO${gz}f "$tar_file" "$board_dir/kernel" | \
ubiupdatevol /dev/$kern_ubivol -s "$kernel_length" -
fi
fi
return 0
}
nand_verify_if_gzip_file() {
local file="$1"
local gz="$2"
if [ "$gz" = z ]; then
echo "verifying compressed sysupgrade file integrity"
if ! gzip -t "$file"; then
echo "corrupted compressed sysupgrade file"
return 1
fi
fi
}
nand_verify_tar_file() {
local file="$1"
local gz="$2"
echo "verifying sysupgrade tar file integrity"
if ! tar xO${gz}f "$file" > /dev/null; then
echo "corrupted sysupgrade tar file"
return 1
fi
}
nand_do_flash_file() {
local file="$1"
local gz="$(identify_if_gzip "$file")"
local file_type="$(identify "$file" "" "$gz")"
[ ! "$(find_mtd_index "$CI_UBIPART")" ] && CI_UBIPART=rootfs
case "$file_type" in
"fit")
nand_verify_if_gzip_file "$file" "$gz" || return 1
nand_upgrade_fit "$file" "$gz"
;;
"ubi")
nand_verify_if_gzip_file "$file" "$gz" || return 1
nand_upgrade_ubinized "$file" "$gz"
;;
"ubifs")
nand_verify_if_gzip_file "$file" "$gz" || return 1
nand_upgrade_ubifs "$file" "$gz"
;;
*)
nand_verify_tar_file "$file" "$gz" || return 1
nand_upgrade_tar "$file" "$gz"
;;
esac
}
nand_do_restore_config() {
local conf_tar="/tmp/sysupgrade.tgz"
[ ! -f "$conf_tar" ] || nand_restore_config "$conf_tar"
}
# Recognize type of passed file and start the upgrade process
nand_do_upgrade() {
local file="$1"
sync
nand_do_flash_file "$file" && nand_do_upgrade_success
nand_do_upgrade_failed
}
nand_do_upgrade_success() {
platform_post_upgrade_success
if nand_do_restore_config && sync; then
[ -n "$CI_FWSETENV" ] && fw_setenv $CI_FWSETENV
echo "sysupgrade successful"
umount -a
reboot -f
fi
nand_do_upgrade_failed
}
nand_do_upgrade_failed() {
sync
echo "sysupgrade failed"
# Should we reboot or bring up some failsafe mode instead?
umount -a
reboot -f
}
# Check if passed file is a valid one for NAND sysupgrade.
# Currently it accepts 4 types of files:
# 1) UBI: a ubinized image containing required UBI volumes.
# 2) UBIFS: a UBIFS rootfs volume image.
# 3) FIT: a FIT image containing kernel and rootfs.
# 4) TAR: an archive that includes directory "sysupgrade-${BOARD_NAME}" containing
# a non-empty "CONTROL" file and required partition and/or volume images.
#
# You usually want to call this function in platform_check_image.
#
# $(1): board name, used in case of passing TAR file
# $(2): file to be checked
nand_do_platform_check() {
local board_name="$1"
local file="$2"
local gz="$(identify_if_gzip "$file")"
local file_type="$(identify "$file" "" "$gz")"
local control_length=$( (tar xO${gz}f "$file" "sysupgrade-${board_name//,/_}/CONTROL" | wc -c) 2> /dev/null)
if [ "$control_length" = 0 ]; then
control_length=$( (tar xO${gz}f "$file" "sysupgrade-${board_name//_/,}/CONTROL" | wc -c) 2> /dev/null)
fi
if [ "$control_length" != 0 ]; then
nand_verify_tar_file "$file" "$gz" || return 1
else
nand_verify_if_gzip_file "$file" "$gz" || return 1
if [ "$file_type" != "fit" -a "$file_type" != "ubi" -a "$file_type" != "ubifs" ]; then
echo "invalid sysupgrade file"
return 1
fi
fi
return 0
}

Some files were not shown because too many files have changed in this diff Show More