From patchwork Sat Dec 7 20:35:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 180950 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp2472735ile; Sat, 7 Dec 2019 12:36:22 -0800 (PST) X-Google-Smtp-Source: APXvYqyTPKAglzMyhmBzIL8fDJ2bzDFv1hLTbOG0xMYCWEVRdpV2j2ghVzzLfBItgr8pPPiU/18n X-Received: by 2002:a9d:6d81:: with SMTP id x1mr5106608otp.9.1575750982346; Sat, 07 Dec 2019 12:36:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575750982; cv=none; d=google.com; s=arc-20160816; b=eaCdOmlVtqOtCLe1vE7+awC/XDnxjRKK6J2I29xT5xp/XZq8FjG38+1c3ey8o2lRFb JZHK059DYFYf/sl4d8tr2zLGYTQ+0gRslfdmCi4Job5XubN5xdA/u5a0PhQRpKWHEO/x eJE5HsNWhHpDzNxtjwHtPoKKV9VgrbvlZtOOhSb9DrSmMqGReP5JYC1VkV8/34oL0zo+ QwS/TeniZtz7AQQIThhRCU85E15L1Ly0J/qHCAo62FHpOMZUAHptJHfS422e+BdvH73u 4Xc/iERghorzksffYkGXAPgYipZQYE+j9Drd0axJWgmfM5UHuJZzsuE0hJCy0qRfnLct eDJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=888GZt/LFDsB0HcMe2D0lH6dvAdiWaFC5K/VFb+FLyg=; b=FhY3bLY89jVTc01+n1RZ+XqhOmVgUPM/ff2ftJST3k5UZphu3Yp0Pw5MTjZvezrgB4 QKBvMaaVB7kzeddeBCTa744vFf36Yf2DK7eV39tp7mDLf1dXfNJLlgtt3vEl/yM/SWvf 7L4adIeshsk8D53C93E0JyyFVJ6IEVy1GRIhkTM2mme15EQHjc66mSnk5vW6Wk2j7G9C snNVcly38TEz6N8qV+lA4Uwvksh9JDrOqjy192j+3y17oabDiam3KOP79SFbQ73gspCd 3GcIoTFf7ovqHC5kBt6330qlymqzngKikxYO9AGu4UAaQFfVwJg4E5IyaI5OfLdLL+kW TinQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FZC7kka9; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t28si9861675otr.16.2019.12.07.12.36.22; Sat, 07 Dec 2019 12:36:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FZC7kka9; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726911AbfLGUgU (ORCPT + 15 others); Sat, 7 Dec 2019 15:36:20 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:44737 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726884AbfLGUgT (ORCPT ); Sat, 7 Dec 2019 15:36:19 -0500 Received: by mail-pg1-f196.google.com with SMTP id x7so5061594pgl.11; Sat, 07 Dec 2019 12:36:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=888GZt/LFDsB0HcMe2D0lH6dvAdiWaFC5K/VFb+FLyg=; b=FZC7kka9khJuBvH092mVH2D1D0nl7lvHYcJGUQIvoX1J+2bknn3Sj6cBOSAtJatdi1 c8mdMu6TPsgsmZGzhwT9bVyjmnzGXCU2R33bnyesSJo5EhQokOJu4aijGFitDWsCf92P Th/I+DAuu6Z2pMvlJAu9LH9rGg1LGzlkogTpwzVFt50k+Sv2kt4V8l6spxR4QHyodsPf 9GC8y38I2CoD+BgcJsERwb1hbCAtYCt+8GcxVQL5z4nK0hJgiHXI6NTF2IjlyYIlucr7 +aaEE9VqBH2d/QrtBl1ubFi2p940XmWIJLZJZ+OYObhaxpYtGSayWR2K58YwobUBc8ZP JhxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=888GZt/LFDsB0HcMe2D0lH6dvAdiWaFC5K/VFb+FLyg=; b=QKeROGTVlQO1FI3JNiEO5InrETHSlIIK7DRlWIWLFkh+sUZmEa8HWlM+GbM0kAYUwu JyI0vqOwxt0NGN51J6Jmr8zr0oEG1Wt/hRZOiHY3+ZBKxJura9LwygkxUfmk8bW7csoP ENjpFOGA7mmR75uNPBIbTsPr+hJ7NMgrEZ1yRxOAOTxKj55t7+XXzmUB4hAm+B8mwwPu ItccUQJY6aSvc3Vjc1Udt99Q2Zj2of/oH8X9NG5BYWs58UTg7V+glceQ6V38H/7062uG g6MKBtnHGujY3UppBms4W7cYocbDjU6CogKZFnEg6xmJE7FS+A9G3q87xMSB9XFk/zKI QDgQ== X-Gm-Message-State: APjAAAU0FJ0r2CQ5cuD7jbG5hqrO3SxYq69w2wGOVxDOKtvI9KdaLp7r lGeRQiNieB7C3sd60qFef6U= X-Received: by 2002:a63:d351:: with SMTP id u17mr10551445pgi.84.1575750978424; Sat, 07 Dec 2019 12:36:18 -0800 (PST) Received: from localhost (c-73-25-156-94.hsd1.or.comcast.net. [73.25.156.94]) by smtp.gmail.com with ESMTPSA id k5sm7061084pju.14.2019.12.07.12.36.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Dec 2019 12:36:17 -0800 (PST) From: Rob Clark To: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, aarch64-laptops@lists.linaro.org Cc: Laurent Pinchart , Vasily Khoruzhick , Bjorn Andersson , Jeffrey Hugo , Rob Clark , Andy Gross , Rob Herring , Mark Rutland , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 4/4] arm64: dts: qcom: c630: Enable display Date: Sat, 7 Dec 2019 12:35:53 -0800 Message-Id: <20191207203553.286017-5-robdclark@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191207203553.286017-1-robdclark@gmail.com> References: <20191207203553.286017-1-robdclark@gmail.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Bjorn Andersson Signed-off-by: Bjorn Andersson [Initial patch from Bjorn, I've added some regulator-boot-on's to account for display related regulators enabled by the firmware, and updated to handle the two possible panels that can be installed.] Signed-off-by: Rob Clark --- .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 165 ++++++++++++++++++ 1 file changed, 165 insertions(+) -- 2.23.0 diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts index 13dc619687f3..459f65e3eb53 100644 --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts @@ -7,6 +7,7 @@ /dts-v1/; +#include #include #include "sdm845.dtsi" #include "pm8998.dtsi" @@ -18,6 +19,70 @@ aliases { hsuart0 = &uart6; }; + + ivo_panel { + compatible = "ivo,m133nwf4-r0"; + panel-id = <0xc5>; + status = "disabled"; + power-supply = <&vlcm_3v3>; + no-hpd; + + ports { + port { + ivo_panel_in_edp: endpoint { + remote-endpoint = <&sn65dsi86_out_ivo>; + }; + }; + }; + }; + + boe_panel { + compatible = "boe,nv133fhm-n61"; + panel-id = <0xc4>; + status = "disabled"; + power-supply = <&vlcm_3v3>; + no-hpd; + + ports { + port { + boe_panel_in_edp: endpoint { + remote-endpoint = <&sn65dsi86_out_boe>; + }; + }; + }; + }; + + vlcm_3v3: vlcm-3v3-power { + compatible = "regulator-fixed"; + regulator-name = "VLCM_3V3"; + + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&tlmm 88 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-boot-on; + }; + + sw_edp_1p2: sw-edp-1p2-regulator { + compatible = "regulator-fixed"; + regulator-name = "SW_EDP_1P2"; + + vin-supply = <&vreg_l2a_1p2>; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + + gpio = <&pm8998_gpio 9 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-boot-on; + }; + + sn65dsi86_refclk: sn65dsi86-refclk { + compatible = "fixed-clock"; + #clock-cells = <0>; + + clock-frequency = <19200000>; + }; }; &adsp_pas { @@ -79,6 +144,7 @@ regulator-min-microvolt = <880000>; regulator-max-microvolt = <880000>; regulator-initial-mode = ; + regulator-boot-on; }; vddpx_10: @@ -216,6 +282,7 @@ regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1208000>; regulator-initial-mode = ; + regulator-boot-on; }; vreg_l28a_3p0: ldo28 { @@ -239,6 +306,25 @@ status = "okay"; }; +&dsi0 { + status = "okay"; + vdda-supply = <&vreg_l26a_1p2>; + + ports { + port@1 { + endpoint { + remote-endpoint = <&sn65dsi86_in_a>; + data-lanes = <0 1 2 3>; + }; + }; + }; +}; + +&dsi0_phy { + status = "okay"; + vdds-supply = <&vreg_l1a_0p875>; +}; + &gcc { protected-clocks = , , @@ -290,6 +376,58 @@ }; }; +&i2c10 { + status = "okay"; + clock-frequency = <400000>; + + sn65dsi86: bridge@2c { + compatible = "ti,sn65dsi86"; + reg = <0x2c>; + pinctrl-names = "default"; + pinctrl-0 = <&edp_bridge_en>, <&edp_bridge_irq>; + + interrupts-extended = <&tlmm 10 IRQ_TYPE_LEVEL_HIGH>; + + enable-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; + + vpll-supply = <&vreg_l14a_1p88>; + vccio-supply = <&vreg_l14a_1p88>; + vcca-supply = <&sw_edp_1p2>; + vcc-supply = <&sw_edp_1p2>; + + clocks = <&sn65dsi86_refclk>; + clock-names = "refclk"; + + max-brightness = <255>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + sn65dsi86_in_a: endpoint { + remote-endpoint = <&dsi0_out>; + }; + }; + + port@1 { + reg = <1>; + + sn65dsi86_out_ivo: endpoint@c5 { + reg = <0>; + remote-endpoint = <&ivo_panel_in_edp>; + }; + + sn65dsi86_out_boe: endpoint@c4 { + reg = <1>; + remote-endpoint = <&boe_panel_in_edp>; + }; + }; + }; + }; +}; + &i2c11 { status = "okay"; clock-frequency = <400000>; @@ -306,6 +444,14 @@ }; }; +&mdss { + status = "okay"; +}; + +&mdss_mdp { + status = "okay"; +}; + &mss_pil { firmware-name = "qcom/LENOVO/81JL/qcdsp1v2850.mbn", "qcom/LENOVO/81JL/qcdsp2850.mbn"; }; @@ -338,6 +484,14 @@ }; }; +&qup_i2c10_default { + pinconf { + pins = "gpio55", "gpio56"; + drive-strength = <2>; + bias-disable; + }; +}; + &qupv3_id_0 { status = "okay"; }; @@ -349,6 +503,17 @@ &tlmm { gpio-reserved-ranges = <0 4>, <81 4>; + edp_bridge_en: edp-bridge-enable { + pins = "gpio96"; + drive-strength = <2>; + bias-disable; + }; + + edp_bridge_irq: edp-bridge-irq { + pins = "gpio10"; + bias-pull-down; + }; + i2c2_hid_active: i2c2-hid-active { pins = <37>; function = "gpio";