From patchwork Thu Mar 14 15:01:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1056571 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=nic.cz Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="MHDPhn54"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44KsPg4NZWz9s4Y for ; Fri, 15 Mar 2019 02:02:15 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726468AbfCNPCO (ORCPT ); Thu, 14 Mar 2019 11:02:14 -0400 Received: from mail.nic.cz ([217.31.204.67]:33433 "EHLO mail.nic.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726337AbfCNPCO (ORCPT ); Thu, 14 Mar 2019 11:02:14 -0400 Received: from dellmb.labs.office.nic.cz (unknown [IPv6:2001:1488:fffe:6:cac7:3539:7f1f:463]) by mail.nic.cz (Postfix) with ESMTP id B7849601B9; Thu, 14 Mar 2019 16:02:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1552575730; bh=z/VntqA6mUbnpmvU2cVG8YcDHU+QQQM3Ynj0lpfK9zg=; h=From:To:Date; b=MHDPhn54OJzBjx4o3OCBiVF1p8ZgNYPp4oWTCpQBhFdup0doxLnbJrZw7uXc2guyU SBJgdmEEirOvQs9xdOPSpgGOoQ5QpzvjCT6c65b+QFhsJAvCatrIg5fxdWa7BGunQk ZinBsS74FfWpV2XRiUDbOR1P3BofvF72+ZV5df5Q= From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Linus Walleij Cc: Tony Lindgren , Shawn Guo , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Arnd Bergmann , =?utf-8?q?Marek_Beh=C3=BAn?= , Rob Herring , devicetree@vger.kernel.org Subject: [PATCH v4.1 armsoc/drivers/bus+gpio 2/5] dt-bindings: bus: Document moxtet bus binding Date: Thu, 14 Mar 2019 16:01:35 +0100 Message-Id: <20190314150135.4362-1-marek.behun@nic.cz> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190311225906.GA9056@bogus> References: <20190307125251.724-1-marek.behun@nic.cz> <20190307125251.724-3-marek.behun@nic.cz> <20190311225906.GA9056@bogus> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at mail X-Virus-Status: Clean Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This adds device tree binding documentation for the Moxtet bus, a bus via which the different modules connected to the Turris Mox router can be configured. Signed-off-by: Marek BehĂșn Cc: Rob Herring Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring --- .../devicetree/bindings/bus/moxtet.txt | 44 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 45 insertions(+) create mode 100644 Documentation/devicetree/bindings/bus/moxtet.txt diff --git a/Documentation/devicetree/bindings/bus/moxtet.txt b/Documentation/devicetree/bindings/bus/moxtet.txt new file mode 100644 index 000000000000..7be9d00c1767 --- /dev/null +++ b/Documentation/devicetree/bindings/bus/moxtet.txt @@ -0,0 +1,46 @@ +Turris Mox module status and configuration bus (over SPI) + +Required properties: + - compatible : Should be "cznic,moxtet" + - #address-cells : Has to be 1 + - #size-cells : Has to be 0 + - spi-cpol : Required inverted clock polarity + - spi-cpha : Required shifted clock phase + - interrupts : Must contain reference to the shared interrupt line + - interrupt-controller : Required + - #interrupt-cells : Has to be 1 + +For other required and optional properties of SPI slave nodes please refer to +../spi/spi-bus.txt. + +Required properties of subnodes: + - reg : Should be position on the Moxtet bus (how many Moxtet + modules are between this module and CPU module, so + either 0 or a positive integer) + +The driver finds the devices connected to the bus by itself, but it may be +needed to reference some of them from other parts of the device tree. In that +case the devices can be defined as subnodes of the moxtet node. + +Example: + + moxtet@1 { + compatible = "cznic,moxtet"; + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + spi-max-frequency = <10000000>; + spi-cpol; + spi-cpha; + interrupt-controller; + #interrupt-cells = <1>; + interrupt-parent = <&gpiosb>; + interrupts = <5 IRQ_TYPE_EDGE_FALLING>; + + moxtet_sfp: gpio@0 { + compatible = "cznic,moxtet-gpio"; + gpio-controller; + #gpio-cells = <2>; + reg = <0>; + } + }; diff --git a/MAINTAINERS b/MAINTAINERS index d96d36c83bc3..3f461a2d776a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1502,6 +1502,7 @@ ARM/CZ.NIC TURRIS MOX SUPPORT M: Marek Behun W: http://mox.turris.cz S: Maintained +F: Documentation/devicetree/bindings/bus/moxtet.txt F: include/linux/moxtet.h F: drivers/bus/moxtet.c