Message ID | 1407770874-12749-15-git-send-email-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Simon Glass |
Headers | show |
On 08/11/2014 09:27 AM, Simon Glass wrote: > Some Tegra device tree files do not include information about the serial > ports. Add this and also add information about the input clock speed. > > The console alias needs to be set up to indicate which port is used for > the console. > > Also add a binding file since this is missing. > diff --git a/arch/arm/dts/tegra114-dalmore.dts b/arch/arm/dts/tegra114-dalmore.dts > aliases { > + console = &uart_d; Did the use of "console" get OK'd on the devicetree mailing list then? I know we have this bug in the kernel DTs, but let's fix it here: phandle values should have <> around them: console = <&uart_d>; > diff --git a/arch/arm/dts/tegra114.dtsi b/arch/arm/dts/tegra114.dtsi > + uart_a: serial@70006000 { > + compatible = "nvidia,tegra20-uart"; > + reg = <0x70006000 0x40>; > + reg-shift = <2>; > + interrupts = < 68 >; > + }; In order to prevent the kernel and U-Boot DT files from diverging, can you copy the entire DT content from the kernel rather than just a subset, i.e.: uarta: serial@70006000 { compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart"; reg = <0x70006000 0x40>; reg-shift = <2>; interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; clocks = <&tegra_car TEGRA114_CLK_UARTA>; resets = <&tegra_car 6>; reset-names = "serial"; dmas = <&apbdma 8>, <&apbdma 8>; dma-names = "rx", "tx"; status = "disabled"; };
Hi Stephen, On 15 August 2014 11:10, Stephen Warren <swarren@wwwdotorg.org> wrote: > On 08/11/2014 09:27 AM, Simon Glass wrote: >> >> Some Tegra device tree files do not include information about the serial >> ports. Add this and also add information about the input clock speed. >> >> The console alias needs to be set up to indicate which port is used for >> the console. >> >> Also add a binding file since this is missing. > > >> diff --git a/arch/arm/dts/tegra114-dalmore.dts >> b/arch/arm/dts/tegra114-dalmore.dts > > >> aliases { >> + console = &uart_d; > > > Did the use of "console" get OK'd on the devicetree mailing list then? No, not yet. I copied on you the thread. I'm not necessarily expecting a response. > > I know we have this bug in the kernel DTs, but let's fix it here: phandle > values should have <> around them: > > console = <&uart_d>; This is not a phandle though. Are you wanting to change that? > >> diff --git a/arch/arm/dts/tegra114.dtsi b/arch/arm/dts/tegra114.dtsi > > >> + uart_a: serial@70006000 { >> + compatible = "nvidia,tegra20-uart"; >> + reg = <0x70006000 0x40>; >> + reg-shift = <2>; >> + interrupts = < 68 >; >> + }; > > > In order to prevent the kernel and U-Boot DT files from diverging, can you > copy the entire DT content from the kernel rather than just a subset, i.e.: > > uarta: serial@70006000 { > compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart"; > > reg = <0x70006000 0x40>; > reg-shift = <2>; > interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; > clocks = <&tegra_car TEGRA114_CLK_UARTA>; > resets = <&tegra_car 6>; > reset-names = "serial"; > dmas = <&apbdma 8>, <&apbdma 8>; > dma-names = "rx", "tx"; > status = "disabled"; > }; OK, that's probably a good idea even if U-Boot doesn't use it. Will need the include files also. Regards, Simon
On 08/15/2014 11:25 AM, Simon Glass wrote: > Hi Stephen, > > On 15 August 2014 11:10, Stephen Warren <swarren@wwwdotorg.org> wrote: >> On 08/11/2014 09:27 AM, Simon Glass wrote: >>> >>> Some Tegra device tree files do not include information about the serial >>> ports. Add this and also add information about the input clock speed. >>> >>> The console alias needs to be set up to indicate which port is used for >>> the console. >>> >>> Also add a binding file since this is missing. >> >> >>> diff --git a/arch/arm/dts/tegra114-dalmore.dts >>> b/arch/arm/dts/tegra114-dalmore.dts >> >> >>> aliases { >>> + console = &uart_d; >> >> >> Did the use of "console" get OK'd on the devicetree mailing list then? > > No, not yet. I copied on you the thread. I'm not necessarily expecting > a response. > >> >> I know we have this bug in the kernel DTs, but let's fix it here: phandle >> values should have <> around them: >> >> console = <&uart_d>; > > This is not a phandle though. Are you wanting to change that? The & syntax is a phandle isn't it? Or does plain &label expand to a string? If it does, then ignore my comment.
Hi Stephen, On 15 August 2014 11:29, Stephen Warren <swarren@wwwdotorg.org> wrote: > On 08/15/2014 11:25 AM, Simon Glass wrote: >> >> Hi Stephen, >> >> On 15 August 2014 11:10, Stephen Warren <swarren@wwwdotorg.org> wrote: >>> >>> On 08/11/2014 09:27 AM, Simon Glass wrote: >>>> >>>> >>>> Some Tegra device tree files do not include information about the serial >>>> ports. Add this and also add information about the input clock speed. >>>> >>>> The console alias needs to be set up to indicate which port is used for >>>> the console. >>>> >>>> Also add a binding file since this is missing. >>> >>> >>> >>>> diff --git a/arch/arm/dts/tegra114-dalmore.dts >>>> b/arch/arm/dts/tegra114-dalmore.dts >>> >>> >>> >>>> aliases { >>>> + console = &uart_d; >>> >>> >>> >>> Did the use of "console" get OK'd on the devicetree mailing list then? >> >> >> No, not yet. I copied on you the thread. I'm not necessarily expecting >> a response. >> >>> >>> I know we have this bug in the kernel DTs, but let's fix it here: phandle >>> values should have <> around them: >>> >>> console = <&uart_d>; >> >> >> This is not a phandle though. Are you wanting to change that? > > > The & syntax is a phandle isn't it? Or does plain &label expand to a string? > If it does, then ignore my comment. Yes that's a string - it confused me also...nice feature though. Regards, Simon
diff --git a/arch/arm/dts/tegra114-dalmore.dts b/arch/arm/dts/tegra114-dalmore.dts index 435c01e..e2426ef 100644 --- a/arch/arm/dts/tegra114-dalmore.dts +++ b/arch/arm/dts/tegra114-dalmore.dts @@ -7,6 +7,7 @@ compatible = "nvidia,dalmore", "nvidia,tegra114"; aliases { + console = &uart_d; i2c0 = "/i2c@7000d000"; i2c1 = "/i2c@7000c000"; i2c2 = "/i2c@7000c400"; diff --git a/arch/arm/dts/tegra114.dtsi b/arch/arm/dts/tegra114.dtsi index 59434e0..5f29ded 100644 --- a/arch/arm/dts/tegra114.dtsi +++ b/arch/arm/dts/tegra114.dtsi @@ -116,6 +116,41 @@ status = "disabled"; }; + uart_a: serial@70006000 { + compatible = "nvidia,tegra20-uart"; + reg = <0x70006000 0x40>; + reg-shift = <2>; + interrupts = < 68 >; + }; + + uart_b: serial@70006040 { + compatible = "nvidia,tegra20-uart"; + reg = <0x70006040 0x40>; + reg-shift = <2>; + interrupts = < 69 >; + }; + + uart_c: serial@70006200 { + compatible = "nvidia,tegra20-uart"; + reg = <0x70006200 0x100>; + reg-shift = <2>; + interrupts = < 78 >; + }; + + uart_d: serial@70006300 { + compatible = "nvidia,tegra20-uart"; + reg = <0x70006300 0x100>; + reg-shift = <2>; + interrupts = < 122 >; + }; + + uart_e: serial@70006400 { + compatible = "nvidia,tegra20-uart"; + reg = <0x70006400 0x100>; + reg-shift = <2>; + interrupts = < 123 >; + }; + spi@7000d400 { compatible = "nvidia,tegra114-spi"; reg = <0x7000d400 0x200>; diff --git a/arch/arm/dts/tegra124-jetson-tk1.dts b/arch/arm/dts/tegra124-jetson-tk1.dts index 464287e..368caaa 100644 --- a/arch/arm/dts/tegra124-jetson-tk1.dts +++ b/arch/arm/dts/tegra124-jetson-tk1.dts @@ -7,6 +7,7 @@ compatible = "nvidia,jetson-tk1", "nvidia,tegra124"; aliases { + console = &uart_d; i2c0 = "/i2c@7000d000"; i2c1 = "/i2c@7000c000"; i2c2 = "/i2c@7000c400"; diff --git a/arch/arm/dts/tegra124-venice2.dts b/arch/arm/dts/tegra124-venice2.dts index f003413..4444155 100644 --- a/arch/arm/dts/tegra124-venice2.dts +++ b/arch/arm/dts/tegra124-venice2.dts @@ -7,6 +7,7 @@ compatible = "nvidia,venice2", "nvidia,tegra124"; aliases { + console = &uart_a; i2c0 = "/i2c@7000d000"; i2c1 = "/i2c@7000c000"; i2c2 = "/i2c@7000c400"; diff --git a/arch/arm/dts/tegra124.dtsi b/arch/arm/dts/tegra124.dtsi index 4561c5f..bd26227 100644 --- a/arch/arm/dts/tegra124.dtsi +++ b/arch/arm/dts/tegra124.dtsi @@ -126,6 +126,41 @@ status = "disabled"; }; + uart_a: serial@70006000 { + compatible = "nvidia,tegra20-uart"; + reg = <0x70006000 0x40>; + reg-shift = <2>; + interrupts = < 68 >; + }; + + uart_b: serial@70006040 { + compatible = "nvidia,tegra20-uart"; + reg = <0x70006040 0x40>; + reg-shift = <2>; + interrupts = < 69 >; + }; + + uart_c: serial@70006200 { + compatible = "nvidia,tegra20-uart"; + reg = <0x70006200 0x100>; + reg-shift = <2>; + interrupts = < 78 >; + }; + + uart_d: serial@70006300 { + compatible = "nvidia,tegra20-uart"; + reg = <0x70006300 0x100>; + reg-shift = <2>; + interrupts = < 122 >; + }; + + uart_e: serial@70006400 { + compatible = "nvidia,tegra20-uart"; + reg = <0x70006400 0x100>; + reg-shift = <2>; + interrupts = < 123 >; + }; + spi@7000d400 { compatible = "nvidia,tegra124-spi", "nvidia,tegra114-spi"; reg = <0x7000d400 0x200>; diff --git a/arch/arm/dts/tegra20-colibri_t20_iris.dts b/arch/arm/dts/tegra20-colibri_t20_iris.dts index c0e54af..fdf966b 100644 --- a/arch/arm/dts/tegra20-colibri_t20_iris.dts +++ b/arch/arm/dts/tegra20-colibri_t20_iris.dts @@ -7,6 +7,7 @@ compatible = "toradex,t20", "nvidia,tegra20"; aliases { + console = &uart_a; usb0 = "/usb@c5008000"; usb1 = "/usb@c5000000"; usb2 = "/usb@c5004000"; diff --git a/arch/arm/dts/tegra20-harmony.dts b/arch/arm/dts/tegra20-harmony.dts index b115f87..565045b 100644 --- a/arch/arm/dts/tegra20-harmony.dts +++ b/arch/arm/dts/tegra20-harmony.dts @@ -7,6 +7,7 @@ compatible = "nvidia,harmony", "nvidia,tegra20"; aliases { + console = &uart_d; usb0 = "/usb@c5008000"; usb1 = "/usb@c5004000"; sdhci0 = "/sdhci@c8000600"; diff --git a/arch/arm/dts/tegra20-medcom-wide.dts b/arch/arm/dts/tegra20-medcom-wide.dts index a9a07f9..b400ce8 100644 --- a/arch/arm/dts/tegra20-medcom-wide.dts +++ b/arch/arm/dts/tegra20-medcom-wide.dts @@ -7,6 +7,7 @@ compatible = "ad,medcom-wide", "nvidia,tegra20"; aliases { + console = &uart_d; usb0 = "/usb@c5008000"; sdhci0 = "/sdhci@c8000600"; }; diff --git a/arch/arm/dts/tegra20-paz00.dts b/arch/arm/dts/tegra20-paz00.dts index 780203c..95b1ed4 100644 --- a/arch/arm/dts/tegra20-paz00.dts +++ b/arch/arm/dts/tegra20-paz00.dts @@ -7,6 +7,7 @@ compatible = "compal,paz00", "nvidia,tegra20"; aliases { + console = &uart_a; usb0 = "/usb@c5008000"; sdhci0 = "/sdhci@c8000600"; sdhci1 = "/sdhci@c8000000"; diff --git a/arch/arm/dts/tegra20-plutux.dts b/arch/arm/dts/tegra20-plutux.dts index 20016f2..a4ec20f 100644 --- a/arch/arm/dts/tegra20-plutux.dts +++ b/arch/arm/dts/tegra20-plutux.dts @@ -7,6 +7,7 @@ compatible = "ad,plutux", "nvidia,tegra20"; aliases { + console = &uart_d; usb0 = "/usb@c5008000"; sdhci0 = "/sdhci@c8000600"; }; diff --git a/arch/arm/dts/tegra20-seaboard.dts b/arch/arm/dts/tegra20-seaboard.dts index c0e2e1e..85d485a 100644 --- a/arch/arm/dts/tegra20-seaboard.dts +++ b/arch/arm/dts/tegra20-seaboard.dts @@ -11,6 +11,7 @@ }; aliases { + console = &uart_d; /* This defines the order of our ports */ usb0 = "/usb@c5008000"; usb1 = "/usb@c5000000"; diff --git a/arch/arm/dts/tegra20-tec.dts b/arch/arm/dts/tegra20-tec.dts index 4c1b08d..0e06100 100644 --- a/arch/arm/dts/tegra20-tec.dts +++ b/arch/arm/dts/tegra20-tec.dts @@ -7,6 +7,7 @@ compatible = "ad,tec", "nvidia,tegra20"; aliases { + console = &uart_d; usb0 = "/usb@c5008000"; sdhci0 = "/sdhci@c8000600"; }; diff --git a/arch/arm/dts/tegra20-trimslice.dts b/arch/arm/dts/tegra20-trimslice.dts index ee31476..4506e8a 100644 --- a/arch/arm/dts/tegra20-trimslice.dts +++ b/arch/arm/dts/tegra20-trimslice.dts @@ -7,6 +7,7 @@ compatible = "compulab,trimslice", "nvidia,tegra20"; aliases { + console = &uart_a; usb0 = "/usb@c5008000"; usb1 = "/usb@c5000000"; sdhci0 = "/sdhci@c8000600"; diff --git a/arch/arm/dts/tegra20-ventana.dts b/arch/arm/dts/tegra20-ventana.dts index 1a526ba..61b45f3 100644 --- a/arch/arm/dts/tegra20-ventana.dts +++ b/arch/arm/dts/tegra20-ventana.dts @@ -7,6 +7,7 @@ compatible = "nvidia,ventana", "nvidia,tegra20"; aliases { + console = &uart_d; usb0 = "/usb@c5008000"; sdhci0 = "/sdhci@c8000600"; sdhci1 = "/sdhci@c8000400"; diff --git a/arch/arm/dts/tegra20-whistler.dts b/arch/arm/dts/tegra20-whistler.dts index eb92264..6eb68b5 100644 --- a/arch/arm/dts/tegra20-whistler.dts +++ b/arch/arm/dts/tegra20-whistler.dts @@ -7,6 +7,7 @@ compatible = "nvidia,whistler", "nvidia,tegra20"; aliases { + console = &uart_a; i2c0 = "/i2c@7000d000"; usb0 = "/usb@c5008000"; sdhci0 = "/sdhci@c8000600"; diff --git a/arch/arm/dts/tegra20.dtsi b/arch/arm/dts/tegra20.dtsi index a524f6e..0f263b6 100644 --- a/arch/arm/dts/tegra20.dtsi +++ b/arch/arm/dts/tegra20.dtsi @@ -189,35 +189,35 @@ dma-channel = < 1 >; }; - serial@70006000 { + uart_a: serial@70006000 { compatible = "nvidia,tegra20-uart"; reg = <0x70006000 0x40>; reg-shift = <2>; interrupts = < 68 >; }; - serial@70006040 { + uart_b: serial@70006040 { compatible = "nvidia,tegra20-uart"; reg = <0x70006040 0x40>; reg-shift = <2>; interrupts = < 69 >; }; - serial@70006200 { + uart_c: serial@70006200 { compatible = "nvidia,tegra20-uart"; reg = <0x70006200 0x100>; reg-shift = <2>; interrupts = < 78 >; }; - serial@70006300 { + uart_d: serial@70006300 { compatible = "nvidia,tegra20-uart"; reg = <0x70006300 0x100>; reg-shift = <2>; interrupts = < 122 >; }; - serial@70006400 { + uart_e: serial@70006400 { compatible = "nvidia,tegra20-uart"; reg = <0x70006400 0x100>; reg-shift = <2>; diff --git a/arch/arm/dts/tegra30-beaver.dts b/arch/arm/dts/tegra30-beaver.dts index 85e62e9..79a9fff 100644 --- a/arch/arm/dts/tegra30-beaver.dts +++ b/arch/arm/dts/tegra30-beaver.dts @@ -7,6 +7,7 @@ compatible = "nvidia,beaver", "nvidia,tegra30"; aliases { + console = &uart_a; i2c0 = "/i2c@7000d000"; i2c1 = "/i2c@7000c000"; i2c2 = "/i2c@7000c400"; diff --git a/arch/arm/dts/tegra30-cardhu.dts b/arch/arm/dts/tegra30-cardhu.dts index ea2cf76..3f829ba 100644 --- a/arch/arm/dts/tegra30-cardhu.dts +++ b/arch/arm/dts/tegra30-cardhu.dts @@ -7,6 +7,7 @@ compatible = "nvidia,cardhu", "nvidia,tegra30"; aliases { + console = &uart_a; i2c0 = "/i2c@7000d000"; i2c1 = "/i2c@7000c000"; i2c2 = "/i2c@7000c400"; diff --git a/arch/arm/dts/tegra30-tamonten.dtsi b/arch/arm/dts/tegra30-tamonten.dtsi index 50d5762..e9ed61c 100644 --- a/arch/arm/dts/tegra30-tamonten.dtsi +++ b/arch/arm/dts/tegra30-tamonten.dtsi @@ -9,6 +9,7 @@ }; aliases { + console = &uart_d; i2c0 = "/i2c@7000c000"; i2c1 = "/i2c@7000c700"; i2c2 = "/i2c@7000c400"; diff --git a/arch/arm/dts/tegra30.dtsi b/arch/arm/dts/tegra30.dtsi index 7be3791..e903d25 100644 --- a/arch/arm/dts/tegra30.dtsi +++ b/arch/arm/dts/tegra30.dtsi @@ -122,6 +122,41 @@ status = "disabled"; }; + uart_a: serial@70006000 { + compatible = "nvidia,tegra20-uart"; + reg = <0x70006000 0x40>; + reg-shift = <2>; + interrupts = < 68 >; + }; + + uart_b: serial@70006040 { + compatible = "nvidia,tegra20-uart"; + reg = <0x70006040 0x40>; + reg-shift = <2>; + interrupts = < 69 >; + }; + + uart_c: serial@70006200 { + compatible = "nvidia,tegra20-uart"; + reg = <0x70006200 0x100>; + reg-shift = <2>; + interrupts = < 78 >; + }; + + uart_d: serial@70006300 { + compatible = "nvidia,tegra20-uart"; + reg = <0x70006300 0x100>; + reg-shift = <2>; + interrupts = < 122 >; + }; + + uart_e: serial@70006400 { + compatible = "nvidia,tegra20-uart"; + reg = <0x70006400 0x100>; + reg-shift = <2>; + interrupts = < 123 >; + }; + spi@7000d400 { compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink"; reg = <0x7000d400 0x200>;
Some Tegra device tree files do not include information about the serial ports. Add this and also add information about the input clock speed. The console alias needs to be set up to indicate which port is used for the console. Also add a binding file since this is missing. Signed-off-by: Simon Glass <sjg@chromium.org> --- Changes in v4: - Remove 'clock-frequency' property from serial nodes Changes in v3: - Add new patch for tegra serial port details Changes in v2: None arch/arm/dts/tegra114-dalmore.dts | 1 + arch/arm/dts/tegra114.dtsi | 35 +++++++++++++++++++++++++++++++ arch/arm/dts/tegra124-jetson-tk1.dts | 1 + arch/arm/dts/tegra124-venice2.dts | 1 + arch/arm/dts/tegra124.dtsi | 35 +++++++++++++++++++++++++++++++ arch/arm/dts/tegra20-colibri_t20_iris.dts | 1 + arch/arm/dts/tegra20-harmony.dts | 1 + arch/arm/dts/tegra20-medcom-wide.dts | 1 + arch/arm/dts/tegra20-paz00.dts | 1 + arch/arm/dts/tegra20-plutux.dts | 1 + arch/arm/dts/tegra20-seaboard.dts | 1 + arch/arm/dts/tegra20-tec.dts | 1 + arch/arm/dts/tegra20-trimslice.dts | 1 + arch/arm/dts/tegra20-ventana.dts | 1 + arch/arm/dts/tegra20-whistler.dts | 1 + arch/arm/dts/tegra20.dtsi | 10 ++++----- arch/arm/dts/tegra30-beaver.dts | 1 + arch/arm/dts/tegra30-cardhu.dts | 1 + arch/arm/dts/tegra30-tamonten.dtsi | 1 + arch/arm/dts/tegra30.dtsi | 35 +++++++++++++++++++++++++++++++ 20 files changed, 126 insertions(+), 5 deletions(-)