Hi dear TI friends,
As Jailhouse is a hardware isolation hypervisor, can it share gpio pins between root and inmate cells?
I do test like below, but didn't work. Can TI help to check the feasibility of this scheme?
1. in jailhouse-0.10+gitAUTOINC+b3a68ac89d/configs/arm64/k3-j721e-evm-linux-demo.c
/* main_gpio0 */ { .phys_start = 0x00600000, .virt_start = 0x00600000, .size = 0x1000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_IO | JAILHOUSE_MEM_ROOTSHARED, }, /* main_gpio1 */ { .phys_start = 0x00601000, .virt_start = 0x00601000, .size = 0x1000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_IO | JAILHOUSE_MEM_ROOTSHARED, },
2. in jailhouse-0.10+gitAUTOINC+b3a68ac89d/configs/arm64/dts/inmate-k3-j721e-evm_SmartCarPTA.dts
main_gpio0: gpio@600000 { compatible = "ti,j721e-gpio", "ti,keystone-gpio"; reg = <0x0 0x00600000 0x0 0x100>; gpio-controller; #gpio-cells = <2>; interrupt-parent = <&main_gpio_intr>; interrupts = <105 0 IRQ_TYPE_EDGE_RISING>, <105 1 IRQ_TYPE_EDGE_RISING>, <105 2 IRQ_TYPE_EDGE_RISING>, <105 3 IRQ_TYPE_EDGE_RISING>, <105 4 IRQ_TYPE_EDGE_RISING>, <105 5 IRQ_TYPE_EDGE_RISING>, <105 6 IRQ_TYPE_EDGE_RISING>, <105 7 IRQ_TYPE_EDGE_RISING>; interrupt-controller; #interrupt-cells = <2>; ti,ngpio = <128>; ti,davinci-gpio-unbanked = <0>; power-domains = <&k3_pds 105 TI_SCI_PD_EXCLUSIVE>; clocks = <&k3_clks 105 0>; clock-names = "gpio"; }; main_gpio1: gpio@601000 { compatible = "ti,j721e-gpio", "ti,keystone-gpio"; reg = <0x0 0x00601000 0x0 0x100>; gpio-controller; #gpio-cells = <2>; interrupt-parent = <&main_gpio_intr>; interrupts = <106 0 IRQ_TYPE_EDGE_RISING>, <106 1 IRQ_TYPE_EDGE_RISING>, <106 2 IRQ_TYPE_EDGE_RISING>; interrupt-controller; #interrupt-cells = <2>; ti,ngpio = <36>; ti,davinci-gpio-unbanked = <0>; power-domains = <&k3_pds 106 TI_SCI_PD_EXCLUSIVE>; clocks = <&k3_clks 106 0>; clock-names = "gpio"; };
3. running the system
root-cell work normal with gpio pin, but i catch some error log from inmate-cell kernel start log.
root@j7-evm:~# dmesg | grep gpio [ 0.983273] davinci_gpio 600000.gpio: IRQ not populated, err = -6 [ 1.000112] davinci_gpio 601000.gpio: IRQ not populated, err = -6
BR,
Jingyan