summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* rockchip: Correct the defconfig orderSimon Glass2016-01-21-5/+5
| | | | | | This has got out of sequence somehow. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
* rockchip: mmc: Use a pwrseq device if availableSimon Glass2016-01-21-0/+47
| | | | | | | Use the pwrseq uclass to find a suitable power sequence for the MMC device. If this is enabled in the device tree, we will pick it up automatically. Signed-off-by: Simon Glass <sjg@chromium.org>
* rockchip: Convert the PMU IOMUX registers into an arraySimon Glass2016-01-21-6/+10
| | | | | | | | | This is easier to deal with when using generic code since it allows us to use a register index instead of naming each register. Adjust it, adding an enum to improve readability. Signed-off-by: Simon Glass <sjg@chromium.org>
* rockchip: Avoid using MMC code when not booting from MMCSimon Glass2016-01-21-0/+2
| | | | | | This saves some code space in SPL which is useful on jerry. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: Add a power sequencing uclassSimon Glass2016-01-21-0/+62
| | | | | | | | Some devices need special sequences to be used when starting up. Add a uclass for this. Drivers can be added to provide specific features as needed. Signed-off-by: Simon Glass <sjg@chromium.org>
* power: Add support for RK808 regulatorsSimon Glass2016-01-21-0/+311
| | | | | | | Add regulator support for the RK808 PMIC. It integrated 4 BUCKs and 8 LDOs all of which are supported by this driver. Signed-off-by: Simon Glass <sjg@chromium.org>
* power: Add base support for the RK808 PMICSimon Glass2016-01-21-0/+183
| | | | | | | | | | This Rockchip PMIC provides features suitable for battery-powered applications. It is commonly used with Rockchip SoCs. Add a driver which provides register access. The regulator driver will use this. Signed-off-by: Simon Glass <sjg@chromium.org>
* dts: Bring in pinctrl device tree bindingSimon Glass2016-01-21-0/+236
| | | | | | Add this binding file since we now use it in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: pmic: Add 'reg status' to show all regulatorsSimon Glass2016-01-21-10/+56
| | | | | | | It is convenient to be able to see the status of all regulators in a list. Add this feature to the 'reg status' command. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: pinctrl: Add a function to parse PIN_CONFIG flagsSimon Glass2016-01-21-0/+25
| | | | | | | | Add a function which produces a flags word from a few common PIN_CONFIG settings. This is useful for simple pinctrl drivers that don't need to worry about drive strength, etc. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Don't set pinctrl for pinctrl devicesSimon Glass2016-01-21-2/+4
| | | | | | | | | | | | | | There is sort-of race condition when a pinctrl device is probed. The pinctrl function is called which may end up using the same device as is being probed. This results in operations being used before the device is actually probed. For now, disallow pinctrl operations on pinctrl devices while probing. An alternative solution would be to move the operation to later in the device_probe() function (for pinctrl devices only) but this needs more thought. Signed-off-by: Simon Glass <sjg@chromium.org>
* rockchip: kylin: Store env in emmcJeffy Chen2016-01-21-0/+12
| | | | | | | | There's a 64K reserved area at the end of the first 4M. Store env there, so we can use fastboot to flash it. Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org>
* rockchip: kylin: Check fastboot requestJeffy Chen2016-01-21-0/+35
| | | | | | | | | We will save boot mode flag in grf's os_reg[4], if fastboot requested or fastboot key pressed, try to enter fastboot mode at preboot stage. Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org>
* rockchip: kylin: Add default gpt partition tableJeffy Chen2016-01-21-0/+29
| | | | | | | | | | Add default android gpt partition table for kylin board. Use "gpt write mmc 0 $partitions" to apply. Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* rockchip: rk3036: Bind GPIO banksJeffy Chen2016-01-21-0/+8
| | | | | | | | Call dm_scan_fdt_node() in rk3036 pinctrl uclass binding. Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: bootm: Try to use relocated ramdiskJeffy Chen2016-01-21-1/+11
| | | | | | | | | After boot_ramdisk_high(), ramdisk would be relocated to initrd_start & initrd_end, so use them instead of rd_start & rd_end. Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* dm: clk: Add support for decoding clocks from the device treeSimon Glass2016-01-21-0/+52
| | | | | | | | | Add a method which can locate a clock for a device, given its index. This uses the normal device tree bindings to return the clock device and the first argument which is normally used as a peripheral ID in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* clk: add fixed rate clock driverMasahiro Yamada2016-01-21-1/+58
| | | | | | | | | | | | This commit intends to implement "fixed-clock" as in Linux. (drivers/clk/clk-fixed-rate.c in Linux) If you need a very simple clock to just provide fixed clock rate like a crystal oscillator, you do not have to write a new driver. This driver can support it. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
* Merge git://git.denx.de/u-boot-dmTom Rini2016-01-21-422/+7455
|\
| * dm: video: test: Test that bitmap display works correctlySimon Glass2016-01-20-0/+56
| | | | | | | | | | | | | | | | Add a test for the 'bmp' command. Test both the uncompressed and compressed versions of the file, since they use different code paths. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
| * dm: video: test: Add tests for rotated consolesSimon Glass2016-01-20-0/+28
| | | | | | | | | | | | | | Test that text is displayed correctly when the console is rotated. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
| * dm: video: test: Add tests for the video uclassSimon Glass2016-01-20-9/+206
| | | | | | | | | | | | | | | | | | Add tests that check that the video console is working correcty. Also check that text output produces the expected result. Test coverage includes character output, wrapping and scrolling. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
| * dm: video: sandbox: Convert sandbox to use driver model for videoSimon Glass2016-01-20-86/+56
| | | | | | | | | | | | | | | | Now that driver model support is available, convert sandbox over to use it. We can remove a few of the special hooks that sandbox currently has. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
| * sandbox: Move CONFIG_VIDEO_SANDBOX_SDL to KconfigSimon Glass2016-01-20-2/+11
| | | | | | | | | | | | | | | | Move this option to Kconfig. This is quite simple as only sandbox uses the driver. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
| * dm: stdio: video: Plumb the video uclass into stdioSimon Glass2016-01-20-4/+15
| | | | | | | | | | | | | | | | | | Register video drivers with stdio so that they can be used for text output. This needs to be done explicitly for now. At some point we should be able to convert stdio itself to driver model and avoid this step. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
| * dm: video: Implement the bmp command for driver modelSimon Glass2016-01-20-1/+375
| | | | | | | | | | | | | | | | | | This command can use the bitmap display code in the uclass. This is similar to the code in lcd.c and cfb_console.c. These other copies will go away when all boards are converted to use driver model for video. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
| * dm: common: Add memory reservation for the video uclassSimon Glass2016-01-20-12/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | Before relocation we need to reserve memory for the video driver frame buffers so that they can use this memory when they start up (after relocation). Add a call to the uclass to permit this. The current top and bottom of the region is stored in global_data so that it can be checked post-relocation to ensure enough memory is available. No video device should be probed before relocation. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
| * common: Move LCD and video memory reservation togetherSimon Glass2016-01-20-14/+14
| | | | | | | | | | | | | | | | These two functions are conceptually the same. Move them together in the pre-relocation init. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
| * dm: video: Add a driver for a rotated text consoleSimon Glass2016-01-20-0/+450
| | | | | | | | | | | | | | | | | | Sometimes the console must be rotated. Add a driver which supports rotating the text clockwise to 90, 180 and 270 degrees. This can support devices where the display is rotated for mechanical reasons. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
| * dm: video: Add a 'normal' text console driverSimon Glass2016-01-20-1/+142
| | | | | | | | | | | | | | | | | | | | Most of the time we don't need to rotate the display so a simple font blitting feature is enough for our purposes. Add a simple driver which supports this function. It provides text output on the console using the standard 8x16-pixel font. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
| * dm: video: Add a uclass for the text consoleSimon Glass2016-01-20-1/+398
| | | | | | | | | | | | | | | | | | | | | | | | The existing LCD/video interface suffers from conflating the bitmap display with text output on that display. As a result the implementation is more complex than it needs to me. We can support multiple text console drivers. Create a separate uclass to support this, with its own API. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
| * dm: lcd: Avoid using the lcd.h header file with driver modelSimon Glass2016-01-20-4/+10
| | | | | | | | | | | | | | | | | | The LCD functions and definitions are not used with the driver model video uclass. When all boards are converted over we can remove the file. For now, use #ifdef to omit the contents. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
| * dm: video: Add a video uclassSimon Glass2016-01-20-6/+432
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot has separate code for LCDs and 'video' devices. Both now use a very similar API thanks to earlier work by Nikita Kiryanov. With the driver- model conversion we should unify these into a single uclass. Unfortunately there are different features supported by each. This implementation provides for a common set of features which should serve most purposes. The intent is to support: - bitmap devices with 8, 16 and 32 bits per pixel - text console wih white on black or vice versa - rotated text console - bitmap display (BMP format) More can be added as additional boards are ported over to use driver model for video. The name 'video' is chosen for the uclass since it is more generic than LCD. Another option would be 'display' but that would introduce a third concept to U-Boot which seems like the wrong approach. The existing LCD and video init functions are not needed now, so this uclass makes no attempt to implement them. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
| * arm: ls1021atwr: Enable driver model lpuart serial driverBin Meng2016-01-20-1/+21
| | | | | | | | | | | | | | | | | | | | | | Convert ls1021atwr_nor_lpuart to driver model support. As a start, enable lpuart serial port driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alison Wang <alison.wang@nxp.com> Tested-by: Alison Wang <alison.wang@nxp.com> Acked-by: Simon Glass <sjg@chromium.org>
| * arm: ls1021atwr: Split off board device treeBin Meng2016-01-20-6/+21
| | | | | | | | | | | | | | Move /chosen node out of the board device tree. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
| * serial: lpuart: Add driver model serial supportBin Meng2016-01-20-1/+167
| | | | | | | | | | | | | | | | This adds driver model support to lpuart serial driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Tested-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
| * serial: lpuart: Prepare the driver for DM conversionBin Meng2016-01-20-22/+66
| | | | | | | | | | | | | | | | | | Create internal routines which take lpuart's register base as a parameter, in preparation for driver model conversion. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
| * serial: lpuart: Call local version of setbrg and putc directlyBin Meng2016-01-20-4/+4
| | | | | | | | | | | | | | | | | | There is no need to go through serial driver subsystem, instead call the driver's setbrg and putc routines directly. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
| * serial: lpuart: Fix several cosmetic issuesBin Meng2016-01-20-20/+15
| | | | | | | | | | | | | | | | | | | | | | Clean up the driver codes a little bit, by: - Use tab instead of space in the macro defines - Use single line comment whenever possible - Fix insertion of blank lines Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
| * serial: lpuart: Move CONFIG_FSL_LPUART to KconfigBin Meng2016-01-20-5/+14
| | | | | | | | | | | | | | | | | | | | | | LPUART is seen on Freescale VF610 and QorIQ Layerscape devices. Create a Kconfig option and move it to defconfig for all boards that have this serial driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Simon Glass <sjg@chromium.org>
| * arm: ls1021atwr: Convert to driver model and enable serial supportBin Meng2016-01-20-4/+10
| | | | | | | | | | | | | | | | Convert ls1021atwr_nor to driver model support. As a start, enable ns16550 serial port driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
| * Revert "fdt_support: Add multi-serial support for stdout fixup"Bin Meng2016-01-20-15/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 3e303f748cf57fb23e8ec95ab7eac0074be50e2b. The fix up in the /aliases node does not work under the following scenarios: - Not every non-DM serial driver was written to have a driver name that conforms the format of "serial%d" or "eserial%d". - With driver model serial, the stdio_devices[] stores the serial device node name in the device tree. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: add a test for the sleep commandStephen Warren2016-01-20-0/+24
| | | | | | | | | | | | | | | | Execute "sleep", and validate that it sleeps for approximately the correct amount of time. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: test the ums commandStephen Warren2016-01-20-0/+94
| | | | | | | | | | | | | | | | | | This test invokes the "ums" command in U-Boot, and validates that a USB storage device is enumerated on the test host system, and can be read from. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: test the shell if commandStephen Warren2016-01-20-116/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrate all most tests from command_ut.c into the Python test system. This allows the tests to be run against any U-Boot binary that supports the if command (i.e. where hush is enabled) without requiring that binary to be permanently bloated with the code from command_ut. Some tests in command_ut.c can only be executed from C code, since they test internal (more unit-level) features of various U-Boot APIs. The migrated tests can all operate directly from the U-Boot console. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: add test of basic shell functionalityStephen Warren2016-01-20-16/+42
| | | | | | | | | | | | | | | | | | | | | | This tests whether the following features of the U-Boot shell: - Execution of a directly entered command. - Compound commands (; delimiter). - Quoting of arguments containing spaces. - Executing commands from environment variables. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: test the md/mw commandsStephen Warren2016-01-20-29/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | This tests whether md/mw work, and affect each-other. Command repeat is also tested. test/cmd_repeat.sh is removed, since the new Python-based test does everything it used to. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: add test of setenv/printenv/echoStephen Warren2016-01-20-4/+221
| | | | | | | | | | | | | | | | This tests basic environment variable functionality. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: test that sandbox exits when askedStephen Warren2016-01-20-0/+24
| | | | | | | | | | | | | | | | | | Test the sandbox port's implementation of the reset command and SIGHUP handling. These should both cause the U-Boot process to exit gracefully. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
| * test/py: Implement pytest infrastructureStephen Warren2016-01-20-0/+2090
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This tool aims to test U-Boot by executing U-Boot shell commands using the console interface. A single top-level script exists to execute or attach to the U-Boot console, run the entire script of tests against it, and summarize the results. Advantages of this approach are: - Testing is performed in the same way a user or script would interact with U-Boot; there can be no disconnect. - There is no need to write or embed test-related code into U-Boot itself. It is asserted that writing test-related code in Python is simpler and more flexible that writing it all in C. - It is reasonably simple to interact with U-Boot in this way. A few simple tests are provided as examples. Soon, we should convert as many as possible of the other tests in test/* and test/cmd_ut.c too. The hook scripts, relay control utilities, and udev rules I use for my own HW setup are published at https://github.com/swarren/uboot-test-hooks. See README.md for more details! Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Stephen Warren <swarren@nvidia.com> Tested-by: Michal Simek <michal.simek@xilinx.com> Tested-by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org> #v3