From nobody Wed Feb 11 05:36:59 2026 Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) (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 0193C53393 for ; Mon, 22 Apr 2024 09:03:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713776608; cv=none; b=mAdCEJCv/k1xboI3CYjM7ex4HR/6oa+74Ng8KRZIyMXpBM5CI8d6ItfVkgQvzS/3Edpi2RoXOri2kKQV+LI9hdYshYITPb6LCegaFYVHt16x/BBKmsX/JXGRnGlEUCVdEXKUo0Oh7/e68Kk3W5jEiU8pxGpgqCzW5Gwws9HORjM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713776608; c=relaxed/simple; bh=BKTDKIx4qdpSl3cXBADKrIH40ld4k6SSpBzLG8UfvNw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=nTIIBzNtnOTH6QejJ2rNtxl4tQIf8lLK5Dtv6P832qW03rbxMU71B0fFzB6SBfP1xrwG8lHeqBn2toy/H0oy+xAA/tUTO6u+kcUv2yWATIb/OsSdBC/CsyvSZKr2xSSP/oXlNvhpMdWmHdDZORrsGnLZd6pJWVvbjp033aC6Kic= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=huaqin.corp-partner.google.com; spf=pass smtp.mailfrom=huaqin.corp-partner.google.com; dkim=pass (2048-bit key) header.d=huaqin-corp-partner-google-com.20230601.gappssmtp.com header.i=@huaqin-corp-partner-google-com.20230601.gappssmtp.com header.b=Eskdzlwf; arc=none smtp.client-ip=209.85.210.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=huaqin.corp-partner.google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaqin.corp-partner.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=huaqin-corp-partner-google-com.20230601.gappssmtp.com header.i=@huaqin-corp-partner-google-com.20230601.gappssmtp.com header.b="Eskdzlwf" Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-6ee12766586so3171006b3a.0 for ; Mon, 22 Apr 2024 02:03:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=huaqin-corp-partner-google-com.20230601.gappssmtp.com; s=20230601; t=1713776605; x=1714381405; 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=a3bGwbMVBW9JMkaCtxs81SRVI+X7PdkUKjZQUdNYYUU=; b=Eskdzlwf4d2HAI4B5OJge7VdnStdxgDhPJ/w54ebbmyaNRIaOhR83JrbBmgphFNTJ2 q/gpUeYY4QphaZM2pf3TF/q466KQgbKxtTDWacj+dHdEKrpTc2nSQL+ulQ+iH8YvfKoe ovuBAeKTU/ZPI3sPVZii90lsxmHbOFy6kwcdvhc+0O6/exRyPKf0Ae5bidL9spYbuyWl cTqPjYIIGYkORXhpMI3PgLfbBoSEPz1rqP/vTf77mkx9vDzgzFi0pMr0FwbV9T2GFKOX nhPtdA77biCr+pvg7hNOnH1qVQvxpkP73C77Y4gxQI+Lwkgx/9xbEa23GYtT+bsFxlFe PmVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713776605; x=1714381405; 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=a3bGwbMVBW9JMkaCtxs81SRVI+X7PdkUKjZQUdNYYUU=; b=NjD2UdmJrSIJYLtZAf5RlZxcZRcE1UCf9nZJbEmptiyxReDUMqHqhpfeIEYdQa4smd bnoEp3AIwU+b1rFx2TZJoD1FEnF4i4ZtQ5+MiPiQSj0YhPxGvwDINrLfFSmajRfAIsu+ GSpGMap+XQ++H0MPM6QGE7pOHv78dpLYZ9pVv6Oa8UR4wpPF8b/l8BOTL8u+rQv79Zl+ 3lO43a9KO5aoaFYGF/Fm+CMDVTYuMIy010zolQ9kpnSvczG5WR70t5XzSVX56ivXuK6F Q/ZBUa203ImQl6bAmIAYoE39W7mLUlTSa0CzjY7JFaf/81ccZnnkEFimV28JeIY95b/L 0zdQ== X-Forwarded-Encrypted: i=1; AJvYcCWb4ZRvfp/mbF/YaTmpFr+winQW1PWMpca4Bcr0gUJmO7AwbVpXKpwE/zk/S1NyIpz3yT5KGgv3dKNT8qU7cfBt0KHF7FS11CpOCKzo X-Gm-Message-State: AOJu0YxS25Y4NW5a3Jpp/PR23Qo+uYg434ML1HM4OKlIYIei/u0AW2rI Ssajp5ZfUFKrTDGV8NnOyG8hlUbEELM6q0eXNMpY/u7iRkGCreZeKYA15zNhYLI= X-Google-Smtp-Source: AGHT+IGO2mLo+nckyIM2FhOHlELT6Ndn5AzW9myMeznYDlNxLFym3M9PI3lXcBd3GDpj5c86eP65aA== X-Received: by 2002:a05:6a21:3416:b0:1ac:3d62:9154 with SMTP id yn22-20020a056a21341600b001ac3d629154mr10753407pzb.31.1713776605319; Mon, 22 Apr 2024 02:03:25 -0700 (PDT) Received: from localhost.localdomain ([116.66.212.162]) by smtp.gmail.com with ESMTPSA id by42-20020a056a0205aa00b005fdd11c0874sm1919137pgb.64.2024.04.22.02.03.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 02:03:24 -0700 (PDT) From: Cong Yang To: sam@ravnborg.org, neil.armstrong@linaro.org, daniel@ffwll.ch, dianders@chromium.org, linus.walleij@linaro.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, conor+dt@kernel.org, airlied@gmail.com Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, xuxinxiong@huaqin.corp-partner.google.com, Cong Yang Subject: [PATCH v2 1/7] dt-bindings: display: panel: Add himax hx83102 panel bindings Date: Mon, 22 Apr 2024 17:03:04 +0800 Message-Id: <20240422090310.3311429-2-yangcong5@huaqin.corp-partner.google.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240422090310.3311429-1-yangcong5@huaqin.corp-partner.google.com> References: <20240422090310.3311429-1-yangcong5@huaqin.corp-partner.google.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" In V1, discussed with Doug and Linus [1], we need break out as separate driver for the himax83102-j02 controller. So add new documentation for "starry,himax83102-j02" panel. [1]: https://lore.kernel.org/all/CACRpkdbzYZAS0=3DzBQJUC4CB2wj4s1h6n6aSAZQv= dMV95r3zRUw@mail.gmail.com Signed-off-by: Cong Yang --- .../display/panel/boe,tv101wum-nl6.yaml | 2 - .../bindings/display/panel/himax,hx83102.yaml | 73 +++++++++++++++++++ 2 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/panel/himax,h= x83102.yaml diff --git a/Documentation/devicetree/bindings/display/panel/boe,tv101wum-n= l6.yaml b/Documentation/devicetree/bindings/display/panel/boe,tv101wum-nl6.= yaml index 906ef62709b8..53fb35f5c9de 100644 --- a/Documentation/devicetree/bindings/display/panel/boe,tv101wum-nl6.yaml +++ b/Documentation/devicetree/bindings/display/panel/boe,tv101wum-nl6.yaml @@ -32,8 +32,6 @@ properties: - innolux,hj110iz-01a # STARRY 2081101QFH032011-53G 10.1" WUXGA TFT LCD panel - starry,2081101qfh032011-53g - # STARRY himax83102-j02 10.51" WUXGA TFT LCD panel - - starry,himax83102-j02 # STARRY ili9882t 10.51" WUXGA TFT LCD panel - starry,ili9882t =20 diff --git a/Documentation/devicetree/bindings/display/panel/himax,hx83102.= yaml b/Documentation/devicetree/bindings/display/panel/himax,hx83102.yaml new file mode 100644 index 000000000000..2e0cd6998ba8 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/himax,hx83102.yaml @@ -0,0 +1,73 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/himax,hx83102.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Himax HX83102 MIPI-DSI LCD panel controller + +maintainers: + - Cong Yang + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + enum: + # STARRY himax83102-j02 10.51" WUXGA TFT LCD panel + - starry,himax83102-j02 + + reg: + description: the virtual channel number of a DSI peripheral + + enable-gpios: + description: a GPIO spec for the enable pin + + pp1800-supply: + description: core voltage supply + + avdd-supply: + description: phandle of the regulator that provides positive voltage + + avee-supply: + description: phandle of the regulator that provides negative voltage + + backlight: + description: phandle of the backlight device attached to the panel + + port: true + rotation: true + +required: + - compatible + - reg + - enable-gpios + - pp1800-supply + - avdd-supply + - avee-supply + +additionalProperties: false + +examples: + - | + dsi { + #address-cells =3D <1>; + #size-cells =3D <0>; + panel@0 { + compatible =3D "starry,himax83102-j02"; + reg =3D <0>; + enable-gpios =3D <&pio 45 0>; + avdd-supply =3D <&ppvarn_lcd>; + avee-supply =3D <&ppvarp_lcd>; + pp1800-supply =3D <&pp1800_lcd>; + backlight =3D <&backlight_lcd0>; + port { + panel_in: endpoint { + remote-endpoint =3D <&dsi_out>; + }; + }; + }; + }; + +... --=20 2.25.1 From nobody Wed Feb 11 05:36:59 2026 Received: from mail-oa1-f46.google.com (mail-oa1-f46.google.com [209.85.160.46]) (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 5BFE656B99 for ; Mon, 22 Apr 2024 09:03:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713776616; cv=none; b=aXAZlyXMgt62wY9UsJUcrqI2aY67MKE4KC+NuBr8GeCixxui9Za1fbxKl2mwiiqvlDM3LyytQ5XDIFG6xcpnFiyxyEDUmyi62bbtCokpBce+Z+K919Y1Bolgi8BpaHkvp4BFjoOHx+EkHfxXodU6SbXiikecqm5AmtTiEbu0O34= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713776616; c=relaxed/simple; bh=R5uMT8Z3fLrSrr4B+ijbU22cSr91kWZWOSt99RS2rFE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Nbjtlcvt1q8AAbxClsdczPvw03QQpMr8a0O4BSd/VR8eNIUYw5wqjLDFnZ9+8rShlpLtxe9joXqI1gn66doPf0a63fV8giPPu3Qd3L7lOxOB/aNL4HRPa/urBbfUNkA0BUXVrpYZ/LrIc1QCGbrKAJmTuHZPEcj9lFx7jcLoIvk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=huaqin.corp-partner.google.com; spf=pass smtp.mailfrom=huaqin.corp-partner.google.com; dkim=pass (2048-bit key) header.d=huaqin-corp-partner-google-com.20230601.gappssmtp.com header.i=@huaqin-corp-partner-google-com.20230601.gappssmtp.com header.b=VLvYXs+I; arc=none smtp.client-ip=209.85.160.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=huaqin.corp-partner.google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaqin.corp-partner.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=huaqin-corp-partner-google-com.20230601.gappssmtp.com header.i=@huaqin-corp-partner-google-com.20230601.gappssmtp.com header.b="VLvYXs+I" Received: by mail-oa1-f46.google.com with SMTP id 586e51a60fabf-2395e037342so1593919fac.0 for ; Mon, 22 Apr 2024 02:03:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=huaqin-corp-partner-google-com.20230601.gappssmtp.com; s=20230601; t=1713776611; x=1714381411; 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=XrZckN6ST0MzNo468ytPDYqIaPKeMuojFV9uOvdBH2A=; b=VLvYXs+IhKma4RXVXw8HN+TFG0zfRWNunopdpIkwtrhS7mPqSBTWyRuUmYpoSphnr/ d07nM5wM//7t9oPKGnqhhiPKmmrC0Q1+CY2V6R15DmuNtIfGWnL1Yzuf4zHmGNowSjKB PPRpYkzXZNneyad8o4e2YmH0ZFqGSArJJaQpYRYCylbhGYPAxNGpczChQKV+Wc3bCkjS Pt3iUFwQWuRfPbB/ewPaX8tI7bAktBKd6ES0mxPRyNukbfshC9ksCbRK1cUkeVan1kwh X/q3OYNktLJeb98pYVbsoDPuK8UwzqLHQ43jC6kydyFVj38YruGZCwQMI71hstcEOWOU /2Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713776611; x=1714381411; 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=XrZckN6ST0MzNo468ytPDYqIaPKeMuojFV9uOvdBH2A=; b=DrpZLrUoszAlB3/6la6E7hV7cB6snrZhKh3OSPSVKx1ZUevo8VzNej6CZ0DaWFvqGN OjWN1xIk6va7DkA9SfTQkdySj7cOjWRvlBcwGF8uTCE9mn0rLWKgdfcRX+xNZ8j23QpL Nxcf/w8xKWdr6Kyh3N+8XoFkYWakFDGxP5jtt/ID08ZcoiaUCgR/DLoAXBrZQmXM6Aah tGfjA+DO1bb5jgTPXnvP/YUVNDlEpr1tBcLqkvcE6PFbrFA31aNgWFA9Zp5hbJT3wM0N OvZKqPTZz2dXL4Hu3sZ4ESQKl9so+EnjttxXt/MPISWwgivKPiUIGlIpMFrvFi0sGzvI BquA== X-Forwarded-Encrypted: i=1; AJvYcCWqe5QXg/hWeWnB0Eooi0oSyv5zwz6n6SbWVN3H9kuKQD8tnVvBv6mFlox4lfxscwwqBcLCcxa07fhU1WVmjqO7G3Z0mwsXY36E1DUu X-Gm-Message-State: AOJu0YzmOw1LcB406V8YRi9zUg66IFTFD5IMqkb2l/F4BIzzIFO7vbQv LhaQ0chfJhpUt231dkOcuVHhILoO6mteU+M+OxF5lP83dwuxVAMnrQ0f3g4eSuI= X-Google-Smtp-Source: AGHT+IHGz07Ry49s+VZrwYrmWkCuja17z4eUulVQG69Me+/FLU8PCwiOUD0TRi2uSed9g7YIpkLVWg== X-Received: by 2002:a05:6871:742a:b0:22e:8576:bcd8 with SMTP id nw42-20020a056871742a00b0022e8576bcd8mr11457912oac.42.1713776610645; Mon, 22 Apr 2024 02:03:30 -0700 (PDT) Received: from localhost.localdomain ([116.66.212.162]) by smtp.gmail.com with ESMTPSA id by42-20020a056a0205aa00b005fdd11c0874sm1919137pgb.64.2024.04.22.02.03.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 02:03:30 -0700 (PDT) From: Cong Yang To: sam@ravnborg.org, neil.armstrong@linaro.org, daniel@ffwll.ch, dianders@chromium.org, linus.walleij@linaro.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, conor+dt@kernel.org, airlied@gmail.com Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, xuxinxiong@huaqin.corp-partner.google.com, Cong Yang Subject: [PATCH v2 2/7] drm/panel: himax-hx83102: Break out as separate driver Date: Mon, 22 Apr 2024 17:03:05 +0800 Message-Id: <20240422090310.3311429-3-yangcong5@huaqin.corp-partner.google.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240422090310.3311429-1-yangcong5@huaqin.corp-partner.google.com> References: <20240422090310.3311429-1-yangcong5@huaqin.corp-partner.google.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 Starry HX83102 based mipi panel should never have been part of the boe tv101wum driver. Discussion with Doug and Linus in V1 [1], we need a separate driver to enable the hx83102 controller. In hx83102 driver, add DSI commands as macros. So it can add some panels with same control model in the future. [1]: https://lore.kernel.org/all/CACRpkdbzYZAS0=3DzBQJUC4CB2wj4s1h6n6aSAZQv= dMV95r3zRUw@mail.gmail.com Signed-off-by: Cong Yang --- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-boe-tv101wum-nl6.c | 99 --- drivers/gpu/drm/panel/panel-himax-hx83102.c | 567 ++++++++++++++++++ 4 files changed, 577 insertions(+), 99 deletions(-) create mode 100644 drivers/gpu/drm/panel/panel-himax-hx83102.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index d037b3b8b999..eb378c897353 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -145,6 +145,15 @@ config DRM_PANEL_LVDS handling of power supplies or control signals. It implements automatic backlight handling if the panel is attached to a backlight controller. =20 +config DRM_PANEL_HIMAX_HX83102 + tristate "himax HX83102-based panels" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y if you want to enable support for panels based on the + himax HX83102 controller. + config DRM_PANEL_HIMAX_HX83112A tristate "Himax HX83112A-based DSI panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index f156d7fa0bcc..8fa9e38382f6 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -15,6 +15,7 @@ obj-$(CONFIG_DRM_PANEL_EBBG_FT8719) +=3D panel-ebbg-ft871= 9.o obj-$(CONFIG_DRM_PANEL_ELIDA_KD35T133) +=3D panel-elida-kd35t133.o obj-$(CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02) +=3D panel-feixin-k101-im2ba02= .o obj-$(CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D) +=3D panel-feiyang-fy07024= di26a30d.o +obj-$(CONFIG_DRM_PANEL_HIMAX_HX83102) +=3D panel-himax-hx83102.o obj-$(CONFIG_DRM_PANEL_HIMAX_HX83112A) +=3D panel-himax-hx83112a.o obj-$(CONFIG_DRM_PANEL_HIMAX_HX8394) +=3D panel-himax-hx8394.o obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) +=3D panel-ilitek-ili9322.o diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/d= rm/panel/panel-boe-tv101wum-nl6.c index 0ffe8f8c01de..11c1c56145c8 100644 --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c @@ -1300,74 +1300,6 @@ static const struct panel_init_cmd starry_qfh032011_= 53g_init_cmd[] =3D { {}, }; =20 -static const struct panel_init_cmd starry_himax83102_j02_init_cmd[] =3D { - _INIT_DCS_CMD(0xB9, 0x83, 0x10, 0x21, 0x55, 0x00), - _INIT_DCS_CMD(0xB1, 0x2C, 0xB5, 0xB5, 0x31, 0xF1, 0x31, 0xD7, 0x2F, 0x36,= 0x36, 0x36, 0x36, 0x1A, 0x8B, 0x11, - 0x65, 0x00, 0x88, 0xFA, 0xFF, 0xFF, 0x8F, 0xFF, 0x08, 0x74, 0x33), - _INIT_DCS_CMD(0xB2, 0x00, 0x47, 0xB0, 0x80, 0x00, 0x12, 0x72, 0x3C, 0xA3,= 0x03, 0x03, 0x00, 0x00, 0x88, 0xF5), - _INIT_DCS_CMD(0xB4, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, 0x63, 0x5C, 0x63,= 0x5C, 0x01, 0x9E), - _INIT_DCS_CMD(0xE9, 0xCD), - _INIT_DCS_CMD(0xBA, 0x84), - _INIT_DCS_CMD(0xE9, 0x3F), - _INIT_DCS_CMD(0xBC, 0x1B, 0x04), - _INIT_DCS_CMD(0xBE, 0x20), - _INIT_DCS_CMD(0xBF, 0xFC, 0xC4), - _INIT_DCS_CMD(0xC0, 0x36, 0x36, 0x22, 0x11, 0x22, 0xA0, 0x61, 0x08, 0xF5,= 0x03), - _INIT_DCS_CMD(0xE9, 0xCC), - _INIT_DCS_CMD(0xC7, 0x80), - _INIT_DCS_CMD(0xE9, 0x3F), - _INIT_DCS_CMD(0xE9, 0xC6), - _INIT_DCS_CMD(0xC8, 0x97), - _INIT_DCS_CMD(0xE9, 0x3F), - _INIT_DCS_CMD(0xC9, 0x00, 0x1E, 0x13, 0x88, 0x01), - _INIT_DCS_CMD(0xCB, 0x08, 0x13, 0x07, 0x00, 0x0F, 0x33), - _INIT_DCS_CMD(0xCC, 0x02), - _INIT_DCS_CMD(0xE9, 0xC4), - _INIT_DCS_CMD(0xD0, 0x03), - _INIT_DCS_CMD(0xE9, 0x3F), - _INIT_DCS_CMD(0xD1, 0x37, 0x06, 0x00, 0x02, 0x04, 0x0C, 0xFF), - _INIT_DCS_CMD(0xD2, 0x1F, 0x11, 0x1F), - _INIT_DCS_CMD(0xD3, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08,= 0x37, 0x47, 0x34, 0x3B, 0x12, 0x12, 0x03, - 0x03, 0x32, 0x10, 0x10, 0x00, 0x10, 0x32, 0x10, 0x08, 0x00, 0x08, 0x32, = 0x17, 0x94, 0x07, 0x94, 0x00, 0x00), - _INIT_DCS_CMD(0xD5, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,= 0x18, 0x19, 0x19, 0x40, 0x40, 0x1A, 0x1A, - 0x1B, 0x1B, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x20, 0x21, = 0x28, 0x29, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1= 8, 0x18, 0x18, 0x18), - _INIT_DCS_CMD(0xD6, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,= 0x18, 0x40, 0x40, 0x19, 0x19, 0x1A, 0x1A, - 0x1B, 0x1B, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x29, 0x28, = 0x21, 0x20, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1= 8, 0x18, 0x18, 0x18), - _INIT_DCS_CMD(0xD8, 0xAA, 0xBA, 0xEA, 0xAA, 0xAA, 0xA0, 0xAA, 0xBA, 0xEA,= 0xAA, 0xAA, 0xA0, 0xAA, 0xBA, 0xEA, 0xAA, - 0xAA, 0xA0, 0xAA, 0xBA, 0xEA, 0xAA, 0xAA, 0xA0, 0xAA, 0xBA, 0xEA, 0xAA, = 0xAA, 0xA0, 0xAA, 0xBA, 0xEA, 0xAA, 0xAA, 0xA0), - _INIT_DCS_CMD(0xE0, 0x00, 0x09, 0x14, 0x1E, 0x26, 0x48, 0x61, 0x67, 0x6C,= 0x67, 0x7D, 0x7F, 0x80, 0x8B, 0x87, 0x8F, 0x98, 0xAB, - 0xAB, 0x55, 0x5C, 0x68, 0x73, 0x00, 0x09, 0x14, 0x1E, 0x26, 0x48, 0x61, = 0x67, 0x6C, 0x67, 0x7D, 0x7F, 0x80, 0x8B, 0x87, 0x8F, 0x98, 0xAB, 0xAB, 0x5= 5, 0x5C, 0x68, 0x73), - _INIT_DCS_CMD(0xE7, 0x0E, 0x10, 0x10, 0x21, 0x2B, 0x9A, 0x02, 0x54, 0x9A,= 0x14, 0x14, 0x00, 0x00, 0x00, 0x00, 0x12, 0x05, 0x02, 0x02, 0x10), - _INIT_DCS_CMD(0xBD, 0x01), - _INIT_DCS_CMD(0xB1, 0x01, 0xBF, 0x11), - _INIT_DCS_CMD(0xCB, 0x86), - _INIT_DCS_CMD(0xD2, 0x3C, 0xFA), - _INIT_DCS_CMD(0xD3, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,= 0x0C, 0x01), - _INIT_DCS_CMD(0xE7, 0x02, 0x00, 0x28, 0x01, 0x7E, 0x0F, 0x7E, 0x10, 0xA0,= 0x00, 0x00, 0x20, 0x40, 0x50, 0x40), - _INIT_DCS_CMD(0xBD, 0x02), - _INIT_DCS_CMD(0xD8, 0xFF, 0xFF, 0xBF, 0xFE, 0xAA, 0xA0, 0xFF, 0xFF, 0xBF,= 0xFE, 0xAA, 0xA0), - _INIT_DCS_CMD(0xE7, 0xFE, 0x04, 0xFE, 0x04, 0xFE, 0x04, 0x03, 0x03, 0x03,= 0x26, 0x00, 0x26, 0x81, 0x02, 0x40, 0x00, 0x20, 0x9E, 0x04, 0x03, 0x02, 0x= 01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00), - _INIT_DCS_CMD(0xBD, 0x03), - _INIT_DCS_CMD(0xE9, 0xC6), - _INIT_DCS_CMD(0xB4, 0x03, 0xFF, 0xF8), - _INIT_DCS_CMD(0xE9, 0x3F), - _INIT_DCS_CMD(0xD8, 0x00, 0x2A, 0xAA, 0xA8, 0x00, 0x00, 0x00, 0x2A, 0xAA,= 0xA8, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0x= FC, 0x00, 0x00, 0x00, 0x2A, 0xAA, 0xA8, - 0x00, 0x00, 0x00, 0x2A, 0xAA, 0xA8, 0x00, 0x00), - _INIT_DCS_CMD(0xBD, 0x00), - _INIT_DCS_CMD(0xE9, 0xC4), - _INIT_DCS_CMD(0xBA, 0x96), - _INIT_DCS_CMD(0xE9, 0x3F), - _INIT_DCS_CMD(0xBD, 0x01), - _INIT_DCS_CMD(0xE9, 0xC5), - _INIT_DCS_CMD(0xBA, 0x4F), - _INIT_DCS_CMD(0xE9, 0x3F), - _INIT_DCS_CMD(0xBD, 0x00), - _INIT_DCS_CMD(0x11), - _INIT_DELAY_CMD(120), - _INIT_DCS_CMD(0x29), - {}, -}; - static inline struct boe_panel *to_boe_panel(struct drm_panel *panel) { return container_of(panel, struct boe_panel, base); @@ -1767,34 +1699,6 @@ static const struct panel_desc starry_qfh032011_53g_= desc =3D { .lp11_before_reset =3D true, }; =20 -static const struct drm_display_mode starry_himax83102_j02_default_mode = =3D { - .clock =3D 162680, - .hdisplay =3D 1200, - .hsync_start =3D 1200 + 60, - .hsync_end =3D 1200 + 60 + 20, - .htotal =3D 1200 + 60 + 20 + 40, - .vdisplay =3D 1920, - .vsync_start =3D 1920 + 116, - .vsync_end =3D 1920 + 116 + 8, - .vtotal =3D 1920 + 116 + 8 + 12, - .type =3D DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, -}; - -static const struct panel_desc starry_himax83102_j02_desc =3D { - .modes =3D &starry_himax83102_j02_default_mode, - .bpc =3D 8, - .size =3D { - .width_mm =3D 141, - .height_mm =3D 226, - }, - .lanes =3D 4, - .format =3D MIPI_DSI_FMT_RGB888, - .mode_flags =3D MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | - MIPI_DSI_MODE_LPM, - .init_cmds =3D starry_himax83102_j02_init_cmd, - .lp11_before_reset =3D true, -}; - static int boe_panel_get_modes(struct drm_panel *panel, struct drm_connector *connector) { @@ -1970,9 +1874,6 @@ static const struct of_device_id boe_of_match[] =3D { { .compatible =3D "starry,2081101qfh032011-53g", .data =3D &starry_qfh032011_53g_desc }, - { .compatible =3D "starry,himax83102-j02", - .data =3D &starry_himax83102_j02_desc - }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, boe_of_match); diff --git a/drivers/gpu/drm/panel/panel-himax-hx83102.c b/drivers/gpu/drm/= panel/panel-himax-hx83102.c new file mode 100644 index 000000000000..ac8329f89195 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-himax-hx83102.c @@ -0,0 +1,567 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Driver for panels based on Himax HX83102 controller, such as: + * + * - Starry 10.51" WUXGA MIPI-DSI panel + * + * Based on drivers/gpu/drm/panel/panel-boe-tv101wum.c + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include