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: 208709 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp952332dyb; Fri, 1 Mar 2024 01:09:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW5T6HJg+QE1McBcw1xcoc6w/l3Oleo9t3JhsMbrhvuw4vJiW3necFMxbFr34zCS82ZBuNBaJ6cSOfB7saQ6fuRL2EDVQ== X-Google-Smtp-Source: AGHT+IFTJufPUl7sDtrUSln10fIXGhEZr+E4tSkBWN/5+tTvY5cDT0bX9/83wPTxjX4VfiH9ANzF X-Received: by 2002:a05:6a00:17a8:b0:6e5:309d:9fc7 with SMTP id s40-20020a056a0017a800b006e5309d9fc7mr1312617pfg.25.1709284162192; Fri, 01 Mar 2024 01:09:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709284162; cv=pass; d=google.com; s=arc-20160816; b=BiUgPutZR6oJy80PRYaVwRVPFhi/e9ptWu7eWuqsjZWPfuNfWYpDmTwcpz9ow5hwH9 qhPq4xb8dJSdvx1Pbmtf/PV/bNwqUD2NQ8CFiMUZiEJ2FPVat+80SslIxr0ClX8p4nQj gKQ4gsiHubhskiGc65OuD84Ob5HGFN9fbz+EJxSPMIck/aBzeMvhUr4ZosGwTmnL0V3c V7D841gI0yDntMrNUPK4symqVTKCxwNObB6zBpfWL7UqlGj9yoZzAaA15J0w3pPmcWDe LNrtDAdF7jCkfV/qknYfiiXyYFczYiQS4C6R2xXJV7Y9dUWZ6Zas4l15t8NvgfSndeAG SKAQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=lV5qcxH5/4YjqlDteGXW3dYnqwkzrKUYN7w24BcH3V0=; fh=md2HNbwGRJCd2asWOfVKZhnfqvZV3BBr14dFbhqzWjI=; b=x6YwOMgdXgdZK3nRapJ1wgX0y0N1vxWJgdsss6Buustzw2ah9Eqg0zeg2Yi7fgpg3z uuc/B8sTwIu7bNMCEVw+qHEr0WhZgzEjKwEg7HBolzGRCy3D1V5x+UqFfePZ/8kk+gvG Co1GxqZ2rmLCHMx9YZUUSyv+BVtt6EujxQ/aa36JNHKEPCvlEsHSvjKhxW9KTUvgIPwo 1rupZgiPFFpMzOr6CNAa/uHs9hbhMKI9PuVAb2Qdbb0D/PoS3/i6EbFVaXhuJ2Vs5yzN DwTXNonQMNsXfIg2lqQVSHFdr+k3SFL80khsi/tEKQqm7n75PuawCQMluVlwiVXObJoP 2OrA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=L2CsqFb4; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-88115-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88115-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id ka10-20020a056a00938a00b006e5076ae4fesi3266609pfb.369.2024.03.01.01.09.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 01:09:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88115-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=L2CsqFb4; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-88115-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88115-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id BCDCEB28D06 for ; Fri, 1 Mar 2024 08:50:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 60C2B6A8C9; Fri, 1 Mar 2024 08:49:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="L2CsqFb4" Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9C0569E19; Fri, 1 Mar 2024 08:49:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709282968; cv=none; b=c0AAb59H1QNUkjxxfVZ2P9e6yN6A1D1JxgMzkJjWWATjgkYSR9imVwXotR18a3c0L1ZojersumsITJlyv7Ni6TvLr9H8zngPswCigiC8RQ+afT1Uk/0+3lzACbOtwg+UlZHi3ilt7VitlI/vc77MRrsQqt31rxKUkPAO8adPu3g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709282968; c=relaxed/simple; bh=sa5cuAjIuCMr9whBvtQoxbnmSuWqX7SQt7wgsIpl4yU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mN2U78O1ZQLp16EB0UfuteJoMxkxCr5So9qKECCmbTEAcseguEgqOIBEGfM8lVyYcj8QiU1xDxMwZgCx7wfVUqjt2vjWchdWvO0/MzvzSTmWGaAvGJfzpRL0hWePyGQqanVS5bMJG5MRS3HqF3VyTLvseErHdAWbMKQeG4LWYmA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=L2CsqFb4; arc=none smtp.client-ip=209.85.208.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2d22b8801b9so22783431fa.0; 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=vger.kernel.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=L2CsqFb4iBPw6PsKX9HLgWFvadFIYr5Ey7aF2oBapZFm/GkhI2pYcmMjMfGcsKTFi8 EtvJBX/NQKKt3zGMButYtTH1tDhD38FhML5GPiMM+DkTrDzp8o+MC/xJXbIUF380fuwd dih/LOmVaPwC88shKoJTJZ0ZHaJzez8+/QJtf2L8C6NBGOpV8aCnGE1e63sjchP/ar4l NoucXiyBrkGiC+BZahLi/E/wgg3Ae78MiKpT2KLam+4Z8IzSs/Hwgj7qSNrKgqJ9v0mO 8UJMLChWbLdAOpuCYyww2rZiR3hSiWbn0GNkhv1/DB425XLuh3xVP27PZdbUgV7b3vmR HRzg== 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=ciej2fi0No2yLBfkID269j6wu1R4AA7LQYjN+rFMJFSi+N5sOa8UL9W/4kWYkh6ilp 5196E3ZbU3ay2YN5H8K4I9weNMmsDftSDsujccEQJFWAIMzsUOWGkTsjX9AkUGWTt3Bp iufYF2aptbpi2OR6dZ3UQ06Up8YqC1foi45gaHx+5/fpAQEux9GanafLbIQTgA0Ep1XI uV+JnTONh7KfxABJR5Rbt8mL5wVEZvpzRhOeY9/7dDEg2ajmyP2/ra4pNGmVnojrCzlo +3Zz7PMQwCmu9svayKkSo/mOPN+mnNMmRCrZsGAJgMQjUSy9lqGguNE2br3Tbjw3R/B4 0OSg== X-Forwarded-Encrypted: i=1; AJvYcCWssY4/YoFutsyQpfvvy1tZYTCSJc7aKzQM4IX4NEKJxvmFkJRR0DZZTtOTv6xt9MZmj8dWN6SU+X1IG/YWhcJ+10GAKqOA8lsn2EBUR1bMWZ72Gzulwd0QC6vi5D4klPkTChTBugES2A== X-Gm-Message-State: AOJu0YwXg56x11NpYPS8QQxmFTCK6Tr3g9NvKmSQIrF/u1doLZt4BBao PvUpzXx+OgRdTKgIieMjd7sZac25wTvE6QPIl5K5fkzdKsqtNoPP 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792313831351744262 X-GMAIL-MSGID: 1792314349969286939 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 --- 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 {