From patchwork Thu Nov 30 19:18:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 172057 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp624980vqy; Thu, 30 Nov 2023 11:19:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IHbjgE4UHXOQMPFilAT03R6GYXUyAXlGNMZLHv+OOJWYULSZ4u8Ubx6D1Jg+QA0VhtEYFk0 X-Received: by 2002:a05:6a21:7891:b0:18b:950d:de3b with SMTP id bf17-20020a056a21789100b0018b950dde3bmr28317903pzc.38.1701371992750; Thu, 30 Nov 2023 11:19:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701371992; cv=none; d=google.com; s=arc-20160816; b=psoaB5oP7urYtijdhoJQdSl6mQxtzqFbaVZ5VppyaRCXhtHXryV9CRZvoklLDFMUQn rXW7rlJqCvaPKrBy6sPXdzX5i+iMcZQD/z1EUPrQtTO6qDoJGtvWY/eIspLTkTz/fRML cw/AZEz/PrK6T09OwxmFhIu6frwntJtw98wAZ3DrTiduhEeqiu1Z9JT+dUjKI+zrfrfe ckDr4rvUflSOlRH66u+fvVT1E9FyJW0ySmp7WXzXqlxH6D7HWcDz14SOaqET3DlEoKtR ytPgGwg2cedOyR7QBSHCz2U+opSPEJ9a9xWbmmwVaplfS25j8fwvB+HjXPoTrYvdNKaO EhJw== 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 :message-id:date:subject:cc:to:from; bh=QLPu8OP7Gtghj9r8oEl3tmBH6570M0xe/cb33bW7tew=; fh=ipQeGCqIpYNo34bHK4ovzvaG3eETtIUt4gWd2Ix7du8=; b=uW4tsuKMvfYymM8rQaPOprP4XLGizNzF2a16s1qDvFJxUrHxCKurQEBmNe+EYHCYJT AVpELqcVDeATyoAX8N9YOVyKJxB/Dh8Jp/1FrPTN2sgvWNDzATWhLIy272RvtqhK8QZI axZnwqOxUGC9edqBuDyiDBxKbndZu2lnNAadJWIgC7CuqlL1uCGhW4piRi2yj8s0isSx B8qVGd0a50TMptsX1HZy0xhl1Y8pmy88POjreGCx7IGDzNsvB9Vph7u7jFERQ9H+TRoB DbTSUx5l9SFzsA/MAOeAdaZ6PkuLDCD2o9JgmPBueBolpxGIUl1DSgWbNDGj77bo1ZwS +i9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id f21-20020a056a00229500b006cbeff5ae49si1855667pfe.3.2023.11.30.11.19.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 11:19:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id B177980486A7; Thu, 30 Nov 2023 11:19:51 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376331AbjK3TTm (ORCPT + 99 others); Thu, 30 Nov 2023 14:19:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376347AbjK3TTj (ORCPT ); Thu, 30 Nov 2023 14:19:39 -0500 Received: from mail-oi1-f172.google.com (mail-oi1-f172.google.com [209.85.167.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78816D48; Thu, 30 Nov 2023 11:19:45 -0800 (PST) Received: by mail-oi1-f172.google.com with SMTP id 5614622812f47-3b845ba9ba9so817070b6e.3; Thu, 30 Nov 2023 11:19:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701371985; x=1701976785; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QLPu8OP7Gtghj9r8oEl3tmBH6570M0xe/cb33bW7tew=; b=EDS8OnsIiVq428xHZsYAJwPqcun9XqIqgUrwmFS8sUaCJ4Rx1SK/Gwek1g6sA+AHfl DlOlI8G4GptOvKWNXvusoDEIrrPQAGAo5RP40UVzV2nKg3F8k331bMHiSkrMm53sPgik ykbEb2qEanQeLsAL3cCD3p6Kqcf/SV6KnpnDmrOEHdYHw5Gg92OGifJozfod0M0UJxM0 bJo+tsEfX2O8kfW6gzbwGnw1KSvn99ID6/g3dqI8Tc7wZkk1DeqTrio2OHnLBLNuogCI CjxOGCEzQJgOAZpTeNOR1jVqwtEbhnsLztX+owMVKgSOgocAk2B/Tvh1KgTICdLhocWI /kBA== X-Gm-Message-State: AOJu0Yz7RqG5a1vUqePUlJtNQpjmHk45gr7OXTkZTu0nwqPtJ9Z3A3DW kB/3ok2KX4Vvk3sWokgjlw== X-Received: by 2002:a05:6808:1507:b0:3b8:3f9f:4c73 with SMTP id u7-20020a056808150700b003b83f9f4c73mr636290oiw.26.1701371984728; Thu, 30 Nov 2023 11:19:44 -0800 (PST) Received: from herring.priv (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id x19-20020a056808145300b003b6caf2accfsm274659oiv.22.2023.11.30.11.19.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 11:19:43 -0800 (PST) Received: (nullmailer pid 2435276 invoked by uid 1000); Thu, 30 Nov 2023 19:19:42 -0000 From: Rob Herring To: Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] arm64: dts: rockchip: rk3399-gru: Fix PCI node addresses Date: Thu, 30 Nov 2023 13:18:29 -0600 Message-ID: <20231130191830.2424361-1-robh@kernel.org> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 30 Nov 2023 11:19:51 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784017838703291321 X-GMAIL-MSGID: 1784017838703291321 The rk3399-gru PCI node addresses are wrong. In rk3399-gru-scarlet, the bus number in the address should be 0. This is because bus number assignment is dynamic and not known up front. For FDT, the bus number is simply ignored. In rk3399-gru-chromebook, the addresses are simply invalid. The first "reg" entry must be the configuration space for the device. The entry should be all 0s except for device/slot and function numbers. The existing 64-bit memory space (0x83000000) entries are not valid because they must have the BAR address in the lower byte of the first cell. Warnings for these are enabled by adding the missing 'device_type = "pci"' for the root port node. Signed-off-by: Rob Herring --- arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi | 3 +-- arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet-dumo.dts | 4 ++-- arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi index 5c1929d41cc0..cacbad35cfc8 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi @@ -509,8 +509,7 @@ wacky_spi_audio: spi2@0 { &pci_rootport { mvl_wifi: wifi@0,0 { compatible = "pci1b4b,2b42"; - reg = <0x83010000 0x0 0x00000000 0x0 0x00100000 - 0x83010000 0x0 0x00100000 0x0 0x00100000>; + reg = <0x0000 0x0 0x0 0x0 0x0>; interrupt-parent = <&gpio0>; interrupts = <8 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default"; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet-dumo.dts b/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet-dumo.dts index 853e88455e75..9e4b12ed62cb 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet-dumo.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet-dumo.dts @@ -34,8 +34,8 @@ &mipi_panel { &pci_rootport { wifi@0,0 { compatible = "qcom,ath10k"; - reg = <0x00010000 0x0 0x00000000 0x0 0x00000000>, - <0x03010010 0x0 0x00000000 0x0 0x00200000>; + reg = <0x00000000 0x0 0x00000000 0x0 0x00000000>, + <0x03000010 0x0 0x00000000 0x0 0x00200000>; qcom,ath10k-calibration-variant = "GO_DUMO"; }; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi index c9bf1d5c3a42..789fd0dcc88b 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi @@ -489,6 +489,7 @@ pci_rootport: pcie@0,0 { #address-cells = <3>; #size-cells = <2>; ranges; + device_type = "pci"; }; };