Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp24555lqb; Tue, 16 Apr 2024 07:53:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXec27dsuccyT0ml9Wz68sXbD3xzMy2T04dx2bY82o20Zq9+qBlZUqCsK+LIuLnVnAX3EAOJCrtJDDVIWFGXmH1K9Gv6BF5dOyyUPRdVQ== X-Google-Smtp-Source: AGHT+IF2JzR2M1NmiFI8gcazI2cwrN7c1H5uY6Tv7oMJ7Mm27+JA5bPcu2MkP5ZYjUlMcVHuU1m0 X-Received: by 2002:a05:6512:158d:b0:518:c59b:4fa9 with SMTP id bp13-20020a056512158d00b00518c59b4fa9mr7909427lfb.50.1713279206126; Tue, 16 Apr 2024 07:53:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713279206; cv=pass; d=google.com; s=arc-20160816; b=BY1jUmOsaRYcYYzKQekCPW6HvjBHFId7714olMqqng5hkQaUaQuitdR+rqnNJy3q1S /sYmEIwefuyhV1FWvKHfXqTtkw2Vm05cfHxFYB2OZ8lIIH3fzJFPWUT/tA0+PkvZ4UO1 BIB7rc0LW61tA0LdwItB2S49tjQIQxBcncPEwRhbu0LhymYYIqcRWrO+4RlLS47mkyjI A/1xLGmyYxAPJZRkmCSKxesEHzagAH1FcBtyvUkJWYu/73JFQV8w1kDeBrHWj+BxFNhl AXy7AI/iU6FsPNCiSvxUFZzT7Y2MwfeOGKaqY0SND/0WaZ1dfWko9KbWMuEfO/Q4iosu IpXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=jl7BVtQwBTSlw5Q7jIravMMMPvXbs3wbcyyUN/ZkIBg=; fh=IwXQx5o36p+oQ4nBMh1YHk/NG0AHdOooM+yEgghhVt8=; b=eZSZ5xCRdgq3tOUehQhHSFqB8aoZM2H733h6+gSeE22JEbyXmCADevQEwQxBfVPuL8 2ceFV5WDK0gaQ+pEzr3ZF4GcYZsVZJexelG6jrPV4j4qjQzKCQoMH4wcNEM4ep3G0Gc4 15Dp1Ol8CnPg7VRuDkiVvFT5oYTEpbxTwmhxQ+R6bjQltqMOrc5H5OzzX42+g1KBVc91 QUhxLJEEIUYOhpg5ySHMr2JGRmz50LqmwX4T/1RHwRBQOzyRnAFrvtbyJYbTaYv/fSA9 NhIXh9Ltany+CY3Rn0mTYFgjo32BrfcNwTWbcKaXiOoya/wmFR/lVoqYf5AWvgcM118i 98mQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=guJwuaJO; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-147069-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147069-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x13-20020a170906b08d00b00a526457fce9si2581720ejy.879.2024.04.16.07.53.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 07:53:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-147069-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=guJwuaJO; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-147069-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147069-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9D3151F21BCA for ; Tue, 16 Apr 2024 14:53:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2120D12F5B1; Tue, 16 Apr 2024 14:53:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="guJwuaJO" Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7718912EBD7 for ; Tue, 16 Apr 2024 14:53:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713279196; cv=none; b=QAMxf+dxkWWDY7E5up4k5362dgN8d7IR/Rzr/SLDz88and1VuahOOc+iGs6yg8CMymDf0ak3h6Nxz1eusYo7wmO41Lsn8JaOm7AlLdusfgw0LIVlXY4xC4E7mRta87/OsXQiTfdXwwGyu/Un7R6qGx6KqVDmKg5Ofa9s1w99keM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713279196; c=relaxed/simple; bh=KIC6X+A9AYUCWOuCpVq36IJ1kaFjZbZdLH2BMqqVvzk=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=A/+NZ+9dvP+8BW5YN/6Dxb5tt8lcrRjoFUi2rXBPW4l0/ox2sKIfnt6lyGQZYHL3Dxmawf2vycOFFbETZlCd27SLkB8K4J00TgrwK1u/r3Zl4R5x3p5BfOWj69TKzu/lSxu5E0mKybpO2z7juaGfrY81xklAIugJZYxBB4qX0Fw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=guJwuaJO; arc=none smtp.client-ip=209.85.208.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2da888330b2so44980411fa.2 for ; Tue, 16 Apr 2024 07:53:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1713279192; x=1713883992; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=jl7BVtQwBTSlw5Q7jIravMMMPvXbs3wbcyyUN/ZkIBg=; b=guJwuaJOpi3G6os/rcCx/qdSQ1olgCH0l2gDfF0IEj+9rEbNuGa/ivpTqZMoHljJtd vVhW3NSJXbeWaX9q42VPX66nfX4LVNLbs6FF2CQL0TjFyoeE0i9OIeELfMfVIPHmI687 v9mNgjwDQNzMF06u5cPeptbXvR6Ga2A43CTXwhoeoisFOfM2orDrI5ttkVw9SAMPWSLF aH2iACFL1kKU9mVsnVmo/3LiT76p+W40ccFXi51kQX+HQh4I2Vu/jXHC6zFjlfoK74nR 5lIgMFgb1xezWgPlvpUK6sLvmXYtBwdBRRJEkxFhdKbh2pOw1/iEtPjoOQI4RrG3kw1K oJpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713279192; x=1713883992; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jl7BVtQwBTSlw5Q7jIravMMMPvXbs3wbcyyUN/ZkIBg=; b=Q8QmDFJVLIluBvvwj7nl6dOqxjr2YjoYYU5WIKAiHHQx1874ohHfHEesbILxpsH4eB Hggh1SSwx962eFFmLW/jD1CKIf+3QiyBl3O7GzaAn4nFfmMcdDg4z8z9a9e5ujYe/Hmw kz2QpsLLqEFwkK3Vk8UX1Mjx2/9Nnsa67WIQ0A42WEQyMeYDlH6EASlc8rcInh+2gBhb WU0wMODJOtL3e5zhBaRPcYtUeSk+jzHoGHeVEsfKmrovxwk7kXXLhtL2+G5UYl8XOp6C hke2peQD25OJai36STNzlQ+HpcSm9iWl7G/YuiTDIcybDYw5E/+Qy5leIBSnxsYoHjeT 8X7Q== X-Forwarded-Encrypted: i=1; AJvYcCVsQxAev+BROqzj3EtD3Nxlst/FsNCktVvTTbMcXn1ad0Fugt6/QvT5MqmoPl/hjIer+Mp2szEOPl/8r9FPHlqwpM1KbMN8Wo18C+7H X-Gm-Message-State: AOJu0YzGyJoAyElae8xpt6ybuhaquWVBDlu/m/8CPqRDSM8Z334o2Kz3 zuah0xjj07qEHWo9UIAqCFz5AyQF3m7rAFzNiubDf9ny5NCUbdqw/B8KUMaiaO0= X-Received: by 2002:a2e:9517:0:b0:2d8:19fe:4863 with SMTP id f23-20020a2e9517000000b002d819fe4863mr10223169ljh.41.1713279189026; Tue, 16 Apr 2024 07:53:09 -0700 (PDT) Received: from [192.168.1.172] ([93.5.22.158]) by smtp.gmail.com with ESMTPSA id c19-20020a170906529300b00a4da28f42f1sm6995974ejm.177.2024.04.16.07.53.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Apr 2024 07:53:08 -0700 (PDT) Message-ID: <96d90ddd-2910-4419-ba90-64a09a3dbf1e@baylibre.com> Date: Tue, 16 Apr 2024 16:53:06 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Alexandre Mergnat Subject: Re: [PATCH 14/18] drm/mediatek: dpi: add support for dpi clock To: AngeloGioacchino Del Regno Cc: dri-devel@lists.freedesktop.org, Krzysztof Kozlowski , Matthias Brugger , linux-mediatek@lists.infradead.org, Will Deacon , Catalin Marinas , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, CK Hu , Rob Herring , Daniel Vetter , David Airlie , Xinlei Lee , Jitao Shi , linux-arm-kernel@lists.infradead.org, linux-pwm@vger.kernel.org, Conor Dooley , Thierry Reding , Fabien Parent , =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= , Chun-Kuang Hu , Philipp Zabel References: <20231023-display-support-v1-0-5c860ed5c33b@baylibre.com> <20231023-display-support-v1-14-5c860ed5c33b@baylibre.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 24/10/2023 11:12, AngeloGioacchino Del Regno wrote: > Il 23/10/23 16:40, amergnat@baylibre.com ha scritto: >> From: Fabien Parent >> >> MT8365 requires an additional clock for DPI. Add support for that >> additional clock. >> >> Signed-off-by: Fabien Parent >> Signed-off-by: Alexandre Mergnat > > I'm not convinced that this is right... at all. > > From a fast check of the MT8365 DPI clocks, I can see that the DPI0 > clock declares > parent VPLL_DPIX (a fixed clock), but nothing ever has VPLL_DPIX_EN > (which is the > GATE clock, enabling output of DPIx VPLL?). > > But then, there's even more: no clock ever references the > CLK_TOP_DPI0_SEL nor the > CLK_TOP_DPI1_SEL gate, which is a PLL parent selector... in other > platforms, that > is muxing through the TVDPLL, but on MT8365 that is LVDSPLL?! AFAI see into mt8365 documentation, there is no TVDPLL, only LVDSPLL > > I have many questions now: > * Two PLLs are apparently brought up, but which one is the right one?! >   * Is the LVDS PLL really used for DisplayPort? (dpi0_sel) Seems to be LVDS enable prepare protect duty hardware clock count count count rate accuracy phase cycle enable ------------------------------------------------------------------------------------------------------- clk26m 18 19 1 26000000 0 0 Y vpll_dpix 1 1 0 75000000 0 0 50000 Y mm_flvdstx_pxl 0 0 0 75000000 0 0 50000 N mm_dpi0_dpi0 1 1 0 75000000 0 0 50000 Y vpll_dpix_en 0 0 0 75000000 0 0 50000 N lvdspll 1 1 0 283999497 0 0 50000 Y lvdspll_d16 0 0 0 17749968 0 0 50000 Y lvdspll_d8 0 0 0 35499937 0 0 50000 Y lvdspll_d4 0 0 0 70999874 0 0 50000 Y lvdspll_d2 1 1 0 141999748 0 0 50000 Y dpi0_sel 1 1 0 141999748 0 0 50000 Y dpi1_sel 0 0 0 141999748 0 0 50000 N mmpll 1 1 0 456999909 0 0 50000 Y mmpll_ck 1 1 0 456999909 0 0 50000 Y mm_sel 15 15 0 456999909 0 0 50000 Y mm_dpi0 1 1 0 456999909 0 0 50000 Y > * Are you sure that CLK_MM_DPI0_DPI0's parent shouldn't be dpi0_sel > instead? I'm agree with you. After few change, it works. - GATE_MM0(CLK_MM_DPI0_DPI0, "mm_dpi0_dpi0", "vpll_dpix", 20), + GATE_MM0(CLK_MM_DPI0_DPI0, "mm_dpi0_dpi0", "dpi0_sel", 20), - clocks = <&topckgen CLK_TOP_DPI0_SEL>, + clocks = <&mmsys CLK_MM_DPI0_DPI0>, enable prepare protect duty hardware clock count count count rate accuracy phase cycle enable ------------------------------------------------------------------------------------------------------- vpll_dpix 0 0 0 75000000 0 0 50000 Y mm_flvdstx_pxl 0 0 0 75000000 0 0 50000 N vpll_dpix_en 0 0 0 75000000 0 0 50000 N lvdspll 1 1 0 283999497 0 0 50000 Y lvdspll_d16 0 0 0 17749968 0 0 50000 Y lvdspll_d8 0 0 0 35499937 0 0 50000 Y lvdspll_d4 0 0 0 70999874 0 0 50000 Y lvdspll_d2 1 1 0 141999748 0 0 50000 Y dpi0_sel 1 1 0 141999748 0 0 50000 Y mm_dpi0_dpi0 1 1 0 141999748 0 0 50000 Y dpi1_sel 0 0 0 141999748 0 0 50000 N mmpll 1 1 0 456999909 0 0 50000 Y mmpll_d2 0 0 0 228499954 0 0 50000 Y mmpll_ck 1 1 0 456999909 0 0 50000 Y mm_sel 15 15 0 456999909 0 0 50000 Y mm_dpi0 1 1 0 456999909 0 0 50000 Y > * Where is DPI1 in this SoC? Why is there a dpi1_sel clock, but no MM clock >   for the DPI1 controller? Is there any DPI1 controller, even?! DPI1 isn't documented. >   * Why is there a DPI1 MUX, if there's no DPI1 controller?! Good question, I don't know. Legacy of the downstream code. That will be fixed for the next version. -- Regards, Alexandre