Skip to contentSkip to conversation

add exynos4412-based p4note device family support

PATCH Superseded Martin Jücker 4 participants 14 messages Oct 31, 2020 – Nov 6, 2020

Subsystems (5)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 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]/

Changes in v2 (proposed by Marek and Krzysztof)
- 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 v2 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 eb92f9eefaba..dbc401984152 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
#2 lore raw

Re: [PATCH 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(+)

Please add Acked-by/Reviewed-by tags when posting new versions. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for acks received on the version they apply.

If a tag was not added on purpose, please state why and what changed.

#3 lore raw

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

Quoted 11 lines · Rob Herring
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(+)
Quoted 6 lines

Please add Acked-by/Reviewed-by tags when posting new versions. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for acks received on the version they apply.

If a tag was not added on purpose, please state why and what changed.

I wasn't aware of this but it makes sense. I actually changed the board compatible from samsung,n801x to samsung,n8010 - I guess that would still be ok to add a reviewed-by in this case?

Cheers
Martin

#4 lore raw

PATCH v2 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 |   16 +
 arch/arm/boot/dts/exynos4412-p4note.dtsi      | 1128 +++++++++++++++++
 3 files changed, 1145 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 4572db3fa5ae..951853e55edb 100644
@@ -195,6 +195,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 +16 -0
new file mode 100644
index 000000000000..f99358750e01
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Samsung's Galaxy Note 10.1 - N801x (wifi only version)
+ *
+ * Copyright (c) 2020 Martin Jücker <[email protected]>
+ */
+
+/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 +1128 -0

1,128 lines not on this page · raw message

Signature · 1 line
2.25.1
#5 lore raw

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

Quoted 3 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.

The subject is v1. Did you send correct patch?

Quoted 50 lines
---
 arch/arm/boot/dts/Makefile                    |    1 +
 arch/arm/boot/dts/exynos4412-p4note-n8010.dts |   16 +
 arch/arm/boot/dts/exynos4412-p4note.dtsi      | 1128 +++++++++++++++++
 3 files changed, 1145 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 4572db3fa5ae..951853e55edb 100644
@@ -195,6 +195,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 +16 -0
new file mode 100644
index 000000000000..f99358750e01
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Samsung's Galaxy Note 10.1 - N801x (wifi only version)
+ *
+ * Copyright (c) 2020 Martin Jücker <[email protected]>
+ */
+
+/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 +0 -0
new file mode 100644
index 000000000000..15b6acbbecb2

arch/arm/boot/dts/exynos4412-p4note.dtsi line 5

Quoted 5 lines
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +5 -0
@@ -0,0 +1,1128 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Samsung's Exynos4412 based p4note device family base DT
+ *
+ * Copyright (c) 2020 Martin Jücker <[email protected]>

Multiple parts of this file look like copied from the existing ones. Few comments are the same. The v1 duplicated even few minor issues like not that good naming of nodes. It looks like it is not only based on existing sources, but uses parts of them directly. If it is true, then include the copyright of original work as well.
https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html

Quoted 235 lines
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +235 -0
+ */
+
+/dts-v1/;
+#include "exynos4412.dtsi"
+#include "exynos4412-ppmu-common.dtsi"
+
+#include <dt-bindings/clock/maxim,max77686.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pinctrl/samsung.h>
+
+/ {
+	compatible = "samsung,p4note", "samsung,exynos4412", "samsung,exynos4";
+
+	memory@40000000 {
+		device_type = "memory";
+		reg = <0x40000000 0x80000000>;
+	};
+
+	chosen {
+		stdout-path = &serial_2;
+	};
+
+	firmware@204f000 {
+		compatible = "samsung,secure-firmware";
+		reg = <0x0204F000 0x1000>;
+	};
+
+	fixed-rate-clocks {
+		xxti {
+			compatible = "samsung,clock-xxti";
+			clock-frequency = <0>;
+		};
+
+		xusbxti {
+			compatible = "samsung,clock-xusbxti";
+			clock-frequency = <24000000>;
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		pinctrl-names = "default";
+		pinctrl-0 = <&gpio_keys>;
+
+		key-down {
+			gpios = <&gpx2 2 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_VOLUMEDOWN>;
+			label = "volume down";
+			debounce-interval = <10>;
+		};
+
+		key-up {
+			gpios = <&gpx3 3 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_VOLUMEUP>;
+			label = "volume up";
+			debounce-interval = <10>;
+		};
+
+		key-power {
+			gpios = <&gpx2 7 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_POWER>;
+			label = "power";
+			debounce-interval = <10>;
+			wakeup-source;
+		};
+	};
+
+	voltage-regulator-1 {
+		compatible = "regulator-fixed";
+		regulator-name = "TSP_LDO1";
+		pinctrl-names = "default";
+		pinctrl-0 = <&tsp_reg_gpio_1>;
+		gpios = <&gpm4 5 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		regulator-always-on;
+	};
+
+	voltage-regulator-2 {
+		compatible = "regulator-fixed";
+		regulator-name = "TSP_LDO2";
+		pinctrl-names = "default";
+		pinctrl-0 = <&tsp_reg_gpio_2>;
+		gpios = <&gpb 5 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		regulator-always-on;
+	};
+
+	voltage-regulator-3 {
+		compatible = "regulator-fixed";
+		regulator-name = "TSP_LDO3";
+		pinctrl-names = "default";
+		pinctrl-0 = <&tsp_reg_gpio_3>;
+		gpios = <&gpb 7 GPIO_ACTIVE_HIGH>;
+		startup-delay-us = <20000>;
+		enable-active-high;
+		regulator-always-on;
+	};
+
+	wlan_pwrseq: sdhci3-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		reset-gpios = <&gpm3 5 GPIO_ACTIVE_LOW>;
+		pinctrl-0 = <&wifi_reset>;
+		pinctrl-names = "default";
+		clocks = <&max77686 MAX77686_CLK_PMIC>;
+		clock-names = "ext_clock";
+	};
+
+	i2c-gpio-1 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&gpy2 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpy2 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <2>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		magnetometer@c {
+			compatible = "asahi-kasei,ak8975";
+			reg = <0x0c>;
+			pinctrl-0 = <&ak8975_irq>;
+			pinctrl-names = "default";
+			interrupt-parent = <&gpm4>;
+			interrupts = <7 IRQ_TYPE_EDGE_RISING>;
+		};
+	};
+
+	i2c-gpio-2 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&gpy0 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpy0 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <2>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		fuel-gauge@36 {
+			compatible = "maxim,max17042";
+			reg = <0x36>;
+			pinctrl-0 = <&fuel_alert_irq>;
+			pinctrl-names = "default";
+			interrupt-parent = <&gpx2>;
+			interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
+			maxim,rsns-microohm = <10000>;
+			maxim,over-heat-temp = <600>;
+			maxim,over-volt = <4300>;
+		};
+	};
+
+	i2c-gpio-3 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&gpm4 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpm4 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <5>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		adc@41 {
+			compatible = "st,stmpe811";
+			reg = <0x41>;
+			pinctrl-0 = <&stmpe_adc_irq>;
+			pinctrl-names = "default";
+			interrupt-parent = <&gpx0>;
+			interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
+			interrupt-controller;
+			irq-trigger = <0x1>;
+			st,adc-freq = <3>;
+			st,mod-12b = <1>;
+			st,ref-sel = <0>;
+			st,sample-time = <3>;
+
+			stmpe_adc {
+				compatible = "st,stmpe-adc";
+				#io-channel-cells = <1>;
+				st,norequest-mask = <0x2F>;
+			};
+		};
+	};
+};
+
+&adc {
+	vdd-supply = <&ldo3_reg>;
+	/* not verified */
+	status = "okay";
+};
+
+&bus_dmc {
+	devfreq-events = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
+	vdd-supply = <&buck1_reg>;
+	status = "okay";
+};
+
+&bus_acp {
+	devfreq = <&bus_dmc>;
+	status = "okay";
+};
+
+&bus_c2c {
+	devfreq = <&bus_dmc>;
+	status = "okay";
+};
+
+&bus_leftbus {
+	devfreq-events = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
+	vdd-supply = <&buck3_reg>;
+	status = "okay";
+};
+
+&bus_rightbus {
+	devfreq = <&bus_leftbus>;
+	status = "okay";
+};
+
+&bus_display {
+	devfreq = <&bus_leftbus>;
+	status = "okay";
+};
+
+&bus_fsys {
+	devfreq = <&bus_leftbus>;
+	status = "okay";
+};
+
+&bus_peri {
+	devfreq = <&bus_leftbus>;
+	status = "okay";
+};
+
+&bus_mfc {
+	devfreq = <&bus_leftbus>;
+	status = "okay";
+};
+
+&cpu0 {
+	cpu0-supply = <&buck2_reg>;
+};

arch/arm/boot/dts/exynos4412-p4note.dtsi line 250

Quoted 10 lines
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +10 -0
+
+&cpu_thermal {
+	cooling-maps {
+		map0 {
+			/* Corresponds to 800MHz at freq_table */
+			cooling-device = <&cpu0 7 7>, <&cpu1 7 7>, <&cpu2 7 7>, <&cpu3 7 7>;
+		};
+		map1 {
+			/* Corresponds to 200MHz at freq_table */
+			cooling-device = <&cpu0 13 13>, <&cpu1 13 13>, <&cpu2 13 13>, <&cpu3 13 13>;

This is too long. Please split it at 80 with indentation of next line starting at < from the previous one.

Quoted 17 lines
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +17 -0
+		};
+	};
+};
+
+&exynos_usbphy {
+	status = "okay";
+};
+
+&fimd {
+	pinctrl-0 = <&lcd_clk &lcd_data24 &pwm1_out>;
+	pinctrl-names = "default";
+	status = "okay";
+
+	display-timings {
+		timing0 {
+			clock-frequency = <66666666>;
+			hactive = <1280>;

arch/arm/boot/dts/exynos4412-p4note.dtsi line 277

Quoted 10 lines
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +10 -0
+			vactive = <800>;
+			hfront-porch = <18>;
+			hback-porch = <36>;
+			hsync-len = <16>;
+			vback-porch = <16>;
+			vfront-porch = <4>;
+			vsync-len = <3>;
+			hsync-active = <1>;
+		};
+	};

What happened with Marek's comment about this?

Best regards,
Krzysztof

#6 lore raw

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

Quoted 6 lines · Krzysztof Kozlowski
Quoted 3 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.

The subject is v1. Did you send correct patch?

I probably messed up with git send-email here. I need some more time to get used to it. The patch is indeed v2.

Quoted 55 lines
Quoted 55 lines
---
 arch/arm/boot/dts/Makefile                    |    1 +
 arch/arm/boot/dts/exynos4412-p4note-n8010.dts |   16 +
 arch/arm/boot/dts/exynos4412-p4note.dtsi      | 1128 +++++++++++++++++
 3 files changed, 1145 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 4572db3fa5ae..951853e55edb 100644
@@ -195,6 +195,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 +16 -0
new file mode 100644
index 000000000000..f99358750e01
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Samsung's Galaxy Note 10.1 - N801x (wifi only version)
+ *
+ * Copyright (c) 2020 Martin Jücker <[email protected]>
+ */
+
+/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 +4 -0
new file mode 100644
index 000000000000..15b6acbbecb2
@@ -0,0 +1,1128 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Samsung's Exynos4412 based p4note device family base DT
+ *
Quoted 9 lines

arch/arm/boot/dts/exynos4412-p4note.dtsi line 5

Quoted 1 line
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +1 -0
+ * Copyright (c) 2020 Martin Jücker <[email protected]>

Multiple parts of this file look like copied from the existing ones. Few comments are the same. The v1 duplicated even few minor issues like not that good naming of nodes. It looks like it is not only based on existing sources, but uses parts of them directly. If it is true, then include the copyright of original work as well.
https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html

I had a look through multiple files and ended up with a mix of copying and writing nodes myself. Most if not all of the copying is from the midas dt, is it enough to add a note that this file is based on the midas dt or should I go with the same approach like midas and only add the samsung copyright here? I don't care too much what's in the header.

Quoted 241 lines
Quoted 241 lines
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +240 -0
+ */
+
+/dts-v1/;
+#include "exynos4412.dtsi"
+#include "exynos4412-ppmu-common.dtsi"
+
+#include <dt-bindings/clock/maxim,max77686.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pinctrl/samsung.h>
+
+/ {
+	compatible = "samsung,p4note", "samsung,exynos4412", "samsung,exynos4";
+
+	memory@40000000 {
+		device_type = "memory";
+		reg = <0x40000000 0x80000000>;
+	};
+
+	chosen {
+		stdout-path = &serial_2;
+	};
+
+	firmware@204f000 {
+		compatible = "samsung,secure-firmware";
+		reg = <0x0204F000 0x1000>;
+	};
+
+	fixed-rate-clocks {
+		xxti {
+			compatible = "samsung,clock-xxti";
+			clock-frequency = <0>;
+		};
+
+		xusbxti {
+			compatible = "samsung,clock-xusbxti";
+			clock-frequency = <24000000>;
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		pinctrl-names = "default";
+		pinctrl-0 = <&gpio_keys>;
+
+		key-down {
+			gpios = <&gpx2 2 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_VOLUMEDOWN>;
+			label = "volume down";
+			debounce-interval = <10>;
+		};
+
+		key-up {
+			gpios = <&gpx3 3 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_VOLUMEUP>;
+			label = "volume up";
+			debounce-interval = <10>;
+		};
+
+		key-power {
+			gpios = <&gpx2 7 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_POWER>;
+			label = "power";
+			debounce-interval = <10>;
+			wakeup-source;
+		};
+	};
+
+	voltage-regulator-1 {
+		compatible = "regulator-fixed";
+		regulator-name = "TSP_LDO1";
+		pinctrl-names = "default";
+		pinctrl-0 = <&tsp_reg_gpio_1>;
+		gpios = <&gpm4 5 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		regulator-always-on;
+	};
+
+	voltage-regulator-2 {
+		compatible = "regulator-fixed";
+		regulator-name = "TSP_LDO2";
+		pinctrl-names = "default";
+		pinctrl-0 = <&tsp_reg_gpio_2>;
+		gpios = <&gpb 5 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		regulator-always-on;
+	};
+
+	voltage-regulator-3 {
+		compatible = "regulator-fixed";
+		regulator-name = "TSP_LDO3";
+		pinctrl-names = "default";
+		pinctrl-0 = <&tsp_reg_gpio_3>;
+		gpios = <&gpb 7 GPIO_ACTIVE_HIGH>;
+		startup-delay-us = <20000>;
+		enable-active-high;
+		regulator-always-on;
+	};
+
+	wlan_pwrseq: sdhci3-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		reset-gpios = <&gpm3 5 GPIO_ACTIVE_LOW>;
+		pinctrl-0 = <&wifi_reset>;
+		pinctrl-names = "default";
+		clocks = <&max77686 MAX77686_CLK_PMIC>;
+		clock-names = "ext_clock";
+	};
+
+	i2c-gpio-1 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&gpy2 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpy2 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <2>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		magnetometer@c {
+			compatible = "asahi-kasei,ak8975";
+			reg = <0x0c>;
+			pinctrl-0 = <&ak8975_irq>;
+			pinctrl-names = "default";
+			interrupt-parent = <&gpm4>;
+			interrupts = <7 IRQ_TYPE_EDGE_RISING>;
+		};
+	};
+
+	i2c-gpio-2 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&gpy0 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpy0 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <2>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		fuel-gauge@36 {
+			compatible = "maxim,max17042";
+			reg = <0x36>;
+			pinctrl-0 = <&fuel_alert_irq>;
+			pinctrl-names = "default";
+			interrupt-parent = <&gpx2>;
+			interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
+			maxim,rsns-microohm = <10000>;
+			maxim,over-heat-temp = <600>;
+			maxim,over-volt = <4300>;
+		};
+	};
+
+	i2c-gpio-3 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&gpm4 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpm4 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <5>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		adc@41 {
+			compatible = "st,stmpe811";
+			reg = <0x41>;
+			pinctrl-0 = <&stmpe_adc_irq>;
+			pinctrl-names = "default";
+			interrupt-parent = <&gpx0>;
+			interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
+			interrupt-controller;
+			irq-trigger = <0x1>;
+			st,adc-freq = <3>;
+			st,mod-12b = <1>;
+			st,ref-sel = <0>;
+			st,sample-time = <3>;
+
+			stmpe_adc {
+				compatible = "st,stmpe-adc";
+				#io-channel-cells = <1>;
+				st,norequest-mask = <0x2F>;
+			};
+		};
+	};
+};
+
+&adc {
+	vdd-supply = <&ldo3_reg>;
+	/* not verified */
+	status = "okay";
+};
+
+&bus_dmc {
+	devfreq-events = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
+	vdd-supply = <&buck1_reg>;
+	status = "okay";
+};
+
+&bus_acp {
+	devfreq = <&bus_dmc>;
+	status = "okay";
+};
+
+&bus_c2c {
+	devfreq = <&bus_dmc>;
+	status = "okay";
+};
+
+&bus_leftbus {
+	devfreq-events = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
+	vdd-supply = <&buck3_reg>;
+	status = "okay";
+};
+
+&bus_rightbus {
+	devfreq = <&bus_leftbus>;
+	status = "okay";
+};
+
+&bus_display {
+	devfreq = <&bus_leftbus>;
+	status = "okay";
+};
+
+&bus_fsys {
+	devfreq = <&bus_leftbus>;
+	status = "okay";
+};
+
+&bus_peri {
+	devfreq = <&bus_leftbus>;
+	status = "okay";
+};
+
+&bus_mfc {
+	devfreq = <&bus_leftbus>;
+	status = "okay";
+};
+
+&cpu0 {
+	cpu0-supply = <&buck2_reg>;
+};
+
+&cpu_thermal {
+	cooling-maps {
+		map0 {
+			/* Corresponds to 800MHz at freq_table */
Quoted 9 lines

arch/arm/boot/dts/exynos4412-p4note.dtsi line 250

Quoted 5 lines
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +5 -0
+			cooling-device = <&cpu0 7 7>, <&cpu1 7 7>, <&cpu2 7 7>, <&cpu3 7 7>;
+		};
+		map1 {
+			/* Corresponds to 200MHz at freq_table */
+			cooling-device = <&cpu0 13 13>, <&cpu1 13 13>, <&cpu2 13 13>, <&cpu3 13 13>;

This is too long. Please split it at 80 with indentation of next line starting at < from the previous one.

Okay

Quoted 22 lines
Quoted 22 lines
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +21 -0
+		};
+	};
+};
+
+&exynos_usbphy {
+	status = "okay";
+};
+
+&fimd {
+	pinctrl-0 = <&lcd_clk &lcd_data24 &pwm1_out>;
+	pinctrl-names = "default";
+	status = "okay";
+
+	display-timings {
+		timing0 {
+			clock-frequency = <66666666>;
+			hactive = <1280>;
+			vactive = <800>;
+			hfront-porch = <18>;
+			hback-porch = <36>;
+			hsync-len = <16>;
Quoted 9 lines

arch/arm/boot/dts/exynos4412-p4note.dtsi line 277

Quoted 6 lines
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +6 -0
+			vback-porch = <16>;
+			vfront-porch = <4>;
+			vsync-len = <3>;
+			hsync-active = <1>;
+		};
+	};

What happened with Marek's comment about this?

Should have mentioned it in the introduction mail. I had a look at the simple panel driver and it's not enough for the display in the p4note. I asked Marek in IRC whether it's ok to have this in a separate patch set to have a fully working display and he agreed.

Quoted 2 lines

Best regards,
Krzysztof

#7 lore raw

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

Quoted 76 lines · Martin Juecker
Quoted 6 lines · Krzysztof Kozlowski
Quoted 3 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.

The subject is v1. Did you send correct patch?

I probably messed up with git send-email here. I need some more time to get used to it. The patch is indeed v2.

Quoted 55 lines
Quoted 55 lines
---
 arch/arm/boot/dts/Makefile                    |    1 +
 arch/arm/boot/dts/exynos4412-p4note-n8010.dts |   16 +
 arch/arm/boot/dts/exynos4412-p4note.dtsi      | 1128 +++++++++++++++++
 3 files changed, 1145 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 4572db3fa5ae..951853e55edb 100644
@@ -195,6 +195,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 +16 -0
new file mode 100644
index 000000000000..f99358750e01
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Samsung's Galaxy Note 10.1 - N801x (wifi only version)
+ *
+ * Copyright (c) 2020 Martin Jücker <[email protected]>
+ */
+
+/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 +4 -0
new file mode 100644
index 000000000000..15b6acbbecb2
@@ -0,0 +1,1128 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Samsung's Exynos4412 based p4note device family base DT
+ *
Quoted 9 lines

arch/arm/boot/dts/exynos4412-p4note.dtsi line 5

Quoted 1 line
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +1 -0
+ * Copyright (c) 2020 Martin Jücker <[email protected]>

Multiple parts of this file look like copied from the existing ones. Few comments are the same. The v1 duplicated even few minor issues like not that good naming of nodes. It looks like it is not only based on existing sources, but uses parts of them directly. If it is true, then include the copyright of original work as well.
https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html

Quoted 5 lines

I had a look through multiple files and ended up with a mix of copying and writing nodes myself. Most if not all of the copying is from the midas dt, is it enough to add a note that this file is based on the midas dt or should I go with the same approach like midas and only add the samsung copyright here? I don't care too much what's in the header.

In such case we mention that works is based on the file, as you suggest, and usually we keep the copyright of original file.

Quoted 285 lines
Quoted 241 lines
Quoted 241 lines
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +240 -0
+ */
+
+/dts-v1/;
+#include "exynos4412.dtsi"
+#include "exynos4412-ppmu-common.dtsi"
+
+#include <dt-bindings/clock/maxim,max77686.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pinctrl/samsung.h>
+
+/ {
+	compatible = "samsung,p4note", "samsung,exynos4412", "samsung,exynos4";
+
+	memory@40000000 {
+		device_type = "memory";
+		reg = <0x40000000 0x80000000>;
+	};
+
+	chosen {
+		stdout-path = &serial_2;
+	};
+
+	firmware@204f000 {
+		compatible = "samsung,secure-firmware";
+		reg = <0x0204F000 0x1000>;
+	};
+
+	fixed-rate-clocks {
+		xxti {
+			compatible = "samsung,clock-xxti";
+			clock-frequency = <0>;
+		};
+
+		xusbxti {
+			compatible = "samsung,clock-xusbxti";
+			clock-frequency = <24000000>;
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		pinctrl-names = "default";
+		pinctrl-0 = <&gpio_keys>;
+
+		key-down {
+			gpios = <&gpx2 2 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_VOLUMEDOWN>;
+			label = "volume down";
+			debounce-interval = <10>;
+		};
+
+		key-up {
+			gpios = <&gpx3 3 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_VOLUMEUP>;
+			label = "volume up";
+			debounce-interval = <10>;
+		};
+
+		key-power {
+			gpios = <&gpx2 7 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_POWER>;
+			label = "power";
+			debounce-interval = <10>;
+			wakeup-source;
+		};
+	};
+
+	voltage-regulator-1 {
+		compatible = "regulator-fixed";
+		regulator-name = "TSP_LDO1";
+		pinctrl-names = "default";
+		pinctrl-0 = <&tsp_reg_gpio_1>;
+		gpios = <&gpm4 5 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		regulator-always-on;
+	};
+
+	voltage-regulator-2 {
+		compatible = "regulator-fixed";
+		regulator-name = "TSP_LDO2";
+		pinctrl-names = "default";
+		pinctrl-0 = <&tsp_reg_gpio_2>;
+		gpios = <&gpb 5 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		regulator-always-on;
+	};
+
+	voltage-regulator-3 {
+		compatible = "regulator-fixed";
+		regulator-name = "TSP_LDO3";
+		pinctrl-names = "default";
+		pinctrl-0 = <&tsp_reg_gpio_3>;
+		gpios = <&gpb 7 GPIO_ACTIVE_HIGH>;
+		startup-delay-us = <20000>;
+		enable-active-high;
+		regulator-always-on;
+	};
+
+	wlan_pwrseq: sdhci3-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		reset-gpios = <&gpm3 5 GPIO_ACTIVE_LOW>;
+		pinctrl-0 = <&wifi_reset>;
+		pinctrl-names = "default";
+		clocks = <&max77686 MAX77686_CLK_PMIC>;
+		clock-names = "ext_clock";
+	};
+
+	i2c-gpio-1 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&gpy2 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpy2 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <2>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		magnetometer@c {
+			compatible = "asahi-kasei,ak8975";
+			reg = <0x0c>;
+			pinctrl-0 = <&ak8975_irq>;
+			pinctrl-names = "default";
+			interrupt-parent = <&gpm4>;
+			interrupts = <7 IRQ_TYPE_EDGE_RISING>;
+		};
+	};
+
+	i2c-gpio-2 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&gpy0 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpy0 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <2>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		fuel-gauge@36 {
+			compatible = "maxim,max17042";
+			reg = <0x36>;
+			pinctrl-0 = <&fuel_alert_irq>;
+			pinctrl-names = "default";
+			interrupt-parent = <&gpx2>;
+			interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
+			maxim,rsns-microohm = <10000>;
+			maxim,over-heat-temp = <600>;
+			maxim,over-volt = <4300>;
+		};
+	};
+
+	i2c-gpio-3 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&gpm4 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpm4 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <5>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		adc@41 {
+			compatible = "st,stmpe811";
+			reg = <0x41>;
+			pinctrl-0 = <&stmpe_adc_irq>;
+			pinctrl-names = "default";
+			interrupt-parent = <&gpx0>;
+			interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
+			interrupt-controller;
+			irq-trigger = <0x1>;
+			st,adc-freq = <3>;
+			st,mod-12b = <1>;
+			st,ref-sel = <0>;
+			st,sample-time = <3>;
+
+			stmpe_adc {
+				compatible = "st,stmpe-adc";
+				#io-channel-cells = <1>;
+				st,norequest-mask = <0x2F>;
+			};
+		};
+	};
+};
+
+&adc {
+	vdd-supply = <&ldo3_reg>;
+	/* not verified */
+	status = "okay";
+};
+
+&bus_dmc {
+	devfreq-events = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
+	vdd-supply = <&buck1_reg>;
+	status = "okay";
+};
+
+&bus_acp {
+	devfreq = <&bus_dmc>;
+	status = "okay";
+};
+
+&bus_c2c {
+	devfreq = <&bus_dmc>;
+	status = "okay";
+};
+
+&bus_leftbus {
+	devfreq-events = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
+	vdd-supply = <&buck3_reg>;
+	status = "okay";
+};
+
+&bus_rightbus {
+	devfreq = <&bus_leftbus>;
+	status = "okay";
+};
+
+&bus_display {
+	devfreq = <&bus_leftbus>;
+	status = "okay";
+};
+
+&bus_fsys {
+	devfreq = <&bus_leftbus>;
+	status = "okay";
+};
+
+&bus_peri {
+	devfreq = <&bus_leftbus>;
+	status = "okay";
+};
+
+&bus_mfc {
+	devfreq = <&bus_leftbus>;
+	status = "okay";
+};
+
+&cpu0 {
+	cpu0-supply = <&buck2_reg>;
+};
+
+&cpu_thermal {
+	cooling-maps {
+		map0 {
+			/* Corresponds to 800MHz at freq_table */
Quoted 9 lines

arch/arm/boot/dts/exynos4412-p4note.dtsi line 250

Quoted 5 lines
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +5 -0
+			cooling-device = <&cpu0 7 7>, <&cpu1 7 7>, <&cpu2 7 7>, <&cpu3 7 7>;
+		};
+		map1 {
+			/* Corresponds to 200MHz at freq_table */
+			cooling-device = <&cpu0 13 13>, <&cpu1 13 13>, <&cpu2 13 13>, <&cpu3 13 13>;

This is too long. Please split it at 80 with indentation of next line starting at < from the previous one.

Okay

Quoted 22 lines
Quoted 22 lines
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +21 -0
+		};
+	};
+};
+
+&exynos_usbphy {
+	status = "okay";
+};
+
+&fimd {
+	pinctrl-0 = <&lcd_clk &lcd_data24 &pwm1_out>;
+	pinctrl-names = "default";
+	status = "okay";
+
+	display-timings {
+		timing0 {
+			clock-frequency = <66666666>;
+			hactive = <1280>;
+			vactive = <800>;
+			hfront-porch = <18>;
+			hback-porch = <36>;
+			hsync-len = <16>;
Quoted 9 lines

arch/arm/boot/dts/exynos4412-p4note.dtsi line 277

Quoted 6 lines
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +6 -0
+			vback-porch = <16>;
+			vfront-porch = <4>;
+			vsync-len = <3>;
+			hsync-active = <1>;
+		};
+	};

What happened with Marek's comment about this?

Quoted 4 lines

Should have mentioned it in the introduction mail. I had a look at the simple panel driver and it's not enough for the display in the p4note. I asked Marek in IRC whether it's ok to have this in a separate patch set to have a fully working display and he agreed.

Ah, ok.

Best regards,
Krzysztof

#8 lore raw

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

In reply to Martin Juecker

Hi Martin,

Quoted 23 lines · Martin Juecker
Quoted 14 lines

...

Quoted 13 lines
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +13 -0
+
+&fimd {
+	pinctrl-0 = <&lcd_clk &lcd_data24 &pwm1_out>;
+	pinctrl-names = "default";
+	status = "okay";
+
+	display-timings {
+		timing0 {
+			clock-frequency = <66666666>;
+			hactive = <1280>;
+			vactive = <800>;
+			hfront-porch = <18>;
+			hback-porch = <36>;
Quoted 9 lines

arch/arm/boot/dts/exynos4412-p4note.dtsi line 277

Quoted 7 lines
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +7 -0
+			hsync-len = <16>;
+			vback-porch = <16>;
+			vfront-porch = <4>;
+			vsync-len = <3>;
+			hsync-active = <1>;
+		};
+	};

What happened with Marek's comment about this?

Quoted 4 lines

Should have mentioned it in the introduction mail. I had a look at the simple panel driver and it's not enough for the display in the p4note. I asked Marek in IRC whether it's ok to have this in a separate patch set to have a fully working display and he agreed.

Yes, I agreed that the display can be added later in a separate patch. However in such case I would simply remove the whole fimd node now. Without a panel it is a bit useless imho. With a proper panel driver you will also get rid of the timings subnode, so there is no point adding it now.

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
#9 lore raw

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

Quoted 31 lines · Marek Szyprowski

Hi Martin,

Quoted 23 lines · Martin Juecker
Quoted 14 lines

...

Quoted 13 lines
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +13 -0
+
+&fimd {
+	pinctrl-0 = <&lcd_clk &lcd_data24 &pwm1_out>;
+	pinctrl-names = "default";
+	status = "okay";
+
+	display-timings {
+		timing0 {
+			clock-frequency = <66666666>;
+			hactive = <1280>;
+			vactive = <800>;
+			hfront-porch = <18>;
+			hback-porch = <36>;
Quoted 9 lines

arch/arm/boot/dts/exynos4412-p4note.dtsi line 277

Quoted 7 lines
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +7 -0
+			hsync-len = <16>;
+			vback-porch = <16>;
+			vfront-porch = <4>;
+			vsync-len = <3>;
+			hsync-active = <1>;
+		};
+	};

What happened with Marek's comment about this?

Quoted 4 lines

Should have mentioned it in the introduction mail. I had a look at the simple panel driver and it's not enough for the display in the p4note. I asked Marek in IRC whether it's ok to have this in a separate patch set to have a fully working display and he agreed.

Quoted 6 lines

Yes, I agreed that the display can be added later in a separate patch. However in such case I would simply remove the whole fimd node now. Without a panel it is a bit useless imho. With a proper panel driver you will also get rid of the timings subnode, so there is no point adding it now.

Removing the fimd node (or the display timings) would break the DRM and display output though. The display is working but missing proper GPIO handling and the possibility to adjust brightness right now. As it is connected to the LCD power domain, it's still turning on and off as expected as it is setup by the bootloader. I know this isn't a great solution, but I'm already working on the LCD driver. Not sure when it will be done though.

The display timings are read in exynos_drm_dpi.c in the exynos_dpi_probe method. As far as I understand, you can either provide the timings in the fimd node itself or in a connected panel.

If this is not intended, I can of course remove the configuration.

Quoted 6 lines

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland

Cheers
Martin

#10 lore raw

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

Quoted 45 lines · Martin Juecker
Quoted 30 lines · Marek Szyprowski

Hi Martin,

Quoted 23 lines · Martin Juecker
Quoted 14 lines

...

Quoted 13 lines
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +13 -0
+
+&fimd {
+	pinctrl-0 = <&lcd_clk &lcd_data24 &pwm1_out>;
+	pinctrl-names = "default";
+	status = "okay";
+
+	display-timings {
+		timing0 {
+			clock-frequency = <66666666>;
+			hactive = <1280>;
+			vactive = <800>;
+			hfront-porch = <18>;
+			hback-porch = <36>;
Quoted 9 lines

arch/arm/boot/dts/exynos4412-p4note.dtsi line 277

Quoted 7 lines
arch/arm/boot/dts/exynos4412-p4note.dtsi new file +7 -0
+			hsync-len = <16>;
+			vback-porch = <16>;
+			vfront-porch = <4>;
+			vsync-len = <3>;
+			hsync-active = <1>;
+		};
+	};

What happened with Marek's comment about this?

Quoted 4 lines

Should have mentioned it in the introduction mail. I had a look at the simple panel driver and it's not enough for the display in the p4note. I asked Marek in IRC whether it's ok to have this in a separate patch set to have a fully working display and he agreed.

Quoted 6 lines

Yes, I agreed that the display can be added later in a separate patch. However in such case I would simply remove the whole fimd node now. Without a panel it is a bit useless imho. With a proper panel driver you will also get rid of the timings subnode, so there is no point adding it now.

Removing the fimd node (or the display timings) would break the DRM and display output though. The display is working but missing proper GPIO handling and the possibility to adjust brightness right now. As it is connected to the LCD power domain, it's still turning on and off as expected as it is setup by the bootloader. I know this isn't a great solution, but I'm already working on the LCD driver. Not sure when it will be done though.

Quoted 5 lines

The display timings are read in exynos_drm_dpi.c in the exynos_dpi_probe method. As far as I understand, you can either provide the timings in the fimd node itself or in a connected panel.

If this is not intended, I can of course remove the configuration.

If it works already then imho we can keep it for now and then adjust later when the proper panel driver is ready.

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
#11 lore raw

PATCH v2 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 6e8b5ff0859c..c9581e603a32 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 e9e76e32f10f..b3a03e530b57 100644
@@ -554,6 +554,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
@@ -1020,6 +1021,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
#12 lore raw

PATCH v2 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 c9581e603a32..bad4f3d306ba 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
#13 lore raw

PATCH v2 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 36c37444485a..093c7a99b8aa 100644
@@ -164,7 +164,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