From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f52.google.com (mail-dl1-f52.google.com [74.125.82.52]) (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 6E980328619 for ; Tue, 23 Dec 2025 09:43:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766483021; cv=none; b=hUhMZM0qMka1CM3AH/AHluEOlyFAM2J0lUIX2A8X6jAkXC3VxUAPQ8jXNyfwJEuCazb8vVuPkyTrDSS8s9TzLESW34M0Bct3EdS7YWHDvyP7lXp7I8afD/F1m5Irw+DnGuvbBFiGMbNiLcb4/3cczaFjfzTHV62UsXrYIwFTJPw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766483021; c=relaxed/simple; bh=l/xGg3lZcqpSBWluJfeIDeMimjyGoXBIIVY9RShRyGU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oq5oEl7+PcHImGICv1aIpE0DGWRb3tgMdK0mqvVE6J47xwvOoRV9uyx/oZ1Px+eNFKY5V+CfN+eiJps4fbcjQ8Zg/oiBqAR2ERnqk0BOVMbP/8OKtVkbEnAIY/b031e7d2preDm2pelDB/tpj2b3P6QavQOclsh6CoXHK7uFw+8= 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=fyrWW33j; arc=none smtp.client-ip=74.125.82.52 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fyrWW33j" Received: by mail-dl1-f52.google.com with SMTP id a92af1059eb24-11beb0a7bd6so8047508c88.1 for ; Tue, 23 Dec 2025 01:43:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766483017; x=1767087817; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=SxJbYsS9Flodz6V0WJwrBiZXTghxJcKYTBqtlgaql2c=; b=fyrWW33jdFVCvBDNrCL4oWlp9NRWeQr1WW6BpG2bX4PxaJyPLzZhjQJtRGu4ywU0lc ElzOLtHwJSFvPrce6A5MidqY/f9V9qch/hdEtdSgN685/GveRi2krjW/wvFdTTwuz/iv KP7mKZ23NaYDkS1F13GOGKSiEnJtjsXVsoynDTKnfga9rnAmAjFe55DRd9X9xmBSWuYx kZposqeRRNBRK5rWbql94+vQK8VqEvU2VPLHKmKISYBDUnKC4NwVYjwmYhYvcFXUrCN9 ufbiKkigjSfzaIdNtKNCDcQkhIpkQp6eC6rFY9YV+Kzeft8fcKaYS0m2ypEHTZ4DbYI8 fq+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766483017; x=1767087817; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SxJbYsS9Flodz6V0WJwrBiZXTghxJcKYTBqtlgaql2c=; b=ajDLIb4CRM4D31MZ6B0BOTxmw7iaZw74KHmS0BtjF/H8t674H+3Q+ktwyJAn8ky3R5 V6XRxF+PPPOwOR8wcFQHOxhT/4+PgYR+fXAwixgVyui51WBDO6Dya0MD4I8em90KjR/o kdoYo50D9meBNLff6Iz9mBp5P33hIiANwhSb2OuSOYlf6ZmRvjTCRpX8ejMVF4JuGDGY 5rjyYkesM2Lv8gWI7vLcQ4ulAW3t0SjvTxLJ4rNkwIyznUyqHkry5qPZpE/b8DBotP/X EL+J/25QG1YEqDuEx/apmfq550gw2pHyESvSK0FUj4f43CcTNhliFHuZdj20FpGkdZeO IeYA== X-Forwarded-Encrypted: i=1; AJvYcCUilnm8nVkUfhXRtRTQmFYqZX7yqlJuNFyfh/9LOh/HLRVPdEK6jpw/+upLu9DIWDyOnsLb9INp7+OHGG4=@vger.kernel.org X-Gm-Message-State: AOJu0Yxl2jfPa2l3ACgyamzR5FKn1AljFFlTH1dhz7IGNGILVK1sEr2o o4KYl4dHcpLwYdsF7dZwuk3N0l2don5kYNmqmuxiW1RvEbDXPz2wn4eh X-Gm-Gg: AY/fxX6dB24jArNLCQDuVsbv8Q2gGC5P2QxejOITay4fNgM01OLVkgTLuRQ7VWJftBn RbmLe68gqZ6+EdP7ZysK4K/Cc14FyhcciYdYT5eCiYtpyXurky+vbGPbLwe0St8L0U0ExHaUxTR RLe1fJkN3eGUum9VU6TjZy6IJh0gKbE6iwW+8WxgVSAr01LqCQtAuXka81nz/3E9tA2xe7knLiH MSBUPj+MjPHEB2k8cYITgpy1vh9/s44H3v/qmWfz5FKf+IKByGGM8oTVaxG+dZRIWGBvQn24T6s sg/CJyNX7kw+UXms2fqt6FqstyepTVRrGyN+heOwbMFxNrVZe2LX9ywuScnY+5HYyUYwA8qMw/5 IJtIaNGHMh58OfXTm5942tmAHsYfoRGT9XeB7KNPnisg+XqeBnHR+ceToiG+nPI8pDAnla2K51M OA48VYQVt1SQ== X-Google-Smtp-Source: AGHT+IEp+OSd9R0lrP291Dk7W1AafeaeXYagMJNjBu0iohEINVzAIJUCtwgGHA2QHs2m9CJoX6vTug== X-Received: by 2002:a05:7022:608a:b0:11b:a8e3:847b with SMTP id a92af1059eb24-12171a685cbmr13887306c88.5.1766483017187; Tue, 23 Dec 2025 01:43:37 -0800 (PST) Received: from localhost ([2001:19f0:ac00:4eb8:5400:5ff:fe30:7df3]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-121724cfc0esm56367570c88.2.2025.12.23.01.43.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Dec 2025 01:43:36 -0800 (PST) Date: Tue, 23 Dec 2025 17:42:26 +0800 From: Inochi Amaoto To: Troy Mitchell , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Yixun Lan , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Linus Walleij Cc: devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Subject: Re: [PATCH 2/2] pinctrl: spacemit: support I/O power domain configuration Message-ID: References: <20251223-kx-pinctrl-aib-io-pwr-domain-v1-0-5f1090a487c7@linux.spacemit.com> <20251223-kx-pinctrl-aib-io-pwr-domain-v1-2-5f1090a487c7@linux.spacemit.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251223-kx-pinctrl-aib-io-pwr-domain-v1-2-5f1090a487c7@linux.spacemit.com> On Tue, Dec 23, 2025 at 05:11:12PM +0800, Troy Mitchell wrote: > IO domain power control registers are used to configure the operating > voltage of dual-voltage GPIO banks. By default, these registers are > configured for 3.3V operation. As a result, even when a GPIO bank is > externally supplied with 1.8V, the internal logic continues to > operate in the 3.3V domain, which may lead to functional failures. > > This patch adds support for programming the IO domain power control > registers, allowing dual-voltage GPIO banks to be explicitly configured > for 1.8V operation when required. > > Care must be taken when configuring these registers. If a GPIO bank is > externally supplied with 3.3V while the corresponding IO power domain > is configured for 1.8V, external current injection (back-powering) > may occur, potentially causing damage to the GPIO pin. > > Due to these hardware constraints and safety considerations, the IO > domain power control registers are implemented as secure registers. > Access to these registers requires unlocking via the AIB Secure Access > Register (ASAR) in the APBC block before a single read or write > operation can be performed. > > Signed-off-by: Troy Mitchell > --- > arch/riscv/boot/dts/spacemit/k1.dtsi | 4 +- > drivers/pinctrl/spacemit/pinctrl-k1.c | 131 +++++++++++++++++++++++++++++++++- > 2 files changed, 131 insertions(+), 4 deletions(-) > > diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spacemit/k1.dtsi > index 7818ca4979b6a7755722919a5958512aa11950ab..23ecb19624f227f3c39de35bf3078379f7a2490e 100644 > --- a/arch/riscv/boot/dts/spacemit/k1.dtsi > +++ b/arch/riscv/boot/dts/spacemit/k1.dtsi > @@ -565,10 +565,12 @@ i2c8: i2c@d401d800 { > > pinctrl: pinctrl@d401e000 { > compatible = "spacemit,k1-pinctrl"; > - reg = <0x0 0xd401e000 0x0 0x400>; > + reg = <0x0 0xd401e000 0x0 0x400>, > + <0x0 0xd401e800 0x0 0x34>; > clocks = <&syscon_apbc CLK_AIB>, > <&syscon_apbc CLK_AIB_BUS>; > clock-names = "func", "bus"; > + spacemit,apbc = <&syscon_apbc 0x50>; > }; This change breaks binding, can we use something like <0x0 0xd401e000 0x0 0x1000>? If you insist on a new reg field, you should change the binding as well. Regards, Inochi