Add FSD SPI support
Subsystems (5)
A message that is not in the archive (sent off-list or not yet received): CGME20220125032811epcas5p3ef7b2f4e4906c1da8ccb4a0b3ed9a591@epcas5p3.samsung.com
Alim Akhtar
maintainerv3 cover Add FSD SPI support
Adds support for SPI controller found in Tesla FSD SoC
- Changes since v2
* Addressed review comments of Andi
* rebased on Krzysztof's v6 spi schema changes
* Added tags
-Changes since v1
* Splited SPI changes from a larger inital patch set
* Rebased on Krzysztof's latest (v5) SPI schema changes
* Added tag
Note: This series is depended on [1] patches which adds support of FSD SoC and on Krzysztof's v6 [2] of spi schema changes
[1] https://lkml.org/lkml/2022/1/24/583
[2] https://lkml.org/lkml/2022/1/24/120
Alim Akhtar (2):
spi: dt-bindings: samsung: Add fsd spi compatible
spi: s3c64xx: Add spi port configuration for Tesla FSD SoC
Aswani Reddy (1):
arm64: dts: fsd: Add SPI device nodes
.../devicetree/bindings/spi/samsung,spi.yaml | 1 + arch/arm64/boot/dts/tesla/fsd.dtsi | 57 +++++++++++++++++++ drivers/spi/spi-s3c64xx.c | 13 +++++ 3 files changed, 71 insertions(+)
Signature · 7 lines
2.25.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Alim Akhtar
maintainerPATCH v3 1/3 spi: dt-bindings: samsung: Add fsd spi compatible
Adds spi controller dt-binding compatible information for Tesla Full Self-Driving (FSD) SoC.
--- Documentation/devicetree/bindings/spi/samsung,spi.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/spi/samsung,spi.yaml +1 -0
@@ -21,6 +21,7 @@ properties: - samsung,s3c6410-spi - samsung,s5pv210-spi # for S5PV210 and S5PC110 - samsung,exynos5433-spi + - tesla,fsd-spi - const: samsung,exynos7-spi deprecated: true
Signature · 7 lines
2.25.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v3 1/3] spi: dt-bindings: samsung: Add fsd spi compatible
Quoted 8 lines · Alim Akhtar
Adds spi controller dt-binding compatible information for Tesla Full Self-Driving (FSD) SoC.
Signed-off-by Adithya K V <[email protected]>Signed-off-by Alim Akhtar <[email protected]>Reviewed-by Krzysztof Kozlowski <[email protected]>Reviewed-by Andi Shyti <[email protected]>
The SoC is confirmed to be Tesla-specific, so:
Yours,
Linus Walleij
Re: [PATCH v3 1/3] spi: dt-bindings: samsung: Add fsd spi compatible
In reply to Alim AkhtarQuoted 12 lines · Alim Akhtar
Adds spi controller dt-binding compatible information for Tesla Full Self-Driving (FSD) SoC.
Signed-off-by Adithya K V <[email protected]>Signed-off-by Alim Akhtar <[email protected]>Reviewed-by Krzysztof Kozlowski <[email protected]>Reviewed-by Andi Shyti <[email protected]>--- Documentation/devicetree/bindings/spi/samsung,spi.yaml | 1 + 1 file changed, 1 insertion(+)
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Alim Akhtar
maintainerPATCH v3 2/3 spi: s3c64xx: Add spi port configuration for Tesla FSD SoC
In reply to Alim AkhtarAdd compatible and port configuration for spi controller for Tesla Full Self-Driving SoC.
--- drivers/spi/spi-s3c64xx.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/spi/spi-s3c64xx.c +13 -0
@@ -1440,6 +1440,16 @@ static const struct s3c64xx_spi_port_config exynos5433_spi_port_config = { .quirks = S3C64XX_SPI_QUIRK_CS_AUTO, }; +static struct s3c64xx_spi_port_config fsd_spi_port_config = { + .fifo_lvl_mask = {0x7f ,0x7f ,0x7f ,0x7f ,0x7f }, + .rx_lvl_offset =15 , + .tx_st_done =25 , + .high_speed = true, + .clk_from_cmu = true, + .clk_ioclk = false, + .quirks =S3C64XX_SPI_QUIRK_CS_AUTO , +}; +static const struct platform_device_id s3c64xx_spi_driver_ids[] = { { .name ="s3c2443-spi" ,
@@ -1470,6 +1480,9 @@ static const struct of_device_id s3c64xx_spi_dt_match[] = { { .compatible = "samsung,exynos5433-spi", .data = (void *)&exynos5433_spi_port_config, }, + { .compatible = "tesla,fsd-spi", + .data = (void *)&fsd_spi_port_config, + }, { }, };MODULE_DEVICE_TABLE (of, s3c64xx_spi_dt_match);
Signature · 7 lines
2.25.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v3 2/3] spi: s3c64xx: Add spi port configuration for Tesla FSD SoC
Quoted 8 lines · Alim Akhtar
Add compatible and port configuration for spi controller for Tesla Full Self-Driving SoC.
Signed-off-by Aswani Reddy <[email protected]>Signed-off-by Alim Akhtar <[email protected]>Reviewed-by Krzysztof Kozlowski <[email protected]>Reviewed-by Andi Shyti <[email protected]>
Now I however remember that there was some discussion around the compatible naming. I do not especially care which naming we end up with but just make sure the compatible naming is the same in this compatible as in the rest of the platform.
Yours,
Linus Walleij
Alim Akhtar
maintainerPATCH v3 3/3 arm64: dts: fsd: Add SPI device nodes
In reply to Alim AkhtarFrom: Aswani Reddy <[email protected]>
Adds device tree node for SPI IPs
--- arch/arm64/boot/dts/tesla/fsd.dtsi | 57 ++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+)
arch/arm64/boot/dts/tesla/fsd.dtsi +57 -0
@@ -29,6 +29,9 @@ aliases { pinctrl0 = &pinctrl_fsys0; pinctrl1 = &pinctrl_peric; pinctrl2 = &pinctrl_pmu; + spi0 = &spi_0; + spi1 = &spi_1; + spi2 = &spi_2; }; cpus {
@@ -668,6 +671,60 @@ pinctrl_fsys0: pinctrl@15020000 { reg = <0x0 0x15020000 0x0 0x1000>; interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>; }; + + spi_0: spi@14140000 { + compatible = "tesla,fsd-spi"; + reg = <0x0 0x14140000 0x0 0x100>; + interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&pdma1 4>, <&pdma1 5>; + dma-names = "tx", "rx"; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&clock_peric PERIC_PCLK_SPI0>, + <&clock_peric PERIC_SCLK_SPI0>; + clock-names = "spi", "spi_busclk0"; + samsung,spi-src-clk = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&spi0_bus>; + num-cs = <1>; + status = "disabled"; + }; + + spi_1: spi@14150000 { + compatible = "tesla,fsd-spi"; + reg = <0x0 0x14150000 0x0 0x100>; + interrupts = <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&pdma1 6>, <&pdma1 7>; + dma-names = "tx", "rx"; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&clock_peric PERIC_PCLK_SPI1>, + <&clock_peric PERIC_SCLK_SPI1>; + clock-names = "spi", "spi_busclk0"; + samsung,spi-src-clk = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&spi1_bus>; + num-cs = <1>; + status = "disabled"; + }; + + spi_2: spi@14160000 { + compatible = "tesla,fsd-spi"; + reg = <0x0 0x14160000 0x0 0x100>; + interrupts = <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&pdma1 8>, <&pdma1 9>; + dma-names = "tx", "rx"; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&clock_peric PERIC_PCLK_SPI2>, + <&clock_peric PERIC_SCLK_SPI2>; + clock-names = "spi", "spi_busclk0"; + samsung,spi-src-clk = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&spi2_bus>; + num-cs = <1>; + status = "disabled"; + }; }; };
Signature · 7 lines
2.25.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Krzysztof Kozlowski
AppliedRe: (subset) [PATCH v3 3/3] arm64: dts: fsd: Add SPI device nodes
Quoted 5 lines · Alim Akhtar
From: Aswani Reddy <[email protected]>
Adds device tree node for SPI IPs
Applied, thanks!
[3/3] arm64: dts: fsd: Add SPI device nodes
commit: bd1e3696a052b9b2bd3c1c72ef4bf800a3a1e286
Best regards,
Signature · 1 line
Krzysztof Kozlowski <[email protected]>
Mark Brown
maintainerQuoted 5 lines · Alim Akhtar
Note: This series is depended on [1] patches which adds support of FSD SoC and on Krzysztof's v6 [2] of spi schema changes
[1] https://lkml.org/lkml/2022/1/24/583
[2] https://lkml.org/lkml/2022/1/24/120
Please resend this when it can be applied, either wait until the dependencies are in place or rebase on top of current code. In general only build time dependencies matter here, the SoC support being merged shouldn't be an issue one way or another.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Alim Akhtar
maintainerHi Mark and Lee Jones
Quoted 19 lines
-----Original Message-----
From: Mark Brown [mailto:[email protected]]
Sent: Tuesday, January 25, 2022 7:25 PM
To: Alim Akhtar <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v3 0/3] Add FSD SPI supportQuoted 6 lines · Alim Akhtar
Note: This series is depended on [1] patches which adds support of FSD SoC and on Krzysztof's v6 [2] of spi schema changes
[1]
https://protect2.fireeye.com/v1/url?k=43e76061-1c7c5970-43e6eb2e-0cc47
a31cdbc-d2d9ba5a4358198f&q=1&e=9e61db9b-cfb7-4110-a13c-a1cb0d92a251&u=
Quoted 8 lines
Quoted 4 lines
https%3A%2F%2Flkml.org%2Flkml%2F2022%2F1%2F24%2F583
[2]
https://protect2.fireeye.com/v1/url?k=e2ddfc2b-bd46c53a-e2dc7764-0cc47
a31cdbc-0d6dbb90b0110bab&q=1&e=9e61db9b-cfb7-4110-a13c-a1cb0d92a251&u=
Quoted 1 line
https%3A%2F%2Flkml.org%2Flkml%2F2022%2F1%2F24%2F120
Please resend this when it can be applied, either wait until the
dependencies
Quoted 3 lines
are in place or rebase on top of current code. In general only build time dependencies matter here, the SoC support being merged shouldn't be an issue one way or another.
I re-send these patches (couple of them) as I see the dependencies has landed into MFD tree.
Because of the immutable branch between MFD, SPI and DT due to the current merge window, I assume this will go via MFD tree. Let me know if any concerns.
Thanks!
Mark Brown
maintainerRe: (subset) [PATCH v3 0/3] Add FSD SPI support
In reply to Alim AkhtarQuoted 8 lines · Alim Akhtar
Adds support for SPI controller found in Tesla FSD SoC
- Changes since v2
* Addressed review comments of Andi
* rebased on Krzysztof's v6 spi schema changes
* Added tags[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/3] spi: dt-bindings: samsung: Add fsd spi compatible
commit: 363d3c51bc5b3243b5b035a1f50d6d994a1b203f
[2/3] spi: s3c64xx: Add spi port configuration for Tesla FSD SoC
commit: 4ebb15a15799da4954f1d4926fcd3263ea46e417All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark