arm64: dts: rockchip: misc. cleanups
Subsystems (2)
cover arm64: dts: rockchip: misc. cleanups
From: Chen-Yu Tsai <[email protected]>
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(-)
Signature · 1 line
2.25.1
PATCH 1/6 arm64: dts: rockchip: rk3399-roc-pc: Fix MMC numbering for LED triggers
From: Chen-Yu Tsai <[email protected]>
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.
--- 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(-)
arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts +8 -0
@@ -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"; +};
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +2 -2
@@ -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";
Signature · 1 line
2.25.1
Re: [PATCH 1/6] arm64: dts: rockchip: rk3399-roc-pc: Fix MMC numbering for LED triggers
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: objectRename led nodenames to 'led-0' form
Also include all mail lists found with:./scripts/get_maintainer.pl --nogit-fallback --nogit
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.yamlarch/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.yamlarch/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
Quoted 60 lines
From: Chen-Yu Tsai <[email protected]>
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 <[email protected]>--- 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(-)arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts +8
-0@@ -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"; +};arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +2
-2@@ -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";Signature · 1 line
2.25.1
Re: [PATCH 1/6] arm64: dts: rockchip: rk3399-roc-pc: Fix MMC numbering for LED triggers
Quoted 14 lines · Johan Jonker
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
Quoted 6 lines
Rename led nodenames to 'led-0' form
Also include all mail lists found with:
./scripts/get_maintainer.pl--nogit-fallback --nogit
Oops...
Quoted 18 lines
If you like change the rest of dts with leds as well...
DTC
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dt.yaml
CHECKarch/arm64/boot/dts/rockchip/rk3399-roc-pc.dt.yamlarch/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']
DTCarch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml
CHECKarch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yamlarch/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
Quoted 64 lines
make -k ARCH=arm64
dtbs_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/leds/leds-gpio.yamlQuoted 60 lines
From: Chen-Yu Tsai <[email protected]>
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 <[email protected]>--- 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(-)arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts +8
-0@@ -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"; +};arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +2
-3@@ -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
Re: [PATCH 1/6] arm64: dts: rockchip: rk3399-roc-pc: Fix MMC numbering for LED triggers
[ +cc LED binding maintainers]
Quoted 43 lines · Chen-Yu Tsai
Quoted 14 lines · Johan Jonker
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: objectQuoted 6 lines
Rename led nodenames to 'led-0' form
Also include all mail lists found with:
./scripts/get_maintainer.pl--nogit-fallback --nogitOops...
Quoted 4 lines
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.yamlQuoted 14 lines
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']
DTCarch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yaml
CHECKarch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yamlarch/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']
Quoted 1 line
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.
Quoted 75 lines
Heiko?
ChenYu
Quoted 56 lines
make -k ARCH=arm64
dtbs_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/leds/leds-gpio.yamlQuoted 53 lines
From: Chen-Yu Tsai <[email protected]>
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 <[email protected]>--- 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(-)arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts +8
-0@@ -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"; +};arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +1
-1@@ -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"; };Quoted 8 lines
Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +1
-2- 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 [email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Re: [PATCH 1/6] arm64: dts: rockchip: rk3399-roc-pc: Fix MMC numbering for LED triggers
Quoted 53 lines · Robin Murphy
[ +cc LED binding maintainers]
Quoted 48 lines · Chen-Yu Tsai
Quoted 15 lines · Johan Jonker
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: objectQuoted 6 lines
Rename led nodenames to 'led-0' form
Also include all mail lists found with:
./scripts/get_maintainer.pl--nogit-fallback --nogitOops...
Quoted 14 lines
If you like change the rest of dts with leds as well...
DTC
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dt.yamlCHECKarch/arm64/boot/dts/rockchip/rk3399-roc-pc.dt.yamlarch/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']
DTCarch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yamlCHECKarch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dt.yamlQuoted 8 lines
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']Quoted 1 line
Maybe we should just get rid of linux,default-trigger then?
Quoted 8 lines
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
Quoted 88 lines
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.
Quoted 80 lines
Heiko?
ChenYu
Quoted 61 lines
make -k ARCH=arm64
dtbs_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/leds/leds-gpio.yamlQuoted 58 lines
From: Chen-Yu Tsai <[email protected]>
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 uart0on rk3399-roc-pc-mezzanine")
Signed-off-by Chen-Yu Tsai <[email protected]>---
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.dtsb/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dtsindex2acb3d500fb9..f0686fc276be100644arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts +8
-0@@ -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"; +};arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +1
-1@@ -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"; };Quoted 8 lines
Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +1
-1- yellow-led { + yellow_led: yellow-led { label = "yellow:yellow-led"; gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; default-state = "off";Signature · 1 line
2.25.1_______________________________________________
Linux-rockchip mailing list [email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Re: [PATCH 1/6] arm64: dts: rockchip: rk3399-roc-pc: Fix MMC numbering for LED triggers
In reply to Robin MurphyHi!
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
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']
Quoted 7 lines
Quoted 1 line
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 :-).
Quoted 7 lines
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.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi work-led { · line 78
Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +1
-1- 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.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi work-led { · line 83
Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +1
-1- 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
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [PATCH 1/6] arm64: dts: rockchip: rk3399-roc-pc: Fix MMC numbering for LED triggers
Hi Pavel,
Quoted 28 lines · Pavel Machek
Hi!
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
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']Quoted 7 lines
Quoted 1 line
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 :-).
Quoted 7 lines
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.
Quoted 1 line
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.
Quoted 9 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi work-led { · line 78
Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +1
-1- 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
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi work-led { · line 83
Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +1
-1- 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
PATCH 2/6 arm64: dts: rockchip: rk3328: Replace RK805 PMIC node name with "pmic"
In reply to Chen-Yu TsaiFrom: Chen-Yu Tsai <[email protected]>
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.
--- 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(-)
arch/arm64/boot/dts/rockchip/rk3328-evb.dts +1 -1
@@ -92,7 +92,7 @@ &gmac2phy { &i2c1 { status = "okay"; - rk805: rk805@18 { + rk805: pmic@18 { compatible = "rockchip,rk805"; reg = <0x18>; interrupt-parent = <&gpio2>;
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +1 -1
@@ -170,7 +170,7 @@ &hdmiphy { &i2c1 { status = "okay"; - rk805: rk805@18 { + rk805: pmic@18 { compatible = "rockchip,rk805"; reg = <0x18>; interrupt-parent = <&gpio2>;
Signature · 1 line
2.25.1
Re: [PATCH 2/6] arm64: dts: rockchip: rk3328: Replace RK805 PMIC node name with "pmic"
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
Quoted 4 lines
Example:
--------rk805: rk805@18 { compatible = "rockchip,rk805";
Re: [PATCH 2/6] arm64: dts: rockchip: rk3328: Replace RK805 PMIC node name with "pmic"
Quoted 5 lines · Johan Jonker
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.
Quoted 3 lines
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
Quoted 5 lines
Quoted 4 lines
Example:
--------rk805: rk805@18 { compatible = "rockchip,rk805";
PATCH 3/6 arm64: dts: rockchip: rk3328: drop non-existent gmac2phy pinmux options
In reply to Chen-Yu TsaiFrom: Chen-Yu Tsai <[email protected]>
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.
--- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 16 ---------------- 1 file changed, 16 deletions(-)
arch/arm64/boot/dts/rockchip/rk3328.dtsi +0 -16
@@ -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>; };
Signature · 1 line
2.25.1
PATCH 4/6 arm64: dts: rockchip: rk3328: drop #address-cells, #size-cells from grf node
In reply to Chen-Yu TsaiFrom: Chen-Yu Tsai <[email protected]>
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.
--- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 -- 1 file changed, 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3328.dtsi +0 -2
@@ -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";
Signature · 1 line
2.25.1
PATCH 5/6 arm64: dts: rockchip: rk3399: drop #address-cells, #size-cells from pmugrf node
In reply to Chen-Yu TsaiFrom: Chen-Yu Tsai <[email protected]>
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.
--- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 -- 1 file changed, 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399.dtsi +0 -2
@@ -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";
Signature · 1 line
2.25.1
PATCH 6/6 arm64: dts: rockchip: rk3399: Rename dwc3 device nodes to make dtc happy
In reply to Chen-Yu TsaiFrom: Chen-Yu Tsai <[email protected]>
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.
---
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(-)
arch/arm64/boot/dts/rockchip/rk3399.dtsi +2 -2
@@ -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>;
Signature · 1 line
2.25.1
Heiko Stuebner
maintainerHi,
Am Freitag, 27. März 2020, 04:04:08 CEST schrieb Chen-Yu Tsai:
Quoted 4 lines
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"
Quoted 8 lines
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