Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: mt7621-dts: fix GB-PC2 devicetree

Fix the GB-PC2 devicetree. Refer to the schematics of the device for more
information.

GB-PC2 devicetree fixes:
- Include mt7621.dtsi instead of gbpc1.dts. Add the missing definitions.
- Remove gpio-leds node as the system LED is not wired to anywhere on
the board and the power LED is directly wired to GND.
- Remove uart3 pin group from gpio-pinmux node as it's not used as GPIO.
- Use reg 7 for the external phy to be on par with
Documentation/devicetree/bindings/net/dsa/mt7530.txt.
- Use the status value "okay".

Link: https://github.com/ngiger/GnuBee_Docs/blob/master/GB-PCx/Documents/GB-PC2_V1.1_schematic.pdf
Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Link: https://lore.kernel.org/r/20220311090320.3068-2-arinc.unal@arinc9.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Arınç ÜNAL and committed by
Greg Kroah-Hartman
5bc14864 6256e186

+102 -8
+102 -8
drivers/staging/mt7621-dts/gbpc2.dts
··· 1 1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 2 /dts-v1/; 3 3 4 - #include "gbpc1.dts" 4 + #include "mt7621.dtsi" 5 + 6 + #include <dt-bindings/gpio/gpio.h> 7 + #include <dt-bindings/input/input.h> 5 8 6 9 / { 7 10 compatible = "gnubee,gb-pc2", "mediatek,mt7621-soc"; 8 11 model = "GB-PC2"; 12 + 13 + memory@0 { 14 + device_type = "memory"; 15 + reg = <0x00000000 0x1c000000>, 16 + <0x20000000 0x04000000>; 17 + }; 18 + 19 + chosen { 20 + bootargs = "console=ttyS0,57600"; 21 + }; 22 + 23 + palmbus: palmbus@1e000000 { 24 + i2c@900 { 25 + status = "okay"; 26 + }; 27 + }; 28 + 29 + gpio-keys { 30 + compatible = "gpio-keys"; 31 + 32 + reset { 33 + label = "reset"; 34 + gpios = <&gpio 18 GPIO_ACTIVE_HIGH>; 35 + linux,code = <KEY_RESTART>; 36 + }; 37 + }; 9 38 }; 10 39 11 - &default_gpio { 12 - groups = "wdt", "uart3"; 13 - function = "gpio"; 40 + &sdhci { 41 + status = "okay"; 42 + }; 43 + 44 + &spi0 { 45 + status = "okay"; 46 + 47 + m25p80@0 { 48 + #address-cells = <1>; 49 + #size-cells = <1>; 50 + compatible = "jedec,spi-nor"; 51 + reg = <0>; 52 + spi-max-frequency = <50000000>; 53 + broken-flash-reset; 54 + 55 + partition@0 { 56 + label = "u-boot"; 57 + reg = <0x0 0x30000>; 58 + read-only; 59 + }; 60 + 61 + partition@30000 { 62 + label = "u-boot-env"; 63 + reg = <0x30000 0x10000>; 64 + read-only; 65 + }; 66 + 67 + factory: partition@40000 { 68 + label = "factory"; 69 + reg = <0x40000 0x10000>; 70 + read-only; 71 + }; 72 + 73 + partition@50000 { 74 + label = "firmware"; 75 + reg = <0x50000 0x1fb0000>; 76 + }; 77 + }; 78 + }; 79 + 80 + &pcie { 81 + status = "okay"; 82 + }; 83 + 84 + &pinctrl { 85 + pinctrl-names = "default"; 86 + pinctrl-0 = <&state_default>; 87 + 88 + state_default: state-default { 89 + gpio-pinmux { 90 + groups = "wdt"; 91 + function = "gpio"; 92 + }; 93 + }; 14 94 }; 15 95 16 96 &ethernet { 17 97 gmac1: mac@1 { 18 - status = "ok"; 19 - phy-handle = <&phy_external>; 98 + status = "okay"; 99 + phy-handle = <&ethphy7>; 20 100 }; 21 101 22 102 mdio-bus { 23 - phy_external: ethernet-phy@5 { 24 - reg = <5>; 103 + ethphy7: ethernet-phy@7 { 104 + reg = <7>; 25 105 phy-mode = "rgmii-rxid"; 106 + }; 107 + }; 108 + }; 109 + 110 + &switch0 { 111 + ports { 112 + port@0 { 113 + status = "okay"; 114 + label = "ethblack"; 115 + }; 116 + 117 + port@4 { 118 + status = "okay"; 119 + label = "ethblue"; 26 120 }; 27 121 }; 28 122 };