From patchwork Fri Aug 20 07:01:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: cong yang X-Patchwork-Id: 12448515 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=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 2503DC432BE for ; Fri, 20 Aug 2021 07:01:27 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 E26BF6056C for ; Fri, 20 Aug 2021 07:01:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E26BF6056C Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=huaqin.corp-partner.google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 98E176EA0A; Fri, 20 Aug 2021 07:01:25 +0000 (UTC) Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by gabe.freedesktop.org (Postfix) with ESMTPS id BCF9788EFF for ; Fri, 20 Aug 2021 07:01:24 +0000 (UTC) Received: by mail-pf1-x435.google.com with SMTP id w68so7796782pfd.0 for ; Fri, 20 Aug 2021 00:01:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=huaqin-corp-partner-google-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SUMawJHmaVN55KeOYmXXMpF4IBtsM0ibJxP9InePT3U=; b=cfe6F5qj4Jt8nPTB++3EMFD13LSQnCt5W1T7f+nwsURdPyOaoxWkxK7ejV+/TjBlAl 286JuFT2TbviR0Cs5FyNTtow/dF8i1BlTSzUO6wkREDHIv/DCE/MHXI4bHAZ2mbjvPhh uYIpW50HZ5tT7/oBPSXBEBvY3oQAID92EeidFuzrMgQ/BBeD5EHPm1CFQ8rggIBs9cqF Cjq/kSSiQJVH9FZgkARy+9qk/tViJXQ8s7yzVRPtEW8EQZt4mXf2nQaLgQjj93U9tocp MEzYx91Bton4n8yRa5xhzSE0OTpzrv0sqqwwCnzOjRgs+5L8CWzViJx1ycpYOC6EkaRJ DS3g== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=SUMawJHmaVN55KeOYmXXMpF4IBtsM0ibJxP9InePT3U=; b=qqQnzVgm5ZXzP2GEWQJfYe5Wiv+A8ArZxMxB2bbKwncgiopWzKtbMHiFz/Tw8Uhnh3 HH7D3sARUVixXT0wTugX97/8Z++xz0YW29q6eQLzFu2+3rCGrd4bF01O6vE9sjtUiGT+ pdasSDRLMp7j5gtsdXvW3BHvIMWZ9EsEGfJ+cRujL/7moKeJ8+QrB1gFQwsmUyFwIPQD DGP6o1wBSEGZ+jQpjZ44pjh/UgFiFPwlP1tY0F2xyoUSuSnNba18sm9Wr3kJ4DKh1Ma+ XuSSZwSzgczViNyvnxR9KJOWgaEJK5rWwqBarXKiliDxNxD+UuNOJkqjZFhvdIZH22vh ihhw== X-Gm-Message-State: AOAM533q5yGOckS1pJ4nd1k1nbFXkVPbZWqm/jzL2425nQip5NgZKwb4 fyClFz6AXOYY75lLLo4xC4IiCQ== X-Google-Smtp-Source: ABdhPJyeGT6KbMX012SXazmmab55jR0ikCRDZYBVmA0rKhnqaVvU8NoigSCgtzgl1Nc867PUNRYxvw== X-Received: by 2002:a63:125f:: with SMTP id 31mr17473334pgs.98.1629442884410; Fri, 20 Aug 2021 00:01:24 -0700 (PDT) Received: from yc.huaqin.com ([101.78.151.213]) by smtp.gmail.com with ESMTPSA id hd21sm10539997pjb.7.2021.08.20.00.01.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Aug 2021 00:01:24 -0700 (PDT) From: yangcong To: thierry.reding@gmail.com, sam@ravnborg.org, airlied@linux.ie, daniel@ffwll.ch, dianders@google.com Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, yangcong Subject: [v2 1/2] drm/panel: boe-tv101wum-nl6: Support enabling a 3.3V rail Date: Fri, 20 Aug 2021 15:01:12 +0800 Message-Id: <20210820070113.45191-2-yangcong5@huaqin.corp-partner.google.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210820070113.45191-1-yangcong5@huaqin.corp-partner.google.com> References: <20210819124844.12424-1-yangcong5@huaqin.corp-partner.google.com> <20210820070113.45191-1-yangcong5@huaqin.corp-partner.google.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The auo,b101uan08.3 panel (already supported by this driver) has a 3.3V rail that needs to be turned on. For previous users of this panel this voltage was directly output by pmic. On a new user (the not-yet-upstream sc7180-trogdor-mrbland board) we need to turn the 3.3V rail on. Add support in the driver for this. Signed-off-by: yangcong Reviewed-by: Douglas Anderson --- drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c index db9d0b86d542..9a644433629e 100644 --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c @@ -45,6 +45,7 @@ struct boe_panel { const struct panel_desc *desc; enum drm_panel_orientation orientation; + struct regulator *pp3300; struct regulator *pp1800; struct regulator *avee; struct regulator *avdd; @@ -511,6 +512,7 @@ static int boe_panel_unprepare(struct drm_panel *panel) gpiod_set_value(boe->enable_gpio, 0); usleep_range(5000, 7000); regulator_disable(boe->pp1800); + regulator_disable(boe->pp3300); } else { gpiod_set_value(boe->enable_gpio, 0); usleep_range(500, 1000); @@ -518,6 +520,7 @@ static int boe_panel_unprepare(struct drm_panel *panel) regulator_disable(boe->avdd); usleep_range(5000, 7000); regulator_disable(boe->pp1800); + regulator_disable(boe->pp3300); } boe->prepared = false; @@ -536,6 +539,10 @@ static int boe_panel_prepare(struct drm_panel *panel) gpiod_set_value(boe->enable_gpio, 0); usleep_range(1000, 1500); + ret = regulator_enable(boe->pp3300); + if (ret < 0) + return ret; + ret = regulator_enable(boe->pp1800); if (ret < 0) return ret; @@ -767,6 +774,10 @@ static int boe_panel_add(struct boe_panel *boe) if (IS_ERR(boe->avee)) return PTR_ERR(boe->avee); + boe->pp3300 = devm_regulator_get(dev, "pp3300"); + if (IS_ERR(boe->pp3300)) + return PTR_ERR(boe->pp3300); + boe->pp1800 = devm_regulator_get(dev, "pp1800"); if (IS_ERR(boe->pp1800)) return PTR_ERR(boe->pp1800); From patchwork Fri Aug 20 07:01:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: cong yang X-Patchwork-Id: 12448517 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=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 58538C432BE for ; Fri, 20 Aug 2021 07:01:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 2CF3661053 for ; Fri, 20 Aug 2021 07:01:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2CF3661053 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=huaqin.corp-partner.google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 521FB6EA0B; Fri, 20 Aug 2021 07:01:30 +0000 (UTC) Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by gabe.freedesktop.org (Postfix) with ESMTPS id 383CC6EA0C for ; Fri, 20 Aug 2021 07:01:29 +0000 (UTC) Received: by mail-pj1-x1036.google.com with SMTP id n13-20020a17090a4e0d00b0017946980d8dso13130168pjh.5 for ; Fri, 20 Aug 2021 00:01:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=huaqin-corp-partner-google-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=l5UjOdchXs6TvxgAlQ1PtdmA7+D4r3Icdkw2qZVkuTU=; b=aRMqUWS9nLpM5yOQ2nBhEQWrqnbF6ihk1Ki2ziRxoUM+rPLnRsSaqM/R7hV8G4rdur 0bjhHww20DxAsIgcXxsBfZg6LeWJVPTeUv8SN/c9Exu1+eeKfmpsHZd6I/07fL1Q9DY3 KRpVc70rOeFP/CjBzkw/jA9sTIpKG0u8y0Z4EbnxjA9cdodzNHtIhPEROAt21KI1XX4u s0gPTnKX0lNwDCzhOTSIm7pC+i/8Xb2vrBiap/quu53iG6r8dWH+cGqwWww8yj9asUIq GrZvyl5cIJiYeNMhqzQqt6MB9PyxGn7UGio+ES58f4FqiuYBXTvyHTsOM6ws161DAXgR TMFg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=l5UjOdchXs6TvxgAlQ1PtdmA7+D4r3Icdkw2qZVkuTU=; b=Za0AGkI+R6m3k98YR1YrzC7DVyxiX4RhMNC07I67d19Jap7vSdxyFcMV+IZDB2bxJo Qyd/CrAkPhvLabezQjDVQaHUS6xGFcAHIViGBV+dhS9W+56/GVtsVS9Vp8zutvfHi6fU I/LAhTMIfrjC4u2eBUNp/pcN7lBFIRvroYMsujx2IPZ0QCS464BJBmyO/uzqkuK8ocFv yPBv8nktSC3/ccdaVoHY7qwjSkPcB5YLqbL3d++RjnLSFr9cuP4z2w/98cNxeEgmpnCk k5+5wQs/IzyG57xiMps0nKqDOonNnaHxw75pxpGg3bUHNrEitxTgNh0nCblk29Tieha3 ISVg== X-Gm-Message-State: AOAM532R4MoZpy8xf3GnpgxuWEPxgB+DGl+rWXqkCh6jSj06Tl/rGRpb /fMAMryZ0dSj1SAX5fySu07/+w== X-Google-Smtp-Source: ABdhPJw2zK3S5b1K/1RwQ6A2/7zXhDLmaX5knLzuXE8Gd+zanyl8DH9ZUOSigjP9IuNEoySH7yknnA== X-Received: by 2002:a17:902:bd07:b029:12c:f4d5:fc6b with SMTP id p7-20020a170902bd07b029012cf4d5fc6bmr15315683pls.31.1629442888807; Fri, 20 Aug 2021 00:01:28 -0700 (PDT) Received: from yc.huaqin.com ([101.78.151.213]) by smtp.gmail.com with ESMTPSA id hd21sm10539997pjb.7.2021.08.20.00.01.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Aug 2021 00:01:28 -0700 (PDT) From: yangcong To: thierry.reding@gmail.com, sam@ravnborg.org, airlied@linux.ie, daniel@ffwll.ch, dianders@google.com Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, yangcong Subject: [v2 2/2] dt-bindings: drm/panel: boe-tv101wum-nl6: Support enabling a 3.3V rail Date: Fri, 20 Aug 2021 15:01:13 +0800 Message-Id: <20210820070113.45191-3-yangcong5@huaqin.corp-partner.google.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210820070113.45191-1-yangcong5@huaqin.corp-partner.google.com> References: <20210819124844.12424-1-yangcong5@huaqin.corp-partner.google.com> <20210820070113.45191-1-yangcong5@huaqin.corp-partner.google.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The auo,b101uan08.3 panel (already supported by this driver) has a 3.3V rail that needs to be turned on. For previous users of this panel this voltage was directly output by pmic. On a new user (the not-yet-upstream sc7180-trogdor-mrbland board) we need to turn the 3.3V rail on. Signed-off-by: yangcong Reviewed-by: Douglas Anderson Reviewed-by: Rob Herring --- .../devicetree/bindings/display/panel/boe,tv101wum-nl6.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/boe,tv101wum-nl6.yaml b/Documentation/devicetree/bindings/display/panel/boe,tv101wum-nl6.yaml index 38bc1d1b511e..a7091ae0f791 100644 --- a/Documentation/devicetree/bindings/display/panel/boe,tv101wum-nl6.yaml +++ b/Documentation/devicetree/bindings/display/panel/boe,tv101wum-nl6.yaml @@ -36,6 +36,9 @@ properties: pp1800-supply: description: core voltage supply + pp3300-supply: + description: core voltage supply + avdd-supply: description: phandle of the regulator that provides positive voltage