All of lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] ARM: CSR: Adding CSR SiRFprimaII board support
Date: Wed, 6 Jul 2011 13:41:38 +0200	[thread overview]
Message-ID: <201107061341.38591.arnd@arndb.de> (raw)
In-Reply-To: <1309945678-18813-2-git-send-email-bs14@csr.com>

On Wednesday 06 July 2011, Barry Song wrote:
> From: Binghua Duan <binghua.duan@csr.com>
> 
> SiRFprimaII is the latest generation application processor from CSR?s
> Multifunction SoC product family. Designed around an ARM cortex A9 core,
> high-speed memory bus, advanced 3D accelerator and full-HD multi-format
> video decoder, SiRFprimaII is able to meet the needs of complicated
> applications for modern multifunction devices that require heavy concurrent
> applications and fluid user experience. Integrated with GPS baseband,
> analog and PMU, this new platform is designed to provide a cost effective
> solution for Automotive and Consumer markets.
> 
> This patch adds the basic support for this SoC and EVB board based on device
> tree. It is following the ZYNQ of Grant Likely in some degree.
> 
> Signed-off-by: Binghua Duan <Binghua.Duan@csr.com>
> Signed-off-by: Rongjun Ying <Rongjun.Ying@csr.com>
> Signed-off-by: Zhiwu Song <Zhiwu.Song@csr.com>
> Signed-off-by: Yuping Luo <Yuping.Luo@csr.com>
> Signed-off-by: Bin Shi <Bin.Shi@csr.com>
> Signed-off-by: Huayi Li <Huayi.Li@csr.com>
> Signed-off-by: Barry Song <Baohua.Song@csr.com>

Reviewed-by: Arnd Bergmann <arnd@arndb.de>

I think this is good for 3.1, but there are still a few things about
the device tree file could be improved.

> +	axi {
> +		compatible = "simple-bus";
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		ranges = <0x40000000 0x40000000 0x80000000>;
> +
> +		sirfsoc-iobus {
> +			compatible = "simple-bus";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			ranges = <0x40000000 0x40000000 0x80000000>;
> +
> +			l2-cache-controller at 0x80040000 {
> +				compatible = "arm,pl310-cache";
> +				reg = <0x80040000 0x1000>;
> +				interrupts = <59>;
> +			};
> +
> +			intc: interrupt-controller at 0x80020000 {
> +				#interrupt-cells = <1>;
> +				interrupt-controller;
> +				compatible = "sirf,prima2-intc";
> +				reg = <0x80020000 0x1000>;
> +			};
> +
> +                     sys-iobg {
> +                             compatible = "simple-bus";
> +                             #address-cells = <1>;
> +                             #size-cells = <1>;
> +                             ranges = <0x88000000 0x88000000 0x40000>;
> +
> +                             clock-controller at 0x88000000 {
> +                                     compatible = "sirf,prima2-clkc";
> +                                     reg = <0x88000000 0x1000>;
> +                                     interrupts = <3>;
> +                             };


The axi bus and the sirfsoc-iobus seem to be identical in their scope,
so it's probably enough to model one of them.

I would normally recommend defining the ranges so that addresses are local
to the respective bus, like

	axi {
		ranges = <0 0x40000000 0x80000000>;

		sys-iobg {
			ranges = <0 0x48000000 0x40000>;
                        clock-controller at 0x88000000 {
                               compatible = "sirf,prima2-clkc";
                               reg = <0 0x1000>;
			}

                        reset-controller at 0x88010000 {
                               compatible = "sirf,prima2-rstc";
                               reg = <0x10000 0x1000>;
                        };
		}
	}


> +			disp-iobg {
> +				compatible = "simple-bus";
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +				ranges = <0x90010000 0x90010000 0x30000>;
> +
> +				display at 0x90010000 {
> +					compatible = "sirf,prima2-lcd";
> +					reg = <0x90010000 0x20000>;
> +					interrupts = <30>;
> +				};
> +
> +				vpp at 0x90020000 {
> +					compatible = "sirf,prima2-vpp";
> +					reg = <0x90020000 0x10000>;
> +					interrupts = <31>;
> +				};
> +			};
> +
> +			graphics-iobg {
> +				compatible = "simple-bus";
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +				ranges = <0x98000000 0x98000000 0x8000000>;
> +
> +				graphics at 0x98000000 {
> +					compatible = "sirf,prima2-graphics";
> +					reg = <0x98000000 0x8000000>;
> +					interrupts = <6>;
> +				};
> +			};

Are the display and graphics units CSR developments? If the GPU is
in fact licensed from someone else (powervr, arm, ...), you should
probably list the actual name of the device.

> +			multimedia-iobg {
> +				compatible = "simple-bus";
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +				ranges = <0xa0000000 0xa0000000 0x8000000>;
> +
> +				multimedia at 0xa0000000 {
> +					compatible = "sirf,prima2-multimedia";
> +					reg = <0xa0000000 0x8000000>;
> +					interrupts = <5>;
> +				};
> +			};

"multimedia" sounds like a too generic term. What does this do?

> +				uart0: uart at 0xb0050000 {
> +					cell-index = <0>;
> +					compatible = "sirf,prima2-uart";
> +					reg = <0xb0050000 0x10000>;
> +					interrupts = <17>;
> +				};
> +
> +	 			uart1: uart at 0xb0060000 {
> +					cell-index = <1>;
> +					compatible = "sirf,prima2-uart";
> +					reg = <0xb0060000 0x10000>;
> +					interrupts = <18>;
> +				};
> +
> +	 			uart2: uart at 0xb0070000 {
> +					cell-index = <2>;
> +					compatible = "sirf,prima2-uart";
> +					reg = <0xb0070000 0x10000>;
> +					interrupts = <19>;
> +				};

Are these proprietary uarts, or are they compatible to 8250 and the
like? You might want to set a clock-frequency property as of_serial.c
uses.

> +			rtc-iobg {
> +				compatible = "sirf,prima2-rtciobg", "simple-bus";
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +				reg = <0x80030000 0x10000>;
> +
> +				gpsrtc at 0x1000 {
> +					compatible = "sirf,prima2-gpsrtc";
> +					reg = <0x1000 0x1000>;
> +					interrupts = <55 56 57>;
> +				};
> +
> +				sysrtc at 0x2000 {
> +					compatible = "sirf,prima2-sysrtc";
> +					reg = <0x2000 0x1000>;
> +					interrupts = <52 53 54>;
> +				};
> +
> +				pwrc at 0x3000 {
> +					compatible = "sirf,prima2-pwrc";
> +					reg = <0x3000 0x1000>;
> +					interrupts = <32>;
> +				};
> +			};

Are these rtc implementations related? From the register layout, I would
guess that they are supposed to be used by the same driver, so it's
probably a good idea to add a "compatible" property with a common name
for all three.

> +			uus-iobg {
> +				compatible = "simple-bus";
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +				ranges = <0xb8000000 0xb8000000 0x40000>;
> +
> +	 			usb0: usb at 0xb00E0000 {
> +					compatible = "sirf,prima2-usb";
> +					reg = <0xb8000000 0x10000>;
> +					interrupts = <10>;
> +				};
> +
> +	 			usb1: usb at 0xb00f0000 {
> +					compatible = "sirf,prima2-usb";
> +					reg = <0xb8010000 0x10000>;
> +					interrupts = <11>;
> +				};

Is the usb implementation compatible to an existing one? Many SoCs
use one of ehci, ohci or musb. If that's the case, you should look
at the respective bindings.

> +				sata at 0xb00f0000 {
> +					compatible = "sirf,prima2-sata";
> +					reg = <0xb8020000 0x10000>;
> +					interrupts = <37>;
> +				};

Same thing here. Most sata controllers are compatible to some
standard implementation.

> +				security at 0xb00f0000 {
> +					compatible = "sirf,prima2-security";
> +					reg = <0xb8030000 0x10000>;
> +					interrupts = <42>;
> +				};
> +			};
> +		};
> +	};
> +};

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Barry Song <bs14-kQvG35nSl+M@public.gmane.org>
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
	Bin Shi <Bin.Shi-kQvG35nSl+M@public.gmane.org>,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	workgroup.linux-kQvG35nSl+M@public.gmane.org,
	Zhiwu Song <Zhiwu.Song-kQvG35nSl+M@public.gmane.org>,
	Rongjun Ying <Rongjun.Ying-kQvG35nSl+M@public.gmane.org>,
	Binghua Duan <binghua.duan-kQvG35nSl+M@public.gmane.org>,
	Barry Song <Baohua.Song-kQvG35nSl+M@public.gmane.org>,
	tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org,
	Yuping Luo <Yuping.Luo-kQvG35nSl+M@public.gmane.org>,
	Huayi Li <Huayi.Li-kQvG35nSl+M@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 1/3] ARM: CSR: Adding CSR SiRFprimaII board support
Date: Wed, 6 Jul 2011 13:41:38 +0200	[thread overview]
Message-ID: <201107061341.38591.arnd@arndb.de> (raw)
In-Reply-To: <1309945678-18813-2-git-send-email-bs14-kQvG35nSl+M@public.gmane.org>

On Wednesday 06 July 2011, Barry Song wrote:
> From: Binghua Duan <binghua.duan@csr.com>
> 
> SiRFprimaII is the latest generation application processor from CSR’s
> Multifunction SoC product family. Designed around an ARM cortex A9 core,
> high-speed memory bus, advanced 3D accelerator and full-HD multi-format
> video decoder, SiRFprimaII is able to meet the needs of complicated
> applications for modern multifunction devices that require heavy concurrent
> applications and fluid user experience. Integrated with GPS baseband,
> analog and PMU, this new platform is designed to provide a cost effective
> solution for Automotive and Consumer markets.
> 
> This patch adds the basic support for this SoC and EVB board based on device
> tree. It is following the ZYNQ of Grant Likely in some degree.
> 
> Signed-off-by: Binghua Duan <Binghua.Duan@csr.com>
> Signed-off-by: Rongjun Ying <Rongjun.Ying@csr.com>
> Signed-off-by: Zhiwu Song <Zhiwu.Song@csr.com>
> Signed-off-by: Yuping Luo <Yuping.Luo@csr.com>
> Signed-off-by: Bin Shi <Bin.Shi@csr.com>
> Signed-off-by: Huayi Li <Huayi.Li@csr.com>
> Signed-off-by: Barry Song <Baohua.Song@csr.com>

Reviewed-by: Arnd Bergmann <arnd@arndb.de>

I think this is good for 3.1, but there are still a few things about
the device tree file could be improved.

> +	axi {
> +		compatible = "simple-bus";
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		ranges = <0x40000000 0x40000000 0x80000000>;
> +
> +		sirfsoc-iobus {
> +			compatible = "simple-bus";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			ranges = <0x40000000 0x40000000 0x80000000>;
> +
> +			l2-cache-controller@0x80040000 {
> +				compatible = "arm,pl310-cache";
> +				reg = <0x80040000 0x1000>;
> +				interrupts = <59>;
> +			};
> +
> +			intc: interrupt-controller@0x80020000 {
> +				#interrupt-cells = <1>;
> +				interrupt-controller;
> +				compatible = "sirf,prima2-intc";
> +				reg = <0x80020000 0x1000>;
> +			};
> +
> +                     sys-iobg {
> +                             compatible = "simple-bus";
> +                             #address-cells = <1>;
> +                             #size-cells = <1>;
> +                             ranges = <0x88000000 0x88000000 0x40000>;
> +
> +                             clock-controller@0x88000000 {
> +                                     compatible = "sirf,prima2-clkc";
> +                                     reg = <0x88000000 0x1000>;
> +                                     interrupts = <3>;
> +                             };


The axi bus and the sirfsoc-iobus seem to be identical in their scope,
so it's probably enough to model one of them.

I would normally recommend defining the ranges so that addresses are local
to the respective bus, like

	axi {
		ranges = <0 0x40000000 0x80000000>;

		sys-iobg {
			ranges = <0 0x48000000 0x40000>;
                        clock-controller@0x88000000 {
                               compatible = "sirf,prima2-clkc";
                               reg = <0 0x1000>;
			}

                        reset-controller@0x88010000 {
                               compatible = "sirf,prima2-rstc";
                               reg = <0x10000 0x1000>;
                        };
		}
	}


> +			disp-iobg {
> +				compatible = "simple-bus";
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +				ranges = <0x90010000 0x90010000 0x30000>;
> +
> +				display@0x90010000 {
> +					compatible = "sirf,prima2-lcd";
> +					reg = <0x90010000 0x20000>;
> +					interrupts = <30>;
> +				};
> +
> +				vpp@0x90020000 {
> +					compatible = "sirf,prima2-vpp";
> +					reg = <0x90020000 0x10000>;
> +					interrupts = <31>;
> +				};
> +			};
> +
> +			graphics-iobg {
> +				compatible = "simple-bus";
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +				ranges = <0x98000000 0x98000000 0x8000000>;
> +
> +				graphics@0x98000000 {
> +					compatible = "sirf,prima2-graphics";
> +					reg = <0x98000000 0x8000000>;
> +					interrupts = <6>;
> +				};
> +			};

Are the display and graphics units CSR developments? If the GPU is
in fact licensed from someone else (powervr, arm, ...), you should
probably list the actual name of the device.

> +			multimedia-iobg {
> +				compatible = "simple-bus";
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +				ranges = <0xa0000000 0xa0000000 0x8000000>;
> +
> +				multimedia@0xa0000000 {
> +					compatible = "sirf,prima2-multimedia";
> +					reg = <0xa0000000 0x8000000>;
> +					interrupts = <5>;
> +				};
> +			};

"multimedia" sounds like a too generic term. What does this do?

> +				uart0: uart@0xb0050000 {
> +					cell-index = <0>;
> +					compatible = "sirf,prima2-uart";
> +					reg = <0xb0050000 0x10000>;
> +					interrupts = <17>;
> +				};
> +
> +	 			uart1: uart@0xb0060000 {
> +					cell-index = <1>;
> +					compatible = "sirf,prima2-uart";
> +					reg = <0xb0060000 0x10000>;
> +					interrupts = <18>;
> +				};
> +
> +	 			uart2: uart@0xb0070000 {
> +					cell-index = <2>;
> +					compatible = "sirf,prima2-uart";
> +					reg = <0xb0070000 0x10000>;
> +					interrupts = <19>;
> +				};

Are these proprietary uarts, or are they compatible to 8250 and the
like? You might want to set a clock-frequency property as of_serial.c
uses.

> +			rtc-iobg {
> +				compatible = "sirf,prima2-rtciobg", "simple-bus";
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +				reg = <0x80030000 0x10000>;
> +
> +				gpsrtc@0x1000 {
> +					compatible = "sirf,prima2-gpsrtc";
> +					reg = <0x1000 0x1000>;
> +					interrupts = <55 56 57>;
> +				};
> +
> +				sysrtc@0x2000 {
> +					compatible = "sirf,prima2-sysrtc";
> +					reg = <0x2000 0x1000>;
> +					interrupts = <52 53 54>;
> +				};
> +
> +				pwrc@0x3000 {
> +					compatible = "sirf,prima2-pwrc";
> +					reg = <0x3000 0x1000>;
> +					interrupts = <32>;
> +				};
> +			};

Are these rtc implementations related? From the register layout, I would
guess that they are supposed to be used by the same driver, so it's
probably a good idea to add a "compatible" property with a common name
for all three.

> +			uus-iobg {
> +				compatible = "simple-bus";
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +				ranges = <0xb8000000 0xb8000000 0x40000>;
> +
> +	 			usb0: usb@0xb00E0000 {
> +					compatible = "sirf,prima2-usb";
> +					reg = <0xb8000000 0x10000>;
> +					interrupts = <10>;
> +				};
> +
> +	 			usb1: usb@0xb00f0000 {
> +					compatible = "sirf,prima2-usb";
> +					reg = <0xb8010000 0x10000>;
> +					interrupts = <11>;
> +				};

Is the usb implementation compatible to an existing one? Many SoCs
use one of ehci, ohci or musb. If that's the case, you should look
at the respective bindings.

> +				sata@0xb00f0000 {
> +					compatible = "sirf,prima2-sata";
> +					reg = <0xb8020000 0x10000>;
> +					interrupts = <37>;
> +				};

Same thing here. Most sata controllers are compatible to some
standard implementation.

> +				security@0xb00f0000 {
> +					compatible = "sirf,prima2-security";
> +					reg = <0xb8030000 0x10000>;
> +					interrupts = <42>;
> +				};
> +			};
> +		};
> +	};
> +};

	Arnd
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

  parent reply	other threads:[~2011-07-06 11:41 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-06  9:47 [PATCH 0/3] ARM: CSR: Adding CSR SiRFprimaII platform Barry Song
2011-07-06  9:47 ` [PATCH 1/3] ARM: CSR: Adding CSR SiRFprimaII board support Barry Song
2011-07-06 11:04   ` Russell King - ARM Linux
2011-07-06 15:16     ` Barry Song
2011-07-06 11:41   ` Arnd Bergmann [this message]
2011-07-06 11:41     ` Arnd Bergmann
2011-07-06 12:22     ` Barry Song
2011-07-06 12:22       ` Barry Song
2011-07-06 13:44       ` Arnd Bergmann
2011-07-06 13:44         ` Arnd Bergmann
2011-07-07  2:26         ` Barry Song
2011-07-07  2:26           ` Barry Song
2011-07-06 12:25   ` Russell King - ARM Linux
2011-07-06 12:42     ` Arnd Bergmann
2011-07-06 13:09       ` Russell King - ARM Linux
2011-07-06 14:41         ` Arnd Bergmann
2011-07-06 15:25           ` Russell King - ARM Linux
2011-07-06 16:13             ` Arnd Bergmann
2011-07-06 13:29       ` Russell King - ARM Linux
2011-07-06 14:51       ` Russell King - ARM Linux
2011-07-06 15:03         ` Arnd Bergmann
2011-07-06 16:35       ` Nicolas Pitre
2011-07-06 17:42         ` Russell King - ARM Linux
2011-07-06 17:59           ` Arnd Bergmann
2011-07-06 18:11             ` Nicolas Pitre
2011-07-06 18:15               ` Russell King - ARM Linux
2011-07-06 18:35                 ` Nicolas Pitre
2011-07-06 18:09           ` Nicolas Pitre
2011-07-07 11:23         ` Arnd Bergmann
2011-07-06 16:09     ` Barry Song
2011-07-06 19:10       ` Russell King - ARM Linux
2011-07-06 20:31         ` Arnd Bergmann
2011-07-06 20:50           ` Russell King - ARM Linux
2011-07-06 21:21             ` Arnd Bergmann
2011-07-07  1:20           ` Barry Song
2011-07-07 11:43             ` Arnd Bergmann
2011-07-07 12:37               ` Russell King - ARM Linux
2011-07-07 13:21                 ` Arnd Bergmann
2011-07-07 14:12                   ` Russell King - ARM Linux
2011-07-08  2:18                     ` Barry Song
2011-07-08  9:03                       ` Russell King - ARM Linux
2011-07-08 13:38                         ` Nicolas Pitre
2011-07-08 16:27                           ` Russell King - ARM Linux
2011-07-08 18:09                             ` Nicolas Pitre
2011-07-08 21:37                               ` Arnd Bergmann
2011-07-21  0:03                                 ` dynamic VMALLOC_END, was " Nicolas Pitre
2011-07-06  9:47 ` [PATCH 2/3] ARM: CSR: mapping early DEBUG_LL uart Barry Song
2011-07-06 11:05   ` Russell King - ARM Linux
2011-07-06 11:53     ` Barry Song
2011-07-06 11:56       ` Barry Song
2011-07-06 12:10       ` Russell King - ARM Linux
2011-07-06 12:29         ` Barry Song
2011-07-06 11:15   ` Arnd Bergmann
2011-07-06  9:47 ` [PATCH 3/3] ARM: CSR: initilized L2 cache Barry Song
2011-07-06 11:14   ` Arnd Bergmann
     [not found] <e66253df-b34a-4c32-bddf-31b1332c716c@VA3EHSMHS031.ehs.local>
2011-07-07 13:48 ` [PATCH 1/3] ARM: CSR: Adding CSR SiRFprimaII board support johnlinn at comcast.net

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=201107061341.38591.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.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.