From nobody Sun Feb 8 05:28:26 2026 Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (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 F2026187561; Sun, 24 Nov 2024 08:03:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732435387; cv=none; b=fjERyT+kCuWU+Hc8rKzEGxJEkAGsyPzFqDaP8TbVzAC6bs34ZGy26As6+JJA7xbqaVNpGVi/7cC+beP06xcap7UoPXXFcNwER20h/tcY5RDzGH5dBAfVS08YO8rQvaHINy2MPYN6pjs3YP88mDsS/A30nzcnrjj6I1n7ccTgaxQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732435387; c=relaxed/simple; bh=OjPRmJh/nasQX7h1lss1wBBZjoWPylXG4fswQr06XQk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Gd3NZlT9he/64855KKOVC7vdzipK+oGDpQnDhELXzpn/ltZnb7lVYKd4TqNtjFRHzP4oORXic5fZH7guh3Z5FkzgTuLJpVRwAvsF2M3JeKwvLgAdRuhtaqmdNnxl9ChNq7Avi679lwhyjqxqqI/ADo3qLzlLV5FOZxdyIWHECD0= 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=HQeLxnVK; arc=none smtp.client-ip=209.85.210.174 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="HQeLxnVK" Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-724e1b08fc7so1819445b3a.0; Sun, 24 Nov 2024 00:03:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732435385; x=1733040185; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NwiSSoyq95aS10ZR5ywHjvkOgOJUU0juZpwe2Ul98ro=; b=HQeLxnVKAQGv7FzmaDgyvKxtGt0OKfSIkwED+vhFOIAlI7vIBLVdCmcrnVXdE/5YaO uQfFmUyIBM4Ne99mkidoq3WL2r4Cpx8O28dqWfdcPLlG2Jqkp6e9l3tcL8QF7MDdCfSn ALnZKzAkyaPQ0dmV7JnQa6600ZDZBx73LvLSRZCKuKB4BnugJwLypGPNsTxtrLLgqF9q Hv+LyadpFhsDzl1LFlX/LIMWKjcblxjmq1Fy/cDx7T+FeQK0YEQPyeE5dpztArLsFJY3 4NvU9E1EuvraTPDat0E5nm33o4/x13blAEnlrvhG0oLSUsg++d/F3lRf81I9KN3lbZYl EcrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732435385; x=1733040185; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NwiSSoyq95aS10ZR5ywHjvkOgOJUU0juZpwe2Ul98ro=; b=Se9BYByH1Wc70zD9RKpwshSyvN7zshfb+C1K9OMC8AfrrrWS+iU/fKozasSgy9eOe9 iKN5DLp3qyB79OgkPBqVYouxGS0OtznOIzzvVxUNAdQfx17r6sv7PwBJgW55XkfDOYpP 5z6PI2oZozCfs8OBrBD8ZW2qbZM+ydq7d34UE6lVZDTvv4JLcRYlWEqmyYOh4Oqerhbd 1F089e28EuA2WNIvoUtQmdUmmGbPrRLZg/Xr2OlJUqXiV5yk/fe8GidaErjrWf/l8FRN pJ87aD6mpJJRi0enO/fXQrkX0rP+wOGIq/RpNJBe8+I1PsNknhVWvDJks7z+Z8EA1fbR 1Sfw== X-Forwarded-Encrypted: i=1; AJvYcCW0Ee3SUdUqt8gyyXWGTRpPnEMwbUgo1LrAmKXavBIsmgQCNlM+u/U9N0lzwMTQHDTWSbuDffCBkkj7@vger.kernel.org X-Gm-Message-State: AOJu0YxHP9Xg0s/OkqdnBKwaClyfW1X/KUk/hDtXnPpNYvjvik773Co9 U3JGYPIABxLL3kKD0ciXNKWTOEMTBQyTZOjQttBtXnuyIcsvQCgH2PPaeWPM5qk= X-Gm-Gg: ASbGnct40LWm3Z1YZwOtFNTMeh8oVUo/4uEcDQekBntWLaZGZT0j+0M8G2ObFoX05GE der9t+rIwAlXZmVhZu4MVpo0DkvrgMGE2h10vp7xArQ7WEroPwbG3Ly3tPMHql1eqSDPTeBFZHX c1Eua0Oa9yAwJ85XeoZQSR4qHPKDvXVAqfsJV3FIPMw94/KptXizaXFBN0y8dNWrSnn14IM1a08 JzsTxA3s+zi2mGTbsfhxe4Wf8jeaGsc2H0IGS2T3z8vjWAILSp1Be31gbVIs1w= X-Google-Smtp-Source: AGHT+IHQm9ld2SgBp8RRxM0b4eURI6wePuJGMyF2B2CBhq2jEuS7t2RPu+JeZ89dNwX+SP0klI0u9w== X-Received: by 2002:a17:90b:350e:b0:2ea:3d61:1849 with SMTP id 98e67ed59e1d1-2eb0e88201fmr11289217a91.35.1732435385109; Sun, 24 Nov 2024 00:03:05 -0800 (PST) Received: from noel.flets-west.jp ([2405:6586:4480:a10:fa8f:7c3e:835f:c642]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ead03de6f6sm7956708a91.34.2024.11.24.00.03.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Nov 2024 00:03:04 -0800 (PST) From: Hironori KIKUCHI To: linux-kernel@vger.kernel.org Cc: Hironori KIKUCHI , Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Cercueil , Christophe Branchereau , Ryan Walklin , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH 1/6] dt-bindings: display: panel: Add another panel for RG35XX Plus (Rev6) Date: Sun, 24 Nov 2024 17:02:12 +0900 Message-ID: <20241124080220.1657238-2-kikuchan98@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241124080220.1657238-1-kikuchan98@gmail.com> References: <20241124080220.1657238-1-kikuchan98@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is a display panel used in the recent revision of the Anbernic RG35XX Plus, a handheld gaming device from Anbernic. It is 3.45 inches in size (diagonally) with a resolution of 640x480. It has the same interface (pins and connector) as the panel of the former revision of RG35XX Plus, but they differ in their init-sequence. So add it as a new panel. Signed-off-by: Hironori KIKUCHI --- .../anbernic,rg35xx-plus-rev6-panel.yaml | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/anberni= c,rg35xx-plus-rev6-panel.yaml diff --git a/Documentation/devicetree/bindings/display/panel/anbernic,rg35x= x-plus-rev6-panel.yaml b/Documentation/devicetree/bindings/display/panel/an= bernic,rg35xx-plus-rev6-panel.yaml new file mode 100644 index 00000000000..b60a4cf00f8 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/anbernic,rg35xx-plus-= rev6-panel.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/anbernic,rg35xx-plus-rev6= -panel.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Anbernic RG35XX series (YLM-LBV0345001H-V2) 3.45" 640x480 24-bit IP= S LCD panel + +maintainers: + - Hironori KIKUCHI + +allOf: + - $ref: panel-common.yaml# + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +properties: + compatible: + const: anbernic,rg35xx-plus-rev6-panel + + reg: + maxItems: 1 + + spi-3wire: true + +required: + - compatible + - reg + - port + - power-supply + - reset-gpios + +unevaluatedProperties: false + +examples: + - | + #include + + spi { + #address-cells =3D <1>; + #size-cells =3D <0>; + + panel@0 { + compatible =3D "anbernic,rg35xx-plus-rev6-panel"; + reg =3D <0>; + + spi-3wire; + spi-max-frequency =3D <3125000>; + + reset-gpios =3D <&pio 8 14 GPIO_ACTIVE_LOW>; // PI14 + + backlight =3D <&backlight>; + power-supply =3D <®_lcd>; + + port { + endpoint { + remote-endpoint =3D <&tcon_lcd0_out_lcd>; + }; + }; + }; + }; --=20 2.47.0 From nobody Sun Feb 8 05:28:26 2026 Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) (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 03A7E4317C; Sun, 24 Nov 2024 08:03:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732435391; cv=none; b=RuuyvtpFRBzlAKzKvSC/gNqxcOHI2oXa46uQ0MMn/Tyct4TRX0OkYb4MlwvlWNXCtGmb9iv2FcZtV3POez7QTBhQ2jeeVtc/EDMZXg2jhfpHzI6hSVCDvZNzdJ4fH1+Q0dKG5gEPGV9N+DCk6j4SCAOQ3YfgKmVobhqbH5ToUzE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732435391; c=relaxed/simple; bh=VZ8M1+TiMJv+r8qO3ZAAO8ddmK6rlwYlLANpNDkSBmM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fgN6hRy3lstHllEkElQd6CgyZBgDoKJPfRkoGGTRnASJbiU7w/FTsWFdVVCXnZh95jX3C/B9Pb7TmULFZNckfiMV4xSybNXvuZFvmEsaIAucXETHIBkfAXTmHcLlXxHzbbCxCu50SOSSMtNrK4gSIhmscoe0qDy6+JW6lV6ohNE= 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=UJVS0OOP; arc=none smtp.client-ip=209.85.216.52 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="UJVS0OOP" Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-2ea568d8216so2928777a91.1; Sun, 24 Nov 2024 00:03:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732435389; x=1733040189; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AJaU43LFRCDyKvRjkCcyaCdSHzxt2a/9xCIi14y8W8A=; b=UJVS0OOPqDjobre83J4SaOrhQsfXytv7rrdPYwss8rT4S0RwodCg2QZ04I09pC3dcO d4Qi+5Ef1bN2V7WSwp1HXdtNVsWuUOUgYdP/LgH5GjLclJT0INO75ffEIgILLIm9Bdqm WwfGGvp3oUDP1Xawc0kqDPEZL6jI4FS1lzXX4oWfA9Pp4iWD4u26YavUF9lMVMMJDHej tViJZxbenOWJryTr5wlfgFczX0Pgn9n7NR8fQ/FvaahocCH/WJx30QF0jaDXngoJ3O1F ALSaGH89rsG2gztY3Sjrm/fg186tditjAX2BROgfYztZSpZiO5RrCcOmnAHFQDZMT0GM 6ctg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732435389; x=1733040189; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AJaU43LFRCDyKvRjkCcyaCdSHzxt2a/9xCIi14y8W8A=; b=NqYyPqCArF8y+Dl8AxLZjxs/D1ZkQFwDHi0vLX7vTz7qy/bd/PX2yU8CMlAq1KPmCy iPSEx4zgEt2colFWX5eoUceZQslUZ7qEEnyyDSzFDTpr+pGBUS+h1ZFysf/WRr0I+c7D tcfmSoPkUaq43kw2GPCA7NYZLVA4og+a4D62zeG3bQZtjPdSOkZhGvEaVO/hgXsePg/T tAxSds+Ijex96A7GEvXCyNEnJcgSjzYsBy+3FLUWD0QhEZwbf+YLzn0AsvjekaqCQFIG PxlswSD7wmgRZ4FJJvc4WECLrdWvBFuxoZyiLIf8Ja1+iLUJ7gSMj9YenFSYFv0KW/6j Ph1g== X-Forwarded-Encrypted: i=1; AJvYcCVIqTk7YmZAOWks0dFAdaRm3HVKOCOsnkkTxvWm6uV6mjdRmI9f7Jj335h+XnaLwEP+rFy5NiQ4I3hD@vger.kernel.org X-Gm-Message-State: AOJu0YyVpl1v1gN7CohBMXhHiimYZMFe1wxhNx+DHpSYYgNd9q/m4QZT UdVdAG2XWop9ER7IVy1o22wSlWHPX3XuJcxCP2HsNyNGpjpXcKV+IQMRQCOENFk= X-Gm-Gg: ASbGncvPEROnuhXPTtF0yNaLSjflpVM0eWMG7d1PEemafrj026VBANzBxIVP5T8tLKA Qu57vO48CLb7KewuMgjsD/iVyRdKhSzDo8oi7g11yBs0eab6dyXYojsZqfYtDzmCa4//bU6ZLVt qbz1HDd2bO2krC3VWixRGu7dF/9/Cy3XzbQCQ5ACt/rUdqUrBe4Jdtgn9W74ot82923LgCHwsCo 81AxDrm3xijaIXO4FfjH6KEq0A4vWUraEIBvlgmpJD0laukNz+fg/u87mZk9RQ= X-Google-Smtp-Source: AGHT+IEO9ptaDWmBRPMLzcmvU4PWU/axbQE1OQ1Sr/gONRNYdOccAQiOB5lc61VPrhdDcwaqGC9e+w== X-Received: by 2002:a17:90b:4b84:b0:2ea:4578:46de with SMTP id 98e67ed59e1d1-2eb0e52845cmr11193033a91.20.1732435389159; Sun, 24 Nov 2024 00:03:09 -0800 (PST) Received: from noel.flets-west.jp ([2405:6586:4480:a10:fa8f:7c3e:835f:c642]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ead03de6f6sm7956708a91.34.2024.11.24.00.03.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Nov 2024 00:03:08 -0800 (PST) From: Hironori KIKUCHI To: linux-kernel@vger.kernel.org Cc: Hironori KIKUCHI , Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Cercueil , Christophe Branchereau , Ryan Walklin , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH 2/6] drm: panel: nv3052c: Add another panel for RG35XX Plus (Rev6) Date: Sun, 24 Nov 2024 17:02:13 +0900 Message-ID: <20241124080220.1657238-3-kikuchan98@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241124080220.1657238-1-kikuchan98@gmail.com> References: <20241124080220.1657238-1-kikuchan98@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is a display panel used in the recent revision of the Anbernic RG35XX Plus, a handheld gaming device from Anbernic. It is 3.45 inches in size (diagonally) with a resolution of 640x480. It has the same interface (pins and connector) as the panel of the former revision of RG35XX Plus, but they differ in their init-sequence. So add it as a new panel. Signed-off-by: Hironori KIKUCHI --- .../gpu/drm/panel/panel-newvision-nv3052c.c | 178 ++++++++++++++++++ 1 file changed, 178 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c b/drivers/gpu/= drm/panel/panel-newvision-nv3052c.c index 06e16a7c14a..166393ccfed 100644 --- a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c +++ b/drivers/gpu/drm/panel/panel-newvision-nv3052c.c @@ -629,6 +629,156 @@ static const struct nv3052c_reg wl_355608_a8_panel_re= gs[] =3D { { 0x36, 0x0a }, // bgr =3D 1, ss =3D 1, gs =3D 0 }; =20 +static const struct nv3052c_reg ylm_lbv0345001h_v2_panel_regs[] =3D { + // EXTC Command set enable, select page 1 + { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x01 }, + // Mostly unknown registers + { 0xe3, 0x00 }, + { 0x0a, 0x01 }, + { 0x23, 0x00 }, // RGB interface control: DE+SYNC MODE PCLK-N + { 0x24, 0x10 }, + { 0x25, 0x09 }, + { 0x28, 0x47 }, + { 0x29, 0x01 }, + { 0x2a, 0xdf }, + { 0x38, 0x9c }, // VCOM_ADJ1 + { 0x39, 0xa7 }, // VCOM_ADJ2 + { 0x3a, 0x3f }, // VCOM_ADJ3 + { 0x91, 0x77 }, // EXTPW_CTRL2 + { 0x92, 0x77 }, // EXTPW_CTRL3 + { 0xa0, 0x55 }, + { 0xa1, 0x50 }, + { 0xa4, 0x9c }, + { 0xa7, 0x02 }, + { 0xa8, 0x01 }, + { 0xa9, 0x01 }, + { 0xaa, 0xfc }, + { 0xab, 0x28 }, + { 0xac, 0x06 }, + { 0xad, 0x06 }, + { 0xae, 0x06 }, + { 0xaf, 0x03 }, + { 0xb0, 0x08 }, + { 0xb1, 0x26 }, + { 0xb2, 0x28 }, + { 0xb3, 0x28 }, + { 0xb4, 0x03 }, + { 0xb5, 0x08 }, + { 0xb6, 0x26 }, + { 0xb7, 0x08 }, + { 0xb8, 0x26 }, + // EXTC Command set enable, select page 2 + { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x02 }, + // Set gray scale voltage to adjust gamma + { 0xb0, 0x02 }, // PGAMVR0 + { 0xb1, 0x0f }, // PGAMVR1 + { 0xb2, 0x11 }, // PGAMVR2 + { 0xb3, 0x32 }, // PGAMVR3 + { 0xb4, 0x36 }, // PGAMVR4 + { 0xb5, 0x3c }, // PGAMVR5 + { 0xb6, 0x20 }, // PGAMPR0 + { 0xb7, 0x3e }, // PGAMPR1 + { 0xb8, 0x0e }, // PGAMPK0 + { 0xb9, 0x05 }, // PGAMPK1 + { 0xba, 0x11 }, // PGAMPK2 + { 0xbb, 0x11 }, // PGAMPK3 + { 0xbc, 0x13 }, // PGAMPK4 + { 0xbd, 0x14 }, // PGAMPK5 + { 0xbe, 0x16 }, // PGAMPK6 + { 0xbf, 0x0e }, // PGAMPK7 + { 0xc0, 0x17 }, // PGAMPK8 + { 0xc1, 0x07 }, // PGAMPK9 + { 0xd0, 0x02 }, // NGAMVR0 + { 0xd1, 0x10 }, // NGAMVR0 + { 0xd2, 0x12 }, // NGAMVR1 + { 0xd3, 0x33 }, // NGAMVR2 + { 0xd4, 0x36 }, // NGAMVR3 + { 0xd5, 0x3c }, // NGAMVR4 + { 0xd6, 0x20 }, // NGAMPR0 + { 0xd7, 0x3e }, // NGAMPR1 + { 0xd8, 0x0d }, // NGAMPK0 + { 0xd9, 0x05 }, // NGAMPK1 + { 0xda, 0x12 }, // NGAMPK2 + { 0xdb, 0x11 }, // NGAMPK3 + { 0xdc, 0x14 }, // NGAMPK4 + { 0xdd, 0x14 }, // NGAMPK5 + { 0xde, 0x18 }, // NGAMPK6 + { 0xdf, 0x0f }, // NGAMPK7 + { 0xe0, 0x17 }, // NGAMPK8 + { 0xe1, 0x08 }, // NGAMPK9 + // EXTC Command set enable, select page 3 + { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x03 }, + // Set various timing settings + { 0x07, 0x03 }, // GIP_VST_8 + { 0x08, 0x00 }, // GIP_VST_9 + { 0x09, 0x01 }, // GIP_VST_10 + { 0x30, 0x00 }, // GIP_CLK_1 + { 0x31, 0x00 }, // GIP_CLK_2 + { 0x32, 0x00 }, // GIP_CLK_3 + { 0x33, 0x00 }, // GIP_CLK_4 + { 0x34, 0x61 }, // GIP_CLK_5 + { 0x35, 0xd4 }, // GIP_CLK_6 + { 0x36, 0x24 }, // GIP_CLK_7 + { 0x37, 0x03 }, // GIP_CLK_8 + { 0x40, 0x02 }, // GIP_CLKA_1 + { 0x41, 0x03 }, // GIP_CLKA_2 + { 0x42, 0x04 }, // GIP_CLKA_3 + { 0x43, 0x05 }, // GIP_CLKA_4 + { 0x44, 0x11 }, // GIP_CLKA_5 + { 0x45, 0xe6 }, // GIP_CLKA_6 + { 0x46, 0xe7 }, // GIP_CLKA_7 + { 0x47, 0x11 }, // GIP_CLKA_8 + { 0x48, 0xe8 }, // GIP_CLKA_9 + { 0x49, 0xe9 }, // GIP_CLKA_10 + { 0x50, 0x06 }, // GIP_CLKB_1 + { 0x51, 0x07 }, // GIP_CLKB_2 + { 0x52, 0x08 }, // GIP_CLKB_3 + { 0x53, 0x09 }, // GIP_CLKB_4 + { 0x54, 0x11 }, // GIP_CLKB_5 + { 0x55, 0xea }, // GIP_CLKB_6 + { 0x56, 0xeb }, // GIP_CLKB_7 + { 0x57, 0x11 }, // GIP_CLKB_8 + { 0x58, 0xec }, // GIP_CLKB_9 + { 0x59, 0xed }, // GIP_CLKB_10 + // Map internal GOA signals to GOA output pad + { 0x82, 0x00 }, // PANELU2D3 + { 0x83, 0x00 }, // PANELU2D4 + { 0x84, 0x02 }, // PANELU2D5 + { 0x85, 0x00 }, // PANELU2D6 + { 0x86, 0x1f }, // PANELU2D7 + { 0x87, 0x00 }, // PANELU2D8 + { 0x88, 0x1f }, // PANELU2D9 + { 0x89, 0x0e }, // PANELU2D10 + { 0x8a, 0x0e }, // PANELU2D11 + { 0x8b, 0x10 }, // PANELU2D12 + { 0x8c, 0x10 }, // PANELU2D13 + { 0x8d, 0x0a }, // PANELU2D14 + { 0x8e, 0x0a }, // PANELU2D15 + { 0x8f, 0x0c }, // PANELU2D16 + { 0x90, 0x0c }, // PANELU2D17 + { 0x98, 0x00 }, // PANELU2D25 + { 0x99, 0x00 }, // PANELU2D26 + { 0x9a, 0x01 }, // PANELU2D27 + { 0x9b, 0x00 }, // PANELU2D28 + { 0x9c, 0x1f }, // PANELU2D29 + { 0x9d, 0x00 }, // PANELU2D30 + { 0x9e, 0x1f }, // PANELU2D31 + { 0x9f, 0x0d }, // PANELU2D32 + { 0xa0, 0x0d }, // PANELU2D33 + { 0xa1, 0x0f }, // PANELU2D34 + { 0xa2, 0x0f }, // PANELU2D35 + { 0xa3, 0x09 }, // PANELU2D36 + { 0xa4, 0x09 }, // PANELU2D37 + { 0xa5, 0x0b }, // PANELU2D38 + { 0xa6, 0x0b }, // PANELU2D39 + // EXTC Command set enable, select page 0 + { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x00 }, + // Interface Pixel Format + { 0x3a, 0x77 }, + // Display Access Control + { 0x36, 0x0a }, // bgr =3D 1, ss =3D 1, gs =3D 0 +}; + static inline struct nv3052c *to_nv3052c(struct drm_panel *panel) { return container_of(panel, struct nv3052c, panel); @@ -881,6 +1031,21 @@ static const struct drm_display_mode wl_355608_a8_mod= e[] =3D { }, }; =20 +static const struct drm_display_mode ylm_lbv0345001h_v2_mode[] =3D { + { + .clock =3D 24000, + .hdisplay =3D 640, + .hsync_start =3D 640 + 84, + .hsync_end =3D 640 + 84 + 20, + .htotal =3D 640 + 84 + 20 + 26, + .vdisplay =3D 480, + .vsync_start =3D 480 + 32, + .vsync_end =3D 480 + 32 + 4, + .vtotal =3D 480 + 32 + 4 + 5, + .flags =3D DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, + }, +}; + static const struct nv3052c_panel_info ltk035c5444t_panel_info =3D { .display_modes =3D ltk035c5444t_modes, .num_modes =3D ARRAY_SIZE(ltk035c5444t_modes), @@ -914,10 +1079,22 @@ static const struct nv3052c_panel_info wl_355608_a8_= panel_info =3D { .panel_regs_len =3D ARRAY_SIZE(wl_355608_a8_panel_regs), }; =20 +static const struct nv3052c_panel_info ylm_lbv0345001h_v2_panel_info =3D { + .display_modes =3D ylm_lbv0345001h_v2_mode, + .num_modes =3D ARRAY_SIZE(ylm_lbv0345001h_v2_mode), + .width_mm =3D 70, + .height_mm =3D 53, + .bus_format =3D MEDIA_BUS_FMT_RGB888_1X24, + .bus_flags =3D DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, + .panel_regs =3D ylm_lbv0345001h_v2_panel_regs, + .panel_regs_len =3D ARRAY_SIZE(ylm_lbv0345001h_v2_panel_regs), +}; + static const struct spi_device_id nv3052c_ids[] =3D { { "ltk035c5444t", }, { "fs035vg158", }, { "rg35xx-plus-panel", }, + { "rg35xx-plus-rev6-panel", }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(spi, nv3052c_ids); @@ -926,6 +1103,7 @@ static const struct of_device_id nv3052c_of_match[] = =3D { { .compatible =3D "leadtek,ltk035c5444t", .data =3D <k035c5444t_panel_i= nfo }, { .compatible =3D "fascontek,fs035vg158", .data =3D &fs035vg158_panel_inf= o }, { .compatible =3D "anbernic,rg35xx-plus-panel", .data =3D &wl_355608_a8_p= anel_info }, + { .compatible =3D "anbernic,rg35xx-plus-rev6-panel", .data =3D &ylm_lbv03= 45001h_v2_panel_info }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, nv3052c_of_match); --=20 2.47.0 From nobody Sun Feb 8 05:28:26 2026 Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) (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 D15C21632C7; Sun, 24 Nov 2024 08:03:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732435395; cv=none; b=t+WE6lfoVlJLYLMJz4Sqd6oi/Orgr3vcZPNONwPs9iFoPjOrDVCIGPMZUPCRa7VL0CM/5vt6eaco8pcrIJcawXmSjDb0Huhgr6ZChp8GwrOkkGrfZ172D/BoCFQActlwtIEoSE3b4WbppyT9/i/vc1qgdwyapvwlKE71mtW0aOU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732435395; c=relaxed/simple; bh=zt89irQDW9CsH40Zyg/0WkJVDAxLXQtPDXUHOyIhEG4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lvd7cUK870RFJd9cAEwALPcLK3rd+0NknEC9vJ6jo+fFuJ6T1pjb0OMubqSWqJZCSCvnslCuevS0sA4TxEb0KjsLz7uAiPMVXeB2t/r/Vvs8KNH2s+0S6rPvHRFyeOencuXgGFuODKDjn7wNbPBecUA24uHdvZFK8CG5fPunmgc= 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=lN9RjGNW; arc=none smtp.client-ip=209.85.216.47 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="lN9RjGNW" Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-2e3686088c3so2807416a91.0; Sun, 24 Nov 2024 00:03:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732435393; x=1733040193; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iyN3lb5o5xZdLZFjo/taUmbi+nBHaQ8I8tpHgqQH4t0=; b=lN9RjGNWGlRs1JD3/W6JiGkuq1JnzqQfg4F54YZ6NiQeg/JHxjR+E0PHIOVbwL1xDV kLAkLQGoo7Tjka0j2/blumtP/FCPPaezndaKjXx2sDwwUSwABcgN/aS1e5cTGOvLf9wO Hd4DPlosfb9GvFJ75ks28qqeMa8rIIHWx3/xiYW6ea82kxwVrNuzF2kEY8mA7T+0BqpA O6vtk2kPiXtWZTuQfoyC+VrfHnqmtPlPWtaBlIAR1VlCOqJhbxTbSCEdcJYrl8jrIV+L IKsbFTjvA+wbLtiEKNODMkxmzJ3Roix/M9fscxX2aBwZkAnTR0dxLB8azX6RpCQ7LrCq N7FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732435393; x=1733040193; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iyN3lb5o5xZdLZFjo/taUmbi+nBHaQ8I8tpHgqQH4t0=; b=dG+IfKlISTkJA1DzoVnQeYwhRjmnWdGnO9y4w8OTfIHPLrEWmrQFqb3fSNADCbANaB onIQPrL0vbeeKCwlS3H6lKB+8Gni97+X9idVK23yxGAiIRsc7V+aXOrlA/Ij6olU2jsU fOcZt6SDnswdxmzh/t+ircb09mIBn1RnR6LM18yL7KuLRRXzNkjpVAuFA5YEZFhq2m1i /5MM1J50f/q7sRayoYOtCv1ACyRN78tyTv7YaQTMWC3Q3mRo6itsg2EoA+wBgvO4xncm WpIYg3R2HGjOWw7RWuNq7ijGhm1/vWnuKwfQSNDbppvZjo5lOF1psijgRNCW5ktcJQZV Z/rA== X-Forwarded-Encrypted: i=1; AJvYcCUSHJNmnDW5leQODDNrQpNit9TCKClJOgq9sfYEJrj5UR+P7vpxz/2HEn8Od8yXn/ENA+cuzz+diY8s@vger.kernel.org X-Gm-Message-State: AOJu0YzNaDHQ4y6LcyYF0VfVivpv2V9Ssz6ABQ5xNROLDSvcHBVE/M2D sEJDzDfqUaYs3drSsad40OHeAoXd3W0tXZwwi7RL/uif6msyI44zq41wRkYsd3Q= X-Gm-Gg: ASbGncv0njduyFmz8yqi2F6vEXNarFqqLNiUzZkRigZi3wojvQVjXgOpVyqftzenhkH 7sizcYyReFI1Wd8/o6SKapXjIypmgPsBLybcy4ApY3xnskp/hKGifRJym7yJHmykDMZAkIevH/6 2RHV01nvjr3PMKjJrtxTZ/EM5M5wfAMqPg3eq5UtZl0cia1Hgzdsv7/MR1VHyb4mdXgpT14gmw8 YKP+pIo2/+wH6hKEuFTFTErnlIp8J3oQEVVyRdjgkbbcrkKy1EXAfIIBdT/WAA= X-Google-Smtp-Source: AGHT+IHm7fTQFFW7HR2+//ajs5yB9voo7Vxd8MOCqrw1gY2F4ee0ZrKdNLDFYAHMj9ASYYKS7Gb1JQ== X-Received: by 2002:a17:90b:17c8:b0:2ea:8e42:c46 with SMTP id 98e67ed59e1d1-2eb0d50eb9dmr12049101a91.0.1732435393155; Sun, 24 Nov 2024 00:03:13 -0800 (PST) Received: from noel.flets-west.jp ([2405:6586:4480:a10:fa8f:7c3e:835f:c642]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ead03de6f6sm7956708a91.34.2024.11.24.00.03.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Nov 2024 00:03:12 -0800 (PST) From: Hironori KIKUCHI To: linux-kernel@vger.kernel.org Cc: Hironori KIKUCHI , Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Cercueil , Christophe Branchereau , Ryan Walklin , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH 3/6] dt-bindings: display: panel: Add a panel for RG40XX series Date: Sun, 24 Nov 2024 17:02:14 +0900 Message-ID: <20241124080220.1657238-4-kikuchan98@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241124080220.1657238-1-kikuchan98@gmail.com> References: <20241124080220.1657238-1-kikuchan98@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is a display panel used in the Anbernic RG40XX series (H and V), a handheld gaming device from Anbernic. It is 4.00 inches in size (diagonally) with a resolution of 640x480. Signed-off-by: Hironori KIKUCHI --- .../display/panel/anbernic,rg40xx-panel.yaml | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/anberni= c,rg40xx-panel.yaml diff --git a/Documentation/devicetree/bindings/display/panel/anbernic,rg40x= x-panel.yaml b/Documentation/devicetree/bindings/display/panel/anbernic,rg4= 0xx-panel.yaml new file mode 100644 index 00000000000..bec5363e1d5 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/anbernic,rg40xx-panel= .yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/anbernic,rg40xx-panel.yam= l# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Anbernic RG40XX series (YLM-LBV0400001X-V1) 4.00" 640x480 24-bit IP= S LCD panel + +maintainers: + - Hironori KIKUCHI + +allOf: + - $ref: panel-common.yaml# + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +properties: + compatible: + const: anbernic,rg40xx-panel + + reg: + maxItems: 1 + + spi-3wire: true + +required: + - compatible + - reg + - port + - power-supply + - reset-gpios + +unevaluatedProperties: false + +examples: + - | + #include + + spi { + #address-cells =3D <1>; + #size-cells =3D <0>; + + panel@0 { + compatible =3D "anbernic,rg40xx-panel"; + reg =3D <0>; + + spi-3wire; + spi-max-frequency =3D <3125000>; + + reset-gpios =3D <&pio 8 14 GPIO_ACTIVE_LOW>; // PI14 + + backlight =3D <&backlight>; + power-supply =3D <®_lcd>; + + port { + endpoint { + remote-endpoint =3D <&tcon_lcd0_out_lcd>; + }; + }; + }; + }; --=20 2.47.0 From nobody Sun Feb 8 05:28:26 2026 Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) (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 C003418732E; Sun, 24 Nov 2024 08:03:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732435399; cv=none; b=vCy/QWgd9T8t/v6svajjVwEDw4un7nRjk+hX+xbkbv3jjoB9iZxUjMTG48HfZD/EUZJ7ZGXns+fj5vRHw96KTE22c9qe5UmoDZVY6uTgtj9qDYL065xaKVnJH4FZnvgVDwjePKb8scyqIWEjWOcdoClTCqxlbXoI9G/uI0tg/gw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732435399; c=relaxed/simple; bh=jqUeFYM4lIY+HssR2JBhXWL6AVcxjsMraK+hTjf5vTU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QLMinJ/VKnKhwYGUVFdev4miX3UlBW6J0cqyo/k2syuoGPXwK1ahEVMiK3n7/7jR6mbOgSTrBnQjKHAzkDJKQseTD3HBO/WTLU0iCsC4Lre7KK3UoxiHP5SiXv1CEEqf8+fZUJqGTOVoXRzFO+uAvgvWJ5zw090ppcMetAy5XIE= 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=b9XJGios; arc=none smtp.client-ip=209.85.215.178 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="b9XJGios" Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-7fbce800ee5so1794766a12.2; Sun, 24 Nov 2024 00:03:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732435397; x=1733040197; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6C0VSpqHJ4qDm/QynyM6hHlMGBr/aZVtEWrJLfbsX/Y=; b=b9XJGiosCOgnMseCZ/I3ORGkI3gfqw6I0iyTjDZGwS0IXtNOa4iecmqkbxfMUhN4FW hAQYZ9nuYIveEZy0iBD4Fqua8akqRnpdlAbIG0kaixDqJ4QG6SUiyfC9rvL/KxQHniAb 80CrMSKjjS8NqfO5esteVRfVyRQA1pkv8xJOqY483nTphEUT+q7SuDU9T+5+EgX8h5MX v7kYJBamaKAJKuodqqL4jt+PMXdGQsLkMBxwCypG4J9hd2t4q2aYR4YRJ3udepwgAL2D 20tZrTi643nIpYvkwgWGUkfh/siZMcaHBNrEIq3nHHgObNuT8Mc9lOmM+jdC9wH7HtbS wk3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732435397; x=1733040197; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6C0VSpqHJ4qDm/QynyM6hHlMGBr/aZVtEWrJLfbsX/Y=; b=xCD8cF+MPX4w6CwIXe5D026XnoXDgwrRN4zpNsy+lqgH2PWaC14Ajfx0SbbgZERY+6 Nz+/FdJ2wAfOLHzSQE1qmn7tAFu3oph0e6FwcsMgpi1RBXRFhwjvi8QpvDtLg13SUjRu f1RvrhUzi43xZt9Fvai4+X3Tmw0ra988JfL5Bs8vjUTZrPP7yUaIFkzatq5MT4rFeoAD fR3bi3IXViKwfwpu0hQrnqY9mnpxA9RmjBAuUoeuLCb9sptpQ+8ur2kSoBdOoDO7wXLw pR+estOaMFiTcwF8sqFLoBZjquKzPIlQz0QAwZ6/5wPQuDuJZ4eJidQSTkIhdrfx7u4F E+eA== X-Forwarded-Encrypted: i=1; AJvYcCWY91Xa11mLhE2MyG7iQn5B6CHKiYWx0AIJ6GIY77t21VjUAudUBBjjblZb4f0ocMnZovycXF+6XB09@vger.kernel.org X-Gm-Message-State: AOJu0Yx+LJVT3umQ03V4BysxcdoiyvShfamoRdP85yavGMhEK47PyzMi ZB6ts9hpGGiUqRnOnpBsbhJ5C9UkovvNCtpADfTkHq/cNjt2fKoSPA549+RDTPI= X-Gm-Gg: ASbGncvJMaDqnKuaRPdKn0LHERZHWpLIhRBl4v2Q/MmbJH4rA3+RCleWqNluPeG8Tv7 /M16bgipwPfe+EPlENqO9TzO8YipqABXCPT8AQ4DxyGHPqgeL/WaJhv4j8E5MgZiaZT2/YPct6C nzsXDeQZPfPbD7JYv4uCdKGo2GhjMNwOAPBkbzhQJQFQYJgGPoB8aOHsc5fuyo0GON8TAeJO0Ik KnUJ3lauDLZxwEZ2iHu72yNUSDe+k3oaQjnuH8Myo/YniLo714uMMf/lQSjmnU= X-Google-Smtp-Source: AGHT+IGe+c7w0mSssm11jhSDpPDgnKc+pnCl/8Vm/OFco3CDhxyb5AnDciU1Nf0Hh76biUY15o0iFQ== X-Received: by 2002:a17:90b:2e44:b0:2ea:a565:18b1 with SMTP id 98e67ed59e1d1-2eb0e02b6d6mr12150652a91.8.1732435397178; Sun, 24 Nov 2024 00:03:17 -0800 (PST) Received: from noel.flets-west.jp ([2405:6586:4480:a10:fa8f:7c3e:835f:c642]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ead03de6f6sm7956708a91.34.2024.11.24.00.03.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Nov 2024 00:03:16 -0800 (PST) From: Hironori KIKUCHI To: linux-kernel@vger.kernel.org Cc: Hironori KIKUCHI , Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Cercueil , Christophe Branchereau , Ryan Walklin , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH 4/6] drm: panel: nv3052c: Add a panel for RG40XX series Date: Sun, 24 Nov 2024 17:02:15 +0900 Message-ID: <20241124080220.1657238-5-kikuchan98@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241124080220.1657238-1-kikuchan98@gmail.com> References: <20241124080220.1657238-1-kikuchan98@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is a display panel used in the Anbernic RG40XX series (H and V), a handheld gaming device from Anbernic. It is 4.00 inches in size (diagonally) with a resolution of 640x480. Signed-off-by: Hironori KIKUCHI Tested-by: Philippe Simons --- .../gpu/drm/panel/panel-newvision-nv3052c.c | 212 ++++++++++++++++++ 1 file changed, 212 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c b/drivers/gpu/= drm/panel/panel-newvision-nv3052c.c index 166393ccfed..5a7cf6cb8be 100644 --- a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c +++ b/drivers/gpu/drm/panel/panel-newvision-nv3052c.c @@ -779,6 +779,190 @@ static const struct nv3052c_reg ylm_lbv0345001h_v2_pa= nel_regs[] =3D { { 0x36, 0x0a }, // bgr =3D 1, ss =3D 1, gs =3D 0 }; =20 +static const struct nv3052c_reg ylm_lbv0400001x_v1_panel_regs[] =3D { + // EXTC Command set enable, select page 1 + { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x01 }, + // Mostly unknown registers + { 0xe3, 0x00 }, + { 0x0a, 0x01 }, // WRMADC_EN + { 0x23, 0x00 }, // RGB interface control: DE+SYNC MODE PCLK-N + { 0x25, 0x14 }, + { 0x28, 0x47 }, + { 0x29, 0x01 }, + { 0x2a, 0xdf }, + { 0x38, 0x9c }, // VCOM_ADJ1 + { 0x39, 0xa7 }, // VCOM_ADJ2 + { 0x3a, 0x47 }, // VCOM_ADJ3 + { 0x91, 0x77 }, // EXTPW_CTRL2 + { 0x92, 0x77 }, // EXTPW_CTRL3 + { 0x99, 0x52 }, // PUMP_CTRL2 + { 0x9b, 0x5b }, // PUMP_CTRL4 + { 0xa0, 0x55 }, + { 0xa1, 0x50 }, + { 0xa4, 0x9c }, + { 0xa7, 0x02 }, + { 0xa8, 0x01 }, + { 0xa9, 0x01 }, + { 0xaa, 0xfc }, + { 0xab, 0x28 }, + { 0xac, 0x06 }, + { 0xad, 0x06 }, + { 0xae, 0x06 }, + { 0xaf, 0x03 }, + { 0xb0, 0x08 }, + { 0xb1, 0x26 }, + { 0xb2, 0x28 }, + { 0xb3, 0x28 }, + { 0xb4, 0x03 }, + { 0xb5, 0x08 }, + { 0xb6, 0x26 }, + { 0xb7, 0x08 }, + { 0xb8, 0x26 }, + // EXTC Command set enable, select page 2 + { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x02 }, + // Set gray scale voltage to adjust gamma + { 0xb0, 0x05 }, // PGAMVR0 + { 0xb1, 0x12 }, // PGAMVR1 + { 0xb2, 0x13 }, // PGAMVR2 + { 0xb3, 0x2c }, // PGAMVR3 + { 0xb4, 0x2a }, // PGAMVR4 + { 0xb5, 0x37 }, // PGAMVR5 + { 0xb6, 0x27 }, // PGAMPR0 + { 0xb7, 0x42 }, // PGAMPR1 + { 0xb8, 0x0f }, // PGAMPK0 + { 0xb9, 0x06 }, // PGAMPK1 + { 0xba, 0x12 }, // PGAMPK2 + { 0xbb, 0x12 }, // PGAMPK3 + { 0xbc, 0x13 }, // PGAMPK4 + { 0xbd, 0x15 }, // PGAMPK5 + { 0xbe, 0x1b }, // PGAMPK6 + { 0xbf, 0x14 }, // PGAMPK7 + { 0xc0, 0x1d }, // PGAMPK8 + { 0xc1, 0x09 }, // PGAMPK9 + { 0xd0, 0x02 }, // NGAMVR0 + { 0xd1, 0x1c }, // NGAMVR0 + { 0xd2, 0x1d }, // NGAMVR1 + { 0xd3, 0x36 }, // NGAMVR2 + { 0xd4, 0x34 }, // NGAMVR3 + { 0xd5, 0x32 }, // NGAMVR4 + { 0xd6, 0x25 }, // NGAMPR0 + { 0xd7, 0x40 }, // NGAMPR1 + { 0xd8, 0x0d }, // NGAMPK0 + { 0xd9, 0x04 }, // NGAMPK1 + { 0xda, 0x12 }, // NGAMPK2 + { 0xdb, 0x12 }, // NGAMPK3 + { 0xdc, 0x13 }, // NGAMPK4 + { 0xdd, 0x15 }, // NGAMPK5 + { 0xde, 0x15 }, // NGAMPK6 + { 0xdf, 0x0c }, // NGAMPK7 + { 0xe0, 0x13 }, // NGAMPK8 + { 0xe1, 0x07 }, // NGAMPK9 + // EXTC Command set enable, select page 3 + { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x03 }, + // Set various timing settings + { 0x08, 0x0a }, // GIP_VST_9 + { 0x09, 0x0b }, // GIP_VST_10 + { 0x30, 0x00 }, // GIP_CLK_1 + { 0x31, 0x00 }, // GIP_CLK_2 + { 0x32, 0x00 }, // GIP_CLK_3 + { 0x33, 0x00 }, // GIP_CLK_4 + { 0x34, 0x61 }, // GIP_CLK_5 + { 0x35, 0xd4 }, // GIP_CLK_6 + { 0x36, 0x24 }, // GIP_CLK_7 + { 0x37, 0x03 }, // GIP_CLK_8 + { 0x40, 0x0d }, // GIP_CLKA_1 + { 0x41, 0x0e }, // GIP_CLKA_2 + { 0x42, 0x0f }, // GIP_CLKA_3 + { 0x43, 0x10 }, // GIP_CLKA_4 + { 0x44, 0x11 }, // GIP_CLKA_5 + { 0x45, 0xf4 }, // GIP_CLKA_6 + { 0x46, 0xf5 }, // GIP_CLKA_7 + { 0x47, 0x11 }, // GIP_CLKA_8 + { 0x48, 0xf6 }, // GIP_CLKA_9 + { 0x49, 0xf7 }, // GIP_CLKA_10 + { 0x50, 0x11 }, // GIP_CLKB_1 + { 0x51, 0x12 }, // GIP_CLKB_2 + { 0x52, 0x13 }, // GIP_CLKB_3 + { 0x53, 0x14 }, // GIP_CLKB_4 + { 0x54, 0x11 }, // GIP_CLKB_5 + { 0x55, 0xf8 }, // GIP_CLKB_6 + { 0x56, 0xf9 }, // GIP_CLKB_7 + { 0x57, 0x11 }, // GIP_CLKB_8 + { 0x58, 0xfa }, // GIP_CLKB_9 + { 0x59, 0xfb }, // GIP_CLKB_10 + { 0x60, 0x05 }, // GIP_CLKC_1 + { 0x61, 0x05 }, // GIP_CLKC_2 + { 0x65, 0x0a }, // GIP_CLKC_6 + { 0x66, 0x0a }, // GIP_CLKC_7 + // Map internal GOA signals to GOA output pad + { 0x82, 0x1e }, // PANELU2D3 + { 0x83, 0x1f }, // PANELU2D4 + { 0x84, 0x11 }, // PANELU2D5 + { 0x85, 0x02 }, // PANELU2D6 + { 0x86, 0x1e }, // PANELU2D7 + { 0x87, 0x1e }, // PANELU2D8 + { 0x88, 0x1f }, // PANELU2D9 + { 0x89, 0x0e }, // PANELU2D10 + { 0x8a, 0x0e }, // PANELU2D11 + { 0x8b, 0x10 }, // PANELU2D12 + { 0x8c, 0x10 }, // PANELU2D13 + { 0x8d, 0x0a }, // PANELU2D14 + { 0x8e, 0x0a }, // PANELU2D15 + { 0x8f, 0x0c }, // PANELU2D16 + { 0x90, 0x0c }, // PANELU2D17 + { 0x98, 0x1e }, // PANELU2D25 + { 0x99, 0x1f }, // PANELU2D26 + { 0x9a, 0x11 }, // PANELU2D27 + { 0x9b, 0x01 }, // PANELU2D28 + { 0x9c, 0x1e }, // PANELU2D29 + { 0x9d, 0x1e }, // PANELU2D30 + { 0x9e, 0x1f }, // PANELU2D31 + { 0x9f, 0x0d }, // PANELU2D32 + { 0xa0, 0x0d }, // PANELU2D33 + { 0xa1, 0x0f }, // PANELU2D34 + { 0xa2, 0x0f }, // PANELU2D35 + { 0xa3, 0x09 }, // PANELU2D36 + { 0xa4, 0x09 }, // PANELU2D37 + { 0xa5, 0x0b }, // PANELU2D38 + { 0xa6, 0x0b }, // PANELU2D39 + { 0xb2, 0x1f }, // PANELD2U3 + { 0xb3, 0x1e }, // PANELD2U4 + { 0xb4, 0x11 }, // PANELD2U5 + { 0xb5, 0x01 }, // PANELD2U6 + { 0xb6, 0x1e }, // PANELD2U7 + { 0xb7, 0x1e }, // PANELD2U8 + { 0xb8, 0x1f }, // PANELD2U9 + { 0xb9, 0x0b }, // PANELD2U10 + { 0xba, 0x0b }, // PANELD2U11 + { 0xbb, 0x09 }, // PANELD2U12 + { 0xbc, 0x09 }, // PANELD2U13 + { 0xbd, 0x0f }, // PANELD2U14 + { 0xbe, 0x0f }, // PANELD2U15 + { 0xbf, 0x0d }, // PANELD2U16 + { 0xc0, 0x0d }, // PANELD2U17 + { 0xc8, 0x1f }, // PANELD2U25 + { 0xc9, 0x1e }, // PANELD2U26 + { 0xca, 0x11 }, // PANELD2U27 + { 0xcb, 0x02 }, // PANELD2U28 + { 0xcc, 0x1e }, // PANELD2U29 + { 0xcd, 0x1e }, // PANELD2U30 + { 0xce, 0x1f }, // PANELD2U31 + { 0xcf, 0x0c }, // PANELD2U32 + { 0xd0, 0x0c }, // PANELD2U33 + { 0xd1, 0x0a }, // PANELD2U34 + { 0xd2, 0x0a }, // PANELD2U35 + { 0xd3, 0x10 }, // PANELD2U36 + { 0xd4, 0x10 }, // PANELD2U37 + { 0xd5, 0x0e }, // PANELD2U38 + { 0xd6, 0x0e }, // PANELD2U39 + // EXTC Command set enable, select page 0 + { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x00 }, + // Interface Pixel Format + { 0x3a, 0x77 }, + // Display Access Control + { 0x36, 0x0a }, // bgr =3D 1, ss =3D 1, gs =3D 0 +}; + static inline struct nv3052c *to_nv3052c(struct drm_panel *panel) { return container_of(panel, struct nv3052c, panel); @@ -1046,6 +1230,21 @@ static const struct drm_display_mode ylm_lbv0345001h= _v2_mode[] =3D { }, }; =20 +static const struct drm_display_mode ylm_lbv0400001x_v1_mode[] =3D { + { + .clock =3D 24000, + .hdisplay =3D 640, + .hsync_start =3D 640 + 84, + .hsync_end =3D 640 + 84 + 20, + .htotal =3D 640 + 84 + 20 + 26, + .vdisplay =3D 480, + .vsync_start =3D 480 + 20, + .vsync_end =3D 480 + 20 + 4, + .vtotal =3D 480 + 20 + 4 + 16, + .flags =3D DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, + }, +}; + static const struct nv3052c_panel_info ltk035c5444t_panel_info =3D { .display_modes =3D ltk035c5444t_modes, .num_modes =3D ARRAY_SIZE(ltk035c5444t_modes), @@ -1090,11 +1289,23 @@ static const struct nv3052c_panel_info ylm_lbv03450= 01h_v2_panel_info =3D { .panel_regs_len =3D ARRAY_SIZE(ylm_lbv0345001h_v2_panel_regs), }; =20 +static const struct nv3052c_panel_info ylm_lbv0400001x_v1_panel_info =3D { + .display_modes =3D ylm_lbv0400001x_v1_mode, + .num_modes =3D ARRAY_SIZE(ylm_lbv0400001x_v1_mode), + .width_mm =3D 81, + .height_mm =3D 61, + .bus_format =3D MEDIA_BUS_FMT_RGB888_1X24, + .bus_flags =3D DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, + .panel_regs =3D ylm_lbv0400001x_v1_panel_regs, + .panel_regs_len =3D ARRAY_SIZE(ylm_lbv0400001x_v1_panel_regs), +}; + static const struct spi_device_id nv3052c_ids[] =3D { { "ltk035c5444t", }, { "fs035vg158", }, { "rg35xx-plus-panel", }, { "rg35xx-plus-rev6-panel", }, + { "rg40xx-panel", }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(spi, nv3052c_ids); @@ -1104,6 +1315,7 @@ static const struct of_device_id nv3052c_of_match[] = =3D { { .compatible =3D "fascontek,fs035vg158", .data =3D &fs035vg158_panel_inf= o }, { .compatible =3D "anbernic,rg35xx-plus-panel", .data =3D &wl_355608_a8_p= anel_info }, { .compatible =3D "anbernic,rg35xx-plus-rev6-panel", .data =3D &ylm_lbv03= 45001h_v2_panel_info }, + { .compatible =3D "anbernic,rg40xx-panel", .data =3D &ylm_lbv0400001x_v1_= panel_info }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, nv3052c_of_match); --=20 2.47.0 From nobody Sun Feb 8 05:28:26 2026 Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (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 34C77189F36; Sun, 24 Nov 2024 08:03:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732435403; cv=none; b=CjYcb5ij7M8c7gYGZdqSQmA8DwS3PyGcYSFObHZUbmY4kblfZvYblvgfcwW+jUiyzfVtSQE73KwHJdElMVVaLsG0lx4IrWDVDo+Bgge1wP7NCPNhbJ3FdsUKPC2cSDjO6Ex5Ab5GRcLL8lC6lIko65aCYy0u1Dv6pnsLUYA/V7g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732435403; c=relaxed/simple; bh=a5j7Io24LFIPUKBcYYsry+kVOyWQS053YfY4+OsM4qE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XG3e+fc7Ay8qXv5KXs4PooiRB451KQayhSjPCwfoROH7jBJjb88owwFC3pvNho8X4ChsssMXTydsDjH03PwtcDMFT5Q/ytbEmm6Pzxou0R0uKC6s58SXuAN1G5kjSwRjIUVxFVUKcwZ0Q2oGU/lYoTfTz64IiKW9uWMrUExHjwY= 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=OYrC6Hyn; arc=none smtp.client-ip=209.85.210.174 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="OYrC6Hyn" Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-724f42c1c38so686314b3a.1; Sun, 24 Nov 2024 00:03:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732435401; x=1733040201; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2BH34sqlSKOe9iOZou+43GhfbA7c8h+EbLyzmlovlj4=; b=OYrC6Hyn+rGc6Kgwu4c4DEMHr7YnkrB7enPIfTo9LvbOKLHFzGa+mivVxvOduKyt+V cvHOoyMAkhej1WS7eH37GAn0JwhfRQcNjK7/jRTq+BXkitGcSrpUPE8KBEVI6HJWutih UcKfiCa22kRIpLEQHFiIzFm1eAKhORwm2vzbTr1O3aUQzVgTOZIFnLaRTku7ykiuPllj R8BfthwVJpkypTNN7YnvCZLYAxc1xpiumz35wE6IrMl8jk41oLcza2g85onbRsC406Ga h17eeEbheDPioTnOtFeQ9rUgP3R84giIFeZPJOysoCl3WQmLVAxq62De7WARjll22Fn5 b5ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732435401; x=1733040201; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2BH34sqlSKOe9iOZou+43GhfbA7c8h+EbLyzmlovlj4=; b=cEdvOVyLproNFyEuE5i6MkPNUI87WUjBYGebYW2gzgbQd6v8jlC+7DGmD+wbb4285r gAFwZd8KWitOY5/RybjvTBIfjpS1kqtbsmIue7WCcf+3faWG+f6L0V54nygCjBC4Q0bD EKYlYPZHWObaC/vkNiTO4g2zqRPWAPGb1Z5G6W6mE4nHIISrr6GS0+lT8/PtL/jsw+sm XW9EJkYCs+wBaUKPKiCM2XOhfwOmi19ee9UYoLWv8SvysSkkDCfnFRii3h5JHwy45XLU 1vRE6PIoMfq8bRxLxKqwkhSjwa4U22Y1Kn9BuG6j7wzDpBbKESOR8KHheEjop/GUrq6V o47w== X-Forwarded-Encrypted: i=1; AJvYcCXpoudLjN81lTTM96NgSkBYIcYoMaJ6wKTTK667P6ha83hagzgneLNdSrMEINA+j7sH4ac1aEg8FzP/@vger.kernel.org X-Gm-Message-State: AOJu0YxGJfzWBOf7EcGdiXAt6B8OkreHrRHLgwFmYDkPg9GQdpXEexfA W7MfB4+tTTncvnJnS8KidQ6sf3b7bap9gvVRh7mJe1YoNE/LYSLKs3pe5wCmXTc= X-Gm-Gg: ASbGncsIjFe9cttRaErj0Rtg+fTnCpf9Xh0HuYYmi9swHgnJxj56Ufdbasskc3fJVJ+ y/XP2Hyrj/EYsnpC0HFZmS1kLW3J6jk5Bw+MN9z1vGzEeQqLdkrihzJpAGRwnD5hHL8/zzhmHpV dSQB1+zrDWf6DpGG3EzBI9XTGxL+Cq0FvIkdbVzMt52Raotv79qOeE2YkCE9NDbJqjYQW3Jw3XI 2ul8YNVL3It8WHJTaaVtkeCt1xTNqKdZCySxnKrJK1umdI/zIFEaCMSC30weMg= X-Google-Smtp-Source: AGHT+IGhvZ9kwy0Xr/geb5tz16xfptX1YZTk6nh2OmyjAzk03SO8bAiB+Y9rTFNC9wmMHaz163RmGw== X-Received: by 2002:a17:90b:17cd:b0:2ea:7368:3359 with SMTP id 98e67ed59e1d1-2eb0e126a6cmr10208596a91.5.1732435401445; Sun, 24 Nov 2024 00:03:21 -0800 (PST) Received: from noel.flets-west.jp ([2405:6586:4480:a10:fa8f:7c3e:835f:c642]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ead03de6f6sm7956708a91.34.2024.11.24.00.03.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Nov 2024 00:03:20 -0800 (PST) From: Hironori KIKUCHI To: linux-kernel@vger.kernel.org Cc: Hironori KIKUCHI , Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Cercueil , Christophe Branchereau , Ryan Walklin , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH 5/6] dt-bindings: display: panel: Add a panel for RG CubeXX Date: Sun, 24 Nov 2024 17:02:16 +0900 Message-ID: <20241124080220.1657238-6-kikuchan98@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241124080220.1657238-1-kikuchan98@gmail.com> References: <20241124080220.1657238-1-kikuchan98@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is a display panel used in the Anbernic RG CubeXX, a handheld gaming device from Anbernic. It is 3.95 inches in size (diagonally) with a resolution of 720x720. Signed-off-by: Hironori KIKUCHI --- .../panel/anbernic,rgcubexx-panel.yaml | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/anberni= c,rgcubexx-panel.yaml diff --git a/Documentation/devicetree/bindings/display/panel/anbernic,rgcub= exx-panel.yaml b/Documentation/devicetree/bindings/display/panel/anbernic,r= gcubexx-panel.yaml new file mode 100644 index 00000000000..47c5174fad2 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/anbernic,rgcubexx-pan= el.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/anbernic,rgcubexx-panel.y= aml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Anbernic RG CubeXX (YLM-LBN0395004H-V1) 3.95" 720x720 24-bit IPS LC= D panel + +maintainers: + - Hironori KIKUCHI + +allOf: + - $ref: panel-common.yaml# + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +properties: + compatible: + const: anbernic,rgcubexx-panel + + reg: + maxItems: 1 + + spi-3wire: true + +required: + - compatible + - reg + - port + - power-supply + - reset-gpios + +unevaluatedProperties: false + +examples: + - | + #include + + spi { + #address-cells =3D <1>; + #size-cells =3D <0>; + + panel@0 { + compatible =3D "anbernic,rgcubexx-panel"; + reg =3D <0>; + + spi-3wire; + spi-max-frequency =3D <3125000>; + + reset-gpios =3D <&pio 8 14 GPIO_ACTIVE_LOW>; // PI14 + + backlight =3D <&backlight>; + power-supply =3D <®_lcd>; + + port { + endpoint { + remote-endpoint =3D <&tcon_lcd0_out_lcd>; + }; + }; + }; + }; --=20 2.47.0 From nobody Sun Feb 8 05:28:26 2026 Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) (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 31A7A1885A0; Sun, 24 Nov 2024 08:03:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732435409; cv=none; b=rGx90k36zz3YCI5lBpaWjgRq3mHw8Tz1xtd46bk7N7r67EdPWD5k7oJ+gZysYmmqb2gBDc2uwW/qZr3++dRO6vkSEMcC2A7JXyvdpsBcgBm5K+5LjXL8vErMYPcxXdyFv9o7FatzgrOwHKdvEe70/g9rNZyoKC9gb5d7lfTDmzM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732435409; c=relaxed/simple; bh=DBmLFY0sxryRon9gwVbpvN9e66kEu7OwWDFLjtHT7Ik=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=l8lfdK9hjjQ12xPIIfhYCqyJB5595r+zLzRYiumapcV0fQzvFa+H3ctCOyyd+yrLWvsz1aAYOn67CAk+rTb3WurIJ2bfyYqDKRdYgoymDdSSUuTLSAUv3BK00cokgdORX8lpzvAaZmsSRvv6fFO1RimtqMNRQKG/VB/2MdA2ABY= 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=AIRLfXdl; arc=none smtp.client-ip=209.85.216.48 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="AIRLfXdl" Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-2eb1433958dso1563893a91.2; Sun, 24 Nov 2024 00:03:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732435405; x=1733040205; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MxPBOBd+6Ed9xkatjMkJJQxFqeLTkfs9bcOKmm2N2Vs=; b=AIRLfXdl/xPcocC4PUmPYLK9nqLGIibz61eHryJkGQ1WcJRaYdeRRkEAWM6U0spyBp pdf0jKCDwjGhWpoeYISHqKfwZGzB2giTAiD3oFf5owf4MmNMPOPXseA9qRIinJ80OyK0 ryQMq9CPrKz84fAnPU81Zn1FkZMc5N9X8GVSbz0CFOuH3IbSBkysX4Ice5Gm2+DHdSpt abxGCRaRqNq9vRty6ZS6qRyqX+4soIXpmkA3POTFS1/x74+RYish0+uTEBO2DlD2OS/f 49FazwXrDFaue8tFZFMA8ZsWUlLfx3CWvx55oKYHfUuC9yptpuTMQjvdIo0yKn2vnzbV nT+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732435405; x=1733040205; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MxPBOBd+6Ed9xkatjMkJJQxFqeLTkfs9bcOKmm2N2Vs=; b=OMr5AKWV+xv/CpWpcOcqQ2EfMBfUhU4853HC5luqo1ucksVow3y5VSMYJ4P3Xi4b1M L1o1pV2U3vUbWgL19IvL/mOnLRz465EFCEMR1+OG/nRgMc4p22w8Sw/e+zqyMyK5GsQA H9C++27V8e39gTDrELiutVlqV+NQSWFXp2tR2fkcXlECmP3DW56r9KsZqUYdevApN/QN AjjGBhXYIhPndmtiExTpmSkSOsY7sZx7tmNJcS/HelPPhqwTYyHUZafvoQeUPoMNQuoA dR8u5MmyGaPylEh4A1sMaRjVqS8LWZqldt9erE/hqnvNwPJjYEC+Uzs3Lj3Pnu6ZoxbN vu6w== X-Forwarded-Encrypted: i=1; AJvYcCWO8bNearrvakkgesE93iWTyVOegmf4lCuGRj5UmzWxovcQIikmziP1DzL90l2UZIH8EJ8zW1N/HRTg@vger.kernel.org X-Gm-Message-State: AOJu0YyEQUtC/YZhnNUUrxuFmjH/8hxL1+1oKjAoLN5N1Yyuxa8rlKPU djJBZQ8D9roWY4dbthKuucu51ibqCEEphYSe+7ROPAcLAnwAEb2p7cRRG7pLoGg= X-Gm-Gg: ASbGncudNcCZlDuyhiRbPyr1Gr8+YSEKB0KKnkUGHmzGk0wBNe7uW3yGwt59iyuVl3v yBQQjgTQaAUEQABo8HIm3aQRn6bJKDivwH4/eem+XgyBSE/+oNG5tMwV3MphTpAfQnos9TySlDH BmtU9FbTTvxtJSLQJIxVsvagqACXqTGRkamCPfyvu5WBnFClmtx0wDIgXV0kpGR+yEosyA4+U0m VbuuBReNZdASzYPwPIQCEDKPfdG+mUY/j1CaKKnUySir4rx7QGoEKtasoZ+DaU= X-Google-Smtp-Source: AGHT+IFe3GZWneGawX4l12Zavw69tECcDmSfwFVctb4X1ic+vmFklHYNFAP8pxdvBF7i0bBGfsfO7g== X-Received: by 2002:a17:90b:3881:b0:2ea:a737:60ab with SMTP id 98e67ed59e1d1-2eb0e234ccbmr13443895a91.12.1732435405454; Sun, 24 Nov 2024 00:03:25 -0800 (PST) Received: from noel.flets-west.jp ([2405:6586:4480:a10:fa8f:7c3e:835f:c642]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ead03de6f6sm7956708a91.34.2024.11.24.00.03.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Nov 2024 00:03:25 -0800 (PST) From: Hironori KIKUCHI To: linux-kernel@vger.kernel.org Cc: Hironori KIKUCHI , Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Cercueil , Christophe Branchereau , Ryan Walklin , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH 6/6] drm: panel: nv3052c: Add a panel for RG CubeXX Date: Sun, 24 Nov 2024 17:02:17 +0900 Message-ID: <20241124080220.1657238-7-kikuchan98@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241124080220.1657238-1-kikuchan98@gmail.com> References: <20241124080220.1657238-1-kikuchan98@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is a display panel used in the Anbernic RG CubeXX, a handheld gaming device from Anbernic. It is 3.95 inches in size (diagonally) with a resolution of 720x720. Signed-off-by: Hironori KIKUCHI Tested-by: Philippe Simons --- .../gpu/drm/panel/panel-newvision-nv3052c.c | 198 ++++++++++++++++++ 1 file changed, 198 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c b/drivers/gpu/= drm/panel/panel-newvision-nv3052c.c index 5a7cf6cb8be..bd5be0b5e93 100644 --- a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c +++ b/drivers/gpu/drm/panel/panel-newvision-nv3052c.c @@ -963,6 +963,176 @@ static const struct nv3052c_reg ylm_lbv0400001x_v1_pa= nel_regs[] =3D { { 0x36, 0x0a }, // bgr =3D 1, ss =3D 1, gs =3D 0 }; =20 +static const struct nv3052c_reg ylm_lbn0395004h_v1_panel_regs[] =3D { + // EXTC Command set enable, select page 1 + { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x01 }, + // Mostly unknown registers + { 0xe3, 0x00 }, + { 0x0a, 0x01 }, // WRMADC_EN + { 0x23, 0x00 }, // RGB interface control: DE+SYNC MODE PCLK-N + { 0x25, 0x14 }, + { 0x29, 0x02 }, + { 0x2a, 0xcf }, + { 0x38, 0x9c }, // VCOM_ADJ1 + { 0x39, 0xa7 }, // VCOM_ADJ2 + { 0x3a, 0x5f }, // VCOM_ADJ3 + { 0x91, 0x77 }, // EXTPW_CTRL2 + { 0x92, 0x77 }, // EXTPW_CTRL3 + { 0x99, 0x52 }, // PUMP_CTRL2 + { 0x9b, 0x5b }, // PUMP_CTRL4 + { 0xa0, 0x55 }, + { 0xa1, 0x50 }, + { 0xa4, 0x9c }, + { 0xa7, 0x02 }, + { 0xa8, 0x01 }, + { 0xa9, 0x01 }, + { 0xaa, 0xfc }, + { 0xab, 0x28 }, + { 0xac, 0x06 }, + { 0xad, 0x06 }, + { 0xae, 0x06 }, + { 0xaf, 0x03 }, + { 0xb0, 0x08 }, + { 0xb1, 0x26 }, + { 0xb2, 0x28 }, + { 0xb3, 0x28 }, + { 0xb4, 0x03 }, + { 0xb5, 0x08 }, + { 0xb6, 0x26 }, + { 0xb7, 0x08 }, + { 0xb8, 0x26 }, + // EXTC Command set enable, select page 2 + { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x02 }, + // Set gray scale voltage to adjust gamma + { 0xb0, 0x02 }, // PGAMVR0 + { 0xb1, 0x11 }, // PGAMVR1 + { 0xb2, 0x12 }, // PGAMVR2 + { 0xb3, 0x2e }, // PGAMVR3 + { 0xb4, 0x30 }, // PGAMVR4 + { 0xb5, 0x37 }, // PGAMVR5 + { 0xb6, 0x1c }, // PGAMPR0 + { 0xb7, 0x39 }, // PGAMPR1 + { 0xb8, 0x08 }, // PGAMPK0 + { 0xb9, 0x00 }, // PGAMPK1 + { 0xba, 0x12 }, // PGAMPK2 + { 0xbb, 0x12 }, // PGAMPK3 + { 0xbc, 0x14 }, // PGAMPK4 + { 0xbd, 0x15 }, // PGAMPK5 + { 0xbe, 0x16 }, // PGAMPK6 + { 0xbf, 0x0d }, // PGAMPK7 + { 0xc0, 0x15 }, // PGAMPK8 + { 0xc1, 0x04 }, // PGAMPK9 + { 0xd0, 0x05 }, // NGAMVR0 + { 0xd1, 0x07 }, // NGAMVR0 + { 0xd2, 0x08 }, // NGAMVR1 + { 0xd3, 0x30 }, // NGAMVR2 + { 0xd4, 0x2e }, // NGAMVR3 + { 0xd5, 0x32 }, // NGAMVR4 + { 0xd6, 0x1c }, // NGAMPR0 + { 0xd7, 0x3b }, // NGAMPR1 + { 0xd8, 0x10 }, // NGAMPK0 + { 0xd9, 0x06 }, // NGAMPK1 + { 0xda, 0x12 }, // NGAMPK2 + { 0xdb, 0x12 }, // NGAMPK3 + { 0xdc, 0x14 }, // NGAMPK4 + { 0xdd, 0x15 }, // NGAMPK5 + { 0xde, 0x18 }, // NGAMPK6 + { 0xdf, 0x0f }, // NGAMPK7 + { 0xe0, 0x17 }, // NGAMPK8 + { 0xe1, 0x0a }, // NGAMPK9 + // EXTC Command set enable, select page 3 + { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x03 }, + // Set various timing settings + { 0x08, 0x09 }, // GIP_VST_9 + { 0x09, 0x0a }, // GIP_VST_10 + { 0x0a, 0x0b }, // GIP_VST_11 + { 0x0b, 0x0c }, // GIP_VST_12 + { 0x28, 0x22 }, // GIP_VEND_9 + { 0x2a, 0xec }, // GIP_VEND_11 + { 0x2b, 0xec }, // GIP_VEND_12 + { 0x30, 0x00 }, // GIP_CLK_1 + { 0x31, 0x00 }, // GIP_CLK_2 + { 0x32, 0x00 }, // GIP_CLK_3 + { 0x33, 0x00 }, // GIP_CLK_4 + { 0x34, 0x61 }, // GIP_CLK_5 + { 0x35, 0xd4 }, // GIP_CLK_6 + { 0x36, 0x24 }, // GIP_CLK_7 + { 0x37, 0x03 }, // GIP_CLK_8 + { 0x40, 0x0d }, // GIP_CLKA_1 + { 0x41, 0x0e }, // GIP_CLKA_2 + { 0x42, 0x0f }, // GIP_CLKA_3 + { 0x43, 0x10 }, // GIP_CLKA_4 + { 0x44, 0x22 }, // GIP_CLKA_5 + { 0x45, 0xe1 }, // GIP_CLKA_6 + { 0x46, 0xe2 }, // GIP_CLKA_7 + { 0x47, 0x22 }, // GIP_CLKA_8 + { 0x48, 0xe3 }, // GIP_CLKA_9 + { 0x49, 0xe4 }, // GIP_CLKA_10 + { 0x50, 0x11 }, // GIP_CLKB_1 + { 0x51, 0x12 }, // GIP_CLKB_2 + { 0x52, 0x13 }, // GIP_CLKB_3 + { 0x53, 0x14 }, // GIP_CLKB_4 + { 0x54, 0x22 }, // GIP_CLKB_5 + { 0x55, 0xe5 }, // GIP_CLKB_6 + { 0x56, 0xe6 }, // GIP_CLKB_7 + { 0x57, 0x22 }, // GIP_CLKB_8 + { 0x58, 0xe7 }, // GIP_CLKB_9 + { 0x59, 0xe8 }, // GIP_CLKB_10 + // Map internal GOA signals to GOA output pad + { 0x80, 0x05 }, // PANELU2D1 + { 0x81, 0x1e }, // PANELU2D2 + { 0x82, 0x02 }, // PANELU2D3 + { 0x83, 0x04 }, // PANELU2D4 + { 0x84, 0x1e }, // PANELU2D5 + { 0x85, 0x1e }, // PANELU2D6 + { 0x86, 0x1f }, // PANELU2D7 + { 0x87, 0x1f }, // PANELU2D8 + { 0x88, 0x0e }, // PANELU2D9 + { 0x89, 0x10 }, // PANELU2D10 + { 0x8a, 0x0a }, // PANELU2D11 + { 0x8b, 0x0c }, // PANELU2D12 + { 0x96, 0x05 }, // PANELU2D23 + { 0x97, 0x1e }, // PANELU2D24 + { 0x98, 0x01 }, // PANELU2D25 + { 0x99, 0x03 }, // PANELU2D26 + { 0x9a, 0x1e }, // PANELU2D27 + { 0x9b, 0x1e }, // PANELU2D28 + { 0x9c, 0x1f }, // PANELU2D29 + { 0x9d, 0x1f }, // PANELU2D30 + { 0x9e, 0x0d }, // PANELU2D31 + { 0x9f, 0x0f }, // PANELU2D32 + { 0xa0, 0x09 }, // PANELU2D33 + { 0xa1, 0x0b }, // PANELU2D34 + { 0xb0, 0x05 }, // PANELD2U1 + { 0xb1, 0x1f }, // PANELD2U2 + { 0xb2, 0x03 }, // PANELD2U3 + { 0xb3, 0x01 }, // PANELD2U4 + { 0xb4, 0x1e }, // PANELD2U5 + { 0xb5, 0x1e }, // PANELD2U6 + { 0xb6, 0x1f }, // PANELD2U7 + { 0xb7, 0x1e }, // PANELD2U8 + { 0xb8, 0x0b }, // PANELD2U9 + { 0xb9, 0x09 }, // PANELD2U10 + { 0xba, 0x0f }, // PANELD2U11 + { 0xbb, 0x0d }, // PANELD2U12 + { 0xc6, 0x05 }, // PANELD2U23 + { 0xc7, 0x1f }, // PANELD2U24 + { 0xc8, 0x04 }, // PANELD2U25 + { 0xc9, 0x02 }, // PANELD2U26 + { 0xca, 0x1e }, // PANELD2U27 + { 0xcb, 0x1e }, // PANELD2U28 + { 0xcc, 0x1f }, // PANELD2U29 + { 0xcd, 0x1e }, // PANELD2U30 + { 0xce, 0x0c }, // PANELD2U31 + { 0xcf, 0x0a }, // PANELD2U32 + { 0xd0, 0x10 }, // PANELD2U33 + { 0xd1, 0x0e }, // PANELD2U34 + // EXTC Command set enable, select page 0 + { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x00 }, + // Display Access Control + { 0x36, 0x0a }, // bgr =3D 1, ss =3D 1, gs =3D 0 +}; + static inline struct nv3052c *to_nv3052c(struct drm_panel *panel) { return container_of(panel, struct nv3052c, panel); @@ -1245,6 +1415,21 @@ static const struct drm_display_mode ylm_lbv0400001x= _v1_mode[] =3D { }, }; =20 +static const struct drm_display_mode ylm_lbn0395004h_v1_mode[] =3D { + { + .clock =3D 36000, + .hdisplay =3D 720, + .hsync_start =3D 720 + 28, + .hsync_end =3D 720 + 28 + 4, + .htotal =3D 720 + 28 + 4 + 42, + .vdisplay =3D 720, + .vsync_start =3D 720 + 16, + .vsync_end =3D 720 + 16 + 4, + .vtotal =3D 720 + 16 + 4 + 16, + .flags =3D DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, + }, +}; + static const struct nv3052c_panel_info ltk035c5444t_panel_info =3D { .display_modes =3D ltk035c5444t_modes, .num_modes =3D ARRAY_SIZE(ltk035c5444t_modes), @@ -1300,12 +1485,24 @@ static const struct nv3052c_panel_info ylm_lbv04000= 01x_v1_panel_info =3D { .panel_regs_len =3D ARRAY_SIZE(ylm_lbv0400001x_v1_panel_regs), }; =20 +static const struct nv3052c_panel_info ylm_lbn0395004h_v1_panel_info =3D { + .display_modes =3D ylm_lbn0395004h_v1_mode, + .num_modes =3D ARRAY_SIZE(ylm_lbn0395004h_v1_mode), + .width_mm =3D 71, + .height_mm =3D 71, + .bus_format =3D MEDIA_BUS_FMT_RGB888_1X24, + .bus_flags =3D DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, + .panel_regs =3D ylm_lbn0395004h_v1_panel_regs, + .panel_regs_len =3D ARRAY_SIZE(ylm_lbn0395004h_v1_panel_regs), +}; + static const struct spi_device_id nv3052c_ids[] =3D { { "ltk035c5444t", }, { "fs035vg158", }, { "rg35xx-plus-panel", }, { "rg35xx-plus-rev6-panel", }, { "rg40xx-panel", }, + { "rgcubexx-panel", }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(spi, nv3052c_ids); @@ -1316,6 +1513,7 @@ static const struct of_device_id nv3052c_of_match[] = =3D { { .compatible =3D "anbernic,rg35xx-plus-panel", .data =3D &wl_355608_a8_p= anel_info }, { .compatible =3D "anbernic,rg35xx-plus-rev6-panel", .data =3D &ylm_lbv03= 45001h_v2_panel_info }, { .compatible =3D "anbernic,rg40xx-panel", .data =3D &ylm_lbv0400001x_v1_= panel_info }, + { .compatible =3D "anbernic,rgcubexx-panel", .data =3D &ylm_lbn0395004h_v= 1_panel_info }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, nv3052c_of_match); --=20 2.47.0