Skip to content

Commit 2d465fb

Browse files
kpanic23blocktrron
authored andcommitted
ath79: Add support for Sophos AP15C
The Sophos AP15C uses the same hardware as the AP15, but has a reset button. Based on: commit 6f1efb2 ("ath79: add support for Sophos AP100/AP55 family") author Andrew Powers-Holmes <[email protected]> Fri, 3 Sep 2021 15:53:57 +0200 (23:53 +1000) committer Hauke Mehrtens <[email protected]> Sat, 16 Apr 2022 16:59:29 +0200 (16:59 +0200) Unique to AP15C: - Reset button - External RJ45 serial console port Flashing instructions: This firmware can be flashed either via a compatible Sophos SG or XG firewall appliance, which does not require disassembling the device, or via the U-Boot console available on the internal UART header. To flash via XG appliance: - Register on Sophos' website for a no-cost Home Use XG firewall license - Download and install the XG software on a compatible PC or virtual machine, complete initial appliance setup, and enable SSH console access - Connect the target AP device to the XG appliance's LAN interface - Approve the AP from the XG Web UI and wait until it shows as Active (this can take 3-5 minutes) - Connect to the XG appliance over SSH and access the Advanced Console (Menu option 5, then menu option 3) - Run `sudo awetool` and select the menu option to connect to an AP via SSH. When prompted to enable SSH on the target AP, select Yes. - Wait 2-3 minutes, then select the AP from the awetool menu again. This will connect you to a root shell on the target AP. - Copy the firmware to /tmp/openwrt.bin on the target AP via SCP/TFTP/etc - Run `mtd -r write /tmp/openwrt.bin astaro_image` - When complete, the access point will reboot to OpenWRT. To flash via U-Boot serial console: - Configure a TFTP server on your PC, and set IP address 192.168.99.8 with netmask 255.255.255.0 - Copy the firmware .bin to the TFTP server and rename to 'uImage_AP15C' - Open the target AP's enclosure and locate the 4-pin 3.3V UART header [4] - Connect the AP ethernet to your PC's ethernet port - Connect a terminal to the UART at 115200 8/N/1 as usual - Power on the AP and press a key to cancel autoboot when prompted - Run the following commands at the U-Boot console: - `tftpboot` - `cp.b $fileaddr 0x9f070000 $filesize` - `boot` - The access point will boot to OpenWRT. Signed-off-by: David Lutz <[email protected]> (cherry picked from commit a7abc7e)
1 parent faebcc6 commit 2d465fb

File tree

4 files changed

+169
-0
lines changed

4 files changed

+169
-0
lines changed

package/boot/uboot-envtools/files/ath79

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ ruckus,zf7372)
163163
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x40000" "0x10000"
164164
;;
165165
sophos,ap15|\
166+
sophos,ap15c|\
166167
sophos,ap55|\
167168
sophos,ap55c|\
168169
sophos,ap100|\
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2+
3+
#include "qca955x.dtsi"
4+
5+
#include <dt-bindings/gpio/gpio.h>
6+
#include <dt-bindings/input/input.h>
7+
#include <dt-bindings/leds/common.h>
8+
9+
/ {
10+
compatible = "sophos,ap15c", "qca,qca9557";
11+
model = "Sophos AP15C";
12+
13+
aliases {
14+
led-boot = &led_status_green;
15+
led-failsafe = &led_status_yellow;
16+
led-running = &led_status_green;
17+
led-upgrade = &led_status_yellow;
18+
label-mac-device = &eth0;
19+
};
20+
21+
chosen {
22+
bootargs = "console=ttyS0,115200n8";
23+
};
24+
25+
keys {
26+
compatible = "gpio-keys";
27+
28+
reset {
29+
label = "reset";
30+
linux,code = <KEY_RESTART>;
31+
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
32+
debounce-interval = <60>;
33+
};
34+
};
35+
36+
leds {
37+
compatible = "gpio-leds";
38+
39+
led_status_green: status_green {
40+
function = LED_FUNCTION_STATUS;
41+
color = <LED_COLOR_ID_GREEN>;
42+
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
43+
default-state = "on";
44+
};
45+
46+
led_status_yellow: status_yellow {
47+
function = LED_FUNCTION_STATUS;
48+
color = <LED_COLOR_ID_YELLOW>;
49+
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
50+
};
51+
};
52+
};
53+
54+
&spi {
55+
status = "okay";
56+
57+
flash@0 {
58+
compatible = "jedec,spi-nor";
59+
reg = <0>;
60+
spi-max-frequency = <25000000>;
61+
62+
partitions {
63+
compatible = "fixed-partitions";
64+
#address-cells = <1>;
65+
#size-cells = <1>;
66+
67+
partition@0 {
68+
label = "u-boot";
69+
reg = <0x000000 0x040000>;
70+
read-only;
71+
};
72+
73+
partition@40000 {
74+
label = "u-boot-env";
75+
reg = <0x040000 0x010000>;
76+
};
77+
78+
partition@50000 {
79+
label = "art";
80+
reg = <0x050000 0x010000>;
81+
read-only;
82+
83+
nvmem-layout {
84+
compatible = "fixed-layout";
85+
#address-cells = <1>;
86+
#size-cells = <1>;
87+
88+
cal_art_1000: calibration@1000 {
89+
reg = <0x1000 0x440>;
90+
};
91+
};
92+
};
93+
94+
partition@60000 {
95+
label = "config";
96+
reg = <0x060000 0x010000>;
97+
read-only;
98+
99+
nvmem-layout {
100+
compatible = "fixed-layout";
101+
#address-cells = <1>;
102+
#size-cells = <1>;
103+
104+
macaddr_config_201a: macaddr@201a {
105+
reg = <0x201a 0x6>;
106+
};
107+
};
108+
};
109+
110+
partition@70000 {
111+
compatible = "denx,uimage";
112+
label = "firmware";
113+
reg = <0x070000 0xf90000>;
114+
};
115+
};
116+
};
117+
};
118+
119+
&mdio0 {
120+
status = "okay";
121+
122+
phy-mask = <0x10>;
123+
124+
phy4: ethernet-phy@4 {
125+
reg = <4>;
126+
eee-broken-100tx;
127+
eee-broken-1000t;
128+
};
129+
};
130+
131+
&eth0 {
132+
status = "okay";
133+
134+
pll-data = <0xa6000000 0xa0000101 0xa0001313>;
135+
136+
nvmem-cells = <&macaddr_config_201a>;
137+
nvmem-cell-names = "mac-address";
138+
139+
phy-mode = "rgmii-id";
140+
phy-handle = <&phy4>;
141+
142+
gmac_config: gmac-config {
143+
device = <&gmac>;
144+
145+
rgmii-enabled = <1>;
146+
147+
rxdv-delay = <3>;
148+
rxd-delay = <3>;
149+
txen-delay = <3>;
150+
txd-delay = <3>;
151+
};
152+
};
153+
154+
&wmac {
155+
status = "okay";
156+
157+
nvmem-cells = <&cal_art_1000>;
158+
nvmem-cell-names = "calibration";
159+
};

target/linux/ath79/generic/base-files/etc/board.d/02_network

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ ath79_setup_interfaces()
7676
ruckus,zf7351|\
7777
siemens,ws-ap3610|\
7878
sophos,ap15|\
79+
sophos,ap15c|\
7980
sophos,ap55|\
8081
sophos,ap55c|\
8182
sophos,ap100|\

target/linux/ath79/image/generic.mk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2972,6 +2972,14 @@ define Device/sophos_ap15
29722972
endef
29732973
TARGET_DEVICES += sophos_ap15
29742974

2975+
define Device/sophos_ap15c
2976+
SOC := qca9557
2977+
DEVICE_VENDOR := Sophos
2978+
DEVICE_MODEL := AP15C
2979+
IMAGE_SIZE := 15936k
2980+
endef
2981+
TARGET_DEVICES += sophos_ap15c
2982+
29752983
define Device/sophos_ap55
29762984
SOC := qca9558
29772985
DEVICE_VENDOR := Sophos

0 commit comments

Comments
 (0)