Skip to contentSkip to conversation

dt-bindings: arm: Initial MStar vendor prefixes and compatible strings

PATCH Superseded Daniel Palmer 5 participants 70 messages Oct 14, 2019 – Jul 9, 2020

Subsystems (6)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 dt-bindings: arm: Initial MStar vendor prefixes and compatible strings

This adds a prefix for MStar and thingy.jp and then defines compatible strings for the first MStar based board.

---
 .../devicetree/bindings/arm/mstar.yaml        | 22 +++++++++++++++++++
 .../devicetree/bindings/vendor-prefixes.yaml  |  4 ++++
 MAINTAINERS                                   |  6 +++++
 3 files changed, 32 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/mstar.yaml
Documentation/devicetree/bindings/arm/mstar.yaml new file +22 -0
new file mode 100644
index 000000000000..0ea5b2b9387f
@@ -0,0 +1,22 @@
+# SPDX-License-Identifier: (GPL-2.0+ OR X11)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/mstar.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MStar platforms device tree bindings
+
+maintainers:
+  - Daniel Palmer <[email protected]>
+
+properties:
+  $nodename:
+    const: '/'
+  compatible:
+    oneOf:
+
+      - description: thingy.jp BreadBee
+        items:
+          - const: thingyjp,breadbee
+          - const: mstar,infinity
+          - const: mstar,infinity3
Documentation/devicetree/bindings/vendor-prefixes.yaml +4 -0
index 967e78c5ec0a..1425468188da 100644
@@ -617,6 +617,8 @@ patternProperties:
     description: Microsemi Corporation
   "^msi,.*":
     description: Micro-Star International Co. Ltd.
+  "^mstar,.*":
+    description: MStar Semiconductor, Inc.
   "^mti,.*":
     description: Imagination Technologies Ltd. (formerly MIPS Technologies Inc.)
   "^multi-inno,.*":
@@ -943,6 +945,8 @@ patternProperties:
     description: Three Five Corp
   "^thine,.*":
     description: THine Electronics, Inc.
+  "^thingyjp,.*":
+    description: thingy.jp
   "^ti,.*":
     description: Texas Instruments
   "^tianma,.*":
MAINTAINERS +6 -0
index a69e6db80c79..8b7913c13f9a 100644
@@ -1981,6 +1981,12 @@ L:	[email protected] (moderated for non-subscribers)
 F:	arch/arm/mach-pxa/mioa701.c
 S:	Maintained
 
+ARM/MStar SoC support
+M:	Daniel Palmer <[email protected]>
+L:	[email protected] (moderated for non-subscribers)
+F:	Documentation/devicetree/bindings/arm/mstar.yaml
+S:	Maintained
+
 ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT
 M:	Michael Petchkovsky <[email protected]>
 S:	Maintained
Signature · 1 line
2.23.0
#1 lore raw

PATCH 2/4 ARM: mstar: Add machine for MStar infinity family SoCs

Initial support for the MStar infinity/infinity3 series of Cortex A7 based IP camera SoCs.

These chips are interesting in that they contain a Cortex A7, peripherals and system memory in a single tiny QFN package that can be hand soldered allowing almost anyone to embed Linux in their projects.

---
 MAINTAINERS                    |  1 +
 arch/arm/Kconfig               |  2 +
 arch/arm/Makefile              |  1 +
 arch/arm/mach-mstar/Kconfig    | 15 ++++++
 arch/arm/mach-mstar/Makefile   |  1 +
 arch/arm/mach-mstar/infinity.c | 96 ++++++++++++++++++++++++++++++++++
 6 files changed, 116 insertions(+)
 create mode 100644 arch/arm/mach-mstar/Kconfig
 create mode 100644 arch/arm/mach-mstar/Makefile
 create mode 100644 arch/arm/mach-mstar/infinity.c
MAINTAINERS +1 -0
index 8b7913c13f9a..e35c3eb2b680 100644
@@ -1985,6 +1985,7 @@ ARM/MStar SoC support
 M:	Daniel Palmer <[email protected]>
 L:	[email protected] (moderated for non-subscribers)
 F:	Documentation/devicetree/bindings/arm/mstar.yaml
+F:	arch/arm/mach-mstar/
 S:	Maintained
 
 ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT
arch/arm/Kconfig +2 -0
index 8a50efb559f3..b8450ed8d946 100644
@@ -667,6 +667,8 @@ source "arch/arm/mach-mmp/Kconfig"
 
 source "arch/arm/mach-moxart/Kconfig"
 
+source "arch/arm/mach-mstar/Kconfig"
+
 source "arch/arm/mach-mv78xx0/Kconfig"
 
 source "arch/arm/mach-mvebu/Kconfig"
arch/arm/Makefile +1 -0
index db857d07114f..2a3c127cd243 100644
@@ -196,6 +196,7 @@ machine-$(CONFIG_ARCH_MXC)		+= imx
 machine-$(CONFIG_ARCH_MEDIATEK)		+= mediatek
 machine-$(CONFIG_ARCH_MILBEAUT)		+= milbeaut
 machine-$(CONFIG_ARCH_MXS)		+= mxs
+machine-$(CONFIG_ARCH_MSTAR)		+= mstar
 machine-$(CONFIG_ARCH_NOMADIK)		+= nomadik
 machine-$(CONFIG_ARCH_NPCM)		+= npcm
 machine-$(CONFIG_ARCH_NSPIRE)		+= nspire
arch/arm/mach-mstar/Kconfig new file +15 -0
new file mode 100644
index 000000000000..7bc79c296ebb
@@ -0,0 +1,15 @@
+menuconfig ARCH_MSTAR
+	bool "MStar SoC Support"
+	depends on ARCH_MULTI_V7
+	select ARM_GIC
+	help
+	  Support for MStar ARMv7 SoCs
+
+if ARCH_MSTAR
+
+config MACH_INFINITY
+	bool "MStar infinity SoC support"
+	default ARCH_INFINITY
+	help
+	  Support for MStar infinity(1/3) IP camera SoCs
+endif
arch/arm/mach-mstar/Makefile new file +1 -0
new file mode 100644
index 000000000000..144b58b189e3
@@ -0,0 +1 @@
+obj-$(CONFIG_MACH_INFINITY) += infinity.o
arch/arm/mach-mstar/infinity.c new file +96 -0

96 lines not on this page · raw message

Signature · 1 line
2.23.0
maintainer
#2 lore raw

Re: [PATCH 2/4] ARM: mstar: Add machine for MStar infinity family SoCs

Quoted 11 lines · Daniel Palmer

Initial support for the MStar infinity/infinity3 series of Cortex A7 based IP camera SoCs.

These chips are interesting in that they contain a Cortex A7, peripherals and system memory in a single tiny QFN package that can be hand soldered allowing almost anyone to embed Linux in their projects.

arch/arm/mach-mstar/infinity.c line 59

Quoted 9 lines
arch/arm/mach-mstar/infinity.c new file +9 -0
+
+static void __init infinity_map_io(void)
+{
+       iotable_init(infinity_io_desc, ARRAY_SIZE(infinity_io_desc));
+       miu_flush = (void __iomem *)(infinity_io_desc[0].virtual
+                       + INFINITY_L3BRIDGE_FLUSH);
+       miu_status = (void __iomem *)(infinity_io_desc[0].virtual
+                       + INFINITY_L3BRIDGE_STATUS);
+}

If you do this a little later in .init_machine, you can use a simple ioremap() rather than picking a hardcoded physical address. It looks like nothing uses the mapping before you set soc_mb anyway.

Quoted 5 lines
arch/arm/mach-mstar/infinity.c new file +5 -0
+static DEFINE_SPINLOCK(infinity_mb_lock);
+
+static void infinity_mb(void)
+{
+       unsigned long flags;

arch/arm/mach-mstar/infinity.c line 80

Quoted 10 lines
arch/arm/mach-mstar/infinity.c new file +10 -0
+
+       spin_lock_irqsave(&infinity_mb_lock, flags);
+       /* toggle the flush miu pipe fire bit */
+       writel_relaxed(0, miu_flush);
+       writel_relaxed(INFINITY_L3BRIDGE_FLUSH_TRIGGER, miu_flush);
+       while (!(readl_relaxed(miu_status) & INFINITY_L3BRIDGE_STATUS_DONE)) {
+               /* wait for flush to complete */
+       }
+       spin_unlock_irqrestore(&infinity_mb_lock, flags);
+}

Wow, this is a heavy barrier. From your description it doesn't sound like there is anything to be done about it unfortunately.

Two possible issues I see here:

* It looks like it relies on CONFIG_ARM_HEAVY_BARRIER, but your Kconfig entry does not select that. In many configurations, CACHE_L2X0 would be set, but there is no need for yours on the Cortex-A7.

* You might get into a deadlock if you get an FIQ (NMI) interrupt while holding the infinity_mb_lock, and then issue another memory barrier from that handler, so you might need to use local_irq_disable()+local_fiq_disable()+raw_spin_lock() here, making it even more expensive.
Not sure if it matters in practice, as almost nothing uses fiq any more. OTOH, maybe the lock is not needed at all? AFAICT if the sequence gets interrupted by a handler that also calls mb(), you would still continue in the original thread while observing a full l3 barrier. ;-)

Arnd

#3 lore raw

Re: [PATCH 2/4] ARM: mstar: Add machine for MStar infinity family SoCs

Quoted 5 lines
Quoted 5 lines
arch/arm/mach-mstar/infinity.c new file +5 -0
+
+static void __init infinity_map_io(void)
+{
+       iotable_init(infinity_io_desc, ARRAY_SIZE(infinity_io_desc));
+       miu_flush = (void __iomem *)(infinity_io_desc[0].virtual
Quoted 8 lines

arch/arm/mach-mstar/infinity.c line 59

Quoted 4 lines
arch/arm/mach-mstar/infinity.c new file +4 -0
+                       + INFINITY_L3BRIDGE_FLUSH);
+       miu_status = (void __iomem *)(infinity_io_desc[0].virtual
+                       + INFINITY_L3BRIDGE_STATUS);
+}

If you do this a little later in .init_machine, you can use a simple ioremap() rather than picking a hardcoded physical address. It looks like nothing uses the mapping before you set soc_mb anyway.

I've moved this into infinity_barriers_init() using ioremap() as suggested. I'd like to keep the fixed remap address for now as there are some drivers in the vendor code that might be useful until rewrites are done but are littered with hard coded addresses.

Quoted 10 lines
Quoted 10 lines
arch/arm/mach-mstar/infinity.c new file +10 -0
+static DEFINE_SPINLOCK(infinity_mb_lock);
+
+static void infinity_mb(void)
+{
+       unsigned long flags;
+
+       spin_lock_irqsave(&infinity_mb_lock, flags);
+       /* toggle the flush miu pipe fire bit */
+       writel_relaxed(0, miu_flush);
+       writel_relaxed(INFINITY_L3BRIDGE_FLUSH_TRIGGER, miu_flush);
Quoted 8 lines

arch/arm/mach-mstar/infinity.c line 80

Quoted 5 lines
arch/arm/mach-mstar/infinity.c new file +5 -0
+       while (!(readl_relaxed(miu_status) & INFINITY_L3BRIDGE_STATUS_DONE)) {
+               /* wait for flush to complete */
+       }
+       spin_unlock_irqrestore(&infinity_mb_lock, flags);
+}

Wow, this is a heavy barrier. From your description it doesn't sound like there is anything to be done about it unfortunately.

It's possible there is a better way once I can find out what the L3 bridge actually is. There is a small amount of documentation for the miu (DDR controller) that says it has an 8 or 4 operation configurable pipeline but this flushing bit is in a totally different area that's only documented by the comment about it in u-boot.

Quoted 5 lines

Two possible issues I see here:

* It looks like it relies on CONFIG_ARM_HEAVY_BARRIER, but your Kconfig entry does not select that. In many configurations, CACHE_L2X0 would be set, but there is no need for yours on the Cortex-A7.

Fixed.

Quoted 4 lines

Not sure if it matters in practice, as almost nothing uses fiq any more. OTOH, maybe the lock is not needed at all? AFAICT if the sequence gets interrupted by a handler that also calls mb(), you would still continue in the original thread while observing a full l3 barrier. ;-)

I've taken the lock out and tested that the ethernet isn't sending garbage and everything looks good.

I'm still hoping for some feedback on the other parts of the series. I'll post a v2 series in a few days.

Thanks!

Daniel

maintainer
#4 lore raw

Re: [PATCH 2/4] ARM: mstar: Add machine for MStar infinity family SoCs

Quoted 15 lines · Daniel Palmer
Quoted 14 lines

arch/arm/mach-mstar/infinity.c line 59

Quoted 10 lines
arch/arm/mach-mstar/infinity.c new file +9 -0
+
+static void __init infinity_map_io(void)
+{
+       iotable_init(infinity_io_desc, ARRAY_SIZE(infinity_io_desc));
+       miu_flush = (void __iomem *)(infinity_io_desc[0].virtual
+                       + INFINITY_L3BRIDGE_FLUSH);
+       miu_status = (void __iomem *)(infinity_io_desc[0].virtual
+                       + INFINITY_L3BRIDGE_STATUS);
+}

If you do this a little later in .init_machine, you can use a simple ioremap() rather than picking a hardcoded physical address. It looks like nothing uses the mapping before you set soc_mb anyway.

Quoted 4 lines

I've moved this into infinity_barriers_init() using ioremap() as suggested. I'd like to keep the fixed remap address for now as there are some drivers in the vendor code that might be useful until rewrites are done but are littered with hard coded addresses.

Maybe keep the infinity_io_desc as an out-of-tree patch then? You can simply do both, and ioremap() will return the hardcoded address.

Quoted 7 lines
Quoted 4 lines

Not sure if it matters in practice, as almost nothing uses fiq any more. OTOH, maybe the lock is not needed at all? AFAICT if the sequence gets interrupted by a handler that also calls mb(), you would still continue in the original thread while observing a full l3 barrier. ;-)

I've taken the lock out and tested that the ethernet isn't sending garbage and everything looks good.

I would not expect a missing spinlock to have an observable effect, the question is more whether it's correct in all rare corner cases where the barrier is interrupted and the interrupt handler uses another barrier.

I think it is, but I would recommend adding a comment to explain this if you drop the spinlock. (or a comment about why this works with fiq if you keep the lock).

Arnd

#5 lore raw

Re: [PATCH 2/4] ARM: mstar: Add machine for MStar infinity family SoCs

Quoted 7 lines · Arnd Bergmann
Quoted 4 lines

I've moved this into infinity_barriers_init() using ioremap() as suggested. I'd like to keep the fixed remap address for now as there are some drivers in the vendor code that might be useful until rewrites are done but are littered with hard coded addresses.

Maybe keep the infinity_io_desc as an out-of-tree patch then? You can simply do both, and ioremap() will return the hardcoded address.

That makes sense.

Quoted 10 lines
Quoted 2 lines

I've taken the lock out and tested that the ethernet isn't sending garbage and everything looks good.

I would not expect a missing spinlock to have an observable effect, the question is more whether it's correct in all rare corner cases where the barrier is interrupted and the interrupt handler uses another barrier.

I think it is, but I would recommend adding a comment to explain this if you drop the spinlock. (or a comment about why this works with fiq if you keep the lock).

I think I'll drop the lock for now and add it back if it becomes apparent it's needed. I suspect it was added in the vendor code out of habit instead of need.

Thanks for the input.

Daniel

#6 lore raw

v2 cover Initial MStar/Sigmastar ARMv7 SoC support

In reply to Daniel Palmer

This patch set adds initial support for MStar/Sigmastar's ARMv7 based SoCs. There is just enough here to get to a shell with an initramfs but support for a lot of the hardware is in progress and will follow.

MStar also shipped chips with MIPS cores and ARM9 etc which are incompatible so I've tried to make the distinction in the code that this is strictly for the ARMv7 based chips.

Differences from v1:

1. v1 only really supported two specific chips that were known at the time of submitting that patch series. Since then it's become apparent that there are a few families of SoCs based on the same ARMv7 core, clk blocks, interrupt controllers etc and this v2 attempts to make support more generic so in the future more SoCs from this lineage can be added. Support for some other chips is already in progress and will follow.

2. v1 only added support for the BreadBee boards that I have been working on. v2 also adds support for a readily available car dash camera.

3. Support for the BreadBee board has been split into two top level dts to cleanly support if either the msc313 or msc313e is mounted on the board. The chips are pin compatible but some of the internal hardware is different. The u-boot port for these SoCs can detect which chip it is running on and select the right dts so the user doesn't have to care which chip is mounted on their board.

Daniel Palmer (5):
dt-bindings: arm: Initial MStar vendor prefixes and compatible strings
ARM: mstar: Add machine for MStar/Sigmastar infinity/mercury family
ARMv7 SoCs
ARM: mstar: Add infinity/mercury series dtsi
ARM: mstar: Add dts for msc313(e) based BreadBee boards
ARM: mstar: Add dts for 70mai midrive d08

 .../devicetree/bindings/arm/mstar.yaml        | 30 ++++++++
 .../devicetree/bindings/vendor-prefixes.yaml  |  6 ++
 MAINTAINERS                                   | 10 +++
 arch/arm/Kconfig                              |  2 +
 arch/arm/Makefile                             |  1 +
 arch/arm/boot/dts/Makefile                    |  4 ++
 .../dts/infinity-msc313-breadbee_crust.dts    | 25 +++++++
 arch/arm/boot/dts/infinity-msc313.dtsi        | 14 ++++
 arch/arm/boot/dts/infinity.dtsi               | 10 +++
 .../boot/dts/infinity3-msc313e-breadbee.dts   | 25 +++++++
 arch/arm/boot/dts/infinity3-msc313e.dtsi      | 14 ++++
 arch/arm/boot/dts/infinity3.dtsi              | 10 +++
 .../boot/dts/mercury5-ssc8336n-midrive08.dts  | 25 +++++++
 arch/arm/boot/dts/mercury5-ssc8336n.dtsi      | 14 ++++
 arch/arm/boot/dts/mercury5.dtsi               | 10 +++
 arch/arm/boot/dts/mstar-v7.dtsi               | 71 ++++++++++++++++++
 arch/arm/mach-mstar/Kconfig                   | 26 +++++++
 arch/arm/mach-mstar/Makefile                  |  1 +
 arch/arm/mach-mstar/mstarv7.c                 | 72 +++++++++++++++++++
 19 files changed, 370 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/mstar.yaml
 create mode 100644 arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts
 create mode 100644 arch/arm/boot/dts/infinity-msc313.dtsi
 create mode 100644 arch/arm/boot/dts/infinity.dtsi
 create mode 100644 arch/arm/boot/dts/infinity3-msc313e-breadbee.dts
 create mode 100644 arch/arm/boot/dts/infinity3-msc313e.dtsi
 create mode 100644 arch/arm/boot/dts/infinity3.dtsi
 create mode 100644 arch/arm/boot/dts/mercury5-ssc8336n-midrive08.dts
 create mode 100644 arch/arm/boot/dts/mercury5-ssc8336n.dtsi
 create mode 100644 arch/arm/boot/dts/mercury5.dtsi
 create mode 100644 arch/arm/boot/dts/mstar-v7.dtsi
 create mode 100644 arch/arm/mach-mstar/Kconfig
 create mode 100644 arch/arm/mach-mstar/Makefile
 create mode 100644 arch/arm/mach-mstar/mstarv7.c
Signature · 1 line
2.27.0.rc0
#7 lore raw

v3 cover Initial MStar/Sigmastar Armv7 SoC support

This patch set adds initial support for MStar/Sigmastar's Armv7 based SoCs. There is just enough here to get to a shell with an initramfs but support for a lot of the hardware is in progress and will follow.

MStar also shipped chips with MIPS cores and ARM9 etc which are incompatible so I've tried to make the distinction in the code that this is strictly for the Armv7 based chips.

Differences from v2:

1. With Marc Zyngier's help the GIC node has been filled out properly.

2. A comment was added to the arch timer node to explain why the clock-frequency is specified. Basically the vendor u-boot is old and broken.

3. Based on Arnd Bergmann's feedback the heavy memory barrier is now implemented using a DT node to specify where the registers are instead of hardcoding their location. A binding description has been added for the new node.

4. Expanded comments around the heavy memory barrier code so it's more obvious why it looks like it does.

5. The heavy memory barrier init code was folded into the machine init function.

6. Updated the device tree bindings and prefixes based on Andreas Färber's feedback. They have also been split out into a number of commits

7. Based on Andreas Färber's feedback I've added the "riu" (register interface unit) internal bus that contains all of the peripheral registers and the proper ranges for the soc node. This bus has clocks, interrupts and some configuration register so it might get it's own driver in the future.

8. I've dropped the pmu node for now as it's not needed to boot and I'm not sure of the relationship between the single core in most of the chips and the 4 documented interrupts.

9. Numerous cosmetic changes based on Andreas Färber's feedback.

Differences from v1:

1. v1 only really supported two specific chips that were known at the time of submitting that patch series. Since then it's become apparent that there are a few families of SoCs based on the same ARMv7 core, clk blocks, interrupt controllers etc and this v2 attempts to make support more generic so in the future more SoCs from this lineage can be added. Support for some other chips is already in progress and will follow.

2. v1 only added support for the BreadBee boards that I have been working on. v2 also adds support for a readily available car dash camera.

3. Support for the BreadBee board has been split into two top level dts to cleanly support if either the msc313 or msc313e is mounted on the board. The chips are pin compatible but some of the internal hardware is different. The u-boot port for these SoCs can detect which chip it is running on and select the right dts so the user doesn't have to care which chip is mounted on their board.

Daniel Palmer (12):
dt-bindings: vendor-prefixes: Add mstar vendor prefix
dt-bindings: vendor-prefixes: Add sstar vendor prefix
dt-bindings: vendor-prefixes: Add 70mai vendor prefix
dt-bindings: vendor-prefixes: Add thingy.jp prefix
dt-bindings: dt-bindings: arm: Add mstar YAML schema
ARM: mstar: Add machine for MStar/Sigmastar Armv7 SoCs
ARM: mstar: Add binding details for mstar,l3bridge
ARM: mstar: Add Armv7 base dtsi
ARM: mstar: Add infinity/infinity3 family dtsis
ARM: mstar: Add mercury5 series dtsis
ARM: mstar: Add dts for msc313(e) based BreadBee boards
ARM: mstar: Add dts for 70mai midrive d08

 .../devicetree/bindings/arm/mstar.yaml        | 33 ++++++++
 .../bindings/misc/mstar,l3bridge.yaml         | 44 ++++++++++
 .../devicetree/bindings/vendor-prefixes.yaml  |  8 ++
 MAINTAINERS                                   | 11 +++
 arch/arm/Kconfig                              |  2 +
 arch/arm/Makefile                             |  1 +
 arch/arm/boot/dts/Makefile                    |  4 +
 .../dts/infinity-msc313-breadbee_crust.dts    | 25 ++++++
 arch/arm/boot/dts/infinity-msc313.dtsi        | 14 ++++
 arch/arm/boot/dts/infinity.dtsi               |  7 ++
 .../boot/dts/infinity3-msc313e-breadbee.dts   | 25 ++++++
 arch/arm/boot/dts/infinity3-msc313e.dtsi      | 14 ++++
 arch/arm/boot/dts/infinity3.dtsi              |  7 ++
 .../boot/dts/mercury5-ssc8336n-midrive08.dts  | 25 ++++++
 arch/arm/boot/dts/mercury5-ssc8336n.dtsi      | 14 ++++
 arch/arm/boot/dts/mercury5.dtsi               |  7 ++
 arch/arm/boot/dts/mstar-v7.dtsi               | 83 +++++++++++++++++++
 arch/arm/mach-mstar/Kconfig                   | 26 ++++++
 arch/arm/mach-mstar/Makefile                  |  1 +
 arch/arm/mach-mstar/mstarv7.c                 | 80 ++++++++++++++++++
 20 files changed, 431 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/mstar.yaml
 create mode 100644 Documentation/devicetree/bindings/misc/mstar,l3bridge.yaml
 create mode 100644 arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts
 create mode 100644 arch/arm/boot/dts/infinity-msc313.dtsi
 create mode 100644 arch/arm/boot/dts/infinity.dtsi
 create mode 100644 arch/arm/boot/dts/infinity3-msc313e-breadbee.dts
 create mode 100644 arch/arm/boot/dts/infinity3-msc313e.dtsi
 create mode 100644 arch/arm/boot/dts/infinity3.dtsi
 create mode 100644 arch/arm/boot/dts/mercury5-ssc8336n-midrive08.dts
 create mode 100644 arch/arm/boot/dts/mercury5-ssc8336n.dtsi
 create mode 100644 arch/arm/boot/dts/mercury5.dtsi
 create mode 100644 arch/arm/boot/dts/mstar-v7.dtsi
 create mode 100644 arch/arm/mach-mstar/Kconfig
 create mode 100644 arch/arm/mach-mstar/Makefile
 create mode 100644 arch/arm/mach-mstar/mstarv7.c
Signature · 1 line
2.27.0.rc0
#8 lore raw

PATCH v3 1/12 dt-bindings: vendor-prefixes: Add mstar vendor prefix

Add prefix for MStar Semiconductor, Inc.

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index ef6d75b9113a..86b569a0c008 100644
@@ -678,6 +678,8 @@ patternProperties:
     description: Microsemi Corporation
   "^msi,.*":
     description: Micro-Star International Co. Ltd.
+  "^mstar,.*":
+    description: MStar Semiconductor, Inc. (acquired by MediaTek Inc.)
   "^mti,.*":
     description: Imagination Technologies Ltd. (formerly MIPS Technologies Inc.)
   "^multi-inno,.*":
Signature · 1 line
2.27.0.rc0
#9 lore raw

v4 cover Initial MStar/Sigmastar ARMv7 SoC support

This patch set adds initial support for MStar/Sigmastar's Armv7 based SoCs. There is just enough here to get to a shell with an initramfs but support for a lot of the hardware is in progress and will follow.

MStar also shipped chips with MIPS cores and ARM9 etc which are incompatible so I've tried to make the distinction in the code that this is strictly for the Armv7 based chips.

Sorry for the spamming this. I just really want to make some progress on this because I'm worried the other bits that are needed for these SoCs (Really old AT91 support in macb and the fotg210 usb host) will be lost or stop working in the meantime. This already happened in u-boot.

Differences from v3:
1. Fixed the issue with the mstar binding that Rob Herring's bot found.
2. Fixed the filename for the midrived08 dts.

Differences from v2:

1. With Marc Zyngier's help the GIC node has been filled out properly.

2. A comment was added to the arch timer node to explain why the clock-frequency is specified. Basically the vendor u-boot is old and broken.

3. Based on Arnd Bergmann's feedback the heavy memory barrier is now implemented using a DT node to specify where the registers are instead of hardcoding their location. A binding description has been added for the new node.

4. Expanded comments around the heavy memory barrier code so it's more obvious why it looks like it does.

5. The heavy memory barrier init code was folded into the machine init function.

6. Updated the device tree bindings and prefixes based on Andreas Färber's feedback. They have also been split out into a number of commits

7. Based on Andreas Färber's feedback I've added the "riu" (register interface unit) internal bus that contains all of the peripheral registers and the proper ranges for the soc node. This bus has clocks, interrupts and some configuration register so it might get it's own driver in the future.

8. I've dropped the pmu node for now as it's not needed to boot and I'm not sure of the relationship between the single core in most of the chips and the 4 documented interrupts.

9. Numerous cosmetic changes based on Andreas Färber's feedback.

Differences from v1:

1. v1 only really supported two specific chips that were known at the time of submitting that patch series. Since then it's become apparent that there are a few families of SoCs based on the same ARMv7 core, clk blocks, interrupt controllers etc and this v2 attempts to make support more generic so in the future more SoCs from this lineage can be added. Support for some other chips is already in progress and will follow.

2. v1 only added support for the BreadBee boards that I have been working on. v2 also adds support for a readily available car dash camera.

3. Support for the BreadBee board has been split into two top level dts to cleanly support if either the msc313 or msc313e is mounted on the board. The chips are pin compatible but some of the internal hardware is different. The u-boot port for these SoCs can detect which chip it is running on and select the right dts so the user doesn't have to care which chip is mounted on their board.

Daniel Palmer (12):
dt-bindings: vendor-prefixes: Add mstar vendor prefix
dt-bindings: vendor-prefixes: Add sstar vendor prefix
dt-bindings: vendor-prefixes: Add 70mai vendor prefix
dt-bindings: vendor-prefixes: Add thingy.jp prefix
dt-bindings: arm: Add mstar YAML schema
ARM: mstar: Add machine for MStar/Sigmastar Armv7 SoCs
ARM: mstar: Add binding details for mstar,l3bridge
ARM: mstar: Add Armv7 base dtsi
ARM: mstar: Add infinity/infinity3 family dtsis
ARM: mstar: Add mercury5 series dtsis
ARM: mstar: Add dts for msc313(e) based BreadBee boards
ARM: mstar: Add dts for 70mai midrive d08

 .../devicetree/bindings/arm/mstar.yaml        | 34 ++++++++
 .../bindings/misc/mstar,l3bridge.yaml         | 44 ++++++++++
 .../devicetree/bindings/vendor-prefixes.yaml  |  8 ++
 MAINTAINERS                                   | 11 +++
 arch/arm/Kconfig                              |  2 +
 arch/arm/Makefile                             |  1 +
 arch/arm/boot/dts/Makefile                    |  4 +
 .../dts/infinity-msc313-breadbee_crust.dts    | 25 ++++++
 arch/arm/boot/dts/infinity-msc313.dtsi        | 14 ++++
 arch/arm/boot/dts/infinity.dtsi               |  7 ++
 .../boot/dts/infinity3-msc313e-breadbee.dts   | 25 ++++++
 arch/arm/boot/dts/infinity3-msc313e.dtsi      | 14 ++++
 arch/arm/boot/dts/infinity3.dtsi              |  7 ++
 .../boot/dts/mercury5-ssc8336n-midrived08.dts | 25 ++++++
 arch/arm/boot/dts/mercury5-ssc8336n.dtsi      | 14 ++++
 arch/arm/boot/dts/mercury5.dtsi               |  7 ++
 arch/arm/boot/dts/mstar-v7.dtsi               | 83 +++++++++++++++++++
 arch/arm/mach-mstar/Kconfig                   | 26 ++++++
 arch/arm/mach-mstar/Makefile                  |  1 +
 arch/arm/mach-mstar/mstarv7.c                 | 80 ++++++++++++++++++
 20 files changed, 432 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/mstar.yaml
 create mode 100644 Documentation/devicetree/bindings/misc/mstar,l3bridge.yaml
 create mode 100644 arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts
 create mode 100644 arch/arm/boot/dts/infinity-msc313.dtsi
 create mode 100644 arch/arm/boot/dts/infinity.dtsi
 create mode 100644 arch/arm/boot/dts/infinity3-msc313e-breadbee.dts
 create mode 100644 arch/arm/boot/dts/infinity3-msc313e.dtsi
 create mode 100644 arch/arm/boot/dts/infinity3.dtsi
 create mode 100644 arch/arm/boot/dts/mercury5-ssc8336n-midrived08.dts
 create mode 100644 arch/arm/boot/dts/mercury5-ssc8336n.dtsi
 create mode 100644 arch/arm/boot/dts/mercury5.dtsi
 create mode 100644 arch/arm/boot/dts/mstar-v7.dtsi
 create mode 100644 arch/arm/mach-mstar/Kconfig
 create mode 100644 arch/arm/mach-mstar/Makefile
 create mode 100644 arch/arm/mach-mstar/mstarv7.c
Signature · 1 line
2.27.0.rc0
#10 lore raw

PATCH v4 1/12 dt-bindings: vendor-prefixes: Add mstar vendor prefix

Add prefix for MStar Semiconductor, Inc.

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index 9aeab66be85f..b09b6c9911c3 100644
@@ -680,6 +680,8 @@ patternProperties:
     description: Microsemi Corporation
   "^msi,.*":
     description: Micro-Star International Co. Ltd.
+  "^mstar,.*":
+    description: MStar Semiconductor, Inc. (acquired by MediaTek Inc.)
   "^mti,.*":
     description: Imagination Technologies Ltd. (formerly MIPS Technologies Inc.)
   "^multi-inno,.*":
Signature · 1 line
2.27.0.rc0
#12 lore raw

PATCH v4 2/12 dt-bindings: vendor-prefixes: Add sstar vendor prefix

In reply to Daniel Palmer

Add prefix for Xiamen Xingchen Technology Co., Ltd

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index b09b6c9911c3..ba5bd3b0ed9a 100644
@@ -986,6 +986,8 @@ patternProperties:
     description: Spreadtrum Communications Inc.
   "^sst,.*":
     description: Silicon Storage Technology, Inc.
+  "^sstar,.*":
+    description: Xiamen Xingchen(SigmaStar) Technology Co., Ltd. (formerly part of MStar Semiconductor, Inc.)
   "^st,.*":
     description: STMicroelectronics
   "^starry,.*":
Signature · 1 line
2.27.0.rc0
#14 lore raw

PATCH v4 3/12 dt-bindings: vendor-prefixes: Add 70mai vendor prefix

In reply to Daniel Palmer

Add prefix for 70mai Co., Ltd

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index ba5bd3b0ed9a..53cd050668e6 100644
@@ -23,6 +23,8 @@ patternProperties:
   "^(simple-audio-card|simple-graph-card|st-plgpio|st-spics|ts),.*": true
 
   # Keep list in alphabetical order.
+  "^70mai,.*":
+    description: 70mai Co., Ltd.
   "^abilis,.*":
     description: Abilis Systems
   "^abracon,.*":
Signature · 1 line
2.27.0.rc0
#16 lore raw

PATCH v4 4/12 dt-bindings: vendor-prefixes: Add thingy.jp prefix

In reply to Daniel Palmer

Add prefix for thingy.jp

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index 53cd050668e6..c209b3dc7ecc 100644
@@ -1038,6 +1038,8 @@ patternProperties:
     description: Three Five Corp
   "^thine,.*":
     description: THine Electronics, Inc.
+  "^thingyjp,.*":
+    description: thingy.jp
   "^ti,.*":
     description: Texas Instruments
   "^tianma,.*":
Signature · 1 line
2.27.0.rc0
#18 lore raw

PATCH v4 5/12 dt-bindings: arm: Add mstar YAML schema

In reply to Daniel Palmer

This adds some intial boards for Armv7 based mstar platforms.

---
 .../devicetree/bindings/arm/mstar.yaml        | 34 +++++++++++++++++++
 MAINTAINERS                                   |  7 ++++
 2 files changed, 41 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/mstar.yaml
Documentation/devicetree/bindings/arm/mstar.yaml new file +34 -0
new file mode 100644
index 000000000000..7bb91a546b5f
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/mstar.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MStar platforms device tree bindings
+
+maintainers:
+  - Daniel Palmer <[email protected]>
+
+properties:
+  $nodename:
+    const: '/'
+  compatible:
+    oneOf:
+        # infinity boards
+        - items:
+          - enum:
+              - thingyjp,breadbee-crust # thingy.jp BreadBee Crust
+              - thingyjp,breadbee-crustx # thingy.jp BreadBee Crustx
+          - const: mstar,infinity
+
+        # infinity3 boards
+        - items:
+          - enum:
+              - thingyjp,breadbee # thingy.jp BreadBee
+          - const: mstar,infinity3
+
+        # mercury5 boards
+        - items:
+          - enum:
+              - 70mai,midrived08 # 70mai midrive d08
+          - const: mstar,mercury5
MAINTAINERS +7 -0
index 68f21d46614c..a8640c1c50cc 100644
@@ -2117,6 +2117,13 @@ L:	[email protected] (moderated for non-subscribers)
 S:	Maintained
 F:	arch/arm/mach-pxa/mioa701.c
 
+ARM/MStar/Sigmastar Armv7 SoC support
+M:	Daniel Palmer <[email protected]>
+L:	[email protected] (moderated for non-subscribers)
+S:	Maintained
+W:	http://linux-chenxing.org/
+F:	Documentation/devicetree/bindings/arm/mstar.yaml
+
 ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT
 M:	Michael Petchkovsky <[email protected]>
 S:	Maintained
Signature · 1 line
2.27.0.rc0
maintainer Reviewed-by on v4 5/12
#19 lore raw

Re: [PATCH v4 05/12] dt-bindings: arm: Add mstar YAML schema

Quoted 22 lines · Daniel Palmer

This adds some intial boards for Armv7 based mstar platforms.

---
 .../devicetree/bindings/arm/mstar.yaml        | 34 +++++++++++++++++++
 MAINTAINERS                                   |  7 ++++
 2 files changed, 41 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/mstar.yaml
Documentation/devicetree/bindings/arm/mstar.yaml new file +7 -0
new file mode 100644
index 000000000000..7bb91a546b5f
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/mstar.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MStar platforms device tree bindings

Documentation/devicetree/bindings/arm/mstar.yaml line 17

Quoted 10 lines
Documentation/devicetree/bindings/arm/mstar.yaml new file +10 -0
+
+maintainers:
+  - Daniel Palmer <[email protected]>
+
+properties:
+  $nodename:
+    const: '/'
+  compatible:
+    oneOf:
+        # infinity boards

Make a 'description:' rather than a comment. With that,

Quoted 38 lines
Documentation/devicetree/bindings/arm/mstar.yaml new file +17 -0
+        - items:
+          - enum:
+              - thingyjp,breadbee-crust # thingy.jp BreadBee Crust
+              - thingyjp,breadbee-crustx # thingy.jp BreadBee Crustx
+          - const: mstar,infinity
+
+        # infinity3 boards
+        - items:
+          - enum:
+              - thingyjp,breadbee # thingy.jp BreadBee
+          - const: mstar,infinity3
+
+        # mercury5 boards
+        - items:
+          - enum:
+              - 70mai,midrived08 # 70mai midrive d08
+          - const: mstar,mercury5
MAINTAINERS +7 -0
index 68f21d46614c..a8640c1c50cc 100644
@@ -2117,6 +2117,13 @@ L:	[email protected] (moderated for non-subscribers)
 S:	Maintained
 F:	arch/arm/mach-pxa/mioa701.c
 
+ARM/MStar/Sigmastar Armv7 SoC support
+M:	Daniel Palmer <[email protected]>
+L:	[email protected] (moderated for non-subscribers)
+S:	Maintained
+W:	http://linux-chenxing.org/
+F:	Documentation/devicetree/bindings/arm/mstar.yaml
+
 ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT
 M:	Michael Petchkovsky <[email protected]>
 S:	Maintained
Signature · 1 line
2.27.0.rc0
#20 lore raw

PATCH v4 6/12 ARM: mstar: Add machine for MStar/Sigmastar Armv7 SoCs

In reply to Daniel Palmer

Initial support for the MStar/Sigmastar Armv7 based IP camera and dashcam SoCs.

These chips are interesting in that they contain a Cortex-A7, peripherals and system memory in a single tiny QFN package that can be hand soldered allowing almost anyone to embed Linux in their projects.

---
 MAINTAINERS                   |  1 +
 arch/arm/Kconfig              |  2 +
 arch/arm/Makefile             |  1 +
 arch/arm/mach-mstar/Kconfig   | 26 ++++++++++++
 arch/arm/mach-mstar/Makefile  |  1 +
 arch/arm/mach-mstar/mstarv7.c | 80 +++++++++++++++++++++++++++++++++++
 6 files changed, 111 insertions(+)
 create mode 100644 arch/arm/mach-mstar/Kconfig
 create mode 100644 arch/arm/mach-mstar/Makefile
 create mode 100644 arch/arm/mach-mstar/mstarv7.c
MAINTAINERS +1 -0
index a8640c1c50cc..3d31bc749f6d 100644
@@ -2123,6 +2123,7 @@ L:	[email protected] (moderated for non-subscribers)
 S:	Maintained
 W:	http://linux-chenxing.org/
 F:	Documentation/devicetree/bindings/arm/mstar.yaml
+F:	arch/arm/mach-mstar/
 
 ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT
 M:	Michael Petchkovsky <[email protected]>
arch/arm/Kconfig +2 -0
index 2ac74904a3ce..d54c413ad937 100644
@@ -668,6 +668,8 @@ source "arch/arm/mach-mmp/Kconfig"
 
 source "arch/arm/mach-moxart/Kconfig"
 
+source "arch/arm/mach-mstar/Kconfig"
+
 source "arch/arm/mach-mv78xx0/Kconfig"
 
 source "arch/arm/mach-mvebu/Kconfig"
arch/arm/Makefile +1 -0
index 59fde2d598d8..e7f4ca060c0f 100644
@@ -197,6 +197,7 @@ machine-$(CONFIG_ARCH_MXC)		+= imx
 machine-$(CONFIG_ARCH_MEDIATEK)		+= mediatek
 machine-$(CONFIG_ARCH_MILBEAUT)		+= milbeaut
 machine-$(CONFIG_ARCH_MXS)		+= mxs
+machine-$(CONFIG_ARCH_MSTARV7)		+= mstar
 machine-$(CONFIG_ARCH_NOMADIK)		+= nomadik
 machine-$(CONFIG_ARCH_NPCM)		+= npcm
 machine-$(CONFIG_ARCH_NSPIRE)		+= nspire
arch/arm/mach-mstar/Kconfig new file +26 -0
new file mode 100644
index 000000000000..52744fe32368
@@ -0,0 +1,26 @@
+menuconfig ARCH_MSTARV7
+	bool "MStar/Sigmastar Armv7 SoC Support"
+	depends on ARCH_MULTI_V7
+	select ARM_GIC
+	select ARM_HEAVY_MB
+	help
+	  Support for newer MStar/Sigmastar SoC families that are
+	  based on Armv7 cores like the Cortex A7 and share the same
+	  basic hardware like the infinity and mercury series.
+
+if ARCH_MSTARV7
+
+config MACH_INFINITY
+	bool "MStar/Sigmastar infinity SoC support"
+	default ARCH_MSTARV7
+	help
+	  Support for MStar/Sigmastar infinity IP camera SoCs.
+
+config MACH_MERCURY
+	bool "MStar/Sigmastar mercury SoC support"
+	default ARCH_MSTARV7
+	help
+	  Support for MStar/Sigmastar mercury dash camera SoCs.
+	  Note that older Mercury2 SoCs are ARM9 based and not supported.
+
+endif
arch/arm/mach-mstar/Makefile new file +1 -0
new file mode 100644
index 000000000000..93b0391ede7e
@@ -0,0 +1 @@
+obj-$(CONFIG_ARCH_MSTARV7) += mstarv7.o
arch/arm/mach-mstar/mstarv7.c new file +80 -0

80 lines not on this page · raw message

Signature · 1 line
2.27.0.rc0
#21 lore raw

PATCH v4 7/12 ARM: mstar: Add binding details for mstar,l3bridge

In reply to Daniel Palmer

This adds a YAML description of the l3bridge node needed by the platform code for the MStar/SigmaStar Armv7 SoCs.

---
 .../bindings/misc/mstar,l3bridge.yaml         | 44 +++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/misc/mstar,l3bridge.yaml
Documentation/devicetree/bindings/misc/mstar,l3bridge.yaml new file +44 -0
new file mode 100644
index 000000000000..cb7fd1cdfb1a
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2020 thingy.jp.
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/misc/mstar,l3bridge.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: MStar/SigmaStar Armv7 SoC l3bridge
+
+maintainers:
+  - Daniel Palmer <[email protected]>
+
+description: |
+  MStar/SigmaStar's Armv7 SoCs have a pipeline in the interface
+  between the CPU and memory. This means that before DMA capable
+  devices are allowed to run the pipeline must be flushed to ensure
+  everything is in memory.
+
+  The l3bridge region contains registers that allow such a flush
+  to be triggered.
+
+  This node is used by the platform code to find where the registers
+  are and install a barrier that triggers the required pipeline flush.
+
+properties:
+  compatible:
+    items:
+      - const: mstar,l3bridge
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    l3bridge: l3bridge@1f204400 {
+        compatible = "mstar,l3bridge";
+        reg = <0x1f204400 0x200>;
+    };
Signature · 1 line
2.27.0.rc0
maintainer Reviewed-by on v4 7/12
#22 lore raw

Re: [PATCH v4 07/12] ARM: mstar: Add binding details for mstar,l3bridge

Quoted 9 lines · Daniel Palmer

This adds a YAML description of the l3bridge node needed by the platform code for the MStar/SigmaStar Armv7 SoCs.

---
 .../bindings/misc/mstar,l3bridge.yaml         | 44 +++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/misc/mstar,l3bridge.yaml
#23 lore raw

PATCH v4 8/12 ARM: mstar: Add Armv7 base dtsi

In reply to Daniel Palmer

Adds initial dtsi for the base MStar/Sigmastar Armv7 SoCs.

These SoCs have very similar memory maps and this will avoid duplicating nodes across multiple dtsis.

---
 MAINTAINERS                     |  1 +
 arch/arm/boot/dts/mstar-v7.dtsi | 83 +++++++++++++++++++++++++++++++++
 2 files changed, 84 insertions(+)
 create mode 100644 arch/arm/boot/dts/mstar-v7.dtsi
MAINTAINERS +1 -0
index 3d31bc749f6d..54a2fc60a1d9 100644
@@ -2123,6 +2123,7 @@ L:	[email protected] (moderated for non-subscribers)
 S:	Maintained
 W:	http://linux-chenxing.org/
 F:	Documentation/devicetree/bindings/arm/mstar.yaml
+F:	arch/arm/boot/dts/mstar-v7.dtsi
 F:	arch/arm/mach-mstar/
 
 ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT
arch/arm/boot/dts/mstar-v7.dtsi new file +83 -0

83 lines not on this page · raw message

Signature · 1 line
2.27.0.rc0
#24 lore raw

PATCH v4 9/12 ARM: mstar: Add infinity/infinity3 family dtsis

In reply to Daniel Palmer

This adds two family level dtsis for the infinity and infinity3 and then adds a chip level dtsi each for a chip in those families.

infinity3.dtsi includes infinity.dtsi as these SoCs share most of their memory map and we would have a lot of duplication otherwise.

---
 MAINTAINERS                              |  1 +
 arch/arm/boot/dts/infinity-msc313.dtsi   | 14 ++++++++++++++
 arch/arm/boot/dts/infinity.dtsi          |  7 +++++++
 arch/arm/boot/dts/infinity3-msc313e.dtsi | 14 ++++++++++++++
 arch/arm/boot/dts/infinity3.dtsi         |  7 +++++++
 5 files changed, 43 insertions(+)
 create mode 100644 arch/arm/boot/dts/infinity-msc313.dtsi
 create mode 100644 arch/arm/boot/dts/infinity.dtsi
 create mode 100644 arch/arm/boot/dts/infinity3-msc313e.dtsi
 create mode 100644 arch/arm/boot/dts/infinity3.dtsi
MAINTAINERS +1 -0
index 54a2fc60a1d9..8c152e29877d 100644
@@ -2123,6 +2123,7 @@ L:	[email protected] (moderated for non-subscribers)
 S:	Maintained
 W:	http://linux-chenxing.org/
 F:	Documentation/devicetree/bindings/arm/mstar.yaml
+F:	arch/arm/boot/dts/infinity*.dtsi
 F:	arch/arm/boot/dts/mstar-v7.dtsi
 F:	arch/arm/mach-mstar/
 
arch/arm/boot/dts/infinity-msc313.dtsi new file +14 -0
new file mode 100644
index 000000000000..42f2b5552c77
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2020 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "infinity.dtsi"
+
+/ {
+	memory@20000000 {
+		device_type = "memory";
+		reg = <0x20000000 0x4000000>;
+	};
+};
arch/arm/boot/dts/infinity.dtsi new file +7 -0
new file mode 100644
index 000000000000..f68e6d59c328
@@ -0,0 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2020 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "mstar-v7.dtsi"
arch/arm/boot/dts/infinity3-msc313e.dtsi new file +14 -0
new file mode 100644
index 000000000000..4e7239afd823
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2020 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "infinity3.dtsi"
+
+/ {
+	memory@20000000 {
+		device_type = "memory";
+		reg = <0x20000000 0x4000000>;
+	};
+};
arch/arm/boot/dts/infinity3.dtsi new file +7 -0
new file mode 100644
index 000000000000..2830d064c07d
@@ -0,0 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2020 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "infinity.dtsi"
Signature · 1 line
2.27.0.rc0
#25 lore raw

PATCH v4 10/12 ARM: mstar: Add mercury5 series dtsis

In reply to Daniel Palmer

This adds a family level dtsi for the mercury5 and then a chip level dtsi for the ssc8336n chip.

---
 MAINTAINERS                              |  1 +
 arch/arm/boot/dts/mercury5-ssc8336n.dtsi | 14 ++++++++++++++
 arch/arm/boot/dts/mercury5.dtsi          |  7 +++++++
 3 files changed, 22 insertions(+)
 create mode 100644 arch/arm/boot/dts/mercury5-ssc8336n.dtsi
 create mode 100644 arch/arm/boot/dts/mercury5.dtsi
MAINTAINERS +1 -0
index 8c152e29877d..f0a2b7b3c0b6 100644
@@ -2124,6 +2124,7 @@ S:	Maintained
 W:	http://linux-chenxing.org/
 F:	Documentation/devicetree/bindings/arm/mstar.yaml
 F:	arch/arm/boot/dts/infinity*.dtsi
+F:	arch/arm/boot/dts/mercury*.dtsi
 F:	arch/arm/boot/dts/mstar-v7.dtsi
 F:	arch/arm/mach-mstar/
 
arch/arm/boot/dts/mercury5-ssc8336n.dtsi new file +14 -0
new file mode 100644
index 000000000000..7d4a4630c25c
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2020 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "mercury5.dtsi"
+
+/ {
+	memory@20000000 {
+		device_type = "memory";
+		reg = <0x20000000 0x4000000>;
+	};
+};
arch/arm/boot/dts/mercury5.dtsi new file +7 -0
new file mode 100644
index 000000000000..f68e6d59c328
@@ -0,0 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2020 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "mstar-v7.dtsi"
Signature · 1 line
2.27.0.rc0
#26 lore raw

PATCH v4 11/12 ARM: mstar: Add dts for msc313(e) based BreadBee boards

In reply to Daniel Palmer

BreadBee is an opensource development board based on the MStar msc313(e) SoC.

Hardware details, schematics and so on can be found at:
https://github.com/breadbee/breadbee

---
 arch/arm/boot/dts/Makefile                    |  3 +++
 .../dts/infinity-msc313-breadbee_crust.dts    | 25 +++++++++++++++++++
 .../boot/dts/infinity3-msc313e-breadbee.dts   | 25 +++++++++++++++++++
 3 files changed, 53 insertions(+)
 create mode 100644 arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts
 create mode 100644 arch/arm/boot/dts/infinity3-msc313e-breadbee.dts
arch/arm/boot/dts/Makefile +3 -0
index e6a1cac0bfc7..4a5f8075a4f6 100644
@@ -1342,6 +1342,9 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
 	mt8127-moose.dtb \
 	mt8135-evbp1.dtb
 dtb-$(CONFIG_ARCH_MILBEAUT) += milbeaut-m10v-evb.dtb
+dtb-$(CONFIG_ARCH_MSTARV7) += \
+	infinity-msc313-breadbee_crust.dtb \
+	infinity3-msc313e-breadbee.dtb
 dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
 dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-ast2500-evb.dtb \
arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts new file +25 -0
new file mode 100644
index 000000000000..f24c5580d3e4
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+/dts-v1/;
+#include "infinity-msc313.dtsi"
+
+/ {
+	model = "BreadBee Crust";
+	compatible = "thingyjp,breadbee-crust", "mstar,infinity";
+
+	aliases {
+		serial0 = &pm_uart;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&pm_uart {
+	status = "okay";
+};
arch/arm/boot/dts/infinity3-msc313e-breadbee.dts new file +25 -0
new file mode 100644
index 000000000000..1f93401c8530
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+/dts-v1/;
+#include "infinity3-msc313e.dtsi"
+
+/ {
+	model = "BreadBee";
+	compatible = "thingyjp,breadbee", "mstar,infinity3";
+
+	aliases {
+		serial0 = &pm_uart;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&pm_uart {
+	status = "okay";
+};
Signature · 1 line
2.27.0.rc0
#27 lore raw

PATCH v4 12/12 ARM: mstar: Add dts for 70mai midrive d08

In reply to Daniel Palmer

Adds initial support for the 70mai midrive d08 dash camera.

---
 arch/arm/boot/dts/Makefile                    |  3 ++-
 .../boot/dts/mercury5-ssc8336n-midrived08.dts | 25 +++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/mercury5-ssc8336n-midrived08.dts
arch/arm/boot/dts/Makefile +2 -1
index 4a5f8075a4f6..caf4a47ba799 100644
@@ -1344,7 +1344,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
 dtb-$(CONFIG_ARCH_MILBEAUT) += milbeaut-m10v-evb.dtb
 dtb-$(CONFIG_ARCH_MSTARV7) += \
 	infinity-msc313-breadbee_crust.dtb \
-	infinity3-msc313e-breadbee.dtb
+	infinity3-msc313e-breadbee.dtb \
+	mercury5-ssc8336n-midrived08.dtb
 dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
 dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-ast2500-evb.dtb \
arch/arm/boot/dts/mercury5-ssc8336n-midrived08.dts new file +25 -0
new file mode 100644
index 000000000000..f24bd8cb8e60
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2020 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+/dts-v1/;
+#include "mercury5-ssc8336n.dtsi"
+
+/ {
+	model = "70mai Midrive D08";
+	compatible = "70mai,midrived08", "mstar,mercury5";
+
+	aliases {
+		serial0 = &pm_uart;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&pm_uart {
+	status = "okay";
+};
Signature · 1 line
2.27.0.rc0
#28 lore raw

PATCH v3 2/12 dt-bindings: vendor-prefixes: Add sstar vendor prefix

In reply to Daniel Palmer

Add prefix for Xiamen Xingchen Technology Co., Ltd

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index 86b569a0c008..314a2ddcb6a0 100644
@@ -984,6 +984,8 @@ patternProperties:
     description: Spreadtrum Communications Inc.
   "^sst,.*":
     description: Silicon Storage Technology, Inc.
+  "^sstar,.*":
+    description: Xiamen Xingchen(SigmaStar) Technology Co., Ltd. (formerly part of MStar Semiconductor, Inc.)
   "^st,.*":
     description: STMicroelectronics
   "^starry,.*":
Signature · 1 line
2.27.0.rc0
#29 lore raw

PATCH v3 3/12 dt-bindings: vendor-prefixes: Add 70mai vendor prefix

In reply to Daniel Palmer

Add prefix for 70mai Co., Ltd

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index 314a2ddcb6a0..7c45b4c6fe40 100644
@@ -23,6 +23,8 @@ patternProperties:
   "^(simple-audio-card|simple-graph-card|st-plgpio|st-spics|ts),.*": true
 
   # Keep list in alphabetical order.
+  "^70mai,.*":
+    description: 70mai Co., Ltd.
   "^abilis,.*":
     description: Abilis Systems
   "^abracon,.*":
Signature · 1 line
2.27.0.rc0
#30 lore raw

PATCH v3 4/12 dt-bindings: vendor-prefixes: Add thingy.jp prefix

In reply to Daniel Palmer

Add prefix for thingy.jp

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index 7c45b4c6fe40..70a8f2696427 100644
@@ -1036,6 +1036,8 @@ patternProperties:
     description: Three Five Corp
   "^thine,.*":
     description: THine Electronics, Inc.
+  "^thingyjp,.*":
+    description: thingy.jp
   "^ti,.*":
     description: Texas Instruments
   "^tianma,.*":
Signature · 1 line
2.27.0.rc0
#31 lore raw

PATCH v3 5/12 dt-bindings: dt-bindings: arm: Add mstar YAML schema

In reply to Daniel Palmer

This adds some intial boards for Armv7 based mstar platforms.

---
 .../devicetree/bindings/arm/mstar.yaml        | 33 +++++++++++++++++++
 MAINTAINERS                                   |  7 ++++
 2 files changed, 40 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/mstar.yaml
Documentation/devicetree/bindings/arm/mstar.yaml new file +33 -0
new file mode 100644
index 000000000000..633e89f415cb
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/mstar.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MStar platforms device tree bindings
+
+maintainers:
+  - Daniel Palmer <[email protected]>
+
+properties:
+  $nodename:
+    const: '/'
+  compatible:
+    oneOf:
+        # infinity boards
+        items:
+          - enum:
+              - thingyjp,breadbee-crust # thingy.jp BreadBee Crust
+          - const: mstar,infinity
+
+        # infinity3 boards
+        items:
+          - enum:
+              - thingyjp,breadbee # thingy.jp BreadBee
+          - const: mstar,infinity3
+
+        # mercury5 boards
+        items:
+          - enum:
+              - 70mai,midrived08 # 70mai midrive d08
+          - const: mstar,mercury5
MAINTAINERS +7 -0
index 77a3fa5e3edd..c44070f76a1b 100644
@@ -2110,6 +2110,13 @@ L:	[email protected] (moderated for non-subscribers)
 S:	Maintained
 F:	arch/arm/mach-pxa/mioa701.c
 
+ARM/MStar/Sigmastar Armv7 SoC support
+M:	Daniel Palmer <[email protected]>
+L:	[email protected] (moderated for non-subscribers)
+S:	Maintained
+W:	http://linux-chenxing.org/
+F:	Documentation/devicetree/bindings/arm/mstar.yaml
+
 ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT
 M:	Michael Petchkovsky <[email protected]>
 S:	Maintained
Signature · 1 line
2.27.0.rc0
maintainer
#32 lore raw

Re: [PATCH v3 05/12] dt-bindings: dt-bindings: arm: Add mstar YAML schema

Quoted 9 lines · Daniel Palmer

This adds some intial boards for Armv7 based mstar platforms.

---
 .../devicetree/bindings/arm/mstar.yaml        | 33 +++++++++++++++++++
 MAINTAINERS                                   |  7 ++++
 2 files changed, 40 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/mstar.yaml

My bot found errors running 'make dt_binding_check' on your patch:

Traceback (most recent call last):
File "/usr/local/bin/dt-doc-validate", line 64, in <module>
ret = check_doc(args.yamldt)
File "/usr/local/bin/dt-doc-validate", line 25, in check_doc
testtree = dtschema.load(filename, line_number=line_number, duplicate_keys=False)
File "/usr/local/lib/python3.6/dist-packages/dtschema/lib.py", line 595, in load
return yaml.load(f.read())
File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/main.py", line 343, in load
return constructor.get_single_data()
File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 113, in get_single_data
return self.construct_document(node)
File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 123, in construct_document
for _dummy in generator:
File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 723, in construct_yaml_map
value = self.construct_mapping(node)
File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 440, in construct_mapping
return BaseConstructor.construct_mapping(self, node, deep=deep)
File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 257, in construct_mapping
if self.check_mapping_key(node, key_node, mapping, key, value):
File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 295, in check_mapping_key
raise DuplicateKeyError(*args)
ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping
in "<unicode string>", line 18, column 9
found duplicate key "items" with value "[]" (original value: "[]")
in "<unicode string>", line 24, column 9

To suppress this check see:
http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys

Duplicate keys will become an error in future releases, and are errors by default when using the new API.

Documentation/devicetree/bindings/Makefile:12: recipe for target 'Documentation/devicetree/bindings/arm/mstar.example.dts' failed make[1]: *** [Documentation/devicetree/bindings/arm/mstar.example.dts] Error 1
make[1]: *** Waiting for unfinished jobs....
Traceback (most recent call last):
File "/usr/local/bin/dt-mk-schema", line 34, in <module>
schemas = dtschema.process_schemas(args.schemas, core_schema=(not args.useronly))
File "/usr/local/lib/python3.6/dist-packages/dtschema/lib.py", line 557, in process_schemas
sch = process_schema(os.path.abspath(filename))
File "/usr/local/lib/python3.6/dist-packages/dtschema/lib.py", line 510, in process_schema
schema = load_schema(filename)
File "/usr/local/lib/python3.6/dist-packages/dtschema/lib.py", line 123, in load_schema
return do_load(os.path.join(schema_basedir, schema))
File "/usr/local/lib/python3.6/dist-packages/dtschema/lib.py", line 108, in do_load
return yaml.load(tmp)
File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/main.py", line 343, in load
return constructor.get_single_data()
File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 113, in get_single_data
return self.construct_document(node)
File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 123, in construct_document
for _dummy in generator:
File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 723, in construct_yaml_map
value = self.construct_mapping(node)
File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 440, in construct_mapping
return BaseConstructor.construct_mapping(self, node, deep=deep)
File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 257, in construct_mapping
if self.check_mapping_key(node, key_node, mapping, key, value):
File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 295, in check_mapping_key
raise DuplicateKeyError(*args)
ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping
in "<unicode string>", line 18, column 9
found duplicate key "items" with value "[]" (original value: "[]")
in "<unicode string>", line 24, column 9

To suppress this check see:
http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys

Duplicate keys will become an error in future releases, and are errors by default when using the new API.

Documentation/devicetree/bindings/Makefile:45: recipe for target 'Documentation/devicetree/bindings/processed-schema.yaml' failed make[1]: *** [Documentation/devicetree/bindings/processed-schema.yaml] Error 123
make[1]: *** Deleting file 'Documentation/devicetree/bindings/processed-schema.yaml'
Traceback (most recent call last):
File "/usr/local/bin/dt-mk-schema", line 34, in <module>
schemas = dtschema.process_schemas(args.schemas, core_schema=(not args.useronly))
File "/usr/local/lib/python3.6/dist-packages/dtschema/lib.py", line 557, in process_schemas
sch = process_schema(os.path.abspath(filename))
File "/usr/local/lib/python3.6/dist-packages/dtschema/lib.py", line 510, in process_schema
schema = load_schema(filename)
File "/usr/local/lib/python3.6/dist-packages/dtschema/lib.py", line 123, in load_schema
return do_load(os.path.join(schema_basedir, schema))
File "/usr/local/lib/python3.6/dist-packages/dtschema/lib.py", line 108, in do_load
return yaml.load(tmp)
File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/main.py", line 343, in load
return constructor.get_single_data()
File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 113, in get_single_data
return self.construct_document(node)
File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 123, in construct_document
for _dummy in generator:
File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 723, in construct_yaml_map
value = self.construct_mapping(node)
File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 440, in construct_mapping
return BaseConstructor.construct_mapping(self, node, deep=deep)
File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 257, in construct_mapping
if self.check_mapping_key(node, key_node, mapping, key, value):
File "/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py", line 295, in check_mapping_key
raise DuplicateKeyError(*args)
ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping
in "<unicode string>", line 18, column 9
found duplicate key "items" with value "[]" (original value: "[]")
in "<unicode string>", line 24, column 9

To suppress this check see:
http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys

Duplicate keys will become an error in future releases, and are errors by default when using the new API.

Documentation/devicetree/bindings/Makefile:41: recipe for target 'Documentation/devicetree/bindings/processed-schema-examples.yaml' failed make[1]: *** [Documentation/devicetree/bindings/processed-schema-examples.yaml] Error 123
make[1]: *** Deleting file 'Documentation/devicetree/bindings/processed-schema-examples.yaml'
Makefile:1300: recipe for target 'dt_binding_check' failed
make: *** [dt_binding_check] Error 2

See https://patchwork.ozlabs.org/patch/1308156

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.

#33 lore raw

PATCH v3 6/12 ARM: mstar: Add machine for MStar/Sigmastar Armv7 SoCs

In reply to Daniel Palmer

Initial support for the MStar/Sigmastar Armv7 based IP camera and dashcam SoCs.

These chips are interesting in that they contain a Cortex-A7, peripherals and system memory in a single tiny QFN package that can be hand soldered allowing almost anyone to embed Linux in their projects.

---
 MAINTAINERS                   |  1 +
 arch/arm/Kconfig              |  2 +
 arch/arm/Makefile             |  1 +
 arch/arm/mach-mstar/Kconfig   | 26 ++++++++++++
 arch/arm/mach-mstar/Makefile  |  1 +
 arch/arm/mach-mstar/mstarv7.c | 80 +++++++++++++++++++++++++++++++++++
 6 files changed, 111 insertions(+)
 create mode 100644 arch/arm/mach-mstar/Kconfig
 create mode 100644 arch/arm/mach-mstar/Makefile
 create mode 100644 arch/arm/mach-mstar/mstarv7.c
MAINTAINERS +1 -0
index c44070f76a1b..4bd57bbdddb0 100644
@@ -2116,6 +2116,7 @@ L:	[email protected] (moderated for non-subscribers)
 S:	Maintained
 W:	http://linux-chenxing.org/
 F:	Documentation/devicetree/bindings/arm/mstar.yaml
+F:	arch/arm/mach-mstar/
 
 ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT
 M:	Michael Petchkovsky <[email protected]>
arch/arm/Kconfig +2 -0
index fb6c85c5d344..e466694f8486 100644
@@ -669,6 +669,8 @@ source "arch/arm/mach-mmp/Kconfig"
 
 source "arch/arm/mach-moxart/Kconfig"
 
+source "arch/arm/mach-mstar/Kconfig"
+
 source "arch/arm/mach-mv78xx0/Kconfig"
 
 source "arch/arm/mach-mvebu/Kconfig"
arch/arm/Makefile +1 -0
index 59fde2d598d8..e7f4ca060c0f 100644
@@ -197,6 +197,7 @@ machine-$(CONFIG_ARCH_MXC)		+= imx
 machine-$(CONFIG_ARCH_MEDIATEK)		+= mediatek
 machine-$(CONFIG_ARCH_MILBEAUT)		+= milbeaut
 machine-$(CONFIG_ARCH_MXS)		+= mxs
+machine-$(CONFIG_ARCH_MSTARV7)		+= mstar
 machine-$(CONFIG_ARCH_NOMADIK)		+= nomadik
 machine-$(CONFIG_ARCH_NPCM)		+= npcm
 machine-$(CONFIG_ARCH_NSPIRE)		+= nspire
arch/arm/mach-mstar/Kconfig new file +26 -0
new file mode 100644
index 000000000000..52744fe32368
@@ -0,0 +1,26 @@
+menuconfig ARCH_MSTARV7
+	bool "MStar/Sigmastar Armv7 SoC Support"
+	depends on ARCH_MULTI_V7
+	select ARM_GIC
+	select ARM_HEAVY_MB
+	help
+	  Support for newer MStar/Sigmastar SoC families that are
+	  based on Armv7 cores like the Cortex A7 and share the same
+	  basic hardware like the infinity and mercury series.
+
+if ARCH_MSTARV7
+
+config MACH_INFINITY
+	bool "MStar/Sigmastar infinity SoC support"
+	default ARCH_MSTARV7
+	help
+	  Support for MStar/Sigmastar infinity IP camera SoCs.
+
+config MACH_MERCURY
+	bool "MStar/Sigmastar mercury SoC support"
+	default ARCH_MSTARV7
+	help
+	  Support for MStar/Sigmastar mercury dash camera SoCs.
+	  Note that older Mercury2 SoCs are ARM9 based and not supported.
+
+endif
arch/arm/mach-mstar/Makefile new file +1 -0
new file mode 100644
index 000000000000..93b0391ede7e
@@ -0,0 +1 @@
+obj-$(CONFIG_ARCH_MSTARV7) += mstarv7.o
arch/arm/mach-mstar/mstarv7.c new file +80 -0

80 lines not on this page · raw message

Signature · 1 line
2.27.0.rc0
#34 lore raw

PATCH v3 7/12 ARM: mstar: Add binding details for mstar,l3bridge

In reply to Daniel Palmer

This adds a YAML description of the l3bridge node needed by the platform code for the MStar/SigmaStar Armv7 SoCs.

---
 .../bindings/misc/mstar,l3bridge.yaml         | 44 +++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/misc/mstar,l3bridge.yaml
Documentation/devicetree/bindings/misc/mstar,l3bridge.yaml new file +44 -0
new file mode 100644
index 000000000000..cb7fd1cdfb1a
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2020 thingy.jp.
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/misc/mstar,l3bridge.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: MStar/SigmaStar Armv7 SoC l3bridge
+
+maintainers:
+  - Daniel Palmer <[email protected]>
+
+description: |
+  MStar/SigmaStar's Armv7 SoCs have a pipeline in the interface
+  between the CPU and memory. This means that before DMA capable
+  devices are allowed to run the pipeline must be flushed to ensure
+  everything is in memory.
+
+  The l3bridge region contains registers that allow such a flush
+  to be triggered.
+
+  This node is used by the platform code to find where the registers
+  are and install a barrier that triggers the required pipeline flush.
+
+properties:
+  compatible:
+    items:
+      - const: mstar,l3bridge
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    l3bridge: l3bridge@1f204400 {
+        compatible = "mstar,l3bridge";
+        reg = <0x1f204400 0x200>;
+    };
Signature · 1 line
2.27.0.rc0
#35 lore raw

PATCH v3 8/12 ARM: mstar: Add Armv7 base dtsi

In reply to Daniel Palmer

Adds initial dtsi for the base MStar/Sigmastar Armv7 SoCs.

These SoCs have very similar memory maps and this will avoid duplicating nodes across multiple dtsis.

---
 MAINTAINERS                     |  1 +
 arch/arm/boot/dts/mstar-v7.dtsi | 83 +++++++++++++++++++++++++++++++++
 2 files changed, 84 insertions(+)
 create mode 100644 arch/arm/boot/dts/mstar-v7.dtsi
MAINTAINERS +1 -0
index 4bd57bbdddb0..00de66458e53 100644
@@ -2116,6 +2116,7 @@ L:	[email protected] (moderated for non-subscribers)
 S:	Maintained
 W:	http://linux-chenxing.org/
 F:	Documentation/devicetree/bindings/arm/mstar.yaml
+F:	arch/arm/boot/dts/mstar-v7.dtsi
 F:	arch/arm/mach-mstar/
 
 ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT
arch/arm/boot/dts/mstar-v7.dtsi new file +83 -0

83 lines not on this page · raw message

Signature · 1 line
2.27.0.rc0
#36 lore raw

PATCH v3 9/12 ARM: mstar: Add infinity/infinity3 family dtsis

In reply to Daniel Palmer

This adds two family level dtsis for the infinity and infinity3 and then adds a chip level dtsi each for a chip in those families.

infinity3.dtsi includes infinity.dtsi as these SoCs share most of their memory map and we would have a lot of duplication otherwise.

---
 MAINTAINERS                              |  1 +
 arch/arm/boot/dts/infinity-msc313.dtsi   | 14 ++++++++++++++
 arch/arm/boot/dts/infinity.dtsi          |  7 +++++++
 arch/arm/boot/dts/infinity3-msc313e.dtsi | 14 ++++++++++++++
 arch/arm/boot/dts/infinity3.dtsi         |  7 +++++++
 5 files changed, 43 insertions(+)
 create mode 100644 arch/arm/boot/dts/infinity-msc313.dtsi
 create mode 100644 arch/arm/boot/dts/infinity.dtsi
 create mode 100644 arch/arm/boot/dts/infinity3-msc313e.dtsi
 create mode 100644 arch/arm/boot/dts/infinity3.dtsi
MAINTAINERS +1 -0
index 00de66458e53..7673acf55172 100644
@@ -2116,6 +2116,7 @@ L:	[email protected] (moderated for non-subscribers)
 S:	Maintained
 W:	http://linux-chenxing.org/
 F:	Documentation/devicetree/bindings/arm/mstar.yaml
+F:	arch/arm/boot/dts/infinity*.dtsi
 F:	arch/arm/boot/dts/mstar-v7.dtsi
 F:	arch/arm/mach-mstar/
 
arch/arm/boot/dts/infinity-msc313.dtsi new file +14 -0
new file mode 100644
index 000000000000..42f2b5552c77
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2020 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "infinity.dtsi"
+
+/ {
+	memory@20000000 {
+		device_type = "memory";
+		reg = <0x20000000 0x4000000>;
+	};
+};
arch/arm/boot/dts/infinity.dtsi new file +7 -0
new file mode 100644
index 000000000000..f68e6d59c328
@@ -0,0 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2020 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "mstar-v7.dtsi"
arch/arm/boot/dts/infinity3-msc313e.dtsi new file +14 -0
new file mode 100644
index 000000000000..4e7239afd823
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2020 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "infinity3.dtsi"
+
+/ {
+	memory@20000000 {
+		device_type = "memory";
+		reg = <0x20000000 0x4000000>;
+	};
+};
arch/arm/boot/dts/infinity3.dtsi new file +7 -0
new file mode 100644
index 000000000000..2830d064c07d
@@ -0,0 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2020 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "infinity.dtsi"
Signature · 1 line
2.27.0.rc0
#37 lore raw

PATCH v3 10/12 ARM: mstar: Add mercury5 series dtsis

In reply to Daniel Palmer

This adds a family level dtsi for the mercury5 and then a chip level dtsi for the ssc8336n chip.

---
 MAINTAINERS                              |  1 +
 arch/arm/boot/dts/mercury5-ssc8336n.dtsi | 14 ++++++++++++++
 arch/arm/boot/dts/mercury5.dtsi          |  7 +++++++
 3 files changed, 22 insertions(+)
 create mode 100644 arch/arm/boot/dts/mercury5-ssc8336n.dtsi
 create mode 100644 arch/arm/boot/dts/mercury5.dtsi
MAINTAINERS +1 -0
index 7673acf55172..246951ab0888 100644
@@ -2117,6 +2117,7 @@ S:	Maintained
 W:	http://linux-chenxing.org/
 F:	Documentation/devicetree/bindings/arm/mstar.yaml
 F:	arch/arm/boot/dts/infinity*.dtsi
+F:	arch/arm/boot/dts/mercury*.dtsi
 F:	arch/arm/boot/dts/mstar-v7.dtsi
 F:	arch/arm/mach-mstar/
 
arch/arm/boot/dts/mercury5-ssc8336n.dtsi new file +14 -0
new file mode 100644
index 000000000000..7d4a4630c25c
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2020 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "mercury5.dtsi"
+
+/ {
+	memory@20000000 {
+		device_type = "memory";
+		reg = <0x20000000 0x4000000>;
+	};
+};
arch/arm/boot/dts/mercury5.dtsi new file +7 -0
new file mode 100644
index 000000000000..f68e6d59c328
@@ -0,0 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2020 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "mstar-v7.dtsi"
Signature · 1 line
2.27.0.rc0
#38 lore raw

PATCH v3 11/12 ARM: mstar: Add dts for msc313(e) based BreadBee boards

In reply to Daniel Palmer

BreadBee is an opensource development board based on the MStar msc313(e) SoC.

Hardware details, schematics and so on can be found at:
https://github.com/breadbee/breadbee

---
 arch/arm/boot/dts/Makefile                    |  3 +++
 .../dts/infinity-msc313-breadbee_crust.dts    | 25 +++++++++++++++++++
 .../boot/dts/infinity3-msc313e-breadbee.dts   | 25 +++++++++++++++++++
 3 files changed, 53 insertions(+)
 create mode 100644 arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts
 create mode 100644 arch/arm/boot/dts/infinity3-msc313e-breadbee.dts
arch/arm/boot/dts/Makefile +3 -0
index e6a1cac0bfc7..4a5f8075a4f6 100644
@@ -1342,6 +1342,9 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
 	mt8127-moose.dtb \
 	mt8135-evbp1.dtb
 dtb-$(CONFIG_ARCH_MILBEAUT) += milbeaut-m10v-evb.dtb
+dtb-$(CONFIG_ARCH_MSTARV7) += \
+	infinity-msc313-breadbee_crust.dtb \
+	infinity3-msc313e-breadbee.dtb
 dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
 dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-ast2500-evb.dtb \
arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts new file +25 -0
new file mode 100644
index 000000000000..f24c5580d3e4
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+/dts-v1/;
+#include "infinity-msc313.dtsi"
+
+/ {
+	model = "BreadBee Crust";
+	compatible = "thingyjp,breadbee-crust", "mstar,infinity";
+
+	aliases {
+		serial0 = &pm_uart;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&pm_uart {
+	status = "okay";
+};
arch/arm/boot/dts/infinity3-msc313e-breadbee.dts new file +25 -0
new file mode 100644
index 000000000000..1f93401c8530
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+/dts-v1/;
+#include "infinity3-msc313e.dtsi"
+
+/ {
+	model = "BreadBee";
+	compatible = "thingyjp,breadbee", "mstar,infinity3";
+
+	aliases {
+		serial0 = &pm_uart;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&pm_uart {
+	status = "okay";
+};
Signature · 1 line
2.27.0.rc0
#39 lore raw

PATCH v3 12/12 ARM: mstar: Add dts for 70mai midrive d08

In reply to Daniel Palmer

Adds initial support for the 70mai midrive d08 dash camera.

---
 arch/arm/boot/dts/Makefile                    |  3 ++-
 .../boot/dts/mercury5-ssc8336n-midrive08.dts  | 25 +++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/mercury5-ssc8336n-midrive08.dts
arch/arm/boot/dts/Makefile +2 -1
index 4a5f8075a4f6..35c7ecc52c60 100644
@@ -1344,7 +1344,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
 dtb-$(CONFIG_ARCH_MILBEAUT) += milbeaut-m10v-evb.dtb
 dtb-$(CONFIG_ARCH_MSTARV7) += \
 	infinity-msc313-breadbee_crust.dtb \
-	infinity3-msc313e-breadbee.dtb
+	infinity3-msc313e-breadbee.dtb \
+	mercury5-ssc8336n-midrive08.dtb
 dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
 dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-ast2500-evb.dtb \
arch/arm/boot/dts/mercury5-ssc8336n-midrive08.dts new file +25 -0
new file mode 100644
index 000000000000..f24bd8cb8e60
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2020 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+/dts-v1/;
+#include "mercury5-ssc8336n.dtsi"
+
+/ {
+	model = "70mai Midrive D08";
+	compatible = "70mai,midrived08", "mstar,mercury5";
+
+	aliases {
+		serial0 = &pm_uart;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&pm_uart {
+	status = "okay";
+};
Signature · 1 line
2.27.0.rc0
#40 lore raw

PATCH v2 1/5 dt-bindings: arm: Initial MStar vendor prefixes and compatible strings

In reply to Daniel Palmer

Adds a prefixes for MStar, thingy.jp, 70mai and then defines compatible strings for the first MStar based boards.

---
 .../devicetree/bindings/arm/mstar.yaml        | 30 +++++++++++++++++++
 .../devicetree/bindings/vendor-prefixes.yaml  |  6 ++++
 MAINTAINERS                                   |  6 ++++
 3 files changed, 42 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/mstar.yaml
Documentation/devicetree/bindings/arm/mstar.yaml new file +30 -0
new file mode 100644
index 000000000000..09e87cf6d6f0
@@ -0,0 +1,30 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/mstar.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MStar platforms device tree bindings
+
+maintainers:
+  - Daniel Palmer <[email protected]>
+
+properties:
+  $nodename:
+    const: '/'
+  compatible:
+    oneOf:
+      - description: thingy.jp BreadBee
+        items:
+          - const: thingyjp,breadbee
+          - const: mstar,infinity3
+
+      - description: thingy.jp BreadBee Crust
+        items:
+          - const: thingyjp,breadbee-crust
+          - const: mstar,infinity
+
+      - description: 70mai midrive d08
+        items:
+          - const: 70mai,midrived08
+          - const: mstar,mercury5
Documentation/devicetree/bindings/vendor-prefixes.yaml +6 -0
index ef6d75b9113a..1770fc794027 100644
@@ -23,6 +23,8 @@ patternProperties:
   "^(simple-audio-card|simple-graph-card|st-plgpio|st-spics|ts),.*": true
 
   # Keep list in alphabetical order.
+  "^70mai,.*":
+    description: 70mai
   "^abilis,.*":
     description: Abilis Systems
   "^abracon,.*":
@@ -678,6 +680,8 @@ patternProperties:
     description: Microsemi Corporation
   "^msi,.*":
     description: Micro-Star International Co. Ltd.
+  "^mstar,.*":
+    description: MStar Semiconductor, Inc.
   "^mti,.*":
     description: Imagination Technologies Ltd. (formerly MIPS Technologies Inc.)
   "^multi-inno,.*":
@@ -1030,6 +1034,8 @@ patternProperties:
     description: Three Five Corp
   "^thine,.*":
     description: THine Electronics, Inc.
+  "^thingyjp,.*":
+    description: thingy.jp
   "^ti,.*":
     description: Texas Instruments
   "^tianma,.*":
MAINTAINERS +6 -0
index 77a3fa5e3edd..1ca77f97b8ee 100644
@@ -2110,6 +2110,12 @@ L:	[email protected] (moderated for non-subscribers)
 S:	Maintained
 F:	arch/arm/mach-pxa/mioa701.c
 
+ARM/MStar/Sigmastar ARMv7 SoC support
+M:	Daniel Palmer <[email protected]>
+L:	[email protected] (moderated for non-subscribers)
+S:	Maintained
+F:	Documentation/devicetree/bindings/arm/mstar.yaml
+
 ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT
 M:	Michael Petchkovsky <[email protected]>
 S:	Maintained
Signature · 7 lines
2.27.0.rc0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#41 lore raw

Hi Daniel,

Am 10.06.20 um 11:03 schrieb Daniel Palmer:

Quoted 37 lines

Adds a prefixes for MStar, thingy.jp, 70mai and then defines compatible strings for the first MStar based boards.

---
  .../devicetree/bindings/arm/mstar.yaml        | 30 +++++++++++++++++++
  .../devicetree/bindings/vendor-prefixes.yaml  |  6 ++++
  MAINTAINERS                                   |  6 ++++
  3 files changed, 42 insertions(+)

create mode 100644 Documentation/devicetree/bindings/arm/mstar.yaml

Documentation/devicetree/bindings/arm/mstar.yaml new file +20 -0
new file mode 100644
index 000000000000..09e87cf6d6f0
@@ -0,0 +1,30 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/mstar.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MStar platforms device tree bindings
+
+maintainers:
+  - Daniel Palmer <[email protected]>
+
+properties:
+  $nodename:
+    const: '/'
+  compatible:
+    oneOf:
+      - description: thingy.jp BreadBee
+        items:
+          - const: thingyjp,breadbee
+          - const: mstar,infinity3

Documentation/devicetree/bindings/arm/mstar.yaml line 30

Quoted 10 lines
Documentation/devicetree/bindings/arm/mstar.yaml new file +10 -0
+
+      - description: thingy.jp BreadBee Crust
+        items:
+          - const: thingyjp,breadbee-crust
+          - const: mstar,infinity
+
+      - description: 70mai midrive d08
+        items:
+          - const: 70mai,midrived08
+          - const: mstar,mercury5

I would advise to restructure these three for forward planning:

Use const only for the SoC compatible.

For the boards use an enum with (for now) only the one entry. This affects the description, which may mislead people to duplicate these blocks for each board rather than just for each SoC family. Take a look at other existing files (e.g., my realtek.yaml and actions.yaml, but note they don't have the new-style description line yet - I assume it'll work the same in enum as in your oneOf).

Documentation/devicetree/bindings/vendor-prefixes.yaml patternProperties: · line 27

Quoted 10 lines
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index ef6d75b9113a..1770fc794027 100644
@@ -23,6 +23,8 @@ patternProperties:
    "^(simple-audio-card|simple-graph-card|st-plgpio|st-spics|ts),.*": true
 
    # Keep list in alphabetical order.
+  "^70mai,.*":
+    description: 70mai

"70mai Co., Ltd." please - don't just repeat the prefix.

Quoted 13 lines
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
    "^abilis,.*":
      description: Abilis Systems
    "^abracon,.*":
@@ -678,6 +680,8 @@ patternProperties:
      description: Microsemi Corporation
    "^msi,.*":
      description: Micro-Star International Co. Ltd.
+  "^mstar,.*":
+    description: MStar Semiconductor, Inc.
    "^mti,.*":
      description: Imagination Technologies Ltd. (formerly MIPS Technologies Inc.)
    "^multi-inno,.*":

Documentation/devicetree/bindings/vendor-prefixes.yaml patternProperties: · line 1041

Quoted 8 lines
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
@@ -1030,6 +1034,8 @@ patternProperties:
      description: Three Five Corp
    "^thine,.*":
      description: THine Electronics, Inc.
+  "^thingyjp,.*":
+    description: thingy.jp
    "^ti,.*":
      description: Texas Instruments
    "^tianma,.*":

If you split the vendor prefixes to a preceding patch, they have a chance of getting Reviewed-bys more quickly. You can then also CC the vendors on the prefixes you're assigning for them.

Quoted 7 lines
MAINTAINERS +0 -0
index 77a3fa5e3edd..1ca77f97b8ee 100644
@@ -2110,6 +2110,12 @@ L:	[email protected] (moderated for non-subscribers)
  S:	Maintained
  F:	arch/arm/mach-pxa/mioa701.c

MAINTAINERS L: [email protected] (moderated for non-subscribers) · line 2121

Quoted 10 lines
MAINTAINERS +6 -0
 
+ARM/MStar/Sigmastar ARMv7 SoC support
+M:	Daniel Palmer <[email protected]>
+L:	[email protected] (moderated for non-subscribers)
+S:	Maintained
+F:	Documentation/devicetree/bindings/arm/mstar.yaml
+
  ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT
  M:	Michael Petchkovsky <[email protected]>
  S:	Maintained

In theory it's spelled Armv7 since 2017, but MAINTAINERS, subject prefix conventions and many other places in Linux still use the old upper-case spelling, too...

Regards,
Andreas

Signature · 4 lines
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)
#42 lore raw
Quoted 14 lines
Quoted 14 lines
Documentation/devicetree/bindings/arm/mstar.yaml new file +14 -0
+
+properties:
+  $nodename:
+    const: '/'
+  compatible:
+    oneOf:
+      - description: thingy.jp BreadBee
+        items:
+          - const: thingyjp,breadbee
+          - const: mstar,infinity3
+
+      - description: thingy.jp BreadBee Crust
+        items:
+          - const: thingyjp,breadbee-crust
Quoted 8 lines

Documentation/devicetree/bindings/arm/mstar.yaml line 30

Quoted 6 lines
Documentation/devicetree/bindings/arm/mstar.yaml new file +6 -0
+          - const: mstar,infinity
+
+      - description: 70mai midrive d08
+        items:
+          - const: 70mai,midrived08
+          - const: mstar,mercury5

I would advise to restructure these three for forward planning:

That makes a lot of sense. To be honest I basically copied something that was in-tree to come up with something that would make checkpatch happy and didn't think too much about it.

Quoted 5 lines

Documentation/devicetree/bindings/vendor-prefixes.yaml patternProperties: · line 27

Quoted 3 lines

# Keep list in alphabetical order.

Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
+  "^70mai,.*":
+    description: 70mai

"70mai Co., Ltd." please - don't just repeat the prefix.

Understood.

Quoted 3 lines

If you split the vendor prefixes to a preceding patch, they have a chance of getting Reviewed-bys more quickly. You can then also CC the vendors on the prefixes you're assigning for them.

thingy.jp is the vendor I'm using for the breadbee project. As for 70mai and MStar/Sigmastar I have
tried reaching out to them in the past and they don't respond. In 70mai's case their camera doesn't
run Linux by default so I don't think they will care much.

If it helps I can split them out but I'm not sure if it'll be possible to ever get the ok from the other vendors.
For what it's worth the "mstar" prefix is what was being used in their kernels up until very recently when
they switched everything to using "sstar" for SigmaStar. I considered using the sstar prefix but went
with mstar because SigmaStar is totally unknown whereas MStar is slightly known, would be more
recognisable, most of the chips still have mstar written on them and so on.

Quoted 5 lines
Quoted 5 lines
MAINTAINERS +5 -0
+ARM/MStar/Sigmastar ARMv7 SoC support
+M:   Daniel Palmer <[email protected]>
+L:   [email protected] (moderated for non-subscribers)
+S:   Maintained
+F:   Documentation/devicetree/bindings/arm/mstar.yaml
Quoted 8 lines
Quoted 4 lines

+
ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT
M: Michael Petchkovsky <[email protected]>
S: Maintained

In theory it's spelled Armv7 since 2017, but MAINTAINERS, subject prefix conventions and many other places in Linux still use the old upper-case spelling, too...

Understood. I'll fix that up.

Thankyou for your input,

Daniel

#43 lore raw
In reply to Daniel Palmer

+ linux-mediatek

Am 10.06.20 um 11:03 schrieb Daniel Palmer:

Quoted 4 lines
Documentation/devicetree/bindings/vendor-prefixes.yaml +0 -0
index ef6d75b9113a..1770fc794027 100644

[...]

Documentation/devicetree/bindings/vendor-prefixes.yaml patternProperties: · line 684

Quoted 6 lines
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
@@ -678,6 +680,8 @@ patternProperties:
      description: Microsemi Corporation
    "^msi,.*":
      description: Micro-Star International Co. Ltd.
+  "^mstar,.*":
+    description: MStar Semiconductor, Inc.

Depending on what exactly its legal status is these days (https://en.wikipedia.org/wiki/MStar), you might either follow the below MIPS example of describing it as

"MediaTek Inc. (formerly MStar Semiconductor, Inc.)",

or you might extend above description as
"MStar Semiconductor, Inc. (acquired by MediaTek Inc.)" if it still exists.

Or accordingly "Xiamen Xingchen Technology Co., Ltd. (formerly MStar Semiconductor, Inc.)" if it was renamed to Sigmastar (in which case you might additionally reserve sstar prefix for Sigmastar while at it).

http://www.sigmastarsemi.com/en/enterprisenews/info.aspx?itemid=441

Quoted 3 lines
Documentation/devicetree/bindings/vendor-prefixes.yaml +0 -0
    "^mti,.*":
      description: Imagination Technologies Ltd. (formerly MIPS Technologies Inc.)
    "^multi-inno,.*":

[...]

MAINTAINERS L: [email protected] (moderated for non-subscribers) · line 2113

Quoted 9 lines
MAINTAINERS +1 -0
index 77a3fa5e3edd..1ca77f97b8ee 100644
@@ -2110,6 +2110,12 @@ L:	[email protected] (moderated for non-subscribers)
  S:	Maintained
  F:	arch/arm/mach-pxa/mioa701.c
 
+ARM/MStar/Sigmastar ARMv7 SoC support

Here you do mention Sigmastar.

MAINTAINERS L: [email protected] (moderated for non-subscribers) · line 2121

Quoted 8 lines
MAINTAINERS +5 -0
+M:	Daniel Palmer <[email protected]>
+L:	[email protected] (moderated for non-subscribers)
+S:	Maintained
+F:	Documentation/devicetree/bindings/arm/mstar.yaml
+
  ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT
  M:	Michael Petchkovsky <[email protected]>
  S:	Maintained

Regards,
Andreas

Signature · 4 lines
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)
#44 lore raw

PATCH v2 2/5 ARM: mstar: Add machine for MStar/Sigmastar infinity/mercury family ARMv7 SoCs

In reply to Daniel Palmer

Initial support for the MStar/Sigmastar infinity/mercury series of ARMv7 based IP camera and dashcam SoCs.

These chips are interesting in that they contain a Cortex A7, peripherals and system memory in a single tiny QFN package that can be hand soldered allowing almost anyone to embed Linux in their projects.

---
 MAINTAINERS                   |  1 +
 arch/arm/Kconfig              |  2 +
 arch/arm/Makefile             |  1 +
 arch/arm/mach-mstar/Kconfig   | 26 +++++++++++++
 arch/arm/mach-mstar/Makefile  |  1 +
 arch/arm/mach-mstar/mstarv7.c | 72 +++++++++++++++++++++++++++++++++++
 6 files changed, 103 insertions(+)
 create mode 100644 arch/arm/mach-mstar/Kconfig
 create mode 100644 arch/arm/mach-mstar/Makefile
 create mode 100644 arch/arm/mach-mstar/mstarv7.c
MAINTAINERS +1 -0
index 1ca77f97b8ee..754521938303 100644
@@ -2114,6 +2114,7 @@ ARM/MStar/Sigmastar ARMv7 SoC support
 M:	Daniel Palmer <[email protected]>
 L:	[email protected] (moderated for non-subscribers)
 S:	Maintained
+F:	arch/arm/mach-mstar/
 F:	Documentation/devicetree/bindings/arm/mstar.yaml
 
 ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT
arch/arm/Kconfig +2 -0
index fb6c85c5d344..e466694f8486 100644
@@ -669,6 +669,8 @@ source "arch/arm/mach-mmp/Kconfig"
 
 source "arch/arm/mach-moxart/Kconfig"
 
+source "arch/arm/mach-mstar/Kconfig"
+
 source "arch/arm/mach-mv78xx0/Kconfig"
 
 source "arch/arm/mach-mvebu/Kconfig"
arch/arm/Makefile +1 -0
index 59fde2d598d8..e7f4ca060c0f 100644
@@ -197,6 +197,7 @@ machine-$(CONFIG_ARCH_MXC)		+= imx
 machine-$(CONFIG_ARCH_MEDIATEK)		+= mediatek
 machine-$(CONFIG_ARCH_MILBEAUT)		+= milbeaut
 machine-$(CONFIG_ARCH_MXS)		+= mxs
+machine-$(CONFIG_ARCH_MSTARV7)		+= mstar
 machine-$(CONFIG_ARCH_NOMADIK)		+= nomadik
 machine-$(CONFIG_ARCH_NPCM)		+= npcm
 machine-$(CONFIG_ARCH_NSPIRE)		+= nspire
arch/arm/mach-mstar/Kconfig new file +26 -0
new file mode 100644
index 000000000000..6235d0a7860a
@@ -0,0 +1,26 @@
+menuconfig ARCH_MSTARV7
+	bool "MStar/Sigmastar ARMv7 SoC Support"
+	depends on ARCH_MULTI_V7
+	select ARM_GIC
+	select ARM_HEAVY_MB
+	help
+	  Support for newer MStar/Sigmastar SoC families that are
+	  based on ARMv7 cores like the Cortex A7 and share the same
+	  basic hardware like the infinity and mercury series.
+
+if ARCH_MSTARV7
+
+config MACH_INFINITY
+	bool "MStar/Sigmastar infinity SoC support"
+	default ARCH_MSTARV7
+	help
+	  Support for MStar/Sigmastar infinity IP camera SoCs.
+
+config MACH_MERCURY
+	bool "MStar/Sigmastar mercury SoC support"
+	default ARCH_MSTARV7
+	help
+	  Support for MStar/Sigmastar mercury dash camera SoCs.
+	  Note that older Mercury2 SoCs are ARM9 based and not supported.
+
+endif
arch/arm/mach-mstar/Makefile new file +1 -0
new file mode 100644
index 000000000000..93b0391ede7e
@@ -0,0 +1 @@
+obj-$(CONFIG_ARCH_MSTARV7) += mstarv7.o
arch/arm/mach-mstar/mstarv7.c new file +72 -0

72 lines not on this page · raw message

Signature · 1 line
2.27.0.rc0
maintainer
#45 lore raw

Re: [PATCH v2 2/5] ARM: mstar: Add machine for MStar/Sigmastar infinity/mercury family ARMv7 SoCs

Quoted 4 lines · Daniel Palmer

+/*
+ * This may need locking to deal with situations where an interrupt
+ * happens while we are in here and mb() gets called by the interrupt handler.
+ */

I would suspect that you don't need locking here, and locking would likely make it worse.

From what I can tell, an interrupt happening anywhere inside of mstarv7_mb() would still result in the function completing (as miu_status still has the MSTARV7_L3BRIDGE_STATUS_DONE bit set) and nothing that could happen inside the irq would make the barrier weaker, only stronger.

arch/arm/mach-mstar/mstarv7.c line 55

Quoted 9 lines
arch/arm/mach-mstar/mstarv7.c new file +9 -0
+static void mstarv7_mb(void)
+{
+       /* toggle the flush miu pipe fire bit */
+       writel_relaxed(0, miu_flush);
+       writel_relaxed(MSTARV7_L3BRIDGE_FLUSH_TRIGGER, miu_flush);
+       while (!(readl_relaxed(miu_status) & MSTARV7_L3BRIDGE_STATUS_DONE)) {
+               /* wait for flush to complete */
+       }
+}

This is a heavy memory barrier indeed.

The use of _relaxed() accessors is normally a bad idea and should be avoided, but
this is one of the places where it is necessary because the normal writel()/readl()
would recurse into arm_heavy_barrier(). Can you add a comment explaining this for the next reviewer?

arch/arm/mach-mstar/mstarv7.c line 62

Quoted 6 lines
arch/arm/mach-mstar/mstarv7.c new file +6 -0
+static void __init mstarv7_barriers_init(void)
+{
+       miu_flush = ioremap(MSTARV7_L3BRIDGE_FLUSH, sizeof(*miu_flush));
+       miu_status = ioremap(MSTARV7_L3BRIDGE_STATUS, sizeof(*miu_status));
+       soc_mb = mstarv7_mb;
+}

Hardcoding physical addresses is generally considered bad style, even if you know the address in advance. Can you change this to get the address of the L3BRIDGE from DT instead and just hardcode the offsets? Note that they are in the same physical page, so you only need a single of_iomap().

arch/arm/mach-mstar/mstarv7.c line 67

Quoted 4 lines
arch/arm/mach-mstar/mstarv7.c new file +4 -0
+static void __init mstarv7_init(void)
+{
+       mstarv7_barriers_init();
+}

I think you can fold this into a single function.

Arnd

#46 lore raw

Re: [PATCH v2 2/5] ARM: mstar: Add machine for MStar/Sigmastar infinity/mercury family ARMv7 SoCs

In reply to Daniel Palmer

Am 10.06.20 um 11:04 schrieb Daniel Palmer:

Quoted 4 lines

Initial support for the MStar/Sigmastar infinity/mercury series of ARMv7 based IP camera and dashcam SoCs.

These chips are interesting in that they contain a Cortex A7,

"Cortex-A7"

Quoted 2 lines

peripherals and system memory in a single tiny QFN package that can be hand soldered allowing almost anyone to embed Linux

"soldered, allowing"?

Quoted 20 lines

in their projects.

---
  MAINTAINERS                   |  1 +
  arch/arm/Kconfig              |  2 +
  arch/arm/Makefile             |  1 +
  arch/arm/mach-mstar/Kconfig   | 26 +++++++++++++
  arch/arm/mach-mstar/Makefile  |  1 +
  arch/arm/mach-mstar/mstarv7.c | 72 +++++++++++++++++++++++++++++++++++
  6 files changed, 103 insertions(+)

create mode 100644 arch/arm/mach-mstar/Kconfig create mode 100644 arch/arm/mach-mstar/Makefile create mode 100644 arch/arm/mach-mstar/mstarv7.c

MAINTAINERS +0 -0
index 1ca77f97b8ee..754521938303 100644

MAINTAINERS ARM/MStar/Sigmastar ARMv7 SoC support · line 2120

Quoted 7 lines
MAINTAINERS +1 -0
@@ -2114,6 +2114,7 @@ ARM/MStar/Sigmastar ARMv7 SoC support
  M:	Daniel Palmer <[email protected]>
  L:	[email protected] (moderated for non-subscribers)
  S:	Maintained
+F:	arch/arm/mach-mstar/
  F:	Documentation/devicetree/bindings/arm/mstar.yaml
 
  ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT

[snip]

The sort order has recently been changed to case-sensitive, i.e., you should append arch after Documentation.

Regards,
Andreas

Signature · 4 lines
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)
#47 lore raw

Re: [PATCH v2 2/5] ARM: mstar: Add machine for MStar/Sigmastar infinity/mercury family ARMv7 SoCs

Hi Andreas,

Quoted 4 lines · Andreas Färber
Quoted 2 lines

peripherals and system memory in a single tiny QFN package that can be hand soldered allowing almost anyone to embed Linux

"soldered, allowing"?

The original reads ok to me. Maybe I can just split that into two sentences? Like ".. QFN package that can be hand soldered. This allows almost anyone..".

Quoted 9 lines
Quoted 9 lines
MAINTAINERS +1 -0
@@ -2114,6 +2114,7 @@ ARM/MStar/Sigmastar ARMv7 SoC support
  M:  Daniel Palmer <[email protected]>
  L:  [email protected] (moderated for non-subscribers)
  S:  Maintained
+F:   arch/arm/mach-mstar/
  F:  Documentation/devicetree/bindings/arm/mstar.yaml
 
Quoted 5 lines

MAINTAINERS ARM/MStar/Sigmastar ARMv7 SoC support · line 2120

Quoted 1 line
MAINTAINERS +0 -0
  ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT

[snip]

The sort order has recently been changed to case-sensitive, i.e., you should append arch after Documentation.

Interesting. Checkpatch didn't complain about that although it complained about the
original ordering I had.

Thanks for the input.

Daniel

#48 lore raw

Re: [PATCH v2 2/5] ARM: mstar: Add machine for MStar/Sigmastar infinity/mercury family ARMv7 SoCs

Hi Daniel,

Am 11.06.20 um 15:01 schrieb Daniel Palmer:

Quoted 8 lines · Andreas Färber
Quoted 4 lines
Quoted 2 lines

peripherals and system memory in a single tiny QFN package that can be hand soldered allowing almost anyone to embed Linux

"soldered, allowing"?

The original reads ok to me. Maybe I can just split that into two sentences? Like ".. QFN package that can be hand soldered. This allows almost anyone..".

As non-native speaker I merely wondered whether a comma should better be inserted to separate the two parts of the sentence. Splitting it in two or leaving as is should be fine, too - I assume you're a native speaker. Most people will rather read the bindings document than old git history, so you might want to consider adding such a description below its title.

Quoted 12 lines
Quoted 12 lines
Quoted 10 lines
MAINTAINERS +1 -0
@@ -2114,6 +2114,7 @@ ARM/MStar/Sigmastar ARMv7 SoC support
   M:  Daniel Palmer <[email protected]>
   L:  [email protected] (moderated for non-subscribers)
   S:  Maintained
+F:   arch/arm/mach-mstar/
   F:  Documentation/devicetree/bindings/arm/mstar.yaml
 
   ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT

[snip]

Quoted 6 lines
Quoted 2 lines

The sort order has recently been changed to case-sensitive, i.e., you should append arch after Documentation.

Interesting. Checkpatch didn't complain about that although it complained about the
original ordering I had.

I only noticed because someone refactored my Realtek section, causing a merge conflict.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3b50142d8528e1efc1c07f69c540f926c58ab3ad

Which reminds me, in 1/5 you should probably add a W: line (after S: according to above sort commit) pointing to your http://linux-chenxing.org/ website.

And for the community following your project, you may want to set up a linux-chenxing mailing list on vger.kernel.org or on infradead.org and add it as L:, to allow for error reports and patches to not just go to you and crowded LAKML.

Cheers,
Andreas

Signature · 4 lines
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)
#49 lore raw

Re: [PATCH v2 2/5] ARM: mstar: Add machine for MStar/Sigmastar infinity/mercury family ARMv7 SoCs

Hi Andreas,

Quoted 8 lines · Andreas Färber

Hi Daniel,

Am 11.06.20 um 15:01 schrieb Daniel Palmer:

Quoted 4 lines · Andreas Färber
Quoted 3 lines
Quoted 2 lines

peripherals and system memory in a single tiny QFN package that can be hand soldered allowing almost anyone to embed Linux

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

"soldered, allowing"?

The original reads ok to me. Maybe I can just split that into two sentences? Like ".. QFN package that can be hand soldered. This allows almost anyone..".

As non-native speaker I merely wondered whether a comma should better be inserted to separate the two parts of the sentence. Splitting it in two or leaving as is should be fine, too - I assume you're a native speaker.

I'm a native speaker but it's not my daily driver anymore so I often mangle it.

Quoted 2 lines

Most people will rather read the bindings document than old git history, so you might want to consider adding such a description below its title.

I'll move the blurb and maybe reword it.

Quoted 8 lines

Which reminds me, in 1/5 you should probably add a W: line (after S:
according to above sort commit) pointing to your
http://linux-chenxing.org/ website.

And for the community following your project, you may want to set up a linux-chenxing mailing list on vger.kernel.org or on infradead.org and add it as L:, to allow for error reports and patches to not just go to you and crowded LAKML.

Very good points. I was thinking I should probably get this into mainline before setting up lists etc.

Thanks,

Daniel

#50 lore raw

Re: [PATCH v2 2/5] ARM: mstar: Add machine for MStar/Sigmastar infinity/mercury family ARMv7 SoCs

In reply to Daniel Palmer

Am 10.06.20 um 11:04 schrieb Daniel Palmer:

Quoted 18 lines
arch/arm/Makefile +1 -0
index 59fde2d598d8..e7f4ca060c0f 100644
@@ -197,6 +197,7 @@ machine-$(CONFIG_ARCH_MXC)		+= imx
  machine-$(CONFIG_ARCH_MEDIATEK)		+= mediatek
  machine-$(CONFIG_ARCH_MILBEAUT)		+= milbeaut
  machine-$(CONFIG_ARCH_MXS)		+= mxs
+machine-$(CONFIG_ARCH_MSTARV7)		+= mstar
  machine-$(CONFIG_ARCH_NOMADIK)		+= nomadik
  machine-$(CONFIG_ARCH_NPCM)		+= npcm
  machine-$(CONFIG_ARCH_NSPIRE)		+= nspire
arch/arm/mach-mstar/Kconfig new file +0 -0
new file mode 100644
index 000000000000..6235d0a7860a

arch/arm/mach-mstar/Kconfig line 1

Quoted 1 line
arch/arm/mach-mstar/Kconfig new file +1 -0
@@ -0,0 +1,26 @@
+menuconfig ARCH_MSTARV7

You call the dir mach-mstar, but name the Kconfig ARCH_MSTARV7. I had previously been asked to just use the vendor name, so this should probably be just ARCH_MSTAR. Outside arch/arm/ you can then use ARM && ARCH_MSTAR condition to make things 32-bit only, allowing to reuse ARCH_MSTAR for arm64 or whatever.

Quoted 13 lines
arch/arm/mach-mstar/Kconfig new file +13 -0
+	bool "MStar/Sigmastar ARMv7 SoC Support"
+	depends on ARCH_MULTI_V7
+	select ARM_GIC
+	select ARM_HEAVY_MB
+	help
+	  Support for newer MStar/Sigmastar SoC families that are
+	  based on ARMv7 cores like the Cortex A7 and share the same
+	  basic hardware like the infinity and mercury series.
+
+if ARCH_MSTARV7
+
+config MACH_INFINITY
+	bool "MStar/Sigmastar infinity SoC support"

arch/arm/mach-mstar/Kconfig line 24

Quoted 10 lines
arch/arm/mach-mstar/Kconfig new file +10 -0
+	default ARCH_MSTARV7
+	help
+	  Support for MStar/Sigmastar infinity IP camera SoCs.
+
+config MACH_MERCURY
+	bool "MStar/Sigmastar mercury SoC support"
+	default ARCH_MSTARV7
+	help
+	  Support for MStar/Sigmastar mercury dash camera SoCs.
+	  Note that older Mercury2 SoCs are ARM9 based and not supported.

Is this comment really helpful? This menu item would only seem to come up after having selected multi_v7, which kind of rules out ARM9.

Consider adding mercury in a second step?

arch/arm/mach-mstar/Kconfig line 26

Quoted 2 lines
arch/arm/mach-mstar/Kconfig new file +2 -0
+
+endif

Regards,
Andreas

Signature · 4 lines
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)
#51 lore raw

Re: [PATCH v2 2/5] ARM: mstar: Add machine for MStar/Sigmastar infinity/mercury family ARMv7 SoCs

Hi Andreas,

Quoted 5 lines · Andreas Färber

You call the dir mach-mstar, but name the Kconfig ARCH_MSTARV7. I had previously been asked to just use the vendor name, so this should probably be just ARCH_MSTAR. Outside arch/arm/ you can then use ARM && ARCH_MSTAR condition to make things 32-bit only, allowing to reuse ARCH_MSTAR for arm64 or whatever.

The ARM9 MStar chips before they switched to a common ARMv7 base aren't directly compatible so I thought there should be some distinction there. I doubt anyone will do it
but I made the directory mach-mstar so potentially someone could add machine support
for the older stuff to without having more directories.

Quoted 18 lines
Quoted 18 lines
arch/arm/mach-mstar/Kconfig new file +18 -0
+     bool "MStar/Sigmastar ARMv7 SoC Support"
+     depends on ARCH_MULTI_V7
+     select ARM_GIC
+     select ARM_HEAVY_MB
+     help
+       Support for newer MStar/Sigmastar SoC families that are
+       based on ARMv7 cores like the Cortex A7 and share the same
+       basic hardware like the infinity and mercury series.
+
+if ARCH_MSTARV7
+
+config MACH_INFINITY
+     bool "MStar/Sigmastar infinity SoC support"
+     default ARCH_MSTARV7
+     help
+       Support for MStar/Sigmastar infinity IP camera SoCs.
+
+config MACH_MERCURY
Quoted 8 lines

arch/arm/mach-mstar/Kconfig line 24

Quoted 5 lines
arch/arm/mach-mstar/Kconfig new file +5 -0
+     bool "MStar/Sigmastar mercury SoC support"
+     default ARCH_MSTARV7
+     help
+       Support for MStar/Sigmastar mercury dash camera SoCs.
+       Note that older Mercury2 SoCs are ARM9 based and not supported.

Is this comment really helpful? This menu item would only seem to come up after having selected multi_v7, which kind of rules out ARM9.

The older mercury2 based chips seem to still be available and used in drive recorders
that are on the market right now. The infinity series is all ARMv7 so can be supported
but for the mercury series only the newer ones are ARMv7 so I thought it was worth
mentioning that "mercury SoC support" doesn't mean all of them. I'll take it out if you
think it's unnecessary.

Quoted 1 line

Consider adding mercury in a second step?

I'll think about that. I wanted to try to get a machine that isn't one I'm personally making
into the series.

Cheers,

Daniel

#52 lore raw

PATCH v2 3/5 ARM: mstar: Add infinity/mercury series dtsi

In reply to Daniel Palmer

Adds initial dtsi for the base MStar ARMv7 SoCs, family dtsis for infinity and mercury families, and then some chip level dtsis for chips in those families.

---
 MAINTAINERS                              |  3 +
 arch/arm/boot/dts/infinity-msc313.dtsi   | 14 +++++
 arch/arm/boot/dts/infinity.dtsi          | 10 ++++
 arch/arm/boot/dts/infinity3-msc313e.dtsi | 14 +++++
 arch/arm/boot/dts/infinity3.dtsi         | 10 ++++
 arch/arm/boot/dts/mercury5-ssc8336n.dtsi | 14 +++++
 arch/arm/boot/dts/mercury5.dtsi          | 10 ++++
 arch/arm/boot/dts/mstar-v7.dtsi          | 71 ++++++++++++++++++++++++
 8 files changed, 146 insertions(+)
 create mode 100644 arch/arm/boot/dts/infinity-msc313.dtsi
 create mode 100644 arch/arm/boot/dts/infinity.dtsi
 create mode 100644 arch/arm/boot/dts/infinity3-msc313e.dtsi
 create mode 100644 arch/arm/boot/dts/infinity3.dtsi
 create mode 100644 arch/arm/boot/dts/mercury5-ssc8336n.dtsi
 create mode 100644 arch/arm/boot/dts/mercury5.dtsi
 create mode 100644 arch/arm/boot/dts/mstar-v7.dtsi
MAINTAINERS +3 -0
index 754521938303..839ae0250d3d 100644
@@ -2114,6 +2114,9 @@ ARM/MStar/Sigmastar ARMv7 SoC support
 M:	Daniel Palmer <[email protected]>
 L:	[email protected] (moderated for non-subscribers)
 S:	Maintained
+F:	arch/arm/boot/dts/infinity*.dtsi
+F:	arch/arm/boot/dts/mercury*.dtsi
+F:	arch/arm/boot/dts/mstar-v7.dtsi
 F:	arch/arm/mach-mstar/
 F:	Documentation/devicetree/bindings/arm/mstar.yaml
 
arch/arm/boot/dts/infinity-msc313.dtsi new file +14 -0
new file mode 100644
index 000000000000..4eb522e6a75d
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "infinity.dtsi"
+
+/ {
+	memory {
+		device_type = "memory";
+		reg = <0x20000000 0x4000000>;
+	};
+};
arch/arm/boot/dts/infinity.dtsi new file +10 -0
new file mode 100644
index 000000000000..25d379028689
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "mstar-v7.dtsi"
+
+/ {
+};
arch/arm/boot/dts/infinity3-msc313e.dtsi new file +14 -0
new file mode 100644
index 000000000000..d0c53153faad
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "infinity3.dtsi"
+
+/ {
+	memory {
+		device_type = "memory";
+		reg = <0x20000000 0x4000000>;
+	};
+};
arch/arm/boot/dts/infinity3.dtsi new file +10 -0
new file mode 100644
index 000000000000..cf5f18a07835
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "infinity.dtsi"
+
+/ {
+};
arch/arm/boot/dts/mercury5-ssc8336n.dtsi new file +14 -0
new file mode 100644
index 000000000000..7513f903c838
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "mercury5.dtsi"
+
+/ {
+	memory {
+		device_type = "memory";
+		reg = <0x20000000 0x4000000>;
+	};
+};
arch/arm/boot/dts/mercury5.dtsi new file +10 -0
new file mode 100644
index 000000000000..25d379028689
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "mstar-v7.dtsi"
+
+/ {
+};
arch/arm/boot/dts/mstar-v7.dtsi new file +71 -0

71 lines not on this page · raw message

Signature · 1 line
2.27.0.rc0
#53 lore raw

Re: [PATCH v2 3/5] ARM: mstar: Add infinity/mercury series dtsi

Daniel,

Quoted 22 lines · Daniel Palmer

Adds initial dtsi for the base MStar ARMv7 SoCs, family dtsis for infinity and mercury families, and then some chip level dtsis for chips in those families.

---
 MAINTAINERS                              |  3 +
 arch/arm/boot/dts/infinity-msc313.dtsi   | 14 +++++
 arch/arm/boot/dts/infinity.dtsi          | 10 ++++
 arch/arm/boot/dts/infinity3-msc313e.dtsi | 14 +++++
 arch/arm/boot/dts/infinity3.dtsi         | 10 ++++
 arch/arm/boot/dts/mercury5-ssc8336n.dtsi | 14 +++++
 arch/arm/boot/dts/mercury5.dtsi          | 10 ++++
 arch/arm/boot/dts/mstar-v7.dtsi          | 71 ++++++++++++++++++++++++
 8 files changed, 146 insertions(+)
 create mode 100644 arch/arm/boot/dts/infinity-msc313.dtsi
 create mode 100644 arch/arm/boot/dts/infinity.dtsi
 create mode 100644 arch/arm/boot/dts/infinity3-msc313e.dtsi
 create mode 100644 arch/arm/boot/dts/infinity3.dtsi
 create mode 100644 arch/arm/boot/dts/mercury5-ssc8336n.dtsi
 create mode 100644 arch/arm/boot/dts/mercury5.dtsi
 create mode 100644 arch/arm/boot/dts/mstar-v7.dtsi

[...]

Quoted 32 lines
arch/arm/boot/dts/mstar-v7.dtsi new file +26 -0
new file mode 100644
index 000000000000..0fccc4ca52a4
@@ -0,0 +1,71 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+	#address-cells = <1>;
+	#size-cells = <1>;
+	interrupt-parent = <&gic>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu0: cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a7";
+			reg = <0x0>;
+		};
+	};
+
+	arch_timer {

arch/arm/boot/dts/mstar-v7.dtsi line 36

Quoted 10 lines
arch/arm/boot/dts/mstar-v7.dtsi new file +10 -0
+		compatible = "arm,armv7-timer";
+		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2)
+				| IRQ_TYPE_LEVEL_LOW)>,
+			     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2)
+				| IRQ_TYPE_LEVEL_LOW)>,
+			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2)
+				| IRQ_TYPE_LEVEL_LOW)>,
+			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2)
+				| IRQ_TYPE_LEVEL_LOW)>;
+		clock-frequency = <6000000>;

This is 2020, and not 2012 anymore. The frequency should be set by your favourite bootloader.

Quoted 14 lines
arch/arm/boot/dts/mstar-v7.dtsi new file +14 -0
+	};
+
+	pmu {
+		compatible = "arm,cortex-a7-pmu";
+		interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+	};
+
+	soc: soc {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;

arch/arm/boot/dts/mstar-v7.dtsi line 60

Quoted 10 lines
arch/arm/boot/dts/mstar-v7.dtsi new file +10 -0
+		ranges;
+
+		gic: interrupt-controller@16001000 {
+			compatible = "arm,cortex-a7-gic";
+			#interrupt-cells = <3>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			interrupt-controller;
+			reg = <0x16001000 0x1000>,
+			      <0x16002000 0x1000>;

The GICC region is likely to be 8kB, and not 4kB.
Missing GICH and GICV regions, as well as the maintenance interrupt.

Thanks,

        M.
Signature · 1 line
Jazz is not dead. It just smells funny...
#54 lore raw

Re: [PATCH v2 3/5] ARM: mstar: Add infinity/mercury series dtsi

In reply to Daniel Palmer

Hi,

Am 10.06.20 um 11:04 schrieb Daniel Palmer:

Quoted 5 lines

Adds initial dtsi for the base MStar ARMv7 SoCs, family dtsis for infinity and mercury families, and then some chip level dtsis for chips in those families.

Quoted 10 lines
---
  MAINTAINERS                              |  3 +
  arch/arm/boot/dts/infinity-msc313.dtsi   | 14 +++++
  arch/arm/boot/dts/infinity.dtsi          | 10 ++++
  arch/arm/boot/dts/infinity3-msc313e.dtsi | 14 +++++
  arch/arm/boot/dts/infinity3.dtsi         | 10 ++++
  arch/arm/boot/dts/mercury5-ssc8336n.dtsi | 14 +++++
  arch/arm/boot/dts/mercury5.dtsi          | 10 ++++
  arch/arm/boot/dts/mstar-v7.dtsi          | 71 ++++++++++++++++++++++++
  8 files changed, 146 insertions(+)

Can you split this up into three parts for easier review?

Quoted 13 lines

create mode 100644 arch/arm/boot/dts/infinity-msc313.dtsi create mode 100644 arch/arm/boot/dts/infinity.dtsi create mode 100644 arch/arm/boot/dts/infinity3-msc313e.dtsi create mode 100644 arch/arm/boot/dts/infinity3.dtsi create mode 100644 arch/arm/boot/dts/mercury5-ssc8336n.dtsi create mode 100644 arch/arm/boot/dts/mercury5.dtsi create mode 100644 arch/arm/boot/dts/mstar-v7.dtsi

MAINTAINERS +0 -0
index 754521938303..839ae0250d3d 100644

MAINTAINERS ARM/MStar/Sigmastar ARMv7 SoC support · line 2119

Quoted 6 lines
MAINTAINERS +3 -0
@@ -2114,6 +2114,9 @@ ARM/MStar/Sigmastar ARMv7 SoC support
  M:	Daniel Palmer <[email protected]>
  L:	[email protected] (moderated for non-subscribers)
  S:	Maintained
+F:	arch/arm/boot/dts/infinity*.dtsi
+F:	arch/arm/boot/dts/mercury*.dtsi
+F:	arch/arm/boot/dts/mstar-v7.dtsi

Sort order wrt D.

arch/arm/boot/dts/infinity-msc313.dtsi line 1

Quoted 10 lines
MAINTAINERS +0 -0
  F:	arch/arm/mach-mstar/
  F:	Documentation/devicetree/bindings/arm/mstar.yaml
 
arch/arm/boot/dts/infinity-msc313.dtsi new file +1 -0
new file mode 100644
index 000000000000..4eb522e6a75d
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0

DTs as hardware description should be dual-licensed as either MIT or BSD-2-Clause, similar to the schema.

Also, elsewhere, for any code that might get reused for OpenOCD (e.g., clk drivers and low-level init like machine - 2/5) or other non-kernel projects potentially incompatible with GPL-2.0-only, it would be useful to use the -or-later version of the GPL for code sharing - if the sources you used permit that.

arch/arm/boot/dts/infinity-msc313.dtsi line 3

Quoted 2 lines
arch/arm/boot/dts/infinity-msc313.dtsi new file +2 -0
+/*
+ * Copyright (c) 2019 thingy.jp.

2019-2020? Check elsewhere.

arch/arm/boot/dts/infinity-msc313.dtsi line 12

Quoted 9 lines
arch/arm/boot/dts/infinity-msc313.dtsi new file +9 -0
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "infinity.dtsi"
+
+/ {
+	memory {
+		device_type = "memory";
+		reg = <0x20000000 0x4000000>;

The memory node needs to become memory@20000000 then.

arch/arm/boot/dts/infinity-msc313.dtsi line 13

Quoted 1 line
arch/arm/boot/dts/infinity-msc313.dtsi new file +1 -0
+	};

I take it, this RAM is integrated? Maybe add some explanation of what this file is

Quoted 7 lines
arch/arm/boot/dts/infinity-msc313.dtsi new file +1 -0
+};
arch/arm/boot/dts/infinity.dtsi new file +0 -0
new file mode 100644
index 000000000000..25d379028689

arch/arm/boot/dts/infinity.dtsi line 10

Quoted 10 lines
arch/arm/boot/dts/infinity.dtsi new file +10 -0
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "mstar-v7.dtsi"
+
+/ {
+};

What do you intend to add here? Is it really needed? (same below)

Pre-DT-Schema I used to add a compatible property in the .dtsi, to make sure we have at least the SoC's, in case someone neglects to add one in their board's .dts. With DT schema that's no longer valid (if enum/const is required), but Linux would still work better with than without.

Quoted 6 lines
arch/arm/boot/dts/infinity3-msc313e.dtsi new file +0 -0
new file mode 100644
index 000000000000..d0c53153faad

arch/arm/boot/dts/infinity3-msc313e.dtsi line 10

Quoted 10 lines
arch/arm/boot/dts/infinity3-msc313e.dtsi new file +10 -0
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "infinity3.dtsi"
+
+/ {
+	memory {

Ditto, unit address missing.

Quoted 10 lines
arch/arm/boot/dts/infinity3-msc313e.dtsi new file +4 -0
+		device_type = "memory";
+		reg = <0x20000000 0x4000000>;
+	};
+};
arch/arm/boot/dts/infinity3.dtsi new file +0 -0
new file mode 100644
index 000000000000..cf5f18a07835

arch/arm/boot/dts/infinity3.dtsi line 10

Quoted 10 lines
arch/arm/boot/dts/infinity3.dtsi new file +10 -0
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "infinity.dtsi"
+
+/ {
+};

Don't you anticipate incompatibilities between infinity and infinity3, i.e., things you don't want to inherit? Seems a bit optimistic. You can of course overwrite properties, but deleting is more difficult.

Quoted 6 lines
arch/arm/boot/dts/mercury5-ssc8336n.dtsi new file +0 -0
new file mode 100644
index 000000000000..7513f903c838

arch/arm/boot/dts/mercury5-ssc8336n.dtsi line 10

Quoted 10 lines
arch/arm/boot/dts/mercury5-ssc8336n.dtsi new file +10 -0
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "mercury5.dtsi"
+
+/ {
+	memory {

Unit address.

arch/arm/boot/dts/mstar-v7.dtsi

Quoted 25 lines
arch/arm/boot/dts/mercury5-ssc8336n.dtsi new file +4 -0
+		device_type = "memory";
+		reg = <0x20000000 0x4000000>;
+	};
+};
arch/arm/boot/dts/mercury5.dtsi new file +10 -0
new file mode 100644
index 000000000000..25d379028689
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "mstar-v7.dtsi"
+
+/ {
+};
arch/arm/boot/dts/mstar-v7.dtsi new file +0 -0
new file mode 100644
index 000000000000..0fccc4ca52a4

So this is the only file starting with mstar. Have you thought about prefixing infinity/mercury, so that they're grouped together?

Quoted 35 lines
arch/arm/boot/dts/mstar-v7.dtsi new file +34 -0
@@ -0,0 +1,71 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+	#address-cells = <1>;
+	#size-cells = <1>;> 
+	interrupt-parent = <&gic>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu0: cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a7";
+			reg = <0x0>;
+		};
+	};
+
+	arch_timer {
+		compatible = "arm,armv7-timer";
+		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2)
+				| IRQ_TYPE_LEVEL_LOW)>,
+			     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2)
+				| IRQ_TYPE_LEVEL_LOW)>,
+			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2)
+				| IRQ_TYPE_LEVEL_LOW)>,
+			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2)

arch/arm/boot/dts/mstar-v7.dtsi line 44

Quoted 10 lines
arch/arm/boot/dts/mstar-v7.dtsi new file +10 -0
+				| IRQ_TYPE_LEVEL_LOW)>;
+		clock-frequency = <6000000>;
+	};
+
+	pmu {
+		compatible = "arm,cortex-a7-pmu";
+		interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;

Lacking interrupt-affinity.

"This property should be present when there is more than a single SPI."

To deal with single- vs. dual-core models, you should give the pmu node a label, e.g., arm_pmu used elsewhere, I think. Depending on your preferences you could set it here in common code (less work) or in the SoC-specific .dtsi where you know the number of CPUs for sure (safer to not forget later).

arch/arm/boot/dts/mstar-v7.dtsi line 51

Quoted 7 lines
arch/arm/boot/dts/mstar-v7.dtsi new file +7 -0
+	};
+
+	soc: soc {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;

I had been instructed not to use full identity ranges but to exclude RAM ranges for safety reasons.

arch/arm/boot/dts/mstar-v7.dtsi line 60

Quoted 9 lines
arch/arm/boot/dts/mstar-v7.dtsi new file +9 -0
+
+		gic: interrupt-controller@16001000 {
+			compatible = "arm,cortex-a7-gic";
+			#interrupt-cells = <3>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			interrupt-controller;
+			reg = <0x16001000 0x1000>,
+			      <0x16002000 0x1000>;

In addition to Marc's comments, please reorder reg to below compatible for consistency. Suggest to also reorder interrupt-controller before the -cells properties, after reg.

arch/arm/boot/dts/mstar-v7.dtsi line 69

Quoted 9 lines
arch/arm/boot/dts/mstar-v7.dtsi new file +9 -0
+		};
+
+		pm_uart: uart@1f221000 {
+			compatible = "ns16550a";
+			reg = <0x1f221000 0x100>;
+			reg-shift = <3>;
+			clock-frequency = <172000000>;
+			status = "disabled";
+		};

If you have any decent manuals for these SoCs, I suggest to check whether there are any internal buses that you may want to model as simple-bus for grouping. In-tree examples include meson and recently merged rtd1195 - it affects the reg addresses and unit addresses via suitable ranges mappings.

arch/arm/boot/dts/mstar-v7.dtsi line 71

Quoted 2 lines
arch/arm/boot/dts/mstar-v7.dtsi new file +2 -0
+	};
+};

Regards,
Andreas

Signature · 4 lines
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)
#55 lore raw

Re: [PATCH v2 3/5] ARM: mstar: Add infinity/mercury series dtsi

Hi Andreas,

Quoted 1 line · Andreas Färber

Can you split this up into three parts for easier review?

Understood. Will do.

Quoted 1 line

2019-2020? Check elsewhere.

The patches are originally from 2019. I'll update everything.

Quoted 12 lines

arch/arm/boot/dts/infinity-msc313.dtsi line 12

Quoted 9 lines

+ * Author: Daniel Palmer <[email protected]>
+ */

arch/arm/boot/dts/infinity-msc313.dtsi new file +7 -0
+
+#include "infinity.dtsi"
+
+/ {
+     memory {
+             device_type = "memory";
+             reg = <0x20000000 0x4000000>;

The memory node needs to become memory@20000000 then.

Quoted 4 lines
Quoted 1 line

+ };

I take it, this RAM is integrated? Maybe add some explanation of what this file is

Yes. The memory is integrated and the size depends on the specific chips so the memory node is at the chip level dtsi and not the board level.

Quoted 11 lines
Quoted 11 lines
(quoted diff) +1 -0
+};
arch/arm/boot/dts/infinity.dtsi new file +4 -0
new file mode 100644
index 000000000000..25d379028689
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
Quoted 8 lines

arch/arm/boot/dts/infinity.dtsi line 10

Quoted 6 lines
arch/arm/boot/dts/infinity.dtsi new file +6 -0
+ */
+
+#include "mstar-v7.dtsi"
+
+/ {
+};

What do you intend to add here? Is it really needed? (same below)

The specific nodes will go into there. This is mostly an artefact of splitting the device trees out of a more developed tree.

Quoted 11 lines
Quoted 11 lines

new file mode 100644
index 000000000000..cf5f18a07835

arch/arm/boot/dts/infinity3.dtsi new file +6 -0
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
Quoted 8 lines

arch/arm/boot/dts/infinity3.dtsi line 10

Quoted 4 lines
arch/arm/boot/dts/infinity3.dtsi new file +4 -0
+#include "infinity.dtsi"
+
+/ {
+};

Don't you anticipate incompatibilities between infinity and infinity3, i.e., things you don't want to inherit? Seems a bit optimistic. You can of course overwrite properties, but deleting is more difficult.

In my tree with drivers for the rest of the hardware it hasn't been a problem. So far I've found infinity, infinity2, infinity3, infinity5 and infinity6 chips. The memory
map for them is almost identical and the changes are adding in more copies of things
like DMA controllers, extra clock blocks etc.

Having infinity.dtsi as the base for the newer versions should avoid having duplication
of nodes that aren't common on the mstar armv7 level but are common to the infinity subtypes.

There are two good examples of this:
For infinity? the USB and SD controllers are at the same place for all of the chips I've
found so far. Unfortunately, despite using the same IP block and the same driver those
blocks are in different places in the mercury5. At the moment with all of the infinity chips
pulling in infinity.dtsi those nodes are only in infinity.dtsi and mercury5.dtsi.
If infinity?.dtsi are all stacked on top of the mstarv7.dtsi base then there will be a number of
copies of the same nodes.

Quoted 16 lines
Quoted 16 lines
arch/arm/boot/dts/mercury5.dtsi new file +10 -0
new file mode 100644
index 000000000000..25d379028689
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "mstar-v7.dtsi"
+
+/ {
+};
Quoted 8 lines

arch/arm/boot/dts/mstar-v7.dtsi

Quoted 5 lines
arch/arm/boot/dts/mstar-v7.dtsi new file +0 -0
new file mode 100644
index 000000000000..0fccc4ca52a4

So this is the only file starting with mstar. Have you thought about prefixing infinity/mercury, so that they're grouped together?

I have been thinking about that. I didn't see any other dts in arm that had the vendor as a prefix though. With arm64 everything is in per vendor subdirectories
to achieve the same thing.

Quoted 11 lines

arch/arm/boot/dts/mstar-v7.dtsi line 69

Quoted 9 lines
arch/arm/boot/dts/mstar-v7.dtsi new file +9 -0
+             };
+
+             pm_uart: uart@1f221000 {
+                     compatible = "ns16550a";
+                     reg = <0x1f221000 0x100>;
+                     reg-shift = <3>;
+                     clock-frequency = <172000000>;
+                     status = "disabled";
+             };

If you have any decent manuals for these SoCs,

Everything so far has been reverse engineered from an old 3.18 kernel, poking with a multimeter etc. I wish I had a decent manual.

Quoted 4 lines

I suggest to check whether there are any internal buses that you may want to model as simple-bus for grouping. In-tree examples include meson and recently merged rtd1195 - it affects the reg addresses and unit addresses via suitable ranges mappings.

There is a bridge that is between the CPU and the peripheral registers that doesn't quite fit simple-bus (from what I remember it needs a clk). My plan was to introduce the thin driver for that bus (it just consumes the clks it needs so they don't get disabled at the moment) after introducing the clk support.

Thanks,

Daniel

#56 lore raw

Re: [PATCH v2 3/5] ARM: mstar: Add infinity/mercury series dtsi

Hi,

Am 11.06.20 um 16:19 schrieb Daniel Palmer:

Quoted 10 lines · Andreas Färber
Quoted 8 lines

arch/arm/boot/dts/mstar-v7.dtsi

Quoted 5 lines
arch/arm/boot/dts/mstar-v7.dtsi new file +0 -0
new file mode 100644
index 000000000000..0fccc4ca52a4

So this is the only file starting with mstar. Have you thought about prefixing infinity/mercury, so that they're grouped together?

Quoted 4 lines

I have been thinking about that. I didn't see any other dts in arm that had the vendor as a prefix though. With arm64 everything is in per vendor subdirectories
to achieve the same thing.

qcom- and arm- are examples. Admittedly outliers, but for a new target you don't have all the historical backwards-compatibility baggage.

The downside would be if someone wanted to add newer sstar chips under the new name later, then they wouldn't be grouped with predecessor families. Right now it seems like mercury and infinity are not that different, so I figured it might be useful for people contributing patches to see that changes in one might require review of the other.

Cheers,
Andreas

Signature · 4 lines
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)
#57 lore raw

Re: [PATCH v2 3/5] ARM: mstar: Add infinity/mercury series dtsi

Hi Andreas,

Quoted 5 lines · Andreas Färber

The downside would be if someone wanted to add newer sstar chips under the new name later, then they wouldn't be grouped with predecessor families. Right now it seems like mercury and infinity are not that different, so I figured it might be useful for people contributing patches to see that changes in one might require review of the other.

I've thought about this too. One thing I considered was not using mstar or sstar at all
and doing the same thing as sunxi and using either the "chenxing" (MorningStar, MStar) or "xingchen" (SigmaStar)
moniker instead.
However, there are lots of kernel dumps from MStar based TVs etc in the wild already that are using the mstar
prefix so just continuing to use that seems like the right thing to do.

Thanks,

Daniel

#58 lore raw

PATCH v2 4/5 ARM: mstar: Add dts for msc313(e) based BreadBee boards

In reply to Daniel Palmer

BreadBee is an opensource development board based on the MStar msc313(e) SoC.

Hardware details, schematics and so on can be found at:
https://github.com/breadbee/breadbee

---
 arch/arm/boot/dts/Makefile                    |  3 +++
 .../dts/infinity-msc313-breadbee_crust.dts    | 25 +++++++++++++++++++
 .../boot/dts/infinity3-msc313e-breadbee.dts   | 25 +++++++++++++++++++
 3 files changed, 53 insertions(+)
 create mode 100644 arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts
 create mode 100644 arch/arm/boot/dts/infinity3-msc313e-breadbee.dts
arch/arm/boot/dts/Makefile +3 -0
index e6a1cac0bfc7..4a5f8075a4f6 100644
@@ -1342,6 +1342,9 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
 	mt8127-moose.dtb \
 	mt8135-evbp1.dtb
 dtb-$(CONFIG_ARCH_MILBEAUT) += milbeaut-m10v-evb.dtb
+dtb-$(CONFIG_ARCH_MSTARV7) += \
+	infinity-msc313-breadbee_crust.dtb \
+	infinity3-msc313e-breadbee.dtb
 dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
 dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-ast2500-evb.dtb \
arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts new file +25 -0
new file mode 100644
index 000000000000..8a827c8fd8b2
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+/dts-v1/;
+#include "infinity-msc313.dtsi"
+
+/ {
+	model = "breadbee-crust";
+	compatible = "thingyjp,breadbee-crust", "mstar,infinity";
+
+	aliases {
+		serial0 = &pm_uart;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&pm_uart {
+	status = "okay";
+};
arch/arm/boot/dts/infinity3-msc313e-breadbee.dts new file +25 -0
new file mode 100644
index 000000000000..423bb32e6b74
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+/dts-v1/;
+#include "infinity3-msc313e.dtsi"
+
+/ {
+	model = "breadbee";
+	compatible = "thingyjp,breadbee", "mstar,infinity3";
+
+	aliases {
+		serial0 = &pm_uart;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&pm_uart {
+	status = "okay";
+};
Signature · 1 line
2.27.0.rc0
#59 lore raw

Re: [PATCH v2 4/5] ARM: mstar: Add dts for msc313(e) based BreadBee boards

Am 10.06.20 um 11:04 schrieb Daniel Palmer:

Quoted 36 lines

BreadBee is an opensource development board based on the MStar msc313(e) SoC.

Hardware details, schematics and so on can be found at:
https://github.com/breadbee/breadbee

---
  arch/arm/boot/dts/Makefile                    |  3 +++
  .../dts/infinity-msc313-breadbee_crust.dts    | 25 +++++++++++++++++++
  .../boot/dts/infinity3-msc313e-breadbee.dts   | 25 +++++++++++++++++++
  3 files changed, 53 insertions(+)

create mode 100644 arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts create mode 100644 arch/arm/boot/dts/infinity3-msc313e-breadbee.dts

arch/arm/boot/dts/Makefile +3 -0
index e6a1cac0bfc7..4a5f8075a4f6 100644
@@ -1342,6 +1342,9 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
  	mt8127-moose.dtb \
  	mt8135-evbp1.dtb
  dtb-$(CONFIG_ARCH_MILBEAUT) += milbeaut-m10v-evb.dtb
+dtb-$(CONFIG_ARCH_MSTARV7) += \
+	infinity-msc313-breadbee_crust.dtb \
+	infinity3-msc313e-breadbee.dtb
  dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
  dtb-$(CONFIG_ARCH_ASPEED) += \
  	aspeed-ast2500-evb.dtb \
arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts new file +1 -0
new file mode 100644
index 000000000000..8a827c8fd8b2
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0

arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts line 11

Quoted 10 lines
arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts new file +10 -0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+/dts-v1/;
+#include "infinity-msc313.dtsi"
+
+/ {
+	model = "breadbee-crust";

This is user-visible text, so "BreadBee Crust" or so?

arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts line 24

Quoted 13 lines
arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts new file +13 -0
+	compatible = "thingyjp,breadbee-crust", "mstar,infinity";
+
+	aliases {
+		serial0 = &pm_uart;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&pm_uart {
+	status = "okay";

Might this be a more suited place for temporary clock-frequency? For lack of clk driver it would seem to depend on the board's bootloader pre-configuring it rather than being a default of the SoC.

Quoted 8 lines
arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts new file +1 -0
+};
arch/arm/boot/dts/infinity3-msc313e-breadbee.dts new file +1 -0
new file mode 100644
index 000000000000..423bb32e6b74
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0

arch/arm/boot/dts/infinity3-msc313e-breadbee.dts line 11

Quoted 10 lines
arch/arm/boot/dts/infinity3-msc313e-breadbee.dts new file +10 -0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+/dts-v1/;
+#include "infinity3-msc313e.dtsi"
+
+/ {
+	model = "breadbee";

Ditto, "BreadBee"?

arch/arm/boot/dts/infinity3-msc313e-breadbee.dts line 24

Quoted 13 lines
arch/arm/boot/dts/infinity3-msc313e-breadbee.dts new file +13 -0
+	compatible = "thingyjp,breadbee", "mstar,infinity3";
+
+	aliases {
+		serial0 = &pm_uart;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&pm_uart {
+	status = "okay";

Ditto, clock-frequency?

arch/arm/boot/dts/infinity3-msc313e-breadbee.dts line 25

Quoted 1 line
arch/arm/boot/dts/infinity3-msc313e-breadbee.dts new file +1 -0
+};

Regards,
Andreas

Signature · 4 lines
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)
#60 lore raw

Re: [PATCH v2 4/5] ARM: mstar: Add dts for msc313(e) based BreadBee boards

Hi Andreas,

Quoted 9 lines · Andreas Färber
Quoted 9 lines
arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts new file +9 -0
+     compatible = "thingyjp,breadbee-crust", "mstar,infinity";
+
+     aliases {
+             serial0 = &pm_uart;
+     };
+
+     chosen {
+             stdout-path = "serial0:115200n8";
+     };
Quoted 8 lines

arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts line 24

Quoted 4 lines
arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts new file +4 -0
+};
+
+&pm_uart {
+     status = "okay";

Might this be a more suited place for temporary clock-frequency? For lack of clk driver it would seem to depend on the board's bootloader pre-configuring it rather than being a default of the SoC.

For all of the chips so far their second stage bootloader always turns on a PLL and
reconfigures the pm_uart clock to use a 172MHz tap from that PLL right at the start
of the boot process before u-boot is started. The new u-boot SPL I'm working on to replace
that loader follows that convention.
Once the clk parts are in it should be possible to pull out the fixed frequency and
replace it with a proper handle to that PLL tap.
Basically it's not documented anywhere except the assembly but the convention for
these chips is to use the 172MHz clock for the uart pretty soon after power on so it
made sense to have it in one place.

Thanks,

Daniel

#61 lore raw

PATCH v2 5/5 ARM: mstar: Add dts for 70mai midrive d08

In reply to Daniel Palmer

Adds inital support for the 70mai midrive d08 dash camera.

---
 arch/arm/boot/dts/Makefile                    |  3 ++-
 .../boot/dts/mercury5-ssc8336n-midrive08.dts  | 25 +++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/mercury5-ssc8336n-midrive08.dts
arch/arm/boot/dts/Makefile +2 -1
index 4a5f8075a4f6..35c7ecc52c60 100644
@@ -1344,7 +1344,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
 dtb-$(CONFIG_ARCH_MILBEAUT) += milbeaut-m10v-evb.dtb
 dtb-$(CONFIG_ARCH_MSTARV7) += \
 	infinity-msc313-breadbee_crust.dtb \
-	infinity3-msc313e-breadbee.dtb
+	infinity3-msc313e-breadbee.dtb \
+	mercury5-ssc8336n-midrive08.dtb
 dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
 dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-ast2500-evb.dtb \
arch/arm/boot/dts/mercury5-ssc8336n-midrive08.dts new file +25 -0
new file mode 100644
index 000000000000..4ee50ecf6ab1
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+/dts-v1/;
+#include "mercury5-ssc8336n.dtsi"
+
+/ {
+	model = "midrive d08";
+	compatible = "70mai,midrived08", "mstar,mercury5";
+
+	aliases {
+		serial0 = &pm_uart;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&pm_uart {
+	status = "okay";
+};
Signature · 1 line
2.27.0.rc0
#62 lore raw

Re: [PATCH v2 5/5] ARM: mstar: Add dts for 70mai midrive d08

BTW I think the subject convention has been "ARM: dts: ...", with "ARM: mstar: ..." more for mach-mstar.

Am 10.06.20 um 11:04 schrieb Daniel Palmer:

Quoted 30 lines

Adds inital support for the 70mai midrive d08 dash camera.

---
  arch/arm/boot/dts/Makefile                    |  3 ++-
  .../boot/dts/mercury5-ssc8336n-midrive08.dts  | 25 +++++++++++++++++++
  2 files changed, 27 insertions(+), 1 deletion(-)

create mode 100644 arch/arm/boot/dts/mercury5-ssc8336n-midrive08.dts

arch/arm/boot/dts/Makefile +2 -1
index 4a5f8075a4f6..35c7ecc52c60 100644
@@ -1344,7 +1344,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
  dtb-$(CONFIG_ARCH_MILBEAUT) += milbeaut-m10v-evb.dtb
  dtb-$(CONFIG_ARCH_MSTARV7) += \
  	infinity-msc313-breadbee_crust.dtb \
-	infinity3-msc313e-breadbee.dtb
+	infinity3-msc313e-breadbee.dtb \
+	mercury5-ssc8336n-midrive08.dtb
  dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
  dtb-$(CONFIG_ARCH_ASPEED) += \
  	aspeed-ast2500-evb.dtb \
arch/arm/boot/dts/mercury5-ssc8336n-midrive08.dts new file +1 -0
new file mode 100644
index 000000000000..4ee50ecf6ab1
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0

arch/arm/boot/dts/mercury5-ssc8336n-midrive08.dts line 11

Quoted 10 lines
arch/arm/boot/dts/mercury5-ssc8336n-midrive08.dts new file +10 -0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+/dts-v1/;
+#include "mercury5-ssc8336n.dtsi"
+
+/ {
+	model = "midrive d08";

Couldn't find this on their website. Should this be "70mai midrive ..." or is "midrive" a different brand?

arch/arm/boot/dts/mercury5-ssc8336n-midrive08.dts line 12

Quoted 1 line
arch/arm/boot/dts/mercury5-ssc8336n-midrive08.dts new file +1 -0
+	compatible = "70mai,midrived08", "mstar,mercury5";

Have you considered naming it "70mai,midrive-d08" for better readability? (affects 1/5)

arch/arm/boot/dts/mercury5-ssc8336n-midrive08.dts line 24

Quoted 12 lines
arch/arm/boot/dts/mercury5-ssc8336n-midrive08.dts new file +12 -0
+
+	aliases {
+		serial0 = &pm_uart;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&pm_uart {
+	status = "okay";

clock-frequency?

arch/arm/boot/dts/mercury5-ssc8336n-midrive08.dts line 25

Quoted 1 line
arch/arm/boot/dts/mercury5-ssc8336n-midrive08.dts new file +1 -0
+};

Regards,
Andreas

Signature · 4 lines
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)
#63 lore raw

Re: [PATCH v2 5/5] ARM: mstar: Add dts for 70mai midrive d08

Hi Andreas,

Quoted 3 lines · Andreas Färber

BTW I think the subject convention has been "ARM: dts: ...", with "ARM:
mstar: ..." more for mach-mstar.

I noticed this after sending out this series. I've fixed up the subjects in line with convention for the next try.

Quoted 12 lines
Quoted 12 lines
arch/arm/boot/dts/mercury5-ssc8336n-midrive08.dts new file +6 -0
new file mode 100644
index 000000000000..4ee50ecf6ab1
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
Quoted 8 lines

arch/arm/boot/dts/mercury5-ssc8336n-midrive08.dts line 11

Quoted 5 lines
arch/arm/boot/dts/mercury5-ssc8336n-midrive08.dts new file +5 -0
+/dts-v1/;
+#include "mercury5-ssc8336n.dtsi"
+
+/ {
+     model = "midrive d08";

Couldn't find this on their website. Should this be "70mai midrive ..." or is "midrive" a different brand?

I think it should be 70mai Midrive D08 based on your comments on the other model names.
On their site this camera is now called "Dash Cam Lite". Midrive D08 is the name I bought it under and the name that was used for it's FCC approval (https://fccid.io/2AOK9-MIDRIVED08) so that's what I went
with.

Quoted 4 lines

arch/arm/boot/dts/mercury5-ssc8336n-midrive08.dts line 12

Quoted 1 line
arch/arm/boot/dts/mercury5-ssc8336n-midrive08.dts new file +1 -0
+     compatible = "70mai,midrived08", "mstar,mercury5";

Have you considered naming it "70mai,midrive-d08" for better readability? (affects 1/5)

I went with midrived08 as that's what was used for the FCC and from what I remember was written on the casing.

Thanks,

Daniel

#64 lore raw

PATCH 3/4 ARM: mstar: Add infinity series dtsi

In reply to Daniel Palmer

Adds initial dtsis for the infinity SoC family and a dtsi for the infinity3 based msc313e part.

---
 MAINTAINERS                              |  1 +
 arch/arm/boot/dts/Makefile               |  3 +
 arch/arm/boot/dts/infinity.dtsi          | 71 ++++++++++++++++++++++++
 arch/arm/boot/dts/infinity3-msc313e.dtsi | 14 +++++
 arch/arm/boot/dts/infinity3.dtsi         | 11 ++++
 5 files changed, 100 insertions(+)
 create mode 100644 arch/arm/boot/dts/infinity.dtsi
 create mode 100644 arch/arm/boot/dts/infinity3-msc313e.dtsi
 create mode 100644 arch/arm/boot/dts/infinity3.dtsi
MAINTAINERS +1 -0
index e35c3eb2b680..8045563ac76f 100644
@@ -1986,6 +1986,7 @@ M:	Daniel Palmer <[email protected]>
 L:	[email protected] (moderated for non-subscribers)
 F:	Documentation/devicetree/bindings/arm/mstar.yaml
 F:	arch/arm/mach-mstar/
+F:	arch/arm/boot/dts/infinity*.dtsi
 S:	Maintained
 
 ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT
arch/arm/boot/dts/Makefile +3 -0
index b21b3a64641a..bf0aa53d3a13 100644
@@ -1303,3 +1303,6 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-bmc-opp-zaius.dtb \
 	aspeed-bmc-portwell-neptune.dtb \
 	aspeed-bmc-quanta-q71l.dtb
+dtb-$(CONFIG_ARCH_MSTAR) += \
+	infinity3-msc313e-breadbee.dtb
+
arch/arm/boot/dts/infinity.dtsi new file +71 -0

71 lines not on this page · raw message

arch/arm/boot/dts/infinity3-msc313e.dtsi new file +14 -0
new file mode 100644
index 000000000000..d0c53153faad
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "infinity3.dtsi"
+
+/ {
+	memory {
+		device_type = "memory";
+		reg = <0x20000000 0x4000000>;
+	};
+};
arch/arm/boot/dts/infinity3.dtsi new file +11 -0
new file mode 100644
index 000000000000..bea22cf62373
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+#include "infinity.dtsi"
+
+/ {
+};
+
Signature · 1 line
2.23.0
#65 lore raw

PATCH 4/4 ARM: mstar: Add dts for msc313e based BreadBee board

In reply to Daniel Palmer

BreadBee is an opensource development board based on the MStar msc313e SoC.

Hardware details, schematics and so on can be found at:
https://github.com/breadbee/breadbee

---
 arch/arm/boot/dts/Makefile                    |  1 +
 .../boot/dts/infinity3-msc313e-breadbee.dts   | 26 +++++++++++++++++++
 2 files changed, 27 insertions(+)
 create mode 100644 arch/arm/boot/dts/infinity3-msc313e-breadbee.dts
arch/arm/boot/dts/Makefile +1 -0
index bf0aa53d3a13..e546dfafef55 100644
@@ -1276,6 +1276,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
 	mt8127-moose.dtb \
 	mt8135-evbp1.dtb
 dtb-$(CONFIG_ARCH_MILBEAUT) += milbeaut-m10v-evb.dtb
+dtb-$(CONFIG_ARCH_MSTAR) += infinity3-msc313e-breadbee.dtb
 dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
 dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-ast2500-evb.dtb \
arch/arm/boot/dts/infinity3-msc313e-breadbee.dts new file +26 -0
new file mode 100644
index 000000000000..cf185878c412
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <[email protected]>
+ */
+
+/dts-v1/;
+#include "infinity3-msc313e.dtsi"
+
+/ {
+	model = "thingy.jp breadbee";
+	compatible = "thingyjp,breadbee", "mstar,infinity3", "mstar,infinity";
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+		bootargs = "console=ttyS0,115200";
+	};
+
+	aliases {
+		console = &pm_uart;
+	};
+};
+
+&pm_uart {
+	status = "okay";
+};
Signature · 1 line
2.23.0
maintainer
#66 lore raw
In reply to Daniel Palmer
Quoted 17 lines · Daniel Palmer

This adds a prefix for MStar and thingy.jp and then defines compatible strings for the first MStar based board.

---
 .../devicetree/bindings/arm/mstar.yaml        | 22 +++++++++++++++++++
 .../devicetree/bindings/vendor-prefixes.yaml  |  4 ++++
 MAINTAINERS                                   |  6 +++++
 3 files changed, 32 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/mstar.yaml
Documentation/devicetree/bindings/arm/mstar.yaml new file +0 -0
new file mode 100644
index 000000000000..0ea5b2b9387f

Documentation/devicetree/bindings/arm/mstar.yaml line 1

Quoted 1 line
Documentation/devicetree/bindings/arm/mstar.yaml new file +1 -0
@@ -0,0 +1,22 @@
+# SPDX-License-Identifier: (GPL-2.0+ OR X11)

(GPL-2.0-only OR BSD-2-Clause) is preferred. Any reason to differ?

Quoted 6 lines
Documentation/devicetree/bindings/arm/mstar.yaml new file +6 -0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/mstar.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MStar platforms device tree bindings

Documentation/devicetree/bindings/arm/mstar.yaml line 17

Quoted 10 lines
Documentation/devicetree/bindings/arm/mstar.yaml new file +10 -0
+
+maintainers:
+  - Daniel Palmer <[email protected]>
+
+properties:
+  $nodename:
+    const: '/'
+  compatible:
+    oneOf:
+

Drop the blank line.

Documentation/devicetree/bindings/arm/mstar.yaml line 22

Quoted 5 lines
Documentation/devicetree/bindings/arm/mstar.yaml new file +5 -0
+      - description: thingy.jp BreadBee
+        items:
+          - const: thingyjp,breadbee
+          - const: mstar,infinity
+          - const: mstar,infinity3

infinity vs. infinity3? What's the difference? It's generally sufficient to just list a board compatible and a SoC compatible.

Quoted 42 lines
Documentation/devicetree/bindings/vendor-prefixes.yaml +4 -0
index 967e78c5ec0a..1425468188da 100644
@@ -617,6 +617,8 @@ patternProperties:
     description: Microsemi Corporation
   "^msi,.*":
     description: Micro-Star International Co. Ltd.
+  "^mstar,.*":
+    description: MStar Semiconductor, Inc.
   "^mti,.*":
     description: Imagination Technologies Ltd. (formerly MIPS Technologies Inc.)
   "^multi-inno,.*":
@@ -943,6 +945,8 @@ patternProperties:
     description: Three Five Corp
   "^thine,.*":
     description: THine Electronics, Inc.
+  "^thingyjp,.*":
+    description: thingy.jp
   "^ti,.*":
     description: Texas Instruments
   "^tianma,.*":
MAINTAINERS +6 -0
index a69e6db80c79..8b7913c13f9a 100644
@@ -1981,6 +1981,12 @@ L:	[email protected] (moderated for non-subscribers)
 F:	arch/arm/mach-pxa/mioa701.c
 S:	Maintained
 
+ARM/MStar SoC support
+M:	Daniel Palmer <[email protected]>
+L:	[email protected] (moderated for non-subscribers)
+F:	Documentation/devicetree/bindings/arm/mstar.yaml
+S:	Maintained
+
 ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT
 M:	Michael Petchkovsky <[email protected]>
 S:	Maintained
Signature · 1 line
2.23.0
#67 lore raw
Quoted 3 lines · Rob Herring
Quoted 1 line

+# SPDX-License-Identifier: (GPL-2.0+ OR X11)

(GPL-2.0-only OR BSD-2-Clause) is preferred. Any reason to differ?

I used the sunxi file as a template and thought they had some reason to do that. I'll change it to just GPL-2.0.

Quoted 8 lines

Documentation/devicetree/bindings/arm/mstar.yaml line 22

Quoted 5 lines
Documentation/devicetree/bindings/arm/mstar.yaml new file +5 -0
+      - description: thingy.jp BreadBee
+        items:
+          - const: thingyjp,breadbee
+          - const: mstar,infinity
+          - const: mstar,infinity3

infinity vs. infinity3? What's the difference? It's generally sufficient to just list a board compatible and a SoC compatible.

Apart from some very slight differences (max clock speed, different PWM block) they are the same and the PCB for the BreadBee can take either the msc313(i1) or msc313e(i3). My v2 patch will remove the mstar,infinity line from there and move it to a second board called the breadbee-crust to handle the i1 configuration.

Thanks,

Daniel

maintainer
#68 lore raw
Quoted 8 lines · Daniel Palmer
Quoted 3 lines · Rob Herring
Quoted 1 line

+# SPDX-License-Identifier: (GPL-2.0+ OR X11)

(GPL-2.0-only OR BSD-2-Clause) is preferred. Any reason to differ?

I used the sunxi file as a template and thought they had some reason to do that. I'll change it to just GPL-2.0.

That wasn't a choice, but dual license it please.

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Documentation/devicetree/bindings/arm/mstar.yaml new file +5 -0
+      - description: thingy.jp BreadBee
+        items:
+          - const: thingyjp,breadbee
+          - const: mstar,infinity
+          - const: mstar,infinity3
Quoted 7 lines
Quoted 2 lines

infinity vs. infinity3? What's the difference? It's generally sufficient to just list a board compatible and a SoC compatible.

Apart from some very slight differences (max clock speed, different PWM block) they are the same and the PCB for the BreadBee can take either the msc313(i1) or msc313e(i3). My v2 patch will remove the mstar,infinity line from there and move it to a second board called the breadbee-crust to handle the i1 configuration.

Sounds like you want:

items:
- const: thingyjp,breadbee
- enum:
- mstar,infinity
- mstar,infinity3

If one board can do both chips. Though if the same PCB is populated differently beyond the SoC, then maybe 2 board compatibles makes sense.

Why not use the part numbers (msc313...)?

Rob

#69 lore raw
Quoted 4 lines · Rob Herring
Quoted 2 lines

I used the sunxi file as a template and thought they had some reason to do that. I'll change it to just GPL-2.0.

That wasn't a choice, but dual license it please.

Will do.

Quoted 11 lines

Sounds like you want:

items:
- const: thingyjp,breadbee
- enum:
- mstar,infinity
- mstar,infinity3

If one board can do both chips. Though if the same PCB is populated differently beyond the SoC, then maybe 2 board compatibles makes sense.

You can take one chip off and swap it with the other without any PCB/component changes but as I've been working on both chips there are a few differences coming up that means you can't use the same DT for both configurations. For example the ethernet phy needs to be configured differently, the i1 SoC has less instances of the DMA controller blocks and so on.

The version of the chip can be detected from a register and I had considered patching over the differences based on that but I couldn't find an example of doing it within the kernel. So I'm detecting the chip version in u-boot and loading the right DT there.

Quoted 1 line

Why not use the part numbers (msc313...)?

I had initially done that when I thought i1 was the msc31e and i3 was the msc313e. For the i1 the only part I have found so far is the msc313 but the i3 is a series of around 4 or 5 different configurations of the same SoC with differing amounts of DDR and pins. This is like the AllWinner V3S and S3/S3L where the same V3 SoC is packaged differently. As there is no source of this information that appears on a google search I've started documenting it at http://linux-chenxing.org/

I think the only place the actual chip model will need to be used will be a compatible string for the pinctrl driver to setup the right pin numbers.

Thanks,

Daniel