Linux-Amlogic Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v3 0/2] add support for videostrong KII Pro
@ 2019-11-30 11:58 Mohammad Rasim
  2019-11-30 11:58 ` [PATCH v3 1/2] dt-bindings: Add vendor prefix for Videostrong Mohammad Rasim
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Mohammad Rasim @ 2019-11-30 11:58 UTC (permalink / raw)
  To: linux-amlogic, Kevin Hilman, Neil Armstrong, Martin Blumenstingl
  Cc: Mohammad Rasim


This patchset adds support for the Videostrong KII Pro tv box which is
based on the gxbb-p201 reference design.

Device specifications:
- SOC: Amlogic S905
- RAM: 2GB DDR3
- Storage: 16GB
- Connectivity:
	- 10/100M Ethernet (IC Plus IP101GR)
	- 802.11 b/g/n/ac Wi-Fi (Ampak AP6335 BT/WIFI combo)
	- Bluetooth 4.0 (Ampak AP6335 BT/WIFI combo)
- Video out: HDMI 2.0 up to 4K @ 60Hz, and 3.5mm AV (composite video) jack
- Audio out: HDMI, AV (stereo audio) and optical S/PDIF
- Tuner: AVL6862 DVB-C/T/T2 + DVB-S/S2 demod and Rafael Micro R848 tuner
- Ports:
	- x1 micro SD card slot up to 32GB
	- 4x USB 2.0 host ports
- Misc:
    - Power button and LED, IR receiver

Changes since RFC v1:
- add commit description to the cover letter
- update bluetooth bindings
- use lowercase name for the dts filename,vendor prefix and compatible
- add copyrights to the new files
- include "meson-gxbb-p20x.dtsi" instead of "meson-gxbb-p201.dts"

Changes since RFC v2:
- Fix styling issues

Changes since v1:
- add leds node to the device tree
- add gpio-keys-polled  node to the device tree

Changes since v2:
- use phy-handle to describe the phy
- The blutooth compatible is now merged,change the commit message
accordingly

Mohammad Rasim (2):
  dt-bindings: Add vendor prefix for Videostrong
  arm64: dts: meson-gxbb: add support for Videostrong KII Pro

 .../devicetree/bindings/vendor-prefixes.yaml  |  2 +
 arch/arm64/boot/dts/amlogic/Makefile          |  1 +
 .../boot/dts/amlogic/meson-gxbb-kii-pro.dts   | 76 +++++++++++++++++++
 3 files changed, 79 insertions(+)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts

--
2.24.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH v3 1/2] dt-bindings: Add vendor prefix for Videostrong
  2019-11-30 11:58 [PATCH v3 0/2] add support for videostrong KII Pro Mohammad Rasim
@ 2019-11-30 11:58 ` Mohammad Rasim
  2019-11-30 13:45   ` Martin Blumenstingl
  2019-11-30 11:58 ` [PATCH v3 2/2] arm64: dts: meson-gxbb: add support for Mohammad Rasim
  2019-11-30 14:00 ` [PATCH v3 0/2] add support for videostrong KII Pro Martin Blumenstingl
  2 siblings, 1 reply; 13+ messages in thread
From: Mohammad Rasim @ 2019-11-30 11:58 UTC (permalink / raw)
  To: devicetree, linux-amlogic, Rob Herring, Kevin Hilman,
	Neil Armstrong, Martin Blumenstingl
  Cc: Mark Rutland, Mohammad Rasim

Videostrong Technology Co., Ltd., A manufacturer of Android Players & STB
(Android with DVB Hybrid box & DVB-T2/S2/C/ISDB-T/DTMB-TH/ATSC )as well as
HD media players.

Signed-off-by: Mohammad Rasim <mohammad.rasim96@gmail.com>
---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index fd6fa07c45b8..a6c83d70aa74 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -1008,6 +1008,8 @@ patternProperties:
     description: Variscite Ltd.
   "^via,.*":
     description: VIA Technologies, Inc.
+  "^videostrong,.*":
+    description: Videostrong Technology Co., Ltd.
   "^virtio,.*":
     description: Virtual I/O Device Specification, developed by the OASIS consortium
   "^vishay,.*":
--
2.24.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH v3 2/2] arm64: dts: meson-gxbb: add support for
  2019-11-30 11:58 [PATCH v3 0/2] add support for videostrong KII Pro Mohammad Rasim
  2019-11-30 11:58 ` [PATCH v3 1/2] dt-bindings: Add vendor prefix for Videostrong Mohammad Rasim
@ 2019-11-30 11:58 ` Mohammad Rasim
  2019-11-30 13:59   ` Martin Blumenstingl
  2019-11-30 14:00 ` [PATCH v3 0/2] add support for videostrong KII Pro Martin Blumenstingl
  2 siblings, 1 reply; 13+ messages in thread
From: Mohammad Rasim @ 2019-11-30 11:58 UTC (permalink / raw)
  To: devicetree, linux-amlogic, Rob Herring, Kevin Hilman,
	Neil Armstrong, Martin Blumenstingl
  Cc: Mark Rutland, Mohammad Rasim

This patch adds support for the Videostrong KII Pro tv box which is
based on the gxbb-p201 reference design

The device tree includes a new compatible for bluetooth "brcm,bcm4335a0"
which was merged recently into torvalds tree

Signed-off-by: Mohammad Rasim <mohammad.rasim96@gmail.com>
---
 arch/arm64/boot/dts/amlogic/Makefile          |  1 +
 .../boot/dts/amlogic/meson-gxbb-kii-pro.dts   | 76 +++++++++++++++++++
 2 files changed, 77 insertions(+)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts

diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
index 84afecba9ec0..a795a170dcab 100644
--- a/arch/arm64/boot/dts/amlogic/Makefile
+++ b/arch/arm64/boot/dts/amlogic/Makefile
@@ -6,6 +6,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
new file mode 100644
index 000000000000..5d120e6ca338
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
@@ -0,0 +1,76 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Mohammad Rasim <mohammad.rasim96@gmail.com>
+ */
+
+/dts-v1/;
+
+#include "meson-gxbb-p20x.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+/ {
+	compatible = "videostrong,kii-pro", "amlogic,p201", "amlogic,s905", "amlogic,meson-gxbb";
+	model = "Videostrong KII Pro";
+
+	leds {
+		compatible = "gpio-leds";
+		red {
+			label = "status";
+			gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+	};
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+
+		button@0 {
+			label = "reset";
+			linux,code = <KEY_POWER>;
+			gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+};
+
+
+
+&uart_A {
+	status = "okay";
+	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
+	pinctrl-names = "default";
+	uart-has-rtscts;
+
+	bluetooth {
+		compatible = "brcm,bcm4335a0";
+	};
+};
+
+
+
+&ethmac {
+	status = "okay";
+	pinctrl-0 = <&eth_rmii_pins>;
+	pinctrl-names = "default";
+
+	phy-handle = <&eth_phy0>;
+	phy-mode = "rmii";
+
+	mdio {
+		compatible = "snps,dwmac-mdio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		eth_phy0: ethernet-phy@0 {
+			/* IC Plus IP101GR (0x02430c54) */
+			reg = <0>;
+			reset-assert-us = <10000>;
+			reset-deassert-us = <10000>;
+			reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
--
2.24.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH v3 1/2] dt-bindings: Add vendor prefix for Videostrong
  2019-11-30 11:58 ` [PATCH v3 1/2] dt-bindings: Add vendor prefix for Videostrong Mohammad Rasim
@ 2019-11-30 13:45   ` Martin Blumenstingl
  2019-11-30 17:11     ` Mohammad Rasim
  0 siblings, 1 reply; 13+ messages in thread
From: Martin Blumenstingl @ 2019-11-30 13:45 UTC (permalink / raw)
  To: Mohammad Rasim
  Cc: Mark Rutland, devicetree, Neil Armstrong, Kevin Hilman,
	Rob Herring, linux-amlogic

Hi Mohammad,

On Sat, Nov 30, 2019 at 12:58 PM Mohammad Rasim
<mohammad.rasim96@gmail.com> wrote:
>
> Videostrong Technology Co., Ltd., A manufacturer of Android Players & STB
> (Android with DVB Hybrid box & DVB-T2/S2/C/ISDB-T/DTMB-TH/ATSC )as well as
the space after ATSC should be after the ")"

> HD media players.
>
> Signed-off-by: Mohammad Rasim <mohammad.rasim96@gmail.com>
with above typo fixed:
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH v3 2/2] arm64: dts: meson-gxbb: add support for
  2019-11-30 11:58 ` [PATCH v3 2/2] arm64: dts: meson-gxbb: add support for Mohammad Rasim
@ 2019-11-30 13:59   ` Martin Blumenstingl
  2019-11-30 17:47     ` Mohammad Rasim
  0 siblings, 1 reply; 13+ messages in thread
From: Martin Blumenstingl @ 2019-11-30 13:59 UTC (permalink / raw)
  To: Mohammad Rasim
  Cc: Mark Rutland, devicetree, Neil Armstrong, Kevin Hilman,
	Rob Herring, linux-amlogic

Hi Mohammad,

this patch should be third in the series.
the currently missing patch for the dt-bindings should be patch two.
you can take the following commit as an example:
effdd8a6b6ecb30b088f36ed0a1fb67cdc7610a9 ("dt-bindings: arm: amlogic:
add SEI Robotics SEI610 bindings")

On Sat, Nov 30, 2019 at 12:58 PM Mohammad Rasim
<mohammad.rasim96@gmail.com> wrote:
>
> This patch adds support for the Videostrong KII Pro tv box which is
> based on the gxbb-p201 reference design
>
> The device tree includes a new compatible for bluetooth "brcm,bcm4335a0"
> which was merged recently into torvalds tree
>
> Signed-off-by: Mohammad Rasim <mohammad.rasim96@gmail.com>
> ---
>  arch/arm64/boot/dts/amlogic/Makefile          |  1 +
>  .../boot/dts/amlogic/meson-gxbb-kii-pro.dts   | 76 +++++++++++++++++++
>  2 files changed, 77 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
>
> diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
> index 84afecba9ec0..a795a170dcab 100644
> --- a/arch/arm64/boot/dts/amlogic/Makefile
> +++ b/arch/arm64/boot/dts/amlogic/Makefile
> @@ -6,6 +6,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
> +dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb
>  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
> new file mode 100644
> index 000000000000..5d120e6ca338
> --- /dev/null
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
> @@ -0,0 +1,76 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (c) 2019 Mohammad Rasim <mohammad.rasim96@gmail.com>
> + */
> +
> +/dts-v1/;
> +
> +#include "meson-gxbb-p20x.dtsi"
> +
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +/ {
> +       compatible = "videostrong,kii-pro", "amlogic,p201", "amlogic,s905", "amlogic,meson-gxbb";
> +       model = "Videostrong KII Pro";
> +
> +       leds {
> +               compatible = "gpio-leds";
> +               red {
> +                       label = "status";
this property seems to be deprecated now, see
Documentation/devicetree/bindings/leds/common.txt
but I'm not sure whether Kevin has made a decision yet when to not
accept "label" properties here anymore

> +                       gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>;
> +                       default-state = "off";
> +               };
> +       };
> +
> +       gpio-keys-polled {
> +               compatible = "gpio-keys-polled";
> +               #address-cells = <1>;
> +               #size-cells = <0>;
> +               poll-interval = <20>;
> +
> +               button@0 {
please name this button-reset (even though we've done it wrong for
other boards in the past)
@0 indicates a unit-address, but the button has no address

> +                       label = "reset";
> +                       linux,code = <KEY_POWER>;
> +                       gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
> +               };
> +       };
> +
> +};
> +
> +
> +
> +&uart_A {
> +       status = "okay";
> +       pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
> +       pinctrl-names = "default";
> +       uart-has-rtscts;
> +
> +       bluetooth {
> +               compatible = "brcm,bcm4335a0";
> +       };
> +};
> +
> +
> +
> +&ethmac {
> +       status = "okay";
> +       pinctrl-0 = <&eth_rmii_pins>;
> +       pinctrl-names = "default";
> +
> +       phy-handle = <&eth_phy0>;
> +       phy-mode = "rmii";
> +
> +       mdio {
> +               compatible = "snps,dwmac-mdio";
> +               #address-cells = <1>;
> +               #size-cells = <0>;
> +
> +               eth_phy0: ethernet-phy@0 {
> +                       /* IC Plus IP101GR (0x02430c54) */
> +                       reg = <0>;
> +                       reset-assert-us = <10000>;
> +                       reset-deassert-us = <10000>;
> +                       reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
> +               };
thank you for switching to the new PHY bindings :)

assuming Kevin still accepts the LED "label" and you rename the button
node then you can add my:
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
(don't forget that we still need an additional dt-bindings patch though)


Martin

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH v3 0/2] add support for videostrong KII Pro
  2019-11-30 11:58 [PATCH v3 0/2] add support for videostrong KII Pro Mohammad Rasim
  2019-11-30 11:58 ` [PATCH v3 1/2] dt-bindings: Add vendor prefix for Videostrong Mohammad Rasim
  2019-11-30 11:58 ` [PATCH v3 2/2] arm64: dts: meson-gxbb: add support for Mohammad Rasim
@ 2019-11-30 14:00 ` Martin Blumenstingl
  2019-11-30 17:51   ` Mohammad Rasim
  2 siblings, 1 reply; 13+ messages in thread
From: Martin Blumenstingl @ 2019-11-30 14:00 UTC (permalink / raw)
  To: Mohammad Rasim; +Cc: linux-amlogic, Neil Armstrong, Kevin Hilman

Hi Mohammad,

On Sat, Nov 30, 2019 at 12:58 PM Mohammad Rasim
<mohammad.rasim96@gmail.com> wrote:
>
>
> This patchset adds support for the Videostrong KII Pro tv box which is
> based on the gxbb-p201 reference design.
>
> Device specifications:
> - SOC: Amlogic S905
> - RAM: 2GB DDR3
> - Storage: 16GB
> - Connectivity:
>         - 10/100M Ethernet (IC Plus IP101GR)
>         - 802.11 b/g/n/ac Wi-Fi (Ampak AP6335 BT/WIFI combo)
>         - Bluetooth 4.0 (Ampak AP6335 BT/WIFI combo)
> - Video out: HDMI 2.0 up to 4K @ 60Hz, and 3.5mm AV (composite video) jack
> - Audio out: HDMI, AV (stereo audio) and optical S/PDIF
> - Tuner: AVL6862 DVB-C/T/T2 + DVB-S/S2 demod and Rafael Micro R848 tuner
> - Ports:
>         - x1 micro SD card slot up to 32GB
>         - 4x USB 2.0 host ports
> - Misc:
>     - Power button and LED, IR receiver
it would be great if you could add this description also to the .dts patch
that way we can always look up the specs in git history (which is
easier than finding the corresponding mail)


Martin

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH v3 1/2] dt-bindings: Add vendor prefix for Videostrong
  2019-11-30 13:45   ` Martin Blumenstingl
@ 2019-11-30 17:11     ` Mohammad Rasim
  0 siblings, 0 replies; 13+ messages in thread
From: Mohammad Rasim @ 2019-11-30 17:11 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: Mark Rutland, devicetree, Neil Armstrong, Kevin Hilman,
	Rob Herring, linux-amlogic

On 19/11/30 02:45PM, Martin Blumenstingl wrote:
> Hi Mohammad,
>
> On Sat, Nov 30, 2019 at 12:58 PM Mohammad Rasim
> <mohammad.rasim96@gmail.com> wrote:
> >
> > Videostrong Technology Co., Ltd., A manufacturer of Android Players & STB
> > (Android with DVB Hybrid box & DVB-T2/S2/C/ISDB-T/DTMB-TH/ATSC )as well as
> the space after ATSC should be after the ")"
>
Thanks, will fix that
> > HD media players.
> >
> > Signed-off-by: Mohammad Rasim <mohammad.rasim96@gmail.com>
> with above typo fixed:
> Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH v3 2/2] arm64: dts: meson-gxbb: add support for
  2019-11-30 13:59   ` Martin Blumenstingl
@ 2019-11-30 17:47     ` Mohammad Rasim
  2019-11-30 18:57       ` Martin Blumenstingl
  0 siblings, 1 reply; 13+ messages in thread
From: Mohammad Rasim @ 2019-11-30 17:47 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: Mark Rutland, devicetree, Neil Armstrong, Kevin Hilman,
	Rob Herring, linux-amlogic

On 19/11/30 02:59PM, Martin Blumenstingl wrote:
> Hi Mohammad,
>
> this patch should be third in the series.
> the currently missing patch for the dt-bindings should be patch two.
> you can take the following commit as an example:
> effdd8a6b6ecb30b088f36ed0a1fb67cdc7610a9 ("dt-bindings: arm: amlogic:
> add SEI Robotics SEI610 bindings")
>
> On Sat, Nov 30, 2019 at 12:58 PM Mohammad Rasim
> <mohammad.rasim96@gmail.com> wrote:
> >
> > This patch adds support for the Videostrong KII Pro tv box which is
> > based on the gxbb-p201 reference design
> >
> > The device tree includes a new compatible for bluetooth "brcm,bcm4335a0"
> > which was merged recently into torvalds tree
> >
> > Signed-off-by: Mohammad Rasim <mohammad.rasim96@gmail.com>
> > ---
> >  arch/arm64/boot/dts/amlogic/Makefile          |  1 +
> >  .../boot/dts/amlogic/meson-gxbb-kii-pro.dts   | 76 +++++++++++++++++++
> >  2 files changed, 77 insertions(+)
> >  create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
> >
> > diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
> > index 84afecba9ec0..a795a170dcab 100644
> > --- a/arch/arm64/boot/dts/amlogic/Makefile
> > +++ b/arch/arm64/boot/dts/amlogic/Makefile
> > @@ -6,6 +6,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb
> >  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
> >  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
> >  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
> > +dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
> >  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
> >  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb
> >  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb
> > diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
> > new file mode 100644
> > index 000000000000..5d120e6ca338
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
> > @@ -0,0 +1,76 @@
> > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > +/*
> > + * Copyright (c) 2019 Mohammad Rasim <mohammad.rasim96@gmail.com>
> > + */
> > +
> > +/dts-v1/;
> > +
> > +#include "meson-gxbb-p20x.dtsi"
> > +
> > +#include <dt-bindings/gpio/gpio.h>
> > +#include <dt-bindings/input/input.h>
> > +/ {
> > +       compatible = "videostrong,kii-pro", "amlogic,p201", "amlogic,s905", "amlogic,meson-gxbb";
> > +       model = "Videostrong KII Pro";
> > +
> > +       leds {
> > +               compatible = "gpio-leds";
> > +               red {
> > +                       label = "status";
> this property seems to be deprecated now, see
> Documentation/devicetree/bindings/leds/common.txt
> but I'm not sure whether Kevin has made a decision yet when to not
> accept "label" properties here anymore
OK, I will remove the deprecated property
but I'm not sure what should I choose as a function, LED_FUNCTION_STATUS
or LED_FUNCTION_ACTIVITY ?
>
> > +                       gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>;
> > +                       default-state = "off";
> > +               };
> > +       };
> > +
> > +       gpio-keys-polled {
> > +               compatible = "gpio-keys-polled";
> > +               #address-cells = <1>;
> > +               #size-cells = <0>;
> > +               poll-interval = <20>;
> > +
> > +               button@0 {
> please name this button-reset (even though we've done it wrong for
> other boards in the past)
> @0 indicates a unit-address, but the button has no address
Ok, will fix it in the next version
>
> > +                       label = "reset";
> > +                       linux,code = <KEY_POWER>;
> > +                       gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
> > +               };
> > +       };
> > +
> > +};
> > +
> > +
> > +
> > +&uart_A {
> > +       status = "okay";
> > +       pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
> > +       pinctrl-names = "default";
> > +       uart-has-rtscts;
> > +
> > +       bluetooth {
> > +               compatible = "brcm,bcm4335a0";
> > +       };
> > +};
> > +
> > +
> > +
> > +&ethmac {
> > +       status = "okay";
> > +       pinctrl-0 = <&eth_rmii_pins>;
> > +       pinctrl-names = "default";
> > +
> > +       phy-handle = <&eth_phy0>;
> > +       phy-mode = "rmii";
> > +
> > +       mdio {
> > +               compatible = "snps,dwmac-mdio";
> > +               #address-cells = <1>;
> > +               #size-cells = <0>;
> > +
> > +               eth_phy0: ethernet-phy@0 {
> > +                       /* IC Plus IP101GR (0x02430c54) */
> > +                       reg = <0>;
> > +                       reset-assert-us = <10000>;
> > +                       reset-deassert-us = <10000>;
> > +                       reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
> > +               };
> thank you for switching to the new PHY bindings :)
>
> assuming Kevin still accepts the LED "label" and you rename the button
> node then you can add my:
> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> (don't forget that we still need an additional dt-bindings patch though)
>
I'm sending a new version anyways so I will remove the lable property

Thanks
>
> Martin

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH v3 0/2] add support for videostrong KII Pro
  2019-11-30 14:00 ` [PATCH v3 0/2] add support for videostrong KII Pro Martin Blumenstingl
@ 2019-11-30 17:51   ` Mohammad Rasim
  0 siblings, 0 replies; 13+ messages in thread
From: Mohammad Rasim @ 2019-11-30 17:51 UTC (permalink / raw)
  To: Martin Blumenstingl; +Cc: linux-amlogic, Neil Armstrong, Kevin Hilman

On 19/11/30 03:00PM, Martin Blumenstingl wrote:
> Hi Mohammad,
>
> On Sat, Nov 30, 2019 at 12:58 PM Mohammad Rasim
> <mohammad.rasim96@gmail.com> wrote:
> >
> >
> > This patchset adds support for the Videostrong KII Pro tv box which is
> > based on the gxbb-p201 reference design.
> >
> > Device specifications:
> > - SOC: Amlogic S905
> > - RAM: 2GB DDR3
> > - Storage: 16GB
> > - Connectivity:
> >         - 10/100M Ethernet (IC Plus IP101GR)
> >         - 802.11 b/g/n/ac Wi-Fi (Ampak AP6335 BT/WIFI combo)
> >         - Bluetooth 4.0 (Ampak AP6335 BT/WIFI combo)
> > - Video out: HDMI 2.0 up to 4K @ 60Hz, and 3.5mm AV (composite video) jack
> > - Audio out: HDMI, AV (stereo audio) and optical S/PDIF
> > - Tuner: AVL6862 DVB-C/T/T2 + DVB-S/S2 demod and Rafael Micro R848 tuner
> > - Ports:
> >         - x1 micro SD card slot up to 32GB
> >         - 4x USB 2.0 host ports
> > - Misc:
> >     - Power button and LED, IR receiver
> it would be great if you could add this description also to the .dts patch
> that way we can always look up the specs in git history (which is
> easier than finding the corresponding mail)
>
Ok, will add it in the next version

Regards
>
> Martin

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH v3 2/2] arm64: dts: meson-gxbb: add support for
  2019-11-30 17:47     ` Mohammad Rasim
@ 2019-11-30 18:57       ` Martin Blumenstingl
  2019-11-30 19:07         ` Mohammad Rasim
  0 siblings, 1 reply; 13+ messages in thread
From: Martin Blumenstingl @ 2019-11-30 18:57 UTC (permalink / raw)
  To: Mohammad Rasim
  Cc: Mark Rutland, devicetree, Neil Armstrong, Kevin Hilman,
	Rob Herring, linux-amlogic

On Sat, Nov 30, 2019 at 6:47 PM Mohammad Rasim
<mohammad.rasim96@gmail.com> wrote:
>
> On 19/11/30 02:59PM, Martin Blumenstingl wrote:
> > Hi Mohammad,
> >
> > this patch should be third in the series.
> > the currently missing patch for the dt-bindings should be patch two.
> > you can take the following commit as an example:
> > effdd8a6b6ecb30b088f36ed0a1fb67cdc7610a9 ("dt-bindings: arm: amlogic:
> > add SEI Robotics SEI610 bindings")
> >
> > On Sat, Nov 30, 2019 at 12:58 PM Mohammad Rasim
> > <mohammad.rasim96@gmail.com> wrote:
> > >
> > > This patch adds support for the Videostrong KII Pro tv box which is
> > > based on the gxbb-p201 reference design
> > >
> > > The device tree includes a new compatible for bluetooth "brcm,bcm4335a0"
> > > which was merged recently into torvalds tree
> > >
> > > Signed-off-by: Mohammad Rasim <mohammad.rasim96@gmail.com>
> > > ---
> > >  arch/arm64/boot/dts/amlogic/Makefile          |  1 +
> > >  .../boot/dts/amlogic/meson-gxbb-kii-pro.dts   | 76 +++++++++++++++++++
> > >  2 files changed, 77 insertions(+)
> > >  create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
> > >
> > > diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
> > > index 84afecba9ec0..a795a170dcab 100644
> > > --- a/arch/arm64/boot/dts/amlogic/Makefile
> > > +++ b/arch/arm64/boot/dts/amlogic/Makefile
> > > @@ -6,6 +6,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb
> > >  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
> > >  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
> > >  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
> > > +dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
> > >  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
> > >  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb
> > >  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb
> > > diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
> > > new file mode 100644
> > > index 000000000000..5d120e6ca338
> > > --- /dev/null
> > > +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
> > > @@ -0,0 +1,76 @@
> > > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > > +/*
> > > + * Copyright (c) 2019 Mohammad Rasim <mohammad.rasim96@gmail.com>
> > > + */
> > > +
> > > +/dts-v1/;
> > > +
> > > +#include "meson-gxbb-p20x.dtsi"
> > > +
> > > +#include <dt-bindings/gpio/gpio.h>
> > > +#include <dt-bindings/input/input.h>
> > > +/ {
> > > +       compatible = "videostrong,kii-pro", "amlogic,p201", "amlogic,s905", "amlogic,meson-gxbb";
> > > +       model = "Videostrong KII Pro";
> > > +
> > > +       leds {
> > > +               compatible = "gpio-leds";
> > > +               red {
> > > +                       label = "status";
> > this property seems to be deprecated now, see
> > Documentation/devicetree/bindings/leds/common.txt
> > but I'm not sure whether Kevin has made a decision yet when to not
> > accept "label" properties here anymore
> OK, I will remove the deprecated property
> but I'm not sure what should I choose as a function, LED_FUNCTION_STATUS
> or LED_FUNCTION_ACTIVITY ?
I haven't used function and color myself but I believe it works like
this (untested):
- add an #include <dt-bindings/leds/common.h> next to the other
#includes (keep alphabetical ordering). this include file also
contains all the #defines for color and function
- add a color property, for example: color = <LED_COLOR_ID_RED>;
- add a function property, for example: function = <LED_FUNCTION_STATUS>;
- test, debug and fix potential issues ;)


Martin

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH v3 2/2] arm64: dts: meson-gxbb: add support for
  2019-11-30 18:57       ` Martin Blumenstingl
@ 2019-11-30 19:07         ` Mohammad Rasim
  2019-11-30 19:12           ` Mohammad Rasim
  2019-11-30 19:25           ` Martin Blumenstingl
  0 siblings, 2 replies; 13+ messages in thread
From: Mohammad Rasim @ 2019-11-30 19:07 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: Mark Rutland, devicetree, Neil Armstrong, Kevin Hilman,
	Rob Herring, linux-amlogic

On 19/11/30 07:57PM, Martin Blumenstingl wrote:
> On Sat, Nov 30, 2019 at 6:47 PM Mohammad Rasim
> <mohammad.rasim96@gmail.com> wrote:
> >
> > On 19/11/30 02:59PM, Martin Blumenstingl wrote:
> > > Hi Mohammad,
> > >
> > > this patch should be third in the series.
> > > the currently missing patch for the dt-bindings should be patch two.
> > > you can take the following commit as an example:
> > > effdd8a6b6ecb30b088f36ed0a1fb67cdc7610a9 ("dt-bindings: arm: amlogic:
> > > add SEI Robotics SEI610 bindings")
> > >
> > > On Sat, Nov 30, 2019 at 12:58 PM Mohammad Rasim
> > > <mohammad.rasim96@gmail.com> wrote:
> > > >
> > > > This patch adds support for the Videostrong KII Pro tv box which is
> > > > based on the gxbb-p201 reference design
> > > >
> > > > The device tree includes a new compatible for bluetooth "brcm,bcm4335a0"
> > > > which was merged recently into torvalds tree
> > > >
> > > > Signed-off-by: Mohammad Rasim <mohammad.rasim96@gmail.com>
> > > > ---
> > > >  arch/arm64/boot/dts/amlogic/Makefile          |  1 +
> > > >  .../boot/dts/amlogic/meson-gxbb-kii-pro.dts   | 76 +++++++++++++++++++
> > > >  2 files changed, 77 insertions(+)
> > > >  create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
> > > >
> > > > diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
> > > > index 84afecba9ec0..a795a170dcab 100644
> > > > --- a/arch/arm64/boot/dts/amlogic/Makefile
> > > > +++ b/arch/arm64/boot/dts/amlogic/Makefile
> > > > @@ -6,6 +6,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb
> > > >  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
> > > >  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
> > > >  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
> > > > +dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
> > > >  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
> > > >  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb
> > > >  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb
> > > > diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
> > > > new file mode 100644
> > > > index 000000000000..5d120e6ca338
> > > > --- /dev/null
> > > > +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
> > > > @@ -0,0 +1,76 @@
> > > > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > > > +/*
> > > > + * Copyright (c) 2019 Mohammad Rasim <mohammad.rasim96@gmail.com>
> > > > + */
> > > > +
> > > > +/dts-v1/;
> > > > +
> > > > +#include "meson-gxbb-p20x.dtsi"
> > > > +
> > > > +#include <dt-bindings/gpio/gpio.h>
> > > > +#include <dt-bindings/input/input.h>
> > > > +/ {
> > > > +       compatible = "videostrong,kii-pro", "amlogic,p201", "amlogic,s905", "amlogic,meson-gxbb";
> > > > +       model = "Videostrong KII Pro";
> > > > +
> > > > +       leds {
> > > > +               compatible = "gpio-leds";
> > > > +               red {
> > > > +                       label = "status";
> > > this property seems to be deprecated now, see
> > > Documentation/devicetree/bindings/leds/common.txt
> > > but I'm not sure whether Kevin has made a decision yet when to not
> > > accept "label" properties here anymore
> > OK, I will remove the deprecated property
> > but I'm not sure what should I choose as a function, LED_FUNCTION_STATUS
> > or LED_FUNCTION_ACTIVITY ?
> I haven't used function and color myself but I believe it works like
> this (untested):
> - add an #include <dt-bindings/leds/common.h> next to the other
> #includes (keep alphabetical ordering). this include file also
> contains all the #defines for color and function
> - add a color property, for example: color = <LED_COLOR_ID_RED>;
> - add a function property, for example: function = <LED_FUNCTION_STATUS>;
> - test, debug and fix potential issues ;)
Yes, I've already tested it but I'm just not sure what should be in the
function property, LED_FUNCTION_STATUS and LED_FUNCTION_ACTIVITY both
seem like good choices,
in my tests this property was prepended to the label
So the following:

		status {
			gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>;
			default-state = "off";
			color = <LED_COLOR_ID_RED>;
			function = LED_FUNCTION_STATUS;
		};
resulted in a led labeled red:status
[root@alarm ~]# ls /sys/class/leds/
input1::capslock  input1::numlock  input1::scrolllock  red:status

if this property only used to lable the led then LED_FUNCTION_STATUS is
ok, but maybe this is used by userspace to trigger the led ?!

Regards
>
>
> Martin

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH v3 2/2] arm64: dts: meson-gxbb: add support for
  2019-11-30 19:07         ` Mohammad Rasim
@ 2019-11-30 19:12           ` Mohammad Rasim
  2019-11-30 19:25           ` Martin Blumenstingl
  1 sibling, 0 replies; 13+ messages in thread
From: Mohammad Rasim @ 2019-11-30 19:12 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: Mark Rutland, devicetree, Neil Armstrong, Kevin Hilman,
	Rob Herring, linux-amlogic

On 19/11/30 10:07PM, Mohammad Rasim wrote:
> On 19/11/30 07:57PM, Martin Blumenstingl wrote:
> > On Sat, Nov 30, 2019 at 6:47 PM Mohammad Rasim
> > <mohammad.rasim96@gmail.com> wrote:
> > >
> > > On 19/11/30 02:59PM, Martin Blumenstingl wrote:
> > > > Hi Mohammad,
> > > >
> > > > this patch should be third in the series.
> > > > the currently missing patch for the dt-bindings should be patch two.
> > > > you can take the following commit as an example:
> > > > effdd8a6b6ecb30b088f36ed0a1fb67cdc7610a9 ("dt-bindings: arm: amlogic:
> > > > add SEI Robotics SEI610 bindings")
> > > >
> > > > On Sat, Nov 30, 2019 at 12:58 PM Mohammad Rasim
> > > > <mohammad.rasim96@gmail.com> wrote:
> > > > >
> > > > > This patch adds support for the Videostrong KII Pro tv box which is
> > > > > based on the gxbb-p201 reference design
> > > > >
> > > > > The device tree includes a new compatible for bluetooth "brcm,bcm4335a0"
> > > > > which was merged recently into torvalds tree
> > > > >
> > > > > Signed-off-by: Mohammad Rasim <mohammad.rasim96@gmail.com>
> > > > > ---
> > > > >  arch/arm64/boot/dts/amlogic/Makefile          |  1 +
> > > > >  .../boot/dts/amlogic/meson-gxbb-kii-pro.dts   | 76 +++++++++++++++++++
> > > > >  2 files changed, 77 insertions(+)
> > > > >  create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
> > > > >
> > > > > diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
> > > > > index 84afecba9ec0..a795a170dcab 100644
> > > > > --- a/arch/arm64/boot/dts/amlogic/Makefile
> > > > > +++ b/arch/arm64/boot/dts/amlogic/Makefile
> > > > > @@ -6,6 +6,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb
> > > > >  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
> > > > >  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
> > > > >  dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
> > > > > +dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
> > > > >  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
> > > > >  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb
> > > > >  dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb
> > > > > diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
> > > > > new file mode 100644
> > > > > index 000000000000..5d120e6ca338
> > > > > --- /dev/null
> > > > > +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts
> > > > > @@ -0,0 +1,76 @@
> > > > > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > > > > +/*
> > > > > + * Copyright (c) 2019 Mohammad Rasim <mohammad.rasim96@gmail.com>
> > > > > + */
> > > > > +
> > > > > +/dts-v1/;
> > > > > +
> > > > > +#include "meson-gxbb-p20x.dtsi"
> > > > > +
> > > > > +#include <dt-bindings/gpio/gpio.h>
> > > > > +#include <dt-bindings/input/input.h>
> > > > > +/ {
> > > > > +       compatible = "videostrong,kii-pro", "amlogic,p201", "amlogic,s905", "amlogic,meson-gxbb";
> > > > > +       model = "Videostrong KII Pro";
> > > > > +
> > > > > +       leds {
> > > > > +               compatible = "gpio-leds";
> > > > > +               red {
> > > > > +                       label = "status";
> > > > this property seems to be deprecated now, see
> > > > Documentation/devicetree/bindings/leds/common.txt
> > > > but I'm not sure whether Kevin has made a decision yet when to not
> > > > accept "label" properties here anymore
> > > OK, I will remove the deprecated property
> > > but I'm not sure what should I choose as a function, LED_FUNCTION_STATUS
> > > or LED_FUNCTION_ACTIVITY ?
> > I haven't used function and color myself but I believe it works like
> > this (untested):
> > - add an #include <dt-bindings/leds/common.h> next to the other
> > #includes (keep alphabetical ordering). this include file also
> > contains all the #defines for color and function
> > - add a color property, for example: color = <LED_COLOR_ID_RED>;
> > - add a function property, for example: function = <LED_FUNCTION_STATUS>;
> > - test, debug and fix potential issues ;)
> Yes, I've already tested it but I'm just not sure what should be in the
> function property, LED_FUNCTION_STATUS and LED_FUNCTION_ACTIVITY both
> seem like good choices,
> in my tests this property was prepended to the label
Scratch that, I was confused because i changed the node name, the labled
is generated from the color property and the node name.
although my question regarding userspace usage still applies.
> So the following:
>
> 		status {
> 			gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>;
> 			default-state = "off";
> 			color = <LED_COLOR_ID_RED>;
> 			function = LED_FUNCTION_STATUS;
> 		};
> resulted in a led labeled red:status
> [root@alarm ~]# ls /sys/class/leds/
> input1::capslock  input1::numlock  input1::scrolllock  red:status
>
> if this property only used to lable the led then LED_FUNCTION_STATUS is
> ok, but maybe this is used by userspace to trigger the led ?!
>
> Regards
> >
> >
> > Martin

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH v3 2/2] arm64: dts: meson-gxbb: add support for
  2019-11-30 19:07         ` Mohammad Rasim
  2019-11-30 19:12           ` Mohammad Rasim
@ 2019-11-30 19:25           ` Martin Blumenstingl
  1 sibling, 0 replies; 13+ messages in thread
From: Martin Blumenstingl @ 2019-11-30 19:25 UTC (permalink / raw)
  To: Mohammad Rasim
  Cc: Mark Rutland, devicetree, Neil Armstrong, Kevin Hilman,
	Rob Herring, linux-amlogic

On Sat, Nov 30, 2019 at 8:07 PM Mohammad Rasim
<mohammad.rasim96@gmail.com> wrote:
[...]
> > > > > +       leds {
> > > > > +               compatible = "gpio-leds";
> > > > > +               red {
> > > > > +                       label = "status";
> > > > this property seems to be deprecated now, see
> > > > Documentation/devicetree/bindings/leds/common.txt
> > > > but I'm not sure whether Kevin has made a decision yet when to not
> > > > accept "label" properties here anymore
> > > OK, I will remove the deprecated property
> > > but I'm not sure what should I choose as a function, LED_FUNCTION_STATUS
> > > or LED_FUNCTION_ACTIVITY ?
> > I haven't used function and color myself but I believe it works like
> > this (untested):
> > - add an #include <dt-bindings/leds/common.h> next to the other
> > #includes (keep alphabetical ordering). this include file also
> > contains all the #defines for color and function
> > - add a color property, for example: color = <LED_COLOR_ID_RED>;
> > - add a function property, for example: function = <LED_FUNCTION_STATUS>;
> > - test, debug and fix potential issues ;)
> Yes, I've already tested it but I'm just not sure what should be in the
> function property, LED_FUNCTION_STATUS and LED_FUNCTION_ACTIVITY both
> seem like good choices,
I haven't considered "activity" before, but most of our boards with
some kind of status LED use status in the label
unless someone objects: choose the one you like most

[...]
> if this property only used to lable the led then LED_FUNCTION_STATUS is
> ok, but maybe this is used by userspace to trigger the led ?!
in general devicetree describes hardware
I don't know if userspace does something "automatically" based on the
function. however, my expectation is that the trigger from
"linux,default-trigger" is used (if set) and that you can change the
trigger from userspace manually (if you wish)


Martin

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

end of thread, back to index

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-30 11:58 [PATCH v3 0/2] add support for videostrong KII Pro Mohammad Rasim
2019-11-30 11:58 ` [PATCH v3 1/2] dt-bindings: Add vendor prefix for Videostrong Mohammad Rasim
2019-11-30 13:45   ` Martin Blumenstingl
2019-11-30 17:11     ` Mohammad Rasim
2019-11-30 11:58 ` [PATCH v3 2/2] arm64: dts: meson-gxbb: add support for Mohammad Rasim
2019-11-30 13:59   ` Martin Blumenstingl
2019-11-30 17:47     ` Mohammad Rasim
2019-11-30 18:57       ` Martin Blumenstingl
2019-11-30 19:07         ` Mohammad Rasim
2019-11-30 19:12           ` Mohammad Rasim
2019-11-30 19:25           ` Martin Blumenstingl
2019-11-30 14:00 ` [PATCH v3 0/2] add support for videostrong KII Pro Martin Blumenstingl
2019-11-30 17:51   ` Mohammad Rasim

Linux-Amlogic Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-amlogic/0 linux-amlogic/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-amlogic linux-amlogic/ https://lore.kernel.org/linux-amlogic \
		linux-amlogic@lists.infradead.org
	public-inbox-index linux-amlogic

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-amlogic


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git