Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp752719rwb; Thu, 22 Sep 2022 06:07:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7AVo3owwSdxrB/VcE6WEdhZBwpLUpVmFYUKNYLmMs4gNVDTFCJbjxV9L/PR9qHF2HpciQJ X-Received: by 2002:a17:90b:4d81:b0:202:d535:d324 with SMTP id oj1-20020a17090b4d8100b00202d535d324mr3610195pjb.133.1663852031409; Thu, 22 Sep 2022 06:07:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663852031; cv=none; d=google.com; s=arc-20160816; b=nv8FI9LM02RgJFpjx+1iGsemPmXj+63q2AvKSvwtI4r8KwiuYrg0SWIjiqvibvQ0Zn lmDo2glxDy1V7uxlWSRFU7ID8lix9kVYVx9fWF+eIeJqYR03JH4RWPMz2AQoCVAL+TeE k5JvOUPmjwvDIU6a/V3Set8qYQWshxUGpZTOGLpoCEoVfFUbr1Qbkmwu7lzwrftUrb9h HSZFYAcyiQGlhlR3cr8MBtEMA3Yp7f4wTrlA2xNfRzV+cPZR3hb+aqJIPsD03BITg3v9 ztNf/oJu3nzclEV1fRAPwIxmgcJr093RjGfLTyy54mXa+HulBusdkQsfeE3xpE3QdASz jQaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mLgr2DKdBMe7YZHHQDne6udopehh+XBHiXL2l7Zin9E=; b=qhgH8S65NdzCVustGxAN6kvdYJvj8zyprOyyOCMYgLy4NQP2BrsEm4uuEnL2I8Dblw i90Mdt8rH2hvSiI4QCX3gRb6GzDTWHn1dKv3UkKi3RVqdiyTZCc0b6EcV9s6lAZIwmsH H5dttXNUOibYJICkhsq4clpvVEHS41X1TK0/Ug4xSdP41pXJPr308bChVQkSqIk0Y6sc Cg5LC1qohAe4zT8pHNc1oPPJGPzUWemildQ+XbflpNtf7fSBhMxWEYNgTyrrnRiiI675 K/Ss8dW0ddfsi+0hWjaro56mEAdyDMgSMm+VtE4oZCSqATSRA1J6XiBZwuLJqQxWeXct 2l0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pschenker.ch header.s=20220412 header.b=gqXxNIlL; 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=pschenker.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d13-20020a056a0024cd00b0054ed3047ee2si6498923pfv.22.2022.09.22.06.06.30; Thu, 22 Sep 2022 06:07:11 -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=@pschenker.ch header.s=20220412 header.b=gqXxNIlL; 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=pschenker.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231682AbiIVMxE (ORCPT + 99 others); Thu, 22 Sep 2022 08:53:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231582AbiIVMwt (ORCPT ); Thu, 22 Sep 2022 08:52:49 -0400 Received: from smtp-8fa8.mail.infomaniak.ch (smtp-8fa8.mail.infomaniak.ch [IPv6:2001:1600:4:17::8fa8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F2D6E7C2E for ; Thu, 22 Sep 2022 05:52:47 -0700 (PDT) Received: from smtp-3-0000.mail.infomaniak.ch (unknown [10.4.36.107]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4MYFLs5Y7wzMpp4G; Thu, 22 Sep 2022 14:43:17 +0200 (CEST) Received: from philippe-pc.toradex.int (unknown [31.10.206.125]) by smtp-3-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4MYFLs37m5z3g; Thu, 22 Sep 2022 14:43:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pschenker.ch; s=20220412; t=1663850597; bh=txqoeLVu69b7SOW8ljUizaUSKTWyveLWsrFwR5lKTZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gqXxNIlL6AAoK9a3rCfNjZFvJTXM3EeeCKG/LoCE4RdufGOn/vPayg6nQVe49HvJl Z/bsE+axEzj4hajsbXbHi6l4pzFUNCxYMfVmP+Tqd62wgbZpybTU/8eEnFPQRibe1x yR+jMUzfDnQTgZLF0ESsMRtggq/eurbjkk/cKXxQ= From: Philippe Schenker To: dri-devel@lists.freedesktop.org, Adrien Grassein Cc: Jernej Skrabec , Jonas Karlman , Robert Foss , linux-kernel@vger.kernel.org, Daniel Vetter , Neil Armstrong , Laurent Pinchart , Andrzej Hajda , David Airlie , Francesco Dolcini , Philippe Schenker Subject: [PATCH 4/4] drm/bridge: lt8912b: clarify lvds output status Date: Thu, 22 Sep 2022 14:43:06 +0200 Message-Id: <20220922124306.34729-5-dev@pschenker.ch> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922124306.34729-1-dev@pschenker.ch> References: <20220922124306.34729-1-dev@pschenker.ch> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Francesco Dolcini Add comments on the lt8912_write_lvds_config() config to document the current settings and to make it clear that this is a hardcoded configuration not relevant for the HDMI output (could be removed without affecting the HDMI port). No changes on the actual register writes. Signed-off-by: Francesco Dolcini Signed-off-by: Philippe Schenker --- drivers/gpu/drm/bridge/lontium-lt8912b.c | 26 ++++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/bridge/lontium-lt8912b.c b/drivers/gpu/drm/bridge/lontium-lt8912b.c index 5968f4af190b..3e870d45f881 100644 --- a/drivers/gpu/drm/bridge/lontium-lt8912b.c +++ b/drivers/gpu/drm/bridge/lontium-lt8912b.c @@ -165,24 +165,32 @@ static int lt8912_write_rxlogicres_config(struct lt8912 *lt) return ret; }; +/* enable LVDS output with some hardcoded configuration, not required for the HDMI output */ static int lt8912_write_lvds_config(struct lt8912 *lt) { const struct reg_sequence seq[] = { + // lvds power up {0x44, 0x30}, {0x51, 0x05}, - {0x50, 0x24}, - {0x51, 0x2d}, - {0x52, 0x04}, - {0x69, 0x0e}, + + // core pll bypass + {0x50, 0x24}, // cp=50uA + {0x51, 0x2d}, // Pix_clk as reference, second order passive LPF PLL + {0x52, 0x04}, // loopdiv=0, use second-order PLL + {0x69, 0x0e}, // CP_PRESET_DIV_RATIO {0x69, 0x8e}, {0x6a, 0x00}, - {0x6c, 0xb8}, + {0x6c, 0xb8}, // RGD_CP_SOFT_K_EN,RGD_CP_SOFT_K[13:8] {0x6b, 0x51}, - {0x04, 0xfb}, + + {0x04, 0xfb}, // core pll reset {0x04, 0xff}, - {0x7f, 0x00}, - {0xa8, 0x13}, - {0x02, 0xf7}, + + // scaler bypass + {0x7f, 0x00}, // disable scaler + {0xa8, 0x13}, // 0x13: JEIDA, 0x33: VESA + + {0x02, 0xf7}, // lvds pll reset {0x02, 0xff}, {0x03, 0xcf}, {0x03, 0xff}, -- 2.37.3