MLK-16135 usb: gadget: utp: bulk out req amount divisible by 512
As the code comments say, the bulk out req amount should be divisible
by 512, fix this by using set_bulk_out_req_length().
Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-38 ARM64: imx8mq-evk: add typec controller dts node
Add nxp typec&PD controller ptn5110 dts node, which is a tcpci compliant
typec port controller.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-37 staging: typec: Power swap force discharge for source
VBus off only means the vbus falls to be below 4v, we can use vbus
force discharge and vbus low alarm to go forward.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-36 staging: typec: wait for cc change on ERROR_RECOVERY
We should wait at least tErrorRecovery before move to unattached state.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-35 staging: typec: Move to SRC_ATTACHED if condition is met
If the other end is trying to be a sink and not driving vbus, we should
move to SRC_ATTACHED directly.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-34 staging: typec: Support cc changes on RP pull-up value
CC line changes on souce side RP value is permitted per standard, in
this case we should move to SNK_ATTACH_WAIT.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-33 staging: typec: Do not switch to unattached state for BIST
If we received unsupported BIST command, we should by pass it and ready
to accept following command for test, not unconditionly to set the port
to be unattached state and terminate the test.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-32 staging: typec: refine source to sink swap handling
To early start sink power after source turn off vbus, move the set power
role after vbus is turned off in PR_SWAP_SRC_SNK_SOURCE_OFF, also per
spec, we should do error recovery if the sink side does not turn on
vbus in PD_T_PS_SOURCE_ON.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-31 staging: typec: Set to unattached state if souce disconnected
In SNK_HARD_RESET_SINK_ON, if the source disconnected, we should set
state to be unattached state intead of startup sink.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-30 staging: typec: Reset hard_reset_count to be 0 after send source cap
Per standard, we should clear the hard reset count to be 0 after souce
sent the source cap.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-29 staging: typec: tcpm: Don't reset message id after soft reset
If the power source sent soft reset and the other end accepted, we should
not reset the message id as it was already updated by pd_transmit when
handling the soft reset.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-28 staging: typec: tcpci: Populate config from dt
Instead of static config, use dt to pass basic PD config for
below settings:
- Source pdo list
- Sink pdo list
- Max sink voltage
- Max sink current
- Sink operating power
- TypeC port type
- TypeC port preferred role
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-27 staging: typec: add super speed signal mux selection
According to the polarity of cc line, we need to do USB3 signal mux
selection if it's controlled by software.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-26 staging: typec: tcpm: update PD timing
This patch is to update several PD timings for PD compliance, all
those timing definitions should be configurable via user config,
this can be improved later, for now I just update its values in PD
spec defined range.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-25 staging: typec: tcpm: correct the PD_T_SENDER_RESPONSE value
Per PD spec, the sender response should be in a small range 24~30ms, so
correct the PD_T_SENDER_RESPONSE to be 25.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-24 staging: typec: tcpm: use hrtimer for send response
As the sender response timer have very small margin(25~30ms), so
use a hrtimer to handle it.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-23 staging: typec: tcpm: Do soft reset for unexpected get sink cap
A source or sink should receive the get_sink_cap message when in SRC_RDY or
SNK_RDY, if the port receives a get sink capability request before ready,
which means there is message sync error, we should do soft reset to recover
from it, instead of sending a reject message.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-22 staging: typec: tcpm: split operations of power swap from sink to source
Add one more state:PR_SWAP_SNK_SRC_ASSERT_RP, as the next state of
PR_SWAP_SNK_SRC_SINK_OFF, it will turn on vbus and wait the vbus
is really on and then send the PS_RDY to the other side.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-21 staging: typec: tcpm: handle pd message send failure
If the PD message send failed, we need to do soft reset, further if
soft reset failed, we have to start a hard reset.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-20 staging: typec: Add bist test mode support
BIST(Built In Self-Test – Power Delivery testing mechanism for
the PHY Layer), see PD 3.0 spec 5.9 Built in Self-Test (BIST), is
added to support BIST message handling in PD compliance test.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-19 staging: typec: tcpci: Only touch target bit when enable vconn
We need a read and then write back to avoid touch any other bits when
enable or disable vconn.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-18 staging: typec: handle unexpected vbus from sink
Power source detected the attachment of sink, will firstly check
the vbus level to make sure power sink isn't sourcing vbus(< 600mv)
before going forward, otherwise it will terminate the session and
go to SRC_UNATTACHED state, this is required by PD compliance.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-17 staging: typec: tcpm: optimise cc toggling for drp port
We should only enable drp auto toggling when unattached, so add one
more parameter; when attached, we set the cc line state according to
the other end cc status.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-16: staging: typec: tcpm: tcpm init sequence update
Force an error recovery is not a good way to handle all cases and may
break the case of power up with typec already connected. Also the tcpc
init should start after tcpm init setup is done, as tcpc init will
turn on HW event alert so may generate events immediately and drive
tcpm state machine go forward, so move it at the end of tcpm_init.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-15: staging: typec: tcpci: Enable vbus force discharge
Enable vbus low voltage alert and do force discharge, this can aid turn
off vbus quickly.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-14: staging: typec: tcpci: handle fault event
We need clear any fault alerts to make tcpci controller to recover
from fault.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-12: staging: typec: tcpci: clear pending events before request irq
Clear all possible pending events before request irq.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-11 staging: typec: only clear alert events for enabled irq
Uncondtionaly clear all events may impact the typec controller state
machine, so save the enabled irq and only clear alert events for enabled
irq.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-10 staging: typec: add vbus detection for power sink
Typec port controller may need enable vbus detection to detect
the vbus from power source.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16013-9 usb: typec: add interface to get port type and role
Add interface to get typec port type and default power role from
dt. To validate a correct setting is specified, add TYPEC_PORT_TYPE_UNKNOWN
and TYPEC_ROLE_UNKNOWN for typec_port_type and typec_role enum.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
staging: typec: Type-C Port Controller Interface driver (tcpci)
The port controller interface driver interconnects the Type-C Port
Manager with a Type-C Port Controller Interface (TCPCI) compliant
port controller.
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 74e656d6b0551999194b5ab1e45ff8b1e82b898e)
staging: typec: USB Type-C Port Manager (tcpm)
This driver implements the USB Type-C Power Delivery state machine
for both source and sink ports. Alternate mode support is not
fully implemented.
The driver attaches to the USB Type-C class code implemented in
the following patches.
usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY
usb: USB Type-C connector class
This driver only implements the state machine. Lower level drivers are
responsible for
- Reporting VBUS status ...
usb: USB Type-C connector class
The purpose of USB Type-C connector class is to provide
unified interface for the user space to get the status and
basic information about USB Type-C connectors on a system,
control over data role swapping, and when the port supports
USB Power Delivery, also control over power role swapping
and Alternate Modes.
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-and-Tested-by...
lib/string: add sysfs_match_string helper
Make a simple helper for matching strings with sysfs
attribute files. In most parts the same as match_string(),
except sysfs_match_string() uses sysfs_streq() instead of
strcmp() for matching. This is more convenient when used
with sysfs attributes.
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Tested-by: Guenter...
MLK-16137 video: fbdev: add defer probe for mxs framebuffer
When mxs framebuffer probes, the DISPDRV (here is MIPI DSI driver) is likely
not ready, then mxsfb_dispdrv_init() will fail which in turn causes framebuffer
dirver probe fails. Add the defer probe schema for second probe later to fix it.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Fancy Fang <chen.fang@nxp.com>
MLK-16124 clk: imx: clean-up: Add defines for gate enable bits.
Use defines for gate enable bits instead of raw values.
Signed-off-by: Adriana Reus <adriana.reus@nxp.com>
MLK-16129: ASoC: fsl_hifi4: refine the copyright
As the fsl_hifi4.c uses the function from uboot/cmd/elf.c,
so need to add the copyright of elf.c, and change licence to
Dual BSD/GPL.
And mxc_hifi4.h is used by user space, so change license to BSD.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
MGS-3155 [#imx-697] fix gpu hang when insmod galcore secondly
gpu hang alway happen when insmod galcore secondly on i.mx8mq,
this problem is related gpu mmu setup with virtual command buffer.
revert the virtual command buffer change to align 6.2.2 driver.
Date: Aug 03, 2017
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
MLK-15950 input: egalax_ts: switch to i2c interface before wake up
For HannStar (HSD100PXN1 Rev: 1-A00C11 F/W:0634) LVDS touch screen,
it has a special request for the EETI touch controller. The host
needs to trigger I2C event to device FW at booting first, and then
the FW can switch to I2C interface. Otherwise, the FW can’t work
with I2C interface, and can't generate any interrupt when touch
the screen.
This patch send an I2C command before the device wake up, make sure
the device switch ...
MLK-16130-2: ASoC: fsl: add machine driver for cadence hdmi
The machine driver will call the API which is provided by
the cadence to configure the audio features.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
MLK-16130-1: ASoC: fsl_sai: enable TCE/RCE according to input channels
If there is only two channels input and slots is 2, then enable one
port is enough for data transfer. so enable the TCE/RCE according to
the input channels and slots configuration.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
MLK-16131 arm64: dts: freescale: imx8mq: disable pwm led for over-drive mode
On i.MX8MQ EVK A1 board, GPIO1_IO13 pin is shared between
GPIO regulator and PWM2, when using over-drive dtb, there
will be no PWM2 function, disable PWM LED to avoid below
message during suspend/resume test:
[ 19.754862] PM: resume of devices complete after 118.732 msecs
[ 19.761740] Restarting tasks ...
[ 19.761741] leds_pwm pwmleds: unable to request PWM for PWM2: -517
[ 19.773557] done.
Signed-off-by: ...
MLK-16119-05: dts: Disabled hdmi property
HDMI driver loading depend on HDMI FW.
But not all boards default included HDMI FW.
So disabled hdmi property in dts now.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>