From patchwork Mon Mar 18 09:51:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 780950 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 221D3360AE for ; Mon, 18 Mar 2024 09:52:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710755523; cv=none; b=tjPu/gKHSrgfPEyTPqUWEMdI7slywAI0OAidHvFbu14AOxBtllffS+7nX3WOR3121310jKMLtSTK7f74In7bsrO/1jYmynekzukFoH+hq5dGiildGVQHqLTryrTdT6MzJ3Ha5mPuCn3xHl406GW38XXAEkAcSP3bW2JGgQ2r3SU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710755523; c=relaxed/simple; bh=85uE+8Fjpwsh2LnNpzvvU1BMuhBy7A4cC4byHgOBI8E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QhCQAGcvYdpgfgmTuRy3PyqYcdYUNwSZOpmHP1Yhgt2WECx1FRfAK7ibITnnQrTTOrtgtQM3lb8eHOL2+q7PIDFyskr4vrdZ3Ad4E1RM3Oje281cxvaOIhiIk7I5gOGbHuLyC/N2W8U3oRM0oXAvH8JQKG9RmZToj2fFSAXRXMM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=zEwoP8QH; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="zEwoP8QH" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-41413f7b2dfso1995725e9.2 for ; Mon, 18 Mar 2024 02:52:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710755519; x=1711360319; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=t6M3ghle38laAzVYOE7o4DnWpg3uW1ezRM+qkQnAMfs=; b=zEwoP8QHoSFF5ARRHt9ShuOigIKhdKHQNgZ3Pl8KmDUB2CQAbc2y5fM8ogl0egkGro RMZa0LeIxFdQdAp1GQNsnLpLNE3tt5UTXQ1p/ojbOY3GsIvnrR5AuJaJul2ig18XRQGT qeI2/M6XTNMRictAENaR6XVj1w6XDj9IRKd/h4bQZEs5kq34mWwnF83pNBgKvFTFpinw pIx2IgylQfTnUXzLvAWIPQtkrqSGUpHYyXG1IJdM7CwIQGoyKkdQ2r8vDhY2gcAMQikl O5Di1N9wfV9sje1bAGT2JK+hJFCpbSWHcJoksYq738quQYiMi1r7lDkW0H2xVZMBQJ+n 4rXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710755519; x=1711360319; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t6M3ghle38laAzVYOE7o4DnWpg3uW1ezRM+qkQnAMfs=; b=RE5KGLlNUL6sp6ZUutXj8D8hM3098423WmMBb4/nsZdq3AV88RAboQ/Xrj+jCmXiub gDU5p5nKc0v02DSObArxWPL35z/QebWk7CyAllCScCVRHdcgfx1dNVNCd5V+3XJJGRMM 0l4OAyUXNpUDk3W2QsCRpZi6Ew29n0H6zUrwfBUXO9a73UawV63z8zmLqOqfY5RfXCMr uCObYsUxmDhsn3sN0sM/pxnQ/QCi3A6dyWzwYPPLcNbJiAmtuOpMHfKP8OZcrop4fwLS mfjmJ+8KUKGmsFz8E42Rr1ZFfqH4t2rTm3Xk8uzk+PqKfV/1FAA4CJmmJtvEfnCM8P3n PBbA== X-Gm-Message-State: AOJu0Yw9hDIE++nEvmN271vOn48doterOWzfiXpdWbUG2v2Ds2M21/R/ sJVCpO5ux4DL2y+lLV47wPZ7IIxjPI294Z7gChULQK0vl5QrF8GTn8if9t+tBoQ= X-Google-Smtp-Source: AGHT+IF2HI/BmNF35Zi08UFOkoo17dDCo4BOu3n3+i5NQ8yjI0vs6MLB+m7l/e0pkXjiCZzUoZo6Gw== X-Received: by 2002:a05:600c:1c84:b0:413:ff10:cee with SMTP id k4-20020a05600c1c8400b00413ff100ceemr7060485wms.13.1710755519463; Mon, 18 Mar 2024 02:51:59 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id bq22-20020a5d5a16000000b0033ebf702e17sm7514974wrb.21.2024.03.18.02.51.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 02:51:59 -0700 (PDT) From: Neil Armstrong Date: Mon, 18 Mar 2024 10:51:55 +0100 Subject: [PATCH v2 3/3] arch: arm64: dts: sm8650-hdk: add support for the Display Card overlay Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240318-topic-sm8650-upstream-hdk-v2-3-b63a5d45a784@linaro.org> References: <20240318-topic-sm8650-upstream-hdk-v2-0-b63a5d45a784@linaro.org> In-Reply-To: <20240318-topic-sm8650-upstream-hdk-v2-0-b63a5d45a784@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong , Vladimir Zapolskiy X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=4520; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=85uE+8Fjpwsh2LnNpzvvU1BMuhBy7A4cC4byHgOBI8E=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBl+A67Qvv0BipxV7Cdf1iVbpyb2Mx7NR7Mj3zB5Ucw wAeqx2iJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZfgOuwAKCRB33NvayMhJ0fH5EA CGi8RYv4ROo3RqL7N5IgqFCgSuVqYHWsRxC6frOyptndxIMwbO9egwHe5T36N9aV5uJPJs6W+ArGKk E7X7AA2TDGi7LrjSNa4xkzWYpV+1AR5vS2Xq+rnLyLEcS/RA5rN+tNBI4MhKRCRmRF/aRLCIjNJTHf EEaAOqPhUnfYmDMowiJITIby2AJ0sAr6f0pPnAZDQPCq6V/IuJ/G7NFC6lPbL1TkGh7XZFnGIPpLz/ 5LU5Ms/Iixkh0pThxrbTB8d/+QkQRZsDfxNxllxtdIfPWlcdPPezsNR5Otv0q/GtdUM3vAHGLcLpIX QoVPBzKwh5R58TLdx0FtRZH9FdOqMxuUySxP7j61gbg5QpU7u1w3yrWFPwpuYKoBRDWMhJOIg0QHqR ILDM+t9Zh08/Hd3CQJ83lLxueGQzUWUpAkx9R0pSntSJ4Mamt/bA1Xnjwj4p4aqPiXhdsACfPVKLwp uRGlmk2BemadYKzBbIY8/4h8hoRHtG/5rhwekcXEF1g3tJHlyGE6N1Ws/ah66fA2AnGlPJkAFS0M92 QsTuWZHpe0VmVag5RUH3M7fcsQfHI0Kv5oxvwndlyUGJvcbp+NU9iFExNrw1qZhsqQnXGjLD4BUd20 A8T4sLCQyJZK3hhqD7ofv+VgenGLLt6oPibumucQ5bKkNrb1iUjAVNunP2BA== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE With the SM8650-HDK, a Display Card kit can be connected to provide a VTDR6130 display with Goodix Berlin Touch controller. In order to route the DSI lanes to the connector for the Display Card kit, a switch must be changed on the board. The HDMI nodes are disabled since the DSI lanes are shared with the DSI to HDMI transceiver. Add support for this card as an overlay and apply it it at build-time to the sm8650-hdk dtb. Reviewed-by: Vladimir Zapolskiy Signed-off-by: Neil Armstrong Tested-by: Vladimir Zapolskiy --- arch/arm64/boot/dts/qcom/Makefile | 4 + .../boot/dts/qcom/sm8650-hdk-display-card.dtso | 144 +++++++++++++++++++++ 2 files changed, 148 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index 4f48c98451de..566997db4b37 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -241,6 +241,10 @@ dtb-$(CONFIG_ARCH_QCOM) += sm8450-sony-xperia-nagara-pdx224.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8550-hdk.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8550-mtp.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8550-qrd.dtb + +sm8650-hdk-display-card-dtbs := sm8650-hdk.dtb sm8650-hdk-display-card.dtbo + +dtb-$(CONFIG_ARCH_QCOM) += sm8650-hdk-display-card.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8650-hdk.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8650-mtp.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8650-qrd.dtb diff --git a/arch/arm64/boot/dts/qcom/sm8650-hdk-display-card.dtso b/arch/arm64/boot/dts/qcom/sm8650-hdk-display-card.dtso new file mode 100644 index 000000000000..83f2338e5bf4 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sm8650-hdk-display-card.dtso @@ -0,0 +1,144 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2024, Linaro Limited + */ + +/* + * Display Card kit overlay + * This requires S5702 Switch 7 to be turned to OFF to route DSI0 to the display panel + */ + +#include +#include + +/dts-v1/; +/plugin/; + +&i2c6 { + status = "disabled"; +}; + +<9611_1v2 { + status = "disabled"; +}; + +<9611_3v3 { + status = "disabled"; +}; + +&vreg_bob_3v3 { + status = "disabled"; +}; + +<9611_codec { + status = "disabled"; +}; + +&mdss_dsi0 { + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "visionox,vtdr6130"; + reg = <0>; + + reset-gpios = <&tlmm 133 GPIO_ACTIVE_LOW>; + + vddio-supply = <&vreg_l12b_1p8>; + vci-supply = <&vreg_l13b_3p0>; + vdd-supply = <&vreg_l11b_1p2>; + + pinctrl-0 = <&disp0_reset_n_active>, <&mdp_vsync>; + pinctrl-1 = <&disp0_reset_n_suspend>, <&mdp_vsync>; + pinctrl-names = "default", "sleep"; + + port { + panel0_in: endpoint { + remote-endpoint = <&mdss_dsi0_out>; + }; + }; + }; + + /* + * DTC requires to have both endpoints when compiling the overlay + * and also requires the #address/size-cells + reg properties + */ + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + mdss_dsi0_out: endpoint { + remote-endpoint = <&panel0_in>; + }; + }; + }; +}; + +&spi4 { + /* DTC requires the #address/size-cells to compile DTBO */ + #address-cells = <1>; + #size-cells = <0>; + + status = "okay"; + + touchscreen@0 { + compatible = "goodix,gt9916"; + reg = <0>; + + interrupt-parent = <&tlmm>; + interrupts = <162 IRQ_TYPE_LEVEL_LOW>; + + reset-gpios = <&tlmm 161 GPIO_ACTIVE_LOW>; + + avdd-supply = <&vreg_l14b_3p2>; + + spi-max-frequency = <1000000>; + + touchscreen-size-x = <1080>; + touchscreen-size-y = <2400>; + + pinctrl-0 = <&ts_irq>, <&ts_reset>; + pinctrl-names = "default"; + }; +}; + +&tlmm { + disp0_reset_n_active: disp0-reset-n-active-state { + pins = "gpio133"; + function = "gpio"; + drive-strength = <8>; + bias-disable; + }; + + disp0_reset_n_suspend: disp0-reset-n-suspend-state { + pins = "gpio133"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + mdp_vsync: mdp-vsync-state { + pins = "gpio86"; + function = "mdp_vsync"; + drive-strength = <2>; + bias-pull-down; + }; + + ts_irq: ts-irq-state { + pins = "gpio161"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + output-disable; + }; + + ts_reset: ts-reset-state { + pins = "gpio162"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + }; +};