brcm63xx: Add DT support for P870HW-51a
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> [jogo: fix nvram partition offset] Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 42248
This commit is contained in:
		
							
								
								
									
										30
									
								
								target/linux/brcm63xx/dts/p870hw-51a-v2.dts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								target/linux/brcm63xx/dts/p870hw-51a-v2.dts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
				
			|||||||
 | 
					/dts-v1/;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/include/ "bcm6368.dtsi"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/ {
 | 
				
			||||||
 | 
						model = "Zyxel P870HW-51a v2";
 | 
				
			||||||
 | 
						compatible = "zyxel,p870hw-51a-v2", "brcm,bcm6368";
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					&pflash {
 | 
				
			||||||
 | 
						status = "ok";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						linux,part-probe = "bcm63xxpart";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						cfe@0 {
 | 
				
			||||||
 | 
							label = "CFE";
 | 
				
			||||||
 | 
							reg = <0x000000 0x010000>;
 | 
				
			||||||
 | 
							read-only;
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						linux@10000 {
 | 
				
			||||||
 | 
							label = "linux";
 | 
				
			||||||
 | 
							reg = <0x010000 0x3e0000>;
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						nvram@3f0000 {
 | 
				
			||||||
 | 
							label = "nvram";
 | 
				
			||||||
 | 
							reg = <0x3f0000 0x010000>;
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
@@ -57,6 +57,20 @@ define Image/Build/CFEDTB
 | 
				
			|||||||
		$(7) $(8) $(9) $(10)
 | 
							$(7) $(8) $(9) $(10)
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					define Image/Build/ZYXCFEDTB
 | 
				
			||||||
 | 
						# Generate the tagged image
 | 
				
			||||||
 | 
						$(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux-$(2).lzma.cfe -f $(KDIR)/root.$(1) \
 | 
				
			||||||
 | 
							--output $(BIN_DIR)/openwrt-$(5)-$(1).tmp \
 | 
				
			||||||
 | 
							--boardid $(3) --chipid $(4) --entry $(KERNEL_ENTRY) \
 | 
				
			||||||
 | 
							--load-addr $(LOADADDR) --rsa-signature "$(6)" \
 | 
				
			||||||
 | 
							--info1 "-$(call Image/LimitName16,$(5))" --info2 $(1) \
 | 
				
			||||||
 | 
							$(7) $(8) $(9) $(10)
 | 
				
			||||||
 | 
						# Fix up header
 | 
				
			||||||
 | 
						$(STAGING_DIR_HOST)/bin/zyxbcm -i $(BIN_DIR)/openwrt-$(5)-$(1).tmp \
 | 
				
			||||||
 | 
							-o $(BIN_DIR)/openwrt-$(5)-$(1)-zyxcfe.bin
 | 
				
			||||||
 | 
						rm -f $(BIN_DIR)/openwrt-$(5)-$(1).tmp
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Image/Build/CFEAGPF
 | 
					define Image/Build/CFEAGPF
 | 
				
			||||||
	# Generate the tagged image
 | 
						# Generate the tagged image
 | 
				
			||||||
	$(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux.lzma.cfe -f $(KDIR)/root.$(1) \
 | 
						$(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux.lzma.cfe -f $(KDIR)/root.$(1) \
 | 
				
			||||||
@@ -99,20 +113,6 @@ define Image/Build/SPW303V
 | 
				
			|||||||
	rm -f $(BIN_DIR)/openwrt-$(4)-$(1)-cfe.bin.tmp
 | 
						rm -f $(BIN_DIR)/openwrt-$(4)-$(1)-cfe.bin.tmp
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Image/Build/ZyXEL
 | 
					 | 
				
			||||||
	# Generate the tagged image
 | 
					 | 
				
			||||||
	$(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux.lzma.cfe -f $(KDIR)/root.$(1) \
 | 
					 | 
				
			||||||
		--output $(BIN_DIR)/openwrt-$(5)-$(1).tmp \
 | 
					 | 
				
			||||||
		--boardid $(2) --chipid $(4) --entry $(KERNEL_ENTRY) \
 | 
					 | 
				
			||||||
		--load-addr $(LOADADDR) --rsa-signature "$(6)" \
 | 
					 | 
				
			||||||
		--info1 "+$(call Image/LimitName16,$(3))" --info2 $(1) \
 | 
					 | 
				
			||||||
		$(7) $(8) $(9) $(10)
 | 
					 | 
				
			||||||
	# Fix up header
 | 
					 | 
				
			||||||
	$(STAGING_DIR_HOST)/bin/zyxbcm -i $(BIN_DIR)/openwrt-$(5)-$(1).tmp \
 | 
					 | 
				
			||||||
		-o $(BIN_DIR)/openwrt-$(5)-$(1)-cfe.bin
 | 
					 | 
				
			||||||
	rm -f $(BIN_DIR)/openwrt-$(5)-$(1).tmp
 | 
					 | 
				
			||||||
endef
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
define Image/Build/CFEOLD
 | 
					define Image/Build/CFEOLD
 | 
				
			||||||
	$(TOPDIR)/scripts/brcmImage.pl -t -p	\
 | 
						$(TOPDIR)/scripts/brcmImage.pl -t -p	\
 | 
				
			||||||
		-b $(2) -c $(3)			\
 | 
							-b $(2) -c $(3)			\
 | 
				
			||||||
@@ -212,6 +212,24 @@ define CfeImageDTB
 | 
				
			|||||||
  TARGET_$(1)_IMAGES += $(5)
 | 
					  TARGET_$(1)_IMAGES += $(5)
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# $(1) = Profile
 | 
				
			||||||
 | 
					# $(2) = dtb
 | 
				
			||||||
 | 
					# $(3) = boardname
 | 
				
			||||||
 | 
					# $(4) = chipid
 | 
				
			||||||
 | 
					# $(5) = imagename
 | 
				
			||||||
 | 
					# $(6) = rsa signature
 | 
				
			||||||
 | 
					# $(7) = additional options
 | 
				
			||||||
 | 
					define ZyxCfeImageDTB
 | 
				
			||||||
 | 
					  define Image/Build/$(5)
 | 
				
			||||||
 | 
					    $$(call Image/Build/ZYXCFEDTB,$$(1),$(2),$(3),$(4),$(5),$(6),$(7))
 | 
				
			||||||
 | 
					  endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  TARGET_Default_DTBS += $(2)
 | 
				
			||||||
 | 
					  TARGET_Default_IMAGES += $(5)
 | 
				
			||||||
 | 
					  TARGET_$(1)_DTBS += $(2)
 | 
				
			||||||
 | 
					  TARGET_$(1)_IMAGES += $(5)
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Image/Build
 | 
					define Image/Build
 | 
				
			||||||
	dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
 | 
						dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
 | 
				
			||||||
@@ -252,8 +270,6 @@ define Image/Build
 | 
				
			|||||||
	$(call Image/Build/CFE,$(1),RTA1025W_16,6348,RTA1025W_16,,--layoutver 5)
 | 
						$(call Image/Build/CFE,$(1),RTA1025W_16,6348,RTA1025W_16,,--layoutver 5)
 | 
				
			||||||
	# RTA1320_16M (numerous routers)
 | 
						# RTA1320_16M (numerous routers)
 | 
				
			||||||
	$(call Image/Build/CFE,$(1),RTA1320_16M,6338,RTA1320_16M,,--layoutver 5)
 | 
						$(call Image/Build/CFE,$(1),RTA1320_16M,6338,RTA1320_16M,,--layoutver 5)
 | 
				
			||||||
	# Zyxel P870HW-51a v2
 | 
					 | 
				
			||||||
	$(call Image/Build/ZyXEL,$(1),96368VVW,P870HW-51a_v2,6368,P870HW-51a_v2,ZyXEL,--signature "ZyXEL_0001")
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	# Sagem F@ST2504n
 | 
						# Sagem F@ST2504n
 | 
				
			||||||
	$(call Image/Build/CFE,$(1),F@ST2504n,6362,F@ST2504n,OpenWRT-$(REVISION))
 | 
						$(call Image/Build/CFE,$(1),F@ST2504n,6362,F@ST2504n,OpenWRT-$(REVISION))
 | 
				
			||||||
@@ -373,5 +389,7 @@ $(eval $(call CfeImageDTB,Neufbox4,nb4-ser-r0,96358VW,6358,NEUFBOX4-SER,OpenWRT-
 | 
				
			|||||||
$(eval $(call CfeImageDTB,Neufbox4,nb4-fxc-r1,96358VW,6358,NEUFBOX4-FXC,OpenWRT-$(REVISION)))
 | 
					$(eval $(call CfeImageDTB,Neufbox4,nb4-fxc-r1,96358VW,6358,NEUFBOX4-FXC,OpenWRT-$(REVISION)))
 | 
				
			||||||
# SFR neufbox 6
 | 
					# SFR neufbox 6
 | 
				
			||||||
$(eval $(call CfeImageDTB,Neufbox6,nb6-ser-r0,NB6-SER-r0,6362,NEUFBOX6,OpenWRT-$(REVISION)))
 | 
					$(eval $(call CfeImageDTB,Neufbox6,nb6-ser-r0,NB6-SER-r0,6362,NEUFBOX6,OpenWRT-$(REVISION)))
 | 
				
			||||||
 | 
					# ZyXEL P870HW-51a v2
 | 
				
			||||||
 | 
					$(eval $(call ZyxCfeImageDTB,P870HW_51a_v2,p870hw-51a-v2,96368VVW,6368,P870HW-51a_v2,ZyXEL,--signature "ZyXEL_0001"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(eval $(call BuildImage))
 | 
					$(eval $(call BuildImage))
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,11 +1,12 @@
 | 
				
			|||||||
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 | 
					--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 | 
				
			||||||
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
 | 
					+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
 | 
				
			||||||
@@ -4180,6 +4180,96 @@ static struct sprom_fixup __initdata vr3
 | 
					@@ -4180,6 +4180,97 @@ static struct sprom_fixup __initdata vr3
 | 
				
			||||||
 	{ .offset = 115, .value = 0xfad9 },
 | 
					 	{ .offset = 115, .value = 0xfad9 },
 | 
				
			||||||
 };
 | 
					 };
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
+static struct board_info __initdata board_P870HW51A_V2 = {
 | 
					+static struct board_info __initdata board_P870HW51A_V2 = {
 | 
				
			||||||
+	.name				= "P870HW-51a_v2",
 | 
					+	.name				= "P870HW-51a_v2",
 | 
				
			||||||
 | 
					+	.of_board_id			= "zyxel,p870hw-51a-v2",
 | 
				
			||||||
+	.expected_cpu_id		= 0x6368,
 | 
					+	.expected_cpu_id		= 0x6368,
 | 
				
			||||||
+
 | 
					+
 | 
				
			||||||
+	.has_uart0			= 1,
 | 
					+	.has_uart0			= 1,
 | 
				
			||||||
@@ -97,7 +98,7 @@
 | 
				
			|||||||
 static struct board_info __initdata board_VR3025u = {
 | 
					 static struct board_info __initdata board_VR3025u = {
 | 
				
			||||||
 	.name					= "96368M-1541N",
 | 
					 	.name					= "96368M-1541N",
 | 
				
			||||||
 	.of_board_id			= "comtrend,vr-3025u",
 | 
					 	.of_board_id			= "comtrend,vr-3025u",
 | 
				
			||||||
@@ -4883,6 +4973,7 @@ static const struct board_info __initcon
 | 
					@@ -4883,6 +4974,7 @@ static const struct board_info __initcon
 | 
				
			||||||
 #ifdef CONFIG_BCM63XX_CPU_6368
 | 
					 #ifdef CONFIG_BCM63XX_CPU_6368
 | 
				
			||||||
 	&board_96368mvwg,
 | 
					 	&board_96368mvwg,
 | 
				
			||||||
 	&board_96368mvngr,
 | 
					 	&board_96368mvngr,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -58,7 +58,7 @@
 | 
				
			|||||||
 static struct board_info __initdata board_HW553 = {
 | 
					 static struct board_info __initdata board_HW553 = {
 | 
				
			||||||
 	.name                           = "HW553",
 | 
					 	.name                           = "HW553",
 | 
				
			||||||
 	.of_board_id					= "huawei,hg553",
 | 
					 	.of_board_id					= "huawei,hg553",
 | 
				
			||||||
@@ -4957,6 +5008,7 @@ static const struct board_info __initcon
 | 
					@@ -4958,6 +5009,7 @@ static const struct board_info __initcon
 | 
				
			||||||
 	&board_nb4_ser_r0,
 | 
					 	&board_nb4_ser_r0,
 | 
				
			||||||
 	&board_nb4_fxc_r1,
 | 
					 	&board_nb4_fxc_r1,
 | 
				
			||||||
 	&board_ct6373_1,
 | 
					 	&board_ct6373_1,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -97,7 +97,7 @@
 | 
				
			|||||||
 static struct board_info __initdata board_A4001N1 = {
 | 
					 static struct board_info __initdata board_A4001N1 = {
 | 
				
			||||||
 	.name					= "963281T_TEF",
 | 
					 	.name					= "963281T_TEF",
 | 
				
			||||||
 	.of_board_id			= "adb,a4001n1",
 | 
					 	.of_board_id			= "adb,a4001n1",
 | 
				
			||||||
@@ -4959,6 +5049,7 @@ static const struct board_info __initcon
 | 
					@@ -4960,6 +5050,7 @@ static const struct board_info __initcon
 | 
				
			||||||
 	&board_AR5381u,
 | 
					 	&board_AR5381u,
 | 
				
			||||||
 	&board_AR5387un,
 | 
					 	&board_AR5387un,
 | 
				
			||||||
 	&board_963281TAN,
 | 
					 	&board_963281TAN,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -142,7 +142,7 @@
 | 
				
			|||||||
 #endif /* CONFIG_BCM63XX_CPU_6318 */
 | 
					 #endif /* CONFIG_BCM63XX_CPU_6318 */
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 /*
 | 
					 /*
 | 
				
			||||||
@@ -5043,6 +5178,7 @@ static const struct board_info __initcon
 | 
					@@ -5044,6 +5179,7 @@ static const struct board_info __initcon
 | 
				
			||||||
 #ifdef CONFIG_BCM63XX_CPU_6318
 | 
					 #ifdef CONFIG_BCM63XX_CPU_6318
 | 
				
			||||||
 	&board_96318ref,
 | 
					 	&board_96318ref,
 | 
				
			||||||
 	&board_96318ref_p300,
 | 
					 	&board_96318ref_p300,
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										15
									
								
								target/linux/brcm63xx/profiles/zyxel.mk
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								target/linux/brcm63xx/profiles/zyxel.mk
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
				
			|||||||
 | 
					#
 | 
				
			||||||
 | 
					# Copyright (C) 2014 OpenWrt.org
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# This is free software, licensed under the GNU General Public License v2.
 | 
				
			||||||
 | 
					# See /LICENSE for more information.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					define Profile/P870HW_51a_v2
 | 
				
			||||||
 | 
					  NAME:=ZyXEL P870HW-51a v2
 | 
				
			||||||
 | 
					  PACKAGES:=kmod-b43 wpad-mini
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					define Profile/P870HW_51a_v2/Description
 | 
				
			||||||
 | 
					  Package set optimized for P870HW-51a v2.
 | 
				
			||||||
 | 
					endef
 | 
				
			||||||
 | 
					$(eval $(call Profile,P870HW_51a_v2))
 | 
				
			||||||
		Reference in New Issue
	
	Block a user