From patchwork Sun Jul 23 14:24:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 705662 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 4D57EC001DE for ; Sun, 23 Jul 2023 14:24:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229685AbjGWOYZ (ORCPT ); Sun, 23 Jul 2023 10:24:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbjGWOYY (ORCPT ); Sun, 23 Jul 2023 10:24:24 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69DF2E55 for ; Sun, 23 Jul 2023 07:24:23 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5221f193817so1519328a12.3 for ; Sun, 23 Jul 2023 07:24:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690122262; x=1690727062; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=P9EQDGu/G9aGY22djIAWwRsxznq61tp4HsoFojY4f8w=; b=kjWa/KVPVN8zUsrW+X8aOxATizFoa2tUm1qJ53sjjd10bfzhNzOYr2pql1FAoJlM8C r9FPXz5YtmpKwiSaCFx2lMPvthWgcyb+naJdckuKoMMnd4a1vH9A6G8wzOI+q4BN0Zfj XzjAOyUEWhTh1jfH64l4gJFLMvyO6bYS/DYhg3C/AmtbwLIiBqfwIHFYmxv6PDAgOIwZ F3ee3nsRz70dVKcQkdgX4Hr2YgkYBdvVm9KuoprcJa/49twWT5Jur1CxLqi04CcKduFP 1i0oc2WIupxLHY5n/IJKiWx+kde4mac5zvVKQRTf4ln4SiQlSATPndjuFvw/ko3ag81n IknA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690122262; x=1690727062; 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=P9EQDGu/G9aGY22djIAWwRsxznq61tp4HsoFojY4f8w=; b=QMEPM+Vz7y00Rf9Kg3ft1ivTtIbLdMTQPDgkgVfiyyJQFqGpxQkjMjV1yXYCJKSZ5d yUtIALT4GunfMJYid4ZZSBKl1LKEyJCTWh0aG1+kLGgCMDqV7DCBFCWDfqSNlj95raAs WoElrq1emcepDLWoqYqW2wl7Y0mHMVCW9jenQwpsdZ+FjbLnYbiaZOvY6w6R+z4eaGgm u/wF+qz25sgkk78y3kUwt6KY3xJl6AuTxfAPGuvan4mf4qMHC8jIwUaBG+vRGfY6f4dw xzVVWzcD0pruz0DnGMxfjiao1q2qnPN0Vib64Duo+VPx1+rxDRgJmxiezZM+hW3SzqPG jlrg== X-Gm-Message-State: ABy/qLatIPffgztVPQT43fGajwlz2vdgOtKJMxOsbQ7P8rcwX5qRYkR2 X4DhXPah95VgHxYR3ldZs0DI2pcYs3gXWPdfIZc= X-Google-Smtp-Source: APBJJlGijKTBsDB0qaMqp7C37ZN/ipYKV0HPqCKFVT23piyg/YJMaCpgwwnf5grhFlPRIlRNJRHDDg== X-Received: by 2002:aa7:cd63:0:b0:51d:8ab1:5df4 with SMTP id ca3-20020aa7cd63000000b0051d8ab15df4mr6658239edb.21.1690122261893; Sun, 23 Jul 2023 07:24:21 -0700 (PDT) Received: from krzk-bin.. ([178.197.223.104]) by smtp.gmail.com with ESMTPSA id c18-20020aa7c752000000b00521830574c1sm4938618eds.2.2023.07.23.07.24.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jul 2023 07:24:21 -0700 (PDT) From: Krzysztof Kozlowski To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Marek Szyprowski , replicant@osuosl.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, =?utf-8?q?Martin_J=C3=BCcker?= , Henrik Grimler , Artur Weber Subject: [PATCH v2] ARM: dts: samsung: exynos4412-midas: add USB connector and USB OTG Date: Sun, 23 Jul 2023 16:24:17 +0200 Message-Id: <20230723142417.97734-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add full description of USB-MUIC (MAX77693 MUIC) and MUIC-MHL connections, along with proper USB connector and OTG mode for DWC2 USB controller. This fixes dtc W=1 warnings: Warning (graph_child_address): /i2c-mhl/hdmi-bridge@39/ports: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary Cc: Marek Szyprowski Cc: replicant@osuosl.org Cc: phone-devel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht Cc: Martin Jücker Cc: Henrik Grimler Cc: Artur Weber Signed-off-by: Krzysztof Kozlowski --- Changes in v2: 1. Put connector node in the muic node (Henrik) Not tested on hardware. Please kindly check if peripheral mode is not broken. Or maybe OTG started to work? --- .../boot/dts/samsung/exynos4412-midas.dtsi | 50 ++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/samsung/exynos4412-midas.dtsi b/arch/arm/boot/dts/samsung/exynos4412-midas.dtsi index 57836d5554d0..7daf25865551 100644 --- a/arch/arm/boot/dts/samsung/exynos4412-midas.dtsi +++ b/arch/arm/boot/dts/samsung/exynos4412-midas.dtsi @@ -182,6 +182,38 @@ pmic@66 { pinctrl-0 = <&max77693_irq>; reg = <0x66>; + muic { + compatible = "maxim,max77693-muic"; + + connector { + compatible = "samsung,usb-connector-11pin", + "usb-b-connector"; + label = "micro-USB"; + type = "micro"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + muic_to_usb: endpoint { + remote-endpoint = <&usb_to_muic>; + }; + }; + + port@3 { + reg = <3>; + + muic_to_mhl: endpoint { + remote-endpoint = <&mhl_to_muic>; + }; + }; + }; + }; + }; + regulators { esafeout1_reg: ESAFEOUT1 { regulator-name = "ESAFEOUT1"; @@ -287,6 +319,14 @@ mhl_to_hdmi: endpoint { remote-endpoint = <&hdmi_to_mhl>; }; }; + + port@1 { + reg = <1>; + + mhl_to_muic: endpoint { + remote-endpoint = <&muic_to_mhl>; + }; + }; }; }; }; @@ -545,8 +585,16 @@ hdmi_to_mhl: endpoint { &hsotg { vusb_d-supply = <&ldo15_reg>; vusb_a-supply = <&ldo12_reg>; - dr_mode = "peripheral"; + dr_mode = "otg"; + role-switch-default-mode = "peripheral"; + usb-role-switch; status = "okay"; + + port { + usb_to_muic: endpoint { + remote-endpoint = <&muic_to_usb>; + }; + }; }; &i2c_0 {