From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.52 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796263666; b=ZVkhDfyyWxj2yK8H3GlVNsu8wFCymcXcobDZrvOa3PE6h9T70IlWc12E2oKJ1WaC0axn q4Ye/Qp+M11xQ4mhZHiU3uis6MQn8ik6oOcf6EE1idYWwu2nZ3+t9SQ6FvIiYF69qAoFT e4fJG6PeSpEBHI1lLqfFuwJBs4izzo+RLqoAMPBACA8SVdgMIKF5bdaHSD7xh7mOykth1 lNegQvaUfAPAaNJZ+JrH6mPBPsNg7KX0z7qhguQWjQ/Nw6VviCSKPUOYbb7LrCLlkoKqu X4qJXiPBuHPIPKcYS3gOwMgQbofrQ9EvwHN0P9SJssxO3xrRy/yFRd/4iY/OMEmwjhw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796263666; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:References: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=ARBJp4ErneWvzMUB/ML3e2eK+pFcYRZESo8b8DSm1/k=; b=DD737s9MabLZmG+39RbG/mR0yM2WmYRgxyosSaZRyIf9SXdEaT0wn6jLAzzcX7VqaSFe HZDzos7xCC7639ro70cdm91kR13Wux2FEEEmYaEYq4Wnlx9H1RoQCyFBZp6aG38gnEZRD ke7GcWrcBN6sBNIB7t+IS7TUp2fA8FdcyAnGRlzjk9/ZEgtOvlhZvRehvJqdrQHzHGjac 9E5DvO0GMVR55mpAiMzxxmV2oD+HaXTBA3DemM2L7khVqBBXcdxPvWbGwvaONGFa/S7uw OQM26diqydI3oCJG3jFD1sXZiANyI49RFRPyQ5LjNM1OQWIaHSmH3PbVoJTpLhlXLdQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=hukFzmRP; arc=none smtp.remote-ip=209.85.128.52 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 03B9F606A32F for ; Thu, 3 Dec 2026 02:07:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 03B9F606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=hukFzmRP Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4bbd2c5931bso19587635e9.2 for ; Wed, 02 Dec 2026 18:07:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796263664; x=1796868464; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=ARBJp4ErneWvzMUB/ML3e2eK+pFcYRZESo8b8DSm1/k=; b=hukFzmRP8+uZPNvYVf63IFKjYYgaajFDo24a8Texaezy5pybVSH2xML05DPTqfVNqv jbcuWD8dpjN9EPeKbjY7g2j0lIswRs17rmf7Y0qhbi5ht0/5d6laUqQmArMPih3KFnYi onKOdN1CwFGJWnRyRG0TCOafPdwL+0bvtz875wWs9Pj1/o22kZhOg5SUrs3G9T6KqjW9 IPHz18OiV2osQ68k867wOFwbO2ytLV0gek9mvxEcgF2qBzBTbFBGNseMXWtBhG5bcsIv jgUg37hA5OeZPPCCwkffXYQyDngk7/MLYuDUHDfvxA/V3n1r+nifMjZl9clK7rAhdp9b WByA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796263664; x=1796868464; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=ARBJp4ErneWvzMUB/ML3e2eK+pFcYRZESo8b8DSm1/k=; b=kxYJgkosVg0W80meLTMSFgTARtLDvV/nTTIfj7jhUjUPc5bNMfEpOV78wEJvrwU/nj /I6Ti8ap5ir2ilVihRiysE1d/MSGF/EvG+YFhFyk0TugiL1SyaTLf2wyoayGf03e0Mll Cm3HiYm84rNfMJeX23708J8WU2pk0mHVs8wdwIfZpZJ/FWRP5g1DIDOfASz+n5fEKdNL MP9/MOa4LuJ/jhW1U3ihVll1fd1Q+e3rqcNjTxNEuvHyL6a+WBzkH8O3TSCGTMYUBkaV uS5YcUzNU2d1zVe12dq/18W8QQZ90nlWDsG2azSL4fj0pwwyj1FlHe2RgrYOQPSVNVaB Im6Q== X-Forwarded-Encrypted: i=1; AL+hErHANGidgDU5qk4JGu+V0QHIgmpveMzf3uLJKBkqMeNlVhTS/a1fppNnqSk1/hhke5nnc8f1Qonb2avb@vger.kernel.org X-Gm-Message-State: APuU4Z9h0KYYenesKPzYkxnTDvoaU7QCv/TwbFl7vtrSXuvwj4DwzCGi mi2S7dFHx+JsL3gCo8BKkUAXk3mjtKb1oMBbktPEEzZ93IlTNBXUTxI= X-Gm-Gg: AZFdTZeesJZFDJcmd0dTJseiQwWjmZaHSbeqDqU6bau3n2ZmrMn/3d7bPHRAFQvdwSk hUDz0uhn9G/FSqPFtYZXbXLvvarOLgITyL6LeaJGDiqUXTbbxhJW8QgD48Xzq6y7yIcLgmsSJcS RIoKG+2dmSi9+YsZ6EU01vGKP0eXol112h8VOCWQyJ+4Yu/UtLOsGKZg5azvZL53+MjbfmejOyL LpW/rASFcmHEkkpJO0XrejQTK2PsLEYDwBKy4X1+6rdysMLC5XBD5pqgj26hrJceLvUpM2dXh8s PWY94Ns6vAbxnxIbClK47WjSftkftxYHV12gehTK6BUBNw0taFpcRgM2OjE3NvDhw9YspGOan9s eA3kRu5mBFASaWdY274mRSOHZ9LEhMrPVcytSgi7Krm7dSG6JqSW6ea2DyhjVBuf8QXFu/m/D2D 91+r5JiysLp0ke37eB5maXr8x5X7tY66tLRxKzZsnnFxl66kdtqepYoI6n6qd3X0NcPndfAsstz ohjid0feAxIIOSLJu59g8v6NPDWBpZu2848YSrwJ8l+N3yEoKHERLtxPD0hH1RfOWDW7+z6v3qx wjnoY5hwpD4kAuWCLuuxw5xxhxXexb8i7r/PrFvu/WWhWTwXTZSBswrX456wfsELdbsCNXwQ8/J Ni2NgiSTSCiBYvKI= X-Received: by 2002:a05:600c:a085:b0:4bb:7bee:5496 with SMTP id 5b1f17b1804b1-4bb8880f04dmr868937715e9.13.1796263664374; Wed, 02 Dec 2026 18:07:44 -0800 (PST) Received: from localhost.localdomain ([193.207.177.62]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbe00df154sm34051245e9.14.2026.12.02.18.07.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 18:07:44 -0800 (PST) From: Gianfranco Mariotti To: sashiko-bot@kernel.org Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, gianfranco.mariotti94@gmail.com, robh@kernel.org, sashiko-reviews@lists.linux.dev Subject: Re: [PATCH 2/2] drm/bridge: Add Rockchip RK628 HDMI to LVDS bridge driver Date: Thu, 3 Dec 2026 03:07:39 +0100 Message-Id: <20261203020739.34050-1-gianfranco.mariotti94@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: <20261203013324.30650-1-gianfranco.mariotti94@gmail.com> <20261203013324.30650-3-gianfranco.mariotti94@gmail.com> X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Thu, Dec 03, 2026 at 01:47:28AM +0000, sashiko-bot@kernel.org wrote: > [Severity: High] > Does rk628_cru_set_cpll_rate() need to set CLK_CPLL_MODE_MASK (bit 0) in > CRU_MODE_CON00 to switch CPLL from slow mode to normal mode? > > On RK628F, rk628_cru_init() returns early after setting bit 4 in > CRU_MODE_CON00 without setting CLK_CPLL_MODE_MASK. When > rk628_hdmirx_enable() calls rk628_cru_set_cpll_rate(), CPLL locks but its > mode bit in CRU_MODE_CON00 remains 0, so CPLL stays in 24 MHz reference > clock bypass and rk628_cru_get_pll_rate() returns 24 MHz instead of the > configured CPLL rate when rk628_cru_set_frac_clk() programs the > CRU_CLKSEL_CON13 and CRU_CLKSEL_CON14 fractional dividers. No, this matches the RK628F CRU hardware reset defaults and Rockchip's reference driver (rk628_cru.c). Unlike RK628D (which resets with CPLL and GPLL in 24 MHz slow mode and requires the software mode-switch sequence), RK628F resets with CLK_CPLL_MODE (bit 0) and CLK_GPLL_MODE (bit 2) already set to normal PLL mode (1), while only the newly added APLL (bit 4) defaults to slow mode (0). RK628_HIWORD_UPDATE(1, 4, 4) in rk628_cru_init() uses the high-word write-enable mask (BIT(20)) to switch bit 4 (APLL) to normal mode without clearing bits 0 and 2, so CPLL and GPLL remain in normal mode and rk628_cru_get_pll_rate() reads back the locked PLL rate. (Note that hardware testing for this series was done on RK628D; the RK628F paths follow Rockchip's BSP sequence verbatim.) I will add a comment in rk628_cru_init() in v2 to document this. > [Severity: High] > Should rate_khz be halved in dual-link LVDS mode? > > In dual-link LVDS mode, odd and even pixels are split across module A and > module B so each link runs at dst_mode.clock / 2. Computing rate_khz from > the full dst_mode.clock doubles the per-link serial bit rate for modes at > or above 71429 kHz (such as 1920x1080p60 at 148.5 MHz), selecting half the > required rate_div in COMBTXPHY_CON5. No, rate_khz intentionally uses the unhalved pixel clock in both single- and dual-link LVDS modes (tested on RK628D hardware and matching Rockchip's rk628_lvds.c / rk628_combtxphy.c reference). In rk628_post_process_enable(), the COMBTXPHY reference clock (sclk_vop, selected via SW_TXPHY_REFCLK_SEL(1)) is programmed to the full dst_mode.clock, and COMBTXPHY_CON5 uses fixed SW_REF_DIV(0) (ref_div = 1) and SW_PLL_FB_DIV(14) (fb_div = 14). Because the COMBTXPHY PLL VCO locks against the unhalved sclk_vop input before the PHY splits odd/even pixels across Module A and Module B (SW_LVDS_CON_CHASEL(1)), rate_div must be selected against dst_mode.clock * 7; halving rate_khz while sclk_vop is unhalved would double rate_div and push the VCO out of range. I will add a clarifying comment in rk628_lvds_enable() in v2 as well. Best regards, Gianfranco