aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-10-25net: mt7628-eth: add support to isolate LAN/WAN portsWeijie 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 <weijie.gao@mediatek.com>
2019-10-25net: mt7628-eth: free rx descriptor on receiving failureWeijie Gao
When received a packet with an invalid length recorded in rx descriptor, we should free this rx descriptor to allow us to continue to receive following packets. Without doing so, u-boot will stuck in a dead loop trying to process this invalid rx descriptor. This patch adds a call to mt7628_eth_free_pkt() after received an invalid packet length. Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2019-10-25net: mt7628-eth: make phy link up detection optional via DTWeijie Gao
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 ethernet gmac directly. This patch rewrites it and makes it optional. It can be turned on by adding mediatek,poll-link-phy = <?> 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 <weijie.gao@mediatek.com>
2019-10-25net: mt7628-eth: remove hardcoded gpio settings and regmap-based phy resetWeijie 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 <sr@denx.de> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2019-10-25phy: mt76x8-usb-phy: add slew rate calibration and remove non-mt7628 partWeijie 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 <weijie.gao@mediatek.com>
2019-10-25dts: mtmips: update reset controller node for mt7628Weijie Gao
This patch updates reset controller node for mt7628 Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2019-10-25reset: add reset controller driver for MediaTek MIPS platformWeijie Gao
This patch adds reset controller driver for MediaTek MIPS platform and header file for mt7628. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2019-10-25dts: mtmips: add default pinctrl for uart nodesWeijie Gao
This patch adds default pinctrl for uart nodes Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2019-10-25dts: mtmips: add pinctrl node for mt7628Weijie Gao
This patch adds pinctrl node with default pin state for mt7628an.dtsi. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2019-10-25pinctrl: add support for MediaTek MT7628Weijie 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 <weijie.gao@mediatek.com>
2019-10-25spi: mt7621-spi: restore default register value after each xferWeijie Gao
Currently this driver uses a different way to implement the spi xfer, by modifying some fields of two registers, which is incompatible with the MTK's original SDK linux driver. This will cause the flash data being damaged by the SDK driver. This patch lets the mt7621_spi_set_cs() restore the original register fields after cs deactivated. Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2019-10-25spi: mt7621-spi: remove data cache and rewrite its xfer functionWeijie Gao
The mt7621 spi controller supports continuous generic half-duplex spi transaction. There is no need to cache xfer data at all. To achieve this goal, the OPADDR register must be used as the first data to be sent. And follows the eight generic DIDO registers. But one thing different between OPADDR 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 <sr@denx.de> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2019-10-25spi: mt7621-spi: use clock frequency from clk driverWeijie 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 <weijie.gao@mediatek.com>
2019-10-25dts: mtmips: add clock node for mt7628Weijie Gao
This patch adds clkctrl node for mt7628 and adds clocks property for some node. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2019-10-25clk: add clock driver for MediaTek MT76x8 platformWeijie 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 <weijie.gao@mediatek.com>
2019-10-25dts: mtmips: enable high-speed UART support for mt7628Weijie 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. Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2019-10-25dts: mtmips: move uart property clock-frequency into mt7628an.dtsiWeijie 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 <sr@denx.de> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2019-10-25serial: serial_mtk: add non-DM version for SPLWeijie 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 <weijie.gao@mediatek.com>
2019-10-25serial: serial_mtk: enable FIFO and disable flow controlWeijie Gao
This patch adds codes to enable FIFO and disable flow control taken from ns16550 driver. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2019-10-25drivers: nand: brcmnand: fix nand_chip ecc layout structureWilliam Zhang
The current brcmnand driver is based on 4.18 linux kernel which uses mtd_set_ooblayout to set ecc layout. But nand base code in u-boot is from old kernel which does not use this new API and expect nand_chip.ecc.layout structure to be set. This cause nand_scan_tail function running into a bug check if the device has a different oob size than the default ones. This patch ports the brcmstb_choose_ecc_layout function from kernel 4.6.7 that supports the ecc layout struture and replaces the mtd_set_ooblayout method Signed-off-by: William Zhang <william.zhang@broadcom.com> Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>
2019-10-25mips: bmips: switch to board defines for dtbÁlvaro Fernández Rojas
Fixes commit 344db3f, which added missing bmips dtbs depending on their SoCs. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2019-10-25bmips: correct name charactersÁlvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2019-10-25bmips: configs: switch to size definitionsÁlvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2019-10-25mips: bmips: remove unneeded definitionsÁlvaro Fernández Rojas
These are no longer needed. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2019-10-25bmips: enable vr-3032u nand supportÁlvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2019-10-25bmips: bcm63268: add support for brcmnandÁlvaro Fernández Rojas
BCM63268 uses 4.0 HW nand controller, which is currently supported by brcmnand driver. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2019-10-25bmips: bcm6362: add support for brcmnandÁlvaro Fernández Rojas
BCM6362 uses old 2.2 HW nand controller, which isn't currently supported by brcmnand driver. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2019-10-25bmips: bcm6328: add support for brcmnandÁlvaro Fernández Rojas
BCM6328 uses old 2.2 HW nand controller, which isn't currently supported by brcmnand driver. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2019-10-25bmips: bcm6368: add support for brcmnandÁlvaro Fernández Rojas
BCM6368 uses old 2.1 HW nand controller, which isn't currently supported by brcmnand driver. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2019-10-25nand: brcm: add BCM6368 supportÁlvaro Fernández Rojas
This adds support for BCM6368, BCM6328, BCM6362 and BCM63268 SoCs. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2019-10-25MIPS: add compile time definition of L2 cache sizeRamon Fried
If configuration is set to skip low level init, automatic probe of L2 cache size is not performed and the size is set to 0. Flushing or invalidating the L2 cache will fail in this case. Add a static configuration (SYS_DCACHE_LINE_SIZE) with default set to 0. Signed-off-by: Ramon Fried <rfried.dev@gmail.com>
2019-10-24Merge branch '2019-10-24-UFS-support'Tom Rini
- Add Universal Flash Storage (UFS) support
2019-10-24Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvellTom Rini
- Add support for HyperBus Memory Controller of TI's J721e and AM654 SoCs (Vignesh)
2019-10-24configs: j721e_evm_a72_defconfig: Add HBMC related configsVignesh Raghavendra
Enable HBMC and HyperFlash in A72 SPL and A72 U-Boot Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Reviewed-by: Stefan Roese <sr@denx.de>
2019-10-24configs: j721e_evm.h: Define CONFIG_SYS_MAX_FLASH_BANKS_DETECTVignesh Raghavendra
Define CONFIG_SYS_MAX_FLASH_BANKS_DETECT so that number of flash banks are automatically detected by CFI flash driver Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Reviewed-by: Stefan Roese <sr@denx.de>
2019-10-24arm: dts: k3-j721e-som-p0: Add HyperFlash nodeVignesh Raghavendra
J721e SoM as a 64MB HyperFlash on board. Add pinmux and DT node for the same. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Reviewed-by: Stefan Roese <sr@denx.de>
2019-10-24arm: dts: k3-j721e-mcu-wakeup: Add HyperBus Controller nodeVignesh Raghavendra
Add DT node for HyperBus Memory Controller in the FSS. On J721e, its not possible to use OSPI0 and HBMC simultaneously as they are muxed within the Flash Subsystem hence disable HBMC by default as keep OSPI enabled. Bootloader will fixup DT when it detects HyperFlash instead of OSPI. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Reviewed-by: Stefan Roese <sr@denx.de>
2019-10-24mtd: Add TI HyperBus Memory Controller driverVignesh Raghavendra
AM654/J721e has HyperBus Memory Controller that supports HyperFlash and HyperRAM devices. It provides a memory mapped interface to interact with these devices. Add a driver to support the same. Driver calibrates the controller, setups up for MMIO access and probes HyperFlash child node. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Reviewed-by: Stefan Roese <sr@denx.de>
2019-10-24mtd: cfi_flash: Use CONFIG_SYS_MONITOR_BASE only when definedVignesh Raghavendra
Make use of CONFIG_SYS_MONITOR_BASE only when available to avoid build error when CONFIG_SYS_MONITOR_BASE is not defined. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Reviewed-by: Stefan Roese <sr@denx.de>
2019-10-23configs: j721e_evm_a72: Enable configs for UFSFaiz Abbas
Enable SCSI and UFS related configs. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2019-10-23env: ti: Add environment variables to boot from UFSFaiz Abbas
Add environment variables to boot kernel from a filesystem contained in the 2nd UFS LUN. The user can boot from a ufs filesystem just by entering the following commands. => setenv boot ufs => boot Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2019-10-23cmd: Add Support for UFS commandsFaiz Abbas
Add Support for commands to initialize and configure UFS devices. TODO: Add Support for commands to resize and reconfigure LUNs Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2019-10-23arm: dts: k3-j721e-main: Add UFS nodesFaiz Abbas
Add TI UFS glue layer and Cadence UFS Host controller DT nodes. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2019-10-23ufs: Add glue layer driver for TI J721E devicesFaiz Abbas
Add glue layer driver for the controller present on TI's J721E devices. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2019-10-23ufs: Add Support for Cadence platform UFS driverFaiz Abbas
Add Support for the platform driver for the Cadence device present on TI's J721e device. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2019-10-23ufs: Add Initial Support for UFS subsystemFaiz Abbas
Add Support for UFS Host Controller Interface (UFSHCI) for communicating with Universal Flash Storage (UFS) devices. The steps to initialize the host controller interface are the following: - Initiate the Host Controller Initialization process by writing to the Host controller enable register. - Configure the Host Controller base address registers by allocating a host memory space and related data structures. - Unipro link startup procedure - Check for connected device - Configure UFS host controller to process requests Also register this host controller as a SCSI host controller. Taken from Linux Kernel v5.2 (drivers/scsi/ufs/ufshcd.c) and ported to U-boot. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2019-10-23scsi: Add dma direction member to command structureFaiz Abbas
Some SCSI devices like UFS use DMA for executing scsi commands and hence need to know the direction of transfer of the dma. Add a dma_dir element to the command structure to facilitate this. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2019-10-23scsi: Retry inquiry 3 times to overcome Unit Attention conditionFaiz Abbas
The UFS SCSI device LUNs are observed to return failure the first time a unit ready inquiry is sent and pass on the second try. Send this inquiry 3 times to make sure device is ready. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2019-10-23scsi: Add max_bytes_per_req to scsi_platdataFaiz Abbas
Add max_bytes_per_req to scsi_platdata to enable the host driver to limit the number of bytes that can be read/written per request. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2019-10-23scsi: Simplify scsi_read()/_write()Faiz Abbas
With no non-DM driver using scsi_read()/_write() APIs, remove the legacy implementations. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> [trini: Reorder slightly and mark scsi_read/write behind BLK test to avoid warnings] Signed-off-by: Tom Rini <trini@konsulko.com>