1fd7c7041SSuman AnnaTI Keystone DSP devices 2fd7c7041SSuman Anna======================= 3fd7c7041SSuman Anna 4fd7c7041SSuman AnnaThe TI Keystone 2 family of SoCs usually have one or more (upto 8) TI DSP Core 5fd7c7041SSuman Annasub-systems that are used to offload some of the processor-intensive tasks or 6fd7c7041SSuman Annaalgorithms, for achieving various system level goals. 7fd7c7041SSuman Anna 8fd7c7041SSuman AnnaThese processor sub-systems usually contain additional sub-modules like L1 9fd7c7041SSuman Annaand/or L2 caches/SRAMs, an Interrupt Controller, an external memory controller, 10fd7c7041SSuman Annaa dedicated local power/sleep controller etc. The DSP processor core in 11fd7c7041SSuman AnnaKeystone 2 SoCs is usually a TMS320C66x CorePac processor. 12fd7c7041SSuman Anna 13fd7c7041SSuman AnnaDSP Device Node: 14fd7c7041SSuman Anna================ 15fd7c7041SSuman AnnaEach DSP Core sub-system is represented as a single DT node, and should also 16fd7c7041SSuman Annahave an alias with the stem 'rproc' defined. Each node has a number of required 17fd7c7041SSuman Annaor optional properties that enable the OS running on the host processor (ARM 18fd7c7041SSuman AnnaCorePac) to perform the device management of the remote processor and to 19fd7c7041SSuman Annacommunicate with the remote processor. 20fd7c7041SSuman Anna 21fd7c7041SSuman AnnaRequired properties: 22fd7c7041SSuman Anna-------------------- 23fd7c7041SSuman AnnaThe following are the mandatory properties: 24fd7c7041SSuman Anna 25fd7c7041SSuman Anna- compatible: Should be one of the following, 26fd7c7041SSuman Anna "ti,k2hk-dsp" for DSPs on Keystone 2 66AK2H/K SoCs 27fd7c7041SSuman Anna "ti,k2l-dsp" for DSPs on Keystone 2 66AK2L SoCs 28fd7c7041SSuman Anna "ti,k2e-dsp" for DSPs on Keystone 2 66AK2E SoCs 29b4daf890SSuman Anna "ti,k2g-dsp" for DSPs on Keystone 2 66AK2G SoCs 30fd7c7041SSuman Anna 31fd7c7041SSuman Anna- reg: Should contain an entry for each value in 'reg-names'. 32fd7c7041SSuman Anna Each entry should have the memory region's start address 33fd7c7041SSuman Anna and the size of the region, the representation matching 34fd7c7041SSuman Anna the parent node's '#address-cells' and '#size-cells' values. 35fd7c7041SSuman Anna 36fd7c7041SSuman Anna- reg-names: Should contain strings with the following names, each 37fd7c7041SSuman Anna representing a specific internal memory region, and 38fd7c7041SSuman Anna should be defined in this order, 39fd7c7041SSuman Anna "l2sram", "l1pram", "l1dram" 40fd7c7041SSuman Anna 41fd7c7041SSuman Anna- ti,syscon-dev: Should be a pair of the phandle to the Keystone Device 42fd7c7041SSuman Anna State Control node, and the register offset of the DSP 43fd7c7041SSuman Anna boot address register within that node's address space. 44fd7c7041SSuman Anna 45fd7c7041SSuman Anna- resets: Should contain the phandle to the reset controller node 46fd7c7041SSuman Anna managing the resets for this device, and a reset 47b4daf890SSuman Anna specifier. Please refer to either of the following reset 48b4daf890SSuman Anna bindings for the reset argument specifier as per SoC, 49fd7c7041SSuman Anna Documentation/devicetree/bindings/reset/ti-syscon-reset.txt 50b4daf890SSuman Anna for 66AK2HK/66AK2L/66AK2E SoCs or, 51*e8488178SMauro Carvalho Chehab Documentation/devicetree/bindings/reset/ti,sci-reset.yaml 52b4daf890SSuman Anna for 66AK2G SoCs 53fd7c7041SSuman Anna 54fd7c7041SSuman Anna- interrupts: Should contain an entry for each value in 'interrupt-names'. 55fd7c7041SSuman Anna Each entry should have the interrupt source number used by 56fd7c7041SSuman Anna the remote processor to the host processor. The values should 57fd7c7041SSuman Anna follow the interrupt-specifier format as dictated by the 58fd7c7041SSuman Anna 'interrupt-parent' node. The purpose of each is as per the 59fd7c7041SSuman Anna description in the 'interrupt-names' property. 60fd7c7041SSuman Anna 61fd7c7041SSuman Anna- interrupt-names: Should contain strings with the following names, each 62fd7c7041SSuman Anna representing a specific interrupt, 63fd7c7041SSuman Anna "vring" - interrupt for virtio based IPC 64fd7c7041SSuman Anna "exception" - interrupt for exception notification 65fd7c7041SSuman Anna 66fd7c7041SSuman Anna- kick-gpios: Should specify the gpio device needed for the virtio IPC 67fd7c7041SSuman Anna stack. This will be used to interrupt the remote processor. 68fd7c7041SSuman Anna The gpio device to be used is as per the bindings in, 69fd7c7041SSuman Anna Documentation/devicetree/bindings/gpio/gpio-dsp-keystone.txt 70fd7c7041SSuman Anna 71b4daf890SSuman AnnaSoC-specific Required properties: 72b4daf890SSuman Anna--------------------------------- 73b4daf890SSuman AnnaThe following are mandatory properties for Keystone 2 66AK2HK, 66AK2L and 66AK2E 74b4daf890SSuman AnnaSoCs only: 75b4daf890SSuman Anna 76b4daf890SSuman Anna- clocks: Should contain the device's input clock, and should be 77b4daf890SSuman Anna defined as per the bindings in, 78b4daf890SSuman Anna Documentation/devicetree/bindings/clock/keystone-gate.txt 79b4daf890SSuman Anna 80b4daf890SSuman AnnaThe following are mandatory properties for Keystone 2 66AK2G SoCs only: 81b4daf890SSuman Anna 82b4daf890SSuman Anna- power-domains: Should contain a phandle to a PM domain provider node 83b4daf890SSuman Anna and an args specifier containing the DSP device id 84b4daf890SSuman Anna value. This property is as per the binding, 85f22145f1SMauro Carvalho Chehab Documentation/devicetree/bindings/soc/ti/sci-pm-domain.yaml 86b4daf890SSuman Anna 87fd7c7041SSuman AnnaOptional properties: 88fd7c7041SSuman Anna-------------------- 89fd7c7041SSuman Anna 90fd7c7041SSuman Anna- memory-region: phandle to the reserved memory node to be associated 91fd7c7041SSuman Anna with the remoteproc device. The reserved memory node 92fd7c7041SSuman Anna can be a CMA memory node, and should be defined as 93fd7c7041SSuman Anna per the bindings in 94fd7c7041SSuman Anna Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt 95fd7c7041SSuman Anna 96fd7c7041SSuman Anna 97b4daf890SSuman AnnaExamples: 98b4daf890SSuman Anna--------- 99b4daf890SSuman Anna 100b4daf890SSuman Anna1. 101fd7c7041SSuman Anna /* 66AK2H/K DSP aliases */ 102fd7c7041SSuman Anna aliases { 103fd7c7041SSuman Anna rproc0 = &dsp0; 104fd7c7041SSuman Anna rproc1 = &dsp1; 105fd7c7041SSuman Anna rproc2 = &dsp2; 106fd7c7041SSuman Anna rproc3 = &dsp3; 107fd7c7041SSuman Anna rproc4 = &dsp4; 108fd7c7041SSuman Anna rproc5 = &dsp5; 109fd7c7041SSuman Anna rproc6 = &dsp6; 110fd7c7041SSuman Anna rproc7 = &dsp7; 111fd7c7041SSuman Anna }; 112fd7c7041SSuman Anna 113fd7c7041SSuman Anna /* 66AK2H/K DSP memory node */ 114fd7c7041SSuman Anna reserved-memory { 115fd7c7041SSuman Anna #address-cells = <2>; 116fd7c7041SSuman Anna #size-cells = <2>; 117fd7c7041SSuman Anna ranges; 118fd7c7041SSuman Anna 119fd7c7041SSuman Anna dsp_common_memory: dsp-common-memory@81f800000 { 120fd7c7041SSuman Anna compatible = "shared-dma-pool"; 121fd7c7041SSuman Anna reg = <0x00000008 0x1f800000 0x00000000 0x800000>; 122fd7c7041SSuman Anna reusable; 123fd7c7041SSuman Anna }; 124fd7c7041SSuman Anna }; 125fd7c7041SSuman Anna 126fd7c7041SSuman Anna /* 66AK2H/K DSP node */ 127fd7c7041SSuman Anna soc { 128fd7c7041SSuman Anna dsp0: dsp@10800000 { 129fd7c7041SSuman Anna compatible = "ti,k2hk-dsp"; 130fd7c7041SSuman Anna reg = <0x10800000 0x00100000>, 131fd7c7041SSuman Anna <0x10e00000 0x00008000>, 132fd7c7041SSuman Anna <0x10f00000 0x00008000>; 133fd7c7041SSuman Anna reg-names = "l2sram", "l1pram", "l1dram"; 134fd7c7041SSuman Anna clocks = <&clkgem0>; 135fd7c7041SSuman Anna ti,syscon-dev = <&devctrl 0x40>; 136fd7c7041SSuman Anna resets = <&pscrst 0>; 137fd7c7041SSuman Anna interrupt-parent = <&kirq0>; 138fd7c7041SSuman Anna interrupts = <0 8>; 139fd7c7041SSuman Anna interrupt-names = "vring", "exception"; 140fd7c7041SSuman Anna kick-gpios = <&dspgpio0 27 0>; 141fd7c7041SSuman Anna memory-region = <&dsp_common_memory>; 142fd7c7041SSuman Anna }; 143fd7c7041SSuman Anna 144fd7c7041SSuman Anna }; 145b4daf890SSuman Anna 146b4daf890SSuman Anna2. 147b4daf890SSuman Anna /* 66AK2G DSP alias */ 148b4daf890SSuman Anna aliases { 149b4daf890SSuman Anna rproc0 = &dsp0; 150b4daf890SSuman Anna }; 151b4daf890SSuman Anna 152b4daf890SSuman Anna /* 66AK2G DSP memory node */ 153b4daf890SSuman Anna reserved-memory { 154b4daf890SSuman Anna #address-cells = <2>; 155b4daf890SSuman Anna #size-cells = <2>; 156b4daf890SSuman Anna ranges; 157b4daf890SSuman Anna 158b4daf890SSuman Anna dsp_common_memory: dsp-common-memory@81f800000 { 159b4daf890SSuman Anna compatible = "shared-dma-pool"; 160b4daf890SSuman Anna reg = <0x00000008 0x1f800000 0x00000000 0x800000>; 161b4daf890SSuman Anna reusable; 162b4daf890SSuman Anna }; 163b4daf890SSuman Anna }; 164b4daf890SSuman Anna 165b4daf890SSuman Anna /* 66AK2G DSP node */ 166b4daf890SSuman Anna soc { 167b4daf890SSuman Anna dsp0: dsp@10800000 { 168b4daf890SSuman Anna compatible = "ti,k2g-dsp"; 169b4daf890SSuman Anna reg = <0x10800000 0x00100000>, 170b4daf890SSuman Anna <0x10e00000 0x00008000>, 171b4daf890SSuman Anna <0x10f00000 0x00008000>; 172b4daf890SSuman Anna reg-names = "l2sram", "l1pram", "l1dram"; 173b4daf890SSuman Anna power-domains = <&k2g_pds 0x0046>; 174b4daf890SSuman Anna ti,syscon-dev = <&devctrl 0x40>; 175b4daf890SSuman Anna resets = <&k2g_reset 0x0046 0x1>; 176b4daf890SSuman Anna interrupt-parent = <&kirq0>; 177b4daf890SSuman Anna interrupts = <0 8>; 178b4daf890SSuman Anna interrupt-names = "vring", "exception"; 179b4daf890SSuman Anna kick-gpios = <&dspgpio0 27 0>; 180b4daf890SSuman Anna memory-region = <&dsp_common_memory>; 181b4daf890SSuman Anna }; 182b4daf890SSuman Anna }; 183