From patchwork Fri Nov 18 19:01:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 22480 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp362532wrr; Fri, 18 Nov 2022 11:07:40 -0800 (PST) X-Google-Smtp-Source: AA0mqf4aYW2zbzCCXITUTb5ndOzD/8BXqqmSDO2pDYsVCi6dCyM0VxnIK318gzEyXH316ZwjMgTe X-Received: by 2002:a17:90b:3c4e:b0:20a:75ae:8276 with SMTP id pm14-20020a17090b3c4e00b0020a75ae8276mr15302114pjb.51.1668798460147; Fri, 18 Nov 2022 11:07:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668798460; cv=none; d=google.com; s=arc-20160816; b=hnkkLwvPKRFA6IK1FXWLrqIUZXMYxuOKe+UXQqkyou9JRmiIBrKhY1T8CLMJzS4JGM ldGePEjeT/6APluqFKtTAYmkBPm3bNJp2H3RnTdzaFgqT7WWyAg5YfCcNBGmhMeBNoZ7 aX46g+klWqJ03JKey2IPFw7zKk126WadmuGYwwipgg8CtA0b9830Id4cOZeUrcyqiSGh os9b9KL96GUcab/uJiFyAaG/5SiexDdvWcbjs+DLgCc+0YnOuI2AcqUj8TjoidgA2n6k C0SXgE3B7DwerR+s5jQY2obSP3laNfo45cBbFdSPpLF4RKd5nySn/MXRL1ILgYFRv/ut tSsg== 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:cc:to:from :dkim-signature; bh=46LdQBOByeZuglrOcnrqp2nEUUTk+5YvyMsAuNPulHE=; b=T6J/cVX9GuQfqFroBNqv371NT4neuwDZpllvHNqIDdqaaS8WCaikoo3OxudSbuSzW2 IYQvsTQ5KU/khI4mHeeCZuS2tE+cBdEFUkyhDPjGktN9f819XwT5CVBThPyaR0Jso9QS woBiBMkL/LLYuioJHCWZ5ku7HIXDIzaIpJ/HTu9vQt3xr0WKKq0bZJDPv502vcvYjPin KNr6y4j3qOYgdYoHVFKux3P6+S6yiOOZwSQiV8LjYT4Tk2Q1X1j/6J605dMxOtBtXKOf 249HXQk8+DOZlD8P3du/lQ+dAEcEA5+15zrFn8lzgFfgL/iMVGPYt9EMGR6oSxTpykaW E0cQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=CAxCOxpW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e11-20020a170902cf4b00b0017d2bb81273si4333254plg.600.2022.11.18.11.07.26; Fri, 18 Nov 2022 11:07:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=CAxCOxpW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243021AbiKRTDK (ORCPT + 99 others); Fri, 18 Nov 2022 14:03:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242746AbiKRTBw (ORCPT ); Fri, 18 Nov 2022 14:01:52 -0500 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6DD3218B9; Fri, 18 Nov 2022 11:01:38 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout2.routing.net (Postfix) with ESMTP id 6FE836049C; Fri, 18 Nov 2022 19:01:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=46LdQBOByeZuglrOcnrqp2nEUUTk+5YvyMsAuNPulHE=; b=CAxCOxpWvAWCGTh5ZffOzvCq2/ySZWMAFalBqJAmESSJ2nKG6TincnY9WqVhvuQiyw2OMK QFBRs8nxohB4gg7KbtHVEh9ZKEc6Duhk6Ahh1Rz+d8XNFCDCHXEc3v/yJyPicqCj95XqJm GWVB5HCTruNVKQ6qy9BHb4KoB1dDsAI= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 1B27812271E; Fri, 18 Nov 2022 19:01:36 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, AngeloGioacchino Del Regno Subject: [PATCH v6 01/11] arm64: dts: mt7986: move wed_pcie node Date: Fri, 18 Nov 2022 20:01:16 +0100 Message-Id: <20221118190126.100895-2-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749862014172941221?= X-GMAIL-MSGID: =?utf-8?q?1749862014172941221?= From: Frank Wunderlich Move the wed_pcie node to have node aligned by address. Fixes: 00b9903996b3 ("arm64: dts: mediatek: mt7986: add support for Wireless Ethernet Dispatch") Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi index a22e10e89ab9..afc01abfa99c 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -112,6 +112,12 @@ infracfg: infracfg@10001000 { #clock-cells = <1>; }; + wed_pcie: wed-pcie@10003000 { + compatible = "mediatek,mt7986-wed-pcie", + "syscon"; + reg = <0 0x10003000 0 0x10>; + }; + topckgen: topckgen@1001b000 { compatible = "mediatek,mt7986-topckgen", "syscon"; reg = <0 0x1001B000 0 0x1000>; @@ -257,12 +263,6 @@ ethsys: syscon@15000000 { #reset-cells = <1>; }; - wed_pcie: wed-pcie@10003000 { - compatible = "mediatek,mt7986-wed-pcie", - "syscon"; - reg = <0 0x10003000 0 0x10>; - }; - wed0: wed@15010000 { compatible = "mediatek,mt7986-wed", "syscon"; From patchwork Fri Nov 18 19:01:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 22474 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp360561wrr; Fri, 18 Nov 2022 11:03:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf69QyUGjDwryiE1fGETREIwbOHoqPSClpW3zDKhgxlAFWY/BglpnBmtUrLUr0E1G3hZ8hF7 X-Received: by 2002:aa7:cc08:0:b0:461:8a43:e93 with SMTP id q8-20020aa7cc08000000b004618a430e93mr6992220edt.275.1668798227815; Fri, 18 Nov 2022 11:03:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668798227; cv=none; d=google.com; s=arc-20160816; b=rge1EkBnewGTpP4miCS1MuU7PoU9SYOyXN7OAt1UlBrVgK9XlwzCOdXTxUhXzW/mHo O50xkSJcW1LP1av0+8E5QUX/QN6F9OL90gqyjjPWQuZIv4UVppws8vJ9gmS/vyMamYeX NwoM1e/V8MC/TExsUfjU1SOdAVdllTtleJpNA/+fJyk9cXeIQZ/v2g9MWq9n40muz7J1 dGEuI/LY0X5+Q2x94rwmxue3FsDR4yuclzCnHEv+voWknNLEG6fSiRIslyJjsyLuicAS cHnY+VO7pRME4Xtqxi3/fhFU2z3CB04fTG/amHqqMEehxXu6TzsyvpDVE81FDO22202Y zwKA== 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:cc:to:from :dkim-signature; bh=0G8A0Vfo5m7AIOUJk0K0IJlgKB0iQp40ZYsUGIkco0E=; b=AdTqzI1FNzuHrxxZjEMPX2ORCHzcqicv+9ZV+KU5ILsJw7b3dKuUe+ox6ZyOMcOvDg Lsf0TaHq1XirEN7fxIGuC5Rn4hhBYdWzOi8TTLapHPBW68UIKsKorsrBijILE/uTB1lA mTkWytHtuLhVd1IEfXjQfo7e5u45b425oLt3BT90EEj3mU2PLN/ZFt7Fyr42bQ8rquEf Qa/QBaE8kt28/XByPISe2OyQOpqxKHb9iYWzCs45Ryd9Pgq0U4uz2tPq+86mOyCkCyp5 eQX6su40ISPyLrGY/prR2h6GihpW8cPDL/stANmiyZnY0pamW6EqjvKVF1xCo/+QP5uG +URQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=miuTTB51; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b11-20020aa7c6cb000000b00460f0ff4906si3617026eds.130.2022.11.18.11.03.22; Fri, 18 Nov 2022 11:03:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=miuTTB51; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243074AbiKRTCj (ORCPT + 99 others); Fri, 18 Nov 2022 14:02:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242845AbiKRTBw (ORCPT ); Fri, 18 Nov 2022 14:01:52 -0500 Received: from mxout1.routing.net (mxout1.routing.net [IPv6:2a03:2900:1:a::a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B728130550; Fri, 18 Nov 2022 11:01:38 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout1.routing.net (Postfix) with ESMTP id D092F4039D; Fri, 18 Nov 2022 19:01:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0G8A0Vfo5m7AIOUJk0K0IJlgKB0iQp40ZYsUGIkco0E=; b=miuTTB51NT/kO2sKHO/2VyDlH4Kc5NLo6WnZxaMyP4eIt/g9EX3Kxz2ZrQUQRDJPo357nW EKDcCfvHT4l7gcTBVRKJMg6gHPWbvrg5/ptkSesICi7iyy+/D8hstXwaKO8UY3zbSoISKA EPHLN7RTg+sp3cIzwiZnkqip8AcwvVM= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 76AC81226BC; Fri, 18 Nov 2022 19:01:36 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, Krzysztof Kozlowski , AngeloGioacchino Del Regno Subject: [PATCH v6 02/11] dt-bindings: phy: mediatek,tphy: add support for mt7986 Date: Fri, 18 Nov 2022 20:01:17 +0100 Message-Id: <20221118190126.100895-3-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749861770424156886?= X-GMAIL-MSGID: =?utf-8?q?1749861770424156886?= From: Frank Wunderlich Add compatible string for mt7986. Signed-off-by: Frank Wunderlich Acked-by: Krzysztof Kozlowski Reviewed-by: Chunfeng Yun Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger --- Documentation/devicetree/bindings/phy/mediatek,tphy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml b/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml index 5613cc5106e3..230a17f24966 100644 --- a/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml +++ b/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml @@ -79,6 +79,7 @@ properties: - enum: - mediatek,mt2712-tphy - mediatek,mt7629-tphy + - mediatek,mt7986-tphy - mediatek,mt8183-tphy - mediatek,mt8186-tphy - mediatek,mt8192-tphy From patchwork Fri Nov 18 19:01:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 22478 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp361069wrr; Fri, 18 Nov 2022 11:04:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf6CrTUAqKmI5M5zGYRUPar3tyYhGLR1SjEHvjVfv1R3qCxlSuep7u9oU1szCv0fwOSSC0P7 X-Received: by 2002:a17:906:5f87:b0:78d:8cf3:6ae with SMTP id a7-20020a1709065f8700b0078d8cf306aemr7244981eju.173.1668798282955; Fri, 18 Nov 2022 11:04:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668798282; cv=none; d=google.com; s=arc-20160816; b=A+nSIHMW1kkQI37uki1Vm1atybXP2ULOz0EL3PAQ4en7vgJlC/AdQxxhnUcsP0Blc3 NjcjBH5/mYkY9X3HjPP5u7aHMVAhb38yRFkvciw3Azt+s3lzFs4mHCE9hhD0g2+QOaXe Utm/+TaSS/FBeIwfLh//J+XUsKYliqGH/INZpeJfo9Nd32QJG75PR1w194UedWT0G62i /ZleVMGFMYUeh5Xua/gegUPVk6xlTTCT27KtELDu62/pGmvd7W6ScX7f9gV0kRQ/9uER E1OJ2zXu1mOu0qAgK0+lBjU5sainmEoEC5LzOe9ChnXdcHQ2oIIbbGtpUUwVBvKJJXvG TlrQ== 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:cc:to:from :dkim-signature; bh=zorltqywtJvpH+5vDOCm8ouz6cvEkR6i53PVbOSwOJs=; b=ts2ZCk3+mYnUKpH0EAUFS7vCDANk2zat0riycqO3joaA1IEN8crEg+yeoe0ysmH7bq MvEzSgMSrS+TACPTy5YfEE1xTGRgCbSWTc5yB7PZIkpDNMLQs81Gy48Q7daxj3QyEDPF NKfsT2ZWtMtuHOiLOiCxr65t58UUuWrQlk0fDvQ6815295nTly9yo/WJBl9NdyAi71PZ QoV6jSqXjir7GCnzYCBErPEFeAB1p0M2MR0rcAR+bvH58LfoiYJZYQkqEm/u4ahk4aq2 /j885JBIGIzy2M/Y/lVes1h3IR4jVmMLRYJLy6Ug+99iV2rnRBx0alRuk1AFp+Cbxj/8 zBag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=EB424GiG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g13-20020aa7c58d000000b00461c9edc3a5si3513857edq.77.2022.11.18.11.04.18; Fri, 18 Nov 2022 11:04:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=EB424GiG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242891AbiKRTCy (ORCPT + 99 others); Fri, 18 Nov 2022 14:02:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242958AbiKRTBx (ORCPT ); Fri, 18 Nov 2022 14:01:53 -0500 Received: from mxout3.routing.net (mxout3.routing.net [IPv6:2a03:2900:1:a::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E6D32126D; Fri, 18 Nov 2022 11:01:39 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout3.routing.net (Postfix) with ESMTP id 339C660568; Fri, 18 Nov 2022 19:01:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zorltqywtJvpH+5vDOCm8ouz6cvEkR6i53PVbOSwOJs=; b=EB424GiGdYOlJt9K/5iut4GwK5GI8p4160p3F2KFeJ7xRlILLWkeQNfmMIAZHOiRhSxVoo ldF1VGKiYOirjzgr9z+S+dbOM7nKBk4cKQWcjQhXxaYzXkJz++hDHjQJ2CR2y/XGe9ucCu too8936SO2epQb1Q9a4scYizbWJxGP0= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id D2B6312271E; Fri, 18 Nov 2022 19:01:36 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, Krzysztof Kozlowski , AngeloGioacchino Del Regno Subject: [PATCH v6 03/11] dt-bindings: usb: mtk-xhci: add support for mt7986 Date: Fri, 18 Nov 2022 20:01:18 +0100 Message-Id: <20221118190126.100895-4-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749861828486577539?= X-GMAIL-MSGID: =?utf-8?q?1749861828486577539?= From: Frank Wunderlich Add compatible string for mt7986. Signed-off-by: Frank Wunderlich Acked-by: Krzysztof Kozlowski Reviewed-by: Chunfeng Yun Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger --- Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml index 939623867a64..a3c37944c630 100644 --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml @@ -28,6 +28,7 @@ properties: - mediatek,mt7622-xhci - mediatek,mt7623-xhci - mediatek,mt7629-xhci + - mediatek,mt7986-xhci - mediatek,mt8173-xhci - mediatek,mt8183-xhci - mediatek,mt8186-xhci From patchwork Fri Nov 18 19:01:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 22481 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp362714wrr; Fri, 18 Nov 2022 11:08:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf54neqYSSiMd0db+mdevVFU6YSf1Nrww/wlXFY/QEJ+i98aAdFPmwF+MlrltHaWlTG4ACtY X-Received: by 2002:a63:2306:0:b0:46f:918e:7339 with SMTP id j6-20020a632306000000b0046f918e7339mr7593126pgj.429.1668798484016; Fri, 18 Nov 2022 11:08:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668798484; cv=none; d=google.com; s=arc-20160816; b=wapjG/7aT86fdjjs2FfdtUSjWiiaYK93Rz3QxryBkuc/mHqiNcQq7FUDdb2fsUUEd1 DHDNCmEbjsgTnIvhjkcNAugPPlwO3p6xyCkOIpRtCxCEo9cNNGWf1Bmbcq0gQRlMRwsD fE0rQRFG8QE1TLht+WASsVQPrRvIhXENkxyQgiUcRgd7efC+RKyGg7auMR54khV7yq2f LUZlbpkXxnuyL6ddmnFS2tQhvKhN4snsR7fcs9RkCb3a1RWb8XdmRhONxWn6J5m4cuMx Nx9Wnl5ZyhOEfWl/J9Db/uFUUZySkJt4HHf4aXlM0VI+G+0my7mq/9ezMMM2h54tSd7d /65w== 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:cc:to:from :dkim-signature; bh=6YDvN14LGzYl2jRSkK1fRlKatqJWzuwYk+eXtAY5bVg=; b=dgMnJrAKALYS/eu0mejHEd8SG4lBqFohwI9tx7/inPOUJPUes2fYh0lqKBCZCXfUTg 9hIP/8Uood2bI6CXO4RyGyzN5SduTD0LXzkZ+DseYeOIRUB4yPdU0Gc2yv5/dhe+2Ilb QjGiSOkiG7n1Vi0UsjaDWTMJnt9gN1DxXGXXvbeA5LmVxhH4MLMTP+1G/x1eZ/xJ+p89 0aLqD3njvAS1L+TkZaoZxvDkPK68hb7MqhEqEYwP3vjGm134drU8/3LhLgY9TapB6bh8 LBIkixC079C+Urh71dS336lSSeKuEXcJog4FNlUKUJO+yt5QfrEEox/iaUdeGM0hlpuS SvNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=Bg8VOojR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id li18-20020a17090b48d200b00213e4bcfc20si7945604pjb.157.2022.11.18.11.07.50; Fri, 18 Nov 2022 11:08:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=Bg8VOojR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242975AbiKRTDC (ORCPT + 99 others); Fri, 18 Nov 2022 14:03:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242957AbiKRTBx (ORCPT ); Fri, 18 Nov 2022 14:01:53 -0500 Received: from mxout4.routing.net (mxout4.routing.net [IPv6:2a03:2900:1:a::9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6D7A21893; Fri, 18 Nov 2022 11:01:39 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout4.routing.net (Postfix) with ESMTP id 8838A100995; Fri, 18 Nov 2022 19:01:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6YDvN14LGzYl2jRSkK1fRlKatqJWzuwYk+eXtAY5bVg=; b=Bg8VOojRqjXpMbnvcQ0BS7YLdq0qU/ixxmd4qWW8aTSiRMhNppN9n3ZX6yXL3D63iLfYKj RmsCghVZLHDx+vGs+y0zv+f0pci1vrv67b1npT/kLsrner+k1nETyiF2ELJfEXbvJPfkCH oS6CyKYn3XmZdV61b/HV8DvuS1oWzow= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 365341226BC; Fri, 18 Nov 2022 19:01:37 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, Rob Herring , AngeloGioacchino Del Regno Subject: [PATCH v6 04/11] dt-bindings: PCI: mediatek-gen3: add SoC based clock config Date: Fri, 18 Nov 2022 20:01:19 +0100 Message-Id: <20221118190126.100895-5-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749862039230753830?= X-GMAIL-MSGID: =?utf-8?q?1749862039230753830?= From: Frank Wunderlich The PCIe driver covers different SOC which needing different clock configs. Define them based on compatible. Signed-off-by: Frank Wunderlich Reviewed-by: Rob Herring Acked-by: Jianjun Wang Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger --- v2: - fix typo in mediatek,mt8192-pcie v3: - remove contains to match only if compatible is no fallback tested with series "Add driver nodes for MT8195 SoC" and mt7986 pcie-nodes, dtbs_check is now clean --- .../bindings/pci/mediatek-pcie-gen3.yaml | 47 ++++++++++++++----- 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml index c00be39af64e..5d7369debff2 100644 --- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml @@ -43,9 +43,6 @@ description: |+ each set has its own address for MSI message, and supports 32 MSI vectors to generate interrupt. -allOf: - - $ref: /schemas/pci/pci-bus.yaml# - properties: compatible: oneOf: @@ -84,15 +81,7 @@ properties: maxItems: 6 clock-names: - items: - - const: pl_250m - - const: tl_26m - - const: tl_96m - - const: tl_32k - - const: peri_26m - - enum: - - top_133m # for MT8192 - - peri_mem # for MT8188/MT8195 + maxItems: 6 assigned-clocks: maxItems: 1 @@ -138,6 +127,40 @@ required: - '#interrupt-cells' - interrupt-controller +allOf: + - $ref: /schemas/pci/pci-bus.yaml# + - if: + properties: + compatible: + const: mediatek,mt8192-pcie + then: + properties: + clock-names: + items: + - const: pl_250m + - const: tl_26m + - const: tl_96m + - const: tl_32k + - const: peri_26m + - const: top_133m + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt8188-pcie + - mediatek,mt8195-pcie + then: + properties: + clock-names: + items: + - const: pl_250m + - const: tl_26m + - const: tl_96m + - const: tl_32k + - const: peri_26m + - const: peri_mem + unevaluatedProperties: false examples: From patchwork Fri Nov 18 19:01:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 22473 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp360518wrr; Fri, 18 Nov 2022 11:03:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf4klWytD7OH0cKbwn0Rt/uZlMHVzKElHXqKYTdaGWKARJXB7gV15CQ90Qv80A1Gnzjx4qhp X-Received: by 2002:a05:6402:1f85:b0:462:2410:9720 with SMTP id c5-20020a0564021f8500b0046224109720mr7314897edc.84.1668798224597; Fri, 18 Nov 2022 11:03:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668798224; cv=none; d=google.com; s=arc-20160816; b=Q65i+lany6oEjnPYHKPJXWLiI8wu2gqvDfBz4MOrIefKshXQ2clV7ERAx95n6U5QFE jTlipAPPMwe7jZEjYRW8UJkmF9FxzpOGf8IeDmQEaPvafoJsem1/dkXfk2DdSNPFMd1K Kvk2g+eORLEJjlPWPxSvCCeBfETg3TWlk/z4NuJYcYIdvKL87/dQ/J2mWlpGmRDPh609 4mQavyxOcg4pkk7mFlAvUJZYOmghQbhsWZz1/ja1N+Ihj5vn7itScBHPttu5lEBktv2L gP2HPbP1XNZ48CpzH95p7UXQmrSmvZ4TkcBGcCZPIMi5+0ZfKP4/6NpjcKWqYrNRtePT YJfA== 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:cc:to:from :dkim-signature; bh=HCq6Ar2PkhD4OoGWAuL/w2DeeuE2Tk+RaLJ97BRtlww=; b=cJXIvGTTHN7Xjs44oCTCSIJZXvBXPOTYNvJUs5R2ENcK3rOLLyPgvGv0dr2nio/bq2 aTqF/tEwPmNo5rlz4etOKNhhRe9Nj7q1qxArPbn3KxKnLJ1R/QBsIE2BhtBBT7PhkmAD 5mPLfnBeo7+6qGvz5OU+j9UciAwGGQ3COfoJQUhudpkcDkevrnQV8BDVG6P2K6T3VSyl lP88rV+0ZW04M6jzL3r/F8sv77DcmSSLN6P9ioEmXPZMA+drwpp1FeAgNAzX6SyM9haB 22QotqQAmyMP0LTYGxjO8kPfB4YrLUUSyndUzNaVgo2plKHAls/U3PKU0Zcvbhmu9yB+ 9/vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=dLbEK6Oq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z2-20020a1709063ac200b007ae0fe6198fsi2902131ejd.132.2022.11.18.11.03.16; Fri, 18 Nov 2022 11:03:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=dLbEK6Oq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243006AbiKRTCc (ORCPT + 99 others); Fri, 18 Nov 2022 14:02:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242960AbiKRTBx (ORCPT ); Fri, 18 Nov 2022 14:01:53 -0500 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBB59233A2; Fri, 18 Nov 2022 11:01:39 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout2.routing.net (Postfix) with ESMTP id DF7D2604EB; Fri, 18 Nov 2022 19:01:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HCq6Ar2PkhD4OoGWAuL/w2DeeuE2Tk+RaLJ97BRtlww=; b=dLbEK6OqXg4Y29VGLlzXLdLUH0vx5bhiykL7giT8Qpi4c26CS+xjB+UgQ0p3F1Fq5x9MNH Rkv9anDKeIBvGeq6dRSAYGkwLMlcaiw+gjQWeBPmwY88S9FSVYLwdzhTdniZe8ZvhYsYnJ UV81cKeBFe15ZH0GZ88c0YAvwI5HnmY= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 900D612271E; Fri, 18 Nov 2022 19:01:37 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, Rob Herring Subject: [PATCH v6 05/11] dt-bindings: PCI: mediatek-gen3: add support for mt7986 Date: Fri, 18 Nov 2022 20:01:20 +0100 Message-Id: <20221118190126.100895-6-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749861767408063842?= X-GMAIL-MSGID: =?utf-8?q?1749861767408063842?= From: Frank Wunderlich Add compatible string and clock-definition for mt7986. It needs 4 clocks for PCIe, define them in binding. Signed-off-by: Frank Wunderlich Reviewed-by: Rob Herring Acked-by: Jianjun Wang Reviewed-by: Matthias Brugger --- v2: - squashed patch 2+3 (compatible and clock definition) --- .../bindings/pci/mediatek-pcie-gen3.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml index 5d7369debff2..f7a02019daea 100644 --- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml @@ -48,6 +48,7 @@ properties: oneOf: - items: - enum: + - mediatek,mt7986-pcie - mediatek,mt8188-pcie - mediatek,mt8195-pcie - const: mediatek,mt8192-pcie @@ -78,9 +79,11 @@ properties: - const: mac clocks: + minItems: 4 maxItems: 6 clock-names: + minItems: 4 maxItems: 6 assigned-clocks: @@ -160,6 +163,20 @@ allOf: - const: tl_32k - const: peri_26m - const: peri_mem + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt7986-pcie + then: + properties: + clock-names: + items: + - const: pl_250m + - const: tl_26m + - const: peri_26m + - const: top_133m unevaluatedProperties: false From patchwork Fri Nov 18 19:01:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 22472 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp360391wrr; Fri, 18 Nov 2022 11:03:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf5wlAm5HhG8ATuFXKjPEMhYcBfgZs2qsFFyshLR/LSR/3sVFme0ESaDgkUSMD0MG28Iiu1W X-Received: by 2002:a17:906:2894:b0:7aa:7c3f:8603 with SMTP id o20-20020a170906289400b007aa7c3f8603mr7096549ejd.322.1668798210188; Fri, 18 Nov 2022 11:03:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668798210; cv=none; d=google.com; s=arc-20160816; b=WSweVQtUPQISw4bMWlWrSzv6lN4xsPRAphapcrvXAjvf7u7NtJn3EaYizSKHO22eSU P5g6cbGfavrnj4/zZuwjuujNxy0lm2h0CmPLn3OscCWRI0wR0kSSAJDJAsccoYyhgzOE NFIVA/fB+OJ4qBlSdP+DB3FvyoW5467m9jjS5EqDjHuuSexUie0tFv3HtcaGnyHgMHqO xptYGa8unYuIWFrqEilYO47TVyb5JyycEBxEW5mQhUwgaOZdksIRZt6KIJ2lPMhTbssX GIMYwxldQ+I/BOq8Ch3xvnvw6rUdnvlCit4RKDbei3qrB84bXGvDs/deyY3qCZAoCwDi 5nsw== 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:cc:to:from :dkim-signature; bh=rLXaSi0nuYISQNA4/ZZOAgFRiUbo5QoSWGShK+kyzL8=; b=jyBebh7n+xQ6Ej+68BUvCxEwYu1myTnhnuo2dZjT1wx8KqQXzjS81vOWlaFOlnsk+Z FuLDDa3G1m5YARyx8vbR3l9Oi9Te3uQTtVxE5rJPZrXHfq+Fh/9OIE6DQoNZ3k09EJIM FzUbr3HvwN0A/Ak8W+galXhj/1/RXGkQ8fOWsfW1CJxHN70uh+VeH3Q3IHnjvfUqOljA v/8qosc/zuisGgYuS6FUbmDSNlUbml/dulOMUTcp7pIKZPj2n45kGRieHIe0UEfb19/t VjVkvZS8gN8XiJ7yckFJCFPbeoLQw1nbhZi2kjlLAkbVjIq+fgIOwLJk68HbKiFPfTuv brdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=RzpUfc38; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s8-20020a056402520800b0045d25cf222csi4243092edd.362.2022.11.18.11.03.04; Fri, 18 Nov 2022 11:03:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=RzpUfc38; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242970AbiKRTC3 (ORCPT + 99 others); Fri, 18 Nov 2022 14:02:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242959AbiKRTBx (ORCPT ); Fri, 18 Nov 2022 14:01:53 -0500 Received: from mxout3.routing.net (mxout3.routing.net [IPv6:2a03:2900:1:a::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 091EA2FFFC; Fri, 18 Nov 2022 11:01:39 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout3.routing.net (Postfix) with ESMTP id 41062604DC; Fri, 18 Nov 2022 19:01:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rLXaSi0nuYISQNA4/ZZOAgFRiUbo5QoSWGShK+kyzL8=; b=RzpUfc38A2J1HvklQknH14z6OqQdbFlIs+cswd/DJsnTKTaQDBe65Dp0iNk7+Oo57WLr1e KdTjCZ4R5VTq4apKt9ccuiMWk4maCRq8LvhhdmWjGWVx9XMLtOFtXV1yLorZEiFMrOmZnB 7KYY0XdG1K0Cfz6bgu1sZ+qrN+7PG4M= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id E1F5C1226BC; Fri, 18 Nov 2022 19:01:37 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, Sam Shih , AngeloGioacchino Del Regno Subject: [PATCH v6 06/11] arm64: dts: mt7986: add spi related device nodes Date: Fri, 18 Nov 2022 20:01:21 +0100 Message-Id: <20221118190126.100895-7-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749861752403895246?= X-GMAIL-MSGID: =?utf-8?q?1749861752403895246?= From: Sam Shih This patch adds spi support for MT7986. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 35 ++++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 28 ++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts | 35 ++++++++++++++++++++ 3 files changed, 98 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts index 2f48cc3d3ddb..006878e3f2b2 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts @@ -59,6 +59,20 @@ switch: switch@0 { }; &pio { + spi_flash_pins: spi-flash-pins { + mux { + function = "spi"; + groups = "spi0", "spi0_wp_hold"; + }; + }; + + spic_pins: spic-pins { + mux { + function = "spi"; + groups = "spi1_2"; + }; + }; + uart1_pins: uart1-pins { mux { function = "uart"; @@ -105,6 +119,27 @@ conf { }; }; +&spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi_flash_pins>; + cs-gpios = <0>, <0>; + status = "okay"; + spi_nand: spi_nand@0 { + compatible = "spi-nand"; + reg = <0>; + spi-max-frequency = <10000000>; + spi-tx-buswidth = <4>; + spi-rx-buswidth = <4>; + }; +}; + +&spi1 { + pinctrl-names = "default"; + pinctrl-0 = <&spic_pins>; + cs-gpios = <0>, <0>; + status = "okay"; +}; + &switch { ports { #address-cells = <1>; diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi index afc01abfa99c..29da9b8ed753 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -253,6 +253,34 @@ i2c0: i2c@11008000 { status = "disabled"; }; + spi0: spi@1100a000 { + compatible = "mediatek,mt7986-spi-ipm", "mediatek,spi-ipm"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0 0x1100a000 0 0x100>; + interrupts = ; + clocks = <&topckgen CLK_TOP_MPLL_D2>, + <&topckgen CLK_TOP_SPI_SEL>, + <&infracfg CLK_INFRA_SPI0_CK>, + <&infracfg CLK_INFRA_SPI0_HCK_CK>; + clock-names = "parent-clk", "sel-clk", "spi-clk", "hclk"; + status = "disabled"; + }; + + spi1: spi@1100b000 { + compatible = "mediatek,mt7986-spi-ipm", "mediatek,spi-ipm"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0 0x1100b000 0 0x100>; + interrupts = ; + clocks = <&topckgen CLK_TOP_MPLL_D2>, + <&topckgen CLK_TOP_SPIM_MST_SEL>, + <&infracfg CLK_INFRA_SPI1_CK>, + <&infracfg CLK_INFRA_SPI1_HCK_CK>; + clock-names = "parent-clk", "sel-clk", "spi-clk", "hclk"; + status = "disabled"; + }; + ethsys: syscon@15000000 { #address-cells = <1>; #size-cells = <1>; diff --git a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts b/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts index 79c5c78f7a14..2c7f1d4fb352 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts @@ -100,6 +100,20 @@ fixed-link { }; &pio { + spi_flash_pins: spi-flash-pins { + mux { + function = "spi"; + groups = "spi0", "spi0_wp_hold"; + }; + }; + + spic_pins: spic-pins { + mux { + function = "spi"; + groups = "spi1_2"; + }; + }; + wf_2g_5g_pins: wf-2g-5g-pins { mux { function = "wifi"; @@ -132,6 +146,27 @@ conf { }; }; +&spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi_flash_pins>; + cs-gpios = <0>, <0>; + status = "okay"; + spi_nand: spi_nand@0 { + compatible = "spi-nand"; + reg = <0>; + spi-max-frequency = <10000000>; + spi-tx-buswidth = <4>; + spi-rx-buswidth = <4>; + }; +}; + +&spi1 { + pinctrl-names = "default"; + pinctrl-0 = <&spic_pins>; + cs-gpios = <0>, <0>; + status = "okay"; +}; + &uart0 { status = "okay"; }; From patchwork Fri Nov 18 19:01:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 22482 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp362762wrr; Fri, 18 Nov 2022 11:08:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf54NPKO4vT5I3ZPmLyXZGHjro0Th204RErFfX7d5P2BGxkxDkMm+ZcURX/0L29LInrBg2dE X-Received: by 2002:a05:6a00:1303:b0:561:7dc7:510b with SMTP id j3-20020a056a00130300b005617dc7510bmr9229635pfu.3.1668798489381; Fri, 18 Nov 2022 11:08:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668798489; cv=none; d=google.com; s=arc-20160816; b=toUi/3RPxFquQ6y9uoVT1FNGPwLgtcZYgEAgb+sdSMv+mXnP8FlU93qKYqpRqOxeAC kmQkQeyoIE7um9McQPNX3syBgT0CAfjBZFUH2VEBy3zefCMjvnuQGGbU0Ak9xVEe6cni 6a+b9fSVaOPtwUu4EO4L6kpOilyXd/7MLGoNWkCPR4mH5ueljxAKOj8mB/1lHi5xCpE9 yW9vBPcN485pJw1ZWfbNe9qQR666vqB3GjG2ynWemCSgpxXzz/aaQSW6eWFlUWspiZBQ YQVDwNTT472iraOteAauQPVgL7nU5DgifuL6CpNRD76Dquf9r9SYbnPRlh9glIReMhKs veMg== 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:cc:to:from :dkim-signature; bh=KMKZcxPTghRdN2Z6t+oSFK4Mz3I0ecfUNW4MAmMP6yg=; b=QR/vEKBZESiHl3Q/0AMPjDbM9XLI9NI5LyERFicm1GTs0NboUiessqRwSWjKxQWxGz hgv8azApRgUm/ElC6AQvQjavVxPsACos73n9g5itcxaQBLzLxGGzk5Cem5aS3+BGju7o 0ptJrv7A/vSRPuXI8p/0E1LVxLg61fthdX+YNUtXiCstfmOeuXW0nHvJg7jmeczYpQht aMvkTYkvlgjn2bkUPXBU1fWRa1FX1f7vuvHHQhz71PPUqi4ndR1SJyqjv/Xdv0mcB128 0YnGZgeNv43j4IO6f+XTq6HlBCioOI1qwUuqScq286GPvx/rOrWgPOqMMpD0I2kdP+7t 5b5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=caQomNfx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 203-20020a6307d4000000b0043c64130f17si4838591pgh.107.2022.11.18.11.07.55; Fri, 18 Nov 2022 11:08:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=caQomNfx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242990AbiKRTDG (ORCPT + 99 others); Fri, 18 Nov 2022 14:03:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242968AbiKRTB7 (ORCPT ); Fri, 18 Nov 2022 14:01:59 -0500 Received: from mxout4.routing.net (mxout4.routing.net [IPv6:2a03:2900:1:a::9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 411F0317EC; Fri, 18 Nov 2022 11:01:40 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout4.routing.net (Postfix) with ESMTP id 956D31005E9; Fri, 18 Nov 2022 19:01:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KMKZcxPTghRdN2Z6t+oSFK4Mz3I0ecfUNW4MAmMP6yg=; b=caQomNfxXqeRFI/X2YhG/TRtW3cKKwQZh3s32bxXdu/no+Kkcsh1g4dUlqud7nbNUH16FE Jt+ILYwIAyXjVCyzwlI7sb+EJ9QRzDUvKkPJ7+wKT87HxXFtMmUoWxBVA8HkVg0q0uWqMN yDsxB0JjsXqHi50lv0DUsM3tteL3n8c= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 47AC112271E; Fri, 18 Nov 2022 19:01:38 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, Sam Shih Subject: [PATCH v6 07/11] arm64: dts: mt7986: add usb related device nodes Date: Fri, 18 Nov 2022 20:01:22 +0100 Message-Id: <20221118190126.100895-8-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749862044761283465?= X-GMAIL-MSGID: =?utf-8?q?1749862044761283465?= From: Sam Shih This patch adds USB support for MT7986. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Reviewed-by: Chunfeng Yun --- changes compared to sams original version: - reorder xhci-clocks based on yaml binding v5: - update ranges/reg of usb-phy - not added RB from AngeloGioacchino for v4 because of these changes v6: - remove unused usb regulators - remove 3v3 regulator (will be added with emmc-patch) --- arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 8 +++ arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 55 ++++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts | 8 +++ 3 files changed, 71 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts index 006878e3f2b2..828d504a4e48 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts @@ -140,6 +140,10 @@ &spi1 { status = "okay"; }; +&ssusb { + status = "okay"; +}; + &switch { ports { #address-cells = <1>; @@ -201,6 +205,10 @@ &uart2 { status = "okay"; }; +&usb_phy { + status = "okay"; +}; + &wifi { status = "okay"; pinctrl-names = "default", "dbdc"; diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi index 29da9b8ed753..c69b8bff7f4a 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -281,6 +281,61 @@ spi1: spi@1100b000 { status = "disabled"; }; + ssusb: usb@11200000 { + compatible = "mediatek,mt7986-xhci", + "mediatek,mtk-xhci"; + reg = <0 0x11200000 0 0x2e00>, + <0 0x11203e00 0 0x0100>; + reg-names = "mac", "ippc"; + interrupts = ; + clocks = <&infracfg CLK_INFRA_IUSB_SYS_CK>, + <&infracfg CLK_INFRA_IUSB_CK>, + <&infracfg CLK_INFRA_IUSB_133_CK>, + <&infracfg CLK_INFRA_IUSB_66M_CK>, + <&topckgen CLK_TOP_U2U3_XHCI_SEL>; + clock-names = "sys_ck", + "ref_ck", + "mcu_ck", + "dma_ck", + "xhci_ck"; + phys = <&u2port0 PHY_TYPE_USB2>, + <&u3port0 PHY_TYPE_USB3>, + <&u2port1 PHY_TYPE_USB2>; + status = "disabled"; + }; + + usb_phy: t-phy@11e10000 { + compatible = "mediatek,mt7986-tphy", + "mediatek,generic-tphy-v2"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0 0x11e10000 0x1700>; + status = "disabled"; + + u2port0: usb-phy@0 { + reg = <0x0 0x700>; + clocks = <&topckgen CLK_TOP_DA_U2_REFSEL>, + <&topckgen CLK_TOP_DA_U2_CK_1P_SEL>; + clock-names = "ref", "da_ref"; + #phy-cells = <1>; + }; + + u3port0: usb-phy@700 { + reg = <0x700 0x900>; + clocks = <&topckgen CLK_TOP_USB3_PHY_SEL>; + clock-names = "ref"; + #phy-cells = <1>; + }; + + u2port1: usb-phy@1000 { + reg = <0x1000 0x700>; + clocks = <&topckgen CLK_TOP_DA_U2_REFSEL>, + <&topckgen CLK_TOP_DA_U2_CK_1P_SEL>; + clock-names = "ref", "da_ref"; + #phy-cells = <1>; + }; + }; + ethsys: syscon@15000000 { #address-cells = <1>; #size-cells = <1>; diff --git a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts b/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts index 2c7f1d4fb352..cdfc292002cf 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts @@ -167,10 +167,18 @@ &spi1 { status = "okay"; }; +&ssusb { + status = "okay"; +}; + &uart0 { status = "okay"; }; +&usb_phy { + status = "okay"; +}; + &wifi { status = "okay"; pinctrl-names = "default", "dbdc"; From patchwork Fri Nov 18 19:01:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 22477 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp360655wrr; Fri, 18 Nov 2022 11:03:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf4VLtLGm+4dt+BJ5VTpN4Yw51Na9dXZGbBU8q6Ha9f/khtOtSnF2sTWoqF/9QEce/MZl00i X-Received: by 2002:a17:906:b17:b0:7ad:821f:a3e6 with SMTP id u23-20020a1709060b1700b007ad821fa3e6mr6859893ejg.688.1668798236956; Fri, 18 Nov 2022 11:03:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668798236; cv=none; d=google.com; s=arc-20160816; b=F1IynGSMzS79NcT1JCgudJqcVHlGzC01pdriSExcgETqzOQkQjdxFZFkt1olcmscvQ hxe5/1q90iVq5WXfHGRW0tsj1BMspsjg9B2zqx/o0w+uC3kf6v0iHbP8zH+F28xTM6Nq sldq3hDBxXW4+PL4B7s7CQoQRkn/UHe8pRkP2allfqRTQ+5u8ldu9r4m2a0POVyZ8+MP LFjdbS30zulz8unBzm2fKUZQt2H7v5AMs1EbCBVy0Zrde3tI+hgpaH0ReP4SyY2KyODI Ikt5CSXr3g3proyZgDxFFmfM2bAkEueicwb5YWUmVf/2O9rGr8Jgoi3uGatA7mQE8VSf PRnA== 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:cc:to:from :dkim-signature; bh=HErHfykO7IYXVp4U9iKhL1dv6JpdE4zIk+xeou1yDI8=; b=XvHWCZ5ajUvFedWfr5LRL+Y+AydScCKJgXQhhV4C5EZYP7BHVadiUm/Tuab13QlJSy vYmBxMNmtPUl6CNd/Bj5/k13BDrLDcW5MD/J+lsBb/IIzAACzWJ/jSu035BCr24qXAYH X3eDoOHrZXaOGAmF+GUFF1Pf/aEuOf9V8wGJDe91NMLTJqKhBTClDHyIw+y3yeuiyP6H eV6gJpbwetUOjiburkBw7m8k0iknzdCgmep+ZLRiCi8TFvBxS/abMJ5S3PYNB4O/n+Q5 ic5A0Ci4gQBiEqVH1MnSkIv/+3nAgm3Nemh/jTLmfovsla7vb6QchwL6SsG3lZEKc/bH rCxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=OVH4VMaH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qb20-20020a1709077e9400b0078d1e610b3esi4058347ejc.26.2022.11.18.11.03.31; Fri, 18 Nov 2022 11:03:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=OVH4VMaH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243020AbiKRTCs (ORCPT + 99 others); Fri, 18 Nov 2022 14:02:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242976AbiKRTCA (ORCPT ); Fri, 18 Nov 2022 14:02:00 -0500 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB06E3055F; Fri, 18 Nov 2022 11:01:41 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout2.routing.net (Postfix) with ESMTP id 00F516050E; Fri, 18 Nov 2022 19:01:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HErHfykO7IYXVp4U9iKhL1dv6JpdE4zIk+xeou1yDI8=; b=OVH4VMaHj8qdFZZChl/q7vFQ1/PfQMV/JYtJQK154Uilc21qz5omAv0WD4BcihgmkSPijS dknPhmigVsayS96rEpleUSkJ+L2qHiMVZM0vYUsH5pqfWQD+mEHID+K8OQ9rz8HwBCMko9 OJGyuMmfyuehvbfhzWf7MUMSd/+rWGo= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 9B2D41226BC; Fri, 18 Nov 2022 19:01:38 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, Sam Shih Subject: [PATCH v6 08/11] arm64: dts: mt7986: add mmc related device nodes Date: Fri, 18 Nov 2022 20:01:23 +0100 Message-Id: <20221118190126.100895-9-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749861779952923956?= X-GMAIL-MSGID: =?utf-8?q?1749861779952923956?= From: Sam Shih This patch adds mmc support for MT7986. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich --- v2: - update mmc-node because clocks changed v3: - fix pullups/pulldowns for mt7986a-rfb to have generic bias-pull-* v6: - add 3v3 regulator in mt7986a-rfb (was in usb patch before) - dropped AngeloGioacchino RB because of this change --- arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 96 ++++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 15 +++ 2 files changed, 111 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts index 828d504a4e48..4c0b879d6703 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts @@ -5,6 +5,8 @@ */ /dts-v1/; +#include + #include "mt7986a.dtsi" / { @@ -23,6 +25,24 @@ memory@40000000 { device_type = "memory"; reg = <0 0x40000000 0 0x40000000>; }; + + reg_1p8v: regulator-1p8v { + compatible = "regulator-fixed"; + regulator-name = "fixed-1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "fixed-3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; }; &crypto { @@ -58,7 +78,83 @@ switch: switch@0 { }; }; +&mmc0 { + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc0_pins_default>; + pinctrl-1 = <&mmc0_pins_uhs>; + bus-width = <8>; + max-frequency = <200000000>; + cap-mmc-highspeed; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + hs400-ds-delay = <0x14014>; + vmmc-supply = <®_3p3v>; + vqmmc-supply = <®_1p8v>; + non-removable; + no-sd; + no-sdio; + status = "okay"; +}; + &pio { + mmc0_pins_default: mmc0-pins { + mux { + function = "emmc"; + groups = "emmc_51"; + }; + conf-cmd-dat { + pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2", + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5", + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD"; + input-enable; + drive-strength = <4>; + bias-pull-up = ; /* pull-up 10K */ + }; + conf-clk { + pins = "EMMC_CK"; + drive-strength = <6>; + bias-pull-down = ; /* pull-down 50K */ + }; + conf-ds { + pins = "EMMC_DSL"; + bias-pull-down = ; /* pull-down 50K */ + }; + conf-rst { + pins = "EMMC_RSTB"; + drive-strength = <4>; + bias-pull-up = ; /* pull-up 10K */ + }; + }; + + mmc0_pins_uhs: mmc0-uhs-pins { + mux { + function = "emmc"; + groups = "emmc_51"; + }; + conf-cmd-dat { + pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2", + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5", + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD"; + input-enable; + drive-strength = <4>; + bias-pull-up = ; /* pull-up 10K */ + }; + conf-clk { + pins = "EMMC_CK"; + drive-strength = <6>; + bias-pull-down = ; /* pull-down 50K */ + }; + conf-ds { + pins = "EMMC_DSL"; + bias-pull-down = ; /* pull-down 50K */ + }; + conf-rst { + pins = "EMMC_RSTB"; + drive-strength = <4>; + bias-pull-up = ; /* pull-up 10K */ + }; + }; + spi_flash_pins: spi-flash-pins { mux { function = "spi"; diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi index c69b8bff7f4a..b3ad8978b563 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -304,6 +304,21 @@ ssusb: usb@11200000 { status = "disabled"; }; + mmc0: mmc@11230000 { + compatible = "mediatek,mt7986-mmc"; + reg = <0 0x11230000 0 0x1000>, + <0 0x11c20000 0 0x1000>; + interrupts = ; + clocks = <&topckgen CLK_TOP_EMMC_416M_SEL>, + <&infracfg CLK_INFRA_MSDC_HCK_CK>, + <&infracfg CLK_INFRA_MSDC_CK>, + <&infracfg CLK_INFRA_MSDC_133M_CK>, + <&infracfg CLK_INFRA_MSDC_66M_CK>; + clock-names = "source", "hclk", "source_cg", "bus_clk", + "sys_cg"; + status = "disabled"; + }; + usb_phy: t-phy@11e10000 { compatible = "mediatek,mt7986-tphy", "mediatek,generic-tphy-v2"; From patchwork Fri Nov 18 19:01:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 22471 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp360253wrr; Fri, 18 Nov 2022 11:03:17 -0800 (PST) X-Google-Smtp-Source: AA0mqf73+/W/UJ0qwkVCqI5SXZGrOOdqcvKeAuomWF4I8alwpyrhm8r0pfHEgooUPUDDIVHGB4E8 X-Received: by 2002:a05:6402:2925:b0:461:d2ab:3e05 with SMTP id ee37-20020a056402292500b00461d2ab3e05mr7050050edb.286.1668798197065; Fri, 18 Nov 2022 11:03:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668798197; cv=none; d=google.com; s=arc-20160816; b=ejpgzryVXqgobYEsiRp28qOR3W4i0Yb9y8V61DJfZcN69+1TrAg7FhXNWjVROS5KUN MpXFnZ2w4RgjWNqxoLCR39z+2Mads7lph4M8LiyqLj5LW0Nm9823364PUbRzkdMRxDm0 iSp/mnpwXONAlode9zjqewSuW2Q/ip02zTqBQJHxr+rulxawhZKtsDVS56N/v3PGlA5l s0FCxBBQ25UM6+hKIqh5tQUv+BCs5bxh/cnPqcRLgjhrRikOtbr21lCjg3HsJV33pN9D nC/Jwih63FRlKxbifX7eQAIqVweNsJShpdP6Y5o2EMG3MOsshCAciNSR9RixV+CcyZ9C VJXg== 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:cc:to:from :dkim-signature; bh=anPDs/4TCvtbO7YnDuWwStrovW6zwEuztic4Z6KFJxI=; b=PbT1ng/HTRIRe3C/elUTvcwpbIaO/p+JoWbUxH+U5bT37AKW47OuAn3CRKTRnL0wf4 f+MjA9JLpfzZqxGi/QEGFyjfeWslgVk1a7y5ClvZQ9ymnqRjWotiG4KNOIkg1+CwJAgm aXE9bFuZ3h3EZwTx8qFZykvOqPyrNQeKx8JIAQm06dniGXcD+BEJibzQqxSh5xYm8NXk DsC1WuAjrbHqnpBEt+wwzm5dRnTpTgugjvldChhZ3Mdk32xm2FlbYkicUh6gZ0CGXW3J CJ4VeoojJ8XsGPgWTQFU2ZRS2KG4+gLMhzhH5ZouBCYsh0OgTs4tdE+Rmqz0fDBtID2s YM3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=oK886iYE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s5-20020a056402520500b00468f6919522si3913123edd.564.2022.11.18.11.02.51; Fri, 18 Nov 2022 11:03:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=oK886iYE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242918AbiKRTC0 (ORCPT + 99 others); Fri, 18 Nov 2022 14:02:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242979AbiKRTCA (ORCPT ); Fri, 18 Nov 2022 14:02:00 -0500 Received: from mxout3.routing.net (mxout3.routing.net [IPv6:2a03:2900:1:a::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DBA3218AD; Fri, 18 Nov 2022 11:01:43 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout3.routing.net (Postfix) with ESMTP id 5B87261CEF; Fri, 18 Nov 2022 19:01:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=anPDs/4TCvtbO7YnDuWwStrovW6zwEuztic4Z6KFJxI=; b=oK886iYEKQxOY7iDP5qwTCmu33i+kMZuHH0I57HmBj6w23z9ydheGnkGMceeS7C4w6/6pP zjuiLT8VuO4dySkFySsF9jAQGCkI+utzGeTtgSjD3bBK94tKZwUcc2aQYeKVUhwL4X5rXp dV2R2Asvh3ezEXv7YNsdjkMDdcdOz68= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 0705912271E; Fri, 18 Nov 2022 19:01:39 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, Sam Shih , Jieyy Yang , AngeloGioacchino Del Regno Subject: [PATCH v6 09/11] arm64: dts: mt7986: add pcie related device nodes Date: Fri, 18 Nov 2022 20:01:24 +0100 Message-Id: <20221118190126.100895-10-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749861738454124414?= X-GMAIL-MSGID: =?utf-8?q?1749861738454124414?= From: Sam Shih This patch adds PCIe support for MT7986. Signed-off-by: Jieyy Yang Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- changes compared to sams original version: - add clock-names to pcie node - update clocks to new binding --- bindings-patches: https://patchwork.kernel.org/project/linux-mediatek/list/?series=690172 --- arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 16 ++++++ arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 52 ++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts index 4c0b879d6703..8eaee9ff1822 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts @@ -93,6 +93,15 @@ &mmc0 { non-removable; no-sd; no-sdio; +}; + +&pcie { + pinctrl-names = "default"; + pinctrl-0 = <&pcie_pins>; + status = "okay"; +}; + +&pcie_phy { status = "okay"; }; @@ -155,6 +164,13 @@ conf-rst { }; }; + pcie_pins: pcie-pins { + mux { + function = "pcie"; + groups = "pcie_clk", "pcie_wake", "pcie_pereset"; + }; + }; + spi_flash_pins: spi-flash-pins { mux { function = "spi"; diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi index b3ad8978b563..b310abc02dcc 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -8,6 +8,7 @@ #include #include #include +#include / { interrupt-parent = <&gic>; @@ -319,6 +320,57 @@ mmc0: mmc@11230000 { status = "disabled"; }; + pcie: pcie@11280000 { + compatible = "mediatek,mt7986-pcie", + "mediatek,mt8192-pcie"; + device_type = "pci"; + #address-cells = <3>; + #size-cells = <2>; + reg = <0x00 0x11280000 0x00 0x4000>; + reg-names = "pcie-mac"; + interrupts = ; + bus-range = <0x00 0xff>; + ranges = <0x82000000 0x00 0x20000000 0x00 + 0x20000000 0x00 0x10000000>; + clocks = <&infracfg CLK_INFRA_IPCIE_PIPE_CK>, + <&infracfg CLK_INFRA_IPCIE_CK>, + <&infracfg CLK_INFRA_IPCIER_CK>, + <&infracfg CLK_INFRA_IPCIEB_CK>; + clock-names = "pl_250m", "tl_26m", "peri_26m", "top_133m"; + status = "disabled"; + + phys = <&pcie_port PHY_TYPE_PCIE>; + phy-names = "pcie-phy"; + + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 0x7>; + interrupt-map = <0 0 0 1 &pcie_intc 0>, + <0 0 0 2 &pcie_intc 1>, + <0 0 0 3 &pcie_intc 2>, + <0 0 0 4 &pcie_intc 3>; + pcie_intc: interrupt-controller { + #address-cells = <0>; + #interrupt-cells = <1>; + interrupt-controller; + }; + }; + + pcie_phy: t-phy@11c00000 { + compatible = "mediatek,mt7986-tphy", + "mediatek,generic-tphy-v2"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + status = "disabled"; + + pcie_port: pcie-phy@11c00000 { + reg = <0 0x11c00000 0 0x20000>; + clocks = <&clk40m>; + clock-names = "ref"; + #phy-cells = <1>; + }; + }; + usb_phy: t-phy@11e10000 { compatible = "mediatek,mt7986-tphy", "mediatek,generic-tphy-v2"; From patchwork Fri Nov 18 19:01:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 22483 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp363487wrr; Fri, 18 Nov 2022 11:09:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf6RXBl8wgoISCaafJBKMnMFr5Ryeci/ektGURGFUmz6KSVHVAnMz4N+IchGvNiC7m6BWGyF X-Received: by 2002:a17:903:2642:b0:186:99ef:891c with SMTP id je2-20020a170903264200b0018699ef891cmr758335plb.169.1668798583511; Fri, 18 Nov 2022 11:09:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668798583; cv=none; d=google.com; s=arc-20160816; b=sU7KgG6ybEodNGA4+i3a92PqJl0J3Tv6TgxFS4eyl+lu2Vzqs3uX549J0aNt1Gz9Fp AQpbmJNxVpKX3tvqDrUbhq/9rXqD7WwyJRDErsRpx/NC4lbvCDarwSXsbY4B2qy4aT+a T7OxA38ss5N9HI8rgU7Xd/R4OyC3Zb6Mqe53AieHsMkigiytuUMj2OQiUf8ODIqgw8Og YSJOR7ZdxtFF7QCCHIiU45W/1t2VN28DvbSjKE8MB0a3L5IUat2mhKcPO/qoxzBYbLAm +zP+kZ5c6C+B1kUIPKAQrHWquP9L3yqe2SmheydsGc502siE2+8ZvI26khqyWFb/RWT0 u8bA== 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:cc:to:from :dkim-signature; bh=Yn2B8JqvD7tu//zoCCFRlcpqvzp6QtIEUW/kB8kTk5w=; b=QRD/94hlyPRWtNA8w+iBY5qsI9A14gqN9dKQ5X1wR9vSsZZSJ/SBDW4r2JVS1XOK+s /doDUDgCjEf91LxwLC+qYejzJh2od0J/1Rqj6k812HPnyVaE/OOWBi/7GuCGq4bUrKml h0qACU3CfDA+24LLybn0QidZiKzkazQK4C7bxXyhZ475vUg7LsnZ4SH5sMGwLFCxgxeE knf7ApuAqhDKYVHe+f17yG4I2swS+iHqwgH9syH81IcQEZhSQDxOmXLBarq6gvAM3x6G G/3CucpGpiEb/PZu0Dll9cRYlORnV8fvcOUYYHAB7UkkmvF98KTemxSDJvtqrz+7pxS/ 2eJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=Y1xiHULQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b19-20020a056a000a9300b0056bcbc51d79si4862729pfl.169.2022.11.18.11.09.29; Fri, 18 Nov 2022 11:09:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=Y1xiHULQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242861AbiKRTDQ (ORCPT + 99 others); Fri, 18 Nov 2022 14:03:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242992AbiKRTCC (ORCPT ); Fri, 18 Nov 2022 14:02:02 -0500 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77285218AB; Fri, 18 Nov 2022 11:01:43 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout2.routing.net (Postfix) with ESMTP id B3459613DE; Fri, 18 Nov 2022 19:01:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Yn2B8JqvD7tu//zoCCFRlcpqvzp6QtIEUW/kB8kTk5w=; b=Y1xiHULQCTlN4mJsmkew+efH6VBf58zZKSfHigZ2nHGZ/Wn5KdbfBCgtGEIzjJK7Sgkk6j 9NOpUNe6YVKzuy9d3xPkT4+w1lHgsWhFnpC+nIkdYrgZgRu+Pqvrjvvecm5KXMTNTL6GC3 ZzkIUMr3sEI4+9/xCoOkSFlLEh3UzqQ= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 6179D1226BC; Fri, 18 Nov 2022 19:01:39 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, AngeloGioacchino Del Regno Subject: [PATCH v6 10/11] arm64: dts: mt7986: add Bananapi R3 Date: Fri, 18 Nov 2022 20:01:25 +0100 Message-Id: <20221118190126.100895-11-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749862143796664589?= X-GMAIL-MSGID: =?utf-8?q?1749862143796664589?= From: Frank Wunderlich Add support for Bananapi R3 SBC. - SD/eMMC support (switching first 4 bits of data-bus with sw6/D) - all rj45 ports and both SFP working (eth1/lan4) - all USB-Ports + SIM-Slot tested - i2c and all uarts tested - wifi tested (with eeprom calibration data) Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- The device can boot from all 4 storage options. Both, SPI and MMC, can be switched using hardware switches on the board, see https://wiki.banana-pi.org/Banana_Pi_BPI-R3#Jumper_setting I have added base dtb for sd/emmc to have a bootable version in mainline linux. SPI-NAND/NOR switched (CS by sw5/C) can be done with DT-Overlays, but don't know how to do it in upstream the right way...added dts files for dtbo and added them with dtbo extension to Makefile works. there is a commit which adds support building dtso files to dtbo in next: "kbuild: Allow DTB overlays to built from .dtso named source files" https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/commit/?h=dt/next&id=363547d2191cbc32ca954ba75d72908712398ff2 if Overlays are accepted then we can change my current dts from here to overlays too to have all as such. Till then imho the best way is to have mmc as board dts and add the right spi-device via overlay if needed. changes: v6: - drop usb 5v regulator from bpi-r3 based on chunfengs response it is only needed if regulator is switched (like for otg), usb works without it. v4: - add PCIe nodes - fix sfp-properties of sfp-1 (need to be plural) thx to Denis Odintsov for this v3: - rename factory-key to reset-key - add dcin regulator and add it as input for 3v3 (with renaming) - remove memory-node - dropped wifi eeprom (calibration) data - move mmc0 pinctrl to common dtsi and drop sdcard comment - change mmc pull-up/down to have generic bias-pull* v2: - remove pcie to be added later (discussion about clocks) - some fixes based on suggestions on ML - add key suffix like it's done in mt7622-bpi-r64 devicetree - add dash in sfp node names - use reg as unit for switch-node - drop "-3-4" suffix from i2c-pins node name - fix order in Makefile --- arch/arm64/boot/dts/mediatek/Makefile | 2 + .../mediatek/mt7986a-bananapi-bpi-r3-emmc.dts | 31 ++ .../mediatek/mt7986a-bananapi-bpi-r3-sd.dts | 25 + .../dts/mediatek/mt7986a-bananapi-bpi-r3.dtsi | 446 ++++++++++++++++++ 4 files changed, 504 insertions(+) create mode 100644 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-emmc.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-sd.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtsi diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile index 0ec90cb3ef28..e8902f2cc58f 100644 --- a/arch/arm64/boot/dts/mediatek/Makefile +++ b/arch/arm64/boot/dts/mediatek/Makefile @@ -7,6 +7,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-bananapi-bpi-r64.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-emmc.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-sd.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-rfb.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986b-rfb.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt8167-pumpkin.dtb diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-emmc.dts b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-emmc.dts new file mode 100644 index 000000000000..a0ca35b5977e --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-emmc.dts @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2021 MediaTek Inc. + * Author: Sam.Shih + */ + +/dts-v1/; +#include +#include + +#include "mt7986a-bananapi-bpi-r3.dtsi" + +/ { + model = "Bananapi BPI-R3 (emmc)"; +}; + +&mmc0 { + bus-width = <8>; + max-frequency = <200000000>; + cap-mmc-highspeed; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + hs400-ds-delay = <0x14014>; + vmmc-supply = <®_3p3v>; + vqmmc-supply = <®_1p8v>; + non-removable; + no-sd; + no-sdio; + status = "okay"; +}; + diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-sd.dts b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-sd.dts new file mode 100644 index 000000000000..06e4691cb815 --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-sd.dts @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2021 MediaTek Inc. + * Author: Sam.Shih + */ + +/dts-v1/; +#include +#include + +#include "mt7986a-bananapi-bpi-r3.dtsi" + +/ { + model = "Bananapi BPI-R3 (sdmmc)"; +}; + +&mmc0 { + bus-width = <4>; + max-frequency = <52000000>; + cap-sd-highspeed; + vmmc-supply = <®_3p3v>; + vqmmc-supply = <®_1p8v>; + status = "okay"; +}; + diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtsi new file mode 100644 index 000000000000..455e958ea08a --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtsi @@ -0,0 +1,446 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2021 MediaTek Inc. + * Authors: Sam.Shih + * Frank Wunderlich + * Daniel Golle + */ + +/dts-v1/; +#include +#include +#include +#include + +#include "mt7986a.dtsi" + +/ { + model = "Bananapi BPI-R3"; + compatible = "bananapi,bpi-r3", "mediatek,mt7986a"; + + aliases { + serial0 = &uart0; + ethernet0 = &gmac0; + ethernet1 = &gmac1; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + dcin: regulator-12vd { + compatible = "regulator-fixed"; + regulator-name = "12vd"; + regulator-min-microvolt = <12000000>; + regulator-max-microvolt = <12000000>; + regulator-boot-on; + regulator-always-on; + }; + + gpio-keys { + compatible = "gpio-keys"; + + reset-key { + label = "reset"; + linux,code = ; + gpios = <&pio 9 GPIO_ACTIVE_LOW>; + }; + + wps-key { + label = "wps"; + linux,code = ; + gpios = <&pio 10 GPIO_ACTIVE_LOW>; + }; + }; + + /* i2c of the left SFP cage (wan) */ + i2c_sfp1: i2c-gpio-0 { + compatible = "i2c-gpio"; + sda-gpios = <&pio 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&pio 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <2>; + #address-cells = <1>; + #size-cells = <0>; + }; + + /* i2c of the right SFP cage (lan) */ + i2c_sfp2: i2c-gpio-1 { + compatible = "i2c-gpio"; + sda-gpios = <&pio 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&pio 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <2>; + #address-cells = <1>; + #size-cells = <0>; + }; + + leds { + compatible = "gpio-leds"; + + green_led: led-0 { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&pio 69 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + + blue_led: led-1 { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&pio 86 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + }; + + reg_1p8v: regulator-1p8v { + compatible = "regulator-fixed"; + regulator-name = "1.8vd"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + vin-supply = <&dcin>; + }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "3.3vd"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + vin-supply = <&dcin>; + }; + + /* left SFP cage (wan) */ + sfp1: sfp-1 { + compatible = "sff,sfp"; + i2c-bus = <&i2c_sfp1>; + los-gpios = <&pio 46 GPIO_ACTIVE_HIGH>; + mod-def0-gpios = <&pio 49 GPIO_ACTIVE_LOW>; + tx-disable-gpios = <&pio 20 GPIO_ACTIVE_HIGH>; + tx-fault-gpios = <&pio 7 GPIO_ACTIVE_HIGH>; + }; + + /* right SFP cage (lan) */ + sfp2: sfp-2 { + compatible = "sff,sfp"; + i2c-bus = <&i2c_sfp2>; + los-gpios = <&pio 31 GPIO_ACTIVE_HIGH>; + mod-def0-gpios = <&pio 47 GPIO_ACTIVE_LOW>; + tx-disable-gpios = <&pio 15 GPIO_ACTIVE_HIGH>; + tx-fault-gpios = <&pio 48 GPIO_ACTIVE_HIGH>; + }; +}; + +&crypto { + status = "okay"; +}; + +ð { + status = "okay"; + + gmac0: mac@0 { + compatible = "mediatek,eth-mac"; + reg = <0>; + phy-mode = "2500base-x"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + + gmac1: mac@1 { + compatible = "mediatek,eth-mac"; + reg = <1>; + phy-mode = "2500base-x"; + sfp = <&sfp1>; + managed = "in-band-status"; + }; + + mdio: mdio-bus { + #address-cells = <1>; + #size-cells = <0>; + }; +}; + +&mdio { + switch: switch@31 { + compatible = "mediatek,mt7531"; + reg = <31>; + reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>; + }; +}; + +&mmc0 { + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc0_pins_default>; + pinctrl-1 = <&mmc0_pins_uhs>; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c_pins>; + status = "okay"; +}; + +&pcie { + pinctrl-names = "default"; + pinctrl-0 = <&pcie_pins>; + status = "okay"; +}; + +&pcie_phy { + status = "okay"; +}; + +&pio { + i2c_pins: i2c-pins { + mux { + function = "i2c"; + groups = "i2c"; + }; + }; + + mmc0_pins_default: mmc0-pins { + mux { + function = "emmc"; + groups = "emmc_51"; + }; + conf-cmd-dat { + pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2", + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5", + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD"; + input-enable; + drive-strength = <4>; + bias-pull-up = ; /* pull-up 10K */ + }; + conf-clk { + pins = "EMMC_CK"; + drive-strength = <6>; + bias-pull-down = ; /* pull-down 50K */ + }; + conf-ds { + pins = "EMMC_DSL"; + bias-pull-down = ; /* pull-down 50K */ + }; + conf-rst { + pins = "EMMC_RSTB"; + drive-strength = <4>; + bias-pull-up = ; /* pull-up 10K */ + }; + }; + + mmc0_pins_uhs: mmc0-uhs-pins { + mux { + function = "emmc"; + groups = "emmc_51"; + }; + conf-cmd-dat { + pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2", + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5", + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD"; + input-enable; + drive-strength = <4>; + bias-pull-up = ; /* pull-up 10K */ + }; + conf-clk { + pins = "EMMC_CK"; + drive-strength = <6>; + bias-pull-down = ; /* pull-down 50K */ + }; + conf-ds { + pins = "EMMC_DSL"; + bias-pull-down = ; /* pull-down 50K */ + }; + conf-rst { + pins = "EMMC_RSTB"; + drive-strength = <4>; + bias-pull-up = ; /* pull-up 10K */ + }; + }; + + pcie_pins: pcie-pins { + mux { + function = "pcie"; + groups = "pcie_clk", "pcie_pereset"; + }; + }; + + spi_flash_pins: spi-flash-pins { + mux { + function = "spi"; + groups = "spi0", "spi0_wp_hold"; + }; + }; + + spic_pins: spic-pins { + mux { + function = "spi"; + groups = "spi1_0"; + }; + }; + + uart1_pins: uart1-pins { + mux { + function = "uart"; + groups = "uart1_rx_tx"; + }; + }; + + uart2_pins: uart2-pins { + mux { + function = "uart"; + groups = "uart2_0_rx_tx"; + }; + }; + + wf_2g_5g_pins: wf-2g-5g-pins { + mux { + function = "wifi"; + groups = "wf_2g", "wf_5g"; + }; + conf { + pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4", + "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6", + "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10", + "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1", + "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0", + "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8", + "WF1_TOP_CLK", "WF1_TOP_DATA"; + drive-strength = <4>; + }; + }; + + wf_dbdc_pins: wf-dbdc-pins { + mux { + function = "wifi"; + groups = "wf_dbdc"; + }; + conf { + pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4", + "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6", + "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10", + "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1", + "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0", + "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8", + "WF1_TOP_CLK", "WF1_TOP_DATA"; + drive-strength = <4>; + }; + }; + + wf_led_pins: wf-led-pins { + mux { + function = "led"; + groups = "wifi_led"; + }; + }; +}; + +&spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi_flash_pins>; + cs-gpios = <0>, <0>; + status = "okay"; +}; + +&spi1 { + pinctrl-names = "default"; + pinctrl-0 = <&spic_pins>; + cs-gpios = <0>, <0>; + status = "okay"; +}; + +&ssusb { + status = "okay"; +}; + +&switch { + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "wan"; + }; + + port@1 { + reg = <1>; + label = "lan0"; + }; + + port@2 { + reg = <2>; + label = "lan1"; + }; + + port@3 { + reg = <3>; + label = "lan2"; + }; + + port@4 { + reg = <4>; + label = "lan3"; + }; + + port5: port@5 { + reg = <5>; + label = "lan4"; + phy-mode = "2500base-x"; + sfp = <&sfp2>; + managed = "in-band-status"; + }; + + port@6 { + reg = <6>; + label = "cpu"; + ethernet = <&gmac0>; + phy-mode = "2500base-x"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + }; +}; + +&trng { + status = "okay"; +}; + +&uart0 { + status = "okay"; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; + status = "okay"; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&uart2_pins>; + status = "okay"; +}; + +&usb_phy { + status = "okay"; +}; + +&watchdog { + status = "okay"; +}; + +&wifi { + status = "okay"; + pinctrl-names = "default", "dbdc"; + pinctrl-0 = <&wf_2g_5g_pins>, <&wf_led_pins>; + pinctrl-1 = <&wf_dbdc_pins>, <&wf_led_pins>; +}; + From patchwork Fri Nov 18 19:01:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 22479 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp361720wrr; Fri, 18 Nov 2022 11:06:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf5cPEPle+S4DuyaOhqytqwJxxPDEDbte6Yp2gWJtmHcV7aTurV+l49JZHl7BiOCs1xglPdL X-Received: by 2002:a17:906:ae93:b0:78a:3479:ec7d with SMTP id md19-20020a170906ae9300b0078a3479ec7dmr7093779ejb.671.1668798363255; Fri, 18 Nov 2022 11:06:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668798363; cv=none; d=google.com; s=arc-20160816; b=aswkTEmotbgBU+1k14as4M2Qm4ciZOXSBth2qCXYWMe+1Fpz/HvrOBp/eCUVaXd6yD jwaue+Ez/Ew5zvq3xAHoOTrREUn28uWNAxprFhtiL2CUt6qU94VW4B+glyyBgn2Z7h68 pscmhqiQtXkVxUucxfuKugjxwCbCuZQMr9LnWt8dVTpC219IUbBdfdosaWNSZeWAwyIi J+8qPiXXR3Zp4F4kSmd5gp32r8css2aGPU27ZpwCVGBE8XxT7LywsOfyKD8MIua6Jtmb v7/3VovuZwl+x9kEDEGnjQ10NOxt2ROQ6qmOgV/nHFblAXKZ6V1eKAywGxQxRB2UZo3G a9Qg== 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:cc:to:from :dkim-signature; bh=9Uac+pNoJWvk1YG3xnBZ9E1dKIbudwUnPsApI3M6W8c=; b=XD+TQWg+6vG37G1/JXiMdeQ6C3cPUjfLmABolO+UPTi8WHv1akVHEBiN/8IfzJlavn ivvkwsHoh7h2ebzzb6PFQd0FuwiXk0OwkbJ4/8C+bbpBgo+6ykF/6Y226ndWSLkLo/cH zXrbEAfiGyVlW2ezfheqgIvddVK+32XTTIjTisMI3CVyKe97gkRifJ3t49TjqU7aazUV pXuVb49iKpAV6iKpfW2DknF9Z5ONIZl2RzVvRYAmyg9Hooo1mlsOYcvHQjPyi2SpglbK nEaI4Fjqqs1wFuhSsQPFgnE4kMZ+dnspr+c1tn3G6bg54Y9QBPrKu3Q6of4+hj6LkXYx wglg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=rEfhhMJ3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x20-20020a05640226d400b004596d6e78e3si3869684edd.144.2022.11.18.11.05.37; Fri, 18 Nov 2022 11:06:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=rEfhhMJ3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242940AbiKRTC6 (ORCPT + 99 others); Fri, 18 Nov 2022 14:02:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242977AbiKRTCA (ORCPT ); Fri, 18 Nov 2022 14:02:00 -0500 Received: from mxout1.routing.net (mxout1.routing.net [IPv6:2a03:2900:1:a::a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 325D230F7B; Fri, 18 Nov 2022 11:01:42 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout1.routing.net (Postfix) with ESMTP id 0F02D408F1; Fri, 18 Nov 2022 19:01:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9Uac+pNoJWvk1YG3xnBZ9E1dKIbudwUnPsApI3M6W8c=; b=rEfhhMJ3SboHRT66Ds97LMw4Prt6m2LdIp8j/pJq0RJi/cRmOuZhtWo8Gg2AWjHhtqh3nj O6hRq/0NzC8aDMEb9xgx2gfhffakhtDe5u3Agq79EmH818/AULPZ47ZZx3yGXASCXzr5m7 DLqNPIVx/MLCDOs4QgZWRTWMy1kGaXM= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id B670D12271E; Fri, 18 Nov 2022 19:01:39 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org Subject: [PATCH v6 11/11] arm64: dts: mt7986: add BPI-R3 nand/nor overlays Date: Fri, 18 Nov 2022 20:01:26 +0100 Message-Id: <20221118190126.100895-12-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749861912855241697?= X-GMAIL-MSGID: =?utf-8?q?1749861912855241697?= From: Frank Wunderlich Add devicetree overlays for using nand and nor on BPI-R3. Signed-off-by: Frank Wunderlich --- maybe rename to dtso? "kbuild: Allow DTB overlays to built from .dtso named source files" https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/commit/?h=dt/next&id=363547d2191cbc32ca954ba75d72908712398ff2 more comments about the dt overlay-support: https://patchwork.kernel.org/comment/25092116/ https://patchwork.kernel.org/comment/25085681/ --- v4: - drop compile-comment from overlays - add author-information to dt-overlays --- arch/arm64/boot/dts/mediatek/Makefile | 2 + .../mediatek/mt7986a-bananapi-bpi-r3-nand.dts | 55 +++++++++++++++ .../mediatek/mt7986a-bananapi-bpi-r3-nor.dts | 69 +++++++++++++++++++ 3 files changed, 126 insertions(+) create mode 100644 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nand.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dts diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile index e8902f2cc58f..d42208c4090d 100644 --- a/arch/arm64/boot/dts/mediatek/Makefile +++ b/arch/arm64/boot/dts/mediatek/Makefile @@ -8,6 +8,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-bananapi-bpi-r64.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-emmc.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-nand.dtbo +dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-nor.dtbo dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-sd.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-rfb.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986b-rfb.dtb diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nand.dts b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nand.dts new file mode 100644 index 000000000000..15ee8c568f3c --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nand.dts @@ -0,0 +1,55 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ +/* + * Authors: Daniel Golle + * Frank Wunderlich + */ + +/dts-v1/; +/plugin/; + +/ { + compatible = "bananapi,bpi-r3", "mediatek,mt7986a"; + + fragment@0 { + target-path = "/soc/spi@1100a000"; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + spi_nand: spi_nand@0 { + compatible = "spi-nand"; + reg = <0>; + spi-max-frequency = <10000000>; + spi-tx-buswidth = <4>; + spi-rx-buswidth = <4>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "bl2"; + reg = <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label = "reserved"; + reg = <0x80000 0x300000>; + }; + + partition@380000 { + label = "fip"; + reg = <0x380000 0x200000>; + read-only; + }; + + partition@580000 { + label = "ubi"; + reg = <0x580000 0x7a80000>; + }; + }; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dts b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dts new file mode 100644 index 000000000000..f18643a9089c --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dts @@ -0,0 +1,69 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ +/* + * Authors: Daniel Golle + * Frank Wunderlich + */ + +/dts-v1/; +/plugin/; + +/ { + compatible = "bananapi,bpi-r3", "mediatek,mt7986a"; + + fragment@0 { + target-path = "/soc/spi@1100a000"; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "bl2"; + reg = <0x0 0x20000>; + read-only; + }; + + partition@20000 { + label = "reserved"; + reg = <0x20000 0x20000>; + }; + + partition@40000 { + label = "u-boot-env"; + reg = <0x40000 0x40000>; + }; + + partition@80000 { + label = "reserved2"; + reg = <0x80000 0x80000>; + }; + + partition@100000 { + label = "fip"; + reg = <0x100000 0x80000>; + read-only; + }; + + partition@180000 { + label = "recovery"; + reg = <0x180000 0xa80000>; + }; + + partition@c00000 { + label = "fit"; + reg = <0xc00000 0x1400000>; + compatible = "denx,fit"; + }; + }; + }; + }; + }; +};