ath79: convert OCEDO Raccoon WiFis to nvmem-cells
Pull the calibration data from the nvmem subsystem. This allows us to move userspace caldata extraction into the device-tree definition. Signed-off-by: Nick Hainke <vincent@systemli.org> (merged art into partition node, removed stale uboot label) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
This commit is contained in:
		 Nick Hainke
					Nick Hainke
				
			
				
					committed by
					
						 Christian Lamparter
						Christian Lamparter
					
				
			
			
				
	
			
			
			 Christian Lamparter
						Christian Lamparter
					
				
			
						parent
						
							783936c1f7
						
					
				
				
					commit
					f63cf33aa7
				
			| @@ -79,7 +79,7 @@ | |||||||
| 			#address-cells = <1>; | 			#address-cells = <1>; | ||||||
| 			#size-cells = <1>; | 			#size-cells = <1>; | ||||||
|  |  | ||||||
| 			uboot: partition@0 { | 			partition@0 { | ||||||
| 				label = "u-boot"; | 				label = "u-boot"; | ||||||
| 				reg = <0x000000 0x040000>; | 				reg = <0x000000 0x040000>; | ||||||
| 				read-only; | 				read-only; | ||||||
| @@ -114,10 +114,34 @@ | |||||||
| 				read-only; | 				read-only; | ||||||
| 			}; | 			}; | ||||||
|  |  | ||||||
| 			art: partition@ff0000 { | 			partition@ff0000 { | ||||||
| 				label = "art"; | 				label = "art"; | ||||||
| 				reg = <0xff0000 0x010000>; | 				reg = <0xff0000 0x010000>; | ||||||
| 				read-only; | 				read-only; | ||||||
|  |  | ||||||
|  | 				compatible = "nvmem-cells"; | ||||||
|  | 				#address-cells = <1>; | ||||||
|  | 				#size-cells = <1>; | ||||||
|  |  | ||||||
|  | 				macaddr_art_0: macaddr@0 { | ||||||
|  | 					reg = <0x0 0x6>; | ||||||
|  | 				}; | ||||||
|  |  | ||||||
|  | 				macaddr_art_6: macaddr@6 { | ||||||
|  | 					reg = <0x6 0x6>; | ||||||
|  | 				}; | ||||||
|  |  | ||||||
|  | 				macaddr_art_c: macaddr@c { | ||||||
|  | 					reg = <0xc 0x6>; | ||||||
|  | 				}; | ||||||
|  |  | ||||||
|  | 				calibration_art_1000: calibration@1000 { | ||||||
|  | 					reg = <0x1000 0x440>; | ||||||
|  | 				}; | ||||||
|  |  | ||||||
|  | 				calibration_art_5000: calibration@5000 { | ||||||
|  | 					reg = <0x5000 0x440>; | ||||||
|  | 				}; | ||||||
| 			}; | 			}; | ||||||
| 		}; | 		}; | ||||||
| 	}; | 	}; | ||||||
| @@ -129,9 +153,8 @@ | |||||||
| 	ath9k: wifi@0,0 { | 	ath9k: wifi@0,0 { | ||||||
| 		compatible = "pci168c,0030"; | 		compatible = "pci168c,0030"; | ||||||
| 		reg = <0x0000 0 0 0 0>; | 		reg = <0x0000 0 0 0 0>; | ||||||
| 		nvmem-cells = <&macaddr_art_c>; | 		nvmem-cells = <&macaddr_art_c>, <&calibration_art_5000>; | ||||||
| 		nvmem-cell-names = "mac-address"; | 		nvmem-cell-names = "mac-address", "calibration"; | ||||||
| 		qca,no-eeprom; |  | ||||||
| 		#gpio-cells = <2>; | 		#gpio-cells = <2>; | ||||||
| 		gpio-controller; | 		gpio-controller; | ||||||
| 	}; | 	}; | ||||||
| @@ -140,9 +163,8 @@ | |||||||
| &wmac { | &wmac { | ||||||
| 	status = "okay"; | 	status = "okay"; | ||||||
|  |  | ||||||
| 	mtd-cal-data = <&art 0x1000>; | 	nvmem-cells = <&macaddr_art_6>, <&calibration_art_1000>; | ||||||
| 	nvmem-cells = <&macaddr_art_6>; | 	nvmem-cell-names = "mac-address", "calibration"; | ||||||
| 	nvmem-cell-names = "mac-address"; |  | ||||||
| }; | }; | ||||||
|  |  | ||||||
| &mdio0 { | &mdio0 { | ||||||
| @@ -175,21 +197,3 @@ | |||||||
| 		txd-delay = <0>; | 		txd-delay = <0>; | ||||||
| 	}; | 	}; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| &art { |  | ||||||
| 	compatible = "nvmem-cells"; |  | ||||||
| 	#address-cells = <1>; |  | ||||||
| 	#size-cells = <1>; |  | ||||||
|  |  | ||||||
| 	macaddr_art_0: macaddr@0 { |  | ||||||
| 		reg = <0x0 0x6>; |  | ||||||
| 	}; |  | ||||||
|  |  | ||||||
| 	macaddr_art_6: macaddr@6 { |  | ||||||
| 		reg = <0x6 0x6>; |  | ||||||
| 	}; |  | ||||||
|  |  | ||||||
| 	macaddr_art_c: macaddr@c { |  | ||||||
| 		reg = <0xc 0x6>; |  | ||||||
| 	}; |  | ||||||
| }; |  | ||||||
|   | |||||||
| @@ -83,7 +83,6 @@ case "$FIRMWARE" in | |||||||
| 	;; | 	;; | ||||||
| "ath9k-eeprom-pci-0000:00:00.0.bin") | "ath9k-eeprom-pci-0000:00:00.0.bin") | ||||||
| 	case $board in | 	case $board in | ||||||
| 	ocedo,raccoon|\ |  | ||||||
| 	ubnt,unifi-ap-pro|\ | 	ubnt,unifi-ap-pro|\ | ||||||
| 	winchannel,wb2000) | 	winchannel,wb2000) | ||||||
| 		caldata_extract "art" 0x5000 0x440 | 		caldata_extract "art" 0x5000 0x440 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user