gl-infra-builder-FUjr/patches-wlan-ap-5.4/0001-ax1800-axt1800-fit-dts-for-gl-inet.patch
Jianhui Zhao 34774a1a41 ax1800/axt1800: add kernel 5.4 support
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
2022-05-24 16:39:22 +08:00

193 lines
5.3 KiB
Diff

From 0ec6cdcaccb31d22ab7244bf0577ac99f21160de Mon Sep 17 00:00:00 2001
From: Jianhui Zhao <jianhui.zhao@gl-inet.com>
Date: Mon, 23 May 2022 16:24:07 +0800
Subject: [PATCH] ax1800/axt1800: fit dts for gl.inet
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
---
.../boot/dts/qcom/qcom-ipq6018-gl-ax1800.dts | 6 +++
.../boot/dts/qcom/qcom-ipq6018-gl-ax1800.dtsi | 42 ++++++++++++++-----
.../boot/dts/qcom/qcom-ipq6018-gl-axt1800.dts | 35 ++++++++++++++--
3 files changed, 69 insertions(+), 14 deletions(-)
diff --git a/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dts b/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dts
index 77682246..9f98ef6d 100644
--- a/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dts
+++ b/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dts
@@ -27,6 +27,12 @@
};
};
+&gl_hw {
+ model = "ax1800";
+ lan = "eth1 eth2 eth3 eth4";
+ usb-port = "1-1";
+};
+
&mdio0 {
phy3: ethernet-phy@3 {
reg = <3>;
diff --git a/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dtsi b/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dtsi
index 3afff938..f8d44187 100644
--- a/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dtsi
+++ b/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dtsi
@@ -28,11 +28,6 @@
ethernet0 = "/soc/dp1";
ethernet1 = "/soc/dp2";
ethernet2 = "/soc/dp3";
-
- led-boot = &led_run;
- led-failsafe = &led_run;
- led-running = &led_run;
- led-upgrade = &led_run;
};
chosen {
@@ -44,6 +39,25 @@
#endif
};
+ gl_hw: gl_hw {
+ compatible = "gl-hw-info";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ model = "axt1800";
+ wan = "eth0";
+ switch-button = "gpio-16";
+ reset-button = "gpio-50";
+ usb-port = "1-1";
+ flash_size = <128>;
+ factory_data {
+ device_mac = "0:ART", "0x0";
+ device_ddns = "0:ART", "0x20";
+ device_sn_bak = "0:ART", "0x30";
+ device_sn = "0:ART", "0x40";
+ country_code = "0:ART", "0x98";
+ };
+ };
+
/*
* +=========+==============+========================+
* | | | |
@@ -241,7 +255,7 @@
pinctrl-0 = <&leds_pins>;
pinctrl-names = "default";
- led_run: led@35 {
+ led@35 {
label = "white:sys";
gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>;
default-state = "on";
@@ -274,6 +288,18 @@
debounce-interval = <60>;
};
};
+
+ gpio-export {
+ compatible = "gpio-export";
+ pinctrl-0 = <&usb_pins>;
+ pinctrl-names = "default";
+
+ usb_power {
+ gpio-export,name = "usb_power";
+ gpio-export,output = <1>;
+ gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
+ };
+ };
};
&blsp1_uart3 {
@@ -324,7 +350,6 @@
864000 1100000
1056000 1100000
1200000 1100000
- 1608000 1100000
>;
clock-latency = <200000>;
};
@@ -335,7 +360,6 @@
864000 1100000
1056000 1100000
1200000 1100000
- 1608000 1100000
>;
clock-latency = <200000>;
};
@@ -346,7 +370,6 @@
864000 1100000
1056000 1100000
1200000 1100000
- 1608000 1100000
>;
clock-latency = <200000>;
};
@@ -357,7 +380,6 @@
864000 1100000
1056000 1100000
1200000 1100000
- 1608000 1100000
>;
clock-latency = <200000>;
};
diff --git a/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-axt1800.dts b/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-axt1800.dts
index 0e5de3f1..483a6559 100644
--- a/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-axt1800.dts
+++ b/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-axt1800.dts
@@ -24,6 +24,21 @@
aliases {
sdhc0 = &sdhc_2;
};
+
+ gl_fan {
+ compatible = "gl-fan";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ fan_speed_gpio = <31>;
+ };
+};
+
+&gl_hw {
+ model = "axt1800";
+ lan = "eth1 eth2";
+ usb-port = "1-1";
+ fan = "pwmchip0";
+ dfs;
};
&tlmm {
@@ -73,15 +88,27 @@
status = "ok";
};
- pwm-fan {
+ fan0: pwm-fan {
compatible = "pwm-fan";
pinctrl-0 = <&fan_pins>;
pinctrl-names = "default";
cooling-min-state = <0>;
- cooling-max-state = <3>;
+ cooling-max-state = <255>;
#cooling-cells = <2>;
- pwms = <&pwm 1 255>;
- cooling-levels = <0 150 200 255>;
+ pwms = <&pwm 1 40000 0>;
+ cooling-levels = <0 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
+ 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 37 38 39
+ 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
+ 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
+ 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
+ 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
+ 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
+ 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
+ 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
+ 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
+ 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
+ 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
+ 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255>;
};
};
--
2.25.1