From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) (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 9CF5930BF6D for ; Mon, 22 Jun 2026 02:28:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782095336; cv=none; b=KH9mK7xzG/EESNpKS88HZW0WhhekADFSygCmmbV6onRPHegffCz4ym9XVFWsR1coNipEsd8pGEAYRMHtvnsheljcqGIOGrpIh3Ds3vb5aN221CqDSD+B7doFwZO8YXSgQusbsgT/y9ZGznRK6GuEMaMgrcCxSk4le310Ht1ttB4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782095336; c=relaxed/simple; bh=ticB4gansQ1BtdOSesuRfnDkU6EYtdEdyO6zWWCdzUE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=XEiZVltVOudVtCxkuPgVEGoaEeFyIFZm2COZF8qNN2psS8D0mLS8nknGJwG+iZGWfoE62ngVrOqYWCmEb8m1HFlqekdWZiSBn7IrGga8RMRKtdakKzTYGggXpWTeRe5U2msClye1Fh+KC4xlFAchcObZDnieUPbtkawuC4waaRo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lLAnfDsN; arc=none smtp.client-ip=209.85.210.179 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.b="lLAnfDsN" Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-8423f236418so1872108b3a.1 for ; Sun, 21 Jun 2026 19:28:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782095335; x=1782700135; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=gu0ES1O9klC+0ewrJmA1SFEVoTTP2kjyfbea71Glr8c=; b=lLAnfDsNbxHGhQkz77sAaWkG9aYQ9PLStUz0x+XXFmWRuLNRsfx140rQoUMUVvj7GL iZ5we5zgHN3P9Xt4K35rvZEVOtPrKnyDUGZbbYFmoa4sX/Q0UBB8XkoQbsYVynCvkOMU pxq6fA3qlNiKC8Cr2d6zzj/nlqwBsY990SZYTvb1E1rsSprLhHDSEBYu5C5VI/ddq2nu 2lXD/70j0+ac0RwR6LMUlQH8x6KonPwn7qbE95gcpU2yeFACfTSr3zrFpUsFWZUc4ZMT ZrOEnbrmRHU4qy2BuPo3WkuXXPGy6yf49gP5Nr9SUCanUHfZoBNxFVaRObKhf/kxwrtv hMQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782095335; x=1782700135; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gu0ES1O9klC+0ewrJmA1SFEVoTTP2kjyfbea71Glr8c=; b=SrB8WKOwiMAYakRgWz4/xpFeX+SmwdPv+/sirLFNsHLOojed/O/mK0tizpFSvOHKSF zRn/s77wSUKIYtYZ5DKd3ECPTX8cHND8zYWu3ctSxd2ULdz6VGJ+3decnJ8xirzwmaG1 98jo3ZBkhbu6WN29j4fQoa51SUV6ZsjCs1JOgrv5Uq+8R0qALeUSHgiwIHnaW+sjjGEi o8a0y1aXc7AP9GfxIrdkT+qfTK8l9FF/zwxmmvJ77Mb6ZxnR8xYIq9CJXmX3ft2yy9SI 6Rfk+vt/KTVY4XJOnhItU7jbMVkNXWrA30GBDDzx59jdlNtp99AyoFEKSaL9EmuHcl0a S+IA== X-Forwarded-Encrypted: i=1; AFNElJ/mxuW9Tj+QH9cfqrVcQBsKMMS5SU6pRzlrETYUF8ppYqGVNzM6TfdyFzmLVvpQ6dqZV4pdjfXJca+6Xio=@vger.kernel.org X-Gm-Message-State: AOJu0YwyasO7Ovr3+hWY81YGo5Ib1ZV8rqmyMNS9jQMZVD9/vtTam3Zs 6MBMHvZok/B6iJZJL04KMhI/5+pVGuFlatck9uc7iFrJjiSWQpWoAFUa X-Gm-Gg: AfdE7cly6rA8D693VykjoVl4iKogLB7n8i6ErnXXcwzoqYLjGL1PWv9PaACX9u07TXE nw2ZAmnUqQWazugkPg5LrUe27mtQeT3liJ9v0EQY7IMABkopFGmKM13eSZgTAAk4kC8MBTzUI/7 2KGRD1TdmCDbKaG4c3/L32GQK0yLK8NxcpQCdh0B/OSjbx7br3hjV0AbcEOnMW14Q2oOdAHIN5B 2nS+QSJpDU2eyp2lXrfBvoViLs56AIRHhhWQNPwMNi4Rp0DmY0BHqsaguEfBhZNZ4j/QYO8vTnh beRlZKk7edCgskGkKd8LgrCeXhtiftOx8T9Ab8bhhmxmpPcceRbKoTRFzHhR17TYE2JObWB+1go IcWuS3HKgD6cK04p62vbBgHL0vEnSGegEgZDEUxdo4F91gnpd/D2KOQN/93mMehEvECYBiuhitk iVrclfNQGQ9WOl58X+kgOSlzBNMbtcmvLYvFVRM1DAFSkgklPNGgkgSESN6Qs3hhWzQnqcSdD+q 6pr X-Received: by 2002:a05:6a00:4104:b0:845:33e1:9664 with SMTP id d2e1a72fcca58-845508ff81bmr13600889b3a.40.1782095334770; Sun, 21 Jun 2026 19:28:54 -0700 (PDT) Received: from [192.168.0.100] (60-250-196-139.hinet-ip.hinet.net. [60.250.196.139]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84564ee3dc2sm5573489b3a.58.2026.06.21.19.28.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 21 Jun 2026 19:28:54 -0700 (PDT) Message-ID: <98725dea-9bfd-43bb-8bce-e314f821d081@gmail.com> Date: Mon, 22 Jun 2026 10:28:46 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 1/6] dt-bindings: display: verisilicon, dc: generalize for single-output variants To: Icenowy Zheng , maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org Cc: ychuang3@nuvoton.com, schung@nuvoton.com, yclu4@nuvoton.com, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20260615065003.76661-1-a0987203069@gmail.com> <20260615065003.76661-2-a0987203069@gmail.com> <3683c5c617324f5835529617325745ef48fa1943.camel@iscas.ac.cn> <6d3e3121-22f2-4c59-9678-df2f57ff4d31@gmail.com> Content-Language: en-US From: Joey Lu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 6/18/2026 6:24 PM, Icenowy Zheng wrote: > 在 2026-06-17三的 18:25 +0800,Joey Lu写道: >> On 6/15/2026 4:19 PM, Icenowy Zheng wrote: >>> 在 2026-06-15一的 14:49 +0800,Joey Lu写道: >>>> The existing schema hard-codes the five-clock/three-reset/dual- >>>> port >>>> topology of the DC8200 IP block, preventing reuse for single- >>>> output >>>> variants such as the Verisilicon DCUltraLite used in the Nuvoton >>>> MA35D1 >>>> SoC. >>>> >>>> Rework the schema so that variant-specific constraints are >>>> expressed >>>> via >>>> allOf/if blocks: >>>> >>>> - Add nuvoton,ma35d1-dcu to the SoC-specific compatible enum. >>>> The >>>>    generic verisilicon,dc fallback remains the driver-binding >>>> string. >>>> - Move clock and reset items descriptions into the per-variant >>>> allOf/if >>>>    blocks; keep only minItems/maxItems at the top level so the >>>> base >>>> schema >>>>    accepts all variants. >>>> - Restore full items lists for clock-names and reset-names at the >>>> top >>>>    level with minItems so the names are validated against the >>>> descriptions. >>>> - Keep ports in the global required list and keep >>>> additionalProperties: false. >>>> - Add an allOf/if block for thead,th1520-dc8200: five-clock >>>> (core, >>>> axi, >>>>    ahb, pix0, pix1), three-reset (core, axi, ahb), required >>>> resets. >>>> - Add an allOf/if block for nuvoton,ma35d1-dcu: two-clock (core, >>>> pix0), >>>>    one-reset (core), required resets. >>>> >>>> Signed-off-by: Joey Lu >>>> --- >>>>   .../bindings/display/verisilicon,dc.yaml      | 80 >>>> +++++++++++++++++-- >>>>   1 file changed, 73 insertions(+), 7 deletions(-) >>>> >>>> diff --git >>>> a/Documentation/devicetree/bindings/display/verisilicon,dc.yaml >>>> b/Documentation/devicetree/bindings/display/verisilicon,dc.yaml >>>> index 9dc35ab973f2..0c41286b8223 100644 >>>> --- >>>> a/Documentation/devicetree/bindings/display/verisilicon,dc.yaml >>>> +++ >>>> b/Documentation/devicetree/bindings/display/verisilicon,dc.yaml >>>> @@ -17,6 +17,7 @@ properties: >>>>       items: >>>>         - enum: >>>>             - thead,th1520-dc8200 >>>> +          - nuvoton,ma35d1-dcu >>>>         - const: verisilicon,dc # DC IPs have discoverable >>>> ID/revision >>>> registers >>>> >>>>     reg: >>>> @@ -26,14 +27,12 @@ properties: >>>>       maxItems: 1 >>>> >>>>     clocks: >>>> -    items: >>>> -      - description: DC Core clock >>>> -      - description: DMA AXI bus clock >>>> -      - description: Configuration AHB bus clock >>>> -      - description: Pixel clock of output 0 >>>> -      - description: Pixel clock of output 1 >>> Clock descriptions should still be in the global part instead of >>> the >>> per-compatible part. >>> >>> In the per-compatible part, clock-names should be constraint for >>> SoCs. >> I will move the `items:` clock descriptions back into the global >> `clocks:` property, covering all five possible clocks. In the >> per-compatible sections I will remove the description items and only >> constrain `clocks: minItems/maxItems` and `clock-names: >> minItems/maxItems`; for nuvoton,ma35d1-dcu I will additionally >> override >> `clock-names: items:` to the two names actually used (core, pix0). > Yes, this should be the correct practice, although I wonder whether the > minItems and maxItems properties are needed globally (because these two > seem to have default implicit value). > > BTW the MA35D1 manual in fact shows 4 clocks for "DCUltra" in the clock > tree, maybe the DT binding needs to be reconsidered? > > Thanks, > Icenowy I will drop the global `minItems`/`maxItems` on `clocks` and `clock-names` in v5, as they are redundant with the implicit defaults. Regarding the 4-clock question: the TRM clock tree diagram does show four paths reaching DCUltra (display core mux/gate, AXI ACLK, AHB HCLK, and the pixel clock divider). However, the MA35D1 hardware provides only one software-controllable enable bit (SYSCLK0[26]) that gates the core clock together with the AXI and AHB bus clocks through shared ICG cells; there are no separate register bits for the bus clocks alone. Due to this hardware design constraint, the `clk-ma35d1` driver is intentionally designed to register only three DCU-related CCF nodes: `dcu_mux` (ID 61, an internal routing mux), `dcu_gate` (ID 62, the single gate at SYSCLK0 bit 26), and `dcup_div` (ID 63, the pixel divider from VPLL at CLKDIV0[18:16]), with no independent AXI or AHB gate entries for DCU. Since the DT binding can only reference clock handles that the platform clock driver actually provides, the MA35D1 binding will remain at two clock entries: "core" mapped to `DCU_GATE` and "pix0" mapped to `DCUP_DIV`. Thanks. > >>>> +    minItems: 2 >>>> +    maxItems: 5 >>>> >>>>     clock-names: >>>> +    minItems: 2 >>>> +    maxItems: 5 >>>>       items: >>>>         - const: core >>>>         - const: axi