Skip to content

Commit 22899e7

Browse files
achterinhauke
authored andcommitted
ath79: Unify Sophos AP15/AP15C dts files
The recently added AP15C dts file only differs by the definition of the reset button. Unify the shared definition into a dtsi to reduce code duplication. Signed-off-by: Christoph Krapp <[email protected]> Tested-by: Martin Blumenstingl <[email protected]> Link: openwrt/openwrt#16998 Signed-off-by: Hauke Mehrtens <[email protected]>
1 parent ac8d30a commit 22899e7

File tree

3 files changed

+147
-282
lines changed

3 files changed

+147
-282
lines changed
Lines changed: 1 addition & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -1,148 +1,8 @@
11
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
22

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>
3+
#include "qca9557_sophos_ap15.dtsi"
84

95
/ {
106
compatible = "sophos,ap15", "qca,qca9557";
117
model = "Sophos AP15";
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-
leds {
26-
compatible = "gpio-leds";
27-
28-
led_status_green: status_green {
29-
function = LED_FUNCTION_STATUS;
30-
color = <LED_COLOR_ID_GREEN>;
31-
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
32-
default-state = "on";
33-
};
34-
35-
led_status_yellow: status_yellow {
36-
function = LED_FUNCTION_STATUS;
37-
color = <LED_COLOR_ID_YELLOW>;
38-
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
39-
};
40-
};
41-
};
42-
43-
&spi {
44-
status = "okay";
45-
46-
flash@0 {
47-
compatible = "jedec,spi-nor";
48-
reg = <0>;
49-
spi-max-frequency = <25000000>;
50-
51-
partitions {
52-
compatible = "fixed-partitions";
53-
#address-cells = <1>;
54-
#size-cells = <1>;
55-
56-
partition@0 {
57-
label = "u-boot";
58-
reg = <0x000000 0x040000>;
59-
read-only;
60-
};
61-
62-
partition@40000 {
63-
label = "u-boot-env";
64-
reg = <0x040000 0x010000>;
65-
};
66-
67-
partition@50000 {
68-
label = "art";
69-
reg = <0x050000 0x010000>;
70-
read-only;
71-
72-
nvmem-layout {
73-
compatible = "fixed-layout";
74-
#address-cells = <1>;
75-
#size-cells = <1>;
76-
77-
cal_art_1000: calibration@1000 {
78-
reg = <0x1000 0x440>;
79-
};
80-
};
81-
};
82-
83-
partition@60000 {
84-
label = "config";
85-
reg = <0x060000 0x010000>;
86-
read-only;
87-
88-
nvmem-layout {
89-
compatible = "fixed-layout";
90-
#address-cells = <1>;
91-
#size-cells = <1>;
92-
93-
macaddr_config_201a: macaddr@201a {
94-
reg = <0x201a 0x6>;
95-
};
96-
};
97-
};
98-
99-
partition@70000 {
100-
compatible = "denx,uimage";
101-
label = "firmware";
102-
reg = <0x070000 0xf90000>;
103-
};
104-
};
105-
};
106-
};
107-
108-
&mdio0 {
109-
status = "okay";
110-
111-
phy-mask = <0x10>;
112-
113-
phy4: ethernet-phy@4 {
114-
reg = <4>;
115-
eee-broken-100tx;
116-
eee-broken-1000t;
117-
};
118-
};
119-
120-
&eth0 {
121-
status = "okay";
122-
123-
pll-data = <0xa6000000 0xa0000101 0xa0001313>;
124-
125-
nvmem-cells = <&macaddr_config_201a>;
126-
nvmem-cell-names = "mac-address";
127-
128-
phy-mode = "rgmii-id";
129-
phy-handle = <&phy4>;
130-
131-
gmac_config: gmac-config {
132-
device = <&gmac>;
133-
134-
rgmii-enabled = <1>;
135-
136-
rxdv-delay = <3>;
137-
rxd-delay = <3>;
138-
txen-delay = <3>;
139-
txd-delay = <3>;
140-
};
141-
};
142-
143-
&wmac {
144-
status = "okay";
145-
146-
nvmem-cells = <&cal_art_1000>;
147-
nvmem-cell-names = "calibration";
1488
};
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
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+
aliases {
11+
led-boot = &led_status_green;
12+
led-failsafe = &led_status_yellow;
13+
led-running = &led_status_green;
14+
led-upgrade = &led_status_yellow;
15+
label-mac-device = &eth0;
16+
};
17+
18+
chosen {
19+
bootargs = "console=ttyS0,115200n8";
20+
};
21+
22+
leds {
23+
compatible = "gpio-leds";
24+
25+
led_status_green: status_green {
26+
function = LED_FUNCTION_STATUS;
27+
color = <LED_COLOR_ID_GREEN>;
28+
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
29+
default-state = "on";
30+
};
31+
32+
led_status_yellow: status_yellow {
33+
function = LED_FUNCTION_STATUS;
34+
color = <LED_COLOR_ID_YELLOW>;
35+
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
36+
};
37+
};
38+
};
39+
40+
&spi {
41+
status = "okay";
42+
43+
flash@0 {
44+
compatible = "jedec,spi-nor";
45+
reg = <0>;
46+
spi-max-frequency = <25000000>;
47+
48+
partitions {
49+
compatible = "fixed-partitions";
50+
#address-cells = <1>;
51+
#size-cells = <1>;
52+
53+
partition@0 {
54+
label = "u-boot";
55+
reg = <0x000000 0x040000>;
56+
read-only;
57+
};
58+
59+
partition@40000 {
60+
label = "u-boot-env";
61+
reg = <0x040000 0x010000>;
62+
};
63+
64+
partition@50000 {
65+
label = "art";
66+
reg = <0x050000 0x010000>;
67+
read-only;
68+
69+
nvmem-layout {
70+
compatible = "fixed-layout";
71+
#address-cells = <1>;
72+
#size-cells = <1>;
73+
74+
cal_art_1000: calibration@1000 {
75+
reg = <0x1000 0x440>;
76+
};
77+
};
78+
};
79+
80+
partition@60000 {
81+
label = "config";
82+
reg = <0x060000 0x010000>;
83+
read-only;
84+
85+
nvmem-layout {
86+
compatible = "fixed-layout";
87+
#address-cells = <1>;
88+
#size-cells = <1>;
89+
90+
macaddr_config_201a: macaddr@201a {
91+
reg = <0x201a 0x6>;
92+
};
93+
};
94+
};
95+
96+
partition@70000 {
97+
compatible = "denx,uimage";
98+
label = "firmware";
99+
reg = <0x070000 0xf90000>;
100+
};
101+
};
102+
};
103+
};
104+
105+
&mdio0 {
106+
status = "okay";
107+
108+
phy-mask = <0x10>;
109+
110+
phy4: ethernet-phy@4 {
111+
reg = <4>;
112+
eee-broken-100tx;
113+
eee-broken-1000t;
114+
};
115+
};
116+
117+
&eth0 {
118+
status = "okay";
119+
120+
pll-data = <0xa6000000 0xa0000101 0xa0001313>;
121+
122+
nvmem-cells = <&macaddr_config_201a>;
123+
nvmem-cell-names = "mac-address";
124+
125+
phy-mode = "rgmii-id";
126+
phy-handle = <&phy4>;
127+
128+
gmac_config: gmac-config {
129+
device = <&gmac>;
130+
131+
rgmii-enabled = <1>;
132+
133+
rxdv-delay = <3>;
134+
rxd-delay = <3>;
135+
txen-delay = <3>;
136+
txd-delay = <3>;
137+
};
138+
};
139+
140+
&wmac {
141+
status = "okay";
142+
143+
nvmem-cells = <&cal_art_1000>;
144+
nvmem-cell-names = "calibration";
145+
};

0 commit comments

Comments
 (0)