Re: [PATCH v4] configs: arm64: add emmc inmate configuration for k3-am654-idk
On Mon, Mar 14, 2022 at 06:31:38PM +0100, Jan Kiszka wrote: > 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 > > --- > > > > 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? > Tested with CONFIG_AM654_INMATE_CELL_EMMC undefined and the null/empty memory regions are handled correctly (e.g. no segfaulting in the hypervisor, etc). Matt > 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 ..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@4f8 { > > + compatible = "ti,am654-sdhci-5.1"; > > + reg = <0x0 0x4f8 0x0 0x260>, <0x0 0x4f9 0x0 0x134>; > > + power-domains = <_pds 47 1>; > > + clocks = <_clks 47 0>, <_clks 47 1>; > > + clock-names = "clk_ahb", "clk_xin"; > > + interrupts = ; > > + 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; > > + }; > > +}; > > + > > +_uart0 { > > + power-domains = <_pds 149 1>; > > +}; > > + > > +_pds { > > + #power-domain-cells = <2>; > > +}; > > + > > + { > > + /* 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 = 0x4f8, > > + .virt_start = 0x4f8, > > + .size = 0x1000, > > + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | > > + JAILHOUSE_MEM_IO, > > + }, > > + /* sdhci0 */ { > > + .phys_start = 0x4f9, > > + .virt_start = 0x4f9, > > + .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 = 0x0180, > > .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
Re: [PATCH v4] configs: arm64: add emmc inmate configuration for k3-am654-idk
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 > --- > > 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 ..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@4f8 { > + compatible = "ti,am654-sdhci-5.1"; > + reg = <0x0 0x4f8 0x0 0x260>, <0x0 0x4f9 0x0 0x134>; > + power-domains = <_pds 47 1>; > + clocks = <_clks 47 0>, <_clks 47 1>; > + clock-names = "clk_ahb", "clk_xin"; > + interrupts = ; > + 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; > + }; > +}; > + > +_uart0 { > + power-domains = <_pds 149 1>; > +}; > + > +_pds { > + #power-domain-cells = <2>; > +}; > + > + { > + /* 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 = 0x4f8, > + .virt_start = 0x4f8, > + .size = 0x1000, > + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | > + JAILHOUSE_MEM_IO, > + }, > + /* sdhci0 */ { > + .phys_start = 0x4f9, > + .virt_start = 0x4f9, > + .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 = 0x0180, > .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 jailhouse-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/bda0b499-e98d-2207-6adb-5baa8d9811cc%40siemens.com.
[PATCH v4] configs: arm64: add emmc inmate configuration for k3-am654-idk
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 --- 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 .../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 ..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@4f8 { + compatible = "ti,am654-sdhci-5.1"; + reg = <0x0 0x4f8 0x0 0x260>, <0x0 0x4f9 0x0 0x134>; + power-domains = <_pds 47 1>; + clocks = <_clks 47 0>, <_clks 47 1>; + clock-names = "clk_ahb", "clk_xin"; + interrupts = ; + 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; + }; +}; + +_uart0 { + power-domains = <_pds 149 1>; +}; + +_pds { + #power-domain-cells = <2>; +}; + + { + /* 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 = 0x4f8, + .virt_start = 0x4f8, + .size = 0x1000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_IO, + }, + /* sdhci0 */ { + .phys_start = 0x4f9, + .virt_start = 0x4f9, + .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 = 0x0180, .pin_base = 160, .pin_bitmap = { +#ifdef CONFIG_AM654_INMATE_CELL_EMMC + /* sdhc */ + 1 << (168 - 160) | +#endif /* vpci */ 1 << (189 - 160) | 1 << (190 - 160), -- 2.30.2 -- 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 jailhouse-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/20220314152209.5859-1-mranostay%40ti.com.
Re: [PATCH v3] configs: arm64: add emmc inmate configuration for k3-am654-idk
On 14.03.22 07:19, 'Matt Ranostay' via Jailhouse wrote: > Add eMMC support for k3-am654-idk in a linux inmate cell using > ENABLE_INMATE_CELL_EMMC macro, and respective device tree changes > > Signed-off-by: Matt Ranostay > --- > 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 > > .../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 ..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@4f8 { > + compatible = "ti,am654-sdhci-5.1"; > + reg = <0x0 0x4f8 0x0 0x260>, <0x0 0x4f9 0x0 0x134>; > + power-domains = <_pds 47 1>; > + clocks = <_clks 47 0>, <_clks 47 1>; > + clock-names = "clk_ahb", "clk_xin"; > + interrupts = ; > + 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; > + }; > +}; > + > +_uart0 { > + power-domains = <_pds 149 1>; > +}; > + > +_pds { > + #power-domain-cells = <2>; > +}; > + > + { > + /* 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..844554a7 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]; This does not give warnings if emmc is off? If not, I'm still not sure right now if Jailhouse handles Null memregions well. Should at least be tested. configs/x86/linux-x86-demo.c does that differently, though. > 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 ENABLE_INMATE_CELL_EMMC CONFIG_AM654_INMATE_CELL_EMMC > + /* sdhci0 */ { > + .phys_start = 0x4f8, > + .virt_start = 0x4f8, > + .size = 0x1000, > + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | > + JAILHOUSE_MEM_IO, > + }, > + /* sdhci0 */ { > + .phys_start = 0x4f9, > + .virt_start = 0x4f9, > + .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 = 0x0180, > .pin_base = 160, > .pin_bitmap = { > +#ifdef ENABLE_INMATE_CELL_EMMC > + /* sdhc */ > + 1 << (168 - 160) | > +#endif > /* vpci */ > 1 << (189 - 160) | > 1 << (190 - 160), Jan -- 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 jailhouse-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/495ff8d1-23e1-6c5c-dceb-de7200eb05b5%40siemens.com.
[PATCH v3] configs: arm64: add emmc inmate configuration for k3-am654-idk
Add eMMC support for k3-am654-idk in a linux inmate cell using ENABLE_INMATE_CELL_EMMC macro, and respective device tree changes Signed-off-by: Matt Ranostay --- 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 .../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 ..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@4f8 { + compatible = "ti,am654-sdhci-5.1"; + reg = <0x0 0x4f8 0x0 0x260>, <0x0 0x4f9 0x0 0x134>; + power-domains = <_pds 47 1>; + clocks = <_clks 47 0>, <_clks 47 1>; + clock-names = "clk_ahb", "clk_xin"; + interrupts = ; + 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; + }; +}; + +_uart0 { + power-domains = <_pds 149 1>; +}; + +_pds { + #power-domain-cells = <2>; +}; + + { + /* 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..844554a7 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 ENABLE_INMATE_CELL_EMMC + /* sdhci0 */ { + .phys_start = 0x4f8, + .virt_start = 0x4f8, + .size = 0x1000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_IO, + }, + /* sdhci0 */ { + .phys_start = 0x4f9, + .virt_start = 0x4f9, + .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 = 0x0180, .pin_base = 160, .pin_bitmap = { +#ifdef ENABLE_INMATE_CELL_EMMC + /* sdhc */ + 1 << (168 - 160) | +#endif /* vpci */ 1 << (189 - 160) | 1 << (190 - 160), -- 2.30.2 -- 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 jailhouse-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/20220314061938.3304-1-mranostay%40ti.com.
Re: [PATCH v2 4/4] configs: arm64: add emmc inmate configuration for k3-am654-idk
On Sun, Mar 13, 2022 at 12:11:37PM +0100, Jan Kiszka wrote: > On 05.03.22 04:04, 'Matt Ranostay' via Jailhouse wrote: > > Add eMMC support for k3-am654-idk in a linux inmate cell with both > > k3-am654-idk-linux-demo-emmc.c configuration, and respective device > > tree changes. > > > > Signed-off-by: Matt Ranostay > > --- > > .../arm64/dts/inmate-k3-am654-idk-emmc.dts| 45 > > configs/arm64/k3-am654-idk-linux-demo-emmc.c | 208 ++ > > 2 files changed, 253 insertions(+) > > create mode 100644 configs/arm64/dts/inmate-k3-am654-idk-emmc.dts > > create mode 100644 configs/arm64/k3-am654-idk-linux-demo-emmc.c > > > > 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 ..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@4f8 { > > + compatible = "ti,am654-sdhci-5.1"; > > + reg = <0x0 0x4f8 0x0 0x260>, <0x0 0x4f9 0x0 0x134>; > > + power-domains = <_pds 47 1>; > > + clocks = <_clks 47 0>, <_clks 47 1>; > > + clock-names = "clk_ahb", "clk_xin"; > > + interrupts = ; > > + 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; > > + }; > > +}; > > + > > +_uart0 { > > + power-domains = <_pds 149 1>; > > +}; > > + > > +_pds { > > + #power-domain-cells = <2>; > > +}; > > + > > + { > > + /* eMMC */ > > + non-removable; > > + ti,driver-strength-ohm = <50>; > > + bus-width = <8>; > > + disable-wp; > > +}; > > diff --git a/configs/arm64/k3-am654-idk-linux-demo-emmc.c > > b/configs/arm64/k3-am654-idk-linux-demo-emmc.c > > new file mode 100644 > > index ..9fbc7a5f > > --- /dev/null > > +++ b/configs/arm64/k3-am654-idk-linux-demo-emmc.c > > @@ -0,0 +1,208 @@ > > +/* > > + * Jailhouse, a Linux-based partitioning hypervisor > > + * > > + * Configuration for Linux inmate on AM654 based platforms > > + * 2 CPUs, 512MB RAM, 1 serial port(MCU UART), eMMC > > + * > > + * Copyright (c) 2019, 2022 Texas Instruments Incorporated - > > http://www.ti.com/ > > + * > > + * Authors: > > + * Lokesh Vutla > > + * Matt Ranostay > > + * > > + * This work is licensed under the terms of the GNU GPL, version 2. See > > + * the COPYING file in the top-level directory. > > + */ > > + > > +#include > > +#include > > + > > +#ifndef CONFIG_INMATE_BASE > > +#define CONFIG_INMATE_BASE 0x000 > > +#endif > > + > > +struct { > > + struct jailhouse_cell_desc cell; > > + __u64 cpus[1]; > > + struct jailhouse_memory mem_regions[19]; > > + struct jailhouse_irqchip irqchips[3]; > > + struct jailhouse_pci_device pci_devices[2]; > > +} __attribute__((packed)) config = { > > + .cell = { > > + .signature = JAILHOUSE_CELL_DESC_SIGNATURE, > > + .revision = JAILHOUSE_CONFIG_REVISION, > > + .name = "k3-am654-idk-linux-demo-emmc", > > + .flags = JAILHOUSE_CELL_PASSIVE_COMMREG, > > + > > + .cpu_set_size = sizeof(config.cpus), > > + .num_memory_regions = ARRAY_SIZE(config.mem_regions), > > + .num_irqchips = ARRAY_SIZE(config.irqchips), > > + .num_pci_devices = ARRAY_SIZE(config.pci_devices), > > + .cpu_reset_address = 0x0, > > + .vpci_irq_base = 189 - 32, > > + > > + .console = { > > + .address = 0x40a0, > > + .divider = 0x35, > > + .type = JAILHOUSE_CON_TYPE_8250, > > + .flags = JAILHOUSE_CON_ACCESS_MMIO | > > +JAILHOUSE_CON_REGDIST_4, > > + }, > > + }, > > + > > + .cpus = { > > + 0xc, > > + }, > > + > > + .mem_regions = { > > + /* IVSHMEM shared memory regions for 00:00.0 (demo) */ > > + { > > + .phys_start = 0x8dfa0, > > + .virt_start = 0x8dfa0, > > + .size = 0x1, > > + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_ROOTSHARED, > > + }, > > + { > > + .phys_start = 0x8dfa1, > > + .virt_start = 0x8dfa1, > > + .size = 0x1, > > + .flags = JAILHOUSE_MEM_READ |