On 24/12/19 3:18 PM, Nikhil Devshatwar wrote:
> 
> 
> On 24/12/19 9:42 am, Lokesh Vutla wrote:
>> On 23/12/19 8:43 PM, Nikhil Devshatwar wrote:
>>> Add the linux demo cell config for j721e-evm board.
>>> Also add the required device tree for booting Linux kernel
>>> in the inmate cell.
>>>
>>> This cell config acts as a reference for partitioning
>>> devices across the 2 Linux cells.
>>> This will be updated as support for more devices get added.
>>>
>>> Signed-off-by: Lokesh Vutla <[email protected]>
>>> Signed-off-by: Nikhil Devshatwar <[email protected]>
>>> ---
>>>
>>> Notes:
>>>     Changes from v3:
>>>     * Add gpio, emmc and USB device in the DTS with upstream bindings
>>>     * Describe the irqmap for easy understanding and verification
>>>     * Update power-domains properties
>>>     
>>>     Changes from v2:
>>>     * Only add the DT entries for devices with stable bindings
>>>     * Organize the DTS to match the bus topology with upstream kernel
>>>     
>>>     Changes from v1:
>>>     * Split up the peripheral mem_region to match with kernel dts
>>>     * Add GPU, multimedia decoder and display devices
>>>
>>>  configs/arm64/dts/inmate-k3-j721e-evm.dts | 433 ++++++++++++++++++++++
>>>  configs/arm64/k3-j721e-evm-linux-demo.c   | 262 +++++++++++++
>>>  2 files changed, 695 insertions(+)
>>>  create mode 100644 configs/arm64/dts/inmate-k3-j721e-evm.dts
>>>  create mode 100644 configs/arm64/k3-j721e-evm-linux-demo.c
>>>
>>> diff --git a/configs/arm64/dts/inmate-k3-j721e-evm.dts 
>>> b/configs/arm64/dts/inmate-k3-j721e-evm.dts
>>> new file mode 100644
>>> index 00000000..51470a57
>>> --- /dev/null
>>> +++ b/configs/arm64/dts/inmate-k3-j721e-evm.dts
>>> @@ -0,0 +1,433 @@
>>> +// SPDX-License-Identifier: GPL-2.0
>>> +/*
>>> + * Device Tree Source for J721E Jailhouse inmate kernel
>>> + *
>>> + * Copyright (C) 2016-2019 Texas Instruments Incorporated - 
>>> http://www.ti.com/
>>> + */
>>> +
>>> +/dts-v1/;
>>> + surprised how they can 
>>> +#include <dt-bindings/interrupt-controller/irq.h>
>>> +#include <dt-bindings/interrupt-controller/arm-gic.h>
>>> +#include <dt-bindings/pinctrl/k3.h>
>>> +#include <dt-bindings/input/input.h>
>>> +#include <dt-bindings/gpio/gpio.h>
>>> +#include <dt-bindings/soc/ti,sci_pm_domain.h>
>>> +
>>> +/ {
>>> +   model = "Texas Instruments J721E Inmate Model";
>>> +   compatible = "ti,j721e-evm", "ti,j721e";
>>> +   interrupt-parent = <&gic500>;
>>> +   #address-cells = <2>;
>>> +   #size-cells = <2>;
>>> +
>>> +   aliases {
>>> +           serial3 = &main_uart1;
>>> +   };
>>> +
>>> +   chosen {
>>> +           stdout-path = "serial3:115200n8";
>>> +   };
>>> +
>>> +   hypervisor {
>>> +           compatible = "jailhouse,cell";
>>> +   };
>>> +
>> [..snip..]
>>
>>> +
>>> +   cbass_main_navss: interconnect0 {
>>> +           compatible = "simple-bus";
>>> +           #address-cells = <2>;
>>> +           #size-cells = <2>;
>>> +           ranges;
>>> +
>>> +           main_navss_intr: interrupt-controller1 {
>>> +                   compatible = "ti,sci-intr";
>>> +                   ti,intr-trigger-type = <4>;
>>> +                   interrupt-controller;
>>> +                   interrupt-parent = <&gic500>;
>>> +                   #interrupt-cells = <2>;
>>> +                   ti,sci = <&dmsc>;
>>> +                   ti,sci-dst-id = <14>;
>>> +                   ti,sci-rm-range-girq = <4>;
>>> +           };
>>> +
>>> +           main_udmass_inta: interrupt-controller@33d00000 {
>>> +                   compatible = "ti,sci-inta";
>>> +                   reg = <0x0 0x33d00000 0x0 0x100000>;
>>> +                   interrupt-controller;
>>> +                   interrupt-parent = <&main_navss_intr>;
>>> +                   msi-controller;
>>> +                   ti,sci = <&dmsc>;
>>> +                   ti,sci-dev-id = <209>;
>>> +                   ti,sci-rm-range-vint = <0xa>;
>>> +                   ti,sci-rm-range-global-event = <0xd>;
>>> +           };
>> You should drop this node. The address is not mapped in
>> k3-j721e-evm-linux-demo.c and there are no users in this DT. You should be 
>> very
>> careful when virtualizing inta and udmass.
> I am waiting for mcasp bindings to be supported in mainline kernel.
> Once it is done, we will start using UDMA, inta, intr from linux-demo cell
> 
>>> +   };
>>> +
>>> +   secure_proxy_main: mailbox@32c00000 {
>>> +           compatible = "ti,am654-secure-proxy";
>>> +           #mbox-cells = <1>;
>>> +           reg-names = "target_data", "rt", "scfg";
>>> +           reg = <0x00 0x32c00000 0x00 0x100000>,
>>> +                 <0x00 0x32400000 0x00 0x100000>,
>>> +                 <0x00 0x32800000 0x00 0x100000>;
>>> +           interrupt-names = "rx_016";
>>> +           interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
>>> +   };
>>> +
>> [..snip..]
>>
>>> +
>>> +/ {
>>> +
>>> +   gpio-keys {
>>> +           compatible = "gpio-keys";
>>> +           autorepeat;
>>> +           pinctrl-names = "default";
>>> +           pinctrl-0 = <&sw10_button_pins_default>;
>>> +
>>> +           sw10 {
>>> +                   label = "GPIO Key USER1";
>>> +                   linux,code = <BTN_0>;
>>> +                   gpios = <&main_gpio2 0 GPIO_ACTIVE_LOW>;
>>> +           };
>>> +   };
>>> +};
>>> +
>>> +&main_pmx0 {
>>> +   sw10_button_pins_default: sw10_button_pins_default {
>>> +           pinctrl-single,pins = <
>>> +                   J721E_IOPAD(0x0, PIN_INPUT, 7) /* (AC18) 
>>> EXTINTn.GPIO0_0 */
>> hmm..is this working? IIRC GPIO group should be selected along with mux mode,
>> else it will be routed to GPIO0.
> Good catch. Since many configs are not enabled in mainline kernel, I missed
> these failures.
> I enabled the configs an it is failing. I shall send the fixes separately now
> that the series is merged in next

Jan,
        What do you prefer?

Thanks and regards,
Lokesh

-- 
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/ce04ee19-d469-371e-c9b2-1e6d1d69a8b0%40ti.com.

Reply via email to