aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2022-04-25nds32: Remove the architectureWIP/25Apr2022Tom Rini6-330/+0
As removal of nds32 has been ack'd for the Linux kernel, remove support here as well. Cc: Rick Chen <rick@andestech.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Rick Chen <rick@andestech.com>
2022-04-25Merge branch '2022-04-25-initial-implementation-of-stdboot'Tom Rini7-6/+176
To quote the author: The bootflow feature provide a built-in way for U-Boot to automatically boot an Operating System without custom scripting and other customisation. This is called 'standard boot' since it provides a standard way for U-Boot to boot a distro, without scripting. It introduces the following concepts: - bootdev - a device which can hold a distro - bootmeth - a method to scan a bootdev to find bootflows (owned by U-Boot) - bootflow - a description of how to boot (owned by the distro) This series provides an implementation of these, enabled to scan for bootflows from MMC, USB and Ethernet. It supports the existing distro boot as well as the EFI loader flow (bootefi/bootmgr). It works similiarly to the existing script-based approach, but is native to U-Boot. With this we can boot on a Raspberry Pi 3 with just one command: bootflow scan -lb which means to scan, listing (-l) each bootflow and trying to boot each one (-b). The final patch shows this. With a standard way to identify boot devices, booting become easier. It also should be possible to support U-Boot scripts, for backwards compatibility only. ... The design is described in these two documents: https://drive.google.com/file/d/1ggW0KJpUOR__vBkj3l61L2dav4ZkNC12/view?usp=sharing https://drive.google.com/file/d/1kTrflO9vvGlKp-ZH_jlgb9TY3WYG6FF9/view?usp=sharing
2022-04-25bootstd: usb: Add a bootdev driverSimon Glass2-0/+65
Add a bootdev driver for USB host. It can use the distro boot mechanism to locate a file, or any other available bootmeth. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: mmc: Add a bootdev driverSimon Glass3-0/+90
Add a bootdev driver for MMC. It mostly just calls the bootdev helper function. Add a function to obtain the block device for an MMC controller. Fix up the comment for mmc_get_blk_desc() while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25dm: blk: Add a function to return the device typeSimon Glass1-0/+7
Use the uclass name to get the device type for a block device. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25dm: core: Allow finding a uclass device by partial nameSimon Glass1-3/+10
In some cases two devices are related and the only way to tell is to check that the names partially patch. Add a way to check this without needing to create a new string for the comparison. Fix the comment for device_find_child_by_namelen() while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25dm: core: Rename and fix uclass_get_by_name_len()Simon Glass1-3/+4
It seems that namelen is more common in U-Boot. Rename this function to fit in better. Also fix a bug where it breaks the operation of uclass_get_by_name() and add a test. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reported-by: Tim Harvey <tharvey@gateworks.com>
2022-04-23dm: blk: add a device-probe hook for scanning disk partitionsAKASHI Takahiro1-0/+4
Now that all the block device drivers have enable a probe hook, we will call part_create_block_devices() to enumerate all the partitions and create associated udevices when a block device is detected. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-23dm: tag: change ENOSPC to ENOMEMAKASHI Takahiro1-2/+2
ENOMEM is a more common error code for memory starvation. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-04-22Merge https://gitlab.denx.de/u-boot/custodians/u-boot-pmicWIP/22Apr2022Tom Rini1-1/+1
2022-04-22Merge https://gitlab.denx.de/u-boot/custodians/u-boot-usbTom Rini3-2/+22
2022-04-22power-domain: Fix use of uninitialized value in dev_power_domain_ctrlSean Anderson1-1/+1
If dev_count_phandle_with_args returns 0 or another error, then pd will never have been initialized by power_domain_get_by_index. Avoid comparing against pd.dev in this situation. Fixes: 3e4fcfa4bc ("power-domain: fix hang in endless loop on i.MX8") Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-04-22Merge https://gitlab.denx.de/u-boot/custodians/u-boot-watchdogTom Rini3-0/+125
- device-tree-bindings: watchdog: document common properties (Philippe) - nuvoton: Add support for Nuvoton (Jim)
2022-04-22Merge tag 'u-boot-imx-20220422' of ↵Tom Rini19-212/+715
https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20220422 ------------------- - Switch to DM_SERIAL - Drop MMCROOT - several cleanup CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/11815
2022-04-22Add support for TP-Link UE200 dongleOleksii Titov1-0/+2
Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Signed-off-by: Oleksii Titov <ootitov@gmail.com>
2022-04-22usb: dwc3: Add support for usb3-phy PHY configurationMichal Simek1-0/+18
When usb3-phy label is found, PHY driver is called and serdes line is initialized. This is preparation for serdes/psgtr driver to configure GT lines based on description in DT. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2022-04-22usb: gadget: ci: Make various ops constAdam Ford1-2/+2
ci_udc_ops and ci_ep_ops do not change their operations. Mark them as const. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-04-22wdt: nuvoton: Add support for NuvotonJim Liu3-0/+125
Add watchdog controller driver for NPCM7xx/npcm8xx the wdt design of npcm750 and npcm845 is the same. so the driver can work on npcm750 and npcm845. about npcm845 wdt dtsi i will followed kernel dts name to use nuvoton,npcm750-wdt. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-21misc: atsha204a: Remove duplicate CRC-16 implementationPali Rohár2-119/+4
ATSHA204A uses bit-reversed checksum of standard CRC-16 with polynomial x^16 + x^15 + x^2 + 1. This ATSHA204A specific checksum can be calculated just by using common U-Boot functions bitrev16() and crc16(). So replace custom driver CRC-16 implementation by common U-Boot functions. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-04-21crypto/fsl: add invalidate_dcache_range for hash output bufferGaurav Jain1-6/+8
HW accelerated hash operations are giving incorrect hash output. so invalidate cache lines to avoid cache overwriting in DDR memory region. caam_hash() -moved address alignment check in the beginning of function. -added invalidate_dcache_range for pout buffer before running descriptor. Fixes: d7af2baa49 (crypto/fsl: Fix HW accelerated hash commands) Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-04-21crypto/fsl: Clear the memory when blob decapsulation failsGaurav Jain1-0/+4
issue: blob decapsulation operation store the decrypted data in memory even if ICV check failed. fix: clear the blob data output memory. Fixes: c5de15cbc8 (crypto/fsl: Add command for encapsulating/decapsulating blobs) Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com> Reviewed-by: Kshitiz Varshney <kshitiz.varshney@nxp.com> Tested-by: Kshitiz Varshney <kshitiz.varshney@nxp.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-04-21pci: imx: remove weak overrides no longer usedTim Harvey1-8/+2
There are no users of the imx6_pcie_toggle_power and imx6_pcie_toggle_reset weak overrides and as these functions are able to be handled now via dt properties lets remove these. Cc: Marek Vasut <marex@denx.de> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2022-04-21pci: imx: use vpcie-supply if defined by device-treeTim Harvey1-2/+17
If vpcie-supply is defined by device-tree use that if CONFIG_PCIE_IMX_POWER_GPIO is not defined. Note that after this the following boards which define CONFIG_PCIE_IMX_POWER_GPIO in their board header file as well as their device-tree should be able to remove CONFIG_PCIE_IMX_PERST_GPIO without consequence: - mx6sabresd - mx6sxsabresd - novena Note that the ge_bx50v3 board uses CONFIG_PCIE_IMX_POWER_GPIO and does not have vpcie-supply defined in it's pcie node in the dt thus removing CONFIG_PCIE_IMX_POWER_GPIO globally can't be done until that board adds vpcie-supply. Cc: Ian Ray <ian.ray@ge.com> (maintainer:GE BX50V3 BOARD) Cc: Sebastian Reichel <sebastian.reichel@collabora.com> (maintainer:GE BX50V3 BOARD) Cc: Fabio Estevam <festevam@gmail.com> (maintainer:MX6SABRESD BOARD) Cc: Marek Vasut <marex@denx.de> (maintainer:NOVENA BOARD) Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2022-04-21usb: dwc3: Implement .glue_configure for i.MX8MPMarek Vasut1-0/+52
The i.MX8MP glue needs to be configured based on a couple of DT properties, implement .glue_configure callback to parse those DT properties and configure the glue accordingly. Tested-By: Tim Harvey <tharvey@gateworks.com> #imx8mp-venice-gw74xx Signed-off-by: Marek Vasut <marex@denx.de> Cc: Angus Ainslie <angus@akkea.ca> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Fabio Estevam <festevam@gmail.com> Cc: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2022-04-21usb: dwc3: Rename .select_dr_mode to .glue_configureMarek Vasut1-5/+5
Rename the select_dr_mode callback to glue_configure, the callback is used for more than enforcing controller mode even on the TI chips, so change the name to a more generic one. No functional change. Tested-By: Tim Harvey <tharvey@gateworks.com> #imx8mp-venice-gw74xx Signed-off-by: Marek Vasut <marex@denx.de> Cc: Angus Ainslie <angus@akkea.ca> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Fabio Estevam <festevam@gmail.com> Cc: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2022-04-21imx: power-domain: Add i.MX8MP HSIOMIX driverMarek Vasut3-0/+167
Add trivial driver for i.MX8MP HSIOMIX handling. This is responsible for enabling the GPCv2 power domains and clock for USB 3.0 and PCIe in the correct order. Currently supported is the USB 3.0 part which can be tested, PCIe support should be easy to add. Tested-By: Tim Harvey <tharvey@gateworks.com> #imx8mp-venice-gw74xx Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2022-04-21imx: power-domain: Add i.MX8MP supportMarek Vasut1-0/+79
Add i.MX8MP power domain handling into the driver. This is based on the Linux GPCv2 driver state which is soon to be in Linux next. Tested-By: Tim Harvey <tharvey@gateworks.com> #imx8mp-venice-gw74xx Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2022-04-21power_domain: Add power_domain_get_by_name()Marek Vasut1-0/+14
Implement power_domain_get_by_name() convenience function which parses DT property 'power-domain-names' and looks up power domain by matching name. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Cc: Simon Glass <sjg@chromium.org>
2022-04-21imx: power-domain: Get rid of SMCCC dependencyMarek Vasut2-19/+361
This driver is the only SMCCC dependency in iMX8M U-Boot port. Rework the driver based on Linux GPCv2 driver to directly control the GPCv2 block instead of using SMCCC calls. This way, U-Boot can operate the i.MX8M power domains without depending on anything else. This is losely based on Linux GPCv2 driver. The GPU, VPU, MIPI power domains are not supported to save space, since they are not useful in the bootloader. The only domains kept are ones for HSIO, PCIe, USB. Tested-By: Tim Harvey <tharvey@gateworks.com> #imx8mp-venice-defconfig Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2022-04-21imx: power-domain: Inline arch-imx8m/power-domain.hMarek Vasut1-1/+6
The arch/arm/include/asm/arch-imx8m/power-domain.h is not included anywhere except in drivers/power/domain/imx8m-power-domain.c, just inline the content and drop the header. No functional change. Tested-By: Tim Harvey <tharvey@gateworks.com> #imx8mp-venice-defconfig Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2022-04-21imx: power-domain: Descend into pgc subnode if presentMarek Vasut1-0/+6
In case the power domain node structure is gpc@303a0000/pgc/power-domain@N, do not bind power domain driver to the 'pgc' node, but rather descend into it and only bind power domain drivers to power-domain@N subnodes. This way we do not waste one useless driver instance associated with 'pgc' node. Tested-By: Tim Harvey <tharvey@gateworks.com> #imx8mp-venice-defconfig Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2022-04-21power-domain: Return 0 if ops unimplemented and remove empty functionsMarek Vasut12-181/+4
In case the ops is not implemented, return 0 in the core right away. This is better than having multiple copies of functions which just return 0 in each power domain driver. Drop all those empty functions. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Cc: Simon Glass <sjg@chromium.org>
2022-04-21net: mvneta: add SFP TX disable handlingRobert Marko1-0/+12
Add support for handling SFP TX disable for MVNETA in the same fashion as to what MVPP2 is doing in order to enable using SFP-s. This allows using ethernet on SFP only boards. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-04-20ram: k3-ddrss: Allow use of dt provided initial frequencyDave Gerlach1-5/+10
Allow device tree to provide ti,ddr-freq0 to be used as the initial DDR frequency that is set for lpddr4 before initialization of the controller. Make this optional and continue to use PLL bypass frequency as is done currently if ti,ddr-freq0 is not provided. Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
2022-04-20ram: k3-ddrss: Fix register name and explain its usageDominic Rath1-3/+3
The k3-ddrss driver wants to configure the DDRSS_V2A_CTL_REG to reflect the maximum possible SDRAM of 2 GB for AM64x (instead of the register's default that says 8 GB, which the AM64x DDR controller wouldn't support). The offset 0x20 was correct, but the register name DDRSS_V2A_R1_MAT_REG was that of the next register at offset 0x24. Signed-off-by: Dominic Rath <rath@ibv-augsburg.net>
2022-04-19gpio: aspeed: Fix incorrect offset of read back register.Billy Tsai1-2/+2
The offset of the current read back register is the value of the gpio pin, not the value written for the gpio output. This patch fix it to avoid the other gpio output value controlled by the same register being set incorrectly. Fixes: 7ad889b0f37a ("gpio: Add Aspeed GPIO driver") Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
2022-04-19Merge tag 'u-boot-rockchip-20220418' of ↵WIP/19Apr2022Tom Rini19-51/+1824
https://source.denx.de/u-boot/custodians/u-boot-rockchip - Add rk3066 SoC support; - Add rk3066 MK808 board support; - dts sync from kernel for rk322x, rk3288; - some other board level config update;
2022-04-18dm: core: Deal with a wrinkle with linker listsWIP/2022-04-18-dm-reducing-spl-memory-usageSimon Glass2-2/+9
When every member of a linker list is aligned by the compiler, we can no longer rely on the sizeof of the struct to determine the number of entries. For example, if the struct size is 0x90 but every entry is aligned to 0xa0 by the compiler, the linker list entries takes more space in memory and the calculation of the number of entries is incorrect. For example, we may see 0x12 entries when there are only 0x11. This is a real problem. There may be a general solution, although I cannot currently think of one. So far it only bites with OF_PLATDATA_RT which creates a pointer to each entry of the 'struct udevice' linker_list. This does not happen without that option, so it only affects SPL. Work around it by manually calculating the aligned size of struct udevice, then using that for the n_ent calculation. Note: the alignment fix to linker list was here: 0b2fa98aa5e linker_lists: Fix alignment issue Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-18dm: core: Allow devres to be disabled in SPLSimon Glass2-2/+2
At present if devres is enabled in U-Boot proper it is enabled in SPL. We don't normally want it there, so disable it. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Angus Ainslie <angus@akkea.ca>
2022-04-18rockchip: video: mipi: add more compatible strings for rk3288/rk3399Johan Jonker2-0/+2
The rk3288/RK3399 DT synced from Linux contains some different compatible strings in the mipi node then origanal used in U-boot. Allow both options to be backwards compatible and to be able to handle recent rk3288.dtsi and rk3399.dtsi files. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-04-18rockchip: video: rk_edp: add more rk3288 edp node optionsJohan Jonker1-2/+6
The rk3288 DT synced from Linux contains some different properties in the edp node then origanal used in U-boot. Allow both options to be backwards compatible and to be able to handle recent rk3288.dtsi files. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-04-18rockchip: rk3066: add sdram driverPaweł Jarosz2-0/+893
Add rockchip rk3066 sdram driver Signed-off-by: Paweł Jarosz <paweljarosz3691@gmail.com> Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-04-18rockchip: rk3066: add rk3066 pinctrl driverPaweł Jarosz2-0/+113
Add driver supporting pin multiplexing on rk3066 platform. Signed-off-by: Paweł Jarosz <paweljarosz3691@gmail.com> Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-04-18rockchip: rk3066: add clock driver for rk3066 socPaweł Jarosz2-0/+718
Add the clock driver for the rk3066 platform. Derived from the rk3288 and rk3188 driver it supports only a bare minimum to bring up the system to reduce the TPL size for: SDRAM clock configuration. The boot devices NAND, EMMC, SDMMC, SPI. A UART for the debug messages (fixed) at 115200n8. A SARADC for the recovery button. A TIMER for the delays (fixed). There's support for two possible frequencies, the safe 600MHz which will work with default pmic settings and will be set to get away from the 24MHz default and the maximum of 1.416Ghz, which boards can set if they were able to get pmic support for it. After the clock tree is set during the TPL probe there's no parent update support. In OF_REAL mode the drivers ns16550.c and dw-apb-timer.c obtain the (fixed) clk_get_rate from the clock driver instead of platdata. The rk3066 cru node has a number of assigned-clocks properties that call the .set_rate() function. Add them to the list so that they return a 0 instead of -ENOENT. Signed-off-by: Paweł Jarosz <paweljarosz3691@gmail.com> Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-04-18rockchip: serial: Kconfig: allow ROCKCHIP_SERIAL enabled in TPLJohan Jonker2-4/+2
The serial_rockchip.c driver converts platdata to the data structure used in the ns16550.c file and then calls the function ns16550_serial_probe(). When compiled with OF_REAL the serial_rockchip.c driver returns now -ENODEV when probed and does no harm. The config ROCKCHIP_SERIAL is currently depends on SPL_OF_PLATDATA. Allow serial port use for both SPL and TPL by removing this dependency and SPL_BUILD restriction. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-04-18rockchip: serial: Kconfig: add select SYS_NS16550 to config ROCKCHIP_SERIALJohan Jonker1-0/+1
The Rockchip serial driver depends on an enabled NS16550 driver, so add select SYS_NS16550 to config ROCKCHIP_SERIAL. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-04-18rockchip: serial: rename U_BOOT_DRIVER name to rockchip_uartJohan Jonker1-8/+9
When a defconfig for rk3288 is compiled it gives the warning: rockchip_rk3288_uart: Missing .compatible in ./drivers/serial/serial_rockchip.c : WARNING: the driver rockchip_rk3288_uart was not found in the driver list Fix by renaming U_BOOT_DRIVER name of serial_rockchip.c to rockchip_uart. Add rk3288 serial support with a DM_DRIVER_ALIAS define. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-04-18rockchip: serial: move driver alias to serial_rockchip.cJohan Jonker2-2/+2
The Rockchip uart DT nodes have "snps,dw-apb-uart" as fall back string. The driver ns16550.c has CONFIG_IS_ENABLED(OF_REAL) as condition to of_match and does not copy dtplat data. For TPL/SPL the driver serial_rockchip.c is used. Move driver alias to correct driver. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-04-18rockchip: serial: restyle the serial_rockchip.c driverJohan Jonker1-22/+15
The ns16550.c driver has the following conditions for .of_match: CONFIG_IS_ENABLED(OF_REAL) For Rockchip SoCs with TPL/SPL and platform data that need serial support the serial_rockchip.c driver was made. It copies this data and then calls ns16550_serial_probe(). With the addition of yet an other SoC type this driver is in need for a little restyle. Simplify struct rockchip_uart_plat and add extra SoCs with DM_DRIVER_ALIAS(). Return -ENODEV when the ns16550.c driver probe function is available. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-04-18rockchip: mmc: rockchip_dw_mmc: add rk3066/rk3188 supportJohan Jonker1-1/+2
The Rockchip SoCs rk3066/rk3188 have MMC DT nodes with as compatible string "rockchip,rk2928-dw-mshc". Add OF_PLATDATA support to the existing driver with help of a DM_DRIVER_ALIAS. This type needs a permanent enabled fifo. The other Rockchip SoCs always have the property "u-boot,spl-fifo-mode" in the MMC DT nodes, because MMC to SRAM can't do DMA. Make this property a requirement for MMC OF_PLATDATA structures. The property "fifo-mode" must be added for all other compile modes. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>