mbox series

[v5,00/10] Add minimal Exynos8895 SoC and SM-G950F support

Message ID 20240920154508.1618410-1-ivo.ivanov.ivanov1@gmail.com
Headers show
Series Add minimal Exynos8895 SoC and SM-G950F support | expand

Message

Ivaylo Ivanov Sept. 20, 2024, 3:44 p.m. UTC
Hi folks,

This series adds initial SoC support for the Exynos 8895 SoC and also
initial board support for Samsung Galaxy S8 phone (SM-G950F), codenamed
dreamlte.

The Exynos 8895 SoC is also used in S8 Plus (dream2lte), Note 8 (greatlte)
and Meizu 15 Plus (m1891). Currently DT is added for the Exynos 8895 SoC
and dreamlte, but it should be really easy to adapt for the other devices
with the same SoC. It has been tested with dtbs_check W=1 and results
in no warnings.

The support added in this series consists of:
* cpus
* pinctrl
* gpio
* simple-framebuffer
* pstore

This is enough to reach a minimal initramfs shell using an upstream kernel.
More platform support will be added in the future.

The preferred way to boot this device is by using a small shim bl called
uniLoader [1], which packages the mainline kernel and DT and jumps to
the kernel. This is done in order to work around some issues caused by
the stock, and non-replacable Samsung S-Boot bootloader. For example,
S-Boot leaves the decon trigger control unset, which causes the framebuffer
to not refresh. 

[1] https://github.com/ivoszbg/uniLoader

Changes in v2:
- No patch changes were made, only fixed the issues with my git send-email

Changes in v3:
- Added a-b tags by Rob Herring and Linus Walleij
- Ordered the Samsung Mongoose M2 compatible in cpus.yaml
- Ordered the EXYNOS8895 information in exynos-chipid.c
- Made the commit message for pinctrl support more detailed
- Made the commit message for exynos-pmu.yaml more detailed
- Fixed suffixes for the exynos8895 pinctrl device tree
- Removed redundant nodes from the exynos8895 pinctrl device tree
- Made the arm-a53-pmu node cover only the Cortex A53 cores
- Added a comment mentioning the lack of a PMU model for Mongoose cores
- Added a comment mentioning the issue with CNTFRQ_EL0
- Removed the redundant fixed rate clocks wrapper
- Ordered the nodes by the DTS coding style in all 8895 DT files
- Removed the redundant status property from the simple-framebuffer node
- Switch to dual licensing (GPL-2.0 OR BSD-3-Clause) for the DT files

Changes in v4:
- Added r-b tag by Sam Protsenko
- Resolved the remaining pinctrl node name regex issues
- Corrected interrupt-cells for gpa1-gpio-bank
- Fixed suffixes for the dreamlte gpio keys pin nodes
- Reordered the dreamlte gpio-keys nodes alphabetically
- Fixed interrupt-controller simple-bus unit address
- Change framebuffer-related node labels to match other device trees

Changes in v5:
- Removed a false a-b
- Added an r-b tag by Krzysztof Kozlowski <krzk@kernel.org>
- Ordered nodes alphabetically while keeping -gpio-bank's in front in
the exynos8895 pinctrl DT
- Sorted a few nodes and properties in the exynos8895 SoC DT

Kind regards,
Ivaylo.

Ivaylo Ivanov (10):
  dt-bindings: arm: cpus: Add Samsung Mongoose M2
  dt-bindings: hwinfo: samsung,exynos-chipid: add exynos8895 compatible
  soc: samsung: exynos-chipid: add exynos8895 SoC support
  dt-bindings: pinctrl: samsung: Add compatible for Exynos8895 SoC
  pinctrl: samsung: Add exynos8895 SoC pinctrl configuration
  dt-bindings: pinctrl: samsung: add exynos8895-wakeup-eint compatible
  dt-bindings: soc: samsung: exynos-pmu: Add exynos8895 compatible
  arm64: dts: exynos: Add initial support for exynos8895 SoC
  dt-bindings: arm: samsung: Document dreamlte board binding
  arm64: dts: exynos: Add initial support for Samsung Galaxy S8

 .../devicetree/bindings/arm/cpus.yaml         |    1 +
 .../bindings/arm/samsung/samsung-boards.yaml  |    6 +
 .../hwinfo/samsung,exynos-chipid.yaml         |    1 +
 .../samsung,pinctrl-wakeup-interrupt.yaml     |    1 +
 .../bindings/pinctrl/samsung,pinctrl.yaml     |    1 +
 .../bindings/soc/samsung/exynos-pmu.yaml      |    1 +
 arch/arm64/boot/dts/exynos/Makefile           |    1 +
 .../boot/dts/exynos/exynos8895-dreamlte.dts   |  126 ++
 .../boot/dts/exynos/exynos8895-pinctrl.dtsi   | 1094 +++++++++++++++++
 arch/arm64/boot/dts/exynos/exynos8895.dtsi    |  251 ++++
 .../pinctrl/samsung/pinctrl-exynos-arm64.c    |  137 +++
 drivers/pinctrl/samsung/pinctrl-exynos.h      |   10 +
 drivers/pinctrl/samsung/pinctrl-samsung.c     |    2 +
 drivers/pinctrl/samsung/pinctrl-samsung.h     |    1 +
 drivers/soc/samsung/exynos-chipid.c           |    1 +
 15 files changed, 1634 insertions(+)
 create mode 100644 arch/arm64/boot/dts/exynos/exynos8895-dreamlte.dts
 create mode 100644 arch/arm64/boot/dts/exynos/exynos8895-pinctrl.dtsi
 create mode 100644 arch/arm64/boot/dts/exynos/exynos8895.dtsi

Comments

Linus Walleij Oct. 1, 2024, 2:24 p.m. UTC | #1
On Fri, Sep 20, 2024 at 5:45 PM Ivaylo Ivanov
<ivo.ivanov.ivanov1@gmail.com> wrote:

> This series adds initial SoC support for the Exynos 8895 SoC and also
> initial board support for Samsung Galaxy S8 phone (SM-G950F), codenamed
> dreamlte.

The pinctrl stuff looks OK to me but I expect Krzysztof to queue it up
and send me a pull request, he keeps the order around the Exynos
pin control code and bindings.

Yours,
Linus Walleij
Krzysztof Kozlowski Oct. 2, 2024, 7:42 a.m. UTC | #2
On 20/09/2024 17:44, Ivaylo Ivanov wrote:
> Hi folks,
> 
> This series adds initial SoC support for the Exynos 8895 SoC and also
> initial board support for Samsung Galaxy S8 phone (SM-G950F), codenamed
> dreamlte.
> 
> The Exynos 8895 SoC is also used in S8 Plus (dream2lte), Note 8 (greatlte)
> and Meizu 15 Plus (m1891). Currently DT is added for the Exynos 8895 SoC
> and dreamlte, but it should be really easy to adapt for the other devices
> with the same SoC. It has been tested with dtbs_check W=1 and results
> in no warnings.
> 
> The support added in this series consists of:
> * cpus
> * pinctrl
> * gpio
> * simple-framebuffer
> * pstore

The way you sent patches makes it difficult to work with. I don't know
what is the reason for b4 diff failure:

b4 diff '<20240920154508.1618410-1-ivo.ivanov.ivanov1@gmail.com>'
Grabbing thread from
lore.kernel.org/all/20240920154508.1618410-1-ivo.ivanov.ivanov1@gmail.com/t.mbox.gz
Checking for older revisions
Grabbing search results from lore.kernel.org
Nothing matching that query.
---
Analyzing 12 messages in the thread
Could not find lower series to compare against.

so please use b4 for future contributions.

Best regards,
Krzysztof
Krzysztof Kozlowski Oct. 2, 2024, 7:50 a.m. UTC | #3
On 20/09/2024 17:44, Ivaylo Ivanov wrote:
> Hi folks,
> 
> This series adds initial SoC support for the Exynos 8895 SoC and also
> initial board support for Samsung Galaxy S8 phone (SM-G950F), codenamed
> dreamlte.
> 
> The Exynos 8895 SoC is also used in S8 Plus (dream2lte), Note 8 (greatlte)
> and Meizu 15 Plus (m1891). Currently DT is added for the Exynos 8895 SoC
> and dreamlte, but it should be really easy to adapt for the other devices
> with the same SoC. It has been tested with dtbs_check W=1 and results
> in no warnings.
> 
> The support added in this series consists of:
> * cpus
> * pinctrl
> * gpio
> * simple-framebuffer
> * pstore
> 
> This is enough to reach a minimal initramfs shell using an upstream kernel.
> More platform support will be added in the future.
> 
> The preferred way to boot this device is by using a small shim bl called
> uniLoader [1], which packages the mainline kernel and DT and jumps to
> the kernel. This is done in order to work around some issues caused by
> the stock, and non-replacable Samsung S-Boot bootloader. For example,
> S-Boot leaves the decon trigger control unset, which causes the framebuffer
> to not refresh. 
> 
> [1] https://github.com/ivoszbg/uniLoader
> 
> Changes in v2:
> - No patch changes were made, only fixed the issues with my git send-email
> 
> Changes in v3:
> - Added a-b tags by Rob Herring and Linus Walleij
> - Ordered the Samsung Mongoose M2 compatible in cpus.yaml
> - Ordered the EXYNOS8895 information in exynos-chipid.c
> - Made the commit message for pinctrl support more detailed
> - Made the commit message for exynos-pmu.yaml more detailed
> - Fixed suffixes for the exynos8895 pinctrl device tree
> - Removed redundant nodes from the exynos8895 pinctrl device tree
> - Made the arm-a53-pmu node cover only the Cortex A53 cores
> - Added a comment mentioning the lack of a PMU model for Mongoose cores
> - Added a comment mentioning the issue with CNTFRQ_EL0
> - Removed the redundant fixed rate clocks wrapper
> - Ordered the nodes by the DTS coding style in all 8895 DT files
> - Removed the redundant status property from the simple-framebuffer node
> - Switch to dual licensing (GPL-2.0 OR BSD-3-Clause) for the DT files
> 
> Changes in v4:
> - Added r-b tag by Sam Protsenko
> - Resolved the remaining pinctrl node name regex issues
> - Corrected interrupt-cells for gpa1-gpio-bank
> - Fixed suffixes for the dreamlte gpio keys pin nodes
> - Reordered the dreamlte gpio-keys nodes alphabetically
> - Fixed interrupt-controller simple-bus unit address
> - Change framebuffer-related node labels to match other device trees
> 
> Changes in v5:
> - Removed a false a-b
> - Added an r-b tag by Krzysztof Kozlowski <krzk@kernel.org>
> - Ordered nodes alphabetically while keeping -gpio-bank's in front in
> the exynos8895 pinctrl DT
> - Sorted a few nodes and properties in the exynos8895 SoC DT
> 
> Kind regards,
> Ivaylo.
> 
> Ivaylo Ivanov (10):
>   dt-bindings: arm: cpus: Add Samsung Mongoose M2
>   dt-bindings: hwinfo: samsung,exynos-chipid: add exynos8895 compatible
>   soc: samsung: exynos-chipid: add exynos8895 SoC support
>   dt-bindings: pinctrl: samsung: Add compatible for Exynos8895 SoC
>   pinctrl: samsung: Add exynos8895 SoC pinctrl configuration
>   dt-bindings: pinctrl: samsung: add exynos8895-wakeup-eint compatible
>   dt-bindings: soc: samsung: exynos-pmu: Add exynos8895 compatible
>   arm64: dts: exynos: Add initial support for exynos8895 SoC
>   dt-bindings: arm: samsung: Document dreamlte board binding
>   arm64: dts: exynos: Add initial support for Samsung Galaxy S8

One more thing, the way you mixed series makes it very difficult to
apply. Instead of applying few independent series, I need to:
1. Apply, drop patches (or apply 1-by-1).
2. Re-order patches.
3. Apply remaining 1-by-1 on pinctrl.

Please organize your series per subsystem. SoC is a subsystem. pinctrl
is different.

Bindings always go first, I asked for it already. And here everything is
mixed.

Best regards,
Krzysztof
Krzysztof Kozlowski Oct. 2, 2024, 7:57 a.m. UTC | #4
On Fri, 20 Sep 2024 18:44:58 +0300, Ivaylo Ivanov wrote:
> This series adds initial SoC support for the Exynos 8895 SoC and also
> initial board support for Samsung Galaxy S8 phone (SM-G950F), codenamed
> dreamlte.
> 
> The Exynos 8895 SoC is also used in S8 Plus (dream2lte), Note 8 (greatlte)
> and Meizu 15 Plus (m1891). Currently DT is added for the Exynos 8895 SoC
> and dreamlte, but it should be really easy to adapt for the other devices
> with the same SoC. It has been tested with dtbs_check W=1 and results
> in no warnings.
> 
> [...]

Applied, thanks!

There was quite a mess in submission, so all patches had to be re-orded and
split. Below commit IDs might be not accurate.

In the future be sure you organize your patchset per subsystem and correct
order of patches (bindings are always first).

[01/10] dt-bindings: arm: cpus: Add Samsung Mongoose M2
        https://git.kernel.org/krzk/linux/c/d27c76fcd4190cab051543b2ffa2f183a6142c0a
[02/10] dt-bindings: hwinfo: samsung,exynos-chipid: add exynos8895 compatible
        https://git.kernel.org/krzk/linux/c/7f6ea7198e8350ad199bc56f524ea2cc753f8ab7
[03/10] soc: samsung: exynos-chipid: add exynos8895 SoC support
        https://git.kernel.org/krzk/linux/c/e6bb0575953f3f850f5583e9adae3260866e0cbe
[04/10] dt-bindings: pinctrl: samsung: Add compatible for Exynos8895 SoC
        (no commit info)
[05/10] pinctrl: samsung: Add exynos8895 SoC pinctrl configuration
        (no commit info)
[06/10] dt-bindings: pinctrl: samsung: add exynos8895-wakeup-eint compatible
        (no commit info)
[07/10] dt-bindings: soc: samsung: exynos-pmu: Add exynos8895 compatible
        https://git.kernel.org/krzk/linux/c/496374c1d0045177cb5c3e85ce33b2179b11a413
[08/10] arm64: dts: exynos: Add initial support for exynos8895 SoC
        https://git.kernel.org/krzk/linux/c/dcabaa8ae457647e334bbcaf21f9209315e8f752
[09/10] dt-bindings: arm: samsung: Document dreamlte board binding
        https://git.kernel.org/krzk/linux/c/2caf56f6cf69b026749a2c6c8ad083e5c47b8362
[10/10] arm64: dts: exynos: Add initial support for Samsung Galaxy S8
        https://git.kernel.org/krzk/linux/c/296621bfa3ddefcbc4a3c1f64f6e868680a1be59

Best regards,
Ivaylo Ivanov Oct. 2, 2024, 9:09 a.m. UTC | #5
On 10/2/24 10:57, Krzysztof Kozlowski wrote:
> On Fri, 20 Sep 2024 18:44:58 +0300, Ivaylo Ivanov wrote:
>> This series adds initial SoC support for the Exynos 8895 SoC and also
>> initial board support for Samsung Galaxy S8 phone (SM-G950F), codenamed
>> dreamlte.
>>
>> The Exynos 8895 SoC is also used in S8 Plus (dream2lte), Note 8 (greatlte)
>> and Meizu 15 Plus (m1891). Currently DT is added for the Exynos 8895 SoC
>> and dreamlte, but it should be really easy to adapt for the other devices
>> with the same SoC. It has been tested with dtbs_check W=1 and results
>> in no warnings.
>>
>> [...]
> Applied, thanks!
>
> There was quite a mess in submission, so all patches had to be re-orded and
> split. Below commit IDs might be not accurate.
>
> In the future be sure you organize your patchset per subsystem and correct
> order of patches (bindings are always first).

Alright, thanks! I'll make sure to split patches by subsystems in the future,

especially since I'll be upstreaming Exynos3475 soon.

Kind regards, Ivo.

>
> [01/10] dt-bindings: arm: cpus: Add Samsung Mongoose M2
>         https://git.kernel.org/krzk/linux/c/d27c76fcd4190cab051543b2ffa2f183a6142c0a
> [02/10] dt-bindings: hwinfo: samsung,exynos-chipid: add exynos8895 compatible
>         https://git.kernel.org/krzk/linux/c/7f6ea7198e8350ad199bc56f524ea2cc753f8ab7
> [03/10] soc: samsung: exynos-chipid: add exynos8895 SoC support
>         https://git.kernel.org/krzk/linux/c/e6bb0575953f3f850f5583e9adae3260866e0cbe
> [04/10] dt-bindings: pinctrl: samsung: Add compatible for Exynos8895 SoC
>         (no commit info)
> [05/10] pinctrl: samsung: Add exynos8895 SoC pinctrl configuration
>         (no commit info)
> [06/10] dt-bindings: pinctrl: samsung: add exynos8895-wakeup-eint compatible
>         (no commit info)
> [07/10] dt-bindings: soc: samsung: exynos-pmu: Add exynos8895 compatible
>         https://git.kernel.org/krzk/linux/c/496374c1d0045177cb5c3e85ce33b2179b11a413
> [08/10] arm64: dts: exynos: Add initial support for exynos8895 SoC
>         https://git.kernel.org/krzk/linux/c/dcabaa8ae457647e334bbcaf21f9209315e8f752
> [09/10] dt-bindings: arm: samsung: Document dreamlte board binding
>         https://git.kernel.org/krzk/linux/c/2caf56f6cf69b026749a2c6c8ad083e5c47b8362
> [10/10] arm64: dts: exynos: Add initial support for Samsung Galaxy S8
>         https://git.kernel.org/krzk/linux/c/296621bfa3ddefcbc4a3c1f64f6e868680a1be59
>
> Best regards,