From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: ARMADA 370 - Distributed Switch Architecture (dsa) - device tree
Date: Thu, 23 Oct 2014 11:20:02 +0200 [thread overview]
Message-ID: <20141023112002.228d8a17@free-electrons.com> (raw)
In-Reply-To: <20141013111904.GD14147@titan.lakedaemon.net>
Hello all,
I'm catching up on some past e-mails. Has this DSA issue been resolved?
I thought Andrew has done some DSA related work at some point? If not,
we could also involve Florian Fainelli in the loop, as he has done
quite a bit of DSA related stuff if I remember correctly.
Best regards,
Thomas
On Mon, 13 Oct 2014 07:19:04 -0400, Jason Cooper wrote:
> Tormod,
>
> Sorry, I don't have time to reply atm. However, I'm adding the mvebu
> devs and maintainers to the Cc. You can also hit us up at #mvlinux on
> freenode.
>
> thx,
>
> Jason.
>
> On Mon, Oct 13, 2014 at 12:14:41PM +0200, post at twien.net wrote:
> > Dear all,
> > I have a custom board equipped with an ARMADA 370 SoC (88f6W11) and
> > a Marvell switch chip (88e6352) (I have written a device driver for
> > the latter).
> > My question is how to set up a proper device tree specification for
> > the board. The device tree specification is listed below. This is
> > based on a similar .dts-file for the kirkwood SoC.
> > Further down is a excerpt of the start up sequence. I would imagine
> > the switch would be installed as the "PHY" for eth0 (which seems not
> > to be the case). I added some additional printout messages, and from
> > what I can see a generic device driver is loaded, and eventually the
> > mvneta_open/-probe function states that the PHY can not be found. I
> > have read the "examples" in the ../boot/dts directory and also read
> > the documentation. There are some confusing things, for example the
> > "dsa,mii-bus;" specification where I eventually put in "dsa,mii-bus
> > = <&mdio_bus>;". From both the examples and the documentation it
> > seemed I should specify a device on the mdio_bus, e.g. "phy0", but
> > when I did the whole thing crashed.
> > So specifying "mdio_bus" at least got me running a bit further, and
> > the dsa driver was detected and the proper switch device was
> > identified.
> > What I would like to achieve is to get eth0 to connect to port 5 on
> > the switch using SGMII.
> > Any advice on how to proceed would be appreciated.
> >
> >
> > +---------+
> > | | +--------+
> > | | SGMII | |----- p0
> > | eth0|-----------|p5 | . .
> > | | | |----- p4
> > +---------+ +--------+
> > ARMADA 370 88e6352
> >
> >
> > Tormod
> >
> >
> >
> > /*
> > * Device Tree file for Marvell Armada 370 Ethernet Prototype board
> > * ()
> > *
> > * Copied from arch/arm/boot/dts/armada-370-rd.dts
> > *
> > * Copyright (C) 2014 ...
> > *
> > * This file is licensed under the terms of the GNU General Public
> > * License version 2. This program is licensed "as is" without any
> > * warranty of any kind, whether express or implied.
> > */
> >
> > /dts-v1/;
> > #include <dt-bindings/input/input.h>
> > #include <dt-bindings/gpio/gpio.h>
> > #include "armada-370.dtsi"
> >
> > / {
> > model = "Marvell Armada 370 Ethernet Prototype";
> > compatible = "marvell,armada370", "marvell,armada-370-xp";
> >
> > chosen {
> > bootargs = "console=ttyS0,115200 earlyprintk";
> > };
> >
> > memory {
> > device_type = "memory";
> > reg = <0x00000000 0x40000000>; /* 1 GB */
> > };
> >
> > soc {
> > ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
> > MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>;
> >
> >
> > pcie-controller {
> > status = "okay";
> >
> > /* Internal mini-PCIe connector */
> > pcie at 1,0 {
> > /* Port 0, Lane 0 */
> > status = "okay";
> > };
> >
> > /* Internal mini-PCIe connector */
> > pcie at 2,0 {
> > /* Port 1, Lane 0 */
> > status = "okay";
> > };
> > };
> >
> > internal-regs {
> > serial at 12000 {
> > status = "okay";
> > };
> >
> > mdio_bus: mdio {
> > phy0: ethernet-phy at ff {
> > /* compatible = "ethernet-phy-id5043.0eb0",
> > "ethernet-phy-ieee802.3-c22";
> > */
> > reg = <0xff>; /* no PHY connected */
> > speed = <1000>;
> > duplex = <1>;
> > };
> >
> > /* phy1: ethernet-phy at 1 {
> > reg = <0x1>;
> > };
> > */
> > };
> >
> > ethernet at 70000 {
> > status = "okay";
> > phy = <&phy0>;
> > phy-mode = "sgmii";
> > };
> >
> > /* ethernet at 74000 {
> > status = "okay";
> > phy = <&phy1>;
> > phy-mode = "rgmii-id";
> > };
> > */
> > mvsdio at d4000 {
> > pinctrl-0 = <&sdio_pins1>;
> > pinctrl-names = "default";
> > status = "okay";
> > /* No CD or WP GPIOs */
> > broken-cd;
> > };
> >
> > usb at 50000 {
> > status = "okay";
> > };
> >
> >
> > /* usb at 51000 {
> > status = "okay";
> > };
> > */
> > spi0: spi at 10600 {
> > status = "okay";
> > };
> >
> > i2c at 11000 {
> > pinctrl-0 = <&i2c0_pins>;
> > pinctrl-names = "default";
> > clock-frequency = <100000>;
> > status = "okay";
> > };
> >
> > nand at d0000 {
> > status = "okay";
> > num-cs = <1>;
> > marvell,nand-keep-config;
> > marvell,nand-enable-arbiter;
> > nand-on-flash-bbt;
> >
> > partition at 0 {
> > label = "U-Boot";
> > reg = <0 0x800000>;
> > };
> > partition at 800000 {
> > label = "Linux";
> > reg = <0x800000 0x800000>;
> > };
> > partition at 1000000 {
> > label = "Filesystem";
> > reg = <0x1000000 0x3f000000>;
> > };
> > };
> > };
> > };
> >
> > dsa at 0 {
> > compatible = "marvell,dsa";
> > #address-cells = <2>;
> > #size-cells = <0>;
> > dsa,ethernet = <ð0>;
> > dsa,mii-bus = <&mdio_bus>;
> >
> > switch at 0 {
> > #address-cells = <1>;
> > #size-cells = <0>;
> >
> > reg = <0 0>;
> >
> > port at 0 {
> > reg = <0>;
> > label = "lan1";
> > };
> >
> > port at 1 {
> > reg = <1>;
> > label = "lan2";
> > };
> >
> > port at 2 {
> > reg = <2>;
> > label = "lan3";
> > };
> >
> > port at 3 {
> > reg = <3>;
> > label = "lan4";
> > };
> >
> > port at 5 {
> > reg = <5>;
> > label = "cpu";
> > };
> >
> > port at 6 {
> > reg = <6>;
> > label = "lan6";
> > };
> > };
> > };
> >
> > };
> >
> >
> > nand: device found, Manufacturer ID: 0x2c, Chip ID: 0x38
> > nand: Micron MT29F8G08ABABAWP
> > nand: 1024MiB, SLC, page size: 4096, OOB size: 224
> > pxa3xx-nand f10d0000.nand: ECC strength 16, ECC step size 2048
> > Bad block table found at page 262016, version 0x01
> > Bad block table found at page 261888, version 0x01
> > 3 ofpart partitions found on MTD device pxa3xx_nand-0
> > Creating 3 MTD partitions on "pxa3xx_nand-0":
> > 0x000000000000-0x000000800000 : "U-Boot"
> > 0x000000800000-0x000001000000 : "Linux"
> > 0x000001000000-0x000040000000 : "Filesystem"
> > mdiobus register device_node: mdio
> > libphy: orion_mdio_bus: probed
> > mdio_bus f1072004.mdio-mi: /soc/internal-regs/mdio/ethernet-phy at ff
> > PHY address 255 is too large
> > mvneta_probe: ethernet device: eth%d
> > mvneta_probe: phy_node: ethernet-phy
> > mvneta f1070000.ethernet eth0: Using hardware mac address
> > 00:50:43:02:02:00
> > ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> > ehci-pci: EHCI PCI platform driver
> > ehci-orion: EHCI orion driver
> > orion-ehci f1050000.usb: EHCI Host Controller
> > orion-ehci f1050000.usb: new USB bus registered, assigned bus number 1
> > orion-ehci f1050000.usb: irq 26, io mem 0xf1050000
> > orion-ehci f1050000.usb: USB 2.0 started, EHCI 1.00
> > hub 1-0:1.0: USB hub found
> > hub 1-0:1.0: 1 port detected
> > usbcore: registered new interface driver usb-storage
> > mousedev: PS/2 mouse device common for all mice
> > rtc-mv f1010300.rtc: internal RTC not ticking
> > orion_wdt: Initial timeout 229 sec
> > usbcore: registered new interface driver usbhid
> > usbhid: USB HID core driver
> > TCP: cubic registered
> > Distributed Switch Architecture driver version 0.1
> > eth0[0]: detected a Marvell 88E6352 switch
> > libphy: dsa slave smi: probed
> > ThumbEE CPU extension supported.
> > drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
> > mvneta_mdio_probe: mvneta_probe: ethernet-phy
> > mvneta f1070000.ethernet eth0: could not find the PHY
> > mvneta f1070000.ethernet eth0: cannot probe MDIO bus
> > IP-Config: Failed to open eth0
> > IP-Config: Failed to open lan1
> > IP-Config: Failed to open lan2
> > IP-Config: Failed to open lan3
> > IP-Config: Failed to open lan4
> > IP-Config: Failed to open lan6
> > IP-Config: No network devices available
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> >
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-10-23 9:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-13 10:14 ARMADA 370 - Distributed Switch Architecture (dsa) - device tree post at twien.net
2014-10-13 11:19 ` Jason Cooper
2014-10-23 9:20 ` Thomas Petazzoni [this message]
2014-10-23 12:10 ` Jason Cooper
2014-10-23 12:57 ` post at twien.net
2014-10-23 14:05 ` Andrew Lunn
2014-10-23 14:19 ` post at twien.net
2014-10-13 13:19 ` Andrew Lunn
2014-10-13 18:25 ` Guenter Roeck
2014-10-14 6:05 ` post at twien.net
2014-10-14 13:30 ` Guenter Roeck
2014-10-14 11:35 ` Richard Cochran
2014-10-14 13:24 ` Guenter Roeck
2014-10-23 8:32 ` Richard Cochran
2014-10-14 2:08 ` Florian Fainelli
2014-10-14 11:14 ` post at twien.net
2014-10-14 16:14 ` Florian Fainelli
2014-10-15 13:42 ` post at twien.net
2014-10-15 13:47 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141023112002.228d8a17@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.