project/bcm63xx/u-boot.git
5 years agoMIPS: Allow to prefetch and lock instructions into cache
Gregory CLEMENT [Fri, 14 Dec 2018 15:16:46 +0000 (16:16 +0100)]
MIPS: Allow to prefetch and lock instructions into cache

This path add a new helper allowing to prefetch and lock instructions
into cache. This is useful very early in the boot when no RAM is
available yet.

Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
5 years agoMIPS: move create_tlb() in an proper header: mipsregs.h
Gregory CLEMENT [Fri, 14 Dec 2018 15:16:45 +0000 (16:16 +0100)]
MIPS: move create_tlb() in an proper header: mipsregs.h

Export create_tlb() as an inline function in mipsregs.h. It allows to
remove the declaration of the function from the board files.

Then it will allow also to use this function very early in the boot when
the stack is not usable.

Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
5 years agoMIPS: remove local_irq_[save|restore] from CP0 macros
Daniel Schwierzeck [Wed, 19 Dec 2018 14:18:52 +0000 (15:18 +0100)]
MIPS: remove local_irq_[save|restore] from CP0 macros

With moving write_on_tlb() to arch/mips/include/asm/mipsregs.h
there are now compiler warnings when some generic code includes
asm/io.h. This happens for example when enabling OF live tree.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 years agogpio: mscc-bitbang-spi: Add a simple gpio driver for bitbgang spi
Gregory CLEMENT [Tue, 9 Oct 2018 12:08:42 +0000 (14:08 +0200)]
gpio: mscc-bitbang-spi: Add a simple gpio driver for bitbgang spi

The VCore III SoCs such as the Luton but also the Ocelot can remap an SPI
flash directly in memory. However, for writing in the flash the
communication has to be done by software.

Each of the signal used for the SPI are exposed in a single register. In
order to be able to use the soft-spi driver, the management of this pin
is done through this simple gpio driver.

Even if the main purpose of this driver is to be used by soft-spi, it can
still be used as a normal gpio driver but with limitation: for example
the first pin can't be used as output.

Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 years agopinctrl: mscc: Add gpio and pinctrl driver for MSCC MIPS SoCs (VcoreIII based)
Gregory CLEMENT [Sat, 8 Dec 2018 08:59:01 +0000 (09:59 +0100)]
pinctrl: mscc: Add gpio and pinctrl driver for MSCC MIPS SoCs (VcoreIII based)

This driver supports the pin and gpio controller found in the Ocelot and
Luton SoCs.

The driver was inspired from the pinctrl driver in Linux, but was
simplified and was modified to allow supporting an other SoCs (Luton).

For Ocelot and Luton the controller is the same, only the pins to program
differ.

Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
[changed to only descend into mscc/ dependent on CONFIG_PINCTRL_MSCC]
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 years agoDW SPI: Allow to overload the management of the external CS
Gregory CLEMENT [Tue, 9 Oct 2018 12:14:07 +0000 (14:14 +0200)]
DW SPI: Allow to overload the management of the external CS

On some platforms, as the Ocelot ones, when wanting to control the CS
through software, it is not possible to do it through the GPIO
controller. Indeed, this signal is managed through a dedicated range of
registers inside the SoC..

By declaring the external_cs_manage function as weak, it is possible to
manage the CS at platform level and then using the appropriate registers.

Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
5 years agomips: mt76xx: linkit/gardena: Don't use CONFIG_OF_EMBED
Stefan Roese [Tue, 18 Dec 2018 09:27:15 +0000 (10:27 +0100)]
mips: mt76xx: linkit/gardena: Don't use CONFIG_OF_EMBED

Building with CONFIG_OF_EMBED generates build warnings, as it should
only be used for debugging purposes. So let's move all MT7688 targets to
CONFIG_OF_SEPARATE instead with this patch.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 years agomips: mt76xx: Flush d-cache in arch_misc_init() to solve d-cache issues
Stefan Roese [Tue, 18 Dec 2018 09:27:14 +0000 (10:27 +0100)]
mips: mt76xx: Flush d-cache in arch_misc_init() to solve d-cache issues

It has been noticed, that sometimes the d-cache is not in a
"clean-state" when U-Boot is running on MT7688. This was detected when
using the ethernet driver (which uses d-cache) and a TFTP command does
not complete. Flushing the complete d-cache (again?) here seems to fix
this issue.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 years agomips: xilfpga: fix DTC warnings
Daniel Schwierzeck [Sat, 15 Dec 2018 18:19:33 +0000 (19:19 +0100)]
mips: xilfpga: fix DTC warnings

This fixes following DTC warning:

arch/mips/dts/nexys4ddr.dtb: Warning (compatible_is_string_list): /ethernet@10e00000/mdio/phy@1:compatible: property is not a string list

As upstream DTS in Linux doesn't have the offending property,
simply remove it to fix the warning.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 years agomips: ath79: fix DTC warnings
Daniel Schwierzeck [Sat, 15 Dec 2018 18:05:08 +0000 (19:05 +0100)]
mips: ath79: fix DTC warnings

Remove all interrupt nodes that cause warnings regarding a missing
interrupt parent. There are no interrupt controller nodes defined
and the device trees don't match the ones in Linux anymore.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 years agobmips: enable ar-5315u enet support
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:42 +0000 (19:00 +0100)]
bmips: enable ar-5315u enet support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: bcm6318: add support for bcm6368-enet
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:41 +0000 (19:00 +0100)]
bmips: bcm6318: add support for bcm6368-enet

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: enable vr-3032u enet support
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:40 +0000 (19:00 +0100)]
bmips: enable vr-3032u enet support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: bcm63268: add support for bcm6368-enet
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:39 +0000 (19:00 +0100)]
bmips: bcm63268: add support for bcm6368-enet

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: enable dgnd3700v2 enet support
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:38 +0000 (19:00 +0100)]
bmips: enable dgnd3700v2 enet support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: bcm6362: add support for bcm6368-enet
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:37 +0000 (19:00 +0100)]
bmips: bcm6362: add support for bcm6368-enet

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: enable ar-5387un enet support
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:36 +0000 (19:00 +0100)]
bmips: enable ar-5387un enet support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: bcm6328: add support for bcm6368-enet
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:35 +0000 (19:00 +0100)]
bmips: bcm6328: add support for bcm6368-enet

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: enable wap-5813n enet support
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:34 +0000 (19:00 +0100)]
bmips: enable wap-5813n enet support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: bcm6368: add support for bcm6368-enet
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:33 +0000 (19:00 +0100)]
bmips: bcm6368: add support for bcm6368-enet

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agonet: add support for bcm6368-enet
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:32 +0000 (19:00 +0100)]
net: add support for bcm6368-enet

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 years agobmips: enable nb4-ser enet support
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:31 +0000 (19:00 +0100)]
bmips: enable nb4-ser enet support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: enable hg556a enet support
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:30 +0000 (19:00 +0100)]
bmips: enable hg556a enet support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: bcm6358: add support for bcm6348-enet
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:29 +0000 (19:00 +0100)]
bmips: bcm6358: add support for bcm6348-enet

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: enable ct-5361 enet support
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:28 +0000 (19:00 +0100)]
bmips: enable ct-5361 enet support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: bcm6348: add support for bcm6348-enet
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:27 +0000 (19:00 +0100)]
bmips: bcm6348: add support for bcm6348-enet

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: enable f@st1704 enet support
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:26 +0000 (19:00 +0100)]
bmips: enable f@st1704 enet support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: bcm6338: add support for bcm6348-enet
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:25 +0000 (19:00 +0100)]
bmips: bcm6338: add support for bcm6348-enet

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agonet: add support for bcm6348-enet
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:24 +0000 (19:00 +0100)]
net: add support for bcm6348-enet

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 years agobmips: bcm6318: add bcm6348-iudma support
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:23 +0000 (19:00 +0100)]
bmips: bcm6318: add bcm6348-iudma support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: bcm63268: add bcm6348-iudma support
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:22 +0000 (19:00 +0100)]
bmips: bcm63268: add bcm6348-iudma support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: bcm6362: add bcm6348-iudma support
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:21 +0000 (19:00 +0100)]
bmips: bcm6362: add bcm6348-iudma support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: bcm6328: add bcm6348-iudma support
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:20 +0000 (19:00 +0100)]
bmips: bcm6328: add bcm6348-iudma support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: bcm6368: add bcm6348-iudma support
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:19 +0000 (19:00 +0100)]
bmips: bcm6368: add bcm6348-iudma support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: bcm6358: add bcm6348-iudma support
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:18 +0000 (19:00 +0100)]
bmips: bcm6358: add bcm6348-iudma support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: bcm6348: add bcm6348-iudma support
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:17 +0000 (19:00 +0100)]
bmips: bcm6348: add bcm6348-iudma support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobmips: bcm6338: add bcm6348-iudma support
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:16 +0000 (19:00 +0100)]
bmips: bcm6338: add bcm6348-iudma support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agodma: add bcm6348-iudma support
Álvaro Fernández Rojas [Sat, 1 Dec 2018 18:00:15 +0000 (19:00 +0100)]
dma: add bcm6348-iudma support

BCM6348 IUDMA controller is present on multiple BMIPS (BCM63xx) SoCs.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 years agoPrepare v2019.01-rc2
Tom Rini [Tue, 18 Dec 2018 01:25:24 +0000 (20:25 -0500)]
Prepare v2019.01-rc2

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoarm: ti: boot: Increase system partition size
Sam Protsenko [Tue, 11 Dec 2018 16:20:21 +0000 (18:20 +0200)]
arm: ti: boot: Increase system partition size

Android code base is growing, so since Android "Pie" the size of
system.img grew up to be about 740 MiB. Let's increase system.img to
1 GiB to accommodate for those changes and leave some margin for future
changes. We don't want to make it more than 1 GiB, because we should
keep userdata partition big enough (for user files, like media etc.),
and eMMC size on BeagleBoard-X15 is only 3.5 GiB.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Acked-by: Praneeth Bajjuri <praneeth@ti.com>
5 years agoMakefile: output migration warnings to stderr
Chris Packham [Fri, 14 Dec 2018 22:35:54 +0000 (11:35 +1300)]
Makefile: output migration warnings to stderr

Output the device model migration warnings to stderr. This allows tools
like buildman to pick them up rather than suppressing them along with
the normal build output on stdout.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
5 years agoRestore compatibility of image type IDs
Stefano Babic [Mon, 17 Dec 2018 10:02:00 +0000 (11:02 +0100)]
Restore compatibility of image type IDs

Commit a2b96ece5be146f4995d737f047e5bbb76079b8f breaks the enumeration
of the Image Types. New image types can be appended, but they cannot be
inserted in the list else backward compatibility is broken.

This restores the images types as before 2018.11 and move i.MX8 related
images at the end.

Signed-off-by: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Tom Rini <trini@konsulko.com>
5 years agoMerge tag 'for-master-20181216' of git://git.denx.de/u-boot-rockchip
Tom Rini [Mon, 17 Dec 2018 01:49:46 +0000 (20:49 -0500)]
Merge tag 'for-master-20181216' of git://git.denx.de/u-boot-rockchip

Improvements and fixes or u-boot-rockchip:
- new board: adds rv1108-elgin-r1 board support
- rk3288-evb: dts: remove 'vmmc' from emmc node
- rk3399-puma: dts: remove obsolete DTS node 'vcc5v0_host'

5 years agoARM: rockchip: Add rv1108-elgin-r1 board support
Otavio Salvador [Sat, 1 Dec 2018 14:05:54 +0000 (12:05 -0200)]
ARM: rockchip: Add rv1108-elgin-r1 board support

Add the initial support for Elgin R1 board, which is based on the
RV1108 SoC and has the following features currently supported in
U-Boot:

- UART
- eMMC
- USB

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Sat, 15 Dec 2018 22:49:49 +0000 (17:49 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

- Second half of the USB Gadget DM conversion

5 years agoMerge branch '2018-12-15-master-imports'
Tom Rini [Sat, 15 Dec 2018 22:47:28 +0000 (17:47 -0500)]
Merge branch '2018-12-15-master-imports'

- Introduce tools-only build for host tools
- Bugfixes to poplar, syscon and the hashtable, a tee return code
- Fix a warning on gcc-8 by reworking part of mtk_image to be not unsafe
  wrt strings.
- serial_stm32 reset support

5 years agorockchip: rk3288-evb: dts: remove 'vmmc' from emmc node
Kever Yang [Fri, 14 Dec 2018 01:37:12 +0000 (09:37 +0800)]
rockchip: rk3288-evb: dts: remove 'vmmc' from emmc node

This is a sync with kernel mainline dts.

The U-Boot eMMC does not need to care about the power for Rockchip
SoCs, because if the board is using eMMC, the power will default on
(for bootrom), so the 'vmmc', 'vqmmc' is only useful for SD in U-Boot.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
5 years agorockchip: rk3399-puma: Remove obsolete DTS node 'vcc5v0_host'.
Christoph Muellner [Wed, 12 Dec 2018 00:32:59 +0000 (01:32 +0100)]
rockchip: rk3399-puma: Remove obsolete DTS node 'vcc5v0_host'.

vcc5v0_host and usbhub_enable share gpio4 RK_PA3,
which is a problem during probing (the second probe
will trigger a -EBUSY, when trying to get the gpio handle).

An analysis of the situation shows, that both regulators
are actually describing the same supply.

This patch removes the (currenlty not successful probing)
regulator vcc5v0_host from the DTS and adds the pinctrl-*
setting to usbhub_enable.

Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Reviewed-by: Phiilipp Tomsich <philipp.tomsich@theobroma-systems.com>
5 years agosyscon: update syscon_node_to_regmap to use the DM functions
Patrick Delaunay [Wed, 31 Oct 2018 15:49:03 +0000 (16:49 +0100)]
syscon: update syscon_node_to_regmap to use the DM functions

+ Update the function syscon_node_to_regmap() to force bound on
  syscon uclass and directly use the list of device from DM.
+ Remove the static list syscon_list.

This patch avoid issue (crash) when syscon_node_to_regmap() is called
before and after reallocation (list content is invalid).

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agotools: mtk_image: replace strncpy(d, s, sizeof(d)) with snprintf()
Andy Shevchenko [Tue, 11 Dec 2018 14:41:43 +0000 (16:41 +0200)]
tools: mtk_image: replace strncpy(d, s, sizeof(d)) with snprintf()

Starting from version 8 the GCC, i.e. C compiler, starts complaining about
possible '\0' terminator loss or, as in this case, garbage copy.

In function ‘mtk_image_set_gen_header’,
    inlined from ‘mtk_image_set_header’ at tools/mtk_image.c:733:3:
tools/mtk_image.c:659:2: warning: ‘strncpy’ specified bound 12 equals destination size [-Wstringop-truncation]
  strncpy(hdr->boot.name, bootname, sizeof(hdr->boot.name));
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘mtk_brom_parse_imagename’,
    inlined from ‘mtk_image_check_params’ at tools/mtk_image.c:388:9:
tools/mtk_image.c:325:5: warning: ‘strncpy’ specified bound 32 equals destination size [-Wstringop-truncation]
     strncpy(lk_name, val, sizeof(lk_name));
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Replace it with snprintf() to tell compiler how much room we have in the
destination buffer for source string.

Fixes: 3b975a147c3c ("tools: MediaTek: add MTK boot header generation to mkimage")
Cc: Ryder Lee <ryder.lee@mediatek.com>
Cc: Weijie Gao <weijie.gao@mediatek.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Weijie Gao <weijie.gao@mediatek.com>
5 years agoserial: serial_stm32: Add reset support
Patrice Chotard [Tue, 4 Dec 2018 13:11:36 +0000 (14:11 +0100)]
serial: serial_stm32: Add reset support

In some cases, UART is configured by early boot stage.
To be sure of the initial state of UART and to avoid
spurious chars on console, reset the serial block before
configuring it.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agopoplar: fix boot failure caused by serial driver change
Shawn Guo [Wed, 12 Dec 2018 07:24:44 +0000 (15:24 +0800)]
poplar: fix boot failure caused by serial driver change

Commit 4687919684e0 ("serial: Remove DM_FLAG_PRE_RELOC flag in various
drivers") essentially drops flag DM_FLAG_PRE_RELOC from serial_pl01x
driver for Poplar platform, because the platform falls into the
following strategy category made by the commit.

  Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check, for
  drivers that support both statically declared devices and
  configuration from device tree

Before the commit lands, Poplar platform works by statically declaring
pl011 serial device via U_BOOT_DEVICE() with DM_FLAG_PRE_RELOC flag set
in the driver.  But since Poplar also supports device configuration from
device tree, the commit practically drops the flag for Poplar, and hence
breaks the platform from booting.

This patch changes platform code and device tree to initiate pl011
serial device from device tree rather than static declaration, so that
above strategy about DM_FLAG_PRE_RELOC applies to Poplar, and therefore
the reported boot failure gets fixed.

Reported-by: Igor Opaniuk <igor.opaniuk@linaro.org>
Fixes: 4687919684e0 ("serial: Remove DM_FLAG_PRE_RELOC flag in various drivers")
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Igor Opaniuk <igor.opaniuk@linaro.org>
Tested-by: Igor Opaniuk <igor.opaniuk@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agopoplar: add a co-maintainer for poplar board
Shawn Guo [Thu, 13 Dec 2018 09:10:43 +0000 (17:10 +0800)]
poplar: add a co-maintainer for poplar board

Add myself as co-maintainer for poplar board, as I'm actively working
on the board.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
5 years agotools: add a generic config for native tools building
Otavio Salvador [Sat, 8 Dec 2018 00:00:41 +0000 (19:00 -0500)]
tools: add a generic config for native tools building

The motivation for this is to allow distributions to distribute all
possible tools in a generic way, avoiding the need of specific tools
building for each machine.

Especially on OpenEmbedded / Yocto Project ecosystem, it is very
common each BSP to end providing their specific tools when they need
to generate images for some SoC (e.g MX23 / MX28 in meta-freescale
case).

Using this, we can package the tools doing:

$: make tools-only_defconfig
$: make tools-only

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
[trini: Add MAINTAINERS entry for myself, add to .travis.yml, make
U-Boot itself buildable to not trip up other frameworks]
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agotest: Only descend into test/ when CONFIG_UNIT_TEST is enabled
Tom Rini [Sat, 8 Dec 2018 00:00:40 +0000 (19:00 -0500)]
test: Only descend into test/ when CONFIG_UNIT_TEST is enabled

The contents of the test subdirectories only make sense when we have
CONFIG_UNIT_TEST set.  We will otherwise attempt to build code on for
example sandbox that needs CONFIG_UNIT_TEST otherwise and rather than
complicate the Makefiles simply leave them out when we can.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agocmd: Move the "dm" command from test/dm/ to cmd/
Tom Rini [Sat, 8 Dec 2018 00:00:39 +0000 (19:00 -0500)]
cmd: Move the "dm" command from test/dm/ to cmd/

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>
5 years agohashtable: fix length calculation in hexport_r
AKASHI Takahiro [Fri, 14 Dec 2018 09:42:51 +0000 (18:42 +0900)]
hashtable: fix length calculation in hexport_r

The commit below incorrectly fixed hexport_r();
 > size = totlen + 1;
One extra byte is necessary to NULL-terminate a whole buffer, "resp."

Fixes: f1b20acb4a03 ("hashtable: Fix length calculation in hexport_r")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
5 years agotee: change return code for REE FS supplicant cmd
Igor Opaniuk [Tue, 4 Dec 2018 12:37:19 +0000 (14:37 +0200)]
tee: change return code for REE FS supplicant cmd

If OP-TEE core is compiled with support of REE FS and RPMB
at the same time (CFG_RPMB_FS ?= y; CFG_RPMB_FS ?= y), and persistent
storage API is used with TEE_STORAGE_PRIVATE storage id, it will
lead to TA panic.

E/TC:? 0 TA panicked with code 0xffff0009
.....
E/TC:? 0 Call stack:
E/TC:? 0  0x000000004002f2f8 TEE_OpenPersistentObject at
lib/libutee/tee_api_objects.c:422

In this particular case TEE_ERROR_STORAGE_NOT_AVAILABLE is more suitable
than TEE_ERROR_NOT_IMPLEMENTED, as it provides to a TA a possibility
to handle this error code [1].

>From GPD TEE Internal Core specification [2]:
TEE_ERROR_STORAGE_NOT_AVAILABLE - if the persistent object is stored in a
storage area which is currently inaccessible. It may be associated with
the device but unplugged, busy, or inaccessible for some other reason.

[1]: https://github.com/OP-TEE/optee_os/blob/94db01ef448d1e552161c2d861d57a5f8bda0cc0/lib/libutee/tee_api_objects.c#L419
[2]: https://globalplatform.org/wp-content/uploads/2018/06/GPD_TEE_Internal_Core_API_Specification_v1.1.2.50_PublicReview.pdf

Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
5 years agoMerge tag 'dm-pull-14dec18' of git://git.denx.de/u-boot-dm
Tom Rini [Fri, 14 Dec 2018 19:18:47 +0000 (14:18 -0500)]
Merge tag 'dm-pull-14dec18' of git://git.denx.de/u-boot-dm

Complete conversion of sound to driver model

5 years agousb: musb-new: sunxi: Fix null pointer access
Stefan Mavrodiev [Wed, 5 Dec 2018 12:49:44 +0000 (14:49 +0200)]
usb: musb-new: sunxi: Fix null pointer access

When the device is in peripheral mode there is no
struct usb_bus_priv allocated pointer, as the uclass driver
("usb_dev_generic") doesn't call per_device_auto_alloc_size.

This results in writing to the internal SDRAM at
priv->desc_before_addr = true;

Signed-off-by: Stefan Mavrodiev <stefan@olimex.com>
5 years agousb: composite: Fix max packet size for USB3.0
Siva Durga Prasad Paladugu [Thu, 13 Dec 2018 09:46:36 +0000 (15:16 +0530)]
usb: composite: Fix max packet size for USB3.0

For USB3.0, the max packetsize for GET_DESCRIPTOR should be
sent as exponent value for 2. This means for 512, max packet
size should be filled with 9(2^9=512). Also, fill the USB
version field with 3.0 if speed is negotiated to Superspeed.
This fixes the issue of DFU gadget download failure with
superspeed. Without this patch, the max packet size is
overflowed to zero as the bMaxPacketsize is of u8 and hence
host is not able to detect this device.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoconfigs: am335x_boneblack_vboot: enable DM_USB and RNDIS boot in SPl
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:31:00 +0000 (11:31 +0100)]
configs: am335x_boneblack_vboot: enable DM_USB and RNDIS boot in SPl

Enable DM_USB and DM_USB_GADGET for this platform. Also enable RNDIS boot
support (SPL load u-boot over USB RNDIS).
This is an example of how to use DM_USB on a am335x-based board.
A subsequent series will take this a step further and modify more
defconfigs.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoconfigs: am335x_evm: Do not disable DM_USB in SPL
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:59 +0000 (11:30 +0100)]
configs: am335x_evm: Do not disable DM_USB in SPL

DM_USB is now supported in the SPL. Do not undef it
Besides to support DM_USB in SPL, one now has to use SPL_DM_USB

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoarm: am33xx: Register USB controllers if DM_USB is used but not OF_CONTROL
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:58 +0000 (11:30 +0100)]
arm: am33xx: Register USB controllers if DM_USB is used but not OF_CONTROL

When DM_USB is used, either the USB controllers are bound when the DTB
is parsed (when OF_CONTROL is enabled) or they are bound using the
U_BOOT_DEVICES() macro.
In the later case, the platform data is passed in a struct ti_musb_platdata
because it cannot be read from the DTB.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agousb: musb-new: Add support for DM_USB
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:57 +0000 (11:30 +0100)]
usb: musb-new: Add support for DM_USB

Enable DM for USB peripheral in the musb-new driver.
Also make sure that the driver can be used in the SPL.
This implies that:
* the driver must work with and without the OF_CONTROL option. That
in turn, implies that the platform data can be passed in a struct
ti_musb_platdata or be read from the dtb
* usb.o is linked in the SPL if host support is enabled

Another change is that the driver does not fail to bind (and stop the boot
process) if one of the child driver does not bind. Reporting the error is
enough. This kind of error would appear if the port is configured in the
DTS but the driver is not activated in the config.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agousb: musb-new: Allow the diver not to use the set_phy_power() callback
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:56 +0000 (11:30 +0100)]
usb: musb-new: Allow the diver not to use the set_phy_power() callback

The set_phy_power() callback is part of struct omap_musb_board_data. This
structure is part of the platform data passed to the musb-new driver. This
does not really fit with the Driver Model, so allow not to use struct
omap_musb_board_data to turn the phy on or off.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoconfigs: am43xx: Enable RNDIS support in SPL
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:55 +0000 (11:30 +0100)]
configs: am43xx: Enable RNDIS support in SPL

The AM43xx SOCs have the ability to download the SPl through USB (RNDIS).
Adding support for RNDIS in SPL allows to also download u-boot through USB.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoconfigs: am43xx_evm: Enable DM_USB and DM_USB_GADGET
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:54 +0000 (11:30 +0100)]
configs: am43xx_evm: Enable DM_USB and DM_USB_GADGET

Enable DM_USB and DM_USB_GADGET for AM43xx EVM boards.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agodts: am4372: Enable USB1 in SPL
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:53 +0000 (11:30 +0100)]
dts: am4372: Enable USB1 in SPL

USB1 can be used by the romboot on all am4372 platforms to download a
firmware (SPL in our case).
It makes sense to enable USB1 in the SPL to download u-boot.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agodts: Add a u-boot specific dtsi file for the am4372
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:52 +0000 (11:30 +0100)]
dts: Add a u-boot specific dtsi file for the am4372

This file is used to override the values found in am4372.dtsi
Use it to fix the "compatible" options for the controllers used
to support the USB (parent bus and syscons).

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoboard: ti: am43xx: turn on USB clocks
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:51 +0000 (11:30 +0100)]
board: ti: am43xx: turn on USB clocks

Enable USB clocks in late init stage to support ports under DM_USB.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agodwc3-generic: Add support for the am437x
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:50 +0000 (11:30 +0100)]
dwc3-generic: Add support for the am437x

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agophy: omap_usb2: Add support for am437x
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:49 +0000 (11:30 +0100)]
phy: omap_usb2: Add support for am437x

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agospl: net: dm: usb: bind the gadget before attempting to load the image
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:48 +0000 (11:30 +0100)]
spl: net: dm: usb: bind the gadget before attempting to load the image

If DM_USB_GADGET is used, the usb ethernet gadget driver must be bound to a
controller before the image can be downloaded over the network.
In u-boot this can be done with the bind command. In SPL it must be done
programmatically.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agospl: drivers: Link usb common library to SPL if USB gadget is enabled
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:30:47 +0000 (11:30 +0100)]
spl: drivers: Link usb common library to SPL if USB gadget is enabled

Some drivers might need to access common USB functions such as
usb_get_maximum_speed() or usb_get_dr_mode().

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoconfigs: k2g_evm: Enable DFU on K2G EVM
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:13:01 +0000 (11:13 +0100)]
configs: k2g_evm: Enable DFU on K2G EVM

The K2G evm uses the generic DWC3 driver. DFU can thus be enabled.
Enabling DFU for easier firmware update.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agousb: host: replace xhci-keystone driver by the generic dwc3 driver
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:13:00 +0000 (11:13 +0100)]
usb: host: replace xhci-keystone driver by the generic dwc3 driver

The keystone platforms can use the generic DC3 driver. Removing the
keystone-spcecific xchi driver and add the configuration options to enable
the generic DWC3 driver on all K2 platforms.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoPHY: Add phy driver for the keystone USB PHY
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:12:59 +0000 (11:12 +0100)]
PHY: Add phy driver for the keystone USB PHY

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoARM: dts: k2g-evm: enable USB0 and USB1
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:12:58 +0000 (11:12 +0100)]
ARM: dts: k2g-evm: enable USB0 and USB1

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoboard: ks2_evm: Enable the USB clocks if DM_USB is used
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:12:57 +0000 (11:12 +0100)]
board: ks2_evm: Enable the USB clocks if DM_USB is used

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agousb: dwc3-generic: make it compatible with "ti, keystone-dwc3"
Jean-Jacques Hiblot [Tue, 4 Dec 2018 10:12:56 +0000 (11:12 +0100)]
usb: dwc3-generic: make it compatible with "ti, keystone-dwc3"

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agousb: musb: Remove legacy CONFIG_USB_DA8XX
Adam Ford [Wed, 12 Dec 2018 14:17:41 +0000 (08:17 -0600)]
usb: musb: Remove legacy CONFIG_USB_DA8XX

There don't appear to be any boards enabling CONFIG_USB_DA8XX,
and there is a newer version of the MUSB driver, so let's remove
the legacy version of it.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
5 years agousb: musb: Remove Legacy CONFIG_USB_DAVINCI
Adam Ford [Wed, 12 Dec 2018 14:17:22 +0000 (08:17 -0600)]
usb: musb: Remove Legacy CONFIG_USB_DAVINCI

This patch removes CONFIG_USB_DAVINCI.  It's a legacy option
that isn't defined anywhere, and there is a newer MUSB driver.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
5 years agousb: Don't enable CONFIG_SPL_DM_USB for non-DM SPL
Martyn Welch [Mon, 10 Dec 2018 11:05:16 +0000 (11:05 +0000)]
usb: Don't enable CONFIG_SPL_DM_USB for non-DM SPL

When CONFIG_SPL_DM_USB was added, it was added defaulted on without
protection to ensure it didn't get set for non-DM SPL builds.

This leads to unexpected and confusing failures when building a DM based
U-Boot but with a non-DM SPL, as the defconfig is unlikely to have
CONFIG_SPL_DM_USB actively disabled.

Tweak the Kconfig to not enable this setting unless CONFIG_SPL_DM is set.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
5 years agousb: composite: Move bitmap related operations to ./include/linux/bitmap.h
Lukasz Majewski [Fri, 23 Nov 2018 16:36:19 +0000 (17:36 +0100)]
usb: composite: Move bitmap related operations to ./include/linux/bitmap.h

The BITMAP related operations can now be moved to ./include/linux/bitmap.h
file to mimic the Linux kernel directory tree.

This change also allows to remove the lin_gadget_compat.h header file
(which is a legacy code only for composite U-boot layer).
It was also possible to remove #includes from several USB gadget drivers.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>
5 years agousb: gadget: f_sdp: Provide filesize env variable for downloaded images
Petr Štetiar [Fri, 23 Nov 2018 13:37:52 +0000 (14:37 +0100)]
usb: gadget: f_sdp: Provide filesize env variable for downloaded images

Currently it's not possible to get filesize of downloaded images and
it's impossible to automate some tasks in scripts. So this patch adds
`filesize` environment variable with size (as hex number in bytes) of
the last successfully downloaded file via `sdp` command.

Cc: Lukasz Majewski <lukma@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>
5 years agodm: sound: Use the correct number of channels for sound
Simon Glass [Mon, 10 Dec 2018 17:37:51 +0000 (10:37 -0700)]
dm: sound: Use the correct number of channels for sound

At present the 'beep' sound generates a waveform for only one channel even
if two are being used. This means that the beep is twice the frequency it
should be. Correct this by making it a parameter.

The fix in a previous commit was correct for sandbox but not for other
boards.

Fixes: 03f11e87a8 ("sound: Correct data output in sound_create_square_wave()")
Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sandbox: Allow selection of sample rate and channels
Simon Glass [Mon, 10 Dec 2018 17:37:50 +0000 (10:37 -0700)]
dm: sandbox: Allow selection of sample rate and channels

At present these parameters are hard-coded in the sdl interface code.
Allow them to be specified by the driver instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: max98095: Tidy up error codes
Simon Glass [Mon, 10 Dec 2018 17:37:49 +0000 (10:37 -0700)]
dm: sound: max98095: Tidy up error codes

Return a valid error code instead of -1.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: Fix license headers
Simon Glass [Mon, 10 Dec 2018 17:37:48 +0000 (10:37 -0700)]
dm: sound: Fix license headers

Fix a few files whos license headers were not converted to SPDX.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: Complete migration to driver model
Simon Glass [Mon, 10 Dec 2018 17:37:47 +0000 (10:37 -0700)]
dm: sound: Complete migration to driver model

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>
5 years agodm: exynos: Drop CONFIG_DM_I2C_COMPAT
Simon Glass [Mon, 10 Dec 2018 17:37:46 +0000 (10:37 -0700)]
dm: exynos: Drop CONFIG_DM_I2C_COMPAT

This option is not needed anymore for all exynos boards except arndale.
Update the config.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sandbox: sound: Convert to use driver model
Simon Glass [Mon, 10 Dec 2018 17:37:45 +0000 (10:37 -0700)]
dm: sandbox: sound: Convert to use driver model

Update sandbox's device tree and config to use driver model for sound. Use
the double buffer for sound output so that we don't need to wait for the
sound to complete before returning.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: exynos: sound: Convert to use driver model
Simon Glass [Mon, 10 Dec 2018 17:37:44 +0000 (10:37 -0700)]
dm: exynos: sound: Convert to use driver model

Update snow's device tree and config to use driver model for sound. Also
update the others as best we can.

Spring does not appear to have audio support in the kernel. The smdk5250
and smdk5420 boards use a wolfson codec which I cannot test with. So the
only boards that is tested and known to work are snow, pit and pi.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: exynos: Add support for max98090
Simon Glass [Mon, 10 Dec 2018 17:37:43 +0000 (10:37 -0700)]
dm: sound: exynos: Add support for max98090

Add support for this new codec which is used by pit.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: Move common code out of maxim98095
Simon Glass [Mon, 10 Dec 2018 17:37:42 +0000 (10:37 -0700)]
dm: sound: Move common code out of maxim98095

The register-access code is useful for any maxim codec. Move it out into
its own file.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoexynos: Add support for exynos5420 i2s pinmux
Simon Glass [Mon, 10 Dec 2018 17:37:41 +0000 (10:37 -0700)]
exynos: Add support for exynos5420 i2s pinmux

Allow setting the i2s pinmux correctly on exyno5420 so that i2c can be
used on that SoC. Also rename EXYNOS_AUDSS to something consistent with
other naming.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoexynos: Add proid_is_exynos542x() for common 542x
Simon Glass [Mon, 10 Dec 2018 17:37:40 +0000 (10:37 -0700)]
exynos: Add proid_is_exynos542x() for common 542x

Add a convenience function for any Exynos 542x chip.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: Add conversion to driver model
Simon Glass [Mon, 10 Dec 2018 17:37:39 +0000 (10:37 -0700)]
dm: sound: Add conversion to driver model

Move the existing hardware drivers over to use driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: sound: Start i2c IDs from 0
Simon Glass [Mon, 10 Dec 2018 17:37:38 +0000 (10:37 -0700)]
dm: sound: Start i2c IDs from 0

The current ID enums start from 1 but there does not seem to be any reason
that they cannot start with 0. Adjust the code to avoid the +1 in
codec_init().

Signed-off-by: Simon Glass <sjg@chromium.org>