From patchwork Sun Jul 16 22:05:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markuss Broks X-Patchwork-Id: 13316406 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qL9uN-00G1rJ-0Z for linux-arm-kernel@lists.infradead.org; Sun, 16 Jul 2023 22:08:04 +0000 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2b74fa5e7d7so57825021fa.2 for ; Sun, 16 Jul 2023 15:08:01 -0700 (PDT) From: Markuss Broks Subject: [PATCH 1/7] ARM: dts: exynos: k3g: Add WiFi card support Date: Mon, 17 Jul 2023 01:05:02 +0300 Message-ID: <20230716220644.22158-2-markuss.broks@gmail.com> In-Reply-To: <20230716220644.22158-1-markuss.broks@gmail.com> References: <20230716220644.22158-1-markuss.broks@gmail.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+lwn-linux-arm-kernel=archive.lwn.net@lists.infradead.org List-Archive: To: Krzysztof Kozlowski Cc: Markuss Broks , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org This device has Broadcom BCM4354 WiFi card installed, which uses SDIO interface. Signed-off-by: Markuss Broks --- arch/arm/boot/dts/exynos5422-samsung-k3g.dts | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts index c35261a338ff..1a11a6993ba7 100644 --- a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts +++ b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts @@ -48,6 +48,13 @@ tsp_vdd: regulator-tsp-vdd-en { gpio = <&gpy3 5 GPIO_ACTIVE_HIGH>; enable-active-high; }; + + wlan_pwrseq: wlan-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpy7 7 GPIO_ACTIVE_LOW>; /* WIFI_EN */ + clocks = <&s2mps11_osc S2MPS11_CLK_BT>; /* Used not only for Bluetooth */ + clock-names = "ext_clock"; + }; }; &cpu0 { @@ -616,6 +623,23 @@ &mmc_0 { bus-width = <8>; }; +/* WiFi SDIO module */ +&mmc_1 { + status = "okay"; + cap-sdio-irq; + cap-sd-highspeed; + non-removable; + samsung,dw-mshc-ciu-div = <1>; + samsung,dw-mshc-sdr-timing = <0 1>; + samsung,dw-mshc-ddr-timing = <0 2>; + pinctrl-names = "default"; + pinctrl-0 = <&sd1_clk>, <&sd1_cmd>, <&sd1_int>, <&sd1_bus1>, + <&sd1_bus4>, <&wlan_reset>; + bus-width = <4>; + vqmmc-supply = <&ldo3_reg>; + mmc-pwrseq = <&wlan_pwrseq>; +}; + &pinctrl_0 { s2mps11_irq: s2mps11-irq-pins { samsung,pins = "gpx0-7"; @@ -628,6 +652,11 @@ touch_irq: touch-irq-pins { samsung,pins = "gpx1-6"; samsung,pin-pud = ; }; + + wlan_reset: wlan-reset { + samsung,pins = "gpy7-7"; + samsung,pin-pud = ; + }; }; &rtc { From patchwork Sun Jul 16 22:05:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markuss Broks X-Patchwork-Id: 13316369 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qL9uN-00G1rr-2S for linux-arm-kernel@lists.infradead.org; Sun, 16 Jul 2023 22:08:05 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-4fba03becc6so6324767e87.0 for ; Sun, 16 Jul 2023 15:08:02 -0700 (PDT) From: Markuss Broks Subject: [PATCH 2/7] ARM: dts: exynos: Add GPIO keys support for k3g Date: Mon, 17 Jul 2023 01:05:03 +0300 Message-ID: <20230716220644.22158-3-markuss.broks@gmail.com> In-Reply-To: <20230716220644.22158-1-markuss.broks@gmail.com> References: <20230716220644.22158-1-markuss.broks@gmail.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+lwn-linux-arm-kernel=archive.lwn.net@lists.infradead.org List-Archive: To: Krzysztof Kozlowski Cc: Markuss Broks , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Add the four physical buttons support, volume buttons have external pull-up resistors. Signed-off-by: Markuss Broks --- arch/arm/boot/dts/exynos5422-samsung-k3g.dts | 60 ++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts index 1a11a6993ba7..c3e006dc34ea 100644 --- a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts +++ b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts @@ -8,6 +8,7 @@ /dts-v1/; #include #include +#include #include #include "exynos5800.dtsi" #include "exynos5422-cpus.dtsi" @@ -21,6 +22,45 @@ / { aliases { mmc0 = &mmc_0; + mmc1 = &mmc_1; + }; + + gpio-keys { + compatible = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&power_gpio &volume_up_gpio &volume_down_gpio &home_gpio>; + + key-volume-up { + label = "Volume Up"; + gpios = <&gpx0 2 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = ; + debounce-interval = <15>; + }; + + key-volume-down { + label = "Volume Down"; + gpios = <&gpx0 3 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <15>; + }; + + key-home { + label = "Home"; + gpios = <&gpx0 5 GPIO_ACTIVE_LOW>; + linux,code = ; + wakeup-source; + debounce-interval = <15>; + }; + + key-power { + label = "Power"; + gpios = <&gpx2 2 GPIO_ACTIVE_LOW>; + linux,code = ; + wakeup-source; + debounce-interval = <15>; + }; }; memory@20000000 { @@ -641,6 +681,21 @@ &mmc_1 { }; &pinctrl_0 { + volume_up_gpio: volume-up-pins { + samsung,pins = "gpx0-2"; + samsung,pin-pud = ; /* External pull up */ + }; + + volume_down_gpio: volume-down-pins { + samsung,pins = "gpx0-3"; + samsung,pin-pud = ; /* External pull up */ + }; + + home_gpio: home-key-pins { + samsung,pins = "gpx0-5"; + samsung,pin-pud = ; + }; + s2mps11_irq: s2mps11-irq-pins { samsung,pins = "gpx0-7"; samsung,pin-function = ; @@ -653,6 +708,11 @@ touch_irq: touch-irq-pins { samsung,pin-pud = ; }; + power_gpio: power-key-pins { + samsung,pins = "gpx2-2"; + samsung,pin-pud = ; + }; + wlan_reset: wlan-reset { samsung,pins = "gpy7-7"; samsung,pin-pud = ; From patchwork Sun Jul 16 22:05:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markuss Broks X-Patchwork-Id: 13316371 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qL9uP-00G1u6-22 for linux-arm-kernel@lists.infradead.org; Sun, 16 Jul 2023 22:08:06 +0000 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-4fb960b7c9dso6121466e87.0 for ; Sun, 16 Jul 2023 15:08:05 -0700 (PDT) From: Markuss Broks Subject: [PATCH 3/7] ARM: dts: exynos: k3g: Add fuel gauge support Date: Mon, 17 Jul 2023 01:05:05 +0300 Message-ID: <20230716220644.22158-5-markuss.broks@gmail.com> In-Reply-To: <20230716220644.22158-1-markuss.broks@gmail.com> References: <20230716220644.22158-1-markuss.broks@gmail.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+lwn-linux-arm-kernel=archive.lwn.net@lists.infradead.org List-Archive: To: Krzysztof Kozlowski Cc: Markuss Broks , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org This device has Maxim MAX17048 fuel gauge, just like its Snapdragon counterpart. It inherits the double capacity issue. Signed-off-by: Markuss Broks --- arch/arm/boot/dts/exynos5422-samsung-k3g.dts | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts index c3e006dc34ea..582faedd6aab 100644 --- a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts +++ b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts @@ -80,6 +80,30 @@ firmware@2073000 { reg = <0x02073000 0x1000>; }; + i2c-battery { + compatible = "i2c-gpio"; + + sda-gpios = <&gpb0 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpb0 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <2>; + + #address-cells = <1>; + #size-cells = <0>; + + battery@36 { + compatible = "maxim,max17048"; + reg = <0x36>; + + interrupt-parent = <&gpx1>; + interrupts = <5 IRQ_TYPE_EDGE_FALLING>; + + pinctrl-names = "default"; + pinctrl-0 = <&battery_irq>; + + maxim,double-soc; /* Reports double the capacity */ + }; + }; + tsp_vdd: regulator-tsp-vdd-en { compatible = "regulator-fixed"; regulator-name = "tsp_vdd_en"; @@ -703,6 +727,11 @@ s2mps11_irq: s2mps11-irq-pins { samsung,pin-drv = ; }; + battery_irq: battery-irq-pins { + samsung,pins = "gpx1-5"; + samsung,pin-pud = ; + }; + touch_irq: touch-irq-pins { samsung,pins = "gpx1-6"; samsung,pin-pud = ; From patchwork Sun Jul 16 22:05:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markuss Broks X-Patchwork-Id: 13316373 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qL9uR-00G1vG-1Q for linux-arm-kernel@lists.infradead.org; Sun, 16 Jul 2023 22:08:08 +0000 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2b703cbfaf5so54840951fa.1 for ; Sun, 16 Jul 2023 15:08:06 -0700 (PDT) From: Markuss Broks Subject: [PATCH 4/7] ARM: dts: exynos: k3g: Add touchkeys support Date: Mon, 17 Jul 2023 01:05:06 +0300 Message-ID: <20230716220644.22158-6-markuss.broks@gmail.com> In-Reply-To: <20230716220644.22158-1-markuss.broks@gmail.com> References: <20230716220644.22158-1-markuss.broks@gmail.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+lwn-linux-arm-kernel=archive.lwn.net@lists.infradead.org List-Archive: To: Krzysztof Kozlowski Cc: Markuss Broks , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org This device has touch keys that are compatible with those installed on Samsung TM2 dev board. Signed-off-by: Markuss Broks --- arch/arm/boot/dts/exynos5422-samsung-k3g.dts | 32 ++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts index 582faedd6aab..b3576a745054 100644 --- a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts +++ b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts @@ -104,6 +104,33 @@ battery@36 { }; }; + i2c-touchkey { + compatible = "i2c-gpio"; + + sda-gpios = <&gpd1 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpd1 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <2>; + + #address-cells = <1>; + #size-cells = <0>; + + touchkey@20 { + compatible = "cypress,tm2-touchkey"; + reg = <0x20>; + + interrupt-parent = <&gpy7>; + interrupts = <1 IRQ_TYPE_EDGE_FALLING>; + + pinctrl-names = "default"; + pinctrl-0 = <&touchkey_irq>; + + vcc-supply = <&ldo38_reg>; + vdd-supply = <&ldo30_reg>; + + linux,keycodes = ; + }; + }; + tsp_vdd: regulator-tsp-vdd-en { compatible = "regulator-fixed"; regulator-name = "tsp_vdd_en"; @@ -742,6 +769,11 @@ power_gpio: power-key-pins { samsung,pin-pud = ; }; + touchkey_irq: touchkey-irq-pins { + samsung,pins = "gpy7-1"; + samsung,pin-pud = ; + }; + wlan_reset: wlan-reset { samsung,pins = "gpy7-7"; samsung,pin-pud = ; From patchwork Sun Jul 16 22:05:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markuss Broks X-Patchwork-Id: 13316390 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qL9uT-00G1wB-06 for linux-arm-kernel@lists.infradead.org; Sun, 16 Jul 2023 22:08:10 +0000 Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2b74310566cso57621501fa.2 for ; Sun, 16 Jul 2023 15:08:07 -0700 (PDT) From: Markuss Broks Subject: [PATCH 5/7] ARM: dts: exynos: k3g: Add notification LED support Date: Mon, 17 Jul 2023 01:05:07 +0300 Message-ID: <20230716220644.22158-7-markuss.broks@gmail.com> In-Reply-To: <20230716220644.22158-1-markuss.broks@gmail.com> References: <20230716220644.22158-1-markuss.broks@gmail.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+lwn-linux-arm-kernel=archive.lwn.net@lists.infradead.org List-Archive: To: Krzysztof Kozlowski Cc: Markuss Broks , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org This device has a Texas Instruments LP5562 LED controller which controls the LEDs which are used as notification lights. It has three colors which can be combined, supports pulse mode and other various features. Signed-off-by: Markuss Broks --- arch/arm/boot/dts/exynos5422-samsung-k3g.dts | 47 ++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts index b3576a745054..813dbf0438de 100644 --- a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts +++ b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts @@ -10,6 +10,7 @@ #include #include #include +#include #include "exynos5800.dtsi" #include "exynos5422-cpus.dtsi" @@ -131,6 +132,52 @@ touchkey@20 { }; }; + i2c-led { + compatible = "i2c-gpio"; + + sda-gpios = <&gpy3 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpy3 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <2>; + + #address-cells = <1>; + #size-cells = <0>; + + lp5562@30 { + compatible = "ti,lp5562"; + reg = <0x30>; + + clock-mode = /bits/ 8 <2>; + label = "notification-leds"; + + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + chan-name = "notification-red"; + color = ; + led-cur = /bits/ 8 <0x40>; + max-cur = /bits/ 8 <0x40>; + }; + + led@1 { + reg = <1>; + chan-name = "notification-green"; + color = ; + led-cur = /bits/ 8 <0x40>; + max-cur = /bits/ 8 <0x40>; + }; + + led@2 { + reg = <2>; + chan-name = "notification-blue"; + color = ; + led-cur = /bits/ 8 <0x40>; + max-cur = /bits/ 8 <0x40>; + }; + }; + }; + tsp_vdd: regulator-tsp-vdd-en { compatible = "regulator-fixed"; regulator-name = "tsp_vdd_en"; From patchwork Sun Jul 16 22:05:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markuss Broks X-Patchwork-Id: 13316377 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qL9uT-00G1xB-00 for linux-arm-kernel@lists.infradead.org; Sun, 16 Jul 2023 22:08:10 +0000 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-4fbbfaacfc1so6038362e87.1 for ; Sun, 16 Jul 2023 15:08:08 -0700 (PDT) From: Markuss Broks Subject: [PATCH 6/7] ARM: dts: exynos: k3g: Document the devices which are not supported Date: Mon, 17 Jul 2023 01:05:08 +0300 Message-ID: <20230716220644.22158-8-markuss.broks@gmail.com> In-Reply-To: <20230716220644.22158-1-markuss.broks@gmail.com> References: <20230716220644.22158-1-markuss.broks@gmail.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+lwn-linux-arm-kernel=archive.lwn.net@lists.infradead.org List-Archive: To: Krzysztof Kozlowski Cc: Markuss Broks , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Add placeholders for peripherals which we currently lack support for. This includes Maxim MAX86900 heart rate sensor and oximeter, which seems to be similar to other health sensors by Maxim, but it is not fully compatible; STM32F401 MCU which acts like a sensor hub, which can be flashed and controlled via the SPI bus, for which I made some simple firmware to check if it's possible to program with custom code, and it appears you can do so, but at the moment kernel lacks the APIs to either control sensors directly through the MCU or any standards for a sensor hub, so it's laid off; WM5110 audio codec which fails to communicate for some reason. Signed-off-by: Markuss Broks --- arch/arm/boot/dts/exynos5422-samsung-k3g.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts index 813dbf0438de..e019b630db94 100644 --- a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts +++ b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts @@ -743,6 +743,24 @@ rmi4-f12@12 { }; }; +&i2c_3 { + status = "okay"; + + /* Maxim MAX86900 heart rate sensor and oximeter on address 0x57 */ +}; + +&spi_0 { + status = "okay"; + + /* STMicroelectronics STM32F401 MCU to which sensors are connected */ +}; + +&spi_2 { + status = "okay"; + + /* Wolfson WM5110 audio codec */ +}; + /* eMMC flash */ &mmc_0 { status = "okay"; From patchwork Sun Jul 16 22:05:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markuss Broks X-Patchwork-Id: 13316386 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qL9uU-00G1yN-2i for linux-arm-kernel@lists.infradead.org; Sun, 16 Jul 2023 22:08:12 +0000 Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2b933bbd3eeso21525241fa.1 for ; Sun, 16 Jul 2023 15:08:10 -0700 (PDT) From: Markuss Broks Subject: [PATCH 7/7] ARM: dts: exynos: k3g: Add display support Date: Mon, 17 Jul 2023 01:05:09 +0300 Message-ID: <20230716220644.22158-9-markuss.broks@gmail.com> In-Reply-To: <20230716220644.22158-1-markuss.broks@gmail.com> References: <20230716220644.22158-1-markuss.broks@gmail.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+lwn-linux-arm-kernel=archive.lwn.net@lists.infradead.org List-Archive: To: Krzysztof Kozlowski Cc: Markuss Broks , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org This device has Samsung S6E3FA2 DSI display installed, this adds the device-tree bindings for it but two things prevent it from being fully usable: one is a bug in Exynos5 DSI subsystem, which I believe is not tested properly; the bug occurs randomly regardless of any variables, but it seems to occur less if the Exynos DRM kernel module is loaded later in the kernel boot process (the bug concludes in display filling with static) ; another issue is that efforts to support the S6E3FA2 panel are still going on, and the driver for the panel is not in the kernel tree yet. Signed-off-by: Markuss Broks --- arch/arm/boot/dts/exynos5422-samsung-k3g.dts | 41 ++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts index e019b630db94..954de392afbf 100644 --- a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts +++ b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts @@ -203,6 +203,42 @@ &cpu4 { cpu-supply = <&buck6_reg>; }; +&mixer { + status = "okay"; +}; + +&fimd { + status = "okay"; + samsung,invert-vclk; +}; + +&dsi { + status = "okay"; + + samsung,pll-clock-frequency = <24000000>; + samsung,burst-clock-frequency = <500000000>; + samsung,esc-clock-frequency = <16000000>; + + vddcore-supply = <&ldo8_reg>; + vddio-supply = <&ldo10_reg>; + + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + reg = <0>; + compatible = "samsung,s6e3fa2"; + + reset-gpios = <&gpy7 4 GPIO_ACTIVE_LOW>; + + vddio-supply = <&ldo25_reg>; + vdd-supply = <&ldo28_reg>; + + pinctrl-names = "default"; + pinctrl-0 = <&display_reset>; + }; +}; + &gpu { status = "okay"; mali-supply = <&buck4_reg>; @@ -839,6 +875,11 @@ touchkey_irq: touchkey-irq-pins { samsung,pin-pud = ; }; + display_reset: display-reset-pins { + samsung,pins = "gpy7-4"; + samsung,pin-pud = ; + }; + wlan_reset: wlan-reset { samsung,pins = "gpy7-7"; samsung,pin-pud = ;