From patchwork Sun Jun 30 18:36:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 13717278 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F40D1C27C4F for ; Sun, 30 Jun 2024 18:36:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4B9AA10E2B1; Sun, 30 Jun 2024 18:36:43 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=postmarketos.org header.i=@postmarketos.org header.b="YAIX0Ezf"; dkim-atps=neutral Received: from out-183.mta0.migadu.com (out-183.mta0.migadu.com [91.218.175.183]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7733810E2B1 for ; Sun, 30 Jun 2024 18:36:42 +0000 (UTC) X-Envelope-To: robh@kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=postmarketos.org; s=key1; t=1719772600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5YqcFbMJPQOyPCi7l9KNgfXa8T+1VUu7RUN/CRN/b0M=; b=YAIX0EzfrWyiG5RdjzpdTVeeZBhtotuv5TzuFkfPTo7vBWP5MVz5zQY1S2b23LP4wVt+3a vJPsNylbvoeWl+kkMlP4IfuO41cCpeu2KVv6eGaUw0Q3nyiyeOHsa7OR2n7g0FxKNl7jZJ 6cV3Q/EVXzsWuFvM1pFVFVXyDiOSXrKu3i6B+HqAjfohaNFWMyoyAOVuuyvbD4FP2fz64W IJvSVhPjdCWw0WX5hBQrfw3Lfw7LJxT9d9Iu2CBV+dAZtr0qEz5vQ+7aHeDOJyIqo+Phf7 zU1BTpuuch4QGs+SGlsKRamptYFz/fBzL30Mnfderk715zUxYXVr70msN1yecg== X-Envelope-To: conor+dt@kernel.org X-Envelope-To: neil.armstrong@linaro.org X-Envelope-To: daniel@ffwll.ch X-Envelope-To: ~postmarketos/upstreaming@lists.sr.ht X-Envelope-To: dmitry.torokhov@gmail.com X-Envelope-To: linux-input@vger.kernel.org X-Envelope-To: mripard@kernel.org X-Envelope-To: caleb@postmarketos.org X-Envelope-To: linux-arm-msm@vger.kernel.org X-Envelope-To: krzk+dt@kernel.org X-Envelope-To: dri-devel@lists.freedesktop.org X-Envelope-To: rydberg@bitmath.org X-Envelope-To: konrad.dybcio@linaro.org X-Envelope-To: maarten.lankhorst@linux.intel.com X-Envelope-To: devicetree@vger.kernel.org X-Envelope-To: dmitry.baryshkov@linaro.org X-Envelope-To: tzimmermann@suse.de X-Envelope-To: airlied@gmail.com X-Envelope-To: quic_jesszhan@quicinc.com X-Envelope-To: andersson@kernel.org X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Caleb Connolly Date: Sun, 30 Jun 2024 20:36:24 +0200 Subject: [PATCH v2 1/8] dt-bindings: panel: document Samsung AMB655X MIME-Version: 1.0 Message-Id: <20240630-oneplus8-v2-1-c4a1f8da74f1@postmarketos.org> References: <20240630-oneplus8-v2-0-c4a1f8da74f1@postmarketos.org> In-Reply-To: <20240630-oneplus8-v2-0-c4a1f8da74f1@postmarketos.org> To: Caleb Connolly , Neil Armstrong , Jessica Zhang , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dmitry Torokhov , Bjorn Andersson , Konrad Dybcio , Henrik Rydberg Cc: Dmitry Baryshkov , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht X-Developer-Signature: v=1; a=openpgp-sha256; l=1943; i=caleb@postmarketos.org; h=from:subject:message-id; bh=arZv7vt1rR4XnSFoV4a11i3btIAXQX7jpGRdlhwlkkk=; b=owEBbQKS/ZANAwAIAQWDMSsZX2S2AcsmYgBmgaWz0wWKBpv3QkqeTHYFGLxOMM8F+fMWZIgI/ 31zEok0XT2JAjMEAAEIAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZoGlswAKCRAFgzErGV9k tuJAD/kBwFfzoQJ0rprMD1nLHBF8QxFmSZva0HikjV4re9t/zIrUxMsdktBHUteQ+avKNEDJ/FF 5a0bxCcmPRPxxbXb+19HpdhqtIFyykvl/ysSNF2RRO7K0tyLaSZ04mWUAP1cV8jg8e1zNsqp0ni tkCe3EqSQwyqOFMZ8WtK9UbYkjDyfEJyxvtiR+tQ4QA5pd3HyBEcu5mda60us6bq2y0StLPTHeE +WjySRjaD4nRuLAQAK6s3RwXjlT06AgYupJ6artzPSD/SpmlFe7fYufZ//eLP47AUTfgplMvHgC Vc94Vjx+0bu1hV5TDPhb9fa71KUJq2TgMrCGUVkXFAS8ny7Lo+GmPbk/q53cy1ZTJKXNrhLRp+w yYIoiyMybIIYwRil+yUCbztB03aKPbuD+s5nVLdLgGU33vDJsdFFumBIIiZs4HXsDInmpA/6J7v T5jFBlkgQd2C8Co70iaNINpdEVsQ2cHNRxvkT3/Rmc6EHUNsQhJM2XQshQ8n/rgm/dHtPaGQT6u uBHhtoisqi9iAsixMnbRxRqPOr7ei/TSHvpW1UxWZAE51JnDeQXld4u/LPWicaaMAqC/prMDj8w dFCLdQbBZDcy+4FUexLYAmly3wExyR/wIWhyaXxs2L3ry+glJFKExQ4z9Aq2H5Pv20m0xusA+7u 6DApVTgSc1PC/Eg== X-Developer-Key: i=caleb@postmarketos.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 X-Migadu-Flow: FLOW_OUT X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Describe the Samsung AMB655X panel. It has three supplies. Signed-off-by: Caleb Connolly --- .../bindings/display/panel/samsung,amb655x.yaml | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/samsung,amb655x.yaml b/Documentation/devicetree/bindings/display/panel/samsung,amb655x.yaml new file mode 100644 index 000000000000..085ad02ac74f --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/samsung,amb655x.yaml @@ -0,0 +1,63 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/samsung,amb655x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung AMB655X 1080x2400 120hz AMOLED panel + +maintainers: + - Caleb Connolly + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + const: samsung,amb655x + + reg: + maxItems: 1 + + reset-gpios: + description: reset gpio, must be GPIO_ACTIVE_LOW + + vddio-supply: true + vdd-supply: true + avdd-supply: true + enable-gpios: true + port: true + +required: + - compatible + - reg + - vdd-supply + - avdd-supply + - vddio-supply + +additionalProperties: false + +examples: + - | + #include + panel@0 { + reg = <0>; + compatible = "samsung,amb655x"; + vddio-supply = <&vreg_l14a_1p8>; + vdd-supply = <&vreg_l11c_3p3>; + avdd-supply = <&panel_avdd_5p5>; + reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>; + + pinctrl-0 = <&panel_reset_pins &panel_vsync_pins &panel_vout_pins>; + pinctrl-names = "default"; + + status = "okay"; + + port { + panel_in_0: endpoint { + remote-endpoint = <&mdss_dsi0_out>; + }; + }; + }; + +... From patchwork Sun Jun 30 18:36:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 13717282 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B5D0FC3064D for ; Sun, 30 Jun 2024 18:36:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3DC3D10E2BF; Sun, 30 Jun 2024 18:36:55 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=postmarketos.org header.i=@postmarketos.org header.b="mOidTYR/"; dkim-atps=neutral Received: from out-187.mta0.migadu.com (out-187.mta0.migadu.com [91.218.175.187]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1D23610E2B7 for ; Sun, 30 Jun 2024 18:36:44 +0000 (UTC) X-Envelope-To: robh@kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=postmarketos.org; s=key1; t=1719772602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZdEQ1EbZMn01XAPtZH6WuK788jpoWDyo/EngDbWuXh8=; b=mOidTYR/gxv822MQFeMCLNdEv4aKUAa5B6FIIk0HhymW6xlwW2VG1d74ZUBI7i9sTt4Cjz 3mhdwH7K96vbI4cHiVj8M0F5UdDozu88faIqZcvCwO25meHxt17l3KwZ9GFbBmLNtuTivr 8esnvnpcaa5YwKpVyO2mIwCImlIpAO5xLuWnMY1uY11glGPmjQbenDWLV7tdsa/IEILgRX cZUK8SGhwFmjyVQOhMdy5YgIi9voBgBUikkM4v3k+ILIvF0NBf+iiti37CZUfF+9pqFfA4 0kmetHzHuIIm0PRkZHVVRuvRRl6lep9OU41kxZHn9jwbKG587b73bdzvkq+9Xw== X-Envelope-To: conor+dt@kernel.org X-Envelope-To: neil.armstrong@linaro.org X-Envelope-To: daniel@ffwll.ch X-Envelope-To: ~postmarketos/upstreaming@lists.sr.ht X-Envelope-To: dmitry.torokhov@gmail.com X-Envelope-To: linux-input@vger.kernel.org X-Envelope-To: mripard@kernel.org X-Envelope-To: caleb@postmarketos.org X-Envelope-To: linux-arm-msm@vger.kernel.org X-Envelope-To: krzk+dt@kernel.org X-Envelope-To: dri-devel@lists.freedesktop.org X-Envelope-To: rydberg@bitmath.org X-Envelope-To: konrad.dybcio@linaro.org X-Envelope-To: maarten.lankhorst@linux.intel.com X-Envelope-To: devicetree@vger.kernel.org X-Envelope-To: dmitry.baryshkov@linaro.org X-Envelope-To: tzimmermann@suse.de X-Envelope-To: airlied@gmail.com X-Envelope-To: quic_jesszhan@quicinc.com X-Envelope-To: andersson@kernel.org X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Caleb Connolly Date: Sun, 30 Jun 2024 20:36:25 +0200 Subject: [PATCH v2 2/8] dt-bindings: input: touchscreen: document synaptics TCM oncell MIME-Version: 1.0 Message-Id: <20240630-oneplus8-v2-2-c4a1f8da74f1@postmarketos.org> References: <20240630-oneplus8-v2-0-c4a1f8da74f1@postmarketos.org> In-Reply-To: <20240630-oneplus8-v2-0-c4a1f8da74f1@postmarketos.org> To: Caleb Connolly , Neil Armstrong , Jessica Zhang , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dmitry Torokhov , Bjorn Andersson , Konrad Dybcio , Henrik Rydberg Cc: Dmitry Baryshkov , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht X-Developer-Signature: v=1; a=openpgp-sha256; l=2098; i=caleb@postmarketos.org; h=from:subject:message-id; bh=XL5TcWDmclGnBkenp9Wm9HwFQWHhCM5cOKm1DOPdk6k=; b=owEBbQKS/ZANAwAIAQWDMSsZX2S2AcsmYgBmgaWzCd60t6AOzbkYJCsy1RmzqLlkpK03uXyb4 aFrFHSqZe6JAjMEAAEIAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZoGlswAKCRAFgzErGV9k tvqmD/4hxnXUzUEcQ6Wm8IIt1YhkO6B6Lsalzw1i2BTO7N5Z1gySLQod9ZBHJwIq2/McIzIC+01 KXLn2JU+C8Y4IFoPmBbAQygivnNDR0oXqYH6JW/D5jWIIuZqL3MDNpa4fdkZbh/FmOffZFzdXah 2gvZCLl0PAYXAAhD3J7P6ShhJbto56KA4ojs6rXz+/ZNg5B7LgQMUSutPjOuWnBIwVPExKD0jl5 RllLKPLUKoj1Pw/fIbMOBh1T14ovjOpX9+zX9c84PPEPjMjGxxAS4UrlEz3LEVgO+HHpUofNEGi rNjGLglowsCzcNIenPZogX9mLs3W17vcS4a8KNuy81SbKuUOEWSZjsWUr07iLNi/VakK1YwDJhN UZgiHzKiFphvNtgVOwn8TUMuwkiA++guKwjRs1iw/fIjR4tPqduJMbCVKYCpt4h1qF/6tSFK0jT P0BYax56LF53IGCgfq+Zl9dlplfgkhesWKapmGp5VXaKQIq+13L+2XvfT++HagEpoJYRbAD05Ty OfcBve782wlAmUK/6YfRyhG/h/Fy4LchCYc+/NdUmXk6KrQjwKbg5ld941/S7qWzysh64HAwmnz 3JZx8w1PJ54XA6RnxEQXZb2OI2/cXmmkIMiOc+sgV/8JRo891zxEEkNz47Rc7DBi1F4tihDaIh3 +yCMT61aD9u/4og== X-Developer-Key: i=caleb@postmarketos.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 X-Migadu-Flow: FLOW_OUT X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Document the Synaptics TCM oncell series of touchscreens, starting with the s3908. Signed-off-by: Caleb Connolly --- .../input/touchscreen/syna,tcm-oncell.yaml | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/Documentation/devicetree/bindings/input/touchscreen/syna,tcm-oncell.yaml b/Documentation/devicetree/bindings/input/touchscreen/syna,tcm-oncell.yaml new file mode 100644 index 000000000000..6e366c9446f8 --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/syna,tcm-oncell.yaml @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/touchscreen/syna,tcm-oncell.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Synaptics TCM Oncell i2c touchscreen + +maintainers: + - Caleb Connolly + +allOf: + - $ref: touchscreen.yaml# + +properties: + compatible: + enum: + - syna,s3908 + + reg: + maxItems: 1 + + interrupts-extended: + maxItems: 1 + + reset-gpios: + maxItems: 1 + description: Reset GPIO the chip is connected to. + + vdd-supply: + description: a phandle for the regulator supplying 3V power. + + vcc-supply: + description: a phandle for the regulator supplying IO power. + +additionalProperties: false + +required: + - compatible + - reg + - interrupts-extended + - reset-gpios + - vdd-supply + - vcc-supply + +examples: + - | + #include + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + clock-frequency = <400000>; + status = "okay"; + + touchscreen@4b { + compatible = "syna,s3908"; + reg = <0x4B>; + + interrupts-extended = <&tlmm 39 0x2008>; + + reset-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; + + vdd-supply = <&vreg_l13a_ts_3p0>; + vcc-supply = <&vreg_l1c_1p8>; + }; + }; From patchwork Sun Jun 30 18:36:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 13717281 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 706C2C27C4F for ; Sun, 30 Jun 2024 18:36:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CA5D310E2BA; Sun, 30 Jun 2024 18:36:49 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=postmarketos.org header.i=@postmarketos.org header.b="sWFrK6Ev"; dkim-atps=neutral Received: from out-177.mta0.migadu.com (out-177.mta0.migadu.com [91.218.175.177]) by gabe.freedesktop.org (Postfix) with ESMTPS id D428E10E2B7 for ; Sun, 30 Jun 2024 18:36:45 +0000 (UTC) X-Envelope-To: robh@kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=postmarketos.org; s=key1; t=1719772604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1iJWQP8kPoI5Jy7lwZwh3ljZEa5X8ygkgrRafMpTwQM=; b=sWFrK6EvGqQjzfhIH+d3HuwM64C8jMYpZXbThqT6mwgbXL3LBzBWFLhfgujTosu0PDC9T2 +Is41jz5Qd4Gd9EJ6t5Q/WTlpc9QhJ2azvVkfWUZQ5jjguCfveEIHqQu1NzH0Tv/RzriSY 3fZ7CfMpEmfTJhkWQkHVFsy1/j4wKfxQfkwA35Sax9SDKbS9aTXsCbWMX+yUeAuhCwUE6I OeUlScL3G62IUWNNzHnAEet1Jhefaxf/3eMqJoICPpRA7Rt5stnTj6dm0YEnEdLQMeNN2y JQJs1T9Ihx06yQdG/Q+73BNPvPR/qZ5aJ/odusKHgxxaLkUvfIIA+xf53hZ+xQ== X-Envelope-To: conor+dt@kernel.org X-Envelope-To: neil.armstrong@linaro.org X-Envelope-To: daniel@ffwll.ch X-Envelope-To: ~postmarketos/upstreaming@lists.sr.ht X-Envelope-To: dmitry.torokhov@gmail.com X-Envelope-To: linux-input@vger.kernel.org X-Envelope-To: mripard@kernel.org X-Envelope-To: caleb@postmarketos.org X-Envelope-To: krzysztof.kozlowski@linaro.org X-Envelope-To: linux-arm-msm@vger.kernel.org X-Envelope-To: krzk+dt@kernel.org X-Envelope-To: dri-devel@lists.freedesktop.org X-Envelope-To: rydberg@bitmath.org X-Envelope-To: konrad.dybcio@linaro.org X-Envelope-To: maarten.lankhorst@linux.intel.com X-Envelope-To: devicetree@vger.kernel.org X-Envelope-To: dmitry.baryshkov@linaro.org X-Envelope-To: tzimmermann@suse.de X-Envelope-To: airlied@gmail.com X-Envelope-To: quic_jesszhan@quicinc.com X-Envelope-To: andersson@kernel.org X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Caleb Connolly Date: Sun, 30 Jun 2024 20:36:26 +0200 Subject: [PATCH v2 3/8] dt-bindings: arm: qcom: add OnePlus 8 series MIME-Version: 1.0 Message-Id: <20240630-oneplus8-v2-3-c4a1f8da74f1@postmarketos.org> References: <20240630-oneplus8-v2-0-c4a1f8da74f1@postmarketos.org> In-Reply-To: <20240630-oneplus8-v2-0-c4a1f8da74f1@postmarketos.org> To: Caleb Connolly , Neil Armstrong , Jessica Zhang , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dmitry Torokhov , Bjorn Andersson , Konrad Dybcio , Henrik Rydberg Cc: Dmitry Baryshkov , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Krzysztof Kozlowski X-Developer-Signature: v=1; a=openpgp-sha256; l=1003; i=caleb@postmarketos.org; h=from:subject:message-id; bh=sfqCkFm4ffKdXhUh0QxIxVfly9k+wO7sdo7kIj8rVGc=; b=owEBbQKS/ZANAwAIAQWDMSsZX2S2AcsmYgBmgaWzMisY6NFhaBX5y45OFWOoYcH6nbzOrBWKG 2VA5vgpxKKJAjMEAAEIAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZoGlswAKCRAFgzErGV9k tpQMD/4uFmj2FlllhUvvBi7GnoQiMBjL2V/XwzG7SFGjFuujMRiY4vEqGxG8XUtpOUlbY/hOqev 2Mby/K0V/TjJAaLQAm3XTC4Vnhl8zZjbWNLqmhvaN/YLSV7X9hNhwv6MS1+vnDDvTnHI4TPj9RL o+MO9u/PrMN+lD0cI+WF24lQm87pR4hJWccugcdBTJjAJ3pPyPYa0wOHsbuae00vA+fy0e0WKam pq8kP/Nh5Tl+7eGYf317Kb4K7il8TTmQr799njGNVBCrw8va2oQwO6FzCU9HMZLH2aX3tZXhdg+ zc2V/gGx3NUzj7Op/HyXHgbo0e8mnK+Xq3lhkVCxLw3cvsVdkWSionpGZtEOF2Hk4XTY6S2r1ON uWv63pD2W6nERquMDN/EgYBdfi3gWB9l70f4NUShXAZuT61bFNmrecq/dFyy1DaUlK26fl5+jOW zOyIHyEjbjTT3hGP7En2HTTYcAeMYoQbcQYshI78laLJSlnJe5Ds2EbiWIYK/7/jZ+XJlLw+Uvh NWRN92tm+DMT3uTZcCjtQ5lsFP3al1XKthSenkKUEXBAf5UnH2GqgQu+9WJ20QItHyAis5BmzQE J3SP/GmbZVN5jdJDTBjD6x/2byLoJ9aWfK192usEFWeAsFCpRvjn4F6wPUVfrK9v+fWztq6/2w5 QfENbPK/iHBsp5Q== X-Developer-Key: i=caleb@postmarketos.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 X-Migadu-Flow: FLOW_OUT X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add bindings for the OnePlus 8, 8 Pro, and 8T devices. Acked-by: Krzysztof Kozlowski Signed-off-by: Caleb Connolly --- Documentation/devicetree/bindings/arm/qcom.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml index d839691a900c..3687b65cc6f0 100644 --- a/Documentation/devicetree/bindings/arm/qcom.yaml +++ b/Documentation/devicetree/bindings/arm/qcom.yaml @@ -986,8 +986,11 @@ properties: - enum: - qcom,qrb5165-rb5 - qcom,sm8250-hdk - qcom,sm8250-mtp + - oneplus,kebab # OnePlus 8T + - oneplus,instantnoodle # OnePlus 8 + - oneplus,instantnoodlep # OnePlus 8 Pro - sony,pdx203-generic - sony,pdx206-generic - xiaomi,elish - xiaomi,pipa From patchwork Sun Jun 30 18:36:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 13717280 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D3666C3064D for ; Sun, 30 Jun 2024 18:36:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 586B710E2B7; Sun, 30 Jun 2024 18:36:49 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=postmarketos.org header.i=@postmarketos.org header.b="oMd6pq90"; dkim-atps=neutral Received: from out-187.mta0.migadu.com (out-187.mta0.migadu.com [91.218.175.187]) by gabe.freedesktop.org (Postfix) with ESMTPS id 33EE110E2B7 for ; Sun, 30 Jun 2024 18:36:47 +0000 (UTC) X-Envelope-To: robh@kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=postmarketos.org; s=key1; t=1719772605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H7U98KFw2NBX8USOS8/v/gKpgMdmoWOHtCL2sTlkgOQ=; b=oMd6pq90R6z9R8S8wRou/U0vlye457KJuG6u8Okxu3tzpZPqHbx61UW906oOJSy3Af+k1F 9VDUMTPfir8LDjJH081jifohQVivb8WQ9NXgOdxwdmOooBhEAx/Lu8+8pnnvBn09fXkOZ1 vaKWM2KQy1di+XC4qujCHA697fi8AegHngIZ43zcc4B7gdSG+cmkDmQvRQ8D5kqs34HuqW r7OsmYy6aq24AwkvdI2fg8NLr5ed4SAENntzQEkvcU1u1poVXclIu6p6z9EHOSChy9zHG0 qfI28w0fzp95hs8Y5KJorSw1NezH+vYiC2scffD7dVX8Ui5pox2hYRexYA+uPg== X-Envelope-To: conor+dt@kernel.org X-Envelope-To: neil.armstrong@linaro.org X-Envelope-To: daniel@ffwll.ch X-Envelope-To: ~postmarketos/upstreaming@lists.sr.ht X-Envelope-To: dmitry.torokhov@gmail.com X-Envelope-To: linux-input@vger.kernel.org X-Envelope-To: mripard@kernel.org X-Envelope-To: caleb@postmarketos.org X-Envelope-To: linux-arm-msm@vger.kernel.org X-Envelope-To: krzk+dt@kernel.org X-Envelope-To: dri-devel@lists.freedesktop.org X-Envelope-To: rydberg@bitmath.org X-Envelope-To: konrad.dybcio@linaro.org X-Envelope-To: maarten.lankhorst@linux.intel.com X-Envelope-To: devicetree@vger.kernel.org X-Envelope-To: dmitry.baryshkov@linaro.org X-Envelope-To: tzimmermann@suse.de X-Envelope-To: airlied@gmail.com X-Envelope-To: quic_jesszhan@quicinc.com X-Envelope-To: andersson@kernel.org X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Caleb Connolly Date: Sun, 30 Jun 2024 20:36:27 +0200 Subject: [PATCH v2 4/8] drm: mipi: add mipi_dsi_generic_write_multi_type() MIME-Version: 1.0 Message-Id: <20240630-oneplus8-v2-4-c4a1f8da74f1@postmarketos.org> References: <20240630-oneplus8-v2-0-c4a1f8da74f1@postmarketos.org> In-Reply-To: <20240630-oneplus8-v2-0-c4a1f8da74f1@postmarketos.org> To: Caleb Connolly , Neil Armstrong , Jessica Zhang , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dmitry Torokhov , Bjorn Andersson , Konrad Dybcio , Henrik Rydberg Cc: Dmitry Baryshkov , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht X-Developer-Signature: v=1; a=openpgp-sha256; l=3936; i=caleb@postmarketos.org; h=from:subject:message-id; bh=dxKUN9O3IfKfVKdznJW7pHdoyiaNKC3n5pN/k8clVHk=; b=owEBbQKS/ZANAwAIAQWDMSsZX2S2AcsmYgBmgaWzNRPFIJh0bhLcxkkzB3Hv+G99oFLCmk2QF ftsdylqLDaJAjMEAAEIAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZoGlswAKCRAFgzErGV9k tvJLD/41mBLa1W4xZy39T0eQ+94M6vb2BH9D9K78hE3xcpPHY6Y+IQi7LldueaOLFp+pIR59kO2 SgVhGEYWHGUTsut31X0mcGUAhrAFDxB3/FaJk17BJXXS4IGbLb98jhT0KZJpdl/YaLmX7GyEWpS 0H4yPzZxRokDuEUHlPMj6S+wJtViAkAtYzf7pTGXIvFFcl3Bh/OkHbwBjvuWc25Sh2ZJ5qB0KVh xB2jV1rycXZOZZW/fDpRf12CMkInjqXPrmwuvYEDUQnhEMkScJX100T4T7UfTQ9sPz/QUL/dUnY fA0SCfw3BkcwLIXIBpDLK59dlsq1M39ORX1R1sCci1sw3W0DXLtYmctzGUxLagMjrhjUDB3PREI +duFie3R4uf5bclPaoJM+1XV5FP9epdBMPHqL0/u/UR1bfmZPjgLsX0PV+XQeRt+Fsbe46ITidg wM8u4uCSf/lX5Bc7X7uxsQ1eG/ZEptRC5csSHcNTeDjLyamBYnxDscZ75DwPDcRUxO/vv6iCqhx CpwkKUAOTdf7UvdVvErSVAllDHYXSyFbefol/K4hbjirMmb93b96tt2lEAunf9hHYGYWsxp6Oto +P1nkdX92p9Il+KvaOs+lUHfECfTVgD9uj1uWskwcF1YHkeIr2+LNYRGDCHr7i70Jg1JIpNftiC QFNukbotVqG7eGw== X-Developer-Key: i=caleb@postmarketos.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 X-Migadu-Flow: FLOW_OUT X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Some panels like the Samsung AMB655X use long write commands for all non-standard messages and do not work when trying to use the appropriate command type. Support these panels by introducing a new helper to send commands of a specific type, overriding the normal rules. Signed-off-by: Caleb Connolly Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_mipi_dsi.c | 40 ++++++++++++++++++++++++++++++++++++++++ include/drm/drm_mipi_dsi.h | 16 ++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index a471c46f5ca6..f2c7f3f23a6e 100644 --- a/drivers/gpu/drm/drm_mipi_dsi.c +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -819,8 +819,48 @@ void mipi_dsi_generic_write_multi(struct mipi_dsi_multi_context *ctx, } } EXPORT_SYMBOL(mipi_dsi_generic_write_multi); +/** + * mipi_dsi_generic_write_raw_multi() - transmit data using a generic write packet of + * a specific type + * @ctx: Context for multiple DSI transactions + * @type: data type of the packet + * @payload: buffer containing the payload + * @size: size of payload buffer + * + * This function will automatically choose the right data type depending on + * the payload length. + * + * Return: The number of bytes transmitted on success or a negative error code + * on failure. + */ +ssize_t mipi_dsi_generic_write_raw_multi(struct mipi_dsi_multi_context *ctx, + u8 type, const void *payload, size_t size) +{ + struct mipi_dsi_device *dsi = ctx->dsi; + struct mipi_dsi_msg msg = { + .channel = dsi->channel, + .tx_buf = payload, + .tx_len = size, + .type = type, + }; + ssize_t ret; + + if (ctx->accum_err) + return 0; + + ret = mipi_dsi_device_transfer(dsi, &msg); + if (ret < 0) { + ctx->accum_err = ret; + dev_err(&dsi->dev, "sending generic data %*ph failed: %zd\n", + (int)size, payload, ret); + } + + return ret; +} +EXPORT_SYMBOL(mipi_dsi_generic_write_raw_multi); + /** * mipi_dsi_generic_read() - receive data using a generic read packet * @dsi: DSI peripheral device * @params: buffer containing the request parameters diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index 71d121aeef24..fb23f4e3b94e 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h @@ -287,8 +287,10 @@ ssize_t mipi_dsi_generic_write(struct mipi_dsi_device *dsi, const void *payload, int mipi_dsi_generic_write_chatty(struct mipi_dsi_device *dsi, const void *payload, size_t size); void mipi_dsi_generic_write_multi(struct mipi_dsi_multi_context *ctx, const void *payload, size_t size); +ssize_t mipi_dsi_generic_write_raw_multi(struct mipi_dsi_multi_context *ctx, u8 type, + const void *payload, size_t size); ssize_t mipi_dsi_generic_read(struct mipi_dsi_device *dsi, const void *params, size_t num_params, void *data, size_t size); #define mipi_dsi_msleep(ctx, delay) \ @@ -432,8 +434,22 @@ void mipi_dsi_dcs_set_tear_on_multi(struct mipi_dsi_multi_context *ctx, static const u8 d[] = { cmd, seq }; \ mipi_dsi_dcs_write_buffer_multi(ctx, d, ARRAY_SIZE(d)); \ } while (0) +/** + * mipi_dsi_dcs_write_long_multi - transmit a DCS long command with payload + * @ctx: Context for multiple DSI transactions + * @cmd: Commands + * @seq: buffer containing data to be transmitted + */ +#define mipi_dsi_dcs_write_long_multi(ctx, cmd, seq...) \ + do { \ + static const u8 d[] = { cmd, seq }; \ + mipi_dsi_generic_write_raw_multi(ctx, \ + MIPI_DSI_DCS_LONG_WRITE, \ + d, ARRAY_SIZE(d)); \ + } while (0) + /** * struct mipi_dsi_driver - DSI driver * @driver: device driver model driver * @probe: callback for device binding From patchwork Sun Jun 30 18:36:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 13717283 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0A0FBC27C4F for ; Sun, 30 Jun 2024 18:36:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6078510E2C0; Sun, 30 Jun 2024 18:36:55 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=postmarketos.org header.i=@postmarketos.org header.b="nINYV3i8"; dkim-atps=neutral Received: from out-180.mta0.migadu.com (out-180.mta0.migadu.com [91.218.175.180]) by gabe.freedesktop.org (Postfix) with ESMTPS id 337C510E2BD for ; Sun, 30 Jun 2024 18:36:50 +0000 (UTC) X-Envelope-To: robh@kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=postmarketos.org; s=key1; t=1719772608; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8wDexlyPxHpS/cBCtsKrcB8JC5jDMbHDPqOjd7EkOqE=; b=nINYV3i8H2dpGbNc7kcfTfY6/1348jadM/8SVylfLbJuNqkDritBHfi5Uea3AoPV4Dg2db vZ7JC34pEQ4GHJg5IsxgyCk1QZ218wErIxNbgIMBo+db08y2SaonByBlaxxcxFIzmNDSmB JThTVBVFbSdMeZuZVO1RlX4bkiC2ciHgnxoUQvbh2UScLZYgqD/XA6tp0QBu75cdDqEXBx ezpVXw4WmrbvSk4uaeSrQBGbwWNcqNt+0sR5C8RWo82HJWQ24zCf3wYfVKsPo6HmB0Rhg7 iU8+dPZKwx+1NQ5Zc9AgzAhhjUmDWkYLsnuiT6apf5fKlULMjj9TZ/6yXXM4xw== X-Envelope-To: conor+dt@kernel.org X-Envelope-To: neil.armstrong@linaro.org X-Envelope-To: daniel@ffwll.ch X-Envelope-To: ~postmarketos/upstreaming@lists.sr.ht X-Envelope-To: dmitry.torokhov@gmail.com X-Envelope-To: linux-input@vger.kernel.org X-Envelope-To: mripard@kernel.org X-Envelope-To: caleb@postmarketos.org X-Envelope-To: linux-arm-msm@vger.kernel.org X-Envelope-To: krzk+dt@kernel.org X-Envelope-To: dri-devel@lists.freedesktop.org X-Envelope-To: rydberg@bitmath.org X-Envelope-To: konrad.dybcio@linaro.org X-Envelope-To: maarten.lankhorst@linux.intel.com X-Envelope-To: devicetree@vger.kernel.org X-Envelope-To: dmitry.baryshkov@linaro.org X-Envelope-To: tzimmermann@suse.de X-Envelope-To: airlied@gmail.com X-Envelope-To: quic_jesszhan@quicinc.com X-Envelope-To: andersson@kernel.org X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Caleb Connolly Date: Sun, 30 Jun 2024 20:36:28 +0200 Subject: [PATCH v2 5/8] drm/mipi-dsi: add set column/page multi helpers MIME-Version: 1.0 Message-Id: <20240630-oneplus8-v2-5-c4a1f8da74f1@postmarketos.org> References: <20240630-oneplus8-v2-0-c4a1f8da74f1@postmarketos.org> In-Reply-To: <20240630-oneplus8-v2-0-c4a1f8da74f1@postmarketos.org> To: Caleb Connolly , Neil Armstrong , Jessica Zhang , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dmitry Torokhov , Bjorn Andersson , Konrad Dybcio , Henrik Rydberg Cc: Dmitry Baryshkov , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht X-Developer-Signature: v=1; a=openpgp-sha256; l=1575; i=caleb@postmarketos.org; h=from:subject:message-id; bh=df5+d5FCM3DW4hk4Jk8xZ/YvNGiW/iW7120sQtEXdyI=; b=owEBbQKS/ZANAwAIAQWDMSsZX2S2AcsmYgBmgaWz7qufP83llhsqr5WIsFyU1H7wl4p1EoV2k ESlriQwULiJAjMEAAEIAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZoGlswAKCRAFgzErGV9k tqt8EACX2N3Mhg42qfsNPmD/eRDSN51CXvk/jqV2KKFX6/9HvLUGYVgOvPbDgSQ1uJlFXPoejRq vPPLpJouR1ZigzgFTgf0PsI2hGrQcNkj0zuWJGVFvbLtEt+z9znSyFYl1RkdZM1Wa3+qkLVkv7j FEhE0UcdZSQvduwRnDFtVSUpCKNF0nDN/7Xiy1QVnGL5DDL5e7XT6K112xBX7g+VewIeSnW03TB jCTrkUPtqphSrYxrQ4rw4FVqB7YF5xpKWieU3g6yKnouMvjGZuz7mpjyk5j+zrnUIYlCBx46FVh U8BXtWBv85ZKEMH5nbVUgAcyGic7wENGyX8BD9QhU+1vYGDK23LsfNJ8S6mV8e3PK4yrpi896PF reL+QIxop4VIMPgAwCj9QsYCfUo1xF28H8pRm6VMCWaznDXC0caJQbEYzRAyRjIxjyaC1UP9bb+ 5j9r9MO+kt2plMLcN99ugd9ZdeBpXsljBAPB7Y1yzZqLbivOPGCIOPWyptnJ8wBWKcUiWV0fIC2 LrbJ7zQwxuhYdYDCveE92l32uJwDlqBzZYNpSzDmc7AMU7ZJ9PCoLqplfK8R6z+7vhtg37tGWdL 5uhCiPFzVoMqTV+Z1S7482iIdoSIliyaeFhPOY2ig3xJRMokvHlmmtK3/2MmvqZpF8phMMu8q2x ri2ndtI4GF+QP3g== X-Developer-Key: i=caleb@postmarketos.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 X-Migadu-Flow: FLOW_OUT X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Introduce mipi_dsi_dcs_set_column_address_multi() and mipi_dsi_dcs_set_page_address_multi() helpers. Signed-off-by: Caleb Connolly Reviewed-by: Dmitry Baryshkov --- include/drm/drm_mipi_dsi.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index fb23f4e3b94e..f390bd261be7 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h @@ -434,8 +434,24 @@ void mipi_dsi_dcs_set_tear_on_multi(struct mipi_dsi_multi_context *ctx, static const u8 d[] = { cmd, seq }; \ mipi_dsi_dcs_write_buffer_multi(ctx, d, ARRAY_SIZE(d)); \ } while (0) +#define mipi_dsi_dcs_set_column_address_multi(ctx, start, end) \ + do { \ + static const u8 d[] = { MIPI_DCS_SET_COLUMN_ADDRESS, \ + (start) >> 8, (start) & 0xff, \ + (end) >> 8, (end) & 0xff }; \ + mipi_dsi_dcs_write_buffer_multi(ctx, d, ARRAY_SIZE(d)); \ + } while (0) + +#define mipi_dsi_dcs_set_page_address_multi(ctx, start, end) \ + do { \ + static const u8 d[] = { MIPI_DCS_SET_PAGE_ADDRESS, \ + (start) >> 8, (start) & 0xff, \ + (end) >> 8, (end) & 0xff }; \ + mipi_dsi_dcs_write_buffer_multi(ctx, d, ARRAY_SIZE(d)); \ + } while (0) + /** * mipi_dsi_dcs_write_long_multi - transmit a DCS long command with payload * @ctx: Context for multiple DSI transactions * @cmd: Commands From patchwork Sun Jun 30 18:36:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 13717284 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0CDE7C27C4F for ; Sun, 30 Jun 2024 18:37:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 831BF10E2B3; Sun, 30 Jun 2024 18:37:01 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=postmarketos.org header.i=@postmarketos.org header.b="WSj41HZM"; dkim-atps=neutral Received: from out-174.mta0.migadu.com (out-174.mta0.migadu.com [91.218.175.174]) by gabe.freedesktop.org (Postfix) with ESMTPS id 820ED10E2B8 for ; Sun, 30 Jun 2024 18:36:51 +0000 (UTC) X-Envelope-To: robh@kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=postmarketos.org; s=key1; t=1719772610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=P9ZFsw5xKwfg6vVcqc1X4au1s1qxxzW1yFV8kIX9ZSE=; b=WSj41HZMGv+5oU1m0ZUCu94priRa8IH+Xf+qpfZZXkMKcVQBHwQnOLpZUSlDoLnH7/DbLD vGpzC5/N21SSH/ixqqfq3tTutZkjzwIIiTHO5ZayFUU2BNC/2Wxi8f6+6EDUNhR2viYEz6 v5OkQG/f6CQGp7GYrO5C49twKxJdjTVmBNGE5ubWH8WYM/5PlGXLqYXn14/Npqn80eAsXi DPeM6HL89XghS3hklKVG0hdFPmGFK+9/CzjQxEL8vUzA00BnGvIVEoNZczgqScbOIkTLBS WXvyxtWlWBVwi+qWvPkjzArcx7BeFGnJIPVQUy9Eoah3OAF/CR0ytuSEyAX2Yw== X-Envelope-To: conor+dt@kernel.org X-Envelope-To: neil.armstrong@linaro.org X-Envelope-To: daniel@ffwll.ch X-Envelope-To: ~postmarketos/upstreaming@lists.sr.ht X-Envelope-To: dmitry.torokhov@gmail.com X-Envelope-To: linux-input@vger.kernel.org X-Envelope-To: mripard@kernel.org X-Envelope-To: caleb@postmarketos.org X-Envelope-To: linux-arm-msm@vger.kernel.org X-Envelope-To: krzk+dt@kernel.org X-Envelope-To: dri-devel@lists.freedesktop.org X-Envelope-To: rydberg@bitmath.org X-Envelope-To: konrad.dybcio@linaro.org X-Envelope-To: maarten.lankhorst@linux.intel.com X-Envelope-To: devicetree@vger.kernel.org X-Envelope-To: dmitry.baryshkov@linaro.org X-Envelope-To: tzimmermann@suse.de X-Envelope-To: airlied@gmail.com X-Envelope-To: quic_jesszhan@quicinc.com X-Envelope-To: andersson@kernel.org X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Caleb Connolly Date: Sun, 30 Jun 2024 20:36:29 +0200 Subject: [PATCH v2 6/8] drm/panel: add driver for samsung amb655x MIME-Version: 1.0 Message-Id: <20240630-oneplus8-v2-6-c4a1f8da74f1@postmarketos.org> References: <20240630-oneplus8-v2-0-c4a1f8da74f1@postmarketos.org> In-Reply-To: <20240630-oneplus8-v2-0-c4a1f8da74f1@postmarketos.org> To: Caleb Connolly , Neil Armstrong , Jessica Zhang , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dmitry Torokhov , Bjorn Andersson , Konrad Dybcio , Henrik Rydberg Cc: Dmitry Baryshkov , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht X-Developer-Signature: v=1; a=openpgp-sha256; l=16049; i=caleb@postmarketos.org; h=from:subject:message-id; bh=EPwneTSUtmzFjis/lUpYnHTx38d8qVEWHysAJM4/3lo=; b=owEBbQKS/ZANAwAIAQWDMSsZX2S2AcsmYgBmgaWzuaPi7F90lxPkFwq9649JuWMaX2MePgXr1 GADhQASGl+JAjMEAAEIAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZoGlswAKCRAFgzErGV9k trKID/9DttHjwt+bJmb9SIFBqofaHu3tELGSP04/SURKKIAzjTUWMdcVjTbpCXOiZ04C9N4PVhB x1/UFpfNaPUvWNX21ymPjCw8nhLYL3eZRPSs6gsskbCy73UfMEY2uHzx/vxsqIYJdYyxOSMi46w HqHo/kt0HEXv+elYqv+L8OYeeQ2jPT9qnjTenfbSaaA3xx5lOVvG0l96gVetbp30RYUSyYxirt+ 41U7Yfvrrr2nt0gMUVAM4hxnUgAN2RrNBcDI+DLtfdM52hEExbD0AXYrKz3qvIEr6oGSKKyoxFj 0rrbP8n0eqi1C125OamKGZ7jMW2MC5RWXS/bRYAQzZw6meShgU21IPLYyOGfnsj6F725OtAFXTy pRRTLoRicuMyRqSW6R+De6xVt7/mq6UFPexQWmPg7Er0aWbF4ww1Iv8xRNtuju9hp1c4Q+iKyYp lvv1Cn/05l6JR6shMeW90qMVWCfquSQWJA7oiQ3yF8ZPnPC5BW0lJpA/te5y3NsE6ciB8zwGn2U 6F65ziTCjY+Sy391weuqghqPdqw1qUA7313/r1ZnQZMgB+4Fxj3zdkUQpSByUkeBimXlwWv0Bh2 2k+bxioFuiVYcateYk6Lmls2murBA/WJCnkbfQPXJPspdMD56Vmk5Aa3TV3PK45gRkcOGZuyCcr Kao3oOGwoIWGtVg== X-Developer-Key: i=caleb@postmarketos.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 X-Migadu-Flow: FLOW_OUT X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This is a 1080x2400 120hz panel used on the OnePlus 8T. It uses DSC but with many non-standard DCS commands. The only user of this panel (the OnePlus 8T) has a bug somewhere in the DSI stack whereby it isn't possible to properly initialize this panel after a reset. As a result, the reset GPIO is made optional so it can be left unused on that device. Signed-off-by: Caleb Connolly --- MAINTAINERS | 7 + drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-samsung-amb655x.c | 399 ++++++++++++++++++++++++++ 4 files changed, 416 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 807feae089c4..2b9cfbf92d7a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7142,8 +7142,15 @@ M: Robert Chiras S: Maintained F: Documentation/devicetree/bindings/display/panel/raydium,rm67191.yaml F: drivers/gpu/drm/panel/panel-raydium-rm67191.c +DRM DRIVER FOR SAMSUNG AMB655X PANEL +M: Caleb Connolly +S: Maintained +T: git https://gitlab.freedesktop.org/drm/misc/kernel.git +F: Documentation/devicetree/bindings/display/panel/samsung,amb655x.yaml +F: drivers/gpu/drm/panel/panel-samsung-amb655x.c + DRM DRIVER FOR SAMSUNG DB7430 PANELS M: Linus Walleij S: Maintained T: git https://gitlab.freedesktop.org/drm/misc/kernel.git diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index bf4eadfe21cb..7203d16ab20a 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -590,8 +590,17 @@ config DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 depends on OF select DRM_MIPI_DSI select VIDEOMODE_HELPERS +config DRM_PANEL_SAMSUNG_AMB655X + tristate "Samsung AMB655X DSI panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + DRM panel driver for the Samsung AMB655X panel. + This panel has a resolution of 1080x2400 @ 60hz or 120Hz. + config DRM_PANEL_SAMSUNG_ATNA33XC20 tristate "Samsung ATNA33XC20 eDP panel" depends on OF depends on BACKLIGHT_CLASS_DEVICE diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 051b75b3df7b..be6d500a56a4 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -58,8 +58,9 @@ obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM67191) += panel-raydium-rm67191.o obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM68200) += panel-raydium-rm68200.o obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM692E5) += panel-raydium-rm692e5.o obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM69380) += panel-raydium-rm69380.o obj-$(CONFIG_DRM_PANEL_RONBO_RB070D30) += panel-ronbo-rb070d30.o +obj-$(CONFIG_DRM_PANEL_SAMSUNG_AMB655X) += panel-samsung-amb655x.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20) += panel-samsung-atna33xc20.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_DB7430) += panel-samsung-db7430.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D16D0) += panel-samsung-s6d16d0.o diff --git a/drivers/gpu/drm/panel/panel-samsung-amb655x.c b/drivers/gpu/drm/panel/panel-samsung-amb655x.c new file mode 100644 index 000000000000..945346e84f68 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-amb655x.c @@ -0,0 +1,399 @@ +// SPDX-License-Identifier: GPL-2.0-only +// Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree: +// Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. +// Copyright (c) 2024 Caleb Connolly + + +#include +#include +#include +#include +#include + +#include