All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM64: dts: meson-gx: use specific compatible for the AO pwms
@ 2017-06-07 13:48 ` Jerome Brunet
  0 siblings, 0 replies; 14+ messages in thread
From: Jerome Brunet @ 2017-06-07 13:48 UTC (permalink / raw)
  To: Kevin Hilman, devicetree
  Cc: Jerome Brunet, Carlo Caione, Martin Blumenstingl,
	linux-arm-kernel, linux-amlogic, linux-kernel

Use the specific compatiable for AO pwms so the pwms input can
be correctly set

FDIV4 is not present on the pwm A0, so change kadhas vim input
clocks to xtal.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
This patch depends on the pwm patchset available here [0]

On the Khadas Vim I chose to replace FDIV4 with the crytal.
Only PWM_AO_B is actually used and It is used for led dimming.
The frequency, as long as it is high enough, does not matter.
Only the duty cycle does. After testing, xtal seems to be fast
enough.

PWM_AO_A is outputed on the general purpose header, but no usage is
defined for it.

It might be bit late for that but I wonder why it defined and enabled ?
Same goes for the other peripherals activated on this general purpose
header.

I know that's what shows the schematics but one could choose to do
anything else possible with it ? like use in GPIO mode, or another
function. In addition, we never which setting will be required ? (eg
which clock source ?).

Should we keep those ? or remove them ?

[0]: https://lkml.kernel.org/r/20170607133013.4766-1-jbrunet@baylibre.com

 arch/arm64/boot/dts/amlogic/meson-gx.dtsi                  | 2 +-
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
index 436b875060e7..fbaa6b598fca 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
@@ -391,7 +391,7 @@
 			};
 
 			pwm_AO_ab: pwm@550 {
-				compatible = "amlogic,meson-gx-pwm", "amlogic,meson-gxbb-pwm";
+				compatible = "amlogic,meson-gx-ao-pwm", "amlogic,meson-gxbb-ao-pwm";
 				reg = <0x0 0x00550 0x0 0x10>;
 				#pwm-cells = <3>;
 				status = "disabled";
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
index 6a81f0168da5..371f43cdd3ab 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
@@ -86,8 +86,8 @@
 	status = "okay";
 	pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>;
 	pinctrl-names = "default";
-	clocks = <&clkc CLKID_FCLK_DIV4>;
-	clock-names = "clkin0";
+	clocks = <&xtal> , <&xtal>;
+	clock-names = "clkin0", "clkin1" ;
 };
 
 &pwm_ef {
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH] ARM64: dts: meson-gx: use specific compatible for the AO pwms
@ 2017-06-07 13:48 ` Jerome Brunet
  0 siblings, 0 replies; 14+ messages in thread
From: Jerome Brunet @ 2017-06-07 13:48 UTC (permalink / raw)
  To: linux-arm-kernel

Use the specific compatiable for AO pwms so the pwms input can
be correctly set

FDIV4 is not present on the pwm A0, so change kadhas vim input
clocks to xtal.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
This patch depends on the pwm patchset available here [0]

On the Khadas Vim I chose to replace FDIV4 with the crytal.
Only PWM_AO_B is actually used and It is used for led dimming.
The frequency, as long as it is high enough, does not matter.
Only the duty cycle does. After testing, xtal seems to be fast
enough.

PWM_AO_A is outputed on the general purpose header, but no usage is
defined for it.

It might be bit late for that but I wonder why it defined and enabled ?
Same goes for the other peripherals activated on this general purpose
header.

I know that's what shows the schematics but one could choose to do
anything else possible with it ? like use in GPIO mode, or another
function. In addition, we never which setting will be required ? (eg
which clock source ?).

Should we keep those ? or remove them ?

[0]: https://lkml.kernel.org/r/20170607133013.4766-1-jbrunet at baylibre.com

 arch/arm64/boot/dts/amlogic/meson-gx.dtsi                  | 2 +-
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
index 436b875060e7..fbaa6b598fca 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
@@ -391,7 +391,7 @@
 			};
 
 			pwm_AO_ab: pwm at 550 {
-				compatible = "amlogic,meson-gx-pwm", "amlogic,meson-gxbb-pwm";
+				compatible = "amlogic,meson-gx-ao-pwm", "amlogic,meson-gxbb-ao-pwm";
 				reg = <0x0 0x00550 0x0 0x10>;
 				#pwm-cells = <3>;
 				status = "disabled";
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
index 6a81f0168da5..371f43cdd3ab 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
@@ -86,8 +86,8 @@
 	status = "okay";
 	pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>;
 	pinctrl-names = "default";
-	clocks = <&clkc CLKID_FCLK_DIV4>;
-	clock-names = "clkin0";
+	clocks = <&xtal> , <&xtal>;
+	clock-names = "clkin0", "clkin1" ;
 };
 
 &pwm_ef {
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH] ARM64: dts: meson-gx: use specific compatible for the AO pwms
@ 2017-06-07 13:48 ` Jerome Brunet
  0 siblings, 0 replies; 14+ messages in thread
From: Jerome Brunet @ 2017-06-07 13:48 UTC (permalink / raw)
  To: linus-amlogic

Use the specific compatiable for AO pwms so the pwms input can
be correctly set

FDIV4 is not present on the pwm A0, so change kadhas vim input
clocks to xtal.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
This patch depends on the pwm patchset available here [0]

On the Khadas Vim I chose to replace FDIV4 with the crytal.
Only PWM_AO_B is actually used and It is used for led dimming.
The frequency, as long as it is high enough, does not matter.
Only the duty cycle does. After testing, xtal seems to be fast
enough.

PWM_AO_A is outputed on the general purpose header, but no usage is
defined for it.

It might be bit late for that but I wonder why it defined and enabled ?
Same goes for the other peripherals activated on this general purpose
header.

I know that's what shows the schematics but one could choose to do
anything else possible with it ? like use in GPIO mode, or another
function. In addition, we never which setting will be required ? (eg
which clock source ?).

Should we keep those ? or remove them ?

[0]: https://lkml.kernel.org/r/20170607133013.4766-1-jbrunet at baylibre.com

 arch/arm64/boot/dts/amlogic/meson-gx.dtsi                  | 2 +-
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
index 436b875060e7..fbaa6b598fca 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
@@ -391,7 +391,7 @@
 			};
 
 			pwm_AO_ab: pwm at 550 {
-				compatible = "amlogic,meson-gx-pwm", "amlogic,meson-gxbb-pwm";
+				compatible = "amlogic,meson-gx-ao-pwm", "amlogic,meson-gxbb-ao-pwm";
 				reg = <0x0 0x00550 0x0 0x10>;
 				#pwm-cells = <3>;
 				status = "disabled";
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
index 6a81f0168da5..371f43cdd3ab 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
@@ -86,8 +86,8 @@
 	status = "okay";
 	pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>;
 	pinctrl-names = "default";
-	clocks = <&clkc CLKID_FCLK_DIV4>;
-	clock-names = "clkin0";
+	clocks = <&xtal> , <&xtal>;
+	clock-names = "clkin0", "clkin1" ;
 };
 
 &pwm_ef {
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] ARM64: dts: meson-gx: use specific compatible for the AO pwms
@ 2017-06-07 13:52   ` Neil Armstrong
  0 siblings, 0 replies; 14+ messages in thread
From: Neil Armstrong @ 2017-06-07 13:52 UTC (permalink / raw)
  To: Jerome Brunet, Kevin Hilman, devicetree
  Cc: Martin Blumenstingl, linux-kernel, Carlo Caione, linux-amlogic,
	linux-arm-kernel

On 06/07/2017 03:48 PM, Jerome Brunet wrote:
> Use the specific compatiable for AO pwms so the pwms input can
-----------------------/\
s/compatiable/compatible/

> be correctly set
> 
> FDIV4 is not present on the pwm A0, so change kadhas vim input
> clocks to xtal.
> 
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
> This patch depends on the pwm patchset available here [0]
> 
> On the Khadas Vim I chose to replace FDIV4 with the crytal.
> Only PWM_AO_B is actually used and It is used for led dimming.
> The frequency, as long as it is high enough, does not matter.
> Only the duty cycle does. After testing, xtal seems to be fast
> enough.
> 
> PWM_AO_A is outputed on the general purpose header, but no usage is
> defined for it.

Seems we will need to define what to enable by default on these SBC
headers somehow, and leave future out-of-tree DT overlays do the work.

> 
> It might be bit late for that but I wonder why it defined and enabled ?
> Same goes for the other peripherals activated on this general purpose
> header.
> 
> I know that's what shows the schematics but one could choose to do
> anything else possible with it ? like use in GPIO mode, or another
> function. In addition, we never which setting will be required ? (eg
> which clock source ?).
> 
> Should we keep those ? or remove them ?
> 
> [0]: https://lkml.kernel.org/r/20170607133013.4766-1-jbrunet@baylibre.com
> 
>  arch/arm64/boot/dts/amlogic/meson-gx.dtsi                  | 2 +-
>  arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> index 436b875060e7..fbaa6b598fca 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> @@ -391,7 +391,7 @@
>  			};
>  
>  			pwm_AO_ab: pwm@550 {
> -				compatible = "amlogic,meson-gx-pwm", "amlogic,meson-gxbb-pwm";
> +				compatible = "amlogic,meson-gx-ao-pwm", "amlogic,meson-gxbb-ao-pwm";
>  				reg = <0x0 0x00550 0x0 0x10>;
>  				#pwm-cells = <3>;
>  				status = "disabled";
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
> index 6a81f0168da5..371f43cdd3ab 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
> @@ -86,8 +86,8 @@
>  	status = "okay";
>  	pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>;
>  	pinctrl-names = "default";
> -	clocks = <&clkc CLKID_FCLK_DIV4>;
> -	clock-names = "clkin0";
> +	clocks = <&xtal> , <&xtal>;
> +	clock-names = "clkin0", "clkin1" ;
>  };
>  
>  &pwm_ef {
> 

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] ARM64: dts: meson-gx: use specific compatible for the AO pwms
@ 2017-06-07 13:52   ` Neil Armstrong
  0 siblings, 0 replies; 14+ messages in thread
From: Neil Armstrong @ 2017-06-07 13:52 UTC (permalink / raw)
  To: Jerome Brunet, Kevin Hilman, devicetree-u79uwXL29TY76Z2rM5mHXA
  Cc: Martin Blumenstingl, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	Carlo Caione, linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On 06/07/2017 03:48 PM, Jerome Brunet wrote:
> Use the specific compatiable for AO pwms so the pwms input can
-----------------------/\
s/compatiable/compatible/

> be correctly set
> 
> FDIV4 is not present on the pwm A0, so change kadhas vim input
> clocks to xtal.
> 
> Signed-off-by: Jerome Brunet <jbrunet-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
> ---
> This patch depends on the pwm patchset available here [0]
> 
> On the Khadas Vim I chose to replace FDIV4 with the crytal.
> Only PWM_AO_B is actually used and It is used for led dimming.
> The frequency, as long as it is high enough, does not matter.
> Only the duty cycle does. After testing, xtal seems to be fast
> enough.
> 
> PWM_AO_A is outputed on the general purpose header, but no usage is
> defined for it.

Seems we will need to define what to enable by default on these SBC
headers somehow, and leave future out-of-tree DT overlays do the work.

> 
> It might be bit late for that but I wonder why it defined and enabled ?
> Same goes for the other peripherals activated on this general purpose
> header.
> 
> I know that's what shows the schematics but one could choose to do
> anything else possible with it ? like use in GPIO mode, or another
> function. In addition, we never which setting will be required ? (eg
> which clock source ?).
> 
> Should we keep those ? or remove them ?
> 
> [0]: https://lkml.kernel.org/r/20170607133013.4766-1-jbrunet-rdvid1DuHRBWk0Htik3J/w@public.gmane.org
> 
>  arch/arm64/boot/dts/amlogic/meson-gx.dtsi                  | 2 +-
>  arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> index 436b875060e7..fbaa6b598fca 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> @@ -391,7 +391,7 @@
>  			};
>  
>  			pwm_AO_ab: pwm@550 {
> -				compatible = "amlogic,meson-gx-pwm", "amlogic,meson-gxbb-pwm";
> +				compatible = "amlogic,meson-gx-ao-pwm", "amlogic,meson-gxbb-ao-pwm";
>  				reg = <0x0 0x00550 0x0 0x10>;
>  				#pwm-cells = <3>;
>  				status = "disabled";
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
> index 6a81f0168da5..371f43cdd3ab 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
> @@ -86,8 +86,8 @@
>  	status = "okay";
>  	pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>;
>  	pinctrl-names = "default";
> -	clocks = <&clkc CLKID_FCLK_DIV4>;
> -	clock-names = "clkin0";
> +	clocks = <&xtal> , <&xtal>;
> +	clock-names = "clkin0", "clkin1" ;
>  };
>  
>  &pwm_ef {
> 

Reviewed-by: Neil Armstrong <narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] ARM64: dts: meson-gx: use specific compatible for the AO pwms
@ 2017-06-07 13:52   ` Neil Armstrong
  0 siblings, 0 replies; 14+ messages in thread
From: Neil Armstrong @ 2017-06-07 13:52 UTC (permalink / raw)
  To: linux-arm-kernel

On 06/07/2017 03:48 PM, Jerome Brunet wrote:
> Use the specific compatiable for AO pwms so the pwms input can
-----------------------/\
s/compatiable/compatible/

> be correctly set
> 
> FDIV4 is not present on the pwm A0, so change kadhas vim input
> clocks to xtal.
> 
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
> This patch depends on the pwm patchset available here [0]
> 
> On the Khadas Vim I chose to replace FDIV4 with the crytal.
> Only PWM_AO_B is actually used and It is used for led dimming.
> The frequency, as long as it is high enough, does not matter.
> Only the duty cycle does. After testing, xtal seems to be fast
> enough.
> 
> PWM_AO_A is outputed on the general purpose header, but no usage is
> defined for it.

Seems we will need to define what to enable by default on these SBC
headers somehow, and leave future out-of-tree DT overlays do the work.

> 
> It might be bit late for that but I wonder why it defined and enabled ?
> Same goes for the other peripherals activated on this general purpose
> header.
> 
> I know that's what shows the schematics but one could choose to do
> anything else possible with it ? like use in GPIO mode, or another
> function. In addition, we never which setting will be required ? (eg
> which clock source ?).
> 
> Should we keep those ? or remove them ?
> 
> [0]: https://lkml.kernel.org/r/20170607133013.4766-1-jbrunet at baylibre.com
> 
>  arch/arm64/boot/dts/amlogic/meson-gx.dtsi                  | 2 +-
>  arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> index 436b875060e7..fbaa6b598fca 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> @@ -391,7 +391,7 @@
>  			};
>  
>  			pwm_AO_ab: pwm at 550 {
> -				compatible = "amlogic,meson-gx-pwm", "amlogic,meson-gxbb-pwm";
> +				compatible = "amlogic,meson-gx-ao-pwm", "amlogic,meson-gxbb-ao-pwm";
>  				reg = <0x0 0x00550 0x0 0x10>;
>  				#pwm-cells = <3>;
>  				status = "disabled";
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
> index 6a81f0168da5..371f43cdd3ab 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
> @@ -86,8 +86,8 @@
>  	status = "okay";
>  	pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>;
>  	pinctrl-names = "default";
> -	clocks = <&clkc CLKID_FCLK_DIV4>;
> -	clock-names = "clkin0";
> +	clocks = <&xtal> , <&xtal>;
> +	clock-names = "clkin0", "clkin1" ;
>  };
>  
>  &pwm_ef {
> 

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] ARM64: dts: meson-gx: use specific compatible for the AO pwms
@ 2017-06-07 13:52   ` Neil Armstrong
  0 siblings, 0 replies; 14+ messages in thread
From: Neil Armstrong @ 2017-06-07 13:52 UTC (permalink / raw)
  To: linus-amlogic

On 06/07/2017 03:48 PM, Jerome Brunet wrote:
> Use the specific compatiable for AO pwms so the pwms input can
-----------------------/\
s/compatiable/compatible/

> be correctly set
> 
> FDIV4 is not present on the pwm A0, so change kadhas vim input
> clocks to xtal.
> 
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
> This patch depends on the pwm patchset available here [0]
> 
> On the Khadas Vim I chose to replace FDIV4 with the crytal.
> Only PWM_AO_B is actually used and It is used for led dimming.
> The frequency, as long as it is high enough, does not matter.
> Only the duty cycle does. After testing, xtal seems to be fast
> enough.
> 
> PWM_AO_A is outputed on the general purpose header, but no usage is
> defined for it.

Seems we will need to define what to enable by default on these SBC
headers somehow, and leave future out-of-tree DT overlays do the work.

> 
> It might be bit late for that but I wonder why it defined and enabled ?
> Same goes for the other peripherals activated on this general purpose
> header.
> 
> I know that's what shows the schematics but one could choose to do
> anything else possible with it ? like use in GPIO mode, or another
> function. In addition, we never which setting will be required ? (eg
> which clock source ?).
> 
> Should we keep those ? or remove them ?
> 
> [0]: https://lkml.kernel.org/r/20170607133013.4766-1-jbrunet at baylibre.com
> 
>  arch/arm64/boot/dts/amlogic/meson-gx.dtsi                  | 2 +-
>  arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> index 436b875060e7..fbaa6b598fca 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> @@ -391,7 +391,7 @@
>  			};
>  
>  			pwm_AO_ab: pwm at 550 {
> -				compatible = "amlogic,meson-gx-pwm", "amlogic,meson-gxbb-pwm";
> +				compatible = "amlogic,meson-gx-ao-pwm", "amlogic,meson-gxbb-ao-pwm";
>  				reg = <0x0 0x00550 0x0 0x10>;
>  				#pwm-cells = <3>;
>  				status = "disabled";
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
> index 6a81f0168da5..371f43cdd3ab 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
> @@ -86,8 +86,8 @@
>  	status = "okay";
>  	pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>;
>  	pinctrl-names = "default";
> -	clocks = <&clkc CLKID_FCLK_DIV4>;
> -	clock-names = "clkin0";
> +	clocks = <&xtal> , <&xtal>;
> +	clock-names = "clkin0", "clkin1" ;
>  };
>  
>  &pwm_ef {
> 

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH RESEND] ARM64: dts: meson-gx: use specific compatible for the AO pwms
  2017-06-07 13:52   ` Neil Armstrong
  (?)
@ 2017-06-08 12:39     ` Jerome Brunet
  -1 siblings, 0 replies; 14+ messages in thread
From: Jerome Brunet @ 2017-06-08 12:39 UTC (permalink / raw)
  To: Kevin Hilman, devicetree
  Cc: Jerome Brunet, Carlo Caione, Martin Blumenstingl,
	linux-arm-kernel, linux-amlogic, linux-kernel

Use the specific compatible for AO pwms so the pwms input can
be correctly set

FDIV4 is not present on the pwm A0, so change kadhas vim input
clocks to xtal.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
This patch depends on the pwm patchset available here [0]

On the Khadas Vim I chose to replace FDIV4 with the crytal.
Only PWM_AO_B is actually used and It is used for led dimming.
The frequency, as long as it is high enough, does not matter.
Only the duty cycle does. After testing, xtal seems to be fast
enough.

PWM_AO_A is outputed on the general purpose header, but no usage is
defined for it.

It might be bit late for that but I wonder why it defined and enabled ?
Same goes for the other peripherals activated on this general purpose
header.

I know that's what shows the schematics but one could choose to do
anything else possible with it ? like use in GPIO mode, or another
function. In addition, we never which setting will be required ? (eg
which clock source ?).

Should we keep those ? or remove them ?

Resend to correct the typo reported by Neil and update the dependency to
the v2 of the pwm series.

[0]: https://lkml.kernel.org/r/20170608122416.1993-1-jbrunet@baylibre.com

 arch/arm64/boot/dts/amlogic/meson-gx.dtsi                  | 2 +-
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
index 436b875060e7..fbaa6b598fca 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
@@ -391,7 +391,7 @@
 			};
 
 			pwm_AO_ab: pwm@550 {
-				compatible = "amlogic,meson-gx-pwm", "amlogic,meson-gxbb-pwm";
+				compatible = "amlogic,meson-gx-ao-pwm", "amlogic,meson-gxbb-ao-pwm";
 				reg = <0x0 0x00550 0x0 0x10>;
 				#pwm-cells = <3>;
 				status = "disabled";
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
index 6a81f0168da5..371f43cdd3ab 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
@@ -86,8 +86,8 @@
 	status = "okay";
 	pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>;
 	pinctrl-names = "default";
-	clocks = <&clkc CLKID_FCLK_DIV4>;
-	clock-names = "clkin0";
+	clocks = <&xtal> , <&xtal>;
+	clock-names = "clkin0", "clkin1" ;
 };
 
 &pwm_ef {
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH RESEND] ARM64: dts: meson-gx: use specific compatible for the AO pwms
@ 2017-06-08 12:39     ` Jerome Brunet
  0 siblings, 0 replies; 14+ messages in thread
From: Jerome Brunet @ 2017-06-08 12:39 UTC (permalink / raw)
  To: linux-arm-kernel

Use the specific compatible for AO pwms so the pwms input can
be correctly set

FDIV4 is not present on the pwm A0, so change kadhas vim input
clocks to xtal.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
This patch depends on the pwm patchset available here [0]

On the Khadas Vim I chose to replace FDIV4 with the crytal.
Only PWM_AO_B is actually used and It is used for led dimming.
The frequency, as long as it is high enough, does not matter.
Only the duty cycle does. After testing, xtal seems to be fast
enough.

PWM_AO_A is outputed on the general purpose header, but no usage is
defined for it.

It might be bit late for that but I wonder why it defined and enabled ?
Same goes for the other peripherals activated on this general purpose
header.

I know that's what shows the schematics but one could choose to do
anything else possible with it ? like use in GPIO mode, or another
function. In addition, we never which setting will be required ? (eg
which clock source ?).

Should we keep those ? or remove them ?

Resend to correct the typo reported by Neil and update the dependency to
the v2 of the pwm series.

[0]: https://lkml.kernel.org/r/20170608122416.1993-1-jbrunet at baylibre.com

 arch/arm64/boot/dts/amlogic/meson-gx.dtsi                  | 2 +-
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
index 436b875060e7..fbaa6b598fca 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
@@ -391,7 +391,7 @@
 			};
 
 			pwm_AO_ab: pwm at 550 {
-				compatible = "amlogic,meson-gx-pwm", "amlogic,meson-gxbb-pwm";
+				compatible = "amlogic,meson-gx-ao-pwm", "amlogic,meson-gxbb-ao-pwm";
 				reg = <0x0 0x00550 0x0 0x10>;
 				#pwm-cells = <3>;
 				status = "disabled";
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
index 6a81f0168da5..371f43cdd3ab 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
@@ -86,8 +86,8 @@
 	status = "okay";
 	pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>;
 	pinctrl-names = "default";
-	clocks = <&clkc CLKID_FCLK_DIV4>;
-	clock-names = "clkin0";
+	clocks = <&xtal> , <&xtal>;
+	clock-names = "clkin0", "clkin1" ;
 };
 
 &pwm_ef {
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH RESEND] ARM64: dts: meson-gx: use specific compatible for the AO pwms
@ 2017-06-08 12:39     ` Jerome Brunet
  0 siblings, 0 replies; 14+ messages in thread
From: Jerome Brunet @ 2017-06-08 12:39 UTC (permalink / raw)
  To: linus-amlogic

Use the specific compatible for AO pwms so the pwms input can
be correctly set

FDIV4 is not present on the pwm A0, so change kadhas vim input
clocks to xtal.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
This patch depends on the pwm patchset available here [0]

On the Khadas Vim I chose to replace FDIV4 with the crytal.
Only PWM_AO_B is actually used and It is used for led dimming.
The frequency, as long as it is high enough, does not matter.
Only the duty cycle does. After testing, xtal seems to be fast
enough.

PWM_AO_A is outputed on the general purpose header, but no usage is
defined for it.

It might be bit late for that but I wonder why it defined and enabled ?
Same goes for the other peripherals activated on this general purpose
header.

I know that's what shows the schematics but one could choose to do
anything else possible with it ? like use in GPIO mode, or another
function. In addition, we never which setting will be required ? (eg
which clock source ?).

Should we keep those ? or remove them ?

Resend to correct the typo reported by Neil and update the dependency to
the v2 of the pwm series.

[0]: https://lkml.kernel.org/r/20170608122416.1993-1-jbrunet at baylibre.com

 arch/arm64/boot/dts/amlogic/meson-gx.dtsi                  | 2 +-
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
index 436b875060e7..fbaa6b598fca 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
@@ -391,7 +391,7 @@
 			};
 
 			pwm_AO_ab: pwm at 550 {
-				compatible = "amlogic,meson-gx-pwm", "amlogic,meson-gxbb-pwm";
+				compatible = "amlogic,meson-gx-ao-pwm", "amlogic,meson-gxbb-ao-pwm";
 				reg = <0x0 0x00550 0x0 0x10>;
 				#pwm-cells = <3>;
 				status = "disabled";
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
index 6a81f0168da5..371f43cdd3ab 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
@@ -86,8 +86,8 @@
 	status = "okay";
 	pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>;
 	pinctrl-names = "default";
-	clocks = <&clkc CLKID_FCLK_DIV4>;
-	clock-names = "clkin0";
+	clocks = <&xtal> , <&xtal>;
+	clock-names = "clkin0", "clkin1" ;
 };
 
 &pwm_ef {
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH RESEND] ARM64: dts: meson-gx: use specific compatible for the AO pwms
@ 2017-07-21  0:45       ` Kevin Hilman
  0 siblings, 0 replies; 14+ messages in thread
From: Kevin Hilman @ 2017-07-21  0:45 UTC (permalink / raw)
  To: Jerome Brunet
  Cc: devicetree, Carlo Caione, Martin Blumenstingl, linux-arm-kernel,
	linux-amlogic, linux-kernel

Jerome Brunet <jbrunet@baylibre.com> writes:

> Use the specific compatible for AO pwms so the pwms input can
> be correctly set
>
> FDIV4 is not present on the pwm A0, so change kadhas vim input
> clocks to xtal.
>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>

Adding this to fixes v4.13-rc since the PWM driver is now merged.

Kevin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH RESEND] ARM64: dts: meson-gx: use specific compatible for the AO pwms
@ 2017-07-21  0:45       ` Kevin Hilman
  0 siblings, 0 replies; 14+ messages in thread
From: Kevin Hilman @ 2017-07-21  0:45 UTC (permalink / raw)
  To: Jerome Brunet
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Carlo Caione,
	Martin Blumenstingl,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Jerome Brunet <jbrunet-rdvid1DuHRBWk0Htik3J/w@public.gmane.org> writes:

> Use the specific compatible for AO pwms so the pwms input can
> be correctly set
>
> FDIV4 is not present on the pwm A0, so change kadhas vim input
> clocks to xtal.
>
> Signed-off-by: Jerome Brunet <jbrunet-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>

Adding this to fixes v4.13-rc since the PWM driver is now merged.

Kevin
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH RESEND] ARM64: dts: meson-gx: use specific compatible for the AO pwms
@ 2017-07-21  0:45       ` Kevin Hilman
  0 siblings, 0 replies; 14+ messages in thread
From: Kevin Hilman @ 2017-07-21  0:45 UTC (permalink / raw)
  To: linux-arm-kernel

Jerome Brunet <jbrunet@baylibre.com> writes:

> Use the specific compatible for AO pwms so the pwms input can
> be correctly set
>
> FDIV4 is not present on the pwm A0, so change kadhas vim input
> clocks to xtal.
>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>

Adding this to fixes v4.13-rc since the PWM driver is now merged.

Kevin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH RESEND] ARM64: dts: meson-gx: use specific compatible for the AO pwms
@ 2017-07-21  0:45       ` Kevin Hilman
  0 siblings, 0 replies; 14+ messages in thread
From: Kevin Hilman @ 2017-07-21  0:45 UTC (permalink / raw)
  To: linus-amlogic

Jerome Brunet <jbrunet@baylibre.com> writes:

> Use the specific compatible for AO pwms so the pwms input can
> be correctly set
>
> FDIV4 is not present on the pwm A0, so change kadhas vim input
> clocks to xtal.
>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>

Adding this to fixes v4.13-rc since the PWM driver is now merged.

Kevin

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-07-21  0:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-07 13:48 [PATCH] ARM64: dts: meson-gx: use specific compatible for the AO pwms Jerome Brunet
2017-06-07 13:48 ` Jerome Brunet
2017-06-07 13:48 ` Jerome Brunet
2017-06-07 13:52 ` Neil Armstrong
2017-06-07 13:52   ` Neil Armstrong
2017-06-07 13:52   ` Neil Armstrong
2017-06-07 13:52   ` Neil Armstrong
2017-06-08 12:39   ` [PATCH RESEND] " Jerome Brunet
2017-06-08 12:39     ` Jerome Brunet
2017-06-08 12:39     ` Jerome Brunet
2017-07-21  0:45     ` Kevin Hilman
2017-07-21  0:45       ` Kevin Hilman
2017-07-21  0:45       ` Kevin Hilman
2017-07-21  0:45       ` Kevin Hilman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.