Add min/max voltage for usb regulators, also add vin-supply for them.
From rk3568-evb1 hardware design, the power tree about usb is
DC12V
-> VCC5V0_USB(controlled by EXT_EN from PMIC)
-> VCC5V0_HOST(controlled by GPIO0_A6)
-> VCC5V0_OTG(controlled by GPIO0_A5)
The EXT_EN from PMIC RK809 is designed for device power off to cut off
the usb 5.0v power, during system on, it keeps always on.
Change-Id: I21e431b4b41022b101b6db92b0769d096679b67c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
The pcie supply design is (rk3566 evb2 example)
DC12V
-> VCC12V_PCIE(controlled by GPIO0_C2_H)
-> VCC3V3_PCIE(controlled by GPIO0_C2_H)
-> VCC5V0_SYS
-> VCC3V3_PI6C(controlled by GPIO0_C2_H)
The pci phy driver only want to enable or disable the VCC3V3_PCIE power.
Suggested from pcie owner to ignore the VCC12V_PCIE and VCC3V3_PI6C, so
the dts only need to add regulator node for VCC3V3_PCIE.
Most of time we keep the regulator name same as the hardware design, so
the dts node is
vcc3v3_pcie: gpio-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_pcie";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
enable-active-high;
gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
vin-supply = <&dc_12v>;
};
The regulator type is "regulator-fixed" since its voltage always be
3.3v, min and max should be 3300000 make the regulator has a voltage
value.
The regulator can be enabled or disabled by regulator_enable or
regulator_disable function, so make the GPIO0_B7 as "ena_pin" for the
regulator.
The regulator is supplied by DCIN_12V, so add the vin-supply.
Change-Id: Iaf70abe9c9e06504af067dc0e3d60b775557c026
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
cur frame end and next frame start irq will
togeter if v-blank is short. to handle sof
event later if this happens.
Change-Id: If45300c8f640a6516624c4952e4f124afd7a9952
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
Boot-on regulators are always kept on because their use_count value
is now incremented at boot time and never cleaned.
Only increment count value for alway-on regulators.
regulator_late_cleanup() is now able to power off boot-on regulators
when unused.
Change-Id: I7adc58a78fec934e245d9ec94c4604b4d7c7ebb5
Fixes: 05f224ca66 ("regulator: core: Clean enabling always-on regulators + their supplies")
Signed-off-by: Pascal Paillet <p.paillet@st.com>
Link: https://lore.kernel.org/r/20191113102737.27831-1-p.paillet@st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 089b3f61ec)
https://source.android.com/security/bulletin/2021-06-01
CVE-2020-14305
CVE-2020-14381
CVE-2021-0512
CVE-2021-3347
* tag 'ASB-2021-06-05_4.19-stable': (1641 commits)
Linux 4.19.193
usb: core: reduce power-on-good delay time of root hub
net: hns3: check the return of skb_checksum_help()
drivers/net/ethernet: clean up unused assignments
hugetlbfs: hugetlb_fault_mutex_hash() cleanup
MIPS: ralink: export rt_sysc_membase for rt2880_wdt.c
MIPS: alchemy: xxs1500: add gpio-au1000.h header file
sch_dsmark: fix a NULL deref in qdisc_reset()
ipv6: record frag_max_size in atomic fragments in input path
scsi: libsas: Use _safe() loop in sas_resume_port()
ixgbe: fix large MTU request from VF
bpf: Set mac_len in bpf_skb_change_head
ASoC: cs35l33: fix an error code in probe()
staging: emxx_udc: fix loop in _nbu2ss_nuke()
mld: fix panic in mld_newpack()
net: bnx2: Fix error return code in bnx2_init_board()
openvswitch: meter: fix race when getting now_ms.
net: mdio: octeon: Fix some double free issues
net: mdio: thunder: Fix a double free issue in the .remove function
net: fec: fix the potential memory leak in fec_enet_init()
...
Change-Id: If547ecdc8654e01ea17afea2ff2dd546f7a495d2
Conflicts:
drivers/media/i2c/ov5670.c
drivers/mmc/core/mmc_ops.c
drivers/regulator/core.c
drivers/usb/dwc3/gadget.c
drivers/usb/gadget/function/f_uac1.c
drivers/usb/gadget/function/f_uvc.c
This reverts commit 17823171af.
Relpaced by commit 3092012197 ("ANDROID: GKI: QoS: Prevent usage of dev_pm_qos_request as pm_qos_request").
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iff9c38acdae14cee92c52ac833c7bf062c7fc74c
The vcnt event is similar to vblank event, but
userspace can set the time(which scan line) when
the event occur.
This add a new event type: DRM_EVENT_ROCKCHIP_CRTC_VCNT
userspace create this event by ioctl DRM_IOCTL_ROCKCHIP_GET_VCNT_EVENT
Change-Id: If3da4bb29469ac7dc379e9462994aeda3202d3d2
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
According to the specification, the controller should check the device
status before data transport. Generally, it can get the status of device
via CMD13. It's upset that command communication will produce a little
interrupt inside the controller.
To avoid interrupt storm whilst heavily I/O request, use card_busy
instead of send_status(CMD13).
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I3ba79ba2f563006112b0157b78aab5b31911b61a
RKPM_DBG_FSM_SOUT enables PMU FSM state signal output through
GPIO4_D5/SDMMC_CLK during sleep, mainly for debug PMU FSM flow.
Some one may use this pin as LED light, it's fine to drop it
to avoid influence on LED.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I54705292226d82829bc37db0758aa0d9a9995658
RKPM_DBG_FSM_SOUT enables PMU FSM state signal output through
GPIO4_D5/SDMMC_CLK during sleep, mainly for debug PMU FSM flow.
Some one may use this pin as LED light, it's fine to drop it
to avoid influence on LED.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I82af5fa676d6db8b81e877729c44b976bbfa9ea5
From test, sram_init_done can be used as a indicator to
see if phy power and input clock work find. Let's yell out
error is anything wrong with phy.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I5493e32ec5a9a6a8f6fc45e95618a657d9a21a67
We have some plane not registered to drm core(Such as cluster
plane on some linux system), so they don't have pstate.
And also we don't need to check plane state for oetf for
a inactived plane(has no fb).
Change-Id: I909b665397c3df530ff0f466e0d654dcbb3f1a40
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Clean up the buffer pool if start streaming failed.
BUG=redmine:#301918
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: I4abcf17ef0c66dabcddcfac7395c7efabbfe6e47
keep sdr2hdr result consistent between VOP and GPU
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I3ef6b289978d4b0c083d99e93d97a95b2e7f0b25
reason: In rk356x, due to the hardware, vepu and jpegd should
disable auto freqence.
Change-Id: I2da5b5a7fc3b86180aef28b378a7b651e31a6b7a
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>