2021-06-05 06:27:25

by Nick Xie

[permalink] [raw]
Subject: [PATCH 0/6] Add serial and i2c aliases for Khadas VIM boards

From: Nick Xie <[email protected]>

This patch series update / add serial and i2c aliases to
keep the same with 4.9 kernel for Khadas VIM boards
(VIM1, VIM2, VIM3 and VIM3L).

Nick Xie (6):
arm64: dts: meson: vim3: add serial aliases
arm64: dts: meson: vim1: update serial aliases
arm64: dts: meson: vim2: update serial aliases
arm64: dts: meson: vim3: add i2c aliases
arm64: dts: meson: vim1: add i2c aliases
arm64: dts: meson: vim2: add i2c aliases

.../boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 8 +++++++-
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 7 ++++++-
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 9 +++++++++
3 files changed, 22 insertions(+), 2 deletions(-)

--
2.25.1


2021-06-05 06:27:35

by Nick Xie

[permalink] [raw]
Subject: [PATCH 5/6] arm64: dts: meson: vim1: add i2c aliases

From: Nick Xie <[email protected]>

Add i2c aliases for Khadas VIM1.

Signed-off-by: Nick Xie <[email protected]>
---
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
index f116a9d91633..d175d6cae535 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
@@ -32,6 +32,8 @@ aliases {
serial2 = &uart_B;
serial3 = &uart_C;
serial4 = &uart_AO_B;
+ i2c0 = &i2c_A;
+ i2c1 = &i2c_B;
ethernet0 = &ethmac;
};

--
2.25.1

2021-06-05 06:27:42

by Nick Xie

[permalink] [raw]
Subject: [PATCH 6/6] arm64: dts: meson: vim2: add i2c aliases

From: Nick Xie <[email protected]>

Add i2c aliases for Khadas VIM2.

Signed-off-by: Nick Xie <[email protected]>
---
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
index 70488ae45876..3f3ea65df665 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
@@ -21,6 +21,8 @@ aliases {
serial2 = &uart_B;
serial3 = &uart_C;
serial4 = &uart_AO_B;
+ i2c0 = &i2c_A;
+ i2c1 = &i2c_B;
};

chosen {
--
2.25.1

2021-06-05 06:28:15

by Nick Xie

[permalink] [raw]
Subject: [PATCH 3/6] arm64: dts: meson: vim2: update serial aliases

From: Nick Xie <[email protected]>

Update serial aliases for Khadas VIM2.

Signed-off-by: Nick Xie <[email protected]>
---
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
index 18a4b7a6c5df..70488ae45876 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
@@ -17,7 +17,10 @@ / {

aliases {
serial0 = &uart_AO;
- serial2 = &uart_AO_B;
+ serial1 = &uart_A;
+ serial2 = &uart_B;
+ serial3 = &uart_C;
+ serial4 = &uart_AO_B;
};

chosen {
--
2.25.1

2021-06-05 06:30:07

by Nick Xie

[permalink] [raw]
Subject: [PATCH 1/6] arm64: dts: meson: vim3: add serial aliases

From: Nick Xie <[email protected]>

Add serial aliases for Khadas VIM3/3L.

Signed-off-by: Nick Xie <[email protected]>
---
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
index 66d67524b031..4686ea7abe0b 100644
--- a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
@@ -13,6 +13,10 @@
/ {
aliases {
serial0 = &uart_AO;
+ serial1 = &uart_A;
+ serial2 = &uart_B;
+ serial3 = &uart_C;
+ serial4 = &uart_AO_B;
ethernet0 = &ethmac;
rtc0 = &rtc;
rtc1 = &vrtc;
--
2.25.1

2021-06-05 06:30:15

by Nick Xie

[permalink] [raw]
Subject: [PATCH 4/6] arm64: dts: meson: vim3: add i2c aliases

From: Nick Xie <[email protected]>

Add i2c aliases for Khadas VIM3/3L.

Signed-off-by: Nick Xie <[email protected]>
---
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
index 4686ea7abe0b..b285341f862a 100644
--- a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
@@ -17,6 +17,11 @@ aliases {
serial2 = &uart_B;
serial3 = &uart_C;
serial4 = &uart_AO_B;
+ i2c0 = &i2c0;
+ i2c1 = &i2c1;
+ i2c2 = &i2c2;
+ i2c3 = &i2c3;
+ i2c4 = &i2c_AO;
ethernet0 = &ethmac;
rtc0 = &rtc;
rtc1 = &vrtc;
--
2.25.1

2021-06-05 06:31:02

by Nick Xie

[permalink] [raw]
Subject: [PATCH 2/6] arm64: dts: meson: vim1: update serial aliases

From: Nick Xie <[email protected]>

Update serial aliases for Khadas VIM1.

Signed-off-by: Nick Xie <[email protected]>
---
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
index 60feac0179c0..f116a9d91633 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
@@ -27,7 +27,11 @@ button-function {
};

aliases {
- serial2 = &uart_AO_B;
+ serial0 = &uart_AO;
+ serial1 = &uart_A;
+ serial2 = &uart_B;
+ serial3 = &uart_C;
+ serial4 = &uart_AO_B;
ethernet0 = &ethmac;
};

--
2.25.1

2021-06-05 09:57:16

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCH 1/6] arm64: dts: meson: vim3: add serial aliases

On Sat, Jun 5, 2021 at 8:23 AM <[email protected]> wrote:
>
> From: Nick Xie <[email protected]>
>
> Add serial aliases for Khadas VIM3/3L.
>
> Signed-off-by: Nick Xie <[email protected]>
> ---
> arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
> index 66d67524b031..4686ea7abe0b 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
> @@ -13,6 +13,10 @@
> / {
> aliases {
> serial0 = &uart_AO;
> + serial1 = &uart_A;
uart_A is used for the Bluetooth module so with mainline Linux it will
not get a /dev/ttyAMLx character device
For that reason we are not adding an alias for uart_A when a new
board.dts is added

I suggest that you also drop this alias here because it is not visible
to the user ever
Same applies to VIM1 and VIM2 as well


Best regards,
Martin

2021-06-05 09:59:11

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCH 4/6] arm64: dts: meson: vim3: add i2c aliases

Hi Nick,

thank you for this patch!

On Sat, Jun 5, 2021 at 8:24 AM <[email protected]> wrote:
>
> From: Nick Xie <[email protected]>
>
> Add i2c aliases for Khadas VIM3/3L.
commit ab547c4fb39fe1 ("arm64: dts: amlogic: Assign a fixed index to
mmc devices") added the aliases for the MMC controllers to the
soc.dtsi
I would like to hear your opinion as well as the opinions from other
Amlogic reviewers whether the same makes sense for the I2C controllers
as well


Best regards,
Martin

2021-06-07 07:05:57

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH 0/6] Add serial and i2c aliases for Khadas VIM boards

Hi Nick,

On 05/06/2021 08:23, [email protected] wrote:
> From: Nick Xie <[email protected]>
>
> This patch series update / add serial and i2c aliases to
> keep the same with 4.9 kernel for Khadas VIM boards
> (VIM1, VIM2, VIM3 and VIM3L).
>
> Nick Xie (6):
> arm64: dts: meson: vim3: add serial aliases
> arm64: dts: meson: vim1: update serial aliases
> arm64: dts: meson: vim2: update serial aliases
> arm64: dts: meson: vim3: add i2c aliases
> arm64: dts: meson: vim1: add i2c aliases
> arm64: dts: meson: vim2: add i2c aliases
>
> .../boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 8 +++++++-
> arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 7 ++++++-
> arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 9 +++++++++
> 3 files changed, 22 insertions(+), 2 deletions(-)
>

Thanks for these patches.

I'm not sure about the current policy about aliases, but when we started upstreaming the amlogic boards,
only the exposed interfaces could have an alias and in the board.dts file only. But since other vendors
added a bunch of aliases of all the possible i2c/spi/uart/mmc/ethernet interfaces in the SoC dtsi....

But the question of the 40pins header remains, should we add aliases for interfaces present on the 40pin header ?????

Personally, we should'nt since these pins has no defined functions, so any alias should be added by a DT overlay loaded from U-boot.

But it's my own opinion.

Rob ? what's the current policy on that ?

Neil