mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-28 15:36:29 +00:00
Odroid-C2: updating kernel to 4.14.67 (#176)
This commit is contained in:
parent
e7e2dc2aad
commit
eb553bec07
@ -6,4 +6,4 @@
|
|||||||
| Open Virtual Applicance | 4.14.67 |
|
| Open Virtual Applicance | 4.14.67 |
|
||||||
| Raspberry Pi | 4.14.66 |
|
| Raspberry Pi | 4.14.66 |
|
||||||
| Tinker Board | 4.14.67 |
|
| Tinker Board | 4.14.67 |
|
||||||
| Odroid-C2 | 4.14.36 |
|
| Odroid-C2 | 4.14.67 |
|
||||||
|
@ -1,455 +0,0 @@
|
|||||||
From f802405c9aba2fb198d55fc010e7336f155c2713 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
Date: Wed, 2 Aug 2017 16:11:23 +0200
|
|
||||||
Subject: [PATCH 01/39] ARM64: dts: meson-gxm: Add support for Khadas VIM2
|
|
||||||
|
|
||||||
The Khadas VIM2 is a Single Board Computer, respin of the origin
|
|
||||||
Khadas VIM board, using an Amlogic S912 SoC and more server oriented.
|
|
||||||
|
|
||||||
It provides the same external connectors and header pinout, plus a SPI
|
|
||||||
NOR Flash, a reprogrammable STM8S003 MCU, FPC Connector, Cooling FAN header
|
|
||||||
and Pogo Pads Arrays.
|
|
||||||
|
|
||||||
Cc: Gouwa <gouwa@szwesion.com>
|
|
||||||
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
||||||
Acked-by: Rob Herring <robh@kernel.org>
|
|
||||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
---
|
|
||||||
Documentation/devicetree/bindings/arm/amlogic.txt | 1 +
|
|
||||||
arch/arm64/boot/dts/amlogic/Makefile | 1 +
|
|
||||||
.../boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 399 +++++++++++++++++++++
|
|
||||||
3 files changed, 401 insertions(+)
|
|
||||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
|
||||||
|
|
||||||
diff --git a/Documentation/devicetree/bindings/arm/amlogic.txt b/Documentation/devicetree/bindings/arm/amlogic.txt
|
|
||||||
index 4e4bc0b..a445997 100644
|
|
||||||
--- a/Documentation/devicetree/bindings/arm/amlogic.txt
|
|
||||||
+++ b/Documentation/devicetree/bindings/arm/amlogic.txt
|
|
||||||
@@ -71,6 +71,7 @@ Board compatible values (alphabetically, grouped by SoC):
|
|
||||||
|
|
||||||
- "amlogic,q200" (Meson gxm s912)
|
|
||||||
- "amlogic,q201" (Meson gxm s912)
|
|
||||||
+ - "khadas,vim2" (Meson gxm s912)
|
|
||||||
- "kingnovel,r-box-pro" (Meson gxm S912)
|
|
||||||
- "nexbox,a1" (Meson gxm s912)
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
|
||||||
index 543416b..747bcc3 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
|
||||||
@@ -16,6 +16,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-nexbox-a95x.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p230.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p231.dtb
|
|
||||||
+dtb-$(CONFIG_ARCH_MESON) += meson-gxm-khadas-vim2.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-nexbox-a1.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q200.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q201.dtb
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..32c138e
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
|
||||||
@@ -0,0 +1,399 @@
|
|
||||||
+/*
|
|
||||||
+ * Copyright (c) 2017 Martin Blumenstingl <martin.blumenstingl@googlemail.com>.
|
|
||||||
+ * Copyright (c) 2017 BayLibre, SAS
|
|
||||||
+ * Author: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
+ *
|
|
||||||
+ * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+/dts-v1/;
|
|
||||||
+
|
|
||||||
+#include <dt-bindings/input/input.h>
|
|
||||||
+#include <dt-bindings/thermal/thermal.h>
|
|
||||||
+
|
|
||||||
+#include "meson-gxm.dtsi"
|
|
||||||
+
|
|
||||||
+/ {
|
|
||||||
+ compatible = "khadas,vim2", "amlogic,s912", "amlogic,meson-gxm";
|
|
||||||
+ model = "Khadas VIM2";
|
|
||||||
+
|
|
||||||
+ aliases {
|
|
||||||
+ serial0 = &uart_AO;
|
|
||||||
+ serial1 = &uart_A;
|
|
||||||
+ serial2 = &uart_AO_B;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ chosen {
|
|
||||||
+ stdout-path = "serial0:115200n8";
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ memory@0 {
|
|
||||||
+ device_type = "memory";
|
|
||||||
+ reg = <0x0 0x0 0x0 0x80000000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ adc-keys {
|
|
||||||
+ compatible = "adc-keys";
|
|
||||||
+ io-channels = <&saradc 0>;
|
|
||||||
+ io-channel-names = "buttons";
|
|
||||||
+ keyup-threshold-microvolt = <1710000>;
|
|
||||||
+
|
|
||||||
+ button-function {
|
|
||||||
+ label = "Function";
|
|
||||||
+ linux,code = <KEY_FN>;
|
|
||||||
+ press-threshold-microvolt = <10000>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ emmc_pwrseq: emmc-pwrseq {
|
|
||||||
+ compatible = "mmc-pwrseq-emmc";
|
|
||||||
+ reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ gpio_fan: gpio-fan {
|
|
||||||
+ compatible = "gpio-fan";
|
|
||||||
+ gpios = <&gpio GPIODV_14 GPIO_ACTIVE_HIGH
|
|
||||||
+ &gpio GPIODV_15 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ /* Dummy RPM values since fan is optional */
|
|
||||||
+ gpio-fan,speed-map = <0 0
|
|
||||||
+ 1 1
|
|
||||||
+ 2 2
|
|
||||||
+ 3 3>;
|
|
||||||
+ cooling-min-level = <0>;
|
|
||||||
+ cooling-max-level = <3>;
|
|
||||||
+ #cooling-cells = <2>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ gpio-keys-polled {
|
|
||||||
+ compatible = "gpio-keys-polled";
|
|
||||||
+ #address-cells = <1>;
|
|
||||||
+ #size-cells = <0>;
|
|
||||||
+ poll-interval = <100>;
|
|
||||||
+
|
|
||||||
+ button@0 {
|
|
||||||
+ label = "power";
|
|
||||||
+ linux,code = <KEY_POWER>;
|
|
||||||
+ gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ hdmi-connector {
|
|
||||||
+ compatible = "hdmi-connector";
|
|
||||||
+ type = "a";
|
|
||||||
+
|
|
||||||
+ port {
|
|
||||||
+ hdmi_connector_in: endpoint {
|
|
||||||
+ remote-endpoint = <&hdmi_tx_tmds_out>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ pwmleds {
|
|
||||||
+ compatible = "pwm-leds";
|
|
||||||
+
|
|
||||||
+ power {
|
|
||||||
+ label = "vim:red:power";
|
|
||||||
+ pwms = <&pwm_AO_ab 1 7812500 0>;
|
|
||||||
+ max-brightness = <255>;
|
|
||||||
+ linux,default-trigger = "default-on";
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ sdio_pwrseq: sdio-pwrseq {
|
|
||||||
+ compatible = "mmc-pwrseq-simple";
|
|
||||||
+ reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
|
|
||||||
+ clocks = <&wifi32k>;
|
|
||||||
+ clock-names = "ext_clock";
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ thermal-zones {
|
|
||||||
+ cpu-thermal {
|
|
||||||
+ polling-delay-passive = <250>; /* milliseconds */
|
|
||||||
+ polling-delay = <1000>; /* milliseconds */
|
|
||||||
+
|
|
||||||
+ thermal-sensors = <&scpi_sensors 0>;
|
|
||||||
+
|
|
||||||
+ trips {
|
|
||||||
+ cpu_alert0: cpu-alert0 {
|
|
||||||
+ temperature = <70000>; /* millicelsius */
|
|
||||||
+ hysteresis = <2000>; /* millicelsius */
|
|
||||||
+ type = "active";
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ cpu_alert1: cpu-alert1 {
|
|
||||||
+ temperature = <80000>; /* millicelsius */
|
|
||||||
+ hysteresis = <2000>; /* millicelsius */
|
|
||||||
+ type = "passive";
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ cooling-maps {
|
|
||||||
+ map0 {
|
|
||||||
+ trip = <&cpu_alert0>;
|
|
||||||
+ cooling-device = <&gpio_fan THERMAL_NO_LIMIT 1>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ map1 {
|
|
||||||
+ trip = <&cpu_alert1>;
|
|
||||||
+ cooling-device = <&gpio_fan 2 THERMAL_NO_LIMIT>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ map2 {
|
|
||||||
+ trip = <&cpu_alert1>;
|
|
||||||
+ cooling-device =
|
|
||||||
+ <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ map3 {
|
|
||||||
+ trip = <&cpu_alert1>;
|
|
||||||
+ cooling-device =
|
|
||||||
+ <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ vcc_3v3: regulator-vcc_3v3 {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+ regulator-name = "VCC_3V3";
|
|
||||||
+ regulator-min-microvolt = <3300000>;
|
|
||||||
+ regulator-max-microvolt = <3300000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ vddio_ao18: regulator-vddio_ao18 {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+ regulator-name = "VDDIO_AO18";
|
|
||||||
+ regulator-min-microvolt = <1800000>;
|
|
||||||
+ regulator-max-microvolt = <1800000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ vddio_boot: regulator-vddio_boot {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+ regulator-name = "VDDIO_BOOT";
|
|
||||||
+ regulator-min-microvolt = <1800000>;
|
|
||||||
+ regulator-max-microvolt = <1800000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ vddao_3v3: regulator-vddao_3v3 {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+ regulator-name = "VDDAO_3V3";
|
|
||||||
+ regulator-min-microvolt = <3300000>;
|
|
||||||
+ regulator-max-microvolt = <3300000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ wifi32k: wifi32k {
|
|
||||||
+ compatible = "pwm-clock";
|
|
||||||
+ #clock-cells = <0>;
|
|
||||||
+ clock-frequency = <32768>;
|
|
||||||
+ pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&cec_AO {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&ao_cec_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ hdmi-phandle = <&hdmi_tx>;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&cpu0 {
|
|
||||||
+ cooling-min-level = <0>;
|
|
||||||
+ cooling-max-level = <6>;
|
|
||||||
+ #cooling-cells = <2>;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&cpu4 {
|
|
||||||
+ cooling-min-level = <0>;
|
|
||||||
+ cooling-max-level = <4>;
|
|
||||||
+ #cooling-cells = <2>;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+ðmac {
|
|
||||||
+ pinctrl-0 = <ð_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+
|
|
||||||
+ /* Select external PHY by default */
|
|
||||||
+ phy-handle = <&external_phy>;
|
|
||||||
+
|
|
||||||
+ amlogic,tx-delay-ns = <2>;
|
|
||||||
+
|
|
||||||
+ /* External PHY reset is shared with internal PHY Led signals */
|
|
||||||
+ snps,reset-gpio = <&gpio GPIOZ_14 0>;
|
|
||||||
+ snps,reset-delays-us = <0 10000 1000000>;
|
|
||||||
+ snps,reset-active-low;
|
|
||||||
+
|
|
||||||
+ /* External PHY is in RGMII */
|
|
||||||
+ phy-mode = "rgmii";
|
|
||||||
+
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&external_mdio {
|
|
||||||
+ external_phy: ethernet-phy@0 {
|
|
||||||
+ /* Realtek RTL8211F (0x001cc916) */
|
|
||||||
+ reg = <0>;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&hdmi_tx {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&hdmi_tx_tmds_port {
|
|
||||||
+ hdmi_tx_tmds_out: endpoint {
|
|
||||||
+ remote-endpoint = <&hdmi_connector_in>;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&i2c_A {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&i2c_a_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&i2c_B {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&i2c_b_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+
|
|
||||||
+ rtc: rtc@51 {
|
|
||||||
+ /* has to be enabled manually when a battery is connected: */
|
|
||||||
+ status = "disabled";
|
|
||||||
+ compatible = "haoyu,hym8563";
|
|
||||||
+ reg = <0x51>;
|
|
||||||
+ #clock-cells = <0>;
|
|
||||||
+ clock-frequency = <32768>;
|
|
||||||
+ clock-output-names = "xin32k";
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&ir {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&remote_input_ao_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ linux,rc-map-name = "rc-geekbox";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&pwm_AO_ab {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ clocks = <&clkc CLKID_FCLK_DIV4>;
|
|
||||||
+ clock-names = "clkin0";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&pwm_ef {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&pwm_e_pins>, <&pwm_f_clk_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ clocks = <&clkc CLKID_FCLK_DIV4>;
|
|
||||||
+ clock-names = "clkin0";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&sd_emmc_a {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&sdio_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ #address-cells = <1>;
|
|
||||||
+ #size-cells = <0>;
|
|
||||||
+
|
|
||||||
+ bus-width = <4>;
|
|
||||||
+ max-frequency = <100000000>;
|
|
||||||
+
|
|
||||||
+ non-removable;
|
|
||||||
+ disable-wp;
|
|
||||||
+
|
|
||||||
+ mmc-pwrseq = <&sdio_pwrseq>;
|
|
||||||
+
|
|
||||||
+ vmmc-supply = <&vddao_3v3>;
|
|
||||||
+ vqmmc-supply = <&vddio_boot>;
|
|
||||||
+
|
|
||||||
+ brcmf: wifi@1 {
|
|
||||||
+ reg = <1>;
|
|
||||||
+ compatible = "brcm,bcm4329-fmac";
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+/* SD card */
|
|
||||||
+&sd_emmc_b {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&sdcard_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+
|
|
||||||
+ bus-width = <4>;
|
|
||||||
+ cap-sd-highspeed;
|
|
||||||
+ max-frequency = <100000000>;
|
|
||||||
+ disable-wp;
|
|
||||||
+
|
|
||||||
+ cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ cd-inverted;
|
|
||||||
+
|
|
||||||
+ vmmc-supply = <&vddao_3v3>;
|
|
||||||
+ vqmmc-supply = <&vddio_boot>;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+/* eMMC */
|
|
||||||
+&sd_emmc_c {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+
|
|
||||||
+ bus-width = <8>;
|
|
||||||
+ cap-sd-highspeed;
|
|
||||||
+ cap-mmc-highspeed;
|
|
||||||
+ max-frequency = <200000000>;
|
|
||||||
+ non-removable;
|
|
||||||
+ disable-wp;
|
|
||||||
+ mmc-ddr-1_8v;
|
|
||||||
+ mmc-hs200-1_8v;
|
|
||||||
+
|
|
||||||
+ mmc-pwrseq = <&emmc_pwrseq>;
|
|
||||||
+ vmmc-supply = <&vcc_3v3>;
|
|
||||||
+ vqmmc-supply = <&vddio_boot>;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * EMMC_DS pin is shared between SPI NOR CS and eMMC Data Strobe
|
|
||||||
+ * Remove emmc_ds_pins from sd_emmc_c pinctrl-0 then spifc can be enabled
|
|
||||||
+ */
|
|
||||||
+&spifc {
|
|
||||||
+ status = "disabled";
|
|
||||||
+ pinctrl-0 = <&nor_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+
|
|
||||||
+ w25q32: spi-flash@0 {
|
|
||||||
+ #address-cells = <1>;
|
|
||||||
+ #size-cells = <1>;
|
|
||||||
+ compatible = "winbond,w25q16", "jedec,spi-nor";
|
|
||||||
+ reg = <0>;
|
|
||||||
+ spi-max-frequency = <3000000>;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+/* This one is connected to the Bluetooth module */
|
|
||||||
+&uart_A {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&uart_a_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+/* This is brought out on the Linux_RX (18) and Linux_TX (19) pins: */
|
|
||||||
+&uart_AO {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&uart_ao_a_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+/* This is brought out on the UART_RX_AO_B (15) and UART_TX_AO_B (16) pins: */
|
|
||||||
+&uart_AO_B {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&uart_ao_b_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&saradc {
|
|
||||||
+ status = "okay";
|
|
||||||
+ vref-supply = <&vddio_ao18>;
|
|
||||||
+};
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,260 +0,0 @@
|
|||||||
From 563fa3aaad2752079c8ee05819bf9923370f39aa Mon Sep 17 00:00:00 2001
|
|
||||||
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
||||||
Date: Sat, 26 Nov 2016 15:56:32 +0100
|
|
||||||
Subject: [PATCH 04/39] phy: meson: add USB3 PHY support for Meson GXL
|
|
||||||
|
|
||||||
This adds USB3 PHY driver found on Meson GXL and GXM SoCs.
|
|
||||||
|
|
||||||
Unfortunately there are no datasheets available for any of these PHYs.
|
|
||||||
Both drivers were written by reading the reference drivers provided by
|
|
||||||
Amlogic and analyzing the registers on the kernel that was shipped with
|
|
||||||
my board.
|
|
||||||
|
|
||||||
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
||||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
---
|
|
||||||
drivers/phy/amlogic/Kconfig | 13 ++
|
|
||||||
drivers/phy/amlogic/Makefile | 1 +
|
|
||||||
drivers/phy/amlogic/phy-meson-gxl-usb3.c | 198 +++++++++++++++++++++++++++++++
|
|
||||||
3 files changed, 212 insertions(+)
|
|
||||||
create mode 100644 drivers/phy/amlogic/phy-meson-gxl-usb3.c
|
|
||||||
|
|
||||||
diff --git a/drivers/phy/amlogic/Kconfig b/drivers/phy/amlogic/Kconfig
|
|
||||||
index cb8f450..5d11a3e 100644
|
|
||||||
--- a/drivers/phy/amlogic/Kconfig
|
|
||||||
+++ b/drivers/phy/amlogic/Kconfig
|
|
||||||
@@ -13,6 +13,19 @@ config PHY_MESON8B_USB2
|
|
||||||
Meson8b and GXBB SoCs.
|
|
||||||
If unsure, say N.
|
|
||||||
|
|
||||||
+config PHY_MESON_GXL_USB3
|
|
||||||
+ tristate "Meson GXL and GXM USB3 PHY drivers"
|
|
||||||
+ default ARCH_MESON
|
|
||||||
+ depends on OF && (ARCH_MESON || COMPILE_TEST)
|
|
||||||
+ depends on USB_SUPPORT
|
|
||||||
+ select USB_COMMON
|
|
||||||
+ select GENERIC_PHY
|
|
||||||
+ select REGMAP_MMIO
|
|
||||||
+ help
|
|
||||||
+ Enable this to support the Meson USB3 PHY found in Meson
|
|
||||||
+ GXL and GXM SoCs.
|
|
||||||
+ If unsure, say N.
|
|
||||||
+
|
|
||||||
config PHY_MESON_GXL_USB2
|
|
||||||
tristate "Meson GXL and GXM USB2 PHY drivers"
|
|
||||||
default ARCH_MESON
|
|
||||||
diff --git a/drivers/phy/amlogic/Makefile b/drivers/phy/amlogic/Makefile
|
|
||||||
index cfdc987..4fd8848 100644
|
|
||||||
--- a/drivers/phy/amlogic/Makefile
|
|
||||||
+++ b/drivers/phy/amlogic/Makefile
|
|
||||||
@@ -1,2 +1,3 @@
|
|
||||||
obj-$(CONFIG_PHY_MESON8B_USB2) += phy-meson8b-usb2.o
|
|
||||||
obj-$(CONFIG_PHY_MESON_GXL_USB2) += phy-meson-gxl-usb2.o
|
|
||||||
+obj-$(CONFIG_PHY_MESON_GXL_USB3) += phy-meson-gxl-usb3.o
|
|
||||||
diff --git a/drivers/phy/amlogic/phy-meson-gxl-usb3.c b/drivers/phy/amlogic/phy-meson-gxl-usb3.c
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..9af5222
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/drivers/phy/amlogic/phy-meson-gxl-usb3.c
|
|
||||||
@@ -0,0 +1,198 @@
|
|
||||||
+/*
|
|
||||||
+ * Meson GXL USB3 PHY driver
|
|
||||||
+ *
|
|
||||||
+ * Copyright (C) 2016 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
||||||
+ *
|
|
||||||
+ * This program is free software; you can redistribute it and/or modify
|
|
||||||
+ * it under the terms of the GNU General Public License version 2 as
|
|
||||||
+ * published by the Free Software Foundation.
|
|
||||||
+ *
|
|
||||||
+ * You should have received a copy of the GNU General Public License
|
|
||||||
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#include <linux/clk.h>
|
|
||||||
+#include <linux/delay.h>
|
|
||||||
+#include <linux/io.h>
|
|
||||||
+#include <linux/module.h>
|
|
||||||
+#include <linux/of_device.h>
|
|
||||||
+#include <linux/reset.h>
|
|
||||||
+#include <linux/regmap.h>
|
|
||||||
+#include <linux/phy/phy.h>
|
|
||||||
+#include <linux/platform_device.h>
|
|
||||||
+#include <linux/usb/of.h>
|
|
||||||
+#include <linux/workqueue.h>
|
|
||||||
+
|
|
||||||
+#define USB_R0 0x00
|
|
||||||
+ #define USB_R0_P30_FSEL_SHIFT 0
|
|
||||||
+ #define USB_R0_P30_FSEL_MASK GENMASK(5, 0)
|
|
||||||
+ #define USB_R0_P30_PHY_RESET BIT(6)
|
|
||||||
+ #define USB_R0_P30_TEST_POWERDOWN_HSP BIT(7)
|
|
||||||
+ #define USB_R0_P30_TEST_POWERDOWN_SSP BIT(8)
|
|
||||||
+ #define USB_R0_P30_ACJT_LEVEL_SHIFT 9
|
|
||||||
+ #define USB_R0_P30_ACJT_LEVEL_MASK GENMASK(13, 9)
|
|
||||||
+ #define USB_R0_P30_TX_BOOST_LEVEL_SHIFT 14
|
|
||||||
+ #define USB_R0_P30_TX_BOOST_LEVEL_MASK GENMASK(16, 14)
|
|
||||||
+ #define USB_R0_P30_LANE0_TX2RX_LOOPBACK BIT(17)
|
|
||||||
+ #define USB_R0_P30_LANE0_EXT_PCLK_REQ BIT(18)
|
|
||||||
+ #define USB_R0_P30_PCS_RX_LOS_MASK_VAL_SHIFT 19
|
|
||||||
+ #define USB_R0_P30_PCS_RX_LOS_MASK_VAL_MASK GENMASK(28, 19)
|
|
||||||
+ #define USB_R0_U2D_SS_SCALEDOWN_MODE_SHIFT 29
|
|
||||||
+ #define USB_R0_U2D_SS_SCALEDOWN_MODE_MASK GENMASK(30, 29)
|
|
||||||
+ #define USB_R0_U2D_ACT BIT(31)
|
|
||||||
+
|
|
||||||
+#define USB_R1 0x04
|
|
||||||
+ #define USB_R1_U3H_BIGENDIAN_GS BIT(0)
|
|
||||||
+ #define USB_R1_U3H_PME_ENABLE BIT(1)
|
|
||||||
+ #define USB_R1_U3H_HUB_PORT_OVERCURRENT_SHIFT 2
|
|
||||||
+ #define USB_R1_U3H_HUB_PORT_OVERCURRENT_MASK GENMASK(6, 2)
|
|
||||||
+ #define USB_R1_U3H_HUB_PORT_PERM_ATTACH_SHIFT 7
|
|
||||||
+ #define USB_R1_U3H_HUB_PORT_PERM_ATTACH_MASK GENMASK(11, 7)
|
|
||||||
+ #define USB_R1_U3H_HOST_U2_PORT_DISABLE_SHIFT 12
|
|
||||||
+ #define USB_R1_U3H_HOST_U2_PORT_DISABLE_MASK GENMASK(15, 12)
|
|
||||||
+ #define USB_R1_U3H_HOST_U3_PORT_DISABLE BIT(16)
|
|
||||||
+ #define USB_R1_U3H_HOST_PORT_POWER_CONTROL_PRESENT BIT(17)
|
|
||||||
+ #define USB_R1_U3H_HOST_MSI_ENABLE BIT(18)
|
|
||||||
+ #define USB_R1_U3H_FLADJ_30MHZ_REG_SHIFT 19
|
|
||||||
+ #define USB_R1_U3H_FLADJ_30MHZ_REG_MASK GENMASK(24, 19)
|
|
||||||
+ #define USB_R1_P30_PCS_TX_SWING_FULL_SHIFT 25
|
|
||||||
+ #define USB_R1_P30_PCS_TX_SWING_FULL_MASK GENMASK(31, 25)
|
|
||||||
+
|
|
||||||
+#define USB_R2 0x08
|
|
||||||
+ #define USB_R2_P30_CR_DATA_IN_SHIFT 0
|
|
||||||
+ #define USB_R2_P30_CR_DATA_IN_MASK GENMASK(15, 0)
|
|
||||||
+ #define USB_R2_P30_CR_READ BIT(16)
|
|
||||||
+ #define USB_R2_P30_CR_WRITE BIT(17)
|
|
||||||
+ #define USB_R2_P30_CR_CAP_ADDR BIT(18)
|
|
||||||
+ #define USB_R2_P30_CR_CAP_DATA BIT(19)
|
|
||||||
+ #define USB_R2_P30_PCS_TX_DEEMPH_3P5DB_SHIFT 20
|
|
||||||
+ #define USB_R2_P30_PCS_TX_DEEMPH_3P5DB_MASK GENMASK(25, 20)
|
|
||||||
+ #define USB_R2_P30_PCS_TX_DEEMPH_6DB_SHIFT 26
|
|
||||||
+ #define USB_R2_P30_PCS_TX_DEEMPH_6DB_MASK GENMASK(31, 26)
|
|
||||||
+
|
|
||||||
+#define USB_R3 0x0c
|
|
||||||
+ #define USB_R3_P30_SSC_ENABLE BIT(0)
|
|
||||||
+ #define USB_R3_P30_SSC_RANGE_SHIFT 1
|
|
||||||
+ #define USB_R3_P30_SSC_RANGE_MASK GENMASK(3, 1)
|
|
||||||
+ #define USB_R3_P30_SSC_REF_CLK_SEL_SHIFT 4
|
|
||||||
+ #define USB_R3_P30_SSC_REF_CLK_SEL_MASK GENMASK(12, 4)
|
|
||||||
+ #define USB_R3_P30_REF_SSP_EN BIT(13)
|
|
||||||
+ #define USB_R3_P30_LOS_BIAS_SHIFT 16
|
|
||||||
+ #define USB_R3_P30_LOS_BIAS_MASK GENMASK(18, 16)
|
|
||||||
+ #define USB_R3_P30_LOS_LEVEL_SHIFT 19
|
|
||||||
+ #define USB_R3_P30_LOS_LEVEL_MASK GENMASK(23, 19)
|
|
||||||
+ #define USB_R3_P30_MPLL_MULTIPLIER_SHIFT 24
|
|
||||||
+ #define USB_R3_P30_MPLL_MULTIPLIER_MASK GENMASK(30, 24)
|
|
||||||
+
|
|
||||||
+#define USB_R4 0x10
|
|
||||||
+ #define USB_R4_P21_PORT_RESET_0 BIT(0)
|
|
||||||
+ #define USB_R4_P21_SLEEP_M0 BIT(1)
|
|
||||||
+ #define USB_R4_MEM_PD_SHIFT 2
|
|
||||||
+ #define USB_R4_MEM_PD_MASK GENMASK(3, 2)
|
|
||||||
+ #define USB_R4_P21_ONLY BIT(4)
|
|
||||||
+
|
|
||||||
+#define USB_R5 0x14
|
|
||||||
+ #define USB_R5_ID_DIG_SYNC BIT(0)
|
|
||||||
+ #define USB_R5_ID_DIG_REG BIT(1)
|
|
||||||
+ #define USB_R5_ID_DIG_CFG_SHIFT 2
|
|
||||||
+ #define USB_R5_ID_DIG_CFG_MASK GENMASK(3, 2)
|
|
||||||
+ #define USB_R5_ID_DIG_EN_0 BIT(4)
|
|
||||||
+ #define USB_R5_ID_DIG_EN_1 BIT(5)
|
|
||||||
+ #define USB_R5_ID_DIG_CURR BIT(6)
|
|
||||||
+ #define USB_R5_ID_DIG_IRQ BIT(7)
|
|
||||||
+ #define USB_R5_ID_DIG_TH_SHIFT 8
|
|
||||||
+ #define USB_R5_ID_DIG_TH_MASK GENMASK(15, 8)
|
|
||||||
+ #define USB_R5_ID_DIG_CNT_SHIFT 16
|
|
||||||
+ #define USB_R5_ID_DIG_CNT_MASK GENMASK(23, 16)
|
|
||||||
+
|
|
||||||
+/* read-only register */
|
|
||||||
+#define USB_R6 0x18
|
|
||||||
+ #define USB_R6_P30_CR_DATA_OUT_SHIFT 0
|
|
||||||
+ #define USB_R6_P30_CR_DATA_OUT_MASK GENMASK(15, 0)
|
|
||||||
+ #define USB_R6_P30_CR_ACK BIT(16)
|
|
||||||
+
|
|
||||||
+#define RESET_COMPLETE_TIME 500
|
|
||||||
+
|
|
||||||
+struct phy_meson_gxl_usb3_priv {
|
|
||||||
+ struct regmap *regmap;
|
|
||||||
+ struct phy *this_phy;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static const struct regmap_config phy_meson_gxl_usb3_regmap_conf = {
|
|
||||||
+ .reg_bits = 32,
|
|
||||||
+ .val_bits = 32,
|
|
||||||
+ .reg_stride = 4,
|
|
||||||
+ .max_register = USB_R6,
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static int phy_meson_gxl_usb3_power_on(struct phy *phy)
|
|
||||||
+{
|
|
||||||
+ struct phy_meson_gxl_usb3_priv *priv = phy_get_drvdata(phy);
|
|
||||||
+
|
|
||||||
+ regmap_update_bits(priv->regmap, USB_R1,
|
|
||||||
+ USB_R1_U3H_FLADJ_30MHZ_REG_MASK,
|
|
||||||
+ 0x20 << USB_R1_U3H_FLADJ_30MHZ_REG_SHIFT);
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static const struct phy_ops phy_meson_gxl_usb3_ops = {
|
|
||||||
+ .power_on = phy_meson_gxl_usb3_power_on,
|
|
||||||
+ .owner = THIS_MODULE,
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static int phy_meson_gxl_usb3_probe(struct platform_device *pdev)
|
|
||||||
+{
|
|
||||||
+ struct device *dev = &pdev->dev;
|
|
||||||
+ struct device_node *np = dev->of_node;
|
|
||||||
+ struct phy_meson_gxl_usb3_priv *priv;
|
|
||||||
+ struct resource *res;
|
|
||||||
+ struct phy *phy;
|
|
||||||
+ struct phy_provider *phy_provider;
|
|
||||||
+ void __iomem *base;
|
|
||||||
+
|
|
||||||
+ priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
|
|
||||||
+ if (!priv)
|
|
||||||
+ return -ENOMEM;
|
|
||||||
+
|
|
||||||
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
|
||||||
+ base = devm_ioremap_resource(dev, res);
|
|
||||||
+ if (IS_ERR(base))
|
|
||||||
+ return PTR_ERR(base);
|
|
||||||
+
|
|
||||||
+ priv->regmap = devm_regmap_init_mmio(dev, base,
|
|
||||||
+ &phy_meson_gxl_usb3_regmap_conf);
|
|
||||||
+ if (IS_ERR(priv->regmap))
|
|
||||||
+ return PTR_ERR(priv->regmap);
|
|
||||||
+
|
|
||||||
+ phy = devm_phy_create(dev, np, &phy_meson_gxl_usb3_ops);
|
|
||||||
+ if (IS_ERR(phy)) {
|
|
||||||
+ dev_err(dev, "failed to create PHY\n");
|
|
||||||
+ return PTR_ERR(phy);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ phy_set_drvdata(phy, priv);
|
|
||||||
+
|
|
||||||
+ phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
|
|
||||||
+
|
|
||||||
+ return PTR_ERR_OR_ZERO(phy_provider);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static const struct of_device_id phy_meson_gxl_usb3_of_match[] = {
|
|
||||||
+ { .compatible = "amlogic,meson-gxl-usb3-phy", },
|
|
||||||
+ { },
|
|
||||||
+};
|
|
||||||
+MODULE_DEVICE_TABLE(of, phy_meson_gxl_usb3_of_match);
|
|
||||||
+
|
|
||||||
+static struct platform_driver phy_meson_gxl_usb3_driver = {
|
|
||||||
+ .probe = phy_meson_gxl_usb3_probe,
|
|
||||||
+ .driver = {
|
|
||||||
+ .name = "phy-meson-gxl-usb3",
|
|
||||||
+ .of_match_table = phy_meson_gxl_usb3_of_match,
|
|
||||||
+ },
|
|
||||||
+};
|
|
||||||
+module_platform_driver(phy_meson_gxl_usb3_driver);
|
|
||||||
+
|
|
||||||
+MODULE_AUTHOR("Martin Blumenstingl <martin.blumenstingl@googlemail.com>");
|
|
||||||
+MODULE_DESCRIPTION("Meson GXL USB3 PHY driver");
|
|
||||||
+MODULE_LICENSE("GPL");
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,293 +0,0 @@
|
|||||||
From 8dca632003156c7a4f2eb6238b6e299f3df03c55 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
||||||
Date: Tue, 10 Jan 2017 18:59:43 +0100
|
|
||||||
Subject: [PATCH 05/39] usb: host: add a generic platform USB roothub driver
|
|
||||||
|
|
||||||
Many SoC platforms have separate devices for the USB PHY which are
|
|
||||||
registered through the generic PHY framework. These PHYs have to be
|
|
||||||
enabled to make the USB controller actually work. They also have to be
|
|
||||||
disabled again on shutdown/suspend.
|
|
||||||
|
|
||||||
Currently (at least) the following HCI platform drivers are using custom
|
|
||||||
code to obtain all PHYs via devicetree for the roothub/controller and
|
|
||||||
disable/enable them when required:
|
|
||||||
- ehci-platform.c has ehci_platform_power_{on,off}
|
|
||||||
- xhci-mtk.c has xhci_mtk_phy_{init,exit,power_on,power_off}
|
|
||||||
- ohci-platform.c has ohci_platform_power_{on,off}
|
|
||||||
|
|
||||||
These drivers are not using the generic devicetree USB device bindings
|
|
||||||
yet which were only introduced recently (documentation is available in
|
|
||||||
devicetree/bindings/usb/usb-device.txt).
|
|
||||||
With this new driver the usb2-phy and usb3-phy can be specified directly
|
|
||||||
in the child-node of the corresponding port of the roothub via
|
|
||||||
devicetree. This can be extended by not just parsing PHYs (some of the
|
|
||||||
other drivers listed above are for example also parsing a list of clocks
|
|
||||||
as well) when required.
|
|
||||||
|
|
||||||
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
||||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
---
|
|
||||||
.../devicetree/bindings/usb/usb-roothub.txt | 46 +++++++
|
|
||||||
drivers/usb/host/Kconfig | 3 +
|
|
||||||
drivers/usb/host/Makefile | 2 +
|
|
||||||
drivers/usb/host/platform-roothub.c | 146 +++++++++++++++++++++
|
|
||||||
drivers/usb/host/platform-roothub.h | 14 ++
|
|
||||||
5 files changed, 211 insertions(+)
|
|
||||||
create mode 100644 Documentation/devicetree/bindings/usb/usb-roothub.txt
|
|
||||||
create mode 100644 drivers/usb/host/platform-roothub.c
|
|
||||||
create mode 100644 drivers/usb/host/platform-roothub.h
|
|
||||||
|
|
||||||
diff --git a/Documentation/devicetree/bindings/usb/usb-roothub.txt b/Documentation/devicetree/bindings/usb/usb-roothub.txt
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..23b24b6
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/Documentation/devicetree/bindings/usb/usb-roothub.txt
|
|
||||||
@@ -0,0 +1,46 @@
|
|
||||||
+Generic USB root-hub Properties
|
|
||||||
+
|
|
||||||
+similar to the USB device bindings (documented in usb-device.txt from the
|
|
||||||
+current directory) this provides support for configuring the root-hub.
|
|
||||||
+
|
|
||||||
+Required properties:
|
|
||||||
+- compatible: should be at least one of "usb1d6b,3", "usb1d6b,2"
|
|
||||||
+- reg: must be 0.
|
|
||||||
+- address-cells: must be 1
|
|
||||||
+- size-cells: must be 0
|
|
||||||
+
|
|
||||||
+Required sub-nodes:
|
|
||||||
+a sub-node per actual USB port is required. each sub-node supports the
|
|
||||||
+following properties:
|
|
||||||
+ Required properties:
|
|
||||||
+ - reg: the port number on the root-hub (mandatory)
|
|
||||||
+ Optional properties:
|
|
||||||
+ - phys: optional, from the *Generic PHY* bindings (mandatory needed
|
|
||||||
+ when phy-names is given)
|
|
||||||
+ - phy-names: optional, from the *Generic PHY* bindings; supported names
|
|
||||||
+ are "usb2-phy" or "usb3-phy"
|
|
||||||
+
|
|
||||||
+Example:
|
|
||||||
+ &usb1 {
|
|
||||||
+ #address-cells = <1>;
|
|
||||||
+ #size-cells = <0>;
|
|
||||||
+
|
|
||||||
+ roothub@0 {
|
|
||||||
+ compatible = "usb1d6b,3", "usb1d6b,2";
|
|
||||||
+ #address-cells = <1>;
|
|
||||||
+ #size-cells = <0>;
|
|
||||||
+ reg = <0>;
|
|
||||||
+
|
|
||||||
+ port@1 {
|
|
||||||
+ reg = <1>;
|
|
||||||
+ usb-phy = <&usb2_phy1>, <&usb3_phy1>;
|
|
||||||
+ phy-names = "usb2-phy", "usb3-phy";
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ port@2 {
|
|
||||||
+ reg = <2>;
|
|
||||||
+ usb-phy = <&usb2_phy2>, <&usb3_phy2>;
|
|
||||||
+ phy-names = "usb2-phy", "usb3-phy";
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+ }
|
|
||||||
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
|
|
||||||
index 92b1972..598ca56 100644
|
|
||||||
--- a/drivers/usb/host/Kconfig
|
|
||||||
+++ b/drivers/usb/host/Kconfig
|
|
||||||
@@ -797,6 +797,9 @@ config USB_HCD_SSB
|
|
||||||
|
|
||||||
If unsure, say N.
|
|
||||||
|
|
||||||
+config USB_PLATFORM_ROOTHUB
|
|
||||||
+ bool
|
|
||||||
+
|
|
||||||
config USB_HCD_TEST_MODE
|
|
||||||
bool "HCD test mode support"
|
|
||||||
---help---
|
|
||||||
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
|
|
||||||
index 4ab2689..873ebd9 100644
|
|
||||||
--- a/drivers/usb/host/Makefile
|
|
||||||
+++ b/drivers/usb/host/Makefile
|
|
||||||
@@ -30,6 +30,8 @@ obj-$(CONFIG_USB_WHCI_HCD) += whci/
|
|
||||||
|
|
||||||
obj-$(CONFIG_USB_PCI) += pci-quirks.o
|
|
||||||
|
|
||||||
+obj-$(CONFIG_USB_PLATFORM_ROOTHUB) += platform-roothub.o
|
|
||||||
+
|
|
||||||
obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o
|
|
||||||
obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o
|
|
||||||
obj-$(CONFIG_USB_EHCI_HCD_PLATFORM) += ehci-platform.o
|
|
||||||
diff --git a/drivers/usb/host/platform-roothub.c b/drivers/usb/host/platform-roothub.c
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..84837e4
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/drivers/usb/host/platform-roothub.c
|
|
||||||
@@ -0,0 +1,146 @@
|
|
||||||
+/*
|
|
||||||
+ * platform roothub driver - a virtual PHY device which passes all phy_*
|
|
||||||
+ * function calls to multiple (actual) PHY devices. This is comes handy when
|
|
||||||
+ * initializing all PHYs on a root-hub (to keep them all in the same state).
|
|
||||||
+ *
|
|
||||||
+ * Copyright (C) 2017 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
||||||
+ *
|
|
||||||
+ * This program is free software; you can redistribute it and/or modify
|
|
||||||
+ * it under the terms of the GNU General Public License version 2 as
|
|
||||||
+ * published by the Free Software Foundation.
|
|
||||||
+ *
|
|
||||||
+ * You should have received a copy of the GNU General Public License
|
|
||||||
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#include <linux/device.h>
|
|
||||||
+#include <linux/list.h>
|
|
||||||
+#include <linux/phy/phy.h>
|
|
||||||
+#include <linux/of.h>
|
|
||||||
+#include <linux/usb/of.h>
|
|
||||||
+
|
|
||||||
+#include "platform-roothub.h"
|
|
||||||
+
|
|
||||||
+#define ROOTHUB_PORTNUM 0
|
|
||||||
+
|
|
||||||
+struct platform_roothub {
|
|
||||||
+ struct phy *phy;
|
|
||||||
+ struct list_head list;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static struct platform_roothub *platform_roothub_alloc(struct device *dev)
|
|
||||||
+{
|
|
||||||
+ struct platform_roothub *roothub_entry;
|
|
||||||
+
|
|
||||||
+ roothub_entry = devm_kzalloc(dev, sizeof(*roothub_entry), GFP_KERNEL);
|
|
||||||
+ if (!roothub_entry)
|
|
||||||
+ return ERR_PTR(-ENOMEM);
|
|
||||||
+
|
|
||||||
+ INIT_LIST_HEAD(&roothub_entry->list);
|
|
||||||
+
|
|
||||||
+ return roothub_entry;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int platform_roothub_add_phy(struct device *dev,
|
|
||||||
+ struct device_node *port_np,
|
|
||||||
+ const char *con_id, struct list_head *list)
|
|
||||||
+{
|
|
||||||
+ struct platform_roothub *roothub_entry;
|
|
||||||
+ struct phy *phy = devm_of_phy_get(dev, port_np, con_id);
|
|
||||||
+
|
|
||||||
+ if (IS_ERR_OR_NULL(phy)) {
|
|
||||||
+ if (!phy || PTR_ERR(phy) == -ENODEV)
|
|
||||||
+ return 0;
|
|
||||||
+ else
|
|
||||||
+ return PTR_ERR(phy);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ roothub_entry = platform_roothub_alloc(dev);
|
|
||||||
+ if (IS_ERR(roothub_entry))
|
|
||||||
+ return PTR_ERR(roothub_entry);
|
|
||||||
+
|
|
||||||
+ roothub_entry->phy = phy;
|
|
||||||
+
|
|
||||||
+ list_add_tail(&roothub_entry->list, list);
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+struct platform_roothub *platform_roothub_init(struct device *dev)
|
|
||||||
+{
|
|
||||||
+ struct device_node *roothub_np, *port_np;
|
|
||||||
+ struct platform_roothub *plat_roothub;
|
|
||||||
+ int err;
|
|
||||||
+
|
|
||||||
+ roothub_np = usb_of_get_child_node(dev->of_node, ROOTHUB_PORTNUM);
|
|
||||||
+ if (!of_device_is_available(roothub_np))
|
|
||||||
+ return NULL;
|
|
||||||
+
|
|
||||||
+ plat_roothub = platform_roothub_alloc(dev);
|
|
||||||
+ if (IS_ERR(plat_roothub))
|
|
||||||
+ return plat_roothub;
|
|
||||||
+
|
|
||||||
+ for_each_available_child_of_node(roothub_np, port_np) {
|
|
||||||
+ err = platform_roothub_add_phy(dev, port_np, "usb2-phy",
|
|
||||||
+ &plat_roothub->list);
|
|
||||||
+ if (err)
|
|
||||||
+ return ERR_PTR(err);
|
|
||||||
+
|
|
||||||
+ err = platform_roothub_add_phy(dev, port_np, "usb3-phy",
|
|
||||||
+ &plat_roothub->list);
|
|
||||||
+ if (err)
|
|
||||||
+ return ERR_PTR(err);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return plat_roothub;
|
|
||||||
+}
|
|
||||||
+EXPORT_SYMBOL_GPL(platform_roothub_init);
|
|
||||||
+
|
|
||||||
+int platform_roothub_power_on(struct platform_roothub *plat_roothub)
|
|
||||||
+{
|
|
||||||
+ struct platform_roothub *roothub_entry;
|
|
||||||
+ struct list_head *head;
|
|
||||||
+ int err;
|
|
||||||
+
|
|
||||||
+ if (!plat_roothub)
|
|
||||||
+ return 0;
|
|
||||||
+
|
|
||||||
+ head = &plat_roothub->list;
|
|
||||||
+
|
|
||||||
+ list_for_each_entry(roothub_entry, head, list) {
|
|
||||||
+ err = phy_init(roothub_entry->phy);
|
|
||||||
+ if (err)
|
|
||||||
+ goto err_out;
|
|
||||||
+
|
|
||||||
+ err = phy_power_on(roothub_entry->phy);
|
|
||||||
+ if (err) {
|
|
||||||
+ phy_exit(roothub_entry->phy);
|
|
||||||
+ goto err_out;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+
|
|
||||||
+err_out:
|
|
||||||
+ list_for_each_entry_continue_reverse(roothub_entry, head, list) {
|
|
||||||
+ phy_power_off(roothub_entry->phy);
|
|
||||||
+ phy_exit(roothub_entry->phy);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return err;
|
|
||||||
+}
|
|
||||||
+EXPORT_SYMBOL_GPL(platform_roothub_power_on);
|
|
||||||
+
|
|
||||||
+void platform_roothub_power_off(struct platform_roothub *plat_roothub)
|
|
||||||
+{
|
|
||||||
+ struct platform_roothub *roothub_entry;
|
|
||||||
+
|
|
||||||
+ if (!plat_roothub)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ list_for_each_entry_reverse(roothub_entry, &plat_roothub->list, list) {
|
|
||||||
+ phy_power_off(roothub_entry->phy);
|
|
||||||
+ phy_exit(roothub_entry->phy);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+EXPORT_SYMBOL_GPL(platform_roothub_power_off);
|
|
||||||
diff --git a/drivers/usb/host/platform-roothub.h b/drivers/usb/host/platform-roothub.h
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..bde0bf2
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/drivers/usb/host/platform-roothub.h
|
|
||||||
@@ -0,0 +1,14 @@
|
|
||||||
+#ifndef USB_HOST_PLATFORM_ROOTHUB_H
|
|
||||||
+#define USB_HOST_PLATFORM_ROOTHUB_H
|
|
||||||
+
|
|
||||||
+struct phy;
|
|
||||||
+struct device_node;
|
|
||||||
+
|
|
||||||
+struct platform_roothub;
|
|
||||||
+
|
|
||||||
+struct platform_roothub *platform_roothub_init(struct device *dev);
|
|
||||||
+
|
|
||||||
+int platform_roothub_power_on(struct platform_roothub *plat_roothub);
|
|
||||||
+void platform_roothub_power_off(struct platform_roothub *plat_roothub);
|
|
||||||
+
|
|
||||||
+#endif /* USB_HOST_PLATFORM_ROOTHUB_H */
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,146 +0,0 @@
|
|||||||
From 55ba20ef5868e2a1fc3cefe264539affe55ef6b7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
||||||
Date: Wed, 11 Jan 2017 11:34:59 +0100
|
|
||||||
Subject: [PATCH 06/39] usb: host: xhci: plat: integrate the platform-roothub
|
|
||||||
|
|
||||||
This enables the platform-roothub for the xhci-plat driver. This allows
|
|
||||||
specifying a PHY for each port via devicetree. All PHYs will then be
|
|
||||||
enabled/disabled by the platform-roothub driver.
|
|
||||||
|
|
||||||
One example where this is required is the Amlogic GXL and GXM SoCs:
|
|
||||||
They are using a dwc3 USB controller with up to three ports enabled on
|
|
||||||
the internal roothub. Using only the top-level "phy" properties does not
|
|
||||||
work here since one can only specify one "usb2-phy" and one "usb3-phy",
|
|
||||||
while actually at least two "usb2-phy" have to be specified.
|
|
||||||
|
|
||||||
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
||||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
---
|
|
||||||
Documentation/devicetree/bindings/usb/usb-xhci.txt | 7 ++++++
|
|
||||||
drivers/usb/host/Kconfig | 1 +
|
|
||||||
drivers/usb/host/xhci-plat.c | 26 +++++++++++++++++++++-
|
|
||||||
drivers/usb/host/xhci.h | 3 +++
|
|
||||||
4 files changed, 36 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.txt b/Documentation/devicetree/bindings/usb/usb-xhci.txt
|
|
||||||
index 7a69b8b..d0d8a67c 100644
|
|
||||||
--- a/Documentation/devicetree/bindings/usb/usb-xhci.txt
|
|
||||||
+++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt
|
|
||||||
@@ -30,6 +30,13 @@ Optional properties:
|
|
||||||
- usb3-lpm-capable: determines if platform is USB3 LPM capable
|
|
||||||
- quirk-broken-port-ped: set if the controller has broken port disable mechanism
|
|
||||||
|
|
||||||
+sub-nodes:
|
|
||||||
+- optionally there can be a node for the root-hub, see usb-roothub.txt in the
|
|
||||||
+ current directory
|
|
||||||
+- one or more nodes with reg 1-31 for each port to which a device is connected.
|
|
||||||
+ See usb-device.txt in the current directory for more information.
|
|
||||||
+
|
|
||||||
+
|
|
||||||
Example:
|
|
||||||
usb@f0931000 {
|
|
||||||
compatible = "generic-xhci";
|
|
||||||
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
|
|
||||||
index 598ca56..8c3b11f 100644
|
|
||||||
--- a/drivers/usb/host/Kconfig
|
|
||||||
+++ b/drivers/usb/host/Kconfig
|
|
||||||
@@ -36,6 +36,7 @@ config USB_XHCI_PCI
|
|
||||||
config USB_XHCI_PLATFORM
|
|
||||||
tristate "Generic xHCI driver for a platform device"
|
|
||||||
select USB_XHCI_RCAR if ARCH_RENESAS
|
|
||||||
+ select USB_PLATFORM_ROOTHUB
|
|
||||||
---help---
|
|
||||||
Adds an xHCI host driver for a generic platform device, which
|
|
||||||
provides a memory space and an irq.
|
|
||||||
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
|
|
||||||
index 1cb6eae..a80d585 100644
|
|
||||||
--- a/drivers/usb/host/xhci-plat.c
|
|
||||||
+++ b/drivers/usb/host/xhci-plat.c
|
|
||||||
@@ -281,10 +281,20 @@ static int xhci_plat_probe(struct platform_device *pdev)
|
|
||||||
goto put_usb3_hcd;
|
|
||||||
}
|
|
||||||
|
|
||||||
- ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
|
|
||||||
+ xhci->platform_roothub = platform_roothub_init(sysdev);
|
|
||||||
+ if (IS_ERR(xhci->platform_roothub)) {
|
|
||||||
+ ret = PTR_ERR(xhci->platform_roothub);
|
|
||||||
+ goto disable_clk;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ ret = platform_roothub_power_on(xhci->platform_roothub);
|
|
||||||
if (ret)
|
|
||||||
goto disable_usb_phy;
|
|
||||||
|
|
||||||
+ ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
|
|
||||||
+ if (ret)
|
|
||||||
+ goto disable_platform_roothub;
|
|
||||||
+
|
|
||||||
if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
|
|
||||||
xhci->shared_hcd->can_do_streams = 1;
|
|
||||||
|
|
||||||
@@ -307,6 +317,9 @@ static int xhci_plat_probe(struct platform_device *pdev)
|
|
||||||
dealloc_usb2_hcd:
|
|
||||||
usb_remove_hcd(hcd);
|
|
||||||
|
|
||||||
+disable_platform_roothub:
|
|
||||||
+ platform_roothub_power_off(xhci->platform_roothub);
|
|
||||||
+
|
|
||||||
disable_usb_phy:
|
|
||||||
usb_phy_shutdown(hcd->usb_phy);
|
|
||||||
|
|
||||||
@@ -338,6 +351,8 @@ static int xhci_plat_remove(struct platform_device *dev)
|
|
||||||
usb_remove_hcd(xhci->shared_hcd);
|
|
||||||
usb_phy_shutdown(hcd->usb_phy);
|
|
||||||
|
|
||||||
+ platform_roothub_power_off(xhci->platform_roothub);
|
|
||||||
+
|
|
||||||
usb_remove_hcd(hcd);
|
|
||||||
usb_put_hcd(xhci->shared_hcd);
|
|
||||||
|
|
||||||
@@ -370,6 +385,11 @@ static int __maybe_unused xhci_plat_suspend(struct device *dev)
|
|
||||||
if (!device_may_wakeup(dev) && !IS_ERR(xhci->clk))
|
|
||||||
clk_disable_unprepare(xhci->clk);
|
|
||||||
|
|
||||||
+ if (ret)
|
|
||||||
+ return ret;
|
|
||||||
+
|
|
||||||
+ platform_roothub_power_off(xhci->platform_roothub);
|
|
||||||
+
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -382,6 +402,10 @@ static int __maybe_unused xhci_plat_resume(struct device *dev)
|
|
||||||
if (!device_may_wakeup(dev) && !IS_ERR(xhci->clk))
|
|
||||||
clk_prepare_enable(xhci->clk);
|
|
||||||
|
|
||||||
+ ret = platform_roothub_power_on(xhci->platform_roothub);
|
|
||||||
+ if (ret)
|
|
||||||
+ return ret;
|
|
||||||
+
|
|
||||||
ret = xhci_priv_resume_quirk(hcd);
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
|
|
||||||
index 2eaf6e1..552834c 100644
|
|
||||||
--- a/drivers/usb/host/xhci.h
|
|
||||||
+++ b/drivers/usb/host/xhci.h
|
|
||||||
@@ -34,6 +34,8 @@
|
|
||||||
#include "xhci-ext-caps.h"
|
|
||||||
#include "pci-quirks.h"
|
|
||||||
|
|
||||||
+#include "platform-roothub.h"
|
|
||||||
+
|
|
||||||
/* xHCI PCI Configuration Registers */
|
|
||||||
#define XHCI_SBRN_OFFSET (0x60)
|
|
||||||
|
|
||||||
@@ -1735,6 +1737,7 @@ struct xhci_hcd {
|
|
||||||
int msix_count;
|
|
||||||
/* optional clock */
|
|
||||||
struct clk *clk;
|
|
||||||
+ struct platform_roothub *platform_roothub;
|
|
||||||
/* data structures */
|
|
||||||
struct xhci_device_context_array *dcbaa;
|
|
||||||
struct xhci_ring *cmd_ring;
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,99 +0,0 @@
|
|||||||
From 547f8ce14bfc3d315dc8b64d0e2eff0c7be897d2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
||||||
Date: Sun, 20 Nov 2016 00:23:52 +0100
|
|
||||||
Subject: [PATCH 07/39] ARM64: dts: meson-gxl: add USB host support
|
|
||||||
|
|
||||||
This adds USB host support to the Meson GXL SoC. A dwc3 controller is
|
|
||||||
used for host-mode, while a dwc2 controller is used for device-mode only.
|
|
||||||
The dwc3 controller's internal roothub has two USB2 ports enabled but no
|
|
||||||
USB3 port. Each of the ports is supplied by a separate PHY. The USB pins
|
|
||||||
are connected to the SoC's USBHOST_A and USBOTG_B pins.
|
|
||||||
Due to the way the roothub works internally the USB PHYs are left
|
|
||||||
enabled. When the dwc3 controller is disabled the PHY is never powered on
|
|
||||||
so it does not draw any extra power. However, when the dwc3 host
|
|
||||||
controller is enabled then all PHYs also have to be enabled, otherwise
|
|
||||||
USB devices will not be detected (regardless of whether they are plugged
|
|
||||||
into an enabled port or not). This means that only the dwc3 controller
|
|
||||||
has to be enabled on boards with USB support (instead of requiring all
|
|
||||||
boards to enable the PHYs additionally with the chance of forgetting to
|
|
||||||
enable one and breaking all other ports with that as well).
|
|
||||||
|
|
||||||
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
||||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
---
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 59 ++++++++++++++++++++++++++++++
|
|
||||||
1 file changed, 59 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
|
|
||||||
index fb8d76a..68ea67a 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
|
|
||||||
@@ -57,6 +57,65 @@
|
|
||||||
no-map;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
+
|
|
||||||
+ soc {
|
|
||||||
+
|
|
||||||
+ usb0: usb@c9000000 {
|
|
||||||
+ compatible = "snps,dwc3";
|
|
||||||
+ #address-cells = <1>;
|
|
||||||
+ #size-cells = <0>;
|
|
||||||
+ reg = <0x0 0xc9000000 0x0 0x100000>;
|
|
||||||
+ interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
|
|
||||||
+ dr_mode = "host";
|
|
||||||
+ maximum-speed = "high-speed";
|
|
||||||
+ snps,dis_u2_susphy_quirk;
|
|
||||||
+ phys = <&usb3_phy0>;
|
|
||||||
+ phy-names = "usb3-phy";
|
|
||||||
+ status = "disabled";
|
|
||||||
+
|
|
||||||
+ dwc3_roothub: roothub@0 {
|
|
||||||
+ compatible = "usb1d6b,3", "usb1d6b,2";
|
|
||||||
+ #address-cells = <1>;
|
|
||||||
+ #size-cells = <0>;
|
|
||||||
+ reg = <0>;
|
|
||||||
+
|
|
||||||
+ port@1 {
|
|
||||||
+ reg = <1>;
|
|
||||||
+ phys = <&usb2_phy0>;
|
|
||||||
+ phy-names = "usb2-phy";
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ port@2 {
|
|
||||||
+ reg = <2>;
|
|
||||||
+ phys = <&usb2_phy1>;
|
|
||||||
+ phy-names = "usb2-phy";
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&apb {
|
|
||||||
+ usb2_phy0: phy@78000 {
|
|
||||||
+ compatible = "amlogic,meson-gxl-usb2-phy";
|
|
||||||
+ #phy-cells = <0>;
|
|
||||||
+ reg = <0x0 0x78000 0x0 0x20>;
|
|
||||||
+ status = "okay";
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ usb2_phy1: phy@78020 {
|
|
||||||
+ compatible = "amlogic,meson-gxl-usb2-phy";
|
|
||||||
+ #phy-cells = <0>;
|
|
||||||
+ reg = <0x0 0x78020 0x0 0x20>;
|
|
||||||
+ status = "okay";
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ usb3_phy0: phy@78080 {
|
|
||||||
+ compatible = "amlogic,meson-gxl-usb3-phy";
|
|
||||||
+ #phy-cells = <0>;
|
|
||||||
+ reg = <0x0 0x78080 0x0 0x20>;
|
|
||||||
+ status = "okay";
|
|
||||||
+ };
|
|
||||||
};
|
|
||||||
|
|
||||||
ðmac {
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
|||||||
From 48d4988f2b3b93a6f17c0d1d5e6d932664bc0c74 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
||||||
Date: Sat, 26 Nov 2016 00:17:22 +0100
|
|
||||||
Subject: [PATCH 08/39] ARM64: dts: meson-gxm: add GXM specific USB host
|
|
||||||
configuration
|
|
||||||
|
|
||||||
The USB configuration on GXM is slightly different than on GXL. The dwc3
|
|
||||||
controller's internal hub has three USB2 ports (instead of 2 on GXL)
|
|
||||||
along with a dedicated USB2 PHY for this port. However, it seems that
|
|
||||||
there are no pins on GXM which would allow connecting the third port to
|
|
||||||
a physical USB port.
|
|
||||||
|
|
||||||
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
||||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
---
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxm.dtsi | 17 +++++++++++++++++
|
|
||||||
1 file changed, 17 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxm.dtsi
|
|
||||||
index 19a798d..5e4cb90 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxm.dtsi
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm.dtsi
|
|
||||||
@@ -121,6 +121,23 @@
|
|
||||||
compatible = "amlogic,meson-gxm-aoclkc", "amlogic,meson-gx-aoclkc";
|
|
||||||
};
|
|
||||||
|
|
||||||
+&apb {
|
|
||||||
+ usb2_phy2: phy@78040 {
|
|
||||||
+ compatible = "amlogic,meson-gxl-usb2-phy";
|
|
||||||
+ #phy-cells = <0>;
|
|
||||||
+ reg = <0x0 0x78040 0x0 0x20>;
|
|
||||||
+ status = "disabled";
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&dwc3_roothub {
|
|
||||||
+ port@3 {
|
|
||||||
+ reg = <3>;
|
|
||||||
+ phys = <&usb2_phy2>;
|
|
||||||
+ phy-names = "usb2-phy";
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
&saradc {
|
|
||||||
compatible = "amlogic,meson-gxm-saradc", "amlogic,meson-saradc";
|
|
||||||
};
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,129 +0,0 @@
|
|||||||
From 1e5a4ee949281c47a03f5cee31226d803d396f48 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
Date: Thu, 13 Jul 2017 15:02:33 +0200
|
|
||||||
Subject: [PATCH 09/39] ARM64: dts: meson-gx: Enable USB on GXL and GXM boards
|
|
||||||
|
|
||||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
---
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 4 ++++
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts | 4 ++++
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 4 ++++
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 4 ++++
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts | 4 ++++
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi | 4 ++++
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 4 ++++
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts | 4 ++++
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts | 4 ++++
|
|
||||||
9 files changed, 36 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
|
|
||||||
index 4157987..7ce9a62 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
|
|
||||||
@@ -236,3 +236,7 @@
|
|
||||||
pinctrl-0 = <&uart_ao_a_pins>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
};
|
|
||||||
+
|
|
||||||
+&usb0 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts
|
|
||||||
index 977b424..6f2cd8e 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts
|
|
||||||
@@ -163,3 +163,7 @@
|
|
||||||
pinctrl-0 = <&uart_ao_a_pins>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
};
|
|
||||||
+
|
|
||||||
+&usb0 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
|
|
||||||
index edc512a..89a5fd9 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
|
|
||||||
@@ -198,3 +198,7 @@
|
|
||||||
pinctrl-0 = <&uart_ao_b_pins>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
};
|
|
||||||
+
|
|
||||||
+&usb0 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
|
|
||||||
index 64c54c9..4035891 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
|
|
||||||
@@ -242,3 +242,7 @@
|
|
||||||
pinctrl-0 = <&uart_ao_a_pins>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
};
|
|
||||||
+
|
|
||||||
+&usb0 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts
|
|
||||||
index 1b8f328..6338e6c 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts
|
|
||||||
@@ -251,3 +251,7 @@
|
|
||||||
pinctrl-0 = <&uart_ao_a_pins>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
};
|
|
||||||
+
|
|
||||||
+&usb0 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi
|
|
||||||
index 129af90..7a1c20e 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi
|
|
||||||
@@ -173,3 +173,7 @@
|
|
||||||
pinctrl-0 = <&uart_ao_a_pins>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
};
|
|
||||||
+
|
|
||||||
+&usb0 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
|
||||||
index 32c138e..103575a 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
|
||||||
@@ -397,3 +397,7 @@
|
|
||||||
status = "okay";
|
|
||||||
vref-supply = <&vddio_ao18>;
|
|
||||||
};
|
|
||||||
+
|
|
||||||
+&usb0 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
|
|
||||||
index 22c6977..cfde246 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
|
|
||||||
@@ -215,3 +215,7 @@
|
|
||||||
pinctrl-0 = <&uart_ao_a_pins>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
};
|
|
||||||
+
|
|
||||||
+&usb0 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts
|
|
||||||
index 470f72b..9837a48 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts
|
|
||||||
@@ -237,3 +237,7 @@
|
|
||||||
pinctrl-0 = <&uart_ao_a_pins>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
};
|
|
||||||
+
|
|
||||||
+&usb0 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
From 071f66d1e34243f37f52e09dca13b50e8215a7ce Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
|
||||||
Date: Wed, 20 Sep 2017 18:01:26 +0200
|
|
||||||
Subject: [PATCH 29/39] ARM64: dts: meson-gxl: add sound-dai-cells to HDMI node
|
|
||||||
|
|
||||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
|
||||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
---
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
|
|
||||||
index 9d2fb46..4a1bd89 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
|
|
||||||
@@ -294,6 +294,7 @@
|
|
||||||
<&clkc CLKID_CLK81>,
|
|
||||||
<&clkc CLKID_GCLK_VENCI_INT0>;
|
|
||||||
clock-names = "isfr", "iahb", "venci";
|
|
||||||
+ #sound-dai-cells = <0>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&hiubus {
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,228 +0,0 @@
|
|||||||
From 29e058408d62384dc3de4e0b63433d7dfdee068b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
Date: Mon, 28 Aug 2017 12:01:09 +0200
|
|
||||||
Subject: [PATCH 30/39] ARM64: dts: meson-gxl: Take eMMC data strobe out of
|
|
||||||
eMMC pins
|
|
||||||
|
|
||||||
Since the Data Strobe pin is optional, take it out of the default
|
|
||||||
eMMC pins and add a separate entry.
|
|
||||||
|
|
||||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
---
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 10 ++++++++--
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 10 ++++++++--
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts | 2 +-
|
|
||||||
14 files changed, 28 insertions(+), 16 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
|
|
||||||
index 7ce9a62..7f59f30 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
|
|
||||||
@@ -213,7 +213,7 @@
|
|
||||||
/* eMMC */
|
|
||||||
&sd_emmc_c {
|
|
||||||
status = "okay";
|
|
||||||
- pinctrl-0 = <&emmc_pins>;
|
|
||||||
+ pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
|
|
||||||
pinctrl-1 = <&emmc_clk_gate_pins>;
|
|
||||||
pinctrl-names = "default", "clk-gate";
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
|
||||||
index 4b17a76..a42c8f4 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
|
||||||
@@ -302,7 +302,7 @@
|
|
||||||
/* eMMC */
|
|
||||||
&sd_emmc_c {
|
|
||||||
status = "disabled";
|
|
||||||
- pinctrl-0 = <&emmc_pins>;
|
|
||||||
+ pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
|
|
||||||
pinctrl-1 = <&emmc_clk_gate_pins>;
|
|
||||||
pinctrl-names = "default", "clk-gate";
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts
|
|
||||||
index 38dfdde..9a77323 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts
|
|
||||||
@@ -272,7 +272,7 @@
|
|
||||||
/* eMMC */
|
|
||||||
&sd_emmc_c {
|
|
||||||
status = "okay";
|
|
||||||
- pinctrl-0 = <&emmc_pins>;
|
|
||||||
+ pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
|
|
||||||
pinctrl-1 = <&emmc_clk_gate_pins>;
|
|
||||||
pinctrl-names = "default", "clk-gate";
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
|
||||||
index c3a7b7f..4221e1f 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
|
||||||
@@ -271,7 +271,7 @@
|
|
||||||
/* eMMC */
|
|
||||||
&sd_emmc_c {
|
|
||||||
status = "okay";
|
|
||||||
- pinctrl-0 = <&emmc_pins>;
|
|
||||||
+ pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
|
|
||||||
pinctrl-1 = <&emmc_clk_gate_pins>;
|
|
||||||
pinctrl-names = "default", "clk-gate";
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
|
|
||||||
index 23c08c3..932158a 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
|
|
||||||
@@ -242,7 +242,7 @@
|
|
||||||
/* eMMC */
|
|
||||||
&sd_emmc_c {
|
|
||||||
status = "okay";
|
|
||||||
- pinctrl-0 = <&emmc_pins>;
|
|
||||||
+ pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
|
|
||||||
pinctrl-1 = <&emmc_clk_gate_pins>;
|
|
||||||
pinctrl-names = "default", "clk-gate";
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
|
|
||||||
index f2bc6de..1fe8e24 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
|
|
||||||
@@ -199,7 +199,7 @@
|
|
||||||
/* eMMC */
|
|
||||||
&sd_emmc_c {
|
|
||||||
status = "okay";
|
|
||||||
- pinctrl-0 = <&emmc_pins>;
|
|
||||||
+ pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
|
|
||||||
pinctrl-1 = <&emmc_clk_gate_pins>;
|
|
||||||
pinctrl-names = "default", "clk-gate";
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
|
|
||||||
index 7d38d55..ef12d67 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
|
|
||||||
@@ -390,8 +390,14 @@
|
|
||||||
mux {
|
|
||||||
groups = "emmc_nand_d07",
|
|
||||||
"emmc_cmd",
|
|
||||||
- "emmc_clk",
|
|
||||||
- "emmc_ds";
|
|
||||||
+ "emmc_clk";
|
|
||||||
+ function = "emmc";
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ emmc_ds_pins: emmc-ds {
|
|
||||||
+ mux {
|
|
||||||
+ groups = "emmc_ds";
|
|
||||||
function = "emmc";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts
|
|
||||||
index 6f2cd8e..5eaafa1 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts
|
|
||||||
@@ -141,7 +141,7 @@
|
|
||||||
/* eMMC */
|
|
||||||
&sd_emmc_c {
|
|
||||||
status = "okay";
|
|
||||||
- pinctrl-0 = <&emmc_pins>;
|
|
||||||
+ pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
|
|
||||||
pinctrl-1 = <&emmc_clk_gate_pins>;
|
|
||||||
pinctrl-names = "default", "clk-gate";
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
|
|
||||||
index 4035891..942fd70 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
|
|
||||||
@@ -221,7 +221,7 @@
|
|
||||||
/* eMMC */
|
|
||||||
&sd_emmc_c {
|
|
||||||
status = "okay";
|
|
||||||
- pinctrl-0 = <&emmc_pins>;
|
|
||||||
+ pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
|
|
||||||
pinctrl-1 = <&emmc_clk_gate_pins>;
|
|
||||||
pinctrl-names = "default", "clk-gate";
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts
|
|
||||||
index 6338e6c..0fdebcc 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts
|
|
||||||
@@ -229,7 +229,7 @@
|
|
||||||
/* eMMC */
|
|
||||||
&sd_emmc_c {
|
|
||||||
status = "okay";
|
|
||||||
- pinctrl-0 = <&emmc_pins>;
|
|
||||||
+ pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
|
|
||||||
pinctrl-1 = <&emmc_clk_gate_pins>;
|
|
||||||
pinctrl-names = "default", "clk-gate";
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi
|
|
||||||
index 7a1c20e..0a2be82 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi
|
|
||||||
@@ -135,7 +135,7 @@
|
|
||||||
/* eMMC */
|
|
||||||
&sd_emmc_c {
|
|
||||||
status = "okay";
|
|
||||||
- pinctrl-0 = <&emmc_pins>;
|
|
||||||
+ pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
|
|
||||||
pinctrl-1 = <&emmc_clk_gate_pins>;
|
|
||||||
pinctrl-names = "default", "clk-gate";
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
|
|
||||||
index 4a1bd89..02b52b6 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
|
|
||||||
@@ -343,8 +343,14 @@
|
|
||||||
mux {
|
|
||||||
groups = "emmc_nand_d07",
|
|
||||||
"emmc_cmd",
|
|
||||||
- "emmc_clk",
|
|
||||||
- "emmc_ds";
|
|
||||||
+ "emmc_clk";
|
|
||||||
+ function = "emmc";
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ emmc_ds_pins: emmc-ds {
|
|
||||||
+ mux {
|
|
||||||
+ groups = "emmc_ds";
|
|
||||||
function = "emmc";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
|
|
||||||
index cfde246..e70b5e2 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
|
|
||||||
@@ -193,7 +193,7 @@
|
|
||||||
/* eMMC */
|
|
||||||
&sd_emmc_c {
|
|
||||||
status = "okay";
|
|
||||||
- pinctrl-0 = <&emmc_pins>;
|
|
||||||
+ pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
|
|
||||||
pinctrl-1 = <&emmc_clk_gate_pins>;
|
|
||||||
pinctrl-names = "default", "clk-gate";
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts
|
|
||||||
index 9837a48..9593a28 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts
|
|
||||||
@@ -216,7 +216,7 @@
|
|
||||||
/* eMMC */
|
|
||||||
&sd_emmc_c {
|
|
||||||
status = "okay";
|
|
||||||
- pinctrl-0 = <&emmc_pins>;
|
|
||||||
+ pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
|
|
||||||
bus-width = <8>;
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,173 +0,0 @@
|
|||||||
From 07b467abf6efad25e12ad4c09a008e9f1594e39d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
Date: Mon, 16 Oct 2017 15:33:30 +0200
|
|
||||||
Subject: [PATCH 32/39] ARM64: dts: meson-gx: Add HDMI_5V regulator on selected
|
|
||||||
boards
|
|
||||||
|
|
||||||
On reference boards and derivatives, the HDMI Logic is powered by an external
|
|
||||||
5V regulator.
|
|
||||||
This regulator was set by the Vendor U-Boot, add the regulator and phandle
|
|
||||||
property to the HDMI node.
|
|
||||||
|
|
||||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
---
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 12 ++++++++++++
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts | 1 +
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 1 +
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 12 ++++++++++++
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts | 1 +
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi | 11 +++++++++++
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 12 ++++++++++++
|
|
||||||
7 files changed, 50 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
|
|
||||||
index 7f59f30..979abaf 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
|
|
||||||
@@ -59,6 +59,17 @@
|
|
||||||
reg = <0x0 0x0 0x0 0x80000000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
+ hdmi_5v: regulator-hdmi-5v {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+
|
|
||||||
+ regulator-name = "HDMI_5V";
|
|
||||||
+ regulator-min-microvolt = <5000000>;
|
|
||||||
+ regulator-max-microvolt = <5000000>;
|
|
||||||
+
|
|
||||||
+ gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ enable-active-high;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
vddio_boot: regulator-vddio_boot {
|
|
||||||
compatible = "regulator-fixed";
|
|
||||||
regulator-name = "VDDIO_BOOT";
|
|
||||||
@@ -142,6 +153,7 @@
|
|
||||||
status = "okay";
|
|
||||||
pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
+ hdmi-supply = <&hdmi_5v>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&hdmi_tx_tmds_port {
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts
|
|
||||||
index 6827f23..8bc540e 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts
|
|
||||||
@@ -135,6 +135,7 @@
|
|
||||||
status = "okay";
|
|
||||||
pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
+ hdmi-supply = <&hdmi_5v>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&hdmi_tx_tmds_port {
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
|
|
||||||
index 89a5fd9..f7b37de 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
|
|
||||||
@@ -78,6 +78,7 @@
|
|
||||||
status = "okay";
|
|
||||||
pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
+ hdmi-supply = <&hdmi_5v>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&hdmi_tx_tmds_port {
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
|
|
||||||
index 942fd70..0c4ed4e 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
|
|
||||||
@@ -72,6 +72,17 @@
|
|
||||||
reg = <0x0 0x0 0x0 0x80000000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
+ hdmi_5v: regulator-hdmi-5v {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+
|
|
||||||
+ regulator-name = "HDMI_5V";
|
|
||||||
+ regulator-min-microvolt = <5000000>;
|
|
||||||
+ regulator-max-microvolt = <5000000>;
|
|
||||||
+
|
|
||||||
+ gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ enable-active-high;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
vcc_3v3: regulator-vcc_3v3 {
|
|
||||||
compatible = "regulator-fixed";
|
|
||||||
regulator-name = "VCC_3V3";
|
|
||||||
@@ -131,6 +142,7 @@
|
|
||||||
status = "okay";
|
|
||||||
pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
+ hdmi-supply = <&hdmi_5v>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&hdmi_tx_tmds_port {
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts
|
|
||||||
index 6e2bf85..4f6b1c9 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts
|
|
||||||
@@ -88,6 +88,7 @@
|
|
||||||
status = "okay";
|
|
||||||
pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
+ hdmi-supply = <&hdmi_5v>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&hdmi_tx_tmds_port {
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi
|
|
||||||
index 0a2be82..1a5136a 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi
|
|
||||||
@@ -28,6 +28,17 @@
|
|
||||||
reg = <0x0 0x0 0x0 0x80000000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
+ hdmi_5v: regulator-hdmi-5v {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+
|
|
||||||
+ regulator-name = "HDMI_5V";
|
|
||||||
+ regulator-min-microvolt = <5000000>;
|
|
||||||
+ regulator-max-microvolt = <5000000>;
|
|
||||||
+
|
|
||||||
+ gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ enable-active-high;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
vddio_boot: regulator-vddio_boot {
|
|
||||||
compatible = "regulator-fixed";
|
|
||||||
regulator-name = "VDDIO_BOOT";
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
|
||||||
index 103575a..4537a81 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
|
||||||
@@ -153,6 +153,17 @@
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
+ hdmi_5v: regulator-hdmi-5v {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+
|
|
||||||
+ regulator-name = "HDMI_5V";
|
|
||||||
+ regulator-min-microvolt = <5000000>;
|
|
||||||
+ regulator-max-microvolt = <5000000>;
|
|
||||||
+
|
|
||||||
+ gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ enable-active-high;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
vcc_3v3: regulator-vcc_3v3 {
|
|
||||||
compatible = "regulator-fixed";
|
|
||||||
regulator-name = "VCC_3V3";
|
|
||||||
@@ -239,6 +250,7 @@
|
|
||||||
status = "okay";
|
|
||||||
pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
+ hdmi-supply = <&hdmi_5v>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&hdmi_tx_tmds_port {
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -522,61 +522,6 @@ index 4f6b1c9..f23f148 100644
|
|||||||
&cvbs_vdac_port {
|
&cvbs_vdac_port {
|
||||||
cvbs_vdac_out: endpoint {
|
cvbs_vdac_out: endpoint {
|
||||||
remote-endpoint = <&cvbs_connector_in>;
|
remote-endpoint = <&cvbs_connector_in>;
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
|
||||||
index 4537a81..aed2a54 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
|
||||||
@@ -88,6 +88,31 @@
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
+ sound {
|
|
||||||
+ compatible = "simple-audio-card";
|
|
||||||
+ simple-audio-card,name = "meson-gx-preview";
|
|
||||||
+ status = "okay";
|
|
||||||
+
|
|
||||||
+ simple-audio-card,dai-link@0 {
|
|
||||||
+ /* HDMI Output */
|
|
||||||
+ format = "i2s";
|
|
||||||
+ mclk-fs = <256>;
|
|
||||||
+ bitclock-master = <&i2s_dai>;
|
|
||||||
+ frame-master = <&i2s_dai>;
|
|
||||||
+ plat {
|
|
||||||
+ sound-dai = <&aiu_i2s_dma>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ cpu {
|
|
||||||
+ sound-dai = <&i2s_dai>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ codec {
|
|
||||||
+ sound-dai = <&hdmi_tx>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
pwmleds {
|
|
||||||
compatible = "pwm-leds";
|
|
||||||
|
|
||||||
@@ -207,6 +232,18 @@
|
|
||||||
hdmi-phandle = <&hdmi_tx>;
|
|
||||||
};
|
|
||||||
|
|
||||||
+&audio {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&aiu_i2s_dma {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&i2s_dai {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
&cpu0 {
|
|
||||||
cooling-min-level = <0>;
|
|
||||||
cooling-max-level = <6>;
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
|
||||||
index e70b5e2..8444f79 100644
|
index e70b5e2..8444f79 100644
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
|
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
|
||||||
|
@ -1,132 +0,0 @@
|
|||||||
From 9afb9faf483008a1d16202818d895099e5c932bb Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
|
||||||
Date: Fri, 8 Dec 2017 12:08:11 +0100
|
|
||||||
Subject: [PATCH 36/39] net: phy: meson-gxl: detect LPA corruption
|
|
||||||
|
|
||||||
The purpose of this change is to fix the incorrect detection of the link
|
|
||||||
partner (LP) advertised capabilities which sometimes happens with this PHY
|
|
||||||
(roughly 1 time in a dozen)
|
|
||||||
|
|
||||||
This issue may cause the link to be negotiated at 10Mbps/Full or
|
|
||||||
10Mbps/Half when 100MBps/Full is actually possible. In some case, the link
|
|
||||||
is even completely broken and no communication is possible.
|
|
||||||
|
|
||||||
To detect the corruption, we must look for a magic undocumented bit in the
|
|
||||||
WOL bank (hint given by the SoC vendor kernel) but this is not enough to
|
|
||||||
cover all cases. We also have to look at the LPA ack. If the LP supports
|
|
||||||
Aneg but did not ack our base code when aneg is completed, we assume
|
|
||||||
something went wrong.
|
|
||||||
|
|
||||||
The detection of a corrupted LPA triggers a restart of the aneg process.
|
|
||||||
This solves the problem but may take up to 6 retries to complete.
|
|
||||||
|
|
||||||
Fixes: 7334b3e47aee ("net: phy: Add Meson GXL Internal PHY driver")
|
|
||||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
|
||||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
||||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
---
|
|
||||||
drivers/net/phy/meson-gxl.c | 74 ++++++++++++++++++++++++++++++++++++++++++++-
|
|
||||||
1 file changed, 73 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/net/phy/meson-gxl.c b/drivers/net/phy/meson-gxl.c
|
|
||||||
index 7ddb709..b21f607 100644
|
|
||||||
--- a/drivers/net/phy/meson-gxl.c
|
|
||||||
+++ b/drivers/net/phy/meson-gxl.c
|
|
||||||
@@ -22,6 +22,7 @@
|
|
||||||
#include <linux/ethtool.h>
|
|
||||||
#include <linux/phy.h>
|
|
||||||
#include <linux/netdevice.h>
|
|
||||||
+#include <linux/bitfield.h>
|
|
||||||
|
|
||||||
static int meson_gxl_config_init(struct phy_device *phydev)
|
|
||||||
{
|
|
||||||
@@ -76,6 +77,77 @@ static int meson_gxl_config_init(struct phy_device *phydev)
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* This function is provided to cope with the possible failures of this phy
|
|
||||||
+ * during aneg process. When aneg fails, the PHY reports that aneg is done
|
|
||||||
+ * but the value found in MII_LPA is wrong:
|
|
||||||
+ * - Early failures: MII_LPA is just 0x0001. if MII_EXPANSION reports that
|
|
||||||
+ * the link partner (LP) supports aneg but the LP never acked our base
|
|
||||||
+ * code word, it is likely that we never sent it to begin with.
|
|
||||||
+ * - Late failures: MII_LPA is filled with a value which seems to make sense
|
|
||||||
+ * but it actually is not what the LP is advertising. It seems that we
|
|
||||||
+ * can detect this using a magic bit in the WOL bank (reg 12 - bit 12).
|
|
||||||
+ * If this particular bit is not set when aneg is reported being done,
|
|
||||||
+ * it means MII_LPA is likely to be wrong.
|
|
||||||
+ *
|
|
||||||
+ * In both case, forcing a restart of the aneg process solve the problem.
|
|
||||||
+ * When this failure happens, the first retry is usually successful but,
|
|
||||||
+ * in some cases, it may take up to 6 retries to get a decent result
|
|
||||||
+ */
|
|
||||||
+int meson_gxl_read_status(struct phy_device *phydev)
|
|
||||||
+{
|
|
||||||
+ int ret, wol, lpa, exp;
|
|
||||||
+
|
|
||||||
+ if (phydev->autoneg == AUTONEG_ENABLE) {
|
|
||||||
+ ret = genphy_aneg_done(phydev);
|
|
||||||
+ if (ret < 0)
|
|
||||||
+ return ret;
|
|
||||||
+ else if (!ret)
|
|
||||||
+ goto read_status_continue;
|
|
||||||
+
|
|
||||||
+ /* Need to access WOL bank, make sure the access is open */
|
|
||||||
+ ret = phy_write(phydev, 0x14, 0x0000);
|
|
||||||
+ if (ret)
|
|
||||||
+ return ret;
|
|
||||||
+ ret = phy_write(phydev, 0x14, 0x0400);
|
|
||||||
+ if (ret)
|
|
||||||
+ return ret;
|
|
||||||
+ ret = phy_write(phydev, 0x14, 0x0000);
|
|
||||||
+ if (ret)
|
|
||||||
+ return ret;
|
|
||||||
+ ret = phy_write(phydev, 0x14, 0x0400);
|
|
||||||
+ if (ret)
|
|
||||||
+ return ret;
|
|
||||||
+
|
|
||||||
+ /* Request LPI_STATUS WOL register */
|
|
||||||
+ ret = phy_write(phydev, 0x14, 0x8D80);
|
|
||||||
+ if (ret)
|
|
||||||
+ return ret;
|
|
||||||
+
|
|
||||||
+ /* Read LPI_STATUS value */
|
|
||||||
+ wol = phy_read(phydev, 0x15);
|
|
||||||
+ if (wol < 0)
|
|
||||||
+ return wol;
|
|
||||||
+
|
|
||||||
+ lpa = phy_read(phydev, MII_LPA);
|
|
||||||
+ if (lpa < 0)
|
|
||||||
+ return lpa;
|
|
||||||
+
|
|
||||||
+ exp = phy_read(phydev, MII_EXPANSION);
|
|
||||||
+ if (exp < 0)
|
|
||||||
+ return exp;
|
|
||||||
+
|
|
||||||
+ if (!(wol & BIT(12)) ||
|
|
||||||
+ ((exp & EXPANSION_NWAY) && !(lpa & LPA_LPACK))) {
|
|
||||||
+ /* Looks like aneg failed after all */
|
|
||||||
+ phydev_dbg(phydev, "LPA corruption - aneg restart\n");
|
|
||||||
+ return genphy_restart_aneg(phydev);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+read_status_continue:
|
|
||||||
+ return genphy_read_status(phydev);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static struct phy_driver meson_gxl_phy[] = {
|
|
||||||
{
|
|
||||||
.phy_id = 0x01814400,
|
|
||||||
@@ -86,7 +158,7 @@ static struct phy_driver meson_gxl_phy[] = {
|
|
||||||
.config_init = meson_gxl_config_init,
|
|
||||||
.config_aneg = genphy_config_aneg,
|
|
||||||
.aneg_done = genphy_aneg_done,
|
|
||||||
- .read_status = genphy_read_status,
|
|
||||||
+ .read_status = meson_gxl_read_status,
|
|
||||||
.suspend = genphy_suspend,
|
|
||||||
.resume = genphy_resume,
|
|
||||||
},
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,71 +0,0 @@
|
|||||||
From 61ceaf782220a596ac845483d00d50752f7c6e14 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
Date: Thu, 15 Feb 2018 10:38:47 +0100
|
|
||||||
Subject: [PATCH 37/39] drm/meson: fix vsync buffer update
|
|
||||||
|
|
||||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
---
|
|
||||||
drivers/gpu/drm/meson/meson_crtc.c | 6 ++++++
|
|
||||||
drivers/gpu/drm/meson/meson_drv.h | 3 +++
|
|
||||||
drivers/gpu/drm/meson/meson_plane.c | 7 +++----
|
|
||||||
3 files changed, 12 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/gpu/drm/meson/meson_crtc.c b/drivers/gpu/drm/meson/meson_crtc.c
|
|
||||||
index 5155f01..0552020 100644
|
|
||||||
--- a/drivers/gpu/drm/meson/meson_crtc.c
|
|
||||||
+++ b/drivers/gpu/drm/meson/meson_crtc.c
|
|
||||||
@@ -36,6 +36,7 @@
|
|
||||||
#include "meson_venc.h"
|
|
||||||
#include "meson_vpp.h"
|
|
||||||
#include "meson_viu.h"
|
|
||||||
+#include "meson_canvas.h"
|
|
||||||
#include "meson_registers.h"
|
|
||||||
|
|
||||||
/* CRTC definition */
|
|
||||||
@@ -192,6 +193,11 @@ void meson_crtc_irq(struct meson_drm *priv)
|
|
||||||
} else
|
|
||||||
meson_vpp_disable_interlace_vscaler_osd1(priv);
|
|
||||||
|
|
||||||
+ meson_canvas_setup(priv, MESON_CANVAS_ID_OSD1,
|
|
||||||
+ priv->viu.osd1_addr, priv->viu.osd1_stride,
|
|
||||||
+ priv->viu.osd1_height, MESON_CANVAS_WRAP_NONE,
|
|
||||||
+ MESON_CANVAS_BLKMODE_LINEAR);
|
|
||||||
+
|
|
||||||
/* Enable OSD1 */
|
|
||||||
writel_bits_relaxed(VPP_OSD1_POSTBLEND, VPP_OSD1_POSTBLEND,
|
|
||||||
priv->io_base + _REG(VPP_MISC));
|
|
||||||
diff --git a/drivers/gpu/drm/meson/meson_drv.h b/drivers/gpu/drm/meson/meson_drv.h
|
|
||||||
index 5e8b392..8450d6ac 100644
|
|
||||||
--- a/drivers/gpu/drm/meson/meson_drv.h
|
|
||||||
+++ b/drivers/gpu/drm/meson/meson_drv.h
|
|
||||||
@@ -43,6 +43,9 @@ struct meson_drm {
|
|
||||||
bool osd1_commit;
|
|
||||||
uint32_t osd1_ctrl_stat;
|
|
||||||
uint32_t osd1_blk0_cfg[5];
|
|
||||||
+ uint32_t osd1_addr;
|
|
||||||
+ uint32_t osd1_stride;
|
|
||||||
+ uint32_t osd1_height;
|
|
||||||
} viu;
|
|
||||||
|
|
||||||
struct {
|
|
||||||
diff --git a/drivers/gpu/drm/meson/meson_plane.c b/drivers/gpu/drm/meson/meson_plane.c
|
|
||||||
index 17e96fa..0b6011b 100644
|
|
||||||
--- a/drivers/gpu/drm/meson/meson_plane.c
|
|
||||||
+++ b/drivers/gpu/drm/meson/meson_plane.c
|
|
||||||
@@ -164,10 +164,9 @@ static void meson_plane_atomic_update(struct drm_plane *plane,
|
|
||||||
/* Update Canvas with buffer address */
|
|
||||||
gem = drm_fb_cma_get_gem_obj(fb, 0);
|
|
||||||
|
|
||||||
- meson_canvas_setup(priv, MESON_CANVAS_ID_OSD1,
|
|
||||||
- gem->paddr, fb->pitches[0],
|
|
||||||
- fb->height, MESON_CANVAS_WRAP_NONE,
|
|
||||||
- MESON_CANVAS_BLKMODE_LINEAR);
|
|
||||||
+ priv->viu.osd1_addr = gem->paddr;
|
|
||||||
+ priv->viu.osd1_stride = fb->pitches[0];
|
|
||||||
+ priv->viu.osd1_height = fb->height;
|
|
||||||
|
|
||||||
spin_unlock_irqrestore(&priv->drm->event_lock, flags);
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -18,7 +18,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
|||||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2/hassos-hook.sh"
|
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2/hassos-hook.sh"
|
||||||
BR2_LINUX_KERNEL=y
|
BR2_LINUX_KERNEL=y
|
||||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.14.36"
|
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.14.67"
|
||||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2/kernel.config"
|
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2/kernel.config"
|
||||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos-4_14.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config"
|
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos-4_14.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user