1. Enable TE vsync function in gpio config.
Note that pinfo.lcd.refx100 need to be align with TE frequency in panel.
2. add lcd vertical porches to have correct value of MDP register 0x100
and 0x210
3. remove the mfd->ibuf.vsync_enable in condition to have correct value of
MDP register 0x20c
case 01186196
Bug: 8767597
Change-Id: Ie8c3021d447c255c811ca95bf71ec4cfb2949b6f
Signed-off-by: yetta_wu <yetta_wu@asus.com>
mdp_max_bw has to be increased due to the high resolution panel of flo
targets.
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Saurabh Shah <saurshah@codeaurora.org>
Underrun issues can be solved by changing mdp bandwidth parameters:
max_bw, ab_factor and ib_factor. However these parameters are not
universally same for all targets, and one set of values that works for
one target could cause underruns or higher power on other
targets. This is board side change.
CRs-Fixed: 464492
Change-Id: I2a8fbb9018011ddf42dfa50b371e450e38f4351a
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Saurabh Shah <saurshah@codeaurora.org>
The eeprom may hold the data for calibration of autofocus,
whitebalance, lens shading and defect pixel correction.
The eeprom driver is supported with read write functionality.
Change-Id: I952bf1972bac9747ae4f0ea09c4dd6b8937c3f98
Signed-off-by: Jeyaprakash Soundrapandian <jsoundra@codeaurora.org>
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
LED must not be on when the device is pwoered on and charging.
Issue 8837333
Change-Id: I4b272a03056ba58914846ce93fc0a1c777f99279
Signed-off-by: xinchuan_wu <xinchuan_wu@asus.com>
key chord driver is accessible at /dev/keychord. This driver can
be used for receiving notifications when client specified key
combinations are pressed.
Bug: 8733741
Change-Id: I901e24fe6f317daf97822a09de31a32bed415011
Signed-off-by: paris_yeh <paris_yeh@asus.com>
From Cortex-A15 MPCore TRM, L2 cache is able to recover single-bit
soft error when ECC configured. For better user experiences and L2
cache is configured to support ECC in default, we disable kernel
panic when single-bit soft error was detected.
Change-Id: I1991ae2b8b55a01d36c020fdc758aa1266ca9684
Signed-off-by: paris_yeh <paris_yeh@asus.com>
Priority is : 1. AC, 2. wireless charging, 3. USB.
Charger default setting is that wireless charger has higher priority,
so disable wireless charging when AC is plugged in since hardare rev_c.
Bug: 8411313
Change-Id: I6da25d1d6fbdf683421918229babba0ab97afebc
Signed-off-by: Hank_Lee <Hank_Lee@asus.com>
When wakeup interrupt fires, gpio-keys driver kicks the timer
function to perform debouncing. Upon timer expiration, schedule
work to detect GPIO line changes.
Original debounce timer, 15 ms, makes a chance to let latter
rising interrupt to reset kernel timer activated by previous
falling interrupt for power key. When issue happens,
gpio_get_value() only detects released event and missed previous
pressed event generated by falling interrupt.
Issue is observed more easily when device comes out suspend mode.
Try to adjust doubounce timer to alleivate this issue
Change-Id: Idcd166fcbcfb7c91804ea2ab9017ed4dbdb87ec6
Signed-off-by: paris_yeh <paris_yeh@asus.com>
This reverts commit f4b3e8bfb2.
The following patches called WA#3B are used to address instability
issues so that workaround of keeping GFX3D footswitch on should
be reverted to avoid additional power hit.
f834455 msm: footswitch-8x60: Skip GFX memory power collapse on 8064.
38116f7 msm: footswitch-8x60: Update 8064 footswitch_enable() sequence for GFX3D
667dd0a msm: footswitch-8x60: Allow specification of per-fs reset delays
547218f msm: clock-8960: Add 1.8MHz rate to 8064's gfx3d_clk plan
Bug: 8333617
Change-Id: I448d49349ebcc711855071b62d70bfde367fa536
Signed-off-by: paris_yeh <paris_yeh@asus.com>
Update footswitch_disable to skip GFX memory power collapse on 8064 to avoid
any voltage droop on vddmx during GFX3D footswitch toggling.
As per hardware designer recommendations this would help to improve system
stability when responding to the inrush current event.
Change-Id: Ifa2f62629f0639d29f882d009dc5f4c10da46ca8
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
Signed-off-by: Ed Tam <etam@google.com>
This feature will enforce the security policies as configured by the
user-space security script.
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
With the fine-grained access control in place for QMI clients, default
security check in socket create operation is redundant. Update the
IPC Router to perform the default security check only for the
bind operation, which is used during QMI service registration.
Change-Id: I967dbc3d414d39d307c071ff49c319828b5ed19e
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
This feature will enforce the security policies as configured by the
user-space security script.
Change-Id: I641df5b996c7774c1a1c96bc554846360f2863a3
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
Currently there exists a small time interval during initialization
where QMI clients in user-space can communicate with QMI services
before the IPC Router Security Configuration(IRSC) is complete.
Only allow clients to communicate after IRSC is complete.
Change-Id: I773ad5b3cb02c51a725cd60a77466876c1498b64
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
In order to provide fine-grained access control to QMI services,
a security script from user-space will feed the security rules to
IPC Router. The security rule implies that in order to send a QMI
message to a service, a client process should belong to a specific
Linux/Android group. IPC Router, after receiving the security rules,
will enforce the access control rules.
Change-Id: I49f8d7c0067fc37cb0b4de2ccb46a575905ef64f
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
When a message is looped back to the user-space, sometimes the
receiver acts quickly, reads the contents of the packet and frees
the buffer. This leads to a scenario where the sender is trying to
dereference the packet length info of a freed packet. Hence a garbage
packet length gets returned to the user-space.
Fix this race condition by storing the packet length of the packet
being looped back into a variable and return the value of that variable
when the loopback operation is complete.
Change-Id: I595a562bfa12151b2f9154df681ce23c965dfff5
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
As part of processing HELLO message, IPC Router does not check the status
of a subsystem before trying to advertise the services hosted in that
subsystem. During the subsystem restart scenario, sometimes two or more
subsystems get reset together. When one of the subsystems come up, IPC
Router ends up accessing the data structures of the other subsystems that
are still in shutdown stage. This causes the IPC Router to trigger invalid
pointer dereference.
Check the status of the subsystem before trying to advertise the services
hosted in that subsystem.
CRs-Fixed: 447217
Change-Id: I50bc2bc21fcfd31ba23f6ebba5728f13268a76e5
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
When the server port is closed, only REMOVE_SERVER message is sent. If
the same port is used as a client port prior to the server registration,
then the IPC Router in the remote subsystem does not clean up the client
information associated with that port. This leads to memory leak in the
remote subsystem.
When the server exits and closes the port, IPC Router has to send both
REMOVE_SERVER and REMOVE_CLIENT messages. This ensures that the
IPC Router in the remote subsystem cleans up both the client and server
information associated with that port.
CRs-Fixed: 434981
Change-Id: I1d59aa773398d10dd5c648969b9da2e1cf481d24
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
IPC Message Router while processing the HELLO message, sends a server list
information registered locally to the remote subsystem which has sent the
HELLO message. IPC Message Router does this operation by locking mutexes
in the following order:
1) routing_table_lock
2) server_list_lock inside msm_ipc_router_send_server_list
IPC Message Router while processing the NEW_SERVER message, accesses the
server list information to check if the server information advertised by
the remote subsystem is already known before adding that information to
the server list. IPC Message Router does this operation by locking mutexes
in the following order:
1) server_list_lock
2) routing_table_lock inside msm_ipc_router_lookup_remote_port
This leads to a deadlock if the IPC message router processes HELLO message
from one subsystem and NEW_SERVER message from another subsystem. Fix this
out of order locking scenario by locking the server_list_lock before
accessing the msm_ipc_router_send_server_list function.
CRs-Fixed: 417155
Change-Id: Ie38c1c21dccefac7a9b36ad107b13feccd986ed2
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
QMI server(<service_id:instance_id>) info is maintained using a hash
table. The server's instance_id is used as the key to index into that
hash table to perform maintenance operations(add, lookup, delete).
The service_id values are well distributed than the instance_id values
and hence the operations on the hash table are not optimized. Optimize
the hash table operations by using server's service_id as the key to
index into the hash table.
While accessing the server hash table, the mutexes are locked and
unlocked inside the access functions. This introduces some race
conditions once the access functions return. So lock and unlock the
server hash table mutex outside the access functions.
CRs-Fixed: 415158
Change-Id: Id1ce6bbfc677df26ff209fd62dca8553c7d2b4a5
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
When IPC Router receives a HELLO message from a remote IPC Router, the
protocol is to send a list of servers registered locally and registered
outside the mesh network where the HELLO message is received. Currently
the implementation does not follow this protocol strictly and hence
correct the implementation.
CRs-Fixed: 414147
Change-Id: I75aa089b152baea0925d127b1d9deb6684677cfa
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
IPC Router Routing table is organized as a hash table. The routing
table information is dumped based on the index into that hash table.
Update the logic to dump the routing table information based on the
subsystem's node id.
Change-Id: Ideaf24934b93349e2f2cf1d695d08841c04aa5f9
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
Update 8064's GFX3D enable sequence per hardware designer recommendations
to improve system stability when responding to the inrush current event.
Differences from the standard footswitch_enable() sequence include:
- Decreasing the reset_rate from 27MHz to 1.8MHz, and increasing
reset_delay_us from 1us to 10us to compensate for the slower clock.
- Enable clocks for reset propagation only after the core has been
powered on.
- Forcefully limit the AFAB and EBI1 clocks to a low value (decided
by the RPM) by means of a write to the RPM_CTL RPM resource.
- Removal of the reset toggle after powering on the core, which (while
harmless) is not applicable to 8064.
Change-Id: I943842b56ff96b2e6077a419566d91ac184a6fda
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Custom reset rates can be specified for clocks via fs_clk_data. If
these rates are very low, then the default reset delay of 1us may
not be sufficient. Address this by allowing custom reset delays to
be specified on a per-footswitch bases.
Change-Id: Id9b9377d79436a7fe5007a8f37216a456d66ce1a
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
This rate will be used by the 'footswitch-8x60' driver when
controlling GFX3D power.
Change-Id: Ib796114dc90b468f1c0aa014a9db699f3b854adf
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
A hardware known issue is observed that KYPD_PWR_N connected to
PMIC8921 is blocked by Asustek-owned low detective circuit while
battery voltage is under 3.4V.
This phenomenon makes KYPD_PWR_N always sensing with high no matter
power button is pressed or not.
Change power button handling from KYPD_PWN_N into AP_ONKEY connected
to GPIO#26 of APQ8064, and remove unnecessary keyboard and pwrkey
support from PMIC8921 driver.
Change-Id: I35a6b035b89cedbe7efcb80fad53d4921e5d6427
Signed-off-by: paris_yeh <paris_yeh@asus.com>
This reverts commit f27e4f0e730b99ca4dabed0b408d96dbf73a8fac.
With 01b1dee in system/core to set ADDR_COMPAT_LAYOUT, this is
not needed any longer.
Bug: 8470684
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
Acked-by: Laura Abbot <lauraa@codeaurora.org>
This commit does not actually change the configuration, it just
resolves some inconsistencies so that future changes to the
defconfig will merge more quickly.
Change-Id: I177ed4c5bcd9d4b0ada418032867b6f8cd2a06ea
Signed-off-by: paris_yeh <paris_yeh@asus.com>
set driving strength to 6mA per EE's request.
Change-Id: I26efec96c38fdac01fdc6ad3fa8857963a1d087b
Signed-off-by: hsuan-chih_chen <hsuan-chih_chen@asus.com>
Disable download mode on crashes and keep system to continue
booting for better user experience. Download mode is useful for
collecting ramdump for furhter analysis during stability test.
To enable, type next line in the adb shell before stability test
echo 1 > /sys/module/restart/parameters/download_mode
Change-Id: I08c02dfd42cf28803b78385916f50ea3e42eb7ae
Signed-off-by: paris_yeh <paris_yeh@asus.com>
On flo hardware revision C, micbias1 is not grounded with external
capacity, so it should set micbias1 capless setting as 1
(no external bypass capacity) to avoid noise.
Bug:8611206
Change-Id: I82644a9123d092490ccc0acf6cdfa68964ef9c22
Signed-off-by: sam_chen <sam_chen@asus.com>
To restart the individual module when crash occurs
instead of whole system panic.
Change-Id: I3e2374d9a89d4778b0811457042720478aa8683e
Signed-off-by: tzuhsuan_chen <tzuhsuan_chen@asus.com>
No need to control the PMIC L17 and S4 after SR1 device.
Change-Id: Iad65971f227afb471c829c070aea5da46ed44e38
Signed-off-by: mars_kao <mars_kao@asus.com>
1. Remove the gpio 26 config in board-flo-pmic.c
since this gpio is already config as PWM function in LK.
2. Add pwm_init function implementation.
3. Config backlight level in pm8xxx_led_probe(), and remove the
pwm_request() part in panel probe function.
Change-Id: I3ce71a9c792ce155bebabd80a24a8ff8fc361ae9
Signed-off-by: yetta_wu <yetta_wu@asus.com>
initialize pinmux setup for keypad pins on all hardware revisions
Change-Id: I788f8cf5731da085abf2c5242f9eb580cca4778a
Signed-off-by: paris_yeh <paris_yeh@asus.com>
Modify the driving strength of usb to 6D DC level. Pass the usb eye diagram.
Change-Id: Id572456758ed7d72cfb48862716cac6ccfb8be14
Signed-off-by: yi-hsin_hung <yi-hsin_hung@asus.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>