This patch handles the issue in SPL:
U-Boot SPL board initspl_early_init()
- found match at 'rv1126_syscon'
- found match at 'rv1126_syscon'
- found match at 'syscon'
- found match at 'rockchip_rv1126_pmucru'
- found match at 'rockchip_rv1126_cru'
- found match at 'ns16550_serial'
- found match at 'rockchip_rk3288_dw_mshc'
- found match at 'rk_nandc_v6'
- found match at 'rockchip_sfc'
- found match at 'spi_nand'
- found match at 'spi_flash_std'
- found match at 'rockchip_crypto_v2'
- found match at 'rockchip_secure_otp_v2'
Cannot find uclass for id 36: please add the UCLASS_DRIVER() declaration for this UCLASS_... id
Missing uclass for driver rockchip_secure_otp_v2
secure_otp@0xff5d0000: ret=-96
dm_scan_fdt() failed: -96
dm_extended_scan_dt() failed: -96
dm_init_and_scan() returned error -96
spl_early_init() failed: -96
......
The root cause is drivers/misc/rockchip-secure-otp-v2.S is pre-compile
but not compile every time, it occupies the UCLASS_MISC id as 36.
There are the same situation for other otp drivers, so let's move it to
the end.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I58a2bec703c2af743d209192fefda6ff6167b01c
For dual ethernet controllers, the HW design may connect ETH phys to
one MDIO ports. So two different ethernet drivers have to share MDIO bus.
Since two ethernet drivers are independent, we can't ensure their probe
order.
To resolve this problem, introduce an eth phy generic driver and uclass.
After eth-uclass binds, we search the mdio node and binds the phy node
with the eth-phy-generic driver.
When one eth driver get its phy device, the parent of phy device will
probe prior than phy device. So this ensure the eth driver ownes the
MDIO bus will be probed before using its MDIO.
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Ice83493e9e1caf3842f9ce0c129e29ad46cc0532
Adds UCLASS_MDIO DM class supporting MDIO buses that are probed as
stand-alone devices. Useful in particular for systems that support
DM_ETH and have a stand-alone MDIO hardware block shared by multiple
Ethernet interfaces.
Signed-off-by: Alex Marginean <alexm.osslist@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I8e106f4360aa46289e0ed551f8f685cad9dc6269
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.
Change-Id: Iad9ba5f368bd2de9940cf069baf9bec9d668920c
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 07e33711fec4f1106f36805b5dc830da07c783c5)
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)
- add amp uclass;
- add a simple rockchip amp driver.
An example for amps dts node configure:
amps {
compatible = "uboot,rockchip-amp";
status = "okay";
amp@0 {
description = "mcu-os1";
partition = "mcu1";
cpu = <0x1>; // this is mpidr!
load = <0x800000>;
entry = <0x800000>;
memory = <0x800000 0x400000>;
};
amp@1 {
......
};
......
};
U-Boot loads "mcu-os1" firmware to "0x800000" address from partiton
"mcu1" for cpu[1], the cpu[1] entry address is 0x800000. And
U-Boot reserve memory from 0x800000 with 0x400000 size in order
to make it invisible for kernel.
Please use rockchip tool "mkkrnlimg" to pack firmware binary, example:
./scripts/mkkrnlimg mcu-os1.bin mcu-os1.img
Change-Id: I127d5d9f460ec0c1812a76fb4c3702e82f21c9a6
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
The io-domains on Rockchip SoCs will be supplied with 1.8V or 3.3V(3.0V)
depends on hardware design. The driver needs to config them through grf
register.
Change-Id: Ic896b94bfadd0b808da54992e58e2cf4a8fee950
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
- support get device_node by given stem and alias id;
- dump of alias nodes added in aliases_lookup.
Change-Id: I3ed8bd4692dd3fbbeebe9978a797a5a2dcf7eb23
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This patch adds driver support for rockchip rk809/rk817.
Change-Id: I0e8355fa6dffb23d8413c0b3a198757aa2d2360c
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This patch add driver support for rockchip i2s bus.
Change-Id: I2c7f2b46d628706fa000055f7962ba6b4ff6d0b6
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
- Use ram as a disk which appears as block devices.
- Provide a read only ramdisk driver.
Change-Id: Ie6dc1a036c8a2841cacd0d467599c11b74b4ad77
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
The Rockchip video drivers need to walk the ofnode-parrents to find
an enclosing device that has a UCLASS_DISPLAY driver bound. This
adds a ofnode_get_parent()-function that returns the parent-node.
Change-Id: I312236c966348aaa36ffc30e3f7dbc83d706fb36
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit e2d5997ffdf5cbf4f7d53584dab2ffc673f50987)
Each uclass has a driver name which we can use to look up the uclass. This
is useful for logging, where the uclass ID is used as the category.
Add a function to handle this, as well as a test.
Change-Id: Id221809d6f9f818b52a5bf88f4e12d409a070f05
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 6e43d1b19982b1756b7c607569d1778e556d6577)
We need to get ofnode from a phandle, add interface to support
both live dt and fdt.
Change-Id: I01a5241e2eced37b68ab6556cc1b16001eecbe0f
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Add to api for who can not get phandle from a device property.
Change-Id: I8395f02d1731a4bbb00af1e4fa9d151830fc54b0
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Some device like syscon, blk do not have of node, return directly.
Change-Id: Icc4629632522f4a3af6532c6a9f2152b0e45de8b
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
struct driver_info has no field 'flags'.
Change-Id: Icedd7ae9bbb6fb62ce6a0d754d740c95f0eb0070
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 5da3b3d10497fdd7a5655d3872286610fe8489ed)
As we discussed before in ML, dm_dbg() causes undefined reference
error if #define DEBUG is added to users, but not drivers/core/util.c
We do not need this macro because we can use pr_debug() instead, and
it is pretty easy to enable it for the DM core by using ccflags-y.
Change-Id: I0732d1fec827d434b1163093920a3c5bd682803e
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit ceb9190969e458dcd1427566f762dbb9cfdfdc94)
Many drivers had started to use dev_err, dev_info, etc. for log
functions. Currently, we are relying on <linux/compat.h>, but I
guess the best home is <dm/device.h>, taking into account that
Linux defines them in <linux/device.h>.
For now, I am leaving the ones in <linux/compat.h> because lots of
Linux-originated code uses dev_*(), but the first argument is not
struct udevice, so we need to ignore the bogus argument. More
efforts are needed to iron out the issues.
Change-Id: I18f67bd63ac22d8b69bdf8e0558600c58e8703d2
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit c898cba41e94fa87c57d71911fb812cd34c7a91e)
dev_read_string_count() is used to get the number of strings in a
stringlist.
dev_read_string_index() is used to get a string in the stringlist based on
its position in the list.
Change-Id: I0e144e7c2048030a9b43ca6153225f6267d58c89
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit b5a144a5014be5e3b065e2061a7d17e653d739ae)
The dev_read_addr_ptr() mimics the behaviour of the devfdt_get_addr_ptr(),
retrieving the first address of the node's reg-property and returning
it as a pointer (or NULL on failure).
Change-Id: Iaac920b89296fd53504b071e7617f24ac6dd2fc8
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit c131c8bca86b428daef7a25c26a96af42658be21)
Currently, all fixed-clock declared in "clocks" node in device tree
can be binded by clk_fixed_rate.c driver only if each of them have
the "simple-bus" compatible string.
This constraint has been invoked here [1].
This patch offers a solution to avoid adding "simple-bus" compatible
string to nodes that are not busses.
[1] https://patchwork.ozlabs.org/patch/558837/
Change-Id: Ia267df49d4f1b84115d5e600c0f0cd5e74105f53
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit e81c98649b7a67d43c5baae407430a242d3b26b9)
Add a convenience macro to iterate over subnodes of a node. Make use of
this where appropriate in the code.
Change-Id: Iae0fb554472d0b5819d26becbbcf8909ff891514
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 3991f42ed2e38aff28ba3c24369bfbd90620bea7)
This patch add the nand flash support for Rockchip Soc(RK3128, RK3126x,
RK3188, Rk3229 etc).
Change-Id: I35ea09f0714b303b247a97ed13cc6e0e56675a0e
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
This converts the IDE driver to driver model so that block read and
write are fully functional.
Fixes: b7c6baef ("x86: Convert MMC to driver model")
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Linux supports platform_get_resource_byname() to look up a resource
by name.
We want a similar helper. It is useful when a device node has named
register regions.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This adds a new uclass id and block interface type for NVMe.
Signed-off-by: Zhikang Zhang <zhikang.zhang@nxp.com>
Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jon Nettleton <jon@solid-run.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
This function is usefull to get phandle number contained
in a property list.
For example, this allows to allocate the right amount
of memory to keep clock's reference contained into the
"clocks" property.
To implement it, either of_count_phandle_with_args() or
fdtdec_parse_phandle_with_args() are used respectively
for live tree and flat tree.
By passing index = -1, these 2 functions returns the
number of phandle contained into the property list.
Add also the dev_count_phandle_with_args() based on
ofnode_count_phandle_with_args()
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
We sometimes need to read a resource from an arbitrary node. In any case
for consistency we should not put the live-tree switching code in
a dev_read_...() function. Update this to suit.
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-on: Beaver, Jetson-TK1
Tested-by: Stephen Warren <swarren@nvidia.com>
DT property values can be strings as well as integers. This is why
of_get_property/fdt_getprop returns an opaque pointer.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
This allow to remove include/dm/platform_data/serial_stm32x7.h
which was included in the past by stm32x7 driver and by
stm32f746-disco.c board file.
Since patch 42bf5e7c27 "serial: stm32f7: add device tree support"
this file is no more needed in board file.
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
This function returns the pointer to the value of a node property.
The current name ofnode_read_prop() is confusing. Follow the naming
of_get_property() from Linux.
The return type (const u32 *) is wrong. DT property values can be
strings as well as integers. This is why of_get_property/fdt_getprop
returns an opaque pointer.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>