mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-08-31 22:23:05 +00:00

Including a board dts file is not the right way to represent the hierarchical nature of the board dts files and to create a dts file for another variant of an ancestor board. However, a few boards and their variants (ab)used this approach, so let's clean that up by converting the common ancestors into dtsi files, and by adding separate board-variant dts files. No functional changes are introduced, which was validated by decompiling and comparing all affected board dtb files before and after these changes. In more detail, the affected dtb files have some of their blocks shuffled around a bit and some of their phandles have different values, as a result of the changes to the order in which the building blocks from the parent dtsi files are included, but they effectively remain the same as the originals. The only perceivable introduced change is the turning of "roc-rk3328-cc" into "ROC-RK3328-CC", which is the model name of one of the affected boards, which was performed to match the styling of the official board name. As a side note, due to the nature of introduced changes, this commit is best viewed using "-B80%/80% -M20% -C5%" as the set of options for git-log(1). Signed-off-by: Dragan Simic <dsimic@manjaro.org> Link: https://lore.kernel.org/r/f3d789c14fe34a53327cac03cd3837e530e21f5c.1728937091.git.dsimic@manjaro.org Signed-off-by: Heiko Stuebner <heiko@sntech.de>
54 lines
917 B
Plaintext
54 lines
917 B
Plaintext
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
/*
|
|
* FriendlyElec NanoPi M4B board device tree source
|
|
*
|
|
* Copyright (c) 2020 Chen-Yu Tsai <wens@csie.org>
|
|
*/
|
|
|
|
/dts-v1/;
|
|
|
|
#include "rk3399-nanopi-m4.dtsi"
|
|
|
|
/ {
|
|
model = "FriendlyElec NanoPi M4B";
|
|
compatible = "friendlyarm,nanopi-m4b", "rockchip,rk3399";
|
|
|
|
adc-keys {
|
|
compatible = "adc-keys";
|
|
io-channels = <&saradc 1>;
|
|
io-channel-names = "buttons";
|
|
keyup-threshold-microvolt = <1500000>;
|
|
poll-interval = <100>;
|
|
|
|
button-recovery {
|
|
label = "Recovery";
|
|
linux,code = <KEY_VENDOR>;
|
|
press-threshold-microvolt = <18000>;
|
|
};
|
|
};
|
|
};
|
|
|
|
/* No USB type-C PD power manager */
|
|
/delete-node/ &fusb0;
|
|
|
|
&i2c4 {
|
|
status = "disabled";
|
|
};
|
|
|
|
&u2phy0_host {
|
|
phy-supply = <&vcc5v0_usb2>;
|
|
};
|
|
|
|
&u2phy0_otg {
|
|
phy-supply = <&vbus_typec>;
|
|
};
|
|
|
|
&u2phy1_otg {
|
|
phy-supply = <&vcc5v0_usb1>;
|
|
};
|
|
|
|
&vbus_typec {
|
|
enable-active-high;
|
|
gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
|
|
};
|