From patchwork Wed Mar 27 19:11:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 1916977 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45e3:2400::1; helo=sv.mirrors.kernel.org; envelope-from=devicetree+bounces-53939-incoming-dt=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [IPv6:2604:1380:45e3:2400::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V4brb1Sqjz1yWr for ; Thu, 28 Mar 2024 06:11:59 +1100 (AEDT) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D49C929E720 for ; Wed, 27 Mar 2024 19:11:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3C571514FB; Wed, 27 Mar 2024 19:11:50 +0000 (UTC) X-Original-To: devicetree@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8180B13E043; Wed, 27 Mar 2024 19:11:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711566710; cv=none; b=TaXZG6Kb+odw1UZJWlc4rzf/17hXU0NOFLN43zFORZWMszSfRxD+u8gPmx+HE+lkOlnmop3RcbdCJE3+2OC8OP2T/CVcCxEgKIwiQOVuJyGXRGQN9g0YjXGyUMMgtVPxiHPPP0qsOv8UlsoIpV4L3uzn4JB1lFUhXiEm3AzszsY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711566710; c=relaxed/simple; bh=BOiUDY1X5fzeGOqE1IIej5iszJIV6a41YoYson7zgZE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fyMBy3g/rXFjbbqA9h6qDu4507RlB6fwauAp5teJezSryQ1ghQ/ORIqSJe081InqgetrbGtTj33xU7yafwsb8Of5aBOCEB2QmXBc+yGDdc/Lqa3f+R/eazFGZgUWPiBIkxuB83eGKSsEW4l6WjFIMQQPZ4l9Du+sdmW+2URQhsI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1395C433F1; Wed, 27 Mar 2024 19:11:49 +0000 (UTC) Received: by mercury (Postfix, from userid 1000) id AA64D1060704; Wed, 27 Mar 2024 20:11:47 +0100 (CET) From: Sebastian Reichel Date: Wed, 27 Mar 2024 20:11:32 +0100 Subject: [PATCH v2 1/7] dt-bindings: hsi: hsi-client: convert to YAML Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240327-hsi-dt-binding-v2-1-110fab4c32ae@collabora.com> References: <20240327-hsi-dt-binding-v2-0-110fab4c32ae@collabora.com> In-Reply-To: <20240327-hsi-dt-binding-v2-0-110fab4c32ae@collabora.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sebastian Reichel Cc: Tony Lindgren , devicetree@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Reichel X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4296; i=sebastian.reichel@collabora.com; h=from:subject:message-id; bh=BOiUDY1X5fzeGOqE1IIej5iszJIV6a41YoYson7zgZE=; b=owEBbQKS/ZANAwAKAdju1/PIO/qaAcsmYgBmBG9xveG5FkVLMTBd0NfOMim9KvuljtMYjGmro ExRuuz6eEiJAjMEAAEKAB0WIQTvZg0HRj+Lcmp5VBPY7tfzyDv6mgUCZgRvcQAKCRDY7tfzyDv6 muYSD/9911Opo8umunu4+xNuQwSXbmunqYpyPswxPiHkliaQhMq7fXNUvZJsVVAXLtYGrAvjY9A KXX1XJMwiIlrTVnPFStvwDJj0aAjTUYb1YB1zBp4cDCCLpH9se2joREXspawEzCxeXBgbkexaat N82IJ1ZCxIz68CH6zNywh+ZiAheb+E7/29iLRAqkAViUndWIvIXaO3Eal+1xrbRQIJGtl8h8kzx s9eyOaxfi9eBn/hyz2QlGVsS6jxQpTsyCQ/8kbJff1xwRrmSsV/w57JsAPWVE4C+FpAAUoaYiOT Am4vDVamhRlpnOT/lW7DfX3mlYD9E4VoNmzFZrXKIUfhv3iowAT20JaCc4Zquf+bzShn7LXZzRS GipF245CyoGD+Ib9feOgabN/8mGsZRjAwd5E/EvEP9tVhYHX2Pd/gVLxe6vLBhFQ4RUZed/IW11 Im0qkpIR+cW4R9pzGvCGw3/H4Hb+qlpXgzjzjju6P+AGOQNyhOisngOF1KYvq1HBlLvYEten9ps 1gEvhFH1XYLU753N+xvlu7El4mMuhbt0FsxMWQ1GKC7n74eLjnekse/K6oDvT/sQkuWp8sxxcNy sUYezIArQPGDXXUck5jo5znKIepbswhg8YF0ntS8OTHQuIHs+eJXPhmpe+Ms4YZlzmntLecQwVl s1Pn4bOifNCbM1Q== X-Developer-Key: i=sebastian.reichel@collabora.com; a=openpgp; fpr=EF660D07463F8B726A795413D8EED7F3C83BFA9A Convert the legacy txt binding to modern YAML and rename from client-devices to hsi-client. Also the example got dropped, since this is a shared schema. No semantic change in the binding itself. Signed-off-by: Sebastian Reichel --- .../devicetree/bindings/hsi/client-devices.txt | 44 ------------ .../devicetree/bindings/hsi/hsi-client.yaml | 81 ++++++++++++++++++++++ 2 files changed, 81 insertions(+), 44 deletions(-) diff --git a/Documentation/devicetree/bindings/hsi/client-devices.txt b/Documentation/devicetree/bindings/hsi/client-devices.txt deleted file mode 100644 index 104c9a3e57a4..000000000000 --- a/Documentation/devicetree/bindings/hsi/client-devices.txt +++ /dev/null @@ -1,44 +0,0 @@ -Each HSI port is supposed to have one child node, which -symbols the remote device connected to the HSI port. The -following properties are standardized for HSI clients: - -Required HSI configuration properties: - -- hsi-channel-ids: A list of channel ids - -- hsi-rx-mode: Receiver Bit transmission mode ("stream" or "frame") -- hsi-tx-mode: Transmitter Bit transmission mode ("stream" or "frame") -- hsi-mode: May be used instead hsi-rx-mode and hsi-tx-mode if - the transmission mode is the same for receiver and - transmitter -- hsi-speed-kbps: Max bit transmission speed in kbit/s -- hsi-flow: RX flow type ("synchronized" or "pipeline") -- hsi-arb-mode: Arbitration mode for TX frame ("round-robin", "priority") - -Optional HSI configuration properties: - -- hsi-channel-names: A list with one name per channel specified in the - hsi-channel-ids property - - -Device Tree node example for an HSI client: - -hsi-controller { - hsi-port { - modem: hsi-client { - compatible = "nokia,n900-modem"; - - hsi-channel-ids = <0>, <1>, <2>, <3>; - hsi-channel-names = "mcsaab-control", - "speech-control", - "speech-data", - "mcsaab-data"; - hsi-speed-kbps = <55000>; - hsi-mode = "frame"; - hsi-flow = "synchronized"; - hsi-arb-mode = "round-robin"; - - /* more client specific properties */ - }; - }; -}; diff --git a/Documentation/devicetree/bindings/hsi/hsi-client.yaml b/Documentation/devicetree/bindings/hsi/hsi-client.yaml new file mode 100644 index 000000000000..9c8d6887e840 --- /dev/null +++ b/Documentation/devicetree/bindings/hsi/hsi-client.yaml @@ -0,0 +1,81 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hsi/hsi-client.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: HSI bus peripheral + +description: + Each HSI port is supposed to have one child node, which + symbols the remote device connected to the HSI port. + +maintainers: + - Sebastian Reichel + +properties: + hsi-channel-ids: + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 1 + maxItems: 8 + + hsi-channel-names: + minItems: 1 + maxItems: 8 + + hsi-rx-mode: + enum: [stream, frame] + description: Receiver Bit transmission mode + + hsi-tx-mode: + enum: [stream, frame] + description: Transmitter Bit transmission mode + + hsi-mode: + enum: [stream, frame] + description: + May be used instead hsi-rx-mode and hsi-tx-mode if the + transmission mode is the same for receiver and transmitter. + + hsi-speed-kbps: + description: Max bit transmission speed in kbit/s + $ref: /schemas/types.yaml#/definitions/uint32 + + hsi-flow: + enum: [synchronized, pipeline] + description: RX flow type + + hsi-arb-mode: + enum: [round-robin, priority] + description: Arbitration mode for TX frame + +additionalProperties: true + +required: + - compatible + - hsi-channel-ids + - hsi-speed-kbps + - hsi-flow + - hsi-arb-mode + +oneOf: + - required: + - hsi-mode + - required: + - hsi-rx-mode + - hsi-tx-mode + +allOf: + - if: + required: + - hsi-mode + then: + properties: + hsi-rx-mode: false + hsi-tx-mode: false + - if: + required: + - hsi-rx-mode + then: + properties: + hsi-mode: false From patchwork Wed Mar 27 19:11:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 1916980 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45d1:ec00::1; helo=ny.mirrors.kernel.org; envelope-from=devicetree+bounces-53943-incoming-dt=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [IPv6:2604:1380:45d1:ec00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V4brt2R5Jz1yWr for ; Thu, 28 Mar 2024 06:12:14 +1100 (AEDT) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 82DE91C34B3C for ; Wed, 27 Mar 2024 19:12:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1CF36152501; Wed, 27 Mar 2024 19:11:51 +0000 (UTC) X-Original-To: devicetree@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D6BFA152187; Wed, 27 Mar 2024 19:11:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711566710; cv=none; b=cf3jpDlWZOYPHULPhr3ux6ARWFsBdauTJv1HuMaJwsbV6az1I0yXYge8qCuduxeXOR6SaXYBVhyHqhmWFmNG/yusGc19D963zl5sUEa126eBdigkCF6yrWSyMGaYRrLJH+EreNwUCTLpIcnNETY9EHLH8XfaN2oo5HZjI9ae4EM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711566710; c=relaxed/simple; bh=tIFCfgf+3D7TdIVE0ZdE2tSE7iH4jRinyIvff5gv8yI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SbM+Ltj5QyYlzdFuBj9d70OZCxdlAGpzEhOnm7leiCQsZHTZkeujWbOdOyDDjfmkp+A7+/CPwP+safe8j+X8FS8rfQVo88SW0PF2z7Df7A9Z6zhUiwVshIsDU5l/1Xe+/nsbcuc4FKA6ZGNBrNiOOEAq5Z8zCE6UnsuEk8EeOoI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48E9AC43601; Wed, 27 Mar 2024 19:11:50 +0000 (UTC) Received: by mercury (Postfix, from userid 1000) id AB94A1060992; Wed, 27 Mar 2024 20:11:47 +0100 (CET) From: Sebastian Reichel Date: Wed, 27 Mar 2024 20:11:33 +0100 Subject: [PATCH v2 2/7] dt-bindings: hsi: nokia-modem: convert to YAML Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240327-hsi-dt-binding-v2-2-110fab4c32ae@collabora.com> References: <20240327-hsi-dt-binding-v2-0-110fab4c32ae@collabora.com> In-Reply-To: <20240327-hsi-dt-binding-v2-0-110fab4c32ae@collabora.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sebastian Reichel Cc: Tony Lindgren , devicetree@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Reichel X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5307; i=sebastian.reichel@collabora.com; h=from:subject:message-id; bh=tIFCfgf+3D7TdIVE0ZdE2tSE7iH4jRinyIvff5gv8yI=; b=owEBbQKS/ZANAwAKAdju1/PIO/qaAcsmYgBmBG9xESFLsmU9PrlmwWaBhkW2IWl5iC4Fx4xWa BAk/X+EN3uJAjMEAAEKAB0WIQTvZg0HRj+Lcmp5VBPY7tfzyDv6mgUCZgRvcQAKCRDY7tfzyDv6 ms/0D/9PM/pXIrq5uR+J+47qLOAobSWIVB4frfxUJB+0Ej5YCe0AyDv7zCUHM8znJZCB04xrwwW /AF/+6gcgOqBWSY+jgHecpyw3teLyR6r10dCEP48oOwDHJVzS47VXdI9jx1P98PIHpZyHegv9dX iTiCDd3tR3GOkWd6WktrW4U5IW8pia6MFT22PlNncCsz7bv1YoUnujod9dnSECOlGmZ1FBTcOlP Xj63u2HfqKyi/c9jzwda/mIrfRSylybCYs3N766lfs23PAbGUXphMwEXU+6X0EWK8PSiO3oY1QI w6yjeXEuvI+Ot1sSyCeNboZpjSGppEwKYEnGRxKg0mTlA1jbnmIRn/oHmA7/FVEaCkQCE0OcnCp UTotJ6U/5MB3mCExcQByBaSg2gLIEGcpixYOAXjUTw2P7fBgTe9PLp4Cbru54L49qEsFfWlBMew TuLhLAzQ5MXxB0ELSCNlrYVZUP1NWZ0sSS7WPn6qcvwOb7pnAaF54x7CU6MFM/ASGneNHn1jKjx VZmi1Yl/0cD53FZGnQrRd8hbjnj0vfLT64UNEEXBozAd5ge2JdWifWKuO9jw6dNGgaOlmchbo82 dYGM93WS1QqxzjLCtwKQ62bTf1fr2FfWOdzE54b7uU3gnvSnk+IbTO2QqP2rmqhGaIPBu9xQl2v dXWiSb9gYKwf8Zw== X-Developer-Key: i=sebastian.reichel@collabora.com; a=openpgp; fpr=EF660D07463F8B726A795413D8EED7F3C83BFA9A Convert the legacy txt binding to modern YAML. No semantic change. Signed-off-by: Sebastian Reichel Reviewed-by: Krzysztof Kozlowski --- .../devicetree/bindings/hsi/nokia,modem.yaml | 106 +++++++++++++++++++++ .../devicetree/bindings/hsi/nokia-modem.txt | 59 ------------ 2 files changed, 106 insertions(+), 59 deletions(-) diff --git a/Documentation/devicetree/bindings/hsi/nokia,modem.yaml b/Documentation/devicetree/bindings/hsi/nokia,modem.yaml new file mode 100644 index 000000000000..f6d5e2c14329 --- /dev/null +++ b/Documentation/devicetree/bindings/hsi/nokia,modem.yaml @@ -0,0 +1,106 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hsi/nokia,modem.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nokia modem + +maintainers: + - Sebastian Reichel + +properties: + compatible: + enum: + - nokia,n900-modem + - nokia,n950-modem + - nokia,n9-modem + + hsi-channel-ids: + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 4 + maxItems: 4 + + hsi-channel-names: + items: + - const: mcsaab-control + - const: speech-control + - const: speech-data + - const: mcsaab-data + + interrupts: + items: + - description: modem reset indication + + gpios: + minItems: 3 + maxItems: 5 + + gpio-names: + items: + - const: cmt_apeslpx + - const: cmt_rst_rq + - const: cmt_en + - const: cmt_rst + - const: cmt_bsi + minItems: 3 + +required: + - gpios + - gpio-names + - interrupts + +allOf: + - $ref: hsi-client.yaml# + - if: + properties: + compatible: + contains: + enum: + - nokia,n950-modem + - nokia,n9-modem + then: + properties: + gpios: + maxItems: 3 + gpio-names: + maxItems: 3 + else: + properties: + gpios: + minItems: 5 + gpio-names: + minItems: 5 + +unevaluatedProperties: false + +examples: + - | + #include + #include + modem { + compatible = "nokia,n900-modem"; + + hsi-channel-ids = <0>, <1>, <2>, <3>; + hsi-channel-names = "mcsaab-control", + "speech-control", + "speech-data", + "mcsaab-data"; + hsi-speed-kbps = <55000>; + hsi-mode = "frame"; + hsi-flow = "synchronized"; + hsi-arb-mode = "round-robin"; + + interrupts-extended = <&gpio3 8 IRQ_TYPE_EDGE_FALLING>; + + gpios = <&gpio3 6 GPIO_ACTIVE_HIGH>, + <&gpio3 9 GPIO_ACTIVE_HIGH>, + <&gpio3 10 GPIO_ACTIVE_HIGH>, + <&gpio3 11 GPIO_ACTIVE_HIGH>, + <&gpio5 29 GPIO_ACTIVE_HIGH>; + gpio-names = "cmt_apeslpx", + "cmt_rst_rq", + "cmt_en", + "cmt_rst", + "cmt_bsi"; + }; diff --git a/Documentation/devicetree/bindings/hsi/nokia-modem.txt b/Documentation/devicetree/bindings/hsi/nokia-modem.txt deleted file mode 100644 index 53de1d9d0b95..000000000000 --- a/Documentation/devicetree/bindings/hsi/nokia-modem.txt +++ /dev/null @@ -1,59 +0,0 @@ -Nokia modem client bindings - -The Nokia modem HSI client follows the common HSI client binding -and inherits all required properties. The following additional -properties are needed by the Nokia modem HSI client: - -Required properties: -- compatible: Should be one of - "nokia,n900-modem" - "nokia,n950-modem" - "nokia,n9-modem" -- hsi-channel-names: Should contain the following strings - "mcsaab-control" - "speech-control" - "speech-data" - "mcsaab-data" -- gpios: Should provide a GPIO handler for each GPIO listed in - gpio-names -- gpio-names: Should contain the following strings - "cmt_apeslpx" (for n900, n950, n9) - "cmt_rst_rq" (for n900, n950, n9) - "cmt_en" (for n900, n950, n9) - "cmt_rst" (for n900) - "cmt_bsi" (for n900) -- interrupts: Should be IRQ handle for modem's reset indication - -Example: - -&ssi_port { - modem: hsi-client { - compatible = "nokia,n900-modem"; - - pinctrl-names = "default"; - pinctrl-0 = <&modem_pins>; - - hsi-channel-ids = <0>, <1>, <2>, <3>; - hsi-channel-names = "mcsaab-control", - "speech-control", - "speech-data", - "mcsaab-data"; - hsi-speed-kbps = <55000>; - hsi-mode = "frame"; - hsi-flow = "synchronized"; - hsi-arb-mode = "round-robin"; - - interrupts-extended = <&gpio3 8 IRQ_TYPE_EDGE_FALLING>; /* 72 */ - - gpios = <&gpio3 6 GPIO_ACTIVE_HIGH>, /* 70 */ - <&gpio3 9 GPIO_ACTIVE_HIGH>, /* 73 */ - <&gpio3 10 GPIO_ACTIVE_HIGH>, /* 74 */ - <&gpio3 11 GPIO_ACTIVE_HIGH>, /* 75 */ - <&gpio5 29 GPIO_ACTIVE_HIGH>; /* 157 */ - gpio-names = "cmt_apeslpx", - "cmt_rst_rq", - "cmt_en", - "cmt_rst", - "cmt_bsi"; - }; -}; From patchwork Wed Mar 27 19:11:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 1916978 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45d1:ec00::1; helo=ny.mirrors.kernel.org; envelope-from=devicetree+bounces-53942-incoming-dt=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [IPv6:2604:1380:45d1:ec00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V4brl5r94z1yWr for ; Thu, 28 Mar 2024 06:12:07 +1100 (AEDT) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E9C131C34987 for ; Wed, 27 Mar 2024 19:12:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EBA8B15218E; Wed, 27 Mar 2024 19:11:50 +0000 (UTC) X-Original-To: devicetree@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B29601514F7; Wed, 27 Mar 2024 19:11:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711566710; cv=none; b=YwB/v5aYVlquUEg1ymUM+H15KkObmfPdkYbavnWMZ/JTi4+hcZFJrznGCtWgyck8J4SCYR6EhE6ZpwSOIb96EGYAJFwJV7W3rLLJZ7oTrGFuEojFeXjkR212a3A8nNLWmJ+vEiq0ol2pyU3b8xz90+ATdyJdv+IhvP2fDKcNWpU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711566710; c=relaxed/simple; bh=QEypX0koF50hLwLiw3vI6BhqvWJKBNcpPHUeY0AUQ/8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RiN2X6QBC16SBd5Cx7QAb5zsqnsU90IgEbe5JjtEYdIk/8+zFdvzIsYvysPIURnYmL/gBPZfLfSAkn9JHhZDMTvXrL/Q61TlvMEiPMwRx5C5YJvcsniGDiBrLOt9nbYSr2KDZ0P/Vxphb3DFSge/IWGlw2/nccRX9T5/cYRe93Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34982C433C7; Wed, 27 Mar 2024 19:11:50 +0000 (UTC) Received: by mercury (Postfix, from userid 1000) id AD5BB1060993; Wed, 27 Mar 2024 20:11:47 +0100 (CET) From: Sebastian Reichel Date: Wed, 27 Mar 2024 20:11:34 +0100 Subject: [PATCH v2 3/7] dt-bindings: hsi: omap-ssi: convert to YAML Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240327-hsi-dt-binding-v2-3-110fab4c32ae@collabora.com> References: <20240327-hsi-dt-binding-v2-0-110fab4c32ae@collabora.com> In-Reply-To: <20240327-hsi-dt-binding-v2-0-110fab4c32ae@collabora.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sebastian Reichel Cc: Tony Lindgren , devicetree@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Reichel X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=8354; i=sebastian.reichel@collabora.com; h=from:subject:message-id; bh=QEypX0koF50hLwLiw3vI6BhqvWJKBNcpPHUeY0AUQ/8=; b=owEBbQKS/ZANAwAKAdju1/PIO/qaAcsmYgBmBG9yaxeLOrJKcUkBJ9mYhbqP+EYCaLKDPcv20 Je3kFZMTfqJAjMEAAEKAB0WIQTvZg0HRj+Lcmp5VBPY7tfzyDv6mgUCZgRvcgAKCRDY7tfzyDv6 mnRjD/9JsnxIhUBlP7y7H5W0vxIBYCOv4cbIbjYh0QA+01RAPM6V9LHrT8/oCXLJBp8tCO0Hqia Bx1zdBUfI5YrMncpsYk8cSW3k97fytOAHguRe5Omk4sQgVnorClyx3/HdXVNMXlCO3pZ3gciRBa AumsUcZdR8dOU3FPytqRNyLTd+ODS8nAvRV4UEawo2fAwko28i/RHqxOGxcjYybFCWRa+gfHKFO Evgke9ccDWbjMKax/eFyipzKyfiii8cfKLOVPKqPfrfHCR0+e9aUiIog2+0pC7y4Tm+elaGobxI CkIx8iZr3hSQscAszbpBVAsUWGc2gNJU0rquZokm9MmZ14y9YLsa8lpYDm4qIcb+yVQufOHJ43M hNskVe7/vMdwjuLj/eD3+wenlT66m2wHSN71mp7Sjdoib0gOWKwOYmmc+GvDeCETXMrC8n8kqGh BD6jKNFofObQ8ooVy4aSiS++V4Cn0PsLD7Ek9m7sTmLcsqxxX5FJ3Bfx+L6L/j4gl2iy9AO5IyG d7sIqJKX/2whA9XlLRSgjmk3zem+RELRSuKUR9J2gX4MMuhPoW2ObyyeEkLNpwQwJGBWqCOofnv OrtgMv2XfQ02TOEpm7hE/cEikNrBrSFBgnrYfz27SPEY1fsCdd0eG2nOlz/DsTZDdVOBqcBBajl RBo/Oa0rVSDXYIg== X-Developer-Key: i=sebastian.reichel@collabora.com; a=openpgp; fpr=EF660D07463F8B726A795413D8EED7F3C83BFA9A Convert the legacy txt binding to modern YAML. There are a couple of semantic changes: - hsi-port@ and ssi-port@ node name changed to port@ - ti,hwmods was marked as deprecated. This is supposed to go away once OMAP3 gets the same treatment as OMAP4. - changed ti,cawake-gpio to ti,cawake-gpios - describe peripheral requirements for the port node Signed-off-by: Sebastian Reichel Reviewed-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/hsi/omap-ssi.txt | 102 ------------ .../devicetree/bindings/hsi/ti,omap-ssi.yaml | 177 +++++++++++++++++++++ 2 files changed, 177 insertions(+), 102 deletions(-) diff --git a/Documentation/devicetree/bindings/hsi/omap-ssi.txt b/Documentation/devicetree/bindings/hsi/omap-ssi.txt deleted file mode 100644 index 77a0c3c3036e..000000000000 --- a/Documentation/devicetree/bindings/hsi/omap-ssi.txt +++ /dev/null @@ -1,102 +0,0 @@ -OMAP SSI controller bindings - -OMAP3's Synchronous Serial Interface (SSI) controller implements a -legacy variant of MIPI's High Speed Synchronous Serial Interface (HSI), -while the controller found inside OMAP4 is supposed to be fully compliant -with the HSI standard. - -Required properties: -- compatible: Should include "ti,omap3-ssi" or "ti,omap4-hsi" -- reg-names: Contains the values "sys" and "gdd" (in this order). -- reg: Contains a matching register specifier for each entry - in reg-names. -- interrupt-names: Contains the value "gdd_mpu". -- interrupts: Contains matching interrupt information for each entry - in interrupt-names. -- ranges: Represents the bus address mapping between the main - controller node and the child nodes below. -- clock-names: Must include the following entries: - "ssi_ssr_fck": The OMAP clock of that name - "ssi_sst_fck": The OMAP clock of that name - "ssi_ick": The OMAP clock of that name -- clocks: Contains a matching clock specifier for each entry in - clock-names. -- #address-cells: Should be set to <1> -- #size-cells: Should be set to <1> - -Each port is represented as a sub-node of the ti,omap3-ssi device. - -Required Port sub-node properties: -- compatible: Should be set to the following value - ti,omap3-ssi-port (applicable to OMAP34xx devices) - ti,omap4-hsi-port (applicable to OMAP44xx devices) -- reg-names: Contains the values "tx" and "rx" (in this order). -- reg: Contains a matching register specifier for each entry - in reg-names. -- interrupts: Should contain interrupt specifiers for mpu interrupts - 0 and 1 (in this order). -- ti,ssi-cawake-gpio: Defines which GPIO pin is used to signify CAWAKE - events for the port. This is an optional board-specific - property. If it's missing the port will not be - enabled. - -Optional properties: -- ti,hwmods: Shall contain TI interconnect module name if needed - by the SoC - -Example for Nokia N900: - -ssi-controller@48058000 { - compatible = "ti,omap3-ssi"; - - /* needed until hwmod is updated to use the compatible string */ - ti,hwmods = "ssi"; - - reg = <0x48058000 0x1000>, - <0x48059000 0x1000>; - reg-names = "sys", - "gdd"; - - interrupts = <55>; - interrupt-names = "gdd_mpu"; - - clocks = <&ssi_ssr_fck>, - <&ssi_sst_fck>, - <&ssi_ick>; - clock-names = "ssi_ssr_fck", - "ssi_sst_fck", - "ssi_ick"; - - #address-cells = <1>; - #size-cells = <1>; - ranges; - - ssi-port@4805a000 { - compatible = "ti,omap3-ssi-port"; - - reg = <0x4805a000 0x800>, - <0x4805a800 0x800>; - reg-names = "tx", - "rx"; - - interrupt-parent = <&intc>; - interrupts = <67>, - <68>; - - ti,ssi-cawake-gpio = <&gpio5 23 GPIO_ACTIVE_HIGH>; /* 151 */ - } - - ssi-port@4805a000 { - compatible = "ti,omap3-ssi-port"; - - reg = <0x4805b000 0x800>, - <0x4805b800 0x800>; - reg-names = "tx", - "rx"; - - interrupt-parent = <&intc>; - interrupts = <69>, - <70>; - - } -} diff --git a/Documentation/devicetree/bindings/hsi/ti,omap-ssi.yaml b/Documentation/devicetree/bindings/hsi/ti,omap-ssi.yaml new file mode 100644 index 000000000000..433e2b2c36ea --- /dev/null +++ b/Documentation/devicetree/bindings/hsi/ti,omap-ssi.yaml @@ -0,0 +1,177 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hsi/ti,omap-ssi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: SSI Controller on OMAP SoCs + +description: + OMAP3's Synchronous Serial Interface (SSI) controller implements a + legacy variant of MIPI's High Speed Synchronous Serial Interface (HSI), + while the controller found inside OMAP4 is supposed to be fully compliant + with the HSI standard. + +maintainers: + - Sebastian Reichel + +properties: + compatible: + enum: + - ti,omap3-ssi + - ti,omap4-hsi + + reg: + items: + - description: registers for sys + - description: registers for gdd + + reg-names: + items: + - const: sys + - const: gdd + + ranges: true + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + clocks: + minItems: 1 + maxItems: 3 + + clock-names: + minItems: 1 + maxItems: 3 + + interrupts: + maxItems: 1 + + interrupt-names: + const: gdd_mpu + + ti,hwmods: + const: ssi + deprecated: true + +patternProperties: + "port@[0-9a-f]+": + type: object + additionalProperties: false + + properties: + compatible: + enum: + - ti,omap3-ssi-port + - ti,omap4-hsi-port + + reg: + items: + - description: TX registers + - description: RX registers + + reg-names: + items: + - const: tx + - const: rx + + interrupts: + items: + - description: MPU interrupt 0 + - description: MPU interrupt 1 + minItems: 1 + + ti,ssi-cawake-gpios: + description: GPIO signifying CAWAKE events + maxItems: 1 + + patternProperties: + "^(modem|mcu)$": + type: object + $ref: /schemas/hsi/hsi-client.yaml# + + required: + - compatible + - reg + - reg-names + - interrupts + +required: + - compatible + - reg + - reg-names + - ranges + - "#address-cells" + - "#size-cells" + - clocks + - clock-names + - interrupts + - interrupt-names + +allOf: + - if: + properties: + compatible: + contains: + const: ti,omap3-ssi + then: + properties: + clocks: + minItems: 3 + clock-names: + items: + - const: ssi_ssr_fck + - const: ssi_sst_fck + - const: ssi_ick + else: + properties: + clocks: + maxItems: 1 + clock-names: + items: + - const: hsi_fck + +additionalProperties: false + +examples: + - | + #include + ssi-controller@48058000 { + compatible = "ti,omap3-ssi"; + reg = <0x48058000 0x1000>, + <0x48059000 0x1000>; + reg-names = "sys", "gdd"; + ranges; + #address-cells = <1>; + #size-cells = <1>; + clocks = <&ssi_ssr_fck>, + <&ssi_sst_fck>, + <&ssi_ick>; + clock-names = "ssi_ssr_fck", + "ssi_sst_fck", + "ssi_ick"; + interrupts = <55>; + interrupt-names = "gdd_mpu"; + + port@4805a000 { + compatible = "ti,omap3-ssi-port"; + reg = <0x4805a000 0x800>, + <0x4805a800 0x800>; + reg-names = "tx", "rx"; + interrupt-parent = <&intc>; + interrupts = <67>, <68>; + ti,ssi-cawake-gpios = <&gpio5 23 GPIO_ACTIVE_HIGH>; + }; + + port@4805b000 { + compatible = "ti,omap3-ssi-port"; + reg = <0x4805b000 0x800>, + <0x4805b800 0x800>; + reg-names = "tx", "rx"; + interrupt-parent = <&intc>; + interrupts = <69>, <70>; + }; + };