From nobody Fri Sep 25 08:46:25 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 D4F784014BB for ; Tue, 15 Sep 2026 03:10:44 +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=1789441848; cv=none; b=UoaXl5gmnWLhRK6slr7qwA4kaIeHFctpQVPfjv/5PMhfhoAuY0OXmjLBH11xnKx8bxUCGhXp0KwWJdx2O/qiLh6clXcv69OXq0J5E5kUG56Go0U/IKGgUdMziwzmfjPABVYpn5CaFfzemE0j58KqPNRE802VZBFwimEIzCxLWcg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789441848; c=relaxed/simple; bh=WDz5ldOwC1ipeFLGJW3j0d9LLVpM+Mtws88tNhcwYoI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jgkNgvkjZ9Hfqm06MDLC33RVg3V2j7/BeelcVL+A+Dbiq5yWVxkeEQ4xHxO3wY3UmgNauDaCnjyNnauS+BFi/tFfLGg7jE4o0kNew0Xgm8lsko4Kk3DAVULbfBkfdZqKgZ434kg0iIXCyMqjDtXIdovqKQa8TtIUka4oz2QodAo= 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=cCB/464P; 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="cCB/464P" Received: by mail-qk2-f13.google.com with SMTP id d75a77b69052e-530fa0716f6so25846841cf.3 for ; Mon, 14 Sep 2026 20:10:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar-com.20251104.gappssmtp.com; s=20251104; t=1789441843; x=1790046643; 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=OreA8W0F8O819M9j39kOjSL4ZJkwhBc9Zj4iMK3ajYI=; b=cCB/464PIWsudLABjHbLiyRZ08CXH8sf2a/V+5d01Xeaai9Sbu2tzpajKMlDmUa/7y zilRl+JMQAT/FC3+QZz9rkbNVR+oQPLWvhmxUtCu2/zhMDuUhvCt6LMA/s8UKgehsZ1B v8j8eKUAb28YmHwiZG7mdK8GcArqcLER+mNRDg47IwMDrTLFr+fpK0y/0wm4K+knHgrS bJS4GcpOxABKT9g7RllS0/RPNG9Zn8vOTT9/VLdvOeW080SzIQ+FNrlfZzdKAMXm5GYu 7TLADjXeJuJmBY7Xy5hNFnZT9zEmw2lWDFeMpe21SJ6zKTDfToS4PUUo7BgaQgZNJ8L6 5Osg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789441843; x=1790046643; 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=OreA8W0F8O819M9j39kOjSL4ZJkwhBc9Zj4iMK3ajYI=; b=MYTKlesF2Czbktm8psV3SckVKYpa6cqn93aVt5FR11IGevf1bv4ODJTaCHjc6ncixE H8mueg22K4sBefNPbkjQ3mhxfEmRrQJmjPHioxdsxsVZD0Xwqi20y/fGpZtOVRPPSgXg L715pmn5mAa14jGB5/HPB6Au9gRbISd3fs3mwjQm4bWtAdwT3p74F3KpyYX5zqsOjeuN RLP/sDPZz2CZVV6bQspa7U3ynCL7p7TdnY6EXaowO3dKTYgMGzAJoclMhBFfk65UXjDU bzraJfigaV7GoFL1nS5OERy8FVu+pphySPc31yHAyJr3IKCm4aS3vMarSlwV8rge6Tn1 /dNw== X-Forwarded-Encrypted: i=1; AKwUvBxr0GkVKQYYhXUwF5FoDfAbNtuHpo1C964hKRyNQjGME9oRv79a7y01oMFAUX7rJh464rnBBrClEFGZ89Y=@vger.kernel.org X-Gm-Message-State: AFuF++lXh9UbRBt1zRL64TsejUdYO3rggSXxAfTqT950Vquc3KWs8T4e m+YOC5zCCelURwDv77YzTwybn5AoFOEohGpfccZx7DlPYV0CghOPavxIGjWH+iLKIts= X-Gm-Gg: AYBFou1fODW/+OkHNdYvfMw2NIv4oe93m7uz/+eZhugrOlS+/N+qlzW5xRWNrGKwcbC Kc3+s+UksNjyDkQyZ4TgzSW5XNu+HIMdMEYib/XhTBVTSt9Vy48hfnCNWDbAIqrP6IeNSyGa+2i zGiTWJWC+tgxb+PoI2DM1mXCciq7nxjOkL4/4rXietf0nhTRPtvN4W+fEhbWzZc+trPxagOisj1 g16JNLgYrPVrj+pHQg/OTyCM+scGRY2mbx0T/nDH8e7I3lB6mD5BZr9oRcZ+uImTFuTC6/XjO98 ADotrXaYLLYW6NSzL04fFXvnmv3vacDxGTEEVnbbbdrtEsCNfQWzbUXDIQcu6ndm5mhvo6ue8uk K9BdOfXq0xyQK3d2VTvbQO+O+NnF6Mkb6e2fcxpfI+py65YXzVNkWbuVUbmpOZ27EWtjgMHxJaq 6iZex5mhGJybc4DEEnwGN06CWi6joimW81ZWuK28CDIAZWUFvSHYHArxFYDLspHxatAFq/UKjwM rg= X-Received: by 2002:a05:622a:1388:b0:531:1c2c:9087 with SMTP id d75a77b69052e-5311c2c94ebmr24380071cf.17.1789441843270; Mon, 14 Sep 2026 20:10:43 -0700 (PDT) Received: from zippy.localdomain ([73.62.185.64]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-530ce4ec298sm118563841cf.16.2026.09.14.20.10.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2026 20:10:42 -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 v2 1/3] dt-bindings: misc: introduce pci1179,0220.yaml Date: Mon, 14 Sep 2026 22:10:35 -0500 Message-ID: <20260915031038.1087264-2-elder@riscstar.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260915031038.1087264-1-elder@riscstar.com> References: <20260915031038.1087264-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 --- v2: - Added BAR2 and SRAM to the block diagram - Updated parent addresses in ranges properties NOTE: Despite being a PCI device, this endpoint function device uses the devicetree "pci-ep-bus" model to represent sub-devices that are accessed via the function's BARs. .../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..fca3d331097de --- /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 TC9654 (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 08:46:25 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 85A67403146 for ; Tue, 15 Sep 2026 03:10:50 +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=1789441858; cv=none; b=tCEIig97AANpGqleCnEnhuTkKjJD39iZKg2hN10IMa5oA6wLQa6Kvm/h5kkAIv2g8y7wKKABd0evrbRo7T0fqxejH3/WBBHIwJAJlHQidC5YnFjov7EcdrDKkOdpolJfohGhAi9TyZjDZ6G8C5Gn2JLEDZjnxPC///mYiokWV90= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789441858; c=relaxed/simple; bh=fAaGvrwfjJOfTADcdh1TN24hqhxhJgV/1ppZMZA426k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cWyHuMVxMsy2q1kIfC4Z9D3hassSbp/ENVxVBBAlMGswg/XlSxvLIHK+EtT2ecW34sffDFYGtVYIOXA5yBF3srrD9fC/0d+owOsDmuNophWm7A5i/uu9wDvwaeEigpCd0A/AvSjsxRGvWZ+3nacjKFIraizf4dvM3dyEmkA5gsE= 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=BaKlH/Xq; 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="BaKlH/Xq" Received: by mail-qk2-f13.google.com with SMTP id d75a77b69052e-530e28a62abso43999231cf.1 for ; Mon, 14 Sep 2026 20:10:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar-com.20251104.gappssmtp.com; s=20251104; t=1789441849; x=1790046649; 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=/mETzuOCK8KbWleOPa3fHaf0TQUEDfgoZP7yhv9sCcg=; b=BaKlH/Xq/640SMNvRTguwSMflv2hQJ+VXE3e+6tTQd+3EXkIEVi5L5qhV02k8l3KDW f/ZY9GAzGijvUFlLFfYkrj/Xzunvmm3uZZg5xAr/QmkNnvlZlF3YSzOHK67cblkaG6Bf rKxhJCXmTKyCs2gh73gIlN8Vm185maImrL20GGNhqm5Gy1Ob+7MXOAfyxHz48Rjgqimh vS7xQMiKaUjOLBemG2sD9CoEzpqYFDhxHzDROn88yBoUbP/lESbKGTVZx0isVFtO9kYZ Y5RsCAdB8D6Uw58sQb3+0qp2QTx/wTKcO5MCV+MLQ28scmf6S59QNl34Zt6e0LLxZsK/ 35dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789441849; x=1790046649; 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=/mETzuOCK8KbWleOPa3fHaf0TQUEDfgoZP7yhv9sCcg=; b=zIfFy+oSeK0VQt86y5emZAq9egSmVAhgu8tCTGpmuVLnakKFfLZziQ+jxg+9+1Qh9X P2vqA8unfXjqzj5MJWGfPHw20ErDoYOkc/0yqAuguX5HfW+s3yj3iv6L1xM6g2vgOjvR FWDGs7Z00Tzrkpy205jj8rDax3XtIf/NUFrdcftUJj+9ih86ckfT4d8BQI91SjoQ5TgI BgWrKJjEvq7xVcpF+GYIgCkZHxVu5Va35EqV5nNFRgB/o9lsEFrThOLBYpXLRqLUrIZH OuJ9asB2pstOIqBoCbhZEny71flHG+46cQndDFeUSFXP1IYBBB5JoYhV0FfDyPjFwO8Y En2g== X-Forwarded-Encrypted: i=1; AKwUvBynppdmIf90JmS1QELskTSB5KQ1tfi39QSJ+BT8wQowz49WgBo548L5oObfF3L1piwveAV0vI1mVMqKfHA=@vger.kernel.org X-Gm-Message-State: AFuF++l8n3WoNVOKlATYm6S03y6GhybIG1/LQbUJMEXtkaYSgtSF802S hRExSyGWiZM5NiYYh7A3GL4pWvFztvLWI0VPZviZgdhv146aPA1prGaixLYhOA3B1xw= X-Gm-Gg: AYBFou0Mi5g3aHaBi34kqNAV2DoE0yJ908TCyMlDmJnBSiF1R0WqD++Ln1wNPrcYV2i G3Pyac2o/yGH374uEfJ/hmuH0W4UUjJUYQPHFEIg7Ft1df0/jyGcAzIPEzSlPdy+w0l3hqu6HOJ vXC7GoOc5oG6pgZSwNDgQnk+ZaHK+2s3BAsvZPwkuHbG68T0ditjGDxCWy06u+HjagokeCpyO29 9RFfastuf88I4zClV1l3g0Z0yAxkQLhRK3HwZVK5vj0VHrZbt/84ONOBegU66GJSvZ5La2NNkS3 z6cWb6MSDtyUIcrCD7yt9WdcWagENKAim8TwFtqRmnmmll+lS/poohILdwtMw0Vmvi/XboEPCTU lGrOgHrwIXyOy1biwFFpaq4nF4P8/cuVTqeI01Fpl3YCWcjf5Zvf/lRR5sgoVG2mo5jYPKfN0So 6Ayf26A26t1qfx1cLLEARU9TtGhKSvN/v1iTrauXiePkrQP9SCThv5QmG7TLR/4Px8JSM+y02bd nQA X-Received: by 2002:ac8:5a51:0:b0:530:318f:3086 with SMTP id d75a77b69052e-5310cf3c86dmr83737401cf.17.1789441844845; Mon, 14 Sep 2026 20:10:44 -0700 (PDT) Received: from zippy.localdomain ([73.62.185.64]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-530ce4ec298sm118563841cf.16.2026.09.14.20.10.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2026 20:10:44 -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 v2 2/3] misc: tc9564: introduce base PCI driver Date: Mon, 14 Sep 2026 22:10:36 -0500 Message-ID: <20260915031038.1087264-3-elder@riscstar.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260915031038.1087264-1-elder@riscstar.com> References: <20260915031038.1087264-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 --- v2: - Use KBUILD_MODNAME for the driver name - Eliminate initializion pci_driver->driver MAINTAINERS | 1 + drivers/misc/Kconfig | 10 +++++ drivers/misc/Makefile | 1 + drivers/misc/tc9564-pci.c | 83 +++++++++++++++++++++++++++++++++++++++ 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..91950d2928f07 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -568,6 +568,16 @@ 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 + select REGMAP_MMIO + 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..d7ebbd90d1584 --- /dev/null +++ b/drivers/misc/tc9564-pci.c @@ -0,0 +1,83 @@ +// 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_clear_master; + + return 0; + +err_clear_master: + 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 08:46:25 2026 Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) (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 79B704028E2 for ; Tue, 15 Sep 2026 03:10:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789441849; cv=none; b=nRCUO0eax0fzTjLuTkctqCcDcX59e8oGpDpLGKEnz24FKpFH7ftgCozWvWLF4NUJNA4f7xGUQPRXWg/dgW8RqKd2rkZfRB7ozIE/FmY8wyq3ipnmNalZ5VTOjZBSxULx21IREtYj7QHXGBxlleRmrdqbq/LDbsXl+c/P+uUTazc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789441849; c=relaxed/simple; bh=Tqm8mGXvI2nKoUm+9pLtaJ+uyO5KFGl5Yiy7z7wtnBs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FLAEVnOANhnj/z3i0vNVhkCEKMrdbFBnoJCV6/N45rI1n69EaNYMPzNaBQYMtxXXaTRK3MACzvz8Yf5cl+E2y3oIvZyd5FiUjw1OGsSskxV+2U/zJ23XcoPF3ODwfFHW6M6X5vvOfOMVVUVUK/RXOtqDiFOfS9kAQQUa4uxrqsA= 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=tGa9frY1; arc=none smtp.client-ip=209.85.160.169 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="tGa9frY1" Received: by mail-qt1-f169.google.com with SMTP id d75a77b69052e-530e5b2cab9so17135351cf.0 for ; Mon, 14 Sep 2026 20:10:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar-com.20251104.gappssmtp.com; s=20251104; t=1789441846; x=1790046646; 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=xSNWHoyvKJfGdDxylfGmEXIoCFeqbapyGd1fgWyygV0=; b=tGa9frY1CyWiXP3Ve/Nl+X1cwDGI7vW6LYKcX9kUlCsoo4gg68RRZ+F/+XxLR/DHYF CkLjUkEygXTmYTxln3LzeYTwCKvxP4X+yVSwkM5F8Kf2vw5Igc0TKGUuqNo6Q1Gdj1pW SA7LVU441bJ+u3ZGtlQ+M1R+maw50Lnt54uTtBVAZFKaTjKjqJ0ztKK6MgzGD4E3LUGm I/Bwc5AW1Y+kwEra3LdsxTfeQjiz53Bo4o6RsnortHXK5t8YA07Xw6rOHse9DpGtmxHw R1UhP4r3Xa/+9fAChpR3zLNO72vFy6RMHcJ7RBy2mc+1MoMbfJlKmZCdMCmTyJ99bO/H SEXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789441846; x=1790046646; 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=xSNWHoyvKJfGdDxylfGmEXIoCFeqbapyGd1fgWyygV0=; b=XnBvzKuMwt+HF6jE104AFG+sOjE6opwL8eb13rMdJgG4NOaHAYn+Zczjy41WMI605o 7zY3fjLektKR7Y+3Vo6DYeh4zwCnr4aAMSh701Kxa96Na4zEHT3nN28KE5jpS7EYZeKk A3NPzTHuGm7LeJjgUnpObve5z5RdoWiS1CaB2OPWwK5GWLyxcsDzK+mMNX4VM5BovEkO 2aHOcsAmDSAp9S+eJB3NXr/iA4uhKE8PojBBJgtxTmwjBmjPEYjRk/9xun9P+eImlndk 6DhNT3iHJtkyPe1ovB72WIsvWnzasAsRsftpxmqG3YRU25Tll6ceHafG1VqEkpnkCWD6 EzRA== X-Forwarded-Encrypted: i=1; AKwUvBzqcPvOyulo9kibKG5DcpP64746OrDjA08D3au9JG4dMhwuY6fSfAp0OTim/sponxPvTAQZhacEJbMrg+Q=@vger.kernel.org X-Gm-Message-State: AFuF++ksflqbYrhK6JXIVjUZwvONBHUmDGVVeEHNFKMGFyVbFTYNDkd4 cgcyH60593gKiFblxZ+f71LQoN6IlguWmZNTy+8rKORfs5DuH5RF97yzQd6RfnSTh872BB/YbmZ w9tchOb8= X-Gm-Gg: AYBFou2GFS5GfSHoIdd5qxKGyh4fnv38D/lt6M4LmMs1vdpOtCX349Jow+eXLDEu4xL kEjYh28iiJvTrutLaVByOEutSKuvLLQClX+Gxs3VMljnmFxr9a/Ox5dTY/AXk/wEcR2W7+bCPzD sR2saCbOWskQCPUMis5ChYHzz2iotMhg67SIvykQ/oWp4e1w1HxJNQ7m+GdQX0cg5dzKwDul4m4 bxkE9cVKlgRC+VHZyNRJ0Wjgw9/Dw5yDTn/DAe6erLWJL8GsXdy6gZS3lAbJSXP9tiR5Vl+pRTC 9+D3jc0AsnjKOMBdWBvgePFmHE4IbofI2PCuTRAjFIB0sVy1DRoaGWx22AEDhT9U/KQrikxA2Um ZWiyA+FOIqsjUwVhvLanqa0jj0oH3hNBav9ImqnqQmwtfoAsyQjXCynA+ihQN9aZE3WAfuWtEg5 ViemVqUOeLz6FXrqYobQ5JcaJOLZZqMdAVRn9NCoVE9mAekihySzeNBwD4gdHBji1mYK9TOabpX wo= X-Received: by 2002:a05:622a:1919:b0:530:efea:7a55 with SMTP id d75a77b69052e-5310cef6b70mr77015881cf.4.1789441846176; Mon, 14 Sep 2026 20:10:46 -0700 (PDT) Received: from zippy.localdomain ([73.62.185.64]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-530ce4ec298sm118563841cf.16.2026.09.14.20.10.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2026 20:10:45 -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 v2 3/3] arm64: dts: qcom: qcs6490-rb3gen2: add endpoint buses Date: Mon, 14 Sep 2026 22:10:37 -0500 Message-ID: <20260915031038.1087264-4-elder@riscstar.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260915031038.1087264-1-elder@riscstar.com> References: <20260915031038.1087264-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 --- v2: - Added this patch to the series 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..59fbb0444d9b7 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 0x0 0x0 0x80000>, + <0x4 0x0 0x0 0x83050000 0x0 0x0 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 0x0 0x0 0x80000>, + <0x4 0x0 0x0 0x83050100 0x0 0x0 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