From patchwork Fri May 5 23:18:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Woojung.Huh@microchip.com X-Patchwork-Id: 759240 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3wKSVt1kMlz9s7r for ; Sat, 6 May 2017 09:18:14 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752299AbdEEXSL convert rfc822-to-8bit (ORCPT ); Fri, 5 May 2017 19:18:11 -0400 Received: from esa2.microchip.iphmx.com ([68.232.149.84]:35338 "EHLO esa2.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751703AbdEEXSL (ORCPT ); Fri, 5 May 2017 19:18:11 -0400 X-IronPort-AV: E=Sophos;i="5.38,295,1491289200"; d="scan'208";a="2568972" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA; 05 May 2017 16:18:06 -0700 Received: from CHN-SV-EXMX02.mchp-main.com ([fe80::7dfe:3761:863e:3963]) by CHN-SV-EXCH04.mchp-main.com ([fe80::6150:8a42:4945:9b1b%16]) with mapi id 14.03.0181.006; Fri, 5 May 2017 16:18:06 -0700 From: To: , , CC: , , Subject: [PATCH net-next 4/5] dsa: Microchip KSZ switches SPI devicetree configuration Thread-Topic: [PATCH net-next 4/5] dsa: Microchip KSZ switches SPI devicetree configuration Thread-Index: AdLF9A6KSlaJaMCZRcy8wptfrTqcgg== Date: Fri, 5 May 2017 23:18:05 +0000 Message-ID: <9235D6609DB808459E95D78E17F2E43D40A5C00B@CHN-SV-EXMX02.mchp-main.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.10.76.4] MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Woojung Huh A sample SPI configuration for Microchip KSZ switches. Signed-off-by: Woojung Huh --- Documentation/devicetree/bindings/net/dsa/ksz.txt | 73 +++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/dsa/ksz.txt diff --git a/Documentation/devicetree/bindings/net/dsa/ksz.txt b/Documentation/devicetree/bindings/net/dsa/ksz.txt new file mode 100644 index 0000000..9cca7d4 --- /dev/null +++ b/Documentation/devicetree/bindings/net/dsa/ksz.txt @@ -0,0 +1,73 @@ +Microchip KSZ Series Ethernet switches +================================== + +Required properties: + +- compatible: For external switch chips, compatible string must be exactly one + of: "microchip,ksz9477" + +See Documentation/devicetree/bindings/dsa/dsa.txt for a list of additional +required and optional properties. + +Examples: + +Ethernet switch connected via SPI to the host, CPU port wired to eth0: + + eth0: ethernet@10001000 { + fixed-link { + reg = <7> + speed = <1000>; + duplex-full; + }; + }; + + spi1: spi@f8008000 { + pinctrl-0 = <&pinctrl_spi_ksz>; + cs-gpios = <&pioC 25 0>; + id = <1>; + status = "okay"; + + ksz9477: ksz9477@0 { + compatible = "microchip,ksz9477"; + reg = <0>; + + spi-max-frequency = <44000000>; + spi-cpha; + spi-cpol; + + status = "okay"; + 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"; + }; + port@4 { + reg = <4>; + label = "lan5"; + }; + port@5 { + reg = <5>; + label = "cpu"; + ethernet = <&macb0>; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + }; + };