2019-01-08 16:57:32

by Paweł Chmiel

[permalink] [raw]
Subject: [PATCH v2 0/4] ARM: dts: s5pv210: aries: Enable more drivers present on Samsung Aries based devices

This patchset enables more drivers for devices present on
Samsung Aries based devices.

Changes from v1:
- Removed already applied patches
- Fixed name of mfc memory reservation nodes
- Added separate patch with savedefconfig result
- Fixed configuration of touchscreen

Jonathan Bakker (1):
ARM: dts: s5pv210: aries: Support for more devices present on Aries

Paweł Chmiel (3):
ARM: dts: s5pv210: aries: Add reserved memory for mfc
ARM: defconfig: s5pv210: Run make savedefconfig
ARM: defconfig: s5pv210: Enable more drivers present on Samsung Aries

arch/arm/boot/dts/s5pv210-aries.dtsi | 90 ++++++++++++++++++++++++++++
arch/arm/configs/s5pv210_defconfig | 41 +++++++++----
2 files changed, 120 insertions(+), 11 deletions(-)

--
2.17.1



2019-01-08 16:57:35

by Paweł Chmiel

[permalink] [raw]
Subject: [PATCH v2 2/4] ARM: dts: s5pv210: aries: Support for more devices present on Aries

From: Jonathan Bakker <[email protected]>

This commit enables following devices present on Aries based phones:
- pwm-vibrator attached to PWM 1
- poweroff support
- Atmel maXTouch touchscreen, connected to i2c2
- Broadcom BCM4329 bluetooth over uart0

Signed-off-by: Jonathan Bakker <[email protected]>
Signed-off-by: Paweł Chmiel <[email protected]>
---
Changes from v1:
- Touchscreen irq pin should have PULL_NONE, since it's already
pulled up with 2.8v
- Touchscreen irq should be edge failing (like in vendor sources)
---
arch/arm/boot/dts/s5pv210-aries.dtsi | 68 ++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)

diff --git a/arch/arm/boot/dts/s5pv210-aries.dtsi b/arch/arm/boot/dts/s5pv210-aries.dtsi
index 89525e56cc7c..8ff70b856334 100644
--- a/arch/arm/boot/dts/s5pv210-aries.dtsi
+++ b/arch/arm/boot/dts/s5pv210-aries.dtsi
@@ -41,6 +41,13 @@
};
};

+ vibrator_pwr: regulator-fixed-0 {
+ compatible = "regulator-fixed";
+ regulator-name = "vibrator-en";
+ enable-active-high;
+ gpio = <&gpj1 1 GPIO_ACTIVE_HIGH>;
+ };
+
wifi_pwrseq: wifi-pwrseq {
compatible = "mmc-pwrseq-simple";
reset-gpios = <&gpg1 2 GPIO_ACTIVE_LOW>;
@@ -314,6 +321,22 @@
reg = <0x36>;
};
};
+
+ vibrator: pwm-vibrator {
+ compatible = "pwm-vibrator";
+ pwms = <&pwm 1 44642 0>;
+ pwm-names = "enable";
+ vcc-supply = <&vibrator_pwr>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm1_out>;
+ };
+
+ poweroff: syscon-poweroff {
+ compatible = "syscon-poweroff";
+ regmap = <&pmu_syscon>;
+ offset = <0x681c>; /* PS_HOLD_CONTROL */
+ value = <0x5200>;
+ };
};

&fimd {
@@ -347,6 +370,23 @@
status = "okay";
};

+&i2c2 {
+ samsung,i2c-sda-delay = <100>;
+ samsung,i2c-max-bus-freq = <400000>;
+ samsung,i2c-slave-addr = <0x10>;
+ status = "okay";
+
+ touchscreen@4a {
+ compatible = "atmel,maxtouch";
+ reg = <0x4a>;
+ interrupt-parent = <&gpj0>;
+ interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&ts_irq>;
+ reset-gpios = <&gpj1 3 GPIO_ACTIVE_HIGH>;
+ };
+};
+
&mfc {
memory-region = <&mfc_left>, <&mfc_right>;
};
@@ -372,6 +412,13 @@
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
};

+ bt_host_wake: bt-host-wake {
+ samsung,pins = "gph2-5";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
+ samsung,pin-pud = <S3C64XX_PIN_PULL_DOWN>;
+ samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+ };
+
tf_detect: tf-detect {
samsung,pins = "gph3-4";
samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
@@ -384,6 +431,17 @@
samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
};
+
+ ts_irq: ts-irq {
+ samsung,pins = "gpj0-5";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
+ samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
+ samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+ };
+};
+
+&pwm {
+ samsung,pwm-outputs = <1>;
};

&sdhci1 {
@@ -421,6 +479,16 @@

&uart0 {
status = "okay";
+
+ bluetooth {
+ compatible = "brcm,bcm43438-bt";
+ max-speed = <115200>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_data &uart0_fctl &bt_host_wake>;
+ shutdown-gpios = <&gpb 3 GPIO_ACTIVE_HIGH>;
+ device-wakeup-gpios = <&gpg3 4 GPIO_ACTIVE_HIGH>;
+ host-wakeup-gpios = <&gph2 5 GPIO_ACTIVE_HIGH>;
+ };
};

&uart1 {
--
2.17.1


2019-01-08 16:57:43

by Paweł Chmiel

[permalink] [raw]
Subject: [PATCH v2 3/4] ARM: defconfig: s5pv210: Run make savedefconfig

This is result of running savedefconfig. It's preparation for adding
support for more hw present on Samsung Aries based devices.

Signed-off-by: Paweł Chmiel <[email protected]>
---
arch/arm/configs/s5pv210_defconfig | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/arm/configs/s5pv210_defconfig b/arch/arm/configs/s5pv210_defconfig
index a077597369f1..0159636d4c0d 100644
--- a/arch/arm/configs/s5pv210_defconfig
+++ b/arch/arm/configs/s5pv210_defconfig
@@ -1,24 +1,24 @@
CONFIG_SYSVIPC=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
+CONFIG_PREEMPT=y
CONFIG_CGROUPS=y
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_KALLSYMS_ALL=y
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_BLK_DEV_BSG is not set
-CONFIG_PARTITION_ADVANCED=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_SOLARIS_X86_PARTITION=y
CONFIG_ARCH_S5PV210=y
CONFIG_VMSPLIT_2G=y
-CONFIG_PREEMPT=y
CONFIG_ARM_APPENDED_DTB=y
CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x20800000,8M console=ttySAC1,115200 init=/linuxrc"
CONFIG_VFP=y
CONFIG_NEON=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_BLK_DEV_BSG is not set
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_BSD_DISKLABEL=y
+CONFIG_SOLARIS_X86_PARTITION=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
@@ -87,6 +87,7 @@ CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ASCII=y
CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_UTF8=y
+CONFIG_CRC_CCITT=y
CONFIG_DEBUG_INFO=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_KERNEL=y
@@ -99,4 +100,3 @@ CONFIG_DEBUG_USER=y
CONFIG_DEBUG_LL=y
CONFIG_DEBUG_S3C_UART1=y
CONFIG_EARLY_PRINTK=y
-CONFIG_CRC_CCITT=y
--
2.17.1


2019-01-08 16:57:53

by Paweł Chmiel

[permalink] [raw]
Subject: [PATCH v2 4/4] ARM: defconfig: s5pv210: Enable more drivers present on Samsung Aries

This commit enables following drivers:
- i2c support (using s3c2410 driver)
- s5p-jpeg
- s5p-mfc
- exynos drm rotator
- pwm support
- pwm vibrator
- fixed regulator
- syscon poweroff
- Atmel maXTouch touchscreen
- Broadcom BCM4329 bluetooth over uart0
- dma devices (so we can use pl330 dma driver)

Disable DEBUG_LL. It's currently set to uart1, but if we want to use it
on Aries, we would need to switch it to uart2, to get any logs.

Signed-off-by: Paweł Chmiel <[email protected]>
Signed-off-by: Jonathan Bakker <[email protected]>
---
arch/arm/configs/s5pv210_defconfig | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/arch/arm/configs/s5pv210_defconfig b/arch/arm/configs/s5pv210_defconfig
index 0159636d4c0d..951196bdf008 100644
--- a/arch/arm/configs/s5pv210_defconfig
+++ b/arch/arm/configs/s5pv210_defconfig
@@ -27,6 +27,11 @@ CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
CONFIG_IP_PNP_RARP=y
+CONFIG_BT=m
+CONFIG_BT_RFCOMM=y
+CONFIG_BT_BNEP=y
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_BCM=y
CONFIG_CFG80211=m
CONFIG_MAC80211=m
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
@@ -44,21 +49,35 @@ CONFIG_INPUT_EVDEV=y
CONFIG_KEYBOARD_GPIO=y
# CONFIG_INPUT_MOUSE is not set
CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_ATMEL_MXT=m
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_PWM_VIBRA=m
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_SAMSUNG=y
CONFIG_SERIAL_SAMSUNG_CONSOLE=y
+CONFIG_SERIAL_DEV_BUS=y
CONFIG_HW_RANDOM=y
CONFIG_I2C_GPIO=y
+CONFIG_I2C_S3C2410=y
+CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_SYSCON_POWEROFF=y
CONFIG_POWER_SUPPLY=y
CONFIG_BATTERY_MAX17040=y
# CONFIG_HWMON is not set
CONFIG_MFD_MAX8998=y
CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_REGULATOR_MAX8998=y
+CONFIG_MEDIA_SUPPORT=m
+CONFIG_MEDIA_CAMERA_SUPPORT=y
+CONFIG_V4L_MEM2MEM_DRIVERS=y
+CONFIG_VIDEO_SAMSUNG_S5P_JPEG=m
+CONFIG_VIDEO_SAMSUNG_S5P_MFC=m
CONFIG_DRM=y
CONFIG_DRM_EXYNOS=y
CONFIG_DRM_EXYNOS_FIMD=y
CONFIG_DRM_EXYNOS_DPI=y
+CONFIG_DRM_EXYNOS_ROTATOR=y
CONFIG_USB=y
CONFIG_USB_OTG=y
CONFIG_USB_EHCI_HCD=y
@@ -72,6 +91,9 @@ CONFIG_MMC_SDHCI_S3C=y
CONFIG_MMC_SDHCI_S3C_DMA=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_MAX8998=m
+CONFIG_DMADEVICES=y
+CONFIG_PWM=y
+CONFIG_PWM_SAMSUNG=y
CONFIG_PHY_SAMSUNG_USB2=m
CONFIG_PHY_S5PV210_USB2=y
CONFIG_EXT2_FS=y
@@ -97,6 +119,3 @@ CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_ATOMIC_SLEEP=y
CONFIG_DEBUG_USER=y
-CONFIG_DEBUG_LL=y
-CONFIG_DEBUG_S3C_UART1=y
-CONFIG_EARLY_PRINTK=y
--
2.17.1


2019-01-08 16:58:23

by Paweł Chmiel

[permalink] [raw]
Subject: [PATCH v2 1/4] ARM: dts: s5pv210: aries: Add reserved memory for mfc

THis commit adds memory reservation required by MFC to run.
On S5PV210 both regions needs to be on separate memory banks.
Size of both regions is taken from stock sources.

Signed-off-by: Paweł Chmiel <[email protected]>
---
Changes from v1:
- Fixed name of nodes to be more generic
---
arch/arm/boot/dts/s5pv210-aries.dtsi | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

diff --git a/arch/arm/boot/dts/s5pv210-aries.dtsi b/arch/arm/boot/dts/s5pv210-aries.dtsi
index 575094ea7024..89525e56cc7c 100644
--- a/arch/arm/boot/dts/s5pv210-aries.dtsi
+++ b/arch/arm/boot/dts/s5pv210-aries.dtsi
@@ -23,6 +23,24 @@
0x50000000 0x08000000>;
};

+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ mfc_left: region@43000000 {
+ compatible = "shared-dma-pool";
+ no-map;
+ reg = <0x43000000 0x2000000>;
+ };
+
+ mfc_right: region@51000000 {
+ compatible = "shared-dma-pool";
+ no-map;
+ reg = <0x51000000 0x2000000>;
+ };
+ };
+
wifi_pwrseq: wifi-pwrseq {
compatible = "mmc-pwrseq-simple";
reset-gpios = <&gpg1 2 GPIO_ACTIVE_LOW>;
@@ -329,6 +347,10 @@
status = "okay";
};

+&mfc {
+ memory-region = <&mfc_left>, <&mfc_right>;
+};
+
&pinctrl0 {
wlan_bt_en: wlan-bt-en {
samsung,pins = "gpb-5";
--
2.17.1


2019-01-11 09:16:16

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 1/4] ARM: dts: s5pv210: aries: Add reserved memory for mfc

On Tue, 8 Jan 2019 at 17:56, Paweł Chmiel
<[email protected]> wrote:
>
> THis commit adds memory reservation required by MFC to run.
> On S5PV210 both regions needs to be on separate memory banks.
> Size of both regions is taken from stock sources.
>
> Signed-off-by: Paweł Chmiel <[email protected]>
> ---
> Changes from v1:
> - Fixed name of nodes to be more generic
> ---

Thanks, applied.

Best regards,
Krzysztof

2019-01-11 11:03:35

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 2/4] ARM: dts: s5pv210: aries: Support for more devices present on Aries

On Tue, 8 Jan 2019 at 17:56, Paweł Chmiel
<[email protected]> wrote:
>
> From: Jonathan Bakker <[email protected]>
>
> This commit enables following devices present on Aries based phones:
> - pwm-vibrator attached to PWM 1
> - poweroff support
> - Atmel maXTouch touchscreen, connected to i2c2
> - Broadcom BCM4329 bluetooth over uart0
>
> Signed-off-by: Jonathan Bakker <[email protected]>
> Signed-off-by: Paweł Chmiel <[email protected]>
> ---
> Changes from v1:
> - Touchscreen irq pin should have PULL_NONE, since it's already
> pulled up with 2.8v
> - Touchscreen irq should be edge failing (like in vendor sources)
> ---
> arch/arm/boot/dts/s5pv210-aries.dtsi | 68 ++++++++++++++++++++++++++++
> 1 file changed, 68 insertions(+)

Thanks, applied.

Best regards,
Krzysztof