mbox series

[00/21] Adding support of ADI ARMv8 ADSP-SC598 SoC.

Message ID 20240912-test-v1-0-458fa57c8ccf@analog.com
Headers show
Series Adding support of ADI ARMv8 ADSP-SC598 SoC. | expand

Message

Arturs Artamonovs via B4 Relay Sept. 12, 2024, 6:24 p.m. UTC
This set of patches based on ADI fork of Linux Kerenl that support family of ADSP-SC5xx
SoC's and used by customers for some time . Patch series contains minimal set
of changes to add ADSP-SC598 support to upstream kernel. This series include
UART,I2C,IRQCHIP,RCU drivers and device-tree to be able boot on EV-SC598-SOM
board into serial shell and able to reset the board. Current SOM board
requires I2C expander to enable UART output.

UART,I2C and PINCTRL drivers are based on old Blackfin drivers with
ADSP-SC5xx related bug fixes and improvments.

Signed-off-by: Arturs Artamonovs <arturs.artamonovs@analog.com>
---
Arturs Artamonovs (21):
      arm64: Add ADI ADSP-SC598 SoC
      reset: Add driver for ADI ADSP-SC5xx reset controller
      dt-bindigs: arm64: adi,sc598 bindings
      dt-bindings: arm64: adi,sc598: Add ADSP-SC598 SoC bindings
      clock:Add driver for ADI ADSP-SC5xx PLL
      include: dt-binding: clock: add adi clock header file
      clock: Add driver for ADI ADSP-SC5xx clock
      dt-bindings: clock: adi,sc5xx-clocks: add bindings
      gpio: add driver for ADI ADSP-SC5xx platform
      dt-bindings: gpio: adi,adsp-port-gpio: add bindings
      irqchip: Add irqchip for ADI ADSP-SC5xx platform
      dt-bindings: irqchip: adi,adsp-pint: add binding
      pinctrl: Add drivers for ADI ADSP-SC5xx platform
      dt-bindings: pinctrl: adi,adsp-pinctrl: add bindings
      i2c: Add driver for ADI ADSP-SC5xx platforms
      dt-bindings: i2c: add i2c/twi driver documentation
      serial: adi,uart: Add driver for ADI ADSP-SC5xx
      dt-bindings: serial: adi,uart4: add adi,uart4 driver documentation
      arm64: dts: adi: sc598: add device tree
      arm64: defconfig: sc598 add minimal changes
      MAINTAINERS: add adi sc5xx maintainers

 .../devicetree/bindings/arm/analog/adi,sc5xx.yaml  |   24 +
 .../bindings/clock/adi,sc5xx-clocks.yaml           |   65 ++
 .../bindings/gpio/adi,adsp-port-gpio.yaml          |   69 ++
 Documentation/devicetree/bindings/i2c/adi,twi.yaml |   71 ++
 .../interrupt-controller/adi,adsp-pint.yaml        |   51 +
 .../bindings/pinctrl/adi,adsp-pinctrl.yaml         |   83 ++
 .../devicetree/bindings/serial/adi,uart.yaml       |   85 ++
 .../bindings/soc/adi/adi,reset-controller.yaml     |   38 +
 MAINTAINERS                                        |   22 +
 arch/arm64/Kconfig.platforms                       |   13 +
 arch/arm64/boot/dts/Makefile                       |    1 +
 arch/arm64/boot/dts/adi/Makefile                   |    2 +
 arch/arm64/boot/dts/adi/sc598-som-ezkit.dts        |   14 +
 arch/arm64/boot/dts/adi/sc598-som.dtsi             |   58 ++
 arch/arm64/boot/dts/adi/sc59x-64.dtsi              |  367 +++++++
 arch/arm64/configs/defconfig                       |    6 +
 drivers/clk/Kconfig                                |    9 +
 drivers/clk/Makefile                               |    1 +
 drivers/clk/adi/Makefile                           |    4 +
 drivers/clk/adi/clk-adi-pll.c                      |  151 +++
 drivers/clk/adi/clk-adi-sc598.c                    |  329 ++++++
 drivers/clk/adi/clk.h                              |   99 ++
 drivers/gpio/Kconfig                               |    8 +
 drivers/gpio/Makefile                              |    1 +
 drivers/gpio/gpio-adi-adsp-port.c                  |  145 +++
 drivers/i2c/busses/Kconfig                         |   17 +
 drivers/i2c/busses/Makefile                        |    1 +
 drivers/i2c/busses/i2c-adi-twi.c                   |  940 ++++++++++++++++++
 drivers/irqchip/Kconfig                            |    9 +
 drivers/irqchip/Makefile                           |    2 +
 drivers/irqchip/irq-adi-adsp.c                     |  310 ++++++
 drivers/pinctrl/Kconfig                            |   12 +
 drivers/pinctrl/Makefile                           |    1 +
 drivers/pinctrl/pinctrl-adsp.c                     |  919 +++++++++++++++++
 drivers/reset/Makefile                             |    1 +
 drivers/soc/Makefile                               |    1 +
 drivers/soc/adi/Makefile                           |    5 +
 drivers/soc/adi/system.c                           |  257 +++++
 drivers/tty/serial/Kconfig                         |   19 +-
 drivers/tty/serial/Makefile                        |    1 +
 drivers/tty/serial/adi_uart.c                      | 1045 ++++++++++++++++++++
 include/dt-bindings/clock/adi-sc5xx-clock.h        |   93 ++
 include/dt-bindings/pinctrl/adi-adsp.h             |   19 +
 include/linux/soc/adi/adsp-gpio-port.h             |   85 ++
 include/linux/soc/adi/cpu.h                        |  107 ++
 include/linux/soc/adi/rcu.h                        |   55 ++
 include/linux/soc/adi/sc59x.h                      |  147 +++
 include/linux/soc/adi/system_config.h              |   65 ++
 include/uapi/linux/serial_core.h                   |    3 +
 49 files changed, 5829 insertions(+), 1 deletion(-)
---
base-commit: da3ea35007d0af457a0afc87e84fddaebc4e0b63
change-id: 20240909-test-8ec5f76fe6d2

Best regards,

Comments

Rob Herring Sept. 12, 2024, 9:04 p.m. UTC | #1
On Thu, 12 Sep 2024 19:24:45 +0100, Arturs Artamonovs wrote:
> This set of patches based on ADI fork of Linux Kerenl that support family of ADSP-SC5xx
> SoC's and used by customers for some time . Patch series contains minimal set
> of changes to add ADSP-SC598 support to upstream kernel. This series include
> UART,I2C,IRQCHIP,RCU drivers and device-tree to be able boot on EV-SC598-SOM
> board into serial shell and able to reset the board. Current SOM board
> requires I2C expander to enable UART output.
> 
> UART,I2C and PINCTRL drivers are based on old Blackfin drivers with
> ADSP-SC5xx related bug fixes and improvments.
> 
> Signed-off-by: Arturs Artamonovs <arturs.artamonovs@analog.com>
> ---
> Arturs Artamonovs (21):
>       arm64: Add ADI ADSP-SC598 SoC
>       reset: Add driver for ADI ADSP-SC5xx reset controller
>       dt-bindigs: arm64: adi,sc598 bindings
>       dt-bindings: arm64: adi,sc598: Add ADSP-SC598 SoC bindings
>       clock:Add driver for ADI ADSP-SC5xx PLL
>       include: dt-binding: clock: add adi clock header file
>       clock: Add driver for ADI ADSP-SC5xx clock
>       dt-bindings: clock: adi,sc5xx-clocks: add bindings
>       gpio: add driver for ADI ADSP-SC5xx platform
>       dt-bindings: gpio: adi,adsp-port-gpio: add bindings
>       irqchip: Add irqchip for ADI ADSP-SC5xx platform
>       dt-bindings: irqchip: adi,adsp-pint: add binding
>       pinctrl: Add drivers for ADI ADSP-SC5xx platform
>       dt-bindings: pinctrl: adi,adsp-pinctrl: add bindings
>       i2c: Add driver for ADI ADSP-SC5xx platforms
>       dt-bindings: i2c: add i2c/twi driver documentation
>       serial: adi,uart: Add driver for ADI ADSP-SC5xx
>       dt-bindings: serial: adi,uart4: add adi,uart4 driver documentation
>       arm64: dts: adi: sc598: add device tree
>       arm64: defconfig: sc598 add minimal changes
>       MAINTAINERS: add adi sc5xx maintainers
> 
>  .../devicetree/bindings/arm/analog/adi,sc5xx.yaml  |   24 +
>  .../bindings/clock/adi,sc5xx-clocks.yaml           |   65 ++
>  .../bindings/gpio/adi,adsp-port-gpio.yaml          |   69 ++
>  Documentation/devicetree/bindings/i2c/adi,twi.yaml |   71 ++
>  .../interrupt-controller/adi,adsp-pint.yaml        |   51 +
>  .../bindings/pinctrl/adi,adsp-pinctrl.yaml         |   83 ++
>  .../devicetree/bindings/serial/adi,uart.yaml       |   85 ++
>  .../bindings/soc/adi/adi,reset-controller.yaml     |   38 +
>  MAINTAINERS                                        |   22 +
>  arch/arm64/Kconfig.platforms                       |   13 +
>  arch/arm64/boot/dts/Makefile                       |    1 +
>  arch/arm64/boot/dts/adi/Makefile                   |    2 +
>  arch/arm64/boot/dts/adi/sc598-som-ezkit.dts        |   14 +
>  arch/arm64/boot/dts/adi/sc598-som.dtsi             |   58 ++
>  arch/arm64/boot/dts/adi/sc59x-64.dtsi              |  367 +++++++
>  arch/arm64/configs/defconfig                       |    6 +
>  drivers/clk/Kconfig                                |    9 +
>  drivers/clk/Makefile                               |    1 +
>  drivers/clk/adi/Makefile                           |    4 +
>  drivers/clk/adi/clk-adi-pll.c                      |  151 +++
>  drivers/clk/adi/clk-adi-sc598.c                    |  329 ++++++
>  drivers/clk/adi/clk.h                              |   99 ++
>  drivers/gpio/Kconfig                               |    8 +
>  drivers/gpio/Makefile                              |    1 +
>  drivers/gpio/gpio-adi-adsp-port.c                  |  145 +++
>  drivers/i2c/busses/Kconfig                         |   17 +
>  drivers/i2c/busses/Makefile                        |    1 +
>  drivers/i2c/busses/i2c-adi-twi.c                   |  940 ++++++++++++++++++
>  drivers/irqchip/Kconfig                            |    9 +
>  drivers/irqchip/Makefile                           |    2 +
>  drivers/irqchip/irq-adi-adsp.c                     |  310 ++++++
>  drivers/pinctrl/Kconfig                            |   12 +
>  drivers/pinctrl/Makefile                           |    1 +
>  drivers/pinctrl/pinctrl-adsp.c                     |  919 +++++++++++++++++
>  drivers/reset/Makefile                             |    1 +
>  drivers/soc/Makefile                               |    1 +
>  drivers/soc/adi/Makefile                           |    5 +
>  drivers/soc/adi/system.c                           |  257 +++++
>  drivers/tty/serial/Kconfig                         |   19 +-
>  drivers/tty/serial/Makefile                        |    1 +
>  drivers/tty/serial/adi_uart.c                      | 1045 ++++++++++++++++++++
>  include/dt-bindings/clock/adi-sc5xx-clock.h        |   93 ++
>  include/dt-bindings/pinctrl/adi-adsp.h             |   19 +
>  include/linux/soc/adi/adsp-gpio-port.h             |   85 ++
>  include/linux/soc/adi/cpu.h                        |  107 ++
>  include/linux/soc/adi/rcu.h                        |   55 ++
>  include/linux/soc/adi/sc59x.h                      |  147 +++
>  include/linux/soc/adi/system_config.h              |   65 ++
>  include/uapi/linux/serial_core.h                   |    3 +
>  49 files changed, 5829 insertions(+), 1 deletion(-)
> ---
> base-commit: da3ea35007d0af457a0afc87e84fddaebc4e0b63
> change-id: 20240909-test-8ec5f76fe6d2
> 
> Best regards,
> --
> Arturs Artamonovs <arturs.artamonovs@analog.com>
> 
> 
> 


My bot found new DTB warnings on the .dts files added or changed in this
series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:

  pip3 install dtschema --upgrade


New warnings running 'make CHECK_DTBS=y adi/sc598-som-ezkit.dtb' for 20240912-test-v1-0-458fa57c8ccf@analog.com:

arch/arm64/boot/dts/adi/sc598-som-ezkit.dtb: /scb-bus/sec@31089000: failed to match any schema with compatible: ['adi,system-event-controller']
Arnd Bergmann Sept. 13, 2024, 8:20 a.m. UTC | #2
On Thu, Sep 12, 2024, at 18:24, Arturs Artamonovs via B4 Relay wrote:
> This set of patches based on ADI fork of Linux Kerenl that support 
> family of ADSP-SC5xx
> SoC's and used by customers for some time . Patch series contains 
> minimal set
> of changes to add ADSP-SC598 support to upstream kernel. This series 
> include
> UART,I2C,IRQCHIP,RCU drivers and device-tree to be able boot on 
> EV-SC598-SOM
> board into serial shell and able to reset the board. Current SOM board
> requires I2C expander to enable UART output.
>
> UART,I2C and PINCTRL drivers are based on old Blackfin drivers with
> ADSP-SC5xx related bug fixes and improvments.
>
> Signed-off-by: Arturs Artamonovs <arturs.artamonovs@analog.com>

Hi Arturs,

Thanks for your submission. I've done a first pass of a review
now, but the drivers will all need a more detailed review from
the subsystem maintainers as well.

For the drivers/soc and include/linux/soc portions, I need
to do second review round when you have added a description
about what these are used for, ideally I would hope that most
of those can disappear from the final series when the required
bits are moved into other drivers.

I commented on one of the bindings about the compatible
string, but later saw that the same issue is present in all
of the bindings, which each need a more specific identifier
for a particular piece of hardware they are compatible with.

        Arnd
Krzysztof Kozlowski Sept. 16, 2024, 6:57 a.m. UTC | #3
On 12/09/2024 23:04, Rob Herring (Arm) wrote:
> 
> On Thu, 12 Sep 2024 19:24:45 +0100, Arturs Artamonovs wrote:
>> This set of patches based on ADI fork of Linux Kerenl that support family of ADSP-SC5xx
>> SoC's and used by customers for some time . Patch series contains minimal set
>> of changes to add ADSP-SC598 support to upstream kernel. This series include
>> UART,I2C,IRQCHIP,RCU drivers and device-tree to be able boot on EV-SC598-SOM
>> board into serial shell and able to reset the board. Current SOM board
>> requires I2C expander to enable UART output.
>>
>> UART,I2C and PINCTRL drivers are based on old Blackfin drivers with
>> ADSP-SC5xx related bug fixes and improvments.
>>
>> Signed-off-by: Arturs Artamonovs <arturs.artamonovs@analog.com>
>> ---
>> Arturs Artamonovs (21):
>>       arm64: Add ADI ADSP-SC598 SoC
>>       reset: Add driver for ADI ADSP-SC5xx reset controller
>>       dt-bindigs: arm64: adi,sc598 bindings
>>       dt-bindings: arm64: adi,sc598: Add ADSP-SC598 SoC bindings
>>       clock:Add driver for ADI ADSP-SC5xx PLL
>>       include: dt-binding: clock: add adi clock header file
>>       clock: Add driver for ADI ADSP-SC5xx clock
>>       dt-bindings: clock: adi,sc5xx-clocks: add bindings
>>       gpio: add driver for ADI ADSP-SC5xx platform
>>       dt-bindings: gpio: adi,adsp-port-gpio: add bindings
>>       irqchip: Add irqchip for ADI ADSP-SC5xx platform
>>       dt-bindings: irqchip: adi,adsp-pint: add binding
>>       pinctrl: Add drivers for ADI ADSP-SC5xx platform
>>       dt-bindings: pinctrl: adi,adsp-pinctrl: add bindings
>>       i2c: Add driver for ADI ADSP-SC5xx platforms
>>       dt-bindings: i2c: add i2c/twi driver documentation
>>       serial: adi,uart: Add driver for ADI ADSP-SC5xx
>>       dt-bindings: serial: adi,uart4: add adi,uart4 driver documentation
>>       arm64: dts: adi: sc598: add device tree
>>       arm64: defconfig: sc598 add minimal changes
>>       MAINTAINERS: add adi sc5xx maintainers
>>
>>  .../devicetree/bindings/arm/analog/adi,sc5xx.yaml  |   24 +
>>  .../bindings/clock/adi,sc5xx-clocks.yaml           |   65 ++
>>  .../bindings/gpio/adi,adsp-port-gpio.yaml          |   69 ++
>>  Documentation/devicetree/bindings/i2c/adi,twi.yaml |   71 ++
>>  .../interrupt-controller/adi,adsp-pint.yaml        |   51 +
>>  .../bindings/pinctrl/adi,adsp-pinctrl.yaml         |   83 ++
>>  .../devicetree/bindings/serial/adi,uart.yaml       |   85 ++
>>  .../bindings/soc/adi/adi,reset-controller.yaml     |   38 +
>>  MAINTAINERS                                        |   22 +
>>  arch/arm64/Kconfig.platforms                       |   13 +
>>  arch/arm64/boot/dts/Makefile                       |    1 +
>>  arch/arm64/boot/dts/adi/Makefile                   |    2 +
>>  arch/arm64/boot/dts/adi/sc598-som-ezkit.dts        |   14 +
>>  arch/arm64/boot/dts/adi/sc598-som.dtsi             |   58 ++
>>  arch/arm64/boot/dts/adi/sc59x-64.dtsi              |  367 +++++++
>>  arch/arm64/configs/defconfig                       |    6 +
>>  drivers/clk/Kconfig                                |    9 +
>>  drivers/clk/Makefile                               |    1 +
>>  drivers/clk/adi/Makefile                           |    4 +
>>  drivers/clk/adi/clk-adi-pll.c                      |  151 +++
>>  drivers/clk/adi/clk-adi-sc598.c                    |  329 ++++++
>>  drivers/clk/adi/clk.h                              |   99 ++
>>  drivers/gpio/Kconfig                               |    8 +
>>  drivers/gpio/Makefile                              |    1 +
>>  drivers/gpio/gpio-adi-adsp-port.c                  |  145 +++
>>  drivers/i2c/busses/Kconfig                         |   17 +
>>  drivers/i2c/busses/Makefile                        |    1 +
>>  drivers/i2c/busses/i2c-adi-twi.c                   |  940 ++++++++++++++++++
>>  drivers/irqchip/Kconfig                            |    9 +
>>  drivers/irqchip/Makefile                           |    2 +
>>  drivers/irqchip/irq-adi-adsp.c                     |  310 ++++++
>>  drivers/pinctrl/Kconfig                            |   12 +
>>  drivers/pinctrl/Makefile                           |    1 +
>>  drivers/pinctrl/pinctrl-adsp.c                     |  919 +++++++++++++++++
>>  drivers/reset/Makefile                             |    1 +
>>  drivers/soc/Makefile                               |    1 +
>>  drivers/soc/adi/Makefile                           |    5 +
>>  drivers/soc/adi/system.c                           |  257 +++++
>>  drivers/tty/serial/Kconfig                         |   19 +-
>>  drivers/tty/serial/Makefile                        |    1 +
>>  drivers/tty/serial/adi_uart.c                      | 1045 ++++++++++++++++++++
>>  include/dt-bindings/clock/adi-sc5xx-clock.h        |   93 ++
>>  include/dt-bindings/pinctrl/adi-adsp.h             |   19 +
>>  include/linux/soc/adi/adsp-gpio-port.h             |   85 ++
>>  include/linux/soc/adi/cpu.h                        |  107 ++
>>  include/linux/soc/adi/rcu.h                        |   55 ++
>>  include/linux/soc/adi/sc59x.h                      |  147 +++
>>  include/linux/soc/adi/system_config.h              |   65 ++
>>  include/uapi/linux/serial_core.h                   |    3 +
>>  49 files changed, 5829 insertions(+), 1 deletion(-)
>> ---
>> base-commit: da3ea35007d0af457a0afc87e84fddaebc4e0b63
>> change-id: 20240909-test-8ec5f76fe6d2
>>
>> Best regards,
>> --
>> Arturs Artamonovs <arturs.artamonovs@analog.com>
>>
>>
>>
> 
> 
> My bot found new DTB warnings on the .dts files added or changed in this
> series.
> 
> Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
> are fixed by another series. Ultimately, it is up to the platform
> maintainer whether these warnings are acceptable or not. No need to reply
> unless the platform maintainer has comments.
> 
> If you already ran DT checks and didn't see these error(s), then
> make sure dt-schema is up to date:
> 
>   pip3 install dtschema --upgrade
> 
> 
> New warnings running 'make CHECK_DTBS=y adi/sc598-som-ezkit.dtb' for 20240912-test-v1-0-458fa57c8ccf@analog.com:
> 
> arch/arm64/boot/dts/adi/sc598-som-ezkit.dtb: /scb-bus/sec@31089000: failed to match any schema with compatible: ['adi,system-event-controller']

This must be addressed and fixed.

Best regards,
Krzysztof
Krzysztof Kozlowski Sept. 16, 2024, 9:05 a.m. UTC | #4
On 12/09/2024 20:24, Arturs Artamonovs via B4 Relay wrote:
> This set of patches based on ADI fork of Linux Kerenl that support family of ADSP-SC5xx
> SoC's and used by customers for some time . Patch series contains minimal set
> of changes to add ADSP-SC598 support to upstream kernel. This series include
> UART,I2C,IRQCHIP,RCU drivers and device-tree to be able boot on EV-SC598-SOM
> board into serial shell and able to reset the board. Current SOM board
> requires I2C expander to enable UART output.
> 
> UART,I2C and PINCTRL drivers are based on old Blackfin drivers with
> ADSP-SC5xx related bug fixes and improvments.
> 
> Signed-off-by: Arturs Artamonovs <arturs.artamonovs@analog.com>
> ---

For new platform, be sure you have 0 warnings:
1. Please run standard kernel tools for static analysis, like
coccinelle, smatch and sparse, and fix reported warnings.

2. Also check for warnings when building with W=1. Most of these
commands (checks or W=1 build) can build specific targets, like some
directory, to narrow the scope to only your code. The code here looks
like it needs a fix. Feel free to get in touch if the warning is not clear.

3. Fix all compile test warning reported by LKP and check for common
configs, regardless of reports.

4. Please run `make dtbs_check W=1` (see
Documentation/devicetree/bindings/writing-schema.rst or
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).

5. Please run scripts/checkpatch.pl and fix reported warnings. Then
please run `scripts/checkpatch.pl --strict` and (probably) fix more
warnings. Some warnings can be ignored, especially from --strict run.


Best regards,
Krzysztof