* [PATCH 1/2] dt-bindings: mfd: Add Baikal-T1 Boot Controller bindings
[not found] <20200306130528.9973-1-Sergey.Semin@baikalelectronics.ru>
@ 2020-03-06 13:05 ` Sergey.Semin
2020-03-09 18:07 ` Rob Herring
[not found] ` <20200309180734.A303C80307C7@mail.baikalelectronics.ru>
2020-03-10 1:11 ` [PATCH 0/2] mfd: Add Baikal-T1 SoC Boot Controller driver Sergey Semin
1 sibling, 2 replies; 4+ messages in thread
From: Sergey.Semin @ 2020-03-06 13:05 UTC (permalink / raw)
To: Lee Jones, Rob Herring, Mark Rutland
Cc: Serge Semin, Serge Semin, Alexey Malahov, Thomas Bogendoerfer,
Paul Burton, Ralf Baechle, devicetree, linux-kernel
From: Serge Semin <Sergey.Semin@baikalelectronics.ru>
From Linux point of view Baikal-T1 Boot Controller is a multi-function
memory-mapped device, which provides an access to three memory-mapped
ROMs and to an embedded DW APB SSI-based SPI controller. It's refelected
in the be,bt1-boot-ctl bindings file. So the device must be added to
the system dts-file as an ordinary memory-mapped device node with
a single clocks source phandle declared and with also memory-mapped
spi/mtd-rom sub-devices.
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Signed-off-by: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
---
.../bindings/mfd/be,bt1-boot-ctl.yaml | 89 +++++++++++++++++++
1 file changed, 89 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mfd/be,bt1-boot-ctl.yaml
diff --git a/Documentation/devicetree/bindings/mfd/be,bt1-boot-ctl.yaml b/Documentation/devicetree/bindings/mfd/be,bt1-boot-ctl.yaml
new file mode 100644
index 000000000000..bb95a236d231
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/be,bt1-boot-ctl.yaml
@@ -0,0 +1,89 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/be,bt1-boot-ctl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Baikal-T1 Boot Controller bindings
+
+description: |
+ Baikal-T1 SoC Boot Controller is a vendor-specific module responsible
+ for the CPU primary booting up. Mainly it is a special block, which
+ task is to properly start the SoC and then pass the control to the CPU
+ cores. It also provides a MMIO-based interface to a bootable memory
+ devices with an executable code pre-installed for the system to
+ start. The controller includes the next functions:
+ 1) Pysically mapped ROMs to transparently access a SoC' internal firmware
+ and SPI Boot flash.
+ 2) DW APB SSI-based embedded SPI controller.
+
+maintainers:
+ - Serge Semin <fancer.lancer@gmail.com>
+
+properties:
+ compatible:
+ const: be,bt1-boot-ctl
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ description: APB interface clock source.
+ maxItems: 1
+
+ clock-names:
+ items:
+ - const: pclk
+
+ "#address-cells": true
+
+ "#size-cells": true
+
+ ranges: true
+
+patternProperties:
+ "^(rom|spi)@[0-9a-fA-F]+$":
+ type: object
+
+ properties:
+ compatible:
+ anyOf:
+ - description: Memory mapped boot ROMs.
+ items:
+ - enum:
+ - be,bt1-int-rom
+ - be,bt1-ssi-rom
+ - be,bt1-boot-rom
+ - const: mtd-rom
+ - description: DW APB SSI-based boot SPI controller.
+ const: be,bt1-boot-ssi
+
+ required:
+ - compatible
+
+additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - "#address-cells"
+ - "#size-cells"
+ - ranges
+ - clocks
+ - clock-names
+
+examples:
+ - |
+ #include <dt-bindings/clock/bt1-ccu.h>
+
+ boot: boot@1F040000 {
+ compatible = "be,bt1-boot-ctl";
+ reg = <0x1F040000 0x100>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ clocks = <&ccu_sys CCU_SYS_APB_CLK>;
+ clock-names = "pclk";
+ };
+...
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 0/2] mfd: Add Baikal-T1 SoC Boot Controller driver
[not found] <20200306130528.9973-1-Sergey.Semin@baikalelectronics.ru>
2020-03-06 13:05 ` [PATCH 1/2] dt-bindings: mfd: Add Baikal-T1 Boot Controller bindings Sergey.Semin
@ 2020-03-10 1:11 ` Sergey Semin
1 sibling, 0 replies; 4+ messages in thread
From: Sergey Semin @ 2020-03-10 1:11 UTC (permalink / raw)
To: Alexey Malahov, Maxim Kaurkin, Pavel Parkhomenko, Ramil Zaripov,
Ekaterina Skachko, Vadim Vlasov, Thomas Bogendoerfer, Paul Burton,
Ralf Baechle, Lee Jones, Rob Herring, Mark Rutland, devicetree,
linux-kernel
On Fri, Mar 06, 2020 at 04:05:26PM +0300, Sergey.Semin@baikalelectronics.ru wrote:
> From: Serge Semin <fancer.lancer@gmail.com>
>
> Baikal-T1 Boot Controller is an IP block embedded into the SoC and responsible
> for the chip proper pre-initialization and further booting up from selected
> memory mapped device. From the Linux kernel point of view it's just a multi-
> functional device, which exports three physically mapped ROMs and a single SPI
> controller interface.
>
> Baikal-T1 can boot either from an external SPI-flash or from an embedded into
> it firmware. So when the bootup from the SPI-flash is selected the flash memory
> can be accessed either directly via the embedded into the Boot Controller DW
> APB SSI controller registers or via a physically mapped ROM (which is just an
> FSM IP-core interacting with the DW APB SSI controller by itself). Since both
> of these interfaces are using the same SPI interface they can't be utilized
> simultaneously. Instead the Boot Controller provides the access switching
> functionality by means of the control register flag. That's why we need the
> Boot Controller MFD driver provided by this patchset - in order to multiplex the
> access to the DW APB SSI controller and SPI interface from two different
> subsystems.
>
> After this patchset is integrated into the kernel we'll submit two more
> patchsets with physically mapped ROMs (due to some peculiarities we can't have
> the already available in the kernel mtd-rom drivers) and SPI controller
> (similarly the available in the kernel DW APB SSI driver isn't suitable for
> our version of the SPI controller) drivers will be submitted for integration
> into the mainline Linux kernel.
>
> This patchset is rebased and tested on the mainline Linux kernel 5.6-rc4:
> commit 98d54f81e36b ("Linux 5.6-rc4").
>
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> Signed-off-by: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
> Cc: Maxim Kaurkin <Maxim.Kaurkin@baikalelectronics.ru>
> Cc: Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>
> Cc: Ramil Zaripov <Ramil.Zaripov@baikalelectronics.ru>
> Cc: Ekaterina Skachko <Ekaterina.Skachko@baikalelectronics.ru>
> Cc: Vadim Vlasov <V.Vlasov@baikalelectronics.ru>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: Paul Burton <paulburton@kernel.org>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: devicetree@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
>
> Serge Semin (2):
> dt-bindings: mfd: Add Baikal-T1 Boot Controller bindings
> mfd: Add Baikal-T1 Boot Controller driver
>
> .../bindings/mfd/be,bt1-boot-ctl.yaml | 89 +++++
> drivers/mfd/Kconfig | 13 +
> drivers/mfd/Makefile | 1 +
> drivers/mfd/bt1-boot-ctl.c | 345 ++++++++++++++++++
> include/linux/mfd/bt1-boot-ctl.h | 46 +++
> 5 files changed, 494 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/mfd/be,bt1-boot-ctl.yaml
> create mode 100644 drivers/mfd/bt1-boot-ctl.c
> create mode 100644 include/linux/mfd/bt1-boot-ctl.h
>
> --
> 2.25.1
>
Folks,
It appears our corporate email server changes the Message-Id field of
messages passing through it. Due to that the emails threading gets to be
broken. I'll resubmit the properly structured v2 patchset as soon as our system
administrator fixes the problem. Sorry for the inconvenience caused by it.
Regards,
-Sergey
^ permalink raw reply [flat|nested] 4+ messages in thread