Since we need overwrite this rockchip_suspend node in sub dts file,
sometimes. Add a alias for before it.
Change-Id: I6d951d1c0bfff1cde619906eb9f11256d057a9fe
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
On rk3288, for gpio bank 0, the registers which configure pull-up,
iomux, and drive strength don't implement the enable bits in the upper
half of the register, unlike the other gpio configuration registers,
and so the kernel must perform a read-modify-write of the register to
update a particular gpio in that bank.
Change-Id: I4a6953839307e3a75b2ac554aac3dc865583617d
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
If hdmi is inserted or removed before android is launched, screen
size is changed and uboot logo is showing on wrong screen position.
For example, screen size is 720x576 in uboot, hdmi is inserted during
kernel is booting, screen size is changed to 1920x1080, logo size
is still 720x576 and shown on left-top.
This case is occurred on box, mid has no problem. So we need to resize
uboot logo to new screen size.
Change-Id: I6247bf8e77d181687986815c960ec72d4c59a757
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
dev_set_name()
When we use of_device_add() to create platform_device and add it to device
hierarchy, the platform_device.name and device's name will point to the same
memory.
Later we use dev_set_name() to change the device's name, it will alloc new
memory to store name and free old device's name. After it, the
platform_device.name will point to an freed memory, access platform_device.name
maybe lead to unpredictable exceptions.
So, we alloc new memory for platform_device.name in of_device_add()
Change-Id: I59bf0941ee4e094053971d41d386206e47fddcaa
Signed-off-by: Meiyou Chen <cmy@rock-chips.com>
1.Using 64bit width variable to cached the read and write data bandwidth
because it may overflow when calculating read and write data bandwidth.
2.Get ddr burst length to calculating bandwidth because lpddr2's burst
length may be bl4 or bl8.
Change-Id: I28db1793e411fc3e18edc3b6421ab3d397d92aa5
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
Move rk808 regulator init parameters to the rk3xx-xx.dts
Convenient for different products setting and modify
Change-Id: I03673f4dbd478df0630e6b982e72597ade14d810
Signed-off-by: zhangqing <zhangqing@rock-chips.com>
Phy PLL may be unlock under electro-static test. The higher the
electro-static voltage, the more likely the PLL will be lost.
If PLL is unlock and irq is triggered, we will reset registers
to make it lock on correct frequency.
Change-Id: I86eaa660e837e8c2e59c8e39e3ce083bb89c1bac
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
Rk808 will data abort if it has not sleep gpio in dts, and there is no
pmic_sleep_gpio for some board, add a validity checking before
gpio_request can fix this data abort.
Change-Id: Ic2b40f7bfb00e95d283dce72a33dd844cc2c7e27
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
If the request being dequeued is already started, disable endpoint
to stop the transfer and then call dwc_otg_request_done().
Endpoint will be re-enabled on next call to dwc_otg_ep_start_transfer().
TEST=use RK3128/RK3288/RK3368 board, adb root and then adb reboot,
check if usb_req->buf is used after free.
Change-Id: I8c9304f29c578f679ad0841350920f1350bd32df
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
If uboot_vic has HDMI_UBOOT_NOT_INIT flag, it means uboot just
pass the preset vic value, registers has not been set in uboot.
If not, hdmi has been power up in uboot, should not operate phy
register again.
Change-Id: I64f48bd878ec124a94f25a752a74dc9bae502b2b
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
It is also for the later soc based on arch v8
Change-Id: I5e4fef1fa4176ea371b1653ead8cef87e4ac0e6f
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Thinking about the PWM remote-ctrl is used by box, we should
put this into box dts.
Meanwhile, that PWM configure will break the normal PWM driver.
This patch will fix it.
Change-Id: I14878332631f94f512412ced5ceb8689f8bfbe46
Signed-off-by: huang zhibao <hzb@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
We are assuming that PWM need use the property, we can support the
SPI interrupts for PWM.
At the moment, we can find the remotectl pwm is needed on box.
We can add the property for all PWMs. AFAIK, the pwm driver don't use it
but the drivers/input/remotectl/rockchip_pwm_remotectl.c
Change-Id: Ia223e6cc0e882477614b555bd09c86fd4bf8dbd7
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
when the frequency of big cluster and little cluster are bigger then
600MHz, set the frequency of cci400 to 576MHz, otherwise set the
frequency of cci400 to 288MHz.
Change-Id: I9e28b51bfdfcaf62464b8511c731fa2cd0ed5d9d
Signed-off-by: Xiao Feng <xf@rock-chips.com>
When reboot or shutdown, hcd clean urbs and disable host interrupts. But
there may pending interrupts, so clean them.
Change-Id: Ide34aab5857a790a0912fb56ebe18d43ba228cf0
Signed-off-by: Feng Mingli <fml@rock-chips.com>
Signed-off-by: Yunzhi Li <lyz@rock-chips.com>
SMbus and I2C handling from driver core into separate
transport modules and makes them optional.
This driver pick up from chromium 3.14-kernel
Here is the URL:
https://chromium.googlesource.com/chromiumos/third_party/kernel/+/v3.14
----Note a bit different-----
we can easy replace the reinit_completion(completion);
with "completion->done = 0" in driver.
Change-Id: Idf373a502faea7913889f4a2f14ba71cae0da5b8
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Under certain circumstances, we want to disable some input
devices from userspace. In particular, when we detect that the lid of a
laptop is closed, we want to be able to disable touchpad and
touchscreen to avoid bogus input.
To facilitate this, we introduce the "inhibited" sysfs property for
input devices. Using this property, userspace can tell a driver that the
events it can provide are not currently of interest and should be
ignored. We provide hooks so that the driver can take additional
actions, such as powering down the device.
We deliberately keep this limited to input devices for now to keep the
implementation as straightforward as possible.
(cherry-pick from: https://chromium-review.googlesource.com/207989)
verify that touchpad works
echo 1 > /sys/bus/i2c/drivers/elan_i2c/4-0015/input/input0/inhibited
touchpad stops working
echo 0 > /sys/bus/i2c/drivers/elan_i2c/4-0015/input/input0/inhibited
touchpad works again
Signed-off-by: Patrik Fimml <patrikf@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/207989
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
Change-Id: I889d37ef7ffc49f3c073b1c283d5c3327c263b7f
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
commit 3e9b2bae83 upstream
These functions are being open-coded in 3 different places in the driver
core, and other driver subsystems will want to start doing this as well,
so move it to the sysfs core to keep it all in one place, where we know
it is written properly.
Conflicts:
git checkout drivers/base/bus.c, In actul we don't use the interfaces in
drivers/base/bus.c
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: I0046a5572c780a0ea2b175ef753c408f6c10ba85
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
If hdcp is enalbed, reset tmdsclk in uboot mode will make hdcp unstable,
which make sink check hdcp failed and show black picture.
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
Using fiq to notify trust to stop cpu when ddr changing freq.
1.bl30 must update to rk3368bl30_v2.10.bin and bl31 must update to
rk3368bl31_v1.5.bin.
2.Insure kernel commit 7643ffa0e6 and cc6e554e54 were merged.
Change-Id: I2449613221c49a49ba14dab54e77714e961dcd16
Signed-off-by: Tang Yun ping <typ@rock-chips.com>