From nobody Fri Sep 25 06:46:29 2026 Received: from mail-qk2-f43.google.com (mail-qk2-f43.google.com [74.125.230.235]) (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 31C444BD790 for ; Tue, 15 Sep 2026 18:10:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.230.235 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789495813; cv=none; b=LXHl7yd3Fi0nwSo/Ni9H2UCvGOHSjdYA3o4OMe7DY3Wv/3C2hngJqlW5hV3Uff8RKJbwyj9noKIKcx8/wrnU/EA9WW3UU/67H7A3R6PGXxCoiWXaU1gpD5sfSInY+OAE6lOf3YiEAHV/cUVGCUc+F/KX1FKombQ2sQOqEzZNhF0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789495813; c=relaxed/simple; bh=963GP+t5IUCBT9XPYFDACpdciFOeVIQkmhBxfjiI+ro=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XMCIeeDJLb3TROsFlo3nKRjS2aMKCfQWarf5sT3SXsC5k7QtBVciAkR9yIII3kBUdNjNGQZvc6RG55K4Z7zxIfQzrmS6n7zyMhpxEehM5GHPEXHRjCmLrpmyA2riuSDHOHyzHdnbMVsipS7mliKpH6O6reZZWUVuXZefOjUIbmE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com; spf=pass smtp.mailfrom=riscstar.com; dkim=pass (2048-bit key) header.d=riscstar-com.20251104.gappssmtp.com header.i=@riscstar-com.20251104.gappssmtp.com header.b=F0AA0Huw; arc=none smtp.client-ip=74.125.230.235 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riscstar.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=riscstar-com.20251104.gappssmtp.com header.i=@riscstar-com.20251104.gappssmtp.com header.b="F0AA0Huw" Received: by mail-qk2-f43.google.com with SMTP id af79cd13be357-93910cc46c4so5952185a.2 for ; Tue, 15 Sep 2026 11:10:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar-com.20251104.gappssmtp.com; s=20251104; t=1789495809; x=1790100609; 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:content-type; bh=eO+VSnFW4SLLPEShEGSwpEobnC/ryHIzzk4xdTun4DE=; b=F0AA0HuwkG6L+Bs+b807Ssy4CpPQqnO/jGzPaC+q2mFXZ3iGmsDP6D7uYumrHgBf66 fFTfjq56IgrPHLKqufqBLnn0bKvyFekj9+TyU1ynzOzkKzOZ7kFcnWqXnECTgj5RvUgb ztylA30BypwHKTJUcs/VA+Pz8BxFDhdkzUmTlCEikbArljYde4ucHm5aLHZfI02H1wNN MzboUxJ2TdzfQgB5Lyr39eOjVz8QU/qfFpc2xmFI8lBndcRpg4O3lleEJbzCifyqVO+G GNxv/C7NaiGSnIwt4EiTPDA+lM313+suSAfxrWk9f6cm810BrGORggwiWMmj5/H/tWrg 0E3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789495809; x=1790100609; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=eO+VSnFW4SLLPEShEGSwpEobnC/ryHIzzk4xdTun4DE=; b=X03dVM6QuiVt27k8Rmt7BV3A0RokaH/ZLVRDfz5vYD7Q32+mFS4DB8JieFVzz3z1TK Ji3YcqsopauJejZsUOkaPxkFIsWnvdoWPXRWo9zqu8DexSQh3R0fqa9WS5b/FqVCJ00S UlZ5XT87ye+Z7zTRw2WT9DUGTtB7/3XrXBw2snDzzdhlGcVL0ncZNzzVRjf7d/97lHE3 NQNvYOJvD0Yngqb8O38hudMk+VOPbeEAoIdRud2rMWGTAZ17h75W+UVwyE0rmMdu6OqM 01TzNbV4GjVWbknxe5emvY1ioMvFFi7Joh6CNBmMTtDfu/WOVfvzeKZuTogsfiUMc5N0 JiuA== X-Forwarded-Encrypted: i=1; AKwUvBydhfLTWVaQmgu/0DHmgIKQ49fATaoHJMQs95lZ/hXk1tnaLorWVknS6IOK+ceYfy6y0osm5w50luGkbfo=@vger.kernel.org X-Gm-Message-State: AFuF++kYJJQNsWNIiRHnXxDorJiwAPPec02jGMjrgdDOTaGGtpJBD7OF vCclKJuHCGidHJnUxAHVreBqqm4hDsDOwNl4fmietpELiQ0oJLS8po7eYl2PCaN3P0I= X-Gm-Gg: AYBFou3jmaGibtmkOp93xviZOLGm1gMfCGn6qfo3cSLPtu+tShee50uN+vorNgqlsvo Ww1f8wJRrlHoACccH/f1HUL1VAjpj5A4+K3CCESiQ6J0wwqcVVl27SICiDGqX+NW+mDhJsDhuSj IPLHOQo8/zfca1v1gdr5qhAhLh8tomTpYZ0QmBMpQOK9qFf3h+5POEjpkD7ui3lvqplXszeV//S Ln78eWpLmr+dXrqM2wBa7WxiWcRa3SG1KmpISabGWbTht0isvhUY1qQYY3P2ovVbqMCmYvH62/0 IjrxnNBnPO7Kc2+QIqI5Jdt40VKpg0mMjLA94dhJM9iktNPhtcL9VLJ7dLGRTgeFg3TlDMXxxhH t0tdxxBNZCGPO/2qkNUI8QnphOW0CNA82CmjJid4f4t2tzE/umiKWVzUOnti7061dKeAjNYcADc YV9P4Eo3IHMAoBz8tWvdXNA2N6Su6eGXoDt/yuFXM2yyAExa6tOxvZIZJBorpIhcKFChTGLvVBT 11qH/bif4FVRg== X-Received: by 2002:a05:620a:468c:b0:939:a199:45b4 with SMTP id af79cd13be357-93a29a77442mr1200928985a.39.1789495808599; Tue, 15 Sep 2026 11:10:08 -0700 (PDT) Received: from zippy.localdomain ([73.62.185.64]) by smtp.gmail.com with ESMTPSA id af79cd13be357-93b7824f72fsm14648485a.28.2026.09.15.11.10.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2026 11:10:08 -0700 (PDT) From: Alex Elder To: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org, bhelgaas@google.com, andersson@kernel.org, konradybcio@kernel.org, abelvesa@kernel.org Cc: daniel@riscstar.com, mohdayaa@qti.qualcomm.com, lbiancon@qti.qualcomm.com, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/3] dt-bindings: misc: introduce pci1179,0220.yaml Date: Tue, 15 Sep 2026 13:10:00 -0500 Message-ID: <20260915181003.1633543-2-elder@riscstar.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260915181003.1633543-1-elder@riscstar.com> References: <20260915181003.1633543-1-elder@riscstar.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Define the binding for the Toshiba TC9564 PCI endpoint function device. The third downstream PCIe switch port within this chip has an embedded PCIe controller, and that implements two of these PCIe functions. Co-developed-by: Daniel Thompson Signed-off-by: Daniel Thompson Signed-off-by: Alex Elder --- v3: - Fixed a typo (TC9654 -> TC9564) .../bindings/misc/pci1179,0220.yaml | 154 ++++++++++++++++++ MAINTAINERS | 6 + 2 files changed, 160 insertions(+) create mode 100644 Documentation/devicetree/bindings/misc/pci1179,0220.yaml diff --git a/Documentation/devicetree/bindings/misc/pci1179,0220.yaml b/Doc= umentation/devicetree/bindings/misc/pci1179,0220.yaml new file mode 100644 index 0000000000000..51c8293cd924d --- /dev/null +++ b/Documentation/devicetree/bindings/misc/pci1179,0220.yaml @@ -0,0 +1,154 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/misc/pci1179,0220.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Toshiba TC9564 internal PCI endpoint function + +maintainers: + - Alex Elder + - Daniel Thompson + +description: > + The Toshiba TC9564 is specialized SoC that implements a PCIe switch + as well as an Ethernet AVB/TSN bridge. In addition to these, the SoC + implements other functions, including a reset and clock controller, + an address translation unit, and a few other devices. + + The PCI switch has three downstream ports. The first two are exposed + externally, while the third is used by an internal PCIe endpoint. The + internal endpoint implements two PCIe functions, and attached to each + of these is a 10 Gbps capable Synopsys Ethernet controller and an + interrupt controller that converts internal "wired" interrupts into + MSIs delivered to the host. + + PCIe BARs provide access to registers that manage almost all IP blocks. + The SoC is modeled using a PCI endpoint bus. The IP blocks are bound + to platform drivers that access the hardware using MMIO through the + PCI BARs. + + ------------------------------------ + | Host | + -----........---------------...----- + | | | | + | PCIe | |I2C| + | | | | + ----------+........+-------------+...+------------------------------- + | |upstream| | | ---------------- | + | Toshiba | Port 0 | | +-------+ PCIe pwrctrl | | + | TC9564 ----++---- | I2C | ---------------- | + | SoC || |controller| ---------------- | + | || | +-------+ GPIO | | + | || | | | controller | | + | ------++------ ------------ ---------------- | + | | US | | + | | | ---------------------------------------- | + | | DS3+=3D=3D=3D=3D+ downstream port 3 = | | + | | | |--------------------------------------| | + | | PCIe | | embedded PCIe endpoint | | + | | switch | |~~~~~~~~~~~~~~~~~~~++~~~~~~~~~~~~~~~~~| | + | | | | PCIe function 0 || PCIe function 1 | | + | | | |-------------------||-----------------| | + | | | | BAR || BAR || BAR || BAR | BAR | BAR | | + | | | | 0 || 2 || 4 || 0 | 2 | 4 | | + | | DS1 DS2 | ---.------.------.--++--------------.--- | + | --++------++-- : : : : | + | || || : ---.-- :....... : | + | || || : |SRAM| : : : | + | || || : ------ : ---.--- : | + | || || : ....: |clock| ....: | + | || || : : : ------- : : | + | || || ------.---- -.- : -.- : | + | || || |translate| |M| :....... |M| : | + | || || ----------- |S| : : |S| : | + | || || |I| : ---.--- |I| : | + | || || |G| : |reset| |G| : | + | || || |E| : ------- |E| : | + | --------++-- --++-------- |N| : |N| : | + | |downstream| |downstream| ------.---- ------.---- | + | | port 1 | | port 2 | | XGMAC 0 | | XGMAC 1 | | + --+..........+--+..........+----------+.......+-----------+.....+---- + | | | | + |USXGMII| |SGMII| + | | | | + --+.......+-- ---+.....+--- + | Ethernet | | Ethernet | + | PHY | | PHY | + ------------- ------------- + +allOf: + - $ref: /schemas/pci/pci-ep-bus.yaml + +properties: + compatible: + const: pci1179,0220 # Toshiba TC9564 (a.k.a. Qualcomm QPS615) + + reg: + maxItems: 1 + description: PCI Bus/Device/Function config space address + +unevaluatedProperties: false + +required: + - compatible + - reg + - '#address-cells' + - '#size-cells' + - ranges + +examples: + - | + pcie@0,0 { + reg =3D <0x0 0x0>; + #address-cells =3D <3>; + #size-cells =3D <2>; + device_type =3D "pci"; + ranges =3D <0x83000000 0x0 0x0 0x0 0x0 0x1fd00000>; + + dev@0,0 { + compatible =3D "pci1179,0220"; + reg =3D <0x0 0x0 0x0 0x0 0x0>; + #address-cells =3D <3>; + #size-cells =3D <2>; + /* Ranges will be updated dynamically */ + ranges =3D <0x0 0x0 0x0 0x83000000 0x0 0x0 0x0 0x4000>, + <0x2 0x0 0x0 0x83000000 0x0 0x4000 0x0 0x80000>, + <0x4 0x0 0x0 0x83000000 0x0 0x84000 0x0 0x200000>; + + pci-ep-bus@0 { + compatible =3D "simple-bus"; + #address-cells =3D <1>; + #size-cells =3D <1>; + /* Map 0x0-0x3fff to BAR 0 */ + ranges =3D <0x0 0x0 0x0 0x0 0x4000>; + }; + + pci-ep-bus@4 { + compatible =3D "simple-bus"; + #address-cells =3D <1>; + #size-cells =3D <1>; + /* Map 0x0-0x1fffff to BAR 4 */ + ranges =3D <0x0 0x4 0x0 0x0 0x200000>; + }; + }; + + dev@0,1 { + compatible =3D "pci1179,0220"; + reg =3D <0x100 0x0 0x0 0x0 0x0>; + #address-cells =3D <3>; + #size-cells =3D <2>; + /* Ranges will be updated dynamically */ + ranges =3D <0x0 0x0 0x0 0x83000100 0x0 0x0 0x0 0x4000>, + <0x2 0x0 0x0 0x83000100 0x0 0x4000 0x0 0x80000>, + <0x4 0x0 0x0 0x83000100 0x0 0x84000 0x0 0x200000>; + + pci-ep-bus@4 { + compatible =3D "simple-bus"; + #address-cells =3D <1>; + #size-cells =3D <1>; + /* Map 0x0-0x1fffff to BAR 4 */ + ranges =3D <0x0 0x4 0x0 0x0 0x200000>; + }; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 6096dab7121e8..aa6b805e1ab2b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -27670,6 +27670,12 @@ F: Documentation/devicetree/bindings/media/i2c/tos= hiba,tc358743.txt F: drivers/media/i2c/tc358743* F: include/media/i2c/tc358743.h =20 +TOSHIBA TC9564 PCI DRIVER +M: Alex Elder +M: Daniel Thompson +S: Maintained +F: Documentation/devicetree/bindings/misc/pci1179,0220.yaml + TOSHIBA WMI HOTKEYS DRIVER M: Azael Avalos L: platform-driver-x86@vger.kernel.org --=20 2.53.0 From nobody Fri Sep 25 06:46:29 2026 Received: from mail-qk2-f13.google.com (mail-qk2-f13.google.com [74.125.230.205]) (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 B654F4BE431 for ; Tue, 15 Sep 2026 18:10:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.230.205 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789495816; cv=none; b=kMxwew2cfzF5H+kaRKx1x7b4dfKbGJwRja6qZwb3ZHpVHe3G01tPs4pSmdE2lN0kSyG5u4mtdl7d/jocUSvtsFF0dnoZZbi2VXRSgXGiPxr4w/ss0IjRuCPRnqzWg3Pw1MAdgoOOI5fLruD8WiO/qzsJ3VfUsx+isQska1h0wSM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789495816; c=relaxed/simple; bh=jFoxdux0wrRAGgjXbC4e/Ezp+SHTGN6U+C7MT5kRbTY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XMf+paSuSybv5u05RYdi7w8mXxviOJ4jkGqU4kskU89WtSBJiJgdeFQ084IYz/VBHGTIWQYxK2B5iDgaplq33TWBw4t+RlrwEDLssaT28LZ379Dln+CB999/HW8v+N2+SjdzasCpZawGXGNDLd0fA6d++nmAxlkfe5//X6Kuuz8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com; spf=pass smtp.mailfrom=riscstar.com; dkim=pass (2048-bit key) header.d=riscstar-com.20251104.gappssmtp.com header.i=@riscstar-com.20251104.gappssmtp.com header.b=RlA4eZoO; arc=none smtp.client-ip=74.125.230.205 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riscstar.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=riscstar-com.20251104.gappssmtp.com header.i=@riscstar-com.20251104.gappssmtp.com header.b="RlA4eZoO" Received: by mail-qk2-f13.google.com with SMTP id af79cd13be357-93910ca5aa8so7382085a.3 for ; Tue, 15 Sep 2026 11:10:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar-com.20251104.gappssmtp.com; s=20251104; t=1789495810; x=1790100610; 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:content-type; bh=r4WiN+Wa/+9pdrc7rIlvQD4FYM3H93hwsZ2FoFV7wN8=; b=RlA4eZoO6/22YVnN5f/CUqGcbvRxkxwV2p/x8YrlOA9rX+j32FFLnwppkhExSGpPtK DA5FyWlo9iK2GCZ4gLNtSrdojsHI/Z62bMDKEvBdXSwEyWK5kDE3At+dqx+rx59pz28T 6Cg239I3bQAVP1++pRUPQgLfme9hHBmrmBW/65jU4Qgo57iYBRMcXSlaSSFshNIxXY6M dhQK8qmJndMsBHxAFD7jc2mLNx8ZUAnuf8WrdXW0jXjqYQ8nyV/XYigZtc9lIygCiDXV T74DLD6Fnwf7sVTmubMq9CIY4gOiFaebViH9fW9yM/A/Z4MZ9pXakJz7GqegctPPJ4wr T3fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789495810; x=1790100610; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=r4WiN+Wa/+9pdrc7rIlvQD4FYM3H93hwsZ2FoFV7wN8=; b=k0gDOS8EH4B2IK5RlDv4Z7LDqIlXmxli8H1dopj3HatZ9xtWWL8jaqkphYv7XDensH 8L864oPWdx11PK3XUqIRs3O4tyn9QtZ62VSBuYK0TWT5jRkFEr6EqG21sfx2LdBqVKyq 2bdl7gjirSqZP9qCX+PCl1AhdchabYXvC0hOITwfQ3m7pPV1rILuxX/oTm+yxuGFqy4J msCBGDZE7RWBuk1u+izAvLDapAUEdvb4Jy3bWtni98L3yJcbQk7XP09cP5h57eoeXwBA SiDBgEUL3bJ01eTHJIeok9kNYBhB1V8N5pNhpZbRqJjwV06veYrXGDfk9P4f6oFIyhmo Emnw== X-Forwarded-Encrypted: i=1; AKwUvBw27WGTBlFC/kMayCYuqkc5QbhICex8sqB6wDom2ALR6jcmupxvfGBpCjHBpSw799aPVO3Huldb9/arcAU=@vger.kernel.org X-Gm-Message-State: AFuF++lpgkzAc35888E+IfDFzMdo/2a4o00ZYpNo4BNeWzTOHYuSTZ3k Wm7HkzUW5VLV7+3q6MjFkv/xfJ8MWZeulrqlUxEQ+LkKxbZROr5ehPbIl2AfnQkmlZ588VXe3bX EOp5tfgQ= X-Gm-Gg: AYBFou25y3tYANKo2Fei8UMyEakGwN4xsmQRjT7lXuEX55WypPdakPHHovLQ+xyDe/H ha1wrk4LZY89irHJbSf2qLf0tjNz0eUNf3z8hdsRhqlK1z4olumtPRLWb969iMs9XXJwkeYbSK7 THCRFjJGi5gKsp21jQNoGHpv9AChtAZcF3jg+JEMN4rOKspgoTZukwqHhHerYKZRS8+8q9dAbmm PyAVP0lR0gWQIHTiKRNIDkEDCuatGdVrRzz2TO80kT6VhMPpmD9sT+3aRE1GCihImaRJuE3oQXz P0hABnLncQFUDKAEPEsfJLf7EhntCJ6DSTpJC/NfpAwK184ACuRJ57vAFN4fQzYlIEQCMK60Vhd lP2mECEaAH8NsuF5YxQfbjO4P2mbi4zsgdRFaGIcIeGWAEoW5akcfeL/+ijY8hxvGTXqHLf5o6o 8aldFkFrKlZ17gOCrY+316SCqdEEAIsG5c0GGm5XlXIFAGw7cUensArOSZ3rH23wl8oHWxpP4vc Fo= X-Received: by 2002:a05:620a:1994:b0:92e:4927:2002 with SMTP id af79cd13be357-93a299edea9mr1397956185a.39.1789495810011; Tue, 15 Sep 2026 11:10:10 -0700 (PDT) Received: from zippy.localdomain ([73.62.185.64]) by smtp.gmail.com with ESMTPSA id af79cd13be357-93b7824f72fsm14648485a.28.2026.09.15.11.10.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2026 11:10:09 -0700 (PDT) From: Alex Elder To: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org, bhelgaas@google.com, andersson@kernel.org, konradybcio@kernel.org, abelvesa@kernel.org Cc: daniel@riscstar.com, mohdayaa@qti.qualcomm.com, lbiancon@qti.qualcomm.com, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/3] misc: tc9564: introduce base PCI driver Date: Tue, 15 Sep 2026 13:10:01 -0500 Message-ID: <20260915181003.1633543-3-elder@riscstar.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260915181003.1633543-1-elder@riscstar.com> References: <20260915181003.1633543-1-elder@riscstar.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The Toshiba TC9564 is small and highly-specialized SoC that implements a PCIe switch as well as an Ethernet AVB/TSN bridge. In addition to these, the SoC implements other functions, including a reset and clock controller, an address translation unit, and a few other devices. PCIe BARs provide access to registers that manage these IP blocks, and the SoC is modeled using a PCI endpoint bus in devicetree. This allows the IP blocks to be bound to platform drivers using MMIO through the PCI BARs. Create a new PCI driver under drivers/misc that binds with the embedded PCI endpoint functions within the TC9564 SoC. Because these functions will use devicetree pci-ep-bus to provide access to other IP blocks within the TC9564 chip, the main purpose of this driver is to do basic PCI initialization, then call of_platform_default_populate() to scan for the any endpoint bus children, and probe all devices defined therein. Because we're using pci-ep-bus, we need to use the PCI quirks mechanism to have of_pci_make_dev_node() be called for each endpoint device in pci_bus_add_device() (via pci_fixup_device(pci_fixup_final, dev)). Co-developed-by: Daniel Thompson Signed-off-by: Daniel Thompson Signed-off-by: Alex Elder --- v3: - Dropped Kconfig dependence on REGMAP_MMIO - Added call to of_platform_depopulate() on error in the probe function MAINTAINERS | 1 + drivers/misc/Kconfig | 9 +++++ drivers/misc/Makefile | 1 + drivers/misc/tc9564-pci.c | 84 +++++++++++++++++++++++++++++++++++++++ drivers/pci/quirks.c | 1 + 5 files changed, 96 insertions(+) create mode 100644 drivers/misc/tc9564-pci.c diff --git a/MAINTAINERS b/MAINTAINERS index aa6b805e1ab2b..cf846853fdc79 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -27675,6 +27675,7 @@ M: Alex Elder M: Daniel Thompson S: Maintained F: Documentation/devicetree/bindings/misc/pci1179,0220.yaml +F: drivers/misc/tc9564-pci.c =20 TOSHIBA WMI HOTKEYS DRIVER M: Azael Avalos diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 7364931dad3a1..c35f9dda355a6 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -568,6 +568,15 @@ config MCHP_LAN966X_PCI - lan966x-miim (MDIO_MSCC_MIIM) - lan966x-switch (LAN966X_SWITCH) =20 +config TC9564_PCI + tristate "Toshiba TC9564 PCI function support" + depends on PCI + help + This enables support for the two PCI functions implemented by + the embedded PCIe endpoint in the Toshiba TC9564 SoC. This + driver uses a pci-ep-bus node in devicetree to provide MMIO + access to other SoC devices through PCI function BARs. + source "drivers/misc/c2port/Kconfig" source "drivers/misc/eeprom/Kconfig" source "drivers/misc/cb710/Kconfig" diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index e8d8d5d88c0df..7cc3d615d37a4 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -71,3 +71,4 @@ obj-y +=3D keba/ obj-y +=3D amd-sbi/ obj-$(CONFIG_MISC_RP1) +=3D rp1/ obj-$(CONFIG_INTEL_SSEI) +=3D issei/ +obj-$(CONFIG_TC9564_PCI) +=3D tc9564-pci.o diff --git a/drivers/misc/tc9564-pci.c b/drivers/misc/tc9564-pci.c new file mode 100644 index 0000000000000..10dfa3beecc53 --- /dev/null +++ b/drivers/misc/tc9564-pci.c @@ -0,0 +1,84 @@ +// SPDX-License-Identifier: GPL-2.0 + +/* + * Copyright (C) 2026 by RISCstar Solutions Corporation. All rights reser= ved. + */ + +/* + * The Toshiba TC9564 implements a PCIe Gen 3 switch that connects an + * upstream x4 port to three downstream PCIe ports. Two of the downstream + * ports are external, and the third is internal, implementing a PCIe + * endpoint with implements two PCIe functions. Each PCIe function drives + * a Synopsys XGMAC Ethernet interface capable of 10 Gbps operation. + * + * The TC9564 implements other functionality, including an embedded MCU, + * a UART, a GPIO controller, a reset controller, a clock controller, and + * interrupt handling. These features are separate from (and in some + * cases used by) both Ethernet XGMACs. Each Ethernet MAC must be + * attached to a working PHY for it to be functional, and for this + * reason either of them (or both!) might not be usable/used. + * + * This PCI driver binds to the Toshiba TC9564 (physical) PCI function + * (VID 0x1179, DID 0x0220). + */ + +#include +#include +#include +#include +#include + +static int +tc9564_function_probe(struct pci_dev *pdev, const struct pci_device_id *id) +{ + struct device *dev =3D &pdev->dev; + struct device_node *np; + int ret; + + /* Despite being a PCI device, we require devicetree */ + np =3D dev_of_node(dev); + if (!np) + return dev_err_probe(dev, -EINVAL, "no devicetree node\n"); + + ret =3D pcim_enable_device(pdev); + if (ret) + return ret; + + pci_set_master(pdev); + + /* Scan for pci-ep-bus nodes and probe their sub-devices */ + ret =3D of_platform_default_populate(np, NULL, dev); + if (ret) + goto err_depopulate; + + return 0; + +err_depopulate: + of_platform_depopulate(dev); + pci_clear_master(pdev); + + return dev_err_probe(dev, ret, "failed to populate platform bus\n"); +} + +static void tc9564_function_remove(struct pci_dev *pdev) +{ + of_platform_depopulate(&pdev->dev); + pci_clear_master(pdev); +} + +static const struct pci_device_id tc9564_function_id_table[] =3D { + { PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA, 0x0220), }, + { }, +}; +MODULE_DEVICE_TABLE(pci, tc9564_function_id_table); + +static struct pci_driver tc9564_function_driver =3D { + .name =3D KBUILD_MODNAME, + .id_table =3D tc9564_function_id_table, + .probe =3D tc9564_function_probe, + .remove =3D tc9564_function_remove, +}; +module_pci_driver(tc9564_function_driver); + +MODULE_DESCRIPTION("Toshiba TC9564 PCIe Embedded Function Driver"); +MODULE_LICENSE("GPL"); diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index de9bbccda21fd..54e310c4153df 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -6391,6 +6391,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_XILINX, 0x5020,= of_pci_make_dev_node); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_XILINX, 0x5021, of_pci_make_dev_node= ); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_REDHAT, 0x0005, of_pci_make_dev_node= ); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_EFAR, 0x9660, of_pci_make_dev_node); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_TOSHIBA, 0x0220, of_pci_make_dev_nod= e); =20 /* * Devices known to require a longer delay before first config space access --=20 2.53.0 From nobody Fri Sep 25 06:46:29 2026 Received: from mail-qv2-f14.google.com (mail-qv2-f14.google.com [74.125.230.142]) (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 0770C4BD7A6 for ; Tue, 15 Sep 2026 18:10:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.230.142 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789495817; cv=none; b=rzWBvJlkwYZ5YmIdRScJ4JBGCrLepYlZ1CrpqhUv+QbKYxSCT5dYQNzvSQf2hu0x4wJ4DXo3U49PTpk8oHU+rOq6EcrkfEAw01J5rxk4aaJ9Ro115shd1I20S7tEr2svHli/qbWtOwKeUpNPwfm/pvwLJHRuMU2xKQcm2SS5LXg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789495817; c=relaxed/simple; bh=tdYpvWgSjy9pb8wMZZMf3uOm14EnHaub2C79rnVIBoo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EL5sZbSrdm6w3yPF28yn2Iwgkwwjf3kLbjr9IyILfX+jeU6sb9vBAHlXCLV5RqkoDkRMjevqe8QVKPf1YrSBKLFmFbpktVuskAyhkPDKWXFMup3bqPHQcdrnczF/Kq/4/B4s51Nh5bgIBkOVmtBubX77Z92qhON/sRlVvcaX6ko= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com; spf=pass smtp.mailfrom=riscstar.com; dkim=pass (2048-bit key) header.d=riscstar-com.20251104.gappssmtp.com header.i=@riscstar-com.20251104.gappssmtp.com header.b=pLeoUaZH; arc=none smtp.client-ip=74.125.230.142 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riscstar.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=riscstar-com.20251104.gappssmtp.com header.i=@riscstar-com.20251104.gappssmtp.com header.b="pLeoUaZH" Received: by mail-qv2-f14.google.com with SMTP id 6a1803df08f44-90cdfcbe20aso611006d6.2 for ; Tue, 15 Sep 2026 11:10:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar-com.20251104.gappssmtp.com; s=20251104; t=1789495811; x=1790100611; 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:content-type; bh=wVBxclk9QgEAlFYkz8nlTTQ0570gfN7zk+u3PBMIQfU=; b=pLeoUaZHFwXqKvQfAvxW6w9XjTgMcZZpwUT6JOWOlLr4BimjldmpjhIjG7SJUDIwiP RCFaiMbzUeQZYwKEJGd8UINUw604HAYfqiZ4Wr2jOsYfVaLSlZ7zFfwj7INAIXco+Dll Erwyk5bdKKN1AxUDGprq6T9lGOVfIt/ulBbDQ1c/HXqeMbRM6F00CpfoX5TpjLsphKRt QTSxCT3eISuZ6qTuWrAPEFwrAuXwUZvTnHSFE0NqfzO3uNpt5v/rNpnu5yZE3hxlTDPf vQi7vsFDZe+NUT0XFE+2sF8awdNjgvA2Mh1APc1BuaHSlhDlnbPKwnkBSDKWGMKAPDvX BAYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789495811; x=1790100611; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=wVBxclk9QgEAlFYkz8nlTTQ0570gfN7zk+u3PBMIQfU=; b=HPKp4zNyLk5Agjbl9dCvq6aSH3MpbhjxA+F+DJ4StDnJ4cD3ncTYrNqgad7YH8HSjI pTQU7LX0FMPFPyEyj5oSsFwGzElJ5Z1OAKyINEBtL4z0qfpBKJ03dpnj0u66PdcyVv7v wpeFbrdMPH7xqrhDxnJLqnkzVQKKLiGFGIAuGbk10cWi64mHhwzX5285DA/KypIA5OHl y1xJf8LHllsKH0yWhR75AgHOp2udyBWtDVWIghN21Q6MxHS0L0IGzsD/klUWeS8kQKc/ aOGMTCY34IINH8+DeJXIH+kYOonGyXiwl+lm2GxKJaDv9a2AwOFC7uGi/ghmeOWFIXws 2pmQ== X-Forwarded-Encrypted: i=1; AKwUvByKmFYLIHgkbJY5Mqwtzv1tgekTOjndXouzKvZR9kanMho6SOPeomSHWsk6N+CEUZ6wtU3XvuZyeyWsqSQ=@vger.kernel.org X-Gm-Message-State: AFuF++kRmYOuwXfYNMYB3J3K3zFveSFw1scRQa64oaQEW9QkzkYChrBS bnkN0ecmdhFsh0TCoUhDlNq5FuuRR4iWImfVG8y9Vo53z+lJaIkYT2/wcDEMH4nvcHE= X-Gm-Gg: AYBFou0V8vJFX8wKpZZDybb4L5WKsygtdJzM6PYbYn8OF41lPlBaeaXIbC15cEtnqOl xkKFtiGPdKSzPiI+kebCmqnsZXgAHWBxhY4+GbB6Ex5IUnJJV2ImSRCIXJDVjZ9q/qUhl2D08Pz es1mi2tDSAn7YLUpl8s93y1OtyXd7Hd9riUQxT57omCQnJuoIZB4pU9DWGMI1zBBbqTvi2PyqHN 44Wgu+TRM8YkwKD6l5KYFZok2kD5xQFEHj3CxEBap/OuMvxdmuHdGQ76lcV8Lln6W2uu7dNsklz iKsWeRofLdCOkJYjQp274Gs2zLChVEgAhiiK1EyhbXNPm/xSI70zJT62aQD8UiYzcfdRi2XU5Jd e+/yMuHifYMVL5afzBHQpiPCKXba2+6nEXL8h68VNxsd59fhWCDz7JzF1ENxDRk8uE2qjaQxgWp RVAusC+dXWQIExION/tIfc7kGompeCfoTXdkHemvTklsXVHe25yTre0OyRXJx7WEgiLwzOJkaV8 GU= X-Received: by 2002:a05:620a:640b:b0:939:e735:c50e with SMTP id af79cd13be357-93a297c8d0fmr1256082585a.13.1789495811337; Tue, 15 Sep 2026 11:10:11 -0700 (PDT) Received: from zippy.localdomain ([73.62.185.64]) by smtp.gmail.com with ESMTPSA id af79cd13be357-93b7824f72fsm14648485a.28.2026.09.15.11.10.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2026 11:10:11 -0700 (PDT) From: Alex Elder To: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org, bhelgaas@google.com, andersson@kernel.org, konradybcio@kernel.org, abelvesa@kernel.org Cc: daniel@riscstar.com, mohdayaa@qti.qualcomm.com, lbiancon@qti.qualcomm.com, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 3/3] arm64: dts: qcom: qcs6490-rb3gen2: add endpoint buses Date: Tue, 15 Sep 2026 13:10:02 -0500 Message-ID: <20260915181003.1633543-4-elder@riscstar.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260915181003.1633543-1-elder@riscstar.com> References: <20260915181003.1633543-1-elder@riscstar.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The TC9564 SoC incorporates a PCIe switch, which is connected via the second PCI segment (0001) on the RB3gen2 platform. The third downstream port of that switch (pcie@3,0) has an embedded PCIe endpoint that implements two PCIe functions. The SoC implements other peripherals, and they will be accessed via PCI endpoint bus. Define the devicetree nodes representing these buses, including the mapping of each BAR's address range to its local address space. The endpoint's ranges property must be defined, but it will be updated dynamically to include all BARs. As a result of this update, the parent address portion of each range will reflect the specific address assigned to the BAR. Co-developed-by: Daniel Thompson Signed-off-by: Daniel Thompson Signed-off-by: Alex Elder --- v3: - Updated ranges property "parent" addresses so they're unique arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 30 ++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts b/arch/arm64/boot= /dts/qcom/qcs6490-rb3gen2.dts index 3bb5fca8e2b13..5b7f5292a8864 100644 --- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts +++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts @@ -955,11 +955,41 @@ pcie@3,0 { bus-range =3D <0x5 0xff>; =20 dev@0,0 { + compatible =3D "pci1179,0220"; reg =3D <0x50000 0x0 0x0 0x0 0x0>; + #address-cells =3D <3>; + #size-cells =3D <2>; + /* Ranges will be updated dynamically */ + ranges =3D <0x0 0x0 0x0 0x83050000 0x0 0x0 0x0 0x4000>, + <0x2 0x0 0x0 0x83050000 0x0 0x4000 0x0 0x80000>, + <0x4 0x0 0x0 0x83050000 0x0 0x84000 0x0 0x200000>; + + pci-ep-bus@4 { + compatible =3D "simple-bus"; + #address-cells =3D <1>; + #size-cells =3D <1>; + /* Map 0x0-0x1fffff to BAR 4 */ + ranges =3D <0x0 0x4 0x0 0x0 0x200000>; + }; }; =20 dev@0,1 { + compatible =3D "pci1179,0220"; reg =3D <0x50100 0x0 0x0 0x0 0x0>; + #address-cells =3D <3>; + #size-cells =3D <2>; + /* Ranges will be updated dynamically */ + ranges =3D <0x0 0x0 0x0 0x83050100 0x0 0x0 0x0 0x4000>, + <0x2 0x0 0x0 0x83050100 0x0 0x4000 0x0 0x80000>, + <0x4 0x0 0x0 0x83050100 0x0 0x84000 0x0 0x200000>; + + pci-ep-bus@4 { + compatible =3D "simple-bus"; + #address-cells =3D <1>; + #size-cells =3D <1>; + /* Map 0x0-0x1fffff to BAR 4 */ + ranges =3D <0x0 0x4 0x0 0x0 0x200000>; + }; }; }; }; --=20 2.53.0