Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ath79: add support for onion omega #2

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
138 changes: 138 additions & 0 deletions target/linux/ath79/dts/ar9331_onion_omega.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

#include "ar9331.dtsi"

/ {
model = "Onion Omega";
compatible = "onion,omega", "qca,ar9331";

aliases {
serial0 = &uart;
led-boot = &led_system;
led-failsafe = &led_system;
led-running = &led_system;
led-upgrade = &led_system;
};

leds {
compatible = "gpio-leds";

led_system: system {
label = "onion:amber:system";
gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
};
};

keys {
compatible = "gpio-keys-polled";
poll-interval = <100>;

button0 {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
};
};
};

&ref {
clock-frequency = <25000000>;
};

&uart {
status = "okay";
};

&gpio {
status = "okay";
};

&usb {
status = "okay";

dr_mode = "host";
};

&usb_phy {
status = "okay";
};

&eth0 {
status = "okay";

compatible = "syscon", "simple-mfd";
};

&eth1 {
status = "okay";

nvmem-cells = <&macaddr_uboot_1fc00>;
nvmem-cell-names = "mac-address";
mac-address-increment = <(-1)>;
AiyionPrime marked this conversation as resolved.
Show resolved Hide resolved

gmac-config {
device = <&gmac>;
switch-phy-addr-swap = <4>;
switch-phy-swap = <4>;
};
};


&spi {
status = "okay";

num-chipselects = <1>;

/* Winbond 25Q128FVSG SPI flash */
flash@0 {
compatible = "winbond,w25q128", "jedec,spi-nor";
spi-max-frequency = <25000000>;
reg = <0>;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

uboot: partition@0 {
label = "u-boot";
reg = <0x000000 0x020000>;
read-only;
};

partition@20000 {
compatible = "tplink,firmware";
label = "firmware";
reg = <0x020000 0xfd0000>;
};

art: partition@ff0000 {
label = "art";
reg = <0xff0000 0x010000>;
read-only;
};
};
};
};

&wmac {
status = "okay";

mtd-cal-data = <&art 0x1000>;
nvmem-cells = <&macaddr_uboot_1fc00>;
nvmem-cell-names = "mac-address";
};

&uboot {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

macaddr_uboot_1fc00: macaddr@1fc00 {
reg = <0x1fc00 0x6>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ ath79_setup_interfaces()
netgear,ex7300|\
ocedo,koala|\
ocedo,raccoon|\
onion,omega|\
openmesh,mr600-v1|\
openmesh,mr600-v2|\
openmesh,mr900-v1|\
Expand Down
14 changes: 14 additions & 0 deletions target/linux/ath79/image/generic.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1653,6 +1653,20 @@ define Device/ocedo_ursus
endef
TARGET_DEVICES += ocedo_ursus

define Device/onion_omega
$(Device/tplink-16mlzma)
SOC := ar9331
DEVICE_VENDOR := Onion
DEVICE_MODEL := Omega
DEVICE_PACKAGES := kmod-usb-core kmod-usb2
SUPPORTED_DEVICES += onion-omega
KERNEL := kernel-bin | append-dtb | lzma
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma
IMAGE_SIZE := 16192k
TPLINK_HWID := 0x04700001
endef
TARGET_DEVICES += onion_omega

define Device/openmesh_common_64k
DEVICE_VENDOR := OpenMesh
DEVICE_PACKAGES := uboot-envtools
Expand Down