ath79: fix WNDR3800 support
Fixes for WNDR3800 DTS: * fix bootcmd * name art partition to reference it for MACs * format firmware partition's address similarly as others * make u-boot-env read-only like in ar71xx * read wan and lan MACs from art * fix LED and button gpio values to match ar71xx (orange/green powerLED, reset button) * enable power LED in dts by alias led-status * define USB LED triggers and connect to USB port * change wifi button to KEY_RFKILL like in ar71xx Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
This commit is contained in:
		 Hannu Nyman
					Hannu Nyman
				
			
				
					committed by
					
						 Mathias Kresin
						Mathias Kresin
					
				
			
			
				
	
			
			
			 Mathias Kresin
						Mathias Kresin
					
				
			
						parent
						
							10f8823254
						
					
				
				
					commit
					25ea21d765
				
			| @@ -10,6 +10,14 @@ | |||||||
| 	compatible = "netgear,wndr3800", "qca,ar7161"; | 	compatible = "netgear,wndr3800", "qca,ar7161"; | ||||||
| 	model = "Netgear WNDR3800"; | 	model = "Netgear WNDR3800"; | ||||||
|  |  | ||||||
|  | 	aliases { | ||||||
|  | 		led-status = &power_green; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	chosen { | ||||||
|  | 		bootargs = "console=ttyS0,115200"; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
| 	memory@0 { | 	memory@0 { | ||||||
| 		device_type = "memory"; | 		device_type = "memory"; | ||||||
| 		reg = <0x0 0x8000000>; | 		reg = <0x0 0x8000000>; | ||||||
| @@ -25,9 +33,11 @@ | |||||||
| 	reset-leds { | 	reset-leds { | ||||||
| 		compatible = "reset-leds"; | 		compatible = "reset-leds"; | ||||||
|  |  | ||||||
| 		wps { | 		usb_led { | ||||||
| 			label = "netgear:green:usb"; | 			label = "netgear:green:usb"; | ||||||
| 			resets = <&rst 12>; | 			resets = <&rst 12>; | ||||||
|  | 			trigger-sources = <&usb_ochi_port>, <&usb_echi_port>; | ||||||
|  | 			linux,default-trigger = "usbport"; | ||||||
| 		}; | 		}; | ||||||
| 	}; | 	}; | ||||||
|  |  | ||||||
| @@ -40,15 +50,15 @@ | |||||||
| 			default-state = "off"; | 			default-state = "off"; | ||||||
| 		}; | 		}; | ||||||
|  |  | ||||||
| 		power_green { | 		power_green: power_green { | ||||||
| 			label = "netgear:green:power"; | 			label = "netgear:green:power"; | ||||||
| 			gpios = <&gpio 1 GPIO_ACTIVE_LOW>; | 			gpios = <&gpio 2 GPIO_ACTIVE_LOW>; | ||||||
| 			default-state = "off"; | 			default-state = "off"; | ||||||
| 		}; | 		}; | ||||||
|  |  | ||||||
| 		power_orange { | 		power_orange { | ||||||
| 			label = "netgear:orange:power"; | 			label = "netgear:orange:power"; | ||||||
| 			gpios = <&gpio 2 GPIO_ACTIVE_LOW>; | 			gpios = <&gpio 1 GPIO_ACTIVE_LOW>; | ||||||
| 			default-state = "off"; | 			default-state = "off"; | ||||||
| 		}; | 		}; | ||||||
|  |  | ||||||
| @@ -71,21 +81,21 @@ | |||||||
| 		#size-cells = <0>; | 		#size-cells = <0>; | ||||||
| 		poll-interval = <100>; | 		poll-interval = <100>; | ||||||
|  |  | ||||||
| 		button@0 { | 		wps { | ||||||
| 			label = "wps"; | 			label = "wps"; | ||||||
| 			linux,code = <KEY_WPS_BUTTON>; | 			linux,code = <KEY_WPS_BUTTON>; | ||||||
| 			gpios = <&gpio 3 GPIO_ACTIVE_LOW>; | 			gpios = <&gpio 3 GPIO_ACTIVE_LOW>; | ||||||
| 		}; | 		}; | ||||||
|  |  | ||||||
| 		button@1 { | 		reset { | ||||||
| 			label = "reset"; | 			label = "reset"; | ||||||
| 			linux,code = <KEY_RESTART>; | 			linux,code = <KEY_RESTART>; | ||||||
| 			gpios = <&gpio 18 GPIO_ACTIVE_LOW>; | 			gpios = <&gpio 8 GPIO_ACTIVE_LOW>; | ||||||
| 		}; | 		}; | ||||||
|  |  | ||||||
| 		button@2 { | 		rfkill { | ||||||
| 			label = "wifi"; | 			label = "rfkill"; | ||||||
| 			linux,code = <BTN_2>; | 			linux,code = <KEY_RFKILL>; | ||||||
| 			gpios = <&gpio 11 GPIO_ACTIVE_LOW>; | 			gpios = <&gpio 11 GPIO_ACTIVE_LOW>; | ||||||
| 		}; | 		}; | ||||||
| 	}; | 	}; | ||||||
| @@ -114,10 +124,20 @@ | |||||||
|  |  | ||||||
| &usb1 { | &usb1 { | ||||||
| 	status = "okay"; | 	status = "okay"; | ||||||
|  |  | ||||||
|  | 	usb_ochi_port: port@1 { | ||||||
|  | 		reg = <1>; | ||||||
|  | 		#trigger-source-cells = <0>; | ||||||
|  | 	}; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| &usb2 { | &usb2 { | ||||||
| 	status = "okay"; | 	status = "okay"; | ||||||
|  |  | ||||||
|  | 	usb_echi_port: port@1 { | ||||||
|  | 		reg = <1>; | ||||||
|  | 		#trigger-source-cells = <0>; | ||||||
|  | 	}; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| &pcie0 { | &pcie0 { | ||||||
| @@ -153,14 +173,15 @@ | |||||||
| 			partition@1 { | 			partition@1 { | ||||||
| 				label = "u-boot-env"; | 				label = "u-boot-env"; | ||||||
| 				reg = <0x050000 0x020000>; | 				reg = <0x050000 0x020000>; | ||||||
|  | 				read-only; | ||||||
| 			}; | 			}; | ||||||
|  |  | ||||||
| 			partition@2 { | 			partition@2 { | ||||||
| 				label = "firmware"; | 				label = "firmware"; | ||||||
| 				reg = <0x70000 0xf80000>; | 				reg = <0x070000 0xf80000>; | ||||||
| 			}; | 			}; | ||||||
|  |  | ||||||
| 			partition@3 { | 			art: partition@3 { | ||||||
| 				label = "art"; | 				label = "art"; | ||||||
| 				reg = <0xff0000 0x010000>; | 				reg = <0xff0000 0x010000>; | ||||||
| 				read-only; | 				read-only; | ||||||
| @@ -174,6 +195,8 @@ | |||||||
|  |  | ||||||
| 	pll-data = <0x11110000 0x00001099 0x00991099>; | 	pll-data = <0x11110000 0x00001099 0x00991099>; | ||||||
|  |  | ||||||
|  | 	mtd-mac-address = <&art 0x00>; | ||||||
|  |  | ||||||
| 	fixed-link { | 	fixed-link { | ||||||
| 		speed = <1000>; | 		speed = <1000>; | ||||||
| 		full-duplex; | 		full-duplex; | ||||||
| @@ -185,6 +208,8 @@ | |||||||
|  |  | ||||||
| 	pll-data = <0x11110000 0x00001099 0x00991099>; | 	pll-data = <0x11110000 0x00001099 0x00991099>; | ||||||
|  |  | ||||||
|  | 	mtd-mac-address = <&art 0x06>; | ||||||
|  |  | ||||||
| 	resets = <&rst 13>; | 	resets = <&rst 13>; | ||||||
| 	reset-names = "mac"; | 	reset-names = "mac"; | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user