All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albert Herranz <albert_herranz@yahoo.es>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC PATCH 04/19] powerpc: wii: device tree
Date: Wed, 25 Nov 2009 19:34:24 +0100	[thread overview]
Message-ID: <4B0D78B0.502@yahoo.es> (raw)
In-Reply-To: <49436.84.105.60.153.1259171377.squirrel@gate.crashing.org>

Segher Boessenkool wrote:
>> +/memreserve/ 0x01800000 0xe800000;	/* memory hole (includes I/O area) */
> 
> Like others have said already, don't do this.  If you need
> a workaround, put it in the platform code.
> 

I'll do. Thanks.

>> +/memreserve/ 0x10000000 0x0004000;	/* DSP RAM */
> 
> This address is fixed in the DSP hardware, right?  If not,
> you shouldn't do a reserve here.
> 

AFAIK, it is hardcoded in hardware.

>> +	chosen {
>> +		/* root filesystem on 2nd partition of SD card */
>> +		bootargs = "nobats root=/dev/mmcblk0p2 rootwait udbg-immortal";
> 
> Question: why do you need/want nobats?
> 

We need nobats (or a hack in the mmu_mapin_ram() code) because of the discontiguous ram problem.

>> +	memory {
>> +		device_type = "memory";
>> +		/* MEM1 + memory hole + MEM2 - firmware/buffers area */
>> +		reg = <0x00000000 0x133e0000>;
> 
> This should be  <0 0x01800000  0x10000000 0x04000000>
> 

Ok.

> I'm not sure what at the end of MEM2 you're trying to hide,
> but if you need to hide anything, do it in the platform code
> isntead.
> 
>> +	cpus {
>> +		#cpus = <1>;
> 
> Don't use #cpus
> 

I'll remove it if it's not needed. Thanks.

>> +	/* devices contained in the hollywood chipset */
>> +	soc {
> 
> It's not a SoC, more like a bridge chip.  More to the point,
> all the devices you put under this node actually sit in the
> root domain logically/physically, so why not put them there
> instead.  You'll want a node for the generic control registers,
> if you do.
> 

So, if i use a node here, what should be the proper name for it?

>> +		#address-cells = <1>;
>> +		#size-cells = <1>;
>> +		#interrupt-cells = <1>;
>> +		model = "hollywood";
> 
> "model" isn't required here, if you don't have anything
> good to put in it, just don't use the property.
> 

I'll get rid of it.

>> +		compatible = "nintendo,hollywood";
>> +		clock-frequency = <243000000>; /* 243MHz */
> 
> What does this clock freq mean?  Hollywood has lots of
> clocks, many of them configurable.  Bus frequency is in
> the cpu node already.  The binding doesn't say what this
> is either, since you didn't write a binding :-)
> 
> Just remove it?

That's the bus frequency. If it's not needed there, I vote for dropping it.

> 
>> +		ranges = <0x0c000000 0x0c000000 0x00010000
>> +			  0x0d000000 0x0d000000 0x00010000
>> +			  0x0d040000 0x0d040000 0x00050000
>> +			  0x0d800000 0x0d800000 0x00001000
> 
> All of 0cXXXXXX and 0dXXXXXX actually.
> 
>> +			  0x133e0000 0x133e0000 0x00c20000>;
> 
> This is just part of MEM2, don't treat it special here.
> 

Ok.

>> +		video@0c002000 {
>> +			compatible = "nintendo,hollywood-video";
>> +			reg = <0x0c002000 0x100>;
>> +			interrupts = <8>;
>> +			interrupt-parent = <&PIC0>;
> 
> If you say interrupt-parent = <..> in the root node, you can
> leave it out in most of the rest of the tree.  Using the Flipper
> PIC for this sounds like a good plan.
> 

Yeah, agreed.

>> +		PIC0: pic0@0c003000 {
>> +			#interrupt-cells = <1>;
>> +			compatible = "nintendo,flipper-pic";
>> +			reg = <0x0c003000 0x8>;
> 
> This register block is bigger actually.  It's not only PIC,
> but some other bus stuff as well, dunno what to do here.
> 

Heh, you're the expert here :)

>> +			interrupt-controller;
>> +		};
>> +
>> +		resetswitch@0c003000 {
>> +			compatible = "nintendo,hollywood-resetswitch";
>> +			reg = <0x0c003000 0x4>;
> 
> That's the same address.  Don't do that.
> 
> Create a flipper-processor-interface node for the whole 3000
> block (size 100)?  You can hang the PIC as a subnode under it,
> without a "reg".
> 

Ok.

>> +		/* Team Twiizers' 'mini' firmware IPC */
>> +		mini@0d000000 {
> 
> Although mini is awesome, it isn't hardware, and doesn't
> belong in the device tree.
> 

True, now that I'm starting to understand what's supposed to be and what's supposed not to be in the device tree.

>> +			#address-cells = <1>;
>> +			#size-cells = <1>;
> 
> There are no child nodes, these are meaningless.
> 

Yeah.
In previous versions of the tree, before AHBPROT was discovered, all hardware accessed via the firmware ipc interface hanged here, though.

>> +			#interrupt-cells = <1>;
> 
> This isn't an interrupt controller.
> 

Yup, not applicable anymore.

>> +			compatible = "twiizers,starlet-mini-ipc";
>> +			reg = <0x0d000000 0x40	/* IPC */
> 
> You can get the IPC controller's address from the "main"
> hollywood device node.
> 

What about the interrupt associated to the IPC hardware?

>> +			       0x13fffffc 0x4>;	/* mini header pointer */
> 
> Put this in the platform code, it's not a hardware property.
> It's not going to change either.
> 

Ok.

>> +		serial@0d006400 {
>> +			compatible = "nintendo,hollywood-serial";
> 
> You might want to pick a more descriptive name for this,
> "serial" is usually understaood to mean "RS232".  Which
> this isn't.
> 

Nintendo calls it "Serial Interface" (SI).
Would "nintendo,hollywood-serial-interface" work here?

>> +		/* External Interface bus */
>> +		exi@0d006800 {
>> +			#address-cells = <1>;
>> +			#size-cells = <1>;
>> +			compatible = "nintendo,hollywood-exi";
>> +			reg = <0x0d006800 0x40>;
>> +			interrupts = <4>;
>> +			interrupt-parent = <&PIC0>;
>> +
>> +			USBGECKO0: usbgecko@0d006814 {
>> +				compatible = "usbgecko,usbgecko";
>> +				reg = <0x0d006814 0x14>;
>> +				virtual-reg = <0xcd006814>;
>> +			};
> 
> I don't think you should put the usbgecko in the device tree,
> it's a removable device, not everyone booting with this device
> tree blob will have a usbgecko in this EXI port.  It's easy
> to probe for as well.
> 

Ok.

>> +		ehci@0d040000 {
>> +			compatible = "nintendo,hollywood-ehci";
> 
> You might want to put the generic usb-ohci in here as well.
> Although you need bug workarounds IIRC.
> 

Yes.

>> +			reg = <0x0d040000 0x100
>> +			       0x133e0000 0x80000>; /* 512 KB */
> 
> What's this MEM2 range?  A remnant from the old mini scheme?
> 
>> +		ohci0@0d050000 {
> 
>> +		ohci1@0d060000 {
> 
>> +		sdhc0@0d070000 {
> 
>> +		sdhc1@0d080000 {
> 
> Similar.
> 

Yes. This can be removed now.

>> +		hollywood-ahbprot@0d800064 {
>> +			compatible = "nintendo,hollywood-ahbprot";
>> +			reg = <0x0d800064 0x4>;
>> +		};
> 
> There is no reason to single out this one register.  The kernel
> shouldn't care for it anyway, the firmware sets it already.
> 

As long as a recent firmware version is used, yes.

How should all these register be declared in the device tree?
Using a block of registers and declaring the block as "nintendo,hollywood-control" or something?

>> +		gpio0: hollywood-gpio@0d8000c0 {
>> +			compatible = "nintendo,hollywood-gpio";
>> +			reg = <0x0d8000c0 0x20>;
>> +			gpio-controller;
>> +			#gpio-cells = <2>;
>> +		};
>> +
>> +		gpio1: hollywood-gpio@0d8000e0 {
>> +			compatible = "nintendo,hollywood-gpio";
>> +			reg = <0x0d8000e0 0x20>;
>> +			gpio-controller;
>> +			#gpio-cells = <2>;
>> +		};
> 
> Yuck, you have to make this two nodes for the GPIO binding?
> 

Yup. Two gpio nodes for two 32 gpio words.

>> +		hollywood-resets@0d800194 {
>> +			compatible = "nintendo,hollywood-resets";
>> +			reg = <0x0d800194 0x4>;
>> +		};
> 
> Don't do a separate node.
> 

So this should be part of the "control" block?

>> +		i2c-video {
>> +			#address-cells = <1>;
>> +			#size-cells = <0>;
>> +		        compatible = "virtual,i2c-gpio";
> 
> This is not a device from a company named "virtual".  Just
> "i2c-gpio" will do.
> 
> As I said elsewhere, there should be a driver for this already,
> and a device tree binding.  Add to that if at all possible, don't
> make up something new.  Or if you do, give it a better name :-)
> 

Plese, see my previous comment on this.

>> +		        audio-video-encoder {
>> +		                compatible = "nintendo,wii-ave-rvl";
>> +		                reg = <0x70>;
> 
> audio-video-encoder@70 -- the unit address has to match the first
> entry in "reg", always.
> 
> And "wii-ave-rvl", seriously?  Just call it "wii-audio-video-encoder",
> a few extra chars don't hurt :-)
> 

Agreed too. :)

Thanks!
Albert

  reply	other threads:[~2009-11-25 18:34 UTC|newest]

Thread overview: 181+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-22 22:01 [RFC PATCH 00/19] powerpc: nintendo gamecube and wii support Albert Herranz
2009-11-22 22:01 ` [RFC PATCH 01/19] powerpc: gamecube/wii: usbgecko bootwrapper console support Albert Herranz
2009-11-22 22:01   ` [RFC PATCH 02/19] powerpc: gamecube: device tree Albert Herranz
2009-11-22 22:01     ` [RFC PATCH 03/19] powerpc: gamecube: bootwrapper bits Albert Herranz
2009-11-22 22:01       ` [RFC PATCH 04/19] powerpc: wii: device tree Albert Herranz
2009-11-22 22:01         ` [RFC PATCH 05/19] powerpc: wii: bootwrapper bits Albert Herranz
2009-11-22 22:01           ` [RFC PATCH 06/19] powerpc: gamecube/wii: introduce GAMECUBE_COMMON Albert Herranz
2009-11-22 22:01             ` [RFC PATCH 07/19] powerpc: gamecube/wii: declare as non-coherent platforms Albert Herranz
2009-11-22 22:01               ` [RFC PATCH 08/19] powerpc: gamecube/wii: do not include PCI support Albert Herranz
2009-11-22 22:01                 ` [RFC PATCH 09/19] powerpc: gamecube/wii: udbg support for usbgecko Albert Herranz
2009-11-22 22:01                   ` [RFC PATCH 10/19] powerpc: gamecube/wii: early debugging using usbgecko Albert Herranz
2009-11-22 22:01                     ` [RFC PATCH 11/19] powerpc: gamecube/wii: flipper interrupt controller support Albert Herranz
2009-11-22 22:01                       ` [RFC PATCH 12/19] powerpc: gamecube: platform support Albert Herranz
2009-11-22 22:01                         ` [RFC PATCH 13/19] powerpc: gamecube: default config Albert Herranz
2009-11-22 22:01                           ` [RFC PATCH 14/19] powerpc: allow ioremap within reserved fake ram regions Albert Herranz
2009-11-22 22:01                             ` [RFC PATCH 15/19] powerpc: broadway processor support Albert Herranz
2009-11-22 22:01                               ` [RFC PATCH 16/19] powerpc: wii: hollywood interrupt controller support Albert Herranz
2009-11-22 22:01                                 ` [RFC PATCH 17/19] powerpc: wii: bootmii starlet 'mini' firmware support Albert Herranz
2009-11-22 22:01                                   ` [RFC PATCH 18/19] powerpc: wii: platform support Albert Herranz
2009-11-22 22:01                                     ` [RFC PATCH 19/19] powerpc: wii: default config Albert Herranz
2009-11-22 23:45                                     ` [RFC PATCH 18/19] powerpc: wii: platform support Grant Likely
2009-11-23 20:21                                       ` Albert Herranz
2009-11-24 22:24                                     ` Segher Boessenkool
2009-11-25 17:58                                       ` Albert Herranz
2009-11-26 22:05                                         ` Segher Boessenkool
2009-11-22 22:48                                   ` [RFC PATCH 17/19] powerpc: wii: bootmii starlet 'mini' firmware support Arnd Bergmann
2009-11-23 19:21                                     ` Albert Herranz
2009-11-24 22:13                                   ` Segher Boessenkool
2009-11-25 17:47                                     ` Albert Herranz
2009-11-26 22:00                                       ` Segher Boessenkool
2009-11-22 23:40                                 ` [RFC PATCH 16/19] powerpc: wii: hollywood interrupt controller support Grant Likely
2009-11-23 20:18                                   ` Albert Herranz
2009-11-24 21:54                                 ` Segher Boessenkool
2009-11-25 17:27                                   ` Albert Herranz
2009-11-26  5:23                                 ` Benjamin Herrenschmidt
2009-11-26 15:42                                   ` Albert Herranz
2009-11-26 21:13                                     ` Benjamin Herrenschmidt
2009-11-26 23:03                                   ` Segher Boessenkool
2009-11-22 23:38                               ` [RFC PATCH 15/19] powerpc: broadway processor support Grant Likely
2009-11-23 20:16                                 ` Albert Herranz
2009-11-22 23:36                             ` [RFC PATCH 14/19] powerpc: allow ioremap within reserved fake ram regions Grant Likely
2009-11-23 20:16                               ` Albert Herranz
2009-11-23 20:41                                 ` Grant Likely
2009-11-23 23:45                                 ` Michael Ellerman
2009-11-24 17:09                                   ` Albert Herranz
2009-11-25  0:38                                     ` Michael Ellerman
2009-11-26  5:22                                     ` Benjamin Herrenschmidt
2009-11-26 15:35                                       ` Albert Herranz
2009-11-26 21:13                                         ` Benjamin Herrenschmidt
2009-11-22 23:34                         ` [RFC PATCH 12/19] powerpc: gamecube: platform support Grant Likely
2009-11-23 20:02                           ` Albert Herranz
2009-11-24 21:39                         ` Segher Boessenkool
2009-11-25 17:24                           ` Albert Herranz
2009-11-26 21:53                             ` Segher Boessenkool
2009-11-26 22:07                               ` Albert Herranz
2009-11-27  0:09                                 ` Segher Boessenkool
2009-11-27 21:35                                   ` Benjamin Herrenschmidt
2009-11-28  3:56                                     ` Grant Likely
2009-11-28  3:56                                       ` Grant Likely
2009-11-22 23:28                       ` [RFC PATCH 11/19] powerpc: gamecube/wii: flipper interrupt controller support Grant Likely
2009-11-23 19:59                         ` Albert Herranz
2009-11-26  5:18                         ` Benjamin Herrenschmidt
2009-11-26 15:33                           ` Albert Herranz
2009-11-26 21:12                             ` Benjamin Herrenschmidt
2009-11-26 23:00                           ` Segher Boessenkool
2009-11-26 23:38                             ` Benjamin Herrenschmidt
2009-11-24 21:30                       ` Segher Boessenkool
2009-11-25 17:13                         ` Albert Herranz
2009-11-26 21:52                           ` Segher Boessenkool
2009-11-26 22:05                             ` Albert Herranz
2009-11-27  0:06                               ` Segher Boessenkool
2009-11-27 12:17                                 ` Segher Boessenkool
2009-11-27 17:27                                   ` Albert Herranz
2009-11-27 21:34                                     ` Benjamin Herrenschmidt
2009-11-28  2:04                                       ` Segher Boessenkool
2009-11-28  2:26                                         ` Benjamin Herrenschmidt
2009-11-26  5:18                       ` Benjamin Herrenschmidt
2009-11-26 15:30                         ` Albert Herranz
2009-11-26 21:10                           ` Benjamin Herrenschmidt
2009-11-22 22:27                     ` [RFC PATCH 10/19] powerpc: gamecube/wii: early debugging using usbgecko Arnd Bergmann
2009-11-23 19:10                       ` Albert Herranz
2009-11-23 22:13                         ` Arnd Bergmann
2009-11-26  5:14                       ` Benjamin Herrenschmidt
2009-11-26 22:54                         ` Segher Boessenkool
2009-11-26 23:27                           ` Benjamin Herrenschmidt
2009-11-24  0:54                     ` Segher Boessenkool
2009-11-24 18:19                       ` Albert Herranz
2009-11-22 23:22                   ` [RFC PATCH 09/19] powerpc: gamecube/wii: udbg support for usbgecko Grant Likely
2009-11-24  0:49                   ` Segher Boessenkool
2009-11-24 18:08                     ` Albert Herranz
2009-11-24 21:19                       ` Segher Boessenkool
2009-11-25 17:07                         ` Albert Herranz
2009-11-26  5:12                   ` Benjamin Herrenschmidt
2009-11-26 15:28                     ` Albert Herranz
2009-11-26 21:02                       ` Benjamin Herrenschmidt
2009-11-26 23:12                       ` Segher Boessenkool
2009-11-22 23:21                 ` [RFC PATCH 08/19] powerpc: gamecube/wii: do not include PCI support Grant Likely
2009-11-26  5:10                   ` Benjamin Herrenschmidt
2009-11-22 22:20               ` [RFC PATCH 07/19] powerpc: gamecube/wii: declare as non-coherent platforms Arnd Bergmann
2009-11-23 19:06                 ` Albert Herranz
2009-11-26  5:09               ` Benjamin Herrenschmidt
2009-11-22 23:20             ` [RFC PATCH 06/19] powerpc: gamecube/wii: introduce GAMECUBE_COMMON Grant Likely
2009-11-23 19:56               ` Albert Herranz
2009-11-24  0:35             ` Segher Boessenkool
2009-11-24 18:03               ` Albert Herranz
2009-11-24 21:15                 ` Segher Boessenkool
2009-11-24 22:33                   ` Arnd Bergmann
2009-11-25 17:06                   ` Albert Herranz
2009-11-26  5:08                 ` Benjamin Herrenschmidt
2009-11-26 15:22                   ` Albert Herranz
2009-11-27 12:12                   ` Segher Boessenkool
2009-11-22 23:19           ` [RFC PATCH 05/19] powerpc: wii: bootwrapper bits Grant Likely
2009-11-24  0:33           ` Segher Boessenkool
2009-11-24 17:56             ` Albert Herranz
2009-11-24 21:13               ` Segher Boessenkool
2009-11-22 23:18         ` [RFC PATCH 04/19] powerpc: wii: device tree Grant Likely
2009-11-23 19:54           ` Albert Herranz
2009-11-23 20:36             ` Grant Likely
2009-11-23 21:55               ` Albert Herranz
2009-11-25 16:57             ` Segher Boessenkool
2009-11-25 18:09               ` Albert Herranz
2009-11-25 17:49         ` Segher Boessenkool
2009-11-25 18:34           ` Albert Herranz [this message]
2009-11-26  4:58             ` Benjamin Herrenschmidt
2009-11-26 15:19               ` Albert Herranz
2009-11-26  4:51           ` Benjamin Herrenschmidt
2009-11-26 15:18             ` Albert Herranz
2009-11-26 21:01               ` Benjamin Herrenschmidt
2009-11-26 21:38                 ` Albert Herranz
2009-11-26 22:37                   ` Benjamin Herrenschmidt
2009-11-27  0:16                     ` Segher Boessenkool
2009-11-27  0:15                       ` Benjamin Herrenschmidt
2009-11-26 23:25                 ` Segher Boessenkool
2009-11-26 22:50             ` Segher Boessenkool
2009-11-26 23:02               ` Albert Herranz
2009-11-26  4:45         ` Benjamin Herrenschmidt
2009-11-26 15:09           ` Albert Herranz
2009-11-26 20:48             ` Benjamin Herrenschmidt
2009-11-26 21:20               ` Albert Herranz
2009-11-26 23:17               ` Segher Boessenkool
2009-11-26 22:45           ` Segher Boessenkool
2009-11-22 23:11       ` [RFC PATCH 03/19] powerpc: gamecube: bootwrapper bits Grant Likely
2009-11-24  0:08       ` Segher Boessenkool
2009-11-24 17:38         ` Albert Herranz
2009-11-24 21:00           ` Segher Boessenkool
2009-11-24 23:45             ` Albert Herranz
2009-11-25 16:53               ` Segher Boessenkool
2009-11-26  4:36             ` Benjamin Herrenschmidt
2009-11-26  8:17               ` Gabriel Paubert
2009-11-26  8:46                 ` Benjamin Herrenschmidt
2009-11-26 23:06                 ` Segher Boessenkool
2009-11-26  4:35           ` Benjamin Herrenschmidt
2009-11-26 22:23             ` Segher Boessenkool
2009-11-22 23:02     ` [RFC PATCH 02/19] powerpc: gamecube: device tree Grant Likely
2009-11-23 19:44       ` Albert Herranz
2009-11-23 20:19         ` Grant Likely
2009-11-23 20:25           ` Albert Herranz
2009-11-24 22:53           ` Segher Boessenkool
2009-11-26  4:23           ` Benjamin Herrenschmidt
2009-11-27 12:09             ` Segher Boessenkool
2009-11-24 22:36       ` Segher Boessenkool
2009-11-26  4:23         ` Benjamin Herrenschmidt
2009-11-26 22:15           ` Segher Boessenkool
2009-11-26 22:38             ` Benjamin Herrenschmidt
2009-11-27  0:18               ` Segher Boessenkool
2009-11-26  4:21       ` Benjamin Herrenschmidt
2009-11-26  4:38         ` Grant Likely
2009-11-26  5:29           ` Benjamin Herrenschmidt
2009-11-26  5:51             ` Grant Likely
2009-11-26 22:30         ` Segher Boessenkool
2009-11-25 18:00     ` Segher Boessenkool
2009-11-25 18:43       ` Albert Herranz
2009-11-27 12:07         ` Segher Boessenkool
2009-11-26  4:27       ` Benjamin Herrenschmidt
2009-11-26 22:19         ` Segher Boessenkool
2009-11-22 22:50   ` [RFC PATCH 01/19] powerpc: gamecube/wii: usbgecko bootwrapper console support Grant Likely
2009-11-26  4:12   ` Benjamin Herrenschmidt
2009-11-22 22:48 ` [RFC PATCH 00/19] powerpc: nintendo gamecube and wii support Grant Likely
2009-11-22 22:49 ` Arnd Bergmann
2009-11-23 19:22   ` Albert Herranz
2009-11-23  5:13 ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B0D78B0.502@yahoo.es \
    --to=albert_herranz@yahoo.es \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=segher@kernel.crashing.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.