Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp678879rdb; Fri, 26 Jan 2024 07:33:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IEozt1sS2kdbxB1ZaAA7YVQNU/kjUAGqavEJRizJ1NfXvD6w5eiWvCoG0/hD+ShvZUWaWUj X-Received: by 2002:a05:6a20:9f87:b0:19c:87b3:ad9a with SMTP id mm7-20020a056a209f8700b0019c87b3ad9amr924241pzb.17.1706283203043; Fri, 26 Jan 2024 07:33:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706283203; cv=pass; d=google.com; s=arc-20160816; b=KmnGwA1QMUIQH1+OQuR8NUyT8WoEsDTBa2qbIc8F2WrOJ3uHDnLy8qLmbA7NIbG4cY eHcFkIe6eUkAep4l5UYzWT56HqR9DeSTxC7EGss8zAJmuxl7aALeIYq4HZG2An5ndLTM pn1RquzYWvL6a38X8smOtK8ssT5cPZ232n4qXUzls2GXx9bjqKc6xgJq4hp0yX9N5O0P pegwMfppzNgDaaJsU9sRqhIRwWGsee9trwd8obMN7oTTfv5dFhTGJoSF9D0sox9XOUkq /9LpHeLi4zT9P274rylimT96+qpo5s89NiBHjuAy/vsZYjAr3WY54w18JAHtFLwMdl8S vzqw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=KTUH7QCrsev30phQVpRTZXtJaZkS8H2DhHgSXtmbDVI=; fh=X4GtVhJcwKOmAAuo5n5RZMyJ8Tde9t2v1U24yXjzKVc=; b=FeEkwdU2f0FuWk/YXSwG4HyWQQRN9twmA0idKGQyc+SfZaWyCPp7PKUiNWy4+IVKPr tQzoSQSLu2n50aBy0ZgESt0TfdMy919Ap1qRM7u6guJaiG0M8pMIU7TYcTSahw05abXv JOvocsWlJmNWdhUThbnSN0+qu0YR7q4bH1YRQXQGYZszxPxYquCOfwE3uNNSI+FV4LJj hm+uKwXzwk8rlXS/h33/wYIJ/T23AbehKQypZ2vq0hO5WZqASuRpRHEoc7tQVGCXlYa/ H1oISrrf5yuptvoqFbsa9HVAlXe98pzlUH4WuBd5KH/jGylenLJF5PjbsVhmD+3wwevg Vhkw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="M9d1S/ow"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-40282-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40282-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id g20-20020a633754000000b005cdc2cc9a15si1248976pgn.742.2024.01.26.07.33.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 07:33:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40282-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="M9d1S/ow"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-40282-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40282-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 9F7B72850A0 for ; Fri, 26 Jan 2024 15:33:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E08B51D52C; Fri, 26 Jan 2024 15:33:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="M9d1S/ow" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C856D1CFBC; Fri, 26 Jan 2024 15:33:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706283195; cv=none; b=HYlmclryTXzUEeFr2dQkkBF2pxuYBf/O507B3oOVLgqS3yeJdcTaxarpohwzAVmJqEoY2G4L5eyxO9DiIb0qWgPL2uutB3iLCeEsgyhVptb0cpEjuX4Vs3cl6vyVTDSNBXI4C82HKuUsbjZfBqWbTsMNpwMc/SG/5BqtGLF3sE4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706283195; c=relaxed/simple; bh=mAzKWZzPkM6ug0onv0vRe/nRxVt4tmp8a5kHaDgKrWc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gwp1HaeckqiWk/p+KwPxT0ZJEUn6/+w/t/TD4P8fL+/MypJH/qrrc2/7deCdGNNYLZ6djgqA8x9mLpTHEw0BWYd/tBT0EywrZcClTbymOGlihbqOTxQ9YoOBeQoPPM+HhAR/C8LbdtUMj6j6d1iqRjRXZ3dnbv9Cl/d69lLfR8U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=M9d1S/ow; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6E19C433C7; Fri, 26 Jan 2024 15:33:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706283195; bh=mAzKWZzPkM6ug0onv0vRe/nRxVt4tmp8a5kHaDgKrWc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M9d1S/owaLykjwZWoE/JjcSyfLO7y4RC6T8y6akAgrduNm62lUq45zOIYoRkDGeGQ bdV4MyfhzQ3kZ2yklUTH4mBzQkaA7EDoW7q65hvlDrJwnfW3wL7Oh/mvn3nWO8m2+5 RUSeikg8Npwu33rkmN3Hu9DeqalWWeet9m+tN4rQPIdyfHXaGd2QwyKz2JNdi4/Ia6 Y3vgbXw724n07b6UrC9832j8q8EOkse6XYAuGUXS7CtCoIfdNj9QrdBbnUexpMBbsD yjqmhSlc8gkmG99WflAqiOHbM51tbxHxPcEPGPsK3TeQ5aOGrgsQizpvqiMUvHOzcO XLAUrWVhHl+bg== Date: Fri, 26 Jan 2024 15:33:08 +0000 From: Conor Dooley To: Dharma.B@microchip.com Cc: Conor.Dooley@microchip.com, sam@ravnborg.org, bbrezillon@kernel.org, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, Nicolas.Ferre@microchip.com, alexandre.belloni@bootlin.com, claudiu.beznea@tuxon.dev, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, lee@kernel.org, thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, linux-pwm@vger.kernel.org, Linux4Microchip@microchip.com Subject: Re: [PATCH v3 3/3] dt-bindings: mfd: atmel,hlcdc: Convert to DT schema format Message-ID: <20240126-uncommon-stout-dd3243e6b43f@spud> References: <20240118-recent-glorified-fd35d72e006e@spud> <20240119-character-mardi-43571d7fe7d5@wendy> <20240122-stark-duress-2f59294dcf27@spud> <4906b7e2-0ddb-4d3c-a48b-e16278f2d649@microchip.com> <20240124-lend-emerald-1028fe65cc39@spud> <20240125-proved-passage-7fa128f828db@wendy> <51da296d-a8a9-417a-8875-3b5e866a89a3@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="N7HfhWSgZScgqIKp" Content-Disposition: inline In-Reply-To: <51da296d-a8a9-417a-8875-3b5e866a89a3@microchip.com> --N7HfhWSgZScgqIKp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 26, 2024 at 02:22:42PM +0000, Dharma.B@microchip.com wrote: > On 25/01/24 1:57 pm, Conor Dooley - M52691 wrote: > >=20 > >>> If the lvds pll is an input to the hlcdc, you need to add it here. > >>> From your description earlier it does sound like it is an input to > >>> the hlcdc, but now you are claiming that it is not. > >> > >> The LVDS PLL serves as an input to both the LCDC and LVDSC > >=20 > > Then it should be an input to both the LCDC and LVDSC in the devicetree. >=20 > For the LVDSC to operate, the presence of the LVDS PLL is crucial. Howeve= r, in the case of the LCDC, LVDS PLL is not essential for its operation unl= ess LVDS interface is used and when it is used lvds driver will take care o= f preparing and enabling the LVDS PLL. Please fix your line wrapping, not sure what's going on here, but these lines are super long. > Consequently, it seems that there might not be any significant actions we= can take within the LCD driver regarding the LVDS PLL. You should be getting a reference to the clock and calling enable on it etc, even if the LVDSC is also doing so. That will allow the clock framework to correctly track users. > If there are no intentions to utilize it within the driver, is it necessa= ry to explicitly designate it as an input in the device tree? The binding describes the hardware, so yes it should be there. What the driver implementation does with the clock is not relevant. That said, I think the driver should actually be using it, as I wrote above. >=20 > If yes, I will update the bindings with optional LVDS PLL clock. >=20 > clock-names: > items: > - const: periph_clk > - const: sys_clk > - const: slow_clk > - const: lvds_pll # Optional clock This looks correct, but the comment is not needed. Setting minItems: 3 does this for you. > >> with the > >> LVDS_PLL multiplied by 7 for the Pixel clock to the LVDS PHY, and > >=20 > > Are you sure? The diagram doesn't show a multiplier, the 7x comment > > there seems to be showing relations? >=20 > Sorry,=20 > LVDS PLL =3D (PCK * 7) goes to LVDSC PHY > PCK =3D (LVDS PLL / 7) goes to LCDC I'll take your word for it :) > >> LVDS_PLL divided by 7 for the Pixel clock to the LCDC. > >=20 > >> I am inclined to believe that appropriately configuring and enabling it > >> in the LVDS driver would be the appropriate course of action. > >=20 > > We're talking about bindings here, not drivers, but I would imagine that > > if two peripherals are using the same clock then both of them should be > > getting a reference to and enabling that clock so that the clock > > framework can correctly track the users. > >=20 > >>> I don't know your hardware, so I have no idea which of the two is > >>> correct, but it sounds like the former. Without digging into how this > >>> works my assumption about the hardware here looks like is that the lv= ds > >>> controller is a clock provider, > >> > >> It's a PLL clock from PMC. > >> > >>> and that the lvds controller's clock is > >>> an optional input for the hlcdc. > >> > >> Again it's a PLL clock from PMC. > >> > >> Please refer Section 39.3 > >> https://ww1.microchip.com/downloads/aemDocuments/documents/MPU32/Produ= ctDocuments/DataSheets/SAM9X7-Series-Data-Sheet-DS60001813.pdf > >=20 > > It is not the same exact clock as you pointed out above though, so the > > by 7 divider should be modelled. >=20 > Modelled in mfd binding? If possible, could you please provide an example= for better clarity? Thank you. Whatever node corresponds to the register range controlling this PLL should be a "clock-controller" (like any other clock provider does). Your PMC should have this property. I don't know if the correct location is the mfd node or somewhere else, you'll have to check your docs. Thanks, Conor. --N7HfhWSgZScgqIKp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZbPQtAAKCRB4tDGHoIJi 0hAfAP9oD7w7XXefbTe7aCamQ784UR9nGzozBzN9AoLVCrxKGAD+JD5kiMlu70l/ 6YBAmgN41j1kRbKlAUFnrV4Y2INzNgU= =MfAt -----END PGP SIGNATURE----- --N7HfhWSgZScgqIKp--