-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qualcommax:ipq60xx: add Redmi AX5、Xiaomi AX1800
- Loading branch information
OpenWrt Builder
committed
Mar 12, 2024
1 parent
d71ea99
commit aa79059
Showing
21 changed files
with
352 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-ax1800.dts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT | ||
|
||
/dts-v1/; | ||
|
||
#include "ipq6018-xiaomi.dtsi" | ||
|
||
/ { | ||
model = "Xiaomi AX1800"; | ||
compatible = "xiaomi,ax1800", "qcom,ipq6018"; | ||
}; | ||
|
||
&wifi { | ||
qcom,ath11k-calibration-variant = "Xiaomi-AX1800"; | ||
}; |
14 changes: 14 additions & 0 deletions
14
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-ax5.dts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT | ||
|
||
/dts-v1/; | ||
|
||
#include "ipq6018-xiaomi.dtsi" | ||
|
||
/ { | ||
model = "Redmi AX5"; | ||
compatible = "redmi,ax5", "qcom,ipq6018"; | ||
}; | ||
|
||
&wifi { | ||
qcom,ath11k-calibration-variant = "Redmi-AX5"; | ||
}; |
259 changes: 259 additions & 0 deletions
259
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-xiaomi.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,259 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT | ||
|
||
/dts-v1/; | ||
|
||
#include "ipq6018.dtsi" | ||
#include "ipq6018-cp-cpu.dtsi" | ||
#include "ipq6018-ess.dtsi" | ||
|
||
#include <dt-bindings/gpio/gpio.h> | ||
#include <dt-bindings/input/input.h> | ||
|
||
/ { | ||
qcom,msm-id = <0x192 0x0>; | ||
|
||
aliases { | ||
serial0 = &blsp1_uart3; | ||
led-boot = &led_yellow; | ||
led-failsafe = &led_blue; | ||
led-running = &led_blue; | ||
led-upgrade = &led_yellow; | ||
|
||
/* Aliases as required by u-boot to patch MAC addresses */ | ||
//ethernet0 = &dp1; | ||
ethernet1 = &dp2; | ||
ethernet2 = &dp3; | ||
ethernet3 = &dp4; | ||
ethernet4 = &dp5; | ||
|
||
label-mac-device = &dp5; | ||
}; | ||
|
||
chosen { | ||
bootargs-append = " root=/dev/ubiblock0_1 swiotlb=1 coherent_pool=2M"; | ||
}; | ||
|
||
leds { | ||
compatible = "gpio-leds"; | ||
pinctrl-0 = <&leds_pins>; | ||
pinctrl-names = "default"; | ||
|
||
led_blue: system-blue { | ||
label = "blue:system"; | ||
gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
led_yellow: system-yellow { | ||
label = "yellow:system"; | ||
gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
network-blue { | ||
label = "blue:network"; | ||
gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
network-yellow { | ||
label = "yellow:network"; | ||
gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>; | ||
}; | ||
}; | ||
|
||
keys { | ||
compatible = "gpio-keys"; | ||
pinctrl-0 = <&button_pins>; | ||
pinctrl-names = "default"; | ||
|
||
reset { | ||
label = "reset"; | ||
linux,code = <KEY_RESTART>; | ||
gpios = <&tlmm 19 GPIO_ACTIVE_LOW>; | ||
linux,input-type = <1>; | ||
debounce-interval = <60>; | ||
}; | ||
}; | ||
}; | ||
|
||
// Overclock CPU frequency to 1.6GHz | ||
&cpu_opp_table { | ||
opp-1608000000 { | ||
opp-supported-hw = <0x3>; | ||
}; | ||
}; | ||
|
||
&tlmm { | ||
leds_pins: leds_pins { | ||
mux { | ||
pins = "gpio29", "gpio30", "gpio31", "gpio32"; | ||
function = "gpio"; | ||
drive-strength = <8>; | ||
bias-pull-down; | ||
}; | ||
}; | ||
|
||
button_pins: button_pins { | ||
reset_button { | ||
pins = "gpio19"; | ||
function = "gpio"; | ||
drive-strength = <8>; | ||
bias-pull-up; | ||
}; | ||
}; | ||
|
||
mdio_pins: mdio-pins { | ||
mdc { | ||
pins = "gpio64"; | ||
function = "mdc"; | ||
drive-strength = <8>; | ||
bias-pull-up; | ||
}; | ||
|
||
mdio { | ||
pins = "gpio65"; | ||
function = "mdio"; | ||
drive-strength = <8>; | ||
bias-pull-up; | ||
}; | ||
}; | ||
}; | ||
|
||
&blsp1_uart3 { | ||
pinctrl-0 = <&serial_3_pins>; | ||
pinctrl-names = "default"; | ||
status = "okay"; | ||
}; | ||
|
||
&qpic_bam { | ||
status = "okay"; | ||
}; | ||
|
||
&qpic_nand { | ||
status = "okay"; | ||
|
||
nand@0 { | ||
reg = <0>; | ||
|
||
nand-ecc-strength = <4>; | ||
nand-ecc-step-size = <512>; | ||
nand-bus-width = <8>; | ||
|
||
partitions { | ||
compatible = "qcom,smem-part"; | ||
}; | ||
}; | ||
}; | ||
|
||
&mdio { | ||
status = "okay"; | ||
|
||
pinctrl-0 = <&mdio_pins>; | ||
pinctrl-names = "default"; | ||
reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>; | ||
|
||
ethernet-phy-package@0 { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
compatible = "qcom,qca8075-package"; | ||
reg = <0>; | ||
|
||
qcom,package-mode = "psgmii"; | ||
|
||
qca8075_1: ethernet-phy@1 { | ||
compatible = "ethernet-phy-ieee802.3-c22"; | ||
reg = <1>; | ||
}; | ||
|
||
qca8075_2: ethernet-phy@2 { | ||
compatible = "ethernet-phy-ieee802.3-c22"; | ||
reg = <2>; | ||
}; | ||
|
||
qca8075_3: ethernet-phy@3 { | ||
compatible = "ethernet-phy-ieee802.3-c22"; | ||
reg = <3>; | ||
}; | ||
|
||
qca8075_4: ethernet-phy@4 { | ||
compatible = "ethernet-phy-ieee802.3-c22"; | ||
reg = <4>; | ||
}; | ||
}; | ||
}; | ||
|
||
&switch { | ||
status = "okay"; | ||
|
||
switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */ | ||
switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */ | ||
switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy 0 */ | ||
|
||
qcom,port_phyinfo { | ||
port@2 { | ||
port_id = <2>; | ||
phy_address = <1>; | ||
}; | ||
port@3 { | ||
port_id = <3>; | ||
phy_address = <2>; | ||
}; | ||
port@4 { | ||
port_id = <4>; | ||
phy_address = <3>; | ||
}; | ||
port@5 { | ||
port_id = <5>; | ||
phy_address = <4>; | ||
}; | ||
}; | ||
}; | ||
|
||
&edma { | ||
status = "okay"; | ||
}; | ||
|
||
&dp2 { | ||
status = "okay"; | ||
phy-handle = <&qca8075_1>; | ||
label = "lan1"; | ||
}; | ||
|
||
&dp3 { | ||
status = "okay"; | ||
phy-handle = <&qca8075_2>; | ||
label = "lan2"; | ||
}; | ||
|
||
&dp4 { | ||
status = "okay"; | ||
phy-handle = <&qca8075_3>; | ||
label = "lan3"; | ||
}; | ||
|
||
&dp5 { | ||
status = "okay"; | ||
phy-handle = <&qca8075_4>; | ||
phy-mode = "psgmii"; | ||
label = "wan"; | ||
}; | ||
|
||
&wifi { | ||
status = "okay"; | ||
|
||
qcom,ath11k-fw-memory-mode = <1>; | ||
}; | ||
|
||
&qusb_phy_0 { | ||
status = "ok"; | ||
}; | ||
|
||
&ssphy_0 { | ||
status = "ok"; | ||
}; | ||
|
||
&usb2 { | ||
status = "okay"; | ||
}; | ||
|
||
&usb3 { | ||
status = "ok"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
. /lib/functions/uci-defaults.sh | ||
|
||
board_config_update | ||
|
||
board=$(board_name) | ||
|
||
case "$board" in | ||
redmi,ax5|\ | ||
xiaomi,ax1800) | ||
ucidef_set_led_netdev "internet" "Internet" "blue:network" "wan" | ||
;; | ||
|
||
*) | ||
;; | ||
esac | ||
|
||
board_config_flush | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.