Introduce Black Sesame Technologies C1200 SoC and CDCU1.0 board
Subsystems (6)
v3 cover Introduce Black Sesame Technologies C1200 SoC and CDCU1.0 board
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 <[email protected]> | Closes:
https://lore.kernel.org/oe-kbuild-all/[email protected]/
- 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
Signature · 1 line
2.43.0
PATCH v3 1/8 dt-bindings: vendor-prefixes: Add Black Sesame Technologies Co., Ltd.
Black Sesame Technologies Co., Ltd.s a leading automotive-grade computing SoC and SoC-based
intelligent vehicle solution provider. Link: https://bst.ai/.
---
Changes for v3:
- No changes
Changes for v2:
- No changes
--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
@@ -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,.*":
Signature · 1 line
2.43.0
Krzysztof Kozlowski
maintainerRe: [PATCH v3 1/8] dt-bindings: vendor-prefixes: Add Black Sesame Technologies Co., Ltd.
Quoted 6 lines · 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/.Signed-off-by Ge Gordon <[email protected]>
Odd order of tags. When was the patch written, by who and when was the Ack given?
Quoted 17 lines
Signed-off-by Albert Yang <[email protected]>---
Changes for v3:
- No changesChanges for v2:
- No changes--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/vendor-prefixes.yaml +0
-0
Documentation/devicetree/bindings/vendor-prefixes.yaml patternProperties: · line 226
Quoted 5 lines
Documentation/devicetree/bindings/vendor-prefixes.yaml +2
-0@@ -222,6 +222,8 @@ patternProperties: description: Shenzhen BigTree Tech Co., LTD "^bitmain,.*": description: Bitmain Technologies + "^bst,.*": + description: Black Sesame Technologies Co., Ltd.
Messed ordering.
Documentation/devicetree/bindings/vendor-prefixes.yaml patternProperties: · line 229
Quoted 3 lines
Documentation/devicetree/bindings/vendor-prefixes.yaml +0
-0"^blaize,.*": description: Blaize, Inc. "^blutek,.*":
Best regards,
Krzysztof
Re: [PATCH v3 1/8] dt-bindings: vendor-prefixes: Add Black Sesame Technologies Co., Ltd.
Hi Krzysztof,
Thanks for the review.
Quoted 10 lines · Krzysztof Kozlowski
Quoted 6 lines · 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/.Signed-off-by Ge Gordon <[email protected]>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/[email protected]/
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.
Quoted 8 lines
Documentation/devicetree/bindings/vendor-prefixes.yaml patternProperties: · line 226
Quoted 6 lines
Documentation/devicetree/bindings/vendor-prefixes.yaml +2
-0@@ -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
Krzysztof Kozlowski
maintainerRe: [PATCH v3 1/8] dt-bindings: vendor-prefixes: Add Black Sesame Technologies Co., Ltd.
Quoted 10 lines · Albert Yang
Hi Krzysztof,
Thanks for the review.
Quoted 5 lines · Krzysztof Kozlowski
Quoted 4 lines · 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/.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Signed-off-by Ge Gordon <[email protected]>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/[email protected]/
So how it can appear before Ge signed off?
Best regards,
Krzysztof
Re: [PATCH v3 1/8] dt-bindings: vendor-prefixes: Add Black Sesame Technologies Co., Ltd.
Quoted 4 lines · Krzysztof Kozlowski
Quoted 3 lines · Albert Yang
Quoted 3 lines
Quoted 2 lines
Signed-off-by Ge Gordon <[email protected]>
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
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/[email protected]/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
PATCH v3 2/8 dt-bindings: arm: add Black Sesame Technologies (bst) SoC
In reply to Albert YangAdd device tree bindings for Black Sesame Technologies Arm SoC, it consists several SoC models like C1200, etc.
---
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
Documentation/devicetree/bindings/arm/bst.yaml new file +31 -0
@@ -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 <[email protected]> + +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 + +...
Signature · 1 line
2.43.0
Re: [PATCH v3 2/8] dt-bindings: arm: add Black Sesame Technologies (bst) SoC
Quoted 5 lines · 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 <[email protected]>Signed-off-by Albert Yang <[email protected]>
... and place it correctly please. This goes below or under your SoB. Not some other place.
Best regards,
Krzysztof
PATCH v3 3/8 arm64: Kconfig: add ARCH_BST for Black Sesame Technologies SoCs
In reply to Albert YangAdd 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.
---
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(+)
arch/arm64/Kconfig.platforms +8 -0
@@ -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
Signature · 1 line
2.43.0
PATCH v3 4/8 dt-bindings: mmc: add binding for BST DWCMSHC SDHCI controller
In reply to Albert YangAdd 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.
---
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
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +70 -0
@@ -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 <[email protected]> + +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; + }; + };
Signature · 1 line
2.43.0
Krzysztof Kozlowski
maintainerRe: [PATCH v3 4/8] dt-bindings: mmc: add binding for BST DWCMSHC SDHCI controller
Quoted 7 lines · 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.
Please drop this paragraph, it's completely redundant. You should rather describe the hardware.
Quoted 38 lines
Signed-off-by Ge Gordon <[email protected]>Signed-off-by Albert Yang <[email protected]>---
Changes for v3:
- Switch reg schema from maxItems to explicit items with per-entry descriptions
- Improve example: addirq.hinclude and wrap under a bus node with address/size cells
- Drop status = "disabled" from example; keep example concise
- Add Signed-off-by: Ge GordonChanges 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.yamlDocumentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +3
-0@@ -0,0 +1,70 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +---
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml line 13
Quoted 10 lines
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +10
-0+$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 <[email protected]> + +allOf: + - $ref: mmc-controller.yaml#
You want sdhci-common.yaml instead.
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml line 17
Quoted 4 lines
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +4
-0+ +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?)
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml line 28
Quoted 11 lines
Documentation/devicetree/bindings/mmc/bst,dwcmshc-sdhci.yaml new file +11
-0+ + reg: + items: + - description: Core SDHCI registers + - description: CRM registers + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1
Best regards,
Krzysztof
PATCH v3 5/8 mmc: sdhci: add Black Sesame Technologies BST C1200 controller driver
In reply to Albert YangAdd 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
---
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 <[email protected]> | Closes:
https://lore.kernel.org/oe-kbuild-all/[email protected]/
--- 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
drivers/mmc/host/Kconfig +14 -0
@@ -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
drivers/mmc/host/Makefile +1 -0
@@ -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
drivers/mmc/host/sdhci-of-bst-c1200.c new file +510 -0
510 lines not on this page · raw message
Signature · 1 line
2.43.0
Re: [PATCH v3 5/8] mmc: sdhci: add Black Sesame Technologies BST C1200 controller driver
Quoted 124 lines · 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 addressingThe 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 spaceSigned-off-by Ge Gordon <[email protected]>Signed-off-by Albert Yang <[email protected]>---
Change for v3:
Code improvements based on review feedback:
- Simplifieddwcmshc_privstructure by removing unused fields
- Improved helper functions with better encapsulation
- Useddevm_platform_ioremap_resource()for resource management
- UpdatedKconfigdescription and alphabetical ordering
- clarify documentation on hardware limitations and bounce buffer approach
- remove duplicatesdhci_writewSDHCI_CLOCK_CONTROLChanges for v2:
1. Dependency Simplification :
- RemovedCOMMON_CLKdependency fromKconfig(MMC_SDHCI_BST)
- AddARCH_BST||COMPILE_TESTdependency fromKconfig(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 layers3. Code Cleanup & Optimization :
- Pruned unused headers and legacy vendor debug code
- Removed deprecatedsdhci_bst_print_vendor()export
- Converted internal functions to static scope
- Standardized naming conventions:
* RenamedDRIVER_NAMEto match kernel standards
* Changeddefault_max_freqtoDEFAULT_MAX_FREQ
- Optimized clock configuration routines4. Hardware Integration Fixes :
- Fixed register access macros forEMMC_CTRL
* Added proper offset calculation viaSDHCI_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 flow6. Maintainability :
- UpdatedMODULE_DESCRIPTIONand AUTHOR fields
- Added explanatory comments for hardware limitations
- Removed redundant multi-host setup infrastructure7. fix build warnings from lkp
| Reported-by: kernel test robot <[email protected]> | Closes:
https://lore.kernel.org/oe-kbuild-all/[email protected]/--- 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.cdrivers/mmc/host/Kconfig +14
-0@@ -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_PLTFMdrivers/mmc/host/Makefile +1
-0@@ -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.odrivers/mmc/host/sdhci-of-bst-c1200.c new file +0
-0
[...]
Quoted 56 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +56
-0+/** +* 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 ); +
drivers/mmc/host/sdhci-of-bst-c1200.c line 290
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+ 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.
Quoted 28 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +28
-0+ + 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 ;
drivers/mmc/host/sdhci-of-bst-c1200.c line 328
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+ +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.
Quoted 4 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +4
-0+ +return 0 ; +} +
[...]
Quoted 85 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +85
-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
drivers/mmc/host/sdhci-of-bst-c1200.c line 463
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+* - 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.
drivers/mmc/host/sdhci-of-bst-c1200.c line 473
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+ +return 0 ; + +err_remove_host: +sdhci_remove_host (host,1 ); +err: +sdhci_pltfm_free (pdev); +return err; +} +
[...]
Kind regards
Uffe
Re: [PATCH v3 5/8] mmc: sdhci: add Black Sesame Technologies BST C1200 controller driver
Quoted 22 lines · Ulf Hansson
Quoted 9 lines · Albert Yang
drivers/mmc/host/sdhci-of-bst-c1200.c new file +9
-0+/* +* 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 drivers/mmc/host/sdhci-of-bst-c1200.c line 463
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+* - 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; + }
Quoted 2 lines
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,
Re: [PATCH v3 5/8] mmc: sdhci: add Black Sesame Technologies BST C1200 controller driver
In reply to Ulf HanssonQuoted 29 lines · Ulf Hansson
drivers/mmc/host/sdhci-of-bst-c1200.c line 290
Quoted 12 lines · Albert Yang
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+ 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_timeoutfunctions instead of the loop above. Moreover, please add defines to specify the period/timeout.drivers/mmc/host/sdhci-of-bst-c1200.c line 290
Quoted 9 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +9
-0+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 ); + }
Quoted 2 lines
Ditto.
Thanks for the review. I have created a new static function as suggested:
static int sdhci_bst_wait_int_clk(struct sdhci_host *host)
{
u16 clk;
if (read_poll_timeout(sdhci_readw, clk, (clk & SDHCI_CLOCK_INT_STABLE),
BST_CLK_STABLE_POLL_US, BST_CLK_STABLE_TIMEOUT_US, false,
host, SDHCI_CLOCK_CONTROL))
return -EBUSY;
return 0;
}And I will replace the code at the call sites with the following:
if (sdhci_bst_wait_int_clk(host)) {
dev_err(mmc_dev(host->mmc), "Internal clock never stabilised\n");
return -EBUSY;
}Best Regards,
Albert
Adrian Hunter
maintainerRe: [PATCH v3 5/8] mmc: sdhci: add Black Sesame Technologies BST C1200 controller driver
In reply to Albert Yangdrivers/mmc/host/sdhci-of-bst-c1200.c
Quoted 120 lines · 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 addressingThe 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 spaceSigned-off-by Ge Gordon <[email protected]>Signed-off-by Albert Yang <[email protected]>---
Change for v3:
Code improvements based on review feedback:
- Simplifieddwcmshc_privstructure by removing unused fields
- Improved helper functions with better encapsulation
- Useddevm_platform_ioremap_resource()for resource management
- UpdatedKconfigdescription and alphabetical ordering
- clarify documentation on hardware limitations and bounce buffer approach
- remove duplicatesdhci_writewSDHCI_CLOCK_CONTROLChanges for v2:
1. Dependency Simplification :
- RemovedCOMMON_CLKdependency fromKconfig(MMC_SDHCI_BST)
- AddARCH_BST||COMPILE_TESTdependency fromKconfig(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 layers3. Code Cleanup & Optimization :
- Pruned unused headers and legacy vendor debug code
- Removed deprecatedsdhci_bst_print_vendor()export
- Converted internal functions to static scope
- Standardized naming conventions:
* RenamedDRIVER_NAMEto match kernel standards
* Changeddefault_max_freqtoDEFAULT_MAX_FREQ
- Optimized clock configuration routines4. Hardware Integration Fixes :
- Fixed register access macros forEMMC_CTRL
* Added proper offset calculation viaSDHCI_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 flow6. Maintainability :
- UpdatedMODULE_DESCRIPTIONand AUTHOR fields
- Added explanatory comments for hardware limitations
- Removed redundant multi-host setup infrastructure7. fix build warnings from lkp
| Reported-by: kernel test robot <[email protected]> | Closes:
https://lore.kernel.org/oe-kbuild-all/[email protected]/--- 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.cdrivers/mmc/host/Kconfig +14
-0@@ -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_PLTFMdrivers/mmc/host/Makefile +1
-0@@ -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.odrivers/mmc/host/sdhci-of-bst-c1200.c new file +0
-0
Unless you foresee more BST sdhci drivers, maybe sdhci-of-bst.c is an easier file name to deal with.
Quoted 14 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +13
-0@@ -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>
drivers/mmc/host/sdhci-of-bst-c1200.c line 23
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+#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.
Quoted 20 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +20
-0+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
drivers/mmc/host/sdhci-of-bst-c1200.c line 53
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+#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()?
Quoted 7 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +7
-0+} + +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);
drivers/mmc/host/sdhci-of-bst-c1200.c line 70
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+} + +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.
drivers/mmc/host/sdhci-of-bst-c1200.c line 73
Quoted 3 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +3
-0+} + +struct rx_ctrl {
Looks like the intention is for this to be a union not a struct
drivers/mmc/host/sdhci-of-bst-c1200.c line 83
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+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;
};drivers/mmc/host/sdhci-of-bst-c1200.c line 87
Quoted 4 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +4
-0+u32 reg; +}; + +struct sdmmc_iocfg {
Not used
Quoted 4 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +4
-0+struct { +u32 res0:16 ; +u32 SC_SDMMC0_PVDD18POCSD0:2 ; +u32 SC_SDMMC0_PVDD18POCSD1:2 ;
drivers/mmc/host/sdhci-of-bst-c1200.c line 101
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+ 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
Quoted 24 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +24
-0+{ +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 ); +
drivers/mmc/host/sdhci-of-bst-c1200.c line 135
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+ 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
Quoted 45 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +45
-0+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 ;
drivers/mmc/host/sdhci-of-bst-c1200.c line 190
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+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
drivers/mmc/host/sdhci-of-bst-c1200.c line 193
Quoted 3 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +3
-0+{ +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.
Quoted 11 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +11
-0+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)
drivers/mmc/host/sdhci-of-bst-c1200.c line 214
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+{ +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);
Quoted 28 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +28
-0+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 +*
drivers/mmc/host/sdhci-of-bst-c1200.c line 252
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+* 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);
drivers/mmc/host/sdhci-of-bst-c1200.c line 264
Quoted 12 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +12
-0+} + +/** +* 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
Quoted 16 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +16
-0+{ +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 ); +
drivers/mmc/host/sdhci-of-bst-c1200.c line 290
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+ 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;
}Quoted 28 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +28
-0+ + 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 ;
drivers/mmc/host/sdhci-of-bst-c1200.c line 328
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+ +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.
Quoted 9 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +9
-0+ +return 0 ; +} + +/** +* sdhci_bst_voltage_switch - Perform voltage switch +* @host: SDHCI host controller +* +* Enables voltage stable power.
drivers/mmc/host/sdhci-of-bst-c1200.c line 347
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+*/ +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
drivers/mmc/host/sdhci-of-bst-c1200.c line 360
Quoted 13 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +13
-0+ .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
drivers/mmc/host/sdhci-of-bst-c1200.c line 370
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+ .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
drivers/mmc/host/sdhci-of-bst-c1200.c line 381
Quoted 11 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +11
-0+{ +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.
drivers/mmc/host/sdhci-of-bst-c1200.c line 389
Quoted 8 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +8
-0+ 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.
Quoted 9 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +9
-0+ 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,
drivers/mmc/host/sdhci-of-bst-c1200.c line 408
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+ &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.
drivers/mmc/host/sdhci-of-bst-c1200.c line 413
Quoted 5 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +5
-0+ +return 0 ; +} + +static int dwcmshc_probe (struct platform_device *pdev)
sdhci_bst_probe
drivers/mmc/host/sdhci-of-bst-c1200.c line 421
Quoted 8 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +8
-0+{ +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.
Quoted 32 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +32
-0+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
drivers/mmc/host/sdhci-of-bst-c1200.c line 463
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+* - 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.
drivers/mmc/host/sdhci.c +8 -1
@@ -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;
drivers/mmc/host/sdhci-of-bst-c1200.c line 470
Quoted 7 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +7
-0+ +return 0 ; + +err_remove_host: +sdhci_remove_host (host,1 ); +err: +sdhci_pltfm_free (pdev);
There is no sdhci_pltfm_free() anymore.
drivers/mmc/host/sdhci-of-bst-c1200.c line 474
Quoted 4 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +4
-0+return err; +} + +static void dwcmshc_remove (struct platform_device *pdev)
sdhci_bst_remove
Quoted 4 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +4
-0+{ +struct sdhci_host *host =platform_get_drvdata (pdev); + +/* Free bounce buffer if allocated */
drivers/mmc/host/sdhci-of-bst-c1200.c line 488
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+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.
drivers/mmc/host/sdhci-of-bst-c1200.c line 492
Quoted 4 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +4
-0+sdhci_pltfm_free (pdev); +} + +static const struct of_device_id sdhci_dwcmshc_dt_ids[] = {
sdhci_bst_ids
drivers/mmc/host/sdhci-of-bst-c1200.c line 498
Quoted 6 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +6
-0+ { .compatible = "bst,c1200-dwcmshc-sdhci" }, + {} +}; +MODULE_DEVICE_TABLE (of, sdhci_dwcmshc_dt_ids); + +static struct platform_driver sdhci_dwcmshc_driver = {
sdhci_bst_driver
drivers/mmc/host/sdhci-of-bst-c1200.c line 500
Quoted 2 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +2
-0+ .driver = { + .name = "sdhci-dwcmshc",
"sdhci-dwcmshc" has been used. Maybe "sdhci-bst"
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+ .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" );
Re: [PATCH v3 5/8] mmc: sdhci: add Black Sesame Technologies BST C1200 controller driver
Quoted 9 lines · Adrian Hunter
drivers/mmc/host/sdhci-of-bst-c1200.c
Quoted 5 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +0
-0Unless you foresee more BST sdhci drivers, maybe
sdhci-of-bst.cis an easier file name to deal with.
Thanks for the detailed review. I have addressed all the comments and renamed the file to sdhci-of-bst.c as suggested.
Quoted 5 lines
Quoted 1 line
+struct
dwcmshc_priv{Name
sdhci_bst_privperhaps, see comment further below about names.
Renamed to sdhci_bst_priv.
Quoted 4 lines
Quoted 1 line
+ return
ioread32(priv->crm_reg_base + offset);Are
ioread32()/iowrite32()actually needed instead ofreadl()/writel()?
Changed to use readl() / writel() for consistency with standard kernel practices.
Quoted 11 lines
drivers/mmc/host/sdhci-of-bst-c1200.c
Quoted 8 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +8
-0+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.
Fixed by returning hardcoded values:
static unsigned int sdhci_bst_get_max_clock(struct sdhci_host *host)
{
return BST_DEFAULT_MAX_FREQ;
}static unsigned int sdhci_bst_get_min_clock(struct sdhci_host *host)
{
return BST_DEFAULT_MIN_FREQ;
}Quoted 6 lines
drivers/mmc/host/sdhci-of-bst-c1200.c
Quoted 3 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +3
-0+} + +struct rx_ctrl {Looks like the intention is for this to be a union not a struct
Changed to union sdhci_bst_rx_ctrl as suggested.
Quoted 13 lines
drivers/mmc/host/sdhci-of-bst-c1200.c
Quoted 10 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+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:
Quoted 14 lines
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;
};Updated as suggested.
Quoted 7 lines
drivers/mmc/host/sdhci-of-bst-c1200.c
Quoted 4 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +4
-0+u32 reg; +}; + +struct sdmmc_iocfg {Not used
Removed the unused structure.
Quoted 7 lines
Quoted 1 line
+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 examplesdhci_enable_bst_clk -> sdhci_bst_enable_clk
Updated all function names to use consistent sdhci_bst_ prefix.
Quoted 11 lines
drivers/mmc/host/sdhci-of-bst-c1200.c
Quoted 7 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +7
-0+ 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
Added proper #define macros for all magic values:
#define BST_TIMER_LOAD_BIT BIT(8) #define BST_TIMER_DIV_MASK GENMASK(7, 0) #define BST_TIMER_DIV_VAL 0x20
Quoted 11 lines
Quoted 1 line
+static void
sdhci_set_bst_clock(struct sdhci_host *host, unsigned int clock)
sdhci_bst_set_clockdrivers/mmc/host/sdhci-of-bst-c1200.c
Quoted 3 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +3
-0+{ +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.
Fixed to properly handle clock == 0 case by turning off clocks to save power:
if (!clock) {
clk_reg &= ~(SDHCI_CLOCK_CARD_EN | SDHCI_CLOCK_INT_EN | SDHCI_CLOCK_PLL_EN);
sdhci_writew(host, clk_reg, SDHCI_CLOCK_CONTROL);
return;
}Quoted 11 lines
drivers/mmc/host/sdhci-of-bst-c1200.c
Quoted 3 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +3
-0+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);
Updated to use read-modify-write pattern with proper #define:
reg = sdhci_readw(host, emmc_ctrl_reg);
reg &= ~BST_EMMC_CTRL_BIT2;sdhci_writew(host, reg, emmc_ctrl_reg);
Quoted 6 lines
drivers/mmc/host/sdhci-of-bst-c1200.c
Quoted 3 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +3
-0+sdhci_writew (host, + (sdhci_readw (host,MBIU_CTRL ) & (~0xf )) |BURST_EN , +MBIU_CTRL );Doesn't look like it caters for mode ==
MMC_POWER_OFF
Added proper power off handling and improved code structure:
if (mode == MMC_POWER_OFF) {
/* Disable MBIU burst mode and turn off power supplies */
reg = sdhci_readw(host, MBIU_CTRL);
reg &= ~BURST_EN;
sdhci_writew(host, reg, MBIU_CTRL);
/* ... additional power off sequence ... */
} else {
/* Configure burst mode only when powered on */
reg = sdhci_readw(host, MBIU_CTRL);
reg &= ~MBIU_BURST_MASK;
reg |= BURST_EN;
sdhci_writew(host, reg, MBIU_CTRL);
}Quoted 3 lines
Quoted 1 line
+static int
bst_sdhci_execute_tuning(struct sdhci_host *host, u32 opcode)
sdhci_bst_execute_tuning
Renamed to sdhci_bst_execute_tuning.
Quoted 14 lines
drivers/mmc/host/sdhci-of-bst-c1200.c
Quoted 11 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +10
-0+ 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.
Quoted 9 lines
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; }Same code as above, maybe make it a separate function.
Created a separate function sdhci_bst_wait_int_clk() using read_poll_timeout():
static int sdhci_bst_wait_int_clk(struct sdhci_host *host)
{
u16 clk;
if (read_poll_timeout(sdhci_readw, clk, (clk & SDHCI_CLOCK_INT_STABLE),
BST_CLK_STABLE_POLL_US, BST_CLK_STABLE_TIMEOUT_US, false,
host, SDHCI_CLOCK_CONTROL))
return -EBUSY;
return 0;
}And replaced all instances with:
if (sdhci_bst_wait_int_clk(host)) {
dev_err(mmc_dev(host->mmc), "Internal clock never stabilised\n");
return -EBUSY;
}Quoted 7 lines
Quoted 1 line
+static const struct
sdhci_opssdhci_dwcmshc_ops= {
sdhci_bst_opsQuoted 1 line
+static const struct
sdhci_pltfm_datasdhci_dwcmshc_pdata= {
sdhci_bst_pdata
Updated both structure names as suggested.
Quoted 4 lines
Quoted 1 line
+static int
bst_sdhci_reallocate_bounce_buffer(struct sdhci_host *host)
sdhci_bst_reallocate_bounce_buffer
Renamed as suggested.
Quoted 19 lines
drivers/mmc/host/sdhci-of-bst-c1200.c
Quoted 5 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +5
-0+/* +* 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.cand makes less sense here. Presumably the size is fixed by hardware. Probably better to leave out the comment.drivers/mmc/host/sdhci-of-bst-c1200.c
Quoted 8 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +8
-0+ 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;
Quoted 2 lines
Similarly, 32K is your max request size, so there is no need of that logic or comment.
Replaced the generic comment with hardware-specific explanation.
Quoted 9 lines
drivers/mmc/host/sdhci-of-bst-c1200.c
Quoted 5 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +5
-0+ +/* 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.cthen the above 4 lines won't be needed.
Removed the unnecessary logic and the mmc->max_* assignments as suggested.
Quoted 10 lines
Quoted 1 line
+static int
dwcmshc_probe(struct platform_device *pdev)
sdhci_bst_probedrivers/mmc/host/sdhci-of-bst-c1200.c
Quoted 2 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +2
-0+ 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.
Fixed line wrapping.
Quoted 6 lines
drivers/mmc/host/sdhci-of-bst-c1200.c
Quoted 5 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +5
-0+ 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; + }
Quoted 9 lines
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.cto allow it to be done beforesdhci_add_host().Please make a separate patch for the change below, and then do the bounce buffer allocation before calling
sdhci_add_host.
I will create a separate patch for the sdhci.c modification as you suggested, and then move the bounce buffer allocation before calling sdhci_add_host.
Quoted 7 lines
drivers/mmc/host/sdhci-of-bst-c1200.c
Quoted 4 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +4
-0+err_remove_host: +sdhci_remove_host (host,1 ); +err: +sdhci_pltfm_free (pdev);There is no
sdhci_pltfm_free()anymore.
removed sdhci_pltfm_free() call.
Quoted 3 lines
Quoted 1 line
+static void
dwcmshc_remove(struct platform_device *pdev)
sdhci_bst_remove
Updated to use sdhci_bst_remove
Quoted 8 lines
drivers/mmc/host/sdhci-of-bst-c1200.c
Quoted 5 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +4
-0+/* 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 notsdhci_remove_host(host, 0)directly.
Fixed to use sdhci_pltfm_remove() in remove function.
Quoted 12 lines
drivers/mmc/host/sdhci-of-bst-c1200.c
Quoted 4 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +4
-0+sdhci_pltfm_free (pdev); +} + +static const struct of_device_id sdhci_dwcmshc_dt_ids[] = {
sdhci_bst_idsdrivers/mmc/host/sdhci-of-bst-c1200.c
Quoted 2 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +2
-0+ +static struct platform_driver sdhci_dwcmshc_driver = {
sdhci_bst_driver
Quoted 4 lines
drivers/mmc/host/sdhci-of-bst-c1200.c
Quoted 2 lines
drivers/mmc/host/sdhci-of-bst-c1200.c new file +2
-0+ .driver = { + .name = "sdhci-dwcmshc","sdhci-dwcmshc" has been used. Maybe "sdhci-bst"
Updated remove function to use sdhci_pltfm_remove() and renamed all remaining structures to use sdhci_bst_ prefix. Changed driver name to "sdhci-bst".
Thank you for the comprehensive review. All the suggested changes have been implemented. I will submit the sdhci.c patch separately as discussed.
Best Regards,
Albert
PATCH v3 6/8 arm64: dts: bst: add support for Black Sesame Technologies C1200 CDCU1.0 board
In reply to Albert YangAdd 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.
---
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
arch/arm64/boot/dts/Makefile +1 -0
@@ -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
arch/arm64/boot/dts/bst/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 +dtb-$(CONFIG_ARCH_BST) += bstc1200-cdcu1.0-adas_4c2g.dtb
arch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts new file +42 -0
42 lines not on this page · raw message
arch/arm64/boot/dts/bst/bstc1200.dtsi new file +117 -0
117 lines not on this page · raw message
Signature · 1 line
2.43.0
Krzysztof Kozlowski
maintainerRe: [PATCH v3 6/8] arm64: dts: bst: add support for Black Sesame Technologies C1200 CDCU1.0 board
Quoted 96 lines · 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
- AddingMakefileentries to build the BST platform device trees
- Adding the device tree for the BST C1200 CDCU1.0 ADAS 4C2G boardThis board features a quad-core Cortex-A78 CPU, and various peripherals including UART, MMC, watchdog timer, and interrupt controller.
Signed-off-by Ge Gordon <[email protected]>Signed-off-by Albert Yang <[email protected]>---
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 gicChanges 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.dtsiarch/arm64/boot/dts/Makefile +1
-0@@ -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 += freescalearch/arm64/boot/dts/bst/Makefile new file +2
-0@@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 +dtb-$(CONFIG_ARCH_BST) += bstc1200-cdcu1.0-adas_4c2g.dtbarch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts new file +28
-0@@ -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>;
arch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts line 38
Quoted 10 lines
arch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts new file +10
-0+ 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?
Quoted 25 lines
arch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts new file +4
-0+ status = "okay"; + memory-region = <&mmc0_reserved>; +}; +arch/arm64/boot/dts/bst/bstc1200.dtsi new file +15
-0@@ -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>; + }; +
arch/arm64/boot/dts/bst/bstc1200.dtsi line 25
Quoted 10 lines
arch/arm64/boot/dts/bst/bstc1200.dtsi new file +10
-0+ 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.
Quoted 55 lines
arch/arm64/boot/dts/bst/bstc1200.dtsi new file +55
-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"; + }; +
arch/arm64/boot/dts/bst/bstc1200.dtsi line 90
Quoted 10 lines
arch/arm64/boot/dts/bst/bstc1200.dtsi new file +10
-0+ 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?
arch/arm64/boot/dts/bst/bstc1200.dtsi line 92
Quoted 2 lines
arch/arm64/boot/dts/bst/bstc1200.dtsi new file +2
-0+ dma-coherent; + status = "disabled";
If so, why is it disabled?
arch/arm64/boot/dts/bst/bstc1200.dtsi line 103
Quoted 11 lines
arch/arm64/boot/dts/bst/bstc1200.dtsi new file +11
-0+ }; + + 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
Re: [PATCH v3 6/8] arm64: dts: bst: add support for Black Sesame Technologies C1200 CDCU1.0 board
Quoted 1 line · Krzysztof Kozlowski
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.
Quoted 9 lines
arch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts line 38
Quoted 5 lines
+&uart0 {
arch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts new file +4
-0+ 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
Quoted 11 lines
arch/arm64/boot/dts/bst/bstc1200.dtsi line 25
Quoted 6 lines
arch/arm64/boot/dts/bst/bstc1200.dtsi new file +6
-0+ cpu@0 { + compatible = "arm,cortex-a78"; + device_type = "cpu"; + enable-method = "psci"; + next-level-cache = <&l2_cache>; + reg = <0>;
0x0And why reg is the last? Please follow DTS coding style.
Quoted 9 lines
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>;
};Quoted 11 lines
arch/arm64/boot/dts/bst/bstc1200.dtsi line 90
Quoted 10 lines
arch/arm64/boot/dts/bst/bstc1200.dtsi new file +10
-0+ 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;
Quoted 7 lines
Hm, this is odd to see in SoC. Are you saying that your SoC (!) has MMC memory embedded?
arch/arm64/boot/dts/bst/bstc1200.dtsi line 92
Quoted 2 lines
arch/arm64/boot/dts/bst/bstc1200.dtsi new file +2
-0+ 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";
};Quoted 11 lines
arch/arm64/boot/dts/bst/bstc1200.dtsi line 103
Quoted 9 lines
arch/arm64/boot/dts/bst/bstc1200.dtsi new file +9
-0+ 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
Krzysztof Kozlowski
maintainerRe: [PATCH v3 6/8] arm64: dts: bst: add support for Black Sesame Technologies C1200 CDCU1.0 board
Quoted 11 lines · Albert Yang
Quoted 11 lines
Quoted 10 lines
arch/arm64/boot/dts/bst/bstc1200.dtsi new file +9
-0+ 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>;
Quoted 5 lines
Quoted 1 line
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.
Quoted 3 lines
gic: interrupt-controller@32800000 {
compatible = "arm,gic-v3";
#interrupt-cells = <3>;Best regards,
Krzysztof
Re: [PATCH v3 6/8] arm64: dts: bst: add support for Black Sesame Technologies C1200 CDCU1.0 board
Quoted 12 lines · Krzysztof Kozlowski
Quoted 11 lines · Albert Yang
Quoted 11 lines
Quoted 10 lines
arch/arm64/boot/dts/bst/bstc1200.dtsi new file +9
-0+ 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>;
Quoted 11 lines
Quoted 5 lines
Quoted 1 line
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.
Quoted 3 lines
gic: interrupt-controller@32800000 { compatible = "arm,gic-v3";
Thank you for pointing out the DTS coding style requirements. I have now carefully reviewed the documentation and updated the GIC node as follows.
I have a question regarding the property ordering. According to the DTS coding style documentation at:
https://docs.kernel.org/devicetree/bindings/dts-coding-style.html
The preferred order of properties in device nodes is:
1.“compatible”
2.“reg”
3.“ranges”
4.Standard/common properties (defined by common bindings, e.g. without vendor-prefixes) 5.Vendor-specific properties
6.“status” (if applicable)
7.Child nodes, where each node is preceded with a blank line
However, I'm uncertain about how to order properties that start with "#". I have treated them as standard/common properties and updated the node as follows. Could you please confirm if this approach is correct?
gic: interrupt-controller@32800000 {
compatible = "arm,gic-v3";
reg = <0x0 0x32800000 0x0 0x10000>,
<0x0 0x32880000 0x0 0x100000>;
ranges;
#address-cells = <2>;
#interrupt-cells = <3>;
interrupt-controller;
interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_LOW>;
#size-cells = <2>;
};I apologize for missing one of your previous comments. I will address it here:
Quoted 9 lines
arch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts line 38
Quoted 6 lines
arch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts new file +6
-0+ +&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?
You are absolutely right. I have corrected the node ordering to follow the alphabetical style as specified in the DTS coding style documentation:
&mmc0 {
bus-width = <8>;
memory-region = <&mmc0_reserved>;
non-removable;
status = "okay";
};&uart0 {
status = "okay";
};Thank you very much for your thorough review and patience. I will ensure that all future submissions strictly follow the DTS coding style guidelines. If you have any additional feedback, please let me know, and I will address it promptly to maintain consistency throughout the patch series.
Best regards,
Albert
Krzysztof Kozlowski
maintainerRe: [PATCH v3 6/8] arm64: dts: bst: add support for Black Sesame Technologies C1200 CDCU1.0 board
Quoted 24 lines · Albert Yang
Quoted 6 lines
No, you need to finally read and follow DTS coding style.
Quoted 3 lines
gic: interrupt-controller@32800000 { compatible = "arm,gic-v3";Thank you for pointing out the DTS coding style requirements. I have now carefully reviewed the documentation and updated the GIC node as follows.
I have a question regarding the property ordering. According to the DTS coding style documentation at:
https://docs.kernel.org/devicetree/bindings/dts-coding-style.htmlThe preferred order of properties in device nodes is:
1.“compatible”
2.“reg”
3.“ranges”
4.Standard/common properties (defined by common bindings, e.g. without vendor-prefixes) 5.Vendor-specific properties
6.“status” (if applicable)
7.Child nodes, where each node is preceded with a blank line
Quoted 3 lines
However, I'm uncertain about how to order properties that start with "#". I have treated them as standard/common properties and updated the node as follows. Could you please confirm if this approach is correct?
They go as standard common properties. Whether you group all '#' together or sort by name skipping '#' is up to you, because common style does not define that.
Quoted 12 lines
gic: interrupt-controller@32800000 {
compatible = "arm,gic-v3";
reg = <0x0 0x32800000 0x0 0x10000>,
<0x0 0x32880000 0x0 0x100000>;
ranges;
#address-cells = <2>;
#interrupt-cells = <3>;
interrupt-controller;
interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_LOW>;
#size-cells = <2>;I would keep #size-cells after #address-cells, because they describe same thing - addressing of children.
Best regards,
Krzysztof
Re: [PATCH v3 6/8] arm64: dts: bst: add support for Black Sesame Technologies C1200 CDCU1.0 board
Quoted 24 lines · Krzysztof Kozlowski
Quoted 5 lines · Albert Yang
Quoted 1 line
However, I'm uncertain about how to order properties that start with "#". I have treated them as standard/common properties and updated the node as follows. Could you please confirm if this approach is correct?
They go as standard common properties. Whether you group all '#' together or sort by name skipping '#' is up to you, because common style does not define that.
Quoted 12 lines
gic: interrupt-controller@32800000 { compatible = "arm,gic-v3"; reg = <0x0 0x32800000 0x0 0x10000>, <0x0 0x32880000 0x0 0x100000>; ranges; #address-cells = <2>; #interrupt-cells = <3>; interrupt-controller; interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_LOW>; #size-cells = <2>;
Quoted 2 lines
I would keep #size-cells after #address-cells, because they describe same thing - addressing of children.
Thank you for your feedback and confirmation. I will update the node according to your suggestions as follows:
gic: interrupt-controller@32800000 {
compatible = "arm,gic-v3";
reg = <0x0 0x32800000 0x0 0x10000>,
<0x0 0x32880000 0x0 0x100000>;
ranges;
#address-cells = <2>;
#size-cells = <2>;
#interrupt-cells = <3>;
interrupt-controller;
interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_LOW>;
};Best Regards,
Albert
PATCH v3 7/8 arm64: defconfig: enable BST platform and SDHCI controller support
In reply to Albert YangEnable 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.
---
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(+)
arch/arm64/configs/defconfig +2 -0
@@ -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
Signature · 1 line
2.43.0
Krzysztof Kozlowski
maintainerRe: [PATCH v3 7/8] arm64: defconfig: enable BST platform and SDHCI controller support
Quoted 5 lines · 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
Either this paragraph...
Quoted 4 lines
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".
Quoted 3 lines
Signed-off-by Ge Gordon <[email protected]>Signed-off-by Albert Yang <[email protected]>
Best regards,
Krzysztof
Re: [PATCH v3 7/8] arm64: defconfig: enable BST platform and SDHCI controller support
Quoted 8 lines · Krzysztof Kozlowski
Quoted 3 lines · Albert Yang
-
CONFIG_ARCH_BST: Enable BST SoC platform support
-CONFIG_MMC_SDHCI_BST: Enable BST C1200 DWCMSHC SDHCI controller driverEither this paragraph...
Quoted 1 line
Quoted 8 lines
Quoted 3 lines
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
PATCH v3 8/8 MAINTAINERS: add and consolidate Black Sesame Technologies (BST) ARM SoC support
In reply to Albert YangAdd 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.
---
Change for v3:
- No changes
Change for v2:
- No changes
--- MAINTAINERS | 10 ++++++++++ 1 file changed, 10 insertions(+)
MAINTAINERS +10 -0
@@ -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 <[email protected]> +R: BST Linux Kernel Upstream Group <[email protected]> +L: [email protected] (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 <[email protected]> L: [email protected] (moderated for non-subscribers)
Signature · 1 line
2.43.0
Krzysztof Kozlowski
maintainerRe: [PATCH v3 8/8] MAINTAINERS: add and consolidate Black Sesame Technologies (BST) ARM SoC support
Quoted 1 line · Albert Yang
Add and consolidate the
MAINTAINERSentry 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
Quoted 4 lines
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 <[email protected]>
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.
Quoted 16 lines
Signed-off-by Albert Yang <[email protected]>---
Change for v3:
- No changesChange for v2:
- No changes--- MAINTAINERS | 10 ++++++++++ 1 file changed, 10 insertions(+)MAINTAINERS +0
-0
MAINTAINERS S: Maintained · line 2445
Quoted 5 lines
MAINTAINERS +2
-0@@ -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 <[email protected]>
Best regards,
Krzysztof