Commit Graph
100 Commits
Author SHA1 Message Date
Yoshihiro Shimoda 1cb5072632 net: ethernet: renesas: rswitch: Fix MAC address info
Smatch detected the following warning.

    drivers/net/ethernet/renesas/rswitch.c:1717 rswitch_init() warn:
    '%pM' cannot be followed by 'n'

The 'n' should be '\n'.

Reported-by: Dan Carpenter <[email protected]>
Suggested-by: Geert Uytterhoeven <[email protected]>
Fixes: 3590918b5d ("net: ethernet: renesas: Add support for "Ethernet Switch"")
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Saeed Mahameed <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2022-11-21 12:57:18 +00:00
Yoshihiro Shimoda 76ad97e150 net: ethernet: renesas: rswitch: Fix build error about ptp
If CONFIG_PTP_1588_CLOCK_OPTIONAL=m and CONFIG_RENESAS_ETHER_SWITCH=y,
the following build error happened:

    aarch64-linux-ld: DWARF error: could not find abbrev number 60
    drivers/net/ethernet/renesas/rswitch.o: in function `rswitch_get_ts_info':
    rswitch.c:(.text+0x408): undefined reference to `ptp_clock_index'
    aarch64-linux-ld: DWARF error: could not find abbrev number 1190123
    drivers/net/ethernet/renesas/rcar_gen4_ptp.o: in function `rcar_gen4_ptp_register':
    rcar_gen4_ptp.c:(.text+0x4dc): undefined reference to `ptp_clock_register'
    aarch64-linux-ld: drivers/net/ethernet/renesas/rcar_gen4_ptp.o: in function `rcar_gen4_ptp_unregister':
    rcar_gen4_ptp.c:(.text+0x584): undefined reference to `ptp_clock_unregister'

To fix the issue, add "depends on PTP_1588_CLOCK_OPTIONAL" into the
Kconfig.

Reported-by: kernel test robot <[email protected]>
Suggested-by: Arnd Bergmann <[email protected]>
Fixes: 6c6fa1a00a ("net: ethernet: renesas: rswitch: Add R-Car Gen4 gPTP support")
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
2022-11-14 18:37:20 -08:00
Yoshihiro Shimoda 380f9acdf7 net: ethernet: renesas: rswitch: Fix endless loop in error paths
Coverity reported that the error path in rswitch_gwca_queue_alloc_skb()
has an issue to cause endless loop. So, fix the issue by changing
variables' types from u32 to int. After changed the types,
rswitch_tx_free() should use rswitch_get_num_cur_queues() to
calculate number of current queues.

Reported-by: coverity-bot <[email protected]>
Addresses-Coverity-ID: 1527147 ("Control flow issues")
Fixes: 3590918b5d ("net: ethernet: renesas: Add support for "Ethernet Switch"")
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
2022-11-08 17:49:05 -08:00
Yoshihiro Shimoda 6c6fa1a00a net: ethernet: renesas: rswitch: Add R-Car Gen4 gPTP support
Add R-Car Gen4 gPTP support into the rswitch driver.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2022-11-02 12:38:53 +00:00
Yoshihiro Shimoda 3590918b5d net: ethernet: renesas: Add support for "Ethernet Switch"
Add initial support for Renesas "Ethernet Switch" device of R-Car S4-8.
The hardware has features about forwarding for an ethernet switch
device. But, for now, it acts as ethernet controllers so that any
forwarding offload features are not supported. So, any switchdev
header files and DSA framework are not used.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2022-11-02 12:38:53 +00:00
Yoshihiro Shimoda f9edd82774 dt-bindings: net: renesas: Document Renesas Ethernet Switch
Document Renesas Etherent Switch for R-Car S4-8 (r8a779f0).

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2022-11-02 12:38:52 +00:00
Yoshihiro Shimoda 9f7d09fe23 iommu/ipmmu-vmsa: Fix compatible for rcar-gen4
Fix compatible string for R-Car Gen4.

Fixes: ae684caf46 ("iommu/ipmmu-vmsa: Add support for R-Car Gen4")
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
2022-06-22 15:45:56 +02:00
Yoshihiro Shimoda 5235d55177 arm64: dts: renesas: r8a779f0: Add UFS node
Add UFS node for R-Car S4-8 (r8a779f0).

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[geert: Move ufs30-clk to preserve sort order]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2022-06-17 09:35:25 +02:00
Yoshihiro Shimoda 3a9747f051 arm64: dts: renesas: r8a779f0: Add iommus to DMAC nodes
Add iommus properties to the DMAC nodes for r8a779f0.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2022-06-17 09:35:25 +02:00
Yoshihiro Shimoda fd869e63b6 arm64: dts: renesas: r8a779f0: Add IPMMU nodes
Add IPMMU nodes for r8a779f0.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2022-06-17 09:35:25 +02:00
Yoshihiro Shimoda b7f64eaee5 clk: renesas: r8a779f0: Add PCIe clocks
Add the module clocks used by the PCIe controllers on the Renesas
R-Car S4-8 (R8A779F0) SoC.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2022-06-17 09:14:13 +02:00
Yoshihiro Shimoda 09c962fd48 scsi: MAINTAINERS: Add maintainer for Renesas UFS driver
Add maintainer for Renesas UFS driver.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2022-06-13 21:57:34 -04:00
Yoshihiro Shimoda d69520288e scsi: ufs: ufs-renesas: Add support for Renesas R-Car UFS controller
Add support for Renesas R-Car UFS controller which needs vendor-specific
initialization.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2022-06-13 21:57:34 -04:00
Yoshihiro Shimoda 2f11bbc2c7 scsi: ufs: core: Add UFSHCD_QUIRK_HIBERN_FASTAUTO
Add UFSHCD_QUIRK_HIBERN_FASTAUTO quirk for host controllers which supports
auto-hibernate the capability but only FASTAUTO mode.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2022-06-13 21:57:34 -04:00
Yoshihiro Shimoda 6554400d6f scsi: ufs: core: Add UFSHCD_QUIRK_BROKEN_64BIT_ADDRESS
Add UFSHCD_QUIRK_BROKEN_64BIT_ADDRESS for host controllers which do not
support 64-bit addressing.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2022-06-13 21:57:34 -04:00
Yoshihiro Shimoda 7522c08d1e scsi: dt-bindings: ufs: Document Renesas R-Car UFS host controller
Document Renesas R-Car UFS host controller for R-Car S4-8 (r8a779f0).

Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Acked-by: Rob Herring <[email protected]>
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2022-06-13 21:57:34 -04:00
Yoshihiro Shimoda e4d755cfec arm64: dts: renesas: Add Renesas White Hawk boards support
Initial support for the Renesas White Hawk CPU and BreakOut boards.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2022-05-06 11:09:10 +02:00
Yoshihiro Shimoda 987da486d8 arm64: dts: renesas: Add Renesas R8A779G0 SoC support
Add initial support for the Renesas R8A779G0 (R-Car V4H) SoC.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2022-05-06 11:09:10 +02:00
Yoshihiro Shimoda 0ab55cf183 clk: renesas: cpg-mssr: Add support for R-Car V4H
Initial CPG support for R-Car V4H (r8a779g0).

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2022-04-29 12:23:39 +02:00
Yoshihiro Shimoda 7f906eaa95 clk: renesas: rcar-gen4: Add CLK_TYPE_GEN4_PLL4
R-Car V4H (r8a779g0) has PLL4 so that add CLK_TYPE_GEN4_PLL4.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2022-04-29 12:08:36 +02:00
Yoshihiro Shimoda 7a5ae56419 dt-bindings: power: renesas,rcar-sysc: Document r8a779g0 SYSC bindings
Document bindings for the R-Car V4H (aka R8A779G0) SYSC block.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2022-04-28 16:44:08 +02:00
Yoshihiro Shimoda 85a503c9ea dt-bindings: serial: renesas,hscif: Document r8a779g0 bindings
R-Car V4H (R8A779G0) SoC has the R-Car Gen4 compatible HSCIF ports,
so document the SoC specific bindings.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-04-26 13:30:24 +02:00
Yoshihiro Shimoda d869d48ae7 soc: renesas: rcar-rst: Add support for R-Car V4H
Add support for R-Car V4H (R8A779G0) to the R-Car RST driver.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2022-04-25 10:58:58 +02:00
Yoshihiro Shimoda 87ab58e1fe soc: renesas: Identify R-Car V4H
Add support for identifying the R-Car V4H (R8A779G0) SoC.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2022-04-25 10:58:58 +02:00
Yoshihiro Shimoda 11a5ebb42e soc: renesas: r8a779g0-sysc: Add r8a779g0 support
Add support for R-Car V4H (R8A779G0) SoC power areas and register
access.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2022-04-25 10:58:58 +02:00
Yoshihiro Shimoda 8ff93be325 dt-bindings: reset: renesas,rst: Document r8a779g0 reset module
Document bindings for the R-Car V4H (R8A779G0) reset module.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2022-04-25 10:51:56 +02:00
Yoshihiro Shimoda 6cd3233242 dt-bindings: arm: renesas: Document R-Car V4H White Hawk DT bindings
Add device tree binding documentation for the Renesas R-Car V4H
(r8a779g0) SoC and the Renesas White Hawk CPU and BreakOut boards.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2022-04-25 10:50:09 +02:00
Yoshihiro Shimoda 13b4d179c6 dt-bindings: clock: renesas,cpg-mssr: Document r8a779g0
Add binding documentation for the R-Car V4H (R8A779G0) Clock Pulse
Generator.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2022-04-25 10:45:15 +02:00
Yoshihiro Shimoda b243a358b3 clk: renesas: r8a779f0: Add UFS clock
Add the module clock used by the UFS host controller on the Renesas
R-Car S4-8 (R8A779F0) SoC.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2022-04-25 10:43:41 +02:00
Yoshihiro Shimoda f2afa78d5a dt-bindings: clock: Add r8a779g0 CPG Core Clock Definitions
Add all Clock Pulse Generator Core Clock Outputs for the Renesas
R-Car V4H (R8A779G0) SoC.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2022-04-25 10:34:19 +02:00
Yoshihiro Shimoda 90715507cb dt-bindings: power: Add r8a779g0 SYSC power domain definitions
Add power domain indices for R-Car V4H (r8a779g0).

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2022-04-25 10:34:19 +02:00
Yoshihiro Shimoda ae684caf46 iommu/ipmmu-vmsa: Add support for R-Car Gen4
Add support for R-Car Gen4 like r8a779f0 (R-Car S4-8). The IPMMU
hardware design of r8a779f0 is the same as r8a779a0. So, rename
"r8a779a0" to "rcar_gen4".

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
2022-02-14 13:59:44 +01:00
Yoshihiro Shimoda da9f8386d6 dt-bindings: iommu: renesas,ipmmu-vmsa: add r8a779f0 support
Document the compatible values for the IPMMU-VMSA blocks in
the Renesas R-Car S4-8 (R8A779F0) SoC and R-Car Gen4.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Acked-by: Rob Herring <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
2022-02-14 13:59:44 +01:00
Yoshihiro Shimoda 8b88873b8f arm64: dts: renesas: r8a779f0: Add sys-dmac nodes
Add SYS-DMAC nodes for r8a779f0.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Ulrich Hecht <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2022-01-24 10:09:13 +01:00
Yoshihiro Shimoda 59a43fa248 clk: renesas: r8a779f0: Add SYS-DMAC clocks
Add SYS-DMAC clocks on r8a779f0.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2022-01-24 09:55:14 +01:00
Yoshihiro Shimoda 2fe6777b8d dmaengine: rcar-dmac: Add support for R-Car S4-8
Add support for R-Car S4-8. We can reuse R-Car V3U code so that
renames variable names as "gen4".

Note that some registers of R-Car V3U do not exist on R-Car S4-8,
but none of them are used by the driver for now.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Ulrich Hecht <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
2022-01-03 16:58:21 +05:30
Yoshihiro Shimoda 401c151164 dt-bindings: renesas,rcar-dmac: Add r8a779f0 support
Document the compatible value for the Direct Memory Access Controller
blocks in the Renesas R-Car S4-8 (R8A779F0) SoC.

The most visible difference with DMAC blocks on other R-Car SoCs
(except R8A779A0) is the move of the per-channel registers to
a separate register block.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
2022-01-03 16:58:21 +05:30
Yoshihiro Shimoda 26baf4b66c tty: serial: sh-sci: Add support for R-Car Gen4
Add serial support for R-Car Gen4 SoC.

Reviewed-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-12-17 17:56:03 +01:00
Yoshihiro Shimoda 6aa7cee60c dt-bindings: serial: renesas,scif: Document r8a779f0 bindings
R-Car S4-8 (R8A779F0) SoC has the R-Car Gen4 compatible SCIF ports,
so document the SoC specific bindings.

Reviewed-by: Geert Uytterhoeven <[email protected]>
Acked-by: Rob Herring <[email protected]>
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-12-17 17:56:03 +01:00
Yoshihiro Shimoda 24aaff6a6c clk: renesas: cpg-mssr: Add support for R-Car S4-8
Initial CPG support for R-Car S4-8 (r8a779f0).

Inspired by patches in the BSP by LUU HOAI.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-12-08 10:05:56 +01:00
Yoshihiro Shimoda 470e3f0d0b clk: renesas: rcar-gen4: Introduce R-Car Gen4 CPG driver
According to the official website [1], the R-Car V3U SoC is based
on the R-Car Gen4 architecture. So, introduce R-Car Gen4 CPG
driver.

[1]
https://www.renesas.com/us/en/products/automotive-products/automotive-system-chips-socs/r-car-v3u-best-class-r-car-v3u-asil-d-system-chip-automated-driving

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-12-08 10:05:22 +01:00
Yoshihiro Shimoda 44e0096074 arm64: defconfig: Enable R-Car S4-8
Enable the Renesas R-Car S4-8 (R8A779F0) SoC in the ARM64 defconfig.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-12-07 16:56:12 +01:00
Yoshihiro Shimoda 08b8699eb3 arm64: dts: renesas: Add Renesas Spider boards support
Initial support for the Renesas Spider CPU and BreakOut boards.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Tested-by: Takehito Nakamura <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-12-07 16:55:20 +01:00
Yoshihiro Shimoda c62331e822 arm64: dts: renesas: Add Renesas R8A779F0 SoC support
Add initial support for the Renesas R8A779F0 (R-Car S4-8) SoC.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-12-07 16:55:10 +01:00
Yoshihiro Shimoda 363b41dd25 soc: renesas: rcar-rst: Add support for R-Car S4-8
Add support for R-Car S4-8 (R8A779F0) to the R-Car RST driver.
The register map of R-Car S4-8 is the same as R-Car V3U so that
renames "V3U" and "r8a779a0" to "Gen4".

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-12-07 16:50:57 +01:00
Yoshihiro Shimoda 9711633587 soc: renesas: Identify R-Car S4-8
Add support for identifying the R-Car S4-8 (R8A779F0) SoC.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-12-07 16:47:54 +01:00
Yoshihiro Shimoda 654d5fdb89 soc: renesas: r8a779f0-sysc: Add r8a779f0 support
Add support for R-Car S4-8 (R8A779F0) SoC power areas and register
access.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-12-07 16:47:45 +01:00
Yoshihiro Shimoda e62906d631 soc: renesas: rcar-gen4-sysc: Introduce R-Car Gen4 SYSC driver
According to the official website [1], the R-Car V3U SoC is based
on the R-Car Gen4 architecture. So, introduce R-Car Gen4 SYSC
driver.

[1]
https://www.renesas.com/us/en/products/automotive-products/automotive-system-chips-socs/r-car-v3u-best-class-r-car-v3u-asil-d-system-chip-automated-driving

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-12-07 16:46:56 +01:00
Yoshihiro Shimoda 81c1655823 dt-bindings: clock: Add r8a779f0 CPG Core Clock Definitions
Add all Clock Pulse Generator Core Clock Outputs for the Renesas
R-Car S4-8 (R8A779F0) SoC.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-12-07 16:29:25 +01:00
Yoshihiro Shimoda 500daa0e6b dt-bindings: power: Add r8a779f0 SYSC power domain definitions
Add power domain indices for R-Car S4-8 (r8a779f0).

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-12-07 16:29:24 +01:00
Yoshihiro Shimoda d01986bec3 dt-bindings: arm: renesas: Document Renesas Spider boards
Add device tree bindings documentation for Renesas R-Car S4-8
Spider CPU and BreakOut boards.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-12-07 16:27:13 +01:00
Yoshihiro Shimoda 827fbac821 dt-bindings: clock: renesas,cpg-mssr: Document r8a779f0
Add binding documentation for the R-Car S4-8 (R8A779F0) Clock Pulse
Generator.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-11-19 11:40:52 +01:00
Yoshihiro Shimoda c014e93559 dt-bindings: power: renesas,rcar-sysc: Document r8a779f0 SYSC bindings
Document bindings for the R-Car S4-8 (aka R8A779F0) SYSC block.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-11-19 11:22:37 +01:00
Yoshihiro Shimoda 06bd71cd2e dt-bindings: reset: renesas,rst: Document r8a779f0 reset module
Document bindings for the R-Car S4-8 (R8A779F0) reset module.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-11-19 11:22:37 +01:00
Yoshihiro Shimoda 663eede58f dt-bindings: arm: renesas: Document R-Car S4-8 SoC DT bindings
Add device tree bindings documentation for Renesas R-Car S4-8
(r8a779f0).

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-11-19 11:22:37 +01:00
Yoshihiro Shimoda f7c05c3987 can: rcar_can: fix suspend/resume
If the driver was not opened, rcar_can_suspend() should not call
clk_disable() because the clock was not enabled.

Fixes: fd1159318e ("can: add Renesas R-Car CAN driver")
Link: https://lore.kernel.org/all/[email protected]
Cc: [email protected]
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Tested-by: Ayumi Nakamichi <[email protected]>
Reviewed-by: Ulrich Hecht <[email protected]>
Tested-by: Biju Das <[email protected]>
Signed-off-by: Marc Kleine-Budde <[email protected]>
2021-10-17 22:51:43 +02:00
Yoshihiro Shimoda 7a62ced8eb iommu/ipmmu-vmsa: Add support for r8a779a0
Add support for r8a779a0 (R-Car V3U). The IPMMU hardware design
of this SoC differs than others. So, add a new ipmmu_features for it.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
2021-09-28 11:08:18 +02:00
Yoshihiro Shimoda 5c8e9a47b5 dt-bindings: iommu: renesas,ipmmu-vmsa: add r8a779a0 support
Add support for r8a779a0 (R-Car V3U).

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Acked-by: Rob Herring <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
2021-09-28 11:08:17 +02:00
Yoshihiro Shimoda 52e3ebdc07 arm64: dts: renesas: r8a779a0: Add iommus into sdhi node
Add iommus into sdhi node.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-09-20 12:07:06 +02:00
Yoshihiro Shimoda eb6750431e arm64: dts: renesas: r8a779a0: Add IPMMU nodes
Add IPMMU nodes for r8a779a0. Note that this patch sets the power
domain of IPMMU-VC0 is Always-On tentatively because the SoC doesn't
have A3VC power domain.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-09-20 12:07:06 +02:00
Yoshihiro Shimoda 0341d5e3d1 net: renesas: sh_eth: Fix freeing wrong tx descriptor
The cur_tx counter must be incremented after TACT bit of
txdesc->status was set. However, a CPU is possible to reorder
instructions and/or memory accesses between cur_tx and
txdesc->status. And then, if TX interrupt happened at such a
timing, the sh_eth_tx_free() may free the descriptor wrongly.
So, add wmb() before cur_tx++.
Otherwise NETDEV WATCHDOG timeout is possible to happen.

Fixes: 86a74ff21a ("net: sh_eth: add support for Renesas SuperH Ethernet")
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2021-09-07 14:02:02 +01:00
Yoshihiro Shimoda 57f3ffdc11 usb: host: xhci-rcar: Don't reload firmware after the completion
According to the datasheet, "Upon the completion of FW Download,
there is no need to write or reload FW.". Otherwise, it's possible
to cause unexpected behaviors. So, adds such a condition.

Fixes: 4ac8918f3a ("usb: host: xhci-plat: add support for the R-Car H2 and M2 xHCI controllers")
Cc: [email protected] # v3.17+
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-27 10:24:58 +02:00
Yoshihiro Shimoda 71b7597c63 mmc: renesas_sdhi: Refactor renesas_sdhi_probe()
Refactor renesas_sdhi_probe() to avoid increasing numbers of
sdhi_quirks_match[] entry when we add other stable SoCs like
r8a779m*.

Note that the sdhi_quirks_match[] is only needed on
renesas_sdhi_internal_dmac.c so that of_data of
renesas_sdhi_sys_dmac.c keeps as-is.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Wolfram Sang <[email protected]>
Tested-by: Wolfram Sang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Ulf Hansson <[email protected]>
2021-08-24 10:15:35 +02:00
Yoshihiro Shimoda 651f8cffad arm64: dts: renesas: r8a77961: Add iommus to ipmmu_ds[01] related nodes
This patch adds iommus properties to ipmmu_ds[01] related nodes
(avb, dmac and sdhi) of r8a77961.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-07-30 15:07:25 +02:00
Yoshihiro Shimoda 5719df243e usb: renesas_usbhs: Fix superfluous irqs happen after usb_pkt_pop()
This driver has a potential issue which this driver is possible to
cause superfluous irqs after usb_pkt_pop() is called. So, after
the commit 3af3260528 ("usb: renesas_usbhs: fix error return
code of usbhsf_pkt_handler()") had been applied, we could observe
the following error happened when we used g_audio.

    renesas_usbhs e6590000.usb: irq_ready run_error 1 : -22

To fix the issue, disable the tx or rx interrupt in usb_pkt_pop().

Fixes: 2743e7f90d ("usb: renesas_usbhs: fix the usb_pkt_pop()")
Cc: <[email protected]> # v4.4+
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-07-21 09:50:00 +02:00
Yoshihiro Shimoda 08a84410a0 serial: sh-sci: Stop dmaengine transfer in sci_stop_tx()
Stop dmaengine transfer in sci_stop_tx(). Otherwise, the following
message is possible output when system enters suspend and while
transferring data, because clearing TIE bit in SCSCR is not able to
stop any dmaengine transfer.

    sh-sci e6550000.serial: ttySC1: Unable to drain transmitter

Note that this driver has already used some #ifdef in the .c file
so that this patch also uses #ifdef to fix the issue. Otherwise,
build errors happens if the CONFIG_SERIAL_SH_SCI_DMA is disabled.

Fixes: 73a19e4c03 ("serial: sh-sci: Add DMA support.")
Cc: <[email protected]> # v4.9+
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-15 14:01:52 +02:00
Yoshihiro Shimoda e752dbc59e usb: gadget: udc: renesas_usb3: Fix a race in usb3_start_pipen()
The usb3_start_pipen() is called by renesas_usb3_ep_queue() and
usb3_request_done_pipen() so that usb3_start_pipen() is possible
to cause a race when getting usb3_first_req like below:

renesas_usb3_ep_queue()
 spin_lock_irqsave()
 list_add_tail()
 spin_unlock_irqrestore()
 usb3_start_pipen()
  usb3_first_req = usb3_get_request() --- [1]
 --- interrupt ---
 usb3_irq_dma_int()
 usb3_request_done_pipen()
  usb3_get_request()
  usb3_start_pipen()
  usb3_first_req = usb3_get_request()
  ...
  (the req is possible to be finished in the interrupt)

The usb3_first_req [1] above may have been finished after the interrupt
ended so that this driver caused to start a transfer wrongly. To fix this
issue, getting/checking the usb3_first_req are under spin_lock_irqsave()
in the same section.

Fixes: 746bfe63bb ("usb: gadget: renesas_usb3: add support for Renesas USB3.0 peripheral controller")
Cc: stable <[email protected]>
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-05-24 15:22:28 +02:00
Yoshihiro Shimoda 5718458b09 net: renesas: ravb: Fix a stuck issue when a lot of frames are received
When a lot of frames were received in the short term, the driver
caused a stuck of receiving until a new frame was received. For example,
the following command from other device could cause this issue.

    $ sudo ping -f -l 1000 -c 1000 <this driver's ipaddress>

The previous code always cleared the interrupt flag of RX but checks
the interrupt flags in ravb_poll(). So, ravb_poll() could not call
ravb_rx() in the next time until a new RX frame was received if
ravb_rx() returned true. To fix the issue, always calls ravb_rx()
regardless the interrupt flags condition.

Fixes: c156633f13 ("Renesas Ethernet AVB driver proper")
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2021-04-21 10:56:37 -07:00
Yoshihiro Shimoda cfa00070a1 dt-bindings: net: can: rcar_can: Document r8a77961 support
Document SoC specific bindings for R-Car M3-W+ (r8a77961) SoC.

Also as R8A7796 is now called R8A77960 so that update those
references.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Acked-by: Rob Herring <[email protected]>
Reviewed-by: Wolfram Sang <[email protected]>
Signed-off-by: Marc Kleine-Budde <[email protected]>
2021-04-13 10:15:42 +02:00
Yoshihiro Shimoda bbbf6db5a0 arm64: dts: renesas: r8a779a0: Fix PMU interrupt
Should use PPI No.7 for the PMU. Otherwise, the perf command didn't
show any information.

Fixes: 834c310f54 ("arm64: dts: renesas: Add Renesas R8A779A0 SoC support")
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-03-29 10:51:04 +02:00
Yoshihiro Shimoda 92c406ed0a arm64: dts: renesas: r8a77961: Add CAN nodes
Add the device nodes for all CAN nodes on R-Car M3-W+.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Tested-by: Yusuke Goda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-03-12 09:31:43 +01:00
Yoshihiro Shimoda b1d25e6ee5 usb: renesas_usbhs: Clear PIPECFG for re-enabling pipe with other EPNUM
According to the datasheet, this controller has a restriction
which "set an endpoint number so that combinations of the DIR bit and
the EPNUM bits do not overlap.". However, since the udc core driver is
possible to assign a bulk pipe as an interrupt endpoint, an endpoint
number may not match the pipe number. After that, when user rebinds
another gadget driver, this driver broke the restriction because
the driver didn't clear any configuration in usb_ep_disable().

Example:
 # modprobe g_ncm
 Then, EP3 = pipe 3, EP4 = pipe 4, EP5 = pipe 6
 # rmmod g_ncm
 # modprobe g_hid
 Then, EP3 = pipe 6, EP4 = pipe 7.
 So, pipe 3 and pipe 6 are set as EP3.

So, clear PIPECFG register in usbhs_pipe_free().

Fixes: dfb87b8bfe ("usb: renesas_usbhs: gadget: fix re-enabling pipe without re-connecting")
Cc: stable <[email protected]>
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/1615168538-26101-1-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-03-10 09:36:13 +01:00
Yoshihiro Shimoda d765a4f302 arm64: dts: renesas: Add mmc aliases into board dts files
After the commit 7320915c88 ("mmc: Set PROBE_PREFER_ASYNCHRONOUS
for drivers that existed in v4.14"), the order of /dev/mmcblkN
was not fixed in some SoCs which have multiple sdhi controllers.
So, we were hard to use an sdhi device as rootfs by using
the kernel parameter like "root=/dev/mmcblkNpM".

According to the discussion on a mainling list [1], we can add
mmc aliases to fix the issue. So, add such aliases into Renesas
arm64 board dts files. Notes that mmc0 is an eMMC channel if
available.

[1]
https://lore.kernel.org/linux-arm-kernel/CAPDyKFptyEQNJu8cqzMt2WRFZcwEdjDiytMBp96nkoZyprTgmA@mail.gmail.com/

Fixes: 7320915c88 ("mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.14")
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/1614596786-22326-1-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-03-08 10:24:12 +01:00
Yoshihiro Shimoda da926e813f ARM: dts: renesas: Add mmc aliases into R-Car Gen2 board dts files
After set PROBE_PREFER_ASYNCHRONOUS flag on the mmc host drivers,
the order of /dev/mmcblkN was not fixed in some SoCs which have
multiple SDHI and/or MMCIF controllers. So, we were hard to use
such a device as rootfs by using the kernel parameter like
"root=/dev/mmcblkNpM".

According to the discussion on a mainling list [1], we can add
mmc aliases to fix the issue. So, add such aliases into R-Car Gen2
board dts files. Note that, since R-Car Gen2 is even more complicated
about SDHI and/or MMCIF channels variations and they share pins,
add the aliases into board dts files instead of SoC dtsi files.

[1]
https://lore.kernel.org/linux-arm-kernel/CAPDyKFptyEQNJu8cqzMt2WRFZcwEdjDiytMBp96nkoZyprTgmA@mail.gmail.com/

Fixes: 7320915c88 ("mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.14")
Fixes: 21b2cec61c ("mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.4")
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/1613131316-30994-1-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Geert Uytterhoeven <[email protected]>
2021-03-08 10:22:38 +01:00
Yoshihiro Shimoda 9917f0e3cd usb: renesas_usbhs: Clear pipe running flag in usbhs_pkt_pop()
Should clear the pipe running flag in usbhs_pkt_pop(). Otherwise,
we cannot use this pipe after dequeue was called while the pipe was
running.

Fixes: 8355b2b308 ("usb: renesas_usbhs: fix the behavior of some usbhs_pkt_handle")
Reported-by: Tho Vu <[email protected]>
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/1612183640-8898-1-git-send-email-yoshihiro.shimoda.uh@renesas.com
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-02-01 14:09:46 +01:00
Yoshihiro Shimoda ed2fab9a82 mmc: renesas_sdhi: Add a condition of cmd/data timeout for retune
According to the datasheet, this controller needs retune when
cmd or data timeout happens. So, add a condition into .check_retune().

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Wolfram Sang <[email protected]>
Link: https://lore.kernel.org/r/1608708622-29668-3-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Ulf Hansson <[email protected]>
2021-02-01 11:54:43 +01:00
Yoshihiro Shimoda 69e7d76afd mmc: renesas_internal_dmac: add pre_req and post_req support
Add pre_req and post_req support to improve performance.

Inspired by a patch in the BSP by Masaharu Hayakawa.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Wolfram Sang <[email protected]>
Tested-by: Wolfram Sang <[email protected]>
Link: https://lore.kernel.org/r/1608114572-1892-3-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Ulf Hansson <[email protected]>
2021-02-01 11:54:43 +01:00
Yoshihiro Shimoda cec0813da5 iommu/ipmmu-vmsa: Allow SDHI devices
Add SDHI devices into devices_allowlist.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/1611838980-4940-3-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Joerg Roedel <[email protected]>
2021-01-29 09:27:21 +01:00
Yoshihiro Shimoda 815cdd8603 iommu/ipmmu-vmsa: Refactor ipmmu_of_xlate()
Refactor ipmmu_of_xlate() to improve readability/scalability.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/1611838980-4940-2-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Joerg Roedel <[email protected]>
2021-01-29 09:27:14 +01:00
Yoshihiro Shimoda 1e40a92c65 mfd: bd9571mwv: Use devm_regmap_add_irq_chip()
Use devm_regmap_add_irq_chip() to simplify the code.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Acked-for-MFD-by: Lee Jones <[email protected]>
Reviewed-by: Matti Vaittinen <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
2021-01-14 13:05:55 +00:00
Yoshihiro Shimoda bfb26be7fe mfd: bd9571mwv: Use the SPDX license identifier
Use the SPDX license identifier instead of a local description.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Acked-for-MFD-by: Lee Jones <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
2021-01-14 13:05:55 +00:00
Yoshihiro Shimoda 2e35627e69 gpio: bd9571mwv: Add BD9574MWF support
Add support for BD9574MWF which is similar chip with BD9571MWV.
Note that BD9574MWF has additional features "RECOV_GPOUT",
"FREQSEL" and "RTC_IN", but supports GPIO function only.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Matti Vaittinen <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Acked-by: Bartosz Golaszewski <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
2021-01-14 13:05:55 +00:00
Yoshihiro Shimoda 2d7af444e8 gpio: bd9571mwv: rid of using struct bd9571mwv
To simplify this driver, use dev_get_regmap() and
rid of using struct bd9571mwv.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Matti Vaittinen <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Acked-by: Bartosz Golaszewski <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
2021-01-14 13:05:55 +00:00
Yoshihiro Shimoda b9f71d14e5 gpio: bd9571mwv: Use the SPDX license identifier
Use the SPDX license identifier instead of a local description.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Acked-by: Bartosz Golaszewski <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
2021-01-14 13:05:55 +00:00
Yoshihiro Shimoda ceee9dc13b regulator: bd9571mwv: Add BD9574MWF support
Add support for BD9574MWF which is similar chip with BD9571MWV.
Note that we don't support voltage rails VD{09,18,25,33} by this
driver on BD9574. The VD09 voltage could be read from PMIC but that
is not supported by this commit.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Matti Vaittinen <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
2021-01-14 13:05:54 +00:00
Yoshihiro Shimoda 30402f97f9 regulator: bd9571mwv: rid of using struct bd9571mwv
To simplify this driver, use dev_get_regmap() and
rid of using struct bd9571mwv.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Matti Vaittinen <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
2021-01-14 13:05:54 +00:00
Yoshihiro Shimoda b0f87e8ac2 mfd: rohm-generic: Add BD9571 and BD9574
Add chip IDs for BD9571MWV and BD9574MWF.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Matti Vaittinen <[email protected]>
Acked-for-MFD-by: Lee Jones <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
2021-01-14 13:05:54 +00:00
Yoshihiro Shimoda e413c27e2e dt-bindings: mfd: bd9571mwv: Document BD9574MWF
Document other similar specification chip BD9574MWF.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Acked-for-MFD-by: Lee Jones <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
2021-01-14 13:05:54 +00:00
Yoshihiro Shimoda c58ad0f2b0 mfd: bd9571mwv: Use devm_mfd_add_devices()
To remove mfd devices when unload this driver, should use
devm_mfd_add_devices() instead.

Fixes: d3ea212720 ("mfd: Add ROHM BD9571MWV-M MFD PMIC driver")
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Acked-for-MFD-by: Lee Jones <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Matti Vaittinen <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
2021-01-14 13:05:54 +00:00
Yoshihiro Shimoda f5c50b1fed dt-bindings: clock: renesas: rcar-usb2-clock-sel: Convert bindings to json-schema
Convert Renesas R-Car USB 2.0 clock selector bindings documentation
to json-schema.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
Link: https://lore.kernel.org/r/1604543524-31482-1-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Geert Uytterhoeven <[email protected]>
2020-12-10 08:34:01 +01:00
Yoshihiro Shimoda 2228af8093 dt-bindings: PCI: rcar-pci-host: Document r8a77965 bindings
Document the R-Car M3-N (R8A77965) SoC in the R-Car PCIe bindings.

Link: https://lore.kernel.org/r/1604455096-13923-3-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Signed-off-by: Lorenzo Pieralisi <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Acked-by: Rob Herring <[email protected]>
2020-11-20 17:19:03 +00:00
Yoshihiro Shimoda 0d69ce3c2c dt-bindings: PCI: rcar-pci-host: Convert bindings to json-schema
Convert Renesas PCIe Host controller bindings documentation to
json-schema. Note that some compatible doesn't contain on
the original documentation so that incremental patches are required
for it.

Link: https://lore.kernel.org/r/1604455096-13923-2-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Signed-off-by: Lorenzo Pieralisi <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
2020-11-20 17:19:03 +00:00
Yoshihiro Shimoda bc0468ee49 dt-bindings: serial: renesas,scif: Document r8a779a0 bindings
R-Car V3U (R8A779A0) SoC also has the R-Car Gen3 compatible
SCIF ports, so document the SoC specific bindings.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Acked-by: Rob Herring <[email protected]>
Link: https://lore.kernel.org/r/1605250296-30570-1-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2020-11-13 15:28:56 +01:00
Yoshihiro Shimoda e8973201d9 mmc: renesas_sdhi_core: Add missing tmio_mmc_host_free() at remove
The commit 94b110aff8 ("mmc: tmio: add tmio_mmc_host_alloc/free()")
added tmio_mmc_host_free(), but missed the function calling in
the sh_mobile_sdhi_remove() at that time. So, fix it. Otherwise,
we cannot rebind the sdhi/mmc devices when we use aliases of mmc.

Fixes: 94b110aff8 ("mmc: tmio: add tmio_mmc_host_alloc/free()")
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Wolfram Sang <[email protected]>
Tested-by: Wolfram Sang <[email protected]>
Reviewed-by: Niklas Söderlund <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/1604654730-29914-1-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Ulf Hansson <[email protected]>
2020-11-10 13:15:19 +01:00
Yoshihiro Shimoda d98ef43bfb usb: gadget: u_serial: clear suspended flag when disconnecting
The commit aba3a8d01d ("usb: gadget: u_serial: add suspend resume
callbacks") set/cleared the suspended flag in USB bus suspend/resume
only. But, when a USB cable is disconnected in the suspend, since some
controllers will not detect USB bus resume, the suspended flag is not
cleared. After that, user cannot send any data. To fix the issue,
clears the suspended flag in the gserial_disconnect().

Fixes: aba3a8d01d ("usb: gadget: u_serial: add suspend resume callbacks")
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Tested-by: Linh Phung <[email protected]>
Tested-by: Tam Nguyen <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
2020-10-02 09:57:41 +03:00
Yoshihiro Shimoda 17bcc8035d clk: renesas: cpg-mssr: Add support for R-Car V3U
Initial support for R-Car V3U (r8a779a0), including core, module
clocks, resets, and register access, because register specification
differs from R-Car Gen2/3.

Inspired by patches in the BSP by LUU HOAI.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/1599810232-29035-4-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Geert Uytterhoeven <[email protected]>
2020-09-17 15:32:25 +02:00
Yoshihiro Shimoda 8b652aa8a1 clk: renesas: cpg-mssr: Add register pointers into struct cpg_mssr_priv
To support other register layouts in the future, add register pointers
of {control,status,reset,reset_clear}_regs into struct cpg_mssr_priv.
After that, we can remove unused macros like MSTPSR().  No behavioral
changes.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/1599810232-29035-3-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Geert Uytterhoeven <[email protected]>
2020-09-17 15:30:08 +02:00
Yoshihiro Shimoda ffbf9cf3f9 clk: renesas: cpg-mssr: Use enum clk_reg_layout instead of a boolean flag
Geert suggested defining multiple register layout variants using an enum
[1] to support further devices like R-Car V3U.  So, use enum
clk_reg_layout instead of a boolean .stbyctrl flag.  No behavioral
change.

[1] https://lore.kernel.org/linux-renesas-soc/CAMuHMdVAgN69p9FFnQdO4iHk2CHkeNaVui2Q-FOY6_BFVjQ-Nw@mail.gmail.com/

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/1599810232-29035-2-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Geert Uytterhoeven <[email protected]>
2020-09-17 15:30:08 +02:00
Yoshihiro Shimoda a69f802ea1 dt-bindings: clock: renesas,cpg-mssr: Document r8a779a0
Add binding documentation for the R-Car V3U (R8A779A0) Clock Pulse
Generator.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/1599470390-29719-7-git-send-email-yoshihiro.shimoda.uh@renesas.com
Acked-by: Rob Herring <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
2020-09-17 15:30:08 +02:00
Yoshihiro Shimoda 1b4298f000 soc: renesas: r8a779a0-sysc: Add r8a779a0 support
Add support for R-Car V3U (R8A779A0) SoC power areas and register
access, because register specification differs from R-Car Gen2/3.

Inspired by patches in the BSP by Tho Vu.

Signed-off-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/1599810232-29035-5-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Geert Uytterhoeven <[email protected]>
2020-09-16 08:57:31 +02:00