* [PATCH v3 0/8] Introduce Black Sesame Technologies C1200 SoC and CDCU1.0 board
@ 2025-08-12 12:31 Albert Yang
2025-08-12 12:31 ` [PATCH v3 1/8] dt-bindings: vendor-prefixes: Add Black Sesame Technologies Co., Ltd Albert Yang
` (7 more replies)
0 siblings, 8 replies; 24+ messages in thread
From: Albert Yang @ 2025-08-12 12:31 UTC (permalink / raw)
To: krzk, robh, krzk+dt, conor+dt, ulf.hansson, catalin.marinas, will,
arnd, adrian.hunter, robin.murphy, ding.wang, gordon.ge
Cc: bst-upstream, linux-arm-kernel, devicetree, linux-mmc, soc,
linux-kernel, Albert Yang
Black Sesame Technologies C1200 is a high-performance Armv8 SoC designed for automotive
and industrial applications. The CDCU1.0 (Central Domain Control Unit) board is the
development platform built by Black Sesame Technologies. You can find more information
about the SoC and related boards at:
https://bst.ai
Currently, to run the upstream kernel on the CDCU1.0 board, you need to use the
bootloader provided by Black Sesame Technologies. The board supports various
interfaces including MMC/SD card, which is implemented using the BST C1200 DWCMSHC
SDHCI controller.
In this series, we add initial SoC and board support for kernel building. The series
includes:
Patch 1: Add Black Sesame Technologies vendor prefix in vendor-prefixes.yaml
- Adds "bst" vendor prefix for Black Sesame Technologies Co., Ltd.
- Required for device tree bindings to properly identify BST hardware
Patch 2: Add device tree bindings for BST SoC platforms
- Creates new binding file Documentation/devicetree/bindings/arm/bst.yaml
- Defines compatible strings for BST C1200 family and C1200 CDCU1.0 board
- Documents BST's focus on automotive-grade SoCs for ADAS applications
Patch 3: Add ARCH_BST configuration for BST silicon support
- Adds Kconfig option for BST architecture support
- Enables building kernel for BST platforms
Patch 4: Add device tree binding for BST DWCMSHC SDHCI controller
- Documents the BST C1200 SDHCI controller binding
- Required for MMC/SD card support on BST platforms
Patch 5: Add BST C1200 SDHCI controller driver
- Implements the MMC host controller driver for BST C1200
- Enables SD card support on BST platforms
Patch 6: Add device tree support for BST C1200 CDCU1.0 board
- Adds device tree source files for C1200 SoC and CDCU1.0 board
- Configures hardware components including MMC controller
Patch 7: Enable BST Soc And C1200 DWCMSHC controller in defconfig
- Enables MMC controller driver in default arm64 config
Patch 8: Update MAINTAINERS for BST support
- Adds maintainer information for BST ARM SoC support
- Consolidates BST-related entries
Changes for v3:
- Patch 1:
- No changes
- Patch 2:
- Add Signed-off-by: Ge Gordon
- Patch 3:
- Reword subject from "for bst silicons" to "for Black Sesame Technologies SoCs"
- drop unrelated whitespace hunk
- Patch 4:
- Switch reg schema from maxItems to explicit items with per-entry descriptions
- Improve example: add irq.h include and wrap under a bus node with address/size cells
- Drop status = "disabled" from example; keep example concise
- Add Signed-off-by: Ge Gordon
- Patch 5:
- Code improvements based on review feedback:
- Simplified dwcmshc_priv structure by removing unused fields
- Improved helper functions with better encapsulation
- Used devm_platform_ioremap_resource() for resource management
- Updated Kconfig description and alphabetical ordering
- clarify documentation on hardware limitations and bounce buffer approach
- remove duplicate sdhci_writew SDHCI_CLOCK_CONTROL
- Patch 6:
- Split defconfig enablement out into a dedicated defconfig patch
- Refine memory description: consolidate ranges in memory node and delele unused memory ranges
- Adjust the order of nodes
- remove mask of gic
- Patch 7:
- Also enable CONFIG_ARCH_BST in arm64 defconfig (in addition to CONFIG_MMC_SDHCI_BST)
- Patch 8:
- No changes
Changes for v2:
- Pass dts build check and mmc driver build check with below commands:
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=build_dir CHECK_DTBS=y bst/bstc1200-cdcu1.0-adas_4c2g.dtb W=1
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- drivers/mmc/host/ W=1 O=build_dir
- Patch 2:
1. Removed unnecessary pipe (`|`) in description
2. Dropped invalid `compatible` entry for standalone SoC
3. Removed root node (`$nodename: '/'`) definition
- Patch 3:
1. Placed the configuration entry in correct alphabetical order
2. Used generic family name (ARCH_BST) instead of SoC-specific naming
3. Followed upstream kernel naming and description conventions
- Patch 4:
1. Simplified description, removed redundant paragraphs
2. Updated $schema to reference mmc-specific scheme
3. Corrected compatible to add soc name
(bst,c1200-dwcmshc-sdhci)
4. Removed all redundant property descriptions
5. Dropped invalid mmc_crm_base/size properties, use reg for all address
ranges
6. Cleaned up required properties to only essential entries
7. Standardized example DTS format, fixed reg syntax and property
ordering
8. Removed additionalProperties: true
- Patch 5:
1. Dependency Simplification:
- Removed COMMON_CLK dependency from Kconfig (MMC_SDHCI_BST)
- Add ARCH_BST || COMPILE_TES dependency from Kconfig (MMC_SDHCI_BST)
2. Resource Management Improvements:
- Replaced temporary ioremap with persistent mapping
* Mapped CRM registers once during probe instead of per-access
* Added proper cleanup in remove callback
- Refactored bounce buffer allocation:
* Simplified error handling and memory management
* Removed unnecessary DMA configuration layers
3. Code Cleanup & Optimization:
- Pruned unused headers and legacy vendor debug code
- Removed deprecated sdhci_bst_print_vendor() export
- Converted internal functions to static scope
- Standardized naming conventions:
* Renamed DRIVER_NAME to match kernel standards
* Changed default_max_freq to DEFAULT_MAX_FREQ
- Optimized clock configuration routines
4. Hardware Integration Fixes:
- Fixed register access macros for EMMC_CTRL
* Added proper offset calculation via SDHCI_VENDOR_PTR_R
- Corrected device tree compatibility string to:
"bst,c1200-dwcmshc-sdhci"
5. Error Handling Enhancements:
- Added robust ioremap error checking
- Improved bounce buffer allocation failure handling
- Streamlined probe/remove flow
6. Maintainability:
- Updated MODULE_DESCRIPTION and AUTHOR fields
- Added explanatory comments for hardware limitations
- Removed redundant multi-host setup infrastructure
7. fix build warnings from lkp
| Reported-by: kernel test robot <lkp@intel.com>
| Closes:
https://lore.kernel.org/oe-kbuild-all/202505290615.GZzN5rNL-lkp@intel.com/
- Patch 6:
1. Reorganized memory map into discrete regions
2. Updated MMC controller definition:
- Split into core/CRM register regions
- Removed deprecated properties
- Updated compatible string
3. Standardized interrupt definitions and numeric formats
4. Removed reserved-memory node (superseded by bounce buffers)
5. Added root compatible string for platform identification
6. Add soc defconfig
Albert Yang (8):
dt-bindings: vendor-prefixes: Add Black Sesame Technologies Co., Ltd.
dt-bindings: arm: add Black Sesame Technologies (bst) SoC
arm64: Kconfig: add ARCH_BST for Black Sesame Technologies SoCs
dt-bindings: mmc: add binding for BST DWCMSHC SDHCI controller
mmc: sdhci: add Black Sesame Technologies BST C1200 controller driver
arm64: dts: bst: add support for Black Sesame Technologies C1200
CDCU1.0 board
arm64: defconfig: enable BST platform and SDHCI controller support
MAINTAINERS: add and consolidate Black Sesame Technologies (BST) ARM
SoC support
.../devicetree/bindings/arm/bst.yaml | 31 ++
.../bindings/mmc/bst,dwcmshc-sdhci.yaml | 70 +++
.../devicetree/bindings/vendor-prefixes.yaml | 2 +
MAINTAINERS | 10 +
arch/arm64/Kconfig.platforms | 8 +
arch/arm64/boot/dts/Makefile | 1 +
arch/arm64/boot/dts/bst/Makefile | 2 +
.../dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts | 42 ++
arch/arm64/boot/dts/bst/bstc1200.dtsi | 117 ++++
arch/arm64/configs/defconfig | 2 +
drivers/mmc/host/Kconfig | 14 +
drivers/mmc/host/Makefile | 1 +
drivers/mmc/host/sdhci-of-bst-c1200.c | 510 ++++++++++++++++++
13 files changed, 810 insertions(+)
create mode 100644 Documentation/devicetree/bindings/arm/bst.yaml
create mode 100644 Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml
create mode 100644 arch/arm64/boot/dts/bst/Makefile
create mode 100644 arch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts
create mode 100644 arch/arm64/boot/dts/bst/bstc1200.dtsi
create mode 100644 drivers/mmc/host/sdhci-of-bst-c1200.c
--
2.43.0
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH v3 1/8] dt-bindings: vendor-prefixes: Add Black Sesame Technologies Co., Ltd.
2025-08-12 12:31 [PATCH v3 0/8] Introduce Black Sesame Technologies C1200 SoC and CDCU1.0 board Albert Yang
@ 2025-08-12 12:31 ` Albert Yang
2025-08-12 13:34 ` Krzysztof Kozlowski
2025-08-12 12:31 ` [PATCH v3 2/8] dt-bindings: arm: add Black Sesame Technologies (bst) SoC Albert Yang
` (6 subsequent siblings)
7 siblings, 1 reply; 24+ messages in thread
From: Albert Yang @ 2025-08-12 12:31 UTC (permalink / raw)
To: krzk, robh, krzk+dt, conor+dt, ulf.hansson, catalin.marinas, will,
arnd, adrian.hunter, robin.murphy, ding.wang, gordon.ge
Cc: bst-upstream, linux-arm-kernel, devicetree, linux-mmc, soc,
linux-kernel, Albert Yang
Black Sesame Technologies Co., Ltd.s a leading automotive-grade
computing SoC and SoC-based
intelligent vehicle solution provider. Link: https://bst.ai/.
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Ge Gordon <gordon.ge@bst.ai>
Signed-off-by: Albert Yang <yangzh0906@thundersoft.com>
---
Changes for v3:
- No changes
Changes for v2:
- No changes
---
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 5d2a7a8d3ac6..3c2031417232 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -222,6 +222,8 @@ patternProperties:
description: Shenzhen BigTree Tech Co., LTD
"^bitmain,.*":
description: Bitmain Technologies
+ "^bst,.*":
+ description: Black Sesame Technologies Co., Ltd.
"^blaize,.*":
description: Blaize, Inc.
"^blutek,.*":
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v3 2/8] dt-bindings: arm: add Black Sesame Technologies (bst) SoC
2025-08-12 12:31 [PATCH v3 0/8] Introduce Black Sesame Technologies C1200 SoC and CDCU1.0 board Albert Yang
2025-08-12 12:31 ` [PATCH v3 1/8] dt-bindings: vendor-prefixes: Add Black Sesame Technologies Co., Ltd Albert Yang
@ 2025-08-12 12:31 ` Albert Yang
2025-08-12 13:35 ` Krzysztof Kozlowski
2025-08-12 12:31 ` [PATCH v3 3/8] arm64: Kconfig: add ARCH_BST for Black Sesame Technologies SoCs Albert Yang
` (5 subsequent siblings)
7 siblings, 1 reply; 24+ messages in thread
From: Albert Yang @ 2025-08-12 12:31 UTC (permalink / raw)
To: krzk, robh, krzk+dt, conor+dt, ulf.hansson, catalin.marinas, will,
arnd, adrian.hunter, robin.murphy, ding.wang, gordon.ge
Cc: bst-upstream, linux-arm-kernel, devicetree, linux-mmc, soc,
linux-kernel, Albert Yang
Add device tree bindings for Black Sesame Technologies Arm SoC,
it consists several SoC models like C1200, etc.
Signed-off-by: Ge Gordon <gordon.ge@bst.ai>
Signed-off-by: Albert Yang <yangzh0906@thundersoft.com>
---
Changes for v3:
- Add Signed-off-by: Ge Gordon
Changes for v2:
- Removed unnecessary pipe (`|`) in description
- Dropped invalid `compatible` entry for standalone SoC
- Removed root node (`$nodename: '/'`) definition
---
.../devicetree/bindings/arm/bst.yaml | 31 +++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 Documentation/devicetree/bindings/arm/bst.yaml
diff --git a/Documentation/devicetree/bindings/arm/bst.yaml b/Documentation/devicetree/bindings/arm/bst.yaml
new file mode 100644
index 000000000000..a3a7f424fd57
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/bst.yaml
@@ -0,0 +1,31 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/bst.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: BST platforms
+
+description:
+ Black Sesame Technologies (BST) is a semiconductor company that produces
+ automotive-grade system-on-chips (SoCs) for intelligent driving, focusing
+ on computer vision and AI capabilities. The BST C1200 family includes SoCs
+ for ADAS (Advanced Driver Assistance Systems) and autonomous driving
+ applications.
+
+maintainers:
+ - Ge Gordon <gordon.ge@bst.ai>
+
+properties:
+ $nodename:
+ const: '/'
+ compatible:
+ oneOf:
+ - description: BST C1200 CDCU1.0 ADAS 4C2G board
+ items:
+ - const: bst,c1200-cdcu1.0-adas-4c2g
+ - const: bst,c1200
+
+additionalProperties: true
+
+...
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v3 3/8] arm64: Kconfig: add ARCH_BST for Black Sesame Technologies SoCs
2025-08-12 12:31 [PATCH v3 0/8] Introduce Black Sesame Technologies C1200 SoC and CDCU1.0 board Albert Yang
2025-08-12 12:31 ` [PATCH v3 1/8] dt-bindings: vendor-prefixes: Add Black Sesame Technologies Co., Ltd Albert Yang
2025-08-12 12:31 ` [PATCH v3 2/8] dt-bindings: arm: add Black Sesame Technologies (bst) SoC Albert Yang
@ 2025-08-12 12:31 ` Albert Yang
2025-08-12 12:31 ` [PATCH v3 4/8] dt-bindings: mmc: add binding for BST DWCMSHC SDHCI controller Albert Yang
` (4 subsequent siblings)
7 siblings, 0 replies; 24+ messages in thread
From: Albert Yang @ 2025-08-12 12:31 UTC (permalink / raw)
To: krzk, robh, krzk+dt, conor+dt, ulf.hansson, catalin.marinas, will,
arnd, adrian.hunter, robin.murphy, ding.wang, gordon.ge
Cc: bst-upstream, linux-arm-kernel, devicetree, linux-mmc, soc,
linux-kernel, Albert Yang
Add ARCH_BST configuration option to enable support for Black Sesame
Technologies SoC family. BST produces automotive-grade system-on-chips
for intelligent driving, focusing on computer vision and AI capabilities.
The BST C1200 family includes SoCs for ADAS and autonomous driving
applications.
Signed-off-by: Ge Gordon <gordon.ge@bst.ai>
Signed-off-by: Albert Yang <yangzh0906@thundersoft.com>
---
Changes for v3:
- Reword subject from "for bst silicons" to "for Black Sesame Technologies
SoCs"
- drop unrelated whitespace hunk
Changes for v2:
- Placed the configuration entry in correct alphabetical order
- Used generic family name (ARCH_BST) instead of SoC-specific naming
- Followed upstream kernel naming and description conventions
---
arch/arm64/Kconfig.platforms | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index a541bb029aa4..b078b70ded0c 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -106,6 +106,14 @@ config ARCH_BLAIZE
help
This enables support for the Blaize SoC family
+config ARCH_BST
+ bool "Black Sesame Technologies SoC Family"
+ help
+ This enables support for Black Sesame Technologies (BST) SoC family.
+ BST produces automotive-grade system-on-chips for intelligent driving,
+ focusing on computer vision and AI capabilities. The BST C1200 family
+ includes SoCs for ADAS and autonomous driving applications.
+
config ARCH_EXYNOS
bool "Samsung Exynos SoC family"
select COMMON_CLK_SAMSUNG
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v3 4/8] dt-bindings: mmc: add binding for BST DWCMSHC SDHCI controller
2025-08-12 12:31 [PATCH v3 0/8] Introduce Black Sesame Technologies C1200 SoC and CDCU1.0 board Albert Yang
` (2 preceding siblings ...)
2025-08-12 12:31 ` [PATCH v3 3/8] arm64: Kconfig: add ARCH_BST for Black Sesame Technologies SoCs Albert Yang
@ 2025-08-12 12:31 ` Albert Yang
2025-08-14 8:50 ` Krzysztof Kozlowski
2025-08-12 12:31 ` [PATCH v3 5/8] mmc: sdhci: add Black Sesame Technologies BST C1200 controller driver Albert Yang
` (3 subsequent siblings)
7 siblings, 1 reply; 24+ messages in thread
From: Albert Yang @ 2025-08-12 12:31 UTC (permalink / raw)
To: krzk, robh, krzk+dt, conor+dt, ulf.hansson, catalin.marinas, will,
arnd, adrian.hunter, robin.murphy, ding.wang, gordon.ge
Cc: bst-upstream, linux-arm-kernel, devicetree, linux-mmc, soc,
linux-kernel, Albert Yang
Add device tree binding documentation for the Black Sesame Technologies
(BST) DWCMSHC SDHCI controller.
This binding describes the required and optional properties for the
bst,c1200-dwcmshc-sdhci compatible controller, including register layout,
interrupts, bus width, clock configuration, and other controller-specific
features.
Signed-off-by: Ge Gordon <gordon.ge@bst.ai>
Signed-off-by: Albert Yang <yangzh0906@thundersoft.com>
---
Changes for v3:
- Switch reg schema from maxItems to explicit items with per-entry
descriptions
- Improve example: add irq.h include and wrap under a bus node with
address/size cells
- Drop status = "disabled" from example; keep example concise
- Add Signed-off-by: Ge Gordon
Changes for v2:
- Simplified description, removed redundant paragraphs
- Updated $schema to reference mmc-specific scheme
- Corrected compatible to add soc name
(bst,c1200-dwcmshc-sdhci)
- Removed all redundant property descriptions
- Dropped invalid mmc_crm_base/size properties, use reg for all address
ranges
- Cleaned up required properties to only essential entries
- Standardized example DTS format, fixed reg syntax and property
ordering
- Removed additionalProperties: true
---
.../bindings/mmc/bst,dwcmshc-sdhci.yaml | 70 +++++++++++++++++++
1 file changed, 70 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml
diff --git a/Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml b/Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml
new file mode 100644
index 000000000000..aa72ce60259f
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mmc/bst,dwcmshc-sdhci.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Black Sesame Technologies DWCMSHC SDHCI Controller
+
+maintainers:
+ - Ge Gordon <gordon.ge@bst.ai>
+
+allOf:
+ - $ref: mmc-controller.yaml#
+
+properties:
+ compatible:
+ const: bst,c1200-dwcmshc-sdhci
+
+ reg:
+ items:
+ - description: Core SDHCI registers
+ - description: CRM registers
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ items:
+ - const: core
+
+ memory-region:
+ maxItems: 1
+
+ dma-coherent: true
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ bus {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ mmc@22200000 {
+ compatible = "bst,c1200-dwcmshc-sdhci";
+ reg = <0x0 0x22200000 0x0 0x1000>,
+ <0x0 0x23006000 0x0 0x1000>;
+ interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk_mmc>;
+ clock-names = "core";
+ memory-region = <&mmc0_reserved>;
+ max-frequency = <200000000>;
+ bus-width = <8>;
+ non-removable;
+ dma-coherent;
+ };
+ };
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v3 5/8] mmc: sdhci: add Black Sesame Technologies BST C1200 controller driver
2025-08-12 12:31 [PATCH v3 0/8] Introduce Black Sesame Technologies C1200 SoC and CDCU1.0 board Albert Yang
` (3 preceding siblings ...)
2025-08-12 12:31 ` [PATCH v3 4/8] dt-bindings: mmc: add binding for BST DWCMSHC SDHCI controller Albert Yang
@ 2025-08-12 12:31 ` Albert Yang
2025-08-18 10:48 ` Ulf Hansson
2025-08-18 18:16 ` Adrian Hunter
2025-08-12 12:31 ` [PATCH v3 6/8] arm64: dts: bst: add support for Black Sesame Technologies C1200 CDCU1.0 board Albert Yang
` (2 subsequent siblings)
7 siblings, 2 replies; 24+ messages in thread
From: Albert Yang @ 2025-08-12 12:31 UTC (permalink / raw)
To: krzk, robh, krzk+dt, conor+dt, ulf.hansson, catalin.marinas, will,
arnd, adrian.hunter, robin.murphy, ding.wang, gordon.ge
Cc: bst-upstream, linux-arm-kernel, devicetree, linux-mmc, soc,
linux-kernel, Albert Yang
Add SDHCI controller driver for Black Sesame Technologies C1200 SoC.
This driver supports the DWCMSHC SDHCI controller with BST-specific
enhancements including:
- Custom clock management and tuning
- Power management support
- BST-specific register configurations
- Support for eMMC and SD card interfaces
- Hardware limitation workaround for 32-bit DMA addressing
The driver addresses specific hardware constraints where:
- System memory uses 64-bit bus, eMMC controller uses 32-bit bus
- eMMC controller cannot access memory through SMMU due to hardware bug
- All system DRAM is configured outside 4GB boundary (ZONE_DMA32)
- Uses SRAM-based bounce buffer within 32-bit address space
Signed-off-by: Ge Gordon <gordon.ge@bst.ai>
Signed-off-by: Albert Yang <yangzh0906@thundersoft.com>
---
Change for v3:
Code improvements based on review feedback:
- Simplified dwcmshc_priv structure by removing unused fields
- Improved helper functions with better encapsulation
- Used devm_platform_ioremap_resource() for resource management
- Updated Kconfig description and alphabetical ordering
- clarify documentation on hardware limitations and bounce buffer
approach
- remove duplicate sdhci_writew SDHCI_CLOCK_CONTROL
Changes for v2:
1. Dependency Simplification :
- Removed COMMON_CLK dependency from Kconfig (MMC_SDHCI_BST)
- Add ARCH_BST || COMPILE_TEST dependency from Kconfig (MMC_SDHCI_BST)
2. Resource Management Improvements :
- Replaced temporary ioremap with persistent mapping
* Mapped CRM registers once during probe instead of per-access
* Added proper cleanup in remove callback
- Refactored bounce buffer allocation:
* Simplified error handling and memory management
* Removed unnecessary DMA configuration layers
3. Code Cleanup & Optimization :
- Pruned unused headers and legacy vendor debug code
- Removed deprecated sdhci_bst_print_vendor() export
- Converted internal functions to static scope
- Standardized naming conventions:
* Renamed DRIVER_NAME to match kernel standards
* Changed default_max_freq to DEFAULT_MAX_FREQ
- Optimized clock configuration routines
4. Hardware Integration Fixes :
- Fixed register access macros for EMMC_CTRL
* Added proper offset calculation via SDHCI_VENDOR_PTR_R
- Corrected device tree compatibility string to:
"bst,c1200-dwcmshc-sdhci"
5. Error Handling Enhancements :
- Added robust ioremap error checking
- Improved bounce buffer allocation failure handling
- Streamlined probe/remove flow
6. Maintainability :
- Updated MODULE_DESCRIPTION and AUTHOR fields
- Added explanatory comments for hardware limitations
- Removed redundant multi-host setup infrastructure
7. fix build warnings from lkp
| Reported-by: kernel test robot <lkp@intel.com>
| Closes:
https://lore.kernel.org/oe-kbuild-all/202505290615.GZzN5rNL-lkp@intel.com/
---
drivers/mmc/host/Kconfig | 14 +
drivers/mmc/host/Makefile | 1 +
drivers/mmc/host/sdhci-of-bst-c1200.c | 510 ++++++++++++++++++++++++++
3 files changed, 525 insertions(+)
create mode 100644 drivers/mmc/host/sdhci-of-bst-c1200.c
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index c3f0f41a426d..fb057c46949b 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -429,6 +429,20 @@ config MMC_SDHCI_BCM_KONA
If you have a controller with this interface, say Y or M here.
+config MMC_SDHCI_BST
+ tristate "SDHCI support for Black Sesame Technologies BST C1200 controller"
+ depends on ARCH_BST || COMPILE_TEST
+ depends on MMC_SDHCI_PLTFM
+ depends on OF
+ help
+ This selects the Secure Digital Host Controller Interface (SDHCI)
+ for Black Sesame Technologies BST C1200 SoC. The controller is
+ based on Synopsys DesignWare Cores Mobile Storage Controller but
+ requires platform-specific workarounds for hardware limitations.
+
+ If you have a controller with this interface, say Y or M here.
+ If unsure, say N.
+
config MMC_SDHCI_F_SDH30
tristate "SDHCI support for Fujitsu Semiconductor F_SDH30"
depends on MMC_SDHCI_PLTFM
diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
index 75bafc7b162b..bb5df05c3174 100644
--- a/drivers/mmc/host/Makefile
+++ b/drivers/mmc/host/Makefile
@@ -13,6 +13,7 @@ obj-$(CONFIG_MMC_MXS) += mxs-mmc.o
obj-$(CONFIG_MMC_SDHCI) += sdhci.o
obj-$(CONFIG_MMC_SDHCI_UHS2) += sdhci-uhs2.o
obj-$(CONFIG_MMC_SDHCI_PCI) += sdhci-pci.o
+obj-$(CONFIG_MMC_SDHCI_BST) += sdhci-of-bst-c1200.o
sdhci-pci-y += sdhci-pci-core.o sdhci-pci-o2micro.o sdhci-pci-arasan.o \
sdhci-pci-dwc-mshc.o sdhci-pci-gli.o
obj-$(CONFIG_MMC_SDHCI_ACPI) += sdhci-acpi.o
diff --git a/drivers/mmc/host/sdhci-of-bst-c1200.c b/drivers/mmc/host/sdhci-of-bst-c1200.c
new file mode 100644
index 000000000000..6d2ba4232306
--- /dev/null
+++ b/drivers/mmc/host/sdhci-of-bst-c1200.c
@@ -0,0 +1,510 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Black Sesame Technologies SDHCI driver
+ *
+ * Copyright (C) 2024 Black Sesame Technologies. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <linux/delay.h>
+#include <linux/dma-mapping.h>
+#include <linux/ioport.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_reserved_mem.h>
+#include <linux/platform_device.h>
+#include "sdhci.h"
+#include "sdhci-pltfm.h"
+
+struct dwcmshc_priv {
+ void __iomem *crm_reg_base;
+};
+
+#define SDHCI_CLOCK_PLL_EN 0x0008
+#define SDHCI_TUNING_COUNT 0x20
+#define SDHCI_VENDOR_PTR_R 0xE8
+#define MBIU_CTRL 0x510
+#define BURST_INCR16_EN BIT(3)
+#define BURST_INCR8_EN BIT(2)
+#define BURST_INCR4_EN BIT(1)
+#define BURST_EN (BURST_INCR16_EN | BURST_INCR8_EN | BURST_INCR4_EN)
+
+/* Synopsys vendor specific registers */
+#define SDHC_EMMC_CTRL_R_OFFSET 0x2C
+
+#define SDEMMC_CRM_BCLK_DIV_CTRL 0x08
+#define SDEMMC_CRM_RX_CLK_CTRL 0x14
+#define SDEMMC_CRM_TIMER_DIV_CTRL 0x0C
+#define SDEMMC_CRM_VOL_CTRL 0x1C
+#define REG_WR_PROTECT 0x88
+#define REG_WR_PROTECT_KEY 0x1234abcd
+#define DELAY_CHAIN_SEL 0x94
+#define BST_VOL_STABLE_ON BIT(7)
+#define DEFAULT_MAX_FREQ 200000UL
+
+static u32 bst_crm_read(struct sdhci_pltfm_host *pltfm_host, u32 offset)
+{
+ struct dwcmshc_priv *priv = sdhci_pltfm_priv(pltfm_host);
+
+ return ioread32(priv->crm_reg_base + offset);
+}
+
+static void bst_crm_write(struct sdhci_pltfm_host *pltfm_host, u32 offset, u32 value)
+{
+ struct dwcmshc_priv *priv = sdhci_pltfm_priv(pltfm_host);
+
+ iowrite32(value, priv->crm_reg_base + offset);
+}
+
+static unsigned int bst_get_max_clock(struct sdhci_host *host)
+{
+ return host->mmc->f_max;
+}
+
+static unsigned int bst_get_min_clock(struct sdhci_host *host)
+{
+ return host->mmc->f_min;
+}
+
+struct rx_ctrl {
+ struct {
+ u32 rx_revert:1;
+ u32 rx_clk_sel_sec:1;
+ u32 rx_clk_div:4;
+ u32 rx_clk_phase_inner:2;
+ u32 rx_clk_sel_first:1;
+ u32 rx_clk_phase_out:2;
+ u32 rx_clk_en:1;
+ u32 res0:20;
+ } bit;
+ u32 reg;
+};
+
+struct sdmmc_iocfg {
+ struct {
+ u32 res0:16;
+ u32 SC_SDMMC0_PVDD18POCSD0:2;
+ u32 SC_SDMMC0_PVDD18POCSD1:2;
+ u32 SC_SDMMC0_PVDD18POCSD2:2;
+ u32 SC_SDMMC1_PVDD18POCSD0:2;
+ u32 SC_SDMMC1_PVDD18POCSD1:2;
+ u32 SC_SDMMC1_PVDD18POCSD2:2;
+ u32 res1:4;
+ } bit;
+ u32 reg;
+};
+
+static void sdhci_enable_bst_clk(struct sdhci_host *host, unsigned int clk)
+{
+ struct sdhci_pltfm_host *pltfm_host;
+ unsigned int div;
+ u32 val;
+ struct rx_ctrl rx_reg;
+
+ pltfm_host = sdhci_priv(host);
+ if (clk == 0) {
+ div = clk;
+ } else if (clk > DEFAULT_MAX_FREQ) {
+ div = clk / 1000;
+ div = DEFAULT_MAX_FREQ / div;
+ } else if (clk < 1500) {
+ div = clk;
+ } else {
+ div = DEFAULT_MAX_FREQ * 100;
+ div = div / clk;
+ div /= 100;
+ }
+
+ clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
+ clk &= ~SDHCI_CLOCK_CARD_EN;
+ sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL);
+
+ clk &= ~SDHCI_CLOCK_PLL_EN;
+ sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL);
+
+ val = bst_crm_read(pltfm_host, SDEMMC_CRM_TIMER_DIV_CTRL);
+ val &= ~BIT(8);
+ bst_crm_write(pltfm_host, SDEMMC_CRM_TIMER_DIV_CTRL, val);
+
+ val = bst_crm_read(pltfm_host, SDEMMC_CRM_TIMER_DIV_CTRL);
+ val &= ~0xff;
+ val |= 0x20;
+ bst_crm_write(pltfm_host, SDEMMC_CRM_TIMER_DIV_CTRL, val);
+
+ val = bst_crm_read(pltfm_host, SDEMMC_CRM_TIMER_DIV_CTRL);
+ val |= BIT(8);
+ bst_crm_write(pltfm_host, SDEMMC_CRM_TIMER_DIV_CTRL, val);
+
+ val = bst_crm_read(pltfm_host, SDEMMC_CRM_RX_CLK_CTRL);
+ val &= ~BIT(11);
+ bst_crm_write(pltfm_host, SDEMMC_CRM_RX_CLK_CTRL, val);
+
+ rx_reg.reg = bst_crm_read(pltfm_host, SDEMMC_CRM_RX_CLK_CTRL);
+
+ rx_reg.bit.rx_revert = 0;
+ rx_reg.bit.rx_clk_sel_sec = 1;
+ rx_reg.bit.rx_clk_div = 4;
+ rx_reg.bit.rx_clk_phase_inner = 2;
+ rx_reg.bit.rx_clk_sel_first = 0;
+ rx_reg.bit.rx_clk_phase_out = 2;
+
+ bst_crm_write(pltfm_host, SDEMMC_CRM_RX_CLK_CTRL, rx_reg.reg);
+
+ val = bst_crm_read(pltfm_host, SDEMMC_CRM_RX_CLK_CTRL);
+ val |= BIT(11);
+ bst_crm_write(pltfm_host, SDEMMC_CRM_RX_CLK_CTRL, val);
+
+ /* Disable clock first */
+ val = bst_crm_read(pltfm_host, SDEMMC_CRM_BCLK_DIV_CTRL);
+ val &= ~BIT(10);
+ bst_crm_write(pltfm_host, SDEMMC_CRM_BCLK_DIV_CTRL, val);
+
+ /* Setup clock divider */
+ val = bst_crm_read(pltfm_host, SDEMMC_CRM_BCLK_DIV_CTRL);
+ val &= ~GENMASK(9, 0);
+ val |= div;
+ bst_crm_write(pltfm_host, SDEMMC_CRM_BCLK_DIV_CTRL, val);
+
+ /* Enable clock */
+ val = bst_crm_read(pltfm_host, SDEMMC_CRM_BCLK_DIV_CTRL);
+ val |= BIT(10);
+ bst_crm_write(pltfm_host, SDEMMC_CRM_BCLK_DIV_CTRL, val);
+
+ sdhci_writew(host, (div & 0xff) << 8, SDHCI_CLOCK_CONTROL);
+
+ clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
+ clk |= SDHCI_CLOCK_PLL_EN;
+ sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL);
+
+ clk |= SDHCI_CLOCK_CARD_EN;
+ sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL);
+
+ clk |= SDHCI_CLOCK_INT_EN;
+ sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL);
+}
+
+static void sdhci_set_bst_clock(struct sdhci_host *host, unsigned int clock)
+{
+ if (clock == 0)
+ return;
+ sdhci_enable_bst_clk(host, clock);
+}
+
+/**
+ * sdhci_bst_reset - Reset the SDHCI host controller
+ * @host: SDHCI host controller
+ * @mask: Reset mask
+ *
+ * Performs a reset of the SDHCI host controller with special handling for eMMC.
+ */
+static void sdhci_bst_reset(struct sdhci_host *host, u8 mask)
+{
+ u16 vendor_ptr, emmc_ctrl_reg;
+
+ if (host->mmc->caps2 & MMC_CAP2_NO_SD) {
+ vendor_ptr = sdhci_readw(host, SDHCI_VENDOR_PTR_R);
+ emmc_ctrl_reg = vendor_ptr + SDHC_EMMC_CTRL_R_OFFSET;
+
+ sdhci_writew(host,
+ sdhci_readw(host, emmc_ctrl_reg) & (~BIT(2)),
+ emmc_ctrl_reg);
+ sdhci_reset(host, mask);
+ usleep_range(10, 20);
+ sdhci_writew(host,
+ sdhci_readw(host, emmc_ctrl_reg) | BIT(2),
+ emmc_ctrl_reg);
+ } else {
+ sdhci_reset(host, mask);
+ }
+}
+
+/**
+ * sdhci_bst_timeout - Set timeout value for commands
+ * @host: SDHCI host controller
+ * @cmd: MMC command
+ *
+ * Sets the timeout control register to maximum value (0xE).
+ */
+static void sdhci_bst_timeout(struct sdhci_host *host, struct mmc_command *cmd)
+{
+ sdhci_writeb(host, 0xE, SDHCI_TIMEOUT_CONTROL);
+}
+
+/**
+ * sdhci_bst_set_power - Set power mode and voltage
+ * @host: SDHCI host controller
+ * @mode: Power mode to set
+ * @vdd: Voltage to set
+ *
+ * Sets power mode and voltage, also configures MBIU control register.
+ */
+static void sdhci_bst_set_power(struct sdhci_host *host, unsigned char mode,
+ unsigned short vdd)
+{
+ sdhci_set_power(host, mode, vdd);
+ sdhci_writeb(host, 0xF, SDHCI_POWER_CONTROL);
+ sdhci_writew(host,
+ (sdhci_readw(host, MBIU_CTRL) & (~0xf)) | BURST_EN,
+ MBIU_CTRL);
+}
+
+/**
+ * bst_sdhci_execute_tuning - Execute tuning procedure
+ * @host: SDHCI host controller
+ * @opcode: Opcode to use for tuning
+ *
+ * Performs tuning procedure by trying different values and selecting the best one.
+ *
+ * Return: 0 on success, negative errno on failure
+ */
+static int bst_sdhci_execute_tuning(struct sdhci_host *host, u32 opcode)
+{
+ struct sdhci_pltfm_host *pltfm_host;
+ unsigned int clk = 0, timeout;
+ int ret = 0, error;
+ int start0 = -1, end0 = -1, best = 0;
+ int start1 = -1, end1 = -1, flag = 0;
+ int i;
+
+ pltfm_host = sdhci_priv(host);
+
+ for (i = 0; i < SDHCI_TUNING_COUNT; i++) {
+ /* Protected write */
+ bst_crm_write(pltfm_host, REG_WR_PROTECT, REG_WR_PROTECT_KEY);
+ /* Write tuning value */
+ bst_crm_write(pltfm_host, DELAY_CHAIN_SEL, (1ul << i) - 1);
+
+ timeout = 20;
+ while (!((clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL)) &
+ SDHCI_CLOCK_INT_STABLE)) {
+ if (timeout == 0) {
+ dev_err(mmc_dev(host->mmc), "Internal clock never stabilised\n");
+ return -EBUSY;
+ }
+ timeout--;
+ usleep_range(1000, 1100);
+ }
+
+ ret = mmc_send_tuning(host->mmc, opcode, &error);
+ if (ret != 0) {
+ flag = 1;
+ } else {
+ if (flag == 0) {
+ if (start0 == -1)
+ start0 = i;
+ end0 = i;
+ } else {
+ if (start1 == -1)
+ start1 = i;
+ end1 = i;
+ }
+ }
+ }
+
+ /* Calculate best tuning value */
+ if (end0 - start0 >= end1 - start1)
+ best = ((end0 - start0) >> 1) + start0;
+ else
+ best = ((end1 - start1) >> 1) + start1;
+
+ if (best < 0)
+ best = 0;
+
+ bst_crm_write(pltfm_host, DELAY_CHAIN_SEL, (1ul << best) - 1);
+ timeout = 20;
+
+ while (!((clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL)) &
+ SDHCI_CLOCK_INT_STABLE)) {
+ if (timeout == 0) {
+ dev_err(mmc_dev(host->mmc), "Internal clock never stabilised\n");
+ return -EBUSY;
+ }
+ timeout--;
+ usleep_range(1000, 1100);
+ }
+
+ return 0;
+}
+
+/**
+ * sdhci_bst_voltage_switch - Perform voltage switch
+ * @host: SDHCI host controller
+ *
+ * Enables voltage stable power.
+ */
+static void sdhci_bst_voltage_switch(struct sdhci_host *host)
+{
+ struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+
+ /* vol stable power on */
+ bst_crm_write(pltfm_host, SDEMMC_CRM_VOL_CTRL, BST_VOL_STABLE_ON);
+}
+
+static const struct sdhci_ops sdhci_dwcmshc_ops = {
+ .set_clock = sdhci_set_bst_clock,
+ .set_bus_width = sdhci_set_bus_width,
+ .set_uhs_signaling = sdhci_set_uhs_signaling,
+ .get_min_clock = bst_get_min_clock,
+ .get_max_clock = bst_get_max_clock,
+ .reset = sdhci_bst_reset,
+ .set_power = sdhci_bst_set_power,
+ .set_timeout = sdhci_bst_timeout,
+ .platform_execute_tuning = bst_sdhci_execute_tuning,
+ .voltage_switch = sdhci_bst_voltage_switch,
+};
+
+static const struct sdhci_pltfm_data sdhci_dwcmshc_pdata = {
+ .ops = &sdhci_dwcmshc_ops,
+ .quirks = SDHCI_QUIRK_DELAY_AFTER_POWER |
+ SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN |
+ SDHCI_QUIRK_INVERTED_WRITE_PROTECT,
+ .quirks2 = SDHCI_QUIRK2_BROKEN_DDR50 |
+ SDHCI_QUIRK2_TUNING_WORK_AROUND |
+ SDHCI_QUIRK2_ACMD23_BROKEN,
+};
+
+static int bst_sdhci_reallocate_bounce_buffer(struct sdhci_host *host)
+{
+ struct mmc_host *mmc = host->mmc;
+ unsigned int max_blocks;
+ unsigned int bounce_size;
+ int ret;
+
+ /*
+ * Cap the bounce buffer at 32KB. Using a bigger bounce buffer
+ * has diminishing returns, this is probably because SD/MMC
+ * cards are usually optimized to handle this size of requests.
+ */
+ bounce_size = SZ_32K;
+ /*
+ * Adjust downwards to maximum request size if this is less
+ * than our segment size, else hammer down the maximum
+ * request size to the maximum buffer size.
+ */
+ if (mmc->max_req_size < bounce_size)
+ bounce_size = mmc->max_req_size;
+ max_blocks = bounce_size / 512;
+
+ ret = of_reserved_mem_device_init_by_idx(mmc_dev(mmc), mmc_dev(mmc)->of_node, 0);
+ if (ret) {
+ dev_err(mmc_dev(mmc), "Failed to initialize reserved memory\n");
+ return ret;
+ }
+
+ host->bounce_buffer = dma_alloc_coherent(mmc_dev(mmc), bounce_size,
+ &host->bounce_addr, GFP_KERNEL);
+ if (!host->bounce_buffer)
+ return -ENOMEM;
+
+ host->bounce_buffer_size = bounce_size;
+
+ /* Lie about this since we're bouncing */
+ mmc->max_segs = max_blocks;
+ mmc->max_seg_size = bounce_size;
+ mmc->max_req_size = bounce_size;
+
+ return 0;
+}
+
+static int dwcmshc_probe(struct platform_device *pdev)
+{
+ struct sdhci_pltfm_host *pltfm_host;
+ struct sdhci_host *host;
+ struct dwcmshc_priv *priv;
+ int err;
+
+ host = sdhci_pltfm_init(pdev, &sdhci_dwcmshc_pdata,
+ sizeof(struct dwcmshc_priv));
+ if (IS_ERR(host))
+ return PTR_ERR(host);
+
+ pltfm_host = sdhci_priv(host);
+ priv = sdhci_pltfm_priv(pltfm_host);
+
+ err = mmc_of_parse(host->mmc);
+ if (err)
+ goto err;
+
+ sdhci_get_of_property(pdev);
+
+ /* Get CRM registers from the second reg entry */
+ priv->crm_reg_base = devm_platform_ioremap_resource(pdev, 1);
+ if (IS_ERR(priv->crm_reg_base)) {
+ err = PTR_ERR(priv->crm_reg_base);
+ goto err;
+ }
+
+ err = sdhci_add_host(host);
+ if (err)
+ goto err;
+
+ /*
+ * Silicon constraints for BST C1200:
+ * - System RAM base is 0x800000000 (above 32-bit addressable range)
+ * - The eMMC controller DMA engine is limited to 32-bit addressing
+ * - SMMU cannot be used on this path due to hardware design flaws
+ * - These are fixed in silicon and cannot be changed in software
+ *
+ * Bus/controller mapping:
+ * - No registers are available to reprogram the address mapping
+ * - The 32-bit DMA limit is a hard constraint of the controller IP
+ *
+ * Given these constraints, an SRAM-based bounce buffer in the 32-bit
+ * address space is required to enable eMMC DMA on this platform.
+ */
+ err = bst_sdhci_reallocate_bounce_buffer(host);
+ if (err) {
+ dev_err(&pdev->dev, "Failed to allocate bounce buffer: %d\n", err);
+ goto err_remove_host;
+ }
+
+ return 0;
+
+err_remove_host:
+ sdhci_remove_host(host, 1);
+err:
+ sdhci_pltfm_free(pdev);
+ return err;
+}
+
+static void dwcmshc_remove(struct platform_device *pdev)
+{
+ struct sdhci_host *host = platform_get_drvdata(pdev);
+
+ /* Free bounce buffer if allocated */
+ if (host->bounce_buffer) {
+ dma_free_coherent(mmc_dev(host->mmc), host->bounce_buffer_size,
+ host->bounce_buffer, host->bounce_addr);
+ host->bounce_buffer = NULL;
+ }
+
+ /* Release reserved memory */
+ of_reserved_mem_device_release(mmc_dev(host->mmc));
+
+ sdhci_remove_host(host, 0);
+ sdhci_pltfm_free(pdev);
+}
+
+static const struct of_device_id sdhci_dwcmshc_dt_ids[] = {
+ { .compatible = "bst,c1200-dwcmshc-sdhci" },
+ {}
+};
+MODULE_DEVICE_TABLE(of, sdhci_dwcmshc_dt_ids);
+
+static struct platform_driver sdhci_dwcmshc_driver = {
+ .driver = {
+ .name = "sdhci-dwcmshc",
+ .of_match_table = sdhci_dwcmshc_dt_ids,
+ },
+ .probe = dwcmshc_probe,
+ .remove = dwcmshc_remove,
+};
+module_platform_driver(sdhci_dwcmshc_driver);
+
+MODULE_DESCRIPTION("Black Sesame Technologies DWCMSHC SDHCI driver");
+MODULE_AUTHOR("Black Sesame Technologies Co., Ltd.");
+MODULE_LICENSE("GPL");
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v3 6/8] arm64: dts: bst: add support for Black Sesame Technologies C1200 CDCU1.0 board
2025-08-12 12:31 [PATCH v3 0/8] Introduce Black Sesame Technologies C1200 SoC and CDCU1.0 board Albert Yang
` (4 preceding siblings ...)
2025-08-12 12:31 ` [PATCH v3 5/8] mmc: sdhci: add Black Sesame Technologies BST C1200 controller driver Albert Yang
@ 2025-08-12 12:31 ` Albert Yang
2025-08-12 16:16 ` Krzysztof Kozlowski
2025-08-12 12:31 ` [PATCH v3 7/8] arm64: defconfig: enable BST platform and SDHCI controller support Albert Yang
2025-08-12 12:31 ` [PATCH v3 8/8] MAINTAINERS: add and consolidate Black Sesame Technologies (BST) ARM SoC support Albert Yang
7 siblings, 1 reply; 24+ messages in thread
From: Albert Yang @ 2025-08-12 12:31 UTC (permalink / raw)
To: krzk, robh, krzk+dt, conor+dt, ulf.hansson, catalin.marinas, will,
arnd, adrian.hunter, robin.murphy, ding.wang, gordon.ge
Cc: bst-upstream, linux-arm-kernel, devicetree, linux-mmc, soc,
linux-kernel, Albert Yang
Add device tree support for the Black Sesame Technologies (BST) C1200
CDCU1.0 ADAS 4C2G platform. This platform is based on the BST C1200 SoC
family.
The changes include:
- Adding a new BST device tree directory
- Adding Makefile entries to build the BST platform device trees
- Adding the device tree for the BST C1200 CDCU1.0 ADAS 4C2G board
This board features a quad-core Cortex-A78 CPU, and various peripherals
including UART, MMC, watchdog timer, and interrupt controller.
Signed-off-by: Ge Gordon <gordon.ge@bst.ai>
Signed-off-by: Albert Yang <yangzh0906@thundersoft.com>
---
Changes for v3:
- Split defconfig enablement out into a dedicated defconfig patch
- Refine memory description: consolidate ranges in memory node and
delele unused memory ranges
- Adjust the order of nodes
- remove mask of gic
Changes for v2:
1. Reorganized memory map into discrete regions
2. Updated MMC controller definition:
- Split into core/CRM register regions
- Removed deprecated properties
- Updated compatible string
3. Standardized interrupt definitions and numeric formats
4. Removed reserved-memory node (superseded by bounce buffers)
5. Added root compatible string for platform identification
6. Add soc defconfig
---
arch/arm64/boot/dts/Makefile | 1 +
arch/arm64/boot/dts/bst/Makefile | 2 +
.../dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts | 42 +++++++
arch/arm64/boot/dts/bst/bstc1200.dtsi | 117 ++++++++++++++++++
4 files changed, 162 insertions(+)
create mode 100644 arch/arm64/boot/dts/bst/Makefile
create mode 100644 arch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts
create mode 100644 arch/arm64/boot/dts/bst/bstc1200.dtsi
diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile
index 79b73a21ddc2..a39b6cafb644 100644
--- a/arch/arm64/boot/dts/Makefile
+++ b/arch/arm64/boot/dts/Makefile
@@ -12,6 +12,7 @@ subdir-y += arm
subdir-y += bitmain
subdir-y += blaize
subdir-y += broadcom
+subdir-y += bst
subdir-y += cavium
subdir-y += exynos
subdir-y += freescale
diff --git a/arch/arm64/boot/dts/bst/Makefile b/arch/arm64/boot/dts/bst/Makefile
new file mode 100644
index 000000000000..4c1b8b4cdad8
--- /dev/null
+++ b/arch/arm64/boot/dts/bst/Makefile
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
+dtb-$(CONFIG_ARCH_BST) += bstc1200-cdcu1.0-adas_4c2g.dtb
diff --git a/arch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts b/arch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts
new file mode 100644
index 000000000000..d8fb07b0bc80
--- /dev/null
+++ b/arch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts
@@ -0,0 +1,42 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+
+#include "bstc1200.dtsi"
+
+/ {
+ model = "BST C1200-96 CDCU1.0 4C2G";
+ compatible = "bst,c1200-cdcu1.0-adas-4c2g", "bst,c1200";
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory@810000000 {
+ device_type = "memory";
+ reg = <0x8 0x10000000 0x0 0x30000000>,
+ <0x8 0xc0000000 0x1 0x0>,
+ <0xc 0x00000000 0x0 0x40000000>;
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ mmc0_reserved: mmc0-reserved@5160000 {
+ compatible = "shared-dma-pool";
+ reg = <0x0 0x5160000 0x0 0x10000>;
+ no-map;
+ };
+ };
+};
+
+&uart0 {
+ status = "okay";
+};
+
+&mmc0 {
+ status = "okay";
+ memory-region = <&mmc0_reserved>;
+};
+
diff --git a/arch/arm64/boot/dts/bst/bstc1200.dtsi b/arch/arm64/boot/dts/bst/bstc1200.dtsi
new file mode 100644
index 000000000000..5e9ca0ee17cf
--- /dev/null
+++ b/arch/arm64/boot/dts/bst/bstc1200.dtsi
@@ -0,0 +1,117 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+ compatible = "bst,c1200";
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ clk_mmc: clock-4000000 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <4000000>;
+ };
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu@0 {
+ compatible = "arm,cortex-a78";
+ device_type = "cpu";
+ enable-method = "psci";
+ next-level-cache = <&l2_cache>;
+ reg = <0>;
+ };
+
+ cpu@1 {
+ compatible = "arm,cortex-a78";
+ device_type = "cpu";
+ enable-method = "psci";
+ next-level-cache = <&l2_cache>;
+ reg = <0x100>;
+ };
+
+ cpu@2 {
+ compatible = "arm,cortex-a78";
+ device_type = "cpu";
+ enable-method = "psci";
+ next-level-cache = <&l2_cache>;
+ reg = <0x200>;
+ };
+
+ cpu@3 {
+ compatible = "arm,cortex-a78";
+ device_type = "cpu";
+ enable-method = "psci";
+ next-level-cache = <&l2_cache>;
+ reg = <0x300>;
+ };
+
+ l2_cache: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
+ };
+ };
+
+ psci {
+ compatible = "arm,psci-1.0";
+ method = "smc";
+ };
+
+ soc {
+ compatible = "simple-bus";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+ interrupt-parent = <&gic>;
+
+ uart0: serial@20008000 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x0 0x20008000 0x0 0x1000>;
+ interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>;
+ clock-frequency = <25000000>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ status = "disabled";
+ };
+
+ mmc0: mmc@22200000 {
+ compatible = "bst,c1200-dwcmshc-sdhci";
+ reg = <0x0 0x22200000 0x0 0x1000>,
+ <0x0 0x23006000 0x0 0x1000>;
+ interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk_mmc>;
+ clock-names = "core";
+ max-frequency = <200000000>;
+ bus-width = <8>;
+ non-removable;
+ dma-coherent;
+ status = "disabled";
+ };
+
+ gic: interrupt-controller@32800000 {
+ compatible = "arm,gic-v3";
+ #interrupt-cells = <3>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+ interrupt-controller;
+ ranges;
+ reg = <0x0 0x32800000 0x0 0x10000>,
+ <0x0 0x32880000 0x0 0x100000>;
+ interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_LOW>;
+ };
+ };
+
+ timer {
+ compatible = "arm,armv8-timer";
+ interrupt-parent = <&gic>;
+ always-on;
+ interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
+ };
+};
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v3 7/8] arm64: defconfig: enable BST platform and SDHCI controller support
2025-08-12 12:31 [PATCH v3 0/8] Introduce Black Sesame Technologies C1200 SoC and CDCU1.0 board Albert Yang
` (5 preceding siblings ...)
2025-08-12 12:31 ` [PATCH v3 6/8] arm64: dts: bst: add support for Black Sesame Technologies C1200 CDCU1.0 board Albert Yang
@ 2025-08-12 12:31 ` Albert Yang
2025-08-12 13:38 ` Krzysztof Kozlowski
2025-08-12 12:31 ` [PATCH v3 8/8] MAINTAINERS: add and consolidate Black Sesame Technologies (BST) ARM SoC support Albert Yang
7 siblings, 1 reply; 24+ messages in thread
From: Albert Yang @ 2025-08-12 12:31 UTC (permalink / raw)
To: krzk, robh, krzk+dt, conor+dt, ulf.hansson, catalin.marinas, will,
arnd, adrian.hunter, robin.murphy, ding.wang, gordon.ge
Cc: bst-upstream, linux-arm-kernel, devicetree, linux-mmc, soc,
linux-kernel, Albert Yang
Enable support for Black Sesame Technologies (BST) platform and drivers
in the ARM64 defconfig:
- CONFIG_ARCH_BST: Enable BST SoC platform support
- CONFIG_MMC_SDHCI_BST: Enable BST C1200 DWCMSHC SDHCI controller driver
This enables eMMC/SD card access on Black Sesame Technologies C1200 series
SoCs. The SDHCI driver provides hardware-specific implementation for the
Synopsys DesignWare Mobile Storage Host Controller integrated in BST SoCs.
Signed-off-by: Ge Gordon <gordon.ge@bst.ai>
Signed-off-by: Albert Yang <yangzh0906@thundersoft.com>
---
Change for v3:
- Also enable CONFIG_ARCH_BST in arm64 defconfig (in addition to
CONFIG_MMC_SDHCI_BST)
Change for v2:
- No changes.
---
arch/arm64/configs/defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 897fc686e6a9..8daf8cf3dc97 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -45,6 +45,7 @@ CONFIG_ARCH_BCMBCA=y
CONFIG_ARCH_BRCMSTB=y
CONFIG_ARCH_BERLIN=y
CONFIG_ARCH_BLAIZE=y
+CONFIG_ARCH_BST=y
CONFIG_ARCH_EXYNOS=y
CONFIG_ARCH_SPARX5=y
CONFIG_ARCH_K3=y
@@ -1187,6 +1188,7 @@ CONFIG_MMC_SDHCI_CADENCE=y
CONFIG_MMC_SDHCI_ESDHC_IMX=y
CONFIG_MMC_SDHCI_TEGRA=y
CONFIG_MMC_SDHCI_F_SDH30=y
+CONFIG_MMC_SDHCI_BST=y
CONFIG_MMC_MESON_GX=y
CONFIG_MMC_SDHCI_MSM=y
CONFIG_MMC_SPI=y
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v3 8/8] MAINTAINERS: add and consolidate Black Sesame Technologies (BST) ARM SoC support
2025-08-12 12:31 [PATCH v3 0/8] Introduce Black Sesame Technologies C1200 SoC and CDCU1.0 board Albert Yang
` (6 preceding siblings ...)
2025-08-12 12:31 ` [PATCH v3 7/8] arm64: defconfig: enable BST platform and SDHCI controller support Albert Yang
@ 2025-08-12 12:31 ` Albert Yang
2025-08-12 13:33 ` Krzysztof Kozlowski
7 siblings, 1 reply; 24+ messages in thread
From: Albert Yang @ 2025-08-12 12:31 UTC (permalink / raw)
To: krzk, robh, krzk+dt, conor+dt, ulf.hansson, catalin.marinas, will,
arnd, adrian.hunter, robin.murphy, ding.wang, gordon.ge
Cc: bst-upstream, linux-arm-kernel, devicetree, linux-mmc, soc,
linux-kernel, Albert Yang
Add and consolidate the MAINTAINERS entry for Black Sesame Technologies
ARM SoC support. This entry covers device tree bindings, drivers, and board
files for BST SoCs, including MMC, and platform support.
Signed-off-by: Ge Gordon <gordon.ge@bst.ai>
Signed-off-by: Albert Yang <yangzh0906@thundersoft.com>
---
Change for v3:
- No changes
Change for v2:
- No changes
---
MAINTAINERS | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index efb51ee92683..e3236384c28a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2441,6 +2441,16 @@ S: Maintained
F: Documentation/devicetree/bindings/arm/blaize.yaml
F: arch/arm64/boot/dts/blaize/
+ARM/BST SOC SUPPORT
+M: Ge Gordon <gordon.ge@bst.ai>
+R: BST Linux Kernel Upstream Group <bst-upstream@bstai.top>
+L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
+S: Maintained
+F: Documentation/devicetree/bindings/arm/bst.yaml
+F: Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml
+F: arch/arm64/boot/dts/bst/
+F: drivers/mmc/host/sdhci-of-bst-c1200.c
+
ARM/CALXEDA HIGHBANK ARCHITECTURE
M: Andre Przywara <andre.przywara@arm.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH v3 8/8] MAINTAINERS: add and consolidate Black Sesame Technologies (BST) ARM SoC support
2025-08-12 12:31 ` [PATCH v3 8/8] MAINTAINERS: add and consolidate Black Sesame Technologies (BST) ARM SoC support Albert Yang
@ 2025-08-12 13:33 ` Krzysztof Kozlowski
0 siblings, 0 replies; 24+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-12 13:33 UTC (permalink / raw)
To: Albert Yang, robh, krzk+dt, conor+dt, ulf.hansson,
catalin.marinas, will, arnd, adrian.hunter, robin.murphy,
ding.wang, gordon.ge
Cc: bst-upstream, linux-arm-kernel, devicetree, linux-mmc, soc,
linux-kernel
On 12/08/2025 14:31, Albert Yang wrote:
> Add and consolidate the MAINTAINERS entry for Black Sesame Technologies
I do not see consolidation in the patch, so this part and subject are
incorrect. You only add.
Please wrap commit message according to Linux coding style / submission
process (neither too early nor over the limit):
https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/process/submitting-patches.rst#L597
> ARM SoC support. This entry covers device tree bindings, drivers, and board
> files for BST SoCs, including MMC, and platform support.
>
> Signed-off-by: Ge Gordon <gordon.ge@bst.ai>
What does this SoB represent? Who wrote the code?
You added that SoB everywhere so I have worries it was automatic or
manager's decision. That isn't what SoB is about.
And looking at actual M: entry, this should be rather publicly Acked.
That's what Ack is. Not SoB.
> Signed-off-by: Albert Yang <yangzh0906@thundersoft.com>
> ---
> Change for v3:
> - No changes
>
> Change for v2:
> - No changes
> ---
> MAINTAINERS | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index efb51ee92683..e3236384c28a 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -2441,6 +2441,16 @@ S: Maintained
> F: Documentation/devicetree/bindings/arm/blaize.yaml
> F: arch/arm64/boot/dts/blaize/
>
> +ARM/BST SOC SUPPORT
> +M: Ge Gordon <gordon.ge@bst.ai>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v3 1/8] dt-bindings: vendor-prefixes: Add Black Sesame Technologies Co., Ltd.
2025-08-12 12:31 ` [PATCH v3 1/8] dt-bindings: vendor-prefixes: Add Black Sesame Technologies Co., Ltd Albert Yang
@ 2025-08-12 13:34 ` Krzysztof Kozlowski
2025-08-13 4:53 ` Albert Yang
0 siblings, 1 reply; 24+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-12 13:34 UTC (permalink / raw)
To: Albert Yang, robh, krzk+dt, conor+dt, ulf.hansson,
catalin.marinas, will, arnd, adrian.hunter, robin.murphy,
ding.wang, gordon.ge
Cc: bst-upstream, linux-arm-kernel, devicetree, linux-mmc, soc,
linux-kernel
On 12/08/2025 14:31, Albert Yang wrote:
> Black Sesame Technologies Co., Ltd.s a leading automotive-grade
> computing SoC and SoC-based
> intelligent vehicle solution provider. Link: https://bst.ai/.
>
> Acked-by: Rob Herring (Arm) <robh@kernel.org>
> Signed-off-by: Ge Gordon <gordon.ge@bst.ai>
Odd order of tags. When was the patch written, by who and when was the
Ack given?
> Signed-off-by: Albert Yang <yangzh0906@thundersoft.com>
> ---
> Changes for v3:
> - No changes
>
> Changes for v2:
> - No changes
> ---
> Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> index 5d2a7a8d3ac6..3c2031417232 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> @@ -222,6 +222,8 @@ patternProperties:
> description: Shenzhen BigTree Tech Co., LTD
> "^bitmain,.*":
> description: Bitmain Technologies
> + "^bst,.*":
> + description: Black Sesame Technologies Co., Ltd.
Messed ordering.
> "^blaize,.*":
> description: Blaize, Inc.
> "^blutek,.*":
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v3 2/8] dt-bindings: arm: add Black Sesame Technologies (bst) SoC
2025-08-12 12:31 ` [PATCH v3 2/8] dt-bindings: arm: add Black Sesame Technologies (bst) SoC Albert Yang
@ 2025-08-12 13:35 ` Krzysztof Kozlowski
0 siblings, 0 replies; 24+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-12 13:35 UTC (permalink / raw)
To: Albert Yang, robh, krzk+dt, conor+dt, ulf.hansson,
catalin.marinas, will, arnd, adrian.hunter, robin.murphy,
ding.wang, gordon.ge
Cc: bst-upstream, linux-arm-kernel, devicetree, linux-mmc, soc,
linux-kernel
On 12/08/2025 14:31, Albert Yang wrote:
> Add device tree bindings for Black Sesame Technologies Arm SoC,
> it consists several SoC models like C1200, etc.
>
> Signed-off-by: Ge Gordon <gordon.ge@bst.ai>
> Signed-off-by: Albert Yang <yangzh0906@thundersoft.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
... and place it correctly please. This goes below or under your SoB.
Not some other place.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v3 7/8] arm64: defconfig: enable BST platform and SDHCI controller support
2025-08-12 12:31 ` [PATCH v3 7/8] arm64: defconfig: enable BST platform and SDHCI controller support Albert Yang
@ 2025-08-12 13:38 ` Krzysztof Kozlowski
2025-08-13 11:56 ` Albert Yang
0 siblings, 1 reply; 24+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-12 13:38 UTC (permalink / raw)
To: Albert Yang, robh, krzk+dt, conor+dt, ulf.hansson,
catalin.marinas, will, arnd, adrian.hunter, robin.murphy,
ding.wang, gordon.ge
Cc: bst-upstream, linux-arm-kernel, devicetree, linux-mmc, soc,
linux-kernel
On 12/08/2025 14:31, Albert Yang wrote:
> Enable support for Black Sesame Technologies (BST) platform and drivers
> in the ARM64 defconfig:
>
> - CONFIG_ARCH_BST: Enable BST SoC platform support
> - CONFIG_MMC_SDHCI_BST: Enable BST C1200 DWCMSHC SDHCI controller driver
Either this paragraph...
>
> This enables eMMC/SD card access on Black Sesame Technologies C1200 series
> SoCs. The SDHCI driver provides hardware-specific implementation for the
> Synopsys DesignWare Mobile Storage Host Controller integrated in BST SoCs.
Or this. Don't say twice the same. Second paragraph is more relevant, so:
"Enable BST SoC and MMC drivers for BST 1200 board".
>
> Signed-off-by: Ge Gordon <gordon.ge@bst.ai>
> Signed-off-by: Albert Yang <yangzh0906@thundersoft.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v3 6/8] arm64: dts: bst: add support for Black Sesame Technologies C1200 CDCU1.0 board
2025-08-12 12:31 ` [PATCH v3 6/8] arm64: dts: bst: add support for Black Sesame Technologies C1200 CDCU1.0 board Albert Yang
@ 2025-08-12 16:16 ` Krzysztof Kozlowski
2025-09-03 3:40 ` Albert Yang
0 siblings, 1 reply; 24+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-12 16:16 UTC (permalink / raw)
To: Albert Yang, robh, krzk+dt, conor+dt, ulf.hansson,
catalin.marinas, will, arnd, adrian.hunter, robin.murphy,
ding.wang, gordon.ge
Cc: bst-upstream, linux-arm-kernel, devicetree, linux-mmc, soc,
linux-kernel
On 12/08/2025 14:31, Albert Yang wrote:
> Add device tree support for the Black Sesame Technologies (BST) C1200
> CDCU1.0 ADAS 4C2G platform. This platform is based on the BST C1200 SoC
> family.
>
> The changes include:
> - Adding a new BST device tree directory
> - Adding Makefile entries to build the BST platform device trees
> - Adding the device tree for the BST C1200 CDCU1.0 ADAS 4C2G board
>
> This board features a quad-core Cortex-A78 CPU, and various peripherals
> including UART, MMC, watchdog timer, and interrupt controller.
>
> Signed-off-by: Ge Gordon <gordon.ge@bst.ai>
> Signed-off-by: Albert Yang <yangzh0906@thundersoft.com>
> ---
> Changes for v3:
> - Split defconfig enablement out into a dedicated defconfig patch
> - Refine memory description: consolidate ranges in memory node and
> delele unused memory ranges
> - Adjust the order of nodes
> - remove mask of gic
>
> Changes for v2:
> 1. Reorganized memory map into discrete regions
> 2. Updated MMC controller definition:
> - Split into core/CRM register regions
> - Removed deprecated properties
> - Updated compatible string
> 3. Standardized interrupt definitions and numeric formats
> 4. Removed reserved-memory node (superseded by bounce buffers)
> 5. Added root compatible string for platform identification
> 6. Add soc defconfig
> ---
> arch/arm64/boot/dts/Makefile | 1 +
> arch/arm64/boot/dts/bst/Makefile | 2 +
> .../dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts | 42 +++++++
> arch/arm64/boot/dts/bst/bstc1200.dtsi | 117 ++++++++++++++++++
> 4 files changed, 162 insertions(+)
> create mode 100644 arch/arm64/boot/dts/bst/Makefile
> create mode 100644 arch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts
> create mode 100644 arch/arm64/boot/dts/bst/bstc1200.dtsi
>
> diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile
> index 79b73a21ddc2..a39b6cafb644 100644
> --- a/arch/arm64/boot/dts/Makefile
> +++ b/arch/arm64/boot/dts/Makefile
> @@ -12,6 +12,7 @@ subdir-y += arm
> subdir-y += bitmain
> subdir-y += blaize
> subdir-y += broadcom
> +subdir-y += bst
> subdir-y += cavium
> subdir-y += exynos
> subdir-y += freescale
> diff --git a/arch/arm64/boot/dts/bst/Makefile b/arch/arm64/boot/dts/bst/Makefile
> new file mode 100644
> index 000000000000..4c1b8b4cdad8
> --- /dev/null
> +++ b/arch/arm64/boot/dts/bst/Makefile
> @@ -0,0 +1,2 @@
> +# SPDX-License-Identifier: GPL-2.0
> +dtb-$(CONFIG_ARCH_BST) += bstc1200-cdcu1.0-adas_4c2g.dtb
> diff --git a/arch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts b/arch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts
> new file mode 100644
> index 000000000000..d8fb07b0bc80
> --- /dev/null
> +++ b/arch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts
> @@ -0,0 +1,42 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/dts-v1/;
> +
> +#include "bstc1200.dtsi"
> +
> +/ {
> + model = "BST C1200-96 CDCU1.0 4C2G";
> + compatible = "bst,c1200-cdcu1.0-adas-4c2g", "bst,c1200";
> +
> + chosen {
> + stdout-path = "serial0:115200n8";
> + };
> +
> + memory@810000000 {
> + device_type = "memory";
> + reg = <0x8 0x10000000 0x0 0x30000000>,
> + <0x8 0xc0000000 0x1 0x0>,
> + <0xc 0x00000000 0x0 0x40000000>;
> + };
> +
> + reserved-memory {
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;
> +
> + mmc0_reserved: mmc0-reserved@5160000 {
> + compatible = "shared-dma-pool";
> + reg = <0x0 0x5160000 0x0 0x10000>;
> + no-map;
> + };
> + };
> +};
> +
> +&uart0 {
> + status = "okay";
> +};
> +
> +&mmc0 {
This is none of the two approved ordering styles from DTS coding style.
What sort of coding style are you using?
> + status = "okay";
> + memory-region = <&mmc0_reserved>;
> +};
> +
> diff --git a/arch/arm64/boot/dts/bst/bstc1200.dtsi b/arch/arm64/boot/dts/bst/bstc1200.dtsi
> new file mode 100644
> index 000000000000..5e9ca0ee17cf
> --- /dev/null
> +++ b/arch/arm64/boot/dts/bst/bstc1200.dtsi
> @@ -0,0 +1,117 @@
> +// SPDX-License-Identifier: GPL-2.0
> +#include <dt-bindings/interrupt-controller/arm-gic.h>
> +#include <dt-bindings/interrupt-controller/irq.h>
> +
> +/ {
> + compatible = "bst,c1200";
> + #address-cells = <2>;
> + #size-cells = <2>;
> +
> + clk_mmc: clock-4000000 {
> + compatible = "fixed-clock";
> + #clock-cells = <0>;
> + clock-frequency = <4000000>;
> + };
> +
> + cpus {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + cpu@0 {
> + compatible = "arm,cortex-a78";
> + device_type = "cpu";
> + enable-method = "psci";
> + next-level-cache = <&l2_cache>;
> + reg = <0>;
0x0
And why reg is the last? Please follow DTS coding style.
I already asked for this at v1. How did you resolve that comment?
Then I asked about this at v2:
"Nothing improved. I asked to follow DTS coding style in ordering."
So can you please respond to comments? You keep sending the same - third
time - and this is waste of our time.
> + };
> +
> + cpu@1 {
> + compatible = "arm,cortex-a78";
> + device_type = "cpu";
> + enable-method = "psci";
> + next-level-cache = <&l2_cache>;
> + reg = <0x100>;
> + };
> +
> + cpu@2 {
> + compatible = "arm,cortex-a78";
> + device_type = "cpu";
> + enable-method = "psci";
> + next-level-cache = <&l2_cache>;
> + reg = <0x200>;
> + };
> +
> + cpu@3 {
> + compatible = "arm,cortex-a78";
> + device_type = "cpu";
> + enable-method = "psci";
> + next-level-cache = <&l2_cache>;
> + reg = <0x300>;
> + };
> +
> + l2_cache: l2-cache {
> + compatible = "cache";
> + cache-level = <2>;
> + cache-unified;
> + };
> + };
> +
> + psci {
> + compatible = "arm,psci-1.0";
> + method = "smc";
> + };
> +
> + soc {
> + compatible = "simple-bus";
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;
> + interrupt-parent = <&gic>;
> +
> + uart0: serial@20008000 {
> + compatible = "snps,dw-apb-uart";
> + reg = <0x0 0x20008000 0x0 0x1000>;
> + interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>;
> + clock-frequency = <25000000>;
> + reg-shift = <2>;
> + reg-io-width = <4>;
> + status = "disabled";
> + };
> +
> + mmc0: mmc@22200000 {
> + compatible = "bst,c1200-dwcmshc-sdhci";
> + reg = <0x0 0x22200000 0x0 0x1000>,
> + <0x0 0x23006000 0x0 0x1000>;
> + interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&clk_mmc>;
> + clock-names = "core";
> + max-frequency = <200000000>;
> + bus-width = <8>;
> + non-removable;
Hm, this is odd to see in SoC. Are you saying that your SoC (!) has MMC
memory embedded?
> + dma-coherent;
> + status = "disabled";
If so, why is it disabled?
> + };
> +
> + gic: interrupt-controller@32800000 {
> + compatible = "arm,gic-v3";
> + #interrupt-cells = <3>;
> + #address-cells = <2>;
> + #size-cells = <2>;
> + interrupt-controller;
> + ranges;
> + reg = <0x0 0x32800000 0x0 0x10000>,
> + <0x0 0x32880000 0x0 0x100000>;
Random order...
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v3 1/8] dt-bindings: vendor-prefixes: Add Black Sesame Technologies Co., Ltd.
2025-08-12 13:34 ` Krzysztof Kozlowski
@ 2025-08-13 4:53 ` Albert Yang
2025-08-13 6:01 ` Krzysztof Kozlowski
0 siblings, 1 reply; 24+ messages in thread
From: Albert Yang @ 2025-08-13 4:53 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt; +Cc: devicetree, linux-kernel
Hi Krzysztof,
Thanks for the review.
On Tue, Aug 12, 2025 at 03:34:55PM +0200, Krzysztof Kozlowski wrote:
> On 12/08/2025 14:31, Albert Yang wrote:
> > Black Sesame Technologies Co., Ltd.s a leading automotive-grade
> > computing SoC and SoC-based
> > intelligent vehicle solution provider. Link: https://bst.ai/.
> >
> > Acked-by: Rob Herring (Arm) <robh@kernel.org>
> > Signed-off-by: Ge Gordon <gordon.ge@bst.ai>
>
> Odd order of tags. When was the patch written, by who and when was the
> Ack given?
Rob’s Ack was on v1:
https://lore.kernel.org/lkml/174915411977.3161261.2820163642193291293.robh@kernel.org/
Since I’m changing the list position, I’ll drop the Acked-by in v4 and re-collect it as needed.
I’ll also fix tag order.
> > @@ -222,6 +222,8 @@ patternProperties:
> > description: Shenzhen BigTree Tech Co., LTD
> > "^bitmain,.*":
> > description: Bitmain Technologies
> > + "^bst,.*":
> > + description: Black Sesame Technologies Co., Ltd.
>
> Messed ordering.
Agreed. I’ll move the “bst” entry after “^bsh,.*” and before “^bticino,.*” in v4.
Best Regards,
Albert
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v3 1/8] dt-bindings: vendor-prefixes: Add Black Sesame Technologies Co., Ltd.
2025-08-13 4:53 ` Albert Yang
@ 2025-08-13 6:01 ` Krzysztof Kozlowski
2025-08-13 11:37 ` Albert Yang
0 siblings, 1 reply; 24+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-13 6:01 UTC (permalink / raw)
To: Albert Yang, robh, krzk+dt, conor+dt; +Cc: devicetree, linux-kernel
On 13/08/2025 06:53, Albert Yang wrote:
> Hi Krzysztof,
>
> Thanks for the review.
>
> On Tue, Aug 12, 2025 at 03:34:55PM +0200, Krzysztof Kozlowski wrote:
>> On 12/08/2025 14:31, Albert Yang wrote:
>>> Black Sesame Technologies Co., Ltd.s a leading automotive-grade
>>> computing SoC and SoC-based
>>> intelligent vehicle solution provider. Link: https://bst.ai/.
>>>
>>> Acked-by: Rob Herring (Arm) <robh@kernel.org>
>>> Signed-off-by: Ge Gordon <gordon.ge@bst.ai>
>>
>> Odd order of tags. When was the patch written, by who and when was the
>> Ack given?
>
> Rob’s Ack was on v1:
> https://lore.kernel.org/lkml/174915411977.3161261.2820163642193291293.robh@kernel.org/
So how it can appear before Ge signed off?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v3 1/8] dt-bindings: vendor-prefixes: Add Black Sesame Technologies Co., Ltd.
2025-08-13 6:01 ` Krzysztof Kozlowski
@ 2025-08-13 11:37 ` Albert Yang
0 siblings, 0 replies; 24+ messages in thread
From: Albert Yang @ 2025-08-13 11:37 UTC (permalink / raw)
To: krzk; +Cc: conor+dt, devicetree, krzk+dt, linux-kernel, robh, yangzh0906
On Wed, Aug 13, 2025 at 08:01:09AM +0200, Krzysztof Kozlowski wrote:
> On 13/08/2025 06:53, Albert Yang wrote:
> >>> Acked-by: Rob Herring (Arm) <robh@kernel.org>
> >>> Signed-off-by: Ge Gordon <gordon.ge@bst.ai>
> >>
> >> Odd order of tags. When was the patch written, by who and when was the
> >> Ack given?
> >
> > Rob’s Ack was on v1:
> > https://lore.kernel.org/lkml/174915411977.3161261.2820163642193291293.robh@kernel.org/
>
>
> So how it can appear before Ge signed off?
You’re absolutely right, I’ll ensure future submissions follow the
correct order. This area is still new to me, but I’m actively working
to master it.
Best regards,
Albert
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v3 7/8] arm64: defconfig: enable BST platform and SDHCI controller support
2025-08-12 13:38 ` Krzysztof Kozlowski
@ 2025-08-13 11:56 ` Albert Yang
0 siblings, 0 replies; 24+ messages in thread
From: Albert Yang @ 2025-08-13 11:56 UTC (permalink / raw)
To: krzk
Cc: will, adrian.hunter, catalin.marinas, arnd, krzk+dt,
linux-arm-kernel, linux-kernel
On Tue, Aug 12, 2025 at 03:38:08PM +0200, Krzysztof Kozlowski wrote:
> On 12/08/2025 14:31, Albert Yang wrote:
> >
> > - CONFIG_ARCH_BST: Enable BST SoC platform support
> > - CONFIG_MMC_SDHCI_BST: Enable BST C1200 DWCMSHC SDHCI controller driver
>
> Either this paragraph...
>
> >
> > This enables eMMC/SD card access on Black Sesame Technologies C1200 series
> > SoCs. The SDHCI driver provides hardware-specific implementation for the
> > Synopsys DesignWare Mobile Storage Host Controller integrated in BST SoCs.
>
> Or this. Don't say twice the same. Second paragraph is more relevant, so:
> "Enable BST SoC and MMC drivers for BST 1200 board".
>
>
Thank you for your review. I will refine the commit messages based on your
suggestions.
Best regards,
Albert
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v3 4/8] dt-bindings: mmc: add binding for BST DWCMSHC SDHCI controller
2025-08-12 12:31 ` [PATCH v3 4/8] dt-bindings: mmc: add binding for BST DWCMSHC SDHCI controller Albert Yang
@ 2025-08-14 8:50 ` Krzysztof Kozlowski
0 siblings, 0 replies; 24+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-14 8:50 UTC (permalink / raw)
To: Albert Yang
Cc: robh, krzk+dt, conor+dt, ulf.hansson, catalin.marinas, will, arnd,
adrian.hunter, robin.murphy, ding.wang, gordon.ge, bst-upstream,
linux-arm-kernel, devicetree, linux-mmc, soc, linux-kernel
On Tue, Aug 12, 2025 at 08:31:06PM +0800, Albert Yang wrote:
> Add device tree binding documentation for the Black Sesame Technologies
> (BST) DWCMSHC SDHCI controller.
>
> This binding describes the required and optional properties for the
> bst,c1200-dwcmshc-sdhci compatible controller, including register layout,
> interrupts, bus width, clock configuration, and other controller-specific
> features.
Please drop this paragraph, it's completely redundant. You should
rather describe the hardware.
>
> Signed-off-by: Ge Gordon <gordon.ge@bst.ai>
> Signed-off-by: Albert Yang <yangzh0906@thundersoft.com>
> ---
> Changes for v3:
> - Switch reg schema from maxItems to explicit items with per-entry
> descriptions
> - Improve example: add irq.h include and wrap under a bus node with
> address/size cells
> - Drop status = "disabled" from example; keep example concise
> - Add Signed-off-by: Ge Gordon
>
> Changes for v2:
> - Simplified description, removed redundant paragraphs
> - Updated $schema to reference mmc-specific scheme
> - Corrected compatible to add soc name
> (bst,c1200-dwcmshc-sdhci)
> - Removed all redundant property descriptions
> - Dropped invalid mmc_crm_base/size properties, use reg for all address
> ranges
> - Cleaned up required properties to only essential entries
> - Standardized example DTS format, fixed reg syntax and property
> ordering
> - Removed additionalProperties: true
> ---
> .../bindings/mmc/bst,dwcmshc-sdhci.yaml | 70 +++++++++++++++++++
> 1 file changed, 70 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml
>
> diff --git a/Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml b/Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml
> new file mode 100644
> index 000000000000..aa72ce60259f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml
> @@ -0,0 +1,70 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mmc/bst,dwcmshc-sdhci.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Black Sesame Technologies DWCMSHC SDHCI Controller
> +
> +maintainers:
> + - Ge Gordon <gordon.ge@bst.ai>
> +
> +allOf:
> + - $ref: mmc-controller.yaml#
You want sdhci-common.yaml instead.
> +
> +properties:
> + compatible:
> + const: bst,c1200-dwcmshc-sdhci
Keep just one name, so bst,c1200-dwcmshc (sdhci is redundant, right? Do
you have more than one dwcmshc?)
> +
> + reg:
> + items:
> + - description: Core SDHCI registers
> + - description: CRM registers
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v3 5/8] mmc: sdhci: add Black Sesame Technologies BST C1200 controller driver
2025-08-12 12:31 ` [PATCH v3 5/8] mmc: sdhci: add Black Sesame Technologies BST C1200 controller driver Albert Yang
@ 2025-08-18 10:48 ` Ulf Hansson
2025-08-18 12:08 ` Arnd Bergmann
2025-08-18 18:16 ` Adrian Hunter
1 sibling, 1 reply; 24+ messages in thread
From: Ulf Hansson @ 2025-08-18 10:48 UTC (permalink / raw)
To: Albert Yang
Cc: krzk, robh, krzk+dt, conor+dt, catalin.marinas, will, arnd,
adrian.hunter, robin.murphy, ding.wang, gordon.ge, bst-upstream,
linux-arm-kernel, devicetree, linux-mmc, soc, linux-kernel
On Tue, 12 Aug 2025 at 14:31, Albert Yang <yangzh0906@thundersoft.com> wrote:
>
> Add SDHCI controller driver for Black Sesame Technologies C1200 SoC.
>
> This driver supports the DWCMSHC SDHCI controller with BST-specific
> enhancements including:
> - Custom clock management and tuning
> - Power management support
> - BST-specific register configurations
> - Support for eMMC and SD card interfaces
> - Hardware limitation workaround for 32-bit DMA addressing
>
> The driver addresses specific hardware constraints where:
> - System memory uses 64-bit bus, eMMC controller uses 32-bit bus
> - eMMC controller cannot access memory through SMMU due to hardware bug
> - All system DRAM is configured outside 4GB boundary (ZONE_DMA32)
> - Uses SRAM-based bounce buffer within 32-bit address space
>
> Signed-off-by: Ge Gordon <gordon.ge@bst.ai>
> Signed-off-by: Albert Yang <yangzh0906@thundersoft.com>
> ---
> Change for v3:
> Code improvements based on review feedback:
> - Simplified dwcmshc_priv structure by removing unused fields
> - Improved helper functions with better encapsulation
> - Used devm_platform_ioremap_resource() for resource management
> - Updated Kconfig description and alphabetical ordering
> - clarify documentation on hardware limitations and bounce buffer
> approach
> - remove duplicate sdhci_writew SDHCI_CLOCK_CONTROL
>
> Changes for v2:
> 1. Dependency Simplification :
> - Removed COMMON_CLK dependency from Kconfig (MMC_SDHCI_BST)
> - Add ARCH_BST || COMPILE_TEST dependency from Kconfig (MMC_SDHCI_BST)
>
> 2. Resource Management Improvements :
> - Replaced temporary ioremap with persistent mapping
> * Mapped CRM registers once during probe instead of per-access
> * Added proper cleanup in remove callback
> - Refactored bounce buffer allocation:
> * Simplified error handling and memory management
> * Removed unnecessary DMA configuration layers
>
> 3. Code Cleanup & Optimization :
> - Pruned unused headers and legacy vendor debug code
> - Removed deprecated sdhci_bst_print_vendor() export
> - Converted internal functions to static scope
> - Standardized naming conventions:
> * Renamed DRIVER_NAME to match kernel standards
> * Changed default_max_freq to DEFAULT_MAX_FREQ
> - Optimized clock configuration routines
>
> 4. Hardware Integration Fixes :
> - Fixed register access macros for EMMC_CTRL
> * Added proper offset calculation via SDHCI_VENDOR_PTR_R
> - Corrected device tree compatibility string to:
> "bst,c1200-dwcmshc-sdhci"
>
> 5. Error Handling Enhancements :
> - Added robust ioremap error checking
> - Improved bounce buffer allocation failure handling
> - Streamlined probe/remove flow
>
> 6. Maintainability :
> - Updated MODULE_DESCRIPTION and AUTHOR fields
> - Added explanatory comments for hardware limitations
> - Removed redundant multi-host setup infrastructure
>
> 7. fix build warnings from lkp
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes:
> https://lore.kernel.org/oe-kbuild-all/202505290615.GZzN5rNL-lkp@intel.com/
> ---
> drivers/mmc/host/Kconfig | 14 +
> drivers/mmc/host/Makefile | 1 +
> drivers/mmc/host/sdhci-of-bst-c1200.c | 510 ++++++++++++++++++++++++++
> 3 files changed, 525 insertions(+)
> create mode 100644 drivers/mmc/host/sdhci-of-bst-c1200.c
>
> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index c3f0f41a426d..fb057c46949b 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -429,6 +429,20 @@ config MMC_SDHCI_BCM_KONA
>
> If you have a controller with this interface, say Y or M here.
>
> +config MMC_SDHCI_BST
> + tristate "SDHCI support for Black Sesame Technologies BST C1200 controller"
> + depends on ARCH_BST || COMPILE_TEST
> + depends on MMC_SDHCI_PLTFM
> + depends on OF
> + help
> + This selects the Secure Digital Host Controller Interface (SDHCI)
> + for Black Sesame Technologies BST C1200 SoC. The controller is
> + based on Synopsys DesignWare Cores Mobile Storage Controller but
> + requires platform-specific workarounds for hardware limitations.
> +
> + If you have a controller with this interface, say Y or M here.
> + If unsure, say N.
> +
> config MMC_SDHCI_F_SDH30
> tristate "SDHCI support for Fujitsu Semiconductor F_SDH30"
> depends on MMC_SDHCI_PLTFM
> diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
> index 75bafc7b162b..bb5df05c3174 100644
> --- a/drivers/mmc/host/Makefile
> +++ b/drivers/mmc/host/Makefile
> @@ -13,6 +13,7 @@ obj-$(CONFIG_MMC_MXS) += mxs-mmc.o
> obj-$(CONFIG_MMC_SDHCI) += sdhci.o
> obj-$(CONFIG_MMC_SDHCI_UHS2) += sdhci-uhs2.o
> obj-$(CONFIG_MMC_SDHCI_PCI) += sdhci-pci.o
> +obj-$(CONFIG_MMC_SDHCI_BST) += sdhci-of-bst-c1200.o
> sdhci-pci-y += sdhci-pci-core.o sdhci-pci-o2micro.o sdhci-pci-arasan.o \
> sdhci-pci-dwc-mshc.o sdhci-pci-gli.o
> obj-$(CONFIG_MMC_SDHCI_ACPI) += sdhci-acpi.o
> diff --git a/drivers/mmc/host/sdhci-of-bst-c1200.c b/drivers/mmc/host/sdhci-of-bst-c1200.c
> new file mode 100644
> index 000000000000..6d2ba4232306
> --- /dev/null
> +++ b/drivers/mmc/host/sdhci-of-bst-c1200.c
[...]
> +/**
> + * sdhci_bst_timeout - Set timeout value for commands
> + * @host: SDHCI host controller
> + * @cmd: MMC command
> + *
> + * Sets the timeout control register to maximum value (0xE).
> + */
> +static void sdhci_bst_timeout(struct sdhci_host *host, struct mmc_command *cmd)
> +{
> + sdhci_writeb(host, 0xE, SDHCI_TIMEOUT_CONTROL);
> +}
> +
> +/**
> + * sdhci_bst_set_power - Set power mode and voltage
> + * @host: SDHCI host controller
> + * @mode: Power mode to set
> + * @vdd: Voltage to set
> + *
> + * Sets power mode and voltage, also configures MBIU control register.
> + */
> +static void sdhci_bst_set_power(struct sdhci_host *host, unsigned char mode,
> + unsigned short vdd)
> +{
> + sdhci_set_power(host, mode, vdd);
> + sdhci_writeb(host, 0xF, SDHCI_POWER_CONTROL);
> + sdhci_writew(host,
> + (sdhci_readw(host, MBIU_CTRL) & (~0xf)) | BURST_EN,
> + MBIU_CTRL);
> +}
> +
> +/**
> + * bst_sdhci_execute_tuning - Execute tuning procedure
> + * @host: SDHCI host controller
> + * @opcode: Opcode to use for tuning
> + *
> + * Performs tuning procedure by trying different values and selecting the best one.
> + *
> + * Return: 0 on success, negative errno on failure
> + */
> +static int bst_sdhci_execute_tuning(struct sdhci_host *host, u32 opcode)
> +{
> + struct sdhci_pltfm_host *pltfm_host;
> + unsigned int clk = 0, timeout;
> + int ret = 0, error;
> + int start0 = -1, end0 = -1, best = 0;
> + int start1 = -1, end1 = -1, flag = 0;
> + int i;
> +
> + pltfm_host = sdhci_priv(host);
> +
> + for (i = 0; i < SDHCI_TUNING_COUNT; i++) {
> + /* Protected write */
> + bst_crm_write(pltfm_host, REG_WR_PROTECT, REG_WR_PROTECT_KEY);
> + /* Write tuning value */
> + bst_crm_write(pltfm_host, DELAY_CHAIN_SEL, (1ul << i) - 1);
> +
> + timeout = 20;
> + while (!((clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL)) &
> + SDHCI_CLOCK_INT_STABLE)) {
> + if (timeout == 0) {
> + dev_err(mmc_dev(host->mmc), "Internal clock never stabilised\n");
> + return -EBUSY;
> + }
> + timeout--;
> + usleep_range(1000, 1100);
> + }
Please convert into using some of the readx_poll_timeout functions
instead of the loop above. Moreover, please add defines to specify the
period/timeout.
> +
> + ret = mmc_send_tuning(host->mmc, opcode, &error);
> + if (ret != 0) {
> + flag = 1;
> + } else {
> + if (flag == 0) {
> + if (start0 == -1)
> + start0 = i;
> + end0 = i;
> + } else {
> + if (start1 == -1)
> + start1 = i;
> + end1 = i;
> + }
> + }
> + }
> +
> + /* Calculate best tuning value */
> + if (end0 - start0 >= end1 - start1)
> + best = ((end0 - start0) >> 1) + start0;
> + else
> + best = ((end1 - start1) >> 1) + start1;
> +
> + if (best < 0)
> + best = 0;
> +
> + bst_crm_write(pltfm_host, DELAY_CHAIN_SEL, (1ul << best) - 1);
> + timeout = 20;
> +
> + while (!((clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL)) &
> + SDHCI_CLOCK_INT_STABLE)) {
> + if (timeout == 0) {
> + dev_err(mmc_dev(host->mmc), "Internal clock never stabilised\n");
> + return -EBUSY;
> + }
> + timeout--;
> + usleep_range(1000, 1100);
> + }
Ditto.
> +
> + return 0;
> +}
> +
[...]
> +
> +static int bst_sdhci_reallocate_bounce_buffer(struct sdhci_host *host)
> +{
> + struct mmc_host *mmc = host->mmc;
> + unsigned int max_blocks;
> + unsigned int bounce_size;
> + int ret;
> +
> + /*
> + * Cap the bounce buffer at 32KB. Using a bigger bounce buffer
> + * has diminishing returns, this is probably because SD/MMC
> + * cards are usually optimized to handle this size of requests.
> + */
> + bounce_size = SZ_32K;
> + /*
> + * Adjust downwards to maximum request size if this is less
> + * than our segment size, else hammer down the maximum
> + * request size to the maximum buffer size.
> + */
> + if (mmc->max_req_size < bounce_size)
> + bounce_size = mmc->max_req_size;
> + max_blocks = bounce_size / 512;
> +
> + ret = of_reserved_mem_device_init_by_idx(mmc_dev(mmc), mmc_dev(mmc)->of_node, 0);
> + if (ret) {
> + dev_err(mmc_dev(mmc), "Failed to initialize reserved memory\n");
> + return ret;
> + }
> +
> + host->bounce_buffer = dma_alloc_coherent(mmc_dev(mmc), bounce_size,
> + &host->bounce_addr, GFP_KERNEL);
> + if (!host->bounce_buffer)
> + return -ENOMEM;
> +
> + host->bounce_buffer_size = bounce_size;
> +
> + /* Lie about this since we're bouncing */
> + mmc->max_segs = max_blocks;
> + mmc->max_seg_size = bounce_size;
> + mmc->max_req_size = bounce_size;
> +
> + return 0;
> +}
> +
> +static int dwcmshc_probe(struct platform_device *pdev)
> +{
> + struct sdhci_pltfm_host *pltfm_host;
> + struct sdhci_host *host;
> + struct dwcmshc_priv *priv;
> + int err;
> +
> + host = sdhci_pltfm_init(pdev, &sdhci_dwcmshc_pdata,
> + sizeof(struct dwcmshc_priv));
> + if (IS_ERR(host))
> + return PTR_ERR(host);
> +
> + pltfm_host = sdhci_priv(host);
> + priv = sdhci_pltfm_priv(pltfm_host);
> +
> + err = mmc_of_parse(host->mmc);
> + if (err)
> + goto err;
> +
> + sdhci_get_of_property(pdev);
> +
> + /* Get CRM registers from the second reg entry */
> + priv->crm_reg_base = devm_platform_ioremap_resource(pdev, 1);
> + if (IS_ERR(priv->crm_reg_base)) {
> + err = PTR_ERR(priv->crm_reg_base);
> + goto err;
> + }
> +
> + err = sdhci_add_host(host);
> + if (err)
> + goto err;
> +
> + /*
> + * Silicon constraints for BST C1200:
> + * - System RAM base is 0x800000000 (above 32-bit addressable range)
> + * - The eMMC controller DMA engine is limited to 32-bit addressing
> + * - SMMU cannot be used on this path due to hardware design flaws
> + * - These are fixed in silicon and cannot be changed in software
> + *
> + * Bus/controller mapping:
> + * - No registers are available to reprogram the address mapping
> + * - The 32-bit DMA limit is a hard constraint of the controller IP
> + *
> + * Given these constraints, an SRAM-based bounce buffer in the 32-bit
> + * address space is required to enable eMMC DMA on this platform.
> + */
> + err = bst_sdhci_reallocate_bounce_buffer(host);
> + if (err) {
> + dev_err(&pdev->dev, "Failed to allocate bounce buffer: %d\n", err);
> + goto err_remove_host;
> + }
FYI, I will be awaiting a confirmation from Arnd to be with the above
hack, before I queue this up.
> +
> + return 0;
> +
> +err_remove_host:
> + sdhci_remove_host(host, 1);
> +err:
> + sdhci_pltfm_free(pdev);
> + return err;
> +}
> +
[...]
Kind regards
Uffe
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v3 5/8] mmc: sdhci: add Black Sesame Technologies BST C1200 controller driver
2025-08-18 10:48 ` Ulf Hansson
@ 2025-08-18 12:08 ` Arnd Bergmann
0 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2025-08-18 12:08 UTC (permalink / raw)
To: Ulf Hansson, yangzh0906@thundersoft.com
Cc: Krzysztof Kozlowski, Rob Herring, krzk+dt, Conor Dooley,
Catalin Marinas, Will Deacon, Adrian Hunter, Robin Murphy,
ding.wang, gordon.ge, bst-upstream, linux-arm-kernel, devicetree,
linux-mmc @ vger . kernel . org, soc, linux-kernel
On Mon, Aug 18, 2025, at 12:48, Ulf Hansson wrote:
> On Tue, 12 Aug 2025 at 14:31, Albert Yang <yangzh0906@thundersoft.com> wrote:
>> + /*
>> + * Silicon constraints for BST C1200:
>> + * - System RAM base is 0x800000000 (above 32-bit addressable range)
>> + * - The eMMC controller DMA engine is limited to 32-bit addressing
>> + * - SMMU cannot be used on this path due to hardware design flaws
>> + * - These are fixed in silicon and cannot be changed in software
>> + *
>> + * Bus/controller mapping:
>> + * - No registers are available to reprogram the address mapping
>> + * - The 32-bit DMA limit is a hard constraint of the controller IP
>> + *
>> + * Given these constraints, an SRAM-based bounce buffer in the 32-bit
>> + * address space is required to enable eMMC DMA on this platform.
>> + */
>> + err = bst_sdhci_reallocate_bounce_buffer(host);
>> + if (err) {
>> + dev_err(&pdev->dev, "Failed to allocate bounce buffer: %d\n", err);
>> + goto err_remove_host;
>> + }
>
> FYI, I will be awaiting a confirmation from Arnd to be with the above
> hack, before I queue this up.
The explanations here are clear enough to me,
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v3 5/8] mmc: sdhci: add Black Sesame Technologies BST C1200 controller driver
2025-08-12 12:31 ` [PATCH v3 5/8] mmc: sdhci: add Black Sesame Technologies BST C1200 controller driver Albert Yang
2025-08-18 10:48 ` Ulf Hansson
@ 2025-08-18 18:16 ` Adrian Hunter
1 sibling, 0 replies; 24+ messages in thread
From: Adrian Hunter @ 2025-08-18 18:16 UTC (permalink / raw)
To: Albert Yang, krzk, robh, krzk+dt, conor+dt, ulf.hansson,
catalin.marinas, will, arnd, robin.murphy, ding.wang, gordon.ge
Cc: bst-upstream, linux-arm-kernel, devicetree, linux-mmc, soc,
linux-kernel
On 12/08/2025 15:31, Albert Yang wrote:
> Add SDHCI controller driver for Black Sesame Technologies C1200 SoC.
>
> This driver supports the DWCMSHC SDHCI controller with BST-specific
> enhancements including:
> - Custom clock management and tuning
> - Power management support
> - BST-specific register configurations
> - Support for eMMC and SD card interfaces
> - Hardware limitation workaround for 32-bit DMA addressing
>
> The driver addresses specific hardware constraints where:
> - System memory uses 64-bit bus, eMMC controller uses 32-bit bus
> - eMMC controller cannot access memory through SMMU due to hardware bug
> - All system DRAM is configured outside 4GB boundary (ZONE_DMA32)
> - Uses SRAM-based bounce buffer within 32-bit address space
>
> Signed-off-by: Ge Gordon <gordon.ge@bst.ai>
> Signed-off-by: Albert Yang <yangzh0906@thundersoft.com>
> ---
> Change for v3:
> Code improvements based on review feedback:
> - Simplified dwcmshc_priv structure by removing unused fields
> - Improved helper functions with better encapsulation
> - Used devm_platform_ioremap_resource() for resource management
> - Updated Kconfig description and alphabetical ordering
> - clarify documentation on hardware limitations and bounce buffer
> approach
> - remove duplicate sdhci_writew SDHCI_CLOCK_CONTROL
>
> Changes for v2:
> 1. Dependency Simplification :
> - Removed COMMON_CLK dependency from Kconfig (MMC_SDHCI_BST)
> - Add ARCH_BST || COMPILE_TEST dependency from Kconfig (MMC_SDHCI_BST)
>
> 2. Resource Management Improvements :
> - Replaced temporary ioremap with persistent mapping
> * Mapped CRM registers once during probe instead of per-access
> * Added proper cleanup in remove callback
> - Refactored bounce buffer allocation:
> * Simplified error handling and memory management
> * Removed unnecessary DMA configuration layers
>
> 3. Code Cleanup & Optimization :
> - Pruned unused headers and legacy vendor debug code
> - Removed deprecated sdhci_bst_print_vendor() export
> - Converted internal functions to static scope
> - Standardized naming conventions:
> * Renamed DRIVER_NAME to match kernel standards
> * Changed default_max_freq to DEFAULT_MAX_FREQ
> - Optimized clock configuration routines
>
> 4. Hardware Integration Fixes :
> - Fixed register access macros for EMMC_CTRL
> * Added proper offset calculation via SDHCI_VENDOR_PTR_R
> - Corrected device tree compatibility string to:
> "bst,c1200-dwcmshc-sdhci"
>
> 5. Error Handling Enhancements :
> - Added robust ioremap error checking
> - Improved bounce buffer allocation failure handling
> - Streamlined probe/remove flow
>
> 6. Maintainability :
> - Updated MODULE_DESCRIPTION and AUTHOR fields
> - Added explanatory comments for hardware limitations
> - Removed redundant multi-host setup infrastructure
>
> 7. fix build warnings from lkp
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes:
> https://lore.kernel.org/oe-kbuild-all/202505290615.GZzN5rNL-lkp@intel.com/
> ---
> drivers/mmc/host/Kconfig | 14 +
> drivers/mmc/host/Makefile | 1 +
> drivers/mmc/host/sdhci-of-bst-c1200.c | 510 ++++++++++++++++++++++++++
> 3 files changed, 525 insertions(+)
> create mode 100644 drivers/mmc/host/sdhci-of-bst-c1200.c
>
> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index c3f0f41a426d..fb057c46949b 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -429,6 +429,20 @@ config MMC_SDHCI_BCM_KONA
>
> If you have a controller with this interface, say Y or M here.
>
> +config MMC_SDHCI_BST
> + tristate "SDHCI support for Black Sesame Technologies BST C1200 controller"
> + depends on ARCH_BST || COMPILE_TEST
> + depends on MMC_SDHCI_PLTFM
> + depends on OF
> + help
> + This selects the Secure Digital Host Controller Interface (SDHCI)
> + for Black Sesame Technologies BST C1200 SoC. The controller is
> + based on Synopsys DesignWare Cores Mobile Storage Controller but
> + requires platform-specific workarounds for hardware limitations.
> +
> + If you have a controller with this interface, say Y or M here.
> + If unsure, say N.
> +
> config MMC_SDHCI_F_SDH30
> tristate "SDHCI support for Fujitsu Semiconductor F_SDH30"
> depends on MMC_SDHCI_PLTFM
> diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
> index 75bafc7b162b..bb5df05c3174 100644
> --- a/drivers/mmc/host/Makefile
> +++ b/drivers/mmc/host/Makefile
> @@ -13,6 +13,7 @@ obj-$(CONFIG_MMC_MXS) += mxs-mmc.o
> obj-$(CONFIG_MMC_SDHCI) += sdhci.o
> obj-$(CONFIG_MMC_SDHCI_UHS2) += sdhci-uhs2.o
> obj-$(CONFIG_MMC_SDHCI_PCI) += sdhci-pci.o
> +obj-$(CONFIG_MMC_SDHCI_BST) += sdhci-of-bst-c1200.o
> sdhci-pci-y += sdhci-pci-core.o sdhci-pci-o2micro.o sdhci-pci-arasan.o \
> sdhci-pci-dwc-mshc.o sdhci-pci-gli.o
> obj-$(CONFIG_MMC_SDHCI_ACPI) += sdhci-acpi.o
> diff --git a/drivers/mmc/host/sdhci-of-bst-c1200.c b/drivers/mmc/host/sdhci-of-bst-c1200.c
> new file mode 100644
> index 000000000000..6d2ba4232306
> --- /dev/null
> +++ b/drivers/mmc/host/sdhci-of-bst-c1200.c
Unless you foresee more BST sdhci drivers, maybe sdhci-of-bst.c is an
easier file name to deal with.
> @@ -0,0 +1,510 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Black Sesame Technologies SDHCI driver
> + *
> + * Copyright (C) 2024 Black Sesame Technologies. All Rights Reserved.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + */
> +
> +#include <linux/delay.h>
> +#include <linux/dma-mapping.h>
> +#include <linux/ioport.h>
> +#include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/of_reserved_mem.h>
> +#include <linux/platform_device.h>
> +#include "sdhci.h"
> +#include "sdhci-pltfm.h"
> +
> +struct dwcmshc_priv {
Name sdhci_bst_priv perhaps, see comment further below about
names.
> + void __iomem *crm_reg_base;
> +};
> +
> +#define SDHCI_CLOCK_PLL_EN 0x0008
> +#define SDHCI_TUNING_COUNT 0x20
> +#define SDHCI_VENDOR_PTR_R 0xE8
> +#define MBIU_CTRL 0x510
> +#define BURST_INCR16_EN BIT(3)
> +#define BURST_INCR8_EN BIT(2)
> +#define BURST_INCR4_EN BIT(1)
> +#define BURST_EN (BURST_INCR16_EN | BURST_INCR8_EN | BURST_INCR4_EN)
> +
> +/* Synopsys vendor specific registers */
> +#define SDHC_EMMC_CTRL_R_OFFSET 0x2C
> +
> +#define SDEMMC_CRM_BCLK_DIV_CTRL 0x08
> +#define SDEMMC_CRM_RX_CLK_CTRL 0x14
> +#define SDEMMC_CRM_TIMER_DIV_CTRL 0x0C
> +#define SDEMMC_CRM_VOL_CTRL 0x1C
> +#define REG_WR_PROTECT 0x88
> +#define REG_WR_PROTECT_KEY 0x1234abcd
> +#define DELAY_CHAIN_SEL 0x94
> +#define BST_VOL_STABLE_ON BIT(7)
> +#define DEFAULT_MAX_FREQ 200000UL
> +
> +static u32 bst_crm_read(struct sdhci_pltfm_host *pltfm_host, u32 offset)
> +{
> + struct dwcmshc_priv *priv = sdhci_pltfm_priv(pltfm_host);
> +
> + return ioread32(priv->crm_reg_base + offset);
Are ioread32() / iowrite32() actually needed instead of readl() / writel()?
> +}
> +
> +static void bst_crm_write(struct sdhci_pltfm_host *pltfm_host, u32 offset, u32 value)
> +{
> + struct dwcmshc_priv *priv = sdhci_pltfm_priv(pltfm_host);
> +
> + iowrite32(value, priv->crm_reg_base + offset);
> +}
> +
> +static unsigned int bst_get_max_clock(struct sdhci_host *host)
> +{
> + return host->mmc->f_max;
> +}
> +
> +static unsigned int bst_get_min_clock(struct sdhci_host *host)
> +{
> + return host->mmc->f_min;
But what sets f_min? Should make sure it has a value.
> +}
> +
> +struct rx_ctrl {
Looks like the intention is for this to be a union not a struct
> + struct {
> + u32 rx_revert:1;
> + u32 rx_clk_sel_sec:1;
> + u32 rx_clk_div:4;
> + u32 rx_clk_phase_inner:2;
> + u32 rx_clk_sel_first:1;
> + u32 rx_clk_phase_out:2;
> + u32 rx_clk_en:1;
> + u32 res0:20;
> + } bit;
It isn't necessary for the struct to have a name, so like:
union rx_ctrl {
struct {
u32 rx_revert:1,
rx_clk_sel_sec:1,
rx_clk_div:4,
rx_clk_phase_inner:2,
rx_clk_sel_first:1,
rx_clk_phase_out:2,
rx_clk_en:1,
res0:20;
};
u32 reg;
};
> + u32 reg;
> +};
> +
> +struct sdmmc_iocfg {
Not used
> + struct {
> + u32 res0:16;
> + u32 SC_SDMMC0_PVDD18POCSD0:2;
> + u32 SC_SDMMC0_PVDD18POCSD1:2;
> + u32 SC_SDMMC0_PVDD18POCSD2:2;
> + u32 SC_SDMMC1_PVDD18POCSD0:2;
> + u32 SC_SDMMC1_PVDD18POCSD1:2;
> + u32 SC_SDMMC1_PVDD18POCSD2:2;
> + u32 res1:4;
> + } bit;
> + u32 reg;
> +};
> +
> +static void sdhci_enable_bst_clk(struct sdhci_host *host, unsigned int clk)
Function naming is a bit inconsistent. Please try to have
a common prefix such as sdhci_bst, so for example
sdhci_enable_bst_clk -> sdhci_bst_enable_clk
> +{
> + struct sdhci_pltfm_host *pltfm_host;
> + unsigned int div;
> + u32 val;
> + struct rx_ctrl rx_reg;
> +
> + pltfm_host = sdhci_priv(host);
> + if (clk == 0) {
> + div = clk;
> + } else if (clk > DEFAULT_MAX_FREQ) {
> + div = clk / 1000;
> + div = DEFAULT_MAX_FREQ / div;
> + } else if (clk < 1500) {
> + div = clk;
> + } else {
> + div = DEFAULT_MAX_FREQ * 100;
> + div = div / clk;
> + div /= 100;
> + }
> +
> + clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
> + clk &= ~SDHCI_CLOCK_CARD_EN;
> + sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL);
> +
> + clk &= ~SDHCI_CLOCK_PLL_EN;
> + sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL);
> +
> + val = bst_crm_read(pltfm_host, SDEMMC_CRM_TIMER_DIV_CTRL);
> + val &= ~BIT(8);
> + bst_crm_write(pltfm_host, SDEMMC_CRM_TIMER_DIV_CTRL, val);
> +
> + val = bst_crm_read(pltfm_host, SDEMMC_CRM_TIMER_DIV_CTRL);
> + val &= ~0xff;
> + val |= 0x20;
BIT() and other special values should be #define'd
here and elsewhere
> + bst_crm_write(pltfm_host, SDEMMC_CRM_TIMER_DIV_CTRL, val);
> +
> + val = bst_crm_read(pltfm_host, SDEMMC_CRM_TIMER_DIV_CTRL);
> + val |= BIT(8);
> + bst_crm_write(pltfm_host, SDEMMC_CRM_TIMER_DIV_CTRL, val);
> +
> + val = bst_crm_read(pltfm_host, SDEMMC_CRM_RX_CLK_CTRL);
> + val &= ~BIT(11);
> + bst_crm_write(pltfm_host, SDEMMC_CRM_RX_CLK_CTRL, val);
> +
> + rx_reg.reg = bst_crm_read(pltfm_host, SDEMMC_CRM_RX_CLK_CTRL);
> +
> + rx_reg.bit.rx_revert = 0;
> + rx_reg.bit.rx_clk_sel_sec = 1;
> + rx_reg.bit.rx_clk_div = 4;
> + rx_reg.bit.rx_clk_phase_inner = 2;
> + rx_reg.bit.rx_clk_sel_first = 0;
> + rx_reg.bit.rx_clk_phase_out = 2;
> +
> + bst_crm_write(pltfm_host, SDEMMC_CRM_RX_CLK_CTRL, rx_reg.reg);
> +
> + val = bst_crm_read(pltfm_host, SDEMMC_CRM_RX_CLK_CTRL);
> + val |= BIT(11);
> + bst_crm_write(pltfm_host, SDEMMC_CRM_RX_CLK_CTRL, val);
> +
> + /* Disable clock first */
> + val = bst_crm_read(pltfm_host, SDEMMC_CRM_BCLK_DIV_CTRL);
> + val &= ~BIT(10);
> + bst_crm_write(pltfm_host, SDEMMC_CRM_BCLK_DIV_CTRL, val);
> +
> + /* Setup clock divider */
> + val = bst_crm_read(pltfm_host, SDEMMC_CRM_BCLK_DIV_CTRL);
> + val &= ~GENMASK(9, 0);
> + val |= div;
> + bst_crm_write(pltfm_host, SDEMMC_CRM_BCLK_DIV_CTRL, val);
> +
> + /* Enable clock */
> + val = bst_crm_read(pltfm_host, SDEMMC_CRM_BCLK_DIV_CTRL);
> + val |= BIT(10);
> + bst_crm_write(pltfm_host, SDEMMC_CRM_BCLK_DIV_CTRL, val);
> +
> + sdhci_writew(host, (div & 0xff) << 8, SDHCI_CLOCK_CONTROL);
> +
> + clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
> + clk |= SDHCI_CLOCK_PLL_EN;
> + sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL);
> +
> + clk |= SDHCI_CLOCK_CARD_EN;
> + sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL);
> +
> + clk |= SDHCI_CLOCK_INT_EN;
> + sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL);
> +}
> +
> +static void sdhci_set_bst_clock(struct sdhci_host *host, unsigned int clock)
sdhci_bst_set_clock
> +{
> + if (clock == 0)
> + return;
The clock should be tuned off if it is 0. If there is a
reason not to, then add a comment explaining.
> + sdhci_enable_bst_clk(host, clock);
> +}
> +
> +/**
> + * sdhci_bst_reset - Reset the SDHCI host controller
> + * @host: SDHCI host controller
> + * @mask: Reset mask
> + *
> + * Performs a reset of the SDHCI host controller with special handling for eMMC.
> + */
> +static void sdhci_bst_reset(struct sdhci_host *host, u8 mask)
> +{
> + u16 vendor_ptr, emmc_ctrl_reg;
> +
> + if (host->mmc->caps2 & MMC_CAP2_NO_SD) {
> + vendor_ptr = sdhci_readw(host, SDHCI_VENDOR_PTR_R);
> + emmc_ctrl_reg = vendor_ptr + SDHC_EMMC_CTRL_R_OFFSET;
> +
> + sdhci_writew(host,
> + sdhci_readw(host, emmc_ctrl_reg) & (~BIT(2)),
> + emmc_ctrl_reg);
Should #define BIT(2). Also read, update, write seems
more readable e.g.
reg = sdhci_readw(host, emmc_ctrl_reg);
reg &= ~WHATEVER_IS_BIT_2;
sdhci_writew(host, reg, emmc_ctrl_reg);
> + sdhci_reset(host, mask);
> + usleep_range(10, 20);
> + sdhci_writew(host,
> + sdhci_readw(host, emmc_ctrl_reg) | BIT(2),
> + emmc_ctrl_reg);
> + } else {
> + sdhci_reset(host, mask);
> + }
> +}
> +
> +/**
> + * sdhci_bst_timeout - Set timeout value for commands
> + * @host: SDHCI host controller
> + * @cmd: MMC command
> + *
> + * Sets the timeout control register to maximum value (0xE).
> + */
> +static void sdhci_bst_timeout(struct sdhci_host *host, struct mmc_command *cmd)
> +{
> + sdhci_writeb(host, 0xE, SDHCI_TIMEOUT_CONTROL);
> +}
> +
> +/**
> + * sdhci_bst_set_power - Set power mode and voltage
> + * @host: SDHCI host controller
> + * @mode: Power mode to set
> + * @vdd: Voltage to set
> + *
> + * Sets power mode and voltage, also configures MBIU control register.
> + */
> +static void sdhci_bst_set_power(struct sdhci_host *host, unsigned char mode,
> + unsigned short vdd)
> +{
> + sdhci_set_power(host, mode, vdd);
> + sdhci_writeb(host, 0xF, SDHCI_POWER_CONTROL);
> + sdhci_writew(host,
> + (sdhci_readw(host, MBIU_CTRL) & (~0xf)) | BURST_EN,
> + MBIU_CTRL);
Doesn't look like it caters for mode == MMC_POWER_OFF
Also prefer read, update, write e.g.
reg = sdhci_readw(host, MBIU_CTRL)
reg &= ~BURST_MASK;
reg |= BURST_EN;
sdhci_writew(host, reg, MBIU_CTRL);
> +}
> +
> +/**
> + * bst_sdhci_execute_tuning - Execute tuning procedure
> + * @host: SDHCI host controller
> + * @opcode: Opcode to use for tuning
> + *
> + * Performs tuning procedure by trying different values and selecting the best one.
> + *
> + * Return: 0 on success, negative errno on failure
> + */
> +static int bst_sdhci_execute_tuning(struct sdhci_host *host, u32 opcode)
sdhci_bst_execute_tuning
> +{
> + struct sdhci_pltfm_host *pltfm_host;
> + unsigned int clk = 0, timeout;
> + int ret = 0, error;
> + int start0 = -1, end0 = -1, best = 0;
> + int start1 = -1, end1 = -1, flag = 0;
> + int i;
> +
> + pltfm_host = sdhci_priv(host);
> +
> + for (i = 0; i < SDHCI_TUNING_COUNT; i++) {
> + /* Protected write */
> + bst_crm_write(pltfm_host, REG_WR_PROTECT, REG_WR_PROTECT_KEY);
> + /* Write tuning value */
> + bst_crm_write(pltfm_host, DELAY_CHAIN_SEL, (1ul << i) - 1);
> +
> + timeout = 20;
> + while (!((clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL)) &
> + SDHCI_CLOCK_INT_STABLE)) {
> + if (timeout == 0) {
> + dev_err(mmc_dev(host->mmc), "Internal clock never stabilised\n");
> + return -EBUSY;
> + }
> + timeout--;
> + usleep_range(1000, 1100);
> + }
As Ulf already mentioned, read_poll_timeout() can be used e.g.
if (read_poll_timeout(sdhci_readw, clock, (clock & SDHCI_CLOCK_INT_STABLE),
1000, 1100, false, host, SDHCI_CLOCK_CONTROL)) {
dev_err(mmc_dev(host->mmc), "Internal clock never stabilised\n");
return -EBUSY;
}
> +
> + ret = mmc_send_tuning(host->mmc, opcode, &error);
> + if (ret != 0) {
> + flag = 1;
> + } else {
> + if (flag == 0) {
> + if (start0 == -1)
> + start0 = i;
> + end0 = i;
> + } else {
> + if (start1 == -1)
> + start1 = i;
> + end1 = i;
> + }
> + }
> + }
> +
> + /* Calculate best tuning value */
> + if (end0 - start0 >= end1 - start1)
> + best = ((end0 - start0) >> 1) + start0;
> + else
> + best = ((end1 - start1) >> 1) + start1;
> +
> + if (best < 0)
> + best = 0;
> +
> + bst_crm_write(pltfm_host, DELAY_CHAIN_SEL, (1ul << best) - 1);
> + timeout = 20;
> +
> + while (!((clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL)) &
> + SDHCI_CLOCK_INT_STABLE)) {
> + if (timeout == 0) {
> + dev_err(mmc_dev(host->mmc), "Internal clock never stabilised\n");
> + return -EBUSY;
> + }
> + timeout--;
> + usleep_range(1000, 1100);
> + }
Same code as above, maybe make it a separate function.
> +
> + return 0;
> +}
> +
> +/**
> + * sdhci_bst_voltage_switch - Perform voltage switch
> + * @host: SDHCI host controller
> + *
> + * Enables voltage stable power.
> + */
> +static void sdhci_bst_voltage_switch(struct sdhci_host *host)
> +{
> + struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
> +
> + /* vol stable power on */
> + bst_crm_write(pltfm_host, SDEMMC_CRM_VOL_CTRL, BST_VOL_STABLE_ON);
> +}
> +
> +static const struct sdhci_ops sdhci_dwcmshc_ops = {
sdhci_bst_ops
> + .set_clock = sdhci_set_bst_clock,
> + .set_bus_width = sdhci_set_bus_width,
> + .set_uhs_signaling = sdhci_set_uhs_signaling,
> + .get_min_clock = bst_get_min_clock,
> + .get_max_clock = bst_get_max_clock,
> + .reset = sdhci_bst_reset,
> + .set_power = sdhci_bst_set_power,
> + .set_timeout = sdhci_bst_timeout,
> + .platform_execute_tuning = bst_sdhci_execute_tuning,
> + .voltage_switch = sdhci_bst_voltage_switch,
> +};
> +
> +static const struct sdhci_pltfm_data sdhci_dwcmshc_pdata = {
sdhci_bst_pdata
> + .ops = &sdhci_dwcmshc_ops,
> + .quirks = SDHCI_QUIRK_DELAY_AFTER_POWER |
> + SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN |
> + SDHCI_QUIRK_INVERTED_WRITE_PROTECT,
> + .quirks2 = SDHCI_QUIRK2_BROKEN_DDR50 |
> + SDHCI_QUIRK2_TUNING_WORK_AROUND |
> + SDHCI_QUIRK2_ACMD23_BROKEN,
> +};
> +
> +static int bst_sdhci_reallocate_bounce_buffer(struct sdhci_host *host)
sdhci_bst_reallocate_bounce_buffer
> +{
> + struct mmc_host *mmc = host->mmc;
> + unsigned int max_blocks;
> + unsigned int bounce_size;
> + int ret;
> +
> + /*
> + * Cap the bounce buffer at 32KB. Using a bigger bounce buffer
> + * has diminishing returns, this is probably because SD/MMC
> + * cards are usually optimized to handle this size of requests.
> + */
That comment is copied from sdhci.c and makes less sense here.
Presumably the size is fixed by hardware. Probably better
to leave out the comment.
> + bounce_size = SZ_32K;
> + /*
> + * Adjust downwards to maximum request size if this is less
> + * than our segment size, else hammer down the maximum
> + * request size to the maximum buffer size.
> + */
> + if (mmc->max_req_size < bounce_size)
> + bounce_size = mmc->max_req_size;
Similarly, 32K is your max request size, so there is no need
of that logic or comment.
> + max_blocks = bounce_size / 512;
> +
> + ret = of_reserved_mem_device_init_by_idx(mmc_dev(mmc), mmc_dev(mmc)->of_node, 0);
> + if (ret) {
> + dev_err(mmc_dev(mmc), "Failed to initialize reserved memory\n");
> + return ret;
> + }
> +
> + host->bounce_buffer = dma_alloc_coherent(mmc_dev(mmc), bounce_size,
> + &host->bounce_addr, GFP_KERNEL);
> + if (!host->bounce_buffer)
> + return -ENOMEM;
> +
> + host->bounce_buffer_size = bounce_size;
> +
> + /* Lie about this since we're bouncing */
> + mmc->max_segs = max_blocks;
> + mmc->max_seg_size = bounce_size;
> + mmc->max_req_size = bounce_size;
If you make the change I suggest below to sdhci.c then
the above 4 lines won't be needed.
> +
> + return 0;
> +}
> +
> +static int dwcmshc_probe(struct platform_device *pdev)
sdhci_bst_probe
> +{
> + struct sdhci_pltfm_host *pltfm_host;
> + struct sdhci_host *host;
> + struct dwcmshc_priv *priv;
> + int err;
> +
> + host = sdhci_pltfm_init(pdev, &sdhci_dwcmshc_pdata,
> + sizeof(struct dwcmshc_priv));
It is ok to use up to 100 columns, so line wrapping is not needed
here.
> + if (IS_ERR(host))
> + return PTR_ERR(host);
> +
> + pltfm_host = sdhci_priv(host);
> + priv = sdhci_pltfm_priv(pltfm_host);
> +
> + err = mmc_of_parse(host->mmc);
> + if (err)
> + goto err;
> +
> + sdhci_get_of_property(pdev);
> +
> + /* Get CRM registers from the second reg entry */
> + priv->crm_reg_base = devm_platform_ioremap_resource(pdev, 1);
> + if (IS_ERR(priv->crm_reg_base)) {
> + err = PTR_ERR(priv->crm_reg_base);
> + goto err;
> + }
> +
> + err = sdhci_add_host(host);
> + if (err)
> + goto err;
> +
> + /*
> + * Silicon constraints for BST C1200:
> + * - System RAM base is 0x800000000 (above 32-bit addressable range)
> + * - The eMMC controller DMA engine is limited to 32-bit addressing
> + * - SMMU cannot be used on this path due to hardware design flaws
> + * - These are fixed in silicon and cannot be changed in software
> + *
> + * Bus/controller mapping:
> + * - No registers are available to reprogram the address mapping
> + * - The 32-bit DMA limit is a hard constraint of the controller IP
> + *
> + * Given these constraints, an SRAM-based bounce buffer in the 32-bit
> + * address space is required to enable eMMC DMA on this platform.
> + */
> + err = bst_sdhci_reallocate_bounce_buffer(host);
> + if (err) {
> + dev_err(&pdev->dev, "Failed to allocate bounce buffer: %d\n", err);
> + goto err_remove_host;
> + }
This would normally need to be done after sdhci_setup_host() and
before __sdhci_add_host() because adding the host starts it.
However, I would prefer to alter sdhci.c to allow it to be done
before sdhci_add_host().
Please make a separate patch for the change below, and then do
the bounce buffer allocation before calling sdhci_add_host.
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 3a17821efa5c..36d3a90cfe47 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -4193,6 +4193,13 @@ static void sdhci_allocate_bounce_buffer(struct sdhci_host *host)
unsigned int bounce_size;
int ret;
+ /* Drivers may have already allocated the buffer */
+ if (host->bounce_buffer) {
+ bounce_size = host->bounce_buffer_size;
+ max_blocks = bounce_size / 512;
+ goto out;
+ }
+
/*
* Cap the bounce buffer at 64KB. Using a bigger bounce buffer
* has diminishing returns, this is probably because SD/MMC
@@ -4240,7 +4247,7 @@ static void sdhci_allocate_bounce_buffer(struct sdhci_host *host)
}
host->bounce_buffer_size = bounce_size;
-
+out:
/* Lie about this since we're bouncing */
mmc->max_segs = max_blocks;
mmc->max_seg_size = bounce_size;
> +
> + return 0;
> +
> +err_remove_host:
> + sdhci_remove_host(host, 1);
> +err:
> + sdhci_pltfm_free(pdev);
There is no sdhci_pltfm_free() anymore.
> + return err;
> +}
> +
> +static void dwcmshc_remove(struct platform_device *pdev)
sdhci_bst_remove
> +{
> + struct sdhci_host *host = platform_get_drvdata(pdev);
> +
> + /* Free bounce buffer if allocated */
> + if (host->bounce_buffer) {
> + dma_free_coherent(mmc_dev(host->mmc), host->bounce_buffer_size,
> + host->bounce_buffer, host->bounce_addr);
> + host->bounce_buffer = NULL;
> + }
> +
> + /* Release reserved memory */
> + of_reserved_mem_device_release(mmc_dev(host->mmc));
> +
> + sdhci_remove_host(host, 0);
Because sdhci_pltfm_init() was used, sdhci_pltfm_remove() shoud be
used here not sdhci_remove_host(host, 0) directly.
> + sdhci_pltfm_free(pdev);
> +}
> +
> +static const struct of_device_id sdhci_dwcmshc_dt_ids[] = {
sdhci_bst_ids
> + { .compatible = "bst,c1200-dwcmshc-sdhci" },
> + {}
> +};
> +MODULE_DEVICE_TABLE(of, sdhci_dwcmshc_dt_ids);
> +
> +static struct platform_driver sdhci_dwcmshc_driver = {
sdhci_bst_driver
> + .driver = {
> + .name = "sdhci-dwcmshc",
"sdhci-dwcmshc" has been used. Maybe "sdhci-bst"
> + .of_match_table = sdhci_dwcmshc_dt_ids,
> + },
> + .probe = dwcmshc_probe,
> + .remove = dwcmshc_remove,
> +};
> +module_platform_driver(sdhci_dwcmshc_driver);
> +
> +MODULE_DESCRIPTION("Black Sesame Technologies DWCMSHC SDHCI driver");
> +MODULE_AUTHOR("Black Sesame Technologies Co., Ltd.");
> +MODULE_LICENSE("GPL");
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH v3 6/8] arm64: dts: bst: add support for Black Sesame Technologies C1200 CDCU1.0 board
2025-08-12 16:16 ` Krzysztof Kozlowski
@ 2025-09-03 3:40 ` Albert Yang
2025-09-03 6:14 ` Krzysztof Kozlowski
0 siblings, 1 reply; 24+ messages in thread
From: Albert Yang @ 2025-09-03 3:40 UTC (permalink / raw)
To: krzk
Cc: adrian.hunter, arnd, conor+dt, devicetree, gordon.ge, krzk+dt,
linux-arm-kernel, linux-kernel, robh, yangzh0906
On Tue, Aug 12, 2025 at 06:16:08PM +0200, Krzysztof Kozlowski wrote:
> On 12/08/2025 14:31, Albert Yang wrote:
Thank you for the detailed review and your patience. Apologies for not addressing these properly in v1/v2.
I have fixed the issues in my local tree and will send v4. Below are my point-by-point replies.
> > +&uart0 {
> > + status = "okay";
> > +};
> > +
> > +&mmc0 {
>
> This is none of the two approved ordering styles from DTS coding style.
> What sort of coding style are you using?
>
Thank you for pointing this out. I did not follow the DTS coding style correctly earlier. I have re-read the DTS coding style and the relevant dt-bindings documentation:
https://docs.kernel.org/devicetree/bindings/dts-coding-style.html
> > + cpu@0 {
> > + compatible = "arm,cortex-a78";
> > + device_type = "cpu";
> > + enable-method = "psci";
> > + next-level-cache = <&l2_cache>;
> > + reg = <0>;
>
> 0x0
>
> And why reg is the last? Please follow DTS coding style.
>
> I already asked for this at v1. How did you resolve that comment?
>
> Then I asked about this at v2:
>
> "Nothing improved. I asked to follow DTS coding style in ordering."
>
> So can you please respond to comments? You keep sending the same - third
> time - and this is waste of our time.
>
I referenced the ARM CPU node binding: Documentation/devicetree/bindings/arm/cpus.yaml
Updated as follows
cpu@0 {
device_type = "cpu";
compatible = "arm,cortex-a78";
reg = <0x0>;
enable-method = "psci";
next-level-cache = <&l2_cache>;
};
> > + mmc0: mmc@22200000 {
> > + compatible = "bst,c1200-dwcmshc-sdhci";
> > + reg = <0x0 0x22200000 0x0 0x1000>,
> > + <0x0 0x23006000 0x0 0x1000>;
> > + interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
> > + clocks = <&clk_mmc>;
> > + clock-names = "core";
> > + max-frequency = <200000000>;
> > + bus-width = <8>;
> > + non-removable;
>
> Hm, this is odd to see in SoC. Are you saying that your SoC (!) has MMC
> memory embedded?
>
> > + dma-coherent;
> > + status = "disabled";
>
> If so, why is it disabled?
Good catch. The device is not SoC-embedded; it is a board-level eMMC. Changes:
- Removed non-removable from the SoC dtsi
- Kept the controller disabled in the SoC dtsi
- Enabled the controller and set non-removable in the board DTS (&mmc0)
Updates:
in bstc1200.dtsi:
mmc0: mmc@22200000 {
compatible = "bst,c1200-dwcmshc-sdhci";
reg = <0x0 0x22200000 0x0 0x1000>,
<0x0 0x23006000 0x0 0x1000>;
interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk_mmc>;
clock-names = "core";
max-frequency = <200000000>;
status = "disabled";
};
in board bstc1200-cdcu1.0-adas_4c2g.dts:
&mmc0 {
bus-width = <8>;
memory-region = <&mmc0_reserved>;
non-removable;
status = "okay";
};
> > + gic: interrupt-controller@32800000 {
> > + compatible = "arm,gic-v3";
> > + #interrupt-cells = <3>;
> > + #address-cells = <2>;
> > + #size-cells = <2>;
> > + interrupt-controller;
> > + ranges;
> > + reg = <0x0 0x32800000 0x0 0x10000>,
> > + <0x0 0x32880000 0x0 0x100000>;
>
> Random order...
Refs: arm,gic‑v3 binding
https://raw.githubusercontent.com/torvalds/linux/master/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml
Updated as follows:
gic: interrupt-controller@32800000 {
compatible = "arm,gic-v3";
#interrupt-cells = <3>;
#address-cells = <2>;
#size-cells = <2>;
ranges;
interrupt-controller;
reg = <0x0 0x32800000 0x0 0x10000>,
<0x0 0x32880000 0x0 0x100000>;
interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_LOW>;
};
Thanks again for the review. If you have no objections to the current modifications,
I’ll post v4 accordingly.
Best regards,
Albert
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v3 6/8] arm64: dts: bst: add support for Black Sesame Technologies C1200 CDCU1.0 board
2025-09-03 3:40 ` Albert Yang
@ 2025-09-03 6:14 ` Krzysztof Kozlowski
0 siblings, 0 replies; 24+ messages in thread
From: Krzysztof Kozlowski @ 2025-09-03 6:14 UTC (permalink / raw)
To: Albert Yang
Cc: adrian.hunter, arnd, conor+dt, devicetree, gordon.ge, krzk+dt,
linux-arm-kernel, linux-kernel, robh
On 03/09/2025 05:40, Albert Yang wrote:
>
>>> + gic: interrupt-controller@32800000 {
>>> + compatible = "arm,gic-v3";
>>> + #interrupt-cells = <3>;
>>> + #address-cells = <2>;
>>> + #size-cells = <2>;
>>> + interrupt-controller;
>>> + ranges;
>>> + reg = <0x0 0x32800000 0x0 0x10000>,
>>> + <0x0 0x32880000 0x0 0x100000>;
>>
>> Random order...
>
> Refs: arm,gic‑v3 binding
> https://raw.githubusercontent.com/torvalds/linux/master/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml
> Updated as follows:
No, you need to finally read and follow DTS coding style.
> gic: interrupt-controller@32800000 {
> compatible = "arm,gic-v3";
> #interrupt-cells = <3>;
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2025-09-03 7:09 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-12 12:31 [PATCH v3 0/8] Introduce Black Sesame Technologies C1200 SoC and CDCU1.0 board Albert Yang
2025-08-12 12:31 ` [PATCH v3 1/8] dt-bindings: vendor-prefixes: Add Black Sesame Technologies Co., Ltd Albert Yang
2025-08-12 13:34 ` Krzysztof Kozlowski
2025-08-13 4:53 ` Albert Yang
2025-08-13 6:01 ` Krzysztof Kozlowski
2025-08-13 11:37 ` Albert Yang
2025-08-12 12:31 ` [PATCH v3 2/8] dt-bindings: arm: add Black Sesame Technologies (bst) SoC Albert Yang
2025-08-12 13:35 ` Krzysztof Kozlowski
2025-08-12 12:31 ` [PATCH v3 3/8] arm64: Kconfig: add ARCH_BST for Black Sesame Technologies SoCs Albert Yang
2025-08-12 12:31 ` [PATCH v3 4/8] dt-bindings: mmc: add binding for BST DWCMSHC SDHCI controller Albert Yang
2025-08-14 8:50 ` Krzysztof Kozlowski
2025-08-12 12:31 ` [PATCH v3 5/8] mmc: sdhci: add Black Sesame Technologies BST C1200 controller driver Albert Yang
2025-08-18 10:48 ` Ulf Hansson
2025-08-18 12:08 ` Arnd Bergmann
2025-08-18 18:16 ` Adrian Hunter
2025-08-12 12:31 ` [PATCH v3 6/8] arm64: dts: bst: add support for Black Sesame Technologies C1200 CDCU1.0 board Albert Yang
2025-08-12 16:16 ` Krzysztof Kozlowski
2025-09-03 3:40 ` Albert Yang
2025-09-03 6:14 ` Krzysztof Kozlowski
2025-08-12 12:31 ` [PATCH v3 7/8] arm64: defconfig: enable BST platform and SDHCI controller support Albert Yang
2025-08-12 13:38 ` Krzysztof Kozlowski
2025-08-13 11:56 ` Albert Yang
2025-08-12 12:31 ` [PATCH v3 8/8] MAINTAINERS: add and consolidate Black Sesame Technologies (BST) ARM SoC support Albert Yang
2025-08-12 13:33 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).