From: jesper at schmitz.computer <jesper@schmitz.computer>
To: u-boot@lists.denx.de
Subject: [PATCH 1/1] rk3399: pinebook-pro enable display
Date: Tue, 30 Mar 2021 19:58:26 +0200 [thread overview]
Message-ID: <35efff94f8c206661b463bd6c282c3e6@schmitz.computer> (raw)
In-Reply-To: <3822400a-ec28-571a-3b53-9c98eaad7ef8@rock-chips.com>
Hi
I think my patch is duplicated (but done better) by
https://patchwork.ozlabs.org/project/uboot/list/?series=232334
Thanks
/Jesper
Kever Yang skrev den 2021-03-30 09:24:
> Hi Jesper,
>
> ??? Thanks for your patch.
>
> 1. Please add commit message for the change;
>
> 2. Please split the driver and the dts into different patches.
>
>
> Thanks,
>
> - Kever
>
> On 2021/2/28 ??11:27, Jesper Schmitz Mouridsen wrote:
>> Signed-off-by: Jesper Schmitz Mouridsen <jesper@schmitz.computer>
>> ---
>> arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi | 4 ++++
>> arch/arm/dts/rk3399.dtsi | 4 ++--
>> drivers/video/rockchip/rk_edp.c | 24
>> ++++++++++++++++++--
>> 3 files changed, 28 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi
>> b/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi
>> index 1eafb40ce3..2d87bea933 100644
>> --- a/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi
>> +++ b/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi
>> @@ -16,6 +16,10 @@
>> };
>> };
>> +&edp {
>> + rockchip,panel = <&edp_panel>;
>> +};
>> +
>> &i2c0 {
>> u-boot,dm-pre-reloc;
>> };
>> diff --git a/arch/arm/dts/rk3399.dtsi b/arch/arm/dts/rk3399.dtsi
>> index 74f2c3d490..fad6cea8f9 100644
>> --- a/arch/arm/dts/rk3399.dtsi
>> +++ b/arch/arm/dts/rk3399.dtsi
>> @@ -1606,12 +1606,12 @@
>> vopl_out_mipi: endpoint at 0 {
>> reg = <0>;
>> - remote-endpoint = <&mipi_in_vopl>;
>> + remote-endpoint = <&edp_in_vopl>;
>> };
>> vopl_out_edp: endpoint at 1 {
>> reg = <1>;
>> - remote-endpoint = <&edp_in_vopl>;
>> + remote-endpoint = <&mipi_in_vopl>;
>> };
>> vopl_out_hdmi: endpoint at 2 {
>> diff --git a/drivers/video/rockchip/rk_edp.c
>> b/drivers/video/rockchip/rk_edp.c
>> index 0be60e169e..424093fa01 100644
>> --- a/drivers/video/rockchip/rk_edp.c
>> +++ b/drivers/video/rockchip/rk_edp.c
>> @@ -18,9 +18,15 @@
>> #include <asm/io.h>
>> #include <asm/arch-rockchip/clock.h>
>> #include <asm/arch-rockchip/edp_rk3288.h>
>> +#if defined(CONFIG_ROCKCHIP_RK3288)
>> #include <asm/arch-rockchip/grf_rk3288.h>
>> -#include <asm/arch-rockchip/hardware.h>
>> #include <dt-bindings/clock/rk3288-cru.h>
>> +#endif
>> +#if defined(CONFIG_ROCKCHIP_RK3399)
>> +#include <asm/arch-rockchip/grf_rk3399.h>
>> +#include <dt-bindings/clock/rk3399-cru.h>
>> +#endif
>> +#include <asm/arch-rockchip/hardware.h>
>> #include <linux/delay.h>
>> #define MAX_CR_LOOP 5
>> @@ -39,7 +45,12 @@ static const char * const pre_emph_names[] = {
>> struct rk_edp_priv {
>> struct rk3288_edp *regs;
>> +#if defined(CONFIG_ROCKCHIP_RK3288)
>> struct rk3288_grf *grf;
>> +#endif
>> +#if defined(CONFIG_ROCKCHIP_RK3399)
>> + struct rk3399_grf_regs *grf;
>> +#endif
>> struct udevice *panel;
>> struct link_train link_train;
>> u8 train_set[4];
>> @@ -1043,6 +1054,7 @@ static int rk_edp_probe(struct udevice *dev)
>> int vop_id = uc_plat->source_id;
>> debug("%s, uc_plat=%p, vop_id=%u\n", __func__, uc_plat, vop_id);
>> +#if defined(CONFIG_ROCKCHIP_RK3288)
>> ret = clk_get_by_index(dev, 1, &clk);
>> if (ret >= 0) {
>> ret = clk_set_rate(&clk, 0);
>> @@ -1052,6 +1064,7 @@ static int rk_edp_probe(struct udevice *dev)
>> debug("%s: Failed to set EDP clock: ret=%d\n", __func__, ret);
>> return ret;
>> }
>> +#endif
>> ret = clk_get_by_index(uc_plat->src_dev, 0, &clk);
>> if (ret >= 0) {
>> @@ -1063,14 +1076,20 @@ static int rk_edp_probe(struct udevice *dev)
>> __func__, uc_plat->src_dev->name, ret);
>> return ret;
>> }
>> -
>> +#if defined(CONFIG_ROCKCHIP_RK3288)
>> /* grf_edp_ref_clk_sel: from internal 24MHz or 27MHz clock */
>> rk_setreg(&priv->grf->soc_con12, 1 << 4);
>> /* select epd signal from vop0 or vop1 */
>> rk_clrsetreg(&priv->grf->soc_con6, (1 << 5),
>> (vop_id == 1) ? (1 << 5) : (0 << 5));
>> +#endif
>> +#if defined(CONFIG_ROCKCHIP_RK3399)
>> + /* select epd signal from vop0 or vop1 */
>> + rk_clrsetreg(&priv->grf->soc_con20, (1 << 5),
>> + (vop_id == 1) ? (1 << 5) : (0 << 5));
>> +#endif
>> rockchip_edp_wait_hpd(priv);
>> rk_edp_init_refclk(regs);
>> @@ -1091,6 +1110,7 @@ static const struct dm_display_ops
>> dp_rockchip_ops = {
>> static const struct udevice_id rockchip_dp_ids[] = {
>> { .compatible = "rockchip,rk3288-edp" },
>> + { .compatible = "rockchip,rk3399-edp" },
>> { }
>> };
>>
prev parent reply other threads:[~2021-03-30 17:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-28 15:27 [PATCH 0/1] rk3399 pinebook-pro enable display Jesper Schmitz Mouridsen
2021-02-28 15:27 ` [PATCH 1/1] rk3399: " Jesper Schmitz Mouridsen
2021-03-30 7:24 ` Kever Yang
2021-03-30 17:58 ` jesper at schmitz.computer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=35efff94f8c206661b463bd6c282c3e6@schmitz.computer \
--to=jesper@schmitz.computer \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox