From patchwork Mon Jun 13 09:51:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Potin Lai X-Patchwork-Id: 12879259 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 87BE4C433EF for ; Mon, 13 Jun 2022 09:58:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iQIOFdCWZu9LY6wY1f57Cmy/Se9OWmnuHdLJIX/DnqM=; b=ylWGBokENRDK5C MXE2ovYwLyUJK74Z9ouBboMG5KZIGii/C+puy+lhim/bQnW8K1/l4tEiW/ztO3gzTja16jwUchxyU 2/HsIHfGlldpb9FfqCpoxwNGdOSYFtARMwGKeYNCPOurQf5lBHO3RLsgjBr6o36u7eLCt1q8kp8PS qVDjRxS/Ms8Wuk76PXJH7uN+XcpPtvJND9zIaGSBD2ooIHRz4uV3ScIZRJAvnC5X0y96ZnPfxnhrA FAEtmtWiaiFQxvnB8vXyzNRRbIBBa7XOos53ceqcQsEyKELFjDRUlwjns2gly2UwterH1NBXZSE0n KqsWJr2Shsi+0Y7K1oRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0got-002hmB-IK; Mon, 13 Jun 2022 09:57:15 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0gls-002g1E-Fc for linux-arm-kernel@lists.infradead.org; Mon, 13 Jun 2022 09:54:11 +0000 Received: by mail-pj1-x1029.google.com with SMTP id gd1so5173050pjb.2 for ; Mon, 13 Jun 2022 02:54:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=erc0cF0H69wNUT+Fr3YuZFhUNW2gCbs/AEVN/v4U6VE=; b=qEH2xUwt6QE+bDHotqWVLLYfc+6yrZjyHxzXPLyeUfRXD5Zzzaxh9lLTofaAc4EP0U lbj+KyYoi+7cnBpus7ALuZ67EHXdxxlKghYCoZyfL0RLL3AWsjxDfaXNX+U9nD6uaxfr J3VGgciJXyMaYrurVsPoufT94gGlVA3JNfgNQmsB9Gn/cVFdgZA7BGjAS8AmUKRD8LJh 4sAHKg1hApMuoylXtEFyiNndh3XhAvNbeXr89nHQ+5/D62hmZMCYHveJCfyvqEcMO0eq WliT9Mv69nv8DdXG6gg3/JuyZEnsVq+lN8gitIcSKv1+R2Doafq08kjeQPvcx8LBwO6U n1fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=erc0cF0H69wNUT+Fr3YuZFhUNW2gCbs/AEVN/v4U6VE=; b=meQHOAmDJlWAw+QKTAsGYbEyGQ9fOstawuquLRvZM0TMYByIYlyd1docfpY19pqkzz Ot3rfBlOQvCrCHDrHszYtOoTkeVdOLfUBD2QWbkoKg5U7LUu0eMmzxYvEKhS4ACZ1fXi Hfy+eptq1j/4DyZV1ue2QsB4B4gcoDG19+HCMEeJyKw6u00iuUT0Cc7v8PpgFXswSWCD xH5g4LCUNaU+9EmTVhv0w4xjVJD2Pcjd1xuAlqESv0n1ZfdI86YdK2C7u3eyf0n16gSz v6yesSUZOqzPV+1LayELZoz8F1u8qZMZ0fGqgllo2GpdSANa7GGS8qM7ZOT87CeOrWaY t7ug== X-Gm-Message-State: AOAM531OZlccK0nm5djNzrrx9wrP+92G9CNUgLsJ/l3Q3MXf3weMLyvm AwZ5I2NNB2EX44DnvITb3vo= X-Google-Smtp-Source: ABdhPJwgoF4t8LjwUPn6oaVyQHoakaWUU1XeGOYjr2dzzXgmP4s+IQ6ppGbNq4FSt7nL1UhQ/pW6Yg== X-Received: by 2002:a17:902:f64c:b0:156:4349:7e9b with SMTP id m12-20020a170902f64c00b0015643497e9bmr58999092plg.139.1655114046570; Mon, 13 Jun 2022 02:54:06 -0700 (PDT) Received: from potin-quanta.dhcpserver.local (125-228-123-29.hinet-ip.hinet.net. [125.228.123.29]) by smtp.gmail.com with ESMTPSA id 19-20020a170902e9d300b001639f038250sm4639754plk.220.2022.06.13.02.54.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jun 2022 02:54:06 -0700 (PDT) From: Potin Lai To: Rob Herring , Joel Stanley , Andrew Jeffery Cc: Patrick Williams , Potin Lai , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, Potin Lai Subject: [PATCH 4/4] ARM: dts: aspeed: bletchley: update fusb302 nodes Date: Mon, 13 Jun 2022 17:51:50 +0800 Message-Id: <20220613095150.21917-5-potin.lai.pt@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220613095150.21917-1-potin.lai.pt@gmail.com> References: <20220613095150.21917-1-potin.lai.pt@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220613_025408_597786_35075B10 X-CRM114-Status: GOOD ( 11.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 1. Add interrupt pin of fusb302 on each sled. 2. Add vbus-supply property in each fusb302 node. 3. Fix BMC power-role at source and data-role at host. 4. Disable PD to avoid "HARD Reset" due to incompatible PD ver. Signed-off-by: Potin Lai --- .../dts/aspeed-bmc-facebook-bletchley.dts | 150 ++++++++++++------ 1 file changed, 102 insertions(+), 48 deletions(-) diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts index 7b6de9b51547..9fdb3d17596b 100644 --- a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts +++ b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts @@ -225,6 +225,60 @@ linux,code = ; }; }; + + vbus_sled1: vbus_sled1 { + compatible = "regulator-fixed"; + regulator-name = "vbus_sled1"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&sled1_ioexp 1 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vbus_sled2: vbus_sled2 { + compatible = "regulator-fixed"; + regulator-name = "vbus_sled2"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&sled2_ioexp 1 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vbus_sled3: vbus_sled3 { + compatible = "regulator-fixed"; + regulator-name = "vbus_sled3"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&sled3_ioexp 1 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vbus_sled4: vbus_sled4 { + compatible = "regulator-fixed"; + regulator-name = "vbus_sled4"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&sled4_ioexp 1 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vbus_sled5: vbus_sled5 { + compatible = "regulator-fixed"; + regulator-name = "vbus_sled5"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&sled5_ioexp 1 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vbus_sled6: vbus_sled6 { + compatible = "regulator-fixed"; + regulator-name = "vbus_sled6"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&sled6_ioexp 1 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; }; &mac2 { @@ -336,17 +390,17 @@ compatible = "fcs,fusb302"; reg = <0x22>; + interrupt-parent = <&gpio0>; + interrupts = ; + vbus-supply = <&vbus_sled1>; + connector { compatible = "usb-c-connector"; label = "USB-C"; - power-role = "dual"; - try-power-role = "sink"; - data-role = "dual"; - source-pdos = ; - sink-pdos = ; - op-sink-microwatt = <10000000>; + power-role = "source"; + data-role = "host"; + pd-disable; + typec-power-opmode = "default"; }; }; @@ -422,17 +476,17 @@ compatible = "fcs,fusb302"; reg = <0x22>; + interrupt-parent = <&gpio0>; + interrupts = ; + vbus-supply = <&vbus_sled2>; + connector { compatible = "usb-c-connector"; label = "USB-C"; - power-role = "dual"; - try-power-role = "sink"; - data-role = "dual"; - source-pdos = ; - sink-pdos = ; - op-sink-microwatt = <10000000>; + power-role = "source"; + data-role = "host"; + pd-disable; + typec-power-opmode = "default"; }; }; @@ -508,17 +562,17 @@ compatible = "fcs,fusb302"; reg = <0x22>; + interrupt-parent = <&gpio0>; + interrupts = ; + vbus-supply = <&vbus_sled3>; + connector { compatible = "usb-c-connector"; label = "USB-C"; - power-role = "dual"; - try-power-role = "sink"; - data-role = "dual"; - source-pdos = ; - sink-pdos = ; - op-sink-microwatt = <10000000>; + power-role = "source"; + data-role = "host"; + pd-disable; + typec-power-opmode = "default"; }; }; @@ -594,17 +648,17 @@ compatible = "fcs,fusb302"; reg = <0x22>; + interrupt-parent = <&gpio0>; + interrupts = ; + vbus-supply = <&vbus_sled4>; + connector { compatible = "usb-c-connector"; label = "USB-C"; - power-role = "dual"; - try-power-role = "sink"; - data-role = "dual"; - source-pdos = ; - sink-pdos = ; - op-sink-microwatt = <10000000>; + power-role = "source"; + data-role = "host"; + pd-disable; + typec-power-opmode = "default"; }; }; @@ -680,17 +734,17 @@ compatible = "fcs,fusb302"; reg = <0x22>; + interrupt-parent = <&gpio0>; + interrupts = ; + vbus-supply = <&vbus_sled5>; + connector { compatible = "usb-c-connector"; label = "USB-C"; - power-role = "dual"; - try-power-role = "sink"; - data-role = "dual"; - source-pdos = ; - sink-pdos = ; - op-sink-microwatt = <10000000>; + power-role = "source"; + data-role = "host"; + pd-disable; + typec-power-opmode = "default"; }; }; @@ -766,17 +820,17 @@ compatible = "fcs,fusb302"; reg = <0x22>; + interrupt-parent = <&gpio0>; + interrupts = ; + vbus-supply = <&vbus_sled6>; + connector { compatible = "usb-c-connector"; label = "USB-C"; - power-role = "dual"; - try-power-role = "sink"; - data-role = "dual"; - source-pdos = ; - sink-pdos = ; - op-sink-microwatt = <10000000>; + power-role = "source"; + data-role = "host"; + pd-disable; + typec-power-opmode = "default"; }; };