From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (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 9B6E737269F for ; Thu, 25 Jun 2026 09:44:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782380698; cv=none; b=R9cVm9T7pjF0K6CgHJ7H3hlrAhDrhGJO+Y9qlpIuoYN7JqiAaXBBFogfc9o1UwiZ/m4ewmJZ4uXx5wlS9QzXsxxtbvYPS0kHHnaz+w+1+jVBTOGHRFXhbvA3wU98P+s8DPbL5EfbwFODZDab2NP2m2phaRVhT94KivJO2oi3c34= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782380698; c=relaxed/simple; bh=9gjSd3FrB8BM1Y9cHPNl+XaJB+Aggn5fYItfBzL5aCw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=uZsS9OXZtv1wzMEeblXUcuiU1hkbvc32fy73Qu8AsW5rJeAJfz7Sqhbluk4F3ZTQVsbfh4e9W4NUu+PnC9RpVn9pYl+zEQciMck/KpcM58vFTbq//eLk+F8MtMoFBYP//pBSQcTZuwgO0QxdsrYhhEN0GfQ/svfMzMF3IC02uSQ= 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=SeeCSDfB; arc=none smtp.client-ip=209.85.214.169 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="SeeCSDfB" Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-2c7f5869cddso4705225ad.1 for ; Thu, 25 Jun 2026 02:44:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782380697; x=1782985497; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Q7LZb4Oyp6MyCiFD5fuuqoWQdDcqkeN2EAojsuCFuQk=; b=SeeCSDfBsTunIetVpK6ieCnnNXW1U6TGJ8TDvVKhY9aeuVEVMlCkdOHJC7AvvhUYuo yI4MI+/emNGcFNdiBw9x/9v3BJWQv7zcEKI4gox0ej/o7ZqwxLaZI5knVwxN13z9KljN pqTnz22CV19Ip2Q1Ns2F1/hqmi9U4Ia3nZzTQgTSPjakUJC3MdQ4rLXsfv191K/QmYLf z/UgAzRuVc/naEDW2g4BQvdJpm0gJAGCZtiFoqaSzQX0hxPWJEz2k45i5LCpu7YUW7pF kCKFsNdEm52IiM9YLLCK1v3r2RCW3TZr0fxixZQBSBMaNJAqYX0yJ3Qwi7aQa6UMywbm IEQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782380697; x=1782985497; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Q7LZb4Oyp6MyCiFD5fuuqoWQdDcqkeN2EAojsuCFuQk=; b=hB3+7WSclgra4US5LgNj7VZaEE5VTol6uIXfJfAY53KfgLSxa9RPNCbSyOWK4WPusR ZmGjxEz6gwtoJBfPmJ16+nz0ab6AfcZiNeEgE625qyTVg4L98tdnhGAjjVQeBq2n+jAC symllI9glprRpZK0DpLN064XqeL+v5zTAnAd36/jr9gmdDYJ6O4ipUn+gMrQpKe+gQvO SReXC0VAozPgBOtmrXm/HJpMu2MdDqgO5WUpK2IDPgG6VfQtKsYz6h7bc56g2of2GE5j t/0dAnv0ICPcnQVy5s20IC91G1slDC7cGCPxQ9s2lKG5bFigTbVo1cDSp6pqL6uXldhe cjJg== X-Forwarded-Encrypted: i=1; AHgh+Ro/vTC8zZHq6Gc3rAyjp9ys9GzDUXIFT9f7d1PoaJbuy4zydry836jjPWsF/zuN8ra3DFuQY8ITeof0840=@vger.kernel.org X-Gm-Message-State: AOJu0YyDYNvWlQersoyXsmNlNgALSrxNqtD3qhPW6f3KNby+3yWoE70F 8jHdMeQQvzljF6PQ7BZREDARVHeBabroZcugEikNfijvdfiZwKAJs7mF X-Gm-Gg: AfdE7cm2umxp6rkIxG5JvcwvyfJalZFFcGnzGI0qfR3/8Ai0ckW1BPWaBT6gqU8svuL faG5cW9V5QN1WmyRXSGzAw2H/tLL8bSurTGDEd0AYLS3Xg1/KAnMH+hbB8wbtZ1iOKEY7ofMg8H eWmGc8FVW9vJwUEOBgIHMSc1a36TWy6mclq2N0mX1DwM5hLFlq7u3gJv8DPs/+IEvAufS99IXb8 2bIq+p9jRt5gL8r5A061nDpy97JCEs/K6WCjT5W62efOwpfcuLNPiyJDxKBAg1ScePeETx5ySBa E8VFbWSr2E623Z9oH/g1dkdiO58lWuJx+RjDaCH3wO/n2t3SWMKtIIS/3/xqSVkyUXPDnJpPgpN zeBFmSQUpPplyD8suVWRJ9ONxCxgcdmBDbrhvIdBdsIJjaAuH/DmMa3KEZYrR8Q0NL/e/3YbSs1 uo8KSqV/UJrXQOIDsiQTa663AieZhkBNAdOSfaUYMTdONXC6QG8x1Jav6kOxZD97wSiWwiw6gUk d04B+ReBcw2 X-Received: by 2002:a17:902:e843:b0:2c1:a19:8396 with SMTP id d9443c01a7336-2c7fca3eeb3mr18687905ad.31.1782380696777; Thu, 25 Jun 2026 02:44:56 -0700 (PDT) Received: from localhost.localdomain (60-250-196-139.hinet-ip.hinet.net. [60.250.196.139]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2c7f5ac8c26sm16614995ad.1.2026.06.25.02.44.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2026 02:44:56 -0700 (PDT) From: Joey Lu To: zhengxingda@iscas.ac.cn, 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, Joey Lu Subject: [PATCH v5 0/7] drm/verisilicon: add Nuvoton MA35D1 DCU Lite support Date: Thu, 25 Jun 2026 17:44:42 +0800 Message-ID: <20260625094449.708386-1-a0987203069@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series adds support for the Verisilicon DCUltraLite display controller as integrated in the Nuvoton MA35D1 SoC. The Verisilicon DC driver and its DT binding were originally written by Icenowy Zheng for the T-Head TH1520 SoC, which carries a DC8200 IP block. The present series builds on that foundation with gratitude to Icenowy for the original work. The DCUltraLite is a different variant in the DC IP family. While the two IPs share a broadly similar register layout, a number of differences prevent the existing driver from working on the MA35D1 without modification: - No CONFIG_EX commit path: the DC8200 staging registers (FB_CONFIG_EX, FB_TOP_LEFT, FB_BOTTOM_RIGHT, FB_BLEND_CONFIG, PANEL_CONFIG_EX) are absent. The DCUltraLite uses enable (bit 0) and reset (bit 4) bits in FB_CONFIG for direct framebuffer updates, and requires a per-frame VALID bit toggle (FB_CONFIG bit 3) to latch configuration changes. - No PANEL_START register: panel output begins when PANEL_CONFIG.RUNNING is set; the DC8200 multi-display sync start register at 0x1CCC does not exist. - Different IRQ registers: DISP_IRQ_STA at 0x147C / DISP_IRQ_EN at 0x1480, versus the DC8200's TOP_IRQ_ACK at 0x0010 / TOP_IRQ_EN at 0x0014. - Simpler clock topology: two clocks ("core" bus gate and "pix0" pixel divider); no axi or ahb clocks required. - Single display output: no per-output indexing beyond index 0 is needed. - Hardware-discoverable identity: the DCUltraLite exposes chip identity registers whose model field reads 0x0 (revision 0x5560, customer_id 0x305), allowing the existing vs_fill_chip_identity() path to identify the variant purely through register reads. Patch 1 generalises the verisilicon,dc DT binding to accommodate the Nuvoton MA35D1 SoC-specific compatible and the variant's two-clock, one-reset, single-port topology. Patch 2 adds the register-level macros needed by the DC8000 ops. Patches 3-5 introduce the driver changes in three logical steps: the vs_dc_funcs hardware ops vtable with DC8200 ops extracted into vs_dc8200.c; making axi/ahb clocks optional as a separate atomic change; and the DC8000 ops in vs_dc8000.c. Patch 6 adds the DCUltraLite HWDB entry that gates hardware recognition once all support is in place. Patch 7 adds the Kconfig dependency on ARCH_MA35, placed last because it is only meaningful after the HWDB entry is added. All patches have been tested on Nuvoton MA35D1 hardware. Changes from v4: - [dt-bindings] Kept clock and reset item descriptions in the global clocks:/resets: properties; per-compatible sections only constrain minItems/maxItems and override clock-names items for nuvoton,ma35d1-dcu. - [dt-bindings] Dropped redundant global minItems/maxItems on clocks: and clock-names:. - [dt-bindings] Dropped the extra-space typo fix in port@0 description to keep the patch atomic; left for a separate patch later. - [ops] Renamed crtc_enable/crtc_disable hooks to crtc_enable_ex/ crtc_disable_ex. - [ops] Added unified IRQ bit definitions; each irq_ack() implementation now translates hardware-specific bits before returning. - [clocks] Split the axi/ahb optional-clock change into its own patch for atomicity. - [hwdb] Simplified the commit message for patch 6. - [kconfig] Simplified the commit message for patch 7. Joey Lu (7): dt-bindings: display: verisilicon,dc: generalize for single-output variants drm/verisilicon: add register-level macros for DC8000 drm/verisilicon: introduce per-variant hardware ops table drm/verisilicon: make axi and ahb clocks optional drm/verisilicon: add DC8000 (DCUltraLite) display controller support drm/verisilicon: add DCUltraLite chip identity to HWDB drm/verisilicon: extend Kconfig to support ARCH_MA35 platforms .../bindings/display/verisilicon,dc.yaml | 57 +++++++++ drivers/gpu/drm/verisilicon/Kconfig | 2 +- drivers/gpu/drm/verisilicon/Makefile | 2 +- drivers/gpu/drm/verisilicon/vs_bridge.c | 20 +-- drivers/gpu/drm/verisilicon/vs_crtc.c | 38 +++++- drivers/gpu/drm/verisilicon/vs_crtc_regs.h | 1 + drivers/gpu/drm/verisilicon/vs_dc.c | 13 +- drivers/gpu/drm/verisilicon/vs_dc.h | 33 +++++ drivers/gpu/drm/verisilicon/vs_dc8000.c | 86 +++++++++++++ drivers/gpu/drm/verisilicon/vs_dc8200.c | 115 ++++++++++++++++++ drivers/gpu/drm/verisilicon/vs_drm.c | 5 +- drivers/gpu/drm/verisilicon/vs_drm.h | 8 ++ drivers/gpu/drm/verisilicon/vs_hwdb.c | 14 +++ drivers/gpu/drm/verisilicon/vs_hwdb.h | 6 + .../gpu/drm/verisilicon/vs_primary_plane.c | 32 +---- .../drm/verisilicon/vs_primary_plane_regs.h | 3 + 16 files changed, 378 insertions(+), 57 deletions(-) create mode 100644 drivers/gpu/drm/verisilicon/vs_dc8000.c create mode 100644 drivers/gpu/drm/verisilicon/vs_dc8200.c -- 2.43.0