Re: [PATCH 6/6 v4] board: samsung: add Samsung Galaxy S9/S9+(SM-G96x0) board
On Sun, Oct 17, 2021 at 01:44:32PM +0300, Dzmitry Sankouski wrote: > Samsung S9 SM-G9600 - Snapdragon SDM845 version of the phone, > for China \ Hong Kong markets. > Has unlockable bootloader, unlike SM-G960U (American market version), > which allows running u-boot as a chain-loaded bootloader. > > Signed-off-by: Dzmitry Sankouski > Cc: Ramon Fried > Cc: Tom Rini Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature
[PATCH 6/6 v4] board: samsung: add Samsung Galaxy S9/S9+(SM-G96x0) board
Samsung S9 SM-G9600 - Snapdragon SDM845 version of the phone, for China \ Hong Kong markets. Has unlockable bootloader, unlike SM-G960U (American market version), which allows running u-boot as a chain-loaded bootloader. Signed-off-by: Dzmitry Sankouski Cc: Ramon Fried Cc: Tom Rini --- Changes for v2: - Create documentation file for SDM845 boards - Add starqltechn board documentation Changes for v3: - fix comment in starqltechn.c Changes for v4: - move configs to Kconfig file - remove starqltechn.h file - set SYS_CONFIG_NAME to default of sdm845 - remove unneeded options from starqltechn_defconfig arch/arm/dts/Makefile | 1 + arch/arm/dts/starqltechn-uboot.dtsi | 39 ++ arch/arm/dts/starqltechn.dts| 53 + arch/arm/mach-snapdragon/Kconfig| 17 board/samsung/starqltechn/Kconfig | 22 ++ board/samsung/starqltechn/MAINTAINERS | 6 +++ board/samsung/starqltechn/Makefile | 9 + board/samsung/starqltechn/starqltechn.c | 10 + configs/starqltechn_defconfig | 30 ++ doc/board/qualcomm/index.rst| 1 + doc/board/qualcomm/sdm845.rst | 38 ++ 11 files changed, 226 insertions(+) create mode 100644 arch/arm/dts/starqltechn-uboot.dtsi create mode 100644 arch/arm/dts/starqltechn.dts create mode 100644 board/samsung/starqltechn/Kconfig create mode 100644 board/samsung/starqltechn/MAINTAINERS create mode 100644 board/samsung/starqltechn/Makefile create mode 100644 board/samsung/starqltechn/starqltechn.c create mode 100644 configs/starqltechn_defconfig create mode 100644 doc/board/qualcomm/sdm845.rst diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 82a0790cc0..90d922dab7 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -467,6 +467,7 @@ dtb-$(CONFIG_TARGET_SL28) += fsl-ls1028a-kontron-sl28.dtb \ dtb-$(CONFIG_TARGET_DRAGONBOARD410C) += dragonboard410c.dtb dtb-$(CONFIG_TARGET_DRAGONBOARD820C) += dragonboard820c.dtb +dtb-$(CONFIG_TARGET_STARQLTECHN) += starqltechn.dtb dtb-$(CONFIG_TARGET_STEMMY) += ste-ux500-samsung-stemmy.dtb diff --git a/arch/arm/dts/starqltechn-uboot.dtsi b/arch/arm/dts/starqltechn-uboot.dtsi new file mode 100644 index 00..d8d75e018a --- /dev/null +++ b/arch/arm/dts/starqltechn-uboot.dtsi @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * U-Boot addition to handle Samsung S9 SM-G9600 (starqltechn) pins + * + * (C) Copyright 2021 Dzmitry Sankouski + * + */ + +/ +{ + soc { + u-boot,dm-pre-reloc; + gcc { + clock-controller@10 { + u-boot,dm-pre-reloc; + }; + serial@0xa84000 { + u-boot,dm-pre-reloc; + }; + gpio_north@390 { + u-boot,dm-pre-reloc; + }; + pinctrl@390 { + u-boot,dm-pre-reloc; + }; + }; + }; +}; + +_pon { + key_vol_down { + gpios = <_pon 1 0>; + label = "key_vol_down"; + }; + key_power { + gpios = <_pon 0 0>; + label = "key_power"; + }; +}; diff --git a/arch/arm/dts/starqltechn.dts b/arch/arm/dts/starqltechn.dts new file mode 100644 index 00..387420f30b --- /dev/null +++ b/arch/arm/dts/starqltechn.dts @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Samsung S9 SM-G9600 (starqltechn) board device tree source + * + * (C) Copyright 2021 Dzmitry Sankouski + * + */ + +/dts-v1/; + +#include "sdm845.dtsi" + +/ { + model = "Samsung S9 (SM-G9600)"; + compatible = "qcom,sdm845-mtp", "qcom,sdm845", "qcom,mtp"; + #address-cells = <2>; + #size-cells = <2>; + + chosen { + stdout-path = "serial0:921600n8"; + }; + + aliases { + serial0 = _uart; + }; + + memory { + device_type = "memory"; + reg = <0 0x8000 0 0xfe1b>; + }; + + psci { + compatible = "arm,psci-1.0"; + method = "smc"; + }; + + soc: soc { + serial@0xa84000 { + status = "ok"; + }; + + pinctrl@390 { + muic_i2c: muic_i2c { + pins = "GPIO_33", "GPIO_34"; + drive-strength = <0x2>; + function = "gpio"; + bias-disable; + }; + }; + }; +}; + +#include "starqltechn-uboot.dtsi" diff --git a/arch/arm/mach-snapdragon/Kconfig b/arch/arm/mach-snapdragon/Kconfig index 1a6a608967..12cf02a56a 100644 --- a/arch/arm/mach-snapdragon/Kconfig +++
Re: [PATCH 6/6 v4] board: samsung: add Samsung Galaxy S9/S9+(SM-G96x0) board
Hi Simon, Currently, I test u-boot with linux kexec method, it's the easy non-invasive way to get debug uart on starqltechn phone. I wasn't able to boot something with u-boot on that phone yet. I'm planning to add a followup patch, once I'll have clear working instruction, i.e. once I manage to boot something on that phone, and pack that into Android boot image. чт, 14 окт. 2021 г. в 18:10, Simon Glass : > Hi Dzmitry, > > On Sat, 9 Oct 2021 at 22:11, Dzmitry Sankouski > wrote: > > > > Samsung S9 SM-G9600 - Snapdragon SDM845 version of the phone, > > for China \ Hong Kong markets. > > Has unlockable bootloader, unlike SM-G960U (American market version), > > which allows running u-boot as a chain-loaded bootloader. > > > > Signed-off-by: Dzmitry Sankouski > > Cc: Ramon Fried > > Cc: Tom Rini > > --- > > Changes for v2: > > - Create documentation file for SDM845 boards > > - Add starqltechn board documentation > > Changes for v3: > > - fix comment in starqltechn.c > > Changes for v4: > > - move configs to Kconfig file > > - remove starqltechn.h file > > - set SYS_CONFIG_NAME to default of sdm845 > > - remove unneeded options from starqltechn_defconfig > > > > arch/arm/dts/Makefile | 1 + > > arch/arm/dts/starqltechn-uboot.dtsi | 39 ++ > > arch/arm/dts/starqltechn.dts| 53 + > > arch/arm/mach-snapdragon/Kconfig| 17 > > board/samsung/starqltechn/Kconfig | 22 ++ > > board/samsung/starqltechn/MAINTAINERS | 6 +++ > > board/samsung/starqltechn/Makefile | 9 + > > board/samsung/starqltechn/starqltechn.c | 10 + > > configs/starqltechn_defconfig | 30 ++ > > doc/board/qualcomm/index.rst| 1 + > > doc/board/qualcomm/sdm845.rst | 38 ++ > > 11 files changed, 226 insertions(+) > > create mode 100644 arch/arm/dts/starqltechn-uboot.dtsi > > create mode 100644 arch/arm/dts/starqltechn.dts > > create mode 100644 board/samsung/starqltechn/Kconfig > > create mode 100644 board/samsung/starqltechn/MAINTAINERS > > create mode 100644 board/samsung/starqltechn/Makefile > > create mode 100644 board/samsung/starqltechn/starqltechn.c > > create mode 100644 configs/starqltechn_defconfig > > create mode 100644 doc/board/qualcomm/sdm845.rst > > > > Reviewed-by: Simon Glass > > In the docs, can you explain how to load U-Boot on the board? >
Re: [PATCH 6/6 v4] board: samsung: add Samsung Galaxy S9/S9+(SM-G96x0) board
Hi Dzmitry, On Sat, 9 Oct 2021 at 22:11, Dzmitry Sankouski wrote: > > Samsung S9 SM-G9600 - Snapdragon SDM845 version of the phone, > for China \ Hong Kong markets. > Has unlockable bootloader, unlike SM-G960U (American market version), > which allows running u-boot as a chain-loaded bootloader. > > Signed-off-by: Dzmitry Sankouski > Cc: Ramon Fried > Cc: Tom Rini > --- > Changes for v2: > - Create documentation file for SDM845 boards > - Add starqltechn board documentation > Changes for v3: > - fix comment in starqltechn.c > Changes for v4: > - move configs to Kconfig file > - remove starqltechn.h file > - set SYS_CONFIG_NAME to default of sdm845 > - remove unneeded options from starqltechn_defconfig > > arch/arm/dts/Makefile | 1 + > arch/arm/dts/starqltechn-uboot.dtsi | 39 ++ > arch/arm/dts/starqltechn.dts| 53 + > arch/arm/mach-snapdragon/Kconfig| 17 > board/samsung/starqltechn/Kconfig | 22 ++ > board/samsung/starqltechn/MAINTAINERS | 6 +++ > board/samsung/starqltechn/Makefile | 9 + > board/samsung/starqltechn/starqltechn.c | 10 + > configs/starqltechn_defconfig | 30 ++ > doc/board/qualcomm/index.rst| 1 + > doc/board/qualcomm/sdm845.rst | 38 ++ > 11 files changed, 226 insertions(+) > create mode 100644 arch/arm/dts/starqltechn-uboot.dtsi > create mode 100644 arch/arm/dts/starqltechn.dts > create mode 100644 board/samsung/starqltechn/Kconfig > create mode 100644 board/samsung/starqltechn/MAINTAINERS > create mode 100644 board/samsung/starqltechn/Makefile > create mode 100644 board/samsung/starqltechn/starqltechn.c > create mode 100644 configs/starqltechn_defconfig > create mode 100644 doc/board/qualcomm/sdm845.rst > Reviewed-by: Simon Glass In the docs, can you explain how to load U-Boot on the board?
[PATCH 6/6 v4] board: samsung: add Samsung Galaxy S9/S9+(SM-G96x0) board
Samsung S9 SM-G9600 - Snapdragon SDM845 version of the phone, for China \ Hong Kong markets. Has unlockable bootloader, unlike SM-G960U (American market version), which allows running u-boot as a chain-loaded bootloader. Signed-off-by: Dzmitry Sankouski Cc: Ramon Fried Cc: Tom Rini --- Changes for v2: - Create documentation file for SDM845 boards - Add starqltechn board documentation Changes for v3: - fix comment in starqltechn.c Changes for v4: - move configs to Kconfig file - remove starqltechn.h file - set SYS_CONFIG_NAME to default of sdm845 - remove unneeded options from starqltechn_defconfig arch/arm/dts/Makefile | 1 + arch/arm/dts/starqltechn-uboot.dtsi | 39 ++ arch/arm/dts/starqltechn.dts| 53 + arch/arm/mach-snapdragon/Kconfig| 17 board/samsung/starqltechn/Kconfig | 22 ++ board/samsung/starqltechn/MAINTAINERS | 6 +++ board/samsung/starqltechn/Makefile | 9 + board/samsung/starqltechn/starqltechn.c | 10 + configs/starqltechn_defconfig | 30 ++ doc/board/qualcomm/index.rst| 1 + doc/board/qualcomm/sdm845.rst | 38 ++ 11 files changed, 226 insertions(+) create mode 100644 arch/arm/dts/starqltechn-uboot.dtsi create mode 100644 arch/arm/dts/starqltechn.dts create mode 100644 board/samsung/starqltechn/Kconfig create mode 100644 board/samsung/starqltechn/MAINTAINERS create mode 100644 board/samsung/starqltechn/Makefile create mode 100644 board/samsung/starqltechn/starqltechn.c create mode 100644 configs/starqltechn_defconfig create mode 100644 doc/board/qualcomm/sdm845.rst diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 82a0790cc0..90d922dab7 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -467,6 +467,7 @@ dtb-$(CONFIG_TARGET_SL28) += fsl-ls1028a-kontron-sl28.dtb \ dtb-$(CONFIG_TARGET_DRAGONBOARD410C) += dragonboard410c.dtb dtb-$(CONFIG_TARGET_DRAGONBOARD820C) += dragonboard820c.dtb +dtb-$(CONFIG_TARGET_STARQLTECHN) += starqltechn.dtb dtb-$(CONFIG_TARGET_STEMMY) += ste-ux500-samsung-stemmy.dtb diff --git a/arch/arm/dts/starqltechn-uboot.dtsi b/arch/arm/dts/starqltechn-uboot.dtsi new file mode 100644 index 00..d8d75e018a --- /dev/null +++ b/arch/arm/dts/starqltechn-uboot.dtsi @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * U-Boot addition to handle Samsung S9 SM-G9600 (starqltechn) pins + * + * (C) Copyright 2021 Dzmitry Sankouski + * + */ + +/ +{ + soc { + u-boot,dm-pre-reloc; + gcc { + clock-controller@10 { + u-boot,dm-pre-reloc; + }; + serial@0xa84000 { + u-boot,dm-pre-reloc; + }; + gpio_north@390 { + u-boot,dm-pre-reloc; + }; + pinctrl@390 { + u-boot,dm-pre-reloc; + }; + }; + }; +}; + +_pon { + key_vol_down { + gpios = <_pon 1 0>; + label = "key_vol_down"; + }; + key_power { + gpios = <_pon 0 0>; + label = "key_power"; + }; +}; diff --git a/arch/arm/dts/starqltechn.dts b/arch/arm/dts/starqltechn.dts new file mode 100644 index 00..387420f30b --- /dev/null +++ b/arch/arm/dts/starqltechn.dts @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Samsung S9 SM-G9600 (starqltechn) board device tree source + * + * (C) Copyright 2021 Dzmitry Sankouski + * + */ + +/dts-v1/; + +#include "sdm845.dtsi" + +/ { + model = "Samsung S9 (SM-G9600)"; + compatible = "qcom,sdm845-mtp", "qcom,sdm845", "qcom,mtp"; + #address-cells = <2>; + #size-cells = <2>; + + chosen { + stdout-path = "serial0:921600n8"; + }; + + aliases { + serial0 = _uart; + }; + + memory { + device_type = "memory"; + reg = <0 0x8000 0 0xfe1b>; + }; + + psci { + compatible = "arm,psci-1.0"; + method = "smc"; + }; + + soc: soc { + serial@0xa84000 { + status = "ok"; + }; + + pinctrl@390 { + muic_i2c: muic_i2c { + pins = "GPIO_33", "GPIO_34"; + drive-strength = <0x2>; + function = "gpio"; + bias-disable; + }; + }; + }; +}; + +#include "starqltechn-uboot.dtsi" diff --git a/arch/arm/mach-snapdragon/Kconfig b/arch/arm/mach-snapdragon/Kconfig index 1a6a608967..12cf02a56a 100644 --- a/arch/arm/mach-snapdragon/Kconfig +++
[PATCH 6/6 v4] board: samsung: add Samsung Galaxy S9/S9+(SM-G96x0) board
Samsung S9 SM-G9600 - Snapdragon SDM845 version of the phone, for China \ Hong Kong markets. Has unlockable bootloader, unlike SM-G960U (American market version), which allows running u-boot as a chain-loaded bootloader. Signed-off-by: Dzmitry Sankouski Cc: Ramon Fried Cc: Tom Rini --- Changes for v2: - Create documentation file for SDM845 boards - Add starqltechn board documentation Changes for v3: - fix comment in starqltechn.c Changes for v4: - move configs to Kconfig file - remove starqltechn.h file - set SYS_CONFIG_NAME to default of sdm845 - remove unneeded options from starqltechn_defconfig arch/arm/dts/Makefile | 1 + arch/arm/dts/starqltechn-uboot.dtsi | 39 ++ arch/arm/dts/starqltechn.dts| 53 + arch/arm/mach-snapdragon/Kconfig| 17 board/samsung/starqltechn/Kconfig | 22 ++ board/samsung/starqltechn/MAINTAINERS | 6 +++ board/samsung/starqltechn/Makefile | 9 + board/samsung/starqltechn/starqltechn.c | 10 + configs/starqltechn_defconfig | 30 ++ doc/board/qualcomm/index.rst| 1 + doc/board/qualcomm/sdm845.rst | 38 ++ 11 files changed, 226 insertions(+) create mode 100644 arch/arm/dts/starqltechn-uboot.dtsi create mode 100644 arch/arm/dts/starqltechn.dts create mode 100644 board/samsung/starqltechn/Kconfig create mode 100644 board/samsung/starqltechn/MAINTAINERS create mode 100644 board/samsung/starqltechn/Makefile create mode 100644 board/samsung/starqltechn/starqltechn.c create mode 100644 configs/starqltechn_defconfig create mode 100644 doc/board/qualcomm/sdm845.rst diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 82a0790cc0..90d922dab7 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -467,6 +467,7 @@ dtb-$(CONFIG_TARGET_SL28) += fsl-ls1028a-kontron-sl28.dtb \ dtb-$(CONFIG_TARGET_DRAGONBOARD410C) += dragonboard410c.dtb dtb-$(CONFIG_TARGET_DRAGONBOARD820C) += dragonboard820c.dtb +dtb-$(CONFIG_TARGET_STARQLTECHN) += starqltechn.dtb dtb-$(CONFIG_TARGET_STEMMY) += ste-ux500-samsung-stemmy.dtb diff --git a/arch/arm/dts/starqltechn-uboot.dtsi b/arch/arm/dts/starqltechn-uboot.dtsi new file mode 100644 index 00..d8d75e018a --- /dev/null +++ b/arch/arm/dts/starqltechn-uboot.dtsi @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * U-Boot addition to handle Samsung S9 SM-G9600 (starqltechn) pins + * + * (C) Copyright 2021 Dzmitry Sankouski + * + */ + +/ +{ + soc { + u-boot,dm-pre-reloc; + gcc { + clock-controller@10 { + u-boot,dm-pre-reloc; + }; + serial@0xa84000 { + u-boot,dm-pre-reloc; + }; + gpio_north@390 { + u-boot,dm-pre-reloc; + }; + pinctrl@390 { + u-boot,dm-pre-reloc; + }; + }; + }; +}; + +_pon { + key_vol_down { + gpios = <_pon 1 0>; + label = "key_vol_down"; + }; + key_power { + gpios = <_pon 0 0>; + label = "key_power"; + }; +}; diff --git a/arch/arm/dts/starqltechn.dts b/arch/arm/dts/starqltechn.dts new file mode 100644 index 00..387420f30b --- /dev/null +++ b/arch/arm/dts/starqltechn.dts @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Samsung S9 SM-G9600 (starqltechn) board device tree source + * + * (C) Copyright 2021 Dzmitry Sankouski + * + */ + +/dts-v1/; + +#include "sdm845.dtsi" + +/ { + model = "Samsung S9 (SM-G9600)"; + compatible = "qcom,sdm845-mtp", "qcom,sdm845", "qcom,mtp"; + #address-cells = <2>; + #size-cells = <2>; + + chosen { + stdout-path = "serial0:921600n8"; + }; + + aliases { + serial0 = _uart; + }; + + memory { + device_type = "memory"; + reg = <0 0x8000 0 0xfe1b>; + }; + + psci { + compatible = "arm,psci-1.0"; + method = "smc"; + }; + + soc: soc { + serial@0xa84000 { + status = "ok"; + }; + + pinctrl@390 { + muic_i2c: muic_i2c { + pins = "GPIO_33", "GPIO_34"; + drive-strength = <0x2>; + function = "gpio"; + bias-disable; + }; + }; + }; +}; + +#include "starqltechn-uboot.dtsi" diff --git a/arch/arm/mach-snapdragon/Kconfig b/arch/arm/mach-snapdragon/Kconfig index 1a6a608967..12cf02a56a 100644 --- a/arch/arm/mach-snapdragon/Kconfig +++