Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue setting bootmode for imx95evk #15

Open
eramox opened this issue Jan 17, 2024 · 1 comment
Open

Issue setting bootmode for imx95evk #15

eramox opened this issue Jan 17, 2024 · 1 comment

Comments

@eramox
Copy link

eramox commented Jan 17, 2024

I am working with an imx95 (board IMX95LPD5BB-19 REV A) and I have issues using bcu to change the boot mode of the board.

Note: other functionalities of bcu seems ok: monitoring, eeprom....
Note2: jira ref: NXP_JIRA SRFTF-872

Test

wget NXP_NEXUS imx-boot-imx95-19x19-lpddr5-evk-sd.bin-flash_all

sudo /opt/Programs/UUU/uuu_1.5.141/uuu -b spl imx-boot-imx95-19x19-lpddr5-evk-sd.bin-flash_all

 $ /opt/Programs/BCU/bcu_1.1.75/bcu -h
version bcu_1.1.75-0-ge3f9a83
Usage:
bcu command [-options]

list of available commands:
        reset  [BOOTMODE_NAME] [-hold=] [-board=/-auto] [-id=]      reset the board, and then boot from BOOTMODE_NAME
               [-boothex=] [-bootbin=]                              or the boot mode value set by [-boothex=] [-bootbin=]
        onoff  [-hold=] [-board=/-auto] [-id=]                      press the ON/OFF button once for -hold= time(ms)
        init   [BOOTMODE_NAME] [-board=/-auto] [-id=]               enable the remote control with a boot mode
        deinit [BOOTMODE_NAME] [-board=/-auto] [-id=]               disable the remote control

        monitor [-board=/-auto] [-id=]                              monitor power consumption
                [-dump/-dump=] [-nodisplay] [-pmt] [-stats]
                [-hz=] [-rms]
                [-hwfilter] [-unipolar]
                [-temp]

        server  [-board=/-auto] [-id=]                              monitor power consumption
                [-hwfilter] [-unipolar]

        eeprom  [-w] [-r] [-erase]                                  EEPROM read and program
                [-wsn=] [-brev=] [-srev=]

        temp    [-board=/-auto] [-id=]                              Get temperature value
        get_level [GPIO_NAME] [-board=/-auto] [-id=]                get level state of pin GPIO_NAME
        set_gpio [GPIO_NAME] [1/0] [-board=/-auto] [-id=]           set pin GPIO_NAME to be high(1) or low(0)
        set_boot_mode [BOOTMODE_NAME] [-board=/-auto] [-id=]        set BOOTMODE_NAME as boot mode
                      [-boothex=] [-bootbin=]
        get_boot_mode [-board=/-auto] [-id=]                        read the boot mode set by BCU before

        lsftdi                                                      list all boards connected by ftdi device
        lsboard                                                     list all supported board models
        lsbootmode [-board=/-auto]                                  show a list of available BOOTMODE_NAME of a board
        lsgpio     [-board=/-auto]                                  show a list of available GPIO_NAME of a board

        upgrade    [-doc] [-f] [-pre]                               get the latest BCU release
        uuu        [-doc]                                           download the latest UUU

        version                                                     print version number
        -h,  help                                                   show command details
        -cp, conf_path                                              show config file path

 $ sudo /opt/Programs/UUU/uuu_1.5.141/uuu -lsusb
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.5.141-0-gde317f5

Connected Known USB Devices
        Path     Chip    Pro     Vid     Pid     BcdVersion
        ==================================================
        1:101    MX95    SDPS:   0x1FC9 0x015D   0x0001

		
 $ /opt/Programs/BCU/bcu_1.1.75/bcu lsftdi
version bcu_1.1.75-0-ge3f9a83
number of boards connected through FTDI device found: 1
board[0] location_id=1-7 serial_no:
done

 $ /opt/Programs/BCU/bcu_1.1.75/bcu get_boot_mode -board=imx95evk19
version bcu_1.1.75-0-ge3f9a83
board model is imx95evk19
ftdi_read_eeprom: -2 (USB device unavailable)
This board support EEPROM but it is EMPTY.
Please use below command to program the EEPROM.

 $ sudo /opt/Programs/BCU/bcu_1.1.75/bcu eeprom -w -board=imx95evk19
version bcu_1.1.75-0-ge3f9a83
board model is imx95evk19

>>>>>> Registered FTDI EEPROM on board >>>>>>
Write imx95evk19 default values to FTDI EEPROM successfully

FTDI EEPROM SN: 654CB0
Board Info: NXP i.MX95 EVK 19x19 Board Rev A0
  SoC Info: i.MX95 Rev A0
 PMIC Info: PPF0900AMBA1ES
Number of available power rails: 16
Serial Number: 1

done

 $ sudo /opt/Programs/BCU/bcu_1.1.75/bcu get_boot_mode -board=imx95evk19
version bcu_1.1.75-0-ge3f9a83
board model is imx95evk19
get_boot_mode hex value: 0x40, cannot find the boot mode string.
done

 $ sudo /opt/Programs/BCU/bcu_1.1.75/bcu lsbootmode -board=imx95evk19
version bcu_1.1.75-0-ge3f9a83
board model is imx95evk19

available boot mode:

        a_usb
        a_emmc
        a_sd
        a_nor
        a_nand_2k
        a_nand_4k
        usb
        emmc
        sd
        nor
        nand_2k
        nand_4k
done

 $ sudo /opt/Programs/BCU/bcu_1.1.75/bcu init usb -board=imx95evk19
version bcu_1.1.75-0-ge3f9a83
board model is imx95evk19
set ft_sd_pwren high successfully
set ft_sd_cd high successfully
set mode_dir high successfully
ENABLE remote control
set onoff low successfully
set reset low successfully
set boot mode successfully
board initialization finished
done

 $ sudo /opt/Programs/BCU/bcu_1.1.75/bcu set_boot_mode usb -board=imx95evk19
version bcu_1.1.75-0-ge3f9a83
board model is imx95evk19
set boot mode successfully
done

 $ sudo /opt/Programs/BCU/bcu_1.1.75/bcu get_boot_mode -board=imx95evk19
version bcu_1.1.75-0-ge3f9a83
board model is imx95evk19
get_boot_mode hex value: 0x40, cannot find the boot mode string.
done

 $ sudo /opt/Programs/BCU/bcu_1.1.75/bcu set_boot_mode emmc -board=imx95evk19
version bcu_1.1.75-0-ge3f9a83
board model is imx95evk19
set boot mode successfully
done

 $ sudo /opt/Programs/BCU/bcu_1.1.75/bcu get_boot_mode -board=imx95evk19
version bcu_1.1.75-0-ge3f9a83
board model is imx95evk19
get_boot_mode hex value: 0x40, cannot find the boot mode string.
done

Important bit:

  • whatever the boot_mode setted in the last commands, get_boot_mode always return the same value.

Investigation

BCU was reporting that it could not find the string corresponding to the hex values so I tried to change the mapping in the bcu source code with floowing patch:

diff --git a/board.c b/board.c
index 146bd19..3637f17 100644
--- a/board.c
+++ b/board.c
@@ -1057,9 +1057,9 @@ struct boot_mode imx95evk_board_boot_modes[] = {
        {"a_nor", 0x04},
        {"a_nand_2k", 0x05},
        {"a_nand_4k", 0x06},
-       {"usb", 0x09},
-       {"emmc", 0x0a},
-       {"sd", 0x0b},
+       {"usb", 0x40},
+       {"emmc", 0x60},
+       {"sd", 0x70},
        {"nor", 0x0c},
        {"nand_2k", 0x0d},
        {"nand_4k", 0x0e},

=> It did not fix the issue

@wangxiaoningnxp
Copy link
Contributor

wangxiaoningnxp commented Jan 18, 2024

Hi,
Thank you very much for your report!
Yes, this issue was found in the BCU test. I will fix this issue when I have time recently.

The main problem is that get_boot_mode is not working properly. Currently you can use the following command to reboot the board to the corresponding boot mode.
$ sudo ./bcu reset usb/sd/emmc -board=imx95evk19 -id=xxx

Thanks!
Clark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants