mbox series

[v3,0/2] spi: Add support for Realtek RTL838x/RTL839x SoC SPI

Message ID 20210101132432.2785663-1-bert@biot.com
Headers show
Series spi: Add support for Realtek RTL838x/RTL839x SoC SPI | expand

Message

Bert Vermeulen Jan. 1, 2021, 1:24 p.m. UTC
v3:
- Added cpu_relax() to busy loop.
- Dropped .remove callback from driver struct.
- Use (variations of) realtek-rtl as prefix.
- Dropped Kconfig entry, and use MACH_REALTEK_RTL setting to build the
  driver, since there's no point booting without the SPI-connected flash.

v2:
- Rewrote from spi-nor driver to regular spi driver, implementing only
  set_cs() and transfer_one(). (Thanks Chuanhong Guo!)


Bert Vermeulen (2):
  dt-bindings: spi: Realtek RTL838x/RTL839x SPI controller
  spi: realtek-rtl: Add support for Realtek RTL838x/RTL839x SoC SPI
    controllers

 .../bindings/spi/realtek,rtl-spi.yaml         |  36 +++
 MAINTAINERS                                   |   6 +
 drivers/spi/Makefile                          |   1 +
 drivers/spi/spi-realtek-rtl.c                 | 205 ++++++++++++++++++
 4 files changed, 248 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/spi/realtek,rtl-spi.yaml
 create mode 100644 drivers/spi/spi-realtek-rtl.c

Comments

Mark Brown Jan. 4, 2021, 9:31 p.m. UTC | #1
On Fri, Jan 01, 2021 at 02:24:31PM +0100, Bert Vermeulen wrote:

> +  compatible:
> +    const: realtek,rtl-spi

This is still just using rtl-spi as the compatible string, please
address the feedback on the previous version.

Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.
Bert Vermeulen Jan. 5, 2021, 8:43 a.m. UTC | #2
On 1/4/21 10:31 PM, Mark Brown wrote:
> On Fri, Jan 01, 2021 at 02:24:31PM +0100, Bert Vermeulen wrote:

> 

>> +  compatible:

>> +    const: realtek,rtl-spi

> 

> This is still just using rtl-spi as the compatible string, please

> address the feedback on the previous version.


Mark,

The rtl prefix really is as close as it gets. This is being developed on 
RTL838x and RTL839x, but the driver very likely also works on RTL8196C and 
RTL93xx series. There's no difference to the SPI block in those SoCs.

Do you really want a different per-series compatible when the "IP block" was 
just copy-pasted between series in hardware?


-- 
Bert Vermeulen
bert@biot.com
Mark Brown Jan. 5, 2021, 1:47 p.m. UTC | #3
On Tue, Jan 05, 2021 at 09:43:59AM +0100, Bert Vermeulen wrote:
> On 1/4/21 10:31 PM, Mark Brown wrote:


> > This is still just using rtl-spi as the compatible string, please

> > address the feedback on the previous version.


> The rtl prefix really is as close as it gets. This is being developed on

> RTL838x and RTL839x, but the driver very likely also works on RTL8196C and

> RTL93xx series. There's no difference to the SPI block in those SoCs.


> Do you really want a different per-series compatible when the "IP block" was

> just copy-pasted between series in hardware?


Yes.