From patchwork Tue Jul 25 08:46:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 706260 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 9A798C0015E for ; Tue, 25 Jul 2023 08:49:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231347AbjGYItS (ORCPT ); Tue, 25 Jul 2023 04:49:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232926AbjGYIsV (ORCPT ); Tue, 25 Jul 2023 04:48:21 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69B061BE9 for ; Tue, 25 Jul 2023 01:46:43 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-51e28cac164so13077268a12.1 for ; Tue, 25 Jul 2023 01:46:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690274798; x=1690879598; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=HlbuF9GW/UUiryYl6cWoqRYe+aX6OM3eYgKK9vJEYOw=; b=M3iBy29puoxXZ6rM8EV9glS1Zn1pRGPsaw6LOOahZUz959whS8lkcXeS2+NK1aqPq0 5f+cFOtECynFkB7aX4pb9L4TMfZpad4918vlV3F792Cyr/cCrSTPKmcEKhlqogRaGqJl y6+m8dfYviHqGh4JMY6DIchB4Z31U7xFt/uAiqkX0HB2MOC9CI6P7WoX0yHvNzu8PJyw hKS4bonZKIkj0FHMWSBYviNBRxRO1UYcitJVHm9ItgKoKEH3cI6dpA0/S33S4iwpTQ/H uxuFOTLFUNtkHalKNhrQsrI+FHsnf7Gj06S7T1rCsUaP1LTzyBQ/iNSOEf22WTdwvGBd 5AMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690274798; x=1690879598; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HlbuF9GW/UUiryYl6cWoqRYe+aX6OM3eYgKK9vJEYOw=; b=ISC3MoGaxrUhCiEVONwkvCFhpdbuiMocG6+FF8xA9w1DvKAggL/V5DkLYQJrJHQyZU tjJcI+gNHVEGYrNMx2kxRbO9zH6ZbmhOmAZSeZp6wv1eNRG+YcOQnQImMEbr4sLoAdk3 QdQg2NAibBpi3mMJ5exfAApw3aLmMSLINtEuK7aBgMXPWCZCRmLV4J/eqjGY+iPVSTry cRtcVOwjLkvlg8cdGos2BdIe9a9jbE2yVvpIh7Uweg6Xz77HfXizOjpLVcbIN2KdAAND ziW16b5jFv4Lw4IjdGnKGTA6Vl7NOiSbviXfKHxeKUhRUjFXjo+AGODACnDW4Ow0QyeH q85Q== X-Gm-Message-State: ABy/qLaUJbDGgR36aUP5Y2Jh6Hhx7s59U/tJg//WL2uDKLlvj9+ru9Ua pm1reYkTa0cOshUO2W05B8FHCw== X-Google-Smtp-Source: APBJJlFxcW0FY0WW1nnu3wIeqn0GpE6VrHe1OIkrOLE2pvGcYdsYyn7CCgeDKAS72F8B00VeN9yN6g== X-Received: by 2002:a05:6402:4412:b0:51e:48e7:72ca with SMTP id y18-20020a056402441200b0051e48e772camr1910946eda.13.1690274797759; Tue, 25 Jul 2023 01:46:37 -0700 (PDT) Received: from krzk-bin.. ([178.197.223.104]) by smtp.gmail.com with ESMTPSA id w22-20020a056402071600b005221b918e33sm4472526edx.22.2023.07.25.01.46.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 01:46:36 -0700 (PDT) From: Krzysztof Kozlowski To: cros-qcom-dts-watchers@chromium.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bhupesh Sharma , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH RFT] arm64: dts: qcom: sc7280: drop incorrect EUD port on SoC side Date: Tue, 25 Jul 2023 10:46:33 +0200 Message-Id: <20230725084633.67179-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Qualcomm Embedded USB Debugger (EUD) second port should point to Type-C USB connector. Such connector was defined directly in root node of sc7280.dtsi which is clearly wrong. SC7280 is a chip, so physically it does not have USB Type-C port. The connector is usually accessible through some USB switch or controller. Correct the EUD/USB connector topology by removing the top-level fake USB connector and adding appropriate ports in boards having actual USB Type-C connector defined (Herobrine, IDP). All other boards will have this EUD port missing. This fixes also dtbs_check warnings: sc7280-herobrine-crd.dtb: connector: ports:port@0: 'reg' is a required property Fixes: 9ee402ccfeb1 ("arm64: dts: qcom: sc7280: Fix EUD dt node syntax") Cc: Bhupesh Sharma Signed-off-by: Krzysztof Kozlowski --- Not tested on hardware. --- .../arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 15 +++++++++++++ .../arm64/boot/dts/qcom/sc7280-idp-ec-h1.dtsi | 15 +++++++++++++ arch/arm64/boot/dts/qcom/sc7280.dtsi | 21 +------------------ 3 files changed, 31 insertions(+), 20 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi index 9ea6636125ad..2a4f239c5632 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi @@ -573,6 +573,12 @@ usb_c0: connector@0 { power-role = "dual"; data-role = "host"; try-power-role = "source"; + + port { + usb_c0_ep: endpoint { + remote-endpoint = <&eud_con>; + }; + }; }; usb_c1: connector@1 { @@ -590,6 +596,15 @@ usb_c1: connector@1 { #include #include +&eud_ports { + port@1 { + reg = <1>; + eud_con: endpoint { + remote-endpoint = <&usb_c0_ep>; + }; + }; +}; + &keyboard_controller { function-row-physmap = < MATRIX_KEY(0x00, 0x02, 0) /* T1 */ diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp-ec-h1.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp-ec-h1.dtsi index ebae545c587c..ffc469431340 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-idp-ec-h1.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-idp-ec-h1.dtsi @@ -44,6 +44,12 @@ usb_c0: connector@0 { power-role = "dual"; data-role = "host"; try-power-role = "source"; + + port { + usb_c0_ep: endpoint { + remote-endpoint = <&eud_con>; + }; + }; }; usb_c1: connector@1 { @@ -78,6 +84,15 @@ cr50: tpm@0 { }; }; +&eud_ports { + port@1 { + reg = <1>; + eud_con: endpoint { + remote-endpoint = <&usb_c0_ep>; + }; + }; +}; + &tlmm { ap_ec_int_l: ap-ec-int-l-state { pins = "gpio18"; diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi index 925428a5f6ae..af9bb2ebcaa1 100644 --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi @@ -649,18 +649,6 @@ cpu7_opp_3014mhz: opp-3014400000 { }; }; - eud_typec: connector { - compatible = "usb-c-connector"; - - ports { - port@0 { - con_eud: endpoint { - remote-endpoint = <&eud_con>; - }; - }; - }; - }; - memory@80000000 { device_type = "memory"; /* We expect the bootloader to fill in the size */ @@ -3624,7 +3612,7 @@ eud: eud@88e0000 { <0 0x88e2000 0 0x1000>; interrupts-extended = <&pdc 11 IRQ_TYPE_LEVEL_HIGH>; - ports { + eud_ports: ports { #address-cells = <1>; #size-cells = <0>; @@ -3634,13 +3622,6 @@ eud_ep: endpoint { remote-endpoint = <&usb2_role_switch>; }; }; - - port@1 { - reg = <1>; - eud_con: endpoint { - remote-endpoint = <&con_eud>; - }; - }; }; };