All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Protsenko <semen.protsenko@linaro.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
	Rob Herring <robh+dt@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jaewon Kim <jaewon02.kim@samsung.com>,
	Chanho Park <chanho61.park@samsung.com>,
	David Virag <virag.david003@gmail.com>,
	Youngmin Nam <youngmin.nam@samsung.com>,
	devicetree@vger.kernel.org, linux-serial@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org
Subject: [PATCH v3 0/5] soc: samsung: Add USI driver
Date: Sat,  4 Dec 2021 21:57:52 +0200	[thread overview]
Message-ID: <20211204195757.8600-1-semen.protsenko@linaro.org> (raw)

USIv2 IP-core provides selectable serial protocol (UART, SPI or
High-Speed I2C); only one can be chosen at a time. This series
implements USIv2 driver, which allows one to select particular USI
function in device tree, and also performs USI block initialization.

With that driver implemented, it's not needed to do USI initialization
in protocol drivers anymore, so that code is removed from the serial
driver.

Because USI driver is tristate (can be built as a module), serial driver
was reworked so it's possible to use its console part as a module too.
This way we can load serial driver module from user space and still have
serial console functional.

Design features:
  - "reg" property contains USI registers start address (0xc0 offset);
    it's used in the driver to access USI_CON and USI_OPTION registers.
    This way all USI initialization (reset, HWACG, etc) can be done in
    USIv2 driver separately, rather than duplicating that code over
    UART/SPI/I2C drivers
  - System Register (system controller node) and its SW_CONF register
    offset are provided in "samsung,sysreg" property; it's used to
    select USI function (protocol to be used)
  - USI function is specified in "samsung,mode" property; integer value
    is used to simplify parsing
  - there is "samsung,clkreq-on" bool property, which makes driver
    disable HWACG control (needed for UART to work properly)
  - PCLK and IPCLK clocks are both provided to USI node; apparently both
    need to be enabled to access USI registers
  - protocol nodes are embedded (as a child nodes) in USI node; it
    allows correct init order, and reflects HW properly
  - USI driver is a tristate: can be also useful from Android GKI
    requirements point of view
  - driver functions are implemented with further development in mind:
    - we might want to add some DebugFs interface later
    - some functions might need to be revealed to serial drivers with
      EXPORT_SYMBOL(), and provide somehow pointer to needed USI driver
      instance
    - another USI revisions could be added (like USIv1)

Changes in v3:
  - Renamed compatible from samsung,exynos-usi-v2 to samsung,exynos850-usi
  - Used clk_bulk API instead of handling each clock separately
  - Spell check fixes and coding style fixes
  - Improved dt-bindings doc

Changes in v2:
  - Renamed all 'usi_v2' wording to just 'usi' everywhere
  - Removed patches adding dependency on EXYNOS_USI for UART/I2C/SPI
    drivers
  - Added patch: "tty: serial: samsung: Fix console registration from
    module"
  - Combined dt-bindings doc and dt-bindings header patches
  - Reworked USI driver to be ready for USIv1 addition
  - Improved dt-bindings
  - Added USI_V2_NONE mode value

Sam Protsenko (5):
  dt-bindings: soc: samsung: Add Exynos USI bindings
  soc: samsung: Add USI driver
  tty: serial: samsung: Remove USI initialization
  tty: serial: samsung: Enable console as module
  tty: serial: samsung: Fix console registration from module

 .../bindings/soc/samsung/exynos-usi.yaml      | 159 ++++++++++
 drivers/soc/samsung/Kconfig                   |  14 +
 drivers/soc/samsung/Makefile                  |   2 +
 drivers/soc/samsung/exynos-usi.c              | 285 ++++++++++++++++++
 drivers/tty/serial/Kconfig                    |   2 +-
 drivers/tty/serial/samsung_tty.c              |  78 ++---
 include/dt-bindings/soc/samsung,exynos-usi.h  |  17 ++
 include/linux/serial_s3c.h                    |   9 -
 8 files changed, 518 insertions(+), 48 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml
 create mode 100644 drivers/soc/samsung/exynos-usi.c
 create mode 100644 include/dt-bindings/soc/samsung,exynos-usi.h

-- 
2.30.2


WARNING: multiple messages have this Message-ID
From: Sam Protsenko <semen.protsenko@linaro.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
	Rob Herring <robh+dt@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jaewon Kim <jaewon02.kim@samsung.com>,
	Chanho Park <chanho61.park@samsung.com>,
	David Virag <virag.david003@gmail.com>,
	Youngmin Nam <youngmin.nam@samsung.com>,
	devicetree@vger.kernel.org, linux-serial@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org
Subject: [PATCH v3 0/5] soc: samsung: Add USI driver
Date: Sat,  4 Dec 2021 21:57:52 +0200	[thread overview]
Message-ID: <20211204195757.8600-1-semen.protsenko@linaro.org> (raw)

USIv2 IP-core provides selectable serial protocol (UART, SPI or
High-Speed I2C); only one can be chosen at a time. This series
implements USIv2 driver, which allows one to select particular USI
function in device tree, and also performs USI block initialization.

With that driver implemented, it's not needed to do USI initialization
in protocol drivers anymore, so that code is removed from the serial
driver.

Because USI driver is tristate (can be built as a module), serial driver
was reworked so it's possible to use its console part as a module too.
This way we can load serial driver module from user space and still have
serial console functional.

Design features:
  - "reg" property contains USI registers start address (0xc0 offset);
    it's used in the driver to access USI_CON and USI_OPTION registers.
    This way all USI initialization (reset, HWACG, etc) can be done in
    USIv2 driver separately, rather than duplicating that code over
    UART/SPI/I2C drivers
  - System Register (system controller node) and its SW_CONF register
    offset are provided in "samsung,sysreg" property; it's used to
    select USI function (protocol to be used)
  - USI function is specified in "samsung,mode" property; integer value
    is used to simplify parsing
  - there is "samsung,clkreq-on" bool property, which makes driver
    disable HWACG control (needed for UART to work properly)
  - PCLK and IPCLK clocks are both provided to USI node; apparently both
    need to be enabled to access USI registers
  - protocol nodes are embedded (as a child nodes) in USI node; it
    allows correct init order, and reflects HW properly
  - USI driver is a tristate: can be also useful from Android GKI
    requirements point of view
  - driver functions are implemented with further development in mind:
    - we might want to add some DebugFs interface later
    - some functions might need to be revealed to serial drivers with
      EXPORT_SYMBOL(), and provide somehow pointer to needed USI driver
      instance
    - another USI revisions could be added (like USIv1)

Changes in v3:
  - Renamed compatible from samsung,exynos-usi-v2 to samsung,exynos850-usi
  - Used clk_bulk API instead of handling each clock separately
  - Spell check fixes and coding style fixes
  - Improved dt-bindings doc

Changes in v2:
  - Renamed all 'usi_v2' wording to just 'usi' everywhere
  - Removed patches adding dependency on EXYNOS_USI for UART/I2C/SPI
    drivers
  - Added patch: "tty: serial: samsung: Fix console registration from
    module"
  - Combined dt-bindings doc and dt-bindings header patches
  - Reworked USI driver to be ready for USIv1 addition
  - Improved dt-bindings
  - Added USI_V2_NONE mode value

Sam Protsenko (5):
  dt-bindings: soc: samsung: Add Exynos USI bindings
  soc: samsung: Add USI driver
  tty: serial: samsung: Remove USI initialization
  tty: serial: samsung: Enable console as module
  tty: serial: samsung: Fix console registration from module

 .../bindings/soc/samsung/exynos-usi.yaml      | 159 ++++++++++
 drivers/soc/samsung/Kconfig                   |  14 +
 drivers/soc/samsung/Makefile                  |   2 +
 drivers/soc/samsung/exynos-usi.c              | 285 ++++++++++++++++++
 drivers/tty/serial/Kconfig                    |   2 +-
 drivers/tty/serial/samsung_tty.c              |  78 ++---
 include/dt-bindings/soc/samsung,exynos-usi.h  |  17 ++
 include/linux/serial_s3c.h                    |   9 -
 8 files changed, 518 insertions(+), 48 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml
 create mode 100644 drivers/soc/samsung/exynos-usi.c
 create mode 100644 include/dt-bindings/soc/samsung,exynos-usi.h

-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2021-12-04 19:58 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20211204195806epcas2p15410815b695603ef2429fc55730ddb21@epcas2p1.samsung.com>
2021-12-04 19:57 ` Sam Protsenko [this message]
2021-12-04 19:57   ` [PATCH v3 0/5] soc: samsung: Add USI driver Sam Protsenko
2021-12-04 19:57   ` [PATCH v3 1/5] dt-bindings: soc: samsung: Add Exynos USI bindings Sam Protsenko
2021-12-04 19:57     ` Sam Protsenko
2021-12-06 21:02     ` Rob Herring
2021-12-06 21:02       ` Rob Herring
2021-12-13 11:12     ` (subset) " Krzysztof Kozlowski
2021-12-13 11:12       ` Krzysztof Kozlowski
2021-12-04 19:57   ` [PATCH v3 2/5] soc: samsung: Add USI driver Sam Protsenko
2021-12-04 19:57     ` Sam Protsenko
2021-12-13 11:12     ` (subset) " Krzysztof Kozlowski
2021-12-13 11:12       ` Krzysztof Kozlowski
2021-12-04 19:57   ` [PATCH v3 3/5] tty: serial: samsung: Remove USI initialization Sam Protsenko
2021-12-04 19:57     ` Sam Protsenko
2021-12-13 11:00     ` Krzysztof Kozlowski
2021-12-13 11:00       ` Krzysztof Kozlowski
2021-12-13 11:31       ` Sam Protsenko
2021-12-13 11:31         ` Sam Protsenko
2021-12-13 11:33         ` Krzysztof Kozlowski
2021-12-13 11:33           ` Krzysztof Kozlowski
2021-12-13 11:35     ` Krzysztof Kozlowski
2021-12-13 11:35       ` Krzysztof Kozlowski
2021-12-20 15:21       ` Sam Protsenko
2021-12-20 15:21         ` Sam Protsenko
2021-12-20 15:55         ` Greg Kroah-Hartman
2021-12-20 15:55           ` Greg Kroah-Hartman
2021-12-04 19:57   ` [PATCH v3 4/5] tty: serial: samsung: Enable console as module Sam Protsenko
2021-12-04 19:57     ` Sam Protsenko
2021-12-13 11:35     ` Krzysztof Kozlowski
2021-12-13 11:35       ` Krzysztof Kozlowski
2021-12-04 19:57   ` [PATCH v3 5/5] tty: serial: samsung: Fix console registration from module Sam Protsenko
2021-12-04 19:57     ` Sam Protsenko
2021-12-13 11:39     ` Krzysztof Kozlowski
2021-12-13 11:39       ` Krzysztof Kozlowski
2021-12-05 16:24   ` [PATCH v3 0/5] soc: samsung: Add USI driver Krzysztof Kozlowski
2021-12-05 16:24     ` Krzysztof Kozlowski
2021-12-06 18:23     ` Krzysztof Kozlowski
2021-12-06 18:23       ` Krzysztof Kozlowski
2021-12-08  9:13       ` Chanho Park
2021-12-08  9:13         ` Chanho Park
2021-12-08  9:15   ` Chanho Park
2021-12-08  9:15     ` Chanho Park

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=20211204195757.8600-1-semen.protsenko@linaro.org \
    --to=semen.protsenko@linaro.org \
    --cc=chanho61.park@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jaewon02.kim@samsung.com \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=virag.david003@gmail.com \
    --cc=youngmin.nam@samsung.com \
    /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.