Commit Graph

11342 Commits

Author SHA1 Message Date
Marc Mattmueller 8afad93b6f hw23: removed init count for watchdog reset detection
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-09-15 19:11:55 +02:00
Marc Mattmueller 7c087e3930 hw23: removed unused parameter and casted return code correctly
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-09-15 14:43:50 +02:00
Marc Mattmueller b54f9487ff hw23: read init count
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-09-15 11:20:50 +02:00
Marc Mattmueller cd0cd61a73 hw23: added IPC hack to get number of init calls
To differ between reboot and watchdog reset the number of
pmic_inits can be counted. This is a draft/hack because
the FAULT_LOG register is on linux side always 0x0 regardless
where we read it.

BugzID: 74667
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-09-14 15:21:57 +02:00
Lucien Mueller 68ad3ed097 hw23: add shutdown on power-up when ignition is down.
BugzID: 73163

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2021-06-09 16:01:59 +02:00
Alexandre Bard d8d15bcfc8 HW23: Add support for reset reason
Part of SSF integration

BugzID: 71440
2021-04-30 11:23:59 +02:00
Alexandre Bard 4a75ab8d4f Backport reset-reason from TI branch
Part of SSF integration

BugzID: 71440
2021-04-30 11:23:48 +02:00
Alexandre Bard 9b969ee22a Update DA9063 driver to use IPC instead of I2C
Getting PMIC status through SCU

BugzID: 71440
2021-04-30 11:23:23 +02:00
Alexandre Bard 77c73457f0 Backports DA9063 driver from TI branch
In order to check reset-reason

BugzID: 71440
2021-04-30 11:22:53 +02:00
Alexandre Bard f08b2bccfc HW23: Print HW variant and version based on BD
BugzID: 58737
2021-02-18 21:08:24 +01:00
Alexandre Bard 2347f046e8 HW23: Set mac address based on board descriptor
BugzID: 70346
2021-02-18 14:46:47 +01:00
Alexandre Bard 7fd795ed3f HW23: Add board descriptor functions
These function allow to read the eeprom and parse the board descriptor.
The goal is then to set the mac address of the ethernet interface.

BugzID: 70346
2021-02-18 14:45:41 +01:00
Alexandre Bard 3e868e8600 netmodule: Add symlink to freescale/common
This symlink is created in yocto but is required to build uboot
properly.

In order to avoid mixing freescale common and netmodule common, it is
better and costs nothing to have it permanent here.

BugzID: 70346
2021-02-18 14:44:25 +01:00
Andrejs Cainikovs cbdca4ab79 nmhw23: remove unused gpio init 2020-02-04 14:17:00 +01:00
Andrejs Cainikovs 8ca326d9a4 nmhw23: port changes to NXP branch 2019-06-05 12:26:32 +02:00
Andrejs Cainikovs 614105eaa1 nmhw23: add ethernet config 2019-06-04 14:27:26 +02:00
Andrejs Cainikovs 0962de82c7 nmhw23: add sja1105 driver 2019-06-04 14:26:25 +02:00
Andrejs Cainikovs c7fb43d5ae Add iMX8 NMHW23 target 2019-06-04 14:22:06 +02:00
faqiang.zhu 0d6d880779 MA-14629 fix build warnings for varialbe initialization and type cast
initialize potential uninitialized variable with the type of"char*" to
be NULL in AVB. That "hashtree_error_mode" in code is manually specified
with a known value, the cases listed cover all potential value of
"hashtree_error_mode"

explicitly do a type cast for memcpy parameters.

Change-Id: Ie5d234422a273d6dab75585bd0d8eb81583707ca
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
2019-04-18 18:49:33 +08:00
Ji Luo 87a19df5e4 MA-14511 AIY: Change the GPU reserved memory to 32M
Reserve 32M memory for GPU on AIY 1G DDR board.

Change-Id: I566a4a027982c8d4e41f280162f2f3cd67f1f5cd
Signed-off-by: Ji Luo <ji.luo@nxp.com>
2019-04-11 13:58:39 +08:00
Michael Brooks 2aa4163329 MA-14521 AIY: Explicitly set USB Switch (PTN5150A) to UFP
* The default configuration (via resistor stuffing) is DFP (host). This
means that on Type-C hosts fastboot won't work.
* Set to UFP to ensure fastboot works properly.

Change-Id: I2b63d95e08df70da43dee1f8f7bb59d1863943f4
2019-04-11 13:58:29 +08:00
Michael Brooks 7191db0835 MA-14520 AIY: Limit USB to High Speed
* There is an enumeration problem when using superspeed.
* This doesn't fix it with all hubs, but can enable fastboot to work on
some 3.0 hosts.

Change-Id: If4a603126b945bd8f84c3d6e975e1185530eb193
2019-04-11 13:58:23 +08:00
Michael Brooks 1f27791878 MA-14519 Phanbell: Explicitly set buck voltages in SPL
* Bucks 1-4 will be reconfigured via DVS in the kernel.
* Buck 5 is explicitly set to 1.0V
* Regulator lock/unlock is added, this ensures that in warm or cold
reset the values will be set.

Change-Id: I8d8be74bddbbd081030fe1762b9f9c6534c7fb77
2019-04-11 13:57:29 +08:00
Ji Luo f3e266d088 MA-14494 Support DVT AIY 1G board
Add support for DVT AIY 1G board, distinguish the board type
with the board id.
  TYPE:         ID:
  Micron 1G     0x5
  HYNIX  1G     0x3
  Micron 3G     0x1

Test: Boot on AIY 1G/3G ddr board.

Change-Id: I3c7b6ebe8bc5d4e59917fcc3947e9ebfefc940da
Signed-off-by: Ji Luo <ji.luo@nxp.com>
2019-04-01 10:28:10 +08:00
Jacky Bai f85f740805 MLK-21214 board: imx8mm_evk: Use the default QoS setting for imx8mm_evk ddr4
previous setting can NOT meet the USB stream mode performance settting.
So use the default QoS setting on the i.MX8MM DDR4.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit dc9b5e2ffb1d74477c7ec766c6312f9e98afa64c)
2019-03-21 17:53:10 +08:00
Jacky Bai 128b1aaf8d MLK-21068 board: imx8mm_evk: update the lpddr4 timing config
Update the lpddr4 timing config to align with the ddr tool

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit a1433dec3a03a6c944b61600e7b317e2a83f2981)
2019-03-18 17:39:44 +08:00
Ye Li f4a61013b4 MLK-20987-2 imx8qm/qxp: spl: Clean the flexspi power up/down warning
When flexspi is assigned to M4 for XIP, its power up/down will fail.
This is expected so don't need to give warning.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 0803b4a9d4074a5bb101d194633cbdd7510a1e9a)
2019-02-25 21:51:49 -08:00
Ye Li e3a1ff7514 MLK-20987-1 imx8qm/qxp: spl: Fix SPL flexspi boot break
The CONFIG_QSPI_BOOT has been removed from SPL flexspi build, because
we have to change the u-boot ENV to SD/MMC, and this configuration will
set relevant configurations.

But we don't clean up CONFIG_QSPI_BOOT for SPL completely, SPL still has
some places using it and cause problem to flexspi boot.
Using CONFIG_SPL_SPI_SUPPORT to replace the CONFIG_QSPI_BOOT.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 0491bd4ba21ad620b4c514323a7d6b8a9e10325c)
2019-02-25 21:51:40 -08:00
Ji Luo 63dbfc00b9 MA-14129 Update ddr training code for imx8mq_aiy
Update the ddr training code to work with the atf 2.0.

Test: Build and boot on imx8mq aiy 3G board.

Change-Id: I8546c34cfa4aeeed819f7797f8362676e420b41f
Signed-off-by: Ji Luo <ji.luo@nxp.com>
2019-02-26 10:00:37 +08:00
Ye Li 1fb976e838 MLK-20980 imx8qm/qxp_mek: Set kernel fdt according to M4 boot
When M4 is booted by ROM, we have to enable RPMSG in kernel, so need
to select the -rpmsg.dtb. If M4 is not enabled, use default kernel dtb.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 8a57be45e18295ce1b19799723775cf5b205281d)
2019-02-25 01:52:56 -08:00
Ye Li 466c923102 MLK-20886-11: imx8qxp_mek: Remove GPIO1_1 for IO Expander reset
Since we have asked SCFW to do this job to avoid issues in partition
reboot, remove relevant codes.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 8128566e843d76720cdc5c3e075fa303e401132f)
2019-02-12 06:56:32 -08:00
Ye Li a726a0c38b MLK-20902 imx8mm_evk: Change VDD_DRAM to 0.975v
According to latest datasheet IMX8MMCEC_Rev_0, the typical voltage
of VDD_DRAM for 1.5GHz DDR clock is 0.95v. Because BD71847MWV PMIC
does not support 0.95v output. We change the voltage to 0.975v as
the note in datasheet mentioned it is acceptable and supported.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
2019-02-10 22:01:15 -08:00
Ye Li abef8ce6c2 MLK-20796 imx8qm_mek: Remove base board reset
SCFW has taken to reset the base board by deasserting BB_PER_RST_B(SCU_GPIO0_01) on
imx8QM MEK board, and has removed the SC_R_BOARD_R1 functionality.
So We don't need to explicitly use SC_R_BOARD_R1, delete the codes from u-boot.

Signed-off-by: Ye Li <ye.li@nxp.com>
2019-01-24 19:21:38 -08:00
Ye Li 9eea203022 MLK-20794-2 imx8qxp_arm2: Add support for 17x17 validation boards
There are two new validation boards: LPDDR4 board (30123) and DDR3L board (30010)
for imx8x family 17x17 chips. These two boards have same design except the DDR.
Since SCFW is resposible for DDR initialization, U-boot could use one build to
cover two boards.
The 8DX 17x17 DDR3L ARM2 has been added into u-boot before, so we rename the config
CONFIG_TARGET_IMX8DX_DDR3_ARM2 to CONFIG_TARGET_IMX8X_17X17_VAL to cover DDR3L and
LPDDR4.

Considering 8DX and 8QXP 17x17 may solder to the boards, we create two defconfig:
one for DX and another for 8qxp to share with the CONFIG_TARGET_IMX8X_17X17_VAL
but with different FDTs.

Signed-off-by: Ye Li <ye.li@nxp.com>
2019-01-24 18:38:07 -08:00
Ye Li 71f5000023 MLK-20783 imx8mm: spl: Change VDD_SOC to typical value 0.85V
According to the latest datasheet, software is expected to program
the VDD_SOC voltage to the typical value 0.85V prior to the first
DRAM memory access. At default the VDD_SOC is 0.8V from PMIC BUCK1,
so we have to change it to 0.85V in SPL.

Signed-off-by: Ye Li <ye.li@nxp.com>
Tested-by: Anson Huang <Anson.Huang@nxp.com>
2019-01-21 00:41:40 -08:00
Ye Li adb2db588c MLK-20781-4 mx7ulp_evk: Enable new mipi panel RM68200_WXGA
Enable the new mipi panel driver and add parameters to board codes.
We enable the RM68200_WXGA as default panel, users can set "panel"
environment variable to switch to different panel.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Fancy Fang <chen.fang@nxp.com>
2019-01-21 00:41:40 -08:00
Ye Li 188aea7489 MLK-20559-8 imx8qm/qxp: Update MEK board codes to support UUU
Enable the SPL SDP driver and USB driver in MEK board codes and defconfigs.
Because the USB driver needs larger malloc pool, increase the malloc size
and disable simple malloc

Signed-off-by: Ye Li <ye.li@nxp.com>
2019-01-08 21:46:31 -08:00
Ye Li 69dfae092f MLK-20559-7 tcpc: Bypass the vbus disable for SPL
The SPL won't use host mode, and the tcpc is default set as device mode.
So we don't need to access tcpc in SPL.

Signed-off-by: Ye Li <ye.li@nxp.com>
2019-01-08 21:46:31 -08:00
Ye Li 145c359ca5 MLK-20655-2 imx8qm/qxp: Fix wrong gpio resource used in SPL
Since the gpio non-dm driver maps to wrong GPIO register, the SPL
also powers up wrong GPIO resources.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
2018-12-26 01:25:41 -08:00
Breno Lima 2ee4bd1214 MLK-20583-2 imx: mx6sabreauto: Enable OCOTP CTRL clock in DCD and plugin
The HAB code can not set Field Return and SRK Revoke sticky bits in case
OCOTP CTRL clock is gated out.

In case we disable OCOTP CTRL clock in DCD and plugin those features may
not operate as expected.

Keep OCOTP CTRL clock enabled in DCD and plugin so HAB can propely lock
those features, users should use the CSF Unlock command to prevent those
features from being locked.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
2018-12-19 17:46:15 -08:00
Breno Lima fe78359704 MLK-20583-1 imx: mx6sabresd: Enable OCOTP CTRL clock in DCD and plugin
The HAB code can not set Field Return and SRK Revoke sticky bits in case
OCOTP CTRL clock is gated out.

In case we disable OCOTP CTRL clock in DCD and plugin those features may
not operate as expected.

Keep OCOTP CTRL clock enabled in DCD and plugin so HAB can propely lock
those features, users should use the CSF Unlock command to prevent those
features from being locked.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
2018-12-19 17:45:29 -08:00
Li Jun 1ea5ab027e MLK-20493-6 imx8mq_evk/arm2: Set usb to be super speed
Keep high speed for SPL, but for normal uboot, enable super speed.

Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Tested-by: faqiang.zhu <faqiang.zhu@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
2018-12-18 14:38:49 +08:00
Peng Fan 8132f6b584 MLK-20542 imx8qm: xen: mek: add magic number
Write magic number in board early init, and clear magic when booting
Linux.

This is to let XEN know the current EL1 code is U-Boot or Linux
when reset/reboot. This is just a workaround because CM41 could not
communicate with XEN now, even XEN knows that EL1 is reseting/rebooting.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Flynn xu <flynn.xu@nxp.com>
2018-12-12 15:00:05 +08:00
Ye Li 484104758d MLK-20528-2 imx8: Enable clocks LPCG
To support partition reboot, the u-boot has to enable clocks by LPCG.
The LPCG will reset to default value only when the subsystem is totally
power off and reset. However, the resources in one subsystem may belong
to different partitions, so the partition reboot may not reboot the entire
subsystem.
Powers, clocks/lpcg, GPR, IP may not reset depends on various cases and
HW design. Thus, AP software has to ensure everything is reset by SW
itself to support such above cases.

Signed-off-by: Ye Li <ye.li@nxp.com>
2018-12-11 21:49:23 -08:00
Ji Luo 686470235b MA-13453-1 Add new board target imx8mq_aiy
Add support for new target imx8mq_aiy.

Test: build and boot ok on imx8mq_aiy.

Change-Id: I7bb8b66e5235a7122073dcfb4cdc7f165036b9a6
Signed-off-by: Ji Luo <ji.luo@nxp.com>
2018-11-26 14:02:33 +08:00
Bai Ping 566b798213 MLK-20394 imx8mq: Update the ddrc QoS setting for B1 chip
Update the ddrc Qos setting for B1 to align with B0'ssetting.
Correct the initial clock for dram_pll. This setting will be
overwrite before ddr phy training. Although there is no impact
on the dram init, we still need to correct it to eliminate
confusion.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Tested-by: Robby Cai <robby.cai@nxp.com>
2018-11-20 18:21:35 +08:00
Keun-young Park 40e0de680b Revert "[iot] Decrease panbell DDR frequency to 1600 MTS"
- temp fix for boot hangup with camera

This reverts commit a8109598e7dca72d415ad5d26ac5868b88da9dfc.

Bug: 115532706
Test: test boot up
Change-Id: I7bb1bc14eb81ae0965fc03abdf5cb65444720d13
2018-11-12 09:18:37 +08:00
Ji Luo d4a0dbd9a4 [iot] Support authenticated unlock
Add fastboot commands "fastboot oem at-get-vboot-unlock-challenge"
and "fastboot oem at-unlock-vboot" to support the authenticated
unlock feature for Android Things devices. Use software random
numbers generator to generate the 16 bytes random challenge, it
should be replaced with hardware encrypted random generator when
the TEE part is ready.

Test: Generate unlock challenge by:
        ./avbtool make_atx_unlock_credential
        --output=atx_unlock_credential.bin
        --intermediate_key_certificate=atx_pik_certificate.bin
        --unlock_key_certificate=atx_puk_certificate.bin
        --challenge=my_generated_challenge.bin
        --unlock_key=testkey_atx_puk.pem
      validated the unlock credential successfully on imx7d_pico
      and AIY.

Change-Id: I4b8cee87c9e96924169479b65020a081136681f6
Signed-off-by: Ji Luo <ji.luo@nxp.com>
2018-11-12 09:18:37 +08:00
Ji Luo 2e419edbe5 [iot] Load Trusty to different address for AIY 1G/3G ddr board
Trusty image should be loaded to different address for AIY 1G/3G ddr
board which have different ddr size. Use board id to distinguish
different baseboard, load trusty image to 0x7e00_0000 for AIY 1G ddr
board and 0xfe00_0000 for AIY 3G ddr board.

Test: build and boot Trusty ok for AIY 1G/3G ddr board.

Change-Id: I62d8a19b13fe19f38075512a6faa4bbb36f74791
Signed-off-by: Ji Luo <ji.luo@nxp.com>
2018-11-12 09:18:36 +08:00
Yu Shan 7dc253b8ef Use stdint for uboot.
Because sysdeps.h in trusty include stdint.h, so we need to define
USE_STDINT.

Test: Local build test and flash on imx7d. Verify provision som
key and product key succeed.
Bug: None
Change-Id: I08db7c10dd4453a87f15ff4432335fe4c41f9c5f
2018-11-12 09:18:36 +08:00