From patchwork Mon Nov 20 07:09:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1865886 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Hg3I7frs; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=linux-pci-owner@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4SYdss1lh5z1ySC for ; Mon, 20 Nov 2023 18:09:20 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229865AbjKTHJU (ORCPT ); Mon, 20 Nov 2023 02:09:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229562AbjKTHJT (ORCPT ); Mon, 20 Nov 2023 02:09:19 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED0CDB3 for ; Sun, 19 Nov 2023 23:09:15 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-9fcfd2a069aso108858966b.1 for ; Sun, 19 Nov 2023 23:09:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700464154; x=1701068954; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=JUN834VVYK8twG3IjVN0msVN67LU5krCVdfvSAdrwLI=; b=Hg3I7frsuLENJtX+y9x9+s7jWtb7aqcQhiXaJh4XTMCMTyq8SzWijI7ylw/rMgDh6Y TksFm7BlZaeLvXDcW6oUxEYIQ1ZRmolmUAEW4xvZkOOjW2dEmXOC/S7/UldcM34OKC1B sUgjv7z1RV/wq2P702pq9lQN9VMhCND7jafnQBUe6F1csyR2edYW8/tdg6L8RqsN88J3 L5Wz0RvjsMmTklYMZcuDvbmvlLwtlzPHK+Y+P8Td/6luybJWKIxUn6gUotWQc0Q8r79t GdA5aq5Ax5XFFfcb2N8VaW1lq5ZzXHIcHUFcYrcW6Zb0t4aKrJ0pbFtSg4/2bbJFOav0 sOHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700464154; x=1701068954; 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=JUN834VVYK8twG3IjVN0msVN67LU5krCVdfvSAdrwLI=; b=iJn+iKXUZZ+d1/3zv7dr82xyk1MUKmJmd94Vn8IdG/rWBSbILZqxZi0NzUBfBBJgPM 9uav7TnObOL6+1I1sdNEgbiC088MurQCrEcvE3HRiW7YuE3WCYen2D7Y306klz1Khyj/ KdMf3/k56d4TQ/lVJ8FAlLb13XpYZn6SqP1Exi9ZLHFH0KkJH0eckEkIEZkNaWcVYY0X oVIS0dPUXi2sXmi+p3GJNumfKEEHEXLi89DyxkOygeLsLHx9UA456VGG6fCCtG+94pG7 CgL91/yC47TQYAbupjWyulRolNJap35gx5BefunJGvQCnnmdrkyPq5WqchSiCTryi3Yf SNew== X-Gm-Message-State: AOJu0YybsuIsplG50rmSakGt3AU+K+yoDRB8Wc9gcQeWq0GcFwRFab7u 1ek9H4C3EEb6g/oM3ghxxpBgIg== X-Google-Smtp-Source: AGHT+IHD/fU6exyVMz9nsgS1Ig6AMjkjbTGjfVno4m2blpUBrKjRBDPq4opvk3Uukz62fuDYhrwh0w== X-Received: by 2002:a17:907:3c10:b0:9fe:5d39:41c1 with SMTP id gh16-20020a1709073c1000b009fe5d3941c1mr1408033ejc.52.1700464154360; Sun, 19 Nov 2023 23:09:14 -0800 (PST) Received: from krzk-bin.. ([178.197.222.11]) by smtp.gmail.com with ESMTPSA id d2-20020a170906640200b0099bd7b26639sm3570500ejm.6.2023.11.19.23.09.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 23:09:13 -0800 (PST) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Manivannan Sadhasivam , Conor Dooley Subject: [PATCH v2 1/2] dt-bindings: PCI: qcom: adjust iommu-map for different SoC Date: Mon, 20 Nov 2023 08:09:09 +0100 Message-Id: <20231120070910.16697-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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-pci@vger.kernel.org The PCIe controller on SDX55 has five entries in its iommu-map, MSM8998 has one and SDM845 has sixteen, so allow wider number of items to fix dtbs_check warnings like: qcom-sdx55-mtp.dtb: pcie@1c00000: iommu-map: [[0, 21, 512, 1], [256, 21, 513, 1], [512, 21, 514, 1], [768, 21, 515, 1], [1024, 21, 516, 1]] is too long Reviewed-by: Manivannan Sadhasivam Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Reviewed-by: David Heidelberg --- Changes in v2: 1. Add Acs/Rb. --- Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml index 8bfae8eb79a3..14d25e8a18e4 100644 --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml @@ -62,7 +62,8 @@ properties: maxItems: 8 iommu-map: - maxItems: 2 + minItems: 1 + maxItems: 16 # Common definitions for clocks, clock-names and reset. # Platform constraints are described later. From patchwork Mon Nov 20 07:09:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1865887 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=LaRHv4HA; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=linux-pci-owner@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4SYdsx0csLz1ySC for ; Mon, 20 Nov 2023 18:09:25 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231987AbjKTHJ0 (ORCPT ); Mon, 20 Nov 2023 02:09:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231982AbjKTHJW (ORCPT ); Mon, 20 Nov 2023 02:09:22 -0500 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6FE290 for ; Sun, 19 Nov 2023 23:09:18 -0800 (PST) Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-9fa2714e828so230220666b.1 for ; Sun, 19 Nov 2023 23:09:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700464157; x=1701068957; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6laP/QeQ8ZkNdY+I7g66zga8GNt1LoZIWkuM0YaBrIE=; b=LaRHv4HACu2w7RpKBmj9nr5IR1qElkq6oW4JgK0ak/Ox/R0qfvBi29cyOuKI9ODN4W 0DIb90S4QxZdG25nuJXsOBH6INWLL/eweOGyQmdWkzf2S4svJ/q3XPXU8OV3+uERPbUF ejOhTOGk5Tc92yw9mOBFSvQ2ixIG1MpmgvMISrcyosWfOQm/zHi88/YWVm0cTZAiS1fV dhtO1CfztH5ffxc3JhIfZhj6VQ65ZTMs6APE0NIhHiIwQYko2HlS8AVl07b03Z6ajKM7 l2c0a/2jizysm5CixxeGacRYYbbEmclK/M6wN6ZL3IniQxAMfiBjmYM6Dftb5callqvG MWQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700464157; x=1701068957; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6laP/QeQ8ZkNdY+I7g66zga8GNt1LoZIWkuM0YaBrIE=; b=nCS9KITV1/T2wNAzdMsh3pO3400IWr2wLtkiUWcD8dEIYJuL05eMZGaKCcvLX+ZR0V s4bzst7DsE8qB2RXgFgLXoBCx8zG9i4ynClEnjyDTb2qaqWgXnhrBx6rUgaBFlZQILH3 16HfnJnyygpgnl1A1oBibsg3GIwQhCRi8MpN0hJNNw5oJRy28PgHi49EPLZrdF6wySnD hxjBL53K7s71O7wn5lK+n4TwgTw/yovhbzh4shgdVXGUo2LBb7jDLeCPhn+aWlScpBya LlTLZAuvhq7Jj1T55Z6+aLasVbMsOI5G2WxOGJDWEFbDAounrP6TULD8x17WGMx09GSl YZhw== X-Gm-Message-State: AOJu0Yyl/vAd0RzOcGErreayiIg5nJIRtaD70U9oWEY76C/0MKtfUJWO UZQ7xBDvkGkMAoUpa6Le/fjNZw== X-Google-Smtp-Source: AGHT+IGnSpGLDhGj8nPBUxiGsT/wU1tVvYfXN3TxpwhKJ+R5n5vOwx8YbFTgOFcBuhLAy8fmL2wVLw== X-Received: by 2002:a17:907:29d7:b0:9df:4232:5276 with SMTP id ev23-20020a17090729d700b009df42325276mr4154859ejc.76.1700464157199; Sun, 19 Nov 2023 23:09:17 -0800 (PST) Received: from krzk-bin.. ([178.197.222.11]) by smtp.gmail.com with ESMTPSA id d2-20020a170906640200b0099bd7b26639sm3570500ejm.6.2023.11.19.23.09.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 23:09:16 -0800 (PST) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Manivannan Sadhasivam Subject: [PATCH v2 2/2] dt-bindings: PCI: qcom: correct clocks for SC8180x and SM8150 Date: Mon, 20 Nov 2023 08:09:10 +0100 Message-Id: <20231120070910.16697-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231120070910.16697-1-krzysztof.kozlowski@linaro.org> References: <20231120070910.16697-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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-pci@vger.kernel.org PCI node in Qualcomm SC8180x DTS has 8 clocks, while one on SM8150 has 7 clocks: sc8180x-primus.dtb: pci@1c00000: 'oneOf' conditional failed, one must be fixed: ['pipe', 'aux', 'cfg', 'bus_master', 'bus_slave', 'slave_q2a', 'ref', 'tbu'] is too short sm8150-hdk.dtb: pci@1c00000: 'oneOf' conditional failed, one must be fixed: ['pipe', 'aux', 'cfg', 'bus_master', 'bus_slave', 'slave_q2a', 'tbu'] is too short Reviewed-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Kozlowski --- Changes in v2: 1. Add Acs/Rb. 2. Correct error message for sm8150. --- .../devicetree/bindings/pci/qcom,pcie.yaml | 58 ++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml index 14d25e8a18e4..4c993ea97d7c 100644 --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml @@ -479,6 +479,35 @@ allOf: items: - const: pci # PCIe core reset + - if: + properties: + compatible: + contains: + enum: + - qcom,pcie-sc8180x + then: + oneOf: + - properties: + clocks: + minItems: 8 + maxItems: 8 + clock-names: + items: + - const: pipe # PIPE clock + - const: aux # Auxiliary clock + - const: cfg # Configuration clock + - const: bus_master # Master AXI clock + - const: bus_slave # Slave AXI clock + - const: slave_q2a # Slave Q2A clock + - const: ref # REFERENCE clock + - const: tbu # PCIe TBU clock + properties: + resets: + maxItems: 1 + reset-names: + items: + - const: pci # PCIe core reset + - if: properties: compatible: @@ -527,8 +556,35 @@ allOf: compatible: contains: enum: - - qcom,pcie-sc8180x - qcom,pcie-sm8150 + then: + oneOf: + - properties: + clocks: + minItems: 7 + maxItems: 7 + clock-names: + items: + - const: pipe # PIPE clock + - const: aux # Auxiliary clock + - const: cfg # Configuration clock + - const: bus_master # Master AXI clock + - const: bus_slave # Slave AXI clock + - const: slave_q2a # Slave Q2A clock + - const: tbu # PCIe TBU clock + properties: + resets: + maxItems: 1 + reset-names: + items: + - const: pci # PCIe core reset + + + - if: + properties: + compatible: + contains: + enum: - qcom,pcie-sm8250 then: oneOf: