[U-Boot] [PATCH v3 00/14] Initial Microchip PIC32MZ[DA] Support

Purna Chandra Mandal
2016-01-12T10:18:15Z

This patch series adds support for Microchip PIC32MZ[DA] MIPS microcontroller platform.
All drivers required to boot from MMC uSD card and network are included in it; clock,
pinctrl, gpio, DDR2, serial, SDHCI, ethernet.
This series is tested on PIC32MZ[DA] Starter Kit.

This series is generated on mips_io_v1 branch of u-boot-mips tree.
A tree with these changes are available at [2].

[2] https://github.com/purna-mandal/u-boot/tree/pic32-upstream-v3
[1] https://github.com/purna-mandal/u-boot/tree/pic32-upstream-v2
[0] https://github.com/purna-mandal/u-boot/tree/pic32-upstream-v1

Changes in v3:
- drop empty choices in mach-pic32/Kconfig
- add pic32_get_syscfg_base() for device-config regs base
- rename clk-pic32.c to clk_pic32.c
- update clock binding documentation
- replace pic32_ioremap() with ioremap()
- read register base from device-tree
- add/update comments to explain how pinctrl'r works.
- remove ofdata_to_platdata, and replace platdata with priv
- serial:remove special handling of '\r' as being handled by serial-uclass
- serial:remove loop to wait for space in tx buffer before pumping char
- pinctrl: annotating fixed table with const
- ddr: fix camel-case in ddr2 timing parameters
- ddr: fix cmd index parameter of host_load_cmd().
- drop forcing CONFIG_MIPS_BOOT_* selection in mach-pic32/Kconfig
- indent assembly instructions in delay slot
- made GPIO-nodes child of pinctrl-node in devicetree
- drop SKIP_LOWLEVEL_INIT, GBL_DATA_OFFSET from config header
- move CMD_MEMTEST, CMD_MEMINFO to defconfig
- increase SYS_MALLOC_F_LEN to 0x600
- use auto-generated defconfig - no hand edit
- net: merge internal wrappers functions with eth operation callbacks
- net: read ethernet-phy address from device-tree
- net: rename ethernet callback functions

Changes in v2:
- move PIC32 specific headers to arch/mips/mach-pic32/include/mach/
- define register-base as physical address
- drop CONFIG_PIC32_SUPPORTS_FDT_BOOT
- add mpll get clock rate
- add pinconf routine for configuring pin property
- fix missing/corrupted chars during baud rate change
- remove loop until any char is avaialbale in getc()
- move ddr2 initialization from board/microchip/ to drivers/ddr/microchip
- drop board_early_init_f
- use macro LEAF(), END() for lowlevel_init
- move initialization of board_init_f() argument to common start.S
- move initdram() from board/microchip/ to mach-pic32/cpu.c
- remove MIPS virtual address in favor physical one in dts file
- move CONFIG_SYS_TEXT_BASE (from board/*/config.mk) to include/configs/<board>.h
- drop sdhci shared bus configuration (for shared interrupt, clock pins)
- drop shared bus (shared pin selection) configuration.
- replace unbounded loop with wait_for_bit()
- replace register access as readl/writel(base + offset)
- translate (dts provided) physical address to MIPS kseg1 address before use

Andrei Pistirica (1):
drivers: mmc: add driver for Microchip PIC32 SDHCI controller.

Paul Thacker (1):
drivers: serial: add driver for Microchip PIC32 UART controller.

Purna Chandra Mandal (12):
MIPS: initialize board_init_f() argument to zero.
MIPS: initial infrastructure for Microchip PIC32 architecture
drivers: clk: Add clock driver for Microchip PIC32 Microcontroller.
drivers: pinctrl: Add pinctrl driver for Microchip PIC32.
drivers: gpio: add driver for Microchip PIC32 GPIO controller.
drivers: ddr: Add DDR2 SDRAM controller driver for Microchip PIC32.
MIPS: Add support for Microchip PIC32MZ[DA] SoC family.
board: Add Microchip PIC32MZ[DA]-Starter-Kit board.
board: add SDHCI support for PIC32MZDASK board.
drivers: net: phy: add SMSC LAN8740 Phy support.
drivers: net: Add ethernet driver for Microchip PIC32.
board: Enable ethernet, tftpboot support to pic32mzdask board.

arch/mips/Kconfig | 6 +
arch/mips/Makefile | 1 +
arch/mips/cpu/start.S | 2 +
arch/mips/dts/Makefile | 2 +-
arch/mips/dts/pic32mzda.dtsi | 174 ++++++
arch/mips/dts/pic32mzda_sk.dts | 55 ++
arch/mips/mach-pic32/Kconfig | 38 ++
arch/mips/mach-pic32/Makefile | 7 +
arch/mips/mach-pic32/cpu.c | 160 ++++++
arch/mips/mach-pic32/include/mach/ddr.h | 32 ++
arch/mips/mach-pic32/include/mach/pic32.h | 79 +++
arch/mips/mach-pic32/lowlevel_init.S | 27 +
arch/mips/mach-pic32/reset.c | 36 ++
board/microchip/pic32mzda/Kconfig | 13 +
board/microchip/pic32mzda/MAINTAINERS | 6 +
board/microchip/pic32mzda/Makefile | 7 +
board/microchip/pic32mzda/README | 22 +
board/microchip/pic32mzda/pic32mzda.c | 31 ++
configs/pic32mzdask_defconfig | 426 +++++++++++++++
.../clock/microchip,pic32-clock.txt | 33 ++
.../serial/microchip,pic32-uart.txt | 5 +
drivers/Makefile | 1 +
drivers/clk/Makefile | 1 +
drivers/clk/clk_pic32.c | 433 +++++++++++++++
drivers/ddr/microchip/Makefile | 6 +
drivers/ddr/microchip/ddr2.c | 278 ++++++++++
drivers/ddr/microchip/ddr2_regs.h | 148 +++++
drivers/ddr/microchip/ddr2_timing.h | 65 +++
drivers/gpio/Kconfig | 7 +
drivers/gpio/Makefile | 2 +-
drivers/gpio/pic32_gpio.c | 175 ++++++
drivers/mmc/Kconfig | 6 +
drivers/mmc/Makefile | 2 +-
drivers/mmc/pic32_sdhci.c | 61 +++
drivers/mmc/sdhci.c | 12 +
drivers/net/Kconfig | 7 +
drivers/net/Makefile | 1 +
drivers/net/phy/smsc.c | 10 +
drivers/net/pic32_eth.c | 606 +++++++++++++++++++++
drivers/net/pic32_eth.h | 171 ++++++
drivers/net/pic32_mdio.c | 121 ++++
drivers/pinctrl/Kconfig | 9 +
drivers/pinctrl/Makefile | 1 +
drivers/pinctrl/pinctrl_pic32.c | 363 ++++++++++++
drivers/serial/Kconfig | 13 +
drivers/serial/Makefile | 1 +
drivers/serial/serial_pic32.c | 199 +++++++
include/configs/pic32mzdask.h | 178 ++++++
include/dt-bindings/clock/microchip,clock.h | 29 +
49 files changed, 4065 insertions(+), 3 deletions(-)
create mode 100644 arch/mips/dts/pic32mzda.dtsi
create mode 100644 arch/mips/dts/pic32mzda_sk.dts
create mode 100644 arch/mips/mach-pic32/Kconfig
create mode 100644 arch/mips/mach-pic32/Makefile
create mode 100644 arch/mips/mach-pic32/cpu.c
create mode 100644 arch/mips/mach-pic32/include/mach/ddr.h
create mode 100644 arch/mips/mach-pic32/include/mach/pic32.h
create mode 100644 arch/mips/mach-pic32/lowlevel_init.S
create mode 100644 arch/mips/mach-pic32/reset.c
create mode 100644 board/microchip/pic32mzda/Kconfig
create mode 100644 board/microchip/pic32mzda/MAINTAINERS
create mode 100644 board/microchip/pic32mzda/Makefile
create mode 100644 board/microchip/pic32mzda/README
create mode 100644 board/microchip/pic32mzda/pic32mzda.c
create mode 100644 configs/pic32mzdask_defconfig
create mode 100644 doc/device-tree-bindings/clock/microchip,pic32-clock.txt
create mode 100644 doc/device-tree-bindings/serial/microchip,pic32-uart.txt
create mode 100644 drivers/clk/clk_pic32.c
create mode 100644 drivers/ddr/microchip/Makefile
create mode 100644 drivers/ddr/microchip/ddr2.c
create mode 100644 drivers/ddr/microchip/ddr2_regs.h
create mode 100644 drivers/ddr/microchip/ddr2_timing.h
create mode 100644 drivers/gpio/pic32_gpio.c
create mode 100644 drivers/mmc/pic32_sdhci.c
create mode 100644 drivers/net/pic32_eth.c
create mode 100644 drivers/net/pic32_eth.h
create mode 100644 drivers/net/pic32_mdio.c
create mode 100644 drivers/pinctrl/pinctrl_pic32.c
create mode 100644 drivers/serial/serial_pic32.c
create mode 100644 include/configs/pic32mzdask.h
create mode 100644 include/dt-bindings/clock/microchip,clock.h

--
1.8.3.1