From patchwork Thu Apr 13 10:09:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 82899 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp935639vqo; Thu, 13 Apr 2023 03:41:10 -0700 (PDT) X-Google-Smtp-Source: AKy350b+1m5aPu4IcT829F/Ys1Vqk6QIMTo3Kv4VRzGAG+zUde43jGZUc9ZJEv/UPJpFc5An1bwg X-Received: by 2002:a05:6a20:b38a:b0:eb:f56b:944a with SMTP id eg10-20020a056a20b38a00b000ebf56b944amr1594764pzb.27.1681382470627; Thu, 13 Apr 2023 03:41:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681382470; cv=none; d=google.com; s=arc-20160816; b=u+lbawHvT0DSq3Vtq2jQrqe7QTaDQyBHo1bS+XRWOZEtZdV8+1Mi+t0irZD7Qc1k6p kPd3pz6Nn/J0j0KWJdT7kQBRljTYvq+00czKvrv3SsKk/k/ASu/z9i1UnLcRxVlEIFVl QihwknXQ/HzKV1HmhmxqBR3CNDO7jSraPSNquQy7wp0yXjopLZRTtVKbHUFdckkqli+E NJMN5S7TRvKLG7SbH/fWmitnOllDRNSa/Fa/MgjKAsWyK5V99G9nQ4EkxiOIAY/mZuxE T7wfCaBCDIPExGWXokiPLudMTEVZA3k4UpfPRXJATFL6Gc10i3w6/cKKDN5eb2eM8Qt0 Pf9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=DEAnat5PSJjsxQAWB7/SpZ+xwfK/Fj2JlbHtk3HNvoA=; b=VNhlf3hp4O1lO8Ru7bDv6+YQjzag2q6XNN1mZ4Rf83shhe8BaxjbKSRkwrsCWBYmyn VmmWJ15fYxPnUzxXsMYJ2BxBatYyowhcurqlMLprUE3fGf2yFJ4sqKU0Sbk/SPQUiEvI lWEKvAoZOXZrcwofHbQrP0WNZE9Ef6XasSkz/YBWN+MM0u91Rp21tsFCY9q7TGh43QV5 ny1ca5ej+72Ec7+azsugIu/I0qwLjVaspSE9BpvVyDereVnlbmBzu7dCiMLljgdN6GOX yn+eO9lnIYLXEWYOHTkESrDleOjZ87c/JwVWQuH1UyNY6vsGoj5mM/p6sOqb0t1HRYTC dGrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ltTzPvxh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h6-20020a63df46000000b0051357734521si1786333pgj.604.2023.04.13.03.40.58; Thu, 13 Apr 2023 03:41:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ltTzPvxh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230326AbjDMKKI (ORCPT + 99 others); Thu, 13 Apr 2023 06:10:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230204AbjDMKKB (ORCPT ); Thu, 13 Apr 2023 06:10:01 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 325118A74 for ; Thu, 13 Apr 2023 03:09:50 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id bx15so12904834ljb.7 for ; Thu, 13 Apr 2023 03:09:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681380588; x=1683972588; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=DEAnat5PSJjsxQAWB7/SpZ+xwfK/Fj2JlbHtk3HNvoA=; b=ltTzPvxhvo3ZlgIQh10MfEpSaxyzcEAkSMAeImGiz864Hk+fEhbQ0LBYTl2tPSAMzv ab1LF0jIAHCyWSFQHQAPE5RsNQrBf7QUL10601PtdgwXHZgXZX6SmagLER5KjFeycGbU Tn1zqwIgboWmT5uTM98zj+zv1iLv4EQv3BV3StMfIXzzjTyE/rb3qRcf8zYfu6JtIPSk zSZ7/Jy0lHHCEV12vsYu00BDiERMME3VWk+g53uOSCfATYHP4XEKxgzEMZqCPinFLuSr QkXOAnq24uM2s1mGb3lQYwPpkeH1uS6wRGzzQeqmXaHWp9Czo7eQ2hzQ8vxjX6l4hEmf Rnug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681380588; x=1683972588; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DEAnat5PSJjsxQAWB7/SpZ+xwfK/Fj2JlbHtk3HNvoA=; b=OFIQV83sRnyPo0lEgUiPVGn6U64RwlwIfzkF2QjKw2PnQrGK9gf6F9Pit7xa5xd6hw p+l2nMvxSz4Bo0Knfa7/r6lkghkdaG+QmOoMzI/8mwQQfKPwR8kqeFxbZRIA278+4dlQ 0diFsHcEjZe5NElEixFhG2kQRUtfxfVggBAkSD1nhxustBjM1G+cXkgjoI6VaqMUhek1 b+ngwf/r+IJBkgdfLE2zd4Lm1rQjyRsc4O0MwRgCxY0w+eNVZQOQWm8x3fWKTEGb4Lf4 xSkoy4dU06F+1bLsHtCioWz0x6DRRcrYaeSU/jvOBzhOXOyg7Y0kKSuRW355kVP3g52h xpRA== X-Gm-Message-State: AAQBX9cf066TLy4m1LeH3YhZ3nJtKE2iwGyJOFqWU4zwvQHA90yE6/GI /DnRUvUY96X0o7yqvQgQIVZX7w== X-Received: by 2002:a2e:9e19:0:b0:29b:d471:c80f with SMTP id e25-20020a2e9e19000000b0029bd471c80fmr907501ljk.36.1681380588424; Thu, 13 Apr 2023 03:09:48 -0700 (PDT) Received: from [192.168.1.101] (abyl123.neoplus.adsl.tpnet.pl. [83.9.31.123]) by smtp.gmail.com with ESMTPSA id t20-20020a2e9d14000000b002a2e931fc48sm200482lji.140.2023.04.13.03.09.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Apr 2023 03:09:48 -0700 (PDT) From: Konrad Dybcio Date: Thu, 13 Apr 2023 12:09:35 +0200 Subject: [PATCH v2 1/5] dt-bindings: display: panel: nt36523: Allow 'port' instead of 'ports' MIME-Version: 1.0 Message-Id: <20230412-topic-lenovopanel-v2-1-055c3649788e@linaro.org> References: <20230412-topic-lenovopanel-v2-0-055c3649788e@linaro.org> In-Reply-To: <20230412-topic-lenovopanel-v2-0-055c3649788e@linaro.org> To: Jianhua Lu , Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski Cc: Marijn Suijten , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1681380585; l=1187; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=FMgShhUTMaYzSy2Me7Gv1xSXp92sIQsWFZ0aqhhoJn8=; b=9J88Z5LuF95gqkV+HSGcOJ5UC/2WCV8vVvuzNlssYzVIvrv/8ehvUa53oIMtzftb/pqyOx/rHMmu dOWMlYA7DWmYNYzxksbhUTQJ36XooRkA8E19xmPb9BFG36Q4wp1V X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763057305291552434?= X-GMAIL-MSGID: =?utf-8?q?1763057305291552434?= Using 'port' instead of 'ports' for single-DSI usecases allows for saving a couple of DTS LoC, including a level of indentation. Allow that. Signed-off-by: Konrad Dybcio --- .../bindings/display/panel/novatek,nt36523.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/display/panel/novatek,nt36523.yaml b/Documentation/devicetree/bindings/display/panel/novatek,nt36523.yaml index 0039561ef04c..38f4f986aef1 100644 --- a/Documentation/devicetree/bindings/display/panel/novatek,nt36523.yaml +++ b/Documentation/devicetree/bindings/display/panel/novatek,nt36523.yaml @@ -33,15 +33,26 @@ properties: description: regulator that supplies the I/O voltage reg: true - ports: true backlight: true +oneOf: + - allOf: + - properties: + ports: true + - required: + - ports + + - allOf: + - properties: + port: true + - required: + - port + required: - compatible - reg - vddio-supply - reset-gpios - - ports unevaluatedProperties: false From patchwork Thu Apr 13 10:09:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 82895 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp928391vqo; Thu, 13 Apr 2023 03:25:05 -0700 (PDT) X-Google-Smtp-Source: AKy350YaQ97r8wWnBDXmjX8OQgQ8+2uO4Blcx/LIvL/beWTAmgH5h9TiQ9p1BASTWLAlpH6Rq0Xm X-Received: by 2002:a17:903:2487:b0:1a4:f295:32fa with SMTP id p7-20020a170903248700b001a4f29532famr1971095plw.15.1681381505443; Thu, 13 Apr 2023 03:25:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681381505; cv=none; d=google.com; s=arc-20160816; b=h1OiqJhMC7K5OyF+IGqaTWo0gHgkj8MO5VxIh9jTu2H9a0jHa/b5voku1vjnLVRi4r PKRghRw4fj/Q5utRUZP7nFO+ruyQuW7w/TknfNWp/lpM/nZyncadgXu5wS1hSFAddNgS FvEMNeGyBpxXpECHqnQagHtxV3LMiFDT6J2RoZ+2kwnSRJxRIsbb5ID5FTFH9XuEz1sc h0NFFe2K237RzlyeCnVT/gDa+lCeYejwPXzPvCKenjyWysvwfV4aGs4S4U+NBwb+CoQv 2W6GjBTN7HRkMYUuwbuNPFseqWZeRgcHduolD38+7XEQC/zQvBeiEBRRpAxK/hk2QYB1 9b/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=bSIW3m6ouiUh4MBy/iPcO3038yiahaw6SCZrZmXoL8c=; b=oNwBKlnIsyawr2RSM/HLIszfyghKfbYrUgkZ8sVjnzY0vCKoZHrCxCJKgrsbw2Kl9E 453Vbqzl4eKDuDMYE2yzDdNKHZwHsANnFZTXA4G//FEvV/WNhAOAZ7fZbRON4F3Klsyl sdCHH9mANWWZW11s/PMSbKSza2DA7dsyC19KDtJ0tOKryGDDzXQmS7UOAmLjsA8cCU4n Q5XtpSJr9blXjNX9zg6t2nu4+9RaeCD5aWEiSxKCVH/HmTEk9dM92ZAlelFI99ysyWpW Uf+PWiJFCCg7KoyWCcwQdHLOQ6qSjNepTgnOHqJNS3TVWhFYQQcV536L5zUwZFvmmReI vO0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s2aepwa1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x4-20020a170902ec8400b0019f3c9d839dsi1786051plg.576.2023.04.13.03.24.53; Thu, 13 Apr 2023 03:25:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s2aepwa1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230355AbjDMKKQ (ORCPT + 99 others); Thu, 13 Apr 2023 06:10:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230286AbjDMKKB (ORCPT ); Thu, 13 Apr 2023 06:10:01 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65FEA9027 for ; Thu, 13 Apr 2023 03:09:51 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id j11so2408529ljq.10 for ; Thu, 13 Apr 2023 03:09:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681380589; x=1683972589; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=bSIW3m6ouiUh4MBy/iPcO3038yiahaw6SCZrZmXoL8c=; b=s2aepwa18IqdU0SyKMtM8jAoCQnaWRTpqSkvN7201r1i0T84x5U2A//m+sbAcDUY/h bIiDy6rekYmG6rNaS1GUtUrLIjmERQ/aWcasLBXJrb3f5xP8+Cy2JScNMxy6od9iC/MB 7i/0wMUpzGXDxnO7SaEBTv90z1Cm00CrZurSL82Rv1xj8WW/tvrrzwI6fX0vsYxaSdNe eIDmzsQiVKeVrX9UKxSMxtZNcln6avoeEn11sokQ6rOTBf1YjXPvJbKZzmmmCBIAOk2F oLv2O4sjH9mOq8ymbTMucigojP13caE7qM32yysFQDphq2hC8KNebM8DwDCcJu1oF3tH Nkaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681380589; x=1683972589; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bSIW3m6ouiUh4MBy/iPcO3038yiahaw6SCZrZmXoL8c=; b=gtXcWUSOF+APCj773h+0cV1mkIKGJRNEBq+FxuIUAQ87ig7SZhxYThFrPSTa6JiyzS Iijw9eqB+fU/BYm7CarB28N+Vjz6mJ8ouIcDmi0e4d/2vdQQoUZhtID0LwJANTCq+8oA xkitQYshszN+QBcoqr3W15qSDbVZaRrRZWP+YbeNRSHD9ks/LiAljzmcUhrc3+GljmdZ FRPBlHUGplCGFa5FBqJkg1ytzGo04iCVno1G5D1kBARtqrFO1Z5HI0i9JRTlVhXWk83h eiVZ1pEFMXzHU4trH9mGnzagWHei0ECW3fwuP8aVyC5IIqHyR7+vGSZhk7dFtnttHU4r FtrA== X-Gm-Message-State: AAQBX9dOF6u4xl5odivhjiwrAC+y65tpW2mcI8vuu5S8rRZQS+qr5x56 ok8JVXGKJLkdIIPNttAmwkIvDg== X-Received: by 2002:a2e:2418:0:b0:2a6:8a:d0f5 with SMTP id k24-20020a2e2418000000b002a6008ad0f5mr578207ljk.23.1681380589691; Thu, 13 Apr 2023 03:09:49 -0700 (PDT) Received: from [192.168.1.101] (abyl123.neoplus.adsl.tpnet.pl. [83.9.31.123]) by smtp.gmail.com with ESMTPSA id t20-20020a2e9d14000000b002a2e931fc48sm200482lji.140.2023.04.13.03.09.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Apr 2023 03:09:49 -0700 (PDT) From: Konrad Dybcio Date: Thu, 13 Apr 2023 12:09:36 +0200 Subject: [PATCH v2 2/5] dt-bindings: display: panel: nt36523: Add Lenovo J606F panel MIME-Version: 1.0 Message-Id: <20230412-topic-lenovopanel-v2-2-055c3649788e@linaro.org> References: <20230412-topic-lenovopanel-v2-0-055c3649788e@linaro.org> In-Reply-To: <20230412-topic-lenovopanel-v2-0-055c3649788e@linaro.org> To: Jianhua Lu , Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski Cc: Marijn Suijten , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Linus Walleij X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1681380585; l=1472; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=n3Ug6o2RQm9MRwfNsS0ku9LYCJEX/SEVYNXH8b0uEzs=; b=7k3RzLmzF5mXo80xwIEgbS38OpViZfugrSV/p8xZjzFY6LLzX8bSGoCa5fzFIkaUzU3qAqdZhOrL xZd5o7mhAfUxWxAQTY7QYr+XMn+hZJmlPjzk32hAPTHJlIpKfczq X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763056293230016267?= X-GMAIL-MSGID: =?utf-8?q?1763056293230016267?= Some Lenovo J606F tablets come with a 2K (2000x1200) 60Hz 11" 5:3 video mode display. Document it and allow rotation while at it (Lenovo mounted it upside down!). Reviewed-by: Linus Walleij Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski --- .../bindings/display/panel/novatek,nt36523.yaml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/display/panel/novatek,nt36523.yaml b/Documentation/devicetree/bindings/display/panel/novatek,nt36523.yaml index 38f4f986aef1..fda74d5bd89e 100644 --- a/Documentation/devicetree/bindings/display/panel/novatek,nt36523.yaml +++ b/Documentation/devicetree/bindings/display/panel/novatek,nt36523.yaml @@ -19,11 +19,16 @@ allOf: properties: compatible: - items: - - enum: - - xiaomi,elish-boe-nt36523 - - xiaomi,elish-csot-nt36523 - - const: novatek,nt36523 + oneOf: + - items: + - enum: + - xiaomi,elish-boe-nt36523 + - xiaomi,elish-csot-nt36523 + - const: novatek,nt36523 + - items: + - enum: + - lenovo,j606f-boe-nt36523w + - const: novatek,nt36523w reset-gpios: maxItems: 1 @@ -33,6 +38,7 @@ properties: description: regulator that supplies the I/O voltage reg: true + rotation: true backlight: true oneOf: From patchwork Thu Apr 13 10:09:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 82896 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp930194vqo; Thu, 13 Apr 2023 03:29:38 -0700 (PDT) X-Google-Smtp-Source: AKy350bBT1upNo9eGI9mH3zNC24tDzQXMURGGhzLh3IUFuePXU3CCiInYGONkghw5eTsLASb6aRC X-Received: by 2002:a17:902:d151:b0:1a6:7ed8:84f7 with SMTP id t17-20020a170902d15100b001a67ed884f7mr1642762plt.20.1681381778332; Thu, 13 Apr 2023 03:29:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681381778; cv=none; d=google.com; s=arc-20160816; b=zVNk0ORMfvwLLDsZ36/DHmsHJhGwyueFtvtfD/nztHVinHJO+zVj7T+3drwjt84FGw yKh0ygLYW43p2EaYQqjejDoVBgqTnH0C06hl6ZNxIv/FrTO/MbgVYePql3y80vbqC6+v REihfY9vZ1DFiK76D7q+sqIX1kBZgQmzQEVELcroYAKig2nCoxFrxufQuPSDt328BKld 07OYHdQbUDDvtN3IUk1lYyZ8OrU6oBEAFiy0oPMgnLjNaF8+WF/s+03E/D9D6RcJbIBx nTgtlvnTy448X0BmplyyBTxYBaqZl8w6VskLgXp6QHZFcQsT3ew1bkd/y+rBIjwq50Mr 33BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=8VxPnjG7Ga3tmIOUhMs54Sv+8hbNOJAgCnpbXzAxobQ=; b=zBijWmlaBJ81J/ES9so+kYb+asMKXVdh+GGMGACiWQRjdbKweTRTLjLlC2rHSFnTjj Tbp3AFVGdkzVipuUxmBZfgo9Q1/HBG7wxUTY5oeFj4wWInDrMefBng8j64R4DTlmHKE/ VuviNQqmmyrMLprQZP4Gtgj7r9VPPl00HIjKEfs5sUUTc/ce34TquhSC4uMW17NaWMzv ad+QSn4H+bL+V89Rqu649cf1le74iimgi0OY4nJ77qG1Y1smDk0xJ1suRDZQ9kNV6fer Hln0/yGVubJ5+Z1/D6xoN42qb9q7QEMhcVy31fAM4EFulLdS9u3IVKWmCs0V5zUz/V75 BAgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gkNHMjZt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h13-20020a170902f54d00b001a4f168718bsi1750780plf.585.2023.04.13.03.29.26; Thu, 13 Apr 2023 03:29:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gkNHMjZt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230383AbjDMKKU (ORCPT + 99 others); Thu, 13 Apr 2023 06:10:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230288AbjDMKKC (ORCPT ); Thu, 13 Apr 2023 06:10:02 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A36679755 for ; Thu, 13 Apr 2023 03:09:52 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id bx15so12904956ljb.7 for ; Thu, 13 Apr 2023 03:09:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681380591; x=1683972591; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=8VxPnjG7Ga3tmIOUhMs54Sv+8hbNOJAgCnpbXzAxobQ=; b=gkNHMjZtMFbejwqHO8md1YUCsEy0fYS+RJS3bjUxHlw0snRh4wvU8AUxIGsEsMLnKa 10et6J2RG6qAOAU1ZLvwzNAADG1ZVdTRZ8LuFsMrwPPvRhVqJ+A16dHEQwnOliK8l2jS QNF+uoFhI+XWvwmi4Dme6LksLIZ1uRlnXMqIxmjTQ8ucJMdJqmJRf+EonV7c1izxks0d 8uzCwK+i2pGFbSngVB/Pu0oelXFgd5MyuGt8hk+MM22/okasA9WDelKwqvFbOWbfk8yl nex5srBTm3qTyHgNJiqlIFbJQ4SXUhW508wun5OiUN7TyZs16fx6YiC87mRDUmiCfiMj XzVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681380591; x=1683972591; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8VxPnjG7Ga3tmIOUhMs54Sv+8hbNOJAgCnpbXzAxobQ=; b=gJgWlvyXO0KOb6/CKVSZF61UBmLZViP8oRxoNgp11tkN0Yj2mkYu9A3HFDIYpN+dxG /q1+EhCdtDzjWFgOgHWoP2e8MXQRsTGhTU0fbsfydDXihYUNGnGou0a6xxb+z2M543a/ wo/P0nmFv1mplzqaYlTn+K71OF3yaWVoWiIyx8UKAP18HIPA/afPamLclECNvNF6QEOO T+vV02azpzDTkKTtnpppsXj8cEyAS0WGD3BjZiEAgOw5E7RZnkH97ywg/i6B3IgHfgVd UBlgs7qOzRm/uUJUFMJ+xBxBDdfGUPuAhS6vXm8EMG3jjdrwhJQsPxkVkOX/Rmxywjqr DRUA== X-Gm-Message-State: AAQBX9eP4snxlgWgwdqsA4X+5eQeqxm6bt5HdfKa5HOMZDn6jYLQkB1t g51p2CoRTtSL/B1pkRjoZvmsiQ== X-Received: by 2002:a2e:7303:0:b0:2a3:3b80:509b with SMTP id o3-20020a2e7303000000b002a33b80509bmr786082ljc.19.1681380590987; Thu, 13 Apr 2023 03:09:50 -0700 (PDT) Received: from [192.168.1.101] (abyl123.neoplus.adsl.tpnet.pl. [83.9.31.123]) by smtp.gmail.com with ESMTPSA id t20-20020a2e9d14000000b002a2e931fc48sm200482lji.140.2023.04.13.03.09.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Apr 2023 03:09:50 -0700 (PDT) From: Konrad Dybcio Date: Thu, 13 Apr 2023 12:09:37 +0200 Subject: [PATCH v2 3/5] drm/panel: nt36523: Add DCS backlight support MIME-Version: 1.0 Message-Id: <20230412-topic-lenovopanel-v2-3-055c3649788e@linaro.org> References: <20230412-topic-lenovopanel-v2-0-055c3649788e@linaro.org> In-Reply-To: <20230412-topic-lenovopanel-v2-0-055c3649788e@linaro.org> To: Jianhua Lu , Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski Cc: Marijn Suijten , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Linus Walleij X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1681380585; l=3553; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=dc/Dvzhn8dlfyxlg6IxeHxMIzNiaOkMG9FE6LJmww9g=; b=/V/o7X0Ghnkvl0ZAqJzTcC2sDHw0LtDECLQxC6YaVBgZ1QbjHDaQryqxaoyjqtl7NFzPGPAzzXSJ BXCzY5/qBRM/zoLHtArYov4YGep8+aN5xLG+Q+CtClnBrSautTux X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763056579434551977?= X-GMAIL-MSGID: =?utf-8?q?1763056579434551977?= This chip supports controlling the backlight via DCS commands, on at least some panels. Add support for doing so. Note this may only concern the NT36523*W* variant. Nobody knows, really, there's no docs. Reviewed-by: Linus Walleij Reviewed-by: Jianhua Lu Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/panel/panel-novatek-nt36523.c | 68 +++++++++++++++++++++++++-- 1 file changed, 65 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36523.c b/drivers/gpu/drm/panel/panel-novatek-nt36523.c index d30dbbfb67b1..b0466abae812 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt36523.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt36523.c @@ -5,6 +5,7 @@ * Copyright (c) 2022, 2023 Jianhua Lu */ +#include #include #include #include @@ -53,6 +54,7 @@ struct panel_desc { int (*init_sequence)(struct panel_info *pinfo); bool is_dual_dsi; + bool has_dcs_backlight; }; static inline struct panel_info *to_panel_info(struct drm_panel *panel) @@ -679,6 +681,59 @@ static const struct drm_panel_funcs nt36523_panel_funcs = { .get_modes = nt36523_get_modes, }; +static int nt36523_bl_update_status(struct backlight_device *bl) +{ + struct mipi_dsi_device *dsi = bl_get_data(bl); + u16 brightness = backlight_get_brightness(bl); + int ret; + + dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; + + ret = mipi_dsi_dcs_set_display_brightness_large(dsi, brightness); + if (ret < 0) + return ret; + + dsi->mode_flags |= MIPI_DSI_MODE_LPM; + + return 0; +} + +static int nt36523_bl_get_brightness(struct backlight_device *bl) +{ + struct mipi_dsi_device *dsi = bl_get_data(bl); + u16 brightness; + int ret; + + dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; + + ret = mipi_dsi_dcs_get_display_brightness_large(dsi, &brightness); + if (ret < 0) + return ret; + + dsi->mode_flags |= MIPI_DSI_MODE_LPM; + + return brightness; +} + +static const struct backlight_ops nt36523_bl_ops = { + .update_status = nt36523_bl_update_status, + .get_brightness = nt36523_bl_get_brightness, +}; + +static struct backlight_device *nt36523_create_backlight(struct mipi_dsi_device *dsi) +{ + struct device *dev = &dsi->dev; + const struct backlight_properties props = { + .type = BACKLIGHT_RAW, + .brightness = 512, + .max_brightness = 4095, + .scale = BACKLIGHT_SCALE_NON_LINEAR, + }; + + return devm_backlight_device_register(dev, dev_name(dev), dev, dsi, + &nt36523_bl_ops, &props); +} + static int nt36523_probe(struct mipi_dsi_device *dsi) { struct device *dev = &dsi->dev; @@ -730,9 +785,16 @@ static int nt36523_probe(struct mipi_dsi_device *dsi) mipi_dsi_set_drvdata(dsi, pinfo); drm_panel_init(&pinfo->panel, dev, &nt36523_panel_funcs, DRM_MODE_CONNECTOR_DSI); - ret = drm_panel_of_backlight(&pinfo->panel); - if (ret) - return dev_err_probe(dev, ret, "failed to get backlight\n"); + if (pinfo->desc->has_dcs_backlight) { + pinfo->panel.backlight = nt36523_create_backlight(dsi); + if (IS_ERR(pinfo->panel.backlight)) + return dev_err_probe(dev, PTR_ERR(pinfo->panel.backlight), + "Failed to create backlight\n"); + } else { + ret = drm_panel_of_backlight(&pinfo->panel); + if (ret) + return dev_err_probe(dev, ret, "Failed to get backlight\n"); + } drm_panel_add(&pinfo->panel); From patchwork Thu Apr 13 10:09:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 82900 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp936271vqo; Thu, 13 Apr 2023 03:42:47 -0700 (PDT) X-Google-Smtp-Source: AKy350b5S0ofEWdGoMrVmj5IN+hRq8LOw/OIf3FCQw4EOLtxmr4I8wybiF64sdEbh6F9WEfSEr/1 X-Received: by 2002:a17:90a:550:b0:23a:87cf:de93 with SMTP id h16-20020a17090a055000b0023a87cfde93mr1626745pjf.15.1681382567590; Thu, 13 Apr 2023 03:42:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681382567; cv=none; d=google.com; s=arc-20160816; b=YTFJ2CZZ14izIoM4n40ZH0nWU076VXQ4GOPyxlrw33wAGVH371pveZjPDxdYSQMoSh yuf8N/HLbK4wv6U4CMtLSMdoxDESC34u8hxYTtzfq/S5vBF7oFpHcH6IQd7+W/jvNVey rALrT8k/YPyNOrluU/J4xEFY3A2LKFb+OlYVvfWMlwDez9gmByot6w11z2JdQ5+6ha9U u2WQ9ePvNEbOm/sYBccN75pEq42pdWmFuxhOf7iAS/HeWzZ6RE21CkvtiGcnIaHj+iFa S3eV9Iq37u67mV/JHTDQr0fvcuVceJpmoZgD1CaK67JOzjvqnKGJ4lcv/bmn0nfj/FeF 5Rtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=vfZDVg8acR2SKXDmnGE2uGGT4RT4YcuN/C99IcV99uQ=; b=qo6ZPjxH0+lHhY0lbptyY6pBl75BAcCoVCngJUb6yAvkZuc2Za/QcomPk79upATxD+ JWMkBAhtV0sMmknUtBKY41A26HPfMuOZByECHMOM1Zjm1mexEQnkrd2Ogqh6agDVAybf c+fAgU6a3dKsrJJRStLVF+i2oqh/ug/iiRD7WTRaSYVSMNFEExdoSPAlnGSUhVQmGxxH mZP3DzkD6hzt9bmCYrB0TDOoKlMDUwTaerYSejl1SFBipbdWTlyLbPGTA6Mi1Q8YtFm1 C94j7i6yG3K+Zq2WAT0A6hZt59bOXEjv879cNDpyXz2g6+W2HcTFIK0rJBSj+Obz1dl8 RvPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yoIZyZsf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id my14-20020a17090b4c8e00b0022bbae722fcsi7030064pjb.1.2023.04.13.03.42.35; Thu, 13 Apr 2023 03:42:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yoIZyZsf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230265AbjDMKKW (ORCPT + 99 others); Thu, 13 Apr 2023 06:10:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230306AbjDMKKD (ORCPT ); Thu, 13 Apr 2023 06:10:03 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E8C5975D for ; Thu, 13 Apr 2023 03:09:54 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id z26so14363726ljq.3 for ; Thu, 13 Apr 2023 03:09:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681380592; x=1683972592; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=vfZDVg8acR2SKXDmnGE2uGGT4RT4YcuN/C99IcV99uQ=; b=yoIZyZsf2D48M0on5TQwKa4YD+zSyd27GfpCqwZLEslsnC5xR1+CAWvy4JxDSt3+Rr nMhmrRR3yV/xYyaaHllXKEP0RixpqM5Rz0d2xDlMV/CT3uXpFuQcfio6uQV6STeOb32n g2Ddfbmv+ssGXCaTM7plOi6U4hkLm/EeWbZAT8JqE3Cy7x4UTZB7MC0dmbup5+gqhpOK cC7j3GZC8CVl40Lj/uCdtEwKWA0bo8N9x4C/Ex7yczjy3RR4hxUtbXXMs+KkOjR+Nooy nJxog04TpTbI5oERIgGSjFZO4TiQuF7f7K3vjlmSRTublVe6J9gMumQm54NzF/TJkLKX X6mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681380592; x=1683972592; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vfZDVg8acR2SKXDmnGE2uGGT4RT4YcuN/C99IcV99uQ=; b=ikijrIavf/ttIfMCyMhGykMlFJn1RoMUI5Yc4/Yl7hIwlw1bAMWuvRR5PQEwLC78co aG9mtZAuW6HQozzLi0c4GyrcyckxWRaP/wwXmWx/RNNcg7zXdeoCzEPWmWuZyatYUkN3 BG8SfrskWituXRew6QmnJX80huTFvZJTLJAPkALJ+e4iFqdXqk/ojeEyrTNS1xmBrFyU 76xXklThH9KGRvjFYOAZAegS67MSbVEt+pi4ERMmTAEorEhfY1jkNjUXGZ5D08H1qOtA 9E0uwJ70z3HrQVuRyfW2DGlmJ5uYd2CtFsqHh7bghKOI3judTZx5qp0kL5Peb01nCllN wLkQ== X-Gm-Message-State: AAQBX9f2/AQHRsUsdGmh2BYqGUs8wJviEzKc5oX+zJJZdHQMRS5Fwi1E EqGEJp/VhNO5em6+v8bahrq+nA== X-Received: by 2002:a2e:81cb:0:b0:2a7:7493:9966 with SMTP id s11-20020a2e81cb000000b002a774939966mr495603ljg.24.1681380592573; Thu, 13 Apr 2023 03:09:52 -0700 (PDT) Received: from [192.168.1.101] (abyl123.neoplus.adsl.tpnet.pl. [83.9.31.123]) by smtp.gmail.com with ESMTPSA id t20-20020a2e9d14000000b002a2e931fc48sm200482lji.140.2023.04.13.03.09.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Apr 2023 03:09:52 -0700 (PDT) From: Konrad Dybcio Date: Thu, 13 Apr 2023 12:09:38 +0200 Subject: [PATCH v2 4/5] drm/panel: nt36523: Get orientation from OF MIME-Version: 1.0 Message-Id: <20230412-topic-lenovopanel-v2-4-055c3649788e@linaro.org> References: <20230412-topic-lenovopanel-v2-0-055c3649788e@linaro.org> In-Reply-To: <20230412-topic-lenovopanel-v2-0-055c3649788e@linaro.org> To: Jianhua Lu , Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski Cc: Marijn Suijten , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Linus Walleij X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1681380585; l=2068; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=pdWLeHccDvo0CLmZJATdV9aHqMgeBmhMVIeYiCuYKCc=; b=J9jLVmM5Fmo3NkhY+AmFIW8debKry7SOp7UC2XycgFy9HPrtm6VIgt5CvlaTp8ztLNMed3i/i53X /XFPdc++Aqs2x94p5vy+Ed6jqzlhe0OrlR3YG8C9+uheXp6Oa1Ul X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763057407423678379?= X-GMAIL-MSGID: =?utf-8?q?1763057407423678379?= Some bright vendors mount their display panels upside down. Add the required pieces to allow for accounting for that. Reviewed-by: Linus Walleij Reviewed-by: Jianhua Lu Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/panel/panel-novatek-nt36523.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36523.c b/drivers/gpu/drm/panel/panel-novatek-nt36523.c index b0466abae812..2c5712ac3037 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt36523.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt36523.c @@ -31,6 +31,7 @@ struct panel_info { struct drm_panel panel; struct mipi_dsi_device *dsi[2]; const struct panel_desc *desc; + enum drm_panel_orientation orientation; struct gpio_desc *reset_gpio; struct backlight_device *backlight; @@ -674,11 +675,19 @@ static int nt36523_get_modes(struct drm_panel *panel, return pinfo->desc->num_modes; } +static enum drm_panel_orientation nt36523_get_orientation(struct drm_panel *panel) +{ + struct panel_info *pinfo = to_panel_info(panel); + + return pinfo->orientation; +} + static const struct drm_panel_funcs nt36523_panel_funcs = { .disable = nt36523_disable, .prepare = nt36523_prepare, .unprepare = nt36523_unprepare, .get_modes = nt36523_get_modes, + .get_orientation = nt36523_get_orientation, }; static int nt36523_bl_update_status(struct backlight_device *bl) @@ -785,6 +794,12 @@ static int nt36523_probe(struct mipi_dsi_device *dsi) mipi_dsi_set_drvdata(dsi, pinfo); drm_panel_init(&pinfo->panel, dev, &nt36523_panel_funcs, DRM_MODE_CONNECTOR_DSI); + ret = of_drm_get_panel_orientation(dev->of_node, &pinfo->orientation); + if (ret < 0) { + dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, ret); + return ret; + } + if (pinfo->desc->has_dcs_backlight) { pinfo->panel.backlight = nt36523_create_backlight(dsi); if (IS_ERR(pinfo->panel.backlight)) From patchwork Thu Apr 13 10:09:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 82898 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp932883vqo; Thu, 13 Apr 2023 03:35:02 -0700 (PDT) X-Google-Smtp-Source: AKy350ZnBzVBDFAySls0svZfZD4fTyLjEDw0vDmnXGtnbNoaV7rQQrLosHtJykuHsiYfUzlubclY X-Received: by 2002:a17:906:68da:b0:94e:80b2:51e3 with SMTP id y26-20020a17090668da00b0094e80b251e3mr3287927ejr.27.1681382102558; Thu, 13 Apr 2023 03:35:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681382102; cv=none; d=google.com; s=arc-20160816; b=PeEn8NQvrhXiAvA0v5cNMt9syatcnqcRY1a7IRiIG0AN/L4mT0B3/ssOJrxp85qat1 IGXlJ7jRHwLIIVoLX/i9mTOkcaUr93RuN3F3D2gqgQwdLhkVi7pU1SSfHBbbsTKEbLVb Q3IqoqOaIi+Q3yIBAT/NpNC3znSWOwkfuZ0SAv4pRmD3T0vrtWnZHfIlowbglp+gDgl9 MORhtH5PRpv1ZxmhKfILXJYmlH1V3g+57fTtnAQ65eZFHrSsn+QSr4GJObnEM91qr7DK o60W3jo4groX1X3jauCYjatSltFd4CElyGfWgIQUaffkxHA0syNcTnKv9+CEDPruPulR kf1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=EKbG0++H3xbVFVaOPyRrEAbbHRNYZ849A4wa8ugtNII=; b=o4M9nmU7VdUuRp1GMnPQHbfdVLtdwynjoWM1DMX3MvlHpKN9FzhIhyxco7Wha7o7ly FONxQvWvSFF66VAEt6z/MESDhu61ivacjgtr1+NKq/zVuspMjG12d3GiukyjjEiOXDTa kP0akZW68mFKi5xGPpRiGJpyY6O9m0HwhrviD+8zDJGJ5LrWvI6UkLun6VIcbrjBhh3/ fHSE2oF2SZuLCGUoRYIerHgPfolUefCL+DV8y8V81PXGTvzrL/q/hVK/KfOECs0iM+oV 6fAOU9d+2j82oj26EewhnV1ErB7iN+k8rRq+avktW85f7UmTCNCqQzjnlBjeZRKE16SU ew0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ThO1LzD5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ka22-20020a170907921600b009311b97abe3si1438072ejb.112.2023.04.13.03.34.36; Thu, 13 Apr 2023 03:35:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ThO1LzD5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230401AbjDMKK0 (ORCPT + 99 others); Thu, 13 Apr 2023 06:10:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230315AbjDMKKF (ORCPT ); Thu, 13 Apr 2023 06:10:05 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D625A9ED0 for ; Thu, 13 Apr 2023 03:09:55 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id bx15so12905087ljb.7 for ; Thu, 13 Apr 2023 03:09:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681380594; x=1683972594; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=EKbG0++H3xbVFVaOPyRrEAbbHRNYZ849A4wa8ugtNII=; b=ThO1LzD5GUl5+TgJbsoVcKM/qNLCB/hqoha+v0ORbBzy1YDDbKE8aMFehj3J9adsTK qVdtpAbstd1R6qNnunfTJlGwxOb+MhGcfiEwIHvrXSCw4UauAdYkxlFBCUU1sd75M0pq v2KmiV6DEVPpOEJgmzCHgh29f0EbJ/wS/85TcunFSh1ekjlibM99nIo2KcTbxvrSAnh+ ddulP/WvLkAcUw+iRMgvs89tiKzKiEl1s4K+pNO0psyKCBJ7rB+8FtmtKI61us6kfKR7 bhKyh7IuDextmjYVbzaftyA21T6Qw1sRqyFF4zzB7nN1tDlE3I00lOk37hiAgXoR1tAT XJJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681380594; x=1683972594; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EKbG0++H3xbVFVaOPyRrEAbbHRNYZ849A4wa8ugtNII=; b=fDCAJFAoKxLUJApwlSNtcon13Yfls70DF8ft7BHVfEOY8ZkEUDSTW5bRDoIrUMlUq0 T59FTuV5NN1sEF3fnPETVr1+ZKlj44G450c+4/ZdE72faiaRz5w8Q06dz310p5iYZl6g 6Fwbxu8t194uoNljjUIscCS2CmTIqI/B3mbTGpUPbSr0gV54H/F01+8SOoWRVGBZutOG Accqa8vaYs7IKfi07Tlu4RT2eI3mUdf816V6FdD5pC1ZnEC51FL6OfBZlMrLZRrPRAZ6 942tSO1Mnvox8u9khntXjUT34bamrg3wxMGuIdu/69wxhM9MaA8PRWtEci40FmxK4+/L +w6g== X-Gm-Message-State: AAQBX9c7Utc4adzkqG+AVbaUrohqTL88qo6sJitaVi/mrrD5S3ZmzJdI BDfz8FnKbQPTKWzXRyYwpvQUrA== X-Received: by 2002:a2e:b173:0:b0:2a2:d541:5d34 with SMTP id a19-20020a2eb173000000b002a2d5415d34mr477068ljm.17.1681380594000; Thu, 13 Apr 2023 03:09:54 -0700 (PDT) Received: from [192.168.1.101] (abyl123.neoplus.adsl.tpnet.pl. [83.9.31.123]) by smtp.gmail.com with ESMTPSA id t20-20020a2e9d14000000b002a2e931fc48sm200482lji.140.2023.04.13.03.09.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Apr 2023 03:09:53 -0700 (PDT) From: Konrad Dybcio Date: Thu, 13 Apr 2023 12:09:39 +0200 Subject: [PATCH v2 5/5] drm/panel: nt36523: Add Lenovo J606F panel MIME-Version: 1.0 Message-Id: <20230412-topic-lenovopanel-v2-5-055c3649788e@linaro.org> References: <20230412-topic-lenovopanel-v2-0-055c3649788e@linaro.org> In-Reply-To: <20230412-topic-lenovopanel-v2-0-055c3649788e@linaro.org> To: Jianhua Lu , Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski Cc: Marijn Suijten , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Linus Walleij X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1681380585; l=22582; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=a+KroKy76h4Z+iWZU936x+V3O3+qF0O8kFg1bcYLy8k=; b=5UhufzRL+Mw2BPxERcEopM+ykXt8KXnuM/h+5eueYbv/mFXmhsetOixMyZIcBN3rWcwmjMFI0mdA f3dp/vwUAqdhE8ONDujDv7q4afGc5S/UBtUK1E64vTPFW27sjsWN X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763056919919416815?= X-GMAIL-MSGID: =?utf-8?q?1763056919919416815?= Some Lenovo J606F tablets come with a 2K (2000x1200) 60Hz 11" 5:3 video mode display. Add support for these panels. Reviewed-by: Linus Walleij Reviewed-by: Jianhua Lu Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/panel/panel-novatek-nt36523.c | 486 ++++++++++++++++++++++++++ 1 file changed, 486 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36523.c b/drivers/gpu/drm/panel/panel-novatek-nt36523.c index 2c5712ac3037..c3befa7f253d 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt36523.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt36523.c @@ -13,6 +13,8 @@ #include #include +#include