* [PATCH 0/5] add exynos4412-based p4note device family support @ 2020-10-24 14:44 Martin Jücker 2020-10-24 14:44 ` [PATCH 1/5] dt-bindings: samsung: document bindings for p4note family boards Martin Jücker ` (4 more replies) 0 siblings, 5 replies; 15+ messages in thread From: Martin Jücker @ 2020-10-24 14:44 UTC (permalink / raw) To: linux-samsung-soc; +Cc: kgene, krzk, devicetree, martin.juecker 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. Cheers Martin ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/5] dt-bindings: samsung: document bindings for p4note family boards 2020-10-24 14:44 [PATCH 0/5] add exynos4412-based p4note device family support Martin Jücker @ 2020-10-24 14:44 ` Martin Jücker 2020-10-30 18:28 ` Rob Herring 2020-10-24 14:44 ` [PATCH 2/5] ARM: dts: add Samsung's exynos4412-based p4note boards Martin Jücker ` (3 subsequent siblings) 4 siblings, 1 reply; 15+ messages in thread From: Martin Jücker @ 2020-10-24 14:44 UTC (permalink / raw) To: linux-samsung-soc; +Cc: kgene, krzk, devicetree, martin.juecker Document the GT-N8010/GT-N8013 device binding and the p4note common binding that it is based on. Signed-off-by: Martin Jücker <martin.juecker@gmail.com> --- .../devicetree/bindings/arm/samsung/samsung-boards.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml b/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml index eb92f9eefaba..c604d1fa1335 100644 --- a/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml +++ b/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml @@ -83,6 +83,14 @@ properties: - const: samsung,exynos4412 - const: samsung,exynos4 + - description: Samsung p4note family boards + items: + - enum: + - samsung,n801x # Samsung GT-N8010/GT-N8013 + - const: samsung,p4note + - const: samsung,exynos4412 + - const: samsung,exynos4 + - description: Exynos5250 based boards items: - enum: -- 2.25.1 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 1/5] dt-bindings: samsung: document bindings for p4note family boards 2020-10-24 14:44 ` [PATCH 1/5] dt-bindings: samsung: document bindings for p4note family boards Martin Jücker @ 2020-10-30 18:28 ` Rob Herring 0 siblings, 0 replies; 15+ messages in thread From: Rob Herring @ 2020-10-30 18:28 UTC (permalink / raw) To: Martin Jücker; +Cc: krzk, linux-samsung-soc, devicetree, kgene On Sat, 24 Oct 2020 16:44:17 +0200, Martin Jücker wrote: > Document the GT-N8010/GT-N8013 device binding and the p4note common > binding that it is based on. > > Signed-off-by: Martin Jücker <martin.juecker@gmail.com> > --- > .../devicetree/bindings/arm/samsung/samsung-boards.yaml | 8 ++++++++ > 1 file changed, 8 insertions(+) > Reviewed-by: Rob Herring <robh@kernel.org> ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 2/5] ARM: dts: add Samsung's exynos4412-based p4note boards 2020-10-24 14:44 [PATCH 0/5] add exynos4412-based p4note device family support Martin Jücker 2020-10-24 14:44 ` [PATCH 1/5] dt-bindings: samsung: document bindings for p4note family boards Martin Jücker @ 2020-10-24 14:44 ` Martin Jücker 2020-10-26 11:55 ` Marek Szyprowski 2020-10-26 14:48 ` Krzysztof Kozlowski 2020-10-24 14:44 ` [PATCH 3/5] ARM: defconfig: add stmpe adc driver for p4note Martin Jücker ` (2 subsequent siblings) 4 siblings, 2 replies; 15+ messages in thread From: Martin Jücker @ 2020-10-24 14:44 UTC (permalink / raw) To: linux-samsung-soc; +Cc: kgene, krzk, devicetree, martin.juecker 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. Signed-off-by: Martin Jücker <martin.juecker@gmail.com> --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/exynos4412-p4note-n801x.dts | 16 + arch/arm/boot/dts/exynos4412-p4note.dtsi | 1057 +++++++++++++++++ 3 files changed, 1074 insertions(+) create mode 100644 arch/arm/boot/dts/exynos4412-p4note-n801x.dts create mode 100644 arch/arm/boot/dts/exynos4412-p4note.dtsi diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 4572db3fa5ae..b6d72bd7ebac 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -195,6 +195,7 @@ dtb-$(CONFIG_ARCH_EXYNOS4) += \ exynos4412-odroidx.dtb \ exynos4412-odroidx2.dtb \ exynos4412-origen.dtb \ + exynos4412-p4note-n801x.dtb \ exynos4412-smdk4412.dtb \ exynos4412-tiny4412.dtb \ exynos4412-trats2.dtb diff --git a/arch/arm/boot/dts/exynos4412-p4note-n801x.dts b/arch/arm/boot/dts/exynos4412-p4note-n801x.dts new file mode 100644 index 000000000000..e7fb5b96e6c6 --- /dev/null +++ b/arch/arm/boot/dts/exynos4412-p4note-n801x.dts @@ -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 <martin.juecker@gmail.com> + */ + +/dts-v1/; +#include "exynos4412-p4note.dtsi" + +/ { + model = "Samsung Galaxy Note 10.1 (GT-N8010/N8013) based on Exynos4412"; + compatible = "samsung,n801x", "samsung,p4note", "samsung,exynos4412", "samsung,exynos4"; + + /* this is the base variant without any kind of modem */ +}; diff --git a/arch/arm/boot/dts/exynos4412-p4note.dtsi b/arch/arm/boot/dts/exynos4412-p4note.dtsi new file mode 100644 index 000000000000..6d7e84f40e92 --- /dev/null +++ b/arch/arm/boot/dts/exynos4412-p4note.dtsi @@ -0,0 +1,1057 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Samsung's Exynos4412 based p4note device family base DT + * + * Copyright (c) 2020 Martin Jücker <martin.juecker@gmail.com> + */ + +/dts-v1/; +#include "exynos4412.dtsi" +#include "exynos4412-ppmu-common.dtsi" + +#include <dt-bindings/input/input.h> +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/gpio-keys.h> +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/clock/maxim,max77686.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>; + linux,can-disable; + wakeup-source; + }; + }; + + tsp_reg_1: voltage-regulator-1 { + compatible = "regulator-fixed"; + regulator-name = "TSP_FIXED_VOLTAGES_1"; + pinctrl-names = "default"; + pinctrl-0 = <&tsp_reg_gpio_1>; + gpios = <&gpm4 5 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-always-on; + }; + + tsp_reg_2: voltage-regulator-2 { + compatible = "regulator-fixed"; + regulator-name = "TSP_FIXED_VOLTAGES_2"; + pinctrl-names = "default"; + pinctrl-0 = <&tsp_reg_gpio_2>; + gpios = <&gpb 5 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-always-on; + }; + + tsp_reg_3: voltage-regulator-3 { + compatible = "regulator-fixed"; + regulator-name = "TSP_FIXED_VOLTAGES_3"; + 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-10 { + 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>; + + ak8975@c { + compatible = "asahi-kasei,ak8975"; + reg = <0x0c>; + interrupt-parent = <&gpm4>; + interrupts = <7 IRQ_TYPE_EDGE_RISING>; + pinctrl-names = "default"; + pinctrl-0 = <&ak8975_irq>; + }; + }; + + i2c-gpio-14 { + 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>; + + max17042@36 { + compatible = "maxim,max17042"; + reg = <0x36>; + interrupt-parent = <&gpx2>; + interrupts = <3 IRQ_TYPE_EDGE_FALLING>; + maxim,rsns-microohm = <10000>; + maxim,over-heat-temp = <600>; + maxim,over-volt = <4300>; + }; + }; + + i2c-gpio-19 { + 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>; + + stmpe_mfd@41 { + compatible = "st,stmpe811"; + reg = <0x41>; + 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: stmpe_adc { + compatible = "st,stmpe-adc"; + #io-channel-cells = <1>; + st,norequest-mask = <0x2F>; + }; + }; + }; +}; + +&adc { + 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 */ + 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>; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&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>; + vback-porch = <16>; + vfront-porch = <4>; + vsync-len = <3>; + hsync-active = <1>; + }; + }; +}; + +&gpu { + mali-supply = <&buck4_reg>; + status = "okay"; +}; + +&hsotg { + vusb_a-supply = <&ldo12_reg>; + dr_mode = "peripheral"; + status = "okay"; +}; + +&i2c_3 { + samsung,i2c-sda-delay = <100>; + samsung,i2c-slave-addr = <0x10>; + samsung,i2c-max-bus-freq = <400000>; + pinctrl-0 = <&i2c3_bus>; + pinctrl-names = "default"; + status = "okay"; + + touchscreen@4a { + compatible = "atmel,maxtouch"; + reg = <0x4a>; + reset-gpios = <&gpm0 4 GPIO_ACTIVE_HIGH>; + interrupt-parent = <&gpm2>; + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; + pinctrl-0 = <&tsp_rst &tsp_irq>; + pinctrl-names = "default"; + }; +}; + +&i2c_7 { + samsung,i2c-sda-delay = <100>; + samsung,i2c-slave-addr = <0x10>; + samsung,i2c-max-bus-freq = <400000>; + pinctrl-0 = <&i2c7_bus>; + pinctrl-names = "default"; + status = "okay"; + + max77686: max77686_pmic@9 { + compatible = "maxim,max77686"; + interrupt-parent = <&gpx0>; + interrupts = <7 IRQ_TYPE_NONE>; + pinctrl-0 = <&max77686_irq>; + pinctrl-names = "default"; + reg = <0x09>; + #clock-cells = <1>; + + voltage-regulators { + + /* WM8994 audio */ + ldo3_reg: LDO3 { + regulator-name = "VCC_1.8V_AP"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + /* Unknown */ + ldo5_reg: LDO5 { + regulator-name = "VCC_1.8V_IO"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + /* CSI IP block */ + ldo8_reg: LDO8 { + regulator-name = "VMIPI_1.0V"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + /* IR LED on/off */ + ldo9_reg: LDO9 { + regulator-name = "VLED_IC_1.9V"; + regulator-min-microvolt = <1950000>; + regulator-max-microvolt = <1950000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + /* CSI IP block */ + ldo10_reg: LDO10 { + regulator-name = "VMIPI_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + /* Unknown */ + ldo11_reg: LDO11 { + regulator-name = "VABB1_1.9V"; + regulator-min-microvolt = <1950000>; + regulator-max-microvolt = <1950000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + /* USB OTG */ + ldo12_reg: LDO12 { + regulator-name = "VUOTG_3.0V"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + /* Unknown */ + ldo14_reg: LDO14 { + regulator-name = "VABB2_1.9V"; + regulator-min-microvolt = <1950000>; + regulator-max-microvolt = <1950000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + /* Camera ISX012 */ + ldo18_reg: LDO18 { + regulator-name = "CAM_IO_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + /* Camera S5K6A3 */ + ldo19_reg: LDO19 { + regulator-name = "VT_CORE_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + /* MMC2 */ + ldo21_reg: LDO21 { + regulator-name = "VTF_2.8V"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + maxim,ena-gpios = <&gpy2 0 GPIO_ACTIVE_HIGH>; + }; + + /* ADC */ + ldo23_reg: LDO23 { + regulator-name = "VDD_ADC_3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + /* Camera S5K6A3 */ + ldo24_reg: LDO24 { + regulator-name = "CAM_A2.8V"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + /* IR LED sending */ + ldo25_reg: LDO25 { + regulator-name = "VLED_3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + /* Camera ISX012 */ + ldo26_reg: LDO26 { + regulator-name = "3MP_AF_2.8V"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + buck1_reg: BUCK1 { + regulator-name = "VDD_MIF"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1050000>; + regulator-always-on; + regulator-boot-on; + }; + + buck2_reg: BUCK2 { + regulator-name = "VDD_ARM"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1500000>; + regulator-always-on; + regulator-boot-on; + }; + + buck3_reg: BUCK3 { + regulator-name = "VDD_INT"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1100000>; + regulator-always-on; + regulator-boot-on; + }; + + buck4_reg: BUCK4 { + regulator-name = "VDD_G3D"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1075000>; + regulator-boot-on; + }; + + buck9_reg: BUCK9 { + regulator-name = "3MP_CORE_1.2V"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + }; + }; +}; + +&mshc_0 { + broken-cd; + non-removable; + card-detect-delay = <200>; + clock-frequency = <400000000>; + samsung,dw-mshc-ciu-div = <0>; + samsung,dw-mshc-sdr-timing = <2 3>; + samsung,dw-mshc-ddr-timing = <1 2>; + pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>; + pinctrl-names = "default"; + bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + status = "okay"; +}; + +&pinctrl_0 { + pinctrl-names = "default"; + pinctrl-0 = <&sleep0>; + + tsp_reg_gpio_2: tsp-reg-gpio-2 { + samsung,pins = "gpb-5"; + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + }; + + tsp_reg_gpio_3: tsp-reg-gpio-3 { + samsung,pins = "gpb-7"; + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + }; + + sleep0: sleep-states { + PIN_SLP(gpa0-0, INPUT, NONE); + PIN_SLP(gpa0-1, OUT0, NONE); + PIN_SLP(gpa0-2, INPUT, NONE); + PIN_SLP(gpa0-3, INPUT, UP); + PIN_SLP(gpa0-4, INPUT, NONE); + PIN_SLP(gpa0-5, INPUT, DOWN); + PIN_SLP(gpa0-6, INPUT, DOWN); + PIN_SLP(gpa0-7, INPUT, UP); + + PIN_SLP(gpa1-0, INPUT, DOWN); + PIN_SLP(gpa1-1, INPUT, DOWN); + PIN_SLP(gpa1-2, INPUT, DOWN); + PIN_SLP(gpa1-3, INPUT, DOWN); + PIN_SLP(gpa1-4, INPUT, DOWN); + PIN_SLP(gpa1-5, INPUT, DOWN); + + PIN_SLP(gpb-0, INPUT, NONE); + PIN_SLP(gpb-1, INPUT, NONE); + PIN_SLP(gpb-2, INPUT, NONE); + PIN_SLP(gpb-3, INPUT, NONE); + PIN_SLP(gpb-4, INPUT, DOWN); + PIN_SLP(gpb-5, INPUT, DOWN); + PIN_SLP(gpb-6, INPUT, DOWN); + PIN_SLP(gpb-7, INPUT, DOWN); + + PIN_SLP(gpc0-0, INPUT, DOWN); + PIN_SLP(gpc0-1, INPUT, DOWN); + PIN_SLP(gpc0-2, INPUT, DOWN); + PIN_SLP(gpc0-3, INPUT, DOWN); + PIN_SLP(gpc0-4, INPUT, DOWN); + + PIN_SLP(gpc1-0, INPUT, UP); + PIN_SLP(gpc1-1, PREV, NONE); + PIN_SLP(gpc1-2, INPUT, UP); + PIN_SLP(gpc1-3, INPUT, UP); + PIN_SLP(gpc1-4, INPUT, UP); + + PIN_SLP(gpd0-0, INPUT, DOWN); + PIN_SLP(gpd0-1, OUT0, NONE); + PIN_SLP(gpd0-2, INPUT, NONE); + PIN_SLP(gpd0-3, INPUT, NONE); + + PIN_SLP(gpd1-0, INPUT, DOWN); + PIN_SLP(gpd1-1, INPUT, DOWN); + PIN_SLP(gpd1-2, INPUT, NONE); + PIN_SLP(gpd1-3, INPUT, NONE); + + PIN_SLP(gpf0-0, OUT0, NONE); + PIN_SLP(gpf0-1, OUT0, NONE); + PIN_SLP(gpf0-2, OUT0, NONE); + PIN_SLP(gpf0-3, OUT0, NONE); + PIN_SLP(gpf0-4, OUT0, NONE); + PIN_SLP(gpf0-5, OUT0, NONE); + PIN_SLP(gpf0-6, OUT0, NONE); + PIN_SLP(gpf0-7, OUT0, NONE); + + PIN_SLP(gpf1-0, OUT0, NONE); + PIN_SLP(gpf1-1, OUT0, NONE); + PIN_SLP(gpf1-2, OUT0, NONE); + PIN_SLP(gpf1-3, OUT0, NONE); + PIN_SLP(gpf1-4, OUT0, NONE); + PIN_SLP(gpf1-5, OUT0, NONE); + PIN_SLP(gpf1-6, OUT0, NONE); + PIN_SLP(gpf1-7, OUT0, NONE); + + PIN_SLP(gpf2-0, OUT0, NONE); + PIN_SLP(gpf2-1, OUT0, NONE); + PIN_SLP(gpf2-2, OUT0, NONE); + PIN_SLP(gpf2-3, OUT0, NONE); + PIN_SLP(gpf2-4, OUT0, NONE); + PIN_SLP(gpf2-5, OUT0, NONE); + PIN_SLP(gpf2-6, OUT0, NONE); + PIN_SLP(gpf2-7, OUT0, NONE); + + PIN_SLP(gpf3-0, OUT0, NONE); + PIN_SLP(gpf3-1, OUT0, NONE); + PIN_SLP(gpf3-2, OUT0, NONE); + PIN_SLP(gpf3-3, OUT0, NONE); + PIN_SLP(gpf3-4, OUT0, NONE); + PIN_SLP(gpf3-5, OUT0, NONE); + + PIN_SLP(gpj0-0, INPUT, DOWN); + PIN_SLP(gpj0-1, INPUT, DOWN); + PIN_SLP(gpj0-2, INPUT, DOWN); + PIN_SLP(gpj0-3, PREV, NONE); + PIN_SLP(gpj0-4, PREV, NONE); + PIN_SLP(gpj0-5, OUT0, NONE); + PIN_SLP(gpj0-6, OUT0, NONE); + PIN_SLP(gpj0-7, OUT0, NONE); + + PIN_SLP(gpj1-0, OUT0, NONE); + PIN_SLP(gpj1-1, INPUT, DOWN); + PIN_SLP(gpj1-2, PREV, NONE); + PIN_SLP(gpj1-3, OUT0, NONE); + }; +}; + +&pinctrl_1 { + pinctrl-names = "default"; + pinctrl-0 = <&sleep1>; + + uart_sel: uart-sel { + samsung,pins = "gpl2-7"; + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + samsung,pin-val = <1>; + /* 0 = CP, 1 = AP (serial output) */ + }; + + gpio_keys: gpio-keys { + samsung,pins = "gpx2-2", "gpx2-7", "gpx3-3"; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + }; + + wifi_host_wake: wifi-host-wake { + samsung,pins = "gpx2-5"; + samsung,pin-function = <EXYNOS_PIN_FUNC_F>; + samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>; + }; + + bt_shutdown: bt-shutdown { + samsung,pins = "gpl0-6"; + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; + samsung,pin-val = <1>; + }; + + bt_device_wakeup: bt-device-wakeup { + samsung,pins = "gpx3-1"; + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + }; + + bt_host_wakeup: bt-host-wakeup { + samsung,pins = "gpx2-6"; + samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; + }; + + max77686_irq: max77686-irq { + samsung,pins = "gpx0-7"; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + }; + + sdhci2_cd_irq: sdhci2-cd-irq { + samsung,pins = "gpx3-4"; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + }; + + tsp_rst: tsp-rst { + samsung,pins = "gpm0-4"; + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + samsung,pin-val = <1>; + }; + + tsp_reg_gpio_1: tsp-reg-gpio-1 { + samsung,pins = "gpm4-5"; + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + }; + + tsp_irq: tsp-irq { + samsung,pins = "gpm2-3"; + samsung,pin-function = <EXYNOS_PIN_FUNC_F>; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + }; + + wifi_reset: wifi-reset { + samsung,pins = "gpm3-5"; + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + }; + + sd3_wifi: sd3-wifi { + samsung,pins = "gpk3-3", "gpk3-4", "gpk3-5", "gpk3-6"; + samsung,pin-function = <EXYNOS_PIN_FUNC_2>; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + }; + + ak8975_irq: ak8975-irq { + samsung,pins = "gpm4-7"; + samsung,pin-function = <EXYNOS_PIN_FUNC_F>; + samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>; + }; + + sleep1: sleep-states { + PIN_SLP(gpk0-0, PREV, NONE); + PIN_SLP(gpk0-1, PREV, NONE); + PIN_SLP(gpk0-2, PREV, NONE); + PIN_SLP(gpk0-3, PREV, NONE); + PIN_SLP(gpk0-4, PREV, NONE); + PIN_SLP(gpk0-5, PREV, NONE); + PIN_SLP(gpk0-6, PREV, NONE); + + PIN_SLP(gpk1-0, INPUT, DOWN); + PIN_SLP(gpk1-1, INPUT, DOWN); + PIN_SLP(gpk1-2, INPUT, DOWN); + PIN_SLP(gpk1-3, PREV, NONE); + PIN_SLP(gpk1-4, PREV, NONE); + PIN_SLP(gpk1-5, PREV, NONE); + PIN_SLP(gpk1-6, PREV, NONE); + + PIN_SLP(gpk2-0, INPUT, DOWN); + PIN_SLP(gpk2-1, INPUT, DOWN); + PIN_SLP(gpk2-2, INPUT, DOWN); + PIN_SLP(gpk2-3, INPUT, DOWN); + PIN_SLP(gpk2-4, INPUT, DOWN); + PIN_SLP(gpk2-5, INPUT, DOWN); + PIN_SLP(gpk2-6, INPUT, DOWN); + + PIN_SLP(gpk3-0, OUT0, NONE); + PIN_SLP(gpk3-1, INPUT, NONE); + PIN_SLP(gpk3-2, INPUT, DOWN); + PIN_SLP(gpk3-3, INPUT, NONE); + PIN_SLP(gpk3-4, INPUT, NONE); + PIN_SLP(gpk3-5, INPUT, NONE); + PIN_SLP(gpk3-6, INPUT, NONE); + + PIN_SLP(gpl0-0, OUT0, NONE); + PIN_SLP(gpl0-1, INPUT, NONE); + PIN_SLP(gpl0-2, INPUT, NONE); + PIN_SLP(gpl0-3, INPUT, DOWN); + PIN_SLP(gpl0-4, PREV, NONE); + PIN_SLP(gpl0-6, PREV, NONE); + + PIN_SLP(gpl1-0, OUT0, NONE); + PIN_SLP(gpl1-1, OUT0, NONE); + + PIN_SLP(gpl2-0, INPUT, DOWN); + PIN_SLP(gpl2-1, INPUT, DOWN); + PIN_SLP(gpl2-2, INPUT, DOWN); + PIN_SLP(gpl2-3, INPUT, DOWN); + PIN_SLP(gpl2-4, OUT0, NONE); + PIN_SLP(gpl2-5, INPUT, DOWN); + PIN_SLP(gpl2-6, PREV, NONE); + PIN_SLP(gpl2-7, PREV, NONE); + + PIN_SLP(gpm0-0, PREV, NONE); + PIN_SLP(gpm0-1, OUT0, NONE); + PIN_SLP(gpm0-2, INPUT, DOWN); + PIN_SLP(gpm0-3, INPUT, NONE); + PIN_SLP(gpm0-4, OUT0, NONE); + PIN_SLP(gpm0-5, OUT0, NONE); + PIN_SLP(gpm0-6, INPUT, DOWN); + PIN_SLP(gpm0-7, OUT0, NONE); + + PIN_SLP(gpm1-0, INPUT, NONE); + PIN_SLP(gpm1-1, INPUT, NONE); + PIN_SLP(gpm1-2, INPUT, NONE); + PIN_SLP(gpm1-3, INPUT, NONE); + PIN_SLP(gpm1-4, INPUT, NONE); + PIN_SLP(gpm1-5, INPUT, NONE); + PIN_SLP(gpm1-6, INPUT, DOWN); + + PIN_SLP(gpm2-0, INPUT, NONE); + PIN_SLP(gpm2-1, INPUT, NONE); + PIN_SLP(gpm2-2, OUT0, NONE); + PIN_SLP(gpm2-3, OUT0, DOWN); + PIN_SLP(gpm2-4, INPUT, DOWN); + + PIN_SLP(gpm3-0, PREV, NONE); + PIN_SLP(gpm3-1, PREV, NONE); + PIN_SLP(gpm3-2, PREV, NONE); + PIN_SLP(gpm3-3, OUT1, NONE); + PIN_SLP(gpm3-4, OUT0, DOWN); + PIN_SLP(gpm3-5, PREV, NONE); + PIN_SLP(gpm3-6, PREV, NONE); + PIN_SLP(gpm3-7, OUT0, NONE); + + PIN_SLP(gpm4-0, INPUT, NONE); + PIN_SLP(gpm4-1, INPUT, NONE); + PIN_SLP(gpm4-2, INPUT, DOWN); + PIN_SLP(gpm4-3, INPUT, DOWN); + PIN_SLP(gpm4-4, PREV, NONE); + PIN_SLP(gpm4-5, OUT0, NONE); + PIN_SLP(gpm4-6, OUT0, NONE); + PIN_SLP(gpm4-7, INPUT, DOWN); + + PIN_SLP(gpy0-0, INPUT, DOWN); + PIN_SLP(gpy0-1, INPUT, DOWN); + PIN_SLP(gpy0-2, INPUT, NONE); + PIN_SLP(gpy0-3, INPUT, NONE); + PIN_SLP(gpy0-4, INPUT, NONE); + PIN_SLP(gpy0-5, INPUT, NONE); + + PIN_SLP(gpy1-0, INPUT, DOWN); + PIN_SLP(gpy1-1, INPUT, DOWN); + PIN_SLP(gpy1-2, INPUT, DOWN); + PIN_SLP(gpy1-3, INPUT, DOWN); + + PIN_SLP(gpy2-0, PREV, NONE); + PIN_SLP(gpy2-1, INPUT, DOWN); + PIN_SLP(gpy2-2, INPUT, NONE); + PIN_SLP(gpy2-3, INPUT, NONE); + PIN_SLP(gpy2-4, INPUT, NONE); + PIN_SLP(gpy2-5, INPUT, NONE); + + PIN_SLP(gpy3-0, INPUT, DOWN); + PIN_SLP(gpy3-1, INPUT, DOWN); + PIN_SLP(gpy3-2, INPUT, DOWN); + PIN_SLP(gpy3-3, INPUT, DOWN); + PIN_SLP(gpy3-4, INPUT, DOWN); + PIN_SLP(gpy3-5, INPUT, DOWN); + PIN_SLP(gpy3-6, INPUT, DOWN); + PIN_SLP(gpy3-7, INPUT, DOWN); + + PIN_SLP(gpy4-0, INPUT, DOWN); + PIN_SLP(gpy4-1, INPUT, DOWN); + PIN_SLP(gpy4-2, INPUT, DOWN); + PIN_SLP(gpy4-3, INPUT, DOWN); + PIN_SLP(gpy4-4, INPUT, DOWN); + PIN_SLP(gpy4-5, INPUT, DOWN); + PIN_SLP(gpy4-6, INPUT, DOWN); + PIN_SLP(gpy4-7, INPUT, DOWN); + + PIN_SLP(gpy5-0, INPUT, DOWN); + PIN_SLP(gpy5-1, INPUT, DOWN); + PIN_SLP(gpy5-2, INPUT, DOWN); + PIN_SLP(gpy5-3, INPUT, DOWN); + PIN_SLP(gpy5-4, INPUT, DOWN); + PIN_SLP(gpy5-5, INPUT, DOWN); + PIN_SLP(gpy5-6, INPUT, DOWN); + PIN_SLP(gpy5-7, INPUT, DOWN); + + PIN_SLP(gpy6-0, INPUT, DOWN); + PIN_SLP(gpy6-1, INPUT, DOWN); + PIN_SLP(gpy6-2, INPUT, DOWN); + PIN_SLP(gpy6-3, INPUT, DOWN); + PIN_SLP(gpy6-4, INPUT, DOWN); + PIN_SLP(gpy6-5, INPUT, DOWN); + PIN_SLP(gpy6-6, INPUT, DOWN); + PIN_SLP(gpy6-7, INPUT, DOWN); + }; +}; + +&pinctrl_2 { + pinctrl-names = "default"; + pinctrl-0 = <&sleep2>; + + sleep2: sleep-states { + PIN_SLP(gpz-0, INPUT, DOWN); + PIN_SLP(gpz-1, INPUT, DOWN); + PIN_SLP(gpz-2, INPUT, DOWN); + PIN_SLP(gpz-3, INPUT, DOWN); + PIN_SLP(gpz-4, INPUT, DOWN); + PIN_SLP(gpz-5, INPUT, DOWN); + PIN_SLP(gpz-6, INPUT, DOWN); + }; +}; + +&pinctrl_3 { + pinctrl-names = "default"; + pinctrl-0 = <&sleep3>; + + sleep3: sleep-states { + PIN_SLP(gpv0-0, INPUT, DOWN); + PIN_SLP(gpv0-1, INPUT, DOWN); + PIN_SLP(gpv0-2, INPUT, DOWN); + PIN_SLP(gpv0-3, INPUT, DOWN); + PIN_SLP(gpv0-4, INPUT, DOWN); + PIN_SLP(gpv0-5, INPUT, DOWN); + PIN_SLP(gpv0-6, INPUT, DOWN); + PIN_SLP(gpv0-7, INPUT, DOWN); + + PIN_SLP(gpv1-0, INPUT, DOWN); + PIN_SLP(gpv1-1, INPUT, DOWN); + PIN_SLP(gpv1-2, INPUT, DOWN); + PIN_SLP(gpv1-3, INPUT, DOWN); + PIN_SLP(gpv1-4, INPUT, DOWN); + PIN_SLP(gpv1-5, INPUT, DOWN); + PIN_SLP(gpv1-6, INPUT, DOWN); + PIN_SLP(gpv1-7, INPUT, DOWN); + + PIN_SLP(gpv2-0, INPUT, DOWN); + PIN_SLP(gpv2-1, INPUT, DOWN); + PIN_SLP(gpv2-2, INPUT, DOWN); + PIN_SLP(gpv2-3, INPUT, DOWN); + PIN_SLP(gpv2-4, INPUT, DOWN); + PIN_SLP(gpv2-5, INPUT, DOWN); + PIN_SLP(gpv2-6, INPUT, DOWN); + PIN_SLP(gpv2-7, INPUT, DOWN); + + PIN_SLP(gpv3-0, INPUT, DOWN); + PIN_SLP(gpv3-1, INPUT, DOWN); + PIN_SLP(gpv3-2, INPUT, DOWN); + PIN_SLP(gpv3-3, INPUT, DOWN); + PIN_SLP(gpv3-4, INPUT, DOWN); + PIN_SLP(gpv3-5, INPUT, DOWN); + PIN_SLP(gpv3-6, INPUT, DOWN); + PIN_SLP(gpv3-7, INPUT, DOWN); + + PIN_SLP(gpv4-0, INPUT, DOWN); + PIN_SLP(gpv4-1, INPUT, DOWN); + }; +}; + +&pmu_system_controller { + assigned-clocks = <&pmu_system_controller 0>; + assigned-clock-parents = <&clock CLK_XUSBXTI>; +}; + +&rtc { + clocks = <&clock CLK_RTC>, <&max77686 MAX77686_CLK_AP>; + clock-names = "rtc", "rtc_src"; + status = "okay"; +}; + +&sdhci_2 { + bus-width = <4>; + cd-gpios = <&gpx3 4 GPIO_ACTIVE_LOW>; + pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4 &sdhci2_cd_irq>; + pinctrl-names = "default"; + vmmc-supply = <&ldo21_reg>; + status = "okay"; +}; + +&sdhci_3 { + #address-cells = <1>; + #size-cells = <0>; + non-removable; + bus-width = <4>; + mmc-pwrseq = <&wlan_pwrseq>; + + pinctrl-names = "default"; + pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_wifi &wifi_host_wake>; + status = "okay"; + + brcmf: wifi@1 { + reg = <0x1>; + compatible = "brcm,bcm4329-fmac"; + interrupt-parent = <&gpx2>; + interrupts = <5 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "host-wake"; + }; +}; + +&serial_0 { + pinctrl-0 = <&uart0_data &uart0_fctl>; + pinctrl-names = "default"; + status = "okay"; + + bluetooth { + compatible = "brcm,bcm4330-bt"; + pinctrl-0 = <&bt_shutdown &bt_device_wakeup &bt_host_wakeup>; + pinctrl-names = "default"; + + max-speed = <2000000>; + shutdown-gpios = <&gpl0 6 GPIO_ACTIVE_HIGH>; + device-wakeup-gpios = <&gpx3 1 GPIO_ACTIVE_HIGH>; + host-wakeup-gpios = <&gpx2 6 GPIO_ACTIVE_HIGH>; + clocks = <&max77686 MAX77686_CLK_PMIC>; + clock-names = "lpo"; + }; +}; + +&serial_1 { + status = "okay"; +}; + +&serial_2 { + pinctrl-0 = <&uart_sel>; + pinctrl-names = "default"; + status = "okay"; +}; + +&serial_3 { + status = "okay"; +}; + +&tmu { + status = "okay"; +}; -- 2.25.1 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 2/5] ARM: dts: add Samsung's exynos4412-based p4note boards 2020-10-24 14:44 ` [PATCH 2/5] ARM: dts: add Samsung's exynos4412-based p4note boards Martin Jücker @ 2020-10-26 11:55 ` Marek Szyprowski 2020-10-26 14:48 ` Krzysztof Kozlowski 1 sibling, 0 replies; 15+ messages in thread From: Marek Szyprowski @ 2020-10-26 11:55 UTC (permalink / raw) To: Martin Jücker, linux-samsung-soc; +Cc: kgene, krzk, devicetree Hi Martin, On 24.10.2020 16:44, Martin Jücker wrote: > 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. > > Signed-off-by: Martin Jücker <martin.juecker@gmail.com> > --- > arch/arm/boot/dts/Makefile | 1 + > arch/arm/boot/dts/exynos4412-p4note-n801x.dts | 16 + > arch/arm/boot/dts/exynos4412-p4note.dtsi | 1057 +++++++++++++++++ > 3 files changed, 1074 insertions(+) > create mode 100644 arch/arm/boot/dts/exynos4412-p4note-n801x.dts > create mode 100644 arch/arm/boot/dts/exynos4412-p4note.dtsi > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > index 4572db3fa5ae..b6d72bd7ebac 100644 > --- a/arch/arm/boot/dts/Makefile > +++ b/arch/arm/boot/dts/Makefile > @@ -195,6 +195,7 @@ dtb-$(CONFIG_ARCH_EXYNOS4) += \ > exynos4412-odroidx.dtb \ > exynos4412-odroidx2.dtb \ > exynos4412-origen.dtb \ > + exynos4412-p4note-n801x.dtb \ > exynos4412-smdk4412.dtb \ > exynos4412-tiny4412.dtb \ > exynos4412-trats2.dtb > diff --git a/arch/arm/boot/dts/exynos4412-p4note-n801x.dts b/arch/arm/boot/dts/exynos4412-p4note-n801x.dts > new file mode 100644 > index 000000000000..e7fb5b96e6c6 > --- /dev/null > +++ b/arch/arm/boot/dts/exynos4412-p4note-n801x.dts > @@ -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 <martin.juecker@gmail.com> > + */ > + > +/dts-v1/; > +#include "exynos4412-p4note.dtsi" > + > +/ { > + model = "Samsung Galaxy Note 10.1 (GT-N8010/N8013) based on Exynos4412"; > + compatible = "samsung,n801x", "samsung,p4note", "samsung,exynos4412", "samsung,exynos4"; > + > + /* this is the base variant without any kind of modem */ > +}; > diff --git a/arch/arm/boot/dts/exynos4412-p4note.dtsi b/arch/arm/boot/dts/exynos4412-p4note.dtsi > new file mode 100644 > index 000000000000..6d7e84f40e92 > --- /dev/null > +++ b/arch/arm/boot/dts/exynos4412-p4note.dtsi > @@ -0,0 +1,1057 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Samsung's Exynos4412 based p4note device family base DT > + * > + * Copyright (c) 2020 Martin Jücker <martin.juecker@gmail.com> > + */ > + > +/dts-v1/; > +#include "exynos4412.dtsi" > +#include "exynos4412-ppmu-common.dtsi" > + > +#include <dt-bindings/input/input.h> > +#include <dt-bindings/gpio/gpio.h> > +#include <dt-bindings/input/gpio-keys.h> > +#include <dt-bindings/interrupt-controller/irq.h> > +#include <dt-bindings/clock/maxim,max77686.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>; > + linux,can-disable; > + wakeup-source; > + }; > + }; > + > + tsp_reg_1: voltage-regulator-1 { > + compatible = "regulator-fixed"; > + regulator-name = "TSP_FIXED_VOLTAGES_1"; > + pinctrl-names = "default"; > + pinctrl-0 = <&tsp_reg_gpio_1>; > + gpios = <&gpm4 5 GPIO_ACTIVE_HIGH>; > + enable-active-high; > + regulator-always-on; > + }; > + > + tsp_reg_2: voltage-regulator-2 { > + compatible = "regulator-fixed"; > + regulator-name = "TSP_FIXED_VOLTAGES_2"; > + pinctrl-names = "default"; > + pinctrl-0 = <&tsp_reg_gpio_2>; > + gpios = <&gpb 5 GPIO_ACTIVE_HIGH>; > + enable-active-high; > + regulator-always-on; > + }; > + > + tsp_reg_3: voltage-regulator-3 { > + compatible = "regulator-fixed"; > + regulator-name = "TSP_FIXED_VOLTAGES_3"; > + 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-10 { > + 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>; > + > + ak8975@c { > + compatible = "asahi-kasei,ak8975"; > + reg = <0x0c>; > + interrupt-parent = <&gpm4>; > + interrupts = <7 IRQ_TYPE_EDGE_RISING>; > + pinctrl-names = "default"; > + pinctrl-0 = <&ak8975_irq>; > + }; > + }; > + > + i2c-gpio-14 { > + 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>; > + > + max17042@36 { > + compatible = "maxim,max17042"; > + reg = <0x36>; > + interrupt-parent = <&gpx2>; > + interrupts = <3 IRQ_TYPE_EDGE_FALLING>; > + maxim,rsns-microohm = <10000>; > + maxim,over-heat-temp = <600>; > + maxim,over-volt = <4300>; > + }; > + }; > + > + i2c-gpio-19 { > + 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>; > + > + stmpe_mfd@41 { > + compatible = "st,stmpe811"; > + reg = <0x41>; > + 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: stmpe_adc { > + compatible = "st,stmpe-adc"; > + #io-channel-cells = <1>; > + st,norequest-mask = <0x2F>; > + }; > + }; > + }; > +}; > + > +&adc { > + 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 */ > + 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>; > + }; > + }; > +}; > + > +&ehci { > + status = "okay"; > +}; Which EHCI ports are used on this board? You probably need to limit PHYs only to the supported ports (see exynos4412-odroidu3.dts for the example). > + > +&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>; > + vback-porch = <16>; > + vfront-porch = <4>; > + vsync-len = <3>; > + hsync-active = <1>; > + }; > + }; IMHO using a proper panel binding and simple-panel driver is a more appropriate approach, see exynos4412-tiny4412.dts for the example. > +}; > + > +&gpu { > + mali-supply = <&buck4_reg>; > + status = "okay"; > +}; > + > +&hsotg { > + vusb_a-supply = <&ldo12_reg>; > + dr_mode = "peripheral"; > + status = "okay"; > +}; > + > +&i2c_3 { > + samsung,i2c-sda-delay = <100>; > + samsung,i2c-slave-addr = <0x10>; > + samsung,i2c-max-bus-freq = <400000>; > + pinctrl-0 = <&i2c3_bus>; > + pinctrl-names = "default"; > + status = "okay"; > + > + touchscreen@4a { > + compatible = "atmel,maxtouch"; > + reg = <0x4a>; > + reset-gpios = <&gpm0 4 GPIO_ACTIVE_HIGH>; > + interrupt-parent = <&gpm2>; > + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; > + pinctrl-0 = <&tsp_rst &tsp_irq>; > + pinctrl-names = "default"; > + }; > +}; > + > +&i2c_7 { > + samsung,i2c-sda-delay = <100>; > + samsung,i2c-slave-addr = <0x10>; > + samsung,i2c-max-bus-freq = <400000>; > + pinctrl-0 = <&i2c7_bus>; > + pinctrl-names = "default"; > + status = "okay"; > + > + max77686: max77686_pmic@9 { > + compatible = "maxim,max77686"; > + interrupt-parent = <&gpx0>; > + interrupts = <7 IRQ_TYPE_NONE>; > + pinctrl-0 = <&max77686_irq>; > + pinctrl-names = "default"; > + reg = <0x09>; > + #clock-cells = <1>; > + > + voltage-regulators { > + > + /* WM8994 audio */ > + ldo3_reg: LDO3 { > + regulator-name = "VCC_1.8V_AP"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-on-in-suspend; > + }; > + }; > + > + /* Unknown */ > + ldo5_reg: LDO5 { > + regulator-name = "VCC_1.8V_IO"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + /* CSI IP block */ > + ldo8_reg: LDO8 { > + regulator-name = "VMIPI_1.0V"; > + regulator-min-microvolt = <1000000>; > + regulator-max-microvolt = <1000000>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-on-in-suspend; > + }; > + }; > + > + /* IR LED on/off */ > + ldo9_reg: LDO9 { > + regulator-name = "VLED_IC_1.9V"; > + regulator-min-microvolt = <1950000>; > + regulator-max-microvolt = <1950000>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + /* CSI IP block */ > + ldo10_reg: LDO10 { > + regulator-name = "VMIPI_1.8V"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-on-in-suspend; > + }; > + }; > + > + /* Unknown */ > + ldo11_reg: LDO11 { > + regulator-name = "VABB1_1.9V"; > + regulator-min-microvolt = <1950000>; > + regulator-max-microvolt = <1950000>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + /* USB OTG */ > + ldo12_reg: LDO12 { > + regulator-name = "VUOTG_3.0V"; > + regulator-min-microvolt = <3000000>; > + regulator-max-microvolt = <3000000>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-on-in-suspend; > + }; > + }; > + > + /* Unknown */ > + ldo14_reg: LDO14 { > + regulator-name = "VABB2_1.9V"; > + regulator-min-microvolt = <1950000>; > + regulator-max-microvolt = <1950000>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + /* Camera ISX012 */ > + ldo18_reg: LDO18 { > + regulator-name = "CAM_IO_1.8V"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + /* Camera S5K6A3 */ > + ldo19_reg: LDO19 { > + regulator-name = "VT_CORE_1.8V"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + /* MMC2 */ > + ldo21_reg: LDO21 { > + regulator-name = "VTF_2.8V"; > + regulator-min-microvolt = <2800000>; > + regulator-max-microvolt = <2800000>; > + maxim,ena-gpios = <&gpy2 0 GPIO_ACTIVE_HIGH>; > + }; > + > + /* ADC */ > + ldo23_reg: LDO23 { > + regulator-name = "VDD_ADC_3.3V"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + /* Camera S5K6A3 */ > + ldo24_reg: LDO24 { > + regulator-name = "CAM_A2.8V"; > + regulator-min-microvolt = <2800000>; > + regulator-max-microvolt = <2800000>; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + /* IR LED sending */ > + ldo25_reg: LDO25 { > + regulator-name = "VLED_3.3V"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + /* Camera ISX012 */ > + ldo26_reg: LDO26 { > + regulator-name = "3MP_AF_2.8V"; > + regulator-min-microvolt = <2800000>; > + regulator-max-microvolt = <2800000>; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + buck1_reg: BUCK1 { > + regulator-name = "VDD_MIF"; > + regulator-min-microvolt = <850000>; > + regulator-max-microvolt = <1050000>; > + regulator-always-on; > + regulator-boot-on; > + }; > + > + buck2_reg: BUCK2 { > + regulator-name = "VDD_ARM"; > + regulator-min-microvolt = <850000>; > + regulator-max-microvolt = <1500000>; > + regulator-always-on; > + regulator-boot-on; > + }; > + > + buck3_reg: BUCK3 { > + regulator-name = "VDD_INT"; > + regulator-min-microvolt = <850000>; > + regulator-max-microvolt = <1100000>; > + regulator-always-on; > + regulator-boot-on; > + }; > + > + buck4_reg: BUCK4 { > + regulator-name = "VDD_G3D"; > + regulator-min-microvolt = <850000>; > + regulator-max-microvolt = <1075000>; > + regulator-boot-on; > + }; > + > + buck9_reg: BUCK9 { > + regulator-name = "3MP_CORE_1.2V"; > + regulator-min-microvolt = <1200000>; > + regulator-max-microvolt = <1200000>; > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + }; > + }; > +}; > + > +&mshc_0 { > + broken-cd; > + non-removable; > + card-detect-delay = <200>; > + clock-frequency = <400000000>; > + samsung,dw-mshc-ciu-div = <0>; > + samsung,dw-mshc-sdr-timing = <2 3>; > + samsung,dw-mshc-ddr-timing = <1 2>; > + pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>; > + pinctrl-names = "default"; > + bus-width = <4>; > + cap-mmc-highspeed; > + cap-sd-highspeed; > + status = "okay"; > +}; > + > +&pinctrl_0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&sleep0>; > + > + tsp_reg_gpio_2: tsp-reg-gpio-2 { > + samsung,pins = "gpb-5"; > + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > + }; > + > + tsp_reg_gpio_3: tsp-reg-gpio-3 { > + samsung,pins = "gpb-7"; > + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > + }; > + > + sleep0: sleep-states { > + PIN_SLP(gpa0-0, INPUT, NONE); > + PIN_SLP(gpa0-1, OUT0, NONE); > + PIN_SLP(gpa0-2, INPUT, NONE); > + PIN_SLP(gpa0-3, INPUT, UP); > + PIN_SLP(gpa0-4, INPUT, NONE); > + PIN_SLP(gpa0-5, INPUT, DOWN); > + PIN_SLP(gpa0-6, INPUT, DOWN); > + PIN_SLP(gpa0-7, INPUT, UP); > + > + PIN_SLP(gpa1-0, INPUT, DOWN); > + PIN_SLP(gpa1-1, INPUT, DOWN); > + PIN_SLP(gpa1-2, INPUT, DOWN); > + PIN_SLP(gpa1-3, INPUT, DOWN); > + PIN_SLP(gpa1-4, INPUT, DOWN); > + PIN_SLP(gpa1-5, INPUT, DOWN); > + > + PIN_SLP(gpb-0, INPUT, NONE); > + PIN_SLP(gpb-1, INPUT, NONE); > + PIN_SLP(gpb-2, INPUT, NONE); > + PIN_SLP(gpb-3, INPUT, NONE); > + PIN_SLP(gpb-4, INPUT, DOWN); > + PIN_SLP(gpb-5, INPUT, DOWN); > + PIN_SLP(gpb-6, INPUT, DOWN); > + PIN_SLP(gpb-7, INPUT, DOWN); > + > + PIN_SLP(gpc0-0, INPUT, DOWN); > + PIN_SLP(gpc0-1, INPUT, DOWN); > + PIN_SLP(gpc0-2, INPUT, DOWN); > + PIN_SLP(gpc0-3, INPUT, DOWN); > + PIN_SLP(gpc0-4, INPUT, DOWN); > + > + PIN_SLP(gpc1-0, INPUT, UP); > + PIN_SLP(gpc1-1, PREV, NONE); > + PIN_SLP(gpc1-2, INPUT, UP); > + PIN_SLP(gpc1-3, INPUT, UP); > + PIN_SLP(gpc1-4, INPUT, UP); > + > + PIN_SLP(gpd0-0, INPUT, DOWN); > + PIN_SLP(gpd0-1, OUT0, NONE); > + PIN_SLP(gpd0-2, INPUT, NONE); > + PIN_SLP(gpd0-3, INPUT, NONE); > + > + PIN_SLP(gpd1-0, INPUT, DOWN); > + PIN_SLP(gpd1-1, INPUT, DOWN); > + PIN_SLP(gpd1-2, INPUT, NONE); > + PIN_SLP(gpd1-3, INPUT, NONE); > + > + PIN_SLP(gpf0-0, OUT0, NONE); > + PIN_SLP(gpf0-1, OUT0, NONE); > + PIN_SLP(gpf0-2, OUT0, NONE); > + PIN_SLP(gpf0-3, OUT0, NONE); > + PIN_SLP(gpf0-4, OUT0, NONE); > + PIN_SLP(gpf0-5, OUT0, NONE); > + PIN_SLP(gpf0-6, OUT0, NONE); > + PIN_SLP(gpf0-7, OUT0, NONE); > + > + PIN_SLP(gpf1-0, OUT0, NONE); > + PIN_SLP(gpf1-1, OUT0, NONE); > + PIN_SLP(gpf1-2, OUT0, NONE); > + PIN_SLP(gpf1-3, OUT0, NONE); > + PIN_SLP(gpf1-4, OUT0, NONE); > + PIN_SLP(gpf1-5, OUT0, NONE); > + PIN_SLP(gpf1-6, OUT0, NONE); > + PIN_SLP(gpf1-7, OUT0, NONE); > + > + PIN_SLP(gpf2-0, OUT0, NONE); > + PIN_SLP(gpf2-1, OUT0, NONE); > + PIN_SLP(gpf2-2, OUT0, NONE); > + PIN_SLP(gpf2-3, OUT0, NONE); > + PIN_SLP(gpf2-4, OUT0, NONE); > + PIN_SLP(gpf2-5, OUT0, NONE); > + PIN_SLP(gpf2-6, OUT0, NONE); > + PIN_SLP(gpf2-7, OUT0, NONE); > + > + PIN_SLP(gpf3-0, OUT0, NONE); > + PIN_SLP(gpf3-1, OUT0, NONE); > + PIN_SLP(gpf3-2, OUT0, NONE); > + PIN_SLP(gpf3-3, OUT0, NONE); > + PIN_SLP(gpf3-4, OUT0, NONE); > + PIN_SLP(gpf3-5, OUT0, NONE); > + > + PIN_SLP(gpj0-0, INPUT, DOWN); > + PIN_SLP(gpj0-1, INPUT, DOWN); > + PIN_SLP(gpj0-2, INPUT, DOWN); > + PIN_SLP(gpj0-3, PREV, NONE); > + PIN_SLP(gpj0-4, PREV, NONE); > + PIN_SLP(gpj0-5, OUT0, NONE); > + PIN_SLP(gpj0-6, OUT0, NONE); > + PIN_SLP(gpj0-7, OUT0, NONE); > + > + PIN_SLP(gpj1-0, OUT0, NONE); > + PIN_SLP(gpj1-1, INPUT, DOWN); > + PIN_SLP(gpj1-2, PREV, NONE); > + PIN_SLP(gpj1-3, OUT0, NONE); > + }; > +}; > + > +&pinctrl_1 { > + pinctrl-names = "default"; > + pinctrl-0 = <&sleep1>; > + > + uart_sel: uart-sel { > + samsung,pins = "gpl2-7"; > + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > + samsung,pin-val = <1>; > + /* 0 = CP, 1 = AP (serial output) */ > + }; > + > + gpio_keys: gpio-keys { > + samsung,pins = "gpx2-2", "gpx2-7", "gpx3-3"; > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > + }; > + > + wifi_host_wake: wifi-host-wake { > + samsung,pins = "gpx2-5"; > + samsung,pin-function = <EXYNOS_PIN_FUNC_F>; > + samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>; > + }; > + > + bt_shutdown: bt-shutdown { > + samsung,pins = "gpl0-6"; > + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > + samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; > + samsung,pin-val = <1>; > + }; > + > + bt_device_wakeup: bt-device-wakeup { > + samsung,pins = "gpx3-1"; > + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > + }; > + > + bt_host_wakeup: bt-host-wakeup { > + samsung,pins = "gpx2-6"; > + samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>; > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > + samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; > + }; > + > + max77686_irq: max77686-irq { > + samsung,pins = "gpx0-7"; > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > + }; > + > + sdhci2_cd_irq: sdhci2-cd-irq { > + samsung,pins = "gpx3-4"; > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > + }; > + > + tsp_rst: tsp-rst { > + samsung,pins = "gpm0-4"; > + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > + samsung,pin-val = <1>; > + }; > + > + tsp_reg_gpio_1: tsp-reg-gpio-1 { > + samsung,pins = "gpm4-5"; > + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > + }; > + > + tsp_irq: tsp-irq { > + samsung,pins = "gpm2-3"; > + samsung,pin-function = <EXYNOS_PIN_FUNC_F>; > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > + }; > + > + wifi_reset: wifi-reset { > + samsung,pins = "gpm3-5"; > + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > + }; > + > + sd3_wifi: sd3-wifi { > + samsung,pins = "gpk3-3", "gpk3-4", "gpk3-5", "gpk3-6"; > + samsung,pin-function = <EXYNOS_PIN_FUNC_2>; > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > + }; > + > + ak8975_irq: ak8975-irq { > + samsung,pins = "gpm4-7"; > + samsung,pin-function = <EXYNOS_PIN_FUNC_F>; > + samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>; > + }; > + > + sleep1: sleep-states { > + PIN_SLP(gpk0-0, PREV, NONE); > + PIN_SLP(gpk0-1, PREV, NONE); > + PIN_SLP(gpk0-2, PREV, NONE); > + PIN_SLP(gpk0-3, PREV, NONE); > + PIN_SLP(gpk0-4, PREV, NONE); > + PIN_SLP(gpk0-5, PREV, NONE); > + PIN_SLP(gpk0-6, PREV, NONE); > + > + PIN_SLP(gpk1-0, INPUT, DOWN); > + PIN_SLP(gpk1-1, INPUT, DOWN); > + PIN_SLP(gpk1-2, INPUT, DOWN); > + PIN_SLP(gpk1-3, PREV, NONE); > + PIN_SLP(gpk1-4, PREV, NONE); > + PIN_SLP(gpk1-5, PREV, NONE); > + PIN_SLP(gpk1-6, PREV, NONE); > + > + PIN_SLP(gpk2-0, INPUT, DOWN); > + PIN_SLP(gpk2-1, INPUT, DOWN); > + PIN_SLP(gpk2-2, INPUT, DOWN); > + PIN_SLP(gpk2-3, INPUT, DOWN); > + PIN_SLP(gpk2-4, INPUT, DOWN); > + PIN_SLP(gpk2-5, INPUT, DOWN); > + PIN_SLP(gpk2-6, INPUT, DOWN); > + > + PIN_SLP(gpk3-0, OUT0, NONE); > + PIN_SLP(gpk3-1, INPUT, NONE); > + PIN_SLP(gpk3-2, INPUT, DOWN); > + PIN_SLP(gpk3-3, INPUT, NONE); > + PIN_SLP(gpk3-4, INPUT, NONE); > + PIN_SLP(gpk3-5, INPUT, NONE); > + PIN_SLP(gpk3-6, INPUT, NONE); > + > + PIN_SLP(gpl0-0, OUT0, NONE); > + PIN_SLP(gpl0-1, INPUT, NONE); > + PIN_SLP(gpl0-2, INPUT, NONE); > + PIN_SLP(gpl0-3, INPUT, DOWN); > + PIN_SLP(gpl0-4, PREV, NONE); > + PIN_SLP(gpl0-6, PREV, NONE); > + > + PIN_SLP(gpl1-0, OUT0, NONE); > + PIN_SLP(gpl1-1, OUT0, NONE); > + > + PIN_SLP(gpl2-0, INPUT, DOWN); > + PIN_SLP(gpl2-1, INPUT, DOWN); > + PIN_SLP(gpl2-2, INPUT, DOWN); > + PIN_SLP(gpl2-3, INPUT, DOWN); > + PIN_SLP(gpl2-4, OUT0, NONE); > + PIN_SLP(gpl2-5, INPUT, DOWN); > + PIN_SLP(gpl2-6, PREV, NONE); > + PIN_SLP(gpl2-7, PREV, NONE); > + > + PIN_SLP(gpm0-0, PREV, NONE); > + PIN_SLP(gpm0-1, OUT0, NONE); > + PIN_SLP(gpm0-2, INPUT, DOWN); > + PIN_SLP(gpm0-3, INPUT, NONE); > + PIN_SLP(gpm0-4, OUT0, NONE); > + PIN_SLP(gpm0-5, OUT0, NONE); > + PIN_SLP(gpm0-6, INPUT, DOWN); > + PIN_SLP(gpm0-7, OUT0, NONE); > + > + PIN_SLP(gpm1-0, INPUT, NONE); > + PIN_SLP(gpm1-1, INPUT, NONE); > + PIN_SLP(gpm1-2, INPUT, NONE); > + PIN_SLP(gpm1-3, INPUT, NONE); > + PIN_SLP(gpm1-4, INPUT, NONE); > + PIN_SLP(gpm1-5, INPUT, NONE); > + PIN_SLP(gpm1-6, INPUT, DOWN); > + > + PIN_SLP(gpm2-0, INPUT, NONE); > + PIN_SLP(gpm2-1, INPUT, NONE); > + PIN_SLP(gpm2-2, OUT0, NONE); > + PIN_SLP(gpm2-3, OUT0, DOWN); > + PIN_SLP(gpm2-4, INPUT, DOWN); > + > + PIN_SLP(gpm3-0, PREV, NONE); > + PIN_SLP(gpm3-1, PREV, NONE); > + PIN_SLP(gpm3-2, PREV, NONE); > + PIN_SLP(gpm3-3, OUT1, NONE); > + PIN_SLP(gpm3-4, OUT0, DOWN); > + PIN_SLP(gpm3-5, PREV, NONE); > + PIN_SLP(gpm3-6, PREV, NONE); > + PIN_SLP(gpm3-7, OUT0, NONE); > + > + PIN_SLP(gpm4-0, INPUT, NONE); > + PIN_SLP(gpm4-1, INPUT, NONE); > + PIN_SLP(gpm4-2, INPUT, DOWN); > + PIN_SLP(gpm4-3, INPUT, DOWN); > + PIN_SLP(gpm4-4, PREV, NONE); > + PIN_SLP(gpm4-5, OUT0, NONE); > + PIN_SLP(gpm4-6, OUT0, NONE); > + PIN_SLP(gpm4-7, INPUT, DOWN); > + > + PIN_SLP(gpy0-0, INPUT, DOWN); > + PIN_SLP(gpy0-1, INPUT, DOWN); > + PIN_SLP(gpy0-2, INPUT, NONE); > + PIN_SLP(gpy0-3, INPUT, NONE); > + PIN_SLP(gpy0-4, INPUT, NONE); > + PIN_SLP(gpy0-5, INPUT, NONE); > + > + PIN_SLP(gpy1-0, INPUT, DOWN); > + PIN_SLP(gpy1-1, INPUT, DOWN); > + PIN_SLP(gpy1-2, INPUT, DOWN); > + PIN_SLP(gpy1-3, INPUT, DOWN); > + > + PIN_SLP(gpy2-0, PREV, NONE); > + PIN_SLP(gpy2-1, INPUT, DOWN); > + PIN_SLP(gpy2-2, INPUT, NONE); > + PIN_SLP(gpy2-3, INPUT, NONE); > + PIN_SLP(gpy2-4, INPUT, NONE); > + PIN_SLP(gpy2-5, INPUT, NONE); > + > + PIN_SLP(gpy3-0, INPUT, DOWN); > + PIN_SLP(gpy3-1, INPUT, DOWN); > + PIN_SLP(gpy3-2, INPUT, DOWN); > + PIN_SLP(gpy3-3, INPUT, DOWN); > + PIN_SLP(gpy3-4, INPUT, DOWN); > + PIN_SLP(gpy3-5, INPUT, DOWN); > + PIN_SLP(gpy3-6, INPUT, DOWN); > + PIN_SLP(gpy3-7, INPUT, DOWN); > + > + PIN_SLP(gpy4-0, INPUT, DOWN); > + PIN_SLP(gpy4-1, INPUT, DOWN); > + PIN_SLP(gpy4-2, INPUT, DOWN); > + PIN_SLP(gpy4-3, INPUT, DOWN); > + PIN_SLP(gpy4-4, INPUT, DOWN); > + PIN_SLP(gpy4-5, INPUT, DOWN); > + PIN_SLP(gpy4-6, INPUT, DOWN); > + PIN_SLP(gpy4-7, INPUT, DOWN); > + > + PIN_SLP(gpy5-0, INPUT, DOWN); > + PIN_SLP(gpy5-1, INPUT, DOWN); > + PIN_SLP(gpy5-2, INPUT, DOWN); > + PIN_SLP(gpy5-3, INPUT, DOWN); > + PIN_SLP(gpy5-4, INPUT, DOWN); > + PIN_SLP(gpy5-5, INPUT, DOWN); > + PIN_SLP(gpy5-6, INPUT, DOWN); > + PIN_SLP(gpy5-7, INPUT, DOWN); > + > + PIN_SLP(gpy6-0, INPUT, DOWN); > + PIN_SLP(gpy6-1, INPUT, DOWN); > + PIN_SLP(gpy6-2, INPUT, DOWN); > + PIN_SLP(gpy6-3, INPUT, DOWN); > + PIN_SLP(gpy6-4, INPUT, DOWN); > + PIN_SLP(gpy6-5, INPUT, DOWN); > + PIN_SLP(gpy6-6, INPUT, DOWN); > + PIN_SLP(gpy6-7, INPUT, DOWN); > + }; > +}; > + > +&pinctrl_2 { > + pinctrl-names = "default"; > + pinctrl-0 = <&sleep2>; > + > + sleep2: sleep-states { > + PIN_SLP(gpz-0, INPUT, DOWN); > + PIN_SLP(gpz-1, INPUT, DOWN); > + PIN_SLP(gpz-2, INPUT, DOWN); > + PIN_SLP(gpz-3, INPUT, DOWN); > + PIN_SLP(gpz-4, INPUT, DOWN); > + PIN_SLP(gpz-5, INPUT, DOWN); > + PIN_SLP(gpz-6, INPUT, DOWN); > + }; > +}; > + > +&pinctrl_3 { > + pinctrl-names = "default"; > + pinctrl-0 = <&sleep3>; > + > + sleep3: sleep-states { > + PIN_SLP(gpv0-0, INPUT, DOWN); > + PIN_SLP(gpv0-1, INPUT, DOWN); > + PIN_SLP(gpv0-2, INPUT, DOWN); > + PIN_SLP(gpv0-3, INPUT, DOWN); > + PIN_SLP(gpv0-4, INPUT, DOWN); > + PIN_SLP(gpv0-5, INPUT, DOWN); > + PIN_SLP(gpv0-6, INPUT, DOWN); > + PIN_SLP(gpv0-7, INPUT, DOWN); > + > + PIN_SLP(gpv1-0, INPUT, DOWN); > + PIN_SLP(gpv1-1, INPUT, DOWN); > + PIN_SLP(gpv1-2, INPUT, DOWN); > + PIN_SLP(gpv1-3, INPUT, DOWN); > + PIN_SLP(gpv1-4, INPUT, DOWN); > + PIN_SLP(gpv1-5, INPUT, DOWN); > + PIN_SLP(gpv1-6, INPUT, DOWN); > + PIN_SLP(gpv1-7, INPUT, DOWN); > + > + PIN_SLP(gpv2-0, INPUT, DOWN); > + PIN_SLP(gpv2-1, INPUT, DOWN); > + PIN_SLP(gpv2-2, INPUT, DOWN); > + PIN_SLP(gpv2-3, INPUT, DOWN); > + PIN_SLP(gpv2-4, INPUT, DOWN); > + PIN_SLP(gpv2-5, INPUT, DOWN); > + PIN_SLP(gpv2-6, INPUT, DOWN); > + PIN_SLP(gpv2-7, INPUT, DOWN); > + > + PIN_SLP(gpv3-0, INPUT, DOWN); > + PIN_SLP(gpv3-1, INPUT, DOWN); > + PIN_SLP(gpv3-2, INPUT, DOWN); > + PIN_SLP(gpv3-3, INPUT, DOWN); > + PIN_SLP(gpv3-4, INPUT, DOWN); > + PIN_SLP(gpv3-5, INPUT, DOWN); > + PIN_SLP(gpv3-6, INPUT, DOWN); > + PIN_SLP(gpv3-7, INPUT, DOWN); > + > + PIN_SLP(gpv4-0, INPUT, DOWN); > + PIN_SLP(gpv4-1, INPUT, DOWN); > + }; > +}; > + > +&pmu_system_controller { > + assigned-clocks = <&pmu_system_controller 0>; > + assigned-clock-parents = <&clock CLK_XUSBXTI>; > +}; > + > +&rtc { > + clocks = <&clock CLK_RTC>, <&max77686 MAX77686_CLK_AP>; > + clock-names = "rtc", "rtc_src"; > + status = "okay"; > +}; > + > +&sdhci_2 { > + bus-width = <4>; > + cd-gpios = <&gpx3 4 GPIO_ACTIVE_LOW>; > + pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4 &sdhci2_cd_irq>; > + pinctrl-names = "default"; > + vmmc-supply = <&ldo21_reg>; > + status = "okay"; > +}; > + > +&sdhci_3 { > + #address-cells = <1>; > + #size-cells = <0>; > + non-removable; > + bus-width = <4>; > + mmc-pwrseq = <&wlan_pwrseq>; > + > + pinctrl-names = "default"; > + pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_wifi &wifi_host_wake>; > + status = "okay"; > + > + brcmf: wifi@1 { > + reg = <0x1>; > + compatible = "brcm,bcm4329-fmac"; > + interrupt-parent = <&gpx2>; > + interrupts = <5 IRQ_TYPE_LEVEL_HIGH>; > + interrupt-names = "host-wake"; > + }; > +}; > + > +&serial_0 { > + pinctrl-0 = <&uart0_data &uart0_fctl>; > + pinctrl-names = "default"; > + status = "okay"; > + > + bluetooth { > + compatible = "brcm,bcm4330-bt"; > + pinctrl-0 = <&bt_shutdown &bt_device_wakeup &bt_host_wakeup>; > + pinctrl-names = "default"; > + > + max-speed = <2000000>; > + shutdown-gpios = <&gpl0 6 GPIO_ACTIVE_HIGH>; > + device-wakeup-gpios = <&gpx3 1 GPIO_ACTIVE_HIGH>; > + host-wakeup-gpios = <&gpx2 6 GPIO_ACTIVE_HIGH>; > + clocks = <&max77686 MAX77686_CLK_PMIC>; > + clock-names = "lpo"; > + }; Thanks for the above bluetooth device definition - also works nice on Midas boards family. :) > +}; > + > +&serial_1 { > + status = "okay"; > +}; > + > +&serial_2 { > + pinctrl-0 = <&uart_sel>; > + pinctrl-names = "default"; > + status = "okay"; > +}; > + > +&serial_3 { > + status = "okay"; > +}; Do we really need serial_1 and serial_3? IMHO they should be also removed from Midas boards family. > + > +&tmu { > + status = "okay"; > +}; Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/5] ARM: dts: add Samsung's exynos4412-based p4note boards 2020-10-24 14:44 ` [PATCH 2/5] ARM: dts: add Samsung's exynos4412-based p4note boards Martin Jücker 2020-10-26 11:55 ` Marek Szyprowski @ 2020-10-26 14:48 ` Krzysztof Kozlowski 2020-10-26 16:00 ` Krzysztof Kozlowski 2020-10-26 23:27 ` Martin Juecker 1 sibling, 2 replies; 15+ messages in thread From: Krzysztof Kozlowski @ 2020-10-26 14:48 UTC (permalink / raw) To: Martin Jücker; +Cc: linux-samsung-soc, kgene, devicetree On Sat, Oct 24, 2020 at 04:44:18PM +0200, Martin Jücker wrote: > 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. > > Signed-off-by: Martin Jücker <martin.juecker@gmail.com> > --- > arch/arm/boot/dts/Makefile | 1 + > arch/arm/boot/dts/exynos4412-p4note-n801x.dts | 16 + > arch/arm/boot/dts/exynos4412-p4note.dtsi | 1057 +++++++++++++++++ > 3 files changed, 1074 insertions(+) > create mode 100644 arch/arm/boot/dts/exynos4412-p4note-n801x.dts > create mode 100644 arch/arm/boot/dts/exynos4412-p4note.dtsi > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > index 4572db3fa5ae..b6d72bd7ebac 100644 > --- a/arch/arm/boot/dts/Makefile > +++ b/arch/arm/boot/dts/Makefile > @@ -195,6 +195,7 @@ dtb-$(CONFIG_ARCH_EXYNOS4) += \ > exynos4412-odroidx.dtb \ > exynos4412-odroidx2.dtb \ > exynos4412-origen.dtb \ > + exynos4412-p4note-n801x.dtb \ > exynos4412-smdk4412.dtb \ > exynos4412-tiny4412.dtb \ > exynos4412-trats2.dtb > diff --git a/arch/arm/boot/dts/exynos4412-p4note-n801x.dts b/arch/arm/boot/dts/exynos4412-p4note-n801x.dts > new file mode 100644 > index 000000000000..e7fb5b96e6c6 > --- /dev/null > +++ b/arch/arm/boot/dts/exynos4412-p4note-n801x.dts > @@ -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 <martin.juecker@gmail.com> > + */ > + > +/dts-v1/; > +#include "exynos4412-p4note.dtsi" > + > +/ { > + model = "Samsung Galaxy Note 10.1 (GT-N8010/N8013) based on Exynos4412"; > + compatible = "samsung,n801x", "samsung,p4note", "samsung,exynos4412", "samsung,exynos4"; Compatible without the wildcard, so samsung,n8010. > + > + /* this is the base variant without any kind of modem */ > +}; > diff --git a/arch/arm/boot/dts/exynos4412-p4note.dtsi b/arch/arm/boot/dts/exynos4412-p4note.dtsi > new file mode 100644 > index 000000000000..6d7e84f40e92 > --- /dev/null > +++ b/arch/arm/boot/dts/exynos4412-p4note.dtsi > @@ -0,0 +1,1057 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Samsung's Exynos4412 based p4note device family base DT > + * > + * Copyright (c) 2020 Martin Jücker <martin.juecker@gmail.com> > + */ > + > +/dts-v1/; > +#include "exynos4412.dtsi" > +#include "exynos4412-ppmu-common.dtsi" > + > +#include <dt-bindings/input/input.h> > +#include <dt-bindings/gpio/gpio.h> > +#include <dt-bindings/input/gpio-keys.h> Looks unused. > +#include <dt-bindings/interrupt-controller/irq.h> > +#include <dt-bindings/clock/maxim,max77686.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>; > + linux,can-disable; > + wakeup-source; > + }; > + }; > + > + tsp_reg_1: voltage-regulator-1 { All labels are not used. > + compatible = "regulator-fixed"; > + regulator-name = "TSP_FIXED_VOLTAGES_1"; Would be better to have a real name matching either schematics (which I guess you do not have) or vendor sources. > + pinctrl-names = "default"; > + pinctrl-0 = <&tsp_reg_gpio_1>; > + gpios = <&gpm4 5 GPIO_ACTIVE_HIGH>; > + enable-active-high; > + regulator-always-on; > + }; > + > + tsp_reg_2: voltage-regulator-2 { > + compatible = "regulator-fixed"; > + regulator-name = "TSP_FIXED_VOLTAGES_2"; > + pinctrl-names = "default"; > + pinctrl-0 = <&tsp_reg_gpio_2>; > + gpios = <&gpb 5 GPIO_ACTIVE_HIGH>; > + enable-active-high; > + regulator-always-on; > + }; > + > + tsp_reg_3: voltage-regulator-3 { > + compatible = "regulator-fixed"; > + regulator-name = "TSP_FIXED_VOLTAGES_3"; > + 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-10 { Numbering should start from 1 unless there is a reason for 10/14/19? > + 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>; > + > + ak8975@c { Node name: magnetometer > + compatible = "asahi-kasei,ak8975"; > + reg = <0x0c>; > + interrupt-parent = <&gpm4>; > + interrupts = <7 IRQ_TYPE_EDGE_RISING>; > + pinctrl-names = "default"; > + pinctrl-0 = <&ak8975_irq>; > + }; > + }; > + > + i2c-gpio-14 { > + 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>; > + > + max17042@36 { Node name: fuel-gauge > + compatible = "maxim,max17042"; > + reg = <0x36>; > + interrupt-parent = <&gpx2>; > + interrupts = <3 IRQ_TYPE_EDGE_FALLING>; You might need to disable the pull-down on the pin, whcih is usually the default. > + maxim,rsns-microohm = <10000>; > + maxim,over-heat-temp = <600>; > + maxim,over-volt = <4300>; > + }; > + }; > + > + i2c-gpio-19 { > + 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>; > + > + stmpe_mfd@41 { Node name: touchscreen? Although you already have a touchscreen later, so what is it? > + compatible = "st,stmpe811"; > + reg = <0x41>; > + interrupt-parent = <&gpx0>; > + interrupts = <1 IRQ_TYPE_LEVEL_LOW>; Disable the pull-down of interrupt pin? > + interrupt-controller; > + irq-trigger = <0x1>; > + st,adc-freq = <3>; > + st,mod-12b = <1>; > + st,ref-sel = <0>; > + st,sample-time = <3>; > + > + stmpe_adc: stmpe_adc { Node name: adc Label seems unused, so remove it. > + compatible = "st,stmpe-adc"; > + #io-channel-cells = <1>; > + st,norequest-mask = <0x2F>; > + }; > + }; > + }; > +}; > + > +&adc { > + status = "okay"; Missing vdd-supply > +}; > + > +&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 */ > + 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>; > + }; > + }; > +}; > + > +&ehci { > + status = "okay"; > +}; > + > +&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>; > + vback-porch = <16>; > + vfront-porch = <4>; > + vsync-len = <3>; > + hsync-active = <1>; > + }; > + }; > +}; > + > +&gpu { > + mali-supply = <&buck4_reg>; > + status = "okay"; > +}; > + > +&hsotg { > + vusb_a-supply = <&ldo12_reg>; > + dr_mode = "peripheral"; > + status = "okay"; > +}; > + > +&i2c_3 { > + samsung,i2c-sda-delay = <100>; > + samsung,i2c-slave-addr = <0x10>; > + samsung,i2c-max-bus-freq = <400000>; > + pinctrl-0 = <&i2c3_bus>; > + pinctrl-names = "default"; > + status = "okay"; > + > + touchscreen@4a { > + compatible = "atmel,maxtouch"; > + reg = <0x4a>; > + reset-gpios = <&gpm0 4 GPIO_ACTIVE_HIGH>; > + interrupt-parent = <&gpm2>; > + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; > + pinctrl-0 = <&tsp_rst &tsp_irq>; > + pinctrl-names = "default"; > + }; > +}; > + > +&i2c_7 { > + samsung,i2c-sda-delay = <100>; > + samsung,i2c-slave-addr = <0x10>; > + samsung,i2c-max-bus-freq = <400000>; > + pinctrl-0 = <&i2c7_bus>; > + pinctrl-names = "default"; > + status = "okay"; > + > + max77686: max77686_pmic@9 { > + compatible = "maxim,max77686"; > + interrupt-parent = <&gpx0>; > + interrupts = <7 IRQ_TYPE_NONE>; > + pinctrl-0 = <&max77686_irq>; > + pinctrl-names = "default"; > + reg = <0x09>; > + #clock-cells = <1>; > + > + voltage-regulators { Just "regulators" and no empty line after this. You should define all regulators here. If some are unknown, keep the min-max the same as in driver. > + > + /* WM8994 audio */ > + ldo3_reg: LDO3 { > + regulator-name = "VCC_1.8V_AP"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-on-in-suspend; > + }; > + }; > + > + /* Unknown */ > + ldo5_reg: LDO5 { > + regulator-name = "VCC_1.8V_IO"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + /* CSI IP block */ > + ldo8_reg: LDO8 { > + regulator-name = "VMIPI_1.0V"; > + regulator-min-microvolt = <1000000>; > + regulator-max-microvolt = <1000000>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-on-in-suspend; > + }; > + }; > + > + /* IR LED on/off */ > + ldo9_reg: LDO9 { > + regulator-name = "VLED_IC_1.9V"; > + regulator-min-microvolt = <1950000>; > + regulator-max-microvolt = <1950000>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + /* CSI IP block */ > + ldo10_reg: LDO10 { > + regulator-name = "VMIPI_1.8V"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-on-in-suspend; > + }; > + }; > + > + /* Unknown */ > + ldo11_reg: LDO11 { > + regulator-name = "VABB1_1.9V"; > + regulator-min-microvolt = <1950000>; > + regulator-max-microvolt = <1950000>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + /* USB OTG */ > + ldo12_reg: LDO12 { > + regulator-name = "VUOTG_3.0V"; > + regulator-min-microvolt = <3000000>; > + regulator-max-microvolt = <3000000>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-on-in-suspend; > + }; > + }; > + > + /* Unknown */ > + ldo14_reg: LDO14 { > + regulator-name = "VABB2_1.9V"; > + regulator-min-microvolt = <1950000>; > + regulator-max-microvolt = <1950000>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + /* Camera ISX012 */ > + ldo18_reg: LDO18 { > + regulator-name = "CAM_IO_1.8V"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + /* Camera S5K6A3 */ > + ldo19_reg: LDO19 { > + regulator-name = "VT_CORE_1.8V"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + /* MMC2 */ > + ldo21_reg: LDO21 { > + regulator-name = "VTF_2.8V"; > + regulator-min-microvolt = <2800000>; > + regulator-max-microvolt = <2800000>; > + maxim,ena-gpios = <&gpy2 0 GPIO_ACTIVE_HIGH>; > + }; > + > + /* ADC */ > + ldo23_reg: LDO23 { > + regulator-name = "VDD_ADC_3.3V"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + /* Camera S5K6A3 */ > + ldo24_reg: LDO24 { > + regulator-name = "CAM_A2.8V"; > + regulator-min-microvolt = <2800000>; > + regulator-max-microvolt = <2800000>; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + /* IR LED sending */ > + ldo25_reg: LDO25 { > + regulator-name = "VLED_3.3V"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + /* Camera ISX012 */ > + ldo26_reg: LDO26 { > + regulator-name = "3MP_AF_2.8V"; > + regulator-min-microvolt = <2800000>; > + regulator-max-microvolt = <2800000>; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + buck1_reg: BUCK1 { > + regulator-name = "VDD_MIF"; > + regulator-min-microvolt = <850000>; > + regulator-max-microvolt = <1050000>; > + regulator-always-on; > + regulator-boot-on; > + }; > + > + buck2_reg: BUCK2 { > + regulator-name = "VDD_ARM"; > + regulator-min-microvolt = <850000>; > + regulator-max-microvolt = <1500000>; > + regulator-always-on; > + regulator-boot-on; > + }; > + > + buck3_reg: BUCK3 { > + regulator-name = "VDD_INT"; > + regulator-min-microvolt = <850000>; > + regulator-max-microvolt = <1100000>; > + regulator-always-on; > + regulator-boot-on; > + }; > + > + buck4_reg: BUCK4 { > + regulator-name = "VDD_G3D"; > + regulator-min-microvolt = <850000>; > + regulator-max-microvolt = <1075000>; > + regulator-boot-on; > + }; > + > + buck9_reg: BUCK9 { > + regulator-name = "3MP_CORE_1.2V"; > + regulator-min-microvolt = <1200000>; > + regulator-max-microvolt = <1200000>; Empty line to match the other nodes. > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + }; > + }; > +}; > + > +&mshc_0 { > + broken-cd; > + non-removable; > + card-detect-delay = <200>; > + clock-frequency = <400000000>; > + samsung,dw-mshc-ciu-div = <0>; > + samsung,dw-mshc-sdr-timing = <2 3>; > + samsung,dw-mshc-ddr-timing = <1 2>; > + pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>; > + pinctrl-names = "default"; > + bus-width = <4>; > + cap-mmc-highspeed; > + cap-sd-highspeed; > + status = "okay"; > +}; > + > +&pinctrl_0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&sleep0>; > + > + tsp_reg_gpio_2: tsp-reg-gpio-2 { > + samsung,pins = "gpb-5"; > + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > + }; > + > + tsp_reg_gpio_3: tsp-reg-gpio-3 { > + samsung,pins = "gpb-7"; > + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > + }; > + > + sleep0: sleep-states { > + PIN_SLP(gpa0-0, INPUT, NONE); > + PIN_SLP(gpa0-1, OUT0, NONE); > + PIN_SLP(gpa0-2, INPUT, NONE); > + PIN_SLP(gpa0-3, INPUT, UP); > + PIN_SLP(gpa0-4, INPUT, NONE); > + PIN_SLP(gpa0-5, INPUT, DOWN); > + PIN_SLP(gpa0-6, INPUT, DOWN); > + PIN_SLP(gpa0-7, INPUT, UP); > + > + PIN_SLP(gpa1-0, INPUT, DOWN); > + PIN_SLP(gpa1-1, INPUT, DOWN); > + PIN_SLP(gpa1-2, INPUT, DOWN); > + PIN_SLP(gpa1-3, INPUT, DOWN); > + PIN_SLP(gpa1-4, INPUT, DOWN); > + PIN_SLP(gpa1-5, INPUT, DOWN); > + > + PIN_SLP(gpb-0, INPUT, NONE); > + PIN_SLP(gpb-1, INPUT, NONE); > + PIN_SLP(gpb-2, INPUT, NONE); > + PIN_SLP(gpb-3, INPUT, NONE); > + PIN_SLP(gpb-4, INPUT, DOWN); > + PIN_SLP(gpb-5, INPUT, DOWN); > + PIN_SLP(gpb-6, INPUT, DOWN); > + PIN_SLP(gpb-7, INPUT, DOWN); > + > + PIN_SLP(gpc0-0, INPUT, DOWN); > + PIN_SLP(gpc0-1, INPUT, DOWN); > + PIN_SLP(gpc0-2, INPUT, DOWN); > + PIN_SLP(gpc0-3, INPUT, DOWN); > + PIN_SLP(gpc0-4, INPUT, DOWN); > + > + PIN_SLP(gpc1-0, INPUT, UP); > + PIN_SLP(gpc1-1, PREV, NONE); > + PIN_SLP(gpc1-2, INPUT, UP); > + PIN_SLP(gpc1-3, INPUT, UP); > + PIN_SLP(gpc1-4, INPUT, UP); > + > + PIN_SLP(gpd0-0, INPUT, DOWN); > + PIN_SLP(gpd0-1, OUT0, NONE); > + PIN_SLP(gpd0-2, INPUT, NONE); > + PIN_SLP(gpd0-3, INPUT, NONE); > + > + PIN_SLP(gpd1-0, INPUT, DOWN); > + PIN_SLP(gpd1-1, INPUT, DOWN); > + PIN_SLP(gpd1-2, INPUT, NONE); > + PIN_SLP(gpd1-3, INPUT, NONE); > + > + PIN_SLP(gpf0-0, OUT0, NONE); > + PIN_SLP(gpf0-1, OUT0, NONE); > + PIN_SLP(gpf0-2, OUT0, NONE); > + PIN_SLP(gpf0-3, OUT0, NONE); > + PIN_SLP(gpf0-4, OUT0, NONE); > + PIN_SLP(gpf0-5, OUT0, NONE); > + PIN_SLP(gpf0-6, OUT0, NONE); > + PIN_SLP(gpf0-7, OUT0, NONE); > + > + PIN_SLP(gpf1-0, OUT0, NONE); > + PIN_SLP(gpf1-1, OUT0, NONE); > + PIN_SLP(gpf1-2, OUT0, NONE); > + PIN_SLP(gpf1-3, OUT0, NONE); > + PIN_SLP(gpf1-4, OUT0, NONE); > + PIN_SLP(gpf1-5, OUT0, NONE); > + PIN_SLP(gpf1-6, OUT0, NONE); > + PIN_SLP(gpf1-7, OUT0, NONE); > + > + PIN_SLP(gpf2-0, OUT0, NONE); > + PIN_SLP(gpf2-1, OUT0, NONE); > + PIN_SLP(gpf2-2, OUT0, NONE); > + PIN_SLP(gpf2-3, OUT0, NONE); > + PIN_SLP(gpf2-4, OUT0, NONE); > + PIN_SLP(gpf2-5, OUT0, NONE); > + PIN_SLP(gpf2-6, OUT0, NONE); > + PIN_SLP(gpf2-7, OUT0, NONE); > + > + PIN_SLP(gpf3-0, OUT0, NONE); > + PIN_SLP(gpf3-1, OUT0, NONE); > + PIN_SLP(gpf3-2, OUT0, NONE); > + PIN_SLP(gpf3-3, OUT0, NONE); > + PIN_SLP(gpf3-4, OUT0, NONE); > + PIN_SLP(gpf3-5, OUT0, NONE); > + > + PIN_SLP(gpj0-0, INPUT, DOWN); > + PIN_SLP(gpj0-1, INPUT, DOWN); > + PIN_SLP(gpj0-2, INPUT, DOWN); > + PIN_SLP(gpj0-3, PREV, NONE); > + PIN_SLP(gpj0-4, PREV, NONE); > + PIN_SLP(gpj0-5, OUT0, NONE); > + PIN_SLP(gpj0-6, OUT0, NONE); > + PIN_SLP(gpj0-7, OUT0, NONE); > + > + PIN_SLP(gpj1-0, OUT0, NONE); > + PIN_SLP(gpj1-1, INPUT, DOWN); > + PIN_SLP(gpj1-2, PREV, NONE); > + PIN_SLP(gpj1-3, OUT0, NONE); > + }; > +}; > + > +&pinctrl_1 { > + pinctrl-names = "default"; > + pinctrl-0 = <&sleep1>; > + > + uart_sel: uart-sel { > + samsung,pins = "gpl2-7"; > + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > + samsung,pin-val = <1>; > + /* 0 = CP, 1 = AP (serial output) */ > + }; > + > + gpio_keys: gpio-keys { > + samsung,pins = "gpx2-2", "gpx2-7", "gpx3-3"; > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > + }; > + > + wifi_host_wake: wifi-host-wake { > + samsung,pins = "gpx2-5"; > + samsung,pin-function = <EXYNOS_PIN_FUNC_F>; > + samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>; > + }; > + > + bt_shutdown: bt-shutdown { > + samsung,pins = "gpl0-6"; > + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > + samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; > + samsung,pin-val = <1>; > + }; > + > + bt_device_wakeup: bt-device-wakeup { > + samsung,pins = "gpx3-1"; Please order the nodes in pinctrl by pins (first entry), so: sd3-wifi { samsung,pins = "gpk3-3", ... } ... bt-shutdown { samsung,pins = "gpl0-6"; } ... gpx0 gpx2 gpx3 etc. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/5] ARM: dts: add Samsung's exynos4412-based p4note boards 2020-10-26 14:48 ` Krzysztof Kozlowski @ 2020-10-26 16:00 ` Krzysztof Kozlowski 2020-10-26 23:27 ` Martin Juecker 1 sibling, 0 replies; 15+ messages in thread From: Krzysztof Kozlowski @ 2020-10-26 16:00 UTC (permalink / raw) To: Martin Jücker; +Cc: linux-samsung-soc, kgene, devicetree On Mon, Oct 26, 2020 at 03:48:30PM +0100, Krzysztof Kozlowski wrote: > On Sat, Oct 24, 2020 at 04:44:18PM +0200, Martin Jücker wrote: (...) > > +&i2c_7 { > > + samsung,i2c-sda-delay = <100>; > > + samsung,i2c-slave-addr = <0x10>; > > + samsung,i2c-max-bus-freq = <400000>; > > + pinctrl-0 = <&i2c7_bus>; > > + pinctrl-names = "default"; > > + status = "okay"; > > + > > + max77686: max77686_pmic@9 { > > + compatible = "maxim,max77686"; > > + interrupt-parent = <&gpx0>; > > + interrupts = <7 IRQ_TYPE_NONE>; > > + pinctrl-0 = <&max77686_irq>; > > + pinctrl-names = "default"; > > + reg = <0x09>; > > + #clock-cells = <1>; > > + > > + voltage-regulators { > > Just "regulators" and no empty line after this. Skip this comment, it's obviously wrong, as the regulator driver and bindings require the exact name "voltage-regulator". Best regards, Krzysztof ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/5] ARM: dts: add Samsung's exynos4412-based p4note boards 2020-10-26 14:48 ` Krzysztof Kozlowski 2020-10-26 16:00 ` Krzysztof Kozlowski @ 2020-10-26 23:27 ` Martin Juecker 2020-10-27 8:17 ` Krzysztof Kozlowski 1 sibling, 1 reply; 15+ messages in thread From: Martin Juecker @ 2020-10-26 23:27 UTC (permalink / raw) To: Krzysztof Kozlowski; +Cc: linux-samsung-soc, kgene, devicetree Hello Krzysztof, thank you for the feedback. On Mon, Oct 26, 2020 at 03:48:30PM +0100, Krzysztof Kozlowski wrote: > On Sat, Oct 24, 2020 at 04:44:18PM +0200, Martin Jücker wrote: (...) > > +/dts-v1/; > > +#include "exynos4412-p4note.dtsi" > > + > > +/ { > > + model = "Samsung Galaxy Note 10.1 (GT-N8010/N8013) based on Exynos4412"; > > + compatible = "samsung,n801x", "samsung,p4note", "samsung,exynos4412", "samsung,exynos4"; > > Compatible without the wildcard, so samsung,n8010. I went with the n710x style compatible but I'm fine with this, too. > > > + > > + /* this is the base variant without any kind of modem */ > > +}; > > diff --git a/arch/arm/boot/dts/exynos4412-p4note.dtsi b/arch/arm/boot/dts/exynos4412-p4note.dtsi > > new file mode 100644 > > index 000000000000..6d7e84f40e92 > > --- /dev/null > > +++ b/arch/arm/boot/dts/exynos4412-p4note.dtsi > > @@ -0,0 +1,1057 @@ > > +// SPDX-License-Identifier: GPL-2.0 > > +/* > > + * Samsung's Exynos4412 based p4note device family base DT > > + * > > + * Copyright (c) 2020 Martin Jücker <martin.juecker@gmail.com> > > + */ > > + > > +/dts-v1/; > > +#include "exynos4412.dtsi" > > +#include "exynos4412-ppmu-common.dtsi" > > + > > +#include <dt-bindings/input/input.h> > > +#include <dt-bindings/gpio/gpio.h> > > +#include <dt-bindings/input/gpio-keys.h> > > Looks unused. Indeed, a leftover while trying things. (...) > > > + tsp_reg_1: voltage-regulator-1 { > > All labels are not used. > Removed the labels. > > + compatible = "regulator-fixed"; > > + regulator-name = "TSP_FIXED_VOLTAGES_1"; > > Would be better to have a real name matching either schematics (which I > guess you do not have) or vendor sources. > You are right, there is no schematics, the old vendor sources only have gpio calls with the names TSP_LDO_ON, TSP_LDO_ON1 and TSP_LDO_ON2. Those regulators are for the Atmel 1664S touchscreen which has a public data sheet. My best guess would be that those are VDD, AVDD and XVDD but I have no idea how to match them or whether this is actually an accurate observation. My electronics knowledge is rather limited. > > + pinctrl-names = "default"; > > + pinctrl-0 = <&tsp_reg_gpio_1>; > > + gpios = <&gpm4 5 GPIO_ACTIVE_HIGH>; > > + enable-active-high; > > + regulator-always-on; > > + }; > > + > > + tsp_reg_2: voltage-regulator-2 { > > + compatible = "regulator-fixed"; > > + regulator-name = "TSP_FIXED_VOLTAGES_2"; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&tsp_reg_gpio_2>; > > + gpios = <&gpb 5 GPIO_ACTIVE_HIGH>; > > + enable-active-high; > > + regulator-always-on; > > + }; > > + > > + tsp_reg_3: voltage-regulator-3 { > > + compatible = "regulator-fixed"; > > + regulator-name = "TSP_FIXED_VOLTAGES_3"; > > + 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-10 { > > Numbering should start from 1 unless there is a reason for 10/14/19? > I used the numbers from the vendor sources but it shouldn't really matter, changed it. > > + 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>; > > + > > + ak8975@c { > > Node name: magnetometer > Done. > > + compatible = "asahi-kasei,ak8975"; > > + reg = <0x0c>; > > + interrupt-parent = <&gpm4>; > > + interrupts = <7 IRQ_TYPE_EDGE_RISING>; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&ak8975_irq>; > > + }; > > + }; > > + > > + i2c-gpio-14 { > > + 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>; > > + > > + max17042@36 { > > Node name: fuel-gauge > Done. > > + compatible = "maxim,max17042"; > > + reg = <0x36>; > > + interrupt-parent = <&gpx2>; > > + interrupts = <3 IRQ_TYPE_EDGE_FALLING>; > > You might need to disable the pull-down on the pin, whcih is usually the > default. > Found the configuration for this in the vendor sources, it was in a different place than the rest. > > + maxim,rsns-microohm = <10000>; > > + maxim,over-heat-temp = <600>; > > + maxim,over-volt = <4300>; > > + }; > > + }; > > + > > + i2c-gpio-19 { > > + 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>; > > + > > + stmpe_mfd@41 { > > Node name: touchscreen? > Although you already have a touchscreen later, so what is it? > The stmpe 811 is a mfd but the p4note is actually only using the adc part of it for checking the accessory type of the usb cable and what was connected to the headphone jack. I renamed it to adc@41 > > + compatible = "st,stmpe811"; > > + reg = <0x41>; > > + interrupt-parent = <&gpx0>; > > + interrupts = <1 IRQ_TYPE_LEVEL_LOW>; > > Disable the pull-down of interrupt pin? > Same as above. > > + interrupt-controller; > > + irq-trigger = <0x1>; > > + st,adc-freq = <3>; > > + st,mod-12b = <1>; > > + st,ref-sel = <0>; > > + st,sample-time = <3>; > > + > > + stmpe_adc: stmpe_adc { > > Node name: adc > Label seems unused, so remove it. > I removed the label but I cannot rename the node as the name is used by the driver to find and load the driver for the subcomponent. > > + compatible = "st,stmpe-adc"; > > + #io-channel-cells = <1>; > > + st,norequest-mask = <0x2F>; > > + }; > > + }; > > + }; > > +}; > > + > > +&adc { > > + status = "okay"; > > Missing vdd-supply > I'm not sure about the supply here, it's not actually in the vendor sources. It seems the bootloader is setting this up. The regulator naming suggests, that it would be LDO23. What should I do here? Currently no driver is using it but it's needed for the backlight dimming which I currently still have some trouble with. > > +}; (...) > > + > > +&i2c_7 { > > + samsung,i2c-sda-delay = <100>; > > + samsung,i2c-slave-addr = <0x10>; > > + samsung,i2c-max-bus-freq = <400000>; > > + pinctrl-0 = <&i2c7_bus>; > > + pinctrl-names = "default"; > > + status = "okay"; > > + > > + max77686: max77686_pmic@9 { > > + compatible = "maxim,max77686"; > > + interrupt-parent = <&gpx0>; > > + interrupts = <7 IRQ_TYPE_NONE>; > > + pinctrl-0 = <&max77686_irq>; > > + pinctrl-names = "default"; > > + reg = <0x09>; > > + #clock-cells = <1>; > > + > > + voltage-regulators { > > Just "regulators" and no empty line after this. > > You should define all regulators here. If some are unknown, keep the > min-max the same as in driver. > I used the driver to read all the voltages, it also reads values for the LDOs that are not defined in the DT, so I have values for all of them setup by the bootloader. What I don't know is their name and what they are used for. Interestingly apart from two LDOs, the voltages did match exactly with those from the midas DT, so it could be very similar. The two non-matching were only off by 0.1V. How should I go about this? > > + > > + /* WM8994 audio */ > > + ldo3_reg: LDO3 { > > + regulator-name = "VCC_1.8V_AP"; > > + regulator-min-microvolt = <1800000>; > > + regulator-max-microvolt = <1800000>; > > + regulator-always-on; > > + regulator-boot-on; > > + > > + regulator-state-mem { > > + regulator-on-in-suspend; > > + }; > > + }; > > + > > + /* Unknown */ > > + ldo5_reg: LDO5 { > > + regulator-name = "VCC_1.8V_IO"; > > + regulator-min-microvolt = <1800000>; > > + regulator-max-microvolt = <1800000>; > > + > > + regulator-state-mem { > > + regulator-off-in-suspend; > > + }; > > + }; > > + > > + /* CSI IP block */ > > + ldo8_reg: LDO8 { > > + regulator-name = "VMIPI_1.0V"; > > + regulator-min-microvolt = <1000000>; > > + regulator-max-microvolt = <1000000>; > > + regulator-always-on; > > + regulator-boot-on; > > + > > + regulator-state-mem { > > + regulator-on-in-suspend; > > + }; > > + }; > > + > > + /* IR LED on/off */ > > + ldo9_reg: LDO9 { > > + regulator-name = "VLED_IC_1.9V"; > > + regulator-min-microvolt = <1950000>; > > + regulator-max-microvolt = <1950000>; > > + regulator-always-on; > > + regulator-boot-on; > > + > > + regulator-state-mem { > > + regulator-off-in-suspend; > > + }; > > + }; > > + > > + /* CSI IP block */ > > + ldo10_reg: LDO10 { > > + regulator-name = "VMIPI_1.8V"; > > + regulator-min-microvolt = <1800000>; > > + regulator-max-microvolt = <1800000>; > > + regulator-always-on; > > + regulator-boot-on; > > + > > + regulator-state-mem { > > + regulator-on-in-suspend; > > + }; > > + }; > > + > > + /* Unknown */ > > + ldo11_reg: LDO11 { > > + regulator-name = "VABB1_1.9V"; > > + regulator-min-microvolt = <1950000>; > > + regulator-max-microvolt = <1950000>; > > + regulator-always-on; > > + regulator-boot-on; > > + > > + regulator-state-mem { > > + regulator-off-in-suspend; > > + }; > > + }; > > + > > + /* USB OTG */ > > + ldo12_reg: LDO12 { > > + regulator-name = "VUOTG_3.0V"; > > + regulator-min-microvolt = <3000000>; > > + regulator-max-microvolt = <3000000>; > > + regulator-always-on; > > + regulator-boot-on; > > + > > + regulator-state-mem { > > + regulator-on-in-suspend; > > + }; > > + }; > > + > > + /* Unknown */ > > + ldo14_reg: LDO14 { > > + regulator-name = "VABB2_1.9V"; > > + regulator-min-microvolt = <1950000>; > > + regulator-max-microvolt = <1950000>; > > + regulator-always-on; > > + regulator-boot-on; > > + > > + regulator-state-mem { > > + regulator-off-in-suspend; > > + }; > > + }; > > + > > + /* Camera ISX012 */ > > + ldo18_reg: LDO18 { > > + regulator-name = "CAM_IO_1.8V"; > > + regulator-min-microvolt = <1800000>; > > + regulator-max-microvolt = <1800000>; > > + > > + regulator-state-mem { > > + regulator-off-in-suspend; > > + }; > > + }; > > + > > + /* Camera S5K6A3 */ > > + ldo19_reg: LDO19 { > > + regulator-name = "VT_CORE_1.8V"; > > + regulator-min-microvolt = <1800000>; > > + regulator-max-microvolt = <1800000>; > > + > > + regulator-state-mem { > > + regulator-off-in-suspend; > > + }; > > + }; > > + > > + /* MMC2 */ > > + ldo21_reg: LDO21 { > > + regulator-name = "VTF_2.8V"; > > + regulator-min-microvolt = <2800000>; > > + regulator-max-microvolt = <2800000>; > > + maxim,ena-gpios = <&gpy2 0 GPIO_ACTIVE_HIGH>; > > + }; > > + > > + /* ADC */ > > + ldo23_reg: LDO23 { > > + regulator-name = "VDD_ADC_3.3V"; > > + regulator-min-microvolt = <3300000>; > > + regulator-max-microvolt = <3300000>; > > + regulator-always-on; > > + regulator-boot-on; > > + > > + regulator-state-mem { > > + regulator-off-in-suspend; > > + }; > > + }; > > + > > + /* Camera S5K6A3 */ > > + ldo24_reg: LDO24 { > > + regulator-name = "CAM_A2.8V"; > > + regulator-min-microvolt = <2800000>; > > + regulator-max-microvolt = <2800000>; > > + > > + regulator-state-mem { > > + regulator-off-in-suspend; > > + }; > > + }; > > + > > + /* IR LED sending */ > > + ldo25_reg: LDO25 { > > + regulator-name = "VLED_3.3V"; > > + regulator-min-microvolt = <3300000>; > > + regulator-max-microvolt = <3300000>; > > + > > + regulator-state-mem { > > + regulator-off-in-suspend; > > + }; > > + }; > > + > > + /* Camera ISX012 */ > > + ldo26_reg: LDO26 { > > + regulator-name = "3MP_AF_2.8V"; > > + regulator-min-microvolt = <2800000>; > > + regulator-max-microvolt = <2800000>; > > + > > + regulator-state-mem { > > + regulator-off-in-suspend; > > + }; > > + }; > > + > > + buck1_reg: BUCK1 { > > + regulator-name = "VDD_MIF"; > > + regulator-min-microvolt = <850000>; > > + regulator-max-microvolt = <1050000>; > > + regulator-always-on; > > + regulator-boot-on; > > + }; > > + > > + buck2_reg: BUCK2 { > > + regulator-name = "VDD_ARM"; > > + regulator-min-microvolt = <850000>; > > + regulator-max-microvolt = <1500000>; > > + regulator-always-on; > > + regulator-boot-on; > > + }; > > + > > + buck3_reg: BUCK3 { > > + regulator-name = "VDD_INT"; > > + regulator-min-microvolt = <850000>; > > + regulator-max-microvolt = <1100000>; > > + regulator-always-on; > > + regulator-boot-on; > > + }; > > + > > + buck4_reg: BUCK4 { > > + regulator-name = "VDD_G3D"; > > + regulator-min-microvolt = <850000>; > > + regulator-max-microvolt = <1075000>; > > + regulator-boot-on; > > + }; > > + > > + buck9_reg: BUCK9 { > > + regulator-name = "3MP_CORE_1.2V"; > > + regulator-min-microvolt = <1200000>; > > + regulator-max-microvolt = <1200000>; > > Empty line to match the other nodes. > Done. > > + regulator-state-mem { > > + regulator-off-in-suspend; > > + }; > > + }; > > + }; > > + }; > > +}; > > + (...) > > + > > +&pinctrl_1 { > > + pinctrl-names = "default"; > > + pinctrl-0 = <&sleep1>; > > + > > + uart_sel: uart-sel { > > + samsung,pins = "gpl2-7"; > > + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; > > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > > + samsung,pin-val = <1>; > > + /* 0 = CP, 1 = AP (serial output) */ > > + }; > > + > > + gpio_keys: gpio-keys { > > + samsung,pins = "gpx2-2", "gpx2-7", "gpx3-3"; > > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > > + }; > > + > > + wifi_host_wake: wifi-host-wake { > > + samsung,pins = "gpx2-5"; > > + samsung,pin-function = <EXYNOS_PIN_FUNC_F>; > > + samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>; > > + }; > > + > > + bt_shutdown: bt-shutdown { > > + samsung,pins = "gpl0-6"; > > + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; > > + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; > > + samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; > > + samsung,pin-val = <1>; > > + }; > > + > > + bt_device_wakeup: bt-device-wakeup { > > + samsung,pins = "gpx3-1"; > > Please order the nodes in pinctrl by pins (first entry), so: > > sd3-wifi { > samsung,pins = "gpk3-3", ... > } > ... > bt-shutdown { > samsung,pins = "gpl0-6"; > } > ... > gpx0 > gpx2 > gpx3 > > etc. > Done. > > Best regards, > Krzysztof Cheers Martin ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/5] ARM: dts: add Samsung's exynos4412-based p4note boards 2020-10-26 23:27 ` Martin Juecker @ 2020-10-27 8:17 ` Krzysztof Kozlowski 2020-10-29 21:40 ` Martin Juecker 0 siblings, 1 reply; 15+ messages in thread From: Krzysztof Kozlowski @ 2020-10-27 8:17 UTC (permalink / raw) To: Martin Juecker; +Cc: linux-samsung-soc, kgene, devicetree On Tue, Oct 27, 2020 at 12:27:09AM +0100, Martin Juecker wrote: > Hello Krzysztof, > > thank you for the feedback. > > On Mon, Oct 26, 2020 at 03:48:30PM +0100, Krzysztof Kozlowski wrote: > > On Sat, Oct 24, 2020 at 04:44:18PM +0200, Martin Jücker wrote: > > (...) > > > > +/dts-v1/; > > > +#include "exynos4412-p4note.dtsi" > > > + > > > +/ { > > > + model = "Samsung Galaxy Note 10.1 (GT-N8010/N8013) based on Exynos4412"; > > > + compatible = "samsung,n801x", "samsung,p4note", "samsung,exynos4412", "samsung,exynos4"; > > > > Compatible without the wildcard, so samsung,n8010. > > I went with the n710x style compatible but I'm fine with this, too. > > > > > > + > > > + /* this is the base variant without any kind of modem */ > > > +}; > > > diff --git a/arch/arm/boot/dts/exynos4412-p4note.dtsi b/arch/arm/boot/dts/exynos4412-p4note.dtsi > > > new file mode 100644 > > > index 000000000000..6d7e84f40e92 > > > --- /dev/null > > > +++ b/arch/arm/boot/dts/exynos4412-p4note.dtsi > > > @@ -0,0 +1,1057 @@ > > > +// SPDX-License-Identifier: GPL-2.0 > > > +/* > > > + * Samsung's Exynos4412 based p4note device family base DT > > > + * > > > + * Copyright (c) 2020 Martin Jücker <martin.juecker@gmail.com> > > > + */ > > > + > > > +/dts-v1/; > > > +#include "exynos4412.dtsi" > > > +#include "exynos4412-ppmu-common.dtsi" > > > + > > > +#include <dt-bindings/input/input.h> > > > +#include <dt-bindings/gpio/gpio.h> > > > +#include <dt-bindings/input/gpio-keys.h> > > > > Looks unused. > > Indeed, a leftover while trying things. > > (...) > > > > > > + tsp_reg_1: voltage-regulator-1 { > > > > All labels are not used. > > > > Removed the labels. > > > > + compatible = "regulator-fixed"; > > > + regulator-name = "TSP_FIXED_VOLTAGES_1"; > > > > Would be better to have a real name matching either schematics (which I > > guess you do not have) or vendor sources. > > > > You are right, there is no schematics, the old vendor sources only have > gpio calls with the names TSP_LDO_ON, TSP_LDO_ON1 and TSP_LDO_ON2. Those > regulators are for the Atmel 1664S touchscreen which has a public data > sheet. My best guess would be that those are VDD, AVDD and XVDD but I > have no idea how to match them or whether this is actually an accurate > observation. My electronics knowledge is rather limited. Then how about TSP_LDO1, TSP_LDO2, TSP_LDO3? > > > + pinctrl-names = "default"; > > > + pinctrl-0 = <&tsp_reg_gpio_1>; > > > + gpios = <&gpm4 5 GPIO_ACTIVE_HIGH>; > > > + enable-active-high; > > > + regulator-always-on; > > > + }; > > > + > > > + tsp_reg_2: voltage-regulator-2 { > > > + compatible = "regulator-fixed"; > > > + regulator-name = "TSP_FIXED_VOLTAGES_2"; > > > + pinctrl-names = "default"; > > > + pinctrl-0 = <&tsp_reg_gpio_2>; > > > + gpios = <&gpb 5 GPIO_ACTIVE_HIGH>; > > > + enable-active-high; > > > + regulator-always-on; > > > + }; > > > + > > > + tsp_reg_3: voltage-regulator-3 { > > > + compatible = "regulator-fixed"; > > > + regulator-name = "TSP_FIXED_VOLTAGES_3"; > > > + 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-10 { > > > > Numbering should start from 1 unless there is a reason for 10/14/19? > > > > I used the numbers from the vendor sources but it shouldn't really > matter, changed it. > > > > + 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>; > > > + > > > + ak8975@c { > > > > Node name: magnetometer > > > > Done. > > > > + compatible = "asahi-kasei,ak8975"; > > > + reg = <0x0c>; > > > + interrupt-parent = <&gpm4>; > > > + interrupts = <7 IRQ_TYPE_EDGE_RISING>; > > > + pinctrl-names = "default"; > > > + pinctrl-0 = <&ak8975_irq>; > > > + }; > > > + }; > > > + > > > + i2c-gpio-14 { > > > + 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>; > > > + > > > + max17042@36 { > > > > Node name: fuel-gauge > > > > Done. > > > > + compatible = "maxim,max17042"; > > > + reg = <0x36>; > > > + interrupt-parent = <&gpx2>; > > > + interrupts = <3 IRQ_TYPE_EDGE_FALLING>; > > > > You might need to disable the pull-down on the pin, whcih is usually the > > default. > > > > Found the configuration for this in the vendor sources, it was in a > different place than the rest. > > > > + maxim,rsns-microohm = <10000>; > > > + maxim,over-heat-temp = <600>; > > > + maxim,over-volt = <4300>; > > > + }; > > > + }; > > > + > > > + i2c-gpio-19 { > > > + 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>; > > > + > > > + stmpe_mfd@41 { > > > > Node name: touchscreen? > > Although you already have a touchscreen later, so what is it? > > > > The stmpe 811 is a mfd but the p4note is actually only using the adc > part of it for checking the accessory type of the usb cable and what was > connected to the headphone jack. I renamed it to adc@41 > > > > + compatible = "st,stmpe811"; > > > + reg = <0x41>; > > > + interrupt-parent = <&gpx0>; > > > + interrupts = <1 IRQ_TYPE_LEVEL_LOW>; > > > > Disable the pull-down of interrupt pin? > > > > Same as above. > > > > + interrupt-controller; > > > + irq-trigger = <0x1>; > > > + st,adc-freq = <3>; > > > + st,mod-12b = <1>; > > > + st,ref-sel = <0>; > > > + st,sample-time = <3>; > > > + > > > + stmpe_adc: stmpe_adc { > > > > Node name: adc > > Label seems unused, so remove it. > > > > I removed the label but I cannot rename the node as the name is used by > the driver to find and load the driver for the subcomponent. Ok. > > > > + compatible = "st,stmpe-adc"; > > > + #io-channel-cells = <1>; > > > + st,norequest-mask = <0x2F>; > > > + }; > > > + }; > > > + }; > > > +}; > > > + > > > +&adc { > > > + status = "okay"; > > > > Missing vdd-supply > > > > I'm not sure about the supply here, it's not actually in the vendor > sources. It seems the bootloader is setting this up. The regulator > naming suggests, that it would be LDO23. What should I do here? > Currently no driver is using it but it's needed for the backlight > dimming which I currently still have some trouble with. The LDO23 is most likely for the touch panel ADC, not for the SoC one. Here it could be LDO3. You have to put something otherwise dtschema will complain. Go with the LDO3 and maybe a comment like: "TBD, not confirmed". > > > > +}; > > (...) > > > > + > > > +&i2c_7 { > > > + samsung,i2c-sda-delay = <100>; > > > + samsung,i2c-slave-addr = <0x10>; > > > + samsung,i2c-max-bus-freq = <400000>; > > > + pinctrl-0 = <&i2c7_bus>; > > > + pinctrl-names = "default"; > > > + status = "okay"; > > > + > > > + max77686: max77686_pmic@9 { > > > + compatible = "maxim,max77686"; > > > + interrupt-parent = <&gpx0>; > > > + interrupts = <7 IRQ_TYPE_NONE>; > > > + pinctrl-0 = <&max77686_irq>; > > > + pinctrl-names = "default"; > > > + reg = <0x09>; > > > + #clock-cells = <1>; > > > + > > > + voltage-regulators { > > > > Just "regulators" and no empty line after this. > > > > You should define all regulators here. If some are unknown, keep the > > min-max the same as in driver. > > > > I used the driver to read all the voltages, it also reads values for > the LDOs that are not defined in the DT, so I have values for all of > them setup by the bootloader. What I don't know is their name and what > they are used for. Interestingly apart from two LDOs, the voltages did > match exactly with those from the midas DT, so it could be very > similar. The two non-matching were only off by 0.1V. How should I go > about this? Actually, let's skip the constraints (min-max) for unknown regulators. Just add the entries with generic names, like: arch/arm/boot/dts/exynos5410-odroidxu.dts I would not put here min-max constraints from bootloader because pretty often it has only an initial setup for specific frequency - just to make it booting. If you have the constraints (min-max, always on) from vendor sources, you could add them. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/5] ARM: dts: add Samsung's exynos4412-based p4note boards 2020-10-27 8:17 ` Krzysztof Kozlowski @ 2020-10-29 21:40 ` Martin Juecker 2020-10-30 7:41 ` Marek Szyprowski 0 siblings, 1 reply; 15+ messages in thread From: Martin Juecker @ 2020-10-29 21:40 UTC (permalink / raw) To: Krzysztof Kozlowski; +Cc: linux-samsung-soc, kgene, devicetree On Tue, Oct 27, 2020 at 09:17:51AM +0100, Krzysztof Kozlowski wrote: > On Tue, Oct 27, 2020 at 12:27:09AM +0100, Martin Juecker wrote: > > > > + > > > > + max77686: max77686_pmic@9 { > > > > + compatible = "maxim,max77686"; > > > > + interrupt-parent = <&gpx0>; > > > > + interrupts = <7 IRQ_TYPE_NONE>; > > > > + pinctrl-0 = <&max77686_irq>; > > > > + pinctrl-names = "default"; > > > > + reg = <0x09>; > > > > + #clock-cells = <1>; > > > > + > > > > + voltage-regulators { > > > > > > Just "regulators" and no empty line after this. > > > > > > You should define all regulators here. If some are unknown, keep the > > > min-max the same as in driver. > > > > > > > I used the driver to read all the voltages, it also reads values for > > the LDOs that are not defined in the DT, so I have values for all of > > them setup by the bootloader. What I don't know is their name and what > > they are used for. Interestingly apart from two LDOs, the voltages did > > match exactly with those from the midas DT, so it could be very > > similar. The two non-matching were only off by 0.1V. How should I go > > about this? > > Actually, let's skip the constraints (min-max) for unknown regulators. > Just add the entries with generic names, like: > arch/arm/boot/dts/exynos5410-odroidxu.dts > > I would not put here min-max constraints from bootloader because pretty > often it has only an initial setup for specific frequency - just to make > it booting. > > If you have the constraints (min-max, always on) from vendor sources, > you could add them. > > Best regards, > Krzysztof As all the missing regulators are not defined in the vendor sources, I have no constraints to work with. What I noticed when all the LDOs are defined, the device reboot behaviour is different. Instead of the usual 1-2 seconds for screen off and on again, it's now more like 10 seconds. Cheers Martin ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/5] ARM: dts: add Samsung's exynos4412-based p4note boards 2020-10-29 21:40 ` Martin Juecker @ 2020-10-30 7:41 ` Marek Szyprowski 0 siblings, 0 replies; 15+ messages in thread From: Marek Szyprowski @ 2020-10-30 7:41 UTC (permalink / raw) To: Martin Juecker, Krzysztof Kozlowski; +Cc: linux-samsung-soc, kgene, devicetree Hi Martin, On 29.10.2020 22:40, Martin Juecker wrote: > On Tue, Oct 27, 2020 at 09:17:51AM +0100, Krzysztof Kozlowski wrote: >> On Tue, Oct 27, 2020 at 12:27:09AM +0100, Martin Juecker wrote: >>>>> + >>>>> + max77686: max77686_pmic@9 { >>>>> + compatible = "maxim,max77686"; >>>>> + interrupt-parent = <&gpx0>; >>>>> + interrupts = <7 IRQ_TYPE_NONE>; >>>>> + pinctrl-0 = <&max77686_irq>; >>>>> + pinctrl-names = "default"; >>>>> + reg = <0x09>; >>>>> + #clock-cells = <1>; >>>>> + >>>>> + voltage-regulators { >>>> Just "regulators" and no empty line after this. >>>> >>>> You should define all regulators here. If some are unknown, keep the >>>> min-max the same as in driver. >>>> >>> I used the driver to read all the voltages, it also reads values for >>> the LDOs that are not defined in the DT, so I have values for all of >>> them setup by the bootloader. What I don't know is their name and what >>> they are used for. Interestingly apart from two LDOs, the voltages did >>> match exactly with those from the midas DT, so it could be very >>> similar. The two non-matching were only off by 0.1V. How should I go >>> about this? >> Actually, let's skip the constraints (min-max) for unknown regulators. >> Just add the entries with generic names, like: >> arch/arm/boot/dts/exynos5410-odroidxu.dts >> >> I would not put here min-max constraints from bootloader because pretty >> often it has only an initial setup for specific frequency - just to make >> it booting. >> >> If you have the constraints (min-max, always on) from vendor sources, >> you could add them. >> >> Best regards, >> Krzysztof > As all the missing regulators are not defined in the vendor sources, I > have no constraints to work with. > > What I noticed when all the LDOs are defined, the device reboot > behaviour is different. Instead of the usual 1-2 seconds for screen off > and on again, it's now more like 10 seconds. Then it looks that some regulators get turned off too early and shutdown sequence encounters timeout. You can try to find which regulator is responsible for that by adding 'always-on' property to those regulators and doing the reboot test. Once found you may either keep it as always on, or check in if its consumers are properly defined. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 3/5] ARM: defconfig: add stmpe adc driver for p4note 2020-10-24 14:44 [PATCH 0/5] add exynos4412-based p4note device family support Martin Jücker 2020-10-24 14:44 ` [PATCH 1/5] dt-bindings: samsung: document bindings for p4note family boards Martin Jücker 2020-10-24 14:44 ` [PATCH 2/5] ARM: dts: add Samsung's exynos4412-based p4note boards Martin Jücker @ 2020-10-24 14:44 ` Martin Jücker 2020-10-24 14:44 ` [PATCH 4/5] ARM: defconfig: compile Atmel MXT touchscreeen as module Martin Jücker 2020-10-24 14:44 ` [PATCH 5/5] ARM: exynos: extend cpuidle support to p4note boards Martin Jücker 4 siblings, 0 replies; 15+ messages in thread From: Martin Jücker @ 2020-10-24 14:44 UTC (permalink / raw) To: linux-samsung-soc; +Cc: kgene, krzk, devicetree, martin.juecker Enable the stmpe adc driver for the p4note device family. Signed-off-by: Martin Jücker <martin.juecker@gmail.com> --- arch/arm/configs/exynos_defconfig | 3 +++ arch/arm/configs/multi_v7_defconfig | 2 ++ 2 files changed, 5 insertions(+) diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig index 6e8b5ff0859c..c9581e603a32 100644 --- a/arch/arm/configs/exynos_defconfig +++ b/arch/arm/configs/exynos_defconfig @@ -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 diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index e9e76e32f10f..b3a03e530b57 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -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 -- 2.25.1 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 4/5] ARM: defconfig: compile Atmel MXT touchscreeen as module 2020-10-24 14:44 [PATCH 0/5] add exynos4412-based p4note device family support Martin Jücker ` (2 preceding siblings ...) 2020-10-24 14:44 ` [PATCH 3/5] ARM: defconfig: add stmpe adc driver for p4note Martin Jücker @ 2020-10-24 14:44 ` Martin Jücker 2020-10-24 14:44 ` [PATCH 5/5] ARM: exynos: extend cpuidle support to p4note boards Martin Jücker 4 siblings, 0 replies; 15+ messages in thread From: Martin Jücker @ 2020-10-24 14:44 UTC (permalink / raw) To: linux-samsung-soc; +Cc: kgene, krzk, devicetree, martin.juecker 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. Signed-off-by: Martin Jücker <martin.juecker@gmail.com> --- arch/arm/configs/exynos_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig index c9581e603a32..bad4f3d306ba 100644 --- a/arch/arm/configs/exynos_defconfig +++ b/arch/arm/configs/exynos_defconfig @@ -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 -- 2.25.1 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 5/5] ARM: exynos: extend cpuidle support to p4note boards 2020-10-24 14:44 [PATCH 0/5] add exynos4412-based p4note device family support Martin Jücker ` (3 preceding siblings ...) 2020-10-24 14:44 ` [PATCH 4/5] ARM: defconfig: compile Atmel MXT touchscreeen as module Martin Jücker @ 2020-10-24 14:44 ` Martin Jücker 4 siblings, 0 replies; 15+ messages in thread From: Martin Jücker @ 2020-10-24 14:44 UTC (permalink / raw) To: linux-samsung-soc; +Cc: kgene, krzk, devicetree, martin.juecker The p4note family supports cpuidle, so allow it to make use of this feature. Signed-off-by: Martin Jücker <martin.juecker@gmail.com> --- arch/arm/mach-exynos/exynos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 36c37444485a..093c7a99b8aa 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -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); -- 2.25.1 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v2 0/5] add exynos4412-based p4note device family support @ 2020-10-31 17:58 Martin Jücker 2020-10-31 17:58 ` [PATCH 5/5] ARM: exynos: extend cpuidle support to p4note boards Martin Jücker 0 siblings, 1 reply; 15+ messages in thread From: Martin Jücker @ 2020-10-31 17:58 UTC (permalink / raw) To: linux-samsung-soc; +Cc: kgene, krzk, devicetree 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/20201024144421.34435-1-martin.juecker@gmail.com/ 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 ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 5/5] ARM: exynos: extend cpuidle support to p4note boards 2020-10-31 17:58 [PATCH v2 0/5] add exynos4412-based p4note device family support Martin Jücker @ 2020-10-31 17:58 ` Martin Jücker 0 siblings, 0 replies; 15+ messages in thread From: Martin Jücker @ 2020-10-31 17:58 UTC (permalink / raw) To: linux-samsung-soc; +Cc: kgene, krzk, devicetree, Martin Jücker The p4note family supports cpuidle, so allow it to make use of this feature. Signed-off-by: Martin Jücker <martin.juecker@gmail.com> --- arch/arm/mach-exynos/exynos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 36c37444485a..093c7a99b8aa 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -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); -- 2.25.1 ^ permalink raw reply related [flat|nested] 15+ messages in thread
end of thread, other threads:[~2020-10-31 18:00 UTC | newest] Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-10-24 14:44 [PATCH 0/5] add exynos4412-based p4note device family support Martin Jücker 2020-10-24 14:44 ` [PATCH 1/5] dt-bindings: samsung: document bindings for p4note family boards Martin Jücker 2020-10-30 18:28 ` Rob Herring 2020-10-24 14:44 ` [PATCH 2/5] ARM: dts: add Samsung's exynos4412-based p4note boards Martin Jücker 2020-10-26 11:55 ` Marek Szyprowski 2020-10-26 14:48 ` Krzysztof Kozlowski 2020-10-26 16:00 ` Krzysztof Kozlowski 2020-10-26 23:27 ` Martin Juecker 2020-10-27 8:17 ` Krzysztof Kozlowski 2020-10-29 21:40 ` Martin Juecker 2020-10-30 7:41 ` Marek Szyprowski 2020-10-24 14:44 ` [PATCH 3/5] ARM: defconfig: add stmpe adc driver for p4note Martin Jücker 2020-10-24 14:44 ` [PATCH 4/5] ARM: defconfig: compile Atmel MXT touchscreeen as module Martin Jücker 2020-10-24 14:44 ` [PATCH 5/5] ARM: exynos: extend cpuidle support to p4note boards Martin Jücker 2020-10-31 17:58 [PATCH v2 0/5] add exynos4412-based p4note device family support Martin Jücker 2020-10-31 17:58 ` [PATCH 5/5] ARM: exynos: extend cpuidle support to p4note boards Martin Jücker
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).