linux.git
7 years agoMLK-10202-1 ARM: imx6sx-sdb: add tx-d-cal property for usbphy
Peter Chen [Wed, 4 Feb 2015 08:18:26 +0000 (16:18 +0800)]
MLK-10202-1 ARM: imx6sx-sdb: add tx-d-cal property for usbphy

It is used to improve signal quality for board.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit a944c36f13b6a9d3eca073516416255e9160210e)

7 years agoMLK-10170 usb: phy: mxs: keep USBPHY2's clk always on
Peter Chen [Tue, 3 Feb 2015 08:13:31 +0000 (16:13 +0800)]
MLK-10170 usb: phy: mxs: keep USBPHY2's clk always on

Per IC engineer request, we need to keep USBPHY2's clk always on,
in this way, the USBPHY2 (PLL7) power can be controlled by
hardware suspend signal totally. It is benefit of USB remote wakeup
case which needs the resume signal be sent out as soon as
possible (without software interfere).

It is intended to fix the issue which this ticket describes, the
reason for this issue is the host does not send resume in time.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 98888b352377f9ebaee03bedce8c239691f45262)

7 years agoMLK-10196-4 usb: phy: mxs: Using regulator phy-3p0
Peter Chen [Tue, 3 Feb 2015 02:10:53 +0000 (10:10 +0800)]
MLK-10196-4 usb: phy: mxs: Using regulator phy-3p0

It is one of PHY's power, and we need to enable it to keep signal
quality good, and pass eye diagram test.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 3a8670ee7ff698521369e8292bba7ef288a12335)

7 years agoMLK-10196-3 regulator: anatop: Add non core enable/disable
Peter Chen [Tue, 3 Feb 2015 02:09:33 +0000 (10:09 +0800)]
MLK-10196-3 regulator: anatop: Add non core enable/disable

Add non core enable/disable API.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 38681ee653cb75fa1839547414c7780c4f3a7c00)

7 years agoMLK-10196-2 doc: anatop-regulator: add anatop-enable-bit property
Peter Chen [Mon, 2 Feb 2015 08:35:00 +0000 (16:35 +0800)]
MLK-10196-2 doc: anatop-regulator: add anatop-enable-bit property

It is optional, and only for 3p0, 2p5, and 1p1.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 46f1841de3e50e4f502478d341674bb1f01a48fc)

7 years agoMLK-11340-42 usb: chipidea: usb vbus glitch check logic change
Li Jun [Wed, 10 Sep 2014 09:49:33 +0000 (17:49 +0800)]
MLK-11340-42 usb: chipidea: usb vbus glitch check logic change

This patch changes the vbus glitch check to cover usb otg certification
case, so the possible cases of vbus rise:
- USB vbus can reach AVV(4.4v), valid vbus.
- USB vbus keeps above BSV(0.8v) but lower than AVV(4.4v) for
  more than 300ms, we think it's valid vbus event, this can meet
  usb otg certificataion case(B device can do connection in 1s when
  vbus is 4.0v).
- USB vbus cannot be kept above BSV(0.8v) for more than 300ms,
  it's a vbus glitch.
In case of vbus drop: if the vbus on flag is not set, it's a vbus glitch,
otherwise it's a valid vbus drop event.

Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit de5ab444839b6d1492d697256ea2b8a1dcaffc62)
(cherry picked from commit 83788415169cfa1555dd348a9ff03deb66b08bad)

7 years agoMLK-11340-41 usb: chipidea: add vbus glitch handling
Li Jun [Fri, 20 Jun 2014 07:52:14 +0000 (15:52 +0800)]
MLK-11340-41 usb: chipidea: add vbus glitch handling

We add vbus glitch handling for both BSV rise and drop interruptes.
If it is a vbus glitch (higher than BSV but cannot reach AVV), ignore it.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit 827f2fe71e6222882930db7e89460087cb3bce5b)
(cherry picked from commit 4f9cefe4cf4bb093c8c1766409320dc86dd9a596)

7 years agoMLK-10101-5 usb: chipidea: otg: init otg_fsm of usb_bus while start host
Li Jun [Tue, 27 Jan 2015 09:26:48 +0000 (17:26 +0800)]
MLK-10101-5 usb: chipidea: otg: init otg_fsm of usb_bus while start host

Set otg_fsm of usb_bus to be ci->fsm while start host.

Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit 65efc6c5f3936b254a77cf02478d1268585def84)

7 years agoMLK-10101-4 usb: add otg_fsm pointer in usb_bus
Li Jun [Tue, 27 Jan 2015 09:11:14 +0000 (17:11 +0800)]
MLK-10101-4 usb: add otg_fsm pointer in usb_bus

Add otg_fsm pointer in struct of usb_bus for access otg_fsm via bus.
Original way was to put it in usb_otg, then usb host can access otg_fsm
via hcd->usb_phy->otg->fsm, since usb_phy will not be the future direction,
instead phy is preferred, so this way may not work. It's more direct and
simple to put it in usb_bus.

Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit c118afccbbb1c78938c649ee72758213c22cf489)

7 years agoMLK-9618-1 doc: usb: chipidea: select gadget drivers for otg compliance test
Li Jun [Sun, 28 Sep 2014 05:55:01 +0000 (13:55 +0800)]
MLK-9618-1 doc: usb: chipidea: select gadget drivers for otg compliance test

This patch adds guide for selecting available gadget drivers for otg and EH
compliance tests.

Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit 520cac9e4fe938887dd45b5b4df6c8e35e125a59)
(cherry picked from commit 6534fab0bd77be544629ac04d4b8bb677d0a3aec)

7 years agoMLK-11340-39 usb: chipidea: otg: clear b_bus_req when vbus is off
Li Jun [Mon, 22 Sep 2014 08:19:59 +0000 (16:19 +0800)]
MLK-11340-39 usb: chipidea: otg: clear b_bus_req when vbus is off

In case of b_peripheral --> b_wait_acon --> b_idle due to vbus off
in b_wait_acon state, b_bus_req cannot be cleared in b_idle state,
which result in b device will do data pulse because b_bus_req is set.
This patch fix this issue by clear the input variable b_bus_req when
vbus is off.

Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit bc600546bf9193f1a39186ad4c07a5fd497c7bfd)
(cherry picked from commit c0ea9bfcd948e2d79ea77d22756550f498281cbb)

7 years agoMLK-10101-3 usb: chipidea: otg: enable BSV irq when OTG B-device in host mode
Li Jun [Tue, 27 Jan 2015 07:01:57 +0000 (15:01 +0800)]
MLK-10101-3 usb: chipidea: otg: enable BSV irq when OTG B-device in host mode

When B-device in host mode, if Vbus is off by A-device or A-device is removed,
B-device should update charger status correctly. This patch enables BSV irq
for B-device in all states, so the charger connection and removal can be early
handled by BSV change irq.

Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit eb7c192ce6ce077471dfdcdc4eb6cc9da4a7c01a)

7 years agoMLK-10132-4 usb: chipidea: imx: disable usb wakeup in probe
Li Jun [Tue, 27 Jan 2015 02:25:25 +0000 (10:25 +0800)]
MLK-10132-4 usb: chipidea: imx: disable usb wakeup in probe

Disable usb wakeup as initial setting in probe.

Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit bf54f23766bcebd781f1c09bd68bc00d790160c8)

7 years agoMLK-11340-38 usb: chipidea: imx: enable different wakeup setting
Peter Chen [Fri, 3 Jan 2014 05:45:30 +0000 (13:45 +0800)]
MLK-11340-38 usb: chipidea: imx: enable different wakeup setting

We have different wakeup setting for different roles:
For peripheral-only mode, we may only enable vbus wakeup.
The Micro-AB cable should not be considered as wakeup source.
For host-only mode, the ID change or vbus change should not be
considered as wakeup source.
For OTG mode, all wakeup setting should be considered as wakeup
source.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 632e2eda5d071781479e0e0a80496c9a198d614f)

7 years agoMLK-11340-37 usb: chipidea: add query_available_role interface
Peter Chen [Fri, 3 Jan 2014 05:42:56 +0000 (13:42 +0800)]
MLK-11340-37 usb: chipidea: add query_available_role interface

The glue layer may need to know current available role, add
ci_hdrc_query_available_role for that.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 5c340402131ca6eacaeb122deb1ee59bcea2778c)

7 years agoMLK-9785-1 usb: host: ehci-hcd: enable park mode
Peter Chen [Tue, 4 Nov 2014 12:46:15 +0000 (20:46 +0800)]
MLK-9785-1 usb: host: ehci-hcd: enable park mode

Enable park mode will improve the performance a lot at USB ethernet use
case, but a little at USB mass storage use case, and it is not harm from
the tests. Below the performance comparison at imx6sl:

USB Ethernet (Mbps)
Default Enable Park
TX 192 262
RX 262 290

USB Mass Storage (MB/s)
Read 21.8 22.9
Write 19.5 22.8

This patch is used for freescale internal.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit b2289a78958859cff37508e4db0314463f33c2e0)

7 years agoMLK-11340-36 usb: chipidea: udc: don't do hardware access if gadget has stopped
Peter Chen [Tue, 26 Nov 2013 05:33:21 +0000 (13:33 +0800)]
MLK-11340-36 usb: chipidea: udc: don't do hardware access if gadget has stopped

After _gadget_stop_activity is executed, we can consider the hardware
operation for gadget has finished, and the udc can be stopped and enter
low power mode. So, any later hardware operations (from usb_ep_ops APIs
or usb_gadget_ops APIs) should be considered invalid, any deinitializatons
has been covered at _gadget_stop_activity.

I meet this problem when I plug out usb cable from PC (using g_mass_storage),
my callstack like: vbus interrupt->.vbus_session->composite_disconnect
->pm_runtime_put_sync(&_gadget->dev), the composite_disconnect will
call fsg_disable, but fsg_disable calls usb_ep_disable using async way,
there are register accesses for usb_ep_disable. So sometimes, I get system
hang due to visit register without clock, sometimes not.

The Linux Kernel USB maintainer Alan Stern suggests this kinds of solution.
See: http://marc.info/?l=linux-usb&m=138541769810983&w=2.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit ac760d29366f19eb1a4d4c37899b33019570a447)
(cherry picked from commit c246b1f129daa7f15fc88849ef2d04db54935c67)

7 years agoMLK-10086-5 usb: chipidea: imx: define quirk CI_HDRC_IMX_EHCI_QUIRK
Peter Chen [Mon, 26 Jan 2015 05:05:45 +0000 (13:05 +0800)]
MLK-10086-5 usb: chipidea: imx: define quirk CI_HDRC_IMX_EHCI_QUIRK

Define quirk CI_HDRC_IMX_EHCI_QUIRK for necessary platforms.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit e72ee6d6f76214034c99a6435b47e125476399bd)

7 years agoMLK-10086-4 usb: chipidea: imx: add HSIC support
Li Jun [Tue, 20 Jan 2015 08:03:37 +0000 (16:03 +0800)]
MLK-10086-4 usb: chipidea: imx: add HSIC support

Add imx6 HSIC support

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 0cebf3e28ec0b7e47a45d16aa2237b819746b494)

7 years agoMLK-11340-35 usb: chipidea: host: add ehci quirk for imx controller
Peter Chen [Sun, 29 Sep 2013 02:52:43 +0000 (10:52 +0800)]
MLK-11340-35 usb: chipidea: host: add ehci quirk for imx controller

When the port goes to suspend or finishes resme, it needs to
notify PHY, it is not a standard EHCI operation, so we add a
quirk for it.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 4ffe8d85d4eed813b43cbd37e5241a8a0069021d)

7 years agoMLK-10086-3 usb: phy-nop: add the implementation of .set_suspend
Li Jun [Tue, 20 Jan 2015 08:03:38 +0000 (16:03 +0800)]
MLK-10086-3 usb: phy-nop: add the implementation of .set_suspend

Add clock enable/disable at .set_suspend if the PHY has
suspend requirement, it can be benefit of power saving for
phy and the whole system (parent clock may also be disabled).

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 6c2f853799899c37ee2f733cafd58f1b2dc1f37f)

7 years agoMLK-10086-2 ARM: imx6: add dts entries for hsic controller
Li Jun [Tue, 20 Jan 2015 08:03:36 +0000 (16:03 +0800)]
MLK-10086-2 ARM: imx6: add dts entries for hsic controller

- Add usbphy_nop, hsic uses nop phy driver
- Add anatop phandle, hsic needs to access anatop register to
change osc clock for different boards
- Add phy_type, hsic needs to config PHY parameters at portsc
- For imx6q-arm2 board, hsic has pin conflict with ethernet, we create a
  dedicated dts(imx6q-arm2-hsic.dts) for it with ethernet disabled, besides
  please make sure keep the line of data and strobe unchanged between board
  boots up and enable hsic controller.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 2f8a266d271874cd398d14556752ab4ab0be27ba)

7 years agoMLK-10086-1 usb: doc: ci-hdrc-imx: update for hsic controller
Li Jun [Tue, 20 Jan 2015 08:03:35 +0000 (16:03 +0800)]
MLK-10086-1 usb: doc: ci-hdrc-imx: update for hsic controller

Update for HSIC controller

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit c68e2fee7a6e321db9bb56b42853fe90a4e398ee)

7 years agoMLK-10132-3 usb: chipidea: udc: do not enter low power mode if vbus on
Li Jun [Fri, 23 Jan 2015 10:35:35 +0000 (18:35 +0800)]
MLK-10132-3 usb: chipidea: udc: do not enter low power mode if vbus on

This patch is to prevent usb entering low power mode if vbus is on even gadget
driver is not binded, by holding the PM count of ci->dev.
So, there are 3 pm usage_count status:
- ci->dev: 1 ci->gadget.dev: 1
  Device mode with gadget driver binded and vbus on.
- ci->dev: 1 ci->gadget.dev: 0
  USB vbus on but gadget driver not binded.
- ci->dev: 0 ci->gadget.dev: 1
  USB OTG FSM is in a_peripheral mode.
Above 2 device's pm usage_count hold by ci otg(ci->dev) and usb gadget
(ci->gadget.dev).

Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit 673c6bf1b3aa0b1b698569b9259712b0e765be32)

7 years agoMLK-9831-1 usb: chipidea: udc: refine ci_udc_start
Li Jun [Thu, 25 Dec 2014 09:34:01 +0000 (17:34 +0800)]
MLK-9831-1 usb: chipidea: udc: refine ci_udc_start

Use ci_hdrc_gadget_connect() API directly if vbus is on.

Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit 918d4837d8e7c3c3c862a9deb8d2cc86c3d2334a)

7 years agoMLK-11340-34 Documentation: usb: chipidea: Update test procedure for HNP polling...
Li Jun [Wed, 25 Jun 2014 07:28:45 +0000 (15:28 +0800)]
MLK-11340-34 Documentation: usb: chipidea: Update test procedure for HNP polling support

Update HNP test procedure as HNP polling is supported.

Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit 4aac546c4338246b1e55647796badedf6e80bfbe)

7 years agoMLK-9618-7 usb: chipidea: otg: delay turn on vbus when detecting data pulse
Li Jun [Thu, 16 Oct 2014 14:18:00 +0000 (22:18 +0800)]
MLK-9618-7 usb: chipidea: otg: delay turn on vbus when detecting data pulse

This patch adds a timer to delay turn on vbus after detecting data pulse
from B-device, this is required by OTG SRP timing.

Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit f02ee3e93715c41f5b1e11140f36e350c7ed4d6b)

7 years agoMLK-11340-27 usb: phy-mxs: Add implementation of nofity_suspend{resume}
Peter Chen [Wed, 18 Sep 2013 05:57:59 +0000 (13:57 +0800)]
MLK-11340-27 usb: phy-mxs: Add implementation of nofity_suspend{resume}

Implementation of notify_suspend and notify_resume will be different
according to mxs_phy_data->flags.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit d1ce766d9aabdfb823131d38056ff67c94e7e20a)

7 years agoMLK-10102-10 usb: chipidea: otg: Add power lost support for otg fsm mode
Li Jun [Thu, 15 Jan 2015 13:27:40 +0000 (21:27 +0800)]
MLK-10102-10 usb: chipidea: otg: Add power lost support for otg fsm mode

This patch adds support of power lost during system sleep in otg fsm mode.

Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit 493f3c4f04f48240dacc49f84db57e7ecf90161b)

7 years agoMLK-10102-9 usb: chipidea: host: add ci_hdrc_host_has_device API
Li Jun [Thu, 15 Jan 2015 13:26:05 +0000 (21:26 +0800)]
MLK-10102-9 usb: chipidea: host: add ci_hdrc_host_has_device API

This patch adds a new API ci_hdrc_host_has_device to check if there
is usb device connected on host port.

Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit fd68eb8ef9cdac1ca861ccbc3d01d874123bf52a)

7 years agoMLK-10102-8 usb: chipidea: support role change after power lost
Li Jun [Thu, 15 Jan 2015 13:00:34 +0000 (21:00 +0800)]
MLK-10102-8 usb: chipidea: support role change after power lost

This patch is to complete support usb resume from power lost in non-otg
fsm mode:
- Re-init usb phy.
- Support role changes during system sleep with power lost.

Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit b15794487c32a6c9317f12b6bca5d2d752c9d76c)
(cherry picked from commit 3e5d97cfd2f3b350dd5b5012cf7af73ce11531ac)

7 years agoMLK-10102-7 usb: chipidea: otg: fix deadlock of usb host removal after system resume
Li Jun [Fri, 16 Jan 2015 05:11:57 +0000 (13:11 +0800)]
MLK-10102-7 usb: chipidea: otg: fix deadlock of usb host removal after system resume

This is to fix possible deadlock of usb host with mass storage removal after
system resume, by waiting host finish device disconnection and then stop host
This is a patch merge for ideas from below 2 patches:
ENGR00308442-2 usb: chipidea: otg: wait devices disconnected before stop host.
ENGR00310498 usb: chipidea: otg: fix otg role switch from host to device failure

How to reproduce:
Failure case 1:
- Enable console wakeup:
  echo enabled > /sys/class/tty/ttymxc0/power/wakeup
- Connect a udisk with ID cable to OTG port.
- Suspend the system:
  ehco mem > /sys/power/state
- Remove ID cable together with udisk.
- Wakeup the system by console.
- OTG port cannot switch to device role.
Failure case 2:
- Connect a udisk with ID cable to OTG port.
- Enable usb wakeup by ./low_power_usb.sh
- Suspend the system:
  ehco mem > /sys/power/state
- Remove ID cable together with udisk.
- System wakeup but OTG port cannot switch to device role.

Root cause:
In this case, ID change interrupt generates before port change interrupt,
so with irq disabled, ci_handle_id_switch() will find there is usb device
still connected and wait it to disconnect by sleep, but disconnect will not
happen since usb irq still disabled so port change irq has no chance to be
handled.

How this patch is fixing this issue:
This patch waits host finish handle usb device disconnection before stop host,
and enables irq before sleep and disables irq after, thus port change
rq can be handled and usb device disconnection can timely happen, then
ci_handle_id_switch() can stop host and switch to device role correctly.

Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit 56d79fbaa4bea3670542a96354ee7034239a1c1f)
(cherry picked from commit d5350035b22cfa1cef15956612a4eec36b4dc0de)

7 years agoMLK-10102-6 usb: chipidea: otg: export ci_handle_id_switch API
Li Jun [Thu, 15 Jan 2015 13:05:12 +0000 (21:05 +0800)]
MLK-10102-6 usb: chipidea: otg: export ci_handle_id_switch API

Export ci_handle_id_switch interface for controller handle id
changes during system sleep with power lost.

Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit e130afe623307b69b3737cb5a41905400082ca36)
(cherry picked from commit 7acb88a1d4d4f49cebe7c92ce92937e94c2b6486)

7 years agoMLK-10102-5 usb: chipidea: udc: support resume udc from power lost
Li Jun [Thu, 15 Jan 2015 12:49:36 +0000 (20:49 +0800)]
MLK-10102-5 usb: chipidea: udc: support resume udc from power lost

This patch implements the suspend and resume routine for udc resume
from power lost.

Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit a1389afb0c70d4024e07ff9634f10eba559af374)
(cherry picked from commit 733d0547c2cc90299b35b1b0d34073838ffcf6d9)

7 years agoMLK-10102-4 usb: chipidea: host: support resume usb from power lost
Li Jun [Thu, 15 Jan 2015 12:10:36 +0000 (20:10 +0800)]
MLK-10102-4 usb: chipidea: host: support resume usb from power lost

This patch implements the suspend and resume routine for save and restore
registers of ehci, this is to support host resume from a system sleep with
power lost.

Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit ab8e5ef4265b706b47b2e3ee36e079d63a3f0bce)
(cherry picked from commit 31039b54ec0bd2429f758626c0abfc9898c5aa82)

7 years agoMLK-10102-3 usb: chipidea: export hw_controller_reset API
Li Jun [Thu, 15 Jan 2015 12:21:45 +0000 (20:21 +0800)]
MLK-10102-3 usb: chipidea: export hw_controller_reset API

Host needs to reset controller for recovery from power lost.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 136222e683d40890f11985e61b447f2481b8bff5)

7 years agoMLK-10102-2 usb: chipidea: add suspend and resume routine for role driver
Li Jun [Thu, 15 Jan 2015 12:17:07 +0000 (20:17 +0800)]
MLK-10102-2 usb: chipidea: add suspend and resume routine for role driver

We may need to do extra things for system suspend/resume per different
roles(e.g. power lost during system sleep), so define system suspend/resume
handler for roles.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit cac6f339b30102c63f8bb5c56e77d5c7a6c6b4b5)

7 years agoMLK-10102-1 usb: chipidea: imx: usb resume from power lost during system sleep
Li Jun [Thu, 15 Jan 2015 11:13:13 +0000 (19:13 +0800)]
MLK-10102-1 usb: chipidea: imx: usb resume from power lost during system sleep

i.MX6SX mega off can shutdown domain power supply if none of peripheral
in this domain is registered as wakeup source, this patch adds usb controller
imx specific re-init after resume from such power lost during system sleep.

Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit cd37f9b7157322e28c1d336e42813d441eb1f778)

7 years agoMLK-10085-7 usb: chipidea: imx: add usb charger detection for imx6
Li Jun [Fri, 9 Jan 2015 13:58:41 +0000 (21:58 +0800)]
MLK-10085-7 usb: chipidea: imx: add usb charger detection for imx6

The usb controller driver creates usb charger, and notify
the charger connect and disconnect using vbus connect and
disconnect event.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit da98a621a79b6febf4e072ffb99e16e20b5bc36a)

7 years agoMLK-10085-6 usb: chipidea: Add usb charger detect support in otg fsm mode
Li Jun [Wed, 14 Jan 2015 05:12:04 +0000 (13:12 +0800)]
MLK-10085-6 usb: chipidea: Add usb charger detect support in otg fsm mode

Use b_sess_valid_event for charger detection in otg fsm mode.

Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit a89ac6eb611277e140fae0ef4ebe97e1a75fb4cc)

7 years agoMLK-10085-5 usb: chipidea: Add usb charger detect notify
Li Jun [Fri, 9 Jan 2015 07:35:07 +0000 (15:35 +0800)]
MLK-10085-5 usb: chipidea: Add usb charger detect notify

- Change .notify's return value from void to int, update msm notify_event
  return value accordingly.
- Add CI_HDRC_CONTROLLER_VBUS_EVENT and
  CI_HDRC_CONTROLLER_CHARGER_POST_EVENT to finish the USB charger
  detection flow.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
7 years agoMLK-10085-4 usb: doc: chipidea: imx: add imx6-usb-charger-detection property
Li Jun [Fri, 9 Jan 2015 06:37:24 +0000 (14:37 +0800)]
MLK-10085-4 usb: doc: chipidea: imx: add imx6-usb-charger-detection property

It is used to indicate whether we use SoC's usb charger
detection or not. Besides, we add anatop phandle since
we need to use anatop register to do most of charger detect operations.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
7 years agoMLK-10085-2 ARM: imx6: add usb anatop phandle at usbotg node
Li Jun [Fri, 9 Jan 2015 06:27:07 +0000 (14:27 +0800)]
MLK-10085-2 ARM: imx6: add usb anatop phandle at usbotg node

Add anatop phandle at usbotg node to access anatop register.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
7 years agoMLK-11340-8 usb: chipidea: host: delete the redundancy ci_hdrc struct
Peter Chen [Tue, 14 Jul 2015 07:43:02 +0000 (15:43 +0800)]
MLK-11340-8 usb: chipidea: host: delete the redundancy ci_hdrc struct

The struct ci_hdrc is the drvdata for hcd device, so we don't
need to introduce extra ci_hdrc structure for ehci.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 144247425683f783888e2a384946d05962237b60)

7 years agoMLK-11340-5 usb: chipidea: otg_fsm: delete duplicated controller reset
Peter Chen [Wed, 15 Jul 2015 05:56:26 +0000 (13:56 +0800)]
MLK-11340-5 usb: chipidea: otg_fsm: delete duplicated controller reset

At host_stop, it will call usb_remove_hcd, and reset controller later.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit b574ec92b3fcf70743a7467cfc832c7c1b0fe904)

7 years agoMLK-11340-40 usb: whitelist: update otg & eh's TPL for fsl i.mx
Peter Chen [Fri, 8 Aug 2014 01:12:52 +0000 (09:12 +0800)]
MLK-11340-40 usb: whitelist: update otg & eh's TPL for fsl i.mx

The default TPL is for USB OTG & EH compliance test, the supported
class is: mass storage, hub, and hid.

Besides, we add one match criterion that matching targeted device
through class at interface descriptor.

Tested-by: Li Jun <b47624@freescale.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 483c071d989ceb36cacf76e1e3e779c67e5b8280)

7 years agoMLK-11340-31 usb: chipidea: udc: add OTG status request handling
Li Jun [Mon, 23 Jun 2014 07:50:50 +0000 (15:50 +0800)]
MLK-11340-31 usb: chipidea: udc: add OTG status request handling

Peripheral answers OTG status selector request from host according to
host request flag of gadget, length is 1. this flag may be set by application
via sysfs.

Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit c08edfce9dded6a49d3127179d5f0a036ddb99aa)

7 years agoMLK-11340-26 usb: phy: add notify suspend and resume callback
Peter Chen [Mon, 16 Sep 2013 08:31:24 +0000 (16:31 +0800)]
MLK-11340-26 usb: phy: add notify suspend and resume callback

They are used to notify PHY that the controller enters suspend
or finishes resume.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 737908259ccc3c3166a51ed8e3638ac1f1730e08)

7 years agoMLK-11340-1 usb: chipidea: usbmisc_imx: Remove unneeded semicolon
Fabio Estevam [Sat, 9 May 2015 15:15:24 +0000 (12:15 -0300)]
MLK-11340-1 usb: chipidea: usbmisc_imx: Remove unneeded semicolon

Remove unneeded semicolon.

The semantic patch that makes this change is available
in scripts/coccinelle/misc/semicolon.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
7 years agousb: chipidea: add work-around for Marvell HSIC PHY startup
Rob Herring [Fri, 29 May 2015 16:38:46 +0000 (11:38 -0500)]
usb: chipidea: add work-around for Marvell HSIC PHY startup

The Marvell 28nm HSIC PHY requires the port to be forced to HS mode after
the port power is applied. This is done using the test mode in the PORTSC
register.

As HSIC is always HS, this work-around should be safe to do with all HSIC
PHYs and has been tested on i.MX6S.

Signed-off-by: Rob Herring <robh@kernel.org>
Tested-by: Peter Chen <Peter.Chen@freescale.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoMLK-11110: cpufreq: imx7-cpufreq: fix system resume failed
Robin Gong [Mon, 15 Jun 2015 04:43:47 +0000 (12:43 +0800)]
MLK-11110: cpufreq: imx7-cpufreq: fix system resume failed

System resume failed easily after commit b993956109856d3, the commit is no
problem, but it exposes the potential deadlock bug which not unlock mutex if
cpufreq not change, remove these code since the cpufreq framwork has consider
it.

Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit d791bf25e07023f7a936fcabe6f641ad391048b3)

7 years agoMLK-11071 cpufreq: imx7: add cpufreq pm_notifier on imx7d
Bai Ping [Tue, 9 Jun 2015 15:42:50 +0000 (23:42 +0800)]
MLK-11071 cpufreq: imx7: add cpufreq pm_notifier on imx7d

Add pm_notifier for cpufreq on i.MX7D to make sure when
system do suspend/resume no cpu frequency change.
cpu frequency change may use the I2C/SPI interface to
control the external PMIC chip, if the I2C/SPI are not
active in this procedure, frequency change will fail.

Signed-off-by: Bai Ping <b51503@freescale.com>
(cherry picked from commit b993956109856d3b86df501271b5a55620781c1a)

7 years agoMLK-10257-05 arm: imx7: enable cpufreq driver in defconfig
Bai Ping [Mon, 2 Mar 2015 16:44:04 +0000 (00:44 +0800)]
MLK-10257-05 arm: imx7: enable cpufreq driver in defconfig

Enable the imx7 cpufreq driver in defconfig.

Signed-off-by: Bai Ping <b51503@freescale.com>
(cherry picked from commit 88d8fe5196ce424467b5b747977af404427c4ef2)

7 years agoMLK-10257-04 cpufreq: imx7: Add cpufreq support for imx7D
Bai Ping [Thu, 12 Feb 2015 17:05:07 +0000 (01:05 +0800)]
MLK-10257-04 cpufreq: imx7: Add cpufreq support for imx7D

Add the basic cpufreq driver for imx7.

Signed-off-by: Bai Ping <b51503@freescale.com>
(cherry picked from commit db765324267a7c3b93aaf798cefd6a775cf46b1a)

7 years agoMLK-10257-03 arm: imx7: Add cpufreq platform device
Bai Ping [Thu, 12 Feb 2015 17:02:03 +0000 (01:02 +0800)]
MLK-10257-03 arm: imx7: Add cpufreq platform device

Add cpufreq platform device support for DVFS.

Signed-off-by: Bai Ping <b51503@freescale.com>
(cherry picked from commit 27642021d28555c37aab5e2b75214d8c383f668d)

7 years agoMLK-10257-01 arm: dts: Add operating-points property for cpu node
Bai Ping [Mon, 2 Mar 2015 09:52:27 +0000 (17:52 +0800)]
MLK-10257-01 arm: dts: Add operating-points property for cpu node

Add operating-points, clks and regulators property used in DVFS

Signed-off-by: Bai Ping <b51503@freescale.com>
(cherry picked from commit f13001e89f5b64750735fd190a8316d8ee800d36)

7 years agoMLK-11322-02 ARM: imx: add io map for pm code
Bai Ping [Wed, 5 Aug 2015 16:27:47 +0000 (00:27 +0800)]
MLK-11322-02 ARM: imx: add io map for pm code

add necessary io memory mapping used by power management.

Signed-off-by: Bai Ping <b51503@freescale.com>
7 years agoMLK-11322-01 ARM: dts: imx: add ocram node used for lpm code
Bai Ping [Wed, 5 Aug 2015 19:37:44 +0000 (03:37 +0800)]
MLK-11322-01 ARM: dts: imx: add ocram node used for lpm code

Reserve iram space for low power code. The first 16KB space
is used for suspend/resume and cpuidle. Another 4KB space is
for busfreq code.

for i.MX6SX, it has a dedicated ocram space start at 0x8f8000
for low power code.

Signed-off-by: Bai Ping <b51503@freescale.com>
7 years agoMLK-11323-03 ARM: defconfig: unselect ARMv6 support in v7 defconfig
Bai Ping [Wed, 5 Aug 2015 17:37:35 +0000 (01:37 +0800)]
MLK-11323-03 ARM: defconfig: unselect ARMv6 support in v7 defconfig

In imx_v7_defconfig file, no need to enable the ARMv6 support.

Signed-off-by: Bai Ping <b51503@freescale.com>
7 years agoMLK-11323-02 ARM: defconfig: enable the snvs_pwrkey support
Bai Ping [Wed, 5 Aug 2015 17:34:30 +0000 (01:34 +0800)]
MLK-11323-02 ARM: defconfig: enable the snvs_pwrkey support

Enable the snvs_pwrkey driver support.

Signed-off-by: Bai Ping <b51503@freescale.com>
7 years agoMLK-11327 dma: pxp: porting pxp dma driver to imx_4.1.y
Fancy Fang [Thu, 6 Aug 2015 07:29:15 +0000 (15:29 +0800)]
MLK-11327 dma: pxp: porting pxp dma driver to imx_4.1.y

Porting pxp dma drivers v2 and v3 to imx_4.1.y branch.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-11286-3 rpmsg: imx: enable rpmsg tests on imx
Richard Zhu [Mon, 27 Jul 2015 05:59:55 +0000 (13:59 +0800)]
MLK-11286-3 rpmsg: imx: enable rpmsg tests on imx

enable the rpmsg pingpong and tty string echo tests
on imx amp socs
- pingpong test howto
insmod imx_rpmsg_pingpong.ko

- tty string echo test howto
  - step 1, load the imx_rpmsg_tty.ko
  insmod imx_rpmsg_tty.ko
  - step 2, lanunch the mxc_mcc_tty_test.out in backend
  ./mxc_mcc_tty_test.out /dev/ttyRPMSG 115200 R 512 512 &
  - step 3, issue the echo command
  echo <string> > /dev/ttyRPMSG

Signed-off-by: Richard Zhu <Richard.Zhu@freescale.com>
7 years agoMLK-11286-2 ARM: dts: enable rpmsg support on imx7d
Richard Zhu [Wed, 5 Aug 2015 06:20:21 +0000 (14:20 +0800)]
MLK-11286-2 ARM: dts: enable rpmsg support on imx7d

- enable rpmsg on imx7d platforms
- since there are some modules conflictions between A# and m4,
add new *-m4.dts files, that used when m4 core is kicked off.

Signed-off-by: Richard Zhu <Richard.Zhu@freescale.com>
7 years agoMLK-11286-1 ARM: imx: enable rpmsg on imx amp platforms
Richard Zhu [Wed, 5 Aug 2015 06:17:40 +0000 (14:17 +0800)]
MLK-11286-1 ARM: imx: enable rpmsg on imx amp platforms

enable rpmsg on imx amp platforms
- use MU receive interrupter as the notify of the multi-cores.
- add the MU root clock support on imx7d

Signed-off-by: Richard Zhu <Richard.Zhu@freescale.com>
[Octavian: select VIRTIO_RPMGS, fix for VIRTIO_RPMSG_F_NS removal]
Signed-off-by: Octavian Purdila <octavian.purdila@nxp.com>
7 years agoMLK-11318-5: video: mxsfb: porting mxsfb driver to imx_4.1.y branch
Fancy Fang [Tue, 4 Aug 2015 09:23:45 +0000 (17:23 +0800)]
MLK-11318-5: video: mxsfb: porting mxsfb driver to imx_4.1.y branch

Porting mxsfb driver to imx_4.1.y branch.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-11318-4 ARM: dts: imx7d-12x12-lpddr3-arm2: add dts support for pwm backlight
Fancy Fang [Tue, 4 Aug 2015 08:08:51 +0000 (16:08 +0800)]
MLK-11318-4 ARM: dts: imx7d-12x12-lpddr3-arm2: add dts support for pwm backlight

Add dts support for pwm backlight on imx_4.1.y branch.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-11318-3 ARM: dts: imx7d-12x12-lpddr3-arm2: add dts support for lcdif
Fancy Fang [Tue, 4 Aug 2015 08:05:20 +0000 (16:05 +0800)]
MLK-11318-3 ARM: dts: imx7d-12x12-lpddr3-arm2: add dts support for lcdif

Add dts support for lcdif on imx_4.1.y branch.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-11318-2 ARM: dts: imx7d-sdb: add dts support for pwm backlight
Fancy Fang [Tue, 4 Aug 2015 07:51:54 +0000 (15:51 +0800)]
MLK-11318-2 ARM: dts: imx7d-sdb: add dts support for pwm backlight

Add dts support for pwm backlight on imx_4.1.y branch.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
7 years agoMLK-11317-02 ARM: imx: imx6ul: add enet init for i.mx6ul
Fugang Duan [Tue, 18 Aug 2015 03:28:08 +0000 (11:28 +0800)]
MLK-11317-02 ARM: imx: imx6ul: add enet init for i.mx6ul

Add enet MAC address init.

The patch is merged from commit: 67cfceab0b77e887910f11dda13ab3a98bb0d87a

Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-11300-06 ARM: configs: enable imx6ul in defconfig
Bai Ping [Fri, 31 Jul 2015 14:06:36 +0000 (22:06 +0800)]
MLK-11300-06 ARM: configs: enable imx6ul in defconfig

Enable the i.MX6UL SOC support in the defconfig file.

Signed-off-by: Bai Ping <b51503@freescale.com>
7 years agoMLK-11300-05 ARM: imx: add pm support for imx6ul
Bai Ping [Fri, 31 Jul 2015 10:55:38 +0000 (18:55 +0800)]
MLK-11300-05 ARM: imx: add pm support for imx6ul

Add basic pm suspend/resume support for i.MX6UL.

Signed-off-by: Bai Ping <b51503@freescale.com>
7 years agoMLK-11300-04 ARM: imx: add gpt timer support on imx6ul
Bai Ping [Wed, 29 Jul 2015 18:22:13 +0000 (02:22 +0800)]
MLK-11300-04 ARM: imx: add gpt timer support on imx6ul

Add gpt-timer for i.MX6UL SOC.

Signed-off-by: Bai Ping <b51503@freescale.com>
7 years agoMLK-11300-02 ARM: dts: imx: add imx6ul board dts support
Bai Ping [Wed, 29 Jul 2015 17:33:13 +0000 (01:33 +0800)]
MLK-11300-02 ARM: dts: imx: add imx6ul board dts support

Add i.MX6UL board support dts file for boards:
* imx6ul-14X14-evk.dts
* imx6ul-14x14-ddr3-arm2.dts

Signed-off-by: Ye.Li <Ye.Li@freescale.com>
Signed-off-by: Bai Ping <b51503@freescale.com>
[Octavian: merge with upstream, prefer upstrem in case of conflict]
Signed-off-by: Octavian Purdila <octavian.purdila@nxp.com>
7 years agoMLK-11300-01 ARM: dts: imx: add imx6ul dtsi support.
Bai Ping [Thu, 30 Jul 2015 14:22:26 +0000 (22:22 +0800)]
MLK-11300-01 ARM: dts: imx: add imx6ul dtsi support.

Add i.MX6UL SOC dtsi file.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Bai Ping <b51503@freescale.com>
[Octavian: merge 4.1.y into upstream keeping upstream values where values are different]
Signed-off-by: Octavian Purdila <octavian.purdila@nxp.com>
7 years agoMLK-10449-1: 74x164: Add new property registers-default
Sandor Yu [Fri, 20 Mar 2015 06:58:20 +0000 (14:58 +0800)]
MLK-10449-1: 74x164: Add new property registers-default

For some platform such as imx7D SDB, one pin of 74x164 to
control all peripheral power supply(PERI_3V_EN).
The pin should keep in high voltage level when 74x164 loading,
otherwise the module depend on PERI_3V3 will lose power.
So add new property registers-default into 74x164 driver.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: 61fe7af7e47dd8bf6acc91ceabd9e660d28de28a)

7 years agoMLK-11293: gpio: pca953x: add device_reset() call
Shawn Guo [Sun, 14 Jul 2013 13:52:38 +0000 (21:52 +0800)]
MLK-11293: gpio: pca953x: add device_reset() call

The pca953x type of devices, e.g. max7310, may have a reset which needs
to be handled to get the device start working.  Add a device_reset()
call for that, and defer the probe if the reset controller for that is
not ready yet.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: d3264091b30b777d94a18efda9823a06668d5b10)

7 years agoMLK-10447-03: ARM: imx_v7_defconfig: Add spi gpio and gpio 74x164
Fugang Duan [Tue, 28 Jul 2015 03:13:20 +0000 (11:13 +0800)]
MLK-10447-03: ARM: imx_v7_defconfig: Add spi gpio and gpio 74x164

Enable CONFIG_SPI_GPIO and CONFIG_GPIO_74X164 to imx_v7_defconfig.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: a551a35455d14d265ce7aeb4a0e6081303f43fec)

7 years agoMLK-10447-01: dts: imx7d sdb: Add 74LV595 driver
Fugang Duan [Tue, 28 Jul 2015 03:09:20 +0000 (11:09 +0800)]
MLK-10447-01: dts: imx7d sdb: Add 74LV595 driver

-74LV595 function compatible with 74HC595, add 74HC595
driver into imx7d sdb dts.
-74LV595 register as a GPIO device and access 74LV595 chip
by SPI GPIO, so add spi_gpio driver into imx7 sdb dts.

Signed-off-by: Sandor Yu <R01008@freescale.com>
igned-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: 61fe7af7e47dd8bf6acc91ceabd9e660d28de28a)

7 years agoMLK-10463-1 ARM: imx: init ENET RGMII tx clock source
Fugang Duan [Fri, 6 Feb 2015 08:42:46 +0000 (16:42 +0800)]
MLK-10463-1 ARM: imx: init ENET RGMII tx clock source

Init ENET RGMII tx clock source, set GPR5[9] to select clock from
internal PLL_enet. And set phy VDDIO to 1.8V that get better signal
quality.

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: d7a171fcf5218166f558428610ca8e9cb9f7e830)

7 years agoMLK-10098 ARM: imx: fix 1588 clock init
Fugang Duan [Wed, 14 Jan 2015 08:18:58 +0000 (16:18 +0800)]
MLK-10098 ARM: imx: fix 1588 clock init

The enet clock define is changed as there has no "enet_ref" clock name.
If the tx_clk is sourced from SOC anatop PLL, user define the clock id
in devicetree. So we only to judge the ptp clock valid and then set the
related GPR bit.

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: 01ed2a839d9b76ccb4113dc2a04af4a33b33de22)

7 years agoMLK-10060 ARM: i.MX6: disable ethernet phy AR8031 EEE mode in default
Fugang Duan [Thu, 25 Dec 2014 09:17:49 +0000 (17:17 +0800)]
MLK-10060 ARM: i.MX6: disable ethernet phy AR8031 EEE mode in default

Disable ethernet phy AR8031 EEE mode in default to reduce the IEEE1588
latency.

Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-9694 ARM: imx6: init enet MAC address
Fugang Duan [Wed, 15 Oct 2014 01:36:40 +0000 (09:36 +0800)]
MLK-9694 ARM: imx6: init enet MAC address

Enet get MAC address order:
From module parameters or kernel command line -> device tree ->
pfuse -> mac registers set by bootloader -> random mac address.

When there have no "fec.macaddr" parameters set in kernel command
line, enet driver get MAC address from device tree. And then if
the MAC address set in device tree and is valid, enet driver get
MAC address from device tree. Otherwise,enet get MAarch/arm/mach-imx
/mach-imx6q.cC address from
pfuse. So, in the condition, update the MAC address (read from pfuse)
to device tree.

Cherry-pick & Merge patches from:
149ac988a25b8d8eb86d05679cbb7b42819ff7a1 &
3269e5c06bdb2f7ab9bd5afa9bbfe46d872197d3

Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-11290 ARM: dts: imx7d-12x12-lpddr3-arm2: add enet, i2c, max7322 support
Fugang Duan [Mon, 27 Jul 2015 10:56:07 +0000 (18:56 +0800)]
MLK-11290 ARM: dts: imx7d-12x12-lpddr3-arm2: add enet, i2c, max7322 support

Add enet1, enet2, i2c1~4, max7322 support.

Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-11206: input: misc: fxls8471: support ±2g/±4g/±8g dynamically selection
Gao Pan [Wed, 1 Jul 2015 06:38:20 +0000 (14:38 +0800)]
MLK-11206: input: misc: fxls8471: support ±2g/±4g/±8g dynamically selection

Support ±2g/±4g/±8g dynamically selection for motion sensor fxls8471.

Set the sensor mode to standby mode before changing the scale range
with the command "echo 0 > enable". The scale range can be changed
with the command "echo 0/1/2 > range".

Signed-off-by: Gao Pan <b54642@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: 6824cff93d368eafbf96c71fad541f9bc2502e3a)

7 years agoMLK-11218: misc: fxos8700: support ±2g/±4g/±8g dynamically
Gao Pan [Fri, 3 Jul 2015 08:31:38 +0000 (16:31 +0800)]
MLK-11218: misc: fxos8700: support ±2g/±4g/±8g dynamically

Support ±2g/±4g/±8g dynamically selection for motion sensor fxos8700.

Set the sensor mode to standby mode before changing the scale range
with the command "echo 0 > enable". The scale range can be changed
with the command "echo 0/1/2 > range".

Signed-off-by: Gao Pan <b54642@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: 74c9af0a5806fb5c926ffdab3145fc1680fc87e6)

7 years agoMLK-10947 ARM: imx_v7_defconfig: enable fxls8471 in defconfig
Fugang Duan [Mon, 27 Jul 2015 09:38:14 +0000 (17:38 +0800)]
MLK-10947 ARM: imx_v7_defconfig: enable fxls8471 in defconfig

Enable fxls8471 in defconfig.

Signed-off-by: Gao Pan <b54642@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: 692ff04d68f953d4534f27c6c4529e46b1a48518)

7 years agoMLK-10948 input: misc: fxls8471: add motion sensor fxls8471
gaopan [Thu, 21 May 2015 06:50:47 +0000 (14:50 +0800)]
MLK-10948 input: misc: fxls8471: add motion sensor fxls8471

Add Freescale fxls8471 motion sensor.

Signed-off-by: Gao Pan <b54642@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: 20cfe2d9d9305559e35fe2e508d5a70b057ffc70)

7 years agoMLK-10893: i2c: imx: add irqf_no_suspend
gaopan [Tue, 12 May 2015 10:25:29 +0000 (18:25 +0800)]
MLK-10893: i2c: imx: add irqf_no_suspend

The i2c irq is masked when pcie starts a i2c transfer process
during noirq suspend stage. As a result, i2c transfer fails.
To solve the problem, IRQF_NO_SUSPEND is added to i2c bus.

Signed-off-by: Gao Pan <b54642@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherrt picked from commit: ab13b0e11c50021905de00a0f3c0df7e0a36a3f0)

7 years agoMLK-10835-5 ARM: imx_v7_defconfig: enable mpl3115,fxas2100x and fxos8700 in defconfig
Fugang Duan [Wed, 6 May 2015 02:02:42 +0000 (10:02 +0800)]
MLK-10835-5 ARM: imx_v7_defconfig: enable mpl3115,fxas2100x and fxos8700 in defconfig

Enable mpl3115,fxas2100x and fxos8700 sensors in defconfig.

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: 275be06ee31ffd0b9c2c12fb7e563a6b060bf5a2)

7 years agoMLK-10835-3 input: misc: mpl3115: add Freescale MPL3115 pressure temperature sensor
Fugang Duan [Tue, 5 May 2015 12:36:58 +0000 (20:36 +0800)]
MLK-10835-3 input: misc: mpl3115: add Freescale MPL3115 pressure temperature sensor

Add Freescale MPL3115 pressure temperature sensor.

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: a8c2904a442e1aa163b8562e1a940c8755ab3898)

7 years agoMLK-10835-2 misc: fxos8700: add Freescale FXOS8700 6-Axis Acc and Mag Combo Sensor
Fugang Duan [Tue, 5 May 2015 10:58:55 +0000 (18:58 +0800)]
MLK-10835-2 misc: fxos8700: add Freescale FXOS8700 6-Axis Acc and Mag Combo Sensor

Add Freescale FXOS8700 6-Axis Acc and Mag Combo Sensor

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: c0ca56bbf3f8503a858d15bb14f27652ae6612eb)

7 years agoMLK-10835-1 misc: fxas2100x: add Freescale FXAS2100X gyroscope sensor
Fugang Duan [Tue, 5 May 2015 09:08:34 +0000 (17:08 +0800)]
MLK-10835-1 misc: fxas2100x: add Freescale FXAS2100X gyroscope sensor

Add Freescale FXAS2100X gyroscope sensor

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: 34a99f00d4886f95a8cf8cd4acbf37a82c67e46c)

7 years agoMLK-10833-3 imx_v7_defconfig: enable mag3110 by default
Fugang Duan [Mon, 27 Jul 2015 08:41:32 +0000 (16:41 +0800)]
MLK-10833-3 imx_v7_defconfig: enable mag3110 by default

Enable mag3110 driver in default config.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: ac43097186e94d5ecfdbc3c6a514aa20e5a7f8ca)

7 years agoMLK-10833-2 hwmon: mag3110: use global variable instead of macro define
Fugang Duan [Wed, 6 May 2015 11:37:44 +0000 (19:37 +0800)]
MLK-10833-2 hwmon: mag3110: use global variable instead of macro define

Use global variable instead of macro "MAG3110_IRQ_USED" that is more
flexible.

Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-10833-1 hwmon: mag3110: Add mag3110 driver support on i.MX6Q/DL/SX platform.
Luwei Zhou [Tue, 16 Sep 2014 05:05:41 +0000 (13:05 +0800)]
MLK-10833-1 hwmon: mag3110: Add mag3110 driver support on i.MX6Q/DL/SX platform.

Add mag3110 driver support for i.MX6Q/DL/SX platform. The code derives from 3.10.y branch.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: dd027baab7652c62d26f1749f334099e4dbe61c9)

7 years agoMLK-10369 ARM: dts: Add i2c bus support for i.MX7d-sdb board
Fugang Duan [Mon, 27 Jul 2015 08:28:48 +0000 (16:28 +0800)]
MLK-10369 ARM: dts: Add i2c bus support for i.MX7d-sdb board

- Add i2c1,2,3,4 bus support for i.MX7d-sdb board (i2c4 bus need to
  rework: swap R485 and R33).
- Add i2c device PMIC support.

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: 45acb911f7192fcc574f1e0faaf19513b9879046)

7 years agoMLK-11288 ARM: dts: imx7d-sdb: add fec1, fec2 support
Fugang Duan [Mon, 27 Jul 2015 06:38:38 +0000 (14:38 +0800)]
MLK-11288 ARM: dts: imx7d-sdb: add fec1, fec2 support

Add fec1, fec2 support for i.MX7d-sdb board.

Signed-off-by: Fugang Duan <B38611@freescale.com>
7 years agoMLK-10919 net: phy: micrel: add ksz8081 resume function
Fugang Duan [Mon, 27 Jul 2015 07:40:00 +0000 (15:40 +0800)]
MLK-10919 net: phy: micrel: add ksz8081 resume function

Add ksz8081 resume function since the phy has some non-standard
register init process that has some fixup.

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: 65c6e997b8e020b9e87d1af23c94c15c13e3d2e3)

7 years agoMLK-10920 ARM: imx_v7_defconfig: enable MICREL phy
Fugang Duan [Tue, 19 May 2015 03:03:55 +0000 (11:03 +0800)]
MLK-10920 ARM: imx_v7_defconfig: enable MICREL phy

Enable CONFIG_MICREL_PHY for MICREL PHY since i.MX6ul boards install
micrel ksz8081 phy.

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit: 626d87758e1724ff92708da11e8af0081bb69ce9)

7 years agoMLK-10472-2 ARM: imx_v7_defconfig: enable max7322 in default config
Fugang Duan [Mon, 27 Jul 2015 06:53:21 +0000 (14:53 +0800)]
MLK-10472-2 ARM: imx_v7_defconfig: enable max7322 in default config

Enable max7322 extention gpio driver in config

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Luwei Zhou <b45643@freescale.com>
(cherry picked from commit: 575b7e4c2f85b08fb09d6a639adb404718b9b644)