summaryrefslogtreecommitdiffstats
path: root/test/dm/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* reset: Add generic reset driverSean Anderson2020-07-011-0/+1
| | | | | | | | | | | This patch adds a generic reset driver. It is designed to be useful when one has a register in a regmap which contains bits that reset other devices. I thought this seemed like a very generic use, so here is a generic driver. The overall structure has been modeled on the syscon-reboot driver. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: Add support for simple-pm-busSean Anderson2020-07-011-0/+1
| | | | | | | | | | This type of bus is used in Linux to designate buses which have power domains and/or clocks which need to be enabled before their child devices can be used. Because power domains are automatically enabled before probing in U-Boot, we just need to enable any clocks present. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* clk: Add K210 pll supportSean Anderson2020-07-011-0/+1
| | | | | | | | | | This pll code is primarily based on the code from the kendryte standalone sdk in lib/drivers/sysctl.c. k210_pll_calc_config is roughly analogous to the algorithm used to set the pll frequency, but it has been completely rewritten to be fixed-point based. Signed-off-by: Sean Anderson <seanga2@gmail.com> CC: Lukasz Majewski <lukma@denx.de>
* dm: core: add ofnode and dev function to iterate on node propertyPatrick Delaunay2020-04-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add functions to iterate on all property with livetree - dev_read_first_prop - dev_read_next_prop - dev_read_prop_by_prop and - ofnode_get_first_property - ofnode_get_next_property - ofnode_get_property_by_prop And helper: dev_for_each_property For example: struct ofprop property; dev_for_each_property(property, config) { value = dev_read_prop_by_prop(&property, &propname, &len); or: for (res = ofnode_get_first_property(node, &property); !res; res = ofnode_get_next_property(&property)) { value = ofnode_get_property_by_prop(&property, &propname, &len); .... } Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Merge tag 'dm-pull-10apr20-take2' of git://git.denx.de/u-boot-dmTom Rini2020-04-161-0/+1
|\ | | | | | | | | | | | | | | Functions for reading indexed values from device tree Enhancements to 'dm' command Log test enhancements and syslog driver DM change to read parent ofdata before children Minor fixes
| * test: fdtdec: test fdtdec_set_carveout()Laurentiu Tudor2020-04-161-0/+1
| | | | | | | | | | | | | | | | | | Add a new test for fdtdec_set_carveout(). Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org> Drop blank line at EFO: Signed-off-by: Simon Glass <sjg@chromium.org>
* | acpi: Add a simple sandbox testSimon Glass2020-04-161-0/+1
|/ | | | | | | | Add a sandbox test for the basic ACPI functionality we have so far. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
* Merge tag 'dm-pull-8jan20' of git://git.denx.de/u-boot-dmTom Rini2020-01-091-0/+1
|\ | | | | | | dm: Increased separation of ofdata_to_platdata() and probe methods
| * dm: devres: Add testsSimon Glass2020-01-071-0/+1
| | | | | | | | | | | | | | The devres functionality has very few users in U-Boot, but it still should have tests. Add a few basic tests of the main functions. Signed-off-by: Simon Glass <sjg@chromium.org>
* | test: rng: Add basic test for random number generator(rng) uclassSughosh Ganu2020-01-071-0/+1
|/ | | | | | | | | Add a unit test for testing the rng uclass functionality using the sandbox rng driver. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* sandbox: Add a test for IRQSimon Glass2019-12-151-0/+1
| | | | | | | Add a simple sandbox test for this uclass. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* sandbox: Add PCI driver and test for p2sbSimon Glass2019-12-151-0/+1
| | | | | | | | Add a sandbox driver and PCI-device emulator for p2sb. Also add a test which uses a simple 'adder' driver to test the p2sb functionality. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: sandbox: Add a PMC emulator and testSimon Glass2019-12-151-0/+1
| | | | | | | Add a simple PMC for sandbox to permit tests to run. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: Add a dsi host uclassYannick Fertré2019-10-131-0/+1
| | | | | | | | | Display Serial Interface (DSI) host can usefully be modelled as their own uclass. DSI defines a serial bus and a communication protocol between the host and the device (panel, bridge). Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
* Merge tag 'u-boot-imx-20190719' of ↵Tom Rini2019-07-271-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20190719 - CCF for i.MX6 - nandbcb command to write SPL into NAND - Switch to DM (i.MX28) - Boards: Toradex, engicam, DH - Fixes for i.MX8 - Fixes for i.MX7ULP Travis: https://travis-ci.org/sbabic/u-boot-imx/builds/561147504
| * clk: sandbox: Add sandbox test code for Common Clock Framework [CCF]Lukasz Majewski2019-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides code to implement the CCF clock tree in sandbox. It uses all the introduced primitives; some generic ones are reused, some sandbox specific were developed. In that way (after introducing the real CCF tree in sandbox) the recently added to clk-uclass.c: clk_get_by_id() and clk_get_parent_rate() are tested in their natural work environment. Usage (sandbox_defconfig and sandbox_flattree_defconfig): ./u-boot --fdt arch/sandbox/dts/test.dtb --command "ut dm clk_ccf" Signed-off-by: Lukasz Majewski <lukma@denx.de>
* | test: dm: add a test for MDIO MUX DM uclassAlex Marginean2019-07-181-0/+1
|/ | | | | | | | | Adds a test using a makeshift MDIO MUX. The test is based on the existing MDIO test. It uses the last emulated PHY register to verify MUX selection. Signed-off-by: Alex Marginean <alexm.osslist@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* test: dm: add MDIO testAlex Marginean2019-07-151-0/+1
| | | | | | | | | | A very simple test for DM_MDIO, mimicks a register write/read through the sandbox bus to a dummy PHY. Signed-off-by: Alex Marginean <alexm.osslist@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* test: pci_ep: add basic pci_ep testsRamon Fried2019-07-111-0/+1
| | | | | | | Add basic PCI endpoint sandbox testing. Signed-off-by: Ramon Fried <ramon.fried@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: Add a No-op uclassJean-Jacques Hiblot2019-07-051-0/+1
| | | | | | | | | | | | This uclass is intended for devices that do not need any features from the uclass, including binding children. This will typically be used by devices that are used to bind child devices but do not use dm_scan_fdt_dev() to do it. That is for example the case of several USB wrappers that have 2 child devices (1 for device and 1 for host) but bind only one at a any given time. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* sandbox: pch: Add a test for the PCH uclassSimon Glass2019-02-201-0/+1
| | | | | | | | | | This uclass currently has no tests. Add a sandbox driver and some simple tests to provide basic coverage. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: Use "sandbox,pch" for the compatible string, for consistency] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* test: bootcount: add bootcount-uclass testPhilipp Tomsich2019-01-141-0/+1
| | | | | | | | Add a test for the bootcount uclass, which uses the RTC bootcount backend (i.e. drivers/bootcount/rtc.c is implictly also tested). Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* cmd: Move the "dm" command from test/dm/ to cmd/Tom Rini2018-12-151-1/+0
| | | | | | | The "dm" command under CONFIG_CMD_DM should live under cmd/ rather than test/dm/ so move it. Signed-off-by: Tom Rini <trini@konsulko.com>
* dm: sound: Complete migration to driver modelSimon Glass2018-12-131-3/+3
| | | | | | | All users of sound are converted to use driver model. Drop the old code and the CONFIG_DM_SOUND option. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: Create a uclass for soundSimon Glass2018-12-131-0/+1
| | | | | | | | | | | The sound driver pulls together the audio codec and i2s drivers in order to actually make sounds. It supports setup() and play() methods. The sound_find_codec_i2s() function allows locating the linked codec and i2s devices. They can be referred to from uclass-private data. Add a uclass and a test for sound. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: Create a uclass for i2sSimon Glass2018-12-131-0/+1
| | | | | | | | | | | The i2s bus is commonly used with audio codecs. It provides a way to stream digital data sychronously in both directions. U-Boot only supports audio output, so this uclass is very simple, with a single tx_data() method. Add a uclass and a test for i2s. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: Create a uclass for audio codecsSimon Glass2018-12-131-0/+1
| | | | | | | | An audio codec provides a way to convert digital data to sound and vice versa. Add a simple uclass which just supports setting the parameters for the codec. Signed-off-by: Simon Glass <sjg@chromium.org>
* test: dma: add dma-uclass testGrygorii Strashko2018-12-071-0/+1
| | | | | | | | | | Add a sandbox DMA driver implementation (provider) and corresponding DM test. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Álvaro Fernández Rojas <noltari@gmail.com>
* dm: Add Hardware Spinlock classBenjamin Gaignard2018-12-061-0/+1
| | | | | | | | | | This is uclass for Hardware Spinlocks. It implements two mandatory operations: lock and unlock and one optional relax operation. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
* test: dm: virtio: Add test cases for virtio uclassBin Meng2018-11-141-0/+1
| | | | | | | | Now that we have a sandbox virtio transport driver, add some test cases to test virtio uclass driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* test: panel: Add a test for the panel uclassSimon Glass2018-10-091-0/+1
| | | | | | | At present this uclass has no tests. Add a simple one which checks the PWM configuration, regulator and GPIO. Signed-off-by: Simon Glass <sjg@chromium.org>
* test: tee: test TEE uclassJens Wiklander2018-10-071-0/+1
| | | | | | | | | Tests the TEE uclass with a sandbox tee driver. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> [trini: initialize session to 0 in dm_test_tee] Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge git://git.denx.de/u-boot-dmTom Rini2018-09-301-0/+2
|\
| * dm: test: Add "/firmware" node scan testRajan Vaja2018-09-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add a test which verifies that all subnodes under "/firmware" nodes are scanned. Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Added 'imply FIRMWARE' to sandbox Kconfig to fix test failures, fixed ordering of lines in arch/sandbox/dts/test.dts and test/dm/Makefile, updated #if condition in drivers/firmware/firmware-uclass.c: Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Add tests for board uclassMario Six2018-09-291-0/+1
| | | | | | | | | | | | | | Add tests for the new board uclass. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
* | video_osd: Add osd sandbox driver and testsMario Six2018-09-281-0/+1
|/ | | | | | | Add sandbox driver and tests for the new OSD uclass. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
* test: Add tests for CPU uclassMario Six2018-09-181-0/+1
| | | | | | Add a sandbox CPU driver, and some tests for the CPU uclass. Signed-off-by: Mario Six <mario.six@gdsys.cc>
* sandbox: Add serial testPatrice Chotard2018-09-101-0/+1
| | | | | Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-stagingTom Rini2018-08-111-0/+1
|\
| * test: Add tests for misc uclassMario Six2018-08-111-0/+1
| | | | | | | | | | | | | | Add a set of tests for the misc uclass. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
* | test: Add AXI testMario Six2018-08-111-0/+1
|/ | | | | | | Add tests for the AXI uclass. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
* test: smem: add basic smem testRamon Fried2018-07-191-0/+1
| | | | | | | Add basic smem sandbox testing. Signed-off-by: Ramon Fried <ramon.fried@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* test: ofnode: test ofnode_device_is_compatible()Masahiro Yamada2018-05-071-0/+1
| | | | | | | | Test ofnode_device_is_compatible(), and also ofnode_path(). Requested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini2018-05-071-3/+1
| | | | | | | | | | | | | | | | | | | | When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
* dm: test: Add tests for the generic PHY uclassJean-Jacques Hiblot2017-05-091-0/+1
| | | | | | | | | | | Those tests check: - the ability for a phy-user to get a phy based on its name or its index - the ability of a phy device (provider) to manage multiple ports - the ability to perform operations on the phy (init,deinit,on,off) - the behavior of the uclass when optional operations are not implemented Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: Simple Watchdog uclassmaxims@google.com2017-05-081-0/+1
| | | | | | | | | | This is a simple uclass for Watchdog Timers. It has four operations: start, restart, reset, stop. Drivers must implement start, restart and stop operations, while implementing reset is optional: It's default implementation expires watchdog timer in one clock tick. Signed-off-by: Maxim Sloyko <maxims@google.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: sandbox: pwm: Add a basic pwm testSimon Glass2017-04-271-0/+1
| | | | | | | | | | | Unfortunately a test for the PWM uclass was not included when it was submitted. This was noticed when trying to add more functionality: http://patchwork.ozlabs.org/patch/748172/ Add a simple test to get us started. Signed-off-by: Simon Glass <sjg@chromium.org>
* Add a power domain framework/uclassStephen Warren2016-07-271-0/+1
| | | | | | | | | Many SoCs allow power to be applied to or removed from portions of the SoC (power domains). This may be used to save power. This API provides the means to control such power management hardware. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
* reset: implement a reset testStephen Warren2016-06-191-0/+1
| | | | | | | | | This adds a sandbox reset implementation (provider), a test client device, instantiates them both from Sandbox's DT, and adds a DM test that excercises everything. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
* mailbox: implement a sandbox testStephen Warren2016-05-261-0/+1
| | | | | | | | | This adds a sandbox mailbox implementation (provider), a test client device, instantiates them both from Sandbox's DT, and adds a DM test that excercises everything. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org> # v1