All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Frédéric Danis" <frederic.danis.oss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Graeme Gregory <graeme.gregory-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	marcel-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org,
	sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	loic.poulain-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org,
	hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	rafael-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org,
	linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [v3,2/2] ACPI / scan: Fix enumeration for special UART devices
Date: Fri, 2 Feb 2018 11:03:38 +0100	[thread overview]
Message-ID: <4eb3d357-bf54-2360-f547-d0c6fbbc8396@gmail.com> (raw)
In-Reply-To: <20180131142100.GE26342@xora-haswell>

Hi Graeme,

Le 31/01/2018 à 15:21, Graeme Gregory a écrit :
> On Wed, Oct 11, 2017 at 10:32:14AM +0200, Frédéric Danis wrote:
>> UART devices is expected to be enumerated by SerDev subsystem.
>>
>> During ACPI scan, serial devices behind SPI, I2C or UART buses are not
>> enumerated, allowing them to be enumerated by their respective parents.
>>
>> Rename *spi_i2c_slave* to *serial_bus_slave* as this will be used for serial
>> devices on serial buses (SPI, I2C or UART).
>>
>> On Macs an empty ResourceTemplate is returned for uart slaves.
>> Instead the device properties "baud", "parity", "dataBits", "stopBits" are
>> provided. Add a check for "baud" in acpi_is_serial_bus_slave().
>>
> This patch appears to break UART probing in ACPI on xgene based
> plaforms.
>
> The appropriate chunks of DSDT.
>
>      Device (_SB.AHBC)
>      {
>          OperationRegion (SRST, SystemMemory, 0x1F2AC000, 0x04)
>          OperationRegion (CLKE, SystemMemory, 0x1F2AC004, 0x04)
>          OperationRegion (SRRM, SystemMemory, 0x1F2AD070, 0x04)
>          OperationRegion (RD2F, SystemMemory, 0x1F2AE014, 0x04)
>
>      ...
>
>          Device (UAR0)
>          {
>              Name (_HID, "APMC0D08")  // _HID: Hardware ID
>              Name (_DDN, "UAR0")  // _DDN: DOS Device Name
>              Name (_UID, "UAR0")  // _UID: Unique ID
>              Name (_STR, Unicode ("APM88xxxx UART0 Controller"))  // _STR: Description String
>              Name (_ADR, 0x1C021000)  // _ADR: Address
>              Name (_CID, "NS16550A")  // _CID: Compatible ID
>
>      ...
>
>              Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
>              {
>                  Memory32Fixed (ReadWrite,
>                      0x1C021000,         // Address Base
>                      0x00000100,         // Address Length
>                      )
>                  UartSerialBusV2 (0x00002580, DataBitsEight, StopBitsOne,
>                      0x00, LittleEndian, ParityTypeNone, FlowControlHardware,
>                      0x0010, 0x0010, "UAR0",
>                      0x00, ResourceConsumer, , Exclusive,
>                      )
>                  Interrupt (ResourceProducer, Level, ActiveHigh, Exclusive, ,, )
>                  {
>                      0x0000006D,
>                  }
>              })

This seems to be related to 
https://bugzilla.redhat.com/show_bug.cgi?id=1531140
Am I correct?

The SerDev support should allow UART to appear as tty device if not used 
by an underlying component (cf. tty_port_register_device_attr() in 
drivers/tty/tty_port.c).

AFAIU, there is no internal device attached to this serial port.
Is it possible to get complete ACPI DSDT?

Is SerDev enabled on this device?
Boot logs with SerDev debug traces enabled can be useful to understand 
what happens.

Regards,

Fred

-- 
Frédéric Danis                       Embedded Linux Consultant
frederic.danis.oss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

WARNING: multiple messages have this Message-ID (diff)
From: "Frédéric Danis" <frederic.danis.oss@gmail.com>
To: Graeme Gregory <graeme.gregory@linaro.org>
Cc: robh@kernel.org, marcel@holtmann.org, sre@kernel.org,
	loic.poulain@gmail.com, johan@kernel.org, lukas@wunner.de,
	hdegoede@redhat.com, rafael@kernel.org, greg@kroah.com,
	linux-bluetooth@vger.kernel.org, linux-serial@vger.kernel.org,
	linux-acpi@vger.kernel.org
Subject: Re: [v3,2/2] ACPI / scan: Fix enumeration for special UART devices
Date: Fri, 2 Feb 2018 11:03:38 +0100	[thread overview]
Message-ID: <4eb3d357-bf54-2360-f547-d0c6fbbc8396@gmail.com> (raw)
In-Reply-To: <20180131142100.GE26342@xora-haswell>

Hi Graeme,

Le 31/01/2018 à 15:21, Graeme Gregory a écrit :
> On Wed, Oct 11, 2017 at 10:32:14AM +0200, Frédéric Danis wrote:
>> UART devices is expected to be enumerated by SerDev subsystem.
>>
>> During ACPI scan, serial devices behind SPI, I2C or UART buses are not
>> enumerated, allowing them to be enumerated by their respective parents.
>>
>> Rename *spi_i2c_slave* to *serial_bus_slave* as this will be used for serial
>> devices on serial buses (SPI, I2C or UART).
>>
>> On Macs an empty ResourceTemplate is returned for uart slaves.
>> Instead the device properties "baud", "parity", "dataBits", "stopBits" are
>> provided. Add a check for "baud" in acpi_is_serial_bus_slave().
>>
> This patch appears to break UART probing in ACPI on xgene based
> plaforms.
>
> The appropriate chunks of DSDT.
>
>      Device (_SB.AHBC)
>      {
>          OperationRegion (SRST, SystemMemory, 0x1F2AC000, 0x04)
>          OperationRegion (CLKE, SystemMemory, 0x1F2AC004, 0x04)
>          OperationRegion (SRRM, SystemMemory, 0x1F2AD070, 0x04)
>          OperationRegion (RD2F, SystemMemory, 0x1F2AE014, 0x04)
>
>      ...
>
>          Device (UAR0)
>          {
>              Name (_HID, "APMC0D08")  // _HID: Hardware ID
>              Name (_DDN, "UAR0")  // _DDN: DOS Device Name
>              Name (_UID, "UAR0")  // _UID: Unique ID
>              Name (_STR, Unicode ("APM88xxxx UART0 Controller"))  // _STR: Description String
>              Name (_ADR, 0x1C021000)  // _ADR: Address
>              Name (_CID, "NS16550A")  // _CID: Compatible ID
>
>      ...
>
>              Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
>              {
>                  Memory32Fixed (ReadWrite,
>                      0x1C021000,         // Address Base
>                      0x00000100,         // Address Length
>                      )
>                  UartSerialBusV2 (0x00002580, DataBitsEight, StopBitsOne,
>                      0x00, LittleEndian, ParityTypeNone, FlowControlHardware,
>                      0x0010, 0x0010, "UAR0",
>                      0x00, ResourceConsumer, , Exclusive,
>                      )
>                  Interrupt (ResourceProducer, Level, ActiveHigh, Exclusive, ,, )
>                  {
>                      0x0000006D,
>                  }
>              })

This seems to be related to 
https://bugzilla.redhat.com/show_bug.cgi?id=1531140
Am I correct?

The SerDev support should allow UART to appear as tty device if not used 
by an underlying component (cf. tty_port_register_device_attr() in 
drivers/tty/tty_port.c).

AFAIU, there is no internal device attached to this serial port.
Is it possible to get complete ACPI DSDT?

Is SerDev enabled on this device?
Boot logs with SerDev debug traces enabled can be useful to understand 
what happens.

Regards,

Fred

-- 
Frédéric Danis                       Embedded Linux Consultant
frederic.danis.oss@gmail.com

  reply	other threads:[~2018-02-02 10:03 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-11  8:32 [PATCH v3 0/2] ACPI serdev support Frédéric Danis
2017-10-11  8:32 ` Frédéric Danis
     [not found] ` <1507710734-32520-1-git-send-email-frederic.danis.oss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-11  8:32   ` [PATCH v3 1/2] serdev: Add ACPI support Frédéric Danis
2017-10-11  8:32     ` Frédéric Danis
2017-10-11  8:43     ` Johan Hovold
2017-10-11  8:32 ` [PATCH v3 2/2] ACPI / scan: Fix enumeration for special UART devices Frédéric Danis
2017-10-15  9:57   ` Lukas Wunner
     [not found]   ` <1507710734-32520-3-git-send-email-frederic.danis.oss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-01-31 14:21     ` [v3,2/2] " Graeme Gregory
2018-01-31 14:21       ` Graeme Gregory
2018-02-02 10:03       ` Frédéric Danis [this message]
2018-02-02 10:03         ` Frédéric Danis
2018-02-02 15:28         ` Graeme Gregory
2017-10-11  9:03 ` [PATCH v3 0/2] ACPI serdev support Johan Hovold
2017-10-11 13:09   ` Rafael J. Wysocki
2017-10-11 13:09     ` Rafael J. Wysocki
2017-10-11 18:32     ` Marcel Holtmann
2017-10-11 18:32       ` Marcel Holtmann
2017-10-18 14:46       ` Frédéric Danis
2017-10-18 14:56         ` Greg Kroah-Hartman
     [not found]           ` <20171018145608.GB27138-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2017-10-19 14:23             ` Johan Hovold
2017-10-19 14:23               ` Johan Hovold
2017-10-19 14:26               ` Hans de Goede
2017-10-19 14:32                 ` Marcel Holtmann
2017-10-19 14:56                   ` Hans de Goede
2017-10-19 16:15                     ` Loic Poulain
     [not found]                       ` <CAMZdPi_ZpNrdjJPnS_rQ9t3oYe6+en9oHQMjmMjx_xHL-WWZKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-19 18:50                         ` Hans de Goede
2017-10-19 18:50                           ` Hans de Goede
2017-10-19 19:00                           ` Marcel Holtmann
     [not found]                             ` <FFD85CA6-6BD9-45AA-B3C2-898212711C0C-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
2017-10-19 19:05                               ` Hans de Goede
2017-10-19 19:05                                 ` Hans de Goede
2017-10-21  9:59                             ` Johan Hovold
     [not found]                 ` <877ea825-eec5-d982-f962-d67067749009-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-10-19 14:32                   ` Johan Hovold
2017-10-19 14:32                     ` Johan Hovold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4eb3d357-bf54-2360-f547-d0c6fbbc8396@gmail.com \
    --to=frederic.danis.oss-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=graeme.gregory-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org \
    --cc=hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=loic.poulain-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org \
    --cc=marcel-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org \
    --cc=rafael-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.