[U-Boot] [PATCH v5 0/18] tegra: Add fdt definitions and USB driver

Simon Glass sjg at chromium.org
Wed Jan 25 00:20:54 CET 2012


This series brings in the Linux kernel fdt file and provides a working
USB driver for Tegra2 Seaboard.

(I have done this in one series since otherwise most of the fdt additions
will just look like dead code.)

The driver requires CONFIG_OF_CONTROL and a device tree to operate.

Some enhancements to fdtdec are required to make this easier, and these
are included in the series also. I have had to bring in basic GPIO
support due to the request to put the USB VBUS into the fdt.

Since the kernel recently got a very minimal USB binding, I have started
with that and extended it where appropriate.

Tegra likes to have cache-aligned buffers. I have dropped the patch which
implements this since we will solve this problem by making callers align
their buffers (as we did with MMC).

Changes in v2:
- Add setting of pinmux for USB VBUS GPIO
- Decode USB VBUS GPIO from the fdt
- Decode phy type differently (to match new kernel fdt)
- Improve debug() printouts in case of failure to init USB
- Remove 0x from fdt aliases
- Remove non-fdt operation of USB, since it is not needed
- Remove unneeded CONFIG_TEGRA_USBx defines
- Rename params to timing
- Rename tegra20-usb to tegra20-ehcui (to match new kernel fdt)
- Store entire fdt config in port list, not just register pointer
- Use "okay" instead of "ok" for fdt node status

Changes in v3:
- Disable USB2 which is not used on Seaboard
- Drop Tegra USB alignment patch as we will deal with this another way
- Fix device tree indenting with tabs instead of spaces
- Remove "okay" from nodes since this is the default anyway
- Remove usbparams properties from fdt and moved them to C code

Changes in v4:
- Add clock bindings for Tegra2x
- Add fdtdec function to return peripheral ID
- Add staging area for device tree bindings used in U-Boot
- Use peripheral clock node to obtain peripheral ID
- Use updated fdtdec alias functiona to get USB aliases

Changes in v5:
- Add CONFIG_EHCI_DCACHE which is needed for dcache operation
- Add additional debugging to report active USB ports
- Add dr_mode property to control host/device/otg mode
- Add nvidia,has-legacy-mode property per review comments
- Allow any port to operate in otg mode
- Change device tree comment style from // to /* */
- Correct PTS_MASK value to be unsigned
- Drop unused CONFIG_USB_EHCI_DATA_ALIGN option
- Fixed endian bug in fdtdec_decode_gpios()
- Implement new device tree properties
- Make sure GPIO name is NULL if incorrectly decoded
- Put pinmux setting into a board-specific function
- Remove checking of peripheral ID and try to use only device tree
- Remove support-host-mode property
- Report error if phy clock does not start up
- Update README to indicate that we will commit fdt documentation to U-Boot

Simon Glass (18):
  fdt: Add basic support for decoding GPIO definitions
  arm: fdt: Ensure that an embedded fdt is word-aligned
  arm: fdt: Add skeleton device tree file from kernel
  tegra: fdt: Add Tegra2x device tree file from kernel
  tegra: fdt: Add device tree file for Tegra2 Seaboard from kernel
  fdt: Add staging area for device tree binding documentation
  fdt: Add tegra-usb bindings file from linux
  tegra: fdt: Add additional USB binding
  tegra: fdt: Add clock bindings
  tegra: usb: fdt: Add additional device tree definitions for USB ports
  tegra: usb: fdt: Add USB definitions for Tegra2 Seaboard
  usb: Add support for txfifo threshold
  fdt: Add function to return peripheral/clock ID
  tegra: usb: Add support for Tegra USB peripheral
  tegra: usb: Add USB support to nvidia boards
  tegra: usb: Add common USB defines for tegra2 boards
  tegra: usb: Enable USB on Seaboard
  tegra: fdt: Enable FDT support for Seaboard

 README                                         |    3 +
 arch/arm/cpu/armv7/tegra2/Makefile             |    4 +-
 arch/arm/cpu/armv7/tegra2/config.mk            |    2 +
 arch/arm/cpu/armv7/tegra2/usb.c                |  460 ++++++++++++++++++++++++
 arch/arm/cpu/armv7/u-boot.lds                  |    5 +
 arch/arm/dts/skeleton.dtsi                     |   13 +
 arch/arm/dts/tegra20.dtsi                      |  202 +++++++++++
 arch/arm/include/asm/arch-tegra2/tegra2.h      |    2 +
 arch/arm/include/asm/arch-tegra2/usb.h         |  252 +++++++++++++
 board/nvidia/common/board.c                    |   12 +
 board/nvidia/common/board.h                    |    6 +
 board/nvidia/dts/tegra2-seaboard.dts           |   46 +++
 board/nvidia/seaboard/seaboard.c               |    6 +
 doc/device-tree-bindings/README                |   17 +
 doc/device-tree-bindings/clock/tegra-periphclk |   51 +++
 doc/device-tree-bindings/usb/tegra-usb.txt     |   25 ++
 drivers/usb/host/Makefile                      |    1 +
 drivers/usb/host/ehci-hcd.c                    |    7 +
 drivers/usb/host/ehci-tegra.c                  |   62 ++++
 drivers/usb/host/ehci.h                        |    6 +-
 dts/Makefile                                   |    2 +-
 include/configs/seaboard.h                     |   12 +
 include/configs/tegra2-common.h                |   10 +
 include/fdtdec.h                               |   59 +++
 lib/fdtdec.c                                   |   93 +++++
 25 files changed, 1355 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/tegra2/usb.c
 create mode 100644 arch/arm/dts/skeleton.dtsi
 create mode 100644 arch/arm/dts/tegra20.dtsi
 create mode 100644 arch/arm/include/asm/arch-tegra2/usb.h
 create mode 100644 board/nvidia/dts/tegra2-seaboard.dts
 create mode 100644 doc/device-tree-bindings/README
 create mode 100644 doc/device-tree-bindings/clock/tegra-periphclk
 create mode 100644 doc/device-tree-bindings/usb/tegra-usb.txt
 create mode 100644 drivers/usb/host/ehci-tegra.c

-- 
1.7.7.3



More information about the U-Boot mailing list