From patchwork Tue Mar 21 22:12:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 665625 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 BF6BDC761A6 for ; Tue, 21 Mar 2023 22:12:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229993AbjCUWMw (ORCPT ); Tue, 21 Mar 2023 18:12:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229843AbjCUWMu (ORCPT ); Tue, 21 Mar 2023 18:12:50 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 957D5570B0 for ; Tue, 21 Mar 2023 15:12:48 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id x17so21005452lfu.5 for ; Tue, 21 Mar 2023 15:12:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679436767; 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=BCUJY1Hh2EModZGNwH3Cf81RyZQkzt9KGfduADVwZqc=; b=hLPidQvGUMB5Bz3P75QcMGu89KyHxGgata9Yb0577gCwAgqVZaOj9u6vWxMs6ay8Yz Bs8ShjszRic24iBvTcdihJA0ihybRFyZQIvf44G38klno8DOTDuD18lom2rOLum+fUyQ f/VR8xzcG4cdlMLSXxEJeyqjXJuswiIv8we1LFGE4AzB3Nh7nRQmSqkow4DKT1aupg2l uOyLYc4ev9TyFa1aLFnR5YUD0CO2WVwRGT+8ARLF8D6UxpkzYsRwKPVtbFjnQlFSfQAQ cJ6vDQT0lW5PlnKT2RcFxA4cLBmLueFd34L28A/x2K+nGPSkYPBnk+8Oo14FaJThYVHP CXqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679436767; 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=BCUJY1Hh2EModZGNwH3Cf81RyZQkzt9KGfduADVwZqc=; b=1NoUkbMqANdsnrUgqhVznRO2oSma1gd8sgSOaW5/CqUl9jkJuIuWRO+670gDzh6g61 weN9z0U1eET8rPNteN6gqI6rDwxDu9an1sVL9I/XzfS/SL6SzP5gaWveAnNIxUB5NNy/ 3aZxNsl+lY5L0Gegmxq94qY9UI3gB+RKDFdMR1W30myDJsu+8pXlWHc+zY2vPEn1Rg2A 2QajgL2FLv04eOEg4HDbr85rY8JKjaxp/Jg1bDttqlVwdr6NR0CZRlZ8lvSELrKVcSGw 37JCtrcFpeccMlwcL+Mfe5/mnzewSBipQL5t+uhz1D/Q58MwK988IZhNlWIWmeYfKWVB 3roA== X-Gm-Message-State: AAQBX9fY2oMSAgwG+SGtZTRxK2l1iSiO7F4nLitAbnEOPb1sdMoDtStk IIhD6BglAIQTphlt0/Sby/xuzA== X-Google-Smtp-Source: AK7set8j50UEJEfSenglA09AC7xT7EpQaTHOGI7NOY4txTgVS53FJNoG+bBaHqIcASRnCcvMKMG+Cg== X-Received: by 2002:ac2:4116:0:b0:4e9:6097:add5 with SMTP id b22-20020ac24116000000b004e96097add5mr1363441lfi.66.1679436766836; Tue, 21 Mar 2023 15:12:46 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 15:12:46 -0700 (PDT) From: Konrad Dybcio Date: Tue, 21 Mar 2023 23:12:28 +0100 Subject: [PATCH 1/4] dt-bindings: usb: gpio-sbu-mux: Add OnSemi NB7VPQ904M mux MIME-Version: 1.0 Message-Id: <20230321-topic-sagami_dp-v1-1-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=1173; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=hofgD3Pg2Wl7Hj4Cs3d2T2t9S7MypKBJJexKG0UTF+4=; b=FVYoL7k1VXDlpelZPfqkyTov5Jj9u4GO0zOfomLqGzPF/uKldcr7iBGllsbkkxNRgpSUK0ceumzo oUlkCHjkB4nxKbFPnVXNCPo3IIkpw6mxUGewhAwXAVu6P6CDhu+8 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The OnSemi NB7VPQ904M Type-C DP altmode redriver provides SBU signals that can be used in with the gpio-sbu-mux driver. Document it. Note that the -mux suffix is there to indicate that the gpio-sbu-mux driver interacts with the mux part of this otherwise quite sophisticated chip, leaving the "onnn,nb7vpq904m" compatible free for when a proper driver taking care of all of the chip's capabilities is introduced. Ref: https://www.onsemi.com/products/signal-conditioning-control/redrivers/nb7vpq904m Signed-off-by: Konrad Dybcio --- Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml b/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml index bf4b1d016e1f..a7206009b691 100644 --- a/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml +++ b/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml @@ -20,6 +20,7 @@ properties: items: - enum: - onnn,fsusb43l10x + - onnn,nb7vpq904m-mux - pericom,pi3usb102 - const: gpio-sbu-mux From patchwork Tue Mar 21 22:12:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 665624 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 EAB9BC761A6 for ; Tue, 21 Mar 2023 22:12:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230046AbjCUWM4 (ORCPT ); Tue, 21 Mar 2023 18:12:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230017AbjCUWMx (ORCPT ); Tue, 21 Mar 2023 18:12:53 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC19E570BF for ; Tue, 21 Mar 2023 15:12:50 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id g17so21003250lfv.4 for ; Tue, 21 Mar 2023 15:12:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679436769; 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=vgZbupn0k37+a4wCBuLR6J1C7AEfEIAI+ys1wz8gGnE=; b=Z/CYlLlhpcaLLmW9gO2Tj2zwHGQsTDfqQG/LiFQ5M/jTiI97kzwwakeIV2Nt4yrRcy lVy5dAd3M4N3HgRa44E6mydVkZpB8AiPeFHdqUG1cD4u9c/hM/1C842YJisdaMM3uEeC kwotOz25RSfIz9kdx3ccetBK8G56AZ+/jarDhgxQZv3W1G8ptAGVEgsd8s9YWp2xKCTg RmLhSZPvtQTYJXJ0nM4qEP7DyuaJ+sEcOMV76RbW3wmmIHzQ5iny2x9mddOvFBvIBw13 7KZdTw43jq9SCzho0mTbn0RKY/mdZXVfTNsOpeL1gWnMR6lnypNEywuIusySYI/l/mF4 /AKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679436769; 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=vgZbupn0k37+a4wCBuLR6J1C7AEfEIAI+ys1wz8gGnE=; b=F8qCyDiSpXsEjVXLlfwYurr6xVucypvo9Gcolhw8T/8GlI4BNowOD8sa6EBBXjE5Qc WwZ/nP0bOBT9giQ9gcu3R3Spe0E5jtJwVS2rbVi/5b6PFiKHhBsrfHRbU8UNin7ZHij6 oRTnnV4/tsiYpDD7E0uYl0qBBlS7zfCLxJVzKPtyfnKIATaLDiwy7qlWTn9tfGbJGVRm /0hawCGOQUY8O+YnZDGVt6/s523gz2NNRQj3jqaqh1Fcp0VsX1nze7KEDbrqJP7lPuUe 57lWu9nctCKSUfq4EU1YcfgBdGqWvjBU7fatqYkvqIptq+6i2QVgnv77KIPhytW5WaNA Iatg== X-Gm-Message-State: AO0yUKVL88Gmjo1vaJCDI+HV/3GXTfQlSvf7ditRLZsfX5PD6SSrJKNr po/qj77ryepWPxf1umFfxPxSxg== X-Google-Smtp-Source: AK7set8NC1hHuAr9DZDY1/qyIjOyi6D1y8hG1sM5srS04pt4cLnvMWBC1/yxzqGuooDq7+dOWU5i7w== X-Received: by 2002:ac2:5510:0:b0:4d5:a0d2:f542 with SMTP id j16-20020ac25510000000b004d5a0d2f542mr1366826lfk.18.1679436769199; Tue, 21 Mar 2023 15:12:49 -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.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 15:12:48 -0700 (PDT) From: Konrad Dybcio Date: Tue, 21 Mar 2023 23:12:30 +0100 Subject: [PATCH 3/4] arm64: dts: qcom: sm8350-sagami: Hook up USB-C Display Port MIME-Version: 1.0 Message-Id: <20230321-topic-sagami_dp-v1-3-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=2565; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=JKAzoWwTB0GRos4VagsWq8iTqG3cdlc3p5d9QT8cpTA=; b=KSPF1FGKDbORSghLobT6NXwThP7VyXehthaet7Wg7ls5lLx37QiSElsR+s4SIsYj4Um4ulj310fW +/tN1RoECe+OksWa7HgrcVsI/r4jgHp2d4KK1xuMwtlBgUhI9sFn X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Sagami devices feature Display Port on their USB-C port. Add the necessary nodes to support it. Signed-off-by: Konrad Dybcio --- .../boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) 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 21462b6de686..b2baa81baf5e 100644 --- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi @@ -120,6 +120,23 @@ pmic_glink_dwc3_ss_in: endpoint { remote-endpoint = <&usb_1_dwc3_ss>; }; }; + + port@2 { + reg = <2>; + + #address-cells = <1>; + #size-cells = <0>; + + pmic_glink_dp_in: endpoint@0 { + reg = <0>; + remote-endpoint = <&mdss_dp_altmode>; + }; + + pmic_glink_sbu_mux_out: endpoint@1 { + reg = <1>; + remote-endpoint = <&sbu_mux_in>; + }; + }; }; }; }; @@ -140,6 +157,26 @@ ramoops@ffc00000 { }; }; + sbu-mux { + /* TODO: switch to a proper driver when one gets upstreamed */ + compatible = "onnn,nb7vpq904m-mux", "gpio-sbu-mux"; + + enable-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>; + select-gpios = <&tlmm 55 GPIO_ACTIVE_HIGH>; + svid = /bits/ 16 <0xff01>; + + mode-switch; + orientation-switch; + + pinctrl-0 = <&sbu_sw_oe &sbu_sw_sel>; + + port { + sbu_mux_in: endpoint { + remote-endpoint = <&pmic_glink_sbu_mux_out>; + }; + }; + }; + vph_pwr: vph-pwr-regulator { compatible = "regulator-fixed"; regulator-name = "vph_pwr"; @@ -595,6 +632,25 @@ &ipa { status = "okay"; }; +&mdss { + status = "okay"; +}; + +&mdss_dp { + data-lanes = <0 1 2 3>; + status = "okay"; + + ports { + port@1 { + reg = <1>; + + mdss_dp_altmode: endpoint { + remote-endpoint = <&pmic_glink_dp_in>; + }; + }; + }; +}; + &mpss { status = "okay"; firmware-name = "qcom/sm8350/Sony/sagami/modem.mbn"; @@ -916,6 +972,22 @@ ts_int_default: ts-int-default-state { input-enable; }; + sbu_sw_oe: sbu-sw-oe-state { + pins = "gpio54"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + output-low; + }; + + sbu_sw_sel: sbu-sw-sel-state { + pins = "gpio55"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + output-low; + }; + sdc2_card_det_active: sd-card-det-active-state { pins = "gpio92"; function = "gpio";