From patchwork Tue Oct 3 16:33:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 728968 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 727AA273F6 for ; Tue, 3 Oct 2023 16:34:04 +0000 (UTC) Received: from mail-oa1-x32.google.com (mail-oa1-x32.google.com [IPv6:2001:4860:4864:20::32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57DCF91 for ; Tue, 3 Oct 2023 09:34:03 -0700 (PDT) Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-1dd54aca17cso771225fac.3 for ; Tue, 03 Oct 2023 09:34:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696350842; x=1696955642; darn=vger.kernel.org; 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=qkSQMV5DOXzEuPzZAkyJmDQmhsgIBtNj/QL5D2gyLgo=; b=metf4zBTlqJ4J9TUf1Huwfi6sbdYcZjLDiuK0rXB9fHBKE5aiO5wnSn3rkaemd5sXs VMsO8//qtmX3JmSapvZH+baW0oQdAPfQN4oc0n9JEAEYxPChIssoIJlH+4dpfwC9rQzC H5lTdhMYiA8q5HGEEcY5SzAgbqTU3lH7uJ4znWW8Y6UuiSQ0mDel20Z23+08JLtaI4QK qTJTbz4cVCszCe+zfsvZLo6s8fRnef+XScQUnm+5QriupwatwRIa2J4gLEnf9tCS4Gkd 8a533Xra2lWSJ7GRQa3oxhokDVGuARMSdlozby3yOTMNcR7PmvdZ8IzT1BsYqYZ7WTSe tRKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696350842; x=1696955642; 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=qkSQMV5DOXzEuPzZAkyJmDQmhsgIBtNj/QL5D2gyLgo=; b=EFNIjaGgDHJLjMVRw562MJf6ke8zP2BBZXiIKM4jNCFrCrYmq4FGEfHxIo3eShnNwq /egcpU7z4qgQ1k7ahNULwY8afWTi22KBtrga6lxUpC/cdj11HNk0klFSwkWbuNUlAnrZ n+XUJXlgqWvj5gJgx0CJmsHJB4GotcStXY21iFnU2FCURYAuYxG5oCuATK2R/odu2AUM R46bf2Btqjd/sMvTISGMRwKikyv5XCrJPqTjNqpbrFdEul+MtTA6Ps3ncOPzP/WKbp06 z1pHzF1Pyq015MA7Ayr5n94nfhmgviorSFsnCfWo/XmFm31dFFd1DEV+1pDbuwbY+cqT C99w== X-Gm-Message-State: AOJu0YzpCsu6INI4tzk6TAu20BL/8aBBdmVq/FzmDALDW7NBYYaysyoM Xbp9QkWghDeFapxUPyowyctXA8Fdbr4= X-Google-Smtp-Source: AGHT+IGz6tiIp4sfz51Ai/HmYnZnC5ywaM9M/Efm8xudL0UkYP1dfVu6ftBUjCpW8qG6NSE3iKY/MQ== X-Received: by 2002:a05:6870:958b:b0:1bb:509a:824f with SMTP id k11-20020a056870958b00b001bb509a824fmr64092oao.55.1696350842018; Tue, 03 Oct 2023 09:34:02 -0700 (PDT) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id k6-20020a056830150600b006b74bea76c0sm198567otp.47.2023.10.03.09.34.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 09:34:01 -0700 (PDT) From: Chris Morgan To: devicetree@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org, neil.armstrong@linaro.org, Chris Morgan , Conor Dooley Subject: [PATCH V4 1/2] dt-bindings: display: newvision, nv3051d: Add Anbernic 351V Date: Tue, 3 Oct 2023 11:33:54 -0500 Message-Id: <20231003163355.143704-2-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231003163355.143704-1-macroalpha82@gmail.com> References: <20231003163355.143704-1-macroalpha82@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, TVD_SUBJ_ACC_NUM autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net From: Chris Morgan Document the Anbernic RG351V panel, which is identical to the panel used in their 353 series except for in inclusion of an additional DSI format flag. Signed-off-by: Chris Morgan Acked-by: Conor Dooley --- .../devicetree/bindings/display/panel/newvision,nv3051d.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml b/Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml index 116c1b6030a2..cce775a87f87 100644 --- a/Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml +++ b/Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml @@ -7,9 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: NewVision NV3051D based LCD panel description: | - The NewVision NV3051D is a driver chip used to drive DSI panels. For now, - this driver only supports the 640x480 panels found in the Anbernic RG353 - based devices. + The NewVision NV3051D is a driver chip used to drive DSI panels. maintainers: - Chris Morgan @@ -21,6 +19,7 @@ properties: compatible: items: - enum: + - anbernic,rg351v-panel - anbernic,rg353p-panel - anbernic,rg353v-panel - const: newvision,nv3051d From patchwork Tue Oct 3 16:33:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 730922 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6046221349 for ; Tue, 3 Oct 2023 16:34:04 +0000 (UTC) Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CDA6A1 for ; Tue, 3 Oct 2023 09:34:03 -0700 (PDT) Received: by mail-ot1-x331.google.com with SMTP id 46e09a7af769-6c65d096c96so561962a34.1 for ; Tue, 03 Oct 2023 09:34:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696350842; x=1696955642; darn=vger.kernel.org; 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=OOhsxi8PjymwwLh84f6DRmuTn2wewUc5+RB2fJ2TRcU=; b=lCIHJP4yl32iPa4Yo4lzvAUSczC1wJjZxL5dtmvwYpHiymwD73YzuWaoJ+dw+tzi93 UmdND2zi/mDghOzny8mOlRcyeK4talvLBvPsCDQyet/I9OkZ69Hx92YPdvDpou9eW2vs oNAb+Sh8fSqcu/ohds7cjIERS0gOFD+a5Q7CfwbECfne1GTixBh1OqqM00DyQ9JNK7z7 oeImxxDPOhJCjtpf6emaX51LLIJtA+zhQxv0j4YdPNB9xVvNNrI7jSp1bNNmKy7hRtGJ ajpesAzv2H21NURBcW47JgEXxdfNiiUcADRMK6PSDzX/+OqOT2vRgYhGT1rsMmmQnHWu vN9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696350842; x=1696955642; 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=OOhsxi8PjymwwLh84f6DRmuTn2wewUc5+RB2fJ2TRcU=; b=ttZAKcf1UbgTkik3clw8b2Zbds72Tjo7x75vBiP9VBhMbS6e9mXn0A7Bl5Lp8ufl1Y hCuM8HhSqnNQlQA8d0mscjwFG/sRooywE+hBqaXXkYggyBjwj9WCH/HpbLT1IbsGTmAU bFVo6fRhMunWmBKr0d4alt1odidgiGUy+qvX0KW+owezbLQ9MT/ax2g4a0pK7+xqU02h oIGhlDjvbae8O50gjTP5pStr3zrZyve86w4C5qlmeZWTcBv3mHXCgLHTnJ6k2AOxEqx4 WFg0ditV2TwNvnZ0DGh29mIgb0XisrUXdcqDwBQhhToKp4Alvtdz7xv0fk+JJjAhQS9O KqMQ== X-Gm-Message-State: AOJu0YzK0j+DBmJZnzjmN+VNweUoTMGfk/R1sJoZxKbf2afpUgvex3E8 2ACuU6N+XcKhZlWq4saXnT9+pkLt1lQ= X-Google-Smtp-Source: AGHT+IGHNXqHa6jkCe9KMpnHnliPmuqTDgmCLUyx/lAKaiY0iO/4u6SqhOLzt0FQ6WLR191Bt6Txnw== X-Received: by 2002:a9d:6c0f:0:b0:6ba:864e:c5de with SMTP id f15-20020a9d6c0f000000b006ba864ec5demr1787223otq.8.1696350842548; Tue, 03 Oct 2023 09:34:02 -0700 (PDT) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id k6-20020a056830150600b006b74bea76c0sm198567otp.47.2023.10.03.09.34.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 09:34:02 -0700 (PDT) From: Chris Morgan To: devicetree@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org, neil.armstrong@linaro.org, Chris Morgan Subject: [PATCH V4 2/2] drm/panel: nv3051d: Add Support for Anbernic 351V Date: Tue, 3 Oct 2023 11:33:55 -0500 Message-Id: <20231003163355.143704-3-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231003163355.143704-1-macroalpha82@gmail.com> References: <20231003163355.143704-1-macroalpha82@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net From: Chris Morgan Add support for the Anbernic 351V. Just like the 353 series the underlying vendor is unknown/unmarked (at least not visible in a non-destructive manner). The panel had slightly different init sequences and timings in the BSP kernel, but works fine with the same ones used in the existing driver. The panel will not work without the inclusion of the MIPI_DSI_CLOCK_NON_CONTINUOUS flag, and this flag prevents the 353 series from working correctly, so a new compatible string is added. Tested colors and timings using modetest and all seem to work identical to the 353 otherwise. Signed-off-by: Chris Morgan --- drivers/gpu/drm/panel/panel-newvision-nv3051d.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-newvision-nv3051d.c b/drivers/gpu/drm/panel/panel-newvision-nv3051d.c index ad98dd9322b4..79de6c886292 100644 --- a/drivers/gpu/drm/panel/panel-newvision-nv3051d.c +++ b/drivers/gpu/drm/panel/panel-newvision-nv3051d.c @@ -388,6 +388,13 @@ static int panel_nv3051d_probe(struct mipi_dsi_device *dsi) dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET; + /* + * The panel in the RG351V is identical to the 353P, except it + * requires MIPI_DSI_CLOCK_NON_CONTINUOUS to operate correctly. + */ + if (of_device_is_compatible(dev->of_node, "anbernic,rg351v-panel")) + dsi->mode_flags |= MIPI_DSI_CLOCK_NON_CONTINUOUS; + drm_panel_init(&ctx->panel, &dsi->dev, &panel_nv3051d_funcs, DRM_MODE_CONNECTOR_DSI);