Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934905AbcKKRSZ (ORCPT ); Fri, 11 Nov 2016 12:18:25 -0500 Received: from anholt.net ([50.246.234.109]:43394 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932864AbcKKRSX (ORCPT ); Fri, 11 Nov 2016 12:18:23 -0500 From: Eric Anholt To: Stephen Warren Cc: Linus Walleij , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lee Jones , bcm-kernel-feedback-list@broadcom.com Subject: Re: [PATCH v3] ARM: bcm2835: Add names for the Raspberry Pi GPIO lines In-Reply-To: <7a5c1318-de70-bcfc-648d-fd5a43c2fac5@wwwdotorg.org> References: <20161027165246.23936-1-eric@anholt.net> <7a5c1318-de70-bcfc-648d-fd5a43c2fac5@wwwdotorg.org> User-Agent: Notmuch/0.22.2+1~gb0bcfaa (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Fri, 11 Nov 2016 09:18:21 -0800 Message-ID: <87lgwqaqaq.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-Length: 3570 Lines: 87 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Stephen Warren writes: > On 10/27/2016 10:52 AM, Eric Anholt wrote: >> From: Linus Walleij >> >> The idea is to give useful names to GPIO lines that an implementer >> will be using from userspace, e.g. for maker type projects. These are >> user-visible using tools/gpio/lsgpio.c > >> arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 65 +++++++++++++++++++++++++= ++++++ >> arch/arm/boot/dts/bcm2835-rpi-a.dts | 67 +++++++++++++++++++++++++= +++++++ >> arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 66 +++++++++++++++++++++++++= ++++++ >> arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 66 +++++++++++++++++++++++++= ++++++ >> arch/arm/boot/dts/bcm2835-rpi-b.dts | 67 +++++++++++++++++++++++++= +++++++ > > Aren't the A and B rev 2 pinouts the same. Looking at the contents of the patches and the schematics referenced From=20them: no, they aren't. > If so, why duplicate the=20 > content between the files instead of creating an inclue file? Same for=20 > A+, B+, Pi 2, and Pi 3. Shouldn't this patch update the Pi 2 and Pi 3=20 > DTs too? Pi2 and 3 would be lovely. If someone wants to write them, I'd encourage them to. > I think the whole point of naming GPIOs is to give users the same=20 > experience across the different boards where the same semantics exist in= =20 > HW. Both the A+ and B+ use GPIO0/1 (a/k/a ID_SD/ID_SC a/k/a SDA0/SCL0)=20 > for the same semantic purpose and are exposed in the same externally=20 > visible way (same pins on the expansion header); the board ID EEPROM.=20 > Therefore I assert the names of these GPIOs should be identical on all=20 > boards that use them for that purpose, to allow SW (or human knowledge)=20 > portability between the boards. I weakly agree with this, but find the idea of "consistent semantics" attached to the names rather silly given the number of ways people reconfigure the boards (particularly given that people can pinmux things). That said, I agree with you on renaming ID_SD to disagree with the schematic in favor of consistency, and I've done so. >> + "GPIO17", > > This pin is known as GPIO_GEN0 on the expansion header. Given the=20 > expansion header is all end-users likely care about, and other pins=20 > (e.g. SPI_CE1_N) are named after the expansion header, shouldn't this=20 > patch use the GPIO expansion header naming for all pins that are routed=20 > to that header? We've already been through this. Users *don't* know the GENx names and they were confusing and got eliminated in the later schematics. This was done for consistency, like you asked for above! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJYJf1dAAoJELXWKTbR/J7onCAQAKUJVBfkVdMJBs+YOt3+PIvL tNDme1XsyqzBqXJ95MCS69lBoMWn4W6Eps3bZpetJYtGZ/xeSVNWb4k0G9m/y7Vy jam9NmcO3y6iB8luT68sQiSCo6MnNUn1Pe/zoi8sR9+TUXu1gg7zpMJ5RPgq3A4v jhl/mIePIBCzQaLTzEd8DyXGexq4y+PWNE+RkSMfU4tRX7Jm7hNfe9txmZ8eUD89 p1heswgAKP+l9I+7kY9NeC62vLDNYWCikYvqYviyIfX1+EghRz4ECR28K060dlO9 kk926HVsGswL9/7KspiYZLvtgwW1whZUli+ArwShIECyMVrLqJUJ8ZRv/4fsxDm0 Ez17rg/iZgdPdA9MKfeLzMSobEfzMBjfHsIaYGdJrmuJt8+nKoczVBzjdFxkVDqi vqd8Afe1Fcz85s2/EKIycuv10S8fbcq08mCskChUn6aitmt99ezgCPEBCsybUUA0 Gz5SFya/oIorgMf2Wx/cV5rcEVhlhSo571rj3FvwfTYrKPpzn2er4DHBG55WOlJl rrJCK4R/FXJ426cO04XvXSSKjfR92B9DvWjE9tK3Yx022LlsZYJZGFs1pS9aiwkY GsJ1rqLsWW6QagPkfzJb/rUhnOPcd4M6eQhlRGbJFQAdChiV9HWVeBOllnrBaDte /JWLE3f6vTRrnNHmkqgG =HiXm -----END PGP SIGNATURE----- --=-=-=--