On 14.03.22 16:22, 'Matt Ranostay' via Jailhouse wrote:
> Add eMMC support for k3-am654-idk in a linux inmate cell using
> CONFIG_AM654_INMATE_CELL_EMMC macro, and respective device tree
> changes.
> 
> Signed-off-by: Matt Ranostay <[email protected]>
> ---
> 
> Changes from v1:
> * Split out eMMC enablement to its own inmate configuration
> 
> Changes from v2:
> * Recombined eMMC enablement to one configuration that is enabled
>   with ENABLE_INMATE_CELL_EMMC define
> * Dropped patches that were already merged
> 
> Changes from v3:
> * Rename ENABLE_INMATE_CELL_EMMC to CONFIG_AM654_INMATE_CELL_EMMC
> 

How about the memegion array size diff?

Jan

>  .../arm64/dts/inmate-k3-am654-idk-emmc.dts    | 45 +++++++++++++++++++
>  configs/arm64/k3-am654-idk-linux-demo.c       | 22 ++++++++-
>  2 files changed, 66 insertions(+), 1 deletion(-)
>  create mode 100644 configs/arm64/dts/inmate-k3-am654-idk-emmc.dts
> 
> diff --git a/configs/arm64/dts/inmate-k3-am654-idk-emmc.dts 
> b/configs/arm64/dts/inmate-k3-am654-idk-emmc.dts
> new file mode 100644
> index 00000000..150e31fe
> --- /dev/null
> +++ b/configs/arm64/dts/inmate-k3-am654-idk-emmc.dts
> @@ -0,0 +1,45 @@
> +/dts-v1/;
> +
> +#include "inmate-k3-am654-idk.dts"
> +
> +/ {
> +     sdhci0: mmc@4f80000 {
> +             compatible = "ti,am654-sdhci-5.1";
> +             reg = <0x0 0x4f80000 0x0 0x260>, <0x0 0x4f90000 0x0 0x134>;
> +             power-domains = <&k3_pds 47 1>;
> +             clocks = <&k3_clks 47 0>, <&k3_clks 47 1>;
> +             clock-names = "clk_ahb", "clk_xin";
> +             interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
> +             mmc-ddr-1_8v;
> +             mmc-hs200-1_8v;
> +             ti,otap-del-sel-legacy = <0x0>;
> +             ti,otap-del-sel-mmc-hs = <0x0>;
> +             ti,otap-del-sel-sd-hs = <0x0>;
> +             ti,otap-del-sel-sdr12 = <0x0>;
> +             ti,otap-del-sel-sdr25 = <0x0>;
> +             ti,otap-del-sel-sdr50 = <0x8>;
> +             ti,otap-del-sel-sdr104 = <0x7>;
> +             ti,otap-del-sel-ddr50 = <0x5>;
> +             ti,otap-del-sel-ddr52 = <0x5>;
> +             ti,otap-del-sel-hs200 = <0x5>;
> +             ti,otap-del-sel-hs400 = <0x0>;
> +             ti,trm-icp = <0x8>;
> +             dma-coherent;
> +     };
> +};
> +
> +&mcu_uart0 {
> +     power-domains = <&k3_pds 149 1>;
> +};
> +
> +&k3_pds {
> +     #power-domain-cells = <2>;
> +};
> +
> +&sdhci0 {
> +     /* eMMC */
> +     non-removable;
> +     ti,driver-strength-ohm = <50>;
> +     bus-width = <8>;
> +     disable-wp;
> +};
> diff --git a/configs/arm64/k3-am654-idk-linux-demo.c 
> b/configs/arm64/k3-am654-idk-linux-demo.c
> index fdf5fea8..3937dff3 100644
> --- a/configs/arm64/k3-am654-idk-linux-demo.c
> +++ b/configs/arm64/k3-am654-idk-linux-demo.c
> @@ -23,7 +23,7 @@
>  struct {
>       struct jailhouse_cell_desc cell;
>       __u64 cpus[1];
> -     struct jailhouse_memory mem_regions[17];
> +     struct jailhouse_memory mem_regions[19];
>       struct jailhouse_irqchip irqchips[3];
>       struct jailhouse_pci_device pci_devices[2];
>  } __attribute__((packed)) config = {
> @@ -112,6 +112,22 @@ struct {
>                       .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
>                               JAILHOUSE_MEM_IO,
>               },
> +#ifdef CONFIG_AM654_INMATE_CELL_EMMC
> +             /* sdhci0 */ {
> +                     .phys_start = 0x4f80000,
> +                     .virt_start = 0x4f80000,
> +                     .size = 0x1000,
> +                     .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
> +                             JAILHOUSE_MEM_IO,
> +             },
> +             /* sdhci0 */ {
> +                     .phys_start = 0x4f90000,
> +                     .virt_start = 0x4f90000,
> +                     .size = 0x1000,
> +                     .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
> +                             JAILHOUSE_MEM_IO,
> +             },
> +#endif
>               /* main sproxy target_data host_id=A53_3 */ {
>                       .phys_start = 0x3240f000,
>                       .virt_start = 0x3240f000,
> @@ -153,6 +169,10 @@ struct {
>                       .address = 0x01800000,
>                       .pin_base = 160,
>                       .pin_bitmap = {
> +#ifdef CONFIG_AM654_INMATE_CELL_EMMC
> +                     /* sdhc */
> +                     1 << (168 - 160) |
> +#endif
>                       /* vpci */
>                       1 << (189 - 160) |
>                       1 << (190 - 160),


-- 
Siemens AG, Technology
Competence Center Embedded Linux

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/bda0b499-e98d-2207-6adb-5baa8d9811cc%40siemens.com.

Reply via email to