soc: Add Baikal-T1 SoC APB/AXI EHB and L2-cache drivers
Subsystems (3)
cover soc: Add Baikal-T1 SoC APB/AXI EHB and L2-cache drivers
From: Serge Semin <[email protected]>
Aside from PCIe/SATA/DDR/I2C/CPU-reboot specific settings the Baikal-T1 system controller provides three vendor-specific blocks. In particular there are two Errors Handler Blocks to detect and report an info regarding any problems discovered on the AXI and APB buses. These are the main buses utilized by the SoC devices to interact with each other. In addition there is a way to tune the MIPS P5600 CM2 L2-cache up by setting the Tag/Data/WS L2-to-RAM latencies. All of this functionality is implemented in the APB/AXI EHB and L2-cache control block drivers to be a part of the kernel soc subsystem (as being specific to the Baikal-T1 SoC) and introduced in the framework of this patchset.
This patchset is rebased and tested on the mainline Linux kernel 5.6-rc4:
commit 98d54f81e36b ("Linux 5.6-rc4").
Serge Semin (6):
dt-bindings: Add Baikal-T1 AXI-bus EHB dts bindings file
dt-bindings: Add Baikal-T1 APB-bus EHB dts bindings file
dt-bindings: Add Baikal-T1 L2-cache Control Block dts bindings file
soc: bt1: Add Baikal-T1 AXI-bus EHB driver
soc: bt1: Add Baikal-T1 APB-bus EHB driver
soc: bt1: Add Baikal-T1 L2-cache Control Block driver
.../soc/baikal-t1/be,bt1-apb-ehb.yaml | 66 +++ .../soc/baikal-t1/be,bt1-axi-ehb.yaml | 52 +++ .../bindings/soc/baikal-t1/be,bt1-l2-ctl.yaml | 108 +++++ drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 1 + drivers/soc/baikal-t1/Kconfig | 49 +++ drivers/soc/baikal-t1/Makefile | 4 + drivers/soc/baikal-t1/apb-ehb.c | 381 ++++++++++++++++++ drivers/soc/baikal-t1/axi-ehb.c | 250 ++++++++++++ drivers/soc/baikal-t1/common.h | 37 ++ drivers/soc/baikal-t1/l2-ctl.c | 325 +++++++++++++++ 11 files changed, 1274 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/baikal-t1/be,bt1-apb-ehb.yaml create mode 100644 Documentation/devicetree/bindings/soc/baikal-t1/be,bt1-axi-ehb.yaml create mode 100644 Documentation/devicetree/bindings/soc/baikal-t1/be,bt1-l2-ctl.yaml create mode 100644 drivers/soc/baikal-t1/Kconfig create mode 100644 drivers/soc/baikal-t1/Makefile create mode 100644 drivers/soc/baikal-t1/apb-ehb.c create mode 100644 drivers/soc/baikal-t1/axi-ehb.c create mode 100644 drivers/soc/baikal-t1/common.h create mode 100644 drivers/soc/baikal-t1/l2-ctl.c
Signature · 1 line
2.25.1
Quoted 14 lines · On Fri, Mar 6, 2020 at 2:07 PM <[email protected]> wrote:
From: Serge Semin <[email protected]>
Aside from PCIe/SATA/DDR/I2C/CPU-reboot specific settings the Baikal-T1 system controller provides three vendor-specific blocks. In particular there are two Errors Handler Blocks to detect and report an info regarding any problems discovered on the AXI and APB buses. These are the main buses utilized by the SoC devices to interact with each other. In addition there is a way to tune the MIPS P5600 CM2 L2-cache up by setting the Tag/Data/WS L2-to-RAM latencies. All of this functionality is implemented in the APB/AXI EHB and L2-cache control block drivers to be a part of the kernel soc subsystem (as being specific to the Baikal-T1 SoC) and introduced in the framework of this patchset.
Quoted 2 lines
This patchset is rebased and tested on the mainline Linux kernel 5.6-rc4:
commit98d54f81e36b("Linux 5.6-rc4").
I have no objection to the drivers, but I wonder if these should be in drivers/bus and drivers/memory instead of drivers/soc, which have similar drivers already. The driver for the L2 cache is not really a memory controller driver, but it may be close enough, and we already have a couple of different things in there.
Arnd
Rob Herring
maintainerQuoted 15 lines · Arnd Bergmann
Quoted 14 lines · On Fri, Mar 6, 2020 at 2:07 PM <[email protected]> wrote:
From: Serge Semin <[email protected]>
Aside from PCIe/SATA/DDR/I2C/CPU-reboot specific settings the Baikal-T1 system controller provides three vendor-specific blocks. In particular there are two Errors Handler Blocks to detect and report an info regarding any problems discovered on the AXI and APB buses. These are the main buses utilized by the SoC devices to interact with each other. In addition there is a way to tune the MIPS P5600 CM2 L2-cache up by setting the Tag/Data/WS L2-to-RAM latencies. All of this functionality is implemented in the APB/AXI EHB and L2-cache control block drivers to be a part of the kernel soc subsystem (as being specific to the Baikal-T1 SoC) and introduced in the framework of this patchset.
Quoted 8 lines
Quoted 2 lines
This patchset is rebased and tested on the mainline Linux kernel 5.6-rc4:
commit98d54f81e36b("Linux 5.6-rc4").I have no objection to the drivers, but I wonder if these should be in
drivers/busanddrivers/memoryinstead ofdrivers/soc, which have similar drivers already. The driver for the L2 cache is not really a memory controller driver, but it may be close enough, and we already have a couple of different things in there.
I don't have the driver side in my inbox, but isn't setting up cache latencies in a driver a little late?
Rob
Quoted 25 lines · Rob Herring
Quoted 15 lines · Arnd Bergmann
Quoted 14 lines · On Fri, Mar 6, 2020 at 2:07 PM <[email protected]> wrote:
From: Serge Semin <[email protected]>
Aside from PCIe/SATA/DDR/I2C/CPU-reboot specific settings the Baikal-T1 system controller provides three vendor-specific blocks. In particular there are two Errors Handler Blocks to detect and report an info regarding any problems discovered on the AXI and APB buses. These are the main buses utilized by the SoC devices to interact with each other. In addition there is a way to tune the MIPS P5600 CM2 L2-cache up by setting the Tag/Data/WS L2-to-RAM latencies. All of this functionality is implemented in the APB/AXI EHB and L2-cache control block drivers to be a part of the kernel soc subsystem (as being specific to the Baikal-T1 SoC) and introduced in the framework of this patchset.
Quoted 8 lines
Quoted 2 lines
This patchset is rebased and tested on the mainline Linux kernel 5.6-rc4:
commit98d54f81e36b("Linux 5.6-rc4").I have no objection to the drivers, but I wonder if these should be in
drivers/busanddrivers/memoryinstead ofdrivers/soc, which have similar drivers already. The driver for the L2 cache is not really a memory controller driver, but it may be close enough, and we already have a couple of different things in there.
Quoted 4 lines
I don't have the driver side in my inbox, but isn't setting up cache latencies in a driver a little late?
Rob
Generally speaking there is no much difference at what moment the driver is loaded and device is probed. First of all the L2-RAM latencies should be setup by the system bootloader before RAM is detected and the memory controller is enabled and run (though default value is normally Ok to use). In a worst case if the bootloader did something wrong it may cause either the performance degradation (up to 10% - 20% drop), or the system may get to be absolutely unstable. In the later the kernel (and bootloader) may collapse at any moment, most likely before the driver is loaded even at the very first possible stage. Due to this uncertainty the upcoming l2-cache tuning stage doesn't really matter.
So this driver can be used either to tune the system performance up by updating the system dtb while leaving the bootloader code unchanged, or by setting the latencies from user-space to the corresponding sysfs nodes exported by the driver.
Regards,
-Sergey
Quoted 16 lines · Arnd Bergmann
Quoted 14 lines · On Fri, Mar 6, 2020 at 2:07 PM <[email protected]> wrote:
From: Serge Semin <[email protected]>
Aside from PCIe/SATA/DDR/I2C/CPU-reboot specific settings the Baikal-T1 system controller provides three vendor-specific blocks. In particular there are two Errors Handler Blocks to detect and report an info regarding any problems discovered on the AXI and APB buses. These are the main buses utilized by the SoC devices to interact with each other. In addition there is a way to tune the MIPS P5600 CM2 L2-cache up by setting the Tag/Data/WS L2-to-RAM latencies. All of this functionality is implemented in the APB/AXI EHB and L2-cache control block drivers to be a part of the kernel soc subsystem (as being specific to the Baikal-T1 SoC) and introduced in the framework of this patchset.
Quoted 8 lines
Quoted 2 lines
This patchset is rebased and tested on the mainline Linux kernel 5.6-rc4:
commit98d54f81e36b("Linux 5.6-rc4").I have no objection to the drivers, but I wonder if these should be in
drivers/busanddrivers/memoryinstead ofdrivers/soc, which have similar drivers already. The driver for the L2 cache is not really a memory controller driver, but it may be close enough, and we already have a couple of different things in there.
I don't see a reply to Rob's or my comments, so I assume you are not currently updating them and I will wait for a new version after the v5.7 merge window.
Dropping the series from patchwork for now, see [1].
Arnd
Quoted 26 lines · Arnd Bergmann
Quoted 16 lines · Arnd Bergmann
Quoted 14 lines · On Fri, Mar 6, 2020 at 2:07 PM <[email protected]> wrote:
From: Serge Semin <[email protected]>
Aside from PCIe/SATA/DDR/I2C/CPU-reboot specific settings the Baikal-T1 system controller provides three vendor-specific blocks. In particular there are two Errors Handler Blocks to detect and report an info regarding any problems discovered on the AXI and APB buses. These are the main buses utilized by the SoC devices to interact with each other. In addition there is a way to tune the MIPS P5600 CM2 L2-cache up by setting the Tag/Data/WS L2-to-RAM latencies. All of this functionality is implemented in the APB/AXI EHB and L2-cache control block drivers to be a part of the kernel soc subsystem (as being specific to the Baikal-T1 SoC) and introduced in the framework of this patchset.
Quoted 8 lines
Quoted 2 lines
This patchset is rebased and tested on the mainline Linux kernel 5.6-rc4:
commit98d54f81e36b("Linux 5.6-rc4").I have no objection to the drivers, but I wonder if these should be in
drivers/busanddrivers/memoryinstead ofdrivers/soc, which have similar drivers already. The driver for the L2 cache is not really a memory controller driver, but it may be close enough, and we already have a couple of different things in there.
Quoted 8 lines
I don't see a reply to Rob's or my comments, so I assume you are not currently updating them and I will wait for a new version after the v5.7 merge window.
Dropping the series from patchwork for now, see [1].
Arnd
Yeah, sorry for the delay. I'll send an update very soon. A solution for the ehb'es is settled. We agreed to move the drivers to the drivers/bus subsystem. While we still don't know what to do with l2-cache driver. Please see my last response to your comment on the cover-letter.
Regards,
-Sergey
Rob Herring
maintainerQuoted 34 lines · On Fri, Mar 06, 2020 at 04:07:15PM +0300, [email protected]…
From: Serge Semin <[email protected]>
Aside from PCIe/SATA/DDR/I2C/CPU-reboot specific settings the Baikal-T1 system controller provides three vendor-specific blocks. In particular there are two Errors Handler Blocks to detect and report an info regarding any problems discovered on the AXI and APB buses. These are the main buses utilized by the SoC devices to interact with each other. In addition there is a way to tune the MIPS P5600 CM2 L2-cache up by setting the Tag/Data/WS L2-to-RAM latencies. All of this functionality is implemented in the APB/AXI EHB and L2-cache control block drivers to be a part of the kernel soc subsystem (as being specific to the Baikal-T1 SoC) and introduced in the framework of this patchset.
This patchset is rebased and tested on the mainline Linux kernel 5.6-rc4:
commit98d54f81e36b("Linux 5.6-rc4").Signed-off-by Serge Semin <[email protected]>Signed-off-by Alexey Malahov <[email protected]>Cc Maxim Kaurkin <[email protected]>Cc Pavel Parkhomenko <[email protected]>Cc Ramil Zaripov <[email protected]>Cc Ekaterina Skachko <[email protected]>Cc Vadim Vlasov <[email protected]>Cc Thomas Bogendoerfer <[email protected]>Cc Paul Burton <[email protected]>Cc Ralf Baechle <[email protected]>Cc Rob Herring <[email protected]>Cc Mark Rutland <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Olof Johansson <[email protected]>
Quoted 3 lines
Serge Semin (6):
dt-bindings: Add Baikal-T1 AXI-bus EHB dts bindings file
dt-bindings: Add Baikal-T1 APB-bus EHB dts bindings file
These 2 look fine other than the same comments given on your other patches.
Rob
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hello Arnd,
Quoted 18 lines · Arnd Bergmann
Quoted 14 lines · On Fri, Mar 6, 2020 at 2:07 PM <[email protected]> wrote:
From: Serge Semin <[email protected]>
Aside from PCIe/SATA/DDR/I2C/CPU-reboot specific settings the Baikal-T1 system controller provides three vendor-specific blocks. In particular there are two Errors Handler Blocks to detect and report an info regarding any problems discovered on the AXI and APB buses. These are the main buses utilized by the SoC devices to interact with each other. In addition there is a way to tune the MIPS P5600 CM2 L2-cache up by setting the Tag/Data/WS L2-to-RAM latencies. All of this functionality is implemented in the APB/AXI EHB and L2-cache control block drivers to be a part of the kernel soc subsystem (as being specific to the Baikal-T1 SoC) and introduced in the framework of this patchset.
Quoted 2 lines
This patchset is rebased and tested on the mainline Linux kernel 5.6-rc4:
commit98d54f81e36b("Linux 5.6-rc4").
Quoted 7 lines
I have no objection to the drivers, but I wonder if these should be in
drivers/busanddrivers/memoryinstead ofdrivers/soc, which have similar drivers already. The driver for the L2 cache is not really a memory controller driver, but it may be close enough, and we already have a couple of different things in there.Arnd
Sorry for a delay. I was analyzing and fixing comments, which were raised in the framework of anther patchsets I've submitted. Some of them including yours cause bigger changes than just a few fixups and might be resolved at once by a solution I've described in RFC: https://lkml.org/lkml/2020/3/22/393
You've been in Cc there, so feel free to send your comments.
Regarding ehb drivers. You are right. They should be moved to the drivers/bus (it has also been described in the RFC). It is more suitable place for them. I'll do it in v2.
Regarding l2 driver. Do you really think that L2 cache should be in drivers/memory? First there is no any cache-related drivers in that subsystem (at least I couldn't find any). Second the Baikal-T1 L2-cache-RAM config block has just indirect connection with RAM. The block just tunes the L2-cache<->RAM stall clock cycles up on WS/Tag/Data RAM IO-operations. This config seems more SoC-specific, than memory-like. Do you think that the driver should still be in drivers/memory?
On the other hand the block is part of the System Controller. I could just embed the l2-cache driver functionality into the System Controller MFD driver. Though honestly IMHO the functionality should live in a dedicated driver and drivers/soc is a better place for it. I also have doubts this part will be well accepted by Lee (drivers/mfd maintainer).
So what do you think?
Regards,
-Sergey
Quoted 26 lines · Sergey Semin
Quoted 15 lines · Arnd Bergmann
Quoted 14 lines · On Fri, Mar 6, 2020 at 2:07 PM <[email protected]> wrote:
From: Serge Semin <[email protected]>
Aside from PCIe/SATA/DDR/I2C/CPU-reboot specific settings the Baikal-T1 system controller provides three vendor-specific blocks. In particular there are two Errors Handler Blocks to detect and report an info regarding any problems discovered on the AXI and APB buses. These are the main buses utilized by the SoC devices to interact with each other. In addition there is a way to tune the MIPS P5600 CM2 L2-cache up by setting the Tag/Data/WS L2-to-RAM latencies. All of this functionality is implemented in the APB/AXI EHB and L2-cache control block drivers to be a part of the kernel soc subsystem (as being specific to the Baikal-T1 SoC) and introduced in the framework of this patchset.
Quoted 9 lines
Quoted 2 lines
This patchset is rebased and tested on the mainline Linux kernel 5.6-rc4:
commit98d54f81e36b("Linux 5.6-rc4").I have no objection to the drivers, but I wonder if these should be in
drivers/busanddrivers/memoryinstead ofdrivers/soc, which have similar drivers already. The driver for the L2 cache is not really a memory controller driver, but it may be close enough, and we already have a couple of different things in there.
Quoted 8 lines
Regarding l2 driver. Do you really think that L2 cache should be in
drivers/memory? First there is no any cache-related drivers in that subsystem (at least I couldn't find any). Second the Baikal-T1 L2-cache-RAM config block has just indirect connection with RAM. The block just tunes the L2-cache<->RAM stall clock cycles up on WS/Tag/Data RAM IO-operations. This config seems more SoC-specific, than memory-like. Do you think that the driver should still be indrivers/memory?
Either way could work, and both locations are a bit of a dumping ground for different kinds of drivers. My preference would be drivers/memory, but if anyone has a strong opinion the other way, drivers/soc would be acceptable as well.
Quoted 7 lines
On the other hand the block is part of the System Controller. I could just embed the l2-cache driver functionality into the System Controller MFD driver. Though honestly IMHO the functionality should live in a dedicated driver and
drivers/socis a better place for it. I also have doubts this part will be well accepted by Lee (drivers/mfdmaintainer).So what do you think?
If you make it a combined driver with the system controller, drivers/soc would be the most logical place. drivers/mfd should only be used for a multiplexer with child drivers doing the actual functionality.
Arnd
Quoted 48 lines · Arnd Bergmann
Quoted 26 lines · Sergey Semin
Quoted 15 lines · Arnd Bergmann
Quoted 14 lines · On Fri, Mar 6, 2020 at 2:07 PM <[email protected]> wrote:
From: Serge Semin <[email protected]>
Aside from PCIe/SATA/DDR/I2C/CPU-reboot specific settings the Baikal-T1 system controller provides three vendor-specific blocks. In particular there are two Errors Handler Blocks to detect and report an info regarding any problems discovered on the AXI and APB buses. These are the main buses utilized by the SoC devices to interact with each other. In addition there is a way to tune the MIPS P5600 CM2 L2-cache up by setting the Tag/Data/WS L2-to-RAM latencies. All of this functionality is implemented in the APB/AXI EHB and L2-cache control block drivers to be a part of the kernel soc subsystem (as being specific to the Baikal-T1 SoC) and introduced in the framework of this patchset.
Quoted 9 lines
Quoted 2 lines
This patchset is rebased and tested on the mainline Linux kernel 5.6-rc4:
commit98d54f81e36b("Linux 5.6-rc4").I have no objection to the drivers, but I wonder if these should be in
drivers/busanddrivers/memoryinstead ofdrivers/soc, which have similar drivers already. The driver for the L2 cache is not really a memory controller driver, but it may be close enough, and we already have a couple of different things in there.Quoted 8 lines
Regarding l2 driver. Do you really think that L2 cache should be in
drivers/memory? First there is no any cache-related drivers in that subsystem (at least I couldn't find any). Second the Baikal-T1 L2-cache-RAM config block has just indirect connection with RAM. The block just tunes the L2-cache<->RAM stall clock cycles up on WS/Tag/Data RAM IO-operations. This config seems more SoC-specific, than memory-like. Do you think that the driver should still be indrivers/memory?Either way could work, and both locations are a bit of a dumping ground for different kinds of drivers. My preference would be
drivers/memory, but if anyone has a strong opinion the other way,drivers/socwould be acceptable as well.Quoted 6 lines
On the other hand the block is part of the System Controller. I could just embed the l2-cache driver functionality into the System Controller MFD driver. Though honestly IMHO the functionality should live in a dedicated driver and
drivers/socis a better place for it. I also have doubts this part will be well accepted by Lee (drivers/mfdmaintainer).
Quoted 8 lines
Quoted 1 line
So what do you think?
If you make it a combined driver with the system controller,
drivers/socwould be the most logical place.drivers/mfdshould only be used for a multiplexer with child drivers doing the actual functionality.Arnd
I see. Thanks for the comment. I'll move the l2-cache driver to the drivers/memory then and send a new patchset referring to this discussion when it's ready. I'll make sure it'll be Cc'ed to you too.
Regards,
-Sergey
v2 cover bus: Add Baikal-T1 SoC APB/AXI bus drivers
In reply to [email protected]Baikal-T1 SoC CPU is based on two MIPS Warrior P5600 cores. Their main memory Non-Coherent IO interface is connected to the OCP2AXI bridge, which in turn is then connected to the DW AMBA 3 AXI Interconnect (so called Main Interconnect) with nine masters and four slaves ports. Main Interconnect is responsible for the AXI-bus traffic arbitration (QoS) and its routing from one component to another. In addition there is a Errors Handler Block (EHB) responsible to detect AXI protocol errors and device not responding situations built on top the interconnect. Baikal-T1 AXI-bus driver included in this patchset will be responsible for working with that functionality, though currently it doesn't support QoS tuning. Instead it's capable of detecting the error events, reporting an info about them to the system log, injecting artificial errors to test the driver functionality. Since AXI Interconnect doesn't provide a way to find out which devices are connected to it, so its DT node is supposed to be compatible with "simple-bus" driver, while sub-nodes shall represent the masters attached to the bus.
One of the AXI Interconnect slaves is an AXI-APB bridge used to access the Baikal-T1 SoC subsystems CSRs. MMIO request from CPU and DMAC masters are routed there if they are detected to be within [0x08000000 0x1FFFFFFF] range of the physical memory. In case if an attempted APB transaction stays with no response for a pre-defined time it will be detected by the APB-bus Errors Handler Block (EHB), which will raise an interrupt, then the bus gets freed for a next operation. The APB-bus driver provides the interrupt handler to detect the erroneous address, update an errors counter and prints an error message about the faulty address. The counter and the APB-bus operations timeout can be accessed via corresponding sysfs nodes. A dedicated sysfs-node can be also used to artificially cause the bus errors described above. Since APB-bus is a platform bus, it doesn't provide a way to detect slave devices connected to it, so similarly to the AXI-bus it's also supposed to be compatible with "simple-bus" driver.
This patchset is rebased and tested on the mainline Linux kernel 5.7-rc4:0e698dfa2822 ("Linux 5.7-rc4")
tag: v5.7-rc4
Note initially the driver was a part of the patchset created to reside in the kernel soc subsystem. But after a short discussion with Arnd:
https://lkml.org/lkml/2020/3/6/422
we decided to move it here.
New vendor prefix will be added in the framework of the next patchset:
https://lkml.org/lkml/2020/5/6/1047
Changelog v2:
- Assign dual GPL/BSD licenses to the bindings.
- Use single lined copyright headers in the bindings.
- Replace "additionalProperties: false" property with "unevaluatedProperties: false" in the bindings.
- Don't use a multi-arg clock phandle reference in DT binding examples. Thus remove includes from there.
- Fix some commit message and Kconfig help text spelling.
- Move drivers from soc to the bus subsystem.
- Convert a simple EHB drivers to the Baikal-T1 AXI and APB bus ones.
- Convert APB bus driver to using regmap MMIO API.
- Use syscon regmap to access the AXI-bus erroneous address.
- Add reset line support.
- Add Main Interconnect clock support to the AXI-bus driver.
- Remove probe-status info string printout.
- Discard of_match_ptr() macro utilization.
- Don't print error-message if no platform IRQ found. Just return an error.
- Use generic FIELD_{GET,PREP} macros instead of handwritten ones in the AXI-bus driver.
Serge Semin (4):
dt-bindings: bus: Add Baikal-T1 AXI-bus binding
dt-bindings: bus: Add Baikal-T1 APB-bus binding
bus: Add Baikal-T1 AXI-bus driver
bus: Add Baikal-T1 APB-bus driver
.../bindings/bus/baikal,bt1-apb.yaml | 90 ++++ .../bindings/bus/baikal,bt1-axi.yaml | 95 ++++ drivers/bus/Kconfig | 30 ++ drivers/bus/Makefile | 2 + drivers/bus/bt1-apb.c | 421 ++++++++++++++++++ drivers/bus/bt1-axi.c | 318 +++++++++++++ 6 files changed, 956 insertions(+) create mode 100644 Documentation/devicetree/bindings/bus/baikal,bt1-apb.yaml create mode 100644 Documentation/devicetree/bindings/bus/baikal,bt1-axi.yaml create mode 100644 drivers/bus/bt1-apb.c create mode 100644 drivers/bus/bt1-axi.c
Signature · 1 line
2.25.1
PATCH v2 1/4 dt-bindings: bus: Add Baikal-T1 AXI-bus binding
AXI3-bus is the main communication bus connecting all high-speed peripheral IP-cores with RAM controller and with MIPS P5600 cores on Baikal-T1 SoC. This binding describes the DW AMBA 3 AXI Inteconnect and Errors Handler Block synthesized on top of it, which are responsible for the AXI-bus traffic arbitration and errors reporting upstream to CPU. Baikal-T1 AXI-bus DT node is supposed to be compatible with "be,bt1-axi" and "simple-bus" drivers, should have reg property with AXI-bus QOS registers space, syscon phandle reference to the Baikal-T1 System Controller, IRQ line declared, AXI Interconnect reference clock and reset line.
---
Rob, I had to remove your Reviewed-by tag, since new changes had been introduced.
Changelog v2:
- Move driver to the bus subsystem.
- Use dual GPL/BSD license.
- Use single lined copyright header.
- Lowercase the unit-address.
- Convert a simple EHB block binding to the Baikal-T1 AXI-bus one with interconnect capabilities support.
- Replace "additionalProperties: false" property with "unevaluatedProperties: false".
- Add AXI reference clock and reset support.
- Add syscon phandle reference to the Baikal-T1 System Controller node.
--- .../bindings/bus/baikal,bt1-axi.yaml | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 Documentation/devicetree/bindings/bus/baikal,bt1-axi.yaml
Documentation/devicetree/bindings/bus/baikal,bt1-axi.yaml new file +95 -0
@@ -0,0 +1,95 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2020 BAIKAL ELECTRONICS, JSC +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/bus/baikal,bt1-axi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Baikal-T1 AXI-bus + +maintainers: + - Serge Semin <[email protected]> + +description: | + AXI3-bus is the main communication bus of Baikal-T1 SoC connecting all + high-speed peripheral IP-cores with RAM controller and with MIPS P5600 + cores. Traffic arbitration is done by means of DW AXI Interconnect (so + called AXI Main Interconnect) routing IO requests from one block to + another: from CPU to SoC peripherals and between some SoC peripherals + (mostly between peripheral devices and RAM, but also between DMA and + some peripherals). In case of any protocol error, device not responding + an IRQ is raised and a faulty situation is reported to the AXI EHB + (Errors Handler Block) embedded on top of the DW AXI Interconnect and + accessible by means of the Baikal-T1 System Controller. + +allOf: + - $ref: /schemas/simple-bus.yaml# + +properties: + compatible: + contains: + const: baikal,bt1-axi + + reg: + maxItems: 1 + + '#interconnect-cells': + const: 1 + + syscon: + $ref: /schemas/types.yaml#definitions/phandle + description: Phandle to the Baikal-T1 System Controller DT node + + interrupts: + maxItems: 1 + + clocks: + items: + - description: Main Interconnect uplink reference clock + + clock-names: + items: + - const: aclk + + resets: + items: + - description: Main Interconnect reset line + + reset-names: + items: + - const: arst + +unevaluatedProperties: false + +required: + - compatible + - reg + - syscon + - interrupts + - clocks + - clock-names + +examples: + - | + #include <dt-bindings/interrupt-controller/mips-gic.h> + + bus@1f05a000 { + compatible = "baikal,bt1-axi", "simple-bus"; + reg = <0 0x1f05a000 0 0x1000>; + #address-cells = <1>; + #size-cells = <1>; + #interconnect-cells = <1>; + + syscon = <&syscon>; + + ranges; + + interrupts = <GIC_SHARED 127 IRQ_TYPE_LEVEL_HIGH>; + + clocks = <&ccu_axi 0>; + clock-names = "aclk"; + + resets = <&ccu_axi 0>; + reset-names = "arst"; + }; +...
Signature · 1 line
2.25.1
Re: [PATCH v2 1/4] dt-bindings: bus: Add Baikal-T1 AXI-bus binding
Quoted 40 lines · Serge Semin
AXI3-bus is the main communication bus connecting all high-speed peripheral IP-cores with RAM controller and with MIPS P5600 cores on Baikal-T1 SoC. This binding describes the DW AMBA 3 AXI Inteconnect and Errors Handler Block synthesized on top of it, which are responsible for the AXI-bus traffic arbitration and errors reporting upstream to CPU. Baikal-T1 AXI-bus DT node is supposed to be compatible with "be,bt1-axi" and "simple-bus" drivers, should have reg property with AXI-bus QOS registers space, syscon phandle reference to the Baikal-T1 System Controller, IRQ line declared, AXI Interconnect reference clock and reset line.
Signed-off-by Serge Semin <[email protected]>Cc Alexey Malahov <[email protected]>Cc Paul Burton <[email protected]>Cc Ralf Baechle <[email protected]>Cc Tony Lindgren <[email protected]>Cc Tero Kristo <[email protected]>Cc Manivannan Sadhasivam <[email protected]>Cc Jeffrey Hugo <[email protected]>Cc Linus Walleij <[email protected]>Cc Olof Johansson <[email protected]>---
Rob, I had to remove your Reviewed-by tag, since new changes had been introduced.
Changelog v2:
- Move driver to the bus subsystem.
- Use dual GPL/BSD license.
- Use single lined copyright header.
- Lowercase the unit-address.
- Convert a simple EHB block binding to the Baikal-T1 AXI-bus one with interconnect capabilities support.
- Replace "additionalProperties: false" property with "unevaluatedProperties: false".
- Add AXI reference clock and reset support.
- Add syscon phandle reference to the Baikal-T1 System Controller node.
Quoted 5 lines
--- .../bindings/bus/baikal,bt1-axi.yaml | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 Documentation/devicetree/bindings/bus/baikal,bt1-axi.yaml
PATCH v2 2/4 dt-bindings: bus: Add Baikal-T1 APB-bus binding
In reply to Serge SeminBaikal-T1 CPU or DMAC MMIO requests are handled by the AMBA 3 AXI Interconnect which routes them to the AXI-APB bridge, which in turn serializes accesses and routes them to the corresponding APB slave device. This binding describes the AXI-APB bridge considered as the APB-bus. It is supposed to be compatible with "be,bt1-apb" and "simple-bus" drivers, should be equipped with EHB MMIO region and a region with no slave device mapped, interrupts line number, APB reference clock and domain reset line.
---
Rob, I had to remove your Reviewed-by tag, since new changes had been introduced.
Changelog v2:
- Move driver to the bus subsystem.
- Don't use a multi-arg clock phandle reference in the examples dt-bindings property. Thus redundant include statement can be removed.
- Use dual GPL/BSD license.
- Use single lined copyright header.
- Lowercase the unit-address.
- Convert a dedicated EHB block binding to the Baikal-T1 APB-bus one.
- Add APB reference clock and reset support.
- Replace "additionalProperties: false" property with "unevaluatedProperties: false".
- Add reg-names property.
--- .../bindings/bus/baikal,bt1-apb.yaml | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 Documentation/devicetree/bindings/bus/baikal,bt1-apb.yaml
Documentation/devicetree/bindings/bus/baikal,bt1-apb.yaml new file +90 -0
@@ -0,0 +1,90 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2020 BAIKAL ELECTRONICS, JSC +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/bus/baikal,bt1-apb.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Baikal-T1 APB-bus + +maintainers: + - Serge Semin <[email protected]> + +description: | + Baikal-T1 CPU or DMAC MMIO requests are handled by the AMBA 3 AXI Interconnect + which routes them to the AXI-APB bridge. This interface is a single master + multiple slaves bus in turn serializing IO accesses and routing them to the + addressed APB slave devices. In case of any APB protocol collisions, slave + device not responding on timeout an IRQ is raised with an erroneous address + reported to the APB terminator (APB Errors Handler Block). + +allOf: + - $ref: /schemas/simple-bus.yaml# + +properties: + compatible: + contains: + const: baikal,bt1-apb + + reg: + items: + - description: APB EHB MMIO registers + - description: APB MMIO region with no any device mapped + + reg-names: + items: + - const: ehb + - const: nodev + + interrupts: + maxItems: 1 + + clocks: + items: + - description: APB reference clock + + clock-names: + items: + - const: pclk + + resets: + items: + - description: APB domain reset line + + reset-names: + items: + - const: prst + +unevaluatedProperties: false + +required: + - compatible + - reg + - reg-names + - interrupts + - clocks + - clock-names + +examples: + - | + #include <dt-bindings/interrupt-controller/mips-gic.h> + + bus@1f059000 { + compatible = "baikal,bt1-apb", "simple-bus"; + reg = <0 0x1f059000 0 0x1000>, + <0 0x1d000000 0 0x2040000>; + reg-names = "ehb", "nodev"; + #address-cells = <1>; + #size-cells = <1>; + + ranges; + + interrupts = <GIC_SHARED 16 IRQ_TYPE_LEVEL_HIGH>; + + clocks = <&ccu_sys 1>; + clock-names = "pclk"; + + resets = <&ccu_sys 1>; + reset-names = "prst"; + }; +...
Signature · 1 line
2.25.1
Re: [PATCH v2 2/4] dt-bindings: bus: Add Baikal-T1 APB-bus binding
Quoted 38 lines · Serge Semin
Baikal-T1 CPU or DMAC MMIO requests are handled by the AMBA 3 AXI Interconnect which routes them to the AXI-APB bridge, which in turn serializes accesses and routes them to the corresponding APB slave device. This binding describes the AXI-APB bridge considered as the APB-bus. It is supposed to be compatible with "be,bt1-apb" and "simple-bus" drivers, should be equipped with EHB MMIO region and a region with no slave device mapped, interrupts line number, APB reference clock and domain reset line.
Signed-off-by Serge Semin <[email protected]>Cc Alexey Malahov <[email protected]>Cc Paul Burton <[email protected]>Cc Ralf Baechle <[email protected]>Cc Tony Lindgren <[email protected]>Cc Tero Kristo <[email protected]>Cc Manivannan Sadhasivam <[email protected]>Cc Jeffrey Hugo <[email protected]>Cc Linus Walleij <[email protected]>Cc Olof Johansson <[email protected]>---
Rob, I had to remove your Reviewed-by tag, since new changes had been introduced.
Changelog v2:
- Move driver to the bus subsystem.
- Don't use a multi-arg clock phandle reference in the examples dt-bindings property. Thus redundant include statement can be removed.
- Use dual GPL/BSD license.
- Use single lined copyright header.
- Lowercase the unit-address.
- Convert a dedicated EHB block binding to the Baikal-T1 APB-bus one.
- Add APB reference clock and reset support.
- Replace "additionalProperties: false" property with "unevaluatedProperties: false".
- Add reg-names property.
Quoted 5 lines
--- .../bindings/bus/baikal,bt1-apb.yaml | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 Documentation/devicetree/bindings/bus/baikal,bt1-apb.yaml
PATCH v2 3/4 bus: Add Baikal-T1 AXI-bus driver
In reply to Serge SeminAXI3-bus is the main communication bus connecting all high-speed peripheral IP-cores with RAM controller and MIPS P5600 cores on Baikal-T1 SoC. Bus traffic arbitration is done by means of DW AMBA 3 AXI Interconnect (so called AXI Main Interconnect) routing IO requests from one SoC block to another. This driver provides a way to detect any bus protocol errors and device not responding situations by means of an embedded on top of the interconnect errors handler block (EHB). AXI Interconnect QoS arbitration tuning is currently unsupported. The bus doesn't provide a way to detect the interconnected devices, so they are supposed to be statically defined like by means of the simple-bus sub-nodes.
---
Changelog v2:
- Fix commit message and Kconfig help text spelling.
- Move driver from soc to the bus subsystem.
- Convert a simple EHB driver to the Baikal-T1 AXI-bus one.
- Use syscon regmap to access the AXI-bus erroneous address.
- Add interconnect reset line support.
- Remove probe-status info string printout.
- Use generic FIELD_{GET,PREP} macros instead of handwritten ones.
- Since the driver depends on the OF config we can remove of_match_ptr() macro utilization.
- Don't print error-message if no platform IRQ found. Just return an error.
- Select MFD_SYSCON config.
--- drivers/bus/Kconfig | 15 ++ drivers/bus/Makefile | 1 + drivers/bus/bt1-axi.c | 318 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 334 insertions(+) create mode 100644 drivers/bus/bt1-axi.c
drivers/bus/Kconfig +15 -0
@@ -29,6 +29,21 @@ config BRCMSTB_GISB_ARB arbiter. This driver provides timeout and target abort error handling and internal bus master decoding. +config BT1_AXI + tristate "Baikal-T1 AXI-bus driver" + depends on (MIPS_BAIKAL_T1 && OF) || COMPILE_TEST + select MFD_SYSCON + help + AXI3-bus is the main communication bus connecting all high-speed + peripheral IP-cores with RAM controller and with MIPS P5600 cores on + Baikal-T1 SoC. Traffic arbitration is done by means of DW AMBA 3 AXI + Interconnect (so called AXI Main Interconnect) routing IO requests + from one SoC block to another. This driver provides a way to detect + any bus protocol errors and device not responding situations by + means of an embedded on top of the interconnect errors handler + block (EHB). AXI Interconnect QoS arbitration tuning is currently + unsupported. + config MOXTET tristate "CZ.NIC Turris Mox module configuration bus" depends on SPI_MASTER && OF
drivers/bus/Makefile +1 -0
@@ -13,6 +13,7 @@ obj-$(CONFIG_MOXTET) += moxtet.o # DPAA2 fsl-mc bus obj-$(CONFIG_FSL_MC_BUS) += fsl-mc/ +obj-$(CONFIG_BT1_AXI) += bt1-axi.o obj-$(CONFIG_IMX_WEIM) += imx-weim.o obj-$(CONFIG_MIPS_CDMM) += mips_cdmm.o obj-$(CONFIG_MVEBU_MBUS) += mvebu-mbus.o
drivers/bus/bt1-axi.c new file +318 -0
318 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v2 4/4 bus: Add Baikal-T1 APB-bus driver
In reply to Serge SeminBaikal-T1 AXI-APB bridge is used to access the SoC subsystem CSRs. IO requests are routed to this bus by means of the DW AMBA 3 AXI Interconnect. In case if an attempted APB transaction stays with no response for a pre-defined time an interrupt occurs and the bus gets freed for a next operation. This driver provides the interrupt handler to detect the erroneous address, prints an error message about the address fault, updates an errors counter. The counter and the APB-bus operations timeout can be accessed via corresponding sysfs nodes. A dedicated sysfs-node can be also used to artificially cause the bus errors described above.
---
Changelog v2:
- Fix commit message and Kconfig help text spelling.
- Move driver from soc to the bus subsystem.
- Convert a simple EHB driver to the Baikal-T1 AXI-bus one.
- Convert registers MMIO to the regmap.
- Add reset line support.
- Remove probe-status info string printout.
- Since the driver depends on the OF config we can remove of_match_ptr() macro utilization.
- Don't print error-message if no platform IRQ found. Just return an error.
--- drivers/bus/Kconfig | 15 ++ drivers/bus/Makefile | 1 + drivers/bus/bt1-apb.c | 421 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 437 insertions(+) create mode 100644 drivers/bus/bt1-apb.c
drivers/bus/Kconfig +15 -0
@@ -29,6 +29,21 @@ config BRCMSTB_GISB_ARB arbiter. This driver provides timeout and target abort error handling and internal bus master decoding. +config BT1_APB + tristate "Baikal-T1 APB-bus driver" + depends on (MIPS_BAIKAL_T1 && OF) || COMPILE_TEST + select REGMAP_MMIO + help + Baikal-T1 AXI-APB bridge is used to access the SoC subsystem CSRs. + IO requests are routed to this bus by means of the DW AMBA 3 AXI + Interconnect. In case of any APB protocol collisions, slave device + not responding on timeout an IRQ is raised with an erroneous address + reported to the APB terminator (APB Errors Handler Block). This + driver provides the interrupt handler to detect the erroneous + address, prints an error message about the address fault, updates an + errors counter. The counter and the APB-bus operations timeout can be + accessed via corresponding sysfs nodes. + config BT1_AXI tristate "Baikal-T1 AXI-bus driver" depends on (MIPS_BAIKAL_T1 && OF) || COMPILE_TEST
drivers/bus/Makefile +1 -0
@@ -13,6 +13,7 @@ obj-$(CONFIG_MOXTET) += moxtet.o # DPAA2 fsl-mc bus obj-$(CONFIG_FSL_MC_BUS) += fsl-mc/ +obj-$(CONFIG_BT1_APB) += bt1-apb.o obj-$(CONFIG_BT1_AXI) += bt1-axi.o obj-$(CONFIG_IMX_WEIM) += imx-weim.o obj-$(CONFIG_MIPS_CDMM) += mips_cdmm.o
drivers/bus/bt1-apb.c new file +421 -0
421 lines not on this page · raw message
Signature · 1 line
2.25.1
v2 cover memory: Add Baikal-T1 L2-cache driver
In reply to [email protected]Aside from PCIe/SATA/DDR/I2C/CPU-reboot specific settings the Baikal-T1 system controller provides a MIPS P5600 CM2 L2-cache tuning block. It is responsible for the setting up the Tag/Data/WS L2-to-RAM latencies. This small patchset provides a driver and DT-schema-based binding for the described device. So that the latencies can be tuned up by means of dedicated DT properties and sysfs nodes.
This patchset is rebased and tested on the mainline Linux kernel 5.7-rc4:0e698dfa2822 ("Linux 5.7-rc4")
tag: v5.7-rc4
Note initially the driver was a part of the patchset created to reside in the kernel soc subsystem. But after a short discussion with Arnd:
https://lkml.org/lkml/2020/3/6/422
we decided to move it here.
New vendor prefix will be added in the framework of the next patchset:
https://lkml.org/lkml/2020/5/6/1047
Changelog v2:
- Fix some commit message and Kconfig help text spelling.
- Move the driver to the memory subsystem.
- Assign dual GPL/BSD license to the DT binding.
- Use single lined copyright header in the binding.
- Discard reg property and syscon compatible string.
- Move "allOf" restrictions to the root level of the properties.
- The DT node is supposed to be a child of the Baikal-T1 system controller node. So regmap will be fetched from there.
- Use generic FIELD_{GET,PREP} macro.
- Remove probe-status info string printout.
- Since the driver depends on the OF config we can remove of_match_ptr() macro utilization.
Serge Semin (2):
dt-bindings: memory: Add Baikal-T1 L2-cache Control Block binding
memory: Add Baikal-T1 L2-cache Control Block driver
.../memory-controllers/baikal,bt1-l2-ctl.yaml | 59 ++++ drivers/memory/Kconfig | 11 + drivers/memory/Makefile | 1 + drivers/memory/bt1-l2-ctl.c | 322 ++++++++++++++++++ 4 files changed, 393 insertions(+) create mode 100644 Documentation/devicetree/bindings/memory-controllers/baikal,bt1-l2-ctl.yaml create mode 100644 drivers/memory/bt1-l2-ctl.c
Signature · 1 line
2.25.1
PATCH v2 1/2 dt-bindings: memory: Add Baikal-T1 L2-cache Control Block binding
There is a single register provided by the SoC system controller, which can be used to tune the L2-cache RAM up. It only provides a way to change the L2-RAM access latencies. So aside from "be,bt1-l2-ctl" compatible string the device node can be optionally equipped with the properties of Tag/Data/WS latencies.
---
Changelog v2:
- Move driver to the memory subsystem.
- Use dual GPL/BSD license.
- Use single lined copyright header.
- Move "allOf" restrictions to the root level of the properties.
- Discard syscon compatible string and reg property.
- The DT node is supposed to be a child of the Baikal-T1 system controller node.
--- .../memory-controllers/baikal,bt1-l2-ctl.yaml | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/memory-controllers/baikal,bt1-l2-ctl.yaml
Documentation/devicetree/bindings/memory-controllers/baikal,bt1-l2-ctl.yaml new file +59 -0
@@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2020 BAIKAL ELECTRONICS, JSC +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/memory-controllers/baikal,bt1-l2-ctl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Baikal-T1 L2-cache Control Block + +maintainers: + - Serge Semin <[email protected]> + +description: | + By means of the System Controller Baikal-T1 SoC exposes a few settings to + tune the MIPS P5600 CM2 L2 cache performance up. In particular it's possible + to change the Tag, Data and Way-select RAM access latencies. Baikal-T1 + L2-cache controller block is responsible for the tuning. Its DT node is + supposed to be a child of the system controller. + +properties: + compatible: + const: baikal,bt1-l2-ctl + + baikal,l2-ws-latency: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Cycles of latency for Way-select RAM accesses + default: 0 + minimum: 0 + maximum: 3 + + baikal,l2-tag-latency: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Cycles of latency for Tag RAM accesses + default: 0 + minimum: 0 + maximum: 3 + + baikal,l2-data-latency: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Cycles of latency for Data RAM accesses + default: 1 + minimum: 0 + maximum: 3 + +additionalProperties: false + +required: + - compatible + +examples: + - | + l2_ctl { + compatible = "baikal,bt1-l2-ctl"; + + baikal,l2-ws-latency = <0>; + baikal,l2-tag-latency = <0>; + baikal,l2-data-latency = <1>; + }; +...
Signature · 1 line
2.25.1
Rob Herring
maintainerRe: [PATCH v2 1/2] dt-bindings: memory: Add Baikal-T1 L2-cache Control Block binding
Quoted 28 lines · Serge Semin
There is a single register provided by the SoC system controller, which can be used to tune the L2-cache RAM up. It only provides a way to change the L2-RAM access latencies. So aside from "be,bt1-l2-ctl" compatible string the device node can be optionally equipped with the properties of Tag/Data/WS latencies.
Signed-off-by Serge Semin <[email protected]>Cc Alexey Malahov <[email protected]>Cc Paul Burton <[email protected]>Cc Ralf Baechle <[email protected]>Cc Olof Johansson <[email protected]>Cc Boris Brezillon <[email protected]>Cc Paul Cercueil <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Masahiro Yamada <[email protected]>---
Changelog v2:
- Move driver to the memory subsystem.
- Use dual GPL/BSD license.
- Use single lined copyright header.
- Move "allOf" restrictions to the root level of the properties.
- Discard syscon compatible string and reg property.
- The DT node is supposed to be a child of the Baikal-T1 system controller node.
Quoted 5 lines
--- .../memory-controllers/baikal,bt1-l2-ctl.yaml | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/memory-controllers/baikal,bt1-l2-ctl.yaml
My bot found errors running 'make dt_binding_check' on your patch:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/memory-controllers/baikal,bt1-l2-ctl.example.dt.yaml: l2_ctl: 'baikal,l2-data-latency', 'baikal,l2-tag-latency', 'baikal,l2-ws-latency' do not match any of the regexes: '^#.*', '^(at25|devbus|dmacap|dsa|exynos|fsi[ab]|gpio-fan|gpio|gpmc|hdmi|i2c-gpio),.*', '^(keypad|m25p|max8952|max8997|max8998|mpmc),.*', '^(pinctrl-single|#pinctrl-single|PowerPC),.*', '^(pl022|pxa-mmc|rcar_sound|rotary-encoder|s5m8767|sdhci),.*', '^(simple-audio-card|simple-graph-card|st-plgpio|st-spics|ts),.*', '^GEFanuc,.*', '^ORCL,.*', '^SUNW,.*', '^[a-zA-Z0-9#_][a-zA-Z0-9+\\-._@]{0,63}$', '^[a-zA-Z0-9+\\-._]*@[0-9a-zA-Z,]*$', '^abilis,.*', '^abracon,.*', '^acme,.*', '^actions,.*', '^active-semi,.*', '^ad,.*', '^adafruit,.*', '^adapteva,.*', '^adaptrum,.*', '^adh,.*', '^adi,.*', '^advantech,.*', '^aeroflexgaisler,.*', '^al,.*', '^allegro,.*', '^allo,.*', '^allwinner,.*', '^alphascale,.*', '^altr,.*', '^amarula,.*', '^amazon,.*', '^amcc,.*', '^am
d,.*', '^amediatech,.*', '^amlogic,.*', '^ampire,.*', '^ams,.*', '^amstaos,.*', '^analogix,.*', '^andestech,.*', '^anvo,.*', '^apm,.*', '^aptina,.*', '^arasan,.*', '^archermind,.*', '^arctic,.*', '^arcx,.*', '^aries,.*', '^arm,.*', '^armadeus,.*', '^arrow,.*', '^artesyn,.*', '^asahi-kasei,.*', '^asc,.*', '^aspeed,.*', '^asus,.*', '^atlas,.*', '^atmel,.*', '^auo,.*', '^auvidea,.*', '^avago,.*', '^avia,.*', '^avic,.*', '^avnet,.*', '^axentia,.*', '^axis,.*', '^azoteq,.*', '^azw,.*', '^bananapi,.*', '^beacon,.*', '^bhf,.*', '^bitmain,.*', '^boe,.*', '^bosch,.*', '^boundary,.*', '^brcm,.*', '^broadmobi,.*', '^bticino,.*', '^buffalo,.*', '^bur,.*', '^calaosystems,.*', '^calxeda,.*', '^capella,.*', '^cascoda,.*', '^catalyst,.*', '^cavium,.*', '^cdns,.*', '^cdtech,.*', '^ceva,.*', '^chipidea,.*', '^chipone,.*', '^chipspark,.*', '^chrp,.*', '^chunghwa,.*', '^chuwi,.*', '^ciaa,.*', '^cirrus,.*', '^cloudengines,.*', '^cnm,.*', '^cnxt,.*', '^colorfly,.*', '^compulab,.*', '^coreriver,.*', '^cor pro,.*', '^cortina,.*', '^cosmic,.*', '^crane,.*', '^creative,.*', '^crystalfontz,.*', '^csky,.*', '^csq,.*', '^cubietech,.*', '^cypress,.*', '^cznic,.*', '^dallas,.*', '^dataimage,.*', '^davicom,.*', '^dell,.*', '^delta,.*', '^denx,.*', '^devantech,.*', '^dh,.*', '^difrnce,.*', '^digi,.*', '^digilent,.*', '^dioo,.*', '^dlc,.*', '^dlg,.*', '^dlink,.*', '^dmo,.*', '^domintech,.*', '^dongwoon,.*', '^dptechnics,.*', '^dragino,.*', '^dserve,.*', '^dynaimage,.*', '^ea,.*', '^ebs-systart,.*', '^ebv,.*', '^eckelmann,.*', '^edt,.*', '^eeti,.*', '^einfochips,.*', '^elan,.*', '^elgin,.*', '^elida,.*', '^embest,.*', '^emlid,.*', '^emmicro,.*', '^empire-electronix,.*', '^emtrion,.*', '^endless,.*', '^ene,.*', '^energymicro,.*', '^engicam,.*', '^epcos,.*', '^epfl,.*', '^epson,.*', '^esp,.*', '^est,.*', '^ettus,.*', '^eukrea,.*', '^everest,.*', '^everspin,.*', '^evervision,.*', '^exar,.*', '^excito,.*', '^ezchip,.*', '^facebook,.*', '^fairphone,.*', '^faraday,.*', '^fastrax,.*', '^fcs,.*', '^feix in,.*', '^feiyang,.*', '^firefly,.*', '^focaltech,.*', '^frida,.*', '^friendlyarm,.*', '^fsl,.*', '^fujitsu,.*', '^gardena,.*', '^gateworks,.*', '^gcw,.*', '^ge,.*', '^geekbuying,.*', '^gef,.*', '^gemei,.*', '^geniatech,.*', '^giantec,.*', '^giantplus,.*', '^globalscale,.*', '^globaltop,.*', '^gmt,.*', '^goodix,.*', '^google,.*', '^grinn,.*', '^grmn,.*', '^gumstix,.*', '^gw,.*', '^hannstar,.*', '^haoyu,.*', '^hardkernel,.*', '^hideep,.*', '^himax,.*', '^hisilicon,.*', '^hit,.*', '^hitex,.*', '^holt,.*', '^holtek,.*', '^honeywell,.*', '^hoperun,.*', '^hp,.*', '^hsg,.*', '^hugsun,.*', '^hwacom,.*', '^hydis,.*', '^hyundai,.*', '^i2se,.*', '^ibm,.*', '^icplus,.*', '^idt,.*', '^ifi,.*', '^ilitek,.*', '^img,.*', '^incircuit,.*', '^inet-tek,.*', '^infineon,.*', '^inforce,.*', '^ingenic,.*', '^innolux,.*', '^inside-secure,.*', '^inspur,.*', '^intel,.*', '^intercontrol,.*', '^invensense,.*', '^inversepath,.*', '^iom,.*', '^isee,.*', '^isil,.*', '^issi,.*', '^ite,.*', '^itead,.*', '^iwave,.*' , '^jdi,.*', '^jedec,.*', '^jesurun,.*', '^jianda,.*', '^kam,.*', '^karo,.*', '^keithkoep,.*', '^keymile,.*', '^khadas,.*', '^kiebackpeter,.*', '^kinetic,.*', '^kingdisplay,.*', '^kingnovel,.*', '^kionix,.*', '^kobo,.*', '^koe,.*', '^kontron,.*', '^kosagi,.*', '^kyo,.*', '^lacie,.*', '^laird,.*', '^lamobo,.*', '^lantiq,.*', '^lattice,.*', '^leadtek,.*', '^leez,.*', '^lego,.*', '^lemaker,.*', '^lenovo,.*', '^lg,.*', '^lgphilips,.*', '^libretech,.*', '^licheepi,.*', '^linaro,.*', '^linksprite,.*', '^linksys,.*', '^linutronix,.*', '^linux,.*', '^linx,.*', '^lltc,.*', '^logicpd,.*', '^logictechno,.*', '^longcheer,.*', '^loongson,.*', '^lsi,.*', '^lwn,.*', '^macnica,.*', '^mapleboard,.*', '^marvell,.*', '^maxbotix,.*', '^maxim,.*', '^mbvl,.*', '^mcube,.*', '^meas,.*', '^mecer,.*', '^mediatek,.*', '^megachips,.*', '^mele,.*', '^melexis,.*', '^melfas,.*', '^mellanox,.*', '^memsic,.*', '^menlo,.*', '^merrii,.*', '^micrel,.*', '^microchip,.*', '^microcrystal,.*', '^micron,.*', '^microsoft,.* ', '^mikroe,.*', '^miniand,.*', '^minix,.*', '^miramems,.*', '^mitsubishi,.*', '^mosaixtech,.*', '^motorola,.*', '^moxa,.*', '^mpl,.*', '^mps,.*', '^mqmaker,.*', '^mrvl,.*', '^mscc,.*', '^msi,.*', '^mti,.*', '^multi-inno,.*', '^mundoreader,.*', '^murata,.*', '^mxicy,.*', '^myir,.*', '^national,.*', '^nec,.*', '^neonode,.*', '^netgear,.*', '^netlogic,.*', '^netron-dy,.*', '^netxeon,.*', '^neweast,.*', '^newhaven,.*', '^nexbox,.*', '^nextthing,.*', '^ni,.*', '^nintendo,.*', '^nlt,.*', '^nokia,.*', '^nordic,.*', '^novtech,.*', '^nutsboard,.*', '^nuvoton,.*', '^nvd,.*', '^nvidia,.*', '^nxp,.*', '^oceanic,.*', '^okaya,.*', '^oki,.*', '^olimex,.*', '^olpc,.*', '^onion,.*', '^onnn,.*', '^ontat,.*', '^opalkelly,.*', '^opencores,.*', '^openrisc,.*', '^option,.*', '^oranth,.*', '^orisetech,.*', '^ortustech,.*', '^osddisplays,.*', '^overkiz,.*', '^ovti,.*', '^oxsemi,.*', '^ozzmaker,.*', '^panasonic,.*', '^parade,.*', '^parallax,.*', '^pda,.*', '^pericom,.*', '^pervasive,.*', '^phicomm,.*', '^p hytec,.*', '^picochip,.*', '^pine64,.*', '^pineriver,.*', '^pixcir,.*', '^plantower,.*', '^plathome,.*', '^plda,.*', '^plx,.*', '^pni,.*', '^pocketbook,.*', '^polaroid,.*', '^portwell,.*', '^poslab,.*', '^pov,.*', '^powervr,.*', '^primux,.*', '^probox2,.*', '^pulsedlight,.*', '^purism,.*', '^qca,.*', '^qcom,.*', '^qemu,.*', '^qi,.*', '^qiaodian,.*', '^qihua,.*', '^qnap,.*', '^radxa,.*', '^raidsonic,.*', '^ralink,.*', '^ramtron,.*', '^raspberrypi,.*', '^raydium,.*', '^rda,.*', '^realtek,.*', '^renesas,.*', '^rervision,.*', '^richtek,.*', '^ricoh,.*', '^rikomagic,.*', '^riscv,.*', '^rockchip,.*', '^rocktech,.*', '^rohm,.*', '^ronbo,.*', '^roofull,.*', '^samsung,.*', '^samtec,.*', '^sancloud,.*', '^sandisk,.*', '^satoz,.*', '^sbs,.*', '^schindler,.*', '^seagate,.*', '^seirobotics,.*', '^semtech,.*', '^sensirion,.*', '^sensortek,.*', '^sff,.*', '^sgd,.*', '^sgmicro,.*', '^sgx,.*', '^sharp,.*', '^shimafuji,.*', '^si-en,.*', '^si-linux,.*', '^sifive,.*', '^sigma,.*', '^sii,.*', '^sil,.*',
'^silabs,.*', '^silead,.*', '^silergy,.*', '^siliconmitus,.*', '^simtek,.*', '^sinlinx,.*', '^sinovoip,.*', '^sipeed,.*', '^sirf,.*', '^sis,.*', '^sitronix,.*', '^skyworks,.*', '^smsc,.*', '^snps,.*', '^sochip,.*', '^socionext,.*', '^solidrun,.*', '^solomon,.*', '^sony,.*', '^spansion,.*', '^sprd,.*', '^sst,.*', '^st,.*', '^st-ericsson,.*', '^starry,.*', '^startek,.*', '^ste,.*', '^stericsson,.*', '^summit,.*', '^sunchip,.*', '^swir,.*', '^syna,.*', '^synology,.*', '^tbs,.*', '^tbs-biometrics,.*', '^tcg,.*', '^tcl,.*', '^technexion,.*', '^technologic,.*', '^techstar,.*', '^tempo,.*', '^terasic,.*', '^tfc,.*', '^thine,.*', '^ti,.*', '^tianma,.*', '^tlm,.*', '^tmt,.*', '^topeet,.*', '^toppoly,.*', '^topwise,.*', '^toradex,.*', '^toshiba,.*', '^toumaz,.*', '^tpk,.*', '^tplink,.*', '^tpo,.*', '^tq,.*', '^tronfy,.*', '^tronsmart,.*', '^truly,.*', '^tsd,.*', '^tyan,.*', '^u-blox,.*', '^ubnt,.*', '^ucrobotics,.*', '^udoo,.*', '^ugoos,.*', '^uniwest,.*', '^upisemi,.*', '^urt,.*', '^usi,.*'
, '^utoo,.*', '^v3,.*', '^vamrs,.*', '^variscite,.*', '^via,.*', '^videostrong,.*', '^virtio,.*', '^vishay,.*', '^vitesse,.*', '^vivante,.*', '^vocore,.*', '^voipac,.*', '^vot,.*', '^vxt,.*', '^waveshare,.*', '^wd,.*', '^wetek,.*', '^wexler,.*', '^whwave,.*', '^wi2wi,.*', '^winbond,.*', '^winstar,.*', '^wits,.*', '^wlf,.*', '^wm,.*', '^wobo,.*', '^x-powers,.*', '^xes,.*', '^xiaomi,.*', '^xillybus,.*', '^xinpeng,.*', '^xlnx,.*', '^xunlong,.*', '^xylon,.*', '^yna,.*', '^yones-toptech,.*', '^ysoft,.*', '^zarlink,.*', '^zeitec,.*', '^zidoo,.*', '^zii,.*', '^zte,.*', '^zyxel,.*'
See https://patchwork.ozlabs.org/patch/1285665
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure dt-schema is up to date:
pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade
Please check and re-submit.
Re: [PATCH v2 1/2] dt-bindings: memory: Add Baikal-T1 L2-cache Control Block binding
Quoted 40 lines · Rob Herring
Quoted 28 lines · Serge Semin
There is a single register provided by the SoC system controller, which can be used to tune the L2-cache RAM up. It only provides a way to change the L2-RAM access latencies. So aside from "be,bt1-l2-ctl" compatible string the device node can be optionally equipped with the properties of Tag/Data/WS latencies.
Signed-off-by Serge Semin <[email protected]>Cc Alexey Malahov <[email protected]>Cc Paul Burton <[email protected]>Cc Ralf Baechle <[email protected]>Cc Olof Johansson <[email protected]>Cc Boris Brezillon <[email protected]>Cc Paul Cercueil <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Masahiro Yamada <[email protected]>---
Changelog v2:
- Move driver to the memory subsystem.
- Use dual GPL/BSD license.
- Use single lined copyright header.
- Move "allOf" restrictions to the root level of the properties.
- Discard syscon compatible string and reg property.
- The DT node is supposed to be a child of the Baikal-T1 system controller node.Quoted 5 lines
--- .../memory-controllers/baikal,bt1-l2-ctl.yaml | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/memory-controllers/baikal,bt1-l2-ctl.yamlMy bot found errors running 'make
dt_binding_check' on your patch:[nip] ...
Quoted 9 lines
See https://patchwork.ozlabs.org/patch/1285665
If you already ran 'make
dt_binding_check' and didn't see the above error(s), then make sure dt-schema is up to date:pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade
Please check and re-submit.
The problem is due to an absent vendor prefix in the test kernel source tree environment. As I said in the cover-letter the new vendor prefix will be added in the framework of the next patchset:
https://lkml.org/lkml/2020/5/6/1047
Rob, please review that patchset first, merge in the corresponding patch from there and test this binding out then.
-Sergey
A message that is not in the archive (sent off-list or not yet received): CAL_JsqJEZF5xkNGGiBy5rgUFfg=hWp6qi=tzFW84cGD9m-p5SA@mail.gmail.com
Re: [PATCH v2 1/2] dt-bindings: memory: Add Baikal-T1 L2-cache Control Block binding
Quoted 59 lines · Rob Herring
Quoted 57 lines · Serge Semin
Quoted 40 lines · Rob Herring
Quoted 28 lines · Serge Semin
There is a single register provided by the SoC system controller, which can be used to tune the L2-cache RAM up. It only provides a way to change the L2-RAM access latencies. So aside from "be,bt1-l2-ctl" compatible string the device node can be optionally equipped with the properties of Tag/Data/WS latencies.
Signed-off-by Serge Semin <[email protected]>Cc Alexey Malahov <[email protected]>Cc Paul Burton <[email protected]>Cc Ralf Baechle <[email protected]>Cc Olof Johansson <[email protected]>Cc Boris Brezillon <[email protected]>Cc Paul Cercueil <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Masahiro Yamada <[email protected]>---
Changelog v2:
- Move driver to the memory subsystem.
- Use dual GPL/BSD license.
- Use single lined copyright header.
- Move "allOf" restrictions to the root level of the properties.
- Discard syscon compatible string and reg property.
- The DT node is supposed to be a child of the Baikal-T1 system controller node.Quoted 5 lines
--- .../memory-controllers/baikal,bt1-l2-ctl.yaml | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/memory-controllers/baikal,bt1-l2-ctl.yamlMy bot found errors running 'make
dt_binding_check' on your patch:[nip] ...
Quoted 9 lines
See https://patchwork.ozlabs.org/patch/1285665
If you already ran 'make
dt_binding_check' and didn't see the above error(s), then make sure dt-schema is up to date:pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade
Please check and re-submit.
The problem is due to an absent vendor prefix in the test kernel source tree environment. As I said in the cover-letter the new vendor prefix will be added in the framework of the next patchset:
https://lkml.org/lkml/2020/5/6/1047
Quoted 6 lines
Quoted 2 lines
Rob, please review that patchset first, merge in the corresponding patch from there and test this binding out then.
Did you read the part about a 'bot'? My bot doesn't read cover letters and I only occasionally do. Do you want to write me a script that can do this?
A script, that would read a cover-letter for you? =)
Anyway I wasn't talking to the bot, but to you explaining why the problem happened and of how to solve it. I didn't mean to blame you or the 'bot' for not reading the letter. Sorry, if it seemed like I did.
-Sergey
Quoted 2 lines
Rob
A message that is not in the archive (sent off-list or not yet received): CAL_Jsq+rka7hXVy46=O3pTrN0DLCAQQ=TSpSqzoB2dxb30h66g@mail.gmail.com
Re: [PATCH v2 1/2] dt-bindings: memory: Add Baikal-T1 L2-cache Control Block binding
Quoted 55 lines · Rob Herring
Quoted 53 lines · Serge Semin
There is a single register provided by the SoC system controller, which can be used to tune the L2-cache RAM up. It only provides a way to change the L2-RAM access latencies. So aside from "be,bt1-l2-ctl" compatible string the device node can be optionally equipped with the properties of Tag/Data/WS latencies.
Signed-off-by Serge Semin <[email protected]>Cc Alexey Malahov <[email protected]>Cc Paul Burton <[email protected]>Cc Ralf Baechle <[email protected]>Cc Olof Johansson <[email protected]>Cc Boris Brezillon <[email protected]>Cc Paul Cercueil <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Masahiro Yamada <[email protected]>---
Changelog v2:
- Move driver to the memory subsystem.
- Use dual GPL/BSD license.
- Use single lined copyright header.
- Move "allOf" restrictions to the root level of the properties.
- Discard syscon compatible string and reg property.
- The DT node is supposed to be a child of the Baikal-T1 system controller node.--- .../memory-controllers/baikal,bt1-l2-ctl.yaml | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/memory-controllers/baikal,bt1-l2-ctl.yamlDocumentation/devicetree/bindings/memory-controllers/baikal,bt1-l2-ctl.yaml new file +13
-0@@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2020 BAIKAL ELECTRONICS, JSC +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/memory-controllers/baikal,bt1-l2-ctl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Baikal-T1 L2-cache Control Block + +maintainers: + - Serge Semin <[email protected]> + +description: |
Quoted 8 lines
Documentation/devicetree/bindings/memory-controllers/baikal,bt1-l2-ctl.yaml line 18
Quoted 5 lines
Documentation/devicetree/bindings/memory-controllers/baikal,bt1-l2-ctl.yaml new file +5
-0+ By means of the System Controller Baikal-T1 SoC exposes a few settings to + tune the MIPS P5600 CM2 L2 cache performance up. In particular it's possible + to change the Tag, Data and Way-select RAM access latencies. Baikal-T1 + L2-cache controller block is responsible for the tuning. Its DT node is + supposed to be a child of the system controller.Is there a register range for just the L2 registers in the system controller. If so, please add a 'reg' property.
It's just a single register, though almost fully dedicated for this feature. Should I add the reg property anyway? Since you touched this topic, aside from this l2-control block the system controller has also got sub-blocks of PLLs, clock dividers, reboot, reboot-mode and indirectly addressed i2c in the same MMIO space. These blocks all have got a dedicated registers range within the syscon regmap space. Shall I add an optional reg property for them too? If so shall their node names to be in the regexp-format like "^name(@[0-9a-f]+)?" ?
Quoted 4 lines
This should all be part of the system controller schema either as 1 file or by a $ref from the system controller to this file. That's how we ensure "supposed to be a child of the system controller".
Oh, that's clever solution. I was thinking of how to signify this parent-child dependency. I'll add the $ref in the corresponding properties of the system controller. So this DT schema should live here, separately from the syscon DT node. Thanks for the note.
Quoted 33 lines
Quoted 33 lines
Documentation/devicetree/bindings/memory-controllers/baikal,bt1-l2-ctl.yaml new file +32
-0+ +properties: + compatible: + const: baikal,bt1-l2-ctl + + baikal,l2-ws-latency: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Cycles of latency for Way-select RAM accesses + default: 0 + minimum: 0 + maximum: 3 + + baikal,l2-tag-latency: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Cycles of latency for Tag RAM accesses + default: 0 + minimum: 0 + maximum: 3 + + baikal,l2-data-latency: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Cycles of latency for Data RAM accesses + default: 1 + minimum: 0 + maximum: 3 + +additionalProperties: false + +required: + - compatible + +examples:
Quoted 8 lines
Documentation/devicetree/bindings/memory-controllers/baikal,bt1-l2-ctl.yaml line 56
Quoted 6 lines
Documentation/devicetree/bindings/memory-controllers/baikal,bt1-l2-ctl.yaml new file +6
-0+ - | + l2_ctl { + compatible = "baikal,bt1-l2-ctl"; + + baikal,l2-ws-latency = <0>; + baikal,l2-tag-latency = <0>;0 is the default, why list it?
1 is the default for the l2-data-latency too. Why not? It's just an example.
-Sergey
Quoted 7 lines
Quoted 7 lines
Documentation/devicetree/bindings/memory-controllers/baikal,bt1-l2-ctl.yaml new file +3
-1+ baikal,l2-data-latency = <1>; + }; +... --2.25.1
Re: [PATCH v2 1/2] dt-bindings: memory: Add Baikal-T1 L2-cache Control Block binding
In reply to Serge SeminRob,
Could you take a look at this patch?
Since you've accepted and merged in the patch:
https://lore.kernel.org/linux-devicetree/[email protected]/
It's safe to perform the dt_binding_check of this one.
-Sergey
Quoted 101 lines · Serge Semin
There is a single register provided by the SoC system controller, which can be used to tune the L2-cache RAM up. It only provides a way to change the L2-RAM access latencies. So aside from "be,bt1-l2-ctl" compatible string the device node can be optionally equipped with the properties of Tag/Data/WS latencies.
Signed-off-by Serge Semin <[email protected]>Cc Alexey Malahov <[email protected]>Cc Paul Burton <[email protected]>Cc Ralf Baechle <[email protected]>Cc Olof Johansson <[email protected]>Cc Boris Brezillon <[email protected]>Cc Paul Cercueil <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Masahiro Yamada <[email protected]>---
Changelog v2:
- Move driver to the memory subsystem.
- Use dual GPL/BSD license.
- Use single lined copyright header.
- Move "allOf" restrictions to the root level of the properties.
- Discard syscon compatible string and reg property.
- The DT node is supposed to be a child of the Baikal-T1 system controller node.--- .../memory-controllers/baikal,bt1-l2-ctl.yaml | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/memory-controllers/baikal,bt1-l2-ctl.yamlDocumentation/devicetree/bindings/memory-controllers/baikal,bt1-l2-ctl.yaml new file +59
-0@@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2020 BAIKAL ELECTRONICS, JSC +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/memory-controllers/baikal,bt1-l2-ctl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Baikal-T1 L2-cache Control Block + +maintainers: + - Serge Semin <[email protected]> + +description: | + By means of the System Controller Baikal-T1 SoC exposes a few settings to + tune the MIPS P5600 CM2 L2 cache performance up. In particular it's possible + to change the Tag, Data and Way-select RAM access latencies. Baikal-T1 + L2-cache controller block is responsible for the tuning. Its DT node is + supposed to be a child of the system controller. + +properties: + compatible: + const: baikal,bt1-l2-ctl + + baikal,l2-ws-latency: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Cycles of latency for Way-select RAM accesses + default: 0 + minimum: 0 + maximum: 3 + + baikal,l2-tag-latency: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Cycles of latency for Tag RAM accesses + default: 0 + minimum: 0 + maximum: 3 + + baikal,l2-data-latency: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Cycles of latency for Data RAM accesses + default: 1 + minimum: 0 + maximum: 3 + +additionalProperties: false + +required: + - compatible + +examples: + - | + l2_ctl { + compatible = "baikal,bt1-l2-ctl"; + + baikal,l2-ws-latency = <0>; + baikal,l2-tag-latency = <0>; + baikal,l2-data-latency = <1>; + }; +...Signature · 1 line
2.25.1
PATCH v2 2/2 memory: Add Baikal-T1 L2-cache Control Block driver
In reply to Serge SeminBaikal-T1 SoC provides a way to tune the MIPS P5600 CM2 L2-cache performance up. It can be done by changing the L2-RAM Data/Tag/WS latencies in a dedicated register exposed by the system controller. The driver added by this commit provides a dts properties-based and sysfs-based interface for it. The device DT node is supposed to be a child of Baikal-T1 System Controller node.
---
Changelog v2:
- Move driver from soc to memory subsystem.
- Get regmap from the parental syscon DT node.
- Use generic FIELD_{GET,PREP} macro.
- Remove probe-status info string printout.
- Since the driver depends on the OF config we can remove of_match_ptr() macro utilization.
- Select MFD_SYSCON config.
--- drivers/memory/Kconfig | 11 ++ drivers/memory/Makefile | 1 + drivers/memory/bt1-l2-ctl.c | 322 ++++++++++++++++++++++++++++++++++++ 3 files changed, 334 insertions(+) create mode 100644 drivers/memory/bt1-l2-ctl.c
drivers/memory/Kconfig +11 -0
@@ -46,6 +46,17 @@ config ATMEL_EBI tree is used. This bus supports NANDs, external ethernet controller, SRAMs, ATA devices, etc. +config BT1_L2_CTL + bool "Baikal-T1 CM2 L2-RAM Cache Control Block" + depends on (MIPS_BAIKAL_T1 && OF) || COMPILE_TEST + select MFD_SYSCON + help + Baikal-T1 CPU is based on the MIPS P5600 Warrior IP-core. The CPU + resides Coherency Manager V2 with embedded 1MB L2-cache. It's + possible to tune the L2 cache performance up by setting the data, + tags and way-select latencies of RAM access. This driver provides a + dt properties-based and sysfs interface for it. + config TI_AEMIF tristate "Texas Instruments AEMIF driver" depends on (ARCH_DAVINCI || ARCH_KEYSTONE) && OF
drivers/memory/Makefile +1 -0
@@ -11,6 +11,7 @@ obj-$(CONFIG_ARM_PL172_MPMC) += pl172.o obj-$(CONFIG_ATMEL_SDRAMC) += atmel-sdramc.o obj-$(CONFIG_ATMEL_EBI) += atmel-ebi.o obj-$(CONFIG_ARCH_BRCMSTB) += brcmstb_dpfe.o +obj-$(CONFIG_BT1_L2_CTL) += bt1-l2-ctl.o obj-$(CONFIG_TI_AEMIF) += ti-aemif.o obj-$(CONFIG_TI_EMIF) += emif.o obj-$(CONFIG_OMAP_GPMC) += omap-gpmc.o
drivers/memory/bt1-l2-ctl.c new file +322 -0
322 lines not on this page · raw message
Signature · 1 line
2.25.1