Re: [meta-ti] [PATCH v4] cmem: Adding am5729 beaglebonai CMEM configuration

2019-12-05 Thread Denys Dmytriyenko
Thanks, merged into next for testing.

On Thu, Dec 05, 2019 at 03:13:21PM -0600, Caleb Robey via 
Lists.Yoctoproject.Org wrote:
> CMEM memory block for bbai should be 402MB to allow full EVE
> acceleration and DSP use, but accounting for the BBAI only having
> 1GB of RAM.
> 
> Signed-off-by: Caleb Robey 
> 
> ---
> 
> v2 changes:
> - Added am572b to CMEM_MACHINEs.
> 
> v3 changes:
> - changed am572b to am5729-beagleboneai for clarity
> 
> v4 changes:
> - corrected mistake of adding new CMEM machine and
>   added beagleboneai to the already known machines
> 
>  recipes-kernel/linux/cmem.inc |  6 ++-
>  .../dra7xx/cmem-am5729-beagleboneai.dtsi  | 40 +++
>  2 files changed, 44 insertions(+), 2 deletions(-)
>  create mode 100644 
> recipes-kernel/linux/files/dra7xx/cmem-am5729-beagleboneai.dtsi
> 
> diff --git a/recipes-kernel/linux/cmem.inc b/recipes-kernel/linux/cmem.inc
> index 8bd643f4..3ad8e25d 100644
> --- a/recipes-kernel/linux/cmem.inc
> +++ b/recipes-kernel/linux/cmem.inc
> @@ -2,14 +2,15 @@
>  #
>  # Use these for temporary overrides
>  CMEM_MACHINE = "${MACHINE}"
> -CMEM_MACHINE_am57xx-evm = "am571x am572x am574x"
> -CMEM_MACHINE_am57xx-hs-evm = "am571x am572x am574x"
> +CMEM_MACHINE_am57xx-evm = "am571x am572x am5729-beagleboneai am574x"
> +CMEM_MACHINE_am57xx-hs-evm = "am571x am572x am5729-beagleboneai am574x"
>  CMEM_MACHINE_dra7xx-evm = "dra71x dra72x dra74x dra76x"
>  CMEM_MACHINE_dra7xx-hs-evm = "dra71x dra72x dra74x dra76x"
>  
>  # Set cmem.dtsi per machine or machine variant
>  CMEM_DTSI = "cmem.dtsi"
>  CMEM_DTSI_am571x = "cmem-am571x.dtsi"
> +CMEM_DTSI_am5729-beagleboneai = "cmem-am5729-beagleboneai.dtsi"
>  CMEM_DTSI_am574x = "cmem-am574x.dtsi"
>  CMEM_DTSI_dra71x = "cmem-dra71x.dtsi"
>  CMEM_DTSI_dra72x = "cmem-dra72x.dtsi"
> @@ -20,6 +21,7 @@ CMEM_DEVICETREE = "${KERNEL_DEVICETREE}"
>  CMEM_DEVICETREE_am571x = "am571x-idk.dtb am571x-idk-lcd-osd101t2045.dtb 
> am571x-idk-lcd-osd101t2587.dtb"
>  CMEM_DEVICETREE_am572x = "am57xx-beagle-x15.dtb am57xx-beagle-x15-revc.dtb \
>am572x-idk.dtb am572x-idk-lcd-osd101t2045.dtb 
> am572x-idk-lcd-osd101t2587.dtb"
> +CMEM_DEVICETREE_am5729-beagleboneai = "am5729-beagleboneai.dtb"
>  CMEM_DEVICETREE_am574x = "am574x-idk.dtb am574x-idk-lcd-osd101t2587.dtb"
>  CMEM_DEVICETREE_dra71x = "dra71-evm.dtb"
>  CMEM_DEVICETREE_dra72x = "dra72-evm.dtb dra72-evm-lcd-osd101t2045.dtb 
> dra72-evm-lcd-osd101t2587.dtb \
> diff --git a/recipes-kernel/linux/files/dra7xx/cmem-am5729-beagleboneai.dtsi 
> b/recipes-kernel/linux/files/dra7xx/cmem-am5729-beagleboneai.dtsi
> new file mode 100644
> index ..e0511d08
> --- /dev/null
> +++ b/recipes-kernel/linux/files/dra7xx/cmem-am5729-beagleboneai.dtsi
> @@ -0,0 +1,40 @@
> +/ {
> + reserved-memory {
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;
> +
> + cmem_block_mem_0: cmem_block_mem@a000 {
> + reg = <0x0 0xa000 0x0 0x1800>;
> + no-map;
> + status = "okay";
> + };
> +
> + cmem_block_mem_1_ocmc3: cmem_block_mem@4050 {
> + reg = <0x0 0x4050 0x0 0x10>;
> + no-map;
> + status = "okay";
> + };
> + };
> +
> + cmem {
> + compatible = "ti,cmem";
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + #pool-size-cells = <2>;
> +
> + status = "okay";
> +
> + cmem_block_0: cmem_block@0 {
> + reg = <0>;
> + memory-region = <&cmem_block_mem_0>;
> + cmem-buf-pools = <1 0x0 0x1800>;
> + };
> +
> + cmem_block_1: cmem_block@1 {
> + reg = <1>;
> + memory-region = <&cmem_block_mem_1_ocmc3>;
> + };
> + };
> +};
> -- 
> 2.17.1
> 

> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#12551): 
> https://lists.yoctoproject.org/g/meta-ti/message/12551
> Mute This Topic: https://lists.yoctoproject.org/mt/67215961/3617104
> Group Owner: meta-ti+ow...@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub  [de...@denix.org]
> -=-=-=-=-=-=-=-=-=-=-=-

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12555): 
https://lists.yoctoproject.org/g/meta-ti/message/12555
Mute This Topic: https://lists.yoctoproject.org/mt/67215961/21656
Group Owner: meta-ti+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[meta-ti] [PATCH v4] cmem: Adding am5729 beaglebonai CMEM configuration

2019-12-05 Thread Caleb Robey via Lists.Yoctoproject.Org
CMEM memory block for bbai should be 402MB to allow full EVE
acceleration and DSP use, but accounting for the BBAI only having
1GB of RAM.

Signed-off-by: Caleb Robey 

---

v2 changes:
- Added am572b to CMEM_MACHINEs.

v3 changes:
- changed am572b to am5729-beagleboneai for clarity

v4 changes:
- corrected mistake of adding new CMEM machine and
  added beagleboneai to the already known machines

 recipes-kernel/linux/cmem.inc |  6 ++-
 .../dra7xx/cmem-am5729-beagleboneai.dtsi  | 40 +++
 2 files changed, 44 insertions(+), 2 deletions(-)
 create mode 100644 
recipes-kernel/linux/files/dra7xx/cmem-am5729-beagleboneai.dtsi

diff --git a/recipes-kernel/linux/cmem.inc b/recipes-kernel/linux/cmem.inc
index 8bd643f4..3ad8e25d 100644
--- a/recipes-kernel/linux/cmem.inc
+++ b/recipes-kernel/linux/cmem.inc
@@ -2,14 +2,15 @@
 #
 # Use these for temporary overrides
 CMEM_MACHINE = "${MACHINE}"
-CMEM_MACHINE_am57xx-evm = "am571x am572x am574x"
-CMEM_MACHINE_am57xx-hs-evm = "am571x am572x am574x"
+CMEM_MACHINE_am57xx-evm = "am571x am572x am5729-beagleboneai am574x"
+CMEM_MACHINE_am57xx-hs-evm = "am571x am572x am5729-beagleboneai am574x"
 CMEM_MACHINE_dra7xx-evm = "dra71x dra72x dra74x dra76x"
 CMEM_MACHINE_dra7xx-hs-evm = "dra71x dra72x dra74x dra76x"
 
 # Set cmem.dtsi per machine or machine variant
 CMEM_DTSI = "cmem.dtsi"
 CMEM_DTSI_am571x = "cmem-am571x.dtsi"
+CMEM_DTSI_am5729-beagleboneai = "cmem-am5729-beagleboneai.dtsi"
 CMEM_DTSI_am574x = "cmem-am574x.dtsi"
 CMEM_DTSI_dra71x = "cmem-dra71x.dtsi"
 CMEM_DTSI_dra72x = "cmem-dra72x.dtsi"
@@ -20,6 +21,7 @@ CMEM_DEVICETREE = "${KERNEL_DEVICETREE}"
 CMEM_DEVICETREE_am571x = "am571x-idk.dtb am571x-idk-lcd-osd101t2045.dtb 
am571x-idk-lcd-osd101t2587.dtb"
 CMEM_DEVICETREE_am572x = "am57xx-beagle-x15.dtb am57xx-beagle-x15-revc.dtb \
   am572x-idk.dtb am572x-idk-lcd-osd101t2045.dtb 
am572x-idk-lcd-osd101t2587.dtb"
+CMEM_DEVICETREE_am5729-beagleboneai = "am5729-beagleboneai.dtb"
 CMEM_DEVICETREE_am574x = "am574x-idk.dtb am574x-idk-lcd-osd101t2587.dtb"
 CMEM_DEVICETREE_dra71x = "dra71-evm.dtb"
 CMEM_DEVICETREE_dra72x = "dra72-evm.dtb dra72-evm-lcd-osd101t2045.dtb 
dra72-evm-lcd-osd101t2587.dtb \
diff --git a/recipes-kernel/linux/files/dra7xx/cmem-am5729-beagleboneai.dtsi 
b/recipes-kernel/linux/files/dra7xx/cmem-am5729-beagleboneai.dtsi
new file mode 100644
index ..e0511d08
--- /dev/null
+++ b/recipes-kernel/linux/files/dra7xx/cmem-am5729-beagleboneai.dtsi
@@ -0,0 +1,40 @@
+/ {
+   reserved-memory {
+   #address-cells = <2>;
+   #size-cells = <2>;
+   ranges;
+
+   cmem_block_mem_0: cmem_block_mem@a000 {
+   reg = <0x0 0xa000 0x0 0x1800>;
+   no-map;
+   status = "okay";
+   };
+
+   cmem_block_mem_1_ocmc3: cmem_block_mem@4050 {
+   reg = <0x0 0x4050 0x0 0x10>;
+   no-map;
+   status = "okay";
+   };
+   };
+
+   cmem {
+   compatible = "ti,cmem";
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   #pool-size-cells = <2>;
+
+   status = "okay";
+
+   cmem_block_0: cmem_block@0 {
+   reg = <0>;
+   memory-region = <&cmem_block_mem_0>;
+   cmem-buf-pools = <1 0x0 0x1800>;
+   };
+
+   cmem_block_1: cmem_block@1 {
+   reg = <1>;
+   memory-region = <&cmem_block_mem_1_ocmc3>;
+   };
+   };
+};
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12551): 
https://lists.yoctoproject.org/g/meta-ti/message/12551
Mute This Topic: https://lists.yoctoproject.org/mt/67215961/21656
Group Owner: meta-ti+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-