hi Shawn and all interested,
This is another small number of patches that enables more devices
or features found on the Librem 5 phone.
thank you,
martin
revision history
----------------
v2: (thank you Krzysztof)
* make led node names generic
* add a mipi-csi syntax fix
v1:
https://lore.kernel.org/phone-devel/[email protected]/
Angus Ainslie (2):
arm64: dts: imx8mq-librem5: add USB type-c properties for role
switching
arm64: dts: imx8mq-librem5: add usb-role-switch property to dwc3
Guido Günther (1):
arm64: dts: imx8mq-librem5: add RGB pwm notification leds
Martin Kepplinger (2):
arm64: dts: imx8mq-librem5: describe the voice coil motor for focus
control
arm64: dts: imx8mq-librem5: fix mipi_csi description
Sebastian Krzyszkowiak (1):
arm64: dts: imx8mq-librem5: Add bq25895 as max17055's power supply
.../boot/dts/freescale/imx8mq-librem5.dtsi | 40 ++++++++++++++++++-
1 file changed, 38 insertions(+), 2 deletions(-)
--
2.30.2
From: Guido Günther <[email protected]>
Describe the RGB notification leds on the Librem 5 phone.
Use the common defines so we're sure to adhere to the common patterns,
use predefined led colors and functions so we're being warned in case
of deprecations.
Signed-off-by: Guido Günther <[email protected]>
Signed-off-by: Martin Kepplinger <[email protected]>
---
.../boot/dts/freescale/imx8mq-librem5.dtsi | 26 +++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index 0626e4194d958..8da7b87c1aa1f 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -7,6 +7,7 @@
#include "dt-bindings/input/input.h"
#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/leds/common.h>
#include "dt-bindings/pwm/pwm.h"
#include "dt-bindings/usb/pd.h"
#include "imx8mq.dtsi"
@@ -54,6 +55,31 @@ key-vol-up {
};
};
+ led-controller {
+ compatible = "pwm-leds";
+
+ led-0 {
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_BLUE>;
+ max-brightness = <248>;
+ pwms = <&pwm2 0 50000 0>;
+ };
+
+ led-1 {
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
+ max-brightness = <248>;
+ pwms = <&pwm4 0 50000 0>;
+ };
+
+ led-2 {
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
+ max-brightness = <248>;
+ pwms = <&pwm3 0 50000 0>;
+ };
+ };
+
reg_aud_1v8: regulator-audio-1v8 {
compatible = "regulator-fixed";
pinctrl-names = "default";
--
2.30.2
Describe the focus motor that will be used for the rear camera - even
though the rear camera sensor driver is not yet in the mainline. The
focus motor is a separate device and can be controlled already.
Signed-off-by: Martin Kepplinger <[email protected]>
---
arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index 9eec8a7eecfc8..0626e4194d958 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -1070,6 +1070,12 @@ &i2c4 {
pinctrl-0 = <&pinctrl_i2c4>;
status = "okay";
+ vcm@c {
+ compatible = "dongwoon,dw9714";
+ reg = <0x0c>;
+ vcc-supply = <®_csi_1v8>;
+ };
+
bat: fuel-gauge@36 {
compatible = "maxim,max17055";
reg = <0x36>;
--
2.30.2
From: Angus Ainslie <[email protected]>
In order to enable (PD and data) role switching on the Librem 5 phone,
add the usb-role-switch property to imx8mq's dwc3 node.
Signed-off-by: Angus Ainslie <[email protected]>
Signed-off-by: Martin Kepplinger <[email protected]>
---
arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index f07d1c6e97777..058d6ecf109b2 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -1302,6 +1302,7 @@ &usb_dwc3_0 {
#size-cells = <0>;
dr_mode = "otg";
snps,dis_u3_susphy_quirk;
+ usb-role-switch;
status = "okay";
port@0 {
--
2.30.2
Properties are not documented so lead to the following error:
'#address-cells', '#size-cells', 'interrupts' do not match any of the regexes: 'pinctrl-[0-9]+'
Fix this by removing unneeded properties.
Signed-off-by: Martin Kepplinger <[email protected]>
---
arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index 058d6ecf109b2..ae08556b2ef2f 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -1143,8 +1143,6 @@ &lcdif {
};
&mipi_csi1 {
- #address-cells = <1>;
- #size-cells = <0>;
status = "okay";
ports {
--
2.30.2
From: Angus Ainslie <[email protected]>
Add the connector properties to the USB type-c stanza to enable (PD)
role-switching on the Librem 5 phone.
Signed-off-by: Angus Ainslie <[email protected]>
Signed-off-by: Martin Kepplinger <[email protected]>
---
arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index 7e6c4ad438092..f07d1c6e97777 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -773,6 +773,10 @@ typec_pd: usb-pd@3f {
interrupt-names = "irq";
connector {
+ compatible = "usb-c-connector";
+ label = "USB-C";
+ data-role = "dual";
+
ports {
#address-cells = <1>;
#size-cells = <0>;
--
2.30.2
On Fri, Sep 02, 2022 at 10:42:10AM +0200, Martin Kepplinger wrote:
> hi Shawn and all interested,
>
> This is another small number of patches that enables more devices
> or features found on the Librem 5 phone.
>
> thank you,
>
> martin
>
> revision history
> ----------------
> v2: (thank you Krzysztof)
> * make led node names generic
> * add a mipi-csi syntax fix
>
> v1:
> https://lore.kernel.org/phone-devel/[email protected]/
>
>
>
> Angus Ainslie (2):
> arm64: dts: imx8mq-librem5: add USB type-c properties for role
> switching
> arm64: dts: imx8mq-librem5: add usb-role-switch property to dwc3
>
> Guido G?nther (1):
> arm64: dts: imx8mq-librem5: add RGB pwm notification leds
>
> Martin Kepplinger (2):
> arm64: dts: imx8mq-librem5: describe the voice coil motor for focus
> control
> arm64: dts: imx8mq-librem5: fix mipi_csi description
>
> Sebastian Krzyszkowiak (1):
> arm64: dts: imx8mq-librem5: Add bq25895 as max17055's power supply
Applied all, thanks!
Hi!
> From: Guido G?nther <[email protected]>
>
> Describe the RGB notification leds on the Librem 5 phone.
> Use the common defines so we're sure to adhere to the common patterns,
> use predefined led colors and functions so we're being warned in case
> of deprecations.
I'd like LED lists to be cc-ed on patches like this, so that we can
keep userland API consistent.
In particular, RGB LED is very common feature on the phones, and it
would be good to have it consistent accross them. Can you take a look
at Documentation/leds/well-known-leds.txt, decide if your current API
is suitable, and update the file so that we get the consistency?
Thanks,
Pavel
> + led-controller {
> + compatible = "pwm-leds";
> +
> + led-0 {
> + function = LED_FUNCTION_STATUS;
> + color = <LED_COLOR_ID_BLUE>;
> + max-brightness = <248>;
> + pwms = <&pwm2 0 50000 0>;
> + };
> +
> + led-1 {
> + function = LED_FUNCTION_STATUS;
> + color = <LED_COLOR_ID_GREEN>;
> + max-brightness = <248>;
> + pwms = <&pwm4 0 50000 0>;
> + };
> +
> + led-2 {
> + function = LED_FUNCTION_STATUS;
> + color = <LED_COLOR_ID_RED>;
> + max-brightness = <248>;
> + pwms = <&pwm3 0 50000 0>;
> + };
> + };
> +
> reg_aud_1v8: regulator-audio-1v8 {
> compatible = "regulator-fixed";
> pinctrl-names = "default";
> --
> 2.30.2
--
People of Russia, stop Putin before his war on Ukraine escalates.
Am Dienstag, dem 06.09.2022 um 10:45 +0200 schrieb Pavel Machek:
> Hi!
>
> > From: Guido Günther <[email protected]>
> >
> > Describe the RGB notification leds on the Librem 5 phone.
> > Use the common defines so we're sure to adhere to the common
> > patterns,
> > use predefined led colors and functions so we're being warned in
> > case
> > of deprecations.
>
> I'd like LED lists to be cc-ed on patches like this, so that we can
> keep userland API consistent.
>
> In particular, RGB LED is very common feature on the phones, and it
> would be good to have it consistent accross them. Can you take a look
> at Documentation/leds/well-known-leds.txt, decide if your current API
> is suitable, and update the file so that we get the consistency?
>
> Thanks,
> Pavel
thanks for the feedback Pavel, thanks for queueing up Shawn,
that indeed says that phones should use the multicolor descriptions :)
Later, I'll send changes to have a description like that:
https://source.puri.sm/Librem5/linux/-/merge_requests/623#note_212773
which should be close to what you meant, Pavel.
thanks again,
martin
>
> > + led-controller {
> > + compatible = "pwm-leds";
> > +
> > + led-0 {
> > + function = LED_FUNCTION_STATUS;
> > + color = <LED_COLOR_ID_BLUE>;
> > + max-brightness = <248>;
> > + pwms = <&pwm2 0 50000 0>;
> > + };
> > +
> > + led-1 {
> > + function = LED_FUNCTION_STATUS;
> > + color = <LED_COLOR_ID_GREEN>;
> > + max-brightness = <248>;
> > + pwms = <&pwm4 0 50000 0>;
> > + };
> > +
> > + led-2 {
> > + function = LED_FUNCTION_STATUS;
> > + color = <LED_COLOR_ID_RED>;
> > + max-brightness = <248>;
> > + pwms = <&pwm3 0 50000 0>;
> > + };
> > + };
> > +
> > reg_aud_1v8: regulator-audio-1v8 {
> > compatible = "regulator-fixed";
> > pinctrl-names = "default";
> > --
> > 2.30.2
>