219 lines
		
	
	
		
			7.6 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			219 lines
		
	
	
		
			7.6 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| From patchwork Sun Jan 29 18:40:59 2017
 | |
| Content-Type: text/plain; charset="utf-8"
 | |
| MIME-Version: 1.0
 | |
| Content-Transfer-Encoding: 7bit
 | |
| Subject: [v2] ARM: bcm2835: dts: fix uart0 pinctrl node names
 | |
| From: Baruch Siach <baruch@tkos.co.il>
 | |
| X-Patchwork-Id: 9544261
 | |
| Message-Id: <f37d02c769d0e2b6db2529cafb86b5fdd1e09a94.1485715259.git.baruch@tkos.co.il>
 | |
| To: Stephen Warren <swarren@wwwdotorg.org>, Lee Jones <lee@kernel.org>,
 | |
|  Eric Anholt <eric@anholt.net>
 | |
| Cc: Baruch Siach <baruch@tkos.co.il>, linux-rpi-kernel@lists.infradead.org, 
 | |
|  linux-arm-kernel@lists.infradead.org
 | |
| Date: Sun, 29 Jan 2017 20:40:59 +0200
 | |
| 
 | |
| Downstream kernel uses pins 32, 33 as UART0 (PL011) Rx/Tx to communicate with
 | |
| the Bluetooth chip. So ALT3 of these pins is most likely not CTS/RTS. Change
 | |
| the node name to reflect that. This matches section 6.2 "Alternative Function
 | |
| Assignments" in the BCM2835 ARM Peripherals document.
 | |
| 
 | |
| With this change in place, adding
 | |
| 
 | |
|   &uart0 {
 | |
| 	 pinctrl-names = "default";
 | |
| 	 pinctrl-0 = <&uart0_gpio32 &gpclk2_gpio43>;
 | |
| 	 status = "okay";
 | |
|   };
 | |
| 
 | |
| to bcm2837-rpi-3-b.dts does the right thing on my Raspberry Pi 3.
 | |
| 
 | |
| Pins 30, 31 are CTS/RTS of UART0 in alternate function 3. Rename uart0_gpio30
 | |
| as well.
 | |
| 
 | |
| While at it, fix a little typo in a nearby comment.
 | |
| 
 | |
| Fixes: 21ff843931b ("ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node.")
 | |
| Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
 | |
| Signed-off-by: Baruch Siach <baruch@tkos.co.il>
 | |
| Reviewed-by: Eric Anholt <eric@anholt.net>
 | |
| ---
 | |
| v2:
 | |
|    * Reference the ARM Peripherals document
 | |
|    * Fix subject typo (Stefan)
 | |
|    * Rename also uart0_gpio30 (Stefan)
 | |
|    * Add comment typo fix (Stefan)
 | |
|    * Add Stefan's ack
 | |
| ---
 | |
|  arch/arm/boot/dts/bcm283x.dtsi | 6 +++---
 | |
|  1 file changed, 3 insertions(+), 3 deletions(-)
 | |
| 
 | |
| diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
 | |
| index 9a44da190897..bc8ad417c8a3 100644
 | |
| --- a/arch/arm/boot/dts/bcm283x.dtsi
 | |
| +++ b/arch/arm/boot/dts/bcm283x.dtsi
 | |
| @@ -292,17 +292,17 @@
 | |
|  			/* Separate from the uart0_gpio14 group
 | |
|  			 * because it conflicts with spi1_gpio16, and
 | |
|  			 * people often run uart0 on the two pins
 | |
| -			 * without flow contrl.
 | |
| +			 * without flow control.
 | |
|  			 */
 | |
|  			uart0_ctsrts_gpio16: uart0_ctsrts_gpio16 {
 | |
|  				brcm,pins = <16 17>;
 | |
|  				brcm,function = <BCM2835_FSEL_ALT3>;
 | |
|  			};
 | |
| -			uart0_gpio30: uart0_gpio30 {
 | |
| +			uart0_ctsrts_gpio30: uart0_ctsrts_gpio30 {
 | |
|  				brcm,pins = <30 31>;
 | |
|  				brcm,function = <BCM2835_FSEL_ALT3>;
 | |
|  			};
 | |
| -			uart0_ctsrts_gpio32: uart0_ctsrts_gpio32 {
 | |
| +			uart0_gpio32: uart0_gpio32 {
 | |
|  				brcm,pins = <32 33>;
 | |
|  				brcm,function = <BCM2835_FSEL_ALT3>;
 | |
|  			};
 | |
| From patchwork Sun Jan 29 19:53:10 2017
 | |
| Content-Type: text/plain; charset="utf-8"
 | |
| MIME-Version: 1.0
 | |
| Content-Transfer-Encoding: 7bit
 | |
| Subject: [1/2] ARM: bcm2835: dts: fix i2c0 pins
 | |
| From: Baruch Siach <baruch@tkos.co.il>
 | |
| X-Patchwork-Id: 9544275
 | |
| Message-Id: <9290fa9eed6b5ff1c5c96b9dac41eca286b7eef9.1485719591.git.baruch@tkos.co.il>
 | |
| To: Stephen Warren <swarren@wwwdotorg.org>, Lee Jones <lee@kernel.org>,
 | |
|  Eric Anholt <eric@anholt.net>
 | |
| Cc: Baruch Siach <baruch@tkos.co.il>, linux-rpi-kernel@lists.infradead.org, 
 | |
|  linux-arm-kernel@lists.infradead.org
 | |
| Date: Sun, 29 Jan 2017 21:53:10 +0200
 | |
| 
 | |
| According to the BCM2835 ARM Peripherals document i2c0 doesn't map to pins 32,
 | |
| 34 but to 28, 29.
 | |
| 
 | |
| Fixes: 21ff843931b ("ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node.")
 | |
| Signed-off-by: Baruch Siach <baruch@tkos.co.il>
 | |
| ---
 | |
|  arch/arm/boot/dts/bcm283x.dtsi | 4 ++--
 | |
|  1 file changed, 2 insertions(+), 2 deletions(-)
 | |
| 
 | |
| diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
 | |
| index bc8ad417c8a3..2ae842921250 100644
 | |
| --- a/arch/arm/boot/dts/bcm283x.dtsi
 | |
| +++ b/arch/arm/boot/dts/bcm283x.dtsi
 | |
| @@ -195,8 +195,8 @@
 | |
|  				brcm,pins = <0 1>;
 | |
|  				brcm,function = <BCM2835_FSEL_ALT0>;
 | |
|  			};
 | |
| -			i2c0_gpio32: i2c0_gpio32 {
 | |
| -				brcm,pins = <32 34>;
 | |
| +			i2c0_gpio28: i2c0_gpio28 {
 | |
| +				brcm,pins = <28 29>;
 | |
|  				brcm,function = <BCM2835_FSEL_ALT0>;
 | |
|  			};
 | |
|  			i2c0_gpio44: i2c0_gpio44 {
 | |
| From patchwork Sun Jan 29 19:53:11 2017
 | |
| Content-Type: text/plain; charset="utf-8"
 | |
| MIME-Version: 1.0
 | |
| Content-Transfer-Encoding: 7bit
 | |
| Subject: [2/2] ARM: bcm2835: dts: fix uart0/uart1 pins
 | |
| From: Baruch Siach <baruch@tkos.co.il>
 | |
| X-Patchwork-Id: 9544277
 | |
| Message-Id: <e0f527a24b0048daba88ef36d5324245e003111c.1485719591.git.baruch@tkos.co.il>
 | |
| To: Stephen Warren <swarren@wwwdotorg.org>, Lee Jones <lee@kernel.org>,
 | |
|  Eric Anholt <eric@anholt.net>
 | |
| Cc: Baruch Siach <baruch@tkos.co.il>, linux-rpi-kernel@lists.infradead.org, 
 | |
|  linux-arm-kernel@lists.infradead.org
 | |
| Date: Sun, 29 Jan 2017 21:53:11 +0200
 | |
| 
 | |
| According to the BCM2835 ARM Peripherals document uart1 doesn't map to pins
 | |
| 36-39, but uart0 does.
 | |
| 
 | |
| Also, split into separate Rx/Tx and CST/RTS groups to match other uart nodes.
 | |
| 
 | |
| Fixes: 21ff843931b ("ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node.")
 | |
| Signed-off-by: Baruch Siach <baruch@tkos.co.il>
 | |
| ---
 | |
|  arch/arm/boot/dts/bcm283x.dtsi | 12 ++++++++----
 | |
|  1 file changed, 8 insertions(+), 4 deletions(-)
 | |
| 
 | |
| diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
 | |
| index 2ae842921250..9ee8346b8b19 100644
 | |
| --- a/arch/arm/boot/dts/bcm283x.dtsi
 | |
| +++ b/arch/arm/boot/dts/bcm283x.dtsi
 | |
| @@ -306,6 +306,14 @@
 | |
|  				brcm,pins = <32 33>;
 | |
|  				brcm,function = <BCM2835_FSEL_ALT3>;
 | |
|  			};
 | |
| +			uart0_gpio36: uart0_gpio36 {
 | |
| +				brcm,pins = <36 37>;
 | |
| +				brcm,function = <BCM2835_FSEL_ALT2>;
 | |
| +			};
 | |
| +			uart0_ctsrts_gpio38: uart0_ctsrts_gpio38 {
 | |
| +				brcm,pins = <38 39>;
 | |
| +				brcm,function = <BCM2835_FSEL_ALT2>;
 | |
| +			};
 | |
|  
 | |
|  			uart1_gpio14: uart1_gpio14 {
 | |
|  				brcm,pins = <14 15>;
 | |
| @@ -323,10 +331,6 @@
 | |
|  				brcm,pins = <30 31>;
 | |
|  				brcm,function = <BCM2835_FSEL_ALT5>;
 | |
|  			};
 | |
| -			uart1_gpio36: uart1_gpio36 {
 | |
| -				brcm,pins = <36 37 38 39>;
 | |
| -				brcm,function = <BCM2835_FSEL_ALT2>;
 | |
| -			};
 | |
|  			uart1_gpio40: uart1_gpio40 {
 | |
|  				brcm,pins = <40 41>;
 | |
|  				brcm,function = <BCM2835_FSEL_ALT5>;
 | |
| From patchwork Mon Jan 30 18:44:39 2017
 | |
| Content-Type: text/plain; charset="utf-8"
 | |
| MIME-Version: 1.0
 | |
| Content-Transfer-Encoding: 7bit
 | |
| Subject: ARM: bcm2835: dt: add index to the ethernet alias
 | |
| From: Baruch Siach <baruch@tkos.co.il>
 | |
| X-Patchwork-Id: 9545945
 | |
| Message-Id: <5942321c5d0bfea54eac64ace2b217e8e0b6220d.1485801879.git.baruch@tkos.co.il>
 | |
| To: Stephen Warren <swarren@wwwdotorg.org>, Lee Jones <lee@kernel.org>,
 | |
|  Eric Anholt <eric@anholt.net>
 | |
| Cc: Lubomir Rintel <lkundrak@v3.sk>, Baruch Siach <baruch@tkos.co.il>,
 | |
|  linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org
 | |
| Date: Mon, 30 Jan 2017 20:44:39 +0200
 | |
| 
 | |
| An alias name should have an index number even when it is the only of its type.
 | |
| This allows U-Boot to add the local-mac-address property. Otherwise U-Boot
 | |
| skips the alias.
 | |
| 
 | |
| Cc: Lubomir Rintel <lkundrak@v3.sk>
 | |
| Fixes: 6a93792774 ("ARM: bcm2835: dt: Add the ethernet to the device trees")
 | |
| Signed-off-by: Baruch Siach <baruch@tkos.co.il>
 | |
| Acked-by: Lubomir Rintel <lkundrak@v3.sk>
 | |
| ---
 | |
|  arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi | 2 +-
 | |
|  arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi | 2 +-
 | |
|  2 files changed, 2 insertions(+), 2 deletions(-)
 | |
| 
 | |
| diff --git a/arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi b/arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi
 | |
| index 12c981e51134..9a0599f711ff 100644
 | |
| --- a/arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi
 | |
| +++ b/arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi
 | |
| @@ -1,6 +1,6 @@
 | |
|  / {
 | |
|  	aliases {
 | |
| -		ethernet = ðernet;
 | |
| +		ethernet0 = ðernet;
 | |
|  	};
 | |
|  };
 | |
|  
 | |
| diff --git a/arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi b/arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
 | |
| index 3f0a56ebcf1f..dc7ae776db5f 100644
 | |
| --- a/arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
 | |
| +++ b/arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
 | |
| @@ -1,6 +1,6 @@
 | |
|  / {
 | |
|  	aliases {
 | |
| -		ethernet = ðernet;
 | |
| +		ethernet0 = ðernet;
 | |
|  	};
 | |
|  };
 | |
|  
 |