Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp2096935rwo; Sun, 23 Jul 2023 07:32:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlGfPqng8GtJD/krwbYHOoUiGLYoFF0yOzuOLuTO0x/oJJohd84mTc2lqHSQffOFmEpqwIEB X-Received: by 2002:a17:906:519a:b0:99b:5857:b61 with SMTP id y26-20020a170906519a00b0099b58570b61mr5842364ejk.17.1690122751580; Sun, 23 Jul 2023 07:32:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690122751; cv=none; d=google.com; s=arc-20160816; b=ghumXcaWWEkciGcKr8tNERGShCK6BtDYf+5NUuH5K4N5dtrJvdLgjq3xRU8iEnyN5E XMMgopLr+D3T/oEJwC+bYh7dS6kf+G/LzOStVLHxguM92dpduME3FltPWsZJCvwFg4nZ lzyqOYFx7zOxTnR9/wyMbQA4nU0mIqJWuOFSLoL74T7gfr9szlFXdTnhyjbbvVO0m8t6 yLWIUc+zT+UysJkVW6jRusxH6DLshnjlR0n8482IUxe+uxz7W4AqdL3DIIE0fg8dvJjU Z1hBE9cX6y/501D9pO8bMAc2iVPKbUjh/dYk+7ZIxIH5VKX92mMsrZjuHgalA4L75R2t eV9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=P9EQDGu/G9aGY22djIAWwRsxznq61tp4HsoFojY4f8w=; fh=V9jUpdfkezdJ8C+v2WqLlh9SSHMNKUBC13jszyuSZQk=; b=siwpXUS+EF7hwSLrcKkOd1SE2cq434+WCGyulUOaMFX3Eu6gHoKmYOnfVi90tsqD0a rMLQ/FLIJi5/4BmfK0lPKy/RxQ5yi351/jzljaTFgNG7SZgesKNPBTy1Uv3nl89ea58Y +xkXh21SOhJCSXasxvwm1hryfsKMdHToD1dvLnxo8JllGBZhQRAfMnwneHrDm/VQr1GJ 5YIFjXsQm3Hvs+uiMco1ghEPTWyJcb59aVhWPfv9voPkMSKjhldRrlE9XhYP597JrRIY t53AbKJTKfqbUWrKZq99EeLbwEV35jqoRZQ4ucK1nWObyZMGTvcEcqrDH6OLODiZ6jZO PHTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="kjWa/KVP"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qp25-20020a170907207900b00988698d7c35si4932019ejb.944.2023.07.23.07.32.07; Sun, 23 Jul 2023 07:32:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="kjWa/KVP"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229692AbjGWOY1 (ORCPT + 99 others); Sun, 23 Jul 2023 10:24:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229702AbjGWOYZ (ORCPT ); Sun, 23 Jul 2023 10:24:25 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67635E53 for ; Sun, 23 Jul 2023 07:24:23 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5216f44d881so5218716a12.1 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=eHV1xVHY+tHMjXzbPbAkCUItpndeW1DDqqd7FB+Prppf6ucswxV3jpDZd2rKsi6R8S YERaQgcV1+WCWuGOtF2zdQKEstlAHpzd8V5+uja8fXpZb/hgNYJs7UnyWEYHKcyyFoE/ zY6+Rfzwu6rGk2QxodKVIEDe/3ElEV5uUi6m+XhhQuyj6OM7K6zt5G/AxwRkcStIXI96 cCOYYfcXbXSv74eKdr48DerMRDtXWPYKbfAKgwRSdPX3yqzj1MCXWGVce5j6FyVbn8vH pJOps7EqDhkDu/xtBVL54vpzyI7A6R50Cwt/Dm0V/XOXP0Oaosgx2FzXGRF7PMm4G4Ws hE7w== X-Gm-Message-State: ABy/qLbBlt3bulHam+fQvKomGnN9dklf6fBRU/srrVGPWa/dcnko7HPo gO6OnI2mETKqZjm8ZO3impkX3A== 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=20J=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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 { -- 2.34.1