Commit graph

3879 commits

Author SHA1 Message Date
Karthick Shanmugham
7635ecacd3 ipq50xx: Added support for compressed dtb in u-boot
Signed-off-by: Karthick Shanmugham <kartshan@codeaurora.org>
Change-Id: If56b282b02cf621fa220d7f8cc6f2ddfe85bb212
2020-09-16 00:01:29 -07:00
Karthick Jeyaraman
d3da2a207c IPQ5018: Redcued U-boot reserved memory to 2MB
- u-boot text region + pgtable requires
	  800KB. Hence adjusted text base address
          to 0x4A92000, so that the text region + pgtable
	  fits at the last 800KB of 2MB memory space, leaving
	  200KB above them for other regions
	- Size of Heap region is reduced to 1MB from 1.5MB
	- Maple uses gmac controller for Ethernet DMA process,
	  which does not require non-cached memory,  hence we
	  can avoid reserving 1MB for noncached memory and the
	  same can used for other components.
	- Right now, 256KB of memory was used from stack
	  for env reloc/save functionalities which makes the
	  SP extend beyond 2MB. Hence, modified them to
	  allocate memory from Heap.
	- With this patchset, the u-boot fits into 2MB space
	  and the rest 2MB can be used for other components

Change-Id: I962d86d81b1c52cbef575f974924d16ec6e3db89
Signed-off-by: Karthick Jeyaraman <kjeyaram@codeaurora.org>
2020-08-27 02:19:12 -07:00
Vandhiadevan Karunamoorthy
81ba78ca06 mtd: ipq5018: remove CONFIG_CMD_NAND from tiny nor
This changes add CONFIG_CMD_NAND flags in flash command and smem
source file to eliminate nand specific source if CONFIG_CMD_NAND
is not defined.

This changes replace CONFIG_IPQ_MTD_NOR with CONFIG_MTD_DEVICE flag

Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
Change-Id: I612ae89c3730dc86f2693088fb4cb5c10763165d
2020-08-12 00:04:52 -07:00
Linux Build Service Account
24d30ab2b2 Merge "saveenv: spi-nor: fix for data abort issue" 2020-08-10 11:06:31 -07:00
Karthick Jeyaraman
a6ca8dd013 IPQ807x: Implement SCM interface for AES 256
Encryptio/Decryption

	- For encryption/decryption, plain data/
	  encrypted date has to be written to memory
	  directly using mw command along with
	  ivadata, type and mode
	- Implemented new uboot command "aes_256"
	  to receive the memory address where the
	  above data is written to
	- Perfom basic sanity check against the data
	  received and send them to secure world through
	  scm calls
	- This is supported only for HK/CYP, hence not
	  implemented for TZ running in 32bit mode

Change-Id: I589a15025cd248cf5792f13ea435c5c5b64c6066
Signed-off-by: Karthick Jeyaraman <kjeyaram@codeaurora.org>
2020-08-05 06:48:06 -07:00
Vandhiadevan Karunamoorthy
465a58cc6b saveenv: spi-nor: fix for data abort issue
This changes update env_flash variable to currently updated memory location
by sf probe. So this will avoid accessing of outdated memory location.

Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
Change-Id: Ib97c485f3c738d5501ee1cdb62c5ebbf421e8d14
2020-08-04 20:01:42 +05:30
Vandhiadevan Karunamoorthy
23db7fb51f fdt: ipq5018: Add support for tiny nor fixup
This changes fixup the mtdparts without support of
MTD framework,This code read the partition details from env
variable and patch to kernel dts.

Change-Id: I829808620c35b57973dc0ae015131bc5019c4844
Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
2020-06-12 05:44:40 -07:00
Vandhiadevan Karunamoorthy
fed441d78c ipq5018: Tiny U-boot: Remove NAND features
This changes remove nand command and Env support

Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
Change-Id: I6c59f8259306ef79499420afe4da17a2674e98be
2020-04-30 11:22:27 +05:30
Sham Muthayyan
44045b8654 mii: Fix the device name command
Change-Id: Iee9e96eddeaeddb3dd7463647e62325a50a31a1a
Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
2020-03-05 15:46:34 +05:30
Vandhiadevan Karunamoorthy
bbbdb8e5ab Flash: ipq5018: Add SPI-NAND flash support
Change-Id: I45d73fdd7e7315f110e4691a7dc9fe6698c51c37
Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
2020-02-19 03:32:03 -08:00
Linux Build Service Account
339eb45ebd Merge "ipq807x: Detect NOC error" 2019-10-16 21:06:29 -07:00
speriaka
7b44c8c9b2 ipq: Move pcie and usb deinit from booti to bootm
This is because we will be needing pcie and usb deinit
during bootm.

Also during booti, bootm will be called, so that time
also this deinit will be called.

Change-Id: I81eb43bf6db89a3f5600ce5327042a5aab0bb437
Signed-off-by: speriaka <speriaka@codeaurora.org>
2019-10-08 11:18:35 -07:00
Prasanna Kumar Thoorvas Samyrao Muralidharan
4c904e23a5 ipq807x: Detect NOC error
Detect NOC error and reset the board.

Change-Id: Id03e7c58d5ea47ef7fe508f0598fd57b80cba1dd
Signed-off-by: Prasanna Kumar Thoorvas Samyrao Muralidharan <ptsm@codeaurora.org>
2019-10-01 04:03:28 -07:00
Antony Arun T
8d977bd916 Revert "ipq: bootm: do pcie and usb deinit in bootm path"
This reverts commit 7bec79fb7c.

Change-Id: Iec49eff0936d8af6fd093518522db8095fb6ef1c
Signed-off-by: Antony Arun T <antothom@codeaurora.org>
2019-09-26 13:44:22 +05:30
Antony Arun T
7bec79fb7c ipq: bootm: do pcie and usb deinit in bootm path
Change-Id: Ic49f292b6c1ce9497dbab0f36a0d46e89300f2cb
Signed-off-by: Antony Arun T <antothom@codeaurora.org>
2019-09-18 15:27:51 +05:30
Rajkumar Ayyasamy
04d99019b2 ipq6018: add support to flash individual ubi volumes
Change-Id: I660879ffa28437eb88faa04ee61d329c224d16f9
Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org>
2019-09-13 15:13:08 +05:30
speriaka
98e4409f87 ipq6018: Handle crashdump disabled case in reset flow
When crashdump is disabled, kernel will set the dload_magic
as 0x40. When dload magic is 0x40, u-boot will clear the
magic and do warm/cold reset.

Change-Id: I4e5ed215419ba550776993f8a1772ad30f1a27e4
Signed-off-by: speriaka <speriaka@codeaurora.org>
2019-09-11 23:52:44 -07:00
Rajkumar Ayyasamy
90afafbdb8 qca: arm: fix compiler error when eMMC is disabled
Change-Id: I24aadfb70efbe48bb5d33c76ed29a873b0975b2b
Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org>
2019-08-26 03:59:57 -07:00
Sham Muthayyan
2b2f744a8d ipq807x: Add delay for Get descriptor
REQUEST SUMMARY
Setup Data 8006000200000900 Direction Device-to-host
Type Standard Recipient Device
bRequest GET_DESCRIPTOR wValue CONFIGURATION, Index 0
wIndex 0x0000 wLength 0x0009

DECODING INFORMATION

  Field Length(bits) Offset(bits) Decoded HexValue Description
  bRequest     8     8     GET_DESCRIPTOR     0x06     bRequest HexVal: 0x06
  wValue     16     16     CONFIGURATION type, Index 0     0x0200     Type of Descriptor
  wIndex     16     32     0x0000     0x0000     index info

DEVICE_QUALIFIER
  Descriptor(128 bytes) Field  Length(bits) Offset(bits)   Decoded HexValue Description
  bLength     8     0      0x80      0x80     Descriptor size is 128 bytes
  bDescriptorType     8     8      0x06      0x06     DEVICE_QUALIFIER Descriptor Type
  bcdUSB     16     16      0x0200      0x0200     USB Specification version 2.00
  bDeviceClass     8     32      0x00      0x00     Each interface specifies its own class information
  bDeviceSubClass     8     40      0x00      0x00     Each interface specifies its own Subclass information
  bDeviceProtocol     8     48      0x09      0x09     Protocol code = 9
  bMaxPacketSize0     8     56      0x00      0x00     The Maximum packet size 0 for endpoint zero is invalid! (Only 8,16,32,or 64 are valid)
  bNumConfigurations     8     64      0x09      0x09     The device has 9 possible other-speed configurations

The Transcend device fails for get configuration descriptor length.
Adding a delay fixes the issue.

Change-Id: Ic337e94e6342163e57e652781544709d0c32edcc
Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
2019-08-14 04:37:42 -07:00
Venkat Raju Sana
d0efe15871 MINIDUMP: Add check for dump_minimal env variable
dump_minimal env variable  is not currently
validated against junk characters. This check enables
minimal dump only when it  is set to 1.

Change-Id: I62a32ae1fc5c9355321c7b5ba2f6a96d8e890c50
Signed-off-by: Venkat Raju Sana <vrsana@codeaurora.org>
Signed-off-by: Venkat Raju Sana <vrsana@codeaurora.org>
2019-07-30 22:45:09 -07:00
Antony Arun T
6cc115dc59 ipq6018: reset: fixing reset flow after dump collection into flash
in ipq6018, instead of going for warm reset after collecting dump into flash,
checking wonce register and deciding whether to go for warm/cold reboot.

Change-Id: I6537d7455e6922467b4727f95e62ad0f2fc54295
Signed-off-by: Antony Arun T <antothom@codeaurora.org>
2019-07-19 16:13:50 +05:30
Sandhya
0b984e927c Fix compiler warnings: Indentation
Change-Id: I9786e6350b77b810ec676bfb770f14a559b67514
Signed-off-by: Sandhya <sandhyks@codeaurora.org>
2019-06-26 10:24:59 +05:30
sameeruddin shaik
f0822eadeb uboot: Fix compiler warnings in u-boot-2016
This change will fix the following warnings.
1.-Wmaybe-uninitialized

Change-Id: I353962197b9160e7d15d6cb48b67982e42120df2
Signed-off-by: sameeruddin shaik <samesh@codeaurora.org>
2019-06-19 13:03:29 +05:30
Linux Build Service Account
88fdb5c2bb Merge "u-boot-2016: Fix compiler warnings" 2019-06-18 17:05:09 -07:00
Md Sadre Alam
f2ed166473 driver: mtd: Add support to read entire ONFI parameter page structure.
This change will read entire ONFI parameter page. This will helpful
while validating new ONFI AVL part.

To read entire ONFI parameter page data structure use command:

"#nand onfipara".

Change-Id: Icea80fce6900716871d8c82a2d1ac0c00531af98
Signed-off-by: Md Sadre Alam <mdalam@codeaurora.org>
2019-06-11 22:51:13 +05:30
Gitanjali Krishna
9af31feb8b u-boot-2016: Fix compiler warnings
Change-Id: I1bf55699f4767de381c3875a0a3d84177a87282e
Signed-off-by: Gitanjali Krishna <gitanjal@codeaurora.org>
2019-06-10 14:50:33 -07:00
Md Sadre Alam
f80127f8a7 common: cmd_boot: Add stack canary test command.
This change will add stack canary test command in
u-boot command list.

The stack canary test command format like as :
canary <string>. The string must be 10 bytes long.

e.g
" #canary Helloworldhelloworld".

After this command we can see the below print.
Stack Canary test start.
stack-protector: U-boot stack is corrupted.
Resetting CPU ...

If stack-protection not enabled and stack overflow
occure then we will get the following print.

prefetch abort
pc : [<4a006f72>]          lr : [<4a90faf0>]
reloc pc : [<4a006f72>]    lr : [<4a90faf0>]
sp : 4a77f948  ip : 20f14495     fp : 4a90fab4
r10: 00000002  r9 : 4a77fea0     r8 : 00000000
r7 : 4a983d20  r6 : 6f6f6f6f     r5 : 6f6f6f6f  r4 : 6f6f6f6f
r3 : 00000000  r2 : 4a77f946     r1 : 4a78233b  r0 : 00000000
Flags: nZCv  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...

Change-Id: If36d1da3ecc1d0038cd1a6bad6ab3d265b47dac8
Signed-off-by: Md Sadre Alam <mdalam@codeaurora.org>
2019-06-10 11:48:03 +05:30
Pavithra Palanisamy
b7239058e9 ipq: Enable crashdump collection in usb device
This change enables support to collect crashdump files
in connected usb storage device on requirement.

Change-Id: If191bcae5329dd2c9e84035069e4d9b0e73b546b
Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
2019-05-30 20:17:55 +05:30
Pavithra Palanisamy
42a29e7793 ipq: Flash command code cleanup
Change-Id: I54b8677cba4b8a63b245bde8f1840d146d6694ee
Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
2019-05-28 16:19:55 +05:30
Pavithra Palanisamy
4bb8ae0f50 ipq: Add check to avoid overwriting successive partitions
This change adds a check to detect if the size of image to be flashed
fits within the respective partition region.

Change-Id: I794262fa759eef4ecc726252fb3d234c087f2b4d
Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
2019-04-30 15:51:39 +05:30
Venkat Raju Sana
2e7684f3f9 ip1807x:Initial commit for Minidump
Change-Id: If08d31ebb009d6b37ee55861644ab1f11a46ac98
Signed-off-by: Venkat Raju Sana <vrsana@codeaurora.org>
2019-03-29 12:47:06 -07:00
sameeruddin shaik
8338952d77 ipq807x: Fix compiler warnings in u-boot
Change-Id: Icd0c082fcc5d191745e4e4242dda5a7f3b22c4f0
Signed-off-by: sameeruddin shaik <samesh@codeaurora.org>
2019-01-22 12:57:57 +05:30
sameeruddin shaik
f2741fbe5a ipq806x: Disable relocation in uboot-2016
This change will resolve the "L2 Master port decode error"
 print in the Kernel log.

Change-Id: I12fd39a85093cc1d7fab336898e039a61eeb5565
Signed-off-by: sameeruddin shaik <samesh@codeaurora.org>
2018-11-29 10:54:48 +05:30
Antony Arun T
1c7d57b963 ipq6018: Skip uboot relocation and setup CP15 barrier
Change-Id: I29ced10a3ab0f36a06bdbb642f6b73ab287e8d6d
Signed-off-by: Antony Arun T <antothom@codeaurora.org>
2018-11-20 14:53:15 +05:30
Pavithra Palanisamy
15456d8ba6 qca : Add u-boot CLI command "flasherase"
The "flasherase" command can be used to erase partitions in flash.

Change-Id: I1111f3a626c3a36bcef57079a10c5d6be4e1e8df
Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
2018-11-16 11:39:22 +05:30
Gokul Sriram Palanisamy
dd315b2f72 ipq807x: Removed unused commands to reduce footprint
Change-Id: Idc83e732de310c63e8f8acba281b1bd2bf78828e
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2018-11-12 19:46:39 +05:30
Nikhil Prakash V
8438ea4b9b ipq807x: Adding SOC version to default env.
Adding soc_version_major and soc_version_minor to the default
environment.

Change-Id: I38ee6dd228382111beaa2bdacfade1e3d2c989de
Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
2018-11-09 16:29:18 +05:30
Pavithra Palanisamy
7fb1dc8e4c qca: KW fix for flash command
Change-Id: I330bee105bfd9f27d63f907d179e3561c25ca614
Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
2018-09-06 17:51:43 +05:30
Pavithra Palanisamy
8093a5448b ipq: Modified flash command with simplified parameters.
This change removes the "default" option in existing flash command
and makes use of environment variables in default case.

Change-Id: Ibc6ed68043acc708323b90132686cecf7f2f0d82
Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
2018-09-03 19:58:29 +05:30
Pavithra Palanisamy
89895d3766 qca: Change for fixing KW issue
Change-Id: I517bbec630f7a57830f51500535615461d37d3e1
Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
2018-08-13 12:30:38 +05:30
Pavithra Palanisamy
8160116212 qca: Fix KW issues with flashwrite command
Change-Id: Ia5b6ef5cbdf27a0a46f56445ee9335bb72353c63
Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
2018-07-27 18:56:24 +05:30
Pavithra Palanisamy
316e48fb0d qca: Add uboot-CLI command "flash"
The "flash" command erases given partition and
writes the image to flash.

Change-Id: I059414fd3d7eefeac0c626e1980a70985f2de986
Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
2018-07-13 19:48:38 +05:30
Linux Build Service Account
5080bfea38 Merge "dcache: Skipping dcache flush when no destination pointer" 2018-06-08 12:37:39 -07:00
Linux Build Service Account
315f1e32fa Merge "usb: hub: Translate USB 3.0 hub port status into old version" 2018-06-08 07:56:44 -07:00
Gokul Sriram Palanisamy
563590e559 dcache: Skipping dcache flush when no destination pointer
In imxtract, if destination pointer is not given,
skipping dcache flush at the destination pointer
to avoid null-pointer issue.

Change-Id: I4dc08bd35c4ffb083ab0c646961644560fbf4c1a
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2018-06-08 17:50:42 +05:30
Linux Build Service Account
e4fb3ba942 Merge "usb: hub: Add a new API to test if a hub device is root hub" 2018-06-07 03:08:42 -07:00
Bin Meng
0854db78bc usb: hub: Translate USB 3.0 hub port status into old version
USB 3.0 hub port status field has different bit positions from 2.0
hubs. Since U-Boot only understands the old version, translate the
new one into the old one.

Since we are going to add USB 3.0 hub support, this feature is only
available with driver model USB.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit 74ffc7cbb1)
Signed-off-by: Santan Kumar <santank@codeaurora.org>

Conflicts:
	common/usb_hub.c

Change-Id: I0456a1753f879592572ea40bc352d943065f8666
2018-06-05 15:55:12 +05:30
Bin Meng
3db02616a7 usb: hub: Support 'set hub depth' request for USB 3.0 hubs
USB 3.0 hub uses a hub depth value multiplied by four as an offset
into the 'route string' to locate the bits it uses to determine the
downstream port number. We shall set the hub depth value of a USB
3.0 hub after it is configured.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit bbc6f06c00)
Signed-off-by: Santan Kumar <santank@codeaurora.org>

Conflicts:
	include/usb.h

Change-Id: I7fa67c83c854c136fa9401201189e0597912e2a8
2018-06-05 15:37:56 +05:30
Bin Meng
a4aff629f3 usb: hub: Use 'struct usb_hub_device' as hub device's uclass_priv
Use USB hub device's dev->uclass_priv to point to 'usb_hub_device'
so that with driver model usb_hub_reset() and usb_hub_allocate()
are no longer needed.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit dfa96e0676)
Signed-off-by: Santan Kumar <santank@codeaurora.org>

Conflicts:
	common/usb_hub.c

Change-Id: I7a46a12c62aa7429ef2241c9543dd877abe6ac0b
2018-06-05 15:27:08 +05:30
Bin Meng
b09471d0e0 usb: hub: Add a new API to test if a hub device is root hub
Sometimes we need know if a given hub device is root hub or not.
Add a new API to test this. This removes the xHCI driver's own
version is_root_hub() and change to use the new API.

While we are here, remove the unused/commented out get_usb_device()
in the xHCI driver too.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
(cherry picked from commit 46c1d49330)
Signed-off-by: Santan Kumar <santank@codeaurora.org>

Change-Id: Ia27ee3b541f936e3eebf6ecb57c3499c08da3781
2018-06-05 15:21:48 +05:30