Align the board and driver prototype for board_interface_eth_init
to avoid execution issue (the interface_type parameter is defined
as int or phy_interface_t).
To have a generic weak function (it should be reused by other driver)
I change the prototype to use directly udevice.
This prototype is added in netdev.h to allow compilation check
and avoid warning when compiling with W=1 on file
board/st/stm32mp1/stm32mp1.c
warning: no previous prototype for 'board_interface_eth_init'\
[-Wmissing-prototypes]
int board_interface_eth_init(int interface_type, ....
^~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I7301e49ef8e51ecdde0629a69d7bcc07465952d0
Add DWC3 device data and gadget download support for RK3328 SoCs.
Change-Id: I034e9838f0f44f24ebb9b9e372039a19e089f3be
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
The DK1 and DK2 boards use the USB Type-C controller STUSB1600.
This patch updates:
- the device tree to add the I2C node in the DT
- the board stm32mp1 to probe this I2C device and use this controller
to check cable detection.
- the DWC2 driver to support a new dt property
"u-boot,force-b-session-valid" which forces B session and
device mode; it is a workaround because the VBUS sensing and
ID detection isn't available with stusb1600.
Conflicts:
arch/arm/dts/stm32mp157-pinctrl.dtsi
arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
arch/arm/dts/stm32mp157a-dk1.dts
board/st/stm32mp1/stm32mp1.c
Change-Id: I73b62dce9c3e0661e6d2463b87389229cd3559a7
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
(cherry picked from commit 6fe7dd3327d552bacf4266d7f1ed074bf98ffb92)
UCLASS_USB_DEV_GENERIC was meant for USB devices connected to host
controllers, not gadget devices.
Adding a new UCLASS for gadget devices alone.
Also move the generic DM code for USB gadgets in a separate file for
clarity.
Conflicts:
board/sunxi/board.c
Change-Id: I9bd01ad0814b81f7718927660a8ece4080c5f988
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 0131162439508801b9f8a330fa731f04273c9337)
board_usb_init()/_cleanup() should be in board files and don't have
a place in the xhci-omap driver. Weak versions for
board_usb_init()/_cleanup() already exist in common/usb.c
(for host mode) and drivers/usb/gadget/g_dnl.c (for gadget mode).
Therefore, remove init and cleanup functions from xhci-omap and
implement them in the board files.
Change-Id: I9d1fbcbf31fe63f86a5d0a38d767b7070ecfa1fb
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit b16c129c2290d26e7b16b4309713c78f6146bc8a)
This makes the initial changes need to support the
a38x series of SOCs. It adds the device-tree identifier
as well as changing the board_support function to take
the IO address designated by device-tree.
Change-Id: I9558197847260da87cd1b74101c7fa0e9c2f37ef
Signed-off-by: Jon Nettleton <jon@solid-run.com>
[baruch: use fdt_addr_t; update 37xx and 8K implementations]
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit d3d036af8c0ee848c4113dc609bbd6ab26ebc6cb)
The device model was implemented so far using a hook that needed to be
called from the board support, without DT support and only for the host.
Switch to probing both in peripheral and host mode through the DT.
Change-Id: Ieec474f3236f6c7e43e94735f1d544d36708bda0
Reviewed-by: Łukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 3a61b080acee941a1b14b709b58ff9cde0b367bc)
The g_dnl USB settings for the vendor ID, product ID and manufacturer are
actually common settings that can and should be shared by all the gadgets.
Make them common by renaming them, and convert all the users.
Conflicts:
configs/cgtqmx6eval_defconfig
configs/dms-ba16-1g_defconfig
configs/evb-rk3036_defconfig
configs/evb-rk3229_defconfig
configs/evb-rv1108_defconfig
configs/fennec-rk3288_defconfig
configs/stih410-b2260_defconfig
Change-Id: Ib855d37af9f539ef794a2519c75c027e67bd091c
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit a95aee6af70d8815547b81329125f2800c8ee37c)
Instead of having every board file to add its own g_dnl_bind_fixup()
implementation, move it to the common imx6 SPL code.
Change-Id: Id8ee1026cbd8cde4b0711829373f99ba58a6363b
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Łukasz Majewski <lukma@denx.de>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 511db3bf5a27a2f7eca0f60b6adb1eff74bd6df6)
Add basic support for rv1109 evb.
Change-Id: I88bd871880feffbe745e0d5ed22ec7f02e9caa75
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Some rk3128 board like fireprime is using rk818, and it may limit
the current before change the pmic setting, the normal process
need to enable the fuelguage and its dts which is too late,
the U-Boot may HANG at regulator_power_on_init() in board_init().
Change-Id: I7bd058d8bd8fac01377c3cef6b3681c1c6110ee7
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Thomas reported U-Boot failed to build host tools if libfdt-devel
package is installed because tools include libfdt headers from
/usr/include/ instead of using internal ones.
This commit moves the header code:
include/libfdt.h -> include/linux/libfdt.h
include/libfdt_env.h -> include/linux/libfdt_env.h
and replaces include directives:
#include <libfdt.h> -> #include <linux/libfdt.h>
#include <libfdt_env.h> -> #include <linux/libfdt_env.h>
Change-Id: I68fd5734d6460c169fa5ee2893c57cb5d73340b6
Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit b08c8c4870831c9315dcae237772238e80035bd5)
checkpatch.pl complains about the spelling of ERR_TIMOUT. Since the
error is only used in a handful of files, we rename the error to
ERR_TIMEOUT.
Change-Id: If99b9c4f75aa0582da432b748a723e477e22759c
Signed-off-by: Mario Six <mario.six@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 9dbaebcf9f401c5dcea762e34a3dc8ed10760623)
wait_for_bit callers use the 32 bit LE version
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Change-Id: I638846de7db29711fb7c778cc8304b507de057fe
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 48263504c8d501678acaa90c075f3f7cda17c316)
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This header was renamed to rawnand.h in Linux.
The following is the corresponding commit in Linux.
commit d4092d76a4a4e57b65910899948a83cc8646c5a5
Author: Boris Brezillon <boris.brezillon@free-electrons.com>
Date: Fri Aug 4 17:29:10 2017 +0200
mtd: nand: Rename nand.h into rawnand.h
We are planning to share more code between different NAND based
devices (SPI NAND, OneNAND and raw NANDs), but before doing that
we need to move the existing include/linux/mtd/nand.h file into
include/linux/mtd/rawnand.h so we can later create a nand.h header
containing all common structure and function prototypes.
Change-Id: Ia387c26297c268a449e3451c7adfabcd6417b278
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 6ae3900a86b52429bf7a73ad832f0ad02acc2282)
%s/rkflashtool/rkdeveloptool/
We are using rkdeveloptool not rkflashtool.
Change-Id: Icca82ca411f06d3ec5f578d8e4ac53fbbc486868
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 19ee1fae097325c7af4f18956c903d3ad15b43b7)
Thomas reported U-Boot failed to build host tools if libfdt-devel
package is installed because tools include libfdt headers from
/usr/include/ instead of using internal ones.
This commit moves the header code:
include/libfdt.h -> include/linux/libfdt.h
include/libfdt_env.h -> include/linux/libfdt_env.h
and replaces include directives:
#include <libfdt.h> -> #include <linux/libfdt.h>
#include <libfdt_env.h> -> #include <linux/libfdt_env.h>
Change-Id: I6c0f7e50e8b571106627f25ddac008a62bd2994e
Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
return negative erro num makes board_r.c bootflow abort, so that
the adc key driver can not be probe.
Change-Id: I815b16427dc4bf1fdeaab3b75077ed40f5a2beab
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
u-boot.itb will use the same position as uboot.img
Change-Id: I839c947a0221d347e5810d1fc8bbae655aba429b
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
On rk3399 board, we need to configure phy interface UTMI+ width
to 16 bits via the property "snps,phyif-utmi-bits" of dwc3 node.
But we can't the get the property from kernel dtb. So this patch
initialize the phy interface UTMI+ width in dwc3 platform data,
and not dependent on the property in dtb.
Change-Id: I3f6b05e0d72806242a128c85f82b260f61ac4f95
Signed-off-by: William Wu <william.wu@rock-chips.com>
Since the common board init do not detect the fastboot key,
we need to add it in gva board init.
Change-Id: I7f5ea5df740e855c1ec4f64092450d028321200b
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
The RK3308 EVB has two variants: V10 & V11, and V10 bind the
Recovery key on adc channel 0, but V11 bind to channel 1.
Fortunately, the two variants use adc channel 3 to identify
one from another as board id information. So we identify
the board id by adc channel 3, then get the Recovery key
status according to it's corresponding adc channel.
Change-Id: Ib04fb1aad08f69fcdb493258e25c748fb45468d4
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Detail of step by step to bring up the board with OP-TEE support.
Change-Id: I0d0a1ab8cbe720e35959d6611519f4dfcb51b349
Signed-off-by: David Wu <david.wu@rock-chips.com>
The RV1108 EVB switch to spl now, so we need
to update the README.
Change-Id: I1c300a53a8a5c76aafa4857f55956e0203df8634
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
updata the style of reporting sdram capacity to uboot
Change-Id: I6a652f233d8d26e842398edcc184cbbe89099401
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
PX30 is a rockchip evb for px30, including all harware interface
from px30.
Change-Id: I5bac5a7ebf23b5c51b3a01f51fe0404db0a1b5fc
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Use common board file and move SoC spec setting into rk3399.c
Change-Id: Ic674cef566b16c33978a1430eadfa9438b2de1db
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Use common board file and move SoC spec setting into rk3368.c
Change-Id: I1d5a2b0bae03f89092cc0daf1c52622b3884cc43
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Use common board file and move SoC spec setting into rk3328.c
Change-Id: Ia7cf43e0096da980d744260caa61456ddc6b24eb
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Use common board file and move SoC spec setting into rk3288.c
Change-Id: Ie17232dd60d2b185b635631ce9373eb59b11c89c
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
We want to have the same configuration defaults for the RK3368-uQ7
as for the RK3399-Q7: this change reduces the default env-size to
8KiB to ensure that it does not overlap the boot-payload on SD/MMC
configurations.
References: commit fe529e6597c0 ("rockchip: rk3399-puma: reduce env size to 8kiB")
Change-Id: Ia3fcfb0fed8422017cca7cb8c9d1e12025598c8c
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 224d261a16435389cc349b0e1640d489f117189d)
This commit changes the size of the enviroment (for the RK3399-Q7) to
8kiB for all possible locations of the environment (i.e. even when the
environment is saved to SD card).
With the default of 32kiB, the environment overwrites the SPL
stage which lives at 16kiB.
Change-Id: Iafe513fc093669b51d108641c435c406a654c62b
Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
[Reworked commit-message:]
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit fe529e6597c00a98893e5d0ab00251cb50d457a7)
This commit adds ENV_SIZE and ENV_OFFSET configuration items for
ARCH_ROCKCHIP, but keeps these non-visible (i.e. not prompt is given).
With these new items present, the configuration from the header files
is moved to Kconfig.
Keeping these non-visible is necessary to have the possibility to
select new default values if CONFIG_IS_IN_* is changed (interactively
or with oldconfig). Otherwise it will always be set to a previous
value if used with a prompt. As an example if we do a defconfig with
CONFIG_IS_IN_MMC and change it to CONFIG_IS_IN_SPI_FLASH via
menuconfig, ENV_SIZE and ENV_OFFSET will not be changed to the correct
values as defconfig will already have set them to the default values
of CONFIG_IS_IN_MMC in .config.
Change-Id: I72dcb184406523a3a846322fd58ee7b9669d3390
Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 81f53b0dafdfe9458f6d04fc5ec2732c2ea23a71)
The PCIe reset signal is connected to GPIO4_C6 on the Puma
module. This pin is supplied by 1.8V, but the default iodomain
setting is 3.0V and in this situation the pin is unable to go
high.
Linux assumes that this signal works in early boot
as PCIe is probed before loading the iodomain driver.
Make PCIe work in Linux by setting the gpio4cd iodomain to 1.8V.
Change-Id: I131ca6147b490a89cc913ce398dc163c99efd9f2
Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit aa41220f6f7c79284ce5880e2533f81c125237a4)
Linux preserves leading zeros in /proc/cpuinfo, so we
should as well.
Otherwise we have the situation that
/sys/firmware/devicetree/base/serial-number
and /proc/cpuinfo disagree in Linux.
Change-Id: Ie1b53d75468ac9ae6ac3298ed54a4e7b5e6bea9a
Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit b32b1bd10b86d01a26056f50de89f768e5183ed1)
The reset circuitry in the RK3399 only resets 'almost all logic' when
a software reset is performed. To make our software maintenance
easier in the future, we want to have the option (controlled by a DTS
property) to force all reset causes other than a power-on reset to
trigger a power-on reset via a GPIO trigger.
This adds the necessary support to the rk3399-puma (i.e. RK3399-Q7)
board-support and the documentation for the new property
(sysreset-gpio) within the /config-node.
Change-Id: If51b78c2ef6ca929c2d108346e21697f7e9b36db
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit ae0d33a7291a164a11ae034bcf4f71226b2bef48)
For some versions of the RK3399-Q7 (at least revisions v1.1 and v1.2
are affected), we need to turn on the power for the port connected to
the on-module USB hub only when the device is probed for the first
time to ensure that the hub does not enter a low-power mode (that
U-Boot's USB stack can't deal with).
Note that this is needed for U-Boot only, as Linux eventually manages
to attach the hub even when it has entered into its low-power state
(when the hub wakes up the next time) after a few seconds.
Change-Id: I4eca5fe6953ae77ff12c45248d156de4a890803c
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 614539d4f79669413e3336f349c487b605f2bb6b)
When usb_hub_reset_devices is called, it should be passed both an
indicator which hub it should operate on and what port number (local
to that hub) should be reset.
Previously, the usb_hub.c code did not include such context and
always started resets from port number 1, performing multiple
reset-requests for the same devices:
/*
* Reset any devices that may be in a bad state when applying
* the power. This is a __weak function. Resetting of the devices
* should occur in the board file of the device.
*/
for (i = 0; i < dev->maxchild; i++)
usb_hub_reset_devices(i + 1);
This adds an additional 'hub' parameter to usb_hub_reset_devices
that provides the context to fully qualify the port-number in.
Existing implementations are changed to accept and ignore the new
parameter.
Change-Id: I2f201cb9c52522f6e553cbf54aae9bbb2e549a21
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 883946e8e7c5dacb5e12f18703e20d49a4886f0e)