diff mbox

[2/5] ARM: BCM5301X: Add DT for Netgear R6300 V2

Message ID 1417368513-13808-2-git-send-email-zajec5@gmail.com
State New
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                     |  4 +-
 arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts | 84 ++++++++++++++++++++++++++
 2 files changed, 87 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts

Comments

Hauke Mehrtens Dec. 2, 2014, 11:15 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                     |  4 +-
>  arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts | 84 ++++++++++++++++++++++++++
>  2 files changed, 87 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 35f3e12..22bb87f 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -55,7 +55,9 @@ dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
>  dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb
>  dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
>  dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b-plus.dtb
> -dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb
> +dtb-$(CONFIG_ARCH_BCM_5301X) += \
> +	bcm4708-netgear-r6250.dtb \
> +	bcm4708-netgear-r6300-v2.dtb

This part does not apply cleanly on top of v3.18-rc1.

>  dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb
>  dtb-$(CONFIG_ARCH_BCM_CYGNUS) += bcm911360_entphn.dtb \
>  	bcm911360k.dtb \
> diff --git a/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts b/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
> new file mode 100644
> index 0000000..e18b636
> --- /dev/null
> +++ b/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
> @@ -0,0 +1,84 @@
> +/*
> + * Broadcom BCM470X / BCM5301X ARM platform code.
> + * DTS for Netgear R6300 V2
> + *
> + * Copyright © 2014 Rafał Miłecki <zajec5@gmail.com>

Is this © needed here?

> + *
> + * Licensed under the GNU/GPL. See COPYING for details.
> + */
> +
> +/dts-v1/;
> +
> +#include "bcm4708.dtsi"
> +
> +/ {
> +	compatible = "netgear,r6300v2", "brcm,bcm4708";
> +	model = "Netgear R6300 V2 (BCM4708)";
> +
> +	chosen {
> +		bootargs = "console=ttyS0,115200";
> +	};
> +
> +	memory {
> +		reg = <0x00000000 0x08000000>;
> +	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +
> +		logo {
> +			label = "bcm53xx:white:logo";
> +			gpios = <&chipcommon 1 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "default-on";
> +		};
> +
> +		power0 {
> +			label = "bcm53xx:green:power";
> +			gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
> +			linux,default-trigger = "default-off";
> +		};
> +
> +		power1 {
> +			label = "bcm53xx:amber:power";
> +			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
> +			linux,default-trigger = "default-on";
> +		};
> +
> +		usb {
> +			label = "bcm53xx:blue:usb";
> +			gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>;
> +			linux,default-trigger = "default-off";
> +		};
> +
> +		wireless {
> +			label = "bcm53xx:blue:wireless";
> +			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
> +			linux,default-trigger = "default-off";
> +		};
> +	};
> +
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		poll-interval = <200>;
> +
> +		wps {
> +			label = "WPS";
> +			linux,code = <KEY_WPS_BUTTON>;
> +			gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
> +		};
> +
> +		rfkill {
> +			label = "WiFi";
> +			linux,code = <KEY_RFKILL>;
> +			gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>;
> +		};
> +
> +		restart {
> +			label = "Reset";
> +			linux,code = <KEY_RESTART>;
> +			gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>;
> +		};
> +	};
> +};
>
Rafał Miłecki Dec. 3, 2014, 5:59 a.m. UTC | #2
On 3 December 2014 at 00:15, 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                     |  4 +-
>>  arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts | 84 ++++++++++++++++++++++++++
>>  2 files changed, 87 insertions(+), 1 deletion(-)
>>  create mode 100644 arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
>>
>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>> index 35f3e12..22bb87f 100644
>> --- a/arch/arm/boot/dts/Makefile
>> +++ b/arch/arm/boot/dts/Makefile
>> @@ -55,7 +55,9 @@ dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
>>  dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb
>>  dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
>>  dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b-plus.dtb
>> -dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb
>> +dtb-$(CONFIG_ARCH_BCM_5301X) += \
>> +     bcm4708-netgear-r6250.dtb \
>> +     bcm4708-netgear-r6300-v2.dtb
>
> This part does not apply cleanly on top of v3.18-rc1.

I think we want these changes to be merged merged into the arm-soc.git
next/dt, right? So I based my changes on that tree. This way Arnd
won't get neither: any conflicts or any unwanted stuff.


>>  dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb
>>  dtb-$(CONFIG_ARCH_BCM_CYGNUS) += bcm911360_entphn.dtb \
>>       bcm911360k.dtb \
>> diff --git a/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts b/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
>> new file mode 100644
>> index 0000000..e18b636
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
>> @@ -0,0 +1,84 @@
>> +/*
>> + * Broadcom BCM470X / BCM5301X ARM platform code.
>> + * DTS for Netgear R6300 V2
>> + *
>> + * Copyright © 2014 Rafał Miłecki <zajec5@gmail.com>
>
> Is this © needed here?

Do you mean the whole line or the "©" sign? I think we usually have
"Copyright" lines in files. I can see using "©" is much less common on
the other hand. I think the most common forms are
1) Copyright (C) <year>
2) Copyright <year>
Should I use some of them?
Btw. do you know if this documented anywhere?
Hauke Mehrtens Dec. 3, 2014, 8:40 a.m. UTC | #3
On 12/03/2014 06:59 AM, Rafał Miłecki wrote:
> On 3 December 2014 at 00:15, 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                     |  4 +-
>>>  arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts | 84 ++++++++++++++++++++++++++
>>>  2 files changed, 87 insertions(+), 1 deletion(-)
>>>  create mode 100644 arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
>>>
>>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>>> index 35f3e12..22bb87f 100644
>>> --- a/arch/arm/boot/dts/Makefile
>>> +++ b/arch/arm/boot/dts/Makefile
>>> @@ -55,7 +55,9 @@ dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
>>>  dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb
>>>  dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
>>>  dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b-plus.dtb
>>> -dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb
>>> +dtb-$(CONFIG_ARCH_BCM_5301X) += \
>>> +     bcm4708-netgear-r6250.dtb \
>>> +     bcm4708-netgear-r6300-v2.dtb
>>
>> This part does not apply cleanly on top of v3.18-rc1.
> 
> I think we want these changes to be merged merged into the arm-soc.git
> next/dt, right? So I based my changes on that tree. This way Arnd
> won't get neither: any conflicts or any unwanted stuff.

Arnd wants the changes based on -rc1, at least the last time. ;-) The
merge gets ugly if the changes are based on different versions.

>>>  dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb
>>>  dtb-$(CONFIG_ARCH_BCM_CYGNUS) += bcm911360_entphn.dtb \
>>>       bcm911360k.dtb \
>>> diff --git a/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts b/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
>>> new file mode 100644
>>> index 0000000..e18b636
>>> --- /dev/null
>>> +++ b/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
>>> @@ -0,0 +1,84 @@
>>> +/*
>>> + * Broadcom BCM470X / BCM5301X ARM platform code.
>>> + * DTS for Netgear R6300 V2
>>> + *
>>> + * Copyright © 2014 Rafał Miłecki <zajec5@gmail.com>
>>
>> Is this © needed here?
> 
> Do you mean the whole line or the "©" sign? I think we usually have
> "Copyright" lines in files. I can see using "©" is much less common on
> the other hand. I think the most common forms are
> 1) Copyright (C) <year>
> 2) Copyright <year>
> Should I use some of them?
> Btw. do you know if this documented anywhere?
> 
It was just the  "©" sign, it's usage is pretty uncommon and I think it
is not an ASCII symbol. I would like if you choose 1 or 2, what exactly
does not matter for me.

Hauke

Hauke
Arnd Bergmann Dec. 3, 2014, 10:25 a.m. UTC | #4
On Wednesday 03 December 2014 09:40:40 Hauke Mehrtens wrote:
> On 12/03/2014 06:59 AM, Rafał Miłecki wrote:
> > On 3 December 2014 at 00:15, 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                     |  4 +-
> >>>  arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts | 84 ++++++++++++++++++++++++++
> >>>  2 files changed, 87 insertions(+), 1 deletion(-)
> >>>  create mode 100644 arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
> >>>
> >>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> >>> index 35f3e12..22bb87f 100644
> >>> --- a/arch/arm/boot/dts/Makefile
> >>> +++ b/arch/arm/boot/dts/Makefile
> >>> @@ -55,7 +55,9 @@ dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
> >>>  dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb
> >>>  dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
> >>>  dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b-plus.dtb
> >>> -dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb
> >>> +dtb-$(CONFIG_ARCH_BCM_5301X) += \
> >>> +     bcm4708-netgear-r6250.dtb \
> >>> +     bcm4708-netgear-r6300-v2.dtb
> >>
> >> This part does not apply cleanly on top of v3.18-rc1.
> > 
> > I think we want these changes to be merged merged into the arm-soc.git
> > next/dt, right? So I based my changes on that tree. This way Arnd
> > won't get neither: any conflicts or any unwanted stuff.
> 
> Arnd wants the changes based on -rc1, at least the last time.  The
> merge gets ugly if the changes are based on different versions.

If you send multiple pull requests for the same release and the same
topic branch (e.g. next/dt), you can choose to base on top of -rc1
or a prior branch as you like.

You can also have a cleanup branch based on -rc1 that you send first,
and then send other patches based on top of that. This makes sense
in particular when you have patches for multiple branches (e.g. next/soc
and next/drivers) but also want to restructure your code to make it
easier to apply those.

Any patches for next/cleanup should be cosmetic only and rearrange stuff
but not do functional changes.

> >>>  dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb
> >>>  dtb-$(CONFIG_ARCH_BCM_CYGNUS) += bcm911360_entphn.dtb \
> >>>       bcm911360k.dtb \
> >>> diff --git a/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts b/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
> >>> new file mode 100644
> >>> index 0000000..e18b636
> >>> --- /dev/null
> >>> +++ b/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
> >>> @@ -0,0 +1,84 @@
> >>> +/*
> >>> + * Broadcom BCM470X / BCM5301X ARM platform code.
> >>> + * DTS for Netgear R6300 V2
> >>> + *
> >>> + * Copyright © 2014 Rafał Miłecki <zajec5@gmail.com>
> >>
> >> Is this © needed here?
> > 
> > Do you mean the whole line or the "©" sign? I think we usually have
> > "Copyright" lines in files. I can see using "©" is much less common on
> > the other hand. I think the most common forms are
> > 1) Copyright (C) <year>
> > 2) Copyright <year>
> > Should I use some of them?
> > Btw. do you know if this documented anywhere?
> > 
> It was just the  "©" sign, it's usage is pretty uncommon and I think it
> is not an ASCII symbol. I would like if you choose 1 or 2, what exactly
> does not matter for me.

If you work for a large company, ask your legal department, they may
have a strong opinion on this matter one way or another. If you don't
work for a large company, don't worry about it.

	Arnd
diff mbox

Patch

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 35f3e12..22bb87f 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -55,7 +55,9 @@  dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
 dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b-plus.dtb
-dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb
+dtb-$(CONFIG_ARCH_BCM_5301X) += \
+	bcm4708-netgear-r6250.dtb \
+	bcm4708-netgear-r6300-v2.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/bcm4708-netgear-r6300-v2.dts b/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
new file mode 100644
index 0000000..e18b636
--- /dev/null
+++ b/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
@@ -0,0 +1,84 @@ 
+/*
+ * Broadcom BCM470X / BCM5301X ARM platform code.
+ * DTS for Netgear R6300 V2
+ *
+ * Copyright © 2014 Rafał Miłecki <zajec5@gmail.com>
+ *
+ * Licensed under the GNU/GPL. See COPYING for details.
+ */
+
+/dts-v1/;
+
+#include "bcm4708.dtsi"
+
+/ {
+	compatible = "netgear,r6300v2", "brcm,bcm4708";
+	model = "Netgear R6300 V2 (BCM4708)";
+
+	chosen {
+		bootargs = "console=ttyS0,115200";
+	};
+
+	memory {
+		reg = <0x00000000 0x08000000>;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		logo {
+			label = "bcm53xx:white:logo";
+			gpios = <&chipcommon 1 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "default-on";
+		};
+
+		power0 {
+			label = "bcm53xx:green:power";
+			gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "default-off";
+		};
+
+		power1 {
+			label = "bcm53xx:amber:power";
+			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "default-on";
+		};
+
+		usb {
+			label = "bcm53xx:blue:usb";
+			gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "default-off";
+		};
+
+		wireless {
+			label = "bcm53xx:blue:wireless";
+			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "default-off";
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <200>;
+
+		wps {
+			label = "WPS";
+			linux,code = <KEY_WPS_BUTTON>;
+			gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
+		};
+
+		rfkill {
+			label = "WiFi";
+			linux,code = <KEY_RFKILL>;
+			gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>;
+		};
+
+		restart {
+			label = "Reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>;
+		};
+	};
+};