diff mbox

[4/5] ARM: BCM5301X: Add DT for Asus RT-N18U

Message ID 1417368513-13808-4-git-send-email-zajec5@gmail.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Rafał Miłecki Nov. 30, 2014, 5:28 p.m. UTC
Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
---
 arch/arm/boot/dts/Makefile                  |  3 +-
 arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts | 78 +++++++++++++++++++++++++++++
 arch/arm/boot/dts/bcm47081.dtsi             | 26 ++++++++++
 arch/arm/mach-bcm/bcm_5301x.c               |  1 +
 4 files changed, 107 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
 create mode 100644 arch/arm/boot/dts/bcm47081.dtsi

Comments

Hauke Mehrtens Dec. 2, 2014, 11:19 p.m. UTC | #1
On 11/30/2014 06:28 PM, Rafa? Mi?ecki wrote:
> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
> ---
>  arch/arm/boot/dts/Makefile                  |  3 +-
>  arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts | 78 +++++++++++++++++++++++++++++
>  arch/arm/boot/dts/bcm47081.dtsi             | 26 ++++++++++
>  arch/arm/mach-bcm/bcm_5301x.c               |  1 +
>  4 files changed, 107 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
>  create mode 100644 arch/arm/boot/dts/bcm47081.dtsi
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 18a21d9..db51a31 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -58,7 +58,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b-plus.dtb
>  dtb-$(CONFIG_ARCH_BCM_5301X) += \
>  	bcm4708-buffalo-wzr-1750dhp.dtb \
>  	bcm4708-netgear-r6250.dtb \
> -	bcm4708-netgear-r6300-v2.dtb
> +	bcm4708-netgear-r6300-v2.dtb \
> +	bcm47081-asus-rt-n18u.dtb
>  dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb
>  dtb-$(CONFIG_ARCH_BCM_CYGNUS) += bcm911360_entphn.dtb \
>  	bcm911360k.dtb \
> diff --git a/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts b/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
> new file mode 100644
> index 0000000..c40ad39
> --- /dev/null
> +++ b/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
> @@ -0,0 +1,78 @@
> +/*
> + * Broadcom BCM470X / BCM5301X ARM platform code.
> + * DTS for Asus RT-N18U
> + *
> + * Copyright © 2014 Rafa? Mi?ecki <zajec5@gmail.com>
> + *
> + * Licensed under the GNU/GPL. See COPYING for details.
> + */
> +
> +/dts-v1/;
> +
> +#include "bcm47081.dtsi"
> +
> +/ {
> +	compatible = "asus,rt-n18u", "brcm,bcm47081";

Instead of adding bcm47081 to the core code you can do this:

compatible = "asus,rt-n18u", "brcm,bcm47081", "brcm,bcm4708";

If we later need some special handling for bcm47081 we can add this but
the old dts file will still work. This is more relevant if the dts file
is in the boot loader.

> +	model = "Asus RT-N18U (BCM47081)";
> +
> +	chosen {
> +		bootargs = "console=ttyS0,115200";
> +	};
> +
> +	memory {
> +		reg = <0x00000000 0x08000000>;
> +	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +
> +		power {
> +			label = "bcm53xx:blue:power";
> +			gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
> +			linux,default-trigger = "default-on";
> +		};
> +
> +		usb2 {
> +			label = "bcm53xx:blue:usb2";
> +			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
> +			linux,default-trigger = "default-off";
> +		};
> +
> +		wan {
> +			label = "bcm53xx:blue:wan";
> +			gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>;
> +			linux,default-trigger = "default-on";
> +		};
> +
> +		lan {
> +			label = "bcm53xx:blue:lan";
> +			gpios = <&chipcommon 9 GPIO_ACTIVE_LOW>;
> +			linux,default-trigger = "default-on";
> +		};
> +
> +		usb3 {
> +			label = "bcm53xx:blue:usb3";
> +			gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
> +			linux,default-trigger = "default-off";
> +		};
> +	};
> +
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		poll-interval = <200>;
> +
> +		restart {
> +			label = "Reset";
> +			linux,code = <KEY_RESTART>;
> +			gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>;
> +		};
> +
> +		wps {
> +			label = "WPS";
> +			linux,code = <KEY_WPS_BUTTON>;
> +			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
> +		};
> +	};
> +};
> diff --git a/arch/arm/boot/dts/bcm47081.dtsi b/arch/arm/boot/dts/bcm47081.dtsi
> new file mode 100644
> index 0000000..f720012
> --- /dev/null
> +++ b/arch/arm/boot/dts/bcm47081.dtsi

This is ok.

> @@ -0,0 +1,26 @@
> +/*
> + * Broadcom BCM470X / BCM5301X ARM platform code.
> + * DTS for BCM47081 SoC.
> + *
> + * Copyright © 2014 Rafa? Mi?ecki <zajec5@gmail.com>
> + *
> + * Licensed under the GNU/GPL. See COPYING for details.
> + */
> +
> +#include "bcm5301x.dtsi"
> +
> +/ {
> +	compatible = "brcm,bcm47081";
> +
> +	cpus {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		cpu@0 {
> +			device_type = "cpu";
> +			compatible = "arm,cortex-a9";
> +			next-level-cache = <&L2>;
> +			reg = <0x0>;
> +		};
> +	};
> +};
> diff --git a/arch/arm/mach-bcm/bcm_5301x.c b/arch/arm/mach-bcm/bcm_5301x.c
> index e9bcbdb..eb487e1 100644
> --- a/arch/arm/mach-bcm/bcm_5301x.c
> +++ b/arch/arm/mach-bcm/bcm_5301x.c
> @@ -45,6 +45,7 @@ static void __init bcm5301x_init_early(void)
>  
>  static const char __initconst *bcm5301x_dt_compat[] = {
>  	"brcm,bcm4708",
> +	"brcm,bcm47081",
>  	NULL,
>  };
>  
>
Rafał Miłecki Dec. 3, 2014, 5:40 a.m. UTC | #2
On 3 December 2014 at 00:19, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> On 11/30/2014 06:28 PM, Rafa? Mi?ecki wrote:
>> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
>> ---
>>  arch/arm/boot/dts/Makefile                  |  3 +-
>>  arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts | 78 +++++++++++++++++++++++++++++
>>  arch/arm/boot/dts/bcm47081.dtsi             | 26 ++++++++++
>>  arch/arm/mach-bcm/bcm_5301x.c               |  1 +
>>  4 files changed, 107 insertions(+), 1 deletion(-)
>>  create mode 100644 arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
>>  create mode 100644 arch/arm/boot/dts/bcm47081.dtsi
>>
>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>> index 18a21d9..db51a31 100644
>> --- a/arch/arm/boot/dts/Makefile
>> +++ b/arch/arm/boot/dts/Makefile
>> @@ -58,7 +58,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b-plus.dtb
>>  dtb-$(CONFIG_ARCH_BCM_5301X) += \
>>       bcm4708-buffalo-wzr-1750dhp.dtb \
>>       bcm4708-netgear-r6250.dtb \
>> -     bcm4708-netgear-r6300-v2.dtb
>> +     bcm4708-netgear-r6300-v2.dtb \
>> +     bcm47081-asus-rt-n18u.dtb
>>  dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb
>>  dtb-$(CONFIG_ARCH_BCM_CYGNUS) += bcm911360_entphn.dtb \
>>       bcm911360k.dtb \
>> diff --git a/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts b/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
>> new file mode 100644
>> index 0000000..c40ad39
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
>> @@ -0,0 +1,78 @@
>> +/*
>> + * Broadcom BCM470X / BCM5301X ARM platform code.
>> + * DTS for Asus RT-N18U
>> + *
>> + * Copyright © 2014 Rafa? Mi?ecki <zajec5@gmail.com>
>> + *
>> + * Licensed under the GNU/GPL. See COPYING for details.
>> + */
>> +
>> +/dts-v1/;
>> +
>> +#include "bcm47081.dtsi"
>> +
>> +/ {
>> +     compatible = "asus,rt-n18u", "brcm,bcm47081";
>
> Instead of adding bcm47081 to the core code you can do this:
>
> compatible = "asus,rt-n18u", "brcm,bcm47081", "brcm,bcm4708";
>
> If we later need some special handling for bcm47081 we can add this but
> the old dts file will still work. This is more relevant if the dts file
> is in the boot loader.

I don't get it. How should I detect there is no second CPU?
Rafał Miłecki Dec. 3, 2014, 6:01 a.m. UTC | #3
On 3 December 2014 at 06:40, Rafa? Mi?ecki <zajec5@gmail.com> wrote:
> On 3 December 2014 at 00:19, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>> On 11/30/2014 06:28 PM, Rafa? Mi?ecki wrote:
>>> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
>>> ---
>>>  arch/arm/boot/dts/Makefile                  |  3 +-
>>>  arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts | 78 +++++++++++++++++++++++++++++
>>>  arch/arm/boot/dts/bcm47081.dtsi             | 26 ++++++++++
>>>  arch/arm/mach-bcm/bcm_5301x.c               |  1 +
>>>  4 files changed, 107 insertions(+), 1 deletion(-)
>>>  create mode 100644 arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
>>>  create mode 100644 arch/arm/boot/dts/bcm47081.dtsi
>>>
>>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>>> index 18a21d9..db51a31 100644
>>> --- a/arch/arm/boot/dts/Makefile
>>> +++ b/arch/arm/boot/dts/Makefile
>>> @@ -58,7 +58,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b-plus.dtb
>>>  dtb-$(CONFIG_ARCH_BCM_5301X) += \
>>>       bcm4708-buffalo-wzr-1750dhp.dtb \
>>>       bcm4708-netgear-r6250.dtb \
>>> -     bcm4708-netgear-r6300-v2.dtb
>>> +     bcm4708-netgear-r6300-v2.dtb \
>>> +     bcm47081-asus-rt-n18u.dtb
>>>  dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb
>>>  dtb-$(CONFIG_ARCH_BCM_CYGNUS) += bcm911360_entphn.dtb \
>>>       bcm911360k.dtb \
>>> diff --git a/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts b/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
>>> new file mode 100644
>>> index 0000000..c40ad39
>>> --- /dev/null
>>> +++ b/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
>>> @@ -0,0 +1,78 @@
>>> +/*
>>> + * Broadcom BCM470X / BCM5301X ARM platform code.
>>> + * DTS for Asus RT-N18U
>>> + *
>>> + * Copyright © 2014 Rafa? Mi?ecki <zajec5@gmail.com>
>>> + *
>>> + * Licensed under the GNU/GPL. See COPYING for details.
>>> + */
>>> +
>>> +/dts-v1/;
>>> +
>>> +#include "bcm47081.dtsi"
>>> +
>>> +/ {
>>> +     compatible = "asus,rt-n18u", "brcm,bcm47081";
>>
>> Instead of adding bcm47081 to the core code you can do this:
>>
>> compatible = "asus,rt-n18u", "brcm,bcm47081", "brcm,bcm4708";
>>
>> If we later need some special handling for bcm47081 we can add this but
>> the old dts file will still work. This is more relevant if the dts file
>> is in the boot loader.
>
> I don't get it. How should I detect there is no second CPU?

Or did you mean using fact that currently we don't boot the second
CPU? I don't think we can do that. We should describe the hardware,
not drivers/arch capabilities. We shouldn't change DTS after adding
support for boooting 2nd CPU core.
Uwe Kleine-König Dec. 3, 2014, 7:50 a.m. UTC | #4
Hello Rafa?,

On Wed, Dec 03, 2014 at 07:01:42AM +0100, Rafa? Mi?ecki wrote:
> On 3 December 2014 at 06:40, Rafa? Mi?ecki <zajec5@gmail.com> wrote:
> > On 3 December 2014 at 00:19, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> >> On 11/30/2014 06:28 PM, Rafa? Mi?ecki wrote:
> >>> +     compatible = "asus,rt-n18u", "brcm,bcm47081";
> >>
> >> Instead of adding bcm47081 to the core code you can do this:
> >>
> >> compatible = "asus,rt-n18u", "brcm,bcm47081", "brcm,bcm4708";
> >>
> >> If we later need some special handling for bcm47081 we can add this but
> >> the old dts file will still work. This is more relevant if the dts file
> >> is in the boot loader.
> >
> > I don't get it. How should I detect there is no second CPU?
> 
> Or did you mean using fact that currently we don't boot the second
> CPU? I don't think we can do that. We should describe the hardware,
> not drivers/arch capabilities. We shouldn't change DTS after adding
> support for boooting 2nd CPU core.
Adding brcm,bcm4708 to the list of compatibles doesn't imply that there
is a 2nd cpu. The semantic is:

	if (kernel_knows_how_to_handle(asus,rt-n18u))
		handle(as=asus,rt-n18u);
	else if (kernel_knows_how_to_handle(brcm,bcm47081))
		handle(as=brcm,bcm47081);
	else if (kernel_knows_how_to_handle(brcm,bcm4708))
		handle(as=brcm,bcm4708);

Best regards
Uwe
Hauke Mehrtens Dec. 3, 2014, 8:34 a.m. UTC | #5
On 12/03/2014 06:40 AM, Rafa? Mi?ecki wrote:
> On 3 December 2014 at 00:19, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>> On 11/30/2014 06:28 PM, Rafa? Mi?ecki wrote:
>>> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
>>> ---
>>>  arch/arm/boot/dts/Makefile                  |  3 +-
>>>  arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts | 78 +++++++++++++++++++++++++++++
>>>  arch/arm/boot/dts/bcm47081.dtsi             | 26 ++++++++++
>>>  arch/arm/mach-bcm/bcm_5301x.c               |  1 +
>>>  4 files changed, 107 insertions(+), 1 deletion(-)
>>>  create mode 100644 arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
>>>  create mode 100644 arch/arm/boot/dts/bcm47081.dtsi
>>>
>>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>>> index 18a21d9..db51a31 100644
>>> --- a/arch/arm/boot/dts/Makefile
>>> +++ b/arch/arm/boot/dts/Makefile
>>> @@ -58,7 +58,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b-plus.dtb
>>>  dtb-$(CONFIG_ARCH_BCM_5301X) += \
>>>       bcm4708-buffalo-wzr-1750dhp.dtb \
>>>       bcm4708-netgear-r6250.dtb \
>>> -     bcm4708-netgear-r6300-v2.dtb
>>> +     bcm4708-netgear-r6300-v2.dtb \
>>> +     bcm47081-asus-rt-n18u.dtb
>>>  dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb
>>>  dtb-$(CONFIG_ARCH_BCM_CYGNUS) += bcm911360_entphn.dtb \
>>>       bcm911360k.dtb \
>>> diff --git a/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts b/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
>>> new file mode 100644
>>> index 0000000..c40ad39
>>> --- /dev/null
>>> +++ b/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
>>> @@ -0,0 +1,78 @@
>>> +/*
>>> + * Broadcom BCM470X / BCM5301X ARM platform code.
>>> + * DTS for Asus RT-N18U
>>> + *
>>> + * Copyright © 2014 Rafa? Mi?ecki <zajec5@gmail.com>
>>> + *
>>> + * Licensed under the GNU/GPL. See COPYING for details.
>>> + */
>>> +
>>> +/dts-v1/;
>>> +
>>> +#include "bcm47081.dtsi"
>>> +
>>> +/ {
>>> +     compatible = "asus,rt-n18u", "brcm,bcm47081";
>>
>> Instead of adding bcm47081 to the core code you can do this:
>>
>> compatible = "asus,rt-n18u", "brcm,bcm47081", "brcm,bcm4708";
>>
>> If we later need some special handling for bcm47081 we can add this but
>> the old dts file will still work. This is more relevant if the dts file
>> is in the boot loader.
> 
> I don't get it. How should I detect there is no second CPU?

In the SMP code we would check if (num CPUs > 1 ) then boot up other
CPUs end;
This num CPUs is fetched from the dts file and it would be checked if
that number is equal or smaller than some number in some register which
should contain the number of CPUs. We still need the stuff in the
bcm47081.dtsi file.

If you add a dts file for a device with a BCM4709 or some other SoC not
being BCM4708, you should use a similar compatible string.

Hauke
Rafał Miłecki Dec. 4, 2014, 9:12 a.m. UTC | #6
On 3 December 2014 at 06:40, Rafa? Mi?ecki <zajec5@gmail.com> wrote:
> On 3 December 2014 at 00:19, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>> On 11/30/2014 06:28 PM, Rafa? Mi?ecki wrote:
>>> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
>>> ---
>>>  arch/arm/boot/dts/Makefile                  |  3 +-
>>>  arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts | 78 +++++++++++++++++++++++++++++
>>>  arch/arm/boot/dts/bcm47081.dtsi             | 26 ++++++++++
>>>  arch/arm/mach-bcm/bcm_5301x.c               |  1 +
>>>  4 files changed, 107 insertions(+), 1 deletion(-)
>>>  create mode 100644 arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
>>>  create mode 100644 arch/arm/boot/dts/bcm47081.dtsi
>>>
>>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>>> index 18a21d9..db51a31 100644
>>> --- a/arch/arm/boot/dts/Makefile
>>> +++ b/arch/arm/boot/dts/Makefile
>>> @@ -58,7 +58,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b-plus.dtb
>>>  dtb-$(CONFIG_ARCH_BCM_5301X) += \
>>>       bcm4708-buffalo-wzr-1750dhp.dtb \
>>>       bcm4708-netgear-r6250.dtb \
>>> -     bcm4708-netgear-r6300-v2.dtb
>>> +     bcm4708-netgear-r6300-v2.dtb \
>>> +     bcm47081-asus-rt-n18u.dtb
>>>  dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb
>>>  dtb-$(CONFIG_ARCH_BCM_CYGNUS) += bcm911360_entphn.dtb \
>>>       bcm911360k.dtb \
>>> diff --git a/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts b/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
>>> new file mode 100644
>>> index 0000000..c40ad39
>>> --- /dev/null
>>> +++ b/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
>>> @@ -0,0 +1,78 @@
>>> +/*
>>> + * Broadcom BCM470X / BCM5301X ARM platform code.
>>> + * DTS for Asus RT-N18U
>>> + *
>>> + * Copyright © 2014 Rafa? Mi?ecki <zajec5@gmail.com>
>>> + *
>>> + * Licensed under the GNU/GPL. See COPYING for details.
>>> + */
>>> +
>>> +/dts-v1/;
>>> +
>>> +#include "bcm47081.dtsi"
>>> +
>>> +/ {
>>> +     compatible = "asus,rt-n18u", "brcm,bcm47081";
>>
>> Instead of adding bcm47081 to the core code you can do this:
>>
>> compatible = "asus,rt-n18u", "brcm,bcm47081", "brcm,bcm4708";
>>
>> If we later need some special handling for bcm47081 we can add this but
>> the old dts file will still work. This is more relevant if the dts file
>> is in the boot loader.
>
> I don't get it. How should I detect there is no second CPU?

Aaaah, you meant not adding *core code*, not the DTS file. I didn't
notice that in the first place. Now it's clear, thanks!
diff mbox

Patch

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 18a21d9..db51a31 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -58,7 +58,8 @@  dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b-plus.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += \
 	bcm4708-buffalo-wzr-1750dhp.dtb \
 	bcm4708-netgear-r6250.dtb \
-	bcm4708-netgear-r6300-v2.dtb
+	bcm4708-netgear-r6300-v2.dtb \
+	bcm47081-asus-rt-n18u.dtb
 dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb
 dtb-$(CONFIG_ARCH_BCM_CYGNUS) += bcm911360_entphn.dtb \
 	bcm911360k.dtb \
diff --git a/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts b/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
new file mode 100644
index 0000000..c40ad39
--- /dev/null
+++ b/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
@@ -0,0 +1,78 @@ 
+/*
+ * Broadcom BCM470X / BCM5301X ARM platform code.
+ * DTS for Asus RT-N18U
+ *
+ * Copyright © 2014 Rafa? Mi?ecki <zajec5@gmail.com>
+ *
+ * Licensed under the GNU/GPL. See COPYING for details.
+ */
+
+/dts-v1/;
+
+#include "bcm47081.dtsi"
+
+/ {
+	compatible = "asus,rt-n18u", "brcm,bcm47081";
+	model = "Asus RT-N18U (BCM47081)";
+
+	chosen {
+		bootargs = "console=ttyS0,115200";
+	};
+
+	memory {
+		reg = <0x00000000 0x08000000>;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		power {
+			label = "bcm53xx:blue:power";
+			gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "default-on";
+		};
+
+		usb2 {
+			label = "bcm53xx:blue:usb2";
+			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "default-off";
+		};
+
+		wan {
+			label = "bcm53xx:blue:wan";
+			gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "default-on";
+		};
+
+		lan {
+			label = "bcm53xx:blue:lan";
+			gpios = <&chipcommon 9 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "default-on";
+		};
+
+		usb3 {
+			label = "bcm53xx:blue:usb3";
+			gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "default-off";
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <200>;
+
+		restart {
+			label = "Reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>;
+		};
+
+		wps {
+			label = "WPS";
+			linux,code = <KEY_WPS_BUTTON>;
+			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/bcm47081.dtsi b/arch/arm/boot/dts/bcm47081.dtsi
new file mode 100644
index 0000000..f720012
--- /dev/null
+++ b/arch/arm/boot/dts/bcm47081.dtsi
@@ -0,0 +1,26 @@ 
+/*
+ * Broadcom BCM470X / BCM5301X ARM platform code.
+ * DTS for BCM47081 SoC.
+ *
+ * Copyright © 2014 Rafa? Mi?ecki <zajec5@gmail.com>
+ *
+ * Licensed under the GNU/GPL. See COPYING for details.
+ */
+
+#include "bcm5301x.dtsi"
+
+/ {
+	compatible = "brcm,bcm47081";
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a9";
+			next-level-cache = <&L2>;
+			reg = <0x0>;
+		};
+	};
+};
diff --git a/arch/arm/mach-bcm/bcm_5301x.c b/arch/arm/mach-bcm/bcm_5301x.c
index e9bcbdb..eb487e1 100644
--- a/arch/arm/mach-bcm/bcm_5301x.c
+++ b/arch/arm/mach-bcm/bcm_5301x.c
@@ -45,6 +45,7 @@  static void __init bcm5301x_init_early(void)
 
 static const char __initconst *bcm5301x_dt_compat[] = {
 	"brcm,bcm4708",
+	"brcm,bcm47081",
 	NULL,
 };