mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-11-03 20:07:59 +00:00 
			
		
		
		
	Compare commits
	
		
			162 Commits
		
	
	
		
			v2.10.0-rc
			...
			v2.11.0-rc
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					dd41f15987 | ||
| 
						 | 
					007cfe9c16 | ||
| 
						 | 
					52884b2835 | ||
| 
						 | 
					6a6af16f48 | ||
| 
						 | 
					2818722b19 | ||
| 
						 | 
					194eba2d21 | ||
| 
						 | 
					3d41a22fba | ||
| 
						 | 
					acd4b79dd4 | ||
| 
						 | 
					befac1e065 | ||
| 
						 | 
					7e4e221ccb | ||
| 
						 | 
					1d9b69ee6f | ||
| 
						 | 
					018f20119d | ||
| 
						 | 
					9a6e41adb8 | ||
| 
						 | 
					970b22856f | ||
| 
						 | 
					95032994fe | ||
| 
						 | 
					48cda63dc5 | ||
| 
						 | 
					8e9f79964a | ||
| 
						 | 
					3c7df86373 | ||
| 
						 | 
					38e6aee074 | ||
| 
						 | 
					0a13684bb6 | ||
| 
						 | 
					e7ca6e8455 | ||
| 
						 | 
					f17e635d34 | ||
| 
						 | 
					90e78c6068 | ||
| 
						 | 
					550bb6fb7e | ||
| 
						 | 
					b3a0ebe534 | ||
| 
						 | 
					6d16e50bbe | ||
| 
						 | 
					513eec1c5f | ||
| 
						 | 
					6a797e8a64 | ||
| 
						 | 
					082134bc43 | ||
| 
						 | 
					03ec2de777 | ||
| 
						 | 
					989d39d1f2 | ||
| 
						 | 
					b6b298ad68 | ||
| 
						 | 
					be1cb862f1 | ||
| 
						 | 
					eb6e95f760 | ||
| 
						 | 
					f04eb1d604 | ||
| 
						 | 
					cc1512e42a | ||
| 
						 | 
					88d6633c85 | ||
| 
						 | 
					1773435a2c | ||
| 
						 | 
					cf12abc92e | ||
| 
						 | 
					d8c4b1f0e2 | ||
| 
						 | 
					45cbd5d93a | ||
| 
						 | 
					2646db0826 | ||
| 
						 | 
					0289ea7293 | ||
| 
						 | 
					c02c293651 | ||
| 
						 | 
					e6786115cc | ||
| 
						 | 
					89b9596e27 | ||
| 
						 | 
					23cd3b3e99 | ||
| 
						 | 
					5a8cf73137 | ||
| 
						 | 
					79dfb1e861 | ||
| 
						 | 
					4eb30ba080 | ||
| 
						 | 
					1829c9c96f | ||
| 
						 | 
					fa2424750b | ||
| 
						 | 
					441cb82d32 | ||
| 
						 | 
					c34d346b57 | ||
| 
						 | 
					f7a766be20 | ||
| 
						 | 
					54e8411980 | ||
| 
						 | 
					09ebd5f406 | ||
| 
						 | 
					44aef94d82 | ||
| 
						 | 
					aeac214236 | ||
| 
						 | 
					81f8a368d1 | ||
| 
						 | 
					cde9d148b8 | ||
| 
						 | 
					b1bf054d74 | ||
| 
						 | 
					18100e0b4e | ||
| 
						 | 
					42f0c520da | ||
| 
						 | 
					fbee159481 | ||
| 
						 | 
					ca4a4365d6 | ||
| 
						 | 
					54ffbadc2d | ||
| 
						 | 
					a4cd9cb03b | ||
| 
						 | 
					f3406891b2 | ||
| 
						 | 
					6f7c5995ad | ||
| 
						 | 
					8046c336c3 | ||
| 
						 | 
					c39f92eea7 | ||
| 
						 | 
					37d1da8b01 | ||
| 
						 | 
					6f65229d66 | ||
| 
						 | 
					7bf62b76bd | ||
| 
						 | 
					693e147cd9 | ||
| 
						 | 
					eab2445d14 | ||
| 
						 | 
					5c53054de9 | ||
| 
						 | 
					1866ffcccc | ||
| 
						 | 
					5c7fe1a0fa | ||
| 
						 | 
					672578af01 | ||
| 
						 | 
					9c27a4b878 | ||
| 
						 | 
					4cf4a5152e | ||
| 
						 | 
					7daf37be9e | ||
| 
						 | 
					7975de1101 | ||
| 
						 | 
					2d1bbeedd9 | ||
| 
						 | 
					e0fc96b950 | ||
| 
						 | 
					835909f3cc | ||
| 
						 | 
					e02d9261df | ||
| 
						 | 
					2f7a1e5952 | ||
| 
						 | 
					0ad0aa8255 | ||
| 
						 | 
					4db35c127b | ||
| 
						 | 
					f6ae95da15 | ||
| 
						 | 
					daec2bef52 | ||
| 
						 | 
					4e5e483743 | ||
| 
						 | 
					ea1cb7a4a6 | ||
| 
						 | 
					ce33b86c6f | ||
| 
						 | 
					8e0e4d81d8 | ||
| 
						 | 
					74616bda9a | ||
| 
						 | 
					47afa20ff1 | ||
| 
						 | 
					b4c68157c8 | ||
| 
						 | 
					5dd721b206 | ||
| 
						 | 
					9ef59ba079 | ||
| 
						 | 
					fafb5cbffd | ||
| 
						 | 
					dca6ea517f | ||
| 
						 | 
					43436e4726 | ||
| 
						 | 
					18c6087d56 | ||
| 
						 | 
					a5eaccb29a | ||
| 
						 | 
					ee090f6230 | ||
| 
						 | 
					5b397d54ce | ||
| 
						 | 
					323dc65770 | ||
| 
						 | 
					bccdb175b0 | ||
| 
						 | 
					92f59a3f22 | ||
| 
						 | 
					ccdca73cd6 | ||
| 
						 | 
					3fde7d88fb | ||
| 
						 | 
					79dcd8a900 | ||
| 
						 | 
					3d851f6343 | ||
| 
						 | 
					ed3142aa10 | ||
| 
						 | 
					5d0a5e377e | ||
| 
						 | 
					439c386506 | ||
| 
						 | 
					1371a9d3d8 | ||
| 
						 | 
					52f6189c10 | ||
| 
						 | 
					cf63cb94aa | ||
| 
						 | 
					94a442abcf | ||
| 
						 | 
					6cf990f142 | ||
| 
						 | 
					8422d572e7 | ||
| 
						 | 
					659e7c52ba | ||
| 
						 | 
					2536cfdc9e | ||
| 
						 | 
					e9b64b0dfd | ||
| 
						 | 
					b4ed6a8367 | ||
| 
						 | 
					5362455444 | ||
| 
						 | 
					eff55cc055 | ||
| 
						 | 
					295a81450b | ||
| 
						 | 
					ad48758229 | ||
| 
						 | 
					0f5302044d | ||
| 
						 | 
					398e17a583 | ||
| 
						 | 
					b303909c83 | ||
| 
						 | 
					d7c88de1a7 | ||
| 
						 | 
					c144aeed12 | ||
| 
						 | 
					b3d791b34e | ||
| 
						 | 
					9b77f6ed22 | ||
| 
						 | 
					7eb5d45bb8 | ||
| 
						 | 
					8b64db3c7a | ||
| 
						 | 
					cd461e555e | ||
| 
						 | 
					9195806206 | ||
| 
						 | 
					9621c21535 | ||
| 
						 | 
					f74cee802b | ||
| 
						 | 
					0c7aecde9f | ||
| 
						 | 
					9ab2f5ede9 | ||
| 
						 | 
					a7fe885dc5 | ||
| 
						 | 
					105e55c01a | ||
| 
						 | 
					200b759d6f | ||
| 
						 | 
					5da87dc07d | ||
| 
						 | 
					25f42bdcaf | ||
| 
						 | 
					43361d0ee7 | ||
| 
						 | 
					93a8a764a8 | ||
| 
						 | 
					1e515ed1e1 | ||
| 
						 | 
					78388a8ecf | ||
| 
						 | 
					1e1c286f06 | ||
| 
						 | 
					81f7d7d7ce | ||
| 
						 | 
					2403eb2a87 | ||
| 
						 | 
					5a686344e8 | 
							
								
								
									
										2
									
								
								.github/workflows/build-dev.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/build-dev.yml
									
									
									
									
										vendored
									
									
								
							@@ -21,7 +21,7 @@ jobs:
 | 
				
			|||||||
    strategy:
 | 
					    strategy:
 | 
				
			||||||
      fail-fast: false
 | 
					      fail-fast: false
 | 
				
			||||||
      matrix:
 | 
					      matrix:
 | 
				
			||||||
        target: ['actiontec_web7200', 'cig_wf186w', 'cig_wf188n', 'cig_wf194c4', 'cig_wf196-us', 'cig_wf196-ca', 'cig_wf196-ca-ath12', 'cig_wf610d', 'cig_wf660a', 'cig_wf660a', 'cig_wf808', 'cybertan_eww622-a1', 'cybertan_eww631-a1', 'cybertan_eww631-b1', 'edgecore_eap101', 'edgecore_eap101-ath12', 'edgecore_eap102', 'edgecore_eap104', 'edgecore_eap104-ath12', 'liteon_wpx8324', 'edgecore_ecs4100-12ph', 'edgecore_ecw5211', 'edgecore_ecw5410', 'edgecore_oap100', 'edgecore_oap101_6e', 'edgecore_oap101e', 'edgecore_ssw2ac2600', 'edgecore_spw2ac1200', 'edgecore_spw2ac1200-lan-poe', 'hfcl_ion4','hfcl_ion4xi_wp', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'indio_um-305ac', 'indio_um-305ax', 'indio_um-325ac', 'indio_um-510ac-v3', 'indio_um-550ac', 'indio_um-310ax-v1', 'indio_um-510axp-v1', 'indio_um-510axm-v1', 'linksys_ea6350-v4', 'linksys_e8450-ubi', 'linksys_ea8300', 'meshpp_s618_cp03', 'meshpp_s618_cp01', 'udaya_a5-id2', 'wallys_dr40x9', 'wallys_dr6018', 'wallys_dr6018_v4', 'x64_vm', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650', 'yuncore_fap655' ]
 | 
					        target: [ 'cig_wf186w', 'cig_wf188n-ca', 'cig_wf188n-ca-ath12', 'cig_wf188n-us', 'cig_wf196-us', 'cig_wf196-ca', 'cig_wf196-ca-ath12', 'cig_wf610d', 'cig_wf660a', 'cig_wf808', 'cybertan_eww622-a1', 'cybertan_eww631-a1', 'cybertan_eww631-b1', 'edgecore_eap101', 'edgecore_eap101-ath12', 'edgecore_eap102', 'edgecore_eap102-ath12', 'edgecore_eap104', 'edgecore_eap104-ath12', 'liteon_wpx8324', 'edgecore_ecs4100-12ph', 'edgecore_ecw5211', 'edgecore_ecw5410', 'edgecore_oap100', 'edgecore_oap101-6e', 'edgecore_oap101e', 'hfcl_ion4','hfcl_ion4xi_wp', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'hfcl_ion4xi_w', 'hfcl_ion4xi_HMR', 'hfcl_ion4x_w', 'indio_um-305ac', 'indio_um-305ax', 'indio_um-325ac', 'indio_um-510ac-v3', 'indio_um-550ac', 'indio_um-310ax-v1', 'indio_um-510axp-v1', 'indio_um-510axm-v1', 'udaya_a5-id2', 'wallys_dr40x9', 'wallys_dr6018', 'wallys_dr6018_v4', 'x64_vm', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650', 'yuncore_fap655' ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@v3
 | 
					    - uses: actions/checkout@v3
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								.github/workflows/x64_vm-build-test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/x64_vm-build-test.yml
									
									
									
									
										vendored
									
									
								
							@@ -29,7 +29,7 @@ jobs:
 | 
				
			|||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        git config --global user.email "you@example.com"
 | 
					        git config --global user.email "you@example.com"
 | 
				
			||||||
        git config --global user.name "Your Name"
 | 
					        git config --global user.name "Your Name"
 | 
				
			||||||
        make -j TARGET=${{ matrix.target }}
 | 
					        make -j TARGET=${{ matrix.target }}        make -j TARGET=${{ matrix.target }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Package and upload image for ${{ matrix.target }}
 | 
					    - name: Package and upload image for ${{ matrix.target }}
 | 
				
			||||||
      id: package_and_upload_image
 | 
					      id: package_and_upload_image
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,7 +18,7 @@ DEFAULT_PACKAGES += kmod-qca-nss-dp kmod-qca-ssdk swconfig \
 | 
				
			|||||||
	kmod-usb-phy-ipq807x kmod-usb-dwc3-of-simple \
 | 
						kmod-usb-phy-ipq807x kmod-usb-dwc3-of-simple \
 | 
				
			||||||
	kmod-ath11k-ahb kmod-qrtr_mproc wpad \
 | 
						kmod-ath11k-ahb kmod-qrtr_mproc wpad \
 | 
				
			||||||
	kmod-gpio-button-hotplug kmod-bootconfig \
 | 
						kmod-gpio-button-hotplug kmod-bootconfig \
 | 
				
			||||||
	qca-thermald-10.4 qca-ssdk-shell kmod-qca-nss-drv-bridge-mgr \
 | 
						qca-thermald-10.4 qca-ssdk-shell \
 | 
				
			||||||
	uboot-envtools
 | 
						uboot-envtools
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(eval $(call BuildTarget))
 | 
					$(eval $(call BuildTarget))
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -43,6 +43,9 @@ hfcl,ion4xi|\
 | 
				
			|||||||
hfcl,ion4xi_wp|\
 | 
					hfcl,ion4xi_wp|\
 | 
				
			||||||
hfcl,ion4x|\
 | 
					hfcl,ion4x|\
 | 
				
			||||||
hfcl,ion4x_2|\
 | 
					hfcl,ion4x_2|\
 | 
				
			||||||
 | 
					hfcl,ion4xi_w|\
 | 
				
			||||||
 | 
					hfcl,ion4x_w|\
 | 
				
			||||||
 | 
					hfcl,ion4xi_HMR|\
 | 
				
			||||||
hfcl,ion4xe)
 | 
					hfcl,ion4xe)
 | 
				
			||||||
        ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wifi5" "phy0tpt"
 | 
					        ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wifi5" "phy0tpt"
 | 
				
			||||||
        ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wifi2" "phy1tpt"
 | 
					        ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wifi2" "phy1tpt"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -36,6 +36,7 @@ qcom_setup_interfaces()
 | 
				
			|||||||
	indio,um-310ax-v1|\
 | 
						indio,um-310ax-v1|\
 | 
				
			||||||
	indio,um-510axp-v1|\
 | 
						indio,um-510axp-v1|\
 | 
				
			||||||
	indio,um-510axm-v1|\
 | 
						indio,um-510axm-v1|\
 | 
				
			||||||
 | 
						qcom,ipq5018-mp03.1|\
 | 
				
			||||||
	qcom,ipq5018-mp03.3|\
 | 
						qcom,ipq5018-mp03.3|\
 | 
				
			||||||
	yuncore,ax840|\
 | 
						yuncore,ax840|\
 | 
				
			||||||
	motorola,q14|\
 | 
						motorola,q14|\
 | 
				
			||||||
@@ -63,7 +64,10 @@ qcom_setup_interfaces()
 | 
				
			|||||||
		ucidef_set_interface_wan "eth0"		
 | 
							ucidef_set_interface_wan "eth0"		
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
       cig,wf186w)
 | 
					       cig,wf186w)
 | 
				
			||||||
		ucidef_add_switch "switch0" "4:wan" "1:lan" "2:lan" "3:lan" "0:lan" "6@eth0"
 | 
							ucidef_add_switch "switch0" "4:wan" "0:lan" "1:lan" "2:lan" "3:lan" "6@eth0"
 | 
				
			||||||
 | 
							;;
 | 
				
			||||||
 | 
					       cig,wf186h)
 | 
				
			||||||
 | 
					                ucidef_add_switch "switch0" "4:wan" "1:lan" "2:lan" "6@eth0"
 | 
				
			||||||
                ;;
 | 
					                ;;
 | 
				
			||||||
	yuncore,fap650)
 | 
						yuncore,fap650)
 | 
				
			||||||
		ucidef_set_interface_lan "eth3 eth2 eth1 eth0"
 | 
							ucidef_set_interface_lan "eth3 eth2 eth1 eth0"
 | 
				
			||||||
@@ -73,6 +77,14 @@ qcom_setup_interfaces()
 | 
				
			|||||||
		ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
 | 
							ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
 | 
				
			||||||
		ucidef_set_interface_wan "eth4"
 | 
							ucidef_set_interface_wan "eth4"
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
 | 
						hfcl,ion4xi_w|\
 | 
				
			||||||
 | 
						hfcl,ion4x_w)
 | 
				
			||||||
 | 
					                ucidef_set_interface_wan "eth0"
 | 
				
			||||||
 | 
					                ;;
 | 
				
			||||||
 | 
						hfcl,ion4xi_HMR)
 | 
				
			||||||
 | 
							ucidef_set_interface_lan "eth1"
 | 
				
			||||||
 | 
							ucidef_set_interface_wan "eth0"
 | 
				
			||||||
 | 
							;;
 | 
				
			||||||
	qcom,ipq807x-hk14)
 | 
						qcom,ipq807x-hk14)
 | 
				
			||||||
		ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
 | 
							ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
 | 
				
			||||||
		ucidef_set_interface_wan "eth4"
 | 
							ucidef_set_interface_wan "eth4"
 | 
				
			||||||
@@ -84,7 +96,15 @@ qcom_setup_interfaces()
 | 
				
			|||||||
		ucidef_set_interface_lan "eth1 eth2 eth3 eth4"
 | 
							ucidef_set_interface_lan "eth1 eth2 eth3 eth4"
 | 
				
			||||||
		ucidef_set_interface_wan "eth0"
 | 
							ucidef_set_interface_wan "eth0"
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
	cybertan,eww622-a1|\
 | 
						cybertan,eww622-a1)
 | 
				
			||||||
 | 
							ucidef_set_interface_wan "eth0"
 | 
				
			||||||
 | 
							ucidef_add_switch "switch1" \
 | 
				
			||||||
 | 
								"6@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
 | 
				
			||||||
 | 
							;;	
 | 
				
			||||||
 | 
						xunison,d50-5g)
 | 
				
			||||||
 | 
					                ucidef_set_interface_wan "eth0"
 | 
				
			||||||
 | 
					                ucidef_set_interface_lan "eth1"
 | 
				
			||||||
 | 
					                ;;	
 | 
				
			||||||
	qcom,ipq5018-mp03.1)
 | 
						qcom,ipq5018-mp03.1)
 | 
				
			||||||
		ucidef_set_interface_lan "eth1"
 | 
							ucidef_set_interface_lan "eth1"
 | 
				
			||||||
		ucidef_set_interface_wan "eth0"
 | 
							ucidef_set_interface_wan "eth0"
 | 
				
			||||||
@@ -92,11 +112,17 @@ qcom_setup_interfaces()
 | 
				
			|||||||
		ucidef_add_switch_attr "switch1" "enable" "false"
 | 
							ucidef_add_switch_attr "switch1" "enable" "false"
 | 
				
			||||||
		ucidef_add_switch_attr "switch1" "reset" "true"
 | 
							ucidef_add_switch_attr "switch1" "reset" "true"
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
 | 
						qcom,ipq5018-mp03.3)
 | 
				
			||||||
 | 
							ucidef_set_interface_lan "eth1"
 | 
				
			||||||
 | 
							ucidef_set_interface_wan "eth0"
 | 
				
			||||||
 | 
							ucidef_add_switch "switch1"
 | 
				
			||||||
 | 
							ucidef_add_switch_attr "switch1" "enable" "false"
 | 
				
			||||||
 | 
							ucidef_add_switch_attr "switch1" "reset" "true"
 | 
				
			||||||
 | 
							;;	
 | 
				
			||||||
	edgecore,eap104)
 | 
						edgecore,eap104)
 | 
				
			||||||
		ucidef_set_interface_lan "lan1 lan2 lan3 lan4"
 | 
					 | 
				
			||||||
		ucidef_set_interface_wan "eth0"
 | 
							ucidef_set_interface_wan "eth0"
 | 
				
			||||||
		ucidef_add_switch "switch1" \
 | 
							ucidef_add_switch "switch1" \
 | 
				
			||||||
			"6@eth1" "1:lan1" "2:lan2" "3:lan3" "4:lan4"
 | 
								"6@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
	cybertan,eww631-a1)
 | 
						cybertan,eww631-a1)
 | 
				
			||||||
		ucidef_set_interface_wan "eth0"
 | 
							ucidef_set_interface_wan "eth0"
 | 
				
			||||||
@@ -112,6 +138,12 @@ qcom_setup_interfaces()
 | 
				
			|||||||
		ucidef_add_switch_attr "switch1" "enable" "false"
 | 
							ucidef_add_switch_attr "switch1" "enable" "false"
 | 
				
			||||||
		ucidef_add_switch_attr "switch1" "reset" "true"
 | 
							ucidef_add_switch_attr "switch1" "reset" "true"
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
 | 
						wallys,dr5018)
 | 
				
			||||||
 | 
					                ucidef_set_interface_lan "eth0 eth1"
 | 
				
			||||||
 | 
					                ucidef_add_switch "switch1"
 | 
				
			||||||
 | 
					                ucidef_add_switch_attr "switch1" "enable" "false"
 | 
				
			||||||
 | 
					                ucidef_add_switch_attr "switch1" "reset" "true"
 | 
				
			||||||
 | 
					                ;;
 | 
				
			||||||
	yuncore,fap655)
 | 
						yuncore,fap655)
 | 
				
			||||||
		ucidef_add_switch "switch1" \
 | 
							ucidef_add_switch "switch1" \
 | 
				
			||||||
			"6@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
 | 
								"6@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
 | 
				
			||||||
@@ -124,7 +156,6 @@ qcom_setup_macs()
 | 
				
			|||||||
	local board="$1"
 | 
						local board="$1"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	case $board in
 | 
						case $board in
 | 
				
			||||||
	cig,wf188n|\
 | 
					 | 
				
			||||||
	cig,wf194c|\
 | 
						cig,wf194c|\
 | 
				
			||||||
	cig,wf194c4)
 | 
						cig,wf194c4)
 | 
				
			||||||
		mtd=$(find_mtd_chardev "0:APPSBLENV")
 | 
							mtd=$(find_mtd_chardev "0:APPSBLENV")
 | 
				
			||||||
@@ -152,6 +183,15 @@ qcom_setup_macs()
 | 
				
			|||||||
	       # ip link set eth1 address $wan_mac
 | 
						       # ip link set eth1 address $wan_mac
 | 
				
			||||||
	       # ucidef_set_label_macaddr $wan_mac		
 | 
						       # ucidef_set_label_macaddr $wan_mac		
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
 | 
					        cig,wf186h)
 | 
				
			||||||
 | 
					                mtd=$(find_mtd_chardev "0:APPSBLENV")
 | 
				
			||||||
 | 
					                [ -z "$mtd" ] && return;
 | 
				
			||||||
 | 
					                mac=$(grep BaseMacAddress= $mtd | cut -dx -f2)
 | 
				
			||||||
 | 
					                [ -z "$mac" ] && return;
 | 
				
			||||||
 | 
					                wan_mac=$(macaddr_canonicalize $mac)
 | 
				
			||||||
 | 
					                ucidef_set_network_device_mac eth0 $wan_mac
 | 
				
			||||||
 | 
					                ip link set eth0 address $wan_mac
 | 
				
			||||||
 | 
					                ;;
 | 
				
			||||||
	cybertan,eww631-a1|\
 | 
						cybertan,eww631-a1|\
 | 
				
			||||||
	cybertan,eww631-b1)
 | 
						cybertan,eww631-b1)
 | 
				
			||||||
		mac=$(grep -i -m 1 BaseMacAddress= /dev/`cat /proc/mtd | grep APPSBLENV | cut -d: -f1` | cut -d= -f2)
 | 
							mac=$(grep -i -m 1 BaseMacAddress= /dev/`cat /proc/mtd | grep APPSBLENV | cut -d: -f1` | cut -d= -f2)
 | 
				
			||||||
@@ -160,6 +200,7 @@ qcom_setup_macs()
 | 
				
			|||||||
		ucidef_set_network_device_mac eth0 $wan_mac
 | 
							ucidef_set_network_device_mac eth0 $wan_mac
 | 
				
			||||||
		ucidef_set_label_macaddr $wan_mac
 | 
							ucidef_set_label_macaddr $wan_mac
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
 | 
						cig,wf188n|\
 | 
				
			||||||
	cig,wf196)
 | 
						cig,wf196)
 | 
				
			||||||
		mtd=$(find_mtd_chardev "0:APPSBLENV")
 | 
							mtd=$(find_mtd_chardev "0:APPSBLENV")
 | 
				
			||||||
		[ -z "$mtd" ] && return;
 | 
							[ -z "$mtd" ] && return;
 | 
				
			||||||
@@ -174,9 +215,10 @@ qcom_setup_macs()
 | 
				
			|||||||
		ucidef_set_label_macaddr $wan_mac
 | 
							ucidef_set_label_macaddr $wan_mac
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
	cig,wf660a)
 | 
						cig,wf660a)
 | 
				
			||||||
		mmc_dev=$(echo $(find_mmc_part "0:APPSBLENV") | sed 's/^.\{5\}//')
 | 
							mmc_dev=$(find_mtd_chardev "0:APPSBLENV")
 | 
				
			||||||
		[ -z mmc_dev ] && return
 | 
							[ -z "$mmc_dev" ] && mmc_dev=$(find_mmc_part "0:APPSBLENV")
 | 
				
			||||||
		mac=$(grep BaseMacAddress= /dev/$mmc_dev | cut -dx -f2)
 | 
							[ -z "$mmc_dev" ] && return
 | 
				
			||||||
 | 
							mac=$(grep BaseMacAddress= $mmc_dev | cut -dx -f2)
 | 
				
			||||||
		[ -z "$mac" ] && return;
 | 
							[ -z "$mac" ] && return;
 | 
				
			||||||
		wan_mac=$(macaddr_canonicalize $mac)
 | 
							wan_mac=$(macaddr_canonicalize $mac)
 | 
				
			||||||
		ucidef_set_network_device_mac eth0 $wan_mac
 | 
							ucidef_set_network_device_mac eth0 $wan_mac
 | 
				
			||||||
@@ -218,6 +260,13 @@ qcom_setup_macs()
 | 
				
			|||||||
		wan_mac=$(cat /sys/class/net/eth0/address)
 | 
							wan_mac=$(cat /sys/class/net/eth0/address)
 | 
				
			||||||
		lan_mac=$(macaddr_add "$wan_mac" 1)
 | 
							lan_mac=$(macaddr_add "$wan_mac" 1)
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
 | 
						wallys,dr5018)
 | 
				
			||||||
 | 
							mac=$(grep -i -m 1 BaseMacAddress= /dev/`cat /proc/mtd | grep APPSBLENV | cut -d: -f1` | cut -d= -f2)
 | 
				
			||||||
 | 
							[ -z "$mac"] && mac="00:11:22:33:44:00"
 | 
				
			||||||
 | 
							wan_mac=$(macaddr_canonicalize $mac)
 | 
				
			||||||
 | 
							ucidef_set_network_device_mac eth0 $wan_mac
 | 
				
			||||||
 | 
							ucidef_set_label_macaddr $wan_mac
 | 
				
			||||||
 | 
							;;
 | 
				
			||||||
	esac
 | 
						esac
 | 
				
			||||||
	[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
 | 
						[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
 | 
				
			||||||
	[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
 | 
						[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -40,9 +40,10 @@ ath11k_generate_macs_wf194() {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ath11k_generate_macs_ion4x() {				     
 | 
					ath11k_generate_macs_ion4x() {				     
 | 
				
			||||||
 | 
						local dev=$(find_mtd_chardev "0:ART")
 | 
				
			||||||
	touch /lib/firmware/ath11k-macs			   
 | 
						touch /lib/firmware/ath11k-macs			   
 | 
				
			||||||
	wifimac0=$(grep WLAN0_BASEMAC= /dev/mtd15 |cut -d '=' -f2) 
 | 
						wifimac0=$(grep WLAN0_BASEMAC= $dev |cut -d '=' -f2) 
 | 
				
			||||||
	wifimac1=$(grep WLAN1_BASEMAC= /dev/mtd15 |cut -d '=' -f2) 
 | 
						wifimac1=$(grep WLAN1_BASEMAC= $dev |cut -d '=' -f2) 
 | 
				
			||||||
	wifimac2=00:00:00:00:00:00				 
 | 
						wifimac2=00:00:00:00:00:00				 
 | 
				
			||||||
	echo -ne \\x${wifimac0//:/\\x} >> /lib/firmware/ath11k-macs
 | 
						echo -ne \\x${wifimac0//:/\\x} >> /lib/firmware/ath11k-macs
 | 
				
			||||||
	echo -ne \\x${wifimac1//:/\\x} >> /lib/firmware/ath11k-macs
 | 
						echo -ne \\x${wifimac1//:/\\x} >> /lib/firmware/ath11k-macs
 | 
				
			||||||
@@ -60,8 +61,9 @@ ath11k_generate_macs_pax1800() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
ath11k_generate_macs_wf660a() {
 | 
					ath11k_generate_macs_wf660a() {
 | 
				
			||||||
	touch /lib/firmware/ath11k-macs
 | 
						touch /lib/firmware/ath11k-macs
 | 
				
			||||||
	mmc_dev=$(find_mmc_part 0:APPSBLENV)
 | 
						mmc_dev=$(find_mtd_chardev "0:APPSBLENV")
 | 
				
			||||||
	[ -n $mmc_dev ] && mac=$(grep BaseMacAddress= $mmc_dev | cut -dx -f2)
 | 
						[ -z "$mmc_dev" ] && mmc_dev=$(find_mmc_part "0:APPSBLENV")
 | 
				
			||||||
 | 
						[ -n "$mmc_dev" ] && mac=$(grep BaseMacAddress= $mmc_dev | cut -dx -f2)
 | 
				
			||||||
	eth=$(macaddr_canonicalize $mac)
 | 
						eth=$(macaddr_canonicalize $mac)
 | 
				
			||||||
	mac1=$(macaddr_add $eth 1)
 | 
						mac1=$(macaddr_add $eth 1)
 | 
				
			||||||
	mac2=$(macaddr_add $eth 2)
 | 
						mac2=$(macaddr_add $eth 2)
 | 
				
			||||||
@@ -84,6 +86,19 @@ ath11k_generate_macs_wf186w() {
 | 
				
			|||||||
	echo -ne \\x${mac3//:/\\x} >> /lib/firmware/ath11k-macs
 | 
						echo -ne \\x${mac3//:/\\x} >> /lib/firmware/ath11k-macs
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ath11k_generate_macs_wf186h() {
 | 
				
			||||||
 | 
					        touch /lib/firmware/ath11k-macs
 | 
				
			||||||
 | 
					        local dev=$(find_mtd_chardev "0:APPSBLENV")
 | 
				
			||||||
 | 
					        mac=$(grep BaseMacAddress= $dev | cut -dx -f2)
 | 
				
			||||||
 | 
					        eth=$(macaddr_canonicalize $mac)
 | 
				
			||||||
 | 
					        mac1=$(macaddr_add $eth 2)
 | 
				
			||||||
 | 
					        mac2=$(macaddr_add $eth 3)
 | 
				
			||||||
 | 
					        mac3=$(macaddr_add $eth 4)
 | 
				
			||||||
 | 
					        echo -ne \\x${mac1//:/\\x} >> /lib/firmware/ath11k-macs
 | 
				
			||||||
 | 
					        echo -ne \\x${mac2//:/\\x} >> /lib/firmware/ath11k-macs
 | 
				
			||||||
 | 
					        echo -ne \\x${mac3//:/\\x} >> /lib/firmware/ath11k-macs
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
caldata_die() {
 | 
					caldata_die() {
 | 
				
			||||||
	echo "caldata: " "$*"
 | 
						echo "caldata: " "$*"
 | 
				
			||||||
@@ -158,14 +173,20 @@ case "$FIRMWARE" in
 | 
				
			|||||||
ath11k/IPQ5018/hw1.0/caldata.bin)
 | 
					ath11k/IPQ5018/hw1.0/caldata.bin)
 | 
				
			||||||
	case "$board" in
 | 
						case "$board" in
 | 
				
			||||||
	cig,wf186w|\
 | 
						cig,wf186w|\
 | 
				
			||||||
 | 
						cig,wf186h|\
 | 
				
			||||||
	cybertan,eww622-a1|\
 | 
						cybertan,eww622-a1|\
 | 
				
			||||||
	cybertan,eww631-a1|\
 | 
						cybertan,eww631-a1|\
 | 
				
			||||||
	cybertan,eww631-b1|\
 | 
						cybertan,eww631-b1|\
 | 
				
			||||||
 | 
						wallys,dr5018|\
 | 
				
			||||||
	edgecore,eap104|\
 | 
						edgecore,eap104|\
 | 
				
			||||||
	yuncore,fap655|\
 | 
						yuncore,fap655|\
 | 
				
			||||||
 | 
						hfcl,ion4xi_w|\
 | 
				
			||||||
 | 
						hfcl,ion4x_w|\
 | 
				
			||||||
 | 
						hfcl,ion4xi_HMR|\
 | 
				
			||||||
	liteon,wpx8324|\
 | 
						liteon,wpx8324|\
 | 
				
			||||||
	motorola,q14|\
 | 
						motorola,q14|\
 | 
				
			||||||
	muxi,ap3220l|\
 | 
						muxi,ap3220l|\
 | 
				
			||||||
 | 
						xunison,d50-5g|\
 | 
				
			||||||
	qcom,ipq5018-mp03.1)
 | 
						qcom,ipq5018-mp03.1)
 | 
				
			||||||
		caldata_extract "0:ART" 0x1000 0x20000
 | 
							caldata_extract "0:ART" 0x1000 0x20000
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
@@ -174,6 +195,11 @@ ath11k/IPQ5018/hw1.0/caldata.bin)
 | 
				
			|||||||
ath11k/qcn6122/hw1.0/caldata_1.bin)
 | 
					ath11k/qcn6122/hw1.0/caldata_1.bin)
 | 
				
			||||||
	case "$board" in
 | 
						case "$board" in
 | 
				
			||||||
	cig,wf186w|\
 | 
						cig,wf186w|\
 | 
				
			||||||
 | 
						cig,wf186h|\
 | 
				
			||||||
 | 
						wallys,dr5018|\
 | 
				
			||||||
 | 
						hfcl,ion4xi_w|\
 | 
				
			||||||
 | 
						hfcl,ion4x_w|\
 | 
				
			||||||
 | 
						hfcl,ion4xi_HMR|\
 | 
				
			||||||
	cybertan,eww631-a1|\
 | 
						cybertan,eww631-a1|\
 | 
				
			||||||
	cybertan,eww631-b1|\
 | 
						cybertan,eww631-b1|\
 | 
				
			||||||
	yuncore,fap655|\
 | 
						yuncore,fap655|\
 | 
				
			||||||
@@ -185,6 +211,7 @@ ath11k/qcn6122/hw1.0/caldata_1.bin)
 | 
				
			|||||||
ath11k/qcn6122/hw1.0/caldata_2.bin)
 | 
					ath11k/qcn6122/hw1.0/caldata_2.bin)
 | 
				
			||||||
	case "$board" in
 | 
						case "$board" in
 | 
				
			||||||
	motorola,q14|\
 | 
						motorola,q14|\
 | 
				
			||||||
 | 
						wallys,dr5018|\
 | 
				
			||||||
	cybertan,eww631-a1|\
 | 
						cybertan,eww631-a1|\
 | 
				
			||||||
	cybertan,eww631-b1|\
 | 
						cybertan,eww631-b1|\
 | 
				
			||||||
	edgecore,eap104|\
 | 
						edgecore,eap104|\
 | 
				
			||||||
@@ -201,6 +228,7 @@ ath11k/QCN9074/hw1.0/caldata_1.bin)
 | 
				
			|||||||
	cig,wf196|\
 | 
						cig,wf196|\
 | 
				
			||||||
	wallys,dr6018-v4|\
 | 
						wallys,dr6018-v4|\
 | 
				
			||||||
	cybertan,eww622-a1|\
 | 
						cybertan,eww622-a1|\
 | 
				
			||||||
 | 
						xunison,d50-5g|\
 | 
				
			||||||
	qcom,ipq5018-mp03.1|\
 | 
						qcom,ipq5018-mp03.1|\
 | 
				
			||||||
	qcom,ipq807x-hk14)
 | 
						qcom,ipq807x-hk14)
 | 
				
			||||||
		caldata_extract "0:ART" 0x26800 0x20000
 | 
							caldata_extract "0:ART" 0x26800 0x20000
 | 
				
			||||||
@@ -218,6 +246,9 @@ ath11k/QCN9074/hw1.0/caldata_2.bin)
 | 
				
			|||||||
ath11k-macs)
 | 
					ath11k-macs)
 | 
				
			||||||
	case "$board" in
 | 
						case "$board" in
 | 
				
			||||||
	hfcl,ion4xi|\
 | 
						hfcl,ion4xi|\
 | 
				
			||||||
 | 
						hfcl,ion4xi_w|\
 | 
				
			||||||
 | 
						hfcl,ion4x_w|\
 | 
				
			||||||
 | 
						hfcl,ion4xi_HMR|\
 | 
				
			||||||
	hfcl,ion4xi_wp|\
 | 
						hfcl,ion4xi_wp|\
 | 
				
			||||||
	hfcl,ion4x|\
 | 
						hfcl,ion4x|\
 | 
				
			||||||
	hfcl,ion4x_2|\
 | 
						hfcl,ion4x_2|\
 | 
				
			||||||
@@ -235,6 +266,7 @@ ath11k-macs)
 | 
				
			|||||||
	indio,um-310ax-v1|\
 | 
						indio,um-310ax-v1|\
 | 
				
			||||||
	indio,um-510axp-v1|\
 | 
						indio,um-510axp-v1|\
 | 
				
			||||||
	indio,um-510axm-v1|\
 | 
						indio,um-510axm-v1|\
 | 
				
			||||||
 | 
						xunison,d50-5g|\
 | 
				
			||||||
	cig,wf188n)
 | 
						cig,wf188n)
 | 
				
			||||||
		ath11k_generate_macs
 | 
							ath11k_generate_macs
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
@@ -253,6 +285,9 @@ ath11k-macs)
 | 
				
			|||||||
	cig,wf186w)
 | 
						cig,wf186w)
 | 
				
			||||||
		ath11k_generate_macs_wf186w
 | 
							ath11k_generate_macs_wf186w
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
 | 
						cig,wf186h)
 | 
				
			||||||
 | 
							ath11k_generate_macs_wf186h
 | 
				
			||||||
 | 
							;;
 | 
				
			||||||
	esac
 | 
						esac
 | 
				
			||||||
	;;
 | 
						;;
 | 
				
			||||||
*)
 | 
					*)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										40
									
								
								feeds/ipq807x/ipq807x/base-files/etc/hotplug.d/net/50-dvlan
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								feeds/ipq807x/ipq807x/base-files/etc/hotplug.d/net/50-dvlan
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,40 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					. /lib/functions.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					debug() {
 | 
				
			||||||
 | 
						logger -t HOTPLUG-DVLAN "$*"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ "${INTERFACE:0:4}" != "wlan" ]; then
 | 
				
			||||||
 | 
						exit 0
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					case "$(board_name)" in
 | 
				
			||||||
 | 
						"cig,wf186w")
 | 
				
			||||||
 | 
							wan_iface="eth0"
 | 
				
			||||||
 | 
							switch_dev="switch0"
 | 
				
			||||||
 | 
							switch_wan_port=4
 | 
				
			||||||
 | 
							switch_cpu_port=6
 | 
				
			||||||
 | 
							;;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						*)
 | 
				
			||||||
 | 
							exit 0
 | 
				
			||||||
 | 
					esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					VSTR="$(echo $INTERFACE | egrep -o 'v([0-9]+)$')"
 | 
				
			||||||
 | 
					[ -z "$VSTR" ] && exit 0
 | 
				
			||||||
 | 
					VID="${VSTR:1}"
 | 
				
			||||||
 | 
					[ $VID -lt 1 -o $VID -gt 4096 ] && exit 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ "$ACTION" = "add" ]; then
 | 
				
			||||||
 | 
						debug "[$INTERFACE] Dynamic VLAN $VID added, configuring switch"
 | 
				
			||||||
 | 
						swconfig dev ${switch_dev} vlan $VID set ports "${switch_wan_port}t ${switch_cpu_port}t"
 | 
				
			||||||
 | 
					elif [ "$ACTION" = "remove" ]; then
 | 
				
			||||||
 | 
						let cnt="$(bridge vlan show vid $VID | egrep "^wlan" | wc -l)"
 | 
				
			||||||
 | 
						debug "[$INTERFACE] Dynamic VLAN interface removed, references left = $cnt"
 | 
				
			||||||
 | 
						if [ $cnt -eq 0 ]; then
 | 
				
			||||||
 | 
							debug "[$INTERFACE] No more references, removing $VID from switch"
 | 
				
			||||||
 | 
							swconfig dev ${switch_dev} vlan $VID set ports ""
 | 
				
			||||||
 | 
						fi
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
@@ -7,6 +7,9 @@ boot() {
 | 
				
			|||||||
	hfcl,ion4xe|\
 | 
						hfcl,ion4xe|\
 | 
				
			||||||
	hfcl,ion4x|\
 | 
						hfcl,ion4x|\
 | 
				
			||||||
	hfcl,ion4x_2|\
 | 
						hfcl,ion4x_2|\
 | 
				
			||||||
 | 
						hfcl,ion4xi_w|\
 | 
				
			||||||
 | 
						hfcl,ion4x_w|\
 | 
				
			||||||
 | 
						hfcl,ion4xi_HMR|\
 | 
				
			||||||
	hfcl,ion4xi_wp|\
 | 
						hfcl,ion4xi_wp|\
 | 
				
			||||||
	hfcl,ion4xi)
 | 
						hfcl,ion4xi)
 | 
				
			||||||
		fw_setenv boot_count 0
 | 
							fw_setenv boot_count 0
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -52,7 +52,7 @@ do_flash_emmc() {
 | 
				
			|||||||
	tar Oxf $tar_file ${board_dir}/$part | dd of=${emmcblock}
 | 
						tar Oxf $tar_file ${board_dir}/$part | dd of=${emmcblock}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
emmc_do_upgrade_bootconfig() {
 | 
					spi_nor_emmc_do_upgrade_bootconfig() {
 | 
				
			||||||
	local tar_file="$1"
 | 
						local tar_file="$1"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$')
 | 
						local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$')
 | 
				
			||||||
@@ -84,11 +84,17 @@ emmc_do_upgrade_bootconfig() {
 | 
				
			|||||||
	fi
 | 
						fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for part in "0:BOOTCONFIG" "0:BOOTCONFIG1"; do
 | 
						for part in "0:BOOTCONFIG" "0:BOOTCONFIG1"; do
 | 
				
			||||||
		local emmcblock=$(find_mmc_part $part)
 | 
					               local mtdchar=$(echo $(find_mtd_chardev $part) | sed 's/^.\{5\}//')
 | 
				
			||||||
 | 
					               if [ -n "$mtdchar" ]; then
 | 
				
			||||||
 | 
					                       echo start to update $mtdchar
 | 
				
			||||||
 | 
					                       mtd -qq write /proc/boot_info/getbinary_bootconfig "/dev/${mtdchar}" 2>/dev/null && echo update mtd $mtdchar
 | 
				
			||||||
 | 
					               else
 | 
				
			||||||
 | 
					                       emmcblock=$(find_mmc_part $part)
 | 
				
			||||||
                       echo erase ${emmcblock}
 | 
					                       echo erase ${emmcblock}
 | 
				
			||||||
                       dd if=/dev/zero of=${emmcblock} 2> /dev/null
 | 
					                       dd if=/dev/zero of=${emmcblock} 2> /dev/null
 | 
				
			||||||
                       echo update $emmcblock
 | 
					                       echo update $emmcblock
 | 
				
			||||||
                       dd if=/tmp/bootconfig of=${emmcblock} 2> /dev/null
 | 
					                       dd if=/tmp/bootconfig of=${emmcblock} 2> /dev/null
 | 
				
			||||||
 | 
					               fi
 | 
				
			||||||
	done
 | 
						done
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -111,6 +117,7 @@ platform_check_image() {
 | 
				
			|||||||
	board=$(board_name)
 | 
						board=$(board_name)
 | 
				
			||||||
	case $board in
 | 
						case $board in
 | 
				
			||||||
	cig,wf186w|\
 | 
						cig,wf186w|\
 | 
				
			||||||
 | 
						cig,wf186h|\
 | 
				
			||||||
	cig,wf188|\
 | 
						cig,wf188|\
 | 
				
			||||||
	cig,wf660a|\
 | 
						cig,wf660a|\
 | 
				
			||||||
	cig,wf188n|\
 | 
						cig,wf188n|\
 | 
				
			||||||
@@ -125,6 +132,7 @@ platform_check_image() {
 | 
				
			|||||||
	indio,um-310ax-v1|\
 | 
						indio,um-310ax-v1|\
 | 
				
			||||||
	indio,um-510axp-v1|\
 | 
						indio,um-510axp-v1|\
 | 
				
			||||||
	indio,um-510axm-v1|\
 | 
						indio,um-510axm-v1|\
 | 
				
			||||||
 | 
						wallys,dr5018|\
 | 
				
			||||||
	wallys,dr6018|\
 | 
						wallys,dr6018|\
 | 
				
			||||||
	wallys,dr6018-v4|\
 | 
						wallys,dr6018-v4|\
 | 
				
			||||||
	edgecore,eap101|\
 | 
						edgecore,eap101|\
 | 
				
			||||||
@@ -133,6 +141,9 @@ platform_check_image() {
 | 
				
			|||||||
	liteon,wpx8324|\
 | 
						liteon,wpx8324|\
 | 
				
			||||||
	edgecore,eap106|\
 | 
						edgecore,eap106|\
 | 
				
			||||||
	hfcl,ion4xi|\
 | 
						hfcl,ion4xi|\
 | 
				
			||||||
 | 
						hfcl,ion4xi_w|\
 | 
				
			||||||
 | 
						hfcl,ion4x_w|\
 | 
				
			||||||
 | 
						hfcl,ion4xi_HMR|\
 | 
				
			||||||
	hfcl,ion4xi_wp|\
 | 
						hfcl,ion4xi_wp|\
 | 
				
			||||||
	hfcl,ion4x|\
 | 
						hfcl,ion4x|\
 | 
				
			||||||
	hfcl,ion4x_2|\
 | 
						hfcl,ion4x_2|\
 | 
				
			||||||
@@ -150,6 +161,8 @@ platform_check_image() {
 | 
				
			|||||||
	qcom,ipq6018-cp01|\
 | 
						qcom,ipq6018-cp01|\
 | 
				
			||||||
	qcom,ipq807x-hk01|\
 | 
						qcom,ipq807x-hk01|\
 | 
				
			||||||
	qcom,ipq807x-hk14|\
 | 
						qcom,ipq807x-hk14|\
 | 
				
			||||||
 | 
						xunison,d50|\
 | 
				
			||||||
 | 
						xunison,d50-5g|\
 | 
				
			||||||
	qcom,ipq5018-mp03.3)
 | 
						qcom,ipq5018-mp03.3)
 | 
				
			||||||
		[ "$magic_long" = "73797375" ] && return 0
 | 
							[ "$magic_long" = "73797375" ] && return 0
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
@@ -168,12 +181,11 @@ platform_do_upgrade() {
 | 
				
			|||||||
		qca_do_upgrade $1
 | 
							qca_do_upgrade $1
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
	cig,wf660a)
 | 
						cig,wf660a)
 | 
				
			||||||
		emmc_do_upgrade_bootconfig $1
 | 
							spi_nor_emmc_do_upgrade_bootconfig $1
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
	motorola,q14)
 | 
						motorola,q14)
 | 
				
			||||||
		emmc_do_upgrade $1
 | 
							emmc_do_upgrade $1
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
	cig,wf186w|\
 | 
					 | 
				
			||||||
	cig,wf188n|\
 | 
						cig,wf188n|\
 | 
				
			||||||
	cig,wf194c|\
 | 
						cig,wf194c|\
 | 
				
			||||||
	cig,wf194c4|\
 | 
						cig,wf194c4|\
 | 
				
			||||||
@@ -189,7 +201,10 @@ platform_do_upgrade() {
 | 
				
			|||||||
	qcom,ipq6018-cp01|\
 | 
						qcom,ipq6018-cp01|\
 | 
				
			||||||
	qcom,ipq807x-hk01|\
 | 
						qcom,ipq807x-hk01|\
 | 
				
			||||||
	qcom,ipq807x-hk14|\
 | 
						qcom,ipq807x-hk14|\
 | 
				
			||||||
 | 
						xunison,d50|\
 | 
				
			||||||
 | 
						xunison,d50-5g|\
 | 
				
			||||||
	qcom,ipq5018-mp03.3|\
 | 
						qcom,ipq5018-mp03.3|\
 | 
				
			||||||
 | 
						wallys,dr5018|\
 | 
				
			||||||
	wallys,dr6018|\
 | 
						wallys,dr6018|\
 | 
				
			||||||
	wallys,dr6018-v4|\
 | 
						wallys,dr6018-v4|\
 | 
				
			||||||
	yuncore,fap650|\
 | 
						yuncore,fap650|\
 | 
				
			||||||
@@ -212,17 +227,18 @@ platform_do_upgrade() {
 | 
				
			|||||||
		fi
 | 
							fi
 | 
				
			||||||
		nand_upgrade_tar "$1"
 | 
							nand_upgrade_tar "$1"
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
 | 
						hfcl,ion4xi_w|\
 | 
				
			||||||
 | 
						hfcl,ion4x_w|\
 | 
				
			||||||
 | 
						hfcl,ion4xi_HMR|\
 | 
				
			||||||
	hfcl,ion4xi_wp)
 | 
						hfcl,ion4xi_wp)
 | 
				
			||||||
		wp_part=$(fw_printenv primary | cut  -d = -f2)
 | 
							wp_part=$(fw_printenv primary | cut  -d = -f2)
 | 
				
			||||||
		echo "Current Primary is $wp_part"
 | 
							echo "Current Primary is $wp_part"
 | 
				
			||||||
		if [[ $wp_part == 1 ]]; then
 | 
							if [[ $wp_part == 1 ]]; then
 | 
				
			||||||
			CI_UBIPART="rootfs"
 | 
								CI_UBIPART="rootfs"
 | 
				
			||||||
			echo "Setting Primary 0 and Flashing"
 | 
								CI_FWSETENV="primary 0"
 | 
				
			||||||
			fw_setenv primary 0 || exit 1
 | 
					 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
			CI_UBIPART="rootfs_1"
 | 
								CI_UBIPART="rootfs_1"
 | 
				
			||||||
			echo "Setting Primary 1 and Flashing"
 | 
								CI_FWSETENV="primary 1"
 | 
				
			||||||
			fw_setenv primary 1 || exit 1
 | 
					 | 
				
			||||||
		fi
 | 
							fi
 | 
				
			||||||
		nand_upgrade_tar "$1"
 | 
							nand_upgrade_tar "$1"
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
@@ -244,10 +260,10 @@ platform_do_upgrade() {
 | 
				
			|||||||
				fw_setenv upgrade_available 0 || exit 1
 | 
									fw_setenv upgrade_available 0 || exit 1
 | 
				
			||||||
			elif grep -q rootfs1 /proc/cmdline; then
 | 
								elif grep -q rootfs1 /proc/cmdline; then
 | 
				
			||||||
				CI_UBIPART="rootfs2"
 | 
									CI_UBIPART="rootfs2"
 | 
				
			||||||
				fw_setenv active 2 || exit 1
 | 
									CI_FWSETENV="active 2"
 | 
				
			||||||
			else
 | 
								else
 | 
				
			||||||
				CI_UBIPART="rootfs1"
 | 
									CI_UBIPART="rootfs1"
 | 
				
			||||||
				fw_setenv active 1 || exit 1
 | 
									CI_FWSETENV="active 1"
 | 
				
			||||||
			fi
 | 
								fi
 | 
				
			||||||
		fi
 | 
							fi
 | 
				
			||||||
		nand_upgrade_tar "$1"
 | 
							nand_upgrade_tar "$1"
 | 
				
			||||||
@@ -257,6 +273,8 @@ platform_do_upgrade() {
 | 
				
			|||||||
		PART_NAME="inactive"
 | 
							PART_NAME="inactive"
 | 
				
			||||||
		platform_do_upgrade_dualboot_datachk "$1"
 | 
							platform_do_upgrade_dualboot_datachk "$1"
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
 | 
						cig,wf186w|\
 | 
				
			||||||
 | 
						cig,wf186h|\
 | 
				
			||||||
	yuncore,ax840|\
 | 
						yuncore,ax840|\
 | 
				
			||||||
	yuncore,fap655)
 | 
						yuncore,fap655)
 | 
				
			||||||
		[ -f /proc/boot_info/rootfs/upgradepartition ] && {
 | 
							[ -f /proc/boot_info/rootfs/upgradepartition ] && {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Permission to use, copy, modify, and/or distribute this software for any
 | 
				
			||||||
 | 
					 * purpose with or without fee is hereby granted, provided that the above
 | 
				
			||||||
 | 
					 * copyright notice and this permission notice appear in all copies.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 | 
				
			||||||
 | 
					 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 | 
				
			||||||
 | 
					 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 | 
				
			||||||
 | 
					 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 | 
				
			||||||
 | 
					 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 | 
				
			||||||
 | 
					 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 | 
				
			||||||
 | 
					 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "../../../arm64/boot/dts/qcom/qcom-ipq5018-cig-wf186h.dts"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/ {
 | 
				
			||||||
 | 
						pmuv8: pmu {
 | 
				
			||||||
 | 
							compatible = "arm,cortex-a7-pmu";
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
@@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Permission to use, copy, modify, and/or distribute this software for any
 | 
				
			||||||
 | 
					 * purpose with or without fee is hereby granted, provided that the above
 | 
				
			||||||
 | 
					 * copyright notice and this permission notice appear in all copies.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 | 
				
			||||||
 | 
					 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 | 
				
			||||||
 | 
					 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 | 
				
			||||||
 | 
					 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 | 
				
			||||||
 | 
					 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 | 
				
			||||||
 | 
					 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 | 
				
			||||||
 | 
					 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "../../../arm64/boot/dts/qcom/qcom-ipq5018-hfcl-ion4x_w.dts"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/ {
 | 
				
			||||||
 | 
						pmuv8: pmu {
 | 
				
			||||||
 | 
							compatible = "arm,cortex-a7-pmu";
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
@@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Permission to use, copy, modify, and/or distribute this software for any
 | 
				
			||||||
 | 
					 * purpose with or without fee is hereby granted, provided that the above
 | 
				
			||||||
 | 
					 * copyright notice and this permission notice appear in all copies.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 | 
				
			||||||
 | 
					 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 | 
				
			||||||
 | 
					 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 | 
				
			||||||
 | 
					 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 | 
				
			||||||
 | 
					 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 | 
				
			||||||
 | 
					 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 | 
				
			||||||
 | 
					 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "../../../arm64/boot/dts/qcom/qcom-ipq5018-hfcl-ion4xi_HMR.dts"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/ {
 | 
				
			||||||
 | 
						pmuv8: pmu {
 | 
				
			||||||
 | 
							compatible = "arm,cortex-a7-pmu";
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
@@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Permission to use, copy, modify, and/or distribute this software for any
 | 
				
			||||||
 | 
					 * purpose with or without fee is hereby granted, provided that the above
 | 
				
			||||||
 | 
					 * copyright notice and this permission notice appear in all copies.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 | 
				
			||||||
 | 
					 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 | 
				
			||||||
 | 
					 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 | 
				
			||||||
 | 
					 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 | 
				
			||||||
 | 
					 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 | 
				
			||||||
 | 
					 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 | 
				
			||||||
 | 
					 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "../../../arm64/boot/dts/qcom/qcom-ipq5018-hfcl-ion4xi_w.dts"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/ {
 | 
				
			||||||
 | 
						pmuv8: pmu {
 | 
				
			||||||
 | 
							compatible = "arm,cortex-a7-pmu";
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
							
								
								
									
										10
									
								
								feeds/ipq807x/ipq807x/files/arch/arm/boot/dts/qcom-ipq5018-wallys-dr5018.dts
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										10
									
								
								feeds/ipq807x/ipq807x/files/arch/arm/boot/dts/qcom-ipq5018-wallys-dr5018.dts
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,10 @@
 | 
				
			|||||||
 | 
					#include "../../../arm64/boot/dts/qcom/qcom-ipq5018-wallys-dr5018.dts"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/ {
 | 
				
			||||||
 | 
						model = "Wallys DR5018";
 | 
				
			||||||
 | 
						compatible = "wallys,dr5018", "qcom,ipq5018";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						pmuv8: pmu {
 | 
				
			||||||
 | 
						compatible = "arm,cortex-a7-pmu";
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
@@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Permission to use, copy, modify, and/or distribute this software for any
 | 
				
			||||||
 | 
					 * purpose with or without fee is hereby granted, provided that the above
 | 
				
			||||||
 | 
					 * copyright notice and this permission notice appear in all copies.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 | 
				
			||||||
 | 
					 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 | 
				
			||||||
 | 
					 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 | 
				
			||||||
 | 
					 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 | 
				
			||||||
 | 
					 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 | 
				
			||||||
 | 
					 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 | 
				
			||||||
 | 
					 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "../../../arm64/boot/dts/qcom/qcom-ipq5018-xunison-d50-5g.dts"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/ {
 | 
				
			||||||
 | 
						pmuv8: pmu {
 | 
				
			||||||
 | 
							compatible = "arm,cortex-a7-pmu";
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
@@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Permission to use, copy, modify, and/or distribute this software for any
 | 
				
			||||||
 | 
					 * purpose with or without fee is hereby granted, provided that the above
 | 
				
			||||||
 | 
					 * copyright notice and this permission notice appear in all copies.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 | 
				
			||||||
 | 
					 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 | 
				
			||||||
 | 
					 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 | 
				
			||||||
 | 
					 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 | 
				
			||||||
 | 
					 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 | 
				
			||||||
 | 
					 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 | 
				
			||||||
 | 
					 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "../../../arm64/boot/dts/qcom/qcom-ipq5018-xunison-d50.dts"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/ {
 | 
				
			||||||
 | 
						pmuv8: pmu {
 | 
				
			||||||
 | 
							compatible = "arm,cortex-a7-pmu";
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
							
								
								
									
										1441
									
								
								feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-hfcl-ion4xi_HMR.dtsi
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										1441
									
								
								feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-hfcl-ion4xi_HMR.dtsi
									
									
									
									
									
										Executable file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -0,0 +1,965 @@
 | 
				
			|||||||
 | 
					/dts-v1/;
 | 
				
			||||||
 | 
					/* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Permission to use, copy, modify, and/or distribute this software for any
 | 
				
			||||||
 | 
					 * purpose with or without fee is hereby granted, provided that the above
 | 
				
			||||||
 | 
					 * copyright notice and this permission notice appear in all copies.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 | 
				
			||||||
 | 
					 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 | 
				
			||||||
 | 
					 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 | 
				
			||||||
 | 
					 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 | 
				
			||||||
 | 
					 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 | 
				
			||||||
 | 
					 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 | 
				
			||||||
 | 
					 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "qcom-ipq5018.dtsi"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/ {
 | 
				
			||||||
 | 
						#address-cells = <0x2>;
 | 
				
			||||||
 | 
						#size-cells = <0x2>;
 | 
				
			||||||
 | 
						model = "CIG wf186h";
 | 
				
			||||||
 | 
						compatible = "cig,wf186h","qcom,ipq5018-mp03.3", "qcom,ipq5018";
 | 
				
			||||||
 | 
						interrupt-parent = <&intc>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						aliases {
 | 
				
			||||||
 | 
							sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
 | 
				
			||||||
 | 
							serial0 = &blsp1_uart1;
 | 
				
			||||||
 | 
							serial1 = &blsp1_uart2;
 | 
				
			||||||
 | 
							ethernet0 = "/soc/dp1";
 | 
				
			||||||
 | 
							ethernet1 = "/soc/dp2";
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						chosen {
 | 
				
			||||||
 | 
							bootargs = "console=ttyMSM0,115200,n8 rw init=/init";
 | 
				
			||||||
 | 
						#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
							bootargs-append = " swiotlb=1";
 | 
				
			||||||
 | 
						#else
 | 
				
			||||||
 | 
							bootargs-append = " swiotlb=1 coherent_pool=2M";
 | 
				
			||||||
 | 
						#endif
 | 
				
			||||||
 | 
							stdout-path = "serial0";
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						reserved-memory {
 | 
				
			||||||
 | 
						#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
						/*            256 MB Profile
 | 
				
			||||||
 | 
						 * +=========+==============+========================+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | Region | Start Offset |          Size           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |  NSS   |  0x40000000  |          8MB            |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | Linux  |  0x40800000  | Depends on total memory |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | uboot  |  0x4A600000  |           4MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  SBL   |  0x4AA00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  smem  |  0x4AB00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |   TZ   |  0x4AC00000  |           4MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |   Q6   |  0x4B000000  |          16MB           |
 | 
				
			||||||
 | 
						 * |  code/ |              |                         |
 | 
				
			||||||
 | 
						 * |  data  |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |IPQ5018 |  0x4C000000  |          13MB           |
 | 
				
			||||||
 | 
						 * |  data  |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | M3 Dump|  0x4CD00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  QDSS  |  0x4CE00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |QCN6122 |  0x4CF00000  |          15MB           |
 | 
				
			||||||
 | 
						 * |  data  |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | M3 Dump|  0x4DE00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  QDSS  |  0x4DF00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |QCN9000 |  0x4E000000  |          17MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |  MHI1  |  0x4F100000  |          16MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |                                                 |
 | 
				
			||||||
 | 
						 * |      Rest of the memory for Linux               |
 | 
				
			||||||
 | 
						 * |                                                 |
 | 
				
			||||||
 | 
						 * +=================================================+
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_mem_regions: q6_mem_regions@4B000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4B000000 0x0 0x3000000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_code_data: q6_code_data@4B000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4B000000 0x0 01000000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_ipq5018_data: q6_ipq5018_data@4c000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4c000000 0x0 0xD00000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							m3_dump: m3_dump@4CD00000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4CD00000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_etr_region:q6_etr_dump@4CE00000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4CE00000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_qcn6122_data1: q6_qcn6122_data1@4CF00000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4CF00000 0x0 0xF00000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							m3_dump_qcn6122_1: m3_dump_qcn6122_1@4DE00000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4DE00000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_qcn6122_etr_1: q6_qcn6122_etr_1@4DF00000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4DF00000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_qcn9000_region: qcn9000_pcie0@4E000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4E000000 0x0 0x01100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mhi_region1: dma_pool1@4F100000 {
 | 
				
			||||||
 | 
								compatible = "shared-dma-pool";
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4F100000 0x0 0x01000000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						#elif __IPQ_MEM_PROFILE_512_MB__
 | 
				
			||||||
 | 
						/*                      512 MB Profile
 | 
				
			||||||
 | 
						 * +=========+==============+========================+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | Region | Start Offset |          Size           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |  NSS   |  0x40000000  |          16MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | Linux  |  0x41000000  | Depends on total memory |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | uboot  |  0x4A600000  |           4MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  SBL   |  0x4AA00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  smem  |  0x4AB00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |   TZ   |  0x4AC00000  |           4MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |   Q6   |  0x4B000000  |          16MB           |
 | 
				
			||||||
 | 
						 * |  code/ |              |                         |
 | 
				
			||||||
 | 
						 * |  data  |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |IPQ5018 |  0x4C000000  |          14MB           |
 | 
				
			||||||
 | 
						 * |  data  |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | M3 Dump|  0x4CE00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  QDSS  |  0x4CF00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | caldb  |  0x4D000000  |           2MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |QCN6122 |  0x4D200000  |          16MB           |
 | 
				
			||||||
 | 
						 * |  data  |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | M3 Dump|  0x4E200000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  QDSS  |  0x4E300000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | caldb  |  0x4E400000  |           5MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |QCN9000 |  0x4E900000  |          30MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |  MHI1  |  0x50700000  |          16MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |                                                 |
 | 
				
			||||||
 | 
						 * |      Rest of the memory for Linux               |
 | 
				
			||||||
 | 
						 * |                                                 |
 | 
				
			||||||
 | 
						 * +=================================================+
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_mem_regions: q6_mem_regions@4B000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4B000000 0x0 0x3900000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_code_data: q6_code_data@4B000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4B000000 0x0 01000000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_ipq5018_data: q6_ipq5018_data@4C000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4C000000 0x0 0xE00000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							m3_dump: m3_dump@4CE00000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4CE00000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_etr_region: q6_etr_dump@4CF00000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4CF00000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_caldb_region: q6_caldb_region@4D000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4D000000 0x0 0x200000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_qcn6122_data1: q6_qcn6122_data1@4D200000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4D200000 0x0 0x1000000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E200000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4E200000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E300000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4E300000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E400000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4E400000 0x0 0x500000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_qcn9000_region: qcn9000_pcie0@4E900000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4E900000 0x0 0x01E00000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mhi_region1: dma_pool1@50700000 {
 | 
				
			||||||
 | 
								compatible = "shared-dma-pool";
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x50700000 0x0 0x01000000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						#else
 | 
				
			||||||
 | 
						/*                      1G Profile
 | 
				
			||||||
 | 
						 * +=========+==============+========================+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | Region | Start Offset |          Size           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |  NSS   |  0x40000000  |          16MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | Linux  |  0x41000000  | Depends on total memory |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | uboot  |  0x4A600000  |           4MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  SBL   |  0x4AA00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  smem  |  0x4AB00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |   TZ   |  0x4AC00000  |           4MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |   Q6   |  0x4B000000  |          16MB           |
 | 
				
			||||||
 | 
						 * |  code/ |              |                         |
 | 
				
			||||||
 | 
						 * |  data  |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |IPQ5018 |  0x4C000000  |          14MB           |
 | 
				
			||||||
 | 
						 * |  data  |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | M3 Dump|  0x4CE00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  QDSS  |  0x4CF00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | caldb  |  0x4D000000  |           2MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |QCN6122 |  0x4D200000  |          16MB           |
 | 
				
			||||||
 | 
						 * |  data  |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | M3 Dump|  0x4E200000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  QDSS  |  0x4E300000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | caldb  |  0x4E400000  |           5MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |QCN9000 |  0x4E900000  |          45MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |  MHI1  |  0x51600000  |          24MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |                                                 |
 | 
				
			||||||
 | 
						 * |      Rest of the memory for Linux               |
 | 
				
			||||||
 | 
						 * |                                                 |
 | 
				
			||||||
 | 
						 * +=================================================+
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_mem_regions: q6_mem_regions@4B000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4B000000 0x0 0x3900000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_code_data: q6_code_data@4B000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4B000000 0x0 01000000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_ipq5018_data: q6_ipq5018_data@4C000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4C000000 0x0 0xE00000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							m3_dump: m3_dump@4CE00000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4CE00000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_etr_region: q6_etr_dump@4CF00000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4CF00000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_caldb_region: q6_caldb_region@4D000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4D000000 0x0 0x200000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_qcn6122_data1: q6_qcn6122_data1@4D200000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4D200000 0x0 0x1000000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E200000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4E200000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E300000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4E300000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E400000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4E400000 0x0 0x500000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_qcn9000_region: qcn9000_pcie0@4E900000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4E900000 0x0 0x02D00000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mhi_region1: dma_pool1@51600000 {
 | 
				
			||||||
 | 
								compatible = "shared-dma-pool";
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x51600000 0x0 0x01800000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						#endif
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						soc {
 | 
				
			||||||
 | 
							serial@78af000 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							blsp1_uart2: serial@78b0000 {
 | 
				
			||||||
 | 
								pinctrl-0 = <&blsp1_uart_pins>;
 | 
				
			||||||
 | 
								pinctrl-names = "default";
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							qpic_bam: dma@7984000{
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							nand: qpic-nand@79b0000 {
 | 
				
			||||||
 | 
								pinctrl-0 = <&qspi_nand_pins>;
 | 
				
			||||||
 | 
								pinctrl-names = "default";
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							spi_0: spi@78b5000 { /* BLSP1 QUP0 */
 | 
				
			||||||
 | 
								pinctrl-0 = <&blsp0_spi_pins>;
 | 
				
			||||||
 | 
								pinctrl-names = "default";
 | 
				
			||||||
 | 
								cs-select = <0>;
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								m25p80@0 {
 | 
				
			||||||
 | 
									#address-cells = <1>;
 | 
				
			||||||
 | 
									#size-cells = <1>;
 | 
				
			||||||
 | 
									reg = <0>;
 | 
				
			||||||
 | 
									compatible = "n25q128a11";
 | 
				
			||||||
 | 
									linux,modalias = "m25p80", "n25q128a11";
 | 
				
			||||||
 | 
									spi-max-frequency = <50000000>;
 | 
				
			||||||
 | 
									use-default-sizes;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mdio0: mdio@88000 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
								ethernet-phy@0 {
 | 
				
			||||||
 | 
									reg = <7>;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mdio1: mdio@90000 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
								pinctrl-0 = <&mdio1_pins>;
 | 
				
			||||||
 | 
								pinctrl-names = "default";
 | 
				
			||||||
 | 
								phy-reset-gpio = <&tlmm 35 0>;
 | 
				
			||||||
 | 
								cig_clk_div = <0xff>;
 | 
				
			||||||
 | 
								ethernet-phy@0 {
 | 
				
			||||||
 | 
									reg = <0x1d>;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							realtek@29{
 | 
				
			||||||
 | 
								compatible = "realtek,rtl8367s";
 | 
				
			||||||
 | 
								mii-bus = <&mdio1>;
 | 
				
			||||||
 | 
								realtek,extif0 = <0 0 10 1 1 1 1 1 2>;
 | 
				
			||||||
 | 
								switch = <&tlmm 35 0>;
 | 
				
			||||||
 | 
								phy-addr = <29>;
 | 
				
			||||||
 | 
					                        status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							ess-instance {
 | 
				
			||||||
 | 
								num_devices = <0x1>;
 | 
				
			||||||
 | 
								ess-switch@0x39c00000 {
 | 
				
			||||||
 | 
									compatible = "qcom,ess-switch-ipq50xx";
 | 
				
			||||||
 | 
									device_id = <0>;
 | 
				
			||||||
 | 
									switch_mac_mode = <0xf>; /* mac mode for uniphy instance*/
 | 
				
			||||||
 | 
									cmnblk_clk = "internal_96MHz"; /* cmnblk clk*/
 | 
				
			||||||
 | 
									qcom,port_phyinfo {
 | 
				
			||||||
 | 
										port@0 {
 | 
				
			||||||
 | 
											port_id = <1>;
 | 
				
			||||||
 | 
											phy_address = <7>;
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
										port@1 {
 | 
				
			||||||
 | 
											port_id = <2>;
 | 
				
			||||||
 | 
											forced-speed = <1000>;
 | 
				
			||||||
 | 
											forced-duplex = <1>;
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
									};
 | 
				
			||||||
 | 
									led_source@0 {
 | 
				
			||||||
 | 
										source = <0>;
 | 
				
			||||||
 | 
										mode = "normal";
 | 
				
			||||||
 | 
										speed = "all";
 | 
				
			||||||
 | 
										blink_en = "enable";
 | 
				
			||||||
 | 
										active = "high";
 | 
				
			||||||
 | 
									};
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							wifi0: wifi@c000000 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					               dp1 {
 | 
				
			||||||
 | 
					                        device_type = "network";
 | 
				
			||||||
 | 
					                        compatible = "qcom,nss-dp";
 | 
				
			||||||
 | 
					                        clocks = <&gcc GCC_SNOC_GMAC1_AXI_CLK>;
 | 
				
			||||||
 | 
					                        clock-names = "nss-snoc-gmac-axi-clk";
 | 
				
			||||||
 | 
					                        qcom,id = <2>;
 | 
				
			||||||
 | 
					                        reg = <0x39D00000 0x10000>;
 | 
				
			||||||
 | 
					                        interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
 | 
				
			||||||
 | 
					                        qcom,mactype = <2>;
 | 
				
			||||||
 | 
					                        local-mac-address = [000000000000];
 | 
				
			||||||
 | 
					                        phy-mode = "sgmii";
 | 
				
			||||||
 | 
					                };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                dp2 {
 | 
				
			||||||
 | 
					                        device_type = "network";
 | 
				
			||||||
 | 
					                        compatible = "qcom,nss-dp";
 | 
				
			||||||
 | 
					                        clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>;
 | 
				
			||||||
 | 
					                        clock-names = "nss-snoc-gmac-axi-clk";
 | 
				
			||||||
 | 
					                        qcom,id = <1>;
 | 
				
			||||||
 | 
					                        reg = <0x39C00000 0x10000>;
 | 
				
			||||||
 | 
					                        interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
 | 
				
			||||||
 | 
					                        qcom,mactype = <2>;
 | 
				
			||||||
 | 
					                        qcom,link-poll = <1>;
 | 
				
			||||||
 | 
					                        qcom,phy-mdio-addr = <7>;
 | 
				
			||||||
 | 
					                        mdio-bus = <&mdio0>;
 | 
				
			||||||
 | 
					                        local-mac-address = [000000000000];
 | 
				
			||||||
 | 
					                        phy-mode = "sgmii";
 | 
				
			||||||
 | 
					                };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							qcom,test@0 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							lpass: lpass@0xA000000{
 | 
				
			||||||
 | 
								status = "disabled";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							pcm: pcm@0xA3C0000{
 | 
				
			||||||
 | 
								pinctrl-0 = <&audio_pins>;
 | 
				
			||||||
 | 
								pinctrl-names = "default";
 | 
				
			||||||
 | 
								status = "disabled";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							gpio_keys {
 | 
				
			||||||
 | 
								compatible = "gpio-keys";
 | 
				
			||||||
 | 
								pinctrl-0 = <&button_pins>;
 | 
				
			||||||
 | 
								pinctrl-names = "default";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								button@1 {
 | 
				
			||||||
 | 
									label = "rst";
 | 
				
			||||||
 | 
									linux,code = <KEY_RESTART>;
 | 
				
			||||||
 | 
									gpios = <&tlmm 27 GPIO_ACTIVE_LOW>;
 | 
				
			||||||
 | 
									linux,input-type = <1>;
 | 
				
			||||||
 | 
									debounce-interval = <60>;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							pcm_lb: pcm_lb@0 {
 | 
				
			||||||
 | 
								status = "disabled";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						thermal-zones {
 | 
				
			||||||
 | 
							status = "ok";
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&tlmm {
 | 
				
			||||||
 | 
						pinctrl-0 = <&phy_led_pins>;
 | 
				
			||||||
 | 
						pinctrl-names = "default";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						blsp1_uart_pins: blsp1_uart_pins {
 | 
				
			||||||
 | 
							blsp1_uart_rx_tx {
 | 
				
			||||||
 | 
								pins = "gpio31", "gpio33";
 | 
				
			||||||
 | 
								function = "blsp1_uart1";
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						blsp0_spi_pins: blsp0_spi_pins {
 | 
				
			||||||
 | 
							mux {
 | 
				
			||||||
 | 
								pins = "gpio10", "gpio11", "gpio12", "gpio13";
 | 
				
			||||||
 | 
								function = "blsp0_spi";
 | 
				
			||||||
 | 
								drive-strength = <2>;
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						qspi_nand_pins: qspi_nand_pins {
 | 
				
			||||||
 | 
							qspi_clock {
 | 
				
			||||||
 | 
									pins = "gpio9";
 | 
				
			||||||
 | 
									function = "qspi_clk";
 | 
				
			||||||
 | 
									drive-strength = <8>;
 | 
				
			||||||
 | 
									bias-disable;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							qspi_cs {
 | 
				
			||||||
 | 
									pins = "gpio8";
 | 
				
			||||||
 | 
									function = "qspi_cs";
 | 
				
			||||||
 | 
									drive-strength = <8>;
 | 
				
			||||||
 | 
									bias-disable;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							qspi_data_0 {
 | 
				
			||||||
 | 
									pins = "gpio7";
 | 
				
			||||||
 | 
									function = "qspi0";
 | 
				
			||||||
 | 
									drive-strength = <8>;
 | 
				
			||||||
 | 
									bias-disable;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							qspi_data_1 {
 | 
				
			||||||
 | 
									pins = "gpio6";
 | 
				
			||||||
 | 
									function = "qspi1";
 | 
				
			||||||
 | 
									drive-strength = <8>;
 | 
				
			||||||
 | 
									bias-disable;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							qspi_data_2 {
 | 
				
			||||||
 | 
									pins = "gpio5";
 | 
				
			||||||
 | 
									function = "qspi2";
 | 
				
			||||||
 | 
									drive-strength = <8>;
 | 
				
			||||||
 | 
									bias-disable;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							qspi_data_3 {
 | 
				
			||||||
 | 
									pins = "gpio4";
 | 
				
			||||||
 | 
									function = "qspi3";
 | 
				
			||||||
 | 
									drive-strength = <8>;
 | 
				
			||||||
 | 
									bias-disable;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						mdio1_pins: mdio_pinmux {
 | 
				
			||||||
 | 
							mux_0 {
 | 
				
			||||||
 | 
								pins = "gpio36";
 | 
				
			||||||
 | 
								function = "mdc";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-up;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_1 {
 | 
				
			||||||
 | 
								pins = "gpio37";
 | 
				
			||||||
 | 
								function = "mdio";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-up;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						phy_led_pins: phy_led_pins {
 | 
				
			||||||
 | 
							gephy_led_pin {
 | 
				
			||||||
 | 
								pins = "gpio46";
 | 
				
			||||||
 | 
								function = "led0";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						i2c_pins: i2c_pins {
 | 
				
			||||||
 | 
							i2c_scl {
 | 
				
			||||||
 | 
								pins = "gpio25";
 | 
				
			||||||
 | 
								function = "blsp2_i2c1";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							i2c_sda {
 | 
				
			||||||
 | 
								pins = "gpio26";
 | 
				
			||||||
 | 
								function = "blsp2_i2c1";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						button_pins: button_pins {
 | 
				
			||||||
 | 
							wps_button {
 | 
				
			||||||
 | 
								pins = "gpio38";
 | 
				
			||||||
 | 
								function = "gpio";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-up;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							rst_button {
 | 
				
			||||||
 | 
								pins = "gpio27";
 | 
				
			||||||
 | 
								function = "gpio";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-up;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
						audio_pins: audio_pinmux {
 | 
				
			||||||
 | 
							mux_1 {
 | 
				
			||||||
 | 
								pins = "gpio24";
 | 
				
			||||||
 | 
								function = "audio_rxbclk";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_2 {
 | 
				
			||||||
 | 
								pins = "gpio25";
 | 
				
			||||||
 | 
								function = "audio_rxfsync";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_5 {
 | 
				
			||||||
 | 
								pins = "gpio28";
 | 
				
			||||||
 | 
								function = "audio_txbclk";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						pwm_pins: pwm_pinmux {
 | 
				
			||||||
 | 
						        mux_1 {
 | 
				
			||||||
 | 
						            pins = "gpio0";
 | 
				
			||||||
 | 
						            function = "pwm10";
 | 
				
			||||||
 | 
						            drive-strength = <8>;
 | 
				
			||||||
 | 
						        };
 | 
				
			||||||
 | 
							mux_2 {
 | 
				
			||||||
 | 
									pins = "gpio1";
 | 
				
			||||||
 | 
									function = "pwm20";
 | 
				
			||||||
 | 
									drive-strength = <8>;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							mux_3 {
 | 
				
			||||||
 | 
									pins = "gpio45";
 | 
				
			||||||
 | 
									function = "pwm3";
 | 
				
			||||||
 | 
									drive-strength = <8>;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&soc {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						 pwm: pwm@0x1941010 {
 | 
				
			||||||
 | 
						        pinctrl-0 = <&pwm_pins>;
 | 
				
			||||||
 | 
						        pinctrl-names = "default";
 | 
				
			||||||
 | 
						        used-pwm-indices = <1>, <1>, <1>, <1>;
 | 
				
			||||||
 | 
							dft-pwm-status = <1>, <0>, <0>, <0>;
 | 
				
			||||||
 | 
						        status = "ok";
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&usb3 {
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
						device-power-gpio = <&tlmm 24 1>;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&eud {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x1 {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
						perst-gpio = <&tlmm 18 1>;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x2 {
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
						perst-gpio = <&tlmm 15 1>;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&dwc_0 {
 | 
				
			||||||
 | 
						/delete-property/ #phy-cells;
 | 
				
			||||||
 | 
						/delete-property/ phys;
 | 
				
			||||||
 | 
						/delete-property/ phy-names;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&hs_m31phy_0 {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x1phy {
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x2phy {
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x1_rp {
 | 
				
			||||||
 | 
					        status = "disabled";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						mhi_0: qcom,mhi@0 {
 | 
				
			||||||
 | 
							reg = <0 0 0 0 0 >;
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x2_rp {
 | 
				
			||||||
 | 
					        status = "disabled";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						mhi_1: qcom,mhi@1 {
 | 
				
			||||||
 | 
							reg = <0 0 0 0 0 >;
 | 
				
			||||||
 | 
							qrtr_instance_id = <0x21>;
 | 
				
			||||||
 | 
							#address-cells = <0x2>;
 | 
				
			||||||
 | 
							#size-cells = <0x2>;
 | 
				
			||||||
 | 
							memory-region = <&mhi_region1>;
 | 
				
			||||||
 | 
					#if !defined(__CNSS2__)
 | 
				
			||||||
 | 
							base-addr = <0x4E900000>;
 | 
				
			||||||
 | 
							m3-dump-addr = <0x4FD00000>;
 | 
				
			||||||
 | 
							etr-addr = <0x4FE00000>;
 | 
				
			||||||
 | 
							qcom,caldb-addr = <0x4FF00000>;
 | 
				
			||||||
 | 
							qcom,tgt-mem-mode = <0x1>;
 | 
				
			||||||
 | 
							mhi,max-channels = <30>;
 | 
				
			||||||
 | 
							mhi,timeout = <10000>;
 | 
				
			||||||
 | 
							qcom,board_id = <0xa4>;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&wifi3 {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&qfprom {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&tsens {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&qcom_q6v5_wcss {
 | 
				
			||||||
 | 
						qcom,multipd_arch;
 | 
				
			||||||
 | 
						memory-region = <&q6_mem_regions>;
 | 
				
			||||||
 | 
						qcom,share_bootargs;
 | 
				
			||||||
 | 
						qcom,bootargs_smem = <507>;
 | 
				
			||||||
 | 
						boot-args = <0x2 0x4 0x2 0x12 0x0 0x0>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* IPQ5018 */
 | 
				
			||||||
 | 
						q6v5_wcss_userpd1 {
 | 
				
			||||||
 | 
							m3_firmware = "IPQ5018/m3_fw.mdt";
 | 
				
			||||||
 | 
							interrupts-extended = <&wcss_smp2p_in 8 0>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_in 9 0>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_in 12 0>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_in 11 0>;
 | 
				
			||||||
 | 
							interrupt-names ="fatal",
 | 
				
			||||||
 | 
								"ready",
 | 
				
			||||||
 | 
								"spawn_ack",
 | 
				
			||||||
 | 
								"stop-ack";
 | 
				
			||||||
 | 
							qcom,smem-states = <&wcss_smp2p_out 8>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_out 9>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_out 10>;
 | 
				
			||||||
 | 
							qcom,smem-state-names = "shutdown",
 | 
				
			||||||
 | 
								"stop",
 | 
				
			||||||
 | 
								"spawn";
 | 
				
			||||||
 | 
							qca,asid = <1>;
 | 
				
			||||||
 | 
							qca,auto-restart;
 | 
				
			||||||
 | 
							qca,int_radio;
 | 
				
			||||||
 | 
							#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
							memory-region = <&q6_ipq5018_data>, <&m3_dump>,
 | 
				
			||||||
 | 
									<&q6_etr_region>;
 | 
				
			||||||
 | 
							#else
 | 
				
			||||||
 | 
							memory-region = <&q6_ipq5018_data>, <&m3_dump>,
 | 
				
			||||||
 | 
									<&q6_etr_region>, <&q6_caldb_region>;
 | 
				
			||||||
 | 
							#endif
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* QCN6122 5G */
 | 
				
			||||||
 | 
						q6v5_wcss_userpd2 {
 | 
				
			||||||
 | 
							m3_firmware = "qcn6122/m3_fw.mdt";
 | 
				
			||||||
 | 
							interrupts-extended = <&wcss_smp2p_in 16 0>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_in 17 0>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_in 20 0>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_in 19 0>;
 | 
				
			||||||
 | 
							interrupt-names ="fatal",
 | 
				
			||||||
 | 
								"ready",
 | 
				
			||||||
 | 
								"spawn_ack",
 | 
				
			||||||
 | 
								"stop-ack";
 | 
				
			||||||
 | 
							qcom,smem-states = <&wcss_smp2p_out 16>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_out 17>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_out 18>;
 | 
				
			||||||
 | 
							qcom,smem-state-names = "shutdown",
 | 
				
			||||||
 | 
								"stop",
 | 
				
			||||||
 | 
								"spawn";
 | 
				
			||||||
 | 
							qca,asid = <2>;
 | 
				
			||||||
 | 
							qca,auto-restart;
 | 
				
			||||||
 | 
							#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
							memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
 | 
				
			||||||
 | 
									<&q6_qcn6122_etr_1>;
 | 
				
			||||||
 | 
							#else
 | 
				
			||||||
 | 
							memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
 | 
				
			||||||
 | 
									<&q6_qcn6122_etr_1>, <&q6_qcn6122_caldb_1>;
 | 
				
			||||||
 | 
							#endif
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&i2c_0 {
 | 
				
			||||||
 | 
						pinctrl-0 = <&i2c_pins>;
 | 
				
			||||||
 | 
						pinctrl-names = "default";
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&qgic_msi_0 {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&wifi0 {
 | 
				
			||||||
 | 
						/* IPQ5018 */
 | 
				
			||||||
 | 
						qcom,multipd_arch;
 | 
				
			||||||
 | 
					#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
						qcom,tgt-mem-mode = <2>;
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						qcom,tgt-mem-mode = <1>;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						qcom,board_id = <0x24>;
 | 
				
			||||||
 | 
						qcom,bdf-addr = <0x0 0x4C000000 0x4C000000 0x0 0x0>;
 | 
				
			||||||
 | 
					#ifdef __CNSS2__
 | 
				
			||||||
 | 
						qcom,caldb-addr = <0x0 0x4D000000 0 0 0>;
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						qcom,caldb-addr = <0x4D000000>;
 | 
				
			||||||
 | 
						m3-dump-addr = <0x4CE00000>;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						qcom,caldb-size = <0x200000>;
 | 
				
			||||||
 | 
						qcom,userpd-subsys-name = "q6v5_wcss_userpd1";
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&wifi1 {
 | 
				
			||||||
 | 
						/* QCN6122 5G */
 | 
				
			||||||
 | 
						qcom,multipd_arch;
 | 
				
			||||||
 | 
					#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
						qcom,tgt-mem-mode = <2>;
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						qcom,tgt-mem-mode = <1>;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						qcom,board_id = <0x60>;
 | 
				
			||||||
 | 
						qcom,bdf-addr = <0x0 0x4D200000 0x4CF00000 0x0 0x0>;
 | 
				
			||||||
 | 
					#ifdef __CNSS2__
 | 
				
			||||||
 | 
						qcom,caldb-addr = <0x0 0x4E400000 0 0 0>;
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						qcom,caldb-addr = <0x4E400000>;
 | 
				
			||||||
 | 
						m3-dump-addr = <0x4E200000>;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						qcom,caldb-size = <0x500000>;
 | 
				
			||||||
 | 
						qcom,userpd-subsys-name = "q6v5_wcss_userpd2";
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
@@ -598,21 +598,13 @@
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
&tlmm {
 | 
					&tlmm {
 | 
				
			||||||
	pinctrl-0 = <&blsp0_uart_pins &phy_led_pins>;
 | 
						pinctrl-0 = <&phy_led_pins>;
 | 
				
			||||||
	pinctrl-names = "default";
 | 
						pinctrl-names = "default";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	blsp0_uart_pins: uart_pins {
 | 
					 | 
				
			||||||
		blsp0_uart_rx_tx {
 | 
					 | 
				
			||||||
			pins = "gpio31", "gpio32", "gpio33", "gpio34";
 | 
					 | 
				
			||||||
			function = "blsp0_uart1";
 | 
					 | 
				
			||||||
			bias-disable;
 | 
					 | 
				
			||||||
		};
 | 
					 | 
				
			||||||
	};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	blsp1_uart_pins: blsp1_uart_pins {
 | 
						blsp1_uart_pins: blsp1_uart_pins {
 | 
				
			||||||
		blsp1_uart_rx_tx {
 | 
							blsp1_uart_rx_tx {
 | 
				
			||||||
			pins = "gpio23", "gpio25", "gpio24", "gpio26";
 | 
								pins = "gpio31", "gpio33";
 | 
				
			||||||
			function = "blsp1_uart2";
 | 
								function = "blsp1_uart1";
 | 
				
			||||||
			bias-disable;
 | 
								bias-disable;
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
	};
 | 
						};
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										1063
									
								
								feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq5018-hfcl-ion4x_w.dts
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										1063
									
								
								feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq5018-hfcl-ion4x_w.dts
									
									
									
									
									
										Executable file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										1063
									
								
								feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq5018-hfcl-ion4xi_w.dts
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										1063
									
								
								feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq5018-hfcl-ion4xi_w.dts
									
									
									
									
									
										Executable file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										1441
									
								
								feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq5018-hfcl-ion4xi_w.dtsi
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										1441
									
								
								feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq5018-hfcl-ion4xi_w.dtsi
									
									
									
									
									
										Executable file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -0,0 +1,984 @@
 | 
				
			|||||||
 | 
					/dts-v1/;
 | 
				
			||||||
 | 
					/* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Permission to use, copy, modify, and/or distribute this software for any
 | 
				
			||||||
 | 
					 * purpose with or without fee is hereby granted, provided that the above
 | 
				
			||||||
 | 
					 * copyright notice and this permission notice appear in all copies.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 | 
				
			||||||
 | 
					 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 | 
				
			||||||
 | 
					 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 | 
				
			||||||
 | 
					 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 | 
				
			||||||
 | 
					 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 | 
				
			||||||
 | 
					 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 | 
				
			||||||
 | 
					 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "qcom-ipq5018.dtsi"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/ {
 | 
				
			||||||
 | 
						#address-cells = <0x2>;
 | 
				
			||||||
 | 
						#size-cells = <0x2>;
 | 
				
			||||||
 | 
						model = "Qualcomm Technologies, Inc. IPQ5018/AP-MP03.5-C1";
 | 
				
			||||||
 | 
						compatible = "qcom,ipq5018-mp03.5-c1", "qcom,ipq5018";
 | 
				
			||||||
 | 
						interrupt-parent = <&intc>;
 | 
				
			||||||
 | 
						#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
						AUTO_MOUNT;
 | 
				
			||||||
 | 
						#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						aliases {
 | 
				
			||||||
 | 
							sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
 | 
				
			||||||
 | 
							serial0 = &blsp1_uart1;
 | 
				
			||||||
 | 
							serial1 = &blsp1_uart2;
 | 
				
			||||||
 | 
							ethernet0 = "/soc/dp1";
 | 
				
			||||||
 | 
							ethernet1 = "/soc/dp2";
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						chosen {
 | 
				
			||||||
 | 
							bootargs = "console=ttyMSM0,115200,n8 rw init=/init";
 | 
				
			||||||
 | 
						#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
							bootargs-append = " swiotlb=1";
 | 
				
			||||||
 | 
						#else
 | 
				
			||||||
 | 
							bootargs-append = " swiotlb=1 coherent_pool=2M";
 | 
				
			||||||
 | 
						#endif
 | 
				
			||||||
 | 
							stdout-path = "serial0";
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						reserved-memory {
 | 
				
			||||||
 | 
						#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
						/*                   256 MB Profile
 | 
				
			||||||
 | 
						 * +==========+==============+=========================+
 | 
				
			||||||
 | 
						 * |          |              |                         |
 | 
				
			||||||
 | 
						 * |  Region  | Start Offset |          Size           |
 | 
				
			||||||
 | 
						 * |          |              |                         |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |    NSS   |  0x40000000  |           8MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |   Linux  |  0x40800000  | Depends on total memory |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |   uboot  |  0x4A600000  |           4MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |    SBL   |  0x4AA00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |   smem   |  0x4AB00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |    TZ    |  0x4AC00000  |           4MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |    Q6    |              |                         |
 | 
				
			||||||
 | 
						 * |   code/  |  0x4B000000  |          20MB           |
 | 
				
			||||||
 | 
						 * |   data   |              |                         |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  IPQ5018 |              |                         |
 | 
				
			||||||
 | 
						 * |   data   |  0x4C400000  |          13MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  IPQ5018 |              |                         |
 | 
				
			||||||
 | 
						 * |  M3 Dump |  0x4D100000  |           1MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  IPQ5018 |              |                         |
 | 
				
			||||||
 | 
						 * |   QDSS   |  0x4D200000  |           1MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | QCN6122_1|              |                         |
 | 
				
			||||||
 | 
						 * |   data   |  0x4D300000  |          15MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | QCN6122_1|              |                         |
 | 
				
			||||||
 | 
						 * |  M3 Dump |  0x4E200000  |           1MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | QCN6122_1|              |                         |
 | 
				
			||||||
 | 
						 * |   QDSS   |  0x4E300000  |           1MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | QCN6122_2|              |                         |
 | 
				
			||||||
 | 
						 * |   data   |  0x4E400000  |          15MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | QCN6122_2|              |                         |
 | 
				
			||||||
 | 
						 * |  M3 Dump |  0x4F300000  |           1MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | QCN6122_2|              |                         |
 | 
				
			||||||
 | 
						 * |   QDSS   |  0x4F400000  |           1MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |                                                   |
 | 
				
			||||||
 | 
						 * |            Rest of the memory for Linux           |
 | 
				
			||||||
 | 
						 * |                                                   |
 | 
				
			||||||
 | 
						 * +===================================================+
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
							q6_mem_regions: q6_mem_regions@4B000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4B000000 0x0 0x4500000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_code_data: q6_code_data@4B000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4B000000 0x0 0x1400000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_ipq5018_data: q6_ipq5018_data@4C400000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4C400000 0x0 0xD00000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							m3_dump: m3_dump@4D100000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4D100000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_etr_region: q6_etr_dump@4D200000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4D200000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_qcn6122_data1: q6_qcn6122_data1@4D300000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4D300000 0x0 0xF00000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E200000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4E200000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E300000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4E300000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_qcn6122_data2: q6_qcn6122_data2@4E400000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4E400000 0x0 0xF00000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							m3_dump_qcn6122_2: m3_dump_qcn6122_2@4F300000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4F300000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F400000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4F400000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						#else
 | 
				
			||||||
 | 
						/*                 512MB/1GB Profiles
 | 
				
			||||||
 | 
						 * +==========+==============+=========================+
 | 
				
			||||||
 | 
						 * |          |              |                         |
 | 
				
			||||||
 | 
						 * |  Region  | Start Offset |          Size           |
 | 
				
			||||||
 | 
						 * |          |              |                         |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |    NSS   |  0x40000000  |          16MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |   Linux  |  0x41000000  | Depends on total memory |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |   uboot  |  0x4A600000  |           4MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |    SBL   |  0x4AA00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |   smem   |  0x4AB00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |    TZ    |  0x4AC00000  |           4MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |    Q6    |              |                         |
 | 
				
			||||||
 | 
						 * |   code/  |  0x4B000000  |          20MB           |
 | 
				
			||||||
 | 
						 * |   data   |              |                         |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  IPQ5018 |              |                         |
 | 
				
			||||||
 | 
						 * |   data   |  0x4C400000  |          14MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  IPQ5018 |              |                         |
 | 
				
			||||||
 | 
						 * |  M3 Dump |  0x4D200000  |           1MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  IPQ5018 |              |                         |
 | 
				
			||||||
 | 
						 * |   QDSS   |  0x4D300000  |           1MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  IPQ5018 |              |                         |
 | 
				
			||||||
 | 
						 * |  Caldb   |  0x4D400000  |           2MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | QCN6122_1|              |                         |
 | 
				
			||||||
 | 
						 * |   data   |  0x4D600000  |          16MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | QCN6122_1|              |                         |
 | 
				
			||||||
 | 
						 * |  M3 Dump |  0x4E600000  |           1MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | QCN6122_1|              |                         |
 | 
				
			||||||
 | 
						 * |   QDSS   |  0x4E700000  |           1MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | QCN6122_1|              |                         |
 | 
				
			||||||
 | 
						 * |  Caldb   |  0x4E800000  |           5MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | QCN6122_2|              |                         |
 | 
				
			||||||
 | 
						 * |   data   |  0x4ED00000  |          16MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | QCN6122_2|              |                         |
 | 
				
			||||||
 | 
						 * |  M3 Dump |  0x4FD00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | QCN6122_2|              |                         |
 | 
				
			||||||
 | 
						 * |   QDSS   |  0x4FE00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | QCN6122_2|              |                         |
 | 
				
			||||||
 | 
						 * |  Caldb   |  0x4FF00000  |           5MB           |
 | 
				
			||||||
 | 
						 * +----------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |                                                   |
 | 
				
			||||||
 | 
						 * |            Rest of the memory for Linux           |
 | 
				
			||||||
 | 
						 * |                                                   |
 | 
				
			||||||
 | 
						 * +===================================================+
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
							q6_mem_regions: q6_mem_regions@4B000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4B000000 0x0 0x5400000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_code_data: q6_code_data@4B000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4B000000 0x0 01400000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_ipq5018_data: q6_ipq5018_data@4C400000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4C400000 0x0 0xE00000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							m3_dump: m3_dump@4D200000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4D200000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_etr_region: q6_etr_dump@4D300000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4D300000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_caldb_region: q6_caldb_region@4D400000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4D400000 0x0 0x200000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_qcn6122_data1: q6_qcn6122_data1@4D600000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4D600000 0x0 0x1000000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E600000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4E600000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E700000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4E700000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E800000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4E800000 0x0 0x500000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_qcn6122_data2: q6_qcn6122_data2@4E900000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4ED00000 0x0 0x1000000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							m3_dump_qcn6122_2: m3_dump_qcn6122_2@4FD00000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4FD00000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_qcn6122_etr_2: q6_qcn6122_etr_2@4FE00000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4FE00000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_qcn6122_caldb_2: q6_qcn6122_caldb_2@4FF00000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4FF00000 0x0 0x500000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						#endif
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						soc {
 | 
				
			||||||
 | 
							serial@78af000 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							blsp1_uart2: serial@78b0000 {
 | 
				
			||||||
 | 
								pinctrl-0 = <&blsp1_uart_pins>;
 | 
				
			||||||
 | 
								pinctrl-names = "default";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							qpic_bam: dma@7984000{
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							nand: qpic-nand@79b0000 {
 | 
				
			||||||
 | 
								pinctrl-0 = <&qspi_nand_pins>;
 | 
				
			||||||
 | 
								pinctrl-names = "default";
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							spi_0: spi@78b5000 { /* BLSP1 QUP0 */
 | 
				
			||||||
 | 
								pinctrl-0 = <&blsp0_spi_pins>;
 | 
				
			||||||
 | 
								pinctrl-names = "default";
 | 
				
			||||||
 | 
								cs-select = <0>;
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								m25p80@0 {
 | 
				
			||||||
 | 
									#address-cells = <1>;
 | 
				
			||||||
 | 
									#size-cells = <1>;
 | 
				
			||||||
 | 
									reg = <0>;
 | 
				
			||||||
 | 
									compatible = "n25q128a11";
 | 
				
			||||||
 | 
									linux,modalias = "m25p80", "n25q128a11";
 | 
				
			||||||
 | 
									spi-max-frequency = <50000000>;
 | 
				
			||||||
 | 
									use-default-sizes;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mdio0: mdio@88000 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								ethernet-phy@0 {
 | 
				
			||||||
 | 
									reg = <7>;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mdio1: mdio@90000 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
								pinctrl-0 = <&mdio1_pins>;
 | 
				
			||||||
 | 
								pinctrl-names = "default";
 | 
				
			||||||
 | 
								phy-reset-gpio = <&tlmm 39 0>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								ethernet-phy@0 {
 | 
				
			||||||
 | 
									reg = <0>;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
								ethernet-phy@1 {
 | 
				
			||||||
 | 
									reg = <1>;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
								ethernet-phy@2 {
 | 
				
			||||||
 | 
									reg = <2>;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
								ethernet-phy@3 {
 | 
				
			||||||
 | 
									reg = <3>;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							ess-instance {
 | 
				
			||||||
 | 
								num_devices = <0x2>;
 | 
				
			||||||
 | 
								ess-switch@0x39c00000 {
 | 
				
			||||||
 | 
									compatible = "qcom,ess-switch-ipq50xx";
 | 
				
			||||||
 | 
									device_id = <0>;
 | 
				
			||||||
 | 
									switch_mac_mode = <0xf>; /* mac mode for uniphy instance*/
 | 
				
			||||||
 | 
									cmnblk_clk = "internal_96MHz"; /* cmnblk clk*/
 | 
				
			||||||
 | 
									qcom,port_phyinfo {
 | 
				
			||||||
 | 
										port@0 {
 | 
				
			||||||
 | 
											port_id = <1>;
 | 
				
			||||||
 | 
											phy_address = <7>;
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
										port@1 {
 | 
				
			||||||
 | 
											port_id = <2>;
 | 
				
			||||||
 | 
											forced-speed = <1000>;
 | 
				
			||||||
 | 
											forced-duplex = <1>;
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
									};
 | 
				
			||||||
 | 
									led_source@0 {
 | 
				
			||||||
 | 
										source = <0>;
 | 
				
			||||||
 | 
										mode = "normal";
 | 
				
			||||||
 | 
										speed = "all";
 | 
				
			||||||
 | 
										blink_en = "enable";
 | 
				
			||||||
 | 
										active = "high";
 | 
				
			||||||
 | 
									};
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
								 
 | 
				
			||||||
 | 
								ess-switch1@1 {
 | 
				
			||||||
 | 
									compatible = "qcom,ess-switch-qca83xx";
 | 
				
			||||||
 | 
									device_id = <1>;
 | 
				
			||||||
 | 
									switch_access_mode = "mdio";
 | 
				
			||||||
 | 
									mdio-bus = <&mdio1>;
 | 
				
			||||||
 | 
									reset_gpio = <0x27>;
 | 
				
			||||||
 | 
									switch_cpu_bmp = <0x40>;  
 | 
				
			||||||
 | 
									switch_lan_bmp = <0x1e>; 
 | 
				
			||||||
 | 
									switch_wan_bmp = <0x0>;  
 | 
				
			||||||
 | 
									qca,ar8327-initvals = <
 | 
				
			||||||
 | 
											0x00004 0x7600000   
 | 
				
			||||||
 | 
											0x00008 0x1000000   
 | 
				
			||||||
 | 
											0x0000c 0x80        
 | 
				
			||||||
 | 
											0x00010 0x2613a0    
 | 
				
			||||||
 | 
											0x000e4 0xaa545     
 | 
				
			||||||
 | 
											0x000e0 0xc74164de  
 | 
				
			||||||
 | 
											0x0007c 0x4e        
 | 
				
			||||||
 | 
											0x00094 0x4e        
 | 
				
			||||||
 | 
									>;
 | 
				
			||||||
 | 
									qcom,port_phyinfo {
 | 
				
			||||||
 | 
										port@0 {
 | 
				
			||||||
 | 
											port_id = <1>;
 | 
				
			||||||
 | 
											phy_address = <0>;
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
										port@1 {
 | 
				
			||||||
 | 
											port_id = <2>;
 | 
				
			||||||
 | 
											phy_address = <1>;
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
										port@2 {
 | 
				
			||||||
 | 
											port_id = <3>;
 | 
				
			||||||
 | 
											phy_address = <2>;
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
										port@3 {
 | 
				
			||||||
 | 
											port_id = <4>;
 | 
				
			||||||
 | 
											phy_address = <3>;
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
									};
 | 
				
			||||||
 | 
								}; 
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							wifi0: wifi@c000000 {
 | 
				
			||||||
 | 
								qcom,bdf-addr = <0x4BA00000 0x4BA00000 0x4BA00000
 | 
				
			||||||
 | 
											0x0 0x0>;
 | 
				
			||||||
 | 
								qcom,caldb-addr = <0x4CA00000 0x4CA00000 0x4CA00000
 | 
				
			||||||
 | 
											0x0 0x0>;
 | 
				
			||||||
 | 
								qcom,caldb-size = <0x200000>;
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							ess-uniphy@98000 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							qcom,sps {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							qcom,usbbam@8B04000 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							qcom,diag@0 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							dp1 {
 | 
				
			||||||
 | 
								device_type = "network";
 | 
				
			||||||
 | 
								compatible = "qcom,nss-dp";
 | 
				
			||||||
 | 
								clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>;
 | 
				
			||||||
 | 
								clock-names = "nss-snoc-gmac-axi-clk";
 | 
				
			||||||
 | 
								qcom,id = <1>;
 | 
				
			||||||
 | 
								reg = <0x39C00000 0x10000>;
 | 
				
			||||||
 | 
								interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
 | 
				
			||||||
 | 
								qcom,mactype = <2>;
 | 
				
			||||||
 | 
								qcom,link-poll = <1>;
 | 
				
			||||||
 | 
								qcom,phy-mdio-addr = <7>;
 | 
				
			||||||
 | 
								mdio-bus = <&mdio0>;
 | 
				
			||||||
 | 
								local-mac-address = [000000000000];
 | 
				
			||||||
 | 
								phy-mode = "sgmii";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							dp2 {
 | 
				
			||||||
 | 
								device_type = "network";
 | 
				
			||||||
 | 
								compatible = "qcom,nss-dp";
 | 
				
			||||||
 | 
								clocks = <&gcc GCC_SNOC_GMAC1_AXI_CLK>;
 | 
				
			||||||
 | 
								clock-names = "nss-snoc-gmac-axi-clk";
 | 
				
			||||||
 | 
								qcom,id = <2>;
 | 
				
			||||||
 | 
								reg = <0x39D00000 0x10000>;
 | 
				
			||||||
 | 
								interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
 | 
				
			||||||
 | 
								qcom,mactype = <2>;
 | 
				
			||||||
 | 
								/* qcom,link-poll = <1>;
 | 
				
			||||||
 | 
								qcom,phy-mdio-addr = <0 1 2 3>;
 | 
				
			||||||
 | 
								mdio-bus = <&mdio1>; */
 | 
				
			||||||
 | 
								local-mac-address = [000000000000];
 | 
				
			||||||
 | 
								phy-mode = "sgmii";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							qcom,test@0 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							lpass: lpass@0xA000000{
 | 
				
			||||||
 | 
								status = "disabled";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							pcm: pcm@0xA3C0000{
 | 
				
			||||||
 | 
								pinctrl-0 = <&audio_pins>;
 | 
				
			||||||
 | 
								pinctrl-names = "default";
 | 
				
			||||||
 | 
								status = "disabled";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							pcm_lb: pcm_lb@0 {
 | 
				
			||||||
 | 
								status = "disabled";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						thermal-zones {
 | 
				
			||||||
 | 
							status = "ok";
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&tlmm {
 | 
				
			||||||
 | 
						pinctrl-0 = <&blsp0_uart_pins &phy_led_pins>;
 | 
				
			||||||
 | 
						pinctrl-names = "default";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						blsp0_uart_pins: blsp0_uart_pins {
 | 
				
			||||||
 | 
							blsp0_uart_rx_tx {
 | 
				
			||||||
 | 
								pins = "gpio20", "gpio21";
 | 
				
			||||||
 | 
								function = "blsp0_uart0";
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						blsp1_uart_pins: blsp1_uart_pins {
 | 
				
			||||||
 | 
							blsp1_uart_rx_tx {
 | 
				
			||||||
 | 
								pins = "gpio23", "gpio25", "gpio24", "gpio26";
 | 
				
			||||||
 | 
								function = "blsp1_uart2";
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						blsp0_spi_pins: blsp0_spi_pins {
 | 
				
			||||||
 | 
							mux {
 | 
				
			||||||
 | 
								pins = "gpio10", "gpio11", "gpio12", "gpio13";
 | 
				
			||||||
 | 
								function = "blsp0_spi";
 | 
				
			||||||
 | 
								drive-strength = <2>;
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						qspi_nand_pins: qspi_nand_pins {
 | 
				
			||||||
 | 
							qspi_clock {
 | 
				
			||||||
 | 
								pins = "gpio9";
 | 
				
			||||||
 | 
								function = "qspi_clk";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							qspi_cs {
 | 
				
			||||||
 | 
								pins = "gpio8";
 | 
				
			||||||
 | 
								function = "qspi_cs";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							qspi_data_0 {
 | 
				
			||||||
 | 
								pins = "gpio7";
 | 
				
			||||||
 | 
								function = "qspi0";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							qspi_data_1 {
 | 
				
			||||||
 | 
								pins = "gpio6";
 | 
				
			||||||
 | 
								function = "qspi1";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							qspi_data_2 {
 | 
				
			||||||
 | 
								pins = "gpio5";
 | 
				
			||||||
 | 
								function = "qspi2";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							qspi_data_3 {
 | 
				
			||||||
 | 
								pins = "gpio4";
 | 
				
			||||||
 | 
								function = "qspi3";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						mdio1_pins: mdio_pinmux {
 | 
				
			||||||
 | 
							mux_0 {
 | 
				
			||||||
 | 
								pins = "gpio36";
 | 
				
			||||||
 | 
								function = "mdc";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-up;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_1 {
 | 
				
			||||||
 | 
								pins = "gpio37";
 | 
				
			||||||
 | 
								function = "mdio";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-up;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						phy_led_pins: phy_led_pins {
 | 
				
			||||||
 | 
							gephy_led_pin {
 | 
				
			||||||
 | 
								pins = "gpio46";
 | 
				
			||||||
 | 
								function = "led0";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						i2c_pins: i2c_pins {
 | 
				
			||||||
 | 
							i2c_scl {
 | 
				
			||||||
 | 
								pins = "gpio25";
 | 
				
			||||||
 | 
								function = "blsp2_i2c1";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							i2c_sda {
 | 
				
			||||||
 | 
								pins = "gpio26";
 | 
				
			||||||
 | 
								function = "blsp2_i2c1";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						button_pins: button_pins {
 | 
				
			||||||
 | 
							reset_button {
 | 
				
			||||||
 | 
								pins = "gpio28";
 | 
				
			||||||
 | 
								function = "gpio";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-up;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						audio_pins: audio_pinmux {
 | 
				
			||||||
 | 
							mux_1 {
 | 
				
			||||||
 | 
								pins = "gpio24";
 | 
				
			||||||
 | 
								function = "audio_rxbclk";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_2 {
 | 
				
			||||||
 | 
								pins = "gpio25";
 | 
				
			||||||
 | 
								function = "audio_rxfsync";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_3 {
 | 
				
			||||||
 | 
								pins = "gpio26";
 | 
				
			||||||
 | 
								function = "audio_rxd";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_4 {
 | 
				
			||||||
 | 
								pins = "gpio27";
 | 
				
			||||||
 | 
								function = "audio_txmclk";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_5 {
 | 
				
			||||||
 | 
								pins = "gpio28";
 | 
				
			||||||
 | 
								function = "audio_txbclk";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_6 {
 | 
				
			||||||
 | 
								pins = "gpio29";
 | 
				
			||||||
 | 
								function = "audio_txfsync";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_7 {
 | 
				
			||||||
 | 
								pins = "gpio30";
 | 
				
			||||||
 | 
								function = "audio_txd";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
						leds_pins: leds_pinmux {
 | 
				
			||||||
 | 
							sys_blue {
 | 
				
			||||||
 | 
								pins = "gpio30";
 | 
				
			||||||
 | 
								function = "gpio";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-up;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							sys_red {
 | 
				
			||||||
 | 
								pins = "gpio36";
 | 
				
			||||||
 | 
								function = "gpio";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							sys_green {
 | 
				
			||||||
 | 
								pins = "gpio37";
 | 
				
			||||||
 | 
								function = "gpio";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&soc {
 | 
				
			||||||
 | 
						gpio_keys {
 | 
				
			||||||
 | 
							compatible = "gpio-keys";
 | 
				
			||||||
 | 
							pinctrl-0 = <&button_pins>;
 | 
				
			||||||
 | 
							pinctrl-names = "default";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							button@1 {
 | 
				
			||||||
 | 
								label = "reset";
 | 
				
			||||||
 | 
								linux,code = <KEY_RESTART>;
 | 
				
			||||||
 | 
								gpios = <&tlmm 28 GPIO_ACTIVE_LOW>;
 | 
				
			||||||
 | 
								linux,input-type = <1>;
 | 
				
			||||||
 | 
								debounce-interval = <60>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
						gpio_leds {
 | 
				
			||||||
 | 
							compatible = "gpio-leds";
 | 
				
			||||||
 | 
							pinctrl-0 = <&leds_pins>;
 | 
				
			||||||
 | 
							pinctrl-names = "default";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							led@30 {
 | 
				
			||||||
 | 
								label = "sys:blue";
 | 
				
			||||||
 | 
								gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;  /* GPIO_30 */
 | 
				
			||||||
 | 
								default-state="on";
 | 
				
			||||||
 | 
							/*	linux,default-trigger = "timer";
 | 
				
			||||||
 | 
								active-delay = <700>;
 | 
				
			||||||
 | 
								inactive-delay = <700>;
 | 
				
			||||||
 | 
								default-state="on";		*/
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							led@36 {
 | 
				
			||||||
 | 
								label = "sys:red";
 | 
				
			||||||
 | 
								gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;  /* GPIO_36 */
 | 
				
			||||||
 | 
								default-state="off";
 | 
				
			||||||
 | 
							/*	linux,default-trigger = "timer";
 | 
				
			||||||
 | 
								active-delay = <700>;
 | 
				
			||||||
 | 
								inactive-delay = <700>;
 | 
				
			||||||
 | 
								default-state="on";		*/
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							led@37 {
 | 
				
			||||||
 | 
								label = "sys:green";
 | 
				
			||||||
 | 
								gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>;  /* GPIO_37 */
 | 
				
			||||||
 | 
								default-state="off";
 | 
				
			||||||
 | 
							/*	linux,default-trigger = "timer";
 | 
				
			||||||
 | 
								active-delay = <700>;
 | 
				
			||||||
 | 
								inactive-delay = <700>;
 | 
				
			||||||
 | 
								default-state="on";		*/
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&usb3 {
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
						device-power-gpio = <&tlmm 24 1>;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&eud {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x1 {
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
						perst-gpio = <&tlmm 18 1>;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x2 {
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
						perst-gpio = <&tlmm 15 1>;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&bt {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&dwc_0 {
 | 
				
			||||||
 | 
						/delete-property/ #phy-cells;
 | 
				
			||||||
 | 
						/delete-property/ phys;
 | 
				
			||||||
 | 
						/delete-property/ phy-names;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&hs_m31phy_0 {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x1phy {
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x2phy {
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x1_rp {
 | 
				
			||||||
 | 
					        status = "disabled";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						mhi_0: qcom,mhi@0 {
 | 
				
			||||||
 | 
							reg = <0 0 0 0 0 >;
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x2_rp {
 | 
				
			||||||
 | 
					        status = "disabled";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						mhi_1: qcom,mhi@1 {
 | 
				
			||||||
 | 
							reg = <0 0 0 0 0 >;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&qfprom {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&tsens {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&qcom_q6v5_wcss {
 | 
				
			||||||
 | 
						qcom,multipd_arch;
 | 
				
			||||||
 | 
						memory-region = <&q6_mem_regions>;
 | 
				
			||||||
 | 
						qcom,share_bootargs;
 | 
				
			||||||
 | 
						qcom,bootargs_smem = <507>;
 | 
				
			||||||
 | 
						boot-args = <0x1 0x4 0x3 0x0F 0x0 0x0>,
 | 
				
			||||||
 | 
								<0x2 0x4 0x2 0x12 0x0 0x0>;
 | 
				
			||||||
 | 
						/* IPQ5018 */
 | 
				
			||||||
 | 
						q6v5_wcss_userpd1 {
 | 
				
			||||||
 | 
							m3_firmware = "IPQ5018/m3_fw.mdt";
 | 
				
			||||||
 | 
							interrupts-extended = <&wcss_smp2p_in 8 0>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_in 9 0>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_in 12 0>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_in 11 0>;
 | 
				
			||||||
 | 
							interrupt-names ="fatal",
 | 
				
			||||||
 | 
								"ready",
 | 
				
			||||||
 | 
								"spawn_ack",
 | 
				
			||||||
 | 
								"stop-ack";
 | 
				
			||||||
 | 
							qcom,smem-states = <&wcss_smp2p_out 8>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_out 9>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_out 10>;
 | 
				
			||||||
 | 
							qcom,smem-state-names = "shutdown",
 | 
				
			||||||
 | 
								"stop",
 | 
				
			||||||
 | 
								"spawn";
 | 
				
			||||||
 | 
							qca,asid = <1>;
 | 
				
			||||||
 | 
							qca,auto-restart;
 | 
				
			||||||
 | 
							qca,int_radio;
 | 
				
			||||||
 | 
							#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
							memory-region = <&q6_ipq5018_data>, <&m3_dump>,
 | 
				
			||||||
 | 
									<&q6_etr_region>;
 | 
				
			||||||
 | 
							#else
 | 
				
			||||||
 | 
							memory-region = <&q6_ipq5018_data>, <&m3_dump>,
 | 
				
			||||||
 | 
									<&q6_etr_region>, <&q6_caldb_region>;
 | 
				
			||||||
 | 
							#endif
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* QCN6122 6G */
 | 
				
			||||||
 | 
						q6v5_wcss_userpd2 {
 | 
				
			||||||
 | 
							m3_firmware = "qcn6122/m3_fw.mdt";
 | 
				
			||||||
 | 
							interrupts-extended = <&wcss_smp2p_in 16 0>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_in 17 0>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_in 20 0>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_in 19 0>;
 | 
				
			||||||
 | 
							interrupt-names ="fatal",
 | 
				
			||||||
 | 
								"ready",
 | 
				
			||||||
 | 
								"spawn_ack",
 | 
				
			||||||
 | 
								"stop-ack";
 | 
				
			||||||
 | 
							qcom,smem-states = <&wcss_smp2p_out 16>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_out 17>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_out 18>;
 | 
				
			||||||
 | 
							qcom,smem-state-names = "shutdown",
 | 
				
			||||||
 | 
								"stop",
 | 
				
			||||||
 | 
								"spawn";
 | 
				
			||||||
 | 
							qca,asid = <2>;
 | 
				
			||||||
 | 
							qca,auto-restart;
 | 
				
			||||||
 | 
							#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
							memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
 | 
				
			||||||
 | 
									<&q6_qcn6122_etr_1>;
 | 
				
			||||||
 | 
							#else
 | 
				
			||||||
 | 
							memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
 | 
				
			||||||
 | 
									<&q6_qcn6122_etr_1>, <&q6_qcn6122_caldb_1>;
 | 
				
			||||||
 | 
							#endif
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* QCN6122 5G */
 | 
				
			||||||
 | 
						q6v5_wcss_userpd3 {
 | 
				
			||||||
 | 
							m3_firmware = "qcn6122/m3_fw.mdt";
 | 
				
			||||||
 | 
							interrupts-extended = <&wcss_smp2p_in 24 0>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_in 25 0>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_in 28 0>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_in 27 0>;
 | 
				
			||||||
 | 
							interrupt-names ="fatal",
 | 
				
			||||||
 | 
								"ready",
 | 
				
			||||||
 | 
								"spawn_ack",
 | 
				
			||||||
 | 
								"stop-ack";
 | 
				
			||||||
 | 
							qcom,smem-states = <&wcss_smp2p_out 24>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_out 25>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_out 26>;
 | 
				
			||||||
 | 
							qcom,smem-state-names = "shutdown",
 | 
				
			||||||
 | 
								"stop",
 | 
				
			||||||
 | 
								"spawn";
 | 
				
			||||||
 | 
							qca,asid = <3>;
 | 
				
			||||||
 | 
							qca,auto-restart;
 | 
				
			||||||
 | 
							#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
							memory-region = <&q6_qcn6122_data2>, <&m3_dump_qcn6122_2>,
 | 
				
			||||||
 | 
									<&q6_qcn6122_etr_2>;
 | 
				
			||||||
 | 
							#else
 | 
				
			||||||
 | 
							memory-region = <&q6_qcn6122_data2>, <&m3_dump_qcn6122_2>,
 | 
				
			||||||
 | 
									<&q6_qcn6122_etr_2>, <&q6_qcn6122_caldb_2>;
 | 
				
			||||||
 | 
							#endif
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&i2c_0 {
 | 
				
			||||||
 | 
						pinctrl-0 = <&i2c_pins>;
 | 
				
			||||||
 | 
						pinctrl-names = "default";
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&qgic_msi_0 {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&qgic_msi_1 {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&wifi0 {
 | 
				
			||||||
 | 
						/* IPQ5018 */
 | 
				
			||||||
 | 
						qcom,multipd_arch;
 | 
				
			||||||
 | 
						qcom,userpd-subsys-name = "q6v5_wcss_userpd1";
 | 
				
			||||||
 | 
					#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
						qcom,tgt-mem-mode = <2>;
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						qcom,tgt-mem-mode = <1>;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						qcom,board_id = <0x24>;
 | 
				
			||||||
 | 
						qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
 | 
				
			||||||
 | 
					#ifdef __CNSS2__
 | 
				
			||||||
 | 
						qcom,caldb-addr = <0x4D400000 0x4D400000 0 0 0>;
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						qcom,caldb-addr = <0x4D400000>;
 | 
				
			||||||
 | 
						m3-dump-addr = <0x4D200000>;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						qcom,caldb-size = <0x200000>;
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&wifi1 {
 | 
				
			||||||
 | 
						/* QCN6122 6G */
 | 
				
			||||||
 | 
						qcom,multipd_arch;
 | 
				
			||||||
 | 
						qcom,userpd-subsys-name = "q6v5_wcss_userpd3";
 | 
				
			||||||
 | 
					#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
						qcom,tgt-mem-mode = <2>;
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						qcom,tgt-mem-mode = <1>;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						qcom,board_id = <0x60>;
 | 
				
			||||||
 | 
						qcom,bdf-addr = <0x4ED00000 0x4ED00000 0x4E400000 0x0 0x0>;
 | 
				
			||||||
 | 
					#ifdef __CNSS2__
 | 
				
			||||||
 | 
						qcom,caldb-addr = <0x4FF00000 0x4FF00000 0 0 0>;
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						qcom,caldb-addr = <0x4FF00000>;
 | 
				
			||||||
 | 
						m3-dump-addr = <0x4FD00000>;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						qcom,caldb-size = <0x500000>;
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&wifi2 {
 | 
				
			||||||
 | 
						/* QCN6122 6G */
 | 
				
			||||||
 | 
						qcom,multipd_arch;
 | 
				
			||||||
 | 
						qcom,userpd-subsys-name = "q6v5_wcss_userpd3";
 | 
				
			||||||
 | 
					#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
						qcom,tgt-mem-mode = <2>;
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						qcom,tgt-mem-mode = <1>;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						qcom,board_id = <0xb0>;
 | 
				
			||||||
 | 
						qcom,bdf-addr = <0x4ED00000 0x4ED00000 0x4E400000 0x0 0x0>;
 | 
				
			||||||
 | 
					#ifdef __CNSS2__
 | 
				
			||||||
 | 
						qcom,caldb-addr = <0x4FF00000 0x4FF00000 0 0 0>;
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						qcom,caldb-addr = <0x4FF00000>;
 | 
				
			||||||
 | 
						m3-dump-addr = <0x4FD00000>;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						qcom,caldb-size = <0x500000>;
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
@@ -0,0 +1,995 @@
 | 
				
			|||||||
 | 
					/dts-v1/;
 | 
				
			||||||
 | 
					/* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Permission to use, copy, modify, and/or distribute this software for any
 | 
				
			||||||
 | 
					 * purpose with or without fee is hereby granted, provided that the above
 | 
				
			||||||
 | 
					 * copyright notice and this permission notice appear in all copies.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 | 
				
			||||||
 | 
					 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 | 
				
			||||||
 | 
					 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 | 
				
			||||||
 | 
					 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 | 
				
			||||||
 | 
					 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 | 
				
			||||||
 | 
					 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 | 
				
			||||||
 | 
					 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "qcom-ipq5018.dtsi"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/ {
 | 
				
			||||||
 | 
						#address-cells = <0x2>;
 | 
				
			||||||
 | 
						#size-cells = <0x2>;
 | 
				
			||||||
 | 
						model = "Xunison D50-5G";
 | 
				
			||||||
 | 
						compatible = "xunison,d50-5g", "qcom,ipq5018-mp03.1", "qcom,ipq5018";
 | 
				
			||||||
 | 
						interrupt-parent = <&intc>;
 | 
				
			||||||
 | 
						#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
						AUTO_MOUNT;
 | 
				
			||||||
 | 
						#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						aliases {
 | 
				
			||||||
 | 
							sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
 | 
				
			||||||
 | 
							serial0 = &blsp1_uart1;
 | 
				
			||||||
 | 
							serial1 = &blsp1_uart2;
 | 
				
			||||||
 | 
							ethernet0 = "/soc/dp2";
 | 
				
			||||||
 | 
							ethernet1 = "/soc/dp1";
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						chosen {
 | 
				
			||||||
 | 
							bootargs = "console=ttyMSM0,115200,n8 rw init=/init";
 | 
				
			||||||
 | 
						#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
							bootargs-append = " swiotlb=1";
 | 
				
			||||||
 | 
						#else
 | 
				
			||||||
 | 
							bootargs-append = " swiotlb=1 coherent_pool=2M";
 | 
				
			||||||
 | 
						#endif
 | 
				
			||||||
 | 
							stdout-path = "serial0";
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						reserved-memory {
 | 
				
			||||||
 | 
						#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
						/*            256 MB Profile
 | 
				
			||||||
 | 
						 * +=========+==============+========================+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | Region | Start Offset |          Size           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |  NSS   |  0x40000000  |          8MB            |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | Linux  |  0x40800000  | Depends on total memory |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | uboot  |  0x4A600000  |           4MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  SBL   |  0x4AA00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  smem  |  0x4AB00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |   TZ   |  0x4AC00000  |           4MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |   Q6   |  0x4B000000  |          23MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | M3 Dump| 0x4C700000   |          1MB            |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | QDSS   | 0x4C800000   |          1MB            |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |QCN9000 |  0x4C900000  |          17MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |  MHI1  |  0x4DA00000  |          16MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |                                                 |
 | 
				
			||||||
 | 
						 * |      Rest of the memory for Linux               |
 | 
				
			||||||
 | 
						 * |                                                 |
 | 
				
			||||||
 | 
						 * +=================================================+
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
							q6_region: wcnss@4b000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4b000000 0x0 0x01700000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							m3_dump@4c700000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4C700000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_etr_region:q6_etr_dump@4c800000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4c800000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							qcn9000_pcie0@4c900000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4C900000 0x0 0x01100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mhi_region1: dma_pool1@4da00000 {
 | 
				
			||||||
 | 
								compatible = "shared-dma-pool";
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4da00000 0x0 0x01000000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						#elif __IPQ_MEM_PROFILE_512_MB__
 | 
				
			||||||
 | 
						/*                      512 MB Profile
 | 
				
			||||||
 | 
						 * +=========+==============+========================+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | Region | Start Offset |          Size           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |  NSS   |  0x40000000  |          16MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | Linux  |  0x41000000  | Depends on total memory |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | uboot  |  0x4A600000  |           4MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  SBL   |  0x4AA00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  smem  |  0x4AB00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |   TZ   |  0x4AC00000  |           4MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |   Q6   |  0x4B000000  |          24MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | M3 Dump|  0x4C800000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  QDSS  |  0x4C900000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | caldb  |  0x4CA00000  |           2MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |QCN9000 |  0x4CC00000  |          30MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |  MHI1  |  0x4EA00000  |          16MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |                                                 |
 | 
				
			||||||
 | 
						 * |      Rest of the memory for Linux               |
 | 
				
			||||||
 | 
						 * |                                                 |
 | 
				
			||||||
 | 
						 * +=================================================+
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
							q6_region: wcnss@4b000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4b000000 0x0 0x01800000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							m3_dump@4c800000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4c800000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_etr_region:q6_etr_dump@4c900000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4c900000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_caldb_region:q6_caldb_region@4ca00000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4ca00000 0x0 0x200000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							qcn9000_pcie0@4cc00000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4CC00000 0x0 0x01E00000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mhi_region1: dma_pool1@4ea00000 {
 | 
				
			||||||
 | 
								compatible = "shared-dma-pool";
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4ea00000 0x0 0x01000000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						#else
 | 
				
			||||||
 | 
						/*                      1G Profile
 | 
				
			||||||
 | 
						 * +=========+==============+========================+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | Region | Start Offset |          Size           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |  NSS   |  0x40000000  |          16MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | Linux  |  0x41000000  | Depends on total memory |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | uboot  |  0x4A600000  |           4MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  SBL   |  0x4AA00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  smem  |  0x4AB00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |   TZ   |  0x4AC00000  |           4MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |   Q6   |  0x4B000000  |          24MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | M3 Dump|  0x4C800000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  QDSS  |  0x4C900000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | caldb  |  0x4CA00000  |           2MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |QCN9000 |  0x4CC00000  |          45MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |  MHI1  |  0x4F900000  |          24MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |                                                 |
 | 
				
			||||||
 | 
						 * |      Rest of the memory for Linux               |
 | 
				
			||||||
 | 
						 * |                                                 |
 | 
				
			||||||
 | 
						 * +=================================================+
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
							q6_region: wcnss@4b000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4b000000 0x0 0x01800000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							m3_dump@4c800000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4c800000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_etr_region:q6_etr_dump@4c900000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4c900000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_caldb_region:q6_caldb_region@4ca00000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4ca00000 0x0 0x200000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							qcn9000_pcie0@4cc00000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4CC00000 0x0 0x02D00000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mhi_region1: dma_pool1@4F900000 {
 | 
				
			||||||
 | 
								compatible = "shared-dma-pool";
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4F900000 0x0 0x01800000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						#endif
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						soc {
 | 
				
			||||||
 | 
							serial@78af000 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							blsp1_uart2: serial@78b0000 {
 | 
				
			||||||
 | 
								pinctrl-0 = <&blsp1_uart_pins>;
 | 
				
			||||||
 | 
								pinctrl-names = "default";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							qpic_bam: dma@7984000{
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							nand: qpic-nand@79b0000 {
 | 
				
			||||||
 | 
								pinctrl-0 = <&qspi_nand_pins>;
 | 
				
			||||||
 | 
								pinctrl-names = "default";
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							spi_0: spi@78b5000 { /* BLSP1 QUP0 */
 | 
				
			||||||
 | 
								pinctrl-0 = <&blsp0_spi_pins>;
 | 
				
			||||||
 | 
								pinctrl-names = "default";
 | 
				
			||||||
 | 
								cs-select = <0>;
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								m25p80@0 {
 | 
				
			||||||
 | 
									#address-cells = <1>;
 | 
				
			||||||
 | 
									#size-cells = <1>;
 | 
				
			||||||
 | 
									reg = <0>;
 | 
				
			||||||
 | 
									compatible = "n25q128a11";
 | 
				
			||||||
 | 
									linux,modalias = "m25p80", "n25q128a11";
 | 
				
			||||||
 | 
									spi-max-frequency = <50000000>;
 | 
				
			||||||
 | 
									use-default-sizes;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mdio0: mdio@88000 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								ethernet-phy@0 {
 | 
				
			||||||
 | 
									reg = <7>;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mdio1: mdio@90000 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
								pinctrl-0 = <&mdio1_pins>;
 | 
				
			||||||
 | 
								pinctrl-names = "default";
 | 
				
			||||||
 | 
								phy-reset-gpio = <&tlmm 39 0>;
 | 
				
			||||||
 | 
								ethernet-phy@0 {
 | 
				
			||||||
 | 
									reg = <0>;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								ethernet-phy@1 {
 | 
				
			||||||
 | 
									reg = <1>;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								ethernet-phy@2 {
 | 
				
			||||||
 | 
									reg = <2>;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								ethernet-phy@3 {
 | 
				
			||||||
 | 
									reg = <3>;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							ess-instance {
 | 
				
			||||||
 | 
								num_devices = <0x2>;
 | 
				
			||||||
 | 
								ess-switch@0x39c00000 {
 | 
				
			||||||
 | 
									compatible = "qcom,ess-switch-ipq50xx";
 | 
				
			||||||
 | 
									device_id = <0>;
 | 
				
			||||||
 | 
									switch_mac_mode = <0xf>; /* mac mode for uniphy instance*/
 | 
				
			||||||
 | 
									cmnblk_clk = "internal_96MHz"; /* cmnblk clk*/
 | 
				
			||||||
 | 
									qcom,port_phyinfo {
 | 
				
			||||||
 | 
										port@0 {
 | 
				
			||||||
 | 
											port_id = <1>;
 | 
				
			||||||
 | 
											phy_address = <7>;
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
										port@1 {
 | 
				
			||||||
 | 
											port_id = <2>;
 | 
				
			||||||
 | 
											forced-speed = <1000>;
 | 
				
			||||||
 | 
											forced-duplex = <1>;
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
									};
 | 
				
			||||||
 | 
									led_source@0 {
 | 
				
			||||||
 | 
										source = <0>;
 | 
				
			||||||
 | 
										mode = "normal";
 | 
				
			||||||
 | 
										speed = "all";
 | 
				
			||||||
 | 
										blink_en = "enable";
 | 
				
			||||||
 | 
										active = "high";
 | 
				
			||||||
 | 
									};
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
								ess-switch1@1 {
 | 
				
			||||||
 | 
									compatible = "qcom,ess-switch-qca83xx";
 | 
				
			||||||
 | 
									device_id = <1>;
 | 
				
			||||||
 | 
									switch_access_mode = "mdio";
 | 
				
			||||||
 | 
									mdio-bus = <&mdio1>;
 | 
				
			||||||
 | 
									reset_gpio = <0x27>;
 | 
				
			||||||
 | 
									switch_cpu_bmp = <0x40>;  /* cpu port bitmap */
 | 
				
			||||||
 | 
									switch_lan_bmp = <0x1e>; /* lan port bitmap */
 | 
				
			||||||
 | 
									switch_wan_bmp = <0x0>;  /* wan port bitmap */
 | 
				
			||||||
 | 
									qca,ar8327-initvals = <
 | 
				
			||||||
 | 
											0x00004 0x7600000   /* PAD0_MODE */
 | 
				
			||||||
 | 
											0x00008 0x1000000   /* PAD5_MODE */
 | 
				
			||||||
 | 
											0x0000c 0x80        /* PAD6_MODE */
 | 
				
			||||||
 | 
											0x00010 0x2613a0    /* PORT6 FORCE MODE*/
 | 
				
			||||||
 | 
											0x000e4 0xaa545     /* MAC_POWER_SEL */
 | 
				
			||||||
 | 
											0x000e0 0xc74164de  /* SGMII_CTRL */
 | 
				
			||||||
 | 
											0x0007c 0x4e        /* PORT0_STATUS */
 | 
				
			||||||
 | 
											0x00094 0x4e        /* PORT6_STATUS */
 | 
				
			||||||
 | 
									>;
 | 
				
			||||||
 | 
									qcom,port_phyinfo {
 | 
				
			||||||
 | 
										port@0 {
 | 
				
			||||||
 | 
											port_id = <1>;
 | 
				
			||||||
 | 
											phy_address = <0>;
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
										port@1 {
 | 
				
			||||||
 | 
											port_id = <2>;
 | 
				
			||||||
 | 
											phy_address = <1>;
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
										port@2 {
 | 
				
			||||||
 | 
											port_id = <3>;
 | 
				
			||||||
 | 
											phy_address = <2>;
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
										port@3 {
 | 
				
			||||||
 | 
											port_id = <4>;
 | 
				
			||||||
 | 
											phy_address = <3>;
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
									};
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							wifi0: wifi@c000000 {
 | 
				
			||||||
 | 
								qcom,bdf-addr = <0x4BA00000 0x4BA00000 0x4BA00000
 | 
				
			||||||
 | 
											0x0 0x0>;
 | 
				
			||||||
 | 
								qcom,caldb-addr = <0x4CA00000 0x4CA00000 0x4CA00000
 | 
				
			||||||
 | 
											0x0 0x0>;
 | 
				
			||||||
 | 
								qcom,caldb-size = <0x200000>;
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							ess-uniphy@98000 {
 | 
				
			||||||
 | 
								status = "disabled";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							qcom,sps {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							qcom,usbbam@8B04000 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							qcom,diag@0 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							dp2 {
 | 
				
			||||||
 | 
								device_type = "network";
 | 
				
			||||||
 | 
								compatible = "qcom,nss-dp";
 | 
				
			||||||
 | 
								clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>;
 | 
				
			||||||
 | 
								clock-names = "nss-snoc-gmac-axi-clk";
 | 
				
			||||||
 | 
								qcom,id = <1>;
 | 
				
			||||||
 | 
								reg = <0x39C00000 0x10000>;
 | 
				
			||||||
 | 
								interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
 | 
				
			||||||
 | 
								qcom,mactype = <2>;
 | 
				
			||||||
 | 
								qcom,link-poll = <1>;
 | 
				
			||||||
 | 
								qcom,phy-mdio-addr = <7>;
 | 
				
			||||||
 | 
								mdio-bus = <&mdio0>;
 | 
				
			||||||
 | 
								local-mac-address = [000000000000];
 | 
				
			||||||
 | 
								phy-mode = "sgmii";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							dp1 {
 | 
				
			||||||
 | 
								device_type = "network";
 | 
				
			||||||
 | 
								compatible = "qcom,nss-dp";
 | 
				
			||||||
 | 
								clocks = <&gcc GCC_SNOC_GMAC1_AXI_CLK>;
 | 
				
			||||||
 | 
								clock-names = "nss-snoc-gmac-axi-clk";
 | 
				
			||||||
 | 
								qcom,id = <2>;
 | 
				
			||||||
 | 
								reg = <0x39D00000 0x10000>;
 | 
				
			||||||
 | 
								interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
 | 
				
			||||||
 | 
								qcom,mactype = <2>;
 | 
				
			||||||
 | 
								local-mac-address = [000000000000];
 | 
				
			||||||
 | 
								phy-mode = "sgmii";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							rpm_etm0 {
 | 
				
			||||||
 | 
								status = "disabled";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							lpass: lpass@0xA000000{
 | 
				
			||||||
 | 
								status = "disabled";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							pcm: pcm@0xA3C0000{
 | 
				
			||||||
 | 
								pinctrl-0 = <&audio_pins>;
 | 
				
			||||||
 | 
								pinctrl-names = "default";
 | 
				
			||||||
 | 
								status = "disabled";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							pcm_lb: pcm_lb@0 {
 | 
				
			||||||
 | 
								status = "disabled";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						thermal-zones {
 | 
				
			||||||
 | 
							status = "ok";
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						gpio_keys {
 | 
				
			||||||
 | 
							compatible = "gpio-keys-polled";
 | 
				
			||||||
 | 
							pinctrl-0 = <&button_pins>;
 | 
				
			||||||
 | 
							pinctrl-names = "default";
 | 
				
			||||||
 | 
							poll-interval = <100>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							button@0 {
 | 
				
			||||||
 | 
								label = "reset";
 | 
				
			||||||
 | 
								linux,code = <KEY_RESTART>;
 | 
				
			||||||
 | 
								gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
 | 
				
			||||||
 | 
								linux,input-type = <1>;
 | 
				
			||||||
 | 
								debounce-interval = <60>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							button@1 {
 | 
				
			||||||
 | 
								label = "wps";
 | 
				
			||||||
 | 
								linux,code = <KEY_WPS_BUTTON>;
 | 
				
			||||||
 | 
								gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
 | 
				
			||||||
 | 
								linux,input-type = <1>;
 | 
				
			||||||
 | 
								debounce-interval = <60>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						leds {
 | 
				
			||||||
 | 
							compatible = "gpio-leds";
 | 
				
			||||||
 | 
							pinctrl-0 = <&leds_pins>;
 | 
				
			||||||
 | 
							pinctrl-names = "default";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							led@35 {
 | 
				
			||||||
 | 
								label = "green:4g";
 | 
				
			||||||
 | 
								gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>;
 | 
				
			||||||
 | 
								linux,default-trigger = "led_5g_wifi";
 | 
				
			||||||
 | 
								default-state = "off";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							led@30 {
 | 
				
			||||||
 | 
								label = "green:wifi";
 | 
				
			||||||
 | 
								gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
 | 
				
			||||||
 | 
								linux,default-trigger = "led_2g_wifi";
 | 
				
			||||||
 | 
								default-state = "off";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							led@1 {
 | 
				
			||||||
 | 
								label = "green:internet";
 | 
				
			||||||
 | 
								gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
 | 
				
			||||||
 | 
								linux,default-trigger = "led_voice";
 | 
				
			||||||
 | 
								default-state = "off";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							led@33 {
 | 
				
			||||||
 | 
								label = "green:lte";
 | 
				
			||||||
 | 
								gpios = <&tlmm 33 GPIO_ACTIVE_HIGH>;
 | 
				
			||||||
 | 
								linux,default-trigger = "led_lte_g";
 | 
				
			||||||
 | 
								default-state = "off";
 | 
				
			||||||
 | 
							};		
 | 
				
			||||||
 | 
							led@34 {
 | 
				
			||||||
 | 
								label = "red:lte";
 | 
				
			||||||
 | 
								gpios = <&tlmm 34 GPIO_ACTIVE_HIGH>;
 | 
				
			||||||
 | 
								linux,default-trigger = "led_lte_r";
 | 
				
			||||||
 | 
								default-state = "off";
 | 
				
			||||||
 | 
							};	
 | 
				
			||||||
 | 
							led@27 {
 | 
				
			||||||
 | 
								label = "green:mesh";
 | 
				
			||||||
 | 
								gpios = <&tlmm 27 GPIO_ACTIVE_HIGH>;
 | 
				
			||||||
 | 
								linux,default-trigger = "led_nr_g";
 | 
				
			||||||
 | 
								default-state = "off";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							led@28 {
 | 
				
			||||||
 | 
								label = "red:mesh";
 | 
				
			||||||
 | 
								gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
 | 
				
			||||||
 | 
								linux,default-trigger = "led_nr_r";
 | 
				
			||||||
 | 
								default-state = "off";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&tlmm {
 | 
				
			||||||
 | 
						pinctrl-0 = <&blsp0_uart_pins &phy_led_pins>;
 | 
				
			||||||
 | 
						pinctrl-names = "default";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						blsp0_uart_pins: blsp0_uart_pins {
 | 
				
			||||||
 | 
							blsp0_uart_rx_tx {
 | 
				
			||||||
 | 
								pins = "gpio20", "gpio21";
 | 
				
			||||||
 | 
								function = "blsp0_uart0";
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						blsp1_uart_pins: blsp1_uart_pins {
 | 
				
			||||||
 | 
							blsp1_uart_rx_tx {
 | 
				
			||||||
 | 
								pins = "gpio23", "gpio25", "gpio24", "gpio26";
 | 
				
			||||||
 | 
								function = "blsp1_uart2";
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						blsp0_spi_pins: blsp0_spi_pins {
 | 
				
			||||||
 | 
							mux {
 | 
				
			||||||
 | 
								pins = "gpio10", "gpio11", "gpio12", "gpio13";
 | 
				
			||||||
 | 
								function = "blsp0_spi";
 | 
				
			||||||
 | 
								drive-strength = <2>;
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						qspi_nand_pins: qspi_nand_pins {
 | 
				
			||||||
 | 
							qspi_clock {
 | 
				
			||||||
 | 
									pins = "gpio9";
 | 
				
			||||||
 | 
									function = "qspi_clk";
 | 
				
			||||||
 | 
									drive-strength = <8>;
 | 
				
			||||||
 | 
									bias-disable;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							qspi_cs {
 | 
				
			||||||
 | 
									pins = "gpio8";
 | 
				
			||||||
 | 
									function = "qspi_cs";
 | 
				
			||||||
 | 
									drive-strength = <8>;
 | 
				
			||||||
 | 
									bias-disable;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							qspi_data_0 {
 | 
				
			||||||
 | 
									pins = "gpio7";
 | 
				
			||||||
 | 
									function = "qspi0";
 | 
				
			||||||
 | 
									drive-strength = <8>;
 | 
				
			||||||
 | 
									bias-disable;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							qspi_data_1 {
 | 
				
			||||||
 | 
									pins = "gpio6";
 | 
				
			||||||
 | 
									function = "qspi1";
 | 
				
			||||||
 | 
									drive-strength = <8>;
 | 
				
			||||||
 | 
									bias-disable;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							qspi_data_2 {
 | 
				
			||||||
 | 
									pins = "gpio5";
 | 
				
			||||||
 | 
									function = "qspi2";
 | 
				
			||||||
 | 
									drive-strength = <8>;
 | 
				
			||||||
 | 
									bias-disable;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							qspi_data_3 {
 | 
				
			||||||
 | 
									pins = "gpio4";
 | 
				
			||||||
 | 
									function = "qspi3";
 | 
				
			||||||
 | 
									drive-strength = <8>;
 | 
				
			||||||
 | 
									bias-disable;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						mdio1_pins: mdio_pinmux {
 | 
				
			||||||
 | 
							mux_0 {
 | 
				
			||||||
 | 
								pins = "gpio36";
 | 
				
			||||||
 | 
								function = "mdc";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-up;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_1 {
 | 
				
			||||||
 | 
								pins = "gpio37";
 | 
				
			||||||
 | 
								function = "mdio";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-up;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						phy_led_pins: phy_led_pins {
 | 
				
			||||||
 | 
							gephy_led_pin {
 | 
				
			||||||
 | 
								pins = "gpio46";
 | 
				
			||||||
 | 
								function = "led0";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						i2c_pins: i2c_pins {
 | 
				
			||||||
 | 
							i2c_scl {
 | 
				
			||||||
 | 
								pins = "gpio25";
 | 
				
			||||||
 | 
								function = "blsp2_i2c1";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							i2c_sda {
 | 
				
			||||||
 | 
								pins = "gpio26";
 | 
				
			||||||
 | 
								function = "blsp2_i2c1";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						button_pins: button_pins {
 | 
				
			||||||
 | 
							reset_button{
 | 
				
			||||||
 | 
								pins = "gpio22";
 | 
				
			||||||
 | 
								function = "gpio";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-up;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							wps_button {
 | 
				
			||||||
 | 
								pins = "gpio38";
 | 
				
			||||||
 | 
								function = "gpio";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-up;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						leds_pins: leds_pins {
 | 
				
			||||||
 | 
							led_5g_wifi {
 | 
				
			||||||
 | 
								pins = "gpio35";
 | 
				
			||||||
 | 
								function = "gpio";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							led_2g_wifi {
 | 
				
			||||||
 | 
								pins = "gpio30";
 | 
				
			||||||
 | 
								function = "gpio";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							led_lte_g {
 | 
				
			||||||
 | 
								pins = "gpio33";
 | 
				
			||||||
 | 
								function = "gpio";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							led_lte_r {
 | 
				
			||||||
 | 
								pins = "gpio34";
 | 
				
			||||||
 | 
								function = "gpio";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							led_nr_g {
 | 
				
			||||||
 | 
								pins = "gpio27";
 | 
				
			||||||
 | 
								function = "gpio";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							led_nr_r {
 | 
				
			||||||
 | 
								pins = "gpio28";
 | 
				
			||||||
 | 
								function = "gpio";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
							led_voice {
 | 
				
			||||||
 | 
								pins = "gpio1";
 | 
				
			||||||
 | 
								function = "gpio";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};	
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						audio_pins: audio_pinmux {
 | 
				
			||||||
 | 
							mux_1 {
 | 
				
			||||||
 | 
								pins = "gpio24";
 | 
				
			||||||
 | 
								function = "audio_rxbclk";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_2 {
 | 
				
			||||||
 | 
								pins = "gpio25";
 | 
				
			||||||
 | 
								function = "audio_rxfsync";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_3 {
 | 
				
			||||||
 | 
								pins = "gpio26";
 | 
				
			||||||
 | 
								function = "audio_rxd";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_4 {
 | 
				
			||||||
 | 
								pins = "gpio27";
 | 
				
			||||||
 | 
								function = "audio_txmclk";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_5 {
 | 
				
			||||||
 | 
								pins = "gpio28";
 | 
				
			||||||
 | 
								function = "audio_txbclk";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_6 {
 | 
				
			||||||
 | 
								pins = "gpio29";
 | 
				
			||||||
 | 
								function = "audio_txfsync";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_7 {
 | 
				
			||||||
 | 
								pins = "gpio30";
 | 
				
			||||||
 | 
								function = "audio_txd";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&usb3 {
 | 
				
			||||||
 | 
						qcom,multiplexed-phy;
 | 
				
			||||||
 | 
						qcom,phy-mux-regs = <&tcsr_q6_block 0x2540>;
 | 
				
			||||||
 | 
						device-power-gpio = <&tlmm 24 1>;
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&eud {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x1 {
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
						perst-gpio = <&tlmm 18 1>;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x2 {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
						perst-gpio = <&tlmm 15 1>;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&bt {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&wcss {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&q6v5_wcss {
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&q6v5_m3 {
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&tcsr_mutex_block {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&tcsr_mutex {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&smem {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&apcs_glb {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&tcsr_q6_block {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&qcom_q6v5_wcss {
 | 
				
			||||||
 | 
						#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
							memory-region = <&q6_region>, <&q6_etr_region>;
 | 
				
			||||||
 | 
						#else
 | 
				
			||||||
 | 
							memory-region = <&q6_region>, <&q6_etr_region>,
 | 
				
			||||||
 | 
									<&q6_caldb_region>;
 | 
				
			||||||
 | 
						#endif
 | 
				
			||||||
 | 
						/* IPQ5018 */
 | 
				
			||||||
 | 
						q6v5_wcss_userpd1 {
 | 
				
			||||||
 | 
							m3_firmware = "IPQ5018/m3_fw.mdt";
 | 
				
			||||||
 | 
							interrupts-extended = <&wcss_smp2p_in 8 0>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_in 9 0>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_in 12 0>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_in 11 0>;
 | 
				
			||||||
 | 
							interrupt-names ="fatal",
 | 
				
			||||||
 | 
								"ready",
 | 
				
			||||||
 | 
								"spawn_ack",
 | 
				
			||||||
 | 
								"stop-ack";
 | 
				
			||||||
 | 
							qcom,smem-states = <&wcss_smp2p_out 8>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_out 9>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_out 10>;
 | 
				
			||||||
 | 
							qcom,smem-state-names = "shutdown",
 | 
				
			||||||
 | 
								"stop",
 | 
				
			||||||
 | 
								"spawn";
 | 
				
			||||||
 | 
							qca,asid = <1>;
 | 
				
			||||||
 | 
							qca,auto-restart;
 | 
				
			||||||
 | 
							qca,int_radio;
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&i2c_0 {
 | 
				
			||||||
 | 
						pinctrl-0 = <&i2c_pins>;
 | 
				
			||||||
 | 
						pinctrl-names = "default";
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&dbm_1p5 {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&msm_imem {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&blsp1_uart1 {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&ssuniphy_0 {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&hs_m31phy_0 {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x1phy {
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x2phy {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x1_rp {
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						mhi_0: qcom,mhi@0 {
 | 
				
			||||||
 | 
							reg = <0 0 0 0 0 >;
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x2_rp {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						mhi_1: qcom,mhi@1 {
 | 
				
			||||||
 | 
							reg = <0 0 0 0 0 >;
 | 
				
			||||||
 | 
							qrtr_instance_id = <0x20>;
 | 
				
			||||||
 | 
							#address-cells = <0x2>;
 | 
				
			||||||
 | 
							#size-cells = <0x2>;
 | 
				
			||||||
 | 
							memory-region = <&mhi_region1>;
 | 
				
			||||||
 | 
					#if !defined(__CNSS2__)
 | 
				
			||||||
 | 
							base-addr = <0x4CC00000>;
 | 
				
			||||||
 | 
							m3-dump-addr = <0x4E000000>;
 | 
				
			||||||
 | 
							etr-addr = <0x4E100000>;
 | 
				
			||||||
 | 
							qcom,caldb-addr = <0x4E200000>;
 | 
				
			||||||
 | 
							qcom,tgt-mem-mode = <0x1>;
 | 
				
			||||||
 | 
							mhi,max-channels = <30>;
 | 
				
			||||||
 | 
							mhi,timeout = <10000>;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&wifi0 {
 | 
				
			||||||
 | 
						/* IPQ5018 */
 | 
				
			||||||
 | 
						qcom,board_id = <0x24>;
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&wifi3 {
 | 
				
			||||||
 | 
						/* QCN9000 5G */
 | 
				
			||||||
 | 
						board_id = <0xa0>;
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&qfprom {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&tsens {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -0,0 +1,884 @@
 | 
				
			|||||||
 | 
					/dts-v1/;
 | 
				
			||||||
 | 
					/* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Permission to use, copy, modify, and/or distribute this software for any
 | 
				
			||||||
 | 
					 * purpose with or without fee is hereby granted, provided that the above
 | 
				
			||||||
 | 
					 * copyright notice and this permission notice appear in all copies.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 | 
				
			||||||
 | 
					 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 | 
				
			||||||
 | 
					 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 | 
				
			||||||
 | 
					 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 | 
				
			||||||
 | 
					 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 | 
				
			||||||
 | 
					 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 | 
				
			||||||
 | 
					 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "qcom-ipq5018.dtsi"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/ {
 | 
				
			||||||
 | 
						#address-cells = <0x2>;
 | 
				
			||||||
 | 
						#size-cells = <0x2>;
 | 
				
			||||||
 | 
						model = "Xunison D50";
 | 
				
			||||||
 | 
						compatible = "xunison,d50", "qcom,ipq5018-mp03.1", "qcom,ipq5018";
 | 
				
			||||||
 | 
						interrupt-parent = <&intc>;
 | 
				
			||||||
 | 
						#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
						AUTO_MOUNT;
 | 
				
			||||||
 | 
						#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						aliases {
 | 
				
			||||||
 | 
							sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
 | 
				
			||||||
 | 
							serial0 = &blsp1_uart1;
 | 
				
			||||||
 | 
							serial1 = &blsp1_uart2;
 | 
				
			||||||
 | 
							ethernet0 = "/soc/dp1";
 | 
				
			||||||
 | 
							ethernet1 = "/soc/dp2";
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						chosen {
 | 
				
			||||||
 | 
							bootargs = "console=ttyMSM0,115200,n8 rw init=/init";
 | 
				
			||||||
 | 
						#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
							bootargs-append = " swiotlb=1";
 | 
				
			||||||
 | 
						#else
 | 
				
			||||||
 | 
							bootargs-append = " swiotlb=1 coherent_pool=2M";
 | 
				
			||||||
 | 
						#endif
 | 
				
			||||||
 | 
							stdout-path = "serial0";
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						reserved-memory {
 | 
				
			||||||
 | 
						#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
						/*            256 MB Profile
 | 
				
			||||||
 | 
						 * +=========+==============+========================+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | Region | Start Offset |          Size           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |  NSS   |  0x40000000  |          8MB            |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | Linux  |  0x40800000  | Depends on total memory |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | uboot  |  0x4A600000  |           4MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  SBL   |  0x4AA00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  smem  |  0x4AB00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |   TZ   |  0x4AC00000  |           4MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |   Q6   |  0x4B000000  |          23MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | M3 Dump| 0x4C700000   |          1MB            |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | QDSS   | 0x4C800000   |          1MB            |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |QCN9000 |  0x4C900000  |          17MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |  MHI1  |  0x4DA00000  |          16MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |                                                 |
 | 
				
			||||||
 | 
						 * |      Rest of the memory for Linux               |
 | 
				
			||||||
 | 
						 * |                                                 |
 | 
				
			||||||
 | 
						 * +=================================================+
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
							q6_region: wcnss@4b000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4b000000 0x0 0x01700000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							m3_dump@4c700000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4C700000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_etr_region:q6_etr_dump@4c800000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4c800000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							qcn9000_pcie0@4c900000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4C900000 0x0 0x01100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mhi_region1: dma_pool1@4da00000 {
 | 
				
			||||||
 | 
								compatible = "shared-dma-pool";
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4da00000 0x0 0x01000000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						#elif __IPQ_MEM_PROFILE_512_MB__
 | 
				
			||||||
 | 
						/*                      512 MB Profile
 | 
				
			||||||
 | 
						 * +=========+==============+========================+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | Region | Start Offset |          Size           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |  NSS   |  0x40000000  |          16MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | Linux  |  0x41000000  | Depends on total memory |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | uboot  |  0x4A600000  |           4MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  SBL   |  0x4AA00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  smem  |  0x4AB00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |   TZ   |  0x4AC00000  |           4MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |   Q6   |  0x4B000000  |          24MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | M3 Dump|  0x4C800000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  QDSS  |  0x4C900000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | caldb  |  0x4CA00000  |           2MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |QCN9000 |  0x4CC00000  |          30MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |  MHI1  |  0x4EA00000  |          16MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |                                                 |
 | 
				
			||||||
 | 
						 * |      Rest of the memory for Linux               |
 | 
				
			||||||
 | 
						 * |                                                 |
 | 
				
			||||||
 | 
						 * +=================================================+
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
							q6_region: wcnss@4b000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4b000000 0x0 0x01800000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							m3_dump@4c800000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4c800000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_etr_region:q6_etr_dump@4c900000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4c900000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_caldb_region:q6_caldb_region@4ca00000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4ca00000 0x0 0x200000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							qcn9000_pcie0@4cc00000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4CC00000 0x0 0x01E00000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mhi_region1: dma_pool1@4ea00000 {
 | 
				
			||||||
 | 
								compatible = "shared-dma-pool";
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4ea00000 0x0 0x01000000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						#else
 | 
				
			||||||
 | 
						/*                      1G Profile
 | 
				
			||||||
 | 
						 * +=========+==============+========================+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | Region | Start Offset |          Size           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |  NSS   |  0x40000000  |          16MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | Linux  |  0x41000000  | Depends on total memory |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * | uboot  |  0x4A600000  |           4MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  SBL   |  0x4AA00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  smem  |  0x4AB00000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |   TZ   |  0x4AC00000  |           4MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |   Q6   |  0x4B000000  |          24MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | M3 Dump|  0x4C800000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |  QDSS  |  0x4C900000  |           1MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * | caldb  |  0x4CA00000  |           2MB           |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |QCN9000 |  0x4CC00000  |          45MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * |  MHI1  |  0x4F900000  |          24MB           |
 | 
				
			||||||
 | 
						 * |        |              |                         |
 | 
				
			||||||
 | 
						 * +--------+--------------+-------------------------+
 | 
				
			||||||
 | 
						 * |                                                 |
 | 
				
			||||||
 | 
						 * |      Rest of the memory for Linux               |
 | 
				
			||||||
 | 
						 * |                                                 |
 | 
				
			||||||
 | 
						 * +=================================================+
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
							q6_region: wcnss@4b000000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4b000000 0x0 0x01800000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							m3_dump@4c800000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4c800000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_etr_region:q6_etr_dump@4c900000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4c900000 0x0 0x100000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							q6_caldb_region:q6_caldb_region@4ca00000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4ca00000 0x0 0x200000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							qcn9000_pcie0@4cc00000 {
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4CC00000 0x0 0x02D00000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mhi_region1: dma_pool1@4F900000 {
 | 
				
			||||||
 | 
								compatible = "shared-dma-pool";
 | 
				
			||||||
 | 
								no-map;
 | 
				
			||||||
 | 
								reg = <0x0 0x4F900000 0x0 0x01800000>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						#endif
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						soc {
 | 
				
			||||||
 | 
							serial@78af000 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							blsp1_uart2: serial@78b0000 {
 | 
				
			||||||
 | 
								pinctrl-0 = <&blsp1_uart_pins>;
 | 
				
			||||||
 | 
								pinctrl-names = "default";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							qpic_bam: dma@7984000{
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							nand: qpic-nand@79b0000 {
 | 
				
			||||||
 | 
								pinctrl-0 = <&qspi_nand_pins>;
 | 
				
			||||||
 | 
								pinctrl-names = "default";
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							spi_0: spi@78b5000 { /* BLSP1 QUP0 */
 | 
				
			||||||
 | 
								pinctrl-0 = <&blsp0_spi_pins>;
 | 
				
			||||||
 | 
								pinctrl-names = "default";
 | 
				
			||||||
 | 
								cs-select = <0>;
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								m25p80@0 {
 | 
				
			||||||
 | 
									#address-cells = <1>;
 | 
				
			||||||
 | 
									#size-cells = <1>;
 | 
				
			||||||
 | 
									reg = <0>;
 | 
				
			||||||
 | 
									compatible = "n25q128a11";
 | 
				
			||||||
 | 
									linux,modalias = "m25p80", "n25q128a11";
 | 
				
			||||||
 | 
									spi-max-frequency = <50000000>;
 | 
				
			||||||
 | 
									use-default-sizes;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mdio0: mdio@88000 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								ethernet-phy@0 {
 | 
				
			||||||
 | 
									reg = <7>;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mdio1: mdio@90000 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
								pinctrl-0 = <&mdio1_pins>;
 | 
				
			||||||
 | 
								pinctrl-names = "default";
 | 
				
			||||||
 | 
								phy-reset-gpio = <&tlmm 39 0>;
 | 
				
			||||||
 | 
								ethernet-phy@0 {
 | 
				
			||||||
 | 
									reg = <0>;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								ethernet-phy@1 {
 | 
				
			||||||
 | 
									reg = <1>;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								ethernet-phy@2 {
 | 
				
			||||||
 | 
									reg = <2>;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								ethernet-phy@3 {
 | 
				
			||||||
 | 
									reg = <3>;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							ess-instance {
 | 
				
			||||||
 | 
								num_devices = <0x2>;
 | 
				
			||||||
 | 
								ess-switch@0x39c00000 {
 | 
				
			||||||
 | 
									compatible = "qcom,ess-switch-ipq50xx";
 | 
				
			||||||
 | 
									device_id = <0>;
 | 
				
			||||||
 | 
									switch_mac_mode = <0xf>; /* mac mode for uniphy instance*/
 | 
				
			||||||
 | 
									cmnblk_clk = "internal_96MHz"; /* cmnblk clk*/
 | 
				
			||||||
 | 
									qcom,port_phyinfo {
 | 
				
			||||||
 | 
										port@0 {
 | 
				
			||||||
 | 
											port_id = <1>;
 | 
				
			||||||
 | 
											phy_address = <7>;
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
										port@1 {
 | 
				
			||||||
 | 
											port_id = <2>;
 | 
				
			||||||
 | 
											forced-speed = <1000>;
 | 
				
			||||||
 | 
											forced-duplex = <1>;
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
									};
 | 
				
			||||||
 | 
									led_source@0 {
 | 
				
			||||||
 | 
										source = <0>;
 | 
				
			||||||
 | 
										mode = "normal";
 | 
				
			||||||
 | 
										speed = "all";
 | 
				
			||||||
 | 
										blink_en = "enable";
 | 
				
			||||||
 | 
										active = "high";
 | 
				
			||||||
 | 
									};
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
								ess-switch1@1 {
 | 
				
			||||||
 | 
									compatible = "qcom,ess-switch-qca83xx";
 | 
				
			||||||
 | 
									device_id = <1>;
 | 
				
			||||||
 | 
									switch_access_mode = "mdio";
 | 
				
			||||||
 | 
									mdio-bus = <&mdio1>;
 | 
				
			||||||
 | 
									reset_gpio = <0x27>;
 | 
				
			||||||
 | 
									switch_cpu_bmp = <0x40>;  /* cpu port bitmap */
 | 
				
			||||||
 | 
									switch_lan_bmp = <0x1e>; /* lan port bitmap */
 | 
				
			||||||
 | 
									switch_wan_bmp = <0x0>;  /* wan port bitmap */
 | 
				
			||||||
 | 
									qca,ar8327-initvals = <
 | 
				
			||||||
 | 
											0x00004 0x7600000   /* PAD0_MODE */
 | 
				
			||||||
 | 
											0x00008 0x1000000   /* PAD5_MODE */
 | 
				
			||||||
 | 
											0x0000c 0x80        /* PAD6_MODE */
 | 
				
			||||||
 | 
											0x00010 0x2613a0    /* PORT6 FORCE MODE*/
 | 
				
			||||||
 | 
											0x000e4 0xaa545     /* MAC_POWER_SEL */
 | 
				
			||||||
 | 
											0x000e0 0xc74164de  /* SGMII_CTRL */
 | 
				
			||||||
 | 
											0x0007c 0x4e        /* PORT0_STATUS */
 | 
				
			||||||
 | 
											0x00094 0x4e        /* PORT6_STATUS */
 | 
				
			||||||
 | 
									>;
 | 
				
			||||||
 | 
									qcom,port_phyinfo {
 | 
				
			||||||
 | 
										port@0 {
 | 
				
			||||||
 | 
											port_id = <1>;
 | 
				
			||||||
 | 
											phy_address = <0>;
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
										port@1 {
 | 
				
			||||||
 | 
											port_id = <2>;
 | 
				
			||||||
 | 
											phy_address = <1>;
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
										port@2 {
 | 
				
			||||||
 | 
											port_id = <3>;
 | 
				
			||||||
 | 
											phy_address = <2>;
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
										port@3 {
 | 
				
			||||||
 | 
											port_id = <4>;
 | 
				
			||||||
 | 
											phy_address = <3>;
 | 
				
			||||||
 | 
										};
 | 
				
			||||||
 | 
									};
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							wifi0: wifi@c000000 {
 | 
				
			||||||
 | 
								qcom,bdf-addr = <0x4BA00000 0x4BA00000 0x4BA00000
 | 
				
			||||||
 | 
											0x0 0x0>;
 | 
				
			||||||
 | 
								qcom,caldb-addr = <0x4CA00000 0x4CA00000 0x4CA00000
 | 
				
			||||||
 | 
											0x0 0x0>;
 | 
				
			||||||
 | 
								qcom,caldb-size = <0x200000>;
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							ess-uniphy@98000 {
 | 
				
			||||||
 | 
								status = "disabled";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							qcom,sps {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							qcom,usbbam@8B04000 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							qcom,diag@0 {
 | 
				
			||||||
 | 
								status = "ok";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							dp1 {
 | 
				
			||||||
 | 
								device_type = "network";
 | 
				
			||||||
 | 
								compatible = "qcom,nss-dp";
 | 
				
			||||||
 | 
								clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>;
 | 
				
			||||||
 | 
								clock-names = "nss-snoc-gmac-axi-clk";
 | 
				
			||||||
 | 
								qcom,id = <1>;
 | 
				
			||||||
 | 
								reg = <0x39C00000 0x10000>;
 | 
				
			||||||
 | 
								interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
 | 
				
			||||||
 | 
								qcom,mactype = <2>;
 | 
				
			||||||
 | 
								qcom,link-poll = <1>;
 | 
				
			||||||
 | 
								qcom,phy-mdio-addr = <7>;
 | 
				
			||||||
 | 
								mdio-bus = <&mdio0>;
 | 
				
			||||||
 | 
								local-mac-address = [000000000000];
 | 
				
			||||||
 | 
								phy-mode = "sgmii";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							dp2 {
 | 
				
			||||||
 | 
								device_type = "network";
 | 
				
			||||||
 | 
								compatible = "qcom,nss-dp";
 | 
				
			||||||
 | 
								clocks = <&gcc GCC_SNOC_GMAC1_AXI_CLK>;
 | 
				
			||||||
 | 
								clock-names = "nss-snoc-gmac-axi-clk";
 | 
				
			||||||
 | 
								qcom,id = <2>;
 | 
				
			||||||
 | 
								reg = <0x39D00000 0x10000>;
 | 
				
			||||||
 | 
								interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
 | 
				
			||||||
 | 
								qcom,mactype = <2>;
 | 
				
			||||||
 | 
								local-mac-address = [000000000000];
 | 
				
			||||||
 | 
								phy-mode = "sgmii";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							rpm_etm0 {
 | 
				
			||||||
 | 
								status = "disabled";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							lpass: lpass@0xA000000{
 | 
				
			||||||
 | 
								status = "disabled";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							pcm: pcm@0xA3C0000{
 | 
				
			||||||
 | 
								pinctrl-0 = <&audio_pins>;
 | 
				
			||||||
 | 
								pinctrl-names = "default";
 | 
				
			||||||
 | 
								status = "disabled";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							pcm_lb: pcm_lb@0 {
 | 
				
			||||||
 | 
								status = "disabled";
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						thermal-zones {
 | 
				
			||||||
 | 
							status = "ok";
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&tlmm {
 | 
				
			||||||
 | 
						pinctrl-0 = <&blsp0_uart_pins &phy_led_pins>;
 | 
				
			||||||
 | 
						pinctrl-names = "default";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						blsp0_uart_pins: blsp0_uart_pins {
 | 
				
			||||||
 | 
							blsp0_uart_rx_tx {
 | 
				
			||||||
 | 
								pins = "gpio20", "gpio21";
 | 
				
			||||||
 | 
								function = "blsp0_uart0";
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						blsp1_uart_pins: blsp1_uart_pins {
 | 
				
			||||||
 | 
							blsp1_uart_rx_tx {
 | 
				
			||||||
 | 
								pins = "gpio23", "gpio25", "gpio24", "gpio26";
 | 
				
			||||||
 | 
								function = "blsp1_uart2";
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						blsp0_spi_pins: blsp0_spi_pins {
 | 
				
			||||||
 | 
							mux {
 | 
				
			||||||
 | 
								pins = "gpio10", "gpio11", "gpio12", "gpio13";
 | 
				
			||||||
 | 
								function = "blsp0_spi";
 | 
				
			||||||
 | 
								drive-strength = <2>;
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						qspi_nand_pins: qspi_nand_pins {
 | 
				
			||||||
 | 
							qspi_clock {
 | 
				
			||||||
 | 
									pins = "gpio9";
 | 
				
			||||||
 | 
									function = "qspi_clk";
 | 
				
			||||||
 | 
									drive-strength = <8>;
 | 
				
			||||||
 | 
									bias-disable;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							qspi_cs {
 | 
				
			||||||
 | 
									pins = "gpio8";
 | 
				
			||||||
 | 
									function = "qspi_cs";
 | 
				
			||||||
 | 
									drive-strength = <8>;
 | 
				
			||||||
 | 
									bias-disable;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							qspi_data_0 {
 | 
				
			||||||
 | 
									pins = "gpio7";
 | 
				
			||||||
 | 
									function = "qspi0";
 | 
				
			||||||
 | 
									drive-strength = <8>;
 | 
				
			||||||
 | 
									bias-disable;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							qspi_data_1 {
 | 
				
			||||||
 | 
									pins = "gpio6";
 | 
				
			||||||
 | 
									function = "qspi1";
 | 
				
			||||||
 | 
									drive-strength = <8>;
 | 
				
			||||||
 | 
									bias-disable;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							qspi_data_2 {
 | 
				
			||||||
 | 
									pins = "gpio5";
 | 
				
			||||||
 | 
									function = "qspi2";
 | 
				
			||||||
 | 
									drive-strength = <8>;
 | 
				
			||||||
 | 
									bias-disable;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							qspi_data_3 {
 | 
				
			||||||
 | 
									pins = "gpio4";
 | 
				
			||||||
 | 
									function = "qspi3";
 | 
				
			||||||
 | 
									drive-strength = <8>;
 | 
				
			||||||
 | 
									bias-disable;
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						mdio1_pins: mdio_pinmux {
 | 
				
			||||||
 | 
							mux_0 {
 | 
				
			||||||
 | 
								pins = "gpio36";
 | 
				
			||||||
 | 
								function = "mdc";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-up;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_1 {
 | 
				
			||||||
 | 
								pins = "gpio37";
 | 
				
			||||||
 | 
								function = "mdio";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-up;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						phy_led_pins: phy_led_pins {
 | 
				
			||||||
 | 
							gephy_led_pin {
 | 
				
			||||||
 | 
								pins = "gpio46";
 | 
				
			||||||
 | 
								function = "led0";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						i2c_pins: i2c_pins {
 | 
				
			||||||
 | 
							i2c_scl {
 | 
				
			||||||
 | 
								pins = "gpio25";
 | 
				
			||||||
 | 
								function = "blsp2_i2c1";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							i2c_sda {
 | 
				
			||||||
 | 
								pins = "gpio26";
 | 
				
			||||||
 | 
								function = "blsp2_i2c1";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-disable;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						button_pins: button_pins {
 | 
				
			||||||
 | 
							wps_button {
 | 
				
			||||||
 | 
								pins = "gpio38";
 | 
				
			||||||
 | 
								function = "gpio";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-up;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						audio_pins: audio_pinmux {
 | 
				
			||||||
 | 
							mux_1 {
 | 
				
			||||||
 | 
								pins = "gpio24";
 | 
				
			||||||
 | 
								function = "audio_rxbclk";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_2 {
 | 
				
			||||||
 | 
								pins = "gpio25";
 | 
				
			||||||
 | 
								function = "audio_rxfsync";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_3 {
 | 
				
			||||||
 | 
								pins = "gpio26";
 | 
				
			||||||
 | 
								function = "audio_rxd";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_4 {
 | 
				
			||||||
 | 
								pins = "gpio27";
 | 
				
			||||||
 | 
								function = "audio_txmclk";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_5 {
 | 
				
			||||||
 | 
								pins = "gpio28";
 | 
				
			||||||
 | 
								function = "audio_txbclk";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_6 {
 | 
				
			||||||
 | 
								pins = "gpio29";
 | 
				
			||||||
 | 
								function = "audio_txfsync";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							mux_7 {
 | 
				
			||||||
 | 
								pins = "gpio30";
 | 
				
			||||||
 | 
								function = "audio_txd";
 | 
				
			||||||
 | 
								drive-strength = <8>;
 | 
				
			||||||
 | 
								bias-pull-down;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&soc {
 | 
				
			||||||
 | 
						gpio_keys {
 | 
				
			||||||
 | 
							compatible = "gpio-keys";
 | 
				
			||||||
 | 
							pinctrl-0 = <&button_pins>;
 | 
				
			||||||
 | 
							pinctrl-names = "default";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							button@1 {
 | 
				
			||||||
 | 
								label = "wps";
 | 
				
			||||||
 | 
								linux,code = <KEY_WPS_BUTTON>;
 | 
				
			||||||
 | 
								gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
 | 
				
			||||||
 | 
								linux,input-type = <1>;
 | 
				
			||||||
 | 
								debounce-interval = <60>;
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&usb3 {
 | 
				
			||||||
 | 
						qcom,multiplexed-phy;
 | 
				
			||||||
 | 
						qcom,phy-mux-regs = <&tcsr_q6_block 0x2540>;
 | 
				
			||||||
 | 
						device-power-gpio = <&tlmm 24 1>;
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&eud {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x1 {
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
						perst-gpio = <&tlmm 18 1>;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x2 {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
						perst-gpio = <&tlmm 15 1>;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&bt {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&wcss {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&q6v5_wcss {
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&q6v5_m3 {
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&tcsr_mutex_block {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&tcsr_mutex {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&smem {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&apcs_glb {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&tcsr_q6_block {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&qcom_q6v5_wcss {
 | 
				
			||||||
 | 
						#ifdef __IPQ_MEM_PROFILE_256_MB__
 | 
				
			||||||
 | 
							memory-region = <&q6_region>, <&q6_etr_region>;
 | 
				
			||||||
 | 
						#else
 | 
				
			||||||
 | 
							memory-region = <&q6_region>, <&q6_etr_region>,
 | 
				
			||||||
 | 
									<&q6_caldb_region>;
 | 
				
			||||||
 | 
						#endif
 | 
				
			||||||
 | 
						/* IPQ5018 */
 | 
				
			||||||
 | 
						q6v5_wcss_userpd1 {
 | 
				
			||||||
 | 
							m3_firmware = "IPQ5018/m3_fw.mdt";
 | 
				
			||||||
 | 
							interrupts-extended = <&wcss_smp2p_in 8 0>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_in 9 0>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_in 12 0>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_in 11 0>;
 | 
				
			||||||
 | 
							interrupt-names ="fatal",
 | 
				
			||||||
 | 
								"ready",
 | 
				
			||||||
 | 
								"spawn_ack",
 | 
				
			||||||
 | 
								"stop-ack";
 | 
				
			||||||
 | 
							qcom,smem-states = <&wcss_smp2p_out 8>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_out 9>,
 | 
				
			||||||
 | 
								<&wcss_smp2p_out 10>;
 | 
				
			||||||
 | 
							qcom,smem-state-names = "shutdown",
 | 
				
			||||||
 | 
								"stop",
 | 
				
			||||||
 | 
								"spawn";
 | 
				
			||||||
 | 
							qca,asid = <1>;
 | 
				
			||||||
 | 
							qca,auto-restart;
 | 
				
			||||||
 | 
							qca,int_radio;
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&i2c_0 {
 | 
				
			||||||
 | 
						pinctrl-0 = <&i2c_pins>;
 | 
				
			||||||
 | 
						pinctrl-names = "default";
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&dbm_1p5 {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&msm_imem {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&blsp1_uart1 {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&ssuniphy_0 {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&hs_m31phy_0 {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x1phy {
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x2phy {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x1_rp {
 | 
				
			||||||
 | 
						status = "disabled";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						mhi_0: qcom,mhi@0 {
 | 
				
			||||||
 | 
							reg = <0 0 0 0 0 >;
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pcie_x2_rp {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						mhi_1: qcom,mhi@1 {
 | 
				
			||||||
 | 
							reg = <0 0 0 0 0 >;
 | 
				
			||||||
 | 
							qrtr_instance_id = <0x20>;
 | 
				
			||||||
 | 
							#address-cells = <0x2>;
 | 
				
			||||||
 | 
							#size-cells = <0x2>;
 | 
				
			||||||
 | 
							memory-region = <&mhi_region1>;
 | 
				
			||||||
 | 
					#if !defined(__CNSS2__)
 | 
				
			||||||
 | 
							base-addr = <0x4CC00000>;
 | 
				
			||||||
 | 
							m3-dump-addr = <0x4E000000>;
 | 
				
			||||||
 | 
							etr-addr = <0x4E100000>;
 | 
				
			||||||
 | 
							qcom,caldb-addr = <0x4E200000>;
 | 
				
			||||||
 | 
							qcom,tgt-mem-mode = <0x1>;
 | 
				
			||||||
 | 
							mhi,max-channels = <30>;
 | 
				
			||||||
 | 
							mhi,timeout = <10000>;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&wifi0 {
 | 
				
			||||||
 | 
						/* IPQ5018 */
 | 
				
			||||||
 | 
						qcom,board_id = <0x24>;
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&wifi3 {
 | 
				
			||||||
 | 
						/* QCN9000 5G */
 | 
				
			||||||
 | 
						board_id = <0xa0>;
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&qfprom {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&tsens {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
							
								
								
									
										1442
									
								
								feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq5018-xunison-d50.dtsi
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										1442
									
								
								feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq5018-xunison-d50.dtsi
									
									
									
									
									
										Executable file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -1,5 +1,24 @@
 | 
				
			|||||||
KERNEL_LOADADDR := 0x41208000
 | 
					KERNEL_LOADADDR := 0x41208000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					define Device/FitImage
 | 
				
			||||||
 | 
					        KERNEL_SUFFIX := -uImage.itb
 | 
				
			||||||
 | 
					        KERNEL = kernel-bin | libdeflate-gzip | fit gzip $$(KDIR)/image-$$(DEVICE_DTS).dtb
 | 
				
			||||||
 | 
					        KERNEL_NAME := Image
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					define Device/FitImageLzma
 | 
				
			||||||
 | 
					        KERNEL_SUFFIX := -uImage.itb
 | 
				
			||||||
 | 
					        KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb
 | 
				
			||||||
 | 
					        KERNEL_NAME := Image
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					define Device/UbiFit
 | 
				
			||||||
 | 
					        KERNEL_IN_UBI := 1
 | 
				
			||||||
 | 
					        IMAGES := factory.ubi sysupgrade.bin
 | 
				
			||||||
 | 
					        IMAGE/factory.ubi := append-ubi
 | 
				
			||||||
 | 
					        IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Device/cig_wf186w
 | 
					define Device/cig_wf186w
 | 
				
			||||||
  DEVICE_TITLE := Cigtech WF-186w
 | 
					  DEVICE_TITLE := Cigtech WF-186w
 | 
				
			||||||
  DEVICE_DTS := qcom-ipq5018-cig-wf186w
 | 
					  DEVICE_DTS := qcom-ipq5018-cig-wf186w
 | 
				
			||||||
@@ -9,6 +28,15 @@ define Device/cig_wf186w
 | 
				
			|||||||
endef
 | 
					endef
 | 
				
			||||||
TARGET_DEVICES += cig_wf186w
 | 
					TARGET_DEVICES += cig_wf186w
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					define Device/cig_wf186h
 | 
				
			||||||
 | 
					  DEVICE_TITLE := Cigtech WF-186h
 | 
				
			||||||
 | 
					  DEVICE_DTS := qcom-ipq5018-cig-wf186h
 | 
				
			||||||
 | 
					  SUPPORTED_DEVICES := cig,wf186h
 | 
				
			||||||
 | 
					  DEVICE_PACKAGES := ath11k-wifi-cig-wf186h ath11k-firmware-ipq50xx-map-spruce
 | 
				
			||||||
 | 
					  DEVICE_DTS_CONFIG := config@mp03.3
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					TARGET_DEVICES += cig_wf186h
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Device/cybertan_eww622_a1
 | 
					define Device/cybertan_eww622_a1
 | 
				
			||||||
  DEVICE_TITLE := CyberTan EWW622-A1
 | 
					  DEVICE_TITLE := CyberTan EWW622-A1
 | 
				
			||||||
  DEVICE_DTS := qcom-ipq5018-eww622-a1
 | 
					  DEVICE_DTS := qcom-ipq5018-eww622-a1
 | 
				
			||||||
@@ -27,6 +55,15 @@ define Device/cybertan_eww631_a1
 | 
				
			|||||||
endef
 | 
					endef
 | 
				
			||||||
TARGET_DEVICES += cybertan_eww631_a1
 | 
					TARGET_DEVICES += cybertan_eww631_a1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					define Device/wallys_dr5018
 | 
				
			||||||
 | 
					  DEVICE_TITLE := Wallys DR5018
 | 
				
			||||||
 | 
					  DEVICE_DTS := qcom-ipq5018-wallys-dr5018
 | 
				
			||||||
 | 
					  SUPPORTED_DEVICES := wallys,dr5018
 | 
				
			||||||
 | 
					  DEVICE_PACKAGES := ath11k-wifi-wallys-dr5018 ath11k-firmware-ipq50xx-spruce ath11k-firmware-qcn6122
 | 
				
			||||||
 | 
					  DEVICE_DTS_CONFIG := config@mp03.5-c1
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					TARGET_DEVICES += wallys_dr5018
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Device/cybertan_eww631_b1
 | 
					define Device/cybertan_eww631_b1
 | 
				
			||||||
  DEVICE_TITLE := CyberTan EWW631-B1
 | 
					  DEVICE_TITLE := CyberTan EWW631-B1
 | 
				
			||||||
  DEVICE_DTS := qcom-ipq5018-eww631-b1
 | 
					  DEVICE_DTS := qcom-ipq5018-eww631-b1
 | 
				
			||||||
@@ -92,6 +129,33 @@ define Device/qcom_mp03_3
 | 
				
			|||||||
endef
 | 
					endef
 | 
				
			||||||
TARGET_DEVICES += qcom_mp03_3
 | 
					TARGET_DEVICES += qcom_mp03_3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					define Device/hfcl_ion4xi_w
 | 
				
			||||||
 | 
					  DEVICE_TITLE := HFCL ION4xi_w
 | 
				
			||||||
 | 
					  DEVICE_DTS := qcom-ipq5018-hfcl-ion4xi_w
 | 
				
			||||||
 | 
					  SUPPORTED_DEVICES := hfcl,ion4xi_w
 | 
				
			||||||
 | 
					  DEVICE_PACKAGES := ath11k-wifi-hfcl-ion4xi_w ath11k-firmware-ipq50xx-map-spruce
 | 
				
			||||||
 | 
					  DEVICE_DTS_CONFIG := config@mp03.3
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					TARGET_DEVICES += hfcl_ion4xi_w
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					define Device/hfcl_ion4x_w
 | 
				
			||||||
 | 
					  DEVICE_TITLE := HFCL ION4x_w
 | 
				
			||||||
 | 
					  DEVICE_DTS := qcom-ipq5018-hfcl-ion4x_w
 | 
				
			||||||
 | 
					  SUPPORTED_DEVICES := hfcl,ion4x_w
 | 
				
			||||||
 | 
					  DEVICE_PACKAGES := ath11k-wifi-hfcl-ion4x_w ath11k-firmware-ipq50xx-map-spruce
 | 
				
			||||||
 | 
					  DEVICE_DTS_CONFIG := config@mp03.3
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					TARGET_DEVICES += hfcl_ion4x_w
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					define Device/hfcl_ion4xi_HMR
 | 
				
			||||||
 | 
					  DEVICE_TITLE := HFCL ION4xi_HMR
 | 
				
			||||||
 | 
					  DEVICE_DTS := qcom-ipq5018-hfcl-ion4xi_HMR
 | 
				
			||||||
 | 
					  SUPPORTED_DEVICES := hfcl,ion4xi_HMR
 | 
				
			||||||
 | 
					  DEVICE_PACKAGES := ath11k-wifi-hfcl-ion4xi_HMR ath11k-firmware-ipq50xx-map-spruce
 | 
				
			||||||
 | 
					  DEVICE_DTS_CONFIG := config@mp03.3
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					TARGET_DEVICES += hfcl_ion4xi_HMR
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Device/yuncore_fap655
 | 
					define Device/yuncore_fap655
 | 
				
			||||||
  DEVICE_TITLE := Yuncore FAP650
 | 
					  DEVICE_TITLE := Yuncore FAP650
 | 
				
			||||||
  DEVICE_DTS := qcom-ipq5018-yuncore-fap655
 | 
					  DEVICE_DTS := qcom-ipq5018-yuncore-fap655
 | 
				
			||||||
@@ -100,3 +164,30 @@ define Device/yuncore_fap655
 | 
				
			|||||||
  DEVICE_DTS_CONFIG := config@mp03.3
 | 
					  DEVICE_DTS_CONFIG := config@mp03.3
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
TARGET_DEVICES += yuncore_fap655
 | 
					TARGET_DEVICES += yuncore_fap655
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					define Device/xunison_d50-5g
 | 
				
			||||||
 | 
					  DEVICE_TITLE := Xunison D50-5G
 | 
				
			||||||
 | 
					  DEVICE_DTS := qcom-ipq5018-xunison-d50-5g
 | 
				
			||||||
 | 
					  SUPPORTED_DEVICES := xunison,d50_5g
 | 
				
			||||||
 | 
					  DEVICE_PACKAGES := ath11k-wifi-xunison-d50 ath11k-firmware-ipq50xx ath11k-firmware-qcn9000 
 | 
				
			||||||
 | 
					  DEVICE_DTS_CONFIG := config@mp03.1
 | 
				
			||||||
 | 
					  IMAGES := sysupgrade.tar nand-factory.bin nand-factory.ubi
 | 
				
			||||||
 | 
					  IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
 | 
				
			||||||
 | 
					  IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand
 | 
				
			||||||
 | 
					  IMAGE/nand-factory.ubi := append-ubi
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					TARGET_DEVICES += xunison_d50-5g
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					define Device/xunison_d50
 | 
				
			||||||
 | 
					  DEVICE_TITLE := Xunison D50
 | 
				
			||||||
 | 
					  DEVICE_DTS := qcom-ipq5018-xunison-d50
 | 
				
			||||||
 | 
					  SUPPORTED_DEVICES := xunison,d50
 | 
				
			||||||
 | 
					  DEVICE_PACKAGES := ath11k-wifi-xunison-d50 ath11k-firmware-ipq50xx ath11k-firmware-qcn9000 ath11k-firmware-qcn6122
 | 
				
			||||||
 | 
					  DEVICE_DTS_CONFIG := config@mp03.1
 | 
				
			||||||
 | 
					  IMAGES := sysupgrade.tar nand-factory.bin nand-factory.ubi
 | 
				
			||||||
 | 
					  IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
 | 
				
			||||||
 | 
					  IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand
 | 
				
			||||||
 | 
					  IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand
 | 
				
			||||||
 | 
					  IMAGE/nand-factory.ubi := append-ubi | qsdk-ipq-factory-nand
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					TARGET_DEVICES += xunison_d50
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,14 +13,23 @@ define Device/cig_wf660a
 | 
				
			|||||||
endef
 | 
					endef
 | 
				
			||||||
TARGET_DEVICES += cig_wf660a
 | 
					TARGET_DEVICES += cig_wf660a
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Device/cig_wf188n
 | 
					define Device/cig_wf188n-ca
 | 
				
			||||||
  DEVICE_TITLE := Cigtech WF-188n
 | 
					  DEVICE_TITLE := Cigtech WF-188n
 | 
				
			||||||
  DEVICE_DTS := qcom-ipq6018-cig-wf188n
 | 
					  DEVICE_DTS := qcom-ipq6018-cig-wf188n
 | 
				
			||||||
  DEVICE_DTS_CONFIG := config@cp03-c1
 | 
					  DEVICE_DTS_CONFIG := config@cp03-c1
 | 
				
			||||||
  SUPPORTED_DEVICES := cig,wf188n
 | 
					  SUPPORTED_DEVICES := cig,wf188n
 | 
				
			||||||
  DEVICE_PACKAGES := ath11k-wifi-cig-wf188n uboot-env
 | 
					  DEVICE_PACKAGES := ath11k-wifi-cig-wf188n-ca uboot-env
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
TARGET_DEVICES += cig_wf188n
 | 
					TARGET_DEVICES += cig_wf188n-ca
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					define Device/cig_wf188n-us
 | 
				
			||||||
 | 
					  DEVICE_TITLE := Cigtech WF-188n
 | 
				
			||||||
 | 
					  DEVICE_DTS := qcom-ipq6018-cig-wf188n
 | 
				
			||||||
 | 
					  DEVICE_DTS_CONFIG := config@cp03-c1
 | 
				
			||||||
 | 
					  SUPPORTED_DEVICES := cig,wf188n
 | 
				
			||||||
 | 
					  DEVICE_PACKAGES := ath11k-wifi-cig-wf188n-us uboot-env
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					TARGET_DEVICES += cig_wf188n-us
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Device/hfcl_ion4xe
 | 
					define Device/hfcl_ion4xe
 | 
				
			||||||
  DEVICE_TITLE := HFCL ION4Xe
 | 
					  DEVICE_TITLE := HFCL ION4Xe
 | 
				
			||||||
@@ -61,7 +70,7 @@ TARGET_DEVICES += hfcl_ion4xi
 | 
				
			|||||||
define Device/hfcl_ion4xi_wp
 | 
					define Device/hfcl_ion4xi_wp
 | 
				
			||||||
  DEVICE_TITLE := HFCL ION4Xi_WP
 | 
					  DEVICE_TITLE := HFCL ION4Xi_WP
 | 
				
			||||||
  DEVICE_DTS := qcom-ipq6018-hfcl-ion4xi_wp
 | 
					  DEVICE_DTS := qcom-ipq6018-hfcl-ion4xi_wp
 | 
				
			||||||
  DEVICE_DTS_CONFIG := config@cp03-c1
 | 
					  DEVICE_DTS_CONFIG := config@cp01-c1
 | 
				
			||||||
  SUPPORTED_DEVICES := hfcl,ion4xi_wp
 | 
					  SUPPORTED_DEVICES := hfcl,ion4xi_wp
 | 
				
			||||||
  DEVICE_PACKAGES := ath11k-wifi-hfcl-ion4xi_wp uboot-envtools
 | 
					  DEVICE_PACKAGES := ath11k-wifi-hfcl-ion4xi_wp uboot-envtools
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -82,7 +82,7 @@ CONFIG_MIGRATION=y
 | 
				
			|||||||
CONFIG_MPILIB=y
 | 
					CONFIG_MPILIB=y
 | 
				
			||||||
CONFIG_MSM_SECURE_BUFFER=y
 | 
					CONFIG_MSM_SECURE_BUFFER=y
 | 
				
			||||||
CONFIG_NEED_SG_DMA_LENGTH=y
 | 
					CONFIG_NEED_SG_DMA_LENGTH=y
 | 
				
			||||||
CONFIG_NET_SWITCHDEV=y
 | 
					# CONFIG_NET_SWITCHDEV is not set
 | 
				
			||||||
CONFIG_NUM_ALT_PARTITION=16
 | 
					CONFIG_NUM_ALT_PARTITION=16
 | 
				
			||||||
CONFIG_OF_IOMMU=y
 | 
					CONFIG_OF_IOMMU=y
 | 
				
			||||||
CONFIG_OID_REGISTRY=y
 | 
					CONFIG_OID_REGISTRY=y
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ CONFIG_ARCH_IPQ807x=y
 | 
				
			|||||||
CONFIG_IPQ_ADSS_807x=y
 | 
					CONFIG_IPQ_ADSS_807x=y
 | 
				
			||||||
CONFIG_IPQ_APSS_807x=y
 | 
					CONFIG_IPQ_APSS_807x=y
 | 
				
			||||||
CONFIG_IPQ_GCC_807x=y
 | 
					CONFIG_IPQ_GCC_807x=y
 | 
				
			||||||
CONFIG_NET_SWITCHDEV=y
 | 
					# CONFIG_NET_SWITCHDEV is not set
 | 
				
			||||||
CONFIG_NUM_ALT_PARTITION=16
 | 
					CONFIG_NUM_ALT_PARTITION=16
 | 
				
			||||||
CONFIG_PINCTRL_IPQ807x=y
 | 
					CONFIG_PINCTRL_IPQ807x=y
 | 
				
			||||||
# CONFIG_IPC_LOGGING is not set
 | 
					# CONFIG_IPC_LOGGING is not set
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										14
									
								
								feeds/ipq807x/ipq807x/patches/130-proxy-arp.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								feeds/ipq807x/ipq807x/patches/130-proxy-arp.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
				
			|||||||
 | 
					Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/net/bridge/br_input.c
 | 
				
			||||||
 | 
					===================================================================
 | 
				
			||||||
 | 
					--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/net/bridge/br_input.c
 | 
				
			||||||
 | 
					+++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/net/bridge/br_input.c
 | 
				
			||||||
 | 
					@@ -125,7 +125,8 @@ static void br_do_proxy_arp(struct sk_bu
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 		f = __br_fdb_get(br, n->ha, vid);
 | 
				
			||||||
 | 
					 		if (f && ((p->flags & BR_PROXYARP) ||
 | 
				
			||||||
 | 
					-			  (f->dst && (f->dst->flags & BR_PROXYARP_WIFI)))) {
 | 
				
			||||||
 | 
					+			  (f->dst && (f->dst->flags & BR_PROXYARP_WIFI)))
 | 
				
			||||||
 | 
					+			&& memcmp(sha, n->ha, 6)) {
 | 
				
			||||||
 | 
					 			arp_send(ARPOP_REPLY, ETH_P_ARP, sip, skb->dev, tip,
 | 
				
			||||||
 | 
					 				 sha, n->ha, sha);
 | 
				
			||||||
 | 
					 			BR_INPUT_SKB_CB(skb)->proxyarp_replied = true;
 | 
				
			||||||
@@ -0,0 +1,67 @@
 | 
				
			|||||||
 | 
					From: Andy Ren <andy.ren@getcruise.com>
 | 
				
			||||||
 | 
					Date: Mon, 7 Nov 2022 09:42:42 -0800
 | 
				
			||||||
 | 
					Subject: [PATCH] net/core: Allow live renaming when an interface is up
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Allow a network interface to be renamed when the interface
 | 
				
			||||||
 | 
					is up.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					As described in the netconsole documentation [1], when netconsole is
 | 
				
			||||||
 | 
					used as a built-in, it will bring up the specified interface as soon as
 | 
				
			||||||
 | 
					possible. As a result, user space will not be able to rename the
 | 
				
			||||||
 | 
					interface since the kernel disallows renaming of interfaces that are
 | 
				
			||||||
 | 
					administratively up unless the 'IFF_LIVE_RENAME_OK' private flag was set
 | 
				
			||||||
 | 
					by the kernel.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The original solution [2] to this problem was to add a new parameter to
 | 
				
			||||||
 | 
					the netconsole configuration parameters that allows renaming of
 | 
				
			||||||
 | 
					the interface used by netconsole while it is administratively up.
 | 
				
			||||||
 | 
					However, during the discussion that followed, it became apparent that we
 | 
				
			||||||
 | 
					have no reason to keep the current restriction and instead we should
 | 
				
			||||||
 | 
					allow user space to rename interfaces regardless of their administrative
 | 
				
			||||||
 | 
					state:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					1. The restriction was put in place over 20 years ago when renaming was
 | 
				
			||||||
 | 
					only possible via IOCTL and before rtnetlink started notifying user
 | 
				
			||||||
 | 
					space about such changes like it does today.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					2. The 'IFF_LIVE_RENAME_OK' flag was added over 3 years ago in version
 | 
				
			||||||
 | 
					5.2 and no regressions were reported.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					3. In-kernel listeners to 'NETDEV_CHANGENAME' do not seem to care about
 | 
				
			||||||
 | 
					the administrative state of interface.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Therefore, allow user space to rename running interfaces by removing the
 | 
				
			||||||
 | 
					restriction and the associated 'IFF_LIVE_RENAME_OK' flag. Help in
 | 
				
			||||||
 | 
					possible triage by emitting a message to the kernel log that an
 | 
				
			||||||
 | 
					interface was renamed while UP.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[1] https://www.kernel.org/doc/Documentation/networking/netconsole.rst
 | 
				
			||||||
 | 
					[2] https://lore.kernel.org/netdev/20221102002420.2613004-1-andy.ren@getcruise.com/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Signed-off-by: Andy Ren <andy.ren@getcruise.com>
 | 
				
			||||||
 | 
					Reviewed-by: Ido Schimmel <idosch@nvidia.com>
 | 
				
			||||||
 | 
					Reviewed-by: David Ahern <dsahern@kernel.org>
 | 
				
			||||||
 | 
					Signed-off-by: David S. Miller <davem@davemloft.net>
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--- a/net/core/dev.c
 | 
				
			||||||
 | 
					+++ b/net/core/dev.c
 | 
				
			||||||
 | 
					@@ -1152,8 +1152,6 @@ int dev_change_name(struct net_device *d
 | 
				
			||||||
 | 
					 	BUG_ON(!dev_net(dev));
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 	net = dev_net(dev);
 | 
				
			||||||
 | 
					-	if (dev->flags & IFF_UP)
 | 
				
			||||||
 | 
					-		return -EBUSY;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 	write_seqcount_begin(&devnet_rename_seq);
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					@@ -1171,7 +1169,8 @@ int dev_change_name(struct net_device *d
 | 
				
			||||||
 | 
					 	}
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 	if (oldname[0] && !strchr(oldname, '%'))
 | 
				
			||||||
 | 
					-		netdev_info(dev, "renamed from %s\n", oldname);
 | 
				
			||||||
 | 
					+		netdev_info(dev, "renamed from %s%s\n", oldname,
 | 
				
			||||||
 | 
					+			    dev->flags & IFF_UP ? " (while UP)" : "");
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 	old_assign_type = dev->name_assign_type;
 | 
				
			||||||
 | 
					 	dev->name_assign_type = NET_NAME_RENAMED;
 | 
				
			||||||
@@ -1,5 +1,7 @@
 | 
				
			|||||||
--- a/drivers/net/phy/Kconfig	2023-03-16 09:38:22.742281029 +0800
 | 
					Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/Kconfig
 | 
				
			||||||
+++ b/drivers/net/phy/Kconfig	2023-03-16 09:41:46.400370236 +0800
 | 
					===================================================================
 | 
				
			||||||
 | 
					--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/drivers/net/phy/Kconfig
 | 
				
			||||||
 | 
					+++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/Kconfig
 | 
				
			||||||
@@ -332,6 +332,10 @@ config RTL8367B_PHY
 | 
					@@ -332,6 +332,10 @@ config RTL8367B_PHY
 | 
				
			||||||
 	tristate "Driver fot the Realtek RTL8367R-VB switch"
 | 
					 	tristate "Driver fot the Realtek RTL8367R-VB switch"
 | 
				
			||||||
 	select SWCONFIG
 | 
					 	select SWCONFIG
 | 
				
			||||||
@@ -11,9 +13,10 @@
 | 
				
			|||||||
 endif # RTL8366_SMI
 | 
					 endif # RTL8366_SMI
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 source "drivers/net/phy/b53/Kconfig"
 | 
					 source "drivers/net/phy/b53/Kconfig"
 | 
				
			||||||
 | 
					Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/Makefile
 | 
				
			||||||
--- a/drivers/net/phy/Makefile	2023-03-16 09:38:12.210161055 +0800
 | 
					===================================================================
 | 
				
			||||||
+++ b/drivers/net/phy/Makefile	2023-03-16 09:41:14.548069150 +0800
 | 
					--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/drivers/net/phy/Makefile
 | 
				
			||||||
 | 
					+++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/Makefile
 | 
				
			||||||
@@ -34,6 +34,7 @@ obj-$(CONFIG_RTL8366S_PHY)	+= rtl8366s.o
 | 
					@@ -34,6 +34,7 @@ obj-$(CONFIG_RTL8366S_PHY)	+= rtl8366s.o
 | 
				
			||||||
 obj-$(CONFIG_RTL8366RB_PHY)	+= rtl8366rb.o
 | 
					 obj-$(CONFIG_RTL8366RB_PHY)	+= rtl8366rb.o
 | 
				
			||||||
 obj-$(CONFIG_RTL8367_PHY)	+= rtl8367.o
 | 
					 obj-$(CONFIG_RTL8367_PHY)	+= rtl8367.o
 | 
				
			||||||
@@ -22,9 +25,10 @@
 | 
				
			|||||||
 obj-$(CONFIG_LSI_ET1011C_PHY)	+= et1011c.o
 | 
					 obj-$(CONFIG_LSI_ET1011C_PHY)	+= et1011c.o
 | 
				
			||||||
 obj-$(CONFIG_PSB6970_PHY)	+= psb6970.o
 | 
					 obj-$(CONFIG_PSB6970_PHY)	+= psb6970.o
 | 
				
			||||||
 obj-$(CONFIG_B53)		+= b53/
 | 
					 obj-$(CONFIG_B53)		+= b53/
 | 
				
			||||||
 | 
					Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/rtl8366_smi.h
 | 
				
			||||||
--- a/drivers/net/phy/rtl8366_smi.h	2023-03-21 09:29:19.422575683 +0800
 | 
					===================================================================
 | 
				
			||||||
+++ b/drivers/net/phy/rtl8366_smi.h	2023-03-20 08:55:48.041464368 +0800
 | 
					--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/drivers/net/phy/rtl8366_smi.h
 | 
				
			||||||
 | 
					+++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/rtl8366_smi.h
 | 
				
			||||||
@@ -14,6 +14,7 @@
 | 
					@@ -14,6 +14,7 @@
 | 
				
			||||||
 #include <linux/phy.h>
 | 
					 #include <linux/phy.h>
 | 
				
			||||||
 #include <linux/switch.h>
 | 
					 #include <linux/switch.h>
 | 
				
			||||||
@@ -80,8 +84,10 @@
 | 
				
			|||||||
 
 | 
					 
 | 
				
			||||||
 struct rtl8366_smi* rtl8366_smi_probe(struct platform_device *pdev);
 | 
					 struct rtl8366_smi* rtl8366_smi_probe(struct platform_device *pdev);
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
--- a/drivers/net/phy/rtl8366_smi.c	2023-03-21 09:28:56.426383208 +0800
 | 
					Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/rtl8366_smi.c
 | 
				
			||||||
+++ b/drivers/net/phy/rtl8366_smi.c	2023-03-21 09:15:07.869753295 +0800
 | 
					===================================================================
 | 
				
			||||||
 | 
					--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/drivers/net/phy/rtl8366_smi.c
 | 
				
			||||||
 | 
					+++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/rtl8366_smi.c
 | 
				
			||||||
@@ -19,6 +19,8 @@
 | 
					@@ -19,6 +19,8 @@
 | 
				
			||||||
 #include <linux/of_platform.h>
 | 
					 #include <linux/of_platform.h>
 | 
				
			||||||
 #include <linux/of_gpio.h>
 | 
					 #include <linux/of_gpio.h>
 | 
				
			||||||
@@ -382,6 +388,18 @@
 | 
				
			|||||||
 int rtl8366_sw_get_vlan_info(struct switch_dev *dev,
 | 
					 int rtl8366_sw_get_vlan_info(struct switch_dev *dev,
 | 
				
			||||||
 			     const struct switch_attr *attr,
 | 
					 			     const struct switch_attr *attr,
 | 
				
			||||||
 			     struct switch_val *val)
 | 
					 			     struct switch_val *val)
 | 
				
			||||||
 | 
					@@ -1207,9 +1428,9 @@ int rtl8366_sw_set_vlan_enable(struct sw
 | 
				
			||||||
 | 
					 	if (attr->ofs > 2)
 | 
				
			||||||
 | 
					 		return -EINVAL;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					-	if (attr->ofs == 1)
 | 
				
			||||||
 | 
					+/*	if (attr->ofs == 1)
 | 
				
			||||||
 | 
					 		err = rtl8366_enable_vlan(smi, val->value.i);
 | 
				
			||||||
 | 
					-	else
 | 
				
			||||||
 | 
					+	else*/
 | 
				
			||||||
 | 
					 		err = rtl8366_enable_vlan4k(smi, val->value.i);
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 	return err;
 | 
				
			||||||
@@ -1237,25 +1458,27 @@ static int __rtl8366_smi_init(struct rtl
 | 
					@@ -1237,25 +1458,27 @@ static int __rtl8366_smi_init(struct rtl
 | 
				
			||||||
 {
 | 
					 {
 | 
				
			||||||
 	int err;
 | 
					 	int err;
 | 
				
			||||||
@@ -526,8 +544,10 @@
 | 
				
			|||||||
 }
 | 
					 }
 | 
				
			||||||
 EXPORT_SYMBOL_GPL(rtl8366_smi_probe);
 | 
					 EXPORT_SYMBOL_GPL(rtl8366_smi_probe);
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
--- a/drivers/net/phy/rtl8367c.c	2023-05-31 15:05:26.928595310 +0800
 | 
					Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/rtl8367c.c
 | 
				
			||||||
+++ b/drivers/net/phy/rtl8367c.c	2023-05-31 15:09:38.943976240 +0800
 | 
					===================================================================
 | 
				
			||||||
 | 
					--- /dev/null
 | 
				
			||||||
 | 
					+++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/rtl8367c.c
 | 
				
			||||||
@@ -0,0 +1,2462 @@
 | 
					@@ -0,0 +1,2462 @@
 | 
				
			||||||
+/*
 | 
					+/*
 | 
				
			||||||
+ * Platform driver for the Realtek RTL8367R-VB/S/C ethernet switches
 | 
					+ * Platform driver for the Realtek RTL8367R-VB/S/C ethernet switches
 | 
				
			||||||
@@ -2432,7 +2452,7 @@
 | 
				
			|||||||
+	data[0] |= (vlan4k->untag & RTL8367B_TA_VLAN0_UNTAG_MASK) <<
 | 
					+	data[0] |= (vlan4k->untag & RTL8367B_TA_VLAN0_UNTAG_MASK) <<
 | 
				
			||||||
+		   RTL8367B_TA_VLAN0_UNTAG_SHIFT;
 | 
					+		   RTL8367B_TA_VLAN0_UNTAG_SHIFT;
 | 
				
			||||||
+	data[1] = (vlan4k->fid & RTL8367B_TA_VLAN1_FID_MASK) <<
 | 
					+	data[1] = (vlan4k->fid & RTL8367B_TA_VLAN1_FID_MASK) <<
 | 
				
			||||||
+		  RTL8367B_TA_VLAN1_FID_SHIFT;
 | 
					+		  RTL8367B_TA_VLAN1_FID_SHIFT | (1 << 14);
 | 
				
			||||||
+
 | 
					+
 | 
				
			||||||
+	for (i = 0; i < ARRAY_SIZE(data); i++)
 | 
					+	for (i = 0; i < ARRAY_SIZE(data); i++)
 | 
				
			||||||
+		REG_WR(smi, RTL8367B_TA_WRDATA_REG(i), data[i]);
 | 
					+		REG_WR(smi, RTL8367B_TA_WRDATA_REG(i), data[i]);
 | 
				
			||||||
@@ -2991,8 +3011,10 @@
 | 
				
			|||||||
+MODULE_LICENSE("GPL v2");
 | 
					+MODULE_LICENSE("GPL v2");
 | 
				
			||||||
+MODULE_ALIAS("platform:" RTL8367B_DRIVER_NAME);
 | 
					+MODULE_ALIAS("platform:" RTL8367B_DRIVER_NAME);
 | 
				
			||||||
+
 | 
					+
 | 
				
			||||||
--- a/include/linux/rtl8367.h	2023-05-31 16:18:04.480612826 +0800
 | 
					Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/include/linux/rtl8367.h
 | 
				
			||||||
+++ b/include/linux/rtl8367.h	2023-05-25 16:18:41.452870197 +0800
 | 
					===================================================================
 | 
				
			||||||
 | 
					--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/include/linux/rtl8367.h
 | 
				
			||||||
 | 
					+++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/include/linux/rtl8367.h
 | 
				
			||||||
@@ -18,6 +18,8 @@ enum rtl8367_port_speed {
 | 
					@@ -18,6 +18,8 @@ enum rtl8367_port_speed {
 | 
				
			||||||
 	RTL8367_PORT_SPEED_10 = 0,
 | 
					 	RTL8367_PORT_SPEED_10 = 0,
 | 
				
			||||||
 	RTL8367_PORT_SPEED_100,
 | 
					 	RTL8367_PORT_SPEED_100,
 | 
				
			||||||
@@ -3016,8 +3038,10 @@
 | 
				
			|||||||
 };
 | 
					 };
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 struct rtl8367_extif_config {
 | 
					 struct rtl8367_extif_config {
 | 
				
			||||||
--- a/drivers/net/phy/mdio-qca.c	2023-05-31 16:18:19.152756159 +0800
 | 
					Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/mdio-qca.c
 | 
				
			||||||
+++ b/drivers/net/phy/mdio-qca.c	2023-05-31 16:21:18.086437571 +0800
 | 
					===================================================================
 | 
				
			||||||
 | 
					--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/drivers/net/phy/mdio-qca.c
 | 
				
			||||||
 | 
					+++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/mdio-qca.c
 | 
				
			||||||
@@ -37,8 +37,9 @@
 | 
					@@ -37,8 +37,9 @@
 | 
				
			||||||
 #define MDIO_CTRL_4_ACCESS_CODE_C45_ADDR	0
 | 
					 #define MDIO_CTRL_4_ACCESS_CODE_C45_ADDR	0
 | 
				
			||||||
 #define MDIO_CTRL_4_ACCESS_CODE_C45_WRITE	1
 | 
					 #define MDIO_CTRL_4_ACCESS_CODE_C45_WRITE	1
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										13
									
								
								feeds/ipq807x/qca-ssdk/patches/400-max_vlan.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								feeds/ipq807x/qca-ssdk/patches/400-max_vlan.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
				
			|||||||
 | 
					Index: qca-ssdk/include/init/ssdk_plat.h
 | 
				
			||||||
 | 
					===================================================================
 | 
				
			||||||
 | 
					--- qca-ssdk.orig/include/init/ssdk_plat.h
 | 
				
			||||||
 | 
					+++ qca-ssdk/include/init/ssdk_plat.h
 | 
				
			||||||
 | 
					@@ -160,7 +160,7 @@
 | 
				
			||||||
 | 
					 #define AR8327_NUM_PHYS                              5
 | 
				
			||||||
 | 
					 #define AR8327_PORT_CPU                              0
 | 
				
			||||||
 | 
					 #define AR8327_NUM_PORTS                             7
 | 
				
			||||||
 | 
					-#define AR8327_MAX_VLANS                             128
 | 
				
			||||||
 | 
					+#define AR8327_MAX_VLANS                             4095
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 #define MII_PHYADDR_C45                              (1<<30)
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
@@ -35,6 +35,8 @@ define Package/qca-thermald-10.4/install
 | 
				
			|||||||
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/install/etc/thermal/ipq-thermald-8064.conf $(1)/etc/thermal
 | 
						$(INSTALL_BIN) $(PKG_BUILD_DIR)/install/etc/thermal/ipq-thermald-8064.conf $(1)/etc/thermal
 | 
				
			||||||
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/install/etc/thermal/ipq-thermald-8066.conf $(1)/etc/thermal
 | 
						$(INSTALL_BIN) $(PKG_BUILD_DIR)/install/etc/thermal/ipq-thermald-8066.conf $(1)/etc/thermal
 | 
				
			||||||
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/install/etc/thermal/ipq-thermald-8069.conf $(1)/etc/thermal
 | 
						$(INSTALL_BIN) $(PKG_BUILD_DIR)/install/etc/thermal/ipq-thermald-8069.conf $(1)/etc/thermal
 | 
				
			||||||
 | 
						$(INSTALL_BIN) $(PKG_BUILD_DIR)/install/etc/thermal/ipq-thermald-cybertan-eww631-a1.conf $(1)/etc/thermal
 | 
				
			||||||
 | 
						$(INSTALL_BIN) $(PKG_BUILD_DIR)/install/etc/thermal/ipq-thermald-cybertan-eww631-b1.conf $(1)/etc/thermal
 | 
				
			||||||
	$(INSTALL_DIR) $(1)/etc/init.d
 | 
						$(INSTALL_DIR) $(1)/etc/init.d
 | 
				
			||||||
	$(INSTALL_BIN) ./files/thermal.init $(1)/etc/init.d/thermal
 | 
						$(INSTALL_BIN) ./files/thermal.init $(1)/etc/init.d/thermal
 | 
				
			||||||
	$(INSTALL_DIR) $(1)/etc/config
 | 
						$(INSTALL_DIR) $(1)/etc/config
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,6 +5,8 @@ START=98
 | 
				
			|||||||
SERVICE_WRITE_PID=1
 | 
					SERVICE_WRITE_PID=1
 | 
				
			||||||
SERVICE_DAEMONIZE=1
 | 
					SERVICE_DAEMONIZE=1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					board=$(board_name)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
start() {
 | 
					start() {
 | 
				
			||||||
	. /lib/functions.sh
 | 
						. /lib/functions.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -14,8 +16,17 @@ start() {
 | 
				
			|||||||
	config_get_bool enabled config 'Enabled' '0'
 | 
						config_get_bool enabled config 'Enabled' '0'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	[ "$enabled" -gt 0 ] || return 1
 | 
						[ "$enabled" -gt 0 ] || return 1
 | 
				
			||||||
 | 
						case "$board" in
 | 
				
			||||||
 | 
						cybertan,eww631-a1)
 | 
				
			||||||
 | 
							service_start /usr/sbin/thermald -c /etc/thermal/ipq-thermald-cybertan-eww631-a1.conf
 | 
				
			||||||
 | 
							;;
 | 
				
			||||||
 | 
						cybertan,eww631-b1)
 | 
				
			||||||
 | 
							service_start /usr/sbin/thermald -c /etc/thermal/ipq-thermald-cybertan-eww631-b1.conf
 | 
				
			||||||
 | 
							;;
 | 
				
			||||||
 | 
						*)
 | 
				
			||||||
		service_start /usr/sbin/thermald
 | 
							service_start /usr/sbin/thermald
 | 
				
			||||||
 | 
							;;
 | 
				
			||||||
 | 
						esac
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
stop() {
 | 
					stop() {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,6 +18,9 @@ endif
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
export CC = $(CROSS)gcc
 | 
					export CC = $(CROSS)gcc
 | 
				
			||||||
export CFLAGS += -O2 -Wall -DIPQ_806x -c
 | 
					export CFLAGS += -O2 -Wall -DIPQ_806x -c
 | 
				
			||||||
 | 
					ifeq ($(SoC),$(filter $(SoC),ipq50xx ipq50xx_64))
 | 
				
			||||||
 | 
					export CFLAGS += -DIPQ_5000
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
export STRIP = $(CROSS)strip
 | 
					export STRIP = $(CROSS)strip
 | 
				
			||||||
export SOURCES= \
 | 
					export SOURCES= \
 | 
				
			||||||
		thermal.c \
 | 
							thermal.c \
 | 
				
			||||||
@@ -63,6 +66,7 @@ install: local
 | 
				
			|||||||
	cp -a -f $(ALL) $(INSTALL_ROOT)/usr/sbin/
 | 
						cp -a -f $(ALL) $(INSTALL_ROOT)/usr/sbin/
 | 
				
			||||||
	mkdir -p $(INSTALL_ROOT)/etc/thermal
 | 
						mkdir -p $(INSTALL_ROOT)/etc/thermal
 | 
				
			||||||
	cp -a -f ipq-thermald-806?.conf $(INSTALL_ROOT)/etc/thermal/
 | 
						cp -a -f ipq-thermald-806?.conf $(INSTALL_ROOT)/etc/thermal/
 | 
				
			||||||
 | 
						cp -a -f ipq-thermald-cybertan-eww631-*.conf $(INSTALL_ROOT)/etc/thermal/
 | 
				
			||||||
	@echo Installed outputs from `pwd`
 | 
						@echo Installed outputs from `pwd`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Remove all generated files
 | 
					# Remove all generated files
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										15
									
								
								feeds/ipq807x/qca-thermald-10.4/src/ipq-thermald-cybertan-eww631-a1.conf
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										15
									
								
								feeds/ipq807x/qca-thermald-10.4/src/ipq-thermald-cybertan-eww631-a1.conf
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,15 @@
 | 
				
			|||||||
 | 
					sampling 5000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[tsens_tz_sensor1]
 | 
				
			||||||
 | 
					sampling 	5000
 | 
				
			||||||
 | 
					thresholds 			105			110			115			119			120
 | 
				
			||||||
 | 
					thresholds_clr		0			100			105			110			115
 | 
				
			||||||
 | 
					actions 			cooling		cooling	 	cooling		cooling		shutdown
 | 
				
			||||||
 | 
					action_info 		35			35	 		50			70			800000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[tsens_tz_sensor4]
 | 
				
			||||||
 | 
					sampling 	5000
 | 
				
			||||||
 | 
					thresholds			105			107			112			119			120
 | 
				
			||||||
 | 
					thresholds_clr		0			100			105			110			115
 | 
				
			||||||
 | 
					actions 			cooling	 	cooling		cooling		cooling		shutdown
 | 
				
			||||||
 | 
					action_info			0			20			30	 		50			800000
 | 
				
			||||||
							
								
								
									
										15
									
								
								feeds/ipq807x/qca-thermald-10.4/src/ipq-thermald-cybertan-eww631-b1.conf
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										15
									
								
								feeds/ipq807x/qca-thermald-10.4/src/ipq-thermald-cybertan-eww631-b1.conf
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,15 @@
 | 
				
			|||||||
 | 
					sampling 5000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[tsens_tz_sensor1]
 | 
				
			||||||
 | 
					sampling 	5000
 | 
				
			||||||
 | 
					thresholds			70			80			90			105			115			120
 | 
				
			||||||
 | 
					thresholds_clr		0			75			85			100			110			113
 | 
				
			||||||
 | 
					actions				cooling		cooling		cooling		cooling		cooling		shutdown
 | 
				
			||||||
 | 
					action_info 		0			25	 		45			65			90			800000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[tsens_tz_sensor4]
 | 
				
			||||||
 | 
					sampling 	5000
 | 
				
			||||||
 | 
					thresholds			70			80			90			105			115			120
 | 
				
			||||||
 | 
					thresholds_clr		0			75			85			100			110			113
 | 
				
			||||||
 | 
					actions 			cooling		cooling		cooling		cooling		cooling		shutdown
 | 
				
			||||||
 | 
					action_info 		0			15			25			45			60			800000
 | 
				
			||||||
@@ -138,7 +138,14 @@ enum therm_msm_id {
 | 
				
			|||||||
	THERM_IPQ_6018,
 | 
						THERM_IPQ_6018,
 | 
				
			||||||
	THERM_IPQ_6028,
 | 
						THERM_IPQ_6028,
 | 
				
			||||||
	THERM_IPQ_6000,
 | 
						THERM_IPQ_6000,
 | 
				
			||||||
	THERM_IPQ_6010
 | 
						THERM_IPQ_6010,
 | 
				
			||||||
 | 
						THERM_IPQ_6005,
 | 
				
			||||||
 | 
						THERM_IPQ_5010,
 | 
				
			||||||
 | 
						THERM_IPQ_5018,
 | 
				
			||||||
 | 
						THERM_IPQ_5028,
 | 
				
			||||||
 | 
						THERM_IPQ_5000,
 | 
				
			||||||
 | 
						THERM_IPQ_0509,
 | 
				
			||||||
 | 
						THERM_IPQ_0518
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
enum therm_msm_id therm_get_msm_id(void);
 | 
					enum therm_msm_id therm_get_msm_id(void);
 | 
				
			||||||
@@ -158,6 +165,9 @@ enum {
 | 
				
			|||||||
#ifdef IPQ_806x
 | 
					#ifdef IPQ_806x
 | 
				
			||||||
	POWERSAVE,
 | 
						POWERSAVE,
 | 
				
			||||||
	NSS_FREQ,
 | 
						NSS_FREQ,
 | 
				
			||||||
 | 
					#ifdef IPQ_5000
 | 
				
			||||||
 | 
						COOLING,
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
	REPORT,
 | 
						REPORT,
 | 
				
			||||||
	LCD,
 | 
						LCD,
 | 
				
			||||||
@@ -311,6 +321,9 @@ int cpufreq_request(int cpu, int requester, int temperature, int frequency);
 | 
				
			|||||||
int powersave_request( int enable );
 | 
					int powersave_request( int enable );
 | 
				
			||||||
int nssfreq_request( int frequency );
 | 
					int nssfreq_request( int frequency );
 | 
				
			||||||
int powerctl_restart(int reset_max);
 | 
					int powerctl_restart(int reset_max);
 | 
				
			||||||
 | 
					#ifdef IPQ_5000
 | 
				
			||||||
 | 
					int cooling_request( int requester, int temperature, int percentage );
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
int report_action(int requester, int temperature, int level, int is_trigger);
 | 
					int report_action(int requester, int temperature, int level, int is_trigger);
 | 
				
			||||||
int lcd_brightness_request(int requester, int temperature, int value);
 | 
					int lcd_brightness_request(int requester, int temperature, int value);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -45,7 +45,7 @@
 | 
				
			|||||||
#define NUM_US_IN_MS        (1000)
 | 
					#define NUM_US_IN_MS        (1000)
 | 
				
			||||||
#define CPU_BUF_MAX         (50)
 | 
					#define CPU_BUF_MAX         (50)
 | 
				
			||||||
#define HOTPLUG_BUF_MAX     (1024)
 | 
					#define HOTPLUG_BUF_MAX     (1024)
 | 
				
			||||||
 | 
					#define SHUTDOWN_BUF_MAX    (100)
 | 
				
			||||||
enum {
 | 
					enum {
 | 
				
			||||||
	MITIGATION_ENABLE = 0,
 | 
						MITIGATION_ENABLE = 0,
 | 
				
			||||||
	MITIGATION_DISABLE = 1
 | 
						MITIGATION_DISABLE = 1
 | 
				
			||||||
@@ -116,6 +116,8 @@ int shutdown_action(int requester, int temperature, int delay)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	static int shutdown_requested = 0;
 | 
						static int shutdown_requested = 0;
 | 
				
			||||||
	int ret = 0;
 | 
						int ret = 0;
 | 
				
			||||||
 | 
						int fd;
 | 
				
			||||||
 | 
						char buf[SHUTDOWN_BUF_MAX] = {0};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (requester < 0 ||
 | 
						if (requester < 0 ||
 | 
				
			||||||
	    requester >= SENSOR_IDX_MAX) {
 | 
						    requester >= SENSOR_IDX_MAX) {
 | 
				
			||||||
@@ -134,6 +136,15 @@ int shutdown_action(int requester, int temperature, int delay)
 | 
				
			|||||||
		    "with %d millisecond delay\n",
 | 
							    "with %d millisecond delay\n",
 | 
				
			||||||
		    SENSOR(requester), temperature, delay);
 | 
							    SENSOR(requester), temperature, delay);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							fd = open("/dev/console", O_RDWR, 0);
 | 
				
			||||||
 | 
							if (fd >= 0)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								snprintf(buf, SHUTDOWN_BUF_MAX, "THERMAL SHUTDOWN: "
 | 
				
			||||||
 | 
									"%s reached temperature %d with %d mSec Delay \n",
 | 
				
			||||||
 | 
									SENSOR(requester), temperature, delay);
 | 
				
			||||||
 | 
								write(fd,buf,SHUTDOWN_BUF_MAX);
 | 
				
			||||||
 | 
								close(fd);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		usleep(delay * NUM_US_IN_MS);
 | 
							usleep(delay * NUM_US_IN_MS);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/* commit buffers to disk and shutdown */
 | 
							/* commit buffers to disk and shutdown */
 | 
				
			||||||
@@ -403,7 +414,7 @@ int cpufreq_init()
 | 
				
			|||||||
		return -1;
 | 
							return -1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	info("Number of cpus :%d\n", num_cpus);
 | 
						info("Number of cpus :%d\n", num_cpus);
 | 
				
			||||||
	memset(online, 0, MAX_CPUS);
 | 
						memset(online, 0, MAX_CPUS * sizeof(int));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for (cpu = 0; cpu < num_cpus; cpu++) {
 | 
						for (cpu = 0; cpu < num_cpus; cpu++) {
 | 
				
			||||||
		snprintf(finfo_buf, MAX_PATH, CPU_SYSFS(FMAX_INFO_NODE), cpu);
 | 
							snprintf(finfo_buf, MAX_PATH, CPU_SYSFS(FMAX_INFO_NODE), cpu);
 | 
				
			||||||
@@ -1384,6 +1395,99 @@ int nssfreq_request(int frequency)
 | 
				
			|||||||
        pthread_mutex_unlock(&nssfreq_set_mtx);
 | 
					        pthread_mutex_unlock(&nssfreq_set_mtx);
 | 
				
			||||||
        return ret;
 | 
					        return ret;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					#ifdef IPQ_5000
 | 
				
			||||||
 | 
					/*===========================================================================
 | 
				
			||||||
 | 
					FUNCTION cooling_request
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Action function to request wlan throttling action
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ARGUMENTS
 | 
				
			||||||
 | 
					        percentage => duty cycle of tx queues suspending
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RETURN VALUE
 | 
				
			||||||
 | 
					        0 on success, -1 on failure.
 | 
				
			||||||
 | 
					===========================================================================*/
 | 
				
			||||||
 | 
					static int cooling_req[2];
 | 
				
			||||||
 | 
					#define COOLING_24G_MITIGATION_SYSFS "/sys/class/thermal/cooling_device0/cur_state"
 | 
				
			||||||
 | 
					#define COOLING_5G_MITIGATION_SYSFS "/sys/class/thermal/cooling_device1/cur_state"
 | 
				
			||||||
 | 
					#define MAX_COOLING_MITIGATION_PERCENTAGE  (90)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static pthread_mutex_t cooling_mtx = PTHREAD_MUTEX_INITIALIZER;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int cooling_request(int requester, int temperature, int percentage )
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						int ret = -1;
 | 
				
			||||||
 | 
						char buf[UINT_BUF_MAX] = {0};
 | 
				
			||||||
 | 
						static int current_24g_percentage, current_5g_percentage;
 | 
				
			||||||
 | 
						char * end_ptr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if ((NULL == COOLING_24G_MITIGATION_SYSFS) || (NULL == COOLING_5G_MITIGATION_SYSFS)) {
 | 
				
			||||||
 | 
							msg("%s: Unsupported action on current target", __func__);
 | 
				
			||||||
 | 
							return -1;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						temperature = RCONV(temperature);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (percentage < 0)
 | 
				
			||||||
 | 
							percentage = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (percentage > MAX_COOLING_MITIGATION_PERCENTAGE)
 | 
				
			||||||
 | 
							percentage = MAX_COOLING_MITIGATION_PERCENTAGE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						pthread_mutex_lock(&cooling_mtx);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (requester == 1) {
 | 
				
			||||||
 | 
						/* get current cooling percentage */
 | 
				
			||||||
 | 
							if (read_line_from_file(COOLING_24G_MITIGATION_SYSFS, buf, UINT_BUF_MAX) > 0) {
 | 
				
			||||||
 | 
								current_24g_percentage = strtol(buf, &end_ptr, 10);
 | 
				
			||||||
 | 
								dbgmsg("current 2g cooling percentage(%d)\n", current_24g_percentage);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							/* Aggregate cooling throttling percentage for 24g */
 | 
				
			||||||
 | 
							cooling_req[requester] = percentage;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (percentage != current_24g_percentage) {
 | 
				
			||||||
 | 
								snprintf(buf, UINT_BUF_MAX, "%d", percentage);
 | 
				
			||||||
 | 
								if (write_to_file(COOLING_24G_MITIGATION_SYSFS, buf, strlen(buf)) > 0) {
 | 
				
			||||||
 | 
									info("ACTION: COOLING - "
 | 
				
			||||||
 | 
									    "Setting 24G COOLING mitigation to %d\n", percentage);
 | 
				
			||||||
 | 
									ret = 0;
 | 
				
			||||||
 | 
								} else {
 | 
				
			||||||
 | 
									msg("Unable to set COOLING mitigation to %d\n", percentage);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								dbgmsg("COOLING mitigation already at %d percentage\n", percentage);
 | 
				
			||||||
 | 
								ret = 0;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						else if (requester == 4) {
 | 
				
			||||||
 | 
						/* get current 5g cooling percentage */
 | 
				
			||||||
 | 
							if (read_line_from_file(COOLING_5G_MITIGATION_SYSFS, buf, UINT_BUF_MAX) > 0) {
 | 
				
			||||||
 | 
								current_5g_percentage = strtol(buf, &end_ptr, 10);
 | 
				
			||||||
 | 
								dbgmsg("current 5g cooling percentage(%d)\n", current_5g_percentage);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							/* Aggregate cooling throttling percentage for 5g */
 | 
				
			||||||
 | 
							cooling_req[requester] = percentage;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (percentage != current_5g_percentage) {
 | 
				
			||||||
 | 
								snprintf(buf, UINT_BUF_MAX, "%d", percentage);
 | 
				
			||||||
 | 
								if (write_to_file(COOLING_5G_MITIGATION_SYSFS, buf, strlen(buf)) > 0) {
 | 
				
			||||||
 | 
									info("ACTION: COOLING - "
 | 
				
			||||||
 | 
									    "Setting 5G COOLING mitigation to %d\n", percentage);
 | 
				
			||||||
 | 
									ret = 0;
 | 
				
			||||||
 | 
								} else {
 | 
				
			||||||
 | 
									msg("Unable to set COOLING mitigation to %d\n", percentage);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								dbgmsg("COOLING mitigation already at %d percentage\n", percentage);
 | 
				
			||||||
 | 
								ret = 0;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						pthread_mutex_unlock(&cooling_mtx);
 | 
				
			||||||
 | 
						return ret;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*===========================================================================
 | 
					/*===========================================================================
 | 
				
			||||||
FUNCTION set_mitigation_level
 | 
					FUNCTION set_mitigation_level
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -43,6 +43,9 @@ static char *action_names[] = {
 | 
				
			|||||||
#ifdef IPQ_806x
 | 
					#ifdef IPQ_806x
 | 
				
			||||||
        "powersave",
 | 
					        "powersave",
 | 
				
			||||||
	"nss",
 | 
						"nss",
 | 
				
			||||||
 | 
					#ifdef IPQ_5000
 | 
				
			||||||
 | 
						"cooling"
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
	"report",
 | 
						"report",
 | 
				
			||||||
	"lcd",
 | 
						"lcd",
 | 
				
			||||||
@@ -337,6 +340,41 @@ def_sensor_setting_t def_cp_setting = {
 | 
				
			|||||||
	.sensors = def_sensor_cp
 | 
						.sensors = def_sensor_cp
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* TODO: Fix desc, id, lvl_trig, lvl_clr */
 | 
				
			||||||
 | 
					sensor_setting_t def_sensor_mp[] = {
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							.desc = "tsens_tz_sensor4",
 | 
				
			||||||
 | 
							.id = 4,
 | 
				
			||||||
 | 
							.disabled = 0, /* Sensor enabled */
 | 
				
			||||||
 | 
							.sampling_period_us = 1000,
 | 
				
			||||||
 | 
							.num_thresholds = 1, /* No. of threshold levels */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							.t = {
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									.lvl_trig = 120,
 | 
				
			||||||
 | 
									.num_actions = 1,
 | 
				
			||||||
 | 
									.actions = {
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											.action = SHUTDOWN,
 | 
				
			||||||
 | 
											.info = 1000
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							/* Internal variables initialized with threshold count */
 | 
				
			||||||
 | 
							._n_thresholds = 1,
 | 
				
			||||||
 | 
							._n_to_clear = 1,
 | 
				
			||||||
 | 
							._n_actions = 1,
 | 
				
			||||||
 | 
							._n_action_info = 1
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def_sensor_setting_t def_mp_setting = {
 | 
				
			||||||
 | 
						.sensor_count = 1,
 | 
				
			||||||
 | 
						.sensors = def_sensor_mp
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* IPQ806x */
 | 
					/* IPQ806x */
 | 
				
			||||||
sensor_setting_t def_ipq8064[] = {
 | 
					sensor_setting_t def_ipq8064[] = {
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
@@ -638,9 +676,19 @@ void update_def_sensor_settings(thermal_setting_t *settings)
 | 
				
			|||||||
		case THERM_IPQ_6028:
 | 
							case THERM_IPQ_6028:
 | 
				
			||||||
		case THERM_IPQ_6000:
 | 
							case THERM_IPQ_6000:
 | 
				
			||||||
		case THERM_IPQ_6010:
 | 
							case THERM_IPQ_6010:
 | 
				
			||||||
 | 
							case THERM_IPQ_6005:
 | 
				
			||||||
			msg("==== IPQ60xx ====\n");
 | 
								msg("==== IPQ60xx ====\n");
 | 
				
			||||||
			def_sensor_setting = &def_cp_setting;
 | 
								def_sensor_setting = &def_cp_setting;
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
 | 
							case THERM_IPQ_5010:
 | 
				
			||||||
 | 
							case THERM_IPQ_5018:
 | 
				
			||||||
 | 
							case THERM_IPQ_5028:
 | 
				
			||||||
 | 
							case THERM_IPQ_5000:
 | 
				
			||||||
 | 
							case THERM_IPQ_0509:
 | 
				
			||||||
 | 
							case THERM_IPQ_0518:
 | 
				
			||||||
 | 
								msg("==== IPQ50xx ====\n");
 | 
				
			||||||
 | 
								def_sensor_setting = &def_mp_setting;
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
		default:
 | 
							default:
 | 
				
			||||||
			msg("==== DEFAULT ===\n");
 | 
								msg("==== DEFAULT ===\n");
 | 
				
			||||||
			def_sensor_setting = &def_hk_setting;
 | 
								def_sensor_setting = &def_hk_setting;
 | 
				
			||||||
@@ -851,6 +899,13 @@ int parse_config(thermal_setting_t *settings, int fd)
 | 
				
			|||||||
				|| settings->soc_id == THERM_IPQ_6000
 | 
									|| settings->soc_id == THERM_IPQ_6000
 | 
				
			||||||
				|| settings->soc_id == THERM_IPQ_6010)
 | 
									|| settings->soc_id == THERM_IPQ_6010)
 | 
				
			||||||
				i = TSENS_TZ_SENSOR4;
 | 
									i = TSENS_TZ_SENSOR4;
 | 
				
			||||||
 | 
								else if ( settings->soc_id == THERM_IPQ_5010
 | 
				
			||||||
 | 
									|| settings->soc_id == THERM_IPQ_5018
 | 
				
			||||||
 | 
									|| settings->soc_id == THERM_IPQ_5028
 | 
				
			||||||
 | 
									|| settings->soc_id == THERM_IPQ_5000
 | 
				
			||||||
 | 
									|| settings->soc_id == THERM_IPQ_0509
 | 
				
			||||||
 | 
									|| settings->soc_id == THERM_IPQ_0518)
 | 
				
			||||||
 | 
									i = TSENS_TZ_SENSOR1;
 | 
				
			||||||
			else
 | 
								else
 | 
				
			||||||
				i = TSENS_TZ_SENSOR0;
 | 
									i = TSENS_TZ_SENSOR0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -73,6 +73,11 @@ static void clear_all_alarms(sensor_setting_t *sensor, int sensor_temp)
 | 
				
			|||||||
		case NSS_FREQ:
 | 
							case NSS_FREQ:
 | 
				
			||||||
                        nssfreq_request(-1);
 | 
					                        nssfreq_request(-1);
 | 
				
			||||||
                        break;
 | 
					                        break;
 | 
				
			||||||
 | 
					#ifdef IPQ_5000
 | 
				
			||||||
 | 
							case COOLING:
 | 
				
			||||||
 | 
								cooling_request(sensor->id, sensor_temp, 0);
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -186,6 +191,11 @@ void *sensor_monitor(void *vsensor)
 | 
				
			|||||||
				case NSS_FREQ:
 | 
									case NSS_FREQ:
 | 
				
			||||||
                                        nssfreq_request(sensor->t[i].actions[j].info);
 | 
					                                        nssfreq_request(sensor->t[i].actions[j].info);
 | 
				
			||||||
                                        break;
 | 
					                                        break;
 | 
				
			||||||
 | 
					#ifdef IPQ_5000
 | 
				
			||||||
 | 
									case COOLING:
 | 
				
			||||||
 | 
					                                        cooling_request(sensor->id, sensor_temp, sensor->t[i].actions[j].info);
 | 
				
			||||||
 | 
					                                        break;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
				case REPORT:
 | 
									case REPORT:
 | 
				
			||||||
                                        if (alarm_raised)
 | 
					                                        if (alarm_raised)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -93,6 +93,14 @@ static therm_msm_soc_type msm_soc_table[] = {
 | 
				
			|||||||
	{THERM_IPQ_6028,   403},
 | 
						{THERM_IPQ_6028,   403},
 | 
				
			||||||
	{THERM_IPQ_6000,   421},
 | 
						{THERM_IPQ_6000,   421},
 | 
				
			||||||
	{THERM_IPQ_6010,   422},
 | 
						{THERM_IPQ_6010,   422},
 | 
				
			||||||
 | 
						{THERM_IPQ_6005,   453},
 | 
				
			||||||
 | 
						/* MP variants */
 | 
				
			||||||
 | 
						{THERM_IPQ_5010,   446},
 | 
				
			||||||
 | 
						{THERM_IPQ_5018,   447},
 | 
				
			||||||
 | 
						{THERM_IPQ_5028,   448},
 | 
				
			||||||
 | 
						{THERM_IPQ_5000,   503},
 | 
				
			||||||
 | 
						{THERM_IPQ_0509,   504},
 | 
				
			||||||
 | 
						{THERM_IPQ_0518,   505},
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int read_id_from_binary_file(char *path, size_t size) {
 | 
					int read_id_from_binary_file(char *path, size_t size) {
 | 
				
			||||||
 
 | 
				
			|||||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -1,3 +1,3 @@
 | 
				
			|||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/m3_fw.b00
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/m3_fw.b00
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/m3_fw.b01
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/m3_fw.b01
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/m3_fw.b02
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/m3_fw.b02
 | 
				
			||||||
 
 | 
				
			|||||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -1,19 +1,23 @@
 | 
				
			|||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b00
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b00
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b01
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b01
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b02
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b02
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b03
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b03
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b04
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b04
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b05
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b05
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b07
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b07
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b08
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b08
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b09
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b09
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b10
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b10
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b11
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b11
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b13
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b13
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b14
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b14
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b15
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b15
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b16
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b16
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b17
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b17
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b18
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b18
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b20
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b20
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b21
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b21
 | 
				
			||||||
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b22
 | 
				
			||||||
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b23
 | 
				
			||||||
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b25
 | 
				
			||||||
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b26
 | 
				
			||||||
 
 | 
				
			|||||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -1,3 +1,3 @@
 | 
				
			|||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/qcn6122/m3_fw.b00
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/qcn6122/m3_fw.b00
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/qcn6122/m3_fw.b01
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/qcn6122/m3_fw.b01
 | 
				
			||||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/qcn6122/m3_fw.b02
 | 
					build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/qcn6122/m3_fw.b02
 | 
				
			||||||
 
 | 
				
			|||||||
										
											Binary file not shown.
										
									
								
							@@ -24,8 +24,6 @@ endef
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ALLWIFIBOARDS:= \
 | 
					ALLWIFIBOARDS:= \
 | 
				
			||||||
	cig-wf188 \
 | 
					 | 
				
			||||||
	cig-wf188n \
 | 
					 | 
				
			||||||
	cig-wf660a \
 | 
						cig-wf660a \
 | 
				
			||||||
	cig-wf194c \
 | 
						cig-wf194c \
 | 
				
			||||||
	cig-wf194c4 \
 | 
						cig-wf194c4 \
 | 
				
			||||||
@@ -127,6 +125,21 @@ $(call Package/ath11k-wifi-default)
 | 
				
			|||||||
    TITLE:=meshpp-s618 bdf
 | 
					    TITLE:=meshpp-s618 bdf
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					define Package/ath11k-wifi-edgecore-oap101
 | 
				
			||||||
 | 
					$(call Package/ath11k-wifi-default)
 | 
				
			||||||
 | 
					    TITLE:=edgecore oap101 bdf
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					define Package/ath11k-wifi-cig-wf188n-ca
 | 
				
			||||||
 | 
					$(call Package/ath11k-wifi-default)
 | 
				
			||||||
 | 
					    TITLE:=cig-wf188n bdf CA
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					define Package/ath11k-wifi-cig-wf188n-us
 | 
				
			||||||
 | 
					$(call Package/ath11k-wifi-default)
 | 
				
			||||||
 | 
					    TITLE:=cig-wf188n bdf US
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define ath11k-wifi-install-one-to
 | 
					define ath11k-wifi-install-one-to
 | 
				
			||||||
  $(INSTALL_DIR)  $(2)/lib/firmware/$(3)/
 | 
					  $(INSTALL_DIR)  $(2)/lib/firmware/$(3)/
 | 
				
			||||||
  $(INSTALL_DATA) $(1) $(2)/lib/firmware/$(3)/board.bin
 | 
					  $(INSTALL_DATA) $(1) $(2)/lib/firmware/$(3)/board.bin
 | 
				
			||||||
@@ -248,8 +261,25 @@ define Package/ath11k-wifi-hfcl-ion4xi/install
 | 
				
			|||||||
	$(INSTALL_DATA) ./board-hfcl-ion4xi.bin.IPQ6018 $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/board-2.bin
 | 
						$(INSTALL_DATA) ./board-hfcl-ion4xi.bin.IPQ6018 $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/board-2.bin
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(eval $(call generate-ath11k-wifi-package,cig-wf188,Cigtech WF188))
 | 
					define Package/ath11k-wifi-edgecore-oap101/install
 | 
				
			||||||
$(eval $(call generate-ath11k-wifi-package,cig-wf188n,Cigtech WF188n))
 | 
						$(INSTALL_DIR) $(1)/lib/firmware/ath11k/IPQ5018/hw1.0/
 | 
				
			||||||
 | 
						$(INSTALL_DIR) $(1)/lib/firmware/ath11k/qcn6122/hw1.0/
 | 
				
			||||||
 | 
						$(INSTALL_DATA) ./board-edgecore-oap101.bin.IPQ5018 $(1)/lib/firmware/ath11k/IPQ5018/hw1.0/board.bin
 | 
				
			||||||
 | 
						$(INSTALL_DATA) ./board-2-edgecore-oap101.bin.QCN6122 $(1)/lib/firmware/ath11k/qcn6122/hw1.0/board-2.bin
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					define Package/ath11k-wifi-cig-wf188n-ca/install
 | 
				
			||||||
 | 
						$(INSTALL_DIR) $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/
 | 
				
			||||||
 | 
						$(INSTALL_DATA) ./board-cig-wf188n-ca.bin.IPQ6018 $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/board.bin
 | 
				
			||||||
 | 
						echo -n 'CA MY DE' > $(1)/lib/firmware/country
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					define Package/ath11k-wifi-cig-wf188n-us/install
 | 
				
			||||||
 | 
						$(INSTALL_DIR) $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/
 | 
				
			||||||
 | 
						$(INSTALL_DATA) ./board-cig-wf188n-us.bin.IPQ6018 $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/board.bin
 | 
				
			||||||
 | 
						echo -n 'US MY DE' > $(1)/lib/firmware/country
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(eval $(call generate-ath11k-wifi-package,cig-wf660a,Cigtech WF660a))
 | 
					$(eval $(call generate-ath11k-wifi-package,cig-wf660a,Cigtech WF660a))
 | 
				
			||||||
$(eval $(call generate-ath11k-wifi-package,cig-wf194c,Cigtech WF194c))
 | 
					$(eval $(call generate-ath11k-wifi-package,cig-wf194c,Cigtech WF194c))
 | 
				
			||||||
$(eval $(call generate-ath11k-wifi-package,cig-wf194c4,Cigtech WF194c4))
 | 
					$(eval $(call generate-ath11k-wifi-package,cig-wf194c4,Cigtech WF194c4))
 | 
				
			||||||
@@ -283,3 +313,6 @@ $(eval $(call BuildPackage,ath11k-wifi-cig-wf196_6g-ca))
 | 
				
			|||||||
$(eval $(call BuildPackage,ath11k-wifi-cig-wf196_6g-us))
 | 
					$(eval $(call BuildPackage,ath11k-wifi-cig-wf196_6g-us))
 | 
				
			||||||
$(eval $(call BuildPackage,ath11k-wifi-motorola-q14))
 | 
					$(eval $(call BuildPackage,ath11k-wifi-motorola-q14))
 | 
				
			||||||
$(eval $(call BuildPackage,ath11k-wifi-hfcl-ion4xi))
 | 
					$(eval $(call BuildPackage,ath11k-wifi-hfcl-ion4xi))
 | 
				
			||||||
 | 
					$(eval $(call BuildPackage,ath11k-wifi-edgecore-oap101))
 | 
				
			||||||
 | 
					$(eval $(call BuildPackage,ath11k-wifi-cig-wf188n-ca))
 | 
				
			||||||
 | 
					$(eval $(call BuildPackage,ath11k-wifi-cig-wf188n-us))
 | 
				
			||||||
 
 | 
				
			|||||||
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								feeds/ipq807x_v5.4/ath11k-wifi/board-cig-wf188n-ca.bin.IPQ6018
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								feeds/ipq807x_v5.4/ath11k-wifi/board-cig-wf188n-ca.bin.IPQ6018
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								feeds/ipq807x_v5.4/ath11k-wifi/board-edgecore-oap101.bin.IPQ5018
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								feeds/ipq807x_v5.4/ath11k-wifi/board-edgecore-oap101.bin.IPQ5018
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -84,6 +84,8 @@ ifneq ($(CONFIG_DRIVER_11AX_SUPPORT),)
 | 
				
			|||||||
  HOSTAPD_IEEE80211AX:=y
 | 
					  HOSTAPD_IEEE80211AX:=y
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CORE_DEPENDS = +libubus +libucode +ucode-mod-fs +ucode-mod-nl80211 +ucode-mod-ubus +ucode-mod-uloop +libblobmsg-json
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DRIVER_MAKEOPTS= \
 | 
					DRIVER_MAKEOPTS= \
 | 
				
			||||||
	CONFIG_ACS=$(CONFIG_PACKAGE_kmod-cfg80211) \
 | 
						CONFIG_ACS=$(CONFIG_PACKAGE_kmod-cfg80211) \
 | 
				
			||||||
	CONFIG_DRIVER_NL80211=$(CONFIG_PACKAGE_kmod-cfg80211) \
 | 
						CONFIG_DRIVER_NL80211=$(CONFIG_PACKAGE_kmod-cfg80211) \
 | 
				
			||||||
@@ -91,6 +93,7 @@ DRIVER_MAKEOPTS= \
 | 
				
			|||||||
	CONFIG_IEEE80211AC=$(HOSTAPD_IEEE80211AC) \
 | 
						CONFIG_IEEE80211AC=$(HOSTAPD_IEEE80211AC) \
 | 
				
			||||||
	CONFIG_IEEE80211AX=$(HOSTAPD_IEEE80211AX) \
 | 
						CONFIG_IEEE80211AX=$(HOSTAPD_IEEE80211AX) \
 | 
				
			||||||
	CONFIG_DRIVER_WEXT=$(CONFIG_DRIVER_WEXT_SUPPORT) \
 | 
						CONFIG_DRIVER_WEXT=$(CONFIG_DRIVER_WEXT_SUPPORT) \
 | 
				
			||||||
 | 
						CONFIG_UCODE=y
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ifeq ($(SSL_VARIANT),openssl)
 | 
					ifeq ($(SSL_VARIANT),openssl)
 | 
				
			||||||
  DRIVER_MAKEOPTS += CONFIG_TLS=openssl CONFIG_SAE=y
 | 
					  DRIVER_MAKEOPTS += CONFIG_TLS=openssl CONFIG_SAE=y
 | 
				
			||||||
@@ -142,7 +145,7 @@ define Package/hostapd/Default
 | 
				
			|||||||
  SUBMENU:=WirelessAPD
 | 
					  SUBMENU:=WirelessAPD
 | 
				
			||||||
  TITLE:=IEEE 802.1x Authenticator
 | 
					  TITLE:=IEEE 802.1x Authenticator
 | 
				
			||||||
  URL:=http://hostap.epitest.fi/
 | 
					  URL:=http://hostap.epitest.fi/
 | 
				
			||||||
  DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
 | 
					  DEPENDS:=$(DRV_DEPENDS) +hostapd-common $(CORE_DEPENDS)
 | 
				
			||||||
  USERID:=network=101:network=101
 | 
					  USERID:=network=101:network=101
 | 
				
			||||||
  PROVIDES:=hostapd
 | 
					  PROVIDES:=hostapd
 | 
				
			||||||
  CONFLICTS:=$(HOSTAPD_PROVIDERS)
 | 
					  CONFLICTS:=$(HOSTAPD_PROVIDERS)
 | 
				
			||||||
@@ -226,7 +229,7 @@ define Package/wpad/Default
 | 
				
			|||||||
  CATEGORY:=Network
 | 
					  CATEGORY:=Network
 | 
				
			||||||
  SUBMENU:=WirelessAPD
 | 
					  SUBMENU:=WirelessAPD
 | 
				
			||||||
  TITLE:=IEEE 802.1x Auth/Supplicant
 | 
					  TITLE:=IEEE 802.1x Auth/Supplicant
 | 
				
			||||||
  DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
 | 
					  DEPENDS:=$(DRV_DEPENDS) +hostapd-common $(CORE_DEPENDS)
 | 
				
			||||||
  USERID:=network=101:network=101
 | 
					  USERID:=network=101:network=101
 | 
				
			||||||
  URL:=http://hostap.epitest.fi/
 | 
					  URL:=http://hostap.epitest.fi/
 | 
				
			||||||
  PROVIDES:=hostapd wpa-supplicant
 | 
					  PROVIDES:=hostapd wpa-supplicant
 | 
				
			||||||
@@ -341,7 +344,7 @@ define Package/wpa-supplicant/Default
 | 
				
			|||||||
  SUBMENU:=WirelessAPD
 | 
					  SUBMENU:=WirelessAPD
 | 
				
			||||||
  TITLE:=WPA Supplicant
 | 
					  TITLE:=WPA Supplicant
 | 
				
			||||||
  URL:=http://hostap.epitest.fi/wpa_supplicant/
 | 
					  URL:=http://hostap.epitest.fi/wpa_supplicant/
 | 
				
			||||||
  DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
 | 
					  DEPENDS:=$(DRV_DEPENDS) +hostapd-common $(CORE_DEPENDS)
 | 
				
			||||||
  USERID:=network=101:network=101
 | 
					  USERID:=network=101:network=101
 | 
				
			||||||
  PROVIDES:=wpa-supplicant
 | 
					  PROVIDES:=wpa-supplicant
 | 
				
			||||||
  CONFLICTS:=$(SUPPLICANT_PROVIDERS)
 | 
					  CONFLICTS:=$(SUPPLICANT_PROVIDERS)
 | 
				
			||||||
@@ -446,7 +449,7 @@ define Package/eapol-test/Default
 | 
				
			|||||||
  SECTION:=net
 | 
					  SECTION:=net
 | 
				
			||||||
  SUBMENU:=WirelessAPD
 | 
					  SUBMENU:=WirelessAPD
 | 
				
			||||||
  CATEGORY:=Network
 | 
					  CATEGORY:=Network
 | 
				
			||||||
  DEPENDS:=$(DRV_DEPENDS) +libubus
 | 
					  DEPENDS:=$(DRV_DEPENDS) $(CORE_DEPENDS)
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Package/eapol-test
 | 
					define Package/eapol-test
 | 
				
			||||||
@@ -503,7 +506,7 @@ TARGET_CPPFLAGS := \
 | 
				
			|||||||
	$(if $(CONFIG_WPA_MSG_MIN_PRIORITY),-DCONFIG_MSG_MIN_PRIORITY=$(CONFIG_WPA_MSG_MIN_PRIORITY))
 | 
						$(if $(CONFIG_WPA_MSG_MIN_PRIORITY),-DCONFIG_MSG_MIN_PRIORITY=$(CONFIG_WPA_MSG_MIN_PRIORITY))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
 | 
					TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
 | 
				
			||||||
TARGET_LDFLAGS += -Wl,--gc-sections -flto=jobserver -fuse-linker-plugin -lubox -lubus
 | 
					TARGET_LDFLAGS += -Wl,--gc-sections -flto=jobserver -fuse-linker-plugin -lubox -lubus -lucode
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ifdef CONFIG_PACKAGE_kmod-cfg80211
 | 
					ifdef CONFIG_PACKAGE_kmod-cfg80211
 | 
				
			||||||
  TARGET_LDFLAGS += -lm -lnl-tiny
 | 
					  TARGET_LDFLAGS += -lm -lnl-tiny
 | 
				
			||||||
@@ -587,20 +590,24 @@ define Build/Compile
 | 
				
			|||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Install/hostapd
 | 
					define Install/hostapd
 | 
				
			||||||
	$(INSTALL_DIR) $(1)/usr/sbin
 | 
						$(INSTALL_DIR) $(1)/usr/sbin $(1)/usr/share/hostap
 | 
				
			||||||
 | 
						$(INSTALL_DATA) ./files/hostapd.uc $(1)/usr/share/hostap/
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Install/supplicant
 | 
					define Install/supplicant
 | 
				
			||||||
	$(INSTALL_DIR) $(1)/usr/sbin
 | 
						$(INSTALL_DIR) $(1)/usr/sbin $(1)/usr/share/hostap
 | 
				
			||||||
 | 
						$(INSTALL_DATA) ./files/wpa_supplicant.uc $(1)/usr/share/hostap/
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Package/hostapd-common/install
 | 
					define Package/hostapd-common/install
 | 
				
			||||||
	$(INSTALL_DIR) $(1)/etc/capabilities $(1)/etc/rc.button $(1)/etc/hotplug.d/ieee80211 $(1)/etc/init.d $(1)/lib/netifd  $(1)/usr/share/acl.d
 | 
						$(INSTALL_DIR) $(1)/etc/capabilities $(1)/etc/rc.button $(1)/etc/hotplug.d/ieee80211 $(1)/etc/init.d $(1)/lib/netifd  $(1)/usr/share/acl.d $(1)/usr/share/hostap
 | 
				
			||||||
	$(INSTALL_DATA) ./files/hostapd.sh $(1)/lib/netifd/hostapd.sh
 | 
						$(INSTALL_DATA) ./files/hostapd.sh $(1)/lib/netifd/hostapd.sh
 | 
				
			||||||
	$(INSTALL_BIN) ./files/wpad.init $(1)/etc/init.d/wpad
 | 
						$(INSTALL_BIN) ./files/wpad.init $(1)/etc/init.d/wpad
 | 
				
			||||||
	$(INSTALL_BIN) ./files/wps-hotplug.sh $(1)/etc/rc.button/wps
 | 
						$(INSTALL_BIN) ./files/wps-hotplug.sh $(1)/etc/rc.button/wps
 | 
				
			||||||
	$(INSTALL_DATA) ./files/wpad_acl.json $(1)/usr/share/acl.d
 | 
						$(INSTALL_DATA) ./files/wpad_acl.json $(1)/usr/share/acl.d
 | 
				
			||||||
	$(INSTALL_DATA) ./files/wpad.json $(1)/etc/capabilities
 | 
						$(INSTALL_DATA) ./files/wpad.json $(1)/etc/capabilities
 | 
				
			||||||
 | 
						$(INSTALL_DATA) ./files/common.uc $(1)/usr/share/hostap/
 | 
				
			||||||
 | 
						$(INSTALL_DATA) ./files/wdev.uc $(1)/usr/share/hostap/
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Package/hostapd/install
 | 
					define Package/hostapd/install
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										318
									
								
								feeds/ipq807x_v5.4/hostapd/files/common.uc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										318
									
								
								feeds/ipq807x_v5.4/hostapd/files/common.uc
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,318 @@
 | 
				
			|||||||
 | 
					import * as nl80211 from "nl80211";
 | 
				
			||||||
 | 
					import * as rtnl from "rtnl";
 | 
				
			||||||
 | 
					import { readfile, glob, basename, readlink } from "fs";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const iftypes = {
 | 
				
			||||||
 | 
						ap: nl80211.const.NL80211_IFTYPE_AP,
 | 
				
			||||||
 | 
						mesh: nl80211.const.NL80211_IFTYPE_MESH_POINT,
 | 
				
			||||||
 | 
						sta: nl80211.const.NL80211_IFTYPE_STATION,
 | 
				
			||||||
 | 
						adhoc: nl80211.const.NL80211_IFTYPE_ADHOC,
 | 
				
			||||||
 | 
						monitor: nl80211.const.NL80211_IFTYPE_MONITOR,
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function wdev_remove(name)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						nl80211.request(nl80211.const.NL80211_CMD_DEL_INTERFACE, 0, { dev: name });
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function __phy_is_fullmac(phyidx)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let data = nl80211.request(nl80211.const.NL80211_CMD_GET_WIPHY, 0, { wiphy: phyidx });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return !data.software_iftypes.ap_vlan;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function phy_is_fullmac(phy)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let phyidx = int(trim(readfile(`/sys/class/ieee80211/${phy}/index`)));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return __phy_is_fullmac(phyidx);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function find_reusable_wdev(phyidx)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (!__phy_is_fullmac(phyidx))
 | 
				
			||||||
 | 
							return null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let data = nl80211.request(
 | 
				
			||||||
 | 
							nl80211.const.NL80211_CMD_GET_INTERFACE,
 | 
				
			||||||
 | 
							nl80211.const.NLM_F_DUMP,
 | 
				
			||||||
 | 
							{ wiphy: phyidx });
 | 
				
			||||||
 | 
						for (let res in data)
 | 
				
			||||||
 | 
							if (trim(readfile(`/sys/class/net/${res.ifname}/operstate`)) == "down")
 | 
				
			||||||
 | 
								return res.ifname;
 | 
				
			||||||
 | 
						return null;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function wdev_create(phy, name, data)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let phyidx = int(readfile(`/sys/class/ieee80211/${phy}/index`));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						wdev_remove(name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!iftypes[data.mode])
 | 
				
			||||||
 | 
							return `Invalid mode: ${data.mode}`;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let req = {
 | 
				
			||||||
 | 
							wiphy: phyidx,
 | 
				
			||||||
 | 
							ifname: name,
 | 
				
			||||||
 | 
							iftype: iftypes[data.mode],
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (data["4addr"])
 | 
				
			||||||
 | 
							req["4addr"] = data["4addr"];
 | 
				
			||||||
 | 
						if (data.macaddr)
 | 
				
			||||||
 | 
							req.mac = data.macaddr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						nl80211.error();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let reuse_ifname = find_reusable_wdev(phyidx);
 | 
				
			||||||
 | 
						if (reuse_ifname &&
 | 
				
			||||||
 | 
						    (reuse_ifname == name ||
 | 
				
			||||||
 | 
						     rtnl.request(rtnl.const.RTM_SETLINK, 0, { dev: reuse_ifname, ifname: name}) != false))
 | 
				
			||||||
 | 
							nl80211.request(
 | 
				
			||||||
 | 
								nl80211.const.NL80211_CMD_SET_INTERFACE, 0, {
 | 
				
			||||||
 | 
									wiphy: phyidx,
 | 
				
			||||||
 | 
									dev: name,
 | 
				
			||||||
 | 
									iftype: iftypes[data.mode],
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							nl80211.request(
 | 
				
			||||||
 | 
								nl80211.const.NL80211_CMD_NEW_INTERFACE,
 | 
				
			||||||
 | 
								nl80211.const.NLM_F_CREATE,
 | 
				
			||||||
 | 
								req);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let error = nl80211.error();
 | 
				
			||||||
 | 
						if (error)
 | 
				
			||||||
 | 
							return error;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (data.powersave != null) {
 | 
				
			||||||
 | 
							nl80211.request(nl80211.const.NL80211_CMD_SET_POWER_SAVE, 0,
 | 
				
			||||||
 | 
								{ dev: name, ps_state: data.powersave ? 1 : 0});
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return null;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function phy_sysfs_file(phy, name)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return trim(readfile(`/sys/class/ieee80211/${phy}/${name}`));
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function macaddr_split(str)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return map(split(str, ":"), (val) => hex(val));
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function macaddr_join(addr)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return join(":", map(addr, (val) => sprintf("%02x", val)));
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function wdev_macaddr(wdev)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return trim(readfile(`/sys/class/net/${wdev}/address`));
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const phy_proto = {
 | 
				
			||||||
 | 
						macaddr_init: function(used, options) {
 | 
				
			||||||
 | 
							this.macaddr_options = options ?? {};
 | 
				
			||||||
 | 
							this.macaddr_list = {};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (type(used) == "object")
 | 
				
			||||||
 | 
								for (let addr in used)
 | 
				
			||||||
 | 
									this.macaddr_list[addr] = used[addr];
 | 
				
			||||||
 | 
							else
 | 
				
			||||||
 | 
								for (let addr in used)
 | 
				
			||||||
 | 
									this.macaddr_list[addr] = -1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							this.for_each_wdev((wdev) => {
 | 
				
			||||||
 | 
								let macaddr = wdev_macaddr(wdev);
 | 
				
			||||||
 | 
								this.macaddr_list[macaddr] ??= -1;
 | 
				
			||||||
 | 
							});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							return this.macaddr_list;
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						macaddr_generate: function(data) {
 | 
				
			||||||
 | 
							let phy = this.name;
 | 
				
			||||||
 | 
							let idx = int(data.id ?? 0);
 | 
				
			||||||
 | 
							let mbssid = int(data.mbssid ?? 0) > 0;
 | 
				
			||||||
 | 
							let num_global = int(data.num_global ?? 1);
 | 
				
			||||||
 | 
							let use_global = !mbssid && idx < num_global;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							let base_addr = phy_sysfs_file(phy, "macaddress");
 | 
				
			||||||
 | 
							if (!base_addr)
 | 
				
			||||||
 | 
								return null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (!idx && !mbssid)
 | 
				
			||||||
 | 
								return base_addr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							let base_mask = phy_sysfs_file(phy, "address_mask");
 | 
				
			||||||
 | 
							if (!base_mask)
 | 
				
			||||||
 | 
								return null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (base_mask == "00:00:00:00:00:00" && idx >= num_global) {
 | 
				
			||||||
 | 
								let addrs = split(phy_sysfs_file(phy, "addresses"), "\n");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (idx < length(addrs))
 | 
				
			||||||
 | 
									return addrs[idx];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								base_mask = "ff:ff:ff:ff:ff:ff";
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							let addr = macaddr_split(base_addr);
 | 
				
			||||||
 | 
							let mask = macaddr_split(base_mask);
 | 
				
			||||||
 | 
							let type;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (mbssid)
 | 
				
			||||||
 | 
								type = "b5";
 | 
				
			||||||
 | 
							else if (use_global)
 | 
				
			||||||
 | 
								type = "add";
 | 
				
			||||||
 | 
							else if (mask[0] > 0)
 | 
				
			||||||
 | 
								type = "b1";
 | 
				
			||||||
 | 
							else if (mask[5] < 0xff)
 | 
				
			||||||
 | 
								type = "b5";
 | 
				
			||||||
 | 
							else
 | 
				
			||||||
 | 
								type = "add";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							switch (type) {
 | 
				
			||||||
 | 
							case "b1":
 | 
				
			||||||
 | 
								if (!(addr[0] & 2))
 | 
				
			||||||
 | 
									idx--;
 | 
				
			||||||
 | 
								addr[0] |= 2;
 | 
				
			||||||
 | 
								addr[0] ^= idx << 2;
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
 | 
							case "b5":
 | 
				
			||||||
 | 
								if (mbssid)
 | 
				
			||||||
 | 
									addr[0] |= 2;
 | 
				
			||||||
 | 
								addr[5] ^= idx;
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
 | 
							default:
 | 
				
			||||||
 | 
								for (let i = 5; i > 0; i--) {
 | 
				
			||||||
 | 
									addr[i] += idx;
 | 
				
			||||||
 | 
									if (addr[i] < 256)
 | 
				
			||||||
 | 
										break;
 | 
				
			||||||
 | 
									addr[i] %= 256;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							return macaddr_join(addr);
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						macaddr_next: function(val) {
 | 
				
			||||||
 | 
							let data = this.macaddr_options ?? {};
 | 
				
			||||||
 | 
							let list = this.macaddr_list;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							for (let i = 0; i < 32; i++) {
 | 
				
			||||||
 | 
								data.id = i;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								let mac = this.macaddr_generate(data);
 | 
				
			||||||
 | 
								if (!mac)
 | 
				
			||||||
 | 
									return null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (list[mac] != null)
 | 
				
			||||||
 | 
									continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								list[mac] = val != null ? val : -1;
 | 
				
			||||||
 | 
								return mac;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for_each_wdev: function(cb) {
 | 
				
			||||||
 | 
							let wdevs = glob(`/sys/class/ieee80211/${this.name}/device/net/*`);
 | 
				
			||||||
 | 
							wdevs = map(wdevs, (arg) => basename(arg));
 | 
				
			||||||
 | 
							for (let wdev in wdevs) {
 | 
				
			||||||
 | 
								if (basename(readlink(`/sys/class/net/${wdev}/phy80211`)) != this.name)
 | 
				
			||||||
 | 
									continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								cb(wdev);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function phy_open(phy)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let phyidx = readfile(`/sys/class/ieee80211/${phy}/index`);
 | 
				
			||||||
 | 
						if (!phyidx)
 | 
				
			||||||
 | 
							return null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return proto({
 | 
				
			||||||
 | 
							name: phy,
 | 
				
			||||||
 | 
							idx: int(phyidx)
 | 
				
			||||||
 | 
						}, phy_proto);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const vlist_proto = {
 | 
				
			||||||
 | 
						update: function(values, arg) {
 | 
				
			||||||
 | 
							let data = this.data;
 | 
				
			||||||
 | 
							let cb = this.cb;
 | 
				
			||||||
 | 
							let seq = { };
 | 
				
			||||||
 | 
							let new_data = {};
 | 
				
			||||||
 | 
							let old_data = {};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							this.data = new_data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (type(values) == "object") {
 | 
				
			||||||
 | 
								for (let key in values) {
 | 
				
			||||||
 | 
									old_data[key] = data[key];
 | 
				
			||||||
 | 
									new_data[key] = values[key];
 | 
				
			||||||
 | 
									delete data[key];
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								for (let val in values) {
 | 
				
			||||||
 | 
									let cur_key = val[0];
 | 
				
			||||||
 | 
									let cur_obj = val[1];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									old_data[cur_key] = data[cur_key];
 | 
				
			||||||
 | 
									new_data[cur_key] = val[1];
 | 
				
			||||||
 | 
									delete data[cur_key];
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							for (let key in data) {
 | 
				
			||||||
 | 
								cb(null, data[key], arg);
 | 
				
			||||||
 | 
								delete data[key];
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							for (let key in new_data)
 | 
				
			||||||
 | 
								cb(new_data[key], old_data[key], arg);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function is_equal(val1, val2) {
 | 
				
			||||||
 | 
						let t1 = type(val1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (t1 != type(val2))
 | 
				
			||||||
 | 
							return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (t1 == "array") {
 | 
				
			||||||
 | 
							if (length(val1) != length(val2))
 | 
				
			||||||
 | 
								return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							for (let i = 0; i < length(val1); i++)
 | 
				
			||||||
 | 
								if (!is_equal(val1[i], val2[i]))
 | 
				
			||||||
 | 
									return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							return true;
 | 
				
			||||||
 | 
						} else if (t1 == "object") {
 | 
				
			||||||
 | 
							for (let key in val1)
 | 
				
			||||||
 | 
								if (!is_equal(val1[key], val2[key]))
 | 
				
			||||||
 | 
									return false;
 | 
				
			||||||
 | 
							for (let key in val2)
 | 
				
			||||||
 | 
								if (val1[key] == null)
 | 
				
			||||||
 | 
									return false;
 | 
				
			||||||
 | 
							return true;
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							return val1 == val2;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function vlist_new(cb) {
 | 
				
			||||||
 | 
						return proto({
 | 
				
			||||||
 | 
								cb: cb,
 | 
				
			||||||
 | 
								data: {}
 | 
				
			||||||
 | 
							}, vlist_proto);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export { wdev_remove, wdev_create, is_equal, vlist_new, phy_is_fullmac, phy_open };
 | 
				
			||||||
@@ -725,8 +725,7 @@ hostapd_set_bss_options() {
 | 
				
			|||||||
		[ -n "$wpa_strict_rekey" ] && append bss_conf "wpa_strict_rekey=$wpa_strict_rekey" "$N"
 | 
							[ -n "$wpa_strict_rekey" ] && append bss_conf "wpa_strict_rekey=$wpa_strict_rekey" "$N"
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	set_default nasid "${macaddr//\:}"
 | 
						[ -n "$nasid" ] && append bss_conf "nas_identifier=$nasid" "$N"
 | 
				
			||||||
	append bss_conf "nas_identifier=$nasid" "$N"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	[ -n "$acct_server" ] && {
 | 
						[ -n "$acct_server" ] && {
 | 
				
			||||||
		append bss_conf "acct_server_addr=$acct_server" "$N"
 | 
							append bss_conf "acct_server_addr=$acct_server" "$N"
 | 
				
			||||||
@@ -772,9 +771,9 @@ hostapd_set_bss_options() {
 | 
				
			|||||||
			# Here we make the assumption that if we're in open mode
 | 
								# Here we make the assumption that if we're in open mode
 | 
				
			||||||
			# with WPS enabled, we got to be in unconfigured state.
 | 
								# with WPS enabled, we got to be in unconfigured state.
 | 
				
			||||||
			wps_not_configured=1
 | 
								wps_not_configured=1
 | 
				
			||||||
 | 
								vlan_possible=1
 | 
				
			||||||
			[ "$macfilter" = radius ] && {
 | 
								[ "$macfilter" = radius ] && {
 | 
				
			||||||
				append_radius_server
 | 
									append_radius_server
 | 
				
			||||||
				vlan_possible=1
 | 
					 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
		psk|sae|psk-sae)
 | 
							psk|sae|psk-sae)
 | 
				
			||||||
@@ -1203,9 +1202,6 @@ hostapd_set_bss_options() {
 | 
				
			|||||||
		append bss_conf "$val" "$N"
 | 
							append bss_conf "$val" "$N"
 | 
				
			||||||
	done
 | 
						done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	bss_md5sum=$(echo $bss_conf | md5sum | cut -d" " -f1)
 | 
					 | 
				
			||||||
	append bss_conf "config_id=$bss_md5sum" "$N"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	append "$var" "$bss_conf" "$N"
 | 
						append "$var" "$bss_conf" "$N"
 | 
				
			||||||
	return 0
 | 
						return 0
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										809
									
								
								feeds/ipq807x_v5.4/hostapd/files/hostapd.uc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										809
									
								
								feeds/ipq807x_v5.4/hostapd/files/hostapd.uc
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,809 @@
 | 
				
			|||||||
 | 
					let libubus = require("ubus");
 | 
				
			||||||
 | 
					import { open, readfile } from "fs";
 | 
				
			||||||
 | 
					import { wdev_create, wdev_remove, is_equal, vlist_new, phy_is_fullmac, phy_open } from "common";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					let ubus = libubus.connect();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					hostapd.data.config = {};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					hostapd.data.file_fields = {
 | 
				
			||||||
 | 
						vlan_file: true,
 | 
				
			||||||
 | 
						wpa_psk_file: true,
 | 
				
			||||||
 | 
						accept_mac_file: true,
 | 
				
			||||||
 | 
						deny_mac_file: true,
 | 
				
			||||||
 | 
						eap_user_file: true,
 | 
				
			||||||
 | 
						ca_cert: true,
 | 
				
			||||||
 | 
						server_cert: true,
 | 
				
			||||||
 | 
						server_cert2: true,
 | 
				
			||||||
 | 
						private_key: true,
 | 
				
			||||||
 | 
						private_key2: true,
 | 
				
			||||||
 | 
						dh_file: true,
 | 
				
			||||||
 | 
						eap_sim_db: true,
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function iface_remove(cfg)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (!cfg || !cfg.bss || !cfg.bss[0] || !cfg.bss[0].ifname)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						hostapd.remove_iface(cfg.bss[0].ifname);
 | 
				
			||||||
 | 
						for (let bss in cfg.bss)
 | 
				
			||||||
 | 
							wdev_remove(bss.ifname);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function iface_gen_config(phy, config, start_disabled)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let str = `data:
 | 
				
			||||||
 | 
					${join("\n", config.radio.data)}
 | 
				
			||||||
 | 
					channel=${config.radio.channel}
 | 
				
			||||||
 | 
					`;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (let i = 0; i < length(config.bss); i++) {
 | 
				
			||||||
 | 
							let bss = config.bss[i];
 | 
				
			||||||
 | 
							let type = i > 0 ? "bss" : "interface";
 | 
				
			||||||
 | 
							let nasid = bss.nasid ?? replace(bss.bssid, ":", "");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							str += `
 | 
				
			||||||
 | 
					${type}=${bss.ifname}
 | 
				
			||||||
 | 
					bssid=${bss.bssid}
 | 
				
			||||||
 | 
					${join("\n", bss.data)}
 | 
				
			||||||
 | 
					nas_identifier=${nasid}
 | 
				
			||||||
 | 
					`;
 | 
				
			||||||
 | 
							if (start_disabled)
 | 
				
			||||||
 | 
								str += `
 | 
				
			||||||
 | 
					start_disabled=1
 | 
				
			||||||
 | 
					`;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return str;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function iface_freq_info(iface, config, params)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let freq = params.frequency;
 | 
				
			||||||
 | 
						if (!freq)
 | 
				
			||||||
 | 
							return null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let sec_offset = params.sec_chan_offset;
 | 
				
			||||||
 | 
						if (sec_offset != -1 && sec_offset != 1)
 | 
				
			||||||
 | 
							sec_offset = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let width = 0;
 | 
				
			||||||
 | 
						for (let line in config.radio.data) {
 | 
				
			||||||
 | 
							if (!sec_offset && match(line, /^ht_capab=.*HT40/)) {
 | 
				
			||||||
 | 
								sec_offset = null; // auto-detect
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							let val = match(line, /^(vht_oper_chwidth|he_oper_chwidth)=(\d+)/);
 | 
				
			||||||
 | 
							if (!val)
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							val = int(val[2]);
 | 
				
			||||||
 | 
							if (val > width)
 | 
				
			||||||
 | 
								width = val;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (freq < 4000)
 | 
				
			||||||
 | 
							width = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return hostapd.freq_info(freq, sec_offset, width);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function iface_add(phy, config, phy_status)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let config_inline = iface_gen_config(phy, config, !!phy_status);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let bss = config.bss[0];
 | 
				
			||||||
 | 
						let ret = hostapd.add_iface(`bss_config=${bss.ifname}:${config_inline}`);
 | 
				
			||||||
 | 
						if (ret < 0)
 | 
				
			||||||
 | 
							return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!phy_status)
 | 
				
			||||||
 | 
							return true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let iface = hostapd.interfaces[bss.ifname];
 | 
				
			||||||
 | 
						if (!iface)
 | 
				
			||||||
 | 
							return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let freq_info = iface_freq_info(iface, config, phy_status);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return iface.start(freq_info) >= 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function iface_config_macaddr_list(config)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let macaddr_list = {};
 | 
				
			||||||
 | 
						for (let i = 0; i < length(config.bss); i++) {
 | 
				
			||||||
 | 
							let bss = config.bss[i];
 | 
				
			||||||
 | 
							if (!bss.default_macaddr)
 | 
				
			||||||
 | 
								macaddr_list[bss.bssid] = i;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return macaddr_list;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function iface_restart(phydev, config, old_config)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let phy = phydev.name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						iface_remove(old_config);
 | 
				
			||||||
 | 
						iface_remove(config);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!config.bss || !config.bss[0]) {
 | 
				
			||||||
 | 
							hostapd.printf(`No bss for phy ${phy}`);
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						phydev.macaddr_init(iface_config_macaddr_list(config));
 | 
				
			||||||
 | 
						for (let i = 0; i < length(config.bss); i++) {
 | 
				
			||||||
 | 
							let bss = config.bss[i];
 | 
				
			||||||
 | 
							if (bss.default_macaddr)
 | 
				
			||||||
 | 
								bss.bssid = phydev.macaddr_next();
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let bss = config.bss[0];
 | 
				
			||||||
 | 
						let err = wdev_create(phy, bss.ifname, { mode: "ap" });
 | 
				
			||||||
 | 
						if (err)
 | 
				
			||||||
 | 
							hostapd.printf(`Failed to create ${bss.ifname} on phy ${phy}: ${err}`);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let ubus = hostapd.data.ubus;
 | 
				
			||||||
 | 
						let phy_status = ubus.call("wpa_supplicant", "phy_status", { phy: phy });
 | 
				
			||||||
 | 
						if (phy_status && phy_status.state == "COMPLETED") {
 | 
				
			||||||
 | 
							if (iface_add(phy, config, phy_status))
 | 
				
			||||||
 | 
								return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							hostapd.printf(`Failed to bring up phy ${phy} ifname=${bss.ifname} with supplicant provided frequency`);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						ubus.call("wpa_supplicant", "phy_set_state", { phy: phy, stop: true });
 | 
				
			||||||
 | 
						if (!iface_add(phy, config))
 | 
				
			||||||
 | 
							hostapd.printf(`hostapd.add_iface failed for phy ${phy} ifname=${bss.ifname}`);
 | 
				
			||||||
 | 
						ubus.call("wpa_supplicant", "phy_set_state", { phy: phy, stop: false });
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function array_to_obj(arr, key, start)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let obj = {};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						start ??= 0;
 | 
				
			||||||
 | 
						for (let i = start; i < length(arr); i++) {
 | 
				
			||||||
 | 
							let cur = arr[i];
 | 
				
			||||||
 | 
							obj[cur[key]] = cur;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return obj;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function find_array_idx(arr, key, val)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						for (let i = 0; i < length(arr); i++)
 | 
				
			||||||
 | 
							if (arr[i][key] == val)
 | 
				
			||||||
 | 
								return i;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return -1;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function bss_reload_psk(bss, config, old_config)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (is_equal(old_config.hash.wpa_psk_file, config.hash.wpa_psk_file))
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						old_config.hash.wpa_psk_file = config.hash.wpa_psk_file;
 | 
				
			||||||
 | 
						if (!is_equal(old_config, config))
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let ret = bss.ctrl("RELOAD_WPA_PSK");
 | 
				
			||||||
 | 
						ret ??= "failed";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						hostapd.printf(`Reload WPA PSK file for bss ${config.ifname}: ${ret}`);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function remove_file_fields(config)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return filter(config, (line) => !hostapd.data.file_fields[split(line, "=")[0]]);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function bss_remove_file_fields(config)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let new_cfg = {};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (let key in config)
 | 
				
			||||||
 | 
							new_cfg[key] = config[key];
 | 
				
			||||||
 | 
						new_cfg.data = remove_file_fields(new_cfg.data);
 | 
				
			||||||
 | 
						new_cfg.hash = {};
 | 
				
			||||||
 | 
						for (let key in config.hash)
 | 
				
			||||||
 | 
							new_cfg.hash[key] = config.hash[key];
 | 
				
			||||||
 | 
						delete new_cfg.hash.wpa_psk_file;
 | 
				
			||||||
 | 
						delete new_cfg.hash.vlan_file;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return new_cfg;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function bss_config_hash(config)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return hostapd.sha1(remove_file_fields(config) + "");
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function bss_find_existing(config, prev_config, prev_hash)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let hash = bss_config_hash(config.data);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (let i = 0; i < length(prev_config.bss); i++) {
 | 
				
			||||||
 | 
							if (!prev_hash[i] || hash != prev_hash[i])
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							prev_hash[i] = null;
 | 
				
			||||||
 | 
							return i;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return -1;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function get_config_bss(config, idx)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (!config.bss[idx]) {
 | 
				
			||||||
 | 
							hostapd.printf(`Invalid bss index ${idx}`);
 | 
				
			||||||
 | 
							return null;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let ifname = config.bss[idx].ifname;
 | 
				
			||||||
 | 
						if (!ifname)
 | 
				
			||||||
 | 
							hostapd.printf(`Could not find bss ${config.bss[idx].ifname}`);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return hostapd.bss[ifname];
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function iface_reload_config(phydev, config, old_config)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let phy = phydev.name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!old_config || !is_equal(old_config.radio, config.radio))
 | 
				
			||||||
 | 
							return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (is_equal(old_config.bss, config.bss))
 | 
				
			||||||
 | 
							return true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!old_config.bss || !old_config.bss[0])
 | 
				
			||||||
 | 
							return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let iface_name = old_config.bss[0].ifname;
 | 
				
			||||||
 | 
						let iface = hostapd.interfaces[iface_name];
 | 
				
			||||||
 | 
						if (!iface) {
 | 
				
			||||||
 | 
							hostapd.printf(`Could not find previous interface ${iface_name}`);
 | 
				
			||||||
 | 
							return false;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let first_bss = hostapd.bss[iface_name];
 | 
				
			||||||
 | 
						if (!first_bss) {
 | 
				
			||||||
 | 
							hostapd.printf(`Could not find bss of previous interface ${iface_name}`);
 | 
				
			||||||
 | 
							return false;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let macaddr_list = iface_config_macaddr_list(config);
 | 
				
			||||||
 | 
						let bss_list = [];
 | 
				
			||||||
 | 
						let bss_list_cfg = [];
 | 
				
			||||||
 | 
						let prev_bss_hash = [];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (let bss in old_config.bss) {
 | 
				
			||||||
 | 
							let hash = bss_config_hash(bss.data);
 | 
				
			||||||
 | 
							push(prev_bss_hash, bss_config_hash(bss.data));
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Step 1: find (possibly renamed) interfaces with the same config
 | 
				
			||||||
 | 
						// and store them in the new order (with gaps)
 | 
				
			||||||
 | 
						for (let i = 0; i < length(config.bss); i++) {
 | 
				
			||||||
 | 
							let prev;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// For fullmac devices, the first interface needs to be preserved,
 | 
				
			||||||
 | 
							// since it's treated as the master
 | 
				
			||||||
 | 
							if (!i && phy_is_fullmac(phy)) {
 | 
				
			||||||
 | 
								prev = 0;
 | 
				
			||||||
 | 
								prev_bss_hash[0] = null;
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								prev = bss_find_existing(config.bss[i], old_config, prev_bss_hash);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if (prev < 0)
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							let cur_config = config.bss[i];
 | 
				
			||||||
 | 
							let prev_config = old_config.bss[prev];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							let prev_bss = get_config_bss(old_config, prev);
 | 
				
			||||||
 | 
							if (!prev_bss)
 | 
				
			||||||
 | 
								return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// try to preserve MAC address of this BSS by reassigning another
 | 
				
			||||||
 | 
							// BSS if necessary
 | 
				
			||||||
 | 
							if (cur_config.default_macaddr &&
 | 
				
			||||||
 | 
							    !macaddr_list[prev_config.bssid]) {
 | 
				
			||||||
 | 
								macaddr_list[prev_config.bssid] = i;
 | 
				
			||||||
 | 
								cur_config.bssid = prev_config.bssid;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							bss_list[i] = prev_bss;
 | 
				
			||||||
 | 
							bss_list_cfg[i] = old_config.bss[prev];
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (config.mbssid && !bss_list_cfg[0]) {
 | 
				
			||||||
 | 
							hostapd.printf("First BSS changed with MBSSID enabled");
 | 
				
			||||||
 | 
							return false;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Step 2: if none were found, rename and preserve the first one
 | 
				
			||||||
 | 
						if (length(bss_list) == 0) {
 | 
				
			||||||
 | 
							// can't change the bssid of the first bss
 | 
				
			||||||
 | 
							if (config.bss[0].bssid != old_config.bss[0].bssid) {
 | 
				
			||||||
 | 
								if (!config.bss[0].default_macaddr) {
 | 
				
			||||||
 | 
									hostapd.printf(`BSSID of first interface changed: ${lc(old_config.bss[0].bssid)} -> ${lc(config.bss[0].bssid)}`);
 | 
				
			||||||
 | 
									return false;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								config.bss[0].bssid = old_config.bss[0].bssid;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							let prev_bss = get_config_bss(old_config, 0);
 | 
				
			||||||
 | 
							if (!prev_bss)
 | 
				
			||||||
 | 
								return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							macaddr_list[config.bss[0].bssid] = 0;
 | 
				
			||||||
 | 
							bss_list[0] = prev_bss;
 | 
				
			||||||
 | 
							bss_list_cfg[0] = old_config.bss[0];
 | 
				
			||||||
 | 
							prev_bss_hash[0] = null;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Step 3: delete all unused old interfaces
 | 
				
			||||||
 | 
						for (let i = 0; i < length(prev_bss_hash); i++) {
 | 
				
			||||||
 | 
							if (!prev_bss_hash[i])
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							let prev_bss = get_config_bss(old_config, i);
 | 
				
			||||||
 | 
							if (!prev_bss)
 | 
				
			||||||
 | 
								return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							let ifname = old_config.bss[i].ifname;
 | 
				
			||||||
 | 
							hostapd.printf(`Remove bss '${ifname}' on phy '${phy}'`);
 | 
				
			||||||
 | 
							prev_bss.delete();
 | 
				
			||||||
 | 
							wdev_remove(ifname);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Step 4: rename preserved interfaces, use temporary name on duplicates
 | 
				
			||||||
 | 
						let rename_list = [];
 | 
				
			||||||
 | 
						for (let i = 0; i < length(bss_list); i++) {
 | 
				
			||||||
 | 
							if (!bss_list[i])
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							let old_ifname = bss_list_cfg[i].ifname;
 | 
				
			||||||
 | 
							let new_ifname = config.bss[i].ifname;
 | 
				
			||||||
 | 
							if (old_ifname == new_ifname)
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (hostapd.bss[new_ifname]) {
 | 
				
			||||||
 | 
								new_ifname = "tmp_" + substr(hostapd.sha1(new_ifname), 0, 8);
 | 
				
			||||||
 | 
								push(rename_list, i);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							hostapd.printf(`Rename bss ${old_ifname} to ${new_ifname}`);
 | 
				
			||||||
 | 
							if (!bss_list[i].rename(new_ifname)) {
 | 
				
			||||||
 | 
								hostapd.printf(`Failed to rename bss ${old_ifname} to ${new_ifname}`);
 | 
				
			||||||
 | 
								return false;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							bss_list_cfg[i].ifname = new_ifname;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Step 5: rename interfaces with temporary names
 | 
				
			||||||
 | 
						for (let i in rename_list) {
 | 
				
			||||||
 | 
							let new_ifname = config.bss[i].ifname;
 | 
				
			||||||
 | 
							if (!bss_list[i].rename(new_ifname)) {
 | 
				
			||||||
 | 
								hostapd.printf(`Failed to rename bss to ${new_ifname}`);
 | 
				
			||||||
 | 
								return false;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							bss_list_cfg[i].ifname = new_ifname;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Step 6: assign BSSID for newly created interfaces
 | 
				
			||||||
 | 
						let macaddr_data = {
 | 
				
			||||||
 | 
							num_global: config.num_global_macaddr ?? 1,
 | 
				
			||||||
 | 
							mbssid: config.mbssid ?? 0,
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
						macaddr_list = phydev.macaddr_init(macaddr_list, macaddr_data);
 | 
				
			||||||
 | 
						for (let i = 0; i < length(config.bss); i++) {
 | 
				
			||||||
 | 
							if (bss_list[i])
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
							let bsscfg = config.bss[i];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							let mac_idx = macaddr_list[bsscfg.bssid];
 | 
				
			||||||
 | 
							if (mac_idx < 0)
 | 
				
			||||||
 | 
								macaddr_list[bsscfg.bssid] = i;
 | 
				
			||||||
 | 
							if (mac_idx == i)
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// statically assigned bssid of the new interface is in conflict
 | 
				
			||||||
 | 
							// with the bssid of a reused interface. reassign the reused interface
 | 
				
			||||||
 | 
							if (!bsscfg.default_macaddr) {
 | 
				
			||||||
 | 
								// can't update bssid of the first BSS, need to restart
 | 
				
			||||||
 | 
								if (!mac_idx < 0)
 | 
				
			||||||
 | 
									return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								bsscfg = config.bss[mac_idx];
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							let addr = phydev.macaddr_next(i);
 | 
				
			||||||
 | 
							if (!addr) {
 | 
				
			||||||
 | 
								hostapd.printf(`Failed to generate mac address for phy ${phy}`);
 | 
				
			||||||
 | 
								return false;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							bsscfg.bssid = addr;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let config_inline = iface_gen_config(phy, config);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Step 7: fill in the gaps with new interfaces
 | 
				
			||||||
 | 
						for (let i = 0; i < length(config.bss); i++) {
 | 
				
			||||||
 | 
							let ifname = config.bss[i].ifname;
 | 
				
			||||||
 | 
							let bss = bss_list[i];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (bss)
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							hostapd.printf(`Add bss ${ifname} on phy ${phy}`);
 | 
				
			||||||
 | 
							bss_list[i] = iface.add_bss(config_inline, i);
 | 
				
			||||||
 | 
							if (!bss_list[i]) {
 | 
				
			||||||
 | 
								hostapd.printf(`Failed to add new bss ${ifname} on phy ${phy}`);
 | 
				
			||||||
 | 
								return false;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Step 8: update interface bss order
 | 
				
			||||||
 | 
						if (!iface.set_bss_order(bss_list)) {
 | 
				
			||||||
 | 
							hostapd.printf(`Failed to update BSS order on phy '${phy}'`);
 | 
				
			||||||
 | 
							return false;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Step 9: update config
 | 
				
			||||||
 | 
						for (let i = 0; i < length(config.bss); i++) {
 | 
				
			||||||
 | 
							if (!bss_list_cfg[i])
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							let ifname = config.bss[i].ifname;
 | 
				
			||||||
 | 
							let bss = bss_list[i];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (is_equal(config.bss[i], bss_list_cfg[i]))
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (is_equal(bss_remove_file_fields(config.bss[i]),
 | 
				
			||||||
 | 
							             bss_remove_file_fields(bss_list_cfg[i]))) {
 | 
				
			||||||
 | 
								hostapd.printf(`Update config data files for bss ${ifname}`);
 | 
				
			||||||
 | 
								if (bss.set_config(config_inline, i, true) < 0) {
 | 
				
			||||||
 | 
									hostapd.printf(`Could not update config data files for bss ${ifname}`);
 | 
				
			||||||
 | 
									return false;
 | 
				
			||||||
 | 
								} else {
 | 
				
			||||||
 | 
									bss.ctrl("RELOAD_WPA_PSK");
 | 
				
			||||||
 | 
									continue;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							bss_reload_psk(bss, config.bss[i], bss_list_cfg[i]);
 | 
				
			||||||
 | 
							if (is_equal(config.bss[i], bss_list_cfg[i]))
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							hostapd.printf(`Reload config for bss '${config.bss[0].ifname}' on phy '${phy}'`);
 | 
				
			||||||
 | 
							if (bss.set_config(config_inline, i) < 0) {
 | 
				
			||||||
 | 
								hostapd.printf(`Failed to set config for bss ${ifname}`);
 | 
				
			||||||
 | 
								return false;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return true;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function iface_update_supplicant_macaddr(phy, config)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let macaddr_list = [];
 | 
				
			||||||
 | 
						for (let i = 0; i < length(config.bss); i++)
 | 
				
			||||||
 | 
							push(macaddr_list, config.bss[i].bssid);
 | 
				
			||||||
 | 
						ubus.call("wpa_supplicant", "phy_set_macaddr_list", { phy: phy, macaddr: macaddr_list });
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function iface_set_config(phy, config)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let old_config = hostapd.data.config[phy];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						hostapd.data.config[phy] = config;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!config)
 | 
				
			||||||
 | 
							return iface_remove(old_config);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let phydev = phy_open(phy);
 | 
				
			||||||
 | 
						if (!phydev) {
 | 
				
			||||||
 | 
							hostapd.printf(`Failed to open phy ${phy}`);
 | 
				
			||||||
 | 
							return false;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						try {
 | 
				
			||||||
 | 
							let ret = iface_reload_config(phydev, config, old_config);
 | 
				
			||||||
 | 
							if (ret) {
 | 
				
			||||||
 | 
								iface_update_supplicant_macaddr(phy, config);
 | 
				
			||||||
 | 
								hostapd.printf(`Reloaded settings for phy ${phy}`);
 | 
				
			||||||
 | 
								return 0;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						} catch (e) {
 | 
				
			||||||
 | 
								hostapd.printf(`Error reloading config: ${e}\n${e.stacktrace[0].context}`);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						hostapd.printf(`Restart interface for phy ${phy}`);
 | 
				
			||||||
 | 
						let ret = iface_restart(phydev, config, old_config);
 | 
				
			||||||
 | 
						iface_update_supplicant_macaddr(phy, config);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return ret;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function config_add_bss(config, name)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let bss = {
 | 
				
			||||||
 | 
							ifname: name,
 | 
				
			||||||
 | 
							data: [],
 | 
				
			||||||
 | 
							hash: {}
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						push(config.bss, bss);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return bss;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function iface_load_config(filename)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let f = open(filename, "r");
 | 
				
			||||||
 | 
						if (!f)
 | 
				
			||||||
 | 
							return null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let config = {
 | 
				
			||||||
 | 
							radio: {
 | 
				
			||||||
 | 
								data: []
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							bss: [],
 | 
				
			||||||
 | 
							orig_file: filename,
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let bss;
 | 
				
			||||||
 | 
						let line;
 | 
				
			||||||
 | 
						while ((line = trim(f.read("line"))) != null) {
 | 
				
			||||||
 | 
							let val = split(line, "=", 2);
 | 
				
			||||||
 | 
							if (!val[0])
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (val[0] == "interface") {
 | 
				
			||||||
 | 
								bss = config_add_bss(config, val[1]);
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (val[0] == "channel") {
 | 
				
			||||||
 | 
								config.radio.channel = val[1];
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (val[0] == "#num_global_macaddr" ||
 | 
				
			||||||
 | 
							    val[0] == "mbssid")
 | 
				
			||||||
 | 
								config[val[0]] = int(val[1]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							push(config.radio.data, line);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						while ((line = trim(f.read("line"))) != null) {
 | 
				
			||||||
 | 
							if (line == "#default_macaddr")
 | 
				
			||||||
 | 
								bss.default_macaddr = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							let val = split(line, "=", 2);
 | 
				
			||||||
 | 
							if (!val[0])
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (val[0] == "bssid") {
 | 
				
			||||||
 | 
								bss.bssid = lc(val[1]);
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (val[0] == "nas_identifier")
 | 
				
			||||||
 | 
								bss.nasid = val[1];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (val[0] == "bss") {
 | 
				
			||||||
 | 
								bss = config_add_bss(config, val[1]);
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (hostapd.data.file_fields[val[0]])
 | 
				
			||||||
 | 
								bss.hash[val[0]] = hostapd.sha1(readfile(val[1]));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							push(bss.data, line);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						f.close();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return config;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function ex_wrap(func) {
 | 
				
			||||||
 | 
						return (req) => {
 | 
				
			||||||
 | 
							try {
 | 
				
			||||||
 | 
								let ret = func(req);
 | 
				
			||||||
 | 
								return ret;
 | 
				
			||||||
 | 
							} catch(e) {
 | 
				
			||||||
 | 
								hostapd.printf(`Exception in ubus function: ${e}\n${e.stacktrace[0].context}`);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							return libubus.STATUS_UNKNOWN_ERROR;
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					let main_obj = {
 | 
				
			||||||
 | 
						reload: {
 | 
				
			||||||
 | 
							args: {
 | 
				
			||||||
 | 
								phy: "",
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							call: ex_wrap(function(req) {
 | 
				
			||||||
 | 
								let phy_list = req.args.phy ? [ req.args.phy ] : keys(hostapd.data.config);
 | 
				
			||||||
 | 
								for (let phy_name in phy_list) {
 | 
				
			||||||
 | 
									let phy = hostapd.data.config[phy_name];
 | 
				
			||||||
 | 
									let config = iface_load_config(phy.orig_file);
 | 
				
			||||||
 | 
									iface_set_config(phy_name, config);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								return 0;
 | 
				
			||||||
 | 
							})
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						apsta_state: {
 | 
				
			||||||
 | 
							args: {
 | 
				
			||||||
 | 
								phy: "",
 | 
				
			||||||
 | 
								up: true,
 | 
				
			||||||
 | 
								frequency: 0,
 | 
				
			||||||
 | 
								sec_chan_offset: 0,
 | 
				
			||||||
 | 
								csa: true,
 | 
				
			||||||
 | 
								csa_count: 0,
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							call: ex_wrap(function(req) {
 | 
				
			||||||
 | 
								if (req.args.up == null || !req.args.phy)
 | 
				
			||||||
 | 
									return libubus.STATUS_INVALID_ARGUMENT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								let phy = req.args.phy;
 | 
				
			||||||
 | 
								let config = hostapd.data.config[phy];
 | 
				
			||||||
 | 
								if (!config || !config.bss || !config.bss[0] || !config.bss[0].ifname)
 | 
				
			||||||
 | 
									return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								let iface = hostapd.interfaces[config.bss[0].ifname];
 | 
				
			||||||
 | 
								if (!iface)
 | 
				
			||||||
 | 
									return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (!req.args.up) {
 | 
				
			||||||
 | 
									iface.stop();
 | 
				
			||||||
 | 
									return 0;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (!req.args.frequency)
 | 
				
			||||||
 | 
									return libubus.STATUS_INVALID_ARGUMENT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								let freq_info = iface_freq_info(iface, config, req.args);
 | 
				
			||||||
 | 
								if (!freq_info)
 | 
				
			||||||
 | 
									return libubus.STATUS_UNKNOWN_ERROR;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								let ret;
 | 
				
			||||||
 | 
								if (req.args.csa) {
 | 
				
			||||||
 | 
									freq_info.csa_count = req.args.csa_count ?? 10;
 | 
				
			||||||
 | 
									ret = iface.switch_channel(freq_info);
 | 
				
			||||||
 | 
								} else {
 | 
				
			||||||
 | 
									ret = iface.start(freq_info);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								if (!ret)
 | 
				
			||||||
 | 
									return libubus.STATUS_UNKNOWN_ERROR;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								return 0;
 | 
				
			||||||
 | 
							})
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						config_get_macaddr_list: {
 | 
				
			||||||
 | 
							args: {
 | 
				
			||||||
 | 
								phy: ""
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							call: ex_wrap(function(req) {
 | 
				
			||||||
 | 
								let phy = req.args.phy;
 | 
				
			||||||
 | 
								if (!phy)
 | 
				
			||||||
 | 
									return libubus.STATUS_INVALID_ARGUMENT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								let ret = {
 | 
				
			||||||
 | 
									macaddr: [],
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								let config = hostapd.data.config[phy];
 | 
				
			||||||
 | 
								if (!config)
 | 
				
			||||||
 | 
									return ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								ret.macaddr = map(config.bss, (bss) => bss.bssid);
 | 
				
			||||||
 | 
								return ret;
 | 
				
			||||||
 | 
							})
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						config_set: {
 | 
				
			||||||
 | 
							args: {
 | 
				
			||||||
 | 
								phy: "",
 | 
				
			||||||
 | 
								config: "",
 | 
				
			||||||
 | 
								prev_config: "",
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							call: ex_wrap(function(req) {
 | 
				
			||||||
 | 
								let phy = req.args.phy;
 | 
				
			||||||
 | 
								let file = req.args.config;
 | 
				
			||||||
 | 
								let prev_file = req.args.prev_config;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (!phy)
 | 
				
			||||||
 | 
									return libubus.STATUS_INVALID_ARGUMENT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (prev_file && !hostapd.data.config[phy]) {
 | 
				
			||||||
 | 
									let config = iface_load_config(prev_file);
 | 
				
			||||||
 | 
									if (config)
 | 
				
			||||||
 | 
										config.radio.data = [];
 | 
				
			||||||
 | 
									hostapd.data.config[phy] = config;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								let config = iface_load_config(file);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								hostapd.printf(`Set new config for phy ${phy}: ${file}`);
 | 
				
			||||||
 | 
								iface_set_config(phy, config);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								return {
 | 
				
			||||||
 | 
									pid: hostapd.getpid()
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							})
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						config_add: {
 | 
				
			||||||
 | 
							args: {
 | 
				
			||||||
 | 
								iface: "",
 | 
				
			||||||
 | 
								config: "",
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							call: ex_wrap(function(req) {
 | 
				
			||||||
 | 
								if (!req.args.iface || !req.args.config)
 | 
				
			||||||
 | 
									return libubus.STATUS_INVALID_ARGUMENT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (hostapd.add_iface(`bss_config=${req.args.iface}:${req.args.config}`) < 0)
 | 
				
			||||||
 | 
									return libubus.STATUS_INVALID_ARGUMENT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								return {
 | 
				
			||||||
 | 
									pid: hostapd.getpid()
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							})
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						config_remove: {
 | 
				
			||||||
 | 
							args: {
 | 
				
			||||||
 | 
								iface: ""
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							call: ex_wrap(function(req) {
 | 
				
			||||||
 | 
								if (!req.args.iface)
 | 
				
			||||||
 | 
									return libubus.STATUS_INVALID_ARGUMENT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								hostapd.remove_iface(req.args.iface);
 | 
				
			||||||
 | 
								return 0;
 | 
				
			||||||
 | 
							})
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					hostapd.data.ubus = ubus;
 | 
				
			||||||
 | 
					hostapd.data.obj = ubus.publish("hostapd", main_obj);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function bss_event(type, name, data) {
 | 
				
			||||||
 | 
						let ubus = hostapd.data.ubus;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						data ??= {};
 | 
				
			||||||
 | 
						data.name = name;
 | 
				
			||||||
 | 
						hostapd.data.obj.notify(`bss.${type}`, data, null, null, null, -1);
 | 
				
			||||||
 | 
						ubus.call("service", "event", { type: `hostapd.${name}.${type}`, data: {} });
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					return {
 | 
				
			||||||
 | 
						shutdown: function() {
 | 
				
			||||||
 | 
							for (let phy in hostapd.data.config)
 | 
				
			||||||
 | 
								iface_set_config(phy, null);
 | 
				
			||||||
 | 
							hostapd.ubus.disconnect();
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						bss_add: function(name, obj) {
 | 
				
			||||||
 | 
							bss_event("add", name);
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						bss_reload: function(name, obj, reconf) {
 | 
				
			||||||
 | 
							bss_event("reload", name, { reconf: reconf != 0 });
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						bss_remove: function(name, obj) {
 | 
				
			||||||
 | 
							bss_event("remove", name);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
							
								
								
									
										207
									
								
								feeds/ipq807x_v5.4/hostapd/files/wdev.uc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										207
									
								
								feeds/ipq807x_v5.4/hostapd/files/wdev.uc
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,207 @@
 | 
				
			|||||||
 | 
					#!/usr/bin/env ucode
 | 
				
			||||||
 | 
					'use strict';
 | 
				
			||||||
 | 
					import { vlist_new, is_equal, wdev_create, wdev_remove, phy_open } from "/usr/share/hostap/common.uc";
 | 
				
			||||||
 | 
					import { readfile, writefile, basename, readlink, glob } from "fs";
 | 
				
			||||||
 | 
					let libubus = require("ubus");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					let keep_devices = {};
 | 
				
			||||||
 | 
					let phy = shift(ARGV);
 | 
				
			||||||
 | 
					let command = shift(ARGV);
 | 
				
			||||||
 | 
					let phydev;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const mesh_params = [
 | 
				
			||||||
 | 
						"mesh_retry_timeout", "mesh_confirm_timeout", "mesh_holding_timeout", "mesh_max_peer_links",
 | 
				
			||||||
 | 
						"mesh_max_retries", "mesh_ttl", "mesh_element_ttl", "mesh_hwmp_max_preq_retries",
 | 
				
			||||||
 | 
						"mesh_path_refresh_time", "mesh_min_discovery_timeout", "mesh_hwmp_active_path_timeout",
 | 
				
			||||||
 | 
						"mesh_hwmp_preq_min_interval", "mesh_hwmp_net_diameter_traversal_time", "mesh_hwmp_rootmode",
 | 
				
			||||||
 | 
						"mesh_hwmp_rann_interval", "mesh_gate_announcements", "mesh_sync_offset_max_neighor",
 | 
				
			||||||
 | 
						"mesh_rssi_threshold", "mesh_hwmp_active_path_to_root_timeout", "mesh_hwmp_root_interval",
 | 
				
			||||||
 | 
						"mesh_hwmp_confirmation_interval", "mesh_awake_window", "mesh_plink_timeout",
 | 
				
			||||||
 | 
						"mesh_auto_open_plinks", "mesh_fwding", "mesh_power_mode"
 | 
				
			||||||
 | 
					];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function iface_stop(wdev)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (keep_devices[wdev.ifname])
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						wdev_remove(wdev.ifname);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function iface_start(wdev)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let ifname = wdev.ifname;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (readfile(`/sys/class/net/${ifname}/ifindex`)) {
 | 
				
			||||||
 | 
							system([ "ip", "link", "set", "dev", ifname, "down" ]);
 | 
				
			||||||
 | 
							wdev_remove(ifname);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						let wdev_config = {};
 | 
				
			||||||
 | 
						for (let key in wdev)
 | 
				
			||||||
 | 
							wdev_config[key] = wdev[key];
 | 
				
			||||||
 | 
						if (!wdev_config.macaddr && wdev.mode != "monitor")
 | 
				
			||||||
 | 
							wdev_config.macaddr = phydev.macaddr_next();
 | 
				
			||||||
 | 
						wdev_create(phy, ifname, wdev);
 | 
				
			||||||
 | 
						system([ "ip", "link", "set", "dev", ifname, "up" ]);
 | 
				
			||||||
 | 
						if (wdev.freq)
 | 
				
			||||||
 | 
							system(`iw dev ${ifname} set freq ${wdev.freq} ${wdev.htmode}`);
 | 
				
			||||||
 | 
						if (wdev.mode == "adhoc") {
 | 
				
			||||||
 | 
							let cmd = ["iw", "dev", ifname, "ibss", "join", wdev.ssid, wdev.freq, wdev.htmode, "fixed-freq" ];
 | 
				
			||||||
 | 
							if (wdev.bssid)
 | 
				
			||||||
 | 
								push(cmd, wdev.bssid);
 | 
				
			||||||
 | 
							for (let key in [ "beacon-interval", "basic-rates", "mcast-rate", "keys" ])
 | 
				
			||||||
 | 
								if (wdev[key])
 | 
				
			||||||
 | 
									push(cmd, key, wdev[key]);
 | 
				
			||||||
 | 
							system(cmd);
 | 
				
			||||||
 | 
						} else if (wdev.mode == "mesh") {
 | 
				
			||||||
 | 
							let cmd = [ "iw", "dev", ifname, "mesh", "join", wdev.ssid, "freq", wdev.freq, wdev.htmode ];
 | 
				
			||||||
 | 
							for (let key in [ "mcast-rate", "beacon-interval" ])
 | 
				
			||||||
 | 
								if (wdev[key])
 | 
				
			||||||
 | 
									push(cmd, key, wdev[key]);
 | 
				
			||||||
 | 
							system(cmd);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							cmd = ["iw", "dev", ifname, "set", "mesh_param" ];
 | 
				
			||||||
 | 
							let len = length(cmd);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							for (let param in mesh_params)
 | 
				
			||||||
 | 
								if (wdev[param])
 | 
				
			||||||
 | 
									push(cmd, param, wdev[param]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (len == length(cmd))
 | 
				
			||||||
 | 
								return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							system(cmd);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function iface_cb(new_if, old_if)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (old_if && new_if && is_equal(old_if, new_if))
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (old_if)
 | 
				
			||||||
 | 
							iface_stop(old_if);
 | 
				
			||||||
 | 
						if (new_if)
 | 
				
			||||||
 | 
							iface_start(new_if);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function drop_inactive(config)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						for (let key in config) {
 | 
				
			||||||
 | 
							if (!readfile(`/sys/class/net/${key}/ifindex`))
 | 
				
			||||||
 | 
								delete config[key];
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function add_ifname(config)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						for (let key in config)
 | 
				
			||||||
 | 
							config[key].ifname = key;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function delete_ifname(config)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						for (let key in config)
 | 
				
			||||||
 | 
							delete config[key].ifname;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function add_existing(phy, config)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let wdevs = glob(`/sys/class/ieee80211/${phy}/device/net/*`);
 | 
				
			||||||
 | 
						wdevs = map(wdevs, (arg) => basename(arg));
 | 
				
			||||||
 | 
						for (let wdev in wdevs) {
 | 
				
			||||||
 | 
							if (config[wdev])
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (basename(readlink(`/sys/class/net/${wdev}/phy80211`)) != phy)
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (trim(readfile(`/sys/class/net/${wdev}/operstate`)) == "down")
 | 
				
			||||||
 | 
								config[wdev] = {};
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function usage()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						warn(`Usage: ${basename(sourcepath())} <phy> <command> [<arguments>]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Commands:
 | 
				
			||||||
 | 
						set_config <config> [<device]...] - set phy configuration
 | 
				
			||||||
 | 
						get_macaddr <id>		  - get phy MAC address for vif index <id>
 | 
				
			||||||
 | 
					`);
 | 
				
			||||||
 | 
						exit(1);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const commands = {
 | 
				
			||||||
 | 
						set_config: function(args) {
 | 
				
			||||||
 | 
							let statefile = `/var/run/wdev-${phy}.json`;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							let new_config = shift(args);
 | 
				
			||||||
 | 
							for (let dev in ARGV)
 | 
				
			||||||
 | 
								keep_devices[dev] = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (!new_config)
 | 
				
			||||||
 | 
								usage();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							new_config = json(new_config);
 | 
				
			||||||
 | 
							if (!new_config) {
 | 
				
			||||||
 | 
								warn("Invalid configuration\n");
 | 
				
			||||||
 | 
								exit(1);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							let old_config = readfile(statefile);
 | 
				
			||||||
 | 
							if (old_config)
 | 
				
			||||||
 | 
								old_config = json(old_config);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							let config = vlist_new(iface_cb);
 | 
				
			||||||
 | 
							if (type(old_config) == "object")
 | 
				
			||||||
 | 
								config.data = old_config;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							add_existing(phy, config.data);
 | 
				
			||||||
 | 
							add_ifname(config.data);
 | 
				
			||||||
 | 
							drop_inactive(config.data);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							let ubus = libubus.connect();
 | 
				
			||||||
 | 
							let data = ubus.call("hostapd", "config_get_macaddr_list", { phy: phy });
 | 
				
			||||||
 | 
							let macaddr_list = [];
 | 
				
			||||||
 | 
							if (type(data) == "object" && data.macaddr)
 | 
				
			||||||
 | 
								macaddr_list = data.macaddr;
 | 
				
			||||||
 | 
							ubus.disconnect();
 | 
				
			||||||
 | 
							phydev.macaddr_init(macaddr_list);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							add_ifname(new_config);
 | 
				
			||||||
 | 
							config.update(new_config);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							drop_inactive(config.data);
 | 
				
			||||||
 | 
							delete_ifname(config.data);
 | 
				
			||||||
 | 
							writefile(statefile, sprintf("%J", config.data));
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						get_macaddr: function(args) {
 | 
				
			||||||
 | 
							let data = {};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							for (let arg in args) {
 | 
				
			||||||
 | 
								arg = split(arg, "=", 2);
 | 
				
			||||||
 | 
								data[arg[0]] = arg[1];
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							let macaddr = phydev.macaddr_generate(data);
 | 
				
			||||||
 | 
							if (!macaddr) {
 | 
				
			||||||
 | 
								warn(`Could not get MAC address for phy ${phy}\n`);
 | 
				
			||||||
 | 
								exit(1);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							print(macaddr + "\n");
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if (!phy || !command | !commands[command])
 | 
				
			||||||
 | 
						usage();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					phydev = phy_open(phy);
 | 
				
			||||||
 | 
					if (!phydev) {
 | 
				
			||||||
 | 
						warn(`PHY ${phy} does not exist\n`);
 | 
				
			||||||
 | 
						exit(1);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					commands[command](ARGV);
 | 
				
			||||||
							
								
								
									
										330
									
								
								feeds/ipq807x_v5.4/hostapd/files/wpa_supplicant.uc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										330
									
								
								feeds/ipq807x_v5.4/hostapd/files/wpa_supplicant.uc
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,330 @@
 | 
				
			|||||||
 | 
					let libubus = require("ubus");
 | 
				
			||||||
 | 
					import { open, readfile } from "fs";
 | 
				
			||||||
 | 
					import { wdev_create, wdev_remove, is_equal, vlist_new, phy_open } from "common";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					let ubus = libubus.connect();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wpas.data.config = {};
 | 
				
			||||||
 | 
					wpas.data.iface_phy = {};
 | 
				
			||||||
 | 
					wpas.data.macaddr_list = {};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function iface_stop(iface)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let ifname = iface.config.iface;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!iface.running)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						delete wpas.data.iface_phy[ifname];
 | 
				
			||||||
 | 
						wpas.remove_iface(ifname);
 | 
				
			||||||
 | 
						wdev_remove(ifname);
 | 
				
			||||||
 | 
						iface.running = false;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function iface_start(phydev, iface, macaddr_list)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let phy = phydev.name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (iface.running)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let ifname = iface.config.iface;
 | 
				
			||||||
 | 
						let wdev_config = {};
 | 
				
			||||||
 | 
						for (let field in iface.config)
 | 
				
			||||||
 | 
							wdev_config[field] = iface.config[field];
 | 
				
			||||||
 | 
						if (!wdev_config.macaddr)
 | 
				
			||||||
 | 
							wdev_config.macaddr = phydev.macaddr_next();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						wpas.data.iface_phy[ifname] = phy;
 | 
				
			||||||
 | 
						wdev_remove(ifname);
 | 
				
			||||||
 | 
						let ret = wdev_create(phy, ifname, wdev_config);
 | 
				
			||||||
 | 
						if (ret)
 | 
				
			||||||
 | 
							wpas.printf(`Failed to create device ${ifname}: ${ret}`);
 | 
				
			||||||
 | 
						wpas.add_iface(iface.config);
 | 
				
			||||||
 | 
						iface.running = true;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function iface_cb(new_if, old_if)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (old_if && new_if && is_equal(old_if.config, new_if.config)) {
 | 
				
			||||||
 | 
							new_if.running = old_if.running;
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (new_if && old_if)
 | 
				
			||||||
 | 
							wpas.printf(`Update configuration for interface ${old_if.config.iface}`);
 | 
				
			||||||
 | 
						else if (old_if)
 | 
				
			||||||
 | 
							wpas.printf(`Remove interface ${old_if.config.iface}`);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (old_if)
 | 
				
			||||||
 | 
							iface_stop(old_if);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function prepare_config(config)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						config.config_data = readfile(config.config);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return { config: config };
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function set_config(phy_name, config_list)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let phy = wpas.data.config[phy_name];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!phy) {
 | 
				
			||||||
 | 
							phy = vlist_new(iface_cb, false);
 | 
				
			||||||
 | 
							wpas.data.config[phy_name] = phy;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let values = [];
 | 
				
			||||||
 | 
						for (let config in config_list)
 | 
				
			||||||
 | 
							push(values, [ config.iface, prepare_config(config) ]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						phy.update(values);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function start_pending(phy_name)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let phy = wpas.data.config[phy_name];
 | 
				
			||||||
 | 
						let ubus = wpas.data.ubus;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!phy || !phy.data)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let phydev = phy_open(phy_name);
 | 
				
			||||||
 | 
						if (!phydev) {
 | 
				
			||||||
 | 
							wpas.printf(`Could not open phy ${phy_name}`);
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						let macaddr_list = wpas.data.macaddr_list[phy_name];
 | 
				
			||||||
 | 
						phydev.macaddr_init(macaddr_list);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (let ifname in phy.data)
 | 
				
			||||||
 | 
							iface_start(phydev, phy.data[ifname]);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					let main_obj = {
 | 
				
			||||||
 | 
						phy_set_state: {
 | 
				
			||||||
 | 
							args: {
 | 
				
			||||||
 | 
								phy: "",
 | 
				
			||||||
 | 
								stop: true,
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							call: function(req) {
 | 
				
			||||||
 | 
								if (!req.args.phy || req.args.stop == null)
 | 
				
			||||||
 | 
									return libubus.STATUS_INVALID_ARGUMENT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								let phy = wpas.data.config[req.args.phy];
 | 
				
			||||||
 | 
								if (!phy)
 | 
				
			||||||
 | 
									return libubus.STATUS_NOT_FOUND;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								try {
 | 
				
			||||||
 | 
									if (req.args.stop) {
 | 
				
			||||||
 | 
										for (let ifname in phy.data)
 | 
				
			||||||
 | 
											iface_stop(phy.data[ifname]);
 | 
				
			||||||
 | 
									} else {
 | 
				
			||||||
 | 
										start_pending(req.args.phy);
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								} catch (e) {
 | 
				
			||||||
 | 
									wpas.printf(`Error chaging state: ${e}\n${e.stacktrace[0].context}`);
 | 
				
			||||||
 | 
									return libubus.STATUS_INVALID_ARGUMENT;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								return 0;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						phy_set_macaddr_list: {
 | 
				
			||||||
 | 
							args: {
 | 
				
			||||||
 | 
								phy: "",
 | 
				
			||||||
 | 
								macaddr: [],
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							call: function(req) {
 | 
				
			||||||
 | 
								let phy = req.args.phy;
 | 
				
			||||||
 | 
								if (!phy)
 | 
				
			||||||
 | 
									return libubus.STATUS_INVALID_ARGUMENT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								wpas.data.macaddr_list[phy] = req.args.macaddr;
 | 
				
			||||||
 | 
								return 0;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						phy_status: {
 | 
				
			||||||
 | 
							args: {
 | 
				
			||||||
 | 
								phy: ""
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							call: function(req) {
 | 
				
			||||||
 | 
								if (!req.args.phy)
 | 
				
			||||||
 | 
									return libubus.STATUS_INVALID_ARGUMENT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								let phy = wpas.data.config[req.args.phy];
 | 
				
			||||||
 | 
								if (!phy)
 | 
				
			||||||
 | 
									return libubus.STATUS_NOT_FOUND;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								for (let ifname in phy.data) {
 | 
				
			||||||
 | 
									try {
 | 
				
			||||||
 | 
										let iface = wpas.interfaces[ifname];
 | 
				
			||||||
 | 
										if (!iface)
 | 
				
			||||||
 | 
											continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
										let status = iface.status();
 | 
				
			||||||
 | 
										if (!status)
 | 
				
			||||||
 | 
											continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
										if (status.state == "INTERFACE_DISABLED")
 | 
				
			||||||
 | 
											continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
										status.ifname = ifname;
 | 
				
			||||||
 | 
										return status;
 | 
				
			||||||
 | 
									} catch (e) {
 | 
				
			||||||
 | 
										continue;
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								return libubus.STATUS_NOT_FOUND;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						config_set: {
 | 
				
			||||||
 | 
							args: {
 | 
				
			||||||
 | 
								phy: "",
 | 
				
			||||||
 | 
								config: [],
 | 
				
			||||||
 | 
								defer: true,
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							call: function(req) {
 | 
				
			||||||
 | 
								if (!req.args.phy)
 | 
				
			||||||
 | 
									return libubus.STATUS_INVALID_ARGUMENT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								wpas.printf(`Set new config for phy ${req.args.phy}`);
 | 
				
			||||||
 | 
								try {
 | 
				
			||||||
 | 
									if (req.args.config)
 | 
				
			||||||
 | 
										set_config(req.args.phy, req.args.config);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									if (!req.args.defer)
 | 
				
			||||||
 | 
										start_pending(req.args.phy);
 | 
				
			||||||
 | 
								} catch (e) {
 | 
				
			||||||
 | 
									wpas.printf(`Error loading config: ${e}\n${e.stacktrace[0].context}`);
 | 
				
			||||||
 | 
									return libubus.STATUS_INVALID_ARGUMENT;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								return {
 | 
				
			||||||
 | 
									pid: wpas.getpid()
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						config_add: {
 | 
				
			||||||
 | 
							args: {
 | 
				
			||||||
 | 
								driver: "",
 | 
				
			||||||
 | 
								iface: "",
 | 
				
			||||||
 | 
								bridge: "",
 | 
				
			||||||
 | 
								hostapd_ctrl: "",
 | 
				
			||||||
 | 
								ctrl: "",
 | 
				
			||||||
 | 
								config: "",
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							call: function(req) {
 | 
				
			||||||
 | 
								if (!req.args.iface || !req.args.config)
 | 
				
			||||||
 | 
									return libubus.STATUS_INVALID_ARGUMENT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (wpas.add_iface(req.args) < 0)
 | 
				
			||||||
 | 
									return libubus.STATUS_INVALID_ARGUMENT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								return {
 | 
				
			||||||
 | 
									pid: wpas.getpid()
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						config_remove: {
 | 
				
			||||||
 | 
							args: {
 | 
				
			||||||
 | 
								iface: ""
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							call: function(req) {
 | 
				
			||||||
 | 
								if (!req.args.iface)
 | 
				
			||||||
 | 
									return libubus.STATUS_INVALID_ARGUMENT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								wpas.remove_iface(req.args.iface);
 | 
				
			||||||
 | 
								return 0;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wpas.data.ubus = ubus;
 | 
				
			||||||
 | 
					wpas.data.obj = ubus.publish("wpa_supplicant", main_obj);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function iface_event(type, name, data) {
 | 
				
			||||||
 | 
						let ubus = wpas.data.ubus;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						data ??= {};
 | 
				
			||||||
 | 
						data.name = name;
 | 
				
			||||||
 | 
						wpas.data.obj.notify(`iface.${type}`, data, null, null, null, -1);
 | 
				
			||||||
 | 
						ubus.call("service", "event", { type: `wpa_supplicant.${name}.${type}`, data: {} });
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function iface_hostapd_notify(phy, ifname, iface, state)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let ubus = wpas.data.ubus;
 | 
				
			||||||
 | 
						let status = iface.status();
 | 
				
			||||||
 | 
						let msg = { phy: phy };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						switch (state) {
 | 
				
			||||||
 | 
						case "DISCONNECTED":
 | 
				
			||||||
 | 
						case "AUTHENTICATING":
 | 
				
			||||||
 | 
						case "SCANNING":
 | 
				
			||||||
 | 
							msg.up = false;
 | 
				
			||||||
 | 
							break;
 | 
				
			||||||
 | 
						case "INTERFACE_DISABLED":
 | 
				
			||||||
 | 
						case "INACTIVE":
 | 
				
			||||||
 | 
							msg.up = true;
 | 
				
			||||||
 | 
							break;
 | 
				
			||||||
 | 
						case "COMPLETED":
 | 
				
			||||||
 | 
							msg.up = true;
 | 
				
			||||||
 | 
							msg.frequency = status.frequency;
 | 
				
			||||||
 | 
							msg.sec_chan_offset = status.sec_chan_offset;
 | 
				
			||||||
 | 
							break;
 | 
				
			||||||
 | 
						default:
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						ubus.call("hostapd", "apsta_state", msg);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function iface_channel_switch(phy, ifname, iface, info)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						let msg = {
 | 
				
			||||||
 | 
							phy: phy,
 | 
				
			||||||
 | 
							up: true,
 | 
				
			||||||
 | 
							csa: true,
 | 
				
			||||||
 | 
							csa_count: info.csa_count ? info.csa_count - 1 : 0,
 | 
				
			||||||
 | 
							frequency: info.frequency,
 | 
				
			||||||
 | 
							sec_chan_offset: info.sec_chan_offset,
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
						ubus.call("hostapd", "apsta_state", msg);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					return {
 | 
				
			||||||
 | 
						shutdown: function() {
 | 
				
			||||||
 | 
							for (let phy in wpas.data.config)
 | 
				
			||||||
 | 
								set_config(phy, []);
 | 
				
			||||||
 | 
							wpas.ubus.disconnect();
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						iface_add: function(name, obj) {
 | 
				
			||||||
 | 
							iface_event("add", name);
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						iface_remove: function(name, obj) {
 | 
				
			||||||
 | 
							iface_event("remove", name);
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						state: function(ifname, iface, state) {
 | 
				
			||||||
 | 
							let phy = wpas.data.iface_phy[ifname];
 | 
				
			||||||
 | 
							if (!phy) {
 | 
				
			||||||
 | 
								wpas.printf(`no PHY for ifname ${ifname}`);
 | 
				
			||||||
 | 
								return;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							iface_hostapd_notify(phy, ifname, iface, state);
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						event: function(ifname, iface, ev, info) {
 | 
				
			||||||
 | 
							let phy = wpas.data.iface_phy[ifname];
 | 
				
			||||||
 | 
							if (!phy) {
 | 
				
			||||||
 | 
								wpas.printf(`no PHY for ifname ${ifname}`);
 | 
				
			||||||
 | 
								return;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (ev == "CH_SWITCH_STARTED")
 | 
				
			||||||
 | 
								iface_channel_switch(phy, ifname, iface, info);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
@@ -68,7 +68,7 @@ Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
 | 
				
			|||||||
 	if (!chan) {
 | 
					 	if (!chan) {
 | 
				
			||||||
--- a/src/drivers/driver_nl80211.c
 | 
					--- a/src/drivers/driver_nl80211.c
 | 
				
			||||||
+++ b/src/drivers/driver_nl80211.c
 | 
					+++ b/src/drivers/driver_nl80211.c
 | 
				
			||||||
@@ -9872,6 +9872,10 @@ static int nl80211_switch_channel(void *
 | 
					@@ -9797,6 +9797,10 @@ static int nl80211_switch_channel(void *
 | 
				
			||||||
 	if (ret)
 | 
					 	if (ret)
 | 
				
			||||||
 		goto error;
 | 
					 		goto error;
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -31,7 +31,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 | 
				
			|||||||
 };
 | 
					 };
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 #define MAX_STA_COUNT 2007
 | 
					 #define MAX_STA_COUNT 2007
 | 
				
			||||||
@@ -696,6 +697,7 @@ struct hostapd_bss_config {
 | 
					@@ -694,6 +695,7 @@ struct hostapd_bss_config {
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 #define MESH_ENABLED BIT(0)
 | 
					 #define MESH_ENABLED BIT(0)
 | 
				
			||||||
 	int mesh;
 | 
					 	int mesh;
 | 
				
			||||||
@@ -59,7 +59,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 | 
				
			|||||||
 
 | 
					 
 | 
				
			||||||
--- a/src/drivers/driver_nl80211.c
 | 
					--- a/src/drivers/driver_nl80211.c
 | 
				
			||||||
+++ b/src/drivers/driver_nl80211.c
 | 
					+++ b/src/drivers/driver_nl80211.c
 | 
				
			||||||
@@ -10456,6 +10456,9 @@ static int nl80211_put_mesh_config(struc
 | 
					@@ -10381,6 +10381,9 @@ static int nl80211_put_mesh_config(struc
 | 
				
			||||||
 	if (((params->flags & WPA_DRIVER_MESH_CONF_FLAG_AUTO_PLINKS) &&
 | 
					 	if (((params->flags & WPA_DRIVER_MESH_CONF_FLAG_AUTO_PLINKS) &&
 | 
				
			||||||
 	     nla_put_u8(msg, NL80211_MESHCONF_AUTO_OPEN_PLINKS,
 | 
					 	     nla_put_u8(msg, NL80211_MESHCONF_AUTO_OPEN_PLINKS,
 | 
				
			||||||
 			params->auto_plinks)) ||
 | 
					 			params->auto_plinks)) ||
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
--- a/src/ap/ieee802_11.c
 | 
					--- a/src/ap/ieee802_11.c
 | 
				
			||||||
+++ b/src/ap/ieee802_11.c
 | 
					+++ b/src/ap/ieee802_11.c
 | 
				
			||||||
@@ -4942,6 +4942,13 @@ static int add_associated_sta(struct hos
 | 
					@@ -4810,6 +4810,13 @@ static int add_associated_sta(struct hos
 | 
				
			||||||
 	 * drivers to accept the STA parameter configuration. Since this is
 | 
					 	 * drivers to accept the STA parameter configuration. Since this is
 | 
				
			||||||
 	 * after a new FT-over-DS exchange, a new TK has been derived, so key
 | 
					 	 * after a new FT-over-DS exchange, a new TK has been derived, so key
 | 
				
			||||||
 	 * reinstallation is not a concern for this case.
 | 
					 	 * reinstallation is not a concern for this case.
 | 
				
			||||||
@@ -14,7 +14,7 @@
 | 
				
			|||||||
 	 */
 | 
					 	 */
 | 
				
			||||||
 	wpa_printf(MSG_DEBUG, "Add associated STA " MACSTR
 | 
					 	wpa_printf(MSG_DEBUG, "Add associated STA " MACSTR
 | 
				
			||||||
 		   " (added_unassoc=%d auth_alg=%u ft_over_ds=%u reassoc=%d authorized=%d ft_tk=%d fils_tk=%d)",
 | 
					 		   " (added_unassoc=%d auth_alg=%u ft_over_ds=%u reassoc=%d authorized=%d ft_tk=%d fils_tk=%d)",
 | 
				
			||||||
@@ -4955,7 +4962,8 @@ static int add_associated_sta(struct hos
 | 
					@@ -4823,7 +4830,8 @@ static int add_associated_sta(struct hos
 | 
				
			||||||
 	    (!(sta->flags & WLAN_STA_AUTHORIZED) ||
 | 
					 	    (!(sta->flags & WLAN_STA_AUTHORIZED) ||
 | 
				
			||||||
 	     (reassoc && sta->ft_over_ds && sta->auth_alg == WLAN_AUTH_FT) ||
 | 
					 	     (reassoc && sta->ft_over_ds && sta->auth_alg == WLAN_AUTH_FT) ||
 | 
				
			||||||
 	     (!wpa_auth_sta_ft_tk_already_set(sta->wpa_sm) &&
 | 
					 	     (!wpa_auth_sta_ft_tk_already_set(sta->wpa_sm) &&
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
--- a/src/ap/hostapd.c
 | 
					--- a/src/ap/hostapd.c
 | 
				
			||||||
+++ b/src/ap/hostapd.c
 | 
					+++ b/src/ap/hostapd.c
 | 
				
			||||||
@@ -3431,7 +3431,7 @@ static int hostapd_change_config_freq(st
 | 
					@@ -3403,7 +3403,7 @@ static int hostapd_change_config_freq(st
 | 
				
			||||||
 				      struct hostapd_freq_params *old_params)
 | 
					 				      struct hostapd_freq_params *old_params)
 | 
				
			||||||
 {
 | 
					 {
 | 
				
			||||||
 	int channel;
 | 
					 	int channel;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 | 
				
			|||||||
 #include <linux/rtnetlink.h>
 | 
					 #include <linux/rtnetlink.h>
 | 
				
			||||||
 #include <netpacket/packet.h>
 | 
					 #include <netpacket/packet.h>
 | 
				
			||||||
 #include <linux/errqueue.h>
 | 
					 #include <linux/errqueue.h>
 | 
				
			||||||
@@ -5284,26 +5281,29 @@ fail:
 | 
					@@ -5233,26 +5230,29 @@ fail:
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 static void rtnl_neigh_delete_fdb_entry(struct i802_bss *bss, const u8 *addr)
 | 
					 static void rtnl_neigh_delete_fdb_entry(struct i802_bss *bss, const u8 *addr)
 | 
				
			||||||
 {
 | 
					 {
 | 
				
			||||||
@@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 | 
				
			|||||||
 	if (err < 0) {
 | 
					 	if (err < 0) {
 | 
				
			||||||
 		wpa_printf(MSG_DEBUG, "nl80211: bridge FDB entry delete for "
 | 
					 		wpa_printf(MSG_DEBUG, "nl80211: bridge FDB entry delete for "
 | 
				
			||||||
 			   MACSTR " ifindex=%d failed: %s", MAC2STR(addr),
 | 
					 			   MACSTR " ifindex=%d failed: %s", MAC2STR(addr),
 | 
				
			||||||
@@ -5313,9 +5313,8 @@ static void rtnl_neigh_delete_fdb_entry(
 | 
					@@ -5262,9 +5262,8 @@ static void rtnl_neigh_delete_fdb_entry(
 | 
				
			||||||
 			   MACSTR, MAC2STR(addr));
 | 
					 			   MACSTR, MAC2STR(addr));
 | 
				
			||||||
 	}
 | 
					 	}
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 | 
				
			|||||||
 }
 | 
					 }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -7691,7 +7690,6 @@ static void *i802_init(struct hostapd_da
 | 
					@@ -7633,7 +7632,6 @@ static void *i802_init(struct hostapd_da
 | 
				
			||||||
 	    (params->num_bridge == 0 || !params->bridge[0]))
 | 
					 	    (params->num_bridge == 0 || !params->bridge[0]))
 | 
				
			||||||
 		add_ifidx(drv, br_ifindex, drv->ifindex);
 | 
					 		add_ifidx(drv, br_ifindex, drv->ifindex);
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 | 
				
			|||||||
 	if (bss->added_if_into_bridge || bss->already_in_bridge) {
 | 
					 	if (bss->added_if_into_bridge || bss->already_in_bridge) {
 | 
				
			||||||
 		int err;
 | 
					 		int err;
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -7708,7 +7706,6 @@ static void *i802_init(struct hostapd_da
 | 
					@@ -7650,7 +7648,6 @@ static void *i802_init(struct hostapd_da
 | 
				
			||||||
 			goto failed;
 | 
					 			goto failed;
 | 
				
			||||||
 		}
 | 
					 		}
 | 
				
			||||||
 	}
 | 
					 	}
 | 
				
			||||||
@@ -92,7 +92,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 | 
				
			|||||||
 
 | 
					 
 | 
				
			||||||
 	if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) {
 | 
					 	if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) {
 | 
				
			||||||
 		wpa_printf(MSG_DEBUG,
 | 
					 		wpa_printf(MSG_DEBUG,
 | 
				
			||||||
@@ -10655,13 +10652,14 @@ static int wpa_driver_br_add_ip_neigh(vo
 | 
					@@ -10581,13 +10578,14 @@ static int wpa_driver_br_add_ip_neigh(vo
 | 
				
			||||||
 				      const u8 *ipaddr, int prefixlen,
 | 
					 				      const u8 *ipaddr, int prefixlen,
 | 
				
			||||||
 				      const u8 *addr)
 | 
					 				      const u8 *addr)
 | 
				
			||||||
 {
 | 
					 {
 | 
				
			||||||
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 | 
				
			|||||||
 	int res;
 | 
					 	int res;
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 	if (!ipaddr || prefixlen == 0 || !addr)
 | 
					 	if (!ipaddr || prefixlen == 0 || !addr)
 | 
				
			||||||
@@ -10680,85 +10678,66 @@ static int wpa_driver_br_add_ip_neigh(vo
 | 
					@@ -10606,85 +10604,66 @@ static int wpa_driver_br_add_ip_neigh(vo
 | 
				
			||||||
 	}
 | 
					 	}
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 	if (version == 4) {
 | 
					 	if (version == 4) {
 | 
				
			||||||
@@ -220,7 +220,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 | 
				
			|||||||
 		addrsize = 16;
 | 
					 		addrsize = 16;
 | 
				
			||||||
 	} else {
 | 
					 	} else {
 | 
				
			||||||
 		return -EINVAL;
 | 
					 		return -EINVAL;
 | 
				
			||||||
@@ -10776,41 +10755,30 @@ static int wpa_driver_br_delete_ip_neigh
 | 
					@@ -10702,41 +10681,30 @@ static int wpa_driver_br_delete_ip_neigh
 | 
				
			||||||
 		return -1;
 | 
					 		return -1;
 | 
				
			||||||
 	}
 | 
					 	}
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -0,0 +1,43 @@
 | 
				
			|||||||
 | 
					From: Harshitha Prem <quic_hprem@quicinc.com>
 | 
				
			||||||
 | 
					Date: Wed, 22 Feb 2023 09:29:01 +0530
 | 
				
			||||||
 | 
					Subject: [PATCH] nl80211: Add frequency info in start AP command
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					When ACS is configured in multiple BSS case, sometimes a virtual AP
 | 
				
			||||||
 | 
					interface does not come up as the channel context information between
 | 
				
			||||||
 | 
					different BSSs of the same band does not match.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Same behavior is observed in case of multiple band/hardware under a
 | 
				
			||||||
 | 
					single wiphy, when we bring up multiple virtual interface in various
 | 
				
			||||||
 | 
					bands simultaneously and the kernel maps a random channel as it has more
 | 
				
			||||||
 | 
					than one channel context, e.g., say a 2.4 GHz channel to a 5 GHz virtual
 | 
				
			||||||
 | 
					AP interface when the start AP command is sent. This is because the
 | 
				
			||||||
 | 
					frequency information is not present in the command.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Add the frequency information into the start AP netlink command so that
 | 
				
			||||||
 | 
					the kernel maps the appropriate channel context by parsing it instead of
 | 
				
			||||||
 | 
					using a previous set channel information.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com>
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--- a/src/drivers/driver_nl80211.c
 | 
				
			||||||
 | 
					+++ b/src/drivers/driver_nl80211.c
 | 
				
			||||||
 | 
					@@ -167,6 +167,8 @@ static int nl80211_send_frame_cmd(struct
 | 
				
			||||||
 | 
					 				  const u16 *csa_offs, size_t csa_offs_len);
 | 
				
			||||||
 | 
					 static int wpa_driver_nl80211_probe_req_report(struct i802_bss *bss,
 | 
				
			||||||
 | 
					 					       int report);
 | 
				
			||||||
 | 
					+static int nl80211_put_freq_params(struct nl_msg *msg,
 | 
				
			||||||
 | 
					+				   const struct hostapd_freq_params *freq);
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 #define IFIDX_ANY -1
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					@@ -4717,6 +4719,9 @@ static int wpa_driver_nl80211_set_ap(voi
 | 
				
			||||||
 | 
					 		nla_nest_end(msg, spr);
 | 
				
			||||||
 | 
					 	}
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					+	if (params->freq && nl80211_put_freq_params(msg, params->freq) < 0)
 | 
				
			||||||
 | 
					+		goto fail;
 | 
				
			||||||
 | 
					+
 | 
				
			||||||
 | 
					 	if (params->freq && params->freq->he_enabled) {
 | 
				
			||||||
 | 
					 		struct nlattr *bss_color;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
@@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					From: Felix Fietkau <nbd@nbd.name>
 | 
				
			||||||
 | 
					Date: Thu, 14 Sep 2023 10:53:50 +0200
 | 
				
			||||||
 | 
					Subject: [PATCH] driver_nl80211: fix setting QoS map on secondary BSSs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The setting is per-BSS, not per PHY
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Signed-off-by: Felix Fietkau <nbd@nbd.name>
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--- a/src/drivers/driver_nl80211.c
 | 
				
			||||||
 | 
					+++ b/src/drivers/driver_nl80211.c
 | 
				
			||||||
 | 
					@@ -10045,7 +10045,7 @@ static int nl80211_set_qos_map(void *pri
 | 
				
			||||||
 | 
					 	wpa_hexdump(MSG_DEBUG, "nl80211: Setting QoS Map",
 | 
				
			||||||
 | 
					 		    qos_map_set, qos_map_set_len);
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					-	if (!(msg = nl80211_drv_msg(drv, 0, NL80211_CMD_SET_QOS_MAP)) ||
 | 
				
			||||||
 | 
					+	if (!(msg = nl80211_bss_msg(bss, 0, NL80211_CMD_SET_QOS_MAP)) ||
 | 
				
			||||||
 | 
					 	    nla_put(msg, NL80211_ATTR_QOS_MAP, qos_map_set_len, qos_map_set)) {
 | 
				
			||||||
 | 
					 		nlmsg_free(msg);
 | 
				
			||||||
 | 
					 		return -ENOBUFS;
 | 
				
			||||||
@@ -0,0 +1,18 @@
 | 
				
			|||||||
 | 
					From: Felix Fietkau <nbd@nbd.name>
 | 
				
			||||||
 | 
					Date: Thu, 14 Sep 2023 11:28:03 +0200
 | 
				
			||||||
 | 
					Subject: [PATCH] driver_nl80211: update drv->ifindex on removing the first
 | 
				
			||||||
 | 
					 BSS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Signed-off-by: Felix Fietkau <nbd@nbd.name>
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--- a/src/drivers/driver_nl80211.c
 | 
				
			||||||
 | 
					+++ b/src/drivers/driver_nl80211.c
 | 
				
			||||||
 | 
					@@ -8003,6 +8003,7 @@ static int wpa_driver_nl80211_if_remove(
 | 
				
			||||||
 | 
					 		if (drv->first_bss->next) {
 | 
				
			||||||
 | 
					 			drv->first_bss = drv->first_bss->next;
 | 
				
			||||||
 | 
					 			drv->ctx = drv->first_bss->ctx;
 | 
				
			||||||
 | 
					+			drv->ifindex = drv->first_bss->ifindex;
 | 
				
			||||||
 | 
					 			os_free(bss);
 | 
				
			||||||
 | 
					 		} else {
 | 
				
			||||||
 | 
					 			wpa_printf(MSG_DEBUG, "nl80211: No second BSS to reassign context to");
 | 
				
			||||||
@@ -72,7 +72,7 @@
 | 
				
			|||||||
 include ../src/build.rules
 | 
					 include ../src/build.rules
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 ifdef LIBS
 | 
					 ifdef LIBS
 | 
				
			||||||
@@ -359,7 +360,9 @@ endif
 | 
					@@ -354,7 +355,9 @@ endif
 | 
				
			||||||
 ifdef CONFIG_IBSS_RSN
 | 
					 ifdef CONFIG_IBSS_RSN
 | 
				
			||||||
 NEED_RSN_AUTHENTICATOR=y
 | 
					 NEED_RSN_AUTHENTICATOR=y
 | 
				
			||||||
 CFLAGS += -DCONFIG_IBSS_RSN
 | 
					 CFLAGS += -DCONFIG_IBSS_RSN
 | 
				
			||||||
@@ -82,7 +82,7 @@
 | 
				
			|||||||
 OBJS += ibss_rsn.o
 | 
					 OBJS += ibss_rsn.o
 | 
				
			||||||
 endif
 | 
					 endif
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -897,6 +900,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
 | 
					@@ -886,6 +889,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
 | 
				
			||||||
 CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
 | 
					 CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
 | 
				
			||||||
 LIBS += -ldl -rdynamic
 | 
					 LIBS += -ldl -rdynamic
 | 
				
			||||||
 endif
 | 
					 endif
 | 
				
			||||||
@@ -93,7 +93,7 @@
 | 
				
			|||||||
 endif
 | 
					 endif
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 ifdef CONFIG_AP
 | 
					 ifdef CONFIG_AP
 | 
				
			||||||
@@ -904,9 +911,11 @@ NEED_EAP_COMMON=y
 | 
					@@ -893,9 +900,11 @@ NEED_EAP_COMMON=y
 | 
				
			||||||
 NEED_RSN_AUTHENTICATOR=y
 | 
					 NEED_RSN_AUTHENTICATOR=y
 | 
				
			||||||
 CFLAGS += -DCONFIG_AP
 | 
					 CFLAGS += -DCONFIG_AP
 | 
				
			||||||
 OBJS += ap.o
 | 
					 OBJS += ap.o
 | 
				
			||||||
@@ -105,7 +105,7 @@
 | 
				
			|||||||
 OBJS += ../src/ap/hostapd.o
 | 
					 OBJS += ../src/ap/hostapd.o
 | 
				
			||||||
 OBJS += ../src/ap/wpa_auth_glue.o
 | 
					 OBJS += ../src/ap/wpa_auth_glue.o
 | 
				
			||||||
 OBJS += ../src/ap/utils.o
 | 
					 OBJS += ../src/ap/utils.o
 | 
				
			||||||
@@ -986,6 +995,12 @@ endif
 | 
					@@ -975,6 +984,12 @@ endif
 | 
				
			||||||
 ifdef CONFIG_HS20
 | 
					 ifdef CONFIG_HS20
 | 
				
			||||||
 OBJS += ../src/ap/hs20.o
 | 
					 OBJS += ../src/ap/hs20.o
 | 
				
			||||||
 endif
 | 
					 endif
 | 
				
			||||||
@@ -118,7 +118,7 @@
 | 
				
			|||||||
 endif
 | 
					 endif
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 ifdef CONFIG_MBO
 | 
					 ifdef CONFIG_MBO
 | 
				
			||||||
@@ -994,7 +1009,9 @@ CFLAGS += -DCONFIG_MBO
 | 
					@@ -983,7 +998,9 @@ CFLAGS += -DCONFIG_MBO
 | 
				
			||||||
 endif
 | 
					 endif
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 ifdef NEED_RSN_AUTHENTICATOR
 | 
					 ifdef NEED_RSN_AUTHENTICATOR
 | 
				
			||||||
@@ -128,7 +128,7 @@
 | 
				
			|||||||
 NEED_AES_WRAP=y
 | 
					 NEED_AES_WRAP=y
 | 
				
			||||||
 OBJS += ../src/ap/wpa_auth.o
 | 
					 OBJS += ../src/ap/wpa_auth.o
 | 
				
			||||||
 OBJS += ../src/ap/wpa_auth_ie.o
 | 
					 OBJS += ../src/ap/wpa_auth_ie.o
 | 
				
			||||||
@@ -1889,6 +1906,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
 | 
					@@ -1878,6 +1895,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 _OBJS_VAR := OBJS
 | 
					 _OBJS_VAR := OBJS
 | 
				
			||||||
 include ../src/objs.mk
 | 
					 include ../src/objs.mk
 | 
				
			||||||
@@ -141,7 +141,7 @@
 | 
				
			|||||||
 wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
 | 
					 wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
 | 
				
			||||||
 	$(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
 | 
					 	$(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
 | 
				
			||||||
 	@$(E) "  LD " $@
 | 
					 	@$(E) "  LD " $@
 | 
				
			||||||
@@ -2021,6 +2044,12 @@ eap_gpsk.so: $(SRC_EAP_GPSK)
 | 
					@@ -1983,6 +2006,12 @@ eap_eke.so: ../src/eap_peer/eap_eke.c ..
 | 
				
			||||||
 	$(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
 | 
					 	$(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
 | 
				
			||||||
 	@$(E) "  sed" $<
 | 
					 	@$(E) "  sed" $<
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -156,7 +156,7 @@
 | 
				
			|||||||
 wpa_cli.exe: wpa_cli
 | 
					 wpa_cli.exe: wpa_cli
 | 
				
			||||||
--- a/src/drivers/driver.h
 | 
					--- a/src/drivers/driver.h
 | 
				
			||||||
+++ b/src/drivers/driver.h
 | 
					+++ b/src/drivers/driver.h
 | 
				
			||||||
@@ -6025,8 +6025,8 @@ union wpa_event_data {
 | 
					@@ -6018,8 +6018,8 @@ union wpa_event_data {
 | 
				
			||||||
  * Driver wrapper code should call this function whenever an event is received
 | 
					  * Driver wrapper code should call this function whenever an event is received
 | 
				
			||||||
  * from the driver.
 | 
					  * from the driver.
 | 
				
			||||||
  */
 | 
					  */
 | 
				
			||||||
@@ -167,7 +167,7 @@
 | 
				
			|||||||
 
 | 
					 
 | 
				
			||||||
 /**
 | 
					 /**
 | 
				
			||||||
  * wpa_supplicant_event_global - Report a driver event for wpa_supplicant
 | 
					  * wpa_supplicant_event_global - Report a driver event for wpa_supplicant
 | 
				
			||||||
@@ -6038,7 +6038,7 @@ void wpa_supplicant_event(void *ctx, enu
 | 
					@@ -6031,7 +6031,7 @@ void wpa_supplicant_event(void *ctx, enu
 | 
				
			||||||
  * Same as wpa_supplicant_event(), but we search for the interface in
 | 
					  * Same as wpa_supplicant_event(), but we search for the interface in
 | 
				
			||||||
  * wpa_global.
 | 
					  * wpa_global.
 | 
				
			||||||
  */
 | 
					  */
 | 
				
			||||||
@@ -178,7 +178,7 @@
 | 
				
			|||||||
 /*
 | 
					 /*
 | 
				
			||||||
--- a/src/ap/drv_callbacks.c
 | 
					--- a/src/ap/drv_callbacks.c
 | 
				
			||||||
+++ b/src/ap/drv_callbacks.c
 | 
					+++ b/src/ap/drv_callbacks.c
 | 
				
			||||||
@@ -1836,8 +1836,8 @@ err:
 | 
					@@ -1827,8 +1827,8 @@ err:
 | 
				
			||||||
 #endif /* CONFIG_OWE */
 | 
					 #endif /* CONFIG_OWE */
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -189,7 +189,7 @@
 | 
				
			|||||||
 {
 | 
					 {
 | 
				
			||||||
 	struct hostapd_data *hapd = ctx;
 | 
					 	struct hostapd_data *hapd = ctx;
 | 
				
			||||||
 #ifndef CONFIG_NO_STDOUT_DEBUG
 | 
					 #ifndef CONFIG_NO_STDOUT_DEBUG
 | 
				
			||||||
@@ -2082,7 +2082,7 @@ void wpa_supplicant_event(void *ctx, enu
 | 
					@@ -2073,7 +2073,7 @@ void wpa_supplicant_event(void *ctx, enu
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -231,7 +231,7 @@
 | 
				
			|||||||
 	os_memset(&global, 0, sizeof(global));
 | 
					 	os_memset(&global, 0, sizeof(global));
 | 
				
			||||||
--- a/wpa_supplicant/events.c
 | 
					--- a/wpa_supplicant/events.c
 | 
				
			||||||
+++ b/wpa_supplicant/events.c
 | 
					+++ b/wpa_supplicant/events.c
 | 
				
			||||||
@@ -4665,8 +4665,8 @@ static void wpas_event_unprot_beacon(str
 | 
					@@ -4666,8 +4666,8 @@ static void wpas_event_unprot_beacon(str
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -242,7 +242,7 @@
 | 
				
			|||||||
 {
 | 
					 {
 | 
				
			||||||
 	struct wpa_supplicant *wpa_s = ctx;
 | 
					 	struct wpa_supplicant *wpa_s = ctx;
 | 
				
			||||||
 	int resched;
 | 
					 	int resched;
 | 
				
			||||||
@@ -5511,7 +5511,7 @@ void wpa_supplicant_event(void *ctx, enu
 | 
					@@ -5512,7 +5512,7 @@ void wpa_supplicant_event(void *ctx, enu
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -253,7 +253,7 @@
 | 
				
			|||||||
 	struct wpa_supplicant *wpa_s;
 | 
					 	struct wpa_supplicant *wpa_s;
 | 
				
			||||||
--- a/wpa_supplicant/wpa_supplicant.c
 | 
					--- a/wpa_supplicant/wpa_supplicant.c
 | 
				
			||||||
+++ b/wpa_supplicant/wpa_supplicant.c
 | 
					+++ b/wpa_supplicant/wpa_supplicant.c
 | 
				
			||||||
@@ -6819,7 +6819,6 @@ struct wpa_interface * wpa_supplicant_ma
 | 
					@@ -6814,7 +6814,6 @@ struct wpa_interface * wpa_supplicant_ma
 | 
				
			||||||
 	return NULL;
 | 
					 	return NULL;
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -261,7 +261,7 @@
 | 
				
			|||||||
 /**
 | 
					 /**
 | 
				
			||||||
  * wpa_supplicant_match_existing - Match existing interfaces
 | 
					  * wpa_supplicant_match_existing - Match existing interfaces
 | 
				
			||||||
  * @global: Pointer to global data from wpa_supplicant_init()
 | 
					  * @global: Pointer to global data from wpa_supplicant_init()
 | 
				
			||||||
@@ -6854,6 +6853,11 @@ static int wpa_supplicant_match_existing
 | 
					@@ -6849,6 +6848,11 @@ static int wpa_supplicant_match_existing
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 #endif /* CONFIG_MATCH_IFACE */
 | 
					 #endif /* CONFIG_MATCH_IFACE */
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -273,7 +273,7 @@
 | 
				
			|||||||
 
 | 
					 
 | 
				
			||||||
 /**
 | 
					 /**
 | 
				
			||||||
  * wpa_supplicant_add_iface - Add a new network interface
 | 
					  * wpa_supplicant_add_iface - Add a new network interface
 | 
				
			||||||
@@ -7110,6 +7114,8 @@ struct wpa_global * wpa_supplicant_init(
 | 
					@@ -7105,6 +7109,8 @@ struct wpa_global * wpa_supplicant_init(
 | 
				
			||||||
 #ifndef CONFIG_NO_WPA_MSG
 | 
					 #ifndef CONFIG_NO_WPA_MSG
 | 
				
			||||||
 	wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
 | 
					 	wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
 | 
				
			||||||
 #endif /* CONFIG_NO_WPA_MSG */
 | 
					 #endif /* CONFIG_NO_WPA_MSG */
 | 
				
			||||||
@@ -333,7 +333,7 @@
 | 
				
			|||||||
 
 | 
					 
 | 
				
			||||||
 const struct wpa_driver_ops *const wpa_drivers[] = { NULL };
 | 
					 const struct wpa_driver_ops *const wpa_drivers[] = { NULL };
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -1291,6 +1296,10 @@ static void usage(void)
 | 
					@@ -1292,6 +1297,10 @@ static void usage(void)
 | 
				
			||||||
 	       "option several times.\n");
 | 
					 	       "option several times.\n");
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -344,7 +344,7 @@
 | 
				
			|||||||
 
 | 
					 
 | 
				
			||||||
 int main(int argc, char *argv[])
 | 
					 int main(int argc, char *argv[])
 | 
				
			||||||
 {
 | 
					 {
 | 
				
			||||||
@@ -1311,6 +1320,8 @@ int main(int argc, char *argv[])
 | 
					@@ -1312,6 +1321,8 @@ int main(int argc, char *argv[])
 | 
				
			||||||
 	if (os_program_init())
 | 
					 	if (os_program_init())
 | 
				
			||||||
 		return -1;
 | 
					 		return -1;
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
--- a/hostapd/config_file.c
 | 
					--- a/hostapd/config_file.c
 | 
				
			||||||
+++ b/hostapd/config_file.c
 | 
					+++ b/hostapd/config_file.c
 | 
				
			||||||
@@ -3459,6 +3459,10 @@ static int hostapd_config_fill(struct ho
 | 
					@@ -3439,6 +3439,10 @@ static int hostapd_config_fill(struct ho
 | 
				
			||||||
 		if (bss->ocv && !bss->ieee80211w)
 | 
					 		if (bss->ocv && !bss->ieee80211w)
 | 
				
			||||||
 			bss->ieee80211w = 1;
 | 
					 			bss->ieee80211w = 1;
 | 
				
			||||||
 #endif /* CONFIG_OCV */
 | 
					 #endif /* CONFIG_OCV */
 | 
				
			||||||
@@ -13,7 +13,7 @@
 | 
				
			|||||||
 	} else if (os_strcmp(buf, "ht_capab") == 0) {
 | 
					 	} else if (os_strcmp(buf, "ht_capab") == 0) {
 | 
				
			||||||
--- a/src/ap/ap_config.h
 | 
					--- a/src/ap/ap_config.h
 | 
				
			||||||
+++ b/src/ap/ap_config.h
 | 
					+++ b/src/ap/ap_config.h
 | 
				
			||||||
@@ -1009,6 +1009,8 @@ struct hostapd_config {
 | 
					@@ -995,6 +995,8 @@ struct hostapd_config {
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 	int ht_op_mode_fixed;
 | 
					 	int ht_op_mode_fixed;
 | 
				
			||||||
 	u16 ht_capab;
 | 
					 	u16 ht_capab;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
--- a/wpa_supplicant/wpa_supplicant.c
 | 
					--- a/wpa_supplicant/wpa_supplicant.c
 | 
				
			||||||
+++ b/wpa_supplicant/wpa_supplicant.c
 | 
					+++ b/wpa_supplicant/wpa_supplicant.c
 | 
				
			||||||
@@ -5154,7 +5154,7 @@ wpa_supplicant_alloc(struct wpa_supplica
 | 
					@@ -5147,7 +5147,7 @@ wpa_supplicant_alloc(struct wpa_supplica
 | 
				
			||||||
 	if (wpa_s == NULL)
 | 
					 	if (wpa_s == NULL)
 | 
				
			||||||
 		return NULL;
 | 
					 		return NULL;
 | 
				
			||||||
 	wpa_s->scan_req = INITIAL_SCAN_REQ;
 | 
					 	wpa_s->scan_req = INITIAL_SCAN_REQ;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
--- a/src/drivers/drivers.mak
 | 
					--- a/src/drivers/drivers.mak
 | 
				
			||||||
+++ b/src/drivers/drivers.mak
 | 
					+++ b/src/drivers/drivers.mak
 | 
				
			||||||
@@ -54,7 +54,6 @@ NEED_SME=y
 | 
					@@ -50,7 +50,6 @@ NEED_SME=y
 | 
				
			||||||
 NEED_AP_MLME=y
 | 
					 NEED_AP_MLME=y
 | 
				
			||||||
 NEED_NETLINK=y
 | 
					 NEED_NETLINK=y
 | 
				
			||||||
 NEED_LINUX_IOCTL=y
 | 
					 NEED_LINUX_IOCTL=y
 | 
				
			||||||
@@ -8,7 +8,7 @@
 | 
				
			|||||||
 NEED_RADIOTAP=y
 | 
					 NEED_RADIOTAP=y
 | 
				
			||||||
 NEED_LIBNL=y
 | 
					 NEED_LIBNL=y
 | 
				
			||||||
 endif
 | 
					 endif
 | 
				
			||||||
@@ -111,7 +110,6 @@ DRV_WPA_CFLAGS += -DCONFIG_DRIVER_WEXT
 | 
					@@ -107,7 +106,6 @@ DRV_WPA_CFLAGS += -DCONFIG_DRIVER_WEXT
 | 
				
			||||||
 CONFIG_WIRELESS_EXTENSION=y
 | 
					 CONFIG_WIRELESS_EXTENSION=y
 | 
				
			||||||
 NEED_NETLINK=y
 | 
					 NEED_NETLINK=y
 | 
				
			||||||
 NEED_LINUX_IOCTL=y
 | 
					 NEED_LINUX_IOCTL=y
 | 
				
			||||||
@@ -16,7 +16,7 @@
 | 
				
			|||||||
 endif
 | 
					 endif
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 ifdef CONFIG_DRIVER_NDIS
 | 
					 ifdef CONFIG_DRIVER_NDIS
 | 
				
			||||||
@@ -137,7 +135,6 @@ endif
 | 
					@@ -133,7 +131,6 @@ endif
 | 
				
			||||||
 ifdef CONFIG_WIRELESS_EXTENSION
 | 
					 ifdef CONFIG_WIRELESS_EXTENSION
 | 
				
			||||||
 DRV_WPA_CFLAGS += -DCONFIG_WIRELESS_EXTENSION
 | 
					 DRV_WPA_CFLAGS += -DCONFIG_WIRELESS_EXTENSION
 | 
				
			||||||
 DRV_WPA_OBJS += ../src/drivers/driver_wext.o
 | 
					 DRV_WPA_OBJS += ../src/drivers/driver_wext.o
 | 
				
			||||||
@@ -24,7 +24,7 @@
 | 
				
			|||||||
 endif
 | 
					 endif
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 ifdef NEED_NETLINK
 | 
					 ifdef NEED_NETLINK
 | 
				
			||||||
@@ -146,6 +143,7 @@ endif
 | 
					@@ -142,6 +139,7 @@ endif
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 ifdef NEED_RFKILL
 | 
					 ifdef NEED_RFKILL
 | 
				
			||||||
 DRV_OBJS += ../src/drivers/rfkill.o
 | 
					 DRV_OBJS += ../src/drivers/rfkill.o
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
--- a/src/drivers/driver_nl80211.c
 | 
					--- a/src/drivers/driver_nl80211.c
 | 
				
			||||||
+++ b/src/drivers/driver_nl80211.c
 | 
					+++ b/src/drivers/driver_nl80211.c
 | 
				
			||||||
@@ -4973,7 +4973,7 @@ static int nl80211_set_channel(struct i8
 | 
					@@ -4919,7 +4919,7 @@ static int nl80211_set_channel(struct i8
 | 
				
			||||||
 		   freq->freq, freq->ht_enabled, freq->vht_enabled, freq->he_enabled,
 | 
					 		   freq->freq, freq->ht_enabled, freq->vht_enabled, freq->he_enabled,
 | 
				
			||||||
 		   freq->bandwidth, freq->center_freq1, freq->center_freq2);
 | 
					 		   freq->bandwidth, freq->center_freq1, freq->center_freq2);
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,75 +0,0 @@
 | 
				
			|||||||
--- a/src/ap/hostapd.c
 | 
					 | 
				
			||||||
+++ b/src/ap/hostapd.c
 | 
					 | 
				
			||||||
@@ -115,6 +115,28 @@ static void hostapd_reload_bss(struct ho
 | 
					 | 
				
			||||||
 #endif /* CONFIG_NO_RADIUS */
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 	ssid = &hapd->conf->ssid;
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
+	hostapd_set_freq(hapd, hapd->iconf->hw_mode, hapd->iface->freq,
 | 
					 | 
				
			||||||
+			 hapd->iconf->channel,
 | 
					 | 
				
			||||||
+			 hapd->iconf->enable_edmg,
 | 
					 | 
				
			||||||
+			 hapd->iconf->edmg_channel,
 | 
					 | 
				
			||||||
+			 hapd->iconf->ieee80211n,
 | 
					 | 
				
			||||||
+			 hapd->iconf->ieee80211ac,
 | 
					 | 
				
			||||||
+			 hapd->iconf->ieee80211ax,
 | 
					 | 
				
			||||||
+			 hapd->iconf->secondary_channel,
 | 
					 | 
				
			||||||
+			 hostapd_get_oper_chwidth(hapd->iconf),
 | 
					 | 
				
			||||||
+			 hostapd_get_oper_centr_freq_seg0_idx(hapd->iconf),
 | 
					 | 
				
			||||||
+			 hostapd_get_oper_centr_freq_seg1_idx(hapd->iconf));
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
+	if (hapd->iface->current_mode) {
 | 
					 | 
				
			||||||
+		if (hostapd_prepare_rates(hapd->iface, hapd->iface->current_mode)) {
 | 
					 | 
				
			||||||
+			wpa_printf(MSG_ERROR, "Failed to prepare rates table.");
 | 
					 | 
				
			||||||
+			hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211,
 | 
					 | 
				
			||||||
+				       HOSTAPD_LEVEL_WARNING,
 | 
					 | 
				
			||||||
+				       "Failed to prepare rates table.");
 | 
					 | 
				
			||||||
+		}
 | 
					 | 
				
			||||||
+	}
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
 	if (!ssid->wpa_psk_set && ssid->wpa_psk && !ssid->wpa_psk->next &&
 | 
					 | 
				
			||||||
 	    ssid->wpa_passphrase_set && ssid->wpa_passphrase) {
 | 
					 | 
				
			||||||
 		/*
 | 
					 | 
				
			||||||
@@ -216,6 +238,7 @@ int hostapd_reload_config(struct hostapd
 | 
					 | 
				
			||||||
 	struct hostapd_data *hapd = iface->bss[0];
 | 
					 | 
				
			||||||
 	struct hostapd_config *newconf, *oldconf;
 | 
					 | 
				
			||||||
 	size_t j;
 | 
					 | 
				
			||||||
+	int i;
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 	if (iface->config_fname == NULL) {
 | 
					 | 
				
			||||||
 		/* Only in-memory config in use - assume it has been updated */
 | 
					 | 
				
			||||||
@@ -266,24 +289,20 @@ int hostapd_reload_config(struct hostapd
 | 
					 | 
				
			||||||
 	}
 | 
					 | 
				
			||||||
 	iface->conf = newconf;
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
+	for (i = 0; i < iface->num_hw_features; i++) {
 | 
					 | 
				
			||||||
+		struct hostapd_hw_modes *mode = &iface->hw_features[i];
 | 
					 | 
				
			||||||
+		if (mode->mode == iface->conf->hw_mode) {
 | 
					 | 
				
			||||||
+			iface->current_mode = mode;
 | 
					 | 
				
			||||||
+			break;
 | 
					 | 
				
			||||||
+		}
 | 
					 | 
				
			||||||
+	}
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
+	if (iface->conf->channel)
 | 
					 | 
				
			||||||
+		iface->freq = hostapd_hw_get_freq(hapd, iface->conf->channel);
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
 	for (j = 0; j < iface->num_bss; j++) {
 | 
					 | 
				
			||||||
 		hapd = iface->bss[j];
 | 
					 | 
				
			||||||
 		hapd->iconf = newconf;
 | 
					 | 
				
			||||||
-		hapd->iconf->channel = oldconf->channel;
 | 
					 | 
				
			||||||
-		hapd->iconf->acs = oldconf->acs;
 | 
					 | 
				
			||||||
-		hapd->iconf->secondary_channel = oldconf->secondary_channel;
 | 
					 | 
				
			||||||
-		hapd->iconf->ieee80211n = oldconf->ieee80211n;
 | 
					 | 
				
			||||||
-		hapd->iconf->ieee80211ac = oldconf->ieee80211ac;
 | 
					 | 
				
			||||||
-		hapd->iconf->ht_capab = oldconf->ht_capab;
 | 
					 | 
				
			||||||
-		hapd->iconf->vht_capab = oldconf->vht_capab;
 | 
					 | 
				
			||||||
-		hostapd_set_oper_chwidth(hapd->iconf,
 | 
					 | 
				
			||||||
-					 hostapd_get_oper_chwidth(oldconf));
 | 
					 | 
				
			||||||
-		hostapd_set_oper_centr_freq_seg0_idx(
 | 
					 | 
				
			||||||
-			hapd->iconf,
 | 
					 | 
				
			||||||
-			hostapd_get_oper_centr_freq_seg0_idx(oldconf));
 | 
					 | 
				
			||||||
-		hostapd_set_oper_centr_freq_seg1_idx(
 | 
					 | 
				
			||||||
-			hapd->iconf,
 | 
					 | 
				
			||||||
-			hostapd_get_oper_centr_freq_seg1_idx(oldconf));
 | 
					 | 
				
			||||||
 		hapd->conf = newconf->bss[j];
 | 
					 | 
				
			||||||
 		hostapd_reload_bss(hapd);
 | 
					 | 
				
			||||||
 	}
 | 
					 | 
				
			||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
--- a/src/drivers/driver_nl80211.c
 | 
					--- a/src/drivers/driver_nl80211.c
 | 
				
			||||||
+++ b/src/drivers/driver_nl80211.c
 | 
					+++ b/src/drivers/driver_nl80211.c
 | 
				
			||||||
@@ -2918,10 +2918,15 @@ static int wpa_driver_nl80211_del_beacon
 | 
					@@ -2891,10 +2891,15 @@ static int wpa_driver_nl80211_del_beacon
 | 
				
			||||||
 	struct nl_msg *msg;
 | 
					 	struct nl_msg *msg;
 | 
				
			||||||
 	struct wpa_driver_nl80211_data *drv = bss->drv;
 | 
					 	struct wpa_driver_nl80211_data *drv = bss->drv;
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -18,7 +18,7 @@
 | 
				
			|||||||
 	return send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
 | 
					 	return send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -5602,7 +5607,7 @@ static void nl80211_teardown_ap(struct i
 | 
					@@ -5550,7 +5555,7 @@ static void nl80211_teardown_ap(struct i
 | 
				
			||||||
 		nl80211_mgmt_unsubscribe(bss, "AP teardown");
 | 
					 		nl80211_mgmt_unsubscribe(bss, "AP teardown");
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 	nl80211_put_wiphy_data_ap(bss);
 | 
					 	nl80211_put_wiphy_data_ap(bss);
 | 
				
			||||||
@@ -27,7 +27,7 @@
 | 
				
			|||||||
 }
 | 
					 }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -8051,8 +8056,6 @@ static int wpa_driver_nl80211_if_remove(
 | 
					@@ -7990,8 +7995,6 @@ static int wpa_driver_nl80211_if_remove(
 | 
				
			||||||
 	} else {
 | 
					 	} else {
 | 
				
			||||||
 		wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context");
 | 
					 		wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context");
 | 
				
			||||||
 		nl80211_teardown_ap(bss);
 | 
					 		nl80211_teardown_ap(bss);
 | 
				
			||||||
@@ -36,7 +36,7 @@
 | 
				
			|||||||
 		nl80211_destroy_bss(bss);
 | 
					 		nl80211_destroy_bss(bss);
 | 
				
			||||||
 		if (!bss->added_if)
 | 
					 		if (!bss->added_if)
 | 
				
			||||||
 			i802_set_iface_flags(bss, 0);
 | 
					 			i802_set_iface_flags(bss, 0);
 | 
				
			||||||
@@ -8449,7 +8452,6 @@ static int wpa_driver_nl80211_deinit_ap(
 | 
					@@ -8388,7 +8391,6 @@ static int wpa_driver_nl80211_deinit_ap(
 | 
				
			||||||
 	if (!is_ap_interface(drv->nlmode))
 | 
					 	if (!is_ap_interface(drv->nlmode))
 | 
				
			||||||
 		return -1;
 | 
					 		return -1;
 | 
				
			||||||
 	wpa_driver_nl80211_del_beacon(bss);
 | 
					 	wpa_driver_nl80211_del_beacon(bss);
 | 
				
			||||||
@@ -44,7 +44,7 @@
 | 
				
			|||||||
 
 | 
					 
 | 
				
			||||||
 	/*
 | 
					 	/*
 | 
				
			||||||
 	 * If the P2P GO interface was dynamically added, then it is
 | 
					 	 * If the P2P GO interface was dynamically added, then it is
 | 
				
			||||||
@@ -8469,7 +8471,6 @@ static int wpa_driver_nl80211_stop_ap(vo
 | 
					@@ -8408,7 +8410,6 @@ static int wpa_driver_nl80211_stop_ap(vo
 | 
				
			||||||
 	if (!is_ap_interface(drv->nlmode))
 | 
					 	if (!is_ap_interface(drv->nlmode))
 | 
				
			||||||
 		return -1;
 | 
					 		return -1;
 | 
				
			||||||
 	wpa_driver_nl80211_del_beacon(bss);
 | 
					 	wpa_driver_nl80211_del_beacon(bss);
 | 
				
			||||||
 
 | 
				
			|||||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user