Adjust HiKey examples for kirin-pcie
Subsystems (4)
cover Adjust HiKey examples for kirin-pcie
Rob,
As discussed on another thread, there are two issues at pci/hisilicon,kirin-pcie.yaml:
- The bus-range parameters are causing warnings;
- The Kirin970 example doesn't reflect the right device hierarchy, causing some of_node files under sysfs to not be initialized.
This small series fix both.
Mauro Carvalho Chehab (2):
dt-bindings: PCI: kirin: fix bus-range
dt-bindings: PCI: kirin: fix HiKey970 example
.../bindings | 67 ++++++++++--------- 1 file changed, 37 insertions(+), 30 deletions(-)
Signature · 1 line
2.31.1
PATCH 1/2 dt-bindings: PCI: kirin: fix bus-range
Using bus-range = <0 1> causes a runtime warning:
[ 5.363450] pci_bus 0000:00: root bus resource [bus 00-01]
[ 5.396998] pci_bus 0000:01: busn_res: can not insert [bus 01-ff] under [bus 00-01] (conflicts with (null) [bus 00-01])
[ 5.284831] pci 0000:00:00.0: PCI bridge to [bus 01-ff]On Kirin 960, changing to bus-range = <0 0xff> produces a cleaner log.
Kirin 970 is more complex, so better to just drop bus-range as a hole.
--- .../devicetree/bindings/pci/hisilicon,kirin-pcie.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Documentation/devicetree/bindings/pci/hisilicon,kirin-pcie.yaml +1 -2
@@ -66,7 +66,7 @@ examples: <0x0 0xf3f20000 0x0 0x40000>, <0x0 0xf5000000 0x0 0x2000>; reg-names = "dbi", "apb", "phy", "config"; - bus-range = <0x0 0x1>; + bus-range = <0x0 0xff>; #address-cells = <3>; #size-cells = <2>; device_type = "pci";
@@ -97,7 +97,6 @@ examples: <0x0 0xfc180000 0x0 0x1000>, <0x0 0xf5000000 0x0 0x2000>; reg-names = "dbi", "apb", "config"; - bus-range = <0x0 0x1>; msi-parent = <&its_pcie>; #address-cells = <3>; #size-cells = <2>;
Signature · 1 line
2.31.1
PATCH 2/2 dt-bindings: PCI: kirin: fix HiKey970 example
In reply to Mauro Carvalho ChehabThe given example doesn't produce all of_nodes at sysfs. Update it to reflect what's actually working.
--- .../bindings/pci/hisilicon,kirin-pcie.yaml | 64 +++++++++++-------- 1 file changed, 36 insertions(+), 28 deletions(-)
Documentation/devicetree/bindings/pci/hisilicon,kirin-pcie.yaml +36 -28
@@ -97,7 +97,6 @@ examples: <0x0 0xfc180000 0x0 0x1000>, <0x0 0xf5000000 0x0 0x2000>; reg-names = "dbi", "apb", "config"; - msi-parent = <&its_pcie>; #address-cells = <3>; #size-cells = <2>; device_type = "pci";
@@ -116,43 +115,52 @@ examples: <0x0 0 0 4 &gic GIC_SPI 285 IRQ_TYPE_LEVEL_HIGH>; reset-gpios = <&gpio7 0 0>; hisilicon,clken-gpios = <&gpio27 3 0>, <&gpio17 0 0>, <&gpio20 6 0>; - - pcie@0 { // Lane 0: PCIe switch: Bus 1, Device 0 - reg = <0 0 0 0 0>; + pcie@0,0 { // Lane 0: PCIe switch: Bus 1, Device 0 + reg = <0x80 0 0 0 0>; compatible = "pciclass,0604"; device_type = "pci"; #address-cells = <3>; #size-cells = <2>; ranges; - pcie@1,0 { // Lane 4: M.2 - reg = <0x800 0 0 0 0>; + msi-parent = <&its_pcie>; + + pcie@0,0 { // Lane 0: upstream + reg = <0 0 0 0 0>; compatible = "pciclass,0604"; device_type = "pci"; - reset-gpios = <&gpio3 1 0>; - clkreq-gpios = <&gpio27 3 0 >; - #address-cells = <3>; - #size-cells = <2>; - ranges; - }; - pcie@5,0 { // Lane 5: Mini PCIe - reg = <0x2800 0 0 0 0>; - compatible = "pciclass,0604"; - device_type = "pci"; - reset-gpios = <&gpio27 4 0 >; - clkreq-gpios = <&gpio17 0 0 >; - #address-cells = <3>; - #size-cells = <2>; - ranges; - }; - pcie@7,0 { // Lane 6: Ethernet - reg = <0x3800 0 0 0 0>; - compatible = "pciclass,0604"; - device_type = "pci"; - reset-gpios = <&gpio25 2 0 >; - clkreq-gpios = <&gpio20 6 0 >; #address-cells = <3>; #size-cells = <2>; ranges; + + pcie@1,0 { // Lane 4: M.2 + reg = <0x0800 0 0 0 0>; + compatible = "pciclass,0604"; + device_type = "pci"; + reset-gpios = <&gpio3 1 0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; + }; + + pcie@5,0 { // Lane 5: Mini PCIe + reg = <0x2800 0 0 0 0>; + compatible = "pciclass,0604"; + device_type = "pci"; + reset-gpios = <&gpio27 4 0 >; + #address-cells = <3>; + #size-cells = <2>; + ranges; + }; + + pcie@7,0 { // Lane 6: Ethernet + reg = <0x03800 0 0 0 0>; + compatible = "pciclass,0604"; + device_type = "pci"; + reset-gpios = <&gpio25 2 0 >; + #address-cells = <3>; + #size-cells = <2>; + ranges; + }; }; }; };
Signature · 1 line
2.31.1