-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARM: shmobile: marzen: Reference DT implementation
Provide alternate board code for the marzen to demonstrate how DT may be used given the current state of driver device tree support. This is intended to act as a reference for mach-shmobile developers. Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
- Loading branch information
Simon Horman
committed
Mar 18, 2013
1 parent
b3425eb
commit 73d6a69
Showing
5 changed files
with
137 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Reference Device Tree Source for the Marzen board | ||
* | ||
* Copyright (C) 2013 Renesas Solutions Corp. | ||
* Copyright (C) 2013 Simon Horman | ||
* | ||
* This file is licensed under the terms of the GNU General Public License | ||
* version 2. This program is licensed "as is" without any warranty of any | ||
* kind, whether express or implied. | ||
*/ | ||
|
||
/dts-v1/; | ||
/include/ "r8a7779.dtsi" | ||
|
||
/ { | ||
model = "marzen"; | ||
compatible = "renesas,marzen-reference", "renesas,r8a7779"; | ||
|
||
chosen { | ||
bootargs = "console=ttySC2,115200 earlyprintk=sh-sci.2,115200 ignore_loglevel root=/dev/nfs ip=on"; | ||
}; | ||
|
||
memory { | ||
device_type = "memory"; | ||
reg = <0x60000000 0x40000000>; | ||
}; | ||
|
||
fixedregulator3v3: fixedregulator@0 { | ||
compatible = "regulator-fixed"; | ||
regulator-name = "fixed-3.3V"; | ||
regulator-min-microvolt = <3300000>; | ||
regulator-max-microvolt = <3300000>; | ||
regulator-boot-on; | ||
regulator-always-on; | ||
}; | ||
|
||
lan0@18000000 { | ||
compatible = "smsc,lan9220", "smsc,lan9115"; | ||
reg = <0x18000000 0x100>; | ||
phy-mode = "mii"; | ||
interrupt-parent = <&gic>; | ||
interrupts = <0 28 0x4>; | ||
reg-io-width = <4>; | ||
vddvario-supply = <&fixedregulator3v3>; | ||
vdd33a-supply = <&fixedregulator3v3>; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* | ||
* marzen board support - Reference DT implementation | ||
* | ||
* Copyright (C) 2011 Renesas Solutions Corp. | ||
* Copyright (C) 2011 Magnus Damm | ||
* Copyright (C) 2013 Simon Horman | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; version 2 of the License. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
*/ | ||
|
||
#include <linux/pinctrl/machine.h> | ||
#include <mach/r8a7779.h> | ||
#include <mach/common.h> | ||
#include <mach/irqs.h> | ||
#include <asm/irq.h> | ||
#include <asm/mach/arch.h> | ||
|
||
static const struct pinctrl_map marzen_pinctrl_map[] = { | ||
/* SCIF2 (CN18: DEBUG0) */ | ||
PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.2", "pfc-r8a7779", | ||
"scif2_data_c", "scif2"), | ||
/* SCIF4 (CN19: DEBUG1) */ | ||
PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.4", "pfc-r8a7779", | ||
"scif4_data", "scif4"), | ||
/* SDHI0 */ | ||
PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779", | ||
"sdhi0_data4", "sdhi0"), | ||
PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779", | ||
"sdhi0_ctrl", "sdhi0"), | ||
PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779", | ||
"sdhi0_cd", "sdhi0"), | ||
PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779", | ||
"sdhi0_wp", "sdhi0"), | ||
/* SMSC */ | ||
PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-r8a7779", | ||
"intc_irq1_b", "intc"), | ||
PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-r8a7779", | ||
"lbsc_ex_cs0", "lbsc"), | ||
}; | ||
|
||
static void __init marzen_init(void) | ||
{ | ||
pinctrl_register_mappings(marzen_pinctrl_map, | ||
ARRAY_SIZE(marzen_pinctrl_map)); | ||
r8a7779_pinmux_init(); | ||
|
||
r8a7779_add_standard_devices_dt(); | ||
} | ||
|
||
static const char *marzen_boards_compat_dt[] __initdata = { | ||
"renesas,marzen-reference", | ||
NULL, | ||
}; | ||
|
||
DT_MACHINE_START(MARZEN, "marzen") | ||
.smp = smp_ops(r8a7779_smp_ops), | ||
.map_io = r8a7779_map_io, | ||
.init_early = r8a7779_init_delay, | ||
.nr_irqs = NR_IRQS_LEGACY, | ||
.init_irq = r8a7779_init_irq_dt, | ||
.init_machine = marzen_init, | ||
.init_time = shmobile_timer_init, | ||
.dt_compat = marzen_boards_compat_dt, | ||
MACHINE_END |