[OpenWrt-Devel] [PATCH] ramips: add support for ASUS RT-AC57U
Christian Lamparter
chunkeey at gmail.com
Mon Jun 24 15:19:14 EDT 2019
On Monday, June 24, 2019 2:31:57 PM CEST David Bauer wrote:
Some comments below.
> diff --git a/target/linux/ramips/dts/RT-AC57U.dts b/target/linux/ramips/dts/RT-AC57U.dts
> --- /dev/null
> +++ b/target/linux/ramips/dts/RT-AC57U.dts
> @@ -0,0 +1,150 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
> +/dts-v1/;
> +
> +#include "mt7621.dtsi"
> +
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +
> +/ {
> + compatible = "asus,rt-ac57u", "ralink,mt7620a-soc";
"mediatek,mt7621-soc" ?
(From what I know, the machine compatible isn't important
but the ralink,mt7620a-soc looks odd)
> + model = "ASUS RT-AC57U";
> +
> + aliases {
> + led-boot = &led_power;
> + led-failsafe = &led_power;
> + led-running = &led_power;
> + led-upgrade = &led_power;
> + };
> +
> + memory at 0 {
> + device_type = "memory";
> + reg = <0x0 0x8000000>;
> + };
> +
> + chosen {
> + bootargs = "console=ttyS0,57600";
> + };
> +
> + leds {
> + compatible = "gpio-leds";
> +
> + led_power: power {
> + label = "rt-ac57u:blue:power";
> + gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
> + };
> +
> + usb {
> + label = "rt-ac57u:blue:usb";
> + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
> + trigger-sources = <&ehci_port2>;
> + linux,default-trigger = "usbport";
> + };
> + };
> +
> + keys {
> + compatible = "gpio-keys-polled";
The MT7261 should support interrupt-supported gpio-keys.
> + poll-interval = <20>;
> +
> + wps {
> + label = "wps";
> + gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
> + linux,code = <KEY_WPS_BUTTON>;
> + };
> +
> + reset {
> + label = "reset";
> + gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
> + linux,code = <KEY_RESTART>;
> + };
> + };
> +
> + led-regulator {
> + compatible = "regulator-fixed";
> + regulator-name = "LED-Power";
> + gpio = <&gpio1 14 GPIO_ACTIVE_LOW>;
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-always-on;
Just curious, is this regulator related to ASUS "Night mode"
feature? Also did you measure the voltages or is there a
3v3 LED driver on the board?
> + };
> +};
> +
> +&spi0 {
> + status = "okay";
> +
> + flash at 0 {
> + compatible = "jedec,spi-nor";
> + reg = <0>;
> + spi-max-frequency = <10000000>;
I haven't said much about the spi-max-frequencies before
but from what I know thanks to the threads like
"ramips: Increase GB-PC1 SPI frequency to 80MHz" the original
these values are off. And once the target switches to 4.19 (and
uses the upstream mt7621a.dtsi + spi-driver) this needs to be
reworked on all devices I think
> +
> + partitions {
> + compatible = "fixed-partitions";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + partition at 0 {
> + label = "u-boot";
> + reg = <0x0 0x30000>;
> + read-only;
> + };
> +
> + partition at 30000 {
> + label = "config";
> + reg = <0x30000 0x10000>;
> + read-only;
> + };
> +
> + factory: partition at 40000 {
> + label = "factory";
> + reg = <0x40000 0x10000>;
> + read-only;
> + };
> +
> + partition at 50000 {
> + compatible = "denx,uimage";
> + label = "firmware";
> + reg = <0x50000 0xfb0000>;
> + };
> + };
> + };
> +};
> +
> +&pcie {
> + status = "okay";
> +};
> +
> +&pcie0 {
> + wifi at 0,0 {
> + reg = <0x0000 0 0 0 0>;
Please add a compatible. (Binding text lists the right one).
> + mediatek,mtd-eeprom = <&factory 0x8000>;
> +
> + led {
> + led-sources = <2>;
> + led-active-low;
> + };
> + };
> +};
> +
> +&pcie1 {
> + wifi at 0,0 {
> + reg = <0x0000 0 0 0 0>;
Please add a compatible. (Binding text lists the right one).
> + mediatek,mtd-eeprom = <&factory 0x0000>;
> +
> + led {
> + led-active-low;
> + };
> + };
> +};
> +
> +ðernet {
> + mtd-mac-address = <&factory 0x4e000>;
> +};
> +
> +&pinctrl {
> + state_default: pinctrl0 {
> + gpio {
> + ralink,group = "sdhci";
> + ralink,function = "gpio";
> + };
> + };
> +};
Cheers,
Christian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list