Revert "tty: serial: meson: Add a earlycon for the T7 SoC"
Subsystems (2)
PATCH v2 1/1 Revert "tty: serial: meson: Add a earlycon for the T7 SoC"
This reverts commit 6a4197f9763325043abf7690a21124a9facbf52e.
New SoC will use ttyS0 instead of ttyAML, so T7 SoC doesn't need a OF_EARLYCON_DECLARE.
---
Since V1:
- add Signed-off-by:
drivers/tty/serial/meson_uart.c | 2 -- 1 file changed, 2 deletions(-)
drivers/tty/serial/meson_uart.c +0 -2
@@ -648,8 +648,6 @@ meson_serial_early_console_setup(struct earlycon_device *device, const char *optOF_EARLYCON_DECLARE (meson,"amlogic,meson-ao-uart" , meson_serial_early_console_setup); -OF_EARLYCON_DECLARE (meson,"amlogic,t7-uart" , - meson_serial_early_console_setup);#define MESON_SERIAL_CONSOLE_PTR (_devname) (&meson_serial_console_##_devname)#else
Signature · 7 lines
2.42.0 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
Neil Armstrong
maintainerHi Lucas,
Le 27/08/2023 à 10:29, Lucas Tanure a écrit :
Quoted 16 lines
This reverts commit
6a4197f9763325043abf7690a21124a9facbf52e.
New SoC will use ttyS0 instead of ttyAML, so T7 SoC doesn't need aOF_EARLYCON_DECLARE.Signed-off-by Lucas Tanure <[email protected]>---
Since V1:
- add Signed-off-by:drivers/tty/serial/meson_uart.c | 2 -- 1 file changed, 2 deletions(-)drivers/tty/serial/meson_uart.c +0
-0
drivers/tty/serial/meson_uart.c meson_serial_early_console_setup(struct earlycon_device *device, const char *opt · line 653
Quoted 8 lines
drivers/tty/serial/meson_uart.c +0
-2@@ -648,8 +648,6 @@ meson_serial_early_console_setup(struct earlycon_device *device, const char *optOF_EARLYCON_DECLARE (meson,"amlogic,meson-ao-uart" , meson_serial_early_console_setup); -OF_EARLYCON_DECLARE (meson,"amlogic,t7-uart" , - meson_serial_early_console_setup);#define MESON_SERIAL_CONSOLE_PTR (_devname) (&meson_serial_console_##_devname)#else
How do you use earlycon with this removed ?
Neil
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 29 lines · Neil Armstrong
Hi Lucas,
Le 27/08/2023 à 10:29, Lucas Tanure a écrit :
Quoted 16 lines
This reverts commit
6a4197f9763325043abf7690a21124a9facbf52e.
New SoC will use ttyS0 instead of ttyAML, so T7 SoC doesn't need aOF_EARLYCON_DECLARE.Signed-off-by Lucas Tanure <[email protected]>---
Since V1:
- add Signed-off-by:
drivers/tty/serial/meson_uart.c| 2 --1 file changed, 2 deletions(-)drivers/tty/serial/meson_uart.c +0
-0@@ -648,8 +648,6 @@ meson_serial_early_console_setup(structQuoted 7 lines
earlycon_device*device, const char *optOF_EARLYCON_DECLARE(meson, "amlogic,meson-ao-uart", meson_serial_early_console_setup); -OF_EARLYCON_DECLARE(meson, "amlogic,t7-uart",
-meson_serial_early_console_setup);
#defineMESON_SERIAL_CONSOLE_PTR(_devname)(&meson_serial_console_##_devname) #elseHow do you use earlycon with this removed ?
Quoted 1 line
Neil
This is my kernel cmdline:
console=ttyS0,921600 no_console_suspend earlycon=ttyS0,0xfe078000
And I can see my log:
boot 64bit kernel
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd092] [ 0.000000] Linux version 6.5.0-rc7-next-20230825+ (tanureal@ryzen) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 10.3.1 20210621, GNU ld (GNU Toolchain fo3 [ 0.000000] KASLR disabled due to lack of seed [ 0.000000] Machine model: Khadas vim4 [ 0.000000] OF: reserved mem: 0x0000000005000000..0x00000000052fffff (3072 KiB) nomap non-reusable secmon@5000000 [ 0.000000] OF: reserved mem: 0x0000000005300000..0x00000000072fffff (32768 KiB) nomap non-reusable secmon@5300000 ... [ 0.079368] io scheduler mq-deadline registered [ 0.079374] io scheduler kyber registered [ 0.079549] io scheduler bfq registered [ 0.083373] fe078000.serial: ttyS0 at MMIO 0xfe078000 (irq = 14, base_baud = 1500000) is a meson_uart [ 0.083403] printk: console [ttyS0] enabled
As the log is OK, and T7 for now is binding against S4 code we should drop this patch and add a S4 one if needed.
But just having this log is not enough for testing earlycon?
I am assuming that by just having the log since 0.0000 is a good sign that earlycon is working. Could you give further guidance?
Lucas Tanure
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Neil Armstrong
maintainerHi Lucas,
Le 27/08/2023 à 12:04, Lucas Tanure a écrit :
Quoted 48 lines · Neil Armstrong
Quoted 28 lines
Hi Lucas,
Le 27/08/2023 à 10:29, Lucas Tanure a écrit :
Quoted 16 lines
This reverts commit
6a4197f9763325043abf7690a21124a9facbf52e.
New SoC will use ttyS0 instead of ttyAML, so T7 SoC doesn't need aOF_EARLYCON_DECLARE.Signed-off-by Lucas Tanure <[email protected]>---
Since V1:
- add Signed-off-by:
drivers/tty/serial/meson_uart.c| 2 --1 file changed, 2 deletions(-)drivers/tty/serial/meson_uart.c +0
-0drivers/tty/serial/meson_uart.c meson_serial_early_console_setup(struct earlycon_device *device, const char *opt · line 651
Quoted 6 lines
drivers/tty/serial/meson_uart.c +0
-2@@ -648,8 +648,6 @@ meson_serial_early_console_setup(struct earlycon_device *device, const char *opt OF_EARLYCON_DECLARE(meson, "amlogic,meson-ao-uart", meson_serial_early_console_setup); -OF_EARLYCON_DECLARE (meson,"amlogic,t7-uart" , - meson_serial_early_console_setup); #define MESON_SERIAL_CONSOLE_PTR(_devname) (&meson_serial_console_##_devname) #elseHow do you use earlycon with this removed ?
Quoted 1 line
Neil
This is my kernel cmdline:
console=ttyS0,921600no_console_suspendearlycon=ttyS0,0xfe078000And I can see my log:
boot 64bit kernel
[ 0.000000] Booting Linux on physical CPU0x0000000000[0x410fd092]
[ 0.000000] Linux version 6.5.0-rc7-next-20230825+ (tanureal@ryzen) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 10.3.1 20210621, GNU ld (GNU Toolchain fo3 [ 0.000000] KASLR disabled due to lack of seed
[ 0.000000] Machine model: Khadas vim4
[ 0.000000] OF: reserved mem: 0x0000000005000000..0x00000000052fffff (3072 KiB) nomap non-reusable secmon@5000000
[ 0.000000] OF: reserved mem: 0x0000000005300000..0x00000000072fffff (32768 KiB) nomap non-reusable secmon@5300000
...
[ 0.079368] io scheduler mq-deadline registered
[ 0.079374] io scheduler kyber registered
[ 0.079549] io scheduler bfq registered
[ 0.083373] fe078000.serial: ttyS0 at MMIO0xfe078000(irq = 14,base_baud= 1500000) is ameson_uart
[ 0.083403] printk: console [ttyS0] enabled
Quoted 5 lines
As the log is OK, and T7 for now is binding against S4 code we should drop this patch and add a S4 one if needed.
But just having this log is not enough for testing earlycon?
I am assuming that by just having the log since 0.0000 is a good sign that earlycon is working. Could you give further guidance?
First the kernel argument is simply "earlycon" with no other options, the earlycon code will fetch the first uart using the DT /chosen/stdout-path property.
Then you should see something like right after "Machine model":
[ 0.000000] earlycon: meson0 at MMIO 0x00000000ff803000 (options '115200n8')
The boot log you share doesn't use earlycon, it waits until all depedency of the UART has been probed before probing the UART driver and prints the whole boot log.
Earlycon is a mechanism to use the UART HW as configured by the bootloader in a minimal way very early in the boot in order to detect very early lockups.
Keeping OF_EARLYCON_DECLARE for t7 would enable this.
Neil
Quoted 3 lines
Lucas Tanure
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Quoted 67 lines · Neil Armstrong
Hi Lucas,
Le 27/08/2023 à 12:04, Lucas Tanure a écrit :
Quoted 49 lines · Neil Armstrong
Quoted 29 lines
Hi Lucas,
Le 27/08/2023 à 10:29, Lucas Tanure a écrit :
Quoted 16 lines
This reverts commit
6a4197f9763325043abf7690a21124a9facbf52e.
New SoC will use ttyS0 instead of ttyAML, so T7 SoC doesn't need aOF_EARLYCON_DECLARE.Signed-off-by Lucas Tanure <[email protected]>---
Since V1:
- add Signed-off-by:
drivers/tty/serial/meson_uart.c| 2 --1 file changed, 2 deletions(-)drivers/tty/serial/meson_uart.c +0
-0@@ -648,8 +648,6 @@ meson_serial_early_console_setup(structQuoted 7 lines
earlycon_device*device, const char *optOF_EARLYCON_DECLARE(meson, "amlogic,meson-ao-uart", meson_serial_early_console_setup); -OF_EARLYCON_DECLARE(meson, "amlogic,t7-uart",
-meson_serial_early_console_setup);
#defineMESON_SERIAL_CONSOLE_PTR(_devname)(&meson_serial_console_##_devname) #elseHow do you use earlycon with this removed ?
Quoted 1 line
Neil
This is my kernel cmdline:
console=ttyS0,921600no_console_suspendearlycon=ttyS0,0xfe078000And I can see my log:
boot 64bit kernel
[ 0.000000] Booting Linux on physical CPU0x0000000000[0x410fd092]
[ 0.000000] Linux version 6.5.0-rc7-next-20230825+ (tanureal@ryzen) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 10.3.1 20210621, GNU ld (GNU Toolchain fo3 [ 0.000000] KASLR disabled due to lack of seed
[ 0.000000] Machine model: Khadas vim4
[ 0.000000] OF: reserved mem: 0x0000000005000000..0x00000000052fffff (3072 KiB) nomap non-reusable secmon@5000000
[ 0.000000] OF: reserved mem: 0x0000000005300000..0x00000000072fffff (32768 KiB) nomap non-reusable secmon@5300000
...
[ 0.079368] io scheduler mq-deadline registered
[ 0.079374] io scheduler kyber registered
[ 0.079549] io scheduler bfq registered
[ 0.083373] fe078000.serial: ttyS0 at MMIO0xfe078000(irq = 14,base_baud= 1500000) is ameson_uart
[ 0.083403] printk: console [ttyS0] enabledQuoted 5 lines
As the log is OK, and T7 for now is binding against S4 code we should drop this patch and add a S4 one if needed.
But just having this log is not enough for testing earlycon?
I am assuming that by just having the log since 0.0000 is a good sign that earlycon is working. Could you give further guidance?First the kernel argument is simply "earlycon" with no other options, the earlycon code will fetch the first uart using the DT /chosen/stdout-path property.
Then you should see something like right after "Machine model":
[ 0.000000] earlycon: meson0 at MMIO0x00000000ff803000(options '115200n8')The boot log you share doesn't use earlycon, it waits until all depedency of the UART has been probed before probing the UART driver and prints the whole boot log.
Quoted 11 lines
Earlycon is a mechanism to use the UART HW as configured by the bootloader in a minimal way very early in the boot in order to detect very early lockups.
Keeping
OF_EARLYCON_DECLAREfor t7 would enable this.Neil
Quoted 3 lines
Lucas Tanure
But then we would need to add Earlycon for S4 too.
How can we add one Earlycon for all future SoCs, like S4 and T7?
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Neil Armstrong
maintainerQuoted 72 lines · Lucas Tanure
Quoted 71 lines · Neil Armstrong
Hi Lucas,
Le 27/08/2023 à 12:04, Lucas Tanure a écrit :
Quoted 48 lines · Neil Armstrong
Quoted 28 lines
Hi Lucas,
Le 27/08/2023 à 10:29, Lucas Tanure a écrit :
Quoted 16 lines
This reverts commit
6a4197f9763325043abf7690a21124a9facbf52e.
New SoC will use ttyS0 instead of ttyAML, so T7 SoC doesn't need aOF_EARLYCON_DECLARE.Signed-off-by Lucas Tanure <[email protected]>---
Since V1:
- add Signed-off-by:
drivers/tty/serial/meson_uart.c| 2 --1 file changed, 2 deletions(-)drivers/tty/serial/meson_uart.c +0
-0drivers/tty/serial/meson_uart.c meson_serial_early_console_setup(struct earlycon_device *device, const char *opt · line 651
Quoted 6 lines
drivers/tty/serial/meson_uart.c +0
-2@@ -648,8 +648,6 @@ meson_serial_early_console_setup(struct earlycon_device *device, const char *opt OF_EARLYCON_DECLARE(meson, "amlogic,meson-ao-uart", meson_serial_early_console_setup); -OF_EARLYCON_DECLARE (meson,"amlogic,t7-uart" , - meson_serial_early_console_setup); #define MESON_SERIAL_CONSOLE_PTR(_devname) (&meson_serial_console_##_devname) #elseHow do you use earlycon with this removed ?
Quoted 1 line
Neil
This is my kernel cmdline:
console=ttyS0,921600no_console_suspendearlycon=ttyS0,0xfe078000And I can see my log:
boot 64bit kernel
[ 0.000000] Booting Linux on physical CPU0x0000000000[0x410fd092]
[ 0.000000] Linux version 6.5.0-rc7-next-20230825+ (tanureal@ryzen) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 10.3.1 20210621, GNU ld (GNU Toolchain fo3 [ 0.000000] KASLR disabled due to lack of seed
[ 0.000000] Machine model: Khadas vim4
[ 0.000000] OF: reserved mem: 0x0000000005000000..0x00000000052fffff (3072 KiB) nomap non-reusable secmon@5000000
[ 0.000000] OF: reserved mem: 0x0000000005300000..0x00000000072fffff (32768 KiB) nomap non-reusable secmon@5300000
...
[ 0.079368] io scheduler mq-deadline registered
[ 0.079374] io scheduler kyber registered
[ 0.079549] io scheduler bfq registered
[ 0.083373] fe078000.serial: ttyS0 at MMIO0xfe078000(irq = 14,base_baud= 1500000) is ameson_uart
[ 0.083403] printk: console [ttyS0] enabledQuoted 5 lines
As the log is OK, and T7 for now is binding against S4 code we should drop this patch and add a S4 one if needed.
But just having this log is not enough for testing earlycon?
I am assuming that by just having the log since 0.0000 is a good sign that earlycon is working. Could you give further guidance?First the kernel argument is simply "earlycon" with no other options, the earlycon code will fetch the first uart using the DT /chosen/stdout-path property.
Then you should see something like right after "Machine model":
[ 0.000000] earlycon: meson0 at MMIO0x00000000ff803000(options '115200n8')The boot log you share doesn't use earlycon, it waits until all depedency of the UART has been probed before probing the UART driver and prints the whole boot log.
Earlycon is a mechanism to use the UART HW as configured by the bootloader in a minimal way very early in the boot in order to detect very early lockups.
Keeping
OF_EARLYCON_DECLAREfor t7 would enable this.
Quoted 9 lines
Quoted 6 lines
Neil
Quoted 3 lines
Lucas Tanure
But then we would need to add Earlycon for S4 too.
How can we add one Earlycon for all future SoCs, like S4 and T7?
As of today, S4 has an UART with amlogic,meson-ao-uart as fallback compatibl, but if there's no AO UART on S4, then this is wrong and yes a new OF_EARLYCON_DECLARE with amlogic,meson-s4-uart should be added.
Neil
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Quoted 91 lines · Lucas Tanure
Quoted 90 lines · Neil Armstrong
Hi Lucas,
Le 27/08/2023 à 12:04, Lucas Tanure a écrit :
Quoted 60 lines · Neil Armstrong
Quoted 32 lines
Hi Lucas,
Le 27/08/2023 à 10:29, Lucas Tanure a écrit :
Quoted 18 lines
This reverts commit
6a4197f9763325043abf7690a21124a9facbf52e. New SoC will use ttyS0 instead of ttyAML, so T7 SoC doesn't need aOF_EARLYCON_DECLARE.Signed-off-by Lucas Tanure <[email protected]>---
Since V1:
- add Signed-off-by:
drivers/tty/serial/meson_uart.c| 2 --1 file changed, 2 deletions(-)drivers/tty/serial/meson_uart.c +0
-0@@ -648,8 +648,6 @@ meson_serial_early_console_setup(structQuoted 8 lines
earlycon_device*device, const char *optOF_EARLYCON_DECLARE(meson, "amlogic,meson-ao-uart", meson_serial_early_console_setup); -OF_EARLYCON_DECLARE(meson, "amlogic,t7-uart", -meson_serial_early_console_setup); #defineMESON_SERIAL_CONSOLE_PTR(_devname)(&meson_serial_console_##_devname)
#elseHow do you use earlycon with this removed ?
Quoted 1 line
Neil
This is my kernel cmdline:
console=ttyS0,921600no_console_suspendearlycon=ttyS0,0xfe078000And I can see my log:
boot 64bit kernel
[ 0.000000] Booting Linux on physical CPU0x0000000000[0x410fd092] [ 0.000000] Linux version 6.5.0-rc7-next-20230825+ (tanureal@ryzen) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 10.3.1 20210621, GNU ld (GNU Toolchain fo3
[ 0.000000] KASLR disabled due to lack of seed
[ 0.000000] Machine model: Khadas vim4
[ 0.000000] OF: reserved mem:
0x0000000005000000..0x00000000052fffff (3072 KiB) nomap non-reusable secmon@5000000
[ 0.000000] OF: reserved mem:
0x0000000005300000..0x00000000072fffff (32768 KiB) nomap non-reusable secmon@5300000
...
[ 0.079368] io scheduler mq-deadline registered
[ 0.079374] io scheduler kyber registered
[ 0.079549] io scheduler bfq registered
[ 0.083373] fe078000.serial: ttyS0 at MMIO0xfe078000(irq = 14,base_baud= 1500000) is ameson_uart
[ 0.083403] printk: console [ttyS0] enabledQuoted 7 lines
As the log is OK, and T7 for now is binding against S4 code we should drop this patch and add a S4 one if needed.
But just having this log is not enough for testing earlycon? I am assuming that by just having the log since 0.0000 is a good sign that earlycon is working.
Could you give further guidance?First the kernel argument is simply "earlycon" with no other options, the earlycon code will fetch the first uart using the DT /chosen/stdout-path property.
Then you should see something like right after "Machine model":
[ 0.000000] earlycon: meson0 at MMIO0x00000000ff803000(options '115200n8')The boot log you share doesn't use earlycon, it waits until all depedency of the UART
has been probed before probing the UART driver and prints the whole boot log.Earlycon is a mechanism to use the UART HW as configured by the bootloader in
a minimal way very early in the boot in order to detect very early lockups.Keeping
OF_EARLYCON_DECLAREfor t7 would enable this.
Quoted 9 lines
Quoted 6 lines
Neil
Quoted 3 lines
Lucas Tanure
But then we would need to add Earlycon for S4 too.
How can we add one Earlycon for all future SoCs, like S4 and T7?
Per my understanding, you just need to declare UART dts node with the following compatible string: "amlogic,meson-ao-uart". It will enabled earlycon. There is no neccessary to declare separate OF_EARLYCON_DECLARE(). It's working okay for A1 dts:
meson-a1.dtsi uart declaration:
uart_AO_B: serial@2000 {
compatible = "amlogic,meson-a1-uart",
"amlogic,meson-ao-uart";
reg = <0x0 0x2000 0x0 0x18>;
interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;
clocks = <&xtal>, <&xtal>, <&xtal>;
clock-names = "xtal", "pclk", "baud";
status = "disabled";
};earlycon declaration from dts:
aliases {
serial0 = &uart_AO_B;
};
chosen {
stdout-path = "serial0:115200n8";
};Quoted 5 lines
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Signature · 7 lines
Thank you, Dmitry _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
Neil Armstrong
maintainerHi,
Quoted 98 lines · Dmitry Rokosov
Quoted 97 lines · Lucas Tanure
Quoted 96 lines · Neil Armstrong
Hi Lucas,
Le 27/08/2023 à 12:04, Lucas Tanure a écrit :
Quoted 60 lines · Neil Armstrong
Quoted 32 lines
Hi Lucas,
Le 27/08/2023 à 10:29, Lucas Tanure a écrit :
Quoted 18 lines
This reverts commit
6a4197f9763325043abf7690a21124a9facbf52e. New SoC will use ttyS0 instead of ttyAML, so T7 SoC doesn't need aOF_EARLYCON_DECLARE.Signed-off-by Lucas Tanure <[email protected]>---
Since V1:
- add Signed-off-by:drivers/tty/serial/meson_uart.c | 2 -- 1 file changed, 2 deletions(-)drivers/tty/serial/meson_uart.c +0
-0@@ -648,8 +648,6 @@ meson_serial_early_console_setup(structQuoted 8 lines
earlycon_device*device, const char *opt
OF_EARLYCON_DECLARE(meson, "amlogic,meson-ao-uart", meson_serial_early_console_setup);
-OF_EARLYCON_DECLARE(meson, "amlogic,t7-uart", -meson_serial_early_console_setup);
#defineMESON_SERIAL_CONSOLE_PTR(_devname)
(&meson_serial_console_##_devname)
#elseHow do you use earlycon with this removed ?
Quoted 1 line
Neil
This is my kernel cmdline:
console=ttyS0,921600no_console_suspendearlycon=ttyS0,0xfe078000And I can see my log:
boot 64bit kernel
[ 0.000000] Booting Linux on physical CPU0x0000000000[0x410fd092] [ 0.000000] Linux version 6.5.0-rc7-next-20230825+ (tanureal@ryzen) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 10.3.1 20210621, GNU ld (GNU Toolchain fo3
[ 0.000000] KASLR disabled due to lack of seed
[ 0.000000] Machine model: Khadas vim4
[ 0.000000] OF: reserved mem:
0x0000000005000000..0x00000000052fffff (3072 KiB) nomap non-reusable secmon@5000000
[ 0.000000] OF: reserved mem:
0x0000000005300000..0x00000000072fffff (32768 KiB) nomap non-reusable secmon@5300000
...
[ 0.079368] io scheduler mq-deadline registered
[ 0.079374] io scheduler kyber registered
[ 0.079549] io scheduler bfq registered
[ 0.083373] fe078000.serial: ttyS0 at MMIO0xfe078000(irq = 14,base_baud= 1500000) is ameson_uart
[ 0.083403] printk: console [ttyS0] enabledQuoted 7 lines
As the log is OK, and T7 for now is binding against S4 code we should drop this patch and add a S4 one if needed.
But just having this log is not enough for testing earlycon? I am assuming that by just having the log since 0.0000 is a good sign that earlycon is working.
Could you give further guidance?First the kernel argument is simply "earlycon" with no other options, the earlycon code will fetch the first uart using the DT /chosen/stdout-path property.
Then you should see something like right after "Machine model":
[ 0.000000] earlycon: meson0 at MMIO0x00000000ff803000(options '115200n8')The boot log you share doesn't use earlycon, it waits until all depedency of the UART
has been probed before probing the UART driver and prints the whole boot log.Earlycon is a mechanism to use the UART HW as configured by the bootloader in
a minimal way very early in the boot in order to detect very early lockups.Keeping
OF_EARLYCON_DECLAREfor t7 would enable this.Neil
Quoted 3 lines
Lucas Tanure
Quoted 8 lines
Quoted 3 lines
But then we would need to add Earlycon for S4 too.
How can we add one Earlycon for all future SoCs, like S4 and T7?Per my understanding, you just need to declare UART dts node with the following compatible string: "amlogic,meson-ao-uart". It will enabled earlycon. There is no neccessary to declare separate
OF_EARLYCON_DECLARE(). It's working okay for A1 dts:
This works on A1 because uart_AO_B is an Always-On UART, and using amlogic,meson-ao-uart is corrent.
But for S4 & T7, Amlogic dropped the Always-On power domain, so there's no more AO uarts, so using amlogic,meson-ao-uart on those is abusing the DT to enable a driver functionality.
So the solution is to add those OF_EARLYCON_DECLARE and only use the correct /chosen/stdout-path property.
Neil
Quoted 12 lines
meson-a1.dtsiuart declaration:uart_AO_B: serial@2000 { compatible = "amlogic,meson-a1-uart", "amlogic,meson-ao-uart"; reg = <0x0 0x2000 0x0 0x18>; interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>; clocks = <&xtal>, <&xtal>, <&xtal>; clock-names = "xtal", "pclk", "baud"; status = "disabled"; };
Quoted 15 lines
earlycon declaration from dts:
aliases { serial0 = &uart_AO_B; }; chosen { stdout-path = "serial0:115200n8"; };Quoted 5 lines
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Quoted 110 lines · Neil Armstrong
Hi,
Quoted 98 lines · Dmitry Rokosov
Quoted 97 lines · Lucas Tanure
Quoted 96 lines · Neil Armstrong
Hi Lucas,
Le 27/08/2023 à 12:04, Lucas Tanure a écrit :
Quoted 60 lines · Neil Armstrong
Quoted 32 lines
Hi Lucas,
Le 27/08/2023 à 10:29, Lucas Tanure a écrit :
Quoted 18 lines
This reverts commit
6a4197f9763325043abf7690a21124a9facbf52e. New SoC will use ttyS0 instead of ttyAML, so T7 SoC doesn't need aOF_EARLYCON_DECLARE.Signed-off-by Lucas Tanure <[email protected]>---
Since V1:
- add Signed-off-by:drivers/tty/serial/meson_uart.c | 2 -- 1 file changed, 2 deletions(-)drivers/tty/serial/meson_uart.c +0
-0@@ -648,8 +648,6 @@ meson_serial_early_console_setup(structQuoted 8 lines
earlycon_device*device, const char *opt
OF_EARLYCON_DECLARE(meson, "amlogic,meson-ao-uart", meson_serial_early_console_setup);
-OF_EARLYCON_DECLARE(meson, "amlogic,t7-uart", -meson_serial_early_console_setup);
#defineMESON_SERIAL_CONSOLE_PTR(_devname)
(&meson_serial_console_##_devname)
#elseHow do you use earlycon with this removed ?
Quoted 1 line
Neil
This is my kernel cmdline:
console=ttyS0,921600no_console_suspendearlycon=ttyS0,0xfe078000And I can see my log:
boot 64bit kernel
[ 0.000000] Booting Linux on physical CPU0x0000000000[0x410fd092] [ 0.000000] Linux version 6.5.0-rc7-next-20230825+ (tanureal@ryzen) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 10.3.1 20210621, GNU ld (GNU Toolchain fo3
[ 0.000000] KASLR disabled due to lack of seed
[ 0.000000] Machine model: Khadas vim4
[ 0.000000] OF: reserved mem:
0x0000000005000000..0x00000000052fffff (3072 KiB) nomap non-reusable secmon@5000000
[ 0.000000] OF: reserved mem:
0x0000000005300000..0x00000000072fffff (32768 KiB) nomap non-reusable secmon@5300000
...
[ 0.079368] io scheduler mq-deadline registered
[ 0.079374] io scheduler kyber registered
[ 0.079549] io scheduler bfq registered
[ 0.083373] fe078000.serial: ttyS0 at MMIO0xfe078000(irq = 14,base_baud= 1500000) is ameson_uart
[ 0.083403] printk: console [ttyS0] enabledQuoted 7 lines
As the log is OK, and T7 for now is binding against S4 code we should drop this patch and add a S4 one if needed.
But just having this log is not enough for testing earlycon? I am assuming that by just having the log since 0.0000 is a good sign that earlycon is working.
Could you give further guidance?First the kernel argument is simply "earlycon" with no other options, the earlycon code will fetch the first uart using the DT /chosen/stdout-path property.
Then you should see something like right after "Machine model":
[ 0.000000] earlycon: meson0 at MMIO0x00000000ff803000(options '115200n8')The boot log you share doesn't use earlycon, it waits until all depedency of the UART
has been probed before probing the UART driver and prints the whole boot log.Earlycon is a mechanism to use the UART HW as configured by the bootloader in
a minimal way very early in the boot in order to detect very early lockups.Keeping
OF_EARLYCON_DECLAREfor t7 would enable this.Neil
Quoted 3 lines
Lucas Tanure
Quoted 8 lines
Quoted 3 lines
But then we would need to add Earlycon for S4 too.
How can we add one Earlycon for all future SoCs, like S4 and T7?Per my understanding, you just need to declare UART dts node with the following compatible string: "amlogic,meson-ao-uart". It will enabled earlycon. There is no neccessary to declare separate
OF_EARLYCON_DECLARE(). It's working okay for A1 dts:
Quoted 7 lines
This works on A1 because
uart_AO_Bis an Always-On UART, and using amlogic,meson-ao-uart is corrent.
But for S4 & T7, Amlogic dropped the Always-On power domain, so there's no more AO uarts, so using amlogic,meson-ao-uart on those is abusing the DT to enable a driver functionality.So the solution is to add those
OF_EARLYCON_DECLAREand only use the correct /chosen/stdout-path property.
Oh, I didn't know about missing Always-On UART AO power domain. In this situation I'm fully agree with separate OF_EARLYCON_DECLARE(). Thank you for explanation!
Quoted 28 lines
Quoted 27 lines
meson-a1.dtsiuart declaration:uart_AO_B: serial@2000 { compatible = "amlogic,meson-a1-uart", "amlogic,meson-ao-uart"; reg = <0x0 0x2000 0x0 0x18>; interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>; clocks = <&xtal>, <&xtal>, <&xtal>; clock-names = "xtal", "pclk", "baud"; status = "disabled"; };earlycon declaration from dts:
aliases { serial0 = &uart_AO_B; }; chosen { stdout-path = "serial0:115200n8"; };Quoted 5 lines
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Signature · 7 lines
Thank you, Dmitry _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
Quoted 153 lines · Dmitry Rokosov
Quoted 110 lines · Neil Armstrong
Hi,
Quoted 98 lines · Dmitry Rokosov
Quoted 97 lines · Lucas Tanure
Quoted 96 lines · Neil Armstrong
Hi Lucas,
Quoted 60 lines · Lucas Tanure
Quoted 32 lines · Neil Armstrong
Hi Lucas,
Quoted 24 lines · Lucas Tanure
This reverts commit
6a4197f9763325043abf7690a21124a9facbf52e. New SoC will use ttyS0 instead of ttyAML, so T7 SoC doesn't need aOF_EARLYCON_DECLARE.Signed-off-by Lucas Tanure <[email protected]>---
Since V1:
- add Signed-off-by:drivers/tty/serial/meson_uart.c | 2 -- 1 file changed, 2 deletions(-)drivers/tty/serial/meson_uart.c +0
-0@@ -648,8 +648,6 @@ meson_serial_early_console_setup(struct
earlycon_device*device, const char *opt
OF_EARLYCON_DECLARE(meson, "amlogic,meson-ao-uart",meson_serial_early_console_setup);drivers/tty/serial/meson_uart.c +0
-2-OF_EARLYCON_DECLARE (meson,"amlogic,t7-uart" , - meson_serial_early_console_setup);#define MESON_SERIAL_CONSOLE_PTR (_devname)Quoted 2 lines
(&meson_serial_console_##_devname)
#elseHow do you use earlycon with this removed ?
Quoted 1 line
Neil
This is my kernel cmdline:
console=ttyS0,921600no_console_suspendearlycon=ttyS0,0xfe078000And I can see my log:
boot 64bit kernel[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd092] [ 0.000000] Linux version 6.5.0-rc7-next-20230825+ (tanureal@ryzen) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 10.3.1 20210621, GNU ld (GNU Toolchain fo3 [ 0.000000] KASLR disabled due to lack of seed [ 0.000000] Machine model: Khadas vim4 [ 0.000000] OF: reserved mem: 0x0000000005000000..0x00000000052fffff (3072 KiB) nomap non-reusable secmon@5000000 [ 0.000000] OF: reserved mem: 0x0000000005300000..0x00000000072fffff (32768 KiB) nomap non-reusable secmon@5300000 ... [ 0.079368] io scheduler mq-deadline registered [ 0.079374] io scheduler kyber registered [ 0.079549] io scheduler bfq registered [ 0.083373] fe078000.serial: ttyS0 at MMIO 0xfe078000 (irq = 14, base_baud = 1500000) is a meson_uart [ 0.083403] printk: console [ttyS0] enabledQuoted 7 lines
As the log is OK, and T7 for now is binding against S4 code we should drop this patch and add a S4 one if needed.
But just having this log is not enough for testing earlycon? I am assuming that by just having the log since 0.0000 is a good sign that earlycon is working.
Could you give further guidance?First the kernel argument is simply "earlycon" with no other options, the earlycon code will fetch the first uart using the DT /chosen/stdout-path property.
Then you should see something like right after "Machine model":
[ 0.000000] earlycon: meson0 at MMIO 0x00000000ff803000 (options'115200n8')
The boot log you share doesn't use earlycon, it waits until all depedency of the UART
has been probed before probing the UART driver and prints the whole boot log.Earlycon is a mechanism to use the UART HW as configured by the bootloader in
a minimal way very early in the boot in order to detect very early lockups.Keeping
OF_EARLYCON_DECLAREfor t7 would enable this.Neil
Quoted 3 lines
Lucas Tanure
Quoted 8 lines
Quoted 3 lines
But then we would need to add Earlycon for S4 too.
How can we add one Earlycon for all future SoCs, like S4 and T7?Per my understanding, you just need to declare UART dts node with the following compatible string: "amlogic,meson-ao-uart". It will enabled earlycon. There is no neccessary to declare separate
OF_EARLYCON_DECLARE(). It's working okay for A1 dts:Quoted 7 lines
This works on A1 because
uart_AO_Bis an Always-On UART, and using amlogic,meson-ao-uart is corrent.
But for S4 & T7, Amlogic dropped the Always-On power domain, so there's no more AO uarts, so using amlogic,meson-ao-uart on those is abusing the DT to enable a driver functionality.So the solution is to add those
OF_EARLYCON_DECLAREand only use the correct /chosen/stdout-path property.Oh, I didn't know about missing Always-On UART AO power domain. In this situation I'm fully agree with separate
OF_EARLYCON_DECLARE(). Thank you for explanation!Quoted 22 lines
Quoted 22 lines
meson-a1.dtsiuart declaration:uart_AO_B: serial@2000 { compatible = "amlogic,meson-a1-uart", "amlogic,meson-ao-uart"; reg = <0x0 0x2000 0x0 0x18>; interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>; clocks = <&xtal>, <&xtal>, <&xtal>; clock-names = "xtal", "pclk", "baud"; status = "disabled"; };earlycon declaration from dts:
aliases { serial0 = &uart_AO_B; }; chosen { stdout-path = "serial0:115200n8"; };Quoted 1 line
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Quoted 3 lines
--
Thank you,
Dmitry
So let's add:
OF_EARLYCON_DECLARE(meson, "amlogic,meson-s4-uart", meson_serial_early_console_setup);
ok?
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Neil Armstrong
maintainerQuoted 157 lines · Lucas Tanure
Quoted 153 lines · Dmitry Rokosov
Quoted 110 lines · Neil Armstrong
Hi,
Quoted 98 lines · Dmitry Rokosov
Quoted 97 lines · Lucas Tanure
Quoted 96 lines · Neil Armstrong
Hi Lucas,
Quoted 60 lines · Lucas Tanure
Quoted 32 lines · Neil Armstrong
Hi Lucas,
Quoted 25 lines · Lucas Tanure
This reverts commit
6a4197f9763325043abf7690a21124a9facbf52e. New SoC will use ttyS0 instead of ttyAML, so T7 SoC doesn't need aOF_EARLYCON_DECLARE.Signed-off-by Lucas Tanure <[email protected]>---
Since V1:
- add Signed-off-by:drivers/tty/serial/meson_uart.c | 2 -- 1 file changed, 2 deletions(-)drivers/tty/serial/meson_uart.c +0
-0@@ -648,8 +648,6 @@ meson_serial_early_console_setup(struct
earlycon_device*device, const char *optOF_EARLYCON_DECLARE(meson, "amlogic,meson-ao-uart", meson_serial_early_console_setup);drivers/tty/serial/meson_uart.c +0
-2-OF_EARLYCON_DECLARE (meson,"amlogic,t7-uart" , - meson_serial_early_console_setup);#define MESON_SERIAL_CONSOLE_PTR (_devname)(&meson_serial_console_##_devname)
Quoted 1 line
#elseHow do you use earlycon with this removed ?
Quoted 1 line
Neil
This is my kernel cmdline:
console=ttyS0,921600no_console_suspendearlycon=ttyS0,0xfe078000And I can see my log:
boot 64bit kernel[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd092] [ 0.000000] Linux version 6.5.0-rc7-next-20230825+ (tanureal@ryzen) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 10.3.1 20210621, GNU ld (GNU Toolchain fo3 [ 0.000000] KASLR disabled due to lack of seed [ 0.000000] Machine model: Khadas vim4 [ 0.000000] OF: reserved mem: 0x0000000005000000..0x00000000052fffff (3072 KiB) nomap non-reusable secmon@5000000 [ 0.000000] OF: reserved mem: 0x0000000005300000..0x00000000072fffff (32768 KiB) nomap non-reusable secmon@5300000 ... [ 0.079368] io scheduler mq-deadline registered [ 0.079374] io scheduler kyber registered [ 0.079549] io scheduler bfq registered [ 0.083373] fe078000.serial: ttyS0 at MMIO 0xfe078000 (irq = 14, base_baud = 1500000) is a meson_uart [ 0.083403] printk: console [ttyS0] enabledQuoted 7 lines
As the log is OK, and T7 for now is binding against S4 code we should drop this patch and add a S4 one if needed.
But just having this log is not enough for testing earlycon? I am assuming that by just having the log since 0.0000 is a good sign that earlycon is working.
Could you give further guidance?First the kernel argument is simply "earlycon" with no other options, the earlycon code will fetch the first uart using the DT /chosen/stdout-path property.
Then you should see something like right after "Machine model":
[ 0.000000] earlycon: meson0 at MMIO 0x00000000ff803000 (options'115200n8')
The boot log you share doesn't use earlycon, it waits until all depedency of the UART
has been probed before probing the UART driver and prints the whole boot log.Earlycon is a mechanism to use the UART HW as configured by the bootloader in
a minimal way very early in the boot in order to detect very early lockups.Keeping
OF_EARLYCON_DECLAREfor t7 would enable this.Neil
Quoted 3 lines
Lucas Tanure
Quoted 8 lines
Quoted 3 lines
But then we would need to add Earlycon for S4 too.
How can we add one Earlycon for all future SoCs, like S4 and T7?Per my understanding, you just need to declare UART dts node with the following compatible string: "amlogic,meson-ao-uart". It will enabled earlycon. There is no neccessary to declare separate
OF_EARLYCON_DECLARE(). It's working okay for A1 dts:Quoted 7 lines
This works on A1 because
uart_AO_Bis an Always-On UART, and using amlogic,meson-ao-uart is corrent.
But for S4 & T7, Amlogic dropped the Always-On power domain, so there's no more AO uarts, so using amlogic,meson-ao-uart on those is abusing the DT to enable a driver functionality.So the solution is to add those
OF_EARLYCON_DECLAREand only use the correct /chosen/stdout-path property.Oh, I didn't know about missing Always-On UART AO power domain. In this situation I'm fully agree with separate
OF_EARLYCON_DECLARE(). Thank you for explanation!Quoted 22 lines
Quoted 22 lines
meson-a1.dtsiuart declaration:uart_AO_B: serial@2000 { compatible = "amlogic,meson-a1-uart", "amlogic,meson-ao-uart"; reg = <0x0 0x2000 0x0 0x18>; interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>; clocks = <&xtal>, <&xtal>, <&xtal>; clock-names = "xtal", "pclk", "baud"; status = "disabled"; };earlycon declaration from dts:
aliases { serial0 = &uart_AO_B; }; chosen { stdout-path = "serial0:115200n8"; };Quoted 1 line
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogicQuoted 3 lines
--
Thank you,
Dmitry
Quoted 6 lines
So let's add:
OF_EARLYCON_DECLARE(meson, "amlogic,meson-s4-uart", meson_serial_early_console_setup);ok?
Yes
Neil
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Hi Greg,
Quoted 16 lines · Lucas Tanure
This reverts commit
6a4197f9763325043abf7690a21124a9facbf52e.
New SoC will use ttyS0 instead of ttyAML, so T7 SoC doesn't need aOF_EARLYCON_DECLARE.Signed-off-by Lucas Tanure <[email protected]>---
Since V1:
- add Signed-off-by:drivers/tty/serial/meson_uart.c | 2 -- 1 file changed, 2 deletions(-)drivers/tty/serial/meson_uart.c +0
-0
drivers/tty/serial/meson_uart.c meson_serial_early_console_setup(struct earlycon_device *device, const char *opt · line 653
Quoted 8 lines
drivers/tty/serial/meson_uart.c +0
-2@@ -648,8 +648,6 @@ meson_serial_early_console_setup(struct earlycon_device *device, const char *optOF_EARLYCON_DECLARE (meson,"amlogic,meson-ao-uart" , meson_serial_early_console_setup); -OF_EARLYCON_DECLARE (meson,"amlogic,t7-uart" , - meson_serial_early_console_setup);#define MESON_SERIAL_CONSOLE_PTR (_devname) (&meson_serial_console_##_devname)#else
After some clarifications, it's ok to merge the revert:
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Greg Kroah-Hartman
maintainerQuoted 28 lines · Neil Armstrong
Hi Greg,
Quoted 16 lines · Lucas Tanure
This reverts commit
6a4197f9763325043abf7690a21124a9facbf52e.
New SoC will use ttyS0 instead of ttyAML, so T7 SoC doesn't need aOF_EARLYCON_DECLARE.Signed-off-by Lucas Tanure <[email protected]>---
Since V1:
- add Signed-off-by:drivers/tty/serial/meson_uart.c | 2 -- 1 file changed, 2 deletions(-)drivers/tty/serial/meson_uart.c +0
-0drivers/tty/serial/meson_uart.c meson_serial_early_console_setup(struct earlycon_device *device, const char *opt · line 651
Quoted 6 lines
drivers/tty/serial/meson_uart.c +0
-2@@ -648,8 +648,6 @@ meson_serial_early_console_setup(struct earlycon_device *device, const char *optOF_EARLYCON_DECLARE (meson,"amlogic,meson-ao-uart" , meson_serial_early_console_setup); -OF_EARLYCON_DECLARE (meson,"amlogic,t7-uart" , - meson_serial_early_console_setup);#define MESON_SERIAL_CONSOLE_PTR (_devname) (&meson_serial_console_##_devname)#else After some clarifications, it's ok to merge the revert:
Quoted 1 line
Acked-by Neil Armstrong <[email protected]>
Already merged :)
thanks,
greg k-h
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic