Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 715C83016FB for ; Mon, 29 Sep 2025 11:38:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759145903; cv=none; b=hu9iEWCdRfVSDuF4cTqMXACdAwtjV8cXNWDmrUr0FJ/bg/mCHs50QbnoGYmIZfxix+wDPxtOXTbRCLXJUDNl5WP7Ci4GsE0+b3o/cB2gIZitOfCd7nVFB4tUxbzKsdrCR/8y+HrpiRAvBSXuBjqxGmciPF+CV1fgOSi2IMQbCu0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759145903; c=relaxed/simple; bh=JmJSN/YBNM+mDU5SsW6cP009KHpjO9jA4E3c7+XHHtg=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=q4P8hLJZDCEXqkizECXRe57EZTuUT2YOLfY6wc5TNCVQFVkpqUPuvRQgLvQrU8pFfcRgW4oFFgp+wPdpIU8OTT9eoc26+rUwu2i+gooOwu9c4WHWvRUofP3Hr9nT1zXrg6Dm/m2V5+kAlmgTywEc+HkQIIYwSOVLepShX1mls6Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DYN+e98o; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DYN+e98o" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-46e3af7889fso23983115e9.2 for ; Mon, 29 Sep 2025 04:38:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759145900; x=1759750700; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=M0akVzwetHFuOLRrA1RBETtHcqSI0prdy+4IQvcPTIc=; b=DYN+e98oXyGkYzKeQVUq4kIMyWNoJyecT9cneTEE3SXYMgOpvNWiBzis72iZM3f0k8 mWiwFqdiglEAvXt8g9s/IBWZF0Ycmctu/YLqhK1+53cyo5i/6BdwELSRsM7jUQt5ZWQT WAwLs+oSHnUdDyHwbRjuq58MzksfkKmTBIo7VOscH0FDAPzY6a21raZSpjYZp2x5Tvhw OoZI8TU8Bg+yhDRIOdVpIskGn+R0F3eNcytwxPrvL89gaAbHbA6CeZSkwNYn32req/+7 y2aSAs2Cdh+1TOXrZ8S6AqwzR5ayPwmsPiH8NPAKPC/rq05G3i2PnHTCqkciZzITnUmA cPDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759145900; x=1759750700; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=M0akVzwetHFuOLRrA1RBETtHcqSI0prdy+4IQvcPTIc=; b=pCRm96N8MfQCn6fsHDI7CNu9swRi3RpRBcfTII9MgFa37oV16FOR5Bnl10DC56yVlG DWskT2FQpI8HESYf2NmPurxCEakhmxvBqFwtk6kzVYMsV4ysb/kCOiunAuMvGBYXFaeh sq79IO6CT6iqVXkkfZBTCjt5WNUoMPXan//BsJIlAowYAm3A8kQ0/Sm8ydfVQWIVyLKb QMwmToLWfz9G4g+rZ/PxX6CJYN9K4lrDjs86cmw3x4fDJWlX1RjukQscXgMDaHQqPHAZ TljoskQj54PXmhsclFLORT7IMVL0CfEmTOfqgc2liWnqlPl8IOAsyvgGNg98u7ob1X2w KObQ== X-Forwarded-Encrypted: i=1; AJvYcCV2x3667Dk71RBwwynCzbxD8GhzncbGCaIEM81hYZsPiRN+8fBM1mf3n8ojVm32siGHJ//yChAS2NFi@vger.kernel.org X-Gm-Message-State: AOJu0YytQnIEQ1/EvnaDfzZlO3n+pB31hCE9oOPWvM5UEcGXaSPizXMI XWQ8ar4rkbchv46AtiJ2Xa8cLDDsOwy0Nqzns0o7c4orn7QRgDLgv1oB X-Gm-Gg: ASbGnctRE+h2gx4BTl60ycS2w65vJ99qPtIJS3Qs2akwMe1sOBv+PAFmcm1beJxMMN5 71I0yupKlxSZ+4Nb7eK2JV7XclaA26fEglHNIuSB3KJySgwS3RfbhuvjJRfSPb6esDBAdmCOraU JOJy92tGcB0LD/nJdphVGgjl/L9T/AdmP90F5IKVYkNcmoIwxp3M9jXRekQ4dckKrWauaB0HUnv k9mUo/gDNzb/hu8bWbSM+8r5LTH035JVnOnPADJik1bTULMyVijUxKHgMb1wY9I5BsZk2K1l/a+ qu/4mvCe3RUMZMl/4JeyTA4xZ5+emKYW3RK3GjGyWpYMT4sZiaSohPSAo3/AkSW8Xsj33BCp7kw uxqD7LKwOITPHSXvbMCoqAIx5k9/ZpdGEKAIjD70YkE767/JUTXFHPikehiBN80Nva0PuEkiSYl /DzHjd1g== X-Google-Smtp-Source: AGHT+IHc2sldTrNgGF8rhPUi/DYc+1Z7wh5Q8HiRuvHW/nw/mJhTW80r4LIKdvY/BzwTBOCgANZI6A== X-Received: by 2002:a05:600c:181c:b0:46d:996b:826f with SMTP id 5b1f17b1804b1-46e32a02d46mr117755925e9.25.1759145899467; Mon, 29 Sep 2025 04:38:19 -0700 (PDT) Received: from Ansuel-XPS24 (host-95-249-236-54.retail.telecomitalia.it. [95.249.236.54]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-46e56f53596sm9502465e9.7.2025.09.29.04.38.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Sep 2025 04:38:19 -0700 (PDT) From: Christian Marangi To: Ryder Lee , Jianjun Wang , Bjorn Helgaas , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Christian Marangi , linux-pci@vger.kernel.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 3/5] dt-bindings: PCI: mediatek: Add support for Airoha AN7583 Date: Mon, 29 Sep 2025 13:38:02 +0200 Message-ID: <20250929113806.2484-4-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250929113806.2484-1-ansuelsmth@gmail.com> References: <20250929113806.2484-1-ansuelsmth@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Introduce Airoha AN7583 SoC compatible in mediatek PCIe controller binding. Similar to GEN3, the Airoha AN7583 GEN2 PCIe controller require the PBUS csr property to permit the correct functionality of the PCIe controller. Signed-off-by: Christian Marangi --- .../bindings/pci/mediatek-pcie.yaml | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie.yaml index fca6cb20d18b..b91b13a0220c 100644 --- a/Documentation/devicetree/bindings/pci/mediatek-pcie.yaml +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie.yaml @@ -13,6 +13,7 @@ properties: compatible: oneOf: - enum: + - airoha,an7583-pcie - mediatek,mt2712-pcie - mediatek,mt7622-pcie - mediatek,mt7629-pcie @@ -55,6 +56,17 @@ properties: power-domains: maxItems: 1 + mediatek,pbus-csr: + $ref: /schemas/types.yaml#/definitions/phandle-array + items: + - items: + - description: phandle to pbus-csr syscon + - description: offset of pbus-csr base address register + - description: offset of pbus-csr base address mask register + description: + Phandle with two arguments to the syscon node used to detect if + a given address is accessible on PCIe controller. + '#interrupt-cells': const: 1 @@ -90,6 +102,45 @@ required: allOf: - $ref: /schemas/pci/pci-host-bridge.yaml# + - if: + properties: + compatible: + const: airoha,an7583-pcie + then: + properties: + reg: + maxItems: 1 + + reg-names: + const: port1 + + clocks: + maxItems: 1 + + clock-names: + const: sys_ck1 + + reset: + maxItems: 1 + + reset-names: + const: pcie-rst1 + + phys: + maxItems: 1 + + phy-names: + const: pcie-phy1 + + power-domain: false + + required: + - resets + - reset-names + - phys + - phy-names + - mediatek,pbus-csr + - if: properties: compatible: @@ -106,6 +157,8 @@ allOf: power-domains: false + mediatek,pbus-csr: false + required: - phys - phy-names @@ -123,6 +176,8 @@ allOf: phy-names: false + mediatek,pbus-csr: false + required: - power-domains @@ -135,6 +190,8 @@ allOf: clocks: minItems: 6 + mediatek,pbus-csr: false + required: - power-domains @@ -157,6 +214,8 @@ allOf: power-domain: false + mediatek,pbus-csr: false + unevaluatedProperties: false examples: @@ -316,3 +375,54 @@ examples: }; }; }; + + # AN7583 + - | + #include + #include + #include + + soc_3 { + #address-cells = <2>; + #size-cells = <2>; + + pcie@1fa92000 { + compatible = "airoha,an7583-pcie"; + device_type = "pci"; + linux,pci-domain = <1>; + #address-cells = <3>; + #size-cells = <2>; + + reg = <0x0 0x1fa92000 0x0 0x1670>; + reg-names = "port1"; + + clocks = <&scuclk EN7523_CLK_PCIE>; + clock-names = "sys_ck1"; + + phys = <&pciephy>; + phy-names = "pcie-phy1"; + + ranges = <0x02000000 0 0x24000000 0x0 0x24000000 0 0x4000000>; + + resets = <&scuclk>; /* AN7583_PCIE1_RST */ + reset-names = "pcie-rst1"; + + mediatek,pbus-csr = <&pbus_csr 0x8 0xc>; + + interrupts = ; + interrupt-names = "pcie_irq"; + bus-range = <0x00 0xff>; + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0 0 0 1 &pcie_intc1 0>, + <0 0 0 2 &pcie_intc1 1>, + <0 0 0 3 &pcie_intc1 2>, + <0 0 0 4 &pcie_intc1 3>; + + pcie_intc1_4: interrupt-controller { + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + }; + }; + }; -- 2.51.0