From: Christian Marangi <ansuelsmth@gmail.com>
To: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Lee Jones <lee@kernel.org>,
Christian Marangi <ansuelsmth@gmail.com>,
Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Daniel Danzberger <dd@embedd.com>, Arnd Bergmann <arnd@arndb.de>,
Linus Walleij <linus.walleij@linaro.org>,
Nikita Shubin <nikita.shubin@maquefel.me>,
Guo Ren <guoren@kernel.org>, Yangyu Chen <cyy@cyyself.name>,
Ben Hutchings <ben@decadent.org.uk>, Felix Fietkau <nbd@nbd.name>,
linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-phy@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-usb@vger.kernel.org,
upstream@airoha.com
Subject: [PATCH 04/13] dt-bindings: soc: airoha: add Documentation for Airoha AN7581 SCU SSR
Date: Sun, 9 Mar 2025 14:29:35 +0100 [thread overview]
Message-ID: <20250309132959.19045-5-ansuelsmth@gmail.com> (raw)
In-Reply-To: <20250309132959.19045-1-ansuelsmth@gmail.com>
The Airoha AN7581 SoC have in the SCU register space particular
address that control how some peripheral are configured.
These are toggeled in the System Status Register and are used to
toggle Serdes port for USB 3.0 mode or HSGMII, USB 3.0 mode or PCIe2
or setup port for PCIe mode or Ethrnet mode (HSGMII/USXGMII).
Modes are mutually exclusive and selecting one mode cause the
other feature to not work (example a mode in USB 3.0 cause PCIe
port 2 to not work) This depends also on what is physically
connected to the Hardware and needs to correctly reflect the
System Status Register bits.
Special care is needed for PCIe port 0 in 2 line mode that
requires both WiFi1 and WiFi2 Serdes port set to PCIe0 2 Line
mode.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
.../soc/airoha/airoha,an7581-scu-ssr.yaml | 106 ++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 107 insertions(+)
create mode 100644 Documentation/devicetree/bindings/soc/airoha/airoha,an7581-scu-ssr.yaml
diff --git a/Documentation/devicetree/bindings/soc/airoha/airoha,an7581-scu-ssr.yaml b/Documentation/devicetree/bindings/soc/airoha/airoha,an7581-scu-ssr.yaml
new file mode 100644
index 000000000000..4bbf6e3b79a4
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/airoha/airoha,an7581-scu-ssr.yaml
@@ -0,0 +1,106 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/airoha/airoha,an7581-scu-ssr.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Airoha AN7581 SCU System Status Register
+
+maintainers:
+ - Christian Marangi <ansuelsmth@gmail.com>
+
+description: >
+ The Airoha AN7581 SoC have in the SCU register space particular
+ address that control how some peripheral are configured.
+
+ These are toggeled in the System Status Register and are used to
+ toggle Serdes port for USB 3.0 mode or HSGMII, USB 3.0 mode or PCIe2
+ or setup port for PCIe mode or Ethrnet mode (HSGMII/USXGMII).
+
+ Modes are mutually exclusive and selecting one mode cause the
+ other feature to not work (example a mode in USB 3.0 cause PCIe
+ port 2 to not work) This depends also on what is physically
+ connected to the Hardware and needs to correctly reflect the
+ System Status Register bits.
+
+ Special care is needed for PCIe port 0 in 2 line mode that
+ requires both WiFi1 and WiFi2 Serdes port set to PCIe0 2 Line
+ mode.
+
+properties:
+ compatible:
+ const: airoha,an7581-scu-ssr
+
+ airoha,serdes-wifi1:
+ description: |
+ Configure the Wifi1 Serdes port for:
+ - 0: PCIe0 2 Line
+ - 1: PCIe0 1 Line
+ - 2: Ethernet modes (HSGMII/USXGMII)
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1, 2]
+ default: 1
+
+ airoha,serdes-wifi2:
+ description: |
+ Configure the Wifi2 Serdes port for:
+ - 0: PCIe0 2 Line
+ - 1: PCIe1 1 Line
+ - 2: Ethernet modes (HSGMII/USXGMII)
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1, 2]
+ default: 1
+
+ airoha,serdes-usb1:
+ description: |
+ Configure the USB1 Serdes port for:
+ - 0: USB 3.0
+ - 1: Ethernet modes (HSGMII)
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+ default: 0
+
+ airoha,serdes-usb2:
+ description: |
+ Configure the USB2 Serdes port for:
+ - 0: USB 3.0
+ - 1: PCIe2 1 Line
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+ default: 0
+
+required:
+ - compatible
+
+allOf:
+ - if:
+ properties:
+ airoha,serdes-wifi1:
+ const: 0
+ then:
+ properties:
+ airoha,serdes-wifi2:
+ const: 0
+
+ - if:
+ properties:
+ airoha,serdes-wifi2:
+ const: 0
+ then:
+ properties:
+ airoha,serdes-wifi1:
+ const: 0
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/soc/airoha,scu-ssr.h>
+
+ system-controller {
+ compatible = "airoha,an7581-scu-ssr";
+
+ airoha,serdes-wifi1 = <AIROHA_SCU_SSR_WIFI1_PCIE0_2LINE>;
+ airoha,serdes-wifi2 = <AIROHA_SCU_SSR_WIFI2_PCIE0_2LINE>;
+ airoha,serdes-usb2 = <AIROHA_SCU_SSR_USB2_PCIE2>;
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index d3125268d63f..9944845ae9f5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -740,6 +740,7 @@ AIROHA SCU SSR DRIVER
M: Christian Marangi <ansuelsmth@gmail.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
+F: Documentation/devicetree/bindings/soc/airoha/airoha,an7581-scu-ssr.yaml
F: include/dt-bindings/soc/airoha,scu-ssr.h
AIROHA SPI SNFI DRIVER
--
2.48.1
next prev parent reply other threads:[~2025-03-09 13:30 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-09 13:29 [PATCH 00/13] airoha: en7581: clk cleanup + USB support Christian Marangi
2025-03-09 13:29 ` [PATCH 01/13] clk: en7523: convert driver to regmap API Christian Marangi
2025-03-09 13:29 ` [PATCH 02/13] clk: en7523: generalize register clocks function Christian Marangi
2025-03-09 13:29 ` [PATCH 03/13] dt-bindings: soc: airoha: add SCU SSR Serdes port binding Christian Marangi
2025-03-10 7:54 ` Krzysztof Kozlowski
2025-03-10 10:30 ` Christian Marangi
2025-03-09 13:29 ` Christian Marangi [this message]
2025-03-10 8:00 ` [PATCH 04/13] dt-bindings: soc: airoha: add Documentation for Airoha AN7581 SCU SSR Krzysztof Kozlowski
2025-03-10 10:33 ` Christian Marangi
2025-03-09 13:29 ` [PATCH 05/13] dt-bindings: mfd: add Documentation for Airoha EN7581 SCU Christian Marangi
2025-03-09 14:49 ` Rob Herring (Arm)
2025-03-10 8:01 ` Krzysztof Kozlowski
2025-03-10 9:21 ` Krzysztof Kozlowski
2025-03-10 10:47 ` Christian Marangi
2025-03-10 11:41 ` Krzysztof Kozlowski
2025-03-11 19:09 ` Christian Marangi
2025-03-16 17:11 ` Krzysztof Kozlowski
2025-03-09 13:29 ` [PATCH 06/13] dt-bindings: clock: airoha: make reg optional for Airoha EN7581 Christian Marangi
2025-03-10 8:06 ` Krzysztof Kozlowski
2025-03-09 13:29 ` [PATCH 07/13] clk: en7523: support getting regmap from parent node for EN7581 Christian Marangi
2025-03-09 13:29 ` [PATCH 08/13] soc: airoha: add support for configuring SCU SSR Serdes port Christian Marangi
2025-03-09 13:29 ` [PATCH 09/13] dt-bindings: phy: Add documentation for Airoha AN7581 USB PHY Christian Marangi
2025-03-09 15:50 ` kernel test robot
2025-03-10 16:34 ` Krzysztof Kozlowski
2025-03-11 18:51 ` Christian Marangi
2025-03-16 17:01 ` Krzysztof Kozlowski
2025-03-18 11:31 ` Christian Marangi
2025-03-19 7:39 ` Krzysztof Kozlowski
2025-03-09 13:29 ` [PATCH 10/13] phy: airoha: Add support " Christian Marangi
2025-03-11 11:40 ` Vinod Koul
2025-03-11 11:42 ` Vinod Koul
2025-03-11 18:09 ` Christian Marangi
2025-03-09 13:29 ` [PATCH 11/13] usb: host: add ARCH_AIROHA in XHCI MTK dependency Christian Marangi
2025-03-09 13:29 ` [PATCH 12/13] arm64: dts: airoha: en7581: convert SCU clock node to MFD implementation Christian Marangi
2025-03-10 8:06 ` Krzysztof Kozlowski
2025-03-09 13:29 ` [PATCH 13/13] arm64: dts: airoha: en7581: add USB and SCU SSR nodes Christian Marangi
2025-03-10 14:36 ` [PATCH 00/13] airoha: en7581: clk cleanup + USB support Rob Herring (Arm)
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=20250309132959.19045-5-ansuelsmth@gmail.com \
--to=ansuelsmth@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=arnd@arndb.de \
--cc=ben@decadent.org.uk \
--cc=conor+dt@kernel.org \
--cc=cyy@cyyself.name \
--cc=dd@embedd.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=guoren@kernel.org \
--cc=kishon@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=mturquette@baylibre.com \
--cc=nbd@nbd.name \
--cc=nikita.shubin@maquefel.me \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=upstream@airoha.com \
--cc=vkoul@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).