[U-Boot] [PATCH v6 0/20] tegra: Add fdt definitions and USB driver
Simon Glass
sjg at chromium.org
Mon Feb 27 21:52:33 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
Changes in v6:
- Add clock bindings from Stephen Warren's latest patch
- Add new patch to bring in clock bindings to seaboard
- Drop fdt alignment patch as we will handle this after generic reloc
- Move peripheral decode function into Tegra's clock.c
- Remove dr_mode properties from SOC .dtsi file and move to boards
- Use updated clock_decode_periph_id() function
Simon Glass (20):
fdt: Tidy up a few fdtdec problems
fdt: Add functions to access phandles, arrays and bools
fdt: Add basic support for decoding GPIO definitions
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: fdt: Add clock bindings for Tegra2 Seaboard
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
tegra: 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/clock.c | 19 +
arch/arm/cpu/armv7/tegra2/config.mk | 2 +
arch/arm/cpu/armv7/tegra2/usb.c | 460 ++++++++++++++++++++
arch/arm/dts/skeleton.dtsi | 13 +
arch/arm/dts/tegra20.dtsi | 188 ++++++++
arch/arm/include/asm/arch-tegra2/clock.h | 13 +
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 | 57 +++
board/nvidia/seaboard/seaboard.c | 6 +
doc/device-tree-bindings/README | 17 +
.../clock/nvidia,tegra20-car.txt | 207 +++++++++
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 +-
include/configs/seaboard.h | 12 +
include/configs/tegra2-common.h | 10 +
include/fdtdec.h | 108 +++++-
lib/fdtdec.c | 169 +++++++-
25 files changed, 1649 insertions(+), 12 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/nvidia,tegra20-car.txt
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