aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2023-07-16Merge tag 'video-20230714' of ↵WIP/16Jul2023Tom Rini8-20/+278
https://source.denx.de/u-boot/custodians/u-boot-video - fix video console default font selection - add panel driver for HannStar HSD060BHW4 - fix backlight pwm integer overflow in duty cycle calculation - fix dw_mipi_dsi hsync/vsync settings - various other fixes for rockchip dw_mipi_dsi
2023-07-14ufs: Use 'TASK_TAG' to construct the ucd_req_ptr->header.dword_0Bhupesh Sharma1-1/+1
Instead of using the hard-coded value of 0x1f, use 'TASK_TAG' macro instead to construct the ucd_req_ptr->header.dword_0 This is in sync with what the Linux UFS driver does, i.e. set the byte0 equal to TASK_TAG (see [1]). Setting it to a fixed value of 0x1f is wrong as we define TASK_TAG as 0 inside u-boot ufs framework. So, instead we should use the macro value directly. [1]. https://github.com/torvalds/linux/blob/master/drivers/ufs/core/ufshcd.c#L2705 Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
2023-07-14drivers: led: bcm6753: do not use null label to find the topPhilippe Reynes1-54/+60
This driver considers that a node with an empty label is the top. But the led class has changed, if a label is not provided for a led, the label is filed with the node name. So we update this driver to use a wrapper to manage the top led node. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2023-07-14net: ti: am65-cpsw-nuss: Use dedicated port mode control registersAndreas Dannenberg1-3/+6
The different CPSW sub-system Ethernet ports have different PHY mode control registers. In order to allow the modes to get configured independently only the register for the port in question must be accessed, otherwise we would just be re-configuring the mode for port 1, while leaving all others at their power-on defaults. Fix this issue by adding a port-number based offset to the mode control base register address based on the fact that the control registers for the different ports are spaced exactly 0x4 bytes apart. Fixes: 9d0dca1199d1 ("net: ethernet: ti: Introduce am654 gigabit eth switch subsystem driver") Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
2023-07-14firmware: scmi: return a right errno for SCMI status codeAKASHI Takahiro1-1/+1
scmi_to_linux_errno() is set to return an appropriate errno which corresponds to a given SCMI status code. But the current implementation always returns the same value. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2023-07-14clk: scmi: claim the dependency on CONFIG_CLKAKASHI Takahiro1-0/+1
Without CONFIG_CLK, the build fails with the following message: LD u-boot aarch64-none-linux-gnu-ld.bfd: drivers/firmware/scmi/scmi_agent-uclass.o: \ in function `scmi_bind_protocols': .../drivers/firmware/scmi/scmi_agent-uclass.c:79: undefined reference to \ `_u_boot_list_2_driver_2_scmi_clock' Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Sean Anderson <seanga2@gmail.com>
2023-07-14misc: npcm_host_intf: change initialization sequenceJim Liu1-3/+3
configuration should be done before release host wait Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2023-07-14pinctrl: nuvoton: fix reset reason error for poweronJim Liu1-0/+3
In non tip mode, BMC first power on with PORST+CORST. the gpio status will error. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2023-07-14misc: nuvoton: fix type errorJim Liu1-1/+1
Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2023-07-14video: Update stb_truetypeSimon Glass2-216/+2074
This was brought in in 2016 and a number of changes have been made since then. There does not seem to be much change in functionality, but it is a good idea to update from time to time. Bring in the latest version: 5736b15 ("re-add perlin noise again") Add a few necessary functions, with dummies in some cases. Update the tests as there are subtle changes in rendering, perhaps not for the better. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14video: Use enum with video_index_to_colour()Simon Glass1-1/+1
Use the provided enum with this function, so it is clearer what should be passed to it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14console: Allow measuring the bounding box of textSimon Glass2-2/+84
For laying out text accurately it is necessary to know the width and height of the text. Add a measure() method to the console API, so this can be supported. Add an implementation for truetype and a base implementation for the normal console. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14video: Allow temporary colour changesSimon Glass1-0/+20
It is sometimes necessary to highlight some text in a different colour. Add an easy way to do this and then restore the original console colours. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14fdt: Allow more general use of livetreeSimon Glass1-5/+21
At present livetree can only be used for the control FDT. It is useful to be able to use the ofnode API for other FDTs, e.g. those used by the upcoming configuration editor. We already have most of the support present, and tests can be marked with the UT_TESTF_OTHER_FDT flag to use another FDT as a special case. But with this change, the functionality becomes more generally available. Plumb in the require support. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14fdt: Clarify the fdt pre-relocation warningSimon Glass1-1/+1
Reword this so it is easier to understand. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14console: Correct truetype spacing errorSimon Glass1-1/+1
The putc_xy() method is supposed to return the amount of space used. The existing implementation erroneously adds the previous sub-pixel position to the returned value. This spaces out the characters very slightly more than it should. It is seldom noticeable but it does make accurate measurement of the text impossible. Fix this minor but long-standing bug. Fixes: a29b012037c ("video: Add a console driver that uses TrueType fonts") Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14video: Provide a way to clear part of the consoleSimon Glass2-69/+55
This is useful when the background colour must be written before text is updated, to avoid strange display artifacts. Add a function for this, using the existing code from the truetype console. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14video: Drop #ifdefs from console_truetypeSimon Glass1-56/+56
Use if() instead to reduce the number of build paths. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14dm: core: Avoid registering an inaccessible treeSimon Glass1-0/+9
At present there are various restrictions on the use of livetree: - It is only available once the tree is unflattened, i.e. after relocation - It is designed to be used with the control FDT - It can (in principle) be used with other FDTs, but only if they are unflattened first; this is not supported Add a few checks to make sure that any tree that is created is actually valid. Otherwise it can be confusing when nodes and properties cannot actually be accessed. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14gpio: Avoid using an invalid ofnodeSimon Glass1-1/+1
Devices do not necessarily have nodes attached to them, since they can be created from platdata. In SPL a devicetree may in fact not exist at all. Check the node before using it. This avoids failure when OF_CHECKS is enabled. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 5fc7cf8c8e2 ("gpio: add gpio-hog support") Reviewed-by: Heiko Schocher <hs@denx.de>
2023-07-14video: rockchip: dw_mipi_dsi: Fix GRF accessOndrej Jirman1-6/+10
Use proper register base and access method to access GRF registers. GRF registers start at a completely different base, and need special access method, that sets the change mask in the 16 MSBs. Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-14video: rockchip: dw_mipi_dsi: Correct check for lacking phy phandleOndrej Jirman1-2/+2
If phy is not defined in DT (eg. on rk3399), generic_phy_get_by_name will return -ENODATA. Handle that case correctly. Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-14video: rockchip: dw_mipi_dsi: Fix best_rate calculationOndrej Jirman1-2/+1
pllref_clk is unused after being retrieved. fin needs to be set to dsi->ref clock's rate for the following calculation to work. Otherwise fin is undefined, and calculation return bogus number based on undefined variable. Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-14video: rockchip: dw_mipi_dsi: Return 0 from dsi_phy_init on successOndrej Jirman1-1/+1
ret is undefined if external phy is not used resulting in bogus error being returned in that scenario. Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-14video: rockchip: dw_mipi_dsi: Fix error path checks in probe functionOndrej Jirman1-2/+5
Wrong return codes were checked in several places. Check the proper ones. Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-14video: rockchip: dw_mipi_dsi: Fix external phy existence checkOndrej Jirman1-3/+3
&priv->phy is always true. Compiler warns about this loudly. Use a propper check for phy device allocation. Without this fix using this driver with SoC that doesn't use external phy (eg. RK3399) doesn't work. Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-14video: dw_mipi_dsi: Fix hsync/vsync settingsOndrej Jirman1-2/+2
These must be read from timings->flags, like other DSI HOST drivers do. And they must not be inverted either. Low means low. Without this fix, panel drivers that set *SYNC_LOW produce corrupted output on screen (shifted horizontally and vertically by back porch distance). Signed-off-by: Ondrej Jirman <megi@xff.cz>
2023-07-14video: rockchip: vop: Fix whitespaceOndrej Jirman1-1/+1
Fix confusing use of indentation. Signed-off-by: Ondrej Jirman <megi@xff.cz> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-07-14video: backlight: pwm: avoid integer overflow in duty cycle calculationMatthias Schiffer1-1/+1
The intermediate value could overflow for large periods and levels. Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-07-14video: hx8394: Add panel driver for hannstar,hsd060bhw4Ondrej Jirman3-0/+246
The driver is for panels based on the Himax HX8394 controller, such as the HannStar HSD060BHW4 720x1440 TFT LCD panel that uses a MIPI-DSI interface. This panel is used in Pinephone Pro. Signed-off-by: Ondrej Jirman <megi@xff.cz> Cc: Anatolij Gustschin <agust@denx.de>
2023-07-14video: console: Fix default font selectionOndrej Jirman1-0/+6
Some callers expect to call this with NULL font name to select the default font (eg. boot/scene.c). Without handling the NULL condition U-Boot crashes instead of displaying a bootflow GUI menu. Signed-off-by: Ondrej Jirman <megi@xff.cz> Cc: Anatolij Gustschin <agust@denx.de>
2023-07-13Merge https://gitlab.denx.de/u-boot/custodians/u-boot-spiWIP/13Jul2023Tom Rini9-48/+792
- Add xtxtech spi-nor chip parts (Bruce Suen) - Add bcm63xx-hsspi driver fixes (William Zhang)
2023-07-13Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvellTom Rini1-4/+16
- mvebu: Thecus: Misc enhancement and cleanup (Tony) - mvebu: Add AC5X Allied Telesis x240 board support incl NAND controller enhancements for this SoC (Chris)
2023-07-13Merge tag 'u-boot-imx-20230713' of ↵Tom Rini14-147/+680
https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20230713 ------------------- Merge for 2023.10. CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/16888
2023-07-13clk: imx8mp: Update clocks based on kernel 6.4-RC4Adam Ford1-1/+2
There are some newer clocks added to the kernel recently, so to fix prepare for resycing the device trees, update the clock list. Since there are some minor changes to the USB clocks, update which USB clocks are enabled to match with the upstream kernel as well. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Fabio Estevam <festevam@denx.de> Tested-by: Tim Harvey <tharvey@gateworks.com> #imx8mp-venice-gw74xx
2023-07-13dm: adc: add iMX93 ADC supportLuca Ellero3-0/+299
This commit adds driver for iMX93 ADC. The driver is implemented using driver model and provides ADC uclass's methods for ADC single channel operations: - adc_start_channel() - adc_channel_data() - adc_stop() ADC features: - channels: 4 - resolution: 12-bit Signed-off-by: Luca Ellero <l.ellero@asem.it> Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
2023-07-13imx: imx8ulp: start the ELE RNG at bootPeng Fan1-0/+25
On the imx8ulp A1 SoC, the ELE RNG needs to be manually started. Signed-off-by: Clement Faure <clement.faure@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-07-13imx: misc: ele_mu: Update ELE MU driverYe Li1-5/+15
Extend the RX timeout value to 10s, because when authentication is failed the ELE needs long time (>2s for 28M image) to return the result. Print rx wait info per 1s. Also correct TX and RX status registers in debug. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-07-13imx: misc: ele_mu: Update MU TR registers countYe Li1-2/+2
According to SRM, the Sentinel MU has 8 TR and 4 RR registers. All of them are used for ELE message. So update TR count to 8 and fix a typo in receive msg Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-07-13imx: ele_api: add DEK Blob generationPeng Fan1-0/+44
- Add crc computation. - Add ele_generate_dek_blob API for encrypted boot support. Signed-off-by: Clement Faure <clement.faure@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-07-13imx: ele_api: support program secure fuse and return lifecyclePeng Fan1-1/+63
Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-07-13imx: use generic name ele(EdgeLockSecure Enclave)Peng Fan6-131/+131
Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave code including comment, folder and API name to ELE to align. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-07-13imx: scu_api: update to version 1.16 and add more APIsPeng Fan1-0/+78
Upgrade SCFW API to 1.16 Add more APIs: sc_misc_get_button_status sc_pm_reboot sc_seco_v2x_build_info Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-07-13imx: mach: correct SCU API usagePeng Fan1-5/+4
The return value is int type, not sc_err_t(u8), correct the usage. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-07-13mtd: spi-nor: Add support for w25q256jwmVenkatesh Yadav Abbarapu1-0/+5
Add support for Winbond 256M-bit flash w25q256jwm. Performed basic erase/write/readback operations on ZynqMP zc1751+dc1 board. Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2023-07-13spi: npcm_pspi: use ACTIVE_LOW flag for cs gpio and set default max_hzJim Liu1-4/+8
If cs gpio is requested with ACTIVE_HIGH flag, it will be pulled low(i.e. active). This is not what we expected. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2023-07-13mtd: spi-nor-ids: add xtxtech part#Bruce Suen1-1/+35
add following XTX part numbers to the list: xt25f08: 3V QSPI, 8Mbit xt25f16: 3V QSPI, 16Mbit xt25f32: 3V QSPI, 32Mbit xt25f64: 3V QSPI, 64Mbit xt25f128: 3V QSPI, 128Mbit xt25f256: 3V QSPI, 256Mbit xt25q08: 1.8V QSPI, 8Mbit xt25q16: 1.8V QSPI, 16Mbit xt25q32: 1.8V QSPI, 32Mbit xt25q64: 1.8V QSPI, 64Mbit xt25q128: 1.8V QSPI, 128Mbit xt25q256: 1.8V QSPI, 256Mbit xt25q512: 1.8V QSPI, 512Mbit xt25q01g: 1.8V QSPI, 1Gbit xt25w512: wide voltage, QSPI, 512Mbit xt25w01g: wide voltage, QSPI, 1Gbit remove xt25f128b and add xt25f128,because xt25f128b andxt25f128f share same jdec id,we use xt25f128 instead. Signed-off-by: Bruce Suen <bruce_suen@163.com> [jagan: re-edited the entire patch] Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2023-07-13mtd: spi-nor-ids: change full company name of XTXBruce Suen1-1/+1
XTX changed full company name from "XTX Technology (Shenzhen) Limited to "XTX Technology Limited" since 2020,So remove "(Shenzhen)". Signed-off-by: Bruce Suen <bruce_suen@163.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2023-07-13spi: soft_spi: Support the recommended soft spi propertiesFabio Estevam1-4/+17
According to Documentation/devicetree/bindings/spi/spi-gpio.yaml from Linux, the recommended spio-gpio properties are: sck-gpios, miso-gpios and mosi-gpios. gpio-sck, gpio-mosi and gpio-miso are considered deprecated. Currently, U-Boot only supports the deprecated properties. Allow the soft_spi driver to support both the new and old properties. Signed-off-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2023-07-13spi: synquacer: remove SPI_TX_BYTE handlingMasahisa Kojima1-5/+3
Current code expects that SPI_TX_BYTE is single bit mode but it is wrong. It indicates byte program mode, not single bit mode. If SPI_TX_DUAL, SPI_TX_QUAD and SPI_TX_OCTAL bits are not set, the default transfer bus width is single bit. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>