gpio4c2 default status is pull up, when it connect to bt module,
that cause this pin default voltage level to 0.8V, it may trigger
irq. So set this pin default status to pull none.
Change-Id: I48f0e22198f200b05c71b4330602e8f638cf997a
Signed-off-by: Lin Huang <hl@rock-chips.com>
user_atom.atom_number can be indirectly controlled by user-space,
hence leading to a potential exploitation
of the Spectre variant 1 vulnerability.
This issue was detected with the help of Smatch:
drivers/gpu/arm/midgard/mali_kbase_jd.c:1397 kbase_jd_submit() warn:
potential spectre issue 'jctx->atoms' [r]
katom = &jctx->atoms[user_atom.atom_number];
Fix this by sanitizing user_atom.atom_number
before 'katom = &jctx->atoms[user_atom.atom_number];'.
Notice that given that speculation windows are large, the policy is
to kill the speculation on the first load and not worry if it can be
completed with a dependent load/store [1].
[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
Fixes: 5cf27d0b60 ("Mali: midgard: changes to enlarge BASE_JD_ATOM_COUNT to 512, for defect 184210")
Change-Id: If52f30d29a80a06c6693ddadd5947ab9fe8fbc25
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change the order in which the sound card is used. The rk809 sound card is
used by default for card0.
This will keep the status on original, and just add the hdmi sound card
for rk3399pro evb board.
Says the cards order as below.
[root@rk3399pro:/]# cat /proc/asound/cards
0 [rockchiprk809co]: rockchip_rk809- - rockchip,rk809-codec
rockchip,rk809-codec
1 [rockchiphdmi ]: rockchip_hdmi - rockchip,hdmi
rockchip,hdmi
Fixes: 313c342e9a
("arm64: dts: rockchip: add hdmi-sound for rk3399pro evb board")
Change-Id: Ia14f5703f6b79795cd7504fa35a23a550178b82f
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
This reverts commit 987105c1ff.
According to DWC2 Programmer's Guide, 2.1.1.2 Dedicated TxFIFO Operation,
more space allocated in the transmit IN Endpoint FIFO results in a better
performance on the USB and can hide latencies on the AHB.
So this patch sets the depth of TxFIFO number 1 to 1024 Bytes which is
usually used for primary USB function (e.g MTP).
Test on RK3288 EVB Android P:
Without this patch: MTP over eMMC - Read is only 9.48 MBps
With this patch: MTP over eMMC - Read is 28.4 MB/s
Side effect of this patch, if the user uses UVC function, it need to
change the depth of TxFIFO number 1 to 512 Bytes (used for UVC control
ep), and change the depth of TxFIFO number 2 to 1024 Bytes (used for
UVC stream ep). The dwc_otg_310 driver has provided module_param to
set the depth of TxFIFO for each number. You can set the depth of TxFIFO
number 1 in cmdline like this:
dwc_otg.dev_tx_fifo_size_1=0x80,dwc_otg.dev_tx_fifo_size_2=0x100
Change-Id: I7cebf112731e43f89994b92729bf2a3f9e54e8dc
Signed-off-by: William Wu <william.wu@rock-chips.com>
To avoid bring some noise dues to unstable micbias.
Change-Id: I0127505f0adeacda5d852ae3cefae2fb5f4ee9d2
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
rockchip_i2s.c driver update the DSP_A & DSP_B config,
so we update the dts config.
Change-Id: Ida013540f263d082e20d65a43c3de932aca9f906
Signed-off-by: Xiaotan Luo <lxt@rock-chips.com>
DSP_A: PCM delay 1 bit mode,L data MSB after FRM LRC
DSP_B: PCM no delay mode,L data MSB during FRM LRC
Change-Id: I198519c431815de3ca1fc154da78773ca705f0e0
Signed-off-by: Xiaotan Luo <lxt@rock-chips.com>
Add cru regs dump when system panic.
It's just for debug.
Change-Id: Ic60f491d549e030490c14ea78f4857a8cead596d
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Add cru regs dump when system panic.
It's just for debug.
Change-Id: I7f9bc78deef60b1fa48bada5b1a6203185ddce48
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Add cru regs dump when system panic.
It's just for debug.
Change-Id: Ic4efc985892cbcc5e561203fe8e00dba116439e7
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Add cru regs dump when system panic.
It's just for debug.
Change-Id: Ide2c3e8add083934672f6d22d8182bcfde046783
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Add cru regs dump when system panic.
It's just for debug.
Change-Id: I86ff4f12ed932431d131d22a307360418e2e9f40
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Add cru regs dump when system panic.
It's just for debug.
Change-Id: I3aeeeb7f7b9240c917c18bc2d36b082003dc6370
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Amend rk322x-usb2phy to rk3228-usb2phy, to keep consistent with
Upstream codes.
Change-Id: I8b97856c25ce61e9d8565f6c8653938e7465e4d4
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Format rk3228 chip name, to keep consistent with Upstream codes.
Change-Id: I3b49b18257485661570086be0898bdcbd016808a
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
This adds support usb2-phy for rv1108 SoCs and amend phy Documentation.
Change-Id: Ib1598bf9ec25adefad798a9fe579d38007e91a39
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
(cherry picked from commit fc938810d9)
Add otg-mux property to support multiplexed interrupt in otg-port
on some Rockchip SoC (e.g RV1108).
Change-Id: I93a0d38aec9a13a7b5677d34fe87ea7330e0c2d9
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
(cherry picked from commit 9c1712d5ce)
The otg-id/otg-bvalid/linestate interrupts are multiplexed together
in otg-port on some Rockchip SoC (e.g RV1108), this patch add support
for it.
Change-Id: If1a29c950fe25a8ca4873fcd3d2d4fcbb504da95
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
(cherry picked from commit 0983e2abc8)
Add rockchip,usbgrf property to support the registers of usb-phy
that are distributed in grf and usbgrf on some special Rockchip
SoCs (e.g RV1108).
Change-Id: Ifcec36474e6828ee90009a47dceca6174c76f45d
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
(cherry picked from commit c7527e07f0)
The registers of usb-phy are distributed in grf and usbgrf on some
Rockchip SoCs (e.g RV1108), this patch add a new rockchip,usbgrf
property to support this companion grf design.
Change-Id: If66c03426d4ad63b285fa7132ae20ee10be1d627
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
(cherry picked from commit 1543645c31)
The source code of mali_so must be modified correspondingly.
Change-Id: I3f4bd03fa2d369d912e6bc05c53d2d3abefb92d3
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Several governors use the user space limits df->min/max_freq to adjust
the target frequency. This is not necessary, since update_devfreq()
already takes care of this. Instead the governor can request the available
min/max frequency by setting the target frequency to DEVFREQ_MIN/MAX_FREQ
and let update_devfreq() take care of any adjustments.
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
(cherry picked from commit 6ff66e2a00)
Conflicts:
drivers/devfreq/governor.h
Change-Id: Ide444eaf2a0d7c5f20d8521786749e8dbb1b1632
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Commit ab8f58ad72 ("PM / devfreq: Set min/max_freq when adding the
devfreq device") initializes df->min/max_freq with the min/max OPP when
the device is added. Later commit f1d981eaec ("PM / devfreq: Use the
available min/max frequency") adds df->scaling_min/max_freq and the
following to the frequency adjustment code:
max_freq = MIN(devfreq->scaling_max_freq, devfreq->max_freq);
With the current handling of min/max_freq this is incorrect:
Even though df->max_freq is now initialized to a value != 0 user space
can still set it to 0, in this case max_freq would be 0 instead of
df->scaling_max_freq as intended. In consequence the frequency adjustment
is not performed:
if (max_freq && freq > max_freq) {
freq = max_freq;
To fix this set df->min/max freq to the min/max OPP in max/max_freq_store,
when the user passes a value of 0. This also prevents df->max_freq from
being set below the min OPP when df->min_freq is 0, and similar for
min_freq. Since it is now guaranteed that df->min/max_freq can't be 0 the
checks for this case can be removed.
Fixes: f1d981eaec ("PM / devfreq: Use the available min/max frequency")
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
(cherry picked from commit df5cf4a361)
Change-Id: Ib8e2def7d3bf605dba81cf75bab89a23a39ca6f3
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Commit ab8f58ad72 ("PM / devfreq: Set min/max_freq when adding
the devfreq device") introduced the initialization of the user
limits min/max_freq from the lowest/highest available OPPs. Later
commit f1d981eaec ("PM / devfreq: Use the available min/max
frequency") added scaling_min/max_freq, which actually represent
the frequencies of the lowest/highest available OPP. scaling_min/
max_freq are initialized with the values from min/max_freq, which
is totally correct in the context, but a bit awkward to read.
Swap the initialization and assign scaling_min/max_freq with the
OPP freqs and then the user limts min/max_freq with scaling_min/
max_freq.
Needless to say that this change is a NOP, intended to improve
readability.
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
(cherry picked from commit 2c2cb1e6b0)
Change-Id: I002271f08a076d89c44305ef8c8d5d06cb9818cf
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Never directly free @dev after calling device_register() or
device_unregister(), even if device_register() returned an error.
Always use put_device() to give up the reference initialized.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
(cherry picked from commit 2d803dc8f7)
Change-Id: Ida1b076e7207854dc8567a3a635e1a638a5789c7
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
df->governor is being dereferenced before it is null checked,
hence there is a potential null pointer dereference.
Notice that df->governor is being null checked at line 1004:
if (df->governor) {, which implies it might be null.
Fix this by null checking df->governor before dereferencing it.
Addresses-Coverity-ID: 1401988 ("Dereference before null check")
Fixes: bcf23c79c4 ("PM / devfreq: Fix available_governor sysfs")
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
(cherry picked from commit 63f1e05f7f)
Change-Id: I9f30f3bb6e1f6b4342c63e505d48103c752b9b28
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
The freq_table array of each devfreq device is always not NULL.
In result, it is unneeded to check whether profile->freq_table
is NULL or not.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
(cherry picked from commit ccc4c3bcbb)
Change-Id: I1efaeec81f6b65c920b57e3d0e7051c5d6d7299b
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>