From patchwork Fri Mar 1 08:49:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Eichenberger X-Patchwork-Id: 13578160 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 A7C12C5475B for ; Fri, 1 Mar 2024 08:49:42 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=RMrm8uZCrFoPVOmRMJdB1hfy+DDhsG/vjKKF75U/Y1w=; b=oddMAS/+RTD6mg 5E919SQfVNN9TvWzt2/eTHXDHZMKuHuwhUDadbA/LUn4Bj05xiDQhGrhYRI2H0nmtsUNoVU3232Hv RWyqSt8IvWa+jMX5wFVX7gPndDW2RxDEfRab8y86pi/BV2FM40leHNmyCQYVncn8Nu9QxTNotXwwt mD14UV2+c5IzZOHntW28KrRobZIDCJtdN0NGmdnCYCtbtkQCJC5DmFdY3cGfBIMaH/WW5y1wZQQD8 6ZywNUtlXlFEwK6fB/At2VV3rKTfBckaX7EbqjzMLzkgwqNxu0yvxdfdlMH4P3mSjpF4sWNrISepL YT6/1iihhwjXlVDZps+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfyaD-0000000GyyT-2Kk2; Fri, 01 Mar 2024 08:49:33 +0000 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfya9-0000000Gyup-10ga for linux-arm-kernel@lists.infradead.org; Fri, 01 Mar 2024 08:49:30 +0000 Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2d21cdbc85bso19388311fa.2 for ; Fri, 01 Mar 2024 00:49:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709282965; x=1709887765; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lV5qcxH5/4YjqlDteGXW3dYnqwkzrKUYN7w24BcH3V0=; b=B6Bz4pN2twlUlY/k3iuSEi4VGag27cAWivph6cZUcSkk+GoU82xmBKGB6MSQUUJj+K HkQDoxmF2QJfRrmnYpV4+EsWqhNicOG9vm60L64zQWDtm5kH6MnmYMhu71m2pPcfMBv0 Ofzozefwu+wMEeFSS7VnmXQxOUAu54fq9JuAAZhFhwbtUnEuS+uq+3nQhkf3ZVsOdrJp 5T5UhKex0X/sAx7d44rJ9AHQusoSf2jbiDInKaOo+Er8pt2w3UwJDRX18EeEELvaV4ar dxqalRX3A0BcSkrYBgK+Bn7BFkmS9cuKcHWDcV5y1LQH8KE50iUWfkc5U7U2ylskaYKb QQZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709282965; x=1709887765; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lV5qcxH5/4YjqlDteGXW3dYnqwkzrKUYN7w24BcH3V0=; b=nG5ml2JW8/dNXhw3POhpDgRvl99Zjb27jkNa8xcZZa7ZsRasv4SmK4Rn+0qf8mWQtZ MeXUMyTDavrdWEtS9ODyqJX/0csIribbQBVfI4hV6lVY9Ab3/RZRFEikeUFWMKXy4otO duff655Je9lz7c+zrtV6lr0wFmDMcxHnQgxTOKTvNoE33QVrxkg5Jc4dCUc6mufdqefd 4piCegUVvKLc/WMybxRiqkuvE3PSjpH3E6pYcRnmWPoCmx3n97bfbIKHzRXJFTPmCm+n x5MYIY4zZ9M39B3iMa2yutQWdiOk/RYnB/7CAvtSsy96mbJUjkFhUnGxqfGLBZaLO91W G1ew== X-Gm-Message-State: AOJu0Yx0ShhsHWs9bcQKtpiJ30tpO+R4RhDFycDn9KZ6igq8hXiZrY4b /Db15BUej+PQEZ+WieKiLKqHAJkOEFmD24TpTZ/bF4Qp4VzMpaLx X-Google-Smtp-Source: AGHT+IHGXXytTrhTsGnkO7q2pjFjkuJVLu9xLQpSTmIYKVBSD0fa3FUbmTGUvfPH6iz8OexmjeyKZg== X-Received: by 2002:a2e:9691:0:b0:2d2:a2bf:4ae6 with SMTP id q17-20020a2e9691000000b002d2a2bf4ae6mr653809lji.31.1709282964717; Fri, 01 Mar 2024 00:49:24 -0800 (PST) Received: from eichest-laptop.toradex.int ([2a02:168:af72:0:46fd:a61a:68:ed87]) by smtp.gmail.com with ESMTPSA id 4-20020a05600c028400b00412b10ce488sm4583566wmk.23.2024.03.01.00.49.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 00:49:24 -0800 (PST) From: Stefan Eichenberger To: nm@ti.com, vigneshr@ti.com, kristo@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, francesco.dolcini@toradex.com, Stefan Eichenberger Subject: [PATCH v1 1/2] arm64: dts: ti: k3-am62-verdin: replace sleep-moci hog with regulator Date: Fri, 1 Mar 2024 09:49:00 +0100 Message-Id: <20240301084901.16656-2-eichest@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240301084901.16656-1-eichest@gmail.com> References: <20240301084901.16656-1-eichest@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240301_004929_366817_3A3B12A3 X-CRM114-Status: GOOD ( 16.03 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Stefan Eichenberger The Verdin family has a signal called sleep-moci which can be used to turn off peripherals on the carrier board when the SoM goes into suspend. So far we have hogged this signal, which means the peripherals are always on and it is not possible to add peripherals that depend on the sleep-moci to be on. With this change, we replace the hog with a regulator so that peripherals can add their own regulators that use the same gpio. Carrier boards that allow peripherals to be powered off in suspend can disable this regulator and implement their own regulator to control the sleep-moci. Signed-off-by: Stefan Eichenberger Reviewed-by: Francesco Dolcini --- arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi | 24 ++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi b/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi index 6a06724b6d16..ba3b3e18a46d 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi @@ -122,6 +122,22 @@ reg_1v8_eth: regulator-1v8-eth { vin-supply = <®_1v8>; }; + /* + * By default we enable CTRL_SLEEP_MOCI#, this is required to have + * peripherals on the carrier board powered. + * If more granularity or power saving is required this can be disabled + * in the carrier board device tree files. + */ + reg_force_sleep_moci: regulator-force-sleep-moci { + compatible = "regulator-fixed"; + enable-active-high; + /* Verdin CTRL_SLEEP_MOCI# (SODIMM 256) */ + gpio = <&main_gpio0 31 GPIO_ACTIVE_HIGH>; + regulator-always-on; + regulator-boot-on; + regulator-name = "CTRL_SLEEP_MOCI#"; + }; + /* Verdin SD_1 Power Supply */ reg_sdhc1_vmmc: regulator-sdhci1 { compatible = "regulator-fixed"; @@ -951,14 +967,6 @@ &main_gpio0 { "", "", ""; - - verdin_ctrl_sleep_moci: ctrl-sleep-moci-hog { - gpio-hog; - /* Verdin CTRL_SLEEP_MOCI# (SODIMM 256) */ - gpios = <31 GPIO_ACTIVE_HIGH>; - line-name = "CTRL_SLEEP_MOCI#"; - output-high; - }; }; &main_gpio1 { From patchwork Fri Mar 1 08:49:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Eichenberger X-Patchwork-Id: 13578162 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 9E316C5478C for ; Fri, 1 Mar 2024 08:49:47 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=1TR+w+zWnGvVQ/7yvbUe1aDKnWUu2DZ6nV3yEQhd+Mc=; b=CRnye6QKsGKtUq rCpVlLOC2Qt1fKbHsTVKn/9JDLrtcqTYwXc/wQ7L+a1abQFcQNAMstpdjiQvxI1oFJsfc9rzInWl1 SdYUuiT0Ag4YG0cjrPQwnLH7pySa/2opOMoSBIYRe+ius6tP+P2ftWNXjKTrCbWyYYe1KtljHk+N2 n8Azqrk206oRvEJTvd10N0fNCQMhqaR9YC3mrWaxhDIfdTeyGnUnpBtySjlDjwCVu/dvie/UJ2cNu OoPs6Ngxtgag8qKuC0QR9ez6gIyHvlc6t84Hgy0P2jxmWrEXPKccuhbled1bvo0pvjH5nW9EGxl9j XAzt40DK1Hbi9mGbMsdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfyaB-0000000GyxJ-1Vpp; Fri, 01 Mar 2024 08:49:31 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfya7-0000000Gyu4-3RQx for linux-arm-kernel@lists.infradead.org; Fri, 01 Mar 2024 08:49:29 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-412ca312a53so814845e9.1 for ; Fri, 01 Mar 2024 00:49:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709282965; x=1709887765; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FKDDA/un+EZ0izsCtBEAsqVDnjIUKBkjfl0BkYbb1Xg=; b=N8yp10M2h574FuauaENoKErD+86P/hGBLtwn9KK8eE9h2Vbz0uuAgx/ltiLVXJK8nc sekDf8iUNK5HiOc39nHF/cF0A3ibCPS/ACVzzFoYUhrx2VNcSBzR7TgTPf8Ft+JCebeS tDVZFUgw/52Z5dgP3iAbAtPhbU0ueCCz//KMeRekFBpDENeG70iD7HoHgImLK5XLDOxS 1fQKkNL69ou+Es2IYpBvIrZhCHoQAiqUS1wevFSLzAoBWA1inCROScutei6woNwF++wY ybeeKnXLB/dswa1PIjuh7+kATZv9t7+i4OcVu7dLbP41iHMfeOhDUxg07ZHLfOuLBpqE Hmwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709282965; x=1709887765; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FKDDA/un+EZ0izsCtBEAsqVDnjIUKBkjfl0BkYbb1Xg=; b=jrafVE73TbROlpgdRlCkkkn/7hSNNuDUraGTPzXNZh/L1LdgC+QpTdhKObzR1FxZVr 2BKYhCHpsnCQDWuO/ALU68B8eDVoWu0JAujRP23eG6WQxtPLBuXL6W/XdelzLzDSCNFk V1Cax78fpQFwuExXgE7nzRjy8uajLT6m1sE/LDtnftO/gXs86JGLC+9S0cB+Ns/76GWW 2ofI3ndKuH1eaQtsgKW5dL1XUWKNHT0+SfJBjzVpuLSOp6NAJuQW/quYqD+vTYmo92iM JRCX4V2cTWmb7pS/wfA2Slb2R+JThe+a78Iaa5pw9kKTK9M05DP9L3BoRqLtOZLqs8DR WiKw== X-Gm-Message-State: AOJu0YwD8sWDyeCuv8r1vD9apHPdX13Ap2AwbVRRprTg00I9YTAUhc0V fZf/0qGfpKFwV3v0/WDWS6yRGBz87mpbOHk+S/xTVDQyZJUaxho6 X-Google-Smtp-Source: AGHT+IFq1YVF7esH33lbpSAekWPKmcHytjI45jtnoR9W9mGatyyX4Tn5MAuBPwVLsAxfu8xZUgeA+A== X-Received: by 2002:a05:600c:468a:b0:412:b0d3:62f4 with SMTP id p10-20020a05600c468a00b00412b0d362f4mr861878wmo.26.1709282965422; Fri, 01 Mar 2024 00:49:25 -0800 (PST) Received: from eichest-laptop.toradex.int ([2a02:168:af72:0:46fd:a61a:68:ed87]) by smtp.gmail.com with ESMTPSA id 4-20020a05600c028400b00412b10ce488sm4583566wmk.23.2024.03.01.00.49.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 00:49:25 -0800 (PST) From: Stefan Eichenberger To: nm@ti.com, vigneshr@ti.com, kristo@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, francesco.dolcini@toradex.com, Stefan Eichenberger Subject: [PATCH v1 2/2] arm64: dts: ti: k3-am62-verdin-dahlia: support sleep-moci Date: Fri, 1 Mar 2024 09:49:01 +0100 Message-Id: <20240301084901.16656-3-eichest@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240301084901.16656-1-eichest@gmail.com> References: <20240301084901.16656-1-eichest@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240301_004927_902003_AA478CB4 X-CRM114-Status: GOOD ( 13.30 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Stefan Eichenberger Previously, we had the sleep-moci pin set to always on. However, the Dahlia carrier board supports disabling the sleep-moci when the system is suspended to power down peripherals that support it. This reduces overall power consumption. This commit adds support for this feature by disabling the reg_force_sleep_moci regulator and adding a new regulator for the USB hub that can be turned off when the system is suspended. Signed-off-by: Stefan Eichenberger Reviewed-by: Francesco Dolcini --- .../boot/dts/ti/k3-am62-verdin-dahlia.dtsi | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi b/arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi index bf6d27e70bc4..bb066e726527 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi @@ -43,6 +43,15 @@ simple-audio-card,cpu { sound-dai = <&mcasp0>; }; }; + + reg_usb_hub: regulator-usb-hub { + compatible = "regulator-fixed"; + enable-active-high; + /* Verdin CTRL_SLEEP_MOCI# (SODIMM 256) */ + gpio = <&main_gpio0 31 GPIO_ACTIVE_HIGH>; + regulator-boot-on; + regulator-name = "HUB_PWR_EN"; + }; }; /* Verdin ETHs */ @@ -183,6 +192,11 @@ &ospi0 { status = "okay"; }; +/* Do not force CTRL_SLEEP_MOCI# always enabled */ +®_force_sleep_moci { + status = "disabled"; +}; + /* Verdin SD_1 */ &sdhci1 { ti,driver-strength-ohm = <33>; @@ -204,7 +218,15 @@ &usbss1 { }; &usb1 { + #address-cells = <1>; + #size-cells = <0>; status = "okay"; + + usb-hub@1 { + compatible = "usb424,2744"; + reg = <1>; + vdd-supply = <®_usb_hub>; + }; }; /* Verdin CTRL_WAKE1_MICO# */