This reverts commit 32948d8b86.
See commit a8b1fa6c47 ("Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs"")
Conflicts:
drivers/devfreq/devfreq.c
Change-Id: If4fec73bb1cf38afffd4699dfe25b8c32ea7472f
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Some special applications of video may require:
rockchip_pmu_pd_on(dev)---> force power on pd
rockchip_pmu_pd_off(dev)---> force power down pd
rockchip_pmu_pd_is_on(dev)---> pd status
Change-Id: I264d76559aef0b0540130bf29a4635a3f5380a7c
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
The initialization frequency of cci was adjusted from 300M to 600M.
Change-Id: I36ea20ec84c97f893894687ce4eb7bd021d372a0
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Innosilicon LVDS/TTL PHY implements LVDS TIA/EIA protocol.
Normally, Innosilicon LVDS/TTL PHY contains four 7-bit
parallel-load serial-out shift registers, a 7X clock PLL,
and five Low-Voltage Differential Signaling (LVDS) line drivers
in a single integrated circuit. These functions allow 28 bits
of single-ended LVTTL data to be synchronously transmitted over
five balanced-pair conductors for receipt by a compatible receiver.
In addition, Innosilicon LVDS/TTL PHY could extend from 4 lanes
to N lanes (N is required by the customer). Therefore, the TTL
lines extend respectively.
Change-Id: Ib48537c49dec919e2ed5bc6347217fe83be07371
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
modify vop-dclk-mode to 1 for rk3368-808-evb to fix
screen display glitter.
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
Change-Id: Ib13304b5e97626e76dafad91ba296f37b9b3159a
debug_port_init() may called when earlycon is used, which may block
kernel init. Use console_lock()/console_unlock() to avoid the race.
Change-Id: I711c038f31141cb5225624e2a9d746bd4de232e4
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
There is a big delay between DMA transmission completed and waiting for
interruption, which results in the degradation of read performance.
It is modified to use usleep_range delay without interruption, and
the read performance is improved by 40%.
Change-Id: Ia9b92382d7a1a4fbd157dace2067c7dd15cb69ca
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
This patch supports fusb302 to do data role swap for
Type-C Dongle with PD adapter.
The test case is:
- Use a Type-C Dongle (PD adapter & USB & HDMI)
- Plug a PD adapter into Type-C Dongle first, then
connect the Dongle with RK3399 Type-C0 port.
- Check if Type-C Dongle can fetch 5V with the following log:
"fusb302 4-0022: PD connected as UFP, fetching 5V"
- Wait for the data role swap completion (hundreds of
milliseconds), then check if the Type-C USB can work
in DFP mode.
Without this patch, the DWC3 can't switch to DFP mode
after the data role swap completion. It's because that
when the fusb302 do data role swap, it only sends extcon
notifier with EXTCON_USB true or EXTCON_USB_HOST true.
Generally, the sequence of the extcon notifier sent from
fusb302 is:
- send "EXTCON_USB = true" and "EXTCON_USB_HOST=false"
to DWC3 driver, then DWC3 switch to UFP, and set the
connected flag to true.
- After swap completion, send "EXTCON_USB = false" and
"EXTCON_USB_HOST = true" to DWC3 driver. Because the
connected flag is true, the DWC3 is unable to switch
to DFP mode.
This patch forces DWC3 to do disconnection if it detects
the connected flag is true and the DWC3 mode is UFP.
This patch can also fix a bug if we use command to force
DWC3 mode to DFP (host mode) when the DWC3 is working on
UFP mode and connecting to USB Host.
Change-Id: I5b3a17957ef720eb90664186033ef91269ecbc38
Signed-off-by: William Wu <william.wu@rock-chips.com>
There are currently 1200+ instances of using platform_get_resource()
and devm_ioremap_resource() together in the kernel tree.
This patch wraps these two calls in a single helper. Thanks to that
we don't have to declare a local variable for struct resource * and can
omit the redundant argument for resource type. We also have one
function call less.
Change-Id: Ibca8e80bb3724ee7dcfb1754ae93dbe6220bf556
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
(cherry picked from commit 7945f929f1)
Fix commit 079b3c7cdb ("usb: dwc2: make hcd into L3 power
off state when suspend").
This fixes otg-host restore failed after system resume for
dwc2 related interrupts were not enabled when no gadget had
been bounded before.
Change-Id: Iceac66acf063c6226dcafb2086149122511ab5c1
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Refer to lowlevel mechanism of dwc2, amend the PHY operation
process in case of unbalance for power on and off as well.
This patch fix unbalanced phy power management if otg cable
plug in between the completion of dwc2 probe and udc_start.
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: Ic0c2811ed84f8f46e99e03eff44c9d20a791e05f
update this for support some GRF's register offset over 0x10000
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: I8427e17fafa537980f2233483c23e8f3511fd9e9
The Audio PWM provides an easy and cheap solution for audio playback
in low quality. it acts as a digital-to-analog converter(DAC), which
converts the digital audio PCM data to the analog PWM signals.
Change-Id: I50ca4aebf4fc5c92ff07d2aa53e9d33b91035e46
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
It is too long to reset the time with 1000ms, which
would make the system init and resume slowly, 50ms
is enough.
Change-Id: Ifba39f401d14e161dd3d49e1b20ae102569ebb58
Signed-off-by: David Wu <david.wu@rock-chips.com>
VPU without hardware id register will be set with -1 for reg_id,
so fix the reg_id from u32 to int.
Change-Id: Ic3cf15f223610428f77fd5e3291e74974a2a7981
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
The flag IRQ_GC_INIT_MASK_CACHE indicates to initialize the mask_cache
by reading mask reg. The gpio controllers on rockchip SoCs need enable
pclk_gpio before read/write controllers.
The irq_enable in irq_chip will be called during irq request, but the
virq needs to be get before irq request, so it causes an read without
pclk of gpio.
This patch removes flag IRQ_GC_INIT_MASK_CACHE, set mask_cache of chip
after direct setting.
Change-Id: I8e1dcf649bb8021b90ffd08bc9b44ad71232d4da
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
when we create a kthread with ktrhead_create_on_cpu(),the child thread
entry is ktread.c:ktrhead() which will be preempted by the parent after
call complete(done) while schedule() is not called yet,then the parent
will call wait_task_inactive(child) but the child is still on the runqueue,
so the parent will schedule_hrtimeout() for 1 jiffy,it will waste a lot of
time,especially on startup.
parent child
ktrhead_create_on_cpu()
wait_fo_completion(&done) -----> ktread.c:ktrhead()
|----- complete(done);--wakeup and preempted by parent
kthread_bind() <------------| |-> schedule();--dequeue here
wait_task_inactive(child) |
schedule_hrtimeout(1 jiffy) -|
So we hope the child just wakeup parent but not preempted by parent, and the
child is going to call schedule() soon,then the parent will not call
schedule_hrtimeout(1 jiffy) as the child is already dequeue.
The same issue for ktrhead_park()&&kthread_parkme().
This patch can save 120ms on rk312x startup with CONFIG_HZ=300.
Change-Id: I2ae4edb538ea6f55cf5b8f8b5dc6311d1811a4ae
Signed-off-by: Liang Chen <cl@rock-chips.com>
The rockchip pinctrl creates an irq domain by irq_domain_add_linear,
but it not means all pins' irq are in linear.
Such as rk808 interrupt, it defines in node:
rk808 {
interrupt-parent = <&gpio1>;
interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
}
then i2c core driver will get virq by
irq = of_irq_get(dev->of_node, 0);
->irq_create_of_mapping(&oirq);
finally the rk808 irq is mapping in DOMAIN_BUS_WIRED irq domain.
It's better to get virq by irq_find_mapping.
Change-Id: Ib416ace5c2212c9a704b01e78f77d3425dc8d21b
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
It takes time to create irq mapping for all pins in probe, remove
it since the mapping will be created in gpio_to_irq.
Change-Id: Idec03ea43711335190cf440fa30f9f4c654e4540
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Since all pins have been created mapping in probe, the create
mapping operation in gpio_to_irq will never happen, the issue
is hidened.
The patch add clk_enable/disable for gpio_to_irq.
Change-Id: I50c945f95f9f66ed3ab83a8c332893151272e9f6
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
The INNO MIPI D-PHY is built in witch a standard digital interface
to talk to any third part Host controller.That is part of Rockchip SoCs,
like rk3368.
Change-Id: I9806882e0e3fb6b20348015d0f34923d1bc46b89
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
This reverts commit 4ef2449889.
The description for CRU_EMMC/SDMMC/SDIO_CON[0/1] is jumble on
chapters, make it clear that the correct shift is 1 that from
IC engineer.
Change-Id: I48dce293ec6ef82a5c78db38efc083227776ea99
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
It's a Designware MIPI D-PHY, used by ISP in rk3288.
(am from https://patchwork.kernel.org/patch/10119093/)
Change-Id: Ib3386c9c8b58242a2a09bcd3bc7bd66589053a9b
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
ov13850 camera module used by rk3288 evb board
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I23ad3dcb06a9f5c748a9399f5d4e9e9b1936ca52