linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/8] ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node.
       [not found] <1473244289-20728-1-git-send-email-kraxel@redhat.com>
@ 2016-09-07 10:31 ` Gerd Hoffmann
  2016-09-07 18:09   ` Stefan Wahren
  2016-09-08 17:55   ` Stefan Wahren
  2016-09-07 10:31 ` [PATCH 2/8] ARM: dts: bcm283x: Add the emmc pin group to bcm283x.dtsi Gerd Hoffmann
                   ` (6 subsequent siblings)
  7 siblings, 2 replies; 26+ messages in thread
From: Gerd Hoffmann @ 2016-09-07 10:31 UTC (permalink / raw)
  To: linux-rpi-kernel, devicetree, linux-arm-kernel
  Cc: eric, swarren, bcm-kernel-feedback-list, Rob Herring,
	Mark Rutland, Russell King, Florian Fainelli, Ray Jui,
	Scott Branden, open list

From: Eric Anholt <eric@anholt.net>

The BCM2835-ARM-Peripherals.pdf documentation specifies what the
function selects do for the pins, and there are a bunch of obvious
groupings to be made.  With these created, we'll be able to replace
bcm2835-rpi.dtsi's main "set all of these pins to alt0" with
references to specific groups we want enabled.

Signed-off-by: Eric Anholt <eric@anholt.net>
---
 arch/arm/boot/dts/bcm283x.dtsi | 170 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 170 insertions(+)

diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
index 4d9f3ab..acb616f 100644
--- a/arch/arm/boot/dts/bcm283x.dtsi
+++ b/arch/arm/boot/dts/bcm283x.dtsi
@@ -131,6 +131,176 @@
 
 			interrupt-controller;
 			#interrupt-cells = <2>;
+
+			/* Defines pin muxing groups according to
+			 * BCM2835-ARM-Peripherals.pdf page 102.
+			 *
+			 * While each pin can have its mux selected
+			 * for various functions individually, some
+			 * groups only make sense to switch to a
+			 * particular function together.
+			 */
+			i2c0_gpio0: i2c0_gpio0 {
+				brcm,pins = <0 1>;
+				brcm,function = <BCM2835_FSEL_ALT0>;
+			};
+			i2c1_gpio2: i2c1_gpio2 {
+				brcm,pins = <2 3>;
+				brcm,function = <BCM2835_FSEL_ALT0>;
+			};
+			gpclk0_gpio4: gpclk0_gpio4 {
+				brcm,pins = <4>;
+				brcm,function = <BCM2835_FSEL_ALT0>;
+			};
+			gpclk1_gpio5: gpclk1_gpio5 {
+				brcm,pins = <5>;
+				brcm,function = <BCM2835_FSEL_ALT0>;
+			};
+			gpclk2_gpio6: gpclk2_gpio6 {
+				brcm,pins = <6>;
+				brcm,function = <BCM2835_FSEL_ALT0>;
+			};
+			spi0_gpio7: spi0_gpio7 {
+				brcm,pins = <7 8 9 10 11>;
+				brcm,function = <BCM2835_FSEL_ALT0>;
+			};
+			pwm0_gpio12: pwm0_gpio12 {
+				brcm,pins = <12>;
+				brcm,function = <BCM2835_FSEL_ALT0>;
+			};
+			pwm1_gpio13: pwm1_gpio13 {
+				brcm,pins = <13>;
+				brcm,function = <BCM2835_FSEL_ALT0>;
+			};
+			uart0_gpio14: uart0_gpio14 {
+				brcm,pins = <14 15>;
+				brcm,function = <BCM2835_FSEL_ALT0>;
+			};
+			pcm_gpio18: pcm_gpio18 {
+				brcm,pins = <18 19 20 21>;
+				brcm,function = <BCM2835_FSEL_ALT0>;
+			};
+			i2c0_gpio32: i2c0_gpio32 {
+				brcm,pins = <32 34>;
+				brcm,function = <BCM2835_FSEL_ALT0>;
+			};
+			spio0_gpio35: spio0_gpio35 {
+				brcm,pins = <35 36 37 38 39>;
+				brcm,function = <BCM2835_FSEL_ALT0>;
+			};
+			pwm0_gpio40: pwm0_gpio40 {
+				brcm,pins = <40>;
+				brcm,function = <BCM2835_FSEL_ALT0>;
+			};
+			pwm1_gpio41: pwm1_gpio41 {
+				brcm,pins = <41>;
+				brcm,function = <BCM2835_FSEL_ALT0>;
+			};
+			gpclk1_gpio42: gpclk1_gpio42 {
+				brcm,pins = <42>;
+				brcm,function = <BCM2835_FSEL_ALT0>;
+			};
+			gpclk2_gpio43: gpclk2_gpio43 {
+				brcm,pins = <43>;
+				brcm,function = <BCM2835_FSEL_ALT0>;
+			};
+			gpclk1_gpio44: gpclk1_gpio44 {
+				brcm,pins = <44>;
+				brcm,function = <BCM2835_FSEL_ALT0>;
+			};
+			pwm1_gpio45: pwm1_gpio45 {
+				brcm,pins = <45>;
+				brcm,function = <BCM2835_FSEL_ALT0>;
+			};
+			i2c0_gpio44: i2c0_gpio44 {
+				brcm,pins = <44 45>;
+				brcm,function = <BCM2835_FSEL_ALT1>;
+			};
+			pcm_gpio28: pcm_gpio28 {
+				brcm,pins = <28 29 30 31>;
+				brcm,function = <BCM2835_FSEL_ALT2>;
+			};
+			uart1_gpio36: uart1_gpio36 {
+				brcm,pins = <36 37 38 39>;
+				brcm,function = <BCM2835_FSEL_ALT2>;
+			};
+			i2c1_gpio44: i2c1_gpio44 {
+				brcm,pins = <44 45>;
+				brcm,function = <BCM2835_FSEL_ALT2>;
+			};
+			/* Separate from the uart0_gpio14 group
+			 * because it conflicts with spi1_gpio16, and
+			 * people often run uart0 on the two pins
+			 * without flow contrl.
+			 */
+			uart0_ctsrts_gpio16: uart0_ctsrts_gpio16 {
+				brcm,pins = <16 17>;
+				brcm,function = <BCM2835_FSEL_ALT3>;
+			};
+			i2c_slave_gpio18: i2c_slave_gpio18 {
+				brcm,pins = <18 19 20 21>;
+				brcm,function = <BCM2835_FSEL_ALT3>;
+			};
+			emmc_gpio22: emmc_gpio22 {
+				brcm,pins = <22 23 24 25 26 27>;
+				brcm,function = <BCM2835_FSEL_ALT3>;
+			};
+			uart0_gpio30: uart0_gpio30 {
+				brcm,pins = <30 31>;
+				brcm,function = <BCM2835_FSEL_ALT3>;
+			};
+			uart0_ctsrts_gpio32: uart0_ctsrts_gpio32 {
+				brcm,pins = <32 33>;
+				brcm,function = <BCM2835_FSEL_ALT3>;
+			};
+			spi1_gpio16: spi1_gpio16 {
+				brcm,pins = <16 17 18 19 20 21>;
+				brcm,function = <BCM2835_FSEL_ALT4>;
+			};
+			jtag_gpio22: jtag_gpio22 {
+				brcm,pins = <22 23 24 25 26 27>;
+				brcm,function = <BCM2835_FSEL_ALT4>;
+			};
+			spi2_gpio40: spi2_gpio40 {
+				brcm,pins = <40 41 42 43 44 45>;
+				brcm,function = <BCM2835_FSEL_ALT4>;
+			};
+			jtag_gpio4: jtag_gpio4 {
+				brcm,pins = <4 5 6 12 13>;
+				brcm,function = <BCM2835_FSEL_ALT4>;
+			};
+			uart1_gpio14: uart1_gpio14 {
+				brcm,pins = <14 15>;
+				brcm,function = <BCM2835_FSEL_ALT5>;
+			};
+			uart1_ctsrts_gpio16: uart1_ctsrts_gpio16 {
+				brcm,pins = <16 17>;
+				brcm,function = <BCM2835_FSEL_ALT5>;
+			};
+			pwm0_gpio18: pwm0_gpio18 {
+				brcm,pins = <18>;
+				brcm,function = <BCM2835_FSEL_ALT5>;
+			};
+			pwm1_gpio19: pwm1_gpio19 {
+				brcm,pins = <19>;
+				brcm,function = <BCM2835_FSEL_ALT5>;
+			};
+			uart1_gpio32: uart1_gpio32 {
+				brcm,pins = <32 33>;
+				brcm,function = <BCM2835_FSEL_ALT5>;
+			};
+			uart1_ctsrts_gpio30: uart1_ctsrts_gpio30 {
+				brcm,pins = <30 31>;
+				brcm,function = <BCM2835_FSEL_ALT5>;
+			};
+			uart1_gpio40: uart1_gpio40 {
+				brcm,pins = <40 41>;
+				brcm,function = <BCM2835_FSEL_ALT5>;
+			};
+			uart1_ctsrts_gpio42: uart1_ctsrts_gpio42 {
+				brcm,pins = <42 43>;
+				brcm,function = <BCM2835_FSEL_ALT5>;
+			};
 		};
 
 		uart0: serial@7e201000 {
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 2/8] ARM: dts: bcm283x: Add the emmc pin group to bcm283x.dtsi.
       [not found] <1473244289-20728-1-git-send-email-kraxel@redhat.com>
  2016-09-07 10:31 ` [PATCH 1/8] ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node Gerd Hoffmann
@ 2016-09-07 10:31 ` Gerd Hoffmann
  2016-09-07 10:31 ` [PATCH 3/8] ARM: dts: bcm283x: Add a group for mapping pins 48-53 to sdhost Gerd Hoffmann
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 26+ messages in thread
From: Gerd Hoffmann @ 2016-09-07 10:31 UTC (permalink / raw)
  To: linux-rpi-kernel, devicetree, linux-arm-kernel
  Cc: eric, swarren, bcm-kernel-feedback-list, Gerd Hoffmann,
	Rob Herring, Mark Rutland, Russell King, Florian Fainelli,
	Ray Jui, Scott Branden, open list

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 arch/arm/boot/dts/bcm283x.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
index acb616f..164d962 100644
--- a/arch/arm/boot/dts/bcm283x.dtsi
+++ b/arch/arm/boot/dts/bcm283x.dtsi
@@ -253,6 +253,10 @@
 				brcm,pins = <32 33>;
 				brcm,function = <BCM2835_FSEL_ALT3>;
 			};
+			emmc_gpio48: emmc_gpio48 {
+				brcm,pins = <48 49 50 51 52 53>;
+				brcm,function = <BCM2835_FSEL_ALT3>;
+			};
 			spi1_gpio16: spi1_gpio16 {
 				brcm,pins = <16 17 18 19 20 21>;
 				brcm,function = <BCM2835_FSEL_ALT4>;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 3/8] ARM: dts: bcm283x: Add a group for mapping pins 48-53 to sdhost.
       [not found] <1473244289-20728-1-git-send-email-kraxel@redhat.com>
  2016-09-07 10:31 ` [PATCH 1/8] ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node Gerd Hoffmann
  2016-09-07 10:31 ` [PATCH 2/8] ARM: dts: bcm283x: Add the emmc pin group to bcm283x.dtsi Gerd Hoffmann
@ 2016-09-07 10:31 ` Gerd Hoffmann
  2016-09-07 10:31 ` [PATCH 4/8] ARM: dts: bcm283x: Add a new EMMC pin group from the downstream tree Gerd Hoffmann
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 26+ messages in thread
From: Gerd Hoffmann @ 2016-09-07 10:31 UTC (permalink / raw)
  To: linux-rpi-kernel, devicetree, linux-arm-kernel
  Cc: eric, swarren, bcm-kernel-feedback-list, Rob Herring,
	Mark Rutland, Russell King, Florian Fainelli, Ray Jui,
	Scott Branden, open list

From: Eric Anholt <eric@anholt.net>

This pin group definition comes from downstream.  We don't have a
driver for sdhost integrated yet, but they've been experimenting with
it and it sounds useful to bring over.

Signed-off-by: Eric Anholt <eric@anholt.net>
---
 arch/arm/boot/dts/bcm283x.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
index 164d962..062d09db 100644
--- a/arch/arm/boot/dts/bcm283x.dtsi
+++ b/arch/arm/boot/dts/bcm283x.dtsi
@@ -212,6 +212,10 @@
 				brcm,pins = <45>;
 				brcm,function = <BCM2835_FSEL_ALT0>;
 			};
+			sdhost_gpio48: sdhost_gpio48 {
+				brcm,pins = <48 49 50 51 52 53>;
+				brcm,function = <BCM2835_FSEL_ALT0>;
+			};
 			i2c0_gpio44: i2c0_gpio44 {
 				brcm,pins = <44 45>;
 				brcm,function = <BCM2835_FSEL_ALT1>;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 4/8] ARM: dts: bcm283x: Add a new EMMC pin group from the downstream tree.
       [not found] <1473244289-20728-1-git-send-email-kraxel@redhat.com>
                   ` (2 preceding siblings ...)
  2016-09-07 10:31 ` [PATCH 3/8] ARM: dts: bcm283x: Add a group for mapping pins 48-53 to sdhost Gerd Hoffmann
@ 2016-09-07 10:31 ` Gerd Hoffmann
  2016-09-07 18:13   ` Stefan Wahren
  2016-09-07 10:31 ` [PATCH 5/8] ARM: dts: bcm283x: add pinctrl group to &pwm, drop pins from &gpio Gerd Hoffmann
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 26+ messages in thread
From: Gerd Hoffmann @ 2016-09-07 10:31 UTC (permalink / raw)
  To: linux-rpi-kernel, devicetree, linux-arm-kernel
  Cc: eric, swarren, bcm-kernel-feedback-list, Rob Herring,
	Mark Rutland, Russell King, Florian Fainelli, Ray Jui,
	Scott Branden, open list

From: Eric Anholt <eric@anholt.net>

This will be used for having EMMC (sdhci-bcm2835.c) drive the
wireless.

Signed-off-by: Eric Anholt <eric@anholt.net>
---
 arch/arm/boot/dts/bcm283x.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
index 062d09db..b6b1950 100644
--- a/arch/arm/boot/dts/bcm283x.dtsi
+++ b/arch/arm/boot/dts/bcm283x.dtsi
@@ -257,6 +257,11 @@
 				brcm,pins = <32 33>;
 				brcm,function = <BCM2835_FSEL_ALT3>;
 			};
+			emmc_gpio34: emmc_gpio34 {
+				brcm,pins = <34 35 36 37 38 39>;
+				brcm,function = <BCM2835_FSEL_ALT3>;
+				brcm,pull = <0 2 2 2 2 2>;
+			};
 			emmc_gpio48: emmc_gpio48 {
 				brcm,pins = <48 49 50 51 52 53>;
 				brcm,function = <BCM2835_FSEL_ALT3>;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 5/8] ARM: dts: bcm283x: add pinctrl group to &pwm, drop pins from &gpio
       [not found] <1473244289-20728-1-git-send-email-kraxel@redhat.com>
                   ` (3 preceding siblings ...)
  2016-09-07 10:31 ` [PATCH 4/8] ARM: dts: bcm283x: Add a new EMMC pin group from the downstream tree Gerd Hoffmann
@ 2016-09-07 10:31 ` Gerd Hoffmann
  2016-09-07 10:31 ` [PATCH 6/8] ARM: dts: bcm283x: add pinctrl group to &i2c0, " Gerd Hoffmann
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 26+ messages in thread
From: Gerd Hoffmann @ 2016-09-07 10:31 UTC (permalink / raw)
  To: linux-rpi-kernel, devicetree, linux-arm-kernel
  Cc: eric, swarren, bcm-kernel-feedback-list, Gerd Hoffmann,
	Rob Herring, Mark Rutland, Russell King, Lee Jones,
	Florian Fainelli, Ray Jui, Scott Branden, open list

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 arch/arm/boot/dts/bcm2835-rpi.dtsi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
index 88bcd0c..ff62236 100644
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
@@ -38,7 +38,7 @@
 	};
 
 	alt0: alt0 {
-		brcm,pins = <0 1 2 3 4 5 7 8 9 10 11 40 45>;
+		brcm,pins = <0 1 2 3 4 5 7 8 9 10 11>;
 		brcm,function = <BCM2835_FSEL_ALT0>;
 	};
 
@@ -68,6 +68,8 @@
 };
 
 &pwm {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>;
 	status = "okay";
 };
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 6/8] ARM: dts: bcm283x: add pinctrl group to &i2c0, drop pins from &gpio
       [not found] <1473244289-20728-1-git-send-email-kraxel@redhat.com>
                   ` (4 preceding siblings ...)
  2016-09-07 10:31 ` [PATCH 5/8] ARM: dts: bcm283x: add pinctrl group to &pwm, drop pins from &gpio Gerd Hoffmann
@ 2016-09-07 10:31 ` Gerd Hoffmann
  2016-09-07 10:31 ` [PATCH 7/8] ARM: dts: bcm283x: add pinctrl group to &i2c1, " Gerd Hoffmann
  2016-09-07 10:31 ` [PATCH 8/8] ARM: dts: bcm283x: add pinctrl group to &sdhci, " Gerd Hoffmann
  7 siblings, 0 replies; 26+ messages in thread
From: Gerd Hoffmann @ 2016-09-07 10:31 UTC (permalink / raw)
  To: linux-rpi-kernel, devicetree, linux-arm-kernel
  Cc: eric, swarren, bcm-kernel-feedback-list, Gerd Hoffmann,
	Rob Herring, Mark Rutland, Russell King, Lee Jones,
	Florian Fainelli, Ray Jui, Scott Branden, open list

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 arch/arm/boot/dts/bcm2835-rpi.dtsi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
index ff62236..b936978 100644
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
@@ -38,7 +38,7 @@
 	};
 
 	alt0: alt0 {
-		brcm,pins = <0 1 2 3 4 5 7 8 9 10 11>;
+		brcm,pins = <2 3 4 5 7 8 9 10 11>;
 		brcm,function = <BCM2835_FSEL_ALT0>;
 	};
 
@@ -49,6 +49,8 @@
 };
 
 &i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_gpio0>;
 	status = "okay";
 	clock-frequency = <100000>;
 };
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 7/8] ARM: dts: bcm283x: add pinctrl group to &i2c1, drop pins from &gpio
       [not found] <1473244289-20728-1-git-send-email-kraxel@redhat.com>
                   ` (5 preceding siblings ...)
  2016-09-07 10:31 ` [PATCH 6/8] ARM: dts: bcm283x: add pinctrl group to &i2c0, " Gerd Hoffmann
@ 2016-09-07 10:31 ` Gerd Hoffmann
  2016-09-07 10:31 ` [PATCH 8/8] ARM: dts: bcm283x: add pinctrl group to &sdhci, " Gerd Hoffmann
  7 siblings, 0 replies; 26+ messages in thread
From: Gerd Hoffmann @ 2016-09-07 10:31 UTC (permalink / raw)
  To: linux-rpi-kernel, devicetree, linux-arm-kernel
  Cc: eric, swarren, bcm-kernel-feedback-list, Gerd Hoffmann,
	Rob Herring, Mark Rutland, Russell King, Lee Jones,
	Florian Fainelli, Ray Jui, Scott Branden, open list

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 arch/arm/boot/dts/bcm2835-rpi.dtsi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
index b936978..8688204 100644
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
@@ -38,7 +38,7 @@
 	};
 
 	alt0: alt0 {
-		brcm,pins = <2 3 4 5 7 8 9 10 11>;
+		brcm,pins = <4 5 7 8 9 10 11>;
 		brcm,function = <BCM2835_FSEL_ALT0>;
 	};
 
@@ -56,6 +56,8 @@
 };
 
 &i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_gpio2>;
 	status = "okay";
 	clock-frequency = <100000>;
 };
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 8/8] ARM: dts: bcm283x: add pinctrl group to &sdhci, drop pins from &gpio
       [not found] <1473244289-20728-1-git-send-email-kraxel@redhat.com>
                   ` (6 preceding siblings ...)
  2016-09-07 10:31 ` [PATCH 7/8] ARM: dts: bcm283x: add pinctrl group to &i2c1, " Gerd Hoffmann
@ 2016-09-07 10:31 ` Gerd Hoffmann
  7 siblings, 0 replies; 26+ messages in thread
From: Gerd Hoffmann @ 2016-09-07 10:31 UTC (permalink / raw)
  To: linux-rpi-kernel, devicetree, linux-arm-kernel
  Cc: eric, swarren, bcm-kernel-feedback-list, Gerd Hoffmann,
	Rob Herring, Mark Rutland, Russell King, Lee Jones,
	Florian Fainelli, Ray Jui, Scott Branden, open list

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 arch/arm/boot/dts/bcm2835-rpi.dtsi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
index 8688204..3f0ce61 100644
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
@@ -43,7 +43,7 @@
 	};
 
 	alt3: alt3 {
-		brcm,pins = <48 49 50 51 52 53>;
+		brcm,pins = <>;
 		brcm,function = <BCM2835_FSEL_ALT3>;
 	};
 };
@@ -67,6 +67,8 @@
 };
 
 &sdhci {
+	pinctrl-names = "default";
+	pinctrl-0 = <&emmc_gpio48>;
 	status = "okay";
 	bus-width = <4>;
 };
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH 1/8] ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node.
  2016-09-07 10:31 ` [PATCH 1/8] ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node Gerd Hoffmann
@ 2016-09-07 18:09   ` Stefan Wahren
  2016-09-07 18:50     ` Eric Anholt
  2016-09-08 17:55   ` Stefan Wahren
  1 sibling, 1 reply; 26+ messages in thread
From: Stefan Wahren @ 2016-09-07 18:09 UTC (permalink / raw)
  To: Gerd Hoffmann, linux-rpi-kernel, linux-arm-kernel, devicetree
  Cc: Scott Branden, Ray Jui, Russell King, eric, open list,
	Rob Herring, bcm-kernel-feedback-list, swarren, Mark Rutland,
	Florian Fainelli

Hi Gerd,

> Gerd Hoffmann <kraxel@redhat.com> hat am 7. September 2016 um 12:31
> geschrieben:
> 
> 
> From: Eric Anholt <eric@anholt.net>
> 
> The BCM2835-ARM-Peripherals.pdf documentation specifies what the
> function selects do for the pins, and there are a bunch of obvious
> groupings to be made.  With these created, we'll be able to replace
> bcm2835-rpi.dtsi's main "set all of these pins to alt0" with
> references to specific groups we want enabled.

on IMX/MXS platform it's unwanted to add all possible muxes in the dtsi file. So
i would suggest to add only the actually used muxes. That makes it easier to
maintain.

Regards
Stefan

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 4/8] ARM: dts: bcm283x: Add a new EMMC pin group from the downstream tree.
  2016-09-07 10:31 ` [PATCH 4/8] ARM: dts: bcm283x: Add a new EMMC pin group from the downstream tree Gerd Hoffmann
@ 2016-09-07 18:13   ` Stefan Wahren
  2016-09-08  7:44     ` Gerd Hoffmann
  2016-09-09 21:22     ` Eric Anholt
  0 siblings, 2 replies; 26+ messages in thread
From: Stefan Wahren @ 2016-09-07 18:13 UTC (permalink / raw)
  To: Gerd Hoffmann, linux-rpi-kernel, linux-arm-kernel, devicetree
  Cc: Scott Branden, Ray Jui, Russell King, open list, Rob Herring,
	bcm-kernel-feedback-list, Mark Rutland, Florian Fainelli


> Gerd Hoffmann <kraxel@redhat.com> hat am 7. September 2016 um 12:31
> geschrieben:
> 
> 
> From: Eric Anholt <eric@anholt.net>
> 
> This will be used for having EMMC (sdhci-bcm2835.c) drive the
> wireless.

sdhci-bcm2835.c has been replaced by sdhci-iproc.c

> 
> Signed-off-by: Eric Anholt <eric@anholt.net>
> ---
>  arch/arm/boot/dts/bcm283x.dtsi | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
> index 062d09db..b6b1950 100644
> --- a/arch/arm/boot/dts/bcm283x.dtsi
> +++ b/arch/arm/boot/dts/bcm283x.dtsi
> @@ -257,6 +257,11 @@
>  				brcm,pins = <32 33>;
>  				brcm,function = <BCM2835_FSEL_ALT3>;
>  			};
> +			emmc_gpio34: emmc_gpio34 {
> +				brcm,pins = <34 35 36 37 38 39>;
> +				brcm,function = <BCM2835_FSEL_ALT3>;
> +				brcm,pull = <0 2 2 2 2 2>;

How about adding pull defines to include/dt-bindings/pinctrl/bcm2835.h?

> +			};
>  			emmc_gpio48: emmc_gpio48 {
>  				brcm,pins = <48 49 50 51 52 53>;
>  				brcm,function = <BCM2835_FSEL_ALT3>;
> -- 
> 1.8.3.1
> 
> 
> _______________________________________________
> linux-rpi-kernel mailing list
> linux-rpi-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rpi-kernel

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 1/8] ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node.
  2016-09-07 18:09   ` Stefan Wahren
@ 2016-09-07 18:50     ` Eric Anholt
  2016-09-08  7:48       ` Gerd Hoffmann
  0 siblings, 1 reply; 26+ messages in thread
From: Eric Anholt @ 2016-09-07 18:50 UTC (permalink / raw)
  To: Stefan Wahren, Gerd Hoffmann, linux-rpi-kernel, linux-arm-kernel,
	devicetree
  Cc: Scott Branden, Ray Jui, Russell King, open list, Rob Herring,
	bcm-kernel-feedback-list, swarren, Mark Rutland,
	Florian Fainelli

[-- Attachment #1: Type: text/plain, Size: 1093 bytes --]

Stefan Wahren <stefan.wahren@i2se.com> writes:

> Hi Gerd,
>
>> Gerd Hoffmann <kraxel@redhat.com> hat am 7. September 2016 um 12:31
>> geschrieben:
>> 
>> 
>> From: Eric Anholt <eric@anholt.net>
>> 
>> The BCM2835-ARM-Peripherals.pdf documentation specifies what the
>> function selects do for the pins, and there are a bunch of obvious
>> groupings to be made.  With these created, we'll be able to replace
>> bcm2835-rpi.dtsi's main "set all of these pins to alt0" with
>> references to specific groups we want enabled.
>
> on IMX/MXS platform it's unwanted to add all possible muxes in the dtsi file. So
> i would suggest to add only the actually used muxes. That makes it easier to
> maintain.

On the other hand, I find that having to go back to the docs for
determining the fsels is worse than just verifying and defining them
here all at once.  Maintaining has also gotten harder because our DTs
are split across 32 and 64-bit ARM, so rpi3 changes that require adding
one of these pinmux definitions back to the dtsi would require painful
cross-branch merges.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 4/8] ARM: dts: bcm283x: Add a new EMMC pin group from the downstream tree.
  2016-09-07 18:13   ` Stefan Wahren
@ 2016-09-08  7:44     ` Gerd Hoffmann
  2016-09-08 12:06       ` Stefan Wahren
  2016-09-08 19:50       ` Scott Branden
  2016-09-09 21:22     ` Eric Anholt
  1 sibling, 2 replies; 26+ messages in thread
From: Gerd Hoffmann @ 2016-09-08  7:44 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: linux-rpi-kernel, linux-arm-kernel, devicetree, Scott Branden,
	Ray Jui, Russell King, open list, Rob Herring,
	bcm-kernel-feedback-list, Mark Rutland, Florian Fainelli

On Mi, 2016-09-07 at 20:13 +0200, Stefan Wahren wrote:
> > Gerd Hoffmann <kraxel@redhat.com> hat am 7. September 2016 um 12:31
> > geschrieben:
> > 
> > 
> > From: Eric Anholt <eric@anholt.net>
> > 
> > This will be used for having EMMC (sdhci-bcm2835.c) drive the
> > wireless.
> 
> sdhci-bcm2835.c has been replaced by sdhci-iproc.c

Ah, right, I'll update the commit msg for v2.

> How about adding pull defines to include/dt-bindings/pinctrl/bcm2835.h?

Already there (or do you mean something other than '#define
BCM2835_FSEL_*' ?)

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 1/8] ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node.
  2016-09-07 18:50     ` Eric Anholt
@ 2016-09-08  7:48       ` Gerd Hoffmann
  0 siblings, 0 replies; 26+ messages in thread
From: Gerd Hoffmann @ 2016-09-08  7:48 UTC (permalink / raw)
  To: Eric Anholt
  Cc: Stefan Wahren, linux-rpi-kernel, linux-arm-kernel, devicetree,
	Scott Branden, Ray Jui, Russell King, open list, Rob Herring,
	bcm-kernel-feedback-list, swarren, Mark Rutland,
	Florian Fainelli

On Mi, 2016-09-07 at 11:50 -0700, Eric Anholt wrote:
> Stefan Wahren <stefan.wahren@i2se.com> writes:
> 
> > Hi Gerd,
> >
> >> Gerd Hoffmann <kraxel@redhat.com> hat am 7. September 2016 um 12:31
> >> geschrieben:
> >> 
> >> 
> >> From: Eric Anholt <eric@anholt.net>
> >> 
> >> The BCM2835-ARM-Peripherals.pdf documentation specifies what the
> >> function selects do for the pins, and there are a bunch of obvious
> >> groupings to be made.  With these created, we'll be able to replace
> >> bcm2835-rpi.dtsi's main "set all of these pins to alt0" with
> >> references to specific groups we want enabled.
> >
> > on IMX/MXS platform it's unwanted to add all possible muxes in the dtsi file. So
> > i would suggest to add only the actually used muxes. That makes it easier to
> > maintain.
> 
> On the other hand, I find that having to go back to the docs for
> determining the fsels is worse than just verifying and defining them
> here all at once.

Agreeing here.  IMO it is nice to have them all even if unused for
documentation purposes.

> Maintaining has also gotten harder because our DTs
> are split across 32 and 64-bit ARM, so rpi3 changes that require adding
> one of these pinmux definitions back to the dtsi would require painful
> cross-branch merges.

It'll also easily cause merge conflicts.

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 4/8] ARM: dts: bcm283x: Add a new EMMC pin group from the downstream tree.
  2016-09-08  7:44     ` Gerd Hoffmann
@ 2016-09-08 12:06       ` Stefan Wahren
  2016-09-09  8:26         ` Gerd Hoffmann
  2016-09-08 19:50       ` Scott Branden
  1 sibling, 1 reply; 26+ messages in thread
From: Stefan Wahren @ 2016-09-08 12:06 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Mark Rutland, devicetree, Florian Fainelli, Scott Branden,
	Ray Jui, Russell King, open list, Rob Herring,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-arm-kernel

Am 08.09.2016 um 09:44 schrieb Gerd Hoffmann:
> On Mi, 2016-09-07 at 20:13 +0200, Stefan Wahren wrote:
>>> Gerd Hoffmann <kraxel@redhat.com> hat am 7. September 2016 um 12:31
>>> geschrieben:
>>>
>>>
>>> From: Eric Anholt <eric@anholt.net>
>>>
>>> This will be used for having EMMC (sdhci-bcm2835.c) drive the
>>> wireless.
>> sdhci-bcm2835.c has been replaced by sdhci-iproc.c
> Ah, right, I'll update the commit msg for v2.
>
>> How about adding pull defines to include/dt-bindings/pinctrl/bcm2835.h?
> Already there (or do you mean something other than '#define
> BCM2835_FSEL_*' ?)

No, i thought of the GPIO pull up/down register values:

BCM2835_PUD_OFF 0
BCM2835_PUD_DOWN 1
BCM2835_PUD_UP 2

>
> cheers,
>   Gerd
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 1/8] ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node.
  2016-09-07 10:31 ` [PATCH 1/8] ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node Gerd Hoffmann
  2016-09-07 18:09   ` Stefan Wahren
@ 2016-09-08 17:55   ` Stefan Wahren
  2016-09-09  9:05     ` Gerd Hoffmann
  1 sibling, 1 reply; 26+ messages in thread
From: Stefan Wahren @ 2016-09-08 17:55 UTC (permalink / raw)
  To: Gerd Hoffmann, linux-rpi-kernel, linux-arm-kernel, devicetree
  Cc: Scott Branden, Ray Jui, Russell King, open list, Rob Herring,
	bcm-kernel-feedback-list, Mark Rutland, Florian Fainelli

Hi Gerd,

> Gerd Hoffmann <kraxel@redhat.com> hat am 7. September 2016 um 12:31
> geschrieben:
> 
> 
> From: Eric Anholt <eric@anholt.net>
> 
> The BCM2835-ARM-Peripherals.pdf documentation specifies what the
> function selects do for the pins, and there are a bunch of obvious
> groupings to be made.  With these created, we'll be able to replace
> bcm2835-rpi.dtsi's main "set all of these pins to alt0" with
> references to specific groups we want enabled.
> 
> Signed-off-by: Eric Anholt <eric@anholt.net>
> ---
>  arch/arm/boot/dts/bcm283x.dtsi | 170
> +++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 170 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
> index 4d9f3ab..acb616f 100644
> --- a/arch/arm/boot/dts/bcm283x.dtsi
> +++ b/arch/arm/boot/dts/bcm283x.dtsi
> @@ -131,6 +131,176 @@
>  
>  			interrupt-controller;
>  			#interrupt-cells = <2>;
> +
> +			/* Defines pin muxing groups according to
> +			 * BCM2835-ARM-Peripherals.pdf page 102.
> +			 *
> +			 * While each pin can have its mux selected
> +			 * for various functions individually, some
> +			 * groups only make sense to switch to a
> +			 * particular function together.
> +			 */
> ...
> +			i2c0_gpio32: i2c0_gpio32 {
> +				brcm,pins = <32 34>;
> +				brcm,function = <BCM2835_FSEL_ALT0>;
> +			};
> +			spio0_gpio35: spio0_gpio35 {
> +				brcm,pins = <35 36 37 38 39>;
> +				brcm,function = <BCM2835_FSEL_ALT0>;
> +			};

s/spio0/spi0

> +			pwm0_gpio40: pwm0_gpio40 {
> +				brcm,pins = <40>;
> +				brcm,function = <BCM2835_FSEL_ALT0>;
> +			};
> ...
> +			uart1_ctsrts_gpio42: uart1_ctsrts_gpio42 {
> +				brcm,pins = <42 43>;
> +				brcm,function = <BCM2835_FSEL_ALT5>;
> +			};

Please sort all pinctrl nodes by label.

According to this page [1] the pinctrl group for parallel display interface is
missing. Is it intended?

[1] - http://elinux.org/RPi_BCM2835_GPIOs

>  		};
>  
>  		uart0: serial@7e201000 {
> -- 
> 1.8.3.1
> 
> 
> _______________________________________________
> linux-rpi-kernel mailing list
> linux-rpi-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rpi-kernel

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 4/8] ARM: dts: bcm283x: Add a new EMMC pin group from the downstream tree.
  2016-09-08  7:44     ` Gerd Hoffmann
  2016-09-08 12:06       ` Stefan Wahren
@ 2016-09-08 19:50       ` Scott Branden
  2016-09-09  6:58         ` Stefan Wahren
  1 sibling, 1 reply; 26+ messages in thread
From: Scott Branden @ 2016-09-08 19:50 UTC (permalink / raw)
  To: Gerd Hoffmann, Stefan Wahren
  Cc: linux-rpi-kernel, linux-arm-kernel, devicetree, Scott Branden,
	Ray Jui, Russell King, open list, Rob Herring,
	bcm-kernel-feedback-list, Mark Rutland, Florian Fainelli

Hi Gerd/Eric

On 16-09-08 12:44 AM, Gerd Hoffmann wrote:
> On Mi, 2016-09-07 at 20:13 +0200, Stefan Wahren wrote:
>>> Gerd Hoffmann <kraxel@redhat.com> hat am 7. September 2016 um 12:31
>>> geschrieben:
>>>
>>>
>>> From: Eric Anholt <eric@anholt.net>
>>>
>>> This will be used for having EMMC (sdhci-bcm2835.c) drive the
>>> wireless.
>>
>> sdhci-bcm2835.c has been replaced by sdhci-iproc.c
>
> Ah, right, I'll update the commit msg for v2.
>
Should we entirely remove sdhci-bcm2835.c to reduce confusion going forward?

>> How about adding pull defines to include/dt-bindings/pinctrl/bcm2835.h?
>
> Already there (or do you mean something other than '#define
> BCM2835_FSEL_*' ?)
>
> cheers,
>   Gerd
>

Thanks,
  Scott

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 4/8] ARM: dts: bcm283x: Add a new EMMC pin group from the downstream tree.
  2016-09-08 19:50       ` Scott Branden
@ 2016-09-09  6:58         ` Stefan Wahren
  2016-09-09 16:37           ` Scott Branden
  0 siblings, 1 reply; 26+ messages in thread
From: Stefan Wahren @ 2016-09-09  6:58 UTC (permalink / raw)
  To: Scott Branden, Gerd Hoffmann
  Cc: linux-rpi-kernel, linux-arm-kernel, devicetree, Scott Branden,
	Ray Jui, Russell King, open list, Rob Herring,
	bcm-kernel-feedback-list, Mark Rutland, Florian Fainelli

Hi Scott,

Am 08.09.2016 um 21:50 schrieb Scott Branden:
> Hi Gerd/Eric
>
> On 16-09-08 12:44 AM, Gerd Hoffmann wrote:
>> On Mi, 2016-09-07 at 20:13 +0200, Stefan Wahren wrote:
>>>> Gerd Hoffmann <kraxel@redhat.com> hat am 7. September 2016 um 12:31
>>>> geschrieben:
>>>>
>>>>
>>>> From: Eric Anholt <eric@anholt.net>
>>>>
>>>> This will be used for having EMMC (sdhci-bcm2835.c) drive the
>>>> wireless.
>>>
>>> sdhci-bcm2835.c has been replaced by sdhci-iproc.c
>>
>> Ah, right, I'll update the commit msg for v2.
>>
> Should we entirely remove sdhci-bcm2835.c to reduce confusion going
> forward?

did i missed something?

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=46cd175c9788e39a1c57698ab58f34844d216428

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7eb16493ecaa41ceeb448717ee2c59690cd9047f


>
>>> How about adding pull defines to include/dt-bindings/pinctrl/bcm2835.h?
>>
>> Already there (or do you mean something other than '#define
>> BCM2835_FSEL_*' ?)
>>
>> cheers,
>>   Gerd
>>
>
> Thanks,
>  Scott

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 4/8] ARM: dts: bcm283x: Add a new EMMC pin group from the downstream tree.
  2016-09-08 12:06       ` Stefan Wahren
@ 2016-09-09  8:26         ` Gerd Hoffmann
  2016-09-09  8:47           ` Gerd Hoffmann
  0 siblings, 1 reply; 26+ messages in thread
From: Gerd Hoffmann @ 2016-09-09  8:26 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Mark Rutland, devicetree, Florian Fainelli, Scott Branden,
	Ray Jui, Russell King, open list, Rob Herring,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-arm-kernel

  Hi,

> No, i thought of the GPIO pull up/down register values:
> 
> BCM2835_PUD_OFF 0
> BCM2835_PUD_DOWN 1
> BCM2835_PUD_UP 2

We can do that, sure (and probably drop the unused "enum
bcm2835_pinconf_pull" from drivers/pinctrl/bcm/pinctrl-bcm2835.c at the
same time).

But I fail to see how this is related to the patch discussed, looks like
a independent issue to me ...

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 4/8] ARM: dts: bcm283x: Add a new EMMC pin group from the downstream tree.
  2016-09-09  8:26         ` Gerd Hoffmann
@ 2016-09-09  8:47           ` Gerd Hoffmann
  0 siblings, 0 replies; 26+ messages in thread
From: Gerd Hoffmann @ 2016-09-09  8:47 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Mark Rutland, devicetree, Florian Fainelli, Scott Branden,
	Ray Jui, Russell King, open list, Rob Herring,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-arm-kernel

On Fr, 2016-09-09 at 10:26 +0200, Gerd Hoffmann wrote:
>   Hi,
> 
> > No, i thought of the GPIO pull up/down register values:
> > 
> > BCM2835_PUD_OFF 0
> > BCM2835_PUD_DOWN 1
> > BCM2835_PUD_UP 2
> 
> We can do that, sure (and probably drop the unused "enum
> bcm2835_pinconf_pull" from drivers/pinctrl/bcm/pinctrl-bcm2835.c at the
> same time).
> 
> But I fail to see how this is related to the patch discussed, looks like
> a independent issue to me ...

Oops, noticed that emmc_gpio34 uses them while ordering all the entries.

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 1/8] ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node.
  2016-09-08 17:55   ` Stefan Wahren
@ 2016-09-09  9:05     ` Gerd Hoffmann
  2016-09-09 14:12       ` Stefan Wahren
  2016-09-09 21:20       ` Eric Anholt
  0 siblings, 2 replies; 26+ messages in thread
From: Gerd Hoffmann @ 2016-09-09  9:05 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: linux-rpi-kernel, linux-arm-kernel, devicetree, Scott Branden,
	Ray Jui, Russell King, open list, Rob Herring,
	bcm-kernel-feedback-list, Mark Rutland, Florian Fainelli

  Hi,

> According to this page [1] the pinctrl group for parallel display interface is
> missing. Is it intended?
> 
> [1] - http://elinux.org/RPi_BCM2835_GPIOs

Just an oversight I guess.  Eric?

Does this look correct?

+                       dpi_gpio4: dpi_gpio4 {
+                               brcm,pins = <4 5 6 7 8 9 10 11 12 13
+                                            14 15 16 17 18 19 20 21
+                                            22 23 24 25 26 27>;
+                               brcm,function = <BCM2835_FSEL_ALT2>;
+                       };

thanks,
  Gerd

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 1/8] ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node.
  2016-09-09  9:05     ` Gerd Hoffmann
@ 2016-09-09 14:12       ` Stefan Wahren
  2016-09-09 21:20       ` Eric Anholt
  1 sibling, 0 replies; 26+ messages in thread
From: Stefan Wahren @ 2016-09-09 14:12 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Mark Rutland, devicetree, Florian Fainelli, Scott Branden,
	Ray Jui, Russell King, open list, Rob Herring,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-arm-kernel

Am 09.09.2016 um 11:05 schrieb Gerd Hoffmann:
>   Hi,
>
>> According to this page [1] the pinctrl group for parallel display interface is
>> missing. Is it intended?
>>
>> [1] - http://elinux.org/RPi_BCM2835_GPIOs
> Just an oversight I guess.  Eric?
>
> Does this look correct?
>
> +                       dpi_gpio4: dpi_gpio4 {
> +                               brcm,pins = <4 5 6 7 8 9 10 11 12 13
> +                                            14 15 16 17 18 19 20 21
> +                                            22 23 24 25 26 27>;
> +                               brcm,function = <BCM2835_FSEL_ALT2>;
> +                       };

According to the wiki and the website [1] it starts at gpio 0

[1] -
https://www.raspberrypi.org/documentation/hardware/raspberrypi/dpi/README.md

>
> thanks,
>   Gerd
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 4/8] ARM: dts: bcm283x: Add a new EMMC pin group from the downstream tree.
  2016-09-09  6:58         ` Stefan Wahren
@ 2016-09-09 16:37           ` Scott Branden
  0 siblings, 0 replies; 26+ messages in thread
From: Scott Branden @ 2016-09-09 16:37 UTC (permalink / raw)
  To: Stefan Wahren, Gerd Hoffmann
  Cc: linux-rpi-kernel, linux-arm-kernel, devicetree, Scott Branden,
	Ray Jui, Russell King, open list, Rob Herring,
	bcm-kernel-feedback-list, Mark Rutland, Florian Fainelli

Hi Stefan,

On 16-09-08 11:58 PM, Stefan Wahren wrote:
> Hi Scott,
>
> Am 08.09.2016 um 21:50 schrieb Scott Branden:
>> Hi Gerd/Eric
>>
>> On 16-09-08 12:44 AM, Gerd Hoffmann wrote:
>>> On Mi, 2016-09-07 at 20:13 +0200, Stefan Wahren wrote:
>>>>> Gerd Hoffmann <kraxel@redhat.com> hat am 7. September 2016 um 12:31
>>>>> geschrieben:
>>>>>
>>>>>
>>>>> From: Eric Anholt <eric@anholt.net>
>>>>>
>>>>> This will be used for having EMMC (sdhci-bcm2835.c) drive the
>>>>> wireless.
>>>>
>>>> sdhci-bcm2835.c has been replaced by sdhci-iproc.c
>>>
>>> Ah, right, I'll update the commit msg for v2.
>>>
>> Should we entirely remove sdhci-bcm2835.c to reduce confusion going
>> forward?
>
> did i missed something?
No - looks like I did.  Everything is cleaned up in latest.
>
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=46cd175c9788e39a1c57698ab58f34844d216428
>
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7eb16493ecaa41ceeb448717ee2c59690cd9047f
>
>
>>
>>>> How about adding pull defines to include/dt-bindings/pinctrl/bcm2835.h?
>>>
>>> Already there (or do you mean something other than '#define
>>> BCM2835_FSEL_*' ?)
>>>
>>> cheers,
>>>   Gerd
>>>
>>
>> Thanks,
>>  Scott
>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 1/8] ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node.
  2016-09-09  9:05     ` Gerd Hoffmann
  2016-09-09 14:12       ` Stefan Wahren
@ 2016-09-09 21:20       ` Eric Anholt
  2016-09-11 21:22         ` Dave Stevenson
  1 sibling, 1 reply; 26+ messages in thread
From: Eric Anholt @ 2016-09-09 21:20 UTC (permalink / raw)
  To: Gerd Hoffmann, Stefan Wahren
  Cc: linux-rpi-kernel, linux-arm-kernel, devicetree, Scott Branden,
	Ray Jui, Russell King, open list, Rob Herring,
	bcm-kernel-feedback-list, Mark Rutland, Florian Fainelli

e<#secure method=pgpmime mode=sign>
Gerd Hoffmann <kraxel@redhat.com> writes:

>   Hi,
>
>> According to this page [1] the pinctrl group for parallel display interface is
>> missing. Is it intended?
>> 
>> [1] - http://elinux.org/RPi_BCM2835_GPIOs
>
> Just an oversight I guess.  Eric?
>
> Does this look correct?
>
> +                       dpi_gpio4: dpi_gpio4 {
> +                               brcm,pins = <4 5 6 7 8 9 10 11 12 13
> +                                            14 15 16 17 18 19 20 21
> +                                            22 23 24 25 26 27>;
> +                               brcm,function = <BCM2835_FSEL_ALT2>;
> +                       };

For DPI, you also need pins 0-3 in there for clock and syncs.

That set of data pins would be for a 24-bit mode, which is what we
should be using for the Adafruit kippah + 7" panel combo.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 4/8] ARM: dts: bcm283x: Add a new EMMC pin group from the downstream tree.
  2016-09-07 18:13   ` Stefan Wahren
  2016-09-08  7:44     ` Gerd Hoffmann
@ 2016-09-09 21:22     ` Eric Anholt
  1 sibling, 0 replies; 26+ messages in thread
From: Eric Anholt @ 2016-09-09 21:22 UTC (permalink / raw)
  To: Stefan Wahren, Gerd Hoffmann, linux-rpi-kernel, linux-arm-kernel,
	devicetree
  Cc: Scott Branden, Ray Jui, Russell King, open list, Rob Herring,
	bcm-kernel-feedback-list, Mark Rutland, Florian Fainelli

[-- Attachment #1: Type: text/plain, Size: 1099 bytes --]

Stefan Wahren <stefan.wahren@i2se.com> writes:

>> Gerd Hoffmann <kraxel@redhat.com> hat am 7. September 2016 um 12:31
>> geschrieben:
>> 
>> 
>> From: Eric Anholt <eric@anholt.net>
>> 
>> This will be used for having EMMC (sdhci-bcm2835.c) drive the
>> wireless.
>
> sdhci-bcm2835.c has been replaced by sdhci-iproc.c
>
>> 
>> Signed-off-by: Eric Anholt <eric@anholt.net>
>> ---
>>  arch/arm/boot/dts/bcm283x.dtsi | 5 +++++
>>  1 file changed, 5 insertions(+)
>> 
>> diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
>> index 062d09db..b6b1950 100644
>> --- a/arch/arm/boot/dts/bcm283x.dtsi
>> +++ b/arch/arm/boot/dts/bcm283x.dtsi
>> @@ -257,6 +257,11 @@
>>  				brcm,pins = <32 33>;
>>  				brcm,function = <BCM2835_FSEL_ALT3>;
>>  			};
>> +			emmc_gpio34: emmc_gpio34 {
>> +				brcm,pins = <34 35 36 37 38 39>;
>> +				brcm,function = <BCM2835_FSEL_ALT3>;
>> +				brcm,pull = <0 2 2 2 2 2>;
>
> How about adding pull defines to include/dt-bindings/pinctrl/bcm2835.h?

A fine idea, but it should not be a requirement for this series.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 1/8] ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node.
  2016-09-09 21:20       ` Eric Anholt
@ 2016-09-11 21:22         ` Dave Stevenson
  2016-09-13  6:09           ` Eric Anholt
  0 siblings, 1 reply; 26+ messages in thread
From: Dave Stevenson @ 2016-09-11 21:22 UTC (permalink / raw)
  To: Eric Anholt, Gerd Hoffmann, Stefan Wahren
  Cc: Mark Rutland, devicetree, Florian Fainelli, Scott Branden,
	Ray Jui, Russell King, open list, Rob Herring,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-arm-kernel

On 09/09/16 22:20, Eric Anholt wrote:
> e<#secure method=pgpmime mode=sign>
> Gerd Hoffmann <kraxel@redhat.com> writes:
>
>>    Hi,
>>
>>> According to this page [1] the pinctrl group for parallel display interface is
>>> missing. Is it intended?
>>>
>>> [1] - http://elinux.org/RPi_BCM2835_GPIOs
>> Just an oversight I guess.  Eric?
>>
>> Does this look correct?
>>
>> +                       dpi_gpio4: dpi_gpio4 {
>> +                               brcm,pins = <4 5 6 7 8 9 10 11 12 13
>> +                                            14 15 16 17 18 19 20 21
>> +                                            22 23 24 25 26 27>;
>> +                               brcm,function = <BCM2835_FSEL_ALT2>;
>> +                       };
> For DPI, you also need pins 0-3 in there for clock and syncs.
>
> That set of data pins would be for a 24-bit mode, which is what we
> should be using for the Adafruit kippah + 7" panel combo.
The Kippah is only 18bit, RGB666.
https://www.adafruit.com/products/2454
"The pins used are GPIO 2 through 21 inclusive. That means you don't get 
the UART RX/TX pins (no console cable) and you don't get the standard 
user I2C pins, the EEPROM I2C pins, or hardware SPI pins. You do get to 
use pins #22, #23, #24, #25, #26 and #27, and the USB ports are fine to 
use too."

On the forum there are some that report they have used DPI in RGB888, 
but they're not using the Kippah. I had mentioned this to Phil E that 
there should be a dpi18 overlay, but not got around to sorting that.

>
> _______________________________________________
> linux-rpi-kernel mailing list
> linux-rpi-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rpi-kernel
>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 1/8] ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node.
  2016-09-11 21:22         ` Dave Stevenson
@ 2016-09-13  6:09           ` Eric Anholt
  0 siblings, 0 replies; 26+ messages in thread
From: Eric Anholt @ 2016-09-13  6:09 UTC (permalink / raw)
  To: Dave Stevenson, Gerd Hoffmann, Stefan Wahren
  Cc: Mark Rutland, devicetree, Florian Fainelli, Scott Branden,
	Ray Jui, Russell King, open list, Rob Herring,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1622 bytes --]

Dave Stevenson <linux-rpi-kernel@destevenson.freeserve.co.uk> writes:

> On 09/09/16 22:20, Eric Anholt wrote:
>> e<#secure method=pgpmime mode=sign>
>> Gerd Hoffmann <kraxel@redhat.com> writes:
>>
>>>    Hi,
>>>
>>>> According to this page [1] the pinctrl group for parallel display interface is
>>>> missing. Is it intended?
>>>>
>>>> [1] - http://elinux.org/RPi_BCM2835_GPIOs
>>> Just an oversight I guess.  Eric?
>>>
>>> Does this look correct?
>>>
>>> +                       dpi_gpio4: dpi_gpio4 {
>>> +                               brcm,pins = <4 5 6 7 8 9 10 11 12 13
>>> +                                            14 15 16 17 18 19 20 21
>>> +                                            22 23 24 25 26 27>;
>>> +                               brcm,function = <BCM2835_FSEL_ALT2>;
>>> +                       };
>> For DPI, you also need pins 0-3 in there for clock and syncs.
>>
>> That set of data pins would be for a 24-bit mode, which is what we
>> should be using for the Adafruit kippah + 7" panel combo.
> The Kippah is only 18bit, RGB666.
> https://www.adafruit.com/products/2454
> "The pins used are GPIO 2 through 21 inclusive. That means you don't get 
> the UART RX/TX pins (no console cable) and you don't get the standard 
> user I2C pins, the EEPROM I2C pins, or hardware SPI pins. You do get to 
> use pins #22, #23, #24, #25, #26 and #27, and the USB ports are fine to 
> use too."

I was confused because my pinctrl was set up for 18, but the panel
driver for it is set up for 24.  It looks like 18 is right, so I should
probably correct the panel driver.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2016-09-13 15:32 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1473244289-20728-1-git-send-email-kraxel@redhat.com>
2016-09-07 10:31 ` [PATCH 1/8] ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node Gerd Hoffmann
2016-09-07 18:09   ` Stefan Wahren
2016-09-07 18:50     ` Eric Anholt
2016-09-08  7:48       ` Gerd Hoffmann
2016-09-08 17:55   ` Stefan Wahren
2016-09-09  9:05     ` Gerd Hoffmann
2016-09-09 14:12       ` Stefan Wahren
2016-09-09 21:20       ` Eric Anholt
2016-09-11 21:22         ` Dave Stevenson
2016-09-13  6:09           ` Eric Anholt
2016-09-07 10:31 ` [PATCH 2/8] ARM: dts: bcm283x: Add the emmc pin group to bcm283x.dtsi Gerd Hoffmann
2016-09-07 10:31 ` [PATCH 3/8] ARM: dts: bcm283x: Add a group for mapping pins 48-53 to sdhost Gerd Hoffmann
2016-09-07 10:31 ` [PATCH 4/8] ARM: dts: bcm283x: Add a new EMMC pin group from the downstream tree Gerd Hoffmann
2016-09-07 18:13   ` Stefan Wahren
2016-09-08  7:44     ` Gerd Hoffmann
2016-09-08 12:06       ` Stefan Wahren
2016-09-09  8:26         ` Gerd Hoffmann
2016-09-09  8:47           ` Gerd Hoffmann
2016-09-08 19:50       ` Scott Branden
2016-09-09  6:58         ` Stefan Wahren
2016-09-09 16:37           ` Scott Branden
2016-09-09 21:22     ` Eric Anholt
2016-09-07 10:31 ` [PATCH 5/8] ARM: dts: bcm283x: add pinctrl group to &pwm, drop pins from &gpio Gerd Hoffmann
2016-09-07 10:31 ` [PATCH 6/8] ARM: dts: bcm283x: add pinctrl group to &i2c0, " Gerd Hoffmann
2016-09-07 10:31 ` [PATCH 7/8] ARM: dts: bcm283x: add pinctrl group to &i2c1, " Gerd Hoffmann
2016-09-07 10:31 ` [PATCH 8/8] ARM: dts: bcm283x: add pinctrl group to &sdhci, " Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).