Message ID | 20220830152132.23916-3-nm@ti.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | arm64: dts: ti: *: Define aliases in board file | expand |
On Tue, Aug 30, 2022, at 5:21 PM, Nishanth Menon wrote: > Define aliases in board files, instead of in the SoC dtsi file. > > Reported-by: Daniel Thompson <daniel.thompson@linaro.org> > Signed-off-by: Nishanth Menon <nm@ti.com> The patch is a good step in the right direction, but > > + aliases { > + serial0 = &wkup_uart0; > + serial1 = &mcu_uart0; > + serial2 = &main_uart0; > + serial3 = &main_uart1; > + serial4 = &main_uart2; > + serial5 = &main_uart3; > + serial6 = &main_uart4; > + serial7 = &main_uart5; > + serial8 = &main_uart6; > + serial9 = &main_uart7; > + serial10 = &main_uart8; > + serial11 = &main_uart9; > + ethernet0 = &cpsw_port1; > + mmc0 = &main_sdhci0; > + mmc1 = &main_sdhci1; > + mmc2 = &main_sdhci2; Are all these devices actually used on both of the boards? There is no point in defining an alias if the board does not route these to a device or a connector. Arnd
On 20:18-20220830, Arnd Bergmann wrote: > On Tue, Aug 30, 2022, at 5:21 PM, Nishanth Menon wrote: > > Define aliases in board files, instead of in the SoC dtsi file. > > > > Reported-by: Daniel Thompson <daniel.thompson@linaro.org> > > Signed-off-by: Nishanth Menon <nm@ti.com> > > The patch is a good step in the right direction, but > > > > > + aliases { > > + serial0 = &wkup_uart0; > > + serial1 = &mcu_uart0; > > + serial2 = &main_uart0; > > + serial3 = &main_uart1; > > + serial4 = &main_uart2; > > + serial5 = &main_uart3; > > + serial6 = &main_uart4; > > + serial7 = &main_uart5; > > + serial8 = &main_uart6; > > + serial9 = &main_uart7; > > + serial10 = &main_uart8; > > + serial11 = &main_uart9; > > + ethernet0 = &cpsw_port1; > > + mmc0 = &main_sdhci0; > > + mmc1 = &main_sdhci1; > > + mmc2 = &main_sdhci2; > > Are all these devices actually used on both of the boards? > > There is no point in defining an alias if the board > does not route these to a device or a connector. Thanks and true, I had indeed missed cross checking against the usage. Will recheck, cleanup and respin this series.
diff --git a/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts index b1691ac3442d..7355144bdc19 100644 --- a/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts +++ b/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts @@ -15,6 +15,25 @@ / { compatible = "ti,j721e-evm", "ti,j721e"; model = "Texas Instruments J721e EVM"; + aliases { + serial0 = &wkup_uart0; + serial1 = &mcu_uart0; + serial2 = &main_uart0; + serial3 = &main_uart1; + serial4 = &main_uart2; + serial5 = &main_uart3; + serial6 = &main_uart4; + serial7 = &main_uart5; + serial8 = &main_uart6; + serial9 = &main_uart7; + serial10 = &main_uart8; + serial11 = &main_uart9; + ethernet0 = &cpsw_port1; + mmc0 = &main_sdhci0; + mmc1 = &main_sdhci1; + mmc2 = &main_sdhci2; + }; + chosen { stdout-path = "serial2:115200n8"; bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000"; diff --git a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts index 80358cba6954..f5e6ab2ef35c 100644 --- a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts @@ -16,6 +16,25 @@ / { compatible = "ti,j721e-sk", "ti,j721e"; model = "Texas Instruments J721E SK"; + aliases { + serial0 = &wkup_uart0; + serial1 = &mcu_uart0; + serial2 = &main_uart0; + serial3 = &main_uart1; + serial4 = &main_uart2; + serial5 = &main_uart3; + serial6 = &main_uart4; + serial7 = &main_uart5; + serial8 = &main_uart6; + serial9 = &main_uart7; + serial10 = &main_uart8; + serial11 = &main_uart9; + ethernet0 = &cpsw_port1; + mmc0 = &main_sdhci0; + mmc1 = &main_sdhci1; + mmc2 = &main_sdhci2; + }; + chosen { stdout-path = "serial2:115200n8"; bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000"; diff --git a/arch/arm64/boot/dts/ti/k3-j721e.dtsi b/arch/arm64/boot/dts/ti/k3-j721e.dtsi index 0e23886c9fd1..e8e93d075dc4 100644 --- a/arch/arm64/boot/dts/ti/k3-j721e.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j721e.dtsi @@ -17,25 +17,6 @@ / { #address-cells = <2>; #size-cells = <2>; - aliases { - serial0 = &wkup_uart0; - serial1 = &mcu_uart0; - serial2 = &main_uart0; - serial3 = &main_uart1; - serial4 = &main_uart2; - serial5 = &main_uart3; - serial6 = &main_uart4; - serial7 = &main_uart5; - serial8 = &main_uart6; - serial9 = &main_uart7; - serial10 = &main_uart8; - serial11 = &main_uart9; - ethernet0 = &cpsw_port1; - mmc0 = &main_sdhci0; - mmc1 = &main_sdhci1; - mmc2 = &main_sdhci2; - }; - chosen { }; cpus {
Define aliases in board files, instead of in the SoC dtsi file. Reported-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Nishanth Menon <nm@ti.com> --- .../dts/ti/k3-j721e-common-proc-board.dts | 19 +++++++++++++++++++ arch/arm64/boot/dts/ti/k3-j721e-sk.dts | 19 +++++++++++++++++++ arch/arm64/boot/dts/ti/k3-j721e.dtsi | 19 ------------------- 3 files changed, 38 insertions(+), 19 deletions(-)