Skip to contentSkip to conversation

arm: exynos: Add E850-96 board

PATCH In review Sam Protsenko 2 participants 16 messages Jan 11, 2024 – Jan 26, 2024

Subsystems (8)
lore
Share & tools
lore

Sam Protsenko

author maintainer
#0 lore raw

v2 cover arm: exynos: Add E850-96 board

Add Exynos850 SoC and WinLink's E850-96 board support. A short overview of series additions and modifications:
* USI driver: configures UART block
* PMU driver: connects AP UART lines to uart1 pins)
* Exynos850 clock driver: generates UART clocks
* Exynos850 pinctrl driver: mux UART pins
* serial_s5p: UART driver
* Exynos850 SoC: dtsi files and MMU maps
* E850-96 board: dts files, defconfig, board file and doc

Most of the code was borrowed from mainline Linux kernel (where this board is already enabled) and adapted for U-Boot. Preliminary preparation for this series includes next patches / series (already merged):

* commit 585a2aaac2ac ("arm: exynos: Include missing CPU header in

                          soc.c")
  * commit c9ab9f30c8e4 ("arm: exynos: Include missing CPU header in
                          gpio.h")
  * commit 11bd2787deff ("watchdog: s5p_wdt: Include missing CPU
                          header")
  * commit 08cfa971a717 ("exynos: Avoid duplicate reset_cpu with
                          SYSRESET enabled")
  * commit f655090901dc ("clk: exynos: Add header guard for clk-pll.h")
  * commit 2227f4c0afed ("serial: s5p: Fix clk_get_by_index() error code
                          check")

* commit a0615ffc99a5 ("serial: s5p: Remove common.h inclusion")
* commit 5ad21de6bae0 ("serial: s5p: Use livetree API to get "id" property")
* commit e79f630dbf67 ("serial: s5p: Use named constants for register values")
* commit a627f2802a71 ("serial: s5p: Improve coding style")
* commit 33e7ca5a9b6a ("serial: s5p: Use dev_read_addr_ptr() to get base address")
* commit 6219b47c4d91 ("board: samsung: Fix SYS_CONFIG_NAME configs in axy17lte Kconfig")
* commit 470682ace1e0 ("configs: Remove unneeded SYS_CONFIG_NAME from a*y17lte defconfigs")

and series [1]. For more detailed description please see the board documentation (added in PATCH #12) and corresponding commit messages.

Changes in v2:
- PATCH 4: Removed unnecessary mode param
- PATCH 4: Removed usi->dev and used priv data instead
- PATCH 4: Used .of_plat_data callback for dts parsing
- PATCH 7: Fixed Thomas Abraham e-mail
- PATCH 9: Fixed incorrect driver description (comment)
- Collected Reviewed-by tags
- Rebased on top of most recent U-Boot/master

[1] https://lists.denx.de/pipermail/u-boot/2023-November/539033.html

Sam Protsenko (13):
dt-bindings: soc: samsung: Add Exynos USI
dt-bindings: soc: samsung: Add Exynos PMU
dt-bindings: clock: Add Exynos850 clock controller
soc: samsung: Add Exynos USI driver
soc: samsung: Add Exynos PMU driver
clk: exynos: Move pll code into clk-exynos7420
clk: exynos: Add Samsung clock framework
clk: exynos: Add Exynos850 clock driver
pinctrl: exynos: Add pinctrl support for Exynos850
serial: s5p: Add Exynos850 compatible
arm: exynos: Add Exynos850 SoC support
board: samsung: Add support for E850-96 board
MAINTAINERS: Add new Samsung subsystems

 MAINTAINERS                                   |   25 +
 arch/arm/dts/Makefile                         |    1 +
 arch/arm/dts/exynos-pinctrl.h                 |   79 +
 arch/arm/dts/exynos850-e850-96-u-boot.dtsi    |   37 +
 arch/arm/dts/exynos850-e850-96.dts            |  273 ++++
 arch/arm/dts/exynos850-pinctrl.dtsi           |  663 +++++++++
 arch/arm/dts/exynos850.dtsi                   |  809 +++++++++++
 arch/arm/mach-exynos/Kconfig                  |   28 +-
 arch/arm/mach-exynos/mmu-arm64.c              |   34 +
 board/samsung/e850-96/Kconfig                 |   16 +
 board/samsung/e850-96/MAINTAINERS             |    9 +
 board/samsung/e850-96/Makefile                |    6 +
 board/samsung/e850-96/e850-96.c               |   22 +
 configs/e850-96_defconfig                     |   21 +
 doc/board/samsung/e850-96.rst                 |   87 ++
 .../img/exynos850-boot-architecture.svg       | 1283 +++++++++++++++++
 doc/board/samsung/index.rst                   |    1 +
 .../clock/samsung,exynos850-clock.yaml        |  307 ++++
 .../soc/samsung/exynos-pmu.yaml               |   85 ++
 .../soc/samsung/exynos-usi.yaml               |  162 +++
 drivers/clk/exynos/Kconfig                    |    7 +
 drivers/clk/exynos/Makefile                   |   11 +-
 drivers/clk/exynos/clk-exynos7420.c           |   25 +-
 drivers/clk/exynos/clk-exynos850.c            |  189 +++
 drivers/clk/exynos/clk-pll.c                  |  167 ++-
 drivers/clk/exynos/clk-pll.h                  |   16 +-
 drivers/clk/exynos/clk.c                      |  121 ++
 drivers/clk/exynos/clk.h                      |  228 +++
 drivers/pinctrl/exynos/Kconfig                |    8 +
 drivers/pinctrl/exynos/Makefile               |    1 +
 drivers/pinctrl/exynos/pinctrl-exynos850.c    |  125 ++
 drivers/serial/serial_s5p.c                   |    1 +
 drivers/soc/Kconfig                           |    1 +
 drivers/soc/Makefile                          |    1 +
 drivers/soc/samsung/Kconfig                   |   33 +
 drivers/soc/samsung/Makefile                  |    4 +
 drivers/soc/samsung/exynos-pmu.c              |  102 ++
 drivers/soc/samsung/exynos-usi.c              |  208 +++
 include/configs/e850-96.h                     |   12 +
 include/dt-bindings/clock/exynos850.h         |  337 +++++
 include/dt-bindings/soc/samsung,exynos-usi.h  |   17 +
 41 files changed, 5538 insertions(+), 24 deletions(-)
 create mode 100644 arch/arm/dts/exynos-pinctrl.h
 create mode 100644 arch/arm/dts/exynos850-e850-96-u-boot.dtsi
 create mode 100644 arch/arm/dts/exynos850-e850-96.dts
 create mode 100644 arch/arm/dts/exynos850-pinctrl.dtsi
 create mode 100644 arch/arm/dts/exynos850.dtsi
 create mode 100644 board/samsung/e850-96/Kconfig
 create mode 100644 board/samsung/e850-96/MAINTAINERS
 create mode 100644 board/samsung/e850-96/Makefile
 create mode 100644 board/samsung/e850-96/e850-96.c
 create mode 100644 configs/e850-96_defconfig
 create mode 100644 doc/board/samsung/e850-96.rst
 create mode 100644 doc/board/samsung/img/exynos850-boot-architecture.svg
 create mode 100644 doc/device-tree-bindings/clock/samsung,exynos850-clock.yaml
 create mode 100644 doc/device-tree-bindings/soc/samsung/exynos-pmu.yaml
 create mode 100644 doc/device-tree-bindings/soc/samsung/exynos-usi.yaml
 create mode 100644 drivers/clk/exynos/clk-exynos850.c
 create mode 100644 drivers/clk/exynos/clk.c
 create mode 100644 drivers/clk/exynos/clk.h
 create mode 100644 drivers/pinctrl/exynos/pinctrl-exynos850.c
 create mode 100644 drivers/soc/samsung/Kconfig
 create mode 100644 drivers/soc/samsung/Makefile
 create mode 100644 drivers/soc/samsung/exynos-pmu.c
 create mode 100644 drivers/soc/samsung/exynos-usi.c
 create mode 100644 include/configs/e850-96.h
 create mode 100644 include/dt-bindings/clock/exynos850.h
 create mode 100644 include/dt-bindings/soc/samsung,exynos-usi.h
Signature · 1 line
2.39.2
author maintainer
#1 lore raw

PATCH v2 1/13 dt-bindings: soc: samsung: Add Exynos USI

Add USI bindings documentation and header file. Those are taken from Linux kernel [1,2], but the documentation was reworked a bit to only describe the compatibles that will be supported in U-Boot soon.

[1] Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml
[2] include/dt-bindings/soc/samsung,exynos-usi.h

---
Changes in v2:
- (none)

 .../soc/samsung/exynos-usi.yaml               | 162 ++++++++++++++++++
 include/dt-bindings/soc/samsung,exynos-usi.h  |  17 ++
 2 files changed, 179 insertions(+)
 create mode 100644 doc/device-tree-bindings/soc/samsung/exynos-usi.yaml
 create mode 100644 include/dt-bindings/soc/samsung,exynos-usi.h
doc/device-tree-bindings/soc/samsung/exynos-usi.yaml new file +162 -0
new file mode 100644
index 000000000000..8e6423f11568
@@ -0,0 +1,162 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/samsung/exynos-usi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung's Exynos USI (Universal Serial Interface)
+
+maintainers:
+  - Sam Protsenko <[email protected]>
+
+description: |
+  USI IP-core provides selectable serial protocol (UART, SPI or High-Speed I2C).
+  USI shares almost all internal circuits within each protocol, so only one
+  protocol can be chosen at a time. USI is modeled as a node with zero or more
+  child nodes, each representing a serial sub-node device. The mode setting
+  selects which particular function will be used.
+
+properties:
+  $nodename:
+    pattern: "^usi@[0-9a-f]+$"
+
+  compatible:
+    enum:
+      - samsung,exynos850-usi
+
+  reg: true
+
+  clocks: true
+
+  clock-names: true
+
+  ranges: true
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 1
+
+  samsung,sysreg:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    items:
+      - items:
+          - description: phandle to System Register syscon node
+          - description: offset of SW_CONF register for this USI controller
+    description:
+      Should be phandle/offset pair. The phandle to System Register syscon node
+      (for the same domain where this USI controller resides) and the offset
+      of SW_CONF register for this USI controller.
+
+  samsung,mode:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Selects USI function (which serial protocol to use). Refer to
+      <include/dt-bindings/soc/samsung,exynos-usi.h> for valid USI mode values.
+
+  samsung,clkreq-on:
+    type: boolean
+    description:
+      Enable this property if underlying protocol requires the clock to be
+      continuously provided without automatic gating. As suggested by SoC
+      manual, it should be set in case of SPI/I2C slave, UART Rx and I2C
+      multi-master mode. Usually this property is needed if USI mode is set
+      to "UART".
+
+      This property is optional.
+
+patternProperties:
+  "^i2c@[0-9a-f]+$":
+    $ref: /schemas/i2c/i2c-exynos5.yaml
+    description: Child node describing underlying I2C
+
+  "^serial@[0-9a-f]+$":
+    $ref: /schemas/serial/samsung_uart.yaml
+    description: Child node describing underlying UART/serial
+
+  "^spi@[0-9a-f]+$":
+    $ref: /schemas/spi/samsung,spi.yaml
+    description: Child node describing underlying SPI
+
+required:
+  - compatible
+  - ranges
+  - "#address-cells"
+  - "#size-cells"
+  - samsung,sysreg
+  - samsung,mode
+
+if:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - samsung,exynos850-usi
+
+then:
+  properties:
+    reg:
+      maxItems: 1
+
+    clocks:
+      items:
+        - description: Bus (APB) clock
+        - description: Operating clock for UART/SPI/I2C protocol
+
+    clock-names:
+      items:
+        - const: pclk
+        - const: ipclk
+
+  required:
+    - reg
+    - clocks
+    - clock-names
+
+else:
+  properties:
+    reg: false
+    clocks: false
+    clock-names: false
+    samsung,clkreq-on: false
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/soc/samsung,exynos-usi.h>
+
+    usi0: usi@138200c0 {
+        compatible = "samsung,exynos850-usi";
+        reg = <0x138200c0 0x20>;
+        samsung,sysreg = <&sysreg_peri 0x1010>;
+        samsung,mode = <USI_V2_UART>;
+        samsung,clkreq-on; /* needed for UART mode */
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges;
+        clocks = <&cmu_peri 32>, <&cmu_peri 31>;
+        clock-names = "pclk", "ipclk";
+
+        serial_0: serial@13820000 {
+            compatible = "samsung,exynos850-uart";
+            reg = <0x13820000 0xc0>;
+            interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>;
+            clocks = <&cmu_peri 32>, <&cmu_peri 31>;
+            clock-names = "uart", "clk_uart_baud0";
+            status = "disabled";
+        };
+
+        hsi2c_0: i2c@13820000 {
+            compatible = "samsung,exynosautov9-hsi2c";
+            reg = <0x13820000 0xc0>;
+            interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>;
+            #address-cells = <1>;
+            #size-cells = <0>;
+            clocks = <&cmu_peri 31>, <&cmu_peri 32>;
+            clock-names = "hsi2c", "hsi2c_pclk";
+            status = "disabled";
+        };
+    };
include/dt-bindings/soc/samsung,exynos-usi.h new file +17 -0
new file mode 100644
index 000000000000..a01af169d249
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2021 Linaro Ltd.
+ * Author: Sam Protsenko <[email protected]>
+ *
+ * Device Tree bindings for Samsung Exynos USI (Universal Serial Interface).
+ */
+
+#ifndef __DT_BINDINGS_SAMSUNG_EXYNOS_USI_H
+#define __DT_BINDINGS_SAMSUNG_EXYNOS_USI_H
+
+#define USI_V2_NONE		0
+#define USI_V2_UART		1
+#define USI_V2_SPI		2
+#define USI_V2_I2C		3
+
+#endif /* __DT_BINDINGS_SAMSUNG_EXYNOS_USI_H */
Signature · 1 line
2.39.2
author maintainer
#2 lore raw

PATCH v2 2/13 dt-bindings: soc: samsung: Add Exynos PMU

In reply to Sam Protsenko

Add bindings documentation for Exynos PMU hardware block. It was taken from Linux kernel [1], but minimized and modified to reflect features that will be actually supported in U-Boot soon. For example, the "samsung,uart-debug-1" property is not available in Linux kernel bindings and only present in U-Boot.

[1] Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml

---
Changes in v2:
- (none)

 .../soc/samsung/exynos-pmu.yaml               | 85 +++++++++++++++++++
 1 file changed, 85 insertions(+)
 create mode 100644 doc/device-tree-bindings/soc/samsung/exynos-pmu.yaml
doc/device-tree-bindings/soc/samsung/exynos-pmu.yaml new file +85 -0
new file mode 100644
index 000000000000..c3e95c33b01d
@@ -0,0 +1,85 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/samsung/exynos-pmu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung Exynos SoC series Power Management Unit (PMU)
+
+maintainers:
+  - Sam Protsenko <[email protected]>
+
+description: |+
+  PMU block controls the power and operation states of Exynos SoC. It contains
+  registers for changing the state of next features::
+
+  - Local power control. Exynos SoCs have various power domains, and it's
+    possible to turn them on and off independently, using corresponding
+    registers in PMU block
+  - System-level power control. That allows putting the system into power-down
+    modes (sleep) by turning off the power for most of the domains
+  - Miscellaneous PMU related features
+
+# Custom select to avoid matching all nodes with 'syscon'
+select:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - samsung,exynos850-pmu
+  required:
+    - compatible
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - samsung,exynos850-pmu
+          - const: syscon
+
+  reg:
+    maxItems: 1
+
+  samsung,uart-debug-1:
+    type: boolean
+    description:
+      Enable this property if AP UART lines (Application Processor UART) must be
+      connected to UART_DEBUG_1 path in PMU block. That's usually needed when
+      the serial console is provided by uart1_pins. If this property is not
+      specified, the default behavior will be used (AP UART lines connected to
+      UART_DEBUG_0 path, which usually means uart0_pins are used for the serial
+      console).
+
+  syscon-poweroff:
+    $ref: /schemas/power/reset/syscon-poweroff.yaml#
+    type: object
+    description:
+      Node for power off method
+
+  syscon-reboot:
+    $ref: /schemas/power/reset/syscon-reboot.yaml#
+    type: object
+    description:
+      Node for reboot method
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    pmu_system_controller: system-controller@11860000 {
+        compatible = "samsung,exynos850-pmu", "syscon";
+        reg = <0x11860000 0x10000>;
+
+        reboot: syscon-reboot {
+            compatible = "syscon-reboot";
+            regmap = <&pmu_system_controller>;
+            offset = <0x3a00>; /* SYSTEM_CONFIGURATION */
+            mask = <0x2>; /* SWRESET_SYSTEM */
+            value = <0x2>; /* reset value */
+        };
+    };
Signature · 1 line
2.39.2
author maintainer
#3 lore raw

PATCH v2 3/13 dt-bindings: clock: Add Exynos850 clock controller

In reply to Sam Protsenko

Add bindings documentation and the header file for Exynos850 clock controller. It was taken from Linux kernel [1,2].

[1] Documentation/devicetree/bindings/clock/samsung,exynos850-clock.yaml
[2] include/dt-bindings/clock/exynos850.h

---
Changes in v2:
- (none)

 .../clock/samsung,exynos850-clock.yaml        | 307 ++++++++++++++++
 include/dt-bindings/clock/exynos850.h         | 337 ++++++++++++++++++
 2 files changed, 644 insertions(+)
 create mode 100644 doc/device-tree-bindings/clock/samsung,exynos850-clock.yaml
 create mode 100644 include/dt-bindings/clock/exynos850.h
doc/device-tree-bindings/clock/samsung,exynos850-clock.yaml new file +307 -0
new file mode 100644
index 000000000000..a0906efe1223
@@ -0,0 +1,307 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/samsung,exynos850-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung Exynos850 SoC clock controller
+
+maintainers:
+  - Sam Protsenko <[email protected]>
+
+description: |
+  Exynos850 clock controller is comprised of several CMU units, generating
+  clocks for different domains. Those CMU units are modeled as separate device
+  tree nodes, and might depend on each other. Root clocks in that clock tree are
+  two external clocks:: OSCCLK (26 MHz) and RTCCLK (32768 Hz). Those external
+  clocks must be defined as fixed-rate clocks in dts.
+
+  CMU_TOP is a top-level CMU, where all base clocks are prepared using PLLs and
+  dividers; all other leaf clocks (other CMUs) are usually derived from CMU_TOP.
+
+  Each clock is assigned an identifier and client nodes can use this identifier
+  to specify the clock which they consume. All clocks available for usage
+  in clock consumer nodes are defined as preprocessor macros in
+  'dt-bindings/clock/exynos850.h' header.
+
+properties:
+  compatible:
+    enum:
+      - samsung,exynos850-cmu-top
+      - samsung,exynos850-cmu-apm
+      - samsung,exynos850-cmu-aud
+      - samsung,exynos850-cmu-cmgp
+      - samsung,exynos850-cmu-core
+      - samsung,exynos850-cmu-dpu
+      - samsung,exynos850-cmu-g3d
+      - samsung,exynos850-cmu-hsi
+      - samsung,exynos850-cmu-is
+      - samsung,exynos850-cmu-mfcmscl
+      - samsung,exynos850-cmu-peri
+
+  clocks:
+    minItems: 1
+    maxItems: 5
+
+  clock-names:
+    minItems: 1
+    maxItems: 5
+
+  "#clock-cells":
+    const: 1
+
+  reg:
+    maxItems: 1
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,exynos850-cmu-top
+
+    then:
+      properties:
+        clocks:
+          items:
+            - description: External reference clock (26 MHz)
+
+        clock-names:
+          items:
+            - const: oscclk
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,exynos850-cmu-apm
+
+    then:
+      properties:
+        clocks:
+          items:
+            - description: External reference clock (26 MHz)
+            - description: CMU_APM bus clock (from CMU_TOP)
+
+        clock-names:
+          items:
+            - const: oscclk
+            - const: dout_clkcmu_apm_bus
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,exynos850-cmu-aud
+
+    then:
+      properties:
+        clocks:
+          items:
+            - description: External reference clock (26 MHz)
+            - description: AUD clock (from CMU_TOP)
+
+        clock-names:
+          items:
+            - const: oscclk
+            - const: dout_aud
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,exynos850-cmu-cmgp
+
+    then:
+      properties:
+        clocks:
+          items:
+            - description: External reference clock (26 MHz)
+            - description: CMU_CMGP bus clock (from CMU_APM)
+
+        clock-names:
+          items:
+            - const: oscclk
+            - const: gout_clkcmu_cmgp_bus
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,exynos850-cmu-core
+
+    then:
+      properties:
+        clocks:
+          items:
+            - description: External reference clock (26 MHz)
+            - description: CMU_CORE bus clock (from CMU_TOP)
+            - description: CCI clock (from CMU_TOP)
+            - description: eMMC clock (from CMU_TOP)
+            - description: SSS clock (from CMU_TOP)
+
+        clock-names:
+          items:
+            - const: oscclk
+            - const: dout_core_bus
+            - const: dout_core_cci
+            - const: dout_core_mmc_embd
+            - const: dout_core_sss
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,exynos850-cmu-dpu
+
+    then:
+      properties:
+        clocks:
+          items:
+            - description: External reference clock (26 MHz)
+            - description: DPU clock (from CMU_TOP)
+
+        clock-names:
+          items:
+            - const: oscclk
+            - const: dout_dpu
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,exynos850-cmu-g3d
+
+    then:
+      properties:
+        clocks:
+          items:
+            - description: External reference clock (26 MHz)
+            - description: G3D clock (from CMU_TOP)
+
+        clock-names:
+          items:
+            - const: oscclk
+            - const: dout_g3d_switch
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,exynos850-cmu-hsi
+
+    then:
+      properties:
+        clocks:
+          items:
+            - description: External reference clock (26 MHz)
+            - description: External RTC clock (32768 Hz)
+            - description: CMU_HSI bus clock (from CMU_TOP)
+            - description: SD card clock (from CMU_TOP)
+            - description: USB 2.0 DRD clock (from CMU_TOP)
+
+        clock-names:
+          items:
+            - const: oscclk
+            - const: rtcclk
+            - const: dout_hsi_bus
+            - const: dout_hsi_mmc_card
+            - const: dout_hsi_usb20drd
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,exynos850-cmu-is
+
+    then:
+      properties:
+        clocks:
+          items:
+            - description: External reference clock (26 MHz)
+            - description: CMU_IS bus clock (from CMU_TOP)
+            - description: Image Texture Processing core clock (from CMU_TOP)
+            - description: Visual Recognition Accelerator clock (from CMU_TOP)
+            - description: Geometric Distortion Correction clock (from CMU_TOP)
+
+        clock-names:
+          items:
+            - const: oscclk
+            - const: dout_is_bus
+            - const: dout_is_itp
+            - const: dout_is_vra
+            - const: dout_is_gdc
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,exynos850-cmu-mfcmscl
+
+    then:
+      properties:
+        clocks:
+          items:
+            - description: External reference clock (26 MHz)
+            - description: Multi-Format Codec clock (from CMU_TOP)
+            - description: Memory to Memory Scaler clock (from CMU_TOP)
+            - description: Multi-Channel Scaler clock (from CMU_TOP)
+            - description: JPEG codec clock (from CMU_TOP)
+
+        clock-names:
+          items:
+            - const: oscclk
+            - const: dout_mfcmscl_mfc
+            - const: dout_mfcmscl_m2m
+            - const: dout_mfcmscl_mcsc
+            - const: dout_mfcmscl_jpeg
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,exynos850-cmu-peri
+
+    then:
+      properties:
+        clocks:
+          items:
+            - description: External reference clock (26 MHz)
+            - description: CMU_PERI bus clock (from CMU_TOP)
+            - description: UART clock (from CMU_TOP)
+            - description: Parent clock for HSI2C and SPI (from CMU_TOP)
+
+        clock-names:
+          items:
+            - const: oscclk
+            - const: dout_peri_bus
+            - const: dout_peri_uart
+            - const: dout_peri_ip
+
+required:
+  - compatible
+  - "#clock-cells"
+  - clocks
+  - clock-names
+  - reg
+
+additionalProperties: false
+
+examples:
+  # Clock controller node for CMU_PERI
+  - |
+    #include <dt-bindings/clock/exynos850.h>
+
+    cmu_peri: clock-controller@10030000 {
+        compatible = "samsung,exynos850-cmu-peri";
+        reg = <0x10030000 0x8000>;
+        #clock-cells = <1>;
+
+        clocks = <&oscclk>, <&cmu_top CLK_DOUT_PERI_BUS>,
+                 <&cmu_top CLK_DOUT_PERI_UART>,
+                 <&cmu_top CLK_DOUT_PERI_IP>;
+        clock-names = "oscclk", "dout_peri_bus",
+                      "dout_peri_uart", "dout_peri_ip";
+    };
+
+...
include/dt-bindings/clock/exynos850.h new file +337 -0

337 lines not on this page · raw message

Signature · 1 line
2.39.2
author maintainer
#4 lore raw

PATCH v2 4/13 soc: samsung: Add Exynos USI driver

In reply to Sam Protsenko

USIv2 IP-core is found on modern ARM64 Exynos SoCs (like Exynos850) and provides selectable serial protocol (one of: UART, SPI, I2C). USIv2 registers usually reside in the same register map as a particular underlying protocol it implements, but have some particular offset. E.g. on Exynos850 the USI_UART has 0x13820000 base address, where UART registers have 0x00..0x40 offsets, and USI registers have 0xc0..0xdc offsets. Desired protocol can be chosen via SW_CONF register from System Register block of the same domain as USI.

Before starting to use a particular protocol, USIv2 must be configured properly:
1. Select protocol to be used via System Register
2. Clear "reset" flag in USI_CON
3. Configure HWACG behavior (e.g. for UART Rx the HWACG must be disabled, so that the IP clock is not gated automatically); this is done using USI_OPTION register
4. Keep both USI clocks (PCLK and IPCLK) running during USI registers modification

This driver implements the above behavior. Of course, USIv2 driver should be probed before UART/I2C/SPI drivers. It can be achieved by embedding UART/I2C/SPI nodes inside of the USI node (in Device Tree); driver then walks underlying nodes and instantiates those. Driver also handles USI configuration on PM resume, as register contents can be lost during CPU suspend.

This driver is designed with different USI versions in mind. So it should be relatively easy to add new USI revisions to it later.

Driver's code was copied over from Linux kernel [1] and adapted correspondingly for U-Boot API. UCLASS_MISC is used, and although no misc operations are implemented, it makes it easier to probe the driver this way (as compared to UCLASS_NOP) and keep the code compact.

[1] drivers/soc/samsung/exynos-usi.c

---
Changes in v2:
- Removed unnecessary 'mode' param in exynos_usi_set_sw_conf()
- Removed usi->dev and used priv data instead
- Used .of_plat_data callback for dts parsing
- Added R-b tags

 drivers/soc/Kconfig              |   1 +
 drivers/soc/Makefile             |   1 +
 drivers/soc/samsung/Kconfig      |  23 ++++
 drivers/soc/samsung/Makefile     |   3 +
 drivers/soc/samsung/exynos-usi.c | 208 +++++++++++++++++++++++++++++++
 5 files changed, 236 insertions(+)
 create mode 100644 drivers/soc/samsung/Kconfig
 create mode 100644 drivers/soc/samsung/Makefile
 create mode 100644 drivers/soc/samsung/exynos-usi.c
drivers/soc/Kconfig +1 -0
index 85dac9de78a4..03433bc0e6d2 100644
@@ -40,6 +40,7 @@ config SOC_XILINX_VERSAL_NET
 	  This allows other drivers to verify the SoC familiy & revision using
 	  matching SoC attributes.
 
+source "drivers/soc/samsung/Kconfig"
 source "drivers/soc/ti/Kconfig"
 
 endmenu
drivers/soc/Makefile +1 -0
index 84385650d46d..610bf816d40a 100644
@@ -2,6 +2,7 @@
 #
 # Makefile for the U-Boot SOC specific device drivers.
 
+obj-$(CONFIG_SOC_SAMSUNG) += samsung/
 obj-$(CONFIG_SOC_TI) += ti/
 obj-$(CONFIG_SOC_DEVICE) += soc-uclass.o
 obj-$(CONFIG_SOC_DEVICE_TI_K3) += soc_ti_k3.o
drivers/soc/samsung/Kconfig new file +23 -0
new file mode 100644
index 000000000000..ffb87fe79316
@@ -0,0 +1,23 @@
+# SPDX-License-Identifier: GPL-2.0+
+
+menuconfig SOC_SAMSUNG
+	bool "Samsung SoC drivers support"
+
+if SOC_SAMSUNG
+
+config EXYNOS_USI
+	bool "Exynos USI (Universal Serial Interface) driver"
+	depends on ARCH_EXYNOS
+	select MISC
+	select REGMAP
+	select SYSCON
+	help
+	  Enable support for USI block. USI (Universal Serial Interface) is an
+	  IP-core found in modern Samsung Exynos SoCs, like Exynos850 and
+	  ExynosAutoV9. USI block can be configured to provide one of the
+	  following serial protocols: UART, SPI or High Speed I2C.
+
+	  This driver allows one to configure USI for desired protocol, which
+	  is usually done in USI node in Device Tree.
+
+endif
drivers/soc/samsung/Makefile new file +3 -0
new file mode 100644
index 000000000000..833ac073fbfa
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0+
+
+obj-$(CONFIG_EXYNOS_USI)	+= exynos-usi.o
drivers/soc/samsung/exynos-usi.c new file +208 -0

208 lines not on this page · raw message

Signature · 1 line
2.39.2
author maintainer
#5 lore raw

PATCH v2 5/13 soc: samsung: Add Exynos PMU driver

In reply to Sam Protsenko

Add basic Power Management Unit (PMU) driver for Exynos SoCs. For now it's only capable of changing UART path in PMU, which is needed for E850-96 board. The driver's structure resembles the exynos-pmu driver from Linux kernel, and although it's very basic and slim at the moment, it can be easily extended in future if the need arises.

UCLASS_NOP is used, as there are no benefits in using more elaborate classes like UCLASS_MISC in this case. The DM_FLAG_PROBE_AFTER_BIND flag is added in bind function, as the probe function must be always called for this driver.

---
Changes in v2:
- Added R-b tag

 drivers/soc/samsung/Kconfig      |  10 +++
 drivers/soc/samsung/Makefile     |   1 +
 drivers/soc/samsung/exynos-pmu.c | 102 +++++++++++++++++++++++++++++++
 3 files changed, 113 insertions(+)
 create mode 100644 drivers/soc/samsung/exynos-pmu.c
drivers/soc/samsung/Kconfig +10 -0
index ffb87fe79316..737b7ca8cd19 100644
@@ -5,6 +5,16 @@ menuconfig SOC_SAMSUNG
 
 if SOC_SAMSUNG
 
+config EXYNOS_PMU
+	bool "Exynos PMU controller driver"
+	depends on ARCH_EXYNOS
+	select REGMAP
+	select SYSCON
+	help
+	  Enable support for system controller configuration driver. It allows
+	  one to configure system controller registers (e.g. some register in
+	  PMU syscon) by providing register's offset, mask and value.
+
 config EXYNOS_USI
 	bool "Exynos USI (Universal Serial Interface) driver"
 	depends on ARCH_EXYNOS
drivers/soc/samsung/Makefile +1 -0
index 833ac073fbfa..0eb3ed8353b0 100644
@@ -1,3 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0+
 
+obj-$(CONFIG_EXYNOS_PMU)	+= exynos-pmu.o
 obj-$(CONFIG_EXYNOS_USI)	+= exynos-usi.o
drivers/soc/samsung/exynos-pmu.c new file +102 -0

102 lines not on this page · raw message

Signature · 1 line
2.39.2
author maintainer
#6 lore raw

PATCH v2 6/13 clk: exynos: Move pll code into clk-exynos7420

In reply to Sam Protsenko

PLL utilities code is only used by clk-exynos7420 driver at the moment. Move it into clk-exynos7420 to make clk-pll.c file available for CCF PLL clocks implementation, which is coming in the next patches.

---
Changes in v2:
- Added R-b tag

 drivers/clk/exynos/Makefile         |  1 -
 drivers/clk/exynos/clk-exynos7420.c | 25 +++++++++++++++++++++-
 drivers/clk/exynos/clk-pll.c        | 32 -----------------------------
 drivers/clk/exynos/clk-pll.h        | 13 ------------
 4 files changed, 24 insertions(+), 47 deletions(-)
 delete mode 100644 drivers/clk/exynos/clk-pll.c
 delete mode 100644 drivers/clk/exynos/clk-pll.h
drivers/clk/exynos/Makefile +0 -1
index c9f29c873e9b..7faf238571ef 100644
@@ -3,5 +3,4 @@
 # Copyright (C) 2016 Samsung Electronics
 # Thomas Abraham <[email protected]>
 
-obj-y				+= clk-pll.o
 obj-$(CONFIG_CLK_EXYNOS7420)	+= clk-exynos7420.o
drivers/clk/exynos/clk-exynos7420.c +24 -1
index 7d869eb02b8e..9caa932e12fb 100644
@@ -10,8 +10,15 @@
 #include <errno.h>
 #include <clk-uclass.h>
 #include <asm/io.h>
+#include <div64.h>
 #include <dt-bindings/clock/exynos7420-clk.h>
-#include "clk-pll.h"
+
+#define PLL145X_MDIV_SHIFT	16
+#define PLL145X_MDIV_MASK	0x3ff
+#define PLL145X_PDIV_SHIFT	8
+#define PLL145X_PDIV_MASK	0x3f
+#define PLL145X_SDIV_SHIFT	0
+#define PLL145X_SDIV_MASK	0x7
 
 #define DIVIDER(reg, shift, mask)	\
 	(((readl(reg) >> shift) & mask) + 1)
@@ -64,6 +71,22 @@ struct exynos7420_clk_top0_priv {
 	unsigned long sclk_uart2;
 };
 
+static unsigned long pll145x_get_rate(unsigned int *con1,
+				      unsigned long fin_freq)
+{
+	unsigned long pll_con1 = readl(con1);
+	unsigned long mdiv, sdiv, pdiv;
+	u64 fvco = fin_freq;
+
+	mdiv = (pll_con1 >> PLL145X_MDIV_SHIFT) & PLL145X_MDIV_MASK;
+	pdiv = (pll_con1 >> PLL145X_PDIV_SHIFT) & PLL145X_PDIV_MASK;
+	sdiv = (pll_con1 >> PLL145X_SDIV_SHIFT) & PLL145X_SDIV_MASK;
+
+	fvco *= mdiv;
+	do_div(fvco, (pdiv << sdiv));
+	return (unsigned long)fvco;
+}
+
 static ulong exynos7420_topc_get_rate(struct clk *clk)
 {
 	struct exynos7420_clk_topc_priv *priv = dev_get_priv(clk->dev);
drivers/clk/exynos/clk-pll.c deleted +0 -32
deleted file mode 100644
index 407fc71d415b..000000000000
@@ -1,32 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Exynos PLL helper functions for clock drivers.
- * Copyright (C) 2016 Samsung Electronics
- * Thomas Abraham <[email protected]>
- */
-
-#include <common.h>
-#include <asm/io.h>
-#include <div64.h>
-
-#define PLL145X_MDIV_SHIFT	16
-#define PLL145X_MDIV_MASK	0x3ff
-#define PLL145X_PDIV_SHIFT	8
-#define PLL145X_PDIV_MASK	0x3f
-#define PLL145X_SDIV_SHIFT	0
-#define PLL145X_SDIV_MASK	0x7
-
-unsigned long pll145x_get_rate(unsigned int *con1, unsigned long fin_freq)
-{
-	unsigned long pll_con1 = readl(con1);
-	unsigned long mdiv, sdiv, pdiv;
-	uint64_t fvco = fin_freq;
-
-	mdiv = (pll_con1 >> PLL145X_MDIV_SHIFT) & PLL145X_MDIV_MASK;
-	pdiv = (pll_con1 >> PLL145X_PDIV_SHIFT) & PLL145X_PDIV_MASK;
-	sdiv = (pll_con1 >> PLL145X_SDIV_SHIFT) & PLL145X_SDIV_MASK;
-
-	fvco *= mdiv;
-	do_div(fvco, (pdiv << sdiv));
-	return (unsigned long)fvco;
-}
drivers/clk/exynos/clk-pll.h deleted +0 -13
deleted file mode 100644
index 7b7af5e67612..000000000000
@@ -1,13 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Exynos PLL helper functions for clock drivers.
- * Copyright (C) 2016 Samsung Electronics
- * Thomas Abraham <[email protected]>
- */
-
-#ifndef __EXYNOS_CLK_PLL_H
-#define __EXYNOS_CLK_PLL_H
-
-unsigned long pll145x_get_rate(unsigned int *con1, unsigned long fin_freq);
-
-#endif /* __EXYNOS_CLK_PLL_H */
Signature · 1 line
2.39.2
author maintainer
#7 lore raw

PATCH v2 7/13 clk: exynos: Add Samsung clock framework

In reply to Sam Protsenko

Heavily based on Linux kernel Samsung clock framework, with some changes to accommodate the differences in U-Boot CCF implementation. It's also quite minimal as compared to the Linux version.

---
Changes in v2:
- Corrected Thomas Abraham's e-mail
- Added R-b tag

 drivers/clk/exynos/Makefile  |   9 +-
 drivers/clk/exynos/clk-pll.c | 167 +++++++++++++++++++++++++
 drivers/clk/exynos/clk-pll.h |  23 ++++
 drivers/clk/exynos/clk.c     | 121 +++++++++++++++++++
 drivers/clk/exynos/clk.h     | 228 +++++++++++++++++++++++++++++++++++
 5 files changed, 546 insertions(+), 2 deletions(-)
 create mode 100644 drivers/clk/exynos/clk-pll.c
 create mode 100644 drivers/clk/exynos/clk-pll.h
 create mode 100644 drivers/clk/exynos/clk.c
 create mode 100644 drivers/clk/exynos/clk.h
drivers/clk/exynos/Makefile +7 -2
index 7faf238571ef..04c5b9a39e16 100644
@@ -1,6 +1,11 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 # Copyright (C) 2016 Samsung Electronics
-# Thomas Abraham <[email protected]>
+# Copyright (C) 2023 Linaro Ltd.
+#
+# Authors:
+#   Thomas Abraham <[email protected]>
+#   Sam Protsenko <[email protected]>
 
-obj-$(CONFIG_CLK_EXYNOS7420)	+= clk-exynos7420.o
+obj-$(CONFIG_$(SPL_TPL_)CLK_CCF)	+= clk.o clk-pll.o
+obj-$(CONFIG_CLK_EXYNOS7420)		+= clk-exynos7420.o
drivers/clk/exynos/clk-pll.c new file +167 -0

167 lines not on this page · raw message

drivers/clk/exynos/clk-pll.h new file +23 -0
new file mode 100644
index 000000000000..bd79309fa1cf
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2016 Samsung Electronics
+ * Copyright (C) 2023 Linaro Ltd.
+ *
+ * Authors:
+ *   Thomas Abraham <[email protected]>
+ *   Sam Protsenko <[email protected]>
+ *
+ * Common Clock Framework support for all PLL's in Samsung platforms.
+ */
+
+#ifndef __EXYNOS_CLK_PLL_H
+#define __EXYNOS_CLK_PLL_H
+
+#include <linux/clk-provider.h>
+
+enum samsung_pll_type {
+	pll_0822x,
+	pll_0831x,
+};
+
+#endif /* __EXYNOS_CLK_PLL_H */
drivers/clk/exynos/clk.c new file +121 -0

121 lines not on this page · raw message

drivers/clk/exynos/clk.h new file +228 -0

228 lines not on this page · raw message

Signature · 1 line
2.39.2
author maintainer
#8 lore raw

PATCH v2 8/13 clk: exynos: Add Exynos850 clock driver

In reply to Sam Protsenko

Heavily influenced by its Linux kernel counterpart. It's implemented on top of recently added Samsung CCF clock framework API. For now only UART leaf clocks are implemented, along with all preceding clocks in CMU_TOP and CMU_PERI. The UART baud clock is required in the serial driver, to get its rate for the consequent baud rate calculation.

---
Changes in v2:
- Added R-b tag

 drivers/clk/exynos/Kconfig         |   7 ++
 drivers/clk/exynos/Makefile        |   1 +
 drivers/clk/exynos/clk-exynos850.c | 189 +++++++++++++++++++++++++++++
 3 files changed, 197 insertions(+)
 create mode 100644 drivers/clk/exynos/clk-exynos850.c
drivers/clk/exynos/Kconfig +7 -0
index eb0efa97d15c..85ce9d6e2418 100644
@@ -15,4 +15,11 @@ config CLK_EXYNOS7420
 	  This enables common clock driver support for platforms based
 	  on Samsung Exynos7420 SoC.
 
+config CLK_EXYNOS850
+	bool "Clock driver for Samsung's Exynos850 SoC"
+	select CLK_CCF
+	help
+	  This enables common clock driver support for platforms based
+	  on Samsung Exynos850 SoC.
+
 endmenu
drivers/clk/exynos/Makefile +1 -0
index 04c5b9a39e16..734100e2bff3 100644
@@ -9,3 +9,4 @@
 
 obj-$(CONFIG_$(SPL_TPL_)CLK_CCF)	+= clk.o clk-pll.o
 obj-$(CONFIG_CLK_EXYNOS7420)		+= clk-exynos7420.o
+obj-$(CONFIG_CLK_EXYNOS850)		+= clk-exynos850.o
drivers/clk/exynos/clk-exynos850.c new file +189 -0

189 lines not on this page · raw message

Signature · 1 line
2.39.2
author maintainer
#9 lore raw

PATCH v2 9/13 pinctrl: exynos: Add pinctrl support for Exynos850

In reply to Sam Protsenko

Add pinctrl support for Exynos850 SoC. It was mostly extracted from corresponding Linux kernel code [1]. Power down modes and external interrupt data were removed while converting the code for U-Boot, but everything else was kept almost unchanged.

[1] drivers/pinctrl/samsung/pinctrl-exynos-arm64.c

---
Changes in v2:
- Fixed driver description in the comment
- Added R-b tag

 drivers/pinctrl/exynos/Kconfig             |   8 ++
 drivers/pinctrl/exynos/Makefile            |   1 +
 drivers/pinctrl/exynos/pinctrl-exynos850.c | 125 +++++++++++++++++++++
 3 files changed, 134 insertions(+)
 create mode 100644 drivers/pinctrl/exynos/pinctrl-exynos850.c
drivers/pinctrl/exynos/Kconfig +8 -0
index a60f49869b45..1b7fb62bc4ba 100644
@@ -16,3 +16,11 @@ config PINCTRL_EXYNOS78x0
 	help
 	  Support pin multiplexing and pin configuration control on
 	  Samsung's Exynos78x0 SoC.
+
+config PINCTRL_EXYNOS850
+	bool "Samsung Exynos850 pinctrl driver"
+	depends on ARCH_EXYNOS && PINCTRL_FULL
+	select PINCTRL_EXYNOS
+	help
+	  Support pin multiplexing and pin configuration control on
+	  Samsung's Exynos850 SoC.
drivers/pinctrl/exynos/Makefile +1 -0
index 07db970ca942..3abe1226eb74 100644
@@ -6,3 +6,4 @@
 obj-$(CONFIG_PINCTRL_EXYNOS)		+= pinctrl-exynos.o
 obj-$(CONFIG_PINCTRL_EXYNOS7420)	+= pinctrl-exynos7420.o
 obj-$(CONFIG_PINCTRL_EXYNOS78x0)	+= pinctrl-exynos78x0.o
+obj-$(CONFIG_PINCTRL_EXYNOS850)		+= pinctrl-exynos850.o
drivers/pinctrl/exynos/pinctrl-exynos850.c new file +125 -0

125 lines not on this page · raw message

Signature · 1 line
2.39.2
author maintainer
#10 lore raw

PATCH v2 10/13 serial: s5p: Add Exynos850 compatible

In reply to Sam Protsenko

Enable serial support for Exynos850 SoC by adding the corresponding compatible string. No additional changes needed, the driver works as is on Exynos850. Related USI and PMU configuration is enabled in separate drivers. The only other dependencies are clock and pinctrl drivers, which are already enabled too.

---
Changes in v2:
- (none)

 drivers/serial/serial_s5p.c | 1 +
 1 file changed, 1 insertion(+)
drivers/serial/serial_s5p.c +1 -0
index 7d04dcff54fc..801b7645afa4 100644
@@ -257,6 +257,7 @@ static const struct dm_serial_ops s5p_serial_ops = {
 
 static const struct udevice_id s5p_serial_ids[] = {
 	{ .compatible = "samsung,exynos4210-uart",	.data = PORT_S5P },
+	{ .compatible = "samsung,exynos850-uart",	.data = PORT_S5P },
 	{ .compatible = "apple,s5l-uart",		.data = PORT_S5L },
 	{ }
 };
Signature · 1 line
2.39.2
author maintainer
#11 lore raw

PATCH v2 11/13 arm: exynos: Add Exynos850 SoC support

In reply to Sam Protsenko

Samsung Exynos850 is ARMv8-based mobile-oriented SoC. It features Cortex-A55 CPU (8 cores) and it's built using 8nm process.

Add Exynos850 support by enabling next features:

* Import Exynos850 SoC dtsi files from Linux kernel
* Add Exynos850 MMU memory map
* Introduce ARCH_EXYNOS9 platform config option

---
Changes in v2:
- (none)

 arch/arm/dts/exynos-pinctrl.h       |  79 +++
 arch/arm/dts/exynos850-pinctrl.dtsi | 663 +++++++++++++++++++++++
 arch/arm/dts/exynos850.dtsi         | 809 ++++++++++++++++++++++++++++
 arch/arm/mach-exynos/Kconfig        |   9 +
 arch/arm/mach-exynos/mmu-arm64.c    |  34 ++
 5 files changed, 1594 insertions(+)
 create mode 100644 arch/arm/dts/exynos-pinctrl.h
 create mode 100644 arch/arm/dts/exynos850-pinctrl.dtsi
 create mode 100644 arch/arm/dts/exynos850.dtsi
arch/arm/dts/exynos-pinctrl.h new file +79 -0
new file mode 100644
index 000000000000..7dd94a9b3652
@@ -0,0 +1,79 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Samsung Exynos DTS pinctrl constants
+ *
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com
+ * Copyright (c) 2022 Linaro Ltd
+ * Author: Krzysztof Kozlowski <[email protected]>
+ */
+
+#ifndef __DTS_ARM64_SAMSUNG_EXYNOS_PINCTRL_H__
+#define __DTS_ARM64_SAMSUNG_EXYNOS_PINCTRL_H__
+
+#define EXYNOS_PIN_PULL_NONE		0
+#define EXYNOS_PIN_PULL_DOWN		1
+#define EXYNOS_PIN_PULL_UP		3
+
+/* Pin function in power down mode */
+#define EXYNOS_PIN_PDN_OUT0		0
+#define EXYNOS_PIN_PDN_OUT1		1
+#define EXYNOS_PIN_PDN_INPUT		2
+#define EXYNOS_PIN_PDN_PREV		3
+
+/*
+ * Drive strengths for Exynos5410, Exynos542x, Exynos5800, Exynos7885, Exynos850
+ * (except GPIO_HSI block), ExynosAutov9 (FSI0, PERIC1)
+ */
+#define EXYNOS5420_PIN_DRV_LV1		0
+#define EXYNOS5420_PIN_DRV_LV2		1
+#define EXYNOS5420_PIN_DRV_LV3		2
+#define EXYNOS5420_PIN_DRV_LV4		3
+
+/* Drive strengths for Exynos5433 */
+#define EXYNOS5433_PIN_DRV_FAST_SR1	0
+#define EXYNOS5433_PIN_DRV_FAST_SR2	1
+#define EXYNOS5433_PIN_DRV_FAST_SR3	2
+#define EXYNOS5433_PIN_DRV_FAST_SR4	3
+#define EXYNOS5433_PIN_DRV_FAST_SR5	4
+#define EXYNOS5433_PIN_DRV_FAST_SR6	5
+#define EXYNOS5433_PIN_DRV_SLOW_SR1	8
+#define EXYNOS5433_PIN_DRV_SLOW_SR2	9
+#define EXYNOS5433_PIN_DRV_SLOW_SR3	0xa
+#define EXYNOS5433_PIN_DRV_SLOW_SR4	0xb
+#define EXYNOS5433_PIN_DRV_SLOW_SR5	0xc
+#define EXYNOS5433_PIN_DRV_SLOW_SR6	0xf
+
+/* Drive strengths for Exynos7 (except FSYS1) */
+#define EXYNOS7_PIN_DRV_LV1		0
+#define EXYNOS7_PIN_DRV_LV2		2
+#define EXYNOS7_PIN_DRV_LV3		1
+#define EXYNOS7_PIN_DRV_LV4		3
+
+/* Drive strengths for Exynos7 FSYS1 block */
+#define EXYNOS7_FSYS1_PIN_DRV_LV1	0
+#define EXYNOS7_FSYS1_PIN_DRV_LV2	4
+#define EXYNOS7_FSYS1_PIN_DRV_LV3	2
+#define EXYNOS7_FSYS1_PIN_DRV_LV4	6
+#define EXYNOS7_FSYS1_PIN_DRV_LV5	1
+#define EXYNOS7_FSYS1_PIN_DRV_LV6	5
+
+/* Drive strengths for Exynos850 GPIO_HSI block */
+#define EXYNOS850_HSI_PIN_DRV_LV1	0	/* 1x   */
+#define EXYNOS850_HSI_PIN_DRV_LV1_5	1	/* 1.5x */
+#define EXYNOS850_HSI_PIN_DRV_LV2	2	/* 2x   */
+#define EXYNOS850_HSI_PIN_DRV_LV2_5	3	/* 2.5x */
+#define EXYNOS850_HSI_PIN_DRV_LV3	4	/* 3x   */
+#define EXYNOS850_HSI_PIN_DRV_LV4	5	/* 4x   */
+
+#define EXYNOS_PIN_FUNC_INPUT		0
+#define EXYNOS_PIN_FUNC_OUTPUT		1
+#define EXYNOS_PIN_FUNC_2		2
+#define EXYNOS_PIN_FUNC_3		3
+#define EXYNOS_PIN_FUNC_4		4
+#define EXYNOS_PIN_FUNC_5		5
+#define EXYNOS_PIN_FUNC_6		6
+#define EXYNOS_PIN_FUNC_EINT		0xf
+#define EXYNOS_PIN_FUNC_F		EXYNOS_PIN_FUNC_EINT
+
+#endif /* __DTS_ARM64_SAMSUNG_EXYNOS_PINCTRL_H__ */
arch/arm/dts/exynos850-pinctrl.dtsi new file +663 -0

663 lines not on this page · raw message

arch/arm/dts/exynos850.dtsi new file +809 -0

809 lines not on this page · raw message

arch/arm/mach-exynos/Kconfig +9 -0
index 8f3aee052c8a..45fc6bb024b0 100644
@@ -58,6 +58,15 @@ config ARCH_EXYNOS7
 	  Cortex-A53 CPU (and some in a big.LITTLE configuration). There are
 	  multiple SoCs in this family including Exynos7420.
 
+config ARCH_EXYNOS9
+	bool "Exynos9 SoC family"
+	select ARM64
+	select BLK
+	select DM_MMC
+	help
+	  Samsung Exynos9 SoC family are based on ARMv8 Cortex CPU. There are
+	  multiple SoCs in this family including Exynos850.
+
 endchoice
 
 if ARCH_EXYNOS4
arch/arm/mach-exynos/mmu-arm64.c +34 -0
index 8d8c64e8f8fa..30e522804fbf 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <asm/armv8/mmu.h>
+#include <linux/sizes.h>
 
 #if IS_ENABLED(CONFIG_EXYNOS7420)
 
@@ -95,4 +96,37 @@ static struct mm_region exynos7880_mem_map[] = {
 };
 
 struct mm_region *mem_map = exynos7880_mem_map;
+
+#elif IS_ENABLED(CONFIG_EXYNOS850)
+
+static struct mm_region exynos850_mem_map[] = {
+	{
+		/* Peripheral block */
+		.virt = 0x10000000UL,
+		.phys = 0x10000000UL,
+		.size = SZ_256M,
+		.attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
+			 PTE_BLOCK_NON_SHARE |
+			 PTE_BLOCK_PXN | PTE_BLOCK_UXN
+	}, {
+		/* DDR, 32-bit area */
+		.virt = 0x80000000UL,
+		.phys = 0x80000000UL,
+		.size = SZ_2G,
+		.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+			 PTE_BLOCK_INNER_SHARE
+	}, {
+		/* DDR, 64-bit area */
+		.virt = 0x880000000UL,
+		.phys = 0x880000000UL,
+		.size = SZ_2G,
+		.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+			 PTE_BLOCK_INNER_SHARE
+	}, {
+		/* List terminator */
+	}
+};
+
+struct mm_region *mem_map = exynos850_mem_map;
+
 #endif
Signature · 1 line
2.39.2
author maintainer
#12 lore raw

PATCH v2 12/13 board: samsung: Add support for E850-96 board

In reply to Sam Protsenko

Add support for WinLink E850-96 board [1]. It's based on Exynos850 SoC and follows 96boards specification, so it's compatible with 96boards mezzanine boards [2]. This patch enables next features:

* Serial console
* USI
* PMU (muxing AP UART path)
* Pinctrl
* Clocks
* Timer (ARMv8 architected)
* Reset control

It's quite a minimal enablement. Features like MMC, USB and Ethernet will be enabled later.

The rationale for config values is as follows:

* TEXT_BASE = 0xf8800000

That's where BL2 loads the U-Boot payload, so TEXT_BASE must be exactly this value. Overall the memory map is designed in a way to keep the bootloader in the upper 128 MiB area of RAM, which is 0xf8000000..0xffffffff. That includes bootloader's code, stack, data, heap, MMU tables, etc. All the memory below that 128 MiB chunk can be used for storing boot images (0x80000000..0xf8000000).

* CUSTOM_SYS_INIT_SP_ADDR = 0xf8c00000

Just 4 MiB above the TEXT_BASE address, to leave enough space for U-Boot code and stack itself (grows downwards).

* SYS_LOAD_ADDR = 0x80000000

The beginning of RAM. That's where Linux kernel image must be loaded.

* SYS_MALLOC_LEN = 0x81f000

    8 MiB for malloc() + ENV_SIZE (128 KiB)

* SYS_MALLOC_F_LEN = 0x4000

Increase malloc() pool size available before relocation from 8 KiB (default) to 16 KiB. Otherwise "alloc space exhausted" message appears in U-Boot log during board_init_f() stage. There are next reasons for doing so:

1. Having "bootph-all" flags in some dts nodes leads to binding those during pre-relocation stage, and binding (DM) uses dynamic memory allocation
2. clk-exynos850 driver uses CCF clocks, which in turn use dynamic memory allocation

Device tree file was imported from Linux kernel. All nodes and boot phase flags added in exynos850-e850-96-u-boot.dtsi are only needed to enable serial console:

* oscclk -> cmu_top -> cmu_peri: generate UART/USI clocks
* pinctrl_alive and uart1_pins: needed to mux UART pins
* pmu_system_controller: configures AP UART path to uart1_pins
* usi_uart: configures USI block to operate as a UART protocol
* serial_0: enables serial console (UART)

[1] https://www.96boards.org/product/e850-96b/
[2] https://www.96boards.org/products/mezzanine/

---
Changes in v2:
- (none)

 arch/arm/dts/Makefile                         |    1 +
 arch/arm/dts/exynos850-e850-96-u-boot.dtsi    |   37 +
 arch/arm/dts/exynos850-e850-96.dts            |  273 ++++
 arch/arm/mach-exynos/Kconfig                  |   19 +-
 board/samsung/e850-96/Kconfig                 |   16 +
 board/samsung/e850-96/MAINTAINERS             |    9 +
 board/samsung/e850-96/Makefile                |    6 +
 board/samsung/e850-96/e850-96.c               |   22 +
 configs/e850-96_defconfig                     |   21 +
 doc/board/samsung/e850-96.rst                 |   87 ++
 .../img/exynos850-boot-architecture.svg       | 1283 +++++++++++++++++
 doc/board/samsung/index.rst                   |    1 +
 include/configs/e850-96.h                     |   12 +
 13 files changed, 1786 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/exynos850-e850-96-u-boot.dtsi
 create mode 100644 arch/arm/dts/exynos850-e850-96.dts
 create mode 100644 board/samsung/e850-96/Kconfig
 create mode 100644 board/samsung/e850-96/MAINTAINERS
 create mode 100644 board/samsung/e850-96/Makefile
 create mode 100644 board/samsung/e850-96/e850-96.c
 create mode 100644 configs/e850-96_defconfig
 create mode 100644 doc/board/samsung/e850-96.rst
 create mode 100644 doc/board/samsung/img/exynos850-boot-architecture.svg
 create mode 100644 include/configs/e850-96.h
arch/arm/dts/Makefile +1 -0
index 773c2546131c..84b8203e0f6a 100644
@@ -31,6 +31,7 @@ dtb-$(CONFIG_EXYNOS7420) += exynos7420-espresso7420.dtb
 dtb-$(CONFIG_TARGET_A5Y17LTE) += exynos78x0-axy17lte.dtb
 dtb-$(CONFIG_TARGET_A3Y17LTE) += exynos78x0-axy17lte.dtb
 dtb-$(CONFIG_TARGET_A7Y17LTE) += exynos78x0-axy17lte.dtb
+dtb-$(CONFIG_TARGET_E850_96) += exynos850-e850-96.dtb
 
 dtb-$(CONFIG_ARCH_APPLE) += \
 	t8103-j274.dtb \
arch/arm/dts/exynos850-e850-96-u-boot.dtsi new file +37 -0
new file mode 100644
index 000000000000..7ad11e9faab2
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2023 Linaro Ltd.
+ */
+
+&cmu_top {
+	bootph-all;
+};
+
+&cmu_peri {
+	bootph-all;
+};
+
+&oscclk {
+	bootph-all;
+};
+
+&pinctrl_alive {
+	bootph-all;
+};
+
+&pmu_system_controller {
+	bootph-all;
+	samsung,uart-debug-1;
+};
+
+&serial_0 {
+	bootph-all;
+};
+
+&uart1_pins {
+	bootph-all;
+};
+
+&usi_uart {
+	bootph-all;
+};
arch/arm/dts/exynos850-e850-96.dts new file +273 -0

273 lines not on this page · raw message

arch/arm/mach-exynos/Kconfig +18 -1
index 45fc6bb024b0..af00ee1db07a 100644
@@ -2,7 +2,7 @@ if ARCH_EXYNOS
 
 config BOARD_COMMON
 	def_bool y
-	depends on !TARGET_SMDKV310 && !TARGET_ARNDALE
+	depends on !TARGET_SMDKV310 && !TARGET_ARNDALE && !TARGET_E850_96
 
 config SPI_BOOTING
 	bool
@@ -237,6 +237,22 @@ config  TARGET_A3Y17LTE
 endchoice
 endif
 
+if ARCH_EXYNOS9
+
+choice
+	prompt "EXYNOS9 board select"
+
+config TARGET_E850_96
+	bool "WinLink E850-96 board"
+	select ARM64
+	select CLK_EXYNOS
+	select OF_CONTROL
+	select PINCTRL
+	select PINCTRL_EXYNOS850
+
+endchoice
+endif
+
 config SYS_SOC
 	default "exynos"
 
@@ -261,5 +277,6 @@ source "board/samsung/smdk5250/Kconfig"
 source "board/samsung/smdk5420/Kconfig"
 source "board/samsung/espresso7420/Kconfig"
 source "board/samsung/axy17lte/Kconfig"
+source "board/samsung/e850-96/Kconfig"
 
 endif
board/samsung/e850-96/Kconfig new file +16 -0
new file mode 100644
index 000000000000..f891a906959b
@@ -0,0 +1,16 @@
+if TARGET_E850_96
+
+config EXYNOS850
+	bool "Exynos850 SoC support"
+	default y
+
+config SYS_BOARD
+	default "e850-96"
+
+config SYS_VENDOR
+	default "samsung"
+
+config SYS_CONFIG_NAME
+	default "e850-96"
+
+endif
board/samsung/e850-96/MAINTAINERS new file +9 -0
new file mode 100644
index 000000000000..e8b9365eea85
@@ -0,0 +1,9 @@
+WINLINK E850-96 BOARD
+M:	Sam Protsenko <[email protected]>
+S:	Maintained
+F:	arch/arm/dts/exynos850-e850-96-u-boot.dtsi
+F:	arch/arm/dts/exynos850-e850-96.dts
+F:	board/samsung/e850-96/
+F:	configs/e850-96_defconfig
+F:	doc/board/samsung/e850-96.rst
+F:	include/configs/e850-96.h
board/samsung/e850-96/Makefile new file +6 -0
new file mode 100644
index 000000000000..301c22337119
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (C) 2020, Linaro Limited
+# Sam Protsenko <[email protected]>
+
+obj-y	:= e850-96.o
board/samsung/e850-96/e850-96.c new file +22 -0
new file mode 100644
index 000000000000..a00d81b5d4c3
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2020, Linaro Limited
+ * Sam Protsenko <[email protected]>
+ */
+
+#include <init.h>
+
+int dram_init(void)
+{
+	return fdtdec_setup_mem_size_base();
+}
+
+int dram_init_banksize(void)
+{
+	return fdtdec_setup_memory_banksize();
+}
+
+int board_init(void)
+{
+	return 0;
+}
configs/e850-96_defconfig new file +21 -0
new file mode 100644
index 000000000000..bb41635ff784
@@ -0,0 +1,21 @@
+CONFIG_ARM=y
+CONFIG_ARCH_CPU_INIT=y
+CONFIG_ARCH_EXYNOS=y
+CONFIG_TEXT_BASE=0xf8800000
+CONFIG_SYS_MALLOC_LEN=0x81f000
+CONFIG_SYS_MALLOC_F_LEN=0x4000
+CONFIG_ARCH_EXYNOS9=y
+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xf8c00000
+CONFIG_DEFAULT_DEVICE_TREE="exynos850-e850-96"
+CONFIG_SYS_LOAD_ADDR=0x80000000
+# CONFIG_AUTOBOOT is not set
+# CONFIG_DISPLAY_CPUINFO is not set
+# CONFIG_NET is not set
+CONFIG_CLK_EXYNOS850=y
+# CONFIG_MMC is not set
+CONFIG_SOC_SAMSUNG=y
+CONFIG_EXYNOS_PMU=y
+CONFIG_EXYNOS_USI=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_SYSCON=y
doc/board/samsung/e850-96.rst new file +87 -0

87 lines not on this page · raw message

doc/board/samsung/img/exynos850-boot-architecture.svg new file +1283 -0

1,283 lines not on this page · raw message

doc/board/samsung/index.rst +1 -0
index 971805e20169..a1c9636b0507 100644
@@ -7,3 +7,4 @@ Samsung
    :maxdepth: 2
 
    axy17lte
+   e850-96
include/configs/e850-96.h new file +12 -0
new file mode 100644
index 000000000000..4607b3089b21
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2020, Linaro Limited
+ * Sam Protsenko <[email protected]>
+ *
+ * Configuration for E850-96 board.
+ */
+
+#ifndef __E850_96_H
+#define __E850_96_H
+
+#endif /* __E850_96_H */
Signature · 1 line
2.39.2
author maintainer
#13 lore raw

PATCH v2 13/13 MAINTAINERS: Add new Samsung subsystems

In reply to Sam Protsenko

Add next Samsung subsystems with Sam Protsenko as a maintainer:

- Samsung CCF Clock Framework
- Exynos850 SoC Support
- Samsung SoC Drivers

---
Changes in v2:
- (none)

 MAINTAINERS | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
MAINTAINERS +25 -0
index 4fec063a242f..33e96cd4231f 100644
@@ -563,6 +563,31 @@ F:	arch/arm/mach-exynos/
 F:	arch/arm/mach-s5pc1xx/
 F:	arch/arm/cpu/armv7/s5p-common/
 
+ARM SAMSUNG CLOCK
+M:	Sam Protsenko <[email protected]>
+S:	Maintained
+F:	drivers/clk/exynos/clk-pll.c
+F:	drivers/clk/exynos/clk-pll.h
+F:	drivers/clk/exynos/clk.c
+F:	drivers/clk/exynos/clk.h
+
+ARM SAMSUNG EXYNOS850 SOC
+M:	Sam Protsenko <[email protected]>
+S:	Maintained
+F:	arch/arm/dts/exynos850-pinctrl.dtsi
+F:	arch/arm/dts/exynos850.dtsi
+F:	doc/device-tree-bindings/clock/samsung,exynos850-clock.yaml
+F:	drivers/clk/exynos/clk-exynos850.c
+F:	drivers/pinctrl/exynos/pinctrl-exynos850.c
+F:	include/dt-bindings/clock/exynos850.h
+
+ARM SAMSUNG SOC DRIVERS
+M:	Sam Protsenko <[email protected]>
+S:	Maintained
+F:	doc/device-tree-bindings/soc/samsung/*
+F:	drivers/soc/samsung/*
+F:	include/dt-bindings/soc/samsung,*.h
+
 ARM SANCLOUD
 M:	Paul Barker <[email protected]>
 R:	Marc Murphy <[email protected]>
Signature · 1 line
2.39.2
author maintainer
#14 lore raw
In reply to Sam Protsenko

Hey Tom, Minkyu,

If there are no outstanding concerns about this series, can you please apply it?

Thanks!

Quoted 141 lines · Sam Protsenko

Add Exynos850 SoC and WinLink's E850-96 board support. A short overview of series additions and modifications:
* USI driver: configures UART block
* PMU driver: connects AP UART lines to uart1 pins)
* Exynos850 clock driver: generates UART clocks
* Exynos850 pinctrl driver: mux UART pins
* serial_s5p: UART driver
* Exynos850 SoC: dtsi files and MMU maps
* E850-96 board: dts files, defconfig, board file and doc

Most of the code was borrowed from mainline Linux kernel (where this board is already enabled) and adapted for U-Boot. Preliminary preparation for this series includes next patches / series (already merged):

* commit 585a2aaac2ac ("arm: exynos: Include missing CPU header in

                          soc.c")
  * commit c9ab9f30c8e4 ("arm: exynos: Include missing CPU header in
                          gpio.h")
  * commit 11bd2787deff ("watchdog: s5p_wdt: Include missing CPU
                          header")
  * commit 08cfa971a717 ("exynos: Avoid duplicate reset_cpu with
                          SYSRESET enabled")
  * commit f655090901dc ("clk: exynos: Add header guard for clk-pll.h")
  * commit 2227f4c0afed ("serial: s5p: Fix clk_get_by_index() error code
                          check")

* commit a0615ffc99a5 ("serial: s5p: Remove common.h inclusion")
* commit 5ad21de6bae0 ("serial: s5p: Use livetree API to get "id" property")
* commit e79f630dbf67 ("serial: s5p: Use named constants for register values")
* commit a627f2802a71 ("serial: s5p: Improve coding style")
* commit 33e7ca5a9b6a ("serial: s5p: Use dev_read_addr_ptr() to get base address")
* commit 6219b47c4d91 ("board: samsung: Fix SYS_CONFIG_NAME configs in axy17lte Kconfig")
* commit 470682ace1e0 ("configs: Remove unneeded SYS_CONFIG_NAME from a*y17lte defconfigs")

and series [1]. For more detailed description please see the board documentation (added in PATCH #12) and corresponding commit messages.

Changes in v2:
- PATCH 4: Removed unnecessary mode param
- PATCH 4: Removed usi->dev and used priv data instead
- PATCH 4: Used .of_plat_data callback for dts parsing
- PATCH 7: Fixed Thomas Abraham e-mail
- PATCH 9: Fixed incorrect driver description (comment)
- Collected Reviewed-by tags
- Rebased on top of most recent U-Boot/master

[1] https://lists.denx.de/pipermail/u-boot/2023-November/539033.html

Sam Protsenko (13):
dt-bindings: soc: samsung: Add Exynos USI
dt-bindings: soc: samsung: Add Exynos PMU
dt-bindings: clock: Add Exynos850 clock controller
soc: samsung: Add Exynos USI driver
soc: samsung: Add Exynos PMU driver
clk: exynos: Move pll code into clk-exynos7420
clk: exynos: Add Samsung clock framework
clk: exynos: Add Exynos850 clock driver
pinctrl: exynos: Add pinctrl support for Exynos850
serial: s5p: Add Exynos850 compatible
arm: exynos: Add Exynos850 SoC support
board: samsung: Add support for E850-96 board
MAINTAINERS: Add new Samsung subsystems

 MAINTAINERS                                   |   25 +
 arch/arm/dts/Makefile                         |    1 +
 arch/arm/dts/exynos-pinctrl.h                 |   79 +
 arch/arm/dts/exynos850-e850-96-u-boot.dtsi    |   37 +
 arch/arm/dts/exynos850-e850-96.dts            |  273 ++++
 arch/arm/dts/exynos850-pinctrl.dtsi           |  663 +++++++++
 arch/arm/dts/exynos850.dtsi                   |  809 +++++++++++
 arch/arm/mach-exynos/Kconfig                  |   28 +-
 arch/arm/mach-exynos/mmu-arm64.c              |   34 +
 board/samsung/e850-96/Kconfig                 |   16 +
 board/samsung/e850-96/MAINTAINERS             |    9 +
 board/samsung/e850-96/Makefile                |    6 +
 board/samsung/e850-96/e850-96.c               |   22 +
 configs/e850-96_defconfig                     |   21 +
 doc/board/samsung/e850-96.rst                 |   87 ++
 .../img/exynos850-boot-architecture.svg       | 1283 +++++++++++++++++
 doc/board/samsung/index.rst                   |    1 +
 .../clock/samsung,exynos850-clock.yaml        |  307 ++++
 .../soc/samsung/exynos-pmu.yaml               |   85 ++
 .../soc/samsung/exynos-usi.yaml               |  162 +++
 drivers/clk/exynos/Kconfig                    |    7 +
 drivers/clk/exynos/Makefile                   |   11 +-
 drivers/clk/exynos/clk-exynos7420.c           |   25 +-
 drivers/clk/exynos/clk-exynos850.c            |  189 +++
 drivers/clk/exynos/clk-pll.c                  |  167 ++-
 drivers/clk/exynos/clk-pll.h                  |   16 +-
 drivers/clk/exynos/clk.c                      |  121 ++
 drivers/clk/exynos/clk.h                      |  228 +++
 drivers/pinctrl/exynos/Kconfig                |    8 +
 drivers/pinctrl/exynos/Makefile               |    1 +
 drivers/pinctrl/exynos/pinctrl-exynos850.c    |  125 ++
 drivers/serial/serial_s5p.c                   |    1 +
 drivers/soc/Kconfig                           |    1 +
 drivers/soc/Makefile                          |    1 +
 drivers/soc/samsung/Kconfig                   |   33 +
 drivers/soc/samsung/Makefile                  |    4 +
 drivers/soc/samsung/exynos-pmu.c              |  102 ++
 drivers/soc/samsung/exynos-usi.c              |  208 +++
 include/configs/e850-96.h                     |   12 +
 include/dt-bindings/clock/exynos850.h         |  337 +++++
 include/dt-bindings/soc/samsung,exynos-usi.h  |   17 +
 41 files changed, 5538 insertions(+), 24 deletions(-)
 create mode 100644 arch/arm/dts/exynos-pinctrl.h
 create mode 100644 arch/arm/dts/exynos850-e850-96-u-boot.dtsi
 create mode 100644 arch/arm/dts/exynos850-e850-96.dts
 create mode 100644 arch/arm/dts/exynos850-pinctrl.dtsi
 create mode 100644 arch/arm/dts/exynos850.dtsi
 create mode 100644 board/samsung/e850-96/Kconfig
 create mode 100644 board/samsung/e850-96/MAINTAINERS
 create mode 100644 board/samsung/e850-96/Makefile
 create mode 100644 board/samsung/e850-96/e850-96.c
 create mode 100644 configs/e850-96_defconfig
 create mode 100644 doc/board/samsung/e850-96.rst
 create mode 100644 doc/board/samsung/img/exynos850-boot-architecture.svg
 create mode 100644 doc/device-tree-bindings/clock/samsung,exynos850-clock.yaml
 create mode 100644 doc/device-tree-bindings/soc/samsung/exynos-pmu.yaml
 create mode 100644 doc/device-tree-bindings/soc/samsung/exynos-usi.yaml
 create mode 100644 drivers/clk/exynos/clk-exynos850.c
 create mode 100644 drivers/clk/exynos/clk.c
 create mode 100644 drivers/clk/exynos/clk.h
 create mode 100644 drivers/pinctrl/exynos/pinctrl-exynos850.c
 create mode 100644 drivers/soc/samsung/Kconfig
 create mode 100644 drivers/soc/samsung/Makefile
 create mode 100644 drivers/soc/samsung/exynos-pmu.c
 create mode 100644 drivers/soc/samsung/exynos-usi.c
 create mode 100644 include/configs/e850-96.h
 create mode 100644 include/dt-bindings/clock/exynos850.h
 create mode 100644 include/dt-bindings/soc/samsung,exynos-usi.h

--
2.39.2

#15 lore raw

Hi,

Quoted 133 lines · Sam Protsenko

Hey Tom, Minkyu,

If there are no outstanding concerns about this series, can you please apply it?

Thanks!

Quoted 116 lines · Sam Protsenko

Add Exynos850 SoC and WinLink's E850-96 board support. A short overview of series additions and modifications:
* USI driver: configures UART block
* PMU driver: connects AP UART lines to uart1 pins)
* Exynos850 clock driver: generates UART clocks
* Exynos850 pinctrl driver: mux UART pins
* serial_s5p: UART driver
* Exynos850 SoC: dtsi files and MMU maps
* E850-96 board: dts files, defconfig, board file and doc

Most of the code was borrowed from mainline Linux kernel (where this board is already enabled) and adapted for U-Boot. Preliminary preparation for this series includes next patches / series (already merged):

* commit 585a2aaac2ac ("arm: exynos: Include missing CPU header in

                          soc.c")
  * commit c9ab9f30c8e4 ("arm: exynos: Include missing CPU header in
                          gpio.h")
  * commit 11bd2787deff ("watchdog: s5p_wdt: Include missing CPU
                          header")
  * commit 08cfa971a717 ("exynos: Avoid duplicate reset_cpu with
                          SYSRESET enabled")
  * commit f655090901dc ("clk: exynos: Add header guard for clk-pll.h")
  * commit 2227f4c0afed ("serial: s5p: Fix clk_get_by_index() error code
                          check")

* commit a0615ffc99a5 ("serial: s5p: Remove common.h inclusion")
* commit 5ad21de6bae0 ("serial: s5p: Use livetree API to get "id" property")
* commit e79f630dbf67 ("serial: s5p: Use named constants for register values")
* commit a627f2802a71 ("serial: s5p: Improve coding style")
* commit 33e7ca5a9b6a ("serial: s5p: Use dev_read_addr_ptr() to get base address")
* commit 6219b47c4d91 ("board: samsung: Fix SYS_CONFIG_NAME configs in axy17lte Kconfig")
* commit 470682ace1e0 ("configs: Remove unneeded SYS_CONFIG_NAME from a*y17lte defconfigs")

and series [1]. For more detailed description please see the board documentation (added in PATCH #12) and corresponding commit messages.

Changes in v2:
- PATCH 4: Removed unnecessary mode param
- PATCH 4: Removed usi->dev and used priv data instead
- PATCH 4: Used .of_plat_data callback for dts parsing
- PATCH 7: Fixed Thomas Abraham e-mail
- PATCH 9: Fixed incorrect driver description (comment)
- Collected Reviewed-by tags
- Rebased on top of most recent U-Boot/master

[1] https://lists.denx.de/pipermail/u-boot/2023-November/539033.html

Sam Protsenko (13):
dt-bindings: soc: samsung: Add Exynos USI
dt-bindings: soc: samsung: Add Exynos PMU
dt-bindings: clock: Add Exynos850 clock controller
soc: samsung: Add Exynos USI driver
soc: samsung: Add Exynos PMU driver
clk: exynos: Move pll code into clk-exynos7420
clk: exynos: Add Samsung clock framework
clk: exynos: Add Exynos850 clock driver
pinctrl: exynos: Add pinctrl support for Exynos850
serial: s5p: Add Exynos850 compatible
arm: exynos: Add Exynos850 SoC support
board: samsung: Add support for E850-96 board
MAINTAINERS: Add new Samsung subsystems

 MAINTAINERS                                   |   25 +
 arch/arm/dts/Makefile                         |    1 +
 arch/arm/dts/exynos-pinctrl.h                 |   79 +
 arch/arm/dts/exynos850-e850-96-u-boot.dtsi    |   37 +
 arch/arm/dts/exynos850-e850-96.dts            |  273 ++++
 arch/arm/dts/exynos850-pinctrl.dtsi           |  663 +++++++++
 arch/arm/dts/exynos850.dtsi                   |  809 +++++++++++
 arch/arm/mach-exynos/Kconfig                  |   28 +-
 arch/arm/mach-exynos/mmu-arm64.c              |   34 +
 board/samsung/e850-96/Kconfig                 |   16 +
 board/samsung/e850-96/MAINTAINERS             |    9 +
 board/samsung/e850-96/Makefile                |    6 +
 board/samsung/e850-96/e850-96.c               |   22 +
 configs/e850-96_defconfig                     |   21 +
 doc/board/samsung/e850-96.rst                 |   87 ++
 .../img/exynos850-boot-architecture.svg       | 1283 +++++++++++++++++
 doc/board/samsung/index.rst                   |    1 +
 .../clock/samsung,exynos850-clock.yaml        |  307 ++++
 .../soc/samsung/exynos-pmu.yaml               |   85 ++
 .../soc/samsung/exynos-usi.yaml               |  162 +++
 drivers/clk/exynos/Kconfig                    |    7 +
 drivers/clk/exynos/Makefile                   |   11 +-
 drivers/clk/exynos/clk-exynos7420.c           |   25 +-
 drivers/clk/exynos/clk-exynos850.c            |  189 +++
 drivers/clk/exynos/clk-pll.c                  |  167 ++-
 drivers/clk/exynos/clk-pll.h                  |   16 +-
 drivers/clk/exynos/clk.c                      |  121 ++
 drivers/clk/exynos/clk.h                      |  228 +++
 drivers/pinctrl/exynos/Kconfig                |    8 +
 drivers/pinctrl/exynos/Makefile               |    1 +
 drivers/pinctrl/exynos/pinctrl-exynos850.c    |  125 ++
 drivers/serial/serial_s5p.c                   |    1 +
 drivers/soc/Kconfig                           |    1 +
 drivers/soc/Makefile                          |    1 +
 drivers/soc/samsung/Kconfig                   |   33 +
 drivers/soc/samsung/Makefile                  |    4 +
 drivers/soc/samsung/exynos-pmu.c              |  102 ++
 drivers/soc/samsung/exynos-usi.c              |  208 +++
 include/configs/e850-96.h                     |   12 +
 include/dt-bindings/clock/exynos850.h         |  337 +++++
 include/dt-bindings/soc/samsung,exynos-usi.h  |   17 +
 41 files changed, 5538 insertions(+), 24 deletions(-)
 create mode 100644 arch/arm/dts/exynos-pinctrl.h
 create mode 100644 arch/arm/dts/exynos850-e850-96-u-boot.dtsi
 create mode 100644 arch/arm/dts/exynos850-e850-96.dts
 create mode 100644 arch/arm/dts/exynos850-pinctrl.dtsi
 create mode 100644 arch/arm/dts/exynos850.dtsi
Quoted 8 lines
 create mode 100644 board/samsung/e850-96/Kconfig
 create mode 100644 board/samsung/e850-96/MAINTAINERS
 create mode 100644 board/samsung/e850-96/Makefile
 create mode 100644 board/samsung/e850-96/e850-96.c
 create mode 100644 configs/e850-96_defconfig
 create mode 100644 doc/board/samsung/e850-96.rst
 create mode 100644 doc/board/samsung/img/exynos850-boot-architecture.svg
 create mode 100644
Quoted 19 lines

doc/device-tree-bindings/clock/samsung,exynos850-clock.yaml

Quoted 17 lines
 create mode 100644 doc/device-tree-bindings/soc/samsung/exynos-pmu.yaml
 create mode 100644 doc/device-tree-bindings/soc/samsung/exynos-usi.yaml
 create mode 100644 drivers/clk/exynos/clk-exynos850.c
 create mode 100644 drivers/clk/exynos/clk.c
 create mode 100644 drivers/clk/exynos/clk.h
 create mode 100644 drivers/pinctrl/exynos/pinctrl-exynos850.c
 create mode 100644 drivers/soc/samsung/Kconfig
 create mode 100644 drivers/soc/samsung/Makefile
 create mode 100644 drivers/soc/samsung/exynos-pmu.c
 create mode 100644 drivers/soc/samsung/exynos-usi.c
 create mode 100644 include/configs/e850-96.h
 create mode 100644 include/dt-bindings/clock/exynos850.h
 create mode 100644 include/dt-bindings/soc/samsung,exynos-usi.h

--
2.39.2

applied to u-boot-samsung

Signature · 2 lines
Thanks,
Minkyu Kang.