From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932919AbcCCWbY (ORCPT ); Thu, 3 Mar 2016 17:31:24 -0500 Received: from anholt.net ([50.246.234.109]:60108 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932835AbcCCWaT (ORCPT ); Thu, 3 Mar 2016 17:30:19 -0500 From: Eric Anholt To: Stephen Warren Cc: linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lee Jones , Florian Fainelli , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , devicetree@vger.kernel.org, Linus Walleij , linux-gpio@vger.kernel.org, Stefan Wahren Subject: Re: [PATCH 2/5] ARM: bcm2835: Replace alt0/i2s_alt[02] with standard groups. In-Reply-To: <56D8ABF4.6060801@wwwdotorg.org> References: <1456510756-15337-1-git-send-email-eric@anholt.net> <1456510756-15337-3-git-send-email-eric@anholt.net> <56D8ABF4.6060801@wwwdotorg.org> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Thu, 03 Mar 2016 14:28:58 -0800 Message-ID: <87bn6v6vrp.fsf@eliezer.anholt.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Stephen Warren writes: > On 02/26/2016 11:19 AM, Eric Anholt wrote: >> Since all of these pins were documented, we can use their names to >> explain what's going on. > >> diff --git a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts b/arch/arm/boot/dt= s/bcm2835-rpi-a-plus.dts > >> &gpio { >> + pinctrl-0 =3D <&i2c0_gpio0 >> + &i2c1_gpio2 >> + &gpclk0_gpio4 >> + &gpclk1_gpio5 >> + &spi0_gpio7 >> + &pcm_gpio18 >> + &pwm0_gpio40 >> + &pwm1_gpio45 >> + &gpioout >> + &alt3>; >> }; > > Why not convert alt3 to the new scheme too? (covered in the next patch) > I think this configures too many pins, which in turn makes assumptions=20 > about what those pins are used for that may not be valid. > > Recent RPi firmware configures almost all expansion connector GPIOs as=20 > GPIO-in. This ensures that no matter what is connected to the expansion=20 > connector, there can be no signal conflicts due to both the bcm283x and=20 > some external device both attempting to drive the same pin. I believe=20 > the default Linux pinmux should adopt the same approach, by simply not=20 > configuring any expansion connector pins except those known to have a=20 > 100% hard-coded usage. For example, the HAT I2C pins must only be used=20 > for that purpose on the RPi, so even if the HW supported using them as=20 > arbitrary GPIO or PWM or ..., we know they're actually I2C. > > So, I think this list should only include configuration for pins=20 > connected to on-board devices, or expansion pins that have a 100% known=20 > purpose. > > (I can't quite remember how many pins are being configured in the=20 > upstream kernel's DT files at present; it's possible the complying with=20 > this rule may involve removing some pinctrl settings that are currently=20 > present to avoid conflicts. User-specific additions should come from DT=20 > overlays or manual DT edits.) If we want to improve on our default pin configurations, I'm into that, but I think the first step is to get groups split up so it's clear what we're doing with pins in the first place. This patch is just a no-op change to get the board files to use smaller groups for enabling/disabling, and we should stack functional changes after that. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJW2LqrAAoJELXWKTbR/J7one4P/RUxkBUa6jueLqeByHVNf4wc WuPJRMRveI8psYXiRltAQPLQmgaFktAlu4ly4jKBm9MPl4XrDaw7oWd7+GxKFOFF KCh5BW3/OYdWbQR/ICaORrrVPe8JSgcCdvjtuQpJRIKTjYJ5e2/fxWMFsJXH1vcw FNEtJtOR6FuoknqhftUVcwEWFkTG434dhFYd2WAfEwObbaEn1LRGnY2/ahYykU4n 0Qv32eufQwxQ65M3BSoeTSB6s49iKzvPXpP9j6e/QhbTVT89Fq+VSv5qmKeMrlmJ 8BzrScJ4hwjaxahctgOqvjKQa5/60PEiEKvo+QpDAdFw4l5CY3XXJAlUnMrxGCZf d+Z5ZbDet8p8nJtGnsrAxGSxbmNB9dHZnQ7plrcYEH9U5GI+VCavkpyiO9uxluqL By+R2fhOcza/uNkiaXw7qfpH0+8qXTKHpfquqIUFSRdV2JtHJW2zO4xtBqTat/W9 76cOmTPF8SNcb0O4+WJz1qCGDBPsZoWVdo+/3WZsCorYfXU9YihzQfk20NSQ+k9e AjSAR8gky4zSDDeT1xDOkbmyvvwUtyoUDxiFD3WrB7fvD/ECCl+b/gRu2hVUH8Jg jShi+lyLFhxAYuAvLTXODoXADcusJRlw29vc90t+fkqq5OL+DZGnYe3I/F1qP4jX 4h1vChyvGuDYtssnjcN0 =75Ta -----END PGP SIGNATURE----- --=-=-=--