Add and enable DSP device on OMAPL138 LCDK board
cover Add and enable DSP device on OMAPL138 LCDK board
Hi Sekhar,
The following series adds the DT node for the DSP device present on on DA850/OMAPL138 SoCs. The node is disabled in the base dts file, and enabled in the corresponding LCDK board file alongside the reserved CMA pool required by the DSP device. The DT bindings and driver adaptation were added to mainline in 4.14-rc1, and this series adds the remaining dt portions. Nodes are added as per bindings in Documentation/devicetree/bindings/remoteproc/ti,davinci-rproc.txt
Patches are based on 4.14-rc1. The first 2 patches adds the base DTS node and enables the device on OMAPL138 LCDK board. The last patch allows the non-DT clock to be bound to the DT DSP device by using of_auxdata which renames the device to the same as the non-DT device name. This is required by the davinci remoteproc driver to properly acquire and enable the clock for this device.
Validation done on OMAPL138 LCDK board. Supported features include basic load/boot (tested with rpmsg_client_sample) using external memory from the CMA pool.
regards
Suman
Suman Anna (3):
ARM: dts: da850: Add DSP node
ARM: dts: da850-lcdk: Add and enable CMA reserved pool for DSP
ARM: davinci: da8xx-dt: Add OF_DEV_AUXDATA entry for DSP clock
matching
arch/arm/boot/dts/da850-lcdk.dts | 18 ++++++++++++++++++ arch/arm/boot/dts/da850.dtsi | 12 ++++++++++++ arch/arm/mach-davinci/da8xx-dt.c | 1 + 3 files changed, 31 insertions(+)
Signature · 1 line
2.13.1
PATCH 1/3 ARM: dts: da850: Add DSP node
The TI Davinci DA8xx family of SoCs have a single DSP subsystem that is comprised of TI's standard TMS320C674x megamodule and several blocks of internal memory (L1P, L1D and L2 RAMs). Add the DT node for this DSP processor sub-system. The processor does not have an MMU, and uses a chip-level signalling register and shared memory for inter-processor communication with the ARM core.
The node has been added in disabled state, and can be enabled in the respective board dts file with an associated reserved memory block.
--- arch/arm/boot/dts/da850.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm/boot/dts/da850.dtsi +12 -0
@@ -23,6 +23,18 @@ reg = <0xfffee000 0x2000>; }; }; + dsp: dsp at 11800000 { + compatible = "ti,da850-dsp"; + reg = <0x11800000 0x40000>, + <0x11e00000 0x8000>, + <0x11f00000 0x8000>, + <0x01c14044 0x4>, + <0x01c14174 0x8>; + reg-names = "l2sram", "l1pram", "l1dram", "host1cfg", "chipsig"; + interrupt-parent = <&intc>; + interrupts = <28>; + status = "disabled"; + }; soc at 1c00000 { compatible = "simple-bus"; model = "da850";
Signature · 1 line
2.13.1
PATCH 2/3 ARM: dts: da850-lcdk: Add and enable CMA reserved pool for DSP
In reply to Suman AnnaA CMA reserved memory node of 16 MB has been added and assigned to the DSP remoteproc device on the OMAP-L138 LCDK board. The CMA starting address matches the values used within the TI IPC 3.x software. Both the CMA node and the corresponding rproc node are also marked okay to enable the DSP on the OMAP-L138 LCDK board.
--- arch/arm/boot/dts/da850-lcdk.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
arch/arm/boot/dts/da850-lcdk.dts +18 -0
@@ -26,6 +26,19 @@ reg = <0xc0000000 0x08000000>; }; + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + dsp_memory_region: dsp-memory at c3000000 { + compatible = "shared-dma-pool"; + reg = <0xc3000000 0x1000000>; + reusable; + status = "okay"; + }; + }; + sound { compatible = "simple-audio-card"; simple-audio-card,name = "DA850/OMAP-L138 LCDK";
@@ -319,3 +332,8 @@ pinctrl-0 = <&vpif_capture_pins>; status = "okay"; }; + +&dsp { + memory-region = <&dsp_memory_region>; + status = "okay"; +};
Signature · 1 line
2.13.1
PATCH 3/3 ARM: davinci: da8xx-dt: Add OF_DEV_AUXDATA entry for DSP clock matching
In reply to Suman AnnaAdd the OF_DEV_AUXDATA entry needed to match the device-tree DSP node to its non-device-tree clock, so that the da8xx-remoteproc driver can properly enable the clocks. The device name has also been assigned "davinci-rproc.0" to match the device id used in the da850_clks clk_lookup array.
--- arch/arm/mach-davinci/da8xx-dt.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-davinci/da8xx-dt.c +1 -0
@@ -54,6 +54,7 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {OF_DEV_AUXDATA ("ti,da830-usb-phy" ,0x01c1417c ,"da8xx-usb-phy" ,NULL ),OF_DEV_AUXDATA ("ti,da850-ahci" ,0x01e18000 ,"ahci_da850" ,NULL ),OF_DEV_AUXDATA ("ti,da850-vpif" ,0x01e17000 ,"vpif" ,NULL ), + OF_DEV_AUXDATA("ti,da850-dsp", 0x11800000, "davinci-rproc.0", NULL), {} };
Signature · 1 line
2.13.1
Hi Suman,
Quoted 17 lines · Suman Anna
Hi Sekhar,
The following series adds the DT node for the DSP device present on on DA850/OMAPL138 SoCs. The node is disabled in the base dts file, and enabled in the corresponding LCDK board file alongside the reserved CMA pool required by the DSP device. The DT bindings and driver adaptation were added to mainline in 4.14-rc1, and this series adds the remaining dt portions. Nodes are added as per bindings in
Documentation/devicetree/bindings/remoteproc/ti,davinci-rproc.txtPatches are based on 4.14-rc1. The first 2 patches adds the base DTS node and enables the device on OMAPL138 LCDK board. The last patch allows the non-DT clock to be bound to the DT DSP device by using
of_auxdatawhich renames the device to the same as the non-DT device name. This is required by the davinci remoteproc driver to properly acquire and enable the clock for this device.
Quoted 3 lines
Validation done on OMAPL138 LCDK board. Supported features include basic load/boot (tested with
rpmsg_client_sample) using external memory from the CMA pool.
Applied for v4.15. The patches are on my master branch. They will be in linux-next when I send my pull request to ARM-SoC, which typically will take a couple of weeks more.
davinci_all_defconfig seems to be missing the CMA options needed. Could you send a patch enabling them?
Thanks,
Sekhar
Quoted 20 lines · Sekhar Nori
Hi Suman,
Quoted 17 lines · Suman Anna
Hi Sekhar,
The following series adds the DT node for the DSP device present on on DA850/OMAPL138 SoCs. The node is disabled in the base dts file, and enabled in the corresponding LCDK board file alongside the reserved CMA pool required by the DSP device. The DT bindings and driver adaptation were added to mainline in 4.14-rc1, and this series adds the remaining dt portions. Nodes are added as per bindings in
Documentation/devicetree/bindings/remoteproc/ti,davinci-rproc.txtPatches are based on 4.14-rc1. The first 2 patches adds the base DTS node and enables the device on OMAPL138 LCDK board. The last patch allows the non-DT clock to be bound to the DT DSP device by using
of_auxdatawhich renames the device to the same as the non-DT device name. This is required by the davinci remoteproc driver to properly acquire and enable the clock for this device.
Quoted 7 lines
Quoted 3 lines
Validation done on OMAPL138 LCDK board. Supported features include basic load/boot (tested with
rpmsg_client_sample) using external memory from the CMA pool.Applied for v4.15. The patches are on my master branch. They will be in linux-next when I send my pull request to ARM-SoC, which typically will take a couple of weeks more.
Thanks Sekhar.
Quoted 3 lines
davinci_all_defconfigseems to be missing the CMA options needed. Could you send a patch enabling them?
These are tracked as dependencies on the remoteproc Kconfig, so you won't be able to enable the driver without turning them on. I left them as there were before my DT adaptation, but I can enable the CMA options by default going forward.
regards
Suman