From patchwork Tue Aug 10 22:31:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12429583 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 283B5C4338F for ; Tue, 10 Aug 2021 22:34:51 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id CA2AE60EBD for ; Tue, 10 Aug 2021 22:34:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CA2AE60EBD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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: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:In-Reply-To:References: List-Owner; bh=9eHQGhI4wqaf56rBnlu83EBrwHLf9idHF2QWIhrIpjI=; b=TKOzofvgLDu0uP uFqMxNit0XN/VrjYT3GXk6TRh/2AixpSJGCLRqgjO0cC7M1Szo6eJy0tKSOVouINwd2clkx3R6XHW X6OGOTQz+GQbQK3K8mhfBXHLes0bS9Iankgz8X+bB7WJMu2D4UR70kA9V5h5h7WRtIAPABi2Jw/XK 2lxP1Z6xHAtFRyft2PtKAY8M7EeuY4yoi8kJkJL2v2jlM+L0sCwP52XMQsKdw7LuUe0MEwGJI8Kc0 iMc0GZmwvgZRcPf1EUV1Du4/XLsmfdEQtgqMw3VFJjeHhVD3jBTehLWDmABBANnSyOcWWVBHEI/06 GAe3+Wr8P7kEGsQBMfJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDaIG-004ynp-TR; Tue, 10 Aug 2021 22:32:21 +0000 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDaIC-004yn8-KR; Tue, 10 Aug 2021 22:32:18 +0000 Received: by mail-qt1-x830.google.com with SMTP id e15so476230qtx.1; Tue, 10 Aug 2021 15:32:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IVKwhyg5AzTrj5Xr1hZ4KWRmZdbFFP1eiKArCMM9pzQ=; b=kMzKvyM7Loc2Seu+yjDAggIqexhPusiNdPDi3KNaP5dOf7ubrKXspzTLZd8K1mte7D /CUWDSp+885bU3phswxEX/evd3x6xZi39AFKORpapSvXqn+pi1L5NJEuN33YQzsHTgm6 UW+ihkZWY5fzTHGNTPWqTwCOTfqzA2dVwHVAg84yaCXL7gH+DPiHD1RuQwV7cm9dcaSc a1QkPfVgIdXkcjl6okTBRVixkHzaqGyC0p9wiZRzjWquIj9keJNvzakWpFYzurB5g5vz cniCMJmFeDODPNVctJpV1YMDDNvDaOpB0aFMJSxfXFzajnejgP2FtTHs4wLhJjZkGaKI 9xvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IVKwhyg5AzTrj5Xr1hZ4KWRmZdbFFP1eiKArCMM9pzQ=; b=UJR4uecZZZBYVdJzc18IlPHeSvz3fTPzE662Nc2Omzj21jqDNDU3tkYfSeSbRw5mfh DSTYDAoXlY4s/6suyJ76HMWrRqYQTWUEWUxPMQi+BlenXEte2RM2hBIfr/NGzYPE8xvk 0AUD6oXaPSS2Far1kiLit57P+AUwNXaEShXkCeqrNk6pcUg0cM/PM+37XAZtmBoWQBB0 rk0gaBP02WlnjDVRZHcCSHPoUHzSuvDMcaO4DRIVamsAcWey+dP05RmUboqTfsnqL9na wCnt27MmmWEfkPoZYdCvmXSj+eNNuSmJ4DRjbNFXntMfYY2PA53P1GKqGkU5KDTRWUpy Qfaw== X-Gm-Message-State: AOAM533O4DOxgplbEmViz1DlpHkdF/5Ghhdag3sAYlmMoR1E1jmriBQY KJRSQAbrNKlISD1NHHFJzH4= X-Google-Smtp-Source: ABdhPJy1JiDO1hiht2G6W9aRmXkmQFgXz6D6Em1RbxlWD8JKIAMWOsTeeZ0U2Yd5wjw45pQGJz3+Iw== X-Received: by 2002:a05:622a:1350:: with SMTP id w16mr17133150qtk.295.1628634734818; Tue, 10 Aug 2021 15:32:14 -0700 (PDT) Received: from master-laptop.sparksnet ([2601:153:980:85b1:e0b4:e07a:5fc6:c67f]) by smtp.gmail.com with ESMTPSA id b1sm8804662qtq.12.2021.08.10.15.32.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Aug 2021 15:32:14 -0700 (PDT) From: Peter Geis To: =?utf-8?q?Heiko_St=C3=BCbner?= , Sandy Huang , David Airlie , Daniel Vetter , Jagan Teki , Thierry Reding Cc: Peter Geis , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [BUG] dw-mipi-dsi-rockchip display corruption with dsi panel Date: Tue, 10 Aug 2021 18:31:24 -0400 Message-Id: <20210810223123.2174596-1-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210810_153216_736371_61923856 X-CRM114-Status: GOOD ( 14.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Good Evening, I've been attempting to light off the feiyang fy07024di26a30d panel on the rockpro64. This is the official panel from the Pine64 store. I've confirmed it works with the downstream kernel on both the rk3399 and rk3566, but on the mainline driver the display is partially corrupted (see attached photo: [1]). As you can see, the left half of the display is fine, but the right half of the display is corrupted with the pixels smearing horizontally. I saw when the panel was added, some additional code was added to handle burst mode in the sun6_mipi_dsi driver [2]. I've seen that the dw-mipi-dsi driver appears to already support burst mode and I can't find anything out of place there. I also haven't had much success finding anything obviously different in the downstream driver vs the upstream driver that would explain this. Attached below is the in-progress dts changes for an example of how the panel is plugged in. I admit, I have little understanding of the mipi-dsi internal workings, so I'm reaching out to the experts on how to correct this. Thank you for your time, Peter Geis [1] https://photos.app.goo.gl/LBA9M2WcweGaEb4cA [2] https://patchwork.kernel.org/project/linux-arm-kernel/cover/20181116163916.29621-1-jagan@amarulasolutions.com/ diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi index 687a5afa5d2c..af55a30297ae 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi @@ -20,6 +20,13 @@ chosen { stdout-path = "serial2:1500000n8"; }; + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm0 0 1000000 0>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <128>; + }; + clkin_gmac: external-gmac-clock { compatible = "fixed-clock"; clock-frequency = <125000000>; @@ -69,7 +76,7 @@ diy_led: led-1 { fan: pwm-fan { compatible = "pwm-fan"; - cooling-levels = <0 150 200 255>; + cooling-levels = <0 100 150 255>; #cooling-cells = <2>; fan-supply = <&vcc12v_dcin>; pwms = <&pwm1 0 50000 0>; @@ -220,6 +227,16 @@ vdd_log: vdd-log { regulator-max-microvolt = <1700000>; vin-supply = <&vcc5v0_sys>; }; + + avdd: avdd { + compatible = "regulator-fixed"; + regulator-name = "avdd"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <11000000>; + regulator-max-microvolt = <11000000>; + vin-supply = <&vcc3v3_s0>; + }; }; &cpu_l0 { @@ -428,8 +445,8 @@ regulator-state-mem { vcc3v0_touch: LDO_REG2 { regulator-name = "vcc3v0_touch"; - regulator-always-on; - regulator-boot-on; +// regulator-always-on; +// regulator-boot-on; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3000000>; regulator-state-mem { @@ -518,8 +535,8 @@ regulator-state-mem { vcc3v3_s0: SWITCH_REG2 { regulator-name = "vcc3v3_s0"; - regulator-always-on; - regulator-boot-on; +// regulator-always-on; +// regulator-boot-on; regulator-state-mem { regulator-off-in-suspend; }; @@ -593,6 +610,19 @@ fusb0: typec-portc@22 { vbus-supply = <&vcc5v0_typec>; status = "okay"; }; + + touch: touchscreen@5d { + compatible = "goodix,gt911"; + reg = <0x5d>; + AVDD28-supply = <&vcc3v0_touch>; + VDDIO-supply = <&vcc3v0_touch>; + interrupt-parent = <&gpio4>; + interrupts = ; + irq-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>; +// touchscreen-inverted-x; +// touchscreen-inverted-y; + }; }; &i2s0 { @@ -628,6 +658,88 @@ &io_domains { gpio1830-supply = <&vcc_3v0>; }; +&mipi_dsi { + status = "okay"; + clock-master; + + ports { + mipi_out: port@1 { + reg = <1>; + + mipi_out_panel: endpoint { + remote-endpoint = <&mipi_in_panel>; + }; + }; + }; + + mipi_panel: panel@0 { + compatible = "feiyang,fy07024di26a30d"; + reg = <0>; + backlight = <&backlight>; + reset-gpios = <&gpio4 25 GPIO_ACTIVE_HIGH>; +// enable-gpios = <&gpio4 25 GPIO_ACTIVE_HIGH>; + width-mm = <154>; + height-mm = <86>; + rotation = <0>; + avdd-supply = <&avdd>; + dvdd-supply = <&vcc3v3_s0>; + + display-timings { + native-mode = <&timing0>; + timing0: timing0 { + clock-frequency = <50000000>; + hactive = <1024>; + vactive = <600>; + hfront-porch = <160>; + hback-porch = <160>; + hsync-len = <10>; + vback-porch = <23>; + vfront-porch = <12>; + vsync-len = <1>; + hsync-active = <0>; + vsync-active = <0>; + pixelclk-active = <0>; + de-active = <0>; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + mipi_in_panel: endpoint { + remote-endpoint = <&mipi_out_panel>; + }; + }; + + port@1 { + reg = <1>; + + mipi1_in_panel: endpoint@1 { + remote-endpoint = <&mipi1_out_panel>; + }; + }; + }; + }; +}; + +&mipi_dsi1 { + status = "okay"; + + ports { + mipi1_out: port@1 { + reg = <1>; + + mipi1_out_panel: endpoint { + remote-endpoint = <&mipi1_in_panel>; + }; + }; + }; +}; + &pcie0 { ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; num-lanes = <4>;