Commit d0ac5d8e authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'armsoc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "We've been sitting on our fixes branch for a while, so this batch is
  unfortunately on the large side.

  A lot of these are tweaks and fixes to device trees, fixing various
  bugs around clocks, reg ranges, etc.  There's also a few defconfig
  updates (which are on the late side, no more of those).

  All in all the diffstat is bigger than ideal at this time, but nothing
  in here seems particularly risky"

* tag 'armsoc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (31 commits)
  reset: sunxi: fix spinlock initialization
  ARM: dts: disable CCI on exynos5420 based arndale-octa
  drivers: bus: check cci device tree node status
  ARM: rockchip: disable jtag/sdmmc autoswitching on rk3288
  ARM: nomadik: fix up leftover device tree pins
  ARM: at91: board-dt-sama5: add phy_fixup to override NAND_Tree
  ARM: at91/dt: sam9263: Add missing clocks to lcdc node
  ARM: at91: sama5d3: dt: correct the sound route
  ARM: at91/dt: sama5d4: fix the timer reg length
  ARM: exynos_defconfig: Enable LM90 driver
  ARM: exynos_defconfig: Enable options for display panel support
  arm: dts: Use pmu_system_controller phandle for dp phy
  ARM: shmobile: sh73a0 legacy: Set .control_parent for all irqpin instances
  ARM: dts: berlin: correct BG2Q's SM GPIO location.
  ARM: dts: berlin: add broken-cd and set bus width for eMMC in Marvell DMP DT
  ARM: dts: berlin: fix io clk and add missing core clk for BG2Q sdhci2 host
  ARM: dts: Revert disabling of smc91x for n900
  ARM: dts: imx51-babbage: Fix ULPI PHY reset modelling
  ARM: dts: dra7-evm: fix qspi device tree partition size
  ARM: omap2plus_defconfig: use CONFIG_CPUFREQ_DT
  ...
parents 12ba8571 966903a9
...@@ -953,6 +953,8 @@ fb0: fb@0x00700000 { ...@@ -953,6 +953,8 @@ fb0: fb@0x00700000 {
interrupts = <26 IRQ_TYPE_LEVEL_HIGH 3>; interrupts = <26 IRQ_TYPE_LEVEL_HIGH 3>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pinctrl_fb>; pinctrl-0 = <&pinctrl_fb>;
clocks = <&lcd_clk>, <&lcd_clk>;
clock-names = "lcdc_clk", "hclk";
status = "disabled"; status = "disabled";
}; };
......
...@@ -65,6 +65,8 @@ &sdhci1 { ...@@ -65,6 +65,8 @@ &sdhci1 {
}; };
&sdhci2 { &sdhci2 {
broken-cd;
bus-width = <8>;
non-removable; non-removable;
status = "okay"; status = "okay";
}; };
......
...@@ -83,7 +83,8 @@ sdhci2: sdhci@ab1000 { ...@@ -83,7 +83,8 @@ sdhci2: sdhci@ab1000 {
compatible = "mrvl,pxav3-mmc"; compatible = "mrvl,pxav3-mmc";
reg = <0xab1000 0x200>; reg = <0xab1000 0x200>;
interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&chip CLKID_SDIO1XIN>; clocks = <&chip CLKID_NFC_ECC>, <&chip CLKID_NFC>;
clock-names = "io", "core";
status = "disabled"; status = "disabled";
}; };
...@@ -348,36 +349,6 @@ aic: interrupt-controller@3800 { ...@@ -348,36 +349,6 @@ aic: interrupt-controller@3800 {
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
}; };
gpio4: gpio@5000 {
compatible = "snps,dw-apb-gpio";
reg = <0x5000 0x400>;
#address-cells = <1>;
#size-cells = <0>;
porte: gpio-port@4 {
compatible = "snps,dw-apb-gpio-port";
gpio-controller;
#gpio-cells = <2>;
snps,nr-gpios = <32>;
reg = <0>;
};
};
gpio5: gpio@c000 {
compatible = "snps,dw-apb-gpio";
reg = <0xc000 0x400>;
#address-cells = <1>;
#size-cells = <0>;
portf: gpio-port@5 {
compatible = "snps,dw-apb-gpio-port";
gpio-controller;
#gpio-cells = <2>;
snps,nr-gpios = <32>;
reg = <0>;
};
};
}; };
chip: chip-control@ea0000 { chip: chip-control@ea0000 {
...@@ -466,6 +437,21 @@ apb@fc0000 { ...@@ -466,6 +437,21 @@ apb@fc0000 {
ranges = <0 0xfc0000 0x10000>; ranges = <0 0xfc0000 0x10000>;
interrupt-parent = <&sic>; interrupt-parent = <&sic>;
sm_gpio1: gpio@5000 {
compatible = "snps,dw-apb-gpio";
reg = <0x5000 0x400>;
#address-cells = <1>;
#size-cells = <0>;
portf: gpio-port@5 {
compatible = "snps,dw-apb-gpio-port";
gpio-controller;
#gpio-cells = <2>;
snps,nr-gpios = <32>;
reg = <0>;
};
};
i2c2: i2c@7000 { i2c2: i2c@7000 {
compatible = "snps,designware-i2c"; compatible = "snps,designware-i2c";
#address-cells = <1>; #address-cells = <1>;
...@@ -516,6 +502,21 @@ uart1: uart@a000 { ...@@ -516,6 +502,21 @@ uart1: uart@a000 {
status = "disabled"; status = "disabled";
}; };
sm_gpio0: gpio@c000 {
compatible = "snps,dw-apb-gpio";
reg = <0xc000 0x400>;
#address-cells = <1>;
#size-cells = <0>;
porte: gpio-port@4 {
compatible = "snps,dw-apb-gpio-port";
gpio-controller;
#gpio-cells = <2>;
snps,nr-gpios = <32>;
reg = <0>;
};
};
sysctrl: pin-controller@d000 { sysctrl: pin-controller@d000 {
compatible = "marvell,berlin2q-system-ctrl"; compatible = "marvell,berlin2q-system-ctrl";
reg = <0xd000 0x100>; reg = <0xd000 0x100>;
......
...@@ -499,23 +499,23 @@ partition@4 { ...@@ -499,23 +499,23 @@ partition@4 {
}; };
partition@5 { partition@5 {
label = "QSPI.u-boot-spl-os"; label = "QSPI.u-boot-spl-os";
reg = <0x00140000 0x00010000>; reg = <0x00140000 0x00080000>;
}; };
partition@6 { partition@6 {
label = "QSPI.u-boot-env"; label = "QSPI.u-boot-env";
reg = <0x00150000 0x00010000>; reg = <0x001c0000 0x00010000>;
}; };
partition@7 { partition@7 {
label = "QSPI.u-boot-env.backup1"; label = "QSPI.u-boot-env.backup1";
reg = <0x00160000 0x0010000>; reg = <0x001d0000 0x0010000>;
}; };
partition@8 { partition@8 {
label = "QSPI.kernel"; label = "QSPI.kernel";
reg = <0x00170000 0x0800000>; reg = <0x001e0000 0x0800000>;
}; };
partition@9 { partition@9 {
label = "QSPI.file-system"; label = "QSPI.file-system";
reg = <0x00970000 0x01690000>; reg = <0x009e0000 0x01620000>;
}; };
}; };
}; };
......
...@@ -736,7 +736,7 @@ mixer { ...@@ -736,7 +736,7 @@ mixer {
dp_phy: video-phy@10040720 { dp_phy: video-phy@10040720 {
compatible = "samsung,exynos5250-dp-video-phy"; compatible = "samsung,exynos5250-dp-video-phy";
reg = <0x10040720 4>; samsung,pmu-syscon = <&pmu_system_controller>;
#phy-cells = <0>; #phy-cells = <0>;
}; };
......
...@@ -372,3 +372,7 @@ wakeup { ...@@ -372,3 +372,7 @@ wakeup {
&usbdrd_dwc3_1 { &usbdrd_dwc3_1 {
dr_mode = "host"; dr_mode = "host";
}; };
&cci {
status = "disabled";
};
...@@ -120,7 +120,7 @@ cpu7: cpu@103 { ...@@ -120,7 +120,7 @@ cpu7: cpu@103 {
}; };
}; };
cci@10d20000 { cci: cci@10d20000 {
compatible = "arm,cci-400"; compatible = "arm,cci-400";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
...@@ -503,8 +503,8 @@ pwm: pwm@12dd0000 { ...@@ -503,8 +503,8 @@ pwm: pwm@12dd0000 {
}; };
dp_phy: video-phy@10040728 { dp_phy: video-phy@10040728 {
compatible = "samsung,exynos5250-dp-video-phy"; compatible = "samsung,exynos5420-dp-video-phy";
reg = <0x10040728 4>; samsung,pmu-syscon = <&pmu_system_controller>;
#phy-cells = <0>; #phy-cells = <0>;
}; };
......
...@@ -162,7 +162,7 @@ spi1: cspi@43fa4000 { ...@@ -162,7 +162,7 @@ spi1: cspi@43fa4000 {
#size-cells = <0>; #size-cells = <0>;
compatible = "fsl,imx25-cspi", "fsl,imx35-cspi"; compatible = "fsl,imx25-cspi", "fsl,imx35-cspi";
reg = <0x43fa4000 0x4000>; reg = <0x43fa4000 0x4000>;
clocks = <&clks 62>, <&clks 62>; clocks = <&clks 78>, <&clks 78>;
clock-names = "ipg", "per"; clock-names = "ipg", "per";
interrupts = <14>; interrupts = <14>;
status = "disabled"; status = "disabled";
......
...@@ -127,24 +127,12 @@ regulators { ...@@ -127,24 +127,12 @@ regulators {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
reg_usbh1_vbus: regulator@0 { reg_hub_reset: regulator@0 {
compatible = "regulator-fixed";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbh1reg>;
reg = <0>;
regulator-name = "usbh1_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio2 5 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
reg_usbotg_vbus: regulator@1 {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbotgreg>; pinctrl-0 = <&pinctrl_usbotgreg>;
reg = <1>; reg = <0>;
regulator-name = "usbotg_vbus"; regulator-name = "hub_reset";
regulator-min-microvolt = <5000000>; regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>; regulator-max-microvolt = <5000000>;
gpio = <&gpio1 7 GPIO_ACTIVE_HIGH>; gpio = <&gpio1 7 GPIO_ACTIVE_HIGH>;
...@@ -176,6 +164,7 @@ usbh1phy: usbh1phy@0 { ...@@ -176,6 +164,7 @@ usbh1phy: usbh1phy@0 {
reg = <0>; reg = <0>;
clocks = <&clks IMX5_CLK_DUMMY>; clocks = <&clks IMX5_CLK_DUMMY>;
clock-names = "main_clk"; clock-names = "main_clk";
reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
}; };
}; };
}; };
...@@ -419,7 +408,7 @@ &uart3 { ...@@ -419,7 +408,7 @@ &uart3 {
&usbh1 { &usbh1 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbh1>; pinctrl-0 = <&pinctrl_usbh1>;
vbus-supply = <&reg_usbh1_vbus>; vbus-supply = <&reg_hub_reset>;
fsl,usbphy = <&usbh1phy>; fsl,usbphy = <&usbh1phy>;
phy_type = "ulpi"; phy_type = "ulpi";
status = "okay"; status = "okay";
...@@ -429,7 +418,6 @@ &usbotg { ...@@ -429,7 +418,6 @@ &usbotg {
dr_mode = "otg"; dr_mode = "otg";
disable-over-current; disable-over-current;
phy_type = "utmi_wide"; phy_type = "utmi_wide";
vbus-supply = <&reg_usbotg_vbus>;
status = "okay"; status = "okay";
}; };
......
...@@ -335,8 +335,8 @@ spba@0203c000 { ...@@ -335,8 +335,8 @@ spba@0203c000 {
vpu: vpu@02040000 { vpu: vpu@02040000 {
compatible = "cnm,coda960"; compatible = "cnm,coda960";
reg = <0x02040000 0x3c000>; reg = <0x02040000 0x3c000>;
interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>, interrupts = <0 12 IRQ_TYPE_LEVEL_HIGH>,
<0 12 IRQ_TYPE_LEVEL_HIGH>; <0 3 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "bit", "jpeg"; interrupt-names = "bit", "jpeg";
clocks = <&clks IMX6QDL_CLK_VPU_AXI>, clocks = <&clks IMX6QDL_CLK_VPU_AXI>,
<&clks IMX6QDL_CLK_MMDC_CH0_AXI>, <&clks IMX6QDL_CLK_MMDC_CH0_AXI>,
......
...@@ -142,6 +142,7 @@ esdhc: esdhc@1560000 { ...@@ -142,6 +142,7 @@ esdhc: esdhc@1560000 {
scfg: scfg@1570000 { scfg: scfg@1570000 {
compatible = "fsl,ls1021a-scfg", "syscon"; compatible = "fsl,ls1021a-scfg", "syscon";
reg = <0x0 0x1570000 0x0 0x10000>; reg = <0x0 0x1570000 0x0 0x10000>;
big-endian;
}; };
clockgen: clocking@1ee1000 { clockgen: clocking@1ee1000 {
......
...@@ -700,11 +700,9 @@ partition@5 { ...@@ -700,11 +700,9 @@ partition@5 {
}; };
}; };
/* Ethernet is on some early development boards and qemu */
ethernet@gpmc { ethernet@gpmc {
compatible = "smsc,lan91c94"; compatible = "smsc,lan91c94";
status = "disabled";
interrupt-parent = <&gpio2>; interrupt-parent = <&gpio2>;
interrupts = <22 IRQ_TYPE_LEVEL_HIGH>; /* gpio54 */ interrupts = <22 IRQ_TYPE_LEVEL_HIGH>; /* gpio54 */
reg = <1 0x300 0xf>; /* 16 byte IO range at offset 0x300 */ reg = <1 0x300 0xf>; /* 16 byte IO range at offset 0x300 */
......
...@@ -155,6 +155,15 @@ &tsadc { ...@@ -155,6 +155,15 @@ &tsadc {
}; };
&pinctrl { &pinctrl {
pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
drive-strength = <8>;
};
pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
bias-pull-up;
drive-strength = <8>;
};
backlight { backlight {
bl_en: bl-en { bl_en: bl-en {
rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>; rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>;
...@@ -173,6 +182,27 @@ pmic_int: pmic-int { ...@@ -173,6 +182,27 @@ pmic_int: pmic-int {
}; };
}; };
sdmmc {
/*
* Default drive strength isn't enough to achieve even
* high-speed mode on EVB board so bump up to 8ma.
*/
sdmmc_bus4: sdmmc-bus4 {
rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
<6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
<6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
<6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
};
sdmmc_clk: sdmmc-clk {
rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_drv_8ma>;
};
sdmmc_cmd: sdmmc-cmd {
rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
};
};
usb { usb {
host_vbus_drv: host-vbus-drv { host_vbus_drv: host-vbus-drv {
rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>; rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
......
...@@ -176,7 +176,7 @@ sound { ...@@ -176,7 +176,7 @@ sound {
"Headphone Jack", "HPOUTR", "Headphone Jack", "HPOUTR",
"IN2L", "Line In Jack", "IN2L", "Line In Jack",
"IN2R", "Line In Jack", "IN2R", "Line In Jack",
"MICBIAS", "IN1L", "Mic", "MICBIAS",
"IN1L", "Mic"; "IN1L", "Mic";
atmel,ssc-controller = <&ssc0>; atmel,ssc-controller = <&ssc0>;
......
...@@ -1008,7 +1008,7 @@ shdwc@fc068610 { ...@@ -1008,7 +1008,7 @@ shdwc@fc068610 {
pit: timer@fc068630 { pit: timer@fc068630 {
compatible = "atmel,at91sam9260-pit"; compatible = "atmel,at91sam9260-pit";
reg = <0xfc068630 0xf>; reg = <0xfc068630 0x10>;
interrupts = <3 IRQ_TYPE_LEVEL_HIGH 5>; interrupts = <3 IRQ_TYPE_LEVEL_HIGH 5>;
clocks = <&h32ck>; clocks = <&h32ck>;
}; };
......
...@@ -25,11 +25,11 @@ pinctrl { ...@@ -25,11 +25,11 @@ pinctrl {
stmpe2401_1 { stmpe2401_1 {
stmpe2401_1_nhk_mode: stmpe2401_1_nhk { stmpe2401_1_nhk_mode: stmpe2401_1_nhk {
nhk_cfg1 { nhk_cfg1 {
ste,pins = "GPIO76_B20"; // IRQ line pins = "GPIO76_B20"; // IRQ line
ste,input = <0>; ste,input = <0>;
}; };
nhk_cfg2 { nhk_cfg2 {
ste,pins = "GPIO77_B8"; // reset line pins = "GPIO77_B8"; // reset line
ste,output = <1>; ste,output = <1>;
}; };
}; };
...@@ -37,11 +37,11 @@ nhk_cfg2 { ...@@ -37,11 +37,11 @@ nhk_cfg2 {
stmpe2401_2 { stmpe2401_2 {
stmpe2401_2_nhk_mode: stmpe2401_2_nhk { stmpe2401_2_nhk_mode: stmpe2401_2_nhk {
nhk_cfg1 { nhk_cfg1 {
ste,pins = "GPIO78_A8"; // IRQ line pins = "GPIO78_A8"; // IRQ line
ste,input = <0>; ste,input = <0>;
}; };
nhk_cfg2 { nhk_cfg2 {
ste,pins = "GPIO79_C9"; // reset line pins = "GPIO79_C9"; // reset line
ste,output = <1>; ste,output = <1>;
}; };
}; };
......
...@@ -84,7 +84,8 @@ CONFIG_DEBUG_GPIO=y ...@@ -84,7 +84,8 @@ CONFIG_DEBUG_GPIO=y
CONFIG_POWER_SUPPLY=y CONFIG_POWER_SUPPLY=y
CONFIG_BATTERY_SBS=y CONFIG_BATTERY_SBS=y
CONFIG_CHARGER_TPS65090=y CONFIG_CHARGER_TPS65090=y
# CONFIG_HWMON is not set CONFIG_HWMON=y
CONFIG_SENSORS_LM90=y
CONFIG_THERMAL=y CONFIG_THERMAL=y
CONFIG_EXYNOS_THERMAL=y CONFIG_EXYNOS_THERMAL=y
CONFIG_EXYNOS_THERMAL_CORE=y CONFIG_EXYNOS_THERMAL_CORE=y
...@@ -109,11 +110,26 @@ CONFIG_REGULATOR_S2MPA01=y ...@@ -109,11 +110,26 @@ CONFIG_REGULATOR_S2MPA01=y
CONFIG_REGULATOR_S2MPS11=y CONFIG_REGULATOR_S2MPS11=y
CONFIG_REGULATOR_S5M8767=y CONFIG_REGULATOR_S5M8767=y
CONFIG_REGULATOR_TPS65090=y CONFIG_REGULATOR_TPS65090=y
CONFIG_DRM=y
CONFIG_DRM_BRIDGE=y
CONFIG_DRM_PTN3460=y
CONFIG_DRM_PS8622=y
CONFIG_DRM_EXYNOS=y
CONFIG_DRM_EXYNOS_FIMD=y
CONFIG_DRM_EXYNOS_DP=y
CONFIG_DRM_PANEL=y
CONFIG_DRM_PANEL_SIMPLE=y
CONFIG_FB=y CONFIG_FB=y
CONFIG_FB_MODE_HELPERS=y CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_SIMPLE=y CONFIG_FB_SIMPLE=y
CONFIG_EXYNOS_VIDEO=y CONFIG_EXYNOS_VIDEO=y
CONFIG_EXYNOS_MIPI_DSI=y CONFIG_EXYNOS_MIPI_DSI=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_LCD_CLASS_DEVICE=y
CONFIG_LCD_PLATFORM=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_BACKLIGHT_GENERIC=y
CONFIG_BACKLIGHT_PWM=y
CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FONTS=y CONFIG_FONTS=y
CONFIG_FONT_7x14=y CONFIG_FONT_7x14=y
......
...@@ -68,7 +68,7 @@ CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y ...@@ -68,7 +68,7 @@ CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_GENERIC_CPUFREQ_CPU0=y CONFIG_CPUFREQ_DT=y
# CONFIG_ARM_OMAP2PLUS_CPUFREQ is not set # CONFIG_ARM_OMAP2PLUS_CPUFREQ is not set
CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE=y
CONFIG_BINFMT_MISC=y CONFIG_BINFMT_MISC=y
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/phy.h> #include <linux/phy.h>
#include <linux/clk-provider.h> #include <linux/clk-provider.h>
#include <linux/phy.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -26,8 +27,25 @@ ...@@ -26,8 +27,25 @@
#include "generic.h" #include "generic.h"
static int ksz8081_phy_fixup(struct phy_device *phy)
{
int value;
value = phy_read(phy, 0x16);
value &= ~0x20;
phy_write(phy, 0x16, value);
return 0;
}
static void __init sama5_dt_device_init(void) static void __init sama5_dt_device_init(void)
{ {
if (of_machine_is_compatible("atmel,sama5d4ek") &&
IS_ENABLED(CONFIG_PHYLIB)) {
phy_register_fixup_for_id("fc028000.etherne:00",
ksz8081_phy_fixup);
}
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
} }
......
...@@ -144,7 +144,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) ...@@ -144,7 +144,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
post_div_table[1].div = 1; post_div_table[1].div = 1;
post_div_table[2].div = 1; post_div_table[2].div = 1;
video_div_table[1].div = 1; video_div_table[1].div = 1;
video_div_table[2].div = 1; video_div_table[3].div = 1;
} }
clk[IMX6QDL_PLL1_BYPASS_SRC] = imx_clk_mux("pll1_bypass_src", base + 0x00, 14, 2, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); clk[IMX6QDL_PLL1_BYPASS_SRC] = imx_clk_mux("pll1_bypass_src", base + 0x00, 14, 2, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels));
......
...@@ -558,6 +558,9 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node) ...@@ -558,6 +558,9 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node)
clk_set_parent(clks[IMX6SX_CLK_GPU_CORE_SEL], clks[IMX6SX_CLK_PLL3_PFD0]); clk_set_parent(clks[IMX6SX_CLK_GPU_CORE_SEL], clks[IMX6SX_CLK_PLL3_PFD0]);
clk_set_parent(clks[IMX6SX_CLK_GPU_AXI_SEL], clks[IMX6SX_CLK_PLL3_PFD0]); clk_set_parent(clks[IMX6SX_CLK_GPU_AXI_SEL], clks[IMX6SX_CLK_PLL3_PFD0]);
clk_set_parent(clks[IMX6SX_CLK_QSPI1_SEL], clks[IMX6SX_CLK_PLL2_BUS]);
clk_set_parent(clks[IMX6SX_CLK_QSPI2_SEL], clks[IMX6SX_CLK_PLL2_BUS]);
/* Set initial power mode */ /* Set initial power mode */
imx6q_set_lpm(WAIT_CLOCKED); imx6q_set_lpm(WAIT_CLOCKED);
} }
......
...@@ -77,6 +77,24 @@ MACHINE_END ...@@ -77,6 +77,24 @@ MACHINE_END
#endif #endif
#ifdef CONFIG_ARCH_OMAP3 #ifdef CONFIG_ARCH_OMAP3
/* Some boards need board name for legacy userspace in /proc/cpuinfo */
static const char *const n900_boards_compat[] __initconst = {
"nokia,omap3-n900",
NULL,
};
DT_MACHINE_START(OMAP3_N900_DT, "Nokia RX-51 board")
.reserve = omap_reserve,
.map_io = omap3_map_io,
.init_early = omap3430_init_early,
.init_machine = omap_generic_init,
.init_late = omap3_init_late,
.init_time = omap3_sync32k_timer_init,
.dt_compat = n900_boards_compat,
.restart = omap3xxx_restart,
MACHINE_END
/* Generic omap3 boards, most boards can use these */
static const char *const omap3_boards_compat[] __initconst = { static const char *const omap3_boards_compat[] __initconst = {
"ti,omap3430", "ti,omap3430",
"ti,omap3", "ti,omap3",
......
...@@ -249,6 +249,7 @@ extern void omap4_cpu_die(unsigned int cpu); ...@@ -249,6 +249,7 @@ extern void omap4_cpu_die(unsigned int cpu);
extern struct smp_operations omap4_smp_ops; extern struct smp_operations omap4_smp_ops;
extern void omap5_secondary_startup(void); extern void omap5_secondary_startup(void);
extern void omap5_secondary_hyp_startup(void);
#endif #endif
#if defined(CONFIG_SMP) && defined(CONFIG_PM) #if defined(CONFIG_SMP) && defined(CONFIG_PM)
......
...@@ -286,6 +286,10 @@ ...@@ -286,6 +286,10 @@
#define OMAP5XXX_CONTROL_STATUS 0x134 #define OMAP5XXX_CONTROL_STATUS 0x134
#define OMAP5_DEVICETYPE_MASK (0x7 << 6) #define OMAP5_DEVICETYPE_MASK (0x7 << 6)
/* DRA7XX CONTROL CORE BOOTSTRAP */
#define DRA7_CTRL_CORE_BOOTSTRAP 0x6c4
#define DRA7_SPEEDSELECT_MASK (0x3 << 8)
/* /*
* REVISIT: This list of registers is not comprehensive - there are more * REVISIT: This list of registers is not comprehensive - there are more
* that should be added. * that should be added.
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
/* Physical address needed since MMU not enabled yet on secondary core */ /* Physical address needed since MMU not enabled yet on secondary core */
#define AUX_CORE_BOOT0_PA 0x48281800 #define AUX_CORE_BOOT0_PA 0x48281800
#define API_HYP_ENTRY 0x102
/* /*
* OMAP5 specific entry point for secondary CPU to jump from ROM * OMAP5 specific entry point for secondary CPU to jump from ROM
...@@ -40,6 +41,26 @@ wait: ldr r2, =AUX_CORE_BOOT0_PA @ read from AuxCoreBoot0 ...@@ -40,6 +41,26 @@ wait: ldr r2, =AUX_CORE_BOOT0_PA @ read from AuxCoreBoot0
bne wait bne wait
b secondary_startup b secondary_startup
ENDPROC(omap5_secondary_startup) ENDPROC(omap5_secondary_startup)
/*
* Same as omap5_secondary_startup except we call into the ROM to
* enable HYP mode first. This is called instead of
* omap5_secondary_startup if the primary CPU was put into HYP mode by
* the boot loader.
*/
ENTRY(omap5_secondary_hyp_startup)
wait_2: ldr r2, =AUX_CORE_BOOT0_PA @ read from AuxCoreBoot0
ldr r0, [r2]
mov r0, r0, lsr #5
mrc p15, 0, r4, c0, c0, 5
and r4, r4, #0x0f
cmp r0, r4
bne wait_2
ldr r12, =API_HYP_ENTRY
adr r0, hyp_boot
smc #0
hyp_boot:
b secondary_startup
ENDPROC(omap5_secondary_hyp_startup)
/* /*
* OMAP4 specific entry point for secondary CPU to jump from ROM * OMAP4 specific entry point for secondary CPU to jump from ROM
* code. This routine also provides a holding flag into which * code. This routine also provides a holding flag into which
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/irqchip/arm-gic.h> #include <linux/irqchip/arm-gic.h>
#include <asm/smp_scu.h> #include <asm/smp_scu.h>
#include <asm/virt.h>
#include "omap-secure.h" #include "omap-secure.h"
#include "omap-wakeupgen.h" #include "omap-wakeupgen.h"
...@@ -226,6 +227,14 @@ static void __init omap4_smp_prepare_cpus(unsigned int max_cpus) ...@@ -226,6 +227,14 @@ static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)
*/ */
if (omap_secure_apis_support()) if (omap_secure_apis_support())
omap_auxcoreboot_addr(virt_to_phys(startup_addr)); omap_auxcoreboot_addr(virt_to_phys(startup_addr));
else
/*
* If the boot CPU is in HYP mode then start secondary
* CPU in HYP mode as well.
*/
if ((__boot_cpu_mode & MODE_MASK) == HYP_MODE)
writel_relaxed(virt_to_phys(omap5_secondary_hyp_startup),
base + OMAP_AUX_CORE_BOOT_1);
else else
writel_relaxed(virt_to_phys(omap5_secondary_startup), writel_relaxed(virt_to_phys(omap5_secondary_startup),
base + OMAP_AUX_CORE_BOOT_1); base + OMAP_AUX_CORE_BOOT_1);
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
#include "soc.h" #include "soc.h"
#include "common.h" #include "common.h"
#include "control.h"
#include "powerdomain.h" #include "powerdomain.h"
#include "omap-secure.h" #include "omap-secure.h"
...@@ -496,7 +497,8 @@ static void __init realtime_counter_init(void) ...@@ -496,7 +497,8 @@ static void __init realtime_counter_init(void)
void __iomem *base; void __iomem *base;
static struct clk *sys_clk; static struct clk *sys_clk;
unsigned long rate; unsigned long rate;
unsigned int reg, num, den; unsigned int reg;
unsigned long long num, den;
base = ioremap(REALTIME_COUNTER_BASE, SZ_32); base = ioremap(REALTIME_COUNTER_BASE, SZ_32);
if (!base) { if (!base) {
...@@ -511,13 +513,42 @@ static void __init realtime_counter_init(void) ...@@ -511,13 +513,42 @@ static void __init realtime_counter_init(void)
} }
rate = clk_get_rate(sys_clk); rate = clk_get_rate(sys_clk);
if (soc_is_dra7xx()) {
/*
* Errata i856 says the 32.768KHz crystal does not start at
* power on, so the CPU falls back to an emulated 32KHz clock
* based on sysclk / 610 instead. This causes the master counter
* frequency to not be 6.144MHz but at sysclk / 610 * 375 / 2
* (OR sysclk * 75 / 244)
*
* This affects at least the DRA7/AM572x 1.0, 1.1 revisions.
* Of course any board built without a populated 32.768KHz
* crystal would also need this fix even if the CPU is fixed
* later.
*
* Either case can be detected by using the two speedselect bits
* If they are not 0, then the 32.768KHz clock driving the
* coarse counter that corrects the fine counter every time it
* ticks is actually rate/610 rather than 32.768KHz and we
* should compensate to avoid the 570ppm (at 20MHz, much worse
* at other rates) too fast system time.
*/
reg = omap_ctrl_readl(DRA7_CTRL_CORE_BOOTSTRAP);
if (reg & DRA7_SPEEDSELECT_MASK) {
num = 75;
den = 244;
goto sysclk1_based;
}
}
/* Numerator/denumerator values refer TRM Realtime Counter section */ /* Numerator/denumerator values refer TRM Realtime Counter section */
switch (rate) { switch (rate) {
case 1200000: case 12000000:
num = 64; num = 64;
den = 125; den = 125;
break; break;
case 1300000: case 13000000:
num = 768; num = 768;
den = 1625; den = 1625;
break; break;
...@@ -529,11 +560,11 @@ static void __init realtime_counter_init(void) ...@@ -529,11 +560,11 @@ static void __init realtime_counter_init(void)
num = 192; num = 192;
den = 625; den = 625;
break; break;
case 2600000: case 26000000:
num = 384; num = 384;
den = 1625; den = 1625;
break; break;
case 2700000: case 27000000:
num = 256; num = 256;
den = 1125; den = 1125;
break; break;
...@@ -545,6 +576,7 @@ static void __init realtime_counter_init(void) ...@@ -545,6 +576,7 @@ static void __init realtime_counter_init(void)
break; break;
} }
sysclk1_based:
/* Program numerator and denumerator registers */ /* Program numerator and denumerator registers */
reg = readl_relaxed(base + INCREMENTER_NUMERATOR_OFFSET) & reg = readl_relaxed(base + INCREMENTER_NUMERATOR_OFFSET) &
NUMERATOR_DENUMERATOR_MASK; NUMERATOR_DENUMERATOR_MASK;
...@@ -556,7 +588,7 @@ static void __init realtime_counter_init(void) ...@@ -556,7 +588,7 @@ static void __init realtime_counter_init(void)
reg |= den; reg |= den;
writel_relaxed(reg, base + INCREMENTER_DENUMERATOR_RELOAD_OFFSET); writel_relaxed(reg, base + INCREMENTER_DENUMERATOR_RELOAD_OFFSET);
arch_timer_freq = (rate / den) * num; arch_timer_freq = DIV_ROUND_UP_ULL(rate * num, den);
set_cntfreq(); set_cntfreq();
iounmap(base); iounmap(base);
......
...@@ -19,11 +19,37 @@ ...@@ -19,11 +19,37 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/irqchip.h> #include <linux/irqchip.h>
#include <linux/clk-provider.h>
#include <linux/clocksource.h>
#include <linux/mfd/syscon.h>
#include <linux/regmap.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/hardware/cache-l2x0.h> #include <asm/hardware/cache-l2x0.h>
#include "core.h" #include "core.h"
#define RK3288_GRF_SOC_CON0 0x244
static void __init rockchip_timer_init(void)
{
if (of_machine_is_compatible("rockchip,rk3288")) {
struct regmap *grf;
/*
* Disable auto jtag/sdmmc switching that causes issues
* with the mmc controllers making them unreliable
*/
grf = syscon_regmap_lookup_by_compatible("rockchip,rk3288-grf");
if (!IS_ERR(grf))
regmap_write(grf, RK3288_GRF_SOC_CON0, 0x10000000);
else
pr_err("rockchip: could not get grf syscon\n");
}
of_clk_init(NULL);
clocksource_of_init();
}
static void __init rockchip_dt_init(void) static void __init rockchip_dt_init(void)
{ {
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
...@@ -42,6 +68,7 @@ static const char * const rockchip_board_dt_compat[] = { ...@@ -42,6 +68,7 @@ static const char * const rockchip_board_dt_compat[] = {
DT_MACHINE_START(ROCKCHIP_DT, "Rockchip Cortex-A9 (Device Tree)") DT_MACHINE_START(ROCKCHIP_DT, "Rockchip Cortex-A9 (Device Tree)")
.l2c_aux_val = 0, .l2c_aux_val = 0,
.l2c_aux_mask = ~0, .l2c_aux_mask = ~0,
.init_time = rockchip_timer_init,
.dt_compat = rockchip_board_dt_compat, .dt_compat = rockchip_board_dt_compat,
.init_machine = rockchip_dt_init, .init_machine = rockchip_dt_init,
MACHINE_END MACHINE_END
...@@ -800,7 +800,14 @@ void __init r8a7740_init_irq_of(void) ...@@ -800,7 +800,14 @@ void __init r8a7740_init_irq_of(void)
void __iomem *intc_msk_base = ioremap_nocache(0xe6900040, 0x10); void __iomem *intc_msk_base = ioremap_nocache(0xe6900040, 0x10);
void __iomem *pfc_inta_ctrl = ioremap_nocache(0xe605807c, 0x4); void __iomem *pfc_inta_ctrl = ioremap_nocache(0xe605807c, 0x4);
#ifdef CONFIG_ARCH_SHMOBILE_LEGACY
void __iomem *gic_dist_base = ioremap_nocache(0xc2800000, 0x1000);
void __iomem *gic_cpu_base = ioremap_nocache(0xc2000000, 0x1000);
gic_init(0, 29, gic_dist_base, gic_cpu_base);
#else
irqchip_init(); irqchip_init();
#endif
/* route signals to GIC */ /* route signals to GIC */
iowrite32(0x0, pfc_inta_ctrl); iowrite32(0x0, pfc_inta_ctrl);
......
...@@ -595,6 +595,7 @@ static struct platform_device ipmmu_device = { ...@@ -595,6 +595,7 @@ static struct platform_device ipmmu_device = {
static struct renesas_intc_irqpin_config irqpin0_platform_data = { static struct renesas_intc_irqpin_config irqpin0_platform_data = {
.irq_base = irq_pin(0), /* IRQ0 -> IRQ7 */ .irq_base = irq_pin(0), /* IRQ0 -> IRQ7 */
.control_parent = true,
}; };
static struct resource irqpin0_resources[] = { static struct resource irqpin0_resources[] = {
...@@ -656,6 +657,7 @@ static struct platform_device irqpin1_device = { ...@@ -656,6 +657,7 @@ static struct platform_device irqpin1_device = {
static struct renesas_intc_irqpin_config irqpin2_platform_data = { static struct renesas_intc_irqpin_config irqpin2_platform_data = {
.irq_base = irq_pin(16), /* IRQ16 -> IRQ23 */ .irq_base = irq_pin(16), /* IRQ16 -> IRQ23 */
.control_parent = true,
}; };
static struct resource irqpin2_resources[] = { static struct resource irqpin2_resources[] = {
...@@ -686,6 +688,7 @@ static struct platform_device irqpin2_device = { ...@@ -686,6 +688,7 @@ static struct platform_device irqpin2_device = {
static struct renesas_intc_irqpin_config irqpin3_platform_data = { static struct renesas_intc_irqpin_config irqpin3_platform_data = {
.irq_base = irq_pin(24), /* IRQ24 -> IRQ31 */ .irq_base = irq_pin(24), /* IRQ24 -> IRQ31 */
.control_parent = true,
}; };
static struct resource irqpin3_resources[] = { static struct resource irqpin3_resources[] = {
......
...@@ -1312,6 +1312,9 @@ static int cci_probe(void) ...@@ -1312,6 +1312,9 @@ static int cci_probe(void)
if (!np) if (!np)
return -ENODEV; return -ENODEV;
if (!of_device_is_available(np))
return -ENODEV;
cci_config = of_match_node(arm_cci_matches, np)->data; cci_config = of_match_node(arm_cci_matches, np)->data;
if (!cci_config) if (!cci_config)
return -ENODEV; return -ENODEV;
......
...@@ -102,6 +102,8 @@ static int sunxi_reset_init(struct device_node *np) ...@@ -102,6 +102,8 @@ static int sunxi_reset_init(struct device_node *np)
goto err_alloc; goto err_alloc;
} }
spin_lock_init(&data->lock);
data->rcdev.owner = THIS_MODULE; data->rcdev.owner = THIS_MODULE;
data->rcdev.nr_resets = size * 32; data->rcdev.nr_resets = size * 32;
data->rcdev.ops = &sunxi_reset_ops; data->rcdev.ops = &sunxi_reset_ops;
...@@ -157,6 +159,8 @@ static int sunxi_reset_probe(struct platform_device *pdev) ...@@ -157,6 +159,8 @@ static int sunxi_reset_probe(struct platform_device *pdev)
if (IS_ERR(data->membase)) if (IS_ERR(data->membase))
return PTR_ERR(data->membase); return PTR_ERR(data->membase);
spin_lock_init(&data->lock);
data->rcdev.owner = THIS_MODULE; data->rcdev.owner = THIS_MODULE;
data->rcdev.nr_resets = resource_size(res) * 32; data->rcdev.nr_resets = resource_size(res) * 32;
data->rcdev.ops = &sunxi_reset_ops; data->rcdev.ops = &sunxi_reset_ops;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment