Re: [PATCH 1/5] dt-bindings: virtio: mmio: Add support for device subnode

2021-07-19 Thread Viresh Kumar
On 14-07-21, 23:07, Arnd Bergmann wrote: > On Wed, Jul 14, 2021 at 5:43 PM Rob Herring wrote: > > I guess it comes down to is 'virtio,mmio' providing a bus or is it > > just a device? I guess a bus (so 2 nodes) does make sense here. > > 'virtio,mmio' defines how you access/discover the virtio

Re: [PATCH 1/5] dt-bindings: virtio: mmio: Add support for device subnode

2021-07-14 Thread Viresh Kumar
On 14-07-21, 07:56, Viresh Kumar wrote: > I agree that even if the device is discoverable at runtime, we should > still have some sort of stuff in DT to distinguish the devices, and > "virtio,deviceDID" sounds good enough for that, considering that we > already do it for USB, etc. > > And I am

Re: [PATCH 1/5] dt-bindings: virtio: mmio: Add support for device subnode

2021-07-14 Thread Jean-Philippe Brucker
On Tue, Jul 13, 2021 at 10:34:03PM +0200, Arnd Bergmann wrote: > > > Is it going to be a problem if two devices in kernel use the same > > > of_node ? > > > > There shouldn't be. We have nodes be multiple providers (e.g clocks > > and resets) already. > > I think this would be a little different,

Re: [PATCH 1/5] dt-bindings: virtio: mmio: Add support for device subnode

2021-07-13 Thread Viresh Kumar
On 13-07-21, 14:32, Arnd Bergmann wrote: > On Tue, Jul 13, 2021 at 12:51 PM Viresh Kumar wrote: > > > + > > +virtio@3200 { > > +compatible = "virtio,mmio"; > > +reg = <0x3200 0x100>; > > +interrupts = <43>; > > + > > +#address-cells = <1>; > > +

Re: [PATCH 1/5] dt-bindings: virtio: mmio: Add support for device subnode

2021-07-13 Thread Viresh Kumar
On 13-07-21, 22:34, Arnd Bergmann wrote: > On Tue, Jul 13, 2021 at 9:35 PM Rob Herring wrote: > > There shouldn't be. We have nodes be multiple providers (e.g clocks > > and resets) already. > > I think this would be a little different, but it can still work. There is in > fact already some

Re: [PATCH 1/5] dt-bindings: virtio: mmio: Add support for device subnode

2021-07-13 Thread Viresh Kumar
On 13-07-21, 13:34, Rob Herring wrote: > On Tue, Jul 13, 2021 at 9:19 AM Viresh Kumar wrote: > > We already do this for linux-event-codes.h and so I thought it is the > > right way of doing it :) > > Humm, maybe it's okay. Please double check then... > > > Else we can create a new copy, which

Re: [PATCH 1/5] dt-bindings: virtio: mmio: Add support for device subnode

2021-07-13 Thread Viresh Kumar
On 13-07-21, 08:43, Rob Herring wrote: > On Tue, Jul 13, 2021 at 4:50 AM Viresh Kumar wrote: > > > > Allow virtio,mmio nodes to contain device specific subnodes. Since each > > virtio,mmio node can represent a single virtio device, each virtio node > > is allowed to contain a maximum of one

[PATCH 1/5] dt-bindings: virtio: mmio: Add support for device subnode

2021-07-13 Thread Viresh Kumar
Allow virtio,mmio nodes to contain device specific subnodes. Since each virtio,mmio node can represent a single virtio device, each virtio node is allowed to contain a maximum of one device specific subnode. The device subnode must have the "reg" property, and its value must match the virtio