From patchwork Fri May 11 02:03:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 10392871 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 11EAE60353 for ; Fri, 11 May 2018 02:04:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0545228E1D for ; Fri, 11 May 2018 02:04:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED81428E20; Fri, 11 May 2018 02:04:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4200E28E1D for ; Fri, 11 May 2018 02:04:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=Jpe7ftkp6mscgVHBpgL5rUb6vHvCjrFLpk4orH6Npsg=; b=ine FwaFnLQgG/Llv1C1EJDimuCRhHRsdYMVh4NF595VpDa1o3kZcSfrej+9gKBuacTwxK7mglp7I6nrV uIGRjIVJSXT3Py+17w08weZcETn6rjZPLzOq386r7CPHr3ZkOL/CxvGfIQICeI4Q+LkkKd681EdeC rSS3ocI6SiJdWtNKJV/NCpYZ3tcR/eHPJWtR+coFmPcmjrdjcOU79JOdxdPBKkbvxrWIr35NrMdFB wOlvHowkX8Tn8l7Eh168kqCp26ctjs0BFqSd/auqsbjuH04+zk9mMf+YDAmBxdxs9vYDLgI0XKbU9 A3cIkTAKitzpqSclcpG00nq9L8TjzUA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fGxQG-0006pM-PN; Fri, 11 May 2018 02:04:40 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fGxQC-0006np-0D for linux-arm-kernel@lists.infradead.org; Fri, 11 May 2018 02:04:37 +0000 Received: by mail-pf0-x244.google.com with SMTP id w129-v6so1951847pfd.3 for ; Thu, 10 May 2018 19:04:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=ZOe5xm/kAn1ifE+NyKuVnvTnIf3aOMXUUFkL1Xm4QrM=; b=O55ZvRBggwewY8KXlO3QctXQgwYJJJxGu9ZUg8n3bF4KdTOfvKVqlUI9IJ/bUoEMO/ xbDEbkt2N3bvFfWzshoWUudLhdZ2kZtHGteOGV1NkfRW9QxUACqU5hRioNqN1R6AAC1N 2LFdmjAV6dMpCZtQesVmAHDFfY4jX4+2teB7I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ZOe5xm/kAn1ifE+NyKuVnvTnIf3aOMXUUFkL1Xm4QrM=; b=lxSI36cD5lrJBQbi0m4qxcWlj4lSYXebB6TodgiIiOpH9eJlWP6IaUdl+Ppgc6RCvz Ypppm8dj/lVciItYvU8gLx2FijfP+2fe3QY4BGWLxsXF7HhwUoDYc8KNshwcwB2PljVx Q4WqrccllcLx1T2TI4cYxnmcNWt/Q+kKwMcnt4UH/eTDPT3QemYkeCtUP0QGJ4y3OIwa Fg9j8YOa7U6eZb+qj0fhmAgbqsiPcuV6vgHdA77ZyKcgXpGMu3llf+mPIExnVaSuXBNq D+JRPGS4Pr78DRGufjgnJkG26BwB84aD1VTdbbemW5k5URnx/EA/tS7dYz4JQPkBWIrR Sz9g== X-Gm-Message-State: ALKqPwcRMnirCQgBZIxMDwAAw8Nb+OUtoNIR+Ie+oOPQvM+Rx78YvMKt UMuGjBm1wHy/01/8zcCTwqC1Gg== X-Google-Smtp-Source: AB8JxZpxrpPP7p8Z3WbsOoK5rprI7kiGirRgfJeOTxNlF7IgJQ2qkF0tUfYUDLPapETaINW96o5yKg== X-Received: by 2002:a65:4d0b:: with SMTP id i11-v6mr1192149pgt.51.1526004260298; Thu, 10 May 2018 19:04:20 -0700 (PDT) Received: from localhost.localdomain ([45.56.152.100]) by smtp.gmail.com with ESMTPSA id x5-v6sm2955254pgv.15.2018.05.10.19.04.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 May 2018 19:04:18 -0700 (PDT) From: Shawn Guo To: Wei Xu Subject: [PATCH 1/3] arm64: dts: hi3798cv200: enable PCIe support for poplar board Date: Fri, 11 May 2018 10:03:38 +0800 Message-Id: <1526004220-17030-1-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180510_190436_047216_CFAC9BED X-CRM114-Status: GOOD ( 11.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jianguo Sun , Jiancheng Xue , Shawn Guo , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP It adds combophy devices under peripheral controller and enables PCIe support for Hi3798CV200 Poplar board. Signed-off-by: Shawn Guo --- .../boot/dts/hisilicon/hi3798cv200-poplar.dts | 15 ++++++ arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi | 63 ++++++++++++++++++++++ 2 files changed, 78 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hi3798cv200-poplar.dts b/arch/arm64/boot/dts/hisilicon/hi3798cv200-poplar.dts index 4d5d644abb12..c4382e1f3c92 100644 --- a/arch/arm64/boot/dts/hisilicon/hi3798cv200-poplar.dts +++ b/arch/arm64/boot/dts/hisilicon/hi3798cv200-poplar.dts @@ -61,6 +61,15 @@ default-state = "off"; }; }; + + reg_pcie: regulator-pcie { + compatible = "regulator-fixed"; + regulator-name = "3V3_PCIE0"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio6 7 0>; + enable-active-high; + }; }; &gmac1 { @@ -146,6 +155,12 @@ status = "okay"; }; +&pcie { + reset-gpios = <&gpio4 4 GPIO_ACTIVE_HIGH>; + vpcie-supply = <®_pcie>; + status = "okay"; +}; + &sd0 { bus-width = <4>; cap-sd-highspeed; diff --git a/arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi b/arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi index 962bd79139e4..5b73403551e6 100644 --- a/arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi @@ -8,7 +8,9 @@ */ #include +#include #include +#include #include / { @@ -106,6 +108,37 @@ #reset-cells = <2>; }; + perictrl: peripheral-controller@8a20000 { + compatible = "hisilicon,hi3798cv200-perictrl", "syscon", + "simple-mfd"; + reg = <0x8a20000 0x1000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x8a20000 0x1000>; + + combphy0: phy@850 { + compatible = "hisilicon,hi3798cv200-combphy"; + reg = <0x850 0x8>; + #phy-cells = <1>; + clocks = <&crg HISTB_COMBPHY0_CLK>; + resets = <&crg 0x188 4>; + assigned-clocks = <&crg HISTB_COMBPHY0_CLK>; + assigned-clock-rates = <100000000>; + hisilicon,fixed-mode = ; + }; + + combphy1: phy@858 { + compatible = "hisilicon,hi3798cv200-combphy"; + reg = <0x858 0x8>; + #phy-cells = <1>; + clocks = <&crg HISTB_COMBPHY1_CLK>; + resets = <&crg 0x188 12>; + assigned-clocks = <&crg HISTB_COMBPHY1_CLK>; + assigned-clock-rates = <100000000>; + hisilicon,mode-select-bits = <0x0008 11 (0x3 << 11)>; + }; + }; + uart0: serial@8b00000 { compatible = "arm,pl011", "arm,primecell"; reg = <0x8b00000 0x1000>; @@ -419,5 +452,35 @@ clocks = <&sysctrl HISTB_IR_CLK>; status = "disabled"; }; + + pcie: pcie@9860000 { + compatible = "hisilicon,hi3798cv200-pcie"; + reg = <0x9860000 0x1000>, + <0x0 0x2000>, + <0x2000000 0x01000000>; + reg-names = "control", "rc-dbi", "config"; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; + bus-range = <0 15>; + num-lanes = <1>; + ranges = <0x81000000 0x0 0x00000000 0x4f00000 0x0 0x100000 + 0x82000000 0x0 0x3000000 0x3000000 0x0 0x01f00000>; + interrupts = ; + interrupt-names = "msi"; + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 0>; + interrupt-map = <0 0 0 0 &gic 0 131 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&crg HISTB_PCIE_AUX_CLK>, + <&crg HISTB_PCIE_PIPE_CLK>, + <&crg HISTB_PCIE_SYS_CLK>, + <&crg HISTB_PCIE_BUS_CLK>; + clock-names = "aux", "pipe", "sys", "bus"; + resets = <&crg 0x18c 6>, <&crg 0x18c 5>, <&crg 0x18c 4>; + reset-names = "soft", "sys", "bus"; + phys = <&combphy1 PHY_TYPE_PCIE>; + phy-names = "phy"; + status = "disabled"; + }; }; };