From patchwork Tue Jan 24 05:47:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Riesch X-Patchwork-Id: 646203 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A395C54EED for ; Tue, 24 Jan 2023 05:50:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233050AbjAXFt6 (ORCPT ); Tue, 24 Jan 2023 00:49:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233053AbjAXFtg (ORCPT ); Tue, 24 Jan 2023 00:49:36 -0500 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on20606.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe16::606]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 542C93BDBD; Mon, 23 Jan 2023 21:49:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Oj9R+/IMgFsQkMokuOT5VWFxM2HmGiXDZP/hRb4AjEUzBh2nIMzj35szg7aYI3z1HsWrsTHjJCfbeuvktf7H/sH8UZvnWSCwTCpJ9/pxVyjzjrbMkKYijd3BFfuftOj81r2dIfKgq5yboN7Z0TZ0QWzOhhfy8w7JVzDAqtC8K1Wr+R6JjzNphDGQ2rJgUcpYagQNlXsiMAsz5TZeDTe5ugSLmuZRXsO/d64J+sG5Hi6RGRKzjSVNFU8TYw3emGotZBJZVhAxY+R78J8HdVQhqGNPsKBAHVEHdDT0ZsQ2HwY/aZct/FBbHYGuZ8aTpmJXwpEUHznS+VdbfOKta61pyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=g4qMVJMpLkSgyH995ws7aK1P48Io+P7fDQjJHTGRi6Q=; b=CDdywWMr+3adI3RsbO4w64RwF/fa9FHs2I1ObGgYcvT67cLGiKmFq2XcRafTFMGgI9zgbY1x8FW+Ru/J+Q/38bCyYUTZmyFUaASzYn/UAIC2EJZd3m6FyHzqCn8wLUAw3Y6DEW3t7Qvcn337yn0t/AlCayeE8iiVBA7gMQkcPihCFA2qZPGKKOHMgFYteeg06RzeM1DJTi8TowCUVJF7IQ3U8ku0ew4OQ0iGJj+Q5nI2/Z8nA9jGTZMGYC3Skm8pkb7UTq5DArYtyEFCXYeH+ApNw1EKM8kstidoCWGzCncBLKIhw4PmEAbNo7bLsAwZPfaHYR1fWSXewFgSECQDfA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g4qMVJMpLkSgyH995ws7aK1P48Io+P7fDQjJHTGRi6Q=; b=m7TrbJ/WEfPajxPzISYIGUv8gq2d8ZPewhMnanCDTFIKnYgLqCRj50lcS5Z+b76wIOIhXzQIDOCc1CpdOJ0XjXL9Ctt/+KSKMCv+76jmkPlxnFByD4sBD+W1zNwcGZVRubM4zKdftdf816MK6YxeVnNxMWXh83b3XkNb9zffNPc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) by VE1PR08MB5678.eurprd08.prod.outlook.com (2603:10a6:800:1a0::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Tue, 24 Jan 2023 05:47:19 +0000 Received: from DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::4718:6092:e763:4219]) by DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::4718:6092:e763:4219%2]) with mapi id 15.20.6002.033; Tue, 24 Jan 2023 05:47:19 +0000 From: Michael Riesch To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Sandy Huang , David Airlie , Daniel Vetter , Sascha Hauer , Michael Riesch Subject: [PATCH v3 2/6] drm/rockchip: rgb: embed drm_encoder into rockchip_encoder Date: Tue, 24 Jan 2023 06:47:02 +0100 Message-Id: <20230124054706.3921383-3-michael.riesch@wolfvision.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230124054706.3921383-1-michael.riesch@wolfvision.net> References: <20230124054706.3921383-1-michael.riesch@wolfvision.net> X-ClientProxiedBy: ZR0P278CA0189.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::6) To DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR08MB9155:EE_|VE1PR08MB5678:EE_ X-MS-Office365-Filtering-Correlation-Id: 249d5dcc-f139-4d4e-9e49-08dafdce751b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o5DGNMhGTMxoKtDV9IaqJv+MXGbosHjP8VMEZqkCb1UG2APAYwCWauKwQtsd/8izKnQTdOYfI35dgjw0R1/uYCAKbalXM5nqB1ZfKQinBpovGu+5NBiezhtaMVf4KhyqpD72mI2WncKF2FfX2iwBZk0OSKMyM0RSQZh4/kNjYL/BxxfTX8GjI3cfBUPCuGPBU1bEIUoGrT6zffgUWwCuFS1UjvD312lqn1FMox/r2eA0ReqPP4L6ITm682FzB6AVpJZFm6E1i9+fcYxhLRGy9SC8OlE4LiHYLbdu35HOJRlCMW7ezeUpZ/TQWhrz4K6vXbFqk4P6+9S4x8IVIIQdP58SPAjWnBgOAWs/YQxDsiwcs0BD+yaAolvpSf6kaXGsByiKUh0mws19JTNapJ9m/XxRvM4UHXB4rfVAiu5wBKdUQuvKo4T9z4akYriZjFwNVOf+X1zvLcYK65dH3zso3gl6YgL3sQrAhrM0oyye2H5HvSfgXMX+btclUtM4gT1+QYfgdE3c/uDbwWcDOHo2FTvnYYcmA87fQ8OUmekAnGbwwuvww+rqxv/tJXrHFdgXDWHBSe+6iezJdLqiwx2B8MivtMRps6xiACeheBhTMENsnCWcJMnspVb5jGSUE11uG48S+mo5BqbBrB8dZo69wA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR08MB9155.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(366004)(39840400004)(396003)(376002)(136003)(346002)(451199015)(1076003)(66946007)(4326008)(8676002)(66476007)(6486002)(66556008)(52116002)(2616005)(6512007)(107886003)(6666004)(44832011)(186003)(5660300002)(8936002)(7416002)(41300700001)(83380400001)(2906002)(6506007)(38100700002)(54906003)(316002)(86362001)(478600001)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RUACdaCjjtIgFtCuZi2LYLtWHSEiCMRH0DLytJA/AudecYtw3guGIzWiDnTybMJ0pSSJOWv1g4Wwd7keoYeVYRvYbgW/kJA1VnfddN3dCxY9uObtWcOe1YHatr8iiGBAf8Cx7WcWX58Hl5iTA8LekxZxC+RbtCnT4P5oO8GWI/5OsqaVf7E690ZA4Xb5duYFLPSDlkvh+X1WIP55CCcc9Ib0N0WKyaIEmhEt+/Fr96ecA3F6+BGV6DNy6QBzipAej77L1BgdPgrLBx8RYD8TpJp3K8IW9BU2baEwzX3G3izjUvxWziVmZ163Z3oh/ktq4Omt6TYsjwt+EG8Qby4VEbKjIMBKhdrENGSZ/N8DPr57jejPeEBO/P1ppPnGo6bYBWFYvfyd3vBkLNwA9ddS30qCAOqR3fryPLw85AoYm09Ny8J+ZUE/fza+T9qcAaUs3V+lJgnmAo2O5iVlWcP5Df978s7SExbZY4kp8JLsv7t16VQRpJaCQ0MGlB1AMbA950u18cfZLXpoWVnBd29O3aCDpXi03pNZVQFhByUwUpIWiMgw/nZ0X9J+GL80Yqi8CHyRbRwk8zkrSLGk76gzVJQAG4OjUURKj6M0hsSc2Adem2H9T2LhKnGlzanHjy7TbQGDLaNI8p3HBzpwx7bKJdfEPnEVRD8Xlot1T5WuAvmWWcaZHo27QmPuq0DsAQNm9efvsu3U963D1jlJKwC7yb4Xtpl0PkpIQDjDaaB26BD5KwyOSRQfWF7Wm4234bpHnWjJANEv2I0rackp/mGwMVYZ39kmagJrwmPPoNk/DY4fttDwbgw9aXcfdys5LECN7Hl7QiowiZht2WM65zPXz2tuxN8mOyxY/Dqu72DZRCno9epasYRHhOmkDD1XSHa2NXNSeCpHu+wzj570YBQU5kluUVmkg4AOnZIumYDwps72AS4fNqfE9r0JObekiVA4FflgPwdpcXibOP3vIHkOLH2j94kA0piC38x3Q2g2dOoZdl8kyWma5ta/M9KDcjJOcyR/a9tEl/m7Ih3B7gH32o4Bj8rOlq9nFZ1JBU8QVv2lhGLU7mW1QSZSKuoWH42alcRBBsm3bw8tz1wAiyyWmTreaVeRTaMRCP6vlW4faBt6rEavN/bbQp2v+L4xiRoc3/qTfyhIq+M+TeBrpIWT/nBOgo7dCmqsLB6PjxYwoiZg3K/2NN7BYhYppsaW/CrCxk40fhGfP40EGVydSA5ujeBUa8X5wtQCj8b7CiPj9ohe+CciGq5TN70pcOpufC1LuqHSyGUxWlRayNZCmuJTTZYGumyls1YNEfVF17H7YuPMxnnzLAfIc5+CIlXof/qtB5Evhuql9O7xWY5fzk5ct1tYvHX8xgmZpvciodk7HeZnCZYAjqo70G0mm+M0hn1r5l3imqqPpEF+6U1g/KRAb6Z4OzQtWatUfJSqEC64AGs64EM5/7wVtO+i2wZw2uzmJO7NlW4hB+5JgLJZkNy+KzjGaPkanrEwWLK6RGISLAWkfWCpzYnM1dEFSe9RP9i0xOysk5ES87aVPJQoHdqI+8dOyLAm69KSgDk+Kdxx+XYirYuWhDIIWm/ecYc/WSUn6DlggUz6u334vKe3H6UM4kopUXoMObQ58QxosULU6rLge7p/uHndq5X00xCWqEUMFrbl46UMplXKNEBi0+pELvSA3dwnBtBpeaq98CPiiZI= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 249d5dcc-f139-4d4e-9e49-08dafdce751b X-MS-Exchange-CrossTenant-AuthSource: DU0PR08MB9155.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2023 05:47:19.7118 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0BNdxMBa44CZ/QBLpgEcb/Ll5GDy4ObLg36pvsPnJa2wNsuIeic0bYMHrreSRjcaLn12hznx/StH62S25OB8nsB7rDLPdftj/Mo6rQinuX4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5678 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Commit 540b8f271e53 ("drm/rockchip: Embed drm_encoder into rockchip_decoder") provides the means to pass the endpoint ID to the VOP2 driver, which sets the interface MUX accordingly. However, this step has not yet been carried out for the RGB output block. Embed the drm_encoder structure into the rockchip_encoder structure and set the endpoint ID correctly. Signed-off-by: Michael Riesch --- v3: - no changes v2: - use endpoint id from device tree instead of hardcoded value drivers/gpu/drm/rockchip/rockchip_rgb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_rgb.c b/drivers/gpu/drm/rockchip/rockchip_rgb.c index 75eb7cca3d82..5971df4302f2 100644 --- a/drivers/gpu/drm/rockchip/rockchip_rgb.c +++ b/drivers/gpu/drm/rockchip/rockchip_rgb.c @@ -22,13 +22,11 @@ #include "rockchip_drm_vop.h" #include "rockchip_rgb.h" -#define encoder_to_rgb(c) container_of(c, struct rockchip_rgb, encoder) - struct rockchip_rgb { struct device *dev; struct drm_device *drm_dev; struct drm_bridge *bridge; - struct drm_encoder encoder; + struct rockchip_encoder encoder; struct drm_connector connector; int output_mode; }; @@ -125,7 +123,7 @@ struct rockchip_rgb *rockchip_rgb_init(struct device *dev, return ERR_PTR(ret); } - encoder = &rgb->encoder; + encoder = &rgb->encoder.encoder; encoder->possible_crtcs = drm_crtc_mask(crtc); ret = drm_simple_encoder_init(drm_dev, encoder, DRM_MODE_ENCODER_NONE); @@ -161,6 +159,8 @@ struct rockchip_rgb *rockchip_rgb_init(struct device *dev, goto err_free_encoder; } + rgb->encoder.crtc_endpoint_id = endpoint_id; + ret = drm_connector_attach_encoder(connector, encoder); if (ret < 0) { DRM_DEV_ERROR(drm_dev->dev, @@ -182,6 +182,6 @@ void rockchip_rgb_fini(struct rockchip_rgb *rgb) { drm_panel_bridge_remove(rgb->bridge); drm_connector_cleanup(&rgb->connector); - drm_encoder_cleanup(&rgb->encoder); + drm_encoder_cleanup(&rgb->encoder.encoder); } EXPORT_SYMBOL_GPL(rockchip_rgb_fini); From patchwork Tue Jan 24 05:47:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Riesch X-Patchwork-Id: 646205 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4BE6C38142 for ; Tue, 24 Jan 2023 05:49:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232887AbjAXFtT (ORCPT ); Tue, 24 Jan 2023 00:49:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233000AbjAXFtR (ORCPT ); Tue, 24 Jan 2023 00:49:17 -0500 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2060c.outbound.protection.outlook.com [IPv6:2a01:111:f400:7d00::60c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 353DF3BDA8; Mon, 23 Jan 2023 21:48:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MF5A2FxbgO9cnr0aWgDoCGuTHxtsfsvqygr8l5h3G7gpov1Rah4YN3hioOJFqJTh4KWLIiaG5AhNDMd8TCFGTSGAOoRc8ZGzfcuXkJYHm3Jt/06ySdq0wbJ7RABJaNa7UZxBzGvcAAT0Rda2JLyd51upawam39Fgvj2QVSTDY1/nWIv9D/V67qT+KJIDZ6xT0LZMGkTMgwXGZ2vE44QoSgSoI3pm7NgCIqLwelahhbt7OGS82NDKO/RRozSmuAKJ1cFi+lrMrhsi5ItBDt6wSLr+KkqSuiD2eraJBvQ9bcBX/M6+vvMJI8CuMICXZZxzdkibHKX44a75n6q07VcgKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jmMn2MrzNdLf4gxHZQEmHIe0WNK9Hf6gYQ+Ss8LUPbc=; b=cZ1eWNdlqH4BGtSJJw9OjL1rrvIxqefUxSEJVUbdWdgSuEuitvO2YidYYzHY2DwPqWv/7oEnUKA+SHI6kkg6g1skRuDD4YGFE9K9gLVK54bh6LNGcwcX+KrRBWhWnKrOO812/GR1bF01GEgq0XDfh3cDTFYGxLH48YSnJOvMzbNHy6jH7tOkAA3vzAg7E8AJZ/R8UcueD59IAazINO6fS7/oJimM72yOXdLfcKO6VD91Qv1C+Gj6ypFGfM0BuN0e/tR1kRaSkmDMi5bxK1z9RVk4vGqAsqFr6ZL91+EpqRmsQ07B3TgIvorFNHW65H2l56JmnEtg7P0xg9zdhYwYYA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jmMn2MrzNdLf4gxHZQEmHIe0WNK9Hf6gYQ+Ss8LUPbc=; b=jAHsna9XPaUUn0HYkZv/srifYofBnYc1AIt0Rq7ULM2dDXQTiuilHOx9Jdf9r9yqCtQVshNiwgfLykFVOYq9HXNrg1UzBXjfeSBReime+M00pm0ply/h+ZxKlxEzmIq8Gbon2AxW5eaIBOQVk4AB75fpu+xnvabrpya65gxTzTk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) by VI1PR08MB10032.eurprd08.prod.outlook.com (2603:10a6:800:1cc::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.28; Tue, 24 Jan 2023 05:47:23 +0000 Received: from DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::4718:6092:e763:4219]) by DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::4718:6092:e763:4219%2]) with mapi id 15.20.6002.033; Tue, 24 Jan 2023 05:47:23 +0000 From: Michael Riesch To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Sandy Huang , David Airlie , Daniel Vetter , Sascha Hauer , Michael Riesch Subject: [PATCH v3 5/6] drm/rockchip: vop2: add support for the rgb output block Date: Tue, 24 Jan 2023 06:47:05 +0100 Message-Id: <20230124054706.3921383-6-michael.riesch@wolfvision.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230124054706.3921383-1-michael.riesch@wolfvision.net> References: <20230124054706.3921383-1-michael.riesch@wolfvision.net> X-ClientProxiedBy: ZR0P278CA0189.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::6) To DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR08MB9155:EE_|VI1PR08MB10032:EE_ X-MS-Office365-Filtering-Correlation-Id: 0a016dd7-b29f-4535-b0c3-08dafdce7771 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uaSKcXXHhv6Ui+QwCAZHb3ye3KgB+ZU1fFtwCJe8EmTCi4sxIB3rJMpibQDYt1UBrqE/43JECAztV8ruCwO4fFaUKMcUi3SQNDGodUr6tveBzBYIhZ+En+cuyMg4BY2WDxeiKHezAp5OoRNjbHDhstrFOS1SdORv1m9BFs8O9isKfG2XIgnXBzDc7Pmjus0PuXidr7rbVsNcdwFwUHhUWq7Om4GN97DYituywN0N7YoUlpgOXrkn4nHsziBsaM0DpaOiIk0WS2uPqvT8IKIOpnUWe+5u2I2T4sdxzYuJpMMj06h2a4P6y3tKMbpwgN6Q4GMH7Nk2nE6lIJjIPsvnV97rqJfW+6Xu8nolhAiT2sNLW+buL/GNvY/+Pa/rpaYp/CBU39trXHA3x8uvuetYHPiN/Lq0BF/QQo+JomXFWQ+HZxvaKdKZ9ekYbdsbe9kg+B1ii3LF81QDKZ4ys6atYqt6ppVuKIfUReUCLUCQ/1NoeE8BMgPyM8Dy5pWEgSkXduVAZPSwyo68XbU92SxEyp4QPl6frKd33PycgGHLzyLSikGMM7Lp4MOp3IZyLhS96GUyG57DNPKsaWV8yp/GwCVL9QRIN02fg476z0ifaa4juVwVWcbA+1wwmfJC1mmKGJEtKn4JvEAkKYolhELLvw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR08MB9155.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(39840400004)(396003)(346002)(366004)(136003)(376002)(451199015)(36756003)(66946007)(2616005)(66476007)(66556008)(316002)(54906003)(8676002)(4326008)(6666004)(5660300002)(7416002)(2906002)(44832011)(83380400001)(107886003)(52116002)(6486002)(186003)(1076003)(478600001)(41300700001)(6506007)(86362001)(38100700002)(6512007)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: puEmXFztMRFYwmJlRzumJzg5aq6HRDzELbT9goxm3J0EURxKjtyWn2rqv3Z/yuwqgdiO2Hp+QwMPMbj730IhHALAI1V21FQFH31Jd+g1ssR5l3aliORgkFLuOkt3oG9MCs/mjhEEASKBAGG8N8flJbx+XWV2MgmBJzv4a8TvWYt/CwnveLyC+3MRqVhd/IdWnk64Dqcmf7DWarjztVMEHYJi/tGzUL0IFypobR3+Fo2ryqsBcdAs2PcEYImd6p06ZMBiCakK7Cxi3abGHlpMbWhuzcWI+MJ3GZkSroqES9OCJYbfFBsQGXT1guaoqiIXwoQylU+6vfZIWkJQ5KF5ApNxodLcIwzQCX8m1+IOYsJ7UzyTB7wpLDwMJ7UjGAK/bUTPEg/eQJYg07gukoSkEb9Kikz+oozX66jx/fJVBbXvw4SE71FFYW2kZgQZAt5KjrN0fHInGJ3LBVwwznv2KcHpANK7B6swxFvRff1LCwSCMnddW5l/VPHfBGmiciWjQCWEnfL+L7VjrxRpy++3noKhOCquuOwPRjCN9LsbBLBCdK3LlnVyEBjhfaXq24sP3TsOCL0LkedOFNT26QOD9+5B020B7MwdYIm2OQYq4LxNWKqlrXQ2vhk/oYW/pXZY20DxGrY0P4MPCgJbcgBoc2YEfFGYWTDaJrsFckxVmuS1FvYjN9JVhR6hFQTY4DuBJ+m0Jt8+9OCCIyr5WjjP2zcAwM3uIYlZL66Y8JozzBYbwWNqkMlyr93BArWuRb18P9EoVa8joXw9iIu6427X5mIDb2Tud5IsMyQsDa4PZuM77AiMwg/pEnAGKHUIOMMRv3sH/BaRzQvsrdkrhZW7vDQ045cKOzqc7m8ze/pZUYVa+EC28Xi/SX52VvycMvE8t+6jTxKIPoaxghLsILxvb7J1fm7ESNsmwdncO94Xo+yXsGcTurt0hnhhBx0V97akQNeEnevOWwGH/jcHADrwm/tRMJ8MX4T49rUPHIFFQhsL902lkf3jCFoxZgqi9+2rJzFlYLN1voD6DVTOxheCGim4Bi3TzD/HEKATk63ZaEG/asl4jX20pNdtpS7bQLVu1mTBmj3vtHV3nAqv/Ue8/fGmOE51RFxD1D/VbYwo+SYws9C1soCsZ3L59uSpNYzJvEdp6b9NDBV3Y3IANC8TCXfHiPMIgP9CCBc+xQ8M/o+XpIhg7SBwm5zwcXsupuLGWUiT3cx1WInvuUbIOVqinF8lDmG4NUvUqweK7Tdzzp6TdCrYfZwl1V6CpUTVhaNdML3WKytllF+HpD2Z7tmW0gFS3sjWgxXRS/fHVfu1H19U1VfCU6sEF0wMbsgmW2ipoRZcypbF9kz/fScwocQ5TTq/Jn0lPEYQA8FbhqufJkll07Z+bY2UywdIQpg4KWkYBEDjCNo/JFnHqvTrl3bp2/GDmyla14E+IyOxFuZ7AwXfTZ3/2Fznt028i8HT2eeAaH/KVrbcVEybna7VPMcZsYnUy+s3wqZJfSqsJdQ7LKVNoisP4v+Z5hbgTm96twEl0RAvK5s+ea6C8bObPzw0ch5MTmjpdlsdwhqLKNsK3QrNzzgEz6mwSh0X3GBepxm0EX10aV/M/5vCSjxbhu3xeHahdurAqV2g6C3QXfOxgHUmUTWYxi4WWY9jdedv6UdTAKYzRsg0Wurnq/TAfSX+2e1/1Z3GYw/IB1QXr/SAmAI= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 0a016dd7-b29f-4535-b0c3-08dafdce7771 X-MS-Exchange-CrossTenant-AuthSource: DU0PR08MB9155.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2023 05:47:23.6157 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2rtwT7sze6TRGqBFKYjVzQMCjrodU3HpZBY3XZwfaq0Cw57U5S9uccmB1sAsti89TuUGSkrNc6B/MvNSq7QNc/c0XbGD0bpdjEVPypKAgNA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB10032 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The Rockchip VOP2 features an internal RGB output block, which can be attached any video port of the VOP2. Add support for this output block. Signed-off-by: Michael Riesch --- v3: - fix commit messages (still assumed video port 2) - fix condition to make 0 a valid video port v2: - move away from wrong assumption that the RGB block is always connected to video port 2 -> check devicetree to find RGB block drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 44 ++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index 06fcdfa7b885..f38ffd0ccd9f 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -39,6 +39,7 @@ #include "rockchip_drm_gem.h" #include "rockchip_drm_fb.h" #include "rockchip_drm_vop2.h" +#include "rockchip_rgb.h" /* * VOP2 architecture @@ -212,6 +213,9 @@ struct vop2 { struct clk *hclk; struct clk *aclk; + /* optional internal rgb encoder */ + struct rockchip_rgb *rgb; + /* must be put at the end of the struct */ struct vop2_win win[]; }; @@ -2393,6 +2397,25 @@ static void vop2_destroy_crtcs(struct vop2 *vop2) } } +static int vop2_find_rgb_encoder(struct vop2 *vop2) +{ + struct device_node *node = vop2->dev->of_node; + struct device_node *endpoint; + int i; + + for (i = 0; i < vop2->data->nr_vps; i++) { + endpoint = of_graph_get_endpoint_by_regs(node, i, + ROCKCHIP_VOP2_EP_RGB0); + if (!endpoint) + continue; + + of_node_put(endpoint); + return i; + } + + return -ENOENT; +} + static struct reg_field vop2_cluster_regs[VOP2_WIN_MAX_REG] = { [VOP2_WIN_ENABLE] = REG_FIELD(RK3568_CLUSTER_WIN_CTRL0, 0, 0), [VOP2_WIN_FORMAT] = REG_FIELD(RK3568_CLUSTER_WIN_CTRL0, 1, 5), @@ -2698,11 +2721,29 @@ static int vop2_bind(struct device *dev, struct device *master, void *data) if (ret) return ret; + ret = vop2_find_rgb_encoder(vop2); + if (ret >= 0) { + vop2->rgb = rockchip_rgb_init(dev, &vop2->vps[ret].crtc, + vop2->drm, ret); + if (IS_ERR(vop2->rgb)) { + if (PTR_ERR(vop2->rgb) == -EPROBE_DEFER) { + ret = PTR_ERR(vop2->rgb); + goto err_crtcs; + } + vop2->rgb = NULL; + } + } + rockchip_drm_dma_init_device(vop2->drm, vop2->dev); pm_runtime_enable(&pdev->dev); return 0; + +err_crtcs: + vop2_destroy_crtcs(vop2); + + return ret; } static void vop2_unbind(struct device *dev, struct device *master, void *data) @@ -2711,6 +2752,9 @@ static void vop2_unbind(struct device *dev, struct device *master, void *data) pm_runtime_disable(dev); + if (vop2->rgb) + rockchip_rgb_fini(vop2->rgb); + vop2_destroy_crtcs(vop2); } From patchwork Tue Jan 24 05:47:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Riesch X-Patchwork-Id: 646204 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45DB5C25B4E for ; Tue, 24 Jan 2023 05:49:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231544AbjAXFt5 (ORCPT ); Tue, 24 Jan 2023 00:49:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232430AbjAXFto (ORCPT ); Tue, 24 Jan 2023 00:49:44 -0500 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2060c.outbound.protection.outlook.com [IPv6:2a01:111:f400:7d00::60c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DE411EFE5; Mon, 23 Jan 2023 21:49:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iM87LjVnH+LxTCt56gBjdaJAnD7O+oXt3DR5ose++ZigPWwUtYzT/JSk2sodB8Esd/2pAGWCdKIeDvVy93wUUKBLAhophYt0avOYcJNnEomf6WAHaDyDnvdgXep8QW9Ho1eAsEaYsw7+9qjzuvj2JmcAmP0jkE90zYODIyJPnw21PBY+VwSt6zZ1rPcNFeuxHKt0U3lwzj/0PJok7XC5pLu5XUclyRrYCVQ8nWu9Sh1zrVPt3iLVEawF1pF6jy9sNuRk6M3moTnb10KZvp2kC7KOGJxrGtYA32FnexQZQeZ7nEtrX5JCEohRWRCRAHdqBrntPsGZ8FDS/kGppvONmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bfOwi5RzpCapi9SbxOiOdJVhxa3zxmIg1tK3h21oxUY=; b=EBIw5fLiyquEBTfsBzzU7UtXzOUXAQJYbEcT0v1nWurDZJfsP7eJZWc+hUt8bfRyMobi66mjw7fzXu2meU7NCkY3IiFj9K+MBaF9gPXBgvpy9b13xrnWa69opRsQb1PswohmV0qRYl/NoqVafBOp+lAUy7uW6uamZmVsO9AR3sVnpEoTaUWBo8ieLLM6j3b+8B5kPQetFn5WSnONlYE2h16WmkNnMfjA/EdL8ndC+pLtv5Z6BkJDxYiJHXTS3OFo/NFQrBSYZ900enZ/DoiFSkG0UT0HPchC9za5e9TVRyCwWvRJMq2+ILHEW1ttOEdTVb2D0SlcrqJDxeUcZ62oKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bfOwi5RzpCapi9SbxOiOdJVhxa3zxmIg1tK3h21oxUY=; b=Rirx8ttd0moGXaEtWvfO+YWHa142yDjti7oXIS7dwc+qVbhsxYJNkmHVwasNjwhgdXsOzafAm4X+j2oGp7PBOYnO/xywE8Tc31hSsg1BjtWNUHS4eRh6Qtn1qZIpEWsUKIOZbGVDcpOo4i5Gsyau3BA0wtwOpNjOgqqMp2akRqM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) by VI1PR08MB10032.eurprd08.prod.outlook.com (2603:10a6:800:1cc::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.28; Tue, 24 Jan 2023 05:47:25 +0000 Received: from DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::4718:6092:e763:4219]) by DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::4718:6092:e763:4219%2]) with mapi id 15.20.6002.033; Tue, 24 Jan 2023 05:47:25 +0000 From: Michael Riesch To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Sandy Huang , David Airlie , Daniel Vetter , Sascha Hauer , Michael Riesch Subject: [PATCH v3 6/6] arm64: dts: rockchip: add pinctrls for 16-bit/18-bit rgb interface to rk356x Date: Tue, 24 Jan 2023 06:47:06 +0100 Message-Id: <20230124054706.3921383-7-michael.riesch@wolfvision.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230124054706.3921383-1-michael.riesch@wolfvision.net> References: <20230124054706.3921383-1-michael.riesch@wolfvision.net> X-ClientProxiedBy: ZR0P278CA0189.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::6) To DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR08MB9155:EE_|VI1PR08MB10032:EE_ X-MS-Office365-Filtering-Correlation-Id: e503dffa-6983-42ce-c896-08dafdce7888 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 10+lw8J8qBt+BZuHrlLrHOTXaR3pNQNMELUwqYJ97N3xW2RCE0W2lAJ5igylHt9PH/i38RMmP5A5sh4UtTz+zvk+WEQj2Uqb4CR8MdlzV0XGnwf4dOAgt7+qwtv5RPS0O1RiMRQ30kLk/5Jq8mLgzB5aiO5rAT7xvo2YzZisnvUDHpIK1Flq29n4unTY0ozh2R7gDdMUxYgQG1JDLOypbmd0pqw8HwxnuQ0ONuMRkAMXhnUVaP/WRGMI/fihqpbbbQ30PiAoo7BcYEZAAZXvLxaRGA0BAY2VKkayKAdqMdubn/0dyfNXr+7cDQGkQRt3QHZ4bFWHp9I97H6lLhaCayDXfORgJNUZkI1Hu/OW1BJzV3VK+1zFDash0IBOZ5doi3r+vgI6rDQKSvd0iAP+XDvS9R1aiQrI6klKTU7QZIMipvfD6FgDzQRWK5OuLbUbTibU9gstQJvPNMJBwSPHDNAMei5myCyBMAC9q7yA5EhUjm0eZ98TR7b1qMTwFf6pMeuNnCmoBmCOhhDLwTyrUTXMlsLokwDIPbgQZ/V45JPYwXhtjUoUjzVaSsFu847EpBtQ7GoQZodju3e3kXXaQRnC8WtMH023/119nJmx/e5Zwu8/gH1/2wmZ1AiUU4BhaQSZ1OW+1vpJvDWock0SxIuAFRYJAGgbIl6hwmPDGBBa/qRxGqBBYDAnY3u84XKu X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR08MB9155.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(39840400004)(396003)(346002)(366004)(136003)(376002)(451199015)(36756003)(66946007)(2616005)(66476007)(66556008)(316002)(54906003)(8676002)(4326008)(6666004)(5660300002)(7416002)(2906002)(44832011)(83380400001)(107886003)(52116002)(6486002)(186003)(966005)(1076003)(478600001)(41300700001)(6506007)(86362001)(38100700002)(6512007)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: lMVUArK4FxXE3B0XOp885Y7ijVWO1hZ0KaaWjK8Zr/KMseD/ilbWRnJMXgdtuxQWHzx1JTWUi1VSupI3tDgLZfdpdXfEca8IGWOh/wwcy6CkSBZm+w+Gu7G9tc7Qi/X0MS0jkcdsAjyoENvIu71raIDolcSn8r1YW0WlSaQvSd+leFp5VNJlLm2ve7ypowwZOpCBEnrWaDLzxuW254MFbvTqWOA631SqkWBW9032lZzdLjwbOzSslfroOi/Bbn40rsIpvm8s66EEcve1l0XoXEQhXeABShfXzPwDppMkpZ8o5lNcoVY0iZedkWOOg4myYamZiC+nKdY9HKG3Djdzz/5X8o7R8TFgtWG6SM68rW9ZvLgr7+SAAEiKT6CDujroDVH0+FrNgqueeD9MGgmCE8JbbQE79unwcyaSmhYu66sTKmRl+Qgknl9CKjw6wOMUUYEkjHGW5qkpWFCSb5xr+krYn5+uPmLqS4cCyagUSt3ZwInduaD6bQWMeU9489yVcZWOgGIBgH1MYJZWeSmG650OTld6TZn43eLV8KFp6aJLdHA7Ef6Kau5MhPLGW7E0b3xz+/Ra8B5z6L0XZ+nzuNAZdFffqVOXu28aVuqawbIJMwhKpjN+aXIrdNTDfWgaF+d833ElgzgLSWMSas+YBHiXxlRktXFWPD3u3UrKzbY6uBnFpRriVRvwoXAmuMQSaNcDWJ77Vjk2ysUmcixnW17VmtAaQVsXDn8b2vmEEozgqkhXG88m5QyItRnB/E9sJZPoTx0p4K0+9YpPLBkbnwFrmll5X/kVaiy2IeVYR//KXOMsAdWQJxemLO9Rh1xfanEtiru+GL04SAg7saPPCbC49miGvWb2IwHi9BTuOHtm/E99S9h4GIse2xRiLeZijANPho0aDU54Ug+KLkgYzb2rAnbnQ9YVKpzEBx9ZgUr4GU8BehRkqxCjxrS1gnk+S5/1MzqTq3pWtVODjM5RDwL1ZEgpcDI/Jikr6IQJKgxFrO8IrCay5ltrbw+Y4NLywJhlgvGZQfPUh5HuWJtwBKeBNr3Pn6ketDgIgxKsrI65wrg37HYpVPaQ1wvpRpX1CvX30QyzvI3o1wEOjlAMRDgWMTzW1YNCz6NFU+8dP8/R9rsIPei2dk0WMcV07Ua/PhGvkmZeQ9PIE1UVgrW0DE4CJo1XYxCcno02Eew7PXFQo1D63yFqtuiuge5F6xMUeN7XIXc6Q7sqNl5WCHFI2FIdLBY9nXlzwp8haWfOZeMk+H+dzfZUsPj5CpbEMHMSH53BmRiQJjR+TaLy8AiUcNM+gHOIIudlX1sWUycUj7NJ4okP5pOjlzy3Oti1G/oZXJSIyfNLZebpI7MwMD+E0UJV+sv39xqD3PBmwAaWDjzu2QzM1U7whBzaAvZYgbDbUid8krxaSq8cfffxAvjUiAxI6GfEQd7RmIgJmGN17MmomeGfcP883FCrUXk3xIPFm/I/lgdYV3eDtbByP8rBZtFYKfIqNf9NVmmR0ttMyNeBIRNmPQ7o/asFtNVicq9Z0fduGzJliaP3nZhjo/WcNXwR+C1khOBd7ChQIrWhrLFEWLeXLLsIYfYDhT1v2sjj+Mp8kDUuuPv2v/h2dykSwxGNV9I61N0h3/jg/WG1EmUwuTw2sCHttCmYfF5cm34WDZfqyp2aduC/fqOnAKQnINMggYsxqhtN3jS1esZ9RH0= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: e503dffa-6983-42ce-c896-08dafdce7888 X-MS-Exchange-CrossTenant-AuthSource: DU0PR08MB9155.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2023 05:47:25.4603 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vsM0swrpIt4221ejF6gmWSD2muCKdJmsYrRUBqhpXjMezlKrntqeR6R1UlKKyCOV2uzKcL1B5uPeicCiFAfXwpKkIthfPDAUU9S+v/3NemY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB10032 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The rk3568-pinctrl.dtsi only defines the 24-bit RGB interface. Add separate nodes for the 16-bit and 18-bit version, respectively. While at it, split off the clock/sync signals from the data signals. The exact mapping of the data pins was discussed here: https://lore.kernel.org/linux-rockchip/f33a0488-528c-99de-3279-3c0346a03fd6@wolfvision.net/T/ Signed-off-by: Michael Riesch --- v3: - no changes v2: - no changes .../boot/dts/rockchip/rk3568-pinctrl.dtsi | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3568-pinctrl.dtsi b/arch/arm64/boot/dts/rockchip/rk3568-pinctrl.dtsi index 8f90c66dd9e9..0a979bfb63d9 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-pinctrl.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3568-pinctrl.dtsi @@ -3117,4 +3117,98 @@ tsadc_pin: tsadc-pin { <0 RK_PA1 0 &pcfg_pull_none>; }; }; + + lcdc { + /omit-if-no-ref/ + lcdc_clock: lcdc-clock { + rockchip,pins = + /* lcdc_clk */ + <3 RK_PA0 1 &pcfg_pull_none>, + /* lcdc_den */ + <3 RK_PC3 1 &pcfg_pull_none>, + /* lcdc_hsync */ + <3 RK_PC1 1 &pcfg_pull_none>, + /* lcdc_vsync */ + <3 RK_PC2 1 &pcfg_pull_none>; + }; + + /omit-if-no-ref/ + lcdc_data16: lcdc-data16 { + rockchip,pins = + /* lcdc_d3 */ + <2 RK_PD3 1 &pcfg_pull_none>, + /* lcdc_d4 */ + <2 RK_PD4 1 &pcfg_pull_none>, + /* lcdc_d5 */ + <2 RK_PD5 1 &pcfg_pull_none>, + /* lcdc_d6 */ + <2 RK_PD6 1 &pcfg_pull_none>, + /* lcdc_d7 */ + <2 RK_PD7 1 &pcfg_pull_none>, + /* lcdc_d10 */ + <3 RK_PA3 1 &pcfg_pull_none>, + /* lcdc_d11 */ + <3 RK_PA4 1 &pcfg_pull_none>, + /* lcdc_d12 */ + <3 RK_PA5 1 &pcfg_pull_none>, + /* lcdc_d13 */ + <3 RK_PA6 1 &pcfg_pull_none>, + /* lcdc_d14 */ + <3 RK_PA7 1 &pcfg_pull_none>, + /* lcdc_d15 */ + <3 RK_PB0 1 &pcfg_pull_none>, + /* lcdc_d19 */ + <3 RK_PB4 1 &pcfg_pull_none>, + /* lcdc_d20 */ + <3 RK_PB5 1 &pcfg_pull_none>, + /* lcdc_d21 */ + <3 RK_PB6 1 &pcfg_pull_none>, + /* lcdc_d22 */ + <3 RK_PB7 1 &pcfg_pull_none>, + /* lcdc_d23 */ + <3 RK_PC0 1 &pcfg_pull_none>; + }; + + /omit-if-no-ref/ + lcdc_data18: lcdc-data18 { + rockchip,pins = + /* lcdc_d2 */ + <2 RK_PD2 1 &pcfg_pull_none>, + /* lcdc_d3 */ + <2 RK_PD3 1 &pcfg_pull_none>, + /* lcdc_d4 */ + <2 RK_PD4 1 &pcfg_pull_none>, + /* lcdc_d5 */ + <2 RK_PD5 1 &pcfg_pull_none>, + /* lcdc_d6 */ + <2 RK_PD6 1 &pcfg_pull_none>, + /* lcdc_d7 */ + <2 RK_PD7 1 &pcfg_pull_none>, + /* lcdc_d10 */ + <3 RK_PA3 1 &pcfg_pull_none>, + /* lcdc_d11 */ + <3 RK_PA4 1 &pcfg_pull_none>, + /* lcdc_d12 */ + <3 RK_PA5 1 &pcfg_pull_none>, + /* lcdc_d13 */ + <3 RK_PA6 1 &pcfg_pull_none>, + /* lcdc_d14 */ + <3 RK_PA7 1 &pcfg_pull_none>, + /* lcdc_d15 */ + <3 RK_PB0 1 &pcfg_pull_none>, + /* lcdc_d18 */ + <3 RK_PB3 1 &pcfg_pull_none>, + /* lcdc_d19 */ + <3 RK_PB4 1 &pcfg_pull_none>, + /* lcdc_d20 */ + <3 RK_PB5 1 &pcfg_pull_none>, + /* lcdc_d21 */ + <3 RK_PB6 1 &pcfg_pull_none>, + /* lcdc_d22 */ + <3 RK_PB7 1 &pcfg_pull_none>, + /* lcdc_d23 */ + <3 RK_PC0 1 &pcfg_pull_none>; + }; + }; + };