For K3-J721e devices, gpio virtualization is achieved by replicating copies of GPIO controller.
Each cell gets a dedicated GPIO controller. However, there is additional field in the pinctrl to select the GPIO group. Add the mem_regions for main_gpio2 and main_gpio3 Program gpio_group in the pinctrl node for SW10 gpio_keys Signed-off-by: Nikhil Devshatwar <nikhil...@ti.com> --- configs/arm64/dts/inmate-k3-j721e-evm.dts | 3 ++- configs/arm64/k3-j721e-evm-linux-demo.c | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/configs/arm64/dts/inmate-k3-j721e-evm.dts b/configs/arm64/dts/inmate-k3-j721e-evm.dts index 51470a57..7edecda1 100644 --- a/configs/arm64/dts/inmate-k3-j721e-evm.dts +++ b/configs/arm64/dts/inmate-k3-j721e-evm.dts @@ -403,7 +403,8 @@ &main_pmx0 { sw10_button_pins_default: sw10_button_pins_default { pinctrl-single,pins = < - J721E_IOPAD(0x0, PIN_INPUT, 7) /* (AC18) EXTINTn.GPIO0_0 */ + /* PADCONFIG[5:4] = GPIO group select = 1 */ + J721E_IOPAD(0x0, PIN_INPUT, 23) /* (AC18) EXTINTn.GPIO2_0 */ >; }; diff --git a/configs/arm64/k3-j721e-evm-linux-demo.c b/configs/arm64/k3-j721e-evm-linux-demo.c index 12351ab3..55938b85 100644 --- a/configs/arm64/k3-j721e-evm-linux-demo.c +++ b/configs/arm64/k3-j721e-evm-linux-demo.c @@ -24,7 +24,7 @@ struct { struct jailhouse_cell_desc cell; __u64 cpus[1]; - struct jailhouse_memory mem_regions[20]; + struct jailhouse_memory mem_regions[22]; struct jailhouse_irqchip irqchips[4]; struct jailhouse_pci_device pci_devices[1]; } __attribute__((packed)) config = { @@ -89,6 +89,20 @@ struct { .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_IO | JAILHOUSE_MEM_ROOTSHARED, }, + /* main_gpio2 */ { + .phys_start = 0x00610000, + .virt_start = 0x00610000, + .size = 0x1000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_IO, + }, + /* main_gpio3 */ { + .phys_start = 0x00611000, + .virt_start = 0x00611000, + .size = 0x1000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_IO, + }, /* main sproxy target_data host_id=A72_3 */ { .phys_start = 0x3240f000, .virt_start = 0x3240f000, -- 2.17.1 -- 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/20191224121333.10214-1-nikhil.nd%40ti.com.