u-boot.git
8 years agoENGR00325255 pcie:enable pcie support on imx6sx sd
Ye Li [Fri, 11 Mar 2016 09:28:00 +0000 (17:28 +0800)]
ENGR00325255 pcie:enable pcie support on imx6sx sd

Enable pcie support in uboot on imx6sx sd boards
- enable_pcie_clock should be call before ssp_en is set,
  since that ssp_en control the phy_ref clk gate, turn on
  it after the source of the pcie clks are stable.
- add debug info
- add rx_eq of gpr12 on imx6sx
- there are random link down issue on imx6sx. It's
  pcie ep reset issue.
  solution:reset ep, then retry link can fix it.

(cherry picked from commit ec78595a24b5ff1020baa97b6d6e79a3a3326307)
Signed-off-by: Richard Zhu <r65037@freescale.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 81fd30250110d72992758f08b66c07306126892b)

8 years agoENGR00319965 pcie: mask the imx6sl out
Richard Zhu [Wed, 25 Jun 2014 06:20:16 +0000 (14:20 +0800)]
ENGR00319965 pcie: mask the imx6sl out

imx6sl doesn't have the pcie module, mask the pcie
related codes from imx6sl.

Signed-off-by: Richard Zhu <r65037@freescale.com>
(cherry picked from commit acaff11da33f8f0cb1521d3c48e64e7ed9a87bec)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 48a4606ef575c72e16e31c167dce042fcb66191c)

8 years agoENGR00319415 pcie: random link down issue after warm-rst
Richard Zhu [Tue, 24 Jun 2014 01:59:47 +0000 (09:59 +0800)]
ENGR00319415 pcie: random link down issue after warm-rst

There are about 0.02% percentage on some imx6q/dl/solo
hw boards, random pcie link down when warm-reset is used.
Make sure to clear the ref_ssp_en bit16 of gpr1 before
warm-rst, and set ref_ssp_en after the pcie clks are
stable to workaround it.

rootcause:
* gpr regisers wouldn't be reset by warm-rst, while the
ref_ssp_en is required to be reset by pcie.
(work-around in u-boot)
* ref_ssp_en should be set after pcie clks are stable.
(work-around in kernel)

Signed-off-by: Richard Zhu <r65037@freescale.com>
(cherry picked from commit 5cc825b12c6b86a22f1a6a0535b52cf3ee142e77)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 6193cf4e3384a59e29546d13a67657f7faeafc9e)
(cherry picked from commit 7b4aabeddffabca46d7d6e7ef2611de468a6b4f7)

8 years agoMLK-11064 imx: mx6qp: Adjust AQos settings for peripherals
Ye.Li [Fri, 5 Jun 2015 14:11:41 +0000 (22:11 +0800)]
MLK-11064 imx: mx6qp: Adjust AQos settings for peripherals

To resolve USB camera bandwidth issue, the patch sets recommended AQoS
setting from IC team value for peripheral and only on imx6qp.

The address is: 0xbb0608, the value is: 0x80000201

Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 11906c712a52e7a20caf71d7c5da4e951a59db29)
(cherry picked from commit 5dcf073b8f2479a2adbb8d9fb03d9c9c70664e32)

8 years agoMLK-12534 mx6: shutdown vddpu and PCIE phy to save power
Ye Li [Fri, 11 Mar 2016 07:44:01 +0000 (15:44 +0800)]
MLK-12534 mx6: shutdown vddpu and PCIE phy to save power

Shutdown VDDPU and PCIE phy to save power.

For PCIE, the i.MX6SL and i.MX6UL does not have this module,
so don't need it.

For VDDPU, the i.MX6UL does not have GPU, does not need it. And on
i.MX6QP there is narrow window that PRE driver is ready but GPU driver probe later,
and the later GPU driver turn on PU may cause 'PRE hang' issue. To simplify
thing, do not turn off PU in u-boot.

Reference:
commit: 6b0787b726e2ff32210d742d93ecd3f4bb2ae402
commit: 4bd0032c0eba50fa0caf43f50f735a3cfbe36a8d

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 5c96ea91fe89c67991c929c9b39ffaa940d28391)

8 years agoMLK-12533 mx6sx: select OSC as uart's clk parent
Ye Li [Fri, 11 Mar 2016 06:20:23 +0000 (14:20 +0800)]
MLK-12533 mx6sx: select OSC as uart's clk parent

As M4 is sourcing UART clk from OSC, to make UART work
when M4 is enabled, need to select OSC as clk parent,
24M OSC is enough for debug UART in uboot.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Anson Huang <b20788@freescale.com>
(cherry picked from commit b5e1b393192099e91c5cb75b69291c87eacb9f60)
(cherry picked from commit 416dea861c2dd5a197bf2354069bba8415a20b12)

8 years agoMLK-12452-4 mx6sxsabreauto: Add secondary enet support
Ye Li [Fri, 4 Mar 2016 08:45:17 +0000 (16:45 +0800)]
MLK-12452-4 mx6sxsabreauto: Add secondary enet support

Add configurations and board codes for second enet.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 4dfd06dc649615f8dd3e1ac8018a0a7109fc4147)

8 years agoMLK-12452-3 mx6sxsabresd: Add secondary enet support
Ye Li [Fri, 4 Mar 2016 08:43:35 +0000 (16:43 +0800)]
MLK-12452-3 mx6sxsabresd: Add secondary enet support

Add configurations and board codes for second enet.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit b646262f1f201e11e08968ddf88aeb8ab41fcf21)

8 years agoMLK-12452-1 FEC: Update fec driver to support two MDIO
Ye Li [Thu, 25 Feb 2016 05:34:11 +0000 (13:34 +0800)]
MLK-12452-1 FEC: Update fec driver to support two MDIO

On i.MX6SX, 6UL and 7D, there are two enet controllers each has a
MDIO port. Some boards share the MDIO port for the two enets. So
introduce a configuration CONFIG_FEC_MXC_MDIO_BASE to indicate
the MDIO port for sharing.
In Kconfig, user needs enable CONFIG_FEC_MXC_SHARE_MDIO first to enter
the CONFIG_FEC_MXC_MDIO_BASE.

Without defining this configuration, the enet will uses own MDIO port.
Also add this configurationfor FEC DM driver, since the ENET PHY currently
does not support FDT.

Modify the dev_id for DM driver, the first fec will set dev_id with 0, while
second fec sets the dev_id with 1. So the MII bus name won't be duplicated.
Then we can add two FEC devices from DTB.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 088afc073c480bd02208145bfb04259ccdf391c1)

8 years agoMLK-12439 mx6sxsabreauto: Enable GIS for the AI board
Ye Li [Tue, 23 Feb 2016 09:58:09 +0000 (17:58 +0800)]
MLK-12439 mx6sxsabreauto: Enable GIS for the AI board

Enable the GIS feature for i.MX6SX sabreauto board. Need to define
the "gis=vadc" environment variable for the gis input. At default
this variable is not set.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 2271dcfee3500e96503a9fc59929e73167e3c4a2)

8 years agoENGR00315894-81 gis: Add gis module
Ye.Li [Thu, 12 Jun 2014 11:47:27 +0000 (19:47 +0800)]
ENGR00315894-81 gis: Add gis module

Add gis module, current gis is support vadc input.
Add power down function to lcdif driver.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit a007b00dd8ef9f773dfdebef0b1deb0990281793)
(cherry picked from commit a31dcdafb0963381e7213c59f79a340ef27ec2e2)
(cherry picked from commit 02dfe2e4af5f51d39a51542fb0e81f93faf505bc)

8 years agoENGR00315894-80 pxp: Add pxp module
Ye.Li [Thu, 12 Jun 2014 11:40:53 +0000 (19:40 +0800)]
ENGR00315894-80 pxp: Add pxp module

Add pxp module.
Support csc between YUV444 and RGB888 and scaling.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 4c6e1f9ed1b2f5c98a34502b44b6414593fdd290)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 92295fafcdbaa3a3fe0a63ede15f896dfc9ce0b0)
(cherry picked from commit 096a63e81a8c78b3f8bbc65a9d418aa032d62231)

8 years agoENGR00315894-79 csi: Add csi module
Ye.Li [Thu, 12 Jun 2014 11:39:16 +0000 (19:39 +0800)]
ENGR00315894-79 csi: Add csi module

Add csi module.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 854ae26758ec8132ef749b98645dd2f43b84e5e2)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 5f133bd9420109951fd03bd5168801327e929c3b)
(cherry picked from commit 16960e59fa3334162d2e2212ee4bc1e7f0c420a3)

8 years agoENGR00315894-78 vadc: Add vadc module
Ye.Li [Thu, 12 Jun 2014 11:37:19 +0000 (19:37 +0800)]
ENGR00315894-78 vadc: Add vadc module

Add vadc module.
Both PAL and NTSC mode can work.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 03c31ae30c1e81c99f6824221e4801433445e04a)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit b5d776ffc1519c16091736445b3217ffb7fcd7db)
(cherry picked from commit 2377eb9fd299b76888f11faf76383b68e77bcc8a)

8 years agoENGR00321299 gis: clean csi0 input mux set bit in GPR
Sandor Yu [Fri, 4 Jul 2014 09:13:58 +0000 (17:13 +0800)]
ENGR00321299 gis: clean csi0 input mux set bit in GPR

When gis enable in uboot, the CSI0 input mux select setting
to vadc module, clean the bit when gis disabled.

Signed-off-by: Sandor Yu <R01008@freescale.com>
(cherry picked from commit ae66b17b7da3be50dc81ca636b67e8e879f52e26)
(cherry picked from commit c83fd326e810c2fff44b8b02e78406d5d04c977c)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit d6e803ed5f51d31ebe7e9d178aa11f16401b7fc8)
(cherry picked from commit 2065b417ae93436736e49ca66b66aa0791d003fe)

8 years agoENGR00315894-77 mx6 soc: Add vadc power up/down function
Ye.Li [Thu, 12 Jun 2014 11:34:18 +0000 (19:34 +0800)]
ENGR00315894-77 mx6 soc: Add vadc power up/down function

Add vadc power up/down function.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 96d990ef754a879f6ca9da4adf6e0be3d21cdc51)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 01b88201aa86bef26a4254ac43aff90e99fd2c06)
(cherry picked from commit d50b53f138dd3b4c463c80ac8e14f41ac0fdd415)

8 years agoENGR00315894-76 mx6 clock: Add vadc clock enable function
Ye.Li [Thu, 12 Jun 2014 11:33:05 +0000 (19:33 +0800)]
ENGR00315894-76 mx6 clock: Add vadc clock enable function

Add vadc clock enable function.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 721c7a1448c5b7265b597b83d18f8338a27ea213)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 903a59ef941f39b6d7f693dd7c60528e166de079)
(cherry picked from commit dc767fb7d5c155f2a6ef01c4dee808b9c1944fc2)

8 years agoMLK-10655 Video: Fix second line string display issue
Ye.Li [Tue, 14 Apr 2015 09:27:14 +0000 (17:27 +0800)]
MLK-10655 Video: Fix second line string display issue

The string display on second line repeats the last word of
first line and does not show full.
This is the bug introduced by the fixing to MLK-10542.

Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit ac430cee8c42f0acad9e126631d772b99f1166ea)
(cherry picked from commit ff62c5b275a9b5e47d570d3eb10622799bf12070)
(cherry picked from commit bd265a064c8f797e542955352d170e7f20f7b0d1)
(cherry picked from commit aaa55881de3e9aa8232c819a2c8a3abb285b682f)

8 years agoMLK-10542 video: Support multiple lines version string display
Ye.Li [Fri, 10 Apr 2015 04:10:34 +0000 (12:10 +0800)]
MLK-10542 video: Support multiple lines version string display

The caculation of left space for version string is not correct, should
use VIDEO_COLS not VIDEO_LINE_LEN / 2, otherwise we will get larger space
than actual have and cause string to overlay logo picture.

Also current version string display only supports two lines words at max.
This also causes overlay when the LCD pixel colume size is not enough.

Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit ed53487d36a886fb4557088804a4b5232b168889)
(cherry picked from commit 253936bb920c5bb8e7d26e0425d155fb2576ab77)
(cherry picked from commit a12ec4c29b4cbdf03ae68a5ecb739253f79b59fc)

8 years agoMLK-11211 lcd: fix build warning
Peng Fan [Wed, 1 Jul 2015 04:51:41 +0000 (12:51 +0800)]
MLK-11211 lcd: fix build warning

Fix build warning:
common/lcd.c: In function 'lcd_clear':
common/lcd.c:166:6: warning: variable 'bg_color' set but not used [-Wunused-but-set-variable]
int bg_color;
      ^
common/lcd.c: In function 'lcd_setmem':
common/lcd.c:296:2: warning: format '%d' expects argument of type 'int', but argument 2 has type 'u_long' [-Wformat=]
debug("LCD panel info: %d x %d, %d bit/pix\n", panel_info.vl_col,
  ^
common/lcd.c:296:2: warning: format '%d' expects argument of type 'int', but argument 3 has type 'u_long' [-Wformat=]

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit acfeb43685efb04423ce064c67228d15fa6d3da5)

8 years agoMLK-14365-2 mx6ullevk: Add LCD splash screen support
Ye Li [Tue, 7 Mar 2017 03:29:11 +0000 (11:29 +0800)]
MLK-14365-2 mx6ullevk: Add LCD splash screen support

Add LCD configurations and TFT43AB display settings for mx6sllevk.
Enable the CONFIG_VIDEO for this feature.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14365-1 mx6sllevk: Add LCD splash screen support
Ye Li [Tue, 7 Mar 2017 03:14:42 +0000 (11:14 +0800)]
MLK-14365-1 mx6sllevk: Add LCD splash screen support

Add LCD configurations and MCIMX28LCD display settings for mx6sllevk.
Enable the CONFIG_VIDEO for this feature.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-12437-5 mx6ulevk: Update display to support panel selection
Ye Li [Tue, 23 Feb 2016 07:29:29 +0000 (15:29 +0800)]
MLK-12437-5 mx6ulevk: Update display to support panel selection

Change to panel environment for display at default. Align this feature to
v2015.04 uboot.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit ea93a34a3348f80462ea5b61a4ca2e9a1d267f4c)

8 years agoMLK-12437-4 mx6sxsabreauto: Update display to support panel selection
Ye Li [Tue, 23 Feb 2016 07:28:11 +0000 (15:28 +0800)]
MLK-12437-4 mx6sxsabreauto: Update display to support panel selection

Support two display panels, one for LVDS, another for parallel LCD. Align
the feature to v2015.04 uboot.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit d5f7833adf6236357cf3c139e14e46d718e20524)

8 years agoMLK-12437-3 mx6sxsabresd: Update display to support panel selection
Ye Li [Tue, 23 Feb 2016 07:25:12 +0000 (15:25 +0800)]
MLK-12437-3 mx6sxsabresd: Update display to support panel selection

Support two display panels, one for LVDS, another for parallel LCD. Align the
feature to the v2015.04 uboot.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit d7f54f22607ffcace6cda97984649a5ae4f65996)

8 years agoMLK-12437-2 Video: Update the common board_video_skip to support MXS LCD
Ye Li [Tue, 23 Feb 2016 07:19:39 +0000 (15:19 +0800)]
MLK-12437-2 Video: Update the common board_video_skip to support MXS LCD

Update the board_video_skip to use CONFIG_VIDEO_MXS for LCD display support.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit d6d0265b09e66c576ab4c01841166415f834a1ff)

8 years agoMLK-12437-1 mx6sx: Add support for LVDS display
Ye Li [Tue, 23 Feb 2016 07:12:17 +0000 (15:12 +0800)]
MLK-12437-1 mx6sx: Add support for LVDS display

The i.MX6SX uses a LVDS bridge to mux to the LCDIF interface. Implmement a
function for this muxing. So that on 6SX we can use a LVDS display.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 763658d9b497e44b7411581da592ef5b522e9cc9)

8 years agoENGR00315894-70 iMX6SX:Video Update MXS LCDIF driver
Ye.Li [Thu, 12 Jun 2014 09:10:32 +0000 (17:10 +0800)]
ENGR00315894-70 iMX6SX:Video Update MXS LCDIF driver

Add a new interface "mxs_lcd_panel_setup" to setup fb parameters and
specifies the LCDIF controller for multiple controllers of iMX6SX.
Pass fb parameters via "videomode" env remains work if the new interface
is not called before video initialization.

Modify LCDIF clock interface "mxs_set_lcdclk" to support multiple
LCDIF controllers on iMX6SX.

Signed-off-by: Ye.Li <B37916@freescale.com>
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit d7f49b9378547c3a57b96bcdb907fc44616beb3d)
(cherry picked from commit e1343191b9de227c582847e7eeb5ce9238be0754)

8 years agoMLK-12434-9: mx6: define CONFIG_BOARD_LATE_INIT
Peng Fan [Tue, 23 Feb 2016 06:22:05 +0000 (14:22 +0800)]
MLK-12434-9: mx6: define CONFIG_BOARD_LATE_INIT

Define CONFIG_BOARD_LATE_INIT for mx6qarm2/mx6slevk/mx6sxsabresd
to let mmcdev/mmcroot work as expected.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 86135fb7e55c3046ead899b83f58dd6048eda9e8)

8 years agoMLK-12434-8: mx7dsabresd: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:52:27 +0000 (12:52 +0800)]
MLK-12434-8: mx7dsabresd: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot for mx7dsabresd.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 2fc0e6ccc90989375ac6355d4f33fd4ffaca9b3a)

8 years agoMLK-12434-7: mx6ulevk: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:51:50 +0000 (12:51 +0800)]
MLK-12434-7: mx6ulevk: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot for mx6ul evk board.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 95cf514bb3c17014622bca26cbcbfda31cec861a)

8 years agoMLK-12434-6: mx6slevk: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:50:49 +0000 (12:50 +0800)]
MLK-12434-6: mx6slevk: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot for mx6slevk.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 3308f3c48c644938c415ead23ed9acedc2fd7981)

8 years agoMLK-12434-5: mx6sxsabreauto: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:49:37 +0000 (12:49 +0800)]
MLK-12434-5: mx6sxsabreauto: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot for mx6sxsabresd.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit ebb43ae292d43817202b71b25368516887f4686b)

8 years agoMLK-12434-4: mx6sxsabresd: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:48:23 +0000 (12:48 +0800)]
MLK-12434-4: mx6sxsabresd: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot for mx6sxsabresd.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit fb53c90269ead4f72028fd9bcc764e4924921a30)

8 years agoMLK-12434-3: mx6sabre: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:46:21 +0000 (12:46 +0800)]
MLK-12434-3: mx6sabre: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot for mx6sabresd and mx6qsabreauto.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 14040e07549a394500c11e815f31299e4fb0ac50)

8 years agoMLK-12434-2: mx6qarm2: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:45:20 +0000 (12:45 +0800)]
MLK-12434-2: mx6qarm2: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot for mx6qarm2.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 54ea563dbe1804e426afbbf0710ffa815551d92b)

8 years agoMLK-12434-1: imx: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:43:10 +0000 (12:43 +0800)]
MLK-12434-1: imx: dynamic setting mmcdev and mmcroot

Align to imx_v2015.04, dynamic setting mmcdev and mmcroot.
Then when boot linux, we can have correct "root=/dev/mmcblk[x]p2"

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit b46b99a901eb194e81fc4836ee2259ad8857f4d3)

8 years agoMLK-12425-4: mx6dlsabresd: support epdc
Peng Fan [Mon, 22 Feb 2016 07:53:59 +0000 (15:53 +0800)]
MLK-12425-4: mx6dlsabresd: support epdc

Support epdc for mx6dlsabresd board.
Introduce a new configuration file mx6dlsabresd_epdc_defconfig.
Add related settings.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 467974ffda4b874e16f0c84974c3d65d85f84f6a)

8 years agoMLK-12425-3: mx6slevk: support epdc
Peng Fan [Mon, 22 Feb 2016 07:37:03 +0000 (15:37 +0800)]
MLK-12425-3: mx6slevk: support epdc

Support epdc for mx6slevk board.
Introduce a new configuration file mx6slevk_epdc_defconfig.
Add related settings.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 8e4304c2ab95928fb6fbb24ba83115cf1cd1e6d2)

8 years agoMLK-12425-2: video: epdc: introduce epdc support
Peng Fan [Tue, 23 Feb 2016 02:14:34 +0000 (10:14 +0800)]
MLK-12425-2: video: epdc: introduce epdc support

Support EPDC.
E-Ink feature is supported by i.MX6DL/SL and i.MX7D.
For now this driver only supports i.MX6DL/SL, because the
i.MX7D EPDC driver needs pxp support which is not included
in U-Boot.

Support user defined logo file, if there is no logo file, it will
draw a black border around a white screen.

If need to enable EPDC, a waveform file is required to let all
work.

Since we need LCD_MONOCHROME mode for EPDC, we introduce LCD_MONOCHROME
support.

Please refer to Linux Reference Manual for how to flash WAVEFORM file.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Robby Cai <R63905@freescale.com>
Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit a7244f279cc3c3994bcd103f5e9a183b1075ae71)

8 years agoMLK-12425-1: mx6sl/ul: introudce more pinmux macros
Peng Fan [Mon, 22 Feb 2016 04:44:24 +0000 (12:44 +0800)]
MLK-12425-1: mx6sl/ul: introudce more pinmux macros

Introuduce more pinmux macros definitions.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 06893558f2cc042b683247989be5127a8027ebf2)

8 years agoMLK-11304 MX6 SabreSD: Disable HDMI detect
Peng Fan [Fri, 31 Jul 2015 05:19:24 +0000 (13:19 +0800)]
MLK-11304 MX6 SabreSD: Disable HDMI detect

As the HDMI splash screen feature is not well supported,
we should not set it to be the default display. In case,
users leave the 'panel' uboot environment variable empty
and connect the board with a HDMI monitor, the HDMI detect
funtion will work and enable the HDMI splash screen. So,
this patch disables HDMI detect function so that users
may only explicitly set the 'panel' variable to be 'HDMI'
to use HDMI splash screen.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit d482c54a9fbf458fdb2270cf990d8ec727823bb1)
(cherry picked from commit b484d36882c8db9ddb8262001cfef187a28051b2)

8 years agoMLK-11952 Video: IPU: Fix dereferencing NULL pointer problem
Ye.Li [Fri, 4 Dec 2015 07:17:07 +0000 (15:17 +0800)]
MLK-11952 Video: IPU: Fix dereferencing NULL pointer problem

By Coverity check,  the clk_set_rate function dereferences the clk pointer
without checking whether it is NULL. This may cause problem when clk is NULL.
Fix the problem by adding NULL check.

Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit ded2f2958d568411274eeecd265fcc1181638335)
(cherry picked from commit b58ac1502391d87470918ff8d172b2b8dc1e7a68)

8 years agoMLK-10747-2 video: ipu: Enable/disable LDB_DI clock when necessary
Liu Ying [Mon, 27 Apr 2015 10:07:47 +0000 (18:07 +0800)]
MLK-10747-2 video: ipu: Enable/disable LDB_DI clock when necessary

This patch adds enable/disable hooks support for ldb_di[0/1] clocks
and enables/disables them when necessary.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 615d4c51679a6c2ee0ed4c5e3922eec76646eef1)
(cherry picked from commit 152192507c3bbaba093783d7da32b88327705c63)

8 years agoMLK-10747-1 video: ipu: Build ldb_di clock relevant code only for MX6 and MX53
Liu Ying [Tue, 28 Apr 2015 06:20:44 +0000 (14:20 +0800)]
MLK-10747-1 video: ipu: Build ldb_di clock relevant code only for MX6 and MX53

The LDB is found in MX6 variants and MX53, so this patch makes the ldb_di clock
relevant code be built only for them.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 3e40c7466ae7d1d6ca74011bfe69ae059d412a3b)
(cherry picked from commit 0c47d4138fd2fe8aa864160e23428b2ef95f16ae)

8 years agoMLK-10774-2 HDMI: splash screen function enhancement
Peng Fan [Thu, 19 Mar 2015 02:10:07 +0000 (10:10 +0800)]
MLK-10774-2 HDMI: splash screen function enhancement

-Change HDMI video mode to VGA.
-Add pixel clock fraction part setting in IPU driver,
 fix video mode timing issue.
-Add overflow state clear workaround,
 fix kernel hang in HDMI driver issue.
-Correct IPU clock to 264MHz.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 5028519b434d5dfbe53c48ac4b115ff8b69bbac7)
(cherry picked from commit 8dcbd43b971616fb67dc3b2af32e2d33f68ed0ce)

8 years agoMLK-12865 Nand: Fix BCH debug1 register access issue
Ye Li [Tue, 31 May 2016 08:32:00 +0000 (16:32 +0800)]
MLK-12865 Nand: Fix BCH debug1 register access issue

Should have "&" to access the register address, otherwise uboot will hang.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 0b65071afaae9d6a49fb7dda2902f5c8bcd678c2)

8 years agoMLK-12693-2 nand: mxs: correct bitflip for erased NAND page
Peng Fan [Sat, 7 May 2016 08:58:24 +0000 (16:58 +0800)]
MLK-12693-2 nand: mxs: correct bitflip for erased NAND page

This patch is a porting of
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_4.1.15_1.0.0_ga&id=e4dacc44d22e9474ec456cb330df525cd805ea38
"
i.MX6QP and i.MX7D BCH module integrated a new feature to detect the
bitflip number for erased NAND page. So for these two platform, set the
erase threshold to gf/2 and if bitflip detected, GPMI driver will
correct the data to all 0xFF.

Also updated the imx6qp dts file to ditinguish the GPMI module for i.MX6Q
with the one for i.MX6QP.
"

In this patch, i.MX6UL is added and threshold changed to use ecc_strength.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 489929be0221bb7d4c46bb5bc6083650b78f73e0)
Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-12693-1 nand: mxs: fix the bitflips for erased page when uncorrectable error
Peng Fan [Fri, 6 May 2016 04:13:38 +0000 (12:13 +0800)]
MLK-12693-1 nand: mxs: fix the bitflips for erased page when uncorrectable error

This patch is porting from linux:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_4.1.15_1.0.0_ga&id=3d42fcece496224fde59f9343763fb2dfc5b0768

"
We may meet the bitflips in reading an erased page(contains all 0xFF),
this may causes the UBIFS corrupt, please see the log from Elie:

-----------------------------------------------------------------
[    3.831323] UBI warning: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read only 16384 bytes, retry
[    3.845026] UBI warning: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read only 16384 bytes, retry
[    3.858710] UBI warning: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read only 16384 bytes, retry
[    3.872408] UBI error: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read 16384 bytes
...
[    4.011529] UBIFS error (pid 36): ubifs_recover_leb: corrupt empty space LEB 27:237568, corruption starts at 9815
[    4.021897] UBIFS error (pid 36): ubifs_scanned_corruption: corruption at LEB 27:247383
[    4.030000] UBIFS error (pid 36): ubifs_scanned_corruption: first 6569 bytes from LEB 27:247383
-----------------------------------------------------------------

This patch does a check for the uncorrectable failure in the following steps:

   [0] set the threshold.
       The threshold is set based on the truth:
       "A single 0 bit will lead to gf_len(13 or 14) bits 0 after the BCH
        do the ECC."

        For the sake of safe, we will set the threshold with half the gf_len, and
        do not make it bigger the ECC strength.

   [1] count the bitflips of the current ECC chunk, assume it is N.

   [2] if the (N <= threshold) is true, we continue to read out the page with
       ECC disabled. and we count the bitflips again, assume it is N2.
       (We read out the whole page, not just a chunk, this makes the check
        more strictly, and make the code more simple.)

   [3] if the (N2 <= threshold) is true again, we can regard this is a erased
       page. This is because a real erased page is full of 0xFF(maybe also has
       several bitflips), while a page contains the 0xFF data will definitely
       has many bitflips in the ECC parity areas.

   [4] if the [3] fails, we can regard this is a page filled with the '0xFF'
       data.
"

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit ceb324a2914487aa517a6c70a06a20b5e3438fda)

8 years agoMLK-12603: mtd: gpmi: may use legacy bch geometry in u-boot
Han Xu [Mon, 28 Mar 2016 16:26:51 +0000 (11:26 -0500)]
MLK-12603: mtd: gpmi: may use legacy bch geometry in u-boot

provide one config "CONFIG_NAND_MXS_BCH_LEGACY_GEO" to keep using legacy
bch geometry.

NOTICE: the feature must be enabled/disabled in both u-boot and kernel.

Signed-off-by: Han Xu <han.xu@nxp.com>
(cherry picked from commit 0abc9c182c24f88522bd74fa1b53cd2fa3477184)
(cherry picked from commit 772af34b1216acc8e6a1a3faf43fef7c90b26a2f)
Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-12214 NAND:apbh_dma: Fix logically dead code issue
Ye.Li [Wed, 13 Jan 2016 02:06:59 +0000 (10:06 +0800)]
MLK-12214 NAND:apbh_dma: Fix logically dead code issue

The list_first_entry always assumes the list is not empty, it won't return NULL pointer when
the list is empty. So the "if (pdesc == NULL)" becomes a dead code. Fix the issue by calling
the list_empty before the list_first_entry.

(Coverity CID 29934)

Signed-off-by: Ye.Li <ye.li@nxp.com>
(cherry picked from commit ff3923f294cc2e15f436d7520b4042736b1b48a6)

8 years agoMLK-11718-2: mtd: nand: change the BCH layout setting for large oob NAND
Han Xu [Fri, 9 Oct 2015 18:29:41 +0000 (13:29 -0500)]
MLK-11718-2: mtd: nand: change the BCH layout setting for large oob NAND

The cod change updated the NAND driver BCH ECC layout algorithm to
support large oob size NAND chips(oob > 1024 bytes).

Current implementation requires each chunk size larger than oob size so
the bad block marker (BBM) can be guaranteed located in data chunk. The
ECC layout always using the unbalanced layout(Ecc for both meta and
Data0 chunk), but for the NAND chips with oob larger than 1k, the driver
cannot support because BCH doesn’t support GF 15 for 2K chunk.

The change keeps the data chunk no larger than 1k and adjust the ECC
strength or ECC layout to locate the BBM in data chunk. General idea for
large oob NAND chips is

1.Try all ECC strength from the minimum value required by NAND spec to
the maximum one that works, any ECC makes the BBM locate in data chunk
can be chosen.

2.If none of them works, using separate ECC for meta, which will add one
extra ecc with the same ECC strength as other data chunks. This extra
ECC can guarantee BBM located in data chunk, of course, we need to check
if oob can afford it.

Signed-off-by: Han Xu <b45815@freescale.com>
(cherry picked from commit 78f620a6d6ab44bd34e42f00abe4673db099ca73)

8 years agoENGR00315894-60 GPIO: Modify driver mxc_gpio to support RDC Semaphores
Ye.Li [Wed, 11 Jun 2014 08:21:29 +0000 (16:21 +0800)]
ENGR00315894-60 GPIO: Modify driver mxc_gpio to support RDC Semaphores

For GPIO group which shared by multiple masters, it may set in RDC
to shared and semaphore required. Before access the GPIO register,
the GPIO driver must get the RDC semaphore, and release the semaphore
after the GPIO register access.

When CONFIG_MXC_RDC is set, the features related to RDC semaphores
is enabled in mxc_gpio driver.

Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 84d63e2e2ce12f714e88baad8b2325684614a7c1)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Conflicts:
drivers/gpio/mxc_gpio.c

(cherry picked from commit c9943b9c8a78bb2c9886bfe582e82978387d8dee)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit faf94726cac8316c4342e19936f1e03ef283ace3)
(cherry picked from commit 6c0474fe0e4fc543c62b22c05c2702a881f56418)

8 years agoMLK-12416-10: mx6ul: Add comments for BEE
Peng Fan [Wed, 16 Mar 2016 06:08:07 +0000 (14:08 +0800)]
MLK-12416-10: mx6ul: Add comments for BEE

Add comments for enabling BEE.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit e5cc58b71e28b2bb3c66fbe8af373cff31eb3017)

8 years agoMLK-11528 imx: mx6ul check fuse before init bee
Peng Fan [Thu, 10 Sep 2015 06:40:01 +0000 (14:40 +0800)]
MLK-11528 imx: mx6ul check fuse before init bee

Need to check fuse bit 25 of bank 0 word 4 before initialize bee.
The bit: 0 means bee enabled, 1 means bee disabled.
If disabled, continuing initialize bee will cause system hang, so
need to check this bit before initialize bee.

Add macro to enable BEE in header file, default disabled.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit ef4cb7c53418e4e1dd7cfcb7c6974cfea77ef3c0)

8 years agoMLK-10958 imx: mx6ul support Bus Encryption Engine
Peng Fan [Mon, 25 May 2015 08:31:05 +0000 (16:31 +0800)]
MLK-10958 imx: mx6ul support Bus Encryption Engine

This patch is to support Bus Encryption Engine(BEE) for i.MX 6UL.
Supported feature:
1. SNVS key and soft key
2. CTR and ECB mode
3. Specify address region to bee.

Two commands are included:
bee init [key] [mode] [start] [end] - BEE block initial
    "Example: bee init 1 1 0x80000000 0x80010000\n"
bee test [region]
    "Example: bee test 1\n"

Mapping:
[0x10000000 - (0x10000000 + size - 1)] : [start - (start + size - 1)]
[0x30000000 - (0x30000000 + IRAM_SIZE - 1)] : [IRAM_BASE_ADDR -
(IRAM_BASE_ADDR + IRAM_SIZE - 1)]

Whatever start is, start - (start + size -1) will be fixed mapping to
0x10000000 - (0x10000000 + size - 1)

Since default AES region's protected size is SZ_512M, so
on mx6ul evk board, you can not simply run 'bee init', it will
overlap with uboot execution environment, you can use
'bee init 0 0 0x80000000 0x81000000'.

If want to use bee, Need to define CONFIG_CMD_BEE in board configuration
header file, since CONFIG_CMD_BEE default is not enabled.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 29b9bdbbdac9678dba9b7bc2d3662598e9c548a5)
(cherry picked from commit 6d45292ff7e7020a48842f033f8a337daabe4476)

8 years agoMLK-13335 mx6sl: Fix build break for all i.MX6SL boards
Ye Li [Thu, 13 Oct 2016 05:14:56 +0000 (13:14 +0800)]
MLK-13335 mx6sl: Fix build break for all i.MX6SL boards

Since the UART1 register base name is changed from UART1_IPS_BASE_ADDR
to UART1_BASE to align with other i.MX6 chips. Should update the board
configuration header file with the new name.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 18019b8f4b65d3261db6488e416eae66a6500316)

8 years agoMLK-12416-4: imx: mx6: update imx-regs.h
Peng Fan [Fri, 19 Feb 2016 07:18:06 +0000 (15:18 +0800)]
MLK-12416-4: imx: mx6: update imx-regs.h

Update imx-regs.h to align with 2016.03

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 9bbd54e44ae1f0868d3f0dd34975e76606b0a5e8)

8 years agoMLK-13440-5 fsl_usdhc: Remove the CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT
Ye Li [Tue, 8 Nov 2016 06:21:41 +0000 (14:21 +0800)]
MLK-13440-5 fsl_usdhc: Remove the CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT

Since we have added the "vs18_enable" parameter for fixed 1.8v I/O, remove
the CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT. This configuration can only work
with one MMC device. If more devices are supported, this will set 1.8v to
all controllers, so will cause problem to 3.3v devices.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit c1de6a58e44f4770b32a41e3689884abf7449e1b)

8 years agoMLK-13440-4 warp: Replace CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT by using vs18_enable...
Ye Li [Tue, 8 Nov 2016 06:17:22 +0000 (14:17 +0800)]
MLK-13440-4 warp: Replace CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT by using vs18_enable parameter

Change to use the new way to set the vs18_enable field to 1 for fixed 1.8v I/O eMMC.
Don't use CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT any longer.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit c1bf2d975be66597f8fc25c9eef0f02bda3c5050)

8 years agoMLK-13440-1: fsl_usdhc: Add configuration parameter for using fixed 1.8V I/O
Ye Li [Tue, 8 Nov 2016 02:32:58 +0000 (10:32 +0800)]
MLK-13440-1: fsl_usdhc: Add configuration parameter for using fixed 1.8V I/O

When using eMMC with 1.8V I/O, we have to set the VSELECT bit at this USDHC controller
setup and init. The CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT has problem that it will
apply to all USDHC controllers and it only set the 1.8V at init phase. So if user does not
select to the eMMC device, the voltage on the I/O pins are not correct.

This patch adds a parameter "vs18_enable" in fsl_esdhc_cfg structure and priv data, so each controller
can have different settings. The default value is 0 for 3.3V, which is compatible with current
codes. When setting this value to 1, at USDHC setup and init phase the driver will set the
VSELECT bit.

For DM driver, the vqmmc-supply property will be searched for current usdhc node. If the vqmmc-supply is
set to 1800000 uV, the vs18_enable in priv data will be set to 1.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit ebd872f491af27c38a0698d226222ea5093c563c)

8 years agoMLK-14423-2 gpio: 74x164: make oe-pins optional
Peng Fan [Mon, 6 Feb 2017 08:20:53 +0000 (16:20 +0800)]
MLK-14423-2 gpio: 74x164: make oe-pins optional

Make oe-pins optional because some boards have fixed it to enable.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14423-1 spi: kconfig: add soft spi Kconfig entry
Peng Fan [Mon, 6 Feb 2017 08:08:47 +0000 (16:08 +0800)]
MLK-14423-1 spi: kconfig: add soft spi Kconfig entry

Add the Kconfig entry for SOFT_SPI which uses gpio to simulate the
SPI signals. We use it for accessing 74x164 on some i.MX boards.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14422 imx7d: wdog: Overwrite the reset_cpu to turn off internal reset signal
Ye Li [Tue, 7 Feb 2017 14:48:01 +0000 (22:48 +0800)]
MLK-14422 imx7d: wdog: Overwrite the reset_cpu to turn off internal reset signal

Set wdog WCR register SRS bit to turn off internal reset signal WDOG_RESET_B_DEB
for mx7d. So that the warm reset is disabled.
The WDA is cleared to output WDOG_B immediately to reset the board.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-11035 imx: mx6 update thermal slope factors
Peng Fan [Thu, 21 May 2015 01:09:58 +0000 (09:09 +0800)]
MLK-11035 imx: mx6 update thermal slope factors

From temp sensor guys:
"
I confirmed the math with him(had do the accuracy study) today.
The new, final equation is:

Tmeas = (Nmeas - n1) / slope + t1 + offset

n1= fused room count
t1= 25
offset=3.580661
slope= 0.4148468 – 0.0015423*n1
"

87723f903454aaf17336e0fe9098ea7911c19f3c update the thermal with not
accurate slope parameters. This patch fix it.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 0d4904f5929cecd66f0b60cf8ebdcb0e6a2f733e)

8 years agoMLK-10827 imx: mx6 update thermal driver according new equation
Peng Fan [Wed, 6 May 2015 06:39:46 +0000 (14:39 +0800)]
MLK-10827 imx: mx6 update thermal driver according new equation

From IC guys:
"
After a thorough accuracy study of the Temp sense circuit,
we found that with our current equation, an average part can
read 7 degrees lower than a known forced temperature.
We also found out that the standard variance was around 2C;
which is the tightest distribution that we could create.
We need to change the temp sense equation to center the average
part around the target temperature.

Old Equation:
Temp = Troom,cal – slope*(Count measured – Count room fuse)
Where
Troom,cal = 25C  and
Slope = 0.4297157 – (0.0015974 * Count room fuse)

New Equation:
Temp = Troom,cal – slope*(Count measured – Count room fuse) +offset
Where
Troom,cal = 25C  and
Slope = 0.4445388 – (0.0016549 * Count room fuse)
Offset = 3.580661
"

According the new equation, update the thermal driver.
c1 and c2 changed to u64 type and update comments.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 87723f903454aaf17336e0fe9098ea7911c19f3c)
(cherry picked from commit 3392203fc3ae2f0701461143094cfbb112f7bc04)

8 years agoMLK-14420-3 mx6qsabresd: Update mx6qsabresd to enable OF_CONTROL and DM drivers
Ye Li [Tue, 7 Feb 2017 13:33:57 +0000 (21:33 +0800)]
MLK-14420-3 mx6qsabresd: Update mx6qsabresd to enable OF_CONTROL and DM drivers

Modify and remove configurations conflicts with DM drivers from head file.
Enable DM drivers and OF_CONTROL in defconfig.
Also update the GPIO usage to call gpio_request before any gpio using, and
update power_init_board since the PMIC APIs are changed in Pfuze DM driver.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14420-2 DTS: add DTS file for imx6q sabresd board
Ye Li [Tue, 7 Feb 2017 13:18:19 +0000 (21:18 +0800)]
MLK-14420-2 DTS: add DTS file for imx6q sabresd board

Copy the dts and dtsi files from kernel to support imx6q sabresd board.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14420-1 DTS: Update imx6qdl relevant dts and clock definitions
Ye Li [Tue, 7 Feb 2017 13:00:04 +0000 (21:00 +0800)]
MLK-14420-1 DTS: Update imx6qdl relevant dts and clock definitions

Get the latest dtsi files and clock.h for imx6qdl from kernel

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14421 imx: Add pfuze pmic common init for DM pmic driver
Ye Li [Tue, 24 Jan 2017 08:19:21 +0000 (16:19 +0800)]
MLK-14421 imx: Add pfuze pmic common init for DM pmic driver

Since the DM pmic driver has changed the driver API, add a new file
pfuze_dm.c for common pfuze100 init.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoPrepare v2017.03
Tom Rini [Mon, 13 Mar 2017 17:54:16 +0000 (13:54 -0400)]
Prepare v2017.03

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoscripts/config_whitelist.txt: Regenerate
Tom Rini [Mon, 13 Mar 2017 17:50:17 +0000 (13:50 -0400)]
scripts/config_whitelist.txt: Regenerate

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoconfigs: Re-sync
Tom Rini [Mon, 13 Mar 2017 17:48:42 +0000 (13:48 -0400)]
configs: Re-sync

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoarm: omap-common: Fix typo in CONFIG_OMAP54XX guard
Matthijs van Duin [Tue, 7 Mar 2017 02:42:24 +0000 (03:42 +0100)]
arm: omap-common: Fix typo in CONFIG_OMAP54XX guard

Some initialization was unintentionally being skipped on omap5.

Fixes: f5af0827f276 ("arm: omap-common: Guard some parts of the code with CONFIG_OMAP44XX/OMAP54XX")
Signed-off-by: Matthijs van Duin <matthijsvanduin@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agotools: binman: change shebang from python into python2
Jörg Krause [Mon, 6 Mar 2017 20:07:11 +0000 (21:07 +0100)]
tools: binman: change shebang from python into python2

This tool does not work with Python 3. Change the shebang to make sure the
script is run by a Python 2 interpreter.

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
8 years agoarm: OMAP2+: nandecc: propagate error to command return status
Ladislav Michl [Mon, 6 Mar 2017 12:54:30 +0000 (13:54 +0100)]
arm: OMAP2+: nandecc: propagate error to command return status

Currently nandecc returns zero even if underlaying
omap_nand_switch_ecc function fails. Fix that by
propagating error returned to command return value.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoMerge branch 'pmic' of git://git.denx.de/u-boot-mmc
Tom Rini [Fri, 10 Mar 2017 00:52:57 +0000 (19:52 -0500)]
Merge branch 'pmic' of git://git.denx.de/u-boot-mmc

8 years agoARM: Migrate errata to Kconfig
Tom Rini [Tue, 7 Mar 2017 12:13:42 +0000 (07:13 -0500)]
ARM: Migrate errata to Kconfig

This moves all of the current ARM errata from various header files and in to
Kconfig.  This allows for a minor amount of cleanup as we had some instances
where both a general common header file was enabling errata as well as the
board config.  We now just select these once at the higher level in Kconfig

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoomap4: Migrate to using imply
Tom Rini [Fri, 3 Mar 2017 20:33:33 +0000 (15:33 -0500)]
omap4: Migrate to using imply

Move the default y options under arch/arm/mach-omap2/omap4/Kconfig to be
using imply instead in arch/arm/Kconfig

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoomap3: Migrate to using imply
Tom Rini [Fri, 3 Mar 2017 20:33:32 +0000 (15:33 -0500)]
omap3: Migrate to using imply

Move the default y options under arch/arm/mach-omap2/omap3/Kconfig to be
using imply instead in arch/arm/Kconfig

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoTI: Migrate board/ti/common/Kconfig to imply
Tom Rini [Fri, 3 Mar 2017 20:33:31 +0000 (15:33 -0500)]
TI: Migrate board/ti/common/Kconfig to imply

The option that we had set in board/ti/common/Kconfig as default y are
best done with imply under the appropriate main Kconfig option instead.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoam335x_evm: Switch to using imply keyword
Tom Rini [Fri, 3 Mar 2017 20:33:30 +0000 (15:33 -0500)]
am335x_evm: Switch to using imply keyword

These particular SPL options are part of what the ROM provides, but for
compatibility with how we have previously used them, move them to being
implied by the board being selected.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agokconfiglib.py: Kludge in 'imply' support
Tom Rini [Fri, 3 Mar 2017 20:33:29 +0000 (15:33 -0500)]
kconfiglib.py: Kludge in 'imply' support

Currently upstream does not yet understand the imply keyword.  For what
we use kconfiglib.py for today, this is OK.  We only need to be able to
evaluate in order to make boards.cfg and none of those choices will
depend on how imply evaluates out.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agodo_smhload: fix return code
Ryan Harkin [Thu, 2 Mar 2017 17:45:16 +0000 (17:45 +0000)]
do_smhload: fix return code

do_smhload was using a ulong to store the return value from
smh_load_file. That returns an int, where -1 indicates an error. As a
ulong will never be negative, smh_load_file errors were not detected and
so_smhload always returned zero.

Also, when errors were spotted, do_smhload was returning 1, rather than
the enumeration CMD_RET_FAILURE (which is also 1).

Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
8 years agoFreescale/NXP: Migrate CONFIG_FSL_CAAM to defconfigs
Tom Rini [Wed, 1 Mar 2017 21:51:58 +0000 (16:51 -0500)]
Freescale/NXP: Migrate CONFIG_FSL_CAAM to defconfigs

In some cases this is absolutely required, so select this for some secure
features.  This also requires migration of RSA_FREESCALE_EXP

Cc: Ruchika Gupta <ruchika.gupta@nxp.com>
Cc: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Cc: Naveen Burmi <NaveenBurmi@freescale.com>
Cc: Po Liu <po.liu@freescale.com>
Cc: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Cc: Priyanka Jain <Priyanka.Jain@freescale.com>
Cc: Sumit Garg <sumit.garg@nxp.com>
Cc: Shaohui Xie <Shaohui.Xie@freescale.com>
Cc: Chunhe Lan <Chunhe.Lan@freescale.com>
Cc: Feng Li <feng.li_2@nxp.com>
Cc: Alison Wang <alison.wang@freescale.com>
Cc: Mingkai Hu <Mingkai.Hu@freescale.com>
Cc: York Sun <york.sun@nxp.com>
Cc: Saksham Jain <saksham.jain@nxp.freescale.com>
Cc: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agotools: Remove CONFIG_SYS_TEXT_BASE in Makefile
Patrick Delaunay [Tue, 28 Feb 2017 18:29:11 +0000 (19:29 +0100)]
tools: Remove CONFIG_SYS_TEXT_BASE in Makefile

This define is not used in tools sources and can be removed
to avoid unnecessary link between tools and defconfig

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agokbuild: turn of dtc unit address warnings by default
Masahiro Yamada [Mon, 27 Feb 2017 06:24:45 +0000 (15:24 +0900)]
kbuild: turn of dtc unit address warnings by default

DTC 1.4.2 or later checks DT unit-address without reg property and
vice-versa, and generates lots of warnings.  Fixing DT files will
take for a while.  Until then, let's turn off the check unless
building with W=*.

Introduce a new helper dtc-option to check if the option is supported
in order to suppress warnings on older versions.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agosunxi: power: axp809.c: Fix aldo1-2 being disabled for mvolt != 0
Rask Ingemann Lambertsen [Wed, 18 Jan 2017 20:53:40 +0000 (21:53 +0100)]
sunxi: power: axp809.c: Fix aldo1-2 being disabled for mvolt != 0

The execution flow is currently like this for aldo_num == 1 or 2:

int axp_set_aldo(int aldo_num, unsigned int mvolt)
{
...
if (mvolt == 0)
return pmic_bus_clrbits(AXP809_OUTPUT_CTRL1,
AXP809_OUTPUT_CTRL1_ALDO1_EN << (aldo_num - 1));
...
return pmic_bus_clrbits(AXP809_OUTPUT_CTRL1,
  AXP809_OUTPUT_CTRL1_ALDO1_EN << (aldo_num - 1));
 }

I.e. aldo1 and aldo2 will always be disabled. This patch fixes it by
setting (rather than clearing) the enable bit when mvolt != 0.

Signed-off-by: Rask Ingemann Lambertsen <rask@formelder.dk>
Fixes: 795857df413a ("sunxi: power: add AXP809 support")

8 years agoMerge branch 'master' of git://git.denx.de/u-boot-video
Tom Rini [Wed, 8 Mar 2017 12:14:21 +0000 (07:14 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-video

8 years agoMerge branch 'master' of git://git.denx.de/u-boot-net
Tom Rini [Wed, 8 Mar 2017 12:14:18 +0000 (07:14 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-net

8 years agoomap3_logic: Move SPL Stack into SDRAM
Adam Ford [Wed, 8 Mar 2017 03:27:52 +0000 (21:27 -0600)]
omap3_logic: Move SPL Stack into SDRAM

A previous patch broke the board. This patch will add missing part
from the previous patch and also move the SPL Stack into SDRAM at
0x82000000.

Tested with GCC 4.8.2 and GCC 6.2

Fixes: 0959649dc6d9 ("omap3_logic: Switch to simple malloco in SPL")

Signed-off-by: Adam Ford <aford173@gmail.com>
Changes in V2:
  - Keep CONFIG_SPL_SYS_MALLOC_SIMPLE
  - Add CONFIG_SYS_MALLOC_F_LEN=0x2000 (8 MB)

8 years agovideo: cfb_console: fix 32-bit display on 64-bit architectures
Andre Przywara [Mon, 6 Mar 2017 01:13:38 +0000 (01:13 +0000)]
video: cfb_console: fix 32-bit display on 64-bit architectures

"unsigned long" is a lousy data type when it comes to match peripheral
hardware registers with a fixed size.
Just do the obvious and match a 32-bit display format with an "u32"
data type for casting.
This fixes the logo display on 64-bit architectures, which produced
a black line on the right side of the logo with non-black backgrounds.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
8 years agonet: zynq_gem: Fix masking of supported phydev features
Nathan Rossi [Sun, 5 Mar 2017 14:36:23 +0000 (00:36 +1000)]
net: zynq_gem: Fix masking of supported phydev features

When the zynq_gem driver initializes the phy it sets the supported
features that the phy can support and advertise. However instead of
masking the supported features such that it limits the available
features it sets the phy to have the exact supported features of the
zynq_gem. This is problematic as it will enable features that a phy does
not have or cannot advertise.

Specifically this appears as an issue when using a phy that is only
capable of 10/100, but the zynq_gem driver will override this and try to
enable and advertise 10/100/1000.

Reported-by: Arno Steffens <star@gmx.li>
Fixes: 80243528ef ("net: gem: Fix gem driver on 1Gbps LAN")
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Tested-by: Arno Steffens <star@gmx.li>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
8 years agonet: macb: Fix ETH not found when clock not support
Wenyou Yang [Tue, 14 Feb 2017 08:24:40 +0000 (16:24 +0800)]
net: macb: Fix ETH not found when clock not support

For the boards such as smartweb on which the clock driver isn't
supported, the ethernet fail to be found when booting up with
the below log.
---8<---
Net:   No ethernet found.
--->8---

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Tested-by: Heiko Schocher <hs@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agoarmv8: spl: Call spl_relocate_stack_gd for ARMv8
Philipp Tomsich [Wed, 1 Mar 2017 20:04:15 +0000 (21:04 +0100)]
armv8: spl: Call spl_relocate_stack_gd for ARMv8

As part of the startup process for boards using the SPL, we need to
call spl_relocate_stack_gd. This is needed to set up malloc with its
DRAM buffer.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoarmv5te: make 'ret lr' produce iinterworking 'bx lr'
Albert ARIBAUD [Mon, 27 Feb 2017 19:19:07 +0000 (20:19 +0100)]
armv5te: make 'ret lr' produce iinterworking 'bx lr'

Current ARM assembler helper for the 'return to caller' pseudo-instruction
turns 'ret lr' into 'mov pc, lr' for ARMv5TE. This causes the core to remain
in its current ARM state even when the routine doing the 'ret' was called
from Thumb-1 state, triggering an undefined instruction exception.

This causes early run-time failures in all boards compiled using the Thumb-1
instruction set (for instance the Open-RD family).

ARMv5TE supports 'bx lr' which properly implements interworking and thus
correctly returns to Thumb-1 state from ARM state.

This change makes 'ret lr' turn into 'bx lr' for ARMv5TE.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
8 years agoPrepare v2017-rc3
Tom Rini [Mon, 27 Feb 2017 22:36:21 +0000 (17:36 -0500)]
Prepare v2017-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoarm: mach-omap2: Flush cache after FIT post-processing image
Andrew F. Davis [Wed, 22 Feb 2017 23:46:39 +0000 (17:46 -0600)]
arm: mach-omap2: Flush cache after FIT post-processing image

After we authenticate/decrypt an image we need to flush the caches
as they may still contain bits of the encrypted image. This will
cause failures if we attempt to jump to this image.

Reported-by: Yogesh Siraswar<yogeshs@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agodrivers/net/Kconfig: Correct use of apostrophe
Tom Rini [Mon, 20 Feb 2017 14:38:03 +0000 (09:38 -0500)]
drivers/net/Kconfig: Correct use of apostrophe

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Mon, 27 Feb 2017 17:10:05 +0000 (12:10 -0500)]
Merge branch 'master' of git://denx.de/git/u-boot-imx