Skip to contentSkip to conversation

add exynos4412-based p4note device family support

PATCH Applied Martin Jücker 2 participants 14 messages Nov 13, 2020 – Nov 16, 2020

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

v3 cover add exynos4412-based p4note device family support

Hello,

after lots of research and trial and error, this is my first contribution to the linux kernel.

These patches lay the foundation for supporting the Samsung Galaxy Note 10.1 device family. To the best of my knowledge there are around 16 devices which use almost identical hardware inside with exceptions being the modem and one of the sensors. The first instance which I'm currently testing on is the N8010 which is the wifi only version that is identical to the N8013. There are some missing components still, but it's a start.

v1:
https://lore.kernel.org/linux-samsung-soc/[email protected]/

v2:
https://lore.kernel.org/linux-samsung-soc/[email protected]/

Changes in v3:
- copyright changed
- indentation fix

Changes in v2:
- lots of label adjustments, some removed
- unused ehci node removed
- unused serials removed
- compatible string is now samsung,n8010 instead of samsung,n801x
- removed unused imports
- voltage regulator name for TSP changed to match vendor kernel
- i2c numbering starting from 1 now
- two missing gpio configurations added
- added vdd supply to adc node
- added all regulators to max77686 node
- pinctrl configs sorted by pin name

Cheers
Martin

#1 lore raw

PATCH v3 1/5 dt-bindings: samsung: document bindings for p4note family boards

Document the GT-N8010/GT-N8013 device binding and the p4note common binding that it is based on.

---
 .../devicetree/bindings/arm/samsung/samsung-boards.yaml   | 8 ++++++++
 1 file changed, 8 insertions(+)
Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml +8 -0
index 272508010b02..d0d80fffe14e 100644
@@ -83,6 +83,14 @@ properties:
           - const: samsung,exynos4412
           - const: samsung,exynos4
 
+      - description: Samsung p4note family boards
+        items:
+          - enum:
+              - samsung,n8010                   # Samsung GT-N8010/GT-N8013
+          - const: samsung,p4note
+          - const: samsung,exynos4412
+          - const: samsung,exynos4
+
       - description: Exynos5250 based boards
         items:
           - enum:
Signature · 1 line
2.25.1
maintainer Applied
#2 lore raw

Re: [PATCH v3 1/5] dt-bindings: samsung: document bindings for p4note family boards

Quoted 8 lines · Martin Jücker

Document the GT-N8010/GT-N8013 device binding and the p4note common binding that it is based on.

---
 .../devicetree/bindings/arm/samsung/samsung-boards.yaml   | 8 ++++++++
 1 file changed, 8 insertions(+)

Thanks, applied.

Best regards,
Krzysztof

#3 lore raw

PATCH v3 2/5 ARM: dts: add Samsung's exynos4412-based p4note boards

In reply to Martin Jücker

The p4note family contains a couple of variants of the Galaxy Note 10.1 tablet with mainly different modems. The GT-N8010/GT-N8013 is the wifi only version.

---
 arch/arm/boot/dts/Makefile                    |    1 +
 arch/arm/boot/dts/exynos4412-p4note-n8010.dts |   17 +
 arch/arm/boot/dts/exynos4412-p4note.dtsi      | 1132 +++++++++++++++++
 3 files changed, 1150 insertions(+)
 create mode 100644 arch/arm/boot/dts/exynos4412-p4note-n8010.dts
 create mode 100644 arch/arm/boot/dts/exynos4412-p4note.dtsi
arch/arm/boot/dts/Makefile +1 -0
index ce66ffd5a1bb..55ffee2b20f8 100644
@@ -197,6 +197,7 @@ dtb-$(CONFIG_ARCH_EXYNOS4) += \
 	exynos4412-odroidx.dtb \
 	exynos4412-odroidx2.dtb \
 	exynos4412-origen.dtb \
+	exynos4412-p4note-n8010.dtb \
 	exynos4412-smdk4412.dtb \
 	exynos4412-tiny4412.dtb \
 	exynos4412-trats2.dtb
arch/arm/boot/dts/exynos4412-p4note-n8010.dts new file +17 -0
new file mode 100644
index 000000000000..9f559425bd2c
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Samsung's Galaxy Note 10.1 - N801x (wifi only version)
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com
+ */
+
+/dts-v1/;
+#include "exynos4412-p4note.dtsi"
+
+/ {
+	model = "Samsung Galaxy Note 10.1 (GT-N8010/N8013) based on Exynos4412";
+	compatible = "samsung,n8010", "samsung,p4note", "samsung,exynos4412", "samsung,exynos4";
+
+	/* this is the base variant without any kind of modem */
+};
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +1132 -0

1,132 lines not on this page · raw message

Signature · 1 line
2.25.1
#4 lore raw

Re: [PATCH v3 2/5] ARM: dts: add Samsung's exynos4412-based p4note boards

Quoted 31 lines · Martin Jücker

The p4note family contains a couple of variants of the Galaxy Note 10.1 tablet with mainly different modems. The GT-N8010/GT-N8013 is the wifi only version.

---
 arch/arm/boot/dts/Makefile                    |    1 +
 arch/arm/boot/dts/exynos4412-p4note-n8010.dts |   17 +
 arch/arm/boot/dts/exynos4412-p4note.dtsi      | 1132 +++++++++++++++++
 3 files changed, 1150 insertions(+)
 create mode 100644 arch/arm/boot/dts/exynos4412-p4note-n8010.dts
 create mode 100644 arch/arm/boot/dts/exynos4412-p4note.dtsi
arch/arm/boot/dts/Makefile +1 -0
index ce66ffd5a1bb..55ffee2b20f8 100644
@@ -197,6 +197,7 @@ dtb-$(CONFIG_ARCH_EXYNOS4) += \
 	exynos4412-odroidx.dtb \
 	exynos4412-odroidx2.dtb \
 	exynos4412-origen.dtb \
+	exynos4412-p4note-n8010.dtb \
 	exynos4412-smdk4412.dtb \
 	exynos4412-tiny4412.dtb \
 	exynos4412-trats2.dtb
arch/arm/boot/dts/exynos4412-p4note-n8010.dts new file +0 -0
new file mode 100644
index 000000000000..9f559425bd2c

arch/arm/boot/dts/exynos4412-p4note-n8010.dts line 6

Quoted 6 lines
arch/arm/boot/dts/exynos4412-p4note-n8010.dts new file +6 -0
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Samsung's Galaxy Note 10.1 - N801x (wifi only version)
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com

Here and in other files - why did you remove your copyright? My comment from previous version: "If it is true, then include the copyright of original work as well."

Best regards,
Krzysztof

#5 lore raw

Re: [PATCH v3 2/5] ARM: dts: add Samsung's exynos4412-based p4note boards

Quoted 43 lines · Krzysztof Kozlowski
Quoted 31 lines · Martin Jücker

The p4note family contains a couple of variants of the Galaxy Note 10.1 tablet with mainly different modems. The GT-N8010/GT-N8013 is the wifi only version.

---
 arch/arm/boot/dts/Makefile                    |    1 +
 arch/arm/boot/dts/exynos4412-p4note-n8010.dts |   17 +
 arch/arm/boot/dts/exynos4412-p4note.dtsi      | 1132 +++++++++++++++++
 3 files changed, 1150 insertions(+)
 create mode 100644 arch/arm/boot/dts/exynos4412-p4note-n8010.dts
 create mode 100644 arch/arm/boot/dts/exynos4412-p4note.dtsi
arch/arm/boot/dts/Makefile +1 -0
index ce66ffd5a1bb..55ffee2b20f8 100644
@@ -197,6 +197,7 @@ dtb-$(CONFIG_ARCH_EXYNOS4) += \
 	exynos4412-odroidx.dtb \
 	exynos4412-odroidx2.dtb \
 	exynos4412-origen.dtb \
+	exynos4412-p4note-n8010.dtb \
 	exynos4412-smdk4412.dtb \
 	exynos4412-tiny4412.dtb \
 	exynos4412-trats2.dtb
arch/arm/boot/dts/exynos4412-p4note-n8010.dts new file +0 -0
new file mode 100644
index 000000000000..9f559425bd2c

arch/arm/boot/dts/exynos4412-p4note-n8010.dts line 6

Quoted 6 lines
arch/arm/boot/dts/exynos4412-p4note-n8010.dts new file +6 -0
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Samsung's Galaxy Note 10.1 - N801x (wifi only version)
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com

Here and in other files - why did you remove your copyright? My comment from previous version: "If it is true, then include the copyright of original work as well."

Quoted 3 lines

Best regards,
Krzysztof

Hey Krzysztof,

in the second response you wrote that "usually we keep the copyright of original file", I understood this as only the Samsung header as it is done for the midas, i930x and n710x. A lot of it is basically the same but with changed gpios. I really don't need my copyright up there if it's not strictly necessary.

Cheers
Martin

#6 lore raw

Re: [PATCH v3 2/5] ARM: dts: add Samsung's exynos4412-based p4note boards

Quoted 44 lines · Martin Jücker
Quoted 43 lines · Krzysztof Kozlowski
Quoted 31 lines · Martin Jücker

The p4note family contains a couple of variants of the Galaxy Note 10.1 tablet with mainly different modems. The GT-N8010/GT-N8013 is the wifi only version.

---
 arch/arm/boot/dts/Makefile                    |    1 +
 arch/arm/boot/dts/exynos4412-p4note-n8010.dts |   17 +
 arch/arm/boot/dts/exynos4412-p4note.dtsi      | 1132 +++++++++++++++++
 3 files changed, 1150 insertions(+)
 create mode 100644 arch/arm/boot/dts/exynos4412-p4note-n8010.dts
 create mode 100644 arch/arm/boot/dts/exynos4412-p4note.dtsi
arch/arm/boot/dts/Makefile +1 -0
index ce66ffd5a1bb..55ffee2b20f8 100644
@@ -197,6 +197,7 @@ dtb-$(CONFIG_ARCH_EXYNOS4) += \
 	exynos4412-odroidx.dtb \
 	exynos4412-odroidx2.dtb \
 	exynos4412-origen.dtb \
+	exynos4412-p4note-n8010.dtb \
 	exynos4412-smdk4412.dtb \
 	exynos4412-tiny4412.dtb \
 	exynos4412-trats2.dtb
arch/arm/boot/dts/exynos4412-p4note-n8010.dts new file +0 -0
new file mode 100644
index 000000000000..9f559425bd2c

arch/arm/boot/dts/exynos4412-p4note-n8010.dts line 6

Quoted 6 lines
arch/arm/boot/dts/exynos4412-p4note-n8010.dts new file +6 -0
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Samsung's Galaxy Note 10.1 - N801x (wifi only version)
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com

Here and in other files - why did you remove your copyright? My comment from previous version: "If it is true, then include the copyright of original work as well."

Quoted 8 lines
Quoted 3 lines

Best regards,
Krzysztof

Hey Krzysztof,

in the second response you wrote that "usually we keep the copyright of original file",

Yes, we keep it, in the sense: "we do not remove it". However on top of it you can add your copyrights.

Quoted 4 lines

I understood this as only the Samsung header as it is
done for the midas, i930x and n710x. A lot of it is basically the same but with changed gpios. I really don't need my copyright up there if it's not strictly necessary.

Your copyright is not required, it's anyway coming through contribution and Git history. If you don't need it, I'll apply the patches as they are.

Best regards,
Krzysztof

maintainer Applied
#7 lore raw

Re: [PATCH v3 2/5] ARM: dts: add Samsung's exynos4412-based p4note boards

In reply to Martin Jücker
Quoted 4 lines · Martin Jücker

The p4note family contains a couple of variants of the Galaxy Note 10.1 tablet with mainly different modems. The GT-N8010/GT-N8013 is the wifi only version.

Quoted 8 lines
---
 arch/arm/boot/dts/Makefile                    |    1 +
 arch/arm/boot/dts/exynos4412-p4note-n8010.dts |   17 +
 arch/arm/boot/dts/exynos4412-p4note.dtsi      | 1132 +++++++++++++++++
 3 files changed, 1150 insertions(+)
 create mode 100644 arch/arm/boot/dts/exynos4412-p4note-n8010.dts
 create mode 100644 arch/arm/boot/dts/exynos4412-p4note.dtsi

Thanks, applied.

Best regards,
Krzysztof

#8 lore raw

PATCH v3 3/5 ARM: defconfig: add stmpe adc driver for p4note

In reply to Martin Jücker

Enable the stmpe adc driver for the p4note device family.

---
 arch/arm/configs/exynos_defconfig   | 3 +++
 arch/arm/configs/multi_v7_defconfig | 2 ++
 2 files changed, 5 insertions(+)
arch/arm/configs/exynos_defconfig +3 -0
index cf82c9d23a08..c8ae45e5ad72 100644
@@ -175,6 +175,8 @@ CONFIG_MFD_MAX77693=y
 CONFIG_MFD_MAX8997=y
 CONFIG_MFD_MAX8998=y
 CONFIG_MFD_SEC_CORE=y
+CONFIG_MFD_STMPE=y
+CONFIG_STMPE_I2C=y
 CONFIG_MFD_TPS65090=y
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
@@ -319,6 +321,7 @@ CONFIG_EXTCON_MAX77693=y
 CONFIG_EXTCON_MAX8997=y
 CONFIG_IIO=y
 CONFIG_EXYNOS_ADC=y
+CONFIG_STMPE_ADC=y
 CONFIG_CM36651=y
 CONFIG_AK8975=y
 CONFIG_PWM=y
arch/arm/configs/multi_v7_defconfig +2 -0
index a611b0c1e540..0c71d82dc837 100644
@@ -557,6 +557,7 @@ CONFIG_MFD_RK808=y
 CONFIG_MFD_RN5T618=y
 CONFIG_MFD_SEC_CORE=y
 CONFIG_MFD_STMPE=y
+CONFIG_STMPE_I2C=y
 CONFIG_MFD_PALMAS=y
 CONFIG_MFD_TPS65090=y
 CONFIG_MFD_TPS65217=y
@@ -1024,6 +1025,7 @@ CONFIG_AT91_SAMA5D2_ADC=m
 CONFIG_BERLIN2_ADC=m
 CONFIG_CPCAP_ADC=m
 CONFIG_EXYNOS_ADC=m
+CONFIG_STMPE_ADC=m
 CONFIG_MESON_SARADC=m
 CONFIG_ROCKCHIP_SARADC=m
 CONFIG_STM32_ADC_CORE=m
Signature · 1 line
2.25.1
maintainer Applied
#9 lore raw

Re: [PATCH v3 3/5] ARM: defconfig: add stmpe adc driver for p4note

Quoted 7 lines · Martin Jücker

Enable the stmpe adc driver for the p4note device family.

---
 arch/arm/configs/exynos_defconfig   | 3 +++
 arch/arm/configs/multi_v7_defconfig | 2 ++
 2 files changed, 5 insertions(+)

Thanks, applied.

Best regards,
Krzysztof

#10 lore raw

PATCH v3 4/5 ARM: defconfig: compile Atmel MXT touchscreeen as module

In reply to Martin Jücker

The Atmel MXT touchscreen can load firmware and settings from the /lib/firmware directory, it makes sense to have it as a module to have more control over the loading process.

---
 arch/arm/configs/exynos_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/configs/exynos_defconfig +1 -1
index c8ae45e5ad72..f07bde3ba9b1 100644
@@ -125,7 +125,7 @@ CONFIG_KEYBOARD_CROS_EC=y
 # CONFIG_MOUSE_PS2 is not set
 CONFIG_MOUSE_CYAPA=y
 CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_ATMEL_MXT=y
+CONFIG_TOUCHSCREEN_ATMEL_MXT=m
 CONFIG_TOUCHSCREEN_MMS114=y
 CONFIG_INPUT_MISC=y
 CONFIG_INPUT_MAX77693_HAPTIC=y
Signature · 1 line
2.25.1
maintainer Applied
#11 lore raw

Re: [PATCH v3 4/5] ARM: defconfig: compile Atmel MXT touchscreeen as module

Quoted 8 lines · Martin Jücker

The Atmel MXT touchscreen can load firmware and settings from the /lib/firmware directory, it makes sense to have it as a module to have more control over the loading process.

---
 arch/arm/configs/exynos_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied.

Best regards,
Krzysztof

#12 lore raw

PATCH v3 5/5 ARM: exynos: extend cpuidle support to p4note boards

In reply to Martin Jücker

The p4note family supports cpuidle, so allow it to make use of this feature.

---
 arch/arm/mach-exynos/exynos.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-exynos/exynos.c +2 -1
index 700763e07083..fc8291f76263 100644
@@ -177,7 +177,8 @@ static void __init exynos_dt_machine_init(void)
 	if (of_machine_is_compatible("samsung,exynos4210") ||
 	    (of_machine_is_compatible("samsung,exynos4412") &&
 	     (of_machine_is_compatible("samsung,trats2") ||
-		  of_machine_is_compatible("samsung,midas"))) ||
+		  of_machine_is_compatible("samsung,midas") ||
+		  of_machine_is_compatible("samsung,p4note"))) ||
 	    of_machine_is_compatible("samsung,exynos3250") ||
 	    of_machine_is_compatible("samsung,exynos5250"))
 		platform_device_register(&exynos_cpuidle);
Signature · 1 line
2.25.1
maintainer Applied
#13 lore raw

Re: [PATCH v3 5/5] ARM: exynos: extend cpuidle support to p4note boards

Quoted 7 lines · Martin Jücker

The p4note family supports cpuidle, so allow it to make use of this feature.

---
 arch/arm/mach-exynos/exynos.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Thanks, applied.

Best regards,
Krzysztof