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 {