1. 30 Aug, 2021 21 commits
  2. 27 Aug, 2021 1 commit
    • Tom Rini's avatar
      Merge tag 'xilinx-for-v2021.10-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze · b9cb74a5
      Tom Rini authored
      Xilinx changes for v2021.10-rc3
      - Print information about cpu via soc drivers and enable DISPLAY_CPUINFO
      - Wire infrastructure for DTB_RESELECT and MULTI_DTB_FIT
      - Wire single QSPI
      - Use power-source instead of io-standard properties
      - Enable nor on zc770-xm012
      - Change handling around multi_boot()
      - Setup offset for u-boot.itb in spi
      - Generate run time dfu_alt_info for capsule update
      - Use explicit values for enums (zynqmp_firmware.h)
      - Enable RTC/SHA1/BUTTON/BUTTON_GPIO command
      - Disable WDT driver by default
      - Bind usb/scsi via preboot because of EFI
      - DT updates/fixes
      - Add soc driver
      - Fix SPL SPI boot mode
      - Add soc driver
      - Update tap delay programming for zynq_sdhci driver
      - Fix RTC uclass handling in date command
      - Update pwm help message
      - Update reset help message
      - Fix wwdt compilation
      - Deal with seq alias in rtc uclass
      - Add zynqmp RTC driver
      - Add kernel-doc for fdt_fixup_memory_banks()
  3. 26 Aug, 2021 18 commits
    • Michal Simek's avatar
      xilinx: zynqmp: Enable stack relocation to DDR · 229cb5c6
      Michal Simek authored
      There is no space in OCM for SPL stack because the space in OCM is occupied
      by TF-A. That's why move relocate stack to DDR to 0x18000000 address
      and also enable SPL_SIZE_LIMIT not to be more then 0xfffea000 which is
      default address for TFA.
      It is good to summarize current DDR usage in SPL flow.
      0-0x80000 is used for BSS
      0x100000 is used for DTB passing address
      0x17fffe70 - CONFIG_SPL_STACK_R_ADDR - is used for GD
      0x18000000 is used for SPL stack
      0x20000000-0x21000000 is used for SPL malloc area
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
    • Michal Simek's avatar
      xilinx: zynqmp: Update descriptions for u-boot.its · 060fa0e1
      Michal Simek authored
      Use TF-A instead of ATF in description. And update generic description with
      removing ATF because also configurations without it are supported.
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
    • Michal Simek's avatar
      xilinx: common: Enabling generic function for DT reselection · 52ff1626
      Michal Simek authored
      U-Boot support board detection at run time and based on it change DT.
      This feature is implemented for SOM Kria platforms which contain two
      eeproms which contain information about SOM module and CC (Carrier card).
      Full U-Boot starts with minimal DT file defined by
      CONFIG_DEFAULT_DEVICE_TREE which is available in multi DTB fit image.
      It is using default setup of board_name variable initializaed to
      DEVICE_TREE which corresponds to CONFIG_DEFAULT_DEVICE_TREE option.
      When DTB_RESELECT is enabled board_detection() is called. Keep it your mind
      that this code is called before relocation. board_detection() is calling
      xilinx_read_eeprom() which fills board_info (xilinx_board_description)
      structure which are parsed in board_name_decode().
      Based on DT configuration and amount of nvmemX aliases name of the board is
      composed by concatenating CONFIG_SYS_BOARD "-" <board_name> "-rev"
      <board_revision> "-" <cc_name> "-rev" <cc_revision>.
      If CC is not present or more are available it keeps going.
      When board name is composed and returned from board_name_decode() it is
      assigned to board_name variable which is used by
      board_fit_config_name_match() which is called via fdtdec_setup() when it
      goes over config options in multi dtb FIT image.
      From practical point of view multi DTB image is key point here which has to
      contain configs for detected combinations. Unfortunately as of now they
      have to be full DTBs and DTBOs are not supported.
      That's why configuration like:
      config_X {
      	description = "zynqmp-board-cc";
      	fdt = "board", "cc";
      needs to be squashed together with:
      fdtoverlay -o zynqmp-board-cc -i arch/arm/dts/zynqmp-board.dtb \
      and only one dtb is in fit:
      config_X {
      	description = "zynqmp-board-cc";
      	fdt = "board-cc";
      For creating multi DTBs fit image use mkimage -E, e.g.:
      mkimage -E -f all.its all.dtb
      When DTB_RESELECT is enabled xilinx_read_eeprom() is called before
      relocation and it uses calloc for getting a buffer. Because this is dynamic
      memory it is not relocated that's why xilinx_read_eeprom() is called again
      as the part of board_init(). This second read with calloc buffer placed in
      proper position board_late_init_xilinx() can setup u-boot variables as
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
    • Michal Simek's avatar
      xilinx: zynqmp: Generate different u-boot.itb for MULTI_DTB_FIT · e6921361
      Michal Simek authored
      When MULTI_DTB_FIT is enabled fit-dtb.blob fit image is created which
      contain all DTBs listed by CONFIG_OF_LIST. And with DTB_RELESELECT there is
      a need to handle it as one file with DTBs in it not as separate DTBs in
      That's why extend mkimage_fit_atf.sh to generate u-boot.itb correctly.
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
    • Michal Simek's avatar
      arm64: dts: Make sure that all DTBs are 64bit aligned · f28a22d5
      Michal Simek authored
      Start of DTB should be 64bit aligned that's why also make sure that end is
      also 64bit aligned. It is not required but it is nice thing to do.
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
    • Michal Simek's avatar
      Makefile: Align fit-dtb.blob and u-boot.itb by 64bits · 570c4636
      Michal Simek authored
      Enabling MULTI_DTB_FIT and DTB_RESELECT can end up with multi DTBs in FIT
      image placed and aligned only by 32bits (4bytes). Based on device tree
      "Specifically, the memory reservation block shall be aligned to an 8-byte boundary
      and the structure block to a 4-byte boundary."
      is 64bit (8bytes) alignment required. That's why make sure that
      fit-dtb.blob and u-boot.itb as our primary target images for Xilinx ZynqMP
      are all 64bit aligned.
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      Reviewed-by: André Przywara's avatarAndre Przywara <andre.przywara@arm.com>
    • Michal Simek's avatar
      xilinx: zynqmp: Check that DT is 64bit aligned · 5bd5ee02
      Michal Simek authored
      DT needs to be 64bit aligned. If it is not fdt64_to_cpu will fail when try
      to read information about reserved memory. The system ends in exception
      without any clue what's going it. That's why detect not aligned DT and
      panic to show where the issue is coming from.
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
    • Michal Simek's avatar
      xilinx: Add support for generic board detection · 88232532
      Michal Simek authored
      Add support for changing DT at run time. It is done via board_detection()
      which returns platform_id and platform_version which can be used via
      board_name_decode() to compose board_local_name string which corresponds
      with DT which is should be used.
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
    • Michal Simek's avatar
      xilinx: common: Free allocated structure · b262863b
      Michal Simek authored
      There is no need to keep fru_content around. Free this space.
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
    • Michal Simek's avatar
      xilinx: common: Change board_info[] handling · d9c93c9e
      Michal Simek authored
      Origin code was allocating only pointers to struct xilinx_board_description
      and there was separate allocation for structure self and freeing in case of
      The code is directly allocating space for all structures by one calloc to
      simlify logic.
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
    • Michal Simek's avatar
      xilinx: Use variable for passing board_name · 57f71032
      Michal Simek authored
      Use variable which points to DEVICE_TREE by default. The reason for this
      change is to enable DTB_RESELECT and MULTI_DTB_FIT where board detection
      can be used for change DTB at run time. That's why there must be reference
      in board_fit_config_name_match() via variable instead of hardcoding it
      which is sufficient for that use case.
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
    • Michal Simek's avatar
      xilinx: fru: Replace spaces with \0 in detected name · 530560b6
      Michal Simek authored
      FRU spec expected \0 for unused symbols but unfortunately a lot of boards
      are using spaces instead of \0. That's why after saving it to desc->name
      name is checked again and all spaces are converted to \0. This will ensure
      that names can be used for string manipulations like concatenation.
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
    • Michal Simek's avatar
      xilinx: zynqmp: Enable gpio-key/button driver · edd53065
      Michal Simek authored
      Enable button uclass and also gpio-key driver by default.
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
    • Michal Simek's avatar
      arm64: zynqmp: Enable sha1sum command · 57bcae88
      Michal Simek authored
      Enable it for TPM usage.
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
    • Ashok Reddy Soma's avatar
      watchdog: versal: Include header file needed for dev_ functions · e32d8916
      Ashok Reddy Soma authored
      dev_dbg, dev_err and dev_warn seems to be moved to different header file.
      Include dm/device_compat.h file to compile properly.
      Signed-off-by: default avatarAshok Reddy Soma <ashok.reddy.soma@xilinx.com>
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
    • Michal Simek's avatar
      xilinx: zynqmp: Add debug messages for boot mode · afb08a86
      Michal Simek authored
      Add debug messages to see HW boot mode and also alternative boot mode in
      logs directly.
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
    • Michal Simek's avatar
      cmd: boot: Update reset usage message · aa5fb3de
      Michal Simek authored
      The commit 573a3811
       ("sysreset: psci: support system reset in a generic
      way with PSCI") has added support for warm reset via PSCI but this hasn't
      been reflected in usage message and user has to look at the code how to run
      it. That's why update usage text to make this clear.
      Here is full help with updated usage:
      ZynqMP> help reset
      reset - Perform RESET of the CPU
      reset - cold boot without level specifier
      reset -w - warm reset if implemented
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      Reviewed-by: default avatarIgor Opaniuk <igor.opaniuk@foundries.io>
    • Michal Simek's avatar
      cmd: pwm: Remove additional pwm description · a84d3b6c
      Michal Simek authored
      The first name is taken from command name that's why shouldn't be listed in
      help. And commands shouldn't be listed with <> which means value but value
      itself is command name.
      Also add description for commands to make it clear what it does.
      pwm pwm <invert> <pwm_dev_num> <channel> <polarity>
      pwm <config> <pwm_dev_num> <channel> <period_ns> <duty_ns>
      pwm invert <pwm_dev_num> <channel> <polarity> - invert polarity
      pwm config <pwm_dev_num> <channel> <period_ns> <duty_ns> - config PWM
      pwm enable <pwm_dev_num> <channel> - enable PWM output
      pwm disable <pwm_dev_num> <channel> - disable PWM output
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>