summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'dm-pull-29apr21' of ↵WIP/29Apr2021Tom Rini2021-04-2930-277/+472
|\ | | | | | | | | | | | | | | | | https://source.denx.de/u-boot/custodians/u-boot-dm buildman environment fix binman FMAP improvements minor test improvements and fixes minor dm improvements
| * tpm: missing event typesHeinrich Schuchardt2021-04-291-8/+16
| | | | | | | | | | | | | | Add a reference for the TPM event types and provide missing constants. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
| * test: dm: add test item for ofnode_get_addr() and ofnode_get_size()Chen Guanqiao2021-04-291-0/+31
| | | | | | | | | | | | | | | | | | | | | | Add test item for getting address and size functions Test the following function: - ofnode_get_addr() - ofnode_get_size() Signed-off-by: Chen Guanqiao <chenguanqiao@kuaishou.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * dm: core: Add size operations on device tree referencesChen Guanqiao2021-04-293-2/+24
| | | | | | | | | | | | | | | | | | | | Add functions to add size of addresses in the device tree using ofnode references. If the size is not set, return FDT_SIZE_T_NONE. Signed-off-by: Chen Guanqiao <chenguanqiao@kuaishou.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * buildman: Use bytes for the environmentSimon Glass2021-04-293-11/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | At present we sometimes see problems in gitlab where the environment has 0x80 characters or sequences which are not valid UTF-8. Avoid this by using bytes for the environment, both internal to buildman and when writing out the 'env' file. Add a test to make sure this works as expected. Reported-by: Marek Vasut <marex@denx.de> Fixes: e5fc79ea718 ("buildman: Write the environment out to an 'env' file") Signed-off-by: Simon Glass <sjg@chromium.org>
| * buildman: Handle exceptions in threads gracefullySimon Glass2021-04-294-11/+56
| | | | | | | | | | | | | | | | | | | | | | There have been at least a few cases where an exception has occurred in a thread and resulted in buildman hanging: running out of disk space and getting a unicode error. Handle these by collecting a list of exceptions, printing them out and reporting failure if any are found. Add a test for this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * buildman: Use common code to send an resultSimon Glass2021-04-291-8/+13
| | | | | | | | | | | | | | At present the code to report a build result is duplicated. Put it in a common function to avoid this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * buildman: Tidy up a few commentsSimon Glass2021-04-293-5/+20
| | | | | | | | | | | | Add some function comments which are missing, or missing arguments. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Fix uninitialized return value from dm_scan_fdt_nodeSean Anderson2021-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | If there are no nodes or if all nodes are disabled, this function would return err without setting it first. Fix this by initializing err to zero. Fixes: 94f7afdf7e ("dm: core: Ignore disabled devices when binding") Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * dm: core: Add address translation in fdt_get_resourcePatrick Delaunay2021-04-296-24/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Today of_address_to_resource() is called only in ofnode_read_resource() for livetree support and fdt_get_resource() is called when livetree is not supported. The fdt_get_resource() doesn't do the address translation so when it is required, but the address translation is done by ofnode_read_resource() caller, for example in drivers/firmware/scmi/smt.c::scmi_dt_get_smt_buffer() { ... ret = ofnode_read_resource(args.node, 0, &resource); if (ret) return ret; faddr = cpu_to_fdt32(resource.start); paddr = ofnode_translate_address(args.node, &faddr); ... The both behavior should be aligned and the address translation must be called in fdt_get_resource() and removed for each caller. Fixes: a44810123f9e ("dm: core: Add dev_read_resource() to read device resources") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
| * binman: Support adding sections to FMAPsSimon Glass2021-04-294-9/+50
| | | | | | | | | | | | | | When used with hierarchical images, use the Chromium OS convention of adding a section before all the subentries it contains. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Tweak implementation of fmapSimon Glass2021-04-291-31/+38
| | | | | | | | | | | | | | | | | | Use an interator in two of the fmap tests so it is easier to add new items. Also check the name first since that is the first indication that something is wrong. Use a variable for the expected size of the fmap to avoid repeating the code. Signed-off-by: Simon Glass <sjg@chromium.org>
| * patman: Parse checkpatch by message instead of by lineEvan Benn2021-04-292-92/+144
| | | | | | | | | | | | | | | | | | | | | | | | Parse each empty-line-delimited message separately. This saves having to deal with all the different line content styles, we only care about the header ERROR | WARNING | NOTE... Also make checkpatch print line information for a uboot specific warning. Signed-off-by: Evan Benn <evanbenn@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
| * patman: Assume we always have pygit2 for testsTom Rini2021-04-291-17/+2
| | | | | | | | | | | | | | | | Given that we have tests that require pygit2 and it can be installed like any other python module, fail much more loudly if it is missing. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
| * tests: patman: Add requests to the module listTom Rini2021-04-291-0/+1
| | | | | | | | | | | | | | The patman tests require the requests module, add it. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
| * Azure/GitLab: Ensure we use requirements.txt for testsuitesTom Rini2021-04-292-2/+2
| | | | | | | | | | | | | | | | | | Given that test/py/requirements.txt has all required test modules, make use of that rather than a manual pip install list before running our assorted tool testsuites. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * test: Use positive conditional in test_matches()Andy Shevchenko2021-04-291-6/+6
| | | | | | | | | | | | | | | | | | | | It is easier to read the positive conditional. While at it, convert hard coded length of "_test_" to strlen("_test_") which will be converted to a constant bu optimizing compiler. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * test: Allow simple glob pattern in the test nameAndy Shevchenko2021-04-291-2/+9
| | | | | | | | | | | | | | | | | | When run `ut dm [test name]` allow to use simple pattern to run all tests started with given prefix. For example, to run all ACPI test cases: ut dm acpi* Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * dtoc: Correct dtoc output when testingSimon Glass2021-04-292-53/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present each invocation of run_steps() updates OUTPUT_FILES_COMMON, since it does not make a copy of the dict. This is fine for a single invocation, but for tests, run_steps() is invoked many times. As a result it may include unwanted items from the previous run, if it happens that a test runs twice on the same CPU. The problem has not been noticied previously, as there are few enough tests and enough CPUs that is is rare for the 'wrong' combination of tests to run together. Fix this by making a copy of the dict, before updating it. Update the tests to suit, taking account of the files that are no-longer generated. With this fix, we no-longer generate files which are not needed for a particular state of OF_PLATDATA_INST, so the check_instantiate() function is not needed anymore. It has become dead code and so fails the code-coverage test (dtoc -T). Remove it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Correct testSplNoDtb() and Tpl alsoSimon Glass2021-04-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | These two tests require an ELF image so that symbol information can be written into the SPL/TPL binary. At present they rely on other tests having set it up first, but every test must run independently. This can cause occasional errors in CI. Fix this by setting up the required files, as other tests do. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* | Merge tag 'xilinx-for-v2021.07-rc2' of ↵Tom Rini2021-04-2919-95/+189
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://source.denx.de/u-boot/custodians/u-boot-microblaze Xilinx changes for v2021.07-rc2 xilinx: - Enable saving variables based on bootmode - Cleanup usb dfu setup and wire it up with usb bootmode - Fix bootscript address logic - Remove GD references (spi, Versal) - Enable capsule update clk: - Small Kconfig fix net: - Fix gmii2rgmii bridge binding usb: - Propagate error (dfu gadget)
| * | spi: zynqmp: Remove gd referenceMichal Simek2021-04-291-3/+0
| | | | | | | | | | | | | | | | | | gd is not used in this file that's why doesn't make sense to declare it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | net: phy: xilinx: Break while loop over ethernet phyMichal Simek2021-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit 6c993815bbea ("net: phy: xilinx: Be compatible with live OF tree") change driver behavior to while loop which wasn't correct because the driver was looping over again and again. The reason was that ofnode_valid() is taking 0 as correct value. Fix it by changing while loop to ofnode_for_each_subnode() which is only loop over available nodes. Fixes: 6c993815bbea ("net: phy: xilinx: Be compatible with live OF tree") Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | arm64: zynqmp: Enable capsule updateMichal Simek2021-04-262-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable EFI capsule update features to be enabled by default also with all dfu valid options for ZynqMP. This feature was tested on Xilinx ZynqMP zcu104 board with defining dfu_alt_info="mmc 0:1=boot.bin fat 0 1;u-boot.itb fat 0 1" and dfu_alt_info="sf 0:0=boot.bin raw 0 0x50000;u-boot.itb raw 0x80000 0x500000". There is a need to increase malloc size for getting dfu mmc to work. Signed-off-by: Michal Simek <michal.simek@xilinx.com> CC: Sughosh Ganu <sughosh.ganu@linaro.org> CC: Ilias Apalodimas <ilias.apalodimas@linaro.org> CC: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | arm64: versal: Remove gd referenceMichal Simek2021-04-231-3/+0
| | | | | | | | | | | | | | | | | | gd is not used in this file that's why doesn't make sense to declare it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | clk: Fix typo in Zynq Kconfig symbol descriptionMichal Simek2021-04-231-1/+1
| | | | | | | | | | | | | | | | | | Trivial typo fix. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | xilinx: Enable GUID partitions and EFI variable commandsMichal Simek2021-04-232-0/+5
| | | | | | | | | | | | | | | | | | | | | For work with EFI it is good to have GUID partitions enabled and also option to work with UEFI variables. That's why enable both. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | xilinx: common: Fix boot script addressT Karthik Reddy2021-04-231-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently u-boot supports addresses upto 39-bits only. If anybody wants to use addresses of more than 39-bits in Linux they will have a separate memory node in DT. In such cases they will have multiple memory nodes. Currently u-boot selects and runs on lower memory bank region. But bootscript is being loaded on dram bank 0, where dram bank 0 will point to 1st memory node in DT. If first memory node is mentioned as higher ddr(>39-bits address) then u-boot cannot load the bootscript. So fix this issue by setting bootscript address within the lower memory bank region. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | xilinx: Enable DFU_TIMEOUT configT Karthik Reddy2021-04-232-0/+2
| | | | | | | | | | | | | | | | | | | | | Enable CONFIG_DFU_TIMEOUT to set timeout waiting for dfu command. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | xilinx: zynq: Add usb dfu/thor distro boot supportT Karthik Reddy2021-04-233-33/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for usb dfu & thor to distro boot on zynq platform. Add 60s timeout of dfu-utils to start transaction. Remove DFU_ALT_INFO_RAM as we use bootcmd_usb_dfu instead of dfu_ram. Remove DFU_ALT_INFO_MMC as part of distro boot cleanup. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | xilinx: versal: Add usb dfu/thor distro boot supportT Karthik Reddy2021-04-232-26/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change "dfu_usb" to "usb_dfu" for better representation and change required macros. Add 60s timeout of dfu-utils to start transaction. Add support for usb thor to distro boot. Remove DFU_ALT_INFO_RAM as we use bootcmd_usb_dfu instead of dfu_ram. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | xilinx: zynqmp: Remove dfu_ram_info setupMichal Simek2021-04-231-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | The dfu ram info is wired in connection to Linux kernel and certain setup. We should change this to be more generic as others command. That's why using boot via script is the way to go. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | xilinx: zynqmp: Add usb dfu/thor distro boot supportT Karthik Reddy2021-04-233-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In usb boot mode distro boot should select usb device as primary boot device instead of usb host. So make usb dfu as primary boot device. But do not list it in boot_targets as fallback option because it is not classic mode for booting. Using 60s timeout by default should be enough time for dfu-utils to start transaction. In case none needs this please change timeout value in the command or disable CONFIG_DFU_TIMEOUT. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | cmd: dfu: Propagate error if dfu gadget failsMichal Simek2021-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | On systems without usb gadget dfu core fails which was reported by error but command itself returns pass which breaks any usage in a script. That's why propagate error from run_usb_dnl_gadget(). Fixes: 16297cfb2a20 ("usb: new board-specific USB init interface") Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | xilinx: Enable redundant variable handlingMichal Simek2021-04-234-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Enable this feature by default to be able to work with env import/export commands which are done in this slightly changed variable format (There is addtional flag fields in variable file which is changing CRC calculation). Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | xilinx: versal: Add support for saving env based on bootmodeAshok Reddy Soma2021-04-233-1/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable saving variables to MMC(FAT) and SPI based on primary bootmode. If bootmode is JTAG, dont save env anywhere(NOWHERE). Enable ENV_FAT_DEVICE_AND_PART="0:auto" for Versal platforms as well. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | xilinx: zynq: Add support for saving env based on bootmodeAshok Reddy Soma2021-04-232-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable saving variables to MMC(FAT), NAND, SPI based on primary bootmode. If bootmode is JTAG, dont save env anywhere(NOWHERE). Since most of the flashes on zynq evaluation boards are 16MB in size, set default ENV_OFFSET to 15MB(0xE00000). Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | env: Setup default value for ENV_OFFSET_REDUNDMichal Simek2021-04-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This variable is used for pointing to location where redundant variables are located. There is no default value. And it doesn't need to be specified which is showing as warning when savedefconfig is called. make xilinx_zynqmp_virt_defconfig # # configuration written to .config # make savedefconfig scripts/kconfig/conf --savedefconfig=defconfig Kconfig .config:199:warning: symbol value '' invalid for ENV_OFFSET_REDUND Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | | Merge https://source.denx.de/u-boot/custodians/u-boot-cfi-flashTom Rini2021-04-291-5/+5
|\ \ \ | | | | | | | | | | | | - mtd: cfi: Fix PPB lock status readout (Marek)
| * | | mtd: cfi: Fix PPB lock status readoutMarek Vasut2021-04-281-5/+5
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to S26KL512S datasheet [1] and S29GL01GS datasheet [2], the procedure to read out PPB lock bits is to send the PPB Entry, PPB Read, Reset/ASO Exit. Currently, the code does send incorrect PPB Entry, PPB Read and Reset/ASO Exit is completely missing. The PPB Entry sent is implemented by sending flash_unlock_seq() and flash_write_cmd(..., FLASH_CMD_READ_ID). This translates to sequence 0x555:0xaa, 0x2aa:0x55, 0x555:0x90=FLASH_CMD_READ_ID. However, both [1] and [2] specify the last byte of PPB Entry as 0xc0=AMD_CMD_SET_PPB_ENTRY instead of 0x90=FLASH_CMD_READ_ID, that is 0x555:0xaa, 0x2aa:0x55, 0x555:0xc0=AMD_CMD_SET_PPB_ENTRY. Since this does make sense, this patch fixes it and thus also aligns the code in flash_get_size() with flash_real_protect(). The PPB Read returns 00h in case of Protected state and 01h in case of Unprotected state, according to [1] Note 83 and [2] Note 17, so invert the result. Moreover, align the arguments with similar code in flash_real_protect(). Finally, Reset/ASO Exit command should be executed to exit the PPB mode, so add the missing reset. [1] https://www.cypress.com/file/213346/download Document Number: 001-99198 Rev. *M Table 40. Command Definitions, Nonvolatile Sector Protection Command Set Definitions [2] https://www.cypress.com/file/177976/download Document Number: 001-98285 Rev. *R Table 7.1 Command Definitions, Nonvolatile Sector Protection Command Set Definitions Fixes: 03deff433e ("cfi_flash: Read PPB sector protection from device for AMD/Spansion chips") Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Stefan Roese <sr@denx.de> Reviewed-by: Stefan Roese <sr@denx.de>
* | | Merge https://source.denx.de/u-boot/custodians/u-boot-marvellTom Rini2021-04-2953-2756/+2081
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add base support for Marvell OcteonTX2 CN9130 CRB (mostly done by Kostya) - Sync Armada 3k/7k/8k SERDES code with Marvell version (misc Marvell authors) - pci-aardvark: Fix processing PIO transfers (Pali)
| * | | arm: a37xx: pci: Fix processing PIO transfersPali Rohár2021-04-291-14/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trying to clear PIO_START register when it is non-zero (which indicates that previous PIO transfer has not finished yet) causes an External Abort with SError 0xbf000002. This bug is currently worked around in TF-A by handling External Aborts in EL3 and ignoring this particular SError. This workaround was also discussed at: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=3c7dcdac5c50 https://lore.kernel.org/linux-pci/20190316161243.29517-1-repk@triplefau.lt/ https://lore.kernel.org/linux-pci/971be151d24312cc533989a64bd454b4@www.loen.fr/ https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/1541 Implement a proper fix to prevent this External Abort. As it is not possible to cancel a pending PIO transfer, simply do not start a new one if previous has not finished yet. In this case return an error to the caller. In most cases this SError happens when there is no PCIe card connected or when PCIe link is down. The reason is that in these cases a PIO transfer takes about 1.44 seconds. For this reason we also increase the wait timeout in pcie_advk_wait_pio() to 1.5 seconds. If PIO read transfer for PCI_VENDOR_ID register times out, or if it isn't possible to read it yet because previous transfer is not finished, return Completion Retry Status value instead of failing, to give the caller a chance to send a new read request. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
| * | | doc: dt-bindings: add Marvell comphy bindingIgal Liberman2021-04-291-0/+68
| | | | | | | | | | | | | | | | | | | | Change-Id: I29094afb646744afe78ad09bb7479894d1a65e96 Signed-off-by: Igal Liberman <igall@marvell.com>
| * | | phy: marvell: utmi: update utmi config which fixes usb2.0 instabilityGrzegorz Jaszczyk2021-04-292-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add additional step which enables the Impedance and PLL calibration. - Enable old squelch detector instead of the new analog squelch detector circuit and update host disconnect threshold value. - Update LS TX driver strength coarse and fine adjustment values. Change-Id: Ifa0a585bfb5ecab0bfa033eed6874ff98b16a7df Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
| * | | phy: marvell: add support for SFI1Igal Liberman2021-04-2910-22/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In CP115, comphy4 can be configured into SFI port1 (in addition to SFI0). This patch adds the option described above. In addition, rename all existing SFI/XFI references: COMPHY_TYPE_SFI --> COMPHY_TYPE_SFI0 No functional change for exsiting configuration. Change-Id: If9176222e0080424ba67347fe4d320215b1ba0c0 Signed-off-by: Igal Liberman <igall@marvell.com> Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
| * | | phy: marvell: fix pll initialization for second utmi portGrzegorz Jaszczyk2021-04-293-28/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to Design Reference Specification the PHY PLL and Calibration register from PHY0 are shared for multi-port PHY. PLL control registers inside other PHY channels are not used. This commit reworks utmi device tree nodes in a way that common PHY PLL registers are moved to main utmi node. Accordingly both child nodes utmi-unit range is reduced and register offsets in utmi_phy.h are updated to this change. This fixes issues in scenarios when only utmi port1 was in use, which resulted with lack of correct pll initialization. Change-Id: Icc520dfa719f43a09493ab31f671efbe88872097 Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
| * | | phy: marvell: allow to initialize up to 6 USB portsGrzegorz Jaszczyk2021-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New products can contain up to 6 usb ports, therefore allow to initialize all relevant UTMI PHYs. Change-Id: I28c36e59fa0e3e338bb3ee0cee2240b923f39785 Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com> Reviewed-by: Kostya Porotchkin <Kostya.Porotchkin@cavium.com>
| * | | phy: marvell: cp110: mark u-boot power-off callsIgal Liberman2021-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It helps ATF to determine who called power off function (U-boot/Linux) and act accordingly Change-Id: Icfc5cbfdba64754496812154272b28c0ff639f0f Signed-off-by: Igal Liberman <igall@marvell.com> Reviewed-by: Grzegorz Jaszczyk <jaz@semihalf.com>
| * | | phy: marvell: fix handling of unconnected comphyChristine Gharzuzi2021-04-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - the default value of comphy pipe selector is set to PCIe (x4) in case of unconnected comphy the default value remains 0x4 which may lead to several issues with comphy initialization. - this patch adds SMC call that powers off the comphy lane in case of unconnected comphy. Change-Id: I196b2916518dd8df3b159ffa85e2989b8e483087 Signed-off-by: Christine Gharzuzi <chrisg@marvell.com> Signed-off-by: Igal Liberman <igall@marvell.com> Reviewed-by: Grzegorz Jaszczyk <jaz@semihalf.com>
| * | | phy: marvell: pass sgmii id to firmwareIgal Liberman2021-04-291-22/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we don't pass id for SGMII 0/1. A bug in comphy selector configuration was found (in comphy firmware), after fixing it, SGMII0/1 have different configuration, so we need to pass the ID the firmware. Change-Id: Idcff4029cc9cf018278e493221b64b33574e0d38 Signed-off-by: Igal Liberman <igall@marvell.com> Reviewed-by: Grzegorz Jaszczyk <jaz@semihalf.com>