Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2273067ybi; Mon, 1 Jul 2019 09:08:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYDmT5R3mpQt2qSbZ51CXjL/R3gM4Bu6pM4Fa7JGLGV7O02w34ceFcMPk2YkP//Gk6UwDf X-Received: by 2002:a17:90a:cb18:: with SMTP id z24mr66886pjt.108.1561997311818; Mon, 01 Jul 2019 09:08:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561997311; cv=none; d=google.com; s=arc-20160816; b=cijb6d+azipgVHdDulccKkrco2HcWLy8krwLfyHHHXA9HCWS2phf4osZ9FNAvLgfRV sZNP1DO+XCc5VOu1lIOFVgjzItF2bcMHN0e4+Ent1/oerDy/XsKNce/dZfaz9P8K1+s/ Te7HWCJkufhlScjEF15vHB8xEJD47VfN/MoOHe+U6tGKui0ix3UiVkOqE3jLJ8Cf+D8f vZTmopLFv0XgNB2r0Y+V0mXVO0ZTJT1zeKU5rT5H4n9qjm97A7Qm8e6u4RBFLYy7JaoQ fhO6PsG0GUBMSKJjXIzBrliN35KXkL1DoxwBdcY41Nw1TUjNd5sBx8ad6cavSDe0eC6C 79dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=kUd6oC4CwkGinXIZBT21shD4mEDfRTY5MFw4kwCcA7A=; b=JDyTV2lEeBPB1LLHtkmiYvxGop1ZXjox6q9CazDPz7aqstlzGuGv9y2eFizW8Xx9ND EvSxTGSu5brCVoHwTbmvBcq9xJTlncYdlNw2+SSlWuaqZ7jq0SAGVdJNTVEEtwYHqUlW rem/nS0gQ0fO6Bi1XDTc0l8WvD5YgYCArw4BvPD37gkdxzblgLrUDqyhEUEdyW3p/J1p TUQA9dgOjBDIsgd2kwAsj/gWkUm/k9WG5MapvX/rI/vGGM+46nsLja1ksTPOBv71uYSp akoQS1H1ER+hzbadZdzdWeIetgLt/dsBtjruvwlu4l6UGC9SFCOnou7TdUMNjBqQo6AW n22A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=sxo+grIw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p19si10440155pgk.309.2019.07.01.09.08.15; Mon, 01 Jul 2019 09:08:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=sxo+grIw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729021AbfGAP2s (ORCPT + 99 others); Mon, 1 Jul 2019 11:28:48 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:35682 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726329AbfGAP2s (ORCPT ); Mon, 1 Jul 2019 11:28:48 -0400 Received: by mail-lf1-f66.google.com with SMTP id a25so9117905lfg.2; Mon, 01 Jul 2019 08:28:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kUd6oC4CwkGinXIZBT21shD4mEDfRTY5MFw4kwCcA7A=; b=sxo+grIwj+RDKTj5IQga0vgl0SUNb60398r0MGLEWRrLcnQMSZbyd9lpMBYIyndTDn lfC4N4B3RL3JwrKcqIxzemHHg4ZmG8qpA5kyZ4DXwxU2H7AHlcUz/8Aih5B1gL3wxiYM FDLHVOfDGK6LehxteO/R/TsPkmzOoTHl9lJEul2zjFE6hMJsMWccO+ssQcbUIJmyZMiv SHUVxhHA9vVrJJSY+nI0+e5Ckv2f6UuaqauAlWDCV6v/DFA9NlCljrzfVuMMLx6AV9GV R0wjb+P2ZORQsRqWhQztJXuuWq8ER6wophYRZ4wZTOT3b3bV6DZYvEG+z3eOIizTzJjh wLwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kUd6oC4CwkGinXIZBT21shD4mEDfRTY5MFw4kwCcA7A=; b=sQ2HkKY5ltVQ2MqazxvExEbIJV7YPpK+cHxgmTVTKKbISEejBVq+WKACsXgkN5TAiE /loHrhCxF2K1MxiyRhtbAVEW/45erzSMLWrRfoN6gH2GsxZ40os3Ls/mKE1WPMQnBELv KCCHYT54ZezxrRpI60hBz2A2aWjzMD2fWAlUkI3pv0ibAhU+UbV3wCMBPMXgERb/9jAS ZTA7oHA5ELh5DQCp6PvrZk2Ac5j9iD+4KiQztiaeMULT/wEe6qM2fNDehhHEaKVdctBF Ttr+oPWhHr+3Xj0RNhfqy86IDb3xlM84JZ9rK0niazlLYxQh7qKjMbZDKNmscXlM2ctc HGJg== X-Gm-Message-State: APjAAAWXLI2/N8rlirQejT4gTp5TZOIEVe04L/FTG8ajWItSFrR0DpVL Z0ZcXVEkiKo1pqnJ03Gj5pc= X-Received: by 2002:a19:230f:: with SMTP id j15mr11609319lfj.122.1561994925933; Mon, 01 Jul 2019 08:28:45 -0700 (PDT) Received: from localhost.localdomain ([91.238.216.6]) by smtp.gmail.com with ESMTPSA id e12sm2561626lfb.66.2019.07.01.08.28.44 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 01 Jul 2019 08:28:45 -0700 (PDT) From: Pawel Dembicki Cc: linus.walleij@linaro.org, paweldembicki@gmail.com, Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S. Miller" , Rob Herring , Mark Rutland , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] net: dsa: Change DT bindings for Vitesse VSC73xx switches Date: Mon, 1 Jul 2019 17:27:20 +0200 Message-Id: <20190701152723.624-1-paweldembicki@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This commit document changes after split vsc73xx driver into core and spi part. The change of DT bindings is required for support the same vsc73xx chip, which need PI bus to communicate with CPU. It also introduce how to use vsc73xx platform driver. Signed-off-by: Pawel Dembicki --- .../bindings/net/dsa/vitesse,vsc73xx.txt | 74 ++++++++++++++++--- 1 file changed, 64 insertions(+), 10 deletions(-) diff --git a/Documentation/devicetree/bindings/net/dsa/vitesse,vsc73xx.txt b/Documentation/devicetree/bindings/net/dsa/vitesse,vsc73xx.txt index ed4710c40641..c6a4cd85891c 100644 --- a/Documentation/devicetree/bindings/net/dsa/vitesse,vsc73xx.txt +++ b/Documentation/devicetree/bindings/net/dsa/vitesse,vsc73xx.txt @@ -2,8 +2,8 @@ Vitesse VSC73xx Switches ======================== This defines device tree bindings for the Vitesse VSC73xx switch chips. -The Vitesse company has been acquired by Microsemi and Microsemi in turn -acquired by Microchip but retains this vendor branding. +The Vitesse company has been acquired by Microsemi and Microsemi has +been acquired Microchip but retains this vendor branding. The currently supported switch chips are: Vitesse VSC7385 SparX-G5 5+1-port Integrated Gigabit Ethernet Switch @@ -11,16 +11,26 @@ Vitesse VSC7388 SparX-G8 8-port Integrated Gigabit Ethernet Switch Vitesse VSC7395 SparX-G5e 5+1-port Integrated Gigabit Ethernet Switch Vitesse VSC7398 SparX-G8e 8-port Integrated Gigabit Ethernet Switch -The device tree node is an SPI device so it must reside inside a SPI bus -device tree node, see spi/spi-bus.txt +This switch could have two different management interface. + +If SPI interface is used, the device tree node is an SPI device so it must +reside inside a SPI bus device tree node, see spi/spi-bus.txt + +If Platform driver is used, the device tree node is an platform device so it +must reside inside a platform bus device tree node. Required properties: -- compatible: must be exactly one of: - "vitesse,vsc7385" - "vitesse,vsc7388" - "vitesse,vsc7395" - "vitesse,vsc7398" +- compatible (SPI): must be exactly one of: + "vitesse,vsc7385-spi" + "vitesse,vsc7388-spi" + "vitesse,vsc7395-spi" + "vitesse,vsc7398-spi" +- compatible (Platform): must be exactly one of: + "vitesse,vsc7385-platform" + "vitesse,vsc7388-platform" + "vitesse,vsc7395-platform" + "vitesse,vsc7398-platform" - gpio-controller: indicates that this switch is also a GPIO controller, see gpio/gpio.txt - #gpio-cells: this must be set to <2> and indicates that we are a twocell @@ -38,8 +48,9 @@ and subnodes of DSA switches. Examples: +SPI: switch@0 { - compatible = "vitesse,vsc7395"; + compatible = "vitesse,vsc7395-spi"; reg = <0>; /* Specified for 2.5 MHz or below */ spi-max-frequency = <2500000>; @@ -79,3 +90,46 @@ switch@0 { }; }; }; + +Platform: +switch@2,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "vitesse,vsc7385-platform"; + reg = <0x2 0x0 0x20000>; + reset-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "lan1"; + }; + port@1 { + reg = <1>; + label = "lan2"; + }; + port@2 { + reg = <2>; + label = "lan3"; + }; + port@3 { + reg = <3>; + label = "lan4"; + }; + vsc: port@6 { + reg = <6>; + label = "cpu"; + ethernet = <&enet0>; + phy-mode = "rgmii"; + fixed-link { + speed = <1000>; + full-duplex; + pause; + }; + }; + }; + +}; -- 2.20.1