diff mbox

ARM: bcm2835: add label for uart0

Message ID 1443810675-25558-1-git-send-email-stefan.wahren@i2se.com (mailing list archive)
State New, archived
Headers show

Commit Message

Stefan Wahren Oct. 2, 2015, 6:31 p.m. UTC
This patch adds a label for uart0 to allow changing of uart0 pins.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 arch/arm/boot/dts/bcm2835.dtsi |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Anholt Oct. 6, 2015, 9:53 p.m. UTC | #1
Stefan Wahren <stefan.wahren@i2se.com> writes:

> This patch adds a label for uart0 to allow changing of uart0 pins.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>

This patch seems innocuous, but could you clarify for me how exactly you
change the uart0 pins, and why one would do that?
Stephen Warren Oct. 7, 2015, 2:26 a.m. UTC | #2
On 10/06/2015 03:53 PM, Eric Anholt wrote:
> Stefan Wahren <stefan.wahren@i2se.com> writes:
> 
>> This patch adds a label for uart0 to allow changing of uart0
>> pins.
>> 
>> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> 
> This patch seems innocuous, but could you clarify for me how
> exactly you change the uart0 pins, and why one would do that?

I /assume/ this is so that some other DT file (that includes the
edited file) can add some pinctrl-related properties to this DT node,
using syntax such as:

&uart0 {
    new content;
};

If so, the patch,
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Stefan Wahren Oct. 7, 2015, 6:47 a.m. UTC | #3
Am 07.10.2015 um 04:26 schrieb Stephen Warren:
> On 10/06/2015 03:53 PM, Eric Anholt wrote:
>> Stefan Wahren <stefan.wahren@i2se.com> writes:
>>
>>> This patch adds a label for uart0 to allow changing of uart0
>>> pins.
>>>
>>> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
>> This patch seems innocuous, but could you clarify for me how
>> exactly you change the uart0 pins, and why one would do that?
> I /assume/ this is so that some other DT file (that includes the
> edited file) can add some pinctrl-related properties to this DT node,
> using syntax such as:
>
> &uart0 {
>     new content;
> };
>
> If so, the patch,
> Acked-by: Stephen Warren <swarren@wwwdotorg.org>

Your assumption is correct. In case the UART should be used on a custom
board with Raspberry Pi Compute Module and a microcontroller this change
is necessary to reference the UART:

&gpio {
  // ...

  uart0_pins: uart0_pins {
    brcm,pins = <36 37>;
    brcm,function = <BCM2835_FSEL_ALT2>;
  };
}

&uart0 {
  pinctrl-names = "default";
  pinctrl-0 = <&uart0_pins>;
  status = "okay";
};

Thanks

Stefan
Eric Anholt Oct. 15, 2015, 12:33 a.m. UTC | #4
Stefan Wahren <stefan.wahren@i2se.com> writes:

> This patch adds a label for uart0 to allow changing of uart0 pins.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>

Pulled to bcm2835-dt-next with Stephen's ack.
diff mbox

Patch

diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi
index 301c73f..2029394 100644
--- a/arch/arm/boot/dts/bcm2835.dtsi
+++ b/arch/arm/boot/dts/bcm2835.dtsi
@@ -92,7 +92,7 @@ 
 			#interrupt-cells = <2>;
 		};
 
-		uart@7e201000 {
+		uart0: uart@7e201000 {
 			compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell";
 			reg = <0x7e201000 0x1000>;
 			interrupts = <2 25>;