Commit graph

8494 commits

Author SHA1 Message Date
Sham Muthayyan
4c38761167 ipq807x: Add PCIE reset sequence
Some cards are not working due to pcie reset.
So doing pcie reset with pcie reset gpio.

Change-Id: I0c631b116923b90bf94223d09e5662900a31244e
Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
2018-07-17 12:39:59 +05:30
Sham Muthayyan
f4307a0c64 ipq807x: Fixed the ethenet failure in HK01
Change-Id: I0ba38f89c35c34be45040aba1d2928a43d9f636b
Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
2018-07-12 12:00:06 +05:30
Sham Muthayyan
eff774150c ipq807x: Fix the napa 2nd-port 1G speed
Change-Id: I15317cec3dde811001be9d34c2bcf3487df9721d
Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
2018-07-10 05:05:49 -07:00
Sham Muthayyan
2de09dcab6 ipq807x: Multiple napa port support
Change-Id: I31d9ecf57e892bae31b044edb9d4ffbac2c17215
Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
2018-07-09 06:54:27 -07:00
Linux Build Service Account
d21e486821 Merge "ipq40xx: Device tree support for AP.DK07.1-C4" 2018-06-28 15:35:24 -07:00
Sham Muthayyan
f0321e1c5f ipq807x: Enable ethernet support for HK08
-Add 8031 phy and Aquantia phy

Change-Id: I69118be6a358ac9ea7b1cf6e793ed3343e174e39
Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
2018-06-25 15:42:00 +05:30
Sham Muthayyan
8d9a453c47 ipq807x: Add uncahed alloc support for edma driver
TX and RX descriptors are 16 bytes. This causes problems with the cache
maintenance on CPUs where the cache-line size exceeds the size of these
descriptors. What will happen is that when the driver receives a packet
it will be immediately requeued for the hardware to reuse. The CPU will
therefore need to flush the cache-line containing the descriptor, which
will cause all other descriptors in the same cache-line to be flushed
along with it. If one of those descriptors had been written to by the
device those changes (and the associated packet) will be lost.

To work around this, we make use of non-cached memory if available. If
descriptors are mapped uncached there's no need to manually flush them
or invalidate them.

Change-Id: I7b8a9a55226dfdcbab49a93bcdf43af4d70c108a
Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
2018-06-22 02:39:51 -07:00
Gitanjali Krishna
3cc4f89b3d ipq40xx: Device tree support for AP.DK07.1-C4
This change enables u-boot support for AP.DK07.1-C4 configuration.
AP.DK07.1-C4 enables QCA402x IOT support

Change-Id: I5982b8f8783755b03d11c878f8108d71e6ace6d1
Signed-off-by: Gitanjali Krishna <gitanjal@codeaurora.org>
2018-06-19 20:20:56 -07:00
Sham Muthayyan
8550018c8e ipq807x: Enabled napa phy for HK07
Change-Id: I1865a8336fc9763e1c541f5b6346ddbce7cb6eb9
Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
2018-06-11 07:20:22 -07:00
Sham Muthayyan
b8f8d40827 ipq807x: Add qca8081 phy support
Change-Id: I09093ee3351066aa55f70012459512ae4cbcb23f
Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
2018-06-11 07:19:54 -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
Linux Build Service Account
365124f20d Merge "ipq40xx: mmc: Added erase quirk for eMMC part" 2018-06-07 03:08:43 -07:00
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
Abhishek Sahu
961d3301a2 mtd: nand: qcom: support for non-page aligned read start address
Currently, the nand driver expects the start address to be page
aligned. This patch adds the support for reading data from
non-page aligned start address by using intermediate buffer.

1. Determine the number of pages with start address and
   length.
2. Do the full page read for all the pages. For first page,
   check the start address and determine the column. If column is
   non-zero then use the intermediate buffer for page data and copy
   the required number of bytes from this intermediate buffer to
   actual buffer.

Change-Id: I05a4b98547c83f785096027596cedd83a283edd8
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
2018-06-06 23:02:13 -07:00
Vinoth Gnanasekaran
4dc439fee1 ipq40xx: mmc: Added erase quirk for eMMC part
eMMC part THGBMBG5D1KBAIT is taking long time for the secure trim.
This leads to erase timeout. Manufacturer ID based quirk is added
for the specific part to use trim instead of secure trim for block erase.

Change-Id: Id4ecfde9585e112521863439f684feb5e0caaa51
Signed-off-by: Vinoth Gnanasekaran <vgnana@codeaurora.org>
2018-06-06 22:03:38 -07:00
Bin Meng
1bc23dd4ce usb: xhci: Program 'route string' in the input slot context
xHCI spec says: the values of the 'route string' field shall be
initialized by the first 'Address Device' command issued to a
device slot, and shall not be modified by any other command.

So far U-Boot does not program this field, and it does not prevent
SS device directly attached to root port, or HS device behind an HS
hub, from working, due to the fact that 'route string' is used by
the xHC to target SS packets. But in order to enumerate devices
behind an SS hub, this field must be programmed.

With this commit and along with previous commits, now SS & HS devices
attached to a USB 3.0 hub can be enumerated by U-Boot.

As usual, this new feature is only available when DM is on.

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

Change-Id: I367a0f1fa5e310c1c6af2d4675a86a3293337d64
2018-06-05 15:40:00 +05:30
Bin Meng
f345bf9517 usb: xhci: Change xhci_setup_addressable_virt_dev() signature
For future extension, change xhci_setup_addressable_virt_dev()
signature to accept a pointer to 'struct usb_device', instead
of its members slot_id & speed, as the struct already contains
these two plus some other useful information of the device.

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

Change-Id: Ibd7991073f0de4a97babbd9a96270f53f77cb185
2018-06-05 15:30:23 +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
Bin Meng
28468cd710 usb: hub: Change USB hub descriptor to match USB 3.0 hubs
USB 3.0 hubs have a slightly different hub descriptor than USB 2.0
hubs, with a fixed (rather than variable length) size. Change the
host controller drivers that access those last two fields
(DeviceRemovable and PortPowerCtrlMask) to use the union.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
(cherry picked from commit 337fc7e665)
Signed-off-by: Santan Kumar <santank@codeaurora.org>

Change-Id: I4ee4c866f4d35fea3ecf6431b90cec1af121fe29
2018-06-05 15:21:39 +05:30
Bin Meng
0fb9d498ff usb: hub: Send correct wValue to get hub descriptor of a USB 3.0 hub
Testing a USB 3.0 hub by connecting it to the xHCI port on Intel
MinnowMax, when issuing 'get hub descriptor' to the hub, xHCI
reports a transfer event TRB with a completion code 6 which means
'Stall Error'.

In fact super speed USB hub descriptor type is 0x2a, not 0x29.
Sending correct SETUP packet to the hub makes it not stall anymore.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
(cherry picked from commit f342119602)
Signed-off-by: Santan Kumar <santank@codeaurora.org>

Change-Id: I105e81557ec4097e6fafafdd2e2b5ecffb75b56b
2018-06-05 15:21:17 +05:30
Pradeep Das
dc6c6754c7 mmc: Added erase quirk for eMMC part
eMMC part SDIN8DE1-8G is taking long time for the secure trim.
This leads to erase timeout. Manufacturer ID based quirk is added
for the specific part to use trim instead of secure trim for block erase.

Change-Id: I13d5a9f19edf5daf9c1f4d5c2ec16b4f3b680159
Signed-off-by: Pradeep Das <pkdas@codeaurora.org>
2018-05-14 00:03:37 -07:00
Sham Muthayyan
039b3c19d5 ipq807x: Add ACL support for edma
Change-Id: I9102709f2a744e8434cc8d96d8a396766c4fc6c0
Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
2018-05-08 04:27:50 -07:00
Linux Build Service Account
39fb368aa1 Merge "mtd: qcom: write NAND_CTRL only once" 2018-05-04 06:10:20 -07:00
Abhishek Sahu
3edd3544f0 mtd: qcom: write NAND_CTRL only once
Currently NAND_CTRL register write generates error.
Register writes to operational registers should always be done
through command descriptors if BAM_MODE is already enabled.
For NAND boot, bootloader already enables BAM_MODE so read the
NAND_CTRL register value and write only if BAM_MODE is not set.

Change-Id: Iabc3e06dc7d8d8b36cdf35907217e1c4d7cc960a
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
2018-05-04 14:55:07 +05:30
Linux Build Service Account
6e4d2c720d Merge "mtd: nand: qcom: use oobsize from nand id table" 2018-04-26 08:51:47 -07:00
Linux Build Service Account
13cc1f2773 Merge "mtd: nand: add Toshiba TH58NYG3S0H to nand_ids table" 2018-04-26 04:30:02 -07:00
Abhishek Sahu
8c71e56950 mtd: nand: qcom: use oobsize from nand id table
If nand id table has specified oobsize then use the same.

Change-Id: I58b19f8f9989c7332d103b83b6920d5b59b29a13
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
2018-04-26 12:20:14 +05:30
Abhishek Sahu
a7ab5a19c2 mtd: nand: qcom: fix ubi mount error for non ONFI nand devices
Following error is coming during UBI mount for non ONFI nand
device since mtd->writebufsize is coming as zero

   ubi0: attaching mtd2
   UBI init error 22

The mtd->writebufsize is being assigned currently for ONFI
devices only so move this assigment to common place.

Change-Id: Idd22800dd65035952c1afd07ba375a28ffcf76ad
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
2018-04-26 12:20:14 +05:30
Abhishek Sahu
2be258bb00 mtd: nand: qcom: use ECC according chip spare bytes for non ONFI
The ONFI NAND device specifies the required ECC correction in its
param page but for non ONFI device, we don't have such info.
The QPIC NAND contoller can use 8 bit ECC if the chip has required
number of spare bytes. This patch calculates the minimum required
spare bytes for using 8 bit ECC and select the same, if non ONFI
device has required number of spare bytes otherwise 4 bit ECC
will be used.

Change-Id: If7c718f4288eee16857171335897e3209a05fd0b
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
2018-04-26 12:20:14 +05:30
Abhishek Sahu
f02cc3797e mtd: nand: add Toshiba TH58NYG3S0H to nand_ids table
Add the full description of the Toshiba TH58NYG3S0H NAND chip
in the nand_ids table since its spare bytes are coming as 128
instead of 256 with standard calculation. This device is non
ONFI/JEDEC device.

Change-Id: If1938fbcd0ebceb70aa9b620186cc92c6d504f75
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
2018-04-26 11:33:25 +05:30
Sasirekaa Madhesu
88cbba86db ipq40xx: Add Cache support for ethernet
Change-Id: Iea6b03467640c138163bbb12c4478049c47c67bc
Signed-off-by: Sasirekaa Madhesu <smadhesu@codeaurora.org>
2018-04-20 11:12:42 +05:30
Rajkumar Ayyasamy
5a2ad95d79 ipq40xx: Added emmc clk reset during mmc deinit
1. Added emmc clk reset during mmc deinitialization to 
avoid the mmc init failure in kernal bootup. 
2. Clock has been configured to 192 Mhz for SDHCI mode
3. Proper register is used for disabling emmc clock

Change-Id: Id21e294380ee904027e5d6d2b2929acbd7bac672
Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org>
2018-04-17 08:39:40 +05:30
Linux Build Service Account
35992873a2 Merge "ipq40xx: Added support for DK04-C6 board" 2018-04-13 12:57:00 -07:00
Rajkumar Ayyasamy
5364cd9d80 ipq40xx: Added support for DK04-C6 board
Change-Id: Ic9f451c30f4991df8013ae3191ad4384aed6f730
Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org>
2018-04-10 12:19:53 +05:30
Antony Arun T
6d417e1ed0 emmc: fix for mmc_init failure
Change-Id: I0c7202725415253492db29b693d6c9937856f3e5
Signed-off-by: Antony Arun T <antothom@codeaurora.org>
2018-04-05 11:30:00 +05:30
Linux Build Service Account
e29cf10dc6 Merge "ipq807x: Enable 4-byte address mode for flash W25Q256JW" 2018-04-04 03:16:31 -07:00
Santan Kumar
98b37b1dd8 ipq807x: Enable 4-byte address mode for flash W25Q256JW
Software SPI reset mode can be trigger from 4-Byte Address mode
in flash W25Q256JW.

Change-Id: I3f8ec46c2732c07a7af0cc7331102334413067ba
Signed-off-by: Santan Kumar <santank@codeaurora.org>
2018-03-30 17:44:43 +05:30
Linux Build Service Account
d6d99518c3 Merge "ipq40xx: spi: Add support for 4Gb Toshiba-TC58CVG2S0F SPI NAND flash" 2018-03-23 07:45:33 -07:00
Sham Muthayyan
3d59ead98a ipq807x: Fix KW issues for edma and pci
Change-Id: I46d870b14810b33d500cdba6e8a238f95fc05208
Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
2018-03-22 03:04:49 -07:00
Antony Arun T
2281952673 mmc: waiting for the card to exit from busy state
Since OCR value is changed,1ms delay is added to
give cards time to respond.

Change-Id: I18bddbc9d01ab2c62529c9f2065331f83b7ecca9
Signed-off-by: Antony Arun T <antothom@codeaurora.org>
2018-03-21 17:16:54 +05:30
Sasirekaa Madhesu
9400a07874 ipq40xx: spi: Add support for 4Gb Toshiba-TC58CVG2S0F SPI NAND flash
Change-Id: I6c7427fec4bd486c572547a844f22d941f777bf5
Signed-off-by: Sasirekaa Madhesu <smadhesu@codeaurora.org>
2018-03-19 16:21:32 +05:30
Rajkumar Ayyasamy
14fe9facff ipq806x: set 48MHz clk for mmc data transfer mode
As 52Mhz clk does not have 50% dutycycle, setting
48MHz clk for mmc data transfer mode

Change-Id: Id9c0ce07fe652df7d575c5ea11f1d83eab0fb24c
Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org>
2018-03-19 11:47:02 +05:30
Rajkumar Ayyasamy
cddf515afc ipq806x: fixed the fdt_path_offset return value check
fdt_path_offset function will return zero or positive
value for success case.So fixed the return value check
accordingly.

Change-Id: Iafacdaf7c12cecdb882f3795f6145730efe938a6
Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org>
2018-03-15 11:35:24 +05:30
Balaji Jagadeesan
6086a41473 ipq40xx: Support for SPI NOR not listed in vendor ID table
Do generic flash structure initialization, for the devices
not listed in the SPI NOR flash lookup table, so that
we can access the flash even before the support is added.
Block size and density are obtained from smem.

Change-Id: I568eb538615bb36124c43a2509bcfce2e4a1188a
Signed-off-by: Balaji Jagadeesan <bjagadee@codeaurora.org>
2018-03-13 11:49:29 +05:30
Linux Build Service Account
5d37330644 Merge "ARM: qca: mmc protection based on gpt attribute" 2018-03-12 10:49:57 -07:00
Gokul Sriram Palanisamy
201def52b9 ARM: mmc: Added power-on write protection support
Change-Id: Iba7e4bfcbee3f5106ef7d0ecc64e8af175732f7c
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2018-03-12 05:25:56 -07:00
Antony Arun T
14e100632e ipq806x: spi: Avoid reading cs_gpio from dts everytime
This patch will improve the spi flash read/write
performance.

Change-Id: I3939d202bf504a3386a4ae44644c715ec17f01ab
Signed-off-by: Antony Arun T <antothom@codeaurora.org>
2018-03-09 13:05:37 +05:30
Linux Build Service Account
1aba896bf0 Merge "qca: Fix KW variable initialization issue" 2018-03-08 10:07:16 -08:00
Linux Build Service Account
ed7b3de7eb Merge "ipq40xx: Replace strcpy with strlcpy" 2018-03-08 08:06:02 -08:00