^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) * Rockchip AXI PCIe Root Port Bridge DT description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) Required properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) - #address-cells: Address representation for root ports, set to <3>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) - #size-cells: Size representation for root ports, set to <2>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) - #interrupt-cells: specifies the number of cells needed to encode an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) interrupt source. The value must be 1.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) - compatible: Should contain "rockchip,rk3399-pcie"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) - reg: Two register ranges as listed in the reg-names property
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) - reg-names: Must include the following names
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) - "axi-base"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) - "apb-base"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) - clocks: Must contain an entry for each entry in clock-names.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) See ../clocks/clock-bindings.txt for details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) - clock-names: Must include the following entries:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) - "aclk"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) - "aclk-perf"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) - "hclk"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) - "pm"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) - msi-map: Maps a Requester ID to an MSI controller and associated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) msi-specifier data. See ./pci-msi.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) - phys: From PHY bindings: Phandle for the Generic PHY for PCIe.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) - phy-names: MUST be "pcie-phy".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) - interrupts: Three interrupt entries must be specified.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) - interrupt-names: Must include the following names
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) - "sys"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) - "legacy"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) - "client"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) - resets: Must contain seven entries for each entry in reset-names.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) See ../reset/reset.txt for details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) - reset-names: Must include the following names
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) - "core"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) - "mgmt"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) - "mgmt-sticky"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) - "pipe"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) - "pm"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) - "aclk"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) - "pclk"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) - pinctrl-names : The pin control state names
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) - pinctrl-0: The "default" pinctrl state
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) - #interrupt-cells: specifies the number of cells needed to encode an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) interrupt source. The value must be 1.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) - interrupt-map-mask and interrupt-map: standard PCI properties
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) Optional Property:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) - aspm-no-l0s: RC won't support ASPM L0s. This property is needed if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) using 24MHz OSC for RC's PHY.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) - ep-gpios: contain the entry for pre-reset gpio
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) - num-lanes: number of lanes to use
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) - vpcie3v3-supply: The phandle to the 3.3v regulator to use for PCIe.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) - vpcie1v8-supply: The phandle to the 1.8v regulator to use for PCIe.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) - vpcie0v9-supply: The phandle to the 0.9v regulator to use for PCIe.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) *Interrupt controller child node*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) The core controller provides a single interrupt for legacy INTx. The PCIe node
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) should contain an interrupt controller node as a target for the PCI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) 'interrupt-map' property. This node represents the domain at which the four
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) INTx interrupts are decoded and routed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) Required properties for Interrupt controller child node:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) - interrupt-controller: identifies the node as an interrupt controller
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) - #address-cells: specifies the number of cells needed to encode an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) address. The value must be 0.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) - #interrupt-cells: specifies the number of cells needed to encode an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) interrupt source. The value must be 1.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) Example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) pcie0: pcie@f8000000 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) compatible = "rockchip,rk3399-pcie";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) #address-cells = <3>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) #size-cells = <2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) clocks = <&cru ACLK_PCIE>, <&cru ACLK_PERF_PCIE>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) <&cru PCLK_PCIE>, <&cru SCLK_PCIE_PM>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) clock-names = "aclk", "aclk-perf",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) "hclk", "pm";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) bus-range = <0x0 0x1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH 0>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH 0>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH 0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) interrupt-names = "sys", "legacy", "client";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) assigned-clocks = <&cru SCLK_PCIEPHY_REF>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) assigned-clock-parents = <&cru SCLK_PCIEPHY_REF100M>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) assigned-clock-rates = <100000000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) ep-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) ranges = <0x83000000 0x0 0xfa000000 0x0 0xfa000000 0x0 0x600000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) 0x81000000 0x0 0xfa600000 0x0 0xfa600000 0x0 0x100000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) num-lanes = <4>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) msi-map = <0x0 &its 0x0 0x1000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) reg = <0x0 0xf8000000 0x0 0x2000000>, <0x0 0xfd000000 0x0 0x1000000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) reg-names = "axi-base", "apb-base";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) resets = <&cru SRST_PCIE_CORE>, <&cru SRST_PCIE_MGMT>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) <&cru SRST_PCIE_MGMT_STICKY>, <&cru SRST_PCIE_PIPE> ,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) <&cru SRST_PCIE_PM>, <&cru SRST_P_PCIE>, <&cru SRST_A_PCIE>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) reset-names = "core", "mgmt", "mgmt-sticky", "pipe",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) "pm", "pclk", "aclk";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) phys = <&pcie_phy>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) phy-names = "pcie-phy";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) pinctrl-names = "default";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) pinctrl-0 = <&pcie_clkreq>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) #interrupt-cells = <1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) interrupt-map-mask = <0 0 0 7>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) interrupt-map = <0 0 0 1 &pcie0_intc 0>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) <0 0 0 2 &pcie0_intc 1>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) <0 0 0 3 &pcie0_intc 2>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) <0 0 0 4 &pcie0_intc 3>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) pcie0_intc: interrupt-controller {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) interrupt-controller;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) #address-cells = <0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) #interrupt-cells = <1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) };