Message ID | 20191130195335.17740-4-mohammad.rasim96@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | add support for videostrong KII Pro | expand |
[...] > + leds { > + compatible = "gpio-leds"; > + status { > + gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>; > + default-state = "off"; > + color = <LED_COLOR_ID_RED>; > + function = LED_FUNCTION_STATUS; why is LED_FUNCTION_STATUS not enclosed in <> like color above? Martin
On 19/12/01 11:21PM, Martin Blumenstingl wrote: > [...] > > + leds { > > + compatible = "gpio-leds"; > > + status { > > + gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>; > > + default-state = "off"; > > + color = <LED_COLOR_ID_RED>; > > + function = LED_FUNCTION_STATUS; > why is LED_FUNCTION_STATUS not enclosed in <> like color above? > Well, the examples in the documentation enclose the color and don't enclose function https://github.com/torvalds/linux/blob/596cf45cbf6e4fa7bcb0df33e373a7d062b644b5/Documentation/devicetree/bindings/leds/common.txt#L140 Regards > > Martin
On Mon, Dec 2, 2019 at 9:02 AM Mohammad Rasim <mohammad.rasim96@gmail.com> wrote: > > On 19/12/01 11:21PM, Martin Blumenstingl wrote: > > [...] > > > + leds { > > > + compatible = "gpio-leds"; > > > + status { > > > + gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>; > > > + default-state = "off"; > > > + color = <LED_COLOR_ID_RED>; > > > + function = LED_FUNCTION_STATUS; > > why is LED_FUNCTION_STATUS not enclosed in <> like color above? > > > Well, the examples in the documentation enclose the color and don't > enclose function > https://github.com/torvalds/linux/blob/596cf45cbf6e4fa7bcb0df33e373a7d062b644b5/Documentation/devicetree/bindings/leds/common.txt#L140 sorry for the noise, only now I realize that the LED_FUNCTION_*s are string definitions and not numeric values in this case all is fine I learnt something new today ;) Martin
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..2f1f829450a2 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts @@ -0,0 +1,78 @@ +// 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> +#include <dt-bindings/leds/common.h> +/ { + compatible = "videostrong,kii-pro", "amlogic,p201", "amlogic,s905", "amlogic,meson-gxbb"; + model = "Videostrong KII Pro"; + + leds { + compatible = "gpio-leds"; + status { + gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>; + default-state = "off"; + color = <LED_COLOR_ID_RED>; + function = LED_FUNCTION_STATUS; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + button-reset { + 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"; + }; +}; + + + +ðmac { + status = "okay"; + pinctrl-0 = <ð_rmii_pins>; + pinctrl-names = "default"; + + phy-handle = <ð_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>; + }; + }; +};