linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] samsung,coreprimevelte enhancements
@ 2025-08-28  9:49 Karel Balej
  2025-08-28  9:49 ` [PATCH v2 1/3] arm64: dts: samsung,coreprimevelte: add PMIC Karel Balej
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Karel Balej @ 2025-08-28  9:49 UTC (permalink / raw)
  To: linux-mmc, ulf.hansson, Duje Mihanović, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: ~postmarketos/upstreaming, phone-devel, Karel Balej

Hello,

here are a few patches adding some of the stuff that have accumulated
since the support for the samsung,coreprimevelte smartphone was first
introduced and before it made it into the mainline tree.

The patches are based on mmc/next because it contains the new support
for state_uhs in the sdhci-pxav3 driver.

Thank you for having a look!
K. B.

v2:
- Drop confusing patch prefix (thanks Krzysztof!).
- Link to v1: https://lore.kernel.org/r/20250824110039.28258-1-balejk@matfyz.cz/

Karel Balej (3):
  arm64: dts: samsung,coreprimevelte: add PMIC
  arm64: dts: samsung,coreprimevelte: add touchscreen
  arm64: dts: samsung,coreprimevelte: add SDIO

 .../mmp/pxa1908-samsung-coreprimevelte.dts    | 110 ++++++++++++++++++
 1 file changed, 110 insertions(+)

-- 
2.51.0



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 1/3] arm64: dts: samsung,coreprimevelte: add PMIC
  2025-08-28  9:49 [PATCH v2 0/3] samsung,coreprimevelte enhancements Karel Balej
@ 2025-08-28  9:49 ` Karel Balej
  2025-08-28  9:49 ` [PATCH v2 2/3] arm64: dts: samsung,coreprimevelte: add touchscreen Karel Balej
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Karel Balej @ 2025-08-28  9:49 UTC (permalink / raw)
  To: linux-mmc, ulf.hansson, Duje Mihanović, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: ~postmarketos/upstreaming, phone-devel, Karel Balej

Bind power management chip to the samsung,coreprimevelte smartphone.
This enables support for onkey and RTC as well as for regulators two of
which are explicitly bound here to the SD card.

Signed-off-by: Karel Balej <balejk@matfyz.cz>
---

Notes:
    v2:
    - Modify interrupt properties as advised by Duje (thanks!).

 .../mmp/pxa1908-samsung-coreprimevelte.dts    | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/arch/arm64/boot/dts/marvell/mmp/pxa1908-samsung-coreprimevelte.dts b/arch/arm64/boot/dts/marvell/mmp/pxa1908-samsung-coreprimevelte.dts
index 47a4f01a7077..54131b0e5617 100644
--- a/arch/arm64/boot/dts/marvell/mmp/pxa1908-samsung-coreprimevelte.dts
+++ b/arch/arm64/boot/dts/marvell/mmp/pxa1908-samsung-coreprimevelte.dts
@@ -303,6 +303,27 @@ &twsi1 {
 
 &twsi2 {
 	status = "okay";
+
+	pmic@30 {
+		compatible = "marvell,88pm886-a1";
+		reg = <0x30>;
+		interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
+		wakeup-source;
+
+		regulators {
+			ldo6: ldo6 {
+				regulator-boot-on;
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <3300000>;
+			};
+
+			ldo14: ldo14 {
+				regulator-boot-on;
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <3300000>;
+			};
+		};
+	};
 };
 
 &twsi3 {
@@ -328,4 +349,6 @@ &sdh0 {
 	cd-inverted;
 	bus-width = <4>;
 	wp-inverted;
+	vmmc-supply = <&ldo14>;
+	vqmmc-supply = <&ldo6>;
 };
-- 
2.51.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 2/3] arm64: dts: samsung,coreprimevelte: add touchscreen
  2025-08-28  9:49 [PATCH v2 0/3] samsung,coreprimevelte enhancements Karel Balej
  2025-08-28  9:49 ` [PATCH v2 1/3] arm64: dts: samsung,coreprimevelte: add PMIC Karel Balej
@ 2025-08-28  9:49 ` Karel Balej
  2025-08-28  9:49 ` [PATCH v2 3/3] arm64: dts: samsung,coreprimevelte: add SDIO Karel Balej
  2025-09-02 22:02 ` [PATCH v2 0/3] samsung,coreprimevelte enhancements Duje Mihanović
  3 siblings, 0 replies; 5+ messages in thread
From: Karel Balej @ 2025-08-28  9:49 UTC (permalink / raw)
  To: linux-mmc, ulf.hansson, Duje Mihanović, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: ~postmarketos/upstreaming, phone-devel, Karel Balej

Bind touchscreen for the samsung,coreprimevelte smartphone. The
downstream code sets the VDD voltage to the exact value of 3.1 V,
however it's been empirically verified that the lower bound used here
sufficies for the proper operation of the chip and is thus used for
power-saving purposes.

Signed-off-by: Karel Balej <balejk@matfyz.cz>
---
 .../mmp/pxa1908-samsung-coreprimevelte.dts        | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm64/boot/dts/marvell/mmp/pxa1908-samsung-coreprimevelte.dts b/arch/arm64/boot/dts/marvell/mmp/pxa1908-samsung-coreprimevelte.dts
index 54131b0e5617..0ac1a24dc410 100644
--- a/arch/arm64/boot/dts/marvell/mmp/pxa1908-samsung-coreprimevelte.dts
+++ b/arch/arm64/boot/dts/marvell/mmp/pxa1908-samsung-coreprimevelte.dts
@@ -311,6 +311,11 @@ pmic@30 {
 		wakeup-source;
 
 		regulators {
+			ldo2: ldo2 {
+				regulator-min-microvolt = <1900000>;
+				regulator-max-microvolt = <3100000>;
+			};
+
 			ldo6: ldo6 {
 				regulator-boot-on;
 				regulator-min-microvolt = <1200000>;
@@ -328,6 +333,16 @@ ldo14: ldo14 {
 
 &twsi3 {
 	status = "okay";
+
+	touchscreen@50 {
+		compatible = "imagis,ist3032c";
+		reg = <0x50>;
+		interrupt-parent = <&gpio>;
+		interrupts = <72 IRQ_TYPE_EDGE_FALLING>;
+		vdd-supply = <&ldo2>;
+		touchscreen-size-x = <480>;
+		touchscreen-size-y = <800>;
+	};
 };
 
 &usb {
-- 
2.51.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 3/3] arm64: dts: samsung,coreprimevelte: add SDIO
  2025-08-28  9:49 [PATCH v2 0/3] samsung,coreprimevelte enhancements Karel Balej
  2025-08-28  9:49 ` [PATCH v2 1/3] arm64: dts: samsung,coreprimevelte: add PMIC Karel Balej
  2025-08-28  9:49 ` [PATCH v2 2/3] arm64: dts: samsung,coreprimevelte: add touchscreen Karel Balej
@ 2025-08-28  9:49 ` Karel Balej
  2025-09-02 22:02 ` [PATCH v2 0/3] samsung,coreprimevelte enhancements Duje Mihanović
  3 siblings, 0 replies; 5+ messages in thread
From: Karel Balej @ 2025-08-28  9:49 UTC (permalink / raw)
  To: linux-mmc, ulf.hansson, Duje Mihanović, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: ~postmarketos/upstreaming, phone-devel, Karel Balej

Set some basic properties of the SDIO card of the samsung,coreprimevelte
smartphone.

The SDIO is used as an interface for WiFi, Bluetooth and FM radio
serviced by the Marvell 88W8777 (SD8777) chipset. Support for this
chipset is currently not in-tree because the firmware is not available
in linux-firmware, however it is possible to trivially run it
out-of-tree using the mwifiex and Marvell Bluetooth drivers with some
caveats.

Link: https://lore.kernel.org/r/20231029111807.19261-1-balejk@matfyz.cz/
Signed-off-by: Karel Balej <balejk@matfyz.cz>
---

Notes:
    v2:
    - Drop the sdh2 pinctrl configuration which was originally included by
      accident.
    - Drop broken-cd on the node as it's ignored with non-removable (thank
      you to Duje for pointing this out).

 .../mmp/pxa1908-samsung-coreprimevelte.dts    | 72 +++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/arch/arm64/boot/dts/marvell/mmp/pxa1908-samsung-coreprimevelte.dts b/arch/arm64/boot/dts/marvell/mmp/pxa1908-samsung-coreprimevelte.dts
index 0ac1a24dc410..81806f655c88 100644
--- a/arch/arm64/boot/dts/marvell/mmp/pxa1908-samsung-coreprimevelte.dts
+++ b/arch/arm64/boot/dts/marvell/mmp/pxa1908-samsung-coreprimevelte.dts
@@ -10,6 +10,7 @@ / {
 	aliases {
 		mmc0 = &sdh2; /* eMMC */
 		mmc1 = &sdh0; /* SD card */
+		mmc2 = &sdh1; /* SDIO */
 		serial0 = &uart0;
 	};
 
@@ -286,6 +287,69 @@ sdh0_pins_2: sdh0-pins-2 {
 		pinctrl-single,input-schmitt-enable = <0x40 0 0x40 0x40>;
 		pinctrl-single,low-power-mode = <0x208 0x388>;
 	};
+
+	sdh1_pins_0: sdh1-pins-0 {
+		pinctrl-single,pins = <
+			0x170 1
+			0x174 1
+			0x178 1
+			0x17c 1
+			0x180 1>;
+		pinctrl-single,drive-strength = <0x1000 0x1800>;
+		pinctrl-single,bias-pullup = <0 0xc000 0 0xc000>;
+		pinctrl-single,bias-pulldown = <0 0xa000 0 0xa000>;
+		pinctrl-single,input-schmitt = <0 0x30>;
+		pinctrl-single,input-schmitt-enable = <0x40 0 0x40 0x40>;
+		pinctrl-single,low-power-mode = <0 0x388>;
+	};
+
+	sdh1_pins_1: sdh1-pins-1 {
+		pinctrl-single,pins = <0x184 1>;
+		pinctrl-single,drive-strength = <0 0x1800>;
+		pinctrl-single,bias-pullup = <0 0xc000 0 0xc000>;
+		pinctrl-single,bias-pulldown = <0 0xa000 0 0xa000>;
+		pinctrl-single,input-schmitt = <0 0x30>;
+		pinctrl-single,input-schmitt-enable = <0x40 0 0x40 0x40>;
+		pinctrl-single,low-power-mode = <0x208 0x388>;
+	};
+
+	sdh1_pins_2: sdh1-pins-2 {
+		pinctrl-single,pins = <0xec 0>;
+		pinctrl-single,drive-strength = <0x1000 0x1800>;
+		pinctrl-single,bias-pullup = <0x8000 0x8000 0 0xc000>;
+		pinctrl-single,bias-pulldown = <0x8000 0x8000 0 0xa000>;
+		pinctrl-single,input-schmitt = <0 0x30>;
+		pinctrl-single,input-schmitt-enable = <0x40 0 0x40 0x40>;
+		pinctrl-single,low-power-mode = <0 0x388>;
+	};
+
+	sdh1_fast_pins_0: sdh1-fast-pins-0 {
+		pinctrl-single,pins = <
+			0x170 1
+			0x174 1
+			0x178 1
+			0x17c 1
+			0x180 1
+		>;
+		pinctrl-single,drive-strength = <0x1800 0x1800>;
+		pinctrl-single,bias-pullup = <0 0xc000 0 0xc000>;
+		pinctrl-single,bias-pulldown = <0 0xa000 0 0xa000>;
+		pinctrl-single,input-schmitt = <0 0x30>;
+		pinctrl-single,input-schmitt-enable = <0x40 0 0x40 0x40>;
+		pinctrl-single,low-power-mode = <0 0x388>;
+	};
+
+	sdh1_fast_pins_1: sdh1-fast-pins-1 {
+		pinctrl-single,pins = <
+			0x184 1
+		>;
+		pinctrl-single,drive-strength = <0x1800 0x1800>;
+		pinctrl-single,bias-pullup = <0 0xc000 0 0xc000>;
+		pinctrl-single,bias-pulldown = <0 0xa000 0 0xa000>;
+		pinctrl-single,input-schmitt = <0 0x30>;
+		pinctrl-single,input-schmitt-enable = <0x40 0 0x40 0x40>;
+		pinctrl-single,low-power-mode = <0x208 0x388>;
+	};
 };
 
 &uart0 {
@@ -367,3 +431,11 @@ &sdh0 {
 	vmmc-supply = <&ldo14>;
 	vqmmc-supply = <&ldo6>;
 };
+
+&sdh1 {
+	pinctrl-names = "default", "state_uhs";
+	pinctrl-0 = <&sdh1_pins_0 &sdh1_pins_1 &sdh1_pins_2>;
+	pinctrl-1 = <&sdh1_fast_pins_0 &sdh1_fast_pins_1 &sdh1_pins_2>;
+	bus-width = <4>;
+	non-removable;
+};
-- 
2.51.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 0/3] samsung,coreprimevelte enhancements
  2025-08-28  9:49 [PATCH v2 0/3] samsung,coreprimevelte enhancements Karel Balej
                   ` (2 preceding siblings ...)
  2025-08-28  9:49 ` [PATCH v2 3/3] arm64: dts: samsung,coreprimevelte: add SDIO Karel Balej
@ 2025-09-02 22:02 ` Duje Mihanović
  3 siblings, 0 replies; 5+ messages in thread
From: Duje Mihanović @ 2025-09-02 22:02 UTC (permalink / raw)
  To: Karel Balej
  Cc: linux-mmc, ulf.hansson, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-kernel, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel, Karel Balej

On Thursday, 28 August 2025 11:49:01 Central European Summer Time Karel Balej 
wrote:
> Hello,
> 
> here are a few patches adding some of the stuff that have accumulated
> since the support for the samsung,coreprimevelte smartphone was first
> introduced and before it made it into the mainline tree.

LGTM, with the exception of 2 tiny formatting mistakes with the pin arrays in 
sdh1-pins-0 and sdh1-fast-pins-1. I'll merge the series and fix these next 
week if there are no other comments.

Reviewed-by: Duje Mihanović <duje@dujemihanovic.xyz>

Regards,
--
Duje




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-09-03  0:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-28  9:49 [PATCH v2 0/3] samsung,coreprimevelte enhancements Karel Balej
2025-08-28  9:49 ` [PATCH v2 1/3] arm64: dts: samsung,coreprimevelte: add PMIC Karel Balej
2025-08-28  9:49 ` [PATCH v2 2/3] arm64: dts: samsung,coreprimevelte: add touchscreen Karel Balej
2025-08-28  9:49 ` [PATCH v2 3/3] arm64: dts: samsung,coreprimevelte: add SDIO Karel Balej
2025-09-02 22:02 ` [PATCH v2 0/3] samsung,coreprimevelte enhancements Duje Mihanović

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).