Skip to contentSkip to conversation

Add serial and i2c aliases for Khadas VIM boards

PATCH In review [email protected] 3 participants 10 messages Jun 5, 2021 – Jun 7, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover 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(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/6 arm64: dts: meson: vim3: add serial aliases

From: Nick Xie <[email protected]>

Add serial aliases for Khadas VIM3/3L.

---
 arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +4 -0
index 66d67524b031..4686ea7abe0b 100644
@@ -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;
Signature · 1 line
2.25.1
#2 lore raw

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

Quoted 15 lines · On Sat, Jun 5, 2021 at 8:23 AM <[email protected]> wrote:

From: Nick Xie <[email protected]>

Add serial aliases for Khadas VIM3/3L.

---
 arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +0 -0
index 66d67524b031..4686ea7abe0b 100644

arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi line 16

Quoted 4 lines
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +1 -0
@@ -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

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

#3 lore raw

PATCH 2/6 arm64: dts: meson: vim1: update serial aliases

In reply to [email protected]

From: Nick Xie <[email protected]>

Update serial aliases for Khadas VIM1.

---
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts +5 -1
index 60feac0179c0..f116a9d91633 100644
@@ -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;
 	};
 
Signature · 1 line
2.25.1
#4 lore raw

PATCH 3/6 arm64: dts: meson: vim2: update serial aliases

In reply to [email protected]

From: Nick Xie <[email protected]>

Update serial aliases for Khadas VIM2.

---
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +4 -1
index 18a4b7a6c5df..70488ae45876 100644
@@ -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 {
Signature · 1 line
2.25.1
#5 lore raw

PATCH 4/6 arm64: dts: meson: vim3: add i2c aliases

In reply to [email protected]

From: Nick Xie <[email protected]>

Add i2c aliases for Khadas VIM3/3L.

---
 arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +5 -0
index 4686ea7abe0b..b285341f862a 100644
@@ -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;
Signature · 1 line
2.25.1
#6 lore raw

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

Hi Nick,

thank you for this patch!

Quoted 4 lines · 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

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

#7 lore raw

PATCH 5/6 arm64: dts: meson: vim1: add i2c aliases

In reply to [email protected]

From: Nick Xie <[email protected]>

Add i2c aliases for Khadas VIM1.

---
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts +2 -0
index f116a9d91633..d175d6cae535 100644
@@ -32,6 +32,8 @@ aliases {
 		serial2 = &uart_B;
 		serial3 = &uart_C;
 		serial4 = &uart_AO_B;
+		i2c0 = &i2c_A;
+		i2c1 = &i2c_B;
 		ethernet0 = &ethmac;
 	};
 
Signature · 1 line
2.25.1
#8 lore raw

PATCH 6/6 arm64: dts: meson: vim2: add i2c aliases

In reply to [email protected]

From: Nick Xie <[email protected]>

Add i2c aliases for Khadas VIM2.

---
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +2 -0
index 70488ae45876..3f3ea65df665 100644
@@ -21,6 +21,8 @@ aliases {
 		serial2 = &uart_B;
 		serial3 = &uart_C;
 		serial4 = &uart_AO_B;
+		i2c0 = &i2c_A;
+		i2c1 = &i2c_B;
 	};
 
 	chosen {
Signature · 1 line
2.25.1
#9 lore raw
In reply to [email protected]

Hi Nick,

Quoted 14 lines · 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

Quoted 5 lines
 .../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

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic