From patchwork Tue Jan 11 16:05:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeny Boger X-Patchwork-Id: 12709994 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 66F57C433F5 for ; Tue, 11 Jan 2022 16:07:58 +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:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qq/OXbr50AxWTOYCyIB5+rW8V3mrSSw6cPseujkibQ8=; b=uxBzeFZ1CcUR15 TCx4cpkl5rLQkgSTYq+8ZSTXJoDGEgq1O4nPuGXy36oc9UscvbED/RQ8H2e64MRgwvI5v1VE5d66j j1FNgED/2Q8lB6V1ApSarDiJgL/diQPtQNij0Oa38aKEajNkg7cI95v9nvo6r4yWPzmirM5PEa3Fj lDISMyrmp2E+vCemq8zRRRX2vip3JPJkA/4T6irPFH7Hgj5baDTlwDO4/eiQLADCTDyK+4FcNdSkB Wm2YPxOkg5tI3QdwEM0HfDO0DfDBL2sGiBTsqOlhw/clw0XSWS+0IOa09fIx2YX9yb+teA4bjOSu4 dKmkuyHj52/SmYjKSuDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7JfU-00GrCQ-B8; Tue, 11 Jan 2022 16:06:40 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7Jf3-00Gr31-8s for linux-arm-kernel@lists.infradead.org; Tue, 11 Jan 2022 16:06:15 +0000 Received: by mail-lf1-x136.google.com with SMTP id u13so57905262lff.12 for ; Tue, 11 Jan 2022 08:06:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wirenboard-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=870eFOoZ0Fa1c614sBVDWlzu1xI6Oxw/buGlrAvGuc8=; b=O4dnc68PcYexc81xffY36nJmPSYyhU6oqtmFTBO563Py6RrT/h3Ujk9C9N6g7ljw7S 1G5J/xfd6dlM1LMIHnedEjDz9pkjd4Oyz218Gm2roG5tQRuFw1LGTZMsiR9TsG3IMiny U2RSCD3uBjFH5EXIaBPezgsC5eUHW41yWjuOZfhmPMgAW4T2Cl1wNeJba3YbEdBVfEw0 AMbSYI2X9EiUKJCVOYQkG2TeGeGvFQgbIA09ul9BaBK0bcNIcM3V715qpFUIzFQsn0qf Xh7Gw/ljyWShy+4NRkexB0yKPdutDo9q3VFHmch1BAC+LK5QDiSau7HZVPFEvtxuBSNG 0w/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=870eFOoZ0Fa1c614sBVDWlzu1xI6Oxw/buGlrAvGuc8=; b=ZPmQsVdLxJAEtE/qc30w130gDI2eif9N7LACx1tY8C9L5o1NWqndKZAek5dermCFpx 7kDAEg5PprTvR4Eu+S1OpJFmJ9RiVx4wcM26y8os4efUw2X+UTTWQenbHup++4Qf4DQQ 74m9h5AmQ5MjQVMvyhRmYKQktnozNpRbI2+IJUFwp+tP5+MhHOuQu39HayTcoW9FrZtv Ir1wRNIMw4rAj86K/QxZnY+Pxt4c3UeZ89Z9glVk+etkqHUFoEEaA6ziBlAWSB87TGwM ZqF7uZESCSY+8uYOgzDa0QgFpyMKlLDZvWGKjgTphETvFVDiJIRAQHOcm9d2/q6BUL8m 2N3A== X-Gm-Message-State: AOAM531Hce35cY/0GlHeIjWLb9d3xnxuw5ou+jYTnb+SpMB7PnEJ1zij dMPf3z5pwDVYzgNdFZN7rC9UXQ== X-Google-Smtp-Source: ABdhPJyOwUv704liXlDnm4OvuF5plvIFbBwx4/3ze9uLYbh0RH0iLKEOO1GauxurTZLTw0rxDBRAww== X-Received: by 2002:ac2:5599:: with SMTP id v25mr4002074lfg.662.1641917171778; Tue, 11 Jan 2022 08:06:11 -0800 (PST) Received: from boger-laptop.lan (81.5.110.253.dhcp.mipt-telecom.ru. [81.5.110.253]) by smtp.gmail.com with ESMTPSA id k39sm564803lfv.150.2022.01.11.08.06.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jan 2022 08:06:11 -0800 (PST) From: Evgeny Boger To: Maxime Ripard , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org Cc: Evgeny Boger , devicetree@vger.kernel.org, Rob Herring , linux-sunxi@lists.linux.dev Subject: [PATCH v4 2/3] dt-bindings: net: support for Allwinner R40 EMAC controller Date: Tue, 11 Jan 2022 19:05:59 +0300 Message-Id: <20220111160600.58384-3-boger@wirenboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220111160600.58384-1-boger@wirenboard.com> References: <20220111160600.58384-1-boger@wirenboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220111_080613_369324_73E7D461 X-CRM114-Status: GOOD ( 10.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org R40 and A10/A20 share the same EMAC IP. However, on R40 the EMAC reset needs to be deasserted first, so resets property is required. Signed-off-by: Evgeny Boger --- .../net/allwinner,sun4i-a10-emac.yaml | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/allwinner,sun4i-a10-emac.yaml b/Documentation/devicetree/bindings/net/allwinner,sun4i-a10-emac.yaml index 8d8560a67abf..8b38b4e981fe 100644 --- a/Documentation/devicetree/bindings/net/allwinner,sun4i-a10-emac.yaml +++ b/Documentation/devicetree/bindings/net/allwinner,sun4i-a10-emac.yaml @@ -15,7 +15,9 @@ maintainers: properties: compatible: - const: allwinner,sun4i-a10-emac + enum: + - allwinner,sun4i-a10-emac + - allwinner,sun8i-r40-emac reg: maxItems: 1 @@ -30,6 +32,19 @@ properties: description: Phandle to the device SRAM $ref: /schemas/types.yaml#/definitions/phandle-array + resets: + maxItems: 1 + +if: + properties: + compatible: + contains: + const: allwinner,sun8i-r40-emac + +then: + required: + - resets + required: - compatible - reg @@ -42,11 +57,14 @@ unevaluatedProperties: false examples: - | + #define RST_BUS_EMAC 14 + emac: ethernet@1c0b000 { compatible = "allwinner,sun4i-a10-emac"; reg = <0x01c0b000 0x1000>; interrupts = <55>; clocks = <&ahb_gates 17>; + resets = <&ccu RST_BUS_EMAC>; phy-handle = <&phy0>; allwinner,sram = <&emac_sram 1>; };