Index: head/sys/arm/allwinner/aw_sid.c =================================================================== --- head/sys/arm/allwinner/aw_sid.c (nonexistent) +++ head/sys/arm/allwinner/aw_sid.c (revision 299871) @@ -0,0 +1,135 @@ +/*- + * Copyright (c) 2016 Jared McNeill + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * Allwinner secure ID controller + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#define SID_SRAM 0x200 +#define SID_THERMAL_CALIB0 (SID_SRAM + 0x34) +#define SID_THERMAL_CALIB1 (SID_SRAM + 0x38) + +static struct ofw_compat_data compat_data[] = { + { "allwinner,sun8i-a83t-sid", 1 }, + { NULL, 0 } +}; + +struct aw_sid_softc { + struct resource *res; +}; + +static struct aw_sid_softc *aw_sid_sc; + +static struct resource_spec aw_sid_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { -1, 0 } +}; + +#define RD4(sc, reg) bus_read_4((sc)->res, (reg)) +#define WR4(sc, reg, val) bus_write_4((sc)->res, (reg), (val)) + +static int +aw_sid_probe(device_t dev) +{ + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "Allwinner Secure ID Controller"); + return (BUS_PROBE_DEFAULT); +} + +static int +aw_sid_attach(device_t dev) +{ + struct aw_sid_softc *sc; + + sc = device_get_softc(dev); + + if (bus_alloc_resources(dev, aw_sid_spec, &sc->res) != 0) { + device_printf(dev, "cannot allocate resources for device\n"); + return (ENXIO); + } + + aw_sid_sc = sc; + + return (0); +} + +int +aw_sid_read_tscalib(uint32_t *calib0, uint32_t *calib1) +{ + struct aw_sid_softc *sc; + + sc = aw_sid_sc; + if (sc == NULL) + return (ENXIO); + + *calib0 = RD4(sc, SID_THERMAL_CALIB0); + *calib1 = RD4(sc, SID_THERMAL_CALIB1); + + return (0); +} + +static device_method_t aw_sid_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, aw_sid_probe), + DEVMETHOD(device_attach, aw_sid_attach), + + DEVMETHOD_END +}; + +static driver_t aw_sid_driver = { + "aw_sid", + aw_sid_methods, + sizeof(struct aw_sid_softc), +}; + +static devclass_t aw_sid_devclass; + +EARLY_DRIVER_MODULE(aw_sid, simplebus, aw_sid_driver, aw_sid_devclass, 0, 0, + BUS_PASS_RESOURCE + BUS_PASS_ORDER_FIRST); +MODULE_VERSION(aw_sid, 1); Property changes on: head/sys/arm/allwinner/aw_sid.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sys/arm/allwinner/aw_sid.h =================================================================== --- head/sys/arm/allwinner/aw_sid.h (nonexistent) +++ head/sys/arm/allwinner/aw_sid.h (revision 299871) @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2016 Jared McNeill + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __AW_SID_H__ +#define __AW_SID_H__ + +int aw_sid_read_tscalib(uint32_t *, uint32_t *); + +#endif /* !__AW_SID_H__ */ Property changes on: head/sys/arm/allwinner/aw_sid.h ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sys/arm/allwinner/aw_thermal.c =================================================================== --- head/sys/arm/allwinner/aw_thermal.c (nonexistent) +++ head/sys/arm/allwinner/aw_thermal.c (revision 299871) @@ -0,0 +1,232 @@ +/*- + * Copyright (c) 2016 Jared McNeill + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * Allwinner thermal sensor controller + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#define THS_CTRL0 0x00 +#define THS_CTRL2 0x40 +#define SENSOR_ACQ1_SHIFT 16 +#define SENSOR2_EN (1 << 2) +#define SENSOR1_EN (1 << 1) +#define SENSOR0_EN (1 << 0) +#define THS_INTC 0x44 +#define THS_INTS 0x48 +#define THS_FILTER 0x70 +#define FILTER_EN (1 << 2) +#define THS_CALIB0 0x74 +#define THS_CALIB1 0x78 +#define THS_DATA0 0x80 +#define THS_DATA1 0x84 +#define THS_DATA2 0x88 +#define DATA_MASK 0xfff + +#define TEMP_BASE 2719 +#define TEMP_MUL 1000 +#define TEMP_DIV 14186 +#define TEMP_TO_K 273 +#define ADC_ACQUIRE_TIME (24 - 1) +#define SENSOR_ENABLE_ALL (SENSOR0_EN|SENSOR1_EN|SENSOR2_EN) + +enum aw_thermal_sensor { + THS_SENSOR_CPU_CLUSTER0, + THS_SENSOR_CPU_CLUSTER1, + THS_SENSOR_GPU, + THS_SENSOR_END = -1 +}; + +struct aw_thermal_sensor_config { + enum aw_thermal_sensor sensor; + const char *name; + const char *desc; +}; + +static const struct aw_thermal_sensor_config a83t_sensor_config[] = { + { .sensor = THS_SENSOR_CPU_CLUSTER0, + .name = "cluster0", .desc = "CPU cluster 0 temperature" }, + { .sensor = THS_SENSOR_CPU_CLUSTER1, + .name = "cluster1", .desc = "CPU cluster 1 temperature" }, + { .sensor = THS_SENSOR_GPU, + .name = "gpu", .desc = "GPU temperature" }, + { .sensor = THS_SENSOR_END } +}; + +static struct ofw_compat_data compat_data[] = { + { "allwinner,sun8i-a83t-ts", (uintptr_t)&a83t_sensor_config }, + { NULL, (uintptr_t)NULL } +}; + +#define THS_CONF(d) \ + (void *)ofw_bus_search_compatible((d), compat_data)->ocd_data + +struct aw_thermal_softc { + struct resource *res; + struct aw_thermal_sensor_config *conf; +}; + +static struct resource_spec aw_thermal_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { -1, 0 } +}; + +#define RD4(sc, reg) bus_read_4((sc)->res, (reg)) +#define WR4(sc, reg, val) bus_write_4((sc)->res, (reg), (val)) + +static int +aw_thermal_init(struct aw_thermal_softc *sc) +{ + uint32_t calib0, calib1; + int error; + + /* Read calibration settings from SRAM */ + error = aw_sid_read_tscalib(&calib0, &calib1); + if (error != 0) + return (error); + + /* Write calibration settings to thermal controller */ + WR4(sc, THS_CALIB0, calib0); + WR4(sc, THS_CALIB1, calib1); + + /* Configure ADC acquire time (CLK_IN/(N+1)) and enable sensors */ + WR4(sc, THS_CTRL0, ADC_ACQUIRE_TIME); + WR4(sc, THS_CTRL2, (ADC_ACQUIRE_TIME << SENSOR_ACQ1_SHIFT) | + SENSOR_ENABLE_ALL); + + /* Disable interrupts */ + WR4(sc, THS_INTC, 0); + WR4(sc, THS_INTS, RD4(sc, THS_INTS)); + + /* Enable average filter */ + WR4(sc, THS_FILTER, RD4(sc, THS_FILTER) | FILTER_EN); + + return (0); +} + +static int +aw_thermal_gettemp(uint32_t val) +{ + int raw; + + raw = val & DATA_MASK; + return (((TEMP_BASE - raw) * TEMP_MUL) / TEMP_DIV) + TEMP_TO_K; +} + +static int +aw_thermal_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct aw_thermal_softc *sc; + enum aw_thermal_sensor sensor; + int val; + + sc = arg1; + sensor = arg2; + + val = aw_thermal_gettemp(RD4(sc, THS_DATA0 + (sensor * 4))); + + return sysctl_handle_opaque(oidp, &val, sizeof(val), req); +} + +static int +aw_thermal_probe(device_t dev) +{ + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (THS_CONF(dev) == NULL) + return (ENXIO); + + device_set_desc(dev, "Allwinner Thermal Sensor Controller"); + return (BUS_PROBE_DEFAULT); +} + +static int +aw_thermal_attach(device_t dev) +{ + struct aw_thermal_softc *sc; + int i; + + sc = device_get_softc(dev); + + sc->conf = THS_CONF(dev); + + if (bus_alloc_resources(dev, aw_thermal_spec, &sc->res) != 0) { + device_printf(dev, "cannot allocate resources for device\n"); + return (ENXIO); + } + + if (aw_thermal_init(sc) != 0) + return (ENXIO); + + for (i = 0; sc->conf[i].sensor != THS_SENSOR_END; i++) + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, sc->conf[i].name, + CTLTYPE_INT | CTLFLAG_RD, + sc, sc->conf[i].sensor, aw_thermal_sysctl, "IK0", + sc->conf[i].desc); + + return (0); +} + +static device_method_t aw_thermal_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, aw_thermal_probe), + DEVMETHOD(device_attach, aw_thermal_attach), + + DEVMETHOD_END +}; + +static driver_t aw_thermal_driver = { + "aw_thermal", + aw_thermal_methods, + sizeof(struct aw_thermal_softc), +}; + +static devclass_t aw_thermal_devclass; + +DRIVER_MODULE(aw_thermal, simplebus, aw_thermal_driver, aw_thermal_devclass, + 0, 0); +MODULE_VERSION(aw_thermal, 1); Property changes on: head/sys/arm/allwinner/aw_thermal.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sys/arm/allwinner/files.allwinner =================================================================== --- head/sys/arm/allwinner/files.allwinner (revision 299870) +++ head/sys/arm/allwinner/files.allwinner (revision 299871) @@ -1,51 +1,53 @@ # $FreeBSD$ kern/kern_clocksource.c standard arm/allwinner/a10_ahci.c optional ahci arm/allwinner/a10_codec.c optional sound arm/allwinner/a10_common.c standard arm/allwinner/a10_dmac.c standard arm/allwinner/a10_ehci.c optional ehci arm/allwinner/aw_usbphy.c optional ehci arm/allwinner/a10_gpio.c optional gpio arm/allwinner/a10_mmc.c optional mmc arm/allwinner/a10_sramc.c standard arm/allwinner/aw_nmi.c optional intrng arm/allwinner/aw_if_dwc.c optional dwc arm/allwinner/aw_rsb.c optional rsb arm/allwinner/aw_rtc.c standard arm/allwinner/aw_wdog.c standard arm/allwinner/a20/a20_cpu_cfg.c standard arm/allwinner/allwinner_machdep.c standard arm/allwinner/aw_mp.c optional smp arm/allwinner/axp209.c optional axp209 arm/allwinner/axp81x.c optional axp81x arm/allwinner/if_awg.c optional awg arm/allwinner/if_emac.c optional emac arm/allwinner/sunxi_dma_if.m standard dev/iicbus/twsi/a10_twsi.c optional twsi +arm/allwinner/aw_sid.c standard +arm/allwinner/aw_thermal.c standard #arm/allwinner/console.c standard arm/allwinner/a10_fb.c optional vt arm/allwinner/a10_hdmi.c optional hdmi arm/allwinner/a10_hdmiaudio.c optional hdmi sound arm/arm/hdmi_if.m optional hdmi arm/allwinner/aw_reset.c standard arm/allwinner/aw_ccu.c standard arm/allwinner/clk/aw_ahbclk.c standard arm/allwinner/clk/aw_apbclk.c standard arm/allwinner/clk/aw_axiclk.c standard arm/allwinner/clk/aw_codecclk.c standard arm/allwinner/clk/aw_cpuclk.c standard arm/allwinner/clk/aw_cpusclk.c standard arm/allwinner/clk/aw_debeclk.c standard arm/allwinner/clk/aw_gate.c standard arm/allwinner/clk/aw_gmacclk.c standard arm/allwinner/clk/aw_hdmiclk.c standard arm/allwinner/clk/aw_lcdclk.c standard arm/allwinner/clk/aw_modclk.c standard arm/allwinner/clk/aw_mmcclk.c standard arm/allwinner/clk/aw_oscclk.c standard arm/allwinner/clk/aw_pll.c standard arm/allwinner/clk/aw_usbclk.c standard Index: head/sys/boot/fdt/dts/arm/a83t.dtsi =================================================================== --- head/sys/boot/fdt/dts/arm/a83t.dtsi (revision 299870) +++ head/sys/boot/fdt/dts/arm/a83t.dtsi (revision 299871) @@ -1,231 +1,243 @@ /*- * Copyright (c) 2016 Jared McNeill * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ / { pmu { compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu"; /* Cluster 0 only */ interrupts = , , , ; }; clocks { /* cpus_clk compatible in gnu dt is incorrect */ cpus_clk: clk@01f01400 { compatible = "allwinner,sun8i-a83t-cpus-clk"; }; pll_hsic: clk@01c20044 { #clock-cells = <0>; compatible = "allwinner,sun9i-a80-pll4-clk"; reg = <0x01c20044 0x4>; clocks = <&osc24M>; clock-output-names = "pll_hsic"; }; usb_clk: clk@01c200cc { #clock-cells = <1>; #reset-cells = <1>; compatible = "allwinner,sun8i-a83t-usb-clk"; reg = <0x01c200cc 0x4>; clocks = <&osc24M>, <&pll_hsic>; clock-indices = <8>, <9>, <10>, <11>, <16>; clock-output-names = "usb_phy0", "usb_phy1", "usb_hsic_pll", "usb_hsic_12m", "usb_ohci0"; }; mii_phy_tx_clk: clk@1 { #clock-cells = <0>; compatible = "fixed-clock"; clock-frequency = <25000000>; clock-output-names = "mii_phy_tx"; }; emac_int_tx_clk: clk@2 { #clock-cells = <0>; compatible = "fixed-clock"; clock-frequency = <125000000>; clock-output-names = "emac_int_tx"; }; emac_tx_clk: clk@01c00030 { #clock-cells = <0>; compatible = "allwinner,sun8i-a83t-emac-clk"; reg = <0x01c00030 0x4>; clocks = <&mii_phy_tx_clk>, <&emac_int_tx_clk>; clock-output-names = "emac_tx"; }; }; soc { nmi_intc: interrupt-controller@01f00c0c { compatible = "allwinner,sun6i-a31-sc-nmi"; interrupt-controller; #interrupt-cells = <2>; reg = <0x01f00c0c 0x38>; interrupts = ; }; i2c0: i2c@01c2ac00 { compatible = "allwinner,sun8i-a83t-i2c"; reg = <0x01c2ac00 0x400>; interrupts = ; clocks = <&bus_gates 96>; resets = <&apb2_reset 0>; status = "disabled"; #address-cells = <1>; #size-cells = <0>; }; i2c1: i2c@01c2b000 { compatible = "allwinner,sun8i-a83t-i2c"; reg = <0x01c2b000 0x400>; interrupts = ; clocks = <&bus_gates 97>; resets = <&apb2_reset 1>; status = "disabled"; #address-cells = <1>; #size-cells = <0>; }; i2c2: i2c@01c2b400 { compatible = "allwinner,sun8i-a83t-i2c"; reg = <0x01c2b400 0x400>; interrupts = ; clocks = <&bus_gates 98>; resets = <&apb2_reset 2>; status = "disabled"; #address-cells = <1>; #size-cells = <0>; }; usbphy: phy@01c19400 { compatible = "allwinner,sun8i-a83t-usb-phy"; clocks = <&usb_clk 8>, <&usb_clk 9>, <&usb_clk 10>, <&usb_clk 11>; clock-names = "usb0_phy", "usb1_phy", "hsic_pll", "hsic_12m"; resets = <&usb_clk 0>, <&usb_clk 1>, <&usb_clk 2>; reset-names = "usb0_reset", "usb1_reset", "usb2_reset"; status = "disabled"; #phy-cells = <1>; }; ehci0: usb@01c1a000 { compatible = "allwinner,sun8i-a83t-ehci", "generic-ehci"; reg = <0x01c1a000 0x100>; interrupts = ; clocks = <&bus_gates 26>; resets = <&ahb_reset 26>; phys = <&usbphy 1>; phy-names = "usb"; status = "disabled"; }; ehci1: usb@01c1b000 { compatible = "allwinner,sun8i-a83t-ehci", "generic-ehci"; reg = <0x01c1b000 0x100>; interrupts = ; clocks = <&bus_gates 27>; resets = <&ahb_reset 27>; phys = <&usbphy 2>; phy-names = "usb"; status = "disabled"; }; emac: ethernet@01c30000 { compatible = "allwinner,sun8i-a83t-emac"; reg = <0x01c30000 0x100>; interrupts = ; interrupt-names = "macirq"; clocks = <&bus_gates 17>, <&emac_tx_clk>; clock-names = "ahb", "tx"; resets = <&ahb_reset 17>; reset-names = "ahb"; status = "disabled"; #address-cells = <1>; #size-cells = <0>; }; + + sid: eeprom@01c14000 { + compatible = "allwinner,sun8i-a83t-sid"; + reg = <0x01c14000 0x400>; + }; + + rtp: rtp@01f04000 { + compatible = "allwinner,sun8i-a83t-ts"; + reg = <0x01f04000 0x400>; + interrupts = ; + #thermal-sensor-cells = <0>; + }; }; }; &pio { mmc2_8bit_pins: mmc2_8bit { allwinner,pins = "PC5", "PC6", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16"; allwinner,function = "mmc2"; allwinner,drive = ; allwinner,pull = ; }; emac_pins_rgmii_a: emac_rgmii@0 { allwinner,pins = "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD11", "PD12", "PD13", "PD14", "PD18", "PD19", "PD20", "PD21", "PD22", "PD23"; allwinner,function = "emac"; allwinner,drive = ; allwinner,pull = ; }; i2c0_pins_a: i2c0@0 { allwinner,pins = "PH0", "PH1"; allwinner,function = "i2c0"; allwinner,drive = ; allwinner,pull = ; }; i2c1_pins_a: i2c1@0 { allwinner,pins = "PH2", "PH3"; allwinner,function = "i2c1"; allwinner,drive = ; allwinner,pull = ; }; i2c2_pins_a: i2c2@0 { allwinner,pins = "PH4", "PH5"; allwinner,function = "i2c2"; allwinner,drive = ; allwinner,pull = ; }; };