LKML Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/6] arm64: dts: rockchip: misc. cleanups
@ 2020-03-27  3:04 Chen-Yu Tsai
  2020-03-27  3:04 ` [PATCH 1/6] arm64: dts: rockchip: rk3399-roc-pc: Fix MMC numbering for LED triggers Chen-Yu Tsai
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Chen-Yu Tsai @ 2020-03-27  3:04 UTC (permalink / raw)
  To: Heiko Stuebner, Rob Herring
  Cc: Chen-Yu Tsai, linux-rockchip, linux-arm-kernel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

Hi,

Here are a bunch of cleanups for rk3399 and rk3328.

  - Some dtc warnings were silenced, however a few still remain.
    Found those while making device tree overlays

  - Replaced some hardware specific device node names, such as dwc3
    and rk808, with generic names

  - Fixed MMC numbering for roc-rk3399-pc with mezzanine

The series is based on linux-next 2020-03-24. For some reason 2020-03-26
doesn't boot.

Please have a look.

Regards
ChenYu

Chen-Yu Tsai (6):
  arm64: dts: rockchip: rk3399-roc-pc: Fix MMC numbering for LED
    triggers
  arm64: dts: rockchip: rk3328: Replace RK805 PMIC node name with "pmic"
  arm64: dts: rockchip: rk3328: drop non-existent gmac2phy pinmux
    options
  arm64: dts: rockchip: rk3328: drop #address-cells, #size-cells from
    grf node
  arm64: dts: rockchip: rk3399: drop #address-cells, #size-cells from
    pmugrf node
  arm64: dts: rockchip: rk3399: Rename dwc3 device nodes to make dtc
    happy

 arch/arm64/boot/dts/rockchip/rk3328-evb.dts    |  2 +-
 arch/arm64/boot/dts/rockchip/rk3328-rock64.dts |  2 +-
 arch/arm64/boot/dts/rockchip/rk3328.dtsi       | 18 ------------------
 .../dts/rockchip/rk3399-roc-pc-mezzanine.dts   |  8 ++++++++
 .../arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi |  4 ++--
 arch/arm64/boot/dts/rockchip/rk3399.dtsi       |  6 ++----
 6 files changed, 14 insertions(+), 26 deletions(-)

-- 
2.25.1


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

* [PATCH 1/6] arm64: dts: rockchip: rk3399-roc-pc: Fix MMC numbering for LED triggers
  2020-03-27  3:04 [PATCH 0/6] arm64: dts: rockchip: misc. cleanups Chen-Yu Tsai
@ 2020-03-27  3:04 ` Chen-Yu Tsai
  2020-03-27  9:58   ` Johan Jonker
  2020-03-27  3:04 ` [PATCH 2/6] arm64: dts: rockchip: rk3328: Replace RK805 PMIC node name with "pmic" Chen-Yu Tsai
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Chen-Yu Tsai @ 2020-03-27  3:04 UTC (permalink / raw)
  To: Heiko Stuebner, Rob Herring
  Cc: Chen-Yu Tsai, linux-rockchip, linux-arm-kernel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

With SDIO now enabled, the numbering of the existing MMC host controllers
gets incremented by 1, as the SDIO host is the first one.

Increment the numbering of the MMC LED triggers to match.

Fixes: cf3c5397835f ("arm64: dts: rockchip: Enable sdio0 and uart0 on rk3399-roc-pc-mezzanine")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts | 8 ++++++++
 arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi          | 4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts
index 2acb3d500fb9..f0686fc276be 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts
@@ -38,6 +38,10 @@ vcc3v3_pcie: vcc3v3-pcie {
 	};
 };
 
+&diy_led {
+	linux,default-trigger = "mmc2";
+};
+
 &pcie_phy {
 	status = "okay";
 };
@@ -91,3 +95,7 @@ &uart0 {
 	pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
 	status = "okay";
 };
+
+&yellow_led {
+	linux,default-trigger = "mmc1";
+};
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
index 9f225e9c3d54..bc060ac7972d 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
@@ -70,14 +70,14 @@ work-led {
 			linux,default-trigger = "heartbeat";
 		};
 
-		diy-led {
+		diy_led: diy-led {
 			label = "red:diy";
 			gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
 			default-state = "off";
 			linux,default-trigger = "mmc1";
 		};
 
-		yellow-led {
+		yellow_led: yellow-led {
 			label = "yellow:yellow-led";
 			gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
 			default-state = "off";
-- 
2.25.1


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

* [PATCH 2/6] arm64: dts: rockchip: rk3328: Replace RK805 PMIC node name with "pmic"
  2020-03-27  3:04 [PATCH 0/6] arm64: dts: rockchip: misc. cleanups Chen-Yu Tsai
  2020-03-27  3:04 ` [PATCH 1/6] arm64: dts: rockchip: rk3399-roc-pc: Fix MMC numbering for LED triggers Chen-Yu Tsai
@ 2020-03-27  3:04 ` Chen-Yu Tsai
  2020-03-27 12:12   ` Johan Jonker
  2020-03-27  3:04 ` [PATCH 3/6] arm64: dts: rockchip: rk3328: drop non-existent gmac2phy pinmux options Chen-Yu Tsai
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Chen-Yu Tsai @ 2020-03-27  3:04 UTC (permalink / raw)
  To: Heiko Stuebner, Rob Herring
  Cc: Chen-Yu Tsai, linux-rockchip, linux-arm-kernel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

In some board device tree files, "rk805" was used for the RK805 PMIC's
node name. However the policy for device trees is that generic names
should be used.

Replace the "rk805" node name with the generic "pmic" name.

Fixes: 1e28037ec88e ("arm64: dts: rockchip: add rk805 node for rk3328-evb")
Fixes: 955bebde057e ("arm64: dts: rockchip: add rk3328-rock64 board")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm64/boot/dts/rockchip/rk3328-evb.dts    | 2 +-
 arch/arm64/boot/dts/rockchip/rk3328-rock64.dts | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328-evb.dts b/arch/arm64/boot/dts/rockchip/rk3328-evb.dts
index 49c4b96da3d4..6abc6f4a86cf 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-evb.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-evb.dts
@@ -92,7 +92,7 @@ &gmac2phy {
 &i2c1 {
 	status = "okay";
 
-	rk805: rk805@18 {
+	rk805: pmic@18 {
 		compatible = "rockchip,rk805";
 		reg = <0x18>;
 		interrupt-parent = <&gpio2>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
index bf3e546f5266..ebf3eb222e1f 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
@@ -170,7 +170,7 @@ &hdmiphy {
 &i2c1 {
 	status = "okay";
 
-	rk805: rk805@18 {
+	rk805: pmic@18 {
 		compatible = "rockchip,rk805";
 		reg = <0x18>;
 		interrupt-parent = <&gpio2>;
-- 
2.25.1


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

* [PATCH 3/6] arm64: dts: rockchip: rk3328: drop non-existent gmac2phy pinmux options
  2020-03-27  3:04 [PATCH 0/6] arm64: dts: rockchip: misc. cleanups Chen-Yu Tsai
  2020-03-27  3:04 ` [PATCH 1/6] arm64: dts: rockchip: rk3399-roc-pc: Fix MMC numbering for LED triggers Chen-Yu Tsai
  2020-03-27  3:04 ` [PATCH 2/6] arm64: dts: rockchip: rk3328: Replace RK805 PMIC node name with "pmic" Chen-Yu Tsai
@ 2020-03-27  3:04 ` Chen-Yu Tsai
  2020-03-27  3:04 ` [PATCH 4/6] arm64: dts: rockchip: rk3328: drop #address-cells, #size-cells from grf node Chen-Yu Tsai
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Chen-Yu Tsai @ 2020-03-27  3:04 UTC (permalink / raw)
  To: Heiko Stuebner, Rob Herring
  Cc: Chen-Yu Tsai, linux-rockchip, linux-arm-kernel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

When gmac2phy was added, a whole bunch of pinmux options were added.
Turns out some of these don't exist on the actual product, based on
the publicly available TRM.

Remove them.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm64/boot/dts/rockchip/rk3328.dtsi | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
index 7e88d88aab98..b861b4fd75e6 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
@@ -1794,10 +1794,6 @@ rmiim1_pins: rmiim1-pins {
 		};
 
 		gmac2phy {
-			fephyled_speed100: fephyled-speed100 {
-				rockchip,pins = <0 RK_PD7 1 &pcfg_pull_none>;
-			};
-
 			fephyled_speed10: fephyled-speed10 {
 				rockchip,pins = <0 RK_PD6 1 &pcfg_pull_none>;
 			};
@@ -1806,18 +1802,6 @@ fephyled_duplex: fephyled-duplex {
 				rockchip,pins = <0 RK_PD6 2 &pcfg_pull_none>;
 			};
 
-			fephyled_rxm0: fephyled-rxm0 {
-				rockchip,pins = <0 RK_PD5 1 &pcfg_pull_none>;
-			};
-
-			fephyled_txm0: fephyled-txm0 {
-				rockchip,pins = <0 RK_PD5 2 &pcfg_pull_none>;
-			};
-
-			fephyled_linkm0: fephyled-linkm0 {
-				rockchip,pins = <0 RK_PD4 1 &pcfg_pull_none>;
-			};
-
 			fephyled_rxm1: fephyled-rxm1 {
 				rockchip,pins = <2 RK_PD1 2 &pcfg_pull_none>;
 			};
-- 
2.25.1


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

* [PATCH 4/6] arm64: dts: rockchip: rk3328: drop #address-cells, #size-cells from grf node
  2020-03-27  3:04 [PATCH 0/6] arm64: dts: rockchip: misc. cleanups Chen-Yu Tsai
                   ` (2 preceding siblings ...)
  2020-03-27  3:04 ` [PATCH 3/6] arm64: dts: rockchip: rk3328: drop non-existent gmac2phy pinmux options Chen-Yu Tsai
@ 2020-03-27  3:04 ` Chen-Yu Tsai
  2020-03-27  3:04 ` [PATCH 5/6] arm64: dts: rockchip: rk3399: drop #address-cells, #size-cells from pmugrf node Chen-Yu Tsai
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Chen-Yu Tsai @ 2020-03-27  3:04 UTC (permalink / raw)
  To: Heiko Stuebner, Rob Herring
  Cc: Chen-Yu Tsai, linux-rockchip, linux-arm-kernel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

The device tree compiler gives the following warning:

    /syscon@ff100000: unnecessary #address-cells/#size-cells without
    "ranges" or child "reg" property

Since none of the grf node's direct child nodes have any reg properties,
remove the two properties from the grf node to silence the warning.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
index b861b4fd75e6..a4d591d91533 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
@@ -299,8 +299,6 @@ &pdmm0_sdi2_sleep
 	grf: syscon@ff100000 {
 		compatible = "rockchip,rk3328-grf", "syscon", "simple-mfd";
 		reg = <0x0 0xff100000 0x0 0x1000>;
-		#address-cells = <1>;
-		#size-cells = <1>;
 
 		io_domains: io-domains {
 			compatible = "rockchip,rk3328-io-voltage-domain";
-- 
2.25.1


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

* [PATCH 5/6] arm64: dts: rockchip: rk3399: drop #address-cells, #size-cells from pmugrf node
  2020-03-27  3:04 [PATCH 0/6] arm64: dts: rockchip: misc. cleanups Chen-Yu Tsai
                   ` (3 preceding siblings ...)
  2020-03-27  3:04 ` [PATCH 4/6] arm64: dts: rockchip: rk3328: drop #address-cells, #size-cells from grf node Chen-Yu Tsai
@ 2020-03-27  3:04 ` Chen-Yu Tsai
  2020-03-27  3:04 ` [PATCH 6/6] arm64: dts: rockchip: rk3399: Rename dwc3 device nodes to make dtc happy Chen-Yu Tsai
  2020-04-19 11:36 ` [PATCH 0/6] arm64: dts: rockchip: misc. cleanups Heiko Stuebner
  6 siblings, 0 replies; 16+ messages in thread
From: Chen-Yu Tsai @ 2020-03-27  3:04 UTC (permalink / raw)
  To: Heiko Stuebner, Rob Herring
  Cc: Chen-Yu Tsai, linux-rockchip, linux-arm-kernel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

The device tree compiler gives the following warning:

    /syscon@ff100000: unnecessary #address-cells/#size-cells without
    "ranges" or child "reg" property

Since the pmygrf node only has an io-domains child node that has no
reg property, remove the two properties from the pmugrf node to silence
the warning.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 74f2c3d49095..3499d1497127 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -1124,8 +1124,6 @@ pd_vopl@RK3399_PD_VOPL {
 	pmugrf: syscon@ff320000 {
 		compatible = "rockchip,rk3399-pmugrf", "syscon", "simple-mfd";
 		reg = <0x0 0xff320000 0x0 0x1000>;
-		#address-cells = <1>;
-		#size-cells = <1>;
 
 		pmu_io_domains: io-domains {
 			compatible = "rockchip,rk3399-pmu-io-voltage-domain";
-- 
2.25.1


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

* [PATCH 6/6] arm64: dts: rockchip: rk3399: Rename dwc3 device nodes to make dtc happy
  2020-03-27  3:04 [PATCH 0/6] arm64: dts: rockchip: misc. cleanups Chen-Yu Tsai
                   ` (4 preceding siblings ...)
  2020-03-27  3:04 ` [PATCH 5/6] arm64: dts: rockchip: rk3399: drop #address-cells, #size-cells from pmugrf node Chen-Yu Tsai
@ 2020-03-27  3:04 ` Chen-Yu Tsai
  2020-04-19 11:36 ` [PATCH 0/6] arm64: dts: rockchip: misc. cleanups Heiko Stuebner
  6 siblings, 0 replies; 16+ messages in thread
From: Chen-Yu Tsai @ 2020-03-27  3:04 UTC (permalink / raw)
  To: Heiko Stuebner, Rob Herring
  Cc: Chen-Yu Tsai, linux-rockchip, linux-arm-kernel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

The device tree compiler complains that the dwc3 nodes have regs
properties but no matching unit addresses.

Add the unit addresses to the device node name. While at it, also rename
the nodes from "dwc3" to "usb", as guidelines require device nodes have
generic names.

Fixes: 7144224f2c2b ("arm64: dts: rockchip: support dwc3 USB for rk3399")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

dtc also complains about the usbdrd3 nodes not having regs properties
despite having unit addresses. What can we do about those?
---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 3499d1497127..90c27723cec5 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -403,7 +403,7 @@ usbdrd3_0: usb@fe800000 {
 		reset-names = "usb3-otg";
 		status = "disabled";
 
-		usbdrd_dwc3_0: dwc3 {
+		usbdrd_dwc3_0: usb@fe800000 {
 			compatible = "snps,dwc3";
 			reg = <0x0 0xfe800000 0x0 0x100000>;
 			interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH 0>;
@@ -439,7 +439,7 @@ usbdrd3_1: usb@fe900000 {
 		reset-names = "usb3-otg";
 		status = "disabled";
 
-		usbdrd_dwc3_1: dwc3 {
+		usbdrd_dwc3_1: usb@fe900000 {
 			compatible = "snps,dwc3";
 			reg = <0x0 0xfe900000 0x0 0x100000>;
 			interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH 0>;
-- 
2.25.1


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

* Re: [PATCH 1/6] arm64: dts: rockchip: rk3399-roc-pc: Fix MMC numbering for LED triggers
  2020-03-27  3:04 ` [PATCH 1/6] arm64: dts: rockchip: rk3399-roc-pc: Fix MMC numbering for LED triggers Chen-Yu Tsai
@ 2020-03-27  9:58   ` Johan Jonker
  2020-03-29 16:36     ` Chen-Yu Tsai
  0 siblings, 1 reply; 16+ messages in thread
From: Johan Jonker @ 2020-03-27  9:58 UTC (permalink / raw)
  To: wens; +Cc: heiko, linux-arm-kernel, linux-kernel, linux-rockchip, robh+dt, wens

Hi Chen-Yu Tsai,

The led node names need some changes.
'linux,default-trigger' value does not fit.

From leds-gpio.yaml:

patternProperties:
  # The first form is preferred, but fall back to just 'led' anywhere in the
  # node name to at least catch some child nodes.
  "(^led-[0-9a-f]$|led)":
    type: object

Rename led nodenames to 'led-0' form

Also include all mail lists found with:
./scripts/get_maintainer.pl --nogit-fallback --nogit

devicetree@vger.kernel.org

If you like change the rest of dts with leds as well...

  DTC     arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dt.yaml
  CHECK   arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dt.yaml
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dt.yaml: leds:
yellow-led:linux,default-trigger:0: 'mmc0' is not one of ['backlight',
'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dt.yaml: leds:
diy-led:linux,default-trigger:0: 'mmc1' is not one of ['backlight',
'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
  DTC     arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml
  CHECK   arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml
arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml: leds:
diy-led:linux,default-trigger:0: 'mmc2' is not one of ['backlight',
'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml: leds:
yellow-led:linux,default-trigger:0: 'mmc1' is not one of ['backlight',
'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']

make -k ARCH=arm64 dtbs_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/leds/leds-gpio.yaml

> From: Chen-Yu Tsai <wens@csie.org>
> 
> With SDIO now enabled, the numbering of the existing MMC host controllers
> gets incremented by 1, as the SDIO host is the first one.
> 
> Increment the numbering of the MMC LED triggers to match.
> 
> Fixes: cf3c5397835f ("arm64: dts: rockchip: Enable sdio0 and uart0 on rk3399-roc-pc-mezzanine")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts | 8 ++++++++
>  arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi          | 4 ++--
>  2 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts
> index 2acb3d500fb9..f0686fc276be 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts
> @@ -38,6 +38,10 @@ vcc3v3_pcie: vcc3v3-pcie {
>  	};
>  };
>  
> +&diy_led {
> +	linux,default-trigger = "mmc2";
> +};
> +
>  &pcie_phy {
>  	status = "okay";
>  };
> @@ -91,3 +95,7 @@ &uart0 {
>  	pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
>  	status = "okay";
>  };
> +
> +&yellow_led {
> +	linux,default-trigger = "mmc1";
> +};
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
> index 9f225e9c3d54..bc060ac7972d 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
> @@ -70,14 +70,14 @@ work-led {
>  			linux,default-trigger = "heartbeat";
>  		};
>  
> -		diy-led {
> +		diy_led: diy-led {
>  			label = "red:diy";
>  			gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
>  			default-state = "off";
>  			linux,default-trigger = "mmc1";
>  		};
>  
> -		yellow-led {
> +		yellow_led: yellow-led {
>  			label = "yellow:yellow-led";
>  			gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
>  			default-state = "off";
> -- 
> 2.25.1


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

* Re: [PATCH 2/6] arm64: dts: rockchip: rk3328: Replace RK805 PMIC node name with "pmic"
  2020-03-27  3:04 ` [PATCH 2/6] arm64: dts: rockchip: rk3328: Replace RK805 PMIC node name with "pmic" Chen-Yu Tsai
@ 2020-03-27 12:12   ` Johan Jonker
  2020-03-27 12:15     ` Chen-Yu Tsai
  0 siblings, 1 reply; 16+ messages in thread
From: Johan Jonker @ 2020-03-27 12:12 UTC (permalink / raw)
  To: wens; +Cc: heiko, linux-arm-kernel, linux-kernel, linux-rockchip, robh+dt, wens

Hi Chen-Yu Tsai,

The Documentation/ portion of the patch should come in the series before
the code implementing the binding.

If you like, could you convert the binding as well and fix the example?

Documentation/devicetree/bindings/pinctrl/pinctrl-rk805.txt

> Example:
> --------
> rk805: rk805@18 {
> 	compatible = "rockchip,rk805";


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

* Re: [PATCH 2/6] arm64: dts: rockchip: rk3328: Replace RK805 PMIC node name with "pmic"
  2020-03-27 12:12   ` Johan Jonker
@ 2020-03-27 12:15     ` Chen-Yu Tsai
  0 siblings, 0 replies; 16+ messages in thread
From: Chen-Yu Tsai @ 2020-03-27 12:15 UTC (permalink / raw)
  To: Johan Jonker
  Cc: Chen-Yu Tsai, Heiko Stübner, linux-arm-kernel, linux-kernel,
	open list:ARM/Rockchip SoC...,
	Rob Herring

On Fri, Mar 27, 2020 at 8:12 PM Johan Jonker <jbx6244@gmail.com> wrote:
>
> Hi Chen-Yu Tsai,
>
> The Documentation/ portion of the patch should come in the series before
> the code implementing the binding.

The name is not part of the binding.

> If you like, could you convert the binding as well and fix the example?
>
> Documentation/devicetree/bindings/pinctrl/pinctrl-rk805.txt

I can send an extra patch to fix the example.

ChenYu

> > Example:
> > --------
> > rk805: rk805@18 {
> >       compatible = "rockchip,rk805";
>

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

* Re: [PATCH 1/6] arm64: dts: rockchip: rk3399-roc-pc: Fix MMC numbering for LED triggers
  2020-03-27  9:58   ` Johan Jonker
@ 2020-03-29 16:36     ` Chen-Yu Tsai
  2020-03-31 11:07       ` Robin Murphy
  0 siblings, 1 reply; 16+ messages in thread
From: Chen-Yu Tsai @ 2020-03-29 16:36 UTC (permalink / raw)
  To: Johan Jonker, Heiko Stübner
  Cc: Chen-Yu Tsai, linux-arm-kernel, linux-kernel,
	open list:ARM/Rockchip SoC...,
	Rob Herring

On Fri, Mar 27, 2020 at 5:58 PM Johan Jonker <jbx6244@gmail.com> wrote:
>
> Hi Chen-Yu Tsai,
>
> The led node names need some changes.
> 'linux,default-trigger' value does not fit.
>
> From leds-gpio.yaml:
>
> patternProperties:
>   # The first form is preferred, but fall back to just 'led' anywhere in the
>   # node name to at least catch some child nodes.
>   "(^led-[0-9a-f]$|led)":
>     type: object
>
> Rename led nodenames to 'led-0' form
>
> Also include all mail lists found with:
> ./scripts/get_maintainer.pl --nogit-fallback --nogit
>
> devicetree@vger.kernel.org

Oops...

> If you like change the rest of dts with leds as well...
>
>   DTC     arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dt.yaml
>   CHECK   arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dt.yaml
> arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dt.yaml: leds:
> yellow-led:linux,default-trigger:0: 'mmc0' is not one of ['backlight',
> 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
> arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dt.yaml: leds:
> diy-led:linux,default-trigger:0: 'mmc1' is not one of ['backlight',
> 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
>   DTC     arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml
>   CHECK   arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml
> arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml: leds:
> diy-led:linux,default-trigger:0: 'mmc2' is not one of ['backlight',
> 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
> arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml: leds:
> yellow-led:linux,default-trigger:0: 'mmc1' is not one of ['backlight',
> 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']

Maybe we should just get rid of linux,default-trigger then?

Heiko?

ChenYu

> make -k ARCH=arm64 dtbs_check
> DT_SCHEMA_FILES=Documentation/devicetree/bindings/leds/leds-gpio.yaml
>
> > From: Chen-Yu Tsai <wens@csie.org>
> >
> > With SDIO now enabled, the numbering of the existing MMC host controllers
> > gets incremented by 1, as the SDIO host is the first one.
> >
> > Increment the numbering of the MMC LED triggers to match.
> >
> > Fixes: cf3c5397835f ("arm64: dts: rockchip: Enable sdio0 and uart0 on rk3399-roc-pc-mezzanine")
> > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> > ---
> >  arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts | 8 ++++++++
> >  arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi          | 4 ++--
> >  2 files changed, 10 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts
> > index 2acb3d500fb9..f0686fc276be 100644
> > --- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts
> > +++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts
> > @@ -38,6 +38,10 @@ vcc3v3_pcie: vcc3v3-pcie {
> >       };
> >  };
> >
> > +&diy_led {
> > +     linux,default-trigger = "mmc2";
> > +};
> > +
> >  &pcie_phy {
> >       status = "okay";
> >  };
> > @@ -91,3 +95,7 @@ &uart0 {
> >       pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
> >       status = "okay";
> >  };
> > +
> > +&yellow_led {
> > +     linux,default-trigger = "mmc1";
> > +};
> > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
> > index 9f225e9c3d54..bc060ac7972d 100644
> > --- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
> > +++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
> > @@ -70,14 +70,14 @@ work-led {
> >                       linux,default-trigger = "heartbeat";
> >               };
> >
> > -             diy-led {
> > +             diy_led: diy-led {
> >                       label = "red:diy";
> >                       gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
> >                       default-state = "off";
> >                       linux,default-trigger = "mmc1";
> >               };
> >
> > -             yellow-led {
> > +             yellow_led: yellow-led {
> >                       label = "yellow:yellow-led";
> >                       gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
> >                       default-state = "off";
> > --
> > 2.25.1
>

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

* Re: [PATCH 1/6] arm64: dts: rockchip: rk3399-roc-pc: Fix MMC numbering for LED triggers
  2020-03-29 16:36     ` Chen-Yu Tsai
@ 2020-03-31 11:07       ` Robin Murphy
  2020-04-01 20:05         ` Jacek Anaszewski
  2020-04-06  9:13         ` Pavel Machek
  0 siblings, 2 replies; 16+ messages in thread
From: Robin Murphy @ 2020-03-31 11:07 UTC (permalink / raw)
  To: Chen-Yu Tsai, Johan Jonker, Heiko Stübner
  Cc: Rob Herring, open list:ARM/Rockchip SoC...,
	linux-kernel, linux-arm-kernel, jacek.anaszewski, pavel,
	devicetree

[ +cc LED binding maintainers]

On 2020-03-29 5:36 pm, Chen-Yu Tsai wrote:
> On Fri, Mar 27, 2020 at 5:58 PM Johan Jonker <jbx6244@gmail.com> wrote:
>>
>> Hi Chen-Yu Tsai,
>>
>> The led node names need some changes.
>> 'linux,default-trigger' value does not fit.
>>
>>  From leds-gpio.yaml:
>>
>> patternProperties:
>>    # The first form is preferred, but fall back to just 'led' anywhere in the
>>    # node name to at least catch some child nodes.
>>    "(^led-[0-9a-f]$|led)":
>>      type: object
>>
>> Rename led nodenames to 'led-0' form
>>
>> Also include all mail lists found with:
>> ./scripts/get_maintainer.pl --nogit-fallback --nogit
>>
>> devicetree@vger.kernel.org
> 
> Oops...
> 
>> If you like change the rest of dts with leds as well...
>>
>>    DTC     arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dt.yaml
>>    CHECK   arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dt.yaml
>> arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dt.yaml: leds:
>> yellow-led:linux,default-trigger:0: 'mmc0' is not one of ['backlight',
>> 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
>> arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dt.yaml: leds:
>> diy-led:linux,default-trigger:0: 'mmc1' is not one of ['backlight',
>> 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
>>    DTC     arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml
>>    CHECK   arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml
>> arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml: leds:
>> diy-led:linux,default-trigger:0: 'mmc2' is not one of ['backlight',
>> 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
>> arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml: leds:
>> yellow-led:linux,default-trigger:0: 'mmc1' is not one of ['backlight',
>> 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
> 
> Maybe we should just get rid of linux,default-trigger then?

In this particular case, I'd say it's probably time to reevaluate the 
rather out-of-date binding. The apparent intent of the 
"linux,default-trigger" property seems to be to describe any trigger 
supported by Linux, so either the binding wants to be kept in sync with 
all the triggers Linux actually supports, or perhaps it should just be 
redefined as a free-form string. FWIW I'd be slightly inclined towards 
the latter, since the schema validator can't know whether the given 
trigger actually corresponds to the correct thing for whatever the LED 
is physically labelled on the board/case, nor whether the version(s) of 
Linux that people intend to use actually support that trigger (since it 
doesn't have to be the version contemporary with the schema definition), 
so strict validation of this particular property seems to be of limited 
value.

Robin.

> 
> Heiko?
> 
> ChenYu
> 
>> make -k ARCH=arm64 dtbs_check
>> DT_SCHEMA_FILES=Documentation/devicetree/bindings/leds/leds-gpio.yaml
>>
>>> From: Chen-Yu Tsai <wens@csie.org>
>>>
>>> With SDIO now enabled, the numbering of the existing MMC host controllers
>>> gets incremented by 1, as the SDIO host is the first one.
>>>
>>> Increment the numbering of the MMC LED triggers to match.
>>>
>>> Fixes: cf3c5397835f ("arm64: dts: rockchip: Enable sdio0 and uart0 on rk3399-roc-pc-mezzanine")
>>> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
>>> ---
>>>   arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts | 8 ++++++++
>>>   arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi          | 4 ++--
>>>   2 files changed, 10 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts
>>> index 2acb3d500fb9..f0686fc276be 100644
>>> --- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts
>>> +++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts
>>> @@ -38,6 +38,10 @@ vcc3v3_pcie: vcc3v3-pcie {
>>>        };
>>>   };
>>>
>>> +&diy_led {
>>> +     linux,default-trigger = "mmc2";
>>> +};
>>> +
>>>   &pcie_phy {
>>>        status = "okay";
>>>   };
>>> @@ -91,3 +95,7 @@ &uart0 {
>>>        pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
>>>        status = "okay";
>>>   };
>>> +
>>> +&yellow_led {
>>> +     linux,default-trigger = "mmc1";
>>> +};
>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
>>> index 9f225e9c3d54..bc060ac7972d 100644
>>> --- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
>>> +++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
>>> @@ -70,14 +70,14 @@ work-led {
>>>                        linux,default-trigger = "heartbeat";
>>>                };
>>>
>>> -             diy-led {
>>> +             diy_led: diy-led {
>>>                        label = "red:diy";
>>>                        gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
>>>                        default-state = "off";
>>>                        linux,default-trigger = "mmc1";
>>>                };
>>>
>>> -             yellow-led {
>>> +             yellow_led: yellow-led {
>>>                        label = "yellow:yellow-led";
>>>                        gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
>>>                        default-state = "off";
>>> --
>>> 2.25.1
>>
> 
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
> 

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

* Re: [PATCH 1/6] arm64: dts: rockchip: rk3399-roc-pc: Fix MMC numbering for LED triggers
  2020-03-31 11:07       ` Robin Murphy
@ 2020-04-01 20:05         ` Jacek Anaszewski
  2020-04-06  9:13         ` Pavel Machek
  1 sibling, 0 replies; 16+ messages in thread
From: Jacek Anaszewski @ 2020-04-01 20:05 UTC (permalink / raw)
  To: Robin Murphy, Chen-Yu Tsai, Johan Jonker, Heiko Stübner
  Cc: Rob Herring, open list:ARM/Rockchip SoC...,
	linux-kernel, linux-arm-kernel, pavel, devicetree

On 3/31/20 1:07 PM, Robin Murphy wrote:
> [ +cc LED binding maintainers]
> 
> On 2020-03-29 5:36 pm, Chen-Yu Tsai wrote:
>> On Fri, Mar 27, 2020 at 5:58 PM Johan Jonker <jbx6244@gmail.com> wrote:
>>>
>>> Hi Chen-Yu Tsai,
>>>
>>> The led node names need some changes.
>>> 'linux,default-trigger' value does not fit.
>>>
>>>  From leds-gpio.yaml:
>>>
>>> patternProperties:
>>>    # The first form is preferred, but fall back to just 'led'
>>> anywhere in the
>>>    # node name to at least catch some child nodes.
>>>    "(^led-[0-9a-f]$|led)":
>>>      type: object
>>>
>>> Rename led nodenames to 'led-0' form
>>>
>>> Also include all mail lists found with:
>>> ./scripts/get_maintainer.pl --nogit-fallback --nogit
>>>
>>> devicetree@vger.kernel.org
>>
>> Oops...
>>
>>> If you like change the rest of dts with leds as well...
>>>
>>>    DTC     arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dt.yaml
>>>    CHECK   arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dt.yaml
>>> arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dt.yaml: leds:
>>> yellow-led:linux,default-trigger:0: 'mmc0' is not one of ['backlight',
>>> 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer',
>>> 'pattern']
>>> arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dt.yaml: leds:
>>> diy-led:linux,default-trigger:0: 'mmc1' is not one of ['backlight',
>>> 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer',
>>> 'pattern']
>>>    DTC     arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml
>>>    CHECK   arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml
>>> arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml: leds:
>>> diy-led:linux,default-trigger:0: 'mmc2' is not one of ['backlight',
>>> 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer',
>>> 'pattern']
>>> arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml: leds:
>>> yellow-led:linux,default-trigger:0: 'mmc1' is not one of ['backlight',
>>> 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer',
>>> 'pattern']
>>
>> Maybe we should just get rid of linux,default-trigger then?
> 
> In this particular case, I'd say it's probably time to reevaluate the
> rather out-of-date binding. The apparent intent of the
> "linux,default-trigger" property seems to be to describe any trigger
> supported by Linux, so either the binding wants to be kept in sync with
> all the triggers Linux actually supports, or perhaps it should just be
> redefined as a free-form string. FWIW I'd be slightly inclined towards
> the latter, since the schema validator can't know whether the given
> trigger actually corresponds to the correct thing for whatever the LED

I agree. It is possible for LED class drivers to register their private
triggers, so generic bindings cannot use predefined set for validation.

I think that Rob just blindly converted common.txt to yaml and I acked
that but didn't envisage the implications for validation.
All in all, even that list in common.txt didn't include all existing
generic LED triggers.

Best regards,
Jacek Anaszewski

> is physically labelled on the board/case, nor whether the version(s) of
> Linux that people intend to use actually support that trigger (since it
> doesn't have to be the version contemporary with the schema definition),
> so strict validation of this particular property seems to be of limited
> value.
> 
> Robin.
> 
>>
>> Heiko?
>>
>> ChenYu
>>
>>> make -k ARCH=arm64 dtbs_check
>>> DT_SCHEMA_FILES=Documentation/devicetree/bindings/leds/leds-gpio.yaml
>>>
>>>> From: Chen-Yu Tsai <wens@csie.org>
>>>>
>>>> With SDIO now enabled, the numbering of the existing MMC host
>>>> controllers
>>>> gets incremented by 1, as the SDIO host is the first one.
>>>>
>>>> Increment the numbering of the MMC LED triggers to match.
>>>>
>>>> Fixes: cf3c5397835f ("arm64: dts: rockchip: Enable sdio0 and uart0
>>>> on rk3399-roc-pc-mezzanine")
>>>> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
>>>> ---
>>>>   arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts | 8 ++++++++
>>>>   arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi          | 4 ++--
>>>>   2 files changed, 10 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git
>>>> a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts
>>>> b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts
>>>> index 2acb3d500fb9..f0686fc276be 100644
>>>> --- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts
>>>> +++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts
>>>> @@ -38,6 +38,10 @@ vcc3v3_pcie: vcc3v3-pcie {
>>>>        };
>>>>   };
>>>>
>>>> +&diy_led {
>>>> +     linux,default-trigger = "mmc2";
>>>> +};
>>>> +
>>>>   &pcie_phy {
>>>>        status = "okay";
>>>>   };
>>>> @@ -91,3 +95,7 @@ &uart0 {
>>>>        pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
>>>>        status = "okay";
>>>>   };
>>>> +
>>>> +&yellow_led {
>>>> +     linux,default-trigger = "mmc1";
>>>> +};
>>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
>>>> b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
>>>> index 9f225e9c3d54..bc060ac7972d 100644
>>>> --- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
>>>> +++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
>>>> @@ -70,14 +70,14 @@ work-led {
>>>>                        linux,default-trigger = "heartbeat";
>>>>                };
>>>>
>>>> -             diy-led {
>>>> +             diy_led: diy-led {
>>>>                        label = "red:diy";
>>>>                        gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
>>>>                        default-state = "off";
>>>>                        linux,default-trigger = "mmc1";
>>>>                };
>>>>
>>>> -             yellow-led {
>>>> +             yellow_led: yellow-led {
>>>>                        label = "yellow:yellow-led";
>>>>                        gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
>>>>                        default-state = "off";
>>>> -- 
>>>> 2.25.1
>>>
>>
>> _______________________________________________
>> Linux-rockchip mailing list
>> Linux-rockchip@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>>


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

* Re: [PATCH 1/6] arm64: dts: rockchip: rk3399-roc-pc: Fix MMC numbering for LED triggers
  2020-03-31 11:07       ` Robin Murphy
  2020-04-01 20:05         ` Jacek Anaszewski
@ 2020-04-06  9:13         ` Pavel Machek
  2020-04-13  5:33           ` Chen-Yu Tsai
  1 sibling, 1 reply; 16+ messages in thread
From: Pavel Machek @ 2020-04-06  9:13 UTC (permalink / raw)
  To: Robin Murphy
  Cc: Chen-Yu Tsai, Johan Jonker, Heiko Stübner, Rob Herring,
	open list:ARM/Rockchip SoC...,
	linux-kernel, linux-arm-kernel, jacek.anaszewski, devicetree


[-- Attachment #1: Type: text/plain, Size: 2451 bytes --]

Hi!

> > > arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml: leds:
> > > diy-led:linux,default-trigger:0: 'mmc2' is not one of ['backlight',
> > > 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
> > > arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml: leds:
> > > yellow-led:linux,default-trigger:0: 'mmc1' is not one of ['backlight',
> > > 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
> > 
> > Maybe we should just get rid of linux,default-trigger then?
> 
> In this particular case, I'd say it's probably time to reevaluate the rather
> out-of-date binding. The apparent intent of the "linux,default-trigger"
> property seems to be to describe any trigger supported by Linux, so either
> the binding wants to be kept in sync with all the triggers Linux actually
> supports, or perhaps it should just be redefined as a free-form

It is enough to keep it in sync with all the triggers we actually use :-).

> I'd be slightly inclined towards the latter, since the schema validator
> can't know whether the given trigger actually corresponds to the correct
> thing for whatever the LED is physically labelled on the board/case, nor
> whether the version(s) of Linux that people intend to use actually support
> that trigger (since it doesn't have to be the version contemporary with the
> schema definition), so strict validation of this particular property seems
> to be of limited value.

But freeform seems acceptable, too.

> > > > -             diy-led {
> > > > +             diy_led: diy-led {
> > > >                        label = "red:diy";
> > > >                        gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
> > > >                        default-state = "off";
> > > >                        linux,default-trigger = "mmc1";
> > > >                };

This label probably should be "mmc1:red:activity" or something like that.

> > > > -             yellow-led {
> > > > +             yellow_led: yellow-led {
> > > >                        label = "yellow:yellow-led";
> > > >                        gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
> > > >                        default-state = "off";

And this label should be changed, too.

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: [PATCH 1/6] arm64: dts: rockchip: rk3399-roc-pc: Fix MMC numbering for LED triggers
  2020-04-06  9:13         ` Pavel Machek
@ 2020-04-13  5:33           ` Chen-Yu Tsai
  0 siblings, 0 replies; 16+ messages in thread
From: Chen-Yu Tsai @ 2020-04-13  5:33 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Robin Murphy, Chen-Yu Tsai, Johan Jonker, Heiko Stübner,
	Rob Herring, open list:ARM/Rockchip SoC...,
	linux-kernel, linux-arm-kernel, jacek.anaszewski, devicetree

Hi Pavel,

On Mon, Apr 6, 2020 at 5:13 PM Pavel Machek <pavel@ucw.cz> wrote:
>
> Hi!
>
> > > > arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml: leds:
> > > > diy-led:linux,default-trigger:0: 'mmc2' is not one of ['backlight',
> > > > 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
> > > > arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml: leds:
> > > > yellow-led:linux,default-trigger:0: 'mmc1' is not one of ['backlight',
> > > > 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
> > >
> > > Maybe we should just get rid of linux,default-trigger then?
> >
> > In this particular case, I'd say it's probably time to reevaluate the rather
> > out-of-date binding. The apparent intent of the "linux,default-trigger"
> > property seems to be to describe any trigger supported by Linux, so either
> > the binding wants to be kept in sync with all the triggers Linux actually
> > supports, or perhaps it should just be redefined as a free-form
>
> It is enough to keep it in sync with all the triggers we actually use :-).
>
> > I'd be slightly inclined towards the latter, since the schema validator
> > can't know whether the given trigger actually corresponds to the correct
> > thing for whatever the LED is physically labelled on the board/case, nor
> > whether the version(s) of Linux that people intend to use actually support
> > that trigger (since it doesn't have to be the version contemporary with the
> > schema definition), so strict validation of this particular property seems
> > to be of limited value.
>
> But freeform seems acceptable, too.

I'd say free form is easier to manage. Being in the list of valid triggers
doesn't mean the kernel actually has support for it enabled.

> > > > > -             diy-led {
> > > > > +             diy_led: diy-led {
> > > > >                        label = "red:diy";
> > > > >                        gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
> > > > >                        default-state = "off";
> > > > >                        linux,default-trigger = "mmc1";
> > > > >                };
>
> This label probably should be "mmc1:red:activity" or something like that.

Is changing this after it has been in some kernel releases OK? Wouldn't
it be considered a break of sysfs ABI?

Also, is there some guideline on how to name the labels? For sunxi we've
been doing "${vendor}:${color}:${function}" since forever.

As far as I can tell, the hardware vendor [1] has no specific uses for
these two (red and yellow) LEDs designed in. And their GPIO lines are
simply labeled "DIY" (for the red one) and "YELLOW". So I'm not sure
if putting "our" interpretations and the default-trigger into the
label is wise.

For reference, the green one has its GPIO line labeled "WORK", and their
intention from [1] is to have it as some sort of power / activity indicator.
Hence it is named / labeled "work".

As for the node names, I think we can keep it as is for now. It's not
the preferred form, but there's really no need to change it either.
And some overlay or script might actually expect that name.

Regards
ChenYu


[1] http://wiki.t-firefly.com/en/ROC-RK3399-PC/driver_led.html

> > > > > -             yellow-led {
> > > > > +             yellow_led: yellow-led {
> > > > >                        label = "yellow:yellow-led";
> > > > >                        gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
> > > > >                        default-state = "off";
>
> And this label should be changed, too.
>
> Best regards,
>                                                                         Pavel
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* Re: [PATCH 0/6] arm64: dts: rockchip: misc. cleanups
  2020-03-27  3:04 [PATCH 0/6] arm64: dts: rockchip: misc. cleanups Chen-Yu Tsai
                   ` (5 preceding siblings ...)
  2020-03-27  3:04 ` [PATCH 6/6] arm64: dts: rockchip: rk3399: Rename dwc3 device nodes to make dtc happy Chen-Yu Tsai
@ 2020-04-19 11:36 ` Heiko Stuebner
  6 siblings, 0 replies; 16+ messages in thread
From: Heiko Stuebner @ 2020-04-19 11:36 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Rob Herring, Chen-Yu Tsai, linux-rockchip, linux-arm-kernel,
	linux-kernel

Hi,

Am Freitag, 27. März 2020, 04:04:08 CEST schrieb Chen-Yu Tsai:
> Chen-Yu Tsai (6):
>   arm64: dts: rockchip: rk3399-roc-pc: Fix MMC numbering for LED
>     triggers
>   arm64: dts: rockchip: rk3328: Replace RK805 PMIC node name with "pmic"
>   arm64: dts: rockchip: rk3328: drop non-existent gmac2phy pinmux
>     options
>   arm64: dts: rockchip: rk3328: drop #address-cells, #size-cells from
>     grf node
>   arm64: dts: rockchip: rk3399: drop #address-cells, #size-cells from
>     pmugrf node
>   arm64: dts: rockchip: rk3399: Rename dwc3 device nodes to make dtc
>     happy

I've applied patches 2-6 as fix for 5.7.
The discussion on patch1 somehow stopped on monday, so feel
free to resubmit that one separately once everybody is happy

Heiko



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

end of thread, back to index

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-27  3:04 [PATCH 0/6] arm64: dts: rockchip: misc. cleanups Chen-Yu Tsai
2020-03-27  3:04 ` [PATCH 1/6] arm64: dts: rockchip: rk3399-roc-pc: Fix MMC numbering for LED triggers Chen-Yu Tsai
2020-03-27  9:58   ` Johan Jonker
2020-03-29 16:36     ` Chen-Yu Tsai
2020-03-31 11:07       ` Robin Murphy
2020-04-01 20:05         ` Jacek Anaszewski
2020-04-06  9:13         ` Pavel Machek
2020-04-13  5:33           ` Chen-Yu Tsai
2020-03-27  3:04 ` [PATCH 2/6] arm64: dts: rockchip: rk3328: Replace RK805 PMIC node name with "pmic" Chen-Yu Tsai
2020-03-27 12:12   ` Johan Jonker
2020-03-27 12:15     ` Chen-Yu Tsai
2020-03-27  3:04 ` [PATCH 3/6] arm64: dts: rockchip: rk3328: drop non-existent gmac2phy pinmux options Chen-Yu Tsai
2020-03-27  3:04 ` [PATCH 4/6] arm64: dts: rockchip: rk3328: drop #address-cells, #size-cells from grf node Chen-Yu Tsai
2020-03-27  3:04 ` [PATCH 5/6] arm64: dts: rockchip: rk3399: drop #address-cells, #size-cells from pmugrf node Chen-Yu Tsai
2020-03-27  3:04 ` [PATCH 6/6] arm64: dts: rockchip: rk3399: Rename dwc3 device nodes to make dtc happy Chen-Yu Tsai
2020-04-19 11:36 ` [PATCH 0/6] arm64: dts: rockchip: misc. cleanups Heiko Stuebner

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git

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

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


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