* [PATCH 0/4] ARM: dts: omap: omap4-epson-embt2ws: misc gpio definitions
@ 2024-09-30 21:30 Andreas Kemnade
2024-09-30 21:30 ` [PATCH 1/4] ARM: dts: omap: omap4-epson-embt2ws: define GPIO regulators Andreas Kemnade
` (4 more replies)
0 siblings, 5 replies; 15+ messages in thread
From: Andreas Kemnade @ 2024-09-30 21:30 UTC (permalink / raw)
To: Conor Dooley, Krzysztof Kozlowski, linux-kernel, Rob Herring,
khilman, devicetree, tony, rogerq, aaro.koskinen, linux-omap
Cc: Andreas Kemnade
Bring the system into a more defined state and do not rely
on things being initialized by bootloader.
Andreas Kemnade (4):
ARM: dts: omap: omap4-epson-embt2ws: define GPIO regulators
ARM: dts: omap: omap4-epson-embt2ws: wire up regulators
ARM: dts: omap: omap4-epson-embt2ws: add unknown gpio outputs
ARM: dts: omap: omap4-epson-embt2ws: add GPIO expander
.../boot/dts/ti/omap/omap4-epson-embt2ws.dts | 175 +++++++++++++++++-
1 file changed, 171 insertions(+), 4 deletions(-)
--
2.39.5
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/4] ARM: dts: omap: omap4-epson-embt2ws: define GPIO regulators
2024-09-30 21:30 [PATCH 0/4] ARM: dts: omap: omap4-epson-embt2ws: misc gpio definitions Andreas Kemnade
@ 2024-09-30 21:30 ` Andreas Kemnade
2024-10-04 7:24 ` Roger Quadros
2024-09-30 21:30 ` [PATCH 2/4] ARM: dts: omap: omap4-epson-embt2ws: wire up regulators Andreas Kemnade
` (3 subsequent siblings)
4 siblings, 1 reply; 15+ messages in thread
From: Andreas Kemnade @ 2024-09-30 21:30 UTC (permalink / raw)
To: Conor Dooley, Krzysztof Kozlowski, linux-kernel, Rob Herring,
khilman, devicetree, tony, rogerq, aaro.koskinen, linux-omap
Cc: Andreas Kemnade
To properly have things running after cold boot, define
GPIO regulators. Naming is based on board file.
In the vendor kernel they are enabled in a function
called bt2ws_dcdc_init() if the system is not booted just
to charge the battery.
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
.../boot/dts/ti/omap/omap4-epson-embt2ws.dts | 73 +++++++++++++++++++
1 file changed, 73 insertions(+)
diff --git a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
index 339e52ba3614..d6b0abba19f6 100644
--- a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
+++ b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
@@ -29,6 +29,42 @@ backlight-right {
power-supply = <&unknown_supply>;
};
+ cb_v18: cb-v18 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&cb_v18_pins>;
+ compatible = "regulator-fixed";
+ regulator-name = "cb_v18";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ cb_v33: cb-v33 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&cb_v33_pins>;
+ compatible = "regulator-fixed";
+ regulator-name = "cb_v33";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ gpio = <&gpio6 30 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ cb-v50 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&cb_v50_pins>;
+ compatible = "regulator-fixed";
+ regulator-name = "cb_v50";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ gpio = <&gpio6 31 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
chosen {
stdout-path = &uart3;
};
@@ -46,6 +82,19 @@ key-lock {
};
};
+ lb_v50: lb-v50 {
+ /* required for many things at the head (probably indirectly) */
+ pinctrl-names = "default";
+ pinctrl-0 = <&lb_v50_pins>;
+ compatible = "regulator-fixed";
+ regulator-name = "lb_v50";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ gpio = <&gpio1 27 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
unknown_supply: unknown-supply {
compatible = "regulator-fixed";
regulator-name = "unknown";
@@ -336,6 +385,24 @@ OMAP4_IOPAD(0x1ca, PIN_OUTPUT | MUX_MODE3) /* gpio25 */
>;
};
+ cb_v18_pins: pinmux-cb-v18-pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x1d0, PIN_OUTPUT | MUX_MODE3) /* gpio28 */
+ >;
+ };
+
+ cb_v33_pins: pinmux-cb-v33-pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x1d2, PIN_OUTPUT | MUX_MODE3) /* gpio190 */
+ >;
+ };
+
+ cb_v50_pins: pinmux-cb-v50-pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x1d4, PIN_OUTPUT | MUX_MODE3) /* gpio191 */
+ >;
+ };
+
gpio_keys_pins: pinmux-gpio-key-pins {
pinctrl-single,pins = <
OMAP4_IOPAD(0x56, PIN_INPUT_PULLUP | MUX_MODE3) /* gpio35 */
@@ -387,6 +454,12 @@ OMAP4_IOPAD(0x005c, PIN_OUTPUT | MUX_MODE1)
>;
};
+ lb_v50_pins: pinmux-lb-v50-pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x1ce, PIN_OUTPUT | MUX_MODE3) /* gpio27 */
+ >;
+ };
+
mcbsp2_pins: pinmux-mcbsp2-pins {
pinctrl-single,pins = <
OMAP4_IOPAD(0x0f6, PIN_INPUT | MUX_MODE0) /* abe_mcbsp2_clkx */
--
2.39.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/4] ARM: dts: omap: omap4-epson-embt2ws: wire up regulators
2024-09-30 21:30 [PATCH 0/4] ARM: dts: omap: omap4-epson-embt2ws: misc gpio definitions Andreas Kemnade
2024-09-30 21:30 ` [PATCH 1/4] ARM: dts: omap: omap4-epson-embt2ws: define GPIO regulators Andreas Kemnade
@ 2024-09-30 21:30 ` Andreas Kemnade
2024-10-04 7:25 ` Roger Quadros
2024-10-04 7:38 ` Roger Quadros
2024-09-30 21:30 ` [PATCH 3/4] ARM: dts: omap: omap4-epson-embt2ws: add unknown gpio outputs Andreas Kemnade
` (2 subsequent siblings)
4 siblings, 2 replies; 15+ messages in thread
From: Andreas Kemnade @ 2024-09-30 21:30 UTC (permalink / raw)
To: Conor Dooley, Krzysztof Kozlowski, linux-kernel, Rob Herring,
khilman, devicetree, tony, rogerq, aaro.koskinen, linux-omap
Cc: Andreas Kemnade
Wire up the regulators where usage is plausible. Do not
wire them if purpose/usage is unclear like 5V for
many things requiring lower voltages.
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
index d6b0abba19f6..cc1b6080bf95 100644
--- a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
+++ b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
@@ -20,13 +20,13 @@ memory@80000000 {
backlight-left {
compatible = "pwm-backlight";
pwms = <&twl_pwm 1 7812500>;
- power-supply = <&unknown_supply>;
+ power-supply = <&lb_v50>;
};
backlight-right {
compatible = "pwm-backlight";
pwms = <&twl_pwm 0 7812500>;
- power-supply = <&unknown_supply>;
+ power-supply = <&lb_v50>;
};
cb_v18: cb-v18 {
@@ -95,11 +95,6 @@ lb_v50: lb-v50 {
enable-active-high;
};
- unknown_supply: unknown-supply {
- compatible = "regulator-fixed";
- regulator-name = "unknown";
- };
-
wl12xx_pwrseq: wl12xx-pwrseq {
compatible = "mmc-pwrseq-simple";
clocks = <&twl 1>;
@@ -308,6 +303,8 @@ mpu9150: imu@68 {
pinctrl-0 = <&mpu9150_pins>;
interrupt-parent = <&gpio2>;
interrupt = <7 IRQ_TYPE_LEVEL_HIGH>;
+ vddio-supply = <&cb_v18>;
+ vdd-supply = <&cb_v33>;
invensense,level-shifter;
};
};
--
2.39.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/4] ARM: dts: omap: omap4-epson-embt2ws: add unknown gpio outputs
2024-09-30 21:30 [PATCH 0/4] ARM: dts: omap: omap4-epson-embt2ws: misc gpio definitions Andreas Kemnade
2024-09-30 21:30 ` [PATCH 1/4] ARM: dts: omap: omap4-epson-embt2ws: define GPIO regulators Andreas Kemnade
2024-09-30 21:30 ` [PATCH 2/4] ARM: dts: omap: omap4-epson-embt2ws: wire up regulators Andreas Kemnade
@ 2024-09-30 21:30 ` Andreas Kemnade
2024-10-04 7:53 ` Roger Quadros
2024-09-30 21:30 ` [PATCH 4/4] ARM: dts: omap: omap4-epson-embt2ws: add GPIO expander Andreas Kemnade
2024-10-02 3:52 ` [PATCH 0/4] ARM: dts: omap: omap4-epson-embt2ws: misc gpio definitions Rob Herring (Arm)
4 siblings, 1 reply; 15+ messages in thread
From: Andreas Kemnade @ 2024-09-30 21:30 UTC (permalink / raw)
To: Conor Dooley, Krzysztof Kozlowski, linux-kernel, Rob Herring,
khilman, devicetree, tony, rogerq, aaro.koskinen, linux-omap
Cc: Andreas Kemnade
Set them to the state seen in a running system, initialized
by vendor u-boot or kernel. Add line names where they are defined in the
vendor kernel.
gpio15 resets something in the display, otherwise meaning of the
gpios is not known.
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
.../boot/dts/ti/omap/omap4-epson-embt2ws.dts | 84 +++++++++++++++++++
1 file changed, 84 insertions(+)
diff --git a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
index cc1b6080bf95..c8205ae89840 100644
--- a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
+++ b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
@@ -115,6 +115,65 @@ wl12xx_vmmc: wl12xx-vmmc {
};
};
+&gpio1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&gpio1_hog_pins &gpio1wk_hog_pins>;
+
+ lb-reset-hog {
+ gpio-hog;
+ gpios = <9 GPIO_ACTIVE_HIGH>;
+ output-low;
+ line-name = "lb_reset";
+ };
+
+ power-en-hog {
+ gpio-hog;
+ gpios = <10 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "power_en";
+ };
+
+ panel-power-en-hog {
+ gpio-hog;
+ gpios = <14 GPIO_ACTIVE_HIGH>;
+ output-low;
+ line-name = "panel_power_en";
+ };
+
+ blc-r-hog {
+ gpio-hog;
+ gpios = <17 GPIO_ACTIVE_HIGH>;
+ output-low;
+ line-name = "blc_r";
+ };
+
+ blc-l-hog {
+ gpio-hog;
+ gpios = <16 GPIO_ACTIVE_HIGH>;
+ output-low;
+ line-name = "blc_l";
+ };
+
+ high-hog {
+ gpio-hog;
+ gpios = <15 GPIO_ACTIVE_HIGH /* maybe dsi to dpi chip reset? */
+ 21 GPIO_ACTIVE_HIGH
+ 26 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "unknown-high";
+ };
+
+ low-hog {
+ gpio-hog;
+ gpios = <18 GPIO_ACTIVE_HIGH
+ 19 GPIO_ACTIVE_HIGH
+ 20 GPIO_ACTIVE_HIGH
+ 22 GPIO_ACTIVE_HIGH>;
+ output-low;
+ line-name = "unknown-low";
+ };
+};
+
&i2c1 {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
@@ -406,6 +465,22 @@ OMAP4_IOPAD(0x56, PIN_INPUT_PULLUP | MUX_MODE3) /* gpio35 */
>;
};
+ gpio1_hog_pins: pinmux-gpio1-hog-pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x1b4, PIN_OUTPUT | MUX_MODE3) /* gpio14 */
+ OMAP4_IOPAD(0x1b8, PIN_OUTPUT | MUX_MODE3) /* gpio16 */
+ OMAP4_IOPAD(0x1ba, PIN_OUTPUT | MUX_MODE3) /* gpio17 */
+
+ OMAP4_IOPAD(0x1b6, PIN_OUTPUT | MUX_MODE3) /* gpio15 */
+ OMAP4_IOPAD(0x1bc, PIN_OUTPUT | MUX_MODE3) /* gpio18 */
+ OMAP4_IOPAD(0x1be, PIN_OUTPUT | MUX_MODE3) /* gpio19 */
+ OMAP4_IOPAD(0x1c0, PIN_OUTPUT | MUX_MODE3) /* gpio20 */
+ OMAP4_IOPAD(0x1c2, PIN_OUTPUT | MUX_MODE3) /* gpio21 */
+ OMAP4_IOPAD(0x1c4, PIN_OUTPUT | MUX_MODE3) /* gpio22 */
+ OMAP4_IOPAD(0x1cc, PIN_OUTPUT | MUX_MODE3) /* gpio26 */
+ >;
+ };
+
i2c1_pins: pinmux-i2c1-pins {
pinctrl-single,pins = <
OMAP4_IOPAD(0x122, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_scl */
@@ -527,6 +602,15 @@ OMAP4_IOPAD(0x1c8, PIN_OUTPUT | MUX_MODE3) /* gpio_24 / WLAN_EN */
};
};
+&omap4_pmx_wkup {
+ gpio1wk_hog_pins: pinmux-gpio1wk-hog-pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x68, PIN_INPUT_PULLDOWN | MUX_MODE3) /* gpio9 */
+ OMAP4_IOPAD(0x6a, PIN_INPUT | MUX_MODE3) /* gpio10 */
+ >;
+ };
+};
+
&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&uart2_pins &bt_pins>;
--
2.39.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 4/4] ARM: dts: omap: omap4-epson-embt2ws: add GPIO expander
2024-09-30 21:30 [PATCH 0/4] ARM: dts: omap: omap4-epson-embt2ws: misc gpio definitions Andreas Kemnade
` (2 preceding siblings ...)
2024-09-30 21:30 ` [PATCH 3/4] ARM: dts: omap: omap4-epson-embt2ws: add unknown gpio outputs Andreas Kemnade
@ 2024-09-30 21:30 ` Andreas Kemnade
2024-10-02 3:52 ` [PATCH 0/4] ARM: dts: omap: omap4-epson-embt2ws: misc gpio definitions Rob Herring (Arm)
4 siblings, 0 replies; 15+ messages in thread
From: Andreas Kemnade @ 2024-09-30 21:30 UTC (permalink / raw)
To: Conor Dooley, Krzysztof Kozlowski, linux-kernel, Rob Herring,
khilman, devicetree, tony, rogerq, aaro.koskinen, linux-omap
Cc: Andreas Kemnade
Define the GPIO expander which controls at least some camera gpios.
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
index c8205ae89840..ecd727e65761 100644
--- a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
+++ b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
@@ -291,6 +291,19 @@ &i2c2 {
clock-frequency = <200000>;
+ /* is sometimes not available, research needed */
+ gpio_head: gpio@20 {
+ compatible = "ti,tca6408";
+ reg = <0x20>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
+ /*
+ * camera chip at 0x3c, available if <&gpio_head 1> high
+ * and <&gpio_head 5> low
+ */
+
/* at head/glasses */
mpu9150h: imu@68 {
compatible = "invensense,mpu9150";
--
2.39.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 0/4] ARM: dts: omap: omap4-epson-embt2ws: misc gpio definitions
2024-09-30 21:30 [PATCH 0/4] ARM: dts: omap: omap4-epson-embt2ws: misc gpio definitions Andreas Kemnade
` (3 preceding siblings ...)
2024-09-30 21:30 ` [PATCH 4/4] ARM: dts: omap: omap4-epson-embt2ws: add GPIO expander Andreas Kemnade
@ 2024-10-02 3:52 ` Rob Herring (Arm)
4 siblings, 0 replies; 15+ messages in thread
From: Rob Herring (Arm) @ 2024-10-02 3:52 UTC (permalink / raw)
To: Andreas Kemnade
Cc: Conor Dooley, khilman, tony, Krzysztof Kozlowski, linux-kernel,
devicetree, linux-omap, aaro.koskinen, rogerq
On Mon, 30 Sep 2024 23:30:04 +0200, Andreas Kemnade wrote:
> Bring the system into a more defined state and do not rely
> on things being initialized by bootloader.
>
> Andreas Kemnade (4):
> ARM: dts: omap: omap4-epson-embt2ws: define GPIO regulators
> ARM: dts: omap: omap4-epson-embt2ws: wire up regulators
> ARM: dts: omap: omap4-epson-embt2ws: add unknown gpio outputs
> ARM: dts: omap: omap4-epson-embt2ws: add GPIO expander
>
> .../boot/dts/ti/omap/omap4-epson-embt2ws.dts | 175 +++++++++++++++++-
> 1 file changed, 171 insertions(+), 4 deletions(-)
>
> --
> 2.39.5
>
>
>
My bot found new DTB warnings on the .dts files added or changed in this
series.
Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.
If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:
pip3 install dtschema --upgrade
New warnings running 'make CHECK_DTBS=y ti/omap/omap4-epson-embt2ws.dtb' for 20240930213008.159647-1-andreas@kemnade.info:
arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dtb: serial@0: {'compatible': ['ti,omap4-uart'], 'reg': [[0, 256]], 'interrupts': [[0, 74, 4]], 'clock-frequency': 48000000, 'pinctrl-names': ['default'], 'pinctrl-0': [[115]], 'interrupts-extended': [[1, 0, 74, 4], [116, 260]], '$nodename': ['serial@0']} is valid under each of {'required': ['interrupts-extended']}, {'required': ['interrupts']}
from schema $id: http://devicetree.org/schemas/serial/8250_omap.yaml#
arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dtb: serial@0: {'compatible': ['ti,omap4-uart'], 'reg': [[0, 256]], 'interrupts': [[0, 73, 4]], 'clock-frequency': 48000000, 'pinctrl-names': ['default'], 'pinctrl-0': [[118, 119]], 'interrupts-extended': [[1, 0, 73, 4], [116, 220]], 'bluetooth-gnss': {'compatible': ['ti,wl1283-st'], 'enable-gpios': [[120, 25, 0]], 'clocks': [[121, 1]], 'clock-names': ['ext_clock']}, '$nodename': ['serial@0']} is valid under each of {'required': ['interrupts-extended']}, {'required': ['interrupts']}
from schema $id: http://devicetree.org/schemas/serial/8250_omap.yaml#
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/4] ARM: dts: omap: omap4-epson-embt2ws: define GPIO regulators
2024-09-30 21:30 ` [PATCH 1/4] ARM: dts: omap: omap4-epson-embt2ws: define GPIO regulators Andreas Kemnade
@ 2024-10-04 7:24 ` Roger Quadros
2024-10-04 7:41 ` Andreas Kemnade
0 siblings, 1 reply; 15+ messages in thread
From: Roger Quadros @ 2024-10-04 7:24 UTC (permalink / raw)
To: Andreas Kemnade, Conor Dooley, Krzysztof Kozlowski, linux-kernel,
Rob Herring, khilman, devicetree, tony, aaro.koskinen, linux-omap
On 01/10/2024 00:30, Andreas Kemnade wrote:
> To properly have things running after cold boot, define
> GPIO regulators. Naming is based on board file.
>
> In the vendor kernel they are enabled in a function
> called bt2ws_dcdc_init() if the system is not booted just
> to charge the battery.
>
> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> ---
> .../boot/dts/ti/omap/omap4-epson-embt2ws.dts | 73 +++++++++++++++++++
> 1 file changed, 73 insertions(+)
>
> diff --git a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
> index 339e52ba3614..d6b0abba19f6 100644
> --- a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
> +++ b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
> @@ -29,6 +29,42 @@ backlight-right {
> power-supply = <&unknown_supply>;
> };
>
> + cb_v18: cb-v18 {
https://devicetree-specification.readthedocs.io/en/v0.3/devicetree-basics.html#generic-names-recommendation
So regulator@n
where n is some index if it can't be address.
> + pinctrl-names = "default";
> + pinctrl-0 = <&cb_v18_pins>;
> + compatible = "regulator-fixed";
> + regulator-name = "cb_v18";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-always-on;
> + gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
> + enable-active-high;
> + };
> +
> + cb_v33: cb-v33 {
here
> + pinctrl-names = "default";
> + pinctrl-0 = <&cb_v33_pins>;
> + compatible = "regulator-fixed";
> + regulator-name = "cb_v33";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-always-on;
> + gpio = <&gpio6 30 GPIO_ACTIVE_HIGH>;
> + enable-active-high;
> + };
> +
> + cb-v50 {
here too
> + pinctrl-names = "default";
> + pinctrl-0 = <&cb_v50_pins>;
> + compatible = "regulator-fixed";
> + regulator-name = "cb_v50";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + regulator-always-on;
> + gpio = <&gpio6 31 GPIO_ACTIVE_HIGH>;
> + enable-active-high;
> + };
> +
> chosen {
> stdout-path = &uart3;
> };
> @@ -46,6 +82,19 @@ key-lock {
> };
> };
>
> + lb_v50: lb-v50 {
and here as well
> + /* required for many things at the head (probably indirectly) */
> + pinctrl-names = "default";
> + pinctrl-0 = <&lb_v50_pins>;
> + compatible = "regulator-fixed";
> + regulator-name = "lb_v50";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + regulator-always-on;
> + gpio = <&gpio1 27 GPIO_ACTIVE_HIGH>;
> + enable-active-high;
> + };
> +
> unknown_supply: unknown-supply {
> compatible = "regulator-fixed";
> regulator-name = "unknown";
> @@ -336,6 +385,24 @@ OMAP4_IOPAD(0x1ca, PIN_OUTPUT | MUX_MODE3) /* gpio25 */
> >;
> };
>
> + cb_v18_pins: pinmux-cb-v18-pins {
> + pinctrl-single,pins = <
> + OMAP4_IOPAD(0x1d0, PIN_OUTPUT | MUX_MODE3) /* gpio28 */
> + >;
> + };
> +
> + cb_v33_pins: pinmux-cb-v33-pins {
> + pinctrl-single,pins = <
> + OMAP4_IOPAD(0x1d2, PIN_OUTPUT | MUX_MODE3) /* gpio190 */
> + >;
> + };
> +
> + cb_v50_pins: pinmux-cb-v50-pins {
> + pinctrl-single,pins = <
> + OMAP4_IOPAD(0x1d4, PIN_OUTPUT | MUX_MODE3) /* gpio191 */
> + >;
> + };
> +
> gpio_keys_pins: pinmux-gpio-key-pins {
> pinctrl-single,pins = <
> OMAP4_IOPAD(0x56, PIN_INPUT_PULLUP | MUX_MODE3) /* gpio35 */
> @@ -387,6 +454,12 @@ OMAP4_IOPAD(0x005c, PIN_OUTPUT | MUX_MODE1)
> >;
> };
>
> + lb_v50_pins: pinmux-lb-v50-pins {
> + pinctrl-single,pins = <
> + OMAP4_IOPAD(0x1ce, PIN_OUTPUT | MUX_MODE3) /* gpio27 */
> + >;
> + };
> +
> mcbsp2_pins: pinmux-mcbsp2-pins {
> pinctrl-single,pins = <
> OMAP4_IOPAD(0x0f6, PIN_INPUT | MUX_MODE0) /* abe_mcbsp2_clkx */
--
cheers,
-roger
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/4] ARM: dts: omap: omap4-epson-embt2ws: wire up regulators
2024-09-30 21:30 ` [PATCH 2/4] ARM: dts: omap: omap4-epson-embt2ws: wire up regulators Andreas Kemnade
@ 2024-10-04 7:25 ` Roger Quadros
2024-10-04 7:38 ` Roger Quadros
1 sibling, 0 replies; 15+ messages in thread
From: Roger Quadros @ 2024-10-04 7:25 UTC (permalink / raw)
To: Andreas Kemnade, Conor Dooley, Krzysztof Kozlowski, linux-kernel,
Rob Herring, khilman, devicetree, tony, aaro.koskinen, linux-omap
On 01/10/2024 00:30, Andreas Kemnade wrote:
> Wire up the regulators where usage is plausible. Do not
> wire them if purpose/usage is unclear like 5V for
> many things requiring lower voltages.
>
> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/4] ARM: dts: omap: omap4-epson-embt2ws: wire up regulators
2024-09-30 21:30 ` [PATCH 2/4] ARM: dts: omap: omap4-epson-embt2ws: wire up regulators Andreas Kemnade
2024-10-04 7:25 ` Roger Quadros
@ 2024-10-04 7:38 ` Roger Quadros
2024-10-04 9:01 ` Andreas Kemnade
1 sibling, 1 reply; 15+ messages in thread
From: Roger Quadros @ 2024-10-04 7:38 UTC (permalink / raw)
To: Andreas Kemnade, Conor Dooley, Krzysztof Kozlowski, linux-kernel,
Rob Herring, khilman, devicetree, tony, aaro.koskinen, linux-omap
On 01/10/2024 00:30, Andreas Kemnade wrote:
> Wire up the regulators where usage is plausible. Do not
> wire them if purpose/usage is unclear like 5V for
> many things requiring lower voltages.
>
> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> ---
> arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
> index d6b0abba19f6..cc1b6080bf95 100644
> --- a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
> +++ b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
> @@ -20,13 +20,13 @@ memory@80000000 {
> backlight-left {
> compatible = "pwm-backlight";
> pwms = <&twl_pwm 1 7812500>;
> - power-supply = <&unknown_supply>;
> + power-supply = <&lb_v50>;
This is probably wrong. I noticed this while reviewing patch 3.
you probably want to wire this to blc_l?
> };
>
> backlight-right {
> compatible = "pwm-backlight";
> pwms = <&twl_pwm 0 7812500>;
> - power-supply = <&unknown_supply>;
> + power-supply = <&lb_v50>;
this one should be wired to blc_r?
> };
>
> cb_v18: cb-v18 {
> @@ -95,11 +95,6 @@ lb_v50: lb-v50 {
> enable-active-high;
> };
>
> - unknown_supply: unknown-supply {
> - compatible = "regulator-fixed";
> - regulator-name = "unknown";
> - };
> -
> wl12xx_pwrseq: wl12xx-pwrseq {
> compatible = "mmc-pwrseq-simple";
> clocks = <&twl 1>;
> @@ -308,6 +303,8 @@ mpu9150: imu@68 {
> pinctrl-0 = <&mpu9150_pins>;
> interrupt-parent = <&gpio2>;
> interrupt = <7 IRQ_TYPE_LEVEL_HIGH>;
> + vddio-supply = <&cb_v18>;
> + vdd-supply = <&cb_v33>;
> invensense,level-shifter;
> };
> };
--
cheers,
-roger
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/4] ARM: dts: omap: omap4-epson-embt2ws: define GPIO regulators
2024-10-04 7:24 ` Roger Quadros
@ 2024-10-04 7:41 ` Andreas Kemnade
2024-10-04 7:55 ` Roger Quadros
0 siblings, 1 reply; 15+ messages in thread
From: Andreas Kemnade @ 2024-10-04 7:41 UTC (permalink / raw)
To: Roger Quadros
Cc: Conor Dooley, Krzysztof Kozlowski, linux-kernel, Rob Herring,
khilman, devicetree, tony, aaro.koskinen, linux-omap
Am Fri, 4 Oct 2024 10:24:32 +0300
schrieb Roger Quadros <rogerq@kernel.org>:
> On 01/10/2024 00:30, Andreas Kemnade wrote:
> > To properly have things running after cold boot, define
> > GPIO regulators. Naming is based on board file.
> >
> > In the vendor kernel they are enabled in a function
> > called bt2ws_dcdc_init() if the system is not booted just
> > to charge the battery.
> >
> > Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> > ---
> > .../boot/dts/ti/omap/omap4-epson-embt2ws.dts | 73
> > +++++++++++++++++++ 1 file changed, 73 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
> > b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts index
> > 339e52ba3614..d6b0abba19f6 100644 ---
> > a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts +++
> > b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts @@ -29,6 +29,42
> > @@ backlight-right { power-supply = <&unknown_supply>;
> > };
> >
> > + cb_v18: cb-v18 {
>
> https://devicetree-specification.readthedocs.io/en/v0.3/devicetree-basics.html#generic-names-recommendation
>
>
> So regulator@n
> where n is some index if it can't be address.
>
No, no @n. The above link says: "If the node has no reg property, the
@unit-address must be omitted and the node-name alone differentiates
the node from other nodes at the same level in the tree." So
probably regulator-cb-v18.
Regards,
Andreas
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/4] ARM: dts: omap: omap4-epson-embt2ws: add unknown gpio outputs
2024-09-30 21:30 ` [PATCH 3/4] ARM: dts: omap: omap4-epson-embt2ws: add unknown gpio outputs Andreas Kemnade
@ 2024-10-04 7:53 ` Roger Quadros
2024-10-04 11:33 ` Andreas Kemnade
0 siblings, 1 reply; 15+ messages in thread
From: Roger Quadros @ 2024-10-04 7:53 UTC (permalink / raw)
To: Andreas Kemnade, Conor Dooley, Krzysztof Kozlowski, linux-kernel,
Rob Herring, khilman, devicetree, tony, aaro.koskinen, linux-omap
On 01/10/2024 00:30, Andreas Kemnade wrote:
> Set them to the state seen in a running system, initialized
> by vendor u-boot or kernel. Add line names where they are defined in the
> vendor kernel.
> gpio15 resets something in the display, otherwise meaning of the
> gpios is not known.
>
> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> ---
> .../boot/dts/ti/omap/omap4-epson-embt2ws.dts | 84 +++++++++++++++++++
> 1 file changed, 84 insertions(+)
>
> diff --git a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
> index cc1b6080bf95..c8205ae89840 100644
> --- a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
> +++ b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
> @@ -115,6 +115,65 @@ wl12xx_vmmc: wl12xx-vmmc {
> };
> };
> > +&gpio1 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&gpio1_hog_pins &gpio1wk_hog_pins>;
> +
> + lb-reset-hog {
> + gpio-hog;
> + gpios = <9 GPIO_ACTIVE_HIGH>;
> + output-low;
> + line-name = "lb_reset";
> + };
Just curious, what does lb stand for.
> +
> + power-en-hog {
> + gpio-hog;
> + gpios = <10 GPIO_ACTIVE_HIGH>;
> + output-high;
> + line-name = "power_en";
> + };
> +
> + panel-power-en-hog {
> + gpio-hog;
> + gpios = <14 GPIO_ACTIVE_HIGH>;
> + output-low;
> + line-name = "panel_power_en";
> + };
Is panel always enabled? I didn't see a panel driver
else it could be hooked to panel regulator?
> +
> + blc-r-hog {
> + gpio-hog;
> + gpios = <17 GPIO_ACTIVE_HIGH>;
> + output-low;
> + line-name = "blc_r";
> + };
this should be modeled as a gpio regulator and paried to backlight left?
> +
> + blc-l-hog {
> + gpio-hog;
> + gpios = <16 GPIO_ACTIVE_HIGH>;
> + output-low;
> + line-name = "blc_l";
> + };
this should be modeled as a gpio regulator and paried to backlight right?
> +
> + high-hog {
> + gpio-hog;
> + gpios = <15 GPIO_ACTIVE_HIGH /* maybe dsi to dpi chip reset? */
> + 21 GPIO_ACTIVE_HIGH
> + 26 GPIO_ACTIVE_HIGH>;
> + output-high;
> + line-name = "unknown-high";
> + };
> +
> + low-hog {
> + gpio-hog;
> + gpios = <18 GPIO_ACTIVE_HIGH
> + 19 GPIO_ACTIVE_HIGH
> + 20 GPIO_ACTIVE_HIGH
> + 22 GPIO_ACTIVE_HIGH>;
> + output-low;
> + line-name = "unknown-low";
> + };
These are probably OK as we don't know their actual function.
> +};
> +
> &i2c1 {
> pinctrl-names = "default";
> pinctrl-0 = <&i2c1_pins>;
> @@ -406,6 +465,22 @@ OMAP4_IOPAD(0x56, PIN_INPUT_PULLUP | MUX_MODE3) /* gpio35 */
> >;
> };
>
> + gpio1_hog_pins: pinmux-gpio1-hog-pins {
> + pinctrl-single,pins = <
> + OMAP4_IOPAD(0x1b4, PIN_OUTPUT | MUX_MODE3) /* gpio14 */
> + OMAP4_IOPAD(0x1b8, PIN_OUTPUT | MUX_MODE3) /* gpio16 */
> + OMAP4_IOPAD(0x1ba, PIN_OUTPUT | MUX_MODE3) /* gpio17 */
> +
> + OMAP4_IOPAD(0x1b6, PIN_OUTPUT | MUX_MODE3) /* gpio15 */
> + OMAP4_IOPAD(0x1bc, PIN_OUTPUT | MUX_MODE3) /* gpio18 */
> + OMAP4_IOPAD(0x1be, PIN_OUTPUT | MUX_MODE3) /* gpio19 */
> + OMAP4_IOPAD(0x1c0, PIN_OUTPUT | MUX_MODE3) /* gpio20 */
> + OMAP4_IOPAD(0x1c2, PIN_OUTPUT | MUX_MODE3) /* gpio21 */
> + OMAP4_IOPAD(0x1c4, PIN_OUTPUT | MUX_MODE3) /* gpio22 */
> + OMAP4_IOPAD(0x1cc, PIN_OUTPUT | MUX_MODE3) /* gpio26 */
> + >;
> + };
> +
> i2c1_pins: pinmux-i2c1-pins {
> pinctrl-single,pins = <
> OMAP4_IOPAD(0x122, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_scl */
> @@ -527,6 +602,15 @@ OMAP4_IOPAD(0x1c8, PIN_OUTPUT | MUX_MODE3) /* gpio_24 / WLAN_EN */
> };
> };
>
> +&omap4_pmx_wkup {
> + gpio1wk_hog_pins: pinmux-gpio1wk-hog-pins {
> + pinctrl-single,pins = <
> + OMAP4_IOPAD(0x68, PIN_INPUT_PULLDOWN | MUX_MODE3) /* gpio9 */
> + OMAP4_IOPAD(0x6a, PIN_INPUT | MUX_MODE3) /* gpio10 */
> + >;
> + };
> +};
> +
> &uart2 {
> pinctrl-names = "default";
> pinctrl-0 = <&uart2_pins &bt_pins>;
--
cheers,
-roger
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/4] ARM: dts: omap: omap4-epson-embt2ws: define GPIO regulators
2024-10-04 7:41 ` Andreas Kemnade
@ 2024-10-04 7:55 ` Roger Quadros
0 siblings, 0 replies; 15+ messages in thread
From: Roger Quadros @ 2024-10-04 7:55 UTC (permalink / raw)
To: Andreas Kemnade
Cc: Conor Dooley, Krzysztof Kozlowski, linux-kernel, Rob Herring,
khilman, devicetree, tony, aaro.koskinen, linux-omap
On 04/10/2024 10:41, Andreas Kemnade wrote:
> Am Fri, 4 Oct 2024 10:24:32 +0300
> schrieb Roger Quadros <rogerq@kernel.org>:
>
>> On 01/10/2024 00:30, Andreas Kemnade wrote:
>>> To properly have things running after cold boot, define
>>> GPIO regulators. Naming is based on board file.
>>>
>>> In the vendor kernel they are enabled in a function
>>> called bt2ws_dcdc_init() if the system is not booted just
>>> to charge the battery.
>>>
>>> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
>>> ---
>>> .../boot/dts/ti/omap/omap4-epson-embt2ws.dts | 73
>>> +++++++++++++++++++ 1 file changed, 73 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
>>> b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts index
>>> 339e52ba3614..d6b0abba19f6 100644 ---
>>> a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts +++
>>> b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts @@ -29,6 +29,42
>>> @@ backlight-right { power-supply = <&unknown_supply>;
>>> };
>>>
>>> + cb_v18: cb-v18 {
>>
>> https://devicetree-specification.readthedocs.io/en/v0.3/devicetree-basics.html#generic-names-recommendation
>>
>>
>> So regulator@n
>> where n is some index if it can't be address.
>>
> No, no @n. The above link says: "If the node has no reg property, the
> @unit-address must be omitted and the node-name alone differentiates
> the node from other nodes at the same level in the tree." So
> probably regulator-cb-v18.
Yes, I agree.
--
cheers,
-roger
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/4] ARM: dts: omap: omap4-epson-embt2ws: wire up regulators
2024-10-04 7:38 ` Roger Quadros
@ 2024-10-04 9:01 ` Andreas Kemnade
2024-10-04 9:45 ` Roger Quadros
0 siblings, 1 reply; 15+ messages in thread
From: Andreas Kemnade @ 2024-10-04 9:01 UTC (permalink / raw)
To: Roger Quadros
Cc: Conor Dooley, Krzysztof Kozlowski, linux-kernel, Rob Herring,
khilman, devicetree, tony, aaro.koskinen, linux-omap
Am Fri, 4 Oct 2024 10:38:22 +0300
schrieb Roger Quadros <rogerq@kernel.org>:
> On 01/10/2024 00:30, Andreas Kemnade wrote:
> > Wire up the regulators where usage is plausible. Do not
> > wire them if purpose/usage is unclear like 5V for
> > many things requiring lower voltages.
> >
> > Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> > ---
> > arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts | 11 ++++-------
> > 1 file changed, 4 insertions(+), 7 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
> > b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts index
> > d6b0abba19f6..cc1b6080bf95 100644 ---
> > a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts +++
> > b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts @@ -20,13
> > +20,13 @@ memory@80000000 { backlight-left {
> > compatible = "pwm-backlight";
> > pwms = <&twl_pwm 1 7812500>;
> > - power-supply = <&unknown_supply>;
> > + power-supply = <&lb_v50>;
>
> This is probably wrong. I noticed this while reviewing patch 3.
>
> you probably want to wire this to blc_l?
>
No idea was blc_l is. I did not find any code handling blc_l.
looking at the vendor kernel:
$ grep -R BLC_L_GPIO *
arch/arm/mach-omap2/board-bt2ws.c:#define BLC_L_GPIO
16 /* LB LED GPIO */ arch/arm/mach-omap2/board-bt2ws.c:
{BLC_L_GPIO, GPIOF_OUT_INIT_LOW, "gpio_blc_l" },
arch/arm/mach-omap2/board-bt2ws.c: gpio_export(BLC_L_GPIO, 0);
arch/arm/mach-omap2/board-bt2ts.c:#define BLC_L_GPIO
16 /* LB LED GPIO */ arch/arm/mach-omap2/board-bt2ts.c:
{BLC_L_GPIO, GPIOF_OUT_INIT_LOW, "gpio_blc_l" },
arch/arm/mach-omap2/board-bt2ts.c: gpio_export(BLC_L_GPIO, 0);
These two gpios are exported. But they seem not to influence
backlight in any way. I just tested again to make sure. Maybe it is just
a leftover from earlier board revisions.
> > };
> >
> > backlight-right {
> > compatible = "pwm-backlight";
> > pwms = <&twl_pwm 0 7812500>;
> > - power-supply = <&unknown_supply>;
> > + power-supply = <&lb_v50>;
>
> this one should be wired to blc_r?
>
Same as with blc_l.
$ grep -R BLC_R_GPIO *
arch/arm/mach-omap2/board-bt2ws.c:#define BLC_R_GPIO
17 /* LB LED GPIO */ arch/arm/mach-omap2/board-bt2ws.c:
{BLC_R_GPIO, GPIOF_OUT_INIT_LOW, "gpio_blc_r" },
arch/arm/mach-omap2/board-bt2ws.c: gpio_export(BLC_R_GPIO, 0);
arch/arm/mach-omap2/board-bt2ts.c:#define BLC_R_GPIO
17 /* LB LED GPIO */ arch/arm/mach-omap2/board-bt2ts.c:
{BLC_R_GPIO, GPIOF_OUT_INIT_LOW, "gpio_blc_r" },
arch/arm/mach-omap2/board-bt2ts.c: gpio_export(BLC_R_GPIO, 0);
Regards,
Andreas
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/4] ARM: dts: omap: omap4-epson-embt2ws: wire up regulators
2024-10-04 9:01 ` Andreas Kemnade
@ 2024-10-04 9:45 ` Roger Quadros
0 siblings, 0 replies; 15+ messages in thread
From: Roger Quadros @ 2024-10-04 9:45 UTC (permalink / raw)
To: Andreas Kemnade
Cc: Conor Dooley, Krzysztof Kozlowski, linux-kernel, Rob Herring,
khilman, devicetree, tony, aaro.koskinen, linux-omap
On 04/10/2024 12:01, Andreas Kemnade wrote:
> Am Fri, 4 Oct 2024 10:38:22 +0300
> schrieb Roger Quadros <rogerq@kernel.org>:
>
>> On 01/10/2024 00:30, Andreas Kemnade wrote:
>>> Wire up the regulators where usage is plausible. Do not
>>> wire them if purpose/usage is unclear like 5V for
>>> many things requiring lower voltages.
>>>
>>> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
>>> ---
>>> arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts | 11 ++++-------
>>> 1 file changed, 4 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
>>> b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts index
>>> d6b0abba19f6..cc1b6080bf95 100644 ---
>>> a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts +++
>>> b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts @@ -20,13
>>> +20,13 @@ memory@80000000 { backlight-left {
>>> compatible = "pwm-backlight";
>>> pwms = <&twl_pwm 1 7812500>;
>>> - power-supply = <&unknown_supply>;
>>> + power-supply = <&lb_v50>;
>>
>> This is probably wrong. I noticed this while reviewing patch 3.
>>
>> you probably want to wire this to blc_l?
>>
> No idea was blc_l is. I did not find any code handling blc_l.
> looking at the vendor kernel:
>
> $ grep -R BLC_L_GPIO *
> arch/arm/mach-omap2/board-bt2ws.c:#define BLC_L_GPIO
> 16 /* LB LED GPIO */ arch/arm/mach-omap2/board-bt2ws.c:
> {BLC_L_GPIO, GPIOF_OUT_INIT_LOW, "gpio_blc_l" },
> arch/arm/mach-omap2/board-bt2ws.c: gpio_export(BLC_L_GPIO, 0);
> arch/arm/mach-omap2/board-bt2ts.c:#define BLC_L_GPIO
> 16 /* LB LED GPIO */ arch/arm/mach-omap2/board-bt2ts.c:
> {BLC_L_GPIO, GPIOF_OUT_INIT_LOW, "gpio_blc_l" },
> arch/arm/mach-omap2/board-bt2ts.c: gpio_export(BLC_L_GPIO, 0);
>
> These two gpios are exported. But they seem not to influence
> backlight in any way. I just tested again to make sure. Maybe it is just
> a leftover from earlier board revisions.
OK. you could then leave it as it is now.
>
>>> };
>>>
>>> backlight-right {
>>> compatible = "pwm-backlight";
>>> pwms = <&twl_pwm 0 7812500>;
>>> - power-supply = <&unknown_supply>;
>>> + power-supply = <&lb_v50>;
>>
>> this one should be wired to blc_r?
>>
> Same as with blc_l.
> $ grep -R BLC_R_GPIO *
> arch/arm/mach-omap2/board-bt2ws.c:#define BLC_R_GPIO
> 17 /* LB LED GPIO */ arch/arm/mach-omap2/board-bt2ws.c:
> {BLC_R_GPIO, GPIOF_OUT_INIT_LOW, "gpio_blc_r" },
> arch/arm/mach-omap2/board-bt2ws.c: gpio_export(BLC_R_GPIO, 0);
> arch/arm/mach-omap2/board-bt2ts.c:#define BLC_R_GPIO
> 17 /* LB LED GPIO */ arch/arm/mach-omap2/board-bt2ts.c:
> {BLC_R_GPIO, GPIOF_OUT_INIT_LOW, "gpio_blc_r" },
> arch/arm/mach-omap2/board-bt2ts.c: gpio_export(BLC_R_GPIO, 0);
>
> Regards,
> Andreas
--
cheers,
-roger
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/4] ARM: dts: omap: omap4-epson-embt2ws: add unknown gpio outputs
2024-10-04 7:53 ` Roger Quadros
@ 2024-10-04 11:33 ` Andreas Kemnade
0 siblings, 0 replies; 15+ messages in thread
From: Andreas Kemnade @ 2024-10-04 11:33 UTC (permalink / raw)
To: Roger Quadros
Cc: Conor Dooley, Krzysztof Kozlowski, linux-kernel, Rob Herring,
khilman, devicetree, tony, aaro.koskinen, linux-omap
Am Fri, 4 Oct 2024 10:53:57 +0300
schrieb Roger Quadros <rogerq@kernel.org>:
> On 01/10/2024 00:30, Andreas Kemnade wrote:
> > Set them to the state seen in a running system, initialized
> > by vendor u-boot or kernel. Add line names where they are defined
> > in the vendor kernel.
> > gpio15 resets something in the display, otherwise meaning of the
> > gpios is not known.
> >
> > Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> > ---
> > .../boot/dts/ti/omap/omap4-epson-embt2ws.dts | 84
> > +++++++++++++++++++ 1 file changed, 84 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts
> > b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts index
> > cc1b6080bf95..c8205ae89840 100644 ---
> > a/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts +++
> > b/arch/arm/boot/dts/ti/omap/omap4-epson-embt2ws.dts @@ -115,6
> > +115,65 @@ wl12xx_vmmc: wl12xx-vmmc { };
> > };
> > > +&gpio1 {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&gpio1_hog_pins &gpio1wk_hog_pins>;
> > +
> > + lb-reset-hog {
> > + gpio-hog;
> > + gpios = <9 GPIO_ACTIVE_HIGH>;
> > + output-low;
> > + line-name = "lb_reset";
> > + };
>
> Just curious, what does lb stand for.
>
me too. Maybe b is the same as in cb
static struct gpio bt2ws_lb_gpios[] = {
{BLC_L_GPIO, GPIOF_OUT_INIT_LOW, "gpio_blc_l" },
{BLC_R_GPIO, GPIOF_OUT_INIT_LOW, "gpio_blc_r" },
{LB_RESET_GPIO,GPIOF_OUT_INIT_LOW, "gpio_lb_reset"},
{POWER_EN_GPIO,GPIOF_OUT_INIT_HIGH, "gpio_power_en"},
{PANEL_POWER_EN_GPIO,GPIOF_OUT_INIT_LOW, "gpio_panel_power_en"},
};
That is what is in the vendor kernel and matches
> > +
> > + power-en-hog {
> > + gpio-hog;
> > + gpios = <10 GPIO_ACTIVE_HIGH>;
> > + output-high;
> > + line-name = "power_en";
> > + };
> > +
> > + panel-power-en-hog {
> > + gpio-hog;
> > + gpios = <14 GPIO_ACTIVE_HIGH>;
> > + output-low;
> > + line-name = "panel_power_en";
> > + };
>
> Is panel always enabled? I didn't see a panel driver
> else it could be hooked to panel regulator?
>
Panels are behind two dsi to dpi converters.
I have a driver. At the moment, I boot into vendor
v3.0 kernel, reprogram boot order, warm reboot into mainline u-boot +
kernel to get display working. I can read registers via dsi at least
after blanking the panel for the first time. Blanking/unblanking seems
to work.
With a low pulse on gpio15 I can reset something in the display which
the vendor kernel can recover from but not my mainline driver. Then no
communication with the display seem to work.
About gpio 10/14 I know only the name (from the possibly kernel sources
and matching /sys/kernel/debug/gpio). And that knowledge I want to
forward into the formal hardware description, the device tree.
$ grep -R PANEL_POWER_EN *
arch/arm/mach-omap2/board-bt2ws.c:
{PANEL_POWER_EN_GPIO,GPIOF_OUT_INIT_LOW, "gpio_panel_power_en"},
arch/arm/mach-omap2/board-bt2ts.c:
{PANEL_POWER_EN_GPIO,GPIOF_OUT_INIT_LOW, "gpio_panel_power_en"},
include/video/omap-panel-bt2.h:#define PANEL_POWER_EN_GPIO 14 // GPIO
But I did not get the supposed vendor kernel to fully boot. I have the verdict
that I do not have the exact sources of the kernel which is running.
I also did not notice any change in behaviour when toggling these gpios.
So either they are a leftover from another board revision or something
gets supplied by some parasitic ways.
I think the best is to explain the situation more in the comments.
What is a bit difficult is here is that there is something done in the m3
processors but apparently nothing vital to having display output (tried
with an initrd without any m3 firmware), probably
doing something camera-related, so the kernel sources do not give a full
picture of the hardware anyways.
BTW: do you know how to best trace gpio changes done by the vendor kernel
without recompiling it? I managed to write a module deviating the master_xfre
function for i2c to log things.
> > +
> > + blc-r-hog {
> > + gpio-hog;
> > + gpios = <17 GPIO_ACTIVE_HIGH>;
> > + output-low;
> > + line-name = "blc_r";
> > + };
>
> this should be modeled as a gpio regulator and paried to backlight
> left?
>
Discussed in patch 2.
Regards,
Andreas
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2024-10-04 11:33 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-30 21:30 [PATCH 0/4] ARM: dts: omap: omap4-epson-embt2ws: misc gpio definitions Andreas Kemnade
2024-09-30 21:30 ` [PATCH 1/4] ARM: dts: omap: omap4-epson-embt2ws: define GPIO regulators Andreas Kemnade
2024-10-04 7:24 ` Roger Quadros
2024-10-04 7:41 ` Andreas Kemnade
2024-10-04 7:55 ` Roger Quadros
2024-09-30 21:30 ` [PATCH 2/4] ARM: dts: omap: omap4-epson-embt2ws: wire up regulators Andreas Kemnade
2024-10-04 7:25 ` Roger Quadros
2024-10-04 7:38 ` Roger Quadros
2024-10-04 9:01 ` Andreas Kemnade
2024-10-04 9:45 ` Roger Quadros
2024-09-30 21:30 ` [PATCH 3/4] ARM: dts: omap: omap4-epson-embt2ws: add unknown gpio outputs Andreas Kemnade
2024-10-04 7:53 ` Roger Quadros
2024-10-04 11:33 ` Andreas Kemnade
2024-09-30 21:30 ` [PATCH 4/4] ARM: dts: omap: omap4-epson-embt2ws: add GPIO expander Andreas Kemnade
2024-10-02 3:52 ` [PATCH 0/4] ARM: dts: omap: omap4-epson-embt2ws: misc gpio definitions Rob Herring (Arm)
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).