From patchwork Wed Mar 29 13:16:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2825 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 78531414BB for ; Wed, 29 Mar 2023 15:17:47 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id i26-20020aa796fa000000b006261da7aecesf7278637pfq.5 for ; Wed, 29 Mar 2023 06:17:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680095866; cv=pass; d=google.com; s=arc-20160816; b=LLZANiEwLcXyZx5L1QNEeAcLnywfMU8Q71NTowltjc8fKOPZwTrVkgnzxevP4cDUk8 seF9UVS3HXwNF7avOgGn+GadGFIZzNGZ4xVsbRiVmy7jD0PbuUWjzlUigx/+L3X9qnQR 5bLyyEJSFqFwfHog4pjSzMRpXlnS7YJYPm/kiOjLeYFK9Xj5g4vQSxLHX0G0jqBW0P/3 xnILa+Dt8I2a5LlSZmKHGgUEGEuLtYdrbXkx7exMobmrp3ru0b3elBXuQA8ixg+H3tVA mNwzYgHAwy6H4p+Z3HQK+vO5zawnVx0s/cqPUq22p7JDD68LWCkrfyA4kKEAo6ZUd7EW JmWQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=rG3CMcC30KaEFFRILDTXqevyHN1pAShHAMS5l+KkEMc=; b=XAVoIrQuBD9sYjJENrrWR2IOv7jXGVZdq0eiV/lAyIXs3N5GrPrp7E8XQhzvvB25bh 8smMPVg7mdPTgRrUDK16Vc4hSYGG6Na6JJhcy7HKm85LUYr8Ftw08gc7A/dDdGqDIuSz thOjmVcx3KIjL1jFtOMDHOBi3vRW/G2ibXtV9j3+yZ5EHka/R2T8sxRHmMgDNmKTJzkj cDZ0rJ7mYEPvusUkl8/X8Sc5Dus5RwQygNKc7oPrSYzo+BvyBO3zWjRoU+R16bULFnnC sGNr4fBGHgnpCF1qbU3HEeU3mGWh1JsZb+tpAVkWpi986OuLKrTrXke/own0uybR5YOK SPWQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=SUmEEgfM; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1680095866; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :from:to:cc:subject:date:message-id:reply-to; bh=rG3CMcC30KaEFFRILDTXqevyHN1pAShHAMS5l+KkEMc=; b=Y6722qwTWtIUl3aomDnHtRl7gb0nlxkuU2SPAWRPSI9ltPV3b7HCIsmwVwoSDZTehs e7xnmIXsn9wQGK9GA+EjZHEDjszj8d5pJTAAN2pnH4GWtZiZo9QLcTT5ZvjJSw7hndS5 cczjzY1wDWGNG8gVwMcWXUA+CkxMfwho8O7Cw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680095866; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rG3CMcC30KaEFFRILDTXqevyHN1pAShHAMS5l+KkEMc=; b=c6k6a2mSgAhmr5Eq/urGmL6Gbz9gcR2N8ejqAQZzz2wX9p1/TmFC59lnpIRFAiILf4 DGakl/WdG8YcgcxBhe8ZMkRW8AUm9YQSWa2722TuUc5cFncprpk5v9zIUuNjfFOln+JQ 9folq1bbQ4J/29ZnSczsyQ3/wjblqh20XycdPbbUEbbreq6TJeq6lfy65bR2kIVYHFJo RIyCOLWDayZkhYeyx2BQ6xp7AM9ioxTcW1xjEnUI8tnT6nqQFDsL/hwKUR1SBgJC9QsR Cem61OMkNAV3wMtxkQHatQZelPCAWV31Czp1TJ06x6dqhJLzgn7N4GeaomA69kZPMZ/j IycA== X-Gm-Message-State: AAQBX9cFESxbTI4E9ZOjLCVUvdjJzxoE9mBn12sY1goHpOVxwwrigAbx P0xMPpvqIMODOISU8qBeOTxg5N2e X-Google-Smtp-Source: AKy350ZLvZHuM/xlURJ27YSQP06x7g7NWmrECZSroyEGEEF2H6mNgbqGwhZ/oAvvxFjY/nvPXI12gQ== X-Received: by 2002:a05:6a00:1827:b0:622:c6ad:b373 with SMTP id y39-20020a056a00182700b00622c6adb373mr10471191pfa.3.1680095865867; Wed, 29 Mar 2023 06:17:45 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90b:4d8f:b0:234:2ef4:2e9 with SMTP id oj15-20020a17090b4d8f00b002342ef402e9ls2221248pjb.0.-pod-control-gmail; Wed, 29 Mar 2023 06:17:45 -0700 (PDT) X-Received: by 2002:a17:90b:33c9:b0:233:a6b7:3770 with SMTP id lk9-20020a17090b33c900b00233a6b73770mr21343988pjb.14.1680095864430; Wed, 29 Mar 2023 06:17:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680095864; cv=none; d=google.com; s=arc-20160816; b=w9xBKpnqS1nOeNvgFJuagmJWhVBMSPmPf73N6LeHqrhCbE9a2XR1BcZ5GGW5DRrPpw 6PpYjWPZnI4cil0685egKCfo+zsVALJ0ZV9HIhcTv1e1oovCZF6J/My9T4aHSr+o43Bu B5r+1xXhXzSVhPZ2BGymZvDvrf6xu+jJOqKUcBXFzrpXxR57nIFUiufDsQJ72u26182l lyeZZHChnoyYTz7/rAJzSoAeNV7Fk1LivCNHXFAN/QtEK695SX7T/8ZbH4Uf7X0/rWiE k9+Bto5+xWc+6AYgMbj2xXkdIwuJJw5M7bhVEuJtQNs15DVXDrF+pdI+TxOCWlvQNO1r Jbbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=bW/AgagaO6ywAMmPlVyMdeYGY+JgIPY1xvCW5wCjozk=; b=USNWCvD9N0lLLQgbuc/FpYQCgOlubOp7kloiR8YEoVqKRGvihic9Ce2yiiBkXBz3a5 hObC42IZvLVNJz6FQUAi1WgXAdKc4dXVhcnjNBO7dvhTtiVTbuEo1spBaQp9KZf2CLSh QzCHddwpIgiNt88pHk/RrvaTVrSIOP1tOJvT/r2V2aFtBGm7seM25yQi0ao0bByCEBr2 huI9cL8fdFQV6BuvBVfv5L+xI8jvmY268yJRIqO+RHcn3bn4K2IoovuF3C3xiaNI5dPj 5BEO+yGP5q7BllcIGHqMomCY5kCGR62mKbKzOj+vy/vY/Wh/h+svzoR63yyhMeaaaoz3 NliQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=SUmEEgfM; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id co4-20020a17090afe8400b00233ced654b1sor903268pjb.1.2023.03.29.06.17.44 for (Google Transport Security); Wed, 29 Mar 2023 06:17:44 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:90b:314b:b0:23f:1210:cea4 with SMTP id ip11-20020a17090b314b00b0023f1210cea4mr20998965pjb.18.1680095864035; Wed, 29 Mar 2023 06:17:44 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a047:206d:4722:c4fa:e845]) by smtp.gmail.com with ESMTPSA id s16-20020a17090b071000b0023f5c867f82sm1400192pjz.41.2023.03.29.06.17.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 06:17:43 -0700 (PDT) From: Jagan Teki To: Dave Stevenson , Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sam Ravnborg , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Marek Vasut , linux-amarula , Jagan Teki Subject: [PATCH v7 00/12] drm: sun4i: Convert Allwinner DSI to bridge Date: Wed, 29 Mar 2023 18:46:06 +0530 Message-Id: <20230329131615.1328366-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=SUmEEgfM; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This is v7 revision of converting Allwinner DSI to brige driver. Patch 1 and 2 implements drmm_of_dsi_get_bridge which is required to lookup the DSI sink device represented either child or OF-graph port or ports node. This is essential as not to break the existing bindings which indeed uses child node represention for DSI sink devices. Patch 3 to 7 enables the prepare_prev_first flag for essential panels which effects sun6i-mipi-dsi host init order sequencing. Patch 8 and 9 added endpoint 0 to dsi_in_tcon0 of A33 and A64 which is required for I2C-Configured bridges to represent. Patch 10 and 11 implements enable_next_first flag, which is essential If the DSI host enables with the @enable_next_first flag then the @enable for the DSI sink will be called first before the @enable of the DSI host. This alter bridge init order makes sure that the MIPI-DCS commands send first and then switch to the HS mode properly by DSI host. Patch 12 is final patch bridge conversion. Series has been tested in DSI Panel, DSI Bridge and I2C-Configured DSI Bridge. v6: https://lore.kernel.org/all/20211210111711.2072660-1-jagan@amarulasolutions.com/ v5: https://lore.kernel.org/all/20211122065223.88059-4-jagan@amarulasolutions.com/ Any inputs? Jagan. Jagan Teki (12): drm: of: Lookup if child node has DSI panel or bridge drm: bridge: panel: Implement drmm_of_dsi_get_bridge helper drm: panel: feiyang-fy07024di26a30d: Enable prepare_prev_first flag drm: panel: sitronix-st7701: Enable prepare_prev_first for ts8550b drm: panel: sitronix-st7703: Enable prepare_prev_first for xbd599 drm: panel: feixin-k101-im2ba02: Enable prepare_prev_first flag drm: panel: ilitek-ili9881c: Enable prepare_prev_first for k101_im2byl02 ARM: dts: sun8i: a33: Add endpoint@0 to dsi_in_tcon0 arm64: dts: rockchip: a64: Add endpoint@0 to dsi_in_tcon0 drm/bridge: Implement enable_next_first to alter bridge init order drm/bridge: Document bridge init order with enable_next_first drm: sun4: dsi: Convert to bridge driver arch/arm/boot/dts/sun8i-a33.dtsi | 6 +- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 6 +- drivers/gpu/drm/bridge/panel.c | 34 ++++ drivers/gpu/drm/drm_bridge.c | 186 +++++++++++++++--- drivers/gpu/drm/drm_of.c | 112 +++++++++-- .../gpu/drm/panel/panel-feixin-k101-im2ba02.c | 1 + .../drm/panel/panel-feiyang-fy07024di26a30d.c | 1 + drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 3 + drivers/gpu/drm/panel/panel-sitronix-st7701.c | 3 + drivers/gpu/drm/panel/panel-sitronix-st7703.c | 3 + drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 143 ++++++-------- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h | 10 +- include/drm/drm_bridge.h | 18 ++ include/drm/drm_of.h | 12 ++ 14 files changed, 399 insertions(+), 139 deletions(-)