Commit graph

3886 commits

Author SHA1 Message Date
Kavin A
4291c86117 ipq9574: USB: Add delay for Get descriptor
Change-Id: I1ca6035fb30f692ec57ecb9f9c90393837c69a76
Signed-off-by: Kavin A <quic_kavia@quicinc.com>
2021-11-22 23:01:33 -08:00
Rajkumar Ayyasamy
0dc8c1c7a6 mtd: qpic_nand: add support to switch between 2K & 4K layout
qpic_nand sbl -> to switch to 2K layout
qpic_nand linux -> to switch back to 4K layout

Currently this switch is enabled for IPQ9574

Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org>
(cherry picked from commit c9a1c10b2e35ba8f14dafc1f4c07aa5a07a01541)
Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>

Change-Id: I3e429b8cd5e600b4214c01d7949c01536f988e47
2021-10-22 19:23:10 +05:30
Linux Build Service Account
5f0dbcd5b1 Merge remote-tracking branch origin/win.coretech.1.0 into HEAD
Change-Id: If781dcc16344e303f237954f3025f8b10d510ff6
2021-10-04 16:38:03 +05:30
anusha
3e6aa907bd sf: Fix sram size issue for 4GB DDR
In this case, the variable sram_end(Base + Size)
will hold (0x40000000 + 0xC0000000) and will overflow
32bits. Update the variable type to u64.

Change-Id: Iadf008c0ace552b793b9424e5c9ded0873599a64
Signed-off-by: anusha <anusharao@codeaurora.org>
2021-09-28 17:21:14 +05:30
Karthick Shanmugham
63c2c3a2c5 ipq: Indicate SDx when host resets
Change-Id: I202725bffe1ecbdf69aeac4d99a6b6a010f6cbce
Signed-off-by: Karthick Shanmugham <kartshan@codeaurora.org>
2021-09-26 21:07:49 -07:00
Vandhiadevan Karunamoorthy
89f08320cb common: ubi: fix ubi_initialized flag handling
This patch clears the ubi_initialized flag after doing ubi_exit since
there can be chance to ubi_int failure, but still ubi_initialized flag
will be set. This will result in doing ubi_exit again and uboot crash.

This patch also doing put_mtd_device after deleting mtd partition to
make the ref count to zero.

Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
Change-Id: I5a875ec82266db6b09045602b5d1b3fe47d4bd58
2021-08-12 20:56:17 +05:30
Vandhiadevan Karunamoorthy
73966739fb common: sf_command: Add ram region validation
Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
Change-Id: I36a48bae392388cfd565c6a351f01247959bb613
2021-02-08 10:10:09 +05:30
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