From nobody Tue Dec 16 19:57:14 2025 Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) (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 3CD301A2C29; Tue, 18 Jun 2024 08:15:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718698551; cv=none; b=MK0UNKWf83k8u+zS7OgpMAD6LTMqOr8rKLWPr/Kjq1IjhuFxi3J3CKdOpVzBbZURbxZsOtTDM9O7weOfjFN1L68pkhFdoA3ozDdJXvtjmHfHCCmh853uAzLHgTud0qhsgGn8N4GkOfweMLfsfYkGYJoTJ23O2BtNJCMH01t42z0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718698551; c=relaxed/simple; bh=ZAJBtCaUM9JLEirclO5Y43C7w4KKYkdHh8DUoibIq4E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=M/WPEbFdKi/FhC+5r0DL4sg/NwjUibiOIOH+ZGc05Ha4soV8W+fzLEPf4XsgwfD0d5u3GE+Lq7x1ynQVmem9HboC/rnLaVSFS0qv1mWqepaVid9dYkoFy+qz0HIlqTmcHiMGD8NmB8DeHgkHzkI4ML6+/NxnAC7yKs5OhLvtmII= 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=WQ+pnf+S; arc=none smtp.client-ip=209.85.215.177 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="WQ+pnf+S" Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-70df213542aso543934a12.1; Tue, 18 Jun 2024 01:15:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718698549; x=1719303349; 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=J1NVDaPXa6D4F2sbo9R4akJ/9kWJg22tXMUc7cYS2HM=; b=WQ+pnf+SmGgIbJmVTwtuoBNknmJlxJgIlAvdsYh7qbjVPcxq5wk9yqPcSKan3oWT/x xqk3r4XX863rBtVMtrjKeO1lj7UIGmsNi1XWxY3iAD2oVLEf+bBK5BIsLe5UN05ijzRs aQrjhcdTefrEdQPGpE7JFpD4yrMEpPtxY7ezpqCrMHVTZs3Xu8/RUrJuP+ST4FEuBth4 pL+BJZ4U+EhMQgNc/t65pvhfB/z0UtnaP0BiCGtmcQLIumA/gu/iURfsaKBcD9Ck24dc 0lsXqAehAgT+HiW2E9IIc+BGXIJTQsP75wwUJu6G4YPpQD7fWE9vKn8IrOFXkCO7iYl+ 8gWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718698549; x=1719303349; 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=J1NVDaPXa6D4F2sbo9R4akJ/9kWJg22tXMUc7cYS2HM=; b=dgdtPeepUW+PtZFwgGEUf4i8YfE3adTKnVgj+vkn/swHeKJSATqcrwuyMrPjabl9DB czeaAIZQXzhn0d/fUZTfPwuiCWizt26RsO6kNi2f0FONyScEoYn9w4DBJ0jlRsvwtdB/ a9H4cTyNYceVWOuYPbirtb+97XJaIBob1lV2F3fWgtZwPIy6jai7ZIgnHZV/SXTgJijN KjNhm29EBsS9KjQDaiMEEEgfarLyY7nt/z9oQMJPFdCE9/a7IRaKD6ftpyiQOd/hx5iq wDAbets/TXDZcwN8IzmW10h6k8SNIjE6/I3l4MCqX9i+Ni5CRSfBux/hapfMcmToL7be 1YIw== X-Forwarded-Encrypted: i=1; AJvYcCWU785kda0z5kpyk4yVO4db0qN+3Jik0nYHj73HTgLGG6LCocNCzWFRKhyIXCDXmmEF2D1ipeIQxvInuPMpl3/vhbdpdqnPsToUAQ== X-Gm-Message-State: AOJu0YxrO8poRQT6aEm1l0q0/zTQDJWY4DArvcc102ePA2xIgkVF5YeW eDUMzVS7Gmet6jBAhIupohKnGU35+M5Dfl1R3716is393rCue6czk0rPK5vCYag= X-Google-Smtp-Source: AGHT+IGzYUM3GnISel4DD57OKPNCWzNF0T1Fd0b4gLUiKppMSD2hu6qFDU9hmvCWOlG2Ky/D3Xd3lw== X-Received: by 2002:a05:6a20:2447:b0:1b8:5c3c:794f with SMTP id adf61e73a8af0-1bae7e1133emr13429201637.10.1718698549371; Tue, 18 Jun 2024 01:15:49 -0700 (PDT) Received: from noel.flets-west.jp ([2405:6586:4480:a10:167:9818:d778:5c14]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f855f1a1ebsm91883575ad.238.2024.06.18.01.15.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 01:15:49 -0700 (PDT) From: Hironori KIKUCHI To: linux-kernel@vger.kernel.org Cc: Hironori KIKUCHI , Jagan Teki , Neil Armstrong , Jessica Zhang , Sam Ravnborg , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v1 1/3] dt-bindings: display: st7701: Add Anbernic RG28XX panel Date: Tue, 18 Jun 2024 17:15:12 +0900 Message-ID: <20240618081515.1215552-2-kikuchan98@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240618081515.1215552-1-kikuchan98@gmail.com> References: <20240618081515.1215552-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" The RG28XX panel is a panel specific to the Anbernic RG28XX. It is 2.8 inches in size (diagonally) with a resolution of 480x640. Signed-off-by: Hironori KIKUCHI --- .../display/panel/sitronix,st7701.yaml | 36 +++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/display/panel/sitronix,st770= 1.yaml b/Documentation/devicetree/bindings/display/panel/sitronix,st7701.ya= ml index b348f5bf0a9..04f6751ccca 100644 --- a/Documentation/devicetree/bindings/display/panel/sitronix,st7701.yaml +++ b/Documentation/devicetree/bindings/display/panel/sitronix,st7701.yaml @@ -22,19 +22,21 @@ description: | =20 allOf: - $ref: panel-common.yaml# + - $ref: /schemas/spi/spi-peripheral-props.yaml# =20 properties: compatible: items: - enum: - anbernic,rg-arc-panel + - anbernic,rg28xx-panel - densitron,dmt028vghmcmi-1a - elida,kd50t048a - techstar,ts8550b - const: sitronix,st7701 =20 reg: - description: DSI virtual channel used by that screen + description: DSI / SPI channel used by that screen maxItems: 1 =20 VCC-supply: @@ -43,6 +45,13 @@ properties: IOVCC-supply: description: I/O system regulator =20 + dc-gpios: + maxItems: 1 + description: | + Controller data/command selection (D/CX) in 4-line SPI mode. + If not set, the controller is in 3-line SPI mode. + No effect for DSI. + port: true reset-gpios: true rotation: true @@ -57,7 +66,7 @@ required: - port - reset-gpios =20 -additionalProperties: false +unevaluatedProperties: false =20 examples: - | @@ -82,3 +91,26 @@ examples: }; }; }; + - | + #include + + spi { + #address-cells =3D <1>; + #size-cells =3D <0>; + + panel@0 { + compatible =3D "anbernic,rg28xx-panel", "sitronix,st7701"; + reg =3D <0>; + spi-max-frequency =3D <3125000>; + VCC-supply =3D <®_lcd>; + IOVCC-supply =3D <®_lcd>; + reset-gpios =3D <&pio 8 14 GPIO_ACTIVE_HIGH>; /* LCD-RST: PI14= */ + backlight =3D <&backlight>; + + port { + panel_in_rgb: endpoint { + remote-endpoint =3D <&tcon_lcd0_out_lcd>; + }; + }; + }; + }; --=20 2.45.2 From nobody Tue Dec 16 19:57:14 2025 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (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 030F51A2FB1; Tue, 18 Jun 2024 08:15:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718698555; cv=none; b=O/d2IxZgobZrzQ+61dsN7KkULqwSr7R2fd2BfArflg8XC5RU8wcCChtYC4qDgLYutPTunsGXlxeM3MBzXfp54dH3EOLFohhhSve+Bxi56KockG73U9b1aeBUt5UQq826TX2TmMIvjYn06YNAIBp1PQGSz46d2LULLpG7CtooXqQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718698555; c=relaxed/simple; bh=uQUNGAcIwO5KI3YsUNcKvF1CZ6oHdR4sOHYGX85Zw7k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mvDp0BUK9fP5Vv3ni2WjjD4+Kpn/uHoNJ7BYrD3K7Do3FfJkopmwc175mXVogXq/23z1WcyBLUVvQQKytvaIw9L8N6MUKGPKnFeDKhEO0EI6ymoUvS6CSVn5jwEA1/USP83q2RWDEHrlwKYEDyYghLJxxue0c6Ie4N35JGh42aI= 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=Lg31f79g; arc=none smtp.client-ip=209.85.214.170 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="Lg31f79g" Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1f862f7c7edso33272505ad.3; Tue, 18 Jun 2024 01:15:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718698553; x=1719303353; 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=QD1GfKw9SNR3aCxw2m1Eb7xqb4LCyjQ9URCxOhH2S+4=; b=Lg31f79gnsP3Z3HVEFLYbeQSOs1duK+zm3a8Fw7+cpHRIRJVSUsi4tcMGJFZYUC4fu 05Vk8VjvdWBqVCoJBz5HpouSPY1kpEO2D3xD6Zpm8wUHNyR8WS+soDy+7Glu0QGNuC+N ulKhUAmGZgaQRMzT10Fn33LKNK+BM204fUr6Cq1t6NFGzOg2i76z+tIT0bCKdFEQ1OdW inIGtSYo5yyEU17JHiVz/9h0eS1aY2qrzX+fAlYNe+5yI1vkmKN+CN9Xekt6D4v0doE9 cA8vSuSap7vnG2bbveqr7HnK9MJnjsohZOZP9PBJUh+Z9RBxL3z6491e4SZtCh5dVBiz S14g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718698553; x=1719303353; 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=QD1GfKw9SNR3aCxw2m1Eb7xqb4LCyjQ9URCxOhH2S+4=; b=oNkD4uXESnEZ2T5vCATR7LxvoaH+Wh2F0tFd9rIjEsHxiYgsaTHOQxO3/YPfkdf4zZ JNV5WB2oBxWqrJtn2UZ1+VaULyHCyYfs2K++nHlAv0XD45yu5DKYn5ih2F59g36z0SXG i1CarAR77bVclO9kJxN7OGb7vGsiC2qU6hGb5Cas/DNSC1hyitNHvk1CMmrg9MKW9BXV gD2ky2K9Nr9+SPXU7r6ZthxszkLr1/mbBs62MMG5pPJkLCBLg7VVKu8xkuB1q1nEN7M9 gw10LbLU91XYTiQ6Lj2VvYeJbrG2qUpSL6ZCuAEZoKZUMDz0h0naz3WxX7++2VsNjfzF dfBA== X-Forwarded-Encrypted: i=1; AJvYcCUeR+8mGYEcHpm1+uGJSp7uSLkRpE9ED7bO6YJjALD/FLnElT0vagRoRWgQK8/8vy0ciidUG7JQU2AFdoITjaQIdXUPKEx6VnZiLA== X-Gm-Message-State: AOJu0YwavzzeJ9pKVP7LKN0Gq8WBGFfOfZBtU/FhgqviHg2O+x34wOnP /md7H/WrGGnUOvwi5SPG2zw4mEva7jzdwvGXBUKzzVRYQW99bL6VsaWxG6wB6BQ= X-Google-Smtp-Source: AGHT+IG9TC/KD0e6xD+FYGIcjwjENiHg6TgflND45V342WU/3qkJFD75wF7dTxbpmYomMIt7s9egqA== X-Received: by 2002:a17:902:ce87:b0:1f7:3d0d:4cd with SMTP id d9443c01a7336-1f8625cf213mr128231965ad.24.1718698553108; Tue, 18 Jun 2024 01:15:53 -0700 (PDT) Received: from noel.flets-west.jp ([2405:6586:4480:a10:167:9818:d778:5c14]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f855f1a1ebsm91883575ad.238.2024.06.18.01.15.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 01:15:52 -0700 (PDT) From: Hironori KIKUCHI To: linux-kernel@vger.kernel.org Cc: Hironori KIKUCHI , Jagan Teki , Neil Armstrong , Jessica Zhang , Sam Ravnborg , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v1 2/3] drm/panel: st7701: Add support for SPI for configuration Date: Tue, 18 Jun 2024 17:15:13 +0900 Message-ID: <20240618081515.1215552-3-kikuchan98@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240618081515.1215552-1-kikuchan98@gmail.com> References: <20240618081515.1215552-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" The ST7701 supports not only MIPI DSI, but also SPI as an interface for configuration. To support a panel connected via RGB parallel interface, add support for SPI using MIPI DBI helpers. Signed-off-by: Hironori KIKUCHI --- drivers/gpu/drm/panel/Kconfig | 2 + drivers/gpu/drm/panel/panel-sitronix-st7701.c | 211 ++++++++++++++---- 2 files changed, 172 insertions(+), 41 deletions(-) diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 2ae0eb0638f..1831544400d 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -755,7 +755,9 @@ config DRM_PANEL_SHARP_LS060T1SX01 config DRM_PANEL_SITRONIX_ST7701 tristate "Sitronix ST7701 panel driver" depends on OF + depends on SPI depends on DRM_MIPI_DSI + select DRM_MIPI_DBI depends on BACKLIGHT_CLASS_DEVICE help Say Y here if you want to enable support for the Sitronix diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7701.c b/drivers/gpu/dr= m/panel/panel-sitronix-st7701.c index 421eb4592b6..3c4a66f2fc7 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7701.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7701.c @@ -4,6 +4,7 @@ * Author: Jagan Teki */ =20 +#include #include #include #include @@ -14,6 +15,7 @@ #include #include #include +#include =20 #include