ath79: add support for ALFA Network AP121F
This commit ports support for the ALFA Network AP121F, a pocket-size
router with 1 Ethernet and 2.4 GHz WiFi based on the AR9331 SoC, to the
ath79 target (it was already supported in ar71xx; see commit 0c6165d2
for more details).
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
[pepe2k@gmail.com: fixed GPIO polarity, included USB support, changed
DTS nodes order, moved WLAN LED trigger define to DTS, made U-Boot env
partition writable]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
			
			
This commit is contained in:
		 Roger Pueyo Centelles
					Roger Pueyo Centelles
				
			
				
					committed by
					
						 Piotr Dymacz
						Piotr Dymacz
					
				
			
			
				
	
			
			
			 Piotr Dymacz
						Piotr Dymacz
					
				
			
						parent
						
							12840674d0
						
					
				
				
					commit
					334bbc5198
				
			| @@ -12,6 +12,9 @@ case "$board" in | |||||||
| 	ucidef_set_led_netdev "lan" "LAN" "$boardname:orange:eth0" "eth0" | 	ucidef_set_led_netdev "lan" "LAN" "$boardname:orange:eth0" "eth0" | ||||||
| 	ucidef_set_led_switch "wan" "WAN" "$boardname:orange:eth1" "switch0" "0x04" | 	ucidef_set_led_switch "wan" "WAN" "$boardname:orange:eth1" "switch0" "0x04" | ||||||
| 	;; | 	;; | ||||||
|  | alfa-network,ap121f) | ||||||
|  | 	ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth0" | ||||||
|  | 	;; | ||||||
| avm,fritz300e) | avm,fritz300e) | ||||||
| 	ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth0" | 	ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth0" | ||||||
| 	ucidef_set_rssimon "wlan0" "200000" "1" | 	ucidef_set_rssimon "wlan0" "200000" "1" | ||||||
|   | |||||||
| @@ -11,6 +11,7 @@ ath79_setup_interfaces() | |||||||
| 	case "$board" in | 	case "$board" in | ||||||
| 	adtran,bsap1800-v2|\ | 	adtran,bsap1800-v2|\ | ||||||
| 	adtran,bsap1840|\ | 	adtran,bsap1840|\ | ||||||
|  | 	alfa-network,ap121f|\ | ||||||
| 	aruba,ap-105|\ | 	aruba,ap-105|\ | ||||||
| 	avm,fritz300e|\ | 	avm,fritz300e|\ | ||||||
| 	devolo,dvl1200i|\ | 	devolo,dvl1200i|\ | ||||||
|   | |||||||
							
								
								
									
										134
									
								
								target/linux/ath79/dts/ar9331_alfa-network_ap121f.dts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										134
									
								
								target/linux/ath79/dts/ar9331_alfa-network_ap121f.dts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,134 @@ | |||||||
|  | // 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 = "ALFA Network AP121F"; | ||||||
|  | 	compatible = "alfa-network,ap121f", "qca,ar9331"; | ||||||
|  |  | ||||||
|  | 	aliases { | ||||||
|  | 		label-mac-device = &wmac; | ||||||
|  | 		led-boot = &vpn; | ||||||
|  | 		led-failsafe = &vpn; | ||||||
|  | 		led-upgrade = &vpn; | ||||||
|  | 		serial0 = &uart; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	keys { | ||||||
|  | 		compatible = "gpio-keys"; | ||||||
|  |  | ||||||
|  | 		reset { | ||||||
|  | 			label = "reset"; | ||||||
|  | 			linux,code = <KEY_RESTART>; | ||||||
|  | 			gpios = <&gpio 12 GPIO_ACTIVE_LOW>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		switch { | ||||||
|  | 			label = "switch"; | ||||||
|  | 			linux,code = <BTN_0>; | ||||||
|  | 			gpios = <&gpio 21 GPIO_ACTIVE_HIGH>; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	leds { | ||||||
|  | 		compatible = "gpio-leds"; | ||||||
|  |  | ||||||
|  | 		lan { | ||||||
|  | 			label = "ap121f:green:lan"; | ||||||
|  | 			gpios = <&gpio 17 GPIO_ACTIVE_LOW>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		vpn: vpn { | ||||||
|  | 			label = "ap121f:green:vpn"; | ||||||
|  | 			gpios = <&gpio 27 GPIO_ACTIVE_LOW>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		wlan { | ||||||
|  | 			label = "ap121f:green:wlan"; | ||||||
|  | 			gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; | ||||||
|  | 			linux,default-trigger = "phy0tpt"; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | ð0 { | ||||||
|  | 	status = "okay"; | ||||||
|  | 	mtd-mac-address = <&art 0x0>; | ||||||
|  |  | ||||||
|  | 	gmac-config { | ||||||
|  | 		device = <&gmac>; | ||||||
|  | 		switch-phy-addr-swap = <0>; | ||||||
|  | 		switch-phy-swap = <0>; | ||||||
|  | 	}; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | ð1 { | ||||||
|  | 	status = "okay"; | ||||||
|  | 	compatible = "syscon", "simple-mfd"; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &gpio { | ||||||
|  | 	status = "okay"; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &spi { | ||||||
|  | 	status = "okay"; | ||||||
|  | 	num-cs = <1>; | ||||||
|  |  | ||||||
|  | 	flash@0 { | ||||||
|  | 		compatible = "jedec,spi-nor"; | ||||||
|  | 		reg = <0>; | ||||||
|  | 		spi-max-frequency = <25000000>; | ||||||
|  |  | ||||||
|  | 		partitions { | ||||||
|  | 			compatible = "fixed-partitions"; | ||||||
|  | 			#address-cells = <1>; | ||||||
|  | 			#size-cells = <1>; | ||||||
|  |  | ||||||
|  | 			partition@0 { | ||||||
|  | 				label = "u-boot"; | ||||||
|  | 				reg = <0x000000 0x030000>; | ||||||
|  | 				read-only; | ||||||
|  | 			}; | ||||||
|  |  | ||||||
|  | 			partition@30000 { | ||||||
|  | 				label = "u-boot-env"; | ||||||
|  | 				reg = <0x030000 0x010000>; | ||||||
|  | 			}; | ||||||
|  |  | ||||||
|  | 			art: partition@40000 { | ||||||
|  | 				label = "art"; | ||||||
|  | 				reg = <0x040000 0x010000>; | ||||||
|  | 				read-only; | ||||||
|  | 			}; | ||||||
|  |  | ||||||
|  | 			partition@50000 { | ||||||
|  | 				compatible = "denx,uimage"; | ||||||
|  | 				label = "firmware"; | ||||||
|  | 				reg = <0x050000 0xfb0000>; | ||||||
|  | 			}; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &uart { | ||||||
|  | 	status = "okay"; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &usb { | ||||||
|  | 	status = "okay"; | ||||||
|  | 	dr_mode = "host"; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &usb_phy { | ||||||
|  | 	status = "okay"; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &wmac { | ||||||
|  | 	status = "okay"; | ||||||
|  | 	mtd-cal-data = <&art 0x1000>; | ||||||
|  | }; | ||||||
| @@ -111,6 +111,16 @@ define Device/adtran_bsap1840 | |||||||
| endef | endef | ||||||
| TARGET_DEVICES += adtran_bsap1840 | TARGET_DEVICES += adtran_bsap1840 | ||||||
|  |  | ||||||
|  | define Device/alfa-network_ap121f | ||||||
|  |   ATH_SOC := ar9331 | ||||||
|  |   DEVICE_VENDOR := ALFA Network | ||||||
|  |   DEVICE_MODEL := AP121F | ||||||
|  |   DEVICE_PACKAGES := kmod-usb2 kmod-usb-chipidea2 kmod-usb-storage -swconfig | ||||||
|  |   IMAGE_SIZE := 16064k | ||||||
|  |   SUPPORTED_DEVICES += ap121f | ||||||
|  | endef | ||||||
|  | TARGET_DEVICES += alfa-network_ap121f | ||||||
|  |  | ||||||
| define Device/aruba_ap-105 | define Device/aruba_ap-105 | ||||||
|   ATH_SOC := ar7161 |   ATH_SOC := ar7161 | ||||||
|   DEVICE_VENDOR := Aruba |   DEVICE_VENDOR := Aruba | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user