Skip to contentSkip to conversation

mips: rename arch mt7620 to mt7628

PATCH New Weijie Gao 3 participants 6 messages Apr 28, 2019 – Apr 30, 2019

Subsystems (7)
lore
Share & tools
lore

Weijie Gao

author
#0 lore raw

PATCH 1/1 mips: rename arch mt7620 to mt7628

The MediaTek MT7620 and MT7628 SoCs are different.
Although they use the same memory controller, the lowlevel code (CPU PLL) and other peripherals they use are totally different. Which means they should use seperate mach directories.

Currently the mach mt7620 contains only architecture code of MT7628. In case we add real arch support of MT7620 in the future, the arch should be renamed to mt7628, including both Kconfig files and directories. Other files affected are also modified.

Cc Stefan Roese <[email protected]>
Cc Daniel Schwierzeck <[email protected]>
---
 arch/mips/Kconfig                                |  6 +++---
 arch/mips/Makefile                               |  2 +-
 arch/mips/dts/Makefile                           |  2 +-
 arch/mips/{mach-mt7620 => mach-mt7628}/Kconfig   | 16 ++++++++--------
 arch/mips/{mach-mt7620 => mach-mt7628}/Makefile  |  0
 arch/mips/{mach-mt7620 => mach-mt7628}/cpu.c     |  0
 .../{mach-mt7620 => mach-mt7628}/ddr_calibrate.c |  0
 .../{mach-mt7620 => mach-mt7628}/lowlevel_init.S |  0
 arch/mips/{mach-mt7620 => mach-mt7628}/mt76xx.h  |  0
 configs/linkit-smart-7688-ram_defconfig          |  2 +-
 configs/linkit-smart-7688_defconfig              |  2 +-
 drivers/gpio/Kconfig                             |  2 +-
 drivers/net/Kconfig                              |  2 +-
 drivers/spi/Kconfig                              |  2 +-
 drivers/watchdog/Kconfig                         |  2 +-
 15 files changed, 19 insertions(+), 19 deletions(-)
 rename arch/mips/{mach-mt7620 => mach-mt7628}/Kconfig (92%)
 rename arch/mips/{mach-mt7620 => mach-mt7628}/Makefile (100%)
 rename arch/mips/{mach-mt7620 => mach-mt7628}/cpu.c (100%)
 rename arch/mips/{mach-mt7620 => mach-mt7628}/ddr_calibrate.c (100%)
 rename arch/mips/{mach-mt7620 => mach-mt7628}/lowlevel_init.S (100%)
 rename arch/mips/{mach-mt7620 => mach-mt7628}/mt76xx.h (100%)
arch/mips/Kconfig +3 -3
index 194f4f349e..fc861c8273 100644
@@ -74,8 +74,8 @@ config ARCH_BMIPS
 	select SYSRESET
 	imply CMD_DM
 
-config ARCH_MT7620
-	bool "Support MT7620/7688 SoCs"
+config ARCH_MT7628
+	bool "Support MediaTek MT7628/7688 SoCs"
 	imply CMD_DM
 	select DISPLAY_CPUINFO
 	select DM
@@ -153,7 +153,7 @@ source "arch/mips/mach-mscc/Kconfig"
 source "arch/mips/mach-bmips/Kconfig"
 source "arch/mips/mach-jz47xx/Kconfig"
 source "arch/mips/mach-pic32/Kconfig"
-source "arch/mips/mach-mt7620/Kconfig"
+source "arch/mips/mach-mt7628/Kconfig"
 
 if MIPS
 
arch/mips/Makefile +1 -1
index 029d290f1e..da5b9c0e74 100644
@@ -15,7 +15,7 @@ machine-$(CONFIG_ARCH_ATH79) += ath79
 machine-$(CONFIG_ARCH_BMIPS) += bmips
 machine-$(CONFIG_ARCH_JZ47XX) += jz47xx
 machine-$(CONFIG_MACH_PIC32) += pic32
-machine-$(CONFIG_ARCH_MT7620) += mt7620
+machine-$(CONFIG_ARCH_MT7628) += mt7628
 machine-$(CONFIG_ARCH_MSCC) += mscc
 
 machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y))
arch/mips/dts/Makefile +1 -1
index 3522e6cdc8..1c4ad5207d 100644
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0+
 
-dtb-$(CONFIG_ARCH_MT7620) += \
+dtb-$(CONFIG_ARCH_MT7628) += \
 	gardena-smart-gateway-mt7688.dtb \
 	linkit-smart-7688.dtb
 dtb-$(CONFIG_TARGET_AP121) += ap121.dtb
arch/mips/mach-mt7628/Kconfig renamed from arch/mips/mach-mt7620/Kconfig +8 -8
similarity index 92%
rename from arch/mips/mach-mt7620/Kconfig
rename to arch/mips/mach-mt7628/Kconfig
index a983443999..6a46640479 100644
@@ -1,20 +1,20 @@
-menu "MediaTek MIPS platforms"
-	depends on ARCH_MT7620
+menu "MediaTek MT7628/7688 platforms"
+	depends on ARCH_MT7628
 
 config SYS_MALLOC_F_LEN
 	default 0x1000
 
 config SYS_SOC
-	default "mt7620" if SOC_MT7620
+	default "mt7628" if SOC_MT7628
 
 choice
 	prompt "MediaTek MIPS SoC select"
 
-config SOC_MT7620
-	bool "MT7620/8"
+config SOC_MT7628
+	bool "MT7628/7688"
 	select MIPS_L1_CACHE_SHIFT_5
 	help
-	  This supports MediaTek MIPS MT7620 family.
+	  This supports MediaTek MT7628/7688 SoCs.
 
 endchoice
 
@@ -23,7 +23,7 @@ choice
 
 config BOARD_GARDENA_SMART_GATEWAY_MT7688
 	bool "GARDENA smart Gateway"
-	depends on SOC_MT7620
+	depends on SOC_MT7628
 	select BOARD_LATE_INIT
 	select SUPPORTS_BOOT_RAM
 	help
@@ -32,7 +32,7 @@ config BOARD_GARDENA_SMART_GATEWAY_MT7688
 
 config BOARD_LINKIT_SMART_7688
 	bool "LinkIt Smart 7688"
-	depends on SOC_MT7620
+	depends on SOC_MT7628
 	select SUPPORTS_BOOT_RAM
 	help
 	  Seeed LinkIt Smart 7688 boards have a MT7688 SoC with 128 MiB of RAM
arch/mips/mach-mt7628/Makefile renamed from arch/mips/mach-mt7620/Makefile +0 -0
similarity index 100%
rename from arch/mips/mach-mt7620/Makefile
rename to arch/mips/mach-mt7628/Makefile
arch/mips/mach-mt7628/cpu.c renamed from arch/mips/mach-mt7620/cpu.c +0 -0
similarity index 100%
rename from arch/mips/mach-mt7620/cpu.c
rename to arch/mips/mach-mt7628/cpu.c
arch/mips/mach-mt7628/ddr_calibrate.c renamed from arch/mips/mach-mt7620/ddr_calibrate.c +0 -0
similarity index 100%
rename from arch/mips/mach-mt7620/ddr_calibrate.c
rename to arch/mips/mach-mt7628/ddr_calibrate.c
arch/mips/mach-mt7628/lowlevel_init.S renamed from arch/mips/mach-mt7620/lowlevel_init.S +0 -0
similarity index 100%
rename from arch/mips/mach-mt7620/lowlevel_init.S
rename to arch/mips/mach-mt7628/lowlevel_init.S
arch/mips/mach-mt7628/mt76xx.h renamed from arch/mips/mach-mt7620/mt76xx.h +0 -0
similarity index 100%
rename from arch/mips/mach-mt7620/mt76xx.h
rename to arch/mips/mach-mt7628/mt76xx.h
configs/linkit-smart-7688-ram_defconfig +1 -1
index 649db0f67d..6705740fdc 100644
@@ -1,6 +1,6 @@
 CONFIG_MIPS=y
 CONFIG_SYS_TEXT_BASE=0x80010000
-CONFIG_ARCH_MT7620=y
+CONFIG_ARCH_MT7628=y
 CONFIG_BOARD_LINKIT_SMART_7688=y
 # CONFIG_MIPS_BOOT_ENV_LEGACY is not set
 CONFIG_MIPS_BOOT_FDT=y
configs/linkit-smart-7688_defconfig +1 -1
index 41aa900e56..d276114a14 100644
@@ -1,6 +1,6 @@
 CONFIG_MIPS=y
 CONFIG_SYS_TEXT_BASE=0x9c000000
-CONFIG_ARCH_MT7620=y
+CONFIG_ARCH_MT7628=y
 CONFIG_BOARD_LINKIT_SMART_7688=y
 CONFIG_BOOT_ROM=y
 CONFIG_ONBOARD_DDR2_SIZE_1024MBIT=y
drivers/gpio/Kconfig +1 -1
index b3e4ecc50e..131ea11cec 100644
@@ -351,7 +351,7 @@ config MPC8XXX_GPIO
 
 config MT7621_GPIO
 	bool "MediaTek MT7621 GPIO driver"
-	depends on DM_GPIO && ARCH_MT7620
+	depends on DM_GPIO && ARCH_MT7628
 	default y
 	help
 	  Say yes here to support MediaTek MT7621 compatible GPIOs.
drivers/net/Kconfig +1 -1
index 6e436b56ab..0c0932f63a 100644
@@ -269,7 +269,7 @@ config MACB_ZYNQ
 
 config MT7628_ETH
 	bool "MediaTek MT7628 Ethernet Interface"
-	depends on ARCH_MT7620
+	depends on ARCH_MT7628
 	help
 	  The MediaTek MT7628 ethernet interface is used on MT7628 and
 	  MT7688 based boards.
drivers/spi/Kconfig +1 -1
index fb794adae7..b2b5061490 100644
@@ -133,7 +133,7 @@ config MPC8XX_SPI
 
 config MT7621_SPI
 	bool "MediaTek MT7621 SPI driver"
-	depends on ARCH_MT7620
+	depends on ARCH_MT7628
 	help
 	  Enable the MT7621 SPI driver. This driver can be used to access
 	  the SPI NOR flash on platforms embedding this Ralink / MediaTek
drivers/watchdog/Kconfig +1 -1
index 3bce0aa0b8..0f7d827581 100644
@@ -143,7 +143,7 @@ config WDT_AT91
 
 config WDT_MT7621
 	bool "MediaTek MT7621 watchdog timer support"
-	depends on WDT && ARCH_MT7620
+	depends on WDT && ARCH_MT7628
 	help
 	   Select this to enable Ralink / Mediatek watchdog timer,
 	   which can be found on some MediaTek chips.
Signature · 1 line
2.18.0
#1 lore raw

PATCH 1/1 mips: rename arch mt7620 to mt7628

Quoted 4 lines · Weijie Gao

The MediaTek MT7620 and MT7628 SoCs are different.
Although they use the same memory controller, the lowlevel code (CPU PLL) and other peripherals they use are totally different. Which means they should use seperate mach directories.

s/seperate/separate

Quoted 4 lines

Currently the mach mt7620 contains only architecture code of MT7628. In case we add real arch support of MT7620 in the future, the arch should be renamed to mt7628, including both Kconfig files and directories. Other files affected are also modified.

Perhaps it would be possible to support both SoC's (MT7620 and MT7628/88) in one mach directory? Frankly I don't know the differences in detail, so its your call.

Quoted 15 lines
Cc Stefan Roese <[email protected]>
Cc Daniel Schwierzeck <[email protected]>
---
  arch/mips/Kconfig                                |  6 +++---
  arch/mips/Makefile                               |  2 +-
  arch/mips/dts/Makefile                           |  2 +-
  arch/mips/{mach-mt7620 => mach-mt7628}/Kconfig   | 16 ++++++++--------
  arch/mips/{mach-mt7620 => mach-mt7628}/Makefile  |  0
  arch/mips/{mach-mt7620 => mach-mt7628}/cpu.c     |  0
  .../{mach-mt7620 => mach-mt7628}/ddr_calibrate.c |  0
  .../{mach-mt7620 => mach-mt7628}/lowlevel_init.S |  0
  arch/mips/{mach-mt7620 => mach-mt7628}/mt76xx.h  |  0
  configs/linkit-smart-7688-ram_defconfig          |  2 +-
  configs/linkit-smart-7688_defconfig              |  2 +-

You missed updating the gardena defconfig files:

$ git grep MT7620
configs/gardena-smart-gateway-mt7688-ram_defconfig:CONFIG_ARCH_MT7620=y
configs/gardena-smart-gateway-mt7688_defconfig:CONFIG_ARCH_MT7620=y

Other than this:

Thanks,
Stefan

Quoted 202 lines
  drivers/gpio/Kconfig                             |  2 +-
  drivers/net/Kconfig                              |  2 +-
  drivers/spi/Kconfig                              |  2 +-
  drivers/watchdog/Kconfig                         |  2 +-
  15 files changed, 19 insertions(+), 19 deletions(-)

rename arch/mips/{mach-mt7620 => mach-mt7628}/Kconfig (92%) rename arch/mips/{mach-mt7620 => mach-mt7628}/Makefile (100%) rename arch/mips/{mach-mt7620 => mach-mt7628}/cpu.c (100%) rename arch/mips/{mach-mt7620 => mach-mt7628}/ddr_calibrate.c (100%) rename arch/mips/{mach-mt7620 => mach-mt7628}/lowlevel_init.S (100%) rename arch/mips/{mach-mt7620 => mach-mt7628}/mt76xx.h (100%)

arch/mips/Kconfig +3 -3
index 194f4f349e..fc861c8273 100644
@@ -74,8 +74,8 @@ config ARCH_BMIPS
  	select SYSRESET
  	imply CMD_DM
 
-config ARCH_MT7620
-	bool "Support MT7620/7688 SoCs"
+config ARCH_MT7628
+	bool "Support MediaTek MT7628/7688 SoCs"
  	imply CMD_DM
  	select DISPLAY_CPUINFO
  	select DM
@@ -153,7 +153,7 @@ source "arch/mips/mach-mscc/Kconfig"
  source "arch/mips/mach-bmips/Kconfig"
  source "arch/mips/mach-jz47xx/Kconfig"
  source "arch/mips/mach-pic32/Kconfig"
-source "arch/mips/mach-mt7620/Kconfig"
+source "arch/mips/mach-mt7628/Kconfig"
 
  if MIPS
 
arch/mips/Makefile +1 -1
index 029d290f1e..da5b9c0e74 100644
@@ -15,7 +15,7 @@ machine-$(CONFIG_ARCH_ATH79) += ath79
  machine-$(CONFIG_ARCH_BMIPS) += bmips
  machine-$(CONFIG_ARCH_JZ47XX) += jz47xx
  machine-$(CONFIG_MACH_PIC32) += pic32
-machine-$(CONFIG_ARCH_MT7620) += mt7620
+machine-$(CONFIG_ARCH_MT7628) += mt7628
  machine-$(CONFIG_ARCH_MSCC) += mscc
 
  machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y))
arch/mips/dts/Makefile +1 -1
index 3522e6cdc8..1c4ad5207d 100644
@@ -1,6 +1,6 @@
  # SPDX-License-Identifier: GPL-2.0+
 
-dtb-$(CONFIG_ARCH_MT7620) += \
+dtb-$(CONFIG_ARCH_MT7628) += \
  	gardena-smart-gateway-mt7688.dtb \
  	linkit-smart-7688.dtb
  dtb-$(CONFIG_TARGET_AP121) += ap121.dtb
arch/mips/mach-mt7628/Kconfig renamed from arch/mips/mach-mt7620/Kconfig +8 -8
similarity index 92%
rename from arch/mips/mach-mt7620/Kconfig
rename to arch/mips/mach-mt7628/Kconfig
index a983443999..6a46640479 100644
@@ -1,20 +1,20 @@
-menu "MediaTek MIPS platforms"
-	depends on ARCH_MT7620
+menu "MediaTek MT7628/7688 platforms"
+	depends on ARCH_MT7628
 
  config SYS_MALLOC_F_LEN
  	default 0x1000
 
  config SYS_SOC
-	default "mt7620" if SOC_MT7620
+	default "mt7628" if SOC_MT7628
 
  choice
  	prompt "MediaTek MIPS SoC select"
 
-config SOC_MT7620
-	bool "MT7620/8"
+config SOC_MT7628
+	bool "MT7628/7688"
  	select MIPS_L1_CACHE_SHIFT_5
  	help
-	  This supports MediaTek MIPS MT7620 family.
+	  This supports MediaTek MT7628/7688 SoCs.
 
  endchoice
 
@@ -23,7 +23,7 @@ choice
 
  config BOARD_GARDENA_SMART_GATEWAY_MT7688
  	bool "GARDENA smart Gateway"
-	depends on SOC_MT7620
+	depends on SOC_MT7628
  	select BOARD_LATE_INIT
  	select SUPPORTS_BOOT_RAM
  	help
@@ -32,7 +32,7 @@ config BOARD_GARDENA_SMART_GATEWAY_MT7688
 
  config BOARD_LINKIT_SMART_7688
  	bool "LinkIt Smart 7688"
-	depends on SOC_MT7620
+	depends on SOC_MT7628
  	select SUPPORTS_BOOT_RAM
  	help
  	  Seeed LinkIt Smart 7688 boards have a MT7688 SoC with 128 MiB of RAM
arch/mips/mach-mt7628/Makefile renamed from arch/mips/mach-mt7620/Makefile +0 -0
similarity index 100%
rename from arch/mips/mach-mt7620/Makefile
rename to arch/mips/mach-mt7628/Makefile
arch/mips/mach-mt7628/cpu.c renamed from arch/mips/mach-mt7620/cpu.c +0 -0
similarity index 100%
rename from arch/mips/mach-mt7620/cpu.c
rename to arch/mips/mach-mt7628/cpu.c
arch/mips/mach-mt7628/ddr_calibrate.c renamed from arch/mips/mach-mt7620/ddr_calibrate.c +0 -0
similarity index 100%
rename from arch/mips/mach-mt7620/ddr_calibrate.c
rename to arch/mips/mach-mt7628/ddr_calibrate.c
arch/mips/mach-mt7628/lowlevel_init.S renamed from arch/mips/mach-mt7620/lowlevel_init.S +0 -0
similarity index 100%
rename from arch/mips/mach-mt7620/lowlevel_init.S
rename to arch/mips/mach-mt7628/lowlevel_init.S
arch/mips/mach-mt7628/mt76xx.h renamed from arch/mips/mach-mt7620/mt76xx.h +0 -0
similarity index 100%
rename from arch/mips/mach-mt7620/mt76xx.h
rename to arch/mips/mach-mt7628/mt76xx.h
configs/linkit-smart-7688-ram_defconfig +1 -1
index 649db0f67d..6705740fdc 100644
@@ -1,6 +1,6 @@
  CONFIG_MIPS=y
  CONFIG_SYS_TEXT_BASE=0x80010000
-CONFIG_ARCH_MT7620=y
+CONFIG_ARCH_MT7628=y
  CONFIG_BOARD_LINKIT_SMART_7688=y
  # CONFIG_MIPS_BOOT_ENV_LEGACY is not set
  CONFIG_MIPS_BOOT_FDT=y
configs/linkit-smart-7688_defconfig +1 -1
index 41aa900e56..d276114a14 100644
@@ -1,6 +1,6 @@
  CONFIG_MIPS=y
  CONFIG_SYS_TEXT_BASE=0x9c000000
-CONFIG_ARCH_MT7620=y
+CONFIG_ARCH_MT7628=y
  CONFIG_BOARD_LINKIT_SMART_7688=y
  CONFIG_BOOT_ROM=y
  CONFIG_ONBOARD_DDR2_SIZE_1024MBIT=y
drivers/gpio/Kconfig +1 -1
index b3e4ecc50e..131ea11cec 100644
@@ -351,7 +351,7 @@ config MPC8XXX_GPIO
 
  config MT7621_GPIO
  	bool "MediaTek MT7621 GPIO driver"
-	depends on DM_GPIO && ARCH_MT7620
+	depends on DM_GPIO && ARCH_MT7628
  	default y
  	help
  	  Say yes here to support MediaTek MT7621 compatible GPIOs.
drivers/net/Kconfig +1 -1
index 6e436b56ab..0c0932f63a 100644
@@ -269,7 +269,7 @@ config MACB_ZYNQ
 
  config MT7628_ETH
  	bool "MediaTek MT7628 Ethernet Interface"
-	depends on ARCH_MT7620
+	depends on ARCH_MT7628
  	help
  	  The MediaTek MT7628 ethernet interface is used on MT7628 and
  	  MT7688 based boards.
drivers/spi/Kconfig +1 -1
index fb794adae7..b2b5061490 100644
@@ -133,7 +133,7 @@ config MPC8XX_SPI
 
  config MT7621_SPI
  	bool "MediaTek MT7621 SPI driver"
-	depends on ARCH_MT7620
+	depends on ARCH_MT7628
  	help
  	  Enable the MT7621 SPI driver. This driver can be used to access
  	  the SPI NOR flash on platforms embedding this Ralink / MediaTek
drivers/watchdog/Kconfig +0 -0
index 3bce0aa0b8..0f7d827581 100644

drivers/watchdog/Kconfig config WDT_AT91 · line 149

Quoted 8 lines
drivers/watchdog/Kconfig +1 -1
@@ -143,7 +143,7 @@ config WDT_AT91
 
  config WDT_MT7621
  	bool "MediaTek MT7621 watchdog timer support"
-	depends on WDT && ARCH_MT7620
+	depends on WDT && ARCH_MT7628
  	help
  	   Select this to enable Ralink / Mediatek watchdog timer,
  	   which can be found on some MediaTek chips.

Viele Grüße,
Stefan

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de
author
#2 lore raw

PATCH 1/1 mips: rename arch mt7620 to mt7628

Quoted 248 lines · Stefan Roese
Quoted 4 lines · Weijie Gao

The MediaTek MT7620 and MT7628 SoCs are different.
Although they use the same memory controller, the lowlevel code (CPU PLL) and other peripherals they use are totally different. Which means they should use seperate mach directories.

s/seperate/separate

Quoted 4 lines

Currently the mach mt7620 contains only architecture code of MT7628. In case we add real arch support of MT7620 in the future, the arch should be renamed to mt7628, including both Kconfig files and directories. Other files affected are also modified.

Perhaps it would be possible to support both SoC's (MT7620 and MT7628/88) in one mach directory? Frankly I don't know the differences in detail, so its your call.

Quoted 15 lines
Cc Stefan Roese <[email protected]>
Cc Daniel Schwierzeck <[email protected]>
---
  arch/mips/Kconfig                                |  6 +++---
  arch/mips/Makefile                               |  2 +-
  arch/mips/dts/Makefile                           |  2 +-
  arch/mips/{mach-mt7620 => mach-mt7628}/Kconfig   | 16 ++++++++--------
  arch/mips/{mach-mt7620 => mach-mt7628}/Makefile  |  0
  arch/mips/{mach-mt7620 => mach-mt7628}/cpu.c     |  0
  .../{mach-mt7620 => mach-mt7628}/ddr_calibrate.c |  0
  .../{mach-mt7620 => mach-mt7628}/lowlevel_init.S |  0
  arch/mips/{mach-mt7620 => mach-mt7628}/mt76xx.h  |  0
  configs/linkit-smart-7688-ram_defconfig          |  2 +-
  configs/linkit-smart-7688_defconfig              |  2 +-

You missed updating the gardena defconfig files:

$ git grep MT7620
configs/gardena-smart-gateway-mt7688-ram_defconfig:CONFIG_ARCH_MT7620=y
configs/gardena-smart-gateway-mt7688_defconfig:CONFIG_ARCH_MT7620=y

Other than this:

Thanks,
Stefan

Quoted 202 lines
  drivers/gpio/Kconfig                             |  2 +-
  drivers/net/Kconfig                              |  2 +-
  drivers/spi/Kconfig                              |  2 +-
  drivers/watchdog/Kconfig                         |  2 +-
  15 files changed, 19 insertions(+), 19 deletions(-)

rename arch/mips/{mach-mt7620 => mach-mt7628}/Kconfig (92%) rename arch/mips/{mach-mt7620 => mach-mt7628}/Makefile (100%) rename arch/mips/{mach-mt7620 => mach-mt7628}/cpu.c (100%) rename arch/mips/{mach-mt7620 => mach-mt7628}/ddr_calibrate.c (100%) rename arch/mips/{mach-mt7620 => mach-mt7628}/lowlevel_init.S (100%) rename arch/mips/{mach-mt7620 => mach-mt7628}/mt76xx.h (100%)

arch/mips/Kconfig +3 -3
index 194f4f349e..fc861c8273 100644
@@ -74,8 +74,8 @@ config ARCH_BMIPS
  	select SYSRESET
  	imply CMD_DM
 
-config ARCH_MT7620
-	bool "Support MT7620/7688 SoCs"
+config ARCH_MT7628
+	bool "Support MediaTek MT7628/7688 SoCs"
  	imply CMD_DM
  	select DISPLAY_CPUINFO
  	select DM
@@ -153,7 +153,7 @@ source "arch/mips/mach-mscc/Kconfig"
  source "arch/mips/mach-bmips/Kconfig"
  source "arch/mips/mach-jz47xx/Kconfig"
  source "arch/mips/mach-pic32/Kconfig"
-source "arch/mips/mach-mt7620/Kconfig"
+source "arch/mips/mach-mt7628/Kconfig"
 
  if MIPS
 
arch/mips/Makefile +1 -1
index 029d290f1e..da5b9c0e74 100644
@@ -15,7 +15,7 @@ machine-$(CONFIG_ARCH_ATH79) += ath79
  machine-$(CONFIG_ARCH_BMIPS) += bmips
  machine-$(CONFIG_ARCH_JZ47XX) += jz47xx
  machine-$(CONFIG_MACH_PIC32) += pic32
-machine-$(CONFIG_ARCH_MT7620) += mt7620
+machine-$(CONFIG_ARCH_MT7628) += mt7628
  machine-$(CONFIG_ARCH_MSCC) += mscc
 
  machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y))
arch/mips/dts/Makefile +1 -1
index 3522e6cdc8..1c4ad5207d 100644
@@ -1,6 +1,6 @@
  # SPDX-License-Identifier: GPL-2.0+
 
-dtb-$(CONFIG_ARCH_MT7620) += \
+dtb-$(CONFIG_ARCH_MT7628) += \
  	gardena-smart-gateway-mt7688.dtb \
  	linkit-smart-7688.dtb
  dtb-$(CONFIG_TARGET_AP121) += ap121.dtb
arch/mips/mach-mt7628/Kconfig renamed from arch/mips/mach-mt7620/Kconfig +8 -8
similarity index 92%
rename from arch/mips/mach-mt7620/Kconfig
rename to arch/mips/mach-mt7628/Kconfig
index a983443999..6a46640479 100644
@@ -1,20 +1,20 @@
-menu "MediaTek MIPS platforms"
-	depends on ARCH_MT7620
+menu "MediaTek MT7628/7688 platforms"
+	depends on ARCH_MT7628
 
  config SYS_MALLOC_F_LEN
  	default 0x1000
 
  config SYS_SOC
-	default "mt7620" if SOC_MT7620
+	default "mt7628" if SOC_MT7628
 
  choice
  	prompt "MediaTek MIPS SoC select"
 
-config SOC_MT7620
-	bool "MT7620/8"
+config SOC_MT7628
+	bool "MT7628/7688"
  	select MIPS_L1_CACHE_SHIFT_5
  	help
-	  This supports MediaTek MIPS MT7620 family.
+	  This supports MediaTek MT7628/7688 SoCs.
 
  endchoice
 
@@ -23,7 +23,7 @@ choice
 
  config BOARD_GARDENA_SMART_GATEWAY_MT7688
  	bool "GARDENA smart Gateway"
-	depends on SOC_MT7620
+	depends on SOC_MT7628
  	select BOARD_LATE_INIT
  	select SUPPORTS_BOOT_RAM
  	help
@@ -32,7 +32,7 @@ config BOARD_GARDENA_SMART_GATEWAY_MT7688
 
  config BOARD_LINKIT_SMART_7688
  	bool "LinkIt Smart 7688"
-	depends on SOC_MT7620
+	depends on SOC_MT7628
  	select SUPPORTS_BOOT_RAM
  	help
  	  Seeed LinkIt Smart 7688 boards have a MT7688 SoC with 128 MiB of RAM
arch/mips/mach-mt7628/Makefile renamed from arch/mips/mach-mt7620/Makefile +0 -0
similarity index 100%
rename from arch/mips/mach-mt7620/Makefile
rename to arch/mips/mach-mt7628/Makefile
arch/mips/mach-mt7628/cpu.c renamed from arch/mips/mach-mt7620/cpu.c +0 -0
similarity index 100%
rename from arch/mips/mach-mt7620/cpu.c
rename to arch/mips/mach-mt7628/cpu.c
arch/mips/mach-mt7628/ddr_calibrate.c renamed from arch/mips/mach-mt7620/ddr_calibrate.c +0 -0
similarity index 100%
rename from arch/mips/mach-mt7620/ddr_calibrate.c
rename to arch/mips/mach-mt7628/ddr_calibrate.c
arch/mips/mach-mt7628/lowlevel_init.S renamed from arch/mips/mach-mt7620/lowlevel_init.S +0 -0
similarity index 100%
rename from arch/mips/mach-mt7620/lowlevel_init.S
rename to arch/mips/mach-mt7628/lowlevel_init.S
arch/mips/mach-mt7628/mt76xx.h renamed from arch/mips/mach-mt7620/mt76xx.h +0 -0
similarity index 100%
rename from arch/mips/mach-mt7620/mt76xx.h
rename to arch/mips/mach-mt7628/mt76xx.h
configs/linkit-smart-7688-ram_defconfig +1 -1
index 649db0f67d..6705740fdc 100644
@@ -1,6 +1,6 @@
  CONFIG_MIPS=y
  CONFIG_SYS_TEXT_BASE=0x80010000
-CONFIG_ARCH_MT7620=y
+CONFIG_ARCH_MT7628=y
  CONFIG_BOARD_LINKIT_SMART_7688=y
  # CONFIG_MIPS_BOOT_ENV_LEGACY is not set
  CONFIG_MIPS_BOOT_FDT=y
configs/linkit-smart-7688_defconfig +1 -1
index 41aa900e56..d276114a14 100644
@@ -1,6 +1,6 @@
  CONFIG_MIPS=y
  CONFIG_SYS_TEXT_BASE=0x9c000000
-CONFIG_ARCH_MT7620=y
+CONFIG_ARCH_MT7628=y
  CONFIG_BOARD_LINKIT_SMART_7688=y
  CONFIG_BOOT_ROM=y
  CONFIG_ONBOARD_DDR2_SIZE_1024MBIT=y
drivers/gpio/Kconfig +1 -1
index b3e4ecc50e..131ea11cec 100644
@@ -351,7 +351,7 @@ config MPC8XXX_GPIO
 
  config MT7621_GPIO
  	bool "MediaTek MT7621 GPIO driver"
-	depends on DM_GPIO && ARCH_MT7620
+	depends on DM_GPIO && ARCH_MT7628
  	default y
  	help
  	  Say yes here to support MediaTek MT7621 compatible GPIOs.
drivers/net/Kconfig +1 -1
index 6e436b56ab..0c0932f63a 100644
@@ -269,7 +269,7 @@ config MACB_ZYNQ
 
  config MT7628_ETH
  	bool "MediaTek MT7628 Ethernet Interface"
-	depends on ARCH_MT7620
+	depends on ARCH_MT7628
  	help
  	  The MediaTek MT7628 ethernet interface is used on MT7628 and
  	  MT7688 based boards.
drivers/spi/Kconfig +1 -1
index fb794adae7..b2b5061490 100644
@@ -133,7 +133,7 @@ config MPC8XX_SPI
 
  config MT7621_SPI
  	bool "MediaTek MT7621 SPI driver"
-	depends on ARCH_MT7620
+	depends on ARCH_MT7628
  	help
  	  Enable the MT7621 SPI driver. This driver can be used to access
  	  the SPI NOR flash on platforms embedding this Ralink / MediaTek
drivers/watchdog/Kconfig +0 -0
index 3bce0aa0b8..0f7d827581 100644
@@ -143,7 +143,7 @@ config WDT_AT91
 
Quoted 12 lines

drivers/watchdog/Kconfig config WDT_AT91 · line 149

Quoted 8 lines
drivers/watchdog/Kconfig +1 -1
  config WDT_MT7621
  	bool "MediaTek MT7621 watchdog timer support"
-	depends on WDT && ARCH_MT7620
+	depends on WDT && ARCH_MT7628
  	help
  	   Select this to enable Ralink / Mediatek watchdog timer,
  	   which can be found on some MediaTek chips.

Viele Grüße,
Stefan

Dear Stefan,

Thanks for pointing out the missing files.

Here is the summary of HW components needed by u-boot for MT7620 and MT7628:

L1 data cache: MT7620 can not lock it.
MT7628 uses it to do DDR calibration.
CPU frequency (PLL): MT7620 can change it. MT7628 can't.
The PLL registers are different.
DRAM controller: Near the same.
MT7620 can't do calibration. MT7628 has extra PAD configurations.

GPIO controller:          Not the same IP core.
SPI controller:           Not the same IP core.
Frame engine:             Similar IP core, different generation.
Built-in Ethernet switch: Not the same IP core.

So I insist to split them into two mach directory.

Best Regards,

Weijie

#3 lore raw

PATCH 1/1 mips: rename arch mt7620 to mt7628

Quoted 17 lines · Weijie Gao
Quoted 16 lines · Stefan Roese
Quoted 4 lines · Weijie Gao

The MediaTek MT7620 and MT7628 SoCs are different.
Although they use the same memory controller, the lowlevel code (CPU PLL) and other peripherals they use are totally different. Which means they should use seperate mach directories.

s/seperate/separate

Quoted 4 lines

Currently the mach mt7620 contains only architecture code of MT7628. In case we add real arch support of MT7620 in the future, the arch should be renamed to mt7628, including both Kconfig files and directories. Other files affected are also modified.

Perhaps it would be possible to support both SoC's (MT7620 and MT7628/88) in one mach directory? Frankly I don't know the differences in detail, so its your call.

<snip>

Quoted 7 lines

Dear Stefan,

Thanks for pointing out the missing files.

Here is the summary of HW components needed by u-boot for MT7620 and MT7628:

Quoted 7 lines

L1 data cache: MT7620 can not lock it.
MT7628 uses it to do DDR calibration.
CPU frequency (PLL): MT7620 can change it. MT7628 can't.
The PLL registers are different.
DRAM controller: Near the same.
MT7620 can't do calibration. MT7628 has extra PAD configurations.

These "devices / controllers" are handled in the mach-foo directory.

Quoted 4 lines
GPIO controller:          Not the same IP core.
SPI controller:           Not the same IP core.
Frame engine:             Similar IP core, different generation.
Built-in Ethernet switch: Not the same IP core.

And these controllers are handled in the drivers/foo directly. So any different IP core (between MT7620 and MT7628) has no effect to the mach directory.

Please don't misunderstand me. I absolutely agree that we need to differentiate between those two SoC's. So moving to CONFIG_SOC_MT7628 instead of SOC_MT7620 makes perfect sense. I only want to avoid the creation of another mach-foo directory, where code might be shared between both SoC's.

Quoted 2 lines

So I insist to split them into two mach directory.

I see. Okay, lets move forward then with your patch and lets finally decide if and what can be shared between those SoC's, once (if) support for the MT7620 arrives in mainline.

BTW: Do you plan on adding support for the MT7620 anytime soon?

Thanks,
Stefan

#4 lore raw

PATCH 1/1 mips: rename arch mt7620 to mt7628

Am 29.04.19 um 11:40 schrieb Stefan Roese:

Quoted 58 lines · Weijie Gao
Quoted 21 lines · Stefan Roese
Quoted 20 lines · Weijie Gao
Quoted 5 lines

The MediaTek MT7620 and MT7628 SoCs are different.
Although they use the same memory controller, the lowlevel code (CPU PLL)
and other peripherals they use are totally different. Which means they should use seperate mach directories.

s/seperate/separate

Quoted 5 lines

Currently the mach mt7620 contains only architecture code of MT7628. In case we add real arch support of MT7620 in the future, the arch should
be renamed to mt7628, including both Kconfig files and directories. Other files affected are also modified.

Perhaps it would be possible to support both SoC's (MT7620 and MT7628/88)
in one mach directory? Frankly I don't know the differences in detail, so
its your call.

<snip>

Quoted 7 lines

Dear Stefan,

Thanks for pointing out the missing files.

Here is the summary of HW components needed by u-boot for MT7620 and MT7628:

Quoted 7 lines

L1 data cache:            MT7620 can not lock it. MT7628 uses it to do DDR calibration. CPU frequency (PLL):      MT7620 can change it. MT7628 can't. The PLL registers are different. DRAM controller:          Near the same.
                           MT7620 can't do calibration. MT7628 has extra PAD configurations.

These "devices / controllers" are handled in the mach-foo directory.

Quoted 4 lines

GPIO controller:          Not the same IP core.
SPI controller:           Not the same IP core.
Frame engine:             Similar IP core, different generation. Built-in Ethernet switch: Not the same IP core.

And these controllers are handled in the drivers/foo directly. So any different IP core (between MT7620 and MT7628) has no effect to the mach directory.

Please don't misunderstand me. I absolutely agree that we need to differentiate between those two SoC's. So moving to CONFIG_SOC_MT7628 instead of SOC_MT7620 makes perfect sense. I only want to avoid the creation of another mach-foo directory, where code might be shared between both SoC's.

Quoted 1 line
Quoted 8 lines
Quoted 1 line

So I insist to split them into two mach directory.

I see. Okay, lets move forward then with your patch and lets finally decide if and what can be shared between those SoC's, once (if) support for the MT7620 arrives in mainline.

BTW: Do you plan on adding support for the MT7620 anytime soon?

I agree with Stefan, there is no need to create separate mach- directories. With the power of Kconfig and Kbuild you can easily handle multiple SoCs within one mach- directory, for instance look at mach-bmips or mach-mscc. Could you rather rename to mach-mediatek or mach-mtmips so that we would have the Kconfig symbols ARCH_MEDIATEK and SOC_MT7628 (plus SOC_MT7620 in the future)? Thanks.

BTW: it's good to see that another vendor in the MIPS area is stepping up to maintain its products in mainline ;)

Signature · 1 line
- Daniel
author
#5 lore raw

PATCH 1/1 mips: rename arch mt7620 to mt7628

Quoted 76 lines · Daniel Schwierzeck

Am 29.04.19 um 11:40 schrieb Stefan Roese:

Quoted 58 lines · Weijie Gao
Quoted 21 lines · Stefan Roese
Quoted 20 lines · Weijie Gao
Quoted 5 lines

The MediaTek MT7620 and MT7628 SoCs are different.
Although they use the same memory controller, the lowlevel code (CPU PLL)
and other peripherals they use are totally different. Which means they should use seperate mach directories.

s/seperate/separate

Quoted 5 lines

Currently the mach mt7620 contains only architecture code of MT7628. In case we add real arch support of MT7620 in the future, the arch should
be renamed to mt7628, including both Kconfig files and directories. Other files affected are also modified.

Perhaps it would be possible to support both SoC's (MT7620 and MT7628/88)
in one mach directory? Frankly I don't know the differences in detail, so
its your call.

<snip>

Quoted 7 lines

Dear Stefan,

Thanks for pointing out the missing files.

Here is the summary of HW components needed by u-boot for MT7620 and MT7628:

Quoted 7 lines

L1 data cache: MT7620 can not lock it.
MT7628 uses it to do DDR calibration.
CPU frequency (PLL): MT7620 can change it. MT7628 can't.
The PLL registers are different.
DRAM controller: Near the same.
MT7620 can't do calibration. MT7628 has extra PAD configurations.

These "devices / controllers" are handled in the mach-foo directory.

Quoted 4 lines
GPIO controller:          Not the same IP core.
SPI controller:           Not the same IP core.
Frame engine:             Similar IP core, different generation.
Built-in Ethernet switch: Not the same IP core.

And these controllers are handled in the drivers/foo directly. So any different IP core (between MT7620 and MT7628) has no effect to the mach directory.

Please don't misunderstand me. I absolutely agree that we need to differentiate between those two SoC's. So moving to CONFIG_SOC_MT7628 instead of SOC_MT7620 makes perfect sense. I only want to avoid the creation of another mach-foo directory, where code might be shared between both SoC's.

Quoted 1 line
Quoted 8 lines
Quoted 1 line

So I insist to split them into two mach directory.

I see. Okay, lets move forward then with your patch and lets finally decide if and what can be shared between those SoC's, once (if) support for the MT7620 arrives in mainline.

BTW: Do you plan on adding support for the MT7620 anytime soon?

I agree with Stefan, there is no need to create separate mach- directories. With the power of Kconfig and Kbuild you can easily handle multiple SoCs within one mach- directory, for instance look at mach-bmips or mach-mscc. Could you rather rename to mach-mediatek or mach-mtmips so that we would have the Kconfig symbols ARCH_MEDIATEK and SOC_MT7628 (plus SOC_MT7620 in the future)? Thanks.

Quoted 3 lines

BTW: it's good to see that another vendor in the MIPS area is stepping up to maintain its products in mainline ;)

Hi Daniel,

You are right. I forgot I've already submitted a mach- like this:
MediaTek's ARM SoCs - MT7623 and MT7629.

They are both placed in mach-mediatek. A submenu can choose whether to build MT7623 or MT7629.

ARCH_MEDIATEK is already used. I think ARCH_MTMIPS is just fine. I'll modify and resubmit the patch.

Hi Stefan,

I'm just starting to rewrite some lowlevel codes for mt7628 in the next one or two months. Then add support for MT7620.

Best Regards,

Weijie