2015-04-21 12:05:39

by Gaël PORTAY

[permalink] [raw]
Subject: [PATCH v2 0/7] ARM: at91/dt: kizbox: update and rename to at91-kizbox

*** BLURB HERE ***

Gaël PORTAY (7):
ARM: at91/dt: kizbox: rename to at91-kizbox
ARM: at91/dt: at91-kizbox: sanitize file
ARM: at91/dt: at91-kizbox: user proper serial uart
ARM: at91/dt: at91-kizbox: gpio-keys related changes
ARM: at91/dt: at91-kizbox: leds related changes
ARM: at91/dt: at91-kizbox: re-size nand partitions
ARM: at91/dt: at91-kizbox: update chosen node

arch/arm/boot/dts/Makefile | 2 +-
arch/arm/boot/dts/at91-kizbox.dts | 159 ++++++++++++++++++++++++++++++++++++++
arch/arm/boot/dts/kizbox.dts | 150 -----------------------------------
3 files changed, 160 insertions(+), 151 deletions(-)
create mode 100644 arch/arm/boot/dts/at91-kizbox.dts
delete mode 100644 arch/arm/boot/dts/kizbox.dts

--
1.9.1


2015-04-21 12:05:37

by Gaël PORTAY

[permalink] [raw]
Subject: [PATCH v2 1/7] ARM: at91/dt: kizbox: rename to at91-kizbox

Rename to match AT91 naming convention.

Signed-off-by: Gaël PORTAY <[email protected]>
---
arch/arm/boot/dts/Makefile | 2 +-
arch/arm/boot/dts/{kizbox.dts => at91-kizbox.dts} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename arch/arm/boot/dts/{kizbox.dts => at91-kizbox.dts} (100%)

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index d2b559d..32568fb 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -18,9 +18,9 @@ dtb-$(CONFIG_SOC_SAM_V4_V5) += \
tny_a9263.dtb \
usb_a9263.dtb \
at91-foxg20.dtb \
+ at91-kizbox.dtb \
at91sam9g20ek.dtb \
at91sam9g20ek_2mmc.dtb \
- kizbox.dtb \
tny_a9g20.dtb \
usb_a9g20.dtb \
usb_a9g20_lpw.dtb \
diff --git a/arch/arm/boot/dts/kizbox.dts b/arch/arm/boot/dts/at91-kizbox.dts
similarity index 100%
rename from arch/arm/boot/dts/kizbox.dts
rename to arch/arm/boot/dts/at91-kizbox.dts
--
1.9.1

2015-04-21 12:06:34

by Gaël PORTAY

[permalink] [raw]
Subject: [PATCH v2 2/7] ARM: at91/dt: at91-kizbox: sanitize file

Consists in:
* sorting nodes by address as possible or alphabetically,
* adding myself as new maintainer and
* update license.

Signed-off-by: Gaël PORTAY <[email protected]>
---
arch/arm/boot/dts/at91-kizbox.dts | 67 +++++++++++++++++++--------------------
1 file changed, 32 insertions(+), 35 deletions(-)

diff --git a/arch/arm/boot/dts/at91-kizbox.dts b/arch/arm/boot/dts/at91-kizbox.dts
index e83e4f9..00c86c1 100644
--- a/arch/arm/boot/dts/at91-kizbox.dts
+++ b/arch/arm/boot/dts/at91-kizbox.dts
@@ -1,16 +1,16 @@
/*
- * kizbox.dts - Device Tree file for Overkiz Kizbox board
+ * at91-kizbox.dts - Device Tree file for Overkiz Kizbox board
*
- * Copyright (C) 2012 Boris BREZILLON <[email protected]>
+ * Copyright (C) 2012-2014 Boris BREZILLON <[email protected]>
+ * 2014-2015 Gaël PORTAY <[email protected]>
*
- * Licensed under GPLv2.
+ * Licensed under GPLv2 or later.
*/
/dts-v1/;
#include "at91sam9g20.dtsi"

/ {
-
- model = "Overkiz kizbox";
+ model = "Overkiz Kizbox";
compatible = "overkiz,kizbox", "atmel,at91sam9g20", "atmel,at91sam9";

chosen {
@@ -38,10 +38,6 @@

ahb {
apb {
- dbgu: serial@fffff200 {
- status = "okay";
- };
-
usart0: serial@fffb0000 {
status = "okay";
};
@@ -57,6 +53,10 @@
status = "okay";
};

+ dbgu: serial@fffff200 {
+ status = "okay";
+ };
+
watchdog@fffffd40 {
timeout-sec = <15>;
atmel,max-heartbeat-sec = <16>;
@@ -65,6 +65,11 @@
};
};

+ usb0: ohci@00500000 {
+ num-ports = <1>;
+ status = "okay";
+ };
+
nand0: nand@40000000 {
nand-bus-width = <8>;
nand-ecc-mode = "soft";
@@ -79,24 +84,36 @@
label = "ubi";
reg = <0xc0000 0x7f40000>;
};
+ };
+ };
+
+ gpio_keys {
+ compatible = "gpio-keys";
+ #address-cells = <1>;
+ #size-cells = <0>;

+ reset {
+ label = "reset";
+ gpios = <&pioB 30 GPIO_ACTIVE_LOW>;
+ linux,code = <0x100>;
+ gpio-key,wakeup;
};

- usb0: ohci@00500000 {
- num-ports = <1>;
- status = "okay";
+ mode {
+ label = "mode";
+ gpios = <&pioB 31 GPIO_ACTIVE_LOW>;
+ linux,code = <0x101>;
+ gpio-key,wakeup;
};
};

i2c@0 {
status = "okay";

- pcf8563@51 {
- /* nxp pcf8563 rtc */
+ rtc: pcf8563@51 {
compatible = "nxp,pcf8563";
reg = <0x51>;
};
-
};

leds {
@@ -127,24 +144,4 @@
linux,default-trigger = "none";
};
};
-
- gpio_keys {
- compatible = "gpio-keys";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reset {
- label = "reset";
- gpios = <&pioB 30 GPIO_ACTIVE_LOW>;
- linux,code = <0x100>;
- gpio-key,wakeup;
- };
-
- mode {
- label = "mode";
- gpios = <&pioB 31 GPIO_ACTIVE_LOW>;
- linux,code = <0x101>;
- gpio-key,wakeup;
- };
- };
};
--
1.9.1

2015-04-21 12:13:52

by Gaël PORTAY

[permalink] [raw]
Subject: [PATCH v2 3/7] ARM: at91/dt: at91-kizbox: user proper serial uart

USART3 is the only serial UART accessible.

Signed-off-by: Gaël PORTAY <[email protected]>
---
arch/arm/boot/dts/at91-kizbox.dts | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/at91-kizbox.dts b/arch/arm/boot/dts/at91-kizbox.dts
index 00c86c1..72d5de80 100644
--- a/arch/arm/boot/dts/at91-kizbox.dts
+++ b/arch/arm/boot/dts/at91-kizbox.dts
@@ -38,14 +38,6 @@

ahb {
apb {
- usart0: serial@fffb0000 {
- status = "okay";
- };
-
- usart1: serial@fffb4000 {
- status = "okay";
- };
-
macb0: ethernet@fffc4000 {
phy-mode = "mii";
pinctrl-0 = <&pinctrl_macb_rmii
@@ -53,6 +45,10 @@
status = "okay";
};

+ usart3: serial@fffd0000 {
+ status = "okay";
+ };
+
dbgu: serial@fffff200 {
status = "okay";
};
--
1.9.1

2015-04-21 12:06:19

by Gaël PORTAY

[permalink] [raw]
Subject: [PATCH v2 4/7] ARM: at91/dt: at91-kizbox: gpio-keys related changes

This:
* fixes active level of GPIO (active high) and
* renames buttons:
- reset (PB_RST), and
- mode to user (PB_USER).

Signed-off-by: Gaël PORTAY <[email protected]>
---
arch/arm/boot/dts/at91-kizbox.dts | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/at91-kizbox.dts b/arch/arm/boot/dts/at91-kizbox.dts
index 72d5de80..73e4559 100644
--- a/arch/arm/boot/dts/at91-kizbox.dts
+++ b/arch/arm/boot/dts/at91-kizbox.dts
@@ -89,15 +89,15 @@
#size-cells = <0>;

reset {
- label = "reset";
- gpios = <&pioB 30 GPIO_ACTIVE_LOW>;
+ label = "PB_RST";
+ gpios = <&pioB 30 GPIO_ACTIVE_HIGH>;
linux,code = <0x100>;
gpio-key,wakeup;
};

- mode {
- label = "mode";
- gpios = <&pioB 31 GPIO_ACTIVE_LOW>;
+ user {
+ label = "PB_USER";
+ gpios = <&pioB 31 GPIO_ACTIVE_HIGH>;
linux,code = <0x101>;
gpio-key,wakeup;
};
--
1.9.1

2015-04-21 12:23:38

by Gaël PORTAY

[permalink] [raw]
Subject: [PATCH v2 5/7] ARM: at91/dt: at91-kizbox: leds related changes

This:
* moves to pwm-leds using tcb-pwm driver and
* renames leds to pwm:<color>:<function>.

Signed-off-by: Gaël PORTAY <[email protected]>
---
arch/arm/boot/dts/at91-kizbox.dts | 53 +++++++++++++++++++++++++--------------
1 file changed, 34 insertions(+), 19 deletions(-)

diff --git a/arch/arm/boot/dts/at91-kizbox.dts b/arch/arm/boot/dts/at91-kizbox.dts
index 73e4559..b19f568 100644
--- a/arch/arm/boot/dts/at91-kizbox.dts
+++ b/arch/arm/boot/dts/at91-kizbox.dts
@@ -8,6 +8,7 @@
*/
/dts-v1/;
#include "at91sam9g20.dtsi"
+#include <dt-bindings/pwm/pwm.h>

/ {
model = "Overkiz Kizbox";
@@ -112,32 +113,46 @@
};
};

- leds {
- compatible = "gpio-leds";
+ pwm_leds {
+ compatible = "pwm-leds";

- led1g {
- label = "led1:green";
- gpios = <&pioB 0 GPIO_ACTIVE_LOW>;
- linux,default-trigger = "none";
+ network_green {
+ label = "pwm:green:network";
+ pwms = <&tcb_pwm 2 10000000 PWM_POLARITY_INVERTED>;
+ max-brightness = <255>;
+ linux,default-trigger = "default-on";
};

- led1r {
- label = "led1:red";
- gpios = <&pioB 1 GPIO_ACTIVE_LOW>;
- linux,default-trigger = "none";
+ network_red {
+ label = "pwm:red:network";
+ pwms = <&tcb_pwm 3 10000000 PWM_POLARITY_INVERTED>;
+ max-brightness = <255>;
+ linux,default-trigger = "default-on";
};

- led2g {
- label = "led2:green";
- gpios = <&pioB 2 GPIO_ACTIVE_LOW>;
- linux,default-trigger = "none";
- default-state = "on";
+ user_green {
+ label = "pwm:green:user";
+ pwms = <&tcb_pwm 0 10000000 PWM_POLARITY_INVERTED>;
+ max-brightness = <255>;
+ linux,default-trigger = "default-on";
};

- led2r {
- label = "led2:red";
- gpios = <&pioB 3 GPIO_ACTIVE_LOW>;
- linux,default-trigger = "none";
+ user_red {
+ label = "pwm:red:user";
+ pwms = <&tcb_pwm 1 10000000 PWM_POLARITY_INVERTED>;
+ max-brightness = <255>;
+ linux,default-trigger = "default-on";
};
};
+
+ tcb_pwm: pwm {
+ compatible = "atmel,tcb-pwm";
+ #pwm-cells = <3>;
+ tc-block = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_tcb1_tioa0
+ &pinctrl_tcb1_tioa1
+ &pinctrl_tcb1_tioa2
+ &pinctrl_tcb1_tiob0>;
+ };
};
--
1.9.1

2015-04-21 12:05:43

by Gaël PORTAY

[permalink] [raw]
Subject: [PATCH v2 6/7] ARM: at91/dt: at91-kizbox: re-size nand partitions

Re-size NAND partitions since the bootstrap is able to read volumes from an
UBI image.

Signed-off-by: Gaël PORTAY <[email protected]>
---
arch/arm/boot/dts/at91-kizbox.dts | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/at91-kizbox.dts b/arch/arm/boot/dts/at91-kizbox.dts
index b19f568..e739104 100644
--- a/arch/arm/boot/dts/at91-kizbox.dts
+++ b/arch/arm/boot/dts/at91-kizbox.dts
@@ -72,14 +72,14 @@
nand-ecc-mode = "soft";
status = "okay";

- bootloaderkernel@0 {
- label = "bootloader-kernel";
- reg = <0x0 0xc0000>;
+ bootstrap@0 {
+ label = "bootstrap";
+ reg = <0x0 0x20000>;
};

- ubi@c0000 {
+ ubi@20000 {
label = "ubi";
- reg = <0xc0000 0x7f40000>;
+ reg = <0x20000 0x7fe0000>;
};
};
};
--
1.9.1

2015-04-21 12:05:41

by Gaël PORTAY

[permalink] [raw]
Subject: [PATCH v2 7/7] ARM: at91/dt: at91-kizbox: update chosen node

Simplify the bootargs since the platform is booting from an initramfs and
set the kernel stdout path to DBGU.

Signed-off-by: Gaël PORTAY <[email protected]>
---
arch/arm/boot/dts/at91-kizbox.dts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/at91-kizbox.dts b/arch/arm/boot/dts/at91-kizbox.dts
index e739104..b567b5f 100644
--- a/arch/arm/boot/dts/at91-kizbox.dts
+++ b/arch/arm/boot/dts/at91-kizbox.dts
@@ -15,7 +15,8 @@
compatible = "overkiz,kizbox", "atmel,at91sam9g20", "atmel,at91sam9";

chosen {
- bootargs = "panic=5 ubi.mtd=1 rootfstype=ubifs root=ubi0:root";
+ bootargs = "ubi.mtd=ubi";
+ linux,stdout-path = &dbgu;
};

memory {
--
1.9.1

2015-04-28 19:34:56

by Boris Brezillon

[permalink] [raw]
Subject: Re: [PATCH v2 0/7] ARM: at91/dt: kizbox: update and rename to at91-kizbox

On Tue, 21 Apr 2015 14:05:11 +0200
Gaël PORTAY <[email protected]> wrote:

> *** BLURB HERE ***
We usually replace this line by a description ;-).

Anyway, to the whole series:

Acked-by: Boris Brezillon <[email protected]>

>
> Gaël PORTAY (7):
> ARM: at91/dt: kizbox: rename to at91-kizbox
> ARM: at91/dt: at91-kizbox: sanitize file
> ARM: at91/dt: at91-kizbox: user proper serial uart
> ARM: at91/dt: at91-kizbox: gpio-keys related changes
> ARM: at91/dt: at91-kizbox: leds related changes
> ARM: at91/dt: at91-kizbox: re-size nand partitions
> ARM: at91/dt: at91-kizbox: update chosen node
>
> arch/arm/boot/dts/Makefile | 2 +-
> arch/arm/boot/dts/at91-kizbox.dts | 159 ++++++++++++++++++++++++++++++++++++++
> arch/arm/boot/dts/kizbox.dts | 150 -----------------------------------
> 3 files changed, 160 insertions(+), 151 deletions(-)
> create mode 100644 arch/arm/boot/dts/at91-kizbox.dts
> delete mode 100644 arch/arm/boot/dts/kizbox.dts
>



--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

2015-04-28 21:12:39

by Gaël PORTAY

[permalink] [raw]
Subject: Re: [PATCH v2 0/7] ARM: at91/dt: kizbox: update and rename to at91-kizbox

On 2015-04-28 21:34, Boris Brezillon wrote:
> On Tue, 21 Apr 2015 14:05:11 +0200
> Gaël PORTAY <[email protected]> wrote:
>
>> *** BLURB HERE ***
> We usually replace this line by a description ;-).
>

'cause I got nothing to tell... and I like to let it be known :D

> Anyway, to the whole series:
>
> Acked-by: Boris Brezillon <[email protected]>
>

Thanks

>>
>> Gaël PORTAY (7):
>> ARM: at91/dt: kizbox: rename to at91-kizbox
>> ARM: at91/dt: at91-kizbox: sanitize file
>> ARM: at91/dt: at91-kizbox: user proper serial uart
>> ARM: at91/dt: at91-kizbox: gpio-keys related changes
>> ARM: at91/dt: at91-kizbox: leds related changes
>> ARM: at91/dt: at91-kizbox: re-size nand partitions
>> ARM: at91/dt: at91-kizbox: update chosen node
>>
>> arch/arm/boot/dts/Makefile | 2 +-
>> arch/arm/boot/dts/at91-kizbox.dts | 159
>> ++++++++++++++++++++++++++++++++++++++
>> arch/arm/boot/dts/kizbox.dts | 150
>> -----------------------------------
>> 3 files changed, 160 insertions(+), 151 deletions(-)
>> create mode 100644 arch/arm/boot/dts/at91-kizbox.dts
>> delete mode 100644 arch/arm/boot/dts/kizbox.dts
>>

By the way...

*$ cat 0001-ARM-at91-dt-kizbox-rename-to-at91-kizbox.patch~*
From 9c0af17907451f8424b29c081780a9e9c18ae19d Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ga=C3=ABl=20PORTAY?= <[email protected]>
Date: Tue, 21 Apr 2015 12:08:42 +0200
Subject: [PATCH v2 1/7] ARM: at91/dt: kizbox: rename to at91-kizbox
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Hi,

This patchset renames the kizbox board into at91-kizbox to match AT91
naming
convention, sanitize and sorts nodes by address when possible (or
alphabeticallyi if not applicable).

It also updates the following features:
- uses proper serial uart (only USART3 is accessible),
- fixes gpio-keys active level and rename,
- moves leds to pwm support (using tcb-pwm driver) and rename as well,
- re-sizes nand mtd partitions and
- updates chosen-node (bootargs + set linux stdout path to DBGU),

Regards,
Gaël PORTAY

Changes since v1:
- Split into patches for review

---
arch/arm/boot/dts/Makefile | 2 +-
arch/arm/boot/dts/{kizbox.dts => at91-kizbox.dts} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename arch/arm/boot/dts/{kizbox.dts => at91-kizbox.dts} (100%)

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index d2b559d..32568fb 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -18,9 +18,9 @@ dtb-$(CONFIG_SOC_SAM_V4_V5) += \
tny_a9263.dtb \
usb_a9263.dtb \
at91-foxg20.dtb \
+ at91-kizbox.dtb \
at91sam9g20ek.dtb \
at91sam9g20ek_2mmc.dtb \
- kizbox.dtb \
tny_a9g20.dtb \
usb_a9g20.dtb \
usb_a9g20_lpw.dtb \
diff --git a/arch/arm/boot/dts/kizbox.dts
b/arch/arm/boot/dts/at91-kizbox.dts
similarity index 100%
rename from arch/arm/boot/dts/kizbox.dts
rename to arch/arm/boot/dts/at91-kizbox.dts
--
1.9.1



PS: Or blurb because I ate too many fondues before the winter comes to
an end ;)

2015-04-28 23:34:43

by Alexandre Belloni

[permalink] [raw]
Subject: Re: [PATCH v2 2/7] ARM: at91/dt: at91-kizbox: sanitize file

On 21/04/2015 at 14:05:13 +0200, Ga?l PORTAY wrote :
> Consists in:
> * sorting nodes by address as possible or alphabetically,
> * adding myself as new maintainer and
> * update license.
>
> Signed-off-by: Ga?l PORTAY <[email protected]>
> ---
> arch/arm/boot/dts/at91-kizbox.dts | 67 +++++++++++++++++++--------------------
> 1 file changed, 32 insertions(+), 35 deletions(-)
>
> diff --git a/arch/arm/boot/dts/at91-kizbox.dts b/arch/arm/boot/dts/at91-kizbox.dts
> index e83e4f9..00c86c1 100644
> --- a/arch/arm/boot/dts/at91-kizbox.dts
> +++ b/arch/arm/boot/dts/at91-kizbox.dts
> @@ -1,16 +1,16 @@
> /*
> - * kizbox.dts - Device Tree file for Overkiz Kizbox board
> + * at91-kizbox.dts - Device Tree file for Overkiz Kizbox board
> *

My guess is that this should be part of the previous patch


--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

2015-04-30 07:13:33

by Gaël PORTAY

[permalink] [raw]
Subject: Re: [PATCH v2 2/7] ARM: at91/dt: at91-kizbox: sanitize file

On 29/04/2015 01:34, Alexandre Belloni wrote:
> On 21/04/2015 at 14:05:13 +0200, Ga?l PORTAY wrote :
>> Consists in:
>> * sorting nodes by address as possible or alphabetically,
>> * adding myself as new maintainer and
>> * update license.
>>
>> Signed-off-by: Ga?l PORTAY <[email protected]>
>> ---
>> arch/arm/boot/dts/at91-kizbox.dts | 67 +++++++++++++++++++--------------------
>> 1 file changed, 32 insertions(+), 35 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/at91-kizbox.dts b/arch/arm/boot/dts/at91-kizbox.dts
>> index e83e4f9..00c86c1 100644
>> --- a/arch/arm/boot/dts/at91-kizbox.dts
>> +++ b/arch/arm/boot/dts/at91-kizbox.dts
>> @@ -1,16 +1,16 @@
>> /*
>> - * kizbox.dts - Device Tree file for Overkiz Kizbox board
>> + * at91-kizbox.dts - Device Tree file for Overkiz Kizbox board
>> *
> My guess is that this should be part of the previous patch
Indeed...