Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2229928rdb; Mon, 20 Nov 2023 05:53:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpzDgpjD2VBIogx9b9sjwpOZ4AtS1/YFA9/NRUjlUBUXcA5lpu+Cvf0bkTtHoY+SUNVwAY X-Received: by 2002:a05:6808:6491:b0:3b2:e51a:a44d with SMTP id fh17-20020a056808649100b003b2e51aa44dmr9330283oib.34.1700488419650; Mon, 20 Nov 2023 05:53:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700488419; cv=none; d=google.com; s=arc-20160816; b=crVbh8v0xyG7eXrlGTfqY4ppNdVzOnmNg7JNoDYYl7LvZci3MRBFO1ggUDh2NBQMOq rEwwL5mCT15kb+e7Af2bPV9r3bm+bO44/nQqQcdQTvPSUwihGAK4jGudawroc9q5T1Gl ndBF6/yldpR0ULFO7wtmQDzMU3+kYQ2f6LkW4R1JjFbm/ea6IlEibbG2RyfMVe/daDZP oDLvwFcah+xf1nNIcGdGlN0QMHyhcqrsNIWhlaExHum21EHnn3bCCqQQYUzcJPSv/AZy lod2GVF5nwTAFlGob92YuJL9//8xjmobqTXh2Lhbf6TztIx/8SObrg8RSy87/6DQlKfv ac9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=4oWbW7U8hDbK7k3dW8cQqnctME3Rpq10CqBR82g551s=; fh=zPyAtQBIWE/l9hby8g4KTASOZz1Q4ly6b7sYfyUlIrs=; b=GDBqSQ40IzQLm0fjfIDlfrUpVlS71B4fPgOileaw+NpmrnzMVf2lQfuOABgTn4hzTk 7xJoXPoF3GL0sk0UaDmOwkdEIxac6YOwtPVWAXraB2zFlQtw6NysxPDA9Aou1FO3S8GU nf3MTU3yidz3ugoRLVwpss7FdGkOaqPesNwhPGx/Q9+shXxCWwtcFY8gmrc52QzHKJNi gbThUI8DHDdLU4Ht1y8zDgorZnIq5LqEmO5FVGeOR7jKYei5nHAIp5M1AfOVZXtr4+5j QLZ1ksF4E8/TQqf2j0KR86zp8e5NAPfCDSM2JrMdzY0JuLNorTzC2OtQdAz7wz2vhzTe MZfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CzzUKVvm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id h26-20020a63531a000000b005b95fbb1747si8103396pgb.761.2023.11.20.05.53.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 05:53:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CzzUKVvm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C8025801D0FA; Mon, 20 Nov 2023 05:52:43 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233443AbjKTNwS (ORCPT + 99 others); Mon, 20 Nov 2023 08:52:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233448AbjKTNvm (ORCPT ); Mon, 20 Nov 2023 08:51:42 -0500 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42EB010F2; Mon, 20 Nov 2023 05:51:33 -0800 (PST) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4083f613275so17334675e9.2; Mon, 20 Nov 2023 05:51:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700488291; x=1701093091; darn=vger.kernel.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=4oWbW7U8hDbK7k3dW8cQqnctME3Rpq10CqBR82g551s=; b=CzzUKVvmkp5BfeDYesxJl1FL4w+Ld41Uvsk5nB2hPADF7Ge85QruVFbx1twhJmSgeX QSInIKpAo5xdDnnhWz3ey5LgYginkJvC6sNiGxGXlwjYYMHun2WOp4fwUo/f34CgIA7q orcaIzGoeF9brek8CDaWlWI5G+B+hVwmM0lK5waaZd4gts+EvslyHP06BD23fdAM9I4S 3cmnikIEUZ19yu7ldoZ0xMmwVhtKlv3APVx1/FVdp17bD7R1eImu0K7Kzk58gMq89Sn3 kEkLw9jYLilD5oAf+pfBPSm1b/hWdmJqHDvFQ6saTrzrecp0PRNeUlwwQG65bfdocf/P b6Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700488291; x=1701093091; 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=4oWbW7U8hDbK7k3dW8cQqnctME3Rpq10CqBR82g551s=; b=tFOPECHW6aRuwCFNl7KZJhQewIfJwz+heV3+Awyw6JIhnpee0MSCXwo/pPzb0XxXgo w+RXZvciMkcPAjVSmPDNLpnVwV6PlJlLn/LivIjm0gAQiEBuXs/sXITDv4ClmwBLpUC9 evPElXSNvUnQeYJ5T0zpM1L8VxC1nnECvtcGJ60KK/efbGbZLWUg0Y7SqIQ252dwBi4h IviD/hmf5eKSd5eZaRoAVx1qZ/FDs08zagDl3MlrsrLL1DcDr9IzJeqM7sTjQH2TSz7g pf6E6GLskaKz1pvawh104luIzawf3TjcEQLtXjJ8vEpjG2iH1rLof4Wd77uxNj7SUIdx 824g== X-Gm-Message-State: AOJu0YzCpiMFh7mNJZEty3AhohMmwrwh7PuXx6sAUYapHcTYL0OCtpnM Bc3meee2qjGCJ3eJpbLluPo= X-Received: by 2002:a05:600c:4ed2:b0:405:4a78:a890 with SMTP id g18-20020a05600c4ed200b004054a78a890mr5843086wmq.8.1700488291376; Mon, 20 Nov 2023 05:51:31 -0800 (PST) Received: from localhost.localdomain (93-34-89-13.ip49.fastwebnet.it. [93.34.89.13]) by smtp.googlemail.com with ESMTPSA id j33-20020a05600c1c2100b0040772934b12sm18205846wms.7.2023.11.20.05.51.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 05:51:31 -0800 (PST) From: Christian Marangi To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Gross , Bjorn Andersson , Konrad Dybcio , Andrew Lunn , Heiner Kallweit , Russell King , Florian Fainelli , Broadcom internal kernel review list , Daniel Golle , Qingfang Deng , SkyLake Huang , Matthias Brugger , AngeloGioacchino Del Regno , David Epping , Vladimir Oltean , Christian Marangi , "Russell King (Oracle)" , Harini Katakam , Simon Horman , Robert Marko , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [net-next RFC PATCH 12/14] dt-bindings: net: Document Qcom QCA807x PHY package Date: Mon, 20 Nov 2023 14:50:39 +0100 Message-Id: <20231120135041.15259-13-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231120135041.15259-1-ansuelsmth@gmail.com> References: <20231120135041.15259-1-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 20 Nov 2023 05:52:44 -0800 (PST) Document Qcom QCA807x PHY package. Qualcomm QCA807X Ethernet PHY is PHY package of 2 or 5 IEEE 802.3 clause 22 compliant 10BASE-Te, 100BASE-TX and 1000BASE-T PHY-s. Document the required property to make the PHY package correctly configure and work. Signed-off-by: Christian Marangi --- .../devicetree/bindings/net/qcom,qca807x.yaml | 143 ++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/qcom,qca807x.yaml diff --git a/Documentation/devicetree/bindings/net/qcom,qca807x.yaml b/Documentation/devicetree/bindings/net/qcom,qca807x.yaml new file mode 100644 index 000000000000..c2d59068d015 --- /dev/null +++ b/Documentation/devicetree/bindings/net/qcom,qca807x.yaml @@ -0,0 +1,143 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/qcom,qca807x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm QCA807X Ethernet PHY + +maintainers: + - Christian Marangi + - Robert Marko + +description: | + Qualcomm QCA807X Ethernet PHY is PHY package of 2 or 5 + IEEE 802.3 clause 22 compliant 10BASE-Te, 100BASE-TX and + 1000BASE-T PHY-s. + + They feature 2 SerDes, one for PSGMII or QSGMII connection with + MAC, while second one is SGMII for connection to MAC or fiber. + + Both models have a combo port that supports 1000BASE-X and + 100BASE-FX fiber. + + Each PHY inside of QCA807x series has 4 digitally controlled + output only pins that natively drive LED-s for up to 2 attached + LEDs. Some vendor also use these 4 output for GPIO usage without + attaching LEDs. + + Note that output pins can be set to drive LEDs OR GPIO, mixed + definition are not accepted. + +allOf: + - $ref: ethernet-phy-package.yaml# + +select: + properties: + compatible: + contains: + const: ethernet-phy-package + patternProperties: + ^ethernet-phy(@[a-f0-9]+)?$: + properties: + compatible: + contains: + enum: + - ethernet-phy-id004d.d0b2 + - ethernet-phy-id004d.d0b1 + required: + - compatible + +properties: + global-phys: + maxItems: 2 + + global-phy-names: + items: + - const: combo + - const: pqsgmii + + phy-connection-type: + enum: + - qsgmii + - psgmii + +patternProperties: + ^ethernet-phy(@[a-f0-9]+)?$: + $ref: /schemas/net/ethernet-phy.yaml# + + properties: + gpio-controller: + description: set the output lines as GPIO instead of LEDs + type: boolean + + '#gpio-cells': + description: number of GPIO cells for the PHY + const: 2 + + dependencies: + gpio-controller: ['#gpio-cells'] + + unevaluatedProperties: false + +required: + - compatible + +unevaluatedProperties: false + +examples: + - | + #include + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + ethernet-phy-package { + compatible = "ethernet-phy-package"; + #address-cells = <1>; + #size-cells = <0>; + + global-phys = <&qca8075_4>, <&qca8075_psgmii>; + global-phy-names = "combo", "pqsgmii"; + + qca8075_1: ethernet-phy@1 { + compatible = "ethernet-phy-id004d.d0b2"; + reg = <1>; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + color = ; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + }; + }; + + qca8075_2: ethernet-phy@2 { + compatible = "ethernet-phy-id004d.d0b2"; + reg = <2>; + + gpio-controller; + #gpio-cells = <2>; + }; + + qca8075_3: ethernet-phy@3 { + compatible = "ethernet-phy-id004d.d0b2"; + reg = <3>; + }; + + qca8075_4: ethernet-phy@4 { + compatible = "ethernet-phy-id004d.d0b2"; + reg = <4>; + }; + + qca8075_pqsgmii: ethernet-phy@5 { + reg = <5>; + }; + }; + }; -- 2.40.1