[U-Boot] [PATCH v3 5/5] MAINTAINERS: change spi driver entry

2019-05-13 Thread Weijie Gao
Change mtk_qspi.c to mtk_snfi_spi.c Signed-off-by: Weijie Gao --- Changes since v1: rename mtk_spimem.c to spi_snfi_spi.c Changes since v2: none --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 33fd4652a42..cb9f8e23bd7 100644

[U-Boot] [PATCH v3 4/5] configs: mt7629_rfb: change MTK_QSPI to MTK_SNFI_SPI

2019-05-13 Thread Weijie Gao
This patch replaces MTK_QSPI with MTK_SNFI_SPI to ensure mtk_snfi_spi driver is built by default. Signed-off-by: Weijie Gao --- Changes since v2: none --- configs/mt7629_rfb_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/mt7629_rfb_defconfig b/configs

[U-Boot] [PATCH 1/3] board_r: move initr_serial to be called before initr_watchdog

2019-05-15 Thread Weijie Gao
itialized. The call to calloc will fail, and this will cause DM to print out an error message, and it will call printf again, causing recursive error outputs. This patch places initr_serial before initr_watchdog to solve this issue. Cc: Stefan Roese Reviewed-by: Ryder Lee Signed-off-by: Wei

[U-Boot] [PATCH 2/3] watchdog: mtk_wdt: fix timeout calculation

2019-05-15 Thread Weijie Gao
U-Boot passes timeout in milliseconds for ops->start. However the driver treats this value as seconds. This will cause an overflow on writing wdt register. This patch divides the timeout by 1000 before writing to wdt register. Reviewed-by: Ryder Lee Signed-off-by: Weijie Gao --- driv

[U-Boot] [PATCH 3/3] arm: mediatek: remove arch_misc_init

2019-05-15 Thread Weijie Gao
-by: Ryder Lee Signed-off-by: Weijie Gao --- arch/arm/mach-mediatek/Kconfig | 3 --- arch/arm/mach-mediatek/cpu.c | 12 2 files changed, 15 deletions(-) diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig index b5e91d4a7d..60aef15f15 100644 --- a/arch/arm

Re: [U-Boot] [PATCH 1/3] board_r: move initr_serial to be called before initr_watchdog

2019-05-16 Thread Weijie Gao
On Thu, 2019-05-16 at 10:21 +0200, Stefan Roese wrote: > On 16.05.19 08:48, Weijie Gao wrote: > > The initr_watchdog is currently placed before initr_serial. The > > initr_watchdog calls printf and printf finally calls ops->putc of a serial > > driver. > > > >

[U-Boot] [PATCH v2 1/3] board_r: move initr_watchdog to be called after initr_serial

2019-05-16 Thread Weijie Gao
itialized. The call to calloc will fail, and this will cause DM to print out an error message, and it will call printf again, causing recursive error outputs. This patch places initr_watchdog after initr_serial to solve this issue. Cc: Stefan Roese Reviewed-by: Ryder Lee Signed-off-by: Weij

[U-Boot] [PATCH v2 2/3] watchdog: mtk_wdt: fix timeout calculation

2019-05-16 Thread Weijie Gao
-by: Weijie Gao --- Changes since v1: none --- drivers/watchdog/mtk_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c index 0b501733f2..19e3fde968 100644 --- a/drivers/watchdog/mtk_wdt.c +++ b/drivers/watchdog/mtk_wd

[U-Boot] [PATCH v2 3/3] arm: mediatek: remove arch_misc_init

2019-05-16 Thread Weijie Gao
-by: Stefan Roese Reviewed-by: Ryder Lee Signed-off-by: Weijie Gao --- Changes since v1: none --- arch/arm/mach-mediatek/Kconfig | 3 --- arch/arm/mach-mediatek/cpu.c | 12 2 files changed, 15 deletions(-) diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek

[U-Boot] [PATCH v5 3/5] arm: dts: change MT7629 to use spi-mem rather than qspi

2019-07-21 Thread Weijie Gao
The original mtk_qspi driver has been removed. We change MT7629 to use newly added mtk-spimem driver. Signed-off-by: Weijie Gao --- Changes since v1: rename node spimem to snfi. change pinctrl name and order. Changes since v2: none --- arch/arm/dts/mt7629-rfb.dts | 18 +- arch

[U-Boot] [PATCH v5 0/5] Add spi-mem driver for MediaTek MT7629 SoC

2019-07-21 Thread Weijie Gao
driver. Remove the patch that adds WATCHDOG_RESET() to spi-nor driver. Weijie Gao (5): spi: remove obsolete mtk_qspi driver spi: add spi-mem driver for MediaTek MT7629 SoC arm: dts: change MT7629 to use spi-mem rather than qspi configs: mt7629_rfb: change MTK_QSPI to MTK_SNFI_SPI

[U-Boot] [PATCH v5 1/5] spi: remove obsolete mtk_qspi driver

2019-07-21 Thread Weijie Gao
Since u-boot has added the spi-mem framework and replaced the spi-nor framework, the mtk_qspi is no longer compatible with the new spi-nor driver. Remove this driver, and a new driver will be added later. Cc: Jagan Teki Signed-off-by: Weijie Gao --- Changes since v1: none --- drivers/spi

[U-Boot] [PATCH v5 4/5] configs: mt7629_rfb: change MTK_QSPI to MTK_SNFI_SPI

2019-07-21 Thread Weijie Gao
This patch replaces MTK_QSPI with MTK_SNFI_SPI to ensure mtk_snfi_spi driver is built by default. Signed-off-by: Weijie Gao --- Changes since v1: none --- configs/mt7629_rfb_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/mt7629_rfb_defconfig b/configs

[U-Boot] [PATCH v5 5/5] MAINTAINERS: change spi driver entry

2019-07-21 Thread Weijie Gao
Change mtk_qspi.c to mtk_snfi_spi.c Signed-off-by: Weijie Gao --- Changes since v1: rename mtk_spimem.c to spi_snfi_spi.c Changes since v2: none --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index bc67c49965..e836f5050d 100644

[U-Boot] [PATCH v5 2/5] spi: add spi-mem driver for MediaTek MT7629 SoC

2019-07-21 Thread Weijie Gao
This patch adds spi-mem driver for MediaTek MT7629 SoC to access SPI-NOR and SPI-NAND flashes. Cc: Jagan Teki Signed-off-by: Weijie Gao --- Changes since v1: rename mtk_spimem to spi_snfi_spi. change pinctrl name. Changes since v2: remove udevice in mtk_snfi_priv. Changes since v3: remove check

[U-Boot] [PATCH v4 1/6] mtd: spi-nor: add watchdog reset to flash operation loops

2019-07-09 Thread Weijie Gao
This patch adds WATCHDOG_RESET() to loops for read/write/erase to avoid watchdog not being feeded in a long period. Cc: Vignesh Raghavendra Signed-off-by: Weijie Gao --- drivers/mtd/spi/spi-nor-core.c | 13 + drivers/mtd/spi/spi-nor-tiny.c | 3 +++ 2 files changed, 16 insertions

[U-Boot] [PATCH v4 4/6] arm: dts: change MT7629 to use spi-mem rather than qspi

2019-07-09 Thread Weijie Gao
The original mtk_qspi driver has been removed. We change MT7629 to use newly added mtk-spimem driver. Signed-off-by: Weijie Gao --- Changes since v1: rename node spimem to snfi. change pinctrl name and order. Changes since v2: none --- arch/arm/dts/mt7629-rfb.dts | 18 +- arch

[U-Boot] [PATCH v4 3/6] spi: add spi-mem driver for MediaTek MT7629 SoC

2019-07-09 Thread Weijie Gao
This patch adds spi-mem driver for MediaTek MT7629 SoC to access SPI-NOR and SPI-NAND flashes. Cc: Jagan Teki Signed-off-by: Weijie Gao --- Changes since v1: rename mtk_spimem to spi_snfi_spi. change pinctrl name. Changes since v2: remove udevice in mtk_snfi_priv. Changes since v3: remove check

[U-Boot] [PATCH v4 0/6] Add spi-mem driver for MediaTek MT7629 SoC

2019-07-09 Thread Weijie Gao
Since u-boot has added the spi-mem framework and replaced the spi-nor framework, the mtk_qspi is no longer compatible with the new spi-nor driver. This patch series add a new spi-mem driver to replace the mtk_qspi driver, with one patch to fix watchdog not feeding during spi operation. Weijie

[U-Boot] [PATCH v4 2/6] spi: remove obsolete mtk_qspi driver

2019-07-09 Thread Weijie Gao
Since u-boot has added the spi-mem framework and replaced the spi-nor framework, the mtk_qspi is no longer compatible with the new spi-nor driver. Remove this driver, and a new driver will be added later. Cc: Jagan Teki Signed-off-by: Weijie Gao --- Changes since v1: none --- drivers/spi

[U-Boot] [PATCH v4 5/6] configs: mt7629_rfb: change MTK_QSPI to MTK_SNFI_SPI

2019-07-09 Thread Weijie Gao
This patch replaces MTK_QSPI with MTK_SNFI_SPI to ensure mtk_snfi_spi driver is built by default. Signed-off-by: Weijie Gao --- Changes since v1: none --- configs/mt7629_rfb_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/mt7629_rfb_defconfig b/configs

[U-Boot] [PATCH 6/6] MAINTAINERS: change spi driver entry

2019-07-09 Thread Weijie Gao
Change mtk_qspi.c to mtk_snfi_spi.c Signed-off-by: Weijie Gao --- Changes since v1: rename mtk_spimem.c to spi_snfi_spi.c Changes since v2: none --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index bea3122f2b6..170395c0079 100644

[U-Boot] [PATCH] arm: mediatek: add missing arch timer configuration for MT7629

2019-07-10 Thread Weijie Gao
This patch sets CNTVOFF of ARM CP15 timer to zero to make sure the virtual counter is fully usable for linux kernel. Cc: Albert Aribaud Signed-off-by: Weijie Gao --- arch/arm/mach-mediatek/mt7629/lowlevel_init.S | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm/mach

[U-Boot] [PATCH 3/3] arm: dts: MediaTek: remove tick-timer from mt7629.dtsi

2019-07-10 Thread Weijie Gao
This patch removes tick-timer as all mt7629 boards should use arch timer. Signed-off-by: Weijie Gao --- arch/arm/dts/mt7629-rfb.dts | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/dts/mt7629-rfb.dts b/arch/arm/dts/mt7629-rfb.dts index 4612218a1e..08c3b59222 100644 --- a/arch/arm/dts

[U-Boot] [PATCH 1/3] arm: dts: MediaTek: fix clock order for timer0 node of mt7629.dtsi

2019-07-10 Thread Weijie Gao
The timer0 node has its two clocks written in reversed order. The timer0 is used as the tick timer which causes a problem that the time a delay function used is 4 times longer. This patch reverses these two clocks to solve this issue. Signed-off-by: Weijie Gao --- arch/arm/dts/mt7629.dtsi | 4

[U-Boot] [PATCH 2/3] configs: mt7629_rfb: use arm arch timer instead of mtk timer

2019-07-10 Thread Weijie Gao
This patch changes mt7629_rfb to use ARM's generic arch timer instead of MediaTek's soc timer. Signed-off-by: Weijie Gao --- configs/mt7629_rfb_defconfig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/configs/mt7629_rfb_defconfig b/configs/mt7629_rfb_defco

[U-Boot] [PATCH] blk: Invalidate block cache when switching hwpart

2019-07-11 Thread Weijie Gao
following read operation of the latter hw partition will get wrong data when reading from the addresses that have been cached previously. To solve this problem, invalidate block cache after a successful select_hwpart operation. Signed-off-by: Weijie Gao --- drivers/block/blk-uclass.c | 14

Re: [U-Boot] [PATCH v4 0/6] Add spi-mem driver for MediaTek MT7629 SoC

2019-07-15 Thread Weijie Gao
On Mon, 2019-07-15 at 12:59 +0530, Jagan Teki wrote: > On Wed, Jul 10, 2019 at 8:51 AM Weijie Gao wrote: > > > > Since u-boot has added the spi-mem framework and replaced the spi-nor > > framework, > > the mtk_qspi is no longer compatible with the new spi-nor driver

Re: [U-Boot] [PATCH v4 0/6] Add spi-mem driver for MediaTek MT7629 SoC

2019-07-18 Thread Weijie Gao
On Tue, 2019-07-16 at 17:03 +0530, Jagan Teki wrote: > On Tue, Jul 16, 2019 at 7:48 AM Weijie Gao wrote: > > > > On Mon, 2019-07-15 at 12:59 +0530, Jagan Teki wrote: > > > On Wed, Jul 10, 2019 at 8:51 AM Weijie Gao > > > wrote: > > > > > > &

[U-Boot] [PATCH] mmc: mtk-sd: add WATCHDOG_RESET() to prevent watchdog timeout

2019-07-18 Thread Weijie Gao
When reading large data in once (reading 512MiB is tested on MT7623), a watchdog timeout is triggered due to watchdog not being fed. This patch adds WATCHDOG_RESET() to msdc_start_data() so the watchdog will be fed every 1024 blocks are read/written. Signed-off-by: Weijie Gao --- drivers/mmc

Re: [U-Boot] [PATCH] blk: Invalidate block cache when switching hwpart

2019-08-26 Thread Weijie Gao
On Thu, 2019-08-22 at 15:58 +0200, Felix Brack wrote: > On 11.07.19 09:10, Weijie Gao wrote: > > > Some storage devices have multiple hw partitions and both address from > > zero, for example eMMC. > > However currently block cache invalidation only applies to block >

Re: [U-Boot] [PATCH] blk: Invalidate block cache when switching hwpart

2019-08-26 Thread Weijie Gao
On Mon, 2019-08-26 at 14:43 +0200, Felix Brack wrote: > Hello Weijie, > > On 26.08.19 10:19, Weijie Gao wrote: > > On Thu, 2019-08-22 at 15:58 +0200, Felix Brack wrote: > >> On 11.07.19 09:10, Weijie Gao wrote: > >> > >>> Some storage devices have

[U-Boot] [PATCH 1/3] Revert "blk: Invalidate block cache when switching hwpart"

2019-08-27 Thread Weijie Gao
makes block cache useless. So it's not a good idea to put blkcache_invalidate() in the common functions. It should be called inside mmc_select_hwpart(). Signed-off-by: Weijie Gao --- drivers/block/blk-uclass.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --

[U-Boot] [PATCH 2/3] mmc: invalidate block cache after hwpart switched successfully

2019-08-27 Thread Weijie Gao
partition will get wrong data when reading from the addresses that have been cached previously. To solve this problem, invalidate block cache after a successful mmc_switch_part() operation. Signed-off-by: Weijie Gao --- drivers/mmc/mmc-uclass.c | 7 ++- 1 file changed, 6 insertions(+), 1

[U-Boot] [PATCH 3/3] configs: enable CONFIG_BLOCK_CACHE for mt7623n_bpir2

2019-08-27 Thread Weijie Gao
This patch enables CONFIG_BLOCK_CACHE for mt7623n_bpir2. Signed-off-by: Weijie Gao --- This patch must be merged after patch 1 & 2. --- configs/mt7623n_bpir2_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/mt7623n_bpir2_defconfig b/configs/mt7623n_bpir2_defconfig i

[U-Boot] [PATCH 01/26] serial: serial_mtk: enable FIFO and disable flow control

2019-08-27 Thread Weijie Gao
This patch adds codes to enable FIFO and disable flow control taken from ns16550 driver. Signed-off-by: Weijie Gao --- drivers/serial/serial_mtk.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/serial/serial_mtk.c b/drivers/serial/serial_mtk.c index

[U-Boot] [PATCH 13/26] dts: mtmips: add gate clock node for mt7628

2019-08-27 Thread Weijie Gao
This patch adds clkgate node for mt7628 and adds clock gate property for usb phy node. Signed-off-by: Weijie Gao --- arch/mips/dts/mt7628a.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/mips/dts/mt7628a.dtsi b/arch/mips/dts/mt7628a.dtsi index 0e2b6598ea..dd11cac28c

[U-Boot] [PATCH 04/26] dts: mtmips: enable high-speed UART support for mt7628

2019-08-27 Thread Weijie Gao
All three UARTs of mt7628 are actually MediaTek's high-speed UARTs which support baudrate up to 921600. The high-speed UART is compatible with ns16550 when baudrate <= 115200. Add compatible string to dtsi file so u-boot can use it when serial_mtk driver is built in. Signed-off-by: We

[U-Boot] [PATCH 09/26] dts: mtmips: add default pinctrl for uart nodes

2019-08-27 Thread Weijie Gao
This patch adds default pinctrl for uart nodes Signed-off-by: Weijie Gao --- arch/mips/dts/mt7628a.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/mips/dts/mt7628a.dtsi b/arch/mips/dts/mt7628a.dtsi index be9ab50931..f07de1b611 100644 --- a/arch/mips/dts/mt7628a.dtsi +++ b

[U-Boot] [PATCH 03/26] dts: mtmips: move uart property clock-frequency into mt7628an.dtsi

2019-08-27 Thread Weijie Gao
The UART of MT7628 has fixed 40MHz input clock so there is no need to put clock-frequency in every dts files. Just put it into the common dtsi file. Signed-off-by: Weijie Gao --- arch/mips/dts/gardena-smart-gateway-mt7688.dts | 1 - arch/mips/dts/linkit-smart-7688.dts| 1 - arch

[U-Boot] [PATCH 05/26] spi: mt7621-spi: remove data cache and rewrite its xfer function

2019-08-27 Thread Weijie Gao
and DIDO registers is OPADDR has a reversed byte order. With this patch, any amount of data can be read/written in a single xfer function call. Signed-off-by: Weijie Gao --- drivers/spi/mt7621_spi.c | 197 ++- 1 file changed, 91 insertions(+), 106 deletions

[U-Boot] [PATCH 11/26] dts: mtmips: update reset controller node for mt7628

2019-08-27 Thread Weijie Gao
This patch updates reset controller node for mt7628 Signed-off-by: Weijie Gao --- arch/mips/dts/mt7628a.dtsi | 36 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/arch/mips/dts/mt7628a.dtsi b/arch/mips/dts/mt7628a.dtsi index f07de1b611

[U-Boot] [PATCH 00/26] Add and update drivers for MediaTek MT76x8 SoCs

2019-08-27 Thread Weijie Gao
- Update mt7621-spi driver with a new transfer method. - Enable fifo, disable flow control, and enable non-DM implementation for mtk hsuart driver. - Enanble the new drivers for currently existed mt7628 boards. Weijie Gao (26): serial: serial_mtk: enable FIFO and disable flow control serial: s

[U-Boot] [PATCH 22/26] dts: mtmips: add mmc related nodes for mt7628an.dtsi

2019-08-27 Thread Weijie Gao
This patch adds mmc related nodes for mt7628an.dtsi Signed-off-by: Weijie Gao --- arch/mips/dts/mt7628a.dtsi | 22 ++ 1 file changed, 22 insertions(+) diff --git a/arch/mips/dts/mt7628a.dtsi b/arch/mips/dts/mt7628a.dtsi index dd11cac28c..929397c729 100644 --- a/arch/mips

[U-Boot] [PATCH 07/26] pinctrl: add support for MediaTek MT7628

2019-08-27 Thread Weijie Gao
This patch adds pinctrl support for mt7628, with a file for common pinmux functions and a file for mt7628 which has additional support for pinconf. Signed-off-by: Weijie Gao --- drivers/pinctrl/Kconfig | 1 + drivers/pinctrl/Makefile | 1 + drivers

[U-Boot] [PATCH 20/26] mmc: mtk-sd: add support for MediaTek MT7620/MT7628 SoCs

2019-08-27 Thread Weijie Gao
This patch adds mmc support for MediaTek MT7620/MT7628 SoCs. Signed-off-by: Weijie Gao --- drivers/mmc/Kconfig | 2 +- drivers/mmc/mtk-sd.c | 23 --- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index 0ccb1ea701

[U-Boot] [PATCH 06/26] spi: mt7621-spi: restore default register value after each xfer

2019-08-27 Thread Weijie Gao
e the original register fields after cs deactivated. Signed-off-by: Weijie Gao --- drivers/spi/mt7621_spi.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/drivers/spi/mt7621_spi.c b/drivers/spi/mt7621_spi.c index 20fe93d416..06484e7abe 100644

[U-Boot] [PATCH 08/26] dts: mtmips: add pinctrl node for mt7628

2019-08-27 Thread Weijie Gao
This patch adds pinctrl node with default pin state for mt7628an.dtsi. Signed-off-by: Weijie Gao --- arch/mips/dts/mt7628a.dtsi | 150 + 1 file changed, 150 insertions(+) diff --git a/arch/mips/dts/mt7628a.dtsi b/arch/mips/dts/mt7628a.dtsi index e9241a0737

[U-Boot] [PATCH 10/26] reset: add reset controller driver for MediaTek MIPS platform

2019-08-27 Thread Weijie Gao
This patch adds reset controller driver for MediaTek MIPS platform and header file for mt7628. Signed-off-by: Weijie Gao --- drivers/reset/Kconfig| 7 ++ drivers/reset/Makefile | 1 + drivers/reset/reset-mtmips.c | 82

[U-Boot] [PATCH 14/26] phy: mt76x8-usb-phy: add slew rate calibration and remove non-mt7628 part

2019-08-27 Thread Weijie Gao
This patch adds slew rate calibration for mt76x8-usb-phy, removes code which belongs to mt7620, and gets rid of using syscon and regmap by using clock driver and reset controller. Signed-off-by: Weijie Gao --- drivers/phy/Kconfig | 2 + drivers/phy/mt76x8-usb-phy.c | 225

[U-Boot] [PATCH 19/26] dts: mtmips: enable eth port0 led function for all boards

2019-08-27 Thread Weijie Gao
This patch adds default p0led status for all boards. Signed-off-by: Weijie Gao --- arch/mips/dts/gardena-smart-gateway-mt7688.dts | 9 + arch/mips/dts/linkit-smart-7688.dts| 9 + 2 files changed, 18 insertions(+) diff --git a/arch/mips/dts/gardena-smart-gateway

[U-Boot] [PATCH 16/26] net: mt7628-eth: remove phy link up detection

2019-08-27 Thread Weijie Gao
up in router mode which has all 5 phy ports working. Signed-off-by: Weijie Gao --- drivers/net/mt7628-eth.c | 32 1 file changed, 32 deletions(-) diff --git a/drivers/net/mt7628-eth.c b/drivers/net/mt7628-eth.c index 4675b0f003..eef25da8a8 100644 --- a/drivers

[U-Boot] [PATCH 02/26] serial: serial_mtk: add non-DM version for SPL

2019-08-27 Thread Weijie Gao
This patch adds non-DM version for mtk hsuart driver and makes it compatible with ns16550a driver in configuration. This is needed in SPL with CONFIG_SPL_DM disabled for reducing size. Signed-off-by: Weijie Gao --- drivers/serial/serial.c | 2 + drivers/serial/serial_mtk.c | 202

[U-Boot] [PATCH 17/26] net: mt7628-eth: free rx descriptor on receiving failure

2019-08-27 Thread Weijie Gao
mt7628_eth_free_pkt() after received an invalid packet length. Signed-off-by: Weijie Gao --- drivers/net/mt7628-eth.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/mt7628-eth.c b/drivers/net/mt7628-eth.c index eef25da8a8..8ca2c66edb 100644 --- a/drivers/net/mt7628-eth.c +++ b/drivers/net

[U-Boot] [PATCH 18/26] net: mt7628-eth: add support to isolate LAN/WAN ports

2019-08-27 Thread Weijie Gao
This patch add support for mt7628-eth to isolate LAN/WAN ports mainly to prevent LAN devices from getting IP address from WAN. Signed-off-by: Weijie Gao --- drivers/net/mt7628-eth.c | 32 1 file changed, 32 insertions(+) diff --git a/drivers/net/mt7628-eth.c b

[U-Boot] [PATCH 24/26] dts: mtmips: add default pinctrl to eth nodes for all boards

2019-08-27 Thread Weijie Gao
This patch adds a referenceable name to eth node, and adds default pinctrl for all boards. There are two pinctrl nodes used for two scenarios: ephy_iot_mode- for IOT boards which have only one port (PHY0) ephy_router_mode - For routers which have more than one ports Signed-off-by: Weijie Gao

[U-Boot] [PATCH 25/26] configs: mtmips: change all boards to use mtk high-speed uart driver

2019-08-27 Thread Weijie Gao
This patch changes all defconfig files of mtmips to use mtk high-speed uart driver. This driver is compatible with ns16550a when baudrate <= 115200. Signed-off-by: Weijie Gao --- configs/gardena-smart-gateway-mt7688-ram_defconfig | 2 +- configs/gardena-smart-gateway-mt7688_defconfig

[U-Boot] [PATCH 23/26] dts: mtmips: add default pinctrl for gardena-smart-gateway-mt7688

2019-08-27 Thread Weijie Gao
This adds default pinctrl (dual SPI chip select) for gardena smart gateway Signed-off-by: Weijie Gao --- arch/mips/dts/gardena-smart-gateway-mt7688.dts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/mips/dts/gardena-smart-gateway-mt7688.dts b/arch/mips/dts/gardena-smart-gateway

[U-Boot] [PATCH 15/26] net: mt7628-eth: remove hardcoded gpio settings and regmap-based phy reset

2019-08-27 Thread Weijie Gao
This patch removes hardcoded gpio settings as they have been replaced by pinctrl in dts, and also replaces regmap-based phy reset with a more generic reset controller. Signed-off-by: Weijie Gao --- drivers/net/mt7628-eth.c | 45 +++- 1 file changed, 8

[U-Boot] [PATCH 12/26] clk: add clock gating driver for MediaTek MIPS platform

2019-08-27 Thread Weijie Gao
This patch adds clock gating driver for MediaTek MIPS platform Signed-off-by: Weijie Gao --- drivers/clk/Kconfig | 8 drivers/clk/Makefile | 1 + drivers/clk/clk-mtmips-cg.c | 63 include/dt-bindings/clk/mt7628-clk.h

[U-Boot] [PATCH 26/26] configs: mtmips: add necessary drivers for mtmips boards

2019-08-27 Thread Weijie Gao
This patch adds pinctrl driver, clock gate driver and reset controller support for defconfig files of mtmips boards. Signed-off-by: Weijie Gao --- configs/gardena-smart-gateway-mt7688_defconfig | 6 ++ configs/linkit-smart-7688_defconfig| 6 ++ 2 files changed, 12 insertions

[U-Boot] [PATCH 21/26] mmc: mtk-sd: add a dts property cd-active-high for builtin-cd mode

2019-08-27 Thread Weijie Gao
This patch adds a dts property cd-active-high for builtin-cd mode to make it configurable instead of using hardcoded active-low. Signed-off-by: Weijie Gao --- drivers/mmc/mtk-sd.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk

Re: [U-Boot] [PATCH 12/26] clk: add clock gating driver for MediaTek MIPS platform

2019-08-28 Thread Weijie Gao
On Wed, 2019-08-28 at 15:24 +0200, Daniel Schwierzeck wrote: > > Am 28.08.19 um 08:37 schrieb Weijie Gao: > > This patch adds clock gating driver for MediaTek MIPS platform > > > > Signed-off-by: Weijie Gao > > --- > > drivers/clk/Kconfig

Re: [U-Boot] [PATCH 07/26] pinctrl: add support for MediaTek MT7628

2019-08-28 Thread Weijie Gao
On Wed, 2019-08-28 at 14:37 +0200, Stefan Roese wrote: > On 28.08.19 14:26, Stefan Roese wrote: > > On 28.08.19 08:37, Weijie Gao wrote: > >> This patch adds pinctrl support for mt7628, with a file for common pinmux > >> functions and a file for mt7628 which has add

Re: [U-Boot] [PATCH 16/26] net: mt7628-eth: remove phy link up detection

2019-08-28 Thread Weijie Gao
On Wed, 2019-08-28 at 15:37 +0200, Stefan Roese wrote: > On 28.08.19 08:38, Weijie Gao wrote: > > The mt7628 has an embedded ethernet switch (5 phy ports + 1 cpu port). > > Although in IOT mode only port0 is usable, the phy0 is still connected > > to the switch, not the e

Re: [U-Boot] [PATCH 11/26] dts: mtmips: update reset controller node for mt7628

2019-08-28 Thread Weijie Gao
On Wed, 2019-08-28 at 15:18 +0200, Stefan Roese wrote: > On 28.08.19 08:37, Weijie Gao wrote: > > This patch updates reset controller node for mt7628 > > > > Signed-off-by: Weijie Gao > > --- > > arch/mips/dts/mt7628a.dtsi | 36

Re: [U-Boot] [PATCH 26/26] configs: mtmips: add necessary drivers for mtmips boards

2019-08-28 Thread Weijie Gao
On Wed, 2019-08-28 at 15:40 +0200, Stefan Roese wrote: > On 28.08.19 15:35, Daniel Schwierzeck wrote: > > > > > > Am 28.08.19 um 08:38 schrieb Weijie Gao: > >> This patch adds pinctrl driver, clock gate driver and reset controller > >> suppo

Re: [U-Boot] [PATCH 18/26] net: mt7628-eth: add support to isolate LAN/WAN ports

2019-08-28 Thread Weijie Gao
On Wed, 2019-08-28 at 15:46 +0200, Stefan Roese wrote: > On 28.08.19 08:38, Weijie Gao wrote: > > This patch add support for mt7628-eth to isolate LAN/WAN ports mainly to > > Nitpicking: > > s/add/adds > > > prevent LAN devices from getting IP address from WAN.

Re: [U-Boot] [PATCH 20/26] mmc: mtk-sd: add support for MediaTek MT7620/MT7628 SoCs

2019-08-28 Thread Weijie Gao
On Wed, 2019-08-28 at 15:50 +0200, Stefan Roese wrote: > On 28.08.19 08:38, Weijie Gao wrote: > > This patch adds mmc support for MediaTek MT7620/MT7628 SoCs. > > > > Signed-off-by: Weijie Gao > > --- > > drivers/mmc/Kconfig | 2 +

Re: [U-Boot] [PATCH 25/26] configs: mtmips: change all boards to use mtk high-speed uart driver

2019-08-28 Thread Weijie Gao
On Wed, 2019-08-28 at 15:57 +0200, Stefan Roese wrote: > On 28.08.19 08:38, Weijie Gao wrote: > > This patch changes all defconfig files of mtmips to use mtk high-speed > > uart driver. > > > > This driver is compatible with ns16550a when baudrate <= 115200. >

[U-Boot] [PATCH v2 01/28] serial: serial_mtk: enable FIFO and disable flow control

2019-09-17 Thread Weijie Gao
This patch adds codes to enable FIFO and disable flow control taken from ns16550 driver. Signed-off-by: Weijie Gao --- drivers/serial/serial_mtk.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/serial/serial_mtk.c b/drivers/serial/serial_mtk.c index

[U-Boot] [PATCH v2 00/28] Add and update drivers for MediaTek MT76x8 SoCs

2019-09-17 Thread Weijie Gao
orts output clock rates of CPU/SYS_BUS/peripherals. - mt7621-spi now uses accurate sys_freq from clock driver. - Make PHY link detection optional via DT. - Select essential drivers in Kconfig instead of setting in defconfig files. Weijie Gao (28): serial: serial_mtk: enable FIFO and disable fl

[U-Boot] [PATCH v2 02/28] serial: serial_mtk: add non-DM version for SPL

2019-09-17 Thread Weijie Gao
This patch adds non-DM version for mtk hsuart driver and makes it compatible with ns16550a driver in configuration. This is needed in SPL with CONFIG_SPL_DM disabled for reducing size. Signed-off-by: Weijie Gao --- drivers/serial/serial.c | 2 + drivers/serial/serial_mtk.c | 202

[U-Boot] [PATCH v2 03/28] dts: mtmips: move uart property clock-frequency into mt7628an.dtsi

2019-09-17 Thread Weijie Gao
The UART of MT7628 has fixed 40MHz input clock so there is no need to put clock-frequency in every dts files. Just put it into the common dtsi file. Reviewed-by: Stefan Roese Signed-off-by: Weijie Gao --- arch/mips/dts/gardena-smart-gateway-mt7688.dts | 1 - arch/mips/dts/linkit-smart-7688.dts

[U-Boot] [PATCH v2 04/28] dts: mtmips: enable high-speed UART support for mt7628

2019-09-17 Thread Weijie Gao
an Roese Signed-off-by: Weijie Gao --- arch/mips/dts/mt7628a.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/mips/dts/mt7628a.dtsi b/arch/mips/dts/mt7628a.dtsi index 6bc0722b07..e9241a0737 100644 --- a/arch/mips/dts/mt7628a.dtsi +++ b/arch/mips/dts/mt7628a.dtsi @

[U-Boot] [PATCH v2 07/28] spi: mt7621-spi: use clock frequency from clk driver

2019-09-17 Thread Weijie Gao
This patch lets the spi driver to use clock provided by the clk driver since the new clk-mt7628 driver provides accurate sys clock frequency. Signed-off-by: Weijie Gao --- v2: newly added --- drivers/spi/mt7621_spi.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions

[U-Boot] [PATCH v2 08/28] spi: mt7621-spi: remove data cache and rewrite its xfer function

2019-09-17 Thread Weijie Gao
and DIDO registers is OPADDR has a reversed byte order. With this patch, any amount of data can be read/written in a single xfer function call. Reviewed-by: Stefan Roese Signed-off-by: Weijie Gao --- drivers/spi/mt7621_spi.c | 197 ++- 1 file changed, 91

[U-Boot] [PATCH v2 11/28] dts: mtmips: add pinctrl node for mt7628

2019-09-17 Thread Weijie Gao
This patch adds pinctrl node with default pin state for mt7628an.dtsi. Signed-off-by: Weijie Gao --- arch/mips/dts/mt7628a.dtsi | 150 + 1 file changed, 150 insertions(+) diff --git a/arch/mips/dts/mt7628a.dtsi b/arch/mips/dts/mt7628a.dtsi index 6d2142f429

[U-Boot] [PATCH v2 09/28] spi: mt7621-spi: restore default register value after each xfer

2019-09-17 Thread Weijie Gao
e the original register fields after cs deactivated. Reviewed-by: Stefan Roese Signed-off-by: Weijie Gao --- drivers/spi/mt7621_spi.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/drivers/spi/mt7621_spi.c b/drivers/spi/mt7621_spi.c index 71625

[U-Boot] [PATCH v2 10/28] pinctrl: add support for MediaTek MT7628

2019-09-17 Thread Weijie Gao
This patch adds pinctrl support for mt7628, with a file for common pinmux functions and a file for mt7628 which has additional support for pinconf. Signed-off-by: Weijie Gao --- drivers/pinctrl/Kconfig | 1 + drivers/pinctrl/Makefile | 1 + drivers

[U-Boot] [PATCH v2 06/28] dts: mtmips: add clock node for mt7628

2019-09-17 Thread Weijie Gao
This patch adds clkctrl node for mt7628 and adds clocks property for some node. Signed-off-by: Weijie Gao --- v2: Changed clkgate node to clkctrl node. Replaced clock-frequency with <&clkctrl CLK_UARTx> for uarts and spi. --- arch/mips/dts/mt7628a.dtsi | 21 +--

[U-Boot] [PATCH v2 27/28] mips: mtmips: select essential drivers in Kconfig

2019-09-17 Thread Weijie Gao
Some drivers (clk, pinctrl, reset, ...) are necessary for reset of the system, they should be always selected. Signed-off-by: Weijie Gao --- v2: newly added --- arch/mips/Kconfig | 6 ++ arch/mips/mach-mtmips/Kconfig | 2 ++ 2 files changed, 8 insertions(+) diff --git a/arch

[U-Boot] [PATCH v2 25/28] dts: mtmips: add default pinctrl to eth nodes for all boards

2019-09-17 Thread Weijie Gao
This patch adds default eth pinctrl for all boards. There are two pinctrl nodes used for two scenarios: ephy_iot_mode- for IOT boards which have only one port (PHY0) ephy_router_mode - For routers which have more than one ports Reviewed-by: Stefan Roese Signed-off-by: Weijie Gao --- arch

[U-Boot] [PATCH v2 26/28] mips: mtmips: change baudrate table for all boards

2019-09-17 Thread Weijie Gao
This patch changes baudrate table for all boards preparing for using mtk highspeed uart driver. Signed-off-by: Weijie Gao --- v2: Removed configs in defconfig files. --- include/configs/gardena-smart-gateway-mt7688.h | 2 +- include/configs/linkit-smart-7688.h| 2 +- 2 files changed

[U-Boot] [PATCH v2 23/28] dts: mtmips: add mmc related nodes for mt7628an.dtsi

2019-09-17 Thread Weijie Gao
This patch adds mmc related nodes for mt7628an.dtsi Signed-off-by: Weijie Gao --- arch/mips/dts/mt7628a.dtsi | 22 ++ 1 file changed, 22 insertions(+) diff --git a/arch/mips/dts/mt7628a.dtsi b/arch/mips/dts/mt7628a.dtsi index 5fd83c1623..76a80c8952 100644 --- a/arch/mips

[U-Boot] [PATCH v2 24/28] dts: mtmips: add default pinctrl for gardena-smart-gateway-mt7688

2019-09-17 Thread Weijie Gao
This adds default pinctrl (dual SPI chip select) for gardena smart gateway Reviewed-by: Stefan Roese Signed-off-by: Weijie Gao --- arch/mips/dts/gardena-smart-gateway-mt7688.dts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/mips/dts/gardena-smart-gateway-mt7688.dts b/arch/mips

[U-Boot] [PATCH v2 13/28] reset: add reset controller driver for MediaTek MIPS platform

2019-09-17 Thread Weijie Gao
This patch adds reset controller driver for MediaTek MIPS platform and header file for mt7628. Signed-off-by: Weijie Gao --- drivers/reset/Kconfig| 7 ++ drivers/reset/Makefile | 1 + drivers/reset/reset-mtmips.c | 82

[U-Boot] [PATCH v2 16/28] net: mt7628-eth: remove hardcoded gpio settings and regmap-based phy reset

2019-09-17 Thread Weijie Gao
This patch removes hardcoded gpio settings as they have been replaced by pinctrl in dts, and also replaces regmap-based phy reset with a more generic reset controller. Reviewed-by: Stefan Roese Signed-off-by: Weijie Gao --- drivers/net/mt7628-eth.c | 45

[U-Boot] [PATCH v2 12/28] dts: mtmips: add default pinctrl for uart nodes

2019-09-17 Thread Weijie Gao
This patch adds default pinctrl for uart nodes Signed-off-by: Weijie Gao --- arch/mips/dts/mt7628a.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/mips/dts/mt7628a.dtsi b/arch/mips/dts/mt7628a.dtsi index 8afea1865d..44fbbd5b25 100644 --- a/arch/mips/dts/mt7628a.dtsi +++ b

[U-Boot] [PATCH v2 05/28] clk: add clock driver for MediaTek MT76x8 platform

2019-09-17 Thread Weijie Gao
This patch adds a clock driver for MediaTek MT7628/7688 SoC. It provides clock gate control as well as getting clock frequency for CPU/SYS/XTAL and some peripherals. Signed-off-by: Weijie Gao --- v2: Changed to a more generic clock driver rather than a gateing only driver. Now supports

[U-Boot] [PATCH v2 28/28] configs: mtmips: remove configs which are selected in Kconfig or useless

2019-09-17 Thread Weijie Gao
Some configs are selected in Kconfig and is no longer needed in the defconfig files. Some configs (power domain, ram) are never used. Signed-off-by: Weijie Gao --- v2: newly added --- configs/gardena-smart-gateway-mt7688-ram_defconfig | 7 --- configs/gardena-smart-gateway-mt7688_defconfig

[U-Boot] [PATCH v2 18/28] net: mt7628-eth: free rx descriptor on receiving failure

2019-09-17 Thread Weijie Gao
mt7628_eth_free_pkt() after received an invalid packet length. Reviewed-by: Stefan Roese Signed-off-by: Weijie Gao --- drivers/net/mt7628-eth.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/mt7628-eth.c b/drivers/net/mt7628-eth.c index abfdc75ad8..d77da26d50 100644 --- a/drivers/net

[U-Boot] [PATCH v2 17/28] net: mt7628-eth: make phy link up detection optional via DT

2019-09-17 Thread Weijie Gao
= explicitly into the eth node. By default the driver is switch mode with all 5 phy ports working without link detection. Signed-off-by: Weijie Gao --- v2: Make link detection optional rather than removing directly. --- drivers/net/Kconfig | 1 + drivers/net/mt7628-eth.c | 59

[U-Boot] [PATCH v2 20/28] dts: mtmips: enable eth port0 led and link poll functions for all boards

2019-09-17 Thread Weijie Gao
This patch adds default p0led status and phy0 link polling for all boards. Reviewed-by: Stefan Roese Signed-off-by: Weijie Gao --- v2: Add phy link detection for all boards. --- arch/mips/dts/gardena-smart-gateway-mt7688.dts | 13 + arch/mips/dts/linkit-smart-7688.dts

[U-Boot] [PATCH v2 15/28] phy: mt76x8-usb-phy: add slew rate calibration and remove non-mt7628 part

2019-09-17 Thread Weijie Gao
This patch adds slew rate calibration for mt76x8-usb-phy, removes code which belongs to mt7620, and gets rid of using syscon and regmap by using clock driver and reset controller. Signed-off-by: Weijie Gao --- drivers/phy/Kconfig | 2 + drivers/phy/mt76x8-usb-phy.c | 225

[U-Boot] [PATCH v2 19/28] net: mt7628-eth: add support to isolate LAN/WAN ports

2019-09-17 Thread Weijie Gao
This patch add support for mt7628-eth to isolate LAN/WAN ports mainly to prevent LAN devices from getting IP address from WAN. Signed-off-by: Weijie Gao --- drivers/net/mt7628-eth.c | 32 1 file changed, 32 insertions(+) diff --git a/drivers/net/mt7628-eth.c b

[U-Boot] [PATCH v2 22/28] mmc: mtk-sd: add a dts property cd-active-high for builtin-cd mode

2019-09-17 Thread Weijie Gao
This patch adds a dts property cd-active-high for builtin-cd mode to make it configurable instead of using hardcoded active-low. Signed-off-by: Weijie Gao --- drivers/mmc/mtk-sd.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk

[U-Boot] [PATCH v2 21/28] mmc: mtk-sd: add support for MediaTek MT7620/MT7628 SoCs

2019-09-17 Thread Weijie Gao
This patch adds mmc support for MediaTek MT7620/MT7628 SoCs. Signed-off-by: Weijie Gao --- v2: Removed unnecessary braces in Kconfig --- drivers/mmc/Kconfig | 2 +- drivers/mmc/mtk-sd.c | 23 --- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/drivers/mmc

[U-Boot] [PATCH v2 14/28] dts: mtmips: update reset controller node for mt7628

2019-09-17 Thread Weijie Gao
This patch updates reset controller node for mt7628 Signed-off-by: Weijie Gao --- arch/mips/dts/mt7628a.dtsi | 36 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/arch/mips/dts/mt7628a.dtsi b/arch/mips/dts/mt7628a.dtsi index 44fbbd5b25

[U-Boot] [PATCH v3 04/28] dts: mtmips: enable high-speed UART support for mt7628

2019-09-25 Thread Weijie Gao
an Roese Signed-off-by: Weijie Gao --- arch/mips/dts/mt7628a.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/mips/dts/mt7628a.dtsi b/arch/mips/dts/mt7628a.dtsi index 6bc0722b07..e9241a0737 100644 --- a/arch/mips/dts/mt7628a.dtsi +++ b/arch/mips/dts/mt7628a.dtsi @

<    1   2   3   4   5   6   7   8   >