Commit Graph

76 Commits

Author SHA1 Message Date
Naveen Kumar 5d54438673 Revert "USB: Add configfs related rules for USB compositions"
This reverts commit 9f96096a93.

Conflicts:
	rootdir/etc/init.qcom.usb.sh

Change-Id: I0193d3d5ce1ccbed810303e72fcd612c72da3b90
2016-04-15 14:29:23 +05:30
Mayank Rana e2d203aeb6 init.qcom.usb.sh: Add USB controller device name for msmcobalt
This change addes USB controller device name for msmcobalt as it
is required to bind USB gadget driver with controller driver.

CRs-Fixed: 995109
Change-Id: If51e5a23911e8f1a086c95dba2e316a974efb2ad
2016-03-25 13:25:32 -07:00
Mayank Rana 9f96096a93 USB: Add configfs related rules for USB compositions
This change adds required support and relevant rules to select and
use USB composition using configFS.

Change-Id: I91c45180e3c64800eebbbb4a0c26157003dbbee1
2016-03-22 12:35:19 -07:00
Arusha Goyal 9016e980d6 Remove internal code name of msmtitanium for msm8953.
Change-Id: Iaacdde5f04d17ec3287b45613b1605bea27b3e7e
2016-03-12 17:08:33 +05:30
Mayank Rana 1b8e824098 init.qcom.usb.sh: Remove revision ID check for MSM8996
Revision ID check for MSM8996 platform is not required. Hence
remove the same. Also remove baseband related check as usage
is deprecated and keep only required transport check with
esoc_link to simplify selection of USB default composition.

Change-Id: I935e11edb4ea856b3af931a8c8ec4c74464b5b19
2016-03-08 18:20:26 -08:00
Vijayavardhan Vennapusa 004af4c34e init.qcom.usb.sh: Update rps_mask to 0x40 for rndis0
Update the rps_mask for rndis0 to 0x40 to get required througput
numbers in RNDIS tethering mode.

Change-Id: Iec6eecf4b7ea9e84648c0f3f960a16a0f9c67955
2015-12-24 06:19:43 -08:00
Vijayavardhan Vennapusa 9b81c9d151 init.qcom.usb.sh: Set required sysfs entires for msmtitanium
Set RNDIS transports to BAM2BAM_IPA for enabling RNDIS interface
to use BAM2BAM mode for data transfers. Also set TX/RX buffer
lengths to 128KB for MTP for improving throughput.

Change-Id: Ie1f51134a43f630501d257bcf71fd4deecc70862
2015-12-22 06:15:30 -08:00
Vijayavardhan Vennapusa 2048233e02 init.qcom.usb.sh: Set default composition for msm8952 and msmtitanium
Set persist.sys.usb.config to diag,serial_smd,rmnet_ipa,adb so that
default composition is 9091, which has DUN and RMNET interfaces
enabled.

Change-Id: Ibd47cf8c9048ef519902bba64c2a9303d7723dea
2015-12-16 21:51:11 -08:00
Mayank Rana 83ae7a4d17 init.qcom.usb: Update USB default composition where external MDM is used
To use DUN interface related transport as port bridge instead of TTY, update
USB default composition as well update USB composition related configuration.

Change-Id: I713ab7b5d7f90611d25ab1c8ef7813e489abcdd8
2015-11-17 16:04:04 -08:00
Linux Build Service Account e25a5049d0 Merge "init.qcom.usb.sh: Update ESOC to support any MDM" 2015-11-09 11:47:10 -08:00
Jack Pham 6756f76a28 init.qcom.usb.sh: Update ESOC to support any MDM
ESOC is a used to determine if there is an MDM device connected,
and if so, what type of connection is used (HSIC, PCIe). Currently
the script only supports MDM9x25 or MDM9x35. Update the check to
support all present and future MDMs.

Change-Id: I6afe7d3da74fa1cf795ff2313d1bb992f5aa4f1e
2015-11-02 15:01:26 -08:00
Vijayavardhan Vennapusa 8c2dc8eff9 USB: Enable CPU RPS mask for msm8937 target
Enable CPU RPS mask on msm8937 target to fix
the out of order packets issue.

Change-Id: I6d0f61e86b223770d983942de2da69ed431d1a64
2015-11-02 13:25:02 +05:30
Vijayavardhan Vennapusa 32984751a4 init.qcom.usb.sh: Set default composition for msm8937
Set default composition as 9091 for msm8937 for USB functionality
to be working.

Change-Id: Iaaf4a4de4791ad2106505f8658927197cd36bab1
2015-10-27 11:59:57 +05:30
Mayank Rana f8eb1d48b9 init.qcom.usb.sh: Use default USB composition as diag,adb
When there is no platform identify using ro.board.platform, use
USB default composition as diag,adb. This reduces depedency on
different USB interface related transport.

Change-Id: Idc66ed88422494780670a92892951d6f84e315e8
2015-08-13 11:04:19 -07:00
Mayank Rana 0fe2baca36 init.qcom.usb: Set default USB request buffer size as 128 KB for MTP
To improve throughput when using USB MTP functionality, set default
USB request buffer size as 128 KB for both Tx and Rx.

Change-Id: I2fd3f6ba05daf167b27ba82678f25b7bf9269a47
2015-07-16 13:10:11 -07:00
Mayank Rana 98eb94bfe9 init.qcom.usb: Change USB default composition on 8996 for DUN interface
This change sets DUN interface transport as char_bridge instead of smd.
With that default USB composition on 8996 v2.0 and above revision is:
9025: DIAG + ADB + MODEM + NMEA + RMNET + MSC
(diag,serial_bridge,serial_tty,rmnet_ipa,mass_storage,adb)

9026: DIAG + MODEM + NMEA + RMNET + MSC
(diag,serial_bridge,serial_tty,rmnet_ipa,mass_storage,adb)

Change-Id: Ief61c384ee6def4e3667e3909fa5465a84ea1ba3
2015-05-19 10:34:37 -07:00
Mayank Rana b7bca58ab3 init.qcom.usb: Set default MSM8996 composition
Set the default USB composition for MSM8996 as below:
For msm8996 v1.0:
"diag,adb"

For msm8996 v2.0 and above:
"diag,serial_smd,serial_tty,rmnet_ipa,mass_storage,adb"

Change-Id: Ide70eec2e6a266eb5d9f52957a8c698712fc575d
2015-05-19 10:32:54 -07:00
Mayank Rana 1df9f5c636 common: init.qcom.usb.sh: Configure BAM2BAM_IPA for RNDIS on MSM8996
For MSM8996 target, RNDIS is enabled with BAM-to-BAM to IPA for the
datapath. Set the transport type accordingly, which allows the USB
composite driver to choose the f_qc_rndis driver that supports this.

Change-Id: I641f30d4a7f8a50e2ead3d0f63a2c16cb64e9b08
2015-05-13 12:31:47 -07:00
Jack Pham c655598742 init.qcom.usb.sh: Add support for msm8992
Perform target-specific USB initialization for MSM8992, which is
similar to MSM8994.

Change-Id: I8a00bd66b2307dcdec3aadb9ae8e12d61ac2f886
2014-11-24 16:42:15 -08:00
Jack Pham 8996d2a198 init.qcom.usb.sh: Simplify the diag_extra section
The handling of the persist.sys.usb.config.extra property currently
reads the existing value and attempts to set the correct value based on
ro.baseband. This is fragile as future/unsupported baseband targets would
get the wrong value re-written contrary to what the user originally set.
Further, this does not support ESOC and would have to be added as well.
Instead, it needs to at least be initialized to 'none' if not already
set.

Simply remove this section altogether, as it would ease future maintenance
effort. As the persist.sys.usb.config.extra property is an undocumented
test feature which is not enabled by end-users, we don't necessarily need
script logic to handle it, and can instead place the burden of setting it
correctly on the developer/tester.

CRs-fixed: 657143
Change-Id: I98c08180bcbe791667d0ccb866a11796a7debc12
2014-11-17 11:23:10 -08:00
Tanya Finkel 33ef782359 init.qcom.usb: Set USB composition for DB8094 peripheral mode.
For DB8094 the usb peripheral connected to port 1 CI
that support only USB2.

Change-Id: Ia6becd299de02737be2dac21af85fbbe92240213
2014-11-12 11:47:37 +02:00
Linux Build Service Account 97e3c46c51 Merge "init.qcom.usb: set default composition for MSM8909" 2014-10-18 15:31:55 -07:00
Linux Build Service Account e7559bc971 Merge "USB: init.qcom.usb.sh: Use target name from ro.board.platform" 2014-10-17 10:37:03 -07:00
Pavankumar Kondeti 3544d577f2 init.qcom.usb: set default composition for MSM8909
Set DIAG + MODEM + RMNET + ADB as default USB composition.

Change-Id: I2b079ce6853dc4ba6cec52cba9eb8d57b56c4731
2014-10-17 00:50:12 +05:30
Sujeet Kumar 2b212f1ff4 USB: init.qcom.usb.sh: Use target name from ro.board.platform
ro.product.device gives the target name with _32/_64 post fix
depending upon which build is loaded currently. To overcome
the parsing issue and setting the default compostion for
targts, use ro.board.platform which gives target name
without such postfix attached.

Change-Id: Ic8cde3b21cc48119a3d2e27680862f32d74ca78f
2014-10-16 18:53:02 +05:30
Linux Build Service Account 971669f574 Merge "init.qcom.usb.rc: Set serial string on init" 2014-10-12 00:52:38 -07:00
Vijayavardhan Vennapusa 7e6279d2a7 init.qcom.usb.rc: Set serial string on init
Currently init.qcom.usb.sh is writing the serial number into
android sysfs entry. But during bootup, .rc file is writing
default composition before .sh gets executed. This results USB
driver sending default serial string to host due to port hopping
happens. Hence write ro.serialno to the sysfs entry on init once.

Also remove reading persist.usb.serialno which is required only for
NAND based devices as all future targets are emmc based devices.

CRs-Fixed: 659235
Change-Id: Iddb0875fe0aff9aa9d53850861cc54735e5006d7
2014-09-25 16:44:48 +05:30
padarshr 0e9416742d Rename ferrum to msm8909
This change is to rename ferrum to chipset name- msm8909

Change-Id: I073fef3be31f94658fbffd41f33a6193fb2483aa
2014-09-24 12:35:16 -07:00
Linux Build Service Account 8df2105cf4 Merge "init.qcom.usb: set default composition for ferrum" 2014-08-30 19:37:50 -07:00
Linux Build Service Account 70431b2352 Merge "init.qcom.usb: Disable RNDIS UL aggregation on MSM8994" 2014-08-26 22:50:33 -07:00
Pavankumar Kondeti 7d582f8a2b init.qcom.usb: set default composition for ferrum
Set DIAG + ADB as default USB composition for ferrum. It will be
changed later to support other interfaces like modem and rmnet.

Change-Id: I9ceb305d917d61117b63d9cdc78b884f4307b8ac
2014-08-26 22:38:27 +05:30
Sujeet Kumar 0b5ff3a972 USB: init.qcom.usb.sh: Mount cdrom media for msm8916
Mount cdrom media for msm8916 targets. LUNs are already
created during the initialization time and hence its
fine to echo the media for cdrom at this time.

Change-Id: I43c5be6483c3d47559986a95c48938dad15789e7
2014-07-22 14:31:43 +08:00
Jack Pham fab465d8f3 init.qcom.usb: Disable RNDIS UL aggregation on MSM8994
MSM8994 IPA hardware does not properly handle aggregated RNDIS
packets from the host. Set the max_pkt_per_xfer to 1 to disable
UL aggregation.

Change-Id: Ib36b10a1a6a9920c93bcd93614e3a4dc76caa4b2
2014-07-17 14:15:38 -07:00
Jack Pham 9e7587a7d3 init.qcom.usb: Set default MSM8994 composition
Set the default USB composition for MSM8994 as
"diag,serial_smd,serial_tty,rmnet_ipa,mass_storage,adb". This
corresponds to PID 9025 with the RmNET function configured
with IPA transport.

Change-Id: I7be357be11ee8f814d1c261e4575331f75a49385
2014-06-17 10:18:59 -07:00
Jack Pham 53353be804 common: init.qcom.usb: Configure BAM2BAM_IPA for RNDIS on MSM8994
For MSM8994 targets, RNDIS is enabled with BAM-to-BAM to IPA for
the datapath. Set the transport type accordingly, which allows
the USB composite driver to choose the f_qc_rndis driver that
supports this.

Change-Id: I2a22bff2042801f43eca323d9bedd43469998190
2014-06-16 11:32:12 -07:00
Shashank Mittal a150081c85 Fix usb configuration.
-- Stop adbd before modifing usb configuration.
-- Add usb configuration for msm8916_32 and msm8916_64.

Change-Id: Id9e9a6990e5004ef299af27a06d1457bdbb4051f
2014-05-21 18:33:06 -07:00
Vijayavardhan Vennapusa c62b4fc1a8 init.qcom.usb.sh: Enable 9091 composition for 8916
This change sets 9091 composition as default composition for 8916
and is required when user sets persist.sys.usb.config to none to
move from nondefault composition to default composition. Otherwise
it will lead to enabling 9025 composition which is not supported
for 8916.

CRs-Fixed: 629490
Change-Id: Ie2e512afd8497d9c89ecf2b866d1100e5cc25f80
2014-03-20 11:30:45 +05:30
Linux Build Service Account 014867fd33 Merge "device: usb: add changes for diag to work with rndis composition" 2014-02-28 19:28:08 -08:00
Tarun Gupta eaaa6b7fa7 device: usb: add changes for diag to work with rndis composition
we use persist.sys.usb.config.extra to specify if we want to use diag with
rndis interface earlier userspace used to read this property to check
whether diag is to be included in composition and used to set appropriate
composition.

Now we plan to make this check and change in device specific files. This
change checks whenever there is a composition with rndis and
persist.sys.usb.config.extra indicates to include diag we set the
usb.sys.config to reflect this indication. User now need to set extra
property to diag and based on the baseband information we can figure out
clients representing diag interface.

Change-Id: I3257f47ed42b3ad4fea68a6deb45c27944614558
2014-02-27 19:08:47 +05:30
Guang Jian Zeng d0652a7ef8 init.qcom.usb.sh: Enable persist.rmnet.mux for fusion4
RmNet MUX is now required to be enabled by default on
Fusion 4 targets. Set the persist.rmnet.mux property
for this target during bootup.

Change-Id: I57075505153198f214883b0e71e88757e6e79d3b
2014-02-24 16:17:22 -08:00
Sujeet Kumar 4b50252ff2 init.qcom.usb: Add support for rom lun creation and composition
This change writes to mass storage lun sysfs entry to  rom LUNs
for 8x26 and 8x10 platforms. With this, lun0 for cdrom is created.

CRs-Fixed: 526542

Change-Id: Ieda5306f5b767a1d7ec033e33308cd519b0a3f93
2014-01-22 11:22:44 +05:30
Jack Pham 30c633275f qcom: usb: Use ESOC framework to determine MDM transport
The kernel ESOC framework allows for querying of externally
connected MDMs and connection type. Use this to support
newer Fusion targets which may contain an MDM interconnected
via HSIC, PCIe or a combination.

Change-Id: Ic1ac6b7f61e24809db9cdd1e6f2619decf994385
2014-01-14 17:03:15 -08:00
Ameya Thakur ae416ab5f5 init.qcom.usb.sh: Add support for APQ8084 + 9x35 based devices
USB composition is now set up for devices where ro.baseband is set
to mdm2.

Change-Id: I3f6b4b083ace33f6308ed54f4d8f1f21744c94b6
2013-11-26 12:44:28 -08:00
Biswajit Paul 2e2d79df93 Modified chown/chmod to not follow symlink.
Enable symlink to not follow target file if "-h" option is
provided.

CRs-fixed: 545883
Change-Id: I94dbc32e7635d06a2121b3a1b07cc2616d06b5a4
2013-11-20 13:53:51 -08:00
Pavankumar Kondeti dbfde4ef3a qcom: hsic: Unbind the unused HSIC on msm8226
When the HSIC is used on msm8226, the device will always be connected
during boot up. HSIC does not allow system suspend until a device is
detected. Hence unbind the HSIC during boot up if it is not connected
to any device.

Change-Id: Ifa97cfcf0013820eeeb9a51fe02f00124f7629f4
2013-10-24 14:24:36 -07:00
Vamsi Krishna 16ed0f8767 qcom: hsic: Unbind hsic for apq8084 standalone
As there is no usecase for HSIC on standalone configuration remove
hsic.

Change-Id: I4a01002fd40593c26591b323a38a99dcab02dca8
(cherry picked from commit f48c21f800fde04943687052a39d5d9af60028c7)
2013-10-24 14:07:10 -07:00
Jack Pham 456f23b7af Revert "qcom: usb: force apq8084 to diag,adb composition"
Switch back to full USB composition as USB 3.0 primary controller is
functional.
2013-09-17 21:35:33 -07:00
Jack Pham 126dbf5eb8 qcom: usb: force apq8084 to diag,adb composition
Currently apq8084 is booting using the USB 2.0 controller. However,
on this target, this controller is limited in the number of endpoints
supported, hence we can only support at most two or three functions.
Set the default composition to diag,adb for now until the USB 3.0
controller is fully functional.

Change-Id: Id01c0bf929e01120ca406abd57f0e492316ce11e
2013-09-16 00:21:23 -07:00
Manu Gautam a1e67e44d1 qcom: Cleanup init.qcom.usb.sh
Drop code relevant for unsupported targets and
define default usb compositions so that we don't
need to change this file for every new target.

Change-Id: Ib6ae26f9ffeb8b68e7703296fbea8372d17b1a64
2013-09-13 12:39:13 +05:30
Hemant Kumar d956ee6755 init.qcom.usb.sh: Enable 9031 composition for APQ8084
Enable 9031 as the default composition for APQ8084 which
comprises of following functions:
MSM DIAG + MDM DIAG + ADB + DUN + NMEA + RMNET + MSC
Previous composition was: DIAG + ADB

Change-Id: I11835d11a97e0fe7bdce6f9852388c42beb34331
2013-09-05 11:51:54 -07:00