Hi, > -----Original Message----- > From: openwrt-devel [mailto:[email protected]] > On Behalf Of Birger Koblitz > Sent: Samstag, 20. Juli 2019 19:36 > To: [email protected] > Subject: [OpenWrt-Devel] [PATCH] ramips: add support for Asus RT-AC85P > > ramips: add Asus RT-AC85P > > SoC: MediaTek MT7621AT dual-core @ 880MHz > RAM: 256M (Winbond W632GG6KB-1) > FLASH: 128MB (Macronix MX30LF1G18AC-TI) > WiFi: - 2.4GHz MediaTek MT7615N bgn > - 5GHz MediaTek MT7615N nac > Switch: SoC integrated Gigabit Switch (4 x LAN, 1 x WAN) > USB: 1 x USB 3.1 (Gen 1) > BTN: Reset, WPS > LED: - Power (blue) > - 5Ghz (blue) > - 2.4GHz (blue) > - Internet (blue) > - 4x LAN (blue) > (LAN/WAN leds are not controllable by GPIOs) > UART: UART is present as Pads marked J4 on the PCB. > 3.3V - TX - RX - GND / 57600-8N1 > 3.3V is the square pad > MAC: The MAC address on the router-label matches the MAC of > the 2.4 GHz WiFi. > LAN and WAN MAC are identical: MAC_LABEL+4 > 5 GHz WiFi MAC: also MAC_LABEL+4
That's a nice idea. We should encourage adding similar description for other
device support commits, too.
Question: So, LAN MAC, WAN MAC AND 5 GHz MAC are the same?
> + asus,rt-ac85p|\
> dlink,dir-860l-b1|\
> elecom,wrc-1167ghbk2-s|\
> elecom,wrc-1900gst|\
Please move the block so sorting of blocks keep correct.
> @@ -532,6 +533,9 @@ ramips_setup_macs()
> lan_mac=$(macaddr_setbit_la "$lan_mac")
> wan_mac=$(mtd_get_mac_binary factory 32772)
> ;;
> + asus,rt-ac85p)
> + wan_mac=$(mtd_get_mac_ascii u-boot-env et1macaddr)
> + ;;
This should be before asus,rt-n56u.
Despite, if WAN_MAC and ethernet MAC address are really the same, you
technically would not need to set eth0.2 (wan) MAC address again.
However, if you completely remove the case here, you will fall into default and
set wrong addresses.
So, one could just set the wan_mac anyway or just add an "empty" case:
> + asus,rt-ac85p)
> + ;;
...
> + compatible = "asus,rt-ac85p", "mediatek,mt7621-soc";
> + model = "Asus RC-AC85P";
RT instead of RC?
> + leds {
> + compatible = "gpio-leds";
Add an empty line here.
> + led_power: power {
> + label = "rt-ac85p:blue:power";
> + gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
> + linux,default-trigger = "phy0tpt";
> + };
> + wlan2g {
> + label = "rt-ac85p:blue:wlan2g";
> + gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
> + linux,default-trigger = "phy0radio";
> + };
> +
> + wlan5g {
> + label = "rt-ac85p:blue:wlan5g";
> + gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
> + linux,default-trigger = "phy1radio";
> + };
> + };
> +};
> +
> +&sdhci {
> + status = "okay";
> +};
> +
> +&nand {
> + status = "okay";
> +
> + partitions {
> + compatible = "fixed-partitions";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + partition@0 {
> + label = "u-boot";
> + reg = <0x0 0xe0000>;
> + read-only;
> + };
> +
> + partition@e0000 {
> + label = "u-boot-env";
> + reg = <0xe0000 0x100000>;
> + read-only;
> + };
> +
> + factory: partition@1e0000 {
> + label = "factory";
> + reg = <0x1e0000 0x100000>;
> + read-only;
> + };
> +
> + factory2: partition@2e0000 {
> + label = "factory2";
> + reg = <0x2e0000 0x100000>;
> + read-only;
> + };
> +
> + partition@3e0000 {
> + label = "kernel";
> + reg = <0x3e0000 0x400000>;
> + };
> +
> + partition@7e0000 {
> + label = "ubi";
> + reg = <0x7e0000 0x2e00000>;
> + };
> +
> + partition@35e0000 {
> + label = "firmware2";
Where is firmware1? kernel+ubi?
> + reg = <0x35e0000 0x3200000>;
> + };
> + };
> +};
> +
> +&pcie {
> + status = "okay";
> +};
> +
> +&pcie0 {
> + wifi@0,0 {
Maybe add "wifi0:" here.
> + compatible = "pci14c3,7603";
> + reg = <0x0000 0 0 0 0>;
> + mediatek,mtd-eeprom = <&factory 0x0000>;
> + ieee80211-freq-limit = <2400000 2500000>;
> + mtd-mac-address = <&factory 0x4>;
> + };
> +};
> +
> +&pcie1 {
> + wifi@0,0 {
Maybe add "wifi1:" here.
> + compatible = "pci14c3,7662";
> + reg = <0x0000 0 0 0 0>;
> + mediatek,mtd-eeprom = <&factory 0x8000>;
> + ieee80211-freq-limit = <5000000 6000000>;
> + mtd-mac-address = <&factory 0x8004>;
> + };
> +};
> +
> +ðernet {
> + mtd-mac-address = <&factory 0xe000>;
So, this is the same as <&factory 0x8004>, but stored twice?
> + mediatek,portmap = "wllll";
> + port@5 {
> + status = "disabled";
> + };
> +};
> +
> +&i2c {
> + status = "disabled";
> +};
> +
> +&pinctrl {
> + state_default: pinctrl0 {
> + gpio {
> + ralink,group = "uart2", "uart3", "i2c";
> + ralink,function = "gpio";
> + };
> + };
> +};
> diff --git a/target/linux/ramips/image/mt7621.mk
> b/target/linux/ramips/image/mt7621.mk
> index 73ded64e74..c1f07ca746 100644
> --- a/target/linux/ramips/image/mt7621.mk
> +++ b/target/linux/ramips/image/mt7621.mk
> @@ -115,6 +115,22 @@ define Device/asus_rt-ac57u endef
> TARGET_DEVICES += asus_rt-ac57u
>
> +define Device/asus_rt-ac85p
> + MTK_SOC := mt7621
> + DEVICE_VENDOR := Asus
Use all caps as for the rt-ac57u.
Best
Adrian
openpgp-digital-signature.asc
Description: PGP signature
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
