mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 17:42:41 +00:00
Compare commits
129 Commits
v3.0.0-rc1
...
v3.0.2-rc3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
192261318c | ||
|
|
ffb843b486 | ||
|
|
741f7a299a | ||
|
|
dcff5c6932 | ||
|
|
5c37272cd6 | ||
|
|
4b5eeb48cc | ||
|
|
1ca8f18b9d | ||
|
|
856ac16e86 | ||
|
|
cc3906e550 | ||
|
|
6b3eb3ef99 | ||
|
|
bc6da62f1b | ||
|
|
0eeb14d4d1 | ||
|
|
8a43d39572 | ||
|
|
9a80d8b1de | ||
|
|
ca1eabfbd5 | ||
|
|
c22767540e | ||
|
|
dff6a6e3d8 | ||
|
|
a7c9a5f780 | ||
|
|
f8eca25f7e | ||
|
|
be59b10acc | ||
|
|
1ec29f6705 | ||
|
|
3ae0a1f1d5 | ||
|
|
f362b7139e | ||
|
|
bdd2074d78 | ||
|
|
98ef44fc34 | ||
|
|
9bb982460a | ||
|
|
22126a3410 | ||
|
|
f0035a9908 | ||
|
|
0412bf03eb | ||
|
|
afcffbc418 | ||
|
|
c29c179b9e | ||
|
|
36c4008c68 | ||
|
|
07f5deefce | ||
|
|
0d21a66d0a | ||
|
|
206b4348fc | ||
|
|
f0c34c39da | ||
|
|
b85b388eb5 | ||
|
|
556f8880bc | ||
|
|
bf2ca9a9e4 | ||
|
|
b24846cce3 | ||
|
|
4bcc60934e | ||
|
|
2b4fd7911a | ||
|
|
7b0f05d11b | ||
|
|
af4c7e4ce5 | ||
|
|
bfeea74870 | ||
|
|
3b5f90b339 | ||
|
|
8870e802a7 | ||
|
|
775af3700f | ||
|
|
c95b91c399 | ||
|
|
460050a114 | ||
|
|
01adebbd6f | ||
|
|
dcdbb4f091 | ||
|
|
144c5d00f4 | ||
|
|
2826c6d487 | ||
|
|
367415663f | ||
|
|
3ce4088499 | ||
|
|
37f1ef534e | ||
|
|
1142deb3d0 | ||
|
|
922067a652 | ||
|
|
62b9c6e257 | ||
|
|
63dd51cbc4 | ||
|
|
80c55c2d82 | ||
|
|
4e2b42e95a | ||
|
|
1949f602bf | ||
|
|
84f86bfc98 | ||
|
|
ed9d29fb03 | ||
|
|
c587a12ee5 | ||
|
|
2197badcde | ||
|
|
84c8eb5ccf | ||
|
|
16ebb7cec3 | ||
|
|
75a51e3cd9 | ||
|
|
832fbb8898 | ||
|
|
4d2603b4ce | ||
|
|
6fc396682c | ||
|
|
14aa04ad10 | ||
|
|
589cdf6795 | ||
|
|
d5ffdffd8c | ||
|
|
a14df28bd6 | ||
|
|
25bec55d4a | ||
|
|
575686449a | ||
|
|
a849ad6e39 | ||
|
|
de834a7d07 | ||
|
|
d8fd2b8f39 | ||
|
|
e1745cae9b | ||
|
|
bfa3b829ee | ||
|
|
91dacf0e93 | ||
|
|
c0dcc4aea2 | ||
|
|
c97ac2da72 | ||
|
|
f21fa9ab80 | ||
|
|
9305bc609b | ||
|
|
6d81e1e587 | ||
|
|
0c55b1f97a | ||
|
|
bf06374839 | ||
|
|
d2ff492853 | ||
|
|
d3a4a73c15 | ||
|
|
73cb19e2be | ||
|
|
18ba90f5b4 | ||
|
|
9e5d1ae848 | ||
|
|
01240ada80 | ||
|
|
7fae3ebb90 | ||
|
|
00efc6f224 | ||
|
|
5bf9d31001 | ||
|
|
118dd7d224 | ||
|
|
559e67036d | ||
|
|
c66a1f1fa6 | ||
|
|
9b77fb297c | ||
|
|
95dae95031 | ||
|
|
a29aadbc90 | ||
|
|
753967bf6b | ||
|
|
9a9f9e1cb9 | ||
|
|
4db54ce3d9 | ||
|
|
f7f913ab14 | ||
|
|
6d4788c26f | ||
|
|
6872bd6964 | ||
|
|
a4a9a7692c | ||
|
|
c22ad0089c | ||
|
|
14c6a1a482 | ||
|
|
984faeae9a | ||
|
|
c98c7edc6a | ||
|
|
e8b3a76fd9 | ||
|
|
140d8ba1e6 | ||
|
|
c4bdf03787 | ||
|
|
371b287db4 | ||
|
|
3ed959bf25 | ||
|
|
0e077cf39a | ||
|
|
ef0d3c6fdd | ||
|
|
5ca04b5fb8 | ||
|
|
98453fce9b | ||
|
|
f6d6341ba0 |
2
.github/workflows/build-dev.yml
vendored
2
.github/workflows/build-dev.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target: [ 'cig_wf186w', 'cig_wf188n', 'cig_wf196', 'cig_wf660a', 'cybertan_eww622-a1', 'cybertan_eww631-a1', 'cybertan_eww631-b1', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_eap104', 'edgecore_eap111', 'edgecore_ecw5211', 'edgecore_oap101', 'edgecore_oap101-6e', 'edgecore_oap101e', 'edgecore_oap101e-6e', 'edgecore_oap102', 'hfcl_ion4','hfcl_ion4xi_wp', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'hfcl_ion4xi_w', 'hfcl_ion4xi_HMR', 'hfcl_ion4x_w', 'indio_um-305ax', 'indio_um-325ac', 'indio_um-510ac-v3', 'indio_um-550ac', 'indio_um-310ax-v1', 'indio_um-510axp-v1', 'indio_um-510axm-v1', 'udaya_a5-id2', 'wallys_dr40x9', 'wallys_dr6018', 'wallys_dr6018_v4', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650', 'yuncore_fap655' ]
|
||||
target: [ 'cig_wf186h', 'cig_wf186w', 'cig_wf188n', 'cig_wf196', 'cig_wf189', 'cig_wf660a', 'cybertan_eww622-a1', 'cybertan_eww631-a1', 'cybertan_eww631-b1', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_eap104', 'edgecore_eap111', 'edgecore_ecw5211', 'edgecore_oap101', 'edgecore_oap101-6e', 'edgecore_oap101e', 'edgecore_oap101e-6e', 'edgecore_oap102', 'hfcl_ion4','hfcl_ion4xi_wp', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'hfcl_ion4xi_w', 'hfcl_ion4xi_HMR', 'hfcl_ion4x_w', 'indio_um-305ax', 'indio_um-325ac', 'indio_um-510ac-v3', 'indio_um-550ac', 'indio_um-310ax-v1', 'indio_um-510axp-v1', 'indio_um-510axm-v1', 'sercomm_ap72tip', 'udaya_a5-id2', 'wallys_dr40x9', 'wallys_dr6018', 'wallys_dr6018-v4', 'yuncore_ax820', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650', 'yuncore_fap655' ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
28
LICENSE
Normal file
28
LICENSE
Normal file
@@ -0,0 +1,28 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2024, Telecom Infra Project
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -83,12 +83,12 @@ platform_do_upgrade() {
|
||||
part="$(awk -F 'ubi.mtd=' '{printf $2}' /proc/cmdline | cut -d " " -f 1)"
|
||||
case "$part" in
|
||||
rootfs1)
|
||||
fw_setenv active 2 || exit 1
|
||||
CI_UBIPART="rootfs2"
|
||||
CI_FWSETENV="active 2"
|
||||
;;
|
||||
rootfs2)
|
||||
fw_setenv active 1 || exit 1
|
||||
CI_UBIPART="rootfs1"
|
||||
CI_FWSETENV="active 1"
|
||||
;;
|
||||
*)
|
||||
# legacy bootloader
|
||||
|
||||
@@ -102,6 +102,13 @@ qcom_setup_interfaces()
|
||||
ucidef_add_switch "switch1" \
|
||||
"6@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
|
||||
;;
|
||||
optimcloud,d60|\
|
||||
optimcloud,d60-5g|\
|
||||
optimcloud,d50|\
|
||||
optimcloud,d50-5g)
|
||||
ucidef_set_interface_wan "eth0"
|
||||
ucidef_set_interface_lan "eth1"
|
||||
;;
|
||||
qcom,ipq5018-mp03.1)
|
||||
ucidef_set_interface_lan "eth1"
|
||||
ucidef_set_interface_wan "eth0"
|
||||
@@ -126,7 +133,7 @@ qcom_setup_interfaces()
|
||||
ucidef_set_interface_lan ""
|
||||
;;
|
||||
cybertan,eww631-b1)
|
||||
ucidef_add_switch "switch1" "5:wan" "2:lan" "3:lan" "4:lan" "6@eth0"
|
||||
ucidef_add_switch "switch1" "5:wan" "4:lan" "3:lan" "2:lan" "6@eth0"
|
||||
;;
|
||||
wallys,dr5018)
|
||||
ucidef_set_interface_lan "eth0 eth1"
|
||||
|
||||
@@ -208,6 +208,10 @@ ath11k/IPQ5018/hw1.0/caldata.bin)
|
||||
liteon,wpx8324|\
|
||||
motorola,q14|\
|
||||
muxi,ap3220l|\
|
||||
optimcloud,d60|\
|
||||
optimcloud,d60-5g|\
|
||||
optimcloud,d50|\
|
||||
optimcloud,d50-5g|\
|
||||
qcom,ipq5018-mp03.1)
|
||||
caldata_extract "0:ART" 0x1000 0x20000
|
||||
;;
|
||||
@@ -249,6 +253,10 @@ ath11k/QCN9074/hw1.0/caldata_1.bin)
|
||||
cig,wf196|\
|
||||
wallys,dr6018-v4|\
|
||||
cybertan,eww622-a1|\
|
||||
optimcloud,d60|\
|
||||
optimcloud,d60-5g|\
|
||||
optimcloud,d50|\
|
||||
optimcloud,d50-5g|\
|
||||
qcom,ipq5018-mp03.1|\
|
||||
qcom,ipq807x-hk14)
|
||||
caldata_extract "0:ART" 0x26800 0x20000
|
||||
@@ -287,6 +295,10 @@ ath11k-macs)
|
||||
indio,um-310ax-v1|\
|
||||
indio,um-510axp-v1|\
|
||||
indio,um-510axm-v1|\
|
||||
optimcloud,d60|\
|
||||
optimcloud,d60-5g|\
|
||||
optimcloud,d50|\
|
||||
optimcloud,d50-5g|\
|
||||
cig,wf188n)
|
||||
ath11k_generate_macs
|
||||
;;
|
||||
|
||||
@@ -16,7 +16,8 @@ boot() {
|
||||
;;
|
||||
edgecore,eap101|\
|
||||
edgecore,eap102|\
|
||||
edgecore,oap102)
|
||||
edgecore,oap102|\
|
||||
edgecore.eap104)
|
||||
avail=$(fw_printenv -n upgrade_available)
|
||||
[ "${avail}" -eq 1 ] || fw_setenv upgrade_available 1
|
||||
fw_setenv bootcount 0
|
||||
|
||||
@@ -247,8 +247,8 @@ nand_do_upgrade_success() {
|
||||
local conf_tar="/tmp/sysupgrade.tgz"
|
||||
sync
|
||||
[ "$CI_BOOTCFG" = 1 ] && nand_qca_update_bootconfig
|
||||
[ -f "$conf_tar" ] && nand_restore_config "$conf_tar" && sync
|
||||
[ -n "$CI_FWSETENV" ] && fw_setenv $CI_FWSETENV
|
||||
[ -f "$conf_tar" ] && nand_restore_config "$conf_tar"
|
||||
echo "sysupgrade successful"
|
||||
umount -a
|
||||
reboot -f
|
||||
|
||||
@@ -38,7 +38,7 @@ do_flash_emmc() {
|
||||
local emmcblock=$(find_mmc_part $2)
|
||||
local board_dir=$3
|
||||
local part=$4
|
||||
|
||||
|
||||
[ -b "$emmcblock" ] || emmcblock=$(find_mmc_part $2)
|
||||
|
||||
[ -z "$emmcblock" ] && {
|
||||
@@ -162,6 +162,10 @@ platform_check_image() {
|
||||
qcom,ipq6018-cp01|\
|
||||
qcom,ipq807x-hk01|\
|
||||
qcom,ipq807x-hk14|\
|
||||
optimcloud,d60|\
|
||||
optimcloud,d60-5g|\
|
||||
optimcloud,d50|\
|
||||
optimcloud,d50-5g|\
|
||||
qcom,ipq5018-mp03.3)
|
||||
[ "$magic_long" = "73797375" ] && return 0
|
||||
;;
|
||||
@@ -190,8 +194,6 @@ platform_do_upgrade() {
|
||||
cig,wf194c4|\
|
||||
cig,wf196|\
|
||||
cybertan,eww622-a1|\
|
||||
cybertan,eww631-a1|\
|
||||
cybertan,eww631-b1|\
|
||||
glinet,ax1800|\
|
||||
glinet,axt1800|\
|
||||
indio,um-310ax-v1|\
|
||||
@@ -200,6 +202,10 @@ platform_do_upgrade() {
|
||||
qcom,ipq6018-cp01|\
|
||||
qcom,ipq807x-hk01|\
|
||||
qcom,ipq807x-hk14|\
|
||||
optimcloud,d60|\
|
||||
optimcloud,d60-5g|\
|
||||
optimcloud,d50|\
|
||||
optimcloud,d50-5g|\
|
||||
qcom,ipq5018-mp03.3|\
|
||||
wallys,dr5018|\
|
||||
wallys,dr6018|\
|
||||
@@ -254,8 +260,8 @@ platform_do_upgrade() {
|
||||
else
|
||||
if [ -e /tmp/downgrade ]; then
|
||||
CI_UBIPART="rootfs1"
|
||||
fw_setenv active 1 || exit 1
|
||||
fw_setenv upgrade_available 0 || exit 1
|
||||
{ echo 'active 1'; echo 'upgrade_available 0'; } > /tmp/fw_setenv.txt || exit 1
|
||||
CI_FWSETENV="-s /tmp/fw_setenv.txt"
|
||||
elif grep -q rootfs1 /proc/cmdline; then
|
||||
CI_UBIPART="rootfs2"
|
||||
CI_FWSETENV="active 2"
|
||||
@@ -281,5 +287,18 @@ platform_do_upgrade() {
|
||||
}
|
||||
nand_upgrade_tar "$1"
|
||||
;;
|
||||
cybertan,eww631-a1|\
|
||||
cybertan,eww631-b1)
|
||||
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
|
||||
nand_upgrade_tar "$1"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* 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 "../../../arm64/boot/dts/qcom/qcom-ipq5018-optimcloud-d50-5g.dts"
|
||||
|
||||
/ {
|
||||
pmuv8: pmu {
|
||||
compatible = "arm,cortex-a7-pmu";
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* 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 "../../../arm64/boot/dts/qcom/qcom-ipq5018-optimcloud-d50.dts"
|
||||
|
||||
/ {
|
||||
pmuv8: pmu {
|
||||
compatible = "arm,cortex-a7-pmu";
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* 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 "../../../arm64/boot/dts/qcom/qcom-ipq5018-optimcloud-d50-5g.dts"
|
||||
|
||||
/ {
|
||||
pmuv8: pmu {
|
||||
compatible = "arm,cortex-a7-pmu";
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* 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 "../../../arm64/boot/dts/qcom/qcom-ipq5018-optimcloud-d50.dts"
|
||||
|
||||
/ {
|
||||
pmuv8: pmu {
|
||||
compatible = "arm,cortex-a7-pmu";
|
||||
};
|
||||
};
|
||||
@@ -29,6 +29,10 @@
|
||||
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 {
|
||||
@@ -682,6 +686,27 @@
|
||||
};
|
||||
};
|
||||
|
||||
leds_pins: leds_pins {
|
||||
led_pwr_g {
|
||||
pins = "gpio0";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_pwr_b {
|
||||
pins = "gpio1";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_pwr_r {
|
||||
pins = "gpio45";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
i2c_pins: i2c_pins {
|
||||
i2c_scl {
|
||||
pins = "gpio25";
|
||||
@@ -758,14 +783,31 @@
|
||||
};
|
||||
|
||||
&soc {
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&leds_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
pwm: pwm@0x1941010 {
|
||||
pinctrl-0 = <&pwm_pins>;
|
||||
pinctrl-names = "default";
|
||||
used-pwm-indices = <1>, <1>, <1>, <1>;
|
||||
dft-pwm-status = <1>, <0>, <0>, <0>;
|
||||
status = "ok";
|
||||
led3 {
|
||||
label = "blue:status";
|
||||
gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "blue-on";
|
||||
default-state = "off";
|
||||
};
|
||||
led2 {
|
||||
label = "red:status";
|
||||
gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "red-on";
|
||||
default-state = "off";
|
||||
};
|
||||
led_power: led1 {
|
||||
label = "green:status";
|
||||
gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "default-on";
|
||||
default-state = "on";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&usb3 {
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
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 {
|
||||
@@ -682,6 +686,27 @@
|
||||
};
|
||||
};
|
||||
|
||||
leds_pins: leds_pins {
|
||||
led_pwr_g {
|
||||
pins = "gpio0";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_pwr_b {
|
||||
pins = "gpio1";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_pwr_r {
|
||||
pins = "gpio45";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
i2c_pins: i2c_pins {
|
||||
i2c_scl {
|
||||
pins = "gpio25";
|
||||
@@ -758,14 +783,31 @@
|
||||
};
|
||||
|
||||
&soc {
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&leds_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
pwm: pwm@0x1941010 {
|
||||
pinctrl-0 = <&pwm_pins>;
|
||||
pinctrl-names = "default";
|
||||
used-pwm-indices = <1>, <1>, <1>, <1>;
|
||||
dft-pwm-status = <1>, <0>, <0>, <0>;
|
||||
status = "ok";
|
||||
led3 {
|
||||
label = "blue:status";
|
||||
gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "blue-on";
|
||||
default-state = "off";
|
||||
};
|
||||
led2 {
|
||||
label = "red:status";
|
||||
gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "red-on";
|
||||
default-state = "off";
|
||||
};
|
||||
led_power: led1 {
|
||||
label = "green:status";
|
||||
gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "default-on";
|
||||
default-state = "on";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&usb3 {
|
||||
|
||||
@@ -0,0 +1,995 @@
|
||||
/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 "qcom-ipq5018.dtsi"
|
||||
|
||||
/ {
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
model = "OptimCloud D50-5G";
|
||||
compatible = "optimcloud,d50-5g", "qcom,ipq5018-mp03.1", "qcom,ipq5018";
|
||||
interrupt-parent = <&intc>;
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
AUTO_MOUNT;
|
||||
#endif
|
||||
|
||||
aliases {
|
||||
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
|
||||
serial0 = &blsp1_uart1;
|
||||
serial1 = &blsp1_uart2;
|
||||
ethernet0 = "/soc/dp2";
|
||||
ethernet1 = "/soc/dp1";
|
||||
};
|
||||
|
||||
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 | 0x4B000000 | 23MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | M3 Dump| 0x4C700000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | QDSS | 0x4C800000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* |QCN9000 | 0x4C900000 | 17MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | MHI1 | 0x4DA00000 | 16MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +=================================================+
|
||||
*/
|
||||
q6_region: wcnss@4b000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4b000000 0x0 0x01700000>;
|
||||
};
|
||||
|
||||
m3_dump@4c700000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C700000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region:q6_etr_dump@4c800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c800000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
qcn9000_pcie0@4c900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C900000 0x0 0x01100000>;
|
||||
};
|
||||
|
||||
mhi_region1: dma_pool1@4da00000 {
|
||||
compatible = "shared-dma-pool";
|
||||
no-map;
|
||||
reg = <0x0 0x4da00000 0x0 0x01000000>;
|
||||
};
|
||||
#elif __IPQ_MEM_PROFILE_512_MB__
|
||||
/* 512 MB Profile
|
||||
* +=========+==============+========================+
|
||||
* | | | |
|
||||
* | 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 | 0x4B000000 | 24MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | M3 Dump| 0x4C800000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | QDSS | 0x4C900000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | caldb | 0x4CA00000 | 2MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* |QCN9000 | 0x4CC00000 | 30MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | MHI1 | 0x4EA00000 | 16MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +=================================================+
|
||||
*/
|
||||
q6_region: wcnss@4b000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4b000000 0x0 0x01800000>;
|
||||
};
|
||||
|
||||
m3_dump@4c800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c800000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region:q6_etr_dump@4c900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c900000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_caldb_region:q6_caldb_region@4ca00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4ca00000 0x0 0x200000>;
|
||||
};
|
||||
|
||||
qcn9000_pcie0@4cc00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4CC00000 0x0 0x01E00000>;
|
||||
};
|
||||
|
||||
mhi_region1: dma_pool1@4ea00000 {
|
||||
compatible = "shared-dma-pool";
|
||||
no-map;
|
||||
reg = <0x0 0x4ea00000 0x0 0x01000000>;
|
||||
};
|
||||
#else
|
||||
/* 1G Profile
|
||||
* +=========+==============+========================+
|
||||
* | | | |
|
||||
* | 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 | 0x4B000000 | 24MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | M3 Dump| 0x4C800000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | QDSS | 0x4C900000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | caldb | 0x4CA00000 | 2MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* |QCN9000 | 0x4CC00000 | 45MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | MHI1 | 0x4F900000 | 24MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +=================================================+
|
||||
*/
|
||||
q6_region: wcnss@4b000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4b000000 0x0 0x01800000>;
|
||||
};
|
||||
|
||||
m3_dump@4c800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c800000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region:q6_etr_dump@4c900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c900000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_caldb_region:q6_caldb_region@4ca00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4ca00000 0x0 0x200000>;
|
||||
};
|
||||
|
||||
qcn9000_pcie0@4cc00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4CC00000 0x0 0x02D00000>;
|
||||
};
|
||||
|
||||
mhi_region1: dma_pool1@4F900000 {
|
||||
compatible = "shared-dma-pool";
|
||||
no-map;
|
||||
reg = <0x0 0x4F900000 0x0 0x01800000>;
|
||||
};
|
||||
#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 = <0>;
|
||||
};
|
||||
|
||||
ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
};
|
||||
|
||||
ethernet-phy@3 {
|
||||
reg = <3>;
|
||||
};
|
||||
};
|
||||
|
||||
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>;
|
||||
};
|
||||
port@1 {
|
||||
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 = <0x27>;
|
||||
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 = <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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
wifi0: wifi@c000000 {
|
||||
qcom,bdf-addr = <0x4BA00000 0x4BA00000 0x4BA00000
|
||||
0x0 0x0>;
|
||||
qcom,caldb-addr = <0x4CA00000 0x4CA00000 0x4CA00000
|
||||
0x0 0x0>;
|
||||
qcom,caldb-size = <0x200000>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
ess-uniphy@98000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
qcom,sps {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
qcom,usbbam@8B04000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
qcom,diag@0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
dp2 {
|
||||
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";
|
||||
};
|
||||
|
||||
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>;
|
||||
local-mac-address = [000000000000];
|
||||
phy-mode = "sgmii";
|
||||
};
|
||||
|
||||
rpm_etm0 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys-polled";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
poll-interval = <100>;
|
||||
|
||||
button@0 {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
|
||||
linux,input-type = <1>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
button@1 {
|
||||
label = "wps";
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
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@35 {
|
||||
label = "green:4g";
|
||||
gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_5g_wifi";
|
||||
default-state = "off";
|
||||
};
|
||||
led@30 {
|
||||
label = "green:wifi";
|
||||
gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_2g_wifi";
|
||||
default-state = "off";
|
||||
};
|
||||
led@1 {
|
||||
label = "green:internet";
|
||||
gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_voice";
|
||||
default-state = "off";
|
||||
};
|
||||
led@33 {
|
||||
label = "green:lte";
|
||||
gpios = <&tlmm 33 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_lte_g";
|
||||
default-state = "off";
|
||||
};
|
||||
led@34 {
|
||||
label = "red:lte";
|
||||
gpios = <&tlmm 34 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_lte_r";
|
||||
default-state = "off";
|
||||
};
|
||||
led@27 {
|
||||
label = "green:mesh";
|
||||
gpios = <&tlmm 27 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_nr_g";
|
||||
default-state = "off";
|
||||
};
|
||||
led@28 {
|
||||
label = "red:mesh";
|
||||
gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_nr_r";
|
||||
default-state = "off";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
pinctrl-0 = <&blsp0_uart_pins &phy_led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
blsp0_uart_pins: blsp0_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_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 = "gpio22";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
wps_button {
|
||||
pins = "gpio38";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
leds_pins: leds_pins {
|
||||
led_5g_wifi {
|
||||
pins = "gpio35";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_2g_wifi {
|
||||
pins = "gpio30";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_lte_g {
|
||||
pins = "gpio33";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_lte_r {
|
||||
pins = "gpio34";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_nr_g {
|
||||
pins = "gpio27";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_nr_r {
|
||||
pins = "gpio28";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_voice {
|
||||
pins = "gpio1";
|
||||
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;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&usb3 {
|
||||
qcom,multiplexed-phy;
|
||||
qcom,phy-mux-regs = <&tcsr_q6_block 0x2540>;
|
||||
device-power-gpio = <&tlmm 24 1>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&eud {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1 {
|
||||
status = "disabled";
|
||||
perst-gpio = <&tlmm 18 1>;
|
||||
};
|
||||
|
||||
&pcie_x2 {
|
||||
status = "ok";
|
||||
perst-gpio = <&tlmm 15 1>;
|
||||
};
|
||||
|
||||
&bt {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&wcss {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&q6v5_wcss {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&q6v5_m3 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&tcsr_mutex_block {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&tcsr_mutex {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&smem {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&apcs_glb {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&tcsr_q6_block {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&qcom_q6v5_wcss {
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
memory-region = <&q6_region>, <&q6_etr_region>;
|
||||
#else
|
||||
memory-region = <&q6_region>, <&q6_etr_region>,
|
||||
<&q6_caldb_region>;
|
||||
#endif
|
||||
/* IPQ5018 */
|
||||
q6v5_wcss_userpd1 {
|
||||
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";
|
||||
qcom,smem-states = <&wcss_smp2p_out 8>,
|
||||
<&wcss_smp2p_out 9>,
|
||||
<&wcss_smp2p_out 10>;
|
||||
qcom,smem-state-names = "shutdown",
|
||||
"stop",
|
||||
"spawn";
|
||||
qca,asid = <1>;
|
||||
qca,auto-restart;
|
||||
qca,int_radio;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c_0 {
|
||||
pinctrl-0 = <&i2c_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&dbm_1p5 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&msm_imem {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&blsp1_uart1 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&ssuniphy_0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&hs_m31phy_0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1phy {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pcie_x2phy {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1_rp {
|
||||
status = "disabled";
|
||||
|
||||
mhi_0: qcom,mhi@0 {
|
||||
reg = <0 0 0 0 0 >;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie_x2_rp {
|
||||
status = "ok";
|
||||
|
||||
mhi_1: qcom,mhi@1 {
|
||||
reg = <0 0 0 0 0 >;
|
||||
qrtr_instance_id = <0x20>;
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
memory-region = <&mhi_region1>;
|
||||
#if !defined(__CNSS2__)
|
||||
base-addr = <0x4CC00000>;
|
||||
m3-dump-addr = <0x4E000000>;
|
||||
etr-addr = <0x4E100000>;
|
||||
qcom,caldb-addr = <0x4E200000>;
|
||||
qcom,tgt-mem-mode = <0x1>;
|
||||
mhi,max-channels = <30>;
|
||||
mhi,timeout = <10000>;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
/* IPQ5018 */
|
||||
qcom,board_id = <0x24>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&wifi3 {
|
||||
/* QCN9000 5G */
|
||||
board_id = <0xa0>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&qfprom {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&tsens {
|
||||
status = "ok";
|
||||
};
|
||||
@@ -0,0 +1,884 @@
|
||||
/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 "qcom-ipq5018.dtsi"
|
||||
|
||||
/ {
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
model = "OptimCloud D50";
|
||||
compatible = "optimcloud,d50", "qcom,ipq5018-mp03.1", "qcom,ipq5018";
|
||||
interrupt-parent = <&intc>;
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
AUTO_MOUNT;
|
||||
#endif
|
||||
|
||||
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 | 0x4B000000 | 23MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | M3 Dump| 0x4C700000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | QDSS | 0x4C800000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* |QCN9000 | 0x4C900000 | 17MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | MHI1 | 0x4DA00000 | 16MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +=================================================+
|
||||
*/
|
||||
q6_region: wcnss@4b000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4b000000 0x0 0x01700000>;
|
||||
};
|
||||
|
||||
m3_dump@4c700000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C700000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region:q6_etr_dump@4c800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c800000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
qcn9000_pcie0@4c900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C900000 0x0 0x01100000>;
|
||||
};
|
||||
|
||||
mhi_region1: dma_pool1@4da00000 {
|
||||
compatible = "shared-dma-pool";
|
||||
no-map;
|
||||
reg = <0x0 0x4da00000 0x0 0x01000000>;
|
||||
};
|
||||
#elif __IPQ_MEM_PROFILE_512_MB__
|
||||
/* 512 MB Profile
|
||||
* +=========+==============+========================+
|
||||
* | | | |
|
||||
* | 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 | 0x4B000000 | 24MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | M3 Dump| 0x4C800000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | QDSS | 0x4C900000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | caldb | 0x4CA00000 | 2MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* |QCN9000 | 0x4CC00000 | 30MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | MHI1 | 0x4EA00000 | 16MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +=================================================+
|
||||
*/
|
||||
q6_region: wcnss@4b000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4b000000 0x0 0x01800000>;
|
||||
};
|
||||
|
||||
m3_dump@4c800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c800000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region:q6_etr_dump@4c900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c900000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_caldb_region:q6_caldb_region@4ca00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4ca00000 0x0 0x200000>;
|
||||
};
|
||||
|
||||
qcn9000_pcie0@4cc00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4CC00000 0x0 0x01E00000>;
|
||||
};
|
||||
|
||||
mhi_region1: dma_pool1@4ea00000 {
|
||||
compatible = "shared-dma-pool";
|
||||
no-map;
|
||||
reg = <0x0 0x4ea00000 0x0 0x01000000>;
|
||||
};
|
||||
#else
|
||||
/* 1G Profile
|
||||
* +=========+==============+========================+
|
||||
* | | | |
|
||||
* | 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 | 0x4B000000 | 24MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | M3 Dump| 0x4C800000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | QDSS | 0x4C900000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | caldb | 0x4CA00000 | 2MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* |QCN9000 | 0x4CC00000 | 45MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | MHI1 | 0x4F900000 | 24MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +=================================================+
|
||||
*/
|
||||
q6_region: wcnss@4b000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4b000000 0x0 0x01800000>;
|
||||
};
|
||||
|
||||
m3_dump@4c800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c800000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region:q6_etr_dump@4c900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c900000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_caldb_region:q6_caldb_region@4ca00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4ca00000 0x0 0x200000>;
|
||||
};
|
||||
|
||||
qcn9000_pcie0@4cc00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4CC00000 0x0 0x02D00000>;
|
||||
};
|
||||
|
||||
mhi_region1: dma_pool1@4F900000 {
|
||||
compatible = "shared-dma-pool";
|
||||
no-map;
|
||||
reg = <0x0 0x4F900000 0x0 0x01800000>;
|
||||
};
|
||||
#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 = <0>;
|
||||
};
|
||||
|
||||
ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
};
|
||||
|
||||
ethernet-phy@3 {
|
||||
reg = <3>;
|
||||
};
|
||||
};
|
||||
|
||||
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>;
|
||||
};
|
||||
port@1 {
|
||||
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 = <0x27>;
|
||||
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 = <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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
wifi0: wifi@c000000 {
|
||||
qcom,bdf-addr = <0x4BA00000 0x4BA00000 0x4BA00000
|
||||
0x0 0x0>;
|
||||
qcom,caldb-addr = <0x4CA00000 0x4CA00000 0x4CA00000
|
||||
0x0 0x0>;
|
||||
qcom,caldb-size = <0x200000>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
ess-uniphy@98000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
qcom,sps {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
qcom,usbbam@8B04000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
qcom,diag@0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
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>;
|
||||
local-mac-address = [000000000000];
|
||||
phy-mode = "sgmii";
|
||||
};
|
||||
|
||||
rpm_etm0 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
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: blsp0_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_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 {
|
||||
wps_button {
|
||||
pins = "gpio38";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
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";
|
||||
|
||||
button@1 {
|
||||
label = "wps";
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
|
||||
linux,input-type = <1>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&usb3 {
|
||||
qcom,multiplexed-phy;
|
||||
qcom,phy-mux-regs = <&tcsr_q6_block 0x2540>;
|
||||
device-power-gpio = <&tlmm 24 1>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&eud {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1 {
|
||||
status = "disabled";
|
||||
perst-gpio = <&tlmm 18 1>;
|
||||
};
|
||||
|
||||
&pcie_x2 {
|
||||
status = "ok";
|
||||
perst-gpio = <&tlmm 15 1>;
|
||||
};
|
||||
|
||||
&bt {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&wcss {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&q6v5_wcss {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&q6v5_m3 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&tcsr_mutex_block {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&tcsr_mutex {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&smem {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&apcs_glb {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&tcsr_q6_block {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&qcom_q6v5_wcss {
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
memory-region = <&q6_region>, <&q6_etr_region>;
|
||||
#else
|
||||
memory-region = <&q6_region>, <&q6_etr_region>,
|
||||
<&q6_caldb_region>;
|
||||
#endif
|
||||
/* IPQ5018 */
|
||||
q6v5_wcss_userpd1 {
|
||||
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";
|
||||
qcom,smem-states = <&wcss_smp2p_out 8>,
|
||||
<&wcss_smp2p_out 9>,
|
||||
<&wcss_smp2p_out 10>;
|
||||
qcom,smem-state-names = "shutdown",
|
||||
"stop",
|
||||
"spawn";
|
||||
qca,asid = <1>;
|
||||
qca,auto-restart;
|
||||
qca,int_radio;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c_0 {
|
||||
pinctrl-0 = <&i2c_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&dbm_1p5 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&msm_imem {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&blsp1_uart1 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&ssuniphy_0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&hs_m31phy_0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1phy {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pcie_x2phy {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1_rp {
|
||||
status = "disabled";
|
||||
|
||||
mhi_0: qcom,mhi@0 {
|
||||
reg = <0 0 0 0 0 >;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie_x2_rp {
|
||||
status = "ok";
|
||||
|
||||
mhi_1: qcom,mhi@1 {
|
||||
reg = <0 0 0 0 0 >;
|
||||
qrtr_instance_id = <0x20>;
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
memory-region = <&mhi_region1>;
|
||||
#if !defined(__CNSS2__)
|
||||
base-addr = <0x4CC00000>;
|
||||
m3-dump-addr = <0x4E000000>;
|
||||
etr-addr = <0x4E100000>;
|
||||
qcom,caldb-addr = <0x4E200000>;
|
||||
qcom,tgt-mem-mode = <0x1>;
|
||||
mhi,max-channels = <30>;
|
||||
mhi,timeout = <10000>;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
/* IPQ5018 */
|
||||
qcom,board_id = <0x24>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&wifi3 {
|
||||
/* QCN9000 5G */
|
||||
board_id = <0xa0>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&qfprom {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&tsens {
|
||||
status = "ok";
|
||||
};
|
||||
@@ -0,0 +1,995 @@
|
||||
/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 "qcom-ipq5018.dtsi"
|
||||
|
||||
/ {
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
model = "OptimCloud D60-5G";
|
||||
compatible = "optimcloud,d60-5g", "qcom,ipq5018-mp03.1", "qcom,ipq5018";
|
||||
interrupt-parent = <&intc>;
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
AUTO_MOUNT;
|
||||
#endif
|
||||
|
||||
aliases {
|
||||
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
|
||||
serial0 = &blsp1_uart1;
|
||||
serial1 = &blsp1_uart2;
|
||||
ethernet0 = "/soc/dp2";
|
||||
ethernet1 = "/soc/dp1";
|
||||
};
|
||||
|
||||
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 | 0x4B000000 | 23MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | M3 Dump| 0x4C700000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | QDSS | 0x4C800000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* |QCN9000 | 0x4C900000 | 17MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | MHI1 | 0x4DA00000 | 16MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +=================================================+
|
||||
*/
|
||||
q6_region: wcnss@4b000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4b000000 0x0 0x01700000>;
|
||||
};
|
||||
|
||||
m3_dump@4c700000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C700000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region:q6_etr_dump@4c800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c800000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
qcn9000_pcie0@4c900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C900000 0x0 0x01100000>;
|
||||
};
|
||||
|
||||
mhi_region1: dma_pool1@4da00000 {
|
||||
compatible = "shared-dma-pool";
|
||||
no-map;
|
||||
reg = <0x0 0x4da00000 0x0 0x01000000>;
|
||||
};
|
||||
#elif __IPQ_MEM_PROFILE_512_MB__
|
||||
/* 512 MB Profile
|
||||
* +=========+==============+========================+
|
||||
* | | | |
|
||||
* | 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 | 0x4B000000 | 24MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | M3 Dump| 0x4C800000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | QDSS | 0x4C900000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | caldb | 0x4CA00000 | 2MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* |QCN9000 | 0x4CC00000 | 30MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | MHI1 | 0x4EA00000 | 16MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +=================================================+
|
||||
*/
|
||||
q6_region: wcnss@4b000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4b000000 0x0 0x01800000>;
|
||||
};
|
||||
|
||||
m3_dump@4c800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c800000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region:q6_etr_dump@4c900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c900000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_caldb_region:q6_caldb_region@4ca00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4ca00000 0x0 0x200000>;
|
||||
};
|
||||
|
||||
qcn9000_pcie0@4cc00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4CC00000 0x0 0x01E00000>;
|
||||
};
|
||||
|
||||
mhi_region1: dma_pool1@4ea00000 {
|
||||
compatible = "shared-dma-pool";
|
||||
no-map;
|
||||
reg = <0x0 0x4ea00000 0x0 0x01000000>;
|
||||
};
|
||||
#else
|
||||
/* 1G Profile
|
||||
* +=========+==============+========================+
|
||||
* | | | |
|
||||
* | 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 | 0x4B000000 | 24MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | M3 Dump| 0x4C800000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | QDSS | 0x4C900000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | caldb | 0x4CA00000 | 2MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* |QCN9000 | 0x4CC00000 | 45MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | MHI1 | 0x4F900000 | 24MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +=================================================+
|
||||
*/
|
||||
q6_region: wcnss@4b000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4b000000 0x0 0x01800000>;
|
||||
};
|
||||
|
||||
m3_dump@4c800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c800000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region:q6_etr_dump@4c900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c900000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_caldb_region:q6_caldb_region@4ca00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4ca00000 0x0 0x200000>;
|
||||
};
|
||||
|
||||
qcn9000_pcie0@4cc00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4CC00000 0x0 0x02D00000>;
|
||||
};
|
||||
|
||||
mhi_region1: dma_pool1@4F900000 {
|
||||
compatible = "shared-dma-pool";
|
||||
no-map;
|
||||
reg = <0x0 0x4F900000 0x0 0x01800000>;
|
||||
};
|
||||
#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 = <0>;
|
||||
};
|
||||
|
||||
ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
};
|
||||
|
||||
ethernet-phy@3 {
|
||||
reg = <3>;
|
||||
};
|
||||
};
|
||||
|
||||
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>;
|
||||
};
|
||||
port@1 {
|
||||
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 = <0x27>;
|
||||
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 = <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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
wifi0: wifi@c000000 {
|
||||
qcom,bdf-addr = <0x4BA00000 0x4BA00000 0x4BA00000
|
||||
0x0 0x0>;
|
||||
qcom,caldb-addr = <0x4CA00000 0x4CA00000 0x4CA00000
|
||||
0x0 0x0>;
|
||||
qcom,caldb-size = <0x200000>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
ess-uniphy@98000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
qcom,sps {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
qcom,usbbam@8B04000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
qcom,diag@0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
dp2 {
|
||||
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";
|
||||
};
|
||||
|
||||
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>;
|
||||
local-mac-address = [000000000000];
|
||||
phy-mode = "sgmii";
|
||||
};
|
||||
|
||||
rpm_etm0 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys-polled";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
poll-interval = <100>;
|
||||
|
||||
button@0 {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
|
||||
linux,input-type = <1>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
button@1 {
|
||||
label = "wps";
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
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@35 {
|
||||
label = "green:4g";
|
||||
gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_5g_wifi";
|
||||
default-state = "off";
|
||||
};
|
||||
led@30 {
|
||||
label = "green:wifi";
|
||||
gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_2g_wifi";
|
||||
default-state = "off";
|
||||
};
|
||||
led@1 {
|
||||
label = "green:internet";
|
||||
gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_voice";
|
||||
default-state = "off";
|
||||
};
|
||||
led@33 {
|
||||
label = "green:lte";
|
||||
gpios = <&tlmm 33 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_lte_g";
|
||||
default-state = "off";
|
||||
};
|
||||
led@34 {
|
||||
label = "red:lte";
|
||||
gpios = <&tlmm 34 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_lte_r";
|
||||
default-state = "off";
|
||||
};
|
||||
led@27 {
|
||||
label = "green:mesh";
|
||||
gpios = <&tlmm 27 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_nr_g";
|
||||
default-state = "off";
|
||||
};
|
||||
led@28 {
|
||||
label = "red:mesh";
|
||||
gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_nr_r";
|
||||
default-state = "off";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
pinctrl-0 = <&blsp0_uart_pins &phy_led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
blsp0_uart_pins: blsp0_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_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 = "gpio22";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
wps_button {
|
||||
pins = "gpio38";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
leds_pins: leds_pins {
|
||||
led_5g_wifi {
|
||||
pins = "gpio35";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_2g_wifi {
|
||||
pins = "gpio30";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_lte_g {
|
||||
pins = "gpio33";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_lte_r {
|
||||
pins = "gpio34";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_nr_g {
|
||||
pins = "gpio27";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_nr_r {
|
||||
pins = "gpio28";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_voice {
|
||||
pins = "gpio1";
|
||||
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;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&usb3 {
|
||||
qcom,multiplexed-phy;
|
||||
qcom,phy-mux-regs = <&tcsr_q6_block 0x2540>;
|
||||
device-power-gpio = <&tlmm 24 1>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&eud {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1 {
|
||||
status = "disabled";
|
||||
perst-gpio = <&tlmm 18 1>;
|
||||
};
|
||||
|
||||
&pcie_x2 {
|
||||
status = "ok";
|
||||
perst-gpio = <&tlmm 15 1>;
|
||||
};
|
||||
|
||||
&bt {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&wcss {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&q6v5_wcss {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&q6v5_m3 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&tcsr_mutex_block {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&tcsr_mutex {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&smem {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&apcs_glb {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&tcsr_q6_block {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&qcom_q6v5_wcss {
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
memory-region = <&q6_region>, <&q6_etr_region>;
|
||||
#else
|
||||
memory-region = <&q6_region>, <&q6_etr_region>,
|
||||
<&q6_caldb_region>;
|
||||
#endif
|
||||
/* IPQ5018 */
|
||||
q6v5_wcss_userpd1 {
|
||||
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";
|
||||
qcom,smem-states = <&wcss_smp2p_out 8>,
|
||||
<&wcss_smp2p_out 9>,
|
||||
<&wcss_smp2p_out 10>;
|
||||
qcom,smem-state-names = "shutdown",
|
||||
"stop",
|
||||
"spawn";
|
||||
qca,asid = <1>;
|
||||
qca,auto-restart;
|
||||
qca,int_radio;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c_0 {
|
||||
pinctrl-0 = <&i2c_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&dbm_1p5 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&msm_imem {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&blsp1_uart1 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&ssuniphy_0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&hs_m31phy_0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1phy {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pcie_x2phy {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1_rp {
|
||||
status = "disabled";
|
||||
|
||||
mhi_0: qcom,mhi@0 {
|
||||
reg = <0 0 0 0 0 >;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie_x2_rp {
|
||||
status = "ok";
|
||||
|
||||
mhi_1: qcom,mhi@1 {
|
||||
reg = <0 0 0 0 0 >;
|
||||
qrtr_instance_id = <0x20>;
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
memory-region = <&mhi_region1>;
|
||||
#if !defined(__CNSS2__)
|
||||
base-addr = <0x4CC00000>;
|
||||
m3-dump-addr = <0x4E000000>;
|
||||
etr-addr = <0x4E100000>;
|
||||
qcom,caldb-addr = <0x4E200000>;
|
||||
qcom,tgt-mem-mode = <0x1>;
|
||||
mhi,max-channels = <30>;
|
||||
mhi,timeout = <10000>;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
/* IPQ5018 */
|
||||
qcom,board_id = <0x24>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&wifi3 {
|
||||
/* QCN9000 5G */
|
||||
board_id = <0xa0>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&qfprom {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&tsens {
|
||||
status = "ok";
|
||||
};
|
||||
@@ -0,0 +1,884 @@
|
||||
/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 "qcom-ipq5018.dtsi"
|
||||
|
||||
/ {
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
model = "OptimCloud D60";
|
||||
compatible = "optimcloud,d60", "qcom,ipq5018-mp03.1", "qcom,ipq5018";
|
||||
interrupt-parent = <&intc>;
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
AUTO_MOUNT;
|
||||
#endif
|
||||
|
||||
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 | 0x4B000000 | 23MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | M3 Dump| 0x4C700000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | QDSS | 0x4C800000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* |QCN9000 | 0x4C900000 | 17MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | MHI1 | 0x4DA00000 | 16MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +=================================================+
|
||||
*/
|
||||
q6_region: wcnss@4b000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4b000000 0x0 0x01700000>;
|
||||
};
|
||||
|
||||
m3_dump@4c700000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C700000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region:q6_etr_dump@4c800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c800000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
qcn9000_pcie0@4c900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C900000 0x0 0x01100000>;
|
||||
};
|
||||
|
||||
mhi_region1: dma_pool1@4da00000 {
|
||||
compatible = "shared-dma-pool";
|
||||
no-map;
|
||||
reg = <0x0 0x4da00000 0x0 0x01000000>;
|
||||
};
|
||||
#elif __IPQ_MEM_PROFILE_512_MB__
|
||||
/* 512 MB Profile
|
||||
* +=========+==============+========================+
|
||||
* | | | |
|
||||
* | 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 | 0x4B000000 | 24MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | M3 Dump| 0x4C800000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | QDSS | 0x4C900000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | caldb | 0x4CA00000 | 2MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* |QCN9000 | 0x4CC00000 | 30MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | MHI1 | 0x4EA00000 | 16MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +=================================================+
|
||||
*/
|
||||
q6_region: wcnss@4b000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4b000000 0x0 0x01800000>;
|
||||
};
|
||||
|
||||
m3_dump@4c800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c800000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region:q6_etr_dump@4c900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c900000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_caldb_region:q6_caldb_region@4ca00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4ca00000 0x0 0x200000>;
|
||||
};
|
||||
|
||||
qcn9000_pcie0@4cc00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4CC00000 0x0 0x01E00000>;
|
||||
};
|
||||
|
||||
mhi_region1: dma_pool1@4ea00000 {
|
||||
compatible = "shared-dma-pool";
|
||||
no-map;
|
||||
reg = <0x0 0x4ea00000 0x0 0x01000000>;
|
||||
};
|
||||
#else
|
||||
/* 1G Profile
|
||||
* +=========+==============+========================+
|
||||
* | | | |
|
||||
* | 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 | 0x4B000000 | 24MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | M3 Dump| 0x4C800000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | QDSS | 0x4C900000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | caldb | 0x4CA00000 | 2MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* |QCN9000 | 0x4CC00000 | 45MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | MHI1 | 0x4F900000 | 24MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +=================================================+
|
||||
*/
|
||||
q6_region: wcnss@4b000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4b000000 0x0 0x01800000>;
|
||||
};
|
||||
|
||||
m3_dump@4c800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c800000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region:q6_etr_dump@4c900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c900000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_caldb_region:q6_caldb_region@4ca00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4ca00000 0x0 0x200000>;
|
||||
};
|
||||
|
||||
qcn9000_pcie0@4cc00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4CC00000 0x0 0x02D00000>;
|
||||
};
|
||||
|
||||
mhi_region1: dma_pool1@4F900000 {
|
||||
compatible = "shared-dma-pool";
|
||||
no-map;
|
||||
reg = <0x0 0x4F900000 0x0 0x01800000>;
|
||||
};
|
||||
#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 = <0>;
|
||||
};
|
||||
|
||||
ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
};
|
||||
|
||||
ethernet-phy@3 {
|
||||
reg = <3>;
|
||||
};
|
||||
};
|
||||
|
||||
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>;
|
||||
};
|
||||
port@1 {
|
||||
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 = <0x27>;
|
||||
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 = <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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
wifi0: wifi@c000000 {
|
||||
qcom,bdf-addr = <0x4BA00000 0x4BA00000 0x4BA00000
|
||||
0x0 0x0>;
|
||||
qcom,caldb-addr = <0x4CA00000 0x4CA00000 0x4CA00000
|
||||
0x0 0x0>;
|
||||
qcom,caldb-size = <0x200000>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
ess-uniphy@98000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
qcom,sps {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
qcom,usbbam@8B04000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
qcom,diag@0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
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>;
|
||||
local-mac-address = [000000000000];
|
||||
phy-mode = "sgmii";
|
||||
};
|
||||
|
||||
rpm_etm0 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
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: blsp0_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_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 {
|
||||
wps_button {
|
||||
pins = "gpio38";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
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";
|
||||
|
||||
button@1 {
|
||||
label = "wps";
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
|
||||
linux,input-type = <1>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&usb3 {
|
||||
qcom,multiplexed-phy;
|
||||
qcom,phy-mux-regs = <&tcsr_q6_block 0x2540>;
|
||||
device-power-gpio = <&tlmm 24 1>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&eud {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1 {
|
||||
status = "disabled";
|
||||
perst-gpio = <&tlmm 18 1>;
|
||||
};
|
||||
|
||||
&pcie_x2 {
|
||||
status = "ok";
|
||||
perst-gpio = <&tlmm 15 1>;
|
||||
};
|
||||
|
||||
&bt {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&wcss {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&q6v5_wcss {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&q6v5_m3 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&tcsr_mutex_block {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&tcsr_mutex {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&smem {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&apcs_glb {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&tcsr_q6_block {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&qcom_q6v5_wcss {
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
memory-region = <&q6_region>, <&q6_etr_region>;
|
||||
#else
|
||||
memory-region = <&q6_region>, <&q6_etr_region>,
|
||||
<&q6_caldb_region>;
|
||||
#endif
|
||||
/* IPQ5018 */
|
||||
q6v5_wcss_userpd1 {
|
||||
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";
|
||||
qcom,smem-states = <&wcss_smp2p_out 8>,
|
||||
<&wcss_smp2p_out 9>,
|
||||
<&wcss_smp2p_out 10>;
|
||||
qcom,smem-state-names = "shutdown",
|
||||
"stop",
|
||||
"spawn";
|
||||
qca,asid = <1>;
|
||||
qca,auto-restart;
|
||||
qca,int_radio;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c_0 {
|
||||
pinctrl-0 = <&i2c_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&dbm_1p5 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&msm_imem {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&blsp1_uart1 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&ssuniphy_0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&hs_m31phy_0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1phy {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pcie_x2phy {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1_rp {
|
||||
status = "disabled";
|
||||
|
||||
mhi_0: qcom,mhi@0 {
|
||||
reg = <0 0 0 0 0 >;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie_x2_rp {
|
||||
status = "ok";
|
||||
|
||||
mhi_1: qcom,mhi@1 {
|
||||
reg = <0 0 0 0 0 >;
|
||||
qrtr_instance_id = <0x20>;
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
memory-region = <&mhi_region1>;
|
||||
#if !defined(__CNSS2__)
|
||||
base-addr = <0x4CC00000>;
|
||||
m3-dump-addr = <0x4E000000>;
|
||||
etr-addr = <0x4E100000>;
|
||||
qcom,caldb-addr = <0x4E200000>;
|
||||
qcom,tgt-mem-mode = <0x1>;
|
||||
mhi,max-channels = <30>;
|
||||
mhi,timeout = <10000>;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
/* IPQ5018 */
|
||||
qcom,board_id = <0x24>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&wifi3 {
|
||||
/* QCN9000 5G */
|
||||
board_id = <0xa0>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&qfprom {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&tsens {
|
||||
status = "ok";
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -165,3 +165,56 @@ define Device/yuncore_fap655
|
||||
endef
|
||||
TARGET_DEVICES += yuncore_fap655
|
||||
|
||||
define Device/optimcloud_d50-5g
|
||||
DEVICE_TITLE := OptimCloud D50-5G
|
||||
DEVICE_DTS := qcom-ipq5018-optimcloud-d50-5g
|
||||
SUPPORTED_DEVICES := optimcloud,d50-5g
|
||||
DEVICE_PACKAGES := ath11k-wifi-optimcloud-d50 ath11k-firmware-ipq50xx ath11k-firmware-qcn9000
|
||||
DEVICE_DTS_CONFIG := config@mp03.1
|
||||
IMAGES := sysupgrade.tar nand-factory.bin nand-factory.ubi
|
||||
IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
|
||||
IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand
|
||||
IMAGE/nand-factory.ubi := append-ubi
|
||||
endef
|
||||
TARGET_DEVICES += optimcloud_d50-5g
|
||||
|
||||
define Device/optimcloud_d50
|
||||
DEVICE_TITLE := OptimCloud D50
|
||||
DEVICE_DTS := qcom-ipq5018-optimcloud-d50
|
||||
SUPPORTED_DEVICES := optimcloud,d50
|
||||
DEVICE_PACKAGES := ath11k-wifi-optimcloud-d50 ath11k-firmware-ipq50xx ath11k-firmware-qcn9000 ath11k-firmware-qcn6122
|
||||
DEVICE_DTS_CONFIG := config@mp03.1
|
||||
IMAGES := sysupgrade.tar nand-factory.bin nand-factory.ubi
|
||||
IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
|
||||
IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand
|
||||
IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand
|
||||
IMAGE/nand-factory.ubi := append-ubi | qsdk-ipq-factory-nand
|
||||
endef
|
||||
TARGET_DEVICES += optimcloud_d50
|
||||
|
||||
define Device/optimcloud_d60-5g
|
||||
DEVICE_TITLE := OptimCloud D60-5G
|
||||
DEVICE_DTS := qcom-ipq5018-optimcloud-d60-5g
|
||||
SUPPORTED_DEVICES := optimcloud,d60-5g
|
||||
DEVICE_PACKAGES := ath11k-wifi-optimcloud-d60 ath11k-firmware-ipq50xx ath11k-firmware-qcn9000
|
||||
DEVICE_DTS_CONFIG := config@mp03.1
|
||||
IMAGES := sysupgrade.tar nand-factory.bin nand-factory.ubi
|
||||
IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
|
||||
IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand
|
||||
IMAGE/nand-factory.ubi := append-ubi
|
||||
endef
|
||||
TARGET_DEVICES += optimcloud_d60-5g
|
||||
|
||||
define Device/optimcloud_d60
|
||||
DEVICE_TITLE := OptimCloud D60
|
||||
DEVICE_DTS := qcom-ipq5018-optimcloud-d60
|
||||
SUPPORTED_DEVICES := optimcloud,d60
|
||||
DEVICE_PACKAGES := ath11k-wifi-optimcloud-d60 ath11k-firmware-ipq50xx ath11k-firmware-qcn9000 ath11k-firmware-qcn6122
|
||||
DEVICE_DTS_CONFIG := config@mp03.1
|
||||
IMAGES := sysupgrade.tar nand-factory.bin nand-factory.ubi
|
||||
IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
|
||||
IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand
|
||||
IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand
|
||||
IMAGE/nand-factory.ubi := append-ubi | qsdk-ipq-factory-nand
|
||||
endef
|
||||
TARGET_DEVICES += optimcloud_d60
|
||||
|
||||
@@ -29,9 +29,9 @@ ALLWIFIBOARDS:= \
|
||||
cig-wf660a \
|
||||
cig-wf194c \
|
||||
cig-wf194c4 \
|
||||
cig-wf196-ca \
|
||||
cig-wf196-us \
|
||||
cybertan-eww622-a1 \
|
||||
cybertan-eww631-a1 \
|
||||
cybertan-eww631-b1 \
|
||||
edgecore-eap101 \
|
||||
gl-ax1800 \
|
||||
gl-axt1800 \
|
||||
@@ -89,14 +89,9 @@ $(call Package/ath11k-wifi-default)
|
||||
TITLE:=board-2.bin for QCOM IPQ6122 eval kits
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-cig-wf196_6g-ca
|
||||
define Package/ath11k-wifi-cig-wf196
|
||||
$(call Package/ath11k-wifi-default)
|
||||
TITLE:=cig-wf196 6G bdf CA
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-cig-wf196_6g-us
|
||||
$(call Package/ath11k-wifi-default)
|
||||
TITLE:=cig-wf196 6G bdf US
|
||||
TITLE:=cig-wf196 bdf
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-gl-ax1800
|
||||
@@ -134,6 +129,11 @@ $(call Package/ath11k-wifi-default)
|
||||
TITLE:=hfcl-ion4xi bdf
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-hfcl-ion4xe
|
||||
$(call Package/ath11k-wifi-default)
|
||||
TITLE:=hfcl-ion4xe bdf
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-hfcl-ion4xi_w
|
||||
$(call Package/ath11k-wifi-default)
|
||||
TITLE:=hfcl-ion4xi_w bdf
|
||||
@@ -170,14 +170,9 @@ $(call Package/ath11k-wifi-default)
|
||||
TITLE:=edgecore-oap101e bdf
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-cig-wf188n-ca
|
||||
define Package/ath11k-wifi-cig-wf188n
|
||||
$(call Package/ath11k-wifi-default)
|
||||
TITLE:=cig-wf188n bdf CA
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-cig-wf188n-us
|
||||
$(call Package/ath11k-wifi-default)
|
||||
TITLE:=cig-wf188n bdf US
|
||||
TITLE:=cig-wf188n bdf
|
||||
endef
|
||||
|
||||
define ath11k-wifi-install-one-to
|
||||
@@ -257,16 +252,12 @@ define Package/ath11k-wifi-qcom-qcn9000/install
|
||||
$(INSTALL_DATA) ./board-2.bin.QCN9000 $(1)/lib/firmware/ath11k/QCN9074/hw1.0/board-2.bin
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-cig-wf196_6g-ca/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/QCN9074/hw1.0/
|
||||
$(INSTALL_DATA) ./board-cig-wf196_6g-ca.bin.QCN9074 $(1)/lib/firmware/ath11k/QCN9074/hw1.0/board.bin
|
||||
echo -n 'CA' > $(1)/lib/firmware/country
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-cig-wf196_6g-us/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/QCN9074/hw1.0/
|
||||
$(INSTALL_DATA) ./board-cig-wf196_6g-us.bin.QCN9074 $(1)/lib/firmware/ath11k/QCN9074/hw1.0/board.bin
|
||||
echo -n 'US' > $(1)/lib/firmware/country
|
||||
define Package/ath11k-wifi-cig-wf196/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/QCN9074/hw1.0/ $(1)/lib/firmware/ath11k/IPQ8074/hw2.0/
|
||||
$(INSTALL_DATA) ./board-cig-wf196_6g-ca.bin.QCN9074 $(1)/lib/firmware/ath11k/QCN9074/hw1.0/board.bin.CA
|
||||
$(INSTALL_DATA) ./board-cig-wf196_6g-us.bin.QCN9074 $(1)/lib/firmware/ath11k/QCN9074/hw1.0/board.bin.US
|
||||
$(INSTALL_DATA) ./board-cig-wf196-ca.bin.IPQ8074 $(1)/lib/firmware/ath11k/IPQ8074/hw2.0/board.bin.CA
|
||||
$(INSTALL_DATA) ./board-cig-wf196-us.bin.IPQ8074 $(1)/lib/firmware/ath11k/IPQ8074/hw2.0/board.bin.US
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-optimcloud-d50/install
|
||||
@@ -315,6 +306,11 @@ define Package/ath11k-wifi-hfcl-ion4xi/install
|
||||
$(INSTALL_DATA) ./board-hfcl-ion4xi.bin.IPQ6018 $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/board-2.bin
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-hfcl-ion4xe/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/
|
||||
$(INSTALL_DATA) ./board-hfcl-ion4xe.bin.IPQ6018 $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/board-2.bin
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-hfcl-ion4xi_wp/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/
|
||||
$(INSTALL_DATA) ./board-hfcl-ion4xi_wp.bin.IPQ6018 $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/board.bin
|
||||
@@ -355,16 +351,10 @@ define Package/ath11k-wifi-edgecore-oap101e/install
|
||||
$(INSTALL_DATA) ./board-2-edgecore-oap101e.bin.QCN6122 $(1)/lib/firmware/ath11k/qcn6122/hw1.0/board-2.bin
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-cig-wf188n-ca/install
|
||||
define Package/ath11k-wifi-cig-wf188n/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/
|
||||
$(INSTALL_DATA) ./board-cig-wf188n-ca.bin.IPQ6018 $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/board.bin
|
||||
echo -n 'CA MY DE' > $(1)/lib/firmware/country
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-cig-wf188n-us/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/
|
||||
$(INSTALL_DATA) ./board-cig-wf188n-us.bin.IPQ6018 $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/board.bin
|
||||
echo -n 'US MY DE' > $(1)/lib/firmware/country
|
||||
$(INSTALL_DATA) ./board-cig-wf188n-ca.bin.IPQ6018 $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/board.bin.CA
|
||||
$(INSTALL_DATA) ./board-cig-wf188n-us.bin.IPQ6018 $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/board.bin.US
|
||||
endef
|
||||
|
||||
$(eval $(call generate-ath11k-wifi-package,cig-wf186w,Cigtech WF186w))
|
||||
@@ -372,9 +362,9 @@ $(eval $(call generate-ath11k-wifi-package,cig-wf186h,Cigtech WF186h))
|
||||
$(eval $(call generate-ath11k-wifi-package,cig-wf660a,Cigtech WF660a))
|
||||
$(eval $(call generate-ath11k-wifi-package,cig-wf194c,Cigtech WF194c))
|
||||
$(eval $(call generate-ath11k-wifi-package,cig-wf194c4,Cigtech WF194c4))
|
||||
$(eval $(call generate-ath11k-wifi-package,cig-wf196-ca,Cigtech WF196 CA))
|
||||
$(eval $(call generate-ath11k-wifi-package,cig-wf196-us,Cigtech WF196 US))
|
||||
$(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,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))
|
||||
@@ -400,17 +390,16 @@ $(eval $(call BuildPackage,ath11k-wifi-qcom-ipq6122))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-qcom-ipq8074))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-qcom-ipq6018))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-qcom-qcn9000))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-cig-wf196_6g-ca))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-cig-wf196_6g-us))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-cig-wf196))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-motorola-q14))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-optimcloud-d50))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-optimcloud-d60))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-hfcl-ion4xi))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-hfcl-ion4xe))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-hfcl-ion4xi_wp))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-hfcl-ion4xi_w))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-hfcl-ion4x_w))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-hfcl-ion4xi_HMR))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-edgecore-oap101))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-edgecore-oap101e))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-cig-wf188n-ca))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-cig-wf188n-us))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-cig-wf188n))
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-hfcl-ion4xe.bin.IPQ6018
Normal file
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-hfcl-ion4xe.bin.IPQ6018
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -745,11 +745,11 @@ hostapd_set_bss_options() {
|
||||
}
|
||||
|
||||
case "$auth_type" in
|
||||
sae|owe|eap192|eap256)
|
||||
sae|owe|eap192|eap2)
|
||||
set_default ieee80211w 2
|
||||
set_default sae_require_mfp 1
|
||||
;;
|
||||
psk-sae|psk2-radius|eap-eap256)
|
||||
psk-sae|psk2-radius|eap-eap2)
|
||||
set_default ieee80211w 1
|
||||
set_default sae_require_mfp 1
|
||||
;;
|
||||
@@ -796,7 +796,7 @@ hostapd_set_bss_options() {
|
||||
vlan_possible=1
|
||||
wps_possible=1
|
||||
;;
|
||||
eap|eap192|eap-eap256|eap256)
|
||||
eap|eap192|eap-eap2|eap2)
|
||||
append_radius_server
|
||||
# radius can provide VLAN ID for clients
|
||||
vlan_possible=1
|
||||
@@ -1342,10 +1342,10 @@ wpa_supplicant_add_network() {
|
||||
default_disabled
|
||||
|
||||
case "$auth_type" in
|
||||
sae|owe|eap-eap256)
|
||||
sae|owe|eap-eap2)
|
||||
set_default ieee80211w 2
|
||||
;;
|
||||
psk-sae|eap192|eap256)
|
||||
psk-sae|eap192|eap2)
|
||||
set_default ieee80211w 1
|
||||
;;
|
||||
esac
|
||||
@@ -1423,7 +1423,7 @@ wpa_supplicant_add_network() {
|
||||
fi
|
||||
append network_data "$passphrase" "$N$T"
|
||||
;;
|
||||
eap|eap192|eap-eap256|eap256)
|
||||
eap|eap192|eap-eap2|eap2)
|
||||
hostapd_append_wpa_key_mgmt
|
||||
key_mgmt="$wpa_key_mgmt"
|
||||
|
||||
|
||||
@@ -0,0 +1,459 @@
|
||||
From 1c3438fec4bad13a676617915ff56af54e7b4542 Mon Sep 17 00:00:00 2001
|
||||
From: Jouni Malinen <j@w1.fi>
|
||||
Date: Sat, 2 Apr 2022 13:12:43 +0300
|
||||
Subject: [PATCH] RADIUS ACL/PSK check during 4-way handshake
|
||||
|
||||
Add an alternative sequence for performing the RADIUS ACL check and PSK
|
||||
fetch. The previously used (macaddr_acl=2, wpa_psk_radius=2) combination
|
||||
does this during IEEE 802.11 Authentication frame exchange while the new
|
||||
option (wpa_psk_radius=3) does this during the 4-way handshake. This
|
||||
allows some more information to be provided to the RADIUS authentication
|
||||
server.
|
||||
|
||||
Signed-off-by: Jouni Malinen <j@w1.fi>
|
||||
---
|
||||
hostapd/config_file.c | 3 +-
|
||||
hostapd/hostapd.conf | 5 ++-
|
||||
src/ap/ap_config.c | 4 ++-
|
||||
src/ap/ap_config.h | 5 +--
|
||||
src/ap/ieee802_11.c | 5 ++-
|
||||
src/ap/ieee802_11.h | 2 ++
|
||||
src/ap/ieee802_11_auth.c | 76 ++++++++++++++++++++++++++++++++++++----
|
||||
src/ap/ieee802_11_auth.h | 5 ++-
|
||||
src/ap/wpa_auth.c | 51 ++++++++++++++++++++++++++-
|
||||
src/ap/wpa_auth.h | 9 ++++-
|
||||
src/ap/wpa_auth_glue.c | 25 ++++++++++++-
|
||||
src/ap/wpa_auth_i.h | 1 +
|
||||
12 files changed, 172 insertions(+), 19 deletions(-)
|
||||
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -2858,7 +2858,8 @@ static int hostapd_config_fill(struct ho
|
||||
bss->wpa_psk_radius = atoi(pos);
|
||||
if (bss->wpa_psk_radius != PSK_RADIUS_IGNORED &&
|
||||
bss->wpa_psk_radius != PSK_RADIUS_ACCEPTED &&
|
||||
- bss->wpa_psk_radius != PSK_RADIUS_REQUIRED) {
|
||||
+ bss->wpa_psk_radius != PSK_RADIUS_REQUIRED &&
|
||||
+ bss->wpa_psk_radius != PSK_RADIUS_DURING_4WAY_HS) {
|
||||
wpa_printf(MSG_ERROR,
|
||||
"Line %d: unknown wpa_psk_radius %d",
|
||||
line, bss->wpa_psk_radius);
|
||||
--- a/hostapd/hostapd.conf
|
||||
+++ b/hostapd/hostapd.conf
|
||||
@@ -1635,12 +1635,15 @@ own_ip_addr=127.0.0.1
|
||||
#wpa_psk_file=/etc/hostapd.wpa_psk
|
||||
|
||||
# Optionally, WPA passphrase can be received from RADIUS authentication server
|
||||
-# This requires macaddr_acl to be set to 2 (RADIUS)
|
||||
+# This requires macaddr_acl to be set to 2 (RADIUS) for wpa_psk_radius values
|
||||
+# 1 and 2.
|
||||
# 0 = disabled (default)
|
||||
# 1 = optional; use default passphrase/psk if RADIUS server does not include
|
||||
# Tunnel-Password
|
||||
# 2 = required; reject authentication if RADIUS server does not include
|
||||
# Tunnel-Password
|
||||
+# 3 = ask RADIUS server during 4-way handshake if there is no locally
|
||||
+# configured PSK/passphrase for the STA
|
||||
#wpa_psk_radius=0
|
||||
|
||||
# Set of accepted key management algorithms (WPA-PSK, WPA-EAP, or both). The
|
||||
--- a/src/ap/ap_config.c
|
||||
+++ b/src/ap/ap_config.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* hostapd / Configuration helper functions
|
||||
- * Copyright (c) 2003-2014, Jouni Malinen <j@w1.fi>
|
||||
+ * Copyright (c) 2003-2022, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* This software may be distributed under the terms of the BSD license.
|
||||
* See README for more details.
|
||||
@@ -1245,6 +1245,7 @@ static int hostapd_config_check_bss(stru
|
||||
|
||||
if (full_config && bss->wpa &&
|
||||
bss->wpa_psk_radius != PSK_RADIUS_IGNORED &&
|
||||
+ bss->wpa_psk_radius != PSK_RADIUS_DURING_4WAY_HS &&
|
||||
bss->macaddr_acl != USE_EXTERNAL_RADIUS_AUTH) {
|
||||
wpa_printf(MSG_ERROR, "WPA-PSK using RADIUS enabled, but no "
|
||||
"RADIUS checking (macaddr_acl=2) enabled.");
|
||||
@@ -1254,6 +1255,7 @@ static int hostapd_config_check_bss(stru
|
||||
if (full_config && bss->wpa && (bss->wpa_key_mgmt & WPA_KEY_MGMT_PSK) &&
|
||||
bss->ssid.wpa_psk == NULL && bss->ssid.wpa_passphrase == NULL &&
|
||||
bss->ssid.wpa_psk_file == NULL &&
|
||||
+ bss->wpa_psk_radius != PSK_RADIUS_DURING_4WAY_HS &&
|
||||
(bss->wpa_psk_radius != PSK_RADIUS_REQUIRED ||
|
||||
bss->macaddr_acl != USE_EXTERNAL_RADIUS_AUTH)) {
|
||||
wpa_printf(MSG_ERROR, "WPA-PSK enabled, but PSK or passphrase "
|
||||
--- a/src/ap/ap_config.h
|
||||
+++ b/src/ap/ap_config.h
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* hostapd / Configuration definitions and helpers functions
|
||||
- * Copyright (c) 2003-2015, Jouni Malinen <j@w1.fi>
|
||||
+ * Copyright (c) 2003-2022, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* This software may be distributed under the terms of the BSD license.
|
||||
* See README for more details.
|
||||
@@ -367,7 +367,8 @@ struct hostapd_bss_config {
|
||||
enum {
|
||||
PSK_RADIUS_IGNORED = 0,
|
||||
PSK_RADIUS_ACCEPTED = 1,
|
||||
- PSK_RADIUS_REQUIRED = 2
|
||||
+ PSK_RADIUS_REQUIRED = 2,
|
||||
+ PSK_RADIUS_DURING_4WAY_HS = 3,
|
||||
} wpa_psk_radius;
|
||||
int wpa_pairwise;
|
||||
int group_cipher; /* wpa_group value override from configuation */
|
||||
--- a/src/ap/ieee802_11.c
|
||||
+++ b/src/ap/ieee802_11.c
|
||||
@@ -2348,9 +2348,8 @@ static int ieee802_11_allowed_address(st
|
||||
}
|
||||
|
||||
|
||||
-static int
|
||||
-ieee802_11_set_radius_info(struct hostapd_data *hapd, struct sta_info *sta,
|
||||
- int res, struct radius_sta *info)
|
||||
+int ieee802_11_set_radius_info(struct hostapd_data *hapd, struct sta_info *sta,
|
||||
+ int res, struct radius_sta *info)
|
||||
{
|
||||
u32 session_timeout = info->session_timeout;
|
||||
u32 acct_interim_interval = info->acct_interim_interval;
|
||||
--- a/src/ap/ieee802_11.h
|
||||
+++ b/src/ap/ieee802_11.h
|
||||
@@ -220,4 +220,6 @@ void auth_sae_process_commit(void *eloop
|
||||
u8 * hostapd_eid_rsnxe(struct hostapd_data *hapd, u8 *eid, size_t len);
|
||||
u8 * hostapd_get_rsne(struct hostapd_data *hapd, u8 *pos, size_t len);
|
||||
u8 * hostapd_get_rsnxe(struct hostapd_data *hapd, u8 *pos, size_t len);
|
||||
+int ieee802_11_set_radius_info(struct hostapd_data *hapd, struct sta_info *sta,
|
||||
+ int res, struct radius_sta *info);
|
||||
#endif /* IEEE802_11_H */
|
||||
--- a/src/ap/ieee802_11_auth.c
|
||||
+++ b/src/ap/ieee802_11_auth.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* hostapd / IEEE 802.11 authentication (ACL)
|
||||
- * Copyright (c) 2003-2012, Jouni Malinen <j@w1.fi>
|
||||
+ * Copyright (c) 2003-2022, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* This software may be distributed under the terms of the BSD license.
|
||||
* See README for more details.
|
||||
@@ -20,6 +20,8 @@
|
||||
#include "hostapd.h"
|
||||
#include "ap_config.h"
|
||||
#include "ap_drv_ops.h"
|
||||
+#include "sta_info.h"
|
||||
+#include "wpa_auth.h"
|
||||
#include "ieee802_11.h"
|
||||
#include "ieee802_1x.h"
|
||||
#include "ieee802_11_auth.h"
|
||||
@@ -43,6 +45,8 @@ struct hostapd_acl_query_data {
|
||||
u8 *auth_msg; /* IEEE 802.11 authentication frame from station */
|
||||
size_t auth_msg_len;
|
||||
struct hostapd_acl_query_data *next;
|
||||
+ bool radius_psk;
|
||||
+ int akm;
|
||||
};
|
||||
|
||||
|
||||
@@ -153,6 +157,13 @@ static int hostapd_radius_acl_query(stru
|
||||
goto fail;
|
||||
}
|
||||
|
||||
+ if (query->akm &&
|
||||
+ !radius_msg_add_attr_int32(msg, RADIUS_ATTR_WLAN_AKM_SUITE,
|
||||
+ wpa_akm_to_suite(query->akm))) {
|
||||
+ wpa_printf(MSG_DEBUG, "Could not add WLAN-AKM-Suite");
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
if (radius_client_send(hapd->radius, msg, RADIUS_AUTH, addr) < 0)
|
||||
goto fail;
|
||||
return 0;
|
||||
@@ -566,17 +577,40 @@ hostapd_acl_recv_radius(struct radius_ms
|
||||
cache->next = hapd->acl_cache;
|
||||
hapd->acl_cache = cache;
|
||||
|
||||
+ if (query->radius_psk) {
|
||||
+ struct sta_info *sta;
|
||||
+ bool success = cache->accepted == HOSTAPD_ACL_ACCEPT;
|
||||
+
|
||||
+ sta = ap_get_sta(hapd, query->addr);
|
||||
+ if (!sta || !sta->wpa_sm) {
|
||||
+ wpa_printf(MSG_DEBUG,
|
||||
+ "No STA/SM entry found for the RADIUS PSK response");
|
||||
+ goto done;
|
||||
+ }
|
||||
+#ifdef NEED_AP_MLME
|
||||
+ if (success &&
|
||||
+ (ieee802_11_set_radius_info(hapd, sta, cache->accepted,
|
||||
+ info) < 0 ||
|
||||
+ ap_sta_bind_vlan(hapd, sta) < 0))
|
||||
+ success = false;
|
||||
+#endif /* NEED_AP_MLME */
|
||||
+ wpa_auth_sta_radius_psk_resp(sta->wpa_sm, success);
|
||||
+ } else {
|
||||
#ifdef CONFIG_DRIVER_RADIUS_ACL
|
||||
- hostapd_drv_set_radius_acl_auth(hapd, query->addr, cache->accepted,
|
||||
- info->session_timeout);
|
||||
+ hostapd_drv_set_radius_acl_auth(hapd, query->addr,
|
||||
+ cache->accepted,
|
||||
+ info->session_timeout);
|
||||
#else /* CONFIG_DRIVER_RADIUS_ACL */
|
||||
#ifdef NEED_AP_MLME
|
||||
- /* Re-send original authentication frame for 802.11 processing */
|
||||
- wpa_printf(MSG_DEBUG, "Re-sending authentication frame after "
|
||||
- "successful RADIUS ACL query");
|
||||
- ieee802_11_mgmt(hapd, query->auth_msg, query->auth_msg_len, NULL);
|
||||
+ /* Re-send original authentication frame for 802.11 processing
|
||||
+ */
|
||||
+ wpa_printf(MSG_DEBUG,
|
||||
+ "Re-sending authentication frame after successful RADIUS ACL query");
|
||||
+ ieee802_11_mgmt(hapd, query->auth_msg, query->auth_msg_len,
|
||||
+ NULL);
|
||||
#endif /* NEED_AP_MLME */
|
||||
#endif /* CONFIG_DRIVER_RADIUS_ACL */
|
||||
+ }
|
||||
|
||||
done:
|
||||
if (prev == NULL)
|
||||
@@ -658,3 +692,31 @@ void hostapd_free_psk_list(struct hostap
|
||||
os_free(prev);
|
||||
}
|
||||
}
|
||||
+
|
||||
+
|
||||
+#ifndef CONFIG_NO_RADIUS
|
||||
+void hostapd_acl_req_radius_psk(struct hostapd_data *hapd, const u8 *addr,
|
||||
+ int key_mgmt, const u8 *anonce,
|
||||
+ const u8 *eapol, size_t eapol_len)
|
||||
+{
|
||||
+ struct hostapd_acl_query_data *query;
|
||||
+
|
||||
+ query = os_zalloc(sizeof(*query));
|
||||
+ if (!query)
|
||||
+ return;
|
||||
+
|
||||
+ query->radius_psk = true;
|
||||
+ query->akm = key_mgmt;
|
||||
+ os_get_reltime(&query->timestamp);
|
||||
+ os_memcpy(query->addr, addr, ETH_ALEN);
|
||||
+ if (hostapd_radius_acl_query(hapd, addr, query)) {
|
||||
+ wpa_printf(MSG_DEBUG,
|
||||
+ "Failed to send Access-Request for RADIUS PSK/ACL query");
|
||||
+ hostapd_acl_query_free(query);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ query->next = hapd->acl_queries;
|
||||
+ hapd->acl_queries = query;
|
||||
+}
|
||||
+#endif /* CONFIG_NO_RADIUS */
|
||||
--- a/src/ap/ieee802_11_auth.h
|
||||
+++ b/src/ap/ieee802_11_auth.h
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* hostapd / IEEE 802.11 authentication (ACL)
|
||||
- * Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi>
|
||||
+ * Copyright (c) 2003-2022, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* This software may be distributed under the terms of the BSD license.
|
||||
* See README for more details.
|
||||
@@ -36,5 +36,8 @@ void hostapd_free_psk_list(struct hostap
|
||||
void hostapd_acl_expire(struct hostapd_data *hapd);
|
||||
void hostapd_copy_psk_list(struct hostapd_sta_wpa_psk_short **psk,
|
||||
struct hostapd_sta_wpa_psk_short *src);
|
||||
+void hostapd_acl_req_radius_psk(struct hostapd_data *hapd, const u8 *addr,
|
||||
+ int key_mgmt, const u8 *anonce,
|
||||
+ const u8 *eapol, size_t eapol_len);
|
||||
|
||||
#endif /* IEEE802_11_AUTH_H */
|
||||
--- a/src/ap/wpa_auth.c
|
||||
+++ b/src/ap/wpa_auth.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IEEE 802.11 RSN / WPA Authenticator
|
||||
- * Copyright (c) 2004-2019, Jouni Malinen <j@w1.fi>
|
||||
+ * Copyright (c) 2004-2022, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* This software may be distributed under the terms of the BSD license.
|
||||
* See README for more details.
|
||||
@@ -1465,6 +1465,12 @@ static void wpa_send_eapol_timeout(void
|
||||
struct wpa_authenticator *wpa_auth = eloop_ctx;
|
||||
struct wpa_state_machine *sm = timeout_ctx;
|
||||
|
||||
+ if (sm->waiting_radius_psk) {
|
||||
+ wpa_auth_logger(wpa_auth, sm->addr, LOGGER_DEBUG,
|
||||
+ "Ignore EAPOL-Key timeout while waiting for RADIUS PSK");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
sm->pending_1_of_4_timeout = 0;
|
||||
wpa_auth_logger(wpa_auth, sm->addr, LOGGER_DEBUG, "EAPOL-Key timeout");
|
||||
sm->TimeoutEvt = true;
|
||||
@@ -3003,6 +3009,19 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
|
||||
break;
|
||||
}
|
||||
|
||||
+ if (!ok && wpa_key_mgmt_wpa_psk_no_sae(sm->wpa_key_mgmt) &&
|
||||
+ wpa_auth->conf.radius_psk && wpa_auth->cb->request_radius_psk &&
|
||||
+ !sm->waiting_radius_psk) {
|
||||
+ wpa_printf(MSG_DEBUG, "No PSK available - ask RADIUS server");
|
||||
+ wpa_auth->cb->request_radius_psk(wpa_auth->cb_ctx, sm->addr,
|
||||
+ sm->wpa_key_mgmt,
|
||||
+ sm->ANonce,
|
||||
+ sm->last_rx_eapol_key,
|
||||
+ sm->last_rx_eapol_key_len);
|
||||
+ sm->waiting_radius_psk = 1;
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
if (!ok) {
|
||||
wpa_auth_logger(sm->wpa_auth, sm->addr, LOGGER_DEBUG,
|
||||
"invalid MIC in msg 2/4 of 4-Way Handshake");
|
||||
@@ -3758,6 +3777,11 @@ SM_STEP(WPA_PTK)
|
||||
} else if (wpa_auth_uses_sae(sm) && sm->pmksa) {
|
||||
SM_ENTER(WPA_PTK, PTKSTART);
|
||||
#endif /* CONFIG_SAE */
|
||||
+ } else if (wpa_key_mgmt_wpa_psk_no_sae(sm->wpa_key_mgmt) &&
|
||||
+ wpa_auth->conf.radius_psk) {
|
||||
+ wpa_printf(MSG_DEBUG,
|
||||
+ "INITPSK: No PSK yet available for STA - use RADIUS later");
|
||||
+ SM_ENTER(WPA_PTK, PTKSTART);
|
||||
} else {
|
||||
wpa_auth_logger(wpa_auth, sm->addr, LOGGER_INFO,
|
||||
"no PSK configured for the STA");
|
||||
@@ -5661,3 +5685,28 @@ void wpa_auth_set_ocv_override_freq(stru
|
||||
}
|
||||
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
+
|
||||
+
|
||||
+void wpa_auth_sta_radius_psk_resp(struct wpa_state_machine *sm, bool success)
|
||||
+{
|
||||
+ if (!sm->waiting_radius_psk) {
|
||||
+ wpa_printf(MSG_DEBUG,
|
||||
+ "Ignore RADIUS PSK response for " MACSTR
|
||||
+ " that did not wait one",
|
||||
+ MAC2STR(sm->addr));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ wpa_printf(MSG_DEBUG, "RADIUS PSK response for " MACSTR " (%s)",
|
||||
+ MAC2STR(sm->addr), success ? "success" : "fail");
|
||||
+ sm->waiting_radius_psk = 0;
|
||||
+
|
||||
+ if (success) {
|
||||
+ /* Try to process the EAPOL-Key msg 2/4 again */
|
||||
+ sm->EAPOLKeyReceived = true;
|
||||
+ } else {
|
||||
+ sm->Disconnect = true;
|
||||
+ }
|
||||
+
|
||||
+ eloop_register_timeout(0, 0, wpa_sm_call_step, sm, NULL);
|
||||
+}
|
||||
--- a/src/ap/wpa_auth.h
|
||||
+++ b/src/ap/wpa_auth.h
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* hostapd - IEEE 802.11i-2004 / WPA Authenticator
|
||||
- * Copyright (c) 2004-2017, Jouni Malinen <j@w1.fi>
|
||||
+ * Copyright (c) 2004-2022, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* This software may be distributed under the terms of the BSD license.
|
||||
* See README for more details.
|
||||
@@ -273,6 +273,8 @@ struct wpa_auth_config {
|
||||
* PTK derivation regardless of advertised capabilities.
|
||||
*/
|
||||
bool force_kdk_derivation;
|
||||
+
|
||||
+ bool radius_psk;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
@@ -320,6 +322,9 @@ struct wpa_auth_callbacks {
|
||||
void (*store_ptksa)(void *ctx, const u8 *addr, int cipher,
|
||||
u32 life_time, const struct wpa_ptk *ptk);
|
||||
void (*clear_ptksa)(void *ctx, const u8 *addr, int cipher);
|
||||
+ void (*request_radius_psk)(void *ctx, const u8 *addr, int key_mgmt,
|
||||
+ const u8 *anonce,
|
||||
+ const u8 *eapol, size_t eapol_len);
|
||||
#ifdef CONFIG_IEEE80211R_AP
|
||||
struct wpa_state_machine * (*add_sta)(void *ctx, const u8 *sta_addr);
|
||||
int (*add_sta_ft)(void *ctx, const u8 *sta_addr);
|
||||
@@ -567,4 +572,6 @@ void wpa_auth_set_ocv_override_freq(stru
|
||||
enum wpa_auth_ocv_override_frame frame,
|
||||
unsigned int freq);
|
||||
|
||||
+void wpa_auth_sta_radius_psk_resp(struct wpa_state_machine *sm, bool success);
|
||||
+
|
||||
#endif /* WPA_AUTH_H */
|
||||
--- a/src/ap/wpa_auth_glue.c
|
||||
+++ b/src/ap/wpa_auth_glue.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* hostapd / WPA authenticator glue code
|
||||
- * Copyright (c) 2002-2012, Jouni Malinen <j@w1.fi>
|
||||
+ * Copyright (c) 2002-2022, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* This software may be distributed under the terms of the BSD license.
|
||||
* See README for more details.
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "ap_drv_ops.h"
|
||||
#include "ap_config.h"
|
||||
#include "ieee802_11.h"
|
||||
+#include "ieee802_11_auth.h"
|
||||
#include "pmksa_cache_auth.h"
|
||||
#include "wpa_auth.h"
|
||||
#include "wpa_auth_glue.h"
|
||||
@@ -214,6 +215,8 @@ static void hostapd_wpa_auth_conf(struct
|
||||
wconf->force_kdk_derivation = conf->force_kdk_derivation;
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
#endif /* CONFIG_PASN */
|
||||
+
|
||||
+ wconf->radius_psk = conf->wpa_psk_radius == PSK_RADIUS_DURING_4WAY_HS;
|
||||
}
|
||||
|
||||
|
||||
@@ -1435,6 +1438,23 @@ static void hostapd_wpa_unregister_ft_ou
|
||||
#endif /* CONFIG_IEEE80211R_AP */
|
||||
|
||||
|
||||
+#ifndef CONFIG_NO_RADIUS
|
||||
+static void hostapd_request_radius_psk(void *ctx, const u8 *addr, int key_mgmt,
|
||||
+ const u8 *anonce,
|
||||
+ const u8 *eapol, size_t eapol_len)
|
||||
+{
|
||||
+ struct hostapd_data *hapd = ctx;
|
||||
+
|
||||
+ wpa_printf(MSG_DEBUG, "RADIUS PSK request for " MACSTR " key_mgmt=0x%x",
|
||||
+ MAC2STR(addr), key_mgmt);
|
||||
+ wpa_hexdump(MSG_DEBUG, "ANonce", anonce, WPA_NONCE_LEN);
|
||||
+ wpa_hexdump(MSG_DEBUG, "EAPOL", eapol, eapol_len);
|
||||
+ hostapd_acl_req_radius_psk(hapd, addr, key_mgmt, anonce, eapol,
|
||||
+ eapol_len);
|
||||
+}
|
||||
+#endif /* CONFIG_NO_RADIUS */
|
||||
+
|
||||
+
|
||||
int hostapd_setup_wpa(struct hostapd_data *hapd)
|
||||
{
|
||||
struct wpa_auth_config _conf;
|
||||
@@ -1478,6 +1498,9 @@ int hostapd_setup_wpa(struct hostapd_dat
|
||||
.set_session_timeout = hostapd_wpa_auth_set_session_timeout,
|
||||
.get_session_timeout = hostapd_wpa_auth_get_session_timeout,
|
||||
#endif /* CONFIG_IEEE80211R_AP */
|
||||
+#ifndef CONFIG_NO_RADIUS
|
||||
+ .request_radius_psk = hostapd_request_radius_psk,
|
||||
+#endif /* CONFIG_NO_RADIUS */
|
||||
};
|
||||
const u8 *wpa_ie;
|
||||
size_t wpa_ie_len;
|
||||
--- a/src/ap/wpa_auth_i.h
|
||||
+++ b/src/ap/wpa_auth_i.h
|
||||
@@ -89,6 +89,7 @@ struct wpa_state_machine {
|
||||
unsigned int rx_eapol_key_secure:1;
|
||||
unsigned int update_snonce:1;
|
||||
unsigned int alt_snonce_valid:1;
|
||||
+ unsigned int waiting_radius_psk:1;
|
||||
#ifdef CONFIG_IEEE80211R_AP
|
||||
unsigned int ft_completed:1;
|
||||
unsigned int pmk_r1_name_valid:1;
|
||||
@@ -0,0 +1,350 @@
|
||||
From 24763e3cd0a564eb71f3c501bbb4fbb0d7070762 Mon Sep 17 00:00:00 2001
|
||||
From: Jouni Malinen <j@w1.fi>
|
||||
Date: Fri, 15 Apr 2022 17:31:48 +0300
|
||||
Subject: [PATCH] RADIUS: Attributes with Extended Types (RFC 6929)
|
||||
|
||||
Supported extended types for RADIUS attributes for the cases defined in
|
||||
RFC 6929.
|
||||
|
||||
Signed-off-by: Jouni Malinen <j@w1.fi>
|
||||
---
|
||||
src/radius/radius.c | 195 ++++++++++++++++++++++++++++++++++++++------
|
||||
src/radius/radius.h | 26 +++++-
|
||||
2 files changed, 193 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/src/radius/radius.c b/src/radius/radius.c
|
||||
index be16e27b9..a64228067 100644
|
||||
--- a/src/radius/radius.c
|
||||
+++ b/src/radius/radius.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* RADIUS message processing
|
||||
- * Copyright (c) 2002-2009, 2011-2015, Jouni Malinen <j@w1.fi>
|
||||
+ * Copyright (c) 2002-2009, 2011-2022, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* This software may be distributed under the terms of the BSD license.
|
||||
* See README for more details.
|
||||
@@ -159,7 +159,8 @@ static const char *radius_code_string(u8 code)
|
||||
|
||||
|
||||
struct radius_attr_type {
|
||||
- u8 type;
|
||||
+ u16 type; /* 0..255 for basic types;
|
||||
+ * (241 << 8) | <ext-type> for extended types */
|
||||
char *name;
|
||||
enum {
|
||||
RADIUS_ATTR_UNDIST, RADIUS_ATTR_TEXT, RADIUS_ATTR_IP,
|
||||
@@ -260,11 +261,31 @@ static const struct radius_attr_type radius_attrs[] =
|
||||
RADIUS_ATTR_HEXDUMP },
|
||||
{ RADIUS_ATTR_WLAN_GROUP_MGMT_CIPHER, "WLAN-Group-Mgmt-Pairwise-Cipher",
|
||||
RADIUS_ATTR_HEXDUMP },
|
||||
+ { RADIUS_ATTR_EXT_TYPE_1, "Extended-Type-1", RADIUS_ATTR_UNDIST },
|
||||
+ { RADIUS_ATTR_EXT_TYPE_2, "Extended-Type-2", RADIUS_ATTR_UNDIST },
|
||||
+ { RADIUS_ATTR_EXT_TYPE_3, "Extended-Type-3", RADIUS_ATTR_UNDIST },
|
||||
+ { RADIUS_ATTR_EXT_TYPE_4, "Extended-Type-4", RADIUS_ATTR_UNDIST },
|
||||
+ { RADIUS_ATTR_LONG_EXT_TYPE_1, "Long-Extended-Type-1",
|
||||
+ RADIUS_ATTR_UNDIST },
|
||||
+ { RADIUS_ATTR_LONG_EXT_TYPE_2, "Long-Extended-Type-2",
|
||||
+ RADIUS_ATTR_UNDIST },
|
||||
+ { RADIUS_ATTR_EXT_VENDOR_SPECIFIC_1, "Extended-Vendor-Specific-1",
|
||||
+ RADIUS_ATTR_UNDIST },
|
||||
+ { RADIUS_ATTR_EXT_VENDOR_SPECIFIC_2, "Extended-Vendor-Specific-2",
|
||||
+ RADIUS_ATTR_UNDIST },
|
||||
+ { RADIUS_ATTR_EXT_VENDOR_SPECIFIC_3, "Extended-Vendor-Specific-3",
|
||||
+ RADIUS_ATTR_UNDIST },
|
||||
+ { RADIUS_ATTR_EXT_VENDOR_SPECIFIC_4, "Extended-Vendor-Specific-4",
|
||||
+ RADIUS_ATTR_UNDIST },
|
||||
+ { RADIUS_ATTR_EXT_VENDOR_SPECIFIC_5, "Extended-Vendor-Specific-5",
|
||||
+ RADIUS_ATTR_UNDIST },
|
||||
+ { RADIUS_ATTR_EXT_VENDOR_SPECIFIC_6, "Extended-Vendor-Specific-6",
|
||||
+ RADIUS_ATTR_UNDIST },
|
||||
};
|
||||
#define RADIUS_ATTRS ARRAY_SIZE(radius_attrs)
|
||||
|
||||
|
||||
-static const struct radius_attr_type *radius_get_attr_type(u8 type)
|
||||
+static const struct radius_attr_type * radius_get_attr_type(u16 type)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
@@ -277,23 +298,60 @@ static const struct radius_attr_type *radius_get_attr_type(u8 type)
|
||||
}
|
||||
|
||||
|
||||
+static bool radius_is_long_ext_type(u8 type)
|
||||
+{
|
||||
+ return type == RADIUS_ATTR_LONG_EXT_TYPE_1 ||
|
||||
+ type == RADIUS_ATTR_LONG_EXT_TYPE_2;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static bool radius_is_ext_type(u8 type)
|
||||
+{
|
||||
+ return type >= RADIUS_ATTR_EXT_TYPE_1 &&
|
||||
+ type <= RADIUS_ATTR_LONG_EXT_TYPE_2;
|
||||
+}
|
||||
+
|
||||
+
|
||||
static void radius_msg_dump_attr(struct radius_attr_hdr *hdr)
|
||||
{
|
||||
+ struct radius_attr_hdr_ext *ext = NULL;
|
||||
const struct radius_attr_type *attr;
|
||||
int len;
|
||||
unsigned char *pos;
|
||||
char buf[1000];
|
||||
|
||||
- attr = radius_get_attr_type(hdr->type);
|
||||
+ if (hdr->length < sizeof(struct radius_attr_hdr))
|
||||
+ return;
|
||||
|
||||
- wpa_printf(MSG_INFO, " Attribute %d (%s) length=%d",
|
||||
- hdr->type, attr ? attr->name : "?Unknown?", hdr->length);
|
||||
+ if (radius_is_ext_type(hdr->type)) {
|
||||
+ if (hdr->length < 4) {
|
||||
+ wpa_printf(MSG_INFO,
|
||||
+ " Invalid attribute %d (too short for extended type)",
|
||||
+ hdr->type);
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
- if (attr == NULL || hdr->length < sizeof(struct radius_attr_hdr))
|
||||
- return;
|
||||
+ ext = (struct radius_attr_hdr_ext *) hdr;
|
||||
+ }
|
||||
+
|
||||
+ if (ext) {
|
||||
+ attr = radius_get_attr_type((ext->type << 8) | ext->ext_type);
|
||||
+ wpa_printf(MSG_INFO, " Attribute %d.%d (%s) length=%d",
|
||||
+ ext->type, ext->ext_type,
|
||||
+ attr ? attr->name : "?Unknown?", ext->length);
|
||||
+ pos = (unsigned char *) (ext + 1);
|
||||
+ len = ext->length - sizeof(struct radius_attr_hdr_ext);
|
||||
+ } else {
|
||||
+ attr = radius_get_attr_type(hdr->type);
|
||||
+ wpa_printf(MSG_INFO, " Attribute %d (%s) length=%d",
|
||||
+ hdr->type, attr ? attr->name : "?Unknown?",
|
||||
+ hdr->length);
|
||||
+ pos = (unsigned char *) (hdr + 1);
|
||||
+ len = hdr->length - sizeof(struct radius_attr_hdr);
|
||||
+ }
|
||||
|
||||
- len = hdr->length - sizeof(struct radius_attr_hdr);
|
||||
- pos = (unsigned char *) (hdr + 1);
|
||||
+ if (!attr)
|
||||
+ return;
|
||||
|
||||
switch (attr->data_type) {
|
||||
case RADIUS_ATTR_TEXT:
|
||||
@@ -627,22 +685,54 @@ static int radius_msg_add_attr_to_array(struct radius_msg *msg,
|
||||
}
|
||||
|
||||
|
||||
-struct radius_attr_hdr *radius_msg_add_attr(struct radius_msg *msg, u8 type,
|
||||
- const u8 *data, size_t data_len)
|
||||
+struct radius_attr_hdr * radius_msg_add_attr(struct radius_msg *msg, u16 type,
|
||||
+ const u8 *data, size_t data_len)
|
||||
{
|
||||
- size_t buf_needed;
|
||||
- struct radius_attr_hdr *attr;
|
||||
+ size_t buf_needed, max_len;
|
||||
+ struct radius_attr_hdr *attr = NULL;
|
||||
+ struct radius_attr_hdr_ext *ext;
|
||||
+ u8 ext_type = 0;
|
||||
|
||||
if (TEST_FAIL())
|
||||
return NULL;
|
||||
|
||||
- if (data_len > RADIUS_MAX_ATTR_LEN) {
|
||||
- wpa_printf(MSG_ERROR, "radius_msg_add_attr: too long attribute (%lu bytes)",
|
||||
- (unsigned long) data_len);
|
||||
- return NULL;
|
||||
+ if (type > 255) {
|
||||
+ if (!radius_is_ext_type(type >> 8)) {
|
||||
+ wpa_printf(MSG_ERROR,
|
||||
+ "%s: Undefined extended type %d.%d",
|
||||
+ __func__, type >> 8, type & 0xff);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ ext_type = type & 0xff;
|
||||
+ type >>= 8;
|
||||
+ } else if (radius_is_ext_type(type)) {
|
||||
+ wpa_printf(MSG_ERROR, "%s: Unexpected extended type use for %d",
|
||||
+ __func__, type);
|
||||
}
|
||||
|
||||
- buf_needed = sizeof(*attr) + data_len;
|
||||
+ if (radius_is_long_ext_type(type)) {
|
||||
+ size_t hdr_len = sizeof(struct radius_attr_hdr_ext) + 1;
|
||||
+ size_t plen = 255 - hdr_len;
|
||||
+ size_t num;
|
||||
+
|
||||
+ max_len = 4096;
|
||||
+ num = (data_len + plen - 1) / plen;
|
||||
+ if (num == 0)
|
||||
+ num = 1;
|
||||
+ buf_needed = num * hdr_len + data_len;
|
||||
+ } else if (radius_is_ext_type(type)) {
|
||||
+ max_len = RADIUS_MAX_EXT_ATTR_LEN;
|
||||
+ buf_needed = sizeof(struct radius_attr_hdr_ext) + data_len;
|
||||
+ } else {
|
||||
+ max_len = RADIUS_MAX_ATTR_LEN;
|
||||
+ buf_needed = sizeof(*attr) + data_len;
|
||||
+ }
|
||||
+ if (data_len > max_len) {
|
||||
+ wpa_printf(MSG_ERROR,
|
||||
+ "%s: too long attribute (%zu > %zu bytes)",
|
||||
+ __func__, data_len, max_len);
|
||||
+ return NULL;
|
||||
+ }
|
||||
|
||||
if (wpabuf_tailroom(msg->buf) < buf_needed) {
|
||||
/* allocate more space for message buffer */
|
||||
@@ -651,13 +741,44 @@ struct radius_attr_hdr *radius_msg_add_attr(struct radius_msg *msg, u8 type,
|
||||
msg->hdr = wpabuf_mhead(msg->buf);
|
||||
}
|
||||
|
||||
- attr = wpabuf_put(msg->buf, sizeof(struct radius_attr_hdr));
|
||||
- attr->type = type;
|
||||
- attr->length = sizeof(*attr) + data_len;
|
||||
- wpabuf_put_data(msg->buf, data, data_len);
|
||||
-
|
||||
- if (radius_msg_add_attr_to_array(msg, attr))
|
||||
- return NULL;
|
||||
+ if (radius_is_long_ext_type(type)) {
|
||||
+ size_t plen = 255 - sizeof(struct radius_attr_hdr_ext) - 1;
|
||||
+ size_t alen;
|
||||
+
|
||||
+ do {
|
||||
+ alen = data_len > plen ? plen : data_len;
|
||||
+ ext = wpabuf_put(msg->buf,
|
||||
+ sizeof(struct radius_attr_hdr_ext));
|
||||
+ if (!attr)
|
||||
+ attr = (struct radius_attr_hdr *) ext;
|
||||
+ ext->type = type;
|
||||
+ ext->length = sizeof(*ext) + 1 + alen;
|
||||
+ ext->ext_type = ext_type;
|
||||
+ wpabuf_put_u8(msg->buf, data_len > alen ? 0x80 : 0);
|
||||
+ wpabuf_put_data(msg->buf, data, data_len);
|
||||
+ data += alen;
|
||||
+ data_len -= alen;
|
||||
+ if (radius_msg_add_attr_to_array(
|
||||
+ msg, (struct radius_attr_hdr *) ext))
|
||||
+ return NULL;
|
||||
+ } while (data_len > 0);
|
||||
+ } else if (radius_is_ext_type(type)) {
|
||||
+ ext = wpabuf_put(msg->buf, sizeof(struct radius_attr_hdr_ext));
|
||||
+ attr = (struct radius_attr_hdr *) ext;
|
||||
+ ext->type = type;
|
||||
+ ext->length = sizeof(*ext) + data_len;
|
||||
+ ext->ext_type = ext_type;
|
||||
+ wpabuf_put_data(msg->buf, data, data_len);
|
||||
+ if (radius_msg_add_attr_to_array(msg, attr))
|
||||
+ return NULL;
|
||||
+ } else {
|
||||
+ attr = wpabuf_put(msg->buf, sizeof(struct radius_attr_hdr));
|
||||
+ attr->type = type;
|
||||
+ attr->length = sizeof(*attr) + data_len;
|
||||
+ wpabuf_put_data(msg->buf, data, data_len);
|
||||
+ if (radius_msg_add_attr_to_array(msg, attr))
|
||||
+ return NULL;
|
||||
+ }
|
||||
|
||||
return attr;
|
||||
}
|
||||
@@ -1285,6 +1406,28 @@ int radius_msg_add_wfa(struct radius_msg *msg, u8 subtype, const u8 *data,
|
||||
}
|
||||
|
||||
|
||||
+int radius_msg_add_ext_vs(struct radius_msg *msg, u16 type, u32 vendor_id,
|
||||
+ u8 vendor_type, const u8 *data, size_t len)
|
||||
+{
|
||||
+ struct radius_attr_hdr *attr;
|
||||
+ u8 *buf, *pos;
|
||||
+ size_t alen;
|
||||
+
|
||||
+ alen = 4 + 1 + len;
|
||||
+ buf = os_malloc(alen);
|
||||
+ if (!buf)
|
||||
+ return 0;
|
||||
+ pos = buf;
|
||||
+ WPA_PUT_BE32(pos, vendor_id);
|
||||
+ pos += 4;
|
||||
+ *pos++ = vendor_type;
|
||||
+ os_memcpy(pos, data, len);
|
||||
+ attr = radius_msg_add_attr(msg, type, buf, alen);
|
||||
+ os_free(buf);
|
||||
+ return attr != NULL;
|
||||
+}
|
||||
+
|
||||
+
|
||||
int radius_user_password_hide(struct radius_msg *msg,
|
||||
const u8 *data, size_t data_len,
|
||||
const u8 *secret, size_t secret_len,
|
||||
diff --git a/src/radius/radius.h b/src/radius/radius.h
|
||||
index fb8148180..490c8d1f6 100644
|
||||
--- a/src/radius/radius.h
|
||||
+++ b/src/radius/radius.h
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* RADIUS message processing
|
||||
- * Copyright (c) 2002-2009, 2012, 2014-2015, Jouni Malinen <j@w1.fi>
|
||||
+ * Copyright (c) 2002-2009, 2012, 2014-2022, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* This software may be distributed under the terms of the BSD license.
|
||||
* See README for more details.
|
||||
@@ -46,7 +46,15 @@ struct radius_attr_hdr {
|
||||
/* followed by length-2 octets of attribute value */
|
||||
} STRUCT_PACKED;
|
||||
|
||||
+struct radius_attr_hdr_ext {
|
||||
+ u8 type;
|
||||
+ u8 length; /* including this header */
|
||||
+ u8 ext_type;
|
||||
+ /* followed by length-3 octets of attribute value */
|
||||
+} STRUCT_PACKED;
|
||||
+
|
||||
#define RADIUS_MAX_ATTR_LEN (255 - sizeof(struct radius_attr_hdr))
|
||||
+#define RADIUS_MAX_EXT_ATTR_LEN (255 - sizeof(struct radius_attr_hdr_ext))
|
||||
|
||||
enum { RADIUS_ATTR_USER_NAME = 1,
|
||||
RADIUS_ATTR_USER_PASSWORD = 2,
|
||||
@@ -113,6 +121,18 @@ enum { RADIUS_ATTR_USER_NAME = 1,
|
||||
RADIUS_ATTR_WLAN_GROUP_CIPHER = 187,
|
||||
RADIUS_ATTR_WLAN_AKM_SUITE = 188,
|
||||
RADIUS_ATTR_WLAN_GROUP_MGMT_CIPHER = 189,
|
||||
+ RADIUS_ATTR_EXT_TYPE_1 = 241,
|
||||
+ RADIUS_ATTR_EXT_TYPE_2 = 242,
|
||||
+ RADIUS_ATTR_EXT_TYPE_3 = 243,
|
||||
+ RADIUS_ATTR_EXT_TYPE_4 = 244,
|
||||
+ RADIUS_ATTR_LONG_EXT_TYPE_1 = 245,
|
||||
+ RADIUS_ATTR_LONG_EXT_TYPE_2 = 246,
|
||||
+ RADIUS_ATTR_EXT_VENDOR_SPECIFIC_1 = (241 << 8) | 26,
|
||||
+ RADIUS_ATTR_EXT_VENDOR_SPECIFIC_2 = (242 << 8) | 26,
|
||||
+ RADIUS_ATTR_EXT_VENDOR_SPECIFIC_3 = (243 << 8) | 26,
|
||||
+ RADIUS_ATTR_EXT_VENDOR_SPECIFIC_4 = (244 << 8) | 26,
|
||||
+ RADIUS_ATTR_EXT_VENDOR_SPECIFIC_5 = (245 << 8) | 26,
|
||||
+ RADIUS_ATTR_EXT_VENDOR_SPECIFIC_6 = (246 << 8) | 26,
|
||||
};
|
||||
|
||||
|
||||
@@ -257,7 +277,7 @@ int radius_msg_verify_acct_req(struct radius_msg *msg, const u8 *secret,
|
||||
int radius_msg_verify_das_req(struct radius_msg *msg, const u8 *secret,
|
||||
size_t secret_len,
|
||||
int require_message_authenticator);
|
||||
-struct radius_attr_hdr * radius_msg_add_attr(struct radius_msg *msg, u8 type,
|
||||
+struct radius_attr_hdr * radius_msg_add_attr(struct radius_msg *msg, u16 type,
|
||||
const u8 *data, size_t data_len);
|
||||
struct radius_msg * radius_msg_parse(const u8 *data, size_t len);
|
||||
int radius_msg_add_eap(struct radius_msg *msg, const u8 *data,
|
||||
@@ -284,6 +304,8 @@ int radius_msg_add_mppe_keys(struct radius_msg *msg,
|
||||
const u8 *recv_key, size_t recv_key_len);
|
||||
int radius_msg_add_wfa(struct radius_msg *msg, u8 subtype, const u8 *data,
|
||||
size_t len);
|
||||
+int radius_msg_add_ext_vs(struct radius_msg *msg, u16 type, u32 vendor_id,
|
||||
+ u8 vendor_type, const u8 *data, size_t len);
|
||||
int radius_user_password_hide(struct radius_msg *msg,
|
||||
const u8 *data, size_t data_len,
|
||||
const u8 *secret, size_t secret_len,
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
From b94371af8402f60218716552e571ca72cff4e3c0 Mon Sep 17 00:00:00 2001
|
||||
From: Jouni Malinen <j@w1.fi>
|
||||
Date: Fri, 15 Apr 2022 17:36:25 +0300
|
||||
Subject: [PATCH] RADIUS attributes for EAPOL-Key message details
|
||||
|
||||
Use vendor specific RADIUS attributes for sending ANonce and EAPOL-Key
|
||||
msg 2/4 for the wpa_psk_radius=3 case. The vendor specific attributes
|
||||
for this are defined in FreeRADIUS as follows:
|
||||
|
||||
BEGIN-VENDOR FreeRADIUS format=Extended-Vendor-Specific-5
|
||||
ATTRIBUTE FreeRADIUS-802.1X-Anonce 1 octets[32]
|
||||
ATTRIBUTE FreeRADIUS-802.1X-EAPoL-Key-Msg 2 octets
|
||||
END-VENDOR FreeRADIUS
|
||||
|
||||
Signed-off-by: Jouni Malinen <j@w1.fi>
|
||||
---
|
||||
src/ap/ieee802_11_auth.c | 29 +++++++++++++++++++++++++++++
|
||||
src/radius/radius.h | 7 +++++++
|
||||
2 files changed, 36 insertions(+)
|
||||
|
||||
diff --git a/src/ap/ieee802_11_auth.c b/src/ap/ieee802_11_auth.c
|
||||
index a54d7616e..4277d82cb 100644
|
||||
--- a/src/ap/ieee802_11_auth.c
|
||||
+++ b/src/ap/ieee802_11_auth.c
|
||||
@@ -47,6 +47,9 @@ struct hostapd_acl_query_data {
|
||||
struct hostapd_acl_query_data *next;
|
||||
bool radius_psk;
|
||||
int akm;
|
||||
+ u8 *anonce;
|
||||
+ u8 *eapol;
|
||||
+ size_t eapol_len;
|
||||
};
|
||||
|
||||
|
||||
@@ -102,6 +105,8 @@ static void hostapd_acl_query_free(struct hostapd_acl_query_data *query)
|
||||
if (!query)
|
||||
return;
|
||||
os_free(query->auth_msg);
|
||||
+ os_free(query->anonce);
|
||||
+ os_free(query->eapol);
|
||||
os_free(query);
|
||||
}
|
||||
|
||||
@@ -164,6 +169,24 @@ static int hostapd_radius_acl_query(struct hostapd_data *hapd, const u8 *addr,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
+ if (query->anonce &&
|
||||
+ !radius_msg_add_ext_vs(msg, RADIUS_ATTR_EXT_VENDOR_SPECIFIC_5,
|
||||
+ RADIUS_VENDOR_ID_FREERADIUS,
|
||||
+ RADIUS_VENDOR_ATTR_FREERADIUS_802_1X_ANONCE,
|
||||
+ query->anonce, WPA_NONCE_LEN)) {
|
||||
+ wpa_printf(MSG_DEBUG, "Could not add FreeRADIUS-802.1X-Anonce");
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+ if (query->eapol &&
|
||||
+ !radius_msg_add_ext_vs(msg, RADIUS_ATTR_EXT_VENDOR_SPECIFIC_5,
|
||||
+ RADIUS_VENDOR_ID_FREERADIUS,
|
||||
+ RADIUS_VENDOR_ATTR_FREERADIUS_802_1X_EAPOL_KEY_MSG,
|
||||
+ query->eapol, query->eapol_len)) {
|
||||
+ wpa_printf(MSG_DEBUG, "Could not add FreeRADIUS-802.1X-EAPoL-Key-Msg");
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
if (radius_client_send(hapd->radius, msg, RADIUS_AUTH, addr) < 0)
|
||||
goto fail;
|
||||
return 0;
|
||||
@@ -703,6 +726,12 @@ void hostapd_acl_req_radius_psk(struct hostapd_data *hapd, const u8 *addr,
|
||||
query->akm = key_mgmt;
|
||||
os_get_reltime(&query->timestamp);
|
||||
os_memcpy(query->addr, addr, ETH_ALEN);
|
||||
+ if (anonce)
|
||||
+ query->anonce = os_memdup(anonce, WPA_NONCE_LEN);
|
||||
+ if (eapol) {
|
||||
+ query->eapol = os_memdup(eapol, eapol_len);
|
||||
+ query->eapol_len = eapol_len;
|
||||
+ }
|
||||
if (hostapd_radius_acl_query(hapd, addr, query)) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"Failed to send Access-Request for RADIUS PSK/ACL query");
|
||||
diff --git a/src/radius/radius.h b/src/radius/radius.h
|
||||
index 490c8d1f6..177c64a66 100644
|
||||
--- a/src/radius/radius.h
|
||||
+++ b/src/radius/radius.h
|
||||
@@ -208,6 +208,13 @@ enum { RADIUS_VENDOR_ATTR_MS_MPPE_SEND_KEY = 16,
|
||||
RADIUS_VENDOR_ATTR_MS_MPPE_RECV_KEY = 17
|
||||
};
|
||||
|
||||
+/* FreeRADIUS vendor-specific attributes */
|
||||
+#define RADIUS_VENDOR_ID_FREERADIUS 11344
|
||||
+/* Extended-Vendor-Specific-5 (245.26; long extended header) */
|
||||
+enum {
|
||||
+ RADIUS_VENDOR_ATTR_FREERADIUS_802_1X_ANONCE = 1,
|
||||
+ RADIUS_VENDOR_ATTR_FREERADIUS_802_1X_EAPOL_KEY_MSG = 2,
|
||||
+};
|
||||
|
||||
/* Hotspot 2.0 - WFA Vendor-specific RADIUS Attributes */
|
||||
#define RADIUS_VENDOR_ID_WFA 40808
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
--- a/src/ap/ieee802_11_auth.c
|
||||
+++ b/src/ap/ieee802_11_auth.c
|
||||
@@ -578,6 +578,8 @@ hostapd_acl_recv_radius(struct radius_ms
|
||||
os_memcpy(info->radius_cui, buf, len);
|
||||
}
|
||||
|
||||
+ radius_msg_get_wispr(msg, info->bandwidth);
|
||||
+
|
||||
if (hapd->conf->wpa_psk_radius == PSK_RADIUS_REQUIRED &&
|
||||
!info->psk)
|
||||
cache->accepted = HOSTAPD_ACL_REJECT;
|
||||
--- a/src/ap/ieee802_11_auth.h
|
||||
+++ b/src/ap/ieee802_11_auth.h
|
||||
@@ -23,6 +23,7 @@ struct radius_sta {
|
||||
struct hostapd_sta_wpa_psk_short *psk;
|
||||
char *identity;
|
||||
char *radius_cui;
|
||||
+ u32 bandwidth[2];
|
||||
};
|
||||
|
||||
int hostapd_check_acl(struct hostapd_data *hapd, const u8 *addr,
|
||||
--- a/src/ap/ieee802_11.c
|
||||
+++ b/src/ap/ieee802_11.c
|
||||
@@ -2406,6 +2406,8 @@ int ieee802_11_set_radius_info(struct ho
|
||||
ap_sta_no_session_timeout(hapd, sta);
|
||||
}
|
||||
|
||||
+ os_memcpy(sta->bandwidth, info->bandwidth, sizeof(sta->bandwidth));
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1958,6 +1958,9 @@ void hostapd_ubus_notify_radar_detected(struct hostapd_iface *iface, int frequen
|
||||
struct hostapd_data *hapd;
|
||||
int i;
|
||||
|
||||
if (!ctx)
|
||||
return;
|
||||
|
||||
blob_buf_init(&b, 0);
|
||||
blobmsg_add_u16(&b, "frequency", frequency);
|
||||
blobmsg_add_u16(&b, "width", chan_width);
|
||||
|
||||
@@ -20,7 +20,7 @@ DEFAULT_PACKAGES += kmod-qca-nss-dp kmod-qca-ssdk swconfig \
|
||||
kmod-usb-phy-ipq5018 kmod-usb-dwc3-qcom-internal \
|
||||
kmod-ath11k-ahb ath11k-firmware-ipq5018 \
|
||||
kmod-gpio-button-hotplug iwinfo \
|
||||
qca-ssdk-shell \
|
||||
qca-ssdk-shell kmod-bootconfig \
|
||||
uboot-envtools -procd-ujail
|
||||
|
||||
$(eval $(call BuildTarget))
|
||||
|
||||
@@ -18,6 +18,7 @@ edgecore,oap101e|\
|
||||
edgecore,oap101e-6e)
|
||||
ucidef_set_led_netdev "wan" "wan" "red:ethernet" "eth1"
|
||||
;;
|
||||
hfcl,ion4x_w|\
|
||||
hfcl,ion4xi_w)
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wifi5" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wifi2" "phy1tpt"
|
||||
|
||||
@@ -18,6 +18,13 @@ qcom_setup_interfaces()
|
||||
cig,wf186h)
|
||||
ucidef_add_switch "switch0" "4:wan" "1:lan" "2:lan" "6@eth0"
|
||||
;;
|
||||
cybertan,eww631-a1)
|
||||
ucidef_set_interface_wan "eth0"
|
||||
ucidef_set_interface_lan ""
|
||||
;;
|
||||
cybertan,eww631-b1)
|
||||
ucidef_add_switch "switch1" "5:wan" "2:lan" "3:lan" "4:lan" "6@eth0"
|
||||
;;
|
||||
edgecore,oap101|\
|
||||
edgecore,oap101-6e|\
|
||||
edgecore,oap101e|\
|
||||
@@ -30,6 +37,7 @@ qcom_setup_interfaces()
|
||||
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"
|
||||
;;
|
||||
@@ -62,6 +70,18 @@ qcom_setup_macs()
|
||||
ucidef_set_network_device_mac eth0 $wan_mac
|
||||
ip link set eth0 address $wan_mac
|
||||
;;
|
||||
cybertan,eww631-a1|\
|
||||
cybertan,eww631-b1)
|
||||
mtd=$(find_mtd_chardev "0:APPSBLENV")
|
||||
[ -z "$mtd" ] && return;
|
||||
mac=$(grep BaseMacAddress= $mtd | cut -d '=' -f2)
|
||||
[ -z "$mac" ] && return;
|
||||
wan_mac=$(macaddr_canonicalize $mac)
|
||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
ucidef_set_network_device_mac eth0 $wan_mac
|
||||
ip link set eth0 address $wan_mac
|
||||
ucidef_set_label_macaddr $wan_mac
|
||||
;;
|
||||
*)
|
||||
wan_mac=$(cat /sys/class/net/eth0/address)
|
||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
|
||||
@@ -39,6 +39,28 @@ ath11k_generate_macs_ion4x() {
|
||||
echo -ne \\x${wifimac2//:/\\x} >> /lib/firmware/ath11k-macs
|
||||
}
|
||||
|
||||
ath11k_generate_macs_eww631_a1() {
|
||||
touch /lib/firmware/ath11k-macs
|
||||
local dev=$(find_mtd_chardev "0:APPSBLENV")
|
||||
mac=$(grep BaseMacAddress= $dev | cut -d '=' -f2)
|
||||
eth=$(macaddr_canonicalize $mac)
|
||||
mac1=$(macaddr_add $eth 1)
|
||||
mac2=$(macaddr_add $eth 2)
|
||||
echo -ne \\x${mac1//:/\\x} >> /lib/firmware/ath11k-macs
|
||||
echo -ne \\x${mac2//:/\\x} >> /lib/firmware/ath11k-macs
|
||||
}
|
||||
|
||||
ath11k_generate_macs_eww631_b1() {
|
||||
touch /lib/firmware/ath11k-macs
|
||||
local dev=$(find_mtd_chardev "0:APPSBLENV")
|
||||
mac=$(grep BaseMacAddress= $dev | cut -d '=' -f2)
|
||||
eth=$(macaddr_canonicalize $mac)
|
||||
mac1=$(macaddr_add $eth 2)
|
||||
mac2=$(macaddr_add $eth 3)
|
||||
echo -ne \\x${mac1//:/\\x} >> /lib/firmware/ath11k-macs
|
||||
echo -ne \\x${mac2//:/\\x} >> /lib/firmware/ath11k-macs
|
||||
}
|
||||
|
||||
caldata_die() {
|
||||
echo "caldata: " "$*"
|
||||
exit 1
|
||||
@@ -64,11 +86,14 @@ ath11k/IPQ5018/hw1.0/caldata.bin)
|
||||
case "$board" in
|
||||
cig,wf186w|\
|
||||
cig,wf186h|\
|
||||
cybertan,eww631-a1|\
|
||||
cybertan,eww631-b1|\
|
||||
edgecore,eap104|\
|
||||
edgecore,oap101|\
|
||||
edgecore,oap101-6e|\
|
||||
edgecore,oap101e|\
|
||||
edgecore,oap101e-6e|\
|
||||
hfcl,ion4x_w|\
|
||||
hfcl,ion4xi_w|\
|
||||
optimcloud,d60|\
|
||||
optimcloud,d60-5g|\
|
||||
@@ -83,6 +108,8 @@ ath11k/qcn6122/hw1.0/caldata_1.bin)
|
||||
case "$board" in
|
||||
cig,wf186w|\
|
||||
cig,wf186h|\
|
||||
cybertan,eww631-a1|\
|
||||
cybertan,eww631-b1|\
|
||||
edgecore,oap101|\
|
||||
edgecore,oap101-6e|\
|
||||
edgecore,oap101e|\
|
||||
@@ -100,6 +127,10 @@ ath11k/qcn6122/hw1.0/caldata_2.bin)
|
||||
edgecore,oap101e-6e)
|
||||
caldata_extract "0:ART" 0x4c000 0x20000
|
||||
;;
|
||||
cybertan,eww631-a1|\
|
||||
cybertan,eww631-b1)
|
||||
caldata_extract "0:ART" 0x26800 0x20000
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
ath11k/QCN9074/hw1.0/caldata_1.bin)
|
||||
@@ -118,7 +149,15 @@ ath11k-macs)
|
||||
cig,wf186h)
|
||||
ath11k_generate_macs_wf186w
|
||||
;;
|
||||
cybertan,eww631-a1)
|
||||
ath11k_generate_macs_eww631_a1
|
||||
;;
|
||||
cybertan,eww631-b1)
|
||||
ath11k_generate_macs_eww631_b1
|
||||
;;
|
||||
edgecore,eap104|\
|
||||
edgecore,oap101-6e|\
|
||||
edgecore,oap101e-6e|\
|
||||
optimcloud,d60|\
|
||||
optimcloud,d60-5g|\
|
||||
optimcloud,d50|\
|
||||
@@ -126,6 +165,7 @@ ath11k-macs)
|
||||
yuncore,fap655)
|
||||
ath11k_generate_macs
|
||||
;;
|
||||
hfcl,ion4x_w|\
|
||||
hfcl,ion4xi_w)
|
||||
ath11k_generate_macs_ion4x
|
||||
;;
|
||||
|
||||
@@ -247,8 +247,8 @@ nand_do_upgrade_success() {
|
||||
local conf_tar="/tmp/sysupgrade.tgz"
|
||||
sync
|
||||
[ "$CI_BOOTCFG" = 1 ] && nand_qca_update_bootconfig
|
||||
[ -f "$conf_tar" ] && nand_restore_config "$conf_tar" && sync
|
||||
[ -n "$CI_FWSETENV" ] && fw_setenv $CI_FWSETENV
|
||||
[ -f "$conf_tar" ] && nand_restore_config "$conf_tar"
|
||||
echo "sysupgrade successful"
|
||||
umount -a
|
||||
reboot -f
|
||||
|
||||
@@ -70,7 +70,10 @@ platform_check_image() {
|
||||
case $board in
|
||||
cig,wf186w|\
|
||||
cig,wf186h|\
|
||||
cybertan,eww631-a1|\
|
||||
cybertan,eww631-b1|\
|
||||
edgecore,eap104|\
|
||||
hfcl,ion4x_w|\
|
||||
hfcl,ion4xi_w|\
|
||||
optimcloud,d60|\
|
||||
optimcloud,d60-5g|\
|
||||
@@ -103,7 +106,8 @@ platform_do_upgrade() {
|
||||
[ "$(find_mtd_chardev rootfs)" ] && CI_UBIPART="rootfs"
|
||||
nand_upgrade_tar "$1"
|
||||
;;
|
||||
hfcl,ion4xi_w)
|
||||
hfcl,ion4x_w|\
|
||||
hfcl,ion4xi_w)
|
||||
wp_part=$(fw_printenv primary | cut -d = -f2)
|
||||
echo "Current Primary is $wp_part"
|
||||
if [[ $wp_part == 1 ]]; then
|
||||
@@ -128,5 +132,18 @@ platform_do_upgrade() {
|
||||
}
|
||||
nand_upgrade_tar "$1"
|
||||
;;
|
||||
cybertan,eww631-a1|\
|
||||
cybertan,eww631-b1)
|
||||
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
|
||||
nand_upgrade_tar "$1"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
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 {
|
||||
@@ -568,15 +572,31 @@
|
||||
};
|
||||
|
||||
&soc {
|
||||
pwm: pwm@0x1941010 {
|
||||
pinctrl-0 = <&pwm_pins>;
|
||||
pinctrl-names = "default";
|
||||
used-pwm-indices = <1>, <1>, <1>, <1>;
|
||||
dft-pwm-status = <1>, <0>, <0>, <0>;
|
||||
status = "ok";
|
||||
};
|
||||
};
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&leds_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
led3 {
|
||||
label = "blue:status";
|
||||
gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "blue-on";
|
||||
default-state = "off";
|
||||
};
|
||||
led2 {
|
||||
label = "red:status";
|
||||
gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "red-on";
|
||||
default-state = "off";
|
||||
};
|
||||
led_power: led1 {
|
||||
label = "green:status";
|
||||
gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "default-on";
|
||||
default-state = "on";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
pinctrl-0 = <&blsp0_uart_pins &phy_led_pins>;
|
||||
@@ -680,6 +700,27 @@
|
||||
};
|
||||
};
|
||||
|
||||
leds_pins: leds_pins {
|
||||
led_pwr_g {
|
||||
pins = "gpio0";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_pwr_b {
|
||||
pins = "gpio1";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_pwr_r {
|
||||
pins = "gpio45";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
audio_pins: audio_pinmux {
|
||||
mux_1 {
|
||||
pins = "gpio24";
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
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 {
|
||||
@@ -568,15 +572,31 @@
|
||||
};
|
||||
|
||||
&soc {
|
||||
pwm: pwm@0x1941010 {
|
||||
pinctrl-0 = <&pwm_pins>;
|
||||
pinctrl-names = "default";
|
||||
used-pwm-indices = <1>, <1>, <1>, <1>;
|
||||
dft-pwm-status = <1>, <0>, <0>, <0>;
|
||||
status = "ok";
|
||||
};
|
||||
};
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&leds_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
led3 {
|
||||
label = "blue:status";
|
||||
gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "blue-on";
|
||||
default-state = "off";
|
||||
};
|
||||
led2 {
|
||||
label = "red:status";
|
||||
gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "red-on";
|
||||
default-state = "off";
|
||||
};
|
||||
led_power: led1 {
|
||||
label = "green:status";
|
||||
gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "default-on";
|
||||
default-state = "on";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
pinctrl-0 = <&blsp0_uart_pins &phy_led_pins>;
|
||||
@@ -680,6 +700,27 @@
|
||||
};
|
||||
};
|
||||
|
||||
leds_pins: leds_pins {
|
||||
led_pwr_g {
|
||||
pins = "gpio0";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_pwr_b {
|
||||
pins = "gpio1";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_pwr_r {
|
||||
pins = "gpio45";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
audio_pins: audio_pinmux {
|
||||
mux_1 {
|
||||
pins = "gpio24";
|
||||
|
||||
@@ -0,0 +1,915 @@
|
||||
/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 = "CyberTan EWW631-A1";
|
||||
compatible = "cybertan,eww631-a1", "qcom,ipq5018-mp03.5", "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";
|
||||
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 = "disabled";
|
||||
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>;
|
||||
};
|
||||
};
|
||||
|
||||
qcom,test@0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
thermal-zones {
|
||||
status = "ok";
|
||||
};
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
pinctrl-0 = <&blsp0_uart_pins &phy_led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
blsp0_uart_pins: blsp0_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 = "gpio28";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
};
|
||||
leds_pins: leds_pinmux {
|
||||
sys_blue {
|
||||
pins = "gpio30";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
sys_red {
|
||||
pins = "gpio36";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
sys_green {
|
||||
pins = "gpio37";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&soc {
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
button@1 {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&tlmm 28 GPIO_ACTIVE_LOW>;
|
||||
linux,input-type = <1>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
gpio_leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&leds_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
led@30 {
|
||||
label = "sys:blue";
|
||||
gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>; /* GPIO_30 */
|
||||
default-state="on";
|
||||
/* linux,default-trigger = "timer";
|
||||
active-delay = <700>;
|
||||
inactive-delay = <700>;
|
||||
default-state="on"; */
|
||||
};
|
||||
led@36 {
|
||||
label = "sys:red";
|
||||
gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>; /* GPIO_36 */
|
||||
default-state="off";
|
||||
/* linux,default-trigger = "timer";
|
||||
active-delay = <700>;
|
||||
inactive-delay = <700>;
|
||||
default-state="on"; */
|
||||
};
|
||||
led@37 {
|
||||
label = "sys:green";
|
||||
gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>; /* GPIO_37 */
|
||||
default-state="off";
|
||||
/* linux,default-trigger = "timer";
|
||||
active-delay = <700>;
|
||||
inactive-delay = <700>;
|
||||
default-state="on"; */
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&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 = <0x4D300000 0x4D300000 0 0 0 0>;
|
||||
qcom,caldb-size = <0x200000>;
|
||||
mem-region = <&q6_ipq5018_data>;
|
||||
1235
|
||||
#else
|
||||
memory-region = <&q6_ipq5018_data>;
|
||||
#endif
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&wifi1 {
|
||||
/* QCN6122 5G */
|
||||
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 = <0x60>;
|
||||
#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 = "ok";
|
||||
};
|
||||
|
||||
&wifi2 {
|
||||
/* QCN6122 6G */
|
||||
qcom,multipd_arch;
|
||||
qcom,userpd-subsys-name = "q6v5_wcss_userpd3";
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
qcom,tgt-mem-mode = <2>;
|
||||
#else
|
||||
qcom,tgt-mem-mode = <1>;
|
||||
#endif
|
||||
qcom,board_id = <0xb0>;
|
||||
qcom,bdf-addr = <0x4ED00000 0x4ED00000 0x4E400000 0x0 0x0>;
|
||||
#ifdef __CNSS2__
|
||||
qcom,caldb-addr = <0x4FF00000 0x4FF00000 0 0 0>;
|
||||
#else
|
||||
qcom,caldb-addr = <0x4FF00000>;
|
||||
m3-dump-addr = <0x4FD00000>;
|
||||
#endif
|
||||
qcom,caldb-size = <0x500000>;
|
||||
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 >;
|
||||
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,981 @@
|
||||
/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 = "CyberTan EWW631-B1";
|
||||
compatible = "cybertan,eww631-b1", "qcom,ipq5018-mp03.5", "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";
|
||||
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 | 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 38 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>;
|
||||
};
|
||||
port@1 {
|
||||
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 0x26 0>;
|
||||
switch_cpu_bmp = <0x40>; /* cpu port bitmap (Port 6 GMAC) */
|
||||
switch_lan_bmp = <0x3c>; /* 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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
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>;
|
||||
local-mac-address = [000000000000];
|
||||
phy-mode = "sgmii";
|
||||
};
|
||||
|
||||
dp2 {
|
||||
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,test@0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
/*
|
||||
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>; //<&blsp0_uart_pins &phy_led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
blsp0_uart_pins: blsp0_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 = "gpio28";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
/*
|
||||
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;
|
||||
};
|
||||
};
|
||||
*/
|
||||
poe_pins: poe_pinmux {
|
||||
/*
|
||||
LAN port PoE output enable
|
||||
H --> enable; L --> disable (Default setting to H)
|
||||
*/
|
||||
mux_0 { /* PoE_OUT_EN */
|
||||
pins = "gpio24";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-pull-up;
|
||||
output-high;
|
||||
};
|
||||
|
||||
mux_1 { /* PSE_INT_N */
|
||||
pins = "gpio27";
|
||||
function = "gpio";
|
||||
bias-pull-up;
|
||||
input;
|
||||
};
|
||||
};
|
||||
|
||||
leds_pins: leds_pinmux {
|
||||
sys_green {
|
||||
pins = "gpio1";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
sys_blue {
|
||||
pins = "gpio30";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
sys_red {
|
||||
pins = "gpio46";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&soc {
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
button@1 {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&tlmm 28 GPIO_ACTIVE_LOW>;
|
||||
linux,input-type = <1>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio_leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&leds_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
led@1 {
|
||||
label = "sys:green";
|
||||
gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>; /* GPIO_1/ATST_QP0 */
|
||||
default-state="off";
|
||||
};
|
||||
led@30 {
|
||||
label = "sys:blue";
|
||||
gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>; /* GPIO_30 */
|
||||
default-state="on";
|
||||
};
|
||||
led@46 {
|
||||
label = "sys:red";
|
||||
gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>; /* GPIO_46 */
|
||||
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 = "ok";
|
||||
};
|
||||
|
||||
&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 0x0>;
|
||||
qcom,caldb-addr = <0x4D300000 0x4D300000 0 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_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 = <0x60>;
|
||||
#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 = "ok";
|
||||
};
|
||||
|
||||
&wifi2 {
|
||||
/* QCN6122 6G */
|
||||
qcom,multipd_arch;
|
||||
qcom,userpd-subsys-name = "q6v5_wcss_userpd3";
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
qcom,tgt-mem-mode = <2>;
|
||||
#else
|
||||
qcom,tgt-mem-mode = <1>;
|
||||
#endif
|
||||
qcom,board_id = <0xb0>;
|
||||
qcom,bdf-addr = <0x4ED00000 0x4ED00000 0x4E400000 0x0 0x0>;
|
||||
#ifdef __CNSS2__
|
||||
qcom,caldb-addr = <0x4FF00000 0x4FF00000 0 0 0>;
|
||||
#else
|
||||
qcom,caldb-addr = <0x4FF00000>;
|
||||
m3-dump-addr = <0x4FD00000>;
|
||||
#endif
|
||||
qcom,caldb-size = <0x500000>;
|
||||
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 >;
|
||||
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,852 @@
|
||||
/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 = "HFCL ION4x_w";
|
||||
compatible = "hfcl,ion4x_w", "qcom,ipq5018-mp03.3", "qcom,ipq5018";
|
||||
interrupt-parent = <&intc>;
|
||||
|
||||
aliases {
|
||||
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
|
||||
serial0 = &blsp1_uart1;
|
||||
serial1 = &blsp1_uart2;
|
||||
ethernet0 = "/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";
|
||||
};
|
||||
|
||||
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_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";
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
};
|
||||
|
||||
led_pins: led_pinmux {
|
||||
mux_1 {
|
||||
pins = "gpio38";
|
||||
function = "gpio";
|
||||
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 {
|
||||
wps_button {
|
||||
pins = "gpio14";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
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 {
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
led_power: led@38 {
|
||||
label = "blue:status";
|
||||
gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
};
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&tlmm 14 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 = "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 = <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 >;
|
||||
|
||||
};
|
||||
};
|
||||
@@ -30,7 +30,7 @@
|
||||
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
|
||||
serial0 = &blsp1_uart1;
|
||||
serial1 = &blsp1_uart2;
|
||||
ethernet0 = "/soc/dp1";
|
||||
ethernet1 = "/soc/dp1";
|
||||
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
@@ -340,7 +340,7 @@
|
||||
status = "ok";
|
||||
pinctrl-0 = <&mdio1_pins>;
|
||||
pinctrl-names = "default";
|
||||
phy-reset-gpio = <&tlmm 39 0>;
|
||||
phy-reset-gpio = <&tlmm 16 0>;
|
||||
|
||||
ethernet-phy@0 {
|
||||
reg = <0x00>;
|
||||
@@ -823,7 +823,7 @@
|
||||
#else
|
||||
memory-region = <&q6_qcn6122_data1>;
|
||||
#endif
|
||||
status = "disabled";
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&wifi2 {
|
||||
|
||||
@@ -18,6 +18,28 @@ define Device/cig_wf186w
|
||||
endef
|
||||
TARGET_DEVICES += cig_wf186w
|
||||
|
||||
define Device/cybertan_eww631_a1
|
||||
DEVICE_TITLE := CyberTan EWW631-A1
|
||||
DEVICE_DTS := qcom-ipq5018-eww631-a1
|
||||
SUPPORTED_DEVICES := cybertan,eww631-a1
|
||||
DEVICE_PACKAGES := ath11k-wifi-cybertan-eww631-a1 ath11k-firmware-ipq50xx-spruce ath11k-firmware-qcn6122
|
||||
DEVICE_DTS_CONFIG := config@mp03.5-c1
|
||||
IMAGES := sysupgrade.tar nand-factory.bin nand-factory.ubi
|
||||
IMAGE/nand-factory.ubi := append-ubi
|
||||
endef
|
||||
TARGET_DEVICES += cybertan_eww631_a1
|
||||
|
||||
define Device/cybertan_eww631_b1
|
||||
DEVICE_TITLE := CyberTan EWW631-B1
|
||||
DEVICE_DTS := qcom-ipq5018-eww631-b1
|
||||
SUPPORTED_DEVICES := cybertan,eww631-b1
|
||||
DEVICE_PACKAGES := ath11k-wifi-cybertan-eww631-b1 ath11k-firmware-ipq50xx-spruce ath11k-firmware-qcn6122
|
||||
DEVICE_DTS_CONFIG := config@mp03.5-c1
|
||||
IMAGES := sysupgrade.tar nand-factory.bin nand-factory.ubi
|
||||
IMAGE/nand-factory.ubi := append-ubi
|
||||
endef
|
||||
TARGET_DEVICES += cybertan_eww631_b1
|
||||
|
||||
define Device/edgecore_eap104
|
||||
DEVICE_TITLE := EdgeCore EAP104
|
||||
DEVICE_DTS := qcom-ipq5018-eap104
|
||||
@@ -72,6 +94,15 @@ define Device/edgecore_oap101e_6e
|
||||
endef
|
||||
TARGET_DEVICES += edgecore_oap101e_6e
|
||||
|
||||
define Device/hfcl_ion4x_w
|
||||
DEVICE_TITLE := HFCL ION4x_w
|
||||
DEVICE_DTS := qcom-ipq5018-hfcl-ion4x_w
|
||||
SUPPORTED_DEVICES := hfcl,ion4x_w
|
||||
DEVICE_PACKAGES := ath11k-wifi-hfcl-ion4x_w ath11k-firmware-ipq50xx-map-spruce
|
||||
DEVICE_DTS_CONFIG := config@mp03.3
|
||||
endef
|
||||
TARGET_DEVICES += hfcl_ion4x_w
|
||||
|
||||
define Device/hfcl_ion4xi_w
|
||||
DEVICE_TITLE := HFCL ION4xi_w
|
||||
DEVICE_DTS := qcom-ipq5018-hfcl-ion4xi_w
|
||||
|
||||
@@ -51,3 +51,17 @@ define KernelPackage/tpm-tis-i2c/description
|
||||
within Linux.
|
||||
endef
|
||||
$(eval $(call KernelPackage,tpm-tis-i2c))
|
||||
|
||||
define KernelPackage/bootconfig
|
||||
SUBMENU:=Other modules
|
||||
TITLE:=Bootconfig partition for failsafe
|
||||
KCONFIG:=CONFIG_BOOTCONFIG_PARTITION
|
||||
FILES:=$(LINUX_DIR)/drivers/platform/ipq/bootconfig.ko@ge4.4
|
||||
AUTOLOAD:=$(call AutoLoad,56,bootconfig,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/bootconfig/description
|
||||
Bootconfig partition for failsafe
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,bootconfig))
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
Index: linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d/net/bridge/br_forward.c
|
||||
===================================================================
|
||||
--- linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d.orig/net/bridge/br_forward.c
|
||||
+++ linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d/net/bridge/br_forward.c
|
||||
@@ -24,8 +24,7 @@ static inline int should_deliver(const s
|
||||
struct net_bridge_vlan_group *vg;
|
||||
|
||||
vg = nbp_vlan_group_rcu(p);
|
||||
- return (((p->flags & BR_HAIRPIN_MODE) && !is_multicast_ether_addr(eth_hdr(skb)->h_dest))
|
||||
- || (skb->dev != p->dev)) &&
|
||||
+ return (((p->flags & BR_HAIRPIN_MODE)) || (skb->dev != p->dev)) &&
|
||||
br_allowed_egress(vg, skb) && (p->state == BR_STATE_FORWARDING) &&
|
||||
nbp_switchdev_allowed_egress(p, skb) &&
|
||||
!br_skb_isolated(p, skb);
|
||||
13
feeds/ipq807x_v5.4/ipq50xx/patches/300-bootconfig.patch
Normal file
13
feeds/ipq807x_v5.4/ipq50xx/patches/300-bootconfig.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
Index: linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d/drivers/platform/ipq/bootconfig.c
|
||||
===================================================================
|
||||
--- linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d.orig/drivers/platform/ipq/bootconfig.c
|
||||
+++ linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d/drivers/platform/ipq/bootconfig.c
|
||||
@@ -366,7 +366,7 @@ static int __init bootconfig_partition_i
|
||||
continue;
|
||||
|
||||
partname_dir[i] = proc_mkdir(part_info[i].name, boot_info_dir);
|
||||
- if (partname_dir != NULL) {
|
||||
+ if (partname_dir[i] != NULL) {
|
||||
proc_create_data("primaryboot", S_IRUGO,
|
||||
partname_dir[i],
|
||||
&primaryboot_ops,
|
||||
54
feeds/ipq807x_v5.4/ipq50xx/patches/301-diag_char.patch
Normal file
54
feeds/ipq807x_v5.4/ipq50xx/patches/301-diag_char.patch
Normal file
@@ -0,0 +1,54 @@
|
||||
Index: linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d/drivers/char/diag/diagchar_core.c
|
||||
===================================================================
|
||||
--- linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d.orig/drivers/char/diag/diagchar_core.c
|
||||
+++ linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d/drivers/char/diag/diagchar_core.c
|
||||
@@ -763,11 +763,6 @@ static void diag_cmd_invalidate_polling(
|
||||
driver->polling_reg_flag = 0;
|
||||
list_for_each_safe(start, temp, &driver->cmd_reg_list) {
|
||||
item = list_entry(start, struct diag_cmd_reg_t, link);
|
||||
- if (&item->entry == NULL) {
|
||||
- pr_err("diag: In %s, unable to search command\n",
|
||||
- __func__);
|
||||
- return;
|
||||
- }
|
||||
polling = diag_cmd_chk_polling(&item->entry);
|
||||
if (polling == DIAG_CMD_POLLING) {
|
||||
driver->polling_reg_flag = 1;
|
||||
@@ -829,11 +824,6 @@ struct diag_cmd_reg_entry_t *diag_cmd_se
|
||||
|
||||
list_for_each_safe(start, temp, &driver->cmd_reg_list) {
|
||||
item = list_entry(start, struct diag_cmd_reg_t, link);
|
||||
- if (&item->entry == NULL) {
|
||||
- pr_err("diag: In %s, unable to search command\n",
|
||||
- __func__);
|
||||
- return NULL;
|
||||
- }
|
||||
temp_entry = &item->entry;
|
||||
if (temp_entry->cmd_code == entry->cmd_code &&
|
||||
temp_entry->subsys_id == entry->subsys_id &&
|
||||
@@ -907,12 +897,6 @@ void diag_cmd_remove_reg_by_pid(int pid)
|
||||
mutex_lock(&driver->cmd_reg_mutex);
|
||||
list_for_each_safe(start, temp, &driver->cmd_reg_list) {
|
||||
item = list_entry(start, struct diag_cmd_reg_t, link);
|
||||
- if (&item->entry == NULL) {
|
||||
- pr_err("diag: In %s, unable to search command\n",
|
||||
- __func__);
|
||||
- mutex_unlock(&driver->cmd_reg_mutex);
|
||||
- return;
|
||||
- }
|
||||
if (item->pid == pid) {
|
||||
list_del(&item->link);
|
||||
kfree(item);
|
||||
@@ -931,12 +915,6 @@ void diag_cmd_remove_reg_by_proc(int pro
|
||||
mutex_lock(&driver->cmd_reg_mutex);
|
||||
list_for_each_safe(start, temp, &driver->cmd_reg_list) {
|
||||
item = list_entry(start, struct diag_cmd_reg_t, link);
|
||||
- if (&item->entry == NULL) {
|
||||
- pr_err("diag: In %s, unable to search command\n",
|
||||
- __func__);
|
||||
- mutex_unlock(&driver->cmd_reg_mutex);
|
||||
- return;
|
||||
- }
|
||||
if (item->proc == proc) {
|
||||
list_del(&item->link);
|
||||
kfree(item);
|
||||
@@ -0,0 +1,16 @@
|
||||
Index: linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d.orig/mtd/nand/raw/nand_ids.c
|
||||
===================================================================
|
||||
--- linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d.orig/drivers/mtd/nand/raw/nand_ids.c
|
||||
+++ linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d/drivers/mtd/nand/raw/nand_ids.c
|
||||
@@ -79,9 +79,9 @@
|
||||
{ .id = {0xc2, 0xb7} },
|
||||
SZ_4K, SZ_512, SZ_256K, 0, 2, 256, NAND_ECC_INFO(8, SZ_512), 0},
|
||||
|
||||
- {"MX35UF2GE4AD-Z4I SPI NAND 2G 1.8V",
|
||||
+ {"MX35UF2GE4AD-Z4I SPI NAND 2G 1.8V 8-bit",
|
||||
{ .id = {0xc2, 0xa6} },
|
||||
- SZ_2K, SZ_128, SZ_128K, 0, 2, 160, NAND_ECC_INFO(4, SZ_512), 0 },
|
||||
+ SZ_2K, SZ_256, SZ_128K, 0, 2, 128, NAND_ECC_INFO(8, SZ_512), 0 },
|
||||
|
||||
{"GD5F1GQ5REYIH SPI NAND 1G 1.8V",
|
||||
{ .id = {0xc8, 0x21} },
|
||||
@@ -20,7 +20,7 @@ DEFAULT_PACKAGES += kmod-qca-nss-dp kmod-qca-ssdk swconfig \
|
||||
kmod-usb-phy-ipq807x kmod-usb-dwc3-qcom-internal \
|
||||
kmod-ath11k-ahb ath11k-firmware-ipq60xx \
|
||||
kmod-gpio-button-hotplug iwinfo \
|
||||
qca-ssdk-shell \
|
||||
qca-ssdk-shell kmod-bootconfig \
|
||||
uboot-envtools -procd-ujail
|
||||
|
||||
$(eval $(call BuildTarget))
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
||||
|
||||
. /lib/functions.sh
|
||||
@@ -98,6 +97,18 @@ ath11k-macs)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
ath11k/IPQ6018/hw1.0/board.bin)
|
||||
case "$board" in
|
||||
cig,wf188n)
|
||||
country=`cat /etc/ucentral/country`
|
||||
if [ "$country" == "CA" ]; then
|
||||
ln -s /lib/firmware/ath11k/IPQ6018/hw1.0/board.bin.CA /lib/firmware/ath11k/IPQ6018/hw1.0/board.bin
|
||||
else
|
||||
ln -s /lib/firmware/ath11k/IPQ6018/hw1.0/board.bin.US /lib/firmware/ath11k/IPQ6018/hw1.0/board.bin
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
|
||||
@@ -10,7 +10,8 @@ boot() {
|
||||
;;
|
||||
edgecore,eap101|\
|
||||
edgecore,eap102|\
|
||||
edgecore,oap102)
|
||||
edgecore,oap102|\
|
||||
edgecore.eap104)
|
||||
avail=$(fw_printenv -n upgrade_available)
|
||||
[ ${avail} -eq 0 ] && fw_setenv upgrade_available 1
|
||||
fw_setenv bootcount 0
|
||||
|
||||
@@ -247,8 +247,8 @@ nand_do_upgrade_success() {
|
||||
local conf_tar="/tmp/sysupgrade.tgz"
|
||||
sync
|
||||
[ "$CI_BOOTCFG" = 1 ] && nand_qca_update_bootconfig
|
||||
[ -f "$conf_tar" ] && nand_restore_config "$conf_tar" && sync
|
||||
[ -n "$CI_FWSETENV" ] && fw_setenv $CI_FWSETENV
|
||||
[ -f "$conf_tar" ] && nand_restore_config "$conf_tar"
|
||||
echo "sysupgrade successful"
|
||||
umount -a
|
||||
reboot -f
|
||||
|
||||
@@ -122,10 +122,10 @@ platform_do_upgrade() {
|
||||
else
|
||||
if grep -q rootfs1 /proc/cmdline; then
|
||||
CI_UBIPART="rootfs2"
|
||||
fw_setenv active 2 || exit 1
|
||||
CI_FWSETENV="active 2"
|
||||
else
|
||||
CI_UBIPART="rootfs1"
|
||||
fw_setenv active 1 || exit 1
|
||||
CI_FWSETENV="active 1"
|
||||
fi
|
||||
fi
|
||||
nand_upgrade_tar "$1"
|
||||
|
||||
@@ -2,30 +2,21 @@ KERNEL_LOADADDR := 0x41080000
|
||||
|
||||
DEVICE_VARS += CE_TYPE
|
||||
|
||||
define Device/cig_wf188n-ca
|
||||
define Device/cig_wf188n
|
||||
DEVICE_TITLE := Cigtech WF-188n
|
||||
DEVICE_DTS := qcom-ipq6018-cig-wf188n
|
||||
DEVICE_DTS_CONFIG := config@cp03-c1
|
||||
SUPPORTED_DEVICES := cig,wf188n
|
||||
DEVICE_PACKAGES := ath11k-wifi-cig-wf188n-ca uboot-env
|
||||
DEVICE_PACKAGES := ath11k-wifi-cig-wf188n uboot-env
|
||||
endef
|
||||
TARGET_DEVICES += cig_wf188n-ca
|
||||
|
||||
define Device/cig_wf188n-us
|
||||
DEVICE_TITLE := Cigtech WF-188n
|
||||
DEVICE_DTS := qcom-ipq6018-cig-wf188n
|
||||
DEVICE_DTS_CONFIG := config@cp03-c1
|
||||
SUPPORTED_DEVICES := cig,wf188n
|
||||
DEVICE_PACKAGES := ath11k-wifi-cig-wf188n-us uboot-env
|
||||
endef
|
||||
TARGET_DEVICES += cig_wf188n-us
|
||||
TARGET_DEVICES += cig_wf188n
|
||||
|
||||
define Device/hfcl_ion4xe
|
||||
DEVICE_TITLE := HFCL ION4Xe
|
||||
DEVICE_DTS := qcom-ipq6018-hfcl-ion4xe
|
||||
DEVICE_DTS_CONFIG := config@cp01-c1
|
||||
SUPPORTED_DEVICES := hfcl,ion4xe
|
||||
DEVICE_PACKAGES := ath11k-wifi-qcom-ipq6018 uboot-envtools kmod-hwmon-lm75
|
||||
DEVICE_PACKAGES := ath11k-wifi-hfcl-ion4xe uboot-envtools kmod-hwmon-lm75
|
||||
endef
|
||||
TARGET_DEVICES += hfcl_ion4xe
|
||||
|
||||
@@ -101,14 +92,14 @@ define Device/wallys_dr6018
|
||||
endef
|
||||
TARGET_DEVICES += wallys_dr6018
|
||||
|
||||
define Device/wallys_dr6018_v4
|
||||
define Device/wallys_dr6018-v4
|
||||
DEVICE_TITLE := Wallys DR6018 V4
|
||||
DEVICE_DTS := qcom-ipq6018-wallys-dr6018-v4
|
||||
DEVICE_DTS_CONFIG := config@cp01-c4
|
||||
SUPPORTED_DEVICES := wallys,dr6018-v4
|
||||
DEVICE_PACKAGES := ath11k-wifi-wallys-dr6018-v4 uboot-envtools ath11k-firmware-qcn9000
|
||||
endef
|
||||
TARGET_DEVICES += wallys_dr6018_v4
|
||||
TARGET_DEVICES += wallys_dr6018-v4
|
||||
|
||||
define Device/glinet_ax1800
|
||||
DEVICE_TITLE := GL-iNet AX1800
|
||||
|
||||
@@ -76,3 +76,17 @@ define KernelPackage/usb-dwc3-qcom-internal/description
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,usb-dwc3-qcom-internal))
|
||||
|
||||
define KernelPackage/bootconfig
|
||||
SUBMENU:=Other modules
|
||||
TITLE:=Bootconfig partition for failsafe
|
||||
KCONFIG:=CONFIG_BOOTCONFIG_PARTITION
|
||||
FILES:=$(LINUX_DIR)/drivers/platform/ipq/bootconfig.ko@ge4.4
|
||||
AUTOLOAD:=$(call AutoLoad,56,bootconfig,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/bootconfig/description
|
||||
Bootconfig partition for failsafe
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,bootconfig))
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
Index: linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d/net/bridge/br_forward.c
|
||||
===================================================================
|
||||
--- linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d.orig/net/bridge/br_forward.c
|
||||
+++ linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d/net/bridge/br_forward.c
|
||||
@@ -24,8 +24,7 @@ static inline int should_deliver(const s
|
||||
struct net_bridge_vlan_group *vg;
|
||||
|
||||
vg = nbp_vlan_group_rcu(p);
|
||||
- return (((p->flags & BR_HAIRPIN_MODE) && !is_multicast_ether_addr(eth_hdr(skb)->h_dest))
|
||||
- || (skb->dev != p->dev)) &&
|
||||
+ return (((p->flags & BR_HAIRPIN_MODE)) || (skb->dev != p->dev)) &&
|
||||
br_allowed_egress(vg, skb) && (p->state == BR_STATE_FORWARDING) &&
|
||||
nbp_switchdev_allowed_egress(p, skb) &&
|
||||
!br_skb_isolated(p, skb);
|
||||
13
feeds/ipq807x_v5.4/ipq60xx/patches/300-bootconfig.patch
Normal file
13
feeds/ipq807x_v5.4/ipq60xx/patches/300-bootconfig.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
Index: linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d/drivers/platform/ipq/bootconfig.c
|
||||
===================================================================
|
||||
--- linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d.orig/drivers/platform/ipq/bootconfig.c
|
||||
+++ linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d/drivers/platform/ipq/bootconfig.c
|
||||
@@ -366,7 +366,7 @@ static int __init bootconfig_partition_i
|
||||
continue;
|
||||
|
||||
partname_dir[i] = proc_mkdir(part_info[i].name, boot_info_dir);
|
||||
- if (partname_dir != NULL) {
|
||||
+ if (partname_dir[i] != NULL) {
|
||||
proc_create_data("primaryboot", S_IRUGO,
|
||||
partname_dir[i],
|
||||
&primaryboot_ops,
|
||||
54
feeds/ipq807x_v5.4/ipq60xx/patches/301-diag_char.patch
Normal file
54
feeds/ipq807x_v5.4/ipq60xx/patches/301-diag_char.patch
Normal file
@@ -0,0 +1,54 @@
|
||||
Index: linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d/drivers/char/diag/diagchar_core.c
|
||||
===================================================================
|
||||
--- linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d.orig/drivers/char/diag/diagchar_core.c
|
||||
+++ linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d/drivers/char/diag/diagchar_core.c
|
||||
@@ -763,11 +763,6 @@ static void diag_cmd_invalidate_polling(
|
||||
driver->polling_reg_flag = 0;
|
||||
list_for_each_safe(start, temp, &driver->cmd_reg_list) {
|
||||
item = list_entry(start, struct diag_cmd_reg_t, link);
|
||||
- if (&item->entry == NULL) {
|
||||
- pr_err("diag: In %s, unable to search command\n",
|
||||
- __func__);
|
||||
- return;
|
||||
- }
|
||||
polling = diag_cmd_chk_polling(&item->entry);
|
||||
if (polling == DIAG_CMD_POLLING) {
|
||||
driver->polling_reg_flag = 1;
|
||||
@@ -829,11 +824,6 @@ struct diag_cmd_reg_entry_t *diag_cmd_se
|
||||
|
||||
list_for_each_safe(start, temp, &driver->cmd_reg_list) {
|
||||
item = list_entry(start, struct diag_cmd_reg_t, link);
|
||||
- if (&item->entry == NULL) {
|
||||
- pr_err("diag: In %s, unable to search command\n",
|
||||
- __func__);
|
||||
- return NULL;
|
||||
- }
|
||||
temp_entry = &item->entry;
|
||||
if (temp_entry->cmd_code == entry->cmd_code &&
|
||||
temp_entry->subsys_id == entry->subsys_id &&
|
||||
@@ -907,12 +897,6 @@ void diag_cmd_remove_reg_by_pid(int pid)
|
||||
mutex_lock(&driver->cmd_reg_mutex);
|
||||
list_for_each_safe(start, temp, &driver->cmd_reg_list) {
|
||||
item = list_entry(start, struct diag_cmd_reg_t, link);
|
||||
- if (&item->entry == NULL) {
|
||||
- pr_err("diag: In %s, unable to search command\n",
|
||||
- __func__);
|
||||
- mutex_unlock(&driver->cmd_reg_mutex);
|
||||
- return;
|
||||
- }
|
||||
if (item->pid == pid) {
|
||||
list_del(&item->link);
|
||||
kfree(item);
|
||||
@@ -931,12 +915,6 @@ void diag_cmd_remove_reg_by_proc(int pro
|
||||
mutex_lock(&driver->cmd_reg_mutex);
|
||||
list_for_each_safe(start, temp, &driver->cmd_reg_list) {
|
||||
item = list_entry(start, struct diag_cmd_reg_t, link);
|
||||
- if (&item->entry == NULL) {
|
||||
- pr_err("diag: In %s, unable to search command\n",
|
||||
- __func__);
|
||||
- mutex_unlock(&driver->cmd_reg_mutex);
|
||||
- return;
|
||||
- }
|
||||
if (item->proc == proc) {
|
||||
list_del(&item->link);
|
||||
kfree(item);
|
||||
@@ -20,7 +20,7 @@ DEFAULT_PACKAGES += kmod-qca-nss-dp kmod-qca-ssdk swconfig \
|
||||
kmod-usb-phy-ipq807x kmod-usb-dwc3-qcom-internal \
|
||||
kmod-ath11k-ahb ath11k-firmware-ipq807x \
|
||||
kmod-gpio-button-hotplug iwinfo \
|
||||
qca-ssdk-shell \
|
||||
qca-ssdk-shell kmod-bootconfig \
|
||||
uboot-envtools -procd-ujail
|
||||
|
||||
$(eval $(call BuildTarget))
|
||||
|
||||
@@ -18,6 +18,9 @@ edgecore,oap102)
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tpt"
|
||||
;;
|
||||
cybertan,eww631-b1)
|
||||
ucidef_set_led_default "power" "POWER" "sys:blue" "on"
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
@@ -43,8 +43,10 @@ qcom_setup_macs()
|
||||
[ -z "$mac" ] && return;
|
||||
wan_mac=$(macaddr_canonicalize $mac)
|
||||
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_network_device_mac eth0 $wan_mac
|
||||
ucidef_set_network_device_mac eth1 $lan_mac
|
||||
ip link set eth0 address $wan_mac
|
||||
ip link set eth1 address $lan_mac
|
||||
ucidef_set_label_macaddr $wan_mac
|
||||
;;
|
||||
*)
|
||||
|
||||
@@ -16,9 +16,9 @@ ath11k_generate_macs() {
|
||||
echo -ne \\x${mac3//:/\\x} >> /lib/firmware/ath11k-macs
|
||||
}
|
||||
|
||||
ath11k_generate_macs_wf194() {
|
||||
ath11k_generate_macs_wf196() {
|
||||
touch /lib/firmware/ath11k-macs
|
||||
mac=$(grep BaseMacAddress= /dev/mtd14 | cut -dx -f2)
|
||||
mac=$(grep BaseMacAddress= /dev/mtd18 | cut -dx -f2)
|
||||
eth=$(macaddr_canonicalize $mac)
|
||||
mac1=$(macaddr_add $eth 2)
|
||||
mac2=$(macaddr_add $eth 3)
|
||||
@@ -92,8 +92,32 @@ ath11k-macs)
|
||||
edgecore,eap106)
|
||||
ath11k_generate_macs
|
||||
;;
|
||||
cig,wf194c)
|
||||
ath11k_generate_macs_wf194
|
||||
cig,wf196)
|
||||
ath11k_generate_macs_wf196
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
ath11k/IPQ8074/hw2.0/board.bin)
|
||||
case "$board" in
|
||||
cig,wf196)
|
||||
country=`cat /etc/ucentral/country`
|
||||
if [ "$country" == "CA" ]; then
|
||||
ln -s /lib/firmware/ath11k/IPQ8074/hw2.0/board.bin.CA /lib/firmware/ath11k/IPQ8074/hw2.0/board.bin
|
||||
else
|
||||
ln -s /lib/firmware/ath11k/IPQ8074/hw2.0/board.bin.US /lib/firmware/ath11k/IPQ8074/hw2.0/board.bin
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
ath11k/QCN9074/hw1.0/board.bin)
|
||||
case "$board" in
|
||||
cig,wf196)
|
||||
country=`cat /etc/ucentral/country`
|
||||
if [ "$country" == "CA" ]; then
|
||||
ln -s /lib/firmware/ath11k/QCN9074/hw1.0/board.bin.CA /lib/firmware/ath11k/QCN9074/hw1.0/board.bin
|
||||
else
|
||||
ln -s /lib/firmware/ath11k/QCN9074/hw1.0/board.bin.US /lib/firmware/ath11k/QCN9074/hw1.0/board.bin
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
@@ -10,7 +10,8 @@ boot() {
|
||||
;;
|
||||
edgecore,eap101|\
|
||||
edgecore,eap102|\
|
||||
edgecore,oap102)
|
||||
edgecore,oap102|\
|
||||
edgecore.eap104)
|
||||
avail=$(fw_printenv -n upgrade_available)
|
||||
[ ${avail} -eq 0 ] && fw_setenv upgrade_available 1
|
||||
fw_setenv bootcount 0
|
||||
|
||||
@@ -247,8 +247,8 @@ nand_do_upgrade_success() {
|
||||
local conf_tar="/tmp/sysupgrade.tgz"
|
||||
sync
|
||||
[ "$CI_BOOTCFG" = 1 ] && nand_qca_update_bootconfig
|
||||
[ -f "$conf_tar" ] && nand_restore_config "$conf_tar" && sync
|
||||
[ -n "$CI_FWSETENV" ] && fw_setenv $CI_FWSETENV
|
||||
[ -f "$conf_tar" ] && nand_restore_config "$conf_tar"
|
||||
echo "sysupgrade successful"
|
||||
umount -a
|
||||
reboot -f
|
||||
|
||||
@@ -61,12 +61,16 @@ platform_do_upgrade() {
|
||||
if [ "$(find_mtd_chardev rootfs)" ]; then
|
||||
CI_UBIPART="rootfs"
|
||||
else
|
||||
if grep -q rootfs1 /proc/cmdline; then
|
||||
if [ -e /tmp/downgrade ]; then
|
||||
CI_UBIPART="rootfs1"
|
||||
{ echo 'active 1'; echo 'upgrade_available 0'; } > /tmp/fw_setenv.txt || exit 1
|
||||
CI_FWSETENV="-s /tmp/fw_setenv.txt"
|
||||
elif grep -q rootfs1 /proc/cmdline; then
|
||||
CI_UBIPART="rootfs2"
|
||||
fw_setenv active 2 || exit 1
|
||||
CI_FWSETENV="active 2"
|
||||
else
|
||||
CI_UBIPART="rootfs1"
|
||||
fw_setenv active 1 || exit 1
|
||||
CI_FWSETENV="active 1"
|
||||
fi
|
||||
fi
|
||||
nand_upgrade_tar "$1"
|
||||
|
||||
@@ -29,8 +29,79 @@
|
||||
stdout-path = "serial0";
|
||||
};
|
||||
|
||||
gpio-export {
|
||||
compatible = "gpio-export";
|
||||
#size-cells = <0>;
|
||||
|
||||
mcu-enable {
|
||||
gpio-export,name = "mcu-enable";
|
||||
gpio-export,output = <0>;
|
||||
gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
usb-hub-enable {
|
||||
gpio-export,name = "usb-hub-enable";
|
||||
gpio-export,output = <1>;
|
||||
gpios = <&tlmm 55 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
usb-rear-power {
|
||||
gpio-export,name = "usb-rear-power";
|
||||
gpio-export,output = <1>;
|
||||
gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
usb-side-power {
|
||||
gpio-export,name = "usb-side-power";
|
||||
gpio-export,output = <1>;
|
||||
gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
soc {
|
||||
pinctrl@1000000 {
|
||||
pinctrl-0 = <&mcu_rst &mcu_rsv &usb_rear_pwr &usb_side_pwr &usb_hub_rst>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
mcu_rst: mcu_rst_pins {
|
||||
pins = "gpio54";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
output-low;
|
||||
};
|
||||
|
||||
mcu_rsv: mcu_rsv_pins {
|
||||
pins = "gpio56";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
usb_rear_pwr: usb_rear_pwr_pins {
|
||||
pins = "gpio29";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
output-high;
|
||||
};
|
||||
|
||||
usb_side_pwr: usb_side_pwr_pins {
|
||||
pins = "gpio30";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
output-high;
|
||||
};
|
||||
|
||||
usb_hub_rst: usb_hub_rst_pins {
|
||||
pins = "gpio55";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
output-high;
|
||||
};
|
||||
|
||||
button_pins: button_pins {
|
||||
reset_button {
|
||||
pins = "gpio66";
|
||||
@@ -40,30 +111,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
usb_mux_sel_pins: usb_mux_pins {
|
||||
mux {
|
||||
pins = "gpio27";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
pcie0_pins: pcie_pins {
|
||||
pcie0_rst {
|
||||
pins = "gpio58";
|
||||
function = "pcie0_rst";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
pcie0_wake {
|
||||
pins = "gpio59";
|
||||
function = "pcie0_wake";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
mdio_pins: mdio_pinmux {
|
||||
mux_0 {
|
||||
pins = "gpio68";
|
||||
@@ -170,19 +217,6 @@
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
phy@84000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
phy@86000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
pci@20000000 {
|
||||
perst-gpio = <&tlmm 58 1>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
|
||||
@@ -29,8 +29,79 @@
|
||||
stdout-path = "serial0";
|
||||
};
|
||||
|
||||
gpio-export {
|
||||
compatible = "gpio-export";
|
||||
#size-cells = <0>;
|
||||
|
||||
mcu-enable {
|
||||
gpio-export,name = "mcu-enable";
|
||||
gpio-export,output = <0>;
|
||||
gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
usb-hub-enable {
|
||||
gpio-export,name = "usb-hub-enable";
|
||||
gpio-export,output = <1>;
|
||||
gpios = <&tlmm 55 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
usb-rear-power {
|
||||
gpio-export,name = "usb-rear-power";
|
||||
gpio-export,output = <1>;
|
||||
gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
usb-side-power {
|
||||
gpio-export,name = "usb-side-power";
|
||||
gpio-export,output = <1>;
|
||||
gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
soc {
|
||||
pinctrl@1000000 {
|
||||
pinctrl-0 = <&mcu_rst &mcu_rsv &usb_rear_pwr &usb_side_pwr &usb_hub_rst>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
mcu_rst: mcu_rst_pins {
|
||||
pins = "gpio54";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
output-low;
|
||||
};
|
||||
|
||||
mcu_rsv: mcu_rsv_pins {
|
||||
pins = "gpio56";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
usb_rear_pwr: usb_rear_pwr_pins {
|
||||
pins = "gpio29";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
output-high;
|
||||
};
|
||||
|
||||
usb_side_pwr: usb_side_pwr_pins {
|
||||
pins = "gpio30";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
output-high;
|
||||
};
|
||||
|
||||
usb_hub_rst: usb_hub_rst_pins {
|
||||
pins = "gpio55";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
output-high;
|
||||
};
|
||||
|
||||
button_pins: button_pins {
|
||||
reset_button {
|
||||
pins = "gpio66";
|
||||
@@ -40,30 +111,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
usb_mux_sel_pins: usb_mux_pins {
|
||||
mux {
|
||||
pins = "gpio27";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
pcie0_pins: pcie_pins {
|
||||
pcie0_rst {
|
||||
pins = "gpio58";
|
||||
function = "pcie0_rst";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
pcie0_wake {
|
||||
pins = "gpio59";
|
||||
function = "pcie0_wake";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
mdio_pins: mdio_pinmux {
|
||||
mux_0 {
|
||||
pins = "gpio68";
|
||||
@@ -170,19 +217,6 @@
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
phy@84000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
phy@86000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
pci@20000000 {
|
||||
perst-gpio = <&tlmm 58 1>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
aliases {
|
||||
serial0 = &blsp1_uart5;
|
||||
serial1 = &blsp1_uart3;
|
||||
/* Aliases as required by u-boot to patch MAC addresses */
|
||||
ethernet0 = "/soc/dp1";
|
||||
ethernet1 = "/soc/dp2";
|
||||
@@ -29,6 +30,17 @@
|
||||
stdout-path = "serial0";
|
||||
};
|
||||
|
||||
gpio-export {
|
||||
compatible = "gpio-export";
|
||||
#size-cells = <0>;
|
||||
|
||||
mcu-enable {
|
||||
gpio-export,name = "mcu-enable";
|
||||
gpio-export,output = <0>;
|
||||
gpios = <&tlmm 34 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
/* No Pine attach in 256M profile */
|
||||
#if !defined(__IPQ_MEM_PROFILE_256_MB__)
|
||||
@@ -130,6 +142,26 @@
|
||||
|
||||
soc {
|
||||
pinctrl@1000000 {
|
||||
pinctrl-0 = <&mcu_rst>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
mcu_rst: mcu_rst_pins {
|
||||
pins = "gpio34";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
output-low;
|
||||
};
|
||||
|
||||
mcu_uart: mcu_uart_pins {
|
||||
mux {
|
||||
pins = "gpio48", "gpio49";
|
||||
function = "blsp2_uart";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
button_pins: button_pins {
|
||||
wps_button {
|
||||
pins = "gpio67";
|
||||
@@ -688,6 +720,12 @@
|
||||
};
|
||||
};
|
||||
|
||||
&blsp1_uart3 {
|
||||
pinctrl-0 = <&mcu_uart>;
|
||||
pinctrl-names = "default";
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&npu_cpr {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -9,29 +9,17 @@ define Device/cig_wf194c4
|
||||
endef
|
||||
TARGET_DEVICES += cig_wf194c4
|
||||
|
||||
define Device/cig_wf196_us
|
||||
define Device/cig_wf196
|
||||
DEVICE_TITLE := CIG WF196
|
||||
DEVICE_DTS := qcom-ipq807x-wf196
|
||||
DEVICE_DTS_CONFIG=config@hk14
|
||||
SUPPORTED_DEVICES := cig,wf196
|
||||
BLOCKSIZE := 256k
|
||||
PAGESIZE := 4096
|
||||
DEVICE_PACKAGES := ath11k-wifi-cig-wf196-us aq-fw-download uboot-envtools kmod-usb3 kmod-usb2 \
|
||||
ath11k-firmware-qcn9000 ath11k-wifi-cig-wf196_6g-us
|
||||
DEVICE_PACKAGES := ath11k-wifi-cig-wf196 aq-fw-download uboot-envtools kmod-usb3 kmod-usb2 \
|
||||
ath11k-firmware-qcn9000
|
||||
endef
|
||||
TARGET_DEVICES += cig_wf196_us
|
||||
|
||||
define Device/cig_wf196_ca
|
||||
DEVICE_TITLE := CIG WF196
|
||||
DEVICE_DTS := qcom-ipq807x-wf196
|
||||
DEVICE_DTS_CONFIG=config@hk14
|
||||
SUPPORTED_DEVICES := cig,wf196
|
||||
BLOCKSIZE := 256k
|
||||
PAGESIZE := 4096
|
||||
DEVICE_PACKAGES := ath11k-wifi-cig-wf196-ca aq-fw-download uboot-envtools kmod-usb3 kmod-usb2 \
|
||||
ath11k-firmware-qcn9000 ath11k-wifi-cig-wf196_6g-ca
|
||||
endef
|
||||
TARGET_DEVICES += cig_wf196_ca
|
||||
TARGET_DEVICES += cig_wf196
|
||||
|
||||
define Device/edgecore_eap102
|
||||
DEVICE_TITLE := Edgecore EAP102
|
||||
|
||||
@@ -56,4 +56,16 @@ 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@ge4.4
|
||||
AUTOLOAD:=$(call AutoLoad,56,bootconfig,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/bootconfig/description
|
||||
Bootconfig partition for failsafe
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,bootconfig))
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
Index: linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d/net/bridge/br_forward.c
|
||||
===================================================================
|
||||
--- linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d.orig/net/bridge/br_forward.c
|
||||
+++ linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d/net/bridge/br_forward.c
|
||||
@@ -24,8 +24,7 @@ static inline int should_deliver(const s
|
||||
struct net_bridge_vlan_group *vg;
|
||||
|
||||
vg = nbp_vlan_group_rcu(p);
|
||||
- return (((p->flags & BR_HAIRPIN_MODE) && !is_multicast_ether_addr(eth_hdr(skb)->h_dest))
|
||||
- || (skb->dev != p->dev)) &&
|
||||
+ return (((p->flags & BR_HAIRPIN_MODE)) || (skb->dev != p->dev)) &&
|
||||
br_allowed_egress(vg, skb) && (p->state == BR_STATE_FORWARDING) &&
|
||||
nbp_switchdev_allowed_egress(p, skb) &&
|
||||
!br_skb_isolated(p, skb);
|
||||
13
feeds/ipq807x_v5.4/ipq807x/patches/300-bootconfig.patch
Normal file
13
feeds/ipq807x_v5.4/ipq807x/patches/300-bootconfig.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
Index: linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d/drivers/platform/ipq/bootconfig.c
|
||||
===================================================================
|
||||
--- linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d.orig/drivers/platform/ipq/bootconfig.c
|
||||
+++ linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d/drivers/platform/ipq/bootconfig.c
|
||||
@@ -366,7 +366,7 @@ static int __init bootconfig_partition_i
|
||||
continue;
|
||||
|
||||
partname_dir[i] = proc_mkdir(part_info[i].name, boot_info_dir);
|
||||
- if (partname_dir != NULL) {
|
||||
+ if (partname_dir[i] != NULL) {
|
||||
proc_create_data("primaryboot", S_IRUGO,
|
||||
partname_dir[i],
|
||||
&primaryboot_ops,
|
||||
54
feeds/ipq807x_v5.4/ipq807x/patches/301-diag_char.patch
Normal file
54
feeds/ipq807x_v5.4/ipq807x/patches/301-diag_char.patch
Normal file
@@ -0,0 +1,54 @@
|
||||
Index: linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d/drivers/char/diag/diagchar_core.c
|
||||
===================================================================
|
||||
--- linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d.orig/drivers/char/diag/diagchar_core.c
|
||||
+++ linux-5.4.164-qsdk-26349818b464f8c7b52d59ce73579d9f3dd6bd5d/drivers/char/diag/diagchar_core.c
|
||||
@@ -763,11 +763,6 @@ static void diag_cmd_invalidate_polling(
|
||||
driver->polling_reg_flag = 0;
|
||||
list_for_each_safe(start, temp, &driver->cmd_reg_list) {
|
||||
item = list_entry(start, struct diag_cmd_reg_t, link);
|
||||
- if (&item->entry == NULL) {
|
||||
- pr_err("diag: In %s, unable to search command\n",
|
||||
- __func__);
|
||||
- return;
|
||||
- }
|
||||
polling = diag_cmd_chk_polling(&item->entry);
|
||||
if (polling == DIAG_CMD_POLLING) {
|
||||
driver->polling_reg_flag = 1;
|
||||
@@ -829,11 +824,6 @@ struct diag_cmd_reg_entry_t *diag_cmd_se
|
||||
|
||||
list_for_each_safe(start, temp, &driver->cmd_reg_list) {
|
||||
item = list_entry(start, struct diag_cmd_reg_t, link);
|
||||
- if (&item->entry == NULL) {
|
||||
- pr_err("diag: In %s, unable to search command\n",
|
||||
- __func__);
|
||||
- return NULL;
|
||||
- }
|
||||
temp_entry = &item->entry;
|
||||
if (temp_entry->cmd_code == entry->cmd_code &&
|
||||
temp_entry->subsys_id == entry->subsys_id &&
|
||||
@@ -907,12 +897,6 @@ void diag_cmd_remove_reg_by_pid(int pid)
|
||||
mutex_lock(&driver->cmd_reg_mutex);
|
||||
list_for_each_safe(start, temp, &driver->cmd_reg_list) {
|
||||
item = list_entry(start, struct diag_cmd_reg_t, link);
|
||||
- if (&item->entry == NULL) {
|
||||
- pr_err("diag: In %s, unable to search command\n",
|
||||
- __func__);
|
||||
- mutex_unlock(&driver->cmd_reg_mutex);
|
||||
- return;
|
||||
- }
|
||||
if (item->pid == pid) {
|
||||
list_del(&item->link);
|
||||
kfree(item);
|
||||
@@ -931,12 +915,6 @@ void diag_cmd_remove_reg_by_proc(int pro
|
||||
mutex_lock(&driver->cmd_reg_mutex);
|
||||
list_for_each_safe(start, temp, &driver->cmd_reg_list) {
|
||||
item = list_entry(start, struct diag_cmd_reg_t, link);
|
||||
- if (&item->entry == NULL) {
|
||||
- pr_err("diag: In %s, unable to search command\n",
|
||||
- __func__);
|
||||
- mutex_unlock(&driver->cmd_reg_mutex);
|
||||
- return;
|
||||
- }
|
||||
if (item->proc == proc) {
|
||||
list_del(&item->link);
|
||||
kfree(item);
|
||||
27
feeds/ipq807x_v5.4/libtcmd/patches/100-compile.patch
Normal file
27
feeds/ipq807x_v5.4/libtcmd/patches/100-compile.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
Index: libtcmd-11.5/libtcmd.h
|
||||
===================================================================
|
||||
--- libtcmd-11.5.orig/libtcmd.h
|
||||
+++ libtcmd-11.5/libtcmd.h
|
||||
@@ -71,7 +71,9 @@ struct tcmd_cfg {
|
||||
struct sigevent sev;
|
||||
timer_t timer;
|
||||
bool timeout;
|
||||
-} tcmd_cfg;
|
||||
+};
|
||||
+
|
||||
+extern struct tcmd_cfg tcmd_cfg;
|
||||
|
||||
/* WLAN API */
|
||||
#ifdef WLAN_API_NL80211
|
||||
Index: libtcmd-11.5/nl80211.c
|
||||
===================================================================
|
||||
--- libtcmd-11.5.orig/nl80211.c
|
||||
+++ libtcmd-11.5/nl80211.c
|
||||
@@ -23,6 +23,7 @@
|
||||
#endif
|
||||
|
||||
int cb_ret;
|
||||
+struct tcmd_cfg tcmd_cfg;
|
||||
|
||||
#ifdef LIBNL_2
|
||||
static inline struct nl_sock *nl_handle_alloc(void)
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -2157,7 +2157,7 @@ static void sta_stats_decode_rate(struct
|
||||
|
||||
sband = local->hw.wiphy->bands[band];
|
||||
|
||||
- if (WARN_ON_ONCE(!sband->bitrates))
|
||||
+ if (WARN_ON_ONCE(!sband || !sband->bitrates))
|
||||
break;
|
||||
|
||||
brate = sband->bitrates[rate_idx].bitrate;
|
||||
@@ -0,0 +1,58 @@
|
||||
--- a/drivers/net/wireless/ath/ath11k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/core.h
|
||||
@@ -786,6 +786,7 @@ struct ath11k {
|
||||
u32 max_tx_power;
|
||||
u32 txpower_limit_2g;
|
||||
u32 txpower_limit_5g;
|
||||
+ u32 txpower_limit_6g;
|
||||
u32 txpower_scale;
|
||||
u32 power_scale;
|
||||
u32 chan_tx_pwr;
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -633,6 +633,7 @@ static void ath11k_pdev_caps_update(stru
|
||||
|
||||
ar->txpower_limit_2g = ar->max_tx_power;
|
||||
ar->txpower_limit_5g = ar->max_tx_power;
|
||||
+ ar->txpower_limit_6g = ar->max_tx_power;
|
||||
ar->txpower_scale = WMI_HOST_TP_SCALE_MAX;
|
||||
}
|
||||
|
||||
@@ -803,6 +804,16 @@ static int ath11k_mac_txpower_recalc(str
|
||||
ar->txpower_limit_5g = txpower;
|
||||
}
|
||||
|
||||
+ if ((ar->hw->wiphy->bands[NL80211_BAND_6GHZ]) &&
|
||||
+ ar->txpower_limit_6g != txpower) {
|
||||
+ param = WMI_PDEV_PARAM_TXPOWER_LIMIT5G;
|
||||
+ ret = ath11k_wmi_pdev_set_param(ar, param,
|
||||
+ txpower, ar->pdev->pdev_id);
|
||||
+ if (ret)
|
||||
+ goto fail;
|
||||
+ ar->txpower_limit_6g = txpower;
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
@@ -3542,18 +3553,8 @@ static void ath11k_mac_op_bss_info_chang
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac vdev_id %i txpower %d\n",
|
||||
arvif->vdev_id, info->txpower);
|
||||
|
||||
- if (ar->supports_6ghz && info->chandef.chan &&
|
||||
- info->chandef.chan->band == NL80211_BAND_6GHZ &&
|
||||
- (arvif->vdev_type == WMI_VDEV_TYPE_STA ||
|
||||
- arvif->vdev_type == WMI_VDEV_TYPE_AP) &&
|
||||
- test_bit(WMI_TLV_SERVICE_EXT_TPC_REG_SUPPORT,
|
||||
- ar->ab->wmi_ab.svc_map)) {
|
||||
- ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
||||
- "discard tx power, change to set TPC power\n");
|
||||
- } else {
|
||||
- arvif->txpower = info->txpower;
|
||||
- ath11k_mac_txpower_recalc(ar);
|
||||
- }
|
||||
+ arvif->txpower = info->txpower;
|
||||
+ ath11k_mac_txpower_recalc(ar);
|
||||
}
|
||||
|
||||
if (changed & BSS_CHANGED_MCAST_RATE &&
|
||||
@@ -29,7 +29,6 @@ define Package/qca-diag/Description
|
||||
stack.
|
||||
endef
|
||||
|
||||
|
||||
QCASSDK_CONFIG_OPTS+= TOOL_PATH=$(TOOLCHAIN_DIR)/bin/ \
|
||||
SYS_PATH=$(LINUX_DIR) \
|
||||
TOOLPREFIX=$(TARGET_CROSS) \
|
||||
|
||||
@@ -2,7 +2,7 @@ INCLUDE_DIR += include -I src
|
||||
LIB := -lpthread -shared
|
||||
LDFLAGS += -Llib/ -ldiag -lpthread -pie
|
||||
FLAGS = -fPIC -g -DUSE_MUSL
|
||||
EXTRA_CFLAGS = $(TARGET_CFLAGS) $(TARGET_LDFLAGS) $(TARGET_CPPFLAGS) -fstack-protector-all -znow -zrelro -Werror -Wno-error=attributes
|
||||
EXTRA_CFLAGS = $(TARGET_CFLAGS) $(TARGET_LDFLAGS) $(TARGET_CPPFLAGS) -fstack-protector-all -znow -zrelro -Werror -Wno-error=address-of-packed-member -Wl,--allow-multiple-definition -Wno-error=attributes
|
||||
sample_cliobj := dci_client/diag_dci_sample.c
|
||||
klogobj := klog/diag_klog.c
|
||||
mdobj := mdlog/diag_mdlog.c
|
||||
|
||||
@@ -123,17 +123,23 @@ when who what, where, why
|
||||
|
||||
#define GUID_LEN 16
|
||||
|
||||
#ifdef ANDROID
|
||||
#if defined (ANDROID) || defined (USE_ANDROID_LOGGING)
|
||||
#define LOG_TAG "Diag_Lib"
|
||||
#define DIAG_LOGE(...) { \
|
||||
ALOGE(__VA_ARGS__); \
|
||||
if (!diag_disable_console) \
|
||||
printf(__VA_ARGS__); \
|
||||
}
|
||||
#include <cutils/log.h>
|
||||
#include "common_log.h"
|
||||
#define DIAG_LOGD(...) { \
|
||||
ALOGE(__VA_ARGS__); \
|
||||
if (!diag_disable_console) \
|
||||
printf(__VA_ARGS__); \
|
||||
}
|
||||
#include <log/log.h>
|
||||
#include "common_log.h"
|
||||
#else
|
||||
#define DIAG_LOGE(...) printf (__VA_ARGS__)
|
||||
#define DIAG_LOGD(...) printf (__VA_ARGS__)
|
||||
#endif
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
@@ -167,6 +173,12 @@ typedef enum {
|
||||
DB_PARSER_STATE_CLOSE,
|
||||
} qsr4_db_file_parser_state;
|
||||
|
||||
/* enum to handle packet processing status */
|
||||
enum pkt_status{
|
||||
PKT_PROCESS_ONGOING,
|
||||
PKT_PROCESS_DONE
|
||||
};
|
||||
|
||||
/*
|
||||
* Structure to keep track of diag callback interface clients. Please note that
|
||||
* there can be only client communicating with an ASIC at a given time.
|
||||
|
||||
@@ -64,7 +64,7 @@ when who what, where, why
|
||||
#define PID_DIR "/root/diag_logs"
|
||||
#define MAX_CHAN 4
|
||||
|
||||
static unsigned char read_buf[4096];
|
||||
static unsigned char read_buf[MAX_CHAN][4096];
|
||||
static char ip_addr_name[FILE_NAME_LEN] = "192.168.0.10";
|
||||
static char port_number_string[FILE_NAME_LEN] = "2500";
|
||||
static int port_number = 2500;
|
||||
@@ -397,13 +397,22 @@ int open_connection(struct diag_socket *sock)
|
||||
int read_socket(struct diag_socket *socket)
|
||||
{
|
||||
int num_read;
|
||||
int status;
|
||||
|
||||
repeat:
|
||||
/* Read from the socket */
|
||||
memset(read_buf, 0, 4096);
|
||||
num_read = recv(socket->fd, (unsigned char *)read_buf, 4096, 0);
|
||||
memset(read_buf[socket->id], 0, 4096);
|
||||
num_read = recv(socket->fd, (unsigned char *)read_buf[socket->id], 4096, 0);
|
||||
if (num_read > 0) {
|
||||
/* Send the data read off of the socket to the kernel via the library */
|
||||
diag_send_socket_data(socket->id, read_buf, num_read);
|
||||
/*
|
||||
* Process socket data to make sure full command is received before send it
|
||||
* to the diag core via the library. If return value is not PKT_PROCESS_DONE
|
||||
* then this is the case of partial packet and wait for pending bytes to
|
||||
* get full diag command.
|
||||
*/
|
||||
status = diag_send_socket_data(socket->id, read_buf[socket->id], num_read);
|
||||
if (status != PKT_PROCESS_DONE)
|
||||
goto repeat;
|
||||
} else if (num_read == -1) {
|
||||
DIAG_LOGE("diag_socket_log: Read socket error: %s, errno: %d\n",
|
||||
strerror(errno), errno);
|
||||
|
||||
@@ -89,6 +89,9 @@ when who what, where, why
|
||||
|
||||
#define MAX_CHANNELS 4
|
||||
|
||||
#define MAX_USER_PKT_SIZE 16384
|
||||
#define USER_SPACE_DATA_TYPE_SIZE 4
|
||||
|
||||
#define DCI_HEADER_LENGTH sizeof(int)
|
||||
#define DCI_LEN_FIELD_LENGTH sizeof(int)
|
||||
#define DCI_EVENT_OFFSET sizeof(uint16)
|
||||
@@ -134,6 +137,13 @@ when who what, where, why
|
||||
char dir_name[FILE_NAME_LEN];
|
||||
char peripheral_name[FILE_NAME_LEN];
|
||||
|
||||
/* enum defined to handle full/partial packet case */
|
||||
typedef enum {
|
||||
PKT_START,
|
||||
PKT_HEADER,
|
||||
PKT_PAYLOAD
|
||||
} diag_pkt_states;
|
||||
|
||||
static struct diag_callback_tbl_t cb_clients[NUM_PROC];
|
||||
static int socket_inited = 0;
|
||||
static int (*socket_cb_ptr)(void *socket_cb_data_ptr, int socket_id);
|
||||
@@ -619,46 +629,246 @@ SIDE EFFECTS
|
||||
===========================================================================*/
|
||||
int diag_send_socket_data(int id, unsigned char buf[], int num_bytes)
|
||||
{
|
||||
unsigned char send_buf[4100];
|
||||
unsigned char offset = 4;
|
||||
int i;
|
||||
int start = 0;
|
||||
int end = 0;
|
||||
int copy_bytes;
|
||||
int success;
|
||||
static unsigned char send_buf[MAX_CHANNELS][MAX_USER_PKT_SIZE];
|
||||
static unsigned char extra_header = USER_SPACE_DATA_TYPE_SIZE;
|
||||
static unsigned char tmp_header[DIAG_NON_HDLC_HEADER_SIZE];
|
||||
static diag_pkt_states pkt_state = PKT_START;
|
||||
static int hdlc_pkt_pending = FALSE;
|
||||
static uint32_t total_pkt_size = 0;
|
||||
static uint32_t bytes_required = 0;
|
||||
static int s_char = 0, e_char = 0;
|
||||
static uint32_t pkt_start_off = 0;
|
||||
static uint32_t saved_bytes = 0;
|
||||
int status = PKT_PROCESS_DONE;
|
||||
int packet_len_index = 0;
|
||||
uint16_t packet_len = 0;
|
||||
int i = 0, j = 0;
|
||||
|
||||
if ((id >= 0) && (id < MAX_CHANNELS)) {
|
||||
*(int *)send_buf = USER_SPACE_DATA_TYPE;
|
||||
if (socket_token[id] != 0 ) {
|
||||
*(int *)(send_buf + offset) = socket_token[id];
|
||||
offset += 4;
|
||||
}
|
||||
|
||||
for (i = 0; i < num_bytes; i++) {
|
||||
if (hdlc_disabled) {
|
||||
if (buf[i] == CONTROL_CHAR && i == 0) {
|
||||
end = end + 1;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (buf[i] == CONTROL_CHAR) {
|
||||
copy_bytes = end-start+1;
|
||||
memcpy(send_buf+offset, buf+start, copy_bytes);
|
||||
diag_send_data(send_buf, copy_bytes+offset);
|
||||
start = i+1;
|
||||
end = i+1;
|
||||
continue;
|
||||
}
|
||||
end = end+1;
|
||||
}
|
||||
success = 1;
|
||||
} else {
|
||||
DIAG_LOGE("diag: In %s, Error sending socket data. Invalid socket id: %d\n",
|
||||
__func__, id);
|
||||
success = 0;
|
||||
if ((id < 0) || id >= MAX_CHANNELS) {
|
||||
DIAG_LOGE("diag_socket_log: %s: Error sending socket data. socket id: %d, num_bytes: %d\n",
|
||||
__func__, id, num_bytes);
|
||||
return PKT_PROCESS_DONE;
|
||||
}
|
||||
|
||||
return success;
|
||||
for (i = 0; i < num_bytes; i++) {
|
||||
status = PKT_PROCESS_ONGOING;
|
||||
switch (pkt_state)
|
||||
{
|
||||
case PKT_START:
|
||||
if (buf[i] == CONTROL_CHAR && !hdlc_pkt_pending) {
|
||||
s_char = buf[i];
|
||||
pkt_start_off = i;
|
||||
/* probably it is non-HDLC packet */
|
||||
if (num_bytes >= (pkt_start_off + DIAG_NON_HDLC_HEADER_SIZE)) {
|
||||
/* received full header */
|
||||
packet_len_index = pkt_start_off + 2;
|
||||
packet_len = (uint16_t)(*(uint16_t *)(buf + packet_len_index));
|
||||
total_pkt_size = DIAG_NON_HDLC_HEADER_SIZE + packet_len + 1;
|
||||
if (total_pkt_size <= (num_bytes - pkt_start_off)) {
|
||||
e_char = buf[total_pkt_size-1];
|
||||
if (s_char == e_char) {
|
||||
/* full non-HDLC packet received */
|
||||
memset(send_buf[id], 0, MAX_USER_PKT_SIZE);
|
||||
*(int *)send_buf[id] = USER_SPACE_DATA_TYPE;
|
||||
if (socket_token[id] != 0) {
|
||||
*(int *)(send_buf[id] + extra_header) = socket_token[id];
|
||||
extra_header += sizeof(int);
|
||||
}
|
||||
memcpy(send_buf[id] + extra_header, buf, total_pkt_size);
|
||||
/* send it diag core */
|
||||
diag_send_data(send_buf[id], total_pkt_size + extra_header);
|
||||
i += total_pkt_size - 1;
|
||||
s_char = 0;
|
||||
e_char = 0;
|
||||
total_pkt_size = 0;
|
||||
extra_header = USER_SPACE_DATA_TYPE_SIZE;
|
||||
status = PKT_PROCESS_DONE;
|
||||
}
|
||||
} else {
|
||||
/* full header + partial packet received */
|
||||
pkt_state = PKT_PAYLOAD;
|
||||
memset(send_buf[id], 0, MAX_USER_PKT_SIZE);
|
||||
*(int *)send_buf[id] = USER_SPACE_DATA_TYPE;
|
||||
if (socket_token[id] != 0) {
|
||||
*(int *)(send_buf[id] + extra_header) = socket_token[id];
|
||||
extra_header += sizeof(int);
|
||||
}
|
||||
memcpy(send_buf[id] + extra_header, (buf + pkt_start_off), (num_bytes - pkt_start_off));
|
||||
saved_bytes = (num_bytes - pkt_start_off + extra_header);
|
||||
bytes_required = total_pkt_size - (saved_bytes - extra_header);
|
||||
i += num_bytes - 1;
|
||||
DIAG_LOGD("%s:PKT_START: full header + partial pkt received, total_pkt_size %d recvd %d pending %d\n",
|
||||
__func__, total_pkt_size, (saved_bytes - extra_header), bytes_required);
|
||||
}
|
||||
} else {
|
||||
/* partial header received */
|
||||
memcpy(tmp_header, (buf + pkt_start_off), (num_bytes - pkt_start_off));
|
||||
saved_bytes = (num_bytes - pkt_start_off);
|
||||
bytes_required = DIAG_NON_HDLC_HEADER_SIZE - saved_bytes;
|
||||
i += num_bytes - 1;
|
||||
pkt_state = PKT_HEADER;
|
||||
DIAG_LOGD("%s:PKT_START: partial header received, recvd %d pending %d\n",
|
||||
__func__, saved_bytes, bytes_required);
|
||||
}
|
||||
} else {
|
||||
/* HDLC packet will enter here */
|
||||
if (!hdlc_pkt_pending) {
|
||||
hdlc_pkt_pending = TRUE;
|
||||
memset(send_buf[id], 0, MAX_USER_PKT_SIZE);
|
||||
*(int *)send_buf[id] = USER_SPACE_DATA_TYPE;
|
||||
if (socket_token[id] != 0) {
|
||||
*(int *)(send_buf[id] + extra_header) = socket_token[id];
|
||||
extra_header += sizeof(int);
|
||||
}
|
||||
saved_bytes = extra_header;
|
||||
}
|
||||
/* iterate through the packet to find the delimiter */
|
||||
for (j = 0; j < num_bytes; j++) {
|
||||
if (buf[j] == CONTROL_CHAR) {
|
||||
if (j == (num_bytes - 1)) {
|
||||
/* delimiter found at the end of current packet
|
||||
* probably this is end of HDLC packet
|
||||
*/
|
||||
if (saved_bytes + num_bytes >= MAX_USER_PKT_SIZE) {
|
||||
DIAG_LOGE("%s:hdlc: command too large, dropping pkt\n", __func__);
|
||||
hdlc_pkt_pending = FALSE;
|
||||
saved_bytes = 0;
|
||||
i += num_bytes - 1;
|
||||
break;
|
||||
}
|
||||
memcpy(send_buf[id] + saved_bytes, buf, num_bytes);
|
||||
/* send it to diag core */
|
||||
diag_send_data(send_buf[id], saved_bytes + num_bytes);
|
||||
hdlc_pkt_pending = FALSE;
|
||||
i += num_bytes - 1;
|
||||
saved_bytes = 0;
|
||||
extra_header = USER_SPACE_DATA_TYPE_SIZE;
|
||||
status = PKT_PROCESS_DONE;
|
||||
} else {
|
||||
/* delimiter character may come at the middle of packet
|
||||
* just ignore as we cant handle this case
|
||||
*/
|
||||
DIAG_LOGD("%s:hdlc: Delimiter found at the middle index %d\n", __func__, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* full HDLC packet has not received */
|
||||
if (hdlc_pkt_pending) {
|
||||
if (saved_bytes + num_bytes >= MAX_USER_PKT_SIZE) {
|
||||
DIAG_LOGE("%s:hdlc: command too large, dropping pkt\n", __func__);
|
||||
hdlc_pkt_pending = FALSE;
|
||||
saved_bytes = 0;
|
||||
i += num_bytes - 1;
|
||||
break;
|
||||
}
|
||||
memcpy(send_buf[id] + saved_bytes, buf, num_bytes);
|
||||
saved_bytes += num_bytes;
|
||||
i += num_bytes - 1;
|
||||
DIAG_LOGD("%s:hdlc: Partial Packet received, recvd %d\n", __func__,
|
||||
(saved_bytes - extra_header));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case PKT_HEADER:
|
||||
if(num_bytes >= bytes_required){
|
||||
/* we have full header now */
|
||||
memcpy(tmp_header+saved_bytes, buf, bytes_required);
|
||||
packet_len = (uint16_t)(*(uint16_t *)(tmp_header + 2));
|
||||
total_pkt_size = DIAG_NON_HDLC_HEADER_SIZE + packet_len + 1;
|
||||
if (total_pkt_size <= (num_bytes + saved_bytes)) {
|
||||
/* might received full packet */
|
||||
e_char = buf[total_pkt_size - saved_bytes - 1];
|
||||
if (s_char == e_char) {
|
||||
/* full non-HDLC packet received */
|
||||
memset(send_buf[id], 0, MAX_USER_PKT_SIZE);
|
||||
*(int *)send_buf[id] = USER_SPACE_DATA_TYPE;
|
||||
if (socket_token[id] != 0) {
|
||||
*(int *)(send_buf[id] + extra_header) = socket_token[id];
|
||||
extra_header += sizeof(int);
|
||||
}
|
||||
memcpy(send_buf[id] + extra_header, tmp_header, saved_bytes);
|
||||
memcpy(send_buf[id] + extra_header + saved_bytes, buf,
|
||||
total_pkt_size - saved_bytes);
|
||||
/* send it to diag core */
|
||||
diag_send_data(send_buf[id], total_pkt_size + extra_header);
|
||||
i += total_pkt_size - saved_bytes - 1;
|
||||
s_char = 0;
|
||||
e_char = 0;
|
||||
total_pkt_size = 0;
|
||||
bytes_required = 0;
|
||||
saved_bytes = 0;
|
||||
extra_header = USER_SPACE_DATA_TYPE_SIZE;
|
||||
pkt_state = PKT_START;
|
||||
status = PKT_PROCESS_DONE;
|
||||
}
|
||||
} else {
|
||||
/* full header + partial packet received */
|
||||
pkt_state = PKT_PAYLOAD;
|
||||
memset(send_buf[id], 0, MAX_USER_PKT_SIZE);
|
||||
*(int *)send_buf[id] = USER_SPACE_DATA_TYPE;
|
||||
if (socket_token[id] != 0) {
|
||||
*(int *)(send_buf[id] + extra_header) = socket_token[id];
|
||||
extra_header += sizeof(int);
|
||||
}
|
||||
/* copy partial header received */
|
||||
memcpy(send_buf[id] + extra_header, tmp_header, saved_bytes);
|
||||
memcpy(send_buf[id] + extra_header + saved_bytes, buf, num_bytes);
|
||||
bytes_required = total_pkt_size - saved_bytes - num_bytes;
|
||||
i += num_bytes - 1;
|
||||
saved_bytes += num_bytes + extra_header;
|
||||
DIAG_LOGD("%s:PKT_HEADER: full header + partial pkt received, total_pkt_size %d recvd %d pending %d\n",
|
||||
__func__, total_pkt_size, (saved_bytes - extra_header), bytes_required);
|
||||
}
|
||||
} else {
|
||||
/* still full header not yet received */
|
||||
memcpy(tmp_header + saved_bytes, buf, num_bytes);
|
||||
saved_bytes += num_bytes;
|
||||
bytes_required = DIAG_NON_HDLC_HEADER_SIZE - saved_bytes;
|
||||
i += num_bytes - 1;
|
||||
DIAG_LOGD("%s:PKT_HEADER: still partial header received, recvd %d pending %d\n",
|
||||
__func__, saved_bytes, bytes_required);
|
||||
}
|
||||
break;
|
||||
|
||||
case PKT_PAYLOAD:
|
||||
if(num_bytes >= bytes_required){
|
||||
/* received pending bytes */
|
||||
e_char = buf[bytes_required - 1];
|
||||
if (s_char == e_char) {
|
||||
/* full non-HDLC packet received */
|
||||
memcpy(send_buf[id] + saved_bytes, buf, bytes_required);
|
||||
/* send it to diag core */
|
||||
diag_send_data(send_buf[id], total_pkt_size + extra_header);
|
||||
i += bytes_required - 1;
|
||||
s_char = 0;
|
||||
e_char = 0;
|
||||
total_pkt_size = 0;
|
||||
bytes_required = 0;
|
||||
saved_bytes = 0;
|
||||
extra_header = USER_SPACE_DATA_TYPE_SIZE;
|
||||
pkt_state = PKT_START;
|
||||
status = PKT_PROCESS_DONE;
|
||||
}
|
||||
} else {
|
||||
/* still not yet received the full packet */
|
||||
memcpy(send_buf[id] + saved_bytes, buf, num_bytes);
|
||||
bytes_required = total_pkt_size - (saved_bytes -
|
||||
extra_header) - num_bytes;
|
||||
i += num_bytes - 1;
|
||||
saved_bytes += num_bytes;
|
||||
DIAG_LOGD("%s:PKT_PAYLOAD: Still waiting for full packet,saved %d pending %d\n",
|
||||
__func__, (saved_bytes - extra_header), bytes_required);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
DIAG_LOGD("%s:default: Unexpected packet state\n",
|
||||
__func__);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/*==========================================================================
|
||||
@@ -2300,6 +2510,7 @@ int diag_read_mask_file(void)
|
||||
if (!found_cmd) {
|
||||
DIAG_LOGE("Sorry, could not find valid commands in the mask file,"
|
||||
"please check the mask file again\n");
|
||||
fclose(read_mask_fp);
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
@@ -2321,6 +2532,7 @@ int diag_read_mask_file(void)
|
||||
if (mask_buf[count_mask_bytes] != CONTROL_CHAR && i == 0) {
|
||||
DIAG_LOGE("Sorry, the mask file doesn't adhere to framing definition,"
|
||||
"please check the mask file again\n");
|
||||
fclose(read_mask_fp);
|
||||
return -1;
|
||||
}
|
||||
if (count_mask_bytes > payload && mask_buf[count_mask_bytes] == CONTROL_CHAR && i != 0) {
|
||||
|
||||
@@ -34,6 +34,14 @@ when who what, where, why
|
||||
#define DIAG_MDLOG_PID_FILE_SZ 100
|
||||
#define NUM_PROC 10
|
||||
#define HDLC_DISABLE 1
|
||||
|
||||
/* Non-HDLC Header:
|
||||
* 1 byte - Control char
|
||||
* 1 byte - Version
|
||||
* 2 bytes - Packet length
|
||||
*/
|
||||
#define DIAG_NON_HDLC_HEADER_SIZE 4
|
||||
|
||||
extern int diag_fd;
|
||||
extern int fd_md[NUM_PROC];
|
||||
extern int gdwClientID;
|
||||
|
||||
@@ -249,6 +249,8 @@ static int diag_qsr4_db_file_mem_init(qsr4_db_file_list** file_entry)
|
||||
}
|
||||
if (entry->head == NULL)
|
||||
entry->head = file_block_offset;
|
||||
else
|
||||
free(file_block_offset);
|
||||
|
||||
return TRUE;
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ath12k-firmware
|
||||
PKG_MIRROR_HASH:=a325f86b1d613f713d2e015abca4a9ff86c8448d4cd540fa022866da2c5aa042
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_BRANCH:=main
|
||||
PKG_SOURCE_URL:=https://github.com/quic/upstream-wifi-fw.git
|
||||
PKG_MIRROR_HASH:=ade4287ff2935ad1d54e5dabb8e6de28f648d0974fa76238fcc1616235e6773e
|
||||
PKG_SOURCE_VERSION:=3417bb86645c5ff4c58258db7cc33e43260b4222
|
||||
PKG_SOURCE_VERSION:=e90d32aaa149800ea79760639cb5ac9ddcfc8281
|
||||
|
||||
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
|
||||
|
||||
@@ -18,20 +18,59 @@ define Package/ath12k-firmware-default
|
||||
DEPENDS:=
|
||||
endef
|
||||
|
||||
define Package/ath12k-firmware-qcn92xx-split-phy
|
||||
$(Package/ath12k-firmware-default)
|
||||
TITLE:=ath12k firmware for qcn92xx split phy devices
|
||||
DEPENDS:=@(TARGET_ipq95xx||TARGET_ipq53xx)
|
||||
endef
|
||||
|
||||
define Package/ath12k-firmware-qcn92xx
|
||||
$(Package/ath12k-firmware-default)
|
||||
TITLE:=ath12k firmware for qcn92xx devices
|
||||
DEPENDS:=@TARGET_ipq95xx
|
||||
DEPENDS:=@(TARGET_ipq95xx||TARGET_ipq53xx)
|
||||
endef
|
||||
|
||||
define Package/ath12k-firmware-ipq53xx
|
||||
$(Package/ath12k-firmware-default)
|
||||
TITLE:=ath12k firmware for ipq53xx devices
|
||||
DEPENDS:=@TARGET_ipq53xx
|
||||
endef
|
||||
|
||||
define Package/ath12k-firmware-ipq53xx-wk-wk
|
||||
$(Package/ath12k-firmware-default)
|
||||
TITLE:=ath12k firmware for ipq53xx + wk + wk devices
|
||||
DEPENDS:=@TARGET_ipq53xx
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
|
||||
endef
|
||||
|
||||
define Package/ath12k-firmware-qcn92xx-split-phy/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath12k/QCN92XX/hw1.0
|
||||
$(CP) $(PKG_BUILD_DIR)/ath12k-firmware/QCN9274/hw2.0_split_phy/1.2.1/WLAN.WBE.1.2.1-00148-QCAHKSWPL_SILICONZ-1/* \
|
||||
$(1)/lib/firmware/ath12k/QCN92XX/hw1.0
|
||||
endef
|
||||
|
||||
define Package/ath12k-firmware-qcn92xx/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath12k/QCN92XX/hw2.0
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/ath12k-firmware/QCN9274/hw2.0/1.1.1/WLAN.WBE.1.1.1-00126-QCAHKSWPL_SILICONZ-1/* \
|
||||
$(1)/lib/firmware/ath12k/QCN92XX/hw2.0
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath12k/QCN92XX/hw1.0
|
||||
$(CP) $(PKG_BUILD_DIR)/ath12k-firmware/QCN9274/hw2.0/1.2.1/WLAN.WBE.1.2.1-00201-QCAHKSWPL_SILICONZ-1/* \
|
||||
$(1)/lib/firmware/ath12k/QCN92XX/hw1.0
|
||||
endef
|
||||
|
||||
define Package/ath12k-firmware-ipq53xx/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/IPQ5332/
|
||||
$(CP) $(PKG_BUILD_DIR)/ath12k-firmware//IPQ5322/hw1.0/1.2.1/WLAN.WBE.1.2.1-00201-QCAHKSWPL_SILICONZ-1/* \
|
||||
$(1)/lib/firmware/IPQ5332/
|
||||
endef
|
||||
|
||||
define Package/ath12k-firmware-ipq53xx-wk-wk/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/IPQ5332/
|
||||
$(CP) $(PKG_BUILD_DIR)/ath12k-firmware/IPQ5322_QCN6432_QCN6432/hw1.0/testing/1.3/WLAN.WBE.1.3-02907-QCAHKSWPL_SILICONZ-1/* \
|
||||
$(1)/lib/firmware/IPQ5332/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ath12k-firmware-qcn92xx))
|
||||
$(eval $(call BuildPackage,ath12k-firmware-qcn92xx-split-phy))
|
||||
$(eval $(call BuildPackage,ath12k-firmware-ipq53xx))
|
||||
$(eval $(call BuildPackage,ath12k-firmware-ipq53xx-wk-wk))
|
||||
|
||||
@@ -19,7 +19,7 @@ define Package/ath12k-wifi-default
|
||||
SUBMENU:=ath12k Board-Specific Overrides
|
||||
SECTION:=firmware
|
||||
CATEGORY:=Firmware
|
||||
DEPENDS:=@TARGET_qcn9274
|
||||
DEPENDS:=@(TARGET_qcn9274||TARGET_ipq53xx)
|
||||
TITLE:=Custom Board
|
||||
endef
|
||||
|
||||
@@ -33,4 +33,32 @@ define Package/ath12k-wifi-qcom-qcn9274/install
|
||||
$(INSTALL_DATA) ./board-2.bin.QCN9274 $(1)/lib/firmware/ath12k/QCN9274/hw1.0/board-2.bin
|
||||
endef
|
||||
|
||||
define Package/ath12k-wifi-cig-wf189
|
||||
$(call Package/ath12k-wifi-default)
|
||||
TITLE:=board.bin for CIG WF189
|
||||
endef
|
||||
|
||||
define Package/ath12k-wifi-sercomm-ap72tip
|
||||
$(call Package/ath12k-wifi-default)
|
||||
TITLE:=board.bin for Sercomm WIFI-7
|
||||
endef
|
||||
|
||||
define Package/ath12k-wifi-cig-wf189/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath12k/QCN92XX/hw1.0 $(1)/lib/firmware/ath12k/IPQ5332/hw1.0
|
||||
$(INSTALL_DATA) ./regdb.bin $(1)/lib/firmware/ath12k/QCN92XX/hw1.0/
|
||||
$(INSTALL_DATA) ./board-cig-wf189.bin.qcn9224 $(1)/lib/firmware/ath12k/QCN92XX/hw1.0/board.bin
|
||||
$(INSTALL_DATA) ./regdb.bin $(1)/lib/firmware/ath12k/IPQ5332/hw1.0/
|
||||
$(INSTALL_DATA) ./board-cig-wf189.bin.ipq53xx $(1)/lib/firmware/ath12k/IPQ5332/hw1.0/board.bin
|
||||
endef
|
||||
|
||||
define Package/ath12k-wifi-sercomm-ap72tip/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath12k/QCN92XX/hw1.0 $(1)/lib/firmware/ath12k/IPQ5332/hw1.0
|
||||
$(INSTALL_DATA) ./regdb.bin $(1)/lib/firmware/ath12k/QCN92XX/hw1.0/
|
||||
$(INSTALL_DATA) ./board-sercomm-ap72tip.bin.qcn9224 $(1)/lib/firmware/ath12k/QCN92XX/hw1.0/board.bin
|
||||
$(INSTALL_DATA) ./regdb.bin $(1)/lib/firmware/ath12k/IPQ5332/hw1.0/
|
||||
$(INSTALL_DATA) ./board-sercomm-ap72tip.bin.ipq53xx $(1)/lib/firmware/ath12k/IPQ5332/hw1.0/board.bin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ath12k-wifi-qcom-qcn9274))
|
||||
$(eval $(call BuildPackage,ath12k-wifi-cig-wf189))
|
||||
$(eval $(call BuildPackage,ath12k-wifi-sercomm-ap72tip))
|
||||
|
||||
BIN
feeds/ipq95xx/ath12k-wifi/board-cig-wf189.bin.ipq53xx
Executable file
BIN
feeds/ipq95xx/ath12k-wifi/board-cig-wf189.bin.ipq53xx
Executable file
Binary file not shown.
BIN
feeds/ipq95xx/ath12k-wifi/board-cig-wf189.bin.qcn9224
Executable file
BIN
feeds/ipq95xx/ath12k-wifi/board-cig-wf189.bin.qcn9224
Executable file
Binary file not shown.
BIN
feeds/ipq95xx/ath12k-wifi/board-sercomm-ap72tip.bin.ipq53xx
Normal file
BIN
feeds/ipq95xx/ath12k-wifi/board-sercomm-ap72tip.bin.ipq53xx
Normal file
Binary file not shown.
BIN
feeds/ipq95xx/ath12k-wifi/board-sercomm-ap72tip.bin.qcn9224
Normal file
BIN
feeds/ipq95xx/ath12k-wifi/board-sercomm-ap72tip.bin.qcn9224
Normal file
Binary file not shown.
BIN
feeds/ipq95xx/ath12k-wifi/regdb.bin
Executable file
BIN
feeds/ipq95xx/ath12k-wifi/regdb.bin
Executable file
Binary file not shown.
82
feeds/ipq95xx/ftm/Makefile
Executable file
82
feeds/ipq95xx/ftm/Makefile
Executable file
@@ -0,0 +1,82 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG:=ftm
|
||||
PKG_NAME:=$(PKG)
|
||||
PKG_RELEASE:=1
|
||||
|
||||
LOCAL_SRC:=$(TOPDIR)/qca/src/common-tools/ftm
|
||||
|
||||
PKG_VERSION:=12.3
|
||||
|
||||
#PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=QCA
|
||||
CATEGORY:=QTI software
|
||||
URL:=http://www.qca.qualcomm.com
|
||||
MAINTAINER:=Qualcomm Atheros
|
||||
TITLE:= QCA ftm utils
|
||||
DEPENDS:= @TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64||TARGET_ipq_ipq50xx||TARGET_ipq_ipq50xx_64||TARGET_ipq807x||TARGET_ipq50xx||TARGET_ipq60xx||TARGET_ipq95xx||TARGET_ipq53xx +libnl +libtcmd +qca-diag +librt +kmod-diag-char
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description/Default
|
||||
FTM Package Support for QCA WIFI 11 drivers
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += -DCONFIG_FTM_WLAN -DDEBUG -DFTM_DEBUG -DWIN_AP_HOST
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/qca-diag
|
||||
TARGET_CFLAGS += -MMD -O2 -Wall -g
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
|
||||
TARGET_CFLAGS += -fpie
|
||||
TARGET_LDFLAGS += -ldiag -lnl-3 -lnl-genl-3 -lrt -ltcmd
|
||||
TARGET_CSRCS := ftm_main.c ftm_wlan.c ftm_write_to_flash.c
|
||||
TARGET_LDFLAGS += -pie
|
||||
|
||||
ifeq ($(CONFIG_FEATURE_IPQ_PROVISION_SUPPORT),y)
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/qti-mfg-provision
|
||||
TARGET_CFLAGS += -DWIN_AP_AFC
|
||||
TARGET_LDFLAGS += -lprovision
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_kmod-mac80211),)
|
||||
TARGET_CFLAGS+=-DWIN_AP_HOST_OPEN=1
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_FEATURE_QCA_IOT),y)
|
||||
TARGET_CFLAGS += -DIPQ_AP_HOST_IOT -DIPQ_AP_HOST_IOT_QCA402X -ggdb3 -DCONFIG_DAEMON_MODE
|
||||
TARGET_CSRCS += ftm_iot.c
|
||||
TARGET_LDFLAGS += -lpthread
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/qca-iot
|
||||
TARGET_LDFLAGS += -ldiag_demo
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_FEATURE_IPQ_IOT_SUPPORT),y)
|
||||
TARGET_CFLAGS += -DIPQ_AP_HOST_IOT -DIPQ_AP_HOST_IOT_IPQ -ggdb3 -I$(STAGING_DIR)/usr/include/btdaemon
|
||||
TARGET_CSRCS += ftm_iot.c
|
||||
TARGET_LDFLAGS += -lpthread -lbtdaemon
|
||||
endif
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
CC="$(TARGET_CC)" \
|
||||
CFLAGS="$(TARGET_CFLAGS)" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
CSRCS="$(TARGET_CSRCS)"
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ftm $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) ./files/ftm.init $(1)/etc/init.d/ftm
|
||||
$(INSTALL_DIR) $(1)/lib/wifi
|
||||
$(INSTALL_BIN) ./files/compress_vart.sh $(1)/lib/compress_vart.sh
|
||||
ifneq (, $(findstring ipq95xx, $(CONFIG_TARGET_BOARD)))
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) ./files/ftm_qcc710_start.sh $(1)/sbin/ftm_qcc710_start
|
||||
endif
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ftm))
|
||||
75
feeds/ipq95xx/ftm/files/compress_vart.sh
Executable file
75
feeds/ipq95xx/ftm/files/compress_vart.sh
Executable file
@@ -0,0 +1,75 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2020 Qualcomm Technologies, Inc.
|
||||
#
|
||||
# All Rights Reserved.
|
||||
# Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
#
|
||||
#
|
||||
|
||||
[ -e /lib/functions.sh ] && . /lib/functions.sh
|
||||
[ -e /lib/ipq806x.sh ] && . /lib/ipq806x.sh
|
||||
[ -e /lib/functions/boot.sh ] && . /lib/functions/boot.sh
|
||||
|
||||
low_mem_compress_art()
|
||||
{
|
||||
local mtdblock=$(find_mtd_part 0:ART)
|
||||
|
||||
if [ -z "$mtdblock" ]; then
|
||||
# read from mmc
|
||||
mtdblock=$(find_mmc_part 0:ART)
|
||||
fi
|
||||
|
||||
[ -n "$mtdblock" ] || return
|
||||
|
||||
local apmp="/tmp"
|
||||
|
||||
lzma -zvfk -4 ${apmp}/virtual_art.bin 2> /dev/null || {
|
||||
echo "Error Compressing Virtual ART" > /dev/console
|
||||
return
|
||||
}
|
||||
|
||||
dd if=${apmp}/virtual_art.bin.lzma of=${mtdblock}
|
||||
echo "Success compressing Virtual ART(${mtdblock})" > /dev/console
|
||||
return
|
||||
}
|
||||
|
||||
normal_art()
|
||||
{
|
||||
local mtdblock=$(find_mtd_part 0:ART)
|
||||
|
||||
if [ -z "$mtdblock" ]; then
|
||||
# read from mmc
|
||||
mtdblock=$(find_mmc_part 0:ART)
|
||||
fi
|
||||
|
||||
[ -n "$mtdblock" ] || return
|
||||
|
||||
local apmp="/tmp"
|
||||
|
||||
dd if=${apmp}/virtual_art.bin of=${mtdblock}
|
||||
echo "Success writing to ART(${mtdblock})" > /dev/console
|
||||
return
|
||||
}
|
||||
|
||||
write_caldata()
|
||||
{
|
||||
local board
|
||||
[ -f /tmp/sysinfo/board_name ] && {
|
||||
board=ap$(cat /tmp/sysinfo/board_name | awk -F 'ap' '{print$2}')
|
||||
}
|
||||
|
||||
if [ -e /sys/firmware/devicetree/base/compressed_art ]
|
||||
then
|
||||
echo "Compressed ART Supported Platform $board " > /dev/console
|
||||
low_mem_compress_art
|
||||
else
|
||||
echo "Non Compressed ART Platform $board " > /dev/console
|
||||
normal_art
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$1" = "write_caldata" ]
|
||||
then
|
||||
write_caldata
|
||||
fi
|
||||
99
feeds/ipq95xx/ftm/files/ftm.init
Executable file
99
feeds/ipq95xx/ftm/files/ftm.init
Executable file
@@ -0,0 +1,99 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
#
|
||||
# Copyright (c) 2013, 2017, 2020 Qualcomm Technologies, Inc.
|
||||
#
|
||||
# All Rights Reserved.
|
||||
# Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
#
|
||||
# 2013 Qualcomm Atheros, Inc.
|
||||
#
|
||||
# All Rights Reserved.
|
||||
# Qualcomm Atheros Confidential and Proprietary
|
||||
#
|
||||
|
||||
[ -e /lib/functions.sh ] && . /lib/functions.sh
|
||||
[ -e /lib/ipq806x.sh ] && . /lib/ipq806x.sh
|
||||
[ -e /lib/functions/boot.sh ] && . /lib/functions/boot.sh
|
||||
|
||||
START=97
|
||||
SERVICE_DAEMONIZE=1
|
||||
SERVICE_WRITE_PID=1
|
||||
|
||||
MTD_ART_PART_NAME="art"
|
||||
|
||||
compressed_art_read() {
|
||||
local mtdblock=$(find_mtd_part 0:ART)
|
||||
|
||||
if [ -z "$mtdblock" ]; then
|
||||
#read from mmc
|
||||
mtdblock=$(find_mmc_part 0:ART)
|
||||
fi
|
||||
|
||||
[ -n "$mtdblock" ] || return
|
||||
|
||||
local apmp="/tmp"
|
||||
|
||||
dd if=${mtdblock} of=${apmp}/virtual_art.bin.lzma
|
||||
lzma -fdv --single-stream ${apmp}/virtual_art.bin.lzma || {
|
||||
# Create dummy virtual_art.bin file of size 512K
|
||||
dd if=/dev/zero of=${apmp}/virtual_art.bin bs=1024 count=512
|
||||
}
|
||||
echo "Uncompressed and Copied ART content from ${mtdblock} to /tmp/virtual_art.bin" > /dev/console
|
||||
}
|
||||
|
||||
raw_art_read() {
|
||||
local mtdblock=$(find_mtd_part 0:ART)
|
||||
|
||||
if [ -z "$mtdblock" ]; then
|
||||
#read from mmc
|
||||
mtdblock=$(find_mmc_part 0:ART)
|
||||
fi
|
||||
|
||||
[ -n "$mtdblock" ] || return
|
||||
|
||||
local apmp="/tmp"
|
||||
|
||||
dd if=${mtdblock} of=${apmp}/virtual_art.bin
|
||||
echo "Copy ART caldata from ${mtdblock} to /tmp/virtual_art.bin" > /dev/console
|
||||
}
|
||||
|
||||
retrieve_caldata() {
|
||||
local board
|
||||
[ -f /tmp/sysinfo/board_name ] && {
|
||||
board=ap$(cat /tmp/sysinfo/board_name | awk -F 'ap' '{print$2}')
|
||||
}
|
||||
echo "**** Platform Name: $board *****" > /dev/console
|
||||
|
||||
if [ -e /sys/firmware/devicetree/base/compressed_art ]
|
||||
then
|
||||
compressed_art_read
|
||||
else
|
||||
raw_art_read
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
start() {
|
||||
local emmc_flash=""
|
||||
local nor_flash=""
|
||||
|
||||
emmc_flash=$(find_mmc_part 0:ART 2> /dev/null)
|
||||
mtd_name=$(grep -i -w ${MTD_ART_PART_NAME} /proc/mtd | cut -f1 -d:)
|
||||
nor_flash=`find /sys/bus/spi/devices/*/mtd -name ${mtd_name} 2> /dev/null`
|
||||
|
||||
if [ -n "$emmc_flash" ]; then
|
||||
[ -L /dev/caldata ] || \
|
||||
ln -s $emmc_flash /dev/caldata
|
||||
elif [ -n "$nor_flash" ]; then
|
||||
[ -L /dev/caldata ] || \
|
||||
ln -s /dev/${mtd_name//mtd/mtdblock} /dev/caldata
|
||||
elif [ -n "$mtd_name" ]; then
|
||||
[ -L /dev/caldata ] || \
|
||||
ln -s /dev/${mtd_name//mtd/mtdblock} /dev/caldata
|
||||
fi
|
||||
retrieve_caldata
|
||||
}
|
||||
|
||||
stop() {
|
||||
[ -L /dev/caldata ] && rm /dev/caldata
|
||||
}
|
||||
86
feeds/ipq95xx/ftm/files/ftm_qcc710_start.sh
Executable file
86
feeds/ipq95xx/ftm/files/ftm_qcc710_start.sh
Executable file
@@ -0,0 +1,86 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2021 Qualcomm Technologies, Inc.
|
||||
#
|
||||
# All Rights Reserved.
|
||||
# Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
#
|
||||
#
|
||||
|
||||
# QCC710 v1.0 reset for BT bringup
|
||||
qcc710_reset() {
|
||||
reset_gpio_pin=$(cat /proc/device-tree/soc/pinctrl@1000000/QCC710_pins/QCC710_reset/pins | sed s/"gpio"//)
|
||||
[[ -z $reset_gpio_pin ]] && return
|
||||
gpio_base=$(cat /sys/class/gpio/gpiochip*/base | head -n1)
|
||||
gpio_reset=$(( gpio_base + reset_gpio_pin ))
|
||||
if [[ ! -e /sys/class/gpio/gpio$gpio_reset ]]; then
|
||||
[ -z ${SLEEP} ] && echo -e "Enter sleep value for reset. Options:\n10 \n1" && read -p "Enter : " SLEEP
|
||||
[ -z ${SLEEP} ] && SLEEP=10
|
||||
echo $gpio_reset > /sys/class/gpio/export
|
||||
echo out > /sys/class/gpio/gpio$gpio_reset/direction
|
||||
echo "Performing QCC710 reset ...." > /dev/console
|
||||
{ echo 1 > /sys/class/gpio/gpio$gpio_reset/value ; \
|
||||
sleep $SLEEP; \
|
||||
echo 0 > /sys/class/gpio/gpio$gpio_reset/value; \
|
||||
echo "QCC710 reset complete ...." > /dev/console; }
|
||||
fi
|
||||
}
|
||||
|
||||
while [ -n "$1" ]; do
|
||||
case "$1" in
|
||||
-h|--help) HELP=1; break;;
|
||||
-a|--ipaddr) SERVERIP="$2";shift;;
|
||||
-s|--sleep) SLEEP="$2";shift;;
|
||||
-r|--baud-rate) BAUDRATE="$2";shift;;
|
||||
-*)
|
||||
echo "Invalid option: $1"
|
||||
ERROR=1;
|
||||
break
|
||||
;;
|
||||
*)break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
[ -n "$HELP" -o -n "$ERROR" ] && {
|
||||
cat <<EOF
|
||||
Usage: $0 [-h] [-a SERVERIP] [-r baud-rate] [-s sleep]
|
||||
ftm_qcc710_start options:
|
||||
-h print this help
|
||||
-a ipaddr of the server for diag connection
|
||||
-r baudrate
|
||||
-s sleep
|
||||
|
||||
Example:
|
||||
ftm_qcc710_start -a <serverip> -r <baud-rate> -s <sleep>
|
||||
|
||||
version 1 : ./sbin/ftm_qcc710_start -a 192.168.1.121 -r 2000000 -s 10
|
||||
version 2 : ./sbin/ftm_qcc710_start -a 192.168.1.121 -r 115200 -s 1
|
||||
EOF
|
||||
# If we requested the help flag, then exit normally.
|
||||
# Else, it's probably an error so report it as such.
|
||||
[ -n "$HELP" ] && exit 0
|
||||
exit 1
|
||||
}
|
||||
|
||||
[ -z ${SERVERIP} ] && SERVERIP=$(grep -oh "serverip.*#" /proc/cmdline | awk -F '#' '{print $2}')
|
||||
[ -z ${SERVERIP} ] && read -p "No serverip in cmdline, please enter the serverip : " SERVERIP
|
||||
[ -z ${BAUDRATE} ] && echo -e "Enter baudrate for stack bringup. Options:\n2000000\n115200" && read -p "Enter : " BAUDRATE
|
||||
[ -z ${BAUDRATE} ] && BAUDRATE=2000000
|
||||
qcc710_reset
|
||||
DIAG_PID=$(ps | grep diag_socket_app | grep -v grep | awk '{print $1}')
|
||||
while [ -n "$DIAG_PID" ]
|
||||
do
|
||||
kill -s SIGTERM $DIAG_PID
|
||||
DIAG_PID=$(ps | grep diag_socket_app | grep -v grep | awk '{print $1}')
|
||||
done
|
||||
echo "Stopped previous instances of diag_socket_app process"
|
||||
[ -z "$DIAG_PID" ] && /usr/sbin/diag_socket_app -a $SERVERIP -p 2500 &
|
||||
|
||||
FTM_PID=$(ps | grep "ftm " | grep -v grep | awk '{print $1}')
|
||||
while [ -n "$FTM_PID" ]
|
||||
do
|
||||
kill -s SIGTERM $FTM_PID
|
||||
FTM_PID=$(ps | grep "ftm " | grep -v grep | awk '{print $1}')
|
||||
done
|
||||
echo "Stopped previous instances ftm process"
|
||||
[ -z "$FTM_PID" ] && /usr/sbin/ftm -n -dd -r $BAUDRATE
|
||||
133
feeds/ipq95xx/ftm/src/Android.mk
Executable file
133
feeds/ipq95xx/ftm/src/Android.mk
Executable file
@@ -0,0 +1,133 @@
|
||||
ifeq ($(call is-vendor-board-platform,QCOM),true)
|
||||
|
||||
# Build only if board has BT/FM/WLAN
|
||||
ifeq ($(findstring true, $(BOARD_HAVE_QCOM_FM) $(BOARD_HAVE_BLUETOOTH) $(BOARD_HAS_ATH_WLAN_AR6320)),true)
|
||||
|
||||
LOCAL_PATH:= $(call my-dir)
|
||||
|
||||
BDROID_DIR:= system/bt
|
||||
ifeq ($(TARGET_SUPPORTS_WEARABLES),true)
|
||||
QTI_DIR := hardware/qcom/bt/msm8909/libbt-vendor
|
||||
else
|
||||
QTI_DIR := hardware/qcom/bt/libbt-vendor
|
||||
endif
|
||||
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_C_INCLUDES := $(TARGET_OUT_HEADERS)/diag/include \
|
||||
LOCAL_C_INCLUDES += vendor/qcom/proprietary/diag/src \
|
||||
LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/common/inc \
|
||||
LOCAL_C_INCLUDES += vendor/qcom/proprietary/bt/hci_qcomm_init \
|
||||
LOCAL_C_INCLUDES += vendor/qcom/opensource/fm/helium \
|
||||
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include \
|
||||
LOCAL_C_INCLUDES += $(BDROID_DIR)/hci/include \
|
||||
LOCAL_C_INCLUDES += $(QTI_DIR)/include
|
||||
ifeq ($(TARGET_SUPPORTS_WEARABLES),true)
|
||||
LOCAL_C_INCLUDES += device/qcom/msm8909w/opensource/bluetooth/tools/hidl_client/inc
|
||||
else
|
||||
LOCAL_C_INCLUDES += vendor/qcom/opensource/bluetooth/tools/hidl_client/inc
|
||||
endif
|
||||
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
|
||||
|
||||
LOCAL_CFLAGS:= \
|
||||
-DANDROID \
|
||||
-DDEBUG
|
||||
|
||||
#LOCAL_CFLAGS += -include bionic/libc/include/sys/socket.h
|
||||
#LOCAL_CFLAGS += -include bionic/libc/include/netinet/in.h
|
||||
|
||||
ifneq ($(DISABLE_BT_FTM),true)
|
||||
LOCAL_CFLAGS += -DCONFIG_FTM_BT
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_HAVE_QCOM_FM),true)
|
||||
LOCAL_CFLAGS += -DCONFIG_FTM_FM
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_HAS_QCA_FM_SOC), "cherokee")
|
||||
LOCAL_CFLAGS += -DFM_SOC_TYPE_CHEROKEE
|
||||
endif
|
||||
|
||||
ifneq ($(BOARD_ANT_WIRELESS_DEVICE), )
|
||||
LOCAL_CFLAGS += -DCONFIG_FTM_ANT
|
||||
endif
|
||||
LOCAL_CFLAGS += -DCONFIG_FTM_NFC
|
||||
|
||||
ifeq ($(BOARD_HAVE_BLUETOOTH_BLUEZ), true)
|
||||
LOCAL_CFLAGS += -DHAS_BLUEZ_BUILDCFG
|
||||
endif # BOARD_HAVE_BLUETOOTH_BLUEZ
|
||||
|
||||
LOCAL_SRC_FILES:= \
|
||||
ftm_main.c \
|
||||
ftm_nfc.c \
|
||||
ftm_nfcnq.c \
|
||||
ftm_nfcqti.c \
|
||||
ftm_nfcnq_fwdl.c \
|
||||
ftm_nfcnq_test.c
|
||||
|
||||
ifneq ($(DISABLE_BT_FTM),true)
|
||||
LOCAL_SRC_FILES += \
|
||||
ftm_bt.c \
|
||||
ftm_bt_power_pfal_linux.c \
|
||||
ftm_bt_hci_pfal_linux.c \
|
||||
ftm_bt_persist.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(call is-platform-sdk-version-at-least,23),true)
|
||||
LOCAL_CFLAGS += -DANDROID_M
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_HAVE_QCOM_FM),true)
|
||||
ifeq ($(BOARD_HAS_QCA_FM_SOC), "cherokee")
|
||||
LOCAL_SRC_FILES += ftm_fm.c ftm_fm_pfal_linux_3990.c
|
||||
else
|
||||
LOCAL_SRC_FILES += ftm_fm.c ftm_fm_pfal_linux.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(BOARD_ANT_WIRELESS_DEVICE), )
|
||||
LOCAL_SRC_FILES += ftm_ant.c
|
||||
endif
|
||||
|
||||
ifeq ($(findstring true, $(BOARD_HAS_ATH_WLAN) $(BOARD_HAS_ATH_WLAN_AR6320)),true)
|
||||
LOCAL_CFLAGS += -DBOARD_HAS_ATH_WLAN_AR6320
|
||||
LOCAL_CFLAGS += -DCONFIG_FTM_WLAN
|
||||
LOCAL_CFLAGS += -DCONFIG_FTM_WLAN_AUTOLOAD
|
||||
LOCAL_STATIC_LIBRARIES += libtcmd
|
||||
LOCAL_SHARED_LIBRARIES += libnl
|
||||
LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/libtcmd
|
||||
LOCAL_SRC_FILES += ftm_wlan.c
|
||||
endif
|
||||
|
||||
LOCAL_SHARED_LIBRARIES += libdl
|
||||
|
||||
ifneq ($(DISABLE_BT_FTM),true)
|
||||
LOCAL_SHARED_LIBRARIES += libbt-hidlclient
|
||||
endif
|
||||
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
LOCAL_MODULE:= ftmdaemon
|
||||
LOCAL_CLANG := true
|
||||
ifeq ($(PRODUCT_VENDOR_MOVE_ENABLED),true)
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
endif
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_SHARED_LIBRARIES += libdiag
|
||||
LOCAL_SHARED_LIBRARIES += libcutils liblog libhardware
|
||||
|
||||
ifneq ($(DISABLE_BT_FTM),true)
|
||||
LOCAL_SHARED_LIBRARIES += libbtnv
|
||||
endif
|
||||
|
||||
# By default NV persist gets used
|
||||
LOCAL_CFLAGS += -DBT_NV_SUPPORT
|
||||
|
||||
LDFLAGS += -ldl
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
include $(call all-makefiles-under,$(LOCAL_PATH))
|
||||
|
||||
endif # filter
|
||||
endif # is-vendor-board-platform
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user