From patchwork Tue Mar 21 22:12:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 665571 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92F55C6FD20 for ; Tue, 21 Mar 2023 22:12:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230022AbjCUWMx (ORCPT ); Tue, 21 Mar 2023 18:12:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229639AbjCUWMv (ORCPT ); Tue, 21 Mar 2023 18:12:51 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2C8C570B8 for ; Tue, 21 Mar 2023 15:12:49 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id br6so20977372lfb.11 for ; Tue, 21 Mar 2023 15:12:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679436768; 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=EQE/ZY7onSQ8rUTB/nkJV/hU8qnvId3wEP5blVPG6jI=; b=Gx8XwMWGypKw4hXhmcWKXP05V9Z81AvNK92dreh4f6kuoaZYZsf3gXsNP7chNNloOE Of9TfZUb2HqVwGLyLQuu+HyQ6Uabif260/tlKCNnTljP6goKw6NkSihgiusnn+4X1mdE VY8wvpmkwFvitaH6ZECfgZdmLH9lqaz0resI8WGmc/ArjKvQBk1ohP1BIF9gZtFXeki0 +j8tMxkxD1MaFABGfy3C8JKGEl9dEsKAQOpUlIdm0Cku6z/BcqoyaM/HHkzjkuSeySod bjUd/zBh8ojiXD/UtQkmiXUR/UEhKdMtkV0qDVgllaNWL9SomvxP4h0QjAIQ/azoGHb/ QOfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679436768; 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=EQE/ZY7onSQ8rUTB/nkJV/hU8qnvId3wEP5blVPG6jI=; b=o6oYXpsL4xJ1vPqR349O/gAVOpclay47JF/6ynch9E3JAReeKOrbkgnT39yuWqsY43 j17xR8x/GiBF8WYDsw40jYYAborz2F9Chyimy2NHqZNQ55YwQDL9rIxac0ZvIKjY4RRe 0u+OmpqZkYcW6FoKaBFDWO1nw+UPAdUFXMGP3c3gNulYUwXfeViuY/0igHvDC3lzzyjd 8PLFJoV+HQY/4r/VDm2Yq6zQEMpDzgJHNJgBYu6CfY99FpUzzi24QdshT7Dcp8Hsy4nj xftn9flMe2t+idABplthoekYYz7poB7fjDfSrYgmlOn5gsjH0ikT1y2FYsvtmxAvG1HW mW3w== X-Gm-Message-State: AO0yUKXlghnAMZGzt0yCmyjieclawVviz4r9rLvAPpfjHS1OkGhgcX7C v5bUrRkIue1x6l5Mnf0rfl9Vog== X-Google-Smtp-Source: AK7set9GQB+oUO08nFChXZ4KqrDMsfaOaQ1Qbd0F7K2rkJG9wOk9KriARJE7DfXlrlKqhbGeBAB7Bw== X-Received: by 2002:ac2:5939:0:b0:4e8:50e8:b96d with SMTP id v25-20020ac25939000000b004e850e8b96dmr1291425lfi.39.1679436768006; Tue, 21 Mar 2023 15:12:48 -0700 (PDT) Received: from [192.168.1.101] (abym238.neoplus.adsl.tpnet.pl. [83.9.32.238]) by smtp.gmail.com with ESMTPSA id o15-20020a056512050f00b004e9c983a007sm1220344lfb.289.2023.03.21.15.12.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 15:12:47 -0700 (PDT) From: Konrad Dybcio Date: Tue, 21 Mar 2023 23:12:29 +0100 Subject: [PATCH 2/4] arm64: dts: qcom: sm8350-sagami: Add PMIC GLINK MIME-Version: 1.0 Message-Id: <20230321-topic-sagami_dp-v1-2-340c8bce4276@linaro.org> References: <20230321-topic-sagami_dp-v1-0-340c8bce4276@linaro.org> In-Reply-To: <20230321-topic-sagami_dp-v1-0-340c8bce4276@linaro.org> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Bjorn Andersson , Andy Gross Cc: Marijn Suijten , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1679436764; l=2062; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=lp3eRpNyaDm0TqsNi7lANZ1nKsWClV3YhZv72FTFjqk=; b=mfS0ghbAWxBp3havLWO2c/RvDRQxgl5dSZJzaTsqb948DP73mtMZPJxnzrjPpDUMIrvQIwQq56i9 eELx4a/uBGzjbIjCjZKCeo8B158EA4fj0dqjVIOk7sW7CAQqvax5 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Sagami devices, like other 8350s, uses PMIC GLINK for various functionality around battery, charging, TCPM etc. Enable it. Worth noting: My USB mouse is unimpressed when connected to the device via a non-powered USB-C dock. Microsoft HD-500 dock refuses to estalish a PD handshake. Signed-off-by: Konrad Dybcio Reviewed-by: Neil Armstrong --- .../boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi | 60 +++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi index 89382ad73133..21462b6de686 100644 --- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi @@ -89,6 +89,42 @@ key-vol-down { }; }; + pmic-glink { + compatible = "qcom,sm8350-pmic-glink", "qcom,pmic-glink"; + + #address-cells = <1>; + #size-cells = <0>; + + connector@0 { + compatible = "usb-c-connector"; + reg = <0>; + power-role = "dual"; + data-role = "dual"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + pmic_glink_dwc3_hs_in: endpoint { + remote-endpoint = <&usb_1_dwc3_hs>; + }; + }; + + port@1 { + reg = <1>; + + pmic_glink_dwc3_ss_in: endpoint { + remote-endpoint = <&usb_1_dwc3_ss>; + }; + }; + }; + }; + }; + + reserved-memory { cont_splash_mem: memory@e1000000 { reg = <0 0xe1000000 0 0x2300000>; @@ -904,7 +940,29 @@ &usb_1 { }; &usb_1_dwc3 { - dr_mode = "peripheral"; + dr_mode = "otg"; + usb-role-switch; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + usb_1_dwc3_hs: endpoint { + remote-endpoint = <&pmic_glink_dwc3_hs_in>; + }; + }; + + port@1 { + reg = <1>; + + usb_1_dwc3_ss: endpoint { + remote-endpoint = <&pmic_glink_dwc3_ss_in>; + }; + }; + }; }; &usb_1_hsphy { From patchwork Tue Mar 21 22:12:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 665570 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7652C6FD1D for ; Tue, 21 Mar 2023 22:13:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229997AbjCUWNF (ORCPT ); Tue, 21 Mar 2023 18:13:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230105AbjCUWM6 (ORCPT ); Tue, 21 Mar 2023 18:12:58 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 333B4570BD for ; Tue, 21 Mar 2023 15:12:52 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id h25so9327164lfv.6 for ; Tue, 21 Mar 2023 15:12:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679436770; 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=13Zv1FUEwXx4yLngj7RFNjjKZHhiuq0qCRERwhQpaHM=; b=TVuYpJX2h2hgxrXCaQvHejEwvzDdasb9KPUcqB5a+pdXGkqtqaByqa3QRdPSRyYrC1 yvH/dpUOZk3mt0XFCIEicnwR9snV7o3ElME2ErKL93QqZmBywIfyZxeshol3k3RBVKBa ZWGXn3pmJm+5XGoKFvH/JnrHBIHKQoN4vaYYKGniIDJxq2okgkoxLH4uYicHOgx331mV SOmApg7Vymy+iR8Q4EKrvV0+FcCwzFTUEUPPVwWr5ioCNbZubO3ffdDqXpV2UkHKpOGR kiB+Nh8qD7r0NXNGoW5cxb2mvihMkXHDMMsUu7F9br4Tj6TjfwZ/ycBXuJ3SSfJeGqA4 qIuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679436770; 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=13Zv1FUEwXx4yLngj7RFNjjKZHhiuq0qCRERwhQpaHM=; b=xD4tGDxkrHIMF8OIqyBw/uOcP26/8AmIGaUJklXFxfgvOJSijV4zU35KmdrcjzQEO6 eE6dtVqbrz9Idl0egGRClyYQFVoAgL/f6bU1wDObLN3XkfPPwSif9s6K3vlzEMvaxhTu 8m5LhYUAEK/GHjASCJ5CXh+ZpmjcnTw4LdgyY7v3bqD8u2nKftGbhMEQ7o7XJC+pY4F7 /nsD1oQH60ILomKYfR0jLUSHvsbjwgzWfU8YM6IE7YWXIuReDa5/8QgT9C7O3V0hXq2j Z6Yhv1E6Walg6P8LW4CvcDSRSbzR3OvOmjacdASh0ixLwLrMRmev1I4IrY4P6k2XmERz u+7A== X-Gm-Message-State: AO0yUKVbBVmzZ1aqha6sL+GMwk2paibOURnjFC/uChd+bubYDYDb8jwd DdFX2lEfBK4N0VnkL8H0X1IUnw== X-Google-Smtp-Source: AK7set/HbvRs2o8GvFlrB1PxbxWzkQeDfHexsDnns6zywGT0jmSu8t9oRMx+73W4owCg686i1/pKJg== X-Received: by 2002:a05:6512:11e1:b0:4e9:6033:20d3 with SMTP id p1-20020a05651211e100b004e9603320d3mr1313142lfs.24.1679436770366; Tue, 21 Mar 2023 15:12:50 -0700 (PDT) Received: from [192.168.1.101] (abym238.neoplus.adsl.tpnet.pl. [83.9.32.238]) by smtp.gmail.com with ESMTPSA id o15-20020a056512050f00b004e9c983a007sm1220344lfb.289.2023.03.21.15.12.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 15:12:50 -0700 (PDT) From: Konrad Dybcio Date: Tue, 21 Mar 2023 23:12:31 +0100 Subject: [PATCH 4/4] arm64: dts: qcom: sm8350-nagara: Unify status property placement MIME-Version: 1.0 Message-Id: <20230321-topic-sagami_dp-v1-4-340c8bce4276@linaro.org> References: <20230321-topic-sagami_dp-v1-0-340c8bce4276@linaro.org> In-Reply-To: <20230321-topic-sagami_dp-v1-0-340c8bce4276@linaro.org> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Bjorn Andersson , Andy Gross Cc: Marijn Suijten , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1679436764; l=3059; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=PVuMTdifNqJ5Z9yoopYhHdxk90HwveOlTjYOQjYaiCQ=; b=a/DZcv2drxELLeAnMNRTKju2/lidHG2b/fLv1uCpGms/QwtibA0s5OuDX897ZdRKlqSiUSqgwWF3 etA5Tt2uDugI33oTmOXhkdCWx2vAtUeB8BBlDdvG6ULSUfDSBXxH X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org As we're heading towards getting the status property last everywhere, take care of it for SM8350 SONY Sagami. Signed-off-by: Konrad Dybcio Reviewed-by: Neil Armstrong --- .../boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi | 30 ++++++++++------------ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi index b2baa81baf5e..95b1ba4ce470 100644 --- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi @@ -189,8 +189,8 @@ vph_pwr: vph-pwr-regulator { }; &adsp { - status = "okay"; firmware-name = "qcom/sm8350/Sony/sagami/adsp.mbn"; + status = "okay"; }; &apps_rsc { @@ -542,27 +542,27 @@ pmr735a_l7: ldo7 { }; &cdsp { - status = "okay"; firmware-name = "qcom/sm8350/Sony/sagami/cdsp.mbn"; + status = "okay"; }; &i2c1 { - status = "okay"; clock-frequency = <1000000>; + status = "okay"; /* Some subset of SONY IMX663 camera sensor @ 38 */ }; &i2c4 { - status = "okay"; clock-frequency = <400000>; + status = "okay"; /* Samsung Touchscreen (needs I2C GPI DMA) @ 48 */ }; &i2c11 { - status = "okay"; clock-frequency = <1000000>; + status = "okay"; cs35l41_l: speaker-amp@40 { compatible = "cirrus,cs35l41"; @@ -596,31 +596,31 @@ cs35l41_r: speaker-amp@41 { }; &i2c12 { - status = "okay"; /* Clock frequency was not specified downstream, let's park it to 100 KHz */ clock-frequency = <100000>; + status = "okay"; /* AMS TCS3490 RGB+IR color sensor @ 72 */ }; &i2c13 { - status = "okay"; /* Clock frequency was not specified downstream, let's park it to 100 KHz */ clock-frequency = <100000>; + status = "okay"; /* Qualcomm PM8008i/PM8008j (?) @ 8, 9, c, d */ }; &i2c15 { - status = "okay"; clock-frequency = <400000>; + status = "okay"; /* NXP SN1X0 NFC @ 28 */ }; &i2c17 { - status = "okay"; clock-frequency = <1000000>; + status = "okay"; /* Cirrus Logic CS40L25A boosted haptics driver @ 40 */ }; @@ -652,8 +652,8 @@ mdss_dp_altmode: endpoint { }; &mpss { - status = "okay"; firmware-name = "qcom/sm8350/Sony/sagami/modem.mbn"; + status = "okay"; }; &pm8350_gpios { @@ -719,8 +719,8 @@ &pon_pwrkey { }; &pon_resin { - status = "okay"; linux,code = ; + status = "okay"; }; &qupv3_id_0 { @@ -748,8 +748,8 @@ &sdhc_2 { }; &slpi { - status = "okay"; firmware-name = "qcom/sm8350/Sony/sagami/slpi.mbn"; + status = "okay"; }; &spi14 { @@ -1038,16 +1038,14 @@ usb_1_dwc3_ss: endpoint { }; &usb_1_hsphy { - status = "okay"; - vdda-pll-supply = <&pm8350_l5>; vdda18-supply = <&pm8350c_l1>; vdda33-supply = <&pm8350_l2>; + status = "okay"; }; &usb_1_qmpphy { - status = "okay"; - vdda-phy-supply = <&pm8350_l6>; vdda-pll-supply = <&pm8350_l1>; + status = "okay"; };