1c66ec88fSEmmanuel VadotARM Broadcom STB platforms Device Tree Bindings 2c66ec88fSEmmanuel Vadot----------------------------------------------- 3c66ec88fSEmmanuel VadotBoards with Broadcom Brahma15 ARM-based BCMxxxx (generally BCM7xxx variants) 4c66ec88fSEmmanuel VadotSoC shall have the following DT organization: 5c66ec88fSEmmanuel Vadot 6c66ec88fSEmmanuel VadotRequired root node properties: 7c66ec88fSEmmanuel Vadot - compatible: "brcm,bcm<chip_id>", "brcm,brcmstb" 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotexample: 10c66ec88fSEmmanuel Vadot/ { 11c66ec88fSEmmanuel Vadot #address-cells = <2>; 12c66ec88fSEmmanuel Vadot #size-cells = <2>; 13c66ec88fSEmmanuel Vadot model = "Broadcom STB (bcm7445)"; 14c66ec88fSEmmanuel Vadot compatible = "brcm,bcm7445", "brcm,brcmstb"; 15c66ec88fSEmmanuel Vadot 16c66ec88fSEmmanuel VadotFurther, syscon nodes that map platform-specific registers used for general 17c66ec88fSEmmanuel Vadotsystem control is required: 18c66ec88fSEmmanuel Vadot 19c66ec88fSEmmanuel Vadot - compatible: "brcm,bcm<chip_id>-sun-top-ctrl", "syscon" 20c66ec88fSEmmanuel Vadot - compatible: "brcm,bcm<chip_id>-cpu-biu-ctrl", 21c66ec88fSEmmanuel Vadot "brcm,brcmstb-cpu-biu-ctrl", 22c66ec88fSEmmanuel Vadot "syscon" 23c66ec88fSEmmanuel Vadot - compatible: "brcm,bcm<chip_id>-hif-continuation", "syscon" 24c66ec88fSEmmanuel Vadot 25c66ec88fSEmmanuel Vadotcpu-biu-ctrl node 26c66ec88fSEmmanuel Vadot------------------- 27c66ec88fSEmmanuel VadotSoCs with Broadcom Brahma15 ARM-based and Brahma53 ARM64-based CPUs have a 28c66ec88fSEmmanuel Vadotspecific Bus Interface Unit (BIU) block which controls and interfaces the CPU 29c66ec88fSEmmanuel Vadotcomplex to the different Memory Controller Ports (MCP), one per memory 30c66ec88fSEmmanuel Vadotcontroller (MEMC). This BIU block offers a feature called Write Pairing which 31c66ec88fSEmmanuel Vadotconsists in collapsing two adjacent cache lines into a single (bursted) write 32c66ec88fSEmmanuel Vadottransaction towards the memory controller (MEMC) to maximize write bandwidth. 33c66ec88fSEmmanuel Vadot 34c66ec88fSEmmanuel VadotRequired properties: 35c66ec88fSEmmanuel Vadot 36c66ec88fSEmmanuel Vadot - compatible: must be "brcm,bcm7445-cpu-biu-ctrl", "brcm,brcmstb-cpu-biu-ctrl", "syscon" 37c66ec88fSEmmanuel Vadot 38c66ec88fSEmmanuel VadotOptional properties: 39c66ec88fSEmmanuel Vadot 40c66ec88fSEmmanuel Vadot - brcm,write-pairing: 41c66ec88fSEmmanuel Vadot Boolean property, which when present indicates that the chip 42c66ec88fSEmmanuel Vadot supports write-pairing. 43c66ec88fSEmmanuel Vadot 44c66ec88fSEmmanuel Vadotexample: 45c66ec88fSEmmanuel Vadot rdb { 46c66ec88fSEmmanuel Vadot #address-cells = <1>; 47c66ec88fSEmmanuel Vadot #size-cells = <1>; 48c66ec88fSEmmanuel Vadot compatible = "simple-bus"; 49c66ec88fSEmmanuel Vadot ranges = <0 0x00 0xf0000000 0x1000000>; 50c66ec88fSEmmanuel Vadot 51c66ec88fSEmmanuel Vadot sun_top_ctrl: syscon@404000 { 52c66ec88fSEmmanuel Vadot compatible = "brcm,bcm7445-sun-top-ctrl", "syscon"; 53c66ec88fSEmmanuel Vadot reg = <0x404000 0x51c>; 54c66ec88fSEmmanuel Vadot }; 55c66ec88fSEmmanuel Vadot 56c66ec88fSEmmanuel Vadot hif_cpubiuctrl: syscon@3e2400 { 57c66ec88fSEmmanuel Vadot compatible = "brcm,bcm7445-cpu-biu-ctrl", "brcm,brcmstb-cpu-biu-ctrl", "syscon"; 58c66ec88fSEmmanuel Vadot reg = <0x3e2400 0x5b4>; 59c66ec88fSEmmanuel Vadot brcm,write-pairing; 60c66ec88fSEmmanuel Vadot }; 61c66ec88fSEmmanuel Vadot 62c66ec88fSEmmanuel Vadot hif_continuation: syscon@452000 { 63c66ec88fSEmmanuel Vadot compatible = "brcm,bcm7445-hif-continuation", "syscon"; 64c66ec88fSEmmanuel Vadot reg = <0x452000 0x100>; 65c66ec88fSEmmanuel Vadot }; 66c66ec88fSEmmanuel Vadot }; 67c66ec88fSEmmanuel Vadot 68c66ec88fSEmmanuel VadotNodes that allow for support of SMP initialization and reboot are required: 69c66ec88fSEmmanuel Vadot 70c66ec88fSEmmanuel Vadotsmpboot 71c66ec88fSEmmanuel Vadot------- 72c66ec88fSEmmanuel VadotRequired properties: 73c66ec88fSEmmanuel Vadot 74c66ec88fSEmmanuel Vadot - compatible 75c66ec88fSEmmanuel Vadot The string "brcm,brcmstb-smpboot". 76c66ec88fSEmmanuel Vadot 77c66ec88fSEmmanuel Vadot - syscon-cpu 78c66ec88fSEmmanuel Vadot A phandle / integer array property which lets the BSP know the location 79c66ec88fSEmmanuel Vadot of certain CPU power-on registers. 80c66ec88fSEmmanuel Vadot 81c66ec88fSEmmanuel Vadot The layout of the property is as follows: 82c66ec88fSEmmanuel Vadot o a phandle to the "hif_cpubiuctrl" syscon node 83c66ec88fSEmmanuel Vadot o offset to the base CPU power zone register 84c66ec88fSEmmanuel Vadot o offset to the base CPU reset register 85c66ec88fSEmmanuel Vadot 86c66ec88fSEmmanuel Vadot - syscon-cont 87c66ec88fSEmmanuel Vadot A phandle pointing to the syscon node which describes the CPU boot 88c66ec88fSEmmanuel Vadot continuation registers. 89c66ec88fSEmmanuel Vadot o a phandle to the "hif_continuation" syscon node 90c66ec88fSEmmanuel Vadot 91c66ec88fSEmmanuel Vadotexample: 92c66ec88fSEmmanuel Vadot smpboot { 93c66ec88fSEmmanuel Vadot compatible = "brcm,brcmstb-smpboot"; 94c66ec88fSEmmanuel Vadot syscon-cpu = <&hif_cpubiuctrl 0x88 0x178>; 95c66ec88fSEmmanuel Vadot syscon-cont = <&hif_continuation>; 96c66ec88fSEmmanuel Vadot }; 97c66ec88fSEmmanuel Vadot 98c66ec88fSEmmanuel Vadotreboot 99c66ec88fSEmmanuel Vadot------- 100c66ec88fSEmmanuel VadotRequired properties 101c66ec88fSEmmanuel Vadot 102c66ec88fSEmmanuel Vadot - compatible 103c66ec88fSEmmanuel Vadot The string property "brcm,brcmstb-reboot" for 40nm/28nm chips with 104c66ec88fSEmmanuel Vadot the new SYS_CTRL interface, or "brcm,bcm7038-reboot" for 65nm 105c66ec88fSEmmanuel Vadot chips with the old SUN_TOP_CTRL interface. 106c66ec88fSEmmanuel Vadot 107c66ec88fSEmmanuel Vadot - syscon 108c66ec88fSEmmanuel Vadot A phandle / integer array that points to the syscon node which describes 109c66ec88fSEmmanuel Vadot the general system reset registers. 110c66ec88fSEmmanuel Vadot o a phandle to "sun_top_ctrl" 111c66ec88fSEmmanuel Vadot o offset to the "reset source enable" register 112c66ec88fSEmmanuel Vadot o offset to the "software master reset" register 113c66ec88fSEmmanuel Vadot 114c66ec88fSEmmanuel Vadotexample: 115c66ec88fSEmmanuel Vadot reboot { 116c66ec88fSEmmanuel Vadot compatible = "brcm,brcmstb-reboot"; 117c66ec88fSEmmanuel Vadot syscon = <&sun_top_ctrl 0x304 0x308>; 118c66ec88fSEmmanuel Vadot }; 119c66ec88fSEmmanuel Vadot 120c66ec88fSEmmanuel Vadot 121c66ec88fSEmmanuel Vadot 122c66ec88fSEmmanuel VadotPower management 123c66ec88fSEmmanuel Vadot---------------- 124c66ec88fSEmmanuel Vadot 125c66ec88fSEmmanuel VadotFor power management (particularly, S2/S3/S5 system suspend), the following SoC 126c66ec88fSEmmanuel Vadotcomponents are needed: 127c66ec88fSEmmanuel Vadot 128c66ec88fSEmmanuel Vadot= Always-On control block (AON CTRL) 129c66ec88fSEmmanuel Vadot 130c66ec88fSEmmanuel VadotThis hardware provides control registers for the "always-on" (even in low-power 131c66ec88fSEmmanuel Vadotmodes) hardware, such as the Power Management State Machine (PMSM). 132c66ec88fSEmmanuel Vadot 133c66ec88fSEmmanuel VadotRequired properties: 134c66ec88fSEmmanuel Vadot- compatible : should contain "brcm,brcmstb-aon-ctrl" 135c66ec88fSEmmanuel Vadot- reg : the register start and length for the AON CTRL block 136c66ec88fSEmmanuel Vadot 137c66ec88fSEmmanuel VadotExample: 138c66ec88fSEmmanuel Vadot 139c66ec88fSEmmanuel Vadotaon-ctrl@410000 { 140c66ec88fSEmmanuel Vadot compatible = "brcm,brcmstb-aon-ctrl"; 141c66ec88fSEmmanuel Vadot reg = <0x410000 0x400>; 142c66ec88fSEmmanuel Vadot}; 143c66ec88fSEmmanuel Vadot 144c66ec88fSEmmanuel Vadot= Memory controllers 145c66ec88fSEmmanuel Vadot 146c66ec88fSEmmanuel VadotA Broadcom STB SoC typically has a number of independent memory controllers, 147c66ec88fSEmmanuel Vadoteach of which may have several associated hardware blocks, which are versioned 148c66ec88fSEmmanuel Vadotindependently (control registers, DDR PHYs, etc.). One might consider 149c66ec88fSEmmanuel Vadotdescribing these controllers as a parent "memory controllers" block, which 150c66ec88fSEmmanuel Vadotcontains N sub-nodes (one for each controller in the system), each of which is 151c66ec88fSEmmanuel Vadotassociated with a number of hardware register resources (e.g., its PHY). See 152c66ec88fSEmmanuel Vadotthe example device tree snippet below. 153c66ec88fSEmmanuel Vadot 154c66ec88fSEmmanuel Vadot== MEMC (MEMory Controller) 155c66ec88fSEmmanuel Vadot 156c66ec88fSEmmanuel VadotRepresents a single memory controller instance. 157c66ec88fSEmmanuel Vadot 158c66ec88fSEmmanuel VadotRequired properties: 159c66ec88fSEmmanuel Vadot- compatible : should contain "brcm,brcmstb-memc" and "simple-bus" 160c66ec88fSEmmanuel Vadot 161c66ec88fSEmmanuel VadotShould contain subnodes for any of the following relevant hardware resources: 162c66ec88fSEmmanuel Vadot 163c66ec88fSEmmanuel Vadot== DDR PHY control 164c66ec88fSEmmanuel Vadot 165c66ec88fSEmmanuel VadotControl registers for this memory controller's DDR PHY. 166c66ec88fSEmmanuel Vadot 167c66ec88fSEmmanuel VadotRequired properties: 168c66ec88fSEmmanuel Vadot- compatible : should contain one of these 169c66ec88fSEmmanuel Vadot "brcm,brcmstb-ddr-phy-v71.1" 170c66ec88fSEmmanuel Vadot "brcm,brcmstb-ddr-phy-v72.0" 171c66ec88fSEmmanuel Vadot "brcm,brcmstb-ddr-phy-v225.1" 172c66ec88fSEmmanuel Vadot "brcm,brcmstb-ddr-phy-v240.1" 173c66ec88fSEmmanuel Vadot "brcm,brcmstb-ddr-phy-v240.2" 174c66ec88fSEmmanuel Vadot 175c66ec88fSEmmanuel Vadot- reg : the DDR PHY register range 176c66ec88fSEmmanuel Vadot 177c66ec88fSEmmanuel Vadot== DDR SHIMPHY 178c66ec88fSEmmanuel Vadot 179c66ec88fSEmmanuel VadotControl registers for this memory controller's DDR SHIMPHY. 180c66ec88fSEmmanuel Vadot 181c66ec88fSEmmanuel VadotRequired properties: 182c66ec88fSEmmanuel Vadot- compatible : should contain "brcm,brcmstb-ddr-shimphy-v1.0" 183c66ec88fSEmmanuel Vadot- reg : the DDR SHIMPHY register range 184c66ec88fSEmmanuel Vadot 185c66ec88fSEmmanuel Vadot== MEMC DDR control 186c66ec88fSEmmanuel Vadot 187c66ec88fSEmmanuel VadotSequencer DRAM parameters and control registers. Used for Self-Refresh 188c66ec88fSEmmanuel VadotPower-Down (SRPD), among other things. 189c66ec88fSEmmanuel Vadot 190*7ef62cebSEmmanuel VadotSee Documentation/devicetree/bindings/memory-controllers/brcm,brcmstb-memc-ddr.yaml for a 191*7ef62cebSEmmanuel Vadotfull list of supported compatible strings and properties. 192c66ec88fSEmmanuel Vadot 193c66ec88fSEmmanuel VadotExample: 194c66ec88fSEmmanuel Vadot 195c66ec88fSEmmanuel Vadotmemory_controllers { 196c66ec88fSEmmanuel Vadot ranges; 197c66ec88fSEmmanuel Vadot compatible = "simple-bus"; 198c66ec88fSEmmanuel Vadot 199c66ec88fSEmmanuel Vadot memc@0 { 200c66ec88fSEmmanuel Vadot compatible = "brcm,brcmstb-memc", "simple-bus"; 201c66ec88fSEmmanuel Vadot ranges; 202c66ec88fSEmmanuel Vadot 203c66ec88fSEmmanuel Vadot ddr-phy@f1106000 { 204c66ec88fSEmmanuel Vadot compatible = "brcm,brcmstb-ddr-phy-v240.1"; 205c66ec88fSEmmanuel Vadot reg = <0xf1106000 0x21c>; 206c66ec88fSEmmanuel Vadot }; 207c66ec88fSEmmanuel Vadot 208c66ec88fSEmmanuel Vadot shimphy@f1108000 { 209c66ec88fSEmmanuel Vadot compatible = "brcm,brcmstb-ddr-shimphy-v1.0"; 210c66ec88fSEmmanuel Vadot reg = <0xf1108000 0xe4>; 211c66ec88fSEmmanuel Vadot }; 212c66ec88fSEmmanuel Vadot 213c66ec88fSEmmanuel Vadot memc-ddr@f1102000 { 214c66ec88fSEmmanuel Vadot reg = <0xf1102000 0x800>; 215c66ec88fSEmmanuel Vadot compatible = "brcm,brcmstb-memc-ddr"; 216c66ec88fSEmmanuel Vadot }; 217c66ec88fSEmmanuel Vadot }; 218c66ec88fSEmmanuel Vadot 219c66ec88fSEmmanuel Vadot memc@1 { 220c66ec88fSEmmanuel Vadot compatible = "brcm,brcmstb-memc", "simple-bus"; 221c66ec88fSEmmanuel Vadot ranges; 222c66ec88fSEmmanuel Vadot 223c66ec88fSEmmanuel Vadot ddr-phy@f1186000 { 224c66ec88fSEmmanuel Vadot compatible = "brcm,brcmstb-ddr-phy-v240.1"; 225c66ec88fSEmmanuel Vadot reg = <0xf1186000 0x21c>; 226c66ec88fSEmmanuel Vadot }; 227c66ec88fSEmmanuel Vadot 228c66ec88fSEmmanuel Vadot shimphy@f1188000 { 229c66ec88fSEmmanuel Vadot compatible = "brcm,brcmstb-ddr-shimphy-v1.0"; 230c66ec88fSEmmanuel Vadot reg = <0xf1188000 0xe4>; 231c66ec88fSEmmanuel Vadot }; 232c66ec88fSEmmanuel Vadot 233c66ec88fSEmmanuel Vadot memc-ddr@f1182000 { 234c66ec88fSEmmanuel Vadot reg = <0xf1182000 0x800>; 235c66ec88fSEmmanuel Vadot compatible = "brcm,brcmstb-memc-ddr"; 236c66ec88fSEmmanuel Vadot }; 237c66ec88fSEmmanuel Vadot }; 238c66ec88fSEmmanuel Vadot 239c66ec88fSEmmanuel Vadot memc@2 { 240c66ec88fSEmmanuel Vadot compatible = "brcm,brcmstb-memc", "simple-bus"; 241c66ec88fSEmmanuel Vadot ranges; 242c66ec88fSEmmanuel Vadot 243c66ec88fSEmmanuel Vadot ddr-phy@f1206000 { 244c66ec88fSEmmanuel Vadot compatible = "brcm,brcmstb-ddr-phy-v240.1"; 245c66ec88fSEmmanuel Vadot reg = <0xf1206000 0x21c>; 246c66ec88fSEmmanuel Vadot }; 247c66ec88fSEmmanuel Vadot 248c66ec88fSEmmanuel Vadot shimphy@f1208000 { 249c66ec88fSEmmanuel Vadot compatible = "brcm,brcmstb-ddr-shimphy-v1.0"; 250c66ec88fSEmmanuel Vadot reg = <0xf1208000 0xe4>; 251c66ec88fSEmmanuel Vadot }; 252c66ec88fSEmmanuel Vadot 253c66ec88fSEmmanuel Vadot memc-ddr@f1202000 { 254c66ec88fSEmmanuel Vadot reg = <0xf1202000 0x800>; 255c66ec88fSEmmanuel Vadot compatible = "brcm,brcmstb-memc-ddr"; 256c66ec88fSEmmanuel Vadot }; 257c66ec88fSEmmanuel Vadot }; 258c66ec88fSEmmanuel Vadot}; 259