[U-Boot] [PATCH v4 00/21] Add support for 96boards Dragonboard410C board

Mateusz Kulikowski mateusz.kulikowski at gmail.com
Thu Mar 31 23:12:13 CEST 2016


Hi All,

This is next last version of Dragonboard410c series ;)
It should apply cleanly to latest master (080c499d).

I welcome all improvement ideas but please bear in mind I will
probably implement them after this series is merged.

Very little updates this time:
- Added ACKs
- Added MMU configuration (I did that in mach code as 
    it's shared for all devices using this SoC)
- Fixed missing renames (ehci-fsl.h -> ehci-ci.h) - sorry for that!
- Moved CONFIG_OF_LIBFDT to defconfig and cleaned it up with savedefconfig

As for testing - I've manually tested it on dragonboard and
did buildman test for all ARM targets (~540 boards, hopefuly I catched all 
that are affected by this series in any way).

@Marek, Joe, Tom: thanks for the input!

Regards,
Mateusz

V3 cover contents:

Sorry for longer delay, but I had too many things to do recently.

As always - for "simplicity" this series is available on my github:
https://github.com/hallor/u-boot/tree/dragonboard-for-mainline-v3

There are almost no changes + one bugfix:
- Bugfix: small rework of serial driver - U-Boot was interrupted
  when no serial converter was attached.
- Updated dragonboard readme.txt with info on how to stop @ fastboot
- Added SPMI entries into test.dts (so automatic DM tests would not fail)
- Added Tested-by and Reviewed-by Simon (from v2 comments)
- Rebased to recent master
- Fixed warnings in ASIX and ULPI code
- Added comments to head.S, little updates suggested by Daniel

@Simon: Thanks for the tests of v2!

Daniel Glöckner, Tom Rini, Jagan Teki: Thanks for the comments!

V2 cover contents:

This is updated series. 99% of review changes are applied,
specific changes are (as always) include in each patch.

You can find this series on my github (if anyone just want to
try it - that branch has also wait_for_bit applied):
https://github.com/hallor/u-boot/tree/dragonboard-for-mainline-v2

I did target tests on Dragonboard410c, and build tested
platforms that may be affected by ULPI changes.

@Simon:
I decided not to rewrite pm8916_gpio for now, but for sake of
"cleannes" moved offending bindings to separate file (and
they are now properly childs of pm8916_gpio).
I will update it during rework of SoC gpio driver
(I will have to create proper pinmux/pinctrl drivers to
get rid of Little Kernel eventually).

This series still needs wait_for_bit series that is not
included (yet).

V1 cover contents:

I finally managed to cleanup RFC for submission. I've included changes in
each patch, there is a bit of them, but all are needed :)

This series requires wait_for_bit patch that I send few days ago:
https://patchwork.ozlabs.org/patch/561185/

RFC cover contents:
http://lists.denx.de/pipermail/u-boot/2015-December/237365.html

Changes in v4:
- Add Ack from Marek
- Add Ack from Marek
- Add Ack from Marek
- Add Ack from Marek and Joe
- Add missing renames (arch/* and board/*)
- Add sysmap for apq8016 (required to enable MMU)
- Move CONFIG_OF_LIBFDT to defconfig and cleaned it up with savedefconfig

Changes in v3:
- Add msm_serial_fetch that tries to fetch characters from FIFO
- Decrease no of characters requested in RX transaction
- Try to fetch characters from FIFO when tstc()/pending() is called
- New patch
- New patch
- New patch
- Updated test.dts to include SPMI like sandbox.dts does
- readme: Added info on how to enter fastboot mode and that
  dtbTool is also part of skales. Added more explanation
  on image generation.
- head: Add comment why it's needed, drop MZ EFI signature
  that makes no sense on this particular SoC, fix confusing
  entry point name (+update .lds file)

Changes in v2:
- Added newline before return... (globally)
- Renamed p to priv (priv data) - it required some rewrapping
- Added Reviewed-by
- Reordered includes (again)
- Added newlines between returns
- Fixed error handling in msm_gpio_probe
- Added reviewed-by
- Add reviewed-by
- Add Reviewed-by (sjg)
- Add better (any) descriptions for Kconfig items.
- New patch, independent of the rest
- Should compile cleanly on all affected platforms
- Is orthogonal to series (i.e. if get's NAK will not break rest of series)
- Add acked-by
- Add reviewed-by
- Add Acked-by
- Use PORT_... macro to write to portsc
- Remove extra whitespace in probe()
- Add acked-by
- Use proper  entry order in Kconfig
- Rename CONFIG_DM_SPMI -> CONFIG_SPMI
- Fix header ordering
- Add reviewed-by
- Rename CONFIG_DM_SPMI -> CONFIG_SPMI
- Rename r -> regs, p -> priv
- Add reviewed-by
- Update binding doc (drop unused bindig)
- Rename DM_SPMI -> SPMI
- Rename p -> priv (in write/read)
- Fix header ordering (again)
- Add reviewed-by
- Add reviewed-by
- Reordered Kconfig & Makefile (to keep alphabetical ordering)
- Added link to dt binding @ help
- Add Reviewed-by
- Rename DM_SPMI -> SPMI
- Make MND divider comments more compact :)
- p -> priv
- Add reviewed-by
- Reordered Kconfig to keep alphabetical order
- Renamed reset_sandbox -> msm_reset (typo in reset.c)
- Renamed CONFIG_DM_SPMI -> CONFIG_SPMI
- Removed extra enter in dragonboard file
- Added ULPI* to defconfig
- Added MAINTAINERS to board
- Cleaned up config file - use distro defaults/environment:
  - Dropped multiple CONFIG_CMD* and other CONFIG_*
  - Added distro env/config
  - Dropped old boot commands
- Split dts - pm8916_gpio entries are taken directly from
  Linux Dragonboard dts; Add handles for u-boot in -uboot.dtsi;
  They will be removed once gpio drivers are converted to pinctrl.
- Renamed some pmic nodes, fixed dragonboard.c to find them properly.
- Added header and converted comments to c98-style in head.S
- Print error if pmic gpio node is not found.
- New patch

Changes in v1:
- Added (better) help to KConfig
- Added dt binding documentation
- Fixed include ordering
- Reworked msm_serial_getc
- Added error handling to msm_uart_clk_init (that is ignored later for now)
- Dropped unneeded DM_FLAG_PRE_RELOC
- Added dt binding documentation
- Added help to KConfig
- Use clrsetbits() to switch direction
- Fixed include order
- Added #defines for registers/register fields
- Added secondary compatible string
- Added commit message
- Added DT binding documentation
- Added Kconfig help
- Reordered includes
- Dropped redundant fields from msm_sdhc
- Cleaned up clock init code (+ added error handling)
- Dropped mdelay - use wait_for_bit instead in reset code
- Added missing newline after declarations
- Added error handling if "reg" is missing
- Converted base address to pointer
- No changes, just added Acked-by, Reviewed-by
- Reordered header files
- Removed braces around constant
- Added more verbose help to KConfig
- Added ULPI dependency to Kconfig
- Drop register #defines - use ehci-ci.h instead
- Create fixed ulpi viewport for device
- Use setbits/clearbits where possible
- Use wait_for_bit to reset controller
- Add dt binding documents
- Reorder includes
- Add read/write arguments documentation
- add binding documentation and better Kconfig help
- Changed a bit mapping
- Change include order
- Use clrsetbits* where possible
- Add one more supported dts id
- Handle missing fields in dt properly
- Added dt bindings
- Reoder includes
- Replaced extract_* macros with ordinary shift/mask
- Added error checking and whitespaces in probe
- Add binding doc
- Fixed inlcude ordering
- Merged direction_input and direction_output functions
- gpio_get: use switch instead of stacked if
- use pmic_clrsetbits
- add possibility to change prwkey bank name
- Handle invalid bindings
- Sanity HW check (i.e. check type/subtype registers)
- Fix include order
- Cleanup defines (added spaces for readibility)
- Base address is integer to avoid casting
- Use setbits_* family where possible
- Drop unneded comments, added newlines where needed
- Check return value of dev_get_addr
- Add binding for apq8016
- Cleaned up divider calculation
- Drop most of gpio.h (only empty file is needed)
- Add better help for dragonboard
- Move static structures to board_prepare_usb
- Add DM_SPMI to defconfig

Mateusz Kulikowski (21):
  serial: Add support for Qualcomm serial port
  gpio: Add support for Qualcomm gpio controller
  mmc: Add support for Qualcomm SDHCI controller
  ehci-hcd: Add init_after_reset
  usb: ulpi: Add Kconfig options for ULPI
  Migrate CONFIG_ULPI* to Kconfig
  usb: ulpi: Fix viewport_addr type
  usb: ulpi: Fix compile warning in read/write on 64-bit machines.
  eth: asix88179: Print packet length properly
  usb: Rename ehci-fsl.h to ehci-ci.h
  usb: ehci-ci: Add missing registers.
  ehci-ci.h: drop generic USBCMD fields
  ehci: Add support for Qualcomm EHCI
  drivers: Add SPMI bus uclass
  spmi: Add sandbox test driver
  drivers: spmi: Add support for Qualcomm SPMI bus driver
  pmic: Add support for Qualcomm PM8916 PMIC
  gpio: Add support for Qualcomm PM8916 gpios
  arm: Add support for Qualcomm Snapdragon family
  board: Add Qualcomm Dragonboard 410C support
  Add myself as Snapdragon and SPMI maintainer

 MAINTAINERS                                        |  11 +
 arch/arm/Kconfig                                   |  12 +
 arch/arm/Makefile                                  |   1 +
 arch/arm/dts/Makefile                              |   2 +
 arch/arm/dts/dragonboard410c-uboot.dtsi            |  28 ++
 arch/arm/dts/dragonboard410c.dts                   | 148 ++++++++++
 arch/arm/mach-snapdragon/Kconfig                   |  26 ++
 arch/arm/mach-snapdragon/Makefile                  |   9 +
 arch/arm/mach-snapdragon/clock-apq8016.c           | 262 ++++++++++++++++++
 arch/arm/mach-snapdragon/include/mach/gpio.h       |   9 +
 .../mach-snapdragon/include/mach/sysmap-apq8016.h  |  14 +
 arch/arm/mach-snapdragon/reset.c                   |  40 +++
 arch/arm/mach-snapdragon/sysmap-apq8016.c          |  30 ++
 arch/powerpc/cpu/mpc83xx/cpu_init.c                |   2 +-
 arch/sandbox/dts/sandbox.dts                       |  20 ++
 arch/sandbox/dts/test.dts                          |  20 ++
 board/boundary/nitrogen6x/nitrogen6x.c             |   2 +-
 board/denx/m53evk/m53evk.c                         |   2 +-
 board/freescale/mx51evk/mx51evk.c                  |   2 +-
 board/freescale/mx6slevk/mx6slevk.c                |   2 +-
 board/freescale/mx6sxsabreauto/mx6sxsabreauto.c    |   2 +-
 board/freescale/mx6sxsabresd/mx6sxsabresd.c        |   2 +-
 board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c  |   2 +-
 board/freescale/mx7dsabresd/mx7dsabresd.c          |   2 +-
 board/qualcomm/dragonboard410c/Kconfig             |  15 +
 board/qualcomm/dragonboard410c/MAINTAINERS         |   6 +
 board/qualcomm/dragonboard410c/Makefile            |   8 +
 board/qualcomm/dragonboard410c/dragonboard410c.c   | 131 +++++++++
 board/qualcomm/dragonboard410c/head.S              |  34 +++
 board/qualcomm/dragonboard410c/readme.txt          |  71 +++++
 board/qualcomm/dragonboard410c/u-boot.lds          |  90 ++++++
 board/solidrun/mx6cuboxi/mx6cuboxi.c               |   2 +-
 configs/colibri_t20_defconfig                      |   2 +
 configs/dragonboard410c_defconfig                  |  26 ++
 configs/harmony_defconfig                          |   2 +
 configs/mcx_defconfig                              |   3 +
 configs/mt_ventoux_defconfig                       |   3 +
 configs/sandbox_defconfig                          |   4 +
 configs/twister_defconfig                          |   3 +
 configs/zynq_picozed_defconfig                     |   2 +
 configs/zynq_zc702_defconfig                       |   2 +
 configs/zynq_zc706_defconfig                       |   2 +
 configs/zynq_zed_defconfig                         |   2 +
 configs/zynq_zybo_defconfig                        |   2 +
 doc/device-tree-bindings/gpio/gpio-msm.txt         |  22 ++
 doc/device-tree-bindings/gpio/pm8916_gpio.txt      |  48 ++++
 doc/device-tree-bindings/mmc/msm_sdhci.txt         |  25 ++
 doc/device-tree-bindings/pmic/pm8916.txt           |  18 ++
 doc/device-tree-bindings/serial/msm-serial.txt     |   6 +
 doc/device-tree-bindings/spmi/spmi-msm.txt         |  26 ++
 doc/device-tree-bindings/spmi/spmi-sandbox.txt     |  31 +++
 doc/device-tree-bindings/usb/ehci-msm.txt          |  10 +
 doc/git-mailrc                                     |   3 +
 drivers/Kconfig                                    |   2 +
 drivers/Makefile                                   |   1 +
 drivers/gpio/Kconfig                               |  24 ++
 drivers/gpio/Makefile                              |   2 +
 drivers/gpio/msm_gpio.c                            | 135 +++++++++
 drivers/gpio/pm8916_gpio.c                         | 302 +++++++++++++++++++++
 drivers/mmc/Kconfig                                |   9 +
 drivers/mmc/Makefile                               |   1 +
 drivers/mmc/msm_sdhci.c                            | 180 ++++++++++++
 drivers/power/pmic/Kconfig                         |  16 ++
 drivers/power/pmic/Makefile                        |   1 +
 drivers/power/pmic/pm8916.c                        |  96 +++++++
 drivers/serial/Kconfig                             |   8 +
 drivers/serial/Makefile                            |   1 +
 drivers/serial/serial_msm.c                        | 217 +++++++++++++++
 drivers/spmi/Kconfig                               |  23 ++
 drivers/spmi/Makefile                              |   9 +
 drivers/spmi/spmi-msm.c                            | 189 +++++++++++++
 drivers/spmi/spmi-sandbox.c                        | 157 +++++++++++
 drivers/spmi/spmi-uclass.c                         |  48 ++++
 drivers/usb/Kconfig                                |   2 +
 drivers/usb/eth/asix88179.c                        |   2 +-
 drivers/usb/host/Kconfig                           |  11 +
 drivers/usb/host/Makefile                          |   1 +
 drivers/usb/host/ehci-fsl.c                        |   2 +-
 drivers/usb/host/ehci-hcd.c                        |   6 +
 drivers/usb/host/ehci-mpc512x.c                    |   6 +-
 drivers/usb/host/ehci-msm.c                        | 178 ++++++++++++
 drivers/usb/host/ehci-mx5.c                        |   2 +-
 drivers/usb/host/ehci-mx6.c                        |   2 +-
 drivers/usb/host/ehci-mxc.c                        |   2 +-
 drivers/usb/host/ehci-vf.c                         |   2 +-
 drivers/usb/host/ehci-zynq.c                       |   2 +-
 drivers/usb/host/ehci.h                            |   1 +
 drivers/usb/ulpi/Kconfig                           |  33 +++
 drivers/usb/ulpi/ulpi-viewport.c                   |   5 +-
 include/configs/colibri_t20.h                      |   3 +-
 include/configs/dragonboard410c.h                  | 150 ++++++++++
 include/configs/harmony.h                          |   2 -
 include/configs/mcx.h                              |   2 -
 include/configs/tam3517-common.h                   |   2 -
 include/configs/zynq-common.h                      |   2 -
 include/dm/uclass-id.h                             |   1 +
 include/spmi/spmi.h                                |  47 ++++
 include/usb/{ehci-fsl.h => ehci-ci.h}              |  16 +-
 include/usb/ulpi.h                                 |   4 +-
 test/dm/Makefile                                   |   1 +
 test/dm/spmi.c                                     | 115 ++++++++
 101 files changed, 3231 insertions(+), 41 deletions(-)
 create mode 100644 arch/arm/dts/dragonboard410c-uboot.dtsi
 create mode 100644 arch/arm/dts/dragonboard410c.dts
 create mode 100644 arch/arm/mach-snapdragon/Kconfig
 create mode 100644 arch/arm/mach-snapdragon/Makefile
 create mode 100644 arch/arm/mach-snapdragon/clock-apq8016.c
 create mode 100644 arch/arm/mach-snapdragon/include/mach/gpio.h
 create mode 100644 arch/arm/mach-snapdragon/include/mach/sysmap-apq8016.h
 create mode 100644 arch/arm/mach-snapdragon/reset.c
 create mode 100644 arch/arm/mach-snapdragon/sysmap-apq8016.c
 create mode 100644 board/qualcomm/dragonboard410c/Kconfig
 create mode 100644 board/qualcomm/dragonboard410c/MAINTAINERS
 create mode 100644 board/qualcomm/dragonboard410c/Makefile
 create mode 100644 board/qualcomm/dragonboard410c/dragonboard410c.c
 create mode 100644 board/qualcomm/dragonboard410c/head.S
 create mode 100644 board/qualcomm/dragonboard410c/readme.txt
 create mode 100644 board/qualcomm/dragonboard410c/u-boot.lds
 create mode 100644 configs/dragonboard410c_defconfig
 create mode 100644 doc/device-tree-bindings/gpio/gpio-msm.txt
 create mode 100644 doc/device-tree-bindings/gpio/pm8916_gpio.txt
 create mode 100644 doc/device-tree-bindings/mmc/msm_sdhci.txt
 create mode 100644 doc/device-tree-bindings/pmic/pm8916.txt
 create mode 100644 doc/device-tree-bindings/serial/msm-serial.txt
 create mode 100644 doc/device-tree-bindings/spmi/spmi-msm.txt
 create mode 100644 doc/device-tree-bindings/spmi/spmi-sandbox.txt
 create mode 100644 doc/device-tree-bindings/usb/ehci-msm.txt
 create mode 100644 drivers/gpio/msm_gpio.c
 create mode 100644 drivers/gpio/pm8916_gpio.c
 create mode 100644 drivers/mmc/msm_sdhci.c
 create mode 100644 drivers/power/pmic/pm8916.c
 create mode 100644 drivers/serial/serial_msm.c
 create mode 100644 drivers/spmi/Kconfig
 create mode 100644 drivers/spmi/Makefile
 create mode 100644 drivers/spmi/spmi-msm.c
 create mode 100644 drivers/spmi/spmi-sandbox.c
 create mode 100644 drivers/spmi/spmi-uclass.c
 create mode 100644 drivers/usb/host/ehci-msm.c
 create mode 100644 drivers/usb/ulpi/Kconfig
 create mode 100644 include/configs/dragonboard410c.h
 create mode 100644 include/spmi/spmi.h
 rename include/usb/{ehci-fsl.h => ehci-ci.h} (96%)
 create mode 100644 test/dm/spmi.c

-- 
2.5.0



More information about the U-Boot mailing list