From patchwork Thu Jan 19 18:48:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alibek Omarov X-Patchwork-Id: 13108522 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 32398C004D4 for ; Thu, 19 Jan 2023 18:50:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pJfkghBMkG8bdNb7jCEsQFcntgMgMHdUFA8JeZmPDrs=; b=h4w/qhBin+tbKo qhZ6ExhmoUUbkAJ2TTDlH6gQZRrLuGQbKuCAECGEn+T0JGFHFfpWmTdZ4xOoB8IFslWaUqm44WFvG bxqbTylR01vkisTmMEAfMNbE+YhsZ3EZr/4ZUAlSig12JFbvjnZUfT+RkzryFoUhIcMj5o+fRzVuT X9pCQlFupda8MFZzOLMxPJ6xCb4RJtZQJ1fOSeSAkmI3tE1KHfRBOBfa0Z3/Ld8wy7hqU9Snu85RO OelXS7gzxkcYAme/FrrQuQIDjmr48GxgXX121YkmvQsVDLz0xeBJxmEOEqWDLAVg4uTns3JalGEaI SF3GVI7yKs/RJrJU41Kg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIZzE-006eQu-Ad; Thu, 19 Jan 2023 18:50:08 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIZyX-006e9U-AM; Thu, 19 Jan 2023 18:49:28 +0000 Received: by mail-lf1-x12b.google.com with SMTP id x40so4519919lfu.12; Thu, 19 Jan 2023 10:49:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KjYSoLcwf7EqtitvVcOTllqc2UQ4a0rkK6OglvdaZqI=; b=XakzkJo1d7N4N7DkKi9mHmh1lucNCw3Ur4cZb3/FtRcHSG6kK0fg0VmQOrJjpSHFbv gDAhsVrSB2wFhL/Cj3BWGcCRfK14n75kTvu9o0WuA1p27Oy/w3S6l9tL0T43D7CJhT6i lmclIQ9IsbKkFAN2ITAdZzY0PPUfj2rlMGatAY4F6ZCgiSgnvEuwOUwVcI9zhTp0rJvt QBVqK+Inm1tiZiPBixukk1vATXLjsC+OBU4UHo5XcNQf3OC7VGNkTHAghBYjjIrDWQxx /jGLUhDmQ21wZDDTuA02kDGvpzPBhoSVcttWo9j9OvA+VQ6JAoIn91fADMZTvgJ9c/wd ta+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KjYSoLcwf7EqtitvVcOTllqc2UQ4a0rkK6OglvdaZqI=; b=gvqJNEzIS57+Q3t5zr2v7TRbdbndbStE3G5NKPdLrZv9V4n24AOdyqkcnHd7q809pG ayZ7a8c42B9C6PdMbFkhUWnhICCCG181usYDsstg+olNEgorq7Su82lSmRZyA+rw1dYX DS1SRIv81tC6lWNOan7uJLM/G5xZa14/J22NkcLGMQkTJX1vt1Js6V4VDMdh0TpWkxEe v6coak2d7no1L+zUd5nlRGhmkLsa8AAvAvT7y7yRNLICUYwh1DpL4YO7oUy28yh0+cd8 1Ae9iQ9ceU6AGuCfwziypafSoKbVDo9HkDwlfbBYXI7pIJxi9BDlrkVoWwcwnkHuP7gV zliQ== X-Gm-Message-State: AFqh2kpNHShLgZ25UTDAqL2+RB2DbuuxhelVYm8f1hVXTyJL6b5BxtYv k9S3GnYCL7fpjeQB0MTL3LM= X-Google-Smtp-Source: AMrXdXv1pJP5S8AZ+yVAIwUdPkFLt0kCm3GHTmVeWhx46YujL7HwAwoo4UkMmOKA8DqpaG1bcv0ZzQ== X-Received: by 2002:a05:6512:12d1:b0:4ca:5013:b0e7 with SMTP id p17-20020a05651212d100b004ca5013b0e7mr4114837lfg.59.1674154163242; Thu, 19 Jan 2023 10:49:23 -0800 (PST) Received: from U19.ag.local (static.187.76.181.135.clients.your-server.de. [135.181.76.187]) by smtp.gmail.com with ESMTPSA id b31-20020a0565120b9f00b004d30752a561sm2112737lfv.298.2023.01.19.10.49.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 10:49:22 -0800 (PST) From: Alibek Omarov To: Cc: a1ba.omarov@gmail.com, alexander.sverdlin@siemens.com, macromorgan@hotmail.com, Sandy Huang , =?utf-8?q?Heiko_?= =?utf-8?q?St=C3=BCbner?= , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Michael Riesch , Peter Geis , Sascha Hauer , Frank Wunderlich , Nicolas Frattaroli , Ezequiel Garcia , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] drm/rockchip: lvds: add rk3568 support Date: Thu, 19 Jan 2023 21:48:03 +0300 Message-Id: <20230119184807.171132-2-a1ba.omarov@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230119184807.171132-1-a1ba.omarov@gmail.com> References: <20230119184807.171132-1-a1ba.omarov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230119_104925_403220_CB1311AB X-CRM114-Status: GOOD ( 19.36 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org One of the ports of RK3568 can be configured as LVDS, re-using the DSI DPHY Signed-off-by: Alibek Omarov --- drivers/gpu/drm/rockchip/rockchip_lvds.c | 144 +++++++++++++++++++++-- drivers/gpu/drm/rockchip/rockchip_lvds.h | 10 ++ 2 files changed, 147 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c index 68f6ebb33460..83c60240af85 100644 --- a/drivers/gpu/drm/rockchip/rockchip_lvds.c +++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c @@ -433,6 +433,90 @@ static void px30_lvds_encoder_disable(struct drm_encoder *encoder) drm_panel_unprepare(lvds->panel); } +static int rk3568_lvds_poweron(struct rockchip_lvds *lvds) +{ + int ret; + + ret = clk_enable(lvds->pclk); + if (ret < 0) { + DRM_DEV_ERROR(lvds->dev, "failed to enable lvds pclk %d\n", ret); + return ret; + } + + ret = pm_runtime_get_sync(lvds->dev); + if (ret < 0) { + DRM_DEV_ERROR(lvds->dev, "failed to get pm runtime: %d\n", ret); + clk_disable(lvds->pclk); + return ret; + } + + /* Enable LVDS mode */ + return regmap_update_bits(lvds->grf, RK3568_GRF_VO_CON2, + RK3568_LVDS0_MODE_EN(1), + RK3568_LVDS0_MODE_EN(1)); +} + +static void rk3568_lvds_poweroff(struct rockchip_lvds *lvds) +{ + regmap_update_bits(lvds->grf, RK3568_GRF_VO_CON2, + RK3568_LVDS0_MODE_EN(1) | RK3568_LVDS0_P2S_EN(1), + RK3568_LVDS0_MODE_EN(0) | RK3568_LVDS0_P2S_EN(0)); + + pm_runtime_put(lvds->dev); + clk_disable(lvds->pclk); +} + +static int rk3568_lvds_grf_config(struct drm_encoder *encoder, + struct drm_display_mode *mode) +{ + struct rockchip_lvds *lvds = encoder_to_lvds(encoder); + + if (lvds->output != DISPLAY_OUTPUT_LVDS) { + DRM_DEV_ERROR(lvds->dev, "Unsupported display output %d\n", + lvds->output); + return -EINVAL; + } + + /* Set format */ + return regmap_update_bits(lvds->grf, RK3568_GRF_VO_CON0, + RK3568_LVDS0_SELECT(3), + RK3568_LVDS0_SELECT(lvds->format)); +} + +static void rk3568_lvds_encoder_enable(struct drm_encoder *encoder) +{ + struct rockchip_lvds *lvds = encoder_to_lvds(encoder); + struct drm_display_mode *mode = &encoder->crtc->state->adjusted_mode; + int ret; + + drm_panel_prepare(lvds->panel); + + ret = rk3568_lvds_poweron(lvds); + if (ret) { + DRM_DEV_ERROR(lvds->dev, "failed to power on LVDS: %d\n", ret); + drm_panel_unprepare(lvds->panel); + return; + } + + ret = rk3568_lvds_grf_config(encoder, mode); + if (ret) { + DRM_DEV_ERROR(lvds->dev, "failed to configure LVDS: %d\n", ret); + drm_panel_unprepare(lvds->panel); + return; + } + + drm_panel_enable(lvds->panel); +} + +static void rk3568_lvds_encoder_disable(struct drm_encoder *encoder) +{ + struct rockchip_lvds *lvds = encoder_to_lvds(encoder); + + drm_panel_disable(lvds->panel); + rk3568_lvds_poweroff(lvds); + drm_panel_unprepare(lvds->panel); +} + static const struct drm_encoder_helper_funcs rk3288_lvds_encoder_helper_funcs = { .enable = rk3288_lvds_encoder_enable, @@ -447,6 +531,13 @@ struct drm_encoder_helper_funcs px30_lvds_encoder_helper_funcs = { .atomic_check = rockchip_lvds_encoder_atomic_check, }; +static const +struct drm_encoder_helper_funcs rk3568_lvds_encoder_helper_funcs = { + .enable = rk3568_lvds_encoder_enable, + .disable = rk3568_lvds_encoder_disable, + .atomic_check = rockchip_lvds_encoder_atomic_check, +}; + static int rk3288_lvds_probe(struct platform_device *pdev, struct rockchip_lvds *lvds) { @@ -491,6 +582,26 @@ static int rk3288_lvds_probe(struct platform_device *pdev, return 0; } +static int rockchip_lvds_phy_probe(struct platform_device *pdev, + struct rockchip_lvds *lvds) +{ + int ret; + + lvds->dphy = devm_phy_get(&pdev->dev, "dphy"); + if (IS_ERR(lvds->dphy)) + return PTR_ERR(lvds->dphy); + + ret = phy_init(lvds->dphy); + if (ret) + return ret; + + ret = phy_set_mode(lvds->dphy, PHY_MODE_LVDS); + if (ret) + return ret; + + return phy_power_on(lvds->dphy); +} + static int px30_lvds_probe(struct platform_device *pdev, struct rockchip_lvds *lvds) { @@ -503,20 +614,28 @@ static int px30_lvds_probe(struct platform_device *pdev, if (ret) return ret; - /* PHY */ - lvds->dphy = devm_phy_get(&pdev->dev, "dphy"); - if (IS_ERR(lvds->dphy)) - return PTR_ERR(lvds->dphy); + return rockchip_lvds_phy_probe(pdev, lvds); +} - ret = phy_init(lvds->dphy); +static int rk3568_lvds_probe(struct platform_device *pdev, + struct rockchip_lvds *lvds) +{ + int ret; + + ret = regmap_update_bits(lvds->grf, RK3568_GRF_VO_CON0, + RK3568_LVDS0_MSBSEL(1), + RK3568_LVDS0_MSBSEL(1)); if (ret) return ret; - ret = phy_set_mode(lvds->dphy, PHY_MODE_LVDS); + ret = regmap_update_bits(lvds->grf, RK3568_GRF_VO_CON2, + RK3568_LVDS0_P2S_EN(1), + RK3568_LVDS0_P2S_EN(1)); + if (ret) return ret; - return phy_power_on(lvds->dphy); + return rockchip_lvds_phy_probe(pdev, lvds); } static const struct rockchip_lvds_soc_data rk3288_lvds_data = { @@ -529,6 +648,11 @@ static const struct rockchip_lvds_soc_data px30_lvds_data = { .helper_funcs = &px30_lvds_encoder_helper_funcs, }; +static const struct rockchip_lvds_soc_data rk3568_lvds_data = { + .probe = rk3568_lvds_probe, + .helper_funcs = &rk3568_lvds_encoder_helper_funcs, +}; + static const struct of_device_id rockchip_lvds_dt_ids[] = { { .compatible = "rockchip,rk3288-lvds", @@ -538,6 +662,10 @@ static const struct of_device_id rockchip_lvds_dt_ids[] = { .compatible = "rockchip,px30-lvds", .data = &px30_lvds_data }, + { + .compatible = "rockchip,rk3568-lvds", + .data = &rk3568_lvds_data + }, {} }; MODULE_DEVICE_TABLE(of, rockchip_lvds_dt_ids); @@ -612,6 +740,8 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master, encoder = &lvds->encoder.encoder; encoder->possible_crtcs = drm_of_find_possible_crtcs(drm_dev, dev->of_node); + rockchip_drm_encoder_set_crtc_endpoint_id(&lvds->encoder, + dev->of_node, 0, 0); ret = drm_simple_encoder_init(drm_dev, encoder, DRM_MODE_ENCODER_LVDS); if (ret < 0) { diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.h b/drivers/gpu/drm/rockchip/rockchip_lvds.h index 4ce967d23813..57decb33f779 100644 --- a/drivers/gpu/drm/rockchip/rockchip_lvds.h +++ b/drivers/gpu/drm/rockchip/rockchip_lvds.h @@ -120,4 +120,14 @@ #define PX30_LVDS_P2S_EN(val) HIWORD_UPDATE(val, 6, 6) #define PX30_LVDS_VOP_SEL(val) HIWORD_UPDATE(val, 1, 1) +#define RK3568_GRF_VO_CON0 0x0360 +#define RK3568_LVDS0_SELECT(val) HIWORD_UPDATE(val, 5, 4) +#define RK3568_LVDS0_MSBSEL(val) HIWORD_UPDATE(val, 3, 3) + +#define RK3568_GRF_VO_CON2 0x0368 +#define RK3568_LVDS0_DCLK_INV_SEL(val) HIWORD_UPDATE(val, 9, 9) +#define RK3568_LVDS0_DCLK_DIV2_SEL(val) HIWORD_UPDATE(val, 8, 8) +#define RK3568_LVDS0_MODE_EN(val) HIWORD_UPDATE(val, 1, 1) +#define RK3568_LVDS0_P2S_EN(val) HIWORD_UPDATE(val, 0, 0) + #endif /* _ROCKCHIP_LVDS_ */ From patchwork Thu Jan 19 18:48:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alibek Omarov X-Patchwork-Id: 13108523 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 84682C004D4 for ; Thu, 19 Jan 2023 18:50:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=amTI9N0AIEpX9bAkbD99Cls3t3x36HkL4lZ6tPFPu9g=; b=PVqLmu84YhXp5A 0GPx+YCTYghOZ63t/S5AtzG4QBcA2sNmw/00Hd/Y4hx1zcU5BeAvVVbgeMnZNHobZ4iMHVcxMKjtH gg24KIDBerdjqv2z462ZxIGXfas+0RQKaBLU/LOLSkcyO+sdPd0bRxrXo0lEZxfppxISJiN7ff8hg xvfMF6z9uhL3oT+3HIHud3SCvvQjX9/5iVkRqKd9OSlVeJ6VcD3WVbbKlNt0uDDczvSOs83Y9qpyH 9ARnZcljNpEEtFt6wzmaI7/WR/6JRplqnuy4m6XN8e0iPo4nC1AR8NqHpNMdKzOs8NZHI7OgBLHQ4 hmWOGThDGQ/xteDocvcA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIZzY-006ed3-Lt; Thu, 19 Jan 2023 18:50:28 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIZyc-006eBq-3J; Thu, 19 Jan 2023 18:49:31 +0000 Received: by mail-lf1-x130.google.com with SMTP id a11so4656092lfg.0; Thu, 19 Jan 2023 10:49:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=whMWYQfGzaJPnTeJPhhjcLAVFGOi1DqjOoYU7lBrbEw=; b=E2T2D6DACq3966VESzWpx8PhFIHol1jPrku6s4cUp6lTE2hNExogTwiraPMFBdYmi4 eeOuM2hw4Hwl53fTpWWHq4LhCyIuMjqYZe1uRMC45MXLZo40vX/jpMtqv7wN9fAG73FW uDsMQaX+Fq56W6q5iVMdfdu1N1VTkWQKREEbwkpIKm67BXjEzS8DqaiQdszp95LwCk4E aNbMAU6njxaomNOH7Ma0UZFq20W1ApDJs+VsbQtXvUeVps6RrzrpGT245Oo3EOng4kAZ SQCvPUSQiUYcHxllnIcUe3EDHtMoPxVXjWBT/ASG8cQ7QuDjHNV4hUq8S0oXL/vf6ucw FxVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=whMWYQfGzaJPnTeJPhhjcLAVFGOi1DqjOoYU7lBrbEw=; b=RAK0GceQeay9vrsVI0PUhsFp5NPVlJfe/ZDxTr5sf6GydI1vrgPt+OrtteztSAwzda j3tz1AzLPLdVlAKK4JlAPpDYw58GeIbA5egpndz89wrUpJ0ukkL0Gzm9PvDPW2J5m02J D12zp8JS3yspHN/+jyrSQoWE7j56kCFG8ZelEUVNxRyeXBALbDht2tqxbBX/p5MPhhfQ QRo3/LzSrDojbmjY+w0tZ0Sb73V/uOyPJbg68DR8bQCmLw3h/+wpk3ZpoUq4+QU9g5Aj DDg5Im5cZa0l54EuPSYxBzoNCnwQ3MWEFP+IT5dkJuiGHCsuJROOvxpIQMauz0CcNjFF b/Zw== X-Gm-Message-State: AFqh2krOzaeRdXn0XznPyZ+pOQAm4URHEwBdy3NAxRN4XXjQA4p1S17a phMj4KFSu1AnZp6XDGnwFV8= X-Google-Smtp-Source: AMrXdXudzU4h7M6LO0PZkeIfHC/mW9RojDp0JElKBbO6CrK/AO11pQaR5TWVFRGk5TwTG4YmA8FvxA== X-Received: by 2002:ac2:4c97:0:b0:4b6:fdc3:a668 with SMTP id d23-20020ac24c97000000b004b6fdc3a668mr2754311lfl.31.1674154168187; Thu, 19 Jan 2023 10:49:28 -0800 (PST) Received: from U19.ag.local (static.187.76.181.135.clients.your-server.de. [135.181.76.187]) by smtp.gmail.com with ESMTPSA id b31-20020a0565120b9f00b004d30752a561sm2112737lfv.298.2023.01.19.10.49.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 10:49:27 -0800 (PST) From: Alibek Omarov To: Cc: a1ba.omarov@gmail.com, alexander.sverdlin@siemens.com, macromorgan@hotmail.com, Sandy Huang , =?utf-8?q?Heiko_?= =?utf-8?q?St=C3=BCbner?= , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Michael Riesch , Peter Geis , Sascha Hauer , Ezequiel Garcia , Frank Wunderlich , Nicolas Frattaroli , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] arm64: dts: rockchip: rk356x: add LVDS bindings Date: Thu, 19 Jan 2023 21:48:04 +0300 Message-Id: <20230119184807.171132-3-a1ba.omarov@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230119184807.171132-1-a1ba.omarov@gmail.com> References: <20230119184807.171132-1-a1ba.omarov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230119_104930_253538_A1E427D6 X-CRM114-Status: UNSURE ( 9.78 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Exposes ports for VOP2 and for panel Tested-by: Alexander Sverdlin Link: https://patchwork.kernel.org/project/linux-rockchip/patch/20220923160115.2946615-3-a1ba.omarov@gmail.com/#25097661 Signed-off-by: Alibek Omarov --- arch/arm64/boot/dts/rockchip/rk356x.dtsi | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi index 5706c3e24f0a..34d1b943f312 100644 --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi @@ -827,6 +827,31 @@ hdmi_out: port@1 { }; }; + lvds: lvds { + compatible = "rockchip,rk3568-lvds"; + clocks = <&cru PCLK_DSITX_0>; + clock-names = "pclk_lvds"; + phys = <&dsi_dphy0>; + phy-names = "dphy"; + power-domains = <&power RK3568_PD_VO>; + rockchip,grf = <&grf>; + rockchip,output = "lvds"; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + lvds_in: port@0 { + reg = <0>; + }; + + lvds_out: port@1 { + reg = <1>; + }; + }; + }; + qos_gpu: qos@fe128000 { compatible = "rockchip,rk3568-qos", "syscon"; reg = <0x0 0xfe128000 0x0 0x20>; From patchwork Thu Jan 19 18:48:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alibek Omarov X-Patchwork-Id: 13108524 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9EFCAC46467 for ; Thu, 19 Jan 2023 18:51:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1cRiu0pXSg2SRgHeNeSUCFfkqOnZlQUvYXtKvI+h43Y=; b=TDUlIqM1pnfZjJ sB8cXJescngymBO5MNT2hyKv/03Zin6uwfrnjRrWZPsQa4pu2ci6Yl1CGSgsfvQSSXtNRwLe3l3U6 p5iUgYxvlkIIbOdFNYexOmdbUvwWq6qa9Db3Td5msBD0Mx6+dI/4CYpAod9xEokJBJ8ii4TSuSGjT oGDNwCngCNt/My/cpGPXNzoqov9v2LJqFN1d/xg1SCca0YIIRCKrHQ/AjLPzZ7dekr3bUqecFU95u lBMar1cC4gmNC/H60UvLEwAXgCKqA6ye7XvbzefDs3bu5Xd2eliyKkA0B7quCkYdutWNNQ4CR97UE n4Bo8J8xjmD8ibo6N8vg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIZzz-006erF-Cb; Thu, 19 Jan 2023 18:50:55 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIZyf-006e9U-9m; Thu, 19 Jan 2023 18:49:34 +0000 Received: by mail-lf1-x12b.google.com with SMTP id x40so4520488lfu.12; Thu, 19 Jan 2023 10:49:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OFat64LMoXDYuRBJ5PYrBQ4w2KeQw9mnd+EpUQW2z98=; b=Smx7EiRZr0YFLFdiLbw9CGyQYH5KkwXlCnXcJXZVaw24v8CD2LwOklq3XKkYwQAf9L 4eceQvdoqisR5BsqY9Ne3XFyEVzhktoK4W/68XSZYFHdGLZlAuP2Yb1ICYtV7eJK7Adz zxbeQvDMm29TiPJ7ZMbEkCf1RcLeoAs9R0kW14sbx/5rjqSlbR9zaCirDouEDdg2GW6L IOXdzIfg7p33PhAn9eJ9Ng3jwa/UjdU7ZKKQMMAbBJ7dkWKPIU+4tC48u1SY81+chX2P rICN1Q5mgGAe8s9KP/ZO1ptMg8lGTGO3bdeqMenCmrgnlP/OjSkN/XVw1JqCouw7Kshw QV7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OFat64LMoXDYuRBJ5PYrBQ4w2KeQw9mnd+EpUQW2z98=; b=s/AnSMADp4tWYK7soc6Gbh5YMqmwllikykThX4zOsFeKiokGYl7mPUrWd+ppn8TB4Q lnP451LfLTycM5PkN/UBpsZ8lWt9qsN8Jcmyz5IJIj6fuwAUqhjcRvHvxdehwCZhdCCg YsD/7D9ETD3TZrdqwj0sJiRymT7kYehaZKeJ1uAfcv0gy67iWrb+pXXQ4inOiyVe7WTo nKCwaR1tp9bY0rmCT5Abp2SthAIJZiyQhJCLJjRsB/mnrxAVNP7xKLxVgxifs1OwxrJT sS9FCGc2ZGy+axBrR/Z9H71dCFmobq3eOd0Gm7v/2woUzp7YNkhME4ftxYWPXlpOdf56 hoMA== X-Gm-Message-State: AFqh2kpYcFSfuzDiZA7Ym40hI99uNzGVG9iIt2D6SK0AN2X9CLOkvw7w V3YEbwVnfDM1yYUdv75tOz0= X-Google-Smtp-Source: AMrXdXsS73pkCKlic27wdJ6t/u2GF8WN5cOENCK0syWt1LSQd2eWuZ+/51FXuUHtnDJ3XgjSGs8C2Q== X-Received: by 2002:a05:6512:2529:b0:4d2:9f92:a145 with SMTP id be41-20020a056512252900b004d29f92a145mr7462574lfb.50.1674154172862; Thu, 19 Jan 2023 10:49:32 -0800 (PST) Received: from U19.ag.local (static.187.76.181.135.clients.your-server.de. [135.181.76.187]) by smtp.gmail.com with ESMTPSA id b31-20020a0565120b9f00b004d30752a561sm2112737lfv.298.2023.01.19.10.49.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 10:49:32 -0800 (PST) From: Alibek Omarov To: Cc: a1ba.omarov@gmail.com, alexander.sverdlin@siemens.com, macromorgan@hotmail.com, Sandy Huang , =?utf-8?q?Heiko_?= =?utf-8?q?St=C3=BCbner?= , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Michael Riesch , Peter Geis , Sascha Hauer , Alex Bee , Nicolas Frattaroli , Frank Wunderlich , Ezequiel Garcia , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] dt-bindings: display: rockchip-lvds: add compatible string for RK3568 Date: Thu, 19 Jan 2023 21:48:05 +0300 Message-Id: <20230119184807.171132-4-a1ba.omarov@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230119184807.171132-1-a1ba.omarov@gmail.com> References: <20230119184807.171132-1-a1ba.omarov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230119_104933_403591_66EA4848 X-CRM114-Status: UNSURE ( 9.82 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org RK3568 SoCs have a single LVDS output, that use PHY shared by two display pipelines: LVDS and MIPI DSI. Signed-off-by: Alibek Omarov Acked-by: Krzysztof Kozlowski --- .../devicetree/bindings/display/rockchip/rockchip-lvds.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip-lvds.txt b/Documentation/devicetree/bindings/display/rockchip/rockchip-lvds.txt index aaf8c44cf90f..ec8a8d05368a 100644 --- a/Documentation/devicetree/bindings/display/rockchip/rockchip-lvds.txt +++ b/Documentation/devicetree/bindings/display/rockchip/rockchip-lvds.txt @@ -5,6 +5,7 @@ Required properties: - compatible: matching the soc type, one of - "rockchip,rk3288-lvds"; - "rockchip,px30-lvds"; + - "rockchip,rk3568-lvds"; - reg: physical base address of the controller and length of memory mapped region.