From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [PATCH 1/9] pinctrl: sunxi: Support I/O bias voltage setting on A80 Date: Wed, 6 Feb 2019 13:17:18 +0100 Message-ID: <20190206121718.3yqbirt5l3qwneco@flea> References: <20190206033239.3619-1-wens@csie.org> <20190206033239.3619-2-wens@csie.org> Reply-To: maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="p6xjb2ugcpauju6t" Return-path: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Content-Disposition: inline In-Reply-To: <20190206033239.3619-2-wens-jdAy2FN1RRM@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Chen-Yu Tsai Cc: Linus Walleij , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-Id: devicetree@vger.kernel.org --p6xjb2ugcpauju6t Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline On Wed, Feb 06, 2019 at 11:32:31AM +0800, Chen-Yu Tsai wrote: > The A80 SoC has configuration registers for I/O bias voltage. Incorrect > settings would make the affected peripherals inoperable in some cases, > such as Ethernet RGMII signals biased at 2.5V with the settings still > at 3.3V. However low speed signals such as MDIO on the same group of > pins seem to be unaffected. > > Previously there was no way to know what the actual voltage used was, > short of hard-coding a value in the device tree. With the new pin bank > regulator supply support in place, the driver can now query the > regulator for its voltage, and if it's valid (as opposed to being the > dummy regulator), set the bias voltage setting accordingly. > > Add a quirk to denote the presence of the configuration registers, and > a function to set the correct setting based on the voltage read back > from the regulator. > > This is only done when the regulator is first acquired and enabled. > While it would be nice to have a notifier on the regulator so that when > the voltage changes, the driver can update the setting, in practice no > board currently supports dynamic changing of the I/O voltages. > > Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --p6xjb2ugcpauju6t--