From patchwork Sun Mar 9 13:29:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 14008460 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4D4EAC28B30 for ; Sun, 9 Mar 2025 13:39:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AW0nma9HgK6JpescqiZY2lPoU7lN0ctkdlJcHik5rzA=; b=HMaYZOKSiB6gRh T0nA3nQy5djA5+Etz+9b5zvyrMvEKST8xBybihVJ3pmiXmSTF9wbDtjxXcOBCe6Q767om7LJZsY2Q Swy23bToxqhsorL0wzvr52pQStHBBvjO553LIOESIpOQ+AfISRIadB/Lf7nlzLJkwy4ZD4abF7y2H KtQiCQQxeDpaaO5lIBdGueVLe4lQWCMEA4SvO1I0PIsrprcxu3BzSfhUpOlq/sCUzOD0fNsmwN1X9 B74zgnDRGEd5LzgCNzmtxUeidIXbo6t/jn8sYtnAgSuryC9LtSz8hhriG0bL/Z41N+ltVz5z0OWFU 9Q7EyEi7QRpGTLnjOdUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1trGrv-00000000bj5-06nq; Sun, 09 Mar 2025 13:39:03 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1trGju-00000000aRP-0vxU; Sun, 09 Mar 2025 13:30:47 +0000 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-3913d129c1aso598352f8f.0; Sun, 09 Mar 2025 06:30:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741527044; x=1742131844; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=K7rAztQuL1fqEwNhgIxMbKU2YwJ5HINRdQASSAMKL28=; b=ewXodrbadtZ2r78GlteYvHMvpByVhiF1XPzjT7bPd80ftsouMrjtBfp2+iRz3T22Cp ZZwFgQ9WhRxDQL3VimVis3xzb4oKsSTh9gszvR34b6zD/9nG1NHZrrpL2T0it50hyS0w wrneM+/LyWtByv7Y4zcIXV1FeK080A9KFpTiX8duVtpjPOEaaSzwn/SX+uOr7WJ6odQF Ji+A86nLkdhYgriPiDzpBI6l00vmkoiWZS1HsZxvH6GE4zJeP8X+ddu5rdnozCTSbUfk RYfxPdPGBvEzHAmHpWAu1hsznDreFqVLPU7Al5wjaKRYDg+FAvKhVGxN/a1CX8Yxetdo I93w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741527044; x=1742131844; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=K7rAztQuL1fqEwNhgIxMbKU2YwJ5HINRdQASSAMKL28=; b=ETljoxiaYDKKBcvtUUnxqR6owekuKSbTDI1S0WQkaFOsMvnESrX7QprR4FLmmH9LMU 3xExwlSL8TLOnxlfAqx64yZK7xj260qkrRnIZpkNF3/LN72N+WEplV5tv8uek3CHhlcs JKoKiX4aNhKool9mDipGU3wJumdpGqjAL91QozL3eMJP+dkDOFBiwUa5MFGQJ7FhAB/O RDVg58FedfMiQKPngyfN9c2kGNUdvYnI7Jmlfmeopt+39b7DRxCsbLlccLMrrz91SJqc Xx6sBI7q5DQNRtlU293DcOFaWkvwVjABLDlvBAcxkVB5OaqQJd/e5gQ//B0h5lwFE/xJ fisQ== X-Forwarded-Encrypted: i=1; AJvYcCVNAormmiOtly6QvywGeyVGTTlnf+2jTNYnmrPO3vJu1A1bvCEuVsiGtzF6UERJ0rytQDWxV7gXdHs2XzvgXzQ0@lists.infradead.org, AJvYcCWYVix7M8ZQYyYqAjqHnIbe13+qg4lGC7U3UPOb1pKAixp1RxMdQYF2xDUKnchUY5rNyBqSM5zKi0epmUhtjiI=@lists.infradead.org, AJvYcCXwvj+dbd+95vfUkRqiD8zHNhKqzZxBVUUUYuCaAZJYBMB2EqLgMUaIfx+RIpD62praBD06Gi9Gh7Y1@lists.infradead.org X-Gm-Message-State: AOJu0Yzn0JDN5M9chSoGyj933m3prQrehLx9QYH4NguyoJ8tI7HoNwWf JA6cBd2+PeKIOBI+ZoviRlSWFTxcAaLVxHEjERaFfcSaS5JjQlHr X-Gm-Gg: ASbGncvT7S5xwlRgz714ZvHUsomhpaQttIDVU+SjJt6pTWFAAUTnsOnIqxde7rmcHki esgZJ6iPNNXkbX1FwvZAW7psnv/llV9XAXwfYXoQVPX3gmlrJ/R9eoWH3AO0EW3Z37DQEHi3qoF FRmZvEO7o4+tnrk6+voxMreyhNF08yesCVmK9ObMPih26174erw+EE/63HLHYmQSpWf4UAcpxpe jB6A26/FNo1l8uspPCI0gUh0JhJJuRRNOXrjRsrhxwzQwzNhIlHXzrtOViuFZxlX43Xsa4R2TeK ZDG+wnwSb0mz+JDGuQq3h7viyKV8NNBaMxglpWaxSpVpxhC0LuZiSL1/uASQUUAkbUZzvVWsKzy 1j4if3gFe+JZFNw== X-Google-Smtp-Source: AGHT+IEuhfvObU9vao062mg4FvmF1NzkPbIvIIx2h56yBlcCJSeWP0LGYj1OCWvIasRINrETP+XnDA== X-Received: by 2002:a05:6000:1842:b0:390:f116:d220 with SMTP id ffacd0b85a97d-3913af09864mr3103348f8f.17.1741527044465; Sun, 09 Mar 2025 06:30:44 -0700 (PDT) Received: from localhost.localdomain (93-34-90-129.ip49.fastwebnet.it. [93.34.90.129]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-3912bee262esm11867536f8f.0.2025.03.09.06.30.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Mar 2025 06:30:44 -0700 (PDT) From: Christian Marangi To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Christian Marangi , Vinod Koul , Kishon Vijay Abraham I , Matthias Brugger , AngeloGioacchino Del Regno , Greg Kroah-Hartman , Lorenzo Bianconi , Daniel Danzberger , Arnd Bergmann , Linus Walleij , Nikita Shubin , Guo Ren , Yangyu Chen , Ben Hutchings , Felix Fietkau , 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 Message-ID: <20250309132959.19045-5-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250309132959.19045-1-ansuelsmth@gmail.com> References: <20250309132959.19045-1-ansuelsmth@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250309_063046_287080_05E4BD21 X-CRM114-Status: GOOD ( 19.89 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org 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 --- .../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 + +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 + + system-controller { + compatible = "airoha,an7581-scu-ssr"; + + airoha,serdes-wifi1 = ; + airoha,serdes-wifi2 = ; + airoha,serdes-usb2 = ; + }; 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 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