Commit graph

8639 commits

Author SHA1 Message Date
Sham Muthayyan
eb5312c9d4 ipq807x: Fix SFP port for HK10
Change-Id: Idca83bd96b6cd4cdcad45d15046805d251e7ea0d
Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
2020-06-15 00:40:44 -07:00
Md Sadre Alam
ae38a196ca driver: nand: qpic_nand: Fix NULL pointer dereference.
This change will fix NULL pointer dereference while reading
from spi nand flash in oobbuf.

The multipage read features is only to read with ecc for
raw read/write the the access is page wise due to mtd layer
will request only one page at a time. So don't increment oobbuf
for every page while reading if already bitflips are present in spi
nand flash. if so data abort will happen due to NULL pointer
dereference.

error:
NAND read: device 0 offset 0x4480000, size 0x1000
data abort
pc : [<4a9515ec>]          lr : [<44000e18>]
reloc pc : [<4a9515ec>]    lr : [<44000e18>]
sp : 4a77f6f4  ip : bbfff3dc     fp : 4a783510
r10: 4a97bb40  r9 : 4a77feb0     r8 : 44000e0c
r7 : 4a97ca2c  r6 : 0000000f     r5 : 00000004  r4 : 00000003
r3 : ffffffff  r2 : 000001f4     r1 : 000000ff  r0 : 44000e0c
Flags: nzCv  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...
resetting ...

Signed-off-by: Md Sadre Alam <mdalam@codeaurora.org>
Change-Id: I435f65183b56ceef64bad7d0df7ffebe02175a66
2020-06-14 04:37:14 -07:00
Vandhiadevan Karunamoorthy
f1341cb713 nor: Add GD25LB128D in device table.
Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
Change-Id: Ia14393575d035525232e91ca32ffe4e7830365c0
2020-06-11 21:28:08 -07:00
Md Sadre Alam
bfeb556cf7 driver: nand: qpic: Fix serial training logic.
This change will fix serial training logic and enable
config to enable default qpic_io_macro clock @ 80MHz with
default phase delay valu 4 for all qspi serial line.

This change also fix the delay issue while writing to qpic
register via bam.

Signed-off-by: Md Sadre Alam <mdalam@codeaurora.org>
Change-Id: I345f736fdae9d48b6da0115ca7a8519b43fe9efd
2020-06-04 22:06:22 +05:30
Vandhiadevan Karunamoorthy
ef78642323 ipq5018: Add support for Gephy
This Gephy is internal phy driver for ethernet

Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
Change-Id: Ia4e744c0fbd990bdc94fe93263ac2ddbe4cecf61
2020-06-04 22:06:22 +05:30
Vandhiadevan Karunamoorthy
d42f5e0c52 ipq5018: Add support S17C switch support
Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
Change-Id: Ia3877ba97bc9cbe3b853c6f72ce6e5970395b43f
2020-06-04 22:06:21 +05:30
Linux Build Service Account
7778ef70b9 Merge "driver: nand: qcom_nand: Fix xPU error for qspi register write." 2020-05-18 12:06:37 -07:00
Md Sadre Alam
0b0d196901 driver: nand: qcom_nand: Fix xPU error for qspi register write.
This change will add support to write some ops group register via
BAM to avoid xPU error.

Signed-off-by: Md Sadre Alam <mdalam@codeaurora.org>
Change-Id: I65ea875f783b7254f01cb3cf43eb43295caa4ed9
2020-05-18 16:32:24 +05:30
Vandhiadevan Karunamoorthy
699e92652f ipq5018: ethernet: update clock configuration
This changes initialize clock and enable the block of
Gephy, Uniphy, GMAC0 & GMAC1 and also udpate Rx & Tx clock
based on speed.

Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
Change-Id: Ia2627e17f7029c2d0d1cbb9eff26afb27aa1c057
2020-05-15 12:28:16 +05:30
Md Sadre Alam
a99d538e1b driver: mtd: qpic_nand: Add support for serial training.
This change will add support for serial training in
QPIC.

Due to different PNR and PCB delays, serial read data
can come with different delays to QPIC. At high frequency
operations Rx clock should be adjusted according to delays
so that Rx Data can be captured correctly. CLK_CNTR_INIT_VAL_VEC
in NAND_FLASH_SPI_CFG register is a 12-bit vector which is divided
in 4 parts of 3 bits each representing delay of 4 serial input data
lines. Bit [2:0] corresponds to qspi_miso[0], bit [5:3] corresponds
to qspi_miso[1], bit [8:6] corresponds to qspi_miso[2] and bit [11:9]
corresponds to qspi_miso[3]. Delay of each qspi_miso line can be set
from 0 to 7.

For serial training the following rule should be followd.

1) SW should write a page with any known pattern in flash at lower
frequency.

2) Set the CLK_CNTR_INIT_VAL_VEC for qspi_miso[0] line.

3) Read that page repetitively in high frequency mode until it
gets data accurately.

4) Repeat above steps for other qspi_miso lines.

Signed-off-by: Md Sadre Alam <mdalam@codeaurora.org>
Change-Id: If622809efff55fb2abe60f409a590abd5313741b
Signed-off-by: Md Sadre Alam <mdalam@codeaurora.org>
2020-05-12 04:27:24 -07:00
Linux Build Service Account
8473a5f83c Merge "ipq5018: Update GMAC ethernet driver" 2020-05-09 13:08:37 -07:00
Md Sadre Alam
4d380489d5 driver: nand: qpic: Enable default clock setting for qpic.
This change will enable default clock setting QPIC block.

Signed-off-by: Md Sadre Alam <mdalam@codeaurora.org>
Change-Id: I12396dc9776c611df69216bad1471a988130b22d
2020-05-07 20:45:20 +05:30
Vandhiadevan Karunamoorthy
577c8ba9dc ipq5018: Update GMAC ethernet driver
This code changes update gmac configuration and
add Gephy, internal Mdio, uniphy and s17c switch.

Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
Change-Id: I1759b5edf91de9a48f6d8ae46b3481f3a87f10eb
2020-05-07 13:27:01 +05:30
Linux Build Service Account
bcb64aee5b Merge "ipq5018: Tiny U-boot: Add thumb2 support" 2020-05-06 10:10:56 -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
Manikanta Mylavarapu
92980348f7 ipq5018: Fix phy initialization
This Fix will skip phy init sequence
for IPQ5018 because it doesn't need
any phy initialization.

Signed-off-by: Manikanta Mylavarapu <mmanikan@codeaurora.org>
Change-Id: I781ea03eda933692d6a096c97d93d238b1e7063d
2020-04-29 08:48:03 +05:30
Rajkumar Ayyasamy
86e3d52362 ipq6018: add UART clock settings
Change-Id: Ifb80b67e961ae2cde93bc5709330c5df932d0b4b
Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org>
2020-04-15 10:30:05 +05:30
Sham Muthayyan
08d0424ac7 ipq807x: Remove the Aquantia autoneg
Change-Id: I46ab6c39d2d4e9a86cedb7756799a5834a3c23b1
Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
2020-03-23 01:59:40 -07:00
Md Sadre Alam
599391c231 driver: mtd: qpic: Enable support for page_scope & multi_page read command.
This change will enable page_scope_read & multipage_read support for
QPIC.
QPIC version 2.0 onwards , QPIC support page_scope_read &
multipage_read command to enhance the read performance.
In normal page read command SW is needed to write EXEC_CMD register
for each Code word and collect any Status related to that CW before
issueing EXEC_CMD for next CW.

For page_scope read command SW is required to issue EXEC_CMD
only once for a page. Controller HW takes care of Codeword specific
details and automatically returns status associated with each CW to
BAM pipe, dedicated for status deposition.

enabling all bits in NAND_AUTO_STATUS_EN will require 4 data
descriptors of 24 bytes each. This will publish all NANDc status
registers in system memory.

For multipage_read command SW is required to issue EXEC_CMD only
once for all the pages which configured in QPIC_NAND_MULTI_PAGE_CMD
register.
All interrupts will be operational and valid in these modes.

To check the status for each codeword, it is not possible to access
the status registers while the read command is operational in
page_scope & multi_page read  modes. Hence, another feature to publish the
status data (for all NAND status registers) by programming the
NAND_AUTO_STATUS_EN register.

For serial NAND:
Read command for page_scope_read = 0x78800032 (QPIC_NAND_FLASH_CMD)
Read command for multi_page_read = 0x78400032 (QPIC_NAND_FLASH_CMD)

For Parallel NAND:
Read command for page_scope_read = 0x00800032 (QPIC_NAND_FLASH_CMD)
Read command for multi_page_read = 0x00400032 (QPIC_NAND_FLASH_CMD)

Now we fixed maximum data bytes read in one go 128KiB(2KiB page),
256KiB (4KiB page), 512 KiB (8kiB page), because from upper layer
we are getting more than 128KiB data bytes request in one go. if so
just changing the value of "MAX_MULTI_PAGE" macro will increase the
maximum data bytes in one go.

Change-Id: I48eea51ff8f5f79f3490d8a538c295ecc3eeee19
Signed-off-by: Md Sadre Alam <mdalam@codeaurora.org>
2020-03-06 15:52:15 +05:30
Vandhiadevan Karunamoorthy
3f50b516ff ipq5018: Add Pcie support
Change-Id: Ifcb632b0cda947002e0538778484bb866f8227f8
Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
2020-02-19 22:57:03 -08:00
Gokul Sriram Palanisamy
7f77903353 ipq: Moved board params structure to qca common
Change-Id: I58ac138f4585a64bf1a89302ec212afe133c2101
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2020-02-10 11:42:21 +05:30
Gokul Sriram Palanisamy
b8b1da8bfd nand: ipq807x: Removed nand_gpio entries from dts
Since nand configuration is fixed across all HK boards,
removing the nand gpio_entries from device tree and
adding static board param entries. This helps reduce
image footprint and opens up space for new board support.

Change-Id: I89bc11165a6cdfcdb3b4650a73cbeea17895f991
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2020-02-07 16:54:10 +05:30
Vandhiadevan Karunamoorthy
db70e98a74 board: ipq5018: Enable gcc cbcr clk for qpic.
Change-Id: Id30214131b0ef5476437597aba70d81e48fe7c8d
Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
Signed-off-by: Md Sadre Alam <mdalam@codeaurora.org>
2020-01-23 00:38:21 -08:00
Linux Build Service Account
27e1d77810 Merge "ipq5018: Enable GMAC support" 2020-01-08 06:39:23 -08:00
Kathiravan T
3a8f8f7b4b spi_nand: ipq40xx: enable support for Fidelix SPI NAND
Fidelix SPI NAND FM35X2GA has two planes namely plane 0 and plane 1.
This change adds the support to calculate the plane bit accordingly
and use the same for command formation.

Change-Id: I6fb4b652e1c897f248cb9ad8914f67be7a7365f3
Signed-off-by: Kathiravan T <kathirav@codeaurora.org>
2020-01-06 21:09:01 -08:00
Vandhiadevan Karunamoorthy
28f53ee94c ipq5018: Enable GMAC support
Change-Id: I5505d65292cf38aeda0602d9f8d1ad703d8efedb
Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
2020-01-06 00:24:58 -08:00
Linux Build Service Account
5d3735cfac Merge "ipq5018: Enable support for serial nand in qpic" 2019-12-25 18:31:09 -08:00
Md Sadre Alam
2c13362d84 ipq5018: Enable support for serial nand in qpic
This change will add support for serial nand.

QPIC-2.1.1 supports parallel nand as well as serial nand.

QPIC will operate either in parallel configuration or
serial nand. Both can't work together.

This change will support initially four serial nand parts.

MT29F1G01ABBFDWB-IT (Micron-0x2C,0x15, 2K + 128)

GD5F1GQ4RE9IG (Giga Device-0xC8,0xC1, 2K + 128)

GD5F2GQ5REYIH (Giga Device-0xC8,0x22, 2K + 64)

GD5F1GQ4RE9IH (Giga Device-0xC8, 0xC9, 2K + 64)

Device Internal ECC is disabled for all three devices. This change will
enabele QPIC ECC engine.

For MT29F1G01ABBFDWB-IT 4-bit ECC as well 8-bit ECC will be supported.

For  GD5F1GQ4RE9IG 4-bit ECC as well 8-bit ECC will be supported.

For GD5F2GQ5REYIH only 4-bit ECC will be supported due to 64-bytes spare.

For GD5F1GQ4RE9IH only 4-bit ECC will be supported due to 64-bytes spare.

Change-Id: I3f38f9c76b7bb235bb335a481fbc42ae1bd00395
Signed-off-by: Md Sadre Alam <mdalam@codeaurora.org>
2019-12-23 11:54:23 +05:30
Antony Arun T
687d46c783 ipq807x: fix nand flash size issue
This patch fixes the nand flash size access issue
found in flash with two logical units

Change-Id: Ifcbaa40709c4ac5d508b629fcc6cf7006f167628
Signed-off-by: Antony Arun T <antothom@codeaurora.org>
2019-12-12 17:26:53 +05:30
Linux Build Service Account
fe27a88a40 Merge "ipq5018: Update TLMM gpio configuration" 2019-11-29 11:06:28 -08:00
Rajkumar Ayyasamy
970617c1a6 ipq40xx: Added support for DK05-C1 board
Change-Id: Ia8bcb3a022611b3cfa6f58e10fcdc70a8f85a41f
Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org>
2019-11-28 11:54:23 +05:30
Vandhiadevan Karunamoorthy
790fe61455 ipq5018: Update TLMM gpio configuration
Change-Id: Ic084abb39bd693b8f2cb23ea39d9c2062863553e
Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
2019-11-27 12:29:14 +05:30
Vandhiadevan
4ae7d14b9d ipq5018: Enable eMMC support.
This eMMC flash controller support only 4-bit
Update sdhci driver to support 4-bit mode.

Change-Id: Iddaa0807b7cf339fcfa5add0b96955757b33c716
Signed-off-by: Vandhiadevan <vkarunam@codeaurora.org>
2019-11-21 19:58:18 +05:30
Vandhiadevan Karunamoorthy
a13842f5cf ipq5018: spi-nor: Add offset 0x0 erase support for S25FL128S_64K
Note : This S25FL128S_64K chip has Hybrid sector's
First 64Kb (4Kb * 8 + 32Kb) and rest all 64Kb sectors

Change-Id: Ibac9bd9dbd7b5a4eb1c31427b4d315fc5353ec62
Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
2019-11-05 10:32:27 +05:30
Balaji Prakash J
3c40acc3c2 ipq6018: pcie: Update phy configuration
Change-Id: Ie96555c16df7fd6539e245b95d6f6d5467dab923
Signed-off-by: Balaji Prakash J <bjagadee@codeaurora.org>
2019-10-30 12:09:56 +05:30
Vandhiadevan Karunamoorthy
73712e5b7d ipq5018: Add spi nor support
Change-Id: I1191f2cab63f09fa9c69f417d9cd3050e7a928e3
Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
2019-10-17 23:08:48 +05:30
Vandhiadevan Karunamoorthy
474077431c qca: ipq5018: Adding support for IPQ5018
Added config, dts and initial board support code for ipq5018

Change-Id: I70c0432623e57430187a7f432033056e19be8e5b
Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
2019-10-10 21:55:42 +05:30
speriaka
32d259be7a Revert "drivers: net: ipq6018: Remove 8033 port support"
This reverts commit 28be68e3b7.

Change-Id: Ie93dfa039e41c3eb9db6fecbfe0449832422c189
Signed-off-by: speriaka <speriaka@codeaurora.org>
2019-08-23 14:50:10 +05:30
speriaka
d99e73cef8 drivers: net: ipq6018: Update AQ ETHPHYFW loading method
This patch adds malloc for loading ethphyfw instead
of loading it in RAM Address.

Change-Id: I0f39d7b61b7675667201a218e5e7830910472b9c
Signed-off-by: speriaka <speriaka@codeaurora.org>
2019-08-18 22:06:11 -07:00
speriaka
28be68e3b7 drivers: net: ipq6018: Remove 8033 port support
8033 PHY is not supported in ipq6018 platform.

Change-Id: I54985e43b9c3a35386ec320644b0a53f3cdb378d
Signed-off-by: speriaka <speriaka@codeaurora.org>
2019-08-05 10:16:27 +05:30
speriaka
5f76e5ec94 drivers: net: ipq6018: Fix uniphy soft reset
This patch updates the uniphy soft reset function
to do the reset based on uniphy index only for the
required ports.

Change-Id: I7078b7f1e53fd86f32ec213dffe1eeebd5c702ad
Signed-off-by: speriaka <speriaka@codeaurora.org>
2019-08-04 21:40:50 -07:00
speriaka
a19e4580c5 drivers: net: ipq6018: config mode only if link speed changes
Change-Id: Id8b1d409f8f40de9d23c8e6693981aac68c02be2
Signed-off-by: speriaka <speriaka@codeaurora.org>
2019-08-04 21:40:46 -07:00
speriaka
297cd27a28 drivers: net: ipq6018: Config port only if link up
Without this change, even during link down, all
the ports were getting configured. This introduces
unnecessary delay.

This patch changes this behaviour and does the
configurations based on link speed, only when link
is up.

Change-Id: Ideed015ab087b317d2617369496c46abf21979f9
Signed-off-by: speriaka <speriaka@codeaurora.org>
2019-08-04 21:40:39 -07:00
speriaka
4fae338f6f drivers: net: ipq6018: Reset EDMA HW during init
This patch adds EDMA HW reset during EDMA init
before disabling interrupts and rings.

Change-Id: I8cf07c0ee35f7efa799037c3b0c22317e248701a
Signed-off-by: speriaka <speriaka@codeaurora.org>
2019-08-04 21:40:34 -07:00
speriaka
7b35e677c1 drivers: net: ipq6018: Support SFP at both 1G and 10G link speeds
Change-Id: Idfa1e2cd333f046de2ca66bdeb13bd91caf41b95
Signed-off-by: speriaka <speriaka@codeaurora.org>
2019-08-04 21:40:30 -07:00
speriaka
3c59e36a25 drivers: net: ipq6018: Update edma recv and alloc
This patch updates the edma eth_recv by disabling
the interrupts for txcmpl and rxfill. These interrupts
are again enabled as and when needed.

This patch also updates the alloc_rx_buffer next
pointer based on currently filled rx buffers.

Change-Id: I84aaba61132d683dc91e8e7156b3919570e4a0d1
Signed-off-by: speriaka <speriaka@codeaurora.org>
2019-08-04 21:40:26 -07:00
speriaka
c19196d8b9 driver: net: ipq6018: Move EDMA config to init
This patch removes EDMA config during each ping
and moves it to init code which is executed once
during boot

Change-Id: I0e988ac176386b1b95f1964be02f33a22f8113c3
Signed-off-by: speriaka <speriaka@codeaurora.org>
2019-08-04 21:40:21 -07:00
speriaka
823e51741c drivers: net: ipq6018: Remove TX and RX threshold config
Change-Id: If797ee08bbba04aab8c304739f2d1479b7e15375
Signed-off-by: speriaka <speriaka@codeaurora.org>
2019-08-04 21:40:16 -07:00
speriaka
a49455246d drivers: net: ipq6018: NSS Port MAC Reset
This patch adds port mac reset during link
speed change.

This patch also adds 100 ms delay after
full reset of NSS PPE and also updates
the comment for gmac disable.

Change-Id: I9c17ff1d0ad47d301094ce06cec07a478f48b1f0
Signed-off-by: speriaka <speriaka@codeaurora.org>
2019-08-04 21:40:12 -07:00
speriaka
1cb6f11406 drivers: net: ipq6018: Update XPCS reset
This patch updates the XPCS reset function. It
makes sure only the 2nd bit is modified and not the
entire register. Only 2nd bit needs to be toggled
for XPCS assert and deassert.

Change-Id: I7d11674f253d9b55825d1b285572e824ca218b95
Signed-off-by: speriaka <speriaka@codeaurora.org>
2019-08-04 21:40:08 -07:00