Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp547481rwr; Fri, 5 May 2023 00:57:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ74CK39r0yjFEC/B/Pwz6LwGN4LB5sCECGLZxPc1i/MIDrqSJPA5tY4U50KkdA73Fy3m92w X-Received: by 2002:a17:90b:3609:b0:247:2437:d5c4 with SMTP id ml9-20020a17090b360900b002472437d5c4mr689114pjb.13.1683273465700; Fri, 05 May 2023 00:57:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683273465; cv=none; d=google.com; s=arc-20160816; b=C2MLtAHSupyUbZyXehy7P9+CTAb5yvtonNhpenKPPhSBG0ERFJMFXwOfRFIoBOvTwn CFdohzWIunIhkABJu2h4OceLyM7sLnEXjl6LL2zU+Jm66fs2OZRbjIiuDSW7MRpJXQMM oHFkrtJzwNN1Jxc/zIOfSlYJZnqbJt6/WO/V0h1qlkYIzPfMh9PTd5oXIeXjLMfz7gje BBwNIiUI6VQ3DtdlUrFhxuTo+TxfTXXqhcSVmvTYXrgIA6aIGX0vOYJ9Aipf9EWEsvlc Zb8ejo64ixuxeuWHcEPxqFXfroeJSxVClh13HBSpWCLTb4UzfR3KiHhpijxAK9Y1LgSa OVPg== 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=ZeveXooqm+xBLZjxuZkZXBfIKe/R2RjArxvJxAqKSus=; b=H+vVEACFZVtzccEoeiSU53EPE7aYU1hPzB7jjxeHV7OAKTqnvckutskHD/Z60wXsko diP7RnhntllQHxH/1BKtEToPxH3NaUWG4H3aJ8l/TaX2OWmfGYHKT7Ni6Q5OqNTx6Tz/ 8rQiOujUj/uSF5WI0+QPLu2fexcJs5hNPeRzQhLdDe46mMDr/3guT5QJjWA9dRjC3wHG P2URm85YY0kUgd3uS9ngpSsarIxycSzg391tuOUqAomyuvWGIBoAfYqjU/NmexNfQBEK 4wuIUTFgp8Sav+bQ2PV+zGn5wDisjf206nonlif4ottsXVcCfXVL2pt6YnDqBYPVTaaQ 3X4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=WeS3SdbY; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lj15-20020a17090b344f00b0024e3c22a7dbsi5724842pjb.113.2023.05.05.00.57.31; Fri, 05 May 2023 00:57:45 -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=@walle.cc header.s=mail2022082101 header.b=WeS3SdbY; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230510AbjEEHe0 (ORCPT + 99 others); Fri, 5 May 2023 03:34:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231338AbjEEHeT (ORCPT ); Fri, 5 May 2023 03:34:19 -0400 Received: from mail.3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 734EC17FC3 for ; Fri, 5 May 2023 00:34:14 -0700 (PDT) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id C2553D27; Fri, 5 May 2023 09:34:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1683272050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZeveXooqm+xBLZjxuZkZXBfIKe/R2RjArxvJxAqKSus=; b=WeS3SdbYdkBu1lvqYn/ZfzldBjvY/iitD+YPfri0cviuPnuqFGdIpgUyl/gB6PZ3Yhle25 7iZiTwX3jJh9xoyKOKFDNczLlPl+HrIxe0ixAvCJOvN/po49do7JC9ibapmx0BTTuYO/X1 QsOIP6z9CakiSc+Ox+g7d8AIr1UWTLJb6QyZ9er3vDYlPS1OSb3Pps0zaFvPne3XJtnwjU ke4y3dJuDUQHjbhYBHsoHsilF6EQkQwZxYEqxCPs838+iLgvjxlJokj4y4dwBkTB3B//yr B0tXTVPAy45fksmk92I3MfULIa15yg5iTh0rBk92BmZpMUYpVLvBSbL2fv3uDg== From: Michael Walle To: aford173@gmail.com Cc: Laurent.pinchart@ideasonboard.com, aford@beaconembedded.com, andrzej.hajda@intel.com, dri-devel@lists.freedesktop.org, frieder.schrempf@kontron.de, jagan@amarulasolutions.com, jernej.skrabec@gmail.com, jonas@kwiboo.se, linux-kernel@vger.kernel.org, m.szyprowski@samsung.com, marex@denx.de, neil.armstrong@linaro.org, rfoss@kernel.org, wenst@chromium.org, Michael Walle Subject: [PATCH V3 5/7] drm: bridge: samsung-dsim: Dynamically configure DPHY timing Date: Fri, 5 May 2023 09:33:59 +0200 Message-Id: <20230505073359.3715594-1-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230502010759.17282-6-aford173@gmail.com> References: <20230502010759.17282-6-aford173@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam: Yes X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 > The DPHY timings are currently hard coded. Since the input > clock can be variable, the phy timings need to be variable > too. Add an additional variable to the driver data to enable > this feature to prevent breaking boards that don't support it. > > The phy_mipi_dphy_get_default_config function configures the > DPHY timings in pico-seconds, and a small macro converts those > timings into clock cycles based on the pixel clock rate. This actually fixes a bug with the DSI84 bridge on our boards. The hardcoded settings will violate the D-PHY spec timings for lower frequencies, esp. the Ths_prepare+Ths_zero timing. Thus, the bridge will read a wrong HS sync sequence and set it's internal SoT error bit (and don't generate any RGB signals on the LVDS side). Tested-by: Michael Walle Thanks! -michael