Skip to contentSkip to conversation

ARM: dts: add support for Turris Omnia

PATCH New Uwe Kleine-König 6 participants 28 messages Nov 25, 2016 – Nov 28, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v5 cover ARM: dts: add support for Turris Omnia

Hello,

This is basicly my v3 plus some of the changes that Tomas changed for his RFC patch (implicitly "v4"). So compared to v3 the following changed:

- Add more documentation (mostly from Tomas)
- Add more mbus ranges (by Tomas)
- Move link to schematic below copyright header (suggested by Andrew)
- reenable rtc as this is not that broken on production board
- fix spi chip select pinmuxing

Uwe Kleine-K?nig (2):
devicetree: Add vendor prefix for CZ.NIC
ARM: dts: add support for Turris Omnia

 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 arch/arm/boot/dts/Makefile                         |   1 +
 arch/arm/boot/dts/armada-385-turris-omnia.dts      | 334 +++++++++++++++++++++
 3 files changed, 336 insertions(+)
 create mode 100644 arch/arm/boot/dts/armada-385-turris-omnia.dts
Signature · 1 line
2.10.2
#1 lore raw

PATCH v5 1/2 devicetree: Add vendor prefix for CZ.NIC

---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
index f0a48ea78659..ae9fce9fed03 100644
@@ -67,6 +67,7 @@ creative	Creative Technology Ltd
 crystalfontz	Crystalfontz America, Inc.
 cubietech	Cubietech, Ltd.
 cypress	Cypress Semiconductor Corporation
+cznic	CZ.NIC, z.s.p.o.
 dallas	Maxim Integrated Products (formerly Dallas Semiconductor)
 davicom	DAVICOM Semiconductor, Inc.
 delta	Delta Electronics, Inc.
Signature · 1 line
2.10.2
#2 lore raw

PATCH v5 1/2 devicetree: Add vendor prefix for CZ.NIC

Hi Uwe,

Quoted 1 line · Uwe Kleine-K?nig

Applied on mvebu/dt and I added back the Acked-by from Rob Herring.

Thanks,

Gregory

Quoted 19 lines
---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
index f0a48ea78659..ae9fce9fed03 100644
@@ -67,6 +67,7 @@ creative	Creative Technology Ltd
 crystalfontz	Crystalfontz America, Inc.
 cubietech	Cubietech, Ltd.
 cypress	Cypress Semiconductor Corporation
+cznic	CZ.NIC, z.s.p.o.
 dallas	Maxim Integrated Products (formerly Dallas Semiconductor)
 davicom	DAVICOM Semiconductor, Inc.
 delta	Delta Electronics, Inc.
Signature · 1 line
2.10.2
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#3 lore raw

PATCH v5 2/2 ARM: dts: add support for Turris Omnia

In reply to Uwe Kleine-König

This machine is an open hardware router by cz.nic driven by a Marvell Armada 385.

---
 arch/arm/boot/dts/Makefile                    |   1 +
 arch/arm/boot/dts/armada-385-turris-omnia.dts | 334 ++++++++++++++++++++++++++
 2 files changed, 335 insertions(+)
 create mode 100644 arch/arm/boot/dts/armada-385-turris-omnia.dts
arch/arm/boot/dts/Makefile +1 -0
index befcd2619902..f1d3b9ff257e 100644
@@ -920,6 +920,7 @@ dtb-$(CONFIG_MACH_ARMADA_38X) += \
 	armada-385-db-ap.dtb \
 	armada-385-linksys-caiman.dtb \
 	armada-385-linksys-cobra.dtb \
+	armada-385-turris-omnia.dtb \
 	armada-388-clearfog.dtb \
 	armada-388-db.dtb \
 	armada-388-gp.dtb \
arch/arm/boot/dts/armada-385-turris-omnia.dts new file +334 -0

334 lines not on this page · raw message

Signature · 1 line
2.10.2
#5 lore raw

PATCH v5 2/2 ARM: dts: add support for Turris Omnia

In reply to Uwe Kleine-König

Hi Uwe,

Quoted 4 lines · Uwe Kleine-K?nig

This machine is an open hardware router by cz.nic driven by a Marvell Armada 385.

Applied on mvebu/dt with few changes:

First I added the SoB from Thomas Hlavacek you initially planed to add as seen on IRC.

The other change I did are mentioned inline.

Thanks,

Gregory

[...]

arch/arm/boot/dts/armada-385-turris-omnia.dts line 307

Quoted 12 lines

+&spi0 {

arch/arm/boot/dts/armada-385-turris-omnia.dts new file +11 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_pins &spi0cs0_pins>;
+	status = "okay";
+
+	spi-nor at 0 {
+		compatible = "spansion,s25fl164k", "jedec,spi-nor";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		reg = <0>;
+		spi-max-frequency = <40000000>;
+

+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
it is mandatory since v4.4 to use this pattern for partitions.

arch/arm/boot/dts/armada-385-turris-omnia.dts line 313

Quoted 6 lines
arch/arm/boot/dts/armada-385-turris-omnia.dts new file +6 -0
+		partition at 0 {
+			reg = <0x0 0x00100000>;
+			label = "U-Boot";
+		};
+
+		partition at 1 {
                         @0x100000

We should use the reg value here ^

arch/arm/boot/dts/armada-385-turris-omnia.dts line 316

Quoted 3 lines
arch/arm/boot/dts/armada-385-turris-omnia.dts new file +3 -0
+			reg = <0x00100000 0x00700000>;
+			label = "Rescue system";
+		};

+ };

Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#6 lore raw

PATCH v5 2/2 ARM: dts: add support for Turris Omnia

Am 25.11.2016 um 17:16 schrieb Gregory CLEMENT:

Quoted 7 lines · Uwe Kleine-K?nig
Quoted 4 lines

This machine is an open hardware router by cz.nic driven by a Marvell Armada 385.

Applied on mvebu/dt with few changes:

[...]

Quoted 22 lines
Quoted 12 lines

+&spi0 {

arch/arm/boot/dts/armada-385-turris-omnia.dts new file +11 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_pins &spi0cs0_pins>;
+	status = "okay";
+
+	spi-nor at 0 {
+		compatible = "spansion,s25fl164k", "jedec,spi-nor";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		reg = <0>;
+		spi-max-frequency = <40000000>;
+
arch/arm/boot/dts/armada-385-turris-omnia.dts new file +6 -0
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+

it is mandatory since v4.4 to use this pattern for partitions.

Quoted 8 lines

arch/arm/boot/dts/armada-385-turris-omnia.dts line 313

Quoted 6 lines
arch/arm/boot/dts/armada-385-turris-omnia.dts new file +6 -0
+		partition at 0 {
+			reg = <0x0 0x00100000>;
+			label = "U-Boot";
+		};
+
+		partition at 1 {
                         @0x100000

We should use the reg value here ^

The unit name should be without 0x though. In your tree you seem to have it correctly.

@Uwe: Note that I had already told CZ.NIC's Michal ~two weeks ago that I have a WIP .dts for the Omnia - looks like no one knows what the other is doing. :( My branch includes cleanups for 385 .dtsi and bug fixes for the switch that I am not seeing in your series:

https://github.com/afaerber/linux/commits/omnia-next

I am still looking into phy backtraces when the network interfaces go down.

@Gregory: Can we please follow up with cleaning up these ugly internal-regs and pcie-controller nodes for consistency?

Regards,
Andreas

Quoted 5 lines

arch/arm/boot/dts/armada-385-turris-omnia.dts line 316

Quoted 3 lines
arch/arm/boot/dts/armada-385-turris-omnia.dts new file +3 -0
+			reg = <0x00100000 0x00700000>;
+			label = "Rescue system";
+		};

+ };

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
#7 lore raw

PATCH v5 2/2 ARM: dts: add support for Turris Omnia

Hallo Andreas,

Quoted 4 lines · Andreas F?rber

@Uwe: Note that I had already told CZ.NIC's Michal ~two weeks ago that I have a WIP .dts for the Omnia - looks like no one knows what the other is doing. :( My branch includes cleanups for 385 .dtsi and bug fixes for the switch that I am not seeing in your series:

I'm not in contact with a Michal at cz.nic.

Does the switch work in your setup with DSA?

Quoted 2 lines

@Gregory: Can we please follow up with cleaning up these ugly internal-regs and pcie-controller nodes for consistency?

I bet the answer will be: Please send your patches to lakml for review.

Best regards
Uwe

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161127/47a365dd/attachment.sig>

#8 lore raw

PATCH v5 2/2 ARM: dts: add support for Turris Omnia

Hi Uwe,

Am 27.11.2016 um 17:05 schrieb Uwe Kleine-K?nig:

Quoted 7 lines · Andreas F?rber
Quoted 4 lines

@Uwe: Note that I had already told CZ.NIC's Michal ~two weeks ago that I have a WIP .dts for the Omnia - looks like no one knows what the other is doing. :( My branch includes cleanups for 385 .dtsi and bug fixes for the switch that I am not seeing in your series:

I'm not in contact with a Michal at cz.nic.

Right, but you have a Bedricha in CC from the same company!

Quoted 1 line

Does the switch work in your setup with DSA?

Not really:

omnia:~ # ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group
default qlen 532
    link/ether d8:58:d7:00:61:70 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group
default qlen 532
    link/ether d8:58:d7:00:61:6e brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP
group default qlen 532
    link/ether d8:58:d7:00:61:6f brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.50/24 brd 192.168.1.255 scope global eth2
       valid_lft forever preferred_lft forever
    inet6 2003:86:6702:9f00:da58:d7ff:fe00:616f/64 scope global
mngtmpaddr dynamic
       valid_lft 7050sec preferred_lft 1650sec
    inet6 fe80::da58:d7ff:fe00:616f/64 scope link
       valid_lft forever preferred_lft forever
5: sit0 at NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1
    link/sit 0.0.0.0 brd 0.0.0.0
6: lan0 at eth1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state
DOWN group default qlen 1000
    link/ether d8:58:d7:00:61:6e brd ff:ff:ff:ff:ff:ff
7: lan1 at eth1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state
DOWN group default qlen 1000
    link/ether d8:58:d7:00:61:6e brd ff:ff:ff:ff:ff:ff
8: lan2 at eth1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state
DOWN group default qlen 1000
    link/ether d8:58:d7:00:61:6e brd ff:ff:ff:ff:ff:ff
9: lan3 at eth1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state
DOWN group default qlen 1000
    link/ether d8:58:d7:00:61:6e brd ff:ff:ff:ff:ff:ff
10: lan4 at eth1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state
DOWN group default qlen 1000
    link/ether d8:58:d7:00:61:6e brd ff:ff:ff:ff:ff:ff

I get some interfaces for the switch, but I've not been able to get them up/usable. Feel free to browse my commits, maybe I'm doing something stupid - I already tried with and without fixed links, but the driver seems to use only one of the two cpu links.

Regards,
Andreas

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
#9 lore raw

PATCH v5 2/2 ARM: dts: add support for Turris Omnia

Quoted 42 lines

omnia:~ # ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group
default qlen 532
    link/ether d8:58:d7:00:61:70 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group
default qlen 532
    link/ether d8:58:d7:00:61:6e brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP
group default qlen 532
    link/ether d8:58:d7:00:61:6f brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.50/24 brd 192.168.1.255 scope global eth2
       valid_lft forever preferred_lft forever
    inet6 2003:86:6702:9f00:da58:d7ff:fe00:616f/64 scope global
mngtmpaddr dynamic
       valid_lft 7050sec preferred_lft 1650sec
    inet6 fe80::da58:d7ff:fe00:616f/64 scope link
       valid_lft forever preferred_lft forever
5: sit0 at NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1
    link/sit 0.0.0.0 brd 0.0.0.0
6: lan0 at eth1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state
DOWN group default qlen 1000
    link/ether d8:58:d7:00:61:6e brd ff:ff:ff:ff:ff:ff
7: lan1 at eth1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state
DOWN group default qlen 1000
    link/ether d8:58:d7:00:61:6e brd ff:ff:ff:ff:ff:ff
8: lan2 at eth1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state
DOWN group default qlen 1000
    link/ether d8:58:d7:00:61:6e brd ff:ff:ff:ff:ff:ff
9: lan3 at eth1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state
DOWN group default qlen 1000
    link/ether d8:58:d7:00:61:6e brd ff:ff:ff:ff:ff:ff
10: lan4 at eth1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state
DOWN group default qlen 1000
    link/ether d8:58:d7:00:61:6e brd ff:ff:ff:ff:ff:ff
Quoted 2 lines

I get some interfaces for the switch, but I've not been able to get them up/usable.

ip link set eth1 up

Quoted 3 lines

Feel free to browse my commits, maybe I'm doing something stupid - I already tried with and without fixed links, but the driver seems to use only one of the two cpu links.

Correct, and this has been discussed on the thread about this board.

Andrew

#10 lore raw

PATCH 1/1 ARM: dts: mvebu: Add Armada 38x labels and clean up Turris Omnia

In reply to Uwe Kleine-König

To more consistently reference nodes by label, add labels for sata, usb2, sdhci and usb3 nodes.

Convert all other 38x boards for consistency. Add labels for nfc and rtc.

---
 arch/arm/boot/dts/armada-385-db-ap.dts             | 334 +++++++------
 arch/arm/boot/dts/armada-385-linksys-caiman.dts    |  98 ++--
 arch/arm/boot/dts/armada-385-linksys-cobra.dts     |  98 ++--
 arch/arm/boot/dts/armada-385-linksys.dtsi          | 294 ++++++-----
 arch/arm/boot/dts/armada-385-turris-omnia.dts      |  97 ++--
 arch/arm/boot/dts/armada-385.dtsi                  |  20 +-
 arch/arm/boot/dts/armada-388-clearfog.dts          | 550 ++++++++++-----------
 arch/arm/boot/dts/armada-388-db.dts                | 236 ++++-----
 arch/arm/boot/dts/armada-388-gp.dts                | 403 ++++++++-------
 arch/arm/boot/dts/armada-388-rd.dts                | 115 +++--
 arch/arm/boot/dts/armada-388.dtsi                  |  19 +-
 .../arm/boot/dts/armada-38x-solidrun-microsom.dtsi | 111 ++---
 arch/arm/boot/dts/armada-38x.dtsi                  |  16 +-
 13 files changed, 1170 insertions(+), 1221 deletions(-)
arch/arm/boot/dts/armada-385-db-ap.dts +166 -168
index db5b9f6..9b67716 100644
@@ -63,174 +63,6 @@
 			  MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
 			  MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
 			  MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>;
-
-		internal-regs {
-			i2c0: i2c at 11000 {
-				pinctrl-names = "default";
-				pinctrl-0 = <&i2c0_pins>;
-				status = "okay";
-
-				/*
-				 * This bus is wired to two EEPROM
-				 * sockets, one of which holding the
-				 * board ID used by the	bootloader.
-				 * Erasing this EEPROM's content will
-				 * brick the board.
-				 * Use this bus with caution.
-				 */
-			};
-
-			mdio at 72004 {
-				pinctrl-names = "default";
-				pinctrl-0 = <&mdio_pins>;
-
-				phy0: ethernet-phy at 1 {
-					reg = <1>;
-				};
-
-				phy1: ethernet-phy at 4 {
-					reg = <4>;
-				};
-
-				phy2: ethernet-phy at 6 {
-					reg = <6>;
-				};
-			};
-
-			/* UART0 is exposed through the JP8 connector */
-			uart0: serial at 12000 {
-				pinctrl-names = "default";
-				pinctrl-0 = <&uart0_pins>;
-				status = "okay";
-			};
-
-			/*
-			 * UART1 is exposed through a FTDI chip
-			 * wired to the mini-USB connector
-			 */
-			uart1: serial at 12100 {
-				pinctrl-names = "default";
-				pinctrl-0 = <&uart1_pins>;
-				status = "okay";
-			};
-
-			pinctrl at 18000 {
-				xhci0_vbus_pins: xhci0-vbus-pins {
-					marvell,pins = "mpp44";
-					marvell,function = "gpio";
-				};
-			};
-
-			/* CON3 */
-			ethernet at 30000 {
-				status = "okay";
-				phy = <&phy2>;
-				phy-mode = "sgmii";
-				buffer-manager = <&bm>;
-				bm,pool-long = <1>;
-				bm,pool-short = <3>;
-			};
-
-			/* CON2 */
-			ethernet at 34000 {
-				status = "okay";
-				phy = <&phy1>;
-				phy-mode = "sgmii";
-				buffer-manager = <&bm>;
-				bm,pool-long = <2>;
-				bm,pool-short = <3>;
-			};
-
-			usb at 58000 {
-				status = "okay";
-			};
-
-			/* CON4 */
-			ethernet at 70000 {
-				pinctrl-names = "default";
-
-				/*
-				 * The Reference Clock 0 is used to
-				 * provide a clock to the PHY
-				 */
-				pinctrl-0 = <&ge0_rgmii_pins>, <&ref_clk0_pins>;
-				status = "okay";
-				phy = <&phy0>;
-				phy-mode = "rgmii-id";
-				buffer-manager = <&bm>;
-				bm,pool-long = <0>;
-				bm,pool-short = <3>;
-			};
-
-			bm at c8000 {
-				status = "okay";
-			};
-
-			nfc: flash at d0000 {
-				status = "okay";
-				num-cs = <1>;
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				partitions {
-					compatible = "fixed-partitions";
-					#address-cells = <1>;
-					#size-cells = <1>;
-
-					partition at 0 {
-						label = "U-Boot";
-						reg = <0x00000000 0x00800000>;
-						read-only;
-					};
-
-					partition at 800000 {
-						label = "uImage";
-						reg = <0x00800000 0x00400000>;
-						read-only;
-					};
-
-					partition at c00000 {
-						label = "Root";
-						reg = <0x00c00000 0x3f400000>;
-					};
-				};
-			};
-
-			usb3 at f0000 {
-				status = "okay";
-				usb-phy = <&usb3_phy>;
-			};
-		};
-
-		bm-bppi {
-			status = "okay";
-		};
-
-		pcie-controller {
-			status = "okay";
-
-			/*
-			 * The three PCIe units are accessible through
-			 * standard mini-PCIe slots on the board.
-			 */
-			pcie at 1,0 {
-				/* Port 0, Lane 0 */
-				status = "okay";
-			};
-
-			pcie at 2,0 {
-				/* Port 1, Lane 0 */
-				status = "okay";
-			};
-
-			pcie at 3,0 {
-				/* Port 2, Lane 0 */
-				status = "okay";
-			};
-		};
 	};
 
 	usb3_phy: usb3_phy {
@@ -250,6 +82,150 @@
 	};
 };
 
+&bm {
+	status = "okay";
+};
+
+&bm_bppi {
+	status = "okay";
+};
+
+&ehci {
+	status = "okay";
+};
+
+/* CON4 */
+&eth0 {
+	pinctrl-names = "default";
+
+	/*
+	 * The Reference Clock 0 is used to
+	 * provide a clock to the PHY
+	 */
+	pinctrl-0 = <&ge0_rgmii_pins>, <&ref_clk0_pins>;
+	status = "okay";
+	phy = <&phy0>;
+	phy-mode = "rgmii-id";
+	buffer-manager = <&bm>;
+	bm,pool-long = <0>;
+	bm,pool-short = <3>;
+};
+
+/* CON3 */
+&eth1 {
+	status = "okay";
+	phy = <&phy2>;
+	phy-mode = "sgmii";
+	buffer-manager = <&bm>;
+	bm,pool-long = <1>;
+	bm,pool-short = <3>;
+};
+
+/* CON2 */
+&eth2 {
+	status = "okay";
+	phy = <&phy1>;
+	phy-mode = "sgmii";
+	buffer-manager = <&bm>;
+	bm,pool-long = <2>;
+	bm,pool-short = <3>;
+};
+
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pins>;
+	status = "okay";
+
+	/*
+	 * This bus is wired to two EEPROM
+	 * sockets, one of which holding the
+	 * board ID used by the	bootloader.
+	 * Erasing this EEPROM's content will
+	 * brick the board.
+	 * Use this bus with caution.
+	 */
+};
+
+&mdio {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mdio_pins>;
+
+	phy0: ethernet-phy at 1 {
+		reg = <1>;
+	};
+
+	phy1: ethernet-phy at 4 {
+		reg = <4>;
+	};
+
+	phy2: ethernet-phy at 6 {
+		reg = <6>;
+	};
+};
+
+&nfc {
+	status = "okay";
+	num-cs = <1>;
+	nand-ecc-strength = <4>;
+	nand-ecc-step-size = <512>;
+	marvell,nand-keep-config;
+	marvell,nand-enable-arbiter;
+	nand-on-flash-bbt;
+
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition at 0 {
+			label = "U-Boot";
+			reg = <0x00000000 0x00800000>;
+			read-only;
+		};
+
+		partition at 800000 {
+			label = "uImage";
+			reg = <0x00800000 0x00400000>;
+			read-only;
+		};
+
+		partition at c00000 {
+			label = "Root";
+			reg = <0x00c00000 0x3f400000>;
+		};
+	};
+};
+
+&pcie {
+	status = "okay";
+};
+
+/*
+ * The three PCIe units are accessible through
+ * standard mini-PCIe slots on the board.
+ */
+&pcie1 {
+	/* Port 0, Lane 0 */
+	status = "okay";
+};
+
+&pcie2 {
+	/* Port 1, Lane 0 */
+	status = "okay";
+};
+
+&pcie3 {
+	/* Port 2, Lane 0 */
+	status = "okay";
+};
+
+&pinctrl {
+	xhci0_vbus_pins: xhci0-vbus-pins {
+		marvell,pins = "mpp44";
+		marvell,function = "gpio";
+	};
+};
+
 &spi1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&spi1_pins>;
@@ -263,3 +239,25 @@
 		spi-max-frequency = <54000000>;
 	};
 };
+
+/* UART0 is exposed through the JP8 connector */
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins>;
+	status = "okay";
+};
+
+/*
+ * UART1 is exposed through a FTDI chip
+ * wired to the mini-USB connector
+ */
+&uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart1_pins>;
+	status = "okay";
+};
+
+&xhci0 {
+	status = "okay";
+	usb-phy = <&usb3_phy>;
+};
arch/arm/boot/dts/armada-385-linksys-caiman.dts +43 -55

114 lines not on this page · raw message

arch/arm/boot/dts/armada-385-linksys-cobra.dts +43 -55

114 lines not on this page · raw message

arch/arm/boot/dts/armada-385-linksys.dtsi +146 -148

319 lines not on this page · raw message

arch/arm/boot/dts/armada-385-turris-omnia.dts +49 -48

120 lines not on this page · raw message

arch/arm/boot/dts/armada-385.dtsi +9 -11
index 8e67d2c..d3cd60c 100644
@@ -70,13 +70,7 @@
 	};
 
 	soc {
-		internal-regs {
-			pinctrl at 18000 {
-				compatible = "marvell,mv88f6820-pinctrl";
-			};
-		};
-
-		pcie-controller {
+		pcie: pcie-controller {
 			compatible = "marvell,armada-370-pcie";
 			status = "disabled";
 			device_type = "pci";
@@ -106,7 +100,7 @@
 			 * configured in x4 by the bootloader, then
 			 * pcie at 4,0 is not available.
 			 */
-			pcie at 1,0 {
+			pcie1: pcie at 1,0 {
 				device_type = "pci";
 				assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
 				reg = <0x0800 0 0 0 0>;
@@ -124,7 +118,7 @@
 			};
 
 			/* x1 port */
-			pcie at 2,0 {
+			pcie2: pcie at 2,0 {
 				device_type = "pci";
 				assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
 				reg = <0x1000 0 0 0 0>;
@@ -142,7 +136,7 @@
 			};
 
 			/* x1 port */
-			pcie at 3,0 {
+			pcie3: pcie at 3,0 {
 				device_type = "pci";
 				assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
 				reg = <0x1800 0 0 0 0>;
@@ -163,7 +157,7 @@
 			 * x1 port only available when pcie at 1,0 is
 			 * configured as a x1 port
 			 */
-			pcie at 4,0 {
+			pcie4: pcie at 4,0 {
 				device_type = "pci";
 				assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
 				reg = <0x2000 0 0 0 0>;
@@ -182,3 +176,7 @@
 		};
 	};
 };
+
+&pinctrl {
+	compatible = "marvell,mv88f6820-pinctrl";
+};
arch/arm/boot/dts/armada-388-clearfog.dts +274 -276

565 lines not on this page · raw message

arch/arm/boot/dts/armada-388-db.dts +118 -118

249 lines not on this page · raw message

arch/arm/boot/dts/armada-388-gp.dts +201 -202

424 lines not on this page · raw message

arch/arm/boot/dts/armada-388-rd.dts +56 -59

128 lines not on this page · raw message

arch/arm/boot/dts/armada-388.dtsi +3 -16
index 564fa59..1a7fc5d 100644
@@ -50,21 +50,8 @@
 	model = "Marvell Armada 388 family SoC";
 	compatible = "marvell,armada388", "marvell,armada385",
 		"marvell,armada380";
+};
 
-	soc {
-		internal-regs {
-			pinctrl at 18000 {
-				compatible = "marvell,mv88f6828-pinctrl";
-			};
-
-			sata at e0000 {
-				compatible = "marvell,armada-380-ahci";
-				reg = <0xe0000 0x2000>;
-				interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&gateclk 30>;
-				status = "disabled";
-			};
-
-		};
-	};
+&pinctrl {
+	compatible = "marvell,mv88f6828-pinctrl";
 };
arch/arm/boot/dts/armada-38x-solidrun-microsom.dtsi +54 -57

123 lines not on this page · raw message

arch/arm/boot/dts/armada-38x.dtsi +8 -8
index 7450e9f..25303b1 100644
@@ -451,7 +451,7 @@
 				status = "disabled";
 			};
 
-			usb at 58000 {
+			ehci: usb at 58000 {
 				compatible = "marvell,orion-ehci";
 				reg = <0x58000 0x500>;
 				interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
@@ -522,14 +522,14 @@
 				marvell,crypto-sram-size = <0x800>;
 			};
 
-			rtc at a3800 {
+			rtc: rtc at a3800 {
 				compatible = "marvell,armada-380-rtc";
 				reg = <0xa3800 0x20>, <0x184a0 0x0c>;
 				reg-names = "rtc", "rtc-soc";
 				interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
 			};
 
-			sata at a8000 {
+			ahci0: sata at a8000 {
 				compatible = "marvell,armada-380-ahci";
 				reg = <0xa8000 0x2000>;
 				interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
@@ -545,7 +545,7 @@
 				status = "disabled";
 			};
 
-			sata at e0000 {
+			ahci1: sata at e0000 {
 				compatible = "marvell,armada-380-ahci";
 				reg = <0xe0000 0x2000>;
 				interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
@@ -567,7 +567,7 @@
 				status = "okay";
 			};
 
-			flash at d0000 {
+			nfc: flash at d0000 {
 				compatible = "marvell,armada370-nand";
 				reg = <0xd0000 0x54>;
 				#address-cells = <1>;
@@ -577,7 +577,7 @@
 				status = "disabled";
 			};
 
-			sdhci at d8000 {
+			sdhci: sdhci at d8000 {
 				compatible = "marvell,armada-380-sdhci";
 				reg-names = "sdhci", "mbus", "conf-sdio3";
 				reg = <0xd8000 0x1000>,
@@ -589,7 +589,7 @@
 				status = "disabled";
 			};
 
-			usb3 at f0000 {
+			xhci0: usb3 at f0000 {
 				compatible = "marvell,armada-380-xhci";
 				reg = <0xf0000 0x4000>,<0xf4000 0x4000>;
 				interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
@@ -597,7 +597,7 @@
 				status = "disabled";
 			};
 
-			usb3 at f8000 {
+			xhci1: usb3 at f8000 {
 				compatible = "marvell,armada-380-xhci";
 				reg = <0xf8000 0x4000>,<0xfc000 0x4000>;
 				interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
2.6.6
#11 lore raw

Re: [PATCH] ARM: dts: mvebu: Add Armada 38x labels and clean up Turris Omnia

Am 27.11.2016 um 19:51 schrieb Andreas F?rber:

Quoted 2 lines

To more consistently reference nodes by label, add labels for sata, usb2, sdhci and usb3 nodes.

s/usb2/usb/ to be fully correct.

Quoted 19 lines

Convert all other 38x boards for consistency. Add labels for nfc and rtc.

---
 arch/arm/boot/dts/armada-385-db-ap.dts             | 334 +++++++------
 arch/arm/boot/dts/armada-385-linksys-caiman.dts    |  98 ++--
 arch/arm/boot/dts/armada-385-linksys-cobra.dts     |  98 ++--
 arch/arm/boot/dts/armada-385-linksys.dtsi          | 294 ++++++-----
 arch/arm/boot/dts/armada-385-turris-omnia.dts      |  97 ++--
 arch/arm/boot/dts/armada-385.dtsi                  |  20 +-
 arch/arm/boot/dts/armada-388-clearfog.dts          | 550 ++++++++++-----------
 arch/arm/boot/dts/armada-388-db.dts                | 236 ++++-----
 arch/arm/boot/dts/armada-388-gp.dts                | 403 ++++++++-------
 arch/arm/boot/dts/armada-388-rd.dts                | 115 +++--
 arch/arm/boot/dts/armada-388.dtsi                  |  19 +-
 .../arm/boot/dts/armada-38x-solidrun-microsom.dtsi | 111 ++---
 arch/arm/boot/dts/armada-38x.dtsi                  |  16 +-
 13 files changed, 1170 insertions(+), 1221 deletions(-)

[...]

Quoted 13 lines
arch/arm/boot/dts/armada-388.dtsi +1 -3
index 564fa59..1a7fc5d 100644
@@ -50,21 +50,8 @@
 	model = "Marvell Armada 388 family SoC";
 	compatible = "marvell,armada388", "marvell,armada385",
 		"marvell,armada380";
+};
 
-	soc {
-		internal-regs {
-			pinctrl at 18000 {

arch/arm/boot/dts/armada-388.dtsi line 66

Quoted 10 lines
arch/arm/boot/dts/armada-388.dtsi +0 -10
-				compatible = "marvell,mv88f6828-pinctrl";
-			};
-
-			sata at e0000 {
-				compatible = "marvell,armada-380-ahci";
-				reg = <0xe0000 0x2000>;
-				interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&gateclk 30>;
-				status = "disabled";
-			};

Note that this sata node is redundant with armada-38x.dtsi by my reading, therefore dropped.

arch/arm/boot/dts/armada-388.dtsi line 57

Quoted 6 lines
arch/arm/boot/dts/armada-388.dtsi +2 -3
-
-		};
-	};
+&pinctrl {
+	compatible = "marvell,mv88f6828-pinctrl";
 };

Regards,
Andreas

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
#12 lore raw

Re: [PATCH] ARM: dts: mvebu: Add Armada 38x labels and clean up Turris Omnia

In reply to Andreas Färber
Quoted 4 lines · Andreas F?rber

To more consistently reference nodes by label, add labels for sata, usb2, sdhci and usb3 nodes.

Convert all other 38x boards for consistency. Add labels for nfc and rtc.

Please don't do this for clearfog - there's changes in the pipeline which completely replace armada-388-clearfog.dts because there's a "base" and "pro" versions of this hardware now, and making such a huge change will effectively mean we have to start over with the DT files.

Signature · 3 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
#13 lore raw

Re: [PATCH] ARM: dts: mvebu: Add Armada 38x labels and clean up Turris Omnia

Hi Russell,

Am 28.11.2016 um 11:37 schrieb Russell King - ARM Linux:

Quoted 10 lines · Andreas F?rber
Quoted 4 lines

To more consistently reference nodes by label, add labels for sata, usb2, sdhci and usb3 nodes.

Convert all other 38x boards for consistency. Add labels for nfc and rtc.

Please don't do this for clearfog - there's changes in the pipeline which completely replace armada-388-clearfog.dts because there's a "base" and "pro" versions of this hardware now, and making such a huge change will effectively mean we have to start over with the DT files.

Would it help to split it back up into a series of add-labels, use-labels like I had originally? Then you could start using them in your refactoring as soon as the add-labels patch gets applied. Or are you completely against this style?

Thanks for pointing this out,

Andreas

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
#14 lore raw

Re: [PATCH] ARM: dts: mvebu: Add Armada 38x labels and clean up Turris Omnia

Hello,

Quoted 9 lines · Andreas F?rber
Quoted 4 lines

Please don't do this for clearfog - there's changes in the pipeline which completely replace armada-388-clearfog.dts because there's a "base" and "pro" versions of this hardware now, and making such a huge change will effectively mean we have to start over with the DT files.

Would it help to split it back up into a series of add-labels, use-labels like I had originally? Then you could start using them in your refactoring as soon as the add-labels patch gets applied. Or are you completely against this style?

I'd even go as far as:

1: add labels to .dtsi
2: use labels on .dts#1
3: use labels on .dts#2
...

Best regards
Uwe

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161128/10666366/attachment.sig>

#15 lore raw

Re: [PATCH] ARM: dts: mvebu: Add Armada 38x labels and clean up Turris Omnia

Hi,

Am 28.11.2016 um 11:54 schrieb Uwe Kleine-K?nig:

Quoted 6 lines · Andreas F?rber
Quoted 4 lines

Would it help to split it back up into a series of add-labels, use-labels like I had originally? Then you could start using them in your refactoring as soon as the add-labels patch gets applied. Or are you completely against this style?

Quoted 6 lines

I'd even go as far as:

1: add labels to .dtsi
2: use labels on .dts#1
3: use labels on .dts#2
...

That was what I had in mind. :) I even considered reusing the existing labels first, then adding more and converting more nodes.

Making the patches smaller will hopefully make them more easily reviewable at the same time.

Cheers,
Andreas

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
#16 lore raw

Re: [PATCH] ARM: dts: mvebu: Add Armada 38x labels and clean up Turris Omnia

In reply to Andreas Färber
Quoted 14 lines · Andreas F?rber

Hi Russell,

Am 28.11.2016 um 11:37 schrieb Russell King - ARM Linux:

Quoted 10 lines · Andreas F?rber
Quoted 4 lines

To more consistently reference nodes by label, add labels for sata, usb2, sdhci and usb3 nodes.

Convert all other 38x boards for consistency. Add labels for nfc and rtc.

Please don't do this for clearfog - there's changes in the pipeline which completely replace armada-388-clearfog.dts because there's a "base" and "pro" versions of this hardware now, and making such a huge change will effectively mean we have to start over with the DT files.

Quoted 4 lines

Would it help to split it back up into a series of add-labels, use-labels like I had originally? Then you could start using them in your refactoring as soon as the add-labels patch gets applied. Or are you completely against this style?

What I mentioned is not a case of a work in progress, it's already out in the wild, and completely changing the clearfog dts file by changing the style of DT references will make applying the changes _much_ more difficult - not only obviously impossible to apply the original patch, but also quite impossible to identify the changes made downstream.

So, I'd rather armada-388-clearfog.dts is not touched at all as it _will_ cause conflicts, but I have nothing against the new style (and I actually prefer it.)

What I'm asking is that you don't make other people's lives harder than they need to be.

Signature · 3 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
#17 lore raw

PATCH v5 2/2 ARM: dts: add support for Turris Omnia

In reply to Uwe Kleine-König

Am 27.11.2016 um 17:05 schrieb Uwe Kleine-K?nig:

Quoted 4 lines
Quoted 2 lines

@Gregory: Can we please follow up with cleaning up these ugly internal-regs and pcie-controller nodes for consistency?

I bet the answer will be: Please send your patches to lakml for review.

Done for the node labels, covering the complete set of 38x boards now.

Well, the implied question was: Why did no one point this out during review? We had that discussion for 3700 and 7k/8k already.

Cheers,
Andreas

Signature · 11 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161127/a5465465/attachment.sig>
#18 lore raw

PATCH v5 2/2 ARM: dts: add support for Turris Omnia

In reply to Andreas Färber
Quoted 3 lines

@Uwe: Note that I had already told CZ.NIC's Michal ~two weeks ago that I have a WIP .dts for the Omnia - looks like no one knows what the other is doing.

Hi Andreas

Did you post to the list? Comment on the earlier versions of the patches? The list is the please to coordinate these activities.

Andrew

#19 lore raw

PATCH v5 2/2 ARM: dts: add support for Turris Omnia

Hi,

Am 27.11.2016 um 17:07 schrieb Andrew Lunn:

Quoted 8 lines
Quoted 3 lines

@Uwe: Note that I had already told CZ.NIC's Michal ~two weeks ago that I have a WIP .dts for the Omnia - looks like no one knows what the other is doing.

Hi Andreas

Did you post to the list? Comment on the earlier versions of the patches? The list is the please to coordinate these activities.

No, it was not yet fully working (only WAN NIC) and I don't have a habit of spamming the list with RFCs. Also I was away the last two weekends.

I would've expected to get CC'ed for review though, since CZ.NIC should've been aware of my work.

https://lists.opensuse.org/opensuse-arm/2016-11/msg00005.html

Cheers,
Andreas

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
#20 lore raw

PATCH v5 2/2 ARM: dts: add support for Turris Omnia

In reply to Andreas Färber

Am 27.11.2016 um 17:00 schrieb Andreas F?rber:

Quoted 6 lines

@Uwe: Note that I had already told CZ.NIC's Michal ~two weeks ago that I have a WIP .dts for the Omnia - looks like no one knows what the other is doing. :( My branch includes cleanups for 385 .dtsi and bug fixes for the switch that I am not seeing in your series:

https://github.com/afaerber/linux/commits/omnia-next

Archived at https://github.com/afaerber/linux/commits/omnia-next.pre-uwe

It seems like four out of my five switch probing bug fixes were already resolved by Andrew in the meantime. Remaining one plus 88E6176 mini-series sent out.

Cheers,
Andreas

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
#21 lore raw

PATCH v5 2/2 ARM: dts: add support for Turris Omnia

In reply to Uwe Kleine-König

Am 25.11.2016 um 15:26 schrieb Uwe Kleine-K?nig:

Quoted 5 lines
arch/arm/boot/dts/armada-385-turris-omnia.dts new file +0 -0
new file mode 100644
index 000000000000..bcc10c285889

[...]

arch/arm/boot/dts/armada-385-turris-omnia.dts line 56

Quoted 3 lines
arch/arm/boot/dts/armada-385-turris-omnia.dts new file +3 -0
+	chosen {
+		stdout-path = &uart0;
+	};

I notice that the other 38x boards (and thus my previous Omnia .dts) use "serial0:115200n8". Can we really rely on the driver defaults here?

Regards,
Andreas

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
#22 lore raw

PATCH 1/1 ARM: dts: mvebu: Fix armada-385-turris-omnia stdout-path

Specify the baudrate.

Fixes 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia")
Cc Uwe Kleine-K?nig <[email protected]>
---
 arch/arm/boot/dts/armada-385-turris-omnia.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/armada-385-turris-omnia.dts +1 -1
index f53cb8b73610..2eff012287d4 100644
@@ -52,7 +52,7 @@
 	compatible = "cznic,turris-omnia", "marvell,armada385", "marvell,armada380";
 
 	chosen {
-		stdout-path = &uart0;
+		stdout-path = "serial0:115200n8";
 	};
 
 	memory {
Signature · 1 line
2.6.6
#24 lore raw

Re: [PATCH] ARM: dts: mvebu: Fix armada-385-turris-omnia stdout-path

In reply to Andreas Färber
Quoted 5 lines · Andreas F?rber

Specify the baudrate.

Fixes 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia")
Cc Uwe Kleine-K?nig <[email protected]>

You said with plain &uart0 the kernel uses a wrong baud rate? That's strange. For me it works and I think it's the intended behaviour to dermine the baud rate setup by the bootloader and use this.

I'd prefer it this way over hard coding the baud rate.

Quoted 8 lines
 arch/arm/boot/dts/armada-385-turris-omnia.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/armada-385-turris-omnia.dts +0 -0
index f53cb8b73610..2eff012287d4 100644

arch/arm/boot/dts/armada-385-turris-omnia.dts line 58

Quoted 8 lines
arch/arm/boot/dts/armada-385-turris-omnia.dts +1 -1
@@ -52,7 +52,7 @@
 	compatible = "cznic,turris-omnia", "marvell,armada385", "marvell,armada380";
 
 	chosen {
-		stdout-path = &uart0;
+		stdout-path = "serial0:115200n8";
 	};
 
 	memory {

This has the downside to depend on the alias. Not sure this is considered modern. An alternative would be:

	stdout-path = "/soc/internal-regs/serial at 12000:115200n8";

(maybe there even exists syntactic sugar to express this using &uart0?)

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#25 lore raw

Re: [PATCH] ARM: dts: mvebu: Fix armada-385-turris-omnia stdout-path

Am 27.11.2016 um 22:25 schrieb Uwe Kleine-K?nig:

Quoted 10 lines · Andreas F?rber
Quoted 5 lines

Specify the baudrate.

Fixes 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia")
Cc Uwe Kleine-K?nig <[email protected]>

You said with plain &uart0 the kernel uses a wrong baud rate? That's strange. For me it works and I think it's the intended behaviour to dermine the baud rate setup by the bootloader and use this.

IIRC the 8250 driver defaults to 9600n8 if unspecified.

Kernel tested: 4.9.0-rc2-next-20161028-00010-g4fb44d9-dirty

Maybe you used some console= argument overriding it?

Quoted 17 lines

I'd prefer it this way over hard coding the baud rate.

Quoted 15 lines
 arch/arm/boot/dts/armada-385-turris-omnia.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/armada-385-turris-omnia.dts +1 -1
index f53cb8b73610..2eff012287d4 100644
@@ -52,7 +52,7 @@
 	compatible = "cznic,turris-omnia", "marvell,armada385", "marvell,armada380";
 
 	chosen {
-		stdout-path = &uart0;
+		stdout-path = "serial0:115200n8";
 	};
 
Quoted 6 lines

arch/arm/boot/dts/armada-385-turris-omnia.dts line 58

Quoted 1 line
arch/arm/boot/dts/armada-385-turris-omnia.dts +0 -0
 	memory {

This has the downside to depend on the alias. Not sure this is considered modern. An alternative would be:

	stdout-path = "/soc/internal-regs/serial at 12000:115200n8";

Please don't unroll the path I'm trying to abstract elsewhere.

Like I said, the "serialX:115200n8" syntax is what all other Armada 38x boards use:

git grep stdout-path -- arch/arm/boot/dts/ | grep armada-38
arch/arm/boot/dts/armada-385-db-ap.dts: stdout-path = "serial1:115200n8";
arch/arm/boot/dts/armada-385-linksys.dtsi: stdout-path =
"serial0:115200n8";
arch/arm/boot/dts/armada-388-clearfog.dts: stdout-path =
"serial0:115200n8";
arch/arm/boot/dts/armada-388-db.dts: stdout-path = "serial0:115200n8";
arch/arm/boot/dts/armada-388-gp.dts: stdout-path = "serial0:115200n8";
arch/arm/boot/dts/armada-388-rd.dts: stdout-path = "serial0:115200n8";

The alias is needed to reliably determine the tty device number and is set "globally" in armada-38x.dtsi, so why is it a problem to rely on?

Regards,
Andreas

Quoted 2 lines

(maybe there even exists syntactic sugar to express this using &uart0?)

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
#26 lore raw

Re: [PATCH] ARM: dts: mvebu: Fix armada-385-turris-omnia stdout-path

Hello,

Quoted 12 lines · Andreas F?rber

Am 27.11.2016 um 22:25 schrieb Uwe Kleine-K?nig:

Quoted 10 lines · Andreas F?rber
Quoted 5 lines

Specify the baudrate.

Fixes 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia")
Cc Uwe Kleine-K?nig <[email protected]>

You said with plain &uart0 the kernel uses a wrong baud rate? That's strange. For me it works and I think it's the intended behaviour to dermine the baud rate setup by the bootloader and use this.

Quoted 5 lines

IIRC the 8250 driver defaults to 9600n8 if unspecified.

Kernel tested: 4.9.0-rc2-next-20161028-00010-g4fb44d9-dirty

Maybe you used some console= argument overriding it?

Yes, you're right.

Quoted 17 lines
Quoted 17 lines

I'd prefer it this way over hard coding the baud rate.

Quoted 15 lines
 arch/arm/boot/dts/armada-385-turris-omnia.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/armada-385-turris-omnia.dts +1 -1
index f53cb8b73610..2eff012287d4 100644
@@ -52,7 +52,7 @@
 	compatible = "cznic,turris-omnia", "marvell,armada385", "marvell,armada380";
 
 	chosen {
-		stdout-path = &uart0;
+		stdout-path = "serial0:115200n8";
 	};
 
Quoted 8 lines
Quoted 6 lines

arch/arm/boot/dts/armada-385-turris-omnia.dts line 58

Quoted 1 line
arch/arm/boot/dts/armada-385-turris-omnia.dts +0 -0
 	memory {

This has the downside to depend on the alias. Not sure this is considered modern. An alternative would be:

	stdout-path = "/soc/internal-regs/serial at 12000:115200n8";

Please don't unroll the path I'm trying to abstract elsewhere.

Yeah, specifying the path isn't nice.

Quoted 2 lines

Like I said, the "serialX:115200n8" syntax is what all other Armada 38x boards use:

This isn't a reason to not think about better alternatives. An if something like:

	stdout-path = &uart0 + ":115200n8";

would be possible, I'd definitely prefer it over "serial0:115200n8".

Quoted 10 lines

git grep stdout-path -- arch/arm/boot/dts/ | grep armada-38
arch/arm/boot/dts/armada-385-db-ap.dts: stdout-path = "serial1:115200n8";
arch/arm/boot/dts/armada-385-linksys.dtsi: stdout-path =
"serial0:115200n8";
arch/arm/boot/dts/armada-388-clearfog.dts: stdout-path =
"serial0:115200n8";
arch/arm/boot/dts/armada-388-db.dts: stdout-path = "serial0:115200n8";
arch/arm/boot/dts/armada-388-gp.dts: stdout-path = "serial0:115200n8";
arch/arm/boot/dts/armada-388-rd.dts: stdout-path = "serial0:115200n8";

Quoted 2 lines

The alias is needed to reliably determine the tty device number and is set "globally" in armada-38x.dtsi, so why is it a problem to rely on?

AFAIK aliases are seen as (still necessary) evil by the dt people. So if you can stop making use of them, that would be nice.

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#27 lore raw

PATCH v5 2/2 ARM: dts: add support for Turris Omnia

In reply to Andreas Färber

Am 27.11.2016 um 20:22 schrieb Andreas F?rber:

Quoted 7 lines

Am 25.11.2016 um 15:26 schrieb Uwe Kleine-K?nig:

Quoted 5 lines
arch/arm/boot/dts/armada-385-turris-omnia.dts new file +0 -0
new file mode 100644
index 000000000000..bcc10c285889

[...]

Quoted 6 lines

arch/arm/boot/dts/armada-385-turris-omnia.dts line 56

Quoted 3 lines
arch/arm/boot/dts/armada-385-turris-omnia.dts new file +3 -0
+	chosen {
+		stdout-path = &uart0;
+	};

I notice that the other 38x boards (and thus my previous Omnia .dts) use "serial0:115200n8". Can we really rely on the driver defaults here?

Answering my own question: No, with the mvebu/dt .dts I do not get any serial output. Patch sent.

Regards,
Andreas

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)